[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nindent_size = 4\nindent_style = space\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.md]\ntrim_trailing_whitespace = false\n\n[*.{yml,yaml}]\nindent_size = 2\n"
  },
  {
    "path": ".gitattributes",
    "content": "*.min.js binary\n/.editorconfig export-ignore\n/.gitattributes export-ignore\n/.github export-ignore\n/.gitignore export-ignore\n/.php-cs-fixer.dist.php export-ignore\n/.phpcs.xml.dist export-ignore\n/.readthedocs.yaml export-ignore\n/.scrutinizer.yml export-ignore\n/CHANGELOG.PHPExcel.md export-ignore\n/bin export-ignore\n/composer.lock export-ignore\n/docs export-ignore\n/infra export-ignore\n/mkdocs.yml export-ignore\n/phpstan-baseline.neon export-ignore\n/phpstan.neon.dist export-ignore\n/phpunit.xml.dist export-ignore\n/samples export-ignore\n/tests export-ignore\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "This is:\n\n```\n- [ ] a bug report\n- [ ] a feature request\n- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)\n```\n\n### What is the expected behavior?\n\n\n### What is the current behavior?\n\n\n### What are the steps to reproduce?\n\nPlease provide a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) of code that exhibits the issue without relying on an external Excel file or a web server:\n\n```php\n<?php\n\nrequire __DIR__ . '/vendor/autoload.php';\n\n// Create new Spreadsheet object\n$spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n\n// add code that show the issue here...\n```\nIf this is an issue with reading a specific spreadsheet file, then it may be appropriate to provide a sample file that demonstrates the problem; but please keep it as small as possible, and sanitize any confidential information before uploading.\n\n### What features do you think are causing the issue\n\n- [ ] Reader\n- [ ] Writer\n- [ ] Styles\n- [ ] Data Validations\n- [ ] Formula Calculations\n- [ ] Charts\n- [ ] AutoFilter\n- [ ] Form Elements\n\n### Does an issue affect all spreadsheet file formats? If not, which formats are affected?\n\n\n### Which versions of PhpSpreadsheet and PHP are affected?\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "This is:\n\n- [ ] a bugfix\n- [ ] a new feature\n- [ ] refactoring\n- [ ] additional unit tests\n\nChecklist:\n\n- [ ] Changes are covered by unit tests\n  - [ ] Changes are covered by existing unit tests\n  - [ ] New unit tests have been added\n- [ ] Code style is respected\n- [ ] Commit message explains **why** the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)\n- [ ] CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable\n- [ ] Documentation is updated as necessary\n\n### Why this change is needed?\n\nProvide an explanation of why this change is needed, with links to any Issues (if appropriate).\nIf this is a bugfix or a new feature, and there are no existing Issues, then please also create an issue that will make it easier to track progress with this PR.\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n- package-ecosystem: composer\n  directory: \"/\"\n  schedule:\n    interval: monthly\n    time: \"11:00\"\n  open-pull-requests-limit: 10\n"
  },
  {
    "path": ".github/stale.yml",
    "content": "# Number of days of inactivity before an issue becomes stale\ndaysUntilStale: 60\n# Number of days of inactivity before a stale issue is closed\ndaysUntilClose: 7\n# Issues with these labels will never be considered stale\nexemptLabels:\n  - pinned\n  - security\n# Label to use when marking an issue as stale\nstaleLabel: stale\n# Comment to post when marking an issue as stale. Set to `false` to disable\nmarkComment: >\n  This issue has been automatically marked as stale because it has not had\n  recent activity. It will be closed if no further activity occurs.\n\n  If this is still an issue for you, please try to help by debugging it\n  further and sharing your results.\n\n  Thank you for your contributions.\n\n# Comment to post when closing a stale issue. Set to `false` to disable\ncloseComment: false\n"
  },
  {
    "path": ".github/support.yml",
    "content": "# Label used to mark issues as support requests\nsupportLabel: question\n# Comment to post on issues marked as support requests. Add a link\n# to a support page, or set to `false` to disable\nsupportComment: >\n  This looks like a support question. Please ask your support questions on\n  [StackOverflow](https://stackoverflow.com/questions/tagged/phpspreadsheet),\n  or [Gitter](https://gitter.im/PHPOffice/PhpSpreadsheet).\n\n  Thank you for your contributions.\n\n# Whether to close issues marked as support requests\nclose: true\n# Whether to lock issues marked as support requests\nlock: false\n"
  },
  {
    "path": ".github/workflows/github-pages.yml",
    "content": "name: GithHub Pages\non:\n  push:\n    tags:\n      - '*'\n\npermissions: {}\njobs:\n  github-pages:\n    permissions:\n      contents: write # to push pages branch (peaceiris/actions-gh-pages)\n\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Setup PHP, with composer and extensions\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: 8.3\n          coverage: none # remove xdebug\n\n      - name: Build API documentation\n        run: |\n          curl -LO https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.8.1/phpDocumentor.phar\n          php phpDocumentor.phar --directory src/ --target docs/api --visibility=public,protected\n\n      - name: Deploy to GithHub Pages\n        uses: peaceiris/actions-gh-pages@v3\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./docs/api\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: main\non: [ push, pull_request, merge_group ]\npermissions:\n  contents: read # to fetch code (actions/checkout)\njobs:\n  test:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        experimental:\n          - false\n        php-version:\n          - '8.1'\n          - '8.2'\n          - '8.3'\n          - '8.4'\n          - '8.5'\n\n        include:\n          - php-version: 'nightly'\n            experimental: true\n\n    name: PHP ${{ matrix.php-version }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Install locales\n        run: sudo apt-get update && sudo apt-get install -y language-pack-fr language-pack-de\n\n      - name: Install single-byte locale\n        run: sudo sed -i -e 's/# de_DE@euro/de_DE@euro/g' /etc/locale.gen && sudo locale-gen de_DE@euro\n\n      - name: Setup PHP, with composer and extensions\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: ${{ matrix.php-version }}\n          extensions: ctype, dom, fileinfo, filter, gd, iconv, intl, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib\n          coverage: none\n\n      - name: Get composer cache directory\n        id: composer-cache\n        run: echo \"dir=$(composer config cache-files-dir)\" >> $GITHUB_OUTPUT\n\n      - name: Cache composer dependencies\n        uses: actions/cache@v4\n        with:\n          path: ${{ steps.composer-cache.outputs.dir }}\n          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}\n          restore-keys: ${{ runner.os }}-composer-\n\n      - name: Delete composer lock file\n        id: composer-lock\n        if: ${{ matrix.php-version == 'nightly' }}\n        run: |\n          rm composer.lock\n          echo \"flags=--ignore-platform-reqs\" >> $GITHUB_OUTPUT\n\n      - name: Install dependencies\n        run: composer install --no-progress --prefer-dist --optimize-autoloader ${{ steps.composer-lock.outputs.flags }}\n\n      - name: Setup problem matchers for PHP\n        run: echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"\n\n      - name: Setup problem matchers for PHPUnit\n        run: echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"\n\n      - name: \"Run PHPUnit tests (Experimental: ${{ matrix.experimental }})\"\n        env:\n          FAILURE_ACTION: \"${{ matrix.experimental == true }}\"\n        run: vendor/bin/phpunit --display-incomplete --display-skipped --display-deprecations --display-errors --display-notices --display-warnings || $FAILURE_ACTION\n\n  phpdoc-types:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 2\n\n      - name: Setup PHP, with composer and extensions\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: 8.4\n          extensions: ctype, dom, fileinfo, filter, gd, iconv, intl, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib\n          coverage: none\n\n      # This is non-ideal because it only checks for the last commit of the PR, not all of them, but better than nothing\n      - name: Check PHPDoc types\n        run: ./bin/check-phpdoc-types.php\n\n  php-cs-fixer:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Setup PHP, with composer and extensions\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: 8.4\n          extensions: ctype, dom, fileinfo, filter, gd, iconv, intl, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib\n          coverage: none\n          tools: cs2pr\n\n      - name: Get composer cache directory\n        id: composer-cache\n        run: echo \"dir=$(composer config cache-files-dir)\" >> $GITHUB_OUTPUT\n\n      - name: Cache composer dependencies\n        uses: actions/cache@v4\n        with:\n          path: ${{ steps.composer-cache.outputs.dir }}\n          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}\n          restore-keys: ${{ runner.os }}-composer-\n\n      - name: Install dependencies\n        run: composer install --no-progress --prefer-dist --optimize-autoloader\n\n      - name: Code style with PHP-CS-Fixer\n        run: (./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr) || ./vendor/bin/php-cs-fixer fix --diff --dry-run\n\n  phpcs:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Setup PHP, with composer and extensions\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: 8.4\n          extensions: ctype, dom, fileinfo, filter, gd, iconv, intl, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib\n          coverage: none\n          tools: cs2pr\n\n      - name: Get composer cache directory\n        id: composer-cache\n        run: echo \"dir=$(composer config cache-files-dir)\" >> $GITHUB_OUTPUT\n\n      - name: Cache composer dependencies\n        uses: actions/cache@v4\n        with:\n          path: ${{ steps.composer-cache.outputs.dir }}\n          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}\n          restore-keys: ${{ runner.os }}-composer-\n\n      - name: Install dependencies\n        run: composer install --no-progress --prefer-dist --optimize-autoloader\n\n      - name: Code style with PHP_CodeSniffer\n        run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr\n\n  versions:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Setup PHP, with composer and extensions\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: 8.4\n          extensions: ctype, dom, fileinfo, filter, gd, iconv, intl, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib\n          coverage: none\n          tools: cs2pr\n\n      - name: Get composer cache directory\n        id: composer-cache\n        run: echo \"dir=$(composer config cache-files-dir)\" >> $GITHUB_OUTPUT\n\n      - name: Cache composer dependencies\n        uses: actions/cache@v4\n        with:\n          path: ${{ steps.composer-cache.outputs.dir }}\n          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}\n          restore-keys: ${{ runner.os }}-composer-\n\n      - name: Install dependencies\n        run: composer install --no-progress --prefer-dist --optimize-autoloader\n\n      - name: Code Version Compatibility check with PHP_CodeSniffer\n        run: ./vendor/bin/phpcs -q --report-width=200 --report=summary,full src/ --standard=PHPCompatibility --runtime-set testVersion 8.1- --exclude=PHPCompatibility.Variables.ForbiddenThisUseContexts\n\n  phpstan:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Setup PHP, with composer and extensions\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: 8.4\n          extensions: ctype, dom, fileinfo, filter, gd, iconv, intl, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib\n          coverage: none\n          tools: cs2pr\n\n      - name: Get composer cache directory\n        id: composer-cache\n        run: echo \"dir=$(composer config cache-files-dir)\" >> $GITHUB_OUTPUT\n\n      - name: Cache composer dependencies\n        uses: actions/cache@v4\n        with:\n          path: ${{ steps.composer-cache.outputs.dir }}\n          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}\n          restore-keys: ${{ runner.os }}-composer-\n\n      - name: Install dependencies\n        run: composer install --no-progress --prefer-dist --optimize-autoloader\n\n      - name: Static analysis with PHPStan\n        run: ./vendor/bin/phpstan analyse\n\n  coverage:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n\n      - name: Install locales\n        run: sudo apt-get update && sudo apt-get install -y language-pack-fr language-pack-de\n\n      - name: Install single-byte locale\n        run: sudo sed -i -e 's/# de_DE@euro/de_DE@euro/g' /etc/locale.gen && sudo locale-gen de_DE@euro\n\n      - name: Setup PHP, with composer and extensions\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: 8.4\n          extensions: ctype, dom, fileinfo, filter, gd, iconv, intl, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib\n          coverage: pcov\n\n      - name: Get composer cache directory\n        id: composer-cache\n        run: echo \"dir=$(composer config cache-files-dir)\" >> $GITHUB_OUTPUT\n\n      - name: Cache composer dependencies\n        uses: actions/cache@v4\n        with:\n          path: ${{ steps.composer-cache.outputs.dir }}\n          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}\n          restore-keys: ${{ runner.os }}-composer-\n\n      - name: Install dependencies\n        run: composer install --no-progress --prefer-dist --optimize-autoloader\n\n      - name: Coverage\n        run: |\n          ./vendor/bin/phpunit --coverage-clover build/clover.xml\n\n      - name: Upload coverage results to Coveralls\n        uses: coverallsapp/github-action@v2\n        with:\n            github-token: ${{ secrets.GITHUB_TOKEN }}\n            file: build/clover.xml\n            format: clover\n            fail-on-error: false\n\n  release:\n    permissions:\n      contents: write # to create a release (actions/create-release)\n    runs-on: ubuntu-latest\n    if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          ref: ${{ github.ref }} # Otherwise our annotated tag is not fetched and we cannot get correct version\n\n      - name: Get release info\n        run: git tag --format '%(contents:body)' --points-at > release-body.txt\n\n      - uses: ncipollo/release-action@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token\n        with:\n          bodyFile: release-body.txt\n"
  },
  {
    "path": ".gitignore",
    "content": "/tests/codeCoverage\n/analysis\n/vendor/\n/phpunit.xml\n.phpunit.result.cache\n\n## IDE support\n*.buildpath\n*.project\n/.settings\n/.idea\n\n## mkdocs output\n/site\n"
  },
  {
    "path": ".php-cs-fixer.dist.php",
    "content": "<?php\n\n$finder = PhpCsFixer\\Finder::create()\n    ->exclude(['vendor', 'docs', '.git', '.github'])\n    ->notPath('src/PhpSpreadsheet/Writer/ZipStream3.php')\n    ->in(__DIR__);\n\n$config = new PhpCsFixer\\Config();\n$config\n    ->setRiskyAllowed(true)\n    ->setFinder($finder)\n    ->setParallelConfig(PhpCsFixer\\Runner\\Parallel\\ParallelConfigFactory::detect(null, 600))\n    ->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer' . preg_replace('~\\W~', '-', __DIR__))\n    ->setRules([\n        'align_multiline_comment' => true,\n        'array_indentation' => true,\n        'array_syntax' => ['syntax' => 'short'],\n        'backtick_to_shell_exec' => true,\n        'binary_operator_spaces' => true,\n        'blank_line_after_namespace' => true,\n        'blank_lines_before_namespace' => ['max_line_breaks' => 2, 'min_line_breaks' => 2], // we want 1 blank line before namespace\n        'blank_line_after_opening_tag' => true,\n        'blank_line_before_statement' => true,\n        'cast_spaces' => true,\n        'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']], // const are often grouped with other related const\n        'class_definition' => false, // phpcs disagree\n        'combine_consecutive_issets' => true,\n        'combine_consecutive_unsets' => true,\n        'combine_nested_dirname' => true,\n        'comment_to_phpdoc' => false, // interferes with annotations\n        'compact_nullable_type_declaration' => true,\n        'concat_space' => ['spacing' => 'one'],\n        'constant_case' => true,\n        'date_time_immutable' => false, // Break our unit tests\n        'declare_equal_normalize' => true,\n        'declare_strict_types' => false, // Too early to adopt strict types\n        'dir_constant' => true,\n        'doctrine_annotation_array_assignment' => true,\n        'doctrine_annotation_braces' => true,\n        'doctrine_annotation_indentation' => true,\n        'doctrine_annotation_spaces' => true,\n        'elseif' => true,\n        'empty_loop_body' => true,\n        'empty_loop_condition' => true,\n        'encoding' => true,\n        'ereg_to_preg' => true,\n        'error_suppression' => false, // it breaks \\PhpOffice\\PhpSpreadsheet\\Helper\\Handler\n        'explicit_indirect_variable' => false, // I feel it makes the code actually harder to read\n        'explicit_string_variable' => false, // I feel it makes the code actually harder to read\n        'final_class' => false, // We need non-final classes\n        'final_internal_class' => true,\n        'final_public_method_for_abstract_class' => false, // We need non-final methods\n        'fopen_flag_order' => true,\n        'fopen_flags' => true,\n        'full_opening_tag' => true,\n        'fully_qualified_strict_types' => true,\n        'function_declaration' => true,\n        'function_to_constant' => true,\n        'general_phpdoc_annotation_remove' => ['annotations' => ['access', 'category', 'copyright']],\n        'general_phpdoc_tag_rename' => true,\n        'global_namespace_import' => true,\n        'group_import' => false, // I feel it makes the code actually harder to read\n        'header_comment' => false, // We don't use common header in all our files\n        'heredoc_indentation' => true,\n        'heredoc_to_nowdoc' => false, // Not sure about this one\n        'implode_call' => true,\n        'include' => true,\n        'increment_style' => true,\n        'indentation_type' => true,\n        'integer_literal_case' => true,\n        'is_null' => true,\n        'lambda_not_used_import' => true,\n        'line_ending' => true,\n        'linebreak_after_opening_tag' => true,\n        'list_syntax' => ['syntax' => 'short'],\n        'logical_operators' => true,\n        'lowercase_cast' => true,\n        'lowercase_keywords' => true,\n        'lowercase_static_reference' => true,\n        'magic_constant_casing' => true,\n        'magic_method_casing' => true,\n        'mb_str_functions' => false, // No, too dangerous to change that\n        'method_argument_space' => true,\n        'method_chaining_indentation' => true,\n        'modernize_strpos' => true,\n        'modernize_types_casting' => true,\n        'modifier_keywords' => ['elements' => ['property', 'method']], // not const\n        'multiline_comment_opening_closing' => true,\n        'multiline_whitespace_before_semicolons' => true,\n        'native_constant_invocation' => false, // Micro optimization that look messy\n        'native_function_casing' => true,\n        'native_function_invocation' => false, // I suppose this would be best, but I am still unconvinced about the visual aspect of it\n        'new_with_parentheses' => ['anonymous_class' => true, 'named_class' => true],\n        'no_alias_functions' => true,\n        'no_alias_language_construct_call' => true,\n        'no_alternative_syntax' => true,\n        'no_binary_string' => true,\n        'no_blank_lines_after_class_opening' => true,\n        'no_blank_lines_after_phpdoc' => true,\n        'no_break_comment' => true,\n        'no_closing_tag' => true,\n        'no_empty_comment' => true,\n        'no_empty_phpdoc' => true,\n        'no_empty_statement' => true,\n        'no_extra_blank_lines' => true,\n        'no_homoglyph_names' => true,\n        'no_leading_import_slash' => true,\n        'no_leading_namespace_whitespace' => true,\n        'no_mixed_echo_print' => true,\n        'no_multiline_whitespace_around_double_arrow' => true,\n        'no_null_property_initialization' => true,\n        'no_php4_constructor' => true,\n        'no_short_bool_cast' => true,\n        'echo_tag_syntax' => ['format' => 'long'],\n        'no_singleline_whitespace_before_semicolons' => true,\n        'no_space_around_double_colon' => true,\n        'no_spaces_after_function_name' => true,\n        'no_spaces_around_offset' => true,\n        'no_superfluous_elseif' => false, // Might be risky on a huge code base\n        'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],\n        'no_trailing_comma_in_singleline' => ['elements' => ['arguments', 'array_destructuring', 'array', 'group_import']],\n        'no_trailing_whitespace' => true,\n        'no_trailing_whitespace_in_comment' => true,\n        'no_trailing_whitespace_in_string' => false, // Too dangerous\n        'no_unneeded_control_parentheses' => true,\n        'no_unneeded_braces' => true,\n        'no_unneeded_final_method' => true,\n        'no_unreachable_default_argument_value' => true,\n        'no_unset_cast' => true,\n        'no_unset_on_property' => false,\n        'no_unused_imports' => true,\n        'no_useless_else' => true,\n        'no_useless_return' => true,\n        'no_useless_sprintf' => true,\n        'no_whitespace_before_comma_in_array' => true,\n        'no_whitespace_in_blank_line' => true,\n        'non_printable_character' => true,\n        'normalize_index_brace' => true,\n        'not_operator_with_space' => false, // No we prefer to keep '!' without spaces\n        'not_operator_with_successor_space' => false, // idem\n        'nullable_type_declaration_for_default_null_value' => true,\n        'object_operator_without_whitespace' => true,\n        'octal_notation' => true,\n        'operator_linebreak' => true,\n        'ordered_class_elements' => false, // We prefer to keep some freedom\n        'ordered_imports' => true,\n        'ordered_interfaces' => true,\n        'ordered_traits' => true,\n        'php_unit_attributes' => ['keep_annotations' => false],\n        'php_unit_construct' => true,\n        'php_unit_dedicate_assert' => true,\n        'php_unit_dedicate_assert_internal_type' => true,\n        'php_unit_expectation' => true,\n        'php_unit_fqcn_annotation' => true,\n        'php_unit_internal_class' => false, // Because tests are excluded from package\n        'php_unit_method_casing' => true,\n        'php_unit_mock' => true,\n        'php_unit_mock_short_will_return' => true,\n        'php_unit_namespaced' => true,\n        'php_unit_no_expectation_annotation' => true,\n        'phpdoc_order_by_value' => ['annotations' => ['covers']],\n        'php_unit_set_up_tear_down_visibility' => true,\n        'php_unit_size_class' => false, // That seems extra work to maintain for little benefits\n        'php_unit_strict' => false, // We sometime actually need assertEquals\n        'php_unit_test_annotation' => true,\n        'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],\n        'php_unit_test_class_requires_covers' => false, // We don't care as much as we should about coverage\n        'phpdoc_add_missing_param_annotation' => false, // Don't add things that bring no value\n        'phpdoc_align' => false, // Waste of time\n        'phpdoc_annotation_without_dot' => false,\n        'phpdoc_indent' => true,\n        'phpdoc_line_span' => false, // Unfortunately our old comments turn even uglier with this\n        'phpdoc_no_access' => true,\n        'phpdoc_no_alias_tag' => true,\n        'phpdoc_no_empty_return' => true,\n        'phpdoc_no_package' => true,\n        'phpdoc_no_useless_inheritdoc' => true,\n        'phpdoc_order' => true,\n        'phpdoc_return_self_reference' => true,\n        'phpdoc_scalar' => true,\n        'phpdoc_separation' => true,\n        'phpdoc_single_line_var_spacing' => true,\n        'phpdoc_summary' => true,\n        'phpdoc_tag_casing' => true,\n        'phpdoc_tag_type' => true,\n        'phpdoc_to_comment' => false, // interferes with annotations\n        'phpdoc_to_param_type' => false, // Because experimental, but interesting for one shot use\n        'phpdoc_to_property_type' => false, // Because experimental, but interesting for one shot use\n        'phpdoc_to_return_type' => false, // Because experimental, but interesting for one shot use\n        'phpdoc_trim' => true,\n        'phpdoc_trim_consecutive_blank_line_separation' => true,\n        'phpdoc_types' => true,\n        'phpdoc_types_order' => true,\n        'phpdoc_var_annotation_correct_order' => true,\n        'phpdoc_var_without_name' => true,\n        'pow_to_exponentiation' => true,\n        'protected_to_private' => true,\n        'psr_autoloading' => true,\n        'random_api_migration' => true,\n        'return_assignment' => false, // Sometimes useful for clarity or debug\n        'return_type_declaration' => true,\n        'self_accessor' => true,\n        'self_static_accessor' => true,\n        'semicolon_after_instruction' => false, // Buggy in `samples/index.php`\n        'set_type_to_cast' => true,\n        'short_scalar_cast' => true,\n        'simple_to_complex_string_variable' => false, // Would differ from TypeScript without obvious advantages\n        'simplified_if_return' => false, // Even if technically correct we prefer to be explicit\n        'simplified_null_return' => false, // Even if technically correct we prefer to be explicit\n        'single_blank_line_at_eof' => true,\n        'single_class_element_per_statement' => true,\n        'single_import_per_statement' => true,\n        'single_line_after_imports' => true,\n        'single_line_comment_style' => true,\n        'single_line_throw' => false, // I don't see any reason for having a special case for Exception\n        'single_quote' => true,\n        'single_trait_insert_per_statement' => true,\n        'space_after_semicolon' => true,\n        'spaces_inside_parentheses' => ['space' => 'none'],\n        'standardize_increment' => true,\n        'standardize_not_equals' => true,\n        'static_lambda' => false, // Risky if we can't guarantee nobody use `bindTo()`\n        'strict_comparison' => false, // No, too dangerous to change that\n        'string_implicit_backslashes' => ['single_quoted' => 'unescape', 'double_quoted' => 'escape', 'heredoc' => 'escape'], // was escape_implicit_backslashes\n        'strict_param' => false, // No, too dangerous to change that\n        'string_length_to_empty' => true,\n        'string_line_ending' => true,\n        'switch_case_semicolon_to_colon' => true,\n        'switch_case_space' => true,\n        'switch_continue_to_break' => true,\n        'ternary_operator_spaces' => true,\n        'ternary_to_elvis_operator' => true,\n        'ternary_to_null_coalescing' => true,\n        'trailing_comma_in_multiline' => true,\n        'trim_array_spaces' => true,\n        'type_declaration_spaces' => ['elements' => ['function', 'property']], // was function_typehint_space\n        'types_spaces' => true,\n        'unary_operator_spaces' => true,\n        'use_arrow_functions' => true,\n        'void_return' => true,\n        'whitespace_after_comma_in_array' => true,\n        'yoda_style' => false,\n    ]);\n\nreturn $config;\n"
  },
  {
    "path": ".phpcs.xml.dist",
    "content": "<?xml version=\"1.0\"?>\n<ruleset xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" name=\"PHP_CodeSniffer\"\n         xsi:noNamespaceSchemaLocation=\"vendor/squizlabs/php_codesniffer/phpcs.xsd\">\n\n    <file>samples</file>\n    <file>src</file>\n    <file>tests</file>\n    <file>infra</file>\n    <file>bin</file>\n\n    <arg name=\"report-width\" value=\"200\"/>\n    <arg name=\"parallel\" value=\"80\"/>\n    <arg name=\"cache\" value=\"/tmp/.phpspreadsheet.phpcs-cache\"/>\n    <arg name=\"colors\"/>\n    <arg value=\"np\"/>\n\n    <!-- Include the whole PSR12 standard -->\n    <rule ref=\"PSR12\">\n        <exclude name=\"PSR2.Methods.MethodDeclaration.Underscore\"/>\n    </rule>\n</ruleset>\n"
  },
  {
    "path": ".readthedocs.yaml",
    "content": "# Read the Docs configuration file for MkDocs projects\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html\n\nversion: 2\n\nbuild:\n    os: ubuntu-22.04\n    tools:\n        python: \"3\"\n\nmkdocs:\n    configuration: mkdocs.yml\n"
  },
  {
    "path": "CHANGELOG.PHPExcel.md",
    "content": "# Changelog for PHPExcel\n\nThis is the historic changelog of the project when it was still called PHPExcel.\nIt exists only for historical purposes and versions mentioned here should not be\nconfused with PhpSpreadsheet versions.\n\n## [1.8.1] - 2015-04-30\n\n### Bugfixes\n\n- Fix for Writing an Open Document cell with non-numeric formula - @goncons [#397](https://github.com/PHPOffice/PHPExcel/issues/397)\n- Avoid potential divide by zero in basedrawing - @sarciszewski [#329](https://github.com/PHPOffice/PHPExcel/issues/329)\n- XML External Entity (XXE) Processing, different behaviour between simplexml_load_string() and simplexml_load_file(). - @ymaerschalck [#405](https://github.com/PHPOffice/PHPExcel/issues/405)\n- Fix to ensure that current cell is maintained when executing formula calculations - @MarkBaker\n- Keep/set the value on Reader _loadSheetsOnly as NULL, courtesy of Restless-ET - @MarkBaker [#350](https://github.com/PHPOffice/PHPExcel/issues/350)\n- Loading an Excel 2007 spreadsheet throws an \"Autofilter must be set on a range of cells\" exception - @MarkBaker [CodePlex #18105](https://phpexcel.codeplex.com/workitem/18105)\n- Fix to autoloader registration for backward compatibility with PHP 5.2.0 not accepting the prepend flag - @MarkBaker [#388](https://github.com/PHPOffice/PHPExcel/issues/388)\n- DOM loadHTMLFile() failing with options flags when using PHP < 5.4.0 - @MarkBaker [#384](https://github.com/PHPOffice/PHPExcel/issues/384)\n- Fix for percentage operator in formulae for BIFF Writer - @MarkBaker\n- Fix to getStyle() call for cell object - @MarkBaker\n- Discard Autofilters in Excel2007 Reader when filter range isn't a valid range - @MarkBaker\n- Fix invalid NA return in VLOOKUP - @frozenstupidity [#423](https://github.com/PHPOffice/PHPExcel/issues/423)\n- \"No Impact\" conditional formatting fix for NumberFormat - @wiseloren [CodePlex #21454](https://phpexcel.codeplex.com/workitem/21454)\n- Bug in Excel2003XML reader, parsing merged cells - @bobwitlox [#467](https://github.com/PHPOffice/PHPExcel/issues/467)\n- Fix for CEIL() and FLOOR() when number argument is zero - @MarkBaker [#302](https://github.com/PHPOffice/PHPExcel/issues/302)\n\n### General\n\n- Remove cells cleanly when calling RemoveRow() or RemoveColumn() - @MarkBaker\n- Small performance improvement for autosize columns - @MarkBaker\n- Change the getter/setter for zeroHeight to camel case - @frost-nzcr4 [#379](https://github.com/PHPOffice/PHPExcel/issues/379)\n- DefaultValueBinder is too much aggressive when converting string to numeric - @MarkBaker [#394](https://github.com/PHPOffice/PHPExcel/issues/394)\n- Default precalculate formulas to false for writers - @MarkBaker\n- Set default Cyclic Reference behaviour to 1 to eliminate exception when using a single cyclic iteration in formulae - @MarkBaker\n\n### Features\n\n- Some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE - @MarkBaker [#396](https://github.com/PHPOffice/PHPExcel/issues/396)\n- Methods to manage most of the existing options for Chart Axis, Major Grid-lines and Minor Grid-lines - @WiktrzGE [#404](https://github.com/PHPOffice/PHPExcel/issues/404)\n- ODS read/write comments in the cell - @frost-nzcr4 [#403](https://github.com/PHPOffice/PHPExcel/issues/403)\n- Additional Mac CJK codepage definitions - @CQD [#389](https://github.com/PHPOffice/PHPExcel/issues/389)\n- Update Worksheet.php getStyleByColumnAndRow() to allow a range of cells rather than just a single cell - @bolovincev [#269](https://github.com/PHPOffice/PHPExcel/issues/269)\n- New methods added for testing cell status within merge groups - @MarkBaker\n- Handling merge cells in HTML Reader - @cifren/MBaker [#205](https://github.com/PHPOffice/PHPExcel/issues/205)\n- Helper to convert basic HTML markup to a Rich Text object - @MarkBaker\n- Improved Iterators - @MarkBaker\n    - New Column Iterator\n    - Support for row and column ranges\n    - Improved handling for next/prev\n\n### Security\n\n- XML filescan in XML-based Readers to prevent XML Entity Expansion (XEE) - @MarkBaker\n    - (see http://projects.webappsec.org/w/page/13247002/XML%20Entity%20Expansion for an explanation of XEE injection) attacks\n    - Reference CVE-2015-3542 - Identification of problem courtesy of Dawid Golunski (Pentest Ltd.)\n\n## [1.8.0] - 2014-03-02\n\n### Bugfixes\n\n- Undefined variable: fileHandle in CSV Reader - @MarkBaker [CodePlex #19830](https://phpexcel.codeplex.com/workitem/19830)\n- Out of memory in style/supervisor.php - @MarkBaker [CodePlex #19968](https://phpexcel.codeplex.com/workitem/19968)\n- Style error with merged cells in PDF Writer - @MarkBaker\n- Problem with cloning worksheets - @MarkBaker\n- Bug fix reading Open Office files - @tavoarcila [#259](https://github.com/PHPOffice/PHPExcel/issues/259)\n- Serious bug in absolute cell reference used in shared formula - @MarkBaker [CodePlex #20397](https://phpexcel.codeplex.com/workitem/20397)\n    - Would also have affected insert/delete column/row- CHOOSE() returns \"#VALUE!\" if the 1st entry is chosen - @RomanSyroeshko [#267](https://github.com/PHPOffice/PHPExcel/issues/267)\n- When duplicating styles, styles shifted by one column to the right - @Gemorroj [#268](https://github.com/PHPOffice/PHPExcel/issues/268)\n    - Fix also applied to duplicating conditional styles- Fix for formulae that reference a sheet whose name begins with a digit: - @IndrekHaav [#212](https://github.com/PHPOffice/PHPExcel/issues/212)\n    - these were erroneously identified as numeric values, causing the parser to throw an undefined variable error.- Fixed undefined variable error due to $styleArray being used before it's initialised - @IndrekHaav [CodePlex #16208](https://phpexcel.codeplex.com/workitem/16208)\n- ISTEXT() return wrong result if referencing an empty but formatted cell - @PowerKiKi [#273](https://github.com/PHPOffice/PHPExcel/issues/273)\n- Binary comparison of strings are case insensitive - @PowerKiKi [#270](https://github.com/PHPOffice/PHPExcel/issues/270), [#31](https://github.com/PHPOffice/PHPExcel/issues/31)\n- Insert New Row/Column Before is not correctly updating formula references - @MarkBaker [#275](https://github.com/PHPOffice/PHPExcel/issues/275)\n- Passing an array of cells to _generateRow() in the HTML/PDF Writer causes caching problems with last cell in the range - @MarkBaker [#257](https://github.com/PHPOffice/PHPExcel/issues/257)\n- Fix to empty worksheet garbage collection when using cell caching - @MarkBaker [#193](https://github.com/PHPOffice/PHPExcel/issues/193)\n- Excel2007 does not correctly mark rows as hidden - @Jazzo [#248](https://github.com/PHPOffice/PHPExcel/issues/248)\n- Fixed typo in Chart/Layout set/getYMode() - @Roy Shahbazian [#299](https://github.com/PHPOffice/PHPExcel/issues/299)\n- Fatal error: Call to a member function cellExists() line: 3327 in calculation.php if referenced worksheet doesn't exist - @EliuFlorez [#279](https://github.com/PHPOffice/PHPExcel/issues/279)\n- AdvancedValueBinder \"Division by zero\"-error - @MarkBaker [#290](https://github.com/PHPOffice/PHPExcel/issues/290)\n- Adding Sheet to Workbook Bug - @MarkBaker [CodePlex #20604](https://phpexcel.codeplex.com/workitem/20604)\n- Calculation engine incorrectly evaluates empty cells as #VALUE - @MarkBaker [CodePlex #20703](https://phpexcel.codeplex.com/workitem/20703)\n- Formula references to cell on another sheet in ODS files - @MarkBaker [CodePlex #20760](https://phpexcel.codeplex.com/workitem/20760)\n\n### Features\n\n- LibreOffice created XLSX files results in an empty file. - @MarkBaker [#321](https://github.com/PHPOffice/PHPExcel/issues/321), [#158](https://github.com/PHPOffice/PHPExcel/issues/158), [CodePlex #17824](https://phpexcel.codeplex.com/workitem/17824)\n- Implementation of the Excel HLOOKUP() function - @amerov\n- Added \"Quote Prefix\" to style settings (Excel2007 Reader and Writer only) - @MarkBaker\n- Added Horizontal FILL alignment for Excel5 and Excel2007 Readers/Writers, and Horizontal DISTRIBUTED alignment for Excel2007 Reader/Writer - @MarkBaker\n- Add support for reading protected (RC4 encrypted) .xls files - @trvrnrth [#261](https://github.com/PHPOffice/PHPExcel/issues/261)\n\n### General\n\n- Adding support for macros, Ribbon in Excel 2007 - @LWol [#252](https://github.com/PHPOffice/PHPExcel/issues/252)\n- Remove array_shift in ReferenceHelper::insertNewBefore improves column or row delete speed - @cdhutch [CodePlex #20055](https://phpexcel.codeplex.com/workitem/20055)\n- Improve stock chart handling and rendering, with help from Swashata Ghosh - @MarkBaker\n- Fix to calculation properties for Excel2007 so that the opening application will only recalculate on load if it's actually required - @MarkBaker\n- Modified Excel2007 Writer to default preCalculateFormulas to false - @MarkBaker\n    - Note that autosize columns will still recalculate affected formulae internally- Functionality to getHighestRow() for a specified column, and getHighestColumn() for a specified row - @dresenhista [#242](https://github.com/PHPOffice/PHPExcel/issues/242)\n- Modify PHPExcel_Reader_Excel2007 to use zipClass from PHPExcel_Settings::getZipClass() - @adamriyadi [#247](https://github.com/PHPOffice/PHPExcel/issues/247)\n    - This allows the use of PCLZip when reading for people that don't have access to ZipArchive\n### Security\n\n- Convert properties to string in OOCalc reader - @infojunkie [#276](https://github.com/PHPOffice/PHPExcel/issues/276)\n- Disable libxml external entity loading by default. - @maartenba [#322](https://github.com/PHPOffice/PHPExcel/issues/322)\n    - This is to prevent XML External Entity Processing (XXE) injection attacks (see https://websec.io/2012/08/27/Preventing-XEE-in-PHP.html for an explanation of XXE injection).\n    - Reference CVE-2014-2054\n\n## [1.7.9] - 2013-06-02\n\n### Features\n\n- Include charts option for HTML Writer - @MarkBaker\n- Added composer file - @MarkBaker\n- cache_in_memory_gzip \"eats\" last worksheet line, cache_in_memory doesn't - @MarkBaker [CodePlex #18844](https://phpexcel.codeplex.com/workitem/18844)\n- echo statements in HTML.php - @MarkBaker [#104](https://github.com/PHPOffice/PHPExcel/issues/104)\n\n### Bugfixes\n\n- Added getStyle() method to Cell object - @MarkBaker\n- Error in PHPEXCEL/Calculation.php script on line 2976 (stack pop check) - @Asker [CodePlex #18777](https://phpexcel.codeplex.com/workitem/18777)\n- CSV files without a file extension being identified as HTML - @MarkBaker [CodePlex #18794](https://phpexcel.codeplex.com/workitem/18794)\n- Wrong check for maximum number of rows in Excel5 Writer - @AndreKR [#66](https://github.com/PHPOffice/PHPExcel/issues/66)\n- Cache directory for DiscISAM cache storage cannot be set - @MarkBaker [#67](https://github.com/PHPOffice/PHPExcel/issues/67)\n- Fix to Excel2007 Reader for hyperlinks with an anchor fragment (following a #), otherwise they were treated as sheet references - @MarkBaker [CodePlex #17976](https://phpexcel.codeplex.com/workitem/17976)\n- getSheetNames() fails on numeric (floating point style) names with trailing zeroes - @MarkBaker [CodePlex #18963](https://phpexcel.codeplex.com/workitem/18963)\n- Modify cell's getCalculatedValue() method to return the content of RichText objects rather than the RichText object itself - @MarkBaker\n- Fixed formula/formatting bug when removing rows - @techhead [#70](https://github.com/PHPOffice/PHPExcel/issues/70)\n- Fix to cellExists for non-existent namedRanges - @alexgann [#63](https://github.com/PHPOffice/PHPExcel/issues/63)\n- Sheet View in Excel5 Writer - @Progi1984 [#22](https://github.com/PHPOffice/PHPExcel/issues/22)\n- PHPExcel_Worksheet::getCellCollection() may not return last cached cell - @amironov [#82](https://github.com/PHPOffice/PHPExcel/issues/82)\n- Rich Text containing UTF-8 characters creating unreadable content with Excel5 Writer - @teso [CodePlex #18551](https://phpexcel.codeplex.com/workitem/18551)\n- Work item GH-8/CP11704 : Conditional formatting in Excel 5 Writer - @Progi1984\n- canRead() Error for GoogleDocs ODS files: in ODS files from Google Docs there is no mimetype file - @MarkBaker [#113](https://github.com/PHPOffice/PHPExcel/issues/113)\n- \"Sheet index is out of bounds.\" Exception - @MarkBaker [#80](https://github.com/PHPOffice/PHPExcel/issues/80)\n- Fixed number format fatal error - @ccorliss [#105](https://github.com/PHPOffice/PHPExcel/issues/105)\n- Add DROP TABLE in destructor for SQLite and SQLite3 cache controllers - @MarkBaker\n- Fix merged-cell borders on HTML/PDF output - @alexgann [#154](https://github.com/PHPOffice/PHPExcel/issues/154)\n- Fix: Hyperlinks break when removing rows - @Shanto [#161](https://github.com/PHPOffice/PHPExcel/issues/161)\n- Fix Extra Table Row From Images and Charts - @neclimdul [#166](https://github.com/PHPOffice/PHPExcel/issues/166)\n\n### General\n\n- Single cell print area - @MarkBaker [#130](https://github.com/PHPOffice/PHPExcel/issues/130)\n- Improved AdvancedValueBinder for currency - @kea [#69](https://github.com/PHPOffice/PHPExcel/issues/69)\n- Fix for environments where there is no access to /tmp but to upload_tmp_dir - @MarkBaker\n    - Provided an option to set the sys_get_temp_dir() call to use the upload_tmp_dir; though by default the standard temp directory will still be used- Search style by identity in PHPExcel_Worksheet::duplicateStyle() - @amironov  [#84](https://github.com/PHPOffice/PHPExcel/issues/84)\n- Fill SheetView IO in Excel5 - @karak [#85](https://github.com/PHPOffice/PHPExcel/issues/85)\n- Memory and Speed improvements in PHPExcel_Reader_Excel5 - @cfhay [CodePlex #18958](https://phpexcel.codeplex.com/workitem/18958)\n- Modify listWorksheetNames() and listWorksheetInfo to use XMLReader with streamed XML rather than SimpleXML - @MarkBaker [#78](https://github.com/PHPOffice/PHPExcel/issues/78)\n- Restructuring of PHPExcel Exceptions - @dbonsch\n- Refactor Calculation Engine from singleton to a Multiton - @MarkBaker\n    - Ensures that calculation cache is maintained independently for different workbooks\n\n## [1.7.8] - 2012-10-12\n\n### Features\n\n- Phar builder script to add phar file as a distribution option - @kkamkou\n- Refactor PDF Writer to allow use with a choice of PDF Rendering library - @MarkBaker\n    - rather than restricting to tcPDF\n    - Current options are tcPDF, mPDF, DomPDF\n    - tcPDF Library has now been removed from the deployment bundle- Initial version of HTML Reader - @MarkBaker\n- Implement support for AutoFilter in PHPExcel_Writer_Excel5 - @Progi1984\n- Modified ERF and ERFC Engineering functions to accept Excel 2010's modified acceptance of negative arguments - @MarkBaker\n- Support SheetView `view` attribute (Excel2007) - @k1LoW\n- Excel compatibility option added for writing CSV files - @MarkBaker\n    - While Excel 2010 can read CSV files with a simple UTF-8 BOM, Excel2007 and earlier require UTF-16LE encoded tab-separated files.\n    - The new setExcelCompatibility(TRUE) option for the CSV Writer will generate files with this formatting for easy import into Excel2007 and below.- Language implementations for Turkish (tr) - @MarkBaker\n- Added fraction tests to advanced value binder - @MarkBaker\n\n### General\n\n- Allow call to font setUnderline() for underline format to specify a simple boolean for UNDERLINE_NONE or UNDERLINE_SINGLE - @MarkBaker\n- Add Currency detection to the Advanced Value Binder - @alexgann\n- setCellValueExplicitByColumnAndRow() do not return PHPExcel_Worksheet - @MarkBaker [CodePlex #18404](https://phpexcel.codeplex.com/workitem/18404)\n- Reader factory doesn't read anymore XLTX and XLT files - @MarkBaker [CodePlex #18324](https://phpexcel.codeplex.com/workitem/18324)\n- Magic __toString() method added to Cell object to return raw data value as a string - @MarkBaker\n- Add cell indent to html rendering - @alexgann\n\n### Bugfixes\n\n- ZeroHeight for rows in sheet format - @Raghav1981\n- OOCalc cells containing <text:span> inside the <text:p> tag - @cyberconte\n- Fix to listWorksheetInfo() method for OOCalc Reader - @schir1964\n- Support for \"e\" (epoch) date format mask - @MarkBaker\n    - Rendered as a 4-digit CE year in non-Excel outputs- Background color cell is always black when editing cell - @MarkBaker\n- Allow \"no impact\" to formats on Conditional Formatting - @MarkBaker\n- OOCalc Reader fix for NULL cells - @wackonline\n- Fix to excel2007 Chart Writer when a $plotSeriesValues is empty - @seltzlab\n- Various fixes to Chart handling - @MarkBaker\n- Error loading xlsx file with column breaks - @MarkBaker [CodePlex #18370](https://phpexcel.codeplex.com/workitem/18370)\n- OOCalc Reader now handles percentage and currency data types - @MarkBaker\n- mb_stripos empty delimiter - @MarkBaker\n- getNestingLevel() Error on Excel5 Read - @takaakik\n- Fix to Excel5 Reader when cell annotations are defined before their referenced text objects - @MarkBaker\n- OOCalc Reader modified to process number-rows-repeated - @MarkBaker\n- Chart Title compatibility on Excel 2007 - @MarkBaker [CodePlex #18377](https://phpexcel.codeplex.com/workitem/18377)\n- Chart Refresh returning cell reference rather than values - @MarkBaker [CodePlex #18146](https://phpexcel.codeplex.com/workitem/18146)\n- Autoshape being identified in twoCellAnchor when includeCharts is TRUE triggering load error - @MarkBaker [CodePlex #18145](https://phpexcel.codeplex.com/workitem/18145)\n- v-type texts for series labels now recognised and parsed correctly - @MarkBaker [CodePlex #18325](https://phpexcel.codeplex.com/workitem/18325)\n- load file failed if the file has no extensionType - @wolf5x [CodePlex #18492](https://phpexcel.codeplex.com/workitem/18492)\n- Pattern fill colours in Excel2007 Style Writer - @dverspui\n- Excel2007 Writer order of font style elements to conform with Excel2003 using compatibility pack - @MarkBaker\n- Problems with $_activeSheetIndex when decreased below 0. - @MarkBaker [CodePlex #18425](https://phpexcel.codeplex.com/workitem/18425)\n- PHPExcel_CachedObjectStorage_SQLite3::cacheMethodIsAvailable() uses class_exists - autoloader throws error - @MarkBaker [CodePlex #18597](https://phpexcel.codeplex.com/workitem/18597)\n- Cannot access private property PHPExcel_CachedObjectStorageFactory::$_cacheStorageMethod - @MarkBaker [CodePlex #18598](https://phpexcel.codeplex.com/workitem/18598)\n- Data titles for charts - @MarkBaker [CodePlex #18397](https://phpexcel.codeplex.com/workitem/18397)\n    - PHPExcel_Chart_Layout now has methods for getting/setting switches for displaying/hiding chart data labels- Discard single cell merge ranges when reading (stupid that Excel allows them in the first place) - @MarkBaker\n- Discard hidden autoFilter named ranges - @MarkBaker\n\n## [1.7.7] - 2012-05-19\n\n### Bugfixes\n\n- Support for Rich-Text in PHPExcel_Writer_Excel5 - @Progi1984 [CodePlex #8916](https://phpexcel.codeplex.com/workitem/8916)\n- Change iterators to implement Iterator rather than extend CachingIterator, as a fix for PHP 5.4. changes in SPL - @MarkBaker\n- Invalid cell coordinate in Autofilter for Excel2007 Writer - @MarkBaker [CodePlex #15459](https://phpexcel.codeplex.com/workitem/15459)\n- PCLZip library issue - @MarkBaker [CodePlex #15518](https://phpexcel.codeplex.com/workitem/15518)\n- Excel2007 Reader canRead function bug - @MarkBaker [CodePlex #15537](https://phpexcel.codeplex.com/workitem/15537)\n- Support for Excel functions whose return can be used as either a value or as a cell reference depending on its context within a formula - @MarkBaker\n- ini_set() call in Calculation class destructor - @gilles06 [CodePlex #15707](https://phpexcel.codeplex.com/workitem/15707)\n- RangeToArray strange array keys - @MarkBaker [CodePlex #15786](https://phpexcel.codeplex.com/workitem/15786)\n- INDIRECT() function doesn't work with named ranges - @MarkBaker [CodePlex #15762](https://phpexcel.codeplex.com/workitem/15762)\n- Locale-specific fix to text functions when passing a boolean argument instead of a string - @MarkBaker\n- reader/CSV fails on this file - @MarkBaker [CodePlex #16246](https://phpexcel.codeplex.com/workitem/16246)\n    - auto_detect_line_endings now set in CSV reader- $arguments improperly used in CachedObjectStorage/PHPTemp.php - @MarkBaker [CodePlex #16212](https://phpexcel.codeplex.com/workitem/16212)\n- Bug In Cache System (cell reference when throwing caching errors) - @MarkBaker [CodePlex #16643](https://phpexcel.codeplex.com/workitem/16643)\n- PHP Invalid index notice on writing excel file when active sheet has been deleted - @MarkBaker [CodePlex #16895](https://phpexcel.codeplex.com/workitem/16895)\n- External links in Excel2010 files cause Fatal error - @MarkBaker [CodePlex #16956](https://phpexcel.codeplex.com/workitem/16956)\n- Previous calculation engine error conditions trigger cyclic reference errors - @MarkBaker [CodePlex #16960](https://phpexcel.codeplex.com/workitem/16960)\n- PHPExcel_Style::applyFromArray() returns null rather than style object in advanced mode - @mkopinsky [CodePlex #16266](https://phpexcel.codeplex.com/workitem/16266)\n- Cell::getFormattedValue returns RichText object instead of string - @fauvel [CodePlex #16958](https://phpexcel.codeplex.com/workitem/16958)\n- Indexed colors do not refer to Excel's indexed colors? - @MarkBaker [CodePlex #17166](https://phpexcel.codeplex.com/workitem/17166)\n- Indexed colors should be consistent with Excel and start from 1 (current index starts at 0) - @MarkBaker [CodePlex #17199](https://phpexcel.codeplex.com/workitem/17199)\n- Named Range definition in .xls when sheet reeference is quote wrapped - @MarkBaker [CodePlex #17262](https://phpexcel.codeplex.com/workitem/17262)\n- duplicateStyle() method doesn't duplicate conditional formats - @MarkBaker [CodePlex #17403](https://phpexcel.codeplex.com/workitem/17403)\n    - Added an equivalent duplicateConditionalStyle() method for duplicating conditional styles- =sumproduct(A,B) <> =sumproduct(B,A) in xlsx - @bnr [CodePlex #17501](https://phpexcel.codeplex.com/workitem/17501)\n\n### Features\n\n- OOCalc cells contain same data bug? - @cyberconte [CodePlex #17471](https://phpexcel.codeplex.com/workitem/17471)\n- listWorksheetInfo() method added to Readers... courtesy of Christopher Mullins - @schir1964\n- Options for cell caching using Igbinary and SQLite/SQlite3. - @MarkBaker\n- Additional row iterator options: allow a start row to be defined in the constructor; seek(), and prev() methods added. - @MarkBaker\n- Implement document properties in Excel5 writer - @Progi1984 [CodePlex #9759](https://phpexcel.codeplex.com/workitem/9759)\n\n### General\n\n- Implement chart functionality (EXPERIMENTAL) - @MarkBaker [CodePlex #16](https://phpexcel.codeplex.com/workitem/16)\n    - Initial definition of chart objects.\n    - Reading Chart definitions through the Excel2007 Reader\n    - Facility to render charts to images using the 3rd-party jpgraph library\n    - Writing Charts using the Excel2007 Writer- Fix to build to ensure that Examples are included with the documentation - @MarkBaker\n- Reduce cell caching overhead using dirty flag to ensure that cells are only rewritten to the cache if they have actually been changed - @MarkBaker\n- Improved memory usage in CSV Writer - @MarkBaker\n- Improved speed and memory usage in Excel5 Writer - @MarkBaker\n- Experimental - @MarkBaker\n    - Added getHighestDataColumn(), getHighestDataRow(), getHighestRowAndColumn() and calculateWorksheetDataDimension() methods for the worksheet that return the highest row and column that have cell records- Support for Rich-Text in PHPExcel_Writer_Excel5 - @Progi1984 [CodePlex #8916](https://phpexcel.codeplex.com/workitem/8916)\n- Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC) - @MarkBaker [CodePlex #15405](https://phpexcel.codeplex.com/workitem/15405)\n- Locale file paths not fit for windows - @MarkBaker [CodePlex #15461](https://phpexcel.codeplex.com/workitem/15461)\n- Add file directory as a cache option for cache_to_discISAM - @MarkBaker [CodePlex #16643](https://phpexcel.codeplex.com/workitem/16643)\n- Datatype.php & constant TYPE_NULL - @MarkBaker [CodePlex #16923](https://phpexcel.codeplex.com/workitem/16923)\n- Ensure use of system temp directory for all temporary work files, unless explicitly specified - @MarkBaker\n- [Patch] faster stringFromColumnIndex() - @char101 [CodePlex #16359](https://phpexcel.codeplex.com/workitem/16359)\n- Fix for projects that still use old autoloaders - @whit1206 [CodePlex #16028](https://phpexcel.codeplex.com/workitem/16028)\n- Unknown codepage: 10007 - @atz [CodePlex #17024](https://phpexcel.codeplex.com/workitem/17024)\n    - Additional Mac codepages\n\n## [1.7.6] - 2011-02-27\n\n### Features\n\n- Provide option to use PCLZip as an alternative to ZipArchive. - @MarkBaker\n    - This allows the writing of Excel2007 files, even without ZipArchive enabled (it does require zlib), or when php_zip is one of the buggy PHP 5.2.6 or 5.2.8 versions\n    - It can be enabled using PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);\n    - Note that it is not yet implemented as an alternative to ZipArchive for those Readers that are extracting from zips- Added listWorksheetNames() method to Readers that support multiple worksheets in a workbook, allowing a user to extract a list of all the worksheet names from a file without parsing/loading the whole file. - @MarkBaker [CodePlex #14979](https://phpexcel.codeplex.com/workitem/14979)\n- Speed boost and memory reduction in the Worksheet toArray() method. - @MarkBaker\n- Added new rangeToArray() and namedRangeToArray() methods to the PHPExcel_Worksheet object. - @MarkBaker\n    - Functionally, these are identical to the toArray() method, except that they take an additional first parameter of a Range (e.g. 'B2:C3') or a Named Range name.\n    - Modified the toArray() method so that it actually uses rangeToArray().- Added support for cell comments in the OOCalc, Gnumeric and Excel2003XML Readers, and in the Excel5 Reader - @MarkBaker\n- Improved toFormattedString() handling for Currency and Accounting formats to render currency symbols - @MarkBaker\n\n### Bugfixes\n\n- Implement more Excel calculation functions - @MarkBaker\n    - Implemented the DAVERAGE(), DCOUNT(), DCOUNTA(), DGET(), DMAX(), DMIN(), DPRODUCT(), DSTDEV(), DSTDEVP(), DSUM(), DVAR() and DVARP() Database functions- Simple =IF() formula disappears - @MarkBaker [CodePlex #14888](https://phpexcel.codeplex.com/workitem/14888)\n- PHP Warning: preg_match(): Compilation failed: PCRE does not support \\\\L, \\\\l, \\\\N, \\\\P, \\\\p, \\\\U, \\\\u, or \\\\X - @MarkBaker [CodePlex #14898](https://phpexcel.codeplex.com/workitem/14898)\n- VLOOKUP choking on parameters in PHPExcel.1.7.5/PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #14901](https://phpexcel.codeplex.com/workitem/14901)\n- PHPExcel_Cell::isInRange() incorrect results - offset by one column - @MarkBaker [CodePlex #14973](https://phpexcel.codeplex.com/workitem/14973)\n- Treat CodePage of 0 as CP1251 (for .xls files written by applications that don't set the CodePage correctly, such as Apple Numbers) - @MarkBaker\n- Need method for removing autoFilter - @MarkBaker [CodePlex #11583](https://phpexcel.codeplex.com/workitem/11583)\n- coordinateFromString throws exception for rows greater than 99,999 - @MarkBaker [CodePlex #15029](https://phpexcel.codeplex.com/workitem/15029)\n- PHPExcel Excel2007 Reader colour problems with solidfill - @MarkBaker [CodePlex #14999](https://phpexcel.codeplex.com/workitem/14999)\n- Formatting get lost and edit a template XLSX file - @MarkBaker [CodePlex #13215](https://phpexcel.codeplex.com/workitem/13215)\n- Excel 2007 Reader /writer lost fontcolor - @MarkBaker [CodePlex #14029](https://phpexcel.codeplex.com/workitem/14029)\n- file that makes cells go black - @MarkBaker [CodePlex #13374](https://phpexcel.codeplex.com/workitem/13374)\n- Minor patchfix for Excel2003XML Reader when XML is defined with a charset attribute - @MarkBaker\n- PHPExcel_Worksheet->toArray() index problem - @MarkBaker [CodePlex #15089](https://phpexcel.codeplex.com/workitem/15089)\n- Merge cells 'un-merge' when using an existing spreadsheet - @MarkBaker [CodePlex #15094](https://phpexcel.codeplex.com/workitem/15094)\n- Worksheet fromArray() only working with 2-D arrays - @MarkBaker [CodePlex #15129](https://phpexcel.codeplex.com/workitem/15129)\n- rangeToarray function modified for non-existent cells - @xkeshav [CodePlex #15172](https://phpexcel.codeplex.com/workitem/15172)\n- Images not getting copyied with the ->clone function - @MarkBaker [CodePlex #14980](https://phpexcel.codeplex.com/workitem/14980)\n- AdvancedValueBinder.php: String sometimes becomes a date when it shouldn't - @MarkBaker [CodePlex #11576](https://phpexcel.codeplex.com/workitem/11576)\n- Fix Excel5 Writer so that it only writes column dimensions for columns that are actually used rather than the full range (A to IV) - @MarkBaker\n- FreezePane causing damaged or modified error - @MarkBaker [CodePlex #15198](https://phpexcel.codeplex.com/workitem/15198)\n    - The freezePaneByColumnAndRow() method row argument should default to 1 rather than 0.\n    - Default row argument for all __ByColumnAndRow() methods should be 1- Column reference rather than cell reference in Print Area definition - @MarkBaker [CodePlex #15121](https://phpexcel.codeplex.com/workitem/15121)\n    - Fix Excel2007 Writer to handle print areas that are defined as row or column ranges rather than just as cell ranges- Reduced false positives from isDateTimeFormatCode() method by suppressing testing within quoted strings - @MarkBaker\n- Caching and tmp partition exhaustion - @MarkBaker [CodePlex #15312](https://phpexcel.codeplex.com/workitem/15312)\n- Writing to Variable No Longer Works. $_tmp_dir Missing in PHPExcel\\PHPExcel\\Shared\\OLE\\PPS\\Root.php - @MarkBaker [CodePlex #15308](https://phpexcel.codeplex.com/workitem/15308)\n- Named ranges with dot don't get parsed properly - @MarkBaker [CodePlex #15379](https://phpexcel.codeplex.com/workitem/15379)\n- insertNewRowBefore fails to consistently update references - @MarkBaker [CodePlex #15096](https://phpexcel.codeplex.com/workitem/15096)\n- \"i\" is not a valid character for Excel date format masks (in isDateTimeFormatCode() method) - @MarkBaker\n- PHPExcel_ReferenceHelper::insertNewBefore() is missing an 'Update worksheet: comments' section - @MKunert [CodePlex #15421](https://phpexcel.codeplex.com/workitem/15421)\n\n### General\n\n- Full column/row references in named ranges not supported by updateCellReference() - @MarkBaker [CodePlex #15409](https://phpexcel.codeplex.com/workitem/15409)\n- Improved performance (speed), for building the Shared Strings table in the Excel2007 Writer. - @MarkBaker\n- Improved performance (speed), for PHP to Excel date conversions - @MarkBaker\n- Enhanced SheetViews element structures in the Excel2007 Writer for frozen panes. - @MarkBaker\n- Removed Serialized Reader/Writer as these no longer work. - @MarkBaker\n\n## [1.7.5] - 2010-12-10\n\n### Features\n\n- Implement Gnumeric File Format - @MarkBaker [CodePlex #8769](https://phpexcel.codeplex.com/workitem/8769)\n    - Initial work on Gnumeric Reader (Worksheet Data, Document Properties and basic Formatting)- Support for Extended Workbook Properties in Excel2007, Excel5 and OOCalc Readers; support for User-defined Workbook Properties in Excel2007 and OOCalc Readers - @MarkBaker\n- Support for Extended and User-defined Workbook Properties in Excel2007 Writer - @MarkBaker\n- Provided a setGenerateSheetNavigationBlock(false); option to suppress generation of the sheet navigation block when writing multiple worksheets to HTML - @MarkBaker\n- Advanced Value Binder now recognises TRUE/FALSE strings (locale-specific) and converts to boolean - @MarkBaker\n- PHPExcel_Worksheet->toArray() is returning truncated values - @MarkBaker [CodePlex #14301](https://phpexcel.codeplex.com/workitem/14301)\n- Configure PDF Writer margins based on Excel Worksheet Margin Settings value - @MarkBaker\n- Added Contiguous flag for the CSV Reader, when working with Read Filters - @MarkBaker\n- Added getFormattedValue() method for cell object - @MarkBaker\n- Added strictNullComparison argument to the worksheet fromArray() method - @MarkBaker\n\n### Bugfixes\n\n- Fix to toFormattedString() method in PHPExcel_Style_NumberFormat to handle fractions with a # code for the integer part - @MarkBaker\n- NA() doesn't propagate in matrix calc - quick fix in JAMA/Matrix.php - @MarkBaker [CodePlex #14143](https://phpexcel.codeplex.com/workitem/14143)\n- Excel5 : Formula : String constant containing double quotation mark - @Progi1984 [CodePlex #7895](https://phpexcel.codeplex.com/workitem/7895)\n- Excel5 : Formula : Percent - @Progi1984 [CodePlex #7895](https://phpexcel.codeplex.com/workitem/7895)\n- Excel5 : Formula : Error constant - @Progi1984 [CodePlex #7895](https://phpexcel.codeplex.com/workitem/7895)\n- Excel5 : Formula : Concatenation operator - @Progi1984 [CodePlex #7895](https://phpexcel.codeplex.com/workitem/7895)\n- Worksheet clone broken for CachedObjectStorage_Memory - @MarkBaker [CodePlex #14146](https://phpexcel.codeplex.com/workitem/14146)\n- PHPExcel_Reader_Excel2007 fails when gradient fill without type is present in a file - @MarkBaker [CodePlex #12998](https://phpexcel.codeplex.com/workitem/12998)\n- @ format for numeric strings in XLSX to CSV conversion - @MarkBaker [CodePlex #14176](https://phpexcel.codeplex.com/workitem/14176)\n- Advanced Value Binder Not Working? - @MarkBaker [CodePlex #14223](https://phpexcel.codeplex.com/workitem/14223)\n- unassigned object variable in PHPExcel->removeCellXfByIndex - @MarkBaker [CodePlex #14226](https://phpexcel.codeplex.com/workitem/14226)\n- problem with getting cell values from another worksheet... (if cell doesn't exist) - @MarkBaker [CodePlex #14236](https://phpexcel.codeplex.com/workitem/14236)\n- Setting cell values to one char strings & Trouble reading one character string (thanks gorfou) - @MarkBaker\n- Worksheet title exception when duplicate worksheet is being renamed but exceeds the 31 character limit - @MarkBaker [CodePlex #14256](https://phpexcel.codeplex.com/workitem/14256)\n- Named range with sheet name that contains the $ throws exception when getting the cell - @MarkBaker [CodePlex #14086](https://phpexcel.codeplex.com/workitem/14086)\n- Added autoloader to DefaultValueBinder and AdvancedValueBinder - @MarkBaker\n- Modified PHPExcel_Shared_Date::isDateTimeFormatCode() to return false if format code begins with \"_\" or with \"0 \" to prevent false positives - @MarkBaker\n    - These leading characters are most commonly associated with number, currency or accounting (or occasionally fraction) formats- BUG : Excel5 and setReadFilter ? - @MarkBaker [CodePlex #14374](https://phpexcel.codeplex.com/workitem/14374)\n- Wrong exception message while deleting column - @MarkBaker [CodePlex #14425](https://phpexcel.codeplex.com/workitem/14425)\n- Formula evaluation fails with Japanese sheet refs - @MarkBaker [CodePlex #14679](https://phpexcel.codeplex.com/workitem/14679)\n- PHPExcel_Writer_PDF does not handle cell borders correctly - @MarkBaker [CodePlex #13559](https://phpexcel.codeplex.com/workitem/13559)\n- Style : applyFromArray() for 'allborders' not working - @MarkBaker [CodePlex #14831](https://phpexcel.codeplex.com/workitem/14831)\n\n### General\n\n- Using $this when not in object context in Excel5 Reader - @MarkBaker [CodePlex #14837](https://phpexcel.codeplex.com/workitem/14837)\n- Removes a unnecessary loop through each cell when applying conditional formatting to a range. - @MarkBaker\n- Removed spurious PHP end tags (?>) - @MarkBaker\n- Improved performance (speed) and reduced memory overheads, particularly for the Writers, but across the whole library. - @MarkBaker\n\n## [1.7.4] - 2010-08-26\n\n### Bugfixes\n\n- Excel5 : Formula : Power - @Progi1984 [CodePlex #7895](https://phpexcel.codeplex.com/workitem/7895)\n- Excel5 : Formula : Unary plus - @Progi1984 [CodePlex #7895](https://phpexcel.codeplex.com/workitem/7895)\n- Excel5 : Just write the Escher stream if necessary in Worksheet - @Progi1984\n- Syntax errors in memcache.php 1.7.3c - @MarkBaker [CodePlex #13433](https://phpexcel.codeplex.com/workitem/13433)\n- Support for row or column ranges in the calculation engine, e.g. =SUM(C:C) or =SUM(1:2) - @MarkBaker\n    - Also support in the calculation engine for absolute row or column ranges e.g. =SUM($C:$E) or =SUM($3:5)- Picture problem with Excel 2003 - @Erik Tilt [CodePlex #13455](https://phpexcel.codeplex.com/workitem/13455)\n- Wrong variable used in addExternalSheet in PHPExcel.php - @MarkBaker [CodePlex #13484](https://phpexcel.codeplex.com/workitem/13484)\n- \"Invalid cell coordinate\" error when formula access data from an other sheet - @MarkBaker [CodePlex #13515](https://phpexcel.codeplex.com/workitem/13515)\n- (related to Work item 13515) Calculation engine confusing cell range worksheet when referencing cells in a different worksheet to the formula - @MarkBaker\n- Wrong var naming in Worksheet->garbageCollect() - @MarkBaker [CodePlex #13752](https://phpexcel.codeplex.com/workitem/13752)\n- PHPExcel_Style_*::__clone() methods cause cloning loops? - @MarkBaker [CodePlex #13764](https://phpexcel.codeplex.com/workitem/13764)\n- Recent builds causing problems loading xlsx files? (ZipArchive issue?) - @MarkBaker [CodePlex #11488](https://phpexcel.codeplex.com/workitem/11488)\n- cache_to_apc causes fatal error when processing large data sets - @MarkBaker [CodePlex #13856](https://phpexcel.codeplex.com/workitem/13856)\n- OOCalc reader misses first line if it's a 'table-header-row' - @MarkBaker [CodePlex #13880](https://phpexcel.codeplex.com/workitem/13880)\n- using cache with copy or clone bug? - @MarkBaker [CodePlex #14011](https://phpexcel.codeplex.com/workitem/14011)\n    - Fixed $worksheet->copy() or clone $worksheet when using cache_in_memory, cache_in_memory_gzip, cache_in_memory_serialized, cache_to_discISAM, cache_to_phpTemp, cache_to_apc and cache_to_memcache;\n    - Fixed but untested when using cache_to_wincache.\n### Features\n\n- Standard Deviation functions returning DIV/0 Error when Standard Deviation is zero - @MarkBaker [CodePlex #13450](https://phpexcel.codeplex.com/workitem/13450)\n- Support for print area with several ranges in the Excel2007 reader, and improved features for editing print area with several ranges - @MarkBaker\n- Improved Cell Exception Reporting - @MarkBaker [CodePlex #13769](https://phpexcel.codeplex.com/workitem/13769)\n\n### General\n\n- Fixed problems with reading Excel2007 Properties - @MarkBaker\n- PHP Strict Standards: Non-static method PHPExcel_Shared_String::utf16_decode() should not be called statically - @MarkBaker\n- Array functions were ignored when loading an existing file containing them, and as a result, they would lose their 'cse' status. - @MarkBaker\n- Minor memory tweaks to Excel2007 Writer - @MarkBaker\n- Modified ReferenceHelper updateFormulaReferences() method to handle updates to row and column cell ranges (including absolute references e.g. =SUM(A:$E) or =SUM($5:5), and range/cell references that reference a worksheet by name), and to provide both performance and memory improvements. - @MarkBaker\n- Modified Excel2007 Reader so that ReferenceHelper class is instantiated only once rather than for every shared formula in a workbook. - @MarkBaker\n- Correct handling for additional (synonym) formula tokens in Excel5 Reader - @MarkBaker\n- Additional reading of some Excel2007 Extended Properties (Company, Manager) - @MarkBaker\n\n## [1.7.3c] - 2010-06-01\n\n### Bugfixes\n\n- Fatal error: Class 'ZipArchive' not found... ...Reader/Excel2007.php on line 217 - @MarkBaker [CodePlex #13012](https://phpexcel.codeplex.com/workitem/13012)\n- PHPExcel_Writer_Excel2007 error after 1.7.3b - @MarkBaker [CodePlex #13398](https://phpexcel.codeplex.com/workitem/13398)\n\n## [1.7.3b] - 2010-05-31\n\n### Bugfixes\n\n- Infinite loop when reading - @MarkBaker [CodePlex #12903](https://phpexcel.codeplex.com/workitem/12903)\n- Wrong method chaining on PHPExcel_Worksheet class - @MarkBaker [CodePlex #13381](https://phpexcel.codeplex.com/workitem/13381)\n\n## [1.7.3] - 2010-05-17\n\n### General\n\n- Applied patch 4990 (modified) - @Erik Tilt\n- Applied patch 5568 (modified) - @MarkBaker\n- Applied patch 5943 - @MarkBaker\n- Upgrade build script to use Phing - @MarkBaker [CodePlex #13042](https://phpexcel.codeplex.com/workitem/13042)\n- Replacing var with public/private - @Erik Tilt [CodePlex #11586](https://phpexcel.codeplex.com/workitem/11586)\n- Applied Anthony's Sterling's Class Autoloader to reduce memory overhead by \"Lazy Loading\" of classes - @MarkBaker\n- Modification to functions that accept a date parameter to support string values containing ordinals as per Excel (English language only) - @MarkBaker\n- Modify PHPExcel_Style_NumberFormat::toFormattedString() to handle dates that fall outside of PHP's 32-bit date range - @MarkBaker\n- Applied patch 5207 - @MarkBaker\n\n### Features\n\n- PHPExcel developer documentation: Set page margins - @Erik Tilt [CodePlex #11970](https://phpexcel.codeplex.com/workitem/11970)\n- Special characters and accents in SYLK reader - @Erik Tilt [CodePlex #11038](https://phpexcel.codeplex.com/workitem/11038)\n- Implement more Excel calculation functions - @MarkBaker\n    - Implemented the COUPDAYS(), COUPDAYBS(), COUPDAYSNC(), COUPNCD(), COUPPCD() and PRICE() Financial functions\n    - Implemented the N() and TYPE() Information functions\n    - Implemented the HYPERLINK() Lookup and Reference function- Horizontal page break support in PHPExcel_Writer_PDF - @Erik Tilt [CodePlex #11526](https://phpexcel.codeplex.com/workitem/11526)\n- Introduce method setActiveSheetIndexByName() - @Erik Tilt [CodePlex #11529](https://phpexcel.codeplex.com/workitem/11529)\n- AdvancedValueBinder.php: Automatically wrap text when there is new line in string (ALT+\"Enter\") - @Erik Tilt [CodePlex #11550](https://phpexcel.codeplex.com/workitem/11550)\n- Data validation support in PHPExcel_Reader_Excel5 and PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10300](https://phpexcel.codeplex.com/workitem/10300)\n- Improve autosize calculation - @MarkBaker [CodePlex #11616](https://phpexcel.codeplex.com/workitem/11616)\n- Methods to translate locale-specific function names in formulae - @MarkBaker\n    - Language implementations for Czech (cs), Danish (da), German (de), English (uk), Spanish (es), Finnish (fi), French (fr), Hungarian (hu), Italian (it), Dutch (nl), Norwegian (no), Polish (pl), Portuguese (pt), Brazilian Portuguese (pt_br), Russian (ru) and Swedish (sv)- Implement document properties in Excel5 reader/writer - @Erik Tilt [CodePlex #9759](https://phpexcel.codeplex.com/workitem/9759)\n    - Fixed so far for PHPExcel_Reader_Excel5- Show/hide row and column headers in worksheet - @Erik Tilt [CodePlex #11849](https://phpexcel.codeplex.com/workitem/11849)\n- Can't set font on writing PDF (by key) - @Erik Tilt [CodePlex #11919](https://phpexcel.codeplex.com/workitem/11919)\n- Thousands scale (1000^n) support in PHPExcel_Style_NumberFormat::toFormattedString - @Erik Tilt [CodePlex #12096](https://phpexcel.codeplex.com/workitem/12096)\n- Implement repeating rows in PDF and HTML writer - @Erik Tilt\n- Sheet tabs in PHPExcel_Writer_HTML - @Erik Tilt [CodePlex #12289](https://phpexcel.codeplex.com/workitem/12289)\n- Add Wincache CachedObjectProvider - @MarkBaker [CodePlex #13041](https://phpexcel.codeplex.com/workitem/13041)\n- Configure PDF Writer paper size based on Excel Page Settings value, and provided methods to override paper size and page orientation with the writer - @MarkBaker\n    - Note PHPExcel defaults to Letter size, while the previous PDF writer enforced A4 size, so PDF writer will now default to Letter- Initial implementation of cell caching: allowing larger workbooks to be managed, but at a cost in speed - @MarkBaker\n\n### Bugfixes\n\n- Added an identify() method to the IO Factory that identifies the reader which will be used to load a particular file without actually loading it. - @MarkBaker\n- Warning messages with INDEX function having 2 arguments - @MarkBaker [CodePlex #10979](https://phpexcel.codeplex.com/workitem/10979)\n- setValue('=') should result in string instead of formula - @Erik Tilt [CodePlex #11473](https://phpexcel.codeplex.com/workitem/11473)\n- method _raiseFormulaError should no be private - @MarkBaker [CodePlex #11471](https://phpexcel.codeplex.com/workitem/11471)\n- Fatal error: Call to undefined function mb_substr() in ...Classes\\PHPExcel\\Reader\\Excel5.php on line 2903 - @Erik Tilt [CodePlex #11485](https://phpexcel.codeplex.com/workitem/11485)\n- getBold(), getItallic(), getStrikeThrough() not always working with PHPExcel_Reader_Excel2007 - @Erik Tilt [CodePlex #11487](https://phpexcel.codeplex.com/workitem/11487)\n- AdvancedValueBinder.php not working correctly for $cell->setValue('hh:mm:ss') - @Erik Tilt [CodePlex #11492](https://phpexcel.codeplex.com/workitem/11492)\n- Fixed leap year handling for the YEARFRAC() Date/Time function when basis ia 1 (Actual/actual) - @MarkBaker\n- Warning messages - @MarkBaker [CodePlex #11490](https://phpexcel.codeplex.com/workitem/11490)\n    - Calculation Engine code modified to enforce strict standards for pass by reference- PHPExcel_Cell_AdvancedValueBinder doesnt work for dates in far future - @Erik Tilt [CodePlex #11483](https://phpexcel.codeplex.com/workitem/11483)\n- MSODRAWING bug with long CONTINUE record in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #11528](https://phpexcel.codeplex.com/workitem/11528)\n- PHPExcel_Reader_Excel2007 reads print titles as named range when there is more than one sheet - @Erik Tilt [CodePlex #11571](https://phpexcel.codeplex.com/workitem/11571)\n- missing @return in phpdocblock in reader classes - @Erik Tilt [CodePlex #11561](https://phpexcel.codeplex.com/workitem/11561)\n- AdvancedValueBinder.php: String sometimes becomes a date when it shouldn't - @Erik Tilt [CodePlex #11576](https://phpexcel.codeplex.com/workitem/11576)\n- Small numbers escape treatment in PHPExcel_Style_NumberFormat::toFormattedString() - @Erik Tilt [CodePlex #11588](https://phpexcel.codeplex.com/workitem/11588)\n- Blank styled cells are not blank in output by HTML writer due to &nbsp; - @Erik Tilt [CodePlex #11590](https://phpexcel.codeplex.com/workitem/11590)\n- Calculation engine bug: Existing, blank cell + number gives #NUM - @MarkBaker [CodePlex #11587](https://phpexcel.codeplex.com/workitem/11587)\n- AutoSize only measures length of first line in cell with multiple lines (ALT+Enter) - @Erik Tilt [CodePlex #11608](https://phpexcel.codeplex.com/workitem/11608)\n- Fatal error running Tests/12serializedfileformat.php (PHPExcel 1.7.2) - @Erik Tilt [CodePlex #11608](https://phpexcel.codeplex.com/workitem/11608)\n- Fixed various errors in the WORKDAY() and NETWORKDAYS() Date/Time functions (particularly related to holidays) - @MarkBaker\n- Uncaught exception 'Exception' with message 'Valid scale is between 10 and 400.' in Classes/PHPExcel/Worksheet/SheetView.php:115 - @Erik Tilt [CodePlex #11660](https://phpexcel.codeplex.com/workitem/11660)\n- \"Unrecognized token 39 in formula\" with PHPExcel_Reader_Excel5 (occuring with add-in functions) - @Erik Tilt [CodePlex #11551](https://phpexcel.codeplex.com/workitem/11551)\n- Excel2007 reader not reading PHPExcel_Style_Conditional::CONDITION_EXPRESSION - @Erik Tilt [CodePlex #11668](https://phpexcel.codeplex.com/workitem/11668)\n- Fix to the BESSELI(), BESSELJ(), BESSELK(), BESSELY() and COMPLEX() Engineering functions to use correct default values for parameters - @MarkBaker\n- DATEVALUE function not working for pure time values + allow DATEVALUE() function to handle partial dates (e.g. \"1-Jun\" or \"12/2010\") - @MarkBaker [CodePlex #11525](https://phpexcel.codeplex.com/workitem/11525)\n- Fix for empty quoted strings in formulae - @MarkBaker\n- Trap for division by zero in Bessel functions - @MarkBaker\n- Fix to OOCalc Reader to convert semi-colon (;) argument separator in formulae to a comma (,) - @MarkBaker\n- PHPExcel_Writer_Excel5_Parser cannot parse formula like =SUM(C$5:C5) - @Erik Tilt [CodePlex #11693](https://phpexcel.codeplex.com/workitem/11693)\n- Fix to OOCalc Reader to handle dates that fall outside 32-bit PHP's date range - @MarkBaker\n- File->sys_get_temp_dir() can fail in safe mode - @Erik Tilt [CodePlex #11692](https://phpexcel.codeplex.com/workitem/11692)\n- Sheet references in Excel5 writer do not work when referenced sheet title contains non-Latin symbols - @Erik Tilt [CodePlex #11727](https://phpexcel.codeplex.com/workitem/11727)\n- Bug in HTML writer can result in missing rows in output - @Erik Tilt [CodePlex #11743](https://phpexcel.codeplex.com/workitem/11743)\n- setShowGridLines(true) not working with PHPExcel_Writer_PDF - @Erik Tilt [CodePlex #11674](https://phpexcel.codeplex.com/workitem/11674)\n- PHPExcel_Worksheet_RowIterator initial position incorrect - @Erik Tilt [CodePlex #11836](https://phpexcel.codeplex.com/workitem/11836)\n- PHPExcel_Worksheet_HeaderFooterDrawing Strict Exception thrown (by jshaw86) - @Erik Tilt [CodePlex #11835](https://phpexcel.codeplex.com/workitem/11835)\n- Parts of worksheet lost when there are embedded charts (Excel5 reader) - @Erik Tilt [CodePlex #11850](https://phpexcel.codeplex.com/workitem/11850)\n- VLOOKUP() function error when lookup value is passed as a cell reference rather than an absolute value - @MarkBaker\n- First segment of Rich-Text not read correctly by PHPExcel_Reader_Excel2007 - @Erik Tilt [CodePlex #12041](https://phpexcel.codeplex.com/workitem/12041)\n- Fatal Error with getCell('name') when name matches the pattern for a cell reference - @MarkBaker [CodePlex #12048](https://phpexcel.codeplex.com/workitem/12048)\n- excel5 writer appears to be swapping image locations - @Erik Tilt [CodePlex #12039](https://phpexcel.codeplex.com/workitem/12039)\n- Undefined index: host in ZipStreamWrapper.php, line 94 and line 101 - @Erik Tilt [CodePlex #11954](https://phpexcel.codeplex.com/workitem/11954)\n- BIFF8 File Format problem (too short COLINFO record) - @Erik Tilt [CodePlex #11672](https://phpexcel.codeplex.com/workitem/11672)\n- Column width sometimes changed after read/write with Excel2007 reader/writer - @Erik Tilt [CodePlex #12121](https://phpexcel.codeplex.com/workitem/12121)\n- Worksheet.php throws a fatal error when styling is turned off via setReadDataOnly on the reader - @Erik Tilt [CodePlex #11964](https://phpexcel.codeplex.com/workitem/11964)\n- Checking for Circular References in Formulae - @MarkBaker [CodePlex #11851](https://phpexcel.codeplex.com/workitem/11851)\n    - Calculation Engine code now traps for cyclic references, raising an error or throwing an exception, or allows 1 or more iterations through cyclic references, based on a configuration setting- PNG transparency using Excel2007 writer - @Erik Tilt [CodePlex #12244](https://phpexcel.codeplex.com/workitem/12244)\n- Custom readfilter error when cell formulas reference excluded cells (Excel5 reader) - @Erik Tilt [CodePlex #12221](https://phpexcel.codeplex.com/workitem/12221)\n- Protection problem in XLS - @Erik Tilt [CodePlex #12288](https://phpexcel.codeplex.com/workitem/12288)\n- getColumnDimension()->setAutoSize() incorrect on cells with Number Formatting - @Erik Tilt [CodePlex #12300](https://phpexcel.codeplex.com/workitem/12300)\n- Notices reading Excel file with Add-in funcitons (PHPExcel_Reader_Excel5) - @Erik Tilt [CodePlex #12378](https://phpexcel.codeplex.com/workitem/12378)\n- Excel5 reader not reading formulas with deleted sheet references - @Erik Tilt [CodePlex #12380](https://phpexcel.codeplex.com/workitem/12380)\n- Named range (defined name) scope problems for in PHPExcel - @Erik Tilt [CodePlex #12404](https://phpexcel.codeplex.com/workitem/12404)\n- PHP Parse error: syntax error, unexpected T_PUBLIC in PHPExcel/Calculation.php on line 3482 - @Erik Tilt [CodePlex #12423](https://phpexcel.codeplex.com/workitem/12423)\n- Named ranges don't appear in name box using Excel5 writer - @Erik Tilt [CodePlex #12505](https://phpexcel.codeplex.com/workitem/12505)\n- Many merged cells + autoSize column -> slows down the writer - @Erik Tilt [CodePlex #12509](https://phpexcel.codeplex.com/workitem/12509)\n- Incorrect fallback order comment in Shared/Strings.php ConvertEncoding() - @Erik Tilt [CodePlex #12539](https://phpexcel.codeplex.com/workitem/12539)\n- IBM AIX iconv() will not work, should revert to mbstring etc. instead - @Erik Tilt [CodePlex #12538](https://phpexcel.codeplex.com/workitem/12538)\n- Excel5 writer and mbstring functions overload - @Erik Tilt [CodePlex #12568](https://phpexcel.codeplex.com/workitem/12568)\n- OFFSET needs to flattenSingleValue the $rows and $columns args - @MarkBaker [CodePlex #12672](https://phpexcel.codeplex.com/workitem/12672)\n- Formula with DMAX(): Notice: Undefined offset: 2 in ...\\PHPExcel\\Calculation.php on line 2365 - @MarkBaker [CodePlex #12546](https://phpexcel.codeplex.com/workitem/12546)\n    - Note that the Database functions have not yet been implemented- Call to a member function getParent() on a non-object in Classes\\\\PHPExcel\\\\Calculation.php Title is required - @MarkBaker [CodePlex #12839](https://phpexcel.codeplex.com/workitem/12839)\n- Cyclic Reference in Formula - @MarkBaker [CodePlex #12935](https://phpexcel.codeplex.com/workitem/12935)\n- Memory error...data validation? - @MarkBaker [CodePlex #13025](https://phpexcel.codeplex.com/workitem/13025)\n\n## [1.7.2] - 2010-01-11\n\n### General\n\n- Applied patch 4362 - @Erik Tilt\n- Applied patch 4363 (modified) - @Erik Tilt\n- 1.7.1 Extremely Slow - Refactored PHPExcel_Calculation_Functions::flattenArray() method and set calculation cache timer default to 2.5 seconds - @MarkBaker [CodePlex #10874](https://phpexcel.codeplex.com/workitem/10874)\n- Allow formulae to contain line breaks - @MarkBaker\n- split() function deprecated in PHP 5.3.0 - @Erik Tilt [CodePlex #10910](https://phpexcel.codeplex.com/workitem/10910)\n- sys_get_temp_dir() requires PHP 5.2.1, not PHP 5.2 [provide fallback function for PHP 5.2.0] - @Erik Tilt\n- Implementation of the ISPMT() Financial function by Matt Groves - @MarkBaker\n- Put the example of formula with more arguments in documentation - @MarkBaker [CodePlex #11052](https://phpexcel.codeplex.com/workitem/11052)\n\n### Features\n\n- Improved accuracy for the GAMMAINV() Statistical Function - @MarkBaker\n- XFEXT record support to fix colors change from Excel5 reader, and copy/paste color change with Excel5 writer - @Erik Tilt [CodePlex #10409](https://phpexcel.codeplex.com/workitem/10409)\n    - Excel5 reader reads RGB color information in XFEXT records for borders, font color and fill color- Implement more Excel calculation functions - @MarkBaker\n    - Implemented the FVSCHEDULE(), XNPV(), IRR(), MIRR(), XIRR() and RATE() Financial functions\n    - Implemented the SUMPRODUCT() Mathematical function\n    - Implemented the ZTEST() Statistical Function- Multiple print areas in one sheet - @Erik Tilt [CodePlex #10919](https://phpexcel.codeplex.com/workitem/10919)\n- Store calculated values in output by PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10930](https://phpexcel.codeplex.com/workitem/10930)\n- Sheet protection options in Excel5 reader/writer - @Erik Tilt [CodePlex #10939](https://phpexcel.codeplex.com/workitem/10939)\n- Modification of the COUNT(), AVERAGE(), AVERAGEA(), DEVSQ, AVEDEV(), STDEV(), STDEVA(), STDEVP(), STDEVPA(), VARA() and VARPA() SKEW() and KURT() functions to correctly handle boolean values depending on whether they're passed in as values, values within a matrix or values within a range of cells. - @MarkBaker\n- Cell range selection - @Erik Tilt\n- Root-relative path handling - @MarkBaker [CodePlex #10266](https://phpexcel.codeplex.com/workitem/10266)\n\n### Bugfixes\n\n- Named Ranges not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #11315](https://phpexcel.codeplex.com/workitem/11315)\n- Excel2007 Reader fails to load Apache POI generated Excel - @MarkBaker [CodePlex #11206](https://phpexcel.codeplex.com/workitem/11206)\n- Number format is broken when system's thousands separator is empty - @MarkBaker [CodePlex #11154](https://phpexcel.codeplex.com/workitem/11154)\n- ReferenceHelper::updateNamedFormulas throws errors if oldName is empty - @MarkBaker [CodePlex #11401](https://phpexcel.codeplex.com/workitem/11401)\n- parse_url() fails to parse path to an image in xlsx - @MarkBaker [CodePlex #11296](https://phpexcel.codeplex.com/workitem/11296)\n- Workaround for iconv_substr() bug in PHP 5.2.0 - @Erik Tilt [CodePlex #10876](https://phpexcel.codeplex.com/workitem/10876)\n- 1 pixel error for image width and height with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10877](https://phpexcel.codeplex.com/workitem/10877)\n- Fix to GEOMEAN() Statistical function - @MarkBaker\n- setValue('-') and setValue('.') sets numeric 0 instead of 1-character string - @Erik Tilt [CodePlex #10884](https://phpexcel.codeplex.com/workitem/10884)\n- Row height sometimes much too low after read with PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10885](https://phpexcel.codeplex.com/workitem/10885)\n- Diagonal border. Miscellaneous missing support. - @Erik Tilt [CodePlex #10888](https://phpexcel.codeplex.com/workitem/10888)\n    - Constant PHPExcel_Style_Borders::DIAGONAL_BOTH added to support double-diagonal (cross)\n    - PHPExcel_Reader_Excel2007 not always reading diagonal borders (only recognizes 'true' and not '1')\n    - PHPExcel_Reader_Excel5 support for diagonal borders\n    - PHPExcel_Writer_Excel5 support for diagonal borders- Session bug: Fatal error: Call to a member function bindValue() on a non-object in ...\\Classes\\PHPExcel\\Cell.php on line 217 - @Erik Tilt [CodePlex #10894](https://phpexcel.codeplex.com/workitem/10894)\n- Colors messed up saving twice with same instance of PHPExcel_Writer_Excel5 (regression since 1.7.0) - @Erik Tilt [CodePlex #10896](https://phpexcel.codeplex.com/workitem/10896)\n- Method PHPExcel_Worksheet::setDefaultStyle is not working - @Erik Tilt [CodePlex #10917](https://phpexcel.codeplex.com/workitem/10917)\n- PHPExcel_Reader_CSV::canRead() sometimes says false when it shouldn't - @Erik Tilt [CodePlex #10897](https://phpexcel.codeplex.com/workitem/10897)\n- Changes in workbook not picked up between two saves with PHPExcel_Writer_Excel2007 - @Erik Tilt [CodePlex #10922](https://phpexcel.codeplex.com/workitem/10922)\n- Decimal and thousands separators missing in HTML and PDF output - @Erik Tilt [CodePlex #10913](https://phpexcel.codeplex.com/workitem/10913)\n- Notices with PHPExcel_Reader_Excel5 and named array constants - @Erik Tilt [CodePlex #10936](https://phpexcel.codeplex.com/workitem/10936)\n- Calculation engine limitation on 32-bit platform with integers > 2147483647 - @MarkBaker [CodePlex #10938](https://phpexcel.codeplex.com/workitem/10938)\n- Shared(?) formulae containing absolute cell references not read correctly using Excel5 Reader - @Erik Tilt [CodePlex #10959](https://phpexcel.codeplex.com/workitem/10959)\n- Warning messages with intersection operator involving single cell - @MarkBaker [CodePlex #10962](https://phpexcel.codeplex.com/workitem/10962)\n- Infinite loop in Excel5 reader caused by zero-length string in SST - @Erik Tilt [CodePlex #10980](https://phpexcel.codeplex.com/workitem/10980)\n- Remove unnecessary cell sorting to improve speed by approx. 18% in HTML and PDF writers - @Erik Tilt [CodePlex #10983](https://phpexcel.codeplex.com/workitem/10983)\n- Cannot read A1 cell content - OO_Reader - @MarkBaker [CodePlex #10977](https://phpexcel.codeplex.com/workitem/10977)\n- Transliteration failed, invalid encoding - @Erik Tilt [CodePlex #11000](https://phpexcel.codeplex.com/workitem/11000)\n\n## [1.7.1] - 2009-11-02\n\n### General\n\n- ereg() function deprecated in PHP 5.3.0 - @Erik Tilt [CodePlex #10687](https://phpexcel.codeplex.com/workitem/10687)\n- Writer Interface Inconsequence - setTempDir and setUseDiskCaching - @MarkBaker [CodePlex #10739](https://phpexcel.codeplex.com/workitem/10739)\n\n### Features\n\n- Upgrade to TCPDF 4.8.009 - @Erik Tilt\n- Support for row and column styles (feature request) - @Erik Tilt\n    - Basic implementation for Excel2007/Excel5 reader/writer- Hyperlink to local file in Excel5 reader/writer - @Erik Tilt [CodePlex #10459](https://phpexcel.codeplex.com/workitem/10459)\n- Color Tab (Color Sheet's name) - @MarkBaker [CodePlex #10472](https://phpexcel.codeplex.com/workitem/10472)\n- Border style \"double\" support in PHPExcel_Writer_HTML - @Erik Tilt [CodePlex #10488](https://phpexcel.codeplex.com/workitem/10488)\n- Multi-section number format support in HTML/PDF/CSV writers - @Erik Tilt [CodePlex #10492](https://phpexcel.codeplex.com/workitem/10492)\n- Some additional performance tweaks in the calculation engine - @MarkBaker\n- Fix result of DB() and DDB() Financial functions to 2dp when in Gnumeric Compatibility mode - @MarkBaker\n- Added AMORDEGRC(), AMORLINC() and COUPNUM() Financial function (no validation of parameters yet) - @MarkBaker\n- Improved accuracy of TBILLEQ(), TBILLPRICE() and TBILLYIELD() Financial functions when in Excel or Gnumeric mode - @MarkBaker\n- Added INDIRECT() Lookup/Reference function (only supports full addresses at the moment) - @MarkBaker\n- PHPExcel_Reader_CSV::canRead() improvements - @MarkBaker [CodePlex #10498](https://phpexcel.codeplex.com/workitem/10498)\n- Input encoding option for PHPExcel_Reader_CSV - @Erik Tilt [CodePlex #10500](https://phpexcel.codeplex.com/workitem/10500)\n- Colored number format support, e.g. [Red], in HTML/PDF output - @Erik Tilt [CodePlex #10493](https://phpexcel.codeplex.com/workitem/10493)\n- Color Tab (Color Sheet's name) [Excel5 reader/writer support] - @Erik Tilt [CodePlex #10559](https://phpexcel.codeplex.com/workitem/10559)\n- Initial version of SYLK (slk) and Excel 2003 XML Readers (Cell data and basic cell formatting) - @MarkBaker\n- Initial version of Open Office Calc (ods) Reader (Cell data only) - @MarkBaker\n- Initial use of \"pass by reference\" in the calculation engine for ROW() and COLUMN() Lookup/Reference functions - @MarkBaker\n- COLUMNS() and ROWS() Lookup/Reference functions, and SUBSTITUTE() Text function - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- AdvancedValueBinder(): Re-enable zero-padded string-to-number conversion, e.g '0004' -> 4 - @Erik Tilt [CodePlex #10502](https://phpexcel.codeplex.com/workitem/10502)\n- Make PHP type match Excel datatype - @Erik Tilt [CodePlex #10600](https://phpexcel.codeplex.com/workitem/10600)\n- Change first page number on header - @MarkBaker [CodePlex #10630](https://phpexcel.codeplex.com/workitem/10630)\n- Applied patch 3941 - @MarkBaker\n- Hidden sheets - @MB,ET [CodePlex #10745](https://phpexcel.codeplex.com/workitem/10745)\n- mbstring fallback when iconv is broken - @Erik Tilt [CodePlex #10761](https://phpexcel.codeplex.com/workitem/10761)\n- Note, can't yet handle comparison of two matrices - @MarkBaker\n- Improved handling for validation and error trapping in a number of functions - @MarkBaker\n- Improved support for fraction number formatting - @MarkBaker\n- Support Reading CSV with Byte Order Mark (BOM) - @Erik Tilt [CodePlex #10455](https://phpexcel.codeplex.com/workitem/10455)\n\n### Bugfixes\n\n- addExternalSheet() at specified index - @Erik Tilt [CodePlex #10860](https://phpexcel.codeplex.com/workitem/10860)\n- Named range can no longer be passed to worksheet->getCell() - @MarkBaker [CodePlex #10684](https://phpexcel.codeplex.com/workitem/10684)\n- RichText HTML entities no longer working in PHPExcel 1.7.0 - @Erik Tilt [CodePlex #10455](https://phpexcel.codeplex.com/workitem/10455)\n- Fit-to-width value of 1 is lost after read/write of Excel2007 spreadsheet [+ support for simultaneous scale/fitToPage] - @Erik Tilt\n- Performance issue identified by profiling - @MarkBaker [CodePlex #10469](https://phpexcel.codeplex.com/workitem/10469)\n- setSelectedCell is wrong - @Erik Tilt [CodePlex #10473](https://phpexcel.codeplex.com/workitem/10473)\n- Images get squeezed/stretched with (Mac) Verdana 10 Excel files using Excel5 reader/writer - @Erik Tilt [CodePlex #10481](https://phpexcel.codeplex.com/workitem/10481)\n- Error in argument count for DATEDIF() function - @MarkBaker [CodePlex #10482](https://phpexcel.codeplex.com/workitem/10482)\n- updateFormulaReferences is buggy - @MarkBaker [CodePlex #10452](https://phpexcel.codeplex.com/workitem/10452)\n- CellIterator returns null Cell if onlyExistingCells is set and key() is in use - @MarkBaker [CodePlex #10485](https://phpexcel.codeplex.com/workitem/10485)\n- Wrong RegEx for parsing cell references in formulas - @MarkBaker [CodePlex #10453](https://phpexcel.codeplex.com/workitem/10453)\n- Optimisation subverted to devastating effect if IterateOnlyExistingCells is clear - @MarkBaker [CodePlex #10486](https://phpexcel.codeplex.com/workitem/10486)\n- Fatal error: Uncaught exception 'Exception' with message 'Unrecognized token 6C in formula'... with PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10494](https://phpexcel.codeplex.com/workitem/10494)\n- Fractions stored as text are not treated as numbers by PHPExcel's calculation engine - @MarkBaker [CodePlex #10490](https://phpexcel.codeplex.com/workitem/10490)\n- AutoFit (autosize) row height not working in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10503](https://phpexcel.codeplex.com/workitem/10503)\n- Fixed problem with null values breaking the calculation stack - @MarkBaker\n- Date number formats sometimes fail with PHPExcel_Style_NumberFormat::toFormattedString, e.g. [$-40047]mmmm d yyyy - @Erik Tilt [CodePlex #10524](https://phpexcel.codeplex.com/workitem/10524)\n- Fixed minor problem with DATEDIFF YM calculation - @MarkBaker\n- Applied patch 3695 - @MarkBaker\n- setAutosize() and Date cells not working properly - @Erik Tilt [CodePlex #10536](https://phpexcel.codeplex.com/workitem/10536)\n- Time value hour offset in output by HTML/PDF/CSV writers (system timezone problem) - @Erik Tilt [CodePlex #10556](https://phpexcel.codeplex.com/workitem/10556)\n- Control characters 0x14-0x1F are not treated by PHPExcel - @Erik Tilt [CodePlex #10558](https://phpexcel.codeplex.com/workitem/10558)\n- PHPExcel_Writer_Excel5 not working when open_basedir restriction is in effect - @Erik Tilt [CodePlex #10560](https://phpexcel.codeplex.com/workitem/10560)\n- IF formula calculation problem in PHPExcel 1.7.0 (string comparisons) - @MarkBaker [CodePlex #10563](https://phpexcel.codeplex.com/workitem/10563)\n- Improved CODE() Text function result for UTF-8 characters - @MarkBaker\n- Empty rows are collapsed with HTML/PDF writer - @Erik Tilt [CodePlex #10568](https://phpexcel.codeplex.com/workitem/10568)\n- Gaps between rows in output by PHPExcel_Writer_PDF (Upgrading to TCPDF 4.7.003) - @Erik Tilt [CodePlex #10569](https://phpexcel.codeplex.com/workitem/10569)\n- Problem reading formulas (Excel5 reader problem with \"fake\" shared formulas) - @Erik Tilt [CodePlex #10575](https://phpexcel.codeplex.com/workitem/10575)\n- Error type in formula: \"_raiseFormulaError message is Formula Error: An unexpected error occured\" - @MarkBaker [CodePlex #10588](https://phpexcel.codeplex.com/workitem/10588)\n- Miscellaneous column width problems in Excel5/Excel2007 writer - @Erik Tilt [CodePlex #10599](https://phpexcel.codeplex.com/workitem/10599)\n- Reader/Excel5 'Unrecognized token 2D in formula' in latest version - @Erik Tilt [CodePlex #10615](https://phpexcel.codeplex.com/workitem/10615)\n- on php 5.3 PHPExcel 1.7 Excel 5 reader fails in _getNextToken, token = 2C, throws exception - @Erik Tilt [CodePlex #10623](https://phpexcel.codeplex.com/workitem/10623)\n- Fatal error when altering styles after workbook has been saved - @Erik Tilt [CodePlex #10617](https://phpexcel.codeplex.com/workitem/10617)\n- Images vertically stretched or squeezed when default font size is changed (PHPExcel_Writer_Excel5) - @Erik Tilt [CodePlex #10661](https://phpexcel.codeplex.com/workitem/10661)\n- Styles not read in \"manipulated\" Excel2007 workbook - @Erik Tilt [CodePlex #10676](https://phpexcel.codeplex.com/workitem/10676)\n- Windows 7 says corrupt file by PHPExcel_Writer_Excel5 when opening in Excel - @Erik Tilt [CodePlex #10059](https://phpexcel.codeplex.com/workitem/10059)\n- Calculations sometimes not working with cell references to other sheets - @MarkBaker [CodePlex #10708](https://phpexcel.codeplex.com/workitem/10708)\n- Problem with merged cells after insertNewRowBefore() - @Erik Tilt [CodePlex #10706](https://phpexcel.codeplex.com/workitem/10706)\n- Applied patch 4023 - @MarkBaker\n- Fix to SUMIF() and COUNTIF() Statistical functions for when condition is a match against a string value - @MarkBaker\n- PHPExcel_Cell::coordinateFromString should throw exception for bad string parameter - @Erik Tilt [CodePlex #10721](https://phpexcel.codeplex.com/workitem/10721)\n- EucrosiaUPC (Thai font) not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10723](https://phpexcel.codeplex.com/workitem/10723)\n- Improved the return of calculated results when the result value is an array - @MarkBaker\n- Allow calculation engine to support Functions prefixed with @ within formulae - @MarkBaker\n- Intersection operator (space operator) fatal error with calculation engine - @MarkBaker [CodePlex #10632](https://phpexcel.codeplex.com/workitem/10632)\n- Chinese, Japanese, Korean characters show as squares in PDF - @Erik Tilt [CodePlex #10742](https://phpexcel.codeplex.com/workitem/10742)\n- sheet title allows invalid characters - @Erik Tilt [CodePlex #10756](https://phpexcel.codeplex.com/workitem/10756)\n- Sheet!$A$1 as function argument in formula causes infinite loop in Excel5 writer - @Erik Tilt [CodePlex #10757](https://phpexcel.codeplex.com/workitem/10757)\n- Cell range involving name not working with calculation engine - Modified calculation parser to handle range operator (:), but doesn't currently handle worksheet references with spaces or other non-alphameric characters, or trap erroneous references - @MarkBaker [CodePlex #10740](https://phpexcel.codeplex.com/workitem/10740)\n- DATE function problem with calculation engine (says too few arguments given) - @MarkBaker [CodePlex #10798](https://phpexcel.codeplex.com/workitem/10798)\n- Blank cell can cause wrong calculated value - @MarkBaker [CodePlex #10799](https://phpexcel.codeplex.com/workitem/10799)\n- Modified ROW() and COLUMN() Lookup/Reference Functions to return an array when passed a cell range, plus some additional work on INDEX() - @MarkBaker\n- Images not showing in Excel 97 using PHPExcel_Writer_Excel5 (patch by Jordi Gutiérrez Hermoso) - @Erik Tilt [CodePlex #10817](https://phpexcel.codeplex.com/workitem/10817)\n- When figures are contained in the excel sheet, Reader was stopped - @Erik Tilt [CodePlex #10785](https://phpexcel.codeplex.com/workitem/10785)\n- Formulas changed after insertNewRowBefore() - @MarkBaker [CodePlex #10818](https://phpexcel.codeplex.com/workitem/10818)\n- Cell range row offset problem with shared formulas using PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10825](https://phpexcel.codeplex.com/workitem/10825)\n- Warning: Call-time pass-by-reference has been deprecated - @MarkBaker [CodePlex #10832](https://phpexcel.codeplex.com/workitem/10832)\n- Image should \"Move but don't size with cells\" instead of \"Move and size with cells\" with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10849](https://phpexcel.codeplex.com/workitem/10849)\n- Opening a Excel5 generated XLS in Excel 2007 results in header/footer entry not showing on input - @Erik Tilt [CodePlex #10856](https://phpexcel.codeplex.com/workitem/10856)\n- addExternalSheet() not returning worksheet - @Erik Tilt [CodePlex #10859](https://phpexcel.codeplex.com/workitem/10859)\n- Invalid results in formulas with named ranges - @MarkBaker [CodePlex #10629](https://phpexcel.codeplex.com/workitem/10629)\n\n## [1.7.0] - 2009-08-10\n\n### General\n\n- Expand documentation: Number formats - @Erik Tilt\n- Class 'PHPExcel_Cell_AdvancedValueBinder' not found - @Erik Tilt\n\n### Features\n\n- Change return type of date functions to PHPExcel_Calculation_Functions::RETURNDATE_EXCEL - @MarkBaker\n- New RPN and stack-based calculation engine for improved performance of formula calculation - @MarkBaker\n    - Faster (anything between 2 and 12 times faster than the old parser, depending on the complexity and nature of the formula)\n    - Significantly more memory efficient when formulae reference cells across worksheets\n    - Correct behaviour when referencing Named Ranges that exist on several worksheets\n    - Support for Excel ^ (Exponential) and % (Percentage) operators\n    - Support for matrices within basic arithmetic formulae (e.g. ={1,2,3;4,5,6;7,8,9}/2)\n    - Better trapping/handling of NaN and infinity results (return #NUM! error)\n    - Improved handling of empty parameters for Excel functions\n    - Optional logging of calculation steps- New calculation engine can be accessed independently of workbooks (for use as a standalone calculator) - @MarkBaker\n- Implement more Excel calculation functions - @MarkBaker\n    - Initial implementation of the COUNTIF() and SUMIF() Statistical functions\n    - Added ACCRINT() Financial function- Modifications to number format handling for dddd and ddd masks in dates, use of thousand separators even when locale only implements it for money, and basic fraction masks (0 ?/? and ?/?) - @MarkBaker\n- Support arbitrary fixed number of decimals in PHPExcel_Style_NumberFormat::toFormattedString() - @Erik Tilt\n- Improving performance and memory on data dumps - @Erik Tilt\n    - Various style optimizations (merging from branch wi6857-memory)\n    - Moving hyperlink and dataValidation properties from cell to worksheet for lower PHP memory usage- Provide fluent interfaces where possible - @MarkBaker\n- Make easy way to apply a border to a rectangular selection - @Erik Tilt\n- Support for system window colors in PHPExcel_Reader_Excel5 - @Erik Tilt\n- Horizontal center across selection - @Erik Tilt\n- Merged cells record, write to full record size in PHPExcel_Writer_Excel5 - @Erik Tilt\n- Add page break between sheets in exported PDF - @MarkBaker\n- Sanitization of UTF-8 input for cell values - @Erik Tilt\n- Read cached calculated value with PHPExcel_Reader_Excel5 - @Erik Tilt\n- Miscellaneous CSS improvements for PHPExcel_Writer_HTML - @Erik Tilt\n- getProperties: setCompany feature request - @Erik Tilt\n- Insert worksheet at a specified index - @MarkBaker\n- Change worksheet index - @MarkBaker\n- Readfilter for CSV reader - @MarkBaker\n- Check value of mbstring.func_overload when saving with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10172](https://phpexcel.codeplex.com/workitem/10172)\n- Eliminate dependency of an include path pointing to class directory - @Erik Tilt [CodePlex #10251](https://phpexcel.codeplex.com/workitem/10251)\n- Method for getting the correct reader for a certain file (contribution) - @Erik Tilt [CodePlex #10292](https://phpexcel.codeplex.com/workitem/10292)\n- Choosing specific row in fromArray method - @Erik Tilt [CodePlex #10287](https://phpexcel.codeplex.com/workitem/10287)\n- Shared formula support in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10319](https://phpexcel.codeplex.com/workitem/10319)\n\n### Bugfixes\n\n- Right-to-left column direction in worksheet - @MB,ET [CodePlex #10345](https://phpexcel.codeplex.com/workitem/10345)\n- PHPExcel_Reader_Excel5 not reading PHPExcel_Style_NumberFormat::FORMAT_NUMBER ('0') - @Erik Tilt\n- Fractional row height in locale other than English results in corrupt output using PHPExcel_Writer_Excel2007 - @Erik Tilt\n- Fractional (decimal) numbers not inserted correctly when locale is other than English - @Erik Tilt\n- Fractional calculated value in locale other than English results in corrupt output using PHPExcel_Writer_Excel2007 - @Erik Tilt\n- Locale aware decimal and thousands separator in exported formats HTML, CSV, PDF - @Erik Tilt\n- Cannot Add Image with Space on its Name - @MarkBaker\n- Black line at top of every page in output by PHPExcel_Writer_PDF - @Erik Tilt\n- Border styles and border colors not showing in HTML output (regression since 1.6.4) - @Erik Tilt\n- Hidden screen gridlines setting in worksheet not read by PHPExcel_Reader_Excel2007 - @Erik Tilt\n- Some valid sheet names causes corrupt output using PHPExcel_Writer_Excel2007 - @MarkBaker\n- More than 32,767 characters in a cell gives corrupt Excel file - @Erik Tilt\n- Images not getting copyied with the ->copy() function - @Erik Tilt\n- Bad calculation of column width setAutoSize(true) function - @Erik Tilt\n- Dates are sometimes offset by 1 day in output by HTML and PDF writers depending on system timezone setting - @Erik Tilt\n- Wingdings symbol fonts not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10003](https://phpexcel.codeplex.com/workitem/10003)\n- White space string prefix stripped by PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #10010](https://phpexcel.codeplex.com/workitem/10010)\n- The name of the Workbook stream MUST be \"Workbook\", not \"Book\" - @Erik Tilt [CodePlex #10023](https://phpexcel.codeplex.com/workitem/10023)\n- Avoid message \"Microsoft Excel recalculates formulas...\" when closing xls file from Excel - @Erik Tilt [CodePlex #10030](https://phpexcel.codeplex.com/workitem/10030)\n- Non-unique newline representation causes problems with LEN formula - @Erik Tilt [CodePlex #10031](https://phpexcel.codeplex.com/workitem/10031)\n- Newline in cell not showing with PHPExcel_Writer_HTML and PHPExcel_Writer_PDF - @Erik Tilt [CodePlex #10033](https://phpexcel.codeplex.com/workitem/10033)\n- Rich-Text strings get prefixed by &nbsp; when output by HTML writer - @Erik Tilt [CodePlex #10046](https://phpexcel.codeplex.com/workitem/10046)\n- Leading spaces do not appear in output by HTML/PDF writers - @Erik Tilt [CodePlex #10052](https://phpexcel.codeplex.com/workitem/10052)\n- Empty Apache POI-generated file can not be read - @MarkBaker [CodePlex #10061](https://phpexcel.codeplex.com/workitem/10061)\n- Column width not scaling correctly with font size in HTML and PDF writers - @Erik Tilt [CodePlex #10068](https://phpexcel.codeplex.com/workitem/10068)\n- Inaccurate row heights with HTML writer - @Erik Tilt [CodePlex #10069](https://phpexcel.codeplex.com/workitem/10069)\n- Reference helper - @MarkBaker\n- Excel 5 Named ranges should not be local to the worksheet, but accessible from all worksheets - @MarkBaker\n- Row heights are ignored by PHPExcel_Writer_PDF - @Erik Tilt [CodePlex #10088](https://phpexcel.codeplex.com/workitem/10088)\n- Write raw XML - @MarkBaker\n- removeRow(), removeColumn() not always clearing cell values - @Erik Tilt [CodePlex #10098](https://phpexcel.codeplex.com/workitem/10098)\n- Problem reading certain hyperlink records with PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10142](https://phpexcel.codeplex.com/workitem/10142)\n- Hyperlink cell range read failure with PHPExcel_Reader_Excel2007 - @Erik Tilt [CodePlex #10143](https://phpexcel.codeplex.com/workitem/10143)\n- 'Column string index can not be empty.' - @MarkBaker [CodePlex #10149](https://phpexcel.codeplex.com/workitem/10149)\n- getHighestColumn() sometimes says there are 256 columns with PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10204](https://phpexcel.codeplex.com/workitem/10204)\n- extractSheetTitle fails when sheet title contains exclamation mark (!) - @Erik Tilt [CodePlex #10220](https://phpexcel.codeplex.com/workitem/10220)\n- setTitle() sometimes erroneously appends integer to sheet name - @Erik Tilt [CodePlex #10221](https://phpexcel.codeplex.com/workitem/10221)\n- Mac BIFF5 Excel file read failure (missing support for Mac OS Roman character set) - @Erik Tilt [CodePlex #10229](https://phpexcel.codeplex.com/workitem/10229)\n- BIFF5 header and footer incorrectly read by PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10230](https://phpexcel.codeplex.com/workitem/10230)\n- iconv notices when reading hyperlinks with PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10259](https://phpexcel.codeplex.com/workitem/10259)\n- Excel5 reader OLE read failure with small Mac BIFF5 Excel files - @Erik Tilt [CodePlex #10252](https://phpexcel.codeplex.com/workitem/10252)\n- Problem in reading formula : IF( IF ) with PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10272](https://phpexcel.codeplex.com/workitem/10272)\n- Error reading formulas referencing external sheets with PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10274](https://phpexcel.codeplex.com/workitem/10274)\n- Image horizontally stretched when default font size is increased (PHPExcel_Writer_Excel5) - @Erik Tilt [CodePlex #10291](https://phpexcel.codeplex.com/workitem/10291)\n- Undefined offset in Reader\\Excel5.php on line 3572 - @Erik Tilt [CodePlex #10333](https://phpexcel.codeplex.com/workitem/10333)\n- PDF output different then XLS (copied data) - @MarkBaker [CodePlex #10340](https://phpexcel.codeplex.com/workitem/10340)\n- Internal hyperlinks with UTF-8 sheet names not working in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #10352](https://phpexcel.codeplex.com/workitem/10352)\n- String shared formula result read error with PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #10361](https://phpexcel.codeplex.com/workitem/10361)\n- Uncaught exception 'Exception' with message 'Valid scale is between 10 and 400.' in Classes/PHPExcel/Worksheet/PageSetup.php:338 - @Erik Tilt [CodePlex #10363](https://phpexcel.codeplex.com/workitem/10363)\n- Using setLoadSheetsOnly fails if you do not use setReadDataOnly(true) and sheet is not the first sheet - @Erik Tilt [CodePlex #10355](https://phpexcel.codeplex.com/workitem/10355)\n- getCalculatedValue() sometimes incorrect with IF formula and 0-values - @MarkBaker [CodePlex #10362](https://phpexcel.codeplex.com/workitem/10362)\n- Excel Reader 2007 problem with \"shared\" formulae when \"master\" is an error - @MarkBaker\n- Named Range Bug, using the same range name on different worksheets - @MarkBaker\n- Java code in JAMA classes - @MarkBaker\n- getCalculatedValue() not working with some formulas involving error types - @MarkBaker\n- evaluation of both return values in an IF() statement returning an error if either result was an error, irrespective of the IF evaluation - @MarkBaker\n- Power in formulas: new calculation engine no longer treats ^ as a bitwise XOR operator - @MarkBaker\n- Bugfixes and improvements to many of the Excel functions in PHPExcel - @MarkBaker\n    - Added optional \"places\" parameter in the BIN2HEX(), BIN2OCT, DEC2BIN(), DEC2OCT(), DEC2HEX(), HEX2BIN(), HEX2OCT(), OCT2BIN() and OCT2HEX() Engineering Functions\n    - Trap for unbalanced matrix sizes in MDETERM() and MINVERSE() Mathematic and Trigonometric functions\n    - Fix for default characters parameter value for LEFT() and RIGHT() Text functions\n    - Fix for GCD() and LCB() Mathematical functions when the parameters include a zero (0) value\n    - Fix for BIN2OCT() Engineering Function for 2s complement values (which were returning hex values)\n    - Fix for BESSELK() and BESSELY() Engineering functions\n    - Fix for IMDIV() Engineering Function when result imaginary component is positive (wasn't setting the sign)\n    - Fix for ERF() Engineering Function when called with an upper limit value for the integration\n    - Fix to DATE() Date/Time Function for year value of 0\n    - Set ISPMT() function as category FINANCIAL\n    - Fix for DOLLARDE() and DOLLARFR() Financial functions\n    - Fix to EFFECT() Financial function (treating $nominal_rate value as a variable name rather than a value)\n    - Fix to CRITBINOM() Statistical function (CurrentValue and EssentiallyZero treated as constants rather than variables)\n    - Note that an Error in the function logic can still lead to a permanent loop\n    - Fix to MOD() Mathematical function to work with floating point results\n    - Fix for QUOTIENT() Mathematical function\n    - Fix to HOUR(), MINUTE() and SECOND() Date/Time functions to return an error when passing in a floating point value of 1.0 or greater, or less than 0\n    - LOG() Function now correctly returns base-10 log when called with only one parameter, rather than the natural log as the default base\n    - Modified text functions to handle multibyte character set (UTF-8).\n\n## [1.6.7] - 2009-04-22\n\n### BREAKING CHANGE\n\nIn previous versions of PHPExcel up to and including 1.6.6,\nwhen a cell had a date-like number format code, it was possible to enter a date\ndirectly using an integer PHP-time without converting to Excel date format.\nStarting with PHPExcel 1.6.7 this is no longer supported. Refer to the developer\ndocumentation for more information on entering dates into a cell.\n\n### General\n\n- Deprecate misspelled setStriketrough() and getStriketrough() methods - @MarkBaker [CodePlex #9416](https://phpexcel.codeplex.com/workitem/9416)\n\n### Features\n\n- Performance improvement when saving file - @MarkBaker [CodePlex #9526](https://phpexcel.codeplex.com/workitem/9526)\n- Check that sheet title has maximum 31 characters - @MarkBaker [CodePlex #9598](https://phpexcel.codeplex.com/workitem/9598)\n- True support for Excel built-in number format codes - @MB, ET [CodePlex #9631](https://phpexcel.codeplex.com/workitem/9631)\n- Ability to read defect BIFF5 Excel file without CODEPAGE record - @Erik Tilt [CodePlex #9683](https://phpexcel.codeplex.com/workitem/9683)\n- Auto-detect which reader to invoke - @MarkBaker [CodePlex #9701](https://phpexcel.codeplex.com/workitem/9701)\n- Deprecate insertion of dates using PHP-time (Unix time) [request for removal of feature] - @Erik Tilt [CodePlex #9214](https://phpexcel.codeplex.com/workitem/9214)\n- Support for entering time values like '9:45', '09:45' using AdvancedValueBinder - @Erik Tilt [CodePlex #9747](https://phpexcel.codeplex.com/workitem/9747)\n\n### Bugfixes\n\n- DataType dependent horizontal alignment in HTML and PDF writer - @Erik Tilt [CodePlex #9797](https://phpexcel.codeplex.com/workitem/9797)\n- Cloning data validation object causes script to stop - @MarkBaker [CodePlex #9375](https://phpexcel.codeplex.com/workitem/9375)\n- Simultaneous repeating rows and repeating columns not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #9400](https://phpexcel.codeplex.com/workitem/9400)\n- Simultaneous repeating rows and repeating columns not working with PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #9399](https://phpexcel.codeplex.com/workitem/9399)\n- Row outline level not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #9437](https://phpexcel.codeplex.com/workitem/9437)\n- Occasional notices with PHPExcel_Reader_Excel5 when Excel file contains drawing elements - @Erik Tilt [CodePlex #9452](https://phpexcel.codeplex.com/workitem/9452)\n- PHPExcel_Reader_Excel5 fails as a whole when workbook contains images other than JPEG/PNG - @Erik Tilt [CodePlex #9453](https://phpexcel.codeplex.com/workitem/9453)\n- Excel5 writer checks for iconv but does not necessarily use it - @Erik Tilt [CodePlex #9444](https://phpexcel.codeplex.com/workitem/9444)\n- Altering a style on copied worksheet alters also the original - @Erik Tilt [CodePlex #9463](https://phpexcel.codeplex.com/workitem/9463)\n- Formulas are incorrectly updated when a sheet is renamed - @MarkBaker [CodePlex #9480](https://phpexcel.codeplex.com/workitem/9480)\n- PHPExcel_Worksheet::extractSheetTitle not treating single quotes correctly - @MarkBaker [CodePlex #9513](https://phpexcel.codeplex.com/workitem/9513)\n- PHP Warning raised in function array_key_exists - @MarkBaker [CodePlex #9477](https://phpexcel.codeplex.com/workitem/9477)\n- getAlignWithMargins() gives wrong value when using PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #9599](https://phpexcel.codeplex.com/workitem/9599)\n- getScaleWithDocument() gives wrong value when using PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #9600](https://phpexcel.codeplex.com/workitem/9600)\n- PHPExcel_Reader_Excel2007 not reading the first user-defined number format - @MarkBaker [CodePlex #9630](https://phpexcel.codeplex.com/workitem/9630)\n- Print area converted to uppercase after read with PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #9647](https://phpexcel.codeplex.com/workitem/9647)\n- Incorrect reading of scope for named range using PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #9661](https://phpexcel.codeplex.com/workitem/9661)\n- Error with pattern (getFillType) and rbg (getRGB) - @MarkBaker [CodePlex #9690](https://phpexcel.codeplex.com/workitem/9690)\n- AdvancedValueBinder affected by system timezone setting when inserting date values - @Erik Tilt [CodePlex #9712](https://phpexcel.codeplex.com/workitem/9712)\n- PHPExcel_Reader_Excel2007 not reading value of active sheet index - @Erik Tilt [CodePlex #9743](https://phpexcel.codeplex.com/workitem/9743)\n- getARGB() sometimes returns SimpleXMLElement object instead of string with PHPExcel_Reader_Excel2007 - @Erik Tilt [CodePlex #9742](https://phpexcel.codeplex.com/workitem/9742)\n- Negative image offset causes defects in 14excel5.xls and 20readexcel5.xlsx - @Erik Tilt [CodePlex #9731](https://phpexcel.codeplex.com/workitem/9731)\n- HTML & PDF Writer not working with mergeCells (regression since 1.6.5) - @Erik Tilt [CodePlex #9758](https://phpexcel.codeplex.com/workitem/9758)\n- Too wide columns with HTML and PDF writer - @Erik Tilt [CodePlex #9774](https://phpexcel.codeplex.com/workitem/9774)\n- PDF and cyrillic fonts - @MarkBaker [CodePlex #9775](https://phpexcel.codeplex.com/workitem/9775)\n- Percentages not working correctly with HTML and PDF writers (shows 0.25% instead of 25%) - @Erik Tilt [CodePlex #9793](https://phpexcel.codeplex.com/workitem/9793)\n- PHPExcel_Writer_HTML creates extra borders around cell contents using setUseInlineCss(true) - @Erik Tilt [CodePlex #9791](https://phpexcel.codeplex.com/workitem/9791)\n- Problem with text wrap + merged cells in HTML and PDF writer - @Erik Tilt [CodePlex #9784](https://phpexcel.codeplex.com/workitem/9784)\n- Adjacent path separators in include_path causing IOFactory to violate open_basedir restriction - @Erik Tilt [CodePlex #9814](https://phpexcel.codeplex.com/workitem/9814)\n\n## [1.6.6] - 2009-03-02\n\n### General\n\n- Improve support for built-in number formats in PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #9102](https://phpexcel.codeplex.com/workitem/9102)\n- Source files are in both UNIX and DOS formats - changed to UNIX - @Erik Tilt [CodePlex #9281](https://phpexcel.codeplex.com/workitem/9281)\n\n### Features\n\n- Update documentation: Which language to write formulas in? - @MarkBaker [CodePlex #9338](https://phpexcel.codeplex.com/workitem/9338)\n- Ignore DEFCOLWIDTH records with value 8 in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #8817](https://phpexcel.codeplex.com/workitem/8817)\n- Support for width, height, offsetX, offsetY for images in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #8847](https://phpexcel.codeplex.com/workitem/8847)\n- Disk Caching in specific folder - @MarkBaker [CodePlex #8870](https://phpexcel.codeplex.com/workitem/8870)\n- Added SUMX2MY2, SUMX2PY2, SUMXMY2, MDETERM and MINVERSE Mathematical and Trigonometric Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added CONVERT Engineering Function - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added DB, DDB, DISC, DOLLARDE, DOLLARFR, INTRATE, IPMT, PPMT, PRICEDISC, PRICEMAT and RECEIVED Financial Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added ACCRINTM, CUMIPMT, CUMPRINC, TBILLEQ, TBILLPRICE, TBILLYIELD, YIELDDISC and YIELDMAT Financial Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added DOLLAR Text Function - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added CORREL, COVAR, FORECAST, INTERCEPT, RSQ, SLOPE and STEYX Statistical Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added PEARSON Statistical Functions as a synonym for CORREL - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added LINEST, LOGEST (currently only valid for stats = false), TREND and GROWTH Statistical Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added RANK and PERCENTRANK Statistical Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Added ROMAN Mathematical Function (Classic form only) - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Update documentation to show example of getCellByColumnAndRow($col, $row) - @MarkBaker [CodePlex #8931](https://phpexcel.codeplex.com/workitem/8931)\n- Implement worksheet, row and cell iterators - @MarkBaker [CodePlex #8770](https://phpexcel.codeplex.com/workitem/8770)\n- Support for arbitrary defined names (named range) - @MarkBaker [CodePlex #9001](https://phpexcel.codeplex.com/workitem/9001)\n- Update formulas when sheet title / named range title changes - @MB, ET [CodePlex #9016](https://phpexcel.codeplex.com/workitem/9016)\n- Ability to read cached calculated value - @MarkBaker [CodePlex #9103](https://phpexcel.codeplex.com/workitem/9103)\n- Support for Excel 1904 calendar date mode (Mac) - @MBaker, ET [CodePlex #8483](https://phpexcel.codeplex.com/workitem/8483)\n- PHPExcel_Writer_Excel5 improvements writing shared strings table - @Erik Tilt [CodePlex #9194](https://phpexcel.codeplex.com/workitem/9194)\n- PHPExcel_Writer_Excel5 iconv fallback when mbstring extension is not enabled - @Erik Tilt [CodePlex #9248](https://phpexcel.codeplex.com/workitem/9248)\n- UTF-8 support in font names in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #9253](https://phpexcel.codeplex.com/workitem/9253)\n- Implement value binding architecture - @MarkBaker [CodePlex #9215](https://phpexcel.codeplex.com/workitem/9215)\n- PDF writer not working with UTF-8 - @MarkBaker [CodePlex #6742](https://phpexcel.codeplex.com/workitem/6742)\n\n### Bugfixes\n\n- Eliminate duplicate style entries in multisheet workbook written by PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #9355](https://phpexcel.codeplex.com/workitem/9355)\n- Redirect to client browser fails due to trailing white space in class definitions - @Erik Tilt [CodePlex #8810](https://phpexcel.codeplex.com/workitem/8810)\n- Spurious column dimension element introduced in blank worksheet after using PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #8816](https://phpexcel.codeplex.com/workitem/8816)\n- Image gets slightly narrower than expected when using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8830](https://phpexcel.codeplex.com/workitem/8830)\n- Image laid over non-visible row gets squeezed in height when using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8831](https://phpexcel.codeplex.com/workitem/8831)\n- PHPExcel_Reader_Excel5 fails when there are 10 or more images in the workbook - @Erik Tilt [CodePlex #8860](https://phpexcel.codeplex.com/workitem/8860)\n- Different header/footer images in different sheets not working with PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #8909](https://phpexcel.codeplex.com/workitem/8909)\n- Fractional seconds disappear when using PHPExcel_Reader_Excel2007 and PHPExcel_Reader_Excel5 - @MB, ET [CodePlex #8924](https://phpexcel.codeplex.com/workitem/8924)\n- Images not showing in OpenOffice when using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7994](https://phpexcel.codeplex.com/workitem/7994)\n- Images not showing on print using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #9047](https://phpexcel.codeplex.com/workitem/9047)\n- PHPExcel_Writer_Excel5 maximum allowed record size 4 bytes too short - @Erik Tilt [CodePlex #9085](https://phpexcel.codeplex.com/workitem/9085)\n- Not numeric strings are formatted as dates and numbers using worksheet's toArray method - @MarkBaker [CodePlex #9119](https://phpexcel.codeplex.com/workitem/9119)\n- Excel5 simple formula parsing error - @Erik Tilt [CodePlex #9132](https://phpexcel.codeplex.com/workitem/9132)\n- Problems writing dates with CSV - @Erik Tilt [CodePlex #9206](https://phpexcel.codeplex.com/workitem/9206)\n- PHPExcel_Reader_Excel5 reader fails with fatal error when reading group shapes - @Erik Tilt [CodePlex #9203](https://phpexcel.codeplex.com/workitem/9203)\n- PHPExcel_Writer_Excel5 fails completely when workbook contains more than 57 colors - @Erik Tilt [CodePlex #9231](https://phpexcel.codeplex.com/workitem/9231)\n- PHPExcel_Writer_PDF not compatible with autoload - @Erik Tilt [CodePlex #9244](https://phpexcel.codeplex.com/workitem/9244)\n- Fatal error: Call to a member function getNestingLevel() on a non-object in PHPExcel/Reader/Excel5.php on line 690 - @Erik Tilt [CodePlex #9250](https://phpexcel.codeplex.com/workitem/9250)\n- Notices when running test 04printing.php on PHP 5.2.8 - @MarkBaker [CodePlex #9246](https://phpexcel.codeplex.com/workitem/9246)\n- insertColumn() spawns creation of spurious RowDimension - @MarkBaker [CodePlex #9294](https://phpexcel.codeplex.com/workitem/9294)\n- Fix declarations for methods in extended Trend classes - @MarkBaker [CodePlex #9296](https://phpexcel.codeplex.com/workitem/9296)\n- Fix to parameters for the FORECAST Statistical Function - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- PDF writer problems with cell height and text wrapping - @MarkBaker [CodePlex #7083](https://phpexcel.codeplex.com/workitem/7083)\n- Fix test for calculated value in case the returned result is an array - @MarkBaker\n- Column greater than 256 results in corrupt Excel file using PHPExcel_Writer_Excel5 - @Erik Tilt\n- Excel Numberformat 0.00 results in non internal decimal places values in toArray() Method - @MarkBaker [CodePlex #9351](https://phpexcel.codeplex.com/workitem/9351)\n- setAutoSize not taking into account text rotation - @MB,ET [CodePlex #9356](https://phpexcel.codeplex.com/workitem/9356)\n- Call to undefined method PHPExcel_Worksheet_MemoryDrawing::getPath() in PHPExcel/Writer/HTML.php - @Erik Tilt [CodePlex #9372](https://phpexcel.codeplex.com/workitem/9372)\n\n## [1.6.5] - 2009-01-05\n\n### General\n\n- Applied patch 2063 - @MarkBaker\n- Optimise Shared Strings - @MarkBaker\n- Optimise Cell Sorting - @MarkBaker\n- Optimise Style Hashing - @MarkBaker\n- UTF-8 enhancements - @Erik Tilt\n- PHPExcel_Writer_HTML validation errors against strict HTML 4.01 / CSS 2.1 - @Erik Tilt\n- Documented work items 6203 and 8110 in manual - @MarkBaker\n- Restructure package hierachy so classes can be found more easily in auto-generated API (from work item 8468) - @Erik Tilt\n\n### Features\n\n- Redirect output to a client's browser: Update recommendation in documentation - @MarkBaker [CodePlex #8806](https://phpexcel.codeplex.com/workitem/8806)\n- PHPExcel_Reader_Excel5 support for print gridlines - @Erik Tilt [CodePlex #7897](https://phpexcel.codeplex.com/workitem/7897)\n- Screen gridlines support in Excel5 reader/writer - @Erik Tilt [CodePlex #7899](https://phpexcel.codeplex.com/workitem/7899)\n- Option for adding image to spreadsheet from image resource in memory - @MB, ET [CodePlex #7552](https://phpexcel.codeplex.com/workitem/7552)\n- PHPExcel_Reader_Excel5 style support for BIFF5 files (Excel 5.0 - Excel 95) - @Erik Tilt [CodePlex #7862](https://phpexcel.codeplex.com/workitem/7862)\n- PHPExcel_Reader_Excel5 support for user-defined colors and special built-in colors - @Erik Tilt [CodePlex #7918](https://phpexcel.codeplex.com/workitem/7918)\n- Support for freeze panes in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #7992](https://phpexcel.codeplex.com/workitem/7992)\n- Support for header and footer margins in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #7996](https://phpexcel.codeplex.com/workitem/7996)\n- Support for active sheet index in Excel5 reader/writer - @Erik Tilt [CodePlex #7997](https://phpexcel.codeplex.com/workitem/7997)\n- Freeze panes not read by PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #7991](https://phpexcel.codeplex.com/workitem/7991)\n- Support for screen zoom level (feature request) - @MB, ET [CodePlex #7993](https://phpexcel.codeplex.com/workitem/7993)\n- Support for default style in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #8012](https://phpexcel.codeplex.com/workitem/8012)\n- Apple iWork / Numbers.app incompatibility - @MarkBaker [CodePlex #8094](https://phpexcel.codeplex.com/workitem/8094)\n- Support \"between rule\" in conditional formatting - @MarkBaker [CodePlex #7931](https://phpexcel.codeplex.com/workitem/7931)\n- Comment size, width and height control (feature request) - @MarkBaker [CodePlex #8308](https://phpexcel.codeplex.com/workitem/8308)\n- Improve method for storing MERGEDCELLS records in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8418](https://phpexcel.codeplex.com/workitem/8418)\n- Support for protectCells() in Excel5 reader/writer - @Erik Tilt [CodePlex #8435](https://phpexcel.codeplex.com/workitem/8435)\n- Support for fitToWidth and fitToHeight pagesetup properties in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #8472](https://phpexcel.codeplex.com/workitem/8472)\n- Support for setShowSummaryBelow() and setShowSummaryRight() in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8489](https://phpexcel.codeplex.com/workitem/8489)\n- Support for Excel 1904 calendar date mode (Mac) - @MarkBaker [CodePlex #8483](https://phpexcel.codeplex.com/workitem/8483)\n- Excel5 reader: Support for reading images (bitmaps) - @Erik Tilt [CodePlex #7538](https://phpexcel.codeplex.com/workitem/7538)\n- Support for default style in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8787](https://phpexcel.codeplex.com/workitem/8787)\n- Modified calculate() method to return either an array or the first value from the array for those functions that return arrays rather than single values (e.g the MMULT and TRANSPOSE function). This performance can be modified based on the $returnArrayAsType which can be set/retrieved by calling the setArrayReturnType() and getArrayReturnType() methods of the PHPExcel_Calculation class. - @MarkBaker\n\n### Bugfixes\n\n- Added ERROR.TYPE Information Function, MMULT Mathematical and Trigonometry Function, and TRANSPOSE Lookup and Reference Function - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- setPrintGridlines(true) not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7896](https://phpexcel.codeplex.com/workitem/7896)\n- Incorrect mapping of fill patterns in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7907](https://phpexcel.codeplex.com/workitem/7907)\n- setShowGridlines(false) not working with PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #7898](https://phpexcel.codeplex.com/workitem/7898)\n- getShowGridlines() gives inverted value when reading sheet with PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #7905](https://phpexcel.codeplex.com/workitem/7905)\n- User-defined column width becomes slightly larger after read/write with Excel5 - @Erik Tilt [CodePlex #7944](https://phpexcel.codeplex.com/workitem/7944)\n- Incomplete border style support in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7949](https://phpexcel.codeplex.com/workitem/7949)\n- Conditional formatting \"containsText\" read/write results in MS Office Excel 2007 crash - @MarkBaker [CodePlex #7928](https://phpexcel.codeplex.com/workitem/7928)\n- All sheets are always selected in output when using PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #7995](https://phpexcel.codeplex.com/workitem/7995)\n- COLUMN function warning message during plain read/write - @MarkBaker [CodePlex #8013](https://phpexcel.codeplex.com/workitem/8013)\n- setValue(0) results in string data type '0' - @MarkBaker [CodePlex #8155](https://phpexcel.codeplex.com/workitem/8155)\n- Styles not removed when removing rows from sheet - @MarkBaker [CodePlex #8226](https://phpexcel.codeplex.com/workitem/8226)\n- =IF formula causes fatal error during $objWriter->save() in Excel2007 format - @MarkBaker [CodePlex #8301](https://phpexcel.codeplex.com/workitem/8301)\n- Exception thrown reading valid xls file: \"Excel file is corrupt. Didn't find CONTINUE record while reading shared strings\" - @Erik Tilt [CodePlex #8333](https://phpexcel.codeplex.com/workitem/8333)\n- MS Outlook corrupts files generated by PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8320](https://phpexcel.codeplex.com/workitem/8320)\n- Undefined method PHPExcel_Worksheet::setFreezePane() in ReferenceHelper.php on line 271 - @MarkBaker [CodePlex #8351](https://phpexcel.codeplex.com/workitem/8351)\n- Ampersands (&), left and right angles (<, >) in Rich-Text strings leads to corrupt output using PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #8401](https://phpexcel.codeplex.com/workitem/8401)\n- Print header and footer not supporting UTF-8 in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8408](https://phpexcel.codeplex.com/workitem/8408)\n- Vertical page breaks not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8463](https://phpexcel.codeplex.com/workitem/8463)\n- Missing support for accounting underline types in PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8476](https://phpexcel.codeplex.com/workitem/8476)\n- Infinite loops when reading corrupt xls file using PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #8482](https://phpexcel.codeplex.com/workitem/8482)\n- Sheet protection password not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8566](https://phpexcel.codeplex.com/workitem/8566)\n- PHPExcel_Style_NumberFormat::FORMAT_NUMBER ignored by PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8596](https://phpexcel.codeplex.com/workitem/8596)\n- PHPExcel_Reader_Excel5 fails a whole when workbook contains a chart - @Erik Tilt [CodePlex #8781](https://phpexcel.codeplex.com/workitem/8781)\n- Occasional loss of column widths using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #8788](https://phpexcel.codeplex.com/workitem/8788)\n- Notices while reading formulas with deleted sheet references using PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #8795](https://phpexcel.codeplex.com/workitem/8795)\n- Default style not read by PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #8807](https://phpexcel.codeplex.com/workitem/8807)\n- Blank rows occupy too much space in file generated by PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #9341](https://phpexcel.codeplex.com/workitem/9341)\n\n## [1.6.4] - 2008-10-27\n\n### Features\n\n- RK record number error in MS developer documentation: 0x007E should be 0x027E - @Erik Tilt [CodePlex #7882](https://phpexcel.codeplex.com/workitem/7882)\n- getHighestColumn() returning \"@\" for blank worksheet causes corrupt output - @MarkBaker [CodePlex #7878](https://phpexcel.codeplex.com/workitem/7878)\n- Implement ROW and COLUMN Lookup/Reference Functions (when specified with a parameter) - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Implement initial work on OFFSET Lookup/Reference Function (returning address rather than value at address) - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Excel5 reader: Page margins - @Erik Tilt [CodePlex #7416](https://phpexcel.codeplex.com/workitem/7416)\n- Excel5 reader: Header & Footer - @Erik Tilt [CodePlex #7417](https://phpexcel.codeplex.com/workitem/7417)\n- Excel5 reader support for page setup (paper size etc.) - @Erik Tilt [CodePlex #7449](https://phpexcel.codeplex.com/workitem/7449)\n- Improve speed and memory consumption of PHPExcel_Writer_CSV - @MarkBaker [CodePlex #7445](https://phpexcel.codeplex.com/workitem/7445)\n- Better recognition of number format in HTML, CSV, and PDF writer - @MarkBaker [CodePlex #7432](https://phpexcel.codeplex.com/workitem/7432)\n- Font support: Superscript and Subscript - @MarkBaker [CodePlex #7485](https://phpexcel.codeplex.com/workitem/7485)\n- Excel5 reader font support: Super- and subscript - @Erik Tilt [CodePlex #7509](https://phpexcel.codeplex.com/workitem/7509)\n- Excel5 reader style support: Text rotation and stacked text - @Erik Tilt [CodePlex #7521](https://phpexcel.codeplex.com/workitem/7521)\n- Excel5 reader: Support for hyperlinks - @Erik Tilt [CodePlex #7530](https://phpexcel.codeplex.com/workitem/7530)\n- Import sheet by request - @MB, ET [CodePlex #7557](https://phpexcel.codeplex.com/workitem/7557)\n- PHPExcel_Reader_Excel5 support for page breaks - @Erik Tilt [CodePlex #7607](https://phpexcel.codeplex.com/workitem/7607)\n- PHPExcel_Reader_Excel5 support for shrink-to-fit - @Erik Tilt [CodePlex #7622](https://phpexcel.codeplex.com/workitem/7622)\n- Support for error types - @MB, ET [CodePlex #7675](https://phpexcel.codeplex.com/workitem/7675)\n- Excel5 reader true formula support - @Erik Tilt [CodePlex #7388](https://phpexcel.codeplex.com/workitem/7388)\n- Support for named ranges (defined names) in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #7701](https://phpexcel.codeplex.com/workitem/7701)\n- Support for repeating rows and repeating columns (print titles) in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #7781](https://phpexcel.codeplex.com/workitem/7781)\n- Support for print area in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #7783](https://phpexcel.codeplex.com/workitem/7783)\n- Excel5 reader and writer support for horizontal and vertical centering of page - @Erik Tilt [CodePlex #7795](https://phpexcel.codeplex.com/workitem/7795)\n- Applied patch 1962 - @MarkBaker\n- Excel5 reader and writer support for hidden cells (formulas) - @Erik Tilt [CodePlex #7866](https://phpexcel.codeplex.com/workitem/7866)\n- Support for indentation in cells (feature request) - @MB, ET [CodePlex #7612](https://phpexcel.codeplex.com/workitem/7612)\n\n### Bugfixes\n\n- Option for reading only specified interval of rows in a sheet - @MB, ET [CodePlex #7828](https://phpexcel.codeplex.com/workitem/7828)\n- PHPExcel_Calculation_Functions::DATETIMENOW() and PHPExcel_Calculation_Functions::DATENOW() to force UTC - @MarkBaker [CodePlex #7367](https://phpexcel.codeplex.com/workitem/7367)\n- Modified PHPExcel_Shared_Date::FormattedPHPToExcel() and PHPExcel_Shared_Date::ExcelToPHP to force datatype for return values - @MarkBaker [CodePlex #7395](https://phpexcel.codeplex.com/workitem/7395)\n- Excel5 reader not producing UTF-8 strings with BIFF5 files - @Erik Tilt [CodePlex #7450](https://phpexcel.codeplex.com/workitem/7450)\n- Array constant in formula gives run-time notice with Excel2007 writer - @MarkBaker [CodePlex #7470](https://phpexcel.codeplex.com/workitem/7470)\n- PHPExcel_Reader_Excel2007 setReadDataOnly(true) returns Rich-Text - @MarkBaker [CodePlex #7494](https://phpexcel.codeplex.com/workitem/7494)\n- PHPExcel_Reader_Excel5 setReadDataOnly(true) returns Rich-Text - @Erik Tilt [CodePlex #7496](https://phpexcel.codeplex.com/workitem/7496)\n- Characters before superscript or subscript losing style - @MarkBaker [CodePlex #7497](https://phpexcel.codeplex.com/workitem/7497)\n- Subscript not working with HTML writer - @MarkBaker [CodePlex #7507](https://phpexcel.codeplex.com/workitem/7507)\n- DefaultColumnDimension not working on first column (A) - @MarkBaker [CodePlex #7508](https://phpexcel.codeplex.com/workitem/7508)\n- Negative numbers are stored as text in PHPExcel_Writer_2007 - @MarkBaker [CodePlex #7527](https://phpexcel.codeplex.com/workitem/7527)\n- Text rotation and stacked text not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7531](https://phpexcel.codeplex.com/workitem/7531)\n- PHPExcel_Shared_Date::isDateTimeFormatCode erroneously says true - @MarkBaker [CodePlex #7536](https://phpexcel.codeplex.com/workitem/7536)\n- Different images with same filename in separate directories become duplicates - @MarkBaker [CodePlex #7559](https://phpexcel.codeplex.com/workitem/7559)\n- PHPExcel_Reader_Excel5 not returning sheet names as UTF-8 using for Excel 95 files - @Erik Tilt [CodePlex #7568](https://phpexcel.codeplex.com/workitem/7568)\n- setAutoSize(true) on empty column gives column width of 10 using PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #7575](https://phpexcel.codeplex.com/workitem/7575)\n- setAutoSize(true) on empty column gives column width of 255 using PHPExcel_Writer_Excel5 - @MB, ET [CodePlex #7573](https://phpexcel.codeplex.com/workitem/7573)\n- Worksheet_Drawing bug - @MarkBaker [CodePlex #7514](https://phpexcel.codeplex.com/workitem/7514)\n- getCalculatedValue() with REPT function causes script to stop - @MarkBaker [CodePlex #7593](https://phpexcel.codeplex.com/workitem/7593)\n- getCalculatedValue() with LEN function causes script to stop - @MarkBaker [CodePlex #7594](https://phpexcel.codeplex.com/workitem/7594)\n- Explicit fit-to-width (page setup) results in fit-to-height becoming 1 - @MarkBaker [CodePlex #7600](https://phpexcel.codeplex.com/workitem/7600)\n- Fit-to-width value of 1 is lost after read/write of Excel2007 spreadsheet - @MarkBaker [CodePlex #7610](https://phpexcel.codeplex.com/workitem/7610)\n- Conditional styles not read properly using PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #7516](https://phpexcel.codeplex.com/workitem/7516)\n- PHPExcel_Writer_2007: Default worksheet style works only for first sheet - @MarkBaker [CodePlex #7611](https://phpexcel.codeplex.com/workitem/7611)\n- Cannot Lock Cells using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #6940](https://phpexcel.codeplex.com/workitem/6940)\n- Incorrect cell protection values found when using Excel5 reader - @Erik Tilt [CodePlex #7621](https://phpexcel.codeplex.com/workitem/7621)\n- Default row height not working above highest row using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7623](https://phpexcel.codeplex.com/workitem/7623)\n- Default column width does not get applied when using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7637](https://phpexcel.codeplex.com/workitem/7637)\n- Broken support for UTF-8 string formula results in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #7642](https://phpexcel.codeplex.com/workitem/7642)\n- UTF-8 sheet names not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7643](https://phpexcel.codeplex.com/workitem/7643)\n- getCalculatedValue() with ISNONTEXT function causes script to stop - @MarkBaker [CodePlex #7631](https://phpexcel.codeplex.com/workitem/7631)\n- Missing BIFF3 functions in PHPExcel_Writer_Excel5: USDOLLAR (YEN), FINDB, SEARCHB, REPLACEB, LEFTB, RIGHTB, MIDB, LENB, ASC, DBCS (JIS) - @Erik Tilt [CodePlex #7652](https://phpexcel.codeplex.com/workitem/7652)\n- Excel5 reader doesn't read numbers correctly in 64-bit systems - @Erik Tilt [CodePlex #7663](https://phpexcel.codeplex.com/workitem/7663)\n- Missing BIFF5 functions in PHPExcel_Writer_Excel5: ISPMT, DATEDIF, DATESTRING, NUMBERSTRING - @Erik Tilt [CodePlex #7667](https://phpexcel.codeplex.com/workitem/7667)\n- Missing BIFF8 functions in PHPExcel_Writer_Excel5: GETPIVOTDATA, HYPERLINK, PHONETIC, AVERAGEA, MAXA, MINA, STDEVPA, VARPA, STDEVA, VARA - @Erik Tilt [CodePlex #7668](https://phpexcel.codeplex.com/workitem/7668)\n- Wrong host value in PHPExcel_Shared_ZipStreamWrapper::stream_open() - @MarkBaker [CodePlex #7657](https://phpexcel.codeplex.com/workitem/7657)\n- PHPExcel_Reader_Excel5 not reading explicitly entered error types in cells - @Erik Tilt [CodePlex #7676](https://phpexcel.codeplex.com/workitem/7676)\n- Boolean and error data types not preserved for formula results in PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #7678](https://phpexcel.codeplex.com/workitem/7678)\n- PHPExcel_Reader_Excel2007 ignores cell data type - @MarkBaker [CodePlex #7695](https://phpexcel.codeplex.com/workitem/7695)\n- PHPExcel_Reader_Excel5 ignores cell data type - @Erik Tilt [CodePlex #7712](https://phpexcel.codeplex.com/workitem/7712)\n- PHPExcel_Writer_Excel5 not aware of data type - @Erik Tilt [CodePlex #7587](https://phpexcel.codeplex.com/workitem/7587)\n- Long strings sometimes truncated when using PHPExcel_Reader_Excel5 - @Erik Tilt [CodePlex #7713](https://phpexcel.codeplex.com/workitem/7713)\n- Direct entry of boolean or error type in cell not supported by PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7727](https://phpexcel.codeplex.com/workitem/7727)\n- PHPExcel_Reader_Excel2007: Error reading cell with data type string, date number format, and numeric-like cell value - @MarkBaker [CodePlex #7714](https://phpexcel.codeplex.com/workitem/7714)\n- Row and column outlines (group indent level) not showing after using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7735](https://phpexcel.codeplex.com/workitem/7735)\n- Missing UTF-8 support in number format codes for PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7737](https://phpexcel.codeplex.com/workitem/7737)\n- Missing UTF-8 support with PHPExcel_Writer_Excel5 for explicit string in formula - @Erik Tilt [CodePlex #7750](https://phpexcel.codeplex.com/workitem/7750)\n- Problem with class constants in PHPExcel_Style_NumberFormat - @MarkBaker [CodePlex #7726](https://phpexcel.codeplex.com/workitem/7726)\n- Sometimes errors with PHPExcel_Reader_Excel5 reading hyperlinks - @Erik Tilt [CodePlex #7758](https://phpexcel.codeplex.com/workitem/7758)\n- Hyperlink in cell always results in string data type when using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7759](https://phpexcel.codeplex.com/workitem/7759)\n- Excel file with blank sheet seen as broken in MS Office Excel 2007 when created by PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7771](https://phpexcel.codeplex.com/workitem/7771)\n- PHPExcel_Reader_Excel5: Incorrect reading of formula with explicit string containing (escaped) double-quote - @Erik Tilt [CodePlex #7785](https://phpexcel.codeplex.com/workitem/7785)\n- getCalculatedValue() fails on formula with sheet name containing (escaped) single-quote - @MarkBaker [CodePlex #7787](https://phpexcel.codeplex.com/workitem/7787)\n- getCalculatedValue() fails on formula with explicit string containing (escaped) double-quote - @MarkBaker [CodePlex #7786](https://phpexcel.codeplex.com/workitem/7786)\n- Problems with simultaneous repeatRowsAtTop and repeatColumnsAtLeft using Excel2007 reader and writer - @MarkBaker [CodePlex #7780](https://phpexcel.codeplex.com/workitem/7780)\n- PHPExcel_Reader_Excel5: Error reading formulas with sheet reference containing special characters - @Erik Tilt [CodePlex #7802](https://phpexcel.codeplex.com/workitem/7802)\n- Off-sheet references sheet!A1 not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7831](https://phpexcel.codeplex.com/workitem/7831)\n- Repeating rows/columns (print titles), print area not working with PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7834](https://phpexcel.codeplex.com/workitem/7834)\n- Formula having datetime number format shows as text when using PHPExcel_Writer_Excel5 - @Erik Tilt [CodePlex #7849](https://phpexcel.codeplex.com/workitem/7849)\n- Cannot set formula to hidden using applyFromArray() - @MarkBaker [CodePlex #7863](https://phpexcel.codeplex.com/workitem/7863)\n- HTML/PDF Writers limited to 26 columns by calculateWorksheetDimension (erroneous comparison in getHighestColumn() method) - @MarkBaker [CodePlex #7805](https://phpexcel.codeplex.com/workitem/7805)\n- Formula returning error type is lost when read by PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #7873](https://phpexcel.codeplex.com/workitem/7873)\n- PHPExcel_Reader_Excel5: Cell style lost for last column in group of blank cells - @Erik Tilt [CodePlex #7883](https://phpexcel.codeplex.com/workitem/7883)\n- Column width sometimes collapses to auto size using Excel2007 reader/writer - @MarkBaker [CodePlex #7886](https://phpexcel.codeplex.com/workitem/7886)\n- Data Validation Formula = 0 crashes Excel - @MarkBaker [CodePlex #9343](https://phpexcel.codeplex.com/workitem/9343)\n\n## [1.6.3] - 2008-08-25\n\n### General\n\n- Modified PHPExcel_Shared_Date::PHPToExcel() to force UTC - @MarkBaker [CodePlex #7367](https://phpexcel.codeplex.com/workitem/7367)\n- Applied patch 1629 - @MarkBaker\n- Applied patch 1644 - @MarkBaker\n- Implement repeatRow and repeatColumn in Excel5 writer - @MarkBaker [CodePlex #6485](https://phpexcel.codeplex.com/workitem/6485)\n\n### Features\n\n- Remove scene3d filter in Excel2007 drawing - @MarkBaker [CodePlex #6838](https://phpexcel.codeplex.com/workitem/6838)\n- Implement CHOOSE and INDEX Lookup/Reference Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Implement CLEAN Text Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Implement YEARFRAC Date/Time Functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Implement 2 options for print/show gridlines - @MarkBaker [CodePlex #6508](https://phpexcel.codeplex.com/workitem/6508)\n- Add VLOOKUP function (contribution) - @MarkBaker [CodePlex #7270](https://phpexcel.codeplex.com/workitem/7270)\n- Implemented: ShrinkToFit - @MarkBaker [CodePlex #7182](https://phpexcel.codeplex.com/workitem/7182)\n- Row heights not updated correctly when inserting new rows - @MarkBaker [CodePlex #7218](https://phpexcel.codeplex.com/workitem/7218)\n- Copy worksheets within the same workbook - @MarkBaker [CodePlex #7157](https://phpexcel.codeplex.com/workitem/7157)\n- Excel5 reader style support: horizontal and vertical alignment plus text wrap - @Erik Tilt [CodePlex #7290](https://phpexcel.codeplex.com/workitem/7290)\n- Excel5 reader support for merged cells - @Erik Tilt [CodePlex #7294](https://phpexcel.codeplex.com/workitem/7294)\n- Excel5 reader: Sheet Protection - @Erik Tilt [CodePlex #7296](https://phpexcel.codeplex.com/workitem/7296)\n- Excel5 reader: Password for sheet protection - @Erik Tilt [CodePlex #7297](https://phpexcel.codeplex.com/workitem/7297)\n- Excel5 reader: Column width - @Erik Tilt [CodePlex #7299](https://phpexcel.codeplex.com/workitem/7299)\n- Excel5 reader: Row height - @Erik Tilt [CodePlex #7301](https://phpexcel.codeplex.com/workitem/7301)\n- Excel5 reader: Font support - @Erik Tilt [CodePlex #7304](https://phpexcel.codeplex.com/workitem/7304)\n- Excel5 reader: support for locked cells - @Erik Tilt [CodePlex #7324](https://phpexcel.codeplex.com/workitem/7324)\n- Excel5 reader style support: Fill (background colors and patterns) - @Erik Tilt [CodePlex #7330](https://phpexcel.codeplex.com/workitem/7330)\n- Excel5 reader style support: Borders (style and color) - @Erik Tilt [CodePlex #7332](https://phpexcel.codeplex.com/workitem/7332)\n- Excel5 reader: Rich-Text support - @Erik Tilt [CodePlex #7346](https://phpexcel.codeplex.com/workitem/7346)\n- Read Excel built-in number formats with Excel 2007 reader - @MarkBaker [CodePlex #7313](https://phpexcel.codeplex.com/workitem/7313)\n- Excel5 reader: Number format support - @Erik Tilt [CodePlex #7317](https://phpexcel.codeplex.com/workitem/7317)\n- Creating a copy of PHPExcel object - @MarkBaker [CodePlex #7362](https://phpexcel.codeplex.com/workitem/7362)\n- Excel5 reader: support for row / column outline (group) - @Erik Tilt [CodePlex #7373](https://phpexcel.codeplex.com/workitem/7373)\n- Implement default row/column sizes - @MarkBaker [CodePlex #7380](https://phpexcel.codeplex.com/workitem/7380)\n- Writer HTML - option to return styles and table separately - @MarkBaker [CodePlex #7364](https://phpexcel.codeplex.com/workitem/7364)\n\n### Bugfixes\n\n- Excel5 reader: Support for remaining built-in number formats - @Erik Tilt [CodePlex #7393](https://phpexcel.codeplex.com/workitem/7393)\n- Fixed rounding in HOUR MINUTE and SECOND Time functions, and improved performance for these - @MarkBaker\n- Fix to TRIM function - @MarkBaker\n- Fixed range validation in TIME Functions.php - @MarkBaker\n- EDATE and EOMONTH functions now return date values based on the returnDateType flag - @MarkBaker\n- Write date values that are the result of a calculation function correctly as Excel serialized dates rather than PHP serialized date values - @MarkBaker\n- Excel2007 reader not always reading boolean correctly - @MarkBaker [CodePlex #6690](https://phpexcel.codeplex.com/workitem/6690)\n- Columns above IZ - @MarkBaker [CodePlex #6275](https://phpexcel.codeplex.com/workitem/6275)\n- Other locale than English causes Excel2007 writer to produce broken xlsx - @MarkBaker [CodePlex #6853](https://phpexcel.codeplex.com/workitem/6853)\n- Typo: Number_fromat in NumberFormat.php - @MarkBaker [CodePlex #7061](https://phpexcel.codeplex.com/workitem/7061)\n- Bug in Worksheet_BaseDrawing setWidth() - @MarkBaker [CodePlex #6865](https://phpexcel.codeplex.com/workitem/6865)\n- PDF writer collapses column width for merged cells - @MarkBaker [CodePlex #6891](https://phpexcel.codeplex.com/workitem/6891)\n- Issues with drawings filenames - @MarkBaker [CodePlex #6867](https://phpexcel.codeplex.com/workitem/6867)\n- fromArray() local variable isn't defined - @MarkBaker [CodePlex #7073](https://phpexcel.codeplex.com/workitem/7073)\n- PHPExcel_Writer_Excel5->setTempDir() not passed to all classes involved in writing to a file - @MarkBaker [CodePlex #7276](https://phpexcel.codeplex.com/workitem/7276)\n- Excel5 reader not handling UTF-8 properly - @MarkBaker [CodePlex #7277](https://phpexcel.codeplex.com/workitem/7277)\n- If you write a 0 value in cell, cell shows as empty - @MarkBaker [CodePlex #7327](https://phpexcel.codeplex.com/workitem/7327)\n- Excel2007 writer: Row height ignored for empty rows - @MarkBaker [CodePlex #7302](https://phpexcel.codeplex.com/workitem/7302)\n- Excel2007 (comments related error) - @MarkBaker [CodePlex #7281](https://phpexcel.codeplex.com/workitem/7281)\n- Column width in other locale - @MarkBaker [CodePlex #7345](https://phpexcel.codeplex.com/workitem/7345)\n- Excel2007 reader not reading underlined Rich-Text - @MarkBaker [CodePlex #7347](https://phpexcel.codeplex.com/workitem/7347)\n- Excel5 reader converting booleans to strings - @Erik Tilt [CodePlex #7357](https://phpexcel.codeplex.com/workitem/7357)\n- Recursive Object Memory Leak - @MarkBaker [CodePlex #7365](https://phpexcel.codeplex.com/workitem/7365)\n- Excel2007 writer ignoring row dimensions without cells - @MarkBaker [CodePlex #7372](https://phpexcel.codeplex.com/workitem/7372)\n- Excel5 reader is converting formatted numbers / dates to strings - @Erik Tilt [CodePlex #7382](https://phpexcel.codeplex.com/workitem/7382)\n\n## [1.6.2] - 2008-06-23\n\n### General\n\n- Document style array values - @MarkBaker [CodePlex #6088](https://phpexcel.codeplex.com/workitem/6088)\n- Applied patch 1195 - @MarkBaker\n- Redirecting output to a client’s web browser - http headers - @MarkBaker [CodePlex #6178](https://phpexcel.codeplex.com/workitem/6178)\n- Improve worksheet garbage collection - @MarkBaker [CodePlex #6187](https://phpexcel.codeplex.com/workitem/6187)\n- Functions that return date values can now be configured to return as Excel serialized date/time, PHP serialized date/time, or a PHP date/time object. - @MarkBaker\n- Functions that explicitly accept dates as parameters now permit values as Excel serialized date/time, PHP serialized date/time, a valid date string, or a PHP date/time object. - @MarkBaker\n- Implement ACOSH, ASINH and ATANH functions for those operating platforms/PHP versions that don't include these functions - @MarkBaker\n- Implement ATAN2 logic reversing the arguments as per Excel - @MarkBaker\n- Additional validation of parameters for COMBIN - @MarkBaker\n\n### Features\n\n- Fixed validation for CEILING and FLOOR when the value and significance parameters have different signs; and allowed default value of 1 or -1 for significance when in GNUMERIC compatibility mode - @MarkBaker\n- Implement ADDRESS, ISLOGICAL, ISTEXT and ISNONTEXT functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Implement COMPLEX, IMAGINARY, IMREAL, IMARGUMENT, IMCONJUGATE, IMABS, IMSUB, IMDIV, IMSUM, IMPRODUCT, IMSQRT, IMEXP, IMLN, IMLOG10, IMLOG2, IMPOWER IMCOS and IMSIN Engineering functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Implement NETWORKDAYS and WORKDAY Date/Time functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n- Make cell column AAA available - @MarkBaker [CodePlex #6100](https://phpexcel.codeplex.com/workitem/6100)\n- Mark particular cell as selected when opening Excel - @MarkBaker [CodePlex #6095](https://phpexcel.codeplex.com/workitem/6095)\n- Multiple sheets in PDF and HTML - @MarkBaker [CodePlex #6120](https://phpexcel.codeplex.com/workitem/6120)\n- Implement PHPExcel_ReaderFactory and PHPExcel_WriterFactory - @MarkBaker [CodePlex #6227](https://phpexcel.codeplex.com/workitem/6227)\n- Set image root of PHPExcel_Writer_HTML - @MarkBaker [CodePlex #6249](https://phpexcel.codeplex.com/workitem/6249)\n- Enable/disable calculation cache - @MarkBaker [CodePlex #6264](https://phpexcel.codeplex.com/workitem/6264)\n- PDF writer and multi-line text - @MarkBaker [CodePlex #6259](https://phpexcel.codeplex.com/workitem/6259)\n- Feature request - setCacheExpirationTime() - @MarkBaker [CodePlex #6350](https://phpexcel.codeplex.com/workitem/6350)\n- Implement late-binding mechanisms to reduce memory footprint - @JB [CodePlex #6370](https://phpexcel.codeplex.com/workitem/6370)\n- Implement shared styles - @JB [CodePlex #6430](https://phpexcel.codeplex.com/workitem/6430)\n- Copy sheet from external Workbook to active Workbook - @MarkBaker [CodePlex #6391](https://phpexcel.codeplex.com/workitem/6391)\n\n### Bugfixes\n\n- Functions in Conditional Formatting - @MarkBaker [CodePlex #6428](https://phpexcel.codeplex.com/workitem/6428)\n- Default Style in Excel5 - @MarkBaker [CodePlex #6096](https://phpexcel.codeplex.com/workitem/6096)\n- Numbers starting with '+' cause Excel 2007 errors - @MarkBaker [CodePlex #6150](https://phpexcel.codeplex.com/workitem/6150)\n- ExcelWriter5 is not PHP5 compatible, using it with E_STRICT results in a bunch of errors (applied patches) - @MarkBaker [CodePlex #6092](https://phpexcel.codeplex.com/workitem/6092)\n- Error Reader Excel2007 line 653 foreach ($relsDrawing->Relationship as $ele) - @MarkBaker [CodePlex #6179](https://phpexcel.codeplex.com/workitem/6179)\n- Worksheet toArray() screws up DATE - @MarkBaker [CodePlex #6229](https://phpexcel.codeplex.com/workitem/6229)\n- References to a Richtext cell in a formula - @MarkBaker [CodePlex #6253](https://phpexcel.codeplex.com/workitem/6253)\n- insertNewColumnBefore Bug - @MarkBaker [CodePlex #6285](https://phpexcel.codeplex.com/workitem/6285)\n- Error reading Excel2007 file with shapes - @MarkBaker [CodePlex #6319](https://phpexcel.codeplex.com/workitem/6319)\n- Determine whether date values need conversion from PHP dates to Excel dates before writing to file, based on the data type (float or integer) - @MarkBaker [CodePlex #6302](https://phpexcel.codeplex.com/workitem/6302)\n- Fixes to DATE function when it is given negative input parameters - @MarkBaker\n- PHPExcel handles empty cells other than Excel - @MarkBaker [CodePlex #6347](https://phpexcel.codeplex.com/workitem/6347)\n- PHPExcel handles 0 and \"\" as being the same - @MarkBaker [CodePlex #6348](https://phpexcel.codeplex.com/workitem/6348)\n- Problem Using Excel2007 Reader for Spreadsheets containing images - @MarkBaker [CodePlex #6357](https://phpexcel.codeplex.com/workitem/6357)\n- ShowGridLines ignored when reading/writing Excel 2007 - @MarkBaker [CodePlex #6359](https://phpexcel.codeplex.com/workitem/6359)\n- Bug With Word Wrap in Excel 2007 Reader - @MarkBaker [CodePlex #6426](https://phpexcel.codeplex.com/workitem/6426)\n\n## [1.6.1] - 2008-04-28\n\n### General\n\n- Fix documentation printing - @MarkBaker [CodePlex #5532](https://phpexcel.codeplex.com/workitem/5532)\n- Memory usage improvements - @MarkBaker [CodePlex #5586](https://phpexcel.codeplex.com/workitem/5586)\n- Applied patch 990 - @MarkBaker\n\n### Features\n\n- Applied patch 991 - @MarkBaker\n- Implement PHPExcel_Reader_Excel5 - @BM [CodePlex #2841](https://phpexcel.codeplex.com/workitem/2841)\n- Implement \"toArray\" and \"fromArray\" method - @MarkBaker [CodePlex #5564](https://phpexcel.codeplex.com/workitem/5564)\n- Read shared formula - @MarkBaker [CodePlex #5665](https://phpexcel.codeplex.com/workitem/5665)\n- Read image twoCellAnchor - @MarkBaker [CodePlex #5681](https://phpexcel.codeplex.com/workitem/5681)\n- &G Image as bg for headerfooter - @MarkBaker [CodePlex #4446](https://phpexcel.codeplex.com/workitem/4446)\n- Implement page layout functionality for Excel5 format - @MarkBaker [CodePlex #5834](https://phpexcel.codeplex.com/workitem/5834)\n\n### Bugfixes\n\n- Feature request: PHPExcel_Writer_PDF - @MarkBaker [CodePlex #6039](https://phpexcel.codeplex.com/workitem/6039)\n- DefinedNames null check - @MarkBaker [CodePlex #5517](https://phpexcel.codeplex.com/workitem/5517)\n- Hyperlinks should not always have trailing slash - @MarkBaker [CodePlex #5463](https://phpexcel.codeplex.com/workitem/5463)\n- Saving Error - Uncaught exception (#REF! named range) - @MarkBaker [CodePlex #5592](https://phpexcel.codeplex.com/workitem/5592)\n- Error when creating Zip file on Linux System (Not Windows) - @MarkBaker [CodePlex #5634](https://phpexcel.codeplex.com/workitem/5634)\n- Time incorrecly formated - @MarkBaker [CodePlex #5876](https://phpexcel.codeplex.com/workitem/5876)\n- Conditional formatting - second rule not applied - @MarkBaker [CodePlex #5914](https://phpexcel.codeplex.com/workitem/5914)\n- PHPExcel_Reader_Excel2007 cannot load PHPExcel_Shared_File - @MarkBaker [CodePlex #5978](https://phpexcel.codeplex.com/workitem/5978)\n- Output redirection to web browser - @MarkBaker [CodePlex #6020](https://phpexcel.codeplex.com/workitem/6020)\n\n## [1.6.0] - 2008-02-14\n\n### Features\n\n- Use PHPExcel datatypes in formula calculation - @MarkBaker [CodePlex #3156](https://phpexcel.codeplex.com/workitem/3156)\n- Center on page when printing - @MarkBaker [CodePlex #5019](https://phpexcel.codeplex.com/workitem/5019)\n- Hyperlink to other spreadsheet - @MarkBaker [CodePlex #5099](https://phpexcel.codeplex.com/workitem/5099)\n- Set the print area of a worksheet - @MarkBaker [CodePlex #5104](https://phpexcel.codeplex.com/workitem/5104)\n- Read \"definedNames\" property of worksheet - @MarkBaker [CodePlex #5118](https://phpexcel.codeplex.com/workitem/5118)\n- Set default style for all cells - @MarkBaker [CodePlex #5338](https://phpexcel.codeplex.com/workitem/5338)\n- Named Ranges - @MarkBaker [CodePlex #4216](https://phpexcel.codeplex.com/workitem/4216)\n\n### Bugfixes\n\n- Implement worksheet references (Sheet1!A1) - @MarkBaker [CodePlex #5398](https://phpexcel.codeplex.com/workitem/5398)\n- Redirect output to a client's web browser - @MarkBaker [CodePlex #4967](https://phpexcel.codeplex.com/workitem/4967)\n- \"File Error: data may have been lost.\" seen in Excel 2007 and Excel 2003 SP3 when opening XLS file - @MarkBaker [CodePlex #5008](https://phpexcel.codeplex.com/workitem/5008)\n- Bug in style's getHashCode() - @MarkBaker [CodePlex #5165](https://phpexcel.codeplex.com/workitem/5165)\n- PHPExcel_Reader not correctly reading numeric values - @MarkBaker [CodePlex #5165](https://phpexcel.codeplex.com/workitem/5165)\n- Text rotation is read incorrectly - @MarkBaker [CodePlex #5324](https://phpexcel.codeplex.com/workitem/5324)\n- Enclosure \" and data \" result a bad data : \\\" instead of \"\" - @MarkBaker [CodePlex #5326](https://phpexcel.codeplex.com/workitem/5326)\n- Formula parser - IF statement returning array instead of scalar - @MarkBaker [CodePlex #5332](https://phpexcel.codeplex.com/workitem/5332)\n- setFitToWidth(nbpage) & setFitToWidth(nbpage) work partially - @MarkBaker [CodePlex #5351](https://phpexcel.codeplex.com/workitem/5351)\n- Worksheet::setTitle() causes unwanted renaming - @MarkBaker [CodePlex #5361](https://phpexcel.codeplex.com/workitem/5361)\n- Hyperlinks not working. Results in broken xlsx file. - @MarkBaker [CodePlex #5407](https://phpexcel.codeplex.com/workitem/5407)\n\n## [1.5.5] - 2007-12-24\n\n### General\n\n- Grouping Rows - @MarkBaker [CodePlex #4135](https://phpexcel.codeplex.com/workitem/4135)\n\n### Features\n\n- Semi-nightly builds - @MarkBaker [CodePlex #4427](https://phpexcel.codeplex.com/workitem/4427)\n- Implement \"date\" datatype - @MarkBaker [CodePlex #3155](https://phpexcel.codeplex.com/workitem/3155)\n- Date format not honored in CSV writer - @MarkBaker [CodePlex #4150](https://phpexcel.codeplex.com/workitem/4150)\n- RichText and sharedStrings - @MarkBaker [CodePlex #4199](https://phpexcel.codeplex.com/workitem/4199)\n- Implement more Excel calculation functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n    - Addition of DATE, DATEDIF, DATEVALUE, DAY, DAYS360- Implement more Excel calculation functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n    - Addition of AVEDEV, HARMEAN and GEOMEAN\n    - Addition of the BINOMDIST (Non-cumulative only), COUNTBLANK, EXPONDIST, FISHER, FISHERINV, NORMDIST, NORMSDIST, PERMUT, POISSON (Non-cumulative only) and STANDARDIZE Statistical Functions\n    - Addition of the CEILING, COMBIN, EVEN, FACT, FACTDOUBLE, FLOOR, MULTINOMIAL, ODD, ROUNDDOWN, ROUNDUP, SIGN, SQRTPI and SUMSQ Mathematical Functions\n    - Addition of the NORMINV, NORMSINV, CONFIDENCE and SKEW Statistical Functions\n    - Addition of the CRITBINOM, HYPGEOMDIST, KURT, LOGINV, LOGNORMDIST, NEGBINOMDIST and WEIBULL Statistical Functions\n    - Addition of the LARGE, PERCENTILE, QUARTILE, SMALL and TRIMMEAN Statistical Functions\n    - Addition of the BIN2HEX, BIN2OCT, DELTA, ERF, ERFC, GESTEP, HEX2BIN, HEX2DEC, HEX2OCT, OCT2BIN and OCT2HEX Engineering Functions\n    - Addition of the CHIDIST, GAMMADIST and GAMMALN Statistical Functions\n    - Addition of the GCD, LCM, MROUND and SUBTOTAL Mathematical Functions\n    - Addition of the LOWER, PROPER and UPPER Text Functions\n    - Addition of the BETADIST and BETAINV Statistical Functions\n    - Addition of the CHIINV and GAMMAINV Statistical Functions\n    - Addition of the SERIESSUM Mathematical Function\n    - Addition of the CHAR, CODE, FIND, LEN, REPT, SEARCH, T, TRIM Text Functions\n    - Addition of the FALSE and TRUE Boolean Functions\n    - Addition of the TDIST and TINV Statistical Functions\n    - Addition of the EDATE, EOMONTH, YEAR, MONTH, TIME, TIMEVALUE, HOUR, MINUTE, SECOND, WEEKDAY, WEEKNUM, NOW, TODAY and Date/Time Function\n    - Addition of the BESSELI, BESSELJ, BESSELK and BESSELY Engineering Functions\n    - Addition of the SLN and SYD Financial Functions\n    - reworked MODE calculation to handle floating point numbers\n    - Improved error trapping for invalid input values\n    - Fix to SMALL, LARGE, PERCENTILE and TRIMMEAN to eliminate non-numeric values\n    - Added CDF to BINOMDIST and POISSON\n    - Fix to a potential endless loop in CRITBINOM, together with other bugfixes to the algorithm\n    - Fix to SQRTPI so that it will work with a real value parameter rather than just integers\n    - Trap for passing negative values to FACT\n    - Improved accuracy of the NORMDIST cumulative function, and of the ERF and ERFC functions\n    - Replicated Excel data-type and error handling for BIN, DEC, OCT and HEX conversion functions\n    - Replicated Excel data-type and error handling for AND and OR Boolean functions\n    - Bugfix to MROUND\n    - Rework of the DATE, DATEVALUE, DAY, DAYS360 and DATEDIF date/Time functions to use Excel dates rather than straight PHP dates\n    - Rework of the AND, OR Boolean functions to ignore string values\n    - Rework of the BIN2DEC, BIN2HEX, BIN2OCT, DEC2BIN, DEC2HEX, DEC2OCT Engineering functions to handle two's complement\n    - Excel, Gnumeric and OpenOffice Calc compatibility flag for functions\n    - Note, not all functions have yet been written to work with the Gnumeric and OpenOffice Calc compatibility flags\n    - 1900 or 1904 Calendar flag for date functions\n    - Reworked ExcelToPHP date method to handle the Excel 1900 leap year\n    - Note that this will not correctly return values prior to 13-Dec-1901 20:45:52 as this is the minimum value that PHP date serial values can handle. If you need to work with dates prior to this, then an ExcelToPHPObject method has been added which will work correctly with values between Excel's 1900 calendar base date of 1-Jan-1900, and 13-Dec-1901\n    - Addition of ExcelToPHPObject date method to return a PHP DateTime object from an Excel date serial value\n    - PHPToExcel method modified to accept either PHP date serial numbers or PHP DateTime objects\n    - Addition of FormattedPHPToExcel which will accept a date and time broken to into year, month, day, hour, minute, second and return an Excel date serial value- Control characters in Excel 2007 - @MarkBaker [CodePlex #4485](https://phpexcel.codeplex.com/workitem/4485)\n- BaseDrawing::setWidthAndHeight method request - @MarkBaker [CodePlex #4796](https://phpexcel.codeplex.com/workitem/4796)\n- Page Setup -> Print Titles -> Sheet -> 'Rows to repeat at top' - @MarkBaker [CodePlex #4798](https://phpexcel.codeplex.com/workitem/4798)\n\n### Bugfixes\n\n- Comment functionality - @MarkBaker [CodePlex #4433](https://phpexcel.codeplex.com/workitem/4433)\n- Undefined variable in PHPExcel_Writer_Serialized - @MarkBaker [CodePlex #4124](https://phpexcel.codeplex.com/workitem/4124)\n- Notice: Object of class PHPExcel_RichText could not be converted to int - @MarkBaker [CodePlex #4125](https://phpexcel.codeplex.com/workitem/4125)\n- Excel5Writer: utf8 string not converted to utf16 - @MarkBaker [CodePlex #4126](https://phpexcel.codeplex.com/workitem/4126)\n- PHPExcel_RichText and autosize - @MarkBaker [CodePlex #4180](https://phpexcel.codeplex.com/workitem/4180)\n- Excel5Writer produces broken xls files after change mentioned in work item 4126 - @MarkBaker [CodePlex #4574](https://phpexcel.codeplex.com/workitem/4574)\n- Small bug in PHPExcel_Reader_Excel2007 function _readStyle - @MarkBaker [CodePlex #4797](https://phpexcel.codeplex.com/workitem/4797)\n\n## [1.5.0] - 2007-10-23\n\n### Features\n\n- Refactor PHPExcel Drawing - @MarkBaker [CodePlex #3265](https://phpexcel.codeplex.com/workitem/3265)\n- Update Shared/OLE.php to latest version from PEAR - @CS [CodePlex #3079](https://phpexcel.codeplex.com/workitem/3079)\n- Excel2007 vs Excel2003 compatibility pack - @MarkBaker [CodePlex #3217](https://phpexcel.codeplex.com/workitem/3217)\n- Cell protection (lock/unlock) - @MarkBaker [CodePlex #3234](https://phpexcel.codeplex.com/workitem/3234)\n- Create clickable links (hyperlinks) - @MarkBaker [CodePlex #3543](https://phpexcel.codeplex.com/workitem/3543)\n- Additional page setup parameters - @MarkBaker [CodePlex #3241](https://phpexcel.codeplex.com/workitem/3241)\n- Make temporary file path configurable (Excel5) - @MarkBaker [CodePlex #3300](https://phpexcel.codeplex.com/workitem/3300)\n- Small addition to applyFromArray for font - @MarkBaker [CodePlex #3306](https://phpexcel.codeplex.com/workitem/3306)\n\n### Bugfixes\n\n- Better feedback when save of file is not possible - @MarkBaker [CodePlex #3373](https://phpexcel.codeplex.com/workitem/3373)\n- Text Rotation - @MarkBaker [CodePlex #3181](https://phpexcel.codeplex.com/workitem/3181)\n- Small bug in Page Orientation - @MarkBaker [CodePlex #3237](https://phpexcel.codeplex.com/workitem/3237)\n- insertNewColumnBeforeByColumn undefined - @MarkBaker [CodePlex #3812](https://phpexcel.codeplex.com/workitem/3812)\n- Sheet references not working in formula (Excel5 Writer) - @MarkBaker [CodePlex #3893](https://phpexcel.codeplex.com/workitem/3893)\n\n## [1.4.5] - 2007-08-23\n\n### General\n\n- Class file endings - @MarkBaker [CodePlex #3003](https://phpexcel.codeplex.com/workitem/3003)\n- Different calculation engine improvements - @MarkBaker [CodePlex #3081](https://phpexcel.codeplex.com/workitem/3081)\n- Different improvements in PHPExcel_Reader_Excel2007 - @MarkBaker [CodePlex #3082](https://phpexcel.codeplex.com/workitem/3082)\n\n### Features\n\n- Set XML indentation in PHPExcel_Writer_Excel2007 - @MarkBaker [CodePlex #3146](https://phpexcel.codeplex.com/workitem/3146)\n- Optionally store temporary Excel2007 writer data in file instead of memory - @MarkBaker [CodePlex #3159](https://phpexcel.codeplex.com/workitem/3159)\n- Implement show/hide gridlines - @MarkBaker [CodePlex #3063](https://phpexcel.codeplex.com/workitem/3063)\n- Implement option to read only data - @MarkBaker [CodePlex #3064](https://phpexcel.codeplex.com/workitem/3064)\n- Optionally disable formula precalculation - @MarkBaker [CodePlex #3080](https://phpexcel.codeplex.com/workitem/3080)\n- Explicitly set cell datatype - @MarkBaker [CodePlex #3154](https://phpexcel.codeplex.com/workitem/3154)\n\n### Bugfixes\n\n- Implement more Excel calculation functions - @MarkBaker [CodePlex #2346](https://phpexcel.codeplex.com/workitem/2346)\n    - Addition of MINA, MAXA, COUNTA, AVERAGEA, MEDIAN, MODE, DEVSQ, STDEV, STDEVA, STDEVP, STDEVPA, VAR, VARA, VARP and VARPA Excel Functions\n    - Fix to SUM, PRODUCT, QUOTIENT, MIN, MAX, COUNT and AVERAGE functions when cell contains a numeric value in a string datatype, bringing it in line with MS Excel behaviour- File_exists on ZIP fails on some installations - @MarkBaker [CodePlex #2881](https://phpexcel.codeplex.com/workitem/2881)\n- Argument in textRotation should be -90..90 - @MarkBaker [CodePlex #2879](https://phpexcel.codeplex.com/workitem/2879)\n- Excel2007 reader/writer not implementing OpenXML/SpreadsheetML styles 100% correct - @MarkBaker [CodePlex #2883](https://phpexcel.codeplex.com/workitem/2883)\n- Active sheet index not read/saved - @MarkBaker [CodePlex #2513](https://phpexcel.codeplex.com/workitem/2513)\n- Print and print preview of generated XLSX causes Excel2007 to crash - @MarkBaker [CodePlex #2935](https://phpexcel.codeplex.com/workitem/2935)\n- Error in Calculations - COUNT() function - @MarkBaker [CodePlex #2952](https://phpexcel.codeplex.com/workitem/2952)\n- HTML and CSV writer not writing last row - @MarkBaker [CodePlex #3002](https://phpexcel.codeplex.com/workitem/3002)\n- Memory leak in Excel5 writer - @MarkBaker [CodePlex #3017](https://phpexcel.codeplex.com/workitem/3017)\n- Printing (PHPExcel_Writer_Excel5) - @MarkBaker [CodePlex #3044](https://phpexcel.codeplex.com/workitem/3044)\n- Problems reading zip:// - @MarkBaker [CodePlex #3046](https://phpexcel.codeplex.com/workitem/3046)\n- Error reading conditional formatting - @MarkBaker [CodePlex #3047](https://phpexcel.codeplex.com/workitem/3047)\n- Bug in Excel5 writer (storePanes) - @MarkBaker [CodePlex #3067](https://phpexcel.codeplex.com/workitem/3067)\n- Memory leak in PHPExcel_Style_Color - @MarkBaker [CodePlex #3077](https://phpexcel.codeplex.com/workitem/3077)\n\n## [1.4.0] - 2007-07-23\n\n### General\n\n- Coding convention / code cleanup - @MarkBaker [CodePlex #2687](https://phpexcel.codeplex.com/workitem/2687)\n- Use set_include_path in tests - @MarkBaker [CodePlex #2717](https://phpexcel.codeplex.com/workitem/2717)\n\n### Features\n\n- Move PHPExcel_Writer_Excel5 OLE to PHPExcel_Shared_OLE - @MarkBaker [CodePlex #2812](https://phpexcel.codeplex.com/workitem/2812)\n- Hide/Unhide Column or Row - @MarkBaker [CodePlex #2679](https://phpexcel.codeplex.com/workitem/2679)\n- Implement multi-cell styling - @MarkBaker [CodePlex #2271](https://phpexcel.codeplex.com/workitem/2271)\n- Implement CSV file format (reader/writer) - @MarkBaker [CodePlex #2720](https://phpexcel.codeplex.com/workitem/2720)\n\n### Bugfixes\n\n- Implement HTML file format - @MarkBaker [CodePlex #2845](https://phpexcel.codeplex.com/workitem/2845)\n- Active sheet index not read/saved - @MarkBaker [CodePlex #2513](https://phpexcel.codeplex.com/workitem/2513)\n- Freeze Panes with PHPExcel_Writer_Excel5 - @MarkBaker [CodePlex #2678](https://phpexcel.codeplex.com/workitem/2678)\n- OLE.php - @MarkBaker [CodePlex #2680](https://phpexcel.codeplex.com/workitem/2680)\n- Copy and pasting multiple drop-down list cells breaks reader - @MarkBaker [CodePlex #2736](https://phpexcel.codeplex.com/workitem/2736)\n- Function setAutoFilterByColumnAndRow takes wrong arguments - @MarkBaker [CodePlex #2775](https://phpexcel.codeplex.com/workitem/2775)\n- Simplexml_load_file fails on ZipArchive - @MarkBaker [CodePlex #2858](https://phpexcel.codeplex.com/workitem/2858)\n\n## [1.3.5] - 2007-06-27\n\n### Features\n\n- Documentation - @MarkBaker [CodePlex #15](https://phpexcel.codeplex.com/workitem/15)\n- PHPExcel_Writer_Excel5 - @JV\n- PHPExcel_Reader_Excel2007: Image shadows - @JV\n- Data validation - @MarkBaker [CodePlex #2385](https://phpexcel.codeplex.com/workitem/2385)\n\n### Bugfixes\n\n- Implement richtext strings - @MarkBaker\n- Empty relations when adding image to any sheet but the first one - @MarkBaker [CodePlex #2443](https://phpexcel.codeplex.com/workitem/2443)\n- Excel2007 crashes on print preview - @MarkBaker [CodePlex #2536](https://phpexcel.codeplex.com/workitem/2536)\n\n## [1.3.0] - 2007-06-05\n\n### General\n\n- Create PEAR package - @MarkBaker [CodePlex #1942](https://phpexcel.codeplex.com/workitem/1942)\n\n### Features\n\n- Replace *->duplicate() by __clone() - @MarkBaker [CodePlex #2331](https://phpexcel.codeplex.com/workitem/2331)\n- PHPExcel_Reader_Excel2007: Column auto-size, Protection, Merged cells, Wrap text, Page breaks, Auto filter, Images - @JV\n- Implement \"freezing\" panes - @MarkBaker [CodePlex #245](https://phpexcel.codeplex.com/workitem/245)\n- Cell addressing alternative - @MarkBaker [CodePlex #2273](https://phpexcel.codeplex.com/workitem/2273)\n- Implement cell word-wrap attribute - @MarkBaker [CodePlex #2270](https://phpexcel.codeplex.com/workitem/2270)\n- Auto-size column - @MarkBaker [CodePlex #2282](https://phpexcel.codeplex.com/workitem/2282)\n- Implement formula calculation - @MarkBaker [CodePlex #241](https://phpexcel.codeplex.com/workitem/241)\n\n### Bugfixes\n\n- Insert/remove row/column - @MarkBaker [CodePlex #2375](https://phpexcel.codeplex.com/workitem/2375)\n- PHPExcel_Worksheet::getCell() should not accept absolute coordinates - @MarkBaker [CodePlex #1931](https://phpexcel.codeplex.com/workitem/1931)\n- Cell reference without row number - @MarkBaker [CodePlex #2272](https://phpexcel.codeplex.com/workitem/2272)\n- Styles with same coordinate but different worksheet - @MarkBaker [CodePlex #2276](https://phpexcel.codeplex.com/workitem/2276)\n- PHPExcel_Worksheet->getCellCollection() usort error - @MarkBaker [CodePlex #2290](https://phpexcel.codeplex.com/workitem/2290)\n- Bug in PHPExcel_Cell::stringFromColumnIndex - @SS [CodePlex #2353](https://phpexcel.codeplex.com/workitem/2353)\n- Reader: numFmts can be missing, use cellStyleXfs instead of cellXfs in styles - @JV [CodePlex #2353](https://phpexcel.codeplex.com/workitem/2353)\n\n## [1.2.0] - 2007-04-26\n\n### General\n\n- Stringtable attribute \"count\" not necessary, provides wrong info to Excel sometimes... - @MarkBaker\n- Updated tests to address more document properties - @MarkBaker\n- Some refactoring in PHPExcel_Writer_Excel2007_Workbook - @MarkBaker\n- New package: PHPExcel_Shared - @MarkBaker\n- Password hashing algorithm implemented in PHPExcel_Shared_PasswordHasher - @MarkBaker\n- Moved pixel conversion functions to PHPExcel_Shared_Drawing - @MarkBaker\n- Switch over to LGPL license - @MarkBaker [CodePlex #244](https://phpexcel.codeplex.com/workitem/244)\n\n### Features\n\n- Include PHPExcel version in file headers - @MarkBaker [CodePlex #5](https://phpexcel.codeplex.com/workitem/5)\n- Autofilter - @MarkBaker [CodePlex #6](https://phpexcel.codeplex.com/workitem/6)\n- Extra document property: keywords - @MarkBaker [CodePlex #7](https://phpexcel.codeplex.com/workitem/7)\n- Extra document property: category - @MarkBaker [CodePlex #8](https://phpexcel.codeplex.com/workitem/8)\n- Document security - @MarkBaker [CodePlex #9](https://phpexcel.codeplex.com/workitem/9)\n- PHPExcel_Writer_Serialized and PHPExcel_Reader_Serialized - @MarkBaker [CodePlex #10](https://phpexcel.codeplex.com/workitem/10)\n- Alternative syntax: Addressing a cell - @MarkBaker [CodePlex #11](https://phpexcel.codeplex.com/workitem/11)\n- Merge cells - @MarkBaker [CodePlex #12](https://phpexcel.codeplex.com/workitem/12)\n\n### Bugfixes\n\n- Protect ranges of cells with a password - @MarkBaker [CodePlex #13](https://phpexcel.codeplex.com/workitem/13)\n- (style/fill/patternFill/fgColor or bgColor can be empty) - @JV [CodePlex #14](https://phpexcel.codeplex.com/workitem/14)\n\n## [1.1.1] - 2007-03-26\n\n### General\n\n- Syntax error in \"Classes/PHPExcel/Writer/Excel2007.php\" on line 243 - @MarkBaker [CodePlex #1250](https://phpexcel.codeplex.com/workitem/1250)\n- Reader should check if file exists and throws an exception when it doesn't - @MarkBaker [CodePlex #1282](https://phpexcel.codeplex.com/workitem/1282)\n\n## [1.1.0] - 2007-03-22\n\n### Bugfixes\n\n- Style information lost after passing trough Excel2007_Reader - @MarkBaker [CodePlex #836](https://phpexcel.codeplex.com/workitem/836)\n\n### General\n\n- Number of columns > AZ fails fixed in PHPExcel_Cell::columnIndexFromString - @MarkBaker [CodePlex #913](https://phpexcel.codeplex.com/workitem/913)\n\n### Features\n\n- Added a brief file with installation instructions - @MarkBaker\n- Page breaks (horizontal and vertical) - @MarkBaker\n- Image shadows - @MarkBaker\n\n## [1.0.0] - 2007-02-22\n\n### Bugfixes\n\n- PHPExcel->removeSheetByIndex now re-orders sheets after deletion, so no array indexes are lost - @JV\n- PHPExcel_Writer_Excel2007_Worksheet::_writeCols() used direct assignment to $pSheet->getColumnDimension('A')->Width instead of $pSheet->getColumnDimension('A')->setWidth() - @JV\n- DocumentProperties used $this->LastModifiedBy instead of $this->_lastModifiedBy. - @JV\n\n### General\n\n- Only first = should be removed when writing formula in PHPExcel_Writer_Excel2007_Worksheet. - @JV\n- Consistency of method names to camelCase - @JV\n- Updated tests to match consistency changes - @JV\n- Detection of mime-types now with image_type_to_mime_type() - @JV\n- Constants now hold string value used in Excel 2007 - @JV\n\n### Features\n\n- Fixed folder name case (WorkSheet -> Worksheet) - @MarkBaker\n- PHPExcel classes (not the Writer classes) can be duplicated, using a duplicate() method. - @MarkBaker\n- Cell styles can now be duplicated to a range of cells using PHPExcel_Worksheet->duplicateStyle() - @MarkBaker\n- Conditional formatting - @MarkBaker\n- Reader for Excel 2007 (not supporting full specification yet!) - @JV\n\n## [1.0.0 RC] - 2007-01-31\n\n- Project name has been changed to PHPExcel\n- Project homepage is now http://www.codeplex.com/PHPExcel\n- Started versioning at number: PHPExcel 1.0.0 RC\n\n## 2007-01-22\n\n- Fixed some performance issues on large-scale worksheets (mainly loops vs. indexed arrays)\n- Performance on creating StringTable has been increased\n- Performance on writing Excel2007 worksheet has been increased\n\n## 2007-01-18\n\n- Images can now be rotated\n- Fixed bug: When drawings have full path specified, no mime type can be deducted\n- Fixed bug: Only one drawing can be added to a worksheet\n\n## 2007-01-12\n\n- Refactoring of some classes to use ArrayObject instead of array()\n- Cell style now has support for number format (i.e. #,##0)\n- Implemented embedding images\n\n## 2007-01-02\n\n- Cell style now has support for fills, including gradient fills\n- Cell style now has support for fonts\n- Cell style now has support for border colors\n- Cell style now has support for font colors\n- Cell style now has support for alignment\n\n## 2006-12-21\n\n- Support for cell style borders\n- Support for cell styles\n- Refactoring of Excel2007 Writer into multiple classes in package SpreadSheet_Writer_Excel2007\n- Refactoring of all classes, changed public members to public properties using getter/setter\n- Worksheet names are now unique. On duplicate worksheet names, a number is appended.\n- Worksheet now has parent SpreadSheet object\n- Worksheet now has support for page header and footer\n- Worksheet now has support for page margins\n- Worksheet now has support for page setup (only Paper size and Orientation)\n- Worksheet properties now accessible by using getProperties()\n- Worksheet now has support for row and column dimensions (height / width)\n- Exceptions thrown have a more clear description\n\n## Initial version\n\n- Create a Spreadsheet object\n- Add one or more Worksheet objects\n- Add cells to Worksheet objects\n- Export Spreadsheet object to Excel 2007 OpenXML format\n- Each cell supports the following data formats: string, number, formula, boolean.\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com)\nand this project adheres to [Semantic Versioning](https://semver.org). Thia is always true of the master branch. Some earlier branches remain supported and security fixes are applied to them; if the security fix represents a breaking change, it may have to be applied as a minor or patch version.\n\n## TBD - 5.6.0\n\n### Added\n\n- Nothing yet.\n\n### Removed\n\n- Nothing yet.\n\n### Changed\n\n- Nothing yet.\n\n### Moved\n\n- Nothing yet.\n\n### Deprecated\n\n- Collection/Cells::MAX_COLUMN_ID - use Cell/AddressRange::MAX_COLUMN_INT.\n- Writer/Xls/Worksheet constants MAX_XLS_COLUMN, MAX_XLS_COLUMN_STRING, MAX_XLS_ROW - use Cell/AddressRange MAX_COLUMN_INT_XLS, MAX_COLUMN_XLS, MAX_ROW_XLS\n\n### Fixed\n\n- Consistent handling of row and column limits. [PR #4820](https://github.com/PHPOffice/PhpSpreadsheet/pull/4820)\n\n## 2026-02-28 - 5.5.0\n\n### Added\n\n- Much improved handling of Styles by Ods Reader. The relevant changes are listed at the end of the \"Fixed\" section below.\n- Option to use OldCalculatedValue in ToArray and Relatives. [Issue #1810](https://github.com/PHPOffice/PhpSpreadsheet/issues/1810) [PR #4787](https://github.com/PHPOffice/PhpSpreadsheet/pull/4787)\n- Add checkbox style (Xlsx and Html). [PR #4781](https://github.com/PHPOffice/PhpSpreadsheet/pull/4781)\n- Option to whitelist external images. [PR #4793](https://github.com/PHPOffice/PhpSpreadsheet/pull/4793)\n- Writer/Html add ability to set line ending. [PR #4779](https://github.com/PHPOffice/PhpSpreadsheet/pull/4779)\n- Writer/Html optionally save formulas as data attributes. [PR #4783](https://github.com/PHPOffice/PhpSpreadsheet/pull/4783)\n- User-supplied headers and footers in PDF. [Issue #3159](https://github.com/PHPOffice/PhpSpreadsheet/issues/3159) [PR #4789](https://github.com/PHPOffice/PhpSpreadsheet/pull/4789)\n\n### Deprecated\n\n- Writer/Html constant BODY_LINE no longer makes sense with a configurable line ending. No replacement.\n- Calculation classes FormulaParser and FormulaToken are unused. No replacement.\n- Writer/Xls/Worksheet methods insertBitMap, positionImage, writeObjPicture, processBitmapGd, and processBitmap are unused. No replacement.\n\n### Fixed\n\n- Improve performance in value binders. [PR #4780](https://github.com/PHPOffice/PhpSpreadsheet/pull/4780)\n- Handle Unions as Function Arguments. [Issue #4656](https://github.com/PHPOffice/PhpSpreadsheet/issues/4656) [Issue #316](https://github.com/PHPOffice/PhpSpreadsheet/issues/316) [Issue #503](https://github.com/PHPOffice/PhpSpreadsheet/issues/503) [PR #4657](https://github.com/PHPOffice/PhpSpreadsheet/pull/4657)\n- Unexpected Behavior of CONCATENATE. [Issue #4061](https://github.com/PHPOffice/PhpSpreadsheet/issues/4061) [PR #4797](https://github.com/PHPOffice/PhpSpreadsheet/pull/4797)\n- Image Css size in millimeters. [Issue #4800](https://github.com/PHPOffice/PhpSpreadsheet/issues/4800) [PR #4801](https://github.com/PHPOffice/PhpSpreadsheet/pull/4801)\n- Ods Reader column misalignment. [Issue #4802](https://github.com/PHPOffice/PhpSpreadsheet/issues/4802) [PR #4803](https://github.com/PHPOffice/PhpSpreadsheet/pull/4803)\n- Ods improved handling of number formats. [Issue #3961](https://github.com/PHPOffice/PhpSpreadsheet/issues/3961) [Issue #4798](https://github.com/PHPOffice/PhpSpreadsheet/issues/4798) [PR #4806](https://github.com/PHPOffice/PhpSpreadsheet/pull/4806)\n- Ods Reader fonts and fills. [Issue #2622](https://github.com/PHPOffice/PhpSpreadsheet/issues/2622) [Issue #1191](https://github.com/PHPOffice/PhpSpreadsheet/issues/1191) [PR #4810](https://github.com/PHPOffice/PhpSpreadsheet/pull/4810)\n- Ods Reader alignment and cell protection. [PR #4813](https://github.com/PHPOffice/PhpSpreadsheet/pull/4813)\n- Ods Reader borders. [PR #4814](https://github.com/PHPOffice/PhpSpreadsheet/pull/4814)\n- Ods Reader column styles (partial). [PR #4815](https://github.com/PHPOffice/PhpSpreadsheet/pull/4815)\n\n## 2026-01-10 - 5.4.0\n\n### Added\n\n- Store image in cell (Xlsx only). [Issue #4014](https://github.com/PHPOffice/PhpSpreadsheet/issues/4014) [Issue #4034](https://github.com/PHPOffice/PhpSpreadsheet/issues/4034) [Issue #913](https://github.com/PHPOffice/PhpSpreadsheet/issues/913) [PR #4677](https://github.com/PHPOffice/PhpSpreadsheet/pull/4677)\n- Passthrough support (with some restrictions) for otherwise unsupported drawing elements. [Issue #4037](https://github.com/PHPOffice/PhpSpreadsheet/issues/4037) [Issue #4704](https://github.com/PHPOffice/PhpSpreadsheet/issues/4704) [PR #4712](https://github.com/PHPOffice/PhpSpreadsheet/pull/4712)\n- Set all locale variables at once in a threadsafe manner. [Issue #954](https://github.com/PHPOffice/PhpSpreadsheet/issues/954) [PR #4760](https://github.com/PHPOffice/PhpSpreadsheet/pull/4760)\n- Reader/Html add ability to suppress warning messages from loadhtml. [Issue #647](https://github.com/PHPOffice/PhpSpreadsheet/issues/647) [Issue #849](https://github.com/PHPOffice/PhpSpreadsheet/issues/849) [PR #4761](https://github.com/PHPOffice/PhpSpreadsheet/pull/4761)\n\n### Changed\n\n- Evaluation of WEBSERVICE no longer requires external client, but will use oldCalculatedValue unless the request is for a domain in a user-supplied whitelist. [PR #4751](https://github.com/PHPOffice/PhpSpreadsheet/pull/4751)\n\n### Moved\n\n- Code to merge cell base style with table and conditional styles moved from Html Writer to its own class. [Issue #1058](https://github.com/PHPOffice/PhpSpreadsheet/issues/1058) [PR #4763](https://github.com/PHPOffice/PhpSpreadsheet/pull/4763)\n\n### Deprecated\n\n- Settings methods setHttpClient, unsetHttpClient, getHttpClient, and getRequestFactory are no longer used. No replacement.\n- Reader/Html protected property dataArray, described as used only for testing, is not used for testing. No replacement.\n\n### Fixed\n\n- Slightly better support for escaped characters in Xlsx Reader/Writer. [Discussion #4724](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4724) [PR #4726](https://github.com/PHPOffice/PhpSpreadsheet/pull/4726)\n- CODE/UNICODE and CHAR/UNICHAR. [PR #4727](https://github.com/PHPOffice/PhpSpreadsheet/pull/4727)\n- Minor changes to TextGrid. [PR #4735](https://github.com/PHPOffice/PhpSpreadsheet/pull/4735) [PR #4743](https://github.com/PHPOffice/PhpSpreadsheet/pull/4743)\n- Single-character table names. [Issue #4739](https://github.com/PHPOffice/PhpSpreadsheet/issues/4739) [PR #4740](https://github.com/PHPOffice/PhpSpreadsheet/pull/4740)\n- Improvements to SORT and SORTBY. [PR #4743](https://github.com/PHPOffice/PhpSpreadsheet/pull/4743)\n- Coverage-related changes in Shared. [PR #4745](https://github.com/PHPOffice/PhpSpreadsheet/pull/4745)\n- ListWorksheetInfo improvements for Xlsx and Ods. [Issue #3255](https://github.com/PHPOffice/PhpSpreadsheet/issues/3255) [PR #4746](https://github.com/PHPOffice/PhpSpreadsheet/pull/4746)\n- Fix functions related to Student-T distribution. [Issue #4167](https://github.com/PHPOffice/PhpSpreadsheet/issues/4167) [PR #4748](https://github.com/PHPOffice/PhpSpreadsheet/pull/4748)\n- Fix drawing hyperlinks. [Issue #993](https://github.com/PHPOffice/PhpSpreadsheet/issues/993) [PR #4764](https://github.com/PHPOffice/PhpSpreadsheet/pull/4764)\n- Fix clone spreadsheet with defined names. [PR #4753](https://github.com/PHPOffice/PhpSpreadsheet/pull/4753)\n- Changes to WEBSERVICE. [PR #4751](https://github.com/PHPOffice/PhpSpreadsheet/pull/4751)\n- More consistent handling of unsupported functions. [Issue #606](https://github.com/PHPOffice/PhpSpreadsheet/issues/606) [PR #4772](https://github.com/PHPOffice/PhpSpreadsheet/pull/4772)\n- Chart shadow `kx` and `ky`. [PR #4770](https://github.com/PHPOffice/PhpSpreadsheet/pull/4770)\n- SUBTOTAL and hidden rows. [Issue #820](https://github.com/PHPOffice/PhpSpreadsheet/issues/820) [PR #4765](https://github.com/PHPOffice/PhpSpreadsheet/pull/4765)\n- Fix some hyperlink problems. [Issue #3889](https://github.com/PHPOffice/PhpSpreadsheet/issues/3889) [Issue #2464](https://github.com/PHPOffice/PhpSpreadsheet/issues/2464) [PR #4771](https://github.com/PHPOffice/PhpSpreadsheet/pull/4771)\n- Xls Writer and empty RichText. [Issue #918](https://github.com/PHPOffice/PhpSpreadsheet/issues/918) [PR #4769](https://github.com/PHPOffice/PhpSpreadsheet/pull/4769)\n- Strings that look like huge floating-point numbers. [Issue #4766](https://github.com/PHPOffice/PhpSpreadsheet/issues/4766) [PR #4768](https://github.com/PHPOffice/PhpSpreadsheet/pull/4768)\n- Rowspan in Html. [Issue #1319](https://github.com/PHPOffice/PhpSpreadsheet/issues/1319) [PR #4767](https://github.com/PHPOffice/PhpSpreadsheet/pull/4767)\n- Mpdf styling of multi-line strings. [Issue #4773](https://github.com/PHPOffice/PhpSpreadsheet/issues/4773) [PR #4775](https://github.com/PHPOffice/PhpSpreadsheet/pull/4775)\n\n## 2025-11-24 - 5.3.0\n\n### Added\n\n- Formal support for Php8.5.\n- Limited Printarea support for Html/Pdf. [Issue #3941](https://github.com/PHPOffice/PhpSpreadsheet/issues/3941) [PR #4711](https://github.com/PHPOffice/PhpSpreadsheet/pull/4711)\n- Implement missing `INFO` function. [PR #4709](https://github.com/PHPOffice/PhpSpreadsheet/pull/4709)\n- Implement missing `BAHTTEXT` function. [PR #4715](https://github.com/PHPOffice/PhpSpreadsheet/pull/4715)\n\n### Deprecated\n\n- $dataType, the second parameter of Cell::setValueExplicit, is currently optional. Omitting it is deprecated, and it will be required in a future release.\n\n### Fixed\n\n- Protected ranges and insert/delete rows/columns. [Issue #4695](https://github.com/PHPOffice/PhpSpreadsheet/issues/4695) [PR #4702](https://github.com/PHPOffice/PhpSpreadsheet/pull/4702)\n- Unexpected Exception in Php DateTime. [Issue #4696](https://github.com/PHPOffice/PhpSpreadsheet/issues/4696) [Issue #917](https://github.com/PHPOffice/PhpSpreadsheet/issues/917) [PR #4697](https://github.com/PHPOffice/PhpSpreadsheet/pull/4697)\n- Add missing Dutch translation to translation file. [PR #4707](https://github.com/PHPOffice/PhpSpreadsheet/pull/4707)\n- Fix lots of typos throughout codebase. [PR #4705](https://github.com/PHPOffice/PhpSpreadsheet/pull/4705)\n- Apply small code style improvements. [PR #4708](https://github.com/PHPOffice/PhpSpreadsheet/pull/4708)\n\n## 2025-10-25 - 5.2.0\n\n### Added\n\n- This release should be usable with Php8.5 Release Candidates without deprecation messages.\n- Option to display numbers with less precision. [Issue #4626](https://github.com/PHPOffice/PhpSpreadsheet/issues/4626) [PR #4640](https://github.com/PHPOffice/PhpSpreadsheet/pull/4640)\n- Offer Tcpdf Interface which throws exception rather than die. [PR #4666](https://github.com/PHPOffice/PhpSpreadsheet/pull/4666)\n- Xls Reader ListWorksheetDimensions method. [PR #4689](https://github.com/PHPOffice/PhpSpreadsheet/pull/4689)\n\n### Deprecated\n\n- Worksheet::getHashInt serves no useful purpose. No replacement.\n- Spreadsheet::getId serves no useful purpose. No replacement.\n\n### Fixed\n\n- Performance improvement when working with large amounts of cells. [Issue #4607](https://github.com/PHPOffice/PhpSpreadsheet/issues/4607) [PR #4609](https://github.com/PHPOffice/PhpSpreadsheet/pull/4609)\n- Minor improvements to Calculation coverage. [PR #4624](https://github.com/PHPOffice/PhpSpreadsheet/pull/4624)\n- Conditional formatting in extLst. [Issue #4629](https://github.com/PHPOffice/PhpSpreadsheet/issues/4629) [PR #4633](https://github.com/PHPOffice/PhpSpreadsheet/pull/4633)\n- Php8.5 deprecates use of null as array index. [PR #4634](https://github.com/PHPOffice/PhpSpreadsheet/pull/4634)\n- Wrapped cells and default row height. [Issue #4584](https://github.com/PHPOffice/PhpSpreadsheet/issues/4584) [PR #4645](https://github.com/PHPOffice/PhpSpreadsheet/pull/4645)\n- For Php8.5, replace one of our two uses of `__wakeup` with `__unserialize`, and eliminate the other. [PR #4639](https://github.com/PHPOffice/PhpSpreadsheet/pull/4639)\n- Use prefix _xlfn for BASE function. [Issue #4638](https://github.com/PHPOffice/PhpSpreadsheet/issues/4638) [PR #4641](https://github.com/PHPOffice/PhpSpreadsheet/pull/4641)\n- Warning messages with corrupt Xls file. [Issue #4647](https://github.com/PHPOffice/PhpSpreadsheet/issues/4647) [PR #4648](https://github.com/PHPOffice/PhpSpreadsheet/pull/4648)\n- Additional support for union and intersection. [PR #4596](https://github.com/PHPOffice/PhpSpreadsheet/pull/4596)\n- Missing array keys x,o,v for Xml Reader. [Issue #4668](https://github.com/PHPOffice/PhpSpreadsheet/issues/4668) [PR #4669](https://github.com/PHPOffice/PhpSpreadsheet/pull/4669)\n- Missing array key x for Xlsx Reader VML. [Issue #4505](https://github.com/PHPOffice/PhpSpreadsheet/issues/4505) [PR #4676](https://github.com/PHPOffice/PhpSpreadsheet/pull/4676)\n- Better support for Style Alignment Read Order. [Issue #850](https://github.com/PHPOffice/PhpSpreadsheet/issues/850) [PR #4655](https://github.com/PHPOffice/PhpSpreadsheet/pull/4655)\n- More sophisticated workbook password algorithms (Xlsx only). [Issue #4673](https://github.com/PHPOffice/PhpSpreadsheet/issues/4673) [PR #4675](https://github.com/PHPOffice/PhpSpreadsheet/pull/4675)\n- Xls Writer fix DIMENSIONS record. [Issue #4682](https://github.com/PHPOffice/PhpSpreadsheet/issues/4682) [PR #4687](https://github.com/PHPOffice/PhpSpreadsheet/pull/4687)\n- Xls Reader listWorksheetInfo process MULRK records. [PR #4689](https://github.com/PHPOffice/PhpSpreadsheet/pull/4689)\n- Make Reader Xls Escher generic. [PR #4690](https://github.com/PHPOffice/PhpSpreadsheet/pull/4690)\n\n## 2025-09-03 - 5.1.0\n\n### Added\n\n- Add Conditional Formatting with IconSet (Xlsx only). [Issue #4560](https://github.com/PHPOffice/PhpSpreadsheet/issues/4560) [PR #4574](https://github.com/PHPOffice/PhpSpreadsheet/pull/4574)\n- Copy cell adjusting formula. [Issue #1203](https://github.com/PHPOffice/PhpSpreadsheet/issues/1203) [PR #4577](https://github.com/PHPOffice/PhpSpreadsheet/pull/4577)\n- splitRange and ProtectedRange. [Issue #1457](https://github.com/PHPOffice/PhpSpreadsheet/issues/1457) [PR #4580](https://github.com/PHPOffice/PhpSpreadsheet/pull/4580)\n- Option to create Blank Sheet if LoadSheetsOnly doesn't find any. [PR #4618](https://github.com/PHPOffice/PhpSpreadsheet/pull/4618)\n\n### Fixed\n\n- Google-only formulas exported from Google Sheets. [Issue #1637](https://github.com/PHPOffice/PhpSpreadsheet/issues/1637) [PR #4579](https://github.com/PHPOffice/PhpSpreadsheet/pull/4579)\n- Maximum column width. [PR #4581](https://github.com/PHPOffice/PhpSpreadsheet/pull/4581)\n- PrintArea after row/column delete. [Issue #2912](https://github.com/PHPOffice/PhpSpreadsheet/issues/2912) [PR #4598](https://github.com/PHPOffice/PhpSpreadsheet/pull/4598)\n- Remove deprecated imagedestroy call. [PR #4625](https://github.com/PHPOffice/PhpSpreadsheet/pull/4625)\n- Excel 2007 problem with newlines. [Issue #4619](https://github.com/PHPOffice/PhpSpreadsheet/issues/4619) [PR #4620](https://github.com/PHPOffice/PhpSpreadsheet/pull/4620)\n- Compatibility changes for Php 8.5. [PR #4601](https://github.com/PHPOffice/PhpSpreadsheet/pull/4601) [PR #4611](https://github.com/PHPOffice/PhpSpreadsheet/pull/4611)\n\n## 2025-08-10 - 5.0.0\n\n### Breaking Changes\n\n- Images will be loaded from an external source (e.g. http://example.com/img.png) only if the reader is explicitly set to allow it via `$reader->setAllowExternalImages(true)`. We do not believe that loading of external images is a widely used feature.\n- Deletion of items deprecated in Release 4. See \"removed\" below.\n- Move some properties from Base Reader to Html Reader. [PR #4551](https://github.com/PHPOffice/PhpSpreadsheet/pull/4551)\n- DefaultValueBinder will treat integers with more than 15 digits as strings. [Issue #4522](https://github.com/PHPOffice/PhpSpreadsheet/issues/4522) [PR #4527](https://github.com/PHPOffice/PhpSpreadsheet/pull/4527)\n\n### Removed\n\n- Theme public constants COLOR_SCHEME_2013_PLUS_NAME (use COLOR_SCHEME_2013_2022_NAME) and COLOR_SCHEME_2013_PLUS (use COLOR_SCHEME_2013_2022).\n\n### Fixed\n\n- Additional floating-point precision changes. [Issue #1324](https://github.com/PHPOffice/PhpSpreadsheet/issues/1324) [PR #4575](https://github.com/PHPOffice/PhpSpreadsheet/pull/4575)\n- Header/Footer images expand location. [Issue #484](https://github.com/PHPOffice/PhpSpreadsheet/issues/484) [Issue #1318](https://github.com/PHPOffice/PhpSpreadsheet/issues/1318) [PR #4572](https://github.com/PHPOffice/PhpSpreadsheet/pull/4572)\n- Create uninitialized cell if used in calculation. [Issue #4558](https://github.com/PHPOffice/PhpSpreadsheet/issues/4558) [Issue #4530](https://github.com/PHPOffice/PhpSpreadsheet/issues/4530) [PR #4565](https://github.com/PHPOffice/PhpSpreadsheet/pull/4565)\n- Shared/Date::isDateTime handle cells which calculate as arrays. [Issue #4557](https://github.com/PHPOffice/PhpSpreadsheet/issues/4557) [PR #4562](https://github.com/PHPOffice/PhpSpreadsheet/pull/4562)\n- Xlsx Writer eliminate xml:space from non-text nodes. [Issue #4542](https://github.com/PHPOffice/PhpSpreadsheet/issues/4542) [PR #4556](https://github.com/PHPOffice/PhpSpreadsheet/pull/4556)\n\n## 2025-07-23 - 4.5.0\n\n### Added\n\n- Add to all readers the option to allow or forbid fetching external images. This is unconditionally allowed now. The default will be set to \"allow\", so no code changes are necessary. However, we are giving consideration to changing the default. [PR #4543](https://github.com/PHPOffice/PhpSpreadsheet/pull/4543)\n- Address Excel Inappropriate Number Format Substitution. [PR #4532](https://github.com/PHPOffice/PhpSpreadsheet/pull/4532)\n\n### Fixed\n\n- Html Writer Conditional Formatting Inline Css. [Issue #4539](https://github.com/PHPOffice/PhpSpreadsheet/issues/4539) [PR #4541](https://github.com/PHPOffice/PhpSpreadsheet/pull/4541)\n- Do not use htmlspecialchars when formatting XML. [Issue #4537](https://github.com/PHPOffice/PhpSpreadsheet/issues/4537) [PR #4540](https://github.com/PHPOffice/PhpSpreadsheet/pull/4540)\n- Writer Html/Pdf support RTL alignment of tables. [Issue #1104](https://github.com/PHPOffice/PhpSpreadsheet/issues/1104) [PR #4535](https://github.com/PHPOffice/PhpSpreadsheet/pull/4535)\n- Xlsx Reader use dynamic arrays if spreadsheet did so. [PR #4533](https://github.com/PHPOffice/PhpSpreadsheet/pull/4533)\n- Ods Reader Nested table-row. [Issue #4528](https://github.com/PHPOffice/PhpSpreadsheet/issues/4528) [Issue #2507](https://github.com/PHPOffice/PhpSpreadsheet/issues/2507) [PR #4531](https://github.com/PHPOffice/PhpSpreadsheet/pull/4531)\n- Recognize application/x-empty mimetype. [Issue #4521](https://github.com/PHPOffice/PhpSpreadsheet/issues/4521) [PR #4524](https://github.com/PHPOffice/PhpSpreadsheet/pull/4524)\n- Micro-optimization in getSheetByName. [PR #4499](https://github.com/PHPOffice/PhpSpreadsheet/pull/4499)\n- Bug in resizeMatricesExtend. [Issue #4451](https://github.com/PHPOffice/PhpSpreadsheet/issues/4451) [PR #4474](https://github.com/PHPOffice/PhpSpreadsheet/pull/4474)\n- Allow Replace of Dummy Function with Custom Function. [PR #4544](https://github.com/PHPOffice/PhpSpreadsheet/pull/4544)\n- Preserve 0x0a in Strings if Desired. [Issue #347](https://github.com/PHPOffice/PhpSpreadsheet/issues/347) [PR #4536](https://github.com/PHPOffice/PhpSpreadsheet/pull/4536)\n\n## 2025-06-22 - 4.4.0\n\n### Added\n\n- VSTACK and HSTACK. [Issue #4485](https://github.com/PHPOffice/PhpSpreadsheet/issues/4485) [PR #4492](https://github.com/PHPOffice/PhpSpreadsheet/pull/4492)\n- TOCOL and TOROW. [PR #4493](https://github.com/PHPOffice/PhpSpreadsheet/pull/4493)\n- Support Current Office Theme. [PR #4500](https://github.com/PHPOffice/PhpSpreadsheet/pull/4500)\n\n### Deprecated\n\n- Theme constants COLOR_SCHEME_2013_PLUS_NAME (use COLOR_SCHEME_2013_2022_NAME) and COLOR_SCHEME_2013_PLUS (use COLOR_SCHEME_2013_2022).\n\n### Fixed\n\n- Various Writers RichText TextElement Should Inherit Cell Style. [Issue #1154](https://github.com/PHPOffice/PhpSpreadsheet/issues/1154) [PR #4487](https://github.com/PHPOffice/PhpSpreadsheet/pull/4487)\n- Minor Changes to FILTER function. [PR #4491](https://github.com/PHPOffice/PhpSpreadsheet/pull/4491)\n- Allow Xlsx Reader/Writer to support Font Charset. [Issue #2760](https://github.com/PHPOffice/PhpSpreadsheet/issues/2760) [PR #4501](https://github.com/PHPOffice/PhpSpreadsheet/pull/4501)\n- AutoColor for LibreOffice Dark Mode [Discussion 4502](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4502) [PR #4503](https://github.com/PHPOffice/PhpSpreadsheet/pull/4503)\n- Xlsx Style Writer Minor Refactoring. [PR #4508](https://github.com/PHPOffice/PhpSpreadsheet/pull/4508)\n- Allow Xlsx Reader to Specify ParseHuge. [Issue #4260](https://github.com/PHPOffice/PhpSpreadsheet/issues/4260) [PR #4515](https://github.com/PHPOffice/PhpSpreadsheet/pull/4515)\n\n## 2025-05-26 - 4.3.1\n\n### Fixed\n\n- Regression in Date::stringToExcel. [Issue #4488](https://github.com/PHPOffice/PhpSpreadsheet/issues/4488) [PR #4489](https://github.com/PHPOffice/PhpSpreadsheet/pull/4489)\n\n## 2025-05-25 - 4.3.0\n\n### Added\n\n- Xml Reader recognize indents. [Issue #4448](https://github.com/PHPOffice/PhpSpreadsheet/issues/4448) [PR #4449](https://github.com/PHPOffice/PhpSpreadsheet/pull/4449)\n\n### Changed\n\n- Phpstan Level 10.\n\n### Fixed\n\n- Micro-optimization for excelToDateTimeObject. [Issue #4438](https://github.com/PHPOffice/PhpSpreadsheet/issues/4438) [PR #4442](https://github.com/PHPOffice/PhpSpreadsheet/pull/4442)\n- Removing Columns/Rows Containing Merged Cells. [Issue #282](https://github.com/PHPOffice/PhpSpreadsheet/issues/282) [PR #4465](https://github.com/PHPOffice/PhpSpreadsheet/pull/4465)\n- Print Area and Row Break. [Issue #1275](https://github.com/PHPOffice/PhpSpreadsheet/issues/1275) [PR #4450](https://github.com/PHPOffice/PhpSpreadsheet/pull/4450)\n- Copy Styles after insertNewColumnBefore. [Issue #1425](https://github.com/PHPOffice/PhpSpreadsheet/issues/1425) [PR #4468](https://github.com/PHPOffice/PhpSpreadsheet/pull/4468)\n- Xls Writer Treat Hyperlink Starting with # as Internal. [Issue #56](https://github.com/PHPOffice/PhpSpreadsheet/issues/56) [PR #4453](https://github.com/PHPOffice/PhpSpreadsheet/pull/4453)\n- More Precision for Float to String Casts. [Issue #3899](https://github.com/PHPOffice/PhpSpreadsheet/issues/3899) [PR #4479](https://github.com/PHPOffice/PhpSpreadsheet/pull/4479)\n- Hyperlink Styles. [Issue #1632](https://github.com/PHPOffice/PhpSpreadsheet/issues/1632) [PR #4478](https://github.com/PHPOffice/PhpSpreadsheet/pull/4478)\n- ODS Handling of Ceiling and Floor. [Issue #477](https://github.com/PHPOffice/PhpSpreadsheet/issues/407) [PR #4466](https://github.com/PHPOffice/PhpSpreadsheet/pull/4466)\n- Xlsx Reader Do Not Process Printer Settings for Dataonly. [Issue #4477](https://github.com/PHPOffice/PhpSpreadsheet/issues/4477) [PR #4480](https://github.com/PHPOffice/PhpSpreadsheet/pull/4480)\n\n## 2025-04-16 - 4.2.0\n\n### Added\n\n- Add ability to add custom functions to Calculation. [PR #4390](https://github.com/PHPOffice/PhpSpreadsheet/pull/4390)\n- Add FormulaRange to IgnoredErrors. [PR #4393](https://github.com/PHPOffice/PhpSpreadsheet/pull/4393)\n- TextGrid improvements. [PR #4418](https://github.com/PHPOffice/PhpSpreadsheet/pull/4418)\n- Permit read to class which extends Spreadsheet. [Discussion #4402](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4402) [PR #4404](https://github.com/PHPOffice/PhpSpreadsheet/pull/4404)\n- Conditional and table formatting support for html writer [PR #4412](https://github.com/PHPOffice/PhpSpreadsheet/pull/4412)\n\n### Changed\n\n- Phpstan Version 2. [PR #4384](https://github.com/PHPOffice/PhpSpreadsheet/pull/4384)\n- Start migration to Phpstan level 9. [PR #4396](https://github.com/PHPOffice/PhpSpreadsheet/pull/4396)\n- Calculation locale logic moved to separate class. [PR #4398](https://github.com/PHPOffice/PhpSpreadsheet/pull/4398)\n- TREND_POLYNOMIAL_* and TREND_BEST_FIT do not work, and are changed to throw Exceptions if attempted. (TREND_BEST_FIT_NO_POLY works.) An attempt to use an unknown trend type will now also throw an exception. [Issue #4400](https://github.com/PHPOffice/PhpSpreadsheet/issues/4400) [PR #4339](https://github.com/PHPOffice/PhpSpreadsheet/pull/4339)\n- Month parameter of DATE function will now return VALUE if an ordinal string (e.g. '3rd') is used, but will accept bool or null. [PR #4420](https://github.com/PHPOffice/PhpSpreadsheet/pull/4420)\n\n### Fixed\n\n- Ignore fractional part of Drawing Shadow Alpha. [Issue #4415](https://github.com/PHPOffice/PhpSpreadsheet/issues/4415) [PR #4417](https://github.com/PHPOffice/PhpSpreadsheet/pull/4417)\n- BIN2DEC, OCT2DEC, and HEX2DEC return numbers rather than strings. [Issue #4383](https://github.com/PHPOffice/PhpSpreadsheet/issues/4383) [PR #4389](https://github.com/PHPOffice/PhpSpreadsheet/pull/4389)\n- Fix TREND_BEST_FIT_NO_POLY. [Issue #4400](https://github.com/PHPOffice/PhpSpreadsheet/issues/4400) [PR #4339](https://github.com/PHPOffice/PhpSpreadsheet/pull/4339)\n- Ods Reader No DataType for Null Value. [Issue #4435](https://github.com/PHPOffice/PhpSpreadsheet/issues/4435) [PR #4436](https://github.com/PHPOffice/PhpSpreadsheet/pull/4436)\n- Column widths not preserved when using read filter. [Issue #4416](https://github.com/PHPOffice/PhpSpreadsheet/issues/4416) [PR #4423](https://github.com/PHPOffice/PhpSpreadsheet/pull/4423)\n- Fix typo in Style exportArray quotePrefix. [Issue #4422](https://github.com/PHPOffice/PhpSpreadsheet/issues/4422) [PR #4424](https://github.com/PHPOffice/PhpSpreadsheet/pull/4424)\n- Tweak Spreadsheet clone. [PR #4419](https://github.com/PHPOffice/PhpSpreadsheet/pull/4419)\n- Better handling of Chart DisplayBlanksAs. [Issue #4411](https://github.com/PHPOffice/PhpSpreadsheet/issues/4411) [PR #4414](https://github.com/PHPOffice/PhpSpreadsheet/pull/4414)\n\n## 2025-03-02 - 4.1.0\n\n### Added\n\n- Support Justify Last Line. [Issue #4374](https://github.com/PHPOffice/PhpSpreadsheet/issues/4374) [PR #4373](https://github.com/PHPOffice/PhpSpreadsheet/pull/4373)\n- Allow Spreadsheet clone. [PR #4370](https://github.com/PHPOffice/PhpSpreadsheet/pull/4370)\n\n### Changed\n\n- ListWorksheetInfo will now return sheetState (visible, hidden, veryHidden). [Issue #4345](https://github.com/PHPOffice/PhpSpreadsheet/issues/4345) [PR #4366](https://github.com/PHPOffice/PhpSpreadsheet/pull/4366)\n- Start migration to Phpstan 2. [PR #4359](https://github.com/PHPOffice/PhpSpreadsheet/pull/4359)\n- IOFactory identify can return, and createReader and CreateWriter can accept, a class name rather than a file type. [Issue #4357](https://github.com/PHPOffice/PhpSpreadsheet/issues/4357) [PR #4361](https://github.com/PHPOffice/PhpSpreadsheet/pull/4361)\n\n### Fixed\n\n- Refactor Helper/Html. [PR #4359](https://github.com/PHPOffice/PhpSpreadsheet/pull/4359)\n- Handle #REF! as Argument to AVERAGEIF/COUNTIF/SUMIF. [Issue #4381](https://github.com/PHPOffice/PhpSpreadsheet/issues/4381) [PR #4382](https://github.com/PHPOffice/PhpSpreadsheet/pull/4382)\n- Ignore ignoredErrors when not applicable. [Issue #4375](https://github.com/PHPOffice/PhpSpreadsheet/issues/4375) [PR #4377](https://github.com/PHPOffice/PhpSpreadsheet/pull/4377)\n- Better handling of defined names on sheets whose titles include apostrophes. [Issue #4356](https://github.com/PHPOffice/PhpSpreadsheet/issues/4356) [Issue #4362](https://github.com/PHPOffice/PhpSpreadsheet/issues/4362) [Issue #4376](https://github.com/PHPOffice/PhpSpreadsheet/issues/4376) [PR #4360](https://github.com/PHPOffice/PhpSpreadsheet/pull/4360)\n- Partial solution for removing rows or columns that include edge ranges. [Issue #1449](https://github.com/PHPOffice/PhpSpreadsheet/issues/1449) [PR #3528](https://github.com/PHPOffice/PhpSpreadsheet/pull/3528)\n- Prefer mb_str_split to str_split. [PR #3341](https://github.com/PHPOffice/PhpSpreadsheet/pull/3341)\n\n## 2025-02-08 - 4.0.0\n\n### BREAKING CHANGES\n\n- Data Validations will be stored by worksheet, not cell. Index can be one or more cells or cell ranges. [Issue #797](https://github.com/PHPOffice/PhpSpreadsheet/issues/797) [Issue #4091](https://github.com/PHPOffice/PhpSpreadsheet/issues/4091) [Issue #4206](https://github.com/PHPOffice/PhpSpreadsheet/issues/4206) [PR #4240](https://github.com/PHPOffice/PhpSpreadsheet/pull/4240)\n- Conditional Formatting adds Priority property and handles overlapping ranges better. [Issue #4312](https://github.com/PHPOffice/PhpSpreadsheet/issues/4312) [Issue #4318](https://github.com/PHPOffice/PhpSpreadsheet/issues/4318) [PR #4314](https://github.com/PHPOffice/PhpSpreadsheet/pull/4314)\n- Csv Reader will no longer auto-detect Mac line endings by default. Prior behavior can be explicitly enabled via `setTestAutoDetect(true)`, and it will not be possible at all with Php9+. [Issue #4092](https://github.com/PHPOffice/PhpSpreadsheet/issues/4092) [PR #4340](https://github.com/PHPOffice/PhpSpreadsheet/pull/4340)\n- Html Writer will now use \"better boolean\" logic. Booleans will now be output by default as TRUE/FALSE rather than 1/null-string. Prior behavior can be explicitly enabled via `setBetterBoolean(false)`. [PR #4340](https://github.com/PHPOffice/PhpSpreadsheet/pull/4340)\n- Xlsx Writer will now use false as the default for `forceFullCalc`. This affects writes with `preCalculateFormulas` set to false. Prior behavior can be explicitly enabled via `setForceFullCalc(null)`.[PR #4340](https://github.com/PHPOffice/PhpSpreadsheet/pull/4340)\n- Deletion of items deprecated in Release 3. See \"removed\" below.\n\n### Added\n\n- Pdf Charts and Drawings. [Discussion #4129](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4129) [Discussion #4168](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4168) [PR #4327](https://github.com/PHPOffice/PhpSpreadsheet/pull/4327)\n- Allow spreadsheet serialization. [Discussion #4324](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4324) [Issue #1741](https://github.com/PHPOffice/PhpSpreadsheet/issues/1741) [Issue #1757](https://github.com/PHPOffice/PhpSpreadsheet/issues/1757) [PR #4326](https://github.com/PHPOffice/PhpSpreadsheet/pull/4326)\n\n### Removed\n\n- Worksheet::getStyles - no replacement. [PR #4330](https://github.com/PHPOffice/PhpSpreadsheet/pull/4330)\n- The following items were deprecated in release 3 and are now removed.\n- Drawing::setIsUrl - no replacement.\n- Settings::setLibXmlLoaderOptions() and Settings::getLibXmlLoaderOptions() - no replacement.\n- Worksheet::getHashCode - no replacement.\n- IReader::SKIP_EMPTY_CELLS - use its alias IGNORE_EMPTY_CELLS instead.\n- Worksheet::getProtectedCells - use getProtectedCellRanges instead.\n- Writer/Html::isMpdf property - use instanceof Mpdf instead.\n\n### Changed\n\n- Nothing yet.\n\n### Moved\n\n- Nothing yet.\n\n### Deprecated\n\n- Nothing yet.\n\n### Fixed\n\n- Xls writer Parser Mishandling True/False Argument. [Issue #4331](https://github.com/PHPOffice/PhpSpreadsheet/issues/4331) [PR #4333](https://github.com/PHPOffice/PhpSpreadsheet/pull/4333)\n- Xls writer Parser Parse By Character Not Byte. [PR #4344](https://github.com/PHPOffice/PhpSpreadsheet/pull/4344)\n- Minor changes to dynamic array calculations exposed by using explicit array return types in some tests. [PR #4328](https://github.com/PHPOffice/PhpSpreadsheet/pull/4328)\n\n## 2025-01-26 - 3.9.0\n\n### Added\n\n- Methods to get style for row or column. [PR #4317](https://github.com/PHPOffice/PhpSpreadsheet/pull/4317)\n- Method for duplicating worksheet in spreadsheet. [PR #4315](https://github.com/PHPOffice/PhpSpreadsheet/pull/4315)\n\n### Fixed\n\n- Security patch for control characters in protocol.\n- Ods Reader Sheet Names with Period. [Issue #4311](https://github.com/PHPOffice/PhpSpreadsheet/issues/4311) [PR #4313](https://github.com/PHPOffice/PhpSpreadsheet/pull/4313)\n- Mpdf and Tcpdf Hidden Columns and Merged Cells. [Issue #4319](https://github.com/PHPOffice/PhpSpreadsheet/issues/4319) [PR #4320](https://github.com/PHPOffice/PhpSpreadsheet/pull/4320)\n- Html Writer Allow mailto. [Issue #4316](https://github.com/PHPOffice/PhpSpreadsheet/issues/4316) [PR #4322](https://github.com/PHPOffice/PhpSpreadsheet/pull/4322)\n- Use composer/pcre rather than preg_* in Writer. [PR #4323](https://github.com/PHPOffice/PhpSpreadsheet/pull/4323)\n\n## 2025-01-11 - 3.8.0\n\n### Added\n\n- CHOOSECOLS, CHOOSEROWS, DROP, TAKE, and EXPAND. [PR #4286](https://github.com/PHPOffice/PhpSpreadsheet/pull/4286)\n\n### Fixed\n\n- Security patch for Html navigation.\n- Xlsx Reader Shared Formula with Boolean Result. Partial solution for [Issue #4280](https://github.com/PHPOffice/PhpSpreadsheet/issues/4280) [PR #4281](https://github.com/PHPOffice/PhpSpreadsheet/pull/4281)\n- Retitling cloned Worksheets. [Issue #641](https://github.com/PHPOffice/PhpSpreadsheet/issues/641) [PR #4302](https://github.com/PHPOffice/PhpSpreadsheet/pull/4302)\n- Extremely limited support for GROUPBY function. Partial response to [Issue #4282](https://github.com/PHPOffice/PhpSpreadsheet/issues/4282) [PR #4283](https://github.com/PHPOffice/PhpSpreadsheet/pull/4283)\n\n## 2024-12-26 - 3.7.0\n\n### Deprecated\n\n- Drawing::setIsUrl is unneeded. The property is set when setPath determines whether path is a url.\n\n### Fixed\n\n- Security patches for Samples.\n- Security patches for Html Writer.\n- Avoid unexpected charset in currency symbol. [PR #4279](https://github.com/PHPOffice/PhpSpreadsheet/pull/4279)\n- Add forceFullCalc option to Xlsx Writer. [Issue #4269](https://github.com/PHPOffice/PhpSpreadsheet/issues/4269) [PR #4271](https://github.com/PHPOffice/PhpSpreadsheet/pull/4271)\n- More context options may be needed for http(s) image. [Php issue 17121](https://github.com/php/php-src/issues/17121) [PR #4276](https://github.com/PHPOffice/PhpSpreadsheet/pull/4276)\n- Coverage-related tweaks to Xls Reader. [PR #4277](https://github.com/PHPOffice/PhpSpreadsheet/pull/4277)\n- Several fixed to ODS Writer. [Issue #4261](https://github.com/PHPOffice/PhpSpreadsheet/issues/4261) [PR #4263](https://github.com/PHPOffice/PhpSpreadsheet/pull/4263) [PR #4264](https://github.com/PHPOffice/PhpSpreadsheet/pull/4264) [PR #4266](https://github.com/PHPOffice/PhpSpreadsheet/pull/4266)\n\n## 2024-12-08 - 3.6.0\n\n### Added\n\n- Nothing yet.\n\n### Changed\n\n- Nothing yet.\n\n### Moved\n\n- Nothing yet.\n\n### Deprecated\n\n- Nothing yet.\n\n### Fixed\n\n- Html Reader/Writer Better Handling of Booleans. [PR #4257](https://github.com/PHPOffice/PhpSpreadsheet/pull/4257)\n- Fill Patterns/Colors When Xml Attributes are Missing. [Issue #4248](https://github.com/PHPOffice/PhpSpreadsheet/issues/4248) [PR #4250](https://github.com/PHPOffice/PhpSpreadsheet/pull/4250)\n- Remove Unneccesary files from Composer Package. [PR #4262](https://github.com/PHPOffice/PhpSpreadsheet/pull/4262)\n- Swapped row and column indexes in ReferenceHelper. [Issue #4246](https://github.com/PHPOffice/PhpSpreadsheet/issues/4246) [PR #4247](https://github.com/PHPOffice/PhpSpreadsheet/pull/4247)\n- Fix minor break handling drawings. [Issue #4241](https://github.com/PHPOffice/PhpSpreadsheet/issues/4241) [PR #4244](https://github.com/PHPOffice/PhpSpreadsheet/pull/4244)\n- Ignore cell formatting when the format is a single @. [Issue #4242](https://github.com/PHPOffice/PhpSpreadsheet/issues/4242) [PR #4243](https://github.com/PHPOffice/PhpSpreadsheet/pull/4243)\n- Upgrade Dompdf to Php-8.4 compatible version [PR #4267](https://github.com/PHPOffice/PhpSpreadsheet/pull/4267)\n\n## 2024-11-22 - 3.5.0\n\n### Added\n\n- Nothing yet.\n\n### Changed\n\n- Settings::libXmlLoaderOptions is ignored. [PR #4233](https://github.com/PHPOffice/PhpSpreadsheet/pull/4233)\n\n### Moved\n\n- Nothing yet.\n\n### Deprecated\n\n- Settings::setLibXmlLoaderOptions() and Settings::getLibXmlLoaderOptions() are no longer needed - no replacement.\n- Worksheet::getHashCode is no longer needed.\n\n### Fixed\n\n- Add support for `<s>` tag when converting HTML to RichText. [Issue #4223](https://github.com/PHPOffice/PhpSpreadsheet/issues/4223) [PR #4224](https://github.com/PHPOffice/PhpSpreadsheet/pull/4224)\n- Change hash code for worksheet. [Issue #4192](https://github.com/PHPOffice/PhpSpreadsheet/issues/4192) [PR #4207](https://github.com/PHPOffice/PhpSpreadsheet/pull/4207)\n\n## 2024-11-10 - 3.4.0\n\n### Security Fix\n\n- Several security patches.\n\n### Added\n\n- Add Dynamic valueBinder Property to Spreadsheet and Readers. [Issue #1395](https://github.com/PHPOffice/PhpSpreadsheet/issues/1395) [PR #4185](https://github.com/PHPOffice/PhpSpreadsheet/pull/4185)\n- Allow Omitting Chart Border. [Issue #562](https://github.com/PHPOffice/PhpSpreadsheet/issues/562) [PR #4188](https://github.com/PHPOffice/PhpSpreadsheet/pull/4188)\n- Method to Test Whether Csv Will Be Affected by Php9. [PR #4189](https://github.com/PHPOffice/PhpSpreadsheet/pull/4189)\n\n### Changed\n\n- Refactor Xls Reader. [PR #4118](https://github.com/PHPOffice/PhpSpreadsheet/pull/4118)\n\n### Deprecated\n\n- IReader::SKIP_EMPTY_CELLS - use its alias IGNORE_EMPTY_CELLS instead.\n- Worksheet::getProtectedCells was deprecated in release 2, but was not properly documented, and not removed in release 3. Use getProtectedCellRanges instead.\n- Writer/Html::isMpdf property was deprecated in release 2, but was not properly documented, and not removed in release 3. Use instanceof Mpdf instead.\n\n### Moved\n\n- Nothing yet.\n\n### Fixed\n\n- Xls Writer Condtional Rules Applied to Whole Rows or Columns. [Issue #3185](https://github.com/PHPOffice/PhpSpreadsheet/issues/3185) [PR #4152](https://github.com/PHPOffice/PhpSpreadsheet/pull/4152)\n- Xlsx Writer Duplicate ContentTypes Entry for Background Image. [Issue #4179](https://github.com/PHPOffice/PhpSpreadsheet/issues/4179) [PR #4180](https://github.com/PHPOffice/PhpSpreadsheet/pull/4180)\n- Check strictNullComparison outside of loops. [PR #3347](https://github.com/PHPOffice/PhpSpreadsheet/pull/3347)\n- SUMIFS Does Not Require xlfn. [Issue #4182](https://github.com/PHPOffice/PhpSpreadsheet/issues/4182) [PR #4186](https://github.com/PHPOffice/PhpSpreadsheet/pull/4186)\n- Image Transparency/Opacity with Html Reader Changes. [Discussion #4117](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4117) [PR #4142](https://github.com/PHPOffice/PhpSpreadsheet/pull/4142)\n- Option to Write Hyperlink Rather Than Label to Csv. [Issue #1412](https://github.com/PHPOffice/PhpSpreadsheet/issues/1412) [PR #4151](https://github.com/PHPOffice/PhpSpreadsheet/pull/4151)\n- Invalid Html Due to Cached Filesize. [Issue #1107](https://github.com/PHPOffice/PhpSpreadsheet/issues/1107) [PR #4184](https://github.com/PHPOffice/PhpSpreadsheet/pull/4184)\n- Excel 2003 Allows Html Entities. [Issue #2157](https://github.com/PHPOffice/PhpSpreadsheet/issues/2157) [PR #4187](https://github.com/PHPOffice/PhpSpreadsheet/pull/4187)\n- Changes to ROUNDDOWN/ROUNDUP/TRUNC. [Issue #4213](https://github.com/PHPOffice/PhpSpreadsheet/issues/4213) [PR #4214](https://github.com/PHPOffice/PhpSpreadsheet/pull/4214)\n- Writer Xlsx ignoredErrors Before Drawings. [Issue #4200](https://github.com/PHPOffice/PhpSpreadsheet/issues/4200) [Issue #4145](https://github.com/PHPOffice/PhpSpreadsheet/issues/4145)  [PR #4212](https://github.com/PHPOffice/PhpSpreadsheet/pull/4212)\n- Allow ANCHORARRAY as Data Validation list. [Issue #4197](https://github.com/PHPOffice/PhpSpreadsheet/issues/4197) [PR #4203](https://github.com/PHPOffice/PhpSpreadsheet/pull/4203)\n\n## 2024-09-29 - 3.3.0 (no 3.0.\\*, 3.1.\\*, 3.2.\\*)\n\n### Dynamic Arrays\n\n- Support for Excel dynamic arrays is added. It is an opt-in feature, so our hope is that there will be no BC breaks, but it is a very large change. Full support is added for Xlsx. It is emulated as Ctrl-Shift-Enter arrays for Ods read and write and Excel2003 and Gnumeric read. Html/Pdf and Csv writers will populate cells on output if they are the result of array formulas. No support is added for Xls or Slk.\n\n### Added\n\n- Excel Dynamic Arrays. [Issue #3901](https://github.com/PHPOffice/PhpSpreadsheet/issues/3901) [Issue #3659](https://github.com/PHPOffice/PhpSpreadsheet/issues/3659) [Issue #1834](https://github.com/PHPOffice/PhpSpreadsheet/issues/1834) [PR #3962](https://github.com/PHPOffice/PhpSpreadsheet/pull/3962)\n- String Value Binder Allow Setting \"Ignore Number Stored as Text\". [PR #4141](https://github.com/PHPOffice/PhpSpreadsheet/pull/4141)\n\n### Changed\n\n- Xlsx Reader default datatype when none is specified in Xml is changed from string to numeric, which is how Excel treats it. There is expected to be little impact because DefaultValueBinder and AdvancedValueBinder correct mis-identification as string, and StringValueBinder usually expects string. [PR #4139](https://github.com/PHPOffice/PhpSpreadsheet/pull/4139)\n- Currency and Accounting Wizards are changed to act like Excel, and a new CurrencyBase Wizard is added for for non-Excel formats. [Issue #4125](https://github.com/PHPOffice/PhpSpreadsheet/issues/4125) [Issue #4124](https://github.com/PHPOffice/PhpSpreadsheet/issues/4124) [PR #4127](https://github.com/PHPOffice/PhpSpreadsheet/pull/4127)\n- Images will not be added to spreadsheet if they cannot be validated as images.\n\n### Deprecated\n\n- Nothing yet.\n\n### Removed\n\n- The following items were deprecated in release 2 and are now removed.\n- Writer\\Xls\\Style\\ColorMap (no longer needed).\n- Reader\\Xml::trySimpleXMLLoadString (should not have been public, no public replacement).\n- Calculation\\Calculation::_translateFormulaToLocale (use method name translateFormulaToLocale without leading underscore).\n- Calculation\\Calculation::_translateFormulaToEnglish (use method name translateFormulaToEnglish without leading underscore).\n\n### Moved\n\n- Nothing yet.\n\n### Fixed\n\n- Several security patches.\n- Xls Reader Some Ranges Not Handled Properly. [Issue #1570](https://github.com/PHPOffice/PhpSpreadsheet/issues/1570) [PR #4140](https://github.com/PHPOffice/PhpSpreadsheet/pull/4140)\n- Better Handling of legacyDrawing Xml. [Issue #4105](https://github.com/PHPOffice/PhpSpreadsheet/issues/4105) [PR #4122](https://github.com/PHPOffice/PhpSpreadsheet/pull/4122)\n- Improve Xlsx Reader Speed. [Issue #3917](https://github.com/PHPOffice/PhpSpreadsheet/issues/3917) [PR #4153](https://github.com/PHPOffice/PhpSpreadsheet/pull/4153)\n\n## 2024-08-07 - 2.2.2\n\n### Added\n\n- Nothing yet.\n\n### Changed\n\n- Nothing yet.\n\n### Deprecated\n\n- Nothing yet.\n\n### Moved\n\n- Nothing yet.\n\n### Fixed\n\n- Html Reader Preserve Unicode Whitespace. [Issue #1284](https://github.com/PHPOffice/PhpSpreadsheet/issues/1284) [PR #4106](https://github.com/PHPOffice/PhpSpreadsheet/pull/4106)\n- RATE Function Floating Point Number of Periods. [PR #4107](https://github.com/PHPOffice/PhpSpreadsheet/pull/4107)\n- Parameter Name Change Xlsx Writer Workbook. [Issue #4108](https://github.com/PHPOffice/PhpSpreadsheet/issues/4108) [PR #4111](https://github.com/PHPOffice/PhpSpreadsheet/pull/4111)\n- New Algorithm for TRUNC, ROUNDUP, ROUNDDOWN. [Issue #4113](https://github.com/PHPOffice/PhpSpreadsheet/issues/4113) [PR #4115](https://github.com/PHPOffice/PhpSpreadsheet/pull/4115)\n- Worksheet applyStylesFromArray Retain Active Cell (Excel 16 was having a problem with some files). [Issue #4128](https://github.com/PHPOffice/PhpSpreadsheet/issues/4128) [PR #4132](https://github.com/PHPOffice/PhpSpreadsheet/pull/4132)\n\n## 2024-07-29 - 2.2.1\n\n### Security Fix\n\n- Prevent XXE when loading files [PR #4119](https://github.com/PHPOffice/PhpSpreadsheet/pull/4119)\n\n### Fixed\n\n- Add Sheet may leave Active Sheet uninitialized. [Issue #4112](https://github.com/PHPOffice/PhpSpreadsheet/issues/4112) [PR #4114](https://github.com/PHPOffice/PhpSpreadsheet/pull/4114)\n- Reference to Defined Name Specifying Worksheet. [Issue #206](https://github.com/PHPOffice/PhpSpreadsheet/issues/296) [PR #4096](https://github.com/PHPOffice/PhpSpreadsheet/pull/4096)\n- Xls Reader Print/Show Gridlines. [Issue #912](https://github.com/PHPOffice/PhpSpreadsheet/issues/912) [PR #4098](https://github.com/PHPOffice/PhpSpreadsheet/pull/4098)\n- ODS Reader Allow Omission of Page Settings Tags. [Issue #4099](https://github.com/PHPOffice/PhpSpreadsheet/issues/4099) [PR #4101](https://github.com/PHPOffice/PhpSpreadsheet/pull/4101)\n\n## 2024-07-24 - 2.2.0\n\n### Added\n\n- Xlsx Reader Optionally Ignore Rows With No Cells. [Issue #3982](https://github.com/PHPOffice/PhpSpreadsheet/issues/3982) [PR #4035](https://github.com/PHPOffice/PhpSpreadsheet/pull/4035)\n- Means to change style without affecting current cell/sheet. [PR #4073](https://github.com/PHPOffice/PhpSpreadsheet/pull/4073)\n- Option for CSV output file to have varying numbers of columns for each row. [Issue #1415](https://github.com/PHPOffice/PhpSpreadsheet/issues/1415) [PR #4076](https://github.com/PHPOffice/PhpSpreadsheet/pull/4076)\n\n### Changed\n\n- On read, Xlsx Reader had been breaking up union ranges into separate individual ranges. It will now try to preserve range as it was read in. [PR #4042](https://github.com/PHPOffice/PhpSpreadsheet/pull/4042)\n- Xlsx/Xls spreadsheet calculation and formatting of dates will use base date of spreadsheet even when spreadsheets with different base dates are simultaneously open. [Issue #1036](https://github.com/PHPOffice/PhpSpreadsheet/issues/1036) [Issue #1635](https://github.com/PHPOffice/PhpSpreadsheet/issues/1635) [PR #4071](https://github.com/PHPOffice/PhpSpreadsheet/pull/4071) \n\n### Deprecated\n\n- Writer\\Xls\\Style\\ColorMap is no longer needed.\n\n### Moved\n\n- Nothing\n\n### Fixed\n\n- Incorrect Reader CSV with BOM. [Issue #4028](https://github.com/PHPOffice/PhpSpreadsheet/issues/4028) [PR #4029](https://github.com/PHPOffice/PhpSpreadsheet/pull/4029)\n- POWER Null/Bool Args. [PR #4031](https://github.com/PHPOffice/PhpSpreadsheet/pull/4031)\n- Do Not Output Alignment and Protection for Conditional Format. [Issue #4025](https://github.com/PHPOffice/PhpSpreadsheet/issues/4025) [PR #4027](https://github.com/PHPOffice/PhpSpreadsheet/pull/4027)\n- Conditional Color Scale Improvements. [Issue #4049](https://github.com/PHPOffice/PhpSpreadsheet/issues/4049) [PR #4050](https://github.com/PHPOffice/PhpSpreadsheet/pull/4050)\n- Mpdf and Tcpdf Borders on Merged Cells. [Issue #3557](https://github.com/PHPOffice/PhpSpreadsheet/issues/3557) [PR #4047](https://github.com/PHPOffice/PhpSpreadsheet/pull/4047)\n- Xls Conditional Format Improvements. [PR #4030](https://github.com/PHPOffice/PhpSpreadsheet/pull/4030) [PR #4033](https://github.com/PHPOffice/PhpSpreadsheet/pull/4033)\n- Conditional Range Unions and Intersections [Issue #4039](https://github.com/PHPOffice/PhpSpreadsheet/issues/4039) [PR #4042](https://github.com/PHPOffice/PhpSpreadsheet/pull/4042)\n- Ods comments with newlines. [Issue #4081](https://github.com/PHPOffice/PhpSpreadsheet/issues/4081) [PR #4086](https://github.com/PHPOffice/PhpSpreadsheet/pull/4086)\n- Propagate errors in Text functions. [Issue #2581](https://github.com/PHPOffice/PhpSpreadsheet/issues/2581) [PR #4080](https://github.com/PHPOffice/PhpSpreadsheet/pull/4080)\n- Csv Reader allow use of html mimetype. [Issue #4036](https://github.com/PHPOffice/PhpSpreadsheet/issues/4036) [PR #4040](https://github.com/PHPOffice/PhpSpreadsheet/pull/4040)\n- Problem rendering line chart with missing plot label. [PR #4074](https://github.com/PHPOffice/PhpSpreadsheet/pull/4074)\n- More RTL in Xlsx/Html Comments [Issue #4004](https://github.com/PHPOffice/PhpSpreadsheet/issues/4004) [PR #4065](https://github.com/PHPOffice/PhpSpreadsheet/pull/4065)\n- Empty String in sharedStrings. [Issue #4063](https://github.com/PHPOffice/PhpSpreadsheet/issues/4063) [PR #4064](https://github.com/PHPOffice/PhpSpreadsheet/pull/4064)\n- Xlsx Writer RichText and TYPE_STRING. [Issue #476](https://github.com/PHPOffice/PhpSpreadsheet/issues/476) [PR #4094](https://github.com/PHPOffice/PhpSpreadsheet/pull/4094)\n- Ods boolean data. [Issue #460](https://github.com/PHPOffice/PhpSpreadsheet/issues/460) [PR #4093](https://github.com/PHPOffice/PhpSpreadsheet/pull/4093)\n- Html Writer Minor Fixes. [PR #4089](https://github.com/PHPOffice/PhpSpreadsheet/pull/4089)\n- Changes to INDEX function. [Issue #64](https://github.com/PHPOffice/PhpSpreadsheet/issues/64) [PR #4088](https://github.com/PHPOffice/PhpSpreadsheet/pull/4088)\n- Ods Reader and Whitespace Text Nodes. [Issue #804](https://github.com/PHPOffice/PhpSpreadsheet/issues/804) [PR #4087](https://github.com/PHPOffice/PhpSpreadsheet/pull/4087)\n- Ods Xml Reader and Whitespace Text Nodes. [Issue #804](https://github.com/PHPOffice/PhpSpreadsheet/issues/804) [PR #4087](https://github.com/PHPOffice/PhpSpreadsheet/pull/4087)\n- Treat invalid formulas as strings. [Issue #1310](https://github.com/PHPOffice/PhpSpreadsheet/issues/1310) [PR #4073](https://github.com/PHPOffice/PhpSpreadsheet/pull/4073)\n\n## 2024-05-11 - 2.1.0\n\n### MINOR BREAKING CHANGE\n\n- Writing of cell comments to Html will now sanitize all Html tags within the comment, so the tags will be rendered as plaintext and have no other effects when rendered. Styling can be achieved by using the Font property of of the TextRuns which make up the comment, as is already the cases for Xlsx. [PR #3957](https://github.com/PHPOffice/PhpSpreadsheet/pull/3957)\n\n### Added\n\n- Default Style Alignment Property (workaround for bug in non-Excel spreadsheet apps) [Issue #3918](https://github.com/PHPOffice/PhpSpreadsheet/issues/3918) [PR #3924](https://github.com/PHPOffice/PhpSpreadsheet/pull/3924)\n- Additional Support for Date/Time Styles [PR #3939](https://github.com/PHPOffice/PhpSpreadsheet/pull/3939)\n\n### Changed\n\n- Nothing\n\n### Deprecated\n\n- Reader/Xml trySimpleXMLLoadString should not have had public visibility, and will be removed.\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- IF Empty Arguments. [Issue #3875](https://github.com/PHPOffice/PhpSpreadsheet/issues/3875) [Issue #2146](https://github.com/PHPOffice/PhpSpreadsheet/issues/2146) [PR #3879](https://github.com/PHPOffice/PhpSpreadsheet/pull/3879)\n- Changes to floating point in Php8.4. [Issue #3896](https://github.com/PHPOffice/PhpSpreadsheet/issues/3896) [PR #3897](https://github.com/PHPOffice/PhpSpreadsheet/pull/3897)\n- Handling User-supplied Decimal and Thousands Separators. [Issue #3900](https://github.com/PHPOffice/PhpSpreadsheet/issues/3900) [PR #3903](https://github.com/PHPOffice/PhpSpreadsheet/pull/3903)\n- Improve Performance of CSV Writer. [Issue #3904](https://github.com/PHPOffice/PhpSpreadsheet/issues/3904) [PR #3906](https://github.com/PHPOffice/PhpSpreadsheet/pull/3906)\n- Fix issue with prepending zero in percentage [Issue #3920](https://github.com/PHPOffice/PhpSpreadsheet/issues/3920) [PR #3921](https://github.com/PHPOffice/PhpSpreadsheet/pull/3921)\n- Incorrect SUMPRODUCT Calculation [Issue #3909](https://github.com/PHPOffice/PhpSpreadsheet/issues/3909) [PR #3916](https://github.com/PHPOffice/PhpSpreadsheet/pull/3916)\n- Formula Misidentifying Text as Cell After Insertion/Deletion [Issue #3907](https://github.com/PHPOffice/PhpSpreadsheet/issues/3907) [PR #3915](https://github.com/PHPOffice/PhpSpreadsheet/pull/3915)\n- Unexpected Absolute Address in Xlsx Rels [Issue #3730](https://github.com/PHPOffice/PhpSpreadsheet/issues/3730) [PR #3923](https://github.com/PHPOffice/PhpSpreadsheet/pull/3923)\n- Unallocated Cells Affected by Column/Row Insert/Delete [Issue #3933](https://github.com/PHPOffice/PhpSpreadsheet/issues/3933) [PR #3940](https://github.com/PHPOffice/PhpSpreadsheet/pull/3940)\n- Invalid Builtin Defined Name in Xls Reader [Issue #3935](https://github.com/PHPOffice/PhpSpreadsheet/issues/3935) [PR #3942](https://github.com/PHPOffice/PhpSpreadsheet/pull/3942)\n- Hidden Rows and Columns Tcpdf/Mpdf [PR #3945](https://github.com/PHPOffice/PhpSpreadsheet/pull/3945)\n- RTL Text Alignment in Xlsx Comments [Issue #4004](https://github.com/PHPOffice/PhpSpreadsheet/issues/4004) [PR #4006](https://github.com/PHPOffice/PhpSpreadsheet/pull/4006)\n- Protect Sheet But Allow Sort [Issue #3951](https://github.com/PHPOffice/PhpSpreadsheet/issues/3951) [PR #3956](https://github.com/PHPOffice/PhpSpreadsheet/pull/3956)\n- Default Value for Conditional::$text [PR #3946](https://github.com/PHPOffice/PhpSpreadsheet/pull/3946)\n- Table Filter Buttons [Issue #3988](https://github.com/PHPOffice/PhpSpreadsheet/issues/3988) [PR #3992](https://github.com/PHPOffice/PhpSpreadsheet/pull/3992)\n- Improvements to Xml Reader [Issue #3999](https://github.com/PHPOffice/PhpSpreadsheet/issues/3999) [Issue #4000](https://github.com/PHPOffice/PhpSpreadsheet/issues/4000) [Issue #4001](https://github.com/PHPOffice/PhpSpreadsheet/issues/4001) [Issue #4002](https://github.com/PHPOffice/PhpSpreadsheet/issues/4002) [PR #4003](https://github.com/PHPOffice/PhpSpreadsheet/pull/4003) [PR #4007](https://github.com/PHPOffice/PhpSpreadsheet/pull/4007)\n- Html Reader non-UTF8 [Issue #3995](https://github.com/PHPOffice/PhpSpreadsheet/issues/3995) [Issue #866](https://github.com/PHPOffice/PhpSpreadsheet/issues/866) [Issue #1681](https://github.com/PHPOffice/PhpSpreadsheet/issues/1681) [PR #4019](https://github.com/PHPOffice/PhpSpreadsheet/pull/4019)\n\n## 2.0.0 - 2024-01-04\n\n### BREAKING CHANGE\n\n- Typing was strengthened by leveraging native typing. This should not change any behavior. However, if you implement\n  any interfaces or inherit from any classes, you will need to adapt your typing accordingly. If you use static analysis \n  tools such as PHPStan or Psalm, new errors might be found. If you find actual bugs because of the new typing, please\n  open a PR that fixes it with a **detailed** explanation of the reason. We'll try to merge and release typing-related\n  fixes quickly in the coming days. [PR #3718](https://github.com/PHPOffice/PhpSpreadsheet/pull/3718)\n- All deprecated things have been removed, for details, see [816b91d0b4](https://github.com/PHPOffice/PhpSpreadsheet/commit/816b91d0b4a0c7285a9e3fc88c58f7730d922044)\n\n### Added\n\n- Split screens (Xlsx and Xml only, not 100% complete). [Issue #3601](https://github.com/PHPOffice/PhpSpreadsheet/issues/3601) [PR #3622](https://github.com/PHPOffice/PhpSpreadsheet/pull/3622)\n- Permit Meta Viewport in Html. [Issue #3565](https://github.com/PHPOffice/PhpSpreadsheet/issues/3565) [PR #3623](https://github.com/PHPOffice/PhpSpreadsheet/pull/3623)\n- Hyperlink support for Ods. [Issue #3660](https://github.com/PHPOffice/PhpSpreadsheet/issues/3660) [PR #3669](https://github.com/PHPOffice/PhpSpreadsheet/pull/3669)\n- ListWorksheetInfo/Names for Html/Csv/Slk. [Issue #3706](https://github.com/PHPOffice/PhpSpreadsheet/issues/3706) [PR #3709](https://github.com/PHPOffice/PhpSpreadsheet/pull/3709)\n- Methods to determine if cell is actually locked, or hidden on formula bar. [PR #3722](https://github.com/PHPOffice/PhpSpreadsheet/pull/3722)\n- Add iterateOnlyExistingCells to Constructors. [Issue #3721](https://github.com/PHPOffice/PhpSpreadsheet/issues/3721) [PR #3727](https://github.com/PHPOffice/PhpSpreadsheet/pull/3727)\n- Support for Conditional Formatting Color Scale. [PR #3738](https://github.com/PHPOffice/PhpSpreadsheet/pull/3738)\n- Support Additional Tags in Helper/Html. [Issue #3751](https://github.com/PHPOffice/PhpSpreadsheet/issues/3751) [PR #3752](https://github.com/PHPOffice/PhpSpreadsheet/pull/3752)\n- Writer ODS : Write Border Style for cells [Issue #3690](https://github.com/PHPOffice/PhpSpreadsheet/issues/3690) [PR #3693](https://github.com/PHPOffice/PhpSpreadsheet/pull/3693)\n- Sheet Background Images [Issue #1649](https://github.com/PHPOffice/PhpSpreadsheet/issues/1649) [PR #3795](https://github.com/PHPOffice/PhpSpreadsheet/pull/3795)\n- Check if Coordinate is Inside Range [PR #3779](https://github.com/PHPOffice/PhpSpreadsheet/pull/3779)\n- Flipping Images [Issue #731](https://github.com/PHPOffice/PhpSpreadsheet/issues/731) [PR #3801](https://github.com/PHPOffice/PhpSpreadsheet/pull/3801)\n- Chart Dynamic Title and Font Properties [Issue #3797](https://github.com/PHPOffice/PhpSpreadsheet/issues/3797) [PR #3800](https://github.com/PHPOffice/PhpSpreadsheet/pull/3800)\n- Chart Axis Display Units and Logarithmic Scale. [Issue #3833](https://github.com/PHPOffice/PhpSpreadsheet/issues/3833) [PR #3836](https://github.com/PHPOffice/PhpSpreadsheet/pull/3836)\n- Partial Support of Fill Handles. [Discussion #3847](https://github.com/PHPOffice/PhpSpreadsheet/discussions/3847) [PR #3855](https://github.com/PHPOffice/PhpSpreadsheet/pull/3855)\n\n### Changed\n\n- **Drop support for PHP 7.4**, according to https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support [PR #3713](https://github.com/PHPOffice/PhpSpreadsheet/pull/3713)\n- RLM Added to NumberFormatter Currency. This happens depending on release of ICU which Php is using (it does not yet happen with any official release). PhpSpreadsheet will continue to use the value returned by Php, but a method is added to keep the result unchanged from release to release. [Issue #3571](https://github.com/PHPOffice/PhpSpreadsheet/issues/3571) [PR #3640](https://github.com/PHPOffice/PhpSpreadsheet/pull/3640)\n- `toFormattedString` will now always return a string. This was introduced with 1.28.0, but was not properly documented at the time. This can affect the results of `toArray`, `namedRangeToArray`, and `rangeToArray`. [PR #3304](https://github.com/PHPOffice/PhpSpreadsheet/pull/3304)\n- Value of constants FORMAT_CURRENCY_EUR and FORMAT_CURRENCY_USD was changed in 1.28.0, but was not properly documented at the time. [Issue #3577](https://github.com/PHPOffice/PhpSpreadsheet/issues/3577)\n- Html Writer will attempt to use Chart coordinates to determine image size. [Issue #3783](https://github.com/PHPOffice/PhpSpreadsheet/issues/3783) [PR #3787](https://github.com/PHPOffice/PhpSpreadsheet/pull/3787)\n\n### Deprecated\n\n- Functions `_translateFormulaToLocale` and `_translateFormulaEnglish` are replaced by versions without leading underscore. [PR #3828](https://github.com/PHPOffice/PhpSpreadsheet/pull/3828)\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Take advantage of mitoteam/jpgraph Extended mode to enable rendering of more graphs. [PR #3603](https://github.com/PHPOffice/PhpSpreadsheet/pull/3603)\n- Column widths, especially for ODS. [Issue #3609](https://github.com/PHPOffice/PhpSpreadsheet/issues/3609) [PR #3610](https://github.com/PHPOffice/PhpSpreadsheet/pull/3610)\n- Avoid NULL in String Function call (partial solution). [Issue #3613](https://github.com/PHPOffice/PhpSpreadsheet/issues/3613) [PR #3617](https://github.com/PHPOffice/PhpSpreadsheet/pull/3617)\n- Preserve transparency in Memory Drawing. [Issue #3624](https://github.com/PHPOffice/PhpSpreadsheet/issues/3624) [PR #3627](https://github.com/PHPOffice/PhpSpreadsheet/pull/3627)\n- Customizable padding for Exact Column Width. [Issue #3626](https://github.com/PHPOffice/PhpSpreadsheet/issues/3626) [PR #3628](https://github.com/PHPOffice/PhpSpreadsheet/pull/3628)\n- Ensure ROW function returns int (problem exposed in unreleased Php). [PR #3641](https://github.com/PHPOffice/PhpSpreadsheet/pull/3641)\n- Minor changes to Mpdf and Html Writers. [PR #3645](https://github.com/PHPOffice/PhpSpreadsheet/pull/3645)\n- Xlsx Reader Namespacing for Tables, Autofilters. [Issue #3665](https://github.com/PHPOffice/PhpSpreadsheet/issues/3665) [PR #3668](https://github.com/PHPOffice/PhpSpreadsheet/pull/3668)\n- Read Code Page for Xls ListWorksheetInfo/Names BIFF5. [Issue #3671](https://github.com/PHPOffice/PhpSpreadsheet/issues/3671) [PR #3672](https://github.com/PHPOffice/PhpSpreadsheet/pull/3672)\n- Read Data from Table on Different Sheet. [Issue #3635](https://github.com/PHPOffice/PhpSpreadsheet/issues/3635) [PR #3659](https://github.com/PHPOffice/PhpSpreadsheet/pull/3659)\n- Html Writer Styles Using Inline Css. [Issue #3678](https://github.com/PHPOffice/PhpSpreadsheet/issues/3678) [PR #3680](https://github.com/PHPOffice/PhpSpreadsheet/pull/3680)\n- Xlsx Read Ignoring Some Comments. [Issue #3654](https://github.com/PHPOffice/PhpSpreadsheet/issues/3654) [PR #3655](https://github.com/PHPOffice/PhpSpreadsheet/pull/3655)\n- Fractional Seconds in Date/Time Values. [PR #3677](https://github.com/PHPOffice/PhpSpreadsheet/pull/3677)\n- SetCalculatedValue Avoid Casting String to Numeric. [Issue #3658](https://github.com/PHPOffice/PhpSpreadsheet/issues/3658) [PR #3685](https://github.com/PHPOffice/PhpSpreadsheet/pull/3685)\n- Several Problems in a Very Complicated Spreadsheet. [Issue #3679](https://github.com/PHPOffice/PhpSpreadsheet/issues/3679) [PR #3681](https://github.com/PHPOffice/PhpSpreadsheet/pull/3681)\n- Inconsistent String Handling for Sum Functions. [Issue #3652](https://github.com/PHPOffice/PhpSpreadsheet/issues/3652) [PR #3653](https://github.com/PHPOffice/PhpSpreadsheet/pull/3653)\n- Recomputation of Relative Addresses in Defined Names. [Issue #3661](https://github.com/PHPOffice/PhpSpreadsheet/issues/3661) [PR #3673](https://github.com/PHPOffice/PhpSpreadsheet/pull/3673)\n- Writer Xls Characters Outside BMP (emojis). [Issue #642](https://github.com/PHPOffice/PhpSpreadsheet/issues/642) [PR #3696](https://github.com/PHPOffice/PhpSpreadsheet/pull/3696)\n- Xlsx Reader Improve Handling of Row and Column Styles. [Issue #3533](https://github.com/PHPOffice/PhpSpreadsheet/issues/3533) [Issue #3534](https://github.com/PHPOffice/PhpSpreadsheet/issues/3534) [PR #3688](https://github.com/PHPOffice/PhpSpreadsheet/pull/3688)\n- Avoid Allocating RowDimension Unneccesarily. [PR #3686](https://github.com/PHPOffice/PhpSpreadsheet/pull/3686)\n- Use Column Style when Row Dimension Exists Without Style. [Issue #3534](https://github.com/PHPOffice/PhpSpreadsheet/issues/3534) [PR #3688](https://github.com/PHPOffice/PhpSpreadsheet/pull/3688)\n- Inconsistency Between Cell Data and Explicitly Declared Type. [Issue #3711](https://github.com/PHPOffice/PhpSpreadsheet/issues/3711) [PR #3715](https://github.com/PHPOffice/PhpSpreadsheet/pull/3715)\n- Unexpected Namespacing in rels File. [Issue #3720](https://github.com/PHPOffice/PhpSpreadsheet/issues/3720) [PR #3722](https://github.com/PHPOffice/PhpSpreadsheet/pull/3722)\n- Break Some Circular References. [PR #3716](https://github.com/PHPOffice/PhpSpreadsheet/pull/3716) [PR #3707](https://github.com/PHPOffice/PhpSpreadsheet/pull/3707)\n- Missing Font Index in Some Xls. [PR #3734](https://github.com/PHPOffice/PhpSpreadsheet/pull/3734)\n- Load Tables even with READ_DATA_ONLY. [PR #3726](https://github.com/PHPOffice/PhpSpreadsheet/pull/3726)\n- Theme File Missing but Referenced in Spreadsheet. [Issue #3770](https://github.com/PHPOffice/PhpSpreadsheet/issues/3770) [PR #3772](https://github.com/PHPOffice/PhpSpreadsheet/pull/3772)\n- Slk Shared Formulas. [Issue #2267](https://github.com/PHPOffice/PhpSpreadsheet/issues/2267) [PR #3776](https://github.com/PHPOffice/PhpSpreadsheet/pull/3776)\n- Html omitting some charts. [Issue #3767](https://github.com/PHPOffice/PhpSpreadsheet/issues/3767) [PR #3771](https://github.com/PHPOffice/PhpSpreadsheet/pull/3771)\n- Case Insensitive Comparison for Sheet Names [PR #3791](https://github.com/PHPOffice/PhpSpreadsheet/pull/3791)\n- Performance improvement for Xlsx Reader. [Issue #3683](https://github.com/PHPOffice/PhpSpreadsheet/issues/3683) [PR #3810](https://github.com/PHPOffice/PhpSpreadsheet/pull/3810)\n- Prevent loop in Shared/File. [Issue #3807](https://github.com/PHPOffice/PhpSpreadsheet/issues/3807) [PR #3809](https://github.com/PHPOffice/PhpSpreadsheet/pull/3809)\n- Consistent handling of decimal/thousands separators between StringHelper and Php setlocale. [Issue #3811](https://github.com/PHPOffice/PhpSpreadsheet/issues/3811) [PR #3815](https://github.com/PHPOffice/PhpSpreadsheet/pull/3815)\n- Clone worksheet with tables or charts. [Issue #3820](https://github.com/PHPOffice/PhpSpreadsheet/issues/3820) [PR #3821](https://github.com/PHPOffice/PhpSpreadsheet/pull/3821)\n- COUNTIFS Does Not Require xlfn. [Issue #3819](https://github.com/PHPOffice/PhpSpreadsheet/issues/3819) [PR #3827](https://github.com/PHPOffice/PhpSpreadsheet/pull/3827)\n- Strip `xlfn.` and `xlws.` from Formula Translations. [Issue #3819](https://github.com/PHPOffice/PhpSpreadsheet/issues/3819) [PR #3828](https://github.com/PHPOffice/PhpSpreadsheet/pull/3828)\n- Recurse directories searching for font file. [Issue #2809](https://github.com/PHPOffice/PhpSpreadsheet/issues/2809) [PR #3830](https://github.com/PHPOffice/PhpSpreadsheet/pull/3830)\n- Reduce memory consumption of Worksheet::rangeToArray() when many empty rows are read. [Issue #3814](https://github.com/PHPOffice/PhpSpreadsheet/issues/3814) [PR #3834](https://github.com/PHPOffice/PhpSpreadsheet/pull/3834)\n- Reduce time used by Worksheet::rangeToArray() when many empty rows are read. [PR #3839](https://github.com/PHPOffice/PhpSpreadsheet/pull/3839)\n- Html Reader Tolerate Invalid Sheet Title. [PR #3845](https://github.com/PHPOffice/PhpSpreadsheet/pull/3845)\n- Do not include unparsed drawings when new drawing added. [Issue #3843](https://github.com/PHPOffice/PhpSpreadsheet/issues/3843) [PR #3846](https://github.com/PHPOffice/PhpSpreadsheet/pull/3846)\n- Do not include unparsed drawings when new drawing added. [Issue #3861](https://github.com/PHPOffice/PhpSpreadsheet/issues/3861) [PR #3862](https://github.com/PHPOffice/PhpSpreadsheet/pull/3862)\n- Excel omits `between` operator for data validation. [Issue #3863](https://github.com/PHPOffice/PhpSpreadsheet/issues/3863) [PR #3865](https://github.com/PHPOffice/PhpSpreadsheet/pull/3865)\n- Use less space when inserting rows and columns. [Issue #3687](https://github.com/PHPOffice/PhpSpreadsheet/issues/3687) [PR #3856](https://github.com/PHPOffice/PhpSpreadsheet/pull/3856)\n- Excel inconsistent handling of MIN/MAX/MINA/MAXA. [Issue #3866](https://github.com/PHPOffice/PhpSpreadsheet/issues/3866) [PR #3868](https://github.com/PHPOffice/PhpSpreadsheet/pull/3868)\n\n## 1.29.0 - 2023-06-15\n\n### Added\n\n- Wizards for defining Number Format masks for Dates and Times, including Durations/Intervals. [PR #3458](https://github.com/PHPOffice/PhpSpreadsheet/pull/3458)\n- Specify data type in html tags. [Issue #3444](https://github.com/PHPOffice/PhpSpreadsheet/issues/3444) [PR #3445](https://github.com/PHPOffice/PhpSpreadsheet/pull/3445)\n- Provide option to ignore hidden rows/columns in `toArray()` methods. [PR #3494](https://github.com/PHPOffice/PhpSpreadsheet/pull/3494)\n- Font/Effects/Theme support for Chart Data Labels and Axis. [PR #3476](https://github.com/PHPOffice/PhpSpreadsheet/pull/3476)\n- Font Themes support. [PR #3486](https://github.com/PHPOffice/PhpSpreadsheet/pull/3486)\n- Ability to Ignore Cell Errors in Excel. [Issue #1141](https://github.com/PHPOffice/PhpSpreadsheet/issues/1141) [PR #3508](https://github.com/PHPOffice/PhpSpreadsheet/pull/3508)\n- Unzipped Gnumeric file [PR #3591](https://github.com/PHPOffice/PhpSpreadsheet/pull/3591)\n\n### Changed\n\n- Xlsx Color schemes read in will be written out (previously Excel 2007-2010 Color scheme was always written); manipulation of those schemes before write, including restoring prior behavior, is provided [PR #3476](https://github.com/PHPOffice/PhpSpreadsheet/pull/3476)\n- Memory and speed optimisations for Read Filters with Xlsx Files and Shared Formulae. [PR #3474](https://github.com/PHPOffice/PhpSpreadsheet/pull/3474)\n- Allow `CellRange` and `CellAddress` objects for the `range` argument in the `rangeToArray()` method. [PR #3494](https://github.com/PHPOffice/PhpSpreadsheet/pull/3494)\n- Stock charts will now read and reproduce `upDownBars` and subsidiary tags; these were previously ignored on read and hard-coded on write. [PR #3515](https://github.com/PHPOffice/PhpSpreadsheet/pull/3515)\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Updates Cell formula absolute ranges/references, and Defined Name absolute ranges/references when inserting/deleting rows/columns. [Issue #3368](https://github.com/PHPOffice/PhpSpreadsheet/issues/3368) [PR #3402](https://github.com/PHPOffice/PhpSpreadsheet/pull/3402)\n- EOMONTH() and EDATE() Functions should round date value before evaluation. [Issue #3436](https://github.com/PHPOffice/PhpSpreadsheet/issues/3436) [PR #3437](https://github.com/PHPOffice/PhpSpreadsheet/pull/3437)\n- NETWORKDAYS function erroneously being converted to NETWORK_xlfn.DAYS in Xlsx Writer. [Issue #3461](https://github.com/PHPOffice/PhpSpreadsheet/issues/3461) [PR #3463](https://github.com/PHPOffice/PhpSpreadsheet/pull/3463)\n- Getting a style for a CellAddress instance fails if the worksheet is set in the CellAddress instance. [Issue #3439](https://github.com/PHPOffice/PhpSpreadsheet/issues/3439) [PR #3469](https://github.com/PHPOffice/PhpSpreadsheet/pull/3469)\n- Shared Formulae outside the filter range when reading with a filter are not always being identified. [Issue #3473](https://github.com/PHPOffice/PhpSpreadsheet/issues/3473) [PR #3474](https://github.com/PHPOffice/PhpSpreadsheet/pull/3474)\n- Xls Reader Conditional Styles. [PR #3400](https://github.com/PHPOffice/PhpSpreadsheet/pull/3400)\n- Allow use of # and 0 digit placeholders in fraction masks. [PR #3401](https://github.com/PHPOffice/PhpSpreadsheet/pull/3401)\n- Modify Date/Time check in the NumberFormatter for decimal/fractional times. [PR #3413](https://github.com/PHPOffice/PhpSpreadsheet/pull/3413)\n- Misplaced Xml Writing Chart Label FillColor. [Issue #3397](https://github.com/PHPOffice/PhpSpreadsheet/issues/3397) [PR #3404](https://github.com/PHPOffice/PhpSpreadsheet/pull/3404)\n- TEXT function ignores Time in DateTimeStamp. [Issue #3409](https://github.com/PHPOffice/PhpSpreadsheet/issues/3409) [PR #3411](https://github.com/PHPOffice/PhpSpreadsheet/pull/3411)\n- Xlsx Column Autosize Approximate for CJK. [Issue #3405](https://github.com/PHPOffice/PhpSpreadsheet/issues/3405) [PR #3416](https://github.com/PHPOffice/PhpSpreadsheet/pull/3416)\n- Correct Xlsx Parsing of quotePrefix=\"0\". [Issue #3435](https://github.com/PHPOffice/PhpSpreadsheet/issues/3435) [PR #3438](https://github.com/PHPOffice/PhpSpreadsheet/pull/3438)\n- More Display Options for Chart Axis and Legend. [Issue #3414](https://github.com/PHPOffice/PhpSpreadsheet/issues/3414) [PR #3434](https://github.com/PHPOffice/PhpSpreadsheet/pull/3434)\n- Apply strict type checking to Complex suffix. [PR #3452](https://github.com/PHPOffice/PhpSpreadsheet/pull/3452)\n- Incorrect Font Color Read Xlsx Rich Text Indexed Color Custom Palette. [Issue #3464](https://github.com/PHPOffice/PhpSpreadsheet/issues/3464) [PR #3465](https://github.com/PHPOffice/PhpSpreadsheet/pull/3465)\n- Xlsx Writer Honor Alignment in Default Font. [Issue #3443](https://github.com/PHPOffice/PhpSpreadsheet/issues/3443) [PR #3459](https://github.com/PHPOffice/PhpSpreadsheet/pull/3459)\n- Support Border for Charts. [PR #3462](https://github.com/PHPOffice/PhpSpreadsheet/pull/3462)\n- Error in \"this row\" structured reference calculation (cached result from first row when using a range) [Issue #3504](https://github.com/PHPOffice/PhpSpreadsheet/issues/3504) [PR #3505](https://github.com/PHPOffice/PhpSpreadsheet/pull/3505)\n- Allow colour palette index references in Number Format masks [Issue #3511](https://github.com/PHPOffice/PhpSpreadsheet/issues/3511) [PR #3512](https://github.com/PHPOffice/PhpSpreadsheet/pull/3512)\n- Xlsx Reader formula with quotePrefix [Issue #3495](https://github.com/PHPOffice/PhpSpreadsheet/issues/3495) [PR #3497](https://github.com/PHPOffice/PhpSpreadsheet/pull/3497)\n- Handle REF error as part of range [Issue #3453](https://github.com/PHPOffice/PhpSpreadsheet/issues/3453) [PR #3467](https://github.com/PHPOffice/PhpSpreadsheet/pull/3467)\n- Handle Absolute Pathnames in Rels File [Issue #3553](https://github.com/PHPOffice/PhpSpreadsheet/issues/3553) [PR #3554](https://github.com/PHPOffice/PhpSpreadsheet/pull/3554)\n- Return Page Breaks in Order [Issue #3552](https://github.com/PHPOffice/PhpSpreadsheet/issues/3552) [PR #3555](https://github.com/PHPOffice/PhpSpreadsheet/pull/3555)\n- Add position attribute for MemoryDrawing in Html [Issue #3529](https://github.com/PHPOffice/PhpSpreadsheet/issues/3529 [PR #3535](https://github.com/PHPOffice/PhpSpreadsheet/pull/3535)\n- Allow Index_number as Array for VLOOKUP/HLOOKUP [Issue #3561](https://github.com/PHPOffice/PhpSpreadsheet/issues/3561 [PR #3570](https://github.com/PHPOffice/PhpSpreadsheet/pull/3570)\n- Add Unsupported Options in Xml Spreadsheet [Issue #3566](https://github.com/PHPOffice/PhpSpreadsheet/issues/3566 [Issue #3568](https://github.com/PHPOffice/PhpSpreadsheet/issues/3568 [Issue #3569](https://github.com/PHPOffice/PhpSpreadsheet/issues/3569 [PR #3567](https://github.com/PHPOffice/PhpSpreadsheet/pull/3567)\n- Changes to NUMBERVALUE, VALUE, DATEVALUE, TIMEVALUE [Issue #3574](https://github.com/PHPOffice/PhpSpreadsheet/issues/3574 [PR #3575](https://github.com/PHPOffice/PhpSpreadsheet/pull/3575)\n- Redo calculation of color tinting [Issue #3550](https://github.com/PHPOffice/PhpSpreadsheet/issues/3550) [PR #3580](https://github.com/PHPOffice/PhpSpreadsheet/pull/3580)\n- Accommodate Slash with preg_quote [PR #3582](https://github.com/PHPOffice/PhpSpreadsheet/pull/3582) [PR #3583](https://github.com/PHPOffice/PhpSpreadsheet/pull/3583) [PR #3584](https://github.com/PHPOffice/PhpSpreadsheet/pull/3584)\n- HyperlinkBase Property and Html Handling of Properties [Issue #3573](https://github.com/PHPOffice/PhpSpreadsheet/issues/3573) [PR #3589](https://github.com/PHPOffice/PhpSpreadsheet/pull/3589)\n- Improvements for Data Validation [Issue #3592](https://github.com/PHPOffice/PhpSpreadsheet/issues/3592) [Issue #3594](https://github.com/PHPOffice/PhpSpreadsheet/issues/3594) [PR #3605](https://github.com/PHPOffice/PhpSpreadsheet/pull/3605)\n\n## 1.28.0 - 2023-02-25\n\n### Added\n\n- Support for configuring a Chart Title's overlay [PR #3325](https://github.com/PHPOffice/PhpSpreadsheet/pull/3325)\n- Wizards for defining Number Format masks for Numbers, Percentages, Scientific, Currency and Accounting [PR #3334](https://github.com/PHPOffice/PhpSpreadsheet/pull/3334)\n- Support for fixed value divisor in fractional Number Format Masks [PR #3339](https://github.com/PHPOffice/PhpSpreadsheet/pull/3339)\n- Allow More Fonts/Fontnames for Exact Width Calculation [PR #3326](https://github.com/PHPOffice/PhpSpreadsheet/pull/3326) [Issue #3190](https://github.com/PHPOffice/PhpSpreadsheet/issues/3190)\n- Allow override of the Value Binder when setting a Cell value [PR #3361](https://github.com/PHPOffice/PhpSpreadsheet/pull/3361)\n\n### Changed\n\n- Improved handling for @ placeholder in Number Format Masks [PR #3344](https://github.com/PHPOffice/PhpSpreadsheet/pull/3344)\n- Improved handling for ? placeholder in Number Format Masks [PR #3394](https://github.com/PHPOffice/PhpSpreadsheet/pull/3394)\n- Improved support for locale settings and currency codes when matching formatted strings to numerics in the Calculation Engine [PR #3373](https://github.com/PHPOffice/PhpSpreadsheet/pull/3373) and [PR #3374](https://github.com/PHPOffice/PhpSpreadsheet/pull/3374) \n- Improved support for locale settings and matching in the Advanced Value Binder [PR #3376](https://github.com/PHPOffice/PhpSpreadsheet/pull/3376)\n- `toFormattedString` will now always return a string. This can affect the results of `toArray`, `namedRangeToArray`, and `rangeToArray`. [PR #3304](https://github.com/PHPOffice/PhpSpreadsheet/pull/3304)\n- Value of constants FORMAT_CURRENCY_EUR and FORMAT_CURRENCY_USD is changed. [Issue #3577](https://github.com/PHPOffice/PhpSpreadsheet/issues/3577) [PR #3377](https://github.com/PHPOffice/PhpSpreadsheet/pull/3377)\n\n### Deprecated\n\n- Rationalisation of Pre-defined Currency Format Masks [PR #3377](https://github.com/PHPOffice/PhpSpreadsheet/pull/3377)\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Calculation Engine doesn't evaluate Defined Name when default cell A1 is quote-prefixed [Issue #3335](https://github.com/PHPOffice/PhpSpreadsheet/issues/3335) [PR #3336](https://github.com/PHPOffice/PhpSpreadsheet/pull/3336)\n- XLSX Writer - Array Formulas do not include function prefix [Issue #3337](https://github.com/PHPOffice/PhpSpreadsheet/issues/3337) [PR #3338](https://github.com/PHPOffice/PhpSpreadsheet/pull/3338)\n- Permit Max Column for Row Breaks [Issue #3143](https://github.com/PHPOffice/PhpSpreadsheet/issues/3143) [PR #3345](https://github.com/PHPOffice/PhpSpreadsheet/pull/3345)\n- AutoSize Columns should allow for dropdown icon when AutoFilter is for a Table [Issue #3356](https://github.com/PHPOffice/PhpSpreadsheet/issues/3356) [PR #3358](https://github.com/PHPOffice/PhpSpreadsheet/pull/3358) and for Center Alignment of Headers [Issue #3395](https://github.com/PHPOffice/PhpSpreadsheet/issues/3395) [PR #3399](https://github.com/PHPOffice/PhpSpreadsheet/pull/3399)\n- Decimal Precision for Scientific Number Format Mask [Issue #3381](https://github.com/PHPOffice/PhpSpreadsheet/issues/3381) [PR #3382](https://github.com/PHPOffice/PhpSpreadsheet/pull/3382)\n- Xls Writer Parser Handle Boolean Literals as Function Arguments [Issue #3369](https://github.com/PHPOffice/PhpSpreadsheet/issues/3369) [PR #3391](https://github.com/PHPOffice/PhpSpreadsheet/pull/3391)\n- Conditional Formatting Improvements for Xlsx [Issue #3370](https://github.com/PHPOffice/PhpSpreadsheet/issues/3370) [Issue #3202](https://github.com/PHPOffice/PhpSpreadsheet/issues/3302) [PR #3372](https://github.com/PHPOffice/PhpSpreadsheet/pull/3372)\n- Coerce Bool to Int for Mathematical Operations on Arrays [Issue #3389](https://github.com/PHPOffice/PhpSpreadsheet/issues/3389) [Issue #3396](https://github.com/PHPOffice/PhpSpreadsheet/issues/3396) [PR #3392](https://github.com/PHPOffice/PhpSpreadsheet/pull/3392)\n\n## 1.27.1 - 2023-02-08\n\n### Added\n\n- Nothing\n\n### Changed\n\n- Nothing\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Fix Composer --dev dependency issue with dealerdirect/phpcodesniffer-composer-installer renaming their `master` branch to `main`\n\n\n## 1.27.0 - 2023-01-24\n\n### Added\n\n- Option to specify a range of columns/rows for the Row/Column `isEmpty()` methods [PR #3315](https://github.com/PHPOffice/PhpSpreadsheet/pull/3315)\n- Option for Cell Iterator to return a null value or create and return a new cell when accessing a cell that doesn't exist [PR #3314](https://github.com/PHPOffice/PhpSpreadsheet/pull/3314)\n- Support for Structured References in the Calculation Engine [PR #3261](https://github.com/PHPOffice/PhpSpreadsheet/pull/3261)\n- Limited Support for Form Controls [PR #3130](https://github.com/PHPOffice/PhpSpreadsheet/pull/3130) [Issue #2396](https://github.com/PHPOffice/PhpSpreadsheet/issues/2396) [Issue #1770](https://github.com/PHPOffice/PhpSpreadsheet/issues/1770) [Issue #2388](https://github.com/PHPOffice/PhpSpreadsheet/issues/2388) [Issue #2904](https://github.com/PHPOffice/PhpSpreadsheet/issues/2904) [Issue #2661](https://github.com/PHPOffice/PhpSpreadsheet/issues/2661)\n\n### Changed\n\n- Nothing\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Shared/JAMA is removed. [PR #3260](https://github.com/PHPOffice/PhpSpreadsheet/pull/3260)\n\n### Fixed\n\n- Namespace-Aware Code for SheetViewOptions, SheetProtection [PR #3230](https://github.com/PHPOffice/PhpSpreadsheet/pull/3230)\n- Additional Method for XIRR if Newton-Raphson Doesn't Converge [Issue #689](https://github.com/PHPOffice/PhpSpreadsheet/issues/689) [PR #3262](https://github.com/PHPOffice/PhpSpreadsheet/pull/3262)\n- Better Handling of Composite Charts [Issue #2333](https://github.com/PHPOffice/PhpSpreadsheet/issues/2333) [PR #3265](https://github.com/PHPOffice/PhpSpreadsheet/pull/3265)\n- Update Column Reference for Columns Beginning with Y and Z [Issue #3263](https://github.com/PHPOffice/PhpSpreadsheet/issues/3263) [PR #3264](https://github.com/PHPOffice/PhpSpreadsheet/pull/3264)\n- Honor Fit to 1-Page Height Html/Pdf [Issue #3266](https://github.com/PHPOffice/PhpSpreadsheet/issues/3266) [PR #3279](https://github.com/PHPOffice/PhpSpreadsheet/pull/3279)\n- AND/OR/XOR Handling of Literal Strings [PR #3287](https://github.com/PHPOffice/PhpSpreadsheet/pull/3287)\n- Xls Reader Vertical Break and Writer Page Order [Issue #3305](https://github.com/PHPOffice/PhpSpreadsheet/issues/3305) [PR #3306](https://github.com/PHPOffice/PhpSpreadsheet/pull/3306)\n\n\n## 1.26.0 - 2022-12-21\n\n### Added\n\n- Extended flag options for the Reader `load()` and Writer `save()` methods\n- Apply Row/Column limits (1048576 and XFD) in ReferenceHelper [PR #3213](https://github.com/PHPOffice/PhpSpreadsheet/pull/3213)\n- Allow the creation of In-Memory Drawings from a string of binary image data, or from a stream. [PR #3157](https://github.com/PHPOffice/PhpSpreadsheet/pull/3157)\n- Xlsx Reader support for Pivot Tables [PR #2829](https://github.com/PHPOffice/PhpSpreadsheet/pull/2829)\n- Permit Date/Time Entered on Spreadsheet to be calculated as Float [Issue #1416](https://github.com/PHPOffice/PhpSpreadsheet/issues/1416) [PR #3121](https://github.com/PHPOffice/PhpSpreadsheet/pull/3121)\n\n### Changed\n\n- Nothing\n\n### Deprecated\n\n- Direct update of Calculation::suppressFormulaErrors is replaced with setter.\n- Font public static variable defaultColumnWidths replaced with constant DEFAULT_COLUMN_WIDTHS.\n- ExcelError public static variable errorCodes replaced with constant ERROR_CODES.\n- NumberFormat constant FORMAT_DATE_YYYYMMDD2 replaced with existing identical FORMAT_DATE_YYYYMMDD.\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Fixed handling for `_xlws` prefixed functions from Office365 [Issue #3245](https://github.com/PHPOffice/PhpSpreadsheet/issues/3245) [PR #3247](https://github.com/PHPOffice/PhpSpreadsheet/pull/3247)\n- Conditionals formatting rules applied to rows/columns are removed [Issue #3184](https://github.com/PHPOffice/PhpSpreadsheet/issues/3184) [PR #3213](https://github.com/PHPOffice/PhpSpreadsheet/pull/3213)\n- Treat strings containing currency or accounting values as floats in Calculation Engine operations [Issue #3165](https://github.com/PHPOffice/PhpSpreadsheet/issues/3165) [PR #3189](https://github.com/PHPOffice/PhpSpreadsheet/pull/3189)\n- Treat strings containing percentage values as floats in Calculation Engine operations [Issue #3155](https://github.com/PHPOffice/PhpSpreadsheet/issues/3155) [PR #3156](https://github.com/PHPOffice/PhpSpreadsheet/pull/3156) and [PR #3164](https://github.com/PHPOffice/PhpSpreadsheet/pull/3164)\n- Xlsx Reader Accept Palette of Fewer than 64 Colors [Issue #3093](https://github.com/PHPOffice/PhpSpreadsheet/issues/3093) [PR #3096](https://github.com/PHPOffice/PhpSpreadsheet/pull/3096)\n- Use Locale-Independent Float Conversion for Xlsx Writer Custom Property [Issue #3095](https://github.com/PHPOffice/PhpSpreadsheet/issues/3095) [PR #3099](https://github.com/PHPOffice/PhpSpreadsheet/pull/3099)\n- Allow setting AutoFilter range on a single cell or row [Issue #3102](https://github.com/PHPOffice/PhpSpreadsheet/issues/3102) [PR #3111](https://github.com/PHPOffice/PhpSpreadsheet/pull/3111)\n- Xlsx Reader External Data Validations Flag Missing [Issue #2677](https://github.com/PHPOffice/PhpSpreadsheet/issues/2677) [PR #3078](https://github.com/PHPOffice/PhpSpreadsheet/pull/3078)\n- Reduces extra memory usage on `__destruct()` calls [PR #3092](https://github.com/PHPOffice/PhpSpreadsheet/pull/3092)\n- Additional properties for Trendlines [Issue #3011](https://github.com/PHPOffice/PhpSpreadsheet/issues/3011) [PR #3028](https://github.com/PHPOffice/PhpSpreadsheet/pull/3028)\n- Calculation suppressFormulaErrors fix [Issue #1531](https://github.com/PHPOffice/PhpSpreadsheet/issues/1531) [PR #3092](https://github.com/PHPOffice/PhpSpreadsheet/pull/3092)\n- Permit Date/Time Entered on Spreadsheet to be Calculated as Float [Issue #1416](https://github.com/PHPOffice/PhpSpreadsheet/issues/1416) [PR #3121](https://github.com/PHPOffice/PhpSpreadsheet/pull/3121)\n- Incorrect Handling of Data Validation Formula Containing Ampersand [Issue #3145](https://github.com/PHPOffice/PhpSpreadsheet/issues/3145) [PR #3146](https://github.com/PHPOffice/PhpSpreadsheet/pull/3146)\n- Xlsx Namespace Handling of Drawings, RowAndColumnAttributes, MergeCells [Issue #3138](https://github.com/PHPOffice/PhpSpreadsheet/issues/3138) [PR #3136](https://github.com/PHPOffice/PhpSpreadsheet/pull/3137)\n- Generation3 Copy With Image in Footer [Issue #3126](https://github.com/PHPOffice/PhpSpreadsheet/issues/3126) [PR #3140](https://github.com/PHPOffice/PhpSpreadsheet/pull/3140)\n- MATCH Function Problems with Int/Float Compare and Wildcards [Issue #3141](https://github.com/PHPOffice/PhpSpreadsheet/issues/3141) [PR #3142](https://github.com/PHPOffice/PhpSpreadsheet/pull/3142)\n- Fix ODS Read Filter on number-columns-repeated cell [Issue #3148](https://github.com/PHPOffice/PhpSpreadsheet/issues/3148) [PR #3149](https://github.com/PHPOffice/PhpSpreadsheet/pull/3149)\n- Problems Formatting Very Small and Very Large Numbers [Issue #3128](https://github.com/PHPOffice/PhpSpreadsheet/issues/3128) [PR #3152](https://github.com/PHPOffice/PhpSpreadsheet/pull/3152)\n- XlsxWrite preserve line styles for y-axis, not just x-axis [PR #3163](https://github.com/PHPOffice/PhpSpreadsheet/pull/3163)\n- Xlsx Namespace Handling of Drawings, RowAndColumnAttributes, MergeCells [Issue #3138](https://github.com/PHPOffice/PhpSpreadsheet/issues/3138) [PR #3137](https://github.com/PHPOffice/PhpSpreadsheet/pull/3137)\n- More Detail for Cyclic Error Messages [Issue #3169](https://github.com/PHPOffice/PhpSpreadsheet/issues/3169) [PR #3170](https://github.com/PHPOffice/PhpSpreadsheet/pull/3170)\n- Improved Documentation for Deprecations - many PRs [Issue #3162](https://github.com/PHPOffice/PhpSpreadsheet/issues/3162)\n\n\n## 1.25.2 - 2022-09-25\n\n### Added\n\n- Nothing\n\n### Changed\n\n- Nothing\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Composer dependency clash with ezyang/htmlpurifier\n\n\n## 1.25.0 - 2022-09-25\n\n### Added\n\n- Implementation of the new `TEXTBEFORE()`, `TEXTAFTER()` and `TEXTSPLIT()` Excel Functions\n- Implementation of the `ARRAYTOTEXT()` and `VALUETOTEXT()` Excel Functions\n- Support for [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) implementation of\n  JpGraph library to render charts added.\n- Charts: Add Gradients, Transparency, Hidden Axes, Rounded Corners, Trendlines, Date Axes.\n\n### Changed\n\n- Allow variant behaviour when merging cells [Issue #3065](https://github.com/PHPOffice/PhpSpreadsheet/issues/3065)\n  - Merge methods now allow an additional `$behaviour` argument. Permitted values are:\n    - Worksheet::MERGE_CELL_CONTENT_EMPTY - Empty the content of the hidden cells (the default behaviour)\n    - Worksheet::MERGE_CELL_CONTENT_HIDE - Keep the content of the hidden cells\n    - Worksheet::MERGE_CELL_CONTENT_MERGE - Move the content of the hidden cells into the first cell\n\n### Deprecated\n\n- Axis getLineProperty deprecated in favor of getLineColorProperty.\n- Moved majorGridlines and minorGridlines from Chart to Axis. Setting either in Chart constructor or through Chart methods, or getting either using Chart methods is deprecated.\n- Chart::EXCEL_COLOR_TYPE_* copied from Properties to ChartColor; use in Properties is deprecated.\n- ChartColor::EXCEL_COLOR_TYPE_ARGB deprecated in favor of EXCEL_COLOR_TYPE_RGB (\"A\" component was never allowed).\n- Misspelled Properties::LINE_STYLE_DASH_SQUERE_DOT deprecated in favor of LINE_STYLE_DASH_SQUARE_DOT.\n- Clone not permitted for Spreadsheet. Spreadsheet->copy() can be used instead.\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Fix update to defined names when inserting/deleting rows/columns [Issue #3076](https://github.com/PHPOffice/PhpSpreadsheet/issues/3076) [PR #3077](https://github.com/PHPOffice/PhpSpreadsheet/pull/3077)\n- Fix DataValidation sqRef when inserting/deleting rows/columns [Issue #3056](https://github.com/PHPOffice/PhpSpreadsheet/issues/3056) [PR #3074](https://github.com/PHPOffice/PhpSpreadsheet/pull/3074)\n- Named ranges not usable as anchors in OFFSET function [Issue #3013](https://github.com/PHPOffice/PhpSpreadsheet/issues/3013)\n- Fully flatten an array [Issue #2955](https://github.com/PHPOffice/PhpSpreadsheet/issues/2955) [PR #2956](https://github.com/PHPOffice/PhpSpreadsheet/pull/2956)\n- cellExists() and getCell() methods should support UTF-8 named cells [Issue #2987](https://github.com/PHPOffice/PhpSpreadsheet/issues/2987) [PR #2988](https://github.com/PHPOffice/PhpSpreadsheet/pull/2988)\n- Spreadsheet copy fixed, clone disabled. [PR #2951](https://github.com/PHPOffice/PhpSpreadsheet/pull/2951)\n- Fix PDF problems with text rotation and paper size. [Issue #1747](https://github.com/PHPOffice/PhpSpreadsheet/issues/1747) [Issue #1713](https://github.com/PHPOffice/PhpSpreadsheet/issues/1713) [PR #2960](https://github.com/PHPOffice/PhpSpreadsheet/pull/2960)\n- Limited support for chart titles as formulas [Issue #2965](https://github.com/PHPOffice/PhpSpreadsheet/issues/2965) [Issue #749](https://github.com/PHPOffice/PhpSpreadsheet/issues/749) [PR #2971](https://github.com/PHPOffice/PhpSpreadsheet/pull/2971)\n- Add Gradients, Transparency, and Hidden Axes to Chart [Issue #2257](https://github.com/PHPOffice/PhpSpreadsheet/issues/2257) [Issue #2229](https://github.com/PHPOffice/PhpSpreadsheet/issues/2929) [Issue #2935](https://github.com/PHPOffice/PhpSpreadsheet/issues/2935) [PR #2950](https://github.com/PHPOffice/PhpSpreadsheet/pull/2950)\n- Chart Support for Rounded Corners and Trendlines [Issue #2968](https://github.com/PHPOffice/PhpSpreadsheet/issues/2968) [Issue #2815](https://github.com/PHPOffice/PhpSpreadsheet/issues/2815) [PR #2976](https://github.com/PHPOffice/PhpSpreadsheet/pull/2976)\n- Add setName Method for Chart [Issue #2991](https://github.com/PHPOffice/PhpSpreadsheet/issues/2991) [PR #3001](https://github.com/PHPOffice/PhpSpreadsheet/pull/3001)\n- Eliminate partial dependency on php-intl in StringHelper [Issue #2982](https://github.com/PHPOffice/PhpSpreadsheet/issues/2982) [PR #2994](https://github.com/PHPOffice/PhpSpreadsheet/pull/2994)\n- Minor changes for Pdf [Issue #2999](https://github.com/PHPOffice/PhpSpreadsheet/issues/2999) [PR #3002](https://github.com/PHPOffice/PhpSpreadsheet/pull/3002) [PR #3006](https://github.com/PHPOffice/PhpSpreadsheet/pull/3006)\n- Html/Pdf Do net set background color for cells using (default) nofill [PR #3016](https://github.com/PHPOffice/PhpSpreadsheet/pull/3016)\n- Add support for Date Axis to Chart [Issue #2967](https://github.com/PHPOffice/PhpSpreadsheet/issues/2967) [PR #3018](https://github.com/PHPOffice/PhpSpreadsheet/pull/3018)\n- Reconcile Differences Between Css and Excel for Cell Alignment [PR #3048](https://github.com/PHPOffice/PhpSpreadsheet/pull/3048)\n- R1C1 Format Internationalization and Better Support for Relative Offsets [Issue #1704](https://github.com/PHPOffice/PhpSpreadsheet/issues/1704) [PR #3052](https://github.com/PHPOffice/PhpSpreadsheet/pull/3052)\n- Minor Fix for Percentage Formatting [Issue #1929](https://github.com/PHPOffice/PhpSpreadsheet/issues/1929) [PR #3053](https://github.com/PHPOffice/PhpSpreadsheet/pull/3053)\n\n## 1.24.1 - 2022-07-18\n\n### Added\n\n- Support for SimpleCache Interface versions 1.0, 2.0 and 3.0\n- Add Chart Axis Option textRotation [Issue #2705](https://github.com/PHPOffice/PhpSpreadsheet/issues/2705) [PR #2940](https://github.com/PHPOffice/PhpSpreadsheet/pull/2940)\n\n### Changed\n\n- Nothing\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Fix Encoding issue with Html reader (PHP 8.2 deprecation for mb_convert_encoding) [Issue #2942](https://github.com/PHPOffice/PhpSpreadsheet/issues/2942) [PR #2943](https://github.com/PHPOffice/PhpSpreadsheet/pull/2943)\n- Additional Chart fixes\n  - Pie chart with part separated unwantedly [Issue #2506](https://github.com/PHPOffice/PhpSpreadsheet/issues/2506) [PR #2928](https://github.com/PHPOffice/PhpSpreadsheet/pull/2928)\n  - Chart styling is lost on simple load / save process [Issue #1797](https://github.com/PHPOffice/PhpSpreadsheet/issues/1797) [Issue #2077](https://github.com/PHPOffice/PhpSpreadsheet/issues/2077) [PR #2930](https://github.com/PHPOffice/PhpSpreadsheet/pull/2930)\n  - Can't create contour chart (surface 2d) [Issue #2931](https://github.com/PHPOffice/PhpSpreadsheet/issues/2931) [PR #2933](https://github.com/PHPOffice/PhpSpreadsheet/pull/2933)\n- VLOOKUP Breaks When Array Contains Null Cells [Issue #2934](https://github.com/PHPOffice/PhpSpreadsheet/issues/2934) [PR #2939](https://github.com/PHPOffice/PhpSpreadsheet/pull/2939)\n\n## 1.24.0 - 2022-07-09\n\nNote that this will be the last 1.x branch release before the 2.x release. We will maintain both branches in parallel for a time; but users are requested to update to version 2.0 once that is fully available.\n\n### Added\n\n- Added `removeComment()` method for Worksheet [PR #2875](https://github.com/PHPOffice/PhpSpreadsheet/pull/2875/files)\n- Add point size option for scatter charts [Issue #2298](https://github.com/PHPOffice/PhpSpreadsheet/issues/2298) [PR #2801](https://github.com/PHPOffice/PhpSpreadsheet/pull/2801)\n- Basic support for Xlsx reading/writing Chart Sheets [PR #2830](https://github.com/PHPOffice/PhpSpreadsheet/pull/2830)\n\n  Note that a ChartSheet is still only written as a normal Worksheet containing a single chart, not as an actual ChartSheet.\n\n- Added Worksheet visibility in Ods Reader [PR #2851](https://github.com/PHPOffice/PhpSpreadsheet/pull/2851) and Gnumeric Reader [PR #2853](https://github.com/PHPOffice/PhpSpreadsheet/pull/2853)\n- Added Worksheet visibility in Ods Writer [PR #2850](https://github.com/PHPOffice/PhpSpreadsheet/pull/2850)\n- Allow Csv Reader to treat string as contents of file [Issue #1285](https://github.com/PHPOffice/PhpSpreadsheet/issues/1285) [PR #2792](https://github.com/PHPOffice/PhpSpreadsheet/pull/2792)\n- Allow Csv Reader to store null string rather than leave cell empty [Issue #2840](https://github.com/PHPOffice/PhpSpreadsheet/issues/2840) [PR #2842](https://github.com/PHPOffice/PhpSpreadsheet/pull/2842)\n- Provide new Worksheet methods to identify if a row or column is \"empty\", making allowance for different definitions of \"empty\":\n  - Treat rows/columns containing no cell records as empty (default)\n  - Treat cells containing a null value as empty\n  - Treat cells containing an empty string as empty\n\n### Changed\n\n- Modify `rangeBoundaries()`, `rangeDimension()` and `getRangeBoundaries()` Coordinate methods to work with row/column ranges as well as with cell ranges and cells [PR #2926](https://github.com/PHPOffice/PhpSpreadsheet/pull/2926)\n- Better enforcement of value modification to match specified datatype when using `setValueExplicit()`\n- Relax validation of merge cells to allow merge for a single cell reference [Issue #2776](https://github.com/PHPOffice/PhpSpreadsheet/issues/2776)\n- Memory and speed improvements, particularly for the Cell Collection, and the Writers.\n\n  See [the Discussion section on github](https://github.com/PHPOffice/PhpSpreadsheet/discussions/2821) for details of performance across versions\n- Improved performance for removing rows/columns from a worksheet\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Xls Reader resolving absolute named ranges to relative ranges [Issue #2826](https://github.com/PHPOffice/PhpSpreadsheet/issues/2826) [PR #2827](https://github.com/PHPOffice/PhpSpreadsheet/pull/2827)\n- Null value handling in the Excel Math/Trig PRODUCT() function [Issue #2833](https://github.com/PHPOffice/PhpSpreadsheet/issues/2833) [PR #2834](https://github.com/PHPOffice/PhpSpreadsheet/pull/2834)\n- Invalid Print Area defined in Xlsx corrupts internal storage of print area [Issue #2848](https://github.com/PHPOffice/PhpSpreadsheet/issues/2848) [PR #2849](https://github.com/PHPOffice/PhpSpreadsheet/pull/2849)\n- Time interval formatting [Issue #2768](https://github.com/PHPOffice/PhpSpreadsheet/issues/2768) [PR #2772](https://github.com/PHPOffice/PhpSpreadsheet/pull/2772)\n- Copy from Xls(x) to Html/Pdf loses drawings [PR #2788](https://github.com/PHPOffice/PhpSpreadsheet/pull/2788)\n- Html Reader converting cell containing 0 to null string [Issue #2810](https://github.com/PHPOffice/PhpSpreadsheet/issues/2810) [PR #2813](https://github.com/PHPOffice/PhpSpreadsheet/pull/2813)\n- Many fixes for Charts, especially, but not limited to, Scatter, Bubble, and Surface charts. [Issue #2762](https://github.com/PHPOffice/PhpSpreadsheet/issues/2762) [Issue #2299](https://github.com/PHPOffice/PhpSpreadsheet/issues/2299) [Issue #2700](https://github.com/PHPOffice/PhpSpreadsheet/issues/2700) [Issue #2817](https://github.com/PHPOffice/PhpSpreadsheet/issues/2817) [Issue #2763](https://github.com/PHPOffice/PhpSpreadsheet/issues/2763) [Issue #2219](https://github.com/PHPOffice/PhpSpreadsheet/issues/2219) [Issue #2863](https://github.com/PHPOffice/PhpSpreadsheet/issues/2863) [PR #2828](https://github.com/PHPOffice/PhpSpreadsheet/pull/2828) [PR #2841](https://github.com/PHPOffice/PhpSpreadsheet/pull/2841) [PR #2846](https://github.com/PHPOffice/PhpSpreadsheet/pull/2846) [PR #2852](https://github.com/PHPOffice/PhpSpreadsheet/pull/2852) [PR #2856](https://github.com/PHPOffice/PhpSpreadsheet/pull/2856) [PR #2865](https://github.com/PHPOffice/PhpSpreadsheet/pull/2865) [PR #2872](https://github.com/PHPOffice/PhpSpreadsheet/pull/2872) [PR #2879](https://github.com/PHPOffice/PhpSpreadsheet/pull/2879) [PR #2898](https://github.com/PHPOffice/PhpSpreadsheet/pull/2898) [PR #2906](https://github.com/PHPOffice/PhpSpreadsheet/pull/2906) [PR #2922](https://github.com/PHPOffice/PhpSpreadsheet/pull/2922) [PR #2923](https://github.com/PHPOffice/PhpSpreadsheet/pull/2923)\n- Adjust both coordinates for two-cell anchors when rows/columns are added/deleted. [Issue #2908](https://github.com/PHPOffice/PhpSpreadsheet/issues/2908) [PR #2909](https://github.com/PHPOffice/PhpSpreadsheet/pull/2909)\n- Keep calculated string results below 32K. [PR #2921](https://github.com/PHPOffice/PhpSpreadsheet/pull/2921)\n- Filter out illegal Unicode char values FFFE/FFFF. [Issue #2897](https://github.com/PHPOffice/PhpSpreadsheet/issues/2897) [PR #2910](https://github.com/PHPOffice/PhpSpreadsheet/pull/2910)\n- Better handling of REF errors and propagation of all errors in Calculation engine. [PR #2902](https://github.com/PHPOffice/PhpSpreadsheet/pull/2902)\n- Calculating Engine regexp for Column/Row references when there are multiple quoted worksheet references in the formula [Issue #2874](https://github.com/PHPOffice/PhpSpreadsheet/issues/2874) [PR #2899](https://github.com/PHPOffice/PhpSpreadsheet/pull/2899)\n\n## 1.23.0 - 2022-04-24\n\n### Added\n\n- Ods Writer support for Freeze Pane [Issue #2013](https://github.com/PHPOffice/PhpSpreadsheet/issues/2013) [PR #2755](https://github.com/PHPOffice/PhpSpreadsheet/pull/2755)\n- Ods Writer support for setting column width/row height (including the use of AutoSize) [Issue #2346](https://github.com/PHPOffice/PhpSpreadsheet/issues/2346) [PR #2753](https://github.com/PHPOffice/PhpSpreadsheet/pull/2753)\n- Introduced CellAddress, CellRange, RowRange and ColumnRange value objects that can be used as an alternative to a string value (e.g. `'C5'`, `'B2:D4'`, `'2:2'` or `'B:C'`) in appropriate contexts.\n- Implementation of the FILTER(), SORT(), SORTBY() and UNIQUE() Lookup/Reference (array) functions.\n- Implementation of the ISREF() Information function.\n- Added support for reading \"formatted\" numeric values from Csv files; although default behaviour of reading these values as strings is preserved.\n\n  (i.e a value of \"12,345.67\" can be read as numeric `12345.67`, not simply as a string `\"12,345.67\"`, if the `castFormattedNumberToNumeric()` setting is enabled.\n\n  This functionality is locale-aware, using the server's locale settings to identify the thousands and decimal separators.\n\n- Support for two cell anchor drawing of images. [#2532](https://github.com/PHPOffice/PhpSpreadsheet/pull/2532) [#2674](https://github.com/PHPOffice/PhpSpreadsheet/pull/2674)\n- Limited support for Xls Reader to handle Conditional Formatting:\n\n  Ranges and Rules are read, but style is currently limited to font size, weight and color; and to fill style and color.\n\n- Add ability to suppress Mac line ending check for CSV [#2623](https://github.com/PHPOffice/PhpSpreadsheet/pull/2623)\n- Initial support for creating and writing Tables (Xlsx Writer only) [PR #2671](https://github.com/PHPOffice/PhpSpreadsheet/pull/2671)\n\n  See `/samples/Table` for examples of use.\n\n  Note that PreCalculateFormulas needs to be disabled when saving spreadsheets containing tables with formulae (totals or column formulae).\n\n### Changed\n\n- Gnumeric Reader now loads number formatting for cells.\n- Gnumeric Reader now correctly identifies selected worksheet and selected cells in a worksheet.\n- Some Refactoring of the Ods Reader, moving all formula and address translation from Ods to Excel into a separate class to eliminate code duplication and ensure consistency.\n- Make Boolean Conversion in Csv Reader locale-aware when using the String Value Binder.\n\n  This is determined by the Calculation Engine locale setting.\n\n  (i.e. `\"Vrai\"` wil be converted to a boolean `true` if the Locale is set to `fr`.)\n- Allow `psr/simple-cache` 2.x\n\n### Deprecated\n\n- All Excel Function implementations in `Calculation\\Functions` (including the Error functions) have been moved to dedicated classes for groups of related functions. See the docblocks against all the deprecated methods for details of the new methods to call instead. At some point, these old classes will be deleted.\n- Worksheet methods that reference cells \"byColumnandRow\". All such methods have an equivalent that references the cell by its address (e.g. '`E3'` rather than `5, 3`).\n\n  These functions now accept either a cell address string (`'E3')` or an array with columnId and rowId (`[5, 3]`) or a new `CellAddress` object as their `cellAddress`/`coordinate` argument.\n  This includes the methods:\n  - `setCellValueByColumnAndRow()` use the equivalent `setCellValue()`\n  - `setCellValueExplicitByColumnAndRow()` use the equivalent `setCellValueExplicit()`\n  - `getCellByColumnAndRow()` use the equivalent `getCell()`\n  - `cellExistsByColumnAndRow()` use the equivalent `cellExists()`\n  - `getStyleByColumnAndRow()` use the equivalent `getStyle()`\n  - `setBreakByColumnAndRow()` use the equivalent `setBreak()`\n  - `mergeCellsByColumnAndRow()` use the equivalent `mergeCells()`\n  - `unmergeCellsByColumnAndRow()` use the equivalent `unmergeCells()`\n  - `protectCellsByColumnAndRow()` use the equivalent `protectCells()`\n  - `unprotectCellsByColumnAndRow()` use the equivalent `unprotectCells()`\n  - `setAutoFilterByColumnAndRow()` use the equivalent `setAutoFilter()`\n  - `freezePaneByColumnAndRow()` use the equivalent `freezePane()`\n  - `getCommentByColumnAndRow()` use the equivalent `getComment()`\n  - `setSelectedCellByColumnAndRow()` use the equivalent `setSelectedCells()`\n\n  This change provides more consistency in the methods (not every \"by cell address\" method has an equivalent \"byColumnAndRow\" method);\n  and the \"by cell address\" methods often provide more flexibility, such as allowing a range of cells, or referencing them by passing the defined name of a named range as the argument.\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Make allowance for the AutoFilter dropdown icon in the first row of an Autofilter range when using Autosize columns. [Issue #2413](https://github.com/PHPOffice/PhpSpreadsheet/issues/2413) [PR #2754](https://github.com/PHPOffice/PhpSpreadsheet/pull/2754)\n- Support for \"chained\" ranges (e.g. `A5:C10:C20:F1`) in the Calculation Engine; and also support for using named ranges with the Range operator (e.g. `NamedRange1:NamedRange2`) [Issue #2730](https://github.com/PHPOffice/PhpSpreadsheet/issues/2730) [PR #2746](https://github.com/PHPOffice/PhpSpreadsheet/pull/2746)\n- Update Conditional Formatting ranges and rule conditions when inserting/deleting rows/columns [Issue #2678](https://github.com/PHPOffice/PhpSpreadsheet/issues/2678) [PR #2689](https://github.com/PHPOffice/PhpSpreadsheet/pull/2689)\n- Allow `INDIRECT()` to accept row/column ranges as well as cell ranges [PR #2687](https://github.com/PHPOffice/PhpSpreadsheet/pull/2687)\n- Fix bug when deleting cells with hyperlinks, where the hyperlink was then being \"inherited\" by whatever cell moved to that cell address.\n- Fix bug in Conditional Formatting in the Xls Writer that resulted in a broken file when there were multiple conditional ranges in a worksheet.\n- Fix Conditional Formatting in the Xls Writer to work with rules that contain string literals, cell references and formulae.\n- Fix for setting Active Sheet to the first loaded worksheet when bookViews element isn't defined [Issue #2666](https://github.com/PHPOffice/PhpSpreadsheet/issues/2666) [PR #2669](https://github.com/PHPOffice/PhpSpreadsheet/pull/2669)\n- Fixed behaviour of XLSX font style vertical align settings [PR #2619](https://github.com/PHPOffice/PhpSpreadsheet/pull/2619)\n- Resolved formula translations to handle separators (row and column) for array functions as well as for function argument separators; and cleanly handle nesting levels.\n\n  Note that this method is used when translating Excel functions between `en_us` and other locale languages, as well as when converting formulae between different spreadsheet formats (e.g. Ods to Excel).\n\n  Nor is this a perfect solution, as there may still be issues when function calls have array arguments that themselves contain function calls; but it's still better than the current logic.\n- Fix for escaping double quotes within a formula [Issue #1971](https://github.com/PHPOffice/PhpSpreadsheet/issues/1971) [PR #2651](https://github.com/PHPOffice/PhpSpreadsheet/pull/2651)\n- Change open mode for output from `wb+` to `wb` [Issue #2372](https://github.com/PHPOffice/PhpSpreadsheet/issues/2372) [PR #2657](https://github.com/PHPOffice/PhpSpreadsheet/pull/2657)\n- Use color palette if supplied [Issue #2499](https://github.com/PHPOffice/PhpSpreadsheet/issues/2499) [PR #2595](https://github.com/PHPOffice/PhpSpreadsheet/pull/2595)\n- Xls reader treat drawing offsets as int rather than float [PR #2648](https://github.com/PHPOffice/PhpSpreadsheet/pull/2648)\n- Handle booleans in conditional styles properly [PR #2654](https://github.com/PHPOffice/PhpSpreadsheet/pull/2654)\n- Fix for reading files in the root directory of a ZipFile, which should not be prefixed by relative paths (\"./\") as dirname($filename) does by default.\n- Fix invalid style of cells in empty columns with columnDimensions and rows with rowDimensions in added external sheet. [PR #2739](https://github.com/PHPOffice/PhpSpreadsheet/pull/2739)\n- Time Interval Formatting [Issue #2768](https://github.com/PHPOffice/PhpSpreadsheet/issues/2768) [PR #2772](https://github.com/PHPOffice/PhpSpreadsheet/pull/2772)\n\n## 1.22.0 - 2022-02-18\n\n### Added\n\n- Namespacing phase 2 - styles.\n[PR #2471](https://github.com/PHPOffice/PhpSpreadsheet/pull/2471)\n\n- Improved support for passing of array arguments to Excel function implementations to return array results (where appropriate). [Issue #2551](https://github.com/PHPOffice/PhpSpreadsheet/issues/2551)\n\n  This is the first stage in an ongoing process of adding array support to all appropriate function implementations,\n- Support for the Excel365 Math/Trig SEQUENCE() function [PR #2536](https://github.com/PHPOffice/PhpSpreadsheet/pull/2536)\n- Support for the Excel365 Math/Trig RANDARRAY() function [PR #2540](https://github.com/PHPOffice/PhpSpreadsheet/pull/2540)\n\n  Note that the Spill Operator is not yet supported in the Calculation Engine; but this can still be useful for defining array constants.\n- Improved support for Conditional Formatting Rules [PR #2491](https://github.com/PHPOffice/PhpSpreadsheet/pull/2491)\n  - Provide support for a wider range of Conditional Formatting Rules for Xlsx Reader/Writer:\n    - Cells Containing (cellIs)\n    - Specific Text (containing, notContaining, beginsWith, endsWith)\n    - Dates Occurring (all supported timePeriods)\n    - Blanks/NoBlanks\n    - Errors/NoErrors\n    - Duplicates/Unique\n    - Expression\n  - Provision of CF Wizards (for all the above listed rule types) to help create/modify CF Rules without having to manage all the combinations of types/operators, and the complexities of formula expressions, or the text/timePeriod attributes.\n\n    See [documentation](https://phpspreadsheet.readthedocs.io/en/latest/topics/conditional-formatting/) for details\n\n  - Full support of the above CF Rules for the Xlsx Reader and Writer; even when the file being loaded has CF rules listed in the `<extLst><ext><ConditionalFormattings>` element for the worksheet rather than the `<ConditionalFormatting>` element.\n  - Provision of a CellMatcher to identify if rules are matched for a cell, and which matching style will be applied.\n  - Improved documentation and examples, covering all supported CF rule types.\n  - Add support for one digit decimals (FORMAT_NUMBER_0, FORMAT_PERCENTAGE_0). [PR #2525](https://github.com/PHPOffice/PhpSpreadsheet/pull/2525)\n  - Initial work enabling Excel function implementations for handling arrays as arguments when used in \"array formulae\" [#2562](https://github.com/PHPOffice/PhpSpreadsheet/issues/2562)\n  - Enable most of the Date/Time functions to accept array arguments [#2573](https://github.com/PHPOffice/PhpSpreadsheet/issues/2573)\n  - Array ready functions - Text, Math/Trig, Statistical, Engineering and Logical [#2580](https://github.com/PHPOffice/PhpSpreadsheet/issues/2580)\n\n### Changed\n\n- Additional Russian translations for Excel Functions (courtesy of aleks-samurai).\n- Improved code coverage for NumberFormat. [PR #2556](https://github.com/PHPOffice/PhpSpreadsheet/pull/2556)\n- Extract some methods from the Calculation Engine into dedicated classes [#2537](https://github.com/PHPOffice/PhpSpreadsheet/issues/2537)\n- Eliminate calls to `flattenSingleValue()` that are no longer required when we're checking for array values as arguments [#2590](https://github.com/PHPOffice/PhpSpreadsheet/issues/2590)\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Fixed `ReferenceHelper@insertNewBefore` behavior when removing column before last column with null value [PR #2541](https://github.com/PHPOffice/PhpSpreadsheet/pull/2541)\n- Fix bug with `DOLLARDE()` and `DOLLARFR()` functions when the dollar value is negative [Issue #2578](https://github.com/PHPOffice/PhpSpreadsheet/issues/2578) [PR #2579](https://github.com/PHPOffice/PhpSpreadsheet/pull/2579)\n- Fix partial function name matching when translating formulae from Russian to English [Issue #2533](https://github.com/PHPOffice/PhpSpreadsheet/issues/2533) [PR #2534](https://github.com/PHPOffice/PhpSpreadsheet/pull/2534)\n- Various bugs related to Conditional Formatting Rules, and errors in the Xlsx Writer for Conditional Formatting [PR #2491](https://github.com/PHPOffice/PhpSpreadsheet/pull/2491)\n- Xlsx Reader merge range fixes. [Issue #2501](https://github.com/PHPOffice/PhpSpreadsheet/issues/2501) [PR #2504](https://github.com/PHPOffice/PhpSpreadsheet/pull/2504)\n- Handle explicit \"date\" type for Cell in Xlsx Reader. [Issue #2373](https://github.com/PHPOffice/PhpSpreadsheet/issues/2373) [PR #2485](https://github.com/PHPOffice/PhpSpreadsheet/pull/2485)\n- Recalibrate Row/Column Dimensions after removeRow/Column. [Issue #2442](https://github.com/PHPOffice/PhpSpreadsheet/issues/2442) [PR #2486](https://github.com/PHPOffice/PhpSpreadsheet/pull/2486)\n- Refinement for XIRR. [Issue #2469](https://github.com/PHPOffice/PhpSpreadsheet/issues/2469) [PR #2487](https://github.com/PHPOffice/PhpSpreadsheet/pull/2487)\n- Xlsx Reader handle cell with non-null explicit type but null value. [Issue #2488](https://github.com/PHPOffice/PhpSpreadsheet/issues/2488) [PR #2489](https://github.com/PHPOffice/PhpSpreadsheet/pull/2489)\n- Xlsx Reader fix height and width for oneCellAnchorDrawings. [PR #2492](https://github.com/PHPOffice/PhpSpreadsheet/pull/2492)\n- Fix rounding error in NumberFormat::NUMBER_PERCENTAGE, NumberFormat::NUMBER_PERCENTAGE_00. [PR #2555](https://github.com/PHPOffice/PhpSpreadsheet/pull/2555)\n- Don't treat thumbnail file as xml. [Issue #2516](https://github.com/PHPOffice/PhpSpreadsheet/issues/2516) [PR #2517](https://github.com/PHPOffice/PhpSpreadsheet/pull/2517)\n- Eliminating Xlsx Reader warning when no sz tag for RichText. [Issue #2542](https://github.com/PHPOffice/PhpSpreadsheet/issues/2542) [PR #2550](https://github.com/PHPOffice/PhpSpreadsheet/pull/2550)\n- Fix Xlsx/Xls Writer handling of inline strings. [Issue #353](https://github.com/PHPOffice/PhpSpreadsheet/issues/353) [PR #2569](https://github.com/PHPOffice/PhpSpreadsheet/pull/2569)\n- Richtext colors were not being read correctly after namespace change [#2458](https://github.com/PHPOffice/PhpSpreadsheet/issues/2458)\n- Fix discrepancy between the way markdown tables are rendered in ReadTheDocs and in PHPStorm [#2520](https://github.com/PHPOffice/PhpSpreadsheet/issues/2520)\n- Update Russian Functions Text File [#2557](https://github.com/PHPOffice/PhpSpreadsheet/issues/2557)\n- Fix documentation, instantiation example [#2564](https://github.com/PHPOffice/PhpSpreadsheet/issues/2564)\n\n\n## 1.21.0 - 2022-01-06\n\n### Added\n\n- Ability to add a picture to the background of the comment. Supports four image formats: png, jpeg, gif, bmp. New `Comment::setSizeAsBackgroundImage()` to change the size of a comment to the size of a background image. [Issue #1547](https://github.com/PHPOffice/PhpSpreadsheet/issues/1547) [PR #2422](https://github.com/PHPOffice/PhpSpreadsheet/pull/2422)\n- Ability to set default paper size and orientation [PR #2410](https://github.com/PHPOffice/PhpSpreadsheet/pull/2410)\n- Ability to extend AutoFilter to Maximum Row [PR #2414](https://github.com/PHPOffice/PhpSpreadsheet/pull/2414)\n\n### Changed\n\n- Xlsx Writer will evaluate AutoFilter only if it is as yet unevaluated, or has changed since it was last evaluated [PR #2414](https://github.com/PHPOffice/PhpSpreadsheet/pull/2414)\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Rounding in `NumberFormatter` [Issue #2385](https://github.com/PHPOffice/PhpSpreadsheet/issues/2385) [PR #2399](https://github.com/PHPOffice/PhpSpreadsheet/pull/2399)\n- Support for themes [Issue #2075](https://github.com/PHPOffice/PhpSpreadsheet/issues/2075) [Issue #2387](https://github.com/PHPOffice/PhpSpreadsheet/issues/2387) [PR #2403](https://github.com/PHPOffice/PhpSpreadsheet/pull/2403)\n- Read spreadsheet with `#` in name [Issue #2405](https://github.com/PHPOffice/PhpSpreadsheet/issues/2405) [PR #2409](https://github.com/PHPOffice/PhpSpreadsheet/pull/2409)\n- Improve PDF support for page size and orientation [Issue #1691](https://github.com/PHPOffice/PhpSpreadsheet/issues/1691) [PR #2410](https://github.com/PHPOffice/PhpSpreadsheet/pull/2410)\n- Wildcard handling issues in text match [Issue #2430](https://github.com/PHPOffice/PhpSpreadsheet/issues/2430) [PR #2431](https://github.com/PHPOffice/PhpSpreadsheet/pull/2431)\n- Respect DataType in `insertNewBefore` [PR #2433](https://github.com/PHPOffice/PhpSpreadsheet/pull/2433)\n- Handle rows explicitly hidden after AutoFilter [Issue #1641](https://github.com/PHPOffice/PhpSpreadsheet/issues/1641) [PR #2414](https://github.com/PHPOffice/PhpSpreadsheet/pull/2414)\n- Special characters in image file name [Issue #1470](https://github.com/PHPOffice/PhpSpreadsheet/issues/1470) [Issue #2415](https://github.com/PHPOffice/PhpSpreadsheet/issues/2415) [PR #2416](https://github.com/PHPOffice/PhpSpreadsheet/pull/2416)\n- Mpdf with very many styles [Issue #2432](https://github.com/PHPOffice/PhpSpreadsheet/issues/2432) [PR #2434](https://github.com/PHPOffice/PhpSpreadsheet/pull/2434)\n- Name clashes between parsed and unparsed drawings [Issue #1767](https://github.com/PHPOffice/PhpSpreadsheet/issues/1767) [Issue #2396](https://github.com/PHPOffice/PhpSpreadsheet/issues/2396) [PR #2423](https://github.com/PHPOffice/PhpSpreadsheet/pull/2423)\n- Fill pattern start and end colors [Issue #2441](https://github.com/PHPOffice/PhpSpreadsheet/issues/2441) [PR #2444](https://github.com/PHPOffice/PhpSpreadsheet/pull/2444)\n- General style specified in wrong case [Issue #2450](https://github.com/PHPOffice/PhpSpreadsheet/issues/2450) [PR #2451](https://github.com/PHPOffice/PhpSpreadsheet/pull/2451)\n- Null passed to `AutoFilter::setRange()` [Issue #2281](https://github.com/PHPOffice/PhpSpreadsheet/issues/2281) [PR #2454](https://github.com/PHPOffice/PhpSpreadsheet/pull/2454)\n- Another undefined index in Xls reader (#2470) [Issue #2463](https://github.com/PHPOffice/PhpSpreadsheet/issues/2463) [PR #2470](https://github.com/PHPOffice/PhpSpreadsheet/pull/2470)\n- Allow single-cell checks on conditional styles, even when the style is configured for a range of cells (#) [PR #2483](https://github.com/PHPOffice/PhpSpreadsheet/pull/2483)\n\n## 1.20.0 - 2021-11-23\n\n### Added\n\n- Xlsx Writer Support for WMF Files [#2339](https://github.com/PHPOffice/PhpSpreadsheet/issues/2339)\n- Use standard temporary file for internal use of HTMLPurifier [#2383](https://github.com/PHPOffice/PhpSpreadsheet/issues/2383)\n\n### Changed\n\n- Drop support for PHP 7.2, according to https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support\n- Use native typing for objects that were already documented as such\n\n### Deprecated\n\n- Nothing\n\n### Removed\n\n- Nothing\n\n### Fixed\n\n- Fixed null conversation for strToUpper [#2292](https://github.com/PHPOffice/PhpSpreadsheet/issues/2292)\n- Fixed Trying to access array offset on value of type null (Xls Reader) [#2315](https://github.com/PHPOffice/PhpSpreadsheet/issues/2315)\n- Don't corrupt XLSX files containing data validation [#2377](https://github.com/PHPOffice/PhpSpreadsheet/issues/2377)\n- Non-fixed cells were not updated if shared formula has a fixed cell [#2354](https://github.com/PHPOffice/PhpSpreadsheet/issues/2354)\n- Declare key of generic ArrayObject\n- CSV reader better support for boolean values [#2374](https://github.com/PHPOffice/PhpSpreadsheet/pull/2374)\n- Some ZIP file could not be read [#2376](https://github.com/PHPOffice/PhpSpreadsheet/pull/2376)\n- Fix regression were hyperlinks could not be read [#2391](https://github.com/PHPOffice/PhpSpreadsheet/pull/2391)\n- AutoFilter Improvements [#2393](https://github.com/PHPOffice/PhpSpreadsheet/pull/2393)\n- Don't corrupt file when using chart with fill color [#589](https://github.com/PHPOffice/PhpSpreadsheet/pull/589)\n- Restore imperfect array formula values in xlsx writer [#2343](https://github.com/PHPOffice/PhpSpreadsheet/pull/2343)\n- Restore explicit list of changes to PHPExcel migration document [#1546](https://github.com/PHPOffice/PhpSpreadsheet/issues/1546)\n\n## 1.19.0 - 2021-10-31\n\n### Added\n\n- Ability to set style on named range, and validate input to setSelectedCells [Issue #2279](https://github.com/PHPOffice/PhpSpreadsheet/issues/2279) [PR #2280](https://github.com/PHPOffice/PhpSpreadsheet/pull/2280)\n- Process comments in Sylk file [Issue #2276](https://github.com/PHPOffice/PhpSpreadsheet/issues/2276) [PR #2277](https://github.com/PHPOffice/PhpSpreadsheet/pull/2277)\n- Addition of Custom Properties to Ods Writer, and 32-bit-safe timestamps for Document Properties [PR #2113](https://github.com/PHPOffice/PhpSpreadsheet/pull/2113)\n- Added callback to CSV reader to set user-specified defaults for various properties (especially for escape which has a poor PHP-inherited default of backslash which does not correspond with Excel) [PR #2103](https://github.com/PHPOffice/PhpSpreadsheet/pull/2103)\n- Phase 1 of better namespace handling for Xlsx, resolving many open issues [PR #2173](https://github.com/PHPOffice/PhpSpreadsheet/pull/2173) [PR #2204](https://github.com/PHPOffice/PhpSpreadsheet/pull/2204) [PR #2303](https://github.com/PHPOffice/PhpSpreadsheet/pull/2303)\n- Add ability to extract images if source is a URL [Issue #1997](https://github.com/PHPOffice/PhpSpreadsheet/issues/1997) [PR #2072](https://github.com/PHPOffice/PhpSpreadsheet/pull/2072)\n- Support for passing flags in the Reader `load()` and Writer `save()`methods, and through the IOFactory, to set behaviours [PR #2136](https://github.com/PHPOffice/PhpSpreadsheet/pull/2136)\n    - See [documentation](https://phpspreadsheet.readthedocs.io/en/latest/topics/reading-and-writing-to-file/#readerwriter-flags) for details\n- More flexibility in the StringValueBinder to determine what datatypes should be treated as strings [PR #2138](https://github.com/PHPOffice/PhpSpreadsheet/pull/2138)\n- Helper class for conversion between css size Units of measure (`px`, `pt`, `pc`, `in`, `cm`, `mm`) [PR #2152](https://github.com/PHPOffice/PhpSpreadsheet/issues/2145)\n- Allow Row height and Column Width to be set using different units of measure (`px`, `pt`, `pc`, `in`, `cm`, `mm`), rather than only in points or MS Excel column width units [PR #2152](https://github.com/PHPOffice/PhpSpreadsheet/issues/2145)\n- Ability to stream to an Amazon S3 bucket [Issue #2249](https://github.com/PHPOffice/PhpSpreadsheet/issues/2249)\n- Provided a Size Helper class to validate size values (pt, px, em) [PR #1694](https://github.com/PHPOffice/PhpSpreadsheet/pull/1694)\n\n### Changed\n\n- Nothing.\n\n### Deprecated\n\n- PHP 8.1 will deprecate auto_detect_line_endings. As a result of this change, Csv Reader using some release after PHP8.1 will no longer be able to handle a Csv with Mac line endings.\n\n### Removed\n\n- Nothing.\n\n### Fixed\n\n- Unexpected format in Xlsx Timestamp [Issue #2331](https://github.com/PHPOffice/PhpSpreadsheet/issues/2331) [PR #2332](https://github.com/PHPOffice/PhpSpreadsheet/pull/2332)\n- Corrections for HLOOKUP [Issue #2123](https://github.com/PHPOffice/PhpSpreadsheet/issues/2123) [PR #2330](https://github.com/PHPOffice/PhpSpreadsheet/pull/2330)\n- Corrections for Xlsx Read Comments [Issue #2316](https://github.com/PHPOffice/PhpSpreadsheet/issues/2316) [PR #2329](https://github.com/PHPOffice/PhpSpreadsheet/pull/2329)\n- Lowercase Calibri font names [Issue #2273](https://github.com/PHPOffice/PhpSpreadsheet/issues/2273) [PR #2325](https://github.com/PHPOffice/PhpSpreadsheet/pull/2325)\n- isFormula Referencing Sheet with Space in Title [Issue #2304](https://github.com/PHPOffice/PhpSpreadsheet/issues/2304) [PR #2306](https://github.com/PHPOffice/PhpSpreadsheet/pull/2306)\n- Xls Reader Fatal Error due to Undefined Offset [Issue #1114](https://github.com/PHPOffice/PhpSpreadsheet/issues/1114) [PR #2308](https://github.com/PHPOffice/PhpSpreadsheet/pull/2308)\n- Permit Csv Reader delimiter to be set to null [Issue #2287](https://github.com/PHPOffice/PhpSpreadsheet/issues/2287) [PR #2288](https://github.com/PHPOffice/PhpSpreadsheet/pull/2288)\n- Csv Reader did not handle booleans correctly [PR #2232](https://github.com/PHPOffice/PhpSpreadsheet/pull/2232)\n- Problems when deleting sheet with local defined name [Issue #2266](https://github.com/PHPOffice/PhpSpreadsheet/issues/2266) [PR #2284](https://github.com/PHPOffice/PhpSpreadsheet/pull/2284)\n- Worksheet passwords were not always handled correctly [Issue #1897](https://github.com/PHPOffice/PhpSpreadsheet/issues/1897) [PR #2197](https://github.com/PHPOffice/PhpSpreadsheet/pull/2197)\n- Gnumeric Reader will now distinguish between Created and Modified timestamp [PR #2133](https://github.com/PHPOffice/PhpSpreadsheet/pull/2133)\n- Xls Reader will now handle MACCENTRALEUROPE with or without hyphen [Issue #549](https://github.com/PHPOffice/PhpSpreadsheet/issues/549) [PR #2213](https://github.com/PHPOffice/PhpSpreadsheet/pull/2213)\n- Tweaks to input file validation [Issue #1718](https://github.com/PHPOffice/PhpSpreadsheet/issues/1718) [PR #2217](https://github.com/PHPOffice/PhpSpreadsheet/pull/2217)\n- Html Reader did not handle comments correctly [Issue #2234](https://github.com/PHPOffice/PhpSpreadsheet/issues/2234) [PR #2235](https://github.com/PHPOffice/PhpSpreadsheet/pull/2235)\n- Apache OpenOffice Uses Unexpected Case for General format [Issue #2239](https://github.com/PHPOffice/PhpSpreadsheet/issues/2239) [PR #2242](https://github.com/PHPOffice/PhpSpreadsheet/pull/2242)\n- Problems with fraction formatting [Issue #2253](https://github.com/PHPOffice/PhpSpreadsheet/issues/2253) [PR #2254](https://github.com/PHPOffice/PhpSpreadsheet/pull/2254)\n- Xlsx Reader had problems reading file with no styles.xml or empty styles.xml [Issue #2246](https://github.com/PHPOffice/PhpSpreadsheet/issues/2246) [PR #2247](https://github.com/PHPOffice/PhpSpreadsheet/pull/2247)\n- Xlsx Reader did not read Data Validation flags correctly [Issue #2224](https://github.com/PHPOffice/PhpSpreadsheet/issues/2224) [PR #2225](https://github.com/PHPOffice/PhpSpreadsheet/pull/2225)\n- Better handling of empty arguments in Calculation engine [PR #2143](https://github.com/PHPOffice/PhpSpreadsheet/pull/2143)\n- Many fixes for Autofilter [Issue #2216](https://github.com/PHPOffice/PhpSpreadsheet/issues/2216) [PR #2141](https://github.com/PHPOffice/PhpSpreadsheet/pull/2141) [PR #2162](https://github.com/PHPOffice/PhpSpreadsheet/pull/2162) [PR #2218](https://github.com/PHPOffice/PhpSpreadsheet/pull/2218)\n- Locale generator will now use Unix line endings even on Windows [Issue #2172](https://github.com/PHPOffice/PhpSpreadsheet/issues/2172) [PR #2174](https://github.com/PHPOffice/PhpSpreadsheet/pull/2174)\n- Support differences in implementation of Text functions between Excel/Ods/Gnumeric [PR #2151](https://github.com/PHPOffice/PhpSpreadsheet/pull/2151)\n- Fixes to places where PHP8.1 enforces new or previously unenforced restrictions [PR #2137](https://github.com/PHPOffice/PhpSpreadsheet/pull/2137) [PR #2191](https://github.com/PHPOffice/PhpSpreadsheet/pull/2191) [PR #2231](https://github.com/PHPOffice/PhpSpreadsheet/pull/2231)\n- Clone for HashTable was incorrect [PR #2130](https://github.com/PHPOffice/PhpSpreadsheet/pull/2130)\n- Xlsx Reader was not evaluating Document Security Lock correctly [PR #2128](https://github.com/PHPOffice/PhpSpreadsheet/pull/2128)\n- Error in COUPNCD handling end of month [Issue #2116](https://github.com/PHPOffice/PhpSpreadsheet/issues/2116) [PR #2119](https://github.com/PHPOffice/PhpSpreadsheet/pull/2119)\n- Xls Writer Parser did not handle concatenation operator correctly [PR #2080](https://github.com/PHPOffice/PhpSpreadsheet/pull/2080)\n- Xlsx Writer did not handle boolean false correctly [Issue #2082](https://github.com/PHPOffice/PhpSpreadsheet/issues/2082) [PR #2087](https://github.com/PHPOffice/PhpSpreadsheet/pull/2087)\n- SUM needs to treat invalid strings differently depending on whether they come from a cell or are used as literals [Issue #2042](https://github.com/PHPOffice/PhpSpreadsheet/issues/2042) [PR #2045](https://github.com/PHPOffice/PhpSpreadsheet/pull/2045)\n- Html reader could have set illegal coordinates when dealing with embedded tables [Issue #2029](https://github.com/PHPOffice/PhpSpreadsheet/issues/2029) [PR #2032](https://github.com/PHPOffice/PhpSpreadsheet/pull/2032)\n- Documentation for printing gridlines was wrong [PR #2188](https://github.com/PHPOffice/PhpSpreadsheet/pull/2188)\n- Return Value Error - DatabaseAbstruct::buildQuery() return null but must be string [Issue #2158](https://github.com/PHPOffice/PhpSpreadsheet/issues/2158) [PR #2160](https://github.com/PHPOffice/PhpSpreadsheet/pull/2160)\n- Xlsx reader not recognize data validations that references another sheet [Issue #1432](https://github.com/PHPOffice/PhpSpreadsheet/issues/1432) [Issue #2149](https://github.com/PHPOffice/PhpSpreadsheet/issues/2149) [PR #2150](https://github.com/PHPOffice/PhpSpreadsheet/pull/2150) [PR #2265](https://github.com/PHPOffice/PhpSpreadsheet/pull/2265)\n- Don't calculate cell width for autosize columns if a cell contains a null or empty string value [Issue #2165](https://github.com/PHPOffice/PhpSpreadsheet/issues/2165) [PR #2167](https://github.com/PHPOffice/PhpSpreadsheet/pull/2167)\n- Allow negative interest rate values in a number of the Financial functions (`PPMT()`, `PMT()`, `FV()`, `PV()`, `NPER()`, etc) [Issue #2163](https://github.com/PHPOffice/PhpSpreadsheet/issues/2163) [PR #2164](https://github.com/PHPOffice/PhpSpreadsheet/pull/2164)\n- Xls Reader changing grey background to black in Excel template [Issue #2147](https://github.com/PHPOffice/PhpSpreadsheet/issues/2147) [PR #2156](https://github.com/PHPOffice/PhpSpreadsheet/pull/2156)\n- Column width and Row height styles in the Html Reader when the value includes a unit of measure [Issue #2145](https://github.com/PHPOffice/PhpSpreadsheet/issues/2145).\n- Data Validation flags not set correctly when reading XLSX files [Issue #2224](https://github.com/PHPOffice/PhpSpreadsheet/issues/2224) [PR #2225](https://github.com/PHPOffice/PhpSpreadsheet/pull/2225)\n- Reading XLSX files without styles.xml throws an exception [Issue #2246](https://github.com/PHPOffice/PhpSpreadsheet/issues/2246)\n- Improved performance of `Style::applyFromArray()` when applied to several cells [PR #1785](https://github.com/PHPOffice/PhpSpreadsheet/issues/1785).\n- Improve XLSX parsing speed if no readFilter is applied (again) - [#772](https://github.com/PHPOffice/PhpSpreadsheet/issues/772)\n\n## 1.18.0 - 2021-05-31\n\n### Added\n\n- Enhancements to CSV Reader, allowing options to be set when using `IOFactory::load()` with a callback to set delimiter, enclosure, charset etc [PR #2103](https://github.com/PHPOffice/PhpSpreadsheet/pull/2103) - See [documentation](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/docs/topics/reading-and-writing-to-file.md#csv-comma-separated-values) for details.\n- Implemented basic AutoFiltering for Ods Reader and Writer [PR #2053](https://github.com/PHPOffice/PhpSpreadsheet/pull/2053)\n- Implemented basic AutoFiltering for Gnumeric Reader [PR #2055](https://github.com/PHPOffice/PhpSpreadsheet/pull/2055)\n- Improved support for Row and Column ranges in formulae [Issue #1755](https://github.com/PHPOffice/PhpSpreadsheet/issues/1755) [PR #2028](https://github.com/PHPOffice/PhpSpreadsheet/pull/2028)\n- Implemented URLENCODE() Web Function\n- Implemented the CHITEST(), CHISQ.DIST() and CHISQ.INV() and equivalent Statistical functions, for both left- and right-tailed distributions.\n- Support for ActiveSheet and SelectedCells in the ODS Reader and Writer [PR #1908](https://github.com/PHPOffice/PhpSpreadsheet/pull/1908)\n- Support for notContainsText Conditional Style in xlsx [Issue #984](https://github.com/PHPOffice/PhpSpreadsheet/issues/984)\n\n### Changed\n\n- Use of `nb` rather than `no` as the locale code for Norsk Bokmål.\n\n### Deprecated\n\n- All Excel Function implementations in `Calculation\\Database`, `Calculation\\DateTime`, `Calculation\\Engineering`, `Calculation\\Financial`, `Calculation\\Logical`, `Calculation\\LookupRef`, `Calculation\\MathTrig`, `Calculation\\Statistical`, `Calculation\\TextData` and `Calculation\\Web` have been moved to dedicated classes for individual functions or groups of related functions. See the docblocks against all the deprecated methods for details of the new methods to call instead. At some point, these old classes will be deleted.\n\n### Removed\n\n- Use of `nb` rather than `no` as the locale language code for Norsk Bokmål.\n\n### Fixed\n\n- Fixed error in COUPNCD() calculation for end of month [Issue #2116](https://github.com/PHPOffice/PhpSpreadsheet/issues/2116) - [PR #2119](https://github.com/PHPOffice/PhpSpreadsheet/pull/2119)\n- Resolve default values when a null argument is passed for HLOOKUP(), VLOOKUP() and ADDRESS() functions [Issue #2120](https://github.com/PHPOffice/PhpSpreadsheet/issues/2120) - [PR #2121](https://github.com/PHPOffice/PhpSpreadsheet/pull/2121)\n- Fixed incorrect R1C1 to A1 subtraction formula conversion (`R[-2]C-R[2]C`) [Issue #2076](https://github.com/PHPOffice/PhpSpreadsheet/pull/2076) [PR #2086](https://github.com/PHPOffice/PhpSpreadsheet/pull/2086)\n- Correctly handle absolute A1 references when converting to R1C1 format [PR #2060](https://github.com/PHPOffice/PhpSpreadsheet/pull/2060)\n- Correct default fill style for conditional without a pattern defined [Issue #2035](https://github.com/PHPOffice/PhpSpreadsheet/issues/2035) [PR #2050](https://github.com/PHPOffice/PhpSpreadsheet/pull/2050)\n- Fixed issue where array key check for existince before accessing arrays in Xlsx.php [PR #1970](https://github.com/PHPOffice/PhpSpreadsheet/pull/1970)\n- Fixed issue with quoted strings in number format mask rendered with toFormattedString() [Issue 1972#](https://github.com/PHPOffice/PhpSpreadsheet/issues/1972) [PR #1978](https://github.com/PHPOffice/PhpSpreadsheet/pull/1978)\n- Fixed issue with percentage formats in number format mask rendered with toFormattedString() [Issue 1929#](https://github.com/PHPOffice/PhpSpreadsheet/issues/1929) [PR #1928](https://github.com/PHPOffice/PhpSpreadsheet/pull/1928)\n- Fixed issue with _ spacing character in number format mask corrupting output from toFormattedString() [Issue 1924#](https://github.com/PHPOffice/PhpSpreadsheet/issues/1924) [PR #1927](https://github.com/PHPOffice/PhpSpreadsheet/pull/1927)\n- Fix for [Issue #1887](https://github.com/PHPOffice/PhpSpreadsheet/issues/1887) - Lose Track of Selected Cells After Save\n- Fixed issue with Xlsx@listWorksheetInfo not returning any data\n- Fixed invalid arguments triggering mb_substr() error in LEFT(), MID() and RIGHT() text functions [Issue #640](https://github.com/PHPOffice/PhpSpreadsheet/issues/640)\n- Fix for [Issue #1916](https://github.com/PHPOffice/PhpSpreadsheet/issues/1916) - Invalid signature check for XML files\n- Fix change in `Font::setSize()` behavior for PHP8 [PR #2100](https://github.com/PHPOffice/PhpSpreadsheet/pull/2100)\n\n## 1.17.1 - 2021-03-01\n\n### Added\n\n- Implementation of the Excel `AVERAGEIFS()` functions as part of a restructuring of Database functions and Conditional Statistical functions.\n- Support for date values and percentages in query parameters for Database functions, and the IF expressions in functions like COUNTIF() and AVERAGEIF(). [#1875](https://github.com/PHPOffice/PhpSpreadsheet/pull/1875)\n- Support for booleans, and for wildcard text search in query parameters for Database functions, and the IF expressions in functions like COUNTIF() and AVERAGEIF(). [#1876](https://github.com/PHPOffice/PhpSpreadsheet/pull/1876)\n- Implemented DataBar for conditional formatting in Xlsx, providing read/write and creation of (type, value, direction, fills, border, axis position, color settings) as DataBar options in Excel. [#1754](https://github.com/PHPOffice/PhpSpreadsheet/pull/1754)\n- Alignment for ODS Writer [#1796](https://github.com/PHPOffice/PhpSpreadsheet/issues/1796)\n- Basic implementation of the PERMUTATIONA() Statistical Function\n\n### Changed\n\n- Formula functions that previously called PHP functions directly are now processed through the Excel Functions classes; resolving issues with PHP8 stricter typing. [#1789](https://github.com/PHPOffice/PhpSpreadsheet/issues/1789)\n\n  The following MathTrig functions are affected:\n  `ABS()`, `ACOS()`, `ACOSH()`, `ASIN()`, `ASINH()`, `ATAN()`, `ATANH()`,\n  `COS()`, `COSH()`, `DEGREES()` (rad2deg), `EXP()`, `LN()` (log), `LOG10()`,\n  `RADIANS()` (deg2rad), `SIN()`, `SINH()`, `SQRT()`, `TAN()`, `TANH()`.\n\n  One TextData function is also affected: `REPT()` (str_repeat).\n- `formatAsDate` correctly matches language metadata, reverting c55272e\n- Formulae that previously crashed on sub function call returning excel error value now return said value.\n  The following functions are affected `CUMPRINC()`, `CUMIPMT()`, `AMORLINC()`,\n  `AMORDEGRC()`.\n- Adapt some function error return value to match excel's error.\n  The following functions are affected `PPMT()`, `IPMT()`.\n\n### Deprecated\n\n- Calling many of the Excel formula functions directly rather than through the Calculation Engine.\n\n  The logic for these Functions is now being moved out of the categorised `Database`, `DateTime`, `Engineering`, `Financial`, `Logical`, `LookupRef`, `MathTrig`, `Statistical`, `TextData` and `Web` classes into small, dedicated classes for individual functions or related groups of functions.\n\n  This makes the logic in these classes easier to maintain; and will reduce the memory footprint required to execute formulae when calling these functions.\n\n### Removed\n\n- Nothing.\n\n### Fixed\n\n- Avoid Duplicate Titles When Reading Multiple HTML Files.[Issue #1823](https://github.com/PHPOffice/PhpSpreadsheet/issues/1823) [PR #1829](https://github.com/PHPOffice/PhpSpreadsheet/pull/1829)\n- Fixed issue with Worksheet's `getCell()` method when trying to get a cell by defined name. [#1858](https://github.com/PHPOffice/PhpSpreadsheet/issues/1858)\n- Fix possible endless loop in NumberFormat Masks [#1792](https://github.com/PHPOffice/PhpSpreadsheet/issues/1792)\n- Fix problem resulting from  literal dot inside quotes in number format masks [PR #1830](https://github.com/PHPOffice/PhpSpreadsheet/pull/1830)\n- Resolve Google Sheets Xlsx charts issue. Google Sheets uses oneCellAnchor positioning and does not include *Cache values in the exported Xlsx [PR #1761](https://github.com/PHPOffice/PhpSpreadsheet/pull/1761)\n- Fix for Xlsx Chart axis titles mapping to correct X or Y axis label when only one is present [PR #1760](https://github.com/PHPOffice/PhpSpreadsheet/pull/1760)\n- Fix For Null Exception on ODS Read of Page Settings. [#1772](https://github.com/PHPOffice/PhpSpreadsheet/issues/1772)\n- Fix Xlsx reader overriding manually set number format with builtin number format [PR #1805](https://github.com/PHPOffice/PhpSpreadsheet/pull/1805)\n- Fix Xlsx reader cell alignment [PR #1710](https://github.com/PHPOffice/PhpSpreadsheet/pull/1710)\n- Fix for not yet implemented data-types in Open Document writer [Issue #1674](https://github.com/PHPOffice/PhpSpreadsheet/issues/1674)\n- Fix XLSX reader when having a corrupt numeric cell data type [PR #1664](https://github.com/phpoffice/phpspreadsheet/pull/1664)\n- Fix on `CUMPRINC()`, `CUMIPMT()`, `AMORLINC()`, `AMORDEGRC()` usage. When those functions called one of `YEARFRAC()`, `PPMT()`, `IPMT()` and they would get back an error value (represented as a string), trying to use numeral operands (`+`, `/`, `-`, `*`) on said return value and a number (`float or `int`) would fail.\n\n## 1.16.0 - 2020-12-31\n\n### Added\n\n- CSV Reader - Best Guess for Encoding, and Handle Null-string Escape [#1647](https://github.com/PHPOffice/PhpSpreadsheet/issues/1647)\n\n### Changed\n\n- Updated the CONVERT() function to support all current MS Excel categories and Units of Measure.\n\n### Deprecated\n\n- All Excel Function implementations in `Calculation\\Database`, `Calculation\\DateTime`, `Calculation\\Engineering`, `Calculation\\Financial`, `Calculation\\Logical`, `Calculation\\LookupRef`, `Calculation\\MathTrig`, `Calculation\\Statistical`, `Calculation\\TextData` and `Calculation\\Web` have been moved to dedicated classes for individual functions or groups of related functions. See the docblocks against all the deprecated methods for details of the new methods to call instead. At some point, these old classes will be deleted.\n\n### Removed\n\n- Nothing.\n\n### Fixed\n\n- Fixed issue with absolute path in worksheets' Target [PR #1769](https://github.com/PHPOffice/PhpSpreadsheet/pull/1769)\n- Fix for Xls Reader when SST has a bad length [#1592](https://github.com/PHPOffice/PhpSpreadsheet/issues/1592)\n- Resolve Xlsx loader issue whe hyperlinks don't have a destination\n- Resolve issues when printer settings resources IDs clash with drawing IDs\n- Resolve issue with SLK long filenames [#1612](https://github.com/PHPOffice/PhpSpreadsheet/issues/1612)\n- ROUNDUP and ROUNDDOWN return incorrect results for values of 0 [#1627](https://github.com/phpoffice/phpspreadsheet/pull/1627)\n- Apply Column and Row Styles to Existing Cells [#1712](https://github.com/PHPOffice/PhpSpreadsheet/issues/1712) [PR #1721](https://github.com/PHPOffice/PhpSpreadsheet/pull/1721)\n- Resolve issues with defined names where worksheet doesn't exist (#1686)[https://github.com/PHPOffice/PhpSpreadsheet/issues/1686] and [#1723](https://github.com/PHPOffice/PhpSpreadsheet/issues/1723) - [PR #1742](https://github.com/PHPOffice/PhpSpreadsheet/pull/1742)\n- Fix for issue [#1735](https://github.com/PHPOffice/PhpSpreadsheet/issues/1735) Incorrect activeSheetIndex after RemoveSheetByIndex - [PR #1743](https://github.com/PHPOffice/PhpSpreadsheet/pull/1743)\n- Ensure that the list of shared formulae is maintained when an xlsx file is chunked with readFilter[Issue #169](https://github.com/PHPOffice/PhpSpreadsheet/issues/1669).\n- Fix for notice during accessing \"cached magnification factor\" offset [#1354](https://github.com/PHPOffice/PhpSpreadsheet/pull/1354)\n- Fix compatibility with ext-gd on php 8\n\n### Security Fix (CVE-2020-7776)\n\n- Prevent XSS through cell comments in the HTML Writer.\n\n## 1.15.0 - 2020-10-11\n\n### Added\n\n- Implemented Page Order for Xlsx and Xls Readers, and provided Page Settings (Orientation, Scale, Horizontal/Vertical Centering, Page Order, Margins) support for Ods, Gnumeric and Xls Readers [#1559](https://github.com/PHPOffice/PhpSpreadsheet/pull/1559)\n- Implementation of the Excel `LOGNORM.DIST()`, `NORM.S.DIST()`, `GAMMA()` and `GAUSS()` functions. [#1588](https://github.com/PHPOffice/PhpSpreadsheet/pull/1588)\n- Named formula implementation, and improved handling of Defined Names generally [#1535](https://github.com/PHPOffice/PhpSpreadsheet/pull/1535)\n  - Defined Names are now case-insensitive\n  - Distinction between named ranges and named formulae\n  - Correct handling of union and intersection operators in named ranges\n  - Correct evaluation of named range operators in calculations\n  - fix resolution of relative named range values in the calculation engine; previously all named range values had been treated as absolute.\n  - Calculation support for named formulae\n  - Support for nested ranges and formulae (named ranges and formulae that reference other named ranges/formulae) in calculations\n  - Introduction of a helper to convert address formats between R1C1 and A1 (and the reverse)\n  - Proper support for both named ranges and named formulae in all appropriate Readers\n    - **Xlsx** (Previously only simple named ranges were supported)\n    - **Xls** (Previously only simple named ranges were supported)\n    - **Gnumeric** (Previously neither named ranges nor formulae were supported)\n    - **Ods** (Previously neither named ranges nor formulae were supported)\n    - **Xml** (Previously neither named ranges nor formulae were supported)\n  - Proper support for named ranges and named formulae in all appropriate Writers\n    - **Xlsx** (Previously only simple named ranges were supported)\n    - **Xls** (Previously neither named ranges nor formulae were supported) - Still not supported, but some parser issues resolved that previously failed to differentiate between a defined name and a function name\n    - **Ods** (Previously neither named ranges nor formulae were supported)\n- Support for PHP 8.0\n\n### Changed\n\n- Improve Coverage for ODS Reader [#1545](https://github.com/phpoffice/phpspreadsheet/pull/1545)\n- Named formula implementation, and improved handling of Defined Names generally [#1535](https://github.com/PHPOffice/PhpSpreadsheet/pull/1535)\n- fix resolution of relative named range values in the calculation engine; previously all named range values had been treated as absolute.\n- Drop $this->spreadSheet null check from Xlsx Writer [#1646](https://github.com/phpoffice/phpspreadsheet/pull/1646)\n- Improving Coverage for Excel2003 XML Reader [#1557](https://github.com/phpoffice/phpspreadsheet/pull/1557)\n\n### Deprecated\n\n- **IMPORTANT NOTE:** This Introduces a **BC break** in the handling of named ranges. Previously, a named range cell reference of `B2` would be treated identically to a named range cell reference of `$B2` or `B$2` or `$B$2` because the calculation engine treated then all as absolute references. These changes \"fix\" that, so the calculation engine now handles relative references in named ranges correctly.\n  This change that resolves previously incorrect behaviour in the calculation may affect users who have dynamically defined named ranges using relative references when they should have used absolute references.\n\n### Removed\n\n- Nothing.\n\n### Fixed\n\n- PrintArea causes exception [#1544](https://github.com/phpoffice/phpspreadsheet/pull/1544)\n- Calculation/DateTime Failure With PHP8 [#1661](https://github.com/phpoffice/phpspreadsheet/pull/1661)\n- Reader/Gnumeric Failure with PHP8 [#1662](https://github.com/phpoffice/phpspreadsheet/pull/1662)\n- ReverseSort bug, exposed but not caused by PHP8 [#1660](https://github.com/phpoffice/phpspreadsheet/pull/1660)\n- Bug setting Superscript/Subscript to false [#1567](https://github.com/phpoffice/phpspreadsheet/pull/1567)\n\n## 1.14.1 - 2020-07-19\n\n### Added\n\n- nothing\n\n### Fixed\n\n- WEBSERVICE is HTTP client agnostic and must be configured via `Settings::setHttpClient()` [#1562](https://github.com/PHPOffice/PhpSpreadsheet/issues/1562)\n- Borders were not complete on rowspanned columns using HTML reader [#1473](https://github.com/PHPOffice/PhpSpreadsheet/pull/1473)\n\n### Changed\n\n## 1.14.0 - 2020-06-29\n\n### Added\n\n- Add support for IFS() logical function [#1442](https://github.com/PHPOffice/PhpSpreadsheet/pull/1442)\n- Add Cell Address Helper to provide conversions between the R1C1 and A1 address formats [#1558](https://github.com/PHPOffice/PhpSpreadsheet/pull/1558)\n- Add ability to edit Html/Pdf before saving [#1499](https://github.com/PHPOffice/PhpSpreadsheet/pull/1499)\n- Add ability to set codepage explicitly for BIFF5 [#1018](https://github.com/PHPOffice/PhpSpreadsheet/issues/1018)\n- Added support for the WEBSERVICE function [#1409](https://github.com/PHPOffice/PhpSpreadsheet/pull/1409)\n\n### Fixed\n\n- Resolve evaluation of utf-8 named ranges in calculation engine [#1522](https://github.com/PHPOffice/PhpSpreadsheet/pull/1522)\n- Fix HLOOKUP on single row [#1512](https://github.com/PHPOffice/PhpSpreadsheet/pull/1512)\n- Fix MATCH when comparing different numeric types [#1521](https://github.com/PHPOffice/PhpSpreadsheet/pull/1521)\n- Fix exact MATCH on ranges with empty cells [#1520](https://github.com/PHPOffice/PhpSpreadsheet/pull/1520)\n- Fix for Issue [#1516](https://github.com/PHPOffice/PhpSpreadsheet/issues/1516) (Cloning worksheet makes corrupted Xlsx) [#1530](https://github.com/PHPOffice/PhpSpreadsheet/pull/1530)\n- Fix For Issue [#1509](https://github.com/PHPOffice/PhpSpreadsheet/issues/1509) (Can not set empty enclosure for CSV) [#1518](https://github.com/PHPOffice/PhpSpreadsheet/pull/1518)\n- Fix for Issue [#1505](https://github.com/PHPOffice/PhpSpreadsheet/issues/1505) (TypeError : Argument 4 passed to PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Worksheet::writeAttributeIf() must be of the type string) [#1525](https://github.com/PHPOffice/PhpSpreadsheet/pull/1525)\n- Fix for Issue [#1495](https://github.com/PHPOffice/PhpSpreadsheet/issues/1495) (Sheet index being changed when multiple sheets are used in formula) [#1500]((https://github.com/PHPOffice/PhpSpreadsheet/pull/1500))\n- Fix for Issue [#1533](https://github.com/PHPOffice/PhpSpreadsheet/issues/1533) (A reference to a cell containing a string starting with \"#\" leads to errors in the generated xlsx.) [#1534](https://github.com/PHPOffice/PhpSpreadsheet/pull/1534)\n- Xls Writer - Correct Timestamp Bug [#1493](https://github.com/PHPOffice/PhpSpreadsheet/pull/1493)\n- Don't ouput row and columns without any cells in HTML writer [#1235](https://github.com/PHPOffice/PhpSpreadsheet/issues/1235)\n\n## 1.13.0 - 2020-05-31\n\n### Added\n\n- Support writing to streams in all writers [#1292](https://github.com/PHPOffice/PhpSpreadsheet/issues/1292)\n- Support CSV files with data wrapping a lot of lines [#1468](https://github.com/PHPOffice/PhpSpreadsheet/pull/1468)\n- Support protection of worksheet by a specific hash algorithm [#1485](https://github.com/PHPOffice/PhpSpreadsheet/pull/1485)\n\n### Fixed\n\n- Fix Chart samples by updating chart parameter from 0 to DataSeries::EMPTY_AS_GAP [#1448](https://github.com/PHPOffice/PhpSpreadsheet/pull/1448)\n- Fix return type in docblock for the Cells::get() [#1398](https://github.com/PHPOffice/PhpSpreadsheet/pull/1398)\n- Fix RATE, PRICE, XIRR, and XNPV Functions [#1456](https://github.com/PHPOffice/PhpSpreadsheet/pull/1456)\n- Save Excel 2010+ functions properly in XLSX [#1461](https://github.com/PHPOffice/PhpSpreadsheet/pull/1461)\n- Several improvements in HTML writer [#1464](https://github.com/PHPOffice/PhpSpreadsheet/pull/1464)\n- Fix incorrect behaviour when saving XLSX file with drawings [#1462](https://github.com/PHPOffice/PhpSpreadsheet/pull/1462),\n- Fix Crash while trying setting a cell the value \"123456\\n\" [#1476](https://github.com/PHPOffice/PhpSpreadsheet/pull/1481)\n- Improved DATEDIF() function and reduced errors for Y and YM units [#1466](https://github.com/PHPOffice/PhpSpreadsheet/pull/1466)\n- Stricter typing for mergeCells [#1494](https://github.com/PHPOffice/PhpSpreadsheet/pull/1494)\n\n### Changed\n\n- Drop support for PHP 7.1, according to https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support\n- Drop partial migration tool in favor of complete migration via RectorPHP [#1445](https://github.com/PHPOffice/PhpSpreadsheet/issues/1445)\n- Limit composer package to `src/` [#1424](https://github.com/PHPOffice/PhpSpreadsheet/pull/1424)\n\n## 1.12.0 - 2020-04-27\n\n### Added\n\n- Improved the ARABIC function to also handle short-hand roman numerals\n- Added support for the FLOOR.MATH and FLOOR.PRECISE functions [#1351](https://github.com/PHPOffice/PhpSpreadsheet/pull/1351)\n\n### Fixed\n\n- Fix ROUNDUP and ROUNDDOWN for floating-point rounding error [#1404](https://github.com/PHPOffice/PhpSpreadsheet/pull/1404)\n- Fix ROUNDUP and ROUNDDOWN for negative number [#1417](https://github.com/PHPOffice/PhpSpreadsheet/pull/1417)\n- Fix loading styles from vmlDrawings when containing whitespace [#1347](https://github.com/PHPOffice/PhpSpreadsheet/issues/1347)\n- Fix incorrect behavior when removing last row [#1365](https://github.com/PHPOffice/PhpSpreadsheet/pull/1365)\n- MATCH with a static array should return the position of the found value based on the values submitted [#1332](https://github.com/PHPOffice/PhpSpreadsheet/pull/1332)\n- Fix Xlsx Reader's handling of undefined fill color [#1353](https://github.com/PHPOffice/PhpSpreadsheet/pull/1353)\n\n## 1.11.0 - 2020-03-02\n\n### Added\n\n- Added support for the BASE function\n- Added support for the ARABIC function\n- Conditionals - Extend Support for (NOT)CONTAINSBLANKS [#1278](https://github.com/PHPOffice/PhpSpreadsheet/pull/1278)\n\n### Fixed\n\n- Handle Error in Formula Processing Better for Xls [#1267](https://github.com/PHPOffice/PhpSpreadsheet/pull/1267)\n- Handle ConditionalStyle NumberFormat When Reading Xlsx File [#1296](https://github.com/PHPOffice/PhpSpreadsheet/pull/1296)\n- Fix Xlsx Writer's handling of decimal commas [#1282](https://github.com/PHPOffice/PhpSpreadsheet/pull/1282)\n- Fix for issue by removing test code mistakenly left in [#1328](https://github.com/PHPOffice/PhpSpreadsheet/pull/1328)\n- Fix for Xls writer wrong selected cells and active sheet [#1256](https://github.com/PHPOffice/PhpSpreadsheet/pull/1256)\n- Fix active cell when freeze pane is used [#1323](https://github.com/PHPOffice/PhpSpreadsheet/pull/1323)\n- Fix XLSX file loading with autofilter containing '$' [#1326](https://github.com/PHPOffice/PhpSpreadsheet/pull/1326)\n- PHPDoc - Use `@return $this` for fluent methods [#1362](https://github.com/PHPOffice/PhpSpreadsheet/pull/1362)\n\n## 1.10.1 - 2019-12-02\n\n### Changed\n\n- PHP 7.4 compatibility\n\n### Fixed\n\n- FLOOR() function accept negative number and negative significance [#1245](https://github.com/PHPOffice/PhpSpreadsheet/pull/1245)\n- Correct column style even when using rowspan [#1249](https://github.com/PHPOffice/PhpSpreadsheet/pull/1249)\n- Do not confuse defined names and cell refs [#1263](https://github.com/PHPOffice/PhpSpreadsheet/pull/1263)\n- XLSX reader/writer keep decimal for floats with a zero decimal part [#1262](https://github.com/PHPOffice/PhpSpreadsheet/pull/1262)\n- ODS writer prevent invalid numeric value if locale decimal separator is comma [#1268](https://github.com/PHPOffice/PhpSpreadsheet/pull/1268)\n- Xlsx writer actually writes plotVisOnly and dispBlanksAs from chart properties [#1266](https://github.com/PHPOffice/PhpSpreadsheet/pull/1266)\n\n## 1.10.0 - 2019-11-18\n\n### Changed\n\n- Change license from LGPL 2.1 to MIT [#140](https://github.com/PHPOffice/PhpSpreadsheet/issues/140)\n\n### Added\n\n- Implementation of IFNA() logical function\n- Support \"showZeros\" worksheet option to change how Excel shows and handles \"null\" values returned from a calculation\n- Allow HTML Reader to accept HTML as a string into an existing spreadsheet [#1212](https://github.com/PHPOffice/PhpSpreadsheet/pull/1212)\n\n### Fixed\n\n- IF implementation properly handles the value `#N/A` [#1165](https://github.com/PHPOffice/PhpSpreadsheet/pull/1165)\n- Formula Parser: Wrong line count for stuff like \"MyOtherSheet!A:D\" [#1215](https://github.com/PHPOffice/PhpSpreadsheet/issues/1215)\n- Call garbage collector after removing a column to prevent stale cached values\n- Trying to remove a column that doesn't exist deletes the latest column\n- Keep big integer as integer instead of lossely casting to float [#874](https://github.com/PHPOffice/PhpSpreadsheet/pull/874)\n- Fix branch pruning handling of non boolean conditions [#1167](https://github.com/PHPOffice/PhpSpreadsheet/pull/1167)\n- Fix ODS Reader when no DC namespace are defined [#1182](https://github.com/PHPOffice/PhpSpreadsheet/pull/1182)\n- Fixed Functions->ifCondition for allowing <> and empty condition [#1206](https://github.com/PHPOffice/PhpSpreadsheet/pull/1206)\n- Validate XIRR inputs and return correct error values [#1120](https://github.com/PHPOffice/PhpSpreadsheet/issues/1120)\n- Allow to read xlsx files with exotic workbook names like \"workbook2.xml\" [#1183](https://github.com/PHPOffice/PhpSpreadsheet/pull/1183)\n\n## 1.9.0 - 2019-08-17\n\n### Changed\n\n- Drop support for PHP 5.6 and 7.0, according to https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support\n\n### Added\n\n- When &lt;br&gt; appears in a table cell, set the cell to wrap [#1071](https://github.com/PHPOffice/PhpSpreadsheet/issues/1071) and [#1070](https://github.com/PHPOffice/PhpSpreadsheet/pull/1070)\n- Add MAXIFS, MINIFS, COUNTIFS and Remove MINIF, MAXIF [#1056](https://github.com/PHPOffice/PhpSpreadsheet/issues/1056)\n- HLookup needs an ordered list even if range_lookup is set to false [#1055](https://github.com/PHPOffice/PhpSpreadsheet/issues/1055) and [#1076](https://github.com/PHPOffice/PhpSpreadsheet/pull/1076)\n- Improve performance of IF function calls via ranch pruning to avoid resolution of every branches [#844](https://github.com/PHPOffice/PhpSpreadsheet/pull/844)\n- MATCH function supports `*?~` Excel functionality, when match_type=0 [#1116](https://github.com/PHPOffice/PhpSpreadsheet/issues/1116)\n- Allow HTML Reader to accept HTML as a string [#1136](https://github.com/PHPOffice/PhpSpreadsheet/pull/1136)\n\n### Fixed\n\n- Fix to AVERAGEIF() function when called with a third argument\n- Eliminate duplicate fill none style entries [#1066](https://github.com/PHPOffice/PhpSpreadsheet/issues/1066)\n- Fix number format masks containing literal (non-decimal point) dots [#1079](https://github.com/PHPOffice/PhpSpreadsheet/issues/1079)\n- Fix number format masks containing named colours that were being misinterpreted as date formats; and add support for masks that fully replace the value with a full text string [#1009](https://github.com/PHPOffice/PhpSpreadsheet/issues/1009)\n- Stricter-typed comparison testing in COUNTIF() and COUNTIFS() evaluation [#1046](https://github.com/PHPOffice/PhpSpreadsheet/issues/1046)\n- COUPNUM should not return zero when settlement is in the last period [#1020](https://github.com/PHPOffice/PhpSpreadsheet/issues/1020) and [#1021](https://github.com/PHPOffice/PhpSpreadsheet/pull/1021)\n- Fix handling of named ranges referencing sheets with spaces or \"!\" in their title\n- Cover `getSheetByName()` with tests for name with quote and spaces [#739](https://github.com/PHPOffice/PhpSpreadsheet/issues/739)\n- Best effort to support invalid colspan values in HTML reader - [#878](https://github.com/PHPOffice/PhpSpreadsheet/pull/878)\n- Fixes incorrect rows deletion [#868](https://github.com/PHPOffice/PhpSpreadsheet/issues/868)\n- MATCH function fix (value search by type, stop search when match_type=-1 and unordered element encountered) [#1116](https://github.com/PHPOffice/PhpSpreadsheet/issues/1116)\n- Fix `getCalculatedValue()` error with more than two INDIRECT [#1115](https://github.com/PHPOffice/PhpSpreadsheet/pull/1115)\n- Writer\\Html did not hide columns [#985](https://github.com/PHPOffice/PhpSpreadsheet/pull/985)\n\n## 1.8.2 - 2019-07-08\n\n### Fixed\n\n- Uncaught error when opening ods file and properties aren't defined [#1047](https://github.com/PHPOffice/PhpSpreadsheet/issues/1047)\n- Xlsx Reader Cell datavalidations bug [#1052](https://github.com/PHPOffice/PhpSpreadsheet/pull/1052)\n\n## 1.8.1 - 2019-07-02\n\n### Fixed\n\n- Allow nullable theme for Xlsx Style Reader class [#1043](https://github.com/PHPOffice/PhpSpreadsheet/issues/1043)\n\n## 1.8.0 - 2019-07-01\n\n### Security Fix (CVE-2019-12331)\n\n- Detect double-encoded xml in the Security scanner, and reject as suspicious.\n- This change also broadens the scope of the `libxml_disable_entity_loader` setting when reading XML-based formats, so that it is enabled while the xml is being parsed and not simply while it is loaded.\n  On some versions of PHP, this can cause problems because it is not thread-safe, and can affect other PHP scripts running on the same server. This flag is set to true when instantiating a loader, and back to its original setting when the Reader is no longer in scope, or manually unset.\n- Provide a check to identify whether libxml_disable_entity_loader is thread-safe or not.\n\n  `XmlScanner::threadSafeLibxmlDisableEntityLoaderAvailability()`\n- Provide an option to disable the libxml_disable_entity_loader call through settings. This is not recommended as it reduces the security of the XML-based readers, and should only be used if you understand the consequences and have no other choice.\n\n### Added\n\n- Added support for the SWITCH function [#963](https://github.com/PHPOffice/PhpSpreadsheet/issues/963) and [#983](https://github.com/PHPOffice/PhpSpreadsheet/pull/983)\n- Add accounting number format style [#974](https://github.com/PHPOffice/PhpSpreadsheet/pull/974)\n\n### Fixed\n\n- Whitelist `tsv` extension when opening CSV files [#429](https://github.com/PHPOffice/PhpSpreadsheet/issues/429)\n- Fix a SUMIF warning with some versions of PHP when having different length of arrays provided as input [#873](https://github.com/PHPOffice/PhpSpreadsheet/pull/873)\n- Fix incorrectly handled backslash-escaped space characters in number format\n\n## 1.7.0 - 2019-05-26\n\n- Added support for inline styles in Html reader (borders, alignment, width, height)\n- QuotedText cells no longer treated as formulae if the content begins with a `=`\n- Clean handling for DDE in formulae\n\n### Fixed\n\n- Fix handling for escaped enclosures and new lines in CSV Separator Inference\n- Fix MATCH an error was appearing when comparing strings against 0 (always true)\n- Fix wrong calculation of highest column with specified row [#700](https://github.com/PHPOffice/PhpSpreadsheet/issues/700)\n- Fix VLOOKUP\n- Fix return type hint\n\n## 1.6.0 - 2019-01-02\n\n### Added\n\n- Refactored Matrix Functions to use external Matrix library\n- Possibility to specify custom colors of values for pie and donut charts [#768](https://github.com/PHPOffice/PhpSpreadsheet/pull/768)\n\n### Fixed\n\n- Improve XLSX parsing speed if no readFilter is applied [#772](https://github.com/PHPOffice/PhpSpreadsheet/issues/772)\n- Fix column names if read filter calls in XLSX reader skip columns [#777](https://github.com/PHPOffice/PhpSpreadsheet/pull/777)\n- XLSX reader can now ignore blank cells, using the setReadEmptyCells(false) method. [#810](https://github.com/PHPOffice/PhpSpreadsheet/issues/810)\n- Fix LOOKUP function which was breaking on edge cases [#796](https://github.com/PHPOffice/PhpSpreadsheet/issues/796)\n- Fix VLOOKUP with exact matches [#809](https://github.com/PHPOffice/PhpSpreadsheet/pull/809)\n- Support COUNTIFS multiple arguments [#830](https://github.com/PHPOffice/PhpSpreadsheet/pull/830)\n- Change `libxml_disable_entity_loader()` as shortly as possible [#819](https://github.com/PHPOffice/PhpSpreadsheet/pull/819)\n- Improved memory usage and performance when loading large spreadsheets [#822](https://github.com/PHPOffice/PhpSpreadsheet/pull/822)\n- Improved performance when loading large spreadsheets [#825](https://github.com/PHPOffice/PhpSpreadsheet/pull/825)\n- Improved performance when loading large spreadsheets [#824](https://github.com/PHPOffice/PhpSpreadsheet/pull/824)\n- Fix color from CSS when reading from HTML [#831](https://github.com/PHPOffice/PhpSpreadsheet/pull/831)\n- Fix infinite loop when reading invalid ODS files [#832](https://github.com/PHPOffice/PhpSpreadsheet/pull/832)\n- Fix time format for duration is incorrect [#666](https://github.com/PHPOffice/PhpSpreadsheet/pull/666)\n- Fix iconv unsupported `//IGNORE//TRANSLIT` on IBM i [#791](https://github.com/PHPOffice/PhpSpreadsheet/issues/791)\n\n### Changed\n\n- `master` is the new default branch, `develop` does not exist anymore\n\n## 1.5.2 - 2018-11-25\n\n### Security\n\n- Improvements to the design of the XML Security Scanner [#771](https://github.com/PHPOffice/PhpSpreadsheet/issues/771)\n\n## 1.5.1 - 2018-11-20\n\n### Security\n\n- Fix and improve XXE security scanning for XML-based and HTML Readers [#771](https://github.com/PHPOffice/PhpSpreadsheet/issues/771)\n\n### Added\n\n- Support page margin in mPDF [#750](https://github.com/PHPOffice/PhpSpreadsheet/issues/750)\n\n### Fixed\n\n- Support numeric condition in SUMIF, SUMIFS, AVERAGEIF, COUNTIF, MAXIF and MINIF [#683](https://github.com/PHPOffice/PhpSpreadsheet/issues/683)\n- SUMIFS containing multiple conditions [#704](https://github.com/PHPOffice/PhpSpreadsheet/issues/704)\n- Csv reader avoid notice when the file is empty [#743](https://github.com/PHPOffice/PhpSpreadsheet/pull/743)\n- Fix print area parser for XLSX reader [#734](https://github.com/PHPOffice/PhpSpreadsheet/pull/734)\n- Support overriding `DefaultValueBinder::dataTypeForValue()` without overriding `DefaultValueBinder::bindValue()` [#735](https://github.com/PHPOffice/PhpSpreadsheet/pull/735)\n- Mpdf export can exceed pcre.backtrack_limit [#637](https://github.com/PHPOffice/PhpSpreadsheet/issues/637)\n- Fix index overflow on data values array [#748](https://github.com/PHPOffice/PhpSpreadsheet/pull/748)\n\n## 1.5.0 - 2018-10-21\n\n### Added\n\n- PHP 7.3 support\n- Add the DAYS() function [#594](https://github.com/PHPOffice/PhpSpreadsheet/pull/594)\n\n### Fixed\n\n- Sheet title can contain exclamation mark [#325](https://github.com/PHPOffice/PhpSpreadsheet/issues/325)\n- Xls file cause the exception during open by Xls reader [#402](https://github.com/PHPOffice/PhpSpreadsheet/issues/402)\n- Skip non numeric value in SUMIF [#618](https://github.com/PHPOffice/PhpSpreadsheet/pull/618)\n- OFFSET should allow omitted height and width [#561](https://github.com/PHPOffice/PhpSpreadsheet/issues/561)\n- Correctly determine delimiter when CSV contains line breaks inside enclosures [#716](https://github.com/PHPOffice/PhpSpreadsheet/issues/716)\n\n## 1.4.1 - 2018-09-30\n\n### Fixed\n\n- Remove locale from formatting string [#644](https://github.com/PHPOffice/PhpSpreadsheet/pull/644)\n- Allow iterators to go out of bounds with prev [#587](https://github.com/PHPOffice/PhpSpreadsheet/issues/587)\n- Fix warning when reading xlsx without styles [#631](https://github.com/PHPOffice/PhpSpreadsheet/pull/631)\n- Fix broken sample links on windows due to $baseDir having backslash [#653](https://github.com/PHPOffice/PhpSpreadsheet/pull/653)\n\n## 1.4.0 - 2018-08-06\n\n### Added\n\n- Add excel function EXACT(value1, value2) support [#595](https://github.com/PHPOffice/PhpSpreadsheet/pull/595)\n- Support workbook view attributes for Xlsx format [#523](https://github.com/PHPOffice/PhpSpreadsheet/issues/523)\n- Read and write hyperlink for drawing image [#490](https://github.com/PHPOffice/PhpSpreadsheet/pull/490)\n- Added calculation engine support for the new bitwise functions that were added in MS Excel 2013\n  - BITAND()          Returns a Bitwise 'And' of two numbers\n  - BITOR()           Returns a Bitwise 'Or' of two number\n  - BITXOR()          Returns a Bitwise 'Exclusive Or' of two numbers\n  - BITLSHIFT()       Returns a number shifted left by a specified number of bits\n  - BITRSHIFT()       Returns a number shifted right by a specified number of bits\n- Added calculation engine support for other new functions that were added in MS Excel 2013 and MS Excel 2016\n  - Text Functions\n    - CONCAT()        Synonym for CONCATENATE()\n    - NUMBERVALUE()   Converts text to a number, in a locale-independent way\n    - UNICHAR()       Synonym for CHAR() in PHPSpreadsheet, which has always used UTF-8 internally\n    - UNIORD()        Synonym for ORD() in PHPSpreadsheet, which has always used UTF-8 internally\n    - TEXTJOIN()      Joins together two or more text strings, separated by a delimiter\n  - Logical Functions\n    - XOR()           Returns a logical Exclusive Or of all arguments\n  - Date/Time Functions\n    - ISOWEEKNUM()    Returns the ISO 8601 week number of the year for a given date\n  - Lookup and Reference Functions\n    - FORMULATEXT()   Returns a formula as a string\n  - Financial Functions\n    - PDURATION()     Calculates the number of periods required for an investment to reach a specified value\n    - RRI()           Calculates the interest rate required for an investment to grow to a specified future value\n  - Engineering Functions\n    - ERF.PRECISE()   Returns the error function integrated between 0 and a supplied limit\n    - ERFC.PRECISE()  Synonym for ERFC\n  - Math and Trig Functions\n    - SEC()           Returns the secant of an angle\n    - SECH()          Returns the hyperbolic secant of an angle\n    - CSC()           Returns the cosecant of an angle\n    - CSCH()          Returns the hyperbolic cosecant of an angle\n    - COT()           Returns the cotangent of an angle\n    - COTH()          Returns the hyperbolic cotangent of an angle\n    - ACOT()          Returns the cotangent of an angle\n    - ACOTH()         Returns the hyperbolic cotangent of an angle\n- Refactored Complex Engineering Functions to use external complex number library\n- Added calculation engine support for the new complex number functions that were added in MS Excel 2013\n    - IMCOSH()        Returns the hyperbolic cosine of a complex number\n    - IMCOT()         Returns the cotangent of a complex number\n    - IMCSC()         Returns the cosecant of a complex number\n    - IMCSCH()        Returns the hyperbolic cosecant of a complex number\n    - IMSEC()         Returns the secant of a complex number\n    - IMSECH()        Returns the hyperbolic secant of a complex number\n    - IMSINH()        Returns the hyperbolic sine of a complex number\n    - IMTAN()         Returns the tangent of a complex number\n\n### Fixed\n\n- Fix ISFORMULA() function to work with a cell reference to another worksheet\n- Xlsx reader crashed when reading a file with workbook protection [#553](https://github.com/PHPOffice/PhpSpreadsheet/pull/553)\n- Cell formats with escaped spaces were causing incorrect date formatting [#557](https://github.com/PHPOffice/PhpSpreadsheet/issues/557)\n- Could not open CSV file containing HTML fragment [#564](https://github.com/PHPOffice/PhpSpreadsheet/issues/564)\n- Exclude the vendor folder in migration [#481](https://github.com/PHPOffice/PhpSpreadsheet/issues/481)\n- Chained operations on cell ranges involving borders operated on last cell only [#428](https://github.com/PHPOffice/PhpSpreadsheet/issues/428)\n- Avoid memory exhaustion when cloning worksheet with a drawing [#437](https://github.com/PHPOffice/PhpSpreadsheet/issues/437)\n- Migration tool keep variables containing $PHPExcel untouched [#598](https://github.com/PHPOffice/PhpSpreadsheet/issues/598)\n- Rowspans/colspans were incorrect when adding worksheet using loadIntoExisting [#619](https://github.com/PHPOffice/PhpSpreadsheet/issues/619)\n\n## 1.3.1 - 2018-06-12\n\n### Fixed\n\n- Ranges across Z and AA columns incorrectly threw an exception [#545](https://github.com/PHPOffice/PhpSpreadsheet/issues/545)\n\n## 1.3.0 - 2018-06-10\n\n### Added\n\n- Support to read Xlsm templates with form elements, macros, printer settings, protected elements and back compatibility drawing, and save result without losing important elements of document [#435](https://github.com/PHPOffice/PhpSpreadsheet/issues/435)\n- Expose sheet title maximum length as `Worksheet::SHEET_TITLE_MAXIMUM_LENGTH` [#482](https://github.com/PHPOffice/PhpSpreadsheet/issues/482)\n- Allow escape character to be set in CSV reader [#492](https://github.com/PHPOffice/PhpSpreadsheet/issues/492)\n\n### Fixed\n\n- Subtotal 9 in a group that has other subtotals 9 exclude the totals of the other subtotals in the range [#332](https://github.com/PHPOffice/PhpSpreadsheet/issues/332)\n- `Helper\\Html` support UTF-8 HTML input [#444](https://github.com/PHPOffice/PhpSpreadsheet/issues/444)\n- Xlsx loaded an extra empty comment for each real comment [#375](https://github.com/PHPOffice/PhpSpreadsheet/issues/375)\n- Xlsx reader do not read rows and columns filtered out in readFilter at all [#370](https://github.com/PHPOffice/PhpSpreadsheet/issues/370)\n- Make newer Excel versions properly recalculate formulas on document open [#456](https://github.com/PHPOffice/PhpSpreadsheet/issues/456)\n- `Coordinate::extractAllCellReferencesInRange()` throws an exception for an invalid range [#519](https://github.com/PHPOffice/PhpSpreadsheet/issues/519)\n- Fixed parsing of conditionals in COUNTIF functions [#526](https://github.com/PHPOffice/PhpSpreadsheet/issues/526)\n- Corruption errors for saved Xlsx docs with frozen panes [#532](https://github.com/PHPOffice/PhpSpreadsheet/issues/532)\n\n## 1.2.1 - 2018-04-10\n\n### Fixed\n\n- Plain text and richtext mixed in same cell can be read [#442](https://github.com/PHPOffice/PhpSpreadsheet/issues/442)\n\n## 1.2.0 - 2018-03-04\n\n### Added\n\n- HTML writer creates a generator meta tag [#312](https://github.com/PHPOffice/PhpSpreadsheet/issues/312)\n- Support invalid zoom value in XLSX format [#350](https://github.com/PHPOffice/PhpSpreadsheet/pull/350)\n- Support for `_xlfn.` prefixed functions and `ISFORMULA`, `MODE.SNGL`, `STDEV.S`, `STDEV.P` [#390](https://github.com/PHPOffice/PhpSpreadsheet/pull/390)\n\n### Fixed\n\n- Avoid potentially unsupported PSR-16 cache keys [#354](https://github.com/PHPOffice/PhpSpreadsheet/issues/354)\n- Check for MIME type to know if CSV reader can read a file [#167](https://github.com/PHPOffice/PhpSpreadsheet/issues/167)\n- Use proper € symbol for currency format [#379](https://github.com/PHPOffice/PhpSpreadsheet/pull/379)\n- Read printing area correctly when skipping some sheets [#371](https://github.com/PHPOffice/PhpSpreadsheet/issues/371)\n- Avoid incorrectly overwriting calculated value type [#394](https://github.com/PHPOffice/PhpSpreadsheet/issues/394)\n- Select correct cell when calling freezePane [#389](https://github.com/PHPOffice/PhpSpreadsheet/issues/389)\n- `setStrikethrough()` did not set the font [#403](https://github.com/PHPOffice/PhpSpreadsheet/issues/403)\n\n## 1.1.0 - 2018-01-28\n\n### Added\n\n- Support for PHP 7.2\n- Support cell comments in HTML writer and reader [#308](https://github.com/PHPOffice/PhpSpreadsheet/issues/308)\n- Option to stop at a conditional styling, if it matches (only XLSX format) [#292](https://github.com/PHPOffice/PhpSpreadsheet/pull/292)\n- Support for line width for data series when rendering Xlsx [#329](https://github.com/PHPOffice/PhpSpreadsheet/pull/329)\n\n### Fixed\n\n- Better auto-detection of CSV separators [#305](https://github.com/PHPOffice/PhpSpreadsheet/issues/305)\n- Support for shape style ending with `;` [#304](https://github.com/PHPOffice/PhpSpreadsheet/issues/304)\n- Freeze Panes takes wrong coordinates for XLSX [#322](https://github.com/PHPOffice/PhpSpreadsheet/issues/322)\n- `COLUMNS` and `ROWS` functions crashed in some cases [#336](https://github.com/PHPOffice/PhpSpreadsheet/issues/336)\n- Support XML file without styles [#331](https://github.com/PHPOffice/PhpSpreadsheet/pull/331)\n- Cell coordinates which are already a range cause an exception [#319](https://github.com/PHPOffice/PhpSpreadsheet/issues/319)\n\n## 1.0.0 - 2017-12-25\n\n### Added\n\n- Support to write merged cells in ODS format [#287](https://github.com/PHPOffice/PhpSpreadsheet/issues/287)\n- Able to set the `topLeftCell` in freeze panes [#261](https://github.com/PHPOffice/PhpSpreadsheet/pull/261)\n- Support `DateTimeImmutable` as cell value\n- Support migration of prefixed classes\n\n### Fixed\n\n- Can read very small HTML files [#194](https://github.com/PHPOffice/PhpSpreadsheet/issues/194)\n- Written DataValidation was corrupted [#290](https://github.com/PHPOffice/PhpSpreadsheet/issues/290)\n- Date format compatible with both LibreOffice and Excel [#298](https://github.com/PHPOffice/PhpSpreadsheet/issues/298)\n\n### BREAKING CHANGE\n\n- Constant `TYPE_DOUGHTNUTCHART` is now `TYPE_DOUGHNUTCHART`.\n\n## 1.0.0-beta2 - 2017-11-26\n\n### Added\n\n- Support for chart fill color - @CrazyBite [#158](https://github.com/PHPOffice/PhpSpreadsheet/pull/158)\n- Support for read Hyperlink for xml - @GreatHumorist [#223](https://github.com/PHPOffice/PhpSpreadsheet/pull/223)\n- Support for cell value validation according to data validation rules - @SailorMax [#257](https://github.com/PHPOffice/PhpSpreadsheet/pull/257)\n- Support for custom implementation, or configuration, of PDF libraries - @SailorMax [#266](https://github.com/PHPOffice/PhpSpreadsheet/pull/266)\n\n### Changed\n\n- Merge data-validations to reduce written worksheet size - @billblume [#131](https://github.com/PHPOffice/PhpSpreadSheet/issues/131)\n- Throws exception if a XML file is invalid - @GreatHumorist [#222](https://github.com/PHPOffice/PhpSpreadsheet/pull/222)\n- Upgrade to mPDF 7.0+ [#144](https://github.com/PHPOffice/PhpSpreadsheet/issues/144)\n\n### Fixed\n\n- Control characters in cell values are automatically escaped [#212](https://github.com/PHPOffice/PhpSpreadsheet/issues/212)\n- Prevent color changing when copy/pasting xls files written by PhpSpreadsheet to another file - @al-lala [#218](https://github.com/PHPOffice/PhpSpreadsheet/issues/218)\n- Add cell reference automatic when there is no cell reference('r' attribute) in Xlsx file. - @GreatHumorist [#225](https://github.com/PHPOffice/PhpSpreadsheet/pull/225) Refer to [#201](https://github.com/PHPOffice/PhpSpreadsheet/issues/201)\n- `Reader\\Xlsx::getFromZipArchive()` function return false if the zip entry could not be located. - @anton-harvey [#268](https://github.com/PHPOffice/PhpSpreadsheet/pull/268)\n\n### BREAKING CHANGE\n\n- Extracted coordinate method to dedicate class [migration guide](./docs/topics/migration-from-PHPExcel.md).\n- Column indexes are based on 1, see the [migration guide](./docs/topics/migration-from-PHPExcel.md).\n- Standardization of array keys used for style, see the [migration guide](./docs/topics/migration-from-PHPExcel.md).\n- Easier usage of PDF writers, and other custom readers and writers, see the [migration guide](./docs/topics/migration-from-PHPExcel.md).\n- Easier usage of chart renderers, see the [migration guide](./docs/topics/migration-from-PHPExcel.md).\n- Rename a few more classes to keep them in their related namespaces:\n    - `CalcEngine` => `Calculation\\Engine`\n    - `PhpSpreadsheet\\Calculation` => `PhpSpreadsheet\\Calculation\\Calculation`\n    - `PhpSpreadsheet\\Cell` => `PhpSpreadsheet\\Cell\\Cell`\n    - `PhpSpreadsheet\\Chart` => `PhpSpreadsheet\\Chart\\Chart`\n    - `PhpSpreadsheet\\RichText` => `PhpSpreadsheet\\RichText\\RichText`\n    - `PhpSpreadsheet\\Style` => `PhpSpreadsheet\\Style\\Style`\n    - `PhpSpreadsheet\\Worksheet` => `PhpSpreadsheet\\Worksheet\\Worksheet`\n\n## 1.0.0-beta - 2017-08-17\n\n### Added\n\n- Initial implementation of SUMIFS() function\n- Additional codepages\n- MemoryDrawing not working in HTML writer [#808](https://github.com/PHPOffice/PHPExcel/issues/808)\n- CSV Reader can auto-detect the separator used in file [#141](https://github.com/PHPOffice/PhpSpreadsheet/pull/141)\n- HTML Reader supports some basic inline styles [#180](https://github.com/PHPOffice/PhpSpreadsheet/pull/180)\n\n### Changed\n\n- Start following [SemVer](https://semver.org) properly.\n\n### Fixed\n\n- Fix to getCell() method when cell reference includes a worksheet reference - @MarkBaker\n- Ignore inlineStr type if formula element exists - @ncrypthic [#570](https://github.com/PHPOffice/PHPExcel/issues/570)\n- Excel 2007 Reader freezes because of conditional formatting - @rentalhost [#575](https://github.com/PHPOffice/PHPExcel/issues/575)\n- Readers will now parse files containing worksheet titles over 31 characters [#176](https://github.com/PHPOffice/PhpSpreadsheet/pull/176)\n- Fixed PHP8 deprecation warning for libxml_disable_entity_loader() [#1625](https://github.com/phpoffice/phpspreadsheet/pull/1625)\n\n### General\n\n- Whitespace after toRichTextObject() - @MarkBaker [#554](https://github.com/PHPOffice/PHPExcel/issues/554)\n- Optimize vlookup() sort - @umpirsky [#548](https://github.com/PHPOffice/PHPExcel/issues/548)\n- c:max and c:min elements shall NOT be inside c:orientation elements - @vitalyrepin [#869](https://github.com/PHPOffice/PHPExcel/pull/869)\n- Implement actual timezone adjustment into PHPExcel_Shared_Date::PHPToExcel - @sim642 [#489](https://github.com/PHPOffice/PHPExcel/pull/489)\n\n### BREAKING CHANGE\n\n- Introduction of namespaces for all classes, eg: `PHPExcel_Calculation_Functions` becomes `PhpOffice\\PhpSpreadsheet\\Calculation\\Functions`\n- Some classes were renamed for clarity and/or consistency:\n\nFor a comprehensive list of all class changes, and a semi-automated migration path, read the [migration guide](./docs/topics/migration-from-PHPExcel.md).\n\n- Dropped `PHPExcel_Calculation_Functions::VERSION()`. Composer or git should be used to know the version.\n- Dropped `PHPExcel_Settings::setPdfRenderer()` and `PHPExcel_Settings::setPdfRenderer()`. Composer should be used to autoload PDF libs.\n- Dropped support for HHVM\n\n## Previous versions of PHPExcel\n\nThe changelog for the project when it was called PHPExcel is [still available](./CHANGELOG.PHPExcel.md).\n\n### Changed\n- Replace ezyang/htmlpurifier (LGPL2.1) with voku/anti-xss (MIT)\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Want to contribute?\n\nIf you would like to contribute, here are some notes and guidelines:\n\n - All new development should be on feature/fix branches, which are then merged to the `master` branch once stable and approved; so the `master` branch is always the most up-to-date, working code\n - If you are going to submit a pull request, please fork from `master`, and submit your pull request back as a fix/feature branch referencing the GitHub issue number\n - Install (development) dependencies by running `composer install` inside your PhpSpreadsheet clone.\n - The code must work with all PHP versions that we support.\n   - You can call `composer versions` to test version compatibility. \n - Code style should be maintained.\n   - `composer style` will identify any issues with Coding Style.\n   - `composer fix` will fix most issues with Coding Style.\n - All code changes must be validated by `composer check`.\n - Please include Unit Tests to verify that a bug exists, and that this PR fixes it.\n - Please include Unit Tests to show that a new Feature works as expected.\n - Please don't \"bundle\" several changes into a single PR; submit a PR for each discrete change/fix.\n - Remember to update documentation if necessary.\n\n - [Helpful article about forking](https://help.github.com/articles/fork-a-repo/ \"Forking a GitHub repository\")\n - [Helpful article about pull requests](https://help.github.com/articles/using-pull-requests/ \"Pull Requests\")\n\n## Unit Tests\n\nWhen writing Unit Tests, please\n - Always try to write Unit Tests for both the happy and unhappy paths.\n - Put all assertions in the Test itself, not in an abstract class that the Test extends (even if this means code duplication between tests).\n - Include any necessary `setup()` and `tearDown()` in the Test itself.\n - If you change any global settings (such as system locale, or Compatibility Mode for Excel Function tests), make sure that you reset to the default in the `tearDown()`.\n - Use the `ExcelError` functions in assertions for Excel Error values in Excel Function implementations.\n   <br />Not only does it reduce the risk of typos; but at some point in the future, ExcelError values will be an object rather than a string, and we won't then need to update all the tests.\n - Don't over-complicate test code by testing happy and unhappy paths in the same test.\n\nThis makes it easier to see exactly what is being tested when reviewing the PR. I want to be able to see it in the PR, not have to hunt in other unchanged classes to see what the test is doing.\n\n## How to release\n\n1. Complete CHANGELOG.md and commit\n2. Create an annotated tag\n    1. `git tag -a 1.2.3`\n    2. Tag subject must be the version number, eg: `1.2.3`\n    3. Tag body must be a copy-paste of the changelog entries.\n3. Push the tag with `git push --tags`, GitHub Actions will create a GitHub release automatically, and the release details will automatically be sent to packagist.\n4. By default, Github removes markdown headings in the Release Notes. You can either edit to restore these, or, probably preferably, change the default comment character on your system - `git config core.commentChar \";\"`.\n\n> **Note:** Tagged releases are made from the `master` branch. Only in an emergency should a tagged release be made from the `release` branch. (i.e. cherry-picked hot-fixes.) However, there are 4 branches which have been updated to apply security patches, and those may be tagged if future security updates are needed.\n- 1.30.x (no further updates aside from security patches, including code changes needed for Php 8.5 compatibility)\n- 2.1.x (no further updates aside from security patches, including code changes needed for Php 8.5 compatibility)\n- 2.4.x\n- 3.10.x\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2019-2026 PhpSpreadsheet Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# PhpSpreadsheet\n\n[![Build Status](https://github.com/PHPOffice/PhpSpreadsheet/workflows/main/badge.svg)](https://github.com/PHPOffice/PhpSpreadsheet/actions)\n[![Code Coverage](https://coveralls.io/repos/github/PHPOffice/PhpSpreadsheet/badge.svg?branch=master)](https://coveralls.io/github/PHPOffice/PhpSpreadsheet?branch=master)\n[![Total Downloads](https://img.shields.io/packagist/dt/PHPOffice/PhpSpreadsheet)](https://packagist.org/packages/phpoffice/phpspreadsheet)\n[![Latest Stable Version](https://img.shields.io/github/v/release/PHPOffice/PhpSpreadsheet)](https://packagist.org/packages/phpoffice/phpspreadsheet)\n[![License](https://poser.pugx.org/phpoffice/phpspreadsheet/license)](https://packagist.org/packages/phpoffice/phpspreadsheet)\n[![Join the chat at https://gitter.im/PHPOffice/PhpSpreadsheet](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PhpSpreadsheet)\n\nPhpSpreadsheet is a library written in pure PHP and offers a set of classes that\nallow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc.\n\nThis is the master branch, and is maintained for security and bug fixes.\n\n## PHP Version Support\n\nLTS: For maintained branches, support for PHP versions will only be maintained for a period of six months beyond the\n[end of life](https://www.php.net/supported-versions) of that PHP version.\n\nCurrently the required PHP minimum version is PHP __8.1__, and we [will support that version](https://www.php.net/supported-versions.php) until 30th June 2026.\n\nSee the `composer.json` for other requirements.\n\n## Installation\n\nSee the [install instructions](https://phpspreadsheet.readthedocs.io/en/latest/#installation).\n\n## Documentation\n\nRead more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet).\n\nPlease ask your support questions on [StackOverflow](https://stackoverflow.com/questions/tagged/phpspreadsheet), or have a quick chat on [Gitter](https://gitter.im/PHPOffice/PhpSpreadsheet).\n\n## Patreon\n\nI am now running a [Patreon](https://www.patreon.com/MarkBaker) to support the work that I do on PhpSpreadsheet.\n\nSupporters will receive access to articles about working with PhpSpreadsheet, and how to use some of its more advanced features.\n\nPosts already available to Patreon supporters:\n - The Dating Game\n   - A  look at how MS Excel (and PhpSpreadsheet) handle date and time values.\n- Looping the Loop\n    - Advice on Iterating through the rows and cells in a worksheet.\n\nAnd for Patrons at levels actively using PhpSpreadsheet:\n - Behind the Mask\n   - A look at Number Format Masks.\n\nThe Next Article (currently Work in Progress):\n - Formula for Success\n   - How to debug formulae that don't produce the expected result.\n\n\nMy aim is to post at least one article each month, taking a detailed look at some feature of MS Excel and how to use that feature in PhpSpreadsheet, or on how to perform different activities in PhpSpreadsheet.\n\nPlanned posts for the future include topics like:\n - Tables\n - Structured References\n - AutoFiltering\n - Array Formulae\n - Conditional Formatting\n - Data Validation\n - Value Binders\n - Images\n - Charts\n\nAfter a period of six months exclusive to Patreon supporters, articles will be incorporated into the public documentation for the library.\n\n## PHPExcel vs PhpSpreadsheet ?\n\nPhpSpreadsheet is the next version of PHPExcel. It breaks compatibility to dramatically improve the code base quality (namespaces, PSR compliance, use of latest PHP language features, etc.).\n\nBecause all efforts have shifted to PhpSpreadsheet, PHPExcel will no longer be maintained. All contributions for PHPExcel, patches and new features, should target PhpSpreadsheet `master` branch.\n\nDo you need to migrate? There is [an automated tool](/docs/topics/migration-from-PHPExcel.md) for that.\n\n## License\n\nPhpSpreadsheet is licensed under [MIT](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/LICENSE).\n"
  },
  {
    "path": "bin/check-phpdoc-types.php",
    "content": "#!/usr/bin/env php\n<?php\n\n/**\n * This will check that the \"current patch\" does not add or modify lines that contain types as PHPDoc when we can express\n * them with PHP native types. The \"current patch\" is either the file about to be committed, the non-committed file, or\n * the latest commit.\n *\n * This will help us slowly migrate away from PHPDoc typing to PHP native typing.\n */\nfunction checkPhpDocTypes(): int\n{\n    $content = shell_exec('git diff --cached') ?? shell_exec('git diff') ?? shell_exec('git show HEAD');\n    preg_match_all('~^\\+ +\\* @(param|var) (mixed|string|int|float|bool|null|array|\\?|\\|)+( \\$\\w+)?$~m', \"$content\", $parameters);\n    preg_match_all('~^\\+ +\\* @return (mixed|string|int|float|bool|null|array|void|\\?|\\|)+$~m', \"$content\", $returns);\n\n    $errors = [\n        ...$parameters[0],\n        ...$returns[0],\n    ];\n\n    if (!empty($errors)) {\n        echo 'PHP native types must be used instead of PHPDoc types (without comments), for the following lines:' . PHP_EOL . PHP_EOL;\n        echo implode(PHP_EOL, $errors) . PHP_EOL;\n\n        return 1;\n    }\n\n    return 0;\n}\n\nif (checkPhpDocTypes()) {\n    exit(1);\n}\n"
  },
  {
    "path": "bin/generate-document.php",
    "content": "#!/usr/bin/env php\n<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheetInfra\\DocumentGenerator;\n\nrequire_once __DIR__ . '/..' . '/vendor/autoload.php';\n\n$phpSpreadsheetFunctions = Calculation::getFunctions();\nksort($phpSpreadsheetFunctions);\n\nfile_put_contents(\n    __DIR__ . '/../docs/references/function-list-by-category.md',\n    DocumentGenerator::generateFunctionListByCategory(\n        $phpSpreadsheetFunctions\n    )\n);\nfile_put_contents(\n    __DIR__ . '/../docs/references/function-list-by-name.md',\n    DocumentGenerator::generateFunctionListByName(\n        $phpSpreadsheetFunctions\n    )\n);\nfile_put_contents(\n    __DIR__ . '/../docs/references/function-list-by-name-compact.md',\n    DocumentGenerator::generateFunctionListByName(\n        $phpSpreadsheetFunctions,\n        true\n    )\n);\n"
  },
  {
    "path": "bin/generate-locales.php",
    "content": "#!/usr/bin/env php\n<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheetInfra\\LocaleGenerator;\n\nrequire_once __DIR__ . '/..' . '/vendor/autoload.php';\n\n$phpSpreadsheetFunctions = Calculation::getFunctions();\n\n$localeGenerator = new LocaleGenerator(\n    __DIR__ . '/../src/PhpSpreadsheet/Calculation/locale/',\n    'Translations.xlsx',\n    $phpSpreadsheetFunctions,\n    true\n);\n$localeGenerator->generateLocales();\n"
  },
  {
    "path": "bin/pre-commit",
    "content": "#!/bin/bash\n\npass=true\n\nfiles=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\\.(php|phtml)$')\nif [ \"$files\" != \"\" ]; then\n\n    # Run php syntax check before commit\n    while read -r file; do\n        php -l \"$file\"\n        if [ $? -ne 0 ]; then\n            pass=false\n        fi\n    done <<< \"$files\"\n\n    # Run php-cs-fixer validation before commit\n    echo \"$files\" | xargs ./vendor/bin/php-cs-fixer fix --diff --config .php-cs-fixer.dist.php\n    if [ $? -ne 0 ]; then\n        pass=false\n    fi\n\n    # Automatically add files that may have been fixed by php-cs-fixer\n    echo \"$files\" | xargs git add\nfi\n\n# Check PHPDoc types\n./bin/check-phpdoc-types.php\nif [ $? -ne 0 ]; then\n    pass=false\nfi\n\nif $pass; then\n    exit 0\nelse\n    echo \"\"\n    echo \"PRE-COMMIT HOOK FAILED:\"\n    echo \"Code style validation failed. Please fix errors and try committing again.\"\n    exit 1\nfi\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"phpoffice/phpspreadsheet\",\n    \"description\": \"PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine\",\n    \"keywords\": [\n        \"PHP\",\n        \"OpenXML\",\n        \"Excel\",\n        \"xlsx\",\n        \"xls\",\n        \"ods\",\n        \"gnumeric\",\n        \"spreadsheet\"\n    ],\n    \"config\": {\n        \"platform\": {\n            \"php\" : \"8.1.99\"\n        },\n        \"process-timeout\": 600,\n        \"sort-packages\": true,\n        \"allow-plugins\": {\n            \"dealerdirect/phpcodesniffer-composer-installer\": true\n        }\n    },\n    \"homepage\": \"https://github.com/PHPOffice/PhpSpreadsheet\",\n    \"type\": \"library\",\n    \"license\": \"MIT\",\n    \"authors\": [\n        {\n            \"name\": \"Maarten Balliauw\",\n            \"homepage\": \"https://blog.maartenballiauw.be\"\n        },\n        {\n            \"name\": \"Mark Baker\",\n            \"homepage\": \"https://markbakeruk.net\"\n        },\n        {\n            \"name\": \"Franck Lefevre\",\n            \"homepage\": \"https://rootslabs.net\"\n        },\n        {\n            \"name\": \"Erik Tilt\"\n        },\n        {\n            \"name\": \"Adrien Crivelli\"\n        },\n        {\n            \"name\": \"Owen Leibman\"\n        }\n    ],\n    \"scripts\": {\n        \"check\": [\n            \"php bin/check-phpdoc-types.php\",\n            \"phpcs samples/ src/ tests/ --report=checkstyle\",\n            \"phpcs samples/ src/ tests/ --standard=PHPCompatibility --runtime-set testVersion 8.0- --exclude=PHPCompatibility.Variables.ForbiddenThisUseContexts -n\",\n            \"php-cs-fixer fix --ansi --dry-run --diff\",\n            \"phpstan analyse --ansi --memory-limit=2048M\",\n            \"phpunit --color=always\"\n        ],\n        \"style\": [\n            \"phpcs samples/ src/ tests/ --report=checkstyle\",\n            \"php-cs-fixer fix --ansi --dry-run --diff\"\n        ],\n        \"fix\": [\n            \"phpcbf samples/ src/ tests/ --report=checkstyle\",\n            \"php-cs-fixer fix\"\n        ],\n        \"versions\": [\n            \"phpcs samples/ src/ tests/ --standard=PHPCompatibility --runtime-set testVersion 8.0- --exclude=PHPCompatibility.Variables.ForbiddenThisUseContexts -n\"\n        ]\n    },\n    \"require\": {\n        \"php\": \"^8.1\",\n        \"ext-ctype\": \"*\",\n        \"ext-dom\": \"*\",\n        \"ext-fileinfo\": \"*\",\n        \"ext-filter\": \"*\",\n        \"ext-gd\": \"*\",\n        \"ext-iconv\": \"*\",\n        \"ext-libxml\": \"*\",\n        \"ext-mbstring\": \"*\",\n        \"ext-simplexml\": \"*\",\n        \"ext-xml\": \"*\",\n        \"ext-xmlreader\": \"*\",\n        \"ext-xmlwriter\": \"*\",\n        \"ext-zip\": \"*\",\n        \"ext-zlib\": \"*\",\n        \"composer/pcre\": \"^1||^2||^3\",\n        \"maennchen/zipstream-php\": \"^2.1 || ^3.0\",\n        \"markbaker/complex\": \"^3.0\",\n        \"markbaker/matrix\": \"^3.0\",\n        \"psr/simple-cache\": \"^1.0 || ^2.0 || ^3.0\"\n    },\n    \"require-dev\": {\n        \"ext-intl\": \"*\",\n        \"dealerdirect/phpcodesniffer-composer-installer\": \"dev-main\",\n        \"dompdf/dompdf\": \"^2.0 || ^3.0\",\n        \"friendsofphp/php-cs-fixer\": \"^3.2\",\n        \"mitoteam/jpgraph\": \"^10.5\",\n        \"mpdf/mpdf\": \"^8.1.1\",\n        \"phpcompatibility/php-compatibility\": \"^9.3\",\n        \"phpstan/phpstan\": \"^1.1 || ^2.0\",\n        \"phpstan/phpstan-deprecation-rules\": \"^1.0 || ^2.0\",\n        \"phpstan/phpstan-phpunit\": \"^1.0 || ^2.0\",\n        \"phpunit/phpunit\": \"^10.5\",\n        \"squizlabs/php_codesniffer\": \"^3.7\",\n        \"tecnickcom/tcpdf\": \"^6.5\"\n    },\n    \"suggest\": {\n        \"ext-intl\": \"PHP Internationalization Functions, required for NumberFormat Wizard and StringHelper::setLocale()\",\n        \"mpdf/mpdf\": \"Option for rendering PDF with PDF Writer\",\n        \"dompdf/dompdf\": \"Option for rendering PDF with PDF Writer\",\n        \"tecnickcom/tcpdf\": \"Option for rendering PDF with PDF Writer\",\n        \"mitoteam/jpgraph\": \"Option for rendering charts, or including charts with PDF or HTML Writers\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"PhpOffice\\\\PhpSpreadsheet\\\\\": \"src/PhpSpreadsheet\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"PhpOffice\\\\PhpSpreadsheetTests\\\\\": \"tests/PhpSpreadsheetTests\",\n            \"PhpOffice\\\\PhpSpreadsheetInfra\\\\\": \"infra\"\n        }\n    }\n}\n"
  },
  {
    "path": "docs/extra/extra.css",
    "content": "/* Make the huge table always visible */\ntable.features-cross-reference {\n    overflow: visible !important;\n}\n.rst-content table.features-cross-reference.docutils th,\n.rst-content table.features-cross-reference.docutils td {\n    background-color: white;\n}\n\n/* https://github.com/mkdocs/mkdocs/discussions/3035#discussioncomment-7237037 */\n.wy-table-responsive table td, .wy-table-responsive table th {\n    white-space: normal !important;\n}\n.wy-table-responsive {\n    overflow : visible !important;\n}\n\n/* https://github.com/readthedocs/sphinx_rtd_theme/issues/295#issuecomment-455226058 */\n.wy-nav-content {max-width: none;}\n"
  },
  {
    "path": "docs/extra/extrajs.js",
    "content": "document.addEventListener(\"DOMContentLoaded\", function() {\n  document.querySelectorAll(\"table\").forEach(function(table) {\n    table.classList.add(\"docutils\");\n  });\n});"
  },
  {
    "path": "docs/faq.md",
    "content": "# Frequently asked questions\n\n## There seems to be a problem with character encoding...\n\nIt is necessary to use UTF-8 encoding for all texts in PhpSpreadsheet.\nIf the script uses different encoding then you can convert those texts\nwith PHP's `iconv()` or `mb_convert_encoding()` functions.\n\n## Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate yyy bytes) in zzz on line aaa\n\nPhpSpreadsheet holds an \"in memory\" representation of a spreadsheet, so\nit is susceptible to PHP's memory limitations. The memory made available\nto PHP can be increased by editing the value of the `memory_limit`\ndirective in your `php.ini` file, or by using\n`ini_set('memory_limit', '128M')` within your code.\n\nSome Readers and Writers are faster than others, and they also use\ndiffering amounts of memory.\n\n## Protection on my worksheet is not working?\n\nWhen you make use of any of the worksheet protection features (e.g. cell\nrange protection, prohibiting deleting rows, ...), make sure you enable\nworksheet security. This can for example be done like this:\n\n```php\n$spreadsheet->getActiveSheet()->getProtection()->setSheet(true);\n```\n\n## Feature X is not working with Reader\\_Y / Writer\\_Z\n\nNot all features of PhpSpreadsheet are implemented in all of the Reader\n/ Writer classes. This is mostly due to underlying libraries not\nsupporting a specific feature or not having implemented a specific\nfeature.\n\nFor example autofilter is not implemented in PEAR\nSpreadsheet\\_Excel\\_writer, which is the base of our Xls writer.\n\nWe are slowly building up a list of features, together with the\ndifferent readers and writers that support them, in the [features cross\nreference](./references/features-cross-reference.md).\n\n## Formulas don't seem to be calculated in Excel2003 using compatibility pack?\n\nThis is normal behaviour of the compatibility pack, `Xlsx` displays this\ncorrectly. Use `\\PhpOffice\\PhpSpreadsheet\\Writer\\Xls` if you really need\ncalculated values, or force recalculation in Excel2003.\n\n## Setting column width is not 100% accurate\n\nTrying to set column width, I experience one problem. When I open the\nfile in Excel, the actual width is 0.71 less than it should be.\n\nThe short answer is that PhpSpreadsheet uses a measure where padding is\nincluded. See [how to set a column's width](./topics/recipes.md#setting-a-columns-width)\nfor more details.\n\n## I cannot serialize or json_encode my Spreadsheet\n\nNo, you can't. Consider the Spreadsheet object as a PHP resource, which cannot be serialized.\n"
  },
  {
    "path": "docs/index.md",
    "content": "# Welcome to PhpSpreadsheet's documentation\n\n![Logo](./assets/logo.svg)\n\nPhpSpreadsheet is a library written in pure PHP and offers a set of classes that\nallow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc.\n\n## File formats supported\n\n|Format                                      |Reading|Writing|\n|--------------------------------------------|:-----:|:-----:|\n|Open Document Format/OASIS (.ods)           |   ✓   |   ✓   |\n|Office Open XML (.xlsx) Excel 2007 and above|   ✓   |   ✓   |\n|BIFF 8 (.xls) Excel 97 and above            |   ✓   |   ✓   |\n|BIFF 5 (.xls) Excel 95                      |   ✓   |       |\n|SpreadsheetML (.xml) Excel 2003             |   ✓   |       |\n|Gnumeric                                    |   ✓   |       |\n|HTML                                        |   ✓   |   ✓   |\n|SYLK                                        |   ✓   |       |\n|CSV                                         |   ✓   |   ✓   |\n|PDF (using either the TCPDF, Dompdf or mPDF libraries, which need to be installed separately)|       |   ✓   |\n\nNote - reading or writing certain aspects of a spreadsheet may not be supported in all formats. For more details, please consult\n[Features Cross-reference](./references/features-cross-reference.md).\n\n# Getting started\n\n## Software requirements\n\nPHP version 8.1 or newer to develop using PhpSpreadsheet. Other requirements, such as PHP extensions, are enforced by\ncomposer. See the `require` section of [the composer.json file](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/composer.json)\nfor details.\n\n### PHP version support\n\nLTS: Support for PHP versions will only be maintained for a period of six months beyond the\n[end of life of that PHP version](https://www.php.net/eol.php).\n\nCurrently, the required PHP minimum version is __PHP 8.1__, and we [will support that version](https://www.php.net/eol.php) until June 2026.\n\nSupport for PHP versions will only be maintained for a period of six months beyond the\n[end of life](https://www.php.net/supported-versions) of that PHP version.\n\nSee the `composer.json` for other requirements.\n\n## Installation\n\nUse [composer](https://getcomposer.org) to install PhpSpreadsheet into your project:\n\n```sh\ncomposer require phpoffice/phpspreadsheet\n```\n\nOr also download the documentation and samples if you plan to use them (note that `git` must be in your path for this to work):\n\n```sh\ncomposer require phpoffice/phpspreadsheet --prefer-source\n```\n\nIf you are building your installation on a development machine that is on a different PHP version to the server where it\nwill be deployed, or if your PHP CLI version is different from your run-time such as `php-fpm` or Apache's `mod_php`,\nthen you might want to configure composer for that.\nSee [composer documentation](https://getcomposer.org/doc/06-config.md#platform)\non how to edit your `composer.json` to ensure that the correct dependencies are retrieved to match your deployment\nenvironment.\n\nSee [CLI vs Application run-time](https://php.watch/articles/composer-platform-check) for more details.\n\n### Additional Installation Options\n\nIf you want to write to PDF, or to include Charts when you write to HTML or PDF, then you will need to install additional libraries:\n\n#### PDF\n\nFor PDF Generation, you can install any of the following, and then configure PhpSpreadsheet to indicate which library you are going to use:\n- mpdf/mpdf\n- dompdf/dompdf\n- tecnickcom/tcpdf\n\nand configure PhpSpreadsheet using:\n\n```php\n// Dompdf, Mpdf or Tcpdf (as appropriate)\n$className = \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf::class;\nIOFactory::registerWriter('Pdf', $className);\n```\nor the appropriate PDF Writer wrapper for the library that you have chosen to install.\n\n#### Chart Export\n\nFor Chart export, we support following packages, which you will also need to install yourself using `composer require`\n- [jpgraph/jpgraph](https://packagist.org/packages/jpgraph/jpgraph) (this package was abandoned at version 4.0.\n  You can manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/))\n- [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) - up to date fork with modern PHP versions support and some bugs fixed.\n\nand then configure PhpSpreadsheet using:\n```php\n// to use jpgraph/jpgraph\nSettings::setChartRenderer(\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph::class);\n//or\n// to use mitoteam/jpgraph\nSettings::setChartRenderer(\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer::class);\n```\n\nOne or the other of these libraries is necessary if you want to generate HTML or PDF files that include charts; or to render a Chart to an Image format from within your code.\nThey are not necessary to define charts for writing to `Xlsx` files.\nOther file formats don't support writing Charts.\n\n## Hello World\n\nThis would be the simplest way to write a spreadsheet:\n\n```php\n<?php\n\nrequire 'vendor/autoload.php';\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\n$spreadsheet = new Spreadsheet();\n$activeWorksheet = $spreadsheet->getActiveSheet();\n$activeWorksheet->setCellValue('A1', 'Hello World !');\n\n$writer = new Xlsx($spreadsheet);\n$writer->save('hello world.xlsx');\n```\n\n## Learn by example\n\nA good way to get started is to run some of the samples. Don't forget to download them via `--prefer-source` composer\nflag. And then serve them via PHP built-in webserver:\n\n```sh\nphp -S localhost:8000 -t vendor/phpoffice/phpspreadsheet/samples\n```\n\nThen point your browser to:\n\n> http://localhost:8000/\n\nThe samples may also be run directly from the command line, for example:\n\n```sh\nphp vendor/phpoffice/phpspreadsheet/samples/Basic/01_Simple.php\n```\n\n## Learn by documentation\n\nFor more documentation in depth, you may read about an [overview of the\narchitecture](./topics/architecture.md),\n[creating a spreadsheet](./topics/creating-spreadsheet.md),\n[worksheets](./topics/worksheets.md),\n[accessing cells](./topics/accessing-cells.md) and\n[reading and writing to files](./topics/reading-and-writing-to-file.md).\n\nOr browse the [API documentation](https://phpoffice.github.io/PhpSpreadsheet).\n\n# Credits\n\nPlease refer to the [contributor\nlist](https://github.com/PHPOffice/PhpSpreadsheet/graphs/contributors)\nfor up-to-date credits.\n"
  },
  {
    "path": "docs/references/features-cross-reference.md",
    "content": "# Features cross reference\n\n- <span style=\"text-align: center; color: green;\">✔</span> Supported\n- <span style=\"text-align: center; color: orange;\">●</span> Partially supported\n- <span style=\"text-align: center; color: red;\">✖</span> Not supported\n- N/A Cannot be supported\n\n## Readers\n\n<table class=\"features-cross-reference\">\n    <tr>\n        <th></th>\n        <th colspan=\"8\">Readers</th>\n    </tr>\n    <tr>\n        <th></th>\n        <th>XLS</th>\n        <th>XLSX</th>\n        <th>Excel2003XML</th>\n        <th>Ods</th>\n        <th>Gnumeric</th>\n        <th>CSV</th>\n        <th>SYLK</th>\n        <th>HTML</th>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong><a href=\"#setGetReaderOptions\">Reader Options</a></strong></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Read Charts</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Read Data Only (no formatting)</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Read Only Specified Worksheets</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Read Only Specified Cells</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Read External Images</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔ <a href=\"#footnote9\"><sup>9</sup></a></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔ <a href=\"#footnote9\"><sup>9</sup></a></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Document Properties</strong></td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\"><a href=\"#setGetStdProp\">Standard Properties</a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Creator</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Creation Date/Time</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Modifier</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Modified Date/Time</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Title</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Description</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Subject</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Keywords</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\"><a href=\"#setGetExtProp\">Extended Properties</a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Category</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Company</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Manager</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\"><a href=\"#setGetCustProp\">User-Defined (Custom) Properties</a></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Text Properties</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Number Properties</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Date Properties</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Yes/No (Boolean) Properties</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Cell Data Types</strong></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Empty/NULL</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Boolean</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Integer</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Floating Point</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">String</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Error</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Formula</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Array Formula</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Rich Text</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Conditional Formatting</strong></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Rows and Column Properties</strong></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Row Height/Column Width</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Hidden</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Worksheet Properties</strong></td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Frozen Panes</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Hidden Worksheets</td>\n        <td style=\"text-align: center; color: green;\">✔</td> \n        <td style=\"text-align: center; color: green;\">✔</td> \n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td> \n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Coloured Tabs</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetDrawingHyperlink\">Drawing hyperlink</a></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td> \n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Cell Formatting</strong></td>\n        <td style=\"text-align: center; color: green;\">✔</td> \n        <td style=\"text-align: center; color: green;\">✔</td> \n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td> \n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote7\"><sup>7</sup></a></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Number Format Mask</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote6\"><sup>6</sup></a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Alignment</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote7\"><sup>7</sup></a></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Horizontal</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Vertical</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Wrapping</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Shrink-to-Fit</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Indent</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Background Colour</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote7\"><sup>7</sup></a></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Patterned</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Font Attributes</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote7\"><sup>7</sup></a></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Font Face</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Font Size</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Bold</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Italic</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Strikethrough</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Underline</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Superscript</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Subscript</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Borders</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote7\"><sup>7</sup></a></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Line Style</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Position</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 3em;\">Diagonal</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetHyperlink\">Hyperlinks</a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">http</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\">Merged Cells</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetComment\"><strong>Cell Comments</strong></a></td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Rich Text</td>\n        <td style=\"text-align: center; color: red;\">✖ <a href=\"#footnote2\"><sup>2</sup></a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Alignment</td>\n        <td style=\"text-align: center; color: red;\">✖ <a href=\"#footnote3\"><sup>3</sup></a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Background Image</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetCellValidation\"><strong>Cell Validation</strong></a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetAutoFilter\"><strong>AutoFilters</strong></a></td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td><strong>AutoFilter Expressions</strong></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Filter</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Custom Filter</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Date Filter</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Dynamic Filter</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Colour Filter</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Icon Filter</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Top 10 Filter</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetMacro\"><strong>Macros</strong></a></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote5\"><sup>5</sup</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Form Controls</strong></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote4\"><sup>4</sup</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetSecurity\"><strong>Security</strong></a></td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Protection (prevent editing)</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Encryption (prevent viewing)</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <th></th>\n        <th>XLS</th>\n        <th>XLSX</th>\n        <th>Excel2003XML</th>\n        <th>Ods</th>\n        <th>Gnumeric</th>\n        <th>CSV</th>\n        <th>SYLK</th>\n        <th>HTML</th>\n    </tr>\n    <tr>\n        <th></th>\n        <th colspan=\"8\">Readers</th>\n    </tr>\n</table>\n\n1. <span id=\"footnote1\">Only text contents</span>\n2. <span id=\"footnote2\">Only BIFF8 files support Rich Text. Prior to that, comments could only be plain text</span>\n3. <span id=\"footnote3\">Only BIFF8 files support alignment and rotation. Prior to that, comments could only be unformatted text</span>\n4. <span id=\"footnote4\">Xlsx forms and controls can be read and written but not otherwise manipulated</span>\n5. <span id=\"footnote5\">Xlsx macros can be read and written; their values can be retrieved and changed, but only in a binary form which is unlikely to be useful</span>\n6. <span id=\"footnote6\">There is very limited support for reading styles from an Ods spreadsheet before release 5.5.0. Writing styles has much better support. Starting with release 5.5.0, Number Format Writer supports many common styles, and users may extend support to additional styles; Reader support for Number Formats is improved but still imperfect; for other styles, it is much improved.</span>\n7. <span id=\"footnote7\">In most cases, Html reader processes only inline styles; styles provided by Css classes may be ignored.</span>\n8. <span id=\"footnote8\">Code must [opt in](../topics/recipes.md#array-formulas) to array output.</span>\n9. <span id=\"footnote9\">Use with caution - allowing external images may can subject the caller to security exploits. Starting with release 4.5.0 (also earlier releases 3.9.3, 2.3.10, 2.1.11, and 1.29.12), code can allow or not external images. In those starting releases, and in earlier releases which do not offer an option, default is to allow it. In release 5+ (and earlier supported versions 1.30+, 2.1.12+, 2.4+, and 3.10+), the default is to not allow it.</span>\n\n## Writers\n\n<table class=\"features-cross-reference\">\n    <tr>\n        <th></th>\n        <th colspan=\"6\">Writers</th>\n    </tr>\n    <tr>\n        <th></th>\n        <th>XLS</th>\n        <th>XLSX</th>\n        <th>Ods</th>\n        <th>CSV</th>\n        <th>HTML</th>\n        <th>PDF</th>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Document Properties</strong></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\"><a href=\"#setGetStdProp\">Standard Properties</a></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Creator</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Creation Date/Time</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Modifier</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Modified Date/Time</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Title</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Description</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Subject</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Keywords</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\"><a href=\"#setGetExtProp\">Extended Properties</a></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Category</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Company</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Manager</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\"><a href=\"#setGetCustProp\">User-Defined (Custom) Properties</a></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\">Rich Text</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Conditional Formatting</strong></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Array Formula<a href=\"#footnote8\"><sup>8</sup></a></strong></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Rows and Column Properties</strong></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Row Height/Column Width</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Hidden</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Worksheet Properties</strong></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Frozen Panes</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Hidden Worksheets</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Coloured Tabs</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetDrawingHyperlink\"><strong>Drawing hyperlink</strong></a></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Cell Formatting</strong></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Number Format Mask</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔<a href=\"#footnote6\"><sup>6</sup></a></td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Alignment</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Horizontal</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Vertical</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Wrapping</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Shrink-to-Fit</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Indent</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Background Colour</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Patterned</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Font Attributes</td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Font Face</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Font Size</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Bold</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Italic</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Strikethrough</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Underline</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Superscript</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Subscript</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Borders</td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Line Style</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Position</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 3em;\">Diagonal</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetHyperlink\"><strong>Hyperlinks</strong></a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">http</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Merged Cells</strong></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetComment\"><strong>Cell Comments</strong></a></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center; color: orange;\">●</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote1\"><sup>1</sup></a></td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Rich Text</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Alignment</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Background Image</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetCellValidation\"><strong>Cell Validation</strong></a></td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetAutoFilter\"><strong>AutoFilters</strong></a></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">AutoFilter Expressions</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Filter</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Custom Filter</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">DateGroup Filter</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Dynamic Filter</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Colour Filter</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Icon Filter</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Top 10 Filter</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center;\">N/A</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetMacro\"><strong>Macros</strong></a></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote5\"><sup>5</sup</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><strong>Form Controls</strong></td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: orange;\">● <a href=\"#footnote4\"><sup>4</sup</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 0.5em;\"><a href=\"#setGetSecurity\"><strong>Security</strong></a></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Protection (prevent editing)</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: green;\">✔</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Encryption (prevent viewing)</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center;\">N/A</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n        <td style=\"text-align: center; color: red;\">✖</td>\n    </tr>\n    <tr>\n        <th></th>\n        <th>XLS</th>\n        <th>XLSX</th>\n        <th>Ods</th>\n        <th>CSV</th>\n        <th>HTML</th>\n        <th>PDF</th>\n    </tr>\n    <tr>\n        <th></th>\n        <th colspan=\"6\">Writers</th>\n    </tr>\n</table>\n\n## Setters and Getters\n\n<table class=\"features-cross-reference\">\n    <tr>\n        <th></th>\n        <th colspan=\"2\">Methods</th>\n    </tr>\n    <tr>\n        <th></th>\n        <th>Getters</th>\n        <th>Setters</th>\n    </tr>\n    <tr>\n        <td id=\"setGetReaderOptions\"><strong>Reader Options</strong></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Read Data Only (no formatting)</td>\n        <td>$reader-&gt;getReadDataOnly()</td>\n        <td>$reader-&gt;setReadDataOnly()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Read Only Specified Worksheets</td>\n        <td>$reader-&gt;getLoadSheetsOnly()</td>\n        <td>$reader-&gt;setLoadSheetsOnly()<br>$reader-&gt;setLoadAllSheets()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\">Read Only Specified Cells</td>\n        <td>$reader-&gt;getReadFilter()</td>\n        <td>$reader-&gt;setReadFilter()</td>\n    </tr>\n    <tr>\n        <td><strong>Document Properties</strong></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\" id=\"setGetStdProp\">Standard Properties</td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Creator</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getCreator()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setCreator()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Creation Date/Time</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getCreated()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setCreated()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Modifier</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getLastModifiedBy()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setLastModifiedBy()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Modified Date/Time</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getModified()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setModified()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Title</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getTitle()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setTitle()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Description</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getDescription()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setDescription()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Subject</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getSubject()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setSubject()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Keywords</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getKeywords()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setKeywords()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\" id=\"setGetExtProp\">Extended Properties</td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Category</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getCategory()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setCategory()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Company</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getCompany()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setCompany()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Manager</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getManager()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setManager()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\" id=\"setGetCustProp\">User-Defined (Custom) Properties</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;getCustomProperties()<br>$spreadsheet-&gt;getProperties()-&gt;isCustomPropertySet()<br>$spreadsheet-&gt;getProperties()-&gt;getCustomPropertyValue()<br>$spreadsheet-&gt;getProperties()-&gt;getCustomPropertyType()</td>\n        <td>$spreadsheet-&gt;getProperties()-&gt;setCustomProperty()</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\" id=\"setGetDrawingHyperlink\">Drawing hyperlink</td>\n        <td>$drawing->getHyperlink()->getUrl()</td>\n        <td>$drawing->setHyperlink()->setUrl($url)</td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 1em;\" id=\"setGetHyperlink\">Hyperlinks</td>\n        <td>$cell->getHyperlink()->getUrl($url)</td>\n        <td>$cell->getHyperlink()->setUrl($url)</td>\n    </tr>\n    <tr>\n        <td id=\"setGetComment\"><strong>Cell Comments</strong></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Background Image</td>\n        <td>$comment->getBackgroundImage()</td>\n        <td>$comment->setBackgroundImage()</td>\n    </tr>\n    <tr>\n        <td id=\"setGetCellValidation\"><strong>Cell Validation</strong></td>\n        <td>$cell->getDataValidation()</td>\n        <td>$cell->setDataValidation()</td>\n    </tr>\n    <tr>\n        <td id=\"setGetAutoFilter\"><strong>AutoFilters</strong></td>\n        <td>$sheet->getAutoFilter()</td>\n        <td>$sheet->setAutoFilter()</td>\n    </tr>\n    <tr>\n        <td id=\"setGetMacro\"><strong>Macros</strong></td>\n        <td>$spreadsheet->getMacrosCode();<a href=\"#footnote5\"><sup>5</sup></td>\n        <td>$spreadsheet->setMacrosCode();<a href=\"#footnote5\"><sup>5</sup></td>\n    </tr>\n    <tr>\n        <td id=\"setGetSecurity\"><strong>Security</strong></td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td style=\"padding-left: 2em;\">Protection (prevent editing)</td>\n        <td>$sheet->getProtection()</td>\n        <td>$sheet->getProtection()->setSheet(true)</td>\n    </tr>\n    <tr>\n        <th></th>\n        <th>Getters</th>\n        <th>Setters</th>\n    </tr>\n    <tr>\n        <th></th>\n        <th colspan=\"2\">Methods</th>\n    </tr>\n</table>\n"
  },
  {
    "path": "docs/references/function-list-by-category.md",
    "content": "# Function list by category\n\n## CATEGORY_CUBE\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nCUBEKPIMEMBER            | **Not yet Implemented**\nCUBEMEMBER               | **Not yet Implemented**\nCUBEMEMBERPROPERTY       | **Not yet Implemented**\nCUBERANKEDMEMBER         | **Not yet Implemented**\nCUBESET                  | **Not yet Implemented**\nCUBESETCOUNT             | **Not yet Implemented**\nCUBEVALUE                | **Not yet Implemented**\n\n## CATEGORY_DATABASE\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nDAVERAGE                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DAverage::evaluate\nDCOUNT                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DCount::evaluate\nDCOUNTA                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DCountA::evaluate\nDGET                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DGet::evaluate\nDMAX                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DMax::evaluate\nDMIN                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DMin::evaluate\nDPRODUCT                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DProduct::evaluate\nDSTDEV                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DStDev::evaluate\nDSTDEVP                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DStDevP::evaluate\nDSUM                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DSum::evaluate\nDVAR                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DVar::evaluate\nDVARP                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DVarP::evaluate\n\n## CATEGORY_DATE_AND_TIME\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nDATE                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Date::fromYMD\nDATEDIF                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Difference::interval\nDATESTRING               | **Not yet Implemented**\nDATEVALUE                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateValue::fromString\nDAY                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts::day\nDAYS                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Days::between\nDAYS360                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Days360::between\nEDATE                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Month::adjust\nEOMONTH                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Month::lastDay\nHOUR                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts::hour\nISOWEEKNUM               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week::isoWeekNumber\nMINUTE                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts::minute\nMONTH                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts::month\nNETWORKDAYS              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\NetworkDays::count\nNETWORKDAYS.INTL         | **Not yet Implemented**\nNOW                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Current::now\nSECOND                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts::second\nTHAIDAYOFWEEK            | **Not yet Implemented**\nTHAIMONTHOFYEAR          | **Not yet Implemented**\nTHAIYEAR                 | **Not yet Implemented**\nTIME                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Time::fromHMS\nTIMEVALUE                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeValue::fromString\nTODAY                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Current::today\nWEEKDAY                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week::day\nWEEKNUM                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week::number\nWORKDAY                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\WorkDay::date\nWORKDAY.INTL             | **Not yet Implemented**\nYEAR                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts::year\nYEARFRAC                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\YearFrac::fraction\n\n## CATEGORY_ENGINEERING\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nBESSELI                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselI::BESSELI\nBESSELJ                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselJ::BESSELJ\nBESSELK                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselK::BESSELK\nBESSELY                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselY::BESSELY\nBIN2DEC                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary::toDecimal\nBIN2HEX                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary::toHex\nBIN2OCT                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary::toOctal\nBITAND                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITAND\nBITLSHIFT                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITLSHIFT\nBITOR                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITOR\nBITRSHIFT                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITRSHIFT\nBITXOR                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITXOR\nCOMPLEX                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex::COMPLEX\nCONVERT                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertUOM::CONVERT\nDEC2BIN                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal::toBinary\nDEC2HEX                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal::toHex\nDEC2OCT                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal::toOctal\nDELTA                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Compare::DELTA\nERF                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Erf::ERF\nERF.PRECISE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Erf::ERFPRECISE\nERFC                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ErfC::ERFC\nERFC.PRECISE             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ErfC::ERFC\nGESTEP                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Compare::GESTEP\nHEX2BIN                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex::toBinary\nHEX2DEC                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex::toDecimal\nHEX2OCT                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex::toOctal\nIMABS                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMABS\nIMAGINARY                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex::IMAGINARY\nIMARGUMENT               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMARGUMENT\nIMCONJUGATE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCONJUGATE\nIMCOS                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCOS\nIMCOSH                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCOSH\nIMCOT                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCOT\nIMCSC                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCSC\nIMCSCH                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCSCH\nIMDIV                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations::IMDIV\nIMEXP                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMEXP\nIMLN                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMLN\nIMLOG10                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMLOG10\nIMLOG2                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMLOG2\nIMPOWER                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMPOWER\nIMPRODUCT                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations::IMPRODUCT\nIMREAL                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex::IMREAL\nIMSEC                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSEC\nIMSECH                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSECH\nIMSIN                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSIN\nIMSINH                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSINH\nIMSQRT                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSQRT\nIMSUB                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations::IMSUB\nIMSUM                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations::IMSUM\nIMTAN                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMTAN\nOCT2BIN                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal::toBinary\nOCT2DEC                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal::toDecimal\nOCT2HEX                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal::toHex\n\n## CATEGORY_FINANCIAL\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nACCRINT                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\AccruedInterest::periodic\nACCRINTM                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\AccruedInterest::atMaturity\nAMORDEGRC                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Amortization::AMORDEGRC\nAMORLINC                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Amortization::AMORLINC\nCOUPDAYBS                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPDAYBS\nCOUPDAYS                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPDAYS\nCOUPDAYSNC               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPDAYSNC\nCOUPNCD                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPNCD\nCOUPNUM                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPNUM\nCOUPPCD                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPPCD\nCUMIPMT                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Cumulative::interest\nCUMPRINC                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Cumulative::principal\nDB                       | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Depreciation::DB\nDDB                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Depreciation::DDB\nDISC                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Rates::discount\nDOLLARDE                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Dollar::decimal\nDOLLARFR                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Dollar::fractional\nDURATION                 | **Not yet Implemented**\nEFFECT                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\InterestRate::effective\nFV                       | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic::futureValue\nFVSCHEDULE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Single::futureValue\nINTRATE                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Rates::interest\nIPMT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Interest::payment\nIRR                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\Periodic::rate\nISPMT                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Interest::schedulePayment\nMDURATION                | **Not yet Implemented**\nMIRR                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\Periodic::modifiedRate\nNOMINAL                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\InterestRate::nominal\nNPER                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic::periods\nNPV                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\Periodic::presentValue\nODDFPRICE                | **Not yet Implemented**\nODDFYIELD                | **Not yet Implemented**\nODDLPRICE                | **Not yet Implemented**\nODDLYIELD                | **Not yet Implemented**\nPDURATION                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Single::periods\nPMT                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Payments::annuity\nPPMT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Payments::interestPayment\nPRICE                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Price::price\nPRICEDISC                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Price::priceDiscounted\nPRICEMAT                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Price::priceAtMaturity\nPV                       | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic::presentValue\nRATE                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Interest::rate\nRECEIVED                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Price::received\nRRI                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Single::interestRate\nSLN                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Depreciation::SLN\nSYD                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Depreciation::SYD\nTBILLEQ                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\TreasuryBill::bondEquivalentYield\nTBILLPRICE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\TreasuryBill::price\nTBILLYIELD               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\TreasuryBill::yield\nUSDOLLAR                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Dollar::format\nVDB                      | **Not yet Implemented**\nXIRR                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\NonPeriodic::rate\nXNPV                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\NonPeriodic::presentValue\nYIELD                    | **Not yet Implemented**\nYIELDDISC                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Yields::yieldDiscounted\nYIELDMAT                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Yields::yieldAtMaturity\n\n## CATEGORY_INFORMATION\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nCELL                     | **Not yet Implemented**\nERROR.TYPE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError::type\nINFO                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Info::getInfo\nISBLANK                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isBlank\nISERR                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue::isErr\nISERROR                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue::isError\nISEVEN                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isEven\nISFORMULA                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isFormula\nISLOGICAL                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isLogical\nISNA                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue::isNa\nISNONTEXT                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isNonText\nISNUMBER                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isNumber\nISODD                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isOdd\nISOMITTED                | **Not yet Implemented**\nISREF                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isRef\nISTEXT                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isText\nN                        | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::asNumber\nNA                       | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError::NA\nSHEET                    | **Not yet Implemented**\nSHEETS                   | **Not yet Implemented**\nTYPE                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::type\n\n## CATEGORY_LOGICAL\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nAND                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::logicalAnd\nBYCOL                    | **Not yet Implemented**\nBYROW                    | **Not yet Implemented**\nFALSE                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Boolean::FALSE\nIF                       | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::statementIf\nIFERROR                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::IFERROR\nIFNA                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::IFNA\nIFS                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::IFS\nLAMBDA                   | **Not yet Implemented**\nLET                      | **Not yet Implemented**\nMAKEARRAY                | **Not yet Implemented**\nMAP                      | **Not yet Implemented**\nNOT                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::NOT\nOR                       | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::logicalOr\nREDUCE                   | **Not yet Implemented**\nSCAN                     | **Not yet Implemented**\nSWITCH                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::statementSwitch\nTRUE                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Boolean::TRUE\nXOR                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::logicalXor\n\n## CATEGORY_LOOKUP_AND_REFERENCE\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nADDRESS                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Address::cell\nAREAS                    | **Not yet Implemented**\nCHOOSE                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Selection::CHOOSE\nCHOOSECOLS               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::chooseCols\nCHOOSEROWS               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::chooseRows\nCOLUMN                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\RowColumnInformation::COLUMN\nCOLUMNS                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\RowColumnInformation::COLUMNS\nDROP                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::drop\nEXPAND                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::expand\nFILTER                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Filter::filter\nFORMULATEXT              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Formula::text\nGETPIVOTDATA             | **Not yet Implemented**\nGROUPBY                  | **Not yet Implemented**\nHLOOKUP                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\HLookup::lookup\nHSTACK                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Hstack::hstack\nHYPERLINK                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Hyperlink::set\nINDEX                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Matrix::index\nINDIRECT                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Indirect::INDIRECT\nLOOKUP                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Lookup::lookup\nMATCH                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ExcelMatch::MATCH\nOFFSET                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Offset::OFFSET\nROW                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\RowColumnInformation::ROW\nROWS                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\RowColumnInformation::ROWS\nRTD                      | **Not yet Implemented**\nSORT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Sort::sort\nSORTBY                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Sort::sortBy\nTAKE                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::take\nTOCOL                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\TorowTocol::tocol\nTOROW                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\TorowTocol::torow\nTRANSPOSE                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Matrix::transpose\nUNIQUE                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Unique::unique\nVLOOKUP                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\VLookup::lookup\nVSTACK                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Vstack::vstack\nXLOOKUP                  | **Not yet Implemented**\nXMATCH                   | **Not yet Implemented**\n\n## CATEGORY_MATH_AND_TRIG\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nABS                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Absolute::evaluate\nACOS                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosine::acos\nACOSH                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosine::acosh\nACOT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cotangent::acot\nACOTH                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cotangent::acoth\nAGGREGATE                | **Not yet Implemented**\nARABIC                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Arabic::evaluate\nASIN                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Sine::asin\nASINH                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Sine::asinh\nATAN                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::atan\nATAN2                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::atan2\nATANH                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::atanh\nBASE                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Base::evaluate\nCEILING                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Ceiling::ceiling\nCEILING.MATH             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Ceiling::math\nCEILING.PRECISE          | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Ceiling::precise\nCOMBIN                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Combinations::withoutRepetition\nCOMBINA                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Combinations::withRepetition\nCOS                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosine::cos\nCOSH                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosine::cosh\nCOT                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cotangent::cot\nCOTH                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cotangent::coth\nCSC                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosecant::csc\nCSCH                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosecant::csch\nDECIMAL                  | **Not yet Implemented**\nDEGREES                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Angle::toDegrees\nECMA.CEILING             | **Not yet Implemented**\nEVEN                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::even\nEXP                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Exp::evaluate\nFACT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Factorial::fact\nFACTDOUBLE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Factorial::factDouble\nFLOOR                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Floor::floor\nFLOOR.MATH               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Floor::math\nFLOOR.PRECISE            | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Floor::precise\nGCD                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Gcd::evaluate\nINT                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\IntClass::evaluate\nISO.CEILING              | **Not yet Implemented**\nLCM                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Lcm::evaluate\nLN                       | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Logarithms::natural\nLOG                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Logarithms::withBase\nLOG10                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Logarithms::base10\nMDETERM                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::determinant\nMINVERSE                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::inverse\nMMULT                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::multiply\nMOD                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Operations::mod\nMROUND                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::multiple\nMULTINOMIAL              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Factorial::multinomial\nMUNIT                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::identity\nODD                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::odd\nPI                       | pi\nPOWER                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Operations::power\nPRODUCT                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Operations::product\nQUOTIENT                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Operations::quotient\nRADIANS                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Angle::toRadians\nRAND                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Random::rand\nRANDARRAY                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Random::randArray\nRANDBETWEEN              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Random::randBetween\nROMAN                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Roman::evaluate\nROUND                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::round\nROUNDBAHTDOWN            | **Not yet Implemented**\nROUNDBAHTUP              | **Not yet Implemented**\nROUNDDOWN                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::down\nROUNDUP                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::up\nSEC                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Secant::sec\nSECH                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Secant::sech\nSEQUENCE                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::sequence\nSERIESSUM                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SeriesSum::evaluate\nSIGN                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sign::evaluate\nSIN                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Sine::sin\nSINH                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Sine::sinh\nSQRT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sqrt::sqrt\nSQRTPI                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sqrt::pi\nSUBTOTAL                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Subtotal::evaluate\nSUM                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sum::sumErroringStrings\nSUMIF                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::SUMIF\nSUMIFS                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::SUMIFS\nSUMPRODUCT               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sum::product\nSUMSQ                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SumSquares::sumSquare\nSUMX2MY2                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SumSquares::sumXSquaredMinusYSquared\nSUMX2PY2                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SumSquares::sumXSquaredPlusYSquared\nSUMXMY2                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SumSquares::sumXMinusYSquared\nTAN                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::tan\nTANH                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::tanh\nTRUNC                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trunc::evaluate\nWRAPCOLS                 | **Not yet Implemented**\nWRAPROWS                 | **Not yet Implemented**\n\n## CATEGORY_STATISTICAL\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nAVEDEV                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::averageDeviations\nAVERAGE                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::average\nAVERAGEA                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::averageA\nAVERAGEIF                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::AVERAGEIF\nAVERAGEIFS               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::AVERAGEIFS\nBETA.DIST                | **Not yet Implemented**\nBETA.INV                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Beta::inverse\nBETADIST                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Beta::distribution\nBETAINV                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Beta::inverse\nBINOM.DIST               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::distribution\nBINOM.DIST.RANGE         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::range\nBINOM.INV                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::inverse\nBINOMDIST                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::distribution\nCHIDIST                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::distributionRightTail\nCHIINV                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::inverseRightTail\nCHISQ.DIST               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::distributionLeftTail\nCHISQ.DIST.RT            | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::distributionRightTail\nCHISQ.INV                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::inverseLeftTail\nCHISQ.INV.RT             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::inverseRightTail\nCHISQ.TEST               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::test\nCHITEST                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::test\nCONFIDENCE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Confidence::CONFIDENCE\nCONFIDENCE.NORM          | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Confidence::CONFIDENCE\nCONFIDENCE.T             | **Not yet Implemented**\nCORREL                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::CORREL\nCOUNT                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts::COUNT\nCOUNTA                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts::COUNTA\nCOUNTBLANK               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts::COUNTBLANK\nCOUNTIF                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::COUNTIF\nCOUNTIFS                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::COUNTIFS\nCOVAR                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::COVAR\nCOVARIANCE.P             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::COVAR\nCOVARIANCE.S             | **Not yet Implemented**\nCRITBINOM                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::inverse\nDEVSQ                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Deviations::sumSquares\nEXPON.DIST               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Exponential::distribution\nEXPONDIST                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Exponential::distribution\nF.DIST                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\F::distribution\nF.DIST.RT                | **Not yet Implemented**\nF.INV                    | **Not yet Implemented**\nF.INV.RT                 | **Not yet Implemented**\nF.TEST                   | **Not yet Implemented**\nFDIST                    | **Not yet Implemented**\nFINV                     | **Not yet Implemented**\nFISHER                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Fisher::distribution\nFISHERINV                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Fisher::inverse\nFORECAST                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::FORECAST\nFORECAST.ETS             | **Not yet Implemented**\nFORECAST.ETS.CONFINT     | **Not yet Implemented**\nFORECAST.ETS.SEASONALITY | **Not yet Implemented**\nFORECAST.ETS.STAT        | **Not yet Implemented**\nFORECAST.LINEAR          | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::FORECAST\nFREQUENCY                | **Not yet Implemented**\nFTEST                    | **Not yet Implemented**\nGAMMA                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::gamma\nGAMMA.DIST               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::distribution\nGAMMA.INV                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::inverse\nGAMMADIST                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::distribution\nGAMMAINV                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::inverse\nGAMMALN                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::ln\nGAMMALN.PRECISE          | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::ln\nGAUSS                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::gauss\nGEOMEAN                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages\\Mean::geometric\nGROWTH                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::GROWTH\nHARMEAN                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages\\Mean::harmonic\nHYPGEOM.DIST             | **Not yet Implemented**\nHYPGEOMDIST              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\HyperGeometric::distribution\nINTERCEPT                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::INTERCEPT\nKURT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Deviations::kurtosis\nLARGE                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Size::large\nLINEST                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::LINEST\nLOGEST                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::LOGEST\nLOGINV                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\LogNormal::inverse\nLOGNORM.DIST             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\LogNormal::distribution\nLOGNORM.INV              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\LogNormal::inverse\nLOGNORMDIST              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\LogNormal::cumulative\nMAX                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Maximum::max\nMAXA                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Maximum::maxA\nMAXIFS                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::MAXIFS\nMEDIAN                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::median\nMEDIANIF                 | **Not yet Implemented**\nMIN                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Minimum::min\nMINA                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Minimum::minA\nMINIFS                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::MINIFS\nMODE                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::mode\nMODE.MULT                | **Not yet Implemented**\nMODE.SNGL                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::mode\nNEGBINOM.DIST            | **Not yet Implemented**\nNEGBINOMDIST             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::negative\nNORM.DIST                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Normal::distribution\nNORM.INV                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Normal::inverse\nNORM.S.DIST              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::distribution\nNORM.S.INV               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::inverse\nNORMDIST                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Normal::distribution\nNORMINV                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Normal::inverse\nNORMSDIST                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::cumulative\nNORMSINV                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::inverse\nPEARSON                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::CORREL\nPERCENTILE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::PERCENTILE\nPERCENTILE.EXC           | **Not yet Implemented**\nPERCENTILE.INC           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::PERCENTILE\nPERCENTRANK              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::PERCENTRANK\nPERCENTRANK.EXC          | **Not yet Implemented**\nPERCENTRANK.INC          | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::PERCENTRANK\nPERMUT                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Permutations::PERMUT\nPERMUTATIONA             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Permutations::PERMUTATIONA\nPHI                      | **Not yet Implemented**\nPOISSON                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Poisson::distribution\nPOISSON.DIST             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Poisson::distribution\nPROB                     | **Not yet Implemented**\nQUARTILE                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::QUARTILE\nQUARTILE.EXC             | **Not yet Implemented**\nQUARTILE.INC             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::QUARTILE\nRANK                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::RANK\nRANK.AVG                 | **Not yet Implemented**\nRANK.EQ                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::RANK\nRSQ                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::RSQ\nSKEW                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Deviations::skew\nSKEW.P                   | **Not yet Implemented**\nSLOPE                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::SLOPE\nSMALL                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Size::small\nSTANDARDIZE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Standardize::execute\nSTDEV                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEV\nSTDEV.P                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEVP\nSTDEV.S                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEV\nSTDEVA                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEVA\nSTDEVP                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEVP\nSTDEVPA                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEVPA\nSTEYX                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::STEYX\nT.DIST                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::tDotDist\nT.DIST.2T                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::tDotDistDot2T\nT.DIST.RT                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::tDotDistDotRT\nT.INV                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::tDotInv\nT.INV.2T                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::inverse\nT.TEST                   | **Not yet Implemented**\nTDIST                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::distribution\nTINV                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::inverse\nTREND                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::TREND\nTRIMMEAN                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages\\Mean::trim\nTTEST                    | **Not yet Implemented**\nVAR                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VAR\nVAR.P                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VARP\nVAR.S                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VAR\nVARA                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VARA\nVARP                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VARP\nVARPA                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VARPA\nWEIBULL                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Weibull::distribution\nWEIBULL.DIST             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Weibull::distribution\nZ.TEST                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::zTest\nZTEST                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::zTest\n\n## CATEGORY_TEXT_AND_DATA\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nARRAYTOTEXT              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::fromArray\nASC                      | **Not yet Implemented**\nBAHTTEXT                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Thai::getBahtText\nCHAR                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert::character\nCLEAN                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Trim::nonPrintable\nCODE                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert::code\nCONCAT                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Concatenate::CONCATENATE\nCONCATENATE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Concatenate::actualCONCATENATE\nDBCS                     | **Not yet Implemented**\nDOLLAR                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::DOLLAR\nEXACT                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::exact\nFIND                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Search::sensitive\nFINDB                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Search::sensitive\nFIXED                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::FIXEDFORMAT\nISTHAIDIGIT              | **Not yet Implemented**\nJIS                      | **Not yet Implemented**\nLEFT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::left\nLEFTB                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::left\nLEN                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::length\nLENB                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::length\nLOWER                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CaseConvert::lower\nMID                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::mid\nMIDB                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::mid\nNUMBERSTRING             | **Not yet Implemented**\nNUMBERVALUE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::NUMBERVALUE\nPHONETIC                 | **Not yet Implemented**\nPROPER                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CaseConvert::proper\nREPLACE                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Replace::replace\nREPLACEB                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Replace::replace\nREPT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Concatenate::builtinREPT\nRIGHT                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::right\nRIGHTB                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::right\nSEARCH                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Search::insensitive\nSEARCHB                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Search::insensitive\nSUBSTITUTE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Replace::substitute\nT                        | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::test\nTEXT                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::TEXTFORMAT\nTEXTAFTER                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::after\nTEXTBEFORE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::before\nTEXTJOIN                 | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Concatenate::TEXTJOIN\nTEXTSPLIT                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::split\nTHAIDIGIT                | **Not yet Implemented**\nTHAINUMSOUND             | **Not yet Implemented**\nTHAINUMSTRING            | **Not yet Implemented**\nTHAISTRINGLENGTH         | **Not yet Implemented**\nTRIM                     | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Trim::spaces\nUNICHAR                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert::characterUnicode\nUNICODE                  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert::codeUnicode\nUPPER                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CaseConvert::upper\nVALUE                    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::VALUE\nVALUETOTEXT              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::valueToText\n\n## CATEGORY_WEB\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nENCODEURL                | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Web\\Service::urlEncode\nFILTERXML                | **Not yet Implemented**\nWEBSERVICE               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Web\\Service::webService\n\n## CATEGORY_UNCATEGORISED\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\n\n## CATEGORY_MICROSOFT_INTERNAL\n\nExcel Function           | PhpSpreadsheet Function\n-------------------------|--------------------------------------\nANCHORARRAY              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\ExcelArrayPseudoFunctions::anchorArray\nSINGLE                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\ExcelArrayPseudoFunctions::single\n"
  },
  {
    "path": "docs/references/function-list-by-name-compact.md",
    "content": "# Function list by name compact\n\nCategory should be prefixed by `CATEGORY_` to match the values in \\PhpOffice\\PhpSpreadsheet\\Calculation\\Category\n\nFunction should be prefixed by `PhpOffice\\PhpSpreadsheet\\Calculation\\`\n\nA less compact list can be found [here](./function-list-by-name.md)\n\n\n## A\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nABS                      | MATH_AND_TRIG         | MathTrig\\Absolute::evaluate\nACCRINT                  | FINANCIAL             | Financial\\Securities\\AccruedInterest::periodic\nACCRINTM                 | FINANCIAL             | Financial\\Securities\\AccruedInterest::atMaturity\nACOS                     | MATH_AND_TRIG         | MathTrig\\Trig\\Cosine::acos\nACOSH                    | MATH_AND_TRIG         | MathTrig\\Trig\\Cosine::acosh\nACOT                     | MATH_AND_TRIG         | MathTrig\\Trig\\Cotangent::acot\nACOTH                    | MATH_AND_TRIG         | MathTrig\\Trig\\Cotangent::acoth\nADDRESS                  | LOOKUP_AND_REFERENCE  | LookupRef\\Address::cell\nAGGREGATE                | MATH_AND_TRIG         | **Not yet Implemented**\nAMORDEGRC                | FINANCIAL             | Financial\\Amortization::AMORDEGRC\nAMORLINC                 | FINANCIAL             | Financial\\Amortization::AMORLINC\nANCHORARRAY              | MICROSOFT_INTERNAL    | Internal\\ExcelArrayPseudoFunctions::anchorArray\nAND                      | LOGICAL               | Logical\\Operations::logicalAnd\nARABIC                   | MATH_AND_TRIG         | MathTrig\\Arabic::evaluate\nAREAS                    | LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nARRAYTOTEXT              | TEXT_AND_DATA         | TextData\\Text::fromArray\nASC                      | TEXT_AND_DATA         | **Not yet Implemented**\nASIN                     | MATH_AND_TRIG         | MathTrig\\Trig\\Sine::asin\nASINH                    | MATH_AND_TRIG         | MathTrig\\Trig\\Sine::asinh\nATAN                     | MATH_AND_TRIG         | MathTrig\\Trig\\Tangent::atan\nATAN2                    | MATH_AND_TRIG         | MathTrig\\Trig\\Tangent::atan2\nATANH                    | MATH_AND_TRIG         | MathTrig\\Trig\\Tangent::atanh\nAVEDEV                   | STATISTICAL           | Statistical\\Averages::averageDeviations\nAVERAGE                  | STATISTICAL           | Statistical\\Averages::average\nAVERAGEA                 | STATISTICAL           | Statistical\\Averages::averageA\nAVERAGEIF                | STATISTICAL           | Statistical\\Conditional::AVERAGEIF\nAVERAGEIFS               | STATISTICAL           | Statistical\\Conditional::AVERAGEIFS\n\n## B\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nBAHTTEXT                 | TEXT_AND_DATA         | TextData\\Thai::getBahtText\nBASE                     | MATH_AND_TRIG         | MathTrig\\Base::evaluate\nBESSELI                  | ENGINEERING           | Engineering\\BesselI::BESSELI\nBESSELJ                  | ENGINEERING           | Engineering\\BesselJ::BESSELJ\nBESSELK                  | ENGINEERING           | Engineering\\BesselK::BESSELK\nBESSELY                  | ENGINEERING           | Engineering\\BesselY::BESSELY\nBETA.DIST                | STATISTICAL           | **Not yet Implemented**\nBETA.INV                 | STATISTICAL           | Statistical\\Distributions\\Beta::inverse\nBETADIST                 | STATISTICAL           | Statistical\\Distributions\\Beta::distribution\nBETAINV                  | STATISTICAL           | Statistical\\Distributions\\Beta::inverse\nBIN2DEC                  | ENGINEERING           | Engineering\\ConvertBinary::toDecimal\nBIN2HEX                  | ENGINEERING           | Engineering\\ConvertBinary::toHex\nBIN2OCT                  | ENGINEERING           | Engineering\\ConvertBinary::toOctal\nBINOM.DIST               | STATISTICAL           | Statistical\\Distributions\\Binomial::distribution\nBINOM.DIST.RANGE         | STATISTICAL           | Statistical\\Distributions\\Binomial::range\nBINOM.INV                | STATISTICAL           | Statistical\\Distributions\\Binomial::inverse\nBINOMDIST                | STATISTICAL           | Statistical\\Distributions\\Binomial::distribution\nBITAND                   | ENGINEERING           | Engineering\\BitWise::BITAND\nBITLSHIFT                | ENGINEERING           | Engineering\\BitWise::BITLSHIFT\nBITOR                    | ENGINEERING           | Engineering\\BitWise::BITOR\nBITRSHIFT                | ENGINEERING           | Engineering\\BitWise::BITRSHIFT\nBITXOR                   | ENGINEERING           | Engineering\\BitWise::BITXOR\nBYCOL                    | LOGICAL               | **Not yet Implemented**\nBYROW                    | LOGICAL               | **Not yet Implemented**\n\n## C\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nCEILING                  | MATH_AND_TRIG         | MathTrig\\Ceiling::ceiling\nCEILING.MATH             | MATH_AND_TRIG         | MathTrig\\Ceiling::math\nCEILING.PRECISE          | MATH_AND_TRIG         | MathTrig\\Ceiling::precise\nCELL                     | INFORMATION           | **Not yet Implemented**\nCHAR                     | TEXT_AND_DATA         | TextData\\CharacterConvert::character\nCHIDIST                  | STATISTICAL           | Statistical\\Distributions\\ChiSquared::distributionRightTail\nCHIINV                   | STATISTICAL           | Statistical\\Distributions\\ChiSquared::inverseRightTail\nCHISQ.DIST               | STATISTICAL           | Statistical\\Distributions\\ChiSquared::distributionLeftTail\nCHISQ.DIST.RT            | STATISTICAL           | Statistical\\Distributions\\ChiSquared::distributionRightTail\nCHISQ.INV                | STATISTICAL           | Statistical\\Distributions\\ChiSquared::inverseLeftTail\nCHISQ.INV.RT             | STATISTICAL           | Statistical\\Distributions\\ChiSquared::inverseRightTail\nCHISQ.TEST               | STATISTICAL           | Statistical\\Distributions\\ChiSquared::test\nCHITEST                  | STATISTICAL           | Statistical\\Distributions\\ChiSquared::test\nCHOOSE                   | LOOKUP_AND_REFERENCE  | LookupRef\\Selection::CHOOSE\nCHOOSECOLS               | LOOKUP_AND_REFERENCE  | LookupRef\\ChooseRowsEtc::chooseCols\nCHOOSEROWS               | LOOKUP_AND_REFERENCE  | LookupRef\\ChooseRowsEtc::chooseRows\nCLEAN                    | TEXT_AND_DATA         | TextData\\Trim::nonPrintable\nCODE                     | TEXT_AND_DATA         | TextData\\CharacterConvert::code\nCOLUMN                   | LOOKUP_AND_REFERENCE  | LookupRef\\RowColumnInformation::COLUMN\nCOLUMNS                  | LOOKUP_AND_REFERENCE  | LookupRef\\RowColumnInformation::COLUMNS\nCOMBIN                   | MATH_AND_TRIG         | MathTrig\\Combinations::withoutRepetition\nCOMBINA                  | MATH_AND_TRIG         | MathTrig\\Combinations::withRepetition\nCOMPLEX                  | ENGINEERING           | Engineering\\Complex::COMPLEX\nCONCAT                   | TEXT_AND_DATA         | TextData\\Concatenate::CONCATENATE\nCONCATENATE              | TEXT_AND_DATA         | TextData\\Concatenate::actualCONCATENATE\nCONFIDENCE               | STATISTICAL           | Statistical\\Confidence::CONFIDENCE\nCONFIDENCE.NORM          | STATISTICAL           | Statistical\\Confidence::CONFIDENCE\nCONFIDENCE.T             | STATISTICAL           | **Not yet Implemented**\nCONVERT                  | ENGINEERING           | Engineering\\ConvertUOM::CONVERT\nCORREL                   | STATISTICAL           | Statistical\\Trends::CORREL\nCOS                      | MATH_AND_TRIG         | MathTrig\\Trig\\Cosine::cos\nCOSH                     | MATH_AND_TRIG         | MathTrig\\Trig\\Cosine::cosh\nCOT                      | MATH_AND_TRIG         | MathTrig\\Trig\\Cotangent::cot\nCOTH                     | MATH_AND_TRIG         | MathTrig\\Trig\\Cotangent::coth\nCOUNT                    | STATISTICAL           | Statistical\\Counts::COUNT\nCOUNTA                   | STATISTICAL           | Statistical\\Counts::COUNTA\nCOUNTBLANK               | STATISTICAL           | Statistical\\Counts::COUNTBLANK\nCOUNTIF                  | STATISTICAL           | Statistical\\Conditional::COUNTIF\nCOUNTIFS                 | STATISTICAL           | Statistical\\Conditional::COUNTIFS\nCOUPDAYBS                | FINANCIAL             | Financial\\Coupons::COUPDAYBS\nCOUPDAYS                 | FINANCIAL             | Financial\\Coupons::COUPDAYS\nCOUPDAYSNC               | FINANCIAL             | Financial\\Coupons::COUPDAYSNC\nCOUPNCD                  | FINANCIAL             | Financial\\Coupons::COUPNCD\nCOUPNUM                  | FINANCIAL             | Financial\\Coupons::COUPNUM\nCOUPPCD                  | FINANCIAL             | Financial\\Coupons::COUPPCD\nCOVAR                    | STATISTICAL           | Statistical\\Trends::COVAR\nCOVARIANCE.P             | STATISTICAL           | Statistical\\Trends::COVAR\nCOVARIANCE.S             | STATISTICAL           | **Not yet Implemented**\nCRITBINOM                | STATISTICAL           | Statistical\\Distributions\\Binomial::inverse\nCSC                      | MATH_AND_TRIG         | MathTrig\\Trig\\Cosecant::csc\nCSCH                     | MATH_AND_TRIG         | MathTrig\\Trig\\Cosecant::csch\nCUBEKPIMEMBER            | CUBE                  | **Not yet Implemented**\nCUBEMEMBER               | CUBE                  | **Not yet Implemented**\nCUBEMEMBERPROPERTY       | CUBE                  | **Not yet Implemented**\nCUBERANKEDMEMBER         | CUBE                  | **Not yet Implemented**\nCUBESET                  | CUBE                  | **Not yet Implemented**\nCUBESETCOUNT             | CUBE                  | **Not yet Implemented**\nCUBEVALUE                | CUBE                  | **Not yet Implemented**\nCUMIPMT                  | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic\\Cumulative::interest\nCUMPRINC                 | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic\\Cumulative::principal\n\n## D\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nDATE                     | DATE_AND_TIME         | DateTimeExcel\\Date::fromYMD\nDATEDIF                  | DATE_AND_TIME         | DateTimeExcel\\Difference::interval\nDATESTRING               | DATE_AND_TIME         | **Not yet Implemented**\nDATEVALUE                | DATE_AND_TIME         | DateTimeExcel\\DateValue::fromString\nDAVERAGE                 | DATABASE              | Database\\DAverage::evaluate\nDAY                      | DATE_AND_TIME         | DateTimeExcel\\DateParts::day\nDAYS                     | DATE_AND_TIME         | DateTimeExcel\\Days::between\nDAYS360                  | DATE_AND_TIME         | DateTimeExcel\\Days360::between\nDB                       | FINANCIAL             | Financial\\Depreciation::DB\nDBCS                     | TEXT_AND_DATA         | **Not yet Implemented**\nDCOUNT                   | DATABASE              | Database\\DCount::evaluate\nDCOUNTA                  | DATABASE              | Database\\DCountA::evaluate\nDDB                      | FINANCIAL             | Financial\\Depreciation::DDB\nDEC2BIN                  | ENGINEERING           | Engineering\\ConvertDecimal::toBinary\nDEC2HEX                  | ENGINEERING           | Engineering\\ConvertDecimal::toHex\nDEC2OCT                  | ENGINEERING           | Engineering\\ConvertDecimal::toOctal\nDECIMAL                  | MATH_AND_TRIG         | **Not yet Implemented**\nDEGREES                  | MATH_AND_TRIG         | MathTrig\\Angle::toDegrees\nDELTA                    | ENGINEERING           | Engineering\\Compare::DELTA\nDEVSQ                    | STATISTICAL           | Statistical\\Deviations::sumSquares\nDGET                     | DATABASE              | Database\\DGet::evaluate\nDISC                     | FINANCIAL             | Financial\\Securities\\Rates::discount\nDMAX                     | DATABASE              | Database\\DMax::evaluate\nDMIN                     | DATABASE              | Database\\DMin::evaluate\nDOLLAR                   | TEXT_AND_DATA         | TextData\\Format::DOLLAR\nDOLLARDE                 | FINANCIAL             | Financial\\Dollar::decimal\nDOLLARFR                 | FINANCIAL             | Financial\\Dollar::fractional\nDPRODUCT                 | DATABASE              | Database\\DProduct::evaluate\nDROP                     | LOOKUP_AND_REFERENCE  | LookupRef\\ChooseRowsEtc::drop\nDSTDEV                   | DATABASE              | Database\\DStDev::evaluate\nDSTDEVP                  | DATABASE              | Database\\DStDevP::evaluate\nDSUM                     | DATABASE              | Database\\DSum::evaluate\nDURATION                 | FINANCIAL             | **Not yet Implemented**\nDVAR                     | DATABASE              | Database\\DVar::evaluate\nDVARP                    | DATABASE              | Database\\DVarP::evaluate\n\n## E\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nECMA.CEILING             | MATH_AND_TRIG         | **Not yet Implemented**\nEDATE                    | DATE_AND_TIME         | DateTimeExcel\\Month::adjust\nEFFECT                   | FINANCIAL             | Financial\\InterestRate::effective\nENCODEURL                | WEB                   | Web\\Service::urlEncode\nEOMONTH                  | DATE_AND_TIME         | DateTimeExcel\\Month::lastDay\nERF                      | ENGINEERING           | Engineering\\Erf::ERF\nERF.PRECISE              | ENGINEERING           | Engineering\\Erf::ERFPRECISE\nERFC                     | ENGINEERING           | Engineering\\ErfC::ERFC\nERFC.PRECISE             | ENGINEERING           | Engineering\\ErfC::ERFC\nERROR.TYPE               | INFORMATION           | Information\\ExcelError::type\nEVEN                     | MATH_AND_TRIG         | MathTrig\\Round::even\nEXACT                    | TEXT_AND_DATA         | TextData\\Text::exact\nEXP                      | MATH_AND_TRIG         | MathTrig\\Exp::evaluate\nEXPAND                   | LOOKUP_AND_REFERENCE  | LookupRef\\ChooseRowsEtc::expand\nEXPON.DIST               | STATISTICAL           | Statistical\\Distributions\\Exponential::distribution\nEXPONDIST                | STATISTICAL           | Statistical\\Distributions\\Exponential::distribution\n\n## F\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nF.DIST                   | STATISTICAL           | Statistical\\Distributions\\F::distribution\nF.DIST.RT                | STATISTICAL           | **Not yet Implemented**\nF.INV                    | STATISTICAL           | **Not yet Implemented**\nF.INV.RT                 | STATISTICAL           | **Not yet Implemented**\nF.TEST                   | STATISTICAL           | **Not yet Implemented**\nFACT                     | MATH_AND_TRIG         | MathTrig\\Factorial::fact\nFACTDOUBLE               | MATH_AND_TRIG         | MathTrig\\Factorial::factDouble\nFALSE                    | LOGICAL               | Logical\\Boolean::FALSE\nFDIST                    | STATISTICAL           | **Not yet Implemented**\nFILTER                   | LOOKUP_AND_REFERENCE  | LookupRef\\Filter::filter\nFILTERXML                | WEB                   | **Not yet Implemented**\nFIND                     | TEXT_AND_DATA         | TextData\\Search::sensitive\nFINDB                    | TEXT_AND_DATA         | TextData\\Search::sensitive\nFINV                     | STATISTICAL           | **Not yet Implemented**\nFISHER                   | STATISTICAL           | Statistical\\Distributions\\Fisher::distribution\nFISHERINV                | STATISTICAL           | Statistical\\Distributions\\Fisher::inverse\nFIXED                    | TEXT_AND_DATA         | TextData\\Format::FIXEDFORMAT\nFLOOR                    | MATH_AND_TRIG         | MathTrig\\Floor::floor\nFLOOR.MATH               | MATH_AND_TRIG         | MathTrig\\Floor::math\nFLOOR.PRECISE            | MATH_AND_TRIG         | MathTrig\\Floor::precise\nFORECAST                 | STATISTICAL           | Statistical\\Trends::FORECAST\nFORECAST.ETS             | STATISTICAL           | **Not yet Implemented**\nFORECAST.ETS.CONFINT     | STATISTICAL           | **Not yet Implemented**\nFORECAST.ETS.SEASONALITY | STATISTICAL           | **Not yet Implemented**\nFORECAST.ETS.STAT        | STATISTICAL           | **Not yet Implemented**\nFORECAST.LINEAR          | STATISTICAL           | Statistical\\Trends::FORECAST\nFORMULATEXT              | LOOKUP_AND_REFERENCE  | LookupRef\\Formula::text\nFREQUENCY                | STATISTICAL           | **Not yet Implemented**\nFTEST                    | STATISTICAL           | **Not yet Implemented**\nFV                       | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic::futureValue\nFVSCHEDULE               | FINANCIAL             | Financial\\CashFlow\\Single::futureValue\n\n## G\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nGAMMA                    | STATISTICAL           | Statistical\\Distributions\\Gamma::gamma\nGAMMA.DIST               | STATISTICAL           | Statistical\\Distributions\\Gamma::distribution\nGAMMA.INV                | STATISTICAL           | Statistical\\Distributions\\Gamma::inverse\nGAMMADIST                | STATISTICAL           | Statistical\\Distributions\\Gamma::distribution\nGAMMAINV                 | STATISTICAL           | Statistical\\Distributions\\Gamma::inverse\nGAMMALN                  | STATISTICAL           | Statistical\\Distributions\\Gamma::ln\nGAMMALN.PRECISE          | STATISTICAL           | Statistical\\Distributions\\Gamma::ln\nGAUSS                    | STATISTICAL           | Statistical\\Distributions\\StandardNormal::gauss\nGCD                      | MATH_AND_TRIG         | MathTrig\\Gcd::evaluate\nGEOMEAN                  | STATISTICAL           | Statistical\\Averages\\Mean::geometric\nGESTEP                   | ENGINEERING           | Engineering\\Compare::GESTEP\nGETPIVOTDATA             | LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nGROUPBY                  | LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nGROWTH                   | STATISTICAL           | Statistical\\Trends::GROWTH\n\n## H\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nHARMEAN                  | STATISTICAL           | Statistical\\Averages\\Mean::harmonic\nHEX2BIN                  | ENGINEERING           | Engineering\\ConvertHex::toBinary\nHEX2DEC                  | ENGINEERING           | Engineering\\ConvertHex::toDecimal\nHEX2OCT                  | ENGINEERING           | Engineering\\ConvertHex::toOctal\nHLOOKUP                  | LOOKUP_AND_REFERENCE  | LookupRef\\HLookup::lookup\nHOUR                     | DATE_AND_TIME         | DateTimeExcel\\TimeParts::hour\nHSTACK                   | LOOKUP_AND_REFERENCE  | LookupRef\\Hstack::hstack\nHYPERLINK                | LOOKUP_AND_REFERENCE  | LookupRef\\Hyperlink::set\nHYPGEOM.DIST             | STATISTICAL           | **Not yet Implemented**\nHYPGEOMDIST              | STATISTICAL           | Statistical\\Distributions\\HyperGeometric::distribution\n\n## I\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nIF                       | LOGICAL               | Logical\\Conditional::statementIf\nIFERROR                  | LOGICAL               | Logical\\Conditional::IFERROR\nIFNA                     | LOGICAL               | Logical\\Conditional::IFNA\nIFS                      | LOGICAL               | Logical\\Conditional::IFS\nIMABS                    | ENGINEERING           | Engineering\\ComplexFunctions::IMABS\nIMAGINARY                | ENGINEERING           | Engineering\\Complex::IMAGINARY\nIMARGUMENT               | ENGINEERING           | Engineering\\ComplexFunctions::IMARGUMENT\nIMCONJUGATE              | ENGINEERING           | Engineering\\ComplexFunctions::IMCONJUGATE\nIMCOS                    | ENGINEERING           | Engineering\\ComplexFunctions::IMCOS\nIMCOSH                   | ENGINEERING           | Engineering\\ComplexFunctions::IMCOSH\nIMCOT                    | ENGINEERING           | Engineering\\ComplexFunctions::IMCOT\nIMCSC                    | ENGINEERING           | Engineering\\ComplexFunctions::IMCSC\nIMCSCH                   | ENGINEERING           | Engineering\\ComplexFunctions::IMCSCH\nIMDIV                    | ENGINEERING           | Engineering\\ComplexOperations::IMDIV\nIMEXP                    | ENGINEERING           | Engineering\\ComplexFunctions::IMEXP\nIMLN                     | ENGINEERING           | Engineering\\ComplexFunctions::IMLN\nIMLOG10                  | ENGINEERING           | Engineering\\ComplexFunctions::IMLOG10\nIMLOG2                   | ENGINEERING           | Engineering\\ComplexFunctions::IMLOG2\nIMPOWER                  | ENGINEERING           | Engineering\\ComplexFunctions::IMPOWER\nIMPRODUCT                | ENGINEERING           | Engineering\\ComplexOperations::IMPRODUCT\nIMREAL                   | ENGINEERING           | Engineering\\Complex::IMREAL\nIMSEC                    | ENGINEERING           | Engineering\\ComplexFunctions::IMSEC\nIMSECH                   | ENGINEERING           | Engineering\\ComplexFunctions::IMSECH\nIMSIN                    | ENGINEERING           | Engineering\\ComplexFunctions::IMSIN\nIMSINH                   | ENGINEERING           | Engineering\\ComplexFunctions::IMSINH\nIMSQRT                   | ENGINEERING           | Engineering\\ComplexFunctions::IMSQRT\nIMSUB                    | ENGINEERING           | Engineering\\ComplexOperations::IMSUB\nIMSUM                    | ENGINEERING           | Engineering\\ComplexOperations::IMSUM\nIMTAN                    | ENGINEERING           | Engineering\\ComplexFunctions::IMTAN\nINDEX                    | LOOKUP_AND_REFERENCE  | LookupRef\\Matrix::index\nINDIRECT                 | LOOKUP_AND_REFERENCE  | LookupRef\\Indirect::INDIRECT\nINFO                     | INFORMATION           | Information\\Info::getInfo\nINT                      | MATH_AND_TRIG         | MathTrig\\IntClass::evaluate\nINTERCEPT                | STATISTICAL           | Statistical\\Trends::INTERCEPT\nINTRATE                  | FINANCIAL             | Financial\\Securities\\Rates::interest\nIPMT                     | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic\\Interest::payment\nIRR                      | FINANCIAL             | Financial\\CashFlow\\Variable\\Periodic::rate\nISBLANK                  | INFORMATION           | Information\\Value::isBlank\nISERR                    | INFORMATION           | Information\\ErrorValue::isErr\nISERROR                  | INFORMATION           | Information\\ErrorValue::isError\nISEVEN                   | INFORMATION           | Information\\Value::isEven\nISFORMULA                | INFORMATION           | Information\\Value::isFormula\nISLOGICAL                | INFORMATION           | Information\\Value::isLogical\nISNA                     | INFORMATION           | Information\\ErrorValue::isNa\nISNONTEXT                | INFORMATION           | Information\\Value::isNonText\nISNUMBER                 | INFORMATION           | Information\\Value::isNumber\nISO.CEILING              | MATH_AND_TRIG         | **Not yet Implemented**\nISODD                    | INFORMATION           | Information\\Value::isOdd\nISOMITTED                | INFORMATION           | **Not yet Implemented**\nISOWEEKNUM               | DATE_AND_TIME         | DateTimeExcel\\Week::isoWeekNumber\nISPMT                    | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic\\Interest::schedulePayment\nISREF                    | INFORMATION           | Information\\Value::isRef\nISTEXT                   | INFORMATION           | Information\\Value::isText\nISTHAIDIGIT              | TEXT_AND_DATA         | **Not yet Implemented**\n\n## J\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nJIS                      | TEXT_AND_DATA         | **Not yet Implemented**\n\n## K\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nKURT                     | STATISTICAL           | Statistical\\Deviations::kurtosis\n\n## L\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nLAMBDA                   | LOGICAL               | **Not yet Implemented**\nLARGE                    | STATISTICAL           | Statistical\\Size::large\nLCM                      | MATH_AND_TRIG         | MathTrig\\Lcm::evaluate\nLEFT                     | TEXT_AND_DATA         | TextData\\Extract::left\nLEFTB                    | TEXT_AND_DATA         | TextData\\Extract::left\nLEN                      | TEXT_AND_DATA         | TextData\\Text::length\nLENB                     | TEXT_AND_DATA         | TextData\\Text::length\nLET                      | LOGICAL               | **Not yet Implemented**\nLINEST                   | STATISTICAL           | Statistical\\Trends::LINEST\nLN                       | MATH_AND_TRIG         | MathTrig\\Logarithms::natural\nLOG                      | MATH_AND_TRIG         | MathTrig\\Logarithms::withBase\nLOG10                    | MATH_AND_TRIG         | MathTrig\\Logarithms::base10\nLOGEST                   | STATISTICAL           | Statistical\\Trends::LOGEST\nLOGINV                   | STATISTICAL           | Statistical\\Distributions\\LogNormal::inverse\nLOGNORM.DIST             | STATISTICAL           | Statistical\\Distributions\\LogNormal::distribution\nLOGNORM.INV              | STATISTICAL           | Statistical\\Distributions\\LogNormal::inverse\nLOGNORMDIST              | STATISTICAL           | Statistical\\Distributions\\LogNormal::cumulative\nLOOKUP                   | LOOKUP_AND_REFERENCE  | LookupRef\\Lookup::lookup\nLOWER                    | TEXT_AND_DATA         | TextData\\CaseConvert::lower\n\n## M\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nMAKEARRAY                | LOGICAL               | **Not yet Implemented**\nMAP                      | LOGICAL               | **Not yet Implemented**\nMATCH                    | LOOKUP_AND_REFERENCE  | LookupRef\\ExcelMatch::MATCH\nMAX                      | STATISTICAL           | Statistical\\Maximum::max\nMAXA                     | STATISTICAL           | Statistical\\Maximum::maxA\nMAXIFS                   | STATISTICAL           | Statistical\\Conditional::MAXIFS\nMDETERM                  | MATH_AND_TRIG         | MathTrig\\MatrixFunctions::determinant\nMDURATION                | FINANCIAL             | **Not yet Implemented**\nMEDIAN                   | STATISTICAL           | Statistical\\Averages::median\nMEDIANIF                 | STATISTICAL           | **Not yet Implemented**\nMID                      | TEXT_AND_DATA         | TextData\\Extract::mid\nMIDB                     | TEXT_AND_DATA         | TextData\\Extract::mid\nMIN                      | STATISTICAL           | Statistical\\Minimum::min\nMINA                     | STATISTICAL           | Statistical\\Minimum::minA\nMINIFS                   | STATISTICAL           | Statistical\\Conditional::MINIFS\nMINUTE                   | DATE_AND_TIME         | DateTimeExcel\\TimeParts::minute\nMINVERSE                 | MATH_AND_TRIG         | MathTrig\\MatrixFunctions::inverse\nMIRR                     | FINANCIAL             | Financial\\CashFlow\\Variable\\Periodic::modifiedRate\nMMULT                    | MATH_AND_TRIG         | MathTrig\\MatrixFunctions::multiply\nMOD                      | MATH_AND_TRIG         | MathTrig\\Operations::mod\nMODE                     | STATISTICAL           | Statistical\\Averages::mode\nMODE.MULT                | STATISTICAL           | **Not yet Implemented**\nMODE.SNGL                | STATISTICAL           | Statistical\\Averages::mode\nMONTH                    | DATE_AND_TIME         | DateTimeExcel\\DateParts::month\nMROUND                   | MATH_AND_TRIG         | MathTrig\\Round::multiple\nMULTINOMIAL              | MATH_AND_TRIG         | MathTrig\\Factorial::multinomial\nMUNIT                    | MATH_AND_TRIG         | MathTrig\\MatrixFunctions::identity\n\n## N\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nN                        | INFORMATION           | Information\\Value::asNumber\nNA                       | INFORMATION           | Information\\ExcelError::NA\nNEGBINOM.DIST            | STATISTICAL           | **Not yet Implemented**\nNEGBINOMDIST             | STATISTICAL           | Statistical\\Distributions\\Binomial::negative\nNETWORKDAYS              | DATE_AND_TIME         | DateTimeExcel\\NetworkDays::count\nNETWORKDAYS.INTL         | DATE_AND_TIME         | **Not yet Implemented**\nNOMINAL                  | FINANCIAL             | Financial\\InterestRate::nominal\nNORM.DIST                | STATISTICAL           | Statistical\\Distributions\\Normal::distribution\nNORM.INV                 | STATISTICAL           | Statistical\\Distributions\\Normal::inverse\nNORM.S.DIST              | STATISTICAL           | Statistical\\Distributions\\StandardNormal::distribution\nNORM.S.INV               | STATISTICAL           | Statistical\\Distributions\\StandardNormal::inverse\nNORMDIST                 | STATISTICAL           | Statistical\\Distributions\\Normal::distribution\nNORMINV                  | STATISTICAL           | Statistical\\Distributions\\Normal::inverse\nNORMSDIST                | STATISTICAL           | Statistical\\Distributions\\StandardNormal::cumulative\nNORMSINV                 | STATISTICAL           | Statistical\\Distributions\\StandardNormal::inverse\nNOT                      | LOGICAL               | Logical\\Operations::NOT\nNOW                      | DATE_AND_TIME         | DateTimeExcel\\Current::now\nNPER                     | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic::periods\nNPV                      | FINANCIAL             | Financial\\CashFlow\\Variable\\Periodic::presentValue\nNUMBERSTRING             | TEXT_AND_DATA         | **Not yet Implemented**\nNUMBERVALUE              | TEXT_AND_DATA         | TextData\\Format::NUMBERVALUE\n\n## O\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nOCT2BIN                  | ENGINEERING           | Engineering\\ConvertOctal::toBinary\nOCT2DEC                  | ENGINEERING           | Engineering\\ConvertOctal::toDecimal\nOCT2HEX                  | ENGINEERING           | Engineering\\ConvertOctal::toHex\nODD                      | MATH_AND_TRIG         | MathTrig\\Round::odd\nODDFPRICE                | FINANCIAL             | **Not yet Implemented**\nODDFYIELD                | FINANCIAL             | **Not yet Implemented**\nODDLPRICE                | FINANCIAL             | **Not yet Implemented**\nODDLYIELD                | FINANCIAL             | **Not yet Implemented**\nOFFSET                   | LOOKUP_AND_REFERENCE  | LookupRef\\Offset::OFFSET\nOR                       | LOGICAL               | Logical\\Operations::logicalOr\n\n## P\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nPDURATION                | FINANCIAL             | Financial\\CashFlow\\Single::periods\nPEARSON                  | STATISTICAL           | Statistical\\Trends::CORREL\nPERCENTILE               | STATISTICAL           | Statistical\\Percentiles::PERCENTILE\nPERCENTILE.EXC           | STATISTICAL           | **Not yet Implemented**\nPERCENTILE.INC           | STATISTICAL           | Statistical\\Percentiles::PERCENTILE\nPERCENTRANK              | STATISTICAL           | Statistical\\Percentiles::PERCENTRANK\nPERCENTRANK.EXC          | STATISTICAL           | **Not yet Implemented**\nPERCENTRANK.INC          | STATISTICAL           | Statistical\\Percentiles::PERCENTRANK\nPERMUT                   | STATISTICAL           | Statistical\\Permutations::PERMUT\nPERMUTATIONA             | STATISTICAL           | Statistical\\Permutations::PERMUTATIONA\nPHI                      | STATISTICAL           | **Not yet Implemented**\nPHONETIC                 | TEXT_AND_DATA         | **Not yet Implemented**\nPI                       | MATH_AND_TRIG         | pi\nPMT                      | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic\\Payments::annuity\nPOISSON                  | STATISTICAL           | Statistical\\Distributions\\Poisson::distribution\nPOISSON.DIST             | STATISTICAL           | Statistical\\Distributions\\Poisson::distribution\nPOWER                    | MATH_AND_TRIG         | MathTrig\\Operations::power\nPPMT                     | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic\\Payments::interestPayment\nPRICE                    | FINANCIAL             | Financial\\Securities\\Price::price\nPRICEDISC                | FINANCIAL             | Financial\\Securities\\Price::priceDiscounted\nPRICEMAT                 | FINANCIAL             | Financial\\Securities\\Price::priceAtMaturity\nPROB                     | STATISTICAL           | **Not yet Implemented**\nPRODUCT                  | MATH_AND_TRIG         | MathTrig\\Operations::product\nPROPER                   | TEXT_AND_DATA         | TextData\\CaseConvert::proper\nPV                       | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic::presentValue\n\n## Q\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nQUARTILE                 | STATISTICAL           | Statistical\\Percentiles::QUARTILE\nQUARTILE.EXC             | STATISTICAL           | **Not yet Implemented**\nQUARTILE.INC             | STATISTICAL           | Statistical\\Percentiles::QUARTILE\nQUOTIENT                 | MATH_AND_TRIG         | MathTrig\\Operations::quotient\n\n## R\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nRADIANS                  | MATH_AND_TRIG         | MathTrig\\Angle::toRadians\nRAND                     | MATH_AND_TRIG         | MathTrig\\Random::rand\nRANDARRAY                | MATH_AND_TRIG         | MathTrig\\Random::randArray\nRANDBETWEEN              | MATH_AND_TRIG         | MathTrig\\Random::randBetween\nRANK                     | STATISTICAL           | Statistical\\Percentiles::RANK\nRANK.AVG                 | STATISTICAL           | **Not yet Implemented**\nRANK.EQ                  | STATISTICAL           | Statistical\\Percentiles::RANK\nRATE                     | FINANCIAL             | Financial\\CashFlow\\Constant\\Periodic\\Interest::rate\nRECEIVED                 | FINANCIAL             | Financial\\Securities\\Price::received\nREDUCE                   | LOGICAL               | **Not yet Implemented**\nREPLACE                  | TEXT_AND_DATA         | TextData\\Replace::replace\nREPLACEB                 | TEXT_AND_DATA         | TextData\\Replace::replace\nREPT                     | TEXT_AND_DATA         | TextData\\Concatenate::builtinREPT\nRIGHT                    | TEXT_AND_DATA         | TextData\\Extract::right\nRIGHTB                   | TEXT_AND_DATA         | TextData\\Extract::right\nROMAN                    | MATH_AND_TRIG         | MathTrig\\Roman::evaluate\nROUND                    | MATH_AND_TRIG         | MathTrig\\Round::round\nROUNDBAHTDOWN            | MATH_AND_TRIG         | **Not yet Implemented**\nROUNDBAHTUP              | MATH_AND_TRIG         | **Not yet Implemented**\nROUNDDOWN                | MATH_AND_TRIG         | MathTrig\\Round::down\nROUNDUP                  | MATH_AND_TRIG         | MathTrig\\Round::up\nROW                      | LOOKUP_AND_REFERENCE  | LookupRef\\RowColumnInformation::ROW\nROWS                     | LOOKUP_AND_REFERENCE  | LookupRef\\RowColumnInformation::ROWS\nRRI                      | FINANCIAL             | Financial\\CashFlow\\Single::interestRate\nRSQ                      | STATISTICAL           | Statistical\\Trends::RSQ\nRTD                      | LOOKUP_AND_REFERENCE  | **Not yet Implemented**\n\n## S\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nSCAN                     | LOGICAL               | **Not yet Implemented**\nSEARCH                   | TEXT_AND_DATA         | TextData\\Search::insensitive\nSEARCHB                  | TEXT_AND_DATA         | TextData\\Search::insensitive\nSEC                      | MATH_AND_TRIG         | MathTrig\\Trig\\Secant::sec\nSECH                     | MATH_AND_TRIG         | MathTrig\\Trig\\Secant::sech\nSECOND                   | DATE_AND_TIME         | DateTimeExcel\\TimeParts::second\nSEQUENCE                 | MATH_AND_TRIG         | MathTrig\\MatrixFunctions::sequence\nSERIESSUM                | MATH_AND_TRIG         | MathTrig\\SeriesSum::evaluate\nSHEET                    | INFORMATION           | **Not yet Implemented**\nSHEETS                   | INFORMATION           | **Not yet Implemented**\nSIGN                     | MATH_AND_TRIG         | MathTrig\\Sign::evaluate\nSIN                      | MATH_AND_TRIG         | MathTrig\\Trig\\Sine::sin\nSINGLE                   | MICROSOFT_INTERNAL    | Internal\\ExcelArrayPseudoFunctions::single\nSINH                     | MATH_AND_TRIG         | MathTrig\\Trig\\Sine::sinh\nSKEW                     | STATISTICAL           | Statistical\\Deviations::skew\nSKEW.P                   | STATISTICAL           | **Not yet Implemented**\nSLN                      | FINANCIAL             | Financial\\Depreciation::SLN\nSLOPE                    | STATISTICAL           | Statistical\\Trends::SLOPE\nSMALL                    | STATISTICAL           | Statistical\\Size::small\nSORT                     | LOOKUP_AND_REFERENCE  | LookupRef\\Sort::sort\nSORTBY                   | LOOKUP_AND_REFERENCE  | LookupRef\\Sort::sortBy\nSQRT                     | MATH_AND_TRIG         | MathTrig\\Sqrt::sqrt\nSQRTPI                   | MATH_AND_TRIG         | MathTrig\\Sqrt::pi\nSTANDARDIZE              | STATISTICAL           | Statistical\\Standardize::execute\nSTDEV                    | STATISTICAL           | Statistical\\StandardDeviations::STDEV\nSTDEV.P                  | STATISTICAL           | Statistical\\StandardDeviations::STDEVP\nSTDEV.S                  | STATISTICAL           | Statistical\\StandardDeviations::STDEV\nSTDEVA                   | STATISTICAL           | Statistical\\StandardDeviations::STDEVA\nSTDEVP                   | STATISTICAL           | Statistical\\StandardDeviations::STDEVP\nSTDEVPA                  | STATISTICAL           | Statistical\\StandardDeviations::STDEVPA\nSTEYX                    | STATISTICAL           | Statistical\\Trends::STEYX\nSUBSTITUTE               | TEXT_AND_DATA         | TextData\\Replace::substitute\nSUBTOTAL                 | MATH_AND_TRIG         | MathTrig\\Subtotal::evaluate\nSUM                      | MATH_AND_TRIG         | MathTrig\\Sum::sumErroringStrings\nSUMIF                    | MATH_AND_TRIG         | Statistical\\Conditional::SUMIF\nSUMIFS                   | MATH_AND_TRIG         | Statistical\\Conditional::SUMIFS\nSUMPRODUCT               | MATH_AND_TRIG         | MathTrig\\Sum::product\nSUMSQ                    | MATH_AND_TRIG         | MathTrig\\SumSquares::sumSquare\nSUMX2MY2                 | MATH_AND_TRIG         | MathTrig\\SumSquares::sumXSquaredMinusYSquared\nSUMX2PY2                 | MATH_AND_TRIG         | MathTrig\\SumSquares::sumXSquaredPlusYSquared\nSUMXMY2                  | MATH_AND_TRIG         | MathTrig\\SumSquares::sumXMinusYSquared\nSWITCH                   | LOGICAL               | Logical\\Conditional::statementSwitch\nSYD                      | FINANCIAL             | Financial\\Depreciation::SYD\n\n## T\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nT                        | TEXT_AND_DATA         | TextData\\Text::test\nT.DIST                   | STATISTICAL           | Statistical\\Distributions\\StudentT::tDotDist\nT.DIST.2T                | STATISTICAL           | Statistical\\Distributions\\StudentT::tDotDistDot2T\nT.DIST.RT                | STATISTICAL           | Statistical\\Distributions\\StudentT::tDotDistDotRT\nT.INV                    | STATISTICAL           | Statistical\\Distributions\\StudentT::tDotInv\nT.INV.2T                 | STATISTICAL           | Statistical\\Distributions\\StudentT::inverse\nT.TEST                   | STATISTICAL           | **Not yet Implemented**\nTAKE                     | LOOKUP_AND_REFERENCE  | LookupRef\\ChooseRowsEtc::take\nTAN                      | MATH_AND_TRIG         | MathTrig\\Trig\\Tangent::tan\nTANH                     | MATH_AND_TRIG         | MathTrig\\Trig\\Tangent::tanh\nTBILLEQ                  | FINANCIAL             | Financial\\TreasuryBill::bondEquivalentYield\nTBILLPRICE               | FINANCIAL             | Financial\\TreasuryBill::price\nTBILLYIELD               | FINANCIAL             | Financial\\TreasuryBill::yield\nTDIST                    | STATISTICAL           | Statistical\\Distributions\\StudentT::distribution\nTEXT                     | TEXT_AND_DATA         | TextData\\Format::TEXTFORMAT\nTEXTAFTER                | TEXT_AND_DATA         | TextData\\Extract::after\nTEXTBEFORE               | TEXT_AND_DATA         | TextData\\Extract::before\nTEXTJOIN                 | TEXT_AND_DATA         | TextData\\Concatenate::TEXTJOIN\nTEXTSPLIT                | TEXT_AND_DATA         | TextData\\Text::split\nTHAIDAYOFWEEK            | DATE_AND_TIME         | **Not yet Implemented**\nTHAIDIGIT                | TEXT_AND_DATA         | **Not yet Implemented**\nTHAIMONTHOFYEAR          | DATE_AND_TIME         | **Not yet Implemented**\nTHAINUMSOUND             | TEXT_AND_DATA         | **Not yet Implemented**\nTHAINUMSTRING            | TEXT_AND_DATA         | **Not yet Implemented**\nTHAISTRINGLENGTH         | TEXT_AND_DATA         | **Not yet Implemented**\nTHAIYEAR                 | DATE_AND_TIME         | **Not yet Implemented**\nTIME                     | DATE_AND_TIME         | DateTimeExcel\\Time::fromHMS\nTIMEVALUE                | DATE_AND_TIME         | DateTimeExcel\\TimeValue::fromString\nTINV                     | STATISTICAL           | Statistical\\Distributions\\StudentT::inverse\nTOCOL                    | LOOKUP_AND_REFERENCE  | LookupRef\\TorowTocol::tocol\nTODAY                    | DATE_AND_TIME         | DateTimeExcel\\Current::today\nTOROW                    | LOOKUP_AND_REFERENCE  | LookupRef\\TorowTocol::torow\nTRANSPOSE                | LOOKUP_AND_REFERENCE  | LookupRef\\Matrix::transpose\nTREND                    | STATISTICAL           | Statistical\\Trends::TREND\nTRIM                     | TEXT_AND_DATA         | TextData\\Trim::spaces\nTRIMMEAN                 | STATISTICAL           | Statistical\\Averages\\Mean::trim\nTRUE                     | LOGICAL               | Logical\\Boolean::TRUE\nTRUNC                    | MATH_AND_TRIG         | MathTrig\\Trunc::evaluate\nTTEST                    | STATISTICAL           | **Not yet Implemented**\nTYPE                     | INFORMATION           | Information\\Value::type\n\n## U\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nUNICHAR                  | TEXT_AND_DATA         | TextData\\CharacterConvert::characterUnicode\nUNICODE                  | TEXT_AND_DATA         | TextData\\CharacterConvert::codeUnicode\nUNIQUE                   | LOOKUP_AND_REFERENCE  | LookupRef\\Unique::unique\nUPPER                    | TEXT_AND_DATA         | TextData\\CaseConvert::upper\nUSDOLLAR                 | FINANCIAL             | Financial\\Dollar::format\n\n## V\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nVALUE                    | TEXT_AND_DATA         | TextData\\Format::VALUE\nVALUETOTEXT              | TEXT_AND_DATA         | TextData\\Format::valueToText\nVAR                      | STATISTICAL           | Statistical\\Variances::VAR\nVAR.P                    | STATISTICAL           | Statistical\\Variances::VARP\nVAR.S                    | STATISTICAL           | Statistical\\Variances::VAR\nVARA                     | STATISTICAL           | Statistical\\Variances::VARA\nVARP                     | STATISTICAL           | Statistical\\Variances::VARP\nVARPA                    | STATISTICAL           | Statistical\\Variances::VARPA\nVDB                      | FINANCIAL             | **Not yet Implemented**\nVLOOKUP                  | LOOKUP_AND_REFERENCE  | LookupRef\\VLookup::lookup\nVSTACK                   | LOOKUP_AND_REFERENCE  | LookupRef\\Vstack::vstack\n\n## W\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nWEBSERVICE               | WEB                   | Web\\Service::webService\nWEEKDAY                  | DATE_AND_TIME         | DateTimeExcel\\Week::day\nWEEKNUM                  | DATE_AND_TIME         | DateTimeExcel\\Week::number\nWEIBULL                  | STATISTICAL           | Statistical\\Distributions\\Weibull::distribution\nWEIBULL.DIST             | STATISTICAL           | Statistical\\Distributions\\Weibull::distribution\nWORKDAY                  | DATE_AND_TIME         | DateTimeExcel\\WorkDay::date\nWORKDAY.INTL             | DATE_AND_TIME         | **Not yet Implemented**\nWRAPCOLS                 | MATH_AND_TRIG         | **Not yet Implemented**\nWRAPROWS                 | MATH_AND_TRIG         | **Not yet Implemented**\n\n## X\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nXIRR                     | FINANCIAL             | Financial\\CashFlow\\Variable\\NonPeriodic::rate\nXLOOKUP                  | LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nXMATCH                   | LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nXNPV                     | FINANCIAL             | Financial\\CashFlow\\Variable\\NonPeriodic::presentValue\nXOR                      | LOGICAL               | Logical\\Operations::logicalXor\n\n## Y\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nYEAR                     | DATE_AND_TIME         | DateTimeExcel\\DateParts::year\nYEARFRAC                 | DATE_AND_TIME         | DateTimeExcel\\YearFrac::fraction\nYIELD                    | FINANCIAL             | **Not yet Implemented**\nYIELDDISC                | FINANCIAL             | Financial\\Securities\\Yields::yieldDiscounted\nYIELDMAT                 | FINANCIAL             | Financial\\Securities\\Yields::yieldAtMaturity\n\n## Z\n\nExcel Function           | Category              | PhpSpreadsheet Function\n-------------------------|-----------------------|--------------------------------------\nZ.TEST                   | STATISTICAL           | Statistical\\Distributions\\StandardNormal::zTest\nZTEST                    | STATISTICAL           | Statistical\\Distributions\\StandardNormal::zTest\n"
  },
  {
    "path": "docs/references/function-list-by-name.md",
    "content": "# Function list by name\n\nA more compact list can be found [here](./function-list-by-name-compact.md)\n\n\n## A\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nABS                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Absolute::evaluate\nACCRINT                  | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\AccruedInterest::periodic\nACCRINTM                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\AccruedInterest::atMaturity\nACOS                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosine::acos\nACOSH                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosine::acosh\nACOT                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cotangent::acot\nACOTH                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cotangent::acoth\nADDRESS                  | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Address::cell\nAGGREGATE                | CATEGORY_MATH_AND_TRIG         | **Not yet Implemented**\nAMORDEGRC                | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Amortization::AMORDEGRC\nAMORLINC                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Amortization::AMORLINC\nANCHORARRAY              | CATEGORY_MICROSOFT_INTERNAL    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\ExcelArrayPseudoFunctions::anchorArray\nAND                      | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::logicalAnd\nARABIC                   | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Arabic::evaluate\nAREAS                    | CATEGORY_LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nARRAYTOTEXT              | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::fromArray\nASC                      | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\nASIN                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Sine::asin\nASINH                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Sine::asinh\nATAN                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::atan\nATAN2                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::atan2\nATANH                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::atanh\nAVEDEV                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::averageDeviations\nAVERAGE                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::average\nAVERAGEA                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::averageA\nAVERAGEIF                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::AVERAGEIF\nAVERAGEIFS               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::AVERAGEIFS\n\n## B\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nBAHTTEXT                 | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Thai::getBahtText\nBASE                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Base::evaluate\nBESSELI                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselI::BESSELI\nBESSELJ                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselJ::BESSELJ\nBESSELK                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselK::BESSELK\nBESSELY                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselY::BESSELY\nBETA.DIST                | CATEGORY_STATISTICAL           | **Not yet Implemented**\nBETA.INV                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Beta::inverse\nBETADIST                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Beta::distribution\nBETAINV                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Beta::inverse\nBIN2DEC                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary::toDecimal\nBIN2HEX                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary::toHex\nBIN2OCT                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary::toOctal\nBINOM.DIST               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::distribution\nBINOM.DIST.RANGE         | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::range\nBINOM.INV                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::inverse\nBINOMDIST                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::distribution\nBITAND                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITAND\nBITLSHIFT                | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITLSHIFT\nBITOR                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITOR\nBITRSHIFT                | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITRSHIFT\nBITXOR                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise::BITXOR\nBYCOL                    | CATEGORY_LOGICAL               | **Not yet Implemented**\nBYROW                    | CATEGORY_LOGICAL               | **Not yet Implemented**\n\n## C\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nCEILING                  | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Ceiling::ceiling\nCEILING.MATH             | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Ceiling::math\nCEILING.PRECISE          | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Ceiling::precise\nCELL                     | CATEGORY_INFORMATION           | **Not yet Implemented**\nCHAR                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert::character\nCHIDIST                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::distributionRightTail\nCHIINV                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::inverseRightTail\nCHISQ.DIST               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::distributionLeftTail\nCHISQ.DIST.RT            | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::distributionRightTail\nCHISQ.INV                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::inverseLeftTail\nCHISQ.INV.RT             | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::inverseRightTail\nCHISQ.TEST               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::test\nCHITEST                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\ChiSquared::test\nCHOOSE                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Selection::CHOOSE\nCHOOSECOLS               | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::chooseCols\nCHOOSEROWS               | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::chooseRows\nCLEAN                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Trim::nonPrintable\nCODE                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert::code\nCOLUMN                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\RowColumnInformation::COLUMN\nCOLUMNS                  | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\RowColumnInformation::COLUMNS\nCOMBIN                   | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Combinations::withoutRepetition\nCOMBINA                  | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Combinations::withRepetition\nCOMPLEX                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex::COMPLEX\nCONCAT                   | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Concatenate::CONCATENATE\nCONCATENATE              | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Concatenate::actualCONCATENATE\nCONFIDENCE               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Confidence::CONFIDENCE\nCONFIDENCE.NORM          | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Confidence::CONFIDENCE\nCONFIDENCE.T             | CATEGORY_STATISTICAL           | **Not yet Implemented**\nCONVERT                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertUOM::CONVERT\nCORREL                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::CORREL\nCOS                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosine::cos\nCOSH                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosine::cosh\nCOT                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cotangent::cot\nCOTH                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cotangent::coth\nCOUNT                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts::COUNT\nCOUNTA                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts::COUNTA\nCOUNTBLANK               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts::COUNTBLANK\nCOUNTIF                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::COUNTIF\nCOUNTIFS                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::COUNTIFS\nCOUPDAYBS                | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPDAYBS\nCOUPDAYS                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPDAYS\nCOUPDAYSNC               | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPDAYSNC\nCOUPNCD                  | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPNCD\nCOUPNUM                  | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPNUM\nCOUPPCD                  | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons::COUPPCD\nCOVAR                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::COVAR\nCOVARIANCE.P             | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::COVAR\nCOVARIANCE.S             | CATEGORY_STATISTICAL           | **Not yet Implemented**\nCRITBINOM                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::inverse\nCSC                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosecant::csc\nCSCH                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Cosecant::csch\nCUBEKPIMEMBER            | CATEGORY_CUBE                  | **Not yet Implemented**\nCUBEMEMBER               | CATEGORY_CUBE                  | **Not yet Implemented**\nCUBEMEMBERPROPERTY       | CATEGORY_CUBE                  | **Not yet Implemented**\nCUBERANKEDMEMBER         | CATEGORY_CUBE                  | **Not yet Implemented**\nCUBESET                  | CATEGORY_CUBE                  | **Not yet Implemented**\nCUBESETCOUNT             | CATEGORY_CUBE                  | **Not yet Implemented**\nCUBEVALUE                | CATEGORY_CUBE                  | **Not yet Implemented**\nCUMIPMT                  | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Cumulative::interest\nCUMPRINC                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Cumulative::principal\n\n## D\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nDATE                     | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Date::fromYMD\nDATEDIF                  | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Difference::interval\nDATESTRING               | CATEGORY_DATE_AND_TIME         | **Not yet Implemented**\nDATEVALUE                | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateValue::fromString\nDAVERAGE                 | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DAverage::evaluate\nDAY                      | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts::day\nDAYS                     | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Days::between\nDAYS360                  | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Days360::between\nDB                       | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Depreciation::DB\nDBCS                     | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\nDCOUNT                   | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DCount::evaluate\nDCOUNTA                  | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DCountA::evaluate\nDDB                      | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Depreciation::DDB\nDEC2BIN                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal::toBinary\nDEC2HEX                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal::toHex\nDEC2OCT                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal::toOctal\nDECIMAL                  | CATEGORY_MATH_AND_TRIG         | **Not yet Implemented**\nDEGREES                  | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Angle::toDegrees\nDELTA                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Compare::DELTA\nDEVSQ                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Deviations::sumSquares\nDGET                     | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DGet::evaluate\nDISC                     | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Rates::discount\nDMAX                     | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DMax::evaluate\nDMIN                     | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DMin::evaluate\nDOLLAR                   | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::DOLLAR\nDOLLARDE                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Dollar::decimal\nDOLLARFR                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Dollar::fractional\nDPRODUCT                 | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DProduct::evaluate\nDROP                     | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::drop\nDSTDEV                   | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DStDev::evaluate\nDSTDEVP                  | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DStDevP::evaluate\nDSUM                     | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DSum::evaluate\nDURATION                 | CATEGORY_FINANCIAL             | **Not yet Implemented**\nDVAR                     | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DVar::evaluate\nDVARP                    | CATEGORY_DATABASE              | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DVarP::evaluate\n\n## E\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nECMA.CEILING             | CATEGORY_MATH_AND_TRIG         | **Not yet Implemented**\nEDATE                    | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Month::adjust\nEFFECT                   | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\InterestRate::effective\nENCODEURL                | CATEGORY_WEB                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Web\\Service::urlEncode\nEOMONTH                  | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Month::lastDay\nERF                      | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Erf::ERF\nERF.PRECISE              | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Erf::ERFPRECISE\nERFC                     | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ErfC::ERFC\nERFC.PRECISE             | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ErfC::ERFC\nERROR.TYPE               | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError::type\nEVEN                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::even\nEXACT                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::exact\nEXP                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Exp::evaluate\nEXPAND                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::expand\nEXPON.DIST               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Exponential::distribution\nEXPONDIST                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Exponential::distribution\n\n## F\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nF.DIST                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\F::distribution\nF.DIST.RT                | CATEGORY_STATISTICAL           | **Not yet Implemented**\nF.INV                    | CATEGORY_STATISTICAL           | **Not yet Implemented**\nF.INV.RT                 | CATEGORY_STATISTICAL           | **Not yet Implemented**\nF.TEST                   | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFACT                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Factorial::fact\nFACTDOUBLE               | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Factorial::factDouble\nFALSE                    | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Boolean::FALSE\nFDIST                    | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFILTER                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Filter::filter\nFILTERXML                | CATEGORY_WEB                   | **Not yet Implemented**\nFIND                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Search::sensitive\nFINDB                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Search::sensitive\nFINV                     | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFISHER                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Fisher::distribution\nFISHERINV                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Fisher::inverse\nFIXED                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::FIXEDFORMAT\nFLOOR                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Floor::floor\nFLOOR.MATH               | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Floor::math\nFLOOR.PRECISE            | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Floor::precise\nFORECAST                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::FORECAST\nFORECAST.ETS             | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFORECAST.ETS.CONFINT     | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFORECAST.ETS.SEASONALITY | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFORECAST.ETS.STAT        | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFORECAST.LINEAR          | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::FORECAST\nFORMULATEXT              | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Formula::text\nFREQUENCY                | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFTEST                    | CATEGORY_STATISTICAL           | **Not yet Implemented**\nFV                       | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic::futureValue\nFVSCHEDULE               | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Single::futureValue\n\n## G\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nGAMMA                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::gamma\nGAMMA.DIST               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::distribution\nGAMMA.INV                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::inverse\nGAMMADIST                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::distribution\nGAMMAINV                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::inverse\nGAMMALN                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::ln\nGAMMALN.PRECISE          | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Gamma::ln\nGAUSS                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::gauss\nGCD                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Gcd::evaluate\nGEOMEAN                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages\\Mean::geometric\nGESTEP                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Compare::GESTEP\nGETPIVOTDATA             | CATEGORY_LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nGROUPBY                  | CATEGORY_LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nGROWTH                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::GROWTH\n\n## H\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nHARMEAN                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages\\Mean::harmonic\nHEX2BIN                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex::toBinary\nHEX2DEC                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex::toDecimal\nHEX2OCT                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex::toOctal\nHLOOKUP                  | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\HLookup::lookup\nHOUR                     | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts::hour\nHSTACK                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Hstack::hstack\nHYPERLINK                | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Hyperlink::set\nHYPGEOM.DIST             | CATEGORY_STATISTICAL           | **Not yet Implemented**\nHYPGEOMDIST              | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\HyperGeometric::distribution\n\n## I\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nIF                       | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::statementIf\nIFERROR                  | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::IFERROR\nIFNA                     | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::IFNA\nIFS                      | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::IFS\nIMABS                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMABS\nIMAGINARY                | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex::IMAGINARY\nIMARGUMENT               | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMARGUMENT\nIMCONJUGATE              | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCONJUGATE\nIMCOS                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCOS\nIMCOSH                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCOSH\nIMCOT                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCOT\nIMCSC                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCSC\nIMCSCH                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMCSCH\nIMDIV                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations::IMDIV\nIMEXP                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMEXP\nIMLN                     | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMLN\nIMLOG10                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMLOG10\nIMLOG2                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMLOG2\nIMPOWER                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMPOWER\nIMPRODUCT                | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations::IMPRODUCT\nIMREAL                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex::IMREAL\nIMSEC                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSEC\nIMSECH                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSECH\nIMSIN                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSIN\nIMSINH                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSINH\nIMSQRT                   | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMSQRT\nIMSUB                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations::IMSUB\nIMSUM                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations::IMSUM\nIMTAN                    | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions::IMTAN\nINDEX                    | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Matrix::index\nINDIRECT                 | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Indirect::INDIRECT\nINFO                     | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Info::getInfo\nINT                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\IntClass::evaluate\nINTERCEPT                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::INTERCEPT\nINTRATE                  | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Rates::interest\nIPMT                     | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Interest::payment\nIRR                      | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\Periodic::rate\nISBLANK                  | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isBlank\nISERR                    | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue::isErr\nISERROR                  | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue::isError\nISEVEN                   | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isEven\nISFORMULA                | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isFormula\nISLOGICAL                | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isLogical\nISNA                     | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue::isNa\nISNONTEXT                | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isNonText\nISNUMBER                 | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isNumber\nISO.CEILING              | CATEGORY_MATH_AND_TRIG         | **Not yet Implemented**\nISODD                    | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isOdd\nISOMITTED                | CATEGORY_INFORMATION           | **Not yet Implemented**\nISOWEEKNUM               | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week::isoWeekNumber\nISPMT                    | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Interest::schedulePayment\nISREF                    | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isRef\nISTEXT                   | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::isText\nISTHAIDIGIT              | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\n\n## J\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nJIS                      | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\n\n## K\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nKURT                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Deviations::kurtosis\n\n## L\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nLAMBDA                   | CATEGORY_LOGICAL               | **Not yet Implemented**\nLARGE                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Size::large\nLCM                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Lcm::evaluate\nLEFT                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::left\nLEFTB                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::left\nLEN                      | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::length\nLENB                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::length\nLET                      | CATEGORY_LOGICAL               | **Not yet Implemented**\nLINEST                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::LINEST\nLN                       | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Logarithms::natural\nLOG                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Logarithms::withBase\nLOG10                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Logarithms::base10\nLOGEST                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::LOGEST\nLOGINV                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\LogNormal::inverse\nLOGNORM.DIST             | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\LogNormal::distribution\nLOGNORM.INV              | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\LogNormal::inverse\nLOGNORMDIST              | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\LogNormal::cumulative\nLOOKUP                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Lookup::lookup\nLOWER                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CaseConvert::lower\n\n## M\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nMAKEARRAY                | CATEGORY_LOGICAL               | **Not yet Implemented**\nMAP                      | CATEGORY_LOGICAL               | **Not yet Implemented**\nMATCH                    | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ExcelMatch::MATCH\nMAX                      | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Maximum::max\nMAXA                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Maximum::maxA\nMAXIFS                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::MAXIFS\nMDETERM                  | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::determinant\nMDURATION                | CATEGORY_FINANCIAL             | **Not yet Implemented**\nMEDIAN                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::median\nMEDIANIF                 | CATEGORY_STATISTICAL           | **Not yet Implemented**\nMID                      | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::mid\nMIDB                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::mid\nMIN                      | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Minimum::min\nMINA                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Minimum::minA\nMINIFS                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::MINIFS\nMINUTE                   | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts::minute\nMINVERSE                 | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::inverse\nMIRR                     | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\Periodic::modifiedRate\nMMULT                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::multiply\nMOD                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Operations::mod\nMODE                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::mode\nMODE.MULT                | CATEGORY_STATISTICAL           | **Not yet Implemented**\nMODE.SNGL                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages::mode\nMONTH                    | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts::month\nMROUND                   | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::multiple\nMULTINOMIAL              | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Factorial::multinomial\nMUNIT                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::identity\n\n## N\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nN                        | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::asNumber\nNA                       | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError::NA\nNEGBINOM.DIST            | CATEGORY_STATISTICAL           | **Not yet Implemented**\nNEGBINOMDIST             | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Binomial::negative\nNETWORKDAYS              | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\NetworkDays::count\nNETWORKDAYS.INTL         | CATEGORY_DATE_AND_TIME         | **Not yet Implemented**\nNOMINAL                  | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\InterestRate::nominal\nNORM.DIST                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Normal::distribution\nNORM.INV                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Normal::inverse\nNORM.S.DIST              | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::distribution\nNORM.S.INV               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::inverse\nNORMDIST                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Normal::distribution\nNORMINV                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Normal::inverse\nNORMSDIST                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::cumulative\nNORMSINV                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::inverse\nNOT                      | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::NOT\nNOW                      | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Current::now\nNPER                     | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic::periods\nNPV                      | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\Periodic::presentValue\nNUMBERSTRING             | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\nNUMBERVALUE              | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::NUMBERVALUE\n\n## O\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nOCT2BIN                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal::toBinary\nOCT2DEC                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal::toDecimal\nOCT2HEX                  | CATEGORY_ENGINEERING           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal::toHex\nODD                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::odd\nODDFPRICE                | CATEGORY_FINANCIAL             | **Not yet Implemented**\nODDFYIELD                | CATEGORY_FINANCIAL             | **Not yet Implemented**\nODDLPRICE                | CATEGORY_FINANCIAL             | **Not yet Implemented**\nODDLYIELD                | CATEGORY_FINANCIAL             | **Not yet Implemented**\nOFFSET                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Offset::OFFSET\nOR                       | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::logicalOr\n\n## P\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nPDURATION                | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Single::periods\nPEARSON                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::CORREL\nPERCENTILE               | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::PERCENTILE\nPERCENTILE.EXC           | CATEGORY_STATISTICAL           | **Not yet Implemented**\nPERCENTILE.INC           | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::PERCENTILE\nPERCENTRANK              | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::PERCENTRANK\nPERCENTRANK.EXC          | CATEGORY_STATISTICAL           | **Not yet Implemented**\nPERCENTRANK.INC          | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::PERCENTRANK\nPERMUT                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Permutations::PERMUT\nPERMUTATIONA             | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Permutations::PERMUTATIONA\nPHI                      | CATEGORY_STATISTICAL           | **Not yet Implemented**\nPHONETIC                 | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\nPI                       | CATEGORY_MATH_AND_TRIG         | pi\nPMT                      | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Payments::annuity\nPOISSON                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Poisson::distribution\nPOISSON.DIST             | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Poisson::distribution\nPOWER                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Operations::power\nPPMT                     | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Payments::interestPayment\nPRICE                    | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Price::price\nPRICEDISC                | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Price::priceDiscounted\nPRICEMAT                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Price::priceAtMaturity\nPROB                     | CATEGORY_STATISTICAL           | **Not yet Implemented**\nPRODUCT                  | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Operations::product\nPROPER                   | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CaseConvert::proper\nPV                       | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic::presentValue\n\n## Q\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nQUARTILE                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::QUARTILE\nQUARTILE.EXC             | CATEGORY_STATISTICAL           | **Not yet Implemented**\nQUARTILE.INC             | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::QUARTILE\nQUOTIENT                 | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Operations::quotient\n\n## R\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nRADIANS                  | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Angle::toRadians\nRAND                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Random::rand\nRANDARRAY                | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Random::randArray\nRANDBETWEEN              | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Random::randBetween\nRANK                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::RANK\nRANK.AVG                 | CATEGORY_STATISTICAL           | **Not yet Implemented**\nRANK.EQ                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles::RANK\nRATE                     | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic\\Interest::rate\nRECEIVED                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Price::received\nREDUCE                   | CATEGORY_LOGICAL               | **Not yet Implemented**\nREPLACE                  | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Replace::replace\nREPLACEB                 | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Replace::replace\nREPT                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Concatenate::builtinREPT\nRIGHT                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::right\nRIGHTB                   | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::right\nROMAN                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Roman::evaluate\nROUND                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::round\nROUNDBAHTDOWN            | CATEGORY_MATH_AND_TRIG         | **Not yet Implemented**\nROUNDBAHTUP              | CATEGORY_MATH_AND_TRIG         | **Not yet Implemented**\nROUNDDOWN                | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::down\nROUNDUP                  | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Round::up\nROW                      | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\RowColumnInformation::ROW\nROWS                     | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\RowColumnInformation::ROWS\nRRI                      | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Single::interestRate\nRSQ                      | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::RSQ\nRTD                      | CATEGORY_LOOKUP_AND_REFERENCE  | **Not yet Implemented**\n\n## S\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nSCAN                     | CATEGORY_LOGICAL               | **Not yet Implemented**\nSEARCH                   | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Search::insensitive\nSEARCHB                  | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Search::insensitive\nSEC                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Secant::sec\nSECH                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Secant::sech\nSECOND                   | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts::second\nSEQUENCE                 | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions::sequence\nSERIESSUM                | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SeriesSum::evaluate\nSHEET                    | CATEGORY_INFORMATION           | **Not yet Implemented**\nSHEETS                   | CATEGORY_INFORMATION           | **Not yet Implemented**\nSIGN                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sign::evaluate\nSIN                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Sine::sin\nSINGLE                   | CATEGORY_MICROSOFT_INTERNAL    | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\ExcelArrayPseudoFunctions::single\nSINH                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Sine::sinh\nSKEW                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Deviations::skew\nSKEW.P                   | CATEGORY_STATISTICAL           | **Not yet Implemented**\nSLN                      | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Depreciation::SLN\nSLOPE                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::SLOPE\nSMALL                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Size::small\nSORT                     | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Sort::sort\nSORTBY                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Sort::sortBy\nSQRT                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sqrt::sqrt\nSQRTPI                   | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sqrt::pi\nSTANDARDIZE              | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Standardize::execute\nSTDEV                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEV\nSTDEV.P                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEVP\nSTDEV.S                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEV\nSTDEVA                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEVA\nSTDEVP                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEVP\nSTDEVPA                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations::STDEVPA\nSTEYX                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::STEYX\nSUBSTITUTE               | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Replace::substitute\nSUBTOTAL                 | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Subtotal::evaluate\nSUM                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sum::sumErroringStrings\nSUMIF                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::SUMIF\nSUMIFS                   | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Conditional::SUMIFS\nSUMPRODUCT               | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Sum::product\nSUMSQ                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SumSquares::sumSquare\nSUMX2MY2                 | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SumSquares::sumXSquaredMinusYSquared\nSUMX2PY2                 | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SumSquares::sumXSquaredPlusYSquared\nSUMXMY2                  | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\SumSquares::sumXMinusYSquared\nSWITCH                   | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Conditional::statementSwitch\nSYD                      | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Depreciation::SYD\n\n## T\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nT                        | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::test\nT.DIST                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::tDotDist\nT.DIST.2T                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::tDotDistDot2T\nT.DIST.RT                | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::tDotDistDotRT\nT.INV                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::tDotInv\nT.INV.2T                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::inverse\nT.TEST                   | CATEGORY_STATISTICAL           | **Not yet Implemented**\nTAKE                     | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\ChooseRowsEtc::take\nTAN                      | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::tan\nTANH                     | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig\\Tangent::tanh\nTBILLEQ                  | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\TreasuryBill::bondEquivalentYield\nTBILLPRICE               | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\TreasuryBill::price\nTBILLYIELD               | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\TreasuryBill::yield\nTDIST                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::distribution\nTEXT                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::TEXTFORMAT\nTEXTAFTER                | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::after\nTEXTBEFORE               | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Extract::before\nTEXTJOIN                 | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Concatenate::TEXTJOIN\nTEXTSPLIT                | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Text::split\nTHAIDAYOFWEEK            | CATEGORY_DATE_AND_TIME         | **Not yet Implemented**\nTHAIDIGIT                | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\nTHAIMONTHOFYEAR          | CATEGORY_DATE_AND_TIME         | **Not yet Implemented**\nTHAINUMSOUND             | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\nTHAINUMSTRING            | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\nTHAISTRINGLENGTH         | CATEGORY_TEXT_AND_DATA         | **Not yet Implemented**\nTHAIYEAR                 | CATEGORY_DATE_AND_TIME         | **Not yet Implemented**\nTIME                     | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Time::fromHMS\nTIMEVALUE                | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeValue::fromString\nTINV                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StudentT::inverse\nTOCOL                    | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\TorowTocol::tocol\nTODAY                    | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Current::today\nTOROW                    | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\TorowTocol::torow\nTRANSPOSE                | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Matrix::transpose\nTREND                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Trends::TREND\nTRIM                     | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Trim::spaces\nTRIMMEAN                 | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages\\Mean::trim\nTRUE                     | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Boolean::TRUE\nTRUNC                    | CATEGORY_MATH_AND_TRIG         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trunc::evaluate\nTTEST                    | CATEGORY_STATISTICAL           | **Not yet Implemented**\nTYPE                     | CATEGORY_INFORMATION           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value::type\n\n## U\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nUNICHAR                  | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert::characterUnicode\nUNICODE                  | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert::codeUnicode\nUNIQUE                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Unique::unique\nUPPER                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CaseConvert::upper\nUSDOLLAR                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Dollar::format\n\n## V\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nVALUE                    | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::VALUE\nVALUETOTEXT              | CATEGORY_TEXT_AND_DATA         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format::valueToText\nVAR                      | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VAR\nVAR.P                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VARP\nVAR.S                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VAR\nVARA                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VARA\nVARP                     | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VARP\nVARPA                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances::VARPA\nVDB                      | CATEGORY_FINANCIAL             | **Not yet Implemented**\nVLOOKUP                  | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\VLookup::lookup\nVSTACK                   | CATEGORY_LOOKUP_AND_REFERENCE  | \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Vstack::vstack\n\n## W\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nWEBSERVICE               | CATEGORY_WEB                   | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Web\\Service::webService\nWEEKDAY                  | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week::day\nWEEKNUM                  | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week::number\nWEIBULL                  | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Weibull::distribution\nWEIBULL.DIST             | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\Weibull::distribution\nWORKDAY                  | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\WorkDay::date\nWORKDAY.INTL             | CATEGORY_DATE_AND_TIME         | **Not yet Implemented**\nWRAPCOLS                 | CATEGORY_MATH_AND_TRIG         | **Not yet Implemented**\nWRAPROWS                 | CATEGORY_MATH_AND_TRIG         | **Not yet Implemented**\n\n## X\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nXIRR                     | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\NonPeriodic::rate\nXLOOKUP                  | CATEGORY_LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nXMATCH                   | CATEGORY_LOOKUP_AND_REFERENCE  | **Not yet Implemented**\nXNPV                     | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable\\NonPeriodic::presentValue\nXOR                      | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::logicalXor\n\n## Y\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nYEAR                     | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts::year\nYEARFRAC                 | CATEGORY_DATE_AND_TIME         | \\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\YearFrac::fraction\nYIELD                    | CATEGORY_FINANCIAL             | **Not yet Implemented**\nYIELDDISC                | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Yields::yieldDiscounted\nYIELDMAT                 | CATEGORY_FINANCIAL             | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities\\Yields::yieldAtMaturity\n\n## Z\n\nExcel Function           | Category                       | PhpSpreadsheet Function\n-------------------------|--------------------------------|--------------------------------------\nZ.TEST                   | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::zTest\nZTEST                    | CATEGORY_STATISTICAL           | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\StandardNormal::zTest\n"
  },
  {
    "path": "docs/topics/Behind the Mask.md",
    "content": "# Behind the Mask\n\nWhen we look at a spreadsheet in MS Excel, we normally see it neatly formatted so that it is easy for a human to read.\n\nInternally, that spreadsheet comprises a set of values that are normally either numbers or text (occasionally boolean `TRUE` or `FALSE`); or a formula that results in a number, text or boolean value. Unlike PHP, MS Excel doesn't differentiate between `integer` or `float`; but all numbers can be presented as integer or with decimals, as dates or percentages, as currency, even made to look like telephone numbers.\nA zero value can be made to look like `0` or `0.00`, like `-`, or even like a text string `zero`. Positive values can be displayed in one colour, negative values in another.\n\n![Stock Portfolio.png](images/Behind the Mask/Stock Portfolio.png)\nBehind this Stock Portfolio table example, with the exception of the headings and the stock symbols, every value is a number; but each column is rendered in a manner that provides meaning to our human eye -\n`Purchase Date` as a day-month-year date; `Purchase Price` and `Current Price` as monetary values with a currency code; `Purchase Quantity` as an integer value and `Difference` as a float with 2 decimals; `% Return` as a percentage; and `Profit/Loss` as a monetary value with a currency code, thousands separator, and negative values highlighted in red; `Stdev` with 3 decimals -\nand all styled by using a Number Format Mask.\n\n## Reading a Cell Value\n\nPhpSpreadsheet provides three methods for reading a Cell value.\nIf we use the Cell's `getValue()` method, we are retrieving the underlying value (or the formula) for that cell. If the Cell contains a formula, then we can use the `getCalculatedValue()` method to see the result of evaluating that formula. If we want to see the value as it is displayed in MS Excel, then we need to use `getFormattedValue()`.\n\nReading Cells from the Worksheet shown above:\n```php\nvar_dump($worksheet->getCell('C4')->getValue());\nvar_dump($worksheet->getCell('C4')->getCalculatedValue());\nvar_dump($worksheet->getCell('C4')->getFormattedValue());\n\nvar_dump($worksheet->getCell('H4')->getValue());\nvar_dump($worksheet->getCell('H4')->getCalculatedValue());\nvar_dump($worksheet->getCell('H4')->getFormattedValue());\n```\nwe see the different results for cell `C4` (a simple numeric value formatted as a Currency) and cell `H4` (a formula that evaluates to a numeric value, and formatted as a Currency):\n```\nfloat(26.19)\nfloat(26.19)\nstring(9) \"€ 26.19\"\n\nstring(8) \"=$F4*$D4\"\nfloat(-170)\nstring(11) \"€ -170.00\"\n```\nNote that getting the formatted value will always evaluate a formula to render the result.\n\n### Reading a Cell's Formatting Mask\n\nPhpSpreadsheet also provides methods that allow us to look at the format mask itself:\n```php\nvar_dump($worksheet->getCell('C4')\n    ->getStyle()->getNumberFormat()->getFormatCode());\n\nvar_dump($worksheet->getCell('H4')\n    ->getStyle()->getNumberFormat()->getFormatCode());\n```\nand we can see the Format Masks for those cells:\n```\nstring(20) \"[$€-413]\\ #,##0.00\"\n\nstring(48) \"[$€-413]\\ #,##0.00;[Red][$€-413]\\ \\-#,##0.00\"\n```\n> **Note**: that the space and sign in the mask are non-breaking characters, so they are rendered to output as \"\\ \" and \"\\-\" respectively when var_dumped. This prevents breaking the displayed value across two lines.\n\n## Setting a Cell's Formatting Mask\n\nWhen you are using a spreadsheet application like MS Excel, the application will try to decide what Format Mask should be used for a cell as you enter the value, based on that value and your locale settings; and with varying degrees of success.\nIf the value looks like a Currency, then it will be converted to a number and an appropriate Currency Mask set; similarly if you type something that looks like a percentage; and it is often a joke that Excel identifies many values as Dates (even if that was never the intent), and sets a Date Format Mask.\nThe default Mask if no specific type can be identified from the value is \"General\". \n\nPhpSpreadsheet doesn't do this by default. If you enter a value in a cell, then it will not convert that value from a string containing a currency symbol to a number: it will remain a string. Nor will it change any existing Format Mask: and if that value is a new cell, then it will be assigned a default Format Mask of \"General\".\nIt will convert a string value to a numeric if it looks like a number with or without decimals (but without leading zeroes), or in scientific format; but it still won't change the Format Mask.\n\n```php\n// Set Cell C21 using a formatted string value\n$worksheet->getCell('C20')->setValue('€ -1234.567');\n\n// The Cell value should be the string that we set\nvar_dump($worksheet->getCell('C20')->getValue());\n// The Format Mask should be \"General\"\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()->getFormatCode());\n// The formatted value should still be the string that we set\nvar_dump($worksheet->getCell('C20')->getFormattedValue());\n\n// Set Cell C21 using a numeric value\n$worksheet->getCell('C21')->setValue('-1234.567');\n\n// The numeric string value should have been converted to a float\nvar_dump($worksheet->getCell('C21')->getValue());\n// The Format Mask should be \"General\"\nvar_dump($worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()->getFormatCode());\nvar_dump($worksheet->getCell('C21')->getFormattedValue());\n\n// Change the Format Mask for C21 to a Currency mask\n$worksheet->getCell('C21')\n        ->getStyle()->getNumberFormat()->setFormatCode('€ #,##0;€ -#,##0');\n\n// The float value should still be the same\nvar_dump($worksheet->getCell('C21')->getValue());\n// The Format Mask should be the new mask that we set\nvar_dump($worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()->getFormatCode());\n// The value should now be formatted as a Currency\nvar_dump($worksheet->getCell('C21')->getFormattedValue());\n```\ngiving\n```php\nstring(13) \"€ -1234.567\"\nstring(7) \"General\"\nstring(13) \"€ -1234.567\"\n\nfloat(-1234.567)\nstring(7) \"General\"\nstring(9) \"-1234.567\"\n\nfloat(-1234.567)\nstring(20) \"€ #,##0;€ -#,##0\"\nstring(10) \"€ -1,235\"\n```\n\nIf you wish to emulate the MS Excel behaviour, and automatically convert string values that represent Currency, Dates, Fractions, Percentages, etc. then the Advanced Value Binder attempts to identify these, to convert to a number, and to set an appropriate Format Mask.\n\nYou can do this by changing the Value Binder, which will then apply every time you set a Cell value.\n```php\n// Old method using static property\nCell::setValueBinder(new AdvancedValueBinder());\n// Preferred method using dynamic property since 3.4.0\n$spreadsheet->setValueBinder(new AdvancedValueBinder());\n\n// Set Cell C21 using a formatted string value\n$worksheet->getCell('C20')->setValue('€ -12345.6789');\n\n// The Cell value is a float of -12345.6789\nvar_dump($worksheet->getCell('C20')->getValue());\n// The format code is \"[$€]#,##0.00_-\"\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()->getFormatCode());\n// The formatted value is  \"€-12,345.68 \"\nvar_dump($worksheet->getCell('C20')->getFormattedValue());\n```\n\nOr (since version 1.28.0) you can specify a Value Binder to use just for that one call to set the Cell's value.\n\n```php\n// Set Cell C21 using a formatted string value, but using a Value Binder\n$worksheet->getCell('C20')->setValue('€ -12345.6789', new AdvancedValueBinder());\n\n// The Cell value is a float of -12345.6789\nvar_dump($worksheet->getCell('C20')->getValue());\n// The format code is \"[$€]#,##0.00_-\"\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()->getFormatCode());\n// The formatted value is  \"€-12,345.68 \"\nvar_dump($worksheet->getCell('C20')->getFormattedValue());\n```\nWhile PhpSpreadsheet's Advanced Value Binder isn't as \"sophisticated\" as MS Excel at recognising formats that should be converted to numbers, or at setting a mask that exactly matches the entered value, it can simplify entering data from formatted strings; and is particularly useful when reading untyped or loosely formatted files like a CSV.\n\n> **Warning**: Remember that setting a Cell value explicitly bypasses the Value Binder, so you will always have to set the Format Mask manually if you are using `setValueExplicit()` to set Cell values.\n\n## Using Formatting Masks in the TEXT() Function\n\nWe can also use Number Formatting Masks directly in Excel's `TEXT()` Function, without setting the mask for a Cell.\n\n```php\n$worksheet->getCell('A1')->setValue(12345.678);\n$worksheet->getCell('B1')\n    ->setValue('#.00\" Surplus\";-#.00\" Deficit\";\"Out of Stock\"');\n$worksheet->getCell('C1')->setValue('=TEXT(A1,B1)');\n\nvar_dump($worksheet->getCell('C1')->getCalculatedValue()); // 12,345.68 Surplus\n\n\n$worksheet->getCell('A2')->setValue(-12345.678);\n$worksheet->getCell('C2')\n    ->setValue('=TEXT(A2,\"#,##0.00\"\" Surplus\"\";-#,##0.00\"\" Deficit\"\";\"\"Out of Stock\"\"\")');\n\nvar_dump($worksheet->getCell('C2')->getCalculatedValue()); // -12,345.68 Deficit\n```\nRemember that you'll need to escape double quotes in the mask argument by double double-quoting them if you pass the mask directly as an string.\nIt's generally easier to read if you store the mask as text in a cell, and then pass the cell reference as the mask argument.\n\n## Changing a Cell's Formatting Mask\n\nIn PhpSpreadsheet we can change a Cell's Formatting Mask at any time just by setting a new FormatCode for that Cell.\nThe library provides a number of \"pre-defined\" Masks as Constants in the `NumberFormat` class, prefixed with 'FORMAT_', but isn't limited to these values - the mask itself is just a string value - and the value passed to `setFormatCode()` can be any valid Excel Format Mask string.\n> **Note**: The Mask value isn't validated: it's up to you, as the developer, to ensure that you set a meaningful Mask value. \n\nAnd while Excel applies an initial Mask to every Cell when we enter a value (even if it's just the default \"General\"), we can still always change that Mask.\nThis is managed through the \"Number\" block in the \"Home\" ribbon.\n\n![Excel Number Format.png](images/Behind the Mask/Excel Number Format.png)\n\nThis provides us with some simple options for increasing or decreasing the number of decimals displayed, if we want a thousands separator, a currency code to use, etc.\n\nBut if we use the \"pull down\" for that block, we access the \"Number\" tab of \"Format Cells\" that provides a lot more options.\n\n![Excel Number Format - General.png](images/Behind the Mask/Excel Number Format - General.png)\n\nThis gives us access to a number of \"Wizards\" for different \"Categories\" of masking, as well as \"Custom\", which allows us to build our own masks.\n\nSince version 1.28.0, PhpSpreadsheet has also provided a set of \"Wizards\", allowing for the easier creation of Mask values for most Categories.\nIn many cases, you will need to enable PHP's `Intl` extension in order to use the Wizards.\n\n## Mask Categories\n\nI'll describe \"Custom\" Mask values later in this article; but let's take a look at the \"Wizard\" options for each \"Category\" first.\n\n### General\n\nThis is the default Mask, and is \"adaptive\".\nNumbers will appear with as many decimals as have been entered for the value (to the limit of a 9 or 10 digit display; additional decimals will be rounded), while very large or very small values will display in Scientific format.\n\n### Number\n\nExcel's Number \"Wizard\"  allows you to specify the number of decimals, and whether to use a thousands separator (or not).\nIt also offers a few ways to display negative values (with or without a sign, highlighted in red).\n\n![Excel Number Format - Number.png](images/Behind the Mask/Excel Number Format - Number.png)\n\nA typical mask will look something like '0.00' (2 decimals, with no thousands separator) or '#,##0.000' (3 decimals with a thousands separator).\n\nThe PhpSpreadsheet Number \"Wizard\" allows you to specify the number of decimals, and the use of a thousands separator.\nThe defaults are 2 decimal places, and to use a thousands separator.\n\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\n\n// Set Cell value\n$worksheet->getCell('C20')->setValue(-12345.67890);\n\n// Set Cell Style using the Number Wizard to build the Format Mask\n$worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode((string) new Number(3, Number::WITH_THOUSANDS_SEPARATOR));\n\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()->getFormatCode()); // \"#,##0.000\"\nvar_dump($worksheet->getCell('C20')->getFormattedValue()); // \"-12,345.679\"\n```\n\nPhpSpreadsheet's Number Wizard doesn't yet offer options for displaying negative values; they will simply be masked so that they always display the sign.\nBut alternative masking for negative values is an option that may be added in the future.\n\n### Currency\n\nThe Currency \"Wizard\" in MS Excel has similar options to the Number \"Wizard\", but also requires that you specify a currency code.\n\n![Excel Number Format - Currency.png](images/Behind the Mask/Excel Number Format - Currency.png)\n\nThe \"Symbol\" dropdown provides a lot of locale-specific variants of the same currencies - for example '€ Netherlands', where the currency symbol is displayed before the value, and any negative sign appears before the currency \"-€ 12,345.68\"; or '€ France',  where the symbol is displayed after the value \"-12,345.68 €\".\n\nThe PhpSpreadsheet Currency \"Wizard\" allows you to specify the currency code, number of decimals, and the use of a thousands separator.\nIn addition, optionally, you can also specify whether the currency symbol should be leading or trailing, and whether it should be separated from the value or not.\nFinally, you have a choice of 4 ways of specifying negative values - minus sign, minus sign with the field in red, parentheses, and parentheses with the field in red.\n \n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\n\n// Set Cell value\n$worksheet->getCell('C20')->setValue(-12345.67890);\n\n// Set Cell Style using the Currency Wizard to build the Format Mask\n$currencyMask = new Currency(\n    '€',\n    2,\n    Number::WITH_THOUSANDS_SEPARATOR,\n    Currency::TRAILING_SYMBOL,\n    Currency::SYMBOL_WITH_SPACING\n);\n$worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode($currencyMask);\n\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()->getFormatCode()); // #,##0.00 €\nvar_dump($worksheet->getCell('C20')->getFormattedValue()); // -12,345.68 €\n```\nA typical Currency mask might look something like '#,##0.00 €', with the currency symbol as a literal.\n\nThe Currency Code itself may be a literal character, as here with the `€` symbol; or it can be wrapped in square braces with a `$` symbol to indicate that this is a currency and the next character as the currency symbol to use, and then (optionally) a locale code or an LCID (Locale ID) like `[$€-de-DE]` or `[$€-1031]`.\n\nI wouldn't recommend using LCIDs in your code, a locale code is a lot easier to recognise and understand; but if you do need to reference LCIDs, then you can find a list [here](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a).\n\nAlternatively, if you have PHP's `Intl` extension installed, you can specify a currency code and a locale code.\nIf you use this option, then locale values must be a valid formatted locale string (e.g. `en-GB`, `fr`, `uz-Arab-AF`); and the Wizard will use the format defined in ICU (International Components for Unicode): any values that you provide for placement of the currency symbol, etc. will be ignored.\nThe only argument that won't be ignored is an explicit value of 0 for the decimals, which will create a mask to display only major currency units.\n\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\n\n// Set Cell value\n$worksheet->getCell('C21')->setValue(-12345.67890);\n\n// Set Cell Style using the Currency Wizard to build the Format Mask for a locale\n$localeCurrencyMask = new Currency(\n    '€',\n    locale: 'de_DE'\n);\n$worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode($localeCurrencyMask);\n\nvar_dump($worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()->getFormatCode()); // #,##0.00 [$€-de-DE]\nvar_dump($worksheet->getCell('C21')->getFormattedValue()); // -12,345.68 €\n```\nIf we use the locale in the \"Wizard\", then a typical mask might look like '#,##0.00 [$€-de-DE]', with the currency wrapped in braces, a `$` to indicate that this is a localised value, and the locale included.\n > Note: The Wizard does not accept LCIDs.\n\n### Accounting\n\nExcel's Accounting \"Wizard\" is like the Currency \"Wizard\", but without the options for presenting negative values.\nPresentation of zero and negative values is dependent on the currency and locale.\n\n![Excel Number Format - Accounting.png](images/Behind the Mask/Excel Number Format - Accounting.png)\n\nThe options available for the PhpSpreadsheet Accounting \"Wizard\" are identical to those of the Currency \"Wizard\"; although the generated Mask is different.\n\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Accounting;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\n\n// Set Cell value\n$worksheet->getCell('C20')->setValue(-12345.67890);\n\n// Set Cell Style using the Accounting Wizard to build the Format Mask\n$currencyMask = new Accounting(\n    '€',\n    2,\n    Number::WITH_THOUSANDS_SEPARATOR,\n    Currency::TRAILING_SYMBOL,\n    Currency::SYMBOL_WITH_SPACING\n);\n$worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode($currencyMask);\n\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()->getFormatCode()); // _-#,##0.00 €*_-\nvar_dump($worksheet->getCell('C20')->getFormattedValue()); //  -12,345.68 €\n```\nA typical Accounting mask might look something like '_-#,##0.00 €*_-', with the currency symbol as a literal; and with placement indicators like `_-`, that ensure the alignment of the currency symbols and decimal points of numbers in a column.\n\nAs with using a locale with the Currency \"Wizard\", when you use a locale with the Accounting \"Wizard\" the locale value must be valid, and any additional options will be ignored.\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Accounting;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\n\n// Set Cell value\n$worksheet->getCell('C21')->setValue(-12345.67890);\n\n// Set Cell Style using the Accounting Wizard to build the Format Mask for a locale\n$localeCurrencyMask = new Accounting(\n    '€',\n    locale: 'nl_NL'\n);\n$worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode($localeCurrencyMask);\n\nvar_dump($worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()->getFormatCode()); // [$€-nl-NL] #,##0.00;([$€-nl-NL] #,##0.00)\nvar_dump($worksheet->getCell('C21')->getFormattedValue()); // (€ 12,345.68)\n```\nIf we use the locale in the \"Wizard\", then a typical mask might look like '[$€-nl-NL] #,##0.00;([$€-nl-NL] #,##0.00)', with the currency wrapped in braces, with a `$` to indicate that this is a localised value, and the locale included.\nAnd in this case, there is masking for zero and for negative values, although without colour. An option to add colour to values is an option that may be added in a future release.\n\n> **Warning**: Not all versions of the ICU (International Components for Unicode) support Accounting formats, so even if your PHP does have 'Intl' enabled, it may still not allow the use of locale for generating an Accounting Mask.\n\n### Date\n\nWhen you use the Excel Date \"Wizard\", you can select a locale and you'll then be presented with a number of date format options that are appropriate for that locale.\n\n![Excel Number Format - Date.png](images/Behind the Mask/Excel Number Format - Date.png)\n\nI've written in detail about Date Format Masks elsewhere in \"The Dating Game\"; but to summarise, here are the Mask codes used for Date formatting.\n\n| Code  | Description                         | Example (January 3, 2023)             |\n|-------|-------------------------------------|---------------------------------------|\n| m     | Month number without a leading zero | 1                                     |\n| mm    | Month number with a leading zero    | 01                                    |\n| mmm   | Month name, short form              | Jan                                   |\n| mmmm  | Month name, full form               | January                               |\n| mmmmm | Month as the first letter           | J (stands for January, June and July) |\n| d     | Day number without a leading zero   | 3                                     |\n| dd    | Day number with a leading zero      | 03                                    |\n| ddd   | Day of the week, short form         | Tue                                   |\n| dddd  | Day of the week, full form          | Tuesday                               |\n| yy    | Year (last 2 digits)                | 23                                    |\n| yyyy  | Year (4 digits)                     | 2023                                  |\n\n\n### Time\n\nAs with Dates, when you use the Excel Time \"Wizard\", you can select a locale and you'll then be presented with a number of time format options that are appropriate for that locale.\n\n![Excel Number Format - Time.png](images/Behind the Mask/Excel Number Format - Time.png)\n\nI've written in detail about Time Format Masks elsewhere in \"The Dating Game\"; but to summarise, here are the Mask codes used for Time formatting.\n\n| Code   | Description                                                        | Displays as |\n|--------|--------------------------------------------------------------------|-------------|\n| h      | Hours without a leading zero                                       | 0-23        |\n| hh     | Hours with a leading zero                                          | 00-23       |\n| m      | Minutes without a leading zero                                     | 0-59        |\n| mm     | Minutes with a leading zero                                        | 00-59       |\n| s      | Seconds without a leading zero                                     | 0-59        |\n| ss     | Seconds with a leading zero                                        | 00-59       |\n| AM/PM  | Periods of the day <br/>(if omitted, 24-hour time format is used)  | AM or PM    |\n\nExcel also supports Masks for Time Durations (note that spreadsheets using the 1904 base date can display negative durations, but those using the 1900 base date cannot). There is no \"Wizard\" for this; but the following Mask codes can be used to display Durations.\n\n| Code    | Description                                                    | Displays as |\n|---------|----------------------------------------------------------------|-------------|\n| [h]:mm  | Elapsed time in hours                                          | e.g. 25:02  |\n| [hh]:mm | Elapsed time in hours<br>with a leading zero if less than 10   | e.g. 05:02  |\n| [mm]:ss | Elapsed time in minutes                                        | e.g. 63:46  |\n| [m]:ss  | Elapsed time in minutes<br>with a leading zero if less than 10 | e.g. 03:46  |\n| [s]     | Elapsed time in seconds                                        |             |\n| [ss]    | Elapsed time in seconds<br>with a leading zero if less than 10 |             |\n\n### Percentage\n\nThis is among the simplest of the Excel \"Wizards\", only allowing you to specify the number of decimals to be displayed.\n\n![Excel Number Format - Percentage.png](images/Behind the Mask/Excel Number Format - Percentage.png)\n\nThe Percentage mask looks like '0.00%'.\n\nUsing the `%` code in a mask will multiply the value by 100 before rendering it, and it will always also display the `%` sign.\n\nThe PhpSpreadsheet \"Wizard\" replicates this simple option; but also provides a locale option that allows locale-specific formatting, because there are a few locales where the percentage sign appears before the value rather than after it.\nAs with all locale use for the PhpSpreadsheet \"Wizard\", this is dependent on having the `Intl` extension enabled.\n\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Percentage;\n\n// Set Cell value\n$worksheet->getCell('C21')->setValue(-12345.67890);\n\n// Set Cell Style using the Percentage Wizard to build the Format Mask for a locale\n$localeCurrencyMask = new Percentage(\n    locale: 'tr_TR'\n);\n$worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode($localeCurrencyMask);\n\nvar_dump($worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()->getFormatCode()); // %#,##0.00\nvar_dump($worksheet->getCell('C21')->getFormattedValue()); // %-12,345.68\n```\n\n### Fraction\n\nMS Excel presents two different options for fractions: the first where the denominator is calculated internally to either 1, 2 or 3 digits; and the second (introduced only recently) where the denominator is fixed as 2, 4, 8 or 16.\n\n![Excel Number Format - Fraction.png](images/Behind the Mask/Excel Number Format - Fraction.png)\n\nThe Fraction mask looks like '# ?/???' where `#` indicates that the integer part of the value should be displayed, and then `?/???` to display the fraction with up to 3 digits in the denominator.\nThe mask using a fixed-denominator looks like '# ?/16', with the denominator value replacing the variable `?`.\n\nIf you use digit placeholders (`/??`) for the denominator, then Excel will calculate the lowest denominator that it can use for the fractional value. If you specify a fixed denominator (e.g. `/8`) then Excel will calculate the fraction in eighths.\n\n> **Note:** The internal renderer in PhpSpreadsheet does not consider the number of digits for the denominator, but will simply try to identify the lowest value denominator that it can use.\n\nThere is currently no PhpSpreadsheet \"Wizard\" for Fraction Masks.\n\n### Scientific\n\nThis is among the simplest of the Excel \"Wizards\", only allowing you to specify the number of decimals to be displayed.\n\n![Excel Number Format - Scientific.png](images/Behind the Mask/Excel Number Format - Scientific.png)\n\nThe Scientific mask looks like '0.00E+00'.\n\n> **Note**: The internal rendering used by PhpSpreadsheet will display only as many digits as necessary for the exponent; while the Excel mask specifies a minimum of 2 digits, with a leading zero if necessary.\n\nThe PhpSpreadsheet \"Wizard\" replicates this simple option.\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Scientific;\n\n// Set Cell value\n$worksheet->getCell('C20')->setValue(-12345.67890);\n\n// Set Cell Style using the Scientific Wizard to build the Format Mask\n$scientificMask = new Scientific(\n    4,\n);\n$worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode($scientificMask);\n\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()->getFormatCode()); // 0.0000E+00\nvar_dump($worksheet->getCell('C20')->getFormattedValue()); //  -1.2346E+4\n\n// Set Cell value\n$worksheet->getCell('C21')->setValue(-12345.67890);\n\n// Set Cell Style using the Scientific Wizard to build the Format Mask for a locale\n$localeScientificMask = new Scientific(\n    3,\n    locale: 'nl_NL'\n);\n$worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode($localeScientificMask);\n\nvar_dump($worksheet->getCell('C21')\n    ->getStyle()->getNumberFormat()->getFormatCode()); // 0.000E+00\nvar_dump($worksheet->getCell('C21')->getFormattedValue()); // -1.235E+4\n```\n\nIf you specify a number of decimals to display, then the Scientific \"Wizard\" will apply that value, even when using a locale.\n\n### Text\n\nMS Excel's Text \"Wizard\" has no options, but simply sets a mask to `@`, meaning display the value exactly as it is entered.\nUnlike `General`, which is adaptive, `@` will not change the displayed value in any way, except in one exceptional case (see note below).\nVery large or very small values will not be displayed in Scientific format, and leading zeroes will be displayed.\n\n>**Note:** If your cell contains Rich Text, then using `@` in a format mask will display it using the basic cell styling, ignoring the Rich Text styling.\n\n![Excel Number Format - Text.png](images/Behind the Mask/Excel Number Format - Text.png)\n\nPhpSpreadsheet doesn't emulate this behaviour; it simply displays the value as PHP would render that value cast to a string, which mimics Excel's quirk with Rich Text values.\n\nThere is no PhpSpreadsheet \"Wizard\" for Text Masks.\n\n### Special\n\nExcel's Special format \"Wizard\" is a recent introduction: select a locale, and then you may be offered a number of options for formatting values in a manner that is appropriate to that locale, such as US phone numbers, social security numbers, or zip codes; typically with separators between groups of digits.\nAt this time, most locales have no special formats defined.\n\n![Excel Number Format - Special.png](images/Behind the Mask/Excel Number Format - Special.png)\n\nThere is no PhpSpreadsheet \"Wizard\" for Special Masks.\n\n## Custom Format Masks\n\nThe Custom \"Wizard\" really isn't a Wizard at all, just an editing field that allows you to pre-populate from a list of common format masks before editing.\n\n![Excel Number Format - Custom.png](images/Behind the Mask/Excel Number Format - Custom.png)\n\nIt does mean that you need to understand the rules for defining masks when you use this.\n\nWhen you create custom number formats, you can specify up to four sections of format code.\nThese sections of code must be separated by semicolons (`;`).\n\n### Sections for Composite Masks\n\nSections of the mask define the formats for positive numbers, negative numbers, zero values, and text, in that order.\n\n![Mask Sections.png](images/Behind the Mask/Mask Sections.png)\n 1. Format for Positive values\n 2. Format for Negative values\n 3. Format for Zero values\n 4. Format for Text\n\nIf you specify only one section of format code, the code in that section is used for all numbers.\nIf you specify two sections of format code, the first section of code is used for positive numbers and zeros, and the second section of code is used for negative numbers.\nIf you specify a third section, then the first applies to positive values, the second to negative values, and the third to zero values.\nThe fourth section only applies if the value is not numeric.\n\nIf you skip code sections in the format mask, then you must include a semicolon for each of the missing sections.\n\nWhen you skip code sections in the format mask, then you must include a semicolon for each of the missing sections. Use `;` to indicate that a section exists, but with an empty mask; and that can be used to hide values that match the criteria for that section.\n\n![Hiding Values.png](images/Behind the Mask/Hiding Values.png)\n\n> **Note:** Negative values aren't shown with a sign when we use the negative value section. If we want the value to display with a sign, then we need to include an explicit '-' character in the Mask for that section (\";-0;\").\n\n### Basic Masking Symbols\n\nThree basic masking symbols are used to display numbers, and they differ in the way that they display leading or trailing zeroes.\nThe fourth basic masking symbol is the text placeholder, which can be used to wrap the cell value within additional formatting.\n\n| Code | Description                                                                                                                                                                                 | Examples                                                                                                                                                     |  \n|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 0    | Digit placeholder that displays insignificant zeros.                                                                                                                                        | #.00 - always displays 2 decimal places.<br /><br />If you type 5.5 in a cell, it will display as 5.50.                                                      |\n| #    | Digit placeholder that represents optional digits and does not display extra zeros.<br /><br />That is, if a number doesn't need a certain digit, it won't be displayed.                    | #.## - displays up to 2 decimal places.<br /><br />If you type 5.5 in a cell, it will display as 5.5.<br /><br />If you type 5.555, it will display as 5.56. |\n| ?    | Digit placeholder that leaves a space for insignificant zeros on either side of the decimal point but doesn't display them. It is often used to align numbers in a column by decimal point. | #.??? - displays a maximum of 3 decimal places and aligns numbers in a column by decimal point.                                                              |\n| @    | Text placeholder                                                                                                                                                                            | 0.00; -0.00; 0; [Red]@ - applies the red font colour for text values.                                                                                         |\n\nIf a number entered in a cell has more digits to the right of the decimal point than there are placeholders in the format, the number is \"rounded\" to as many decimal places as there are placeholders.\nFor example, if you have a value of `2.25` in a cell with '#.#' format, then the number will be rounded to 1 decimal, and will display as `2.3`.\n\nDigits to the left of the decimal point are always displayed regardless of the number of placeholders.\nFor example, if the value in a cell is `202.25` with '#.#' format, the number will display as `202.3`.\n\n![Digit Placeholders.png](images/Behind the Mask/Digit Placeholders.png)\n\nTo display leading zeroes for a numeric value, you might create a mask like '0000', which will always display at least 4 digits, padding the value with leading zeroes if it is less than 1000.\n\n### Other Special Codes\nIn addition to the masking symbols listed above, the following codes also enable special rendering of the value.\n\n| Code           | Description                                                                                                                                                                   | Example                                          |\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|\n| . (period)     | Decimal point.                                                                                                                                                                | ##0.00??                                         |\n| , (comma)      | Thousands Separator.<br/> A comma that follows a digit placeholder scales the number by a thousand.                                                                           | #,##0<br/>0.000,<br/>Described below.            |\n| \\              | Text Escape Character that displays the character that follows it.                                                                                                            | ##0\\°<br/>Described below.                       |\n| \" \"            | Display any text that is enclosed in the double quotes.                                                                                                                       | ##0\"°C\"<br/>Described below.                     |\n| %              | Multiplies the value stored in the cell by 100 and display it with the percentage sign.                                                                                       | Examples provided in the \"Wizard\" section above. |\n| /              | Display the value as a fraction.                                                                                                                                              | Examples provided in the \"Wizard\" section above. |\n| E              | Display the value in Scientific Format.                                                                                                                                       | Examples provided in the \"Wizard\" section above. |\n| _ (underscore) | Space pad to the width of the next character in the mask.<br />It is commonly used in combination with parentheses to add left and right indents, `_(` and `_)` respectively. | Described below.                                 |                                \n| * (asterisk)   | Repeats the character that follows it until the width of the cell is filled.<br />It is often used in combination with the space character to change alignment.               | Described below.                                 |\n\nSimple examples of using these codes for Percentages, Fractions and Scientific Format can be found in the descriptions of those \"Wizards\".\nThe other codes are described in detail below.\n\n### Thousands Separator and Scaling\n\nTo create an Excel custom number format with a thousands separator, include a comma (`,`) in the format code. For example:\n\n - #,### - display a thousands separator and no decimal places.\n - #,##0.00 - display a thousands separator and 2 decimal places.\n\nMicrosoft Excel separates thousands by commas: if a comma is enclosed by any digit placeholders - the pound sign (`#`), question mark (`?`) or zero (`0`).\nBut if no digit placeholder follows a comma, it scales the number by a thousand, two consecutive commas scale the number by a million, and so on.\n\nFor example, if a cell format is '#.00,' and the cell value is `5000`, then the number `5.00` is displayed.\n\n![Scaling Example.png](images/Behind the Mask/Scaling Example.png)\n\n### Formatting with Text\n\nIf you want to include text in your format mask with numeric values, then there are two basic options.\nTo add a single character, then you can prefix that character with a backslash ('\\'), e.g. '#.00,\\K' or '#.00,,\\M'.\n\n![Text Single Character Example.png](images/Behind the Mask/Text Single Character Example.png)\n\nYou don't need the backslash ('\\') prefix for the following list of characters:\n\n| Character | Description                      |  \n|-----------|----------------------------------|\n| + and -   | Plus and Minus Signs             |\n| ( and )   | Left and Right Parenthesis       |\n| :         | Colon                            |\n| ^         | Caret                            |\n| '         | Apostrophe                       |\n| { and }   | Curly Braces                     |\n| < and >   | Less Than and Greater than Signs |\n| =         | Equals Sign                      |\n| /         | Forward Slash                    |\n| !         | Exclamation Mark                 |\n| &         | Ampersand                        |\n| ~         | Tilde                            |\n|           | Space Character                  |\n\nYou can also use additional padding characters if you want to break a number into groups. For example, to display a number as a phone number, you might use a mask like '00-0000-0000' or '(++00) 00-0000-0000'.\n\nIt's a common practise in Accounting formats to wrap negative values in brackets; so you might use '([$€-nl-NL] #,##0.00)' for that section of the mask.\n\nTo add words or for phrases to the mask, you should wrap the text in quotes: e.g. '#.00\" Surplus\";-#.00\" Deficit\";\"Out of Stock\"'.\n\n![Text String Example.png](images/Behind the Mask/Text String Example.png)\n\n### Indents, Spacing and Alignment\n\nIf you're wrapping negative values in brackets, you might like like to align your positive values with your negative values on the decimal, then you need to apply indents to the positive values to match the width of the bracket characters.\nThe underscore code (`_`) tells Excel to pad the display to the width of the next character in the mask, so '_)' would tell Excel to pad to the width of ')' character like '[$€-nl-NL] _(#,##0.00_);[$€-nl-NL] (#,##0.00)'.\n\n![Indent.png](images/Behind the Mask/Indent.png)\n\nAccountants might also appreciate if the Currency symbols were also all aligned; so we can use the `*` code followed by a repeated character; and that will pad the width of the cell with the specified character. Typically, although not always, this will be a space character, '* '.\n\n![Padding.png](images/Behind the Mask/Padding.png)\n\nWhich aligns all our currency symbols to the left of the cell, while displaying the value right-aligned in the cell, and all the decimal points neatly aligned.\n\nThe `*` code can also be used to change the alignment of a value in a cell. If we want text to be rendered right aligned, even though the cell is left aligned, we can use '* @' as the mask, and this will push the display to the right of the cell.\n\n![Right Align.png](images/Behind the Mask/Right Align.png)\n\nNote that padding is not supported by PhpSpreadsheet's internal renderer for the cell's `getFormattedValue()` method, because the renderer is unaware of font or cell width, so it will simply add a single space in the formatted result. Nor will it change alignment in any way.\n\n### Colours\n\nYou can use format masks to change the font colour for a certain value with a custom number format.\ne.g. '[Red]@'\n\nMasking supports the following 8 main colours.\n\n - Black\n - Red\n - Green\n - Blue\n - Cyan\n - Yellow\n - Magenta\n - White\n\nTo specify the colour, just type one of those colour names in the appropriate section of your number format code, wrapped in square braces (e.g. '[red]').\nThis colour code must be at the very start of the section, before any other formatting characters or instructions.\nThe colour name is case-insensitive.\n\nIf we wanted to show positive values in green and negative values in red we could apply different colours to the different sections of the mask, e.g. \"[Green]#,##0.00;[Red]#,##0.00;0.00\".\n\n> **Warning**: Colour masking doesn't apply when using Excel's `TEXT()` function; only when it is applied to a Cell's Format Mask.\n\n### Conditional Formatting\n\nNot to be confused with actual Conditional Formatting in MS Excel; but we can apply some limited condition checks in normal Cell Format Masks, and apply different masking based on those conditions.\n\nWhile by default the different sections are interpreted by Excel as positive, negative, zero and text, we can override these definitions with conditions.\nWe do this by defining the condition for matching against the value inside square braces.\n\n![Conditional 1.png](images/Behind the Mask/Conditional 1.png)\n\nThe mask that we're using here is `[Red][<65]\"Fail\";[Blue]\"Pass\"`.\nThis tells Excel to display the text \"Fail\" if the value in the Cell is less than 65, otherwise to display \"Pass\".\n\nThe symbols allowed for comparison in Conditions are the standard mathematical comparison operators:\n\n| Symbol | Meaning               |  \n|--------|-----------------------|\n| \\>     | Greater than          |\n| \\>=    | Greater than or Equal |\n| <      | Less than             |\n| <=     | Less than or Equal    |\n| =      | Equal                 |\n| <\\>    | Not Equal             |\n\nIn this next example, we've created an additional condition, so we have three sections in the mask: the \"Pass\" grade is now any student that hasn't failed, but whose score is less than 85; the last section awards a grade of \"Distinction\" to any student whose score doesn't match the criteria for \"Pass\" or \"Fail\" (i.e. exceeds 85).\n`[Red][<65]\"Fail\";[Blue][<85]\"Pass\";\"Distinction\"`\n\n![Conditional 2.png](images/Behind the Mask/Conditional 2.png)\n\nWe do need to be careful about the order that we define the conditions, because Excel will apply the mask for the first condition that matches the Cell value.\n\n> **Note**: Conditional Formatting using the Number Mask will also work with the TEXT() Function, although not with colour highlighting.\n\nWe can also use Conditional Formatting to display Lakh, the different grouping often found in India and the countries of that region.\nWhile the thousands separator normally represents grouping to powers of 3 (10<sup>3</sup>, 10<sup>6</sup>, 10<sup>9</sup>, etc), the Lakh is 10<sup>3</sup>, 10<sup>5</sup>, 10<sup>7</sup>, etc. and is written as `1,00,000`.\nAfter the first 1000, the comma separator is used to represent groups of 2 digits, not groups of 3 digits.\n150,000 rupees is 1.5 lakh rupees, and is written as `₹1,50,000` or `INR 1,50,000`.\n\nThe mask used to represent lakh is:\n[>=10000000][$₹]##\\,##\\,##\\,##0;[>=100000][$₹]##\\,##\\,##0;[$₹]##,##0\n\nNote that we're only using the `,` for thousands grouping in the final block, to represent values less than 100,000 where we would only display a single `,` as a thousands separator.\nFor the `,` in higher values, we are displaying a string literal `,` identified as such by the '\\' immediately before it in the mask.\n\n## Building Composite Masks using PhpSpreadsheet's Wizards\n\nEven though PhpSpreadsheet's Wizards don't yet support building sections with different masks for positive, negative, zero, and text, you can still create these using the Wizards as building blocks.\n\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\n\n// Set Cell value\n$worksheet->getCell('C20')->setValue(-12345.67890);\n\n// Set Cell Style using the Currency Wizard to build the Format Mask\n$currencyMask = new Currency(\n    '€',\n    2,\n    Number::WITH_THOUSANDS_SEPARATOR,\n    Currency::TRAILING_SYMBOL,\n    Currency::SYMBOL_WITH_SPACING\n);\n\n// Build the composite mask applying colours to the different sections\n$compositeCurrencyMask = [\n    '[Green]' . $currencyMask,\n    '[Red]' . $currencyMask,\n    $currencyMask,\n];\n\n$worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode(implode(';', $compositeCurrencyMask));\n\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()\n    ->getFormatCode()); // [Green]#,##0.00 €;[Red]#,##0.00 €;#,##0.00 €\n```\nWe repeat the mask that's generated by the \"Wizard\" for each section of the composite mask, adding the required colour to each section.\n\nIf we've used a locale to build a mask, then we may already have multiple sections:\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\n\n// Set Cell value\n$worksheet->getCell('C20')->setValue(-12345.67890);\n\n// Set Cell Style using the Currency Wizard to build the Format Mask\n$currencyMask = new Currency(\n    '€',\n    locale: 'nl_NL'\n);\n\n// Split the generated mask into sections\n// This particular mask already has positive and negative value sections,\n//      but does not have a zero value section\n// Other locales may only have a positive section; or may already have a zero section\n$currencyMaskSections = explode(';', $currencyMask);\n// Recreate the modified mask applying colours to the different sections\n$compositeCurrencyMask = [\n    '[Green]' . $currencyMaskSections[0],\n    '[Red]' . $currencyMaskSections[1] ?? $currencyMaskSections[0],\n    $currencyMaskSections[2] ?? $currencyMaskSections[0],\n];\n\n$worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()\n    ->setFormatCode(implode(';', $compositeCurrencyMask));\n\nvar_dump($worksheet->getCell('C20')\n    ->getStyle()->getNumberFormat()\n    // [Green][$€-nl-NL] #,##0.00;[Red][$€-nl-NL] -#,##0.00;[$€-nl-NL] #,##0.00\n    ->getFormatCode());\n```\nIf the locale-generated mask already has a section defined, then we use that, otherwise we use the positive section (section 0) that will always exist as the base for each section.\n> **Warning:** You might need to add an explicit `-` for the negative section if that needs to be created.\n\n## Summary\n\nEven though Excel displays the formatted value in the grid, the underlying value in the cell is unchanged.\nThe value being displayed as a date is still an Excel Serialized Timestamp, even though it is being displayed as '2023-02-28'; the student grade is still a number, even though it is being displayed as \"Distinction\"/\"Pass\"/\"Fail\"; and the cell that looks empty may not be as empty as you think.\nThe edit bar still shows us the value in the cell, not the formatted value; and we can still use that underlying value in formulae.\n\n![Summary - Still a numeric value.png](images/Behind the Mask/Summary - Still a numeric value.png)\n\nAnd we can even format the cell containing the result of that formula.\n\nNumber format masks allow us to present the spreadsheet data in a format that makes it easy for the user to interpret; so they add a lot of value to the spreadsheets that we create.\nWe just need to understand how to use them well to unlock that value.\n"
  },
  {
    "path": "docs/topics/Excel Anomalies.md",
    "content": "# Excel Anomalies\n\nThis is documentation for some behavior in Excel itself which we\njust do not understand, or which may come as a surprise to the user.\n\n## Date Number Format\n\nMy system short date format is set to `yyyy-mm-dd`. Excel, for a very long time, did not include that amongst its formatting choices for dates, so it needed to be added as a custom format - no big deal. It has recently been added to the list of date formats, but ...\n\nI used Excel to create a spreadsheet, and included some dates, specifying `yyyy-mm-dd` formatting. When I looked at the resulting spreadsheet, I was surprised to see that Excel had stored the style not as `yyyy-mm-dd`, but rather as builtin style 14 (system short date format). Apparently the fact that the Excel styling matched my system choice was sufficient for it to override my choice! This is an astonishingly user-hostile implementation. Even though there are formats which, by design, \"respond to changes in regional date and time settings\", and even though the format I selected was not among those, Excel decided it was appropriate to vary the display even when I said I wanted an unvarying format. I assume, but have not confirmed, that this applies to formats other than `yyyy-mm-dd`.\n\nNote that this is not a problem when using PhpSpreadsheet to set the style, only when you let Excel do it. And, in that case, after a little experimentation, I figured out a format that Excel doesn't sabotage `[Black]yyyy-mm-dd`.\n\nIf you have a spreadsheet that has been altered in this way, it can be fixed with the following PhpSpreadsheet code:\n```php\n        foreach ($spreadsheet->getCellXfCollection() as $style) {\n            $numberFormat = $style->getNumberFormat();\n            // okay to use NumberFormat::SHORT_DATE_INDEX below\n            if ($numberFormat->getBuiltInFormatCode() === 14) {\n                $numberFormat->setFormatCode('yyyy-mm-dd');\n            }\n        }\n```\nStarting with PhpSpreadsheet 4.5.0, this can be simplified to:\n```php\n        $spreadsheet->replaceBuiltinNumberFormat(\n            \\PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat::SHORT_DATE_INDEX,\n            'yyyy-mm-dd'\n        );\n```\n\n## Negative Time Intervals\n\nYou have a time in one cell, and a time in another, and you want to subtract and display the result in `h:mm` format. No problem if the result is positive. But, if it's negative, Excel just fills the cell with `#`. There is a solution of sorts. If you use a 1904 base date (default on Mac), the negative interval will work just fine. Alas, no dice if you use a 1900 base data (default on Windows). No idea why they can't fix that - the existing implementation can't really be something that anybody actually wants. Note that it is *not* safe to change the base date for an existing spreadsheet, so, if this is something you want to do, make sure you change the base date before populating any data.\n\n## Long-ago Dates\n\nExcel does not support dates before either 1900-01-01 (Windows default) or 1904-01-01 (Mac default). For the 1900 base year, there is the additional problem that non-existent date 1900-02-29 is squeezed between 1900-02-28 and 1900-03-01.\n\n## Weird Fractions\n\nSimilar fraction formats have inconsistent results in Excel. For example, if a cell contains the value 1 and the cell's format is `0 0/0`, it will display as `1 0/1`. But, if the cell's format is `? ??/???`, it will display as `1`. See [this issue](https://github.com/PHPOffice/PhpSpreadsheet/issues/3625), which remains open because, in the absence of usable documentation, we aren't sure how to handle things.\n\n## COUNTIF and Text Cells\n\nIn Excel, COUNTIF appears to ignore text cells, behavior which doesn't seem to be documented anywhere. See [this issue](https://github.com/PHPOffice/PhpSpreadsheet/issues/3802), which remains open because, in the absence of usable documentation, we aren't sure how to handle things.\n\n## SORT on Different DataTypes\n\nExcel appears to sort so that numbers are lowest in sort order, strings are next, booleans are next (LibreOffice treats booleans as ints), and null is highest. In addition, if your sort includes a numeric string with a leading plus or minus sign, the plus sign will be considered part of the string (so that `\"+1\"` will sort before `\"0\"`), but the minus sign will be ignored (so that `\"-3\"` will sort between `\"25\"` and `\"40\"`). There might be nuances I haven't thought of yet. PhpSpreadsheet will not necessarily duplicate Excel's behavior. The best advice we can offer is to make sure that arrays you wish to sort consist of a single datatype, and don't contain numeric strings. Samples samples/LookupRef/SortExcel and SortExcelCols are added to give an idea of how you might emulate Excel's behavior. I am not yet convinced that there is a use case for adding it as a class member in the src tree.\n"
  },
  {
    "path": "docs/topics/Looping the Loop.md",
    "content": "# Looping the Loop\n\nPhpSpreadsheet uses a lot of memory to maintain the Spreadsheet model; but I regularly see developers loading a Spreadsheet file and then calling the `toArray()` methods so that they can loop through the rows and columns of a worksheet.\nPHP arrays are also notoriously memory-intensive, so creating a large array duplicating the data that is already in the Spreadsheet model is a very inefficient use of memory.\nGenerally, unless we are always working with very small spreadsheets, we would want to avoid this.\n\nSo in this article, I'm going to look at a number of different ways of iterating through a worksheet to access the row and cell data; at their limitations; and at some of the options that each provides.\n\n## Using `toArray()`\n\nUsing a sample data file from Microsoft and available at https://go.microsoft.com/fwlink/?LinkID=521962, I can load up the file, call `toArray()` to return the worksheet data in an array, and iterate over the rows and cells of that array with the following code.\n\n```php\n$inputFileType = 'Xlsx';\n$inputFileName = __DIR__ . '/../Financial Sample.xlsx';\n\n$reader = IOFactory::createReader($inputFileType);\n$spreadsheet = $reader->load($inputFileName);\n$worksheet = $spreadsheet->getActiveSheet();\n\n$dataArray = $worksheet->toArray();\n\nforeach ($dataArray as $row) {\n    foreach ($row as $cellValue) {\n        // Do something with the cell data here.\n    }\n}\n```\n\nThe Financial Sample spreadsheet is fairly small, 701 rows (including a heading row) and 16 columns; and is predominantly numeric data.\nTo simulate a larger worksheet, I've duplicated that data to give 7001 rows; but this is still a small worksheet as MS Excel xlsx files can contain 1 million rows in each of several worksheets.\n\nIf we look at the timings and memory usage for this process with my extended MS Financial Sample spreadsheet:\n```\nCurrent memory usage: 47104 KB\n\nCall time to build array was 0.6603 seconds\n\nCall time to iterate array rows was 0.0130 seconds\nCurrent memory usage: 57344 KB\n   Peak memory usage: 57344 KB\n```\nWe can see that using `toArray()` increases memory usage by 10240KB (10MB): that is the memory used by the array for a relatively small worksheet (less than 120,000 cells).\nFor larger worksheets, with more rows and columns, and with more text than numeric values, this memory overhead can grow significantly larger.\n\nAnd while iteration over the array is very quick, it still takes 0.6603 seconds to build the array before we can start iterating over those rows and cells.\n\n---\n\nThe `toArray()` method is easy to use: but not only is it increasing the memory overhead, especially with larger worksheets; but it also lacks flexibility.\nIt provides limited control over how the data from each cell is returned in the array.\nIt can return the raw cell value (which isn't particularly useful if the cell contains a formula, or if the value should be interpreted as a date); it can force PhpSpreadsheet to calculate formulae and return the calculated value; or it can return the formatted cell value (which includes calculating any formulae) so that date values are presented in a human-readable format, but which will also format numeric values with thousand separators where the cell style applies that.\n\n| Argument Name      | DataType | Default | Purpose                                                                                                                                                                             |\n|--------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| $nullValue         | mixed    | null    | A value to be returned in the array if a cell doesn't exist.                                                                                                                        |\n| $calculateFormulas | boolean  | false   | Flag to indicate if formula values should be calculated before returning.                                                                                                           |\n| $formatData        | boolean  | false   | Flag to request that values should be formatting before returning.                                                                                                                  |\n| $returnCellRef     | boolean  | false   | False - Return a simple enumerated array of rows and columns (indexed by number counting from zero)<br />True - Return rows and columns indexed by their actual row and column IDs. |\n| $ignoreHidden      | boolean  | false   | True - Ignore hidden rows and columns. |\n| $reduceArrays      | boolean  | false   | True - If calculated value is an array, reduce it to top leftmost value. |\n| $lessFloatPrecision | boolean  | false   | True - PhpSpreadsheet 5.2+ - Floats, if formatted, will display as a more human-friendly but possibly less accurate value. |\n\n### Dealing with empty rows\n\nThe example spreadsheet that I've used here is well behaved, with no empty rows. Empty rows can cause problems, even when working in Excel itself.\n\nLet's take a look at a worksheet of Sales Data, where we're missing the returns for a couple of months:\n\n![Empty Rows.png](images/Looping the Loop/Empty Rows.png)\n\nIf we're using MS Excel, and we hit `Ctrl-T` to create a table from this data, we might expect Excel to build that table from all rows up to `Dec`; but it won't, it will only build the table up to the next empty row.\n\n![Table with Empty Rows.png](images/Looping the Loop/Table with Empty Rows.png)\n\nAnd unless we're careful, we might not even notice that the last few months of the year are omitted.\nSo empty rows can create problems even in MS Excel itself; and we certainly need to have some way of identifying them when we're processing a worksheet using PhpSpreadsheet.\n\n---\n\nWhile we're iterating through a spreadsheet with PhpSpreadsheet, we might want to avoid trying to process blank data if we reach a row that is empty; or we might want to terminate iterating when we encounter an empty row.\n\nIf we've created an array from a worksheet, then an empty row will be a row where every cell/column entry has a null value (unless called specifying an alternative value using the `$nullValue` argument).\n\nWe can filter the row to eliminate null values, then count the length of that filtered array: if there are no remaining cells, then the row is empty. We can then skip that row in our code using `continue`.\n\n```php\nforeach ($dataArray as $row) {\n    // Check for empty rows\n    if (count(array_filter($row, function ($value) {\n        return $value !== null;\n    })) === 0) {\n        continue;   // Ignore empty rows\n    }\n\n    foreach ($row as $cellValue) {\n        // Do something with the cell data here.\n    }\n}\n```\n\nOr if we want to terminate iterating when we encounter an empty row, use `break` rather than `continue`.\n\n```php\nforeach ($dataArray as $row) {\n    // Check for empty rows\n    if (count(array_filter($row, function ($value) {\n        return $value !== null;\n    })) === 0) {\n        break;    // Stop at the first empty row\n    }\n\n    foreach ($row as $cellValue) {\n        // Do something with the cell data here.\n    }\n}\n```\n\nUsing `toArray()` won't change anything in the worksheet model: it won't modify values or create new cells.\nIt will return a row/column entry for every cell that can exist, even if that cell doesn't exist in the worksheet, or is part of a merge range.\n> **Note**: It is possible for several cells in a merge range to have a value. Although MS Excel doesn't allow you to set data like this, the option is available in other Spreadsheet software, and if the file is saved as an xlsx file, then the data for those cells is retained in the file, even though only the top left cell of a merge range shows a value in MS Excel. In PhpSpreadsheet, accessing those cells (including using `toArray()`) will return the \"hidden\" value.\n\nOne useful factor about returning an array of arrays is if we want to populate a data model from that row before persisting to a database, for example. We don't need to iterate the columns in that row, but can work directly with the column array for each row.\n\n```php\nclass MonthlySales {\n    private function __construct(\n        public readonly string $month,\n        public readonly array $sales,\n    ) {}\n\n    public static function fromExcel(array $values, array $headers): self {\n        $month = array_shift($values);\n        return new self($month, array_combine($headers, $values));\n    }\n}\n\n$monthlySalesData = new MonthlySalesCollection();\n\n// Read from the header row of the worksheet\n$excelHeaderRow = ['Jones', 'Sorvino', 'Gupta', 'Choi'];\n\n$dataArray = $worksheet->toArray(formatData: true);\nforeach ($dataArray as $excelDataRow) {\n    // Check for empty rows\n    if (count(array_filter($excelDataRow, function ($value) {\n        return $value !== null;\n    })) === 0) {\n        continue;   // Ignore empty rows\n    }\n\n    $monthlySalesData->add(MonthlySales::fromExcel(\n        $excelDataRow,\n        $excelHeaderRow\n    ));\n}\n```\nWe can pass the row array directly to the static `MonthlySales::fromExcel()` constructor for our data object, handling any validation and manipulation of the structure there, to map the Excel data row to that object properties, handling filtering within the business logic of the Monthly Sales object's static constructor.\n\n---\n\nAnd remember that by default, `toArray()` returns a simple enumerated array of enumerated arrays, to reflect rows and columns. You can modify this using the `$returnCellRef` argument to the method: set `$returnCellRef` to true, and the array indexes will be the row number (with 1 as the first row) and the column address ('A', 'B', 'C', etc); which can be useful if you want to do some processing of the cells based on that column address.\n\n```php\nclass MonthlySales {\n    private function __construct(\n        public readonly string $month,\n        public readonly array $sales,\n    ) {}\n\n    public static function fromExcel(array $values, array $headers): self {\n        $month = array_shift($values);\n        $salesValues = [];\n        foreach ($values as $column => $value) {\n            // Ignore salespeople who have null sales values\n            if ($value !== null) {\n                $salesValues[$headers[$column]] = $value;\n            }\n        }\n        return new self($month, $salesValues);\n    }\n}\n\n$monthlySalesData = new MonthlySalesCollection();\n\n// Read from the header row of the worksheet\n$excelHeaderRow = [\n    'B' => 'Jones',\n    'C' => 'Sorvino',\n    'D' => 'Gupta',\n    'E' => 'Choi'\n];\n\n$dataArray = $worksheet->toArray(formatData: true, returnCellRef: true);\nforeach ($dataArray as $excelDataRow) {\n    // Check for empty rows\n    if (count(array_filter($excelDataRow, function ($value) {\n        return $value !== null;\n    })) === 0) {\n        continue;   // Ignore empty rows\n    }\n\n    $monthlySalesData->add(MonthlySales::fromExcel(\n        $excelDataRow,\n        $excelHeaderRow\n    ));\n}\n```\n\n## Using `rangeToArray()`\n\nThe `toArray()` method uses information from the loaded file to identify the range of rows and columns to populate the array.\n`toArray()` uses two cached values to identify the range of cells to populate the array, values that are returned by the `getHighestRow()` and `getHighestColumn()` methods.\n\nBut many worksheets do have trailing empty rows (or columns); and it is quite common for an Excel spreadsheet to have only a few rows or columns of data, but for the spreadsheet itself to claim that the highest row is 1,048,576 or that the highest column is XFD.\nFeatures such as Data Validation or Conditional Formatting that can also artificially inflate/increase the values returned by `getHighestRow()` and `getHighestColumn()` methods.\n\nIf we use `toArray()` to build an array from the worksheet in this case, then it will build a 1,048,576x16,384 array, filled with null values, that will almost certainly exceed PHP's memory limits, and take a long time to do so.\nAnd if we do have enough memory to build the array, we will still be iterating over a lot more array entries than we want. Even if we're skipping empty rows, we're still testing every row to see if it's empty.\nWhere possible, it's better to specify the limit of rows and columns that we want to use to build an array, and PhpSpreadsheet provides the `rangeToArray()` for that purpose.\n\nOne option to reduce a large array using a lot of PHP memory would be to run a loop using `rangeToArray()` to build smaller arrays for blocks of perhaps 100 rows at a time.\nThis will still take a while to run if we have a lot of trailing empty rows, but it won't exceed PHP's memory limits.\n\n```php\n$startRow = 1;\n$batchSize = 100;\nwhile ($startRow <= $maxRow) {\n    $endRow = min($startRow + $batchSize, $maxRow);\n    $dataArray = $worksheet->rangeToArray(\"A{$startRow}:{$maxColumn}{$endRow}\");\n    $startRow += $batchSize;\n\n    foreach ($dataArray as $row) {\n        // Check for empty rows\n        if (count(array_filter($row, function ($value) {\n                return $value !== null;\n            })) === 0) {\n            continue;   // Ignore empty rows\n        }\n\n        foreach ($row as $cellValue) {\n            // Do something with the cell data here.\n        }\n    }\n}\n```\n\nAlternatively, we can identify the highest row and highest column that actually contain cell data using the `getHighestDataRow()` and `getHighestDataColumn()` methods. This allows us to specify a range to pass to the `rangeToArray()` method.\n\n```php\n$maxDataRow = $worksheet->getHighestDataRow();\n$maxDataColumn = $worksheet->getHighestDataColumn();\n\n$dataArray = $worksheet->rangeToArray(\"A1:{$maxDataColumn}{$maxDataRow}\");\n\nforeach ($dataArray as $row) {\n    // Check for empty rows\n    if (count(array_filter($row, function ($value) {\n        return $value !== null;\n    })) === 0) {\n        continue;   // Ignore empty rows\n    }\n\n    foreach ($row as $cellValue) {\n        // Do something with the cell data here.\n    }\n}\n```\n\nThere might still be some empty rows in this array, so we still want to test for empty rows; but we won't have any trailing empty rows at the end of our data, so the iteration will terminate at the end of our specified row range, when we know we have no further data.\n\nAnd if there is a row or two of column headers that we want to ignore, we can modify the specified range to exclude them by adjusting the starting row of the range (e.g. `\"A3:{$maxDataColumn}{$maxDataRow}\"`);\n\nBecause we're only building the array for a specified range of rows and columns, the array that the method builds will often be smaller than the array created by `toArray()`, using less memory; and it will often be faster iterating just the subset of rows that we've requested.\n\n\nA combination of these approaches - batching and using the 'getHighestDataRow()' value, will be more memory-efficient, and possibly faster, than using 'toArray()'.\n```php\n$startRow = 1;\n$batchSize = 100;\nwhile ($startRow <= $maxDataRow) {\n    $endRow = min($startRow + $batchSize, $maxDataRow);\n    $dataArray = $worksheet->rangeToArray(\"A{$startRow}:{$maxDataColumn}{$endRow}\");\n    $startRow += $batchSize;\n\n    foreach ($dataArray as $row) {\n        // Check for empty rows\n        if (count(array_filter($row, function ($value) {\n                return $value !== null;\n            })) === 0) {\n            continue;   // Ignore empty rows\n        }\n\n        foreach ($row as $cellValue) {\n            // Do something with the cell data here.\n        }\n    }\n}\n```\nHow does this approach compare with using 'toArray()' in terms of memory and speed? Here are the details for using `rangeToArray()` with a batched approach:\n```\nCurrent memory usage: 47104 KB\n\nCall time to batch iterate array rows was 0.6844 seconds\n Current memory usage: 47104 KB\n    Peak memory usage: 49152 KB\n```\nWhile the total time is 0.6844 seconds, that included building the smaller batched arrays, so its speed is comparable to the total time of 0.6733 seconds using `toArray()`.\nBut a peak memory usage of 49,152KB compared with the 57,344KB used by `toArray()` make this approach a lot more memory efficient.\n\nLike `toArray()`, `rangeToArray()` is easy to use, but it has the same limitations for flexibility. It provides the same limited control over how the data from each cell is returned in the array as `toArray()`.\nThe same additional arguments that can be provided for the `toArray()` method can also be provided to `rangeToArray()`.\n\n\n## Using `rangeToArrayYieldRows()`\n\nSince v2.1.0 the worksheet method `rangeToArrayYieldRows()` is available.\nIt allows you to iterate over all sheet's rows with little memory consumption,\nwhile obtaining each row as an array:\n\n```php\n$rowGenerator = $sheet->rangeToArrayYieldRows(\n    'A1:' . $sheet->getHighestDataColumn() . $sheet->getHighestDataRow(),\n    null,\n    false,\n    false\n);\nforeach ($rowGenerator as $row) {\n    echo $row[0] . ' | ' . $row[1] . \"\\n\";\n}\n```\n\nSee `samples/Reader2/23_iterateRowsYield.php`.\n\n\n## Using Iterators\n\nYou don't need to build an array from the worksheet to loop through the rows and columns and do whatever processing you need; you can loop through the rows and columns in the Worksheet directly and more efficiently using PhpSpreadsheet's built-in iterators.\n\nAnd this also gives a lot more flexibility in how you can present the cell values, because the iterator will return the Cell itself, not a representation of its value. You can read its value, check its style, identify if it is part of a merge range.\n\n```php\n$rowIterator = $worksheet->getRowIterator();\nforeach ($rowIterator as $row) {\n    $columnIterator = $row->getCellIterator();\n    foreach ($columnIterator as $cell) {\n        // Do something with the cell here.\n    }\n}\n```\n\nLet's look at the memory usage and timings for using PhpSpreadsheet's Iterators, as we did for building and iterating through the array.\n\n```\nCurrent memory usage: 47104 KB\n\nCall time to iterate rows was 0.0930 seconds\n Current memory usage: 47104 KB\n    Peak memory usage: 47104 KB\n```\n\nUsing the PhpSpreadsheet Iterators isn't as fast as iterating over an array; but it doesn't have the time or memory overheads of actually building that array from the worksheet.\nUsing the same example spreadsheet, it only took 0.0130 seconds to iterate every cell of that array, but 0.6603 seconds to build the array, a total of 0.6733 seconds; but using the Iterator has performed the equivalent task in just 0.0930 seconds; about 7 times faster and without the increased memory overhead of the array.\n\n### Dealing with empty rows\n\nAs, when we were iterating over the array, we might want to identify empty rows so that we can avoid trying to process them. The Row Iterator provides a method to identify empty rows.\n\n```php\n$rowIterator = $worksheet->getRowIterator();\nforeach ($rowIterator as $row) {\n    if ($row->isEmpty()) { // Ignore empty rows\n        continue;\n    }\n\n    $columnIterator = $row->getCellIterator();\n    foreach ($columnIterator as $cell) {\n        // Do something with the cell here.\n    }\n}\n```\n\nOne additional feature when using the Iterator to determine whether a row is empty or not is that we can set our own rules to define \"empty\".\nThe default rule is if there is no entry for the Cell in the Cell Collection.\nIf we also want to skip any Cell that contains a null value, then we can pass an argument using the pre-defined constant `CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL`.\nIf we also want to skip any Cell that contains an empty string, then we can pass an argument using the pre-defined constant `CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL`.\n\nAnd we can combine those rules:\n```php\nif ($row->isEmpty(\n    CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL | \n    CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL)\n    ) { // Ignore empty rows\n    continue;\n}\n```\n\nSince PhpSpreadsheet 1.27.0, we can take this empty test one step further.\nIf we look at a slightly modified version of the Sales Data worksheet, rows 7 and 10 have no sales data, but they aren't empty because there is a month value in column A.\n\n![Empty Rows 2.png](images/Looping the Loop/Empty Rows 2.png)\n\nBut we can tell the `isEmpty()` method to only check if a specified range of columns is empty in a row.\n\n```php\nif ($row->isEmpty(startColumn: 'B', endColumn: 'E') {\n     // Ignore empty rows where columns B to E are empty values\n     //     even though there is a value in Column A.\n    continue;\n}\n```\n\n---\n\nLike `toArray()`, the Iterators use the `getHighestRow()` and `getHighestColumn()` methods to identify the maximum row and column values for iterating; so it can still iterate over a lot of trailing empty rows and columns.\nBut that is just a default behaviour.\nSimilarly to `rangeToArray()` we can specify a range of rows, and a range of columns to iterate.\n\n```php\n$maxDataRow = $worksheet->getHighestDataRow();\n$maxDataColumn = $worksheet->getHighestDataColumn();\n\n$rowIterator = $worksheet->getRowIterator(1, $maxDataRow);\nforeach ($rowIterator as $row) {\n    if ($row->isEmpty()) { // Ignore empty rows\n        continue;\n    }\n\n    $columnIterator = $row->getCellIterator('A', $maxDataColumn);\n    foreach ($columnIterator as $cell) {\n        // Do something with the cell here.\n    }\n}\n```\n\nand if we have heading rows at the top of the worksheet that we want to ignore:\n```php\n$rowIterator = $worksheet->getRowIterator(3, $maxDataRow);\n```\n\nAnd if we want to return only cells that aren't empty in the row, then we can tell the Cell Iterator to skip empty cells.\n\n```php\n$rowIterator = $worksheet->getRowIterator(1, $maxDataRow);\nforeach ($rowIterator as $row) {\n    $columnIterator = $row->getCellIterator();\n    $columnIterator->setIterateOnlyExistingCells(true);\n    foreach ($columnIterator as $cell) {\n        // Do something with the cell here.\n    }\n}\n```\n\nAlongside the speed and memory benefits, another big advantage of using the Iterators (Row and Cell, or Column and Cell) is that we get direct access to the cell itself. We can look at its value, its style; we can identify if it is a formula, or formatted as a date/time, whether it is part of a merge range: we can choose exactly what we want to do with it.\n\n---\n\nOne drawback of the Cell Iterator is that it will create a new cell if none exists (by default) unless we're skipping empty cells.\nUntil PhpSpreadsheet 1.27.0, the Cell Iterator would always create a new Cell if one didn't exist in the Cell Collection when it was required to access it. And this can lead to increasing memory consumption.\n\nPhpSpreadsheet 1.27.0 introduced the option to return a null value rather than to create and return a new Cell.\n\n```php\n$rowIterator = $worksheet->getRowIterator(1, $maxDataRow);\nforeach ($rowIterator as $row) {\n    $columnIterator = $row->getCellIterator();\n    $columnIterator->setIfNotExists(CellIterator::IF_NOT_EXISTS_RETURN_NULL);\n    foreach ($columnIterator as $cell) {\n        if ($cell !== null) {\n            // Do something with the cell here.\n        }\n    }\n}\n```\n\nThe default Iterator behaviour is still to create a new Cell, to retain backward compatibility; but the option to return a null value instead of a new empty cell now exists.\n> **Note**: This default behaviour is likely to be reversed with the eventual release of PhpSpreadsheet 2.0, with a null value as the default return, but with the option to create a new empty cell.\n\n## Summary of Performance and Benefits\n\nSo here is a quick summary of timing and memory usage for the three different approaches to iterating through the rows and cells of the 7000 row sample worksheet.\n\nMemory usage is adjusted for the 47,104 KB baseline of the loaded file.\n\n| Approach               | Total Time (s) | Memory (KB) |\n|------------------------|----------------|-------------|\n| toArray()              | 0.6733         | 10,240      |      \n| rangeToArray (Batched) | 0.6844         | 2,048       |    \n| Iterators              | 0.0930         | 0           |   \n\nThese figures are all based on a well-formed spreadsheet, with no trailing empty rows, or empty rows within the dataset.\nEmpty rows within a dataset can be identified by all three approaches, although only Iterators have a built-in method to identify an empty row.\n\nUsing `toArray()` is not good for controlling memory usage, especially if there are trailing empty rows, so it should generally be avoided; but both `rangeToArray()` and the Iterators can exclude trailing rows by setting their scope based on the `getHighestDataRow()` and `getHighestDataColumn()` values.\n\nBatching rows with `rangeToArray()` is useful for keeping memory usage under control if you want to work with arrays.\n\nBut using the Iterators is significantly faster than either \"array\" approach, with no memory overhead (especially if using the option of a null return for Cells that don't exist that was made available in PhpSpreadsheet 1.27.0); and as the Iterators return the Cell object rather than simply a cell value, they provide a lot more flexibility in how to process that cell.\nThe flexibility to configure the definition of an empty row may also be useful to developers using this approach to iterating through a worksheet.\n\n## Conclusions\n\nWhile it might require a little more userland code by developers using PhpSpreadsheet; because they are faster, have no additional memory overhead, and provide more flexibility, Iterators are the recommended approach for looping through the rows (and cells) of a worksheet.\n\n"
  },
  {
    "path": "docs/topics/The Dating Game.md",
    "content": "# The Dating Game\n\nDate and Time values are stored in different ways in spreadsheet files, depending on the file format; but internally when working in Excel the cell always contains a numeric value, representing the number of days since a baseline date, and formatted to appear as a human-readable date using a \"Number Format Mask\". This number is sometimes referred to as a serialized Excel date or timestamp.\n\n## Dates\n\nThat baseline date is normally 1st January 1900, although it can be 1st January 1904 (if the original spreadsheet file was created using the Mac version of MS Excel). Excel maintains a flag in the file indicating which baseline should be used; for file formats that don't provide this flag (such as .slk or .csv), the calendar defaults to the 1900 baseline.\n![Date as a number.png](images/The Dating Game/Date as a number.png)\n\nNote that the baseline date itself is day 1; so strictly speaking, the base date 0 is '1899-12-31': Excel considers any value between 0 and 1 as purely a time value, trying to display 0 using a date format mask like 'yyyy-mm-dd' will show an invalid date like '1900-01-00' rather than '1899-12-31', but when using a time format mask like 'hh:mm:ss' it will appear as '00:00:00' (midnight). Values less than 0 are invalid as dates or as times, so a negative value in a cell with a date \"Number Format Mask\" will display as '############' in Excel.\n\nOpen/Libre Office and Gnumeric don't have this limitation, and negative date/timestamp values are recognised and formatted correctly; but it is recommended that you don't rely on this when working with PhpSpreadsheet.\n\nTo write a date in a cell using PhpSpreadsheet, we need to calculate the serialized Excel datestamp for that date. Methods to do this are available in the Shared\\Date class, which provides a number of methods for conversion between different date options typically used in PHP applications (Unix timestamp, PHP DateTime objects and some recognisable formatted strings) and the Excel serialized value; and vice versa.\n\n - Shared\\Date::convertIsoDate()\n     - Converts a date/time in [ISO-8601 standard format](https://en.wikipedia.org/wiki/ISO_8601) to an Excel serialized timestamp\n - Shared\\Date::PHPToExcel()\n     - Converts a Unix timestamp, a PHP DateTime object, or a recognisable formatted string to an Excel serialized timestamp\n - Shared\\Date::dateTimeToExcel()\n     - Converts a Unix timestamp to an Excel serialized timestamp\n - Shared\\Date::timestampToExcel()\n     - Converts a PHP DateTime object to an Excel serialized timestamp\n - Shared\\Date::formattedPHPToExcel()\n     - Converts year, month, day, hour, minute, and second to an Excel serialized timestamp\n - Shared\\Date::excelToDateTimeObject()\n     - Converts an Excel serialized timestamp to a PHP DateTime object\n - Shared\\Date::excelToTimestamp()\n     - Converts an Excel serialized timestamp to a Unix timestamp.\n     - The use of Unix timestamps, and therefore this function, is discouraged: they are not Y2038-safe on a 32-bit system, and have no timezone info.\n\nWe probably also want to set the number format mask for the cell so that it will be displayed as a human-readable date.\n```php\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\n\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Calculate today's date as an Excel serialized timestamp\n$today = SharedDate::PHPToExcel(new DateTime('today'));\n\n$data = [\n    ['Formatted Date', 'Numeric Value'],\n    ['=C2', 1],\n    ['=C3', 2],\n    ['=C4', $today],\n];\n\n// Write our data to the worksheet\n$worksheet->fromArray($data, null, 'B1');\n\n// Display values in column B as human-readable dates\n$worksheet->getStyle('B2:B4')->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n// Set some additional styling\n$worksheet->getStyle('B1:C1')->getFont()->setBold(true);\n$worksheet->getColumnDimension('B')->setAutoSize(true);\n```\n\n## Times\n\nDates are always the integer part of the value (1, 2, 44943): the fractional part of the value is used to represent the time as a fraction of the day. So a value of 0.5 is 12:00 midday; 0.25 is 06:00 in the morning and 0.75 is 18:00 in the evening.\n![Time as a number.png](images/The Dating Game/Time as a number.png)\n\nA float value greater than 1, like 44943.5 is considered as a datetime value: 12:00 (midday) on the 17th of January 2023.\n\nAs with dates, to write a time value to a cell in PhpSpreadsheet, we write the numeric value for that time (or date/time) to the cell, and then apply a number format mask to the cell so that it will be displayed in a human-readable format.\n```php\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\n\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Calculate today's date as an Excel serialized timestamp\n$today = SharedDate::PHPToExcel(new DateTime('today'));\n\n$data = [\n    ['Formatted Time', 'Numeric Value'],\n    ['=C2', 0],\n    ['=C3', 0.25],\n    ['=C4', 0.5],\n    ['=C5', 0.75],\n    ['=C6', $today + 0.5],\n];\n\n// Write our data to the worksheet\n$worksheet->fromArray($data, null, 'B1', true);\n\n// Display values in column B as human-readable dates\n$worksheet->getStyle('B2:B5')->getNumberFormat()->setFormatCode('hh:mm:ss');\n$worksheet->getStyle('B6')->getNumberFormat()->setFormatCode('yyyy-mm-dd hh:mm:ss');\n// Set some additional styling\n$worksheet->getStyle('B1:C1')->getFont()->setBold(true);\n$worksheet->getColumnDimension('B')->setAutoSize(true);\n```\n\nThe same `Shared\\Date` functions that convert between Excel dates and Unix Timestamps or PHP DateTime objects can also be used to convert time values. \n\n## Dates/Times and Value Binders\n\nIt is a standing joke that MS Excel tries to identify date and time values as you are entering data in Excel, and often treats any value as a possible date, converting it to an Excel serialized timestamp and applying date/time formatting, even though that may not have been what was intended.\n![StringDateValues.jpg](images/The Dating Game/StringDateValues.jpg)\n\nAny change to a cell value in PhpSpreadsheet that isn't made using the setCellValueExplicit() method is passed through a \"Value Binder\", which triggers additional settings for that cell.\n\n> **Note**: dates and times maintained in true spreadsheet format files are always correctly identified in the file, and setCellValueExplicit() is used to store those values, with the formatting mask defined in that file. However, non-spreadsheet files such as .csv don't identify dates/times, so the Value Binder behaviour applies when loading those files.\n\n\nThe Default Value Binder attempts to identify the datatype of the value and sets the cell datatype accordingly: and if you pass a string value like '2023-01-18 12:15:00' then the Default Value Binder will simply treat it as a string, and set it accordingly.\n\nHowever, if you choose to use the Advanced Value Binder, then that contains logic which looks more closely at those string values, and tries to determine if they are likely to be formatted dates or times, and in that regard it emulates Excel's behaviour. If the string value looks like a date or time, then it is converted to a serialized Excel date/timestamp, and an appropriate format mask is set for that cell.\n\nWhile the logic of this isn't perfect, I'd like to believe that it is less error-prone than Excel's own logic; but it won't necessarily recognise ambiguous formats and values correctly like '1/7/2023' as dates. (Is that the 1st of July? Or the 7th of January?)\n\n## Reading Dates and Times from cells\n\nWhen we read the value of a cell that contains a Date/Time value, we are only reading a number (the Excel serialized timestamp); it is only the Number Format Mask that allows us to say whether that number is simply a number, or is meant to be a Date/Time value.\n\nPhpSpreadsheet provides a number of methods to identify whether a Number Format Mask represents a Date/Time format mask, or whether a Cell is formatted as a Date/Time.\n\n- Shared\\Date::isDateTimeFormat()\n  - Identifies if a NumberFormat Style object is an Excel Date/Time style format mask.\n- Shared\\Date::isDateTimeFormatCode()\n  - Identifies if the string value of a Number Format mask is an Excel Date/Time style format mask.\n- Shared\\Date::isDateTime()\n  - Identifies if a Cell is styled with a Number Format mask is an Excel Date/Time style format mask.****\n\nThese functions allow you to identify whether a cell value should be converted to a Unix Timestamp or PHP DateTime object (using one of the conversion functions provided in `Shared\\Date`) for processing in your script, or for formatting as a Date/Time value.\n\n## Date Arithmetic\n\nBecause dates and times are just numeric values in MS Excel, this makes date/time arithmetic very easy to calculate: to count the number of days (or a duration) between two dates, we can use a simple subtraction.\n![Date Arithmetic.png](images/The Dating Game/Date Arithmetic.png)\n\nSimilarly, we can add date/time values like adding a duration to a start date to calculate an end date.\n![Date Arithmetic 2.png](images/The Dating Game/Date Arithmetic 2.png)\n\n## Excel Date Functions\n\nMS Excel provides a number of functions that will return a date or a time value. It also recognises when one of these functions is the \"outer\" function in a formula, so the final result will always be a serialized date/time value, and sets an appropriate format mask for that value.\n\nThis behaviour is not replicated in PhpSpreadsheet. If you set a formula for a cell through your code that will return a date or time value, then you will also need to set the format mask for that cell manually.  \n\n## Formatting Options\n\nPhpSpreadsheet provides a number of built-in format code constants for dates and times in the NumberFormat class, matching those defined in the OfficeOpenXML specification, but you can always just set the format to any valid Excel formatting string, the equivalent of setting a custom date format in Excel.\n\n### Dates\n\nWhen setting up a custom date format in Excel, you can use the following codes.\n\n| Code  | Description                         | Example (January 3, 2023)             |\n|-------|-------------------------------------|---------------------------------------|\n| m     | Month number without a leading zero | 1                                     |\n| mm    | Month number with a leading zero    | 01                                    |\n| mmm   | Month name, short form              | Jan                                   |\n| mmmm  | Month name, full form               | January                               |\n| mmmmm | Month as the first letter           | J (stands for January, June and July) |\n| d     | Day number without a leading zero   | 3                                     |\n| dd    | Day number with a leading zero      | 03                                    |\n| ddd   | Day of the week, short form         | Tue                                   |\n| dddd  | Day of the week, full form          | Tuesday                               |\n| yy    | Year (last 2 digits)                | 23                                    |\n| yyyy  | Year (4 digits)                     | 2023                                  |\n\n### Times\n\nWhen setting up a custom time format in Excel, you can use the following codes.\n\n| Code   | Description                                                        | Displays as |\n|--------|--------------------------------------------------------------------|-------------|\n| h      | Hours without a leading zero                                       | 0-23        |\n| hh     | Hours with a leading zero                                          | 00-23       |\n| m      | Minutes without a leading zero                                     | 0-59        |\n| mm     | Minutes with a leading zero                                        | 00-59       |\n| s      | Seconds without a leading zero                                     | 0-59        |\n| ss     | Seconds with a leading zero                                        | 00-59       |\n| AM/PM  | Periods of the day <br/>(if omitted, 24-hour time format is used)  | AM or PM    |\n> **Warning**\nMS Excel allows any separator character between hours/minutes/seconds; PhpSpreadsheet currently requires a colon (`:`) to correctly distinguish minutes from months when rendering a time format within PHP code, although it will correctly write the format to file if any other separator character is used.\n\n### Duration (Elapsed Time)\n\nExcel also supports formatting a value as a duration; a total number of hours, minutes or seconds rather than a time of day. However, please note that negative durations are supported only if using base year 1904 (Mac default).\n\n| Code    | Description                                                    | Displays as |\n|---------|----------------------------------------------------------------|-------------|\n| [h]:mm  | Elapsed time in hours                                          | e.g. 25:02  |\n| [hh]:mm | Elapsed time in hours<br>with a leading zero if less than 10   | e.g. 05:02  |\n| [mm]:ss | Elapsed time in minutes                                        | e.g. 63:46  |\n| [m]:ss  | Elapsed time in minutes<br>with a leading zero if less than 10 | e.g. 03:46  |\n| [s]     | Elapsed time in seconds                                        |             |\n| [ss]    | Elapsed time in seconds<br>with a leading zero if less than 10 |             |\n\nIf you want to display an elapsed time in days, then you can use a normal date mask like `d h:mm` (without month or year), with the limitation that it will not exceed 31 days.\n\n### Localisation\n\n#### Built-in Formats\n\nSome of the Excel built-in format masks are locale-aware. \n![Locale.png](images/The Dating Game/Locale.png)\n\nThose locale-aware formats are highlighted with a * in Excel's drop-down lists for Date and Time, and will adapt when viewed in MS Excel, based on the locale settings of that local PC.\n\nPhpSpreadsheet is not locale-aware, so it will not render these formats as locale-formats, just as generic Date/Time formats; and localisation will be not be saved when writing to a spreadsheet file.\n\n#### Custom Formats\n\nWhen you're displaying a date/time using a format mask that isn't locale-aware in MS Excel, the locale settings for Excel are applied. So if you're displaying a month or day name, these will appear in the appropriate language for the locale of your PC.\n![Locale1.png](images/The Dating Game/Locale1.png)\n\nYou can force the display for a specific locale by prefixing the format mask with a locale setting, so that Excel will render it using the appropriate language. The locale code should be enclosed in [square brackets] and preceded with the dollar sign ($) and a dash (-).\n\nIn this example, I'm forcing Dutch Netherlands by prefixing the mask with `[$-nl-NL]`. As an alternative, I could also have used the Windows LCID for that locale (`[$-413]`).\n![Locale2.png](images/The Dating Game/Locale2.png)\n\nBecause PhpSpreadsheet is not locale-aware, displaying the formatted value for that cell in your PHP script won't show the locale date/time, only a generic date/time; but it will still be written correctly when the file is saved (as a spreadsheet format) for Excel to render correctly and in the appropriate language.\n\nIf you need this, then you can find a list of Windows LCID values [here](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/a29e5c28-9fb9-4c49-8e43-4b9b8e733a05)\n\n## Summary Example\n\nLet's summarise some of this information with a script that will build a project timesheet for a week of work on that project.\n\nI'll keep the basic data in arrays for simplicity.\n```php\n// In a real application, we might read this data from a database to build a project timesheet\n$projectHeading = [['Project', 'PhpSpreadsheet - The Dating Game']];\n$weekHeading = [\n    ['Week', '=ISOWEEKNUM(D3)', 'Start Date', '=DATE(2023,1,16)'],\n    ['Day', 'Start Time', 'End Time', 'Hours Worked'],\n];\n\n$timesheetData = [\n    ['2023-01-16', '17:25', '20:15'],\n    ['2023-01-16', '20:50', '23:35'],\n    ['2023-01-17', '18:10', '19:35'],\n    ['2023-01-17', '20:10', '22:15'],\n    ['2023-01-17', '22:35', '23:45'],\n    ['2023-01-18', '09:15', '11:25'],\n];\n```\nBecause I've used string values for the dates and times, I'm going to use the Advanced Value Binder to populate the worksheet.\nThe Binder will also format the time values in columns B and C; but I want to override the Binder formatting for date values in column A; and I'm using an Excel formula for the \"start date\" value in cell D3, so I have to set the format manually for that.\n```php\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\n\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n// Use the Advanced Value Binder so that our string date/time values will be automatically converted\n//     to Excel serialized date/timestamps\n// Old method using static property\nCell::setValueBinder(new AdvancedValueBinder());\n// Preferred method using dynamic property since 3.4.0\n$spreadsheet->setValueBinder(new AdvancedValueBinder());\n\n// Write our data to the worksheet\n$worksheet->fromArray($projectHeading);\n$worksheet->fromArray($weekHeading, null, 'A3');\n\n// Let Excel calculate the duration for each timesheet entry\n$row = 4;\nforeach ($timesheetData as $timesheetEntry) {\n    ++$row;\n    $worksheet->fromArray($timesheetEntry, null, \"A{$row}\");\n    $worksheet->setCellValue(\"D{$row}\", \"=C{$row} - B{$row}\");\n}\n$totalRow = $row + 2;\n$worksheet->setCellValue(\"D{$totalRow}\", \"=SUM(D4:D{$row})\");\n$worksheet->setCellValue(\"E{$totalRow}\", 'Total Hours');\n```\nAnd then the final formatting:\n```php\n// Display values in column A as human-readable dates\n$worksheet->getStyle(\"A5:A{$row}\")->getNumberFormat()->setFormatCode('dd (ddd)');\n// Display values in column D as human-readable durations\n$worksheet->getStyle(\"D5:D{$totalRow}\")->getNumberFormat()->setFormatCode('[h]:mm');\n\n// Set some additional styling\n$worksheet->getStyle('D3')->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n$worksheet->getStyle('A1')->getFont()->setBold(true);\n$worksheet->getStyle('A3:D4')->getFont()->setBold(true);\n$worksheet->getStyle(\"A5:A{$row}\")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);\n$worksheet->getColumnDimension('D')->setAutoSize(true);\n$worksheet->getStyle(\"E{$totalRow}\")->getFont()->setBold(true);\n```\n\nAnd the resulting spreadsheet will look something like:\n![Timesheet.png](images/The Dating Game/Timesheet.png)\n\n## Final Notes\n\nMS Excel is not Timezone aware, nor does it have any logic for handling Daylight Savings.\n\nExcel functions like the NOW() function return the serialized timestamp of the current date and time. The date and time are provided by the operating system, and that determines, according to the time zone and date of the year if Daylight Saving Time is in effect. So functions like NOW() include any DST offset, because it is automatically included by the OS.\n"
  },
  {
    "path": "docs/topics/accessing-cells.md",
    "content": "# Accessing cells\n\nAccessing cells in a Spreadsheet should be pretty straightforward. This\ntopic lists some of the options to access a cell.\nFor all of these, the cell can be accessed by coordinate (e.g. `B3`),\nby an array of column index (where A is 1) and row (e.g. `[2, 3]`),\nor as a CellAddress object (e.g. `new CellAddress('B3', /* optional */ $worksheet)`.\n\n## Setting a cell value\n\nSetting a cell value can be done using the worksheet's\n`setCellValue()` method.\n\n```php\n// Set cell A1 with a string value\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'PhpSpreadsheet');\n\n// Set cell A2 with a numeric value\n$spreadsheet->getActiveSheet()->setCellValue([1, 2], 12345.6789);\n\n// Set cell A3 with a boolean value\n$spreadsheet->getActiveSheet()->setCellValue(new CellAddress('A3'), TRUE);\n\n// Set cell A4 with a formula\n$spreadsheet->getActiveSheet()->setCellValue(\n    'A4',\n    '=IF(A3, CONCATENATE(A1, \" \", A2), CONCATENATE(A2, \" \", A1))'\n);\n```\n\nAlternatively, you can retrieve the cell object, and then call the\ncell’s `setValue()` method:\n\n```php\n$spreadsheet->getActiveSheet()\n    ->getCell('B8')\n    ->setValue('Some value');\n```\n\n### Creating a new Cell\n\nIf you make a call to `getCell()`, and the cell doesn't already exist, then\nPhpSpreadsheet will create that cell for you.\n\n### Copying a Cell's Value And Style Adjusting Formulas\n\nIf cell A1 contains `5`, cell A2 contains `10`, and cell `B1` contains `=A1`, the formula in B1 will be evaluated as `5`. In Excel, if you copy B1 to B2, B2 will wind up with the adjusted formula `=A2` and will be evaluated as 10. Until release 5.1.0, PhpSpreadsheet requires the program to perform its own formula adjustment. In 5.1.0, a new method is introduced to handle formula adjustments:\n```php\n$worksheet->copyformula($fromCell, $toCell);\n```\nThis will behave as Excel does. If $fromCell does not contain a formula, its contents will be copied as-is.\n\nIf you also want to copy $fromCell's style, as Excel does, you can use the following (available in all supported releases):\n```php\n$worksheet->duplicateStyle($fromCell->getStyle(), $toCell);\n```\n\n### BEWARE: Cells and Styles assigned to variables as a Detached Reference\n\nAs an \"in-memory\" model, PHPSpreadsheet can be very demanding of memory,\nparticularly when working with large spreadsheets. One technique used to\nreduce this memory overhead is cell caching, so cells are actually\nmaintained in a collection that may or may not be held in memory while you\nare working with the spreadsheet. Because of this, a call to `getCell()`\n(or any similar method) returns the cell data, and sets a cell pointer to that cell in the collection.\nWhile this is not normally an issue, it can become significant\nif you assign the result of a call to `getCell()` to a variable. Any\nsubsequent calls to retrieve other cells will change that pointer, although\nthe cell object will still retain its data values.\nThis is also true when assigning a variable to the result of `getStyle()`.\n\nWhat does this mean? Consider the following code:\n\n```php\n$spreadSheet = new Spreadsheet();\n$workSheet = $spreadSheet->getActiveSheet();\n\n// Set details for the formula that we want to evaluate, together with any data on which it depends\n$workSheet->fromArray(\n    [1, 2, 3],\n    null,\n    'A1'\n);\n\n$cellC1 = $workSheet->getCell('C1');\necho 'Value: ', $cellC1->getValue(), '; Address: ', $cellC1->getCoordinate(), PHP_EOL;\n\n$cellA1 = $workSheet->getCell('A1');\necho 'Value: ', $cellA1->getValue(), '; Address: ', $cellA1->getCoordinate(), PHP_EOL;\n\necho 'Value: ', $cellC1->getValue(), '; Address: ', $cellC1->getCoordinate(), PHP_EOL;\n```\n\nThe call to `getCell('C1')` returns the cell at `C1` containing its value (`3`),\ntogether with its link to the collection (used to identify its\naddress/coordinate `C1`). The subsequent call to access cell `A1`\nmodifies the value of `$cellC1`, detaching its link to the collection.\n\nSo when we try to display the value and address a second time, we can display\nits value, but trying to display its address/coordinate will throw an\nexception because that link has been set to null.\n\n__Note:__ There are some internal methods that will fetch other cells from the\ncollection, and this too will detach the link to the collection from any cell\nthat you might have assigned to a variable.\n\n## Excel DataTypes\n\nMS Excel supports 7 basic datatypes:\n\n- string\n- number\n- boolean\n- null\n- formula\n- error\n- Inline (or rich text) string\n\nBy default, when you call the worksheet's `setCellValue()` method or the\ncell's `setValue()` method, PhpSpreadsheet will use the appropriate\ndatatype for PHP nulls, booleans, floats or integers; or cast any string\ndata value that you pass to the method into the most appropriate\ndatatype, so numeric strings will be cast to numbers, while string\nvalues beginning with `=` will be converted to a formula. Strings that\naren't numeric, or that don't begin with a leading `=` will be treated\nas genuine string values.\n\nNote that a numeric string that begins with a leading zero (that isn't\nimmediately followed by a decimal separator) will not be converted to a\nnumeric, so values like phone numbers (e.g. `01615991375``will remain as\nstrings).\n\nThis \"conversion\" is handled by a cell \"value binder\", and you can write\ncustom \"value binders\" to change the behaviour of these \"conversions\".\nThe standard PhpSpreadsheet package also provides an \"advanced value\nbinder\" that handles a number of more complex conversions, such as\nconverting strings with a fractional format like \"3/4\" to a number value\n(0.75 in this case) and setting an appropriate \"fraction\" number format\nmask. Similarly, strings like \"5%\" will be converted to a value of 0.05,\nand a percentage number format mask applied, and strings containing\nvalues that look like dates will be converted to Excel serialized\ndatetimestamp values, and a corresponding mask applied. This is\nparticularly useful when loading data from csv files, or setting cell\nvalues from a database.\n\nFormats handled by the advanced value binder include:\n\n- TRUE or FALSE (dependent on locale settings) are converted to booleans.\n- Numeric strings identified as scientific (exponential) format are\n  converted to numbers.\n- Fractions and vulgar fractions are converted to numbers, and\n  an appropriate number format mask applied.\n- Percentages are converted\n  to numbers, divided by 100, and an appropriate number format mask\n  applied.\n- Dates and times are converted to Excel timestamp values\n  (numbers), and an appropriate number format mask applied.\n- When strings contain a newline character (`\\n`), then the cell styling is\n  set to wrap.\n\nBasically, it attempts to mimic the behaviour of the MS Excel GUI.\n\nYou can read more about value binders [later in this section of the\ndocumentation](#using-value-binders-to-facilitate-data-entry).\n\n### Setting a formula in a Cell\n\nAs stated above, if you store a string value with the first character an `=`\nin a cell. PHPSpreadsheet will treat that value as a formula, and then you\ncan evaluate that formula by calling `getCalculatedValue()` against the cell.\n\nThere may be times though, when you wish to store a value beginning with `=`\nas a string, and that you don't want PHPSpreadsheet to evaluate as though it\nwas a formula.\n\nTo do this, you need to \"escape\" the value by setting it as \"quoted text\".\n\n```php\n// Set cell A4 with a formula\n$spreadsheet->getActiveSheet()->setCellValue(\n    'A4',\n    '=IF(A3, CONCATENATE(A1, \" \", A2), CONCATENATE(A2, \" \", A1))'\n);\n$spreadsheet->getActiveSheet()->getCell('A4')\n    ->getStyle()->setQuotePrefix(true);\n```\n\nThen, even if you ask PHPSpreadsheet to return the calculated value for cell\n`A4`, it will return `=IF(A3, CONCATENATE(A1, \" \", A2), CONCATENATE(A2, \" \", A1))`\nas a string, and not try to evaluate the formula.\n\n\n### Setting a date and/or time value in a cell\n\nDate or time values are held as timestamp in Excel (a simple floating\npoint value), and a number format mask is used to show how that value\nshould be formatted; so if we want to store a date in a cell, we need to\ncalculate the correct Excel timestamp, and set a number format mask.\n\n```php\n// Get the current date/time and convert to an Excel date/time\n$dateTimeNow = time();\n$excelDateValue = \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::PHPToExcel( $dateTimeNow );\n// Set cell A6 with the Excel date/time value\n$spreadsheet->getActiveSheet()->setCellValue(\n    'A6',\n    $excelDateValue\n);\n// Set the number format mask so that the excel timestamp will be displayed as a human-readable date/time\n$spreadsheet->getActiveSheet()->getStyle('A6')\n    ->getNumberFormat()\n    ->setFormatCode(\n        \\PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat::FORMAT_DATE_DATETIME\n    );\n```\n\n### Setting a number with leading zeroes\n\nBy default, PhpSpreadsheet will automatically detect the value type and\nset it to the appropriate Excel numeric datatype. This type conversion\nis handled by a value binder, as described in the section of this\ndocument entitled \"Using value binders to facilitate data entry\".\n\nNumbers don't have leading zeroes, so if you try to set a numeric value\nthat does have leading zeroes (such as a telephone number) then these\nwill be normally be lost as the value is cast to a number, so\n\"01513789642\" will be displayed as 1513789642.\n\nThere are two ways you can force PhpSpreadsheet to override this\nbehaviour.\n\nFirstly, you can set the datatype explicitly as a string so that it is\nnot converted to a number.\n\n```php\n// Set cell A8 with a numeric value, but tell PhpSpreadsheet it should be treated as a string\n$spreadsheet->getActiveSheet()->setCellValueExplicit(\n    'A8',\n    \"01513789642\",\n    \\PhpOffice\\PhpSpreadsheet\\Cell\\DataType::TYPE_STRING\n);\n```\n\nAlternatively, you can use a number format mask to display the value\nwith leading zeroes.\n\n```php\n// Set cell A9 with a numeric value\n$spreadsheet->getActiveSheet()->setCellValue('A9', 1513789642);\n// Set a number format mask to display the value as 11 digits with leading zeroes\n$spreadsheet->getActiveSheet()->getStyle('A9')\n    ->getNumberFormat()\n    ->setFormatCode(\n        '00000000000'\n    );\n```\n\nWith number format masking, you can even break up the digits into groups\nto make the value more easily readable.\n\n```php\n// Set cell A10 with a numeric value\n$spreadsheet->getActiveSheet()->setCellValue('A10', 1513789642);\n// Set a number format mask to display the value as 11 digits with leading zeroes\n$spreadsheet->getActiveSheet()->getStyle('A10')\n    ->getNumberFormat()\n    ->setFormatCode(\n        '0000-000-0000'\n    );\n```\n\n![07-simple-example-1.png](./images/07-simple-example-1.png)\n\n**Note:** that not all complex format masks such as this one will work\nwhen retrieving a formatted value to display \"on screen\", or for certain\nwriters such as HTML or PDF, but it will work with the true spreadsheet\nwriters (Xlsx and Xls).\n\n## Setting a range of cells from an array\n\nIt is also possible to set a range of cell values in a single call by\npassing an array of values to the `fromArray()` method.\n\n```php\n$arrayData = [\n    [NULL, 2010, 2011, 2012],\n    ['Q1',   12,   15,   21],\n    ['Q2',   56,   73,   86],\n    ['Q3',   52,   61,   69],\n    ['Q4',   30,   32,    0],\n];\n$spreadsheet->getActiveSheet()\n    ->fromArray(\n        $arrayData,  // The data to set\n        NULL,        // Array values with this value will not be set\n        'C3'         // Top left coordinate of the worksheet range where\n                     //    we want to set these values (default is A1)\n    );\n```\n\n![07-simple-example-2.png](./images/07-simple-example-2.png)\n\nIf you pass a 2-d array, then this will be treated as a series of rows\nand columns. A 1-d array will be treated as a single row, which is\nparticularly useful if you're fetching an array of data from a database.\n\n```php\n$rowArray = ['Value1', 'Value2', 'Value3', 'Value4'];\n$spreadsheet->getActiveSheet()\n    ->fromArray(\n        $rowArray,   // The data to set\n        NULL,        // Array values with this value will not be set\n        'C3'         // Top left coordinate of the worksheet range where\n                     //    we want to set these values (default is A1)\n    );\n```\n\n![07-simple-example-3.png](./images/07-simple-example-3.png)\n\nIf you have a simple 1-d array, and want to write it as a column, then\nthe following will convert it into an appropriately structured 2-d array\nthat can be fed to the `fromArray()` method:\n\n```php\n$rowArray = ['Value1', 'Value2', 'Value3', 'Value4'];\n$columnArray = array_chunk($rowArray, 1);\n$spreadsheet->getActiveSheet()\n    ->fromArray(\n        $columnArray,   // The data to set\n        NULL,           // Array values with this value will not be set\n        'C3'            // Top left coordinate of the worksheet range where\n                        //    we want to set these values (default is A1)\n    );\n```\n\n![07-simple-example-4.png](./images/07-simple-example-4.png)\n\n## Retrieving a cell value\n\nTo retrieve the value of a cell, the cell should first be retrieved from\nthe worksheet using the `getCell()` method. A cell's value can be read\nusing the `getValue()` method.\n\n```php\n// Get the value from cell A1\n$cellValue = $spreadsheet->getActiveSheet()->getCell('A1')->getValue();\n```\n\nThis will retrieve the raw, unformatted value contained in the cell.\n\nIf a cell contains a formula, and you need to retrieve the calculated\nvalue rather than the formula itself, then use the cell's\n`getCalculatedValue()` method. This is further explained in\n[the calculation engine](./calculation-engine.md).\n\n```php\n// Get the value from cell A4\n$cellValue = $spreadsheet->getActiveSheet()->getCell('A4')->getCalculatedValue();\n```\n\nAlternatively, if you want to see the value with any cell formatting\napplied (e.g. for a human-readable date or time value), then you can use\nthe cell's `getFormattedValue()` method.\n\n```php\n// Get the value from cell A6\n$cellValue = $spreadsheet->getActiveSheet()->getCell('A6')->getFormattedValue();\n```\n\n## Retrieving a range of cell values to an array\n\nIt is also possible to retrieve a range of cell values to an array in a\nsingle call using the `toArray()`, `rangeToArray()` or\n`namedRangeToArray()` methods.\n\n```php\n$dataArray = $spreadsheet->getActiveSheet()\n    ->rangeToArray(\n        'C3:E5',     // The worksheet range that we want to retrieve\n        NULL,        // Value that should be returned for empty cells\n        TRUE,        // Should formulas be calculated (the equivalent of getCalculatedValue() for each cell)\n        TRUE,        // Should values be formatted (the equivalent of getFormattedValue() for each cell)\n        TRUE         // Should the array be indexed by cell row and cell column\n    );\n```\n\nThese methods will all return a 2-d array of rows and columns. The\n`toArray()` method will return the whole worksheet; `rangeToArray()`\nwill return a specified range or cells; while `namedRangeToArray()` will\nreturn the cells within a defined `named range`.\n\n## Looping through cells\n\n### Looping through cells using iterators\n\nThe easiest way to loop cells is by using iterators. Using iterators,\none can use foreach to loop worksheets, rows within a worksheet, and\ncells within a row.\n\nBelow is an example where we read all the values in a worksheet and\ndisplay them in a table.\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader('Xlsx');\n$reader->setReadDataOnly(TRUE);\n$spreadsheet = $reader->load(\"test.xlsx\");\n\n$worksheet = $spreadsheet->getActiveSheet();\n\necho '<table>' . PHP_EOL;\nforeach ($worksheet->getRowIterator() as $row) {\n    echo '<tr>' . PHP_EOL;\n    $cellIterator = $row->getCellIterator();\n    $cellIterator->setIterateOnlyExistingCells(FALSE); // This loops through all cells,\n                                                       //    even if a cell value is not set.\n                                                       // For 'TRUE', we loop through cells\n                                                       //    only when their value is set.\n                                                       // If this method is not called,\n                                                       //    the default value is 'false'.\n    foreach ($cellIterator as $cell) {\n        echo '<td>' .\n             $cell->getValue() .\n             '</td>' . PHP_EOL;\n    }\n    echo '</tr>' . PHP_EOL;\n}\necho '</table>' . PHP_EOL;\n```\n\nNote that we have set the cell iterator's `setIterateOnlyExistingCells()`\nto FALSE. This makes the iterator loop all cells within the worksheet\nrange, even if they have not been set.\n\nThe cell iterator will create a new empty cell in the worksheet if it\ndoesn't exist; return a `null` as the cell value if it is not set in\nthe worksheet; although we can also tell it to return a null value\nrather than returning a new empty cell.\nSetting the cell iterator's `setIterateOnlyExistingCells()` to `false`\nwill loop all cells in the worksheet that can be available at that\nmoment. If this is then set to create new cells if required, then it\nwill likely increase memory usage!\nOnly use it if it is intended to loop all cells that are possibly\navailable; otherwise use the option to return a null value if a cell\ndoesn't exist, or iterate only the cells that already exist.\n\nIt is also possible to call the Row object's `isEmpty()` method to\ndetermine whether you need to instantiate the Cell Iterator for that\nRow.\n\n### Looping through cells using indexes\n\nOne can use the possibility to access cell values by column and row\nindex like `[1, 1]` instead of `'A1'` for reading and writing cell values in\nloops.\n\n**Note:** In PhpSpreadsheet column index and row index are 1-based. That means `'A1'` ~ `[1, 1]`\n\nBelow is an example where we read all the values in a worksheet and\ndisplay them in a table.\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader('Xlsx');\n$reader->setReadDataOnly(TRUE);\n$spreadsheet = $reader->load(\"test.xlsx\");\n\n$worksheet = $spreadsheet->getActiveSheet();\n// Get the highest row and column numbers referenced in the worksheet\n$highestRow = $worksheet->getHighestDataRow(); // e.g. 10\n$highestColumn = $worksheet->getHighestDataColumn(); // e.g 'F'\n$highestColumnIndex = \\PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate::columnIndexFromString($highestColumn); // e.g. 5\n\necho '<table>' . \"\\n\";\nfor ($row = 1; $row <= $highestRow; ++$row) {\n    echo '<tr>' . PHP_EOL;\n    // Use StringHelper::stringIncrement($col) rather than ++$col if using Php8.5+.\n    for ($col = 1; $col <= $highestColumnIndex; ++$col) {\n        $value = $worksheet->getCell([$col, $row])->getValue();\n        echo '<td>' . $value . '</td>' . PHP_EOL;\n    }\n    echo '</tr>' . PHP_EOL;\n}\necho '</table>' . PHP_EOL;\n```\n\nAlternatively, you can take advantage of PHP's \"Perl-style\" character\nincrementors to loop through the cells by coordinate:\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader('Xlsx');\n$reader->setReadDataOnly(TRUE);\n$spreadsheet = $reader->load(\"test.xlsx\");\n\n$worksheet = $spreadsheet->getActiveSheet();\n// Get the highest row number and column letter referenced in the worksheet\n$highestRow = $worksheet->getHighestDataRow(); // e.g. 10\n$highestColumn = $worksheet->getHighestDataColumn(); // e.g 'F'\n// Increment the highest column letter\n++$highestColumn; // StringHelper::stringIncrement($highestColumn); if using Php8.5+.\n\necho '<table>' . \"\\n\";\nfor ($row = 1; $row <= $highestRow; ++$row) {\n    echo '<tr>' . PHP_EOL;\n    // Use StringHelper::stringIncrement($col) rather than ++$col if using Php8.5+.\n    for ($col = 'A'; $col != $highestColumn; ++$col) {\n        echo '<td>' .\n             $worksheet->getCell($col . $row)\n                 ->getValue() .\n             '</td>' . PHP_EOL;\n    }\n    echo '</tr>' . PHP_EOL;\n}\necho '</table>' . PHP_EOL;\n```\n\nNote that we can't use a `<=` comparison here, because `'AA'` would match\nas `<= 'B'`, so we increment the highest column letter and then loop\nwhile `$col !=` the incremented highest column.\n\n## Using value binders to facilitate data entry\n\nInternally, PhpSpreadsheet uses a default\n`\\PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder` implementation\n(\\PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder) to determine data\ntypes of entered data using a cell's `setValue()` method (the\n`setValueExplicit()` method bypasses this check).\n\nOptionally, the default behaviour of PhpSpreadsheet can be modified,\nallowing easier data entry. For example, a\n`\\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder` class is available.\nIt automatically converts percentages, numbers in scientific format, and\ndates entered as strings to the correct format, also setting the cell's\nstyle information. The following example demonstrates how to set the\nvalue binder in PhpSpreadsheet:\n\n```php\n// Older method using static property\n\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::setValueBinder( new \\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder() );\n// Create new Spreadsheet object\n$spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n\n// Preferred method using dynamic property since 3.4.0\n$spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n$spreadsheet->setValueBinder( new \\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder() );\n\n// ...\n// Add some data, resembling some different data types\n$spreadsheet->getActiveSheet()->setCellValue('A4', 'Percentage value:');\n// Converts the string value to 0.1 and sets percentage cell style\n$spreadsheet->getActiveSheet()->setCellValue('B4', '10%');\n\n$spreadsheet->getActiveSheet()->setCellValue('A5', 'Date/time value:');\n// Converts the string value to an Excel datestamp and sets the date format cell style\n$spreadsheet->getActiveSheet()->setCellValue('B5', '21 December 1983');\n```\n\nAlternatively, a `\\PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder` class is available\nif you want to preserve all content as strings. This might be appropriate if you\nwere loading a file containing values that could be interpreted as numbers (e.g. numbers\nwith leading sign such as international phone numbers like `+441615579382`), but that\nshould be retained as strings (non-international phone numbers with leading zeroes are\nalready maintained as strings).\n\nBy default, the StringValueBinder will cast any datatype passed to it into a string. However, there are a number of settings which allow you to specify that certain datatypes shouldn't be cast to strings, but left \"as is\":\n\n```php\n// Set value binder\n$stringValueBinder = new \\PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder();\n$stringValueBinder->setNumericConversion(false)\n    ->setSetIgnoredErrors(true) // suppresses \"number stored as text\" indicators\n    ->setBooleanConversion(false)\n    ->setNullConversion(false)\n    ->setFormulaConversion(false);\n// Older method using static property\n\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::setValueBinder( $stringValueBinder );\n// Preferred method using dynamic property since 3.4.0\n$spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n$spreadsheet->setValueBinder( $stringValueBinder );\n```\n\nYou can override the current binder when setting individual cell values by specifying a different Binder to use in the Cell's `setValue()` or the Worksheet's `setCellValue()` methods.\n```php\n$spreadsheet = new Spreadsheet();\n// Old method using static property\nCell::setValueBinder(new AdvancedValueBinder());\n// Preferred method using dynamic property since 3.4.0\n$spreadsheet->setValueBinder(new AdvancedValueBinder());\n\n$value = '12.5%';\n\n$cell = $spreadsheet->getActiveSheet()->getCell('A1');\n// Value will be set as a number 0.125 with a format mask '0.00%'\n$cell->setValue($value); // Using the Advanced Value Binder\n\n$cell = $spreadsheet->getActiveSheet()->getCell('A2');\n// Value will be set as a string '12.5%' with a format mask 'General'\n$cell->setValue($value, new StringValueBinder()); // Overriding the Advanced Value Binder\n```\n\n\n### Creating your own value binder\n\nCreating your own value binder is relatively straightforward. When more specialised\nvalue binding is required, you can implement the\n`\\PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder` interface or extend the existing\n`\\PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder` or\n`\\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder` classes.\n"
  },
  {
    "path": "docs/topics/architecture.md",
    "content": "# Architecture\n\n## Schematical\n\n![01-schematic.png](./images/01-schematic.png \"Basic Architecture Schematic\")\n\n## AutoLoader\n\nPhpSpreadsheet relies on Composer autoloader. So before working with\nPhpSpreadsheet in standalone, be sure to run `composer install`. Or add it to a\npre-existing project with `composer require phpoffice/phpspreadsheet`.\n\n## Spreadsheet in memory\n\nPhpSpreadsheet's architecture is built in a way that it can serve as an\nin-memory spreadsheet. This means that, if one would want to create a\nweb based view of a spreadsheet which communicates with PhpSpreadsheet's\nobject model, he would only have to write the front-end code.\n\nJust like desktop spreadsheet software, PhpSpreadsheet represents a\nspreadsheet containing one or more worksheets, which contain cells with\ndata, formulas, images, ...\n\n## Readers and writers\n\nOn its own, the `Spreadsheet` class does not provide the functionality\nto read from or write to a persisted spreadsheet (on disk or in a\ndatabase). To provide that functionality, readers and writers can be\nused.\n\nBy default, the PhpSpreadsheet package provides some readers and\nwriters, including one for the Open XML spreadsheet format (a.k.a. Excel\n2007 file format). You are not limited to the default readers and\nwriters, as you are free to implement the\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader` and\n`\\PhpOffice\\PhpSpreadsheet\\Writer\\IWriter` interface in a custom class.\n\n![02-readers-writers.png](./images/02-readers-writers.png \"Readers/Writers\")\n\n## Fluent interfaces\n\nPhpSpreadsheet supports fluent interfaces in most locations. This means\nthat you can easily \"chain\" calls to specific methods without requiring\na new PHP statement. For example, take the following code:\n\n```php\n$spreadsheet->getProperties()->setCreator(\"Maarten Balliauw\");\n$spreadsheet->getProperties()->setLastModifiedBy(\"Maarten Balliauw\");\n$spreadsheet->getProperties()->setTitle(\"Office 2007 XLSX Test Document\");\n$spreadsheet->getProperties()->setSubject(\"Office 2007 XLSX Test Document\");\n$spreadsheet->getProperties()->setDescription(\"Test document for Office 2007 XLSX, generated using PHP classes.\");\n$spreadsheet->getProperties()->setKeywords(\"office 2007 openxml php\");\n$spreadsheet->getProperties()->setCategory(\"Test result file\");\n```\n\nThis can be rewritten as:\n\n```php\n$spreadsheet->getProperties()\n    ->setCreator(\"Maarten Balliauw\")\n    ->setLastModifiedBy(\"Maarten Balliauw\")\n    ->setTitle(\"Office 2007 XLSX Test Document\")\n    ->setSubject(\"Office 2007 XLSX Test Document\")\n    ->setDescription(\"Test document for Office 2007 XLSX, generated using PHP classes.\")\n    ->setKeywords(\"office 2007 openxml php\")\n    ->setCategory(\"Test result file\");\n```\n\n> **Using fluent interfaces is not required** Fluent interfaces have\n> been implemented to provide a convenient programming API. Use of them\n> is not required, but can make your code easier to read and maintain.\n> It can also improve performance, as you are reducing the overall\n> number of calls to PhpSpreadsheet methods: in the above example, the\n> `getProperties()` method is being called only once rather than 7 times\n> in the non-fluent version.\n"
  },
  {
    "path": "docs/topics/autofilters.md",
    "content": "# AutoFilter Reference\n\n## Introduction\n\nEach worksheet in an Excel Workbook can contain a single autoFilter\nrange. Filtered data displays only the rows that meet criteria that you\nspecify and hides rows that you do not want displayed. You can filter by\nmore than one column: filters are additive, which means that each\nadditional filter is based on the current filter and further reduces the\nsubset of data.\n\n![01-01-autofilter.png](./images/01-01-autofilter.png)\n\nWhen an AutoFilter is applied to a range of cells, the first row in an\nautofilter range will be the heading row, which displays the autoFilter\ndropdown icons. It is not part of the actual autoFiltered data. All\nsubsequent rows are the autoFiltered data. So an AutoFilter range should\nalways contain the heading row and one or more data rows (one data row\nis pretty meaningless), but PhpSpreadsheet won't actually stop you\nspecifying a meaningless range: it's up to you as a developer to avoid\nsuch errors.\n\nTo determine if a filter is applied, note the icon in the column\nheading. A drop-down arrow\n(![01-03-filter-icon-1.png](./images/01-03-filter-icon-1.png)) means\nthat filtering is enabled but not applied. In MS Excel, when you hover\nover the heading of a column with filtering enabled but not applied, a\nscreen tip displays the cell text for the first row in that column, and\nthe message \"(Showing All)\".\n\n![01-02-autofilter.png](./images/01-02-autofilter.png)\n\nA Filter button\n(![01-03-filter-icon-2.png](./images/01-03-filter-icon-2.png)) means\nthat a filter is applied. When you hover over the heading of a filtered\ncolumn, a screen tip displays the filter that has been applied to that\ncolumn, such as \"Equals a red cell color\" or \"Larger than 150\".\n\n![01-04-autofilter.png](./images/01-04-autofilter.png)\n\n## Setting an AutoFilter area on a worksheet\n\nTo set an autoFilter on a range of cells.\n\n```php\n$spreadsheet->getActiveSheet()->setAutoFilter('A1:E20');\n```\n\nThe first row in an autofilter range will be the heading row, which\ndisplays the autoFilter dropdown icons. It is not part of the actual\nautoFiltered data. All subsequent rows are the autoFiltered data. So an\nAutoFilter range should always contain the heading row and one or more\ndata rows (one data row is pretty meaningless, but PhpSpreadsheet won't\nactually stop you specifying a meaningless range: it's up to you as a\ndeveloper to avoid such errors.\n\nIf you want to set the whole worksheet as an autofilter region\n\n```php\n$spreadsheet->getActiveSheet()->setAutoFilter(\n    $spreadsheet->getActiveSheet()\n        ->calculateWorksheetDimension()\n);\n```\n\nThis enables filtering, but does not actually apply any filters.\n\nAfter setting the range, you can change it so that the end row is the\nlast row used on the worksheet:\n\n```php\n$spreadsheet->getActiveSheet()->getAutoFilter()->setRangeToMaxRow();\n```\n\n## Autofilter Expressions\n\nPHPEXcel 1.7.8 introduced the ability to actually create, read and write\nfilter expressions; initially only for Xlsx files, but later releases\nwill extend this to other formats.\n\nTo apply a filter expression to an autoFilter range, you first need to\nidentify which column you're going to be applying this filter to.\n\n```php\n$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();\n$columnFilter = $autoFilter->getColumn('C');\n```\n\nThis returns an autoFilter column object, and you can then apply filter\nexpressions to that column.\n\nThere are a number of different types of autofilter expressions. The\nmost commonly used are:\n\n-   Simple Filters\n-   DateGroup Filters\n-   Custom filters\n-   Dynamic Filters\n-   Top Ten Filters\n\nThese different types are mutually exclusive within any single column.\nYou should not mix the different types of filter in the same column.\nPhpSpreadsheet will not actively prevent you from doing this, but the\nresults are unpredictable.\n\nOther filter expression types (such as cell colour filters) are not yet\nsupported.\n\nString comparisons in filters are case-insensitive.\n\n### Simple filters\n\nIn MS Excel, Simple Filters are a dropdown list of all values used in\nthat column, and the user can select which ones they want to display and\nwhich ones they want to hide by ticking and unticking the checkboxes\nalongside each option. When the filter is applied, rows containing the\nchecked entries will be displayed, rows that don't contain those values\nwill be hidden.\n\n![04-01-simple-autofilter.png](./images/04-01-simple-autofilter.png)\n\nTo create a filter expression, we need to start by identifying the\nfilter type. In this case, we're just going to specify that this filter\nis a standard filter.\n*Please note that Excel regards only tests for equal as a standard filter;\nall others, including tests for not equal, must be supplied as custom filters.*\n\n```php\n$columnFilter->setFilterType(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column::AUTOFILTER_FILTERTYPE_FILTER\n);\n```\n\nNow we've identified the filter type, we can create a filter rule and\nset the filter values:\n\nWhen creating a simple filter in PhpSpreadsheet, you only need to\nspecify the values for \"checked\" columns: you do this by creating a\nfilter rule for each value.\n\n```php\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n        'France'\n    );\n\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n        'Germany'\n    );\n```\n\nThis creates two filter rules: the column will be filtered by values\nthat match \"France\" OR \"Germany\". For Simple Filters, you can create as\nmany rules as you want\n\nSimple filters are always a comparison match of EQUALS, and multiple\nstandard filters are always treated as being joined by an OR condition.\n\n#### Matching Blanks\n\nIf you want to create a filter to select blank cells, you would use:\n\n```php\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n        ''\n    );\n```\n\n### DateGroup Filters\n\nIn MS Excel, DateGroup filters provide a series of dropdown filter\nselectors for date values, so you can specify entire years, or months\nwithin a year, or individual days within each month.\nNote that cells covered by such a filter are expected to be in [Excel DateTime Format](./calculation-engine.md#excel-timestamps).\n\n![04-02-dategroup-autofilter.png](./images/04-02-dategroup-autofilter.png)\n\nDateGroup filters are still applied as a Standard Filter type.\n\n```php\n$columnFilter->setFilterType(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column::AUTOFILTER_FILTERTYPE_FILTER\n);\n```\n\nCreating a dateGroup filter in PhpSpreadsheet, you specify the values\nfor \"checked\" columns as an associative array of year. month, day, hour\nminute and second. To select a year and month, you need to create a\nDateGroup rule identifying the selected year and month:\n\n```php\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n        [\n            'year' => 2012,\n            'month' => 1\n        ]\n    )\n    ->setRuleType(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_DATEGROUP\n    );\n```\n\nThe key values for the associative array are:\n\n-   year\n-   month\n-   day\n-   hour\n-   minute\n-   second\n\nLike Standard filters, DateGroup filters are always a match of EQUALS,\nand multiple standard filters are always treated as being joined by an\nOR condition.\n\nNote that we alse specify a ruleType: to differentiate this from a\nstandard filter, we explicitly set the Rule's Type to\nAUTOFILTER\\_RULETYPE\\_DATEGROUP. As with standard filters, we can create\nany number of DateGroup Filters.\n\n### Custom filters\n\nIn MS Excel, Custom filters allow us to select more complex conditions\nusing an operator as well as a value. Typical examples might be values\nthat fall within a range (e.g. between -20 and +20), or text values with\nwildcards (e.g. beginning with the letter U). To handle this, they\n\n![04-03-custom-autofilter-1.png](./images/04-03-custom-autofilter-1.png)\n\n![04-03-custom-autofilter-2.png](./images/04-03-custom-autofilter-2.png)\n\nCustom filters are limited to 2 rules, and these can be joined using\neither an AND or an OR.\n\nWe start by specifying a Filter type, this time a CUSTOMFILTER.\n\n```php\n$columnFilter->setFilterType(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER\n);\n```\n\nAnd then define our rules.\n\nThe following shows a simple wildcard filter to show all column entries\nbeginning with the letter `U`.\n\n```php\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n        'U*'\n    )\n    ->setRuleType(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER\n    );\n```\n\nMS Excel uses `*` as a wildcard to match any number of characters, and `?`\nas a wildcard to match a single character. `U*` equates to \"begins with\na 'U'\"; `*U` equates to \"ends with a 'U'\"; and `*U*` equates to\n\"contains a 'U'\".\nNote that PhpSpreadsheet recognizes wildcards only for equal/not-equal tests.\n\nIf you want to match explicitly against `*` or `?`, you can\nescape it with a tilde `~`, so `?~**` would explicitly match for `*`\nas the second character in the cell value, followed by any\nnumber of other characters. The only other character that needs escaping\nis the `~` itself.\n\nTo create a \"between\" condition, we need to define two rules:\n\n```php\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL,\n        -20\n    )\n    ->setRuleType(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER\n    );\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL,\n        20\n    )\n    ->setRuleType(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER\n    );\n```\n\nWe also set the rule type to CUSTOMFILTER.\n\nThis defined two rules, filtering numbers that are `>= -20` OR `<=\n20`, so we also need to modify the join condition to reflect AND rather\nthan OR.\n\n```php\n$columnFilter->setJoin(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column::AUTOFILTER_COLUMN_JOIN_AND\n);\n```\n\nThe valid set of operators for Custom Filters are defined in the\n`\\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule` class, and\ncomprise:\n\nOperator Constant                         | Value\n------------------------------------------|----------------------\nAUTOFILTER_COLUMN_RULE_EQUAL              | 'equal'\nAUTOFILTER_COLUMN_RULE_NOTEQUAL           | 'notEqual'\nAUTOFILTER_COLUMN_RULE_GREATERTHAN        | 'greaterThan'\nAUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL | 'greaterThanOrEqual'\nAUTOFILTER_COLUMN_RULE_LESSTHAN           | 'lessThan'\nAUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL    | 'lessThanOrEqual'\n\n### Dynamic Filters\n\nDynamic Filters are based on a dynamic comparison condition, where the\nvalue we're comparing against the cell values is variable, such as\n'today'; or when we're testing against an aggregate of the cell data\n(e.g. 'aboveAverage'). Only a single dynamic filter can be applied to a\ncolumn at a time.\n\n![04-04-dynamic-autofilter.png](./images/04-04-dynamic-autofilter.png)\n\nAgain, we start by specifying a Filter type, this time a DYNAMICFILTER.\n\n```php\n$columnFilter->setFilterType(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER\n);\n```\n\nWhen defining the rule for a dynamic filter, we don't define a value (we\ncan simply set that to null string) but we do specify the dynamic filter\ncategory.\n\n```php\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n        '',\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE\n    )\n    ->setRuleType(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER\n    );\n```\n\nWe also set the rule type to DYNAMICFILTER.\n\nThe valid set of dynamic filter categories is defined in the\n`\\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule` class, and\ncomprises:\n\nOperator Constant                        | Value\n-----------------------------------------|----------------\nAUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY    | 'yesterday'\nAUTOFILTER_RULETYPE_DYNAMIC_TODAY        | 'today'\nAUTOFILTER_RULETYPE_DYNAMIC_TOMORROW     | 'tomorrow'\nAUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE   | 'yearToDate'\nAUTOFILTER_RULETYPE_DYNAMIC_THISYEAR     | 'thisYear'\nAUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER  | 'thisQuarter'\nAUTOFILTER_RULETYPE_DYNAMIC_THISMONTH    | 'thisMonth'\nAUTOFILTER_RULETYPE_DYNAMIC_THISWEEK     | 'thisWeek'\nAUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR     | 'lastYear'\nAUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER  | 'lastQuarter'\nAUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH    | 'lastMonth'\nAUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK     | 'lastWeek'\nAUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR     | 'nextYear'\nAUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER  | 'nextQuarter'\nAUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH    | 'nextMonth'\nAUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK     | 'nextWeek'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_1      | 'M1'\nAUTOFILTER_RULETYPE_DYNAMIC_JANUARY      | 'M1'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_2      | 'M2'\nAUTOFILTER_RULETYPE_DYNAMIC_FEBRUARY     | 'M2'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_3      | 'M3'\nAUTOFILTER_RULETYPE_DYNAMIC_MARCH        | 'M3'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_4      | 'M4'\nAUTOFILTER_RULETYPE_DYNAMIC_APRIL        | 'M4'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_5      | 'M5'\nAUTOFILTER_RULETYPE_DYNAMIC_MAY          | 'M5'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_6      | 'M6'\nAUTOFILTER_RULETYPE_DYNAMIC_JUNE         | 'M6'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_7      | 'M7'\nAUTOFILTER_RULETYPE_DYNAMIC_JULY         | 'M7'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_8      | 'M8'\nAUTOFILTER_RULETYPE_DYNAMIC_AUGUST       | 'M8'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_9      | 'M9'\nAUTOFILTER_RULETYPE_DYNAMIC_SEPTEMBER    | 'M9'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_10     | 'M10'\nAUTOFILTER_RULETYPE_DYNAMIC_OCTOBER      | 'M10'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_11     | 'M11'\nAUTOFILTER_RULETYPE_DYNAMIC_NOVEMBER     | 'M11'\nAUTOFILTER_RULETYPE_DYNAMIC_MONTH_12     | 'M12'\nAUTOFILTER_RULETYPE_DYNAMIC_DECEMBER     | 'M12'\nAUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1    | 'Q1'\nAUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2    | 'Q2'\nAUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3    | 'Q3'\nAUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4    | 'Q4'\nAUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE | 'aboveAverage'\nAUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE | 'belowAverage'\n\nWe can only apply a single Dynamic Filter rule to a column at a time.\n\n### Top Ten Filters\n\nTop Ten Filters are similar to Dynamic Filters in that they are based on\na summarisation of the actual data values in the cells. However, unlike\nDynamic Filters where you can only select a single option, Top Ten\nFilters allow you to select based on a number of criteria:\n\n![04-05-custom-topten-1.png](./images/04-05-topten-autofilter-1.png)\n\n![04-05-custom-topten-2.png](./images/04-05-topten-autofilter-2.png)\n\nYou can identify whether you want the top (highest) or bottom (lowest)\nvalues.You can identify how many values you wish to select in the\nfilterYou can identify whether this should be a percentage or a number\nof items.\n\nLike Dynamic Filters, only a single Top Ten filter can be applied to a\ncolumn at a time.\n\nWe start by specifying a Filter type, this time a DYNAMICFILTER.\n\n```php\n$columnFilter->setFilterType(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER\n);\n```\n\nThen we create the rule:\n\n```php\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT,\n        5,\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP\n    )\n    ->setRuleType(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_TOPTENFILTER\n    );\n```\n\nThis will filter the Top 5 percent of values in the column.\n\nTo specify the lowest (bottom 2 values), we would specify a rule of:\n\n```php\n$columnFilter->createRule()\n    ->setRule(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE,\n        5,\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM\n    )\n    ->setRuleType(\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_TOPTENFILTER\n    );\n```\n\nThe option values for TopTen Filters top/bottom value/percent are all\ndefined in the\n`\\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule` class, and\ncomprise:\n\nOperator Constant                      | Value\n---------------------------------------|-------------\nAUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE | 'byValue'\nAUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT  | 'byPercent'\n\nand\n\nOperator Constant                    | Value\n-------------------------------------|----------\nAUTOFILTER_COLUMN_RULE_TOPTEN_TOP    | 'top'\nAUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM | 'bottom'\n\n## Executing an AutoFilter\n\nWhen an autofilter is applied in MS Excel, it sets the row\nhidden/visible flags for each row of the autofilter area based on the\nselected criteria, so that only those rows that match the filter\ncriteria are displayed.\n\nPhpSpreadsheet will not execute the equivalent function automatically\nwhen you set or change a filter expression, but only when the file is\nsaved.\n\n### Applying the Filter\n\nIf you wish to execute your filter from within a script, you need to do\nthis manually. You can do this using the autofilters `showHideRows()`\nmethod.\n\n```php\n$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();\n$autoFilter->showHideRows();\n```\n\nThis will set all rows that match the filter criteria to visible, while\nhiding all other rows within the autofilter area.\n\nExcel allows you to explicitly hide a row after applying a filter even\nif the row wasn't hidden by the filter. However, if a row is hidden *before*\napplying the filter, and the filter is applied, the row will no longer be hidden.\nThis can make a difference during PhpSpreadsheet save, since PhpSpreadsheet\nwill apply the filter during save if it hasn't been previously applied,\nor if the filter criteria have changed since it was last applied.\nNote that an autofilter read in from an existing spreadsheet is assumed to have been applied.\nAlso note that changing the data in the columns being filtered\ndoes not result in reevaluation in either Excel or PhpSpreadsheet.\nIf you wish to re-apply all filters in the spreadsheet\n(possibly just before save):\n```php\n$spreadsheet->reevaluateAutoFilters(false);\n```\nYou can specify `true` rather than `false` to adjust the filter ranges\non each sheet so that they end at the last row used on the sheet.\n\n### Displaying Filtered Rows\n\nSimply looping through the rows in an autofilter area will still access\nevery row, whether it matches the filter criteria or not. To selectively\naccess only the filtered rows, you need to test each row’s visibility\nsettings.\n\n```php\nforeach ($spreadsheet->getActiveSheet()->getRowIterator() as $row) {\n    if ($spreadsheet->getActiveSheet()\n        ->getRowDimension($row->getRowIndex())->getVisible()) {\n        echo '    Row number - ' , $row->getRowIndex() , ' ';\n        echo $spreadsheet->getActiveSheet()\n            ->getCell(\n                'C'.$row->getRowIndex()\n            )\n            ->getValue(), ' ';\n        echo $spreadsheet->getActiveSheet()\n            ->getCell(\n                'D'.$row->getRowIndex()\n            )->getFormattedValue(), ' ';\n        echo PHP_EOL;\n    }\n}\n```\n\n## AutoFilter Sorting\n\nIn MS Excel, Autofiltering also allows the rows to be sorted. This\nfeature is ***not*** supported by PhpSpreadsheet.\n"
  },
  {
    "path": "docs/topics/calculation-engine.md",
    "content": "# Calculation Engine\n\n## Using the PhpSpreadsheet calculation engine\n\n### Performing formula calculations\n\nAs PhpSpreadsheet represents an in-memory spreadsheet, it also offers\nformula calculation capabilities. A cell can be of a value type\n(containing a number or text), or a formula type (containing a formula\nwhich can be evaluated). For example, the formula `=SUM(A1:A10)`\nevaluates to the sum of values in A1, A2, ..., A10.\n\nCalling `getValue()` on a cell that contains a formula will return the formula itself.\n\nTo calculate a formula, you can call the cell containing the formula’s\nmethod `getCalculatedValue()`, for example:\n\n```php\n$spreadsheet->getActiveSheet()->getCell('E11')->getCalculatedValue();\n```\n\nIf you write the following line of code in the invoice demo included\nwith PhpSpreadsheet, it evaluates to the value \"64\":\n\n![09-command-line-calculation.png](./images/09-command-line-calculation.png)\n\nCalling `getCalculatedValue()` on a cell that doesn't contain a formula will simply return the value of that cell; but if the cell does contain a formula, then PhpSpreadsheet will evaluate that formula to calculate the result.\n\nThere are a few useful mehods to help identify whether a cell contains a formula or a simple value; and if a formula, to provide further information about it:\n\n```php\n$spreadsheet->getActiveSheet()->getCell('E11')->isFormula();\n```\nwill return a boolean true/false, telling you whether that cell contains a formula or not, so you can determine if a call to `getCalculatedVaue()` will need to perform an evaluation. \n\nFor more details on working with array formulas, see the [the recipes documentationn](./recipes.md/#array-formulas). \n\nWhen writing a formula to a cell, formulas should always be set as they would appear in an English version of Microsoft Office Excel, and PhpSpreadsheet handles all formulas internally in this format. This means that the following rules hold:\n\n - Decimal separator is `.` (period)\n - Function argument separator is `,` (comma)\n - Matrix row separator is `;` (semicolon)\n - English function names must be used\n\nAnother nice feature of PhpSpreadsheet's formula parser, is that it can\nautomatically adjust a formula when inserting/removing rows/columns.\nHere's an example:\n\n![09-formula-in-cell-1.png](./images/09-formula-in-cell-1.png)\n\nYou see that the formula contained in cell E11 is \"SUM(E4:E9)\". Now,\nwhen I write the following line of code, two new product lines are\nadded:\n\n```php\n$spreadsheet->getActiveSheet()->insertNewRowBefore(7, 2);\n```\n\n![09-formula-in-cell-2.png](./images/09-formula-in-cell-2.png)\n\nDid you notice? The formula in the former cell E11 (now E13, as I\ninserted 2 new rows), changed to \"SUM(E4:E11)\". Also, the inserted cells\nduplicate style information of the previous cell, just like Excel's\nbehaviour. Note that you can both insert rows and columns.\n\nIf you want to \"anchor\" a specific cell for a formula, then you prefix the column and/or the row with a `$` symbol, exactly as you would in MS Excel itself.\nSo if a formula contains \"SUM(E$4:E9)\", and you insert 2 new rows after row 1, the formula will be adjusted to read \"SUM(E$4:E11)\", with the `$` fixing row 4 as the start of the range.\n\n\n\n## Calculation Cache\n\nOnce the Calculation engine has evaluated the formula in a cell, the result\nwill be cached, so if you call `getCalculatedValue()` a second time for the\nsame cell, the result will be returned from the cache rather than evaluating\nthe formula a second time. This helps boost performance, because evaluating\na formula is an expensive operation in terms of performance and speed.\n\nHowever, there may be times when you don't want this, perhaps you've changed\nthe underlying data and need to re-evaluate the same formula with that new\ndata.\n\n```php\nCalculation::getInstance($spreadsheet)->disableCalculationCache();\n```\n\nWill disable calculation caching, and flush the current calculation cache.\n\nIf you want only to flush the cache, then you can call\n\n```php\nCalculation::getInstance($spreadsheet)->clearCalculationCache();\n```\n\n## Known limitations\n\nThere are some known limitations to the PhpSpreadsheet calculation\nengine. Most of them are due to the fact that an Excel formula is\nconverted into PHP code before being executed. This means that Excel\nformula calculation is subject to PHP's language characteristics.\n\n### Function that are not Supported in Xls\n\nNot all functions are supported, for a comprehensive list, read the\n[function list by name](../references/function-list-by-name.md).\n\n#### Array arguments for Function Calls in Formulas\n\nWhile most of the Excel function implementations now support array arguments, there are a few that should accept arrays as arguments but don't do so.\nIn these cases, the result may be a single value rather than an array; or it may be a `#VALUE!` error.\n\n#### Operator precedence\n\nIn Excel `+` wins over `&`, just like `*` wins over `+` in ordinary\nalgebra. The former rule is not what one finds using the calculation\nengine shipped with PhpSpreadsheet.\n\n- [Reference for Excel](https://support.office.com/en-us/article/Calculation-operators-and-precedence-in-Excel-48be406d-4975-4d31-b2b8-7af9e0e2878a)\n- [Reference for PHP](https://php.net/manual/en/language.operators.php)\n\n#### Formulas involving numbers and text\n\nFormulas involving numbers and text may produce unexpected results or\neven unreadable file contents. For example, the formula `=3+\"Hello \"` is\nexpected to produce an error in Excel (\\#VALUE!). Due to the fact that\nPHP converts `\"Hello \"` to a numeric value (zero), the result of this\nformula is evaluated as 3 instead of evaluating as an error. This also\ncauses the Excel document being generated as containing unreadable\ncontent.\n\n- [Reference for this behaviour in PHP](https://php.net/manual/en/language.types.string.php#language.types.string.conversion)\n\n#### Formulas don’t seem to be calculated in Excel2003 using compatibility pack?\n\nThis is normal behaviour of the compatibility pack, Xlsx displays this\ncorrectly. Use `\\PhpOffice\\PhpSpreadsheet\\Writer\\Xls` if you really need\ncalculated values, or force recalculation in Excel2003.\n\n#### PAD (Precision As Displayed) Not Supported\n\nThere are no plans to support Precision As Displayed.\n\n## Handling Date and Time Values\n\n### Excel functions that return a Date and Time value\n\nAny of the Date and Time functions that return a date value in Excel can\nreturn either an Excel timestamp or a PHP timestamp or `DateTime` object.\n\nIt is possible for scripts to change the data type used for returning\ndate values by calling the\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType()`\nmethod:\n\n```php\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType($returnDateType);\n```\n\nwhere the following constants can be used for `$returnDateType`:\n\n- `\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_PHP_NUMERIC`\n- `\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_PHP_OBJECT`\n- `\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_EXCEL`\n\nThe method will return a Boolean True on success, False on failure (e.g.\nif an invalid value is passed in for the return date type).\n\nThe `\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType()`\nmethod can be used to determine the current value of this setting:\n\n```php\n$returnDateType = \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType();\n```\n\nThe default is `RETURNDATE_PHP_NUMERIC`.\n\n#### PHP Timestamps\n\nIf `RETURNDATE_PHP_NUMERIC` is set for the Return Date Type, then any\ndate value returned to the calling script by any access to the Date and\nTime functions in Excel will be an integer value that represents the\nnumber of seconds from the PHP/Unix base date. The PHP/Unix base date\n(0) is 00:00 UST on 1st January 1970. This value can be positive or\nnegative: so a value of -3600 would be 23:00 hrs on 31st December 1969;\nwhile a value of +3600 would be 01:00 hrs on 1st January 1970. This\ngives 32-bit PHP a date range of between 14th December 1901 and 19th January\n2038.\n\n#### PHP `DateTime` Objects\n\nIf the Return Date Type is set for `RETURNDATE_PHP_OBJECT`, then any\ndate value returned to the calling script by any access to the Date and\nTime functions in Excel will be a PHP `DateTime` object.\n\n#### Excel Timestamps\n\nExcel timestamps are stored as integer or floating point, where the integer portion represents the number of days since a base date,\nand the fraction portion represents the time of day (0 is midnight, 0.5 is noon, 0.999... is just before midnight the next day).\nThe Excel base date is determined by which calendar Excel\nuses: the Windows 1900 or the Mac 1904 calendar. 1st January 1900 is the\nbase date for the Windows 1900 calendar while 1st January 1904 is the\nbase date for the Mac 1904 calendar.\n\nIf `RETURNDATE_EXCEL` is set for the Return Date Type, then the returned\ndate value by any access to the Date and Time functions in Excel will be\na floating point value in Excel timestamp format (previous paragraph).\n\nIt is possible for scripts to change the calendar used for calculating\nExcel date values by calling:\n```php\n\\PhpOffice\\PhpSpreadsheet\\Shared\\Date::setExcelCalendar($baseDate); // static property, less preferred\n$spreadsheet->setExcelCalendar($baseDate); // instance property, preferred\n```\n\nwhere the following constants can be used for `$baseDate`:\n\n- `\\PhpOffice\\PhpSpreadsheet\\Shared\\Date::CALENDAR_WINDOWS_1900`\n- `\\PhpOffice\\PhpSpreadsheet\\Shared\\Date::CALENDAR_MAC_1904`\n\nThe method will return a Boolean True on success, False on failure (e.g.\nif an invalid value is passed in).\n\nThe current value of this setting can be determined via:\n```php\n$baseDate = \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::getExcelCalendar(); // static\n$baseDate = $spreadsheet->getExcelCalendar(); // instance\n```\n\nThe default is `CALENDAR_WINDOWS_1900`.\n\n#### Functions that return a Date/Time Value\n\n- DATE\n- DATEVALUE\n- EDATE\n- EOMONTH\n- NOW\n- TIME\n- TIMEVALUE\n- TODAY\n\n### Excel functions that accept Date and Time values as parameters\n\nDate values passed in as parameters to a function can be an Excel\ntimestamp or a PHP timestamp; or `DateTime` object; or a string containing a\ndate value (e.g. '1-Jan-2009'). PhpSpreadsheet will attempt to identify\ntheir type based on the PHP datatype:\n\nAn integer numeric value will be treated as a PHP/Unix timestamp. A real\n(floating point) numeric value will be treated as an Excel\ndate/timestamp. Any PHP `DateTime` object will be treated as a `DateTime`\nobject. Any string value (even one containing straight numeric data)\nwill be converted to a `DateTime` object for validation as a date value\nbased on the server locale settings, so passing through an ambiguous\nvalue of '07/08/2008' will be treated as 7th August 2008 if your server\nsettings are UK, but as 8th July 2008 if your server settings are US.\nHowever, if you pass through a value such as '31/12/2008' that would be\nconsidered an error by a US-based server, but which is not ambiguous,\nthen PhpSpreadsheet will attempt to correct this to 31st December 2008.\nIf the content of the string doesn’t match any of the formats recognised\nby the php `DateTime` object implementation of `strtotime()` (which can\nhandle a wider range of formats than the normal `strtotime()` function),\nthen the function will return a `#VALUE` error. However, Excel\nrecommends that you should always use date/timestamps for your date\nfunctions, and the recommendation for PhpSpreadsheet is the same: avoid\nstrings because the result is not predictable.\n\nThe same principle applies when data is being written to Excel. Cells\ncontaining date actual values (rather than Excel functions that return a\ndate value) are always written as Excel dates, converting where\nnecessary. If a cell formatted as a date contains an integer or\n`DateTime` object value, then it is converted to an Excel value for\nwriting: if a cell formatted as a date contains a real value, then no\nconversion is required. Note that string values are written as strings\nrather than converted to Excel date timestamp values.\n\n#### Functions that expect a Date/Time Value\n\n- DATEDIF\n- DAY\n- DAYS360\n- EDATE\n- EOMONTH\n- HOUR\n- MINUTE\n- MONTH\n- NETWORKDAYS\n- SECOND\n- WEEKDAY\n- WEEKNUM\n- WORKDAY\n- YEAR\n- YEARFRAC\n\n### Helper Methods\n\nIn addition to the `setExcelCalendar()` and `getExcelCalendar()` methods, a\nnumber of other methods are available in the\n`\\PhpOffice\\PhpSpreadsheet\\Shared\\Date` class that can help when working\nwith dates:\n\n#### \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::excelToTimestamp($excelDate)\n\nConverts a date/time from an Excel date timestamp to return a PHP\nserialized date/timestamp.\n\nNote that this method does not trap for Excel dates that fall outside of\nthe valid range for a PHP date timestamp.\n\n#### \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::excelToDateTimeObject($excelDate)\n\nConverts a date from an Excel date/timestamp to return a PHP `DateTime`\nobject.\n\n#### \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::PHPToExcel($PHPDate)\n\nConverts a PHP serialized date/timestamp or a PHP `DateTime` object to\nreturn an Excel date timestamp.\n\n#### \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::formattedPHPToExcel($year, $month, $day, $hours=0, $minutes=0, $seconds=0)\n\nTakes year, month and day values (and optional hour, minute and second\nvalues) and returns an Excel date timestamp value.\n\n### Timezone support for Excel date timestamp conversions\n\nThe default timezone for the date functions in PhpSpreadsheet is UST (Universal Standard Time).\nIf a different timezone needs to be used, these methods are available:\n\n#### \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::getDefaultTimezone()\n\nReturns the current timezone value PhpSpeadsheet is using to handle dates and times.\n\n#### \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::setDefaultTimezone($timeZone)\n\nSets the timezone for Excel date timestamp conversions to $timeZone,\nwhich must be a valid PHP DateTimeZone value.\nThe return value is a Boolean, where true is success,\nand false is failure (e.g. an invalid DateTimeZone value was passed.)\n\n#### \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::excelToDateTimeObject($excelDate, $timeZone)\n#### \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::excelToTimeStamp($excelDate, $timeZone)\n\nThese functions support a timezone as an optional second parameter.\nThis applies a specific timezone to that function call without affecting the default PhpSpreadsheet Timezone.\n\n### Calculating Value of Date/Time Read From Spreadsheet\n\nNothing special needs to be done to interpret Date/Time values entered directly into a spreadsheet. They will have been stored as numbers with an appropriate number format set for the cell. However, depending on their value, they may have been stored as either integer or float values. If that is a problem, you can force `getCalculatedValue` to return float rather than int depending on the number format used for the cell.\n\n```php\n// All fields with Date, Time, or DateTime styles returned as float.\n\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::setCalculateDateTimeType(\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::CALCULATE_DATE_TIME_FLOAT);\n// All fields with Time or DateTime styles returned as float.\n\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::setCalculateDateTimeType(\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::CALCULATE_TIME_FLOAT);\n// Default - fields with Date, Time, or DateTime styles returned as they had been stored.\n\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::setCalculateDateTimeType(\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::CALCULATE_DATE_TIME_ASIS);\n```\n\n## Function Reference\n\n### Database Functions\n\n#### DAVERAGE\n\nThe DAVERAGE function returns the average value of the cells in a column\nof a list or database that match conditions you specify.\n\n##### Syntax\n\n    DAVERAGE (database, field, criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The average value of the matching cells.\n\nThis is the statistical mean.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DAVERAGE(A4:E10,\"Yield\",A1:B2)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n// $retVal = 12\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DCOUNT\n\nThe DCOUNT function returns the count of cells that contain a number in\na column of a list or database matching conditions that you specify.\n\n##### Syntax\n\n    DCOUNT(database, [field], criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The count of the matching cells.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DCOUNT(A4:E10,\"Height\",A1:B3)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n\n// $retVal = 3\n```\n\n##### Notes\n\nIn MS Excel, The field argument is optional. If field is omitted, DCOUNT\ncounts all records in the database that match the criteria. This logic\nhas not yet been implemented in PhpSpreadsheet.\n\n#### DCOUNTA\n\nThe DCOUNTA function returns the count of cells that aren’t blank in a\ncolumn of a list or database and that match conditions that you specify.\n\n##### Syntax\n\n    DCOUNTA(database, [field], criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The count of the matching cells.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DCOUNTA(A4:E10,\"Yield\",A1:A3)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n\n// $retVal = 5\n```\n\n##### Notes\n\nIn MS Excel, The field argument is optional. If field is omitted,\nDCOUNTA counts all records in the database that match the criteria. This\nlogic has not yet been implemented in PhpSpreadsheet.\n\n#### DGET\n\nThe DGET function extracts a single value from a column of a list or\ndatabase that matches conditions that you specify.\n\n##### Syntax\n\n    DGET(database, field, criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**mixed** The value from the selected column of the matching row.\n\n#### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=GET(A4:E10,\"Age\",A1:F2)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n// $retVal = 14\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DMAX\n\nThe DMAX function returns the largest number in a column of a list or\ndatabase that matches conditions you specify.\n\n##### Syntax\n\n    DMAX(database, field, criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The maximum value of the matching cells.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DMAX(A4:E10,\"Profit\",A1:B2)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n// $retVal = 105\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DMIN\n\nThe DMIN function returns the smallest number in a column of a list or\ndatabase that matches conditions you specify.\n\n##### Syntax\n\n    DMIN(database, field, criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The minimum value of the matching cells.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DMIN(A4:E10,\"Yield\",A1:A3)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n// $retVal = 6\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DPRODUCT\n\nThe DPRODUCT function multiplies the values in a column of a list or\ndatabase that match conditions that you specify.\n\n##### Syntax\n\n    DPRODUCT(database, field, criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The product of the matching cells.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DPRODUCT(A4:E10,\"Yield\",A1:B2)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n// $retVal = 140\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DSTDEV\n\nThe DSTDEV function estimates the standard deviation of a population\nbased on a sample by using the numbers in a column of a list or database\nthat match conditions that you specify.\n\n##### Syntax\n\n    DSTDEV(database, field, criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The estimated standard deviation of the matching cells.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DSTDEV(A4:E10,\"Yield\",A1:A3)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n// $retVal = 2.97\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DSTDEVP\n\nThe DSTDEVP function calculates the standard deviation of a population\nbased on the entire population by using the numbers in a column of a\nlist or database that match conditions that you specify.\n\n##### Syntax\n\n    DSTDEVP(database, field, criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The estimated standard deviation of the matching cells.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DSTDEVP(A4:E10,\"Yield\",A1:A3)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n// $retVal = 2.65\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DSUM\n\nThe DSUM function adds the numbers in a column of a list or database\nthat matches conditions you specify.\n\n##### Syntax\n\n    DSUM(database, field, criteria)\n\n##### Parameters\n\n**database** The range of cells that makes up the list or database.\n\nA database is a list of related data in which rows of related\ninformation are records, and columns of data are fields. The first row\nof the list contains labels for each column.\n\n**field** Indicates which column of the database is used in the\nfunction.\n\nEnter the column label as a string (enclosed between double quotation\nmarks), such as \"Age\" or \"Yield,\" or as a number (without quotation\nmarks) that represents the position of the column within the list: 1 for\nthe first column, 2 for the second column, and so on.\n\n**criteria** The range of cells that contains the conditions you\nspecify.\n\nYou can use any range for the criteria argument, as long as it includes\nat least one column label and at least one cell below the column label\nin which you specify a condition for the column.\n\n##### Return Value\n\n**float** The total value of the matching cells.\n\n##### Examples\n\n```php\n$database = [\n    [ 'Tree',  'Height', 'Age', 'Yield', 'Profit' ],\n    [ 'Apple',  18,       20,    14,      105.00  ],\n    [ 'Pear',   12,       12,    10,       96.00  ],\n    [ 'Cherry', 13,       14,     9,      105.00  ],\n    [ 'Apple',  14,       15,    10,       75.00  ],\n    [ 'Pear',    9,        8,     8,       76.80  ],\n    [ 'Apple',   8,        9,     6,       45.00  ],\n];\n\n$criteria = [\n    [ 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ],\n    [ '=\"=Apple\"', '>10',    NULL,  NULL,    NULL,     '<16'    ],\n    [ '=\"=Pear\"',  NULL,     NULL,  NULL,    NULL,     NULL     ],\n];\n\n$worksheet->fromArray( $criteria, NULL, 'A1' )\n    ->fromArray( $database, NULL, 'A4' );\n\n$worksheet->setCellValue('A12', '=DMIN(A4:E10,\"Profit\",A1:A2)');\n\n$retVal = $worksheet->getCell('A12')->getCalculatedValue();\n// $retVal = 225\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DVAR\n\nNot yet documented.\n\n#### DVARP\n\nNot yet documented.\n\n### Date and Time Functions\n\nExcel provides a number of functions for the manipulation of dates and\ntimes, and calculations based on date/time values. it is worth spending\nsome time reading the section titled \"Date and Time Values\" on passing\ndate parameters and returning date values to understand how\nPhpSpreadsheet reconciles the differences between dates and times in\nExcel and in PHP.\n\n#### DATE\n\nThe DATE function returns an Excel timestamp or a PHP timestamp or `DateTime`\nobject representing the date that is referenced by the parameters.\n\n##### Syntax\n\n    DATE(year, month, day)\n\n##### Parameters\n\n**year** The year number.\n\nIf this value is between 0 (zero) and 1899 inclusive (for the Windows\n1900 calendar), or between 4 and 1903 inclusive (for the Mac 1904), then\nPhpSpreadsheet adds it to the Calendar base year, so a value of 108 will\ninterpret the year as 2008 when using the Windows 1900 calendar, or 2012\nwhen using the Mac 1904 calendar.\n\n**month** The month number.\n\nIf this value is greater than 12, the DATE function adds that number of\nmonths to the first month in the year specified. For example,\nDATE(2008,14,2) returns a value representing February 2, 2009.\n\nIf the value of **month** is less than 1, then that value will be\nadjusted by -1, and that will then be subtracted from the first month of\nthe year specified. For example, DATE(2008,0,2) returns a value\nrepresenting December 2, 2007; while DATE(2008,-1,2) returns a value\nrepresenting November 2, 2007.\n\n**day** The day number.\n\nIf this value is greater than the number of days in the month (and year)\nspecified, the DATE function adds that number of days to the first day\nin the month. For example, DATE(2008,1,35) returns a value representing\nFebruary 4, 2008.\n\nIf the value of **day** is less than 1, then that value will be adjusted\nby -1, and that will then be subtracted from the first month of the year\nspecified. For example, DATE(2008,3,0) returns a value representing\nFebruary 29, 2008; while DATE(2008,3,-2) returns a value representing\nFebruary 27, 2008.\n\n##### Return Value\n\n**mixed** A date/time stamp that corresponds to the given date.\n\nThis could be a PHP timestamp value (integer), a PHP `DateTime` object,\nor an Excel timestamp value (real), depending on the value of\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType()`.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Year')\n    ->setCellValue('A2', 'Month')\n    ->setCellValue('A3', 'Day');\n\n$worksheet->setCellValue('B1', 2008)\n    ->setCellValue('B2', 12)\n    ->setCellValue('B3', 31);\n\n$worksheet->setCellValue('D1', '=DATE(B1,B2,B3)');\n\n$retVal = $worksheet->getCell('D1')->getCalculatedValue();\n// $retVal = 1230681600\n```\n\n```php\n// We're going to be calling the same cell calculation multiple times,\n//    and expecting different return values, so disable calculation cacheing\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation::getInstance()->setCalculationCacheEnabled(FALSE);\n\n$saveFormat = \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType();\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_EXCEL\n);\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATE'],\n    [2008, 12, 31]\n);\n// $retVal = 39813.0\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_PHP_NUMERIC\n);\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATE'],\n    [2008, 12, 31]\n);\n// $retVal = 1230681600\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType($saveFormat);\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### DATEDIF\n\nThe DATEDIF function computes the difference between two dates in a\nvariety of different intervals, such number of years, months, or days.\n\n##### Syntax\n\n    DATEDIF(date1, date2 [, unit])\n\n##### Parameters\n\n**date1** First Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**date2** Second Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**unit** The interval type to use for the calculation\n\nThis is a string, comprising one of the values listed below:\n\nUnit | Meaning                         | Description\n-----|---------------------------------|--------------------------------\nm    | Months                          | Complete calendar months between the dates.\nd    | Days                            | Number of days between the dates.\ny    | Years                           | Complete calendar years between the dates.\nym   | Months Excluding Years          | Complete calendar months between the dates as if they were of the same year.\nyd   | Days Excluding Years            | Complete calendar days between the dates as if they were of the same year.\nmd   | Days Excluding Years And Months | Complete calendar days between the dates as if they were of the same month and same year.\n\nThe unit value is not case sensitive, and defaults to `d`.\n\n##### Return Value\n\n**integer** An integer value that reflects the difference between the\ntwo dates.\n\nThis could be the number of full days, months or years between the two\ndates, depending on the interval unit value passed into the function as\nthe third parameter.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Year')\n    ->setCellValue('A2', 'Month')\n    ->setCellValue('A3', 'Day');\n\n$worksheet->setCellValue('B1', 2001)\n    ->setCellValue('C1', 2009)\n    ->setCellValue('B2', 7)\n    ->setCellValue('C2', 12)\n    ->setCellValue('B3', 1)\n    ->setCellValue('C3', 31);\n\n$worksheet->setCellValue('D1', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),\"d\")')\n    ->setCellValue('D2', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),\"m\")')\n    ->setCellValue('D3', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),\"y\")')\n    ->setCellValue('D4', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),\"ym\")')\n    ->setCellValue('D5', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),\"yd\")')\n    ->setCellValue('D6', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),\"md\")');\n\n$retVal = $worksheet->getCell('D1')->getCalculatedValue();\n// $retVal = 3105\n\n$retVal = $worksheet->getCell('D2')->getCalculatedValue();\n// $retVal = 101\n\n$retVal = $worksheet->getCell('D3')->getCalculatedValue();\n// $retVal = 8\n\n$retVal = $worksheet->getCell('D4')->getCalculatedValue();\n// $retVal = 5\n\n$retVal = $worksheet->getCell('D5')->getCalculatedValue();\n// $retVal = 183\n\n$retVal = $worksheet->getCell('D6')->getCalculatedValue();\n// $retVal = 30\n```\n\n```php\n$date1 = 1193317015; // PHP timestamp for 25-Oct-2007\n$date2 = 1449579415; // PHP timestamp for 8-Dec-2015\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATEDIF'],\n    [$date1, $date2, 'd']\n);\n// $retVal = 2966\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATEDIF'],\n    [$date1, $date2, 'm']\n);\n// $retVal = 97\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATEDIF'],\n    [$date1, $date2, 'y']\n);\n// $retVal = 8\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATEDIF'],\n    [$date1, $date2, 'ym']\n);\n// $retVal = 1\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATEDIF'],\n    [$date1, $date2, 'yd']\n);\n// $retVal = 44\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATEDIF'],\n    [$date1, $date2, 'md']\n);\n// $retVal = 13\n```\n\n##### Notes\n\nIf Date1 is later than Date2, DATEDIF will return a \\#NUM! error.\n\n#### DATEVALUE\n\nThe DATEVALUE function returns the date represented by a date formatted\nas a text string. Use DATEVALUE to convert a date represented by text to\na serial number.\n\n##### Syntax\n\n    DATEVALUE(dateString)\n\n##### Parameters\n\n**date** Date String.\n\nA string, representing a date value.\n\n##### Return Value\n\n**mixed** A date/time stamp that corresponds to the given date.\n\nThis could be a PHP timestamp value (integer), a PHP `DateTime` object,\nor an Excel timestamp value (real), depending on the value of\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType()`.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Date String');\n    ->setCellValue('A2', '31-Dec-2008')\n    ->setCellValue('A3', '31/12/2008')\n    ->setCellValue('A4', '12-31-2008');\n\n$worksheet->setCellValue('B2', '=DATEVALUE(A2)')\n    ->setCellValue('B3', '=DATEVALUE(A3)')\n    ->setCellValue('B4', '=DATEVALUE(A4)');\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_EXCEL\n);\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n\n$retVal = $worksheet->getCell('B4')->getCalculatedValue();\n// $retVal = 39813.0 for all cases\n```\n\n```php\n// We're going to be calling the same cell calculation multiple times,\n//    and expecting different return values, so disable calculation cacheing\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation::getInstance()->setCalculationCacheEnabled(FALSE);\n\n$saveFormat = \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType();\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_EXCEL\n);\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATEVALUE'],\n    ['31-Dec-2008']\n);\n// $retVal = 39813.0\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_PHP_NUMERIC\n);\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DATEVALUE'],\n    ['31-Dec-2008']\n);\n// $retVal = 1230681600\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType($saveFormat);\n```\n\n##### Notes\n\nDATEVALUE uses the php `DateTime` object implementation of `strtotime()`\n(which can handle a wider range of formats than the normal `strtotime()`\nfunction), and it is also called for any date parameter passed to other\ndate functions (such as DATEDIF) when the parameter value is a string.\n\n**WARNING:-** PhpSpreadsheet accepts a wider range of date formats than\nMS Excel, so it is entirely possible that Excel will return a \\#VALUE!\nerror when passed a date string that it can’t interpret, while\nPhpSpreadsheet is able to translate that same string into a correct date\nvalue.\n\nCare should be taken in workbooks that use string formatted dates in\ncalculations when writing to Xls or Xlsx.\n\n#### DAY\n\nThe DAY function returns the day of a date. The day is given as an\ninteger ranging from 1 to 31.\n\n##### Syntax\n\n    DAY(datetime)\n\n##### Parameters\n\n**datetime** Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n##### Return Value\n\n**integer** An integer value that reflects the day of the month.\n\nThis is an integer ranging from 1 to 31.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Date String')\n    ->setCellValue('A2', '31-Dec-2008')\n    ->setCellValue('A3', '14-Feb-2008');\n\n$worksheet->setCellValue('B2', '=DAY(A2)')\n    ->setCellValue('B3', '=DAY(A3)');\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 31\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 14\n```\n\n```php\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DAYOFMONTH'],\n    ['25-Dec-2008']\n);\n// $retVal = 25\n```\n\n##### Notes\n\nNote that the PhpSpreadsheet function is\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::DAYOFMONTH()` when the\nmethod is called statically.\n\n#### DAYS360\n\nThe DAYS360 function computes the difference between two dates based on\na 360 day year (12 equal periods of 30 days each) used by some\naccounting systems.\n\n##### Syntax\n\n    DAYS360(date1, date2 [, method])\n\n#### Parameters\n\n**date1** First Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**date2** Second Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**method** A boolean flag (TRUE or FALSE)\n\nThis is a flag that determines which method to use in the calculation,\nbased on the values listed below:\n\nmethod | Description\n-------|------------\nFALSE  | U.S. (NASD) method. If the starting date is the last day of a month, it becomes equal to the 30th of the same month. If the ending date is the last day of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month.\nTRUE   | European method. Starting dates and ending dates that occur on the 31st of a month become equal to the 30th of the same month.\n\nThe method value defaults to FALSE.\n\n##### Return Value\n\n**integer** An integer value that reflects the difference between the\ntwo dates.\n\nThis is the number of full days between the two dates, based on a 360\nday year.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('B1', 'Start Date')\n    ->setCellValue('C1', 'End Date')\n    ->setCellValue('A2', 'Year')\n    ->setCellValue('A3', 'Month')\n    ->setCellValue('A4', 'Day');\n\n$worksheet->setCellValue('B2', 2003)\n    ->setCellValue('B3', 2)\n    ->setCellValue('B4', 3);\n\n$worksheet->setCellValue('C2', 2007)\n    ->setCellValue('C3', 5)\n    ->setCellValue('C4', 31);\n\n$worksheet->setCellValue('E2', '=DAYS360(DATE(B2,B3,B4),DATE(C2,C3,C4))')\n    ->setCellValue('E4', '=DAYS360(DATE(B2,B3,B4),DATE(C2,C3,C4),FALSE)');\n\n$retVal = $worksheet->getCell('E2')->getCalculatedValue();\n// $retVal = 1558\n\n$retVal = $worksheet->getCell('E4')->getCalculatedValue();\n// $retVal = 1557\n```\n\n```php\n$date1 = 37655.0; // Excel timestamp for 25-Oct-2007\n$date2 = 39233.0; // Excel timestamp for 8-Dec-2015\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DAYS360'],\n    [$date1, $date2]\n);\n// $retVal = 1558\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'DAYS360'],\n    [$date1, $date2, TRUE]\n);\n// $retVal = 1557\n```\n\n##### Notes\n\n**WARNING:-** This function does not currently work with the Xls Writer\nwhen a PHP Boolean is used for the third (optional) parameter (as shown\nin the example above), and the writer will generate and error. It will\nwork if a numeric 0 or 1 is used for the method parameter; or if the\nExcel `TRUE()` and `FALSE()` functions are used instead.\n\n#### EDATE\n\nThe EDATE function returns an Excel timestamp or a PHP timestamp or `DateTime`\nobject representing the date that is the indicated number of months\nbefore or after a specified date (the start\\_date). Use EDATE to\ncalculate maturity dates or due dates that fall on the same day of the\nmonth as the date of issue.\n\n##### Syntax\n\n    EDATE(baseDate, months)\n\n##### Parameters\n\n**baseDate** Start Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**months** Number of months to add.\n\nAn integer value indicating the number of months before or after\nbaseDate. A positive value for months yields a future date; a negative\nvalue yields a past date.\n\n##### Return Value\n\n**mixed** A date/time stamp that corresponds to the basedate + months.\n\nThis could be a PHP timestamp value (integer), a PHP `DateTime` object,\nor an Excel timestamp value (real), depending on the value of\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType()`.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Date String')\n    ->setCellValue('A2', '1-Jan-2008')\n    ->setCellValue('A3', '29-Feb-2008');\n\n$worksheet->setCellValue('B2', '=EDATE(A2,5)')\n    ->setCellValue('B3', '=EDATE(A3,-12)');\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_EXCEL\n);\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 39600.0 (1-Jun-2008)\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 39141.0 (28-Feb-2007)\n```\n\n```php\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_EXCEL\n);\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'EDATE'],\n    ['31-Oct-2008', 25]\n);\n// $retVal = 40512.0 (30-Nov-2010)\n```\n\n###### Notes\n\n**WARNING:-** This function is currently not supported by the Xls Writer\nbecause it is not a standard function within Excel 5, but an add-in from\nthe Analysis ToolPak.\n\n#### EOMONTH\n\nThe EOMONTH function returns an Excel timestamp or a PHP timestamp or\n`DateTime` object representing the date of the last day of the month that is\nthe indicated number of months before or after a specified date (the\nstart\\_date). Use EOMONTH to calculate maturity dates or due dates that\nfall on the last day of the month.\n\n##### Syntax\n\n    EOMONTH(baseDate, months)\n\n##### Parameters\n\n**baseDate** Start Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**months** Number of months to add.\n\nAn integer value indicating the number of months before or after\nbaseDate. A positive value for months yields a future date; a negative\nvalue yields a past date.\n\n##### Return Value\n\n**mixed** A date/time stamp that corresponds to the last day of basedate\n+ months.\n\nThis could be a PHP timestamp value (integer), a PHP `DateTime` object,\nor an Excel timestamp value (real), depending on the value of\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType()`.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Date String')\n    ->setCellValue('A2', '1-Jan-2000')\n    ->setCellValue('A3', '14-Feb-2009');\n\n$worksheet->setCellValue('B2', '=EOMONTH(A2,5)')\n    ->setCellValue('B3', '=EOMONTH(A3,-12)');\n\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_EXCEL);\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 39629.0 (30-Jun-2008)\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 39507.0 (29-Feb-2008)\n```\n\n```php\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::setReturnDateType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::RETURNDATE_EXCEL\n);\n\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'EOMONTH'],\n    ['31-Oct-2008', 13]\n);\n// $retVal = 40147.0 (30-Nov-2010)\n```\n\n##### Notes\n\n**WARNING:-** This function is currently not supported by the Xls Writer\nbecause it is not a standard function within Excel 5, but an add-in from\nthe Analysis ToolPak.\n\n#### HOUR\n\nThe HOUR function returns the hour of a time value. The hour is given as\nan integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).\n\n##### Syntax\n\n    HOUR(datetime)\n\n##### Parameters\n\n**datetime** Time.\n\nAn Excel date/time value, PHP date timestamp, PHP `DateTime` object, or a\ndate/time represented as a string.\n\n##### Return Value\n\n**integer** An integer value that reflects the hour of the day.\n\nThis is an integer ranging from 0 to 23.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Time String')\n    ->setCellValue('A2', '31-Dec-2008 17:30')\n    ->setCellValue('A3', '14-Feb-2008 4:20 AM')\n    ->setCellValue('A4', '14-Feb-2008 4:20 PM');\n\n$worksheet->setCellValue('B2', '=HOUR(A2)')\n    ->setCellValue('B3', '=HOUR(A3)')\n    ->setCellValue('B4', '=HOUR(A4)');\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 17\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 4\n\n$retVal = $worksheet->getCell('B4')->getCalculatedValue();\n// $retVal = 16\n```\n\n```php\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'HOUROFDAY'],\n    ['09:30']\n);\n// $retVal = 9\n```\n\n##### Notes\n\nNote that the PhpSpreadsheet function is\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::HOUROFDAY()` when the\nmethod is called statically.\n\n#### MINUTE\n\nThe MINUTE function returns the minutes of a time value. The minute is\ngiven as an integer, ranging from 0 to 59.\n\n##### Syntax\n\n    MINUTE(datetime)\n\n##### Parameters\n\n**datetime** Time.\n\nAn Excel date/time value, PHP date timestamp, PHP `DateTime` object, or a\ndate/time represented as a string.\n\n##### Return Value\n\n**integer** An integer value that reflects the minutes within the hour.\n\nThis is an integer ranging from 0 to 59.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Time String')\n    ->setCellValue('A2', '31-Dec-2008 17:30')\n    ->setCellValue('A3', '14-Feb-2008 4:20 AM')\n    ->setCellValue('A4', '14-Feb-2008 4:45 PM');\n\n$worksheet->setCellValue('B2', '=MINUTE(A2)')\n    ->setCellValue('B3', '=MINUTE(A3)')\n    ->setCellValue('B4', '=MINUTE(A4)');\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 30\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 20\n\n$retVal = $worksheet->getCell('B4')->getCalculatedValue();\n// $retVal = 45\n```\n\n```php\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'MINUTE'],\n    ['09:30']\n);\n// $retVal = 30\n```\n\n##### Notes\n\nNote that the PhpSpreadsheet function is\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::MINUTE()` when the\nmethod is called statically.\n\n#### MONTH\n\nThe MONTH function returns the month of a date. The month is given as an\ninteger ranging from 1 to 12.\n\n##### Syntax\n\n    MONTH(datetime)\n\n##### Parameters\n\n**datetime** Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n##### Return Value\n\n**integer** An integer value that reflects the month of the year.\n\nThis is an integer ranging from 1 to 12.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Date String');\n$worksheet->setCellValue('A2', '31-Dec-2008');\n$worksheet->setCellValue('A3', '14-Feb-2008');\n\n$worksheet->setCellValue('B2', '=MONTH(A2)');\n$worksheet->setCellValue('B3', '=MONTH(A3)');\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 12\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 2\n```\n\n```php\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'MONTHOFYEAR'],\n    ['14-July-2008']\n);\n// $retVal = 7\n```\n\n#### Notes\n\nNote that the PhpSpreadsheet function is\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::MONTHOFYEAR()` when the\nmethod is called statically.\n\n#### NETWORKDAYS\n\nThe NETWORKDAYS function returns the number of whole working days\nbetween a *start date* and an *end date*. Working days exclude weekends\nand any dates identified in *holidays*. Use NETWORKDAYS to calculate\nemployee benefits that accrue based on the number of days worked during\na specific term.\n\n##### Syntax\n\n    NETWORKDAYS(startDate, endDate [, holidays])\n\n##### Parameters\n\n**startDate** Start Date of the period.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**endDate** End Date of the period.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**holidays** Optional array of Holiday dates.\n\nAn optional range of one or more dates to exclude from the working\ncalendar, such as state and federal holidays and floating holidays.\n\nThe list can be either a range of cells that contains the dates or an\narray constant of Excel date values, PHP date timestamps, PHP date\nobjects, or dates represented as strings.\n\n##### Return Value\n\n**integer** Number of working days.\n\nThe number of working days between startDate and endDate.\n\n##### Examples\n\n```php\n```\n\n```php\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n#### NOW\n\nThe NOW function returns the current date and time.\n\n##### Syntax\n\n    NOW()\n\n##### Parameters\n\nThere are no parameters for the `NOW()` function.\n\n##### Return Value\n\n**mixed** A date/time stamp that corresponds to the current date and\ntime.\n\nThis could be a PHP timestamp value (integer), a PHP `DateTime` object,\nor an Excel timestamp value (real), depending on the value of\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::getReturnDateType()`.\n\n##### Examples\n\n```php\n```\n\n```php\n```\n\n##### Notes\n\nNote that the PhpSpreadsheet function is\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::DATETIMENOW()` when the\nmethod is called statically.\n\n#### SECOND\n\nThe SECOND function returns the seconds of a time value. The second is\ngiven as an integer, ranging from 0 to 59.\n\n##### Syntax\n\n    SECOND(datetime)\n\n##### Parameters\n\n**datetime** Time.\n\nAn Excel date/time value, PHP date timestamp, PHP `DateTime` object, or a\ndate/time represented as a string.\n\n##### Return Value\n\n**integer** An integer value that reflects the seconds within the\nminute.\n\nThis is an integer ranging from 0 to 59.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Time String')\n    ->setCellValue('A2', '31-Dec-2008 17:30:20')\n    ->setCellValue('A3', '14-Feb-2008 4:20 AM')\n    ->setCellValue('A4', '14-Feb-2008 4:45:59 PM');\n\n$worksheet->setCellValue('B2', '=SECOND(A2)')\n    ->setCellValue('B3', '=SECOND(A3)');\n    ->setCellValue('B4', '=SECOND(A4)');\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 20\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 0\n\n$retVal = $worksheet->getCell('B4')->getCalculatedValue();\n// $retVal = 59\n```\n\n```php\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'SECOND'],\n    ['09:30:17']\n);\n// $retVal = 17\n```\n\n##### Notes\n\nNote that the PhpSpreadsheet function is\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::SECOND()` when the\nmethod is called statically.\n\n#### TIME\n\nNot yet documented.\n\n#### TIMEVALUE\n\nNot yet documented.\n\n#### TODAY\n\nNot yet documented.\n\n#### WEEKDAY\n\nThe WEEKDAY function returns the day of the week for a given date. The\nday is given as an integer ranging from 1 to 7, although this can be\nmodified to return a value between 0 and 6.\n\n##### Syntax\n\n    WEEKDAY(datetime [, method])\n\n##### Parameters\n\n**datetime** Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n**method** An integer flag (values 0, 1 or 2)\n\nThis is a flag that determines which method to use in the calculation,\nbased on the values listed below:\n\n    method | Description\n    :-----:|------------------------------------------\n    0      | Returns 1 (Sunday) through 7 (Saturday).\n    1      | Returns 1 (Monday) through 7 (Sunday).\n    2      | Returns 0 (Monday) through 6 (Sunday).\n\nThe method value defaults to 1.\n\n##### Return Value\n\n**integer** An integer value that reflects the day of the week.\n\nThis is an integer ranging from 1 to 7, or 0 to 6, depending on the\nvalue of method.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Date String')\n    ->setCellValue('A2', '31-Dec-2008')\n    ->setCellValue('A3', '14-Feb-2008');\n\n$worksheet->setCellValue('B2', '=WEEKDAY(A2)')\n    ->setCellValue('B3', '=WEEKDAY(A3,0)')\n    ->setCellValue('B4', '=WEEKDAY(A3,2)');\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 12\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 2\n\n$retVal = $worksheet->getCell('B4')->getCalculatedValue();\n// $retVal = 2\n```\n\n```php\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'WEEKDAY'],\n    ['14-July-2008']\n);\n// $retVal = 7\n```\n\n##### Notes\n\nNote that the PhpSpreadsheet function is\n`\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::WEEKDAY()` when the\nmethod is called statically.\n\n#### WEEKNUM\n\nNot yet documented.\n\n#### WORKDAY\n\nNot yet documented.\n\n#### YEAR\n\nThe YEAR function returns the year of a date.\n\n##### Syntax\n\n    YEAR(datetime)\n\n##### Parameters\n\n**datetime** Date.\n\nAn Excel date value, PHP date timestamp, PHP `DateTime` object, or a date\nrepresented as a string.\n\n##### Return Value\n\n**integer** An integer value that reflects the month of the year.\n\nThis is an integer year value.\n\n##### Examples\n\n```php\n$worksheet->setCellValue('A1', 'Date String')\n    ->setCellValue('A2', '17-Jul-1982')\n    ->setCellValue('A3', '16-Apr-2009');\n\n$worksheet->setCellValue('B2', '=YEAR(A2)')\n    ->setCellValue('B3', '=YEAR(A3)');\n\n$retVal = $worksheet->getCell('B2')->getCalculatedValue();\n// $retVal = 1982\n\n$retVal = $worksheet->getCell('B3')->getCalculatedValue();\n// $retVal = 2009\n```\n\n```php\n$retVal = call_user_func_array(\n    ['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions', 'YEAR'],\n    ['14-July-2001']\n);\n// $retVal = 2001\n```\n\n##### Notes\n\nThere are no additional notes on this function\n\n### YEARFRAC\n\nNot yet documented.\n"
  },
  {
    "path": "docs/topics/conditional-formatting.md",
    "content": "# Conditional Formatting\n\n## Introduction\n\nIn addition to standard cell formatting options, most spreadsheet software provides an option known as Conditional Formatting, which allows formatting options to be set based on the value of a cell.\n\nThe cell's standard formatting defines most style elements that will always be applied, such as the font face and size; but Conditional Formatting allows you to override some elements of that cell style such as number format mask; font colour, bold, italic and underlining; borders; and fill colour and pattern.\n\nConditional Formatting can be applied to individual cells, or to a range of cells.\n\n### Example\n\nAs a simple example in MS Excel itself, if we wanted to highlight all cells in the range A1:A10 that contain values greater than 80, start by selecting the range of cells.\n\n![11-01-CF-Simple-Select-Range.png](./images/11-01-CF-Simple-Select-Range.png)\n\nOn the Home tab, in the \"Styles\" group, click \"Conditional Formatting\". This allows us to select an Excel Wizard to guide us through the process of creating a Conditional Rule and defining a Style for that rule.\n\n![11-02-CF-Simple-Tab.png](./images/11-02-CF-Simple-Tab.png)\n\nClick \"Highlight Cells Rules\", then \"Greater Than\".\n\n![11-03-CF-Simple-CellIs-GreaterThan.png](./images/11-03-CF-Simple-CellIs-GreaterThan.png)\n\nEnter the value \"80\" in the prompt box; and either select one of the pre-defined formatting style (or create a custom style from there).\n\n![11-04-CF-Simple-CellIs-Value-and-Style.png](./images/11-04-CF-Simple-CellIs-Value-and-Style.png)\n\nThen click \"OK\". The rule is immediately applied to the selected range of cells, highlighting all those with a value greater than 80 in the chosen style.\n\n![11-05-CF-Simple-CellIs-Highlighted.png](./images/11-05-CF-Simple-CellIs-Highlighted.png)\n\nAny change to the value of a cell within that range will immediately check the rule, and automatically apply the new styling if it applies.\n\n![11-06-CF-Simple-Cell-Value-Change.png](./images/11-06-CF-Simple-Cell-Value-Change.png)\n\nIf we wanted to set up the same Conditional Formatting rule in PHPSpreadsheet, we would do so using the following code:\n\n```php\n$conditional = new \\PhpOffice\\PhpSpreadsheet\\Style\\Conditional();\n$conditional->setConditionType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::CONDITION_CELLIS);\n$conditional->setOperatorType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::OPERATOR_GREATERTHAN);\n$conditional->addCondition(80);\n$conditional->getStyle()->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_DARKGREEN);\n$conditional->getStyle()->getFill()->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID);\n$conditional->getStyle()->getFill()->getStartColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_GREEN);\n\n$conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('A1:A10')->getConditionalStyles();\n$conditionalStyles[] = $conditional;\n\n$spreadsheet->getActiveSheet()->getStyle('A1:A10')->setConditionalStyles($conditionalStyles);\n```\n\nDepending on the Rules that we might want to apply for a Condition, sometimes an \"operator Type\" is required, sometimes not (and not all Operator Types are appropriate for all Condition Types); sometimes a \"Condition\" is required (or even several conditions), sometimes not, and sometimes it must be a specific Excel formula expression.\nCreating conditions manually requires a good knowledge of when these different properties need to be set, and with what type of values.\nThis isn't something that an end-user developer should be expected to know. \n\nSo - to eliminate this need for complex and arcane knowledge - since PHPSpreadsheet verson 1.22.0 there is also a series of Wizards that can assist with creating Conditional Formatting rules, and which are capable of setting the appropriate operators and conditions (including the sometimes complex Excel formula expressions) for a Conditional Rule:\n\n```php\n$wizardFactory = new \\PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard('A1:A10');\n$wizard = $wizardFactory->newRule(\\PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard::CELL_VALUE);\n$wizard->greaterThan(80);\n$wizard->getStyle()->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_DARKGREEN);\n$wizard->getStyle()->getFill()->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID);\n$wizard->getStyle()->getFill()->getStartColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_GREEN);\n\n$conditional = $wizard->getConditional();\n```\nThe Wizards know which operator types match up with condition types, and provide more meaningful method names for operators, and they build expressions and formulae when required; and also work well with an IDE such as PHPStorm.\n\n---\n\nNote that `$conditionalStyles` is an array: it is possible to apply several conditions to the same range of cells. If we also wanted to highlight values that were less than 10 in the A1:A10 range, we can add a second style rule.\n\nIn Excel, we would do this by selecting the range again, and going through the same process, this time selecting the \"Highlight Cells Rules\", then \"Less Than\" from the \"Conditional Styles\" menu, entering the value \"10\" in the prompt box, and selecting the appropriate style.\n\nIn PHPSpreadsheet, we would do:\n\n```php\n$conditional2 = new \\PhpOffice\\PhpSpreadsheet\\Style\\Conditional();\n$conditional2->setConditionType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::CONDITION_CELLIS);\n$conditional2->setOperatorType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::OPERATOR_LESSTHAN);\n$conditional2->addCondition(10);\n$conditional2->getStyle()->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_DARKRED);\n$conditional2->getStyle()->getFill()->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID);\n$conditional2->getStyle()->getFill()->getStartColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_RED);\n\n$conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('A1:A10')->getConditionalStyles();\n$conditionalStyles[] = $conditional2;\n\n$spreadsheet->getActiveSheet()->getStyle('A1:A10')->setConditionalStyles($conditionalStyles);\n```\nor again, using the Wizard:\n```php\n$wizardFactory = new \\PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard('A1:A10');\n$wizard = $wizardFactory->newRule(\\PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard::CELL_VALUE);\n$wizard->lessThan(10);\n$wizard->getStyle()->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_DARKGREEN);\n$wizard->getStyle()->getFill()->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID);\n$wizard->getStyle()->getFill()->getStartColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_GREEN);\n\n$conditional = $wizard->getConditional();\n```\n\n\n### Order of Evaluating Multiple Rules/Conditions\n\n`$conditionalStyles` is an array, which not only represents multiple conditions that can be applied to a cell (or range of cells), but also the order in which they are checked. Some spreadsheet programs stop processing conditions once they find a match. On the other hand, MS Excel will check each of those conditions in turn in the order they are defined. It will stop checking only if it finds a matching rule that specifies 'stop if true'; however, if it finds conflicting matches with conflicting formatting (e.g. both set a background fill color but use different choices), the first match wins. In either case, this means that the order of checking conditions can be important.\n\nConsider the following. We have one condition that checks if a cell value is between -2 and 2, styling the fill color of the cell in yellow if that condition matches; and a second condition that checks if the cell value is equal to 0, styling the fill color of the cell in red if that matches.\n - Yellow if value is between -2 and 2\n - Red if value equals 0 \n\nIf they are evaluated in the order I've described above, and the cell has a value of 0, then the first rule will match (because 0 is between -2 and 2), and the cell will be styled in yellow, and no further conditions will be checked. So the rule that styles the cell in red if the value is 0 will never be assessed, even though that would also match (and is probably what we actually wanted, otherwise why have an explicit rule defined for that condition).\n\n![11-20-CF-Rule-Order-1.png](./images/11-20-CF-Rule-Order-1.png)\n\nIf the rule order is reversed\n - Red if value equals 0\n - Yellow if value is between -2 and 2\n\nthen the cell containing the value 0 will be rendered in red, because that is the first matching condition; and the formatting in the other condition conflicts with this, so is discarded.\n\n![11-21-CF-Rule-Order-2.png](./images/11-21-CF-Rule-Order-2.png)\n\nSo when you have multiple conditions where the rules might \"overlap\", the order of these is important.\n\nIf the cell matches multiple conditions, Excel (but not most other spreadsheet programs) will apply non-conflicting styles from each match. So, for the example above, if we wanted a match of 0 to have a different *font* color rather than a different *fill* color, Excel can honor both.\n\n![11-21-CF-Rule-Order-2.pic2.png](./images/11-21-CF-Rule-Order-2.pic2.png)\n\nHere is the same spreadsheet opened in LibreOffice - cell A4 has only the first conditional style applied to it. (You would see the same if you checked 'Stop if True' in Excel.) If you want the spreadsheet to appear the same in both Excel and LibreOffice, you would need to use more complicated conditions.\n\n![11-21-CF-Rule-Order-2.pic2.png](./images/11-21-CF-Rule-Order-2.pic3.png)\n\nPhpSpreadsheet supports the setting of [Stop If True](#stop-if-true-and-no-format-set).\n\n\n### Reader/Writer Support\n\nCurrently, the following Conditional Types are supported for the following Readers and Writers:\n\nMS Excel | Conditional Type | Readers | Writers\n---|---|---|---\n| Cell Value | Conditional::CONDITION_CELLIS | Xlsx | Xlsx, Xls, Html\nSpecific Text | Conditional::CONDITION_CONTAINSTEXT | Xlsx | Xlsx, Html\n | Conditional::CONDITION_NOTCONTAINSTEXT | Xlsx | Xlsx, Html\n | Conditional::CONDITION_BEGINSWITH | Xlsx | Xlsx, Html\n | Conditional::CONDITION_ENDSWITH | Xlsx | Xlsx, Html\nDates Occurring | Conditional::CONDITION_TIMEPERIOD | Xlsx | Xlsx, Html\nBlanks | Conditional::CONDITION_CONTAINSBLANKS | Xlsx | Xlsx, Html\nNo Blanks | Conditional::CONDITION_NOTCONTAINSBLANKS | Xlsx | Xlsx, Html\nErrors | Conditional::CONDITION_CONTAINSERRORS | Xlsx | Xlsx, Html\nNo Errors | Conditional::CONDITION_NOTCONTAINSERRORS | Xlsx | Xlsx, Html\nDuplicates/Unique | Conditional::CONDITION_DUPLICATES | Xlsx | Xlsx, Html\n | Conditional::CONDITION_UNIQUE | Xlsx | Xlsx, Html\nUse a formula | Conditional::CONDITION_EXPRESSION | Xlsx | Xlsx, Xls, Html\nData Bars | Conditional::CONDITION_DATABAR | Xlsx | Xlsx, Html\nColour Scales | Conditional::COLORSCALE | Xlsx | Html\n\nTo enable conditional formatting for Html writer, use:\n\n```php\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setConditionalFormatting(true);\n```\n\nThe following Conditional Types are currently not supported by any Readers or Writers:\n\nMS Excel | Conditional Type\n---|---\nAbove/Below Average | ?\nTop/Bottom Items | ?\nTop/Bottom %age | ?\nIcon Sets | ?\n\nUnsupported types will by ignored by the Readers, and cannot be created through PHPSpreadsheet.\n\n\n## Wizards\n\nWhile the Wizards don't simplify defining the Conditional Style itself; they do make it easier to define the conditions (the rules) where that style will be applied. \nMS Excel itself has wizards to guide the creation of Conditional Formatting rules and styles.\n\n![11-07-CF-Wizard.png](./images/11-07-CF-Wizard.png)\n\nThe Wizard Factory allows us to retrieve the appropriate Wizard for the CF Rule that we want to apply.\nMost of those that have already been defined fall under the \"Format only cells that contain\" category.\nMS Excel provides a whole series of different types of rule, each of which has it's own formatting and logic.\nThe Wizards try to replicate this logic and behaviour, similar to Excel's own \"Formatting Rule\" helper wizard.\n\nMS Excel | Wizard Factory newRule() Type Constant | Wizard Class Name\n---|---|---\nCell Value | Wizard::CELL_VALUE | CellValue\nSpecific Text | Wizard::TEXT_VALUE | TextValue\nDates Occurring | Wizard::DATES_OCCURRING | DateValue\nBlanks | Wizard::BLANKS | Blanks\nNo Blanks | Wizard::NOT_BLANKS | Blanks\nErrors | Wizard::ERRORS | Errors\nNo Errors | Wizard::NOT_ERRORS | Errors\n\nAdditionally, Wizards also exists for \"Format only unique or duplicate values\", and for \"Use a formula to determine which cells to format\":\n\nMS Excel | Wizard Factory newRule() Type Constant | Wizard Class Name\n---|---|---\nDuplicates/Unique | Wizard::DUPLICATES or Wizard::UNIQUE | Duplicates\nUse a formula | Wizard::EXPRESSION or Wizard::FORMULA | Expression\n\nThere is currently no Wizard for Data Bars, even though this Conditional Type is supported by the Xlsx Reader and Writer. \n\n---\n\nWe instantiate the Wizard Factory, passing in the cell range where we want to apply Conditional Formatting rules; and can then call the `newRule()` method, passing in the type of Conditional Rule that we want to create in order to return the appropriate Wizard:\n\n```php\n$wizardFactory = new \\PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard('C3:E5');\n$wizard = $wizardFactory->newRule(\\PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard::CELL_VALUE);\n```\nYou can, of course, instantiate the Wizard that you want directly, rather than using the factory; but still remember to pass in the cell range.\n```php\n$wizard = new \\PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard\\CellValue('C3:E5');\n```\n\nThat Wizard then provides methods allowing us to define the rule, setting the operator and the values that we want to compare for that rule.\nNote that not all rules require values, or even operators, but the individual Wizards provide whatever is necessary; and this document lists all options available for every Wizard.\n\nOnce we have used the Wizard to define the conditions and values that we want; and have defined a style using the `setStyle()` method, then we call the Wizard's `getConditional()` method to return a Conditional object that can be added to the array of Conditional Styles that we pass to `setConditionalStyles()`.\n\n\n### CellValue Wizard\n\nFor the `CellValue` Wizard, we always need to provide an operator and a value; and for the \"between\" and \"notBetween\" operators, we need to provide two values to specify a range.\n\nCondition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes\n---|---|---|---|---\nConditional::CONDITION_CELLIS | Wizard::CELL_VALUE | Conditional::OPERATOR_EQUAL | equals()\n| | Conditional::OPERATOR_NOTEQUAL | notEquals()\n| | Conditional::OPERATOR_GREATERTHAN | greaterThan()\n| | Conditional::OPERATOR_GREATERTHANOREQUAL | greaterThanOrEqual()\n| | Conditional::OPERATOR_LESSTHAN | lessThan()\n| | Conditional::OPERATOR_LESSTHANOREQUAL | lessThanOrEqual()\n| | Conditional::OPERATOR_BETWEEN | between()\n| | Conditional::OPERATOR_NOTBETWEEN | notBetween()\n| | | and() | Used to provide the second operand for `between()` and `notBetween() \n\nA single operator call is required for every rule (except `between()` and `notBetween`, where the Wizard also provides `and()`); and providing a value is mandatory for all operators.\nThe values that we need to provide for each operator can be numeric, boolean or string literals (even NULL); cell references; or formulae.\n\nSo to set the rule using an operator, we would make a call like:\n```php\n$wizard->lessThan(10);\n```\nor when setting a `between()` or `notBetween()` rule, we can make use of the fluent interface with the `and()` method to set the range of values:\n```php\n$wizard->between(-10)->and(10);\n```\nProviding a second value using `and()` is mandatory for a `between()` or `notBetween()` range.\n\nTo retrieve the Conditional, to add it to our `$conditionalStyles` array, we call the Wizard's `getConditional()` method.\n```php\n$conditional = $wizard->getConditional();\n$conditionalStyles = [$conditional];\n```\nor simply\n```php\n$conditionalStyles[] = $wizard->getConditional();\n```\n\nPutting it all together, we can use a block of code like (using pre-defined Style objects):\n```php\n$cellRange = 'A2:E5';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\CellValue $cellWizard */\n$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n$cellWizard->equals(0)\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->greaterThan(0)\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->lessThan(0)\n    ->setStyle($redStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\nYou can find an example that demonstrates this in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/01_Basic_Comparisons.php#L81 \"Conditional Formatting - Simple Example\") for the repo.\n\n![11-12-CF-Simple-Example.png](./images/11-12-CF-Simple-Example.png)\n\n\n#### Value Types\n\nWhen we need to provide a value for an operator, that value can be numeric, boolean or string literals (even NULL); cell references; or even an Excel formulae.\n\n##### Literals\n\nIf the value is a literal (even a string literal), we simply need to pass the value; the Wizard will ensure that strings are correctly quoted when we get the Conditional from the Wizard.\n\n```php\n$wizard->equals('Hello World');\n```\nIf you weren't using the Wizard, but were creating the Conditional directly, you would need to remember to wrap this value in quotes yourself (`'\"Hello World\"'`)  \n\nHowever, a cell reference or a formula are also string data, so we need to tell the Wizard if the value that we are passing in isn't just a string literal value, but should be treated as a cell reference or as a formula.\n\n##### Cell References\n\nIf we want to use the value from cell `H9` in our rule; then we need to pass a value type of `VALUE_TYPE_CELL` to the operator, in addition to the cell reference itself.\n\n```php\n$wizard->equals('$H$9', Wizard::VALUE_TYPE_CELL);\n```\n\n![11-08-CF-Absolute-Cell-Reference.png](./images/11-08-CF-Absolute-Cell-Reference.png)\n\nYou can find an example that demonstrates this in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/01_Basic_Comparisons.php#L103 \"Conditional Formatting - Basic Comparisons\") for the repo.\n\nNote that we are passing the cell as an absolute cell reference, \"pinned\" (with the `$` symbol) for both the row and the column.\n\nIn this next example, we need to use relative cell references, so that the comparison will match the value in column `A` against the values in columns `B` and `C` for each row in our range (`A18:A20`); ie, test if the value in `A18` is between the values in `B18` and `C18`, test if the value in `A19` is between the values in `B19` and `C19`, etc.  \n\n![11-09-CF-Relative-Cell-Reference.png](./images/11-09-CF-Relative-Cell-Reference.png)\n\n```php\n$wizard->between('$B1', Wizard::VALUE_TYPE_CELL)\n    ->and('$C1', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($greenStyle);\n```\n\nThis example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/01_Basic_Comparisons.php#L126 \"Conditional Formatting - Basic Comparisons\") for the repo.\n\nIn this case, we \"pin\" the column for the address; but leave the row \"unpinned\".\nNotice also that we treat the first cell in our range as cell `A1`: the relative row number will be adjusted automatically to match our defined range; that is, the range that we specified when we instantiated the Wizard (passed in through the Wizard Factory) when we make the call to `getConditional()`.\n\n##### Formulae\n\nIt is also possible to set the value/operand as an Excel formula expression, not simply a literal value or a cell reference.\nAgain, we do need to specify that the value is a Formula.\n\n```php\n$cellRange = 'C26:C28';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\CellValue $cellWizard */\n$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n$cellWizard->equals('CONCATENATE($A1,\" \",$B1)', Wizard::VALUE_TYPE_FORMULA)\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\n\nYou can find an example that demonstrates this in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/02_Text_Comparisons.php#L209 \"Conditional Formatting - Text Comparisons\") for the repo.\n\nWhen the formula contains cell references, we again need to be careful with pinning to absolute columns/rows; and when unpinned, we reference based on the top-left cell of the range being cell `A1` when we define the formula.\nHere we're defining the formula as `CONCATENATE($A1,\" \",$B1)`, so we're \"pinning\" the column references for columns `A` and `B`; but leaving the row unpinned (explicitly set to start from row 1), which is then adjusted to the conditional range when we get the Conditional from the Wizard, and adjusted to the individual rows within that range when MS Excel displays the results.\n\n![11-13-CF-Formula-with-Relative-Cell-Reference.png](./images/11-13-CF-Formula-with-Relative-Cell-Reference.png)\n\n\n### TextValue Wizard\n\nWhile we can use the `CellValue` Wizard to do basic string comparison rules, the `TextValue` Wizard provides rules for comparing parts of a string value.\n\nFor the `TextValue` Wizard, we always need to provide an operator and a value. As with the `CellValue` Wizard, values can be literals (but should always be string literals), cell references, or formula.\n\nCondition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes\n---|---|---|---|---\nConditional::CONDITION_CONTAINSTEXT | Wizard::TEXT_VALUE | Conditional::OPERATOR_CONTAINSTEXT | contains()\nConditional::CONDITION_NOTCONTAINSTEXT | Wizard::TEXT_VALUE | Conditional::OPERATOR_NOTCONTAINS | doesNotContain()\n| | | doesntContain() | synonym for `doesNotContain()`\nConditional::CONDITION_BEGINSWITH | Wizard::TEXT_VALUE | Conditional::OPERATOR_BEGINSWITH | beginsWith()\n| | | startsWith() | synonym for `beginsWith()`\nConditional::CONDITION_ENDSWITH | Wizard::TEXT_VALUE | Conditional::OPERATOR_ENDSWITH | endsWith()\n\nThe Conditional actually uses a separate \"Condition Type\" for each option, each with its own \"Operator Type\", and the condition should be an Excel formula (not simply the string value to check), and with a custom `text` attribute. The Wizard should make it a lot easier to create these conditional rules.\n\nTo create a Conditional rule manually, you would need to do something like:\n```php\n$cellRange = 'A14:B16';\n$conditionalStyles = [];\n$conditional = new Conditional();\n// Remember to use the correct Condition Type\n$conditional->setConditionType(Conditional::CONDITION_CONTAINSTEXT);\n// Remember to use the correct Operator Type\n$conditional->setOperatorType(Conditional::OPERATOR_CONTAINSTEXT);\n// Remember to set the text attribute\n// Remember to wrap the string literal\n$conditional->setText('\"LL\"');\n// Remember that the condition should be the first element in an array\n// Remember that we need a specific formula for this Conditional \n// Remember to wrap the string literal\n// Remember to use the top-left cell of the range that we want to apply this rule to\n$conditional->setConditions(['NOT(ISERROR(SEARCH(\"LL\",A14)))']);\n$conditional->setStyle($greenStyle);\n\n$conditionalStyles[]\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellRange)\n    ->setConditionalStyles($conditionalStyles);\n```\nBut using the Wizard, the same Conditional rule can be created by:\n```php\n$cellRange = 'A14:B16';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->contains('LL')\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\nYou can find an example that demonstrates this in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/02_Text_Comparisons.php#L149 \"Conditional Formatting - Text Comparisons\") for the repo.\n\n![11-17-CF-Text-Contains.png](./images/11-17-CF-Text-Contains.png)\n\nThere are also examples in that file for `notContains()`, `beginsWith()` and `endsWith()` comparisons; using literal text, and with cell references.\n\nThe actual Excel Expressions used (and that you would need to set manually if you were defining the Conditional yourself rather than using the Wizard) are listed below:\n\nConditional Type | Condition Expression\n---|---\nConditional::CONDITION_CONTAINSTEXT | NOT(ISERROR(SEARCH(`<value>`,`<cell address>`)))\nConditional::CONDITION_NOTCONTAINSTEXT | ISERROR(SEARCH(`<value>`,`<cell address>`))</\nConditional::CONDITION_BEGINSWITH | LEFT(`<cell address>`,LEN(`<value>`))=`<value>`\nConditional::CONDITION_ENDSWITH | RIGHT(`<cell address>`,LEN(`<value>`))=`<value>`\n\nThe `<cell address>` always references the top-left cell in the range of cells for this Conditional Formatting Rule.\nThe `<value>` should be wrapped in double quotes (`\"`) for string literals; but unquoted if it is a value stored in a cell reference, or a formula. \nThe `TextValue` Wizard handles defining these expressions for you.\n\nAs with the operand for the `CellValue` Wizard, you can specify the value passed to `contains()`, `doesNotContain()`, `beginsWith()` and `endsWith()` as a cell reference, or as a formula; and if you do so, then you need to pass a second argument to those methods specifying `Wizard::VALUE_TYPE_CELL` or `Wizard::VALUE_TYPE_FORMULA`.\nThe same rules also apply to \"pinning\" cell references as described above for the `CellValue` Wizard.\n\n```php\n$textWizard->beginsWith('$D$1', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($yellowStyle);\n```\n\n### DateValue Wizard\n\nFor the `DateValue` Wizard, we always need to provide an operator; but no value is required.\n\nCondition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes\n---|---|---|---|---\nConditional::CONDITION_TIMEPERIOD | Wizard::DATES_OCCURRING | Conditional::TIMEPERIOD_TODAY | today()\n| | Conditional::TIMEPERIOD_YESTERDAY | yesterday()\n| | Conditional::TIMEPERIOD_TOMORROW | tomorrow()\n| | Conditional::TIMEPERIOD_LAST_7_DAYS | last7Days()\n| |  | lastSevenDays() | synonym for `last7Days()`\n| | Conditional::TIMEPERIOD_LAST_WEEK | lastWeek()\n| | Conditional::TIMEPERIOD_THIS_WEEK | thisWeek()\n| | Conditional::TIMEPERIOD_NEXT_WEEK | nextWeek()\n| | Conditional::TIMEPERIOD_LAST_MONTH | lastMonth()\n| | Conditional::TIMEPERIOD_THIS_MONTH | thisMonth()\n| | Conditional::TIMEPERIOD_NEXT_MONTH | nextMonth()\n\nThe Conditional has no actual \"Operator Type\", and the condition/value should be an Excel formula, and with a custom `timePeriod` attribute. The Wizard should make it a lot easier to create these condition rules.\n\n![11-18-CF-Date-Occurring-Examples.png](./images/11-18-CF-Date-Occurring-Examples.png)\n\nThe above image shows a grid that demonstrate each of the possible Date Occurring rules, and was generated using [the code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/05_Date_Comparisons.php#L118 \"Conditional Formatting - Dates Occurring Comparisons\")\n\nTypical sample code wod look something like:\n```php\n$wizardFactory = new Wizard(\"E2:E19\");\n/** @var Wizard\\DateValue $dateWizard */\n$dateWizard = $wizardFactory->newRule(Wizard::DATES_OCCURRING);\n$conditionalStyles = [];\n\n$dateWizard->last7Days()\n    ->setStyle($yellowStyle);\n\n$conditionalStyles[] = $dateWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($dateWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\n\nThe actual Excel Expressions used (and that you would need to set manually if you were defining the Conditional yourself rather than using the Wizard) are listed below:\n\ntimePeriod Attribute | Condition Expression\n---|---\ntoday | FLOOR(`<cell address>`,1)=TODAY()-1\nyesterday | FLOOR(`<cell address>`,1)=TODAY()\ntomorrow | FLOOR(`<cell address>`,1)=TODAY()+1\nlast7Days | AND(TODAY()-FLOOR(`<cell address>`,1)<=6,FLOOR(`<cell address>`,1)<=TODAY())\nlastWeek | AND(TODAY()-ROUNDDOWN(`<cell address>`,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(`<cell address>`,0)<(WEEKDAY(TODAY())+7))\nthisWeek | AND(TODAY()-ROUNDDOWN(`<cell address>`,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(`<cell address>`,0)-TODAY()<=7-WEEKDAY(TODAY())) \nnextWeek | AND(ROUNDDOWN(`<cell address>`,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(`<cell address>`,0)-TODAY()<(15-WEEKDAY(TODAY())))\nlastMonth | AND(MONTH(`<cell address>`)=MONTH(EDATE(TODAY(),0-1)),YEAR(`<cell address>`)=YEAR(EDATE(TODAY(),0-1)))\nthisMonth | AND(MONTH(`<cell address>`)=MONTH(TODAY()),YEAR(`<cell address>`)=YEAR(TODAY()))\nnextMonth | AND(MONTH(`<cell address>`)=MONTH(EDATE(TODAY(),0+1)),YEAR(`<cell address>`)=YEAR(EDATE(TODAY(),0+1)))\n\nThe `<cell address>` always references the top-left cell in the range of cells for this Conditional Formatting Rule.\n\n\n### Blanks Wizard\n\nThis Wizard is used to define a simple boolean state rule, to determine whether a cell is blank or not blank.\nWhether created using the Wizard Factory with a rule type of `Wizard::BLANKS` or `Wizard::NOT_BLANKS`, the same `Blanks` Wizard is returned.\nThe only difference is that in the one case the rule state is pre-set for `CONDITION_CONTAINSBLANKS`, in the other it is pre-set for `CONDITION_NOTCONTAINSBLANKS`.\nHowever, you can switch between the two rules using the `isBlank()` and `notBlank()` methods; and it is only at the point when you call `getConditional()` that a Conditional will be returned based on the current state of the Wizard. \n\nCondition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes\n---|---|---|---|---\nConditional::CONDITION_CONTAINSBLANKS | Wizard::BLANKS | - | isBlank() | Default state\n| | | notBlank()\n| | | isEmpty() | Synonym for `isBlank()`\n| | | notEmpty() | Synonym for `notBlank()`\nConditional::CONDITION_NOTCONTAINSBLANKS | Wizard::NOT_BLANKS | - | notBlank()| Default state\n| | | isBlank()\n| | | isEmpty() | Synonym for `isBlank()`\n| | | notEmpty() | Synonym for `notBlank()`\n\nThe following code shows the same Blanks Wizard being used to create both Blank and Non-Blank Conditionals, using a pre-defined `$redStyle` Style object for Blanks, and a pre-defined `$greenStyle` Style object for Non-Blanks.  \n```php\n$cellRange = 'A2:B3';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Blanks $blanksWizard */\n$blanksWizard = $wizardFactory->newRule(Wizard::BLANKS);\n\n$blanksWizard->setStyle($redStyle);\n$conditionalStyles[] = $blanksWizard->getConditional();\n\n$blanksWizard->notBlank()\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $blanksWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($blanksWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\nThis example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/03_Blank_Comparisons.php#L58 \"Conditional Formatting - Blank Comparisons\") for the repo.\n\n![11-10-CF-Blanks-Example.png](./images/11-10-CF-Blanks-Example.png)\n\nNo operand/value is required for the Blanks Wizard methods; but the Conditional that is returned contains a defined expression with an Excel formula: \n\nBlanks Type | Condition Expression\n---|---\nisBlank() | LEN(TRIM(`<cell address>`))=0\nnotBlank() | LEN(TRIM(`<cell address>`))>0\n\nThe `<cell address>` always references the top-left cell in the range of cells for this Conditional Formatting Rule.\n\n\n### Errors Wizard\n\nLike the `Blanks` Wizard, this Wizard is used to define a simple boolean state rule, to determine whether a cell with a formula value results in an error or not.\nWhether created using the Wizard Factory with a rule type of `Wizard::ERRORS` or `Wizard::NOT_ERRORS`, the same `Errors` Wizard is returned.\nThe only difference is that in the one case the rule state is pre-set for `CONDITION_CONTAINSERRORS`, in the other it is pre-set for `CONDITION_NOTCONTAINSERRORS`.\nHowever, you can switch between the two rules using the `isError()` and `notError()` methods; and it is only at the point when you call `getConditional()` that a Conditional will be returned based on the current state of the Wizard.\n\nCondition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes\n---|---|---|---|---\nConditional::CONDITION_CONTAINSERRORS | Wizard::ERRORS | - | isError() | Default state\n| | | notError()\nConditional::CONDITION_NOTCONTAINSERRORS | Wizard::NOT_ERRORS | - | notError()| Default state\n| | | isError()\n\nThe following code shows the same Errors Wizard being used to create both Error and Non-Error Conditionals, using a pre-defined `$redStyle` Style object for Errors, and a pre-defined `$greenStyle` Style object for Non-Errors.\n```php\n$cellRange = 'C2:C6';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Errors $errorsWizard */\n$errorsWizard = $wizardFactory->newRule(Wizard::ERRORS);\n\n$errorsWizard->setStyle($redStyle);\n$conditionalStyles[] = $errorsWizard->getConditional();\n\n$errorsWizard->notError()\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $errorsWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($errorsWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\n\nThis example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/04_Error_Comparisons.php#L62 \"Conditional Formatting - Error Comparisons\") for the repo.\n\n![11-11-CF-Errors-Example.png](./images/11-11-CF-Errors-Example.png)\n\nNo operand/value is required for the Errors Wizard methods; but the Conditional that is returned contains a defined expression with an Excel formula:\n\nBlanks Type | Condition Expression\n---|---\nisError() | ISERROR(`<cell address>`)\nnotError() | NOT(ISERROR(`<cell address>`))\n\nThe `<cell address>` always references the top-left cell in the range of cells for this Conditional Formatting Rule.\n\n\n### Duplicates/Unique Wizard\n\nThis Wizard is used to define a simple boolean state rule, to determine whether a cell value matches any other cells with the same value within the conditional cell range, or if the value is unique in that range of cells.\nIt only has any meaning if it is applied to a range of cells, not to an individual cell.\nWhether created using the Wizard Factory with a rule type of `Wizard::DUPLICATES` or `Wizard::UNIQUE`, the same `Duplicates` Wizard is returned.\nThe only difference is that in the one case the rule state is pre-set for `CONDITION_DUPLICATES`, in the other it is pre-set for `CONDITION_UNIQUE`.\nHowever, you can switch between the two rules using the `duplicates()` and `unique()` methods; and it is only at the point when you call `getConditional()` that a Conditional will be returned based on the current state of the Wizard.\n\nCondition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes\n---|---|---|---|---\nConditional::CONDITION_DUPLICATES | Wizard::DUPLICATES | - | duplicates() | Default state\n| | | unique()\nConditional::CONDITION_UNIQUE | Wizard::UNIQUE | - | unique()| Default state\n| | | duplicates()\n\nThe following code shows the same Duplicates Wizard being used to create both Blank and Non-Blank Conditionals, using a pre-defined `$redStyle` Style object for Blanks, and a pre-defined `$greenStyle` Style object for Non-Blanks.\n```php\n$cellRange = 'A2:E6';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Duplicats $duplicatesWizard */\n$duplicatesWizard = $wizardFactory->newRule(Wizard::DUPLICATES);\n\n$duplicatesWizard->setStyle($redStyle);\n$conditionalStyles[] = $duplicatesWizard->getConditional();\n\n$duplicatesWizard->unique()\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $duplicatesWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($duplicatesWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\nThis example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/06_Duplicate_Comparisons.php#L66 \"Conditional Formatting - Duplicate/Unique Comparisons\") for the repo.\n\n![11-19-CF-Duplicates-Uniques-Examples.png](./images/11-19-CF-Duplicates-Uniques-Examples.png)\n\nDuplicates/Uniques Conditions are only identified by a Condition Type in Excel, with no operator and no expression.\n\n\n### Expression Wizard\n\nThe `Expression` Wizard expects to be provided with an Expression, an MS Excel formula that evaluates to either false or true.\n\nCondition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes\n---|---|---|---|---\nConditional::CONDITION_EXPRESSION | Wizard::EXPRESSION or Wizard::FORMULA | - | expression() | The argument is an Excel formula that evaluates to true or false\n | | | | formula() | Synonym for `expression()`\n\nJust as a simple example, here's a code snippet demonstrating expressions to determine if a cell contains an odd or an even number value:\n```php\n$cellRange = 'A2:C11';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Expression $expressionWizard */\n$expressionWizard = $wizardFactory->newRule(Wizard::EXPRESSION);\n\n$expressionWizard->expression('ISODD(A1)')\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $expressionWizard->getConditional();\n\n$expressionWizard->expression('ISEVEN(A1)')\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $expressionWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($expressionWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\nThis example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/07_Expression_Comparisons.php#L87 \"Conditional Formatting - Odd/Even Expression Comparisons\") for the repo.\n\n![11-14-CF-Expression-Example-Odd-Even.png](./images/11-14-CF-Expression-Example-Odd-Even.png)\n\nAs a more complicated example, let's look at a Sales Grid, and use conditional formatting to highlight sales in the \"USA\" region:\n\n```php\n$greenStyleMoney = clone $greenStyle;\n$greenStyleMoney->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_ACCOUNTING_USD);\n\n$cellRange = 'A17:D22';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Expression $expressionWizard */\n$expressionWizard = $wizardFactory->newRule(Wizard::EXPRESSION);\n\n$expressionWizard->expression('$C1=\"USA\"')\n    ->setStyle($greenStyleMoney);\n$conditionalStyles[] = $expressionWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($expressionWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\nThis example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/07_Expression_Comparisons.php#L107 \"Conditional Formatting - Sales Grid Expression Comparisons\") for the repo.\n\n![11-15-CF-Expression-Sales-Grid-1.png](./images/11-15-CF-Expression-Sales-Grid-1.png)\n\nOr we could apply multiple comparisons in the same expression, so to check for all sales for the \"USA\" region in \"Q4\", combining them using an Excel `AND()`:\n```php\n$expressionWizard->expression('AND($C1=\"USA\",$D1=\"Q4\")')\n    ->setStyle($greenStyleMoney);\n```\nThis example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/07_Expression_Comparisons.php#L121 \"Conditional Formatting - Sales Grid Expression Comparisons\") for the repo.\n\n![11-16-CF-Expression-Sales-Grid-2.png](./images/11-16-CF-Expression-Sales-Grid-2.png)\n\n## General Notes\n\n### Stop If True, and No Format Set\n\nNormally, Excel continues to check even after it finds a match. To tell it to stop once a match is found, 'stop if true' should be specified:\n```php\n$conditional->setStopIfTrue(true);\n```\n\nSometimes you want a matched cell to just show its unconditional format. This is most useful in conjunction with 'stop if true'.\n```php\n$conditional->setNoFormatSet(true);\n```\n\n### Changing the Cell Range\n\nIf you want to apply the same Conditional Rule/Style to several different areas on your spreadsheet, then you can do this using the `setCellRange()` method between calls to `getConditional()`.\n\n```php\n$wizardFactory = new Wizard();\n/** @var Wizard\\CellValue $wizard */\n$wizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n// Apply the wizard conditional to cell range A2:A10\n$cellRange = 'A2:A10';\n$conditionalStyles = [];\n$wizard->between('$B1', Wizard::VALUE_TYPE_CELL)\n    ->and('$C1', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($greenStyle);\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($wizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Apply the same wizard conditional to cell range E2:E10\n$cellRange = 'E2:E10';\n$wizard->setCellRange($cellRange);\n$conditionalStyles = [];\n$wizard->between('$B1', Wizard::VALUE_TYPE_CELL)\n    ->and('$C1', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($greenStyle);\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($wizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n```\n\nBecause we use cell `A1` as the baseline cell for relative references, the Wizard is able to handle the necessary adjustments for cell references and formulae to match the range of cells that it is being applied to when `getConditional()` is called, so it returns the correct expression.\n\n### Converting a Conditional to a Wizard\n\nIf you already have a `Conditional` object; you can create a Wizard from that Conditional to manipulate it using all the benefits of the Wizard before using that to create a new version of the Conditional:\n\n```php\n$wizard = Wizard\\CellValue::fromConditional($conditional, '$A$3:$E$8');\n$wizard->greaterThan(12.5);\n\n$newConditional = $wizard->getConditional();\n```\nThis is ok if you know what type of Conditional you want to convert; but it will throw an Exception if the Conditional is not of an appropriate type (ie. not a `cellIs`).\n\nIf you don't know what type of Conditional it is, then it's better to use the Wizard Factory `fromConditional()` method instead; and then test what type of Wizard object is returned: \n```php\n$wizard = Wizard::fromConditional($conditional, '$A$3:$E$8');\nif ($wizard instanceof Wizard\\CellValue) {\n    $wizard->greaterThan(12.5);\n\n    $newConditional = $wizard->getConditional();\n}\n```\n"
  },
  {
    "path": "docs/topics/creating-spreadsheet.md",
    "content": "# Creating a spreadsheet\n\n## The `Spreadsheet` class\n\nThe `Spreadsheet` class is the core of PhpSpreadsheet. It contains\nreferences to the contained worksheets, document security settings and\ndocument meta data.\n\nTo simplify the PhpSpreadsheet concept: the `Spreadsheet` class\nrepresents your workbook.\n\nTypically, you will create a workbook in one of two ways, either by\nloading it from a spreadsheet file, or creating it manually. A third\noption, though less commonly used, is cloning an existing workbook that\nhas been created using one of the previous two methods.\n\n### Loading a Workbook from a file\n\nDetails of the different spreadsheet formats supported, and the options\navailable to read them into a Spreadsheet object are described fully in\nthe [Reading Files](./reading-files.md) document.\n\n```php\n$inputFileName = './sampleData/example1.xls';\n\n/** Load $inputFileName to a Spreadsheet object **/\n$spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load($inputFileName);\n```\n\n### Creating a new workbook\n\nIf you want to create a new workbook, rather than load one from file,\nthen you simply need to instantiate it as a new Spreadsheet object.\n\n```php\n/** Create a new Spreadsheet Object **/\n$spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n```\n\nA new workbook will always be created with a single worksheet.\n\n## Clearing a Workbook from memory\n\nThe PhpSpreadsheet object contains cyclic references (e.g. the workbook\nis linked to the worksheets, and the worksheets are linked to their\nparent workbook) which cause problems when PHP tries to clear the\nobjects from memory when they are `unset()`, or at the end of a function\nwhen they are in local scope. The result of this is \"memory leaks\",\nwhich can easily use a large amount of PHP's limited memory.\n\nThis can only be resolved manually: if you need to unset a workbook,\nthen you also need to \"break\" these cyclic references before doing so.\nPhpSpreadsheet provides the `disconnectWorksheets()` method for this\npurpose.\n\n```php\n$spreadsheet->disconnectWorksheets();\nunset($spreadsheet);\n```\n"
  },
  {
    "path": "docs/topics/defined-names.md",
    "content": "# Defined Names\n\nThere are two types of Defined Names in MS Excel and other Spreadsheet formats: Named Ranges and Named Formulae. Between them, they can add a lot of power to your Spreadsheets, but they need to be used correctly.\n\nWorking examples for all the code shown in this document can be found in the `/samples/DefinedNames` folder.\n\n## Named Ranges\n\nA Named Range provides a name reference to a cell or a range of cells. You can then reference that cell or cells by that name within a formula.\n\nAs an example, I'll create a simple Calculator that adds Tax to a Price.\n\n```php\n// Set up some basic data\n$worksheet\n    ->setCellValue('A1', 'Tax Rate:')\n    ->setCellValue('B1', '=19%')\n    ->setCellValue('A3', 'Net Price:')\n    ->setCellValue('B3', 12.99)\n    ->setCellValue('A4', 'Tax:')\n    ->setCellValue('A5', 'Price including Tax:');\n\n// Define named ranges\n$spreadsheet->addNamedRange( new \\PhpOffice\\PhpSpreadsheet\\NamedRange('TAX_RATE', $worksheet, '=$B$1') );\n$spreadsheet->addNamedRange( new \\PhpOffice\\PhpSpreadsheet\\NamedRange('PRICE', $worksheet, '=$B$3') );\n\n// Reference that defined name in a formula\n$worksheet\n    ->setCellValue('B4', '=PRICE*TAX_RATE')\n    ->setCellValue('B5', '=PRICE*(1+TAX_RATE)');\n\necho sprintf(\n    'With a Tax Rate of %.2f and a net price of %.2f, Tax is %.2f and the gross price is %.2f',\n    $worksheet->getCell('B1')->getCalculatedValue(),\n    $worksheet->getCell('B3')->getValue(),\n    $worksheet->getCell('B4')->getCalculatedValue(),\n    $worksheet->getCell('B5')->getCalculatedValue()\n), PHP_EOL;\n```\n`/samples/DefinedNames/SimpleNamedRange.php`\n\nThis makes formulae in the generated spreadsheet easier to understand when viewing it them MS Excel. Using these Named Ranges (providing meaningful human-readable names for cells) makes the purpose of the formula immediately clear. We don't need to look for cell `B2` to see what it is, the name tells us.\n\nAnd, if the Tax Rate changes to 16%, then we only need to change the value in cell `B1` to the new Tax rate (`=16%`), or if we want to calculate the Tax Charges for a different net price, that will immediately be reflected in all the calculations that reference those Named Ranges. No matter whereabouts in the worksheet I used that Named Range, it always references the value in cell `B1`.\n\nIn fact, because we were required to specify a worksheet when we defined the name, that name is available from any worksheet within the spreadsheet, and always means cell `B2` in this worksheet (but see the notes on Named Range Scope below).\n\n### Absolute Named Ranges\n\nIn the above example, when I define the Named Range values (e.g. `'=$B$1'`), I used a `$` before both the row and the column. This made the Named Range an Absolute Reference.\n\nAnother example:\n```php\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50')\n    ->setCellValue('A3', 'Date')\n    ->setCellValue('B3', 'Hours')\n    ->setCellValue('C3', 'Charge');\n\n// Define named range using an absolute cell reference\n$spreadsheet->addNamedRange( new NamedRange('CHARGE_RATE', $worksheet, '=$B$1') );\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 4;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", \"=B{$row}*CHARGE_RATE\");\n    $row++;\n}\n$endRow = $row - 1;\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", \"=SUM(B{$startRow}:B{$endRow})\")\n    ->setCellValue(\"C{$row}\", \"=SUM(C{$startRow}:C{$endRow})\");\n\n\necho sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $worksheet->getCell(\"B{$row}\")->getCalculatedValue(),\n    $worksheet->getCell('B1')->getValue(),\n    $worksheet->getCell(\"C{$row}\")->getCalculatedValue()\n), PHP_EOL;\n```\n`/samples/DefinedNames/AbsoluteNamedRange.php`\n\nBecause the Named Range `CHARGE_RATE` is defined as an Absolute cell reference, then it always references cell `B2` no matter where it is referenced in a formula in the spreadsheet.\n\n### Relative Named Ranges\n\nThe previous example showed a simple timesheet using an Absolute Reference for the Charge Rate, used to calculate our billed charges to client.\n\nThe use of `B{$row}` in our formula (at least it will appear as an actual cell reference in MS Excel if we save the file and open it) requires a bit of mental agility to remember that column `B` is our hours for that day. Why can't we use another Named Range called something like `HOURS_PER_DAY` to make the formula more easily readable and meaningful.\n\nBut if we used an Absolute Named Range for `HOURS_PER_DAY`, then we'd need a different Named Range for each day (`MONDAY_HOURS_PER_DAY`, `TUESDAY_HOURS_PER_DAY`, etc), and a different formula for each day of the week; if we kept a monthly timesheet, we would have to defined a different Named Range for every day of the month... and that's a lot more trouble than it's worth, and quickly becomes unmanageable.\n\nThis is where Relative Named Ranges are very useful.\n\n```php\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50')\n    ->setCellValue('A3', 'Date')\n    ->setCellValue('B3', 'Hours')\n    ->setCellValue('C3', 'Charge');\n\n// Define named ranges\n// CHARGE_RATE is an absolute cell reference that always points to cell B1\n$spreadsheet->addNamedRange( new NamedRange('CHARGE_RATE', $worksheet, '=$B$1') );\n// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used \n$spreadsheet->addNamedRange( new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1') );\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 4;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", \"=HOURS_PER_DAY*CHARGE_RATE\");\n    $row++;\n}\n$endRow = $row - 1;\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", \"=SUM(B{$startRow}:B{$endRow})\")\n    ->setCellValue(\"C{$row}\", \"=SUM(C{$startRow}:C{$endRow})\");\n\n\necho sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $worksheet->getCell(\"B{$row}\")->getCalculatedValue(),\n    $worksheet->getCell('B1')->getValue(),\n    $worksheet->getCell(\"C{$row}\")->getCalculatedValue()\n), PHP_EOL;\n```\n`/samples/DefinedNames/RelativeNamedRange.php`\n\nThe difference in the cell definition for `HOURS_PER_DAY` (`'=$B1'`) is that we have a `$` in front of the column `B`, but not in front of the row number. The `$` makes the column absolute: no matter where in the worksheet we use this name, it always references column `B`. Without a `$`in front of the row number, we make the row number relative, relative to the row where the name appears in a formula, so it effectively replaces the `1` with its own row number when it executes the calculation.\n\nWhen it is used in the formula in row 4, then it references cell `B4`, when it appears in row 5, it references cell `B5`, and so on. Using a Relative Named Range, we can use the same Named Range to refer to cells in different rows (and/or different columns), so we can re-use the same Named Range to refer to different cells relative to the row (or column) where we use them.\n\n---\n\nNamed Ranges aren't limited to a single cell, but can point to a range of cells. A common use case might be to provide a series of column totals at the bottom of a dataset. Let's take our timesheet, and modify it just slightly to use a Relative column range for that purpose.\n\nI won't replicate the entire code from the previous example, because I'm only changing a few lines; but we just replace the block:\n```php\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", \"=SUM(B{$startRow}:B{$endRow})\")\n    ->setCellValue(\"C{$row}\", \"=SUM(C{$startRow}:C{$endRow})\");\n```\nwith:\n```php\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n$spreadsheet->addNamedRange( new NamedRange('COLUMN_DATA_VALUES', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\") );\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", \"=SUM(COLUMN_DATA_VALUES)\")\n    ->setCellValue(\"C{$row}\", \"=SUM(COLUMN_DATA_VALUES)\");\n```\n`/samples/DefinedNames/RelativeNamedRange2.php`\n\nNow that I've specified column as relative in the definition of `COLUMN_DATA_VALUES` with an address of column `A`, and the rows are absolute. When the same Relative Named Range is used in column `B`,it references cells in column `B` rather than `A`; and when it is used in column `C`, it references cells in column `C`.\n\nWhile we still have a piece of code (`\"=A\\${$startRow}:A\\${$endRow}\"`) that isn't easily human-readable, when we open the generated spreadsheet in MS Excel, the displayed formula in for the cells for the totals is immediately understandable.\n\n### Named Range Scope\n\nWhenever we define a Named Range, we are required to specify a worksheet, and that name is then available from any worksheet within the spreadsheet, and always means that cell or cell range in the specified worksheet.\n\n```php\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50');\n\n// Define a global named range on the first worksheet for our Charge Rate\n// CHARGE_RATE is an absolute cell reference that always points to cell B1\n// Because it is defined globally, it will still be usable from any worksheet in the spreadsheet\n$spreadsheet->addNamedRange( new NamedRange('CHARGE_RATE', $worksheet, '=$B$1') );\n\n// Create a second worksheet as our client timesheet\n$worksheet = $spreadsheet->addSheet(new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet($spreadsheet, 'Client Timesheet'));\n\n// Define named ranges\n// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n$spreadsheet->addNamedRange( new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1') );\n\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Date')\n    ->setCellValue('B1', 'Hours')\n    ->setCellValue('C1', 'Charge');\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 2;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", \"=HOURS_PER_DAY*CHARGE_RATE\");\n    $row++;\n}\n$endRow = $row - 1;\n\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n$spreadsheet->addNamedRange( new NamedRange('COLUMN_DATA_VALUES', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\") );\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", \"=SUM(COLUMN_DATA_VALUES)\")\n    ->setCellValue(\"C{$row}\", \"=SUM(COLUMN_DATA_VALUES)\");\n\necho sprintf(\n    'Worked %.2f hours at a rate of %s - Charge to the client is %.2f',\n    $worksheet->getCell(\"B{$row}\")->getCalculatedValue(),\n    $chargeRateCellValue = $spreadsheet\n        ->getSheetByName($spreadsheet->getNamedRange('CHARGE_RATE')->getWorksheet()->getTitle())\n        ->getCell($spreadsheet->getNamedRange('CHARGE_RATE')->getCellsInRange()[0])->getValue(),\n    $worksheet->getCell(\"C{$row}\")->getCalculatedValue()\n), PHP_EOL;\n```\n`/samples/DefinedNames/ScopedNamedRange.php`\n\nEven though `CHARGE_RATE` references a cell on a different worksheet, because is set as global (the default) it is accessible from any worksheet in the spreadsheet. so when we reference it in formulae on the second timesheet worksheet, we are able to access the value from that first worksheet and use it in our calculations.\n\n---\n\nHowever, a Named Range can be locally scoped so that it is only available when referenced from a specific worksheet, or it can be globally scoped. This means that you can use the same Named Range name with different values on different worksheets.\n\nBuilding further on our timesheet, perhaps we use a different worksheet for each client, and we use the same hourly rate when billing most of our clients; but for one particular client (perhaps doing work for a friend) we use a lower rate.\n\n```php\n$clients = [\n    'Client #1 - Full Hourly Rate' => [\n        '2020-0-06' => 2.5,\n        '2020-0-07' => 2.25,\n        '2020-0-08' => 6.0,\n        '2020-0-09' => 3.0,\n        '2020-0-10' => 2.25,\n    ],\n    'Client #2 - Full Hourly Rate' => [\n        '2020-0-06' => 1.5,\n        '2020-0-07' => 2.75,\n        '2020-0-08' => 0.0,\n        '2020-0-09' => 4.5,\n        '2020-0-10' => 3.5,\n    ],\n    'Client #3 - Reduced Hourly Rate' => [\n        '2020-0-06' => 3.5,\n        '2020-0-07' => 2.5,\n        '2020-0-08' => 1.5,\n        '2020-0-09' => 0.0,\n        '2020-0-10' => 1.25,\n    ],\n];\n\nforeach ($clients as $clientName => $workHours) {\n    $worksheet = $spreadsheet->addSheet(new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet($spreadsheet, $clientName));\n\n    // Set up some basic data for a timesheet\n    $worksheet\n        ->setCellValue('A1', 'Charge Rate/hour:')\n        ->setCellValue('B1', '7.50')\n        ->setCellValue('A3', 'Date')\n        ->setCellValue('B3', 'Hours')\n        ->setCellValue('C3', 'Charge');\n    ;\n\n    // Define named ranges\n    // CHARGE_RATE is an absolute cell reference that always points to cell B1\n    $spreadsheet->addNamedRange( new NamedRange('CHARGE_RATE', $worksheet, '=$B$1', true) );\n    // HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n    $spreadsheet->addNamedRange( new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1', true) );\n\n    // Populate the Timesheet\n    $startRow = 4;\n    $row = $startRow;\n    foreach ($workHours as $date => $hours) {\n        $worksheet\n            ->setCellValue(\"A{$row}\", $date)\n            ->setCellValue(\"B{$row}\", $hours)\n            ->setCellValue(\"C{$row}\", \"=HOURS_PER_DAY*CHARGE_RATE\");\n        $row++;\n    }\n    $endRow = $row - 1;\n\n    // COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n    $spreadsheet->addNamedRange( new NamedRange('COLUMN_TOTAL', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\", true) );\n\n    ++$row;\n    $worksheet\n        ->setCellValue(\"B{$row}\", \"=SUM(COLUMN_TOTAL)\")\n        ->setCellValue(\"C{$row}\", \"=SUM(COLUMN_TOTAL)\");\n}\n$spreadsheet->removeSheetByIndex(0);\n\n// Set the reduced charge rate for our special client\n$worksheet\n    ->setCellValue(\"B1\", 4.5);\n\nforeach ($spreadsheet->getAllSheets() as $worksheet) {\n    echo sprintf(\n        'Worked %.2f hours for \"%s\" at a rate of %.2f - Charge to the client is %.2f',\n        $worksheet->getCell(\"B{$row}\")->getCalculatedValue(),\n        $worksheet->getTitle(),\n        $worksheet->getCell('B1')->getValue(),\n        $worksheet->getCell(\"C{$row}\")->getCalculatedValue()\n    ), PHP_EOL;\n}\n```\n`/samples/DefinedNames/ScopedNamedRange2.php`\n\nNow we are creating three worksheets for each of three different clients. Because each Named Range is linked to a worksheet, we need to create three sets of Named Ranges, so that we don't simply reference the cells on only one of the worksheets; but because we are locally scoping them (note the extra boolean argument used when we define the Named Ranges) we can use the same names on each worksheet, and they will reference the correct cells when we use them in our formulae on that worksheet.\n\nWhen Named Ranges are being evaluated, the logic looks first to see if there is a locally scoped Named Range defined for the current worksheet. If there is, then that is the Named Range that will be used in the calculation. If no locally scoped Named Range with that name is found, the logic then looks to see if there is a globally scoped Named Range definition, and will use that if it is found. If no Named Range of the required name is found scoped to the current worksheet, or globally scoped, then a `#NAME` error will be returned.\n\n## Named Formulae\n\nA Named Formula is a stored formula, or part of a formula, that can be referenced in cells by name, and re-used in many different places within the spreadsheet.\n\nAs an example, I'll modify the simple Tax Calculator that I created as my example for Named Ranges.\n\n```php\n// Add some Named Formulae\n// The first to store our tax rate\n$spreadsheet->addNamedFormula(new NamedFormula('TAX_RATE', $worksheet, '=19%'));\n// The second to calculate the Tax on a Price value (Note that `PRICE` is defined later as a Named Range)\n$spreadsheet->addNamedFormula(new NamedFormula('TAX', $worksheet, '=PRICE*TAX_RATE'));\n\n// Set up some basic data\n$worksheet\n    ->setCellValue('A1', 'Tax Rate:')\n    ->setCellValue('B1', '=TAX_RATE')\n    ->setCellValue('A3', 'Net Price:')\n    ->setCellValue('B3', 19.99)\n    ->setCellValue('A4', 'Tax:')\n    ->setCellValue('A5', 'Price including Tax:');\n\n// Define a named range that we can use in our formulae\n$spreadsheet->addNamedRange(new NamedRange('PRICE', $worksheet, '=$B$3'));\n\n// Reference the defined formulae in worksheet formulae\n$worksheet\n    ->setCellValue('B4', '=TAX')\n    ->setCellValue('B5', '=PRICE+TAX');\n\necho sprintf(\n    'With a Tax Rate of %.2f and a net price of %.2f, Tax is %.2f and the gross price is %.2f',\n    $worksheet->getCell('B1')->getCalculatedValue(),\n    $worksheet->getCell('B3')->getValue(),\n    $worksheet->getCell('B4')->getCalculatedValue(),\n    $worksheet->getCell('B5')->getCalculatedValue()\n), PHP_EOL;\n```\n`/samples/DefinedNames/SimpleNamedFormula.php`\n\nThere are a few points to note here:\n\nFirstly. we are actually storing the tax rate in a named formula (`TAX_RATE`) rather than as a cell value. When we display the tax rate in cell `B1`, we are really storing an instruction for MS Excel to evaluate the formula and display the result in that cell.\n\nThen we are using a Named Formula `TAX` that references both another Named Formula (`TAX_RATE`) and a Named Range (`PRICE`) and executes a calculation using them both (`PRICE * TAX_RATE`).\n\nFinally, we are using the formula `TAX` in two different contexts. Once to display the tax value (in cell `B4`); and a second time as part of another formula (`PRICE + TAX`) in cell `B5`.\n\n---\n\nNamed Formulae aren't just restricted tosimple mathematics, but can include MS EXcel functions as well to provide a lot of flexibility; and they can reference values on other worksheets.\n\n```php\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\nsetYearlyData($worksheet,'2019', $data2019);\n$worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet));\nsetYearlyData($worksheet,'2020', $data2020);\n$worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet));\nsetYearlyData($worksheet,'2020', [], 'GROWTH');\n\nfunction setYearlyData(Worksheet $worksheet, string $year, $yearlyData, ?string $title = null) {\n    // Set up some basic data\n    $worksheetTitle = $title ?: $year;\n    $worksheet\n        ->setTitle($worksheetTitle)\n        ->setCellValue('A1', 'Month')\n        ->setCellValue('B1', $worksheetTitle  === 'GROWTH' ? 'Growth' : 'Sales')\n        ->setCellValue('C1', $worksheetTitle  === 'GROWTH' ? 'Profit Growth' : 'Margin')\n        ->setCellValue('A2', Date::stringToExcel(\"{$year}-01-01\"));\n    for ($row = 3; $row <= 13; ++$row) {\n        $worksheet->setCellValue(\"A{$row}\", \"=NEXT_MONTH\");\n    }\n\n    if (!empty($yearlyData)) {\n        $worksheet->fromArray($yearlyData, null, 'B2');\n    } else {\n        for ($row = 2; $row <= 13; ++$row) {\n            $worksheet->setCellValue(\"B{$row}\", \"=GROWTH\");\n            $worksheet->setCellValue(\"C{$row}\", \"=PROFIT_GROWTH\");\n        }\n    }\n\n    $worksheet->getStyle('A1:C1')\n        ->getFont()->setBold(true);\n    $worksheet->getStyle('A2:A13')\n        ->getNumberFormat()\n        ->setFormatCode('mmmm');\n    $worksheet->getStyle('B2:C13')\n        ->getNumberFormat()\n        ->setFormatCode($worksheetTitle  === 'GROWTH' ? '0.00%' : '_-€* #,##0_-');\n}\n\n// Add some Named Formulae\n// The first to store our tax rate\n$spreadsheet->addNamedFormula(new NamedFormula('NEXT_MONTH', $worksheet, \"=EDATE(OFFSET(\\$A1,-1,0),1)\"));\n$spreadsheet->addNamedFormula(new NamedFormula('GROWTH', $worksheet, \"=IF('2020'!\\$B1=\\\"\\\",\\\"-\\\",(('2020'!\\$B1/'2019'!\\$B1)-1))\"));\n$spreadsheet->addNamedFormula(new NamedFormula('PROFIT_GROWTH', $worksheet, \"=IF('2020'!\\$C1=\\\"\\\",\\\"-\\\",(('2020'!\\$C1/'2019'!\\$C1)-1))\"));\n\nfor ($row = 2; $row<=7; ++$row) {\n    $month = $worksheet->getCell(\"A{$row}\")->getFormattedValue();\n    $growth = $worksheet->getCell(\"B{$row}\")->getFormattedValue();\n    $profitGrowth = $worksheet->getCell(\"C{$row}\")->getFormattedValue();\n\n    echo \"Growth for {$month} is {$growth}, with a Profit Growth of {$profitGrowth}\", PHP_EOL;\n}\n```\n`/samples/DefinedNames/CrossWorksheetNamedFormula.php`\n\nHere we're creating two Named Formulae that both use the `IF()` function, and that compare values on two different worksheets, and calculate the percentage difference between the two. We're also creating a Named Formula that uses the `OFFSET()` function to reference the cell immediately above the current Relative cell reference.\n\n## Combining Named Ranges and Formulae\n\nFor a slightly more complex example combining Named Ranges and Named Formulae, we can build on our client timesheet.\n\n```php\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50')\n    ->setCellValue('A3', 'Date')\n    ->setCellValue('B3', 'Hours')\n    ->setCellValue('C3', 'Charge');\n\n// Define named ranges\n// CHARGE_RATE is an absolute cell reference that always points to cell B1\n$spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1'));\n// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));\n// Set up the formula for calculating the daily charge\n$spreadsheet->addNamedFormula(new NamedFormula('DAILY_CHARGE', null, '=HOURS_PER_DAY*CHARGE_RATE'));\n// Set up the formula for calculating the column totals\n$spreadsheet->addNamedFormula(new NamedFormula('COLUMN_TOTALS', null, '=SUM(COLUMN_DATA_VALUES)'));\n\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 4;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", '=DAILY_CHARGE');\n    ++$row;\n}\n$endRow = $row - 1;\n\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n$spreadsheet->addNamedRange(new NamedRange('COLUMN_DATA_VALUES', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\"));\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", '=COLUMN_TOTALS')\n    ->setCellValue(\"C{$row}\", '=COLUMN_TOTALS');\n\necho sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $worksheet->getCell(\"B{$row}\")->getCalculatedValue(),\n    $worksheet->getCell('B1')->getValue(),\n    $worksheet->getCell(\"C{$row}\")->getCalculatedValue()\n), PHP_EOL;\n```\n`/samples/DefinedNames/NamedFormulaeAndRanges.php`\n\nThe main point to notice in this example is that you must specify a Worksheet for Named Ranges, but that it isn't required for Named Formulae; in fact, specifying a Worksheet for named Formulae can lead to MS Excel errors when a saved file is opened. Generally, it is far safer to specify a null Worksheet value when creating a Named Formula, unless it references cell values explicitly, or you wish to scope it to that Worksheet.\n\nIt also doesn't matter what order we define our Named Ranges and Formulae, even when some are dependent on others: this only matters when we try to use them in a cell calculation, or when we save the file; and as long as every Defined Name has been defined at that point, then it isn't important. In this case, we couldn't define `COLUMN_DATA_VALUES` until we new the range of rows that it needed to contain; but we could still define the `COLUMN_TOTALS` formula before that.\n\n## Additional Comments\n\n### Helper\n\nIn all the examples so far, we have explicitly used the `NamedRange` and `NamedFormula` classes, and the Spreadsheet's `addNamedRange()` and `addNamedFormula()` methods, e.g.\n```php\n$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));\n```\nHowever, this can lead to errors if we accidentally set a formula value for a Named Range, or a range value for a Named Formula.\n\nAs a helper, the DefinedName class provides a static method that can identify whether the value expression is a Range or a Formula, and instantiate the appropriate class.\n```php\n$this->spreadsheet->addDefinedName(\n    DefinedName::createInstance('FOO', $this->spreadsheet->getSheetByName('Sheet #2'), '=16%', true)\n);\n```\n\n### Naming Names\n\nThe names that you assign to Defined Name must follow the following set of rules:\n\n - The first character of a name must be one of the following characters:\n     - letter (including UTF-8 letters)\n     - underscore (`_`)\n - Remaining characters in the name can be\n     - letters (including UTF-8 letters)\n     - numbers (including UTF-8 numbers)\n     - periods (`.`)\n     - underscore characters (`_`)\n - The following are not allowed:\n     - Space characters are not allowed as part of a name.\n     - Names can't look like cell addresses, such as A35 or R2C2\n - Names are not case sensitive. For example, `North` and `NORTH` are treated as the same name.\n\n### Limitations\n\nPHPSpreadsheet doesn't yet fully validate the names that you use, so it is possible to create a spreadsheet in PHPSpreadsheet that will break when you save and try to open it in MS Excel; or that will break PHPSpreadsheet when they are referenced in a cell.\nSo please be sensible when creating names, and follow the rules listed above.\n\n---\n\nThere is nothing to stop you creating a Defined Name that matches an existing Function name\n```php\n$spreadsheet->addNamedFormula(new NamedFormula('SUM', $worksheet, '=SUM(A1:E5)'));\n```\nAnd this will work without problems in MS Excel. However, it is not guaranteed to work correctly in PHPSpreadsheet; and will certainly cause confusion for anybody reading it; so it is not recommended. Names exist to give clarity to the person reading the spreadsheet, and a cell containing `=SUM` is even harder to understand (what is it the sum of?) than a cell containing `=SUM(B4:B8)`. Use names that provide meaning, like `SUM_OF_WORKED_HOURS`.\n\n---\n\nYou cannot have a Named Range and a Named Formula with the same name, unless they are differently scoped.\n\n---\n\nMS Excel uses some \"special tricks\" to simulate Relative Named Ranges where the row or column comes before the current row or column, useful if you want to get column totals that don't include the current cell. These \"tricks\" aren't supported by PHPSpreadsheet, but can be simulated using the `OFFSET()` function in a Named Formula.\nIn our `RelativeNamedRange2.php` example, we explicitly created the `COLUMN_DATA_VALUES` Named Range using only the rows that we knew should be included, so that we weren't including the current row (where we were displaying the total) and creating a cyclic reference:\n```php\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n$spreadsheet->addNamedRange(new NamedRange('COLUMN_DATA_VALUES', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\"));\n```\nWe could instead have created a Named Function using `OFFSET()` to specify just the start row, and offset the end row by -1 row:\n```php\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n// To avoid including the current row,or having to hard-code the range itself (as we did in the previous example)\n//    we wrap it in a named formula using the OFFSET() function\n$spreadsheet->addNamedFormula(new NamedFormula('COLUMN_DATA_VALUES', $worksheet, \"=OFFSET(A\\$4:A1, -1, 0)\"));\n```\nas demonstrated in example `RelativeNamedRangeAsFunction.php`.\n"
  },
  {
    "path": "docs/topics/file-formats.md",
    "content": "# File Formats\n\nPhpSpreadsheet can read a number of different spreadsheet and file\nformats, although not all features are supported by all of the readers.\nCheck the [features cross\nreference](../references/features-cross-reference.md) for a list that\nidentifies which features are supported by which readers.\n\nCurrently, PhpSpreadsheet supports the following File Types for Reading:\n\n### Xls\n\nThe Microsoft Excel™ Binary file format (BIFF5 and BIFF8) is a binary\nfile format that was used by Microsoft Excel™ between versions 95 and 2003.\nThe format is supported (to various extents) by most spreadsheet\nprograms. BIFF files normally have an extension of .xls. Documentation\ndescribing the format can be [read online](https://msdn.microsoft.com/en-us/library/cc313154(v=office.12).aspx)\nor [downloaded as PDF](https://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/%5BMS-XLS%5D.pdf).\n\n### Xml\n\nMicrosoft Excel™ 2003 included options for a file format called\nSpreadsheetML. This file is a zipped XML document. It is not very\ncommon, but its core features are supported. Documentation for the\nformat can be [read online](https://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx)\nthough it’s sadly rather sparse in its detail.\n\n### Xlsx\n\nMicrosoft Excel™ 2007 shipped with a new file format, namely Microsoft\nOffice Open XML SpreadsheetML, and Excel 2010 extended this still\nfurther with its new features such as sparklines. These files typically\nhave an extension of .xlsx. This format is based around a zipped\ncollection of eXtensible Markup Language (XML) files. Microsoft Office\nOpen XML SpreadsheetML is mostly standardized in [ECMA 376](https://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm)\nand ISO 29500.\n\n### Ods\n\naka Open Document Format (ODF) or OASIS, this is the OpenOffice.org XML\nfile format for spreadsheets. It comprises a zip archive including\nseveral components all of which are text files, most of these with\nmarkup in the eXtensible Markup Language (XML). It is the standard file\nformat for OpenOffice.org Calc and StarCalc, and files typically have an\nextension of .ods. The published specification for the file format is\navailable from [the OASIS Open Office XML Format Technical Committee web\npage](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office).\nOther information is available from [the OpenOffice.org XML File Format\nweb page](https://www.openoffice.org/xml/), part of the\nOpenOffice.org project.\n\n### Slk\n\nThis is the Microsoft Multiplan Symbolic Link Interchange (SYLK) file\nformat. Multiplan was a predecessor to Microsoft Excel™. Files normally\nhave an extension of .slk. While not common, there are still a few\napplications that generate SYLK files as a cross-platform option,\nbecause (despite being limited to a single worksheet) it is a simple\nformat to implement, and supports some basic data and cell formatting\noptions (unlike CSV files).\n\n### Gnumeric\n\nThe [Gnumeric file format](https://help.gnome.org/users/gnumeric/stable/sect-file-formats.html.en#file-format-gnumeric)\nis used by the Gnome Gnumeric spreadsheet\napplication, and typically files have an extension of `.gnumeric`. The\nfile contents are stored using eXtensible Markup Language (XML) markup,\nand the file is then compressed using the GNU project's gzip compression\nlibrary.\n\n### Csv\n\nComma Separated Value (CSV) file format is a common structuring strategy\nfor text format files. In CSV files, each line in the file represents a\nrow of data and (within each line of the file) the different data fields\n(or columns) are separated from one another using a comma (`,`). If a\ndata field contains a comma, then it should be enclosed (typically in\nquotation marks (`\"`). Sometimes tabs `\\t`, or the pipe symbol (`|`), or a\nsemi-colon (`;`) are used as separators instead of a comma, although\nother symbols can be used. Because CSV is a text-only format, it doesn't\nsupport any data formatting options.\n\n\"CSV\" is not a single, well-defined format (although see \n[RFC 4180](https://www.rfc-editor.org/rfc/rfc4180.html) for\none definition that is commonly used). Rather, in practice the term\n\"CSV\" refers to any file that:\n\n-   is plain text using a character set such as ASCII, Unicode, EBCDIC,\n    or Shift JIS,\n-   consists of records (typically one record per line),\n-   with the records divided into fields separated by delimiters\n    (typically a single reserved character such as comma, semicolon, or\n    tab,\n-   where every record has the same sequence of fields.\n\nWithin these general constraints, many variations are in use. Therefore\n\"CSV\" files are not entirely portable. Nevertheless, the variations are\nfairly small, and many implementations allow users to glance at the file\n(which is feasible because it is plain text), and then specify the\ndelimiter character(s), quoting rules, etc.\n\n**Warning:** Microsoft Excel™ will open .csv files, but depending on the\nsystem's regional settings, it may expect a semicolon as a separator\ninstead of a comma, since in some languages the comma is used as the\ndecimal separator. Also, many regional versions of Excel will not be\nable to deal with Unicode characters in a CSV file.\n\n### Html\n\nHyperText Markup Language (HTML) is the main markup language for\ncreating web pages and other information that can be displayed in a web\nbrowser. Files typically have an extension of .html or .htm. HTML markup\nprovides a means to create structured documents by denoting structural\nsemantics for text such as headings, paragraphs, lists, links, quotes\nand other items. Since 1996, the HTML specifications have been\nmaintained, with input from commercial software vendors, by the World\nWide Web Consortium (W3C). However, in 2000, HTML also became an\ninternational standard (ISO/IEC 15445:2000). HTML 4.01 was published in\nlate 1999, with further errata published through 2001. In 2004\ndevelopment began on HTML5 in the Web Hypertext Application Technology\nWorking Group (WHATWG), which became a joint deliverable with the W3C in 2008.\n\n"
  },
  {
    "path": "docs/topics/memory_saving.md",
    "content": "# Memory saving\n\nPhpSpreadsheet uses an average of about 1k per cell (1.6k on 64-bit PHP) in your worksheets, so\nlarge workbooks can quickly use up available memory. Cell caching\nprovides a mechanism that allows PhpSpreadsheet to maintain the cell\nobjects in a smaller size of memory, or off-memory (eg: on disk, in APCu,\nmemcache or redis). This allows you to reduce the memory usage for large\nworkbooks, although at a cost of speed to access cell data.\n\nBy default, PhpSpreadsheet holds all cell objects in memory, but\nyou can specify alternatives by providing your own\n[PSR-16](https://www.php-fig.org/psr/psr-16/) implementation. PhpSpreadsheet keys\nare automatically namespaced, and cleaned up after use, so a single cache\ninstance may be shared across several usage of PhpSpreadsheet or even with other\ncache usages.\n\nTo enable cell caching, you must provide your own implementation of cache like so:\n\n```php\n$cache = new MyCustomPsr16Implementation();\n\n\\PhpOffice\\PhpSpreadsheet\\Settings::setCache($cache);\n```\n\nA separate cache is maintained for each individual worksheet, and is\nautomatically created when the worksheet is instantiated based on the\nsettings that you have configured. You cannot change\nthe configuration settings once you have started to read a workbook, or\nhave created your first worksheet.\n\n## Beware of TTL\n\nAs opposed to common cache concept, PhpSpreadsheet data cannot be re-generated\nfrom scratch. If some data is stored and later is not retrievable,\nPhpSpreadsheet will throw an exception.\n\nThat means that the data stored in cache **must not be deleted** by a\nthird-party or via TTL mechanism.\n\nSo be sure that TTL is either de-activated or long enough to cover the entire\nusage of PhpSpreadsheet.\n\n## Common use cases\n\nPhpSpreadsheet does not ship with alternative cache implementation. It is up to\nyou to select the most appropriate implementation for your environment. You\ncan either implement [PSR-16](https://www.php-fig.org/psr/psr-16/) from scratch,\nor use [pre-existing libraries](https://packagist.org/search/?q=psr-16).\n\nOne such library is [PHP Cache](https://www.php-cache.com/) which\nprovides a wide range of alternatives. Refers to their documentation for\ndetails, but here are a few suggestions that should get you started.\n\n### APCu\n\nRequire the packages into your project:\n\n```sh\ncomposer require cache/simple-cache-bridge cache/apcu-adapter\n```\n\nConfigure PhpSpreadsheet with something like:\n\n```php\n$pool = new \\Cache\\Adapter\\Apcu\\ApcuCachePool();\n$simpleCache = new \\Cache\\Bridge\\SimpleCache\\SimpleCacheBridge($pool);\n\n\\PhpOffice\\PhpSpreadsheet\\Settings::setCache($simpleCache);\n```\n\n### Redis\n\nRequire the packages into your project:\n\n```sh\ncomposer require cache/simple-cache-bridge cache/redis-adapter\n```\n\nConfigure PhpSpreadsheet with something like:\n\n```php\n$client = new \\Redis();\n$client->connect('127.0.0.1', 6379);\n$pool = new \\Cache\\Adapter\\Redis\\RedisCachePool($client);\n$simpleCache = new \\Cache\\Bridge\\SimpleCache\\SimpleCacheBridge($pool);\n\n\\PhpOffice\\PhpSpreadsheet\\Settings::setCache($simpleCache);\n```\n\n### Memcache\n\nRequire the packages into your project:\n\n```sh\ncomposer require cache/simple-cache-bridge cache/memcache-adapter\n```\n\nConfigure PhpSpreadsheet with something like:\n\n```php\n$client = new \\Memcache();\n$client->connect('localhost', 11211);\n$pool = new \\Cache\\Adapter\\Memcache\\MemcacheCachePool($client);\n$simpleCache = new \\Cache\\Bridge\\SimpleCache\\SimpleCacheBridge($pool);\n\n\\PhpOffice\\PhpSpreadsheet\\Settings::setCache($simpleCache);\n```\n"
  },
  {
    "path": "docs/topics/migration-from-PHPExcel.md",
    "content": "# Migration from PHPExcel\n\nPhpSpreadsheet introduced many breaking changes by introducing\nnamespaces and renaming some classes. To help you migrate existing\nproject, a tool was written to replace all references to PHPExcel\nclasses to their new names. But there are also manual changes that\nneed to be done.\n\n## Automated tool\n\n[RectorPHP](https://github.com/rectorphp/rector) can be used to automatically migrate your codebase.\nNote that this support has been dropped from current releases of rector,\nso you need to require an earlier release to do this.\nAssuming that your files to be migrated live\nin `src/`, you can run the migration like so:\n\n```sh\ncomposer require rector/rector:0.15.10 rector/rector-phpoffice phpoffice/phpspreadsheet --dev\n\n# this creates rector.php config\nvendor/bin/rector init \n```\n\nAdd `PHPOfficeSetList` set to `rector.php`\n\n```php\ndeclare(strict_types=1);\n\nuse Rector\\Config\\RectorConfig;\nuse Rector\\PHPOffice\\Set\\PHPOfficeSetList;\n\nreturn static function (RectorConfig $rectorConfig): void {\n    $rectorConfig->sets([\n        PHPOfficeSetList::PHPEXCEL_TO_PHPSPREADSHEET\n    ]);\n};\n```\n\nAnd run Rector on your code:\n\n```sh\nvendor/bin/rector process src\n```\n\nFor more details, see\n[rector-phpoffice](https://github.com/rectorphp/rector-phpoffice).\n\n## Manual changes\n\nRectorPHP should take care of everything, but if somehow it does not work, you can review/apply the following manual changes\n\n### Renamed readers and writers\n\nWhen using `IOFactory::createReader()`, `IOFactory::createWriter()` and\n`IOFactory::identify()`, the reader/writer short names are used. Those were\nchanged, along as their corresponding class, to remove ambiguity:\n\nBefore           | After\n-----------------|---------\n`'CSV'`          | `'Csv'`\n`'Excel2003XML'` | `'Xml'`\n`'Excel2007'`    | `'Xlsx'`\n`'Excel5'`       | `'Xls'`\n`'Gnumeric'`     | `'Gnumeric'`\n`'HTML'`         | `'Html'`\n`'OOCalc'`       | `'Ods'`\n`'OpenDocument'` | `'Ods'`\n`'PDF'`          | `'Pdf'`\n`'SYLK'`         | `'Slk'`\n\n### Simplified IOFactory\n\nThe following methods :\n\n- `PHPExcel_IOFactory::getSearchLocations()`\n- `PHPExcel_IOFactory::setSearchLocations()`\n- `PHPExcel_IOFactory::addSearchLocation()`\n\nwere replaced by `IOFactory::registerReader()` and `IOFactory::registerWriter()`. That means\nIOFactory now relies on classes autoloading.\n\nBefore:\n\n```php\n// Before\n\\PHPExcel_IOFactory::addSearchLocation($type, $location, $classname);\n\n// After\n\\PhpOffice\\PhpSpreadsheet\\IOFactory::registerReader($type, $classname);\n```\n\n### Removed deprecated things\n\n#### Worksheet::duplicateStyleArray()\n\n``` php\n// Before\n$worksheet->duplicateStyleArray($styles, $range, $advanced);\n\n// After\n$worksheet->getStyle($range)->applyFromArray($styles, $advanced);\n```\n\n#### DataType::dataTypeForValue()\n\n``` php\n// Before\nDataType::dataTypeForValue($value);\n\n// After\nDefaultValueBinder::dataTypeForValue($value);\n```\n\n#### Conditional::getCondition()\n\n``` php\n// Before\n$conditional->getCondition();\n\n// After\n$conditional->getConditions()[0];\n```\n\n#### Conditional::setCondition()\n\n``` php\n// Before\n$conditional->setCondition($value);\n\n// After\n$conditional->setConditions($value);\n```\n\n#### Worksheet::getDefaultStyle()\n\n``` php\n// Before\n$worksheet->getDefaultStyle();\n\n// After\n$worksheet->getParent()->getDefaultStyle();\n```\n\n#### Worksheet::setDefaultStyle()\n\n``` php\n// Before\n$worksheet->setDefaultStyle($value);\n\n// After\n$worksheet->getParent()->getDefaultStyle()->applyFromArray([\n    'font' => [\n        'name' => $pValue->getFont()->getName(),\n        'size' => $pValue->getFont()->getSize(),\n    ],\n]);\n\n```\n\n#### Worksheet::setSharedStyle()\n\n``` php\n// Before\n$worksheet->setSharedStyle($sharedStyle, $range);\n\n// After\n$worksheet->duplicateStyle($sharedStyle, $range);\n```\n\n#### Worksheet::getSelectedCell()\n\n``` php\n// Before\n$worksheet->getSelectedCell();\n\n// After\n$worksheet->getSelectedCells();\n```\n\n#### Writer\\Xls::setTempDir()\n\n``` php\n// Before\n$writer->setTempDir();\n\n// After, there is no way to set temporary storage directory anymore\n```\n\n### Autoloader\n\nThe class `PHPExcel_Autoloader` was removed entirely and is replaced by composer\nautoloading mechanism.\n\n### Writing PDF\n\nPDF libraries must be installed via composer. And the following methods were removed\nand are replaced by `IOFactory::registerWriter()` instead:\n\n- `PHPExcel_Settings::getPdfRenderer()`\n- `PHPExcel_Settings::setPdfRenderer()`\n- `PHPExcel_Settings::getPdfRendererName()`\n- `PHPExcel_Settings::setPdfRendererName()`\n\nBefore:\n\n```php\n\\PHPExcel_Settings::setPdfRendererName(PHPExcel_Settings::PDF_RENDERER_MPDF);\n\\PHPExcel_Settings::setPdfRenderer($somePath);\n$writer = \\PHPExcel_IOFactory::createWriter($spreadsheet, 'PDF');\n```\n\nAfter:\n\n```php\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Mpdf');\n\n// Or alternatively\n\\PhpOffice\\PhpSpreadsheet\\IOFactory::registerWriter('Pdf', \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf::class);\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Pdf');\n\n// Or alternatively\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf($spreadsheet);\n```\n\n### Rendering charts\n\nWhen rendering charts for HTML or PDF outputs, the process was simplified.\nAnd, while JpGraph support is still available,\nthe version distributed via Composer is no longer maintained,\nso you would need to install the current version manually.\nIf you rely on this package, please consider\ncontributing patches either to JpGraph or another `IRenderer` implementation (a good\ncandidate might be [CpChart](https://github.com/szymach/c-pchart)).\n\nThe package [mitoteam/jpgraph](https://github.com/mitoteam/jpgraph)\nis distributed via Composer, and is fully compatible with Jpgraph.\nWe recommend that it be used for rendering.\n\nBefore:\n\n```php\n$rendererName = \\PHPExcel_Settings::CHART_RENDERER_JPGRAPH;\n$rendererLibrary = 'jpgraph3.5.0b1/src/';\n$rendererLibraryPath = '/php/libraries/Charts/' . $rendererLibrary;\n\n\\PHPExcel_Settings::setChartRenderer($rendererName, $rendererLibraryPath);\n```\n\nAfter:\n\nRequire the dependency via composer:\n\n```sh\ncomposer require mitoteam/jpgraph\n```\n\nAnd then:\n\n```php\nSettings::setChartRenderer(\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer::class);\n```\n\n### PclZip and ZipArchive\n\nSupport for PclZip were dropped in favor of the more complete and modern\n[PHP extension ZipArchive](https://php.net/manual/en/book.zip.php).\nSo the following were removed:\n\n- `PclZip`\n- `PHPExcel_Settings::setZipClass()`\n- `PHPExcel_Settings::getZipClass()`\n- `PHPExcel_Shared_ZipArchive`\n- `PHPExcel_Shared_ZipStreamWrapper`\n\n### Cell caching\n\nCell caching was heavily refactored to leverage\n[PSR-16](https://www.php-fig.org/psr/psr-16/). That means most classes\nrelated to that feature were removed:\n\n- `PHPExcel_CachedObjectStorage_APC`\n- `PHPExcel_CachedObjectStorage_DiscISAM`\n- `PHPExcel_CachedObjectStorage_ICache`\n- `PHPExcel_CachedObjectStorage_Igbinary`\n- `PHPExcel_CachedObjectStorage_Memcache`\n- `PHPExcel_CachedObjectStorage_Memory`\n- `PHPExcel_CachedObjectStorage_MemoryGZip`\n- `PHPExcel_CachedObjectStorage_MemorySerialized`\n- `PHPExcel_CachedObjectStorage_PHPTemp`\n- `PHPExcel_CachedObjectStorage_SQLite`\n- `PHPExcel_CachedObjectStorage_SQLite3`\n- `PHPExcel_CachedObjectStorage_Wincache`\n\nIn addition to that, `\\PhpOffice\\PhpSpreadsheet::getCellCollection()` was renamed\nto `\\PhpOffice\\PhpSpreadsheet::getCoordinates()` and\n`\\PhpOffice\\PhpSpreadsheet::getCellCacheController()` to\n`\\PhpOffice\\PhpSpreadsheet::getCellCollection()` for clarity.\n\nRefer to [the new documentation](./memory_saving.md) to see how to migrate.\n\n### Dropped conditionally returned cell\n\nFor all the following methods, it is not possible to change the type of\nreturned value. They will always return the Worksheet and never the Cell or Rule:\n\n- Worksheet::setCellValue()\n- Worksheet::setCellValueByColumnAndRow() (*deprecated*)\n- Worksheet::setCellValueExplicit()\n- Worksheet::setCellValueExplicitByColumnAndRow() (*deprecated*)\n- Worksheet::addRule()\n\nMigration would be similar to:\n\n``` php\n// Before\n$cell = $worksheet->setCellValue('A1', 'value', true);\n\n// After\n$cell = $worksheet->getCell('A1')->setValue('value');\n```\n\n### Standardized keys for styling\n\nArray keys used for styling have been standardized for a more coherent experience.\nIt now uses the same wording and casing as the getter and setter:\n\n```php\n// Before\n$style = [\n    'numberformat' => [\n        'code' => NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE,\n    ],\n    'font' => [\n        'strike' => true,\n        'superScript' => true,\n        'subScript' => true,\n    ],\n    'alignment' => [\n        'rotation' => 90,\n        'readorder' => Alignment::READORDER_RTL,\n        'wrap' => true,\n    ],\n    'borders' => [\n        'diagonaldirection' => Borders::DIAGONAL_BOTH,\n        'allborders' => [\n            'style' => Border::BORDER_THIN,\n        ],\n    ],\n    'fill' => [\n        'type' => Fill::FILL_GRADIENT_LINEAR,\n        'startcolor' => [\n            'argb' => 'FFA0A0A0',\n        ],\n        'endcolor' => [\n            'argb' => 'FFFFFFFF',\n        ],\n    ],\n];\n\n// After\n$style = [\n    'numberFormat' => [\n        'formatCode' => NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE,\n    ],\n    'font' => [\n        'strikethrough' => true,\n        'superscript' => true,\n        'subscript' => true,\n    ],\n    'alignment' => [\n        'textRotation' => 90,\n        'readOrder' => Alignment::READORDER_RTL,\n        'wrapText' => true,\n    ],\n    'borders' => [\n        'diagonalDirection' => Borders::DIAGONAL_BOTH,\n        'allBorders' => [\n            'borderStyle' => Border::BORDER_THIN,\n        ],\n    ],\n    'fill' => [\n        'fillType' => Fill::FILL_GRADIENT_LINEAR,\n        'startColor' => [\n            'argb' => 'FFA0A0A0',\n        ],\n        'endColor' => [\n            'argb' => 'FFFFFFFF',\n        ],\n    ],\n];\n```\n\n### Dedicated class to manipulate coordinates\n\nMethods to manipulate coordinates that used to exists in `PHPExcel_Cell` were extracted\nto a dedicated new class `\\PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate`. The methods are:\n\n- `absoluteCoordinate()`\n- `absoluteReference()`\n- `buildRange()`\n- `columnIndexFromString()`\n- `coordinateFromString()`\n- `extractAllCellReferencesInRange()`\n- `getRangeBoundaries()`\n- `mergeRangesInCollection()`\n- `rangeBoundaries()`\n- `rangeDimension()`\n- `splitRange()`\n- `stringFromColumnIndex()`\n\n### Column index based on 1\n\nColumn indexes are now based on 1. So column `A` is the index `1`. This is consistent\nwith rows starting at 1 and Excel function `COLUMN()` that returns `1` for column `A`.\nSo the code must be adapted with something like:\n\n```php\n// Before\n$cell = $worksheet->getCellByColumnAndRow($column, $row);\n\n// Use StringHelper::stringIncrement($column) rather than ++$column if using Php8.5+.\nfor ($column = 0; $column < $max; ++$column) {\n    $worksheet->setCellValueByColumnAndRow($column, $row, 'value');\n}\n\n// After\n$cell = $worksheet->getCell([$column + 1, $row]);\n\n// Use StringHelper::stringIncrement($column) rather than ++$column if using Php8.5+.\nfor ($column = 1; $column <= $max; ++$column) {\n    $worksheet->setCellValue([$column, $row], 'value');\n}\n```\n\nAll the following methods are affected, and all are now deprecated (see example above for how to replace them):\n\n- `PHPExcel_Worksheet::cellExistsByColumnAndRow()`\n- `PHPExcel_Worksheet::freezePaneByColumnAndRow()`\n- `PHPExcel_Worksheet::getCellByColumnAndRow()`\n- `PHPExcel_Worksheet::getColumnDimensionByColumn()`\n- `PHPExcel_Worksheet::getCommentByColumnAndRow()`\n- `PHPExcel_Worksheet::getStyleByColumnAndRow()`\n- `PHPExcel_Worksheet::insertNewColumnBeforeByIndex()`\n- `PHPExcel_Worksheet::mergeCellsByColumnAndRow()`\n- `PHPExcel_Worksheet::protectCellsByColumnAndRow()`\n- `PHPExcel_Worksheet::removeColumnByIndex()`\n- `PHPExcel_Worksheet::setAutoFilterByColumnAndRow()`\n- `PHPExcel_Worksheet::setBreakByColumnAndRow()`\n- `PHPExcel_Worksheet::setCellValueByColumnAndRow()`\n- `PHPExcel_Worksheet::setCellValueExplicitByColumnAndRow()`\n- `PHPExcel_Worksheet::setSelectedCellByColumnAndRow()`\n- `PHPExcel_Worksheet::stringFromColumnIndex()`\n- `PHPExcel_Worksheet::unmergeCellsByColumnAndRow()`\n- `PHPExcel_Worksheet::unprotectCellsByColumnAndRow()`\n- `PHPExcel_Worksheet_PageSetup::addPrintAreaByColumnAndRow()`\n- `PHPExcel_Worksheet_PageSetup::setPrintAreaByColumnAndRow()`\n\n### Removed default values\n\nDefault values for many methods were removed when it did not make sense. Typically,\nsetter methods should not have default values. For a complete list of methods and\ntheir original default values, see [that commit](https://github.com/PHPOffice/PhpSpreadsheet/commit/033a4bdad56340795a5bf7ec3c8a2fde005cda24).\n"
  },
  {
    "path": "docs/topics/reading-and-writing-to-file.md",
    "content": "# Reading and writing to file\n\nAs you already know from the [architecture](./architecture.md#readers-and-writers),\nreading and writing to a persisted storage is not possible using the base PhpSpreadsheet classes.\nFor this purpose, PhpSpreadsheet provides readers and writers, which are\nimplementations of `\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader` and\n`\\PhpOffice\\PhpSpreadsheet\\Writer\\IWriter`.\n\n## \\PhpOffice\\PhpSpreadsheet\\IOFactory\n\nThe PhpSpreadsheet API offers multiple methods to create a\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader` or\n`\\PhpOffice\\PhpSpreadsheet\\Writer\\IWriter` instance:\n\nDirect creation via `\\PhpOffice\\PhpSpreadsheet\\IOFactory`. All examples\nunderneath demonstrate the direct creation method. Note that you can\nalso use the `\\PhpOffice\\PhpSpreadsheet\\IOFactory` class to do this.\n\n### Creating `\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader` using `\\PhpOffice\\PhpSpreadsheet\\IOFactory`\n\nThere are 2 methods for reading in a file into PhpSpreadsheet: using\nautomatic file type resolving or explicitly.\n\nAutomatic file type resolving checks the different\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader` distributed with\nPhpSpreadsheet. If one of them can load the specified file name, the\nfile is loaded using that `\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader`.\nExplicit mode requires you to specify which\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader` should be used.\n\nYou can create a `\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader` instance using\n`\\PhpOffice\\PhpSpreadsheet\\IOFactory` in automatic file type resolving\nmode using the following code sample:\n\n```php\n$spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load(\"05featuredemo.xlsx\");\n```\n\nA typical use of this feature is when you need to read files uploaded by\nyour users, and you don’t know whether they are uploading xls or xlsx\nfiles.\n\nIf you need to set some properties on the reader, (e.g. to only read\ndata, see more about this later), then you may instead want to use this\nvariant:\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReaderForFile(\"05featuredemo.xlsx\");\n$reader->setReadDataOnly(true);\n$reader->load(\"05featuredemo.xlsx\");\n```\n\nYou can create a `\\PhpOffice\\PhpSpreadsheet\\Reader\\IReader` instance using\n`\\PhpOffice\\PhpSpreadsheet\\IOFactory` in explicit mode using the following\ncode sample:\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader(\"Xlsx\");\n$spreadsheet = $reader->load(\"05featuredemo.xlsx\");\n```\n\nNote that automatic type resolving mode is slightly slower than explicit\nmode.\n\n### Creating `\\PhpOffice\\PhpSpreadsheet\\Writer\\IWriter` using `\\PhpOffice\\PhpSpreadsheet\\IOFactory`\n\nYou can create a `\\PhpOffice\\PhpSpreadsheet\\Writer\\IWriter` instance using\n`\\PhpOffice\\PhpSpreadsheet\\IOFactory`:\n\n```php\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, \"Xlsx\");\n$writer->save(\"05featuredemo.xlsx\");\n```\n\n## Excel 2007 (SpreadsheetML) file format\n\nXlsx file format is the main file format of PhpSpreadsheet. It allows\noutputting the in-memory spreadsheet to a .xlsx file.\n\n### \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\n\n#### Reading a spreadsheet\n\nYou can read an .xlsx file using the following code:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n$spreadsheet = $reader->load(\"05featuredemo.xlsx\");\n```\n\n#### Read data only\n\nYou can set the option setReadDataOnly on the reader, to instruct the\nreader to ignore styling, data validation, … and just read cell data:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n$reader->setReadDataOnly(true);\n$spreadsheet = $reader->load(\"05featuredemo.xlsx\");\n```\n\n#### Read specific sheets only\n\nYou can set the option setLoadSheetsOnly on the reader, to instruct the\nreader to only load the sheets with a given name:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n$reader->setLoadSheetsOnly([\"Sheet 1\", \"My special sheet\"]);\n$spreadsheet = $reader->load(\"05featuredemo.xlsx\");\n```\n\n#### Read specific cells only\n\nYou can set the option setReadFilter on the reader, to instruct the\nreader to only load the cells which match a given rule. A read filter\ncan be any class which implements\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter`. By default, all cells are\nread using the `\\PhpOffice\\PhpSpreadsheet\\Reader\\DefaultReadFilter`.\n\nThe following code will only read row 1 and rows 20 – 30 of any sheet in\nthe Excel file:\n\n```php\nclass MyReadFilter implements \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter {\n\n    public function readCell($columnAddress, $row, $worksheetName = '') {\n        // Read title row and rows 20 - 30\n        if ($row == 1 || ($row >= 20 && $row <= 30)) {\n            return true;\n        }\n        return false;\n    }\n}\n\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n$reader->setReadFilter( new MyReadFilter() );\n$spreadsheet = $reader->load(\"06largescale.xlsx\");\n```\n\nRead Filtering does not renumber cell rows and columns. If you filter to read only rows 100-200, cells that you read will still be numbered A100-A200, not A1-A101. Cells A1-A99 will not be loaded, but if you then try to call `getCell()` for a cell outside your loaded range, then PHPSpreadsheet will create a new cell with a null value.\n\nMethods such as `toArray()` assume that all cells in a spreadsheet has been loaded from A1, so will return null values for rows and columns that fall outside your filter range: it is recommended that you keep track of the range that your filter has requested, and use `rangeToArray()` instead.\n\n\n### \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\n\n#### Writing a spreadsheet\n\nYou can write an .xlsx file using the following code:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($spreadsheet);\n$writer->save(\"05featuredemo.xlsx\");\n```\n\n#### Formula pre-calculation\n\nBy default, this writer pre-calculates all formulas in the spreadsheet.\nThis can be slow on large spreadsheets, and maybe even unwanted. You can\nhowever disable formula pre-calculation:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($spreadsheet);\n$writer->setPreCalculateFormulas(false);\n$writer->save(\"05featuredemo.xlsx\");\n```\n\n**Note** Formulas will still be calculated in any column set to be autosized\neven if pre-calculated is set to false\n\n**Note** Prior to release 3.7.0, the use of this feature will cause Excel to be used in a mode where opening a sheet saved in this manner *might* not automatically recalculate a cell's formula when a cell used it the formula changes. Furthermore, that behavior might be applied to all spreadsheets open at the time. To avoid this behavior, add the following statement after `setPreCalculateFormulas` above:\n```php\n$writer->setForceFullCalc(false);\n```\nStarting with Release 4.0.0, the property's default is changed to `false` and that statement is no longer be required. The property can be set to `null` if the old behavior is needed.\n\n#### Office 2003 compatibility pack\n\nBecause of a bug in the Office2003 compatibility pack, there can be some\nsmall issues when opening Xlsx spreadsheets (mostly related to formula\ncalculation). You can enable Office2003 compatibility with the following\ncode:\n```php\n    $writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($spreadsheet);\n    $writer->setOffice2003Compatibility(true);\n    $writer->save(\"05featuredemo.xlsx\");\n```\n\n**Office2003 compatibility option should only be used when needed** because \nit disables several Office2007 file format options, resulting in a\nlower-featured Office2007 spreadsheet.\n\n#### Maximum Column Width\n\nIn the Xlsx User Interface, the user cannot set a column width > 255.\nNevertheless, it will honor a higher value if supplied in the Xml.\nPhpSpreadsheet will, by default, allow values > 255 to be written.\nHowever, Excel's behavior, restricting the value to 255, can be emulated:\n```php\n    $writer->setRestrictMaxColumnWidth(true);\n```\n\n### Form Control Fields\n\nPhpSpreadsheet offers limited support for Forms Controls (buttons,\ncheckboxes, etc.). The support is available only for Excel 2007 format,\nand is offered solely to allow loading a spreadsheet with such controls\nand saving it as a new file.\nSupport is not available for adding such elements to the spreadsheet,\nnor even to locate them to determine their properties\n(so you can't modify or delete them).\nModifications to a worksheet with controls are \"caveat emptor\";\nsome modifications will work correctly,\nbut others are very likely to cause problems,\ne.g. adding a comment to the worksheet,\nor inserting or deleting rows or columns in a manner that would\ncause the controls to change location.\n\n## Excel 5 (BIFF) file format\n\nXls file format is the old Excel file format, implemented in\nPhpSpreadsheet to provide a uniform manner to create both .xlsx and .xls\nfiles. It is basically a modified version of [PEAR\nSpreadsheet\\_Excel\\_Writer](https://pear.php.net/package/Spreadsheet_Excel_Writer),\nalthough it has been extended and has fewer limitations and more\nfeatures than the old PEAR library. This can read all BIFF versions that\nuse OLE2: BIFF5 (introduced with office 95) through BIFF8, but cannot\nread earlier versions.\n\nXls file format will not be developed any further, it just provides an\nadditional file format for PhpSpreadsheet.\n\n**Excel5 (BIFF) limitations** Please note that BIFF file format has some\nlimits regarding to styling cells and handling large spreadsheets via\nPHP.\n\n### \\PhpOffice\\PhpSpreadsheet\\Reader\\Xls\n\n#### Reading a spreadsheet\n\nYou can read an .xls file using the following code:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xls();\n$spreadsheet = $reader->load(\"05featuredemo.xls\");\n```\n\n#### Read data only\n\nYou can set the option setReadDataOnly on the reader, to instruct the\nreader to ignore styling, data validation, … and just read cell data:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xls();\n$reader->setReadDataOnly(true);\n$spreadsheet = $reader->load(\"05featuredemo.xls\");\n```\n\n#### Read specific sheets only\n\nYou can set the option setLoadSheetsOnly on the reader, to instruct the\nreader to only load the sheets with a given name:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xls();\n$reader->setLoadSheetsOnly([\"Sheet 1\", \"My special sheet\"]);\n$spreadsheet = $reader->load(\"05featuredemo.xls\");\n```\n\n#### Read specific cells only\n\nYou can set the option setReadFilter on the reader, to instruct the\nreader to only load the cells which match a given rule. A read filter\ncan be any class which implements\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter`. By default, all cells are\nread using the `\\PhpOffice\\PhpSpreadsheet\\Reader\\DefaultReadFilter`.\n\nThe following code will only read row 1 and rows 20 to 30 of any sheet\nin the Excel file:\n\n```php\nclass MyReadFilter implements \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter {\n\n    public function readCell($columnAddress, $row, $worksheetName = '') {\n        // Read title row and rows 20 - 30\n        if ($row == 1 || ($row >= 20 && $row <= 30)) {\n            return true;\n        }\n        return false;\n    }\n}\n\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xls();\n$reader->setReadFilter( new MyReadFilter() );\n$spreadsheet = $reader->load(\"06largescale.xls\");\n```\n\n### \\PhpOffice\\PhpSpreadsheet\\Writer\\Xls\n\n#### Writing a spreadsheet\n\nYou can write an .xls file using the following code:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xls($spreadsheet);\n$writer->save(\"05featuredemo.xls\");\n```\n\n## Excel 2003 XML file format\n\nExcel 2003 XML file format is a file format which can be used in older\nversions of Microsoft Excel.\n\n**Excel 2003 XML limitations** Please note that Excel 2003 XML format\nhas some limits regarding to styling cells and handling large\nspreadsheets via PHP.\n\n### \\PhpOffice\\PhpSpreadsheet\\Reader\\Xml\n\n#### Reading a spreadsheet\n\nYou can read an Excel 2003 .xml file using the following code:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xml();\n$spreadsheet = $reader->load(\"05featuredemo.xml\");\n```\n\n#### Read specific cells only\n\nYou can set the option setReadFilter on the reader, to instruct the\nreader to only load the cells which match a given rule. A read filter\ncan be any class which implements\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter`. By default, all cells are\nread using the `\\PhpOffice\\PhpSpreadsheet\\Reader\\DefaultReadFilter`.\n\nThe following code will only read row 1 and rows 20 to 30 of any sheet\nin the Excel file:\n\n```php\nclass MyReadFilter implements \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter {\n\n    public function readCell($columnAddress, $row, $worksheetName = '') {\n        // Read title row and rows 20 - 30\n        if ($row == 1 || ($row >= 20 && $row <= 30)) {\n            return true;\n        }\n        return false;\n    }\n\n}\n\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xml();\n$reader->setReadFilter( new MyReadFilter() );\n$spreadsheet = $reader->load(\"06largescale.xml\");\n```\n\n## Symbolic LinK (SYLK)\n\nSymbolic Link (SYLK) is a Microsoft file format typically used to\nexchange data between applications, specifically spreadsheets. SYLK\nfiles conventionally have a .slk suffix. Composed of only displayable\nANSI characters, it can be easily created and processed by other\napplications, such as databases.\n\n**SYLK limitations** Please note that SYLK file format has some limits\nregarding to styling cells and handling large spreadsheets via PHP.\n\n### \\PhpOffice\\PhpSpreadsheet\\Reader\\Slk\n\n#### Reading a spreadsheet\n\nYou can read an .slk file using the following code:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Slk();\n$spreadsheet = $reader->load(\"05featuredemo.slk\");\n```\n\n#### Read specific cells only\n\nYou can set the option setReadFilter on the reader, to instruct the\nreader to only load the cells which match a given rule. A read filter\ncan be any class which implements\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter`. By default, all cells are\nread using the `\\PhpOffice\\PhpSpreadsheet\\Reader\\DefaultReadFilter`.\n\nThe following code will only read row 1 and rows 20 to 30 of any sheet\nin the SYLK file:\n\n```php\nclass MyReadFilter implements \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter {\n\n    public function readCell($columnAddress, $row, $worksheetName = '') {\n        // Read title row and rows 20 - 30\n        if ($row == 1 || ($row >= 20 && $row <= 30)) {\n            return true;\n        }\n        return false;\n    }\n\n}\n\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Slk();\n$reader->setReadFilter( new MyReadFilter() );\n$spreadsheet = $reader->load(\"06largescale.slk\");\n```\n\n## Open/Libre Office (.ods)\n\nOpen Office or Libre Office .ods files are the standard file format for\nOpen Office or Libre Office Calc files.\n\n### \\PhpOffice\\PhpSpreadsheet\\Reader\\Ods\n\n#### Reading a spreadsheet\n\nYou can read an .ods file using the following code:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Ods();\n$spreadsheet = $reader->load(\"05featuredemo.ods\");\n```\n\n#### Read specific cells only\n\nYou can set the option setReadFilter on the reader, to instruct the\nreader to only load the cells which match a given rule. A read filter\ncan be any class which implements\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter`. By default, all cells are\nread using the `\\PhpOffice\\PhpSpreadsheet\\Reader\\DefaultReadFilter`.\n\nThe following code will only read row 1 and rows 20 to 30 of any sheet\nin the Calc file:\n\n```php\nclass MyReadFilter implements \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter {\n\n    public function readCell($columnAddress, $row, $worksheetName = '') {\n        // Read title row and rows 20 - 30\n        if ($row == 1 || ($row >= 20 && $row <= 30)) {\n            return true;\n        }\n        return false;\n    }\n\n}\n\n$reader = new PhpOffice\\PhpSpreadsheet\\Reader\\Ods();\n$reader->setReadFilter( new MyReadFilter() );\n$spreadsheet = $reader->load(\"06largescale.ods\");\n```\n\n## CSV (Comma Separated Values)\n\nCSV (Comma Separated Values) are often used as an import/export file\nformat with other systems. PhpSpreadsheet allows reading and writing to\nCSV files.\n\n**CSV limitations** Please note that CSV file format has some limits\nregarding to styling cells, number formatting, ...\n\n### \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv\n\n#### Reading a CSV file\n\nYou can read a .csv file using the following code:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv();\n$spreadsheet = $reader->load('sample.csv');\n```\n\nYou can also treat a string as if it were the contents of a CSV file as follows:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv();\n$spreadsheet = $reader->loadSpreadsheetFromString($data);\n```\n\n#### Setting CSV options\n\nOften, CSV files are not really \"comma separated\", or use semicolon (`;`)\nas a separator. You can set some options before reading a CSV\nfile.\n\nThe separator will be auto-detected, so in most cases it should not be necessary\nto specify it. But in cases where auto-detection does not fit the use-case, then\nit can be set manually.\n\nNote that `\\PhpOffice\\PhpSpreadsheet\\Reader\\Csv` by default assumes that\nthe loaded CSV file is UTF-8 encoded. If you are reading CSV files that\nwere created in Microsoft Office Excel the correct input encoding may\nrather be Windows-1252 (CP1252). Always make sure that the input\nencoding is set appropriately.\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv();\n$reader->setInputEncoding('CP1252');\n$reader->setDelimiter(';');\n$reader->setEnclosure('');\n$reader->setSheetIndex(0);\n\n$spreadsheet = $reader->load(\"sample.csv\");\n```\nYou may also let PhpSpreadsheet attempt to guess the input encoding.\nIt will do so based on a test for BOM (UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,\nor UTF-32LE),\nor by doing heuristic tests for those encodings, falling back to a\nspecifiable encoding (default is CP1252) if all of those tests fail.\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv();\n$encoding = \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv::guessEncoding('sample.csv');\n// or, e.g. $encoding = \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv::guessEncoding(\n//                      'sample.csv', 'ISO-8859-2');\n$reader->setInputEncoding($encoding);\n$reader->setDelimiter(';');\n$reader->setEnclosure('');\n$reader->setSheetIndex(0);\n\n$spreadsheet = $reader->load('sample.csv');\n```\n\nYou can also set the reader to guess the encoding\nrather than calling guessEncoding directly. In this case,\nthe user-settable fallback encoding is used if nothing else works.\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv();\n$reader->setInputEncoding(\\PhpOffice\\PhpSpreadsheet\\Reader\\Csv::GUESS_ENCODING);\n$reader->setFallbackEncoding('ISO-8859-2');  // default CP1252 without this statement\n$reader->setDelimiter(';');\n$reader->setEnclosure('');\n$reader->setSheetIndex(0);\n\n$spreadsheet = $reader->load('sample.csv');\n```\n\nThe CSV reader will normally not load null strings into the spreadsheet.\nTo load them:\n```php\n$reader->setPreserveNullString(true);\n```\n\nFinally, you can set a callback to be invoked when the constructor is executed,\neither through `new Csv()` or `IOFactory::load`,\nand have that callback set the customizable attributes to whatever\ndefaults are appropriate for your environment.\n\n```php\nfunction constructorCallback(\\PhpOffice\\PhpSpreadsheet\\Reader\\Csv $reader): void\n{\n    $reader->setInputEncoding(\\PhpOffice\\PhpSpreadsheet\\Reader\\Csv::GUESS_ENCODING);\n    $reader->setFallbackEncoding('ISO-8859-2');\n    $reader->setDelimiter(',');\n    $reader->setEnclosure('\"');\n    // Following represents how Excel behaves better than the default escape character\n    $reader->setEscapeCharacter('');\n}\n\n\\PhpOffice\\PhpSpreadsheet\\Reader\\Csv::setConstructorCallback('constructorCallback');\n$spreadsheet = \\PhpSpreadsheet\\IOFactory::load('sample.csv');\n```\n\n#### Read a specific worksheet\n\nCSV files can only contain one worksheet. Therefore, you can specify\nwhich sheet to read from CSV:\n\n```php\n$reader->setSheetIndex(0);\n```\n\n#### Read into existing spreadsheet\n\nWhen working with CSV files, it might occur that you want to import CSV\ndata into an existing `Spreadsheet` object. The following code loads a\nCSV file into an existing `$spreadsheet` containing some sheets, and\nimports onto the 6th sheet:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv();\n$reader->setDelimiter(';');\n$reader->setEnclosure('\"');\n$reader->setSheetIndex(5);\n\n$reader->loadIntoExisting(\"05featuredemo.csv\", $spreadsheet);\n```\n\n#### Line endings\n\nLine endings for Unix (`\\n`) and Windows (`\\r\\n`) are supported.\n\nSupport for Mac line endings  (`\\r`) is deprecated since PHP 8.1,\nand is scheduled to remain deprecated for all later PHP8 releases;\nPhpSpreadsheet will continue to support them for PHP 8.*.\nSupport is scheduled to be dropped with PHP 9;\nPhpSpreadsheet will then no longer handle CSV files\nwith Mac line endings correctly.\n\nYou can suppress testing for Mac line endings as follows:\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv();\n$reader->setTestAutoDetect(false);\n```\nStarting with Release 4.0.0, the property defaults to `false`,\nso the statement above is no longer needed. The old behavior\ncan be enabled by setting the property to `true`.\n\n### \\PhpOffice\\PhpSpreadsheet\\Writer\\Csv\n\n#### Writing a CSV file\n\nYou can write a .csv file using the following code:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Csv($spreadsheet);\n$writer->save(\"05featuredemo.csv\");\n```\n\n#### Setting CSV options\n\nOften, CSV files are not really \"comma separated\", or use semicolon (`;`)\nas a separator. You can set some options before writing a CSV\nfile:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Csv($spreadsheet);\n$writer->setDelimiter(';');\n$writer->setEnclosure('\"');\n$writer->setLineEnding(\"\\r\\n\");\n$writer->setSheetIndex(0);\n\n$writer->save(\"05featuredemo.csv\");\n```\n\n#### CSV enclosures\n\nBy default, all CSV fields are wrapped in the enclosure character,\nwhich defaults to double-quote.\nYou can change to use the enclosure character only when required:\n\n``` php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Csv($spreadsheet);\n$writer->setEnclosureRequired(false);\n\n$writer->save(\"05featuredemo.csv\");\n```\n\n#### Write a specific worksheet\n\nCSV files can only contain one worksheet. Therefore, you can specify\nwhich sheet to write to CSV:\n\n```php\n$writer->setSheetIndex(0);\n```\n\n#### Formula pre-calculation\n\nBy default, this writer pre-calculates all formulas in the spreadsheet.\nThis can be slow on large spreadsheets, and maybe even unwanted. You can\nhowever disable formula pre-calculation:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Csv($spreadsheet);\n$writer->setPreCalculateFormulas(false);\n$writer->save(\"05featuredemo.csv\");\n```\n\n#### Writing UTF-8 CSV files\n\nCSV files are written in UTF-8. If they do not contain characters\noutside the ASCII range, nothing else need be done.\nHowever, if such characters are in the file,\nor if the file starts with the 2 characters 'ID',\nit should explicitly include a BOM file header;\nif it doesn't, Excel will not interpret those characters correctly.\nThis can be enabled by using the following code:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Csv($spreadsheet);\n$writer->setUseBOM(true);\n$writer->save(\"05featuredemo.csv\");\n```\n\n#### Writing CSV files with desired encoding\n\nIt can be set to output with the encoding that can be specified by PHP's mb_convert_encoding.\nThis looks like the following code:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Csv($spreadsheet);\n$writer->setUseBOM(false);\n$writer->setOutputEncoding('SJIS-WIN');\n$writer->save(\"05featuredemo.csv\");\n```\n\n#### Writing CSV files with varying numbers of columns\n\nA CSV file can have a different number of columns in each row. This\ndiffers from the default behavior when saving as a .csv in Excel, but\ncan be enabled in PhpSpreadsheet by using the following code:\n\n``` php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Csv($spreadsheet);\n$writer->setVariableColumns(true);\n$writer->save(\"05featuredemo.csv\");\n```\n\n#### Decimal and thousands separators\n\nIf the worksheet you are exporting contains numbers with decimal or\nthousands separators then you should think about what characters you\nwant to use for those before doing the export.\n\nBy default PhpSpreadsheet looks up in the server's locale settings to\ndecide what characters to use. But to avoid problems it is recommended\nto set the characters explicitly as shown below.\n\nEnglish users will want to use this before doing the export:\n\n```php\n\\PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper::setDecimalSeparator('.');\n\\PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper::setThousandsSeparator(',');\n```\n\nGerman users will want to use the opposite values.\n\n```php\n\\PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper::setDecimalSeparator(',');\n\\PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper::setThousandsSeparator('.');\n```\n\nNote that the above code sets decimal and thousand separators as global\noptions. This also affects how HTML and PDF is exported.\n\n## HTML\n\nPhpSpreadsheet allows you to read or write a spreadsheet as HTML format,\nfor quick representation of the data in it to anyone who does not have a\nspreadsheet application on their PC, or loading files saved by other\nscripts that simply create HTML markup and give it a .xls file\nextension.\n\n**HTML limitations** Please note that HTML file format has some limits\nregarding to styling cells, number formatting, ...\nDeclared charsets compatible with ASCII in range 00-7F, and UTF-8/16 with BOM are supported.\n\n### \\PhpOffice\\PhpSpreadsheet\\Reader\\Html\n\n#### Reading a spreadsheet\n\nYou can read an .html or .htm file using the following code:\n\n```php\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Html();\n\n$spreadsheet = $reader->load(\"05featuredemo.html\");\n```\n\n**HTML limitations** Please note that HTML reader is still experimental\nand does not yet support merged cells or nested tables cleanly\n\n### \\PhpOffice\\PhpSpreadsheet\\Writer\\Html\n\nPlease note that `\\PhpOffice\\PhpSpreadsheet\\Writer\\Html` only outputs the\nfirst worksheet by default.\n\n#### Writing a spreadsheet\n\nYou can write a .htm file using the following code:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Html($spreadsheet);\n\n$writer->save(\"05featuredemo.htm\");\n```\n\n#### Write all worksheets\n\nHTML files can contain one or more worksheets. If you want to write all\nsheets into a single HTML file, use the following code:\n\n```php\n$writer->writeAllSheets();\n```\n\n#### Write a specific worksheet\n\nHTML files can contain one or more worksheets. Therefore, you can\nspecify which sheet to write to HTML:\n\n```php\n$writer->setSheetIndex(0);\n```\n\n#### Setting the images root of the HTML file\n\nThere might be situations where you want to explicitly set the included\nimages root. For example, instead of:\n\n ```html\n <img src=\"./images/logo.jpg\">\n ```\n\nYou might want to see:\n\n```html\n<img src=\"http://www.domain.com/images/logo.jpg\">\n```\n\nYou can use the following code to achieve this result:\n\n```php\n$writer->setImagesRoot('http://www.example.com');\n```\n\n#### Formula pre-calculation\n\nBy default, this writer pre-calculates all formulas in the spreadsheet.\nThis can be slow on large spreadsheets, and maybe even unwanted. You can\nhowever disable formula pre-calculation:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Html($spreadsheet);\n$writer->setPreCalculateFormulas(false);\n\n$writer->save(\"05featuredemo.htm\");\n```\n\n#### Embedding generated HTML in a web page\n\nThere might be a situation where you want to embed the generated HTML in\nan existing website. \\PhpOffice\\PhpSpreadsheet\\Writer\\Html provides\nsupport to generate only specific parts of the HTML code, which allows\nyou to use these parts in your website.\n\nSupported methods:\n\n-   `generateHTMLHeader()`\n-   `generateStyles()`\n-   `generateSheetData()`\n-   `generateHTMLFooter()`\n-   `generateHTMLAll()`\n\nHere's an example which retrieves all parts independently and merges\nthem into a resulting HTML page:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Html($spreadsheet);\n$hdr = $writer->generateHTMLHeader();\n$sty = $writer->generateStyles(false); // do not write <style> and </style>\n$newstyle = <<<EOF\n<style type='text/css'>\n$sty\nbody {\n    background-color: yellow;\n}\n</style>\nEOF;\necho preg_replace('@</head>@', \"$newstyle\\n</head>\", $hdr);\necho $writer->generateSheetData();\necho $writer->generateHTMLFooter();\n```\n\n#### Editing HTML during save via a callback\n\nYou can also add a callback function to edit the generated html\nbefore saving. For example, you could change the gridlines\nfrom a thin solid black line:\n\n``` php\nfunction changeGridlines(string $html): string\n{\n    return str_replace('{border: 1px solid black;}',\n        '{border: 2px dashed red;}',\n        $html);\n}\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Html($spreadsheet);\n$writer->setEditHtmlCallback('changeGridlines');\n$writer->save($filename);\n```\n\n#### Decimal and thousands separators\n\nSee section `\\PhpOffice\\PhpSpreadsheet\\Writer\\Csv` how to control the\nappearance of these.\n\n## PDF\n\nPhpSpreadsheet allows you to write a spreadsheet into PDF format, for\nfast distribution of represented data.\n\n**PDF limitations** Please note that PDF file format has some limits\nregarding to styling cells, number formatting, ...\n\n### \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\n\nPhpSpreadsheet’s PDF Writer is a wrapper for a 3rd-Party PDF Rendering\nlibrary such as TCPDF, mPDF or Dompdf. You must now install a PDF\nrendering library yourself; but PhpSpreadsheet will work with a number\nof different libraries.\n\nCurrently, the following libraries are supported:\n\n| Library | Downloadable from                   | PhpSpreadsheet writer |\n|---------|-------------------------------------|-----------------------|\n| TCPDF   | https://github.com/tecnickcom/tcpdf | Tcpdf                 |\n| mPDF    | https://github.com/mpdf/mpdf        | Mpdf                  |\n| Dompdf  | https://github.com/dompdf/dompdf    | Dompdf                |\n\nThe different libraries have different strengths and weaknesses. Some\ngenerate better formatted output than others, some are faster or use\nless memory than others, while some generate smaller .pdf files. It is\nthe developers choice which one they wish to use, appropriate to their\nown circumstances.\n\nYou can instantiate a writer with its specific name, like so:\n\n```php\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Mpdf');\n```\n\nOr you can register which writer you are using with a more generic name,\nso you don't need to remember which library you chose, only that you want\nto write PDF files:\n\n```php\n$class = \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf::class;\n\\PhpOffice\\PhpSpreadsheet\\IOFactory::registerWriter('Pdf', $class);\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Pdf');\n```\n\nOr you can instantiate directly the writer of your choice like so:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf($spreadsheet);\n```\n\n#### Custom implementation or configuration\n\nIf you need a custom implementation, or custom configuration, of a supported\nPDF library. You can extends the PDF library, and the PDF writer like so:\n\n```php\nclass My_Custom_TCPDF extends TCPDF\n{\n\t// ...\n}\n\nclass My_Custom_TCPDF_Writer extends \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf\n{\n\tprotected function createExternalWriterInstance($orientation, $unit, $paperSize)\n\t{\n\t\t$instance = new My_Custom_TCPDF($orientation, $unit, $paperSize);\n\n\t\t// more configuration of $instance\n\n\t\treturn $instance;\n\t}\n}\n\n\\PhpOffice\\PhpSpreadsheet\\IOFactory::registerWriter('Pdf', MY_TCPDF_WRITER::class);\n```\n\n#### Writing a spreadsheet\n\nOnce you have identified the Renderer that you wish to use for PDF generation, you can write a .pdf file using the following code:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf($spreadsheet);\n$writer->save(\"05featuredemo.pdf\");\n```\n\nPlease note that `\\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf` only outputs the\nfirst worksheet by default.\n\n#### Write all worksheets\n\nPDF files can contain one or more worksheets. If you want to write all sheets into a single PDF file, use the following code:\n\n```php\n$writer->writeAllSheets();\n```\n\n#### Write a specific worksheet\n\nPDF files can contain one or more worksheets. Therefore, you can specify\nwhich sheet to write to PDF:\n\n```php\n$writer->setSheetIndex(0);\n```\n\n#### Setting Orientation and PaperSize\n\nPhpSpreadsheet will attempt to honor the orientation and paper size specified\nin the worksheet for each page it prints, if the renderer supports that. However, you can set all pages\nto have the same orientation and paper size, e.g.\n\n```php\n$writer->setOrientation(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup::ORIENTATION_LANDSCAPE);\n```\n\n#### Formula pre-calculation\n\nBy default, this writer pre-calculates all formulas in the spreadsheet.\nThis can be slow on large spreadsheets, and maybe even unwanted. You can\nhowever disable formula pre-calculation:\n\n```php\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf($spreadsheet);\n$writer->setPreCalculateFormulas(false);\n\n$writer->save(\"05featuredemo.pdf\");\n```\n\n#### Editing Pdf during save via a callback\n\nYou can also add a callback function to edit the html used to\ngenerate the Pdf before saving.\n[See under Html](#editing-html-during-save-via-a-callback).\n\n#### Decimal and thousands separators\n\nSee section `\\PhpOffice\\PhpSpreadsheet\\Writer\\Csv` how to control the\nappearance of these.\n\n## Generating Excel files from templates (read, modify, write)\n\nReaders and writers are the tools that allow you to generate Excel files\nfrom templates. This requires less coding effort than generating the\nExcel file from scratch, especially if your template has many styles,\npage setup properties, headers etc.\n\nHere is an example how to open a template file, fill in a couple of\nfields and save it again:\n\n```php\n$spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load('template.xlsx');\n\n$worksheet = $spreadsheet->getActiveSheet();\n\n$worksheet->getCell('A1')->setValue('John');\n$worksheet->getCell('A2')->setValue('Smith');\n\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Xls');\n$writer->save('write.xls');\n```\n\nNotice that it is ok to load an xlsx file and generate an xls file.\n\n## Generating Excel files from HTML content\n\nIf you are generating an Excel file from pre-rendered HTML content you can do so\nautomatically using the HTML Reader. This is most useful when you are generating \nExcel files from web application content that would be downloaded/sent to a user.\n\nFor example:\n\n```php\n$htmlString = '<table>\n                  <tr>\n                      <td>Hello World</td>\n                  </tr>\n                  <tr>\n                      <td>Hello<br />World</td>\n                  </tr>\n                  <tr>\n                      <td>Hello<br>World</td>\n                  </tr>\n              </table>';\n\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Html();\n$spreadsheet = $reader->loadFromString($htmlString);\n\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Xls');\n$writer->save('write.xls'); \n```\n\nSuppose you have multiple worksheets you'd like created from html. This can be \naccomplished as follows.\n\n```php\n$firstHtmlString = '<table>\n                  <tr>\n                      <td>Hello World</td>\n                  </tr>\n              </table>';\n$secondHtmlString = '<table>\n                  <tr>\n                      <td>Hello World</td>\n                  </tr>\n              </table>';\n\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Html();\n$spreadsheet = $reader->loadFromString($firstHtmlString);\n$reader->setSheetIndex(1);\n$spreadsheet = $reader->loadFromString($secondHtmlString, $spreadsheet);\n\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Xls');\n$writer->save('write.xls');\n```\n\n## Reader/Writer Flags\n\nSome Readers and Writers support special \"Feature Flags\" that need to be explicitly enabled.\nAn example of this is Charts in a spreadsheet. By default, when you load a spreadsheet that contains Charts, the charts will not be loaded. If all you want to do is read the data in the spreadsheet, then loading charts is an overhead for both speed of loading and memory usage.\nHowever, there are times when you may want to load any charts in the spreadsheet as well as the data. To do so, you need to tell the Reader explicitly to include Charts.\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReaderForFile(\"05featuredemo.xlsx\");\n$reader->setIncludeCharts(true);\n$reader->load(\"spreadsheetWithCharts.xlsx\");\n```\nAlternatively, you can specify this in the call to load the spreadsheet:\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReaderForFile(\"spreadsheetWithCharts.xlsx\");\n$reader->load(\"spreadsheetWithCharts.xlsx\", $reader::LOAD_WITH_CHARTS);\n```\n\nIf you wish to use the IOFactory `load()` method rather than instantiating a specific Reader, then you can still pass these flags.\n\n```php\n$spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load(\n    \"spreadsheetWithCharts.xlsx\",\n    \\PhpOffice\\PhpSpreadsheet\\Reader\\IReader::LOAD_WITH_CHARTS\n);\n```\n\nFlags that are available that can be passed to the Reader in this way include:\n\n - $reader::LOAD_WITH_CHARTS\n - $reader::READ_DATA_ONLY\n - $reader::IGNORE_EMPTY_CELLS\n - $reader::IGNORE_ROWS_WITH_NO_CELLS\n - $reader::ALLOW_EXTERNAL_IMAGES (starting with release 4.5)\n - $reader::DONT_ALLOW_EXTERNAL_IMAGES (starting with release 4.5)\n\n| Readers  | LOAD<br>CHARTS | DATA<br>ONLY | IGNORE<br>EMPTY | IGNORE<br>ROWS | EXTERNAL<br>IMAGES |\n|----------|--------|------|--------|--------|--------|\n| Xlsx     | YES | YES | YES | YES | YES |\n| Xls      | NO  | YES | YES | NO  | NO  |\n| Xml      | NO  | NO  | NO  | NO  | NO  |\n| Ods      | NO  | YES | NO  | NO  | NO  |\n| Gnumeric | NO  | YES | NO  | NO  | NO  |\n| Html     | N/A | N/A | N/A | N/A | YES |\n| Slk      | N/A | NO  | NO  | NO  | N/A |\n| Csv      | N/A | NO  | NO  | NO  | N/A |\n\nLikewise, when saving a file using a Writer, loaded charts will not be saved unless you explicitly tell the Writer to include them:\n\n```php\n$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n$writer->setIncludeCharts(true);\n$writer->save('mySavedFileWithCharts.xlsx');\n```\n\nAs with the `load()` method, you can also pass flags in the `save()` method:\n```php\n$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n$writer->save('mySavedFileWithCharts.xlsx', \\PhpOffice\\PhpSpreadsheet\\Writer\\IWriter::SAVE_WITH_CHARTS);\n```\n\nFlags that are available that can be passed to the Reader in this way include:\n\n- $reader::SAVE_WITH_CHARTS\n- $reader::DISABLE_PRECALCULATE_FORMULAE\n\n| Writers | SAVE_WITH_CHARTS | DISABLE_PRECALCULATE_FORMULAE |\n|---------|------------------|-------------------------------|\n| Xlsx    | YES              | YES                           |\n| Xls     | NO               | NO                            |\n| Ods     | NO               | YES                           |\n| Html    | YES              | YES                           |\n| Pdf     | YES              | YES                           |\n| Csv     | N/A              | YES                           |\n\n### Combining Flags\n\nOne benefit of flags is that you can pass several flags in a single method call.\nTwo or more flags can be passed together using PHP's `|` operator.\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReaderForFile('myExampleFile.xlsx');\n$reader->load(\n    'spreadsheetWithCharts.xlsx',\n    $reader::READ_DATA_ONLY | $reader::IGNORE_EMPTY_CELLS\n);\n```\n\n## Writing Data as a Plaintext Grid\n\nAlthough not really a spreadsheet format, it can be useful to write data in grid format to a plaintext file.\nCode like the following can be used:\n```php\n        $array = $sheet->toArray(null, true, true, true);\n        $textGrid = new \\PhpOffice\\PhpSpreadsheet\\Shared\\TextGrid(\n            $array,\n            true, // true for cli, false for html\n            // Starting with release 4.2,\n            // the output format can be tweaked by uncommenting\n            // any of the following 3 optional parameters.\n            // rowDividers: true,\n            // rowHeaders: false,\n            // columnHeaders: false,\n            // Starting with release 5.4:\n            // numbersRight: TextGridRightAlign::numeric,\n        );\n        $result = $textGrid->render();\n```\nYou can then echo `$result` to a terminal, or write it to a file with `file_put_contents`. The result will resemble:\n```\n    +-----+------------------+---+----------+\n    | A   | B                | C | D        |\n+---+-----+------------------+---+----------+\n| 1 | 6   | 1900-01-06 00:00 |   | 0.572917 |\n| 2 | 6   | TRUE             |   | 1<>2     |\n| 3 | xyz | xyz              |   |          |\n+---+-----+------------------+---+----------+\n```\nPlease note that this may produce sub-optimal results for situations such as:\n\n- use of accents as combining characters rather than using pre-composed characters (may be handled by extending the class to override the `getString` or `strlen` methods)\n- Fullwidth characters\n- right-to-left characters (better display in a browser than a terminal on a non-RTL system)\n- multi-line strings\n"
  },
  {
    "path": "docs/topics/reading-files.md",
    "content": "# Reading Files\n\n## Security\n\nXML-based formats such as OfficeOpen XML, Excel2003 XML, OASIS and\nGnumeric are susceptible to XML External Entity Processing (XXE)\ninjection attacks when reading spreadsheet files. This can lead to:\n\n-   Disclosure whether a file is existent\n-   Server Side Request Forgery\n-   Command Execution (depending on the installed PHP wrappers)\n\nTo prevent this, by default every XML-based Reader looks for XML\nentities declared inside the DOCTYPE and if any is found an exception\nis raised.\n\nRead more [about of XXE injection](https://websec.io/2012/08/27/Preventing-XXE-in-PHP.html).\n\n## Loading a Spreadsheet File\n\nThe simplest way to load a workbook file is to let PhpSpreadsheet's IO\nFactory identify the file type and load it, calling the static `load()`\nmethod of the `\\PhpOffice\\PhpSpreadsheet\\IOFactory` class.\n\n```php\n$inputFileName = './sampleData/example1.xls';\n\n/** Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load($inputFileName);\n```\n\nSee `samples/Reader/01_Simple_file_reader_using_IOFactory.php` for a working\nexample of this code.\n\nThe `load()` method will attempt to identify the file type, and\ninstantiate a loader for that file type; using it to load the file and\nstore the data and any formatting in a `Spreadsheet` object.\n\nThe method makes an initial guess at the loader to instantiate based on\nthe file extension; but will test the file before actually executing the\nload: so if (for example) the file is actually a CSV file or contains\nHTML markup, but that has been given a .xls extension (quite a common\npractise), it will reject the Xls loader that it would normally use for\na .xls file; and test the file using the other loaders until it finds\nthe appropriate loader, and then use that to read the file.\n\nIf you know that this is an `xls` file, but don't know whether it is a\ngenuine BIFF-format Excel or Html markup with an xls extension, you can\nlimit the loader to check only those two possibilities by passing in an\narray of Readers to test against.\n\n```php\n$inputFileName = './sampleData/example1.xls';\n$testAgainstFormats = [\n    \\PhpOffice\\PhpSpreadsheet\\IOFactory::READER_XLS,\n    \\PhpOffice\\PhpSpreadsheet\\IOFactory::READER_HTML,\n];\n\n/** Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load($inputFileName, 0, $testAgainstFormats);\n```\n\nWhile easy to implement in your code, and you don't need to worry about\nthe file type; this isn't the most efficient method to load a file; and\nit lacks the flexibility to configure the loader in any way before\nactually reading the file into a `Spreadsheet` object.\n\n## Creating a Reader and Loading a Spreadsheet File\n\nIf you know the file type of the spreadsheet file that you need to load,\nyou can instantiate a new reader object for that file type, then use the\nreader's `load()` method to read the file to a `Spreadsheet` object. It is\npossible to instantiate the reader objects for each of the different\nsupported filetype by name. However, you may get unpredictable results\nif the file isn't of the right type (e.g. it is a CSV with an extension\nof .xls), although this type of exception should normally be trapped.\n\n```php\n$inputFileName = './sampleData/example1.xls';\n\n/** Create a new Xls Reader  **/\n$reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xls();\n//    $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n//    $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xml();\n//    $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Ods();\n//    $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Slk();\n//    $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric();\n//    $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Csv();\n/** Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/02_Simple_file_reader_using_a_specified_reader.php`\nfor a working example of this code.\n\nAlternatively, you can use the IO Factory's `createReader()` method to\ninstantiate the reader object for you, simply telling it the file type\nof the reader that you want instantiating.\n\n```php\n$inputFileType = 'Xls';\n//    $inputFileType = 'Xlsx';\n//    $inputFileType = 'Xml';\n//    $inputFileType = 'Ods';\n//    $inputFileType = 'Slk';\n//    $inputFileType = 'Gnumeric';\n//    $inputFileType = 'Csv';\n$inputFileName = './sampleData/example1.xls';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/03_Simple_file_reader_using_the_IOFactory_to_return_a_reader.php`\nfor a working example of this code.\n\nIf you're uncertain of the filetype, you can use the `IOFactory::identify()`\nmethod to identify the reader that you need, before using the\n`createReader()` method to instantiate the reader object.\n\n```php\n$inputFileName = './sampleData/example1.xls';\n\n/**\n * Identify the type of $inputFileName.\n * See below for a possible improvement for release 4.1.0+.\n */\n$inputFileType = \\PhpOffice\\PhpSpreadsheet\\IOFactory::identify($inputFileName);\n/**  Create a new Reader of the type that has been identified  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/04_Simple_file_reader_using_the_IOFactory_to_identify_a_reader_to_use.php`\nfor a working example of this code.\n\nPrior to release 4.1.0, `identify` returns a file type.\nIt may be more useful to return a fully-qualified class name,\nwhich can be accomplished using a parameter introduced in 4.1.0:\n```php\n$inputFileType = \\PhpOffice\\PhpSpreadsheet\\IOFactory::identify($inputFileName, null, true);\n```\n\nAs with the IOFactory `load()` method, you can also pass an array of formats\nfor  the `identify()` method to check against if you know that it will only\nbe in a subset of the possible formats that PhpSpreadsheet supports.\n\n```php\n$inputFileName = './sampleData/example1.xls';\n$testAgainstFormats = [\n    \\PhpOffice\\PhpSpreadsheet\\IOFactory::READER_XLS,\n    \\PhpOffice\\PhpSpreadsheet\\IOFactory::READER_HTML,\n];\n\n/**  Identify the type of $inputFileName  **/\n$inputFileType = \\PhpOffice\\PhpSpreadsheet\\IOFactory::identify($inputFileName, $testAgainstFormats);\n```\n\nYou can also use this to confirm that a file is what it claims to be:\n\n```php\n$inputFileName = './sampleData/example1.xls';\n\ntry {\n    /**  Verify that $inputFileName really is an Xls file **/\n    $inputFileType = \\PhpOffice\\PhpSpreadsheet\\IOFactory::identify($inputFileName, [\\PhpOffice\\PhpSpreadsheet\\IOFactory::READER_XLS]);\n} catch (\\PhpOffice\\PhpSpreadsheet\\Reader\\Exception $e) {\n    // File isn't actually an Xls file, even though it has an xls extension \n}\n```\n\n## Spreadsheet Reader Options\n\nOnce you have created a reader object for the workbook that you want to\nload, you have the opportunity to set additional options before\nexecuting the `load()` method.\n\nAll of these options can be set by calling the appropriate methods against the Reader (as described below), but some options (those with only two possible values) can also be set through flags, either by calling the Reader's `setFlags()` method, or passing the flags as an argument in the call to `load()`.\nThose options that can be set through flags are:\n\nOption             | Flag                                | Default\n-------------------|-------------------------------------|------------------------\nEmpty Cells        | IReader::IGNORE_EMPTY_CELLS         | Load empty cells\nRows with no Cells | IReader::IGNORE_ROWS_WITH_NO_CELLS  | Load rows with no cells\nData Only          | IReader::READ_DATA_ONLY             | Read data, structure and style\nCharts             | IReader::LOAD_WITH_CHARTS           | Don't read charts\n\nSeveral flags can be combined in a single call:\n```php\n$inputFileType = 'Xlsx';\n$inputFileName = './sampleData/example1.xlsx';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/** Set additional flags before the call to load() */\n$reader->setFlags(IReader::IGNORE_EMPTY_CELLS | IReader::LOAD_WITH_CHARTS);\n$reader->load($inputFileName);\n```\nor\n```php\n$inputFileType = 'Xlsx';\n$inputFileName = './sampleData/example1.xlsx';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/** Set additional flags in the call to load() */\n$reader->load($inputFileName, IReader::IGNORE_EMPTY_CELLS | IReader::LOAD_WITH_CHARTS);\n```\n\n### Ignoring Empty Cells\n\nMany Excel files have empty rows or columns at the end of a worksheet, which can't easily be seen when looking at the file in Excel (Try using Ctrl-End to see the last cell in a worksheet).\nBy default, PhpSpreadsheet will load these cells, because they are valid Excel values; but you may find that an apparently small spreadsheet requires a lot of memory for all those empty cells.\nIf you are running into memory issues with seemingly small files, you can tell PhpSpreadsheet not to load those empty cells using the `setReadEmptyCells()` method. \n\n```php\n$inputFileType = 'Xls';\n$inputFileName = './sampleData/example1.xls';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Advise the Reader that we only want to load cell's that contain actual content  **/\n$reader->setReadEmptyCells(false);\n/**  Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nNote that cells containing formulae will still be loaded, even if that formula evaluates to a NULL or an empty string.\nSimilarly, Conditional Styling might also hide the value of a cell; but cells that contain Conditional Styling or Data Validation will always be loaded regardless of their value.\n\nThis option is available for the following formats:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N |\n----------|:---:|--------|:---:|--------------|:---:|\nXlsx      | YES | Xls    | YES | Xml          | NO  |\nOds       | NO  | SYLK   | NO  | Gnumeric     | NO  |\nCSV       | NO  | HTML   | NO\n\nThis option is also available through flags.\n\n### Ignoring Rows With No Cells\n\nSimilar to the previous item, you can choose to ignore rows which contain no cells.\nThis can also help with memory issues.\n```php\n$inputFileType = 'Xlsx';\n$inputFileName = './sampleData/example1.xlsx';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Advise the Reader that we do not want rows with no cells  **/\n$reader->setIgnoreRowsWithNoCells(true);\n/**  Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nThis option is available only for Xlsx. It is also available through flags.\n\n### Reading Only Data from a Spreadsheet File\n\nIf you're only interested in the cell values in a workbook, but don't\nneed any of the cell formatting information, then you can set the reader\nto read only the data values and any formulae from each cell using the\n`setReadDataOnly()` method.\n\n```php\n$inputFileType = 'Xls';\n$inputFileName = './sampleData/example1.xls';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Advise the Reader that we only want to load cell data  **/\n$reader->setReadDataOnly(true);\n/**  Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/05_Simple_file_reader_using_the_read_data_only_option.php`\nfor a working example of this code.\n\nIt is important to note that most Workbooks (and PhpSpreadsheet) store dates\nand times as simple numeric values: they can only be distinguished from\nother numeric values by the format mask that is applied to that cell.\nWhen setting read data only to true, PhpSpreadsheet doesn't read the\ncell format masks, so it is not possible to differentiate between\ndates/times and numbers.\n\nThe Gnumeric loader has been written to read the format masks for date\nvalues even when read data only has been set to true, so it can\ndifferentiate between dates/times and numbers; but this change hasn't\nyet been implemented for the other readers.\n\nReading Only Data from a Spreadsheet File applies to Readers:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N |\n----------|:---:|--------|:---:|--------------|:---:|\nXlsx      | YES | Xls    | YES | Xml          | YES |\nOds       | YES | SYLK   | NO  | Gnumeric     | YES |\nCSV       | NO  | HTML   | NO\n\nThis option is also available through flags.\n\n### Reading Only Named WorkSheets from a File\n\nIf your workbook contains a number of worksheets, but you are only\ninterested in reading some of those, then you can use the\n`setLoadSheetsOnly()` method to identify those sheets you are interested\nin reading.\n\nTo read a single sheet, you can pass that sheet name as a parameter to\nthe `setLoadSheetsOnly()` method.\n\n```php\n$inputFileType = 'Xls';\n$inputFileName = './sampleData/example1.xls';\n$sheetname = 'Data Sheet #2';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Advise the Reader of which WorkSheets we want to load  **/\n$reader->setLoadSheetsOnly($sheetname);\n/**  Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/07_Simple_file_reader_loading_a_single_named_worksheet.php`\nfor a working example of this code.\n\nIf you want to read more than just a single sheet, you can pass a list\nof sheet names as an array parameter to the `setLoadSheetsOnly()` method.\n\n```php\n$inputFileType = 'Xls';\n$inputFileName = './sampleData/example1.xls';\n$sheetnames = ['Data Sheet #1','Data Sheet #3'];\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Advise the Reader of which WorkSheets we want to load  **/\n$reader->setLoadSheetsOnly($sheetnames);\n/**  Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/08_Simple_file_reader_loading_several_named_worksheets.php`\nfor a working example of this code.\n\nTo reset this option to the default, you can call the `setLoadAllSheets()`\nmethod.\n\n```php\n$inputFileType = 'Xls';\n$inputFileName = './sampleData/example1.xls';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Advise the Reader to load all Worksheets  **/\n$reader->setLoadAllSheets();\n/**  Load $inputFileName to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/06_Simple_file_reader_loading_all_worksheets.php` for a\nworking example of this code.\n\nReading Only Named WorkSheets from a File applies to Readers:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N |\n----------|:---:|--------|:---:|--------------|:---:|\nXlsx      | YES | Xls    | YES | Xml          | YES |\nOds       | YES | SYLK   | NO  | Gnumeric     | YES |\nCSV       | NO  | HTML   | NO\n\n### Reading Only Specific Columns and Rows from a File (Read Filters)\n\nIf you are only interested in reading part of a worksheet, then you can\nwrite a filter class that identifies whether or not individual cells\nshould be read by the loader. A read filter must implement the\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter` interface, and contain a\n`readCell()` method that accepts arguments of `$column`, `$row` and\n`$worksheetName`, and return a boolean true or false that indicates\nwhether a workbook cell identified by those arguments should be read or\nnot.\n\n```php\n$inputFileType = 'Xls';\n$inputFileName = './sampleData/example1.xls';\n$sheetname = 'Data Sheet #3';\n\n/**  Define a Read Filter class implementing \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter  */\nclass MyReadFilter implements \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter\n{\n    public function readCell($columnAddress, $row, $worksheetName = '') {\n        //  Read rows 1 to 7 and columns A to E only\n        if ($row >= 1 && $row <= 7) {\n            if (in_array($columnAddress,range('A','E'))) {\n                return true;\n            }\n        }\n        return false;\n    }\n}\n\n/**  Create an Instance of our Read Filter  **/\n$filterSubset = new MyReadFilter();\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Tell the Reader that we want to use the Read Filter  **/\n$reader->setReadFilter($filterSubset);\n/**  Load only the rows and columns that match our filter to Spreadsheet  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/09_Simple_file_reader_using_a_read_filter.php` for a\nworking example of this code.\n\nThis example is not particularly useful, because it can only be used in\na very specific circumstance (when you only want cells in the range\nA1:E7 from your worksheet. A generic Read Filter would probably be more\nuseful:\n\n```php\n/**  Define a Read Filter class implementing \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter  */\nclass MyReadFilter implements \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter\n{\n    private $startRow = 0;\n    private $endRow   = 0;\n    private $columns  = [];\n\n    /**  Get the list of rows and columns to read  */\n    public function __construct($startRow, $endRow, $columns) {\n        $this->startRow = $startRow;\n        $this->endRow   = $endRow;\n        $this->columns  = $columns;\n    }\n\n    public function readCell($columnAddress, $row, $worksheetName = '') {\n        //  Only read the rows and columns that were configured\n        if ($row >= $this->startRow && $row <= $this->endRow) {\n            if (in_array($columnAddress,$this->columns)) {\n                return true;\n            }\n        }\n        return false;\n    }\n}\n\n/**  Create an Instance of our Read Filter, passing in the cell range  **/\n$filterSubset = new MyReadFilter(9,15,range('G','K'));\n```\n\nSee `samples/Reader/10_Simple_file_reader_using_a_configurable_read_filter.php`\nfor a working example of this code.\n\nThis can be particularly useful for conserving memory, by allowing you\nto read and process a large workbook in \"chunks\": an example of this\nusage might be when transferring data from an Excel worksheet to a\ndatabase.\n\nRead Filtering does not renumber cell rows and columns. If you filter to read only rows 100-200, cells that you read will still be numbered A100-A200, not A1-A101. Cells A1-A99 will not be loaded, but if you then try to call `getCell()` for a cell outside your loaded range, then PHPSpreadsheet will create a new cell with a null value.\n\nMethods such as `toArray()` assume that all cells in a spreadsheet has been loaded from A1, so will return null values for rows and columns that fall outside your filter range: it is recommended that you keep track of the range that your filter has requested, and use `rangeToArray()` instead.\n\n```php\n$inputFileType = 'Xls';\n$inputFileName = './sampleData/example2.xls';\n\n/**  Define a Read Filter class implementing \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter  */\nclass ChunkReadFilter implements \\PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter\n{\n    private $startRow = 0;\n    private $endRow   = 0;\n\n    /**  Set the list of rows that we want to read  */\n    public function setRows($startRow, $chunkSize) {\n        $this->startRow = $startRow;\n        $this->endRow   = $startRow + $chunkSize;\n    }\n\n    public function readCell($columnAddress, $row, $worksheetName = '') {\n        //  Only read the heading row, and the configured rows\n        if (($row == 1) || ($row >= $this->startRow && $row < $this->endRow)) {\n            return true;\n        }\n        return false;\n    }\n}\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n\n/**  Define how many rows we want to read for each \"chunk\"  **/\n$chunkSize = 2048;\n/**  Create a new Instance of our Read Filter  **/\n$chunkFilter = new ChunkReadFilter();\n\n/**  Tell the Reader that we want to use the Read Filter  **/\n$reader->setReadFilter($chunkFilter);\n\n/**  Loop to read our worksheet in \"chunk size\" blocks  **/\nfor ($startRow = 2; $startRow <= 65536; $startRow += $chunkSize) {\n    /**  Tell the Read Filter which rows we want this iteration  **/\n    $chunkFilter->setRows($startRow,$chunkSize);\n    /**  Load only the rows that match our filter  **/\n    $spreadsheet = $reader->load($inputFileName);\n    //    Do some processing here\n}\n```\n\nSee `samples/Reader/12_Reading_a_workbook_in_chunks_using_a_configurable_read_filter_`\nfor a working example of this code.\n\nUsing Read Filters applies to:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N |\n----------|:---:|--------|:---:|--------------|:---:|\nXlsx      | YES | Xls    | YES | Xml          | YES |\nOds       | YES | SYLK   | NO  | Gnumeric     | YES |\nCSV       | YES | HTML   | NO  |              |     |\n\n### Combining Multiple Files into a Single Spreadsheet Object\n\nWhile you can limit the number of worksheets that are read from a\nworkbook file using the `setLoadSheetsOnly()` method, certain readers also\nallow you to combine several individual \"sheets\" from different files\ninto a single `Spreadsheet` object, where each individual file is a\nsingle worksheet within that workbook. For each file that you read, you\nneed to indicate which worksheet index it should be loaded into using\nthe `setSheetIndex()` method of the `$reader`, then use the\n`loadIntoExisting()` method rather than the `load()` method to actually read\nthe file into that worksheet.\n\n```php\n$inputFileType = 'Csv';\n$inputFileNames = [\n    './sampleData/example1.csv',\n    './sampleData/example2.csv'\n    './sampleData/example3.csv'\n];\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n\n/**  Extract the first named file from the array list  **/\n$inputFileName = array_shift($inputFileNames);\n/**  Load the initial file to the first worksheet in a `Spreadsheet` Object  **/\n$spreadsheet = $reader->load($inputFileName);\n/**  Set the worksheet title (to the filename that we've loaded)  **/\n$spreadsheet->getActiveSheet()\n    ->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME));\n\n/**  Loop through all the remaining files in the list  **/\nforeach($inputFileNames as $sheet => $inputFileName) {\n    /**  Increment the worksheet index pointer for the Reader  **/\n    $reader->setSheetIndex($sheet+1);\n    /**  Load the current file into a new worksheet in Spreadsheet  **/\n    $reader->loadIntoExisting($inputFileName,$spreadsheet);\n    /**  Set the worksheet title (to the filename that we've loaded)  **/\n    $spreadsheet->getActiveSheet()\n        ->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME));\n}\n```\n\nSee `samples/Reader/13_Simple_file_reader_for_multiple_CSV_files.php` for a\nworking example of this code.\n\nNote that using the same sheet index for multiple sheets won't append\nfiles into the same sheet, but overwrite the results of the previous\nload. You cannot load multiple CSV files into the same worksheet.\n\nCombining Multiple Files into a Single Spreadsheet Object applies to:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N |\n----------|:---:|--------|:---:|--------------|:---:|\nXlsx      | NO  | Xls    | NO  | Xml          | NO  |\nOds       | NO  | SYLK   | YES | Gnumeric     | NO  |\nCSV       | YES | HTML   | NO\n\n### Combining Read Filters with the `setSheetIndex()` method to split a large CSV file across multiple Worksheets\n\nAn Xls BIFF .xls file is limited to 65536 rows in a worksheet, while the\nXlsx Microsoft Office Open XML SpreadsheetML .xlsx file is limited to\n1,048,576 rows in a worksheet; but a CSV file is not limited other than\nby available disk space. This means that we wouldn’t ordinarily be able\nto read all the rows from a very large CSV file that exceeded those\nlimits, and save it as an Xls or Xlsx file. However, by using Read\nFilters to read the CSV file in \"chunks\" (using the ChunkReadFilter\nClass that we defined in [the above section](#reading-only-specific-columns-and-rows-from-a-file-read-filters),\nand the `setSheetIndex()` method of the `$reader`, we can split the CSV\nfile across several individual worksheets.\n\n```php\n$inputFileType = 'Csv';\n$inputFileName = './sampleData/example2.csv';\n\necho 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n\n/**  Define how many rows we want to read for each \"chunk\"  **/\n$chunkSize = 65530;\n/**  Create a new Instance of our Read Filter  **/\n$chunkFilter = new ChunkReadFilter();\n\n/**  Tell the Reader that we want to use the Read Filter  **/\n/**    and that we want to store it in contiguous rows/columns  **/\n\n$reader->setReadFilter($chunkFilter)\n    ->setContiguous(true);\n\n/**  Instantiate a new Spreadsheet object manually  **/\n$spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n\n/**  Set a sheet index  **/\n$sheet = 0;\n/**  Loop to read our worksheet in \"chunk size\" blocks  **/\n/**  $startRow is set to 2 initially because we always read the headings in row #1  **/\nfor ($startRow = 2; $startRow <= 1000000; $startRow += $chunkSize) {\n    /**  Tell the Read Filter which rows we want to read this loop  **/\n    $chunkFilter->setRows($startRow,$chunkSize);\n\n    /**  Increment the worksheet index pointer for the Reader  **/\n    $reader->setSheetIndex($sheet);\n    /**  Load only the rows that match our filter into a new worksheet  **/\n    $reader->loadIntoExisting($inputFileName,$spreadsheet);\n    /**  Set the worksheet title for the sheet that we've justloaded)  **/\n    /**    and increment the sheet index as well  **/\n    $spreadsheet->getActiveSheet()->setTitle('Country Data #'.(++$sheet));\n}\n```\n\nSee `samples/Reader/14_Reading_a_large_CSV_file_in_chunks_to_split_across_multiple_worksheets.php`\nfor a working example of this code.\n\nThis code will read 65,530 rows at a time from the CSV file that we’re\nloading, and store each \"chunk\" in a new worksheet.\n\nThe `setContiguous()` method for the Reader is important here. It is\napplicable only when working with a Read Filter, and identifies whether\nor not the cells should be stored by their position within the CSV file,\nor their position relative to the filter.\n\nFor example, if the filter returned true for cells in the range B2:C3,\nthen with setContiguous set to false (the default) these would be loaded\nas B2:C3 in the `Spreadsheet` object; but with setContiguous set to\ntrue, they would be loaded as A1:B2.\n\nSplitting a single loaded file across multiple worksheets applies to:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N |\n----------|:---:|--------|:---:|--------------|:---:|\nXlsx      | NO  | Xls    | NO  | Xml          | NO  |\nOds       | NO  | SYLK   | NO  | Gnumeric     | NO  |\nCSV       | YES | HTML   | NO\n\n### Pipe or Tab Separated Value Files\n\nThe CSV loader will attempt to auto-detect the separator used in the file. If it\ncannot auto-detect, it will default to the comma. If this does not fit your\nuse-case, you can manually specify a separator by using the `setDelimiter()`\nmethod.\n\n```php\n$inputFileType = 'Csv';\n$inputFileName = './sampleData/example1.tsv';\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Set the delimiter to a TAB character  **/\n$reader->setDelimiter(\"\\t\");\n//    $reader->setDelimiter('|');\n\n/**  Load the file to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/15_Simple_file_reader_for_tab_separated_value_file_using_the_Advanced_Value_Binder.php`\nfor a working example of this code.\n\nIn addition to the delimiter, you can also use the following methods to\nset other attributes for the data load:\n\nMethod             | Default\n-------------------|----------\nsetEnclosure()     | `\"`\nsetInputEncoding() | `UTF-8`\n\nSetting CSV delimiter applies to:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N |\n----------|:---:|--------|:---:|--------------|:---:|\nXlsx      | NO  | Xls    | NO  | Xml          | NO  |\nOds       | NO  | SYLK   | NO  | Gnumeric     | NO  |\nCSV       | YES | HTML   | NO\n\n\n### Reading formatted Numbers from a CSV File\n\nUnfortunately, numbers in a CSV file may be formatted as strings.\nIf that number is a simple integer or float (with a decimal `.` separator) without any thousands separator, then it will be treated as a number.\nHowever, if the value has a thousands separator (e.g. `12,345`), or a decimal separator that isn't a `.` (e.g. `123,45` for a European locale), then it will be loaded as a string with that formatting.\nIf you want the Csv Reader to convert that value to a numeric when it loads the file, the you need to tell it to do so. The `castFormattedNumberToNumeric()` lets you do this.\n\n(Assuming that our server is configured with German locale settings: otherwise it may be necessary to call `setlocale()` before loading the file.)\n```php\n$inputFileType = 'Csv';\n$inputFileName = './sampleData/example1.de.csv';\n\n/** It may be necessary to call setlocale() first if this is not your default locale  */\n// setlocale(LC_ALL, 'de_DE.UTF-8', 'deu_deu');\n\n/**  Create a new Reader of the type defined in $inputFileType  **/\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n/**  Enable loading numeric values formatted with German , decimal separator and . thousands separator  **/\n$reader->castFormattedNumberToNumeric(true);\n\n/**  Load the file to a Spreadsheet Object  **/\n$spreadsheet = $reader->load($inputFileName);\n```\nThis will attempt to load those formatted numeric values as numbers, based on the server's locale settings.\n\nIf you want to load those values as numbers, but also to retain the formatting as a number format mask, then you can pass a boolean `true` as a second argument to the `castFormattedNumberToNumeric()` method to tell the Reader to identify the format masking to use for that value. This option does have an arbitrary limit of 6 decimal places.\n\nIf your Csv file includes other formats for numbers (currencies, scientific format, etc); then you should probably also use the Advanced Value Binder to handle these cases.  \n\nApplies to:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N |\n----------|:---:|--------|:---:|--------------|:---:|\nXlsx      | NO  | Xls    | NO  | Xml          | NO  |\nOds       | NO  | SYLK   | NO  | Gnumeric     | NO  |\nCSV       | YES | HTML   | NO\n\n## A Brief Word about the Advanced Value Binder\n\nWhen loading data from a file that contains no formatting information,\nsuch as a CSV file, then data is read either as strings or numbers\n(float or integer). This means that PhpSpreadsheet does not\nautomatically recognise dates/times (such as `16-Apr-2009` or `13:30`),\nbooleans (`true` or `false`), percentages (`75%`), hyperlinks\n(`https://www.example.com`), etc as anything other than simple strings.\nHowever, you can apply additional processing that is executed against\nthese values during the load process within a Value Binder.\n\nA Value Binder is a class that implement the\n`\\PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder` interface. It must contain a\n`bindValue()` method that accepts a `\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell` and a\nvalue as arguments, and return a boolean `true` or `false` that indicates\nwhether the workbook cell has been populated with the value or not. The\nAdvanced Value Binder implements such a class: amongst other tests, it\nidentifies a string comprising \"TRUE\" or \"FALSE\" (based on locale\nsettings) and sets it to a boolean; or a number in scientific format\n(e.g. \"1.234e-5\") and converts it to a float; or dates and times,\nconverting them to their Excel timestamp value – before storing the\nvalue in the cell object. It also sets formatting for strings that are\nidentified as dates, times or percentages. It could easily be extended\nto provide additional handling (including text or cell formatting) when\nit encountered a hyperlink, or HTML markup within a CSV file.\n\nSo using a Value Binder allows a great deal more flexibility in the\nloader logic when reading unformatted text files.\n\n```php\n$inputFileType = 'Csv';\n$inputFileName = './sampleData/example1.tsv';\n\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n$reader->setDelimiter(\"\\t\");\n\n/**  Tell PhpSpreadsheet that we want to use the Advanced Value Binder  **/\n// Old method using static property\n\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::setValueBinder( new \\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder() );\n// Preferred method using dynamic property since 3.4.0\n$reader::setValueBinder( new \\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder() );\n\n$spreadsheet = $reader->load($inputFileName);\n```\n\nSee `samples/Reader/15_Simple_file_reader_for_tab_separated_value_file_using_the_Advanced_Value_Binder.php`\nfor a working example of this code.\n\nLoading using a Value Binder applies to:\n\nReader    | Y/N |Reader  | Y/N |Reader        | Y/N\n----------|:---:|--------|:---:|--------------|:---:\nXlsx      | NO  | Xls    | NO  | Xml          | NO\nOds       | NO  | SYLK   | YES | Gnumeric     | NO\nCSV       | YES | HTML   | YES\n\nNote that you can also use the Binder to determine how PhpSpreadsheet identified datatypes for values when you set a cell value without explicitly setting a datatype.\nValue Binders can also be used to set formatting for a cell appropriate to the value.\n\n## Error Handling\n\nOf course, you should always apply some error handling to your scripts\nas well. PhpSpreadsheet throws exceptions, so you can wrap all your code\nthat accesses the library methods within Try/Catch blocks to trap for\nany problems that are encountered, and deal with them in an appropriate\nmanner.\n\nThe PhpSpreadsheet Readers throw a\n`\\PhpOffice\\PhpSpreadsheet\\Reader\\Exception`.\n\n```php\n$inputFileName = './sampleData/example-1.xls';\n\ntry {\n    /** Load $inputFileName to a Spreadsheet Object  **/\n    $spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load($inputFileName);\n} catch(\\PhpOffice\\PhpSpreadsheet\\Reader\\Exception $e) {\n    die('Error loading file: '.$e->getMessage());\n}\n```\n\nSee `samples/Reader/16_Handling_loader_exceptions_using_TryCatch.php` for a\nworking example of this code.\n\n## Helper Methods\n\nYou can retrieve a list of worksheet names contained in a file without\nloading the whole file by using the Reader’s `listWorksheetNames()`\nmethod; similarly, a `listWorksheetInfo()` method will retrieve the\ndimensions of worksheet in a file without needing to load and parse the\nwhole file.\n\n### listWorksheetNames\n\nThe `listWorksheetNames()` method returns a simple array listing each\nworksheet name within the workbook:\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n\n$worksheetNames = $reader->listWorksheetNames($inputFileName);\n\necho '<h3>Worksheet Names</h3>';\necho '<ol>';\nforeach ($worksheetNames as $worksheetName) {\n    echo '<li>', $worksheetName, '</li>';\n}\necho '</ol>';\n```\n\nSee `samples/Reader/18_Reading_list_of_worksheets_without_loading_entire_file.php`\nfor a working example of this code.\n\n### listWorksheetInfo\n\nThe `listWorksheetInfo()` method returns a nested array, with each entry\nlisting the name, dimensions and state for a worksheet:\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n\n$worksheetData = $reader->listWorksheetInfo($inputFileName);\n\necho '<h3>Worksheet Information</h3>';\necho '<ol>';\nforeach ($worksheetData as $worksheet) {\n    echo '<li>', $worksheet['worksheetName'], '<br />';\n    echo 'Rows: ', $worksheet['totalRows'],\n         ' Columns: ', $worksheet['totalColumns'], '<br />';\n    echo 'Cell Range: A1:',\n         $worksheet['lastColumnLetter'], $worksheet['totalRows'], '<br />';\n    echo 'Sheet state: ', $worksheet['sheetState'];\n    echo '</li>';\n}\necho '</ol>';\n```\n\nSee `samples/Reader/19_Reading_worksheet_information_without_loading_entire_file.php`\nfor a working example of this code.\n"
  },
  {
    "path": "docs/topics/recipes.md",
    "content": "# Recipes\n\nThe following pages offer you some widely-used PhpSpreadsheet recipes.\nPlease note that these do NOT offer complete documentation on specific\nPhpSpreadsheet API functions, but just a bump to get you started. If you\nneed specific API functions, please refer to the [API documentation](https://phpoffice.github.io/PhpSpreadsheet).\n\nFor example, [setting a worksheet's page orientation and size\n](#setting-a-worksheets-page-orientation-and-size) covers setting a page\norientation to A4. Other paper formats, like US Letter, are not covered\nin this document, but in the PhpSpreadsheet [API documentation](https://phpoffice.github.io/PhpSpreadsheet).\n\nMy apologies if this documentation seems very basic to some of you; but I spend so much time having to provide help lessons in PHP 101 and Excel 101 that I feel I need to provide this level of very simple detail.\n\n## Setting a spreadsheet's metadata\n\nPhpSpreadsheet allows an easy way to set a spreadsheet's metadata, using\ndocument property accessors. Spreadsheet metadata can be useful for\nfinding a specific document in a file repository or a document\nmanagement system. For example Microsoft Sharepoint uses document\nmetadata to search for a specific document in its document lists.\n\n<details markdown>\n  <summary>Click here for details of Spreadsheet Document Properties</summary>\n\nThese are accessed in MS Excel from the \"Info\" option on the \"File\" menu:\n![99-Properties_File-Menu.png](images%2F99-Properties_File-Menu.png)\n\nSome of these properties can be edited \"in situ\" in the Properties Block:\n![99-Properties_Block.png](images%2F99-Properties_Block.png)\n\nFor more advanced properties, click on the \"Properties\" dropdown:\n![99-Properties_Advanced.png](images%2F99-Properties_Advanced.png)\n\nAnd you will be able to add/edit/delete a lot of different property values.\n![99-Properties_Advanced-Form.png](images%2F99-Properties_Advanced-Form.png)\n\nProperties on the \"General\", \"Statistics\" and \"Contents\" tabs are informational, and cannot be user-defined in Excel itself.\nProperties on the \"Summary\" tab are all string values.\n\nThe \"Custom\" tab allows you to define your own properties. More information from the Microsoft Documentation can be found [here](https://support.microsoft.com/en-us/office/view-or-change-the-properties-for-an-office-file-21d604c2-481e-4379-8e54-1dd4622c6b75).\n![99-Properties_Advanced-Form-2.png](images%2F99-Properties_Advanced-Form-2.png)\n\nYou can select a property name from the dropdown, or type a new name of your choice; select a Type; enter a value; and then click on \"Add\".\nThe new property will then be created and displayed in the list at the bottom of the form.\n\nWhile \"Text\", \"Number\" (can be an integer or a floating point value) and \"Yes or No\" types are straightforward to add a value, \"Date\" types are more difficult, and Microsoft provide very little help.\nHowever, you need to enter the date in the format that matches your locale, so an American would enter \"7/4/2023 for the 4th of July; but in the UK I would enter \"4/7/2023\" for the same date.\nAlthough typically recognised as a date elsewhere in MS Excel, the almost universally recognised `2022-12-31` date format is not recognised as valid here.\n\n</details>\n\nSetting spreadsheet metadata in PhpSpreadsheet is done as follows:\n\n```php\n$spreadsheet->getProperties()\n    ->setCreator(\"Maarten Balliauw\")\n    ->setLastModifiedBy(\"Mark Baker\")\n    ->setTitle(\"Office 2007 XLSX Test Document\")\n    ->setSubject(\"Office 2007 XLSX Test Document\")\n    ->setDescription(\n        \"Test document for Office 2007 XLSX, generated using PHP classes.\"\n    )\n    ->setKeywords(\"office 2007 openxml php\")\n    ->setCategory(\"Test result file\");\n```\n\nYou can choose which properties to set or ignore.\n\n<details markdown>\n  <summary>Click here for details of Property Getters/Setters</summary>\n\nPhpSpreadsheet provides specific getters/setters for a number of pre-defined properties.\n\n| Property Name    | DataType                | Getter/Setter                                | Notes                                                     |\n|------------------|-------------------------|----------------------------------------------|-----------------------------------------------------------|\n| Creator          | string                  | getCreator()<br />setCreator()               |                                                           |\n| Last Modified By | string                  | getLastModifiedBy()<br />setLastModifiedBy() |                                                           |\n| Created          | float/int<br/>timestamp | getCreated()<br />setCreated()               | Cannot be modified in MS Excel; but is automatically set. |\n| Modified         | float/int<br/>timestamp | getModified()<br />setModified()             | Cannot be modified in MS Excel; but is automatically set. |\n| Title            | string                  | getTitle()<br />setTitle()                   |                                                           |\n| Description      | string                  | getDescription()<br />setDescription()       |                                                           |\n| Subject          | string                  | getSubject()<br />setSubject()               |                                                           |\n| Keywords         | string                  | getKeywords()<br />setKeywords()             |                                                           |\n| Category         | string                  | getCategory()<br />setCategory()             | Not supported in xls files.                               |\n| Company          | string                  | getCompany()<br />setCompany()               | Not supported in xls files.                               |\n| Manager          | string                  | getManager()<br />setManager()               | Not supported in xls files.                               |\n> **Note:** Not all Spreadsheet File Formats support all of these properties.\n> For example: \"Category\", \"Company\" and \"Manager\" are not supported in `xls` files.\n\n</details>\n\n<details markdown>\n  <summary>Click here for details of Custom Properties</summary>\n\nAdditionally, PhpSpreadsheet supports the creation and reading of custom properties for those file formats that accept custom properties.\nThe following methods of the Properties class can be used when working with custom properties.\n - `getCustomProperties()`<br />\n   Will return an array listing the names of all custom properties that are defined.\n - `isCustomPropertySet(string $propertyName)`<br />\n   Will return a boolean indicating if the named custom property is defined.\n - `getCustomPropertyValue(string $propertyName)`<br />\n   Will return the \"raw\" value of the named custom property; or null if the property doesn't exist.\n - `getCustomPropertyType(string $propertyName)`<br />\n   Will return the datatype of the named custom property; or null if the property doesn't exist. \n - `setCustomProperty(string $propertyName, $propertyValue = '', $propertyType = null)`<br />\n   Will let you set (or modify) a custom property. If you don't provide a datatype, then PhpSpreadsheet will attempt to identify the datatype from the value that you set.\n\nThe recognised Property Types are:\n\n| Constant                          | Datatype | Value |\n|-----------------------------------|----------|-------|\n| Properties::PROPERTY_TYPE_BOOLEAN | boolean  | b     |\n| Properties::PROPERTY_TYPE_INTEGER | integer  | i     |\n| Properties::PROPERTY_TYPE_FLOAT   | float    | f     |\n| Properties::PROPERTY_TYPE_DATE    | date     | d     |\n| Properties::PROPERTY_TYPE_STRING  | string   | s     |\n\nWhen reading property types, you might also encounter:\n\n| Datatype | Value        |\n|----------|--------------|\n| null     | null value   |\n| empty    | empty string |\n| u        | unknown      |\n\nOther more complex types, such as pointers and filetime, are not supported by PhpSpreadsheet; and are discarded when reading a file.\n\n</details>\n\n```php\n$spreadsheet->getProperties()\n    ->setCustomProperty('Editor', 'Mark Baker')\n    ->setCustomProperty('Version', 1.17)\n    ->setCustomProperty('Tested', true)\n    ->setCustomProperty('Test Date', '2021-03-17', Properties::PROPERTY_TYPE_DATE);\n```\n> **Warning:** If the datatype for a date is not explicitly used, then it will be treated as a string.\n\n> **Note:** Although MS Excel doesn't recognise `2022-12-31` as valid date format when entering Custom Date Properties, PhpSpreadsheet will accept it.\n\n## Setting a spreadsheet's active sheet\n\nA Spreadsheet consists of (very rarely) none, one or more Worksheets. If you have 1 or more Worksheets, then one (and only one) of those Worksheets can be \"Active\" (viewed or updated) at a time, but there will always be an \"Active\" Worksheet (unless you explicitly delete all of the Worksheets in the Spreadsheet).\n\n<details markdown>\n  <summary>Click here for details about Worksheets</summary>\n\nWhen you create a new Spreadsheet in MS Excel, it creates the Spreadsheet with a single Worksheet (\"Sheet1\")\n\n![101-Basic-Spreadsheet-with-Worksheet.png](images%2F101-Basic-Spreadsheet-with-Worksheet.png)\n\nand that is the \"Active\" Worksheet.\n\n![101-Active-Worksheet-1.png](images%2F101-Active-Worksheet-1.png)\n\nThis is the same as\n```php\n$spreadsheet = new Spreadsheet();\n$activeWorksheet = $spreadsheet->getActiveSheet();\n```\nin PhpSpreadsheet.\n\nAnd you can then write values to Cells in `$activeWorksheet` (`Sheet1`).\n\nTo create a new Worksheet in MS Excel, you click on the \"+\" button in the Worksheet Tab Bar. MS Excel will then create a new Worksheet (\"Sheet2\") in the Spreadsheet, and make that the current \"Active\" Worksheet.\n\n![101-Active-Worksheet-2.png](images%2F101-Active-Worksheet-2.png)\n\nExcel always shows the \"Active\" Worksheet in the Grid, and you can see which Worksheet is \"Active\" because it is highlighted in the Worksheet Tab Bar at the bottom of the Worksheet Grid.\n\nThis is the same as\n```php\n$activeWorksheet = $spreadsheet->createSheet();\n```\nin PhpSpreadsheet.\n\nAnd you can then write values to Cells in `$activeWorksheet` (`Sheet2`).\n\n</details>\n\nTo switch between Worksheets in MS Excel, you click on the Tab for the Worksheet that you want to be \"Active\" in the Worksheet Tab Bar. Excel will then set that as the \"Active\" Worksheet.\n\n![101-Active-Worksheet-Change.png](images%2F101-Active-Worksheet-Change.png)\n\nIn PhpSpreadsheet, you do this by calling the Spreadsheet's `setActiveSheetIndex()` methods.\nEither:\n\n```php\n$activeWorksheet = $spreadsheet->setActiveSheetIndexByName('Sheet1')\n```\nusing the name/title of the Worksheet that you want as the \"Active\" Worksheet.\n\nOr:\n```php\n$activeWorksheet = $spreadsheet->setActiveSheetIndex(0);\n```\nWhere you set the \"Active\" Worksheet by its position in the Worksheet Tab Bar, with 0 as the first Worksheet, 1 as the second, etc.\n\nAnd you can then write values to Cells in `$activeWorksheet` (`Sheet1`) again.\n\n\nYou don't have to assign the return value from calls to `createSheet()` and `setActiveSheetIndex()` to a variable, but it means that you can call Worksheet methods directly against `$activeWorksheet`, rather than having to call `$spreadsheet->getActiveSheet()` all the time.\nAnd, unlike MS Excel where you can only update Cells in the \"Active\" Worksheet; PhpSpreadsheet allows you to update Cells in any Worksheet:\n```php\n// Create a Spreadsheet, with Worksheet Sheet1, which is the Active Worksheet\n$spreadsheet = new Spreadsheet();\n// Assign the Active Worksheet (Sheet1) to $worksheet1\n$worksheet1 = $spreadsheet->getActiveSheet();\n// Create a new Worksheet (Sheet2) and make that the Active Worksheet\n$worksheet2 = $spreadsheet->createSheet();\n\n$worksheet1->setCellValue('A1', 'I am a cell on Sheet1');\n$worksheet2->setCellValue('A1', 'I am a cell on Sheet2');\n```\n\n## Write a date or time into a cell\n\nIn Excel, dates and Times are stored as numeric values counting the\nnumber of days elapsed since 1900-01-01. For example, the date\n'2008-12-31' is represented as 39813. You can verify this in Microsoft\nOffice Excel by entering that date in a cell and afterwards changing the\nnumber format to 'General' so the true numeric value is revealed.\nLikewise, '3:15 AM' is represented as 0.135417.\n\nPhpSpreadsheet works with UST (Universal Standard Time) date and Time\nvalues, but does no internal conversions; so it is up to the developer\nto ensure that values passed to the date/time conversion functions are\nUST.\n\nWriting a date value in a cell consists of 2 lines of code. Select the\nmethod that suits you the best. Here are some examples:\n\n```php\n// MySQL-like timestamp '2008-12-31' or date string\n// Old method using static property\n\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::setValueBinder( new \\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder() );\n// Preferred method using dynamic property since 3.4.0\n$spreadsheet->setValueBinder( new \\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder() );\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('D1', '2008-12-31');\n\n$spreadsheet->getActiveSheet()->getStyle('D1')\n    ->getNumberFormat()\n    ->setFormatCode(\\PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat::FORMAT_DATE_YYYYMMDDSLASH);\n\n// PHP-time (Unix time)\n$time = gmmktime(0,0,0,12,31,2008); // int(1230681600)\n$spreadsheet->getActiveSheet()\n    ->setCellValue('D1', \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::PHPToExcel($time));\n$spreadsheet->getActiveSheet()->getStyle('D1')\n    ->getNumberFormat()\n    ->setFormatCode(\\PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat::FORMAT_DATE_YYYYMMDDSLASH);\n\n// Excel-date/time\n$spreadsheet->getActiveSheet()->setCellValue('D1', 39813)\n$spreadsheet->getActiveSheet()->getStyle('D1')\n    ->getNumberFormat()\n    ->setFormatCode(\\PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat::FORMAT_DATE_YYYYMMDDSLASH);\n```\nThe above methods for entering a date all yield the same result.\nThe `\\PhpOffice\\PhpSpreadsheet\\Shared\\Date::PHPToExcel()` method will also\nwork with a PHP DateTime object; or with strings containing different well-recognised date formats\n(although this is limited in the same ways as using the Advanced Value Binder).\n\nSimilarly, times (or date and time values) can be entered in the same\nfashion: just remember to use an appropriate format code.\n\n> **Note:** See section \"Using value binders to facilitate data entry\" to learn more\nabout the AdvancedValueBinder used in the first example. Excel can also\noperate in a 1904-based calendar (default for workbooks saved on Mac).\nNormally, you do not have to worry about this when using PhpSpreadsheet.\n\n`\\PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat` provides a number of\npre-defined date formats; but this is just a string value, and you can\ndefine your own values as long as they are a valid MS Excel format.\nPhpSpreadsheet also provides a number of Wizards to help you create\nDate, Time and DateTime format masks.\n\n<details markdown>\n  <summary>Click here for an example of the Date/Time Wizards</summary>\n\n```php\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Date as DateWizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Time as TimeWizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\DateTime as DateTimeWizard;\n\n$spreadsheet->getActiveSheet()->setCellValue('A1', '=NOW()')\n$spreadsheet->getActiveSheet()->setCellValue('A2', '=NOW()')\n$spreadsheet->getActiveSheet()->setCellValue('A3', '=NOW()')\n\n// yyyy-mm-dd\n$dateFormat = new DateWizard(\n    DateWizard::SEPARATOR_DASH,\n    DateWizard::YEAR_FULL,\n    DateWizard::MONTH_NUMBER_LONG,\n    DateWizard::DAY_NUMBER_LONG\n);\n\n$spreadsheet->getActiveSheet()->getStyle('A1')\n    ->getNumberFormat()\n    ->setFormatCode($dateFormat);\n\n// hh:mm\n$timeFormat = new TimeWizard(\n    TimeWizard::SEPARATOR_COLON,\n    TimeWizard::HOURS_LONG,\n    TimeWizard::MINUTES_LONG,\n);\n\n$spreadsheet->getActiveSheet()->getStyle('A2')\n    ->getNumberFormat()\n    ->setFormatCode($timeFormat);\n\n// yyyy-mm-dd hh:mm\n$dateTimeFormat = new DateTimeWizard(' ', $dateFormat, $timeFormat);\n\n$spreadsheet->getActiveSheet()->getStyle('A3')\n    ->getNumberFormat()\n    ->setFormatCode($dateTimeFormat);\n```\n\n</details>\n\n## Write a formula into a cell\n\nInside the Excel file, formulas are always stored as they would appear\nin an English version of Microsoft Office Excel, and PhpSpreadsheet\nhandles all formulas internally in this format. This means that the\nfollowing rules hold:\n\n-   Decimal separator is `.` (period)\n-   Function argument separator is `,` (comma)\n-   Matrix row separator is `;` (semicolon)\n-   English function names must be used\n\nThis is regardless of which language version of Microsoft Office Excel\nmay have been used to create the Excel file.\n\nWhen the final workbook is opened by the user, Microsoft Office Excel\nwill take care of displaying the formula according the applications\nlanguage. Translation is taken care of by the application!\n\nThe following line of code writes the formula\n`=IF(C4>500,\"profit\",\"loss\")` into the cell B8. Note that the\nformula must start with `=` to make PhpSpreadsheet recognise this as a\nformula.\n\n```php\n$spreadsheet->getActiveSheet()->setCellValue('B8','=IF(C4>500,\"profit\",\"loss\")');\n```\n\nIf you want to write a string beginning with an `=` character to a\ncell, then you should use the `setCellValueExplicit()` method.\n\n```php\n$spreadsheet->getActiveSheet()\n    ->setCellValueExplicit(\n        'B8',\n        '=IF(C4>500,\"profit\",\"loss\")',\n        \\PhpOffice\\PhpSpreadsheet\\Cell\\DataType::TYPE_STRING\n    );\n```\n\nA cell's formula can be read again using the following line of code:\n\n```php\n$formula = $spreadsheet->getActiveSheet()->getCell('B8')->getValue();\n```\n\nIf you need the calculated value of a cell, use the following code. This\nis further explained in [the calculation engine](./calculation-engine.md).\n\n```php\n$value = $spreadsheet->getActiveSheet()->getCell('B8')->getCalculatedValue();\n```\n\n### Array Formulas\n\nWith version 3.0.0 of PhpSpreadsheet, we've introduced support for Excel \"array formulas\".\n**It is an opt-in feature.** You need to enable it with the following code:\n```php\n// preferred method\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation::getInstance($spreadsheet)\n    ->setInstanceArrayReturnType(\n        \\PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation::RETURN_ARRAY_AS_ARRAY);\n// or less preferred\n\\PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation::setArrayReturnType(\n    \\PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation::RETURN_ARRAY_AS_ARRAY);\n```\nThis is not a new constant, and setArrayReturnType is also not new, but it has till now not had much effect.\nThe instance variable set by the new setInstanceArrayReturnType\nwill always be checked first, and the static variable used only if the instance variable is uninitialized.\n\nAs a basic example, let's look at a receipt for buying some fruit:\n\n![12-CalculationEngine-Basic-Formula.png](./images/12-CalculationEngine-Basic-Formula.png)\n\nWe can provide a \"Cost\" formula for each row of the receipt by multiplying the \"Quantity\" (column `B`) by the \"Price\" (column `C`); so for the \"Apples\" in row `2` we enter the formula `=$B2*$C2`. In PhpSpreadsheet, we would set this formula in cell `D2` using:\n```php\n$spreadsheet->getActiveSheet()->setCellValue('D2','=$B2*$C2');\n```\nand then do the equivalent for rows `3` to `6`.\n\nTo calculate the \"Total\", we would use a different formula, telling it to calculate the sum value of rows 2 to 6 in the \"Cost\" column:\n\n![12-CalculationEngine-Basic-Formula-2.png](./images/12-CalculationEngine-Basic-Formula-2.png)\n\nI'd imagine that most developers are familiar with this: we're setting a formula that uses an Excel function (the `SUM()` function) and specifying a range of cells to include in the sum (`$D$2:$D6`) \n```php\n$spreadsheet->getActiveSheet()->setCellValue('D7','=SUM($D$2:$D6');\n```\nHowever, we could have specified an alternative formula to calculate that result, using the arrays of the \"Quantity\" and \"Cost\" columns multiplied directly, and then summed together:\n\n![12-CalculationEngine-Array-Formula.png](./images/12-CalculationEngine-Array-Formula.png)\n\nEntering the formula `=SUM(B2:B6*C2:C6)` will calculate the same result; but because it's using arrays, we need to enter it as an \"array formula\". In MS Excel itself, we'd do this by using `Ctrl-Shift-Enter` rather than simply `Enter` when we define the formula in the formula edit box. MS Excel then shows that this is an array formula in the formula edit box by wrapping it in the `{}` braces (you don't enter these in the formula yourself; MS Excel does it).\n\n**In recent releases of Excel, Ctrl-Shift-Enter is not required, and Excel does not add the braces.\nPhpSpreadsheet will attempt to behave like the recent releases.**\n\nOr to identify the biggest increase in like-for-like sales from one month to the next:\n\n![12-CalculationEngine-Array-Formula-3.png](./images/12-CalculationEngine-Array-Formula-3.png)\n```php\n$spreadsheet->getActiveSheet()->setCellValue('F1','=MAX(B2:B6-C2:C6)');\n```\nWhich tells us that the biggest increase in sales between December and January was 30 more (in this case, 30 more Lemons).\n\n---\n\nThese are examples of array formula where the results are displayed in a single cell; but other array formulas might be displayed across several cells.\nAs an example, consider transposing a grid of data: MS Excel provides the `TRANSPOSE()` function for that purpose. Let's transpose our shopping list for the fruit:\n\n![12-CalculationEngine-Array-Formula-2.png](./images/12-CalculationEngine-Array-Formula-2.png)\n\nWhen we do this in MS Excel, we used to need to indicate ___all___ the cells that will contain the transposed data from cells `A1` to `D7`. We do this by selecting the cells where we want to display our transposed data either by holding the left mouse button down while we move with the mouse, or pressing `Shift` and using the arrow keys.\nOnce we've selected all the cells to hold our data, then we enter the formula `TRANSPOSE(A1:D7)` in the formula edit box, remembering to use `Ctrl-Shift-Enter` to tell MS Excel that this is an array formula. In recent Excel, you can just enter `=TRANSPOSE(A1:D7)` into cell A10.\n\nNote also that we still set this as the formula for the top-left cell of that range, cell `A10`.\n\nSimply setting an array formula in a cell and specifying the range won't populate the spillage area for that formula.\n```php\n$spreadsheet->getActiveSheet()\n    ->setCellValue(\n        'A10',\n        '=SEQUENCE(3,3)'\n    );\n// Will return a null, because the formula for A1 hasn't been calculated to populate the spillage area \n$result = $spreadsheet->getActiveSheet()->getCell('C3')->getValue();\n```\nTo do that, we need to retrieve the calculated value for the cell.\n```php\n$spreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue();\n// Will return 9, because the formula for A1 has now been calculated, and the spillage area is populated \n$result = $spreadsheet->getActiveSheet()->getCell('C3')->getValue();\n```\nIf returning arrays has been enabled, `getCalculatedValue` will return an array when appropriate, and will populate the spill range. If returning arrays has not been enabled, when we call `getCalculatedValue()` for a cell that contains an array formula, PhpSpreadsheet will return the single value from the topmost leftmost cell, and will leave other cells unchanged.\n```php\n// Will return integer 1, the value for that cell within the array\n$a1result = $spreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue();\n```\n\n---\n\nExcel365 introduced a number of new functions that return arrays of results.\nThese include the `UNIQUE()`, `SORT()`, `SORTBY()`, `FILTER()`, `SEQUENCE()` and `RANDARRAY()` functions.\nWhile not all of these have been implemented by the Calculation Engine in PhpSpreadsheet, so they cannot all be calculated within your PHP applications, they can still be read from and written to Xlsx files.\n\nThe `SEQUENCE()` function generates a series of values (in this case, starting with `-10` and increasing in steps of `2.5`); and here we're telling the formula to populate a 3x3 grid with these values.\n\n![12-CalculationEngine-Spillage-Formula.png](./images/12-CalculationEngine-Spillage-Formula.png)\n\nNote that this is visually different from using `Ctrl-Shift-Enter` for the formula. When we are positioned in the \"spill\" range for the grid, MS Excel highlights the area with a blue border; and the formula displayed in the formula editing field isn't wrapped in braces (`{}`).\n\nAnd if we select any other cell inside the \"spill\" area other than the top-left cell, the formula in the formula edit field is greyed rather than displayed in black.\n\n![12-CalculationEngine-Spillage-Formula-2.png](./images/12-CalculationEngine-Spillage-Formula-2.png)\n\nWhen we enter this formula in MS Excel, we don't need to select the range of cells that it should occupy; nor do we need to enter it using `Ctrl-Shift-Enter`.\n\n### The Spill Operator\n\nIf you want to reference the entire spillage range of an array formula within another formula, you could do so using the standard Excel range operator (`:`, e.g. `A1:C3`); but you may not always know the range, especially for array functions that spill across as many cells as they need, like `UNIQUE()` and `FILTER()`.\nTo simplify this, MS Excel has introduced the \"Spill\" Operator (`#`).\n\n![12-CalculationEngine-Spillage-Operator.png](./images/12-CalculationEngine-Spillage-Operator.png)\n\nUsing our `SEQUENCE()`example, where the formula cell is `A1` and the result spills across the range `A1:C3`, we can use the Spill operator `A1#` to reference all the cells in that spillage range.\nIn this case, we're taking the absolute value of each cell in that range, and adding them together using the `SUM()` function to give us a result of 50. \n\nPhpSpreadsheet supports entry of a formula like this using the Spill operator. Alternatively, MS Excel internally implements the Spill Operator as a function (`ANCHORARRAY()`). MS Excel itself doesn't allow you to use this function in a formula, you have to use the \"Spill\" operator; but PhpSpreadsheet does allow you to use this internal Excel function. PhpSpreadsheet will convert the spill operator to ANCHORARRAY on write (so it may appear that your formula has changed, but it hasn't really); it is not necessary to convert it back on read.\n\nTo create this same function in PhpSpreadsheet, use:\n```php\n$spreadsheet->getActiveSheet()->setCellValue('D1','=SUM(ABS(ANCHORARRAY(A1)))');\n```\n\nWhen the file is saved, and opened in MS Excel, it will be rendered correctly.\n\n### The At-sign Operator\n\nIf you want to reference just the first cell of an array formula within another formula, you could do so by prefixing it with an at-sign. You can also select the entry in a range which matches the current row in this way; so, if you enter `=@A1:A5` in cell G3, the result will be the value from A3. MS Excel again implements this under the covers by converting to a function SINGLE. PhpSpreadsheet allows the use of the SINGLE function. It does not yet support the at-sign operator, which can have a different meaning in other contexts.\n\n### Updating Cell in Spill Area\n\nExcel prevents you from updating a cell in the spill area. PhpSpreadsheet does not - it seems like it might be quite expensive, needing to reevaluate the entire worksheet with each `setValue`. PhpSpreadsheet does provide a method to be used prior to calling `setValue` if desired.\n```php\n$sheet->setCellValue('A1', '=SORT{7;5;1}');\n$sheet->getCell('A1')->getCalculatedValue(); // populates A1-A3\n$sheet->isCellInSpillRange('A2'); // true\n$sheet->isCellInSpillRange('A3'); // true\n$sheet->isCellInSpillRange('A4'); // false\n$sheet->isCellInSpillRange('A1'); // false\n```\nThe last result might be surprising. Excel allows you to alter the formula cell itself, so `isCellInSpillRange` treats the formula cell as not in range. It should also be noted that, if array returns are not enabled, `isCellInSpillRange` will always return `false`.\n\n## Locale Settings for Formulas\n\nSome localisation elements have been included in PhpSpreadsheet. You can\nset a locale by changing the settings. To set the locale to Russian you\nwould use:\n\n```php\n$locale = 'ru';\n$validLocale = \\PhpOffice\\PhpSpreadsheet\\Settings::setLocale($locale);\nif (!$validLocale) {\n    echo 'Unable to set locale to '.$locale.\" - reverting to en_us<br />\\n\";\n}\n```\n\nIf Russian language files aren't available, the `setLocale()` method\nwill return an error, and English settings will be used throughout.\n\nOnce you have set a locale, you can translate a formula from its\ninternal English coding.\n\n```php\n$formula = $spreadsheet->getActiveSheet()->getCell('B8')->getValue();\n$translatedFormula = \\PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation::getInstance()->translateFormulaToLocale($formula);\n```\n\nYou can also create a formula using the function names and argument\nseparators appropriate to the defined locale; then translate it to\nEnglish before setting the cell value:\n\n```php\n$formula = '=ДНЕЙ360(ДАТА(2010;2;5);ДАТА(2010;12;31);ИСТИНА)';\n$internalFormula = \\PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation::getInstance()->translateFormulaToEnglish($formula);\n$spreadsheet->getActiveSheet()->setCellValue('B8',$internalFormula);\n```\n\nCurrently, formula translation only translates the function names, the\nconstants TRUE and FALSE (and NULL), Excel error messages, and the function argument separators. Cell addressing using R1C1 formatting is not supported.\n\nAt present, the following locale settings are supported:\n\nLanguage             |                      | Locale Code\n---------------------|----------------------|-------------\nBulgarian            | български            | bg\nCzech                | Ceština              | cs\nDanish               | Dansk                | da\nGerman               | Deutsch              | de\nSpanish              | Español              | es\nFinnish              | Suomi                | fi\nFrench               | Français             | fr\nHungarian            | Magyar               | hu\nItalian              | Italiano             | it\nDutch                | Nederlands           | nl\nNorwegian            | Norsk Bokmål         | nb\nPolish               | Jezyk polski         | pl\nPortuguese           | Português            | pt\nBrazilian Portuguese | Português Brasileiro | pt_br\nRussian              | русский язык         | ru\nSwedish              | Svenska              | sv\nTurkish              | Türkçe               | tr\n\nIf anybody can provide translations for additional languages, particularly Basque (Euskara), Catalan (Català), Croatian (Hrvatski jezik), Galician (Galego), Greek (Ελληνικά), Slovak (Slovenčina) or Slovenian (Slovenščina); please feel free to volunteer your services, and we'll happily show you what is needed to contribute a new language. \n\n## Write a newline character \"\\n\" in a cell (ALT+\"Enter\")\n\nIn Microsoft Office Excel you get a line break in a cell by hitting\nALT+\"Enter\". When you do that, it automatically turns on \"wrap text\" for\nthe cell.\n\nHere is how to achieve this in PhpSpreadsheet:\n\n```php\n$spreadsheet->getActiveSheet()->getCell('A1')->setValue(\"hello\\nworld\");\n$spreadsheet->getActiveSheet()->getStyle('A1')->getAlignment()->setWrapText(true);\n```\n\n**Tip**\n\nRead more about formatting cells using `getStyle()` elsewhere.\n\n**Tip**\n\nAdvancedValuebinder.php automatically turns on \"wrap text\" for the cell\nwhen it sees a newline character in a string that you are inserting in a\ncell. Just like Microsoft Office Excel. Try this:\n\n```php\n// Old method using static property\n\\PhpOffice\\PhpSpreadsheet\\Cell\\Cell::setValueBinder( new \\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder() );\n// Preferred method using dynamic property since 3.4.0\n$spreadsheet->setValueBinder( new \\PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder() );\n\n$spreadsheet->getActiveSheet()->getCell('A1')->setValue(\"hello\\nworld\");\n```\n\nRead more about AdvancedValueBinder.php elsewhere.\n\n## Explicitly set a cell's datatype\n\nYou can set a cell's datatype explicitly by using the cell's\nsetValueExplicit method, or the setCellValueExplicit method of a\nworksheet. Here's an example:\n\n```php\n$spreadsheet->getActiveSheet()->getCell('A1')\n    ->setValueExplicit(\n        '25',\n        \\PhpOffice\\PhpSpreadsheet\\Cell\\DataType::TYPE_NUMERIC\n    );\n```\n\n## Change a cell into a clickable URL\n\nYou can make a cell (or, for Xlsx only, a drawing) a clickable URL by setting its hyperlink property:\n\n```php\n$spreadsheet->getActiveSheet()->setCellValue('E26', 'www.example.com');\n$spreadsheet->getActiveSheet()->getCell('E26')\n    ->getHyperlink()\n    ->setUrl('https://www.example.com');\n```\n\nIf you want to make a hyperlink to another worksheet/cell, use the\nfollowing code:\n\n```php\n$spreadsheet->getActiveSheet()\n    ->setCellValue('E27', 'go to another sheet');\n$spreadsheet->getActiveSheet()->getCell('E27')\n    ->getHyperlink()\n    ->setUrl(\"sheet://'Sheetname'!A1\");\n```\nXlsx format uses `#` in place of `sheet://`.\nPhpSpreadsheet will automatically convert to that form when writing a spreadsheet,\nso you should continue to use `sheet://` for greater interoperability.\n\nExcel automatically supplies a special style when a hyperlink is\nentered into a cell. PhpSpreadsheet cannot do so. However,\nstarting with release 4.3,\nyou can mimic Excel's behavior with:\n```php\n$spreadsheet->getActiveSheet()\n    ->getStyle('E26')\n    ->getFont()\n    ->setHyperlinkTheme();\n```\nThis will set underline (all formats) and text color (always\nfor Xlsx, and usually for other formats).\n\n## Setting Printer Options for Excel files\n\n### Setting a worksheet's page orientation and size\n\nSetting a worksheet's page orientation and size can be done using the\nfollowing lines of code:\n\n```php\n$spreadsheet->getActiveSheet()->getPageSetup()\n    ->setOrientation(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup::ORIENTATION_LANDSCAPE);\n$spreadsheet->getActiveSheet()->getPageSetup()\n    ->setPaperSize(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup::PAPERSIZE_A4);\n```\n\nNote that there are additional page settings available. Please refer to\nthe [API documentation](https://phpoffice.github.io/PhpSpreadsheet) for all possible options.\n\nThe default papersize is initially PAPERSIZE_LETTER. However, this default\ncan be changed for new sheets with the following call:\n```php\n\\PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup::setPaperSizeDefault(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup::PAPERSIZE_A4\n);\n```\n\nThe default orientation is ORIENTATION_DEFAULT, which will be treated as Portrait in Excel. However, this default can be changed for new sheets with the following call:\n```php\n\\PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup::setOrientationDefault(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup::ORIENTATION_LANDSCAPE\n);\n```\n\n### Page Setup: Scaling options\n\nThe page setup scaling options in PhpSpreadsheet relate directly to the\nscaling options in the \"Page Setup\" dialog as shown in the illustration.\n\nDefault values in PhpSpreadsheet correspond to default values in MS\nOffice Excel as shown in illustration\n\n![08-page-setup-scaling-options.png](./images/08-page-setup-scaling-options.png)\n\nmethod              | initial value | calling method will trigger | Note\n--------------------|:-------------:|-----------------------------|------\nsetFitToPage(...)   | FALSE         | -                           |\nsetScale(...)       | 100           | setFitToPage(FALSE)         |\nsetFitToWidth(...)  | 1             | setFitToPage(TRUE)          | value 0 means do-not-fit-to-width\nsetFitToHeight(...) | 1             | setFitToPage(TRUE)          | value 0 means do-not-fit-to-height\n\n#### Example\n\nHere is how to fit to 1 page wide by infinite pages tall:\n\n```php\n$spreadsheet->getActiveSheet()->getPageSetup()->setFitToWidth(1);\n$spreadsheet->getActiveSheet()->getPageSetup()->setFitToHeight(0);\n```\n\nAs you can see, it is not necessary to call setFitToPage(TRUE) since\nsetFitToWidth(...) and setFitToHeight(...) triggers this.\n\nIf you use `setFitToWidth()` you should in general also specify\n`setFitToHeight()` explicitly like in the example. Be careful relying on\nthe initial values.\n\n### Page margins\n\nTo set page margins for a worksheet, use this code:\n\n```php\n$spreadsheet->getActiveSheet()->getPageMargins()->setTop(1);\n$spreadsheet->getActiveSheet()->getPageMargins()->setRight(0.75);\n$spreadsheet->getActiveSheet()->getPageMargins()->setLeft(0.75);\n$spreadsheet->getActiveSheet()->getPageMargins()->setBottom(1);\n```\n\nNote that the margin values are specified in inches.\n\n![08-page-setup-margins.png](./images/08-page-setup-margins.png)\n\n### Center a page horizontally/vertically\n\nTo center a page horizontally/vertically, you can use the following\ncode:\n\n```php\n$spreadsheet->getActiveSheet()->getPageSetup()->setHorizontalCentered(true);\n$spreadsheet->getActiveSheet()->getPageSetup()->setVerticalCentered(false);\n```\n\n### Setting the print header and footer of a worksheet\n\nSetting a worksheet's print header and footer can be done using the\nfollowing lines of code:\n\n```php\n$spreadsheet->getActiveSheet()->getHeaderFooter()\n    ->setOddHeader('&C&HPlease treat this document as confidential!');\n$spreadsheet->getActiveSheet()->getHeaderFooter()\n    ->setOddFooter('&L&B' . $spreadsheet->getProperties()->getTitle() . '&RPage &P of &N');\n```\n\n<a id='setDifferent'></a>\nNotice the use of `oddHeader/Footer` above. This is, by default, the header used on all pages, not just the odd-numbered pages. You can specify a different header/footer for the first page and/or for even-numbered pages.\n```php\n$spreadsheet->getActiveSheet()->getHeaderFooter()\n    ->setDifferentFirst(true);\n// then as above except setFirstHeader/Footer rather than Odd\n$spreadsheet->getActiveSheet()->getHeaderFooter()\n    ->setDifferentOddEven(true);\n// then as above except setEvenHeader/Footer rather than Odd\n```\n\nSubstitution and formatting codes (starting with &) can be used inside\nheaders and footers. There is no required order in which these codes\nmust appear.\n\nThe first occurrence of the following codes turns the formatting ON, the\nsecond occurrence turns it OFF again:\n\n-   Strikethrough\n-   Superscript\n-   Subscript\n\nSuperscript and subscript cannot both be ON at same time. Whichever\ncomes first wins and the other is ignored, while the first is ON.\n\nThe following codes are supported by Xlsx:\n\nCode                     | Meaning\n-------------------------|-----------\n`&L`                     | Code for \"left section\" (there are three header / footer locations, \"left\", \"center\", and \"right\"). When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the left section.\n`&P`                     | Code for \"current page #\"\n`&N`                     | Code for \"total pages\"\n`&font size`             | Code for \"text font size\", where font size is a font size in points.\n`&K`                     | Code for \"text font color\" - RGB Color is specified as RRGGBB Theme Color is specifed as TTSNN where TT is the theme color Id, S is either \"+\" or \"-\" of the tint/shade value, NN is the tint/shade value.\n`&S`                     | Code for \"text strikethrough\" on / off\n`&X`                     | Code for \"text super script\" on / off\n`&Y`                     | Code for \"text subscript\" on / off\n`&C`                     | Code for \"center section\". When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the center section.\n`&D`                     | Code for \"date\"\n`&T`                     | Code for \"time\"\n`&G`                     | Code for \"picture as background\" - Please make sure to add the image to the header/footer (see [Tip for picture](#Tip-for-picture))\n`&U`                     | Code for \"text single underline\"\n`&E`                     | Code for \"double underline\"\n`&R`                     | Code for \"right section\". When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the right section.\n`&Z`                     | Code for \"this workbook's file path\"\n`&F`                     | Code for \"this workbook's file name\"\n`&A`                     | Code for \"sheet tab name\"\n`&+`                     | Code for add to page #\n`&-`                     | Code for subtract from page #\n`&\"font name,font type\"` | Code for \"text font name\" and \"text font type\", where font name and font type are strings specifying the name and type of the font, separated by a comma. When a hyphen appears in font name, it means \"none specified\". Both of font name and font type can be localized values.\n`&\"-,Bold\"`              | Code for \"bold font style\"\n`&B`                     | Code for \"bold font style\"\n`&\"-,Regular\"`           | Code for \"regular font style\"\n`&\"-,Italic\"`            | Code for \"italic font style\"\n`&I`                     | Code for \"italic font style\"\n`&\"-,Bold Italic\"`       | Code for \"bold italic font style\"\n`&O`                     | Code for \"outline style\"\n`&H`                     | Code for \"shadow style\"\n\n**Tip**\n\nThe above table of codes may seem overwhelming first time you are trying to\nfigure out how to write some header or footer. Luckily, there is an easier way.\nLet Microsoft Office Excel do the work for you.For example, create in Microsoft\n Office Excel an xlsx file where you insert the header and footer as desired\nusing the programs own interface. Save file as test.xlsx. Now, take that file\nand read off the values using PhpSpreadsheet as follows:\n\n```php\n$spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load('test.xlsx');\n$worksheet = $spreadsheet->getActiveSheet();\n\nvar_dump($worksheet->getHeaderFooter()->getOddFooter());\nvar_dump($worksheet->getHeaderFooter()->getEvenFooter());\nvar_dump($worksheet->getHeaderFooter()->getOddHeader());\nvar_dump($worksheet->getHeaderFooter()->getEvenHeader());\n```\n\nThat reveals the codes for the even/odd header and footer. Experienced\nusers may find it easier to rename test.xlsx to test.zip, unzip it, and\ninspect directly the contents of the relevant xl/worksheets/sheetX.xml\nto find the codes for header/footer.\n\n<a id='Tip-for-picture'></a>\n**Tip for picture**\n\n```php\n$drawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooterDrawing();\n$drawing->setName('PhpSpreadsheet logo');\n$drawing->setPath('./images/PhpSpreadsheet_logo.png');\n$drawing->setHeight(36);\n$spreadsheet->getActiveSheet()\n    ->getHeaderFooter()\n    ->addImage(\n        $drawing,\n        \\PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooter::IMAGE_HEADER_LEFT\n    );\n```\nIf you want your image to be used only on the first page or only on even pages, use, for example, `HeaderFooter::IMAGE_FOOTER_CENTER_EVEN`.\nYou must still call [`setDifferentFirst/Even`](#setDifferent) for this to work.\nThis will work only for Xlsx.\n\n### Setting printing breaks on a row or column\n\nTo set a print break, use the following code, which sets a row break on\nrow 10.\n\n```php\n$spreadsheet->getActiveSheet()->setBreak(\n    'A10',\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::BREAK_ROW\n);\n```\n\nThe following line of code sets a print break on column D:\n\n```php\n$spreadsheet->getActiveSheet()->setBreak(\n    'D10',\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::BREAK_COLUMN\n);\n```\n\n### Show/hide gridlines when printing\n\nTo show/hide gridlines when printing, use the following code:\n\n```php\n$spreadsheet->getActiveSheet()->setPrintGridlines(true);\n```\n\n### Setting rows/columns to repeat at top/left\n\nPhpSpreadsheet can repeat specific rows/cells at top/left of a page. The\nfollowing code is an example of how to repeat row 1 to 5 on each printed\npage of a specific worksheet:\n\n```php\n$spreadsheet->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 5);\n```\n\n### Specify printing area\n\nTo specify a worksheet's printing area, use the following code:\n\n```php\n$spreadsheet->getActiveSheet()->getPageSetup()->setPrintArea('A1:E5');\n```\n\nThere can also be multiple printing areas in a single worksheet:\n\n```php\n$spreadsheet->getActiveSheet()->getPageSetup()->setPrintArea('A1:E5,G4:M20');\n```\n\n## Styles\n\n### Formatting cells\n\nA cell can be formatted with font, border, fill, ... style information.\nFor example, one can set the foreground colour of a cell to red, aligned\nto the right, and the border to black and thick border style. Let's do\nthat on cell B2:\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('B2')\n    ->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_RED);\n$spreadsheet->getActiveSheet()->getStyle('B2')\n    ->getAlignment()->setHorizontal(\\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('B2')\n    ->getBorders()->getTop()->setBorderStyle(\\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_THICK);\n$spreadsheet->getActiveSheet()->getStyle('B2')\n    ->getBorders()->getBottom()->setBorderStyle(\\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_THICK);\n$spreadsheet->getActiveSheet()->getStyle('B2')\n    ->getBorders()->getLeft()->setBorderStyle(\\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_THICK);\n$spreadsheet->getActiveSheet()->getStyle('B2')\n    ->getBorders()->getRight()->setBorderStyle(\\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_THICK);\n$spreadsheet->getActiveSheet()->getStyle('B2')\n    ->getFill()->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID);\n$spreadsheet->getActiveSheet()->getStyle('B2')\n    ->getFill()->getStartColor()->setARGB('FFFF0000');\n```\n\n`getStyle()` also accepts a cell range as a parameter. For example, you\ncan set a red background color on a range of cells:\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('B3:B7')->getFill()\n    ->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID)\n    ->getStartColor()->setARGB('FFFF0000');\n```\n\n**Tip** It is recommended to style many cells at once, using e.g.\ngetStyle('A1:M500'), rather than styling the cells individually in a\nloop. This is much faster compared to looping through cells and styling\nthem individually.\n\n**Tip** If you are styling entire row(s) or column(s), e.g. getStyle('A:A'), it is recommended to use applyFromArray as described below rather than setting the styles individually as described above.\nAlso, starting with release 3.9.0, you should use getRowStyle or getColumnStyle to get the style for an entire row or column.\n\nThere is also an alternative manner to set styles. The following code\nsets a cell's style to font bold, alignment right, top border thin and a\ngradient fill:\n\n```php\n$styleArray = [\n    'font' => [\n        'bold' => true,\n    ],\n    'alignment' => [\n        'horizontal' => \\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::HORIZONTAL_RIGHT,\n    ],\n    'borders' => [\n        'top' => [\n            'borderStyle' => \\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_THIN,\n        ],\n    ],\n    'fill' => [\n        'fillType' => \\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_GRADIENT_LINEAR,\n        'rotation' => 90,\n        'startColor' => [\n            'argb' => 'FFA0A0A0',\n        ],\n        'endColor' => [\n            'argb' => 'FFFFFFFF',\n        ],\n    ],\n];\n\n$spreadsheet->getActiveSheet()->getStyle('A3')->applyFromArray($styleArray);\n```\n\nOr with a range of cells:\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('B3:B7')->applyFromArray($styleArray);\n```\n\nThis alternative method using arrays should be faster in terms of\nexecution whenever you are setting more than one style property. But the\ndifference may barely be measurable unless you have many different\nstyles in your workbook.\n\nYou can perform the opposite function, exporting a Style as an array,\nas follows:\n\n``` php\n$styleArray = $spreadsheet->getActiveSheet()->getStyle('A3')->exportArray();\n```\n\n### Number formats\n\nYou often want to format numbers in Excel. For example you may want a\nthousands separator plus a fixed number of decimals after the decimal\nseparator. Or perhaps you want some numbers to be zero-padded.\n\nIn Microsoft Office Excel you may be familiar with selecting a number\nformat from the \"Format Cells\" dialog. Here there are some predefined\nnumber formats available including some for dates. The dialog is\ndesigned in a way so you don't have to interact with the underlying raw\nnumber format code unless you need a custom number format.\n\nIn PhpSpreadsheet, you can also apply various predefined number formats.\nExample:\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()\n    ->setFormatCode(\\PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1);\n```\n\nThis will format a number e.g. 1587.2 so it shows up as 1,587.20 when\nyou open the workbook in MS Office Excel. (Depending on settings for\ndecimal and thousands separators in Microsoft Office Excel it may show\nup as 1.587,20)\n\nYou can achieve exactly the same as the above by using this:\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()\n    ->setFormatCode('#,##0.00');\n```\n\nIn Microsoft Office Excel, as well as in PhpSpreadsheet, you will have\nto interact with raw number format codes whenever you need some special\ncustom number format. Example:\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()\n    ->setFormatCode('[Blue][>=3000]$#,##0;[Red][<0]$#,##0;$#,##0');\n```\n\nAnother example is when you want numbers zero-padded with leading zeros\nto a fixed length:\n\n```php\n$spreadsheet->getActiveSheet()->getCell('A1')->setValue(19);\n$spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()\n    ->setFormatCode('0000'); // will show as 0019 in Excel\n```\n\n**Tip** The rules for composing a number format code in Excel can be\nrather complicated. Sometimes you know how to create some number format\nin Microsoft Office Excel, but don't know what the underlying number\nformat code looks like. How do you find it?\n\nThe readers shipped with PhpSpreadsheet come to the rescue. Load your\ntemplate workbook using e.g. Xlsx reader to reveal the number format\ncode. Example how read a number format code for cell A1:\n\n```php\n$reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader('Xlsx');\n$spreadsheet = $reader->load('template.xlsx');\nvar_dump($spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()->getFormatCode());\n```\n\nAdvanced users may find it faster to inspect the number format code\ndirectly by renaming template.xlsx to template.zip, unzipping, and\nlooking for the relevant piece of XML code holding the number format\ncode in *xl/styles.xml*.\n\n### Alignment and wrap text\n\nLet's set vertical alignment to the top for cells A1:D4\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('A1:D4')\n    ->getAlignment()->setVertical(\\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::VERTICAL_TOP);\n```\n\nHere is how to achieve wrap text:\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('A1:D4')\n    ->getAlignment()->setWrapText(true);\n```\n\n### Setting the default style of a workbook\n\nIt is possible to set the default style of a workbook. Let's set the\ndefault font to Arial size 8:\n\n```php\n$spreadsheet->getDefaultStyle()->getFont()->setName('Arial');\n$spreadsheet->getDefaultStyle()->getFont()->setSize(8);\n```\n\nExcel also offers \"theme fonts\", with separate font names for major (header) and minor (body) text. PhpSpreadsheet will use the Excel 2007 default (Cambria) for major (default is Calibri Light in Excel 2013+); PhpSpreadsheet default for minor is Calibri, which is used by Excel 2007+. To align the default font name with the minor font name:\n\n```php\n$spreadsheet->getTheme()\n    ->setThemeFontName('custom')\n    ->setMinorFontValues('Arial', 'Arial', 'Arial', []);\n$spreadsheet->getDefaultStyle()->getFont()->setScheme('minor');\n```\n\nAll cells bound to the theme fonts (via the `Font::setScheme` method) can be easily changed to a different font in Excel. To do this in PhpSpreadsheet, an additional method call is needed:\n```php\n$spreadsheet->resetThemeFonts();\n```\n\n### Charset for Arabic and Persian Fonts\n\nIt is unknown why this should be needed. However, some Excel\nusers have reported better results if the internal declaration for an\nArabic/Persian font includes a `charset` declaration.\nThis seems like a bug in Excel, but, starting with release 4.4,\nthis can be accomplished at the spreadsheet level, via:\n```php\n$spreadsheet->addFontCharset('C Nazanin');\n```\nAs many charsets as desired can be added in this manner.\nThere is a second optional parameter specifying the charset id\nto this method, but, since this seems to be needed only for\nArabic/Persian, that is its default value.\n\n### Styling cell borders\n\nIn PhpSpreadsheet it is easy to apply various borders on a rectangular\nselection. Here is how to apply a thick red border outline around cells\nB2:G8.\n\n```php\n$styleArray = [\n    'borders' => [\n        'outline' => [\n            'borderStyle' => \\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_THICK,\n            'color' => ['argb' => 'FFFF0000'],\n        ],\n    ],\n];\n\n$worksheet->getStyle('B2:G8')->applyFromArray($styleArray);\n```\n\nIn Microsoft Office Excel, the above operation would correspond to\nselecting the cells B2:G8, launching the style dialog, choosing a thick\nred border, and clicking on the \"Outline\" border component.\n\nNote that the border outline is applied to the rectangular selection\nB2:G8 as a whole, not on each cell individually.\n\nYou can achieve any border effect by using just the 5 basic borders and\noperating on a single cell at a time:\n\n-   left\n-   right\n-   top\n-   bottom\n-   diagonal\n\nAdditional shortcut borders come in handy like in the example above.\nThese are the shortcut borders available:\n\n-   allBorders\n-   outline\n-   inside\n-   vertical\n-   horizontal\n\nAn overview of all border shortcuts can be seen in the following image:\n\n![08-styling-border-options.png](./images/08-styling-border-options.png)\n\nIf you simultaneously set e.g. allBorders and vertical, then we have\n\"overlapping\" borders, and one of the components has to win over the\nother where there is border overlap. In PhpSpreadsheet, from weakest to\nstrongest borders, the list is as follows: allBorders, outline/inside,\nvertical/horizontal, left/right/top/bottom/diagonal.\n\nThis border hierarchy can be utilized to achieve various effects in an\neasy manner.\n\n#### Advanced borders\n\nThere is a second parameter `$advancedBorders` which can be supplied to applyFromArray. The default is `true`; when set to this value, the border styles are applied to the range as a whole, not to the individual cells. When set to `false`, the border styles are applied to each cell. The following code and screenshot demonstrates the difference.\n\n```php\n$sheet->setShowGridlines(false);\n$styleArray = [\n    'borders' => [\n        'bottom' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FFFF0000']],\n        'top' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FFFF0000']],\n        'right' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FF00FF00']],\n        'left' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FF00FF00']],\n    ],\n];\n$sheet->getStyle('B2:C3')->applyFromArray($styleArray);\n$sheet->getStyle('B5:C6')->applyFromArray($styleArray, false);\n```\n\n![08-advance-borders.png](./images/08-advanced-borders.png)\n\n### Valid array keys for style `applyFromArray()`\n\nThe following table lists the valid array keys for\n`\\PhpOffice\\PhpSpreadsheet\\Style\\Style::applyFromArray()` classes. If the \"Maps\nto property\" column maps a key to a setter, the value provided for that\nkey will be applied directly. If the \"Maps to property\" column maps a\nkey to a getter, the value provided for that key will be applied as\nanother style array.\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\Style**\n\nArray key    | Maps to property\n-------------|-------------------\nalignment    | setAlignment()\nborders      | setBorders()\nfill         | setFill()\nfont         | setFont()\nnumberFormat | setNumberFormat()\nprotection   | setProtection()\nquotePrefix  | setQuotePrefix()\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\Alignment**\n\nArray key       | Maps to property\n----------------|-------------------\nhorizontal      | setHorizontal()\njustifyLastLine | setJustifyLastLine()\nindent          | setIndent()\nreadOrder       | setReadOrder()\nshrinkToFit     | setShrinkToFit()\ntextRotation    | setTextRotation()\nvertical        | setVertical()\nwrapText        | setWrapText()\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\Border**\n\nArray key   | Maps to property\n------------|-------------------\nborderStyle | setBorderStyle()\ncolor       | setColor()\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\Borders**\n\nArray key         | Maps to property\n------------------|-------------------\nallBorders        | getLeft(); getRight(); getTop(); getBottom()\nbottom            | getBottom()\ndiagonal          | getDiagonal()\ndiagonalDirection | setDiagonalDirection()\nleft              | getLeft()\nright             | getRight()\ntop               | getTop()\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\Color**\n\nArray key   | Maps to property\n------------|-------------------\nargb        | setARGB()\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\Fill**\n\nArray key  | Maps to property\n-----------|-------------------\ncolor      | getStartColor()\nendColor   | getEndColor()\nfillType   | setFillType()\nrotation   | setRotation()\nstartColor | getStartColor()\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\Font**\n\nArray key   | Maps to property\n------------|-------------------\nbold        | setBold()\ncolor       | getColor()\nitalic      | setItalic()\nname        | setName()\nsize        | setSize()\nstrikethrough | setStrikethrough()\nsubscript   | setSubscript()\nsuperscript | setSuperscript()\nunderline   | setUnderline()\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat**\n\nArray key | Maps to property\n----------|-------------------\nformatCode      | setFormatCode()\n\n**\\PhpOffice\\PhpSpreadsheet\\Style\\Protection**\n\nArray key | Maps to property\n----------|-------------------\nlocked    | setLocked()\nhidden    | setHidden()\n\n## Conditional formatting a cell\n\nA cell can be formatted conditionally, based on a specific rule. For\nexample, one can set the foreground colour of a cell to red if its value\nis below zero, and to green if its value is zero or more.\n\nOne can set a conditional style ruleset to a cell using the following\ncode:\n\n```php\n$conditional1 = new \\PhpOffice\\PhpSpreadsheet\\Style\\Conditional();\n$conditional1->setConditionType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::CONDITION_CELLIS);\n$conditional1->setOperatorType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::OPERATOR_LESSTHAN);\n$conditional1->addCondition('0');\n$conditional1->getStyle()->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_RED);\n$conditional1->getStyle()->getFont()->setBold(true);\n\n$conditional2 = new \\PhpOffice\\PhpSpreadsheet\\Style\\Conditional();\n$conditional2->setConditionType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::CONDITION_CELLIS);\n$conditional2->setOperatorType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::OPERATOR_GREATERTHANOREQUAL);\n$conditional2->addCondition('0');\n$conditional2->getStyle()->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_GREEN);\n$conditional2->getStyle()->getFont()->setBold(true);\n\n$conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('B2')->getConditionalStyles();\n$conditionalStyles[] = $conditional1;\n$conditionalStyles[] = $conditional2;\n\n$spreadsheet->getActiveSheet()->getStyle('B2')->setConditionalStyles($conditionalStyles);\n```\n\nIf you want to copy the ruleset to other cells, you can duplicate the\nstyle object:\n\n```php\n$spreadsheet->getActiveSheet()\n    ->duplicateConditionalStyle(\n        $spreadsheet->getActiveSheet()->getConditionalStyles('B2'),\n        'B3:B7'\n    );\n```\n\nMore detailed documentation of the Conditional Formatting options and rules, and the use of Wizards to help create them, can be found in [a dedicated section of the documentation](https://phpspreadsheet.readthedocs.io/en/latest/topics/conditional-formatting/).\n\n### DataBar of Conditional formatting\nThe basics are the same as conditional formatting.\nAdditional DataBar object to conditional formatting.\n\nFor example, the following code will result in the conditional formatting shown in the image.\n```php\n$conditional = new Conditional();\n$conditional->setConditionType(Conditional::CONDITION_DATABAR);\n$conditional->setDataBar(new ConditionalDataBar());\n$conditional->getDataBar()\n            ->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject('num', '2'))\n            ->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject('max'))\n            ->setColor('FFFF555A');\n$ext = $conditional\n    ->getDataBar()\n    ->setConditionalFormattingRuleExt(new ConditionalFormattingRuleExtension())\n    ->getConditionalFormattingRuleExt();\n    \n$ext->setCfRule('dataBar');\n$ext->setSqref('A1:A5'); // target CellCoordinates\n$ext->setDataBarExt(new ConditionalDataBarExtension());\n$ext->getDataBarExt()\n    ->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject('num', '2'))\n    ->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject('autoMax'))\n    ->setMinLength(0)\n    ->setMaxLength(100)\n    ->setBorder(true)\n    ->setDirection('rightToLeft')\n    ->setNegativeBarBorderColorSameAsPositive(false)\n    ->setBorderColor('FFFF555A')\n    ->setNegativeFillColor('FFFF0000')\n    ->setNegativeBorderColor('FFFF0000')\n    ->setAxisColor('FF000000');\n\n```\n\n![10-databar-of-conditional-formatting.png](./images/10-databar-of-conditional-formatting.png)\n\n## Add a comment to a cell\n\nTo add a comment to a cell, use the following code. The example below\nadds a comment to cell E11:\n\n```php\n$spreadsheet->getActiveSheet()\n    ->getComment('E11')\n    ->setAuthor('Mark Baker');\n$commentRichText = $spreadsheet->getActiveSheet()\n    ->getComment('E11')\n    ->getText()->createTextRun('PhpSpreadsheet:');\n$commentRichText->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()\n    ->getComment('E11')\n    ->getText()->createTextRun(\"\\r\\n\");\n$spreadsheet->getActiveSheet()\n    ->getComment('E11')\n    ->getText()->createTextRun('Total amount on the current invoice, excluding VAT.');\n```\n![08-cell-comment.png](./images/08-cell-comment.png)\n\n## Add a comment with background image to a cell\n\nTo add a comment with background image to a cell, use the following code:\n\n```php\n$sheet = $spreadsheet->getActiveSheet();\n$sheet->setCellValue('B5', 'Gibli Chromo');\n// Add png image to comment background\n$drawing = new Drawing();\n$drawing->setName('Gibli Chromo');\n$drawing->setPath('/tmp/gibli_chromo.png');\n$comment = $sheet->getComment('B5');\n$comment->setBackgroundImage($drawing);\n// Set the size of the comment equal to the size of the image \n$comment->setSizeAsBackgroundImage();\n```\n![08-cell-comment-with-image.png](./images/08-cell-comment-with-image.png)\n\n## Apply autofilter to a range of cells\n\nTo apply an autofilter to a range of cells, use the following code:\n\n```php\n$spreadsheet->getActiveSheet()->setAutoFilter('A1:C9');\n```\n\n**Make sure that you always include the complete filter range!** Excel\ndoes support setting only the caption row, but that's **not** a best\npractice...\n\n## Setting security on a spreadsheet\n\nExcel offers 3 levels of \"protection\":\n\n- Document: allows you to set a password on a complete\nspreadsheet, allowing changes to be made only when that password is\nentered.\n- Worksheet: offers other security options: you can\ndisallow inserting rows on a specific sheet, disallow sorting, ...\n- Cell: offers the option to lock/unlock a cell as well as show/hide\nthe internal formula.\n\n**Make sure you enable worksheet protection if you need any of the\nworksheet or cell protection features!** This can be done using the following\ncode:\n\n```php\n$spreadsheet->getActiveSheet()->getProtection()->setSheet(true);\n```\n\n> Note that \"protection\" is not the same as \"encryption\".\n> Protection is about preventing parts of a spreadsheet from being changed, not about preventing the spreadsheet from being looked at.<br /><br />\nPhpSpreadsheet does not support encrypting a spreadsheet; nor can it read encrypted spreadsheets.\n\n### Document\n\nAn example on setting document security:\n\n```php\n$security = $spreadsheet->getSecurity();\n$security->setLockWindows(true);\n$security->setLockStructure(true);\n$security->setWorkbookPassword(\"PhpSpreadsheet\");\n```\n\nNote that there are additional methods setLockRevision and setRevisionsPassword\nwhich apply only to change tracking and history for shared workbooks.\n\n### Worksheet\n\nAn example on setting worksheet security\n(user can sort, insert rows, or format cells without unprotecting):\n\n```php\n$protection = $spreadsheet->getActiveSheet()->getProtection();\n$protection->setPassword('PhpSpreadsheet');\n$protection->setSheet(true);\n$protection->setSort(false);\n$protection->setInsertRows(false);\n$protection->setFormatCells(false);\n```\n\nNote that allowing sort without providing the sheet password\n(similarly with autoFilter) requires that you explicitly\nenable the cell ranges for which sort is permitted,\nwith or without a range password:\n```php\n$sheet->protectCells('A:A'); // column A can be sorted without password\n$sheet->protectCells('B:B', 'sortpw'); // column B can be sorted if the range password sortpw is supplied\n```\n\nIf writing Xlsx files you can specify the algorithm used to hash the password\nbefore calling `setPassword()` like so:\n\n```php\n$protection = $spreadsheet->getActiveSheet()->getProtection();\n$protection->setAlgorithm(Protection::ALGORITHM_SHA_512);\n$protection->setSpinCount(20000);\n$protection->setPassword('PhpSpreadsheet');\n```\n\nThe salt should **not** be set manually and will be automatically generated\nwhen setting a new password.\n\n### Cell\n\nAn example on setting cell security.\nNote that cell security is honored only when sheet is protected.\nAlso note that the `hidden` property applies only to formulas,\nand tells whether the formula is hidden on the formula bar,\nnot in the cell.\n\n```php\n$spreadsheet->getActiveSheet()->getStyle('B1')\n    ->getProtection()\n    ->setLocked(\\PhpOffice\\PhpSpreadsheet\\Style\\Protection::PROTECTION_UNPROTECTED)\n    ->setHidden(\\PhpOffice\\PhpSpreadsheet\\Style\\Protection::PROTECTION_PROTECTED);\n```\n\n## Reading protected spreadsheet\n\nSpreadsheets that are protected as described above can always be read by\nPhpSpreadsheet. There is no need to know the password or do anything special in\norder to read a protected file.\n\nHowever if you need to implement a password verification mechanism, you can use the\nfollowing helper method:\n\n\n```php\n$protection = $spreadsheet->getActiveSheet()->getProtection();\n$allowed = $protection->verify('my password');\n\nif ($allowed) {\n    doSomething();\n} else {\n    throw new Exception('Incorrect password');\n}\n```\n\nIf you need to completely prevent reading a file by any tool, including PhpSpreadsheet,\nthen you are looking for \"encryption\", not \"protection\".\n\n## Setting data validation on a cell\n\nData validation is a powerful feature of Xlsx. It allows to specify an\ninput filter on the data that can be inserted in a specific cell. This\nfilter can be a range (i.e. value must be between 0 and 10), a list\n(i.e. value must be picked from a list), ...\n\nThe following piece of code only allows numbers between 10 and 20 to be\nentered in cell B3:\n\n```php\n$validation = $spreadsheet->getActiveSheet()->getCell('B3')\n    ->getDataValidation();\n$validation->setType( \\PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation::TYPE_WHOLE );\n$validation->setErrorStyle( \\PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation::STYLE_STOP );\n$validation->setAllowBlank(true);\n$validation->setShowInputMessage(true);\n$validation->setShowErrorMessage(true);\n$validation->setErrorTitle('Input error');\n$validation->setError('Number is not allowed!');\n$validation->setPromptTitle('Allowed input');\n$validation->setPrompt('Only numbers between 10 and 20 are allowed.');\n$validation->setFormula1(10);\n$validation->setFormula2(20);\n```\n\nThe following piece of code only allows an item picked from a list of\ndata to be entered in cell B5:\n\n```php\n$validation = $spreadsheet->getActiveSheet()->getCell('B5')\n    ->getDataValidation();\n$validation->setType( \\PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation::TYPE_LIST );\n$validation->setErrorStyle( \\PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation::STYLE_INFORMATION );\n$validation->setAllowBlank(false);\n$validation->setShowInputMessage(true);\n$validation->setShowErrorMessage(true);\n$validation->setShowDropDown(true);\n$validation->setErrorTitle('Input error');\n$validation->setError('Value is not in list.');\n$validation->setPromptTitle('Pick from list');\n$validation->setPrompt('Please pick a value from the drop-down list.');\n$validation->setFormula1('\"Item A,Item B,Item C\"');\n```\n\nWhen using a data validation list like above, make sure you put the list\nbetween `\"` and `\"` and that you split the items with a comma (`,`).\n\nIt is important to remember that any string participating in an Excel\nformula is allowed to be maximum 255 characters (not bytes). This sets a\nlimit on how many items you can have in the string \"Item A,Item B,Item\nC\". Therefore it is normally a better idea to type the item values\ndirectly in some cell range, say A1:A3, and instead use, say,\n`$validation->setFormula1('\\'Sheet title\\'!$A$1:$A$3')`. Another benefit is that\nthe item values themselves can contain the comma `,` character itself.\n\n### Setting Validation on Multiple Cells - Release 3 and Below\n\nIf you need data validation on multiple cells, one can clone the\nruleset:\n\n```php\n$spreadsheet->getActiveSheet()->getCell('B8')->setDataValidation(clone $validation);\n```\n\nAlternatively, one can apply the validation to a range of cells:\n```php\n$validation->setSqref('B5:B1048576');\n```\n\n### Setting Validation on Multiple Cells - Release 4 and Above\n\nStarting with Release 4, Data Validation can be set simultaneously on several cells/cell ranges.\n\n```php\n$spreadsheet->getActiveSheet()->getDataValidation('A1:A4 D5 E6:E7')\n    ->set...(...);\n```\n\nIn theory, this means that more than one Data Validation can apply to a cell.\nIt appears that, when Excel reads a spreadsheet with more than one Data Validation applying to a cell,\nwhichever appears first in the Xml is what Xml uses.\nPhpSpreadsheet will instead apply a DatValidation applying to a single cell first;\nthen, if it doesn't find such a match, it will use the first applicable definition which is read (or created after or in lieu of reading).\nThis allows you, for example, to set Data Validation on all but a few cells in a column:\n```php\n$dv = new DataValidation();\n$dv->setType(DataValidation::TYPE_NONE);\n$sheet->setDataValidation('A5:A7', $dv);\n$dv = new DataValidation();\n$dv->set...(...);\n$sheet->setDataValidation('A:A', $dv);\n$dv = new DataValidation();\n$dv->setType(DataValidation::TYPE_NONE);\n$sheet->setDataValidation('A9', $dv);\n```\n\n## Setting a column's width\n\nA column's width can be set using the following code:\n\n```php\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(12);\n```\n\nIf you want to set a column width using a different UoM (Unit of Measure),\nthen you can do so by telling PhpSpreadsheet what UoM the width value\nthat you are setting is measured in.\nValid units are `pt` (points), `px` (pixels), `pc` (pica), `in` (inches),\n`cm` (centimeters) and `mm` (millimeters).\n\nSetting the column width to `-1` tells MS Excel to display the column using its default width.  \n\n```php\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(120, 'pt');\n```\n\nIf you want PhpSpreadsheet to perform an automatic width calculation,\nuse the following code. PhpSpreadsheet will approximate the column width\nto the width of the widest value displayed in that column.\n\n```php\n$spreadsheet->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);\n```\n\n![08-column-width.png](./images/08-column-width.png)\n\nThe measure for column width in PhpSpreadsheet does **not** correspond\nexactly to the measure you may be used to in Microsoft Office Excel.\nColumn widths are difficult to deal with in Excel, and there are several\nmeasures for the column width.\n\n1. Inner width in character units\n(e.g. 8.43 this is probably what you are familiar with in Excel)\n2. Full width in pixels (e.g. 64 pixels)\n3. Full width in character units (e.g. 9.140625, value -1 indicates unset width)\n\n**PhpSpreadsheet always\noperates with \"3. Full width in character units\"** which is in fact the\nonly value that is stored in any Excel file, hence the most reliable\nmeasure. Unfortunately, **Microsoft Office Excel does not present you\nwith this measure**. Instead measures 1 and 2 are computed by the\napplication when the file is opened and these values are presented in\nvarious dialogues and tool tips.\n\nThe character width unit is the width of\na `0` (zero) glyph in the workbooks default font. Therefore column\nwidths measured in character units in two different workbooks can only\nbe compared if they have the same default workbook font.If you have some\nExcel file and need to know the column widths in measure 3, you can\nread the Excel file with PhpSpreadsheet and echo the retrieved values.\n\n## Show/hide a column\n\nTo set a worksheet's column visibility, you can use the following code.\nThe first line explicitly shows the column C, the second line hides\ncolumn D.\n\n```php\n$spreadsheet->getActiveSheet()->getColumnDimension('C')->setVisible(true);\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setVisible(false);\n```\n\n## Group/outline a column\n\nTo group/outline a column, you can use the following code:\n\n```php\n$spreadsheet->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1);\n```\n\nYou can also collapse the column. Note that you should also set the\ncolumn invisible, otherwise the collapse will not be visible in Excel\n2007.\n\n```php\n$spreadsheet->getActiveSheet()->getColumnDimension('E')->setCollapsed(true);\n$spreadsheet->getActiveSheet()->getColumnDimension('E')->setVisible(false);\n```\n\nPlease refer to the section \"group/outline a row\" for a complete example\non collapsing.\n\nYou can instruct PhpSpreadsheet to add a summary to the right (default),\nor to the left. The following code adds the summary to the left:\n\n```php\n$spreadsheet->getActiveSheet()->setShowSummaryRight(false);\n```\n\n## Setting a row's height\n\nA row's height can be set using the following code:\n\n```php\n$spreadsheet->getActiveSheet()->getRowDimension('10')->setRowHeight(100);\n```\n\nExcel measures row height in points, where 1 pt is 1/72 of an inch (or\nabout 0.35mm). The default value is 12.75 pts; and the permitted range\nof values is between 0 and 409 pts, where 0 pts is a hidden row.\n\nIf you want to set a row height using a different UoM (Unit of Measure),\nthen you can do so by telling PhpSpreadsheet what UoM the height value\nthat you are setting is measured in.\nValid units are `pt` (points), `px` (pixels), `pc` (pica), `in` (inches),\n`cm` (centimeters) and `mm` (millimeters).\n\n```php\n$spreadsheet->getActiveSheet()->getRowDimension('10')->setRowHeight(100, 'pt');\n```\n\nSetting the row height to `-1` tells MS Excel to display the column using its default height, which is based on the character font size.\n\nIf you have wrapped text in a cell, then the `-1` default will only set the row height to display a single line of that wrapped text.\nIf you need to calculate the actual height for the row, then count the lines that should be displayed (count the `\\n` and add 1); then adjust for the font.\nThe adjustment for Calibri 11 is approximately 14.5; for Calibri 12 15.9, etc.\n```php\n$spreadsheet->getActiveSheet()->getRowDimension(1)->setRowHeight(\n    14.5 * (substr_count($sheet->getCell('A1')->getValue(), \"\\n\") + 1)\n);\n```\n\n\n## Show/hide a row\n\nTo set a worksheet''s row visibility, you can use the following code.\nThe following example hides row number 10.\n\n```php\n$spreadsheet->getActiveSheet()->getRowDimension('10')->setVisible(false);\n```\n\nNote that if you apply active filters using an AutoFilter, then this\nwill override any rows that you hide or unhide manually within that\nAutoFilter range if you save the file.\n\n## Group/outline a row\n\nTo group/outline a row, you can use the following code:\n\n```php\n$spreadsheet->getActiveSheet()->getRowDimension('5')->setOutlineLevel(1);\n```\n\nYou can also collapse the row. Note that you should also set the row\ninvisible, otherwise the collapse will not be visible in Excel 2007.\n\n```php\n$spreadsheet->getActiveSheet()->getRowDimension('5')->setCollapsed(true);\n$spreadsheet->getActiveSheet()->getRowDimension('5')->setVisible(false);\n```\n\nHere's an example which collapses rows 50 to 80:\n\n```php\nfor ($i = 51; $i <= 80; $i++) {\n    $spreadsheet->getActiveSheet()->setCellValue('A' . $i, \"FName $i\");\n    $spreadsheet->getActiveSheet()->setCellValue('B' . $i, \"LName $i\");\n    $spreadsheet->getActiveSheet()->setCellValue('C' . $i, \"PhoneNo $i\");\n    $spreadsheet->getActiveSheet()->setCellValue('D' . $i, \"FaxNo $i\");\n    $spreadsheet->getActiveSheet()->setCellValue('E' . $i, true);\n    $spreadsheet->getActiveSheet()->getRowDimension($i)->setOutlineLevel(1);\n    $spreadsheet->getActiveSheet()->getRowDimension($i)->setVisible(false);\n}\n\n$spreadsheet->getActiveSheet()->getRowDimension(81)->setCollapsed(true);\n```\n\nYou can instruct PhpSpreadsheet to add a summary below the collapsible\nrows (default), or above. The following code adds the summary above:\n\n```php\n$spreadsheet->getActiveSheet()->setShowSummaryBelow(false);\n```\n\n## Merge/Unmerge cells\n\nIf you have a big piece of data you want to display in a worksheet, or a\nheading that needs to span multiple sub-heading columns, you can merge\ntwo or more cells together, to become one cell. This can be done using\nthe following code:\n\n```php\n$spreadsheet->getActiveSheet()->mergeCells('A18:E22');\n```\n\nRemoving a merge can be done using the `unmergeCells()` method:\n\n```php\n$spreadsheet->getActiveSheet()->unmergeCells('A18:E22');\n```\n\nMS Excel itself doesn't yet offer the functionality to simply hide the merged cells, or to merge the content of cells into a single cell, but it is available in Open/Libre Office.\n\n### Merge with MERGE_CELL_CONTENT_EMPTY\n\nThe default behaviour is to empty all cells except for the top-left corner cell in the merge range; and this is also the default behaviour for the `mergeCells()` method in PhpSpreadsheet.\nWhen this behaviour is applied, those cell values will be set to null; and if they are subsequently Unmerged, they will be empty cells.\n\nPassing an extra flag value to the `mergeCells()` method in PhpSpreadsheet can change this behaviour.\n\n![12-01-MergeCells-Options.png](./images/12-01-MergeCells-Options.png)\n\nPossible flag values are:\n- Worksheet::MERGE_CELL_CONTENT_EMPTY (the default)\n- Worksheet::MERGE_CELL_CONTENT_HIDE\n- Worksheet::MERGE_CELL_CONTENT_MERGE\n\n### Merge with MERGE_CELL_CONTENT_HIDE\n\nThe first alternative, available only in OpenOffice, is to hide those cells, but to leave their content intact.\nWhen a file saved as `Xlsx` in those applications is opened in MS Excel, and those cells are unmerged, the original content will still be present.\n\n```php\n$spreadsheet->getActiveSheet()->mergeCells('A1:C3', Worksheet::MERGE_CELL_CONTENT_HIDE);\n```\n\nWill replicate that behaviour.\n\n### Merge with MERGE_CELL_CONTENT_MERGE\n\nThe second alternative, available in both OpenOffice and LibreOffice is to merge the content of every cell in the merge range into the top-left cell, while setting those hidden cells to empty.\n\n```php\n$spreadsheet->getActiveSheet()->mergeCells('A1:C3', Worksheet::MERGE_CELL_CONTENT_MERGE);\n```\n\nParticularly when the merged cells contain formulas, the logic for this merge seems strange:\nwalking through the merge range, each cell is calculated in turn, and appended to the \"master\" cell, then it is emptied, so any subsequent calculations that reference the cell see an empty cell, not the pre-merge value. \nFor example, suppose our spreadsheet contains\n\n![12-01-MergeCells-Options-2.png](./images/12-01-MergeCells-Options-2.png)\n\nwhere `B2` is the formula `=5-B1` and `C2` is the formula `=A2/B2`,\nand we want to merge cells `A2` to `C2` with all the cell values merged.\nThe result is:\n\n![12-01-MergeCells-Options-3.png](./images/12-01-MergeCells-Options-3.png)\n\nThe cell value `12` from cell `A2` is fixed; the value from `B2` is the result of the formula `=5-B1` (`4`, which is appended to our merged value), and cell `B2` is then emptied, so when we evaluate cell `C2` with the formula `=A2/B2` it gives us `12 / 0` which results in a `#DIV/0!` error (so the error `#DIV/0!` is appended to our merged value rather than the original calculation result of `3`).\n\n## Inserting or Removing rows/columns\n\nYou can insert/remove rows/columns at a specific position. The following\ncode inserts 2 new rows, right before row 7:\n\n```php\n$spreadsheet->getActiveSheet()->insertNewRowBefore(7, 2);\n```\nwhile\n```php\n$spreadsheet->getActiveSheet()->removeRow(7, 2);\n```\nwill remove 2 rows starting at row number 7 (ie. rows 7 and 8).\n\nEquivalent methods exist for inserting/removing columns:\n\n```php\n$spreadsheet->getActiveSheet()->removeColumn('C', 2);\n```\n\nAll subsequent rows (or columns) will be moved to allow the insertion (or removal) with all formulas referencing thise cells adjusted accordingly.\n\nNote that this is a fairly intensive process, particularly with large worksheets, and especially if you are inserting/removing rows/columns from near beginning of the worksheet.\n\nIf you need to insert/remove several consecutive rows/columns, always use the second argument rather than making multiple calls to insert/remove a single row/column if possible.\n\n## Add a drawing to a worksheet\n\nA drawing is always represented as a separate object, which can be added\nto a worksheet. Therefore, you must first instantiate a new\n`\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing`, and assign its properties a\nmeaningful value:\n\n```php\n$drawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing();\n$drawing->setName('Logo');\n$drawing->setDescription('Logo');\n$drawing->setPath('./images/officelogo.jpg');\n$drawing->setHeight(36);\n```\n\nTo add the above drawing to the worksheet, use the following snippet of\ncode. PhpSpreadsheet creates the link between the drawing and the\nworksheet:\n\n```php\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n```\n\nYou can set numerous properties on a drawing, here are some examples:\n\n```php\n$drawing->setName('Paid');\n$drawing->setDescription('Paid');\n$drawing->setPath('./images/paid.png');\n$drawing->setCoordinates('B15');\n$drawing->setOffsetX(110);\n$drawing->setRotation(25);\n$drawing->getShadow()->setVisible(true);\n$drawing->getShadow()->setDirection(45);\n```\n\nYou can also add images created using GD functions without needing to\nsave them to disk first as In-Memory drawings.\n\n```php\n//  Use GD to create an in-memory image\n$gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream');\n$textColor = imagecolorallocate($gdImage, 255, 255, 255);\nimagestring($gdImage, 1, 5, 5,  'Created with PhpSpreadsheet', $textColor);\n\n//  Add the In-Memory image to a worksheet\n$drawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing();\n$drawing->setName('In-Memory image 1');\n$drawing->setDescription('In-Memory image 1');\n$drawing->setCoordinates('A1');\n$drawing->setImageResource($gdImage);\n$drawing->setRenderingFunction(\n    \\PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing::RENDERING_JPEG\n);\n$drawing->setMimeType(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing::MIMETYPE_DEFAULT);\n$drawing->setHeight(36);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n```\n\nNote that GD images are memory-intensive.\n\n### Creating a Drawing from string or stream data\n\nIf you want to create a drawing from a string containing the binary image data, or from an external datasource such as an S3 bucket, then you can create a new MemoryDrawing from these sources using the `fromString()` or `fromStream()` static methods.\n\n```php\n$drawing = MemoryDrawing::fromString($imageString);\n```\n\n```php\n$drawing = MemoryDrawing::fromStream($imageStreamFromS3Bucket);\n```\n\nNote that this is a memory-intensive process, like all gd images; and also creates a temporary file.\n\n## Reading Images from a worksheet\n\nA commonly asked question is how to retrieve the images from a workbook\nthat has been loaded, and save them as individual image files to disk.\n\nThe following code extracts images from the current active worksheet,\nand writes each as a separate file.\n\n```php\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\n$i = 0;\n\nforeach ($spreadsheet->getActiveSheet()->getDrawingCollection() as $drawing) {\n    if ($drawing instanceof MemoryDrawing) {\n        ob_start();\n        call_user_func(\n            $drawing->getRenderingFunction(),\n            $drawing->getImageResource()\n        );\n        $imageContents = ob_get_contents();\n        ob_end_clean();\n        switch ($drawing->getMimeType()) {\n            case MemoryDrawing::MIMETYPE_PNG :\n                $extension = 'png';\n                break;\n            case MemoryDrawing::MIMETYPE_GIF:\n                $extension = 'gif';\n                break;\n            case MemoryDrawing::MIMETYPE_JPEG :\n                $extension = 'jpg';\n                break;\n        }\n    } else {\n        if ($drawing->getPath()) {\n            // Check if the source is a URL or a file path\n            if ($drawing->getIsURL()) {\n                $imageContents = file_get_contents($drawing->getPath());\n                $filePath = tempnam(sys_get_temp_dir(), 'Drawing');\n                file_put_contents($filePath , $imageContents);\n                $mimeType = mime_content_type($filePath);\n                // You could use the below to find the extension from mime type.\n                // https://gist.github.com/alexcorvi/df8faecb59e86bee93411f6a7967df2c#gistcomment-2722664\n                $extension = File::mime2ext($mimeType);\n                unlink($filePath);            \n            }\n            else {\n                $zipReader = fopen($drawing->getPath(),'r');\n                $imageContents = '';\n                while (!feof($zipReader)) {\n                    $imageContents .= fread($zipReader,1024);\n                }\n                fclose($zipReader);\n                $extension = $drawing->getExtension();            \n            }\n        }\n    }\n    $myFileName = '00_Image_'.++$i.'.'.$extension;\n    file_put_contents($myFileName,$imageContents);\n}\n```\n\n## Add rich text to a cell\n\nAdding rich text to a cell can be done using\n`\\PhpOffice\\PhpSpreadsheet\\RichText\\RichText` instances. Here''s an example, which\ncreates the following rich text string:\n\n> This invoice is <font color=\"darkgreen\">***payable within thirty days after the end of the\n> month***</font> unless specified otherwise on the invoice.\n\n```php\n$richText = new \\PhpOffice\\PhpSpreadsheet\\RichText\\RichText();\n$richText->createText('This invoice is ');\n$payable = $richText->createTextRun('payable within thirty days after the end of the month');\n$payable->getFont()->setBold(true);\n$payable->getFont()->setItalic(true);\n$payable->getFont()->setColor(\n    new \\PhpOffice\\PhpSpreadsheet\\Style\\Color( \n        \\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_DARKGREEN\n    )\n);\n$richText->createText(', unless specified otherwise on the invoice.');\n$spreadsheet->getActiveSheet()->getCell('A18')->setValue($richText);\n```\n\n## Define a named range\n\nPhpSpreadsheet supports the definition of named ranges. These can be\ndefined using the following code:\n\n```php\n// Add some data\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Firstname:');\n$spreadsheet->getActiveSheet()->setCellValue('A2', 'Lastname:');\n$spreadsheet->getActiveSheet()->setCellValue('B1', 'Maarten');\n$spreadsheet->getActiveSheet()->setCellValue('B2', 'Balliauw');\n\n// Define named ranges\n$spreadsheet->addNamedRange( new \\PhpOffice\\PhpSpreadsheet\\NamedRange('PersonFN', $spreadsheet->getActiveSheet(), '$B$1'));\n$spreadsheet->addNamedRange( new \\PhpOffice\\PhpSpreadsheet\\NamedRange('PersonLN', $spreadsheet->getActiveSheet(), '$B$2'));\n```\n\nOptionally, a fourth parameter can be passed defining the named range\nlocal (i.e. only usable on the current worksheet). Named ranges are\nglobal by default.\n\n## Define a named formula\n\nIn addition to named ranges, PhpSpreadsheet also supports the definition of named formulas. These can be\ndefined using the following code:\n\n```php\n// Add some data\n$spreadsheet->setActiveSheetIndex(0);\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet\n    ->setCellValue('A1', 'Product')\n    ->setCellValue('B1', 'Quantity')\n    ->setCellValue('C1', 'Unit Price')\n    ->setCellValue('D1', 'Price')\n    ->setCellValue('E1', 'VAT')\n    ->setCellValue('F1', 'Total');\n\n// Define named formula\n$spreadsheet->addNamedFormula( new \\PhpOffice\\PhpSpreadsheet\\NamedFormula('GERMAN_VAT_RATE', $worksheet, '=16.0%'));\n$spreadsheet->addNamedFormula( new \\PhpOffice\\PhpSpreadsheet\\NamedFormula('CALCULATED_PRICE', $worksheet, '=$B1*$C1'));\n$spreadsheet->addNamedFormula( new \\PhpOffice\\PhpSpreadsheet\\NamedFormula('GERMAN_VAT', $worksheet, '=$D1*GERMAN_VAT_RATE'));\n$spreadsheet->addNamedFormula( new \\PhpOffice\\PhpSpreadsheet\\NamedFormula('TOTAL_INCLUDING_VAT', $worksheet, '=$D1+$E1'));\n\n$worksheet\n    ->setCellValue('A2', 'Advanced Web Application Architecture')\n    ->setCellValue('B2', 2)\n    ->setCellValue('C2', 23.0)\n    ->setCellValue('D2', '=CALCULATED_PRICE')\n    ->setCellValue('E2', '=GERMAN_VAT')\n    ->setCellValue('F2', '=TOTAL_INCLUDING_VAT');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A3', 'Object Design Style Guide')\n    ->setCellValue('B3', 5)\n    ->setCellValue('C3', 12.0)\n    ->setCellValue('D3', '=CALCULATED_PRICE')\n    ->setCellValue('E3', '=GERMAN_VAT')\n    ->setCellValue('F3', '=TOTAL_INCLUDING_VAT');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A4', 'PHP For the Web')\n    ->setCellValue('B4', 3)\n    ->setCellValue('C4', 10.0)\n    ->setCellValue('D4', '=CALCULATED_PRICE')\n    ->setCellValue('E4', '=GERMAN_VAT')\n    ->setCellValue('F4', '=TOTAL_INCLUDING_VAT');\n\n// Use a relative named range to provide the totals for rows 2-4\n$spreadsheet->addNamedRange( new \\PhpOffice\\PhpSpreadsheet\\NamedRange('COLUMN_TOTAL', $worksheet, '=A$2:A$4') );\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B6', '=SUBTOTAL(109,COLUMN_TOTAL)')\n    ->setCellValue('D6', '=SUBTOTAL(109,COLUMN_TOTAL)')\n    ->setCellValue('E6', '=SUBTOTAL(109,COLUMN_TOTAL)')\n    ->setCellValue('F6', '=SUBTOTAL(109,COLUMN_TOTAL)');\n```\n\nAs with named ranges, an optional fourth parameter can be passed defining the named formula\nscope as local (i.e. only usable on the specified worksheet). Otherwise, named formulas are\nglobal by default.\n\n## Redirect output to a client's web browser\n\nSometimes, one really wants to output a file to a client''s browser,\nespecially when creating spreadsheets on-the-fly. There are some easy\nsteps that can be followed to do this:\n\n1.  Create your PhpSpreadsheet spreadsheet\n2.  Output HTTP headers for the type of document you wish to output\n3.  Use the `\\PhpOffice\\PhpSpreadsheet\\Writer\\*` of your choice, and save\n    to `'php://output'`\n\n`\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx` uses temporary storage when\nwriting to `php://output`. By default, temporary files are stored in the\nscript's working directory. When there is no access, it falls back to\nthe operating system's temporary files location.\n\n**This may not be safe for unauthorized viewing!** Depending on the\nconfiguration of your operating system, temporary storage can be read by\nanyone using the same temporary storage folder. When confidentiality of\nyour document is needed, it is recommended not to use `php://output`.\n\n### HTTP headers\n\nExample of a script redirecting an Excel 2007 file to the client's\nbrowser:\n\n```php\n/* Here there will be some code where you create $spreadsheet */\n\n// redirect output to client browser\nheader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\nheader('Content-Disposition: attachment;filename=\"myfile.xlsx\"');\nheader('Cache-Control: max-age=0');\n\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Xlsx');\n$writer->save('php://output');\n```\n\nExample of a script redirecting an Xls file to the client's browser:\n\n```php\n/* Here there will be some code where you create $spreadsheet */\n\n// redirect output to client browser\nheader('Content-Type: application/vnd.ms-excel');\nheader('Content-Disposition: attachment;filename=\"myfile.xls\"');\nheader('Cache-Control: max-age=0');\n\n$writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, 'Xls');\n$writer->save('php://output');\n```\n\n**Caution:**\n\nMake sure not to include any echo statements or output any other\ncontents than the Excel file. There should be no whitespace before the\nopening `<?php` tag and at most one line break after the closing `?>`\ntag (which can also be omitted to avoid problems). Make sure that your\nscript is saved without a BOM (Byte-order mark) because this counts as\nechoing output. The same things apply to all included files. Failing to\nfollow the above guidelines may result in corrupt Excel files arriving\nat the client browser, and/or that headers cannot be set by PHP\n(resulting in warning messages).\n\n## Setting the default column width\n\nDefault column width can be set using the following code:\n\n```php\n$spreadsheet->getActiveSheet()->getDefaultColumnDimension()->setWidth(12);\n```\n\nExcel measures column width in its own proprietary units, based on the number\nof characters that will be displayed in the default font.\n\nIf you want to set the default column width using a different UoM (Unit of Measure),\nthen you can do so by telling PhpSpreadsheet what UoM the width value\nthat you are setting is measured in.\nValid units are `pt` (points), `px` (pixels), `pc` (pica), `in` (inches),\n`cm` (centimeters) and `mm` (millimeters).\n\n```php\n$spreadsheet->getActiveSheet()->getDefaultColumnDimension()->setWidth(400, 'pt');\n```\nand PhpSpreadsheet will handle the internal conversion.\n\n## Setting the default row height\n\nDefault row height can be set using the following code:\n\n```php\n$spreadsheet->getActiveSheet()->getDefaultRowDimension()->setRowHeight(15);\n```\n\nExcel measures row height in points, where 1 pt is 1/72 of an inch (or\nabout 0.35mm). The default value is 12.75 pts; and the permitted range\nof values is between 0 and 409 pts, where 0 pts is a hidden row.\n\nIf you want to set a row height using a different UoM (Unit of Measure),\nthen you can do so by telling PhpSpreadsheet what UoM the height value\nthat you are setting is measured in.\nValid units are `pt` (points), `px` (pixels), `pc` (pica), `in` (inches),\n`cm` (centimeters) and `mm` (millimeters).\n\n```php\n$spreadsheet->getActiveSheet()->getDefaultRowDimension()->setRowHeight(100, 'pt');\n```\n\n\n## Add a GD drawing to a worksheet\n\nThere might be a situation where you want to generate an in-memory image\nusing GD and add it to a `Spreadsheet` without first having to save this\nfile to a temporary location.\n\nHere''s an example which generates an image in memory and adds it to the\nactive worksheet:\n\n```php\n// Generate an image\n$gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream');\n$textColor = imagecolorallocate($gdImage, 255, 255, 255);\nimagestring($gdImage, 1, 5, 5,  'Created with PhpSpreadsheet', $textColor);\n\n// Add a drawing to the worksheet\n$drawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing();\n$drawing->setName('Sample image');\n$drawing->setDescription('Sample image');\n$drawing->setImageResource($gdImage);\n$drawing->setRenderingFunction(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing::RENDERING_JPEG);\n$drawing->setMimeType(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing::MIMETYPE_DEFAULT);\n$drawing->setHeight(36);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n```\n\n## Setting worksheet zoom level\n\nTo set a worksheet's zoom level, the following code can be used:\n\n```php\n$spreadsheet->getActiveSheet()->getSheetView()->setZoomScale(75);\n```\n\nNote that zoom level should be in range 10 - 400.\n\n## Sheet tab color\n\nSometimes you want to set a color for sheet tab. For example you can\nhave a red sheet tab:\n\n```php\n$worksheet->getTabColor()->setRGB('FF0000');\n```\n\n## Creating worksheets in a workbook\n\nIf you need to create more worksheets in the workbook, here is how:\n\n```php\n$worksheet1 = $spreadsheet->createSheet();\n$worksheet1->setTitle('Another sheet');\n```\n\nThink of `createSheet()` as the \"Insert sheet\" button in Excel. When you\nhit that button a new sheet is appended to the existing collection of\nworksheets in the workbook.\n\n## Hidden worksheets (Sheet states)\n\nSet a worksheet to be **hidden** using this code:\n\n```php\n$spreadsheet->getActiveSheet()\n    ->setSheetState(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::SHEETSTATE_HIDDEN);\n```\n\nSometimes you may even want the worksheet to be **\"very hidden\"**. The\navailable sheet states are :\n\n-   `\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::SHEETSTATE_VISIBLE`\n-   `\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::SHEETSTATE_HIDDEN`\n-   `\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::SHEETSTATE_VERYHIDDEN`\n\nIn Excel the sheet state \"very hidden\" can only be set programmatically,\ne.g. with Visual Basic Macro. It is not possible to make such a sheet\nvisible via the user interface.\n\n## Right-to-left worksheet\n\nWorksheets can be set individually whether column `A` should start at\nleft or right side. Default is left. Here is how to set columns from\nright-to-left.\n\n```php\n// right-to-left worksheet\n$spreadsheet->getActiveSheet()->setRightToLeft(true);\n```\n"
  },
  {
    "path": "docs/topics/settings.md",
    "content": "# Configuration Settings\n\nOnce you have included the PhpSpreadsheet files in your script, but\nbefore instantiating a `Spreadsheet` object or loading a workbook file,\nthere are a number of configuration options that can be set which will\naffect the subsequent behaviour of the script.\n\n## Cell collection caching\n\nBy default, PhpSpreadsheet holds all cell objects in memory, but\nyou can specify alternatives to reduce memory consumption at the cost of speed.\nRead more about [memory saving](./memory_saving.md).\n\nTo enable cell caching, you must provide your own implementation of cache like so:\n\n```php\n$cache = new MyCustomPsr16Implementation();\n\n\\PhpOffice\\PhpSpreadsheet\\Settings::setCache($cache);\n```\n\n## Language/Locale\n\nSome localisation elements have been included in PhpSpreadsheet. You can\nset a locale by changing the settings. To set the locale to Brazilian\nPortuguese you would use:\n\n```php\n$locale = 'pt_br';\n$validLocale = \\PhpOffice\\PhpSpreadsheet\\Settings::setLocale($locale);\nif (!$validLocale) {\n    echo 'Unable to set locale to ' . $locale . \" - reverting to en_us\" . PHP_EOL;\n}\n```\n\n- If Brazilian Portuguese language files aren't available, then Portuguese\nwill be enabled instead\n- If Portuguese language files also aren't available,\nthen the `setLocale` method will return `false`, and American English\n(en\\_us) settings will be used throughout.\n\nMore details of the features available once a locale has been set,\nincluding a list of the languages and locales currently supported, can\nbe found in [Locale Settings for\nFormulas](./recipes.md#locale-settings-for-formulas).\n\nAdditional localization elements (currency code, thousands separator, and decimal separator) are available in `PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper`:\n\n```php\nStringHelper::setCurrencyCode('€');\nStringHelper::setThousandsSeparator('.');\nStringHelper::setDecimalSeparator(',');\n```\n\nYou can use the Php function `setLocale` to try to set these values\nwithout knowing beforehand what symbols are needed.\n```php\nStringHelper::setCurrencyCode(null);\nStringHelper::setThousandsSeparator(null);\nStringHelper::setDecimalSeparator(null);\n$result = setLocale(LC_ALL, 'pt_br.UTF-8');\n```\nHowever, this function maintains its information at the process level, not the thread level,\nand its use is therefore discouraged.\n\nA less-troublesome replacement is available starting with PhpSpreadsheet 5.4.\n```php\n$result = StringHelper::setLocale('pt_br'); // will restore defaults if argument is null\n```\nThis will set the locale and the 3 StringHelper values all at once.\nIt requires the `Intl` extension, which is not a requirement for PhpSpreadsheet as a whole.\nFor that reason, it returns a boolean result, which will be `false`\nif `Intl` is not available, or if it does not consider the supplied locale to be valid.\n"
  },
  {
    "path": "docs/topics/tables.md",
    "content": "# Tables\n\n## Introduction\n\nTo make managing and analyzing a group of related data easier, you can turn a range of cells into an Excel table (previously known as an Excel list).\n\n## Support\n\nCurrently tables are supported in Xlsx reader and Html Writer\n\nTo enable table formatting for Html writer, use:\n\n```php\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setConditionalFormatting(true);\n```"
  },
  {
    "path": "docs/topics/worksheets.md",
    "content": "# Worksheets\n\nA worksheet is a collection of cells, formulae, images, graphs, etc. It\nholds all data necessary to represent a spreadsheet worksheet.\n\nWhen you load a workbook from a spreadsheet file, it will be loaded with\nall its existing worksheets (unless you specified that only certain\nsheets should be loaded). When you load from non-spreadsheet files (such\nas a CSV or HTML file) or from spreadsheet formats that don't identify\nworksheets by name (such as SYLK), then a single worksheet called\n\"WorkSheet1\" will be created containing the data from that file.\n\nWhen you instantiate a new workbook, PhpSpreadsheet will create it with\na single worksheet called \"WorkSheet1\".\n\nThe `getSheetCount()` method will tell you the number of worksheets in\nthe workbook; while the `getSheetNames()` method will return a list of\nall worksheets in the workbook, indexed by the order in which their\n\"tabs\" would appear when opened in MS Excel (or other appropriate\nSpreadsheet program).\n\nIndividual worksheets can be accessed by name, or by their index\nposition in the workbook. The index position represents the order that\neach worksheet \"tab\" is shown when the workbook is opened in MS Excel\n(or other appropriate Spreadsheet program). To access a sheet by its\nindex, use the `getSheet()` method.\n\n```php\n// Get the second sheet in the workbook\n// Note that sheets are indexed from 0\n$spreadsheet->getSheet(1);\n```\n\n\nMethods also exist allowing you to reorder the worksheets in the\nworkbook.\n\nTo access a sheet by name, use the `getSheetByName()` method, specifying\nthe name of the worksheet that you want to access.\n\n```php\n// Retrieve the worksheet called 'Worksheet 1'\n$spreadsheet->getSheetByName('Worksheet 1');\n```\n\nAlternatively, one worksheet is always the currently active worksheet,\nand you can access that directly. The currently active worksheet is the\none that will be active when the workbook is opened in MS Excel (or\nother appropriate Spreadsheet program).\n\n```php\n// Retrieve the current active worksheet\n$spreadsheet->getActiveSheet();\n```\n\nYou can change the currently active sheet by index or by name using the\n`setActiveSheetIndex()` and `setActiveSheetIndexByName()` methods.\n\n## Adding a new Worksheet\n\nYou can add a new worksheet to the workbook using the `createSheet()`\nmethod of the `Spreadsheet` object. By default, this will be created as\na new \"last\" sheet; but you can also specify an index position as an\nargument, and the worksheet will be inserted at that position, shuffling\nall subsequent worksheets in the collection down a place.\n\n```php\n$spreadsheet->createSheet();\n```\n\nA new worksheet created using this method will be called\n`Worksheet<n>` where `<n>` is the lowest number possible to\nguarantee that the title is unique.\n\nAlternatively, you can instantiate a new worksheet (setting the title to\nwhatever you choose) and then insert it into your workbook using the\n`addSheet()` method.\n\n```php\n// Create a new worksheet called \"My Data\"\n$myWorkSheet = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet($spreadsheet, 'My Data');\n\n// Attach the \"My Data\" worksheet as the first worksheet in the Spreadsheet object\n$spreadsheet->addSheet($myWorkSheet, 0);\n```\n\nIf you don't specify an index position as the second argument, then the\nnew worksheet will be added after the last existing worksheet.\n\n## Copying Worksheets\n\nSheets within the same workbook can be copied by creating a clone of the\nworksheet you wish to copy, and then using the `addSheet()` method to\ninsert the clone into the workbook.\n\n```php\n$clonedWorksheet = clone $spreadsheet->getSheetByName('Worksheet 1');\n$clonedWorksheet->setTitle('Copy of Worksheet 1'); // must be unique\n$spreadsheet->addSheet($clonedWorksheet);\n```\nStarting with PhpSpreadsheet 3.9.0, this can be done more simply (copied sheet's title will be set to something unique):\n```php\n$copiedWorksheet = $spreadsheet->duplicateWorksheetByTitle('sheetname');\n```\n\nYou can also copy worksheets from one workbook to another, though this\nis more complex as PhpSpreadsheet also has to replicate the styling\nbetween the two workbooks. The `addExternalSheet()` method is provided for\nthis purpose.\n\n```php\n$clonedWorksheet = clone $spreadsheet1->getSheetByName('Worksheet 1');\n$clonedWorksheet->setTitle('Copy of Worksheet 1'); // must be unique\n$spreadsheet1->addSheet($clonedWorksheet);\n$spreadsheet->addExternalSheet($clonedWorksheet);\n```\nStarting with PhpSpreadsheet 3.8.0, this can be simplified:\n```php\n$clonedWorksheet = clone $spreadsheet1->getSheetByName('Worksheet 1');\n$spreadsheet1->addSheet($clonedWorksheet, null, true);\n$spreadsheet->addExternalSheet($clonedWorksheet);\n```\nStarting with PhpSpreadsheet 3.9.0, this can be simplified even further:\n```php\n$clonedWorksheet = $spreadsheet1->duplicateWorksheetByTitle('sheetname');\n$spreadsheet->addExternalSheet($clonedWorksheet);\n```\n\nIn the cases commented \"must be unique\", it is the developer's responsibility to ensure that\nworksheet names are not duplicated. PhpSpreadsheet will throw an\nexception if you attempt to copy worksheets that will result in a\nduplicate name.\n\n## Removing a Worksheet\n\nYou can delete a worksheet from a workbook, identified by its index\nposition, using the `removeSheetByIndex()` method\n\n```php\n$sheetIndex = $spreadsheet->getIndex(\n    $spreadsheet->getSheetByName('Worksheet 1')\n);\n$spreadsheet->removeSheetByIndex($sheetIndex);\n```\n\nIf the currently active worksheet is deleted, then the sheet at the\nprevious index position will become the currently active sheet.\n"
  },
  {
    "path": "infra/DocumentGenerator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetInfra;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Category;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse ReflectionClass;\nuse UnexpectedValueException;\n\nclass DocumentGenerator\n{\n    private const EXCLUDED_FUNCTIONS = [\n        'CEILING.ODS',\n        'CEILING.XCL',\n        'FLOOR.ODS',\n        'FLOOR.XCL',\n    ];\n\n    /**\n     * @param array<string, array{category: string, functionCall: string|string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool}> $phpSpreadsheetFunctions\n     */\n    public static function generateFunctionListByCategory($phpSpreadsheetFunctions): string\n    {\n        $result = \"# Function list by category\\n\";\n        foreach (self::getCategories() as $categoryConstant => $category) {\n            $result .= \"\\n\";\n            $result .= \"## {$categoryConstant}\\n\";\n            $result .= \"\\n\";\n            $lengths = [25, 37];\n            $result .= self::tableRow($lengths, ['Excel Function', 'PhpSpreadsheet Function']) . \"\\n\";\n            $result .= self::tableRow($lengths, null) . \"\\n\";\n            foreach ($phpSpreadsheetFunctions as $excelFunction => $functionInfo) {\n                if (in_array($excelFunction, self::EXCLUDED_FUNCTIONS, true)) {\n                    continue;\n                }\n                if ($category === $functionInfo['category']) {\n                    $phpFunction = self::getPhpSpreadsheetFunctionText($functionInfo['functionCall']);\n                    $result .= self::tableRow($lengths, [$excelFunction, $phpFunction]) . \"\\n\";\n                }\n            }\n        }\n\n        return $result;\n    }\n\n    /** @return array<string, string> */\n    private static function getCategories(): array\n    {\n        /** @var array<string, string> */\n        $x = (new ReflectionClass(Category::class))->getConstants();\n\n        return $x;\n    }\n\n    /**\n     * @param int[] $lengths\n     * @param null|array<int, int|string> $values\n     */\n    private static function tableRow(array $lengths, ?array $values = null): string\n    {\n        $result = '';\n        foreach (array_map(null, $lengths, $values ?? []) as $i => [$length, $value]) {\n            $pad = $value === null ? '-' : ' ';\n            if ($i > 0) {\n                $result .= '|' . $pad;\n            }\n            $result .= str_pad(\"$value\", $length ?? 0, $pad);\n        }\n\n        return rtrim($result, ' ');\n    }\n\n    /** @param scalar|string|string[] $functionCall */\n    private static function getPhpSpreadsheetFunctionText(mixed $functionCall): string\n    {\n        if (is_string($functionCall)) {\n            return $functionCall;\n        }\n        if ($functionCall === [Functions::class, 'DUMMY']) {\n            return '**Not yet Implemented**';\n        }\n        if (is_array($functionCall)) {\n            return \"\\\\{$functionCall[0]}::{$functionCall[1]}\";\n        }\n\n        throw new UnexpectedValueException(\n            '$functionCall is of type ' . gettype($functionCall) . '. string or array expected'\n        );\n    }\n\n    /**\n     * @param array<string, array{category: string, functionCall: string|string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool}> $phpSpreadsheetFunctions\n     */\n    public static function generateFunctionListByName(array $phpSpreadsheetFunctions, bool $compact = false): string\n    {\n        $categoryConstants = array_flip(self::getCategories());\n        if ($compact) {\n            $result = \"# Function list by name compact\\n\";\n            $result .= \"\\n\";\n            $result .= 'Category should be prefixed by `CATEGORY_` to match the values in \\PhpOffice\\PhpSpreadsheet\\Calculation\\Category';\n            $result .= \"\\n\\n\";\n            $result .= 'Function should be prefixed by `PhpOffice\\PhpSpreadsheet\\Calculation\\`';\n            $result .= \"\\n\\n\";\n            $result .= 'A less compact list can be found [here](./function-list-by-name.md)';\n            $result .= \"\\n\\n\";\n        } else {\n            $result = \"# Function list by name\\n\";\n            $result .= \"\\n\";\n            $result .= 'A more compact list can be found [here](./function-list-by-name-compact.md)';\n            $result .= \"\\n\\n\";\n        }\n        $lastAlphabet = null;\n        $lengths = $compact ? [25, 22, 37] : [25, 31, 37];\n        foreach ($phpSpreadsheetFunctions as $excelFunction => $functionInfo) {\n            if (in_array($excelFunction, self::EXCLUDED_FUNCTIONS, true)) {\n                continue;\n            }\n            if ($lastAlphabet !== $excelFunction[0]) {\n                $lastAlphabet = $excelFunction[0];\n                $result .= \"\\n\";\n                $result .= \"## {$lastAlphabet}\\n\";\n                $result .= \"\\n\";\n                $result .= self::tableRow($lengths, ['Excel Function', 'Category', 'PhpSpreadsheet Function']) . \"\\n\";\n                $result .= self::tableRow($lengths, null) . \"\\n\";\n            }\n            $category = $categoryConstants[$functionInfo['category']];\n            $phpFunction = self::getPhpSpreadsheetFunctionText($functionInfo['functionCall']);\n            if ($compact) {\n                $category = str_replace('CATEGORY_', '', $category);\n                $phpFunction = str_replace(\n                    '\\PhpOffice\\PhpSpreadsheet\\Calculation\\\\',\n                    '',\n                    $phpFunction\n                );\n            }\n            $result .= self::tableRow($lengths, [$excelFunction, $category, $phpFunction]) . \"\\n\";\n        }\n\n        return $result;\n    }\n}\n"
  },
  {
    "path": "infra/LocaleGenerator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetInfra;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass LocaleGenerator\n{\n    private const EXCEL_LOCALISATION_WORKSHEET = 'Excel Localisation';\n    private const EXCEL_FUNCTIONS_WORKSHEET = 'Excel Functions';\n\n    private const LOCALE_NAME_ROW = 1;\n    private const LOCALE_LANGUAGE_NAME_ROW = 2;\n    private const ENGLISH_LANGUAGE_NAME_ROW = 3;\n\n    private const ARGUMENT_SEPARATOR_ROW = 5;\n    private const ERROR_CODES_FIRST_ROW = 8;\n    private const CURRENCY_SYMBOL_ROW = 19;\n\n    private const FUNCTION_NAME_LIST_FIRST_ROW = 4;\n    private const ENGLISH_FUNCTION_CATEGORIES_COLUMN = 'A';\n    private const ENGLISH_REFERENCE_COLUMN = 'B';\n    private const EOL = \"\\n\"; // not PHP_EOL\n\n    protected string $translationSpreadsheetName;\n\n    protected string $translationBaseFolder;\n\n    /** @var array<string, array{category: string, functionCall: string|string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool}> */\n    protected array $phpSpreadsheetFunctions;\n\n    protected Spreadsheet $translationSpreadsheet;\n\n    protected bool $verbose;\n\n    protected Worksheet $localeTranslations;\n\n    /** @var string[] */\n    protected array $localeLanguageMap = [];\n\n    /** @var int[] */\n    protected array $errorCodeMap = [];\n\n    private Worksheet $functionNameTranslations;\n\n    /** @var string[] */\n    protected array $functionNameLanguageMap = [];\n\n    /** @var array<int|string> */\n    protected array $functionNameMap = [];\n\n    /**\n     * @param array<string, array{category: string, functionCall: string|string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool}> $phpSpreadsheetFunctions\n     */\n    public function __construct(\n        string $translationBaseFolder,\n        string $translationSpreadsheetName,\n        array $phpSpreadsheetFunctions,\n        bool $verbose = false\n    ) {\n        $this->translationBaseFolder = $translationBaseFolder;\n        $this->translationSpreadsheetName = $translationSpreadsheetName;\n        $this->phpSpreadsheetFunctions = $phpSpreadsheetFunctions;\n        $this->verbose = $verbose;\n    }\n\n    public function generateLocales(): void\n    {\n        $this->openTranslationWorkbook();\n\n        $this->localeTranslations = $this->getTranslationSheet(self::EXCEL_LOCALISATION_WORKSHEET);\n        $this->localeLanguageMap = $this->mapLanguageColumns($this->localeTranslations);\n        $this->mapErrorCodeRows();\n\n        $this->functionNameTranslations = $this->getTranslationSheet(self::EXCEL_FUNCTIONS_WORKSHEET);\n        $this->functionNameLanguageMap = $this->mapLanguageColumns($this->functionNameTranslations);\n        $this->mapFunctionNameRows();\n\n        foreach ($this->localeLanguageMap as $column => $locale) {\n            $this->buildConfigFileForLocale($column, $locale);\n        }\n\n        foreach ($this->functionNameLanguageMap as $column => $locale) {\n            $this->buildFunctionsFileForLocale($column, $locale);\n        }\n    }\n\n    protected function buildConfigFileForLocale(string $column, string $locale): void\n    {\n        $language = $this->localeTranslations->getCell($column . self::ENGLISH_LANGUAGE_NAME_ROW)->getValue();\n        if (!is_string($language)) {\n            throw new Exception('Non-string language value at ' . $column . self::ENGLISH_LANGUAGE_NAME_ROW);\n        }\n        $localeLanguage = $this->localeTranslations->getCell($column . self::LOCALE_LANGUAGE_NAME_ROW)->getValue();\n        if (!is_string($localeLanguage)) {\n            throw new Exception('Non-string locale language value at ' . $column . self::LOCALE_LANGUAGE_NAME_ROW);\n        }\n        $configFile = $this->openConfigFile($locale, $language, $localeLanguage);\n\n        $this->writeConfigArgumentSeparator($configFile, $column);\n        $this->writeConfigCurrencySymbol($configFile, $column);\n        $this->writeFileSectionHeader($configFile, 'Error Codes');\n\n        foreach ($this->errorCodeMap as $errorCode => $row) {\n            $translationCell = $this->localeTranslations->getCell($column . $row);\n            $translationValue = $translationCell->getValue();\n            if ($translationValue !== null && !is_string($translationValue)) {\n                throw new Exception('Non-string translation value at ' . $column . $row);\n            }\n            if (!empty($translationValue)) {\n                $errorCodeTranslation = \"{$errorCode} = {$translationValue}\" . self::EOL;\n                fwrite($configFile, $errorCodeTranslation);\n            } else {\n                $errorCodeTranslation = \"{$errorCode}\" . self::EOL;\n                fwrite($configFile, $errorCodeTranslation);\n                $this->log(\"No {$language} translation available for error code {$errorCode}\");\n            }\n        }\n\n        fclose($configFile);\n    }\n\n    /** @param resource $configFile resource to write to */\n    protected function writeConfigArgumentSeparator($configFile, string $column): void\n    {\n        $translationCell = $this->localeTranslations->getCell($column . self::ARGUMENT_SEPARATOR_ROW);\n        $localeValue = $translationCell->getValue();\n        if ($localeValue !== null && !is_string($localeValue)) {\n            throw new Exception('Non-string locale value at ' . $column . self::CURRENCY_SYMBOL_ROW);\n        }\n        if (!empty($localeValue)) {\n            $functionTranslation = \"ArgumentSeparator = {$localeValue}\" . self::EOL;\n            fwrite($configFile, $functionTranslation);\n        } else {\n            $this->log('No Argument Separator defined');\n        }\n    }\n\n    /** @param resource $configFile resource to write to */\n    protected function writeConfigCurrencySymbol($configFile, string $column): void\n    {\n        $translationCell = $this->localeTranslations->getCell($column . self::CURRENCY_SYMBOL_ROW);\n        $localeValue = $translationCell->getValue();\n        if ($localeValue !== null && !is_string($localeValue)) {\n            throw new Exception('Non-string locale value at ' . $column . self::CURRENCY_SYMBOL_ROW);\n        }\n        if (!empty($localeValue)) {\n            $functionTranslation = \"currencySymbol = {$localeValue}\" . self::EOL;\n            fwrite($configFile, '##' . self::EOL);\n            fwrite($configFile, '##  (For future use)' . self::EOL);\n            fwrite($configFile, '##' . self::EOL);\n            fwrite($configFile, $functionTranslation);\n        } else {\n            $this->log('No Currency Symbol defined');\n        }\n    }\n\n    protected function buildFunctionsFileForLocale(string $column, string $locale): void\n    {\n        $language = $this->functionNameTranslations->getCell($column . self::ENGLISH_LANGUAGE_NAME_ROW)->getValue();\n        if (!is_string($language)) {\n            throw new Exception('Non-string language value at ' . $column . self::ENGLISH_LANGUAGE_NAME_ROW);\n        }\n        $localeLanguage = $this->functionNameTranslations->getCell($column . self::LOCALE_LANGUAGE_NAME_ROW)\n            ->getValue();\n        if (!is_string($localeLanguage)) {\n            throw new Exception('Non-string locale language value at ' . $column . self::LOCALE_LANGUAGE_NAME_ROW);\n        }\n        $functionFile = $this->openFunctionNameFile($locale, $language, $localeLanguage);\n\n        foreach ($this->functionNameMap as $functionName => $row) {\n            $translationCell = $this->functionNameTranslations->getCell($column . $row);\n            $translationValue = $translationCell->getValue();\n            if ($translationValue !== null && !is_string($translationValue)) {\n                throw new Exception('Non-string translation value at ' . $column . $row);\n            }\n            if ($this->isFunctionCategoryEntry($translationCell)) {\n                $this->writeFileSectionHeader($functionFile, \"{$translationValue} ({$functionName})\");\n            } elseif (!array_key_exists($functionName, $this->phpSpreadsheetFunctions) && substr($functionName, 0, 1) !== '*') {\n                $this->log(\"Function {$functionName} is not defined in PhpSpreadsheet\");\n            } elseif (!empty($translationValue)) {\n                $functionTranslation = \"{$functionName} = {$translationValue}\" . self::EOL;\n                fwrite($functionFile, $functionTranslation);\n            } else {\n                $this->log(\"No {$language} translation available for function {$functionName}\");\n            }\n        }\n\n        fclose($functionFile);\n    }\n\n    /** @return resource used by other methods in this class */\n    protected function openConfigFile(string $locale, string $language, string $localeLanguage)\n    {\n        $this->log(\"Building locale {$locale} ($language) configuration\");\n        $localeFolder = $this->getLocaleFolder($locale);\n\n        $configFileName = realpath($localeFolder) . DIRECTORY_SEPARATOR . 'config';\n        $this->log(\"Writing locale configuration to {$configFileName}\");\n\n        $configFile = fopen($configFileName, 'wb');\n        if ($configFile === false) {\n            throw new Exception('Unable to open $configFileName for write');\n        }\n        $this->writeFileHeader($configFile, $localeLanguage, $language, 'locale settings');\n\n        return $configFile;\n    }\n\n    /** @return resource used by other methods in this class */\n    protected function openFunctionNameFile(string $locale, string $language, string $localeLanguage)\n    {\n        $this->log(\"Building locale {$locale} ($language) function names\");\n        $localeFolder = $this->getLocaleFolder($locale);\n\n        $functionFileName = realpath($localeFolder) . DIRECTORY_SEPARATOR . 'functions';\n        $this->log(\"Writing local function names to {$functionFileName}\");\n\n        $functionFile = fopen($functionFileName, 'wb');\n        if ($functionFile === false) {\n            throw new Exception('Unable to open $functionFileName for write');\n        }\n        $this->writeFileHeader($functionFile, $localeLanguage, $language, 'function name translations');\n\n        return $functionFile;\n    }\n\n    protected function getLocaleFolder(string $locale): string\n    {\n        $lastchar = substr($this->translationBaseFolder, -1);\n        $dirsep = ($lastchar === '/' || $lastchar === '\\\\') ? '' : DIRECTORY_SEPARATOR;\n        $localeFolder = $this->translationBaseFolder\n            . $dirsep\n            . str_replace('_', DIRECTORY_SEPARATOR, $locale);\n        if (!file_exists($localeFolder) || !is_dir($localeFolder)) {\n            mkdir($localeFolder, 7 * 64 + 7 * 8 + 7, true); // octal 777\n        }\n\n        return $localeFolder;\n    }\n\n    /** @param resource $localeFile file being written to */\n    protected function writeFileHeader($localeFile, string $localeLanguage, string $language, string $title): void\n    {\n        fwrite($localeFile, str_repeat('#', 60) . self::EOL);\n        fwrite($localeFile, '##' . self::EOL);\n        fwrite($localeFile, \"## PhpSpreadsheet - {$title}\" . self::EOL);\n        fwrite($localeFile, '##' . self::EOL);\n        fwrite($localeFile, \"## {$localeLanguage} ({$language})\" . self::EOL);\n        fwrite($localeFile, '##' . self::EOL);\n        fwrite($localeFile, str_repeat('#', 60) . self::EOL . self::EOL);\n    }\n\n    /** @param resource $localeFile file being written to */\n    protected function writeFileSectionHeader($localeFile, string $header): void\n    {\n        fwrite($localeFile, self::EOL . '##' . self::EOL);\n        fwrite($localeFile, \"## {$header}\" . self::EOL);\n        fwrite($localeFile, '##' . self::EOL);\n    }\n\n    protected function openTranslationWorkbook(): void\n    {\n        $filepathName = $this->translationBaseFolder . '/' . $this->translationSpreadsheetName;\n        $this->translationSpreadsheet = IOFactory::load($filepathName);\n    }\n\n    protected function getTranslationSheet(string $sheetName): Worksheet\n    {\n        $worksheet = $this->translationSpreadsheet->setActiveSheetIndexByName($sheetName);\n\n        return $worksheet;\n    }\n\n    /** @return string[] */\n    protected function mapLanguageColumns(Worksheet $translationWorksheet): array\n    {\n        $sheetName = $translationWorksheet->getTitle();\n        $this->log(\"Mapping Languages for {$sheetName}:\");\n\n        $baseColumn = self::ENGLISH_REFERENCE_COLUMN;\n        $languagesList = $translationWorksheet->getColumnIterator(StringHelper::stringIncrement($baseColumn));\n\n        $languageNameMap = [];\n        foreach ($languagesList as $languageColumn) {\n            $cells = $languageColumn->getCellIterator(self::LOCALE_NAME_ROW, self::LOCALE_NAME_ROW);\n            $cells->setIterateOnlyExistingCells(true);\n            foreach ($cells as $cell) {\n                if ($this->localeCanBeSupported($translationWorksheet, $cell)) {\n                    $languageNameMap[$cell->getColumn()] = $cell->getValueString();\n                    $this->log($cell->getColumn() . ' -> ' . $cell->getValueString());\n                }\n            }\n        }\n\n        return $languageNameMap;\n    }\n\n    protected function localeCanBeSupported(Worksheet $worksheet, Cell $cell): bool\n    {\n        if ($worksheet->getTitle() === self::EXCEL_LOCALISATION_WORKSHEET) {\n            // Only provide support for languages that have a function argument separator defined\n            //      in the localisation worksheet\n            return !empty(\n                $worksheet->getCell($cell->getColumn() . self::ARGUMENT_SEPARATOR_ROW)->getValue()\n            );\n        }\n\n        // If we're processing other worksheets, then language support is determined by whether we included the\n        //      language in the map when we were processing the localisation worksheet (which is always processed first)\n        return in_array($cell->getValue(), $this->localeLanguageMap, true);\n    }\n\n    protected function mapErrorCodeRows(): void\n    {\n        $this->log('Mapping Error Codes:');\n        $errorList = $this->localeTranslations->getRowIterator(self::ERROR_CODES_FIRST_ROW);\n\n        foreach ($errorList as $errorRow) {\n            $cells = $errorRow->getCellIterator(self::ENGLISH_REFERENCE_COLUMN, self::ENGLISH_REFERENCE_COLUMN);\n            $cells->setIterateOnlyExistingCells(true);\n            foreach ($cells as $cell) {\n                if ($cell->getValue() != '') {\n                    $this->log($cell->getRow() . ' -> ' . $cell->getValueString());\n                    $this->errorCodeMap[$cell->getValueString()] = $cell->getRow();\n                }\n            }\n        }\n    }\n\n    protected function mapFunctionNameRows(): void\n    {\n        $this->log('Mapping Functions:');\n        $functionList = $this->functionNameTranslations->getRowIterator(self::FUNCTION_NAME_LIST_FIRST_ROW);\n\n        foreach ($functionList as $functionRow) {\n            $cells = $functionRow->getCellIterator(self::ENGLISH_REFERENCE_COLUMN, self::ENGLISH_REFERENCE_COLUMN);\n            $cells->setIterateOnlyExistingCells(true);\n            foreach ($cells as $cell) {\n                if ($this->isFunctionCategoryEntry($cell)) {\n                    if (!empty($cell->getValue())) {\n                        $this->log('CATEGORY: ' . $cell->getValueString());\n                        $this->functionNameMap[$cell->getValueString()] = $cell->getRow();\n                    }\n\n                    continue;\n                }\n                if ($cell->getValue() !== '' && $cell->getValue() !== null) {\n                    if (is_bool($cell->getValue())) {\n                        $this->log($cell->getRow() . ' -> ' . ($cell->getValue() ? 'TRUE' : 'FALSE'));\n                        $this->functionNameMap[($cell->getValue() ? 'TRUE' : 'FALSE')] = $cell->getRow();\n                    } else {\n                        $this->log($cell->getRow() . ' -> ' . $cell->getValueString());\n                        $this->functionNameMap[$cell->getValueString()] = $cell->getRow();\n                    }\n                }\n            }\n        }\n    }\n\n    private function isFunctionCategoryEntry(Cell $cell): bool\n    {\n        $categoryCheckCell = self::ENGLISH_FUNCTION_CATEGORIES_COLUMN . $cell->getRow();\n        if ($this->functionNameTranslations->getCell($categoryCheckCell)->getValue() != '') {\n            return true;\n        }\n\n        return false;\n    }\n\n    private function log(string $message): void\n    {\n        if ($this->verbose === false) {\n            return;\n        }\n\n        echo $message, self::EOL;\n    }\n}\n"
  },
  {
    "path": "mkdocs.yml",
    "content": "site_name: PhpSpreadsheet Documentation\nrepo_url: https://github.com/PHPOffice/phpspreadsheet\nedit_uri: edit/master/docs/\n\ntheme: readthedocs\nextra_css:\n    - extra/extra.css\nextra_javascript:\n    - extra/extrajs.js\nmarkdown_extensions:\n    - md_in_html\n"
  },
  {
    "path": "phpstan-baseline.neon",
    "content": "parameters:\n\tignoreErrors:\n\t\t-\n\t\t\tmessage: '#^Parameter \\#1 \\$array of function array_multisort expects array, mixed given\\.$#'\n\t\t\tidentifier: argument.type\n\t\t\tcount: 1\n\t\t\tpath: src/PhpSpreadsheet/Calculation/LookupRef/Sort.php\n\n\t\t-\n\t\t\tmessage: '#^Cannot access offset 0 on mixed\\.$#'\n\t\t\tidentifier: offsetAccess.nonOffsetAccessible\n\t\t\tcount: 1\n\t\t\tpath: src/PhpSpreadsheet/ReferenceHelper.php\n\n\t\t-\n\t\t\tmessage: '#^Parameter \\#1 \\$string of function trim expects string, mixed given\\.$#'\n\t\t\tidentifier: argument.type\n\t\t\tcount: 1\n\t\t\tpath: src/PhpSpreadsheet/ReferenceHelper.php\n"
  },
  {
    "path": "phpstan.neon.dist",
    "content": "includes:\n    - phpstan-baseline.neon\n    - vendor/phpstan/phpstan-phpunit/extension.neon\n    - vendor/phpstan/phpstan-phpunit/rules.neon\n    - vendor/composer/pcre/extension.neon\n    - vendor/phpstan/phpstan/conf/bleedingEdge.neon\n    - vendor/phpstan/phpstan-deprecation-rules/rules.neon\n\nparameters:\n    level: 10\n    paths:\n        - samples/\n        - src/\n        - tests/\n        - infra/\n        - bin/\n    excludePaths:\n        - src/PhpSpreadsheet/Calculation/FormulaParser.php\n        - src/PhpSpreadsheet/Calculation/FormulaToken.php\n        - src/PhpSpreadsheet/Chart/Renderer/JpGraph.php\n        - src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php\n        - src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php\n        - src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php\n        - src/PhpSpreadsheet/Writer/ZipStream2.php\n        - src/PhpSpreadsheet/Writer/ZipStream3.php\n        - tests/PhpSpreadsheetTests/Calculation/FormulaParserTest.php\n        - tests/PhpSpreadsheetTests/Writer/Xlsx/ArrayFunctions2Test.php\n    parallel:\n        processTimeout: 300.0\n    ignoreErrors:\n        # Accept a bit anything for assert methods\n        - '~^Parameter \\#2 .* of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assert\\w+\\(\\) expects .*, .* given\\.$~'\n        - '~Method .*rovider.* return type has no value type specified in iterable type array\\.$~'\n        - '~Method .*rovider.* should return array but returns mixed\\.$~'\n        - '~.* has parameter \\$expectedResult with no value type specified in iterable type array\\.$~'\n        #- identifier: missingType.iterableValue\n"
  },
  {
    "path": "phpunit.xml.dist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"https://schema.phpunit.de/10.1/phpunit.xsd\" bootstrap=\"./tests/bootstrap.php\" backupGlobals=\"true\" colors=\"true\" cacheResultFile=\"/tmp/.phpspreadsheet.phpunit.result.cache\">\n  <coverage/>\n  <php>\n    <ini name=\"memory_limit\" value=\"2048M\"/>\n    <ini name=\"error_reporting\" value=\"E_ALL\"/>\n  </php>\n  <testsuite name=\"PhpSpreadsheet Unit Test Suite\">\n    <directory>./tests/PhpSpreadsheetTests</directory>\n  </testsuite>\n  <source>\n    <include>\n      <directory suffix=\".php\">./src</directory>\n    </include>\n  </source>\n</phpunit>\n"
  },
  {
    "path": "samples/Autofilter/10_Autofilter.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Year')\n    ->setCellValue('B1', 'Quarter')\n    ->setCellValue('C1', 'Country')\n    ->setCellValue('D1', 'Sales');\n\n$dataArray = [\n    ['2010', 'Q1', 'United States', 790],\n    ['2010', 'Q2', 'United States', 730],\n    ['2010', 'Q3', 'United States', 860],\n    ['2010', 'Q4', 'United States', 850],\n    ['2011', 'Q1', 'United States', 800],\n    ['2011', 'Q2', 'United States', 700],\n    ['2011', 'Q3', 'United States', 900],\n    ['2011', 'Q4', 'United States', 950],\n    ['2010', 'Q1', 'Belgium', 380],\n    ['2010', 'Q2', 'Belgium', 390],\n    ['2010', 'Q3', 'Belgium', 420],\n    ['2010', 'Q4', 'Belgium', 460],\n    ['2011', 'Q1', 'Belgium', 400],\n    ['2011', 'Q2', 'Belgium', 350],\n    ['2011', 'Q3', 'Belgium', 450],\n    ['2011', 'Q4', 'Belgium', 500],\n    ['2010', 'Q1', 'UK', 690],\n    ['2010', 'Q2', 'UK', 610],\n    ['2010', 'Q3', 'UK', 620],\n    ['2010', 'Q4', 'UK', 600],\n    ['2011', 'Q1', 'UK', 720],\n    ['2011', 'Q2', 'UK', 650],\n    ['2011', 'Q3', 'UK', 580],\n    ['2011', 'Q4', 'UK', 510],\n    ['2010', 'Q1', 'France', 510],\n    ['2010', 'Q2', 'France', 490],\n    ['2010', 'Q3', 'France', 460],\n    ['2010', 'Q4', 'France', 590],\n    ['2011', 'Q1', 'France', 620],\n    ['2011', 'Q2', 'France', 650],\n    ['2011', 'Q3', 'France', 415],\n    ['2011', 'Q4', 'France', 570],\n    ['2010', 'Q1', 'Germany', 720],\n    ['2010', 'Q2', 'Germany', 680],\n    ['2010', 'Q3', 'Germany', 640],\n    ['2010', 'Q4', 'Germany', 660],\n    ['2011', 'Q1', 'Germany', 680],\n    ['2011', 'Q2', 'Germany', 620],\n    ['2011', 'Q3', 'Germany', 710],\n    ['2011', 'Q4', 'Germany', 690],\n    ['2010', 'Q1', 'Spain', 510],\n    ['2010', 'Q2', 'Spain', 490],\n    ['2010', 'Q3', 'Spain', 470],\n    ['2010', 'Q4', 'Spain', 420],\n    ['2011', 'Q1', 'Spain', 460],\n    ['2011', 'Q2', 'Spain', 390],\n    ['2011', 'Q3', 'Spain', 430],\n    ['2011', 'Q4', 'Spain', 415],\n    ['2010', 'Q1', 'Italy', 440],\n    ['2010', 'Q2', 'Italy', 410],\n    ['2010', 'Q3', 'Italy', 420],\n    ['2010', 'Q4', 'Italy', 450],\n    ['2011', 'Q1', 'Italy', 430],\n    ['2011', 'Q2', 'Italy', 370],\n    ['2011', 'Q3', 'Italy', 350],\n    ['2011', 'Q4', 'Italy', 335],\n];\n$spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A2');\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, false, true), true);\n\n// Set title row bold\n$helper->log('Set title row bold');\n$spreadsheet->getActiveSheet()->getStyle('A1:D1')->getFont()->setBold(true);\n\n// Set autofilter\n$filterRange = $spreadsheet->getActiveSheet()->calculateWorksheetDimension();\n$helper->log(\"Set autofilter for cells {$filterRange}\");\n// Always include the complete filter range if you can!\n// Excel does support setting only the caption\n// row, but that's not a best practise...\n$spreadsheet->getActiveSheet()->setAutoFilter($filterRange);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/Autofilter/10_Autofilter_dynamic_dates.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\n\nrequire __DIR__ . '/../Header.php';\n\n// Sample can be slightly off if processing begins just before midnight\n// and does not complete till after midnight.\n// This possibility is accounted for in unit tests,\n// but seems unneccesarily complicated for the sample.\n\nfunction createSheet(Sample $helper, Spreadsheet $spreadsheet, string $rule, bool $displayInitialWorksheet): void\n{\n    $helper->log('Add data');\n\n    $sheet = $spreadsheet->createSheet();\n    $sheet->setTitle($rule);\n    $sheet->getCell('A1')->setValue('Date');\n    $row = 1;\n    $date = new DateTime();\n    $year = (int) $date->format('Y');\n    $month = (int) $date->format('m');\n    $day = (int) $date->format('d');\n    $yearMinus2 = $year - 2;\n    $sheet->getCell('B1')->setValue(\"=DATE($year, $month, $day)\");\n    // Each day for two weeks before today through 2 weeks after\n    for ($dayOffset = -14; $dayOffset < 14; ++$dayOffset) {\n        ++$row;\n        $sheet->getCell(\"A$row\")->setValue(\"=B1+($dayOffset)\");\n    }\n    // First and last day of each month, starting with January 2 years before,\n    // through December 2 years after.\n    for ($monthOffset = 0; $monthOffset < 48; ++$monthOffset) {\n        ++$row;\n        $sheet->getCell(\"A$row\")->setValue(\"=DATE($yearMinus2, $monthOffset, 1)\");\n        ++$row;\n        $sheet->getCell(\"A$row\")->setValue(\"=DATE($yearMinus2, $monthOffset + 1, 0)\");\n    }\n    $sheet->getStyle(\"A2:A$row\")->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n    $sheet->getStyle('B1')->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n    $sheet->getColumnDimension('A')->setAutoSize(true);\n    $sheet->getColumnDimension('B')->setAutoSize(true);\n\n    if ($displayInitialWorksheet) {\n        $helper->log('Unfiltered Dates');\n        $helper->displayGrid($sheet->toArray(null, true, true, true));\n    }\n\n    $helper->log(\"Filter for $rule\");\n    $autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();\n    $autoFilter->setRange(\"A1:A{$row}\");\n    $columnFilter = $autoFilter->getColumn('A');\n    $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n    $columnFilter->createRule()\n        ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, '', $rule)\n        ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n    $sheet->setSelectedCell('B1');\n\n    $helper->log('Execute filtering (apply the filter rules)');\n    $autoFilter->showHideRows();\n\n    $helper->log('Filtered Dates');\n    $helper->displayGrid($sheet->toArray(null, true, true, true, true));\n}\n\n// Create new Spreadsheet object\n/** @var Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Owen Leibman')\n    ->setLastModifiedBy('Owen Leibman')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n$ruleNames = [\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_TODAY,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2,\n    Rule::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3,\n];\n\n// Create the worksheets\nforeach ($ruleNames as $index => $ruleName) {\n    createSheet($helper, $spreadsheet, $ruleName, $index === 0);\n}\n$spreadsheet->removeSheetByIndex(0);\n$spreadsheet->setActiveSheetIndex(0);\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Autofilter/10_Autofilter_selection_1.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Year')\n    ->setCellValue('B1', 'Period')\n    ->setCellValue('C1', 'Country')\n    ->setCellValue('D1', 'Date')\n    ->setCellValue('E1', 'Sales')\n    ->setCellValue('F1', 'Expenditure');\n$dateTime = new DateTime();\n$startYear = $endYear = $currentYear = (int) $dateTime->format('Y');\n--$startYear;\n++$endYear;\n\n$years = range($startYear, $endYear);\n$periods = range(1, 12);\n$countries = [\n    'United States',\n    'UK',\n    'France',\n    'Germany',\n    'Italy',\n    'Spain',\n    'Portugal',\n    'Japan',\n];\n\n$row = 2;\nforeach ($years as $year) {\n    foreach ($periods as $period) {\n        foreach ($countries as $country) {\n            $dateString = sprintf('%04d-%02d-01T00:00:00', $year, $period);\n            $dateTime = new DateTime($dateString);\n            $endDays = (int) $dateTime->format('t');\n            for ($i = 1; $i <= $endDays; ++$i) {\n                $eDate = Date::formattedPHPToExcel(\n                    $year,\n                    $period,\n                    $i\n                );\n                $value = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                $salesValue = $invoiceValue = null;\n                $incomeOrExpenditure = mt_rand(-1, 1);\n                if ($incomeOrExpenditure == -1) {\n                    $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));\n                    $income = null;\n                } elseif ($incomeOrExpenditure == 1) {\n                    $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));\n                    $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                } else {\n                    $expenditure = null;\n                    $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                }\n                $dataArray = [$year,\n                    $period,\n                    $country,\n                    $eDate,\n                    $income,\n                    $expenditure,\n                ];\n                $spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A' . $row++);\n            }\n        }\n    }\n}\n--$row;\n\n// Set styling\n$helper->log('Set styling');\n$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(true);\n$spreadsheet->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);\n$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD);\n$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_INTEGER);\n$spreadsheet->getActiveSheet()->getColumnDimension('F')->setWidth(14);\n$spreadsheet->getActiveSheet()->freezePane('A2');\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));\n\n// Set autofilter range\n$filterRange = $spreadsheet->getActiveSheet()->calculateWorksheetDimension();\n$helper->log(\"Set autofilter for cells {$filterRange}\");\n// Always include the complete filter range if you can!\n// Excel does support setting only the caption row, but that's not a best practise...\n$spreadsheet->getActiveSheet()->setAutoFilter($filterRange);\n\n// Set active filters\n$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();\n$helper->log('Set active filters');\n\n// Filter the Country column on a filter value of countries beginning with the letter U (or Japan)\n//     We use * as a wildcard, so specify as U* and using a wildcard requires customFilter\n$autoFilter->getColumn('C')\n    ->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'u*')\n    ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n$helper->log('Set country code filter (Column C) to countries beginning with \"U\" (\"United States\" and \"UK\")');\n\n$autoFilter->getColumn('C')\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'japan')\n    ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n$helper->log('Add \"Japan\" to the country code filter (Column C)');\n\n// Filter the Date column on a filter value of the last day of every period of the current year\n// We use a dateGroup ruletype for this, although it is still a standard filter\nforeach ($periods as $period) {\n    $dateString = sprintf('%04d-%02d-01T00:00:00', $currentYear, $period);\n    $dateTime = new DateTime($dateString);\n    $endDate = (int) $dateTime->format('t');\n\n    $autoFilter->getColumn('D')\n        ->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)\n        ->createRule()\n        ->setRule(\n            Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n            [\n                'year' => $currentYear,\n                'month' => $period,\n                'day' => $endDate,\n            ]\n        )\n        ->setRuleType(Rule::AUTOFILTER_RULETYPE_DATEGROUP);\n}\n\n$helper->log('Add filter on the Date (Column D) to display only rows for the last day of each month');\n\n// Display only sales values that are blank\n//     Standard filter, operator equals, and value of NULL or empty space\n$autoFilter->getColumn('E')\n    ->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, '');\n\n$helper->log('Add filter on Sales Values (Column E) to display only blank values');\n\n$helper->log('NOTE: We don\\'t apply the filter rules in this example, so we can\\'t see the result here; although Excel will apply the rules when the file is loaded');\n$helper->log('See 10_Autofilter_selection_display.php for an example that actually executes the filter rules');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Autofilter/10_Autofilter_selection_2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Year')\n    ->setCellValue('B1', 'Period')\n    ->setCellValue('C1', 'Country')\n    ->setCellValue('D1', 'Date')\n    ->setCellValue('E1', 'Sales')\n    ->setCellValue('F1', 'Expenditure');\n$dateTime = new DateTime();\n$startYear = $endYear = $currentYear = (int) $dateTime->format('Y');\n--$startYear;\n++$endYear;\n\n$years = range($startYear, $endYear);\n$periods = range(1, 12);\n$countries = [\n    'United States',\n    'UK',\n    'France',\n    'Germany',\n    'Italy',\n    'Spain',\n    'Portugal',\n    'Japan',\n];\n\n$row = 2;\nforeach ($years as $year) {\n    foreach ($periods as $period) {\n        foreach ($countries as $country) {\n            $dateString = sprintf('%04d-%02d-01T00:00:00', $year, $period);\n            $dateTime = new DateTime($dateString);\n            $endDays = (int) $dateTime->format('t');\n            for ($i = 1; $i <= $endDays; ++$i) {\n                $eDate = Date::formattedPHPToExcel(\n                    $year,\n                    $period,\n                    $i\n                );\n                $value = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                $salesValue = $invoiceValue = null;\n                $incomeOrExpenditure = mt_rand(-1, 1);\n                if ($incomeOrExpenditure == -1) {\n                    $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));\n                    $income = null;\n                } elseif ($incomeOrExpenditure == 1) {\n                    $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));\n                    $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                } else {\n                    $expenditure = null;\n                    $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                }\n                $dataArray = [$year,\n                    $period,\n                    $country,\n                    $eDate,\n                    $income,\n                    $expenditure,\n                ];\n                $spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A' . $row++);\n            }\n        }\n    }\n}\n--$row;\n\n// Set styling\n$helper->log('Set styling');\n$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(true);\n$spreadsheet->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);\n$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD);\n$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_INTEGER);\n$spreadsheet->getActiveSheet()->getColumnDimension('F')->setWidth(14);\n$spreadsheet->getActiveSheet()->freezePane('A2');\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));\n\n// Set autofilter range\n$filterRange = $spreadsheet->getActiveSheet()->calculateWorksheetDimension();\n$helper->log(\"Set autofilter for cells {$filterRange}\");\n// Always include the complete filter range if you can!\n// Excel does support setting only the caption row, but that's not a best practise...\n$spreadsheet->getActiveSheet()->setAutoFilter($filterRange);\n\n// Set active filters\n$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();\n$helper->log('Set active filters');\n\n// Filter the Country column on a filter value of Germany\n// As it's just a simple value filter, we can use FILTERTYPE_FILTER\n$autoFilter->getColumn('C')\n    ->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'Germany');\n\n$helper->log('Set country code filter (Column C) to \"Germany\"');\n\n// Filter the Date column on a filter value of the year to date\n$autoFilter->getColumn('D')\n    ->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER)\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, '', Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE)\n    ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n\n$helper->log('Add filter on the Date (Column D) to display year to date');\n\n// Display only sales values that are between 400 and 600\n$autoFilter->getColumn('E')\n    ->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 400)\n    ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n$autoFilter->getColumn('E')\n    ->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND)\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, 600)\n    ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n$helper->log('Add filter on Sales Values (Column E) between 400 and 600');\n\n$helper->log('NOTE: We don\\'t apply the filter rules in this example, so we can\\'t see the result here; although Excel will apply the rules when the file is loaded');\n$helper->log('See 10_Autofilter_selection_display.php for an example that actually executes the filter rules inside PhpSpreadsheet');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Autofilter/10_Autofilter_selection_display.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Year')\n    ->setCellValue('B1', 'Period')\n    ->setCellValue('C1', 'Country')\n    ->setCellValue('D1', 'Date')\n    ->setCellValue('E1', 'Sales')\n    ->setCellValue('F1', 'Expenditure');\n$dateTime = new DateTime();\n$startYear = $endYear = $currentYear = (int) $dateTime->format('Y');\n--$startYear;\n++$endYear;\n\n$years = range($startYear, $endYear);\n$periods = range(1, 12);\n$countries = [\n    'United States',\n    'UK',\n    'France',\n    'Germany',\n    'Italy',\n    'Spain',\n    'Portugal',\n    'Japan',\n];\n\n$row = 2;\nforeach ($years as $year) {\n    foreach ($periods as $period) {\n        foreach ($countries as $country) {\n            $dateString = sprintf('%04d-%02d-01T00:00:00', $year, $period);\n            $dateTime = new DateTime($dateString);\n            $endDays = (int) $dateTime->format('t');\n            for ($i = 1; $i <= $endDays; ++$i) {\n                $eDate = Date::formattedPHPToExcel(\n                    $year,\n                    $period,\n                    $i\n                );\n                $value = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                $salesValue = $invoiceValue = null;\n                $incomeOrExpenditure = mt_rand(-1, 1);\n                if ($incomeOrExpenditure == -1) {\n                    $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));\n                    $income = null;\n                } elseif ($incomeOrExpenditure == 1) {\n                    $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));\n                    $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                } else {\n                    $expenditure = null;\n                    $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));\n                }\n                $dataArray = [$year,\n                    $period,\n                    $country,\n                    $eDate,\n                    $income,\n                    $expenditure,\n                ];\n                $spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A' . $row++);\n            }\n        }\n    }\n}\n--$row;\n\n// Set styling\n$helper->log('Set styling');\n$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(true);\n$spreadsheet->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);\n$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD);\n$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_INTEGER);\n$spreadsheet->getActiveSheet()->getColumnDimension('F')->setWidth(14);\n$spreadsheet->getActiveSheet()->freezePane('A2');\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));\n\n// Set autofilter range\n$filterRange = $spreadsheet->getActiveSheet()->calculateWorksheetDimension();\n$helper->log(\"Set autofilter for cells {$filterRange}\");\n// Always include the complete filter range if you can!\n// Excel does support setting only the caption row, but that's not a best practise...\n$spreadsheet->getActiveSheet()->setAutoFilter($filterRange);\n\n// Set active filters\n$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();\n$helper->log('Set active filters');\n// Filter the Country column on a filter value of countries beginning with the letter U (or Japan)\n//     We use * as a wildcard, so specify as U* and using a wildcard requires customFilter\n$autoFilter->getColumn('C')\n    ->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'u*')\n    ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n$helper->log('Set country code filter (Column C) to countries beginning with \"U\" (\"United States\" and \"UK\")');\n\n$autoFilter->getColumn('C')\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'japan')\n    ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n$helper->log('Add \"Japan\" to the country code filter (Column C)');\n\n// Filter the Date column on a filter value of the last day of every period of the current year\n// We us a dateGroup ruletype for this, although it is still a standard filter\nforeach ($periods as $period) {\n    $dateString = sprintf('%04d-%02d-01T00:00:00', $currentYear, $period);\n    $dateTime = new DateTime($dateString);\n    $endDate = (int) $dateTime->format('t');\n\n    $autoFilter->getColumn('D')\n        ->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)\n        ->createRule()\n        ->setRule(\n            Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n            [\n                'year' => $currentYear,\n                'month' => $period,\n                'day' => $endDate,\n            ]\n        )\n        ->setRuleType(Rule::AUTOFILTER_RULETYPE_DATEGROUP);\n}\n\n$helper->log('Add filter on the Date (Column D) to display only rows for the last day of each month');\n\n// Display only sales values that are blank\n//     Standard filter, operator equals, and value of NULL\n$autoFilter->getColumn('E')\n    ->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)\n    ->createRule()\n    ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, '');\n\n$helper->log('Add filter on Sales Values (Column E) to display only blank values');\n\n// Execute filtering\n$helper->log('Execute filtering (apply the filter rules)');\n$autoFilter->showHideRows();\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Display Results of filtering\n$helper->log('Display filtered rows');\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true, true));\n"
  },
  {
    "path": "samples/Basic/01_Simple.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()\n    ->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A1', 'Hello')\n    ->setCellValue('B2', 'world!')\n    ->setCellValue('C1', 'Hello')\n    ->setCellValue('D2', 'world!');\n\n// Miscellaneous glyphs, UTF-8\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A4', 'Miscellaneous glyphs')\n    ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A8', \"Hello\\nWorld\");\n$spreadsheet->getActiveSheet()\n    ->getRowDimension(8)\n    ->setRowHeight(-1);\n$spreadsheet->getActiveSheet()\n    ->getStyle('A8')\n    ->getAlignment()\n    ->setWrapText(true);\n\n$value = \"-ValueA\\n-Value B\\n-Value C\";\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A10', $value);\n$spreadsheet->getActiveSheet()\n    ->getRowDimension(10)\n    ->setRowHeight(-1);\n$spreadsheet->getActiveSheet()\n    ->getStyle('A10')\n    ->getAlignment()\n    ->setWrapText(true);\n$spreadsheet->getActiveSheet()\n    ->getStyle('A10')\n    ->setQuotePrefix(true);\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()\n    ->setTitle('Simple');\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Xls', 'Ods']);\n"
  },
  {
    "path": "samples/Basic/01_Simple_download_ods.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Bootstrap.php';\n\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A1', 'Hello')\n    ->setCellValue('B2', 'world!')\n    ->setCellValue('C1', 'Hello')\n    ->setCellValue('D2', 'world!');\n\n// Miscellaneous glyphs, UTF-8\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A4', 'Miscellaneous glyphs')\n    ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n// Rename worksheet\n$spreadsheet->getActiveSheet()->setTitle('Simple');\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Ods)\nheader('Content-Type: application/vnd.oasis.opendocument.spreadsheet');\nheader('Content-Disposition: attachment;filename=\"01simple.ods\"');\nheader('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\nheader('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\nheader('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\nheader('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\nheader('Cache-Control: cache, must-revalidate'); // HTTP/1.1\nheader('Pragma: public'); // HTTP/1.0\n\n$writer = IOFactory::createWriter($spreadsheet, 'Ods');\n$writer->save('php://output');\nexit;\n"
  },
  {
    "path": "samples/Basic/01_Simple_download_pdf.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Bootstrap.php';\n\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('PDF Test Document')\n    ->setSubject('PDF Test Document')\n    ->setDescription('Test document for PDF, generated using PHP classes.')\n    ->setKeywords('pdf php')\n    ->setCategory('Test result file');\n\n// Add some data\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A1', 'Hello')\n    ->setCellValue('B2', 'world!')\n    ->setCellValue('C1', 'Hello')\n    ->setCellValue('D2', 'world!');\n\n// Miscellaneous glyphs, UTF-8\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A4', 'Miscellaneous glyphs')\n    ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n// Rename worksheet\n$spreadsheet->getActiveSheet()->setTitle('Simple');\n$spreadsheet->getActiveSheet()->setShowGridLines(false);\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\nIOFactory::registerWriter('Pdf', PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf::class);\n\n// Redirect output to a client’s web browser (PDF)\nheader('Content-Type: application/pdf');\nheader('Content-Disposition: attachment;filename=\"01simple.pdf\"');\nheader('Cache-Control: max-age=0');\n\n$writer = IOFactory::createWriter($spreadsheet, 'Pdf');\n$writer->save('php://output');\nexit;\n"
  },
  {
    "path": "samples/Basic/01_Simple_download_xls.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Bootstrap.php';\n\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A1', 'Hello')\n    ->setCellValue('B2', 'world!')\n    ->setCellValue('C1', 'Hello')\n    ->setCellValue('D2', 'world!');\n\n// Miscellaneous glyphs, UTF-8\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A4', 'Miscellaneous glyphs')\n    ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n// Rename worksheet\n$spreadsheet->getActiveSheet()->setTitle('Simple');\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Xls)\nheader('Content-Type: application/vnd.ms-excel');\nheader('Content-Disposition: attachment;filename=\"01simple.xls\"');\nheader('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\nheader('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\nheader('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\nheader('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\nheader('Cache-Control: cache, must-revalidate'); // HTTP/1.1\nheader('Pragma: public'); // HTTP/1.0\n\n$writer = IOFactory::createWriter($spreadsheet, 'Xls');\n$writer->save('php://output');\nexit;\n"
  },
  {
    "path": "samples/Basic/01_Simple_download_xlsx.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Bootstrap.php';\n\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A1', 'Hello')\n    ->setCellValue('B2', 'world!')\n    ->setCellValue('C1', 'Hello')\n    ->setCellValue('D2', 'world!');\n\n// Miscellaneous glyphs, UTF-8\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A4', 'Miscellaneous glyphs')\n    ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n// Rename worksheet\n$spreadsheet->getActiveSheet()->setTitle('Simple');\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Xlsx)\nheader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\nheader('Content-Disposition: attachment;filename=\"01simple.xlsx\"');\nheader('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\nheader('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\nheader('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\nheader('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\nheader('Cache-Control: cache, must-revalidate'); // HTTP/1.1\nheader('Pragma: public'); // HTTP/1.0\n\n$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n$writer->save('php://output');\nexit;\n"
  },
  {
    "path": "samples/Basic/02_Types.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()\n    ->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Set default font\n$helper->log('Set default font');\n$spreadsheet->getDefaultStyle()\n    ->getFont()\n    ->setName('Arial')\n    ->setSize(10);\n\n// Add some data, resembling some different data types\n$helper->log('Add some data');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', 'String')\n    ->setCellValue('B1', 'Simple')\n    ->setCellValue('C1', 'PhpSpreadsheet');\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A2', 'String')\n    ->setCellValue('B2', 'Symbols')\n    ->setCellValue('C2', '!+&=()~§±æþ');\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A3', 'String')\n    ->setCellValue('B3', 'UTF-8')\n    ->setCellValue('C3', 'Создать MS Excel Книги из PHP скриптов');\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A4', 'Number')\n    ->setCellValue('B4', 'Integer')\n    ->setCellValue('C4', 12);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A5', 'Number')\n    ->setCellValue('B5', 'Float')\n    ->setCellValue('C5', 34.56);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A6', 'Number')\n    ->setCellValue('B6', 'Negative')\n    ->setCellValue('C6', -7.89);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A7', 'Boolean')\n    ->setCellValue('B7', 'True')\n    ->setCellValue('C7', true);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A8', 'Boolean')\n    ->setCellValue('B8', 'False')\n    ->setCellValue('C8', false);\n\n$dateTimeNow = time();\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A9', 'Date/Time')\n    ->setCellValue('B9', 'Date')\n    ->setCellValue('C9', Date::PHPToExcel($dateTimeNow));\n$spreadsheet->getActiveSheet()\n    ->getStyle('C9')\n    ->getNumberFormat()\n    ->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A10', 'Date/Time')\n    ->setCellValue('B10', 'Time')\n    ->setCellValue('C10', Date::PHPToExcel($dateTimeNow));\n$spreadsheet->getActiveSheet()\n    ->getStyle('C10')\n    ->getNumberFormat()\n    ->setFormatCode(NumberFormat::FORMAT_DATE_TIME4);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A11', 'Date/Time')\n    ->setCellValue('B11', 'Date and Time')\n    ->setCellValue('C11', Date::PHPToExcel($dateTimeNow));\n$spreadsheet->getActiveSheet()\n    ->getStyle('C11')\n    ->getNumberFormat()\n    ->setFormatCode(NumberFormat::FORMAT_DATE_DATETIME);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A12', 'NULL')\n    ->setCellValue('C12', null);\n\n$richText = new RichText();\n$richText->createText('你好 ');\n\n$payable = $richText->createTextRun('你 好 吗？');\n$payable->getFontOrThrow()->setBold(true);\n$payable->getFontOrThrow()->setItalic(true);\n$payable->getFontOrThrow()->setColor(new Color(Color::COLOR_DARKGREEN));\n\n$richText->createText(', unless specified otherwise on the invoice.');\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A13', 'Rich Text')\n    ->setCellValue('C13', $richText);\n\n$richText2 = new RichText();\n$richText2->createText(\"black text\\n\");\n\n$red = $richText2->createTextRun('red text');\n$red->getFontOrThrow()->setColor(new Color(Color::COLOR_RED));\n\n$spreadsheet->getActiveSheet()\n    ->getCell('C14')\n    ->setValue($richText2);\n$spreadsheet->getActiveSheet()\n    ->getStyle('C14')\n    ->getAlignment()->setWrapText(true);\n\n$spreadsheet->getActiveSheet()->setCellValue('A17', 'Hyperlink');\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('C17', 'PhpSpreadsheet Web Site');\n$spreadsheet->getActiveSheet()\n    ->getCell('C17')\n    ->getHyperlink()\n    ->setUrl('https://github.com/PHPOffice/PhpSpreadsheet')\n    ->setTooltip('Navigate to PhpSpreadsheet website');\n$spreadsheet->getActiveSheet()->getStyle('C17')->getFont()->setHyperlinkTheme();\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('C18', '=HYPERLINK(\"mailto:abc@def.com\",\"abc@def.com\")');\n$spreadsheet->getActiveSheet()->getStyle('C18')->getFont()->setHyperlinkTheme();\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A20', 'String')\n    ->setCellValue('B20', 'inline')\n    ->setCellValueExplicit('C20', 'This will not be added to sharedStrings.xml', DataType::TYPE_INLINE);\n\n$spreadsheet->getActiveSheet()\n    ->getColumnDimension('B')\n    ->setAutoSize(true);\n$spreadsheet->getActiveSheet()\n    ->getColumnDimension('C')\n    ->setAutoSize(true);\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Datatypes');\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic/03_Formulas.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data, we will use some formulas here\n$helper->log('Add some data');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A5', 'Sum:');\n\n$spreadsheet->getActiveSheet()->setCellValue('B1', 'Range #1')\n    ->setCellValue('B2', 3)\n    ->setCellValue('B3', 7)\n    ->setCellValue('B4', 13)\n    ->setCellValue('B5', '=SUM(B2:B4)');\n$helper->log('Sum of Range #1 is ' . $spreadsheet->getActiveSheet()->getCell('B5')->getCalculatedValueString());\n\n$spreadsheet->getActiveSheet()->setCellValue('C1', 'Range #2')\n    ->setCellValue('C2', 5)\n    ->setCellValue('C3', 11)\n    ->setCellValue('C4', 17)\n    ->setCellValue('C5', '=SUM(C2:C4)');\n$helper->log('Sum of Range #2 is ' . $spreadsheet->getActiveSheet()->getCell('C5')->getCalculatedValueString());\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A7', 'Total of both ranges:');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B7', '=SUM(B5:C5)');\n$helper->log('Sum of both Ranges is ' . $spreadsheet->getActiveSheet()->getCell('B7')->getCalculatedValueString());\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A8', 'Minimum of both ranges:');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B8', '=MIN(B2:C4)');\n$helper->log('Minimum value in either Range is ' . $spreadsheet->getActiveSheet()->getCell('B8')->getCalculatedValueString());\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A9', 'Maximum of both ranges:');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B9', '=MAX(B2:C4)');\n$helper->log('Maximum value in either Range is ' . $spreadsheet->getActiveSheet()->getCell('B9')->getCalculatedValueString());\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A10', 'Average of both ranges:');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B10', '=AVERAGE(B2:C4)');\n$helper->log('Average value of both Ranges is ' . $spreadsheet->getActiveSheet()->getCell('B10')->getCalculatedValueString());\n$spreadsheet->getActiveSheet()\n    ->getColumnDimension('A')\n    ->setAutoSize(true);\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()\n    ->setTitle('Formulas');\n\n//\n//  If we set Pre Calculated Formulas to true then PhpSpreadsheet will calculate all formulae in the\n//    workbook before saving. This adds time and memory overhead, and can cause some problems with formulae\n//    using functions or features (such as array formulae) that aren't yet supported by the calculation engine\n//  If the value is false (the default) for the Xlsx Writer, then MS Excel (or the application used to\n//    open the file) will need to recalculate values itself to guarantee that the correct results are available.\n//\n//$writer->setPreCalculateFormulas(true);\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic/04_Printing.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooterDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data, we will use printing features\n$helper->log('Add some data');\nfor ($i = 1; $i < 200; ++$i) {\n    $spreadsheet->getActiveSheet()->setCellValue('A' . $i, $i);\n    $spreadsheet->getActiveSheet()->setCellValue('B' . $i, 'Test value');\n}\n\n// Set header and footer. When no different headers for odd/even are used, odd header is assumed.\n$helper->log('Set header/footer');\n$spreadsheet->getActiveSheet()\n    ->getHeaderFooter()\n    ->setOddHeader('&L&G&C&HPlease treat this document as confidential!');\n$spreadsheet->getActiveSheet()\n    ->getHeaderFooter()\n    ->setOddFooter('&L&B' . $spreadsheet->getProperties()->getTitle() . '&RPage &P of &N');\n\n// Add a drawing to the header\n$helper->log('Add a drawing to the header');\n$drawing = new HeaderFooterDrawing();\n$drawing->setName('PhpSpreadsheet logo');\n$drawing->setPath(__DIR__ . '/../images/PhpSpreadsheet_logo.png');\n$drawing->setHeight(36);\n$spreadsheet->getActiveSheet()\n    ->getHeaderFooter()\n    ->addImage($drawing, HeaderFooter::IMAGE_HEADER_LEFT);\n\n// Set page orientation and size\n$helper->log('Set page orientation and size');\n$spreadsheet->getActiveSheet()\n    ->getPageSetup()\n    ->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n$spreadsheet->getActiveSheet()\n    ->getPageSetup()\n    ->setPaperSize(PageSetup::PAPERSIZE_A4);\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Printing');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic/05_Feature_demo.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n// Save\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic/05_UnexpectedCharacters.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet2.php';\n\n// Save\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic/06_Largescale.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/largeSpreadsheet.php';\n\n// Save\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic/07_Reader.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nrequire __DIR__ . '/../Header.php';\n\n// Create temporary file that will be read\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$sampleSpreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = $helper->getTemporaryFilename();\n$writer = new Xlsx($sampleSpreadsheet);\n$writer->save($filename);\n\n$callStartTime = microtime(true);\n$spreadsheet = IOFactory::load($filename);\n$helper->logRead('Xlsx', $filename, $callStartTime);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\nunlink($filename);\n"
  },
  {
    "path": "samples/Basic/08_Conditional_formatting.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Create a first sheet, representing sales data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Description')\n    ->setCellValue('B1', 'Amount');\n\n$spreadsheet->getActiveSheet()->setCellValue('A2', 'Paycheck received')\n    ->setCellValue('B2', 100);\n\n$spreadsheet->getActiveSheet()->setCellValue('A3', 'Cup of coffee bought')\n    ->setCellValue('B3', -1.5);\n\n$spreadsheet->getActiveSheet()->setCellValue('A4', 'Cup of coffee bought')\n    ->setCellValue('B4', -1.5);\n\n$spreadsheet->getActiveSheet()->setCellValue('A5', 'Cup of tea bought')\n    ->setCellValue('B5', -1.2);\n\n$spreadsheet->getActiveSheet()->setCellValue('A6', 'Found some money')\n    ->setCellValue('B6', 8);\n\n$spreadsheet->getActiveSheet()->setCellValue('A7', 'Total:')\n    ->setCellValue('B7', '=SUM(B2:B6)');\n\n// Set column widths\n$helper->log('Set column widths');\n$spreadsheet->getActiveSheet()->getColumnDimension('A')->setWidth(30);\n$spreadsheet->getActiveSheet()->getColumnDimension('B')->setWidth(12);\n\n// Add conditional formatting\n$helper->log('Add conditional formatting');\n$conditional1 = new Conditional();\n$conditional1->setConditionType(Conditional::CONDITION_CELLIS)\n    ->setOperatorType(Conditional::OPERATOR_BETWEEN)\n    ->addCondition('200')\n    ->addCondition('400');\n$conditional1->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_YELLOW);\n$conditional1->getStyle()->getFont()->setBold(true);\n$conditional1->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_INTEGER);\n\n$conditional2 = new Conditional();\n$conditional2->setConditionType(Conditional::CONDITION_CELLIS)\n    ->setOperatorType(Conditional::OPERATOR_LESSTHAN)\n    ->addCondition('0');\n$conditional2->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_RED);\n$conditional2->getStyle()->getFont()->setItalic(true);\n$conditional2->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_INTEGER);\n\n$conditional3 = new Conditional();\n$conditional3->setConditionType(Conditional::CONDITION_CELLIS)\n    ->setOperatorType(Conditional::OPERATOR_GREATERTHANOREQUAL)\n    ->addCondition('0');\n$conditional3->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_GREEN);\n$conditional3->getStyle()->getFont()->setItalic(true);\n$conditional3->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_INTEGER);\n\n$conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('B2')->getConditionalStyles();\n$conditionalStyles[] = $conditional1;\n$conditionalStyles[] = $conditional2;\n$conditionalStyles[] = $conditional3;\n$spreadsheet->getActiveSheet()->getStyle('B2')->setConditionalStyles($conditionalStyles);\n\n// duplicate the conditional styles across a range of cells\n$helper->log('Duplicate the conditional formatting across a range of cells');\n$spreadsheet->getActiveSheet()->duplicateConditionalStyle(\n    $spreadsheet->getActiveSheet()->getStyle('B2')->getConditionalStyles(),\n    'B3:B7'\n);\n\n// Set fonts\n$helper->log('Set fonts');\n$spreadsheet->getActiveSheet()->getStyle('A1:B1')->getFont()->setBold(true);\n//$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A7:B7')->getFont()->setBold(true);\n//$spreadsheet->getActiveSheet()->getStyle('B7')->getFont()->setBold(true);\n// Set header and footer. When no different headers for odd/even are used, odd header is assumed.\n$helper->log('Set header/footer');\n$spreadsheet->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&BPersonal cash register&RPrinted on &D');\n$spreadsheet->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $spreadsheet->getProperties()->getTitle() . '&RPage &P of &N');\n\n// Set page orientation and size\n$helper->log('Set page orientation and size');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_PORTRAIT);\n$spreadsheet->getActiveSheet()->getPageSetup()->setPaperSize(PageSetup::PAPERSIZE_A4);\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Invoice');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic/08_Conditional_formatting_2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Create a first sheet, representing sales data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', '-0.5')\n    ->setCellValue('A2', '-0.25')\n    ->setCellValue('A3', '0.0')\n    ->setCellValue('A4', '0.25')\n    ->setCellValue('A5', '0.5')\n    ->setCellValue('A6', '0.75')\n    ->setCellValue('A7', '1.0')\n    ->setCellValue('A8', '1.25');\n\n$spreadsheet->getActiveSheet()->getStyle('A1:A8')\n    ->getNumberFormat()\n    ->setFormatCode(\n        NumberFormat::FORMAT_PERCENTAGE_00\n    );\n\n// Add conditional formatting\n$helper->log('Add conditional formatting');\n$conditional1 = new Conditional();\n$conditional1->setConditionType(Conditional::CONDITION_CELLIS)\n    ->setOperatorType(Conditional::OPERATOR_LESSTHAN)\n    ->addCondition('0');\n$conditional1->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_RED);\n\n$conditional3 = new Conditional();\n$conditional3->setConditionType(Conditional::CONDITION_CELLIS)\n    ->setOperatorType(Conditional::OPERATOR_GREATERTHANOREQUAL)\n    ->addCondition('1');\n$conditional3->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_GREEN);\n\n$conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('A1')->getConditionalStyles();\n$conditionalStyles[] = $conditional1;\n$conditionalStyles[] = $conditional3;\n$spreadsheet->getActiveSheet()->getStyle('A1')->setConditionalStyles($conditionalStyles);\n\n// duplicate the conditional styles across a range of cells\n$helper->log('Duplicate the conditional formatting across a range of cells');\n$spreadsheet->getActiveSheet()->duplicateConditionalStyle(\n    $spreadsheet->getActiveSheet()->getStyle('A1')->getConditionalStyles(),\n    'A2:A8'\n);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic/09_Pagebreaks.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Create a first sheet\n$helper->log('Add data and page breaks');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Firstname')\n    ->setCellValue('B1', 'Lastname')\n    ->setCellValue('C1', 'Phone')\n    ->setCellValue('D1', 'Fax')\n    ->setCellValue('E1', 'Is Client ?');\n\n// Add data\nfor ($i = 2; $i <= 50; ++$i) {\n    $spreadsheet->getActiveSheet()->setCellValue('A' . $i, \"FName $i\");\n    $spreadsheet->getActiveSheet()->setCellValue('B' . $i, \"LName $i\");\n    $spreadsheet->getActiveSheet()->setCellValue('C' . $i, \"PhoneNo $i\");\n    $spreadsheet->getActiveSheet()->setCellValue('D' . $i, \"FaxNo $i\");\n    $spreadsheet->getActiveSheet()->setCellValue('E' . $i, true);\n\n    // Add page breaks every 10 rows\n    if ($i % 10 == 0) {\n        // Add a page break\n        $spreadsheet->getActiveSheet()->setBreak('A' . $i, Worksheet::BREAK_ROW);\n    }\n}\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setTitle('Printing Options');\n\n// Set print headers\n$spreadsheet->getActiveSheet()\n    ->getHeaderFooter()->setOddHeader('&C&24&K0000FF&B&U&A');\n$spreadsheet->getActiveSheet()\n    ->getHeaderFooter()->setEvenHeader('&C&24&K0000FF&B&U&A');\n\n// Set print footers\n$spreadsheet->getActiveSheet()\n    ->getHeaderFooter()->setOddFooter('&R&D &T&C&F&LPage &P / &N');\n$spreadsheet->getActiveSheet()\n    ->getHeaderFooter()->setEvenFooter('&L&D &T&C&F&RPage &P / &N');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic1/11_Documentsecurity.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Hello');\n$spreadsheet->getActiveSheet()->setCellValue('B2', 'world!');\n$spreadsheet->getActiveSheet()->setCellValue('C1', 'Hello');\n$spreadsheet->getActiveSheet()->setCellValue('D2', 'world!');\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Simple');\n\n// Set document security\n$helper->log('Set document security');\n$spreadsheet->getSecurity()->setLockWindows(true);\n$spreadsheet->getSecurity()->setLockStructure(true);\n$spreadsheet->getSecurity()->setWorkbookPassword('PhpSpreadsheet');\n\n// Set sheet security\n$helper->log('Set sheet security');\n$spreadsheet->getActiveSheet()->getProtection()->setPassword('PhpSpreadsheet');\n// setSheet should be true in order to enable protection!\n$spreadsheet->getActiveSheet()->getProtection()->setSheet(true);\n// The following are set to false, i.e. user is allowed to\n//    sort, insert rows, or format cells without unprotecting sheet.\n$spreadsheet->getActiveSheet()->getProtection()->setSort(false);\n$spreadsheet->getActiveSheet()->getProtection()->setInsertRows(false);\n$spreadsheet->getActiveSheet()->getProtection()->setFormatCells(false);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic1/12_CellProtection.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Mark Baker')\n    ->setLastModifiedBy('Mark Baker')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Crouching');\n$spreadsheet->getActiveSheet()->setCellValue('B1', 'Tiger');\n$spreadsheet->getActiveSheet()->setCellValue('A2', 'Hidden');\n$spreadsheet->getActiveSheet()->setCellValue('B2', 'Dragon');\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Simple');\n\n// Set document security\n$helper->log('Set cell protection');\n\n// Set sheet security\n$helper->log('Set sheet security');\n$spreadsheet->getActiveSheet()->getProtection()->setSheet(true);\n$spreadsheet->getActiveSheet()\n    ->getStyle('A2:B2')\n    ->getProtection()->setLocked(\n        Protection::PROTECTION_UNPROTECTED\n    );\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic1/13_Calculation.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nmt_srand(1234567890);\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// List functions\n$helper->log('List implemented functions');\n$calc = Calculation::getInstance();\nprint_r($calc->getImplementedFunctionNames());\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Add some data, we will use some formulas here\n$helper->log('Add some data and formulas');\n$spreadsheet->getActiveSheet()->setCellValue('A14', 'Count:')\n    ->setCellValue('A15', 'Sum:')\n    ->setCellValue('A16', 'Max:')\n    ->setCellValue('A17', 'Min:')\n    ->setCellValue('A18', 'Average:')\n    ->setCellValue('A19', 'Median:')\n    ->setCellValue('A20', 'Mode:');\n\n$spreadsheet->getActiveSheet()->setCellValue('A22', 'CountA:')\n    ->setCellValue('A23', 'MaxA:')\n    ->setCellValue('A24', 'MinA:');\n\n$spreadsheet->getActiveSheet()->setCellValue('A26', 'StDev:')\n    ->setCellValue('A27', 'StDevA:')\n    ->setCellValue('A28', 'StDevP:')\n    ->setCellValue('A29', 'StDevPA:');\n\n$spreadsheet->getActiveSheet()->setCellValue('A31', 'DevSq:')\n    ->setCellValue('A32', 'Var:')\n    ->setCellValue('A33', 'VarA:')\n    ->setCellValue('A34', 'VarP:')\n    ->setCellValue('A35', 'VarPA:');\n\n$spreadsheet->getActiveSheet()->setCellValue('A37', 'Date:');\n\n$spreadsheet->getActiveSheet()->setCellValue('B1', 'Range 1')\n    ->setCellValue('B2', 2)\n    ->setCellValue('B3', 8)\n    ->setCellValue('B4', 10)\n    ->setCellValue('B5', true)\n    ->setCellValue('B6', false)\n    ->setCellValue('B7', 'Text String')\n    ->setCellValue('B9', '22')\n    ->setCellValue('B10', 4)\n    ->setCellValue('B11', 6)\n    ->setCellValue('B12', 12);\n\n$spreadsheet->getActiveSheet()->setCellValue('B14', '=COUNT(B2:B12)')\n    ->setCellValue('B15', '=SUM(B2:B12)')\n    ->setCellValue('B16', '=MAX(B2:B12)')\n    ->setCellValue('B17', '=MIN(B2:B12)')\n    ->setCellValue('B18', '=AVERAGE(B2:B12)')\n    ->setCellValue('B19', '=MEDIAN(B2:B12)')\n    ->setCellValue('B20', '=MODE(B2:B12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('B22', '=COUNTA(B2:B12)')\n    ->setCellValue('B23', '=MAXA(B2:B12)')\n    ->setCellValue('B24', '=MINA(B2:B12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('B26', '=STDEV(B2:B12)')\n    ->setCellValue('B27', '=STDEVA(B2:B12)')\n    ->setCellValue('B28', '=STDEVP(B2:B12)')\n    ->setCellValue('B29', '=STDEVPA(B2:B12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('B31', '=DEVSQ(B2:B12)')\n    ->setCellValue('B32', '=VAR(B2:B12)')\n    ->setCellValue('B33', '=VARA(B2:B12)')\n    ->setCellValue('B34', '=VARP(B2:B12)')\n    ->setCellValue('B35', '=VARPA(B2:B12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('B37', '=DATE(2007, 12, 21)')\n    ->setCellValue('B38', '=DATEDIF( DATE(2007, 12, 21), DATE(2007, 12, 22), \"D\" )')\n    ->setCellValue('B39', '=DATEVALUE(\"01-Feb-2006 10:06 AM\")')\n    ->setCellValue('B40', '=DAY( DATE(2006, 1, 2) )')\n    ->setCellValue('B41', '=DAYS360( DATE(2002, 2, 3), DATE(2005, 5, 31) )');\n\n$spreadsheet->getActiveSheet()->setCellValue('C1', 'Range 2')\n    ->setCellValue('C2', 1)\n    ->setCellValue('C3', 2)\n    ->setCellValue('C4', 2)\n    ->setCellValue('C5', 3)\n    ->setCellValue('C6', 3)\n    ->setCellValue('C7', 3)\n    ->setCellValue('C8', '0')\n    ->setCellValue('C9', 4)\n    ->setCellValue('C10', 4)\n    ->setCellValue('C11', 4)\n    ->setCellValue('C12', 4);\n\n$spreadsheet->getActiveSheet()->setCellValue('C14', '=COUNT(C2:C12)')\n    ->setCellValue('C15', '=SUM(C2:C12)')\n    ->setCellValue('C16', '=MAX(C2:C12)')\n    ->setCellValue('C17', '=MIN(C2:C12)')\n    ->setCellValue('C18', '=AVERAGE(C2:C12)')\n    ->setCellValue('C19', '=MEDIAN(C2:C12)')\n    ->setCellValue('C20', '=MODE(C2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('C22', '=COUNTA(C2:C12)')\n    ->setCellValue('C23', '=MAXA(C2:C12)')\n    ->setCellValue('C24', '=MINA(C2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('C26', '=STDEV(C2:C12)')\n    ->setCellValue('C27', '=STDEVA(C2:C12)')\n    ->setCellValue('C28', '=STDEVP(C2:C12)')\n    ->setCellValue('C29', '=STDEVPA(C2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('C31', '=DEVSQ(C2:C12)')\n    ->setCellValue('C32', '=VAR(C2:C12)')\n    ->setCellValue('C33', '=VARA(C2:C12)')\n    ->setCellValue('C34', '=VARP(C2:C12)')\n    ->setCellValue('C35', '=VARPA(C2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('D1', 'Range 3')\n    ->setCellValue('D2', 2)\n    ->setCellValue('D3', 3)\n    ->setCellValue('D4', 4);\n\n$spreadsheet->getActiveSheet()->setCellValue('D14', '=((D2 * D3) + D4) & \" should be 10\"');\n\n$spreadsheet->getActiveSheet()->setCellValue('E12', 'Other functions')\n    ->setCellValue('E14', '=PI()')\n    ->setCellValue('E15', '=RAND()')\n    ->setCellValue('E16', '=RANDBETWEEN(5, 10)');\n\n$spreadsheet->getActiveSheet()->setCellValue('E17', 'Count of both ranges:')\n    ->setCellValue('F17', '=COUNT(B2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('E18', 'Total of both ranges:')\n    ->setCellValue('F18', '=SUM(B2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('E19', 'Maximum of both ranges:')\n    ->setCellValue('F19', '=MAX(B2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('E20', 'Minimum of both ranges:')\n    ->setCellValue('F20', '=MIN(B2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('E21', 'Average of both ranges:')\n    ->setCellValue('F21', '=AVERAGE(B2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('E22', 'Median of both ranges:')\n    ->setCellValue('F22', '=MEDIAN(B2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('E23', 'Mode of both ranges:')\n    ->setCellValue('F23', '=MODE(B2:C12)');\n\n// Calculated data\n$helper->log('Calculated data');\nfor ($col = 'B'; $col != 'G'; StringHelper::stringIncrement($col)) {\n    for ($row = 14; $row <= 41; ++$row) {\n        $formula = $spreadsheet->getActiveSheet()->getCell($col . $row)->getValue();\n        if (\n            is_string($formula)\n            && ($formula[0] == '=')\n        ) {\n            $helper->log('Value of ' . $col . $row . ' [' . $formula . ']: ' . $spreadsheet->getActiveSheet()->getCell($col . $row)->getCalculatedValueString());\n        }\n    }\n}\n\n//\n//  If we set Pre Calculated Formulas to true then PhpSpreadsheet will calculate all formulae in the\n//    workbook before saving. This adds time and memory overhead, and can cause some problems with formulae\n//    using functions or features (such as array formulae) that aren't yet supported by the calculation engine\n//  If the value is false (the default) for the Xlsx Writer, then MS Excel (or the application used to\n//    open the file) will need to recalculate values itself to guarantee that the correct results are available.\n//\n//$writer->setPreCalculateFormulas(true);\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic1/13_CalculationCyclicFormulae.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Add some data, we will use some formulas here\n$helper->log('Add some data and formulas');\n$spreadsheet->getActiveSheet()->setCellValue('A1', '=B1')\n    ->setCellValue('A2', '=B2+1')\n    ->setCellValue('B1', '=A1+1')\n    ->setCellValue('B2', '=A2');\n\nCalculation::getInstance($spreadsheet)->cyclicFormulaCount = 15;\n\n// Calculated data\n$helper->log('Calculated data');\nfor ($row = 1; $row <= 2; ++$row) {\n    for ($col = 'A'; $col != 'C'; StringHelper::stringIncrement($col)) {\n        $formula = $spreadsheet->getActiveSheet()->getCell($col . $row)->getValue();\n        if (\n            is_string($formula)\n                && ($formula[0] == '=')\n        ) {\n            $helper->log('Value of ' . $col . $row . ' [' . $formula . ']: ' . $spreadsheet->getActiveSheet()->getCell($col . $row)->getCalculatedValueString());\n        }\n    }\n}\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic1/14_Xls.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = $helper->getFilename(__FILE__, 'xls');\n$writer = IOFactory::createWriter($spreadsheet, 'Xls');\n\n$callStartTime = microtime(true);\n$writer->save($filename);\n$helper->logWrite($writer, $filename, $callStartTime);\n"
  },
  {
    "path": "samples/Basic1/15_Datavalidation.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Create a first sheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Cell B3 and B5 contain data validation...')\n    ->setCellValue('A3', 'Number:')\n    ->setCellValue('B3', '10')\n    ->setCellValue('A5', 'List:')\n    ->setCellValue('B5', 'Item A')\n    ->setCellValue('A7', 'List #2:')\n    ->setCellValue('B7', 'Item #2')\n    ->setCellValue('D2', 'Item #1')\n    ->setCellValue('D3', 'Item #2')\n    ->setCellValue('D4', 'Item #3')\n    ->setCellValue('D5', 'Item #4')\n    ->setCellValue('D6', 'Item #5');\n\n// Set data validation\n$helper->log('Set data validation');\n$validation = $spreadsheet->getActiveSheet()->getCell('B3')->getDataValidation();\n$validation->setType(DataValidation::TYPE_WHOLE);\n$validation->setErrorStyle(DataValidation::STYLE_STOP);\n$validation->setAllowBlank(true);\n$validation->setShowInputMessage(true);\n$validation->setShowErrorMessage(true);\n$validation->setErrorTitle('Input error');\n$validation->setError('Only numbers between 10 and 20 are allowed!');\n$validation->setPromptTitle('Allowed input');\n$validation->setPrompt('Only numbers between 10 and 20 are allowed.');\n$validation->setFormula1('10');\n$validation->setFormula2('20');\n\n$validation = $spreadsheet->getActiveSheet()->getCell('B5')->getDataValidation();\n$validation->setType(DataValidation::TYPE_LIST);\n$validation->setErrorStyle(DataValidation::STYLE_INFORMATION);\n$validation->setAllowBlank(false);\n$validation->setShowInputMessage(true);\n$validation->setShowErrorMessage(true);\n$validation->setShowDropDown(true);\n$validation->setErrorTitle('Input error');\n$validation->setError('Value is not in list.');\n$validation->setPromptTitle('Pick from list');\n$validation->setPrompt('Please pick a value from the drop-down list.');\n$validation->setFormula1('\"Item A,Item B,Item C\"'); // Make sure to put the list items between \" and \" if your list is simply a comma-separated list of values !!!\n\n$validation = $spreadsheet->getActiveSheet()->getCell('B7')->getDataValidation();\n$validation->setType(DataValidation::TYPE_LIST);\n$validation->setErrorStyle(DataValidation::STYLE_INFORMATION);\n$validation->setAllowBlank(false);\n$validation->setShowInputMessage(true);\n$validation->setShowErrorMessage(true);\n$validation->setShowDropDown(true);\n$validation->setErrorTitle('Input error');\n$validation->setError('Value is not in list.');\n$validation->setPromptTitle('Pick from list');\n$validation->setPrompt('Please pick a value from the drop-down list.');\n$validation->setFormula1('$D$2:$D$6'); // Make sure NOT to put a range of cells or a formula between \" and \"\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic1/16_Csv.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv as CsvReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv as CsvWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Write to CSV format');\n$writer = new CsvWriter($spreadsheet);\n$writer->setDelimiter(',')\n    ->setEnclosure('\"')\n    ->setSheetIndex(0);\n\n$callStartTime = microtime(true);\n$filename = $helper->getTemporaryFilename('csv');\n$writer->save($filename);\n$helper->logWrite($writer, $filename, $callStartTime);\n\n$helper->log('Read from CSV format');\n\n$reader = new CsvReader();\n$reader->setDelimiter(',')\n    ->setEnclosure('\"')\n    ->setSheetIndex(0);\n\n$callStartTime = microtime(true);\n$spreadsheetFromCSV = $reader->load($filename);\n$helper->logRead('Csv', $filename, $callStartTime);\nunlink($filename);\n\n// Write Xlsx\n$helper->write($spreadsheetFromCSV, __FILE__, ['Xlsx']);\n\n// Write CSV\n$filenameCSV = $helper->getFilename(__FILE__, 'csv');\n$writerCSV = new CsvWriter($spreadsheetFromCSV);\n//$writerCSV->setExcelCompatibility(true);\n$writerCSV->setUseBom(true); // because of non-ASCII chars\n\n$callStartTime = microtime(true);\n$writerCSV->save($filenameCSV);\n$helper->logWrite($writerCSV, $filenameCSV, $callStartTime);\n"
  },
  {
    "path": "samples/Basic1/17_Html.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n$spreadsheet->getProperties()->setTitle('Non-embedded images');\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->write($spreadsheet, __FILE__, ['Html']);\n"
  },
  {
    "path": "samples/Basic1/17a_Html.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n$spreadsheet->getProperties()->setTitle('Embedded images');\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->write(\n    $spreadsheet,\n    __FILE__,\n    ['Html'],\n    false,\n    function (Html $writer): void {\n        $writer->setEmbedImages(true);\n    }\n);\n"
  },
  {
    "path": "samples/Basic1/17b_Html.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\nfunction changeGridlines(string $html): string\n{\n    return str_replace('{border: 1px solid black;}', '{border: 2px dashed red;}', $html);\n}\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->write(\n    $spreadsheet,\n    __FILE__,\n    ['Html'],\n    false,\n    function (Html $writer): void {\n        $writer->setEmbedImages(true);\n        $writer->setEditHtmlCallback('changeGridlines');\n    }\n);\n"
  },
  {
    "path": "samples/Basic1/18_Extendedcalculation.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// List functions\n$helper->log('List implemented functions');\n$calc = Calculation::getInstance();\nprint_r($calc->getImplementedFunctionNames());\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Add some data, we will use some formulas here\n$helper->log('Add some data');\n$spreadsheet->getActiveSheet()->setCellValue('A14', 'Count:');\n\n$spreadsheet->getActiveSheet()->setCellValue('B1', 'Range 1');\n$spreadsheet->getActiveSheet()->setCellValue('B2', 2);\n$spreadsheet->getActiveSheet()->setCellValue('B3', 8);\n$spreadsheet->getActiveSheet()->setCellValue('B4', 10);\n$spreadsheet->getActiveSheet()->setCellValue('B5', true);\n$spreadsheet->getActiveSheet()->setCellValue('B6', false);\n$spreadsheet->getActiveSheet()->setCellValue('B7', 'Text String');\n$spreadsheet->getActiveSheet()->setCellValue('B9', '22');\n$spreadsheet->getActiveSheet()->setCellValue('B10', 4);\n$spreadsheet->getActiveSheet()->setCellValue('B11', 6);\n$spreadsheet->getActiveSheet()->setCellValue('B12', 12);\n\n$spreadsheet->getActiveSheet()->setCellValue('B14', '=COUNT(B2:B12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('C1', 'Range 2');\n$spreadsheet->getActiveSheet()->setCellValue('C2', 1);\n$spreadsheet->getActiveSheet()->setCellValue('C3', 2);\n$spreadsheet->getActiveSheet()->setCellValue('C4', 2);\n$spreadsheet->getActiveSheet()->setCellValue('C5', 3);\n$spreadsheet->getActiveSheet()->setCellValue('C6', 3);\n$spreadsheet->getActiveSheet()->setCellValue('C7', 3);\n$spreadsheet->getActiveSheet()->setCellValue('C8', '0');\n$spreadsheet->getActiveSheet()->setCellValue('C9', 4);\n$spreadsheet->getActiveSheet()->setCellValue('C10', 4);\n$spreadsheet->getActiveSheet()->setCellValue('C11', 4);\n$spreadsheet->getActiveSheet()->setCellValue('C12', 4);\n\n$spreadsheet->getActiveSheet()->setCellValue('C14', '=COUNT(C2:C12)');\n\n$spreadsheet->getActiveSheet()->setCellValue('D1', 'Range 3');\n$spreadsheet->getActiveSheet()->setCellValue('D2', 2);\n$spreadsheet->getActiveSheet()->setCellValue('D3', 3);\n$spreadsheet->getActiveSheet()->setCellValue('D4', 4);\n\n$spreadsheet->getActiveSheet()->setCellValue('D5', '=((D2 * D3) + D4) & \" should be 10\"');\n\n$spreadsheet->getActiveSheet()->setCellValue('E1', 'Other functions');\n$spreadsheet->getActiveSheet()->setCellValue('E2', '=PI()');\n$spreadsheet->getActiveSheet()->setCellValue('E3', '=RAND()');\n$spreadsheet->getActiveSheet()->setCellValue('E4', '=RANDBETWEEN(5, 10)');\n\n$spreadsheet->getActiveSheet()->setCellValue('E14', 'Count of both ranges:');\n$spreadsheet->getActiveSheet()->setCellValue('F14', '=COUNT(B2:C12)');\n\n// Calculated data\n$helper->log('Calculated data');\n$helper->log('Value of B14 [=COUNT(B2:B12)]: ' . $spreadsheet->getActiveSheet()->getCell('B14')->getCalculatedValueString());\n\n$helper->logEndingNotes();\n"
  },
  {
    "path": "samples/Basic1/19_Namedrange.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Firstname:')\n    ->setCellValue('A2', 'Lastname:')\n    ->setCellValue('A3', 'Fullname:')\n    ->setCellValue('B1', 'Maarten')\n    ->setCellValue('B2', 'Balliauw')\n    ->setCellValue('B3', '=B1 & \" \" & B2');\n\n// Define named ranges\n$helper->log('Define named ranges');\n$spreadsheet->addNamedRange(new NamedRange('PersonName', $spreadsheet->getActiveSheet(), '$B$1'));\n$spreadsheet->addNamedRange(new NamedRange('PersonLN', $spreadsheet->getActiveSheet(), '$B$2'));\n\n// Rename named ranges\n$helper->log('Rename named ranges');\nif ($spreadsheet->getNamedRange('PersonName') === null) {\n    throw new Exception('named range not found');\n}\n$spreadsheet->getNamedRange('PersonName')->setName('PersonFN');\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Person');\n\n// Create a new worksheet, after the default sheet\n$helper->log('Create new Worksheet object');\n$spreadsheet->createSheet();\n\n// Add some data to the second sheet, resembling some different data types\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(1);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Firstname:')\n    ->setCellValue('A2', 'Lastname:')\n    ->setCellValue('A3', 'Fullname:')\n    ->setCellValue('B1', '=PersonFN')\n    ->setCellValue('B2', '=PersonLN')\n    ->setCellValue('B3', '=PersonFN & \" \" & PersonLN');\n\n// Resolve range\n$helper->log('Resolve range');\n$helper->log('Cell B1 {=PersonFN}: ' . $spreadsheet->getActiveSheet()->getCell('B1')->getCalculatedValueString());\n$helper->log('Cell B3 {=PersonFN & \" \" & PersonLN}: ' . $spreadsheet->getActiveSheet()->getCell('B3')->getCalculatedValueString());\n$helper->log('Cell Person!B1: ' . $spreadsheet->getActiveSheet()->getCell('Person!B1')->getCalculatedValueString());\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Person (cloned)');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/20_Read_Excel2003XML.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = __DIR__ . '/../templates/excel2003.xml';\n$callStartTime = microtime(true);\n$spreadsheet = IOFactory::load($filename);\n$helper->logRead('Xml', $filename, $callStartTime);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/20_Read_Gnumeric.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = __DIR__ . '/../templates/GnumericTest.gnumeric';\n$callStartTime = microtime(true);\n$spreadsheet = IOFactory::load($filename);\n$helper->logRead('Gnumeric', $filename, $callStartTime);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/20_Read_Ods.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = __DIR__ . '/../templates/OOCalcTest.ods';\n$callStartTime = microtime(true);\n$spreadsheet = IOFactory::load($filename);\n$helper->logRead('Ods', $filename, $callStartTime);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Xls', 'Ods']);\n"
  },
  {
    "path": "samples/Basic2/20_Read_Sylk.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = __DIR__ . '/../templates/SylkTest.slk';\n$callStartTime = microtime(true);\n$spreadsheet = IOFactory::load($filename);\n$helper->logRead('Slk', $filename, $callStartTime);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/20_Read_Xls.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n// Write temporary file\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = $helper->getTemporaryFilename('xls');\n$writer = IOFactory::createWriter($spreadsheet, 'Xls');\n$callStartTime = microtime(true);\n$writer->save($filename);\n$helper->logWrite($writer, $filename, $callStartTime);\n\n// Read Xls file\n$callStartTime = microtime(true);\n$spreadsheet = IOFactory::load($filename);\n$helper->logRead('Xls', $filename, $callStartTime);\nunlink($filename);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/22_Heavily_formatted.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n\n$spreadsheet->getActiveSheet()->getStyle('A1:T100')->applyFromArray(\n    ['fill' => [\n        'fillType' => Fill::FILL_SOLID,\n        'color' => ['argb' => 'FFCCFFCC'],\n    ],\n        'borders' => [\n            'bottom' => ['borderStyle' => Border::BORDER_THIN],\n            'right' => ['borderStyle' => Border::BORDER_MEDIUM],\n        ],\n    ]\n);\n\n$spreadsheet->getActiveSheet()->getStyle('C5:R95')->applyFromArray(\n    ['fill' => [\n        'fillType' => Fill::FILL_SOLID,\n        'color' => ['argb' => 'FFFFFF00'],\n    ],\n    ]\n);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/23_Sharedstyles.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n\n$sharedStyle1 = new Style();\n$sharedStyle2 = new Style();\n\n$sharedStyle1->applyFromArray(\n    ['fill' => [\n        'fillType' => Fill::FILL_SOLID,\n        'color' => ['argb' => 'FFCCFFCC'],\n    ],\n        'borders' => [\n            'bottom' => ['borderStyle' => Border::BORDER_THIN],\n            'right' => ['borderStyle' => Border::BORDER_MEDIUM],\n        ],\n    ]\n);\n\n$sharedStyle2->applyFromArray(\n    ['fill' => [\n        'fillType' => Fill::FILL_SOLID,\n        'color' => ['argb' => 'FFFFFF00'],\n    ],\n        'borders' => [\n            'bottom' => ['borderStyle' => Border::BORDER_THIN],\n            'right' => ['borderStyle' => Border::BORDER_MEDIUM],\n        ],\n    ]\n);\n\n$spreadsheet->getActiveSheet()->duplicateStyle($sharedStyle1, 'A1:T100');\n$spreadsheet->getActiveSheet()->duplicateStyle($sharedStyle2, 'C5:R95');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/24_Readfilter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nrequire __DIR__ . '/../Header.php';\n\n// Write temporary file\n/** @var Spreadsheet */\n$largeSpreadsheet = require __DIR__ . '/../templates/largeSpreadsheet.php';\n$writer = new Xlsx($largeSpreadsheet);\n/** @var Helper\\Sample $helper */\n$filename = $helper->getTemporaryFilename();\n$callStartTime = microtime(true);\n$writer->save($filename);\n$helper->logWrite($writer, $filename, $callStartTime);\n\nclass MyReadFilter implements IReadFilter\n{\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        // Read title row and rows 20 - 30\n        if ($row == 1 || ($row >= 20 && $row <= 30)) {\n            return true;\n        }\n\n        return false;\n    }\n}\n\n$helper->log('Load from Xlsx file');\n$reader = new XlsxReader();\n$reader->setReadFilter(new MyReadFilter());\n$callStartTime = microtime(true);\n$spreadsheet = $reader->load($filename);\nunlink($filename);\n$helper->logRead('Xlsx', $filename, $callStartTime);\n$helper->log('Remove unnecessary rows');\n$spreadsheet->getActiveSheet()->removeRow(2, 18);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/25_In_memory_image.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\BaseWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n$sheet1 = $spreadsheet->getActiveSheet();\n$sheet1->setTitle('SheetWithData');\n$sheet1->getCell('G1')->setValue('X');\n$sheet1->getCell('E5')->setValue('Y');\n$sheet1->getCell('A8')->setValue('Z');\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Generate an image\n$helper->log('Generate an image');\n$gdImage = imagecreatetruecolor(120, 20);\nif (!$gdImage) {\n    throw new Exception('Cannot Initialize new GD image stream');\n}\n\n$textColor = imagecolorallocate($gdImage, 255, 255, 255);\nif ($textColor === false) {\n    throw new Exception('imagecolorallocate failed');\n}\nimagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor);\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet');\n$drawing = new MemoryDrawing();\n$drawing->setName('Sample image');\n$drawing->setDescription('Sample image');\n$drawing->setImageResource($gdImage);\n$drawing->setRenderingFunction(MemoryDrawing::RENDERING_JPEG);\n$drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT);\n$drawing->setHeight(36);\n$drawing->setWorksheet($sheet1);\n$drawing->setCoordinates('C5');\n\n$helper->log('Create new sheet');\n$sheet2 = $spreadsheet->createSheet();\n$sheet2->setTitle('SheetWithoutData');\n\n// Add a drawing to the new worksheet\n$helper->log('Add a drawing to the new worksheet');\n$drawing = new MemoryDrawing();\n$drawing->setName('Sample image');\n$drawing->setDescription('Sample image');\n$drawing->setImageResource($gdImage);\n$drawing->setRenderingFunction(MemoryDrawing::RENDERING_JPEG);\n$drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT);\n$drawing->setHeight(36);\n$drawing->setWorksheet($sheet2);\n$drawing->setCoordinates('C5');\n\n// Save\n$helper->write(\n    $spreadsheet,\n    __FILE__,\n    ['Xlsx', 'Html'],\n    false,\n    function (BaseWriter $writer): void {\n        if (method_exists($writer, 'writeAllSheets')) {\n            $writer->writeAllSheets();\n        }\n    }\n);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic2/26_Utf8.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Read from Xlsx (.xlsx) template\n$helper->log('Load Xlsx template file');\n$reader = IOFactory::createReader('Xlsx');\n$spreadsheet = $reader->load(__DIR__ . '/../templates/26template.xlsx');\n$spreadsheet->getActiveSheet()->setPrintGridlines(true);\n\n// at this point, we could do some manipulations with the template, but we skip this step\n$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Xls', 'Html']);\n\n// Export to PDF (mpdf)\n$mpdfCjkWriter = function (Mpdf $writer): void {\n    $mpdfCjk = function (string $html): string {\n        $html = str_replace(\"'Calibri'\", \"'Calibri',Sun-ExtA\", $html);\n\n        return str_replace(\"'Times New Roman'\", \"'Times New Roman',Sun-ExtA\", $html);\n    };\n\n    $writer->setEditHtmlCallback($mpdfCjk);\n};\n\n$helper->log('Write to Mpdf');\nIOFactory::registerWriter('Pdf', Mpdf::class);\n$filename = __FILE__;\n$helper->write($spreadsheet, $filename, ['Pdf'], false, $mpdfCjkWriter);\n\n// Remove first two rows with field headers before exporting to CSV\n$helper->log('Removing first two heading rows for CSV export');\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->removeRow(1, 2);\n\n// Export to CSV (.csv)\n$helper->log('Write to CSV format');\n/** @var Csv $writer */\n$helper->write($spreadsheet, __FILE__, ['Csv']);\n\n// Export to CSV with BOM (.csv)\n$filename = str_replace('.php', '-bom.php', __FILE__);\n$helper->log('Write to CSV format (with BOM)');\n$helper->write(\n    $spreadsheet,\n    $filename,\n    ['Csv'],\n    false,\n    function (Csv $writer): void {\n        $writer->setUseBOM(true);\n    }\n);\n"
  },
  {
    "path": "samples/Basic2/27_Images_Html_Pdf.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Read from Xls (.xls) template\n$helper->log('Load Xlsx template file');\n$reader = IOFactory::createReader('Xls');\n$initialSpreadsheet = $reader->load(__DIR__ . '/../templates/27template.xls');\n\n$xlsxFile = File::temporaryFilename();\n$writer = new XlsxWriter($initialSpreadsheet);\n$helper->log('Save as Xlsx');\n$writer->save($xlsxFile);\n$initialSpreadsheet->disconnectWorksheets();\n$reader2 = new XlsxReader();\n$helper->log('Load Xlsx');\n$spreadsheet = $reader2->load($xlsxFile);\n\n$helper->log('Hide grid lines');\n$spreadsheet->getActiveSheet()->setShowGridLines(false);\n\n$helper->log('Set orientation to landscape');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n\n$className = Mpdf::class;\n$helper->log(\"Write to PDF format using {$className}, and to Html\");\nIOFactory::registerWriter('Pdf', $className);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Pdf', 'Html']);\nunlink($xlsxFile);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic2/27_Images_Xls.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Read from Xls (.xls) template\n$helper->log('Load Xls template file');\n$reader = IOFactory::createReader('Xls');\n$spreadsheet = $reader->load(__DIR__ . '/../templates/27template.xls');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/27_Images_Xlsx.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Read from Xlsx (.xls) template\n$helper->log('Load Xlsx template file');\n$reader = IOFactory::createReader('Xlsx');\n// Note that Xlsx converts bmp to png, so it needs to be added\n//   programmatically rather than in template.\n// Also note Xls converts both bmp and gif to png.\n$spreadsheet = $reader->load(__DIR__ . '/../templates/27template.xlsx');\n$sheet = $spreadsheet->getActiveSheet();\n$drawing = new Drawing();\n$drawing->setName('Test BMP');\n$drawing->setPath(__DIR__ . '/../images/bmp.bmp');\n$drawing->setCoordinates('G17');\n$drawing->setWorksheet($sheet);\n\n$sheet->getCell('G16')->setValue('BMP');\n$sheet->getStyle('G16')->getFont()->setName('Arial Black')->setBold(true);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic2/28_Iterator.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$sampleSpreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = $helper->getTemporaryFilename();\n$writer = new XlsxWriter($sampleSpreadsheet);\n$callStartTime = microtime(true);\n$writer->save($filename);\n$helper->logWrite($writer, $filename, $callStartTime);\n\n$callStartTime = microtime(true);\n$reader = new XlsxReader();\n$spreadsheet = $reader->load($filename);\n$helper->logRead('Xlsx', $filename, $callStartTime);\nunlink($filename);\n$helper->log('Iterate worksheets');\nforeach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n    $helper->log('Worksheet - ' . $worksheet->getTitle());\n\n    foreach ($worksheet->getRowIterator() as $row) {\n        $helper->log('    Row number - ' . $row->getRowIndex());\n\n        $cellIterator = $row->getCellIterator();\n        $cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set\n        foreach ($cellIterator as $cell) {\n            $helper->log('        Cell - ' . $cell->getCoordinate() . ' - ' . $cell->getCalculatedValueString());\n        }\n    }\n}\n"
  },
  {
    "path": "samples/Basic2/29_Advanced_value_binder.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Set timezone\n$helper->log('Set timezone');\ndate_default_timezone_set('UTC');\n\n// Set value binder\n$helper->log('Set value binder');\nCell::setValueBinder(new AdvancedValueBinder());\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Set default font\n$helper->log('Set default font');\n$spreadsheet->getDefaultStyle()->getFont()->setName('Arial');\n$spreadsheet->getDefaultStyle()->getFont()->setSize(10);\n\n// Set column widths\n$helper->log('Set column widths');\n$spreadsheet->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n$spreadsheet->getActiveSheet()->getColumnDimension('B')->setWidth(14);\n\n// Add some data, resembling some different data types\n$helper->log('Add some data');\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'String value:')\n    ->setCellValue('B1', 'Mark Baker');\n\n$spreadsheet->getActiveSheet()->setCellValue('A2', 'Numeric value #1:')\n    ->setCellValue('B2', 12345);\n\n$spreadsheet->getActiveSheet()->setCellValue('A3', 'Numeric value #2:')\n    ->setCellValue('B3', -12.345);\n\n$spreadsheet->getActiveSheet()->setCellValue('A4', 'Numeric value #3:')\n    ->setCellValue('B4', .12345);\n\n$spreadsheet->getActiveSheet()->setCellValue('A5', 'Numeric value #4:')\n    ->setCellValue('B5', '12345');\n\n$spreadsheet->getActiveSheet()->setCellValue('A6', 'Numeric value #5:')\n    ->setCellValue('B6', '1.2345');\n\n$spreadsheet->getActiveSheet()->setCellValue('A7', 'Numeric value #6:')\n    ->setCellValue('B7', '.12345');\n\n$spreadsheet->getActiveSheet()->setCellValue('A8', 'Numeric value #7:')\n    ->setCellValue('B8', '1.234e-5');\n\n$spreadsheet->getActiveSheet()->setCellValue('A9', 'Numeric value #8:')\n    ->setCellValue('B9', '-1.234e+5');\n\n$spreadsheet->getActiveSheet()->setCellValue('A10', 'Boolean value:')\n    ->setCellValue('B10', 'TRUE');\n\n$spreadsheet->getActiveSheet()->setCellValue('A11', 'Percentage value #1:')\n    ->setCellValue('B11', '10%');\n\n$spreadsheet->getActiveSheet()->setCellValue('A12', 'Percentage value #2:')\n    ->setCellValue('B12', '12.5%');\n\n$spreadsheet->getActiveSheet()->setCellValue('A13', 'Fraction value #1:')\n    ->setCellValue('B13', '-1/2');\n\n$spreadsheet->getActiveSheet()->setCellValue('A14', 'Fraction value #2:')\n    ->setCellValue('B14', '3 1/2');\n\n$spreadsheet->getActiveSheet()->setCellValue('A15', 'Fraction value #3:')\n    ->setCellValue('B15', '-12 3/4');\n\n$spreadsheet->getActiveSheet()->setCellValue('A16', 'Fraction value #4:')\n    ->setCellValue('B16', '13/4');\n\n$spreadsheet->getActiveSheet()->setCellValue('A17', 'Currency value #1:')\n    ->setCellValue('B17', '$12345');\n\n$spreadsheet->getActiveSheet()->setCellValue('A18', 'Currency value #2:')\n    ->setCellValue('B18', '$12345.67');\n\n$spreadsheet->getActiveSheet()->setCellValue('A19', 'Currency value #3:')\n    ->setCellValue('B19', '$12,345.67');\n\n$spreadsheet->getActiveSheet()->setCellValue('A20', 'Date value #1:')\n    ->setCellValue('B20', '21 December 1983');\n\n$spreadsheet->getActiveSheet()->setCellValue('A21', 'Date value #2:')\n    ->setCellValue('B21', '19-Dec-1960');\n\n$spreadsheet->getActiveSheet()->setCellValue('A22', 'Date value #3:')\n    ->setCellValue('B22', '07/12/1982');\n\n$spreadsheet->getActiveSheet()->setCellValue('A23', 'Date value #4:')\n    ->setCellValue('B23', '24-11-1950');\n\n$spreadsheet->getActiveSheet()->setCellValue('A24', 'Date value #5:')\n    ->setCellValue('B24', '17-Mar');\n\n$spreadsheet->getActiveSheet()->setCellValue('A25', 'Time value #1:')\n    ->setCellValue('B25', '01:30');\n\n$spreadsheet->getActiveSheet()->setCellValue('A26', 'Time value #2:')\n    ->setCellValue('B26', '01:30:15');\n\n$spreadsheet->getActiveSheet()->setCellValue('A27', 'Date/Time value:')\n    ->setCellValue('B27', '19-Dec-1960 01:30');\n\n$spreadsheet->getActiveSheet()->setCellValue('A28', 'Formula:')\n    ->setCellValue('B28', '=SUM(B2:B9)');\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Advanced value binder');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic3/30_Template.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Load from Xls template');\n$reader = IOFactory::createReader('Xls');\n$spreadsheet = $reader->load(__DIR__ . '/../templates/30template.xls');\n\n$helper->log('Add new data to the template');\n$data = [['title' => 'Excel for dummies',\n    'price' => 17.99,\n    'quantity' => 2,\n],\n    ['title' => 'PHP for dummies',\n        'price' => 15.99,\n        'quantity' => 1,\n    ],\n    ['title' => 'Inside OOP',\n        'price' => 12.95,\n        'quantity' => 1,\n    ],\n];\n\n$spreadsheet->getActiveSheet()->setCellValue('D1', Date::PHPToExcel(time()));\n\n$baseRow = 5;\nforeach ($data as $r => $dataRow) {\n    $row = $baseRow + $r;\n    $spreadsheet->getActiveSheet()->insertNewRowBefore($row, 1);\n\n    $spreadsheet->getActiveSheet()->setCellValue('A' . $row, $r + 1)\n        ->setCellValue('B' . $row, $dataRow['title'])\n        ->setCellValue('C' . $row, $dataRow['price'])\n        ->setCellValue('D' . $row, $dataRow['quantity'])\n        ->setCellValue('E' . $row, '=C' . $row . '*D' . $row);\n}\n$spreadsheet->getActiveSheet()->removeRow($baseRow - 1, 1);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic3/30_Templatebiff5.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Load from Xls template');\n$reader = IOFactory::createReader('Xls');\n$spreadsheet = $reader->load(__DIR__ . '/../templates/30templatebiff5.xls');\n\n$helper->log('Add new data to the template');\n$data = [['title' => 'Excel for dummies',\n    'price' => 17.99,\n    'quantity' => 2,\n],\n    ['title' => 'PHP for dummies',\n        'price' => 15.99,\n        'quantity' => 1,\n    ],\n    ['title' => 'Inside OOP',\n        'price' => 12.95,\n        'quantity' => 1,\n    ],\n];\n\n$spreadsheet->getActiveSheet()->setCellValue('D1', Date::PHPToExcel(time()));\n\n$baseRow = 5;\nforeach ($data as $r => $dataRow) {\n    $row = $baseRow + $r;\n    $spreadsheet->getActiveSheet()->insertNewRowBefore($row, 1);\n\n    $spreadsheet->getActiveSheet()->setCellValue('A' . $row, $r + 1)\n        ->setCellValue('B' . $row, $dataRow['title'])\n        ->setCellValue('C' . $row, $dataRow['price'])\n        ->setCellValue('D' . $row, $dataRow['quantity'])\n        ->setCellValue('E' . $row, '=C' . $row . '*D' . $row);\n}\n$spreadsheet->getActiveSheet()->removeRow($baseRow - 1, 1);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic3/31_Document_properties_write.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xlsx';\n$inputFileName = __DIR__ . '/../templates/31docproperties.xlsx';\n\n$spreadsheetReader = IOFactory::createReader($inputFileType);\n$callStartTime = microtime(true);\n$spreadsheet = $spreadsheetReader->load($inputFileName);\n$helper->logRead($inputFileType, $inputFileName, $callStartTime);\n\n$helper->log('Adjust properties');\n$spreadsheet->getProperties()->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test XLSX document, generated using PhpSpreadsheet')\n    ->setKeywords('office 2007 openxml php');\n\n// Save Excel 2007 file\n$filename = $helper->getFilename(__FILE__);\n$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n$callStartTime = microtime(true);\n$writer->save($filename);\n$helper->logWrite($writer, $filename, $callStartTime);\n\n$helper->logEndingNotes();\n\n// Reread File\n$helper->log('Reread Xlsx file');\n$spreadsheetRead = IOFactory::load($filename);\n\n// Set properties\n$helper->log('Get properties');\n\n$helper->log('Core Properties:');\n$helper->log('    Created by - ' . $spreadsheet->getProperties()->getCreator());\n$helper->log('    Created on - ' . date('d-M-Y' . $spreadsheet->getProperties()->getCreated()) . ' at ' . date('H:i:s' . $spreadsheet->getProperties()->getCreated()));\n$helper->log('    Last Modified by - ' . $spreadsheet->getProperties()->getLastModifiedBy());\n$helper->log('    Last Modified on - ' . date('d-M-Y' . $spreadsheet->getProperties()->getModified()) . ' at ' . date('H:i:s' . $spreadsheet->getProperties()->getModified()));\n$helper->log('    Title - ' . $spreadsheet->getProperties()->getTitle());\n$helper->log('    Subject - ' . $spreadsheet->getProperties()->getSubject());\n$helper->log('    Description - ' . $spreadsheet->getProperties()->getDescription());\n$helper->log('    Keywords: - ' . $spreadsheet->getProperties()->getKeywords());\n\n$helper->log('Extended (Application) Properties:');\n$helper->log('    Category - ' . $spreadsheet->getProperties()->getCategory());\n$helper->log('    Company - ' . $spreadsheet->getProperties()->getCompany());\n$helper->log('    Manager - ' . $spreadsheet->getProperties()->getManager());\n\n$helper->log('Custom Properties:');\n$customProperties = $spreadsheet->getProperties()->getCustomProperties();\nforeach ($customProperties as $customProperty) {\n    $propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty);\n    $propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty);\n    if ($propertyType == Properties::PROPERTY_TYPE_DATE) {\n        $formattedValue = is_numeric($propertyValue) ? date('d-M-Y H:i:s', (int) $propertyValue) : '*****INVALID*****';\n    } elseif ($propertyType == Properties::PROPERTY_TYPE_BOOLEAN) {\n        $formattedValue = $propertyValue ? 'TRUE' : 'FALSE';\n    } else {\n        $formattedValue = $propertyValue;\n    }\n    $helper->log('    ' . $customProperty . ' - (' . $propertyType . ') - ' . $formattedValue);\n}\n\n$helper->logEndingNotes();\n"
  },
  {
    "path": "samples/Basic3/31_Document_properties_write_xls.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/../templates/31docproperties.xls';\n\n$spreadsheetReader = IOFactory::createReader($inputFileType);\n$callStartTime = microtime(true);\n$spreadsheet = $spreadsheetReader->load($inputFileName);\n$helper->logRead($inputFileType, $inputFileName, $callStartTime);\n\n$helper->log('Adjust properties');\n$spreadsheet->getProperties()->setTitle('Office 95 XLS Test Document')\n    ->setSubject('Office 95 XLS Test Document')\n    ->setDescription('Test XLS document, generated using PhpSpreadsheet')\n    ->setKeywords('office 95 biff php');\n\n// Save Excel 95 file\n$filename = $helper->getFilename(__FILE__, 'xls');\n$writer = IOFactory::createWriter($spreadsheet, 'Xls');\n$callStartTime = microtime(true);\n$writer->save($filename);\n$helper->logWrite($writer, $filename, $callStartTime);\n\n$helper->logEndingNotes();\n\n// Reread File\n$helper->log('Reread Xls file');\n$spreadsheetRead = IOFactory::load($filename);\n\n// Set properties\n$helper->log('Get properties');\n\n$helper->log('Core Properties:');\n$helper->log('    Created by - ' . $spreadsheet->getProperties()->getCreator());\n$helper->log('    Created on - ' . date('d-M-Y' . $spreadsheet->getProperties()->getCreated()) . ' at ' . date('H:i:s' . $spreadsheet->getProperties()->getCreated()));\n$helper->log('    Last Modified by - ' . $spreadsheet->getProperties()->getLastModifiedBy());\n$helper->log('    Last Modified on - ' . date('d-M-Y' . $spreadsheet->getProperties()->getModified()) . ' at ' . date('H:i:s' . $spreadsheet->getProperties()->getModified()));\n$helper->log('    Title - ' . $spreadsheet->getProperties()->getTitle());\n$helper->log('    Subject - ' . $spreadsheet->getProperties()->getSubject());\n$helper->log('    Description - ' . $spreadsheet->getProperties()->getDescription());\n$helper->log('    Keywords: - ' . $spreadsheet->getProperties()->getKeywords());\n\n$helper->log('Extended (Application) Properties:');\n$helper->log('    Category - ' . $spreadsheet->getProperties()->getCategory());\n$helper->log('    Company - ' . $spreadsheet->getProperties()->getCompany());\n$helper->log('    Manager - ' . $spreadsheet->getProperties()->getManager());\n\n$helper->log('Custom Properties:');\n$customProperties = $spreadsheet->getProperties()->getCustomProperties();\nforeach ($customProperties as $customProperty) {\n    $propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty);\n    $propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty);\n    if ($propertyType == Properties::PROPERTY_TYPE_DATE) {\n        $formattedValue = is_numeric($propertyValue) ? date('d-M-Y H:i:s', (int) $propertyValue) : '*****INVALID*****';\n    } elseif ($propertyType == Properties::PROPERTY_TYPE_BOOLEAN) {\n        $formattedValue = $propertyValue ? 'TRUE' : 'FALSE';\n    } else {\n        $formattedValue = $propertyValue;\n    }\n    $helper->log('    ' . $customProperty . ' - (' . $propertyType . ') - ' . $formattedValue);\n}\n\n$helper->logEndingNotes();\n"
  },
  {
    "path": "samples/Basic3/37_Page_layout_view.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\SheetView;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('PHPOffice')\n    ->setLastModifiedBy('PHPOffice')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('Office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A1', 'Hello')\n    ->setCellValue('B2', 'world!');\n\n// Set the page layout view as page layout\n$spreadsheet->getActiveSheet()->getSheetView()->setView(SheetView::SHEETVIEW_PAGE_LAYOUT);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic3/38_Clone_worksheet.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A1', 'Hello')\n    ->setCellValue('B2', 'world!')\n    ->setCellValue('C1', 'Hello')\n    ->setCellValue('D2', 'world!');\n\n// Miscellaneous glyphs, UTF-8\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A4', 'Miscellaneous glyphs')\n    ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n$spreadsheet->getActiveSheet()->setCellValue('A8', \"Hello\\nWorld\");\n$spreadsheet->getActiveSheet()->getRowDimension(8)->setRowHeight(-1);\n$spreadsheet->getActiveSheet()->getStyle('A8')->getAlignment()->setWrapText(true);\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Simple');\n\n// Clone worksheet\n$helper->log('Clone worksheet');\n$clonedSheet = clone $spreadsheet->getActiveSheet();\n$clonedSheet\n    ->setCellValue('A1', 'Goodbye')\n    ->setCellValue('A2', 'cruel')\n    ->setCellValue('C1', 'Goodbye')\n    ->setCellValue('C2', 'cruel');\n\n// Rename cloned worksheet\n$helper->log('Rename cloned worksheet');\n$clonedSheet->setTitle('Simple Clone');\n$spreadsheet->addSheet($clonedSheet);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic3/39_Dropdown.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()\n    ->setCreator('PHPOffice')\n    ->setLastModifiedBy('PHPOffice')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('Office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n/** @return array<int, string> */\nfunction transpose(string $value): array\n{\n    return [$value];\n}\n\n// Add some data\n$continentColumn = 'D';\n$column = 'F';\n\n// Set data for dropdowns\n$continents = glob(__DIR__ . '/data/continents/*') ?: [];\nforeach ($continents as $key => $filename) {\n    $continent = pathinfo($filename, PATHINFO_FILENAME);\n    $helper->log(\"Loading $continent\");\n    $continent = str_replace(' ', '_', $continent);\n    $countries = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ?: [];\n    $countryCount = count($countries);\n\n    // Transpose $countries from a row to a column array\n    $countries = array_map(fn (mixed $value): array => [$value], $countries);\n    $spreadsheet->getActiveSheet()\n        ->fromArray($countries, null, $column . '1');\n    $spreadsheet->addNamedRange(\n        new NamedRange(\n            $continent,\n            $spreadsheet->getActiveSheet(),\n            '$' . $column . '$1:$' . $column . '$' . $countryCount\n        )\n    );\n    $spreadsheet->getActiveSheet()\n        ->getColumnDimension($column)\n        ->setVisible(false);\n\n    $spreadsheet->getActiveSheet()\n        ->setCellValue($continentColumn . ($key + 1), $continent);\n\n    StringHelper::stringIncrement($column);\n}\n\n// Hide the dropdown data\n$spreadsheet->getActiveSheet()\n    ->getColumnDimension($continentColumn)\n    ->setVisible(false);\n\n$spreadsheet->addNamedRange(\n    new NamedRange(\n        'Continents',\n        $spreadsheet->getActiveSheet(),\n        '$' . $continentColumn . '$1:$' . $continentColumn . '$' . count($continents)\n    )\n);\n\n// Set selection cells\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', 'Continent:');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B1', 'Select continent');\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B3', '=' . $column . 1);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B3', 'Select country');\n$spreadsheet->getActiveSheet()\n    ->getStyle('A1:A3')\n    ->getFont()->setBold(true);\n\n// Set linked validators\n$validation = $spreadsheet->getActiveSheet()\n    ->getCell('B1')\n    ->getDataValidation();\n$validation->setType(DataValidation::TYPE_LIST)\n    ->setErrorStyle(DataValidation::STYLE_INFORMATION)\n    ->setAllowBlank(false)\n    ->setShowInputMessage(true)\n    ->setShowErrorMessage(true)\n    ->setShowDropDown(true)\n    ->setErrorTitle('Input error')\n    ->setError('Continent is not in the list.')\n    ->setPromptTitle('Pick from the list')\n    ->setPrompt('Please pick a continent from the drop-down list.')\n    ->setFormula1('=Continents');\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A3', 'Country:');\n$spreadsheet->getActiveSheet()\n    ->getStyle('A3')\n    ->getFont()->setBold(true);\n\n$validation = $spreadsheet->getActiveSheet()\n    ->getCell('B3')\n    ->getDataValidation();\n$validation->setType(DataValidation::TYPE_LIST)\n    ->setErrorStyle(DataValidation::STYLE_INFORMATION)\n    ->setAllowBlank(false)\n    ->setShowInputMessage(true)\n    ->setShowErrorMessage(true)\n    ->setShowDropDown(true)\n    ->setErrorTitle('Input error')\n    ->setError('Country is not in the list.')\n    ->setPromptTitle('Pick from the list')\n    ->setPrompt('Please pick a country from the drop-down list.')\n    ->setFormula1('=INDIRECT($B$1)');\n\n$spreadsheet->getActiveSheet()->getColumnDimension('A')->setWidth(12);\n$spreadsheet->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n// Save\n$helper->log('Not writing to Xls - formulae with defined names not yet supported');\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/Basic3/data/continents/Africa.txt",
    "content": "Algeria\nAngola\nBenin\nBotswana\nBurkina\nBurundi\nCameroon\nCape Verde\nCentral African Republic\nChad\nComoros\nCongo\nCongo, Democratic Republic of\nDjibouti\nEgypt\nEquatorial Guinea\nEritrea\nEthiopia\nGabon\nGambia\nGhana\nGuinea\nGuinea-Bissau\nIvory Coast\nKenya\nLesotho\nLiberia\nLibya\nMadagascar\nMalawi\nMali\nMauritania\nMauritius\nMorocco\nMozambique\nNamibia\nNiger\nNigeria\nRwanda\nSao Tome and Principe \nSenegal\nSeychelles\nSierra Leone\nSomalia\nSouth Africa\nSouth Sudan\nSudan\nSwaziland\nTanzania\nTogo\nTunisia\nUganda\nZambia\nZimbabwe\n"
  },
  {
    "path": "samples/Basic3/data/continents/Asia.txt",
    "content": "Afghanistan\nBahrain\nBangladesh\nBhutan\nBrunei\nBurma (Myanmar)\nCambodia\nChina\nEast Timor\nIndia\nIndonesia\nIran\nIraq\nIsrael\nJapan\nJordan\nKazakhstan\nKorea, North\nKorea, South\nKuwait\nKyrgyzstan\nLaos\nLebanon\nMalaysia\nMaldives\nMongolia\nNepal\nOman\nPakistan\nPhilippines\nQatar\nRussian Federation\nSaudi Arabia\nSingapore\nSri Lanka\nSyria\nTajikistan\nThailand\nTurkey\nTurkmenistan\nUnited Arab Emirates\nUzbekistan\nVietnam\nYemen\n"
  },
  {
    "path": "samples/Basic3/data/continents/Europe.txt",
    "content": "Albania\nAndorra\nArmenia\nAustria\nAzerbaijan\nBelarus\nBelgium\nBosnia and Herzegovina\nBulgaria\nCroatia\nCyprus\nCzech Republic\nDenmark\nEstonia\nFinland\nFrance\nGeorgia\nGermany\nGreece\nHungary\nIceland\nIreland\nItaly\nLatvia\nLiechtenstein\nLithuania\nLuxembourg\nMacedonia\nMalta\nMoldova\nMonaco\nMontenegro\nNetherlands\nNorway\nPoland\nPortugal\nRomania\nSan Marino\nSerbia\nSlovakia\nSlovenia\nSpain\nSweden\nSwitzerland\nUkraine\nUnited Kingdom\nVatican City\n"
  },
  {
    "path": "samples/Basic3/data/continents/North America.txt",
    "content": "Antigua and Barbuda\nBahamas\nBarbados\nBelize\nCanada\nCosta Rica\nCuba\nDominica\nDominican Republic\nEl Salvador\nGrenada\nGuatemala\nHaiti\nHonduras\nJamaica\nMexico\nNicaragua\nPanama\nSaint Kitts and Nevis\nSaint Lucia\nSaint Vincent and the Grenadines\nTrinidad and Tobago\nUnited States\n"
  },
  {
    "path": "samples/Basic3/data/continents/Oceania.txt",
    "content": "Australia\nFiji\nKiribati\nMarshall Islands\nMicronesia\nNauru\nNew Zealand\nPalau\nPapua New Guinea\nSamoa\nSolomon Islands\nTonga\nTuvalu\nVanuatu\n"
  },
  {
    "path": "samples/Basic3/data/continents/South America.txt",
    "content": "Argentina\nBolivia\nBrazil\nChile\nColombia\nEcuador\nGuyana\nParaguay\nPeru\nSuriname\nUruguay\nVenezuela\n"
  },
  {
    "path": "samples/Basic4/40_Duplicate_style.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$helper->log('Create styles array');\n$styles = [];\nfor ($i = 0; $i < 10; ++$i) {\n    $style = new Style();\n    $style->getFont()->setSize($i + 4);\n    $styles[] = $style;\n}\n\n$helper->log('Add data (begin)');\n$t = microtime(true);\nfor ($col = 1; $col <= 50; ++$col) {\n    for ($row = 0; $row < 100; ++$row) {\n        $str = ($row + $col);\n        $style = $styles[$row % 10];\n        $coord = Coordinate::stringFromColumnIndex($col) . ($row + 1);\n        $worksheet->setCellValue($coord, $str);\n        $worksheet->duplicateStyle($style, $coord);\n    }\n}\n$d = microtime(true) - $t;\n$helper->log('Add data (end) . time: ' . (string) round($d, 2) . ' s');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic4/41_Password.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n// Set password against the spreadsheet file\n$spreadsheet->getSecurity()->setLockWindows(true);\n$spreadsheet->getSecurity()->setLockStructure(true);\n$spreadsheet->getSecurity()->setWorkbookPassword('secret');\n\n// Save\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic4/42_RichText.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Html as HtmlHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Add some data\n$helper->log('Add some data');\n\n$html1 = '<font color=\"#0000ff\">\n<h1 align=\"center\">My very first example of rich text<br />generated from html markup</h1>\n<p>\n<font size=\"14\" COLOR=\"rgb(0,255,128)\">\n<b>This block</b> contains an <i>italicized</i> word;\nwhile this block uses an <u>underline</u>.\n</font>\n</p>\n<p align=\"right\"><font size=\"9\" color=\"red\" face=\"Times New Roman, serif\">\nI want to eat <ins><del>healthy food</del> <strong>pizza</strong></ins>.\n</font>\n';\n\n$html2 = '<p>\n<font color=\"#ff0000\">\n    100&deg;C is a hot temperature\n</font>\n<br>\n<font color=\"#0080ff\">\n    10&deg;F is cold\n</font>\n</p>';\n\n$html3 = '2<sup>3</sup> equals 8';\n\n$html4 = 'H<sub>2</sub>SO<sub>4</sub> is the chemical formula for Sulphuric acid';\n\n$html5 = '<strong>bold</strong>, <em>italic</em>, <strong><em>bold+italic</em></strong>';\n\n$wizard = new HtmlHelper();\n$richText = $wizard->toRichTextObject($html1);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', $richText);\n\n$spreadsheet->getActiveSheet()\n    ->getColumnDimension('A')\n    ->setWidth(48);\n$spreadsheet->getActiveSheet()\n    ->getRowDimension(1)\n    ->setRowHeight(-1);\n$spreadsheet->getActiveSheet()->getStyle('A1')\n    ->getAlignment()\n    ->setWrapText(true);\n\n$richText = $wizard->toRichTextObject($html2);\n\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A2', $richText);\n\n$spreadsheet->getActiveSheet()\n    ->getRowDimension(1)\n    ->setRowHeight(-1);\n$spreadsheet->getActiveSheet()\n    ->getStyle('A2')\n    ->getAlignment()\n    ->setWrapText(true);\n\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A3', $wizard->toRichTextObject($html3));\n\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A4', $wizard->toRichTextObject($html4));\n\n$spreadsheet->setActiveSheetIndex(0)\n    ->setCellValue('A5', $wizard->toRichTextObject($html5));\n\n// Rename worksheet\n$helper->log('Rename worksheet');\n$spreadsheet->getActiveSheet()\n    ->setTitle('Rich Text Examples');\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/Basic4/42b_RichText.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n\n$rtf = new RichText();\n$rtf->createText('~Cell Style~');\n$rtf->createTextRun('~RTF Style~')->getFont()?->setItalic(true);\n$rtf->createText('~No Style~');\n\n$sheet->getCell('A1')->setValue($rtf);\n$sheet->getStyle('A1')->getFont()->setBold(true);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Xls', 'Html']);\n"
  },
  {
    "path": "samples/Basic4/43_Merge_workbooks.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Load MergeBook1 from Xlsx file');\n$filename1 = __DIR__ . '/../templates/43mergeBook1.xlsx';\n$callStartTime = microtime(true);\n$spreadsheet1 = IOFactory::load($filename1);\n$helper->logRead('Xlsx', $filename1, $callStartTime);\n\n$helper->log('Load MergeBook2 from Xlsx file');\n$filename2 = __DIR__ . '/../templates/43mergeBook2.xlsx';\n$callStartTime = microtime(true);\n$spreadsheet2 = IOFactory::load($filename2);\n$helper->logRead('Xlsx', $filename2, $callStartTime);\n\nforeach ($spreadsheet2->getSheetNames() as $sheetName) {\n    $sheet = $spreadsheet2->getSheetByName($sheetName);\n    if ($sheet === null) {\n        continue;\n    }\n\n    $sheet->setTitle($sheet->getTitle() . ' copied');\n    $spreadsheet1->addExternalSheet($sheet);\n}\n\n// Save\n$helper->write($spreadsheet1, __FILE__);\n"
  },
  {
    "path": "samples/Basic4/44_Worksheet_info.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as Reader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as Writer;\n\nrequire __DIR__ . '/../Header.php';\n\n// Create temporary file that will be read\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$sampleSpreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = $helper->getTemporaryFilename();\n$writer = new Writer($sampleSpreadsheet);\n$writer->save($filename);\n\n$inputFileType = IOFactory::identify($filename);\n$reader = new Reader();\n$sheetList = $reader->listWorksheetNames($filename);\n$sheetInfo = $reader->listWorksheetInfo($filename);\n\n$helper->log('File Type:');\nvar_dump($inputFileType);\n\n$helper->log('Worksheet Names:');\nvar_dump($sheetList);\n\n$helper->log('Worksheet Names:');\nvar_dump($sheetInfo);\n\nunlink($filename);\n"
  },
  {
    "path": "samples/Basic4/45_Quadratic_equation_solver.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nrequire __DIR__ . '/../Header.php';\n/** @var Sample $helper */\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n$postA = htmlentities(StringHelper::convertToString($_POST['A'] ?? ''));\n$postB = htmlentities(StringHelper::convertToString($_POST['B'] ?? ''));\n$postC = htmlentities(StringHelper::convertToString($_POST['C'] ?? ''));\n?>\n<form action=\"45_Quadratic_equation_solver.php\" method=\"POST\">\n    Enter the coefficients for Ax<sup>2</sup> + Bx + C = 0\n    <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n        <tr>\n            <td>\n                <b>A&nbsp;</b>\n            </td>\n            <td>\n                <input name=\"A\" type=\"text\" size=\"8\" value=\"<?php echo $postA; ?>\">\n            </td>\n        </tr>\n        <tr>\n            <td>\n                <b>B&nbsp;</b>\n            </td>\n            <td>\n                <input name=\"B\" type=\"text\" size=\"8\" value=\"<?php echo $postB; ?>\">\n            </td>\n        </tr>\n        <tr>\n            <td><b>C&nbsp;</b>\n            </td>\n            <td>\n                <input name=\"C\" type=\"text\" size=\"8\" value=\"<?php echo $postC; ?>\">\n            </td>\n        </tr>\n    </table>\n    <input name=\"submit\" type=\"submit\" value=\"calculate\"><br />\n    If A=0, the equation is not quadratic.\n</form>\n\n<?php\n/**     If the user has submitted the form, then we need to execute a calculation * */\nif (isset($_POST['submit'])) {\n    if (!is_numeric($postA) || !is_numeric($postB) || !is_numeric($postC)) { // validate input\n        $helper->log('Non-numeric input');\n    } elseif ($postA == 0) {\n        $helper->log('The equation is not quadratic');\n    } else {\n        // Calculate and Display the results\n        $helper->log('<hr /><b>Roots:</b><br />');\n\n        $discriminantFormula = '=POWER(' . $postB . ',2) - (4 * ' . $postA . ' * ' . $postC . ')';\n        $discriminant = Calculation::getInstance()->calculateFormula($discriminantFormula);\n        $discriminant = StringHelper::convertToString($discriminant);\n\n        $r1Formula = '=IMDIV(IMSUM(-' . $postB . ',IMSQRT(' . $discriminant . ')),2 * ' . $postA . ')';\n        $r2Formula = '=IF(' . $discriminant . '=0,\"Only one root\",IMDIV(IMSUB(-' . $postB . ',IMSQRT(' . $discriminant . ')),2 * ' . $postA . '))';\n\n        /** @var string */\n        $output = Calculation::getInstance()->calculateFormula($r1Formula);\n        $helper->log(\"$output\");\n        /** @var string */\n        $output = Calculation::getInstance()->calculateFormula($r2Formula);\n        $helper->log(\"$output\");\n        $callEndTime = microtime(true);\n        $helper->logEndingNotes();\n    }\n}\n"
  },
  {
    "path": "samples/Basic4/46_ReadHtml.php",
    "content": "<?php\n\n// Turn off error reporting\nerror_reporting(0);\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$html = __DIR__ . '/../templates/46readHtml.html';\n$callStartTime = microtime(true);\n\n$objReader = IOFactory::createReader('Html');\n$objPHPExcel = $objReader->load($html);\n\n$helper->logRead('Html', $html, $callStartTime);\n\n// Save\n$helper->write($objPHPExcel, __FILE__);\n"
  },
  {
    "path": "samples/Basic4/47_xlsfill.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\n$helper->log('Read spreadsheet');\n$reader = new Xls();\n$spreadsheet = $reader->load(__DIR__ . '/../templates/47_xlsfill.xls');\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xls']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic4/47_xlsxfill.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\n$helper->log('Read spreadsheet');\n$reader = new Xlsx();\n$spreadsheet = $reader->load(__DIR__ . '/../templates/47_xlsxfill.xlsx');\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic4/48_Image_move_size_with_cells.php",
    "content": "<?php\n\n// Create new Spreadsheet object\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n$sheet->getCell('A1')->setValue('twocell');\n$sheet->getCell('A2')->setValue('twocell');\n$sheet->getCell('A3')->setValue('onecell');\n$sheet->getCell('A6')->setValue('absolute');\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet two-cell anchor not resized');\n$drawing = new Drawing();\n$drawing->setName('PhpSpreadsheet');\n$drawing->setDescription('PhpSpreadsheet');\n$drawing->setPath(__DIR__ . '/../images/PhpSpreadsheet_logo.png');\n// anchor type will be two-cell because Coordinates2 is set\n//$drawing->setAnchorType(Drawing::ANCHORTYPE_TWOCELL);\n$drawing->setCoordinates('B1');\n$drawing->setCoordinates2('B1');\n$drawing->setOffsetX2($drawing->getImageWidth());\n$drawing->setOffsetY2($drawing->getImageHeight());\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet two-cell anchor resized');\n$drawing2 = new Drawing();\n$drawing2->setName('PhpSpreadsheet');\n$drawing2->setDescription('PhpSpreadsheet');\n$drawing2->setPath(__DIR__ . '/../images/PhpSpreadsheet_logo.png');\n// anchor type will be two-cell because Coordinates2 is set\n//$drawing->setAnchorType(Drawing::ANCHORTYPE_TWOCELL);\n$drawing2->setCoordinates('C2');\n$drawing2->setCoordinates2('C2');\n$drawing2->setOffsetX2($drawing->getImageWidth());\n$drawing2->setOffsetY2($drawing->getImageHeight());\n$drawing2->setWorksheet($spreadsheet->getActiveSheet());\n\n$spreadsheet->getActiveSheet()->getColumnDimension('C')->setWidth($drawing->getImageWidth(), Dimension::UOM_PIXELS);\n$spreadsheet->getActiveSheet()->getRowDimension(2)->setRowHeight($drawing->getImageHeight(), Dimension::UOM_PIXELS);\n\n// Add a drawing to the worksheet one cell anchor\n$helper->log('Add a drawing to the worksheet one-cell anchor');\n$drawing3 = new Drawing();\n$drawing3->setName('PhpSpreadsheet');\n$drawing3->setDescription('PhpSpreadsheet');\n$drawing3->setPath(__DIR__ . '/../images/PhpSpreadsheet_logo.png');\n// anchor type will be one-cell because Coordinates2 is not set\n//$drawing->setAnchorType(Drawing::ANCHORTYPE_ONECELL);\n$drawing3->setCoordinates('D3');\n$drawing3->setWorksheet($spreadsheet->getActiveSheet());\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet two-cell anchor resized absolute');\n$drawing4 = new Drawing();\n$drawing4->setName('PhpSpreadsheet');\n$drawing4->setDescription('PhpSpreadsheet');\n$drawing4->setPath(__DIR__ . '/../images/PhpSpreadsheet_logo.png');\n// anchor type will be two-cell because Coordinates2 is set\n//$drawing->setAnchorType(Drawing::ANCHORTYPE_TWOCELL);\n$drawing4->setCoordinates('C6');\n$drawing4->setCoordinates2('C6');\n$drawing4->setOffsetX2($drawing->getImageWidth());\n$drawing4->setOffsetY2($drawing->getImageHeight());\n$drawing4->setWorksheet($spreadsheet->getActiveSheet());\n$drawing4->setEditAs(Drawing::EDIT_AS_ABSOLUTE);\n\n//$spreadsheet->getActiveSheet()->getColumnDimension('C')->setWidth($drawing->getImageWidth(), Dimension::UOM_PIXELS);\n$spreadsheet->getActiveSheet()->getRowDimension(6)->setRowHeight($drawing->getImageHeight(), Dimension::UOM_PIXELS);\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/Basic4/49_alignment.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n$spreadsheet->getProperties()->setTitle('Alignment');\n$sheet = $spreadsheet->getActiveSheet();\n$hi = 'Hi There';\n$ju = 'This is a longer than normal sentence';\n$sheet->fromArray([\n    ['', 'default', 'bottom', 'top', 'center', 'justify', 'distributed'],\n    ['default', $hi, $hi, $hi, $hi, $hi, $hi],\n    ['left', $hi, $hi, $hi, $hi, $hi, $hi],\n    ['right', $hi, $hi, $hi, $hi, $hi, $hi],\n    ['center', $hi, $hi, $hi, $hi, $hi, $hi],\n    ['justify', $ju, $ju, $ju, $ju, $ju, $ju],\n    ['distributed', $ju, $ju, $ju, $ju, $ju, $ju],\n]);\n$sheet->getColumnDimension('B')->setWidth(20);\n$sheet->getColumnDimension('C')->setWidth(20);\n$sheet->getColumnDimension('D')->setWidth(20);\n$sheet->getColumnDimension('E')->setWidth(20);\n$sheet->getColumnDimension('F')->setWidth(20);\n$sheet->getColumnDimension('G')->setWidth(20);\n$sheet->getRowDimension(2)->setRowHeight(30);\n$sheet->getRowDimension(3)->setRowHeight(30);\n$sheet->getRowDimension(4)->setRowHeight(30);\n$sheet->getRowDimension(5)->setRowHeight(30);\n$sheet->getRowDimension(6)->setRowHeight(40);\n$sheet->getRowDimension(7)->setRowHeight(40);\n$minRow = 2;\n$maxRow = 7;\n$minCol = 'B';\n$maxCol = 'g';\n$sheet->getStyle(\"C$minRow:C$maxRow\")\n    ->getAlignment()\n    ->setVertical(Alignment::VERTICAL_BOTTOM);\n$sheet->getStyle(\"D$minRow:D$maxRow\")\n    ->getAlignment()\n    ->setVertical(Alignment::VERTICAL_TOP);\n$sheet->getStyle(\"E$minRow:E$maxRow\")\n    ->getAlignment()\n    ->setVertical(Alignment::VERTICAL_CENTER);\n$sheet->getStyle(\"F$minRow:F$maxRow\")\n    ->getAlignment()\n    ->setVertical(Alignment::VERTICAL_JUSTIFY);\n$sheet->getStyle(\"G$minRow:G$maxRow\")\n    ->getAlignment()\n    ->setVertical(Alignment::VERTICAL_DISTRIBUTED);\n$sheet->getStyle(\"{$minCol}3:{$maxCol}3\")\n    ->getAlignment()\n    ->setHorizontal(Alignment::HORIZONTAL_LEFT);\n$sheet->getStyle(\"{$minCol}4:{$maxCol}4\")\n    ->getAlignment()\n    ->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$sheet->getStyle(\"{$minCol}5:{$maxCol}5\")\n    ->getAlignment()\n    ->setHorizontal(Alignment::HORIZONTAL_CENTER);\n$sheet->getStyle(\"{$minCol}6:{$maxCol}6\")\n    ->getAlignment()\n    ->setHorizontal(Alignment::HORIZONTAL_JUSTIFY);\n$sheet->getStyle(\"{$minCol}7:{$maxCol}7\")\n    ->getAlignment()\n    ->setHorizontal(Alignment::HORIZONTAL_DISTRIBUTED);\n\n$sheet->getCell('A9')->setValue('Center Continuous A9-C9');\n$sheet->getStyle('A9:C9')\n    ->getAlignment()\n    ->setHorizontal(Alignment::HORIZONTAL_CENTER_CONTINUOUS);\n$sheet->getCell('A10')->setValue('Fill');\n$sheet->getStyle('A10')\n    ->getAlignment()\n    ->setHorizontal(Alignment::HORIZONTAL_FILL);\n$sheet->setSelectedCells('A1');\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Html', 'Xls']);\n"
  },
  {
    "path": "samples/Basic5/50_xlsverticalbreak.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\n$helper->log('Read spreadsheet');\n$reader = new Xls();\n$spreadsheet = $reader->load(__DIR__ . '/../templates/50_xlsverticalbreak.xls');\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xls']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic5/51_ProtectedSort.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\TextElement;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\n$spreadsheet = new Spreadsheet();\n\n$helper->log('First sheet - protected, sorts not allowed');\n$sheet = $spreadsheet->getActiveSheet();\n$sheet->setTitle('sorttrue');\n$sheet->getCell('A1')->setValue(10);\n$sheet->getCell('A2')->setValue(5);\n$sheet->getCell('B1')->setValue(15);\n$protection = $sheet->getProtection();\n$protection->setPassword('testpassword');\n$protection->setSheet(true);\n$protection->setInsertRows(true);\n$protection->setFormatCells(true);\n$protection->setObjects(true);\n$protection->setAutoFilter(false);\n$protection->setSort(true);\n$comment = $sheet->getComment('A1');\n$text = new RichText();\n$text->addText(new TextElement('Sort options should be grayed out. Sheet password to remove protections is testpassword for all sheets.'));\n$comment->setText($text)->setHeight('120pt')->setWidth('120pt');\n\n$helper->log('Second sheet - protected, sorts allowed, but no permitted range defined');\n$sheet = $spreadsheet->createSheet();\n$sheet->setTitle('sortfalse');\n$sheet->getCell('A1')->setValue(10);\n$sheet->getCell('A2')->setValue(5);\n$sheet->getCell('B1')->setValue(15);\n$protection = $sheet->getProtection();\n$protection->setPassword('testpassword');\n$protection->setSheet(true);\n$protection->setInsertRows(true);\n$protection->setFormatCells(true);\n$protection->setObjects(true);\n$protection->setAutoFilter(false);\n$protection->setSort(false);\n$comment = $sheet->getComment('A1');\n$text = new RichText();\n$text->addText(new TextElement('Sort options not grayed out, but no permissible sort range.'));\n$comment->setText($text)->setHeight('120pt')->setWidth('120pt');\n\n$helper->log('Third sheet - protected, sorts allowed, but only on permitted range A:A, no range password needed');\n$sheet = $spreadsheet->createSheet();\n$sheet->setTitle('sortfalsenocolpw');\n$sheet->getCell('A1')->setValue(10);\n$sheet->getCell('A2')->setValue(5);\n$sheet->getCell('C1')->setValue(15);\n$protection = $sheet->getProtection();\n$protection->setPassword('testpassword');\n$protection->setSheet(true);\n$protection->setInsertRows(true);\n$protection->setFormatCells(true);\n$protection->setObjects(true);\n$protection->setAutoFilter(false);\n$protection->setSort(false);\n$sheet->protectCells('A:A');\n$comment = $sheet->getComment('A1');\n$text = new RichText();\n$text->addText(new TextElement('Column A may be sorted without a password. No sort for any other column.'));\n$comment->setText($text)->setHeight('120pt')->setWidth('120pt');\n\n$helper->log('Fourth sheet - protected, sorts allowed, but only on permitted range A:A, and range password needed');\n$sheet = $spreadsheet->createSheet();\n$sheet->setTitle('sortfalsecolpw');\n$sheet->getCell('A1')->setValue(10);\n$sheet->getCell('A2')->setValue(5);\n$sheet->getCell('C1')->setValue(15);\n$protection = $sheet->getProtection();\n$protection->setPassword('testpassword');\n$protection->setSheet(true);\n$protection->setInsertRows(true);\n$protection->setFormatCells(true);\n$protection->setObjects(true);\n$protection->setAutoFilter(false);\n$protection->setSort(false);\n$sheet->protectCells('A:A', 'sortpw', false, 'sortrange');\n$comment = $sheet->getComment('A1');\n$text = new RichText();\n$text->addText(new TextElement('Column A may be sorted with password sortpw. No sort for any other column.'));\n$comment->setText($text)->setHeight('120pt')->setWidth('120pt');\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xls', 'Xlsx']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic5/52_Currency.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Accounting;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\CurrencyBase;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\CurrencyNegative;\n\n$spreadsheet = new Spreadsheet();\n\n$helper->log('First sheet - Accounting Wizard');\n$sheet = $spreadsheet->getActiveSheet();\n$sheet->setTitle('Accounting');\n$sheet->getCell('A1')->setValue('Currency');\n$sheet->getCell('B1')->setValue('Decimals');\n$sheet->getCell('C1')->setValue('ThouSep');\n$sheet->getCell('D1')->setValue('Lead');\n$sheet->getCell('E1')->setValue('Spacing');\n$sheet->getCell('F1')->setValue('Neg');\n$sheet->getCell('G1')->setValue('Pos');\n$sheet->getCell('H1')->setValue('Zero');\n$sheet->getCell('I1')->setValue('Neg');\n$sheet->getCell('J1')->setValue('Text');\n$sheet->getCell('L1')->setValue('ActWiz$');\n$sheet->getCell('M1')->setValue('ActWiz€Trl');\n$sheet->freezePane('A2');\n$sheet->getComment('E1')->getText()->createText('ignored, always true for Accounting');\n$sheet->getComment('F1')->getText()->createText('ignored, always () for Accounting');\n\n$sheet->getCell('A2')->setValue('AcctUSD');\n$sheet->getCell('G2')->setValue(1234.56);\n$sheet->getCell('H2')->setValue(0);\n$sheet->getCell('I2')->setValue(-1234.56);\n$sheet->getCell('J2')->setValue('text');\n$sheet->getStyle('G2:J2')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_ACCOUNTING_USD);\n\n$sheet->getCell('A3')->setValue('AcctEur');\n$sheet->getCell('G3')->setValue(1234.56);\n$sheet->getCell('H3')->setValue(0);\n$sheet->getCell('I3')->setValue(-1234.56);\n$sheet->getCell('J3')->setValue('Text');\n$sheet->getStyle('G3:J3')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_ACCOUNTING_EUR);\n\n$sheet->getCell('A4')->setValue('AcctWiz￥');\n$sheet->getCell('E4')->setValue(true);\n$sheet->getCell('G4')->setValue(1234.56);\n$sheet->getCell('H4')->setValue(0);\n$sheet->getCell('I4')->setValue(-1234.56);\n$sheet->getCell('J4')->setValue('Text');\n$sheet->getStyle('G4:J4')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Accounting('￥', currencySymbolSpacing: true))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A5')->setValue('StalePR￥');\n$sheet->getCell('G5')->setValue(1234.56);\n$sheet->getCell('H5')->setValue(0);\n$sheet->getCell('I5')->setValue(-1234.56);\n$sheet->getCell('J5')->setValue('Text');\n$sheet->getStyle('G5:J5')->getNumberFormat()->setFormatCode('_(\"￥\"* #,##0.00_);_(\"￥\"* -#,##0.00_);_(\"￥\"* \"-\"??_);_(@_)');\n\n$sheet->getCell('A6')->setValue('AcctWiz￥');\n$sheet->getCell('E6')->setValue(true);\n$sheet->getCell('F6')->setValue(CurrencyNegative::minus->name);\n$sheet->getCell('G6')->setValue(1234.56);\n$sheet->getCell('H6')->setValue(0);\n$sheet->getCell('I6')->setValue(-1234.56);\n$sheet->getCell('J6')->setValue('Text');\n$sheet->getStyle('G6:J6')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Accounting('￥', currencySymbolSpacing: true, negative: CurrencyNegative::minus))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A7')->setValue('AcctWiz￥');\n$sheet->getCell('E7')->setValue(false);\n$sheet->getCell('F7')->setValue(CurrencyNegative::minus->name);\n$sheet->getCell('G7')->setValue(1234.56);\n$sheet->getCell('H7')->setValue(0);\n$sheet->getCell('I7')->setValue(-1234.56);\n$sheet->getCell('J7')->setValue('Text');\n$sheet->getStyle('G7:J7')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Accounting('￥', currencySymbolSpacing: false, negative: CurrencyNegative::minus))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A8')->setValue('AcctWiz￥');\n$sheet->getCell('E8')->setValue(false);\n$sheet->getCell('F8')->setValue(CurrencyNegative::parentheses->name);\n$sheet->getCell('G8')->setValue(1234.56);\n$sheet->getCell('H8')->setValue(0);\n$sheet->getCell('I8')->setValue(-1234.56);\n$sheet->getCell('J8')->setValue('Text');\n$sheet->getStyle('G8:J8')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Accounting('￥', currencySymbolSpacing: false, negative: CurrencyNegative::parentheses))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A9')->setValue('AcctW HUF');\n$sheet->getCell('E9')->setValue(true);\n$sheet->getCell('G9')->setValue(1234.56);\n$sheet->getCell('H9')->setValue(0);\n$sheet->getCell('I9')->setValue(-1234.56);\n$sheet->getCell('J9')->setValue('Text');\n$sheet->getStyle('G9:J9')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Accounting('HUF', currencySymbolSpacing: true))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A10')->setValue('AcctW HUF');\n$sheet->getCell('E10')->setValue(true);\n$sheet->getCell('F10')->setValue(CurrencyNegative::redParentheses->name);\n$sheet->getStyle('F10')->getFont()->getColor()->setRgb('FF0000');\n$sheet->getCell('G10')->setValue(1234.56);\n$sheet->getCell('H10')->setValue(0);\n$sheet->getCell('I10')->setValue(-1234.56);\n$sheet->getCell('J10')->setValue('Text');\n$sheet->getStyle('G10:J10')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Accounting('HUF', currencySymbolSpacing: true, negative: CurrencyNegative::redParentheses))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A11')->setValue('AcctW Kazakh');\n$sheet->getCell('D11')->setValue(false);\n$sheet->getCell('G11')->setValue(1234.56);\n$sheet->getCell('H11')->setValue(0);\n$sheet->getCell('I11')->setValue(-1234.56);\n$sheet->getCell('J11')->setValue('Text');\n$sheet->getStyle('G11:J11')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Accounting('₸', currencySymbolPosition: Accounting::TRAILING_SYMBOL))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A12')->setValue('AcctW $');\n$sheet->getCell('B12')->setValue(3);\n$sheet->getCell('C12')->setValue(false);\n$sheet->getCell('D12')->setValue(false);\n$sheet->getCell('F12')->setValue(CurrencyNegative::redMinus->name);\n$sheet->getStyle('F12')->getFont()->getColor()->setRgb('FF0000');\n$sheet->getCell('G12')->setValue(1234.56);\n$sheet->getCell('H12')->setValue(0);\n$sheet->getCell('I12')->setValue(-1234.56);\n$sheet->getCell('J12')->setValue('Text');\n$format = new Accounting(\n    '$',\n    decimals: 3,\n    thousandsSeparator: false,\n    currencySymbolPosition: Accounting::TRAILING_SYMBOL,\n    negative: CurrencyNegative::redMinus\n);\n\n$sheet->getStyle('G12:J12')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => $format->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('L2')->setValue(1234.56);\n$sheet->getCell('L3')->setValue(0);\n$sheet->getCell('L4')->setValue(-1234.56);\n$format = new Accounting('$');\n$sheet->getStyle('L2:L4')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => $format->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('M2')->setValue(1234.56);\n$sheet->getCell('M3')->setValue(0);\n$sheet->getCell('M4')->setValue(-1234.56);\n$format = new Accounting('€', currencySymbolPosition: Accounting::TRAILING_SYMBOL);\n$sheet->getStyle('M2:M4')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => $format->format(),\n        ],\n    ]\n);\n\n$sheet->getColumnDimension('A')->setAutoSize(true);\n$sheet->getColumnDimension('F')->setAutoSize(true);\n$sheet->getColumnDimension('G')->setAutoSize(true);\n$sheet->getColumnDimension('I')->setAutoSize(true);\n$sheet->getColumnDimension('L')->setAutoSize(true);\n$sheet->getColumnDimension('M')->setAutoSize(true);\n$sheet->setSelectedCells('J1');\n\n// second sheet\n\n$helper->log('Second sheet - Currency Wizard');\n$sheet = $spreadsheet->createSheet();\n$sheet->setTitle('Currency');\n$sheet->getCell('A1')->setValue('Currency');\n$sheet->getCell('B1')->setValue('Decimals');\n$sheet->getCell('C1')->setValue('ThouSep');\n$sheet->getCell('D1')->setValue('Lead');\n$sheet->getCell('E1')->setValue('Spacing');\n$sheet->getCell('F1')->setValue('Negative');\n$sheet->getCell('G1')->setValue('Pos');\n$sheet->getCell('H1')->setValue('Zero');\n$sheet->getCell('I1')->setValue('Neg');\n$sheet->getCell('J1')->setValue('Text');\n$sheet->freezePane('A2');\n$sheet->getComment('E1')->getText()->createText('ignored, always false for Currency');\n\n$sheet->getCell('A2')->setValue('CurrUSD');\n$sheet->getCell('G2')->setValue(1234.56);\n$sheet->getCell('H2')->setValue(0);\n$sheet->getCell('I2')->setValue(-1234.56);\n$sheet->getCell('J2')->setValue('text');\n$sheet->getStyle('G2:J2')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD);\n\n$sheet->getCell('A3')->setValue('CurrEur');\n$sheet->getCell('G3')->setValue(1234.56);\n$sheet->getCell('H3')->setValue(0);\n$sheet->getCell('I3')->setValue(-1234.56);\n$sheet->getCell('J3')->setValue('Text');\n$sheet->getStyle('G3:J3')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR);\n\n$sheet->getCell('A4')->setValue('CurrWiz￥');\n$sheet->getCell('E4')->setValue(true);\n$sheet->getCell('G4')->setValue(1234.56);\n$sheet->getCell('H4')->setValue(0);\n$sheet->getCell('I4')->setValue(-1234.56);\n$sheet->getCell('J4')->setValue('Text');\n$sheet->getStyle('G4:J4')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Currency('￥', currencySymbolSpacing: true))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A5')->setValue('StalePR￥');\n$sheet->getCell('G5')->setValue(1234.56);\n$sheet->getCell('H5')->setValue(0);\n$sheet->getCell('I5')->setValue(-1234.56);\n$sheet->getCell('J5')->setValue('Text');\n$sheet->getStyle('G5:J5')->getNumberFormat()->setFormatCode('￥ #,##0');\n\n$sheet->getCell('A6')->setValue('CurrWiz￥');\n$sheet->getCell('E6')->setValue(true);\n$sheet->getCell('F6')->setValue(CurrencyNegative::minus->name);\n$sheet->getCell('G6')->setValue(1234.56);\n$sheet->getCell('H6')->setValue(0);\n$sheet->getCell('I6')->setValue(-1234.56);\n$sheet->getCell('J6')->setValue('Text');\n$sheet->getStyle('G6:J6')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Currency('￥', currencySymbolSpacing: true, negative: CurrencyNegative::minus))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A7')->setValue('CurrWiz￥');\n$sheet->getCell('E7')->setValue(false);\n$sheet->getCell('F7')->setValue(CurrencyNegative::minus->name);\n$sheet->getCell('G7')->setValue(1234.56);\n$sheet->getCell('H7')->setValue(0);\n$sheet->getCell('I7')->setValue(-1234.56);\n$sheet->getCell('J7')->setValue('Text');\n$sheet->getStyle('G7:J7')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Currency('￥', currencySymbolSpacing: false, negative: CurrencyNegative::minus))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A8')->setValue('CurrWiz￥');\n$sheet->getCell('E8')->setValue(false);\n$sheet->getCell('F8')->setValue(CurrencyNegative::parentheses->name);\n$sheet->getCell('G8')->setValue(1234.56);\n$sheet->getCell('H8')->setValue(0);\n$sheet->getCell('I8')->setValue(-1234.56);\n$sheet->getCell('J8')->setValue('Text');\n$sheet->getStyle('G8:J8')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Currency('￥', currencySymbolSpacing: false, negative: CurrencyNegative::parentheses))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A9')->setValue('CurrW HUF');\n$sheet->getCell('E9')->setValue(true);\n$sheet->getCell('G9')->setValue(1234.56);\n$sheet->getCell('H9')->setValue(0);\n$sheet->getCell('I9')->setValue(-1234.56);\n$sheet->getCell('J9')->setValue('Text');\n$sheet->getStyle('G9:J9')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Currency('HUF', currencySymbolSpacing: true))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A10')->setValue('CurrW HUF');\n$sheet->getCell('E10')->setValue(true);\n$sheet->getCell('F10')->setValue(CurrencyNegative::redParentheses->name);\n$sheet->getStyle('F10')->getFont()->getColor()->setRgb('FF0000');\n$sheet->getCell('G10')->setValue(1234.56);\n$sheet->getCell('H10')->setValue(0);\n$sheet->getCell('I10')->setValue(-1234.56);\n$sheet->getCell('J10')->setValue('Text');\n$sheet->getStyle('G10:J10')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Currency('HUF', currencySymbolSpacing: true, negative: CurrencyNegative::redParentheses))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A11')->setValue('CurrW Kazakh');\n$sheet->getCell('D11')->setValue(false);\n$sheet->getCell('G11')->setValue(1234.56);\n$sheet->getCell('H11')->setValue(0);\n$sheet->getCell('I11')->setValue(-1234.56);\n$sheet->getCell('J11')->setValue('Text');\n$sheet->getStyle('G11:J11')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new Currency('₸', currencySymbolPosition: Accounting::TRAILING_SYMBOL))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A12')->setValue('CurrW $');\n$sheet->getCell('B12')->setValue(3);\n$sheet->getCell('C12')->setValue(false);\n$sheet->getCell('D12')->setValue(false);\n$sheet->getCell('F12')->setValue(CurrencyNegative::redMinus->name);\n$sheet->getStyle('F12')->getFont()->getColor()->setRgb('FF0000');\n$sheet->getCell('G12')->setValue(1234.56);\n$sheet->getCell('H12')->setValue(0);\n$sheet->getCell('I12')->setValue(-1234.56);\n$sheet->getCell('J12')->setValue('Text');\n$format = new Currency(\n    '$',\n    decimals: 3,\n    thousandsSeparator: false,\n    currencySymbolPosition: Currency::TRAILING_SYMBOL,\n    negative: CurrencyNegative::redMinus\n);\n\n$sheet->getStyle('G12:J12')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => $format->format(),\n        ],\n    ]\n);\n\n$sheet->getColumnDimension('A')->setAutoSize(true);\n$sheet->getColumnDimension('F')->setAutoSize(true);\n$sheet->getColumnDimension('G')->setAutoSize(true);\n$sheet->getColumnDimension('H')->setAutoSize(true);\n$sheet->getColumnDimension('I')->setAutoSize(true);\n$sheet->setSelectedCells('J1');\n\n// third sheet\n\n$helper->log('Third sheet - CurrencyBase Wizard');\n$sheet = $spreadsheet->createSheet();\n$sheet->setTitle('CurrencyBase');\n$sheet->getCell('A1')->setValue('Currency');\n$sheet->getCell('B1')->setValue('Decimals');\n$sheet->getCell('C1')->setValue('ThouSep');\n$sheet->getCell('D1')->setValue('Lead');\n$sheet->getCell('E1')->setValue('Spacing');\n$sheet->getCell('F1')->setValue('Negative');\n$sheet->getCell('G1')->setValue('Pos');\n$sheet->getCell('H1')->setValue('Zero');\n$sheet->getCell('I1')->setValue('Neg');\n$sheet->getCell('J1')->setValue('Text');\n$sheet->freezePane('A2');\n\n$sheet->getCell('A2')->setValue('StaleAct￥');\n$sheet->getCell('G2')->setValue(1234.56);\n$sheet->getCell('H2')->setValue(0);\n$sheet->getCell('I2')->setValue(-1234.56);\n$sheet->getCell('J2')->setValue('Text');\n$sheet->getStyle('G2:J2')->getNumberFormat()->setFormatCode('_(\"￥\"* #,##0.00_);_(\"￥\"* -#,##0.00_);_(\"￥\"* \"-\"??_);_(@_)');\n\n$sheet->getCell('A3')->setValue('CurBase ￥');\n$sheet->getCell('E3')->setValue(true);\n$sheet->getCell('F3')->setValue(CurrencyNegative::minus->name);\n$sheet->getCell('G3')->setValue(1234.56);\n$sheet->getCell('H3')->setValue(0);\n$sheet->getCell('I3')->setValue(-1234.56);\n$sheet->getCell('J3')->setValue('Text');\n$sheet->getStyle('G3:J3')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new CurrencyBase('￥', currencySymbolSpacing: true, negative: CurrencyNegative::minus))->format(),\n        ],\n    ]\n);\n$sheet->getCell('G4')->setValue(-1234.56);\n$sheet->getStyle('G4')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new CurrencyBase('￥', currencySymbolSpacing: true, negative: CurrencyNegative::minus))->format(),\n        ],\n    ]\n);\n$sheet->getCell('G5')->setValue(0);\n$sheet->getStyle('G5')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new CurrencyBase('￥', currencySymbolSpacing: true, negative: CurrencyNegative::minus))->format(),\n        ],\n    ]\n);\n\n$sheet->getCell('A6')->setValue('StaleCur￥');\n$sheet->getCell('G6')->setValue(1234.56);\n$sheet->getCell('H6')->setValue(0);\n$sheet->getCell('I6')->setValue(-1234.56);\n$sheet->getCell('J6')->setValue('Text');\n$sheet->getStyle('G6:J6')->getNumberFormat()->setFormatCode('￥ #,##0');\n\n$sheet->getCell('A7')->setValue('CurBase ￥');\n$sheet->getCell('B7')->setValue(0);\n$sheet->getCell('G7')->setValue(1234.56);\n$sheet->getCell('H7')->setValue(0);\n$sheet->getCell('I7')->setValue(-1234.56);\n$sheet->getCell('J7')->setValue('Text');\n$sheet->getStyle('G7:J7')->applyFromArray(\n    [\n        'numberFormat' => [\n            'formatCode' => (new CurrencyBase('￥', 0))->format(),\n        ],\n    ]\n);\n\n$sheet->getColumnDimension('A')->setAutoSize(true);\n$sheet->getColumnDimension('F')->setAutoSize(true);\n$sheet->getColumnDimension('G')->setAutoSize(true);\n$sheet->getColumnDimension('H')->setAutoSize(true);\n$sheet->getColumnDimension('I')->setAutoSize(true);\n$sheet->setSelectedCells('J1');\n\n$spreadsheet->setActiveSheetIndex(0);\n\n$helper->write($spreadsheet, __FILE__, ['Xls', 'Xlsx']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic5/53_ImageOpacity.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\n\n$path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'images/blue_square.png';\n$spreadsheet = new Spreadsheet();\n$spreadsheet->getProperties()->setTitle('53_ImageOpacity');\n\n$helper->log('Add image to spreadsheet 6 times with different opacities');\n$sheet = $spreadsheet->getActiveSheet();\n$sheet->setTitle('Squares different opacities');\n$sheet->setShowGridLines(false);\n\n$drawing = new Drawing();\n$drawing->setName('Blue Square opacity not specified');\n$drawing->setPath($path);\n$drawing->setCoordinates('A1');\n$drawing->setCoordinates2('B5');\n$drawing->setWorksheet($sheet);\n\n$drawing = new Drawing();\n$drawing->setName('Blue Square opacity 80%');\n$drawing->setPath($path);\n$drawing->setCoordinates('C1');\n$drawing->setCoordinates2('D5');\n$drawing->setOpacity(80000);\n$drawing->setWorksheet($sheet);\n\n$drawing = new Drawing();\n$drawing->setWorksheet($sheet);\n$drawing->setName('Blue Square opacity 60%');\n$drawing->setPath($path);\n$drawing->setCoordinates('E1');\n$drawing->setCoordinates2('F5');\n$drawing->setOpacity(60000);\n\n$drawing = new Drawing();\n$drawing->setName('Blue Square opacity 40%');\n$drawing->setPath($path);\n$drawing->setCoordinates('A8');\n$drawing->setCoordinates2('B12');\n$drawing->setOpacity(40000);\n$drawing->setWorksheet($sheet);\n\n$drawing = new Drawing();\n$drawing->setName('Blue Square opacity 20%');\n$drawing->setPath($path);\n$drawing->setCoordinates('C8');\n$drawing->setCoordinates2('D12');\n$drawing->setOpacity(20000);\n$drawing->setWorksheet($sheet);\n\n$drawing = new Drawing();\n$drawing->setWorksheet($sheet);\n$drawing->setName('Blue Square opacity 0%');\n$drawing->setPath($path);\n$drawing->setCoordinates('E8');\n$drawing->setCoordinates2('F12');\n$drawing->setOpacity(0);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Html', 'Dompdf', 'Mpdf']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic5/54_ImagesInAndOut.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\n\n$path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'images/blue_square.png';\n$spreadsheet = new Spreadsheet();\n$spreadsheet->getProperties()->setTitle('53_ImageOpacity');\n\n$sheet = $spreadsheet->getActiveSheet();\n$sheet->setTitle('Images in-cell and out');\n$sheet->setShowGridLines(false);\n\n$helper->log('Add in-cell image to spreadsheet');\n$sheet->setCellValue('B1', 'inside');\n$drawing = new Drawing();\n$drawing->setName('Blue Square in-cell');\n$drawing->setPath($path);\n$sheet->getCell('B2')->setValue($drawing);\n\n$helper->log('Add image over cell to spreadsheet');\n$sheet->setCellValue('C1', 'outside');\n$drawing = new Drawing();\n$drawing->setName('Blue Square out-of-cell');\n$drawing->setPath($path);\n$drawing->setCoordinates('C2');\n$drawing->setCoordinates2('D6');\n$drawing->setWorksheet($sheet);\n\n$helper->log('In-cell supported only for Xlsx');\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic5/55_DefinedStyles.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\BaseWriter;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Cell\\Style;\n\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n$array = [\n    ['NUMBER', 1, NumberFormat::FORMAT_NUMBER],\n    ['NUMBER_0', 1, NumberFormat::FORMAT_NUMBER_0],\n    ['NUMBER_00', 1, NumberFormat::FORMAT_NUMBER_00],\n    ['NUMBER_COMMA_SEPARATED1', 1234, NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1],\n    ['NUMBER_COMMA_SEPARATED2', 1234, NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2],\n    ['PERCENTAGE', 0.98, NumberFormat::FORMAT_PERCENTAGE],\n    ['PERCENTAGE_0', 0.985, NumberFormat::FORMAT_PERCENTAGE_0],\n    ['PERCENTAGE_00', 0.9856, NumberFormat::FORMAT_PERCENTAGE_00],\n    ['DATE_YYYYMMDD', 46000, NumberFormat::FORMAT_DATE_YYYYMMDD],\n    ['DATE_DDMMYYYY', 46000, NumberFormat::FORMAT_DATE_DDMMYYYY],\n    ['DATE_DMYSLASH', 46000, NumberFormat::FORMAT_DATE_DMYSLASH],\n    ['DATE_DMYMINUS', 46000, NumberFormat::FORMAT_DATE_DMYMINUS],\n    ['DATE_DMMINUS', 46000, NumberFormat::FORMAT_DATE_DMMINUS],\n    ['DATE_MYMINUS', 46000, NumberFormat::FORMAT_DATE_MYMINUS],\n    ['DATE_XLSX14', 46000, NumberFormat::FORMAT_DATE_XLSX14],\n    ['DATE_XLSX14_ACTUAL', 46000, NumberFormat::FORMAT_DATE_XLSX14_ACTUAL],\n    ['DATE_XLSX15', 46000, NumberFormat::FORMAT_DATE_XLSX15],\n    ['DATE_XLSX15_YYYY', 46000, NumberFormat::FORMAT_DATE_XLSX15_YYYY],\n    ['DATE_XLSX16', 46000, NumberFormat::FORMAT_DATE_XLSX16],\n    ['DATE_XLSX17', 46000, NumberFormat::FORMAT_DATE_XLSX17],\n    ['DATE_XLSX22', 46000, NumberFormat::FORMAT_DATE_XLSX22],\n    ['DATE_XLSX22_ACTUAL', 46000, NumberFormat::FORMAT_DATE_XLSX22_ACTUAL],\n    ['DATE_DATETIME', 46000.25, NumberFormat::FORMAT_DATE_DATETIME],\n    ['DATE_DATETIME_BETTER', 46000.25, NumberFormat::FORMAT_DATE_DATETIME_BETTER],\n    ['DATE_TIME1', 46000.25, NumberFormat::FORMAT_DATE_TIME1],\n    ['DATE_TIME2', 46000.25, NumberFormat::FORMAT_DATE_TIME2],\n    ['DATE_TIME3', 46000.25, NumberFormat::FORMAT_DATE_TIME3],\n    ['DATE_TIME4', 46000.25, NumberFormat::FORMAT_DATE_TIME4],\n    ['DATE_TIME5', 46000.25, NumberFormat::FORMAT_DATE_TIME5],\n    ['DATE_TIME6', 46000.25, NumberFormat::FORMAT_DATE_TIME6],\n    ['DATE_TIME7', 46000.25, NumberFormat::FORMAT_DATE_TIME7],\n    ['DATE_TIME8', 46000.25, NumberFormat::FORMAT_DATE_TIME8],\n    [' DATE_TIME_INTERVAL_HMS', 0.0087731481481482, NumberFormat::FORMAT_DATE_TIME_INTERVAL_HMS],\n    ['DATE_YYYYMMDDSLASH', 46000, NumberFormat::FORMAT_DATE_YYYYMMDDSLASH],\n    ['DATE_LONG_DATE', 46000, NumberFormat::FORMAT_DATE_LONG_DATE],\n    ['CURRENCY_USD_INTEGER', 1234.56, NumberFormat::FORMAT_CURRENCY_USD_INTEGER],\n    ['CURRENCY_USD', 1234.56, NumberFormat::FORMAT_CURRENCY_USD],\n    ['CURRENCY_EUR_INTEGER', 1234.56, NumberFormat::FORMAT_CURRENCY_EUR_INTEGER],\n    ['CURRENCY_EUR', 1234.56, NumberFormat::FORMAT_CURRENCY_EUR],\n    ['CURRENCY_GBP_INTEGER', 1234.56, NumberFormat::FORMAT_CURRENCY_GBP_INTEGER],\n    ['CURRENCY_GBP', 1234.56, NumberFormat::FORMAT_CURRENCY_GBP],\n    ['CURRENCY_YEN_YUAN_INTEGER', 1234.56, NumberFormat::FORMAT_CURRENCY_YEN_YUAN_INTEGER],\n    ['CURRENCY_YEN_YUAN', 1234.56, NumberFormat::FORMAT_CURRENCY_YEN_YUAN],\n    ['ACCOUNTING_USD', 1234.56, NumberFormat::FORMAT_CURRENCY_USD],\n    ['ACCOUNTING_EUR', 1234.56, NumberFormat::FORMAT_CURRENCY_EUR],\n    ['CUSTOM1', 1234.56, '0.000'],\n    ['CUSTOM2', 1234.56, '\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)'],\n];\n$row = 0;\n$helper->log('Populate spreadsheet');\nforeach ($array as $cells) {\n    ++$row;\n    $sheet->getCell(\"A$row\")->setValue($cells[0]);\n    $sheet->getCell(\"B$row\")->setValue($cells[1]);\n    if (!str_starts_with($cells[0], 'DATE')) {\n        $sheet->getCell(\"C$row\")->setValue(-$cells[1]);\n    }\n    $sheet->getStyle(\"B$row:C$row\")\n        ->getNumberFormat()\n        ->setFormatCode($cells[2]);\n}\n$sheet->getColumnDimension('A')->setAutoSize(true);\n$sheet->getColumnDimension('B')->setAutoSize(true);\n$sheet->getColumnDimension('C')->setAutoSize(true);\n$sheet->setSelectedCells('A1');\n\nfunction threeDecimalPlaces(Style $obj, string $name): void\n{\n    $writer = $obj->getWriter();\n    $writer->startElement('number:number-style');\n    $writer->writeAttribute('style:name', $name);\n    $writer->startElement('number:number');\n    $writer->writeAttribute('number:decimal-places', '3');\n    $writer->writeAttribute('number:min-decimal-places', '3');\n    $writer->writeAttribute('number:min-integer-digits', '1');\n    $writer->endElement(); // number:number\n    $writer->endElement(); // number:number-style\n}\n\nfunction redBrackets(Style $obj, string $name): void\n{\n    $writer = $obj->getWriter();\n    $writer->startElement('number:currency-style');\n    $writer->writeAttribute('style:name', $name . 'P0');\n    $writer->writeElement('number:currency-symbol', '$');\n    $writer->startElement('number:number');\n    $writer->writeAttribute('number:decimal-places', '2');\n    $writer->writeAttribute('number:min-decimal-places', '2');\n    $writer->writeAttribute('number:min-integer-digits', '1');\n    $writer->writeAttribute('number:grouping', 'true');\n    $writer->endElement(); // number:number\n    $writer->writeElement('number:text', ' ');\n    $writer->endElement(); // number:currency-style\n\n    $writer->startElement('number:currency-style');\n    $writer->writeAttribute('style:name', $name);\n    $writer->startElement('style:text-properties');\n    $writer->writeAttribute('fo:color', '#FF0000');\n    $writer->endElement(); // style:text-properties\n    $writer->writeElement('number:text', '($');\n    $writer->startElement('number:number');\n    $writer->writeAttribute('number:decimal-places', '2');\n    $writer->writeAttribute('number:min-decimal-places', '2');\n    $writer->writeAttribute('number:min-integer-digits', '1');\n    $writer->writeAttribute('number:grouping', 'true');\n    $writer->endElement(); // number:number\n    $writer->writeElement('number:text', ')');\n    $writer->startElement('style:map');\n    $writer->writeAttribute('style:condition', 'value()>=0');\n    $writer->writeAttribute('style:apply-style-name', $name . 'P0');\n    $writer->endElement(); // style:map\n    $writer->endElement(); // number:currency-style\n}\n\nfunction writeAdditional(BaseWriter $writer): void\n{\n    if (method_exists($writer, 'useAdditionalNumberFormats')) {\n        $array = [\n            '0.000' => threeDecimalPlaces(...),\n            '\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)' => redBrackets(...),\n        ];\n        $writer->useAdditionalNumberFormats($array);\n    }\n}\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Ods'], writerCallback: writeAdditional(...));\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Basic5/56_OdsToISO8601.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\n\nfunction datesToIso8601(string $infile, Sample $helper): void\n{\n    $zip = new ZipArchive();\n    if ($zip->open($infile) !== true) {\n        throw new Exception(\"unable to open zip $infile\");\n    }\n    $files = ['content.xml', 'styles.xml'];\n    $modified = false;\n    foreach ($files as $file) {\n        $data = $zip->getFromName($file);\n        if ($data === false) {\n            throw new Exception(\"unable to read member $file\");\n        }\n        $newData = str_replace('<number:year/>', '<number:year number:style=\"long\"/>', $data);\n        $newData = preg_replace(\n            '~'\n            . '(<number:day(?: number:style=\"long\")?/>)'\n            . '<number:text>[/-]</number:text>'\n            . '(<number:month(?: number:style=\"long\")?/>)'\n            . '<number:text>[/-]</number:text>'\n            . '(<number:year number:style=\"long\"/>)'\n            . '~',\n            '$3<number:text>-</number:text>$2'\n            . '<number:text>-</number:text>$1',\n            $newData\n        ) ?? $newData;\n        $newData = preg_replace(\n            '~'\n            . '(<number:month(?: number:style=\"long\")?/>)'\n            . '<number:text>[/-]</number:text>'\n            . '(<number:day(?: number:style=\"long\")?/>)'\n            . '<number:text>[/-]</number:text>'\n            . '(<number:year number:style=\"long\"/>)'\n            . '~',\n            '$3<number:text>-</number:text>$1'\n            . '<number:text>-</number:text>$2',\n            $newData\n        ) ?? $newData;\n        $newData = preg_replace(\n            '~'\n            . '(<number:date-style [^>]*)'\n            . ' number:automatic-order=\"true\"'\n            . '~',\n            '$1',\n            $newData\n        ) ?? $newData;\n        if ($data === $newData) {\n            $helper->log(\"no changes needed for $file\");\n        } else {\n            $zip->deleteName($file);\n            $zip->addFromString($file, $newData);\n            $helper->log(\"modified $file\");\n            $modified = true;\n        }\n    }\n    $zip->close();\n    if ($modified) {\n        $helper->log(\"Modified $infile\");\n    } else {\n        $helper->log(\"No modifications to $infile\");\n    }\n}\n\n$infileBase = '56_MixedDateFormats.ods';\n$infileBase1 = __DIR__ . '/../templates/' . $infileBase;\n$infile = realpath($infileBase1);\nif ($infile === false) {\n    throw new Exception(\"Unable to locate $infileBase1\");\n}\n\n/** @var Sample $helper */\n$helper->log(\"Infile is $infile\");\n$outDirectory = $helper->getTemporaryFolder();\n$helper->log(\"outDirectory is $outDirectory\");\n$outfile = $outDirectory . '/56_OdsToISO8601.ods';\n$helper->log(\"Outfile is $outfile\");\n$helper->log('Attempting copy');\nif (!copy($infile, $outfile)) {\n    throw new Exception('Copy failed');\n}\n\n$helper->log('Update date formatting xml');\ndatesToIso8601($outfile, $helper);\n\n$helper->addDownloadLink($outfile);\n"
  },
  {
    "path": "samples/Bitwise/BITAND.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BITAND';\n$description = \"Returns a bitwise 'AND' of two numbers\";\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [1, 5],\n    [3, 5],\n    [1, 6],\n    [9, 6],\n    [13, 25],\n    [23, 10],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=TEXT(DEC2BIN(A' . $row . '), \"00000\")');\n    $worksheet->setCellValue('D' . $row, '=TEXT(DEC2BIN(B' . $row . '), \"00000\")');\n    $worksheet->setCellValue('E' . $row, '=BITAND(A' . $row . ',B' . $row . ')');\n    $worksheet->setCellValue('F' . $row, '=TEXT(DEC2BIN(E' . $row . '), \"00000\")');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): Bitwise AND of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n        . ') and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . '('\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ') is '\n        . $worksheet->getCell('E' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('F' . $row)->getCalculatedValueString()\n        . ')'\n    );\n}\n"
  },
  {
    "path": "samples/Bitwise/BITLSHIFT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BITLSHIFT';\n$description = 'Returns a number shifted left by the specified number of bits';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [1],\n    [3],\n    [9],\n    [15],\n    [26],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=DEC2BIN(A' . $row . ')');\n    $worksheet->setCellValue('C' . $row, '=BITLSHIFT(A' . $row . ',1)');\n    $worksheet->setCellValue('D' . $row, '=DEC2BIN(C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=BITLSHIFT(A' . $row . ',2)');\n    $worksheet->setCellValue('F' . $row, '=DEC2BIN(E' . $row . ')');\n    $worksheet->setCellValue('G' . $row, '=BITLSHIFT(A' . $row . ',3)');\n    $worksheet->setCellValue('H' . $row, '=DEC2BIN(G' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): Bitwise Left Shift of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n        . ') by 1 bit is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ')'\n    );\n    $helper->log(\n        \"(E$row): Bitwise Left Shift of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n        . ') by 2 bits is '\n        . $worksheet->getCell('E' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('F' . $row)->getCalculatedValueString()\n        . ')'\n    );\n    $helper->log(\n        \"(E$row): Bitwise Left Shift of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n        . ') by 3 bits is '\n        . $worksheet->getCell('G' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('H' . $row)->getCalculatedValueString()\n        . ')'\n    );\n}\n"
  },
  {
    "path": "samples/Bitwise/BITOR.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BITOR';\n$description = \"Returns a bitwise 'OR' of two numbers\";\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [1, 5],\n    [3, 5],\n    [1, 6],\n    [9, 6],\n    [13, 25],\n    [23, 10],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=TEXT(DEC2BIN(A' . $row . '), \"00000\")');\n    $worksheet->setCellValue('D' . $row, '=TEXT(DEC2BIN(B' . $row . '), \"00000\")');\n    $worksheet->setCellValue('E' . $row, '=BITOR(A' . $row . ',B' . $row . ')');\n    $worksheet->setCellValue('F' . $row, '=TEXT(DEC2BIN(E' . $row . '), \"00000\")');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): Bitwise OR of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n        . ') and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . '('\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ') is '\n        . $worksheet->getCell('E' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('F' . $row)->getCalculatedValueString()\n        . ')'\n    );\n}\n"
  },
  {
    "path": "samples/Bitwise/BITRSHIFT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BITRSHIFT';\n$description = 'Returns a number shifted right by the specified number of bits';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [9],\n    [15],\n    [26],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=DEC2BIN(A' . $row . ')');\n    $worksheet->setCellValue('C' . $row, '=BITRSHIFT(A' . $row . ',1)');\n    $worksheet->setCellValue('D' . $row, '=DEC2BIN(C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=BITRSHIFT(A' . $row . ',2)');\n    $worksheet->setCellValue('F' . $row, '=DEC2BIN(E' . $row . ')');\n    $worksheet->setCellValue('G' . $row, '=BITRSHIFT(A' . $row . ',3)');\n    $worksheet->setCellValue('H' . $row, '=DEC2BIN(G' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): Bitwise Right Shift of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n        . ') by 1 bit is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ')'\n    );\n    $helper->log(\n        \"(E$row): Bitwise Right Shift of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n        . ') by 2 bits is '\n        . $worksheet->getCell('E' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('F' . $row)->getCalculatedValueString()\n        . ')'\n    );\n    $helper->log(\n        \"(E$row): Bitwise Right Shift of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n        . ') by 3 bits is '\n        . $worksheet->getCell('G' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('H' . $row)->getCalculatedValueString()\n        . ')'\n    );\n}\n"
  },
  {
    "path": "samples/Bitwise/BITXOR.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BITXOR';\n$description = \"Returns a bitwise 'XOR' of two numbers\";\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [1, 5],\n    [3, 5],\n    [1, 6],\n    [9, 6],\n    [13, 25],\n    [23, 10],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=TEXT(DEC2BIN(A' . $row . '), \"00000\")');\n    $worksheet->setCellValue('D' . $row, '=TEXT(DEC2BIN(B' . $row . '), \"00000\")');\n    $worksheet->setCellValue('E' . $row, '=BITXOR(A' . $row . ',B' . $row . ')');\n    $worksheet->setCellValue('F' . $row, '=TEXT(DEC2BIN(E' . $row . '), \"00000\")');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): Bitwise XOR of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' ('\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n        . ') and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . '('\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ') is '\n        . $worksheet->getCell('E' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('F' . $row)->getCalculatedValueString()\n        . ')'\n    );\n}\n"
  },
  {
    "path": "samples/Bootstrap.php",
    "content": "<?php\n\n/**\n * Bootstrap for PhpSpreadsheet classes.\n */\n\n// This sucks, but we have to try to find the composer autoloader\n\n$paths = [\n    __DIR__ . '/../vendor/autoload.php', // In case PhpSpreadsheet is cloned directly\n    __DIR__ . '/../../../autoload.php', // In case PhpSpreadsheet is a composer dependency.\n];\n\nforeach ($paths as $path) {\n    if (file_exists($path)) {\n        require_once $path;\n\n        return;\n    }\n}\n\nthrow new Exception('Composer autoloader could not be found. Install dependencies with `composer install` and try again.');\n"
  },
  {
    "path": "samples/Chart/32_Chart_read_write.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xlsx';\n$inputFileNames = __DIR__ . '/../templates/32readwrite*[0-9].xlsx';\n\nif ((isset($argc)) && ($argc > 1)) {\n    $inputFileNames = [];\n    for ($i = 1; $i < $argc; ++$i) {\n        $inputFileNames[] = __DIR__ . '/../templates/' . $argv[$i];\n    }\n} else {\n    $inputFileNames = glob($inputFileNames) ?: [];\n}\nforeach ($inputFileNames as $inputFileName) {\n    $inputFileNameShort = basename($inputFileName);\n\n    if (!file_exists($inputFileName)) {\n        $helper->log('File ' . $inputFileNameShort . ' does not exist');\n\n        continue;\n    }\n    $reader = IOFactory::createReader($inputFileType);\n    $reader->setIncludeCharts(true);\n    $callStartTime = microtime(true);\n    $spreadsheet = $reader->load($inputFileName);\n    $helper->logRead($inputFileType, $inputFileName, $callStartTime);\n\n    $helper->log('Iterate worksheets looking at the charts');\n    foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n        $sheetName = $worksheet->getTitle();\n        $helper->log('Worksheet: ' . $sheetName);\n\n        $chartNames = $worksheet->getChartNames();\n        if (empty($chartNames)) {\n            $helper->log('    There are no charts in this worksheet');\n        } else {\n            natsort($chartNames);\n            foreach ($chartNames as $i => $chartName) {\n                $chart = $worksheet->getChartByNameOrThrow($chartName);\n                if ($chart->getTitle() !== null) {\n                    $caption = '\"' . $chart->getTitle()->getCaptionText($spreadsheet) . '\"';\n                } else {\n                    $caption = 'Untitled';\n                }\n                $helper->log('    ' . $chartName . ' - ' . $caption);\n                $indentation = str_repeat(' ', strlen($chartName) + 3);\n                $groupCount = $chart->getPlotAreaOrThrow()->getPlotGroupCount();\n                if ($groupCount == 1) {\n                    $chartType = $chart->getPlotAreaOrThrow()->getPlotGroupByIndex(0)->getPlotType();\n                    $helper->log($indentation . '    ' . $chartType);\n                    $helper->renderChart($chart, __FILE__);\n                } else {\n                    $chartTypes = [];\n                    for ($i = 0; $i < $groupCount; ++$i) {\n                        $chartTypes[] = $chart->getPlotAreaOrThrow()->getPlotGroupByIndex($i)->getPlotType();\n                    }\n                    $chartTypes = array_unique($chartTypes);\n                    if (count($chartTypes) == 1) {\n                        $chartType = 'Multiple Plot ' . array_pop($chartTypes);\n                        $helper->log($indentation . '    ' . $chartType);\n                        $helper->renderChart($chart, __FILE__);\n                    } elseif (count($chartTypes) == 0) {\n                        $helper->log($indentation . '    *** Type not yet implemented');\n                    } else {\n                        $helper->log($indentation . '    Combination Chart');\n                        $helper->renderChart($chart, __FILE__);\n                    }\n                }\n            }\n        }\n    }\n\n    $outputFileName = $helper->getFilename($inputFileName);\n    $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n    $writer->setIncludeCharts(true);\n    $callStartTime = microtime(true);\n    $writer->save($outputFileName);\n    $helper->logWrite($writer, $outputFileName, $callStartTime);\n\n    $spreadsheet->disconnectWorksheets();\n    unset($spreadsheet);\n}\n"
  },
  {
    "path": "samples/Chart/32_Chart_read_write_HTML.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Change these values to select the Rendering library that you wish to use\n//Settings::setChartRenderer(\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph::class);\nSettings::setChartRenderer(PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer::class);\n\n$inputFileType = 'Xlsx';\n$inputFileNames = __DIR__ . '/../templates/36write*.xlsx';\n\nif ((isset($argc)) && ($argc > 1)) {\n    $inputFileNames = [];\n    for ($i = 1; $i < $argc; ++$i) {\n        $inputFileNames[] = __DIR__ . '/../templates/' . $argv[$i];\n    }\n} else {\n    $inputFileNames = glob($inputFileNames) ?: [];\n}\nforeach ($inputFileNames as $inputFileName) {\n    $inputFileNameShort = basename($inputFileName);\n\n    if (!file_exists($inputFileName)) {\n        $helper->log('File ' . $inputFileNameShort . ' does not exist');\n\n        continue;\n    }\n\n    $helper->log(\"Load Test from $inputFileType file \" . $inputFileNameShort);\n\n    $reader = IOFactory::createReader($inputFileType);\n    $reader->setIncludeCharts(true);\n    $spreadsheet = $reader->load($inputFileName);\n\n    $helper->log('Iterate worksheets looking at the charts');\n    foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n        $sheetName = $worksheet->getTitle();\n        $helper->log('Worksheet: ' . $sheetName);\n\n        $chartNames = $worksheet->getChartNames();\n        if (empty($chartNames)) {\n            $helper->log('    There are no charts in this worksheet');\n        } else {\n            natsort($chartNames);\n            foreach ($chartNames as $i => $chartName) {\n                $chart = $worksheet->getChartByNameOrThrow($chartName);\n                if ($chart->getTitle() !== null) {\n                    $caption = '\"' . $chart->getTitle()->getCaptionText($spreadsheet) . '\"';\n                } else {\n                    $caption = 'Untitled';\n                }\n                $helper->log('    ' . $chartName . ' - ' . $caption);\n                $helper->log(str_repeat(' ', strlen($chartName) + 3));\n                $groupCount = $chart->getPlotAreaOrThrow()->getPlotGroupCount();\n                if ($groupCount == 1) {\n                    $chartType = $chart->getPlotAreaOrThrow()->getPlotGroupByIndex(0)->getPlotType();\n                    $helper->log('    ' . $chartType);\n                } else {\n                    $chartTypes = [];\n                    for ($i = 0; $i < $groupCount; ++$i) {\n                        $chartTypes[] = $chart->getPlotAreaOrThrow()->getPlotGroupByIndex($i)->getPlotType();\n                    }\n                    $chartTypes = array_unique($chartTypes);\n                    if (count($chartTypes) == 1) {\n                        $chartType = 'Multiple Plot ' . array_pop($chartTypes);\n                        $helper->log('    ' . $chartType);\n                    } elseif (count($chartTypes) == 0) {\n                        $helper->log('    *** Type not yet implemented');\n                    } else {\n                        $helper->log('    Combination Chart');\n                    }\n                }\n            }\n        }\n    }\n\n    // Save\n    $filename = $helper->getFilename($inputFileName, 'html');\n    $helper->write($spreadsheet, $filename, ['Html'], true);\n\n    $spreadsheet->disconnectWorksheets();\n    unset($spreadsheet);\n}\n"
  },
  {
    "path": "samples/Chart/32_Chart_read_write_PDF.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\nIOFactory::registerWriter('Pdf', PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf::class);\n\n// Change these values to select the Rendering library that you wish to use\n//Settings::setChartRenderer(\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph::class);\nSettings::setChartRenderer(PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer::class);\n\n$inputFileType = 'Xlsx';\n$inputFileNames = __DIR__ . '/../templates/36write*.xlsx';\n\nif ((isset($argc)) && ($argc > 1)) {\n    $inputFileNames = [];\n    for ($i = 1; $i < $argc; ++$i) {\n        $inputFileNames[] = __DIR__ . '/../templates/' . $argv[$i];\n    }\n} else {\n    $inputFileNames = glob($inputFileNames) ?: [];\n}\nforeach ($inputFileNames as $inputFileName) {\n    $inputFileNameShort = basename($inputFileName);\n\n    if (!file_exists($inputFileName)) {\n        $helper->log('File ' . $inputFileNameShort . ' does not exist');\n\n        continue;\n    }\n\n    $helper->log(\"Load Test from $inputFileType file \" . $inputFileNameShort);\n\n    $reader = IOFactory::createReader($inputFileType);\n    $reader->setIncludeCharts(true);\n    $spreadsheet = $reader->load($inputFileName);\n\n    $helper->log('Merge chart cells (needed only for Pdf)');\n    $spreadsheet->mergeChartCellsForPdf();\n\n    $helper->log('Iterate worksheets looking at the charts');\n    foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n        $sheetName = $worksheet->getTitle();\n        $helper->log('Worksheet: ' . $sheetName);\n\n        $chartNames = $worksheet->getChartNames();\n        if (empty($chartNames)) {\n            $helper->log('    There are no charts in this worksheet');\n        } else {\n            natsort($chartNames);\n            foreach ($chartNames as $i => $chartName) {\n                $chart = $worksheet->getChartByNameOrThrow($chartName);\n                if ($chart->getTitle() !== null) {\n                    $caption = '\"' . $chart->getTitle()->getCaptionText($spreadsheet) . '\"';\n                } else {\n                    $caption = 'Untitled';\n                }\n                $helper->log('    ' . $chartName . ' - ' . $caption);\n                $helper->log(str_repeat(' ', strlen($chartName) + 3));\n                $groupCount = $chart->getPlotAreaOrThrow()->getPlotGroupCount();\n                if ($groupCount == 1) {\n                    $chartType = $chart->getPlotAreaOrThrow()->getPlotGroupByIndex(0)->getPlotType();\n                    $helper->log('    ' . $chartType);\n                } else {\n                    $chartTypes = [];\n                    for ($i = 0; $i < $groupCount; ++$i) {\n                        $chartTypes[] = $chart->getPlotAreaOrThrow()->getPlotGroupByIndex($i)->getPlotType();\n                    }\n                    $chartTypes = array_unique($chartTypes);\n                    if (count($chartTypes) == 1) {\n                        $chartType = 'Multiple Plot ' . array_pop($chartTypes);\n                        $helper->log('    ' . $chartType);\n                    } elseif (count($chartTypes) == 0) {\n                        $helper->log('    *** Type not yet implemented');\n                    } else {\n                        $helper->log('    Combination Chart');\n                    }\n                }\n            }\n        }\n    }\n\n    // Save\n    $filename = $helper->getFilename($inputFileName, 'pdf');\n    $helper->write($spreadsheet, $filename, ['Pdf'], true);\n\n    $spreadsheet->disconnectWorksheets();\n    unset($spreadsheet);\n}\n"
  },
  {
    "path": "samples/Chart/34_Chart_update.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\n\nrequire __DIR__ . '/../Header.php';\n\n// Create temporary file that will be read\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$sampleSpreadsheet = require __DIR__ . '/../templates/chartSpreadsheet.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$filename = $helper->getTemporaryFilename();\n$writer = new XlsxWriter($sampleSpreadsheet);\n$writer->setIncludeCharts(true);\n$writer->save($filename);\n\n$helper->log('Load from Xlsx file');\n$reader = new XlsxReader();\n$reader->setIncludeCharts(true);\n$spreadsheet = $reader->load($filename);\nunlink($filename);\n\n$helper->log('Update cell data values that are displayed in the chart');\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        [50 - 12, 50 - 15, 50 - 21],\n        [50 - 56, 50 - 73, 50 - 86],\n        [50 - 52, 50 - 61, 50 - 69],\n        [50 - 30, 50 - 32, 50],\n    ],\n    null,\n    'B2'\n);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart/35_Chart_render.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Change these values to select the Rendering library that you wish to use\n//Settings::setChartRenderer(\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph::class);\nSettings::setChartRenderer(PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer::class);\n\n$inputFileType = 'Xlsx';\n$inputFileNames = __DIR__ . '/../templates/32readwrite*[0-9].xlsx';\n//$inputFileNames = __DIR__ . '/../templates/32readwriteStockChart5.xlsx';\n\nif ((isset($argc)) && ($argc > 1)) {\n    $inputFileNames = [];\n    for ($i = 1; $i < $argc; ++$i) {\n        $inputFileNames[] = __DIR__ . '/../templates/' . $argv[$i];\n    }\n} else {\n    $inputFileNames = glob($inputFileNames) ?: [];\n}\nif (count($inputFileNames) === 1) {\n    /** @var string[] */\n    $unresolvedErrors = [];\n} else {\n    /** @var string[] */\n    $unresolvedErrors = [\n        // The following spreadsheet was created by 3rd party software,\n        // and doesn't include the data that usually accompanies a chart.\n        // That is good enough for Excel, but not for JpGraph.\n        '32readwriteBubbleChart2.xlsx',\n    ];\n}\nforeach ($inputFileNames as $inputFileName) {\n    $inputFileNameShort = basename($inputFileName);\n\n    if (!file_exists($inputFileName)) {\n        $helper->log('File ' . $inputFileNameShort . ' does not exist');\n\n        continue;\n    }\n    if (in_array($inputFileNameShort, $unresolvedErrors, true)) {\n        $helper->log('*****');\n        $helper->log('***** File ' . $inputFileNameShort . ' does not yet work with this script');\n        $helper->log('*****');\n\n        continue;\n    }\n\n    $helper->log(\"Load Test from $inputFileType file \" . $inputFileNameShort);\n\n    $reader = IOFactory::createReader($inputFileType);\n    $reader->setIncludeCharts(true);\n    $spreadsheet = $reader->load($inputFileName);\n\n    $helper->log('Iterate worksheets looking at the charts');\n    $renderedCharts = 0;\n    foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n        $sheetName = $worksheet->getTitle();\n        $helper->log('Worksheet: ' . $sheetName);\n\n        $chartNames = $worksheet->getChartNames();\n        if (empty($chartNames)) {\n            $helper->log('    There are no charts in this worksheet');\n        } else {\n            natsort($chartNames);\n            foreach ($chartNames as $j => $chartName) {\n                $i = $renderedCharts + $j;\n                $chart = $worksheet->getChartByNameOrThrow($chartName);\n                if ($chart->getTitle() !== null) {\n                    $caption = '\"' . $chart->getTitle()->getCaptionText($spreadsheet) . '\"';\n                } else {\n                    $caption = 'Untitled';\n                }\n                $helper->log('    ' . $chartName . ' - ' . $caption);\n\n                $pngFile = $helper->getFilename('35-' . $inputFileNameShort, 'png');\n                if ($i !== 0) {\n                    $pngFile = substr($pngFile, 0, -3) . \"$i.png\";\n                }\n                if (file_exists($pngFile)) {\n                    unlink($pngFile);\n                }\n\n                try {\n                    $chart->render($pngFile);\n                    $helper->log('Rendered image: ' . $pngFile);\n                } catch (Exception $e) {\n                    $helper->log('Error rendering chart: ' . $e->getMessage());\n                }\n\n                ++$renderedCharts;\n            }\n        }\n    }\n\n    $spreadsheet->disconnectWorksheets();\n    unset($spreadsheet);\n    gc_collect_cycles();\n}\n\n$helper->log('Done rendering charts as images');\n"
  },
  {
    "path": "samples/Chart/35_Chart_render33.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Change these values to select the Rendering library that you wish to use\n//Settings::setChartRenderer(\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph::class);\nSettings::setChartRenderer(PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer::class);\n\n$inputFileType = 'Xlsx';\n$inputFileNamesString = $helper->getTemporaryFolder() . '/33_Chart_create_*.xlsx';\n\nif ((isset($argc)) && ($argc > 1)) {\n    $inputFileNames = [];\n    for ($i = 1; $i < $argc; ++$i) {\n        $inputFileNames[] = __DIR__ . '/../templates/' . $argv[$i];\n    }\n} else {\n    $inputFileNames = glob($inputFileNamesString) ?: [];\n}\nif (count($inputFileNames) === 1) {\n    /** @var string[] */\n    $unresolvedErrors = [];\n} else {\n    /** @var string[] */\n    $unresolvedErrors = [\n        //'33_Chart_create_bar_stacked.xlsx', // fixed with mitoteam/jpgraph 10.3\n    ];\n}\nforeach ($inputFileNames as $inputFileName) {\n    $inputFileNameShort = basename($inputFileName);\n\n    if (!file_exists($inputFileName)) {\n        $helper->log('File ' . $inputFileNameShort . ' does not exist');\n\n        continue;\n    }\n    if (in_array($inputFileNameShort, $unresolvedErrors, true)) {\n        $helper->log('*****');\n        $helper->log('***** File ' . $inputFileNameShort . ' does not yet work with this script');\n        $helper->log('*****');\n\n        continue;\n    }\n\n    $helper->log(\"Load Test from $inputFileType file \" . $inputFileNameShort);\n\n    $reader = IOFactory::createReader($inputFileType);\n    $reader->setIncludeCharts(true);\n    $spreadsheet = $reader->load($inputFileName);\n\n    $helper->log('Iterate worksheets looking at the charts');\n    $renderedCharts = 0;\n    foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n        $sheetName = $worksheet->getTitle();\n        $helper->log('Worksheet: ' . $sheetName);\n\n        $chartNames = $worksheet->getChartNames();\n        if (empty($chartNames)) {\n            $helper->log('    There are no charts in this worksheet');\n        } else {\n            natsort($chartNames);\n            foreach ($chartNames as $j => $chartName) {\n                $i = $renderedCharts + $j;\n                $chart = $worksheet->getChartByNameOrThrow($chartName);\n                if ($chart->getTitle() !== null) {\n                    $caption = '\"' . $chart->getTitle()->getCaptionText($spreadsheet) . '\"';\n                } else {\n                    $caption = 'Untitled';\n                }\n                $helper->log('    ' . $chartName . ' - ' . $caption);\n\n                $pngFile = $helper->getFilename('35-' . $inputFileNameShort, 'png');\n                if ($i !== 0) {\n                    $pngFile = substr($pngFile, 0, -3) . \"$i.png\";\n                }\n                if (file_exists($pngFile)) {\n                    unlink($pngFile);\n                }\n\n                try {\n                    $chart->render($pngFile);\n                    $helper->log('Rendered image: ' . $pngFile);\n                } catch (Exception $e) {\n                    $helper->log('Error rendering chart: ' . $e->getMessage());\n                }\n\n                ++$renderedCharts;\n            }\n        }\n    }\n\n    $spreadsheet->disconnectWorksheets();\n    unset($spreadsheet);\n    gc_collect_cycles();\n}\n\n$helper->log('Done rendering charts as images');\n"
  },
  {
    "path": "samples/Chart/37_Chart_dynamic_title.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xlsx';\n$inputFileName = __DIR__ . '/../templates/37dynamictitle.xlsx';\nvar_dump($inputFileName);\nvar_dump(realpath($inputFileName));\n$inputFileNames = [$inputFileName];\n\nforeach ($inputFileNames as $inputFileName) {\n    $inputFileNameShort = basename($inputFileName);\n\n    if (!file_exists($inputFileName)) {\n        $helper->log('File ' . $inputFileNameShort . ' does not exist');\n\n        continue;\n    }\n    $reader = IOFactory::createReader($inputFileType);\n    $reader->setIncludeCharts(true);\n    $callStartTime = microtime(true);\n    $spreadsheet = $reader->load($inputFileName);\n    $helper->logRead($inputFileType, $inputFileName, $callStartTime);\n\n    $helper->log('Iterate worksheets looking at the charts');\n    foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n        $sheetName = $worksheet->getTitle();\n        $worksheet->getCell('A1')->setValue('Changed Title');\n        $helper->log('Worksheet: ' . $sheetName);\n\n        $chartNames = $worksheet->getChartNames();\n        if (empty($chartNames)) {\n            $helper->log('    There are no charts in this worksheet');\n        } else {\n            natsort($chartNames);\n            foreach ($chartNames as $i => $chartName) {\n                $chart = $worksheet->getChartByNameOrThrow($chartName);\n                if ($chart->getTitle() !== null) {\n                    $caption = '\"' . $chart->getTitle()->getCaptionText($spreadsheet) . '\"';\n                } else {\n                    $caption = 'Untitled';\n                }\n                $helper->log('    ' . $chartName . ' - ' . $caption);\n                $indentation = str_repeat(' ', strlen($chartName) + 3);\n                $groupCount = $chart->getPlotAreaOrThrow()->getPlotGroupCount();\n                if ($groupCount == 1) {\n                    $chartType = $chart->getPlotAreaOrThrow()->getPlotGroupByIndex(0)->getPlotType();\n                    $helper->log($indentation . '    ' . $chartType);\n                    $helper->renderChart($chart, __FILE__, $spreadsheet);\n                } else {\n                    $chartTypes = [];\n                    for ($i = 0; $i < $groupCount; ++$i) {\n                        $chartTypes[] = $chart->getPlotAreaOrThrow()->getPlotGroupByIndex($i)->getPlotType();\n                    }\n                    $chartTypes = array_unique($chartTypes);\n                    if (count($chartTypes) == 1) {\n                        $chartType = 'Multiple Plot ' . array_pop($chartTypes);\n                        $helper->log($indentation . '    ' . $chartType);\n                        $helper->renderChart($chart, __FILE__);\n                    } elseif (count($chartTypes) == 0) {\n                        $helper->log($indentation . '    *** Type not yet implemented');\n                    } else {\n                        $helper->log($indentation . '    Combination Chart');\n                        $helper->renderChart($chart, __FILE__);\n                    }\n                }\n            }\n        }\n    }\n\n    $callStartTime = microtime(true);\n    $helper->write($spreadsheet, $inputFileName, ['Xlsx'], true);\n\n    Settings::setChartRenderer(PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer::class);\n    $callStartTime = microtime(true);\n    $helper->write($spreadsheet, $inputFileName, ['Html'], true);\n\n    $spreadsheet->disconnectWorksheets();\n    unset($spreadsheet);\n}\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_area.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_AREACHART, // plotType\n    DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues          // plotValues\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test %age-Stacked Area Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n$chart->setNoBorder(true);\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_area_2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Theme as SpreadsheetTheme;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n// same as 33_Chart_create_area, but with 2013+ schemes\n$spreadsheet->getTheme()->setThemeColorName(SpreadsheetTheme::COLOR_SCHEME_2013_2022_NAME);\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_AREACHART, // plotType\n    DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues          // plotValues\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test %age-Stacked Area Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_bar.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/chartSpreadsheet.php';\n\n// Save Excel 2007 file\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_bar_custom_colors.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Custom colors for dataSeries (gray, blue, red, orange)\n$colors = [\n    'cccccc', '00abb8', 'b8292f', 'eb8500',\n];\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n//     Custom colors\n$dataSeriesValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4, [], null, $colors),\n];\n\n// Build the dataseries\n$series1 = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    null, // plotGrouping (Pie charts don't have any grouping)\n    range(0, count($dataSeriesValues1) - 1), // plotOrder\n    $dataSeriesLabels1, // plotLabel\n    $xAxisTickValues1, // plotCategory\n    $dataSeriesValues1          // plotValues\n);\n\n// Set up a layout object for the Pie chart\n$layout1 = new Layout();\n$layout1->setShowVal(true);\n$layout1->setShowPercent(true);\n\n// Set the series in the plot area\n$plotArea1 = new PlotArea($layout1, [$series1]);\n// Set the chart legend\n$legend1 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title1 = new Title('Test Bar Chart');\n\n// Create the chart\n$chart1 = new Chart(\n    'chart1', // name\n    $title1, // title\n    $legend1, // legend\n    $plotArea1, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Pie charts don't have a Y-Axis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart1->setTopLeftPosition('A7');\n$chart1->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart1);\n\n$helper->renderChart($chart1, __FILE__);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n//     Custom colors\n$dataSeriesValues2 = [\n    $dataSeriesValues2Element = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n];\n$dataSeriesValues2Element->setFillColor($colors);\n\n// Build the dataseries\n$series2 = new DataSeries(\n    DataSeries::TYPE_DONUTCHART, // plotType\n    null, // plotGrouping (Donut charts don't have any grouping)\n    range(0, count($dataSeriesValues2) - 1), // plotOrder\n    $dataSeriesLabels2, // plotLabel\n    $xAxisTickValues2, // plotCategory\n    $dataSeriesValues2        // plotValues\n);\n\n// Set up a layout object for the Pie chart\n$layout2 = new Layout();\n$layout2->setShowVal(true);\n$layout2->setShowCatName(true);\n\n// Set the series in the plot area\n$plotArea2 = new PlotArea($layout2, [$series2]);\n\n$title2 = new Title('Test Donut Chart');\n\n// Create the chart\n$chart2 = new Chart(\n    'chart2', // name\n    $title2, // title\n    null, // legend\n    $plotArea2, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Like Pie charts, Donut charts don't have a Y-Axis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart2->setTopLeftPosition('I7');\n$chart2->setBottomRightPosition('P20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart2);\n\n$helper->renderChart($chart2, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_bar_labels_lines.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\GridLines;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Custom colors for dataSeries (gray, blue, red, orange)\n$colors = [\n    'cccccc', '00abb8', 'b8292f', 'eb8500',\n];\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n//     Custom colors\n$dataSeriesValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4, [], null, $colors),\n];\n$labelLayout = new Layout();\n$labelLayout\n    ->setShowVal(true)\n    ->setLabelFontColor(new ChartColor('FFFF00'))\n    ->setLabelFillColor(new ChartColor('accent2', null, 'schemeClr'));\n$dataSeriesValues1[0]->setLabelLayout($labelLayout);\n\n// Build the dataseries\n$series1 = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    null, // plotGrouping (Pie charts don't have any grouping)\n    range(0, count($dataSeriesValues1) - 1), // plotOrder\n    $dataSeriesLabels1, // plotLabel\n    $xAxisTickValues1, // plotCategory\n    $dataSeriesValues1          // plotValues\n);\n\n// Set up a layout object for the Pie chart\n$layout1 = new Layout();\n$layout1->setShowVal(true);\n$layout1->setShowPercent(true);\n\n// Set the series in the plot area\n$plotArea1 = new PlotArea($layout1, [$series1]);\n// Set the chart legend\n$legend1 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title1 = new Title('Test Bar Chart');\n\n// Create the chart\n$chart1 = new Chart(\n    'chart1', // name\n    $title1, // title\n    $legend1, // legend\n    $plotArea1, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Pie charts don't have a Y-Axis\n);\n$majorGridlinesY = new GridLines();\n$majorGridlinesY->setLineColorProperties('FF0000');\n$minorGridlinesY = new GridLines();\n$minorGridlinesY->setLineStyleProperty('dash', Properties::LINE_STYLE_DASH_ROUND_DOT);\n$chart1\n    ->getChartAxisY()\n    ->setMajorGridlines($majorGridlinesY)\n    ->setMinorGridlines($minorGridlinesY);\n$majorGridlinesX = new GridLines();\n$majorGridlinesX->setLineColorProperties('FF00FF');\n$minorGridlinesX = new GridLines();\n$minorGridlinesX->activateObject();\n$chart1\n    ->getChartAxisX()\n    ->setMajorGridlines($majorGridlinesX)\n    ->setMinorGridlines($minorGridlinesX);\n\n// Set the position where the chart should appear in the worksheet\n$chart1->setTopLeftPosition('A7');\n$chart1->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart1);\n\n$helper->renderChart($chart1, __FILE__);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n//     Custom colors\n$dataSeriesValues2 = [\n    $dataSeriesValues2Element = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n];\n$dataSeriesValues2Element->setFillColor($colors);\n\n// Build the dataseries\n$series2 = new DataSeries(\n    DataSeries::TYPE_DONUTCHART, // plotType\n    null, // plotGrouping (Donut charts don't have any grouping)\n    range(0, count($dataSeriesValues2) - 1), // plotOrder\n    $dataSeriesLabels2, // plotLabel\n    $xAxisTickValues2, // plotCategory\n    $dataSeriesValues2        // plotValues\n);\n\n// Set up a layout object for the Pie chart\n$layout2 = new Layout();\n$layout2->setShowVal(true);\n$layout2->setShowCatName(true);\n$layout2->setLabelFillColor(new ChartColor('FFFF00'));\n\n// Set the series in the plot area\n$plotArea2 = new PlotArea($layout2, [$series2]);\n\n$title2 = new Title('Test Donut Chart');\n\n// Create the chart\n$chart2 = new Chart(\n    'chart2', // name\n    $title2, // title\n    null, // legend\n    $plotArea2, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Like Pie charts, Donut charts don't have a Y-Axis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart2->setTopLeftPosition('I7');\n$chart2->setBottomRightPosition('P20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart2);\n\n$helper->renderChart($chart2, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_bar_stacked.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    DataSeries::GROUPING_STACKED, // plotGrouping\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues        // plotValues\n);\n// Set additional dataseries parameters\n//     Make it a horizontal bar rather than a vertical column graph\n$series->setPlotDirection(DataSeries::DIRECTION_BAR);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title = new Title('Test Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_bubble.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['Number of Products', 'Sales in USD', 'Market share'],\n        [14, 12200, 15],\n        [20, 60000, 33],\n        [18, 24400, 10],\n        [22, 32000, 42],\n        [],\n        [12, 8200, 18],\n        [15, 50000, 30],\n        [19, 22400, 15],\n        [25, 25000, 50],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, null, null, 1, ['2013']), // 2013\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, null, null, 1, ['2014']), // 2014\n];\n\n// Set the X-Axis values\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesCategories = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$7:$A$10', null, 4),\n];\n\n// Set the Y-Axis values\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$7:$B$10', null, 4),\n];\n\n// Set the Z-Axis values (bubble size)\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesBubbles = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$7:$C$10', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_BUBBLECHART, // plotType\n    null, // plotGrouping\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $dataSeriesCategories, // plotCategory\n    $dataSeriesValues // plotValues\n);\n$series->setPlotBubbleSizes($dataSeriesBubbles);\n\n// Set the series in the plot area\n$plotArea = new PlotArea();\n$plotArea->setPlotSeries([$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    null, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('E1');\n$chart->setBottomRightPosition('M15');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n$worksheet->getColumnDimension('A')->setAutoSize(true);\n$worksheet->getColumnDimension('B')->setAutoSize(true);\n$worksheet->getColumnDimension('C')->setAutoSize(true);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_column.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    DataSeries::GROUPING_STANDARD, // plotGrouping\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues        // plotValues\n);\n// Set additional dataseries parameters\n//     Make it a vertical column rather than a horizontal bar graph\n$series->setPlotDirection(DataSeries::DIRECTION_COL);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title = new Title('Test Column Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_column_2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', '', 'Budget', 'Forecast', 'Actual'],\n        ['2010', 'Q1', 47, 44, 43],\n        ['', 'Q2', 56, 53, 50],\n        ['', 'Q3', 52, 46, 45],\n        ['', 'Q4', 45, 40, 40],\n        ['2011', 'Q1', 51, 42, 46],\n        ['', 'Q2', 53, 58, 56],\n        ['', 'Q3', 64, 66, 69],\n        ['', 'Q4', 54, 55, 56],\n        ['2012', 'Q1', 49, 52, 58],\n        ['', 'Q2', 68, 73, 86],\n        ['', 'Q3', 72, 78, 0],\n        ['', 'Q4', 50, 60, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 'Budget'\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 'Forecast'\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$E$1', null, 1), // 'Actual'\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$B$13', null, 12), // Q1 to Q4 for 2010 to 2012\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$13', null, 12),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$13', null, 12),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$E$2:$E$13', null, 12),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    DataSeries::GROUPING_CLUSTERED, // plotGrouping\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues        // plotValues\n);\n// Set additional dataseries parameters\n//     Make it a vertical column rather than a horizontal bar graph\n$series->setPlotDirection(DataSeries::DIRECTION_COL);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_BOTTOM, null, false);\n\n$title = new Title('Test Grouped Column Chart');\n$xAxisLabel = new Title('Financial Period');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    $xAxisLabel, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('G2');\n$chart->setBottomRightPosition('P20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_composite.alternate.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 'Rainfall (mm)', 'Temperature (°F)', 'Humidity (%)'],\n        ['Jan', 78, 52, 61],\n        ['Feb', 64, 54, 62],\n        ['Mar', 62, 57, 63],\n        ['Apr', 21, 62, 59],\n        ['May', 11, 75, 60],\n        ['Jun', 1, 75, 57],\n        ['Jul', 1, 79, 56],\n        ['Aug', 1, 79, 59],\n        ['Sep', 10, 75, 60],\n        ['Oct', 40, 68, 63],\n        ['Nov', 69, 62, 64],\n        ['Dec', 89, 57, 66],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // Temperature\n];\n$dataSeriesLabels2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // Rainfall\n];\n$dataSeriesLabels3 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // Humidity\n];\n\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec\n];\n\n$order = 0;\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues1 = [\n    $order => new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$13', null, 12),\n];\n\n// Build the dataseries\n$series1 = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    DataSeries::GROUPING_CLUSTERED, // plotGrouping\n    [$order => $order], // plotOrder\n    $dataSeriesLabels1, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues1        // plotValues\n);\n// Set additional dataseries parameters\n//     Make it a vertical column rather than a horizontal bar graph\n$series1->setPlotDirection(DataSeries::DIRECTION_COL);\n\n$order = 1;\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues2 = [\n    $order => new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$13', null, 12),\n];\n\n// Build the dataseries\n$series2 = new DataSeries(\n    DataSeries::TYPE_LINECHART, // plotType\n    DataSeries::GROUPING_STANDARD, // plotGrouping\n    [$order => $order], // plotOrder\n    $dataSeriesLabels2, // plotLabel\n    [], // plotCategory\n    $dataSeriesValues2        // plotValues\n);\n\n$order = 2;\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues3 = [\n    $order => new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$13', null, 12),\n];\n\n// Build the dataseries\n$series3 = new DataSeries(\n    DataSeries::TYPE_AREACHART, // plotType\n    DataSeries::GROUPING_STANDARD, // plotGrouping\n    [$order => $order], // plotOrder\n    $dataSeriesLabels3, // plotLabel\n    [], // plotCategory\n    $dataSeriesValues3        // plotValues\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series1, $series2, $series3]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title = new Title('Average Weather Chart for Crete');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('F2');\n$chart->setBottomRightPosition('O16');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_composite.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 'Rainfall (mm)', 'Temperature (°F)', 'Humidity (%)'],\n        ['Jan', 78, 52, 61],\n        ['Feb', 64, 54, 62],\n        ['Mar', 62, 57, 63],\n        ['Apr', 21, 62, 59],\n        ['May', 11, 75, 60],\n        ['Jun', 1, 75, 57],\n        ['Jul', 1, 79, 56],\n        ['Aug', 1, 79, 59],\n        ['Sep', 10, 75, 60],\n        ['Oct', 40, 68, 63],\n        ['Nov', 69, 62, 64],\n        ['Dec', 89, 57, 66],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // Temperature\n];\n$dataSeriesLabels2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // Rainfall\n];\n$dataSeriesLabels3 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // Humidity\n];\n\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec\n];\n\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$13', null, 12),\n];\n\n// Build the dataseries\n$series1 = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    DataSeries::GROUPING_CLUSTERED, // plotGrouping\n    range(0, count($dataSeriesValues1) - 1), // plotOrder\n    $dataSeriesLabels1, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues1        // plotValues\n);\n// Set additional dataseries parameters\n//     Make it a vertical column rather than a horizontal bar graph\n$series1->setPlotDirection(DataSeries::DIRECTION_COL);\n\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$13', null, 12),\n];\n\n// Build the dataseries\n$series2 = new DataSeries(\n    DataSeries::TYPE_LINECHART, // plotType\n    DataSeries::GROUPING_STANDARD, // plotGrouping\n    range(0, count($dataSeriesValues2) - 1), // plotOrder\n    $dataSeriesLabels2, // plotLabel\n    [], // plotCategory\n    $dataSeriesValues2        // plotValues\n);\n\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues3 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$13', null, 12),\n];\n\n// Build the dataseries\n$series3 = new DataSeries(\n    DataSeries::TYPE_AREACHART, // plotType\n    DataSeries::GROUPING_STANDARD, // plotGrouping\n    range(0, count($dataSeriesValues2) - 1), // plotOrder\n    $dataSeriesLabels3, // plotLabel\n    [], // plotCategory\n    $dataSeriesValues3        // plotValues\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series1, $series2, $series3]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title = new Title('Average Weather Chart for Crete');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('F2');\n$chart->setBottomRightPosition('O16');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_line.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n$dataSeriesLabels[0]->setFillColor('FF0000');\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n$dataSeriesValues[2]->setLineWidth(60000 / Properties::POINTS_WIDTH_MULTIPLIER);\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_LINECHART, // plotType\n    null, // plotGrouping, was DataSeries::GROUPING_STACKED, not a usual choice for line chart\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues        // plotValues\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test Line Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33a/33_Chart_create_line_dateaxis.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var \\PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$dataSheet = $spreadsheet->getActiveSheet();\n$dataSheet->setTitle('Data');\n// changed data to simulate a trend chart - Xaxis are dates; Yaxis are 3 meausurements from each date\n// Dates changed not to fall on exact quarter start\n$dataSheet->fromArray(\n    [\n        ['', 'date', 'metric1', 'metric2', 'metric3'],\n        ['=DATEVALUE(B2)', '2021-01-10', 12.1, 15.1, 21.1],\n        ['=DATEVALUE(B3)', '2021-04-21', 56.2, 73.2, 86.2],\n        ['=DATEVALUE(B4)', '2021-07-31', 52.2, 61.2, 69.2],\n        ['=DATEVALUE(B5)', '2021-10-11', 30.2, 22.2, 0.2],\n        ['=DATEVALUE(B6)', '2022-01-21', 40.1, 38.1, 65.1],\n        ['=DATEVALUE(B7)', '2022-04-11', 45.2, 44.2, 96.2],\n        ['=DATEVALUE(B8)', '2022-07-01', 52.2, 51.2, 55.2],\n        ['=DATEVALUE(B9)', '2022-10-31', 41.2, 72.2, 56.2],\n    ]\n);\n\n$dataSheet->getStyle('A2:A9')->getNumberFormat()->setFormatCode(Properties::FORMAT_CODE_DATE_ISO8601);\n$dataSheet->getColumnDimension('A')->setAutoSize(true);\n$dataSheet->getColumnDimension('B')->setAutoSize(true);\n$dataSheet->setSelectedCells('A1');\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$C$1', null, 1),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$D$1', null, 1),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$E$1', null, 1),\n];\n// Set the X-Axis Labels\n// NUMBER, not STRING\n// added x-axis values for each of the 3 metrics\n// added FORMATE_CODE_NUMBER\n// Number of datapoints in series\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$9', Properties::FORMAT_CODE_DATE_ISO8601, 8),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$9', Properties::FORMAT_CODE_DATE_ISO8601, 8),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$9', Properties::FORMAT_CODE_DATE_ISO8601, 8),\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n//     Data Marker Color fill/[fill,Border]\n//     Data Marker size\n//   Color(s) added\n// added FORMAT_CODE_NUMBER\n$dataSeriesValues = [\n    new DataSeriesValues(\n        DataSeriesValues::DATASERIES_TYPE_NUMBER,\n        'Data!$C$2:$C$9',\n        Properties::FORMAT_CODE_NUMBER,\n        8,\n        null,\n        'diamond',\n        null,\n        5\n    ),\n    new DataSeriesValues(\n        DataSeriesValues::DATASERIES_TYPE_NUMBER,\n        'Data!$D$2:$D$9',\n        Properties::FORMAT_CODE_NUMBER,\n        8,\n        null,\n        'square',\n        '*accent1',\n        6\n    ),\n    new DataSeriesValues(\n        DataSeriesValues::DATASERIES_TYPE_NUMBER,\n        'Data!$E$2:$E$9',\n        Properties::FORMAT_CODE_NUMBER,\n        8,\n        null,\n        null,\n        null,\n        7\n    ), // let Excel choose marker shape\n];\n// series 1 - metric1\n// marker details\n$dataSeriesValues[0]\n    ->getMarkerFillColor()\n    ->setColorProperties('0070C0', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[0]\n    ->getMarkerBorderColor()\n    ->setColorProperties('002060', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n\n// line details - dashed, smooth line (Bezier) with arrows, 40% transparent\n$dataSeriesValues[0]\n    ->setSmoothLine(true)\n    ->setScatterLines(true)\n    ->setLineColorProperties('accent1', 40, ChartColor::EXCEL_COLOR_TYPE_SCHEME); // value, alpha, type\n$dataSeriesValues[0]->setLineStyleProperties(\n    2.5, // width in points\n    Properties::LINE_STYLE_COMPOUND_TRIPLE, // compound\n    Properties::LINE_STYLE_DASH_SQUARE_DOT, // dash\n    Properties::LINE_STYLE_CAP_SQUARE, // cap\n    Properties::LINE_STYLE_JOIN_MITER, // join\n    Properties::LINE_STYLE_ARROW_TYPE_OPEN, // head type\n    Properties::LINE_STYLE_ARROW_SIZE_4, // head size preset index\n    Properties::LINE_STYLE_ARROW_TYPE_ARROW, // end type\n    Properties::LINE_STYLE_ARROW_SIZE_6 // end size preset index\n);\n\n// series 2 - metric2, straight line - no special effects, connected\n$dataSeriesValues[1] // square marker border color\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent6', 3, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[1] // square marker fill color\n    ->getMarkerFillColor()\n    ->setColorProperties('0FFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[1]\n    ->setScatterLines(true)\n    ->setSmoothLine(false)\n    ->setLineColorProperties('FF0000', 80, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[1]->setLineWidth(2.0);\n\n// series 3 - metric3, markers, no line\n$dataSeriesValues[2] // triangle? fill\n    //->setPointMarker('triangle') // let Excel choose shape, which is predicted to be a triangle\n    ->getMarkerFillColor()\n    ->setColorProperties('FFFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[2] // triangle border\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent4', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[2]->setScatterLines(false); // points not connected\n// Added so that Xaxis shows dates instead of Excel-equivalent-year1900-numbers\n$xAxis = new Axis();\n$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE_ISO8601);\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_SMOOTHMARKER // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test Scatter Chart');\n$yAxisLabel = new Title('Value ($k)');\n$yAxis = new Axis();\n$yAxis->setMajorGridlines(new GridLines());\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel,  // yAxisLabel\n    // added xAxis for correct date display\n    $xAxis, // xAxis\n    $yAxis, // yAxis\n);\n\n// Set the position of the chart in the chart sheet\n$chart->setTopLeftPosition('A1');\n$chart->setBottomRightPosition('P12');\n\n// create a 'Chart' worksheet, add $chart to it\n$spreadsheet->createSheet();\n$chartSheet = $spreadsheet->getSheet(1);\n$chartSheet->setTitle('Scatter+Line Chart');\n\n$chartSheet = $spreadsheet->getSheetByNameOrThrow('Scatter+Line Chart');\n// Add the chart to the worksheet\n$chartSheet->addChart($chart);\n\n// ------- Demonstrate Date Xaxis in Line Chart, not possible using Scatter Chart ------------\n\n// Set the Labels (Column header) for each data series we want to plot\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$E$1', null, 1),\n];\n\n// Set the X-Axis Labels - dates, N.B. 01/10/2021 === Jan 10, NOT Oct 1 !!\n// x-axis values are the Excel numeric representation of the date - so set\n// formatCode=General for the xAxis VALUES, but we want the labels to be\n// DISPLAYED as 'yyyy-mm-dd'  That is, read a number, display a date.\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$9', Properties::FORMAT_CODE_DATE_ISO8601, 8),\n];\n\n// X axis (date) settings\n$xAxisLabel = new Title('Date');\n$xAxis = new Axis();\n$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE_ISO8601); // yyyy-mm-dd\n\n// Set the Data values for each data series we want to plot\n$dataSeriesValues = [\n    new DataSeriesValues(\n        DataSeriesValues::DATASERIES_TYPE_NUMBER,\n        'Data!$E$2:$E$9',\n        Properties::FORMAT_CODE_NUMBER,\n        8,\n        null,\n        'triangle',\n        null,\n        7\n    ),\n];\n\n// series - metric3, markers, no line\n$dataSeriesValues[0]\n    ->setScatterlines(false); // disable connecting lines\n$dataSeriesValues[0]\n    ->getMarkerFillColor()\n    ->setColorProperties('FFFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[0]\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent4', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n\n// Build the dataseries\n// must now use LineChart instead of ScatterChart, since ScatterChart does not\n// support \"dateAx\" axis type.\n$series = new DataSeries(\n    DataSeries::TYPE_LINECHART, // plotType\n    'standard', // plotGrouping\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_LINEMARKER  // plotStyle\n    // DataSeries::STYLE_SMOOTHMARKER // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title = new Title('Test Line-Chart with Date Axis - metric3 values');\n\n// X axis (date) settings\n$xAxisLabel = new Title('Game Date');\n$xAxis = new Axis();\n// date axis values are Excel numbers, not yyyy-mm-dd Date strings\n$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE_ISO8601);\n\n$xAxis->setAxisType('dateAx'); // dateAx available ONLY for LINECHART, not SCATTERCHART\n\n// measure the time span in Quarters, of data.\n$dateMinMax = dateRange(8, $spreadsheet); // array 'min'=>earliest date of first Q, 'max'=>latest date of final Q\n// change xAxis tick marks to match Qtr boundaries\n\n$nQtrs = sprintf('%3.2f', (($dateMinMax['max'] - $dateMinMax['min']) / 30.5) / 4);\n$tickMarkInterval = ($nQtrs > 20) ? '6' : '3'; // tick marks every ? months\n\n$xAxis->setAxisOptionsProperties(\n    Properties::AXIS_LABELS_NEXT_TO, // axis_label pos\n    null, // horizontalCrossesValue\n    null, // horizontalCrosses\n    null, // axisOrientation\n    'in', // major_tick_mark\n    null, // minor_tick_mark\n    $dateMinMax['min'], // minimum calculate this from the earliest data: 'Data!$A$2'\n    $dateMinMax['max'], // maximum calculate this from the last data:     'Data!$A$'.($nrows+1)\n    $tickMarkInterval,  // majorUnit determines tickmarks & Gridlines ?\n    null, // minorUnit\n    null, // textRotation\n    null, // hidden\n    'days', // baseTimeUnit\n    'months', // majorTimeUnit,\n    'months',   // minorTimeUnit\n);\n\n$yAxisLabel = new Title('Value ($k)');\n$yAxis = new Axis();\n$yAxis->setMajorGridlines(new GridLines());\n$xAxis->setMajorGridlines(new GridLines());\n$minorGridLines = new GridLines();\n$minorGridLines->activateObject();\n$xAxis->setMinorGridlines($minorGridLines);\n\n// Create the chart\n$chart = new Chart(\n    'chart2', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel,  // yAxisLabel\n    // added xAxis for correct date display\n    $xAxis, // xAxis\n    $yAxis, // yAxis\n);\n\n// Set the position of the chart in the chart sheet below the first chart\n$chart->setTopLeftPosition('A13');\n$chart->setBottomRightPosition('P25');\n$chart->setRoundedCorners(true); // Rounded corners in Chart Outline\n\n// Add the chart to the worksheet $chartSheet\n$chartSheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n$spreadsheet->setActiveSheetIndex(1);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true, resetActiveSheet: false);\n$spreadsheet->disconnectWorksheets();\n\n/** @return array{'min': float|int, 'max': float|int} */\nfunction dateRange(int $nrows, Spreadsheet $wrkbk): array\n{\n    $dataSheet = $wrkbk->getSheetByNameOrThrow('Data');\n\n    // start the xaxis at the beginning of the quarter of the first date\n    /** @var string */\n    $startDateStr = $dataSheet->getCell('B2')->getValue(); // yyyy-mm-dd date string\n    $startDate = DateTime::createFromFormat('Y-m-d', $startDateStr); // php date obj\n    if ($startDate === false) {\n        throw new Exception(\"invalid start date $startDateStr on spreadsheet\");\n    }\n\n    // get date of first day of the quarter of the start date\n    $startMonth = (int) $startDate->format('n'); // suppress leading zero\n    $startYr = (int) $startDate->format('Y');\n    $qtr = intdiv($startMonth, 3) + (($startMonth % 3 > 0) ? 1 : 0);\n    $qtrStartMonth = sprintf('%02d', 1 + (($qtr - 1) * 3));\n    $qtrStartStr = \"$startYr-$qtrStartMonth-01\";\n    $ExcelQtrStartDateVal = SharedDate::convertIsoDate($qtrStartStr);\n\n    // end the xaxis at the end of the quarter of the last date\n    /** @var string */\n    $lastDateStr = $dataSheet->getCell([2, $nrows + 1])->getValue();\n    $lastDate = DateTime::createFromFormat('Y-m-d', $lastDateStr);\n    if ($lastDate === false) {\n        throw new Exception(\"invalid last date $lastDateStr on spreadsheet\");\n    }\n    $lastMonth = (int) $lastDate->format('n');\n    $lastYr = (int) $lastDate->format('Y');\n    $qtr = intdiv($lastMonth, 3) + (($lastMonth % 3 > 0) ? 1 : 0);\n    $qtrEndMonth = 3 + (($qtr - 1) * 3);\n    $qtrEndMonth = sprintf('%02d', $qtrEndMonth);\n    $lastDOMDate = DateTime::createFromFormat('Y-m-d', \"$lastYr-$qtrEndMonth-01\");\n    if ($lastDOMDate === false) {\n        throw new Exception(\"invalid last dom date $lastYr-$qtrEndMonth-01 on spreadsheet\");\n    }\n    $lastDOM = $lastDOMDate->format('t');\n    $qtrEndStr = \"$lastYr-$qtrEndMonth-$lastDOM\";\n    $ExcelQtrEndDateVal = SharedDate::convertIsoDate($qtrEndStr);\n\n    $minMaxDates = ['min' => $ExcelQtrStartDateVal, 'max' => $ExcelQtrEndDateVal];\n\n    return $minMaxDates;\n}\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_multiple_charts.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series1 = new DataSeries(\n    DataSeries::TYPE_AREACHART, // plotType\n    DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n    range(0, count($dataSeriesValues1) - 1), // plotOrder\n    $dataSeriesLabels1, // plotLabel\n    $xAxisTickValues1, // plotCategory\n    $dataSeriesValues1          // plotValues\n);\n\n// Set the series in the plot area\n$plotArea1 = new PlotArea(null, [$series1]);\n// Set the chart legend\n$legend1 = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title1 = new Title('Test %age-Stacked Area Chart');\n$yAxisLabel1 = new Title('Value ($k)');\n\n// Create the chart\n$chart1 = new Chart(\n    'chart1', // name\n    $title1, // title\n    $legend1, // legend\n    $plotArea1, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel1 // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart1->setTopLeftPosition('A7');\n$chart1->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart1);\n\n$helper->renderChart($chart1, __FILE__);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series2 = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    DataSeries::GROUPING_STANDARD, // plotGrouping\n    range(0, count($dataSeriesValues2) - 1), // plotOrder\n    $dataSeriesLabels2, // plotLabel\n    $xAxisTickValues2, // plotCategory\n    $dataSeriesValues2        // plotValues\n);\n// Set additional dataseries parameters\n//     Make it a vertical column rather than a horizontal bar graph\n$series2->setPlotDirection(DataSeries::DIRECTION_COL);\n\n// Set the series in the plot area\n$plotArea2 = new PlotArea(null, [$series2]);\n// Set the chart legend\n$legend2 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title2 = new Title('Test Column Chart');\n$yAxisLabel2 = new Title('Value ($k)');\n\n// Create the chart\n$chart2 = new Chart(\n    'chart2', // name\n    $title2, // title\n    $legend2, // legend\n    $plotArea2, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel2 // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart2->setTopLeftPosition('I7');\n$chart2->setBottomRightPosition('P20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart2);\n\n$helper->renderChart($chart2, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_pie.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n];\n\n// Build the dataseries\n$series1 = new DataSeries(\n    DataSeries::TYPE_PIECHART, // plotType\n    null, // plotGrouping (Pie charts don't have any grouping)\n    range(0, count($dataSeriesValues1) - 1), // plotOrder\n    $dataSeriesLabels1, // plotLabel\n    $xAxisTickValues1, // plotCategory\n    $dataSeriesValues1          // plotValues\n);\n\n// Set up a layout object for the Pie chart\n$layout1 = new Layout();\n$layout1->setShowVal(true);\n$layout1->setShowPercent(true);\n\n// Set the series in the plot area\n$plotArea1 = new PlotArea($layout1, [$series1]);\n// Set the chart legend\n$legend1 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title1 = new Title('Test Pie Chart');\n\n// Create the chart\n$chart1 = new Chart(\n    'chart1', // name\n    $title1, // title\n    $legend1, // legend\n    $plotArea1, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Pie charts don't have a Y-Axis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart1->setTopLeftPosition('A7');\n$chart1->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart1);\n\n$helper->renderChart($chart1, __FILE__);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n];\n\n// Build the dataseries\n$series2 = new DataSeries(\n    DataSeries::TYPE_DONUTCHART, // plotType\n    null, // plotGrouping (Donut charts don't have any grouping)\n    range(0, count($dataSeriesValues2) - 1), // plotOrder\n    $dataSeriesLabels2, // plotLabel\n    $xAxisTickValues2, // plotCategory\n    $dataSeriesValues2        // plotValues\n);\n\n// Set up a layout object for the Pie chart\n$layout2 = new Layout();\n$layout2->setShowVal(true);\n$layout2->setShowCatName(true);\n\n// Set the series in the plot area\n$plotArea2 = new PlotArea($layout2, [$series2]);\n\n$title2 = new Title('Test Donut Chart');\n\n// Create the chart\n$chart2 = new Chart(\n    'chart2', // name\n    $title2, // title\n    null, // legend\n    $plotArea2, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Like Pie charts, Donut charts don't have a Y-Axis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart2->setTopLeftPosition('I7');\n$chart2->setBottomRightPosition('P20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart2);\n\n$helper->renderChart($chart2, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_pie_custom_colors.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Custom colors for dataSeries (gray, blue, red, orange)\n$colors = [\n    'cccccc', '00abb8', 'b8292f', 'eb8500',\n];\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n//     Custom colors\n$dataSeriesValues1 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4, [], null, $colors),\n];\n\n// Build the dataseries\n$series1 = new DataSeries(\n    DataSeries::TYPE_PIECHART, // plotType\n    null, // plotGrouping (Pie charts don't have any grouping)\n    range(0, count($dataSeriesValues1) - 1), // plotOrder\n    $dataSeriesLabels1, // plotLabel\n    $xAxisTickValues1, // plotCategory\n    $dataSeriesValues1          // plotValues\n);\n\n// Set up a layout object for the Pie chart\n$layout1 = new Layout();\n$layout1->setShowVal(true);\n$layout1->setShowPercent(true);\n\n// Set the series in the plot area\n$plotArea1 = new PlotArea($layout1, [$series1]);\n// Set the chart legend\n$legend1 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title1 = new Title('Test Pie Chart');\n\n// Create the chart\n$chart1 = new Chart(\n    'chart1', // name\n    $title1, // title\n    $legend1, // legend\n    $plotArea1, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Pie charts don't have a Y-Axis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart1->setTopLeftPosition('A7');\n$chart1->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart1);\n\n$helper->renderChart($chart1, __FILE__);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues2 = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n//     Custom colors\n$dataSeriesValues2 = [\n    $dataSeriesValues2Element = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n];\n$dataSeriesValues2Element->setFillColor($colors);\n\n// Build the dataseries\n$series2 = new DataSeries(\n    DataSeries::TYPE_DONUTCHART, // plotType\n    null, // plotGrouping (Donut charts don't have any grouping)\n    range(0, count($dataSeriesValues2) - 1), // plotOrder\n    $dataSeriesLabels2, // plotLabel\n    $xAxisTickValues2, // plotCategory\n    $dataSeriesValues2        // plotValues\n);\n\n// Set up a layout object for the Pie chart\n$layout2 = new Layout();\n$layout2->setShowVal(true);\n$layout2->setShowCatName(true);\n\n// Set the series in the plot area\n$plotArea2 = new PlotArea($layout2, [$series2]);\n\n$title2 = new Title('Test Donut Chart');\n\n// Create the chart\n$chart2 = new Chart(\n    'chart2', // name\n    $title2, // title\n    null, // legend\n    $plotArea2, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Like Pie charts, Donut charts don't have a Y-Axis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart2->setTopLeftPosition('I7');\n$chart2->setBottomRightPosition('P20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart2);\n\n$helper->renderChart($chart2, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_radar.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Jan', 47, 45, 71],\n        ['Feb', 56, 73, 86],\n        ['Mar', 52, 61, 69],\n        ['Apr', 40, 52, 60],\n        ['May', 42, 55, 71],\n        ['Jun', 58, 63, 76],\n        ['Jul', 53, 61, 89],\n        ['Aug', 46, 69, 85],\n        ['Sep', 62, 75, 81],\n        ['Oct', 51, 70, 96],\n        ['Nov', 55, 66, 89],\n        ['Dec', 68, 62, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$13', null, 12),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$13', null, 12),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_RADARCHART, // plotType\n    null, // plotGrouping (Radar charts don't have any grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_MARKER  // plotStyle\n);\n\n// Set up a layout object for the Pie chart\n$layout = new Layout();\n\n// Set the series in the plot area\n$plotArea = new PlotArea($layout, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title = new Title('Test Radar Chart');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null   // yAxisLabel - Radar charts don't have a Y-Axis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('F2');\n$chart->setBottomRightPosition('M15');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_scatter.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have any grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_LINEMARKER  // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test Scatter Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_scatter2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis as ChartAxis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\AxisText;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n// changed data to simulate a trend chart - Xaxis are dates; Yaxis are 3 meausurements from each date\n$worksheet->fromArray(\n    [\n        ['', 'metric1', 'metric2', 'metric3'],\n        ['=DATEVALUE(\"2021-01-01\")', 12.1, 15.1, 21.1],\n        ['=DATEVALUE(\"2021-01-04\")', 56.2, 73.2, 86.2],\n        ['=DATEVALUE(\"2021-01-07\")', 52.2, 61.2, 69.2],\n        ['=DATEVALUE(\"2021-01-10\")', 30.2, 32.2, 0.2],\n    ]\n);\n$worksheet->getStyle('A2:A5')->getNumberFormat()->setFormatCode(Properties::FORMAT_CODE_DATE_ISO8601);\n$worksheet->getColumnDimension('A')->setAutoSize(true);\n$worksheet->setSelectedCells('A1');\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // was 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // was 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // was 2012\n];\n// Set the X-Axis Labels\n// changed from STRING to NUMBER\n// added 2 additional x-axis values associated with each of the 3 metrics\n// added FORMATE_CODE_NUMBER\n$xAxisTickValues = [\n    //new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n// added FORMAT_CODE_NUMBER\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', Properties::FORMAT_CODE_NUMBER, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', Properties::FORMAT_CODE_NUMBER, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', Properties::FORMAT_CODE_NUMBER, 4),\n];\n\n// series 1\n// marker details\n$dataSeriesValues[0]\n    ->setPointMarker('diamond')\n    ->setPointSize(5)\n    ->getMarkerFillColor()\n    ->setColorProperties('0070C0', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[0]\n    ->getMarkerBorderColor()\n    ->setColorProperties('002060', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n\n// line details - smooth line, connected\n$dataSeriesValues[0]\n    ->setScatterLines(true)\n    ->setSmoothLine(true)\n    ->setLineColorProperties('accent1', 40, ChartColor::EXCEL_COLOR_TYPE_SCHEME); // value, alpha, type\n$dataSeriesValues[0]->setLineStyleProperties(\n    2.5, // width in points\n    Properties::LINE_STYLE_COMPOUND_TRIPLE, // compound\n    Properties::LINE_STYLE_DASH_SQUARE_DOT, // dash\n    Properties::LINE_STYLE_CAP_SQUARE, // cap\n    Properties::LINE_STYLE_JOIN_MITER, // join\n    Properties::LINE_STYLE_ARROW_TYPE_OPEN, // head type\n    Properties::LINE_STYLE_ARROW_SIZE_4, // head size preset index\n    Properties::LINE_STYLE_ARROW_TYPE_ARROW, // end type\n    Properties::LINE_STYLE_ARROW_SIZE_6 // end size preset index\n);\n\n// series 2 - straight line - no special effects, connected, straight line\n$dataSeriesValues[1] // square fill\n    ->setPointMarker('square')\n    ->setPointSize(6)\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent6', 3, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[1] // square border\n    ->getMarkerFillColor()\n    ->setColorProperties('0FFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[1]\n    ->setScatterLines(true)\n    ->setSmoothLine(false)\n    ->setLineColorProperties('FF0000', 80, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[1]->setLineWidth(2.0);\n\n// series 3 - markers, no line\n$dataSeriesValues[2] // triangle fill\n    //->setPointMarker('triangle') // let Excel choose shape\n    ->setPointSize(7)\n    ->getMarkerFillColor()\n    ->setColorProperties('FFFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[2] // triangle border\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent4', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[2]->setScatterLines(false); // points not connected\n\n// Added so that Xaxis shows dates instead of Excel-equivalent-year1900-numbers\n$xAxis = new ChartAxis();\n//$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE );\n$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE_ISO8601, true);\n//$xAxis->setAxisOption('textRotation', '45');\n$xAxisText = new AxisText();\n$xAxisText->setRotation(45)->getFillColorObject()->setValue('00FF00')->setType(ChartColor::EXCEL_COLOR_TYPE_RGB);\n$xAxis->setAxisText($xAxisText);\n\n$yAxis = new ChartAxis();\n$yAxis->setLineStyleProperties(\n    2.5,     // width in points\n    Properties::LINE_STYLE_COMPOUND_SIMPLE,\n    Properties::LINE_STYLE_DASH_DASH_DOT,\n    Properties::LINE_STYLE_CAP_FLAT,\n    Properties::LINE_STYLE_JOIN_BEVEL\n);\n$yAxis->setLineColorProperties('ffc000', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$yAxisText = new AxisText();\n$yAxisText->setGlowProperties(20.0, 'accent1', 20, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$yAxis->setAxisText($yAxisText);\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have any grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_SMOOTHMARKER  // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test Scatter Trend Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel,  // yAxisLabel\n    // added xAxis for correct date display\n    $xAxis, // xAxis\n    $yAxis, // yAxis\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('P20');\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_scatter3.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis as ChartAxis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n// changed data to simulate a trend chart - Xaxis are dates; Yaxis are 3 meausurements from each date\n$worksheet->fromArray(\n    [\n        ['', 'metric1', 'metric2', 'metric3'],\n        ['=DATEVALUE(\"2021-01-01\")', 12.1, 15.1, 21.1],\n        ['=DATEVALUE(\"2021-01-04\")', 56.2, 73.2, 86.2],\n        ['=DATEVALUE(\"2021-01-07\")', 52.2, 61.2, 69.2],\n        ['=DATEVALUE(\"2021-01-10\")', 30.2, 32.2, 0.2],\n    ]\n);\n$worksheet->getStyle('A2:A5')->getNumberFormat()->setFormatCode(Properties::FORMAT_CODE_DATE_ISO8601);\n$worksheet->getColumnDimension('A')->setAutoSize(true);\n$worksheet->setSelectedCells('A1');\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // was 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // was 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // was 2012\n];\n// Set the X-Axis Labels\n// changed from STRING to NUMBER\n// added 2 additional x-axis values associated with each of the 3 metrics\n// added FORMATE_CODE_NUMBER\n$xAxisTickValues = [\n    //new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n// added FORMAT_CODE_NUMBER\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', Properties::FORMAT_CODE_NUMBER, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', Properties::FORMAT_CODE_NUMBER, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', Properties::FORMAT_CODE_NUMBER, 4),\n];\n\n// series 1\n// marker details\n$dataSeriesValues[0]\n    ->setPointMarker('diamond')\n    ->setPointSize(5)\n    ->getMarkerFillColor()\n    ->setColorProperties('0070C0', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[0]\n    ->getMarkerBorderColor()\n    ->setColorProperties('002060', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n\n// line details - smooth line, connected\n$dataSeriesValues[0]\n    ->setScatterLines(true)\n    ->setSmoothLine(true)\n    ->setLineColorProperties('accent1', 40, ChartColor::EXCEL_COLOR_TYPE_SCHEME); // value, alpha, type\n$dataSeriesValues[0]->setLineStyleProperties(\n    2.5, // width in points\n    Properties::LINE_STYLE_COMPOUND_TRIPLE, // compound\n    Properties::LINE_STYLE_DASH_SQUARE_DOT, // dash\n    Properties::LINE_STYLE_CAP_SQUARE, // cap\n    Properties::LINE_STYLE_JOIN_MITER, // join\n    Properties::LINE_STYLE_ARROW_TYPE_OPEN, // head type\n    Properties::LINE_STYLE_ARROW_SIZE_4, // head size preset index\n    Properties::LINE_STYLE_ARROW_TYPE_ARROW, // end type\n    Properties::LINE_STYLE_ARROW_SIZE_6 // end size preset index\n);\n\n// series 2 - straight line - no special effects, connected, straight line\n$dataSeriesValues[1] // square fill\n    ->setPointMarker('square')\n    ->setPointSize(6)\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent6', 3, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[1] // square border\n    ->getMarkerFillColor()\n    ->setColorProperties('0FFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[1]\n    ->setScatterLines(true)\n    ->setSmoothLine(false)\n    ->setLineColorProperties('FF0000', 80, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[1]->setLineWidth(2.0);\n\n// series 3 - markers, no line\n$dataSeriesValues[2] // triangle fill\n    //->setPointMarker('triangle') // let Excel choose shape\n    ->setPointSize(7)\n    ->getMarkerFillColor()\n    ->setColorProperties('FFFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[2] // triangle border\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent4', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[2]->setScatterLines(false); // points not connected\n\n// Added so that Xaxis shows dates instead of Excel-equivalent-year1900-numbers\n$xAxis = new ChartAxis();\n//$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE );\n$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE_ISO8601, true);\n$xAxis->setAxisOption('textRotation', '45');\n$xAxis->setAxisOption('hidden', '1');\n\n$yAxis = new ChartAxis();\n$yAxis->setLineStyleProperties(\n    2.5,     // width in points\n    Properties::LINE_STYLE_COMPOUND_SIMPLE,\n    Properties::LINE_STYLE_DASH_DASH_DOT,\n    Properties::LINE_STYLE_CAP_FLAT,\n    Properties::LINE_STYLE_JOIN_BEVEL\n);\n$yAxis->setLineColorProperties('ffc000', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$yAxis->setAxisOption('hidden', '1');\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have any grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_SMOOTHMARKER  // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n$plotArea->setNoFill(true);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test Scatter Trend Chart');\n//$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null, //$yAxisLabel,  // yAxisLabel\n    // added xAxis for correct date display\n    $xAxis, // xAxis\n    $yAxis, // yAxis\n);\n$chart->setNoFill(true);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('P20');\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_scatter4.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have any grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_LINEMARKER  // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n\n$pos1 = 0; // pos = 0% (extreme low side or lower left corner)\n$brightness1 = 0; // 0%\n$gsColor1 = new ChartColor();\n$gsColor1->setColorProperties('FF0000', 75, 'srgbClr', $brightness1); // red\n$gradientStop1 = [$pos1, $gsColor1];\n\n$pos2 = 0.5; // pos = 50% (middle)\n$brightness2 = 0.5; // 50%\n$gsColor2 = new ChartColor();\n$gsColor2->setColorProperties('FFFF00', 50, 'srgbClr', $brightness2); // yellow\n$gradientStop2 = [$pos2, $gsColor2];\n\n$pos3 = 1.0; // pos = 100% (extreme high side or upper right corner)\n$brightness3 = 0.5; // 50%\n$gsColor3 = new ChartColor();\n$gsColor3->setColorProperties('00B050', 50, 'srgbClr', $brightness3); // green\n$gradientStop3 = [$pos3, $gsColor3];\n\n$gradientFillStops = [\n    $gradientStop1,\n    $gradientStop2,\n    $gradientStop3,\n];\n$gradientFillAngle = 315.0; // 45deg above horiz\n\n$plotArea->setGradientFillProperties($gradientFillStops, $gradientFillAngle);\n\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test Scatter Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_scatter5_trendlines.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis as ChartAxis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\TrendLine;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n\n/** @var Spreadsheet */\n$spreadsheet = new Spreadsheet();\n$dataSheet = $spreadsheet->getActiveSheet();\n$dataSheet->setTitle('Data');\n// changed data to simulate a trend chart - Xaxis are dates; Yaxis are 3 meausurements from each date\n$dataSheet->fromArray(\n    [\n        ['', 'metric1', 'metric2', 'metric3'],\n        ['=DATEVALUE(\"2021-01-01\")', 12.1, 15.1, 21.1],\n        ['=DATEVALUE(\"2021-04-01\")', 56.2, 73.2, 86.2],\n        ['=DATEVALUE(\"2021-07-01\")', 52.2, 61.2, 69.2],\n        ['=DATEVALUE(\"2021-10-01\")', 30.2, 22.2, 0.2],\n        ['=DATEVALUE(\"2022-01-01\")', 40.1, 38.1, 65.1],\n        ['=DATEVALUE(\"2022-04-01\")', 45.2, 44.2, 96.2],\n        ['=DATEVALUE(\"2022-07-01\")', 52.2, 51.2, 55.2],\n        ['=DATEVALUE(\"2022-10-01\")', 41.2, 72.2, 56.2],\n    ]\n);\n\n$dataSheet->getStyle('A2:A9')->getNumberFormat()->setFormatCode(Properties::FORMAT_CODE_DATE_ISO8601);\n$dataSheet->getColumnDimension('A')->setAutoSize(true);\n$dataSheet->setSelectedCells('A1');\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$B$1', null, 1),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$C$1', null, 1),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$D$1', null, 1),\n];\n// Set the X-Axis Labels\n// NUMBER, not STRING\n// added x-axis values for each of the 3 metrics\n// added FORMATE_CODE_NUMBER\n// Number of datapoints in series\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$9', Properties::FORMAT_CODE_DATE_ISO8601, 8),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$9', Properties::FORMAT_CODE_DATE_ISO8601, 8),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$9', Properties::FORMAT_CODE_DATE_ISO8601, 8),\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n//     Data Marker Color fill/[fill,Border]\n//     Data Marker size\n//   Color(s) added\n// added FORMAT_CODE_NUMBER\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$B$2:$B$9', Properties::FORMAT_CODE_NUMBER, 8, null, 'diamond', null, 5),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$C$2:$C$9', Properties::FORMAT_CODE_NUMBER, 8, null, 'square', '*accent1', 6),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$D$2:$D$9', Properties::FORMAT_CODE_NUMBER, 8, null, null, null, 7), // let Excel choose marker shape\n];\n// series 1 - metric1\n// marker details\n$dataSeriesValues[0]\n    ->getMarkerFillColor()\n    ->setColorProperties('0070C0', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[0]\n    ->getMarkerBorderColor()\n    ->setColorProperties('002060', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n\n// line details - dashed, smooth line (Bezier) with arrows, 40% transparent\n$dataSeriesValues[0]\n    ->setSmoothLine(true)\n    ->setScatterLines(true)\n    ->setLineColorProperties('accent1', 40, ChartColor::EXCEL_COLOR_TYPE_SCHEME); // value, alpha, type\n$dataSeriesValues[0]->setLineStyleProperties(\n    2.5, // width in points\n    Properties::LINE_STYLE_COMPOUND_TRIPLE, // compound\n    Properties::LINE_STYLE_DASH_SQUARE_DOT, // dash\n    Properties::LINE_STYLE_CAP_SQUARE, // cap\n    Properties::LINE_STYLE_JOIN_MITER, // join\n    Properties::LINE_STYLE_ARROW_TYPE_OPEN, // head type\n    Properties::LINE_STYLE_ARROW_SIZE_4, // head size preset index\n    Properties::LINE_STYLE_ARROW_TYPE_ARROW, // end type\n    Properties::LINE_STYLE_ARROW_SIZE_6 // end size preset index\n);\n\n// series 2 - metric2, straight line - no special effects, connected\n$dataSeriesValues[1] // square marker border color\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent6', 3, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[1] // square marker fill color\n    ->getMarkerFillColor()\n    ->setColorProperties('0FFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[1]\n    ->setScatterLines(true)\n    ->setSmoothLine(false)\n    ->setLineColorProperties('FF0000', 80, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[1]->setLineWidth(2.0);\n\n// series 3 - metric3, markers, no line\n$dataSeriesValues[2] // triangle? fill\n    //->setPointMarker('triangle') // let Excel choose shape, which is predicted to be a triangle\n    ->getMarkerFillColor()\n    ->setColorProperties('FFFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[2] // triangle border\n    ->getMarkerBorderColor()\n    ->setColorProperties('accent4', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[2]->setScatterLines(false); // points not connected\n// Added so that Xaxis shows dates instead of Excel-equivalent-year1900-numbers\n$xAxis = new ChartAxis();\n$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE_ISO8601, true);\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_SMOOTHMARKER // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test Scatter Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel,  // yAxisLabel\n    // added xAxis for correct date display\n    $xAxis, // xAxis\n    //  $yAxis, // yAxis\n);\n\n// Set the position of the chart in the chart sheet\n$chart->setTopLeftPosition('A1');\n$chart->setBottomRightPosition('P12');\n\n// create a 'Chart' worksheet, add $chart to it\n$spreadsheet->createSheet();\n$chartSheet = $spreadsheet->getSheet(1);\n$chartSheet->setTitle('Scatter Chart');\n\n$chartSheet = $spreadsheet->getSheetByNameOrThrow('Scatter Chart');\n// Add the chart to the worksheet\n$chartSheet->addChart($chart);\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->renderChart($chart, __FILE__);\n\n// ------------ Demonstrate Trendlines for metric3 values in a new chart ------------\n\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$D$1', null, 1),\n];\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$9', Properties::FORMAT_CODE_DATE_ISO8601, 8),\n];\n\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$D$2:$D$9', Properties::FORMAT_CODE_NUMBER, 4, null, 'triangle', null, 7),\n];\n\n// add 3 trendlines:\n// 1- linear, double-ended arrow, w=0.5, same color as marker fill; nodispRSqr, nodispEq\n// 2- polynomial (order=3) no-arrow trendline, w=1.25, same color as marker fill; dispRSqr, dispEq\n// 3- moving Avg (period=2) single-arrow trendline, w=1.5, same color as marker fill; no dispRSqr, no dispEq\n$trendLines = [\n    new TrendLine(TrendLine::TRENDLINE_LINEAR, null, null, false, false),\n    new TrendLine(TrendLine::TRENDLINE_POLYNOMIAL, 3, null, true, true, 20.0, 28.0, 44104.5, 'metric3 polynomial fit'),\n    new TrendLine(TrendLine::TRENDLINE_MOVING_AVG, null, 2, true),\n];\n$dataSeriesValues[0]->setTrendLines($trendLines);\n\n// Suppress connecting lines; instead, add different Trendline algorithms to\n// determine how well the data fits the algorithm (Rsquared=\"goodness of fit\")\n// Display RSqr plus the eqn just because we can.\n\n$dataSeriesValues[0]->setScatterLines(false); // points not connected\n$dataSeriesValues[0]->getMarkerFillColor()\n    ->setColorProperties('FFFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$dataSeriesValues[0]->getMarkerBorderColor()\n    ->setColorProperties('accent4', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n\n// add properties to the trendLines - give each a different color\n$dataSeriesValues[0]->getTrendLines()[0]->getLineColor()->setColorProperties('accent4', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[0]->getTrendLines()[0]->setLineStyleProperties(0.5, null, null, null, null, Properties::LINE_STYLE_ARROW_TYPE_STEALTH, 5, Properties::LINE_STYLE_ARROW_TYPE_OPEN, 8);\n\n$dataSeriesValues[0]->getTrendLines()[1]->getLineColor()->setColorProperties('accent3', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[0]->getTrendLines()[1]->setLineStyleProperties(1.25);\n\n$dataSeriesValues[0]->getTrendLines()[2]->getLineColor()->setColorProperties('accent2', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n$dataSeriesValues[0]->getTrendLines()[2]->setLineStyleProperties(1.5, null, null, null, null, null, 0, Properties::LINE_STYLE_ARROW_TYPE_OPEN, 8);\n\n$xAxis = new ChartAxis();\n$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE_ISO8601); // m/d/yyyy\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_SMOOTHMARKER // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title('Test Scatter Chart - trendlines for metric3 values');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart2', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel,  // yAxisLabel\n    // added xAxis for correct date display\n    $xAxis, // xAxis\n    //  $yAxis, // yAxis\n);\n\n// Set the position of the chart in the chart sheet below the first chart\n$chart->setTopLeftPosition('A13');\n$chart->setBottomRightPosition('P25');\n\n// Add the chart to the worksheet $chartSheet\n$chartSheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n$spreadsheet->setActiveSheetIndex(1);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true, resetActiveSheet: false);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_scatter6_value_xaxis.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis as ChartAxis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$dataSheet = $spreadsheet->getActiveSheet();\n$dataSheet->setTitle('Data');\n\n$results = [\n    ['Station 1', 'Score'],\n    [13.25, 3],\n    [16.25, 4],\n    [18.5, 4],\n    [15.5, 3],\n    [15.75, 5],\n    [17.25, 4],\n    [10.5, 2],\n];\n\n$dataSheet->fromArray($results);\n\n$spreadsheet->createSheet();\n\n$chartSheet = $spreadsheet->getSheet(1);\n$chartSheet->setTitle('Appendix');\n\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Data!$A$1', null, 1),\n];\n\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$A$2:$A$' . count($results), Properties::FORMAT_CODE_NUMBER, 4, null, 'diamond', null, 7),\n];\n\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Data!$B$2:$B$' . count($results), Properties::FORMAT_CODE_NUMBER, 8),\n];\n\n$dataSeriesValues[0]->setScatterLines(false); // Points not connected\n\n$dataSeriesValues[0]->getMarkerFillColor()\n    ->setColorProperties('accent1', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_LINEMARKER // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title = new Title($results[0][0]);\n\n$xAxis = new ChartAxis();\n\n$xAxis->setAxisOptionsProperties(\n    Properties::AXIS_LABELS_NEXT_TO,\n    null, // horizontalCrossesValue\n    null, // horizontalCrosses\n    null, // axisOrientation\n    null, // majorTmt\n    Properties::TICK_MARK_OUTSIDE, // minorTmt\n    '0', // minimum\n    '6', // maximum\n    null, // majorUnit\n    '1', // minorUnit\n);\n\n$xAxis->setAxisType(ChartAxis::AXIS_TYPE_VALUE);\n\n$yAxis = new ChartAxis();\n\n$yAxis->setAxisOptionsProperties(\n    Properties::AXIS_LABELS_NEXT_TO,\n    null, // horizontalCrossesValue\n    null, // horizontalCrosses\n    null, // axisOrientation\n    null, // majorTmt\n    Properties::TICK_MARK_OUTSIDE, // minorTmt\n    '0', // minimum\n    '25', // 30 // maximum\n    null, // majorUnit\n    '5', // minorUnit\n);\n\n// Create the chart\n$chart = new Chart(\n    'chart2', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    null, // yAxisLabel\n    // added xAxis for correct date display\n    $xAxis, // xAxis\n    $yAxis, // yAxis\n);\n\n// Set the position of the chart in the chart sheet below the first chart\n$chart->setTopLeftPosition('B2');\n$chart->setBottomRightPosition('K22');\n\n// Add the chart to the worksheet $chartSheet\n$chartSheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n$spreadsheet->setActiveSheetIndex(1);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true, resetActiveSheet: false);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_scatter7_blanks.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, null, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ],\n    strictNullComparison: true\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_SCATTERCHART, // plotType\n    null, // plotGrouping (Scatter charts don't have any grouping)\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues, // plotValues\n    null, // plotDirection\n    false, // smooth line\n    DataSeries::STYLE_LINEMARKER  // plotStyle\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n$title1 = new Title('Test Scatter Chart Gap');\n$yAxisLabel1 = new Title('Value ($k)');\n// Create the chart\n$chart1 = new Chart(\n    'chart1', // name\n    $title1, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel1  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart1->setTopLeftPosition('A7');\n$chart1->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart1);\n\n$helper->renderChart($chart1, __FILE__);\n\n$title2 = new Title('Test Scatter Chart Zero');\n$yAxisLabel2 = new Title('Value ($k)');\n// Create the chart\n$chart2 = new Chart(\n    'chart2', // name\n    $title2, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_ZERO, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel2  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart2->setTopLeftPosition('A22');\n$chart2->setBottomRightPosition('H35');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart2);\n\n$helper->renderChart($chart2, __FILE__);\n\n$title3 = new Title('Test Scatter Chart Span');\n$yAxisLabel3 = new Title('Value ($k)');\n\n// Create the chart\n$chart3 = new Chart(\n    'chart3', // name\n    $title3, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_SPAN, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel3  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart3->setTopLeftPosition('A37');\n$chart3->setBottomRightPosition('H50');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart3);\n\n$helper->renderChart($chart3, __FILE__);\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_stock.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\AxisText;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['Counts', 'Max', 'Min', 'Min Threshold', 'Max Threshold'],\n        [10, 10, 5, 0, 50],\n        [30, 20, 10, 0, 50],\n        [20, 30, 15, 0, 50],\n        [40, 10, 0, 0, 50],\n        [100, 40, 5, 0, 50],\n    ],\n    null,\n    'A1',\n    true\n);\n$worksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_NUMBER_00);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / Open\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), //Min / Close\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), //Min Threshold / Min\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$E$1', null, 1), //Max Threshold / Max\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$6', null, 5), // Counts\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$6', null, 5),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$6', null, 5),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$6', null, 5),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$E$2:$E$6', null, 5),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_STOCKCHART, // plotType\n    null, // plotGrouping - if we set this to not null, then xlsx throws error\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues       // plotValues\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n$legend->getBorderLines()->setLineColorProperties('ffc000', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$legend->getFillColor()->setColorProperties('cccccc');\n$legendText = new AxisText();\n$legendText->getFillColorObject()->setValue('008080')->setType(ChartColor::EXCEL_COLOR_TYPE_RGB);\n$legendText->setShadowProperties(1);\n$legend->setLegendText($legendText);\n\n$title = new Title('Test Stock Chart');\n$xAxisLabel = new Title('Counts');\n$yAxisLabel = new Title('Values');\n\n// Create the chart\n$chart = new Chart(\n    'stock-chart', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    $xAxisLabel, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n$helper->renderChart($chart, __FILE__);\n\n$worksheet->setSelectedCells('G2');\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/Chart33b/33_Chart_create_stock2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\AxisText;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['Counts', 'Max', 'Min', 'Min Threshold', 'Max Threshold'],\n        [10, 10, 5, 0, 50],\n        [30, 20, 10, 0, 50],\n        [20, 30, 15, 0, 50],\n        [40, 10, 0, 0, 50],\n        [100, 40, 5, 0, 50],\n    ],\n    null,\n    'A1',\n    true\n);\n$worksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_NUMBER_00);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / Open\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), //Min / Close\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), //Min Threshold / Min\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$E$1', null, 1), //Max Threshold / Max\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$6', null, 5), // Counts\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$6', null, 5),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$6', null, 5),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$6', null, 5),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$E$2:$E$6', null, 5),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_STOCKCHART, // plotType\n    null, // plotGrouping - if we set this to not null, then xlsx throws error\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues       // plotValues\n);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n$legend->getBorderLines()->setLineColorProperties('ffc000', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n$legend->getFillColor()->setColorProperties('cccccc');\n$legendText = new AxisText();\n$legendText->getFillColorObject()->setValue('008080')->setType(ChartColor::EXCEL_COLOR_TYPE_RGB);\n$legendText->setShadowProperties(1);\n$legend->setLegendText($legendText);\n\n$title = new Title('Test Stock Chart');\n$xAxisLabel = new Title('Counts');\n$yAxisLabel = new Title('Values');\n\n// 3 stmts below are only difference from 33_chart_create_stock.php\n$plotArea->setGapWidth(300);\n$plotArea->setUseUpBars(true);\n$plotArea->setUseDownBars(true);\n\n// Create the chart\n$chart = new Chart(\n    'stock-chart', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    $xAxisLabel, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n$helper->renderChart($chart, __FILE__);\n$worksheet->setSelectedCells('G2');\n\n// Save Excel 2007 file\n$helper->write($spreadsheet, __FILE__, ['Xlsx'], true);\n"
  },
  {
    "path": "samples/ComplexNumbers1/COMPLEX.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'COMPLEX';\n$description = 'Converts real and imaginary coefficients into a complex number of the form x + yi or x + yj';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [3, 4],\n    [3, 4, '\"j\"'],\n    [3.5, 4.75],\n    [0, 1],\n    [1, 0],\n    [0, -1],\n    [0, 2],\n    [2, 0],\n];\n$testDataCount = count($testData);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('A' . $row, '=COMPLEX(' . implode(',', $testData[$row - 1]) . ')');\n}\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(A$row): Formula \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' result is '\n        . $worksheet->getCell('A' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers1/IMABS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMABS';\n$description = 'Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMABS(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The absolute value of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers1/IMAGINARY.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMAGINARY';\n$description = 'Returns the imaginary coefficient of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMAGINARY(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The imaginary component of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers1/IMARGUMENT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMARGUMENT';\n$description = 'Returns the argument Theta, an angle expressed in radians';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMARGUMENT(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Theta Argument of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n        . ' radians'\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers1/IMCONJUGATE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMCONJUGATE';\n$description = 'Returns the complex conjugate of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMCONJUGATE(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Conjugate value of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers1/IMREAL.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMREAL';\n$description = 'Returns the real coefficient of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMREAL(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The real component of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMCOS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMCOS';\n$description = 'Returns the cosine of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMCOS(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Cosine of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMCOSH.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMCOSH';\n$description = 'Returns the hyperbolic cosine of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMCOSH(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Hyperbolic Cosine of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMCOT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMCOT';\n$description = 'Returns the cotangent of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMCOT(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Cotangent of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMCSC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMCSC';\n$description = 'Returns the cosecant of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMCSC(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Cosecant of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMCSCH.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMCSCH';\n$description = 'Returns the hyperbolic cosecant of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMCSCH(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Hyperbolic Cosecant of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMDIV.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMDIV';\n$description = 'Returns the quotient of two complex numbers in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i', '5-3i'],\n    ['3+4i', '5+3i'],\n    ['-238+240i', '10+24i'],\n    ['1+2i', 30],\n    ['1+2i', '2i'],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=IMDIV(A' . $row . ', B' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Quotient of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMEXP.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMEXP';\n$description = 'Returns the exponential of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMEXP(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Exponential of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMLN.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMLN';\n$description = 'Returns the natural logarithm of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMLN(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Natural Logarithm of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMLOG10.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMLOG10';\n$description = 'Returns the base-10 logarithm of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMLOG10(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Base-10 Logarithm of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers2/IMLOG2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMLOG2';\n$description = 'Returns the base-2 logarithm of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMLOG2(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Base-2 Logarithm of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMPOWER.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMPOWER';\n$description = 'Returns a complex number in x + yi or x + yj text format raised to a power';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i', 2],\n    ['5-12i', 2],\n    ['3.25+7.5i', 3],\n    ['3.25-12.5i', 2],\n    ['-3.25+7.5i', 3],\n    ['-3.25-7.5i', 4],\n    ['0-j', 5],\n    ['0-2.5j', 3],\n    ['0+j', 2.5],\n    ['0+1.25j', 2],\n    [4, 3],\n    [-2.5, 2],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=IMPOWER(A' . $row . ', B' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' raised to the power of '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMPRODUCT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMPRODUCT';\n$description = 'Returns the product of two or more complex numbers in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i', '5-3i'],\n    ['3+4i', '5+3i'],\n    ['-238+240i', '10+24i'],\n    ['1+2i', 30],\n    ['1+2i', '2i'],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=IMPRODUCT(A' . $row . ', B' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Product of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMSEC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMSEC';\n$description = 'Returns the secant of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMSEC(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Secant of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMSECH.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMSECH';\n$description = 'Returns the hyperbolic secant of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMSECH(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Hyperbolic Ssecant of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMSIN.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMSIN';\n$description = 'Returns the sine of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMSIN(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Sine of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMSINH.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMSINH';\n$description = 'Returns the hyperbolic sine of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMSINH(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Hyperbolic Sine of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMSQRT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMSQRT';\n$description = 'Returns the square root of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMSQRT(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Square Root of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMSUB.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMSUB';\n$description = 'Returns the difference of two complex numbers in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i', '5-3i'],\n    ['3+4i', '5+3i'],\n    ['-238+240i', '10+24i'],\n    ['1+2i', 30],\n    ['1+2i', '2i'],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=IMSUB(A' . $row . ', B' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Difference between \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMSUM.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMSUM';\n$description = 'Returns the sum of two or more complex numbers in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i', '5-3i'],\n    ['3+4i', '5+3i'],\n    ['-238+240i', '10+24i'],\n    ['1+2i', 30],\n    ['1+2i', '2i'],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=IMSUM(A' . $row . ', B' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Sum of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ComplexNumbers3/IMTAN.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'IMTAN';\n$description = 'Returns the tangent of a complex number in x + yi or x + yj text format';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['3+4i'],\n    ['5-12i'],\n    ['3.25+7.5i'],\n    ['3.25-12.5i'],\n    ['-3.25+7.5i'],\n    ['-3.25-7.5i'],\n    ['0-j'],\n    ['0-2.5j'],\n    ['0+j'],\n    ['0+1.25j'],\n    [4],\n    [-2.5],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=IMTAN(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): The Tangent of \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('B' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/ConditionalFormatting/01_Basic_Comparisons.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Mark Baker')\n    ->setLastModifiedBy('Mark Baker')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', 'Literal Value Comparison')\n    ->setCellValue('A9', 'Value Comparison with Absolute Cell Reference $H$9')\n    ->setCellValue('A17', 'Value Comparison with Relative Cell References')\n    ->setCellValue('A23', 'Value Comparison with Formula based on AVERAGE() ± STDEV()')\n    ->setCellValue('A30', 'Literal String Value Comparison');\n\n$dataArray = [\n    [-2, -1, 0, 1, 2],\n    [-1, 0, 1, 2, 3],\n    [0, 1, 2, 3, 4],\n    [1, 2, 3, 4, 5],\n];\n\n$betweenDataArray = [\n    [2, 7, 6],\n    [9, 5, 1],\n    [4, 3, 8],\n];\n\n$stringArray = [\n    ['I'],\n    ['Love'],\n    ['PHP'],\n];\n\n$spreadsheet->getActiveSheet()\n    ->fromArray($dataArray, null, 'A2', true)\n    ->fromArray($dataArray, null, 'A10', true)\n    ->fromArray($betweenDataArray, null, 'A18', true)\n    ->fromArray($dataArray, null, 'A24', true)\n    ->fromArray($stringArray, null, 'A31', true)\n    ->setCellValue('H9', 1);\n\n// Set title row bold\n$helper->log('Set title row bold');\n$spreadsheet->getActiveSheet()->getStyle('A1:E1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A9:E9')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A17:E17')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A23:E23')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A30:E30')->getFont()->setBold(true);\n\n// Define some styles for our Conditionals\n$helper->log('Define some styles for our Conditionals');\n$yellowStyle = new Style(false, true);\n$yellowStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_YELLOW);\n$yellowStyle->getFont()->setColor(new Color(Color::COLOR_BLUE));\n$greenStyle = new Style(false, true);\n$greenStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_GREEN);\n$greenStyle->getFont()->setColor(new Color(Color::COLOR_DARKRED));\n$redStyle = new Style(false, true);\n$redStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_RED);\n$redStyle->getFont()->setColor(new Color(Color::COLOR_GREEN));\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting and set styles');\n\n// Set rules for Literal Value Comparison\n$cellRange = 'A2:E5';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\CellValue $cellWizard */\n$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n$cellWizard->equals(0)\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->greaterThan(0)\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->lessThan(0)\n    ->setStyle($redStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Value Comparison with Absolute Cell Reference $H$9\n$cellRange = 'A10:E13';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\CellValue $cellWizard */\n$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n$cellWizard->equals('$H$9', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->greaterThan('$H$9', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->lessThan('$H$9', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($redStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Value Comparison with Relative Cell References\n$cellRange = 'A18:A20';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\CellValue $cellWizard */\n$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n$cellWizard->between('$B1', Wizard::VALUE_TYPE_CELL)\n    ->and('$C1', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Value Comparison with Formula\n$cellRange = 'A24:E27';\n// accommodation for phpstan\n$absoluteCoordinate = fn (mixed $cell): string => is_string($cell) ? Coordinate::absoluteCoordinate($cell) : '';\n$formulaRange = implode(\n    ':',\n    array_map(\n        $absoluteCoordinate,\n        Coordinate::splitRange($cellRange)[0]\n    )\n);\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\CellValue $cellWizard */\n$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n$cellWizard->between('AVERAGE(' . $formulaRange . ')-STDEV(' . $formulaRange . ')', Wizard::VALUE_TYPE_FORMULA)\n    ->and('AVERAGE(' . $formulaRange . ')+STDEV(' . $formulaRange . ')', Wizard::VALUE_TYPE_FORMULA)\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->greaterThan('AVERAGE(' . $formulaRange . ')+STDEV(' . $formulaRange . ')', Wizard::VALUE_TYPE_FORMULA)\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->lessThan('AVERAGE(' . $formulaRange . ')-STDEV(' . $formulaRange . ')', Wizard::VALUE_TYPE_FORMULA)\n    ->setStyle($redStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Value Comparison with String Literal\n$cellRange = 'A31:A33';\n$formulaRange = implode(\n    ':',\n    array_map(\n        $absoluteCoordinate,\n        Coordinate::splitRange($cellRange)[0]\n    )\n);\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\CellValue $cellWizard */\n$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n$cellWizard->equals('LOVE')\n    ->setStyle($redStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$cellWizard->equals('PHP')\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/ConditionalFormatting/02_Text_Comparisons.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Mark Baker')\n    ->setLastModifiedBy('Mark Baker')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', 'Value Begins With Literal')\n    ->setCellValue('A7', 'Value Ends With Literal')\n    ->setCellValue('A13', 'Value Contains Literal')\n    ->setCellValue('A19', \"Value Doesn't Contain Literal\")\n    ->setCellValue('E1', 'Value Begins With using Cell Reference')\n    ->setCellValue('E7', 'Value Ends With using Cell Reference')\n    ->setCellValue('E13', 'Value Contains using Cell Reference')\n    ->setCellValue('E19', \"Value Doesn't Contain using Cell Reference\")\n    ->setCellValue('A25', 'Simple Comparison using Concatenation Formula');\n\n$dataArray = [\n    ['HELLO', 'WORLD'],\n    ['MELLOW', 'YELLOW'],\n    ['SLEEPY', 'HOLLOW'],\n];\n\n$spreadsheet->getActiveSheet()\n    ->fromArray($dataArray, null, 'A2', true)\n    ->fromArray($dataArray, null, 'A8', true)\n    ->fromArray($dataArray, null, 'A14', true)\n    ->fromArray($dataArray, null, 'A20', true)\n    ->fromArray($dataArray, null, 'E2', true)\n    ->fromArray($dataArray, null, 'E8', true)\n    ->fromArray($dataArray, null, 'E14', true)\n    ->fromArray($dataArray, null, 'E20', true)\n    ->fromArray($dataArray, null, 'A26', true)\n    ->setCellValue('D1', 'H')\n    ->setCellValue('D7', 'OW')\n    ->setCellValue('D13', 'LL')\n    ->setCellValue('D19', 'EL')\n    ->setCellValue('C26', 'HELLO WORLD')\n    ->setCellValue('C27', 'SOYLENT GREEN')\n    ->setCellValue('C28', 'SLEEPY HOLLOW');\n\n// Set title row bold\n$helper->log('Set title row bold');\n$spreadsheet->getActiveSheet()->getStyle('A1:G1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A7:G7')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A13:G13')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A19:G19')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A25:C25')->getFont()->setBold(true);\n\n// Define some styles for our Conditionals\n$helper->log('Define some styles for our Conditionals');\n$yellowStyle = new Style(false, true);\n$yellowStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_YELLOW);\n$yellowStyle->getFont()->setColor(new Color(Color::COLOR_BLUE));\n$greenStyle = new Style(false, true);\n$greenStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_GREEN);\n$greenStyle->getFont()->setColor(new Color(Color::COLOR_DARKRED));\n$redStyle = new Style(false, true);\n$redStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_RED);\n$redStyle->getFont()->setColor(new Color(Color::COLOR_GREEN));\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting and set styles');\n\n// Set rules for Literal Value Begins With\n$cellRange = 'A2:B4';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->beginsWith('H')\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Value Begins With using Cell Reference\n$cellRange = 'E2:F4';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->beginsWith('$D$1', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Literal Value Ends With\n$cellRange = 'A8:B10';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->endsWith('OW')\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Value Ends With using Cell Reference\n$cellRange = 'E8:F10';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->endsWith('$D$7', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Literal Value Contains\n$cellRange = 'A14:B16';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->contains('LL')\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Value Contains using Cell Reference\n$cellRange = 'E14:F16';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->contains('$D$13', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Literal Value Does Not Contain\n$cellRange = 'A20:B22';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->doesNotContain('EL')\n    ->setStyle($redStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Value Contains using Cell Reference\n$cellRange = 'E20:F22';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\TextValue $textWizard */\n$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);\n\n$textWizard->doesNotContain('$D$19', Wizard::VALUE_TYPE_CELL)\n    ->setStyle($redStyle);\n$conditionalStyles[] = $textWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($textWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Simple Comparison using Concatenation Formula\n$cellRange = 'C26:C28';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\CellValue $cellWizard */\n$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n$cellWizard->equals('CONCATENATE($A1,\" \",$B1)', Wizard::VALUE_TYPE_FORMULA)\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $cellWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($cellWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n$spreadsheet->getActiveSheet()->getColumnDimension('C')->setAutoSize(true);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/ConditionalFormatting/03_Blank_Comparisons.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Mark Baker')\n    ->setLastModifiedBy('Mark Baker')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', 'Blank Comparison');\n\n$dataArray = [\n    ['HELLO', null],\n    [null, 'WORLD'],\n];\n\n$spreadsheet->getActiveSheet()\n    ->fromArray($dataArray, null, 'A2', true);\n\n// Set title row bold\n$helper->log('Set title row bold');\n$spreadsheet->getActiveSheet()->getStyle('A1:B1')->getFont()->setBold(true);\n\n// Define some styles for our Conditionals\n$helper->log('Define some styles for our Conditionals');\n$greenStyle = new Style(false, true);\n$greenStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_GREEN);\n$greenStyle->getFont()->setColor(new Color(Color::COLOR_DARKRED));\n$redStyle = new Style(false, true);\n$redStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_RED);\n$redStyle->getFont()->setColor(new Color(Color::COLOR_GREEN));\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting and set styles');\n\n// Set rules for Blank Comparison\n$cellRange = 'A2:B3';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Blanks $blanksWizard */\n$blanksWizard = $wizardFactory->newRule(Wizard::BLANKS);\n\n$blanksWizard->setStyle($redStyle);\n$conditionalStyles[] = $blanksWizard->getConditional();\n\n$blanksWizard->notBlank()\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $blanksWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($blanksWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/ConditionalFormatting/04_Error_Comparisons.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Mark Baker')\n    ->setLastModifiedBy('Mark Baker')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', 'Error Comparison');\n\n$dataArray = [\n    [5, -2, '=A2/B2'],\n    [5, -1, '=A3/B3'],\n    [5, 0, '=A4/B4'],\n    [5, 1, '=A5/B5'],\n    [5, 2, '=A6/B6'],\n];\n\n$spreadsheet->getActiveSheet()\n    ->fromArray($dataArray, null, 'A2', true);\n\n// Set title row bold\n$helper->log('Set title row bold');\n$spreadsheet->getActiveSheet()->getStyle('A1:C1')->getFont()->setBold(true);\n\n// Define some styles for our Conditionals\n$helper->log('Define some styles for our Conditionals');\n$greenStyle = new Style(false, true);\n$greenStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_GREEN);\n$greenStyle->getFont()->setColor(new Color(Color::COLOR_DARKRED));\n$redStyle = new Style(false, true);\n$redStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_RED);\n$redStyle->getFont()->setColor(new Color(Color::COLOR_GREEN));\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting and set styles');\n\n// Set rules for Blank Comparison\n$cellRange = 'C2:C6';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Errors $errorsWizard */\n$errorsWizard = $wizardFactory->newRule(Wizard::ERRORS);\n\n$errorsWizard->setStyle($redStyle);\n$conditionalStyles[] = $errorsWizard->getConditional();\n\n$errorsWizard->notError()\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $errorsWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($errorsWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/ConditionalFormatting/05_Date_Comparisons.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Mark Baker')\n    ->setLastModifiedBy('Mark Baker')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('B1', 'yesterday()')\n    ->setCellValue('C1', 'today()')\n    ->setCellValue('D1', 'tomorrow()')\n    ->setCellValue('E1', 'last7Days()')\n    ->setCellValue('F1', 'lastWeek()')\n    ->setCellValue('G1', 'thisWeek()')\n    ->setCellValue('H1', 'nextWeek()')\n    ->setCellValue('I1', 'lastMonth()')\n    ->setCellValue('J1', 'thisMonth()')\n    ->setCellValue('K1', 'nextMonth()');\n\n$dateFunctionArray = [\n    'yesterday()',\n    'today()',\n    'tomorrow()',\n    'last7Days()',\n    'lastWeek()',\n    'thisWeek()',\n    'nextWeek()',\n    'lastMonth()',\n    'thisMonth()',\n    'nextMonth()',\n];\n$dateTitleArray = [\n    ['First day of last month'],\n    ['Last day of last month'],\n    ['Last Monday'],\n    ['Last Friday'],\n    ['Monday last week'],\n    ['Wednesday last week'],\n    ['Friday last week'],\n    ['Yesterday'],\n    ['Today'],\n    ['Tomorrow'],\n    ['Monday this week'],\n    ['Wednesday this week'],\n    ['Friday this week'],\n    ['Monday next week'],\n    ['Wednesday next week'],\n    ['Friday next week'],\n    ['First day of next month'],\n    ['Last day of next month'],\n];\n$dataArray = [\n    ['=EOMONTH(TODAY(),-2)+1'],\n    ['=EOMONTH(TODAY(),-1)'],\n    ['=TODAY()-WEEKDAY(TODAY(),3)'],\n    ['=TODAY()-WEEKDAY(TODAY())-1'],\n    ['=2-WEEKDAY(TODAY())+TODAY()-7'],\n    ['=4-WEEKDAY(TODAY())+TODAY()-7'],\n    ['=6-WEEKDAY(TODAY())+TODAY()-7'],\n    ['=TODAY()-1'],\n    ['=TODAY()'],\n    ['=TODAY()+1'],\n    ['=2-WEEKDAY(TODAY())+TODAY()'],\n    ['=4-WEEKDAY(TODAY())+TODAY()'],\n    ['=6-WEEKDAY(TODAY())+TODAY()'],\n    ['=2-WEEKDAY(TODAY())+TODAY()+7'],\n    ['=4-WEEKDAY(TODAY())+TODAY()+7'],\n    ['=6-WEEKDAY(TODAY())+TODAY()+7'],\n    ['=EOMONTH(TODAY(),0)+1'],\n    ['=EOMONTH(TODAY(),1)'],\n];\n\n$spreadsheet->getActiveSheet()\n    ->fromArray($dateFunctionArray, null, 'B1', true);\n$spreadsheet->getActiveSheet()\n    ->fromArray($dateTitleArray, null, 'A2', true);\nfor ($column = 'B'; $column !== 'L'; StringHelper::stringIncrement($column)) {\n    $spreadsheet->getActiveSheet()\n        ->fromArray($dataArray, null, \"{$column}2\", true);\n}\n\n// Set title row bold\n$helper->log('Set title row bold');\n$spreadsheet->getActiveSheet()->getStyle('B1:K1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('B1:K1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n\n// Define some styles for our Conditionals\n$helper->log('Define some styles for our Conditionals');\n$yellowStyle = new Style(false, true);\n$yellowStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_YELLOW);\n$yellowStyle->getFont()->setColor(new Color(Color::COLOR_BLUE));\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting and set styles');\nfor ($column = 'B'; $column !== 'L'; StringHelper::stringIncrement($column)) {\n    $wizardFactory = new Wizard(\"{$column}2:{$column}19\");\n    /** @var Wizard\\DateValue $dateWizard */\n    $dateWizard = $wizardFactory->newRule(Wizard::DATES_OCCURRING);\n    $conditionalStyles = [];\n\n    /** @var string */\n    $cellContents = $spreadsheet->getActiveSheet()->getCell(\"{$column}1\")->getValue();\n    $methodName = trim($cellContents, '()');\n    /** @var Wizard\\DateValue */\n    $targetStyle = $dateWizard->$methodName();\n    $targetStyle->setStyle($yellowStyle);\n\n    $conditionalStyles[] = $dateWizard->getConditional();\n\n    $spreadsheet->getActiveSheet()\n        ->getStyle($dateWizard->getCellRange())\n        ->setConditionalStyles($conditionalStyles);\n}\n\n// Set conditional formatting rules and styles\n$helper->log('Set some additional styling for date formats');\n\n$spreadsheet->getActiveSheet()->getStyle('B:B')->getNumberFormat()->setFormatCode('ddd dd-mmm-yyyy');\nfor ($column = 'A'; $column !== 'L'; StringHelper::stringIncrement($column)) {\n    if ($column !== 'A') {\n        $spreadsheet->getActiveSheet()->getStyle(\"{$column}:{$column}\")\n            ->getNumberFormat()->setFormatCode('ddd dd-mmm-yyyy');\n    }\n    $spreadsheet->getActiveSheet()->getColumnDimension($column)\n        ->setAutoSize(true);\n}\n$spreadsheet->getActiveSheet()->getStyle('A:A')->getFont()->setBold(true);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/ConditionalFormatting/06_Duplicate_Comparisons.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Mark Baker')\n    ->setLastModifiedBy('Mark Baker')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', 'Duplicates Comparison');\n\n$dataArray = [\n    [1, 0, 3],\n    [2, 1, 1],\n    [3, 1, 4],\n    [4, 2, 1],\n    [5, 3, 5],\n    [6, 5, 9],\n    [7, 8, 2],\n    [8, 13, 6],\n    [9, 21, 5],\n    [10, 34, 3],\n    [11, 55, 5],\n];\n\n$spreadsheet->getActiveSheet()\n    ->fromArray($dataArray, null, 'A2', true);\n\n// Set title row bold\n$helper->log('Set title row bold');\n$spreadsheet->getActiveSheet()->getStyle('A1:C1')->getFont()->setBold(true);\n\n// Define some styles for our Conditionals\n$helper->log('Define some styles for our Conditionals');\n$yellowStyle = new Style(false, true);\n$yellowStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_YELLOW);\n$yellowStyle->getFont()->setColor(new Color(Color::COLOR_BLUE));\n$greenStyle = new Style(false, true);\n$greenStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_GREEN);\n$greenStyle->getFont()->setColor(new Color(Color::COLOR_DARKRED));\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting and set styles');\n\n// Set rules for Duplicates Comparison\n$cellRange = 'A2:C12';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Duplicates $duplicatesWizard */\n$duplicatesWizard = $wizardFactory->newRule(Wizard::DUPLICATES);\n\n$duplicatesWizard->setStyle($yellowStyle);\n$conditionalStyles[] = $duplicatesWizard->getConditional();\n\n$duplicatesWizard->unique()\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $duplicatesWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($duplicatesWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/ConditionalFormatting/07_Expression_Comparisons.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Mark Baker')\n    ->setLastModifiedBy('Mark Baker')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()\n    ->setCellValue('A1', 'Odd/Even Expression Comparison')\n    ->setCellValue('A4', 'Note that these functions are not available for Xls files')\n    ->setCellValue('A15', 'Sales Grid Expression Comparison')\n    ->setCellValue('A25', 'Sales Grid Multiple Expression Comparison');\n\n$dataArray = [\n    [1, 0, 3],\n    [2, 1, 1],\n    [3, 1, 4],\n    [4, 2, 1],\n    [5, 3, 5],\n    [6, 5, 9],\n    [7, 8, 2],\n    [8, 13, 6],\n    [9, 21, 5],\n    [10, 34, 4],\n];\n\n$salesGrid = [\n    ['Name', 'Sales', 'Country', 'Quarter'],\n    ['Smith', 16753, 'UK', 'Q3'],\n    ['Johnson', 14808, 'USA', 'Q4'],\n    ['Williams', 10644, 'UK', 'Q2'],\n    ['Jones', 1390, 'USA', 'Q3'],\n    ['Brown', 4865, 'USA', 'Q4'],\n    ['Williams', 12438, 'UK', 'Q2'],\n];\n\n$spreadsheet->getActiveSheet()\n    ->fromArray($dataArray, null, 'A2', true);\n$spreadsheet->getActiveSheet()\n    ->fromArray($salesGrid, null, 'A16', true);\n$spreadsheet->getActiveSheet()\n    ->fromArray($salesGrid, null, 'A26', true);\n\n// Set title row bold\n$helper->log('Set title row bold');\n$spreadsheet->getActiveSheet()->getStyle('A1:B1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A15:D16')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A25:D26')->getFont()->setBold(true);\n\n// Define some styles for our Conditionals\n$helper->log('Define some styles for our Conditionals');\n$yellowStyle = new Style(false, true);\n$yellowStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_YELLOW);\n$yellowStyle->getFont()->setColor(new Color(Color::COLOR_BLUE));\n$greenStyle = new Style(false, true);\n$greenStyle->getFill()\n    ->setFillType(Fill::FILL_SOLID)\n    ->getStartColor()->setARGB(Color::COLOR_GREEN);\n$greenStyle->getFont()->setColor(new Color(Color::COLOR_DARKRED));\n\n$greenStyleMoney = clone $greenStyle;\n$greenStyleMoney->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_ACCOUNTING_USD);\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting and set styles');\n\n// Set rules for Odd/Even Expression Comparison\n$cellRange = 'A2:C11';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Expression $expressionWizard */\n$expressionWizard = $wizardFactory->newRule(Wizard::EXPRESSION);\n\n$expressionWizard->expression('ISODD(A1)')\n    ->setStyle($greenStyle);\n$conditionalStyles[] = $expressionWizard->getConditional();\n\n$expressionWizard->expression('ISEVEN(A1)')\n    ->setStyle($yellowStyle);\n$conditionalStyles[] = $expressionWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($expressionWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Sales Grid Row match against Country Comparison\n$cellRange = 'A17:D22';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Expression $expressionWizard */\n$expressionWizard = $wizardFactory->newRule(Wizard::EXPRESSION);\n\n$expressionWizard->expression('$C1=\"USA\"')\n    ->setStyle($greenStyleMoney);\n$conditionalStyles[] = $expressionWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($expressionWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set rules for Sales Grid Row match against Country and Quarter Comparison\n$cellRange = 'A27:D32';\n$conditionalStyles = [];\n$wizardFactory = new Wizard($cellRange);\n/** @var Wizard\\Expression $expressionWizard */\n$expressionWizard = $wizardFactory->newRule(Wizard::EXPRESSION);\n\n$expressionWizard->expression('AND($C1=\"USA\",$D1=\"Q4\")')\n    ->setStyle($greenStyleMoney);\n$conditionalStyles[] = $expressionWizard->getConditional();\n\n$spreadsheet->getActiveSheet()\n    ->getStyle($expressionWizard->getCellRange())\n    ->setConditionalStyles($conditionalStyles);\n\n// Set conditional formatting rules and styles\n$helper->log('Set some additional styling for money formats');\n\n$spreadsheet->getActiveSheet()->getStyle('B17:B22')\n    ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_ACCOUNTING_USD);\n$spreadsheet->getActiveSheet()->getStyle('B27:B32')\n    ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_ACCOUNTING_USD);\n$spreadsheet->getActiveSheet()->getColumnDimension('B')\n    ->setAutoSize(true);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n"
  },
  {
    "path": "samples/ConditionalFormatting/cond08_colorscale.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalColorScale;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalFormatValueObject;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Owen Leibman')\n    ->setLastModifiedBy('Owen Leibman')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\n$sheet\n    ->setCellValue('A1', 1)\n    ->setCellValue('A2', 2)\n    ->setCellValue('A3', 8)\n    ->setCellValue('A4', 4)\n    ->setCellValue('A5', 5)\n    ->setCellValue('A6', 6)\n    ->setCellValue('A7', 7)\n    ->setCellValue('A8', 3)\n    ->setCellValue('A9', 9)\n    ->setCellValue('A10', 10);\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting using Color Scales');\n\n$cellRange = 'A1:A10';\n$condition1 = new Conditional();\n$condition1->setConditionType(Conditional::CONDITION_COLORSCALE);\n$colorScale = new ConditionalColorScale();\n$condition1->setColorScale($colorScale);\n$colorScale\n    ->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject('min'))\n    ->setMidpointConditionalFormatValueObject(new ConditionalFormatValueObject('percentile', '40'))\n    ->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject('max'))\n    ->setMinimumColor(new Color('FFF8696B'))\n    ->setMidpointColor(new Color('FFFFEB84'))\n    ->setMaximumColor(new Color('FF63BE7B'));\n\n$conditionalStyles = [$condition1];\n\n$sheet\n    ->getStyle($cellRange)\n    ->setConditionalStyles($conditionalStyles);\n$sheet->setSelectedCells('B1');\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/ConditionalFormatting/cond09_iconset.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalFormatValueObject;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalIconSet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\IconSetValues;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('issakujitsuk')\n    ->setLastModifiedBy('issakujitsuk')\n    ->setTitle('PhpSpreadsheet Test Document')\n    ->setSubject('PhpSpreadsheet Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Test result file');\n\n// Create the worksheet\n$helper->log('Add data');\nforeach (['A', 'B', 'C'] as $columnIndex) {\n    $sheet\n        ->setCellValue(\"{$columnIndex}1\", 1)\n        ->setCellValue(\"{$columnIndex}2\", 2)\n        ->setCellValue(\"{$columnIndex}3\", 8)\n        ->setCellValue(\"{$columnIndex}4\", 4)\n        ->setCellValue(\"{$columnIndex}5\", 5)\n        ->setCellValue(\"{$columnIndex}6\", 6)\n        ->setCellValue(\"{$columnIndex}7\", 7)\n        ->setCellValue(\"{$columnIndex}8\", 3)\n        ->setCellValue(\"{$columnIndex}9\", 9)\n        ->setCellValue(\"{$columnIndex}10\", 10);\n}\n\n// Set conditional formatting rules and styles\n$helper->log('Define conditional formatting using Icon Set');\n\n// 3 icons\n$sheet->getStyle('A1:A10')\n    ->setConditionalStyles([\n        makeConditionalIconSet(\n            IconSetValues::ThreeSymbols,\n            [\n                new ConditionalFormatValueObject('percent', 0),\n                new ConditionalFormatValueObject('percent', 33),\n                new ConditionalFormatValueObject('percent', 67),\n            ]\n        ),\n    ]);\n\n// 4 icons\n$sheet->getStyle('B1:B10')\n    ->setConditionalStyles([\n        makeConditionalIconSet(\n            IconSetValues::FourArrows,\n            [\n                new ConditionalFormatValueObject('percent', 0),\n                new ConditionalFormatValueObject('percent', 25),\n                new ConditionalFormatValueObject('percent', 50),\n                new ConditionalFormatValueObject('percent', 75),\n            ]\n        ),\n    ]);\n\n// 5 icons\n$sheet->getStyle('C1:C10')\n    ->setConditionalStyles([\n        makeConditionalIconSet(\n            IconSetValues::FiveQuarters,\n            [\n                new ConditionalFormatValueObject('percent', 0),\n                new ConditionalFormatValueObject('percent', 20),\n                new ConditionalFormatValueObject('percent', 40),\n                new ConditionalFormatValueObject('percent', 60),\n                new ConditionalFormatValueObject('percent', 80),\n            ]\n        ),\n    ]);\n\n// Save\n$sheet->setSelectedCells('A1');\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n\n/**\n * Helper function to create a Conditional object with an IconSet.\n *\n * @param IconSetValues $type The type of icon set\n * @param ConditionalFormatValueObject[] $cfvos The conditional format value objects\n */\nfunction makeConditionalIconSet(\n    IconSetValues $type,\n    array $cfvos,\n): Conditional {\n    $condition = new Conditional();\n    $condition->setConditionType(Conditional::CONDITION_ICONSET);\n    $iconSet = new ConditionalIconSet();\n    $condition->setIconSet($iconSet);\n    $iconSet->setIconSetType($type)\n        ->setCfvos($cfvos);\n\n    return $condition;\n}\n"
  },
  {
    "path": "samples/Database/DAVERAGE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DAVERAGE';\n$description = 'Returns the average of selected database entries that match criteria';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The Average yield of Apple trees over 10\\' in height');\n$worksheet->setCellValue('B12', '=DAVERAGE(A4:E10,\"Yield\",A1:B2)');\n\n$worksheet->setCellValue('A13', 'The Average age of all Apple and Pear trees in the orchard');\n$worksheet->setCellValue('B13', '=DAVERAGE(A4:E10,3,A1:A3)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:B2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DCOUNT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DCOUNT';\n$description = 'Counts the cells that contain numbers in a set of database records that match criteria';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 'N/A', 10, 75.00],\n    ['Pear', 9, 8, 8, 77.00],\n    ['Apple', 12, 11, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The Number of Apple trees between 10\\' and 16\\' in height whose age is known');\n$worksheet->setCellValue('B12', '=DCOUNT(A4:E10,\"Age\",A1:F2)');\n\n$worksheet->setCellValue('A13', 'The Number of Apple and Pear trees in the orchard with a numeric value in column 3 (\"Age\")');\n$worksheet->setCellValue('B13', '=DCOUNT(A4:E10,3,A1:A3)');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:F2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DCOUNTA.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DCOUNTA';\n$description = 'Counts the cells in a set of database records that match criteria';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 'N/A', 10, 75.00],\n    ['Pear', 9, 8, 8, 77.00],\n    ['Apple', 12, 11, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The Number of Apple trees between 10\\' and 16\\' in height');\n$worksheet->setCellValue('B12', '=DCOUNTA(A4:E10,\"Age\",A1:F2)');\n\n$worksheet->setCellValue('A13', 'The Number of Apple and Pear trees in the orchard');\n$worksheet->setCellValue('B13', '=DCOUNTA(A4:E10,3,A1:A3)');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:F2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DGET.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DGET';\n$description = 'Extracts a single value from a column of a list or database that matches criteria that you specify';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', '>12', null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The height of the Apple tree between 10\\' and 16\\' tall');\n$worksheet->setCellValue('B12', '=DGET(A4:E10,\"Height\",A1:F2)');\n\n$worksheet->setCellValue('A13', 'The height of the Apple tree (will return an Excel error, because there is more than one apple tree)');\n$worksheet->setCellValue('B13', '=DGET(A4:E10,\"Height\",A1:A2)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:F2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DMAX.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DMAX';\n$description = 'Returns the maximum value from selected database entries';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The tallest tree in the orchard');\n$worksheet->setCellValue('B12', '=DMAX(A4:E10,\"Height\",A4:E10)');\n\n$worksheet->setCellValue('A13', 'The Oldest apple tree in the orchard');\n$worksheet->setCellValue('B13', '=DMAX(A4:E10,3,A1:A2)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$helper->log('ALL');\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DMIN.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DMIN';\n$description = 'Returns the minimum value from selected database entries';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The shortest tree in the orchard');\n$worksheet->setCellValue('B12', '=DMIN(A4:E10,\"Height\",A4:E10)');\n\n$worksheet->setCellValue('A13', 'The Youngest apple tree in the orchard');\n$worksheet->setCellValue('B13', '=DMIN(A4:E10,3,A1:A2)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$helper->log('ALL');\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DPRODUCT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DPRODUCT';\n$description = 'Multiplies the values in a column of a list or database that match conditions that you specify';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 77.00],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The product of the yields of all Apple trees over 10\\' in the orchard');\n$worksheet->setCellValue('B12', '=DPRODUCT(A4:E10,\"Yield\",A1:B2)');\n\n$worksheet->setCellValue('A13', 'The product of the yields of all Apple trees in the orchard');\n$worksheet->setCellValue('B13', '=DPRODUCT(A4:E10,\"Yield\",A1:A2)');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:B2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DSTDEV.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DSTDEV';\n$description = 'Estimates the standard deviation based on a sample of selected database entries';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The estimated standard deviation in the yield of Apple and Pear trees');\n$worksheet->setCellValue('B12', '=DSTDEV(A4:E10,\"Yield\",A1:A3)');\n\n$worksheet->setCellValue('A13', 'The estimated standard deviation in height of Apple and Pear trees');\n$worksheet->setCellValue('B13', '=DSTDEV(A4:E10,2,A1:A3)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DSTDEVP.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DSTDEVP';\n$description = 'Calculates the standard deviation based on the entire population of selected database entries';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The standard deviation in the yield of Apple and Pear trees');\n$worksheet->setCellValue('B12', '=DSTDEVP(A4:E10,\"Yield\",A1:A3)');\n\n$worksheet->setCellValue('A13', 'The standard deviation in height of Apple and Pear trees');\n$worksheet->setCellValue('B13', '=DSTDEVP(A4:E10,2,A1:A3)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DSUM.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DSUM';\n$description = 'Returns the sum of selected database entries';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The total profit from apple trees');\n$worksheet->setCellValue('B12', '=DSUM(A4:E10,\"Profit\",A1:A2)');\n\n$worksheet->setCellValue('A13', 'Total profit from apple trees with a height between 10 and 16 feet, and all pear trees');\n$worksheet->setCellValue('B13', '=DSUM(A4:E10,\"Profit\",A1:F3)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A2', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:F3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DVAR.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DVAR';\n$description = 'Estimates variance based on a sample from selected database entries';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The estimated variance in the yield of Apple and Pear trees');\n$worksheet->setCellValue('B12', '=DVAR(A4:E10,\"Yield\",A1:A3)');\n\n$worksheet->setCellValue('A13', 'The estimated variance in height of Apple and Pear trees');\n$worksheet->setCellValue('B13', '=DVAR(A4:E10,2,A1:A3)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/Database/DVARP.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Database';\n$functionName = 'DVARP';\n$description = 'Calculates variance based on the entire population of selected database entries';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n    ['Apple', 18, 20, 14, 105.00],\n    ['Pear', 12, 12, 10, 96.00],\n    ['Cherry', 13, 14, 9, 105.00],\n    ['Apple', 14, 15, 10, 75.00],\n    ['Pear', 9, 8, 8, 76.80],\n    ['Apple', 8, 9, 6, 45.00],\n];\n$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'],\n    ['=\"=Apple\"', '>10', null, null, null, '<16'],\n    ['=\"=Pear\"', null, null, null, null, null],\n];\n\n$worksheet->fromArray($criteria, null, 'A1');\n$worksheet->fromArray($database, null, 'A4');\n\n$worksheet->setCellValue('A12', 'The variance in the yield of Apple and Pear trees');\n$worksheet->setCellValue('B12', '=DVARP(A4:E10,\"Yield\",A1:A3)');\n\n$worksheet->setCellValue('A13', 'The variance in height of Apple and Pear trees');\n$worksheet->setCellValue('B13', '=DVARP(A4:E10,2,A1:A3)');\n$worksheet->getStyle('E5:E10')->getNumberFormat()\n    ->setFormatCode('0.00');\n\n$helper->log('Database');\n\n$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);\n$helper->displayGrid($databaseData, true);\n\n// Test the formulae\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B12', 'A12');\n\n$helper->log('Criteria');\n\n$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);\n$helper->displayGrid($criteriaData);\n\n$helper->logCalculationResult($worksheet, $functionName, 'B13', 'A13');\n"
  },
  {
    "path": "samples/DateTime/DATE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'DATE';\n$description = 'Returns the Excel serial number of a particular date';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [[2012, 3, 26], [2012, 2, 29], [2012, 4, 1], [2012, 12, 25],\n    [2012, 10, 31], [2012, 11, 5], [2012, 1, 1], [2012, 3, 17],\n    [2011, 2, 29], [7, 5, 3], [2012, 13, 1], [2012, 11, 45],\n    [2012, 0, 0], [2012, 1, 0], [2012, 0, 1],\n    [2012, -2, 2], [2012, 2, -2], [2012, -2, -2],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n}\n$worksheet->getStyle('E1:E' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(\"(A{$row}) Year: \" . $worksheet->getCell('A' . $row)->getFormattedValue());\n    $helper->log(\"(B{$row}) Month: \" . $worksheet->getCell('B' . $row)->getFormattedValue());\n    $helper->log(\"(C{$row}) Day: \" . $worksheet->getCell('C' . $row)->getFormattedValue());\n    $helper->log('Formula: ' . $worksheet->getCell('D' . $row)->getValueString());\n    $helper->log('Excel DateStamp: ' . $worksheet->getCell('D' . $row)->getCalculatedValueString());\n    $helper->log('Formatted DateStamp: ' . $worksheet->getCell('E' . $row)->getFormattedValue());\n    $helper->log('');\n}\n"
  },
  {
    "path": "samples/DateTime/DATEDIF.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'DATEDIF';\n$description = 'Calculates the number of days, months, or years between two dates';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 1, 1],\n    [1936, 3, 17],\n    [1960, 12, 19],\n    [1999, 12, 31],\n    [2000, 1, 1],\n    [2019, 2, 14],\n    [2020, 7, 4],\n    [2020, 2, 29],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=TODAY()');\n    $worksheet->setCellValue('G' . $row, '=DATEDIF(D' . $row . ', F' . $row . ', \"Y\")');\n    $worksheet->setCellValue('H' . $row, '=DATEDIF(D' . $row . ', F' . $row . ', \"M\")');\n    $worksheet->setCellValue('I' . $row, '=DATEDIF(D' . $row . ', F' . $row . ', \"D\")');\n    $worksheet->setCellValue('J' . $row, '=DATEDIF(D' . $row . ', F' . $row . ', \"MD\")');\n    $worksheet->setCellValue('K' . $row, '=DATEDIF(D' . $row . ', F' . $row . ', \"YM\")');\n    $worksheet->setCellValue('L' . $row, '=DATEDIF(D' . $row . ', F' . $row . ', \"YD\")');\n}\n$worksheet->getStyle('E1:F' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf(\n        'Between: %s and %s',\n        $worksheet->getCell('E' . $row)->getFormattedValue(),\n        $worksheet->getCell('F' . $row)->getFormattedValue()\n    ));\n    $helper->log('In years (\"Y\"): ' . $worksheet->getCell('G' . $row)->getCalculatedValueString());\n    $helper->log('In months (\"M\"): ' . $worksheet->getCell('H' . $row)->getCalculatedValueString());\n    $helper->log('In days (\"D\"): ' . $worksheet->getCell('I' . $row)->getCalculatedValueString());\n    $helper->log('In days ignoring months and years (\"MD\"): ' . $worksheet->getCell('J' . $row)->getCalculatedValueString());\n    $helper->log('In months ignoring days and years (\"YM\"): ' . $worksheet->getCell('K' . $row)->getCalculatedValueString());\n    $helper->log('In days ignoring years (\"YD\"): ' . $worksheet->getCell('L' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime/DATEVALUE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'DATEVALUE';\n$description = 'Converts a date in the form of text to an Excel serial number';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = ['26 March 2012', '29 Feb 2012', 'April 1, 2012', '25/12/2012',\n    '2012-Oct-31', '5th November', 'January 1st', 'April 2012',\n    '17-03', '03-17', '03-2012', '29 Feb 2011', '03-05-07',\n    '03-MAY-07', '03-13-07', '13-03-07', '03/13/07', '13/03/07',\n];\n$testDateCount = count($testDates);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('A' . $row, $testDates[$row - 1]);\n    $worksheet->setCellValue('B' . $row, '=DATEVALUE(A' . $row . ')');\n    $worksheet->setCellValue('C' . $row, '=B' . $row);\n}\n\n$worksheet->getStyle('C1:C' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\n$helper->log('<strong>Warning: </strong>The PhpSpreadsheet DATEVALUE() function accepts a wider range of date formats than MS Excel DATEFORMAT() function.');\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(\"(A{$row}) Date String: \" . $worksheet->getCell('A' . $row)->getFormattedValue());\n    $helper->log('Formula: ' . $worksheet->getCell('B' . $row)->getValueString());\n    $helper->log('Excel DateStamp: ' . $worksheet->getCell('B' . $row)->getCalculatedValueString());\n    $helper->log('Formatted DateStamp: ' . $worksheet->getCell('C' . $row)->getFormattedValue());\n    $helper->log('');\n}\n"
  },
  {
    "path": "samples/DateTime/DAY.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'DAY';\n$description = 'Returns the day of a date, an integer ranging from 1 to 31';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 2, 14],\n    [1936, 3, 17],\n    [1964, 4, 29],\n    [1999, 5, 18],\n    [2000, 6, 21],\n    [2019, 7, 4],\n    [2020, 8, 31],\n    [1956, 9, 10],\n    [2010, 10, 10],\n    [1982, 11, 30],\n    [1960, 12, 19],\n    ['=YEAR(TODAY())', '=MONTH(TODAY())', '=DAY(TODAY())'],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=DAY(D' . $row . ')');\n}\n$worksheet->getStyle('E1:E' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log('Day is: ' . $worksheet->getCell('F' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime/DAYS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'DAYS';\n$description = 'Returns the number of days between two dates';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 1, 1],\n    [1936, 3, 17],\n    [1960, 12, 19],\n    [1999, 12, 31],\n    [2000, 1, 1],\n    [2019, 2, 14],\n    [2020, 7, 4],\n    [2020, 2, 29],\n    [2029, 12, 31],\n    [2525, 1, 1],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=TODAY()');\n    $worksheet->setCellValue('G' . $row, '=DAYS(D' . $row . ', F' . $row . ')');\n}\n$worksheet->getStyle('E1:F' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf(\n        'Between: %s and %s',\n        $worksheet->getCell('E' . $row)->getFormattedValue(),\n        $worksheet->getCell('F' . $row)->getFormattedValue()\n    ));\n    $helper->log('Days: ' . $worksheet->getCell('G' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime/DAYS360.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'DAYS360';\n$description = 'Returns the number of days between two dates based on a 360-day year';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 1, 1],\n    [1936, 3, 17],\n    [1960, 12, 19],\n    [1999, 12, 31],\n    [2000, 1, 1],\n    [2019, 2, 14],\n    [2020, 7, 4],\n    [2029, 12, 31],\n    [2525, 1, 1],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=DATE(2022,12,31)');\n    $worksheet->setCellValue('G' . $row, '=DAYS360(D' . $row . ', F' . $row . ', FALSE)');\n    $worksheet->setCellValue('H' . $row, '=DAYS360(D' . $row . ', F' . $row . ', TRUE)');\n}\n$worksheet->getStyle('E1:F' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf(\n        'Between: %s and %s',\n        $worksheet->getCell('E' . $row)->getFormattedValue(),\n        $worksheet->getCell('F' . $row)->getFormattedValue()\n    ));\n    $helper->log(\n        'Days: '\n        . $worksheet->getCell('G' . $row)->getCalculatedValueString()\n        . ' (US) '\n        . $worksheet->getCell('H' . $row)->getCalculatedValueString()\n        . ' (European)'\n    );\n}\n"
  },
  {
    "path": "samples/DateTime/EDATE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'EDATE';\n$description = 'Returns the serial number that represents the date that is the indicated number of months before or after a specified date';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$months = range(-12, 12);\n$testDateCount = count($months);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('A' . $row, '=DATE(2020,12,31)');\n    $worksheet->setCellValue('B' . $row, '=A' . $row);\n    $worksheet->setCellValue('C' . $row, $months[$row - 1]);\n    $worksheet->setCellValue('D' . $row, '=EDATE(B' . $row . ', C' . $row . ')');\n}\n$worksheet->getStyle('B1:B' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n$worksheet->getStyle('D1:D' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    /** @var null|bool|float|int|string */\n    $calc = $worksheet->getCell('D' . $row)->getCalculatedValue();\n    $helper->log(\n        $worksheet->getCell('B' . $row)->getFormattedValue()\n        . ' and '\n        . $worksheet->getCell('C' . $row)->getFormattedValue()\n        . ' months is '\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('D' . $row)->getFormattedValue()\n        . ')'\n    );\n}\n"
  },
  {
    "path": "samples/DateTime/EOMONTH.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'EOMONTH';\n$description = 'Returns the serial number for the last day of the month that is the indicated number of months before or after start_date';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$months = range(-12, 12);\n$testDateCount = count($months);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('A' . $row, '=DATE(2020,1,1)');\n    $worksheet->setCellValue('B' . $row, '=A' . $row);\n    $worksheet->setCellValue('C' . $row, $months[$row - 1]);\n    $worksheet->setCellValue('D' . $row, '=EOMONTH(B' . $row . ', C' . $row . ')');\n}\n$worksheet->getStyle('B1:B' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n$worksheet->getStyle('D1:D' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(\n        $worksheet->getCell('B' . $row)->getFormattedValue()\n        . ' and '\n        . $worksheet->getCell('C' . $row)->getFormattedValue()\n        . ' months is '\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ' ('\n        . $worksheet->getCell('D' . $row)->getFormattedValue()\n        . ')'\n    );\n}\n"
  },
  {
    "path": "samples/DateTime/HOUR.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'HOUR';\n$description = 'Returns the hour of a time value. The hour is given as an integer, ranging from 0 (12:00 AM) to 23 (11:00 PM)';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testTimes = [\n    [0, 6, 0],\n    [1, 12, 15],\n    [3, 30, 12],\n    [5, 17, 31],\n    [8, 15, 45],\n    [12, 45, 11],\n    [14, 0, 30],\n    [17, 55, 50],\n    [19, 21, 8],\n    [21, 10, 10],\n    [23, 59, 59],\n];\n$testTimeCount = count($testTimes);\n\n$worksheet->fromArray($testTimes, null, 'A1', true);\n\nfor ($row = 1; $row <= $testTimeCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=TIME(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=HOUR(D' . $row . ')');\n}\n$worksheet->getStyle('E1:E' . $testTimeCount)\n    ->getNumberFormat()\n    ->setFormatCode('hh:mm:ss');\n\n// Test the formulae\nfor ($row = 1; $row <= $testTimeCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log('Hour is: ' . $worksheet->getCell('F' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime/ISOWEEKNUM.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'ISOWEEKNUM';\n$description = 'Returns number of the ISO week number of the year for a given date. (ISO-8601)';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 2, 14],\n    [1936, 3, 17],\n    [1964, 4, 29],\n    [1999, 5, 18],\n    [2000, 6, 21],\n    [2019, 7, 4],\n    [2020, 8, 31],\n    [1956, 9, 10],\n    [2010, 10, 10],\n    [1982, 11, 30],\n    [1960, 12, 19],\n    ['=YEAR(TODAY())', '=MONTH(TODAY())', '=DAY(TODAY())'],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=ISOWEEKNUM(D' . $row . ')');\n}\n$worksheet->getStyle('E1:E' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log('ISO Week number is: ' . $worksheet->getCell('F' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime/MINUTE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'MINUTE';\n$description = 'Returns the minute of a time value. The minute is given as an integer, ranging from 0 to 59';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testTimes = [\n    [0, 6, 0],\n    [1, 12, 15],\n    [3, 30, 12],\n    [5, 17, 31],\n    [8, 15, 45],\n    [12, 45, 11],\n    [14, 0, 30],\n    [17, 55, 50],\n    [19, 21, 8],\n    [21, 10, 10],\n    [23, 59, 59],\n];\n$testTimeCount = count($testTimes);\n\n$worksheet->fromArray($testTimes, null, 'A1', true);\n\nfor ($row = 1; $row <= $testTimeCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=TIME(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=MINUTE(D' . $row . ')');\n}\n$worksheet->getStyle('E1:E' . $testTimeCount)\n    ->getNumberFormat()\n    ->setFormatCode('hh:mm:ss');\n\n// Test the formulae\nfor ($row = 1; $row <= $testTimeCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log('Minute is: ' . $worksheet->getCell('F' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime/MONTH.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'MONTH';\n$description = 'Returns the month of a date, an integer ranging from 1 to 12';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 2, 14],\n    [1936, 3, 17],\n    [1964, 4, 29],\n    [1999, 5, 18],\n    [2000, 6, 21],\n    [2019, 7, 4],\n    [2020, 8, 31],\n    [1956, 9, 10],\n    [2010, 10, 10],\n    [1982, 11, 30],\n    [1960, 12, 19],\n    ['=YEAR(TODAY())', '=MONTH(TODAY())', '=DAY(TODAY())'],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=MONTH(D' . $row . ')');\n}\n$worksheet->getStyle('E1:E' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log('Month is: ' . $worksheet->getCell('F' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime2/NETWORKDAYS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'NETWORKDAYS';\n$description = 'Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$publicHolidays = [\n    [2022, 1, 3, '=DATE(G1, H1, I1)', 'New Year'],\n    [2022, 4, 15, '=DATE(G2, H2, I2)', 'Good Friday'],\n    [2022, 4, 18, '=DATE(G3, H3, I3)', 'Easter Monday'],\n    [2022, 5, 2, '=DATE(G4, H4, I4)', 'Early May Bank Holiday'],\n    [2022, 6, 2, '=DATE(G5, H5, I5)', 'Spring Bank Holiday'],\n    [2022, 6, 3, '=DATE(G6, H6, I6)', 'Platinum Jubilee Bank Holiday'],\n    [2022, 8, 29, '=DATE(G7, H7, I7)', 'Summer Bank Holiday'],\n    [2022, 12, 26, '=DATE(G8, H8, I8)', 'Boxing Day'],\n    [2022, 12, 27, '=DATE(G9, H9, I9)', 'Christmas Day'],\n];\n\n$holidayCount = count($publicHolidays);\n$worksheet->fromArray($publicHolidays, null, 'G1', true);\n\n$worksheet->getStyle('J1:J' . $holidayCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n$worksheet->setCellValue('A1', '=DATE(2022,1,1)');\n\nfor ($numberOfMonths = 0; $numberOfMonths < 12; ++$numberOfMonths) {\n    $worksheet->setCellValue('B' . ($numberOfMonths + 1), '=EOMONTH(A1, ' . $numberOfMonths . ')');\n    $worksheet->setCellValue('C' . ($numberOfMonths + 1), '=NETWORKDAYS(A1, B' . ($numberOfMonths + 1) . ')');\n    $worksheet->setCellValue('D' . ($numberOfMonths + 1), '=NETWORKDAYS(A1, B' . ($numberOfMonths + 1) . ', J1:J' . $holidayCount . ')');\n}\n\n$worksheet->getStyle('A1')\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n$worksheet->getStyle('B1:B12')\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\n$helper->log('UK Public Holidays');\n$holidayData = $worksheet->rangeToArray('J1:K' . $holidayCount, null, true, true, true);\n$helper->displayGrid($holidayData);\n\nfor ($row = 1; $row <= 12; ++$row) {\n    $helper->log(\n        'Between '\n        . $worksheet->getCell('A1')->getFormattedValue()\n        . ' and '\n        . $worksheet->getCell('B' . $row)->getFormattedValue()\n        . ' is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n        . ' working days; '\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ' excluding public holidays'\n    );\n}\n"
  },
  {
    "path": "samples/DateTime2/NOW.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'NOW';\n$description = 'Returns the serial number of the current date and time';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$worksheet->setCellValue('A1', '=NOW()');\n$worksheet->getStyle('A1')\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd hh:mm:ss');\n\n// Test the formulae\n$helper->log(\n    'Today is '\n    . $worksheet->getCell('A1')->getCalculatedValueString()\n    . ' ('\n    . $worksheet->getCell('A1')->getFormattedValue()\n    . ')'\n);\n"
  },
  {
    "path": "samples/DateTime2/SECOND.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'SECOND';\n$description = 'Returns the second of a time value. The second is given as an integer, ranging from 0 to 59';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testTimes = [\n    [0, 6, 0],\n    [1, 12, 15],\n    [3, 30, 12],\n    [5, 17, 31],\n    [8, 15, 45],\n    [12, 45, 11],\n    [14, 0, 30],\n    [17, 55, 50],\n    [19, 21, 8],\n    [21, 10, 10],\n    [23, 59, 59],\n];\n$testTimeCount = count($testTimes);\n\n$worksheet->fromArray($testTimes, null, 'A1', true);\n\nfor ($row = 1; $row <= $testTimeCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=TIME(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=SECOND(D' . $row . ')');\n}\n$worksheet->getStyle('E1:E' . $testTimeCount)\n    ->getNumberFormat()\n    ->setFormatCode('hh:mm:ss');\n\n// Test the formulae\nfor ($row = 1; $row <= $testTimeCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log('Second is: ' . $worksheet->getCell('F' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime2/TIME.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'TIME';\n$description = 'Returns the Excel serial number of a particular time';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [[3, 15], [13, 15], [15, 15, 15], [3, 15, 30],\n    [15, 15, 15], [5], [9, 15, 0], [9, 15, -1],\n    [13, -14, -15], [0, 0, -1],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=TIME(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n}\n$worksheet->getStyle('E1:E' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('hh:mm:ss');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(\"(A{$row}) Hour: \" . $worksheet->getCell('A' . $row)->getFormattedValue());\n    $helper->log(\"(B{$row}) Minute: \" . $worksheet->getCell('B' . $row)->getFormattedValue());\n    $helper->log(\"(C{$row}) Second: \" . $worksheet->getCell('C' . $row)->getFormattedValue());\n    $helper->log('Formula: ' . $worksheet->getCell('D' . $row)->getValueString());\n    $helper->log('Excel TimeStamp: ' . $worksheet->getCell('D' . $row)->getCalculatedValueString());\n    $helper->log('Formatted TimeStamp: ' . $worksheet->getCell('E' . $row)->getFormattedValue());\n    $helper->log('');\n}\n"
  },
  {
    "path": "samples/DateTime2/TIMEVALUE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'DATEVALUE';\n$description = 'Converts a time in the form of text to an Excel serial number';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = ['3:15', '13:15', '15:15:15', '3:15 AM', '3:15 PM', '5PM', '9:15AM', '13:15AM',\n];\n$testDateCount = count($testDates);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('A' . $row, $testDates[$row - 1]);\n    $worksheet->setCellValue('B' . $row, '=TIMEVALUE(A' . $row . ')');\n    $worksheet->setCellValue('C' . $row, '=B' . $row);\n}\n\n$worksheet->getStyle('C1:C' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('hh:mm:ss');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(\"(A{$row}) Time String: \" . $worksheet->getCell('A' . $row)->getFormattedValue());\n    $helper->log('Formula: ' . $worksheet->getCell('B' . $row)->getValueString());\n    $helper->log('Excel TimeStamp: ' . $worksheet->getCell('B' . $row)->getFormattedValue());\n    $helper->log('Formatted TimeStamp: ' . $worksheet->getCell('C' . $row)->getFormattedValue());\n    $helper->log('');\n}\n"
  },
  {
    "path": "samples/DateTime2/TODAY.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'TODAY';\n$description = 'Returns the serial number of the current date';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$worksheet->setCellValue('A1', '=TODAY()');\n$worksheet->getStyle('A1')\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\n$helper->log(\n    'Today is '\n    . $worksheet->getCell('A1')->getCalculatedValueString()\n    . ' ('\n    . $worksheet->getCell('A1')->getFormattedValue()\n    . ')'\n);\n"
  },
  {
    "path": "samples/DateTime2/WEEKDAY.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'WEEKDAY';\n$description = 'Returns the day of the week corresponding to a date';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 2, 14],\n    [1936, 3, 17],\n    [1964, 4, 29],\n    [1999, 5, 18],\n    [2000, 6, 21],\n    [2019, 7, 4],\n    [2020, 8, 31],\n    [1956, 9, 10],\n    [2010, 10, 10],\n    [1982, 11, 30],\n    [1960, 12, 19],\n    ['=YEAR(TODAY())', '=MONTH(TODAY())', '=DAY(TODAY())'],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=WEEKDAY(D' . $row . ')');\n    $worksheet->setCellValue('G' . $row, '=WEEKDAY(D' . $row . ', 2)');\n}\n$worksheet->getStyle('E1:E' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log(\n        'Weekday is: '\n        . $worksheet->getCell('F' . $row)->getCalculatedValueString()\n        . ' (1-7 = Sun-Sat)'\n    );\n    $helper->log(\n        'Weekday is: '\n        . $worksheet->getCell('G' . $row)->getCalculatedValueString()\n        . ' (1-7 = Mon-Sun)'\n    );\n}\n"
  },
  {
    "path": "samples/DateTime2/WEEKNUM.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'WEEKNUM';\n$description = 'Returns the week number of a specific date';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 2, 14],\n    [1936, 3, 17],\n    [1964, 4, 29],\n    [1999, 5, 18],\n    [2000, 6, 21],\n    [2019, 7, 4],\n    [2020, 8, 31],\n    [1956, 9, 10],\n    [2010, 10, 10],\n    [1982, 11, 30],\n    [1960, 12, 19],\n    ['=YEAR(TODAY())', '=MONTH(TODAY())', '=DAY(TODAY())'],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=WEEKNUM(D' . $row . ')');\n    $worksheet->setCellValue('G' . $row, '=WEEKNUM(D' . $row . ', 21)');\n}\n$worksheet->getStyle('E1:E' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log('System 1 Week number is: ' . $worksheet->getCell('F' . $row)->getCalculatedValueString());\n    $helper->log('System 2 (ISO-8601) Week number is: ' . $worksheet->getCell('G' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime2/WORKDAY.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'WORKDAY';\n$description = 'Returns a number that represents a date that is the indicated number of working days before or after a starting date. Working days exclude weekends and any dates identified as holidays';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$publicHolidays = [\n    [2022, 1, 3, '=DATE(G1, H1, I1)', 'New Year'],\n    [2022, 4, 15, '=DATE(G2, H2, I2)', 'Good Friday'],\n    [2022, 4, 18, '=DATE(G3, H3, I3)', 'Easter Monday'],\n    [2022, 5, 2, '=DATE(G4, H4, I4)', 'Early May Bank Holiday'],\n    [2022, 6, 2, '=DATE(G5, H5, I5)', 'Spring Bank Holiday'],\n    [2022, 6, 3, '=DATE(G6, H6, I6)', 'Platinum Jubilee Bank Holiday'],\n    [2022, 8, 29, '=DATE(G7, H7, I7)', 'Summer Bank Holiday'],\n    [2022, 12, 26, '=DATE(G8, H8, I8)', 'Boxing Day'],\n    [2022, 12, 27, '=DATE(G9, H9, I9)', 'Christmas Day'],\n];\n\n$holidayCount = count($publicHolidays);\n$worksheet->fromArray($publicHolidays, null, 'G1', true);\n\n$worksheet->getStyle('J1:J' . $holidayCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n$worksheet->setCellValue('A1', '=DATE(2022,1,1)');\n\n$workdayStep = 10;\nfor ($days = $workdayStep; $days <= 366; $days += $workdayStep) {\n    $worksheet->setCellValue('B' . ((int) $days / $workdayStep + 1), $days);\n    $worksheet->setCellValue('C' . ((int) $days / $workdayStep + 1), '=WORKDAY(A1, B' . ((int) $days / $workdayStep + 1) . ')');\n    $worksheet->setCellValue('D' . ((int) $days / $workdayStep + 1), '=WORKDAY(A1, B' . ((int) $days / $workdayStep + 1) . ', J1:J' . $holidayCount . ')');\n}\n\n$worksheet->getStyle('A1')\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n$worksheet->getStyle('C1:D50')\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\n$helper->log('UK Public Holidays');\n$holidayData = $worksheet->rangeToArray('J1:K' . $holidayCount, null, true, true, true);\n$helper->displayGrid($holidayData);\n\nfor ($days = $workdayStep; $days <= 366; $days += $workdayStep) {\n    $helper->log(sprintf(\n        '%d workdays from %s is %s; %s with public holidays',\n        $worksheet->getCell('B' . ((int) $days / $workdayStep + 1))->getFormattedValue(),\n        $worksheet->getCell('A1')->getFormattedValue(),\n        $worksheet->getCell('C' . ((int) $days / $workdayStep + 1))->getFormattedValue(),\n        $worksheet->getCell('D' . ((int) $days / $workdayStep + 1))->getFormattedValue()\n    ));\n}\n"
  },
  {
    "path": "samples/DateTime2/YEAR.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'YEAR';\n$description = 'Returns the year of a date, an integer ranging from 1900 to 9999';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 2, 14],\n    [1936, 3, 17],\n    [1964, 4, 29],\n    [1999, 5, 18],\n    [2000, 6, 21],\n    [2019, 7, 4],\n    [2020, 8, 31],\n    [1956, 9, 10],\n    [2010, 10, 10],\n    [1982, 11, 30],\n    [1960, 12, 19],\n    ['=YEAR(TODAY())', '=MONTH(TODAY())', '=DAY(TODAY())'],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=YEAR(D' . $row . ')');\n}\n$worksheet->getStyle('E1:E' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue()));\n    $helper->log('Year is: ' . $worksheet->getCell('F' . $row)->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/DateTime2/YEARFRAC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Date/Time';\n$functionName = 'DAYS360';\n$description = 'Returns the number of days between two dates based on a 360-day year';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testDates = [\n    [1900, 1, 1],\n    [1904, 1, 1],\n    [1936, 3, 17],\n    [1960, 12, 19],\n    [1999, 12, 31],\n    [2000, 1, 1],\n    [2019, 2, 14],\n    [2020, 7, 4],\n    [2020, 2, 29],\n    [2029, 12, 31],\n    [2525, 1, 1],\n];\n$testDateCount = count($testDates);\n\n$worksheet->fromArray($testDates, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');\n    $worksheet->setCellValue('E' . $row, '=D' . $row);\n    $worksheet->setCellValue('F' . $row, '=DATE(2022,12,31)');\n    $worksheet->setCellValue('G' . $row, '=YEARFRAC(D' . $row . ', F' . $row . ')');\n    $worksheet->setCellValue('H' . $row, '=YEARFRAC(D' . $row . ', F' . $row . ', 1)');\n    $worksheet->setCellValue('I' . $row, '=YEARFRAC(D' . $row . ', F' . $row . ', 2)');\n    $worksheet->setCellValue('J' . $row, '=YEARFRAC(D' . $row . ', F' . $row . ', 3)');\n    $worksheet->setCellValue('K' . $row, '=YEARFRAC(D' . $row . ', F' . $row . ', 4)');\n}\n$worksheet->getStyle('E1:F' . $testDateCount)\n    ->getNumberFormat()\n    ->setFormatCode('yyyy-mm-dd');\n\n// Test the formulae\nfor ($row = 1; $row <= $testDateCount; ++$row) {\n    $helper->log(sprintf(\n        'Between: %s and %s',\n        $worksheet->getCell('E' . $row)->getFormattedValue(),\n        $worksheet->getCell('F' . $row)->getFormattedValue()\n    ));\n    $helper->log(\n        'Days: '\n        . $worksheet->getCell('G' . $row)->getCalculatedValueString()\n        . ' - US (NASD) 30/360'\n    );\n    $helper->log(\n        'Days: '\n        . $worksheet->getCell('H' . $row)->getCalculatedValueString()\n        . ' - Actual'\n    );\n    $helper->log(\n        'Days: '\n        . $worksheet->getCell('I' . $row)->getCalculatedValueString()\n        . ' - Actual/360'\n    );\n    $helper->log(\n        'Days: '\n        . $worksheet->getCell('J' . $row)->getCalculatedValueString()\n        . ' - Actual/365'\n    );\n    $helper->log(\n        'Days: '\n        . $worksheet->getCell('K' . $row)->getCalculatedValueString()\n        . ' - European 30/360'\n    );\n}\n"
  },
  {
    "path": "samples/DefinedNames/AbsoluteNamedRange.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50')\n    ->setCellValue('A3', 'Date')\n    ->setCellValue('B3', 'Hours')\n    ->setCellValue('C3', 'Charge');\n\n// Define named range using an absolute cell reference\n$spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1'));\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 4;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", \"=B{$row}*CHARGE_RATE\");\n    ++$row;\n}\n$endRow = $row - 1;\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", \"=SUM(B{$startRow}:B{$endRow})\")\n    ->setCellValue(\"C{$row}\", \"=SUM(C{$startRow}:C{$endRow})\");\n\n/** @var float */\n$calc1 = $worksheet->getCell(\"B{$row}\")->getCalculatedValue();\n/** @var float */\n$value = $worksheet->getCell('B1')->getValue();\n/** @var float */\n$calc2 = $worksheet->getCell(\"C{$row}\")->getCalculatedValue();\n$helper->log(sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $calc1,\n    $value,\n    $calc2\n));\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/CrossWorksheetNamedFormula.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n\n$data2019 = [\n    [151600, 21600],\n    [160320, 30320],\n    [243500, 73500],\n    [113450, 13450],\n    [143200, 23200],\n    [134000, 14000],\n    [89400, -10600],\n    [184500, 24500],\n    [100800, 800],\n    [241850, 5150],\n    [142425, 12425],\n    [243400, 43400],\n];\n\n$data2020 = [\n    [183250, 33250],\n    [210350, 40350],\n    [298650, 48650],\n    [140550, 20550],\n    [183145, 33145],\n    [172355, 22355],\n];\n\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\nsetYearlyData($worksheet, '2019', $data2019);\n$worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet));\nsetYearlyData($worksheet, '2020', $data2020);\n$worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet));\nsetYearlyData($worksheet, '2020', [], 'GROWTH');\n\n/** @param array<int, array<int, int>> $yearlyData */\nfunction setYearlyData(Worksheet $worksheet, string $year, array $yearlyData, ?string $title = null): void\n{\n    // Set up some basic data\n    $worksheetTitle = $title ?: $year;\n    $worksheet\n        ->setTitle($worksheetTitle)\n        ->setCellValue('A1', 'Month')\n        ->setCellValue('B1', $worksheetTitle === 'GROWTH' ? 'Growth' : 'Sales')\n        ->setCellValue('C1', $worksheetTitle === 'GROWTH' ? 'Profit Growth' : 'Margin')\n        ->setCellValue('A2', Date::stringToExcel(\"{$year}-01-01\"));\n    for ($row = 3; $row <= 13; ++$row) {\n        $worksheet->setCellValue(\"A{$row}\", '=NEXT_MONTH');\n    }\n\n    if (!empty($yearlyData)) {\n        $worksheet->fromArray($yearlyData, null, 'B2');\n    } else {\n        for ($row = 2; $row <= 13; ++$row) {\n            $worksheet->setCellValue(\"B{$row}\", '=GROWTH');\n            $worksheet->setCellValue(\"C{$row}\", '=PROFIT_GROWTH');\n        }\n    }\n\n    $worksheet->getStyle('A1:C1')\n        ->getFont()->setBold(true);\n    $worksheet->getStyle('A2:A13')\n        ->getNumberFormat()\n        ->setFormatCode('mmmm');\n    $worksheet->getStyle('B2:C13')\n        ->getNumberFormat()\n        ->setFormatCode($worksheetTitle === 'GROWTH' ? '0.00%' : '_-€* #,##0_-');\n}\n\n// Add some Named Formulae\n// The first to store our tax rate\n$spreadsheet->addNamedFormula(new NamedFormula('NEXT_MONTH', $worksheet, '=EDATE(OFFSET($A1,-1,0),1)'));\n$spreadsheet->addNamedFormula(new NamedFormula('GROWTH', $worksheet, \"=IF('2020'!\\$B1=\\\"\\\",\\\"-\\\",(('2020'!\\$B1/'2019'!\\$B1)-1))\"));\n$spreadsheet->addNamedFormula(new NamedFormula('PROFIT_GROWTH', $worksheet, \"=IF('2020'!\\$C1=\\\"\\\",\\\"-\\\",(('2020'!\\$C1/'2019'!\\$C1)-1))\"));\n\nfor ($row = 2; $row <= 7; ++$row) {\n    $month = $worksheet->getCell(\"A{$row}\")->getFormattedValue();\n    $growth = $worksheet->getCell(\"B{$row}\")->getFormattedValue();\n    $profitGrowth = $worksheet->getCell(\"C{$row}\")->getFormattedValue();\n\n    $helper->log(\"Growth for {$month} is {$growth}, with a Profit Growth of {$profitGrowth}\");\n}\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/NamedFormulaeAndRanges.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50')\n    ->setCellValue('A3', 'Date')\n    ->setCellValue('B3', 'Hours')\n    ->setCellValue('C3', 'Charge');\n\n// Define named ranges\n// CHARGE_RATE is an absolute cell reference that always points to cell B1\n$spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1'));\n// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));\n// Set up the formula for calculating the daily charge\n$spreadsheet->addNamedFormula(new NamedFormula('DAILY_CHARGE', null, '=HOURS_PER_DAY*CHARGE_RATE'));\n// Set up the formula for calculating the column totals\n$spreadsheet->addNamedFormula(new NamedFormula('COLUMN_TOTALS', null, '=SUM(COLUMN_DATA_VALUES)'));\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 4;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", '=DAILY_CHARGE');\n    ++$row;\n}\n$endRow = $row - 1;\n\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n$spreadsheet->addNamedRange(new NamedRange('COLUMN_DATA_VALUES', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\"));\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", '=COLUMN_TOTALS')\n    ->setCellValue(\"C{$row}\", '=COLUMN_TOTALS');\n\n/** @var float */\n$calc1 = $worksheet->getCell(\"B{$row}\")->getCalculatedValue();\n/** @var float */\n$value = $worksheet->getCell('B1')->getValue();\n/** @var float */\n$calc2 = $worksheet->getCell(\"C{$row}\")->getCalculatedValue();\n$helper->log(sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $calc1,\n    $value,\n    $calc2\n));\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/RelativeNamedRange.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50')\n    ->setCellValue('A3', 'Date')\n    ->setCellValue('B3', 'Hours')\n    ->setCellValue('C3', 'Charge');\n\n// Define named ranges\n// CHARGE_RATE is an absolute cell reference that always points to cell B1\n$spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1'));\n// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 4;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", '=HOURS_PER_DAY*CHARGE_RATE');\n    ++$row;\n}\n$endRow = $row - 1;\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", \"=SUM(B{$startRow}:B{$endRow})\")\n    ->setCellValue(\"C{$row}\", \"=SUM(C{$startRow}:C{$endRow})\");\n\n/** @var float */\n$calc1 = $worksheet->getCell(\"B{$row}\")->getCalculatedValue();\n/** @var float */\n$value = $worksheet->getCell('B1')->getValue();\n/** @var float */\n$calc2 = $worksheet->getCell(\"C{$row}\")->getCalculatedValue();\n$helper->log(sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $calc1,\n    $value,\n    $calc2\n));\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/RelativeNamedRange2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50')\n    ->setCellValue('A3', 'Date')\n    ->setCellValue('B3', 'Hours')\n    ->setCellValue('C3', 'Charge');\n\n// Define named ranges\n// CHARGE_RATE is an absolute cell reference that always points to cell B1\n$spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1'));\n// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 4;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", '=HOURS_PER_DAY*CHARGE_RATE');\n    ++$row;\n}\n$endRow = $row - 1;\n\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n$spreadsheet->addNamedRange(new NamedRange('COLUMN_DATA_VALUES', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\"));\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", '=SUM(COLUMN_DATA_VALUES)')\n    ->setCellValue(\"C{$row}\", '=SUM(COLUMN_DATA_VALUES)');\n\n/** @var float */\n$calc1 = $worksheet->getCell(\"B{$row}\")->getCalculatedValue();\n/** @var float */\n$value = $worksheet->getCell('B1')->getValue();\n/** @var float */\n$calc2 = $worksheet->getCell(\"C{$row}\")->getCalculatedValue();\n$helper->log(sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $calc1,\n    $value,\n    $calc2\n));\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/RelativeNamedRangeAsFunction.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50')\n    ->setCellValue('A3', 'Date')\n    ->setCellValue('B3', 'Hours')\n    ->setCellValue('C3', 'Charge');\n\n// Define named ranges\n// CHARGE_RATE is an absolute cell reference that always points to cell B1\n$spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1'));\n// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 4;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", '=HOURS_PER_DAY*CHARGE_RATE');\n    ++$row;\n}\n$endRow = $row - 1;\n\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n// To avoid including the current row,or having to hard-code the range itself (as we did in the previous example)\n//    we wrap it in a named formula using the OFFSET() function\n$spreadsheet->addNamedFormula(new NamedFormula('COLUMN_DATA_VALUES', $worksheet, '=OFFSET(A$4:A1, -1, 0)'));\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", '=SUM(COLUMN_DATA_VALUES)')\n    ->setCellValue(\"C{$row}\", '=SUM(COLUMN_DATA_VALUES)');\n\n/** @var float */\n$calc1 = $worksheet->getCell(\"B{$row}\")->getCalculatedValue();\n/** @var float */\n$value = $worksheet->getCell('B1')->getValue();\n/** @var float */\n$calc2 = $worksheet->getCell(\"C{$row}\")->getCalculatedValue();\n$helper->log(sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $calc1,\n    $value,\n    $calc2\n));\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/ScopedNamedRange.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n$worksheet->setTitle('Base Data');\n\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Charge Rate/hour:')\n    ->setCellValue('B1', '7.50');\n\n// Define a global named range on the first worksheet for our Charge Rate\n// CHARGE_RATE is an absolute cell reference that always points to cell B1\n// Because it is defined globally, it will still be usable from any worksheet in the spreadsheet\n$spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1'));\n\n// Create a second worksheet as our client timesheet\n$worksheet = $spreadsheet->addSheet(new PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet($spreadsheet, 'Client Timesheet'));\n\n// Define named ranges\n// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));\n\n// Set up some basic data for a timesheet\n$worksheet\n    ->setCellValue('A1', 'Date')\n    ->setCellValue('B1', 'Hours')\n    ->setCellValue('C1', 'Charge');\n\n$workHours = [\n    '2020-0-06' => 7.5,\n    '2020-0-07' => 7.25,\n    '2020-0-08' => 6.5,\n    '2020-0-09' => 7.0,\n    '2020-0-10' => 5.5,\n];\n\n// Populate the Timesheet\n$startRow = 2;\n$row = $startRow;\nforeach ($workHours as $date => $hours) {\n    $worksheet\n        ->setCellValue(\"A{$row}\", $date)\n        ->setCellValue(\"B{$row}\", $hours)\n        ->setCellValue(\"C{$row}\", '=HOURS_PER_DAY*CHARGE_RATE');\n    ++$row;\n}\n$endRow = $row - 1;\n\n// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n$spreadsheet->addNamedRange(new NamedRange('COLUMN_DATA_VALUES', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\"));\n\n++$row;\n$worksheet\n    ->setCellValue(\"B{$row}\", '=SUM(COLUMN_DATA_VALUES)')\n    ->setCellValue(\"C{$row}\", '=SUM(COLUMN_DATA_VALUES)');\n\n$range = $spreadsheet->getNamedRange('CHARGE_RATE');\nif ($range === null || $range->getWorksheet() === null) {\n    throw new Exception('expected named range not found');\n}\n/** @var string */\n$cellsInRange0 = $range->getCellsInRange()[0];\n/** @var float */\n$chargeRateCellValue = $spreadsheet\n    ->getSheetByNameOrThrow($range->getWorksheet()->getTitle())\n    ->getCell($cellsInRange0)->getValue();\n\n/** @var float */\n$calc1 = $worksheet->getCell(\"B{$row}\")->getCalculatedValue();\n/** @var float */\n$calc2 = $worksheet->getCell(\"C{$row}\")->getCalculatedValue();\n$helper->log(sprintf(\n    'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',\n    $calc1,\n    $chargeRateCellValue,\n    $calc2\n));\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/ScopedNamedRange2.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n$clients = [\n    'Client #1 - Full Hourly Rate' => [\n        '2020-0-06' => 2.5,\n        '2020-0-07' => 2.25,\n        '2020-0-08' => 6.0,\n        '2020-0-09' => 3.0,\n        '2020-0-10' => 2.25,\n    ],\n    'Client #2 - Full Hourly Rate' => [\n        '2020-0-06' => 1.5,\n        '2020-0-07' => 2.75,\n        '2020-0-08' => 0.0,\n        '2020-0-09' => 4.5,\n        '2020-0-10' => 3.5,\n    ],\n    'Client #3 - Reduced Hourly Rate' => [\n        '2020-0-06' => 3.5,\n        '2020-0-07' => 2.5,\n        '2020-0-08' => 1.5,\n        '2020-0-09' => 0.0,\n        '2020-0-10' => 1.25,\n    ],\n];\n\nforeach ($clients as $clientName => $workHours) {\n    $worksheet = $spreadsheet->addSheet(new PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet($spreadsheet, $clientName));\n\n    // Set up some basic data for a timesheet\n    $worksheet\n        ->setCellValue('A1', 'Charge Rate/hour:')\n        ->setCellValue('B1', '7.50')\n        ->setCellValue('A3', 'Date')\n        ->setCellValue('B3', 'Hours')\n        ->setCellValue('C3', 'Charge');\n\n    // Define named ranges\n    // CHARGE_RATE is an absolute cell reference that always points to cell B1\n    $spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1', true));\n    // HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used\n    $spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1', true));\n\n    // Populate the Timesheet\n    $startRow = 4;\n    $row = $startRow;\n    foreach ($workHours as $date => $hours) {\n        $worksheet\n            ->setCellValue(\"A{$row}\", $date)\n            ->setCellValue(\"B{$row}\", $hours)\n            ->setCellValue(\"C{$row}\", '=HOURS_PER_DAY*CHARGE_RATE');\n        ++$row;\n    }\n    $endRow = $row - 1;\n\n    // COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used\n    $spreadsheet->addNamedRange(new NamedRange('COLUMN_TOTAL', $worksheet, \"=A\\${$startRow}:A\\${$endRow}\", true));\n\n    ++$row;\n    $worksheet\n        ->setCellValue(\"B{$row}\", '=SUM(COLUMN_TOTAL)')\n        ->setCellValue(\"C{$row}\", '=SUM(COLUMN_TOTAL)');\n}\n$spreadsheet->removeSheetByIndex(0);\n\n// Set the reduced charge rate for our special client\n$worksheet\n    ->setCellValue('B1', 4.5);\n\nforeach ($spreadsheet->getAllSheets() as $worksheet) {\n    /** @var float */\n    $calc1 = $worksheet->getCell(\"B{$row}\")->getCalculatedValue();\n    /** @var float */\n    $value = $worksheet->getCell('B1')->getValue();\n    /** @var float */\n    $calc2 = $worksheet->getCell(\"C{$row}\")->getCalculatedValue();\n    $helper->log(sprintf(\n        'Worked %.2f hours for \"%s\" at a rate of %.2f - Charge to the client is %.2f',\n        $calc1,\n        $worksheet->getTitle(),\n        $value,\n        $calc2\n    ));\n}\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/SimpleNamedFormula.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n// Add some Named Formulae\n// The first to store our tax rate\n$spreadsheet->addNamedFormula(new NamedFormula('TAX_RATE', $worksheet, '=19%'));\n// The second to calculate the Tax on a Price value (Note that `PRICE` is defined later as a Named Range)\n$spreadsheet->addNamedFormula(new NamedFormula('TAX', $worksheet, '=PRICE*TAX_RATE'));\n\n// Set up some basic data\n$worksheet\n    ->setCellValue('A1', 'Tax Rate:')\n    ->setCellValue('B1', '=TAX_RATE')\n    ->setCellValue('A3', 'Net Price:')\n    ->setCellValue('B3', 19.99)\n    ->setCellValue('A4', 'Tax:')\n    ->setCellValue('A5', 'Price including Tax:');\n\n// Define a named range that we can use in our formulae\n$spreadsheet->addNamedRange(new NamedRange('PRICE', $worksheet, '=$B$3'));\n\n// Reference the defined formulae in worksheet formulae\n$worksheet\n    ->setCellValue('B4', '=TAX')\n    ->setCellValue('B5', '=PRICE+TAX');\n\n/** @var float */\n$calc1 = $worksheet->getCell('B1')->getCalculatedValue();\n/** @var float */\n$value = $worksheet->getCell('B3')->getValue();\n/** @var float */\n$calc2 = $worksheet->getCell('B4')->getCalculatedValue();\n/** @var float */\n$calc3 = $worksheet->getCell('B5')->getCalculatedValue();\n$helper->log(sprintf(\n    'With a Tax Rate of %.2f and a net price of %.2f, Tax is %.2f and the gross price is %.2f',\n    $calc1,\n    $value,\n    $calc2,\n    $calc3\n));\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/DefinedNames/SimpleNamedRange.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire_once __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->setActiveSheetIndex(0);\n\n// Set up some basic data\n$worksheet\n    ->setCellValue('A1', 'Tax Rate:')\n    ->setCellValue('B1', '=19%')\n    ->setCellValue('A3', 'Net Price:')\n    ->setCellValue('B3', 12.99)\n    ->setCellValue('A4', 'Tax:')\n    ->setCellValue('A5', 'Price including Tax:');\n\n// Define named ranges\n$spreadsheet->addNamedRange(new NamedRange('TAX_RATE', $worksheet, '=$B$1'));\n$spreadsheet->addNamedRange(new NamedRange('PRICE', $worksheet, '=$B$3'));\n\n// Reference that defined name in a formula\n$worksheet\n    ->setCellValue('B4', '=PRICE*TAX_RATE')\n    ->setCellValue('B5', '=PRICE*(1+TAX_RATE)');\n\n/** @var float */\n$calc1 = $worksheet->getCell('B1')->getCalculatedValue();\n/** @var float */\n$value = $worksheet->getCell('B3')->getValue();\n/** @var float */\n$calc2 = $worksheet->getCell('B4')->getCalculatedValue();\n/** @var float */\n$calc3 = $worksheet->getCell('B5')->getCalculatedValue();\n$helper->log(sprintf(\n    'With a Tax Rate of %.2f and a net price of %.2f, Tax is %.2f and the gross price is %.2f',\n    $calc1,\n    $value,\n    $calc2,\n    $calc3\n));\n\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/Engineering/BESSELI.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BESSELI';\n$description = 'Returns the modified Bessel function, which is equivalent to the Bessel function evaluated for purely imaginary arguments';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\nfor ($n = 0; $n <= 5; ++$n) {\n    for ($x = 0; $x <= 5; $x = $x + 0.25) {\n        Calculation::getInstance($spreadsheet)->flushInstance();\n        $formula = \"BESSELI({$x}, {$n})\";\n        $worksheet->setCellValue('A1', \"=$formula\");\n\n        $helper->log(\"$formula = \" . $worksheet->getCell('A1')->getCalculatedValueString());\n    }\n}\n"
  },
  {
    "path": "samples/Engineering/BESSELJ.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BESSELJ';\n$description = 'Returns the Bessel function';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\nfor ($n = 0; $n <= 5; ++$n) {\n    for ($x = 0; $x <= 5; $x = $x + 0.25) {\n        Calculation::getInstance($spreadsheet)->flushInstance();\n        $formula = \"BESSELJ({$x}, {$n})\";\n        $worksheet->setCellValue('A1', \"=$formula\");\n\n        $helper->log(\"$formula = \" . $worksheet->getCell('A1')->getCalculatedValueString());\n    }\n}\n"
  },
  {
    "path": "samples/Engineering/BESSELK.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BESSELK';\n$description = 'Returns the modified Bessel function, which is equivalent to the Bessel functions evaluated for purely imaginary arguments';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\nfor ($n = 0; $n <= 5; ++$n) {\n    for ($x = 0; $x <= 5; $x = $x + 0.25) {\n        Calculation::getInstance($spreadsheet)->flushInstance();\n        $formula = \"BESSELK({$x}, {$n})\";\n        $worksheet->setCellValue('A1', \"=$formula\");\n\n        $helper->log(\"$formula = \" . $worksheet->getCell('A1')->getCalculatedValueString());\n    }\n}\n"
  },
  {
    "path": "samples/Engineering/BESSELY.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BESSELY';\n$description = 'Returns the Bessel function, which is also called the Weber function or the Neumann function';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\nfor ($n = 0; $n <= 5; ++$n) {\n    for ($x = 0; $x <= 5; $x = $x + 0.25) {\n        Calculation::getInstance($spreadsheet)->flushInstance();\n        $formula = \"BESSELY({$x}, {$n})\";\n        $worksheet->setCellValue('A1', \"=$formula\");\n\n        $helper->log(\"$formula = \" . $worksheet->getCell('A1')->getCalculatedValueString());\n    }\n}\n"
  },
  {
    "path": "samples/Engineering/CONVERT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'CONVERT';\n$description = 'Converts a number from one measurement system to another';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$conversions = [\n    [1, 'lbm', 'kg'],\n    [1, 'gal', 'l'],\n    [24, 'in', 'ft'],\n    [100, 'yd', 'm'],\n    [500, 'mi', 'km'],\n    [7.5, 'min', 'sec'],\n    [5, 'F', 'C'],\n    [32, 'C', 'K'],\n    [100, 'm2', 'ft2'],\n];\n$testDataCount = count($conversions);\n\n$worksheet->fromArray($conversions, null, 'A1');\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $data = $conversions[$row - 1];\n    $worksheet->setCellValue(\"D$row\", \"=CONVERT({$data[0]},\\\"{$data[1]}\\\",\\\"{$data[2]}\\\")\");\n}\n\n$worksheet->setCellValue('H1', '=CONVERT(CONVERT(100,\"m\",\"ft\"),\"m\",\"ft\")');\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(A$row): Unit of Measure Conversion Formula \"\n        . $worksheet->getCell('D' . $row)->getValueString()\n        . ' - '\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('D' . $row)->getCalculatedValueString()\n        . ' '\n        . $worksheet->getCell('C' . $row)->getValueString()\n    );\n}\n\n$helper->log('Old method for area conversions, before MS Excel introduced area Units of Measure');\n\n$helper->log(\n    \"(A$row): Unit of Measure Conversion Formula \"\n    . $worksheet->getCell('H1')->getValueString()\n    . ' result is '\n    . $worksheet->getCell('H1')->getCalculatedValueString()\n);\n"
  },
  {
    "path": "samples/Engineering/Convert-Online.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertUOM;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nrequire __DIR__ . '/../Header.php';\n/** @var Sample $helper */\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n$post = [];\nforeach (['category', 'quantity', 'fromUnit', 'toUnit'] as $value) {\n    if (isset($_POST[$value])) {\n        $post[$value] = StringHelper::convertToString($_POST[$value]);\n    }\n}\n$categories = ConvertUOM::getConversionCategories();\n$defaultCategory = $post['category'] ?? $categories[0];\n$units = [];\nforeach ($categories as $category) {\n    $categoryUnits = ConvertUOM::getConversionCategoryUnitDetails($category)[$category];\n    $categoryUnits = array_unique(\n        array_combine(\n            array_column($categoryUnits, 'unit'),\n            array_column($categoryUnits, 'description')\n        )\n    );\n    $units[$category] = $categoryUnits;\n}\n\n?>\n<form action=Convert-Online.php method=\"POST\">\n    <div class=\"mb-3 row\">\n        <label for=\"category\" class=\"col-sm-2 col-form-label\">Category</label>\n        <div class=\"col-sm-10\">\n            <select name=\"category\" class=\"form-select\" onchange=\"this.form.submit()\">\n                <?php foreach ($categories as $category) {\n                    echo \"<option value=\\\"{$category}\\\" \" . ((isset($post['category']) && $post['category'] === $category) ? 'selected' : '') . \">{$category}</option>\", PHP_EOL;\n                } ?>\n            </select>\n        </div>\n    </div>\n    <div class=\"mb-3 row\">\n        <label for=\"quantity\" class=\"col-sm-2 col-form-label\">Quantity</label>\n        <div class=\"col-sm-10\">\n            <input name=\"quantity\" type=\"text\" size=\"8\" value=\"<?php echo (isset($post['quantity'])) ? htmlentities($post['quantity'], Settings::htmlEntityFlags()) : '1.0'; ?>\">\n        </div>\n    </div>\n    <div class=\"mb-3 row\">\n        <label for=\"fromUnit\" class=\"col-sm-2 col-form-label\">From Unit</label>\n        <div class=\"col-sm-10\">\n            <select name=\"fromUnit\" class=\"form-select\">\n                <?php foreach ($units[$defaultCategory] as $fromUnitCode => $fromUnitName) {\n                    echo \"<option value=\\\"{$fromUnitCode}\\\" \" . ((isset($post['fromUnit']) && $post['fromUnit'] === $fromUnitCode) ? 'selected' : '') . \">{$fromUnitName}</option>\", PHP_EOL;\n                } ?>\n            </select>\n        </div>\n    </div>\n    <div class=\"mb-3 row\">\n        <label for=\"toUnit\" class=\"col-sm-2 col-form-label\">To Unit</label>\n        <div class=\"col-sm-10\">\n            <select name=\"toUnit\" class=\"form-select\">\n                <?php foreach ($units[$defaultCategory] as $toUnitCode => $toUnitName) {\n                    echo \"<option value=\\\"{$toUnitCode}\\\" \" . ((isset($post['toUnit']) && $post['toUnit'] === $toUnitCode) ? 'selected' : '') . \">{$toUnitName}</option>\", PHP_EOL;\n                } ?>\n            </select>\n        </div>\n    </div>\n    <div class=\"mb-3 row\">\n        <div class=\"col-sm-10\">\n            <input  class=\"btn btn-primary\" name=\"submitx\" type=\"submit\" value=\"Convert\"><br />\n        </div>\n    </div>\n</form>\n\n<?php\n/**     If the user has submitted the form, then we need to calculate the value and display the result */\nif (isset($post['quantity'], $post['fromUnit'], $post['toUnit'])) {\n    $quantity = $post['quantity'];\n    $fromUnit = $post['fromUnit'];\n    $toUnit = $post['toUnit'];\n    if (!is_numeric($quantity)) {\n        $helper->log('Quantity is not numeric');\n    } elseif (isset($units[$post['category']][$fromUnit], $units[$post['category']][$toUnit])) {\n        /** @var float|string */\n        $result = ConvertUOM::CONVERT($quantity, $fromUnit, $toUnit);\n\n        $helper->log(\"{$quantity} {$units[$post['category']][$fromUnit]} is {$result} {$units[$post['category']][$toUnit]}\");\n    } else {\n        $helper->log('Please enter quantity and select From Unit and To Unit');\n    }\n} else {\n    $helper->log('Please enter quantity and select From Unit and To Unit');\n}\n"
  },
  {
    "path": "samples/Engineering/DELTA.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'DELTA';\n$description = 'Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise. This function is also known as the Kronecker Delta function';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [4, 5],\n    [3, 3],\n    [0.5, 0],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=DELTA(A' . $row . ',B' . $row . ')');\n}\n\n$comparison = [\n    0 => 'The values are not equal',\n    1 => 'The values are equal',\n];\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): Compare values \"\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . ' - Result is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n        . ' - '\n        . $comparison[$worksheet->getCell('C' . $row)->getCalculatedValueString()]\n    );\n}\n"
  },
  {
    "path": "samples/Engineering/ERF.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'ERF';\n$description = 'Returns the error function integrated between lower_limit and upper_limit';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData1 = [\n    [0.745],\n    [1],\n    [1.5],\n    [-2],\n];\n\n$testData2 = [\n    [0, 1.5],\n    [1, 2],\n    [-2, 1],\n];\n$testDataCount1 = count($testData1);\n$testDataCount2 = count($testData2);\n$testData2StartRow = $testDataCount1 + 1;\n\n$worksheet->fromArray($testData1, null, 'A1', true);\n$worksheet->fromArray($testData2, null, \"A{$testData2StartRow}\", true);\n\nfor ($row = 1; $row <= $testDataCount1; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=ERF(A' . $row . ')');\n}\n\nfor ($row = $testDataCount1 + 1; $row <= $testDataCount2 + $testDataCount1; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=ERF(A' . $row . ', B' . $row . ')');\n}\n\n// Test the formulae\n$helper->log('ERF() With a single argument');\nfor ($row = 1; $row <= $testDataCount1; ++$row) {\n    $helper->log(\n        \"(C$row): \"\n        . $worksheet->getCell('C' . $row)->getValueString()\n        . ' The error function integrated between 0 and '\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n    );\n}\n\n$helper->log('ERF() With two arguments');\nfor ($row = $testDataCount1 + 1; $row <= $testDataCount2 + $testDataCount1; ++$row) {\n    $helper->log(\n        \"(C$row): \"\n        . $worksheet->getCell('C' . $row)->getValueString()\n        . ' The error function integrated between '\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' and '\n        . $worksheet->getCell('B' . $row)->getValueString()\n        . ' is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/Engineering/ERFC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'ERFC';\n$description = 'Returns the complementary ERF function integrated between x and infinity';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [0],\n    [0.5],\n    [1],\n    [-1],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=ERFC(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(E$row): \"\n        . $worksheet->getCell('C' . $row)->getValueString()\n        . ' The complementary error function integrated by '\n        . $worksheet->getCell('A' . $row)->getValueString()\n        . ' and infinity is '\n        . $worksheet->getCell('C' . $row)->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/Engineering/GESTEP.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'GESTEP';\n$description = 'Returns 1 if number ≥ step; returns 0 (zero) otherwise';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [5, 4],\n    [5, 5],\n    [4, 5],\n    [-4, -5],\n    [-5, -4],\n    [1],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('C' . $row, '=GESTEP(A' . $row . ',B' . $row . ')');\n}\n\n$comparison = [\n    0 => 'Value %d is less than step %d',\n    1 => 'Value %d is greater than or equal to step %d',\n];\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    /** @var int */\n    $aValue = $worksheet->getCell('A' . $row)->getValue();\n    /** @var int */\n    $bValue = $worksheet->getCell('B' . $row)->getValue();\n    /** @var int */\n    $cValue = $worksheet->getCell('C' . $row)->getCalculatedValue();\n    $helper->log(sprintf(\n        '(E%d): Compare value %d and step %d - Result is %d - %s',\n        $row,\n        $aValue,\n        $bValue,\n        $cValue,\n        sprintf(\n            $comparison[$cValue],\n            $aValue,\n            $bValue,\n        )\n    ));\n}\n"
  },
  {
    "path": "samples/Financial1/ACCRINT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the accrued interest for a security that pays periodic interest.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Issue Date', DateHelper::getDateValue('01-Jan-2012')],\n    ['First Interest Date', DateHelper::getDateValue('01-Apr-2012')],\n    ['Settlement Date', DateHelper::getDateValue('31-Dec-2013')],\n    ['Annual Coupon Rate', 0.08],\n    ['Par Value', 10000],\n    ['Frequency', 4],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B3')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n$worksheet->getStyle('B4')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B5')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$worksheet->setCellValue('B10', '=ACCRINT(B1, B2, B3, B4, B5, B6)');\n$worksheet->getStyle('B10')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n$helper->log($worksheet->getCell('B10')->getValue());\n$helper->log('ACCRINT() Result is ' . $worksheet->getCell('B10')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/ACCRINTM.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the accrued interest for a security that pays interest at maturity.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Issue Date', DateHelper::getDateValue('01-Jan-2012')],\n    ['Settlement Date', DateHelper::getDateValue('31-Dec-2012')],\n    ['Annual Coupon Rate', 0.08],\n    ['Par Value', 10000],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n$worksheet->getStyle('B3')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B4')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$worksheet->setCellValue('B6', '=ACCRINTM(B1, B2, B3, B4)');\n$worksheet->getStyle('B6')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n$helper->log($worksheet->getCell('B6')->getValue());\n$helper->log('ACCRINTM() Result is ' . $worksheet->getCell('B6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/AMORDEGRC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the prorated linear depreciation of an asset for a specified accounting period.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Cost', 150.00],\n    ['Date Purchased', DateHelper::getDateValue('01-Jan-2015')],\n    ['First Period Date', DateHelper::getDateValue('30-Sep-2015')],\n    ['Salvage Value', 20.00],\n    ['Number of Periods', 1],\n    ['Depreciation Rate', 0.20],\n    ['Basis', FinancialConstants::BASIS_DAYS_PER_YEAR_360_EUROPEAN],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1')->getNumberFormat()->setFormatCode('$#,##0.00');\n$worksheet->getStyle('B2:B3')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n$worksheet->getStyle('B4')->getNumberFormat()->setFormatCode('$#,##0.00');\n$worksheet->getStyle('B6')->getNumberFormat()->setFormatCode('0.00%');\n\n// Now the formula\n$worksheet->setCellValue('B10', '=AMORDEGRC(B1, B2, B3, B4, B5, B6, B7)');\n$worksheet->getStyle('B10')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n$helper->log($worksheet->getCell('B10')->getValue());\n$helper->log('AMORDEGRC() Result is ' . $worksheet->getCell('B10')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/AMORLINC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the prorated linear depreciation of an asset for a specified accounting period.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Cost', 150.00],\n    ['Date Purchased', DateHelper::getDateValue('01-Jan-2015')],\n    ['First Period Date', DateHelper::getDateValue('30-Sep-2015')],\n    ['Salvage Value', 20.00],\n    ['Period', 1],\n    ['Depreciation Rate', 0.20],\n    ['Basis', FinancialConstants::BASIS_DAYS_PER_YEAR_360_EUROPEAN],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1')->getNumberFormat()->setFormatCode('$#,##0.00');\n$worksheet->getStyle('B2:B3')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n$worksheet->getStyle('B4')->getNumberFormat()->setFormatCode('$#,##0.00');\n$worksheet->getStyle('B6')->getNumberFormat()->setFormatCode('0.00%');\n\n// Now the formula\n$worksheet->setCellValue('B10', '=AMORLINC(B1, B2, B3, B4, B5, B6, B7)');\n$worksheet->getStyle('B10')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n$helper->log($worksheet->getCell('B10')->getValue());\n$helper->log('AMORLINC() Result is ' . $worksheet->getCell('B10')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/COUPDAYBS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the number of days from the beginning of a coupon\\'s period to the settlement date.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Settlement Date', DateHelper::getDateValue('01-Jan-2011')],\n    ['Maturity Date', DateHelper::getDateValue('25-Oct-2012')],\n    ['Frequency', 4],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n\n// Now the formula\n$worksheet->setCellValue('B6', '=COUPDAYBS(B1, B2, B3)');\n\n$helper->log($worksheet->getCell('B6')->getValue());\n$helper->log('COUPDAYBS() Result is ' . $worksheet->getCell('B6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/COUPDAYS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the number of days in the coupon period that contains the settlement date.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Settlement Date', DateHelper::getDateValue('01-Jan-2011')],\n    ['Maturity Date', DateHelper::getDateValue('25-Oct-2012')],\n    ['Frequency', 4],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n\n// Now the formula\n$worksheet->setCellValue('B6', '=COUPDAYS(B1, B2, B3)');\n\n$helper->log($worksheet->getCell('B6')->getValue());\n$helper->log('COUPDAYS() Result is ' . $worksheet->getCell('B6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/COUPDAYSNC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the number of days from the settlement date to the next coupon date.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Settlement Date', DateHelper::getDateValue('01-Jan-2011')],\n    ['Maturity Date', DateHelper::getDateValue('25-Oct-2012')],\n    ['Frequency', 4],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n\n// Now the formula\n$worksheet->setCellValue('B6', '=COUPDAYSNC(B1, B2, B3)');\n\n$helper->log($worksheet->getCell('B6')->getValue());\n$helper->log('COUPDAYSNC() Result is ' . $worksheet->getCell('B6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/COUPNCD.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the next coupon date, after the settlement date.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Settlement Date', DateHelper::getDateValue('01-Jan-2011')],\n    ['Maturity Date', DateHelper::getDateValue('25-Oct-2012')],\n    ['Frequency', 4],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n\n// Now the formula\n$worksheet->setCellValue('B6', '=COUPNCD(B1, B2, B3)');\n$worksheet->getStyle('B6')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n\n$helper->log($worksheet->getCell('B6')->getValue());\n$helper->log('COUPNCD() Result is ' . $worksheet->getCell('B6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/COUPNUM.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the number of coupons payable, between a security\\'s settlement date and maturity date,');\n$helper->log('rounded up to the nearest whole coupon.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Settlement Date', DateHelper::getDateValue('01-Jan-2011')],\n    ['Maturity Date', DateHelper::getDateValue('25-Oct-2012')],\n    ['Frequency', 4],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n\n// Now the formula\n$worksheet->setCellValue('B6', '=COUPNUM(B1, B2, B3)');\n\n$helper->log($worksheet->getCell('B6')->getValue());\n$helper->log('COUPNUM() Result is ' . $worksheet->getCell('B6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/COUPPCD.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the previous coupon date, before the settlement date for a security.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Settlement Date', DateHelper::getDateValue('01-Jan-2011')],\n    ['Maturity Date', DateHelper::getDateValue('25-Oct-2012')],\n    ['Frequency', 4],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n\n// Now the formula\n$worksheet->setCellValue('B6', '=COUPPCD(B1, B2, B3)');\n$worksheet->getStyle('B6')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n\n$helper->log($worksheet->getCell('B6')->getValue());\n$helper->log('COUPPCD() Result is ' . $worksheet->getCell('B6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial1/CUMIPMT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the cumulative interest paid on a loan or investment, between two specified periods.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Interest Rate (per period)', 0.05 / 12],\n    ['Number of Periods', 5 * 12],\n    ['Present Value', 50000],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B3')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$baseRow = 5;\nfor ($year = 1; $year <= 5; ++$year) {\n    $row = (string) ($baseRow + $year);\n    $yearStartPeriod = (int) $year * 12 - 11;\n    $yearEndPeriod = (int) $year * 12;\n\n    $worksheet->setCellValue(\"A{$row}\", \"Yr {$year}\");\n    $worksheet->setCellValue(\"B{$row}\", \"=CUMIPMT(\\$B\\$1, \\$B\\$2, \\$B\\$3, {$yearStartPeriod}, {$yearEndPeriod}, 0)\");\n    $worksheet->getStyle(\"B{$row}\")->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n\n    $helper->log($worksheet->getCell(\"B{$row}\")->getValue());\n    $helper->log(\"CUMIPMT() Year {$year} Result is \" . $worksheet->getCell(\"B{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial1/CUMPRINC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the cumulative payment on the principal of a loan or investment, between two specified periods.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Interest Rate (per period)', 0.05 / 12],\n    ['Number of Periods', 5 * 12],\n    ['Present Value', 50000],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B3')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$baseRow = 5;\nfor ($year = 1; $year <= 5; ++$year) {\n    $row = (string) ($baseRow + $year);\n    $yearStartPeriod = (int) $year * 12 - 11;\n    $yearEndPeriod = (int) $year * 12;\n\n    $worksheet->setCellValue(\"A{$row}\", \"Yr {$year}\");\n    $worksheet->setCellValue(\"B{$row}\", \"=CUMPRINC(\\$B\\$1, \\$B\\$2, \\$B\\$3, {$yearStartPeriod}, {$yearEndPeriod}, 0)\");\n    $worksheet->getStyle(\"B{$row}\")->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n\n    $helper->log($worksheet->getCell(\"B{$row}\")->getValue());\n    $helper->log(\"CUMPRINC() Year {$year} Result is \" . $worksheet->getCell(\"B{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial2/DB.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the depreciation of an asset, using the Fixed Declining Balance Method,');\n$helper->log('for each period of the asset\\'s lifetime.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Cost Value', 10000],\n    ['Salvage', 1000],\n    ['Life', 5, 'Years'],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$baseRow = 5;\nfor ($year = 1; $year <= 5; ++$year) {\n    $row = (string) ($baseRow + $year);\n\n    $worksheet->setCellValue(\"A{$row}\", \"Depreciation after Yr {$year}\");\n    $worksheet->setCellValue(\"B{$row}\", \"=DB(\\$B\\$1, \\$B\\$2, \\$B\\$3, {$year})\");\n    $worksheet->getStyle(\"B{$row}\")->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n\n    $helper->log($worksheet->getCell(\"B{$row}\")->getValue());\n    $helper->log(\"DB() Year {$year} Result is \" . $worksheet->getCell(\"B{$row}\")->getFormattedValue());\n}\n\n$helper->log('And with depreciation only starting after 6 months.');\n\n$baseRow = 12;\nfor ($year = 1; $year <= 6; ++$year) {\n    $row = (string) ($baseRow + $year);\n\n    $worksheet->setCellValue(\"A{$row}\", \"Depreciation after Yr {$year}\");\n    $worksheet->setCellValue(\"B{$row}\", \"=DB(\\$B\\$1, \\$B\\$2, \\$B\\$3, {$year}, 6)\");\n    $worksheet->getStyle(\"B{$row}\")->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n\n    $helper->log($worksheet->getCell(\"B{$row}\")->getValue());\n    $helper->log(\"DB() Year {$year} Result is \" . $worksheet->getCell(\"B{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial2/DDB.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the depreciation of an asset, using the Double Declining Balance Method,');\n$helper->log('for each period of the asset\\'s lifetime.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Cost Value', 10000],\n    ['Salvage', 1000],\n    ['Life', 5, 'Years'],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$baseRow = 5;\nfor ($year = 1; $year <= 5; ++$year) {\n    $row = (string) ($baseRow + $year);\n\n    $worksheet->setCellValue(\"A{$row}\", \"Depreciation after Yr {$year}\");\n    $worksheet->setCellValue(\"B{$row}\", \"=DDB(\\$B\\$1, \\$B\\$2, \\$B\\$3, {$year})\");\n    $worksheet->getStyle(\"B{$row}\")->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n\n    $helper->log($worksheet->getCell(\"B{$row}\")->getValue());\n    $helper->log(\"DDB() Year {$year} Result is \" . $worksheet->getCell(\"B{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial2/DISC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the Discount Rate for a security.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Settlement Date', DateHelper::getDateValue('01-Apr-2016')],\n    ['Maturity Date', DateHelper::getDateValue('31-Mar-2021')],\n    ['Par Value', 95.00],\n    ['Redemption Value', 100.00],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n$worksheet->getStyle('B3:B4')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$worksheet->setCellValue('B7', '=DISC(B1, B2, B3, B4)');\n$worksheet->getStyle('B7')->getNumberFormat()->setFormatCode('0.00%');\n\n$helper->log($worksheet->getCell('B7')->getValue());\n$helper->log('DISC() Result is ' . $worksheet->getCell('B7')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial2/DOLLARDE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the dollar value in fractional notation, into a dollar value expressed as a decimal.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    [1.01, 16],\n    [1.1, 16],\n    [1.03, 32],\n    [1.3, 32],\n    [1.12, 32],\n];\n\n$worksheet->fromArray($arguments, null, 'A1');\n\n// Now the formula\nfor ($row = 1; $row <= 5; ++$row) {\n    $worksheet->setCellValue(\"C{$row}\", \"=DOLLARDE(A{$row}, B{$row})\");\n\n    $helper->log($worksheet->getCell(\"C{$row}\")->getValue());\n    $helper->log('DOLLARDE() Result is ' . $worksheet->getCell(\"C{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial2/DOLLARFR.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the dollar value expressed as a decimal number, into a dollar price, expressed as a fraction.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    [1.0625, 16],\n    [1.625, 16],\n    [1.09375, 32],\n    [1.9375, 32],\n    [1.375, 32],\n];\n\n$worksheet->fromArray($arguments, null, 'A1');\n\n// Now the formula\nfor ($row = 1; $row <= 5; ++$row) {\n    $worksheet->setCellValue(\"C{$row}\", \"=DOLLARFR(A{$row}, B{$row})\");\n\n    $helper->log($worksheet->getCell(\"C{$row}\")->getValue());\n    $helper->log('DOLLARFR() Result is ' . $worksheet->getCell(\"C{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial2/EFFECT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the effective annual interest rate for a given nominal interest rate and number of');\n$helper->log('compounding periods per year.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    [0.10, 4],\n    [0.10, 2],\n    [0.025, 2],\n];\n\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B3')->getNumberFormat()->setFormatCode('0.00%');\n\n// Now the formula\nfor ($row = 1; $row <= 3; ++$row) {\n    $worksheet->setCellValue(\"C{$row}\", \"=EFFECT(A{$row}, B{$row})\");\n    $worksheet->getStyle(\"C{$row}\")->getNumberFormat()->setFormatCode('0.00%');\n\n    $helper->log($worksheet->getCell(\"C{$row}\")->getValue());\n    $helper->log('EFFECT() Result is ' . $worksheet->getCell(\"C{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial2/FV.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the Future Value of an investment with periodic constant payments and a constant interest rate.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Interest Rate', 0.05, 0.10],\n    ['Pament Frequency', 12, 4],\n    ['Duration (Years)', 5, 4],\n    ['Investment', -1000.00, -2000.00],\n    ['Payment Type', 0, 1],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:C1')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B4:C4')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$worksheet->setCellValue('B8', '=FV(B1/B2, B3*B2, B4)');\n$worksheet->setCellValue('C8', '=FV(C1/C2, C3*C2, C4, null, C5)');\n$worksheet->getStyle('B8:C8')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n$helper->log($worksheet->getCell('B8')->getValue());\n$helper->log('FV() Result is ' . $worksheet->getCell('B8')->getFormattedValue());\n\n$helper->log($worksheet->getCell('C8')->getValue());\n$helper->log('FV() Result is ' . $worksheet->getCell('C8')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial2/FVSCHEDULE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the Future Value of an initial principal, after applying a series of compound interest rates.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Principal'],\n    [10000.00],\n    [null],\n    ['Schedule'],\n    [0.05],\n    [0.05],\n    [0.035],\n    [0.035],\n    [0.035],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('A2')->getNumberFormat()->setFormatCode('$#,##0.00');\n$worksheet->getStyle('A5:A9')->getNumberFormat()->setFormatCode('0.00%');\n\n// Now the formula\n$worksheet->setCellValue('B1', '=FVSCHEDULE(A2, A5:A9)');\n$worksheet->getStyle('B1')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n$helper->log($worksheet->getCell('B1')->getValue());\n$helper->log('FVSCHEDULE() Result is ' . $worksheet->getCell('B1')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial3/INTRATE.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the interest rate for a fully invested security.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Settlement Date', DateHelper::getDateValue('01-Apr-2005')],\n    ['Maturity Date', DateHelper::getDateValue('31-Mar-2010')],\n    ['Investment', 1000.00],\n    ['Investment', 2125.00],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B2')->getNumberFormat()->setFormatCode('dd-mmm-yyyy');\n$worksheet->getStyle('B3:B4')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$worksheet->setCellValue('B7', '=INTRATE(B1, B2, B3, B4)');\n$worksheet->getStyle('B7')->getNumberFormat()->setFormatCode('0.00%');\n\n$helper->log($worksheet->getCell('B7')->getValue());\n$helper->log('INTRATE() Result is ' . $worksheet->getCell('B7')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial3/IPMT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the interest payment, during a specific period of a loan or investment that is paid in,');\n$helper->log('constant periodic payments, with a constant interest rate.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Interest Rate', 0.05],\n    ['Number of Years', 5],\n    ['Present Value', 50000.00],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B3')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$baseRow = 6;\nfor ($month = 1; $month <= 12; ++$month) {\n    $row = (string) ($baseRow + $month);\n\n    $worksheet->setCellValue(\"A{$row}\", \"Payment for Mth {$month}\");\n    $worksheet->setCellValue(\"B{$row}\", \"=IPMT(\\$B\\$1/12, {$month}, \\$B\\$2*12, \\$B\\$3)\");\n    $worksheet->getStyle(\"B{$row}\")->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n\n    $helper->log($worksheet->getCell(\"B{$row}\")->getValue());\n    $helper->log(\"IPMT() Month {$month} Result is \" . $worksheet->getCell(\"B{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial3/IRR.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the Internal Rate of Return for a supplied series of periodic cash flows.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Initial Investment', -100.00],\n    ['Year 1 Income', 20.00],\n    ['Year 2 Income', 24.00, 'IRR after 3 Years'],\n    ['Year 3 Income', 28.80],\n    ['Year 4 Income', 34.56, 'IRR after 5 Years'],\n    ['Year 5 Income', 41.47],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B6')->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n\n// Now the formula\n$worksheet->setCellValue('C4', '=IRR(B1:B4)');\n$worksheet->getStyle('C4')->getNumberFormat()->setFormatCode('0.00%');\n\n$helper->log($worksheet->getCell('C4')->getValue());\n$helper->log('IRR() Result is ' . $worksheet->getCell('C4')->getFormattedValue());\n\n$worksheet->setCellValue('C6', '=IRR(B1:B6)');\n$worksheet->getStyle('C6')->getNumberFormat()->setFormatCode('0.00%');\n\n$helper->log($worksheet->getCell('C6')->getValue());\n$helper->log('IRR() Result is ' . $worksheet->getCell('C6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial3/ISPMT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the interest paid during a specific period of a loan or investment.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Interest Rate', 0.05],\n    ['Number of Years', 5],\n    ['Present Value', 50000.00],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B3')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$baseRow = 6;\nfor ($month = 1; $month <= 12; ++$month) {\n    $row = (string) ($baseRow + $month);\n\n    $worksheet->setCellValue(\"A{$row}\", \"Payment for Mth {$month}\");\n    $worksheet->setCellValue(\"B{$row}\", \"=ISPMT(\\$B\\$1/12, {$month}, \\$B\\$2*12, \\$B\\$3)\");\n    $worksheet->getStyle(\"B{$row}\")->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n\n    $helper->log($worksheet->getCell(\"B{$row}\")->getValue());\n    $helper->log(\"ISPMT() Month {$month} Result is \" . $worksheet->getCell(\"B{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial3/MIRR.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the Modified Internal Rate of Return for a supplied series of periodic cash flows.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Initial Investment', -100.00],\n    ['Year 1 Income', 18.00],\n    ['Year 2 Income', 22.50, 'MIRR after 3 Years'],\n    ['Year 3 Income', 28.00],\n    ['Year 4 Income', 35.50, 'MIRR after 5 Years'],\n    ['Year 5 Income', 45.00],\n    [null],\n    ['Finance Rate', 0.055],\n    ['Re-invest Rate', 0.05],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B6')->getNumberFormat()->setFormatCode('$#,##0.00;-$#,##0.00');\n$worksheet->getStyle('B8:B9')->getNumberFormat()->setFormatCode('0.00%');\n\n// Now the formula\n$worksheet->setCellValue('C4', '=MIRR(B1:B4, B8, B9)');\n$worksheet->getStyle('C4')->getNumberFormat()->setFormatCode('0.00%');\n\n$helper->log($worksheet->getCell('C4')->getValue());\n$helper->log('MIRR() Result is ' . $worksheet->getCell('C4')->getFormattedValue());\n\n$worksheet->setCellValue('C6', '=MIRR(B1:B6, B8, B9)');\n$worksheet->getStyle('C6')->getNumberFormat()->setFormatCode('0.00%');\n\n$helper->log($worksheet->getCell('C6')->getValue());\n$helper->log('MIRR() Result is ' . $worksheet->getCell('C6')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial3/NOMINAL.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the nominal interest rate for a given effective interest rate and number of');\n$helper->log('compounding periods per year.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    [0.10, 4],\n    [0.10, 2],\n    [0.025, 12],\n];\n\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:B3')->getNumberFormat()->setFormatCode('0.00%');\n\n// Now the formula\nfor ($row = 1; $row <= 3; ++$row) {\n    $worksheet->setCellValue(\"C{$row}\", \"=NOMINAL(A{$row}, B{$row})\");\n    $worksheet->getStyle(\"C{$row}\")->getNumberFormat()->setFormatCode('0.00%');\n\n    $helper->log($worksheet->getCell(\"C{$row}\")->getValue());\n    $helper->log('NOMINAL() Result is ' . $worksheet->getCell(\"C{$row}\")->getFormattedValue());\n}\n"
  },
  {
    "path": "samples/Financial3/NPER.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the number of periods required to pay off a loan, for a constant periodic payment');\n$helper->log('and a constant interest rate.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Interest Rate', 0.04, 0.06],\n    ['Payments per Year', 1, 4],\n    ['Payment Amount', -6000.00, -2000],\n    ['Present Value', 50000, 60000],\n    ['Future Value', null, 30000],\n    ['Payment Type', null, FinancialConstants::PAYMENT_BEGINNING_OF_PERIOD],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:C1')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B3:C5')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n$worksheet->setCellValue('B8', '=NPER(B1/B2, B3, B4)');\n\n$helper->log($worksheet->getCell('B8')->getValue());\n$helper->log('NPER() Result is ' . $worksheet->getCell('B8')->getFormattedValue());\n\n$worksheet->setCellValue('C8', '=NPER(C1/C2, C3, C4, C5, C6)');\n\n$helper->log($worksheet->getCell('C8')->getValue());\n$helper->log('NPER() Result is ' . $worksheet->getCell('C8')->getFormattedValue());\n"
  },
  {
    "path": "samples/Financial3/NPV.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the Net Present Value of an investment, based on a supplied discount rate,');\n$helper->log('and a series of future payments and income.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$arguments = [\n    ['Annual Discount Rate', 0.02, 0.05],\n    ['Initial Investment Cost', -5000.00, -10000],\n    ['Return from Year 1', 800.00, 2000.00],\n    ['Return from Year 2', 950.00, 2400.00],\n    ['Return from Year 3', 1080.00, 2900.00],\n    ['Return from Year 4', 1220.00, 3500.00],\n    ['Return from Year 5', 1500.00, 4100.00],\n];\n\n// Some basic formatting for the data\n$worksheet->fromArray($arguments, null, 'A1');\n$worksheet->getStyle('B1:C1')->getNumberFormat()->setFormatCode('0.00%');\n$worksheet->getStyle('B2:C7')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n// Now the formula\n// When initial investment is made at the end of the first period\n$worksheet->setCellValue('B10', '=NPV(B1, B2:B7)');\n$worksheet->getStyle('B10')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n$helper->log($worksheet->getCell('B10')->getValue());\n$helper->log('NPV() Result is ' . $worksheet->getCell('B10')->getFormattedValue());\n\n// When initial investment is made at the start of the first period\n$worksheet->setCellValue('C10', '=NPV(C1, C3:C7) + C2');\n$worksheet->getStyle('C10')->getNumberFormat()->setFormatCode('$#,##0.00');\n\n$helper->log($worksheet->getCell('C10')->getValue());\n$helper->log('NPV() Result is ' . $worksheet->getCell('C10')->getFormattedValue());\n"
  },
  {
    "path": "samples/Header.php",
    "content": "<?php\n\n/**\n * Header file.\n */\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\n\nerror_reporting(E_ALL);\n\nrequire_once __DIR__ . '/Bootstrap.php';\n\n$helper = new Sample();\n\n// Return to the caller script when runs by CLI\nif ($helper->isCli()) {\n    return;\n}\n?>\n<html>\n<head>\n    <title><?php echo $helper->getPageTitle(); ?></title>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n    <link rel=\"stylesheet\" href=\"/bootstrap/css/bootstrap.min.css\"/>\n    <link rel=\"stylesheet\" href=\"/bootstrap/css/font-awesome.min.css\"/>\n    <link rel=\"stylesheet\" href=\"/bootstrap/css/phpspreadsheet.css\"/>\n    <script src=\"/bootstrap/js/jquery.min.js\"></script>\n    <script src=\"/bootstrap/js/bootstrap.min.js\"></script>\n\n    <style>\n        body { padding-top: 200px; }\n    </style>\n</head>\n<body>\n    <div class=\"container\">\n        <div class=\"navbar navbar-default navbar-fixed-top\" role=\"navigation\">\n            <div class=\"container-fluid\">\n                <div class=\"navbar-header\">\n                    <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\n                        <span class=\"sr-only\">Toggle navigation</span>\n                        <span class=\"icon-bar\"></span>\n                        <span class=\"icon-bar\"></span>\n                        <span class=\"icon-bar\"></span>\n                    </button>\n                    <a class=\"navbar-brand\" href=\"/\">PHPSpreadsheet</a>\n                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"https://github.com/PHPOffice/PHPSpreadsheet\">\n                            <i class=\"fa fa-github fa-lg\" title=\"GitHub\"></i>\n                            &nbsp;\n                          </a>\n                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"https://phpspreadsheet.readthedocs.io\">\n                            <i class=\"fa fa-book fa-lg\" title=\"Docs\"></i>\n                            &nbsp;\n                          </a>\n                </div>\n                <div class=\"navbar-collapse collapse\">\n                    <ul class=\"nav navbar-nav\"><?php\n                    foreach ($helper->getSamples() as $category => $files) {\n                        ?><li class=\"dropdown\">\n                            <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><?php echo $category ?>\n                              <strong class=\"caret\"></strong>\n                            </a>\n                            <ul class=\"dropdown-menu\"><?php\n                            foreach ($files as $name => $file) {\n                                if (\n                                    !in_array(\n                                        $file,\n                                        [\n                                            'Chart/35_Chart_render.php',\n                                            'Chart/35_Chart_render33.php',\n                                        ],\n                                        true\n                                    )\n                                ) {\n                                    echo '<li><a href=\"/' . $file . '\">' . $name . '</a></li>';\n                                }\n                            } ?></ul>\n                        </li>\n                        <?php\n                    } ?>\n                    </ul>\n                </div>\n            </div>\n        </div>\n        <?php\n        echo $helper->getPageHeading();\n"
  },
  {
    "path": "samples/HexEtcConversions/BIN2DEC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BIN2DEC';\n$description = 'Converts a binary number to decimal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [101],\n    [110110],\n    [1000000],\n    [11111111],\n    [100010101],\n    [110001100],\n    [111111111],\n    [1111111111],\n    [1100110011],\n    [1000000000],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=BIN2DEC(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Binary ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is decimal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/BIN2HEX.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BIN2HEX';\n$description = 'Converts a binary number to hexadecimal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [101],\n    [110110],\n    [1000000],\n    [11111111],\n    [100010101],\n    [110001100],\n    [111111111],\n    [1111111111],\n    [1100110011],\n    [1000000000],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=BIN2HEX(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Binary ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is hexadecimal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/BIN2OCT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'BIN2OCT';\n$description = 'Converts a binary number to octal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [101],\n    [110110],\n    [1000000],\n    [11111111],\n    [100010101],\n    [110001100],\n    [111111111],\n    [1111111111],\n    [1100110011],\n    [1000000000],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=BIN2OCT(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Binary ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is octal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/DEC2BIN.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'DEC2BIN';\n$description = 'Converts a decimal number to binary';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [-255],\n    [-123],\n    [-15],\n    [-1],\n    [5],\n    [7],\n    [19],\n    [51],\n    [121],\n    [256],\n    [511],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=DEC2BIN(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Decimal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is binary ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/DEC2HEX.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'DEC2HEX';\n$description = 'Converts a decimal number to hexadecimal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [-255],\n    [-123],\n    [-15],\n    [-1],\n    [5],\n    [7],\n    [19],\n    [51],\n    [121],\n    [256],\n    [511],\n    [12345678],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=DEC2HEX(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Decimal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is hexadecimal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/DEC2OCT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'DEC2OCT';\n$description = 'Converts a decimal number to octal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [-255],\n    [-123],\n    [-15],\n    [-1],\n    [5],\n    [7],\n    [19],\n    [51],\n    [121],\n    [256],\n    [511],\n    [12345678],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=DEC2OCT(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Decimal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is octal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/HEX2BIN.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'HEX2BIN';\n$description = 'Converts a hexadecimal number to binary';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [3],\n    [8],\n    [42],\n    [99],\n    ['A2'],\n    ['F0'],\n    ['100'],\n    ['128'],\n    ['1AB'],\n    ['1FF'],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=HEX2BIN(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Hexadecimal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is binary ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/HEX2DEC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'HEX2DEC';\n$description = 'Converts a hexadecimal number to decimal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['08'],\n    ['42'],\n    ['A2'],\n    ['400'],\n    ['1000'],\n    ['1234'],\n    ['ABCD'],\n    ['C3B0'],\n    ['FFFFFFFFF'],\n    ['FFFFFFFFFF'],\n    ['FFFFFFF800'],\n    ['FEDCBA9876'],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=HEX2DEC(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Hexadecimal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is decimal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/HEX2OCT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'HEX2OCT';\n$description = 'Converts a hexadecimal number to octal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    ['08'],\n    ['42'],\n    ['A2'],\n    ['400'],\n    ['100'],\n    ['1234'],\n    ['ABCD'],\n    ['C3B0'],\n    ['FFFFFFFFFF'],\n    ['FFFFFFF800'],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=HEX2OCT(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Hexadecimal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is octal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/OCT2BIN.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'OCT2BIN';\n$description = 'Converts an octal number to binary';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [3],\n    [7],\n    [42],\n    [70],\n    [72],\n    [77],\n    [100],\n    [127],\n    [177],\n    [456],\n    [567],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=OCT2BIN(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Octal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is binary ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/OCT2DEC.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'OCT2DEC';\n$description = 'Converts an octal number to decimal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [3],\n    [7],\n    [42],\n    [70],\n    [72],\n    [77],\n    [100],\n    [127],\n    [177],\n    [456],\n    [4567],\n    [7777700001],\n    [7777776543],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=OCT2DEC(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Octal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is decimal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/HexEtcConversions/OCT2HEX.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$category = 'Engineering';\n$functionName = 'OCT2HEX';\n$description = 'Converts an octal number to hexadecimal';\n\n$helper->titles($category, $functionName, $description);\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n// Add some data\n$testData = [\n    [3],\n    [12],\n    [42],\n    [70],\n    [72],\n    [77],\n    [100],\n    [127],\n    [177],\n    [456],\n    [4567],\n    [7777700001],\n    [7777776543],\n];\n$testDataCount = count($testData);\n\n$worksheet->fromArray($testData, null, 'A1', true);\n\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $worksheet->setCellValue('B' . $row, '=OCT2HEX(A' . $row . ')');\n}\n\n// Test the formulae\nfor ($row = 1; $row <= $testDataCount; ++$row) {\n    $helper->log(\n        \"(B$row): \"\n        . 'Octal ' . $worksheet->getCell(\"A$row\")->getValueString()\n        . ' is hexadecimal ' . $worksheet->getCell(\"B$row\")->getCalculatedValueString()\n    );\n}\n"
  },
  {
    "path": "samples/Html/html_01_Basic_Conditional_Formatting.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = 'BasicConditionalFormatting.xlsx';\n$inputFilePath = __DIR__ . '/../templates/' . $inputFileName;\n\n$codePath = $helper->isCli() ? ('samples/templates/' . $inputFileName) : ('<code>' . 'samples/templates/' . $inputFileName . '</code>');\n$helper->log('Read ' . $codePath . ' with conditional formatting');\n$reader = IOFactory::createReader('Xlsx');\n$reader->setReadDataOnly(false);\n$spreadsheet = $reader->load($inputFilePath);\n$helper->log('Enable conditional formatting output');\n\nfunction writerCallback(HtmlWriter $writer): void\n{\n    $writer->setPreCalculateFormulas(true);\n    $writer->setConditionalFormatting(true);\n}\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Html'], false, writerCallback: writerCallback(...));\n"
  },
  {
    "path": "samples/Html/html_02_More_Conditional_Formatting.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = 'ConditionalFormattingConditions.xlsx';\n$inputFilePath = __DIR__ . '/../templates/' . $inputFileName;\n\n$codePath = $helper->isCli() ? ('samples/templates/' . $inputFileName) : ('<code>' . 'samples/templates/' . $inputFileName . '</code>');\n$helper->log('Read ' . $codePath . ' with conditional formatting');\n$reader = IOFactory::createReader('Xlsx');\n$reader->setReadDataOnly(false);\n$spreadsheet = $reader->load($inputFilePath);\n$helper->log('Enable conditional formatting output');\n\nfunction writerCallback(HtmlWriter $writer): void\n{\n    $writer->setPreCalculateFormulas(true);\n    $writer->setConditionalFormatting(true);\n}\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Html'], false, writerCallback: writerCallback(...));\n"
  },
  {
    "path": "samples/Html/html_03_Color_Scale.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = 'ColourScale.xlsx';\n$inputFilePath = __DIR__ . '/../templates/' . $inputFileName;\n\n$codePath = $helper->isCli() ? ('samples/templates/' . $inputFileName) : ('<code>' . 'samples/templates/' . $inputFileName . '</code>');\n$helper->log('Read ' . $codePath . ' with color scale');\n$reader = IOFactory::createReader('Xlsx');\n$reader->setReadDataOnly(false);\n$spreadsheet = $reader->load($inputFilePath);\n$helper->log('Enable conditional formatting output');\n\nfunction writerCallback(HtmlWriter $writer): void\n{\n    $writer->setPreCalculateFormulas(true);\n    $writer->setConditionalFormatting(true);\n}\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Html'], false, writerCallback: writerCallback(...));\n"
  },
  {
    "path": "samples/Html/html_04_Table_Format_without_Conditional.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = 'TableFormat.xlsx';\n$inputFilePath = __DIR__ . '/../templates/' . $inputFileName;\n\n$codePath = $helper->isCli() ? ('samples/templates/' . $inputFileName) : ('<code>' . 'samples/templates/' . $inputFileName . '</code>');\n$helper->log('Read ' . $codePath);\n$reader = IOFactory::createReader('Xlsx');\n$reader->setReadDataOnly(false);\n$spreadsheet = $reader->load($inputFilePath);\n$helper->log('Enable table formatting output');\n\nfunction writerCallback(HtmlWriter $writer): void\n{\n    $writer->setPreCalculateFormulas(true);\n    $writer->setTableFormats(true);\n}\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Html'], false, writerCallback: writerCallback(...));\n"
  },
  {
    "path": "samples/Html/html_05_Table_Format_with_Conditional.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = 'TableFormat.xlsx';\n$inputFilePath = __DIR__ . '/../templates/' . $inputFileName;\n\n$codePath = $helper->isCli() ? ('samples/templates/' . $inputFileName) : ('<code>' . 'samples/templates/' . $inputFileName . '</code>');\n$helper->log('Read ' . $codePath);\n$reader = IOFactory::createReader('Xlsx');\n$reader->setReadDataOnly(false);\n$spreadsheet = $reader->load($inputFilePath);\n$helper->log('Enable table formatting output');\n$helper->log('Enable conditional formatting output');\n\nfunction writerCallback(HtmlWriter $writer): void\n{\n    $writer->setPreCalculateFormulas(true);\n    $writer->setTableFormats(true);\n    $writer->setConditionalFormatting(true);\n}\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Html'], false, writerCallback: writerCallback(...));\n"
  },
  {
    "path": "samples/Html/html_06_Table_Cellspacing.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Emulate table border, cellspacing, cellpadding attributes');\n\nfunction addCellspacing(string $html): string\n{\n    return str_replace(\n        'table { border-collapse:collapse }',\n        'table { border-collapse:separate; border-spacing: 5px; }'\n            . \"\\ntable.sheet0 {border: 1px solid red}\"\n            . \"\\ntd, th {padding: 3px}\",\n        $html\n    );\n}\n\nfunction writerCallback(HtmlWriter $writer): void\n{\n    $writer->setLineEnding(\"\\n\")\n        ->writeAllSheets()\n        ->setEditHtmlCallback(addCellspacing(...));\n}\n\n$spreadsheet = new Spreadsheet();\n$helper->log('Sheet1 will have no borders inside, red border outside from callback');\n$sheet1 = $spreadsheet->getActiveSheet();\n$sheet1->setTitle('Sheet1');\n$sheet1->setShowGridlines(false);\n$sheet1->setPrintGridlines(false);\n$sheet1->fromArray([\n    [11, 12, 13],\n    [14, 15, 16],\n]);\n$helper->log('Sheet2 will have no borders (display), separate borders (print) from callback');\n$sheet2 = $spreadsheet->createSheet();\n$sheet2->setTitle('Sheet2');\n$sheet2->setShowGridlines(false);\n$sheet2->setPrintGridlines(true);\n$sheet2->fromArray([\n    [21, 22, 23],\n    [24, 25, 26],\n]);\n$helper->log('Sheet3 will have no borders (print), separate borders (display) from callback');\n$sheet3 = $spreadsheet->createSheet();\n$sheet3->setTitle('Sheet3');\n$sheet3->setShowGridlines(true);\n$sheet3->setPrintGridlines(false);\n$sheet3->fromArray([\n    [31, 32, 33],\n    [34, 35, 36],\n]);\n$helper->log('Sheet4 will have separate borders (print and display) from callback');\n$sheet4 = $spreadsheet->createSheet();\n$sheet4->setTitle('Sheet4');\n$sheet4->setShowGridlines(true);\n$sheet4->setPrintGridlines(true);\n$sheet4->fromArray([\n    [41, 42, 43],\n    [44, 45, 46],\n]);\n\n$helper->log('Auto-size column dimensions');\nforeach ([$sheet1, $sheet2, $sheet3, $sheet4] as $sheet) {\n    $sheet->getColumnDimension('A')->setAutoSize(true);\n    $sheet->getColumnDimension('B')->setAutoSize(true);\n    $sheet->getColumnDimension('C')->setAutoSize(true);\n}\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Html'], false, writerCallback: writerCallback(...));\n"
  },
  {
    "path": "samples/LookupRef/ADDRESS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns a text reference to a single cell in a worksheet.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$worksheet->getCell('A1')->setValue('=ADDRESS(2,3)');\n$worksheet->getCell('A2')->setValue('=ADDRESS(2,3,2)');\n$worksheet->getCell('A3')->setValue('=ADDRESS(2,3,2,FALSE)');\n$worksheet->getCell('A4')->setValue('=ADDRESS(2,3,1,FALSE,\"[Book1.xlsx]Sheet1\")');\n$worksheet->getCell('A5')->setValue('=ADDRESS(2,3,1,FALSE,\"EXCEL SHEET\")');\n\nfor ($row = 1; $row <= 5; ++$row) {\n    $cell = $worksheet->getCell(\"A{$row}\");\n    $helper->log(\"A{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/LookupRef/COLUMN.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the column index of a cell.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$calculation = Calculation::getInstance($spreadsheet);\n$calculation->setInstanceArrayReturnType(\n    Calculation::RETURN_ARRAY_AS_VALUE\n);\n$worksheet = $spreadsheet->getActiveSheet();\n\n$worksheet->getCell('A1')->setValue('=COLUMN(C13)');\n$worksheet->getCell('A2')->setValue('=COLUMN(E13:G15)');\n$worksheet->getCell('F1')->setValue('=COLUMN()');\n\nfor ($row = 1; $row <= 2; ++$row) {\n    $cell = $worksheet->getCell(\"A{$row}\");\n    $helper->log(\"A{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n}\n\n$cell = $worksheet->getCell('F1');\n$helper->log('F1: ' . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n"
  },
  {
    "path": "samples/LookupRef/COLUMNS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the number of columns in an array or reference.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$worksheet->getCell('A1')->setValue('=COLUMNS(C1:G4)');\n$worksheet->getCell('A2')->setValue('=COLUMNS({1,2,3;4,5,6})');\n$worksheet->getCell('A3')->setValue('=ROWS(C1:E4 D3:G5)');\n$worksheet->getCell('A4')->setValue('=COLUMNS(1:1)');\n\nfor ($row = 1; $row <= 4; ++$row) {\n    $cell = $worksheet->getCell(\"A{$row}\");\n    $helper->log(\"A{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/LookupRef/INDEX.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the row index of a cell.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$data1 = [\n    ['Apples', 'Lemons'],\n    ['Bananas', 'Pears'],\n];\n\n$data2 = [\n    [4, 6],\n    [5, 3],\n    [6, 9],\n    [7, 5],\n    [8, 3],\n];\n\n$worksheet->fromArray($data1, null, 'A1');\n$worksheet->fromArray($data2, null, 'C1');\n\n$worksheet->getCell('A11')->setValue('=INDEX(A1:B2, 2, 2)');\n$worksheet->getCell('A12')->setValue('=INDEX(A1:B2, 2, 1)');\n$worksheet->getCell('A13')->setValue('=INDEX({1,2;3,4}, 0, 2)');\n$worksheet->getCell('A14')->setValue('=INDEX(C1:C5, 5)');\n$worksheet->getCell('A15')->setValue('=INDEX(C1:D5, 5, 2)');\n$worksheet->getCell('A16')->setValue('=SUM(INDEX(C1:D5, 5, 0))');\n\nfor ($row = 11; $row <= 16; ++$row) {\n    $cell = $worksheet->getCell(\"A{$row}\");\n    $helper->log(\"A{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/LookupRef/INDIRECT.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the cell specified by a text string.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$data = [\n    [8, 9, 0],\n    [3, 4, 5],\n    [9, 1, 3],\n    [4, 6, 2],\n];\n$worksheet->fromArray($data, null, 'C1');\n\n$spreadsheet->addNamedRange(new NamedRange('NAMED_RANGE_FOR_CELL_D4', $worksheet, '=\"$D$4\"'));\n\n$worksheet->getCell('A1')->setValue('=INDIRECT(\"C1\")');\n$worksheet->getCell('A2')->setValue('=INDIRECT(\"D\"&4)');\n$worksheet->getCell('A3')->setValue('=INDIRECT(\"E\"&ROW())');\n$worksheet->getCell('A4')->setValue('=SUM(INDIRECT(\"$C$4:$E$4\"))');\n$worksheet->getCell('A5')->setValue('=INDIRECT(NAMED_RANGE_FOR_CELL_D4)');\n\nfor ($row = 1; $row <= 5; ++$row) {\n    $cell = $worksheet->getCell(\"A{$row}\");\n    $helper->log(\"A{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/LookupRef/OFFSET.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns a cell range that is a specified number of rows and columns from a cell or range of cells.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$data = [\n    [null, 'Week 1', 'Week 2', 'Week 3', 'Week 4'],\n    ['Sunday', 4500, 2200, 3800, 1500],\n    ['Monday', 5500, 6100, 5200, 4800],\n    ['Tuesday', 7000, 6200, 5000, 7100],\n    ['Wednesday', 8000, 4000, 3900, 7600],\n    ['Thursday', 5900, 5500, 6900, 7100],\n    ['Friday', 4900, 6300, 6900, 5200],\n    ['Saturday', 3500, 3900, 5100, 4100],\n];\n$worksheet->fromArray($data, null, 'A3');\n\n$worksheet->getCell('H1')->setValue('=OFFSET(A3, 3, 1)');\n$worksheet->getCell('H2')->setValue('=SUM(OFFSET(A3, 3, 1, 1, 4))');\n$worksheet->getCell('H3')->setValue('=SUM(OFFSET(B3:E3, 3, 0))');\n$worksheet->getCell('H4')->setValue('=SUM(OFFSET(E3, 1, -3, 7))');\n\nfor ($row = 1; $row <= 4; ++$row) {\n    $cell = $worksheet->getCell(\"H{$row}\");\n    $helper->log(\"H{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/LookupRef/ROW.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the row index of a cell.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$worksheet->getCell('A1')->setValue('=ROW(C13)');\n$worksheet->getCell('A2')->setValue('=ROW(E19:G21)');\n$worksheet->getCell('A3')->setValue('=ROW()');\n\nfor ($row = 1; $row <= 3; ++$row) {\n    $cell = $worksheet->getCell(\"A{$row}\");\n    $helper->log(\"A{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/LookupRef/ROWS.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Returns the row index of a cell.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$worksheet->getCell('A1')->setValue('=ROWS(C1:E4)');\n$worksheet->getCell('A2')->setValue('=ROWS({1,2,3;4,5,6})');\n$worksheet->getCell('A3')->setValue('=ROWS(C1:E4 D3:G5)');\n\nfor ($row = 1; $row <= 3; ++$row) {\n    $cell = $worksheet->getCell(\"A{$row}\");\n    $helper->log(\"A{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n}\n"
  },
  {
    "path": "samples/LookupRef/SortExcel.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\TextGridRightAlign;\nuse Stringable;\n\nclass SortExcel\n{\n    public const ASCENDING = 1;\n    public const DESCENDING = -1;\n\n    private int $arrayCol;\n\n    private int $ascending;\n\n    private function cmp(mixed $rowA, mixed $rowB): int\n    {\n        $a = is_array($rowA) ? $rowA[$this->arrayCol] : $rowA;\n        $b = is_array($rowB) ? $rowB[$this->arrayCol] : $rowB;\n        if ($a instanceof Stringable) {\n            $a = (string) $a;\n        }\n        if ($b instanceof Stringable) {\n            $b = (string) $b;\n        }\n        if (is_array($a) || is_object($a) || is_resource($a) || is_array($b) || is_object($b) || is_resource($b)) {\n            throw new Exception('Invalid datatype');\n        }\n        // null sorts highest\n        if ($a === null) {\n            return ($b === null) ? 0 : $this->ascending;\n        }\n        if ($b === null) {\n            return -$this->ascending;\n        }\n        // int|float sorts lowest\n        $numericA = is_int($a) || is_float($a);\n        $numericB = is_int($b) || is_float($b);\n        if ($numericA && $numericB) {\n            if ($a == $b) {\n                return 0;\n            }\n\n            return ($a < $b) ? -$this->ascending : $this->ascending;\n        }\n        if ($numericA) {\n            return -$this->ascending;\n        }\n        if ($numericB) {\n            return $this->ascending;\n        }\n        // bool sorts higher than string\n        if (is_bool($a)) {\n            if (!is_bool($b)) {\n                return $this->ascending;\n            }\n            if ($a) {\n                return $b ? 0 : $this->ascending;\n            }\n\n            return $b ? -$this->ascending : 0;\n        }\n        if (is_bool($b)) {\n            return -$this->ascending;\n        }\n        // special handling for numeric strings starting with -\n        /** @var string $a */\n        $a2 = (string) preg_replace('/^-(\\d)+$/', '$1', $a);\n        /** @var string $b */\n        $b2 = (string) preg_replace('/^-(\\d)+$/', '$1', $b);\n\n        // strings sort case-insensitive\n        return $this->ascending * strcasecmp($a2, $b2);\n    }\n\n    /**\n     * @param mixed[] $array\n     */\n    public function sortArray(array &$array, int $ascending = self::ASCENDING, int $arrayCol = 0): void\n    {\n        if ($ascending !== 1 && $ascending !== -1) {\n            throw new Exception('ascending must be 1 or -1');\n        }\n        $this->ascending = $ascending;\n        $this->arrayCol = $arrayCol;\n        usort($array, $this->cmp(...));\n    }\n}\n\nrequire __DIR__ . '/../Header.php';\n/** @var Sample $helper */\n$helper->log('Emulating how Excel sorts different DataTypes');\n\n/** @param mixed[] $original */\nfunction displaySorted(array $original, Sample $helper): void\n{\n    $sorted = $original;\n    $sortExcel = new SortExcel();\n    $sortExcel->sortArray($sorted);\n    $outArray = [['Original', 'Sorted']];\n    $count = count($original);\n    for ($i = 0; $i < $count; ++$i) {\n        $outArray[] = [$original[$i], $sorted[$i]];\n    }\n    $helper->displayGrid($outArray, TextGridRightAlign::floatOrInt);\n}\n\n$helper->log('First example');\n$original = ['-3', '40', 'A', 'B', true, false, '+3', '1', '10', '2', '25', 1, 0, -1];\ndisplaySorted($original, $helper);\n\n$helper->log('Second example');\n$original = ['a', 'A', null, 'x', 'X', true, false, -3, 1];\ndisplaySorted($original, $helper);\n"
  },
  {
    "path": "samples/LookupRef/SortExcelCols.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\TextGridRightAlign;\nuse Stringable;\n\n// this is the same class as in sortExcel\nclass SortExcelCols\n{\n    public const ASCENDING = 1;\n    public const DESCENDING = -1;\n\n    private int $arrayCol;\n\n    private int $ascending;\n\n    private function cmp(mixed $rowA, mixed $rowB): int\n    {\n        $a = is_array($rowA) ? $rowA[$this->arrayCol] : $rowA;\n        $b = is_array($rowB) ? $rowB[$this->arrayCol] : $rowB;\n        if ($a instanceof Stringable) {\n            $a = (string) $a;\n        }\n        if ($b instanceof Stringable) {\n            $b = (string) $b;\n        }\n        if (is_array($a) || is_object($a) || is_resource($a) || is_array($b) || is_object($b) || is_resource($b)) {\n            throw new Exception('Invalid datatype');\n        }\n        // null sorts highest\n        if ($a === null) {\n            return ($b === null) ? 0 : $this->ascending;\n        }\n        if ($b === null) {\n            return -$this->ascending;\n        }\n        // int|float sorts lowest\n        $numericA = is_int($a) || is_float($a);\n        $numericB = is_int($b) || is_float($b);\n        if ($numericA && $numericB) {\n            if ($a == $b) {\n                return 0;\n            }\n\n            return ($a < $b) ? -$this->ascending : $this->ascending;\n        }\n        if ($numericA) {\n            return -$this->ascending;\n        }\n        if ($numericB) {\n            return $this->ascending;\n        }\n        // bool sorts higher than string\n        if (is_bool($a)) {\n            if (!is_bool($b)) {\n                return $this->ascending;\n            }\n            if ($a) {\n                return $b ? 0 : $this->ascending;\n            }\n\n            return $b ? -$this->ascending : 0;\n        }\n        if (is_bool($b)) {\n            return -$this->ascending;\n        }\n        // special handling for numeric strings starting with -\n        /** @var string $a */\n        $a2 = (string) preg_replace('/^-(\\d)+$/', '$1', $a);\n        /** @var string $b */\n        $b2 = (string) preg_replace('/^-(\\d)+$/', '$1', $b);\n\n        // strings sort case-insensitive\n        return $this->ascending * strcasecmp($a2, $b2);\n    }\n\n    /**\n     * @param mixed[] $array\n     */\n    public function sortArray(array &$array, int $ascending = self::ASCENDING, int $arrayCol = 0): void\n    {\n        if ($ascending !== 1 && $ascending !== -1) {\n            throw new Exception('ascending must be 1 or -1');\n        }\n        $this->ascending = $ascending;\n        $this->arrayCol = $arrayCol;\n        usort($array, $this->cmp(...));\n    }\n}\n\nrequire __DIR__ . '/../Header.php';\n/** @var Sample $helper */\n$helper->log('Emulating how Excel sorts different DataTypes by Column');\n\n$array = [\n    ['a', 'a', 'a'],\n    ['a', 'a', 'b'],\n    ['a', null, 'c'],\n    ['b', 'b', 1],\n    ['b', 'c', 2],\n    ['b', 'c', true],\n    ['c', 1, false],\n    ['c', 1, 'a'],\n    ['c', 2, 'b'],\n    [1, 2, 'c'],\n    [1, true, 1],\n    [1, true, 2],\n    [2, false, true],\n    [2, false, false],\n    [2, 'a', false],\n    [true, 'b', true],\n    [true, 'c', 2],\n    [true, 1, 1],\n    [false, 2, 'a'],\n    [false, true, 'b'],\n    [false, false, 'c'],\n];\n\n/** @param array<int, array<int, mixed>> $original */\nfunction displaySortedCols(array $original, Sample $helper): void\n{\n    $sorted = $original;\n    $sortExcelCols = new SortExcelCols();\n    $helper->log('Sort by least significant column (descending)');\n    $sortExcelCols->sortArray($sorted, arrayCol: 2, ascending: -1);\n    $helper->log('Sort by middle column (ascending)');\n    $sortExcelCols->sortArray($sorted, arrayCol: 1, ascending: 1);\n    $helper->log('Sort by most significant column (descending)');\n    $sortExcelCols->sortArray($sorted, arrayCol: 0, ascending: -1);\n    $outArray = [['Original', '', '', 'Sorted', '', '']];\n    $count = count($original);\n    /** @var string[][] $sorted */\n    for ($i = 0; $i < $count; ++$i) {\n        $outArray[] = [\n            $original[$i][0],\n            $original[$i][1],\n            $original[$i][2],\n            $sorted[$i][0],\n            $sorted[$i][1],\n            $sorted[$i][2],\n        ];\n    }\n    $helper->displayGrid($outArray, TextGridRightAlign::floatOrInt);\n}\n\ndisplaySortedCols($array, $helper);\n"
  },
  {
    "path": "samples/LookupRef/VLOOKUP.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Searches for a value in the top row of a table or an array of values,\n                and then returns a value in the same column from a row you specify\n                in the table or array.');\n\n// Create new PhpSpreadsheet object\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n\n$data = [\n    ['ID', 'First Name', 'Last Name', 'Salary'],\n    [72, 'Emily', 'Smith', 64901],\n    [66, 'James', 'Anderson', 70855],\n    [14, 'Mia', 'Clark', 188657],\n    [30, 'John', 'Lewis', 97566],\n    [53, 'Jessica', 'Walker', 58339],\n    [56, 'Mark', 'Reed', 125180],\n    [79, 'Richard', 'Lopez', 91632],\n];\n\n$worksheet->fromArray($data, null, 'B2');\n\n$lookupFields = [\n    ['ID', 53, 66, 56],\n    ['Name'],\n    ['Salary'],\n];\n\n$worksheet->fromArray($lookupFields, null, 'G3');\n\n$worksheet->getCell('H4')->setValue('=VLOOKUP(H3, B3:E9, 2, FALSE) & \" \" & VLOOKUP(H3, B3:E9, 3, FALSE)');\n$worksheet->getCell('I4')->setValue('=VLOOKUP(I3, B3:E9, 2, FALSE) & \" \" & VLOOKUP(I3, B3:E9, 3, FALSE)');\n$worksheet->getCell('J4')->setValue('=VLOOKUP(J3, B3:E9, 2, FALSE) & \" \" & VLOOKUP(J3, B3:E9, 3, FALSE)');\n$worksheet->getCell('H5')->setValue('=VLOOKUP(H3, B3:E9, 4, FALSE)');\n$worksheet->getCell('I5')->setValue('=VLOOKUP(I3, B3:E9, 4, FALSE)');\n$worksheet->getCell('J5')->setValue('=VLOOKUP(J3, B3:E9, 4, FALSE)');\n\nfor ($column = 'H'; $column !== 'K'; StringHelper::stringIncrement($column)) {\n    for ($row = 4; $row <= 5; ++$row) {\n        $cell = $worksheet->getCell(\"{$column}{$row}\");\n        $helper->log(\"{$column}{$row}: \" . $cell->getValueString() . ' => ' . $cell->getCalculatedValueString());\n    }\n}\n"
  },
  {
    "path": "samples/Pdf/21_Pdf_Domdf.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Hide grid lines');\n$spreadsheet->getActiveSheet()->setShowGridLines(false);\n\n$helper->log('Set orientation to landscape');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n\n$className = PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf::class;\n$helper->log(\"Write to PDF format using {$className}\");\nIOFactory::registerWriter('Pdf', $className);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Pdf']);\n"
  },
  {
    "path": "samples/Pdf/21_Pdf_TCPDF.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Hide grid lines');\n$spreadsheet->getActiveSheet()->setShowGridLines(false);\n\n$helper->log('Set orientation to landscape');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n\n$className = PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf::class;\n$helper->log(\"Write to PDF format using {$className}\");\nIOFactory::registerWriter('Pdf', $className);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Pdf']);\n"
  },
  {
    "path": "samples/Pdf/21_Pdf_mPDF.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Hide grid lines');\n$spreadsheet->getActiveSheet()->setShowGridLines(false);\n\n$helper->log('Set orientation to landscape');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n\n$className = PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf::class;\n$helper->log(\"Write to PDF format using {$className}\");\nIOFactory::registerWriter('Pdf', $className);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Pdf']);\n"
  },
  {
    "path": "samples/Pdf/21a_Pdf.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Hide grid lines');\n$spreadsheet->getActiveSheet()->setShowGridLines(false);\n\n$helper->log('Set orientation to landscape');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n$spreadsheet->setActiveSheetIndex(0)->setPrintGridlines(true);\n// Issue 2299 - mpdf can't handle hide rows without kludge\n$spreadsheet->getActiveSheet()->getRowDimension(2)->setVisible(false);\n\nfunction changeGridlines(string $html): string\n{\n    return str_replace('{border: 1px solid black;}', '{border: 2px dashed red;}', $html);\n}\n\n$helper->log('Write to Mpdf');\nIOFactory::registerWriter('Pdf', Mpdf::class);\n$helper->write(\n    $spreadsheet,\n    __FILE__,\n    ['Pdf'],\n    false,\n    function (Mpdf $writer): void {\n        $writer->setEmbedImages(true);\n        $writer->setEditHtmlCallback('changeGridlines');\n    }\n);\n"
  },
  {
    "path": "samples/Pdf/21b_Pdf.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf as TcpdfClass;\n\nfunction replaceBody(string $html): string\n{\n    $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';\n    $bodystring = '~<body>.*</body>~ms';\n    $bodyrepl = <<<EOF\n        <body>\n        <h1>Serif</h1>\n        <p style='font-family: serif; font-size: 12pt;'>$lorem</p>\n        <h1>Sans-Serif</h1>\n        <p style='font-family: sans-serif; font-size: 12pt;'>$lorem</p>\n        <h1>Monospace</h1>\n        <p style='font-family: monospace; font-size: 12pt;'>$lorem</p>\n        </body>\n        EOF;\n\n    return preg_replace($bodystring, $bodyrepl, $html) ?? throw new SpreadsheetException('preg failed');\n}\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Spreadsheet */\n$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Hide grid lines');\n$spreadsheet->getActiveSheet()->setShowGridLines(false);\n\n$helper->log('Set orientation to landscape');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n\n$helper->log('Write to Dompdf');\nIOFactory::registerWriter('Pdf', Dompdf::class);\n$filename = str_replace('.php', '_dompdf.php', __FILE__);\n$helper->write(\n    $spreadsheet,\n    $filename,\n    ['Pdf'],\n    false,\n    function (Dompdf $writer): void {\n        $writer->setEditHtmlCallback('replaceBody');\n    }\n);\n\n$helper->log('Write to Mpdf');\nIOFactory::registerWriter('Pdf', Mpdf::class);\n$filename = str_replace('.php', '_mpdf.php', __FILE__);\n$helper->write(\n    $spreadsheet,\n    $filename,\n    ['Pdf'],\n    false,\n    function (Mpdf $writer): void {\n        $writer->setEditHtmlCallback('replaceBody');\n    }\n);\n\n$helper->log('Write to Tcpdf');\nIOFactory::registerWriter('Pdf', TcpdfClass::class);\n$filename = str_replace('.php', '_tcpdf.php', __FILE__);\n$helper->write(\n    $spreadsheet,\n    $filename,\n    ['Pdf'],\n    false,\n    function (TcpdfClass $writer): void {\n        $writer->setEditHtmlCallback('replaceBody');\n    }\n);\n"
  },
  {
    "path": "samples/Pdf/21d_FitToHeightPdf.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Issue 3266 - spreadsheet specified fitToHeight.\n$helper->log('Read spreadsheet');\n$filename = '21d_FitToHeightPdf.xlsx';\n$fileWithPath = __DIR__ . \"/../templates/$filename\";\n$reader = new Xlsx();\n$spreadsheet = $reader->load($fileWithPath);\n$sheet = $spreadsheet->getActiveSheet();\n\n$helper->log('Write to Mpdf');\nIOFactory::registerWriter('Pdf', PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf::class);\n$helper->write($spreadsheet, __FILE__, ['Pdf']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Pdf/21e_UnusualFont_mpdf.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf2;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\nrequire_once __DIR__ . '/../templates/Mpdf2.php';\n\n$spreadsheet = new Spreadsheet();\n$spreadsheet->getProperties()\n    ->setCreator('PhpSpreadsheet')\n    ->setTitle('Unusual Font');\n\n$helper->log('Show print grid lines');\n$sheet = $spreadsheet->getActiveSheet();\n$sheet->setPrintGridLines(true);\n\n$sheet->getCell('A1')->setValue('First Cell');\n$sheet->getCell('A2')->setValue('Second Cell');\n$sheet->getCell('B1')->setValue('Third Cell');\n$sheet->getCell('B2')->setValue('Fourth Cell');\n\n$helper->log('Set style to unusual font');\n$sheet->getStyle('A1:B2')->getFont()->setName('Shadows Into Light');\n\n$helper->log('Write to Mpdf');\n$writer = new Mpdf2($spreadsheet);\n$filename = $helper->getFileName(__FILE__, 'pdf');\n$writer->save($filename);\n$helper->log(\"Saved $filename\");\nif (PHP_SAPI !== 'cli') {\n    echo '<a href=\"/download.php?type=pdf&name=' . basename($filename) . '\">Download ' . basename($filename) . '</a><br />';\n}\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Pdf/21f_Drawing.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\n\nrequire __DIR__ . '/../Header.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n\n$sheet->getCell('A1')->setValue('A1');\n$sheet->getCell('B1')->setValue('B');\n$sheet->getCell('C1')->setValue('C');\n$sheet->getCell('D1')->setValue('D');\n$sheet->getCell('E1')->setValue('E');\n$sheet->getCell('F1')->setValue('F');\n$sheet->getCell('G1')->setValue('G');\n$sheet->getCell('A2')->setValue('A2');\n$sheet->getCell('A3')->setValue('A3');\n$sheet->getCell('A4')->setValue('A4');\n$sheet->getCell('A5')->setValue('A5');\n$sheet->getCell('A6')->setValue('A6');\n$sheet->getCell('A7')->setValue('A7');\n$sheet->getCell('A8')->setValue('A8');\n\n$helper->log('Add drawing to worksheet');\n$drawing = new Drawing();\n$drawing->setName('Blue Square');\n$path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'images/blue_square.png';\n$drawing->setPath($path);\n$drawing->setResizeProportional(false);\n$drawing->setWidth(320);\n$drawing->setCoordinates('B2');\n$drawing->setCoordinates2('G6');\n$drawing->setWorksheet($sheet, true);\n\n$helper->log('Merge drawing cells for Pdf');\n$spreadsheet->mergeDrawingCellsForPdf();\n\n$helper->log('Write to Mpdf');\n$helper->write($spreadsheet, __FILE__, ['Mpdf']);\n\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Pdf/21g_Direction.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n\n$sheet1 = $spreadsheet->getActiveSheet();\n$sheet2 = $spreadsheet->createSheet();\n$sheet3 = $spreadsheet->createSheet();\n$cells = [\n    ['a1', 'b1', 'c1'],\n    ['a2', 'b2', 'c2'],\n];\n$sheet1->fromArray($cells);\n$sheet1->setRightToLeft(true);\n$sheet2->fromArray($cells);\n$sheet3->fromArray($cells);\n$sheet3->setRightToLeft(true);\n\n$helper->log('Write to html, mpdf, tcpdf');\n// Save\n$helper->write($spreadsheet, __FILE__, ['Html', 'Mpdf', 'Tcpdf']);\n\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Pdf/21h_DirectionMultiple.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\nrequire __DIR__ . '/../Header.php';\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n\n$sheet1 = $spreadsheet->getActiveSheet();\n$sheet2 = $spreadsheet->createSheet();\n$sheet3 = $spreadsheet->createSheet();\n$cells = [\n    ['a1', 'b1', 'c1'],\n    ['a2', 'b2', 'c2'],\n];\n$sheet1->fromArray($cells);\n$sheet1->setRightToLeft(true);\n$sheet2->fromArray($cells);\n$sheet3->fromArray($cells);\n$sheet3->setRightToLeft(true);\n\n$helper->log('Write to html, mpdf');\n// Save\n$helper->write(\n    $spreadsheet,\n    __FILE__,\n    ['Html', 'Mpdf'],\n    writerCallback: function (HtmlWriter $writer): void {\n            $writer->writeAllSheets();\n    }\n);\n\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Pdf/Dompdf_Canvas_Headers.php",
    "content": "<?php\n\nuse Dompdf\\Canvas;\nuse Dompdf\\FontMetrics;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf;\n\nrequire __DIR__ . '/../Header.php';\n\n// Issue 2432 - styles were too large to fit in first Mpdf chunk, causing problems.\n\n// Override PhpSpreadsheet class.\nclass Dompdf_Canvas_Headers extends Dompdf // phpcs:ignore\n{\n    protected function callPageScript(\\Dompdf\\Dompdf $dompdf): void\n    {\n        $dompdf->getCanvas()->page_script(function (\n            int $pageNumber,\n            int $pageCount,\n            Canvas $canvas,\n            FontMetrics $fontMetrics\n        ): void {\n            // Get font metrics for dynamic content like page numbers\n            $fontName = 'helvetica'; // note lowercase\n            $fontType = 'bold'; // note lowercase\n            $font = $fontMetrics->getFont($fontName, $fontType) ?? throw new Exception(\"no font metrics for $fontName $fontType\");\n            // Example text placement (adjust coordinates and font as needed)\n            if ($pageNumber === 1) {\n                $header = 'Dompdf First Page';\n            } elseif ($pageNumber % 2 === 0) {\n                $header = 'Dompdf Even Page';\n            } else {\n                $header = 'Dompdf Odd Page';\n            }\n            $text = \"$header          Page $pageNumber of $pageCount\";\n            $canvas->text(40, 20, $text, $font, 12);\n        });\n    }\n}\n\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n$counter = 0;\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Populate spreadsheet');\nfor ($row = 1; $row < 1001; ++$row) {\n    $sheet->getCell(\"A$row\")->setValue(++$counter);\n    // Add many styles by using slight variations of font color for each.\n    $sheet->getCell(\"A$row\")->getStyle()->getFont()\n        ->getColor()->setRgb(sprintf('%06x', $counter));\n    $sheet->getCell(\"B$row\")->setValue(++$counter);\n    $sheet->getCell(\"C$row\")->setValue(++$counter);\n}\n\n$helper->log('Write to Dompdf with headers added by page_script');\nIOFactory::registerWriter('Pdf', Dompdf_Canvas_Headers::class);\n$helper->write($spreadsheet, __FILE__, ['Pdf']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Pdf/Dompdf_Custom_Headers.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf;\n\nrequire __DIR__ . '/../Header.php';\n\n// Issue 2432 - styles were too large to fit in first Mpdf chunk, causing problems.\n\nfunction addHeadersFootersDompdf2000(string $html): string\n{\n    $headerFooter = <<<EOF\n        <style type='text/css'>\n        header {\n            position: fixed;\n            top: -0.5in; /* Position in top margin area */\n            height: 0.5in;\n            width: 100%;\n            text-align: center;\n        }\n        footer {\n            position: fixed;\n            bottom: -0.5in; /* Position in bottom margin area */\n            height: 0.5in;\n            width: 100%;\n            text-align: right;\n        }\n        .pagenum:before {content: counter(page);}\n        </style>\n\n        EOF;\n    $endhead = '</head>';\n    $html = str_replace($endhead, \"$headerFooter$endhead\", $html);\n    $bodystring = '<body>';\n    $bodyrepl = <<<EOF\n        <body>\n            <header>Dompdf Fixed header</header>\n            <footer>Page <span class=\"pagenum\"></span></footer>\n        EOF;\n\n    return str_replace($bodystring, $bodyrepl, $html);\n}\n\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n$counter = 0;\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Populate spreadsheet');\nfor ($row = 1; $row < 1001; ++$row) {\n    $sheet->getCell(\"A$row\")->setValue(++$counter);\n    // Add many styles by using slight variations of font color for each.\n    $sheet->getCell(\"A$row\")->getStyle()->getFont()\n        ->getColor()->setRgb(sprintf('%06x', $counter));\n    $sheet->getCell(\"B$row\")->setValue(++$counter);\n    $sheet->getCell(\"C$row\")->setValue(++$counter);\n}\n\n$helper->log('Write to Dompdf');\nIOFactory::registerWriter('Pdf', Dompdf::class);\n$helper->write(\n    $spreadsheet,\n    __FILE__,\n    ['Pdf'],\n    false,\n    function (Dompdf $writer): void {\n        $writer->setEditHtmlCallback('addHeadersFootersDompdf2000');\n    }\n);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Pdf/Mpdf_Custom_Headers.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\n\nrequire __DIR__ . '/../Header.php';\n\n// Issue 2432 - styles were too large to fit in first Mpdf chunk, causing problems.\n\nfunction addHeadersFootersMpdf2000(string $html): string\n{\n    $pagerepl = <<<EOF\n        @page page0 {\n        odd-header-name: html_myHeader1;\n        odd-footer-name: html_myFooter2;\n\n        EOF;\n    $html = preg_replace('/@page page0 {/', $pagerepl, $html) ?? throw new SpreadsheetException('preg 1 failed');\n    $bodystring = '/<body>/';\n    $simulatedBodyStart = Mpdf::SIMULATED_BODY_START;\n    $bodyrepl = <<<EOF\n        <body>\n            <htmlpageheader name=\"myHeader1\" style=\"display:none\">\n                <div style=\"text-align: right; border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;\">\n                    My document header\n                </div>\n            </htmlpageheader>\n\n            <htmlpagefooter name=\"myFooter2\" style=\"display:none\">\n                <table width=\"100%\">\n                    <tr>\n                        <td width=\"33%\">My document</td>\n                        <td width=\"33%\" align=\"center\">Page {PAGENO} of {nbpg}</td>\n                        <td width=\"33%\" style=\"text-align: right;\">{DATE Y-m-j}</td>\n                    </tr>\n                </table>\n            </htmlpagefooter>\n            $simulatedBodyStart\n\n        EOF;\n\n    return preg_replace($bodystring, $bodyrepl, $html) ?? throw new SpreadsheetException('preg 2 failed');\n}\n\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n$counter = 0;\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Populate spreadsheet');\nfor ($row = 1; $row < 1001; ++$row) {\n    $sheet->getCell(\"A$row\")->setValue(++$counter);\n    // Add many styles by using slight variations of font color for each.\n    $sheet->getCell(\"A$row\")->getStyle()->getFont()\n        ->getColor()->setRgb(sprintf('%06x', $counter));\n    $sheet->getCell(\"B$row\")->setValue(++$counter);\n    $sheet->getCell(\"C$row\")->setValue(++$counter);\n}\n\n$helper->log('Write to Mpdf');\nIOFactory::registerWriter('Pdf', Mpdf::class);\n$helper->write(\n    $spreadsheet,\n    __FILE__,\n    ['Pdf'],\n    false,\n    function (Mpdf $writer): void {\n        $writer->setEditHtmlCallback('addHeadersFootersMpdf2000');\n    }\n);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Pdf/Tcpdf_Custom_Headers.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\TcpdfNoDie;\nuse TCPDF as VendorTcpdf;\n\nrequire __DIR__ . '/../Header.php';\n\n// Override PhpSpreadsheet class.\nclass Tcpdf2 extends TcpdfNoDie // phpcs:ignore\n{\n    protected bool $writeHeader = true;\n\n    protected bool $writeFooter = true;\n\n    protected function createExternalWriterInstance(string $orientation, string $unit, $paperSize): VendorTcpdf\n    {\n        $this->defines();\n\n        return new Tcpdf2Class($orientation, $unit, $paperSize);\n    }\n}\n\n// Override vendor class.\nclass Tcpdf2Class extends VendorTcpdf // phpcs:ignore\n{\n    // Page header\n    public function Header(): void // phpcs:ignore\n    {\n        // Position at 15 mm from top\n        $this->setY(15);\n        // Set font\n        $this->setFont('helvetica', 'B', 12);\n        // Title\n        $pageNum = $this->getPage();\n        if ($pageNum === 1) {\n            $this->Cell(0, 15, 'Tcpdf first header', 0, 0, 'C', false, '', 0, false, 'M', 'M');\n        } elseif ($pageNum % 2 === 0) {\n            $this->Cell(0, 15, 'Tcpdf even header', 0, 0, 'C', false, '', 0, false, 'M', 'M');\n        } else {\n            $this->Cell(0, 15, 'Tcpdf odd header', 0, 0, 'C', false, '', 0, false, 'M', 'M');\n        }\n    }\n\n    // Page footer\n    public function Footer(): void // phpcs:ignore\n    {\n        // Position at 15 mm from bottom\n        $this->setY(-15);\n        // Set font\n        $this->setFont('helvetica', 'I', 8);\n        // Page number\n        $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, 0, 'C', false, '', 0, false, 'T', 'M');\n    }\n}\n\n$spreadsheet = new Spreadsheet();\n$sheet = $spreadsheet->getActiveSheet();\n$counter = 0;\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Populate spreadsheet');\nfor ($row = 1; $row < 1001; ++$row) {\n    $sheet->getCell(\"A$row\")->setValue(++$counter);\n    // Add many styles by using slight variations of font color for each.\n    $sheet->getCell(\"A$row\")->getStyle()->getFont()\n        ->getColor()->setRgb(sprintf('%06x', $counter));\n    $sheet->getCell(\"B$row\")->setValue(++$counter);\n    $sheet->getCell(\"C$row\")->setValue(++$counter);\n}\n\n$helper->log('Write to Tcpdf with headers and footers');\nIOFactory::registerWriter('Pdf', Tcpdf2::class);\n$helper->write($spreadsheet, __FILE__, ['Pdf']);\n$spreadsheet->disconnectWorksheets();\n"
  },
  {
    "path": "samples/Reader/01_Simple_file_reader_using_IOFactory.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory to identify the format');\n$spreadsheet = IOFactory::load($inputFileName);\n\n$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);\n$helper->displayGrid($sheetData);\n"
  },
  {
    "path": "samples/Reader/02_Simple_file_reader_using_a_specified_reader.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using ' . Xls::class);\n$reader = new Xls();\n$spreadsheet = $reader->load($inputFileName);\n\n$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);\n$helper->displayGrid($sheetData);\n"
  },
  {
    "path": "samples/Reader/03_Simple_file_reader_using_the_IOFactory_to_return_a_reader.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$reader = IOFactory::createReader($inputFileType);\n$spreadsheet = $reader->load($inputFileName);\n\n$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);\n$helper->displayGrid($sheetData);\n"
  },
  {
    "path": "samples/Reader/04_Simple_file_reader_using_the_IOFactory_to_identify_a_reader_to_use.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n$inputFileType = IOFactory::identify($inputFileName);\n$helper->log('File ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' has been identified as an ' . $inputFileType . ' file');\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with the identified reader type');\n$reader = IOFactory::createReader($inputFileType);\n$spreadsheet = $reader->load($inputFileName);\n\n$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);\n$helper->displayGrid($sheetData);\n"
  },
  {
    "path": "samples/Reader/05_Simple_file_reader_using_the_read_data_only_option.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Turning Formatting off for Load');\n$reader->setReadDataOnly(true);\n$spreadsheet = $reader->load($inputFileName);\n\n$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);\n$helper->displayGrid($sheetData);\n"
  },
  {
    "path": "samples/Reader/06_Simple_file_reader_loading_all_worksheets.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Loading all WorkSheets');\n$reader->setLoadAllSheets();\n$spreadsheet = $reader->load($inputFileName);\n\n$helper->log($spreadsheet->getSheetCount() . ' worksheet' . (($spreadsheet->getSheetCount() == 1) ? '' : 's') . ' loaded');\n$loadedSheetNames = $spreadsheet->getSheetNames();\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log($sheetIndex . ' -> ' . $loadedSheetName);\n}\n"
  },
  {
    "path": "samples/Reader/07_Simple_file_reader_loading_a_single_named_worksheet.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n$sheetname = 'Data Sheet #2';\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Loading Sheet \"' . $sheetname . '\" only');\n$reader->setLoadSheetsOnly($sheetname);\n$spreadsheet = $reader->load($inputFileName);\n\n$helper->log($spreadsheet->getSheetCount() . ' worksheet' . (($spreadsheet->getSheetCount() == 1) ? '' : 's') . ' loaded');\n$loadedSheetNames = $spreadsheet->getSheetNames();\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log($sheetIndex . ' -> ' . $loadedSheetName);\n}\n"
  },
  {
    "path": "samples/Reader/08_Simple_file_reader_loading_several_named_worksheets.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n\n/** @return string[] */\nfunction getDesiredSheetNames(): array\n{\n    return ['Data Sheet #1', 'Data Sheet #3'];\n}\n\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n$sheetnames = getDesiredSheetNames();\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Loading Sheets \"' . implode('\" and \"', $sheetnames) . '\" only');\n$reader->setLoadSheetsOnly($sheetnames);\n$spreadsheet = $reader->load($inputFileName);\n\n$helper->log($spreadsheet->getSheetCount() . ' worksheet' . (($spreadsheet->getSheetCount() == 1) ? '' : 's') . ' loaded');\n$loadedSheetNames = $spreadsheet->getSheetNames();\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log($sheetIndex . ' -> ' . $loadedSheetName);\n}\n"
  },
  {
    "path": "samples/Reader/09_Simple_file_reader_using_a_read_filter.php",
    "content": "<?php\n\nnamespace Samples\\Sample12;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var \\PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n$sheetname = 'Data Sheet #3';\n\nclass MyReadFilter implements IReadFilter\n{\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        // Read rows 9 to 15 and columns A to E only\n        if ($row >= 9 && $row <= 15) {\n            if (in_array($columnAddress, range('A', 'E'))) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n}\n\n$filterSubset = new MyReadFilter();\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$helper->log('Filter range is A9:E15');\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Loading Sheet \"' . $sheetname . '\" only');\n$reader->setLoadSheetsOnly($sheetname);\n$helper->log('Loading Sheet using filter');\n$reader->setReadFilter($filterSubset);\n$spreadsheet = $reader->load($inputFileName);\n\n$activeRange = $spreadsheet->getActiveSheet()->calculateWorksheetDataDimension();\n$sheetData = $spreadsheet->getActiveSheet()->rangeToArray($activeRange, null, true, true, true);\n$helper->displayGrid($sheetData);\n"
  },
  {
    "path": "samples/Reader/10_Simple_file_reader_using_a_configurable_read_filter.php",
    "content": "<?php\n\nnamespace Samples\\Sample10;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var \\PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n$sheetname = 'Data Sheet #3';\n\nclass MyReadFilter implements IReadFilter\n{\n    /** @param array<int, string> $columns */\n    public function __construct(\n        private int $startRow,\n        private int $endRow,\n        private array $columns\n    ) {\n    }\n\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        if ($row >= $this->startRow && $row <= $this->endRow) {\n            if (in_array($columnAddress, $this->columns)) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n}\n\n$filterSubset = new MyReadFilter(9, 15, range('G', 'K'));\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$helper->log('Filter range is G9:K15');\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Loading Sheet \"' . $sheetname . '\" only');\n$reader->setLoadSheetsOnly($sheetname);\n$helper->log('Loading Sheet using configurable filter');\n$reader->setReadFilter($filterSubset);\n$spreadsheet = $reader->load($inputFileName);\n\n$activeRange = $spreadsheet->getActiveSheet()->calculateWorksheetDataDimension();\n$sheetData = $spreadsheet->getActiveSheet()->rangeToArray($activeRange, null, true, true, true);\n$helper->displayGrid($sheetData);\n"
  },
  {
    "path": "samples/Reader/11_Reading_a_workbook_in_chunks_using_a_configurable_read_filter_version_1.php",
    "content": "<?php\n\nnamespace Samples\\Sample09;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var \\PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example2.xls';\n\n/**  Define a Read Filter class implementing IReadFilter  */\nclass ChunkReadFilter implements IReadFilter\n{\n    private int $startRow;\n\n    private int $endRow;\n\n    /**\n     * We expect a list of the rows that we want to read to be passed into the constructor.\n     */\n    public function __construct(int $startRow, int $chunkSize)\n    {\n        $this->startRow = $startRow;\n        $this->endRow = $startRow + $chunkSize;\n    }\n\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        //  Only read the heading row, and the rows that were configured in the constructor\n        if (($row == 1) || ($row >= $this->startRow && $row < $this->endRow)) {\n            return true;\n        }\n\n        return false;\n    }\n}\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n// Create a new Reader of the type defined in $inputFileType\n$reader = IOFactory::createReader($inputFileType);\n\n// Define how many rows we want for each \"chunk\"\n$chunkSize = 20;\n\n// Loop to read our worksheet in \"chunk size\" blocks\nfor ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {\n    $helper->log('Loading WorkSheet using configurable filter for headings row 1 and for rows ' . $startRow . ' to ' . ($startRow + $chunkSize - 1));\n    // Create a new Instance of our Read Filter, passing in the limits on which rows we want to read\n    $chunkFilter = new ChunkReadFilter($startRow, $chunkSize);\n    // Tell the Reader that we want to use the new Read Filter that we've just Instantiated\n    $reader->setReadFilter($chunkFilter);\n    // Load only the rows that match our filter from $inputFileName to a PhpSpreadsheet Object\n    $spreadsheet = $reader->load($inputFileName);\n    $sheet = $spreadsheet->getActiveSheet();\n\n    // Do some processing here\n\n    $activeRange = $sheet->calculateWorksheetDataDimension();\n    $sheet->getStyle($activeRange)->getNumberFormat()\n        ->setFormatCode('0.000');\n    $sheetData = $sheet->rangeToArray($activeRange, null, true, true, true);\n    $helper->displayGrid($sheetData, true);\n}\n"
  },
  {
    "path": "samples/Reader/12_Reading_a_workbook_in_chunks_using_a_configurable_read_filter_version_2.php",
    "content": "<?php\n\nnamespace Samples\\Sample12;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var \\PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example2.xls';\n\n/**  Define a Read Filter class implementing IReadFilter  */\nclass ChunkReadFilter implements IReadFilter\n{\n    private int $startRow = 0;\n\n    private int $endRow = 0;\n\n    /**\n     * Set the list of rows that we want to read.\n     */\n    public function setRows(int $startRow, int $chunkSize): void\n    {\n        $this->startRow = $startRow;\n        $this->endRow = $startRow + $chunkSize;\n    }\n\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        //  Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow\n        if (($row == 1) || ($row >= $this->startRow && $row < $this->endRow)) {\n            return true;\n        }\n\n        return false;\n    }\n}\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);\n// Create a new Reader of the type defined in $inputFileType\n$reader = IOFactory::createReader($inputFileType);\n\n// Define how many rows we want to read for each \"chunk\"\n$chunkSize = 20;\n// Create a new Instance of our Read Filter\n$chunkFilter = new ChunkReadFilter();\n\n// Tell the Reader that we want to use the Read Filter that we've Instantiated\n$reader->setReadFilter($chunkFilter);\n\n// Loop to read our worksheet in \"chunk size\" blocks\nfor ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {\n    $helper->log('Loading WorkSheet using configurable filter for headings row 1 and for rows ' . $startRow . ' to ' . ($startRow + $chunkSize - 1));\n    // Tell the Read Filter, the limits on which rows we want to read this iteration\n    $chunkFilter->setRows($startRow, $chunkSize);\n    // Load only the rows that match our filter from $inputFileName to a PhpSpreadsheet Object\n    $spreadsheet = $reader->load($inputFileName);\n    $sheet = $spreadsheet->getActiveSheet();\n\n    // Do some processing here\n\n    $activeRange = $sheet->calculateWorksheetDataDimension();\n    $sheet->getStyle($activeRange)->getNumberFormat()\n        ->setFormatCode('0.000');\n    $sheetData = $sheet->rangeToArray($activeRange, null, true, true, true);\n    $helper->displayGrid($sheetData, true);\n}\n"
  },
  {
    "path": "samples/Reader2/13_Simple_file_reader_for_multiple_CSV_files.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileNames = [__DIR__ . '/sampleData/example1.csv', __DIR__ . '/sampleData/example2.csv'];\n\n$reader = new Csv();\n$inputFileName = array_shift($inputFileNames);\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' into WorkSheet #1 using Csv Reader');\n$spreadsheet = $reader->load($inputFileName);\n$spreadsheet->getActiveSheet()->setTitle(pathinfo($inputFileName, PATHINFO_BASENAME));\nforeach ($inputFileNames as $sheet => $inputFileName) {\n    $helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' into WorkSheet #' . ($sheet + 2) . ' using Csv Reader');\n    $reader->setSheetIndex($sheet + 1);\n    $reader->loadIntoExisting($inputFileName, $spreadsheet);\n    $spreadsheet->getActiveSheet()->setTitle(pathinfo($inputFileName, PATHINFO_BASENAME));\n}\n\n$helper->log($spreadsheet->getSheetCount() . ' worksheet' . (($spreadsheet->getSheetCount() == 1) ? '' : 's') . ' loaded');\n$loadedSheetNames = $spreadsheet->getSheetNames();\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log('<b>Worksheet #' . $sheetIndex . ' -> ' . $loadedSheetName . '</b>');\n    $spreadsheet->setActiveSheetIndexByName($loadedSheetName);\n    $sheet = $spreadsheet->getActiveSheet();\n\n    $activeRange = $sheet->calculateWorksheetDataDimension();\n    $sheet->getStyle($activeRange)->getNumberFormat()\n        ->setFormatCode('0.000');\n    $sheetData = $sheet->rangeToArray($activeRange, null, true, true, true);\n    $helper->displayGrid($sheetData, true);\n}\n"
  },
  {
    "path": "samples/Reader2/14_Reading_a_large_CSV_file_in_chunks_to_split_across_multiple_worksheets.php",
    "content": "<?php\n\nnamespace Samples\\Sample14;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var \\PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = __DIR__ . '/sampleData/example2.csv';\n\n/**  Define a Read Filter class implementing IReadFilter  */\nclass ChunkReadFilter implements IReadFilter\n{\n    private int $startRow = 0;\n\n    private int $endRow = 0;\n\n    /**\n     * Set the list of rows that we want to read.\n     */\n    public function setRows(int $startRow, int $chunkSize): void\n    {\n        $this->startRow = $startRow;\n        $this->endRow = $startRow + $chunkSize;\n    }\n\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        //  Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow\n        if (($row == 1) || ($row >= $this->startRow && $row < $this->endRow)) {\n            return true;\n        }\n\n        return false;\n    }\n}\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using Csv reader');\n// Create a new Reader of the type defined in $inputFileType\n$reader = new Csv();\n\n// Define how many rows we want to read for each \"chunk\"\n$chunkSize = 100;\n// Create a new Instance of our Read Filter\n$chunkFilter = new ChunkReadFilter();\n\n// Tell the Reader that we want to use the Read Filter that we've Instantiated\n// and that we want to store it in contiguous rows/columns\n$reader->setReadFilter($chunkFilter);\n$reader->setContiguous(true);\n\n// Instantiate a new PhpSpreadsheet object manually\n$spreadsheet = new Spreadsheet();\n\n// Set a sheet index\n$sheet = 0;\n// Loop to read our worksheet in \"chunk size\" blocks\n/**  $startRow is set to 2 initially because we always read the headings in row #1  * */\nfor ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {\n    $helper->log('Loading WorkSheet #' . ($sheet + 1) . ' using configurable filter for headings row 1 and for rows ' . $startRow . ' to ' . ($startRow + $chunkSize - 1));\n    // Tell the Read Filter, the limits on which rows we want to read this iteration\n    $chunkFilter->setRows($startRow, $chunkSize);\n\n    // Increment the worksheet index pointer for the Reader\n    $reader->setSheetIndex($sheet);\n    // Load only the rows that match our filter into a new worksheet in the PhpSpreadsheet Object\n    $reader->loadIntoExisting($inputFileName, $spreadsheet);\n    // Set the worksheet title (to reference the \"sheet\" of data that we've loaded)\n    // and increment the sheet index as well\n    $spreadsheet->getActiveSheet()->setTitle('Country Data #' . (++$sheet));\n}\n\n$helper->log($spreadsheet->getSheetCount() . ' worksheet' . (($spreadsheet->getSheetCount() == 1) ? '' : 's') . ' loaded');\n$loadedSheetNames = $spreadsheet->getSheetNames();\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log('<b>Worksheet #' . $sheetIndex . ' -> ' . $loadedSheetName . '</b>');\n    $spreadsheet->setActiveSheetIndexByName($loadedSheetName);\n    $sheet = $spreadsheet->getActiveSheet();\n\n    $activeRange = $sheet->calculateWorksheetDataDimension();\n    $sheet->getStyle($activeRange)->getNumberFormat()\n        ->setFormatCode('0.000');\n    $sheetData = $sheet->rangeToArray($activeRange, null, true, true, true);\n    $helper->displayGrid($sheetData, true);\n}\n"
  },
  {
    "path": "samples/Reader2/15_Simple_file_reader_for_tab_separated_value_file_using_the_Advanced_Value_Binder.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\nCell::setValueBinder(new AdvancedValueBinder());\n\n$inputFileName = __DIR__ . '/sampleData/example1.tsv';\n\n$reader = new Csv();\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' into WorkSheet #1 using Csv reader');\n$reader->setDelimiter(\"\\t\");\n$spreadsheet = $reader->load($inputFileName);\n$spreadsheet->getActiveSheet()->setTitle(pathinfo($inputFileName, PATHINFO_BASENAME));\n\n$helper->log($spreadsheet->getSheetCount() . ' worksheet' . (($spreadsheet->getSheetCount() == 1) ? '' : 's') . ' loaded');\n$loadedSheetNames = $spreadsheet->getSheetNames();\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log('<b>Worksheet #' . $sheetIndex . ' -> ' . $loadedSheetName . ' (Formatted)</b>');\n    $spreadsheet->setActiveSheetIndexByName($loadedSheetName);\n\n    $activeRange = $spreadsheet->getActiveSheet()->calculateWorksheetDataDimension();\n    $sheetData = $spreadsheet->getActiveSheet()->rangeToArray($activeRange, null, true, true, true);\n    $helper->displayGrid($sheetData);\n}\n\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log('<b>Worksheet #' . $sheetIndex . ' -> ' . $loadedSheetName . ' (Unformatted)</b>');\n    $spreadsheet->setActiveSheetIndexByName($loadedSheetName);\n\n    $activeRange = $spreadsheet->getActiveSheet()->calculateWorksheetDataDimension();\n    $sheetData = $spreadsheet->getActiveSheet()->rangeToArray($activeRange, null, true, true, true);\n    $helper->displayGrid($sheetData);\n}\n\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log('<b>Worksheet #' . $sheetIndex . ' -> ' . $loadedSheetName . ' (Raw)</b>');\n    $spreadsheet->setActiveSheetIndexByName($loadedSheetName);\n\n    $activeRange = $spreadsheet->getActiveSheet()->calculateWorksheetDataDimension();\n    $sheetData = $spreadsheet->getActiveSheet()->rangeToArray($activeRange, null, true, true, true);\n    $helper->displayGrid($sheetData);\n}\n"
  },
  {
    "path": "samples/Reader2/16_Handling_loader_exceptions_using_TryCatch.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = __DIR__ . '/sampleData/non-existing-file.xls';\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory to identify the format');\n\ntry {\n    $spreadsheet = IOFactory::load($inputFileName);\n} catch (ReaderException $e) {\n    $helper->log('Error loading file \"' . pathinfo($inputFileName, PATHINFO_BASENAME) . '\": ' . $e->getMessage());\n}\n"
  },
  {
    "path": "samples/Reader2/17_Simple_file_reader_loading_several_named_worksheets.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using Xls reader');\n$reader = new Xls();\n\n// Read the list of Worksheet Names from the Workbook file\n$helper->log('Read the list of Worksheets in the WorkBook');\n$worksheetNames = $reader->listWorksheetNames($inputFileName);\n\n$helper->log('There are ' . count($worksheetNames) . ' worksheet' . ((count($worksheetNames) == 1) ? '' : 's') . ' in the workbook');\nforeach ($worksheetNames as $worksheetName) {\n    $helper->log($worksheetName);\n}\n"
  },
  {
    "path": "samples/Reader2/18_Reading_list_of_worksheets_without_loading_entire_file.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' information using Xls reader');\n\n$reader = new Xls();\n$worksheetNames = $reader->listWorksheetNames($inputFileName);\n\n$helper->log('<h3>Worksheet Names</h3>');\n$helper->log('<ol>');\nforeach ($worksheetNames as $worksheetName) {\n    $helper->log('<li>' . $worksheetName . '</li>');\n}\n$helper->log('</ol>');\n"
  },
  {
    "path": "samples/Reader2/19_Reading_worksheet_information_without_loading_entire_file.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' information using Xls reader');\n\n$reader = new Xls();\n$worksheetData = $reader->listWorksheetInfo($inputFileName);\n\n$helper->log('<h3>Worksheet Information</h3>');\n$helper->log('<ol>');\nforeach ($worksheetData as $worksheet) {\n    $helper->log('<li>' . $worksheet['worksheetName']);\n    $helper->log('Rows: ' . $worksheet['totalRows'] . ' Columns: ' . $worksheet['totalColumns']);\n    $helper->log('Cell Range: A1:' . $worksheet['lastColumnLetter'] . $worksheet['totalRows']);\n    $helper->log('</li>');\n}\n$helper->log('</ol>');\n"
  },
  {
    "path": "samples/Reader2/20_Reader_worksheet_hyperlink_image.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xlsx';\n\n$helper->log('Start');\n\n$spreadsheet = new Spreadsheet();\n\n$aSheet = $spreadsheet->getActiveSheet();\n\n$gdImage = @imagecreatetruecolor(120, 20);\nif ($gdImage === false) {\n    throw new Exception('imagecreatetruecolor failed');\n}\n$textColor = imagecolorallocate($gdImage, 255, 255, 255);\nif ($textColor === false) {\n    throw new Exception('imagecolorallocate failed');\n}\nimagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor);\n\n$baseUrl = 'https://phpspreadsheet.readthedocs.io';\n\n$drawing = new PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing();\n$drawing->setName('In-Memory image 1');\n$drawing->setDescription('In-Memory image 1');\n$drawing->setCoordinates('A1');\n$drawing->setImageResource($gdImage);\n$drawing->setRenderingFunction(\n    PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing::RENDERING_JPEG\n);\n$drawing->setMimeType(PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing::MIMETYPE_DEFAULT);\n$drawing->setHeight(36);\n$helper->log('Write image');\n\n$hyperLink = new PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink($baseUrl, 'test image');\n$drawing->setHyperlink($hyperLink);\n$helper->log('Write link: ' . $baseUrl);\n\n$drawing->setWorksheet($aSheet);\n\n$filename = File::temporaryFilename();\n\n$writer = PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($spreadsheet, $inputFileType);\n$writer->save($filename);\n\n$reader = PhpOffice\\PhpSpreadsheet\\IOFactory::createReader($inputFileType);\n\n$reloadedSpreadsheet = $reader->load($filename);\nunlink($filename);\n\n$helper->log('reloaded Spreadsheet');\n\nforeach ($reloadedSpreadsheet->getActiveSheet()->getDrawingCollection() as $pDrawing) {\n    $helper->log('Read link: ' . ($pDrawing->getHyperlink()?->getUrl() ?? 'none'));\n}\n\n$helper->log('end');\n"
  },
  {
    "path": "samples/Reader2/21_Reader_CSV_Long_Integers_with_String_Value_Binder.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\nCell::setValueBinder(new StringValueBinder());\n\n$inputFileType = 'Csv';\n$inputFileName = __DIR__ . '/sampleData/longIntegers.csv';\n\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' into WorkSheet #1 using IOFactory with a defined reader type of ' . $inputFileType);\n\n$spreadsheet = $reader->load($inputFileName);\n$spreadsheet->getActiveSheet()->setTitle(pathinfo($inputFileName, PATHINFO_BASENAME));\n\n$helper->log($spreadsheet->getSheetCount() . ' worksheet' . (($spreadsheet->getSheetCount() == 1) ? '' : 's') . ' loaded');\n$loadedSheetNames = $spreadsheet->getSheetNames();\nforeach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {\n    $helper->log('<b>Worksheet #' . $sheetIndex . ' -> ' . $loadedSheetName . ' (Formatted)</b>');\n    $spreadsheet->setActiveSheetIndexByName($loadedSheetName);\n\n    $activeRange = $spreadsheet->getActiveSheet()->calculateWorksheetDataDimension();\n    $sheetData = $spreadsheet->getActiveSheet()->rangeToArray($activeRange, null, true, true, true);\n    $helper->displayGrid($sheetData);\n}\n"
  },
  {
    "path": "samples/Reader2/22_Reader_formscomments.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Start');\n\n$inputFileType = 'Xlsx';\n$inputFileName = __DIR__ . '/sampleData/formscomments.xlsx';\n\n$helper->log('Loading file ' . $inputFileName . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Loading all WorkSheets');\n$reader->setLoadAllSheets();\n$spreadsheet = $reader->load($inputFileName);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n$spreadsheet->disconnectWorksheets();\n\n$helper->log('end');\n"
  },
  {
    "path": "samples/Reader2/22_Reader_issue1767.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Start');\n\n$inputFileType = 'Xlsx';\n$inputFileName = __DIR__ . '/sampleData/issue.1767.xlsx';\n\n$helper->log('Loading file ' . $inputFileName . ' using IOFactory with a defined reader type of ' . $inputFileType);\n$reader = IOFactory::createReader($inputFileType);\n$helper->log('Loading all WorkSheets');\n$reader->setLoadAllSheets();\n$spreadsheet = $reader->load($inputFileName);\n\n// Save\n$helper->write($spreadsheet, __FILE__);\n$spreadsheet->disconnectWorksheets();\n\n$helper->log('end');\n"
  },
  {
    "path": "samples/Reader2/23_iterateRowsYield.php",
    "content": "<?php\n\n/**\n * Use rangeToArrayYieldRows() to efficiently iterate over all rows.\n */\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nrequire __DIR__ . '/../Header.php';\n\n$inputFileName = __DIR__ . '/../Reader/sampleData/example1.xls';\n\n$spreadsheet = PhpOffice\\PhpSpreadsheet\\IOFactory::load(\n    $inputFileName,\n    PhpOffice\\PhpSpreadsheet\\Reader\\IReader::READ_DATA_ONLY\n);\n$sheet = $spreadsheet->getSheet(0);\n\n$rowGenerator = $sheet->rangeToArrayYieldRows(\n    $spreadsheet->getActiveSheet()->calculateWorksheetDataDimension(),\n    null,\n    false,\n    false\n);\nforeach ($rowGenerator as $row) {\n    echo '| ' . StringHelper::convertToString($row[0]) . ' | ' . StringHelper::convertToString($row[1]) . \"|\\n\";\n}\n"
  },
  {
    "path": "samples/Reader2/sampleData/example1.csv",
    "content": "First Name,Last Name,Nationality,Gender,Date of Birth,Time of Birth,Date/Time,PHP Coder,Sanity %Age\nMark,Baker,British,M,19-Dec-1960,01:30,=E2+F2,TRUE,32%\nToni,Baker,British,F,24-Nov-1950,20:00,=E3+F3,FALSE,95%\nRachel,Baker,British,F,7-Dec-1982,00:15,=E4+F4,FALSE,100%"
  },
  {
    "path": "samples/Reader2/sampleData/example1.tsv",
    "content": "First Name\tLast Name\tNationality\tGender\tDate of Birth\tTime of Birth\tDate/Time\tPHP Coder\tSanity %Age\r\nMark\tBaker\tBritish\tM\t19-Dec-1960\t01:30\t=E2+F2\tTRUE\t32%\r\nToni\tBaker\tBritish\tF\t24-Nov-1950\t20:00\t=E3+F3\tFALSE\t95%\r\nRachel\tBaker\tBritish\tF\t7-Dec-1982\t00:15\t=E4+F4\tFALSE\t100%"
  },
  {
    "path": "samples/Reader2/sampleData/example2.csv",
    "content": "\"City\",\"Country\",\"Latitude\",\"Longitude\"\n\"Kabul\",\"Afghanistan\",34.528455,69.171703\n\"Tirane\",\"Albania\",41.33,19.82\n\"Algiers\",\"Algeria\",36.752887,3.042048\n\"Pago Pago\",\"American Samoa\",-14.27933,-170.700897\n\"Andorra la Vella\",\"Andorra\",42.507531,1.521816\n\"Luanda\",\"Angola\",-8.838333,13.234444\n\"Buenos Aires\",\"Argentina\",-34.608417,-58.373161\n\"Yerevan\",\"Armenia\",40.183333,44.516667\n\"Oranjestad\",\"Aruba\",12.52458,-70.026459\n\"Canberra\",\"Australia\",-35.3075,149.124417\n\"Vienna\",\"Austria\",48.208333,16.373056\n\"Baku\",\"Azerbaijan\",40.379571,49.891233\n\"Nassau\",\"Bahamas\",25.06,-77.345\n\"Manama\",\"Bahrain\",26.216667,50.583333\n\"Dhaka\",\"Bangladesh\",23.709921,90.407143\n\"Bridgetown\",\"Barbados\",13.096111,-59.608333\n\"Minsk\",\"Belarus\",53.9,27.566667\n\"Brussels\",\"Belgium\",50.846281,4.354727\n\"Belmopan\",\"Belize\",17.251389,-88.766944\n\"Thimphu\",\"Bhutan\",27.466667,89.641667\n\"La Paz\",\"Bolivia\",-16.49901,-68.146248\n\"Sarajevo\",\"Bosnia and Herzegovina\",43.8476,18.3564\n\"Gaborone\",\"Botswana\",-24.65411,25.908739\n\"Brasilia\",\"Brazil\",-15.780148,-47.92917\n\"Road Town\",\"British Virgin Islands\",18.433333,-64.616667\n\"Bandar Seri Begawan\",\"Brunei Darussalam\",4.9431,114.9425\n\"Sofia\",\"Bulgaria\",42.697626,23.322284\n\"Ouagadougou\",\"Burkina Faso\",12.364637,-1.533864\n\"Bujumbura\",\"Burundi\",-3.361378,29.359878\n\"Phnom Penh\",\"Cambodia\",11.55,104.916667\n\"Yaounde\",\"Cameroon\",3.866667,11.516667\n\"Ottawa\",\"Canada\",45.423494,-75.697933\n\"Praia\",\"Cape Verde\",14.920833,-23.508333\n\"George Town\",\"Cayman Islands\",19.286932,-81.367439\n\"Bangui\",\"Central African Republic\",4.361698,18.555975\n\"N'Djamena\",\"Chad\",12.104797,15.044506\n\"Santiago\",\"Chile\",-33.42536,-70.566466\n\"Beijing\",\"China\",39.904667,116.408198\n\"Bogota\",\"Colombia\",4.647302,-74.096268\n\"Moroni\",\"Comoros\",-11.717216,43.247315\n\"Brazzaville\",\"Congo\",-4.266667,15.283333\n\"San Jose\",\"Costa Rica\",9.933333,-84.083333\n\"Yamoussoukro\",\"Cote d'Ivoire\",6.816667,-5.283333\n\"Zagreb\",\"Croatia\",45.814912,15.978515\n\"Havana\",\"Cuba\",23.133333,-82.366667\n\"Nicosia\",\"Cyprus\",35.166667,33.366667\n\"Prague\",\"Czech Republic\",50.087811,14.42046\n\"Kinshasa\",\"Congo\",-4.325,15.322222\n\"Copenhagen\",\"Denmark\",55.676294,12.568116\n\"Djibouti\",\"Djibouti\",11.588,43.145\n\"Roseau\",\"Dominica\",15.301389,-61.388333\n\"Santo Domingo\",\"Dominican Republic\",18.5,-69.983333\n\"Dili\",\"East Timor\",-8.566667,125.566667\n\"Quito\",\"Ecuador\",-0.229498,-78.524277\n\"Cairo\",\"Egypt\",30.064742,31.249509\n\"San Salvador\",\"El Salvador\",13.69,-89.190003\n\"Malabo\",\"Equatorial Guinea\",3.75,8.783333\n\"Asmara\",\"Eritrea\",15.33236,38.92617\n\"Tallinn\",\"Estonia\",59.438862,24.754472\n\"Addis Ababa\",\"Ethiopia\",9.022736,38.746799\n\"Stanley\",\"Falkland Islands\",-51.700981,-57.84919\n\"Torshavn\",\"Faroe Islands\",62.017707,-6.771879\n\"Suva\",\"Fiji\",-18.1416,178.4419\n\"Helsinki\",\"Finland\",60.169813,24.93824\n\"Paris\",\"France\",48.856667,2.350987\n\"Cayenne\",\"French Guiana\",4.9227,-52.3269\n\"Papeete\",\"French Polynesia\",-17.535021,-149.569595\n\"Libreville\",\"Gabon\",0.390841,9.453644\n\"Banjul\",\"Gambia\",13.453056,-16.5775\n\"T'bilisi\",\"Georgia\",41.716667,44.783333\n\"Berlin\",\"Germany\",52.523405,13.4114\n\"Accra\",\"Ghana\",5.555717,-0.196306\n\"Athens\",\"Greece\",37.97918,23.716647\n\"Nuuk\",\"Greenland\",64.18362,-51.721407\n\"Basse-Terre\",\"Guadeloupe\",15.998503,-61.72202\n\"Guatemala\",\"Guatemala\",14.641389,-90.513056\n\"St. Peter Port\",\"Guernsey\",49.458858,-2.534752\n\"Conakry\",\"Guinea\",9.537029,-13.67847\n\"Bissau\",\"Guinea-Bissau\",11.866667,-15.6\n\"Georgetown\",\"Guyana\",6.804611,-58.154831\n\"Port-au-Prince\",\"Haiti\",18.539269,-72.336408\n\"Tegucigalpa\",\"Honduras\",14.082054,-87.206285\n\"Budapest\",\"Hungary\",47.498406,19.040758\n\"Reykjavik\",\"Iceland\",64.135338,-21.89521\n\"New Delhi\",\"India\",28.635308,77.22496\n\"Jakarta\",\"Indonesia\",-6.211544,106.845172\n\"Tehran\",\"Iran\",35.696216,51.422945\n\"Baghdad\",\"Iraq\",33.3157,44.3922\n\"Dublin\",\"Ireland\",53.344104,-6.267494\n\"Jerusalem\",\"Israel\",31.7857,35.2007\n\"Rome\",\"Italy\",41.895466,12.482324\n\"Kingston\",\"Jamaica\",17.992731,-76.792009\n\"St. Helier\",\"Jersey\",49.190278,-2.108611\n\"Amman\",\"Jordan\",31.956578,35.945695\n\"Astana\",\"Kazakhstan\",51.10,71.30\n\"Nairobi\",\"Kenya\",-01.17,36.48\n\"Tarawa\",\"Kiribati\",01.30,173.00\n\"Seoul\",\"South Korea\",37.31,126.58\n\"Kuwait City\",\"Kuwait\",29.30,48.00\n\"Bishkek\",\"Kyrgyzstan\",42.54,74.46\n\"Riga\",\"Latvia\",56.53,24.08\n\"Beirut\",\"Lebanon\",33.53,35.31\n\"Maseru\",\"Lesotho\",-29.18,27.30\n\"Monrovia\",\"Liberia\",06.18,-10.47\n\"Vaduz\",\"Liechtenstein\",47.08,09.31\n\"Vilnius\",\"Lithuania\",54.38,25.19\n\"Luxembourg\",\"Luxembourg\",49.37,06.09\n\"Antananarivo\",\"Madagascar\",-18.55,47.31\n\"Lilongwe\",\"Malawi\",-14.00,33.48\n\"Kuala Lumpur\",\"Malaysia\",03.09,101.41\n\"Male\",\"Maldives\",04.00,73.28\n\"Bamako\",\"Mali\",12.34,-07.55\n\"Valletta\",\"Malta\",35.54,14.31\n\"Fort-de-France\",\"Martinique\",14.36,-61.02\n\"Nouakchott\",\"Mauritania\",-20.10,57.30\n\"Mamoudzou\",\"Mayotte\",-12.48,45.14\n\"Mexico City\",\"Mexico\",19.20,-99.10\n\"Palikir\",\"Micronesia\",06.55,158.09\n\"Chisinau\",\"Moldova\",47.02,28.50\n\"Maputo\",\"Mozambique\",-25.58,32.32\n\"Yangon\",\"Myanmar\",16.45,96.20\n\"Windhoek\",\"Namibia\",-22.35,17.04\n\"Kathmandu\",\"Nepal\",27.45,85.20\n\"Amsterdam\",\"Netherlands\",52.23,04.54\n\"Willemstad\",\"Netherlands Antilles\",12.05,-69.00\n\"Noumea\",\"New Caledonia\",-22.17,166.30\n\"Wellington\",\"New Zealand\",-41.19,174.46\n\"Managua\",\"Nicaragua\",12.06,-86.20\n\"Niamey\",\"Niger\",13.27,02.06\n\"Abuja\",\"Nigeria\",09.05,07.32\n\"Kingston\",\"Norfolk Island\",-45.20,168.43\n\"Saipan\",\"Northern Mariana Islands\",15.12,145.45\n\"Oslo\",\"Norway\",59.55,10.45\n\"Masqat\",\"Oman\",23.37,58.36\n\"Islamabad\",\"Pakistan\",33.40,73.10\n\"Koror\",\"Palau\",07.20,134.28\n\"Panama City\",\"Panama\",09.00,-79.25\n\"Port Moresby\",\"Papua New Guinea\",-09.24,147.08\n\"Asuncion\",\"Paraguay\",-25.10,-57.30\n\"Lima\",\"Peru\",-12.00,-77.00\n\"Manila\",\"Philippines\",14.40,121.03\n\"Warsaw\",\"Poland\",52.13,21.00\n\"Lisbon\",\"Portugal\",38.42,-09.10\n\"San Juan\",\"Puerto Rico\",18.28,-66.07\n\"Doha\",\"Qatar\",25.15,51.35\n\"Bucuresti\",\"Romania\",44.27,26.10\n\"Moskva\",\"Russian Federation\",55.45,37.35\n\"Kigali\",\"Rawanda\",-01.59,30.04\n\"Basseterre\",\"Saint Kitts and Nevis\",17.17,-62.43\n\"Castries\",\"Saint Lucia\",14.02,-60.58\n\"Saint-Pierre\",\"Saint Pierre and Miquelon\",46.46,-56.12\n\"Apia\",\"Samoa\",-13.50,-171.50\n\"San Marino\",\"San Marino\",43.55,12.30\n\"Sao Tome\",\"Sao Tome and Principe\",00.10,06.39\n\"Riyadh\",\"Saudi Arabia\",24.41,46.42\n\"Dakar\",\"Senegal\",14.34,-17.29\n\"Freetown\",\"Sierra Leone\",08.30,-13.17\n\"Bratislava\",\"Slovakia\",48.10,17.07\n\"Ljubljana\",\"Slovenia\",46.04,14.33\n\"Honiara\",\"Solomon Islands\",-09.27,159.57\n\"Mogadishu\",\"Somalia\",02.02,45.25\n\"Pretoria\",\"South Africa\",-25.44,28.12\n\"Madrid\",\"Spain\",40.25,-03.45\n\"Khartoum\",\"Sudan\",15.31,32.35\n\"Paramaribo\",\"Suriname\",05.50,-55.10\n\"Mbabane\",\"Swaziland\",-26.18,31.06\n\"Stockholm\",\"Sweden\",59.20,18.03\n\"Bern\",\"Switzerland\",46.57,07.28\n\"Damascus\",\"Syrian Arab Republic\",33.30,36.18\n\"Dushanbe\",\"Tajikistan\",38.33,68.48\n\"Bangkok\",\"Thailand\",13.45,100.35\n\"Lome\",\"Togo\",06.09,01.20\n\"Nuku'alofa\",\"Tonga\",-21.10,-174.00\n\"Tunis\",\"Tunisia\",36.50,10.11\n\"Ankara\",\"Turkey\",39.57,32.54\n\"Ashgabat\",\"Turkmenistan\",38.00,57.50\n\"Funafuti\",\"Tuvalu\",-08.31,179.13\n\"Kampala\",\"Uganda\",00.20,32.30\n\"Kiev\",\"Ukraine\",50.30,30.28\n\"Abu Dhabi\",\"United Arab Emirates\",24.28,54.22\n\"London\",\"United Kingdom\",51.36,-00.05\n\"Dodoma\",\"Tanzania\",-06.08,35.45\n\"Washington DC\",\"United States of America\",39.91,-77.02\n\"Montevideo\",\"Uruguay\",-34.50,-56.11\n\"Tashkent\",\"Uzbekistan\",41.20,69.10\n\"Port-Vila\",\"Vanuatu\",-17.45,168.18\n\"Caracas\",\"Venezuela\",10.30,-66.55\n\"Hanoi\",\"Viet Nam\",21.05,105.55\n\"Belgrade\",\"Yugoslavia\",44.50,20.37\n\"Lusaka\",\"Zambia\",-15.28,28.16\n\"Harare\",\"Zimbabwe\",-17.43,31.02\n\"St. John's\",\"Antigua and Barbuda\",17.08,-61.50\n\"Porto Novo\",\"Benin\",06.30,02.47\n\"Hamilton\",\"Bermuda\"\",\"32.18,-64.48\n\"Avarua\",\"Cook Islands\",-21.12,-159.46\n\"St. George's\",\"Grenada\",12.04,-61.44\n\"Agaa\",\"Guam\",13.28,144.45\n\"Victoria\",\"Hong Kong\",22.16,114.13\n\"Tokyo\",\"Japan\",35.40,139.45\n\"Pyongyang\",\"North Korea\",39.00,125.47\n\"Vientiane\",\"Laos\",17.59,102.38\n\"Tripoli\",\"Libya\",32.54,013.11\n\"Skopje\",\"Macedonia\",42.00,021.28\n\"Majuro\",\"Marshall Islands\",07.05,171.08\n\"Port Louis\",\"Mauritius\",-20.10,57.30\n\"Monaco\",\"Monaco\",43.44,007.25\n\"Ulan Bator\",\"Mongolia\",47.54,106.52\n\"Plymouth\",\"Montserrat\",16.44,-62.14\n\"Rabat\",\"Morocco\",34.02,-06.51\n\"Alofi\",\"Niue\",-14.27,-178.05\n\"Saint-Denis\",\"Runion\",-20.52,55.27\n\"Victoria\",\"Seychelles\",-04.38,55.28\n\"Singapore\",\"Singapore\",01.18,103.50\n\"Colombo\",\"Sri Lanka\",06.55,79.52\n\"Kingstown\",\"St Vincent and the Grenadines\",13.12,-61.14\n\"Taipei\",\"Taiwan\",25.50,121.32\n\"Port-of-Spain\",\"Trinidad and Tobago\",10.38,-61.31\n\"Cockburn Harbour\",\"Turks and Caicos Islands\",21.30,-71.30\n\"Charlotte Amalie\",\"US Virgin Islands\",18.22,-64.56\n\"Vatican City\",\"Vatican State\",41.54,12.27\n\"Layoune\",\"Western Sahara\",27.10,-13.11\n\"San'a\",\"Yemen\",15.24,44.14\n"
  },
  {
    "path": "samples/Reader2/sampleData/longIntegers.csv",
    "content": "\"Column 1\",\"Column 2\"\n123456789012345678901234,234567890123456789012345\n345678901234567890123456,456789012345678901234567\n567890123456789012345678,678901234567890123456789\n789012345678901234567890,890123456789012345678901\n901234567890123456789012,012345678901234567890123\n"
  },
  {
    "path": "samples/Reading_workbook_data/Custom_properties.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xlsx';\n$inputFileName = __DIR__ . '/sampleData/example1.xlsx';\n\n// Create a new Reader of the type defined in $inputFileType\n$reader = IOFactory::createReader($inputFileType);\n// Load $inputFileName to a PhpSpreadsheet Object\n$spreadsheet = $reader->load($inputFileName);\n\n// Read an array list of any custom properties for this document\n$customPropertyList = $spreadsheet->getProperties()->getCustomProperties();\n\n// Loop through the list of custom properties\nforeach ($customPropertyList as $customPropertyName) {\n    $helper->log('<b>' . $customPropertyName . ': </b>');\n    // Retrieve the property value\n    $propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customPropertyName);\n    // Retrieve the property type\n    $propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customPropertyName);\n\n    // Manipulate properties as appropriate for display purposes\n    switch ($propertyType) {\n        case 'i':    // integer\n            $propertyType = 'integer number';\n\n            break;\n        case 'f':    // float\n            $propertyType = 'floating point number';\n\n            break;\n        case 's':    // string\n            $propertyType = 'string';\n\n            break;\n        case 'd':    // date\n            $propertyValue = is_numeric($propertyValue) ? date('l, j<\\s\\u\\p>S</\\s\\u\\p> F Y g:i A', (int) $propertyValue) : '*****INVALID*****';\n            $propertyType = 'date';\n\n            break;\n        case 'b':    // boolean\n            $propertyValue = ($propertyValue) ? 'TRUE' : 'FALSE';\n            $propertyType = 'boolean';\n\n            break;\n    }\n\n    $helper->log($propertyValue . ' (' . $propertyType . ')');\n}\n"
  },
  {
    "path": "samples/Reading_workbook_data/Custom_property_names.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xlsx';\n$inputFileName = __DIR__ . '/sampleData/example1.xlsx';\n\n// Create a new Reader of the type defined in $inputFileType\n$reader = IOFactory::createReader($inputFileType);\n// Load $inputFileName to a PhpSpreadsheet Object\n$spreadsheet = $reader->load($inputFileName);\n\n// Read an array list of any custom properties for this document\n$customPropertyList = $spreadsheet->getProperties()->getCustomProperties();\n\nforeach ($customPropertyList as $customPropertyName) {\n    $helper->log($customPropertyName);\n}\n"
  },
  {
    "path": "samples/Reading_workbook_data/Properties.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example1.xls';\n\n// Create a new Reader of the type defined in $inputFileType\n$reader = IOFactory::createReader($inputFileType);\n// Load $inputFileName to a PhpSpreadsheet Object\n$spreadsheet = $reader->load($inputFileName);\n\n// Read the document's creator property\n$creator = $spreadsheet->getProperties()->getCreator();\n$helper->log('<b>Document Creator: </b>' . $creator);\n\n// Read the Date when the workbook was created (as a PHP timestamp value)\n$creationDatestamp = $spreadsheet->getProperties()->getCreated();\n$creationDate = Date::formattedDateTimeFromTimestamp(\"$creationDatestamp\", 'l, j<\\s\\u\\p>S</\\s\\u\\p> F Y');\n$creationTime = Date::formattedDateTimeFromTimestamp(\"$creationDatestamp\", 'g:i A');\n$helper->log('<b>Created On: </b>' . $creationDate . ' at ' . $creationTime);\n\n// Read the name of the last person to modify this workbook\n$modifiedBy = $spreadsheet->getProperties()->getLastModifiedBy();\n$helper->log('<b>Last Modified By: </b>' . $modifiedBy);\n\n// Read the Date when the workbook was last modified (as a PHP timestamp value)\n$modifiedDatestamp = $spreadsheet->getProperties()->getModified();\n// Format the date and time using the standard PHP date() function\n$modifiedDate = Date::formattedDateTimeFromTimestamp(\"$modifiedDatestamp\", 'l, j<\\s\\u\\p>S</\\s\\u\\p> F Y');\n$modifiedTime = Date::formattedDateTimeFromTimestamp(\"$modifiedDatestamp\", 'g:i A');\n$helper->log('<b>Last Modified On: </b>' . $modifiedDate . ' at ' . $modifiedTime);\n\n// Read the workbook title property\n$workbookTitle = $spreadsheet->getProperties()->getTitle();\n$helper->log('<b>Title: </b>' . $workbookTitle);\n\n// Read the workbook description property\n$description = $spreadsheet->getProperties()->getDescription();\n$helper->log('<b>Description: </b>' . $description);\n\n// Read the workbook subject property\n$subject = $spreadsheet->getProperties()->getSubject();\n$helper->log('<b>Subject: </b>' . $subject);\n\n// Read the workbook keywords property\n$keywords = $spreadsheet->getProperties()->getKeywords();\n$helper->log('<b>Keywords: </b>' . $keywords);\n\n// Read the workbook category property\n$category = $spreadsheet->getProperties()->getCategory();\n$helper->log('<b>Category: </b>' . $category);\n\n// Read the workbook company property\n$company = $spreadsheet->getProperties()->getCompany();\n$helper->log('<b>Company: </b>' . $company);\n\n// Read the workbook manager property\n$manager = $spreadsheet->getProperties()->getManager();\n$helper->log('<b>Manager: </b>' . $manager);\n$s = new PhpOffice\\PhpSpreadsheet\\Helper\\Sample();\n"
  },
  {
    "path": "samples/Reading_workbook_data/Worksheet_count_and_names.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$inputFileType = 'Xls';\n$inputFileName = __DIR__ . '/sampleData/example2.xls';\n\n// Create a new Reader of the type defined in $inputFileType\n$reader = IOFactory::createReader($inputFileType);\n// Load $inputFileName to a PhpSpreadsheet Object\n$spreadsheet = $reader->load($inputFileName);\n\n// Use the PhpSpreadsheet object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook\n$sheetCount = $spreadsheet->getSheetCount();\n$helper->log('There ' . (($sheetCount == 1) ? 'is' : 'are') . ' ' . $sheetCount . ' WorkSheet' . (($sheetCount == 1) ? '' : 's') . ' in the WorkBook');\n\n$helper->log('Reading the names of Worksheets in the WorkBook');\n// Use the PhpSpreadsheet object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook\n$sheetNames = $spreadsheet->getSheetNames();\nforeach ($sheetNames as $sheetIndex => $sheetName) {\n    $helper->log('WorkSheet #' . $sheetIndex . ' is named \"' . $sheetName . '\"');\n}\n"
  },
  {
    "path": "samples/Table/01_Table.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableStyle;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\IWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('aswinkumar863')\n    ->setLastModifiedBy('aswinkumar863')\n    ->setTitle('PhpSpreadsheet Table Test Document')\n    ->setSubject('PhpSpreadsheet Table Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Table');\n\n// Create the worksheet\n$helper->log('Add data');\n\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Year')\n    ->setCellValue('B1', 'Quarter')\n    ->setCellValue('C1', 'Country')\n    ->setCellValue('D1', 'Sales');\n\n$dataArray = [\n    ['2010', 'Q1', 'United States', 790],\n    ['2010', 'Q2', 'United States', 730],\n    ['2010', 'Q3', 'United States', 860],\n    ['2010', 'Q4', 'United States', 850],\n    ['2011', 'Q1', 'United States', 800],\n    ['2011', 'Q2', 'United States', 700],\n    ['2011', 'Q3', 'United States', 900],\n    ['2011', 'Q4', 'United States', 950],\n    ['2010', 'Q1', 'Belgium', 380],\n    ['2010', 'Q2', 'Belgium', 390],\n    ['2010', 'Q3', 'Belgium', 420],\n    ['2010', 'Q4', 'Belgium', 460],\n    ['2011', 'Q1', 'Belgium', 400],\n    ['2011', 'Q2', 'Belgium', 350],\n    ['2011', 'Q3', 'Belgium', 450],\n    ['2011', 'Q4', 'Belgium', 500],\n    ['2010', 'Q1', 'UK', 690],\n    ['2010', 'Q2', 'UK', 610],\n    ['2010', 'Q3', 'UK', 620],\n    ['2010', 'Q4', 'UK', 600],\n    ['2011', 'Q1', 'UK', 720],\n    ['2011', 'Q2', 'UK', 650],\n    ['2011', 'Q3', 'UK', 580],\n    ['2011', 'Q4', 'UK', 510],\n    ['2010', 'Q1', 'France', 510],\n    ['2010', 'Q2', 'France', 490],\n    ['2010', 'Q3', 'France', 460],\n    ['2010', 'Q4', 'France', 590],\n    ['2011', 'Q1', 'France', 620],\n    ['2011', 'Q2', 'France', 650],\n    ['2011', 'Q3', 'France', 415],\n    ['2011', 'Q4', 'France', 570],\n];\n\n$spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A2');\n\n// Create Table\n$helper->log('Create Table');\n$table = new Table('A1:D33', 'Sales_Data');\n\n// Create Columns\n$table->getColumn('D')->setShowFilterButton(false);\n$table->getAutoFilter()->getColumn('A')\n    ->setFilterType(AutoFilter\\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)\n    ->createRule()\n    ->setRule(AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 2011)\n    ->setRuleType(AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n// Create Table Style\n$helper->log('Create Table Style');\n$tableStyle = new TableStyle();\n$tableStyle->setTheme(TableStyle::TABLE_STYLE_MEDIUM2);\n$tableStyle->setShowRowStripes(true);\n$tableStyle->setShowColumnStripes(true);\n$tableStyle->setShowFirstColumn(true);\n$tableStyle->setShowLastColumn(true);\n$table->setStyle($tableStyle);\n\n// Add Table to Worksheet\n$helper->log('Add Table to Worksheet');\n$spreadsheet->getActiveSheet()->addTable($table);\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, true, true, true));\n\nfunction writerCallbackForHtml(IWriter $writer): void\n{\n    if (method_exists($writer, 'setTableFormats')) {\n        $writer->setTableFormats(true);\n    }\n}\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Html'], writerCallback: writerCallbackForHtml(...));\n"
  },
  {
    "path": "samples/Table/02_Table_Total.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('aswinkumar863')\n    ->setLastModifiedBy('aswinkumar863')\n    ->setTitle('PhpSpreadsheet Table Test Document')\n    ->setSubject('PhpSpreadsheet Table Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Table');\n\n// Create the worksheet\n$helper->log('Add data');\n\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Year')\n    ->setCellValue('B1', 'Quarter')\n    ->setCellValue('C1', 'Country')\n    ->setCellValue('D1', 'Sales');\n\n$dataArray = [\n    ['2010', 'Q1', 'United States', 790],\n    ['2010', 'Q2', 'United States', 730],\n    ['2010', 'Q3', 'United States', 860],\n    ['2010', 'Q4', 'United States', 850],\n    ['2011', 'Q1', 'United States', 800],\n    ['2011', 'Q2', 'United States', 700],\n    ['2011', 'Q3', 'United States', 900],\n    ['2011', 'Q4', 'United States', 950],\n    ['2010', 'Q1', 'Belgium', 380],\n    ['2010', 'Q2', 'Belgium', 390],\n    ['2010', 'Q3', 'Belgium', 420],\n    ['2010', 'Q4', 'Belgium', 460],\n    ['2011', 'Q1', 'Belgium', 400],\n    ['2011', 'Q2', 'Belgium', 350],\n    ['2011', 'Q3', 'Belgium', 450],\n    ['2011', 'Q4', 'Belgium', 500],\n];\n\n$spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A2');\n\n// Table\n$helper->log('Create Table');\n$table = new Table();\n$table->setName('SalesData');\n$table->setShowTotalsRow(true);\n$table->setRange('A1:D18'); // +1 row for totalsRow\n\n$helper->log('Add Totals Row');\n// Table column label not implemented yet,\n$table->getColumn('A')->setTotalsRowLabel('Total');\n// So set the label directly to the cell\n$spreadsheet->getActiveSheet()->getCell('A18')->setValue('Total');\n\n// Table column function not implemented yet,\n$table->getColumn('D')->setTotalsRowFunction('sum');\n// So set the formula directly to the cell\n$spreadsheet->getActiveSheet()->getCell('D18')->setValue('=SUBTOTAL(109,SalesData[Sales])');\n\n// Add Table to Worksheet\n$helper->log('Add Table to Worksheet');\n$spreadsheet->getActiveSheet()->addTable($table);\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));\n\n$helper->log('Calculate Structured References');\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, true, true, true), true);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/Table/03_Column_Formula.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('aswinkumar863')\n    ->setLastModifiedBy('aswinkumar863')\n    ->setTitle('PhpSpreadsheet Table Test Document')\n    ->setSubject('PhpSpreadsheet Table Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Table');\n\n// Create the worksheet\n$helper->log('Add data');\n\n$spreadsheet->setActiveSheetIndex(0);\n\n$columnFormula = '=SUM(Sales_Data[[#This Row],[Q1]:[Q4]])';\n\n$dataArray = [\n    ['Year', 'Country', 'Q1', 'Q2', 'Q3', 'Q4', 'Sales'],\n    [2010, 'Belgium', 380, 390, 420, 460, $columnFormula],\n    [2010, 'France', 510, 490, 460, 590, $columnFormula],\n    [2010, 'Germany', 720, 680, 640, 660, $columnFormula],\n    [2010, 'Italy', 440, 410, 420, 450, $columnFormula],\n    [2010, 'Spain', 510, 490, 470, 420, $columnFormula],\n    [2010, 'UK', 690, 610, 620, 600, $columnFormula],\n    [2010, 'United States', 790, 730, 860, 850, $columnFormula],\n    [2011, 'Belgium', 400, 350, 450, 500, $columnFormula],\n    [2011, 'France', 620, 650, 415, 570, $columnFormula],\n    [2011, 'Germany', 680, 620, 710, 690, $columnFormula],\n    [2011, 'Italy', 430, 370, 350, 335, $columnFormula],\n    [2011, 'Spain', 460, 390, 430, 415, $columnFormula],\n    [2011, 'UK', 720, 650, 580, 510, $columnFormula],\n    [2011, 'United States', 800, 700, 900, 950, $columnFormula],\n];\n\n$spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A1');\n\n// Create Table\n$helper->log('Create Table');\n$table = new Table('A1:G15', 'Sales_Data');\n$table->setRange('A1:G15');\n\n// Set Column Formula\n$table->getColumn('G')->setColumnFormula($columnFormula);\n\n// Add Table to Worksheet\n$helper->log('Add Table to Worksheet');\n$spreadsheet->getActiveSheet()->addTable($table);\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));\n\n$helper->log('Calculate Structured References');\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, true, true, true));\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/Table/04_Column_Formula_with_Totals.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n\n// Create new Spreadsheet object\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('aswinkumar863')\n    ->setLastModifiedBy('aswinkumar863')\n    ->setTitle('PhpSpreadsheet Table Test Document')\n    ->setSubject('PhpSpreadsheet Table Test Document')\n    ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')\n    ->setKeywords('office PhpSpreadsheet php')\n    ->setCategory('Table');\n\n// Create the worksheet\n$helper->log('Add data');\n\n$spreadsheet->setActiveSheetIndex(0);\n\n$columnFormula = '=SUM(Sales_Data[[#This Row],[Q1]:[Q4]])';\n\n$dataArray = [\n    ['Year', 'Country', 'Q1', 'Q2', 'Q3', 'Q4', 'Sales'],\n    [2010, 'Belgium', 380, 390, 420, 460, $columnFormula],\n    [2010, 'France', 510, 490, 460, 590, $columnFormula],\n    [2010, 'Germany', 720, 680, 640, 660, $columnFormula],\n    [2010, 'Italy', 440, 410, 420, 450, $columnFormula],\n    [2010, 'Spain', 510, 490, 470, 420, $columnFormula],\n    [2010, 'UK', 690, 610, 620, 600, $columnFormula],\n    [2010, 'United States', 790, 730, 860, 850, $columnFormula],\n    [2011, 'Belgium', 400, 350, 450, 500, $columnFormula],\n    [2011, 'France', 620, 650, 415, 570, $columnFormula],\n    [2011, 'Germany', 680, 620, 710, 690, $columnFormula],\n    [2011, 'Italy', 430, 370, 350, 335, $columnFormula],\n    [2011, 'Spain', 460, 390, 430, 415, $columnFormula],\n    [2011, 'UK', 720, 650, 580, 510, $columnFormula],\n    [2011, 'United States', 800, 700, 900, 950, $columnFormula],\n];\n\n$spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A1');\n\n// Create Table\n$helper->log('Create Table');\n$table = new Table('A1:G16', 'Sales_Data'); // +1 row for totalsRow\n$table->setShowTotalsRow(true);\n$table->setRange('A1:G16'); // +1 row for totalsRow\n\n// Set Column Formula\n$table->getColumn('G')->setColumnFormula($columnFormula);\n\n$helper->log('Add Totals Row');\n// Table column label not implemented yet,\n$table->getColumn('A')->setTotalsRowLabel('Total');\n// So set the label directly to the cell\n$spreadsheet->getActiveSheet()->getCell('A16')->setValue('Total');\n\n// Table column function not implemented yet,\n$table->getColumn('G')->setTotalsRowFunction('sum');\n// So set the formula directly to the cell\n$spreadsheet->getActiveSheet()->getCell('G16')->setValue('=SUBTOTAL(109,Sales_Data[Sales])');\n\n// Table column function not implemented yet,\n$table->getColumn('C')->setTotalsRowFunction('sum');\n$table->getColumn('D')->setTotalsRowFunction('sum');\n$table->getColumn('E')->setTotalsRowFunction('sum');\n$table->getColumn('F')->setTotalsRowFunction('sum');\n// So set the formulae directly to the cells\n$spreadsheet->getActiveSheet()->getCell('C16')->setValue('=SUBTOTAL(109,Sales_Data[Q1])');\n$spreadsheet->getActiveSheet()->getCell('D16')->setValue('=SUBTOTAL(109,Sales_Data[Q2])');\n$spreadsheet->getActiveSheet()->getCell('E16')->setValue('=SUBTOTAL(109,Sales_Data[Q3])');\n$spreadsheet->getActiveSheet()->getCell('F16')->setValue('=SUBTOTAL(109,Sales_Data[Q4])');\n\n// Add Table to Worksheet\n$helper->log('Add Table to Worksheet');\n$spreadsheet->getActiveSheet()->addTable($table);\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));\n\n$helper->log('Calculate Structured References');\n\n$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, true, true, true), true);\n\n// Save\n$helper->write($spreadsheet, __FILE__, ['Xlsx']);\n"
  },
  {
    "path": "samples/Wizards/Header.php",
    "content": "<?php\n\nrequire __DIR__ . '/../Header.php';\n"
  },
  {
    "path": "samples/Wizards/NumberFormat/Accounting.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n\n$currencies = [\n    '$' => 'US Dollars ($)',\n    '€' => 'Euro (€)',\n    '¥' => 'Japanese Yen (¥)',\n    '£' => 'Pound Sterling (£)',\n    '₹' => 'Rupee (₹)',\n    '₽' => 'Rouble (₽)',\n];\n\n?>\n    <form action=Accounting.php method=\"POST\">\n        <div class=\"mb-3 row\">\n            <label for=\"number\" class=\"col-sm-2 col-form-label\">Sample Number Value</label>\n            <div class=\"col-sm-10\">\n                <input name=\"number\" type=\"text\" size=\"8\" value=\"<?php echo StringHelper::convertPostToString('number', '1234.5678'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <hr />\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"currency\" class=\"col-sm-2 col-form-label\">Currency</label>\n            <div class=\"col-sm-10\">\n                <select name=\"currency\" class=\"form-select\">\n                    <?php foreach ($currencies as $currencySymbol => $currencyName) {\n                        echo \"<option value=\\\"{$currencySymbol}\\\" \" . ((isset($_POST['currency']) && $_POST['currency'] === $currencySymbol) ? 'selected' : '') . \">{$currencyName}</option>\", PHP_EOL;\n                    } ?>\n                </select>\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"decimals\" class=\"col-sm-2 col-form-label\">Decimal Places</label>\n            <div class=\"col-sm-10\">\n                <input name=\"decimals\" type=\"number\" size=\"2\" min=\"0\" max=\"14\" value=\"<?php echo StringHelper::convertPostToString('decimals', '2'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"thousands\" class=\"col-sm-2 col-form-label\">Use Thousands Separator</label>\n            <div class=\"col-sm-10\">\n                <input name=\"thousands\" type=\"checkbox\" <?php echo (isset($_POST['thousands'])) ? 'value=\"on\"' : ''; ?> <?php echo (isset($_POST['thousands'])) ? 'checked' : ''; ?>>\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"position\" class=\"col-sm-2 col-form-label\">Currency Position</label>\n            <div class=\"col-sm-10\">\n                <input name=\"position\" type=\"radio\" value=\"1\" <?php echo ((isset($_POST['position']) === false) || ($_POST['position'] === '1')) ? 'checked' : ''; ?>>Leading\n                <input name=\"position\" type=\"radio\" value=\"0\" <?php echo (isset($_POST['position']) && $_POST['position'] === '0') ? 'checked' : ''; ?>>Trailing\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <div class=\"col-sm-10\">\n                <input  class=\"btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Display Mask\"><br />\n            </div>\n        </div>\n    </form>\n\n<?php\n/**     If the user has submitted the form, then we need to use the wizard to build a mask and display the result */\nif (isset($_POST['submit'])) {\n    if (!is_numeric($_POST['number'])) {\n        $helper->log('The Sample Number Value must be numeric');\n    } elseif (!is_numeric($_POST['decimals']) || str_contains((string) $_POST['decimals'], '.') || (int) $_POST['decimals'] < 0) {\n        $helper->log('The Decimal Places value must be positive integer');\n    } elseif (!in_array($_POST['currency'], array_keys($currencies), true)) {\n        $helper->log('Unrecognized currency symbol');\n    } else {\n        try {\n            $wizard = new Wizard\\Accounting($_POST['currency'], (int) $_POST['decimals'], isset($_POST['thousands']), (bool) $_POST['position']);\n            $mask = $wizard->format();\n            $example = (string) NumberFormat::toFormattedString((float) $_POST['number'], $mask);\n            $helper->log('<hr /><b>Code:</b><br />');\n            $helper->log('use PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;');\n            $helper->log(\n                \"\\$wizard = new Wizard\\\\Accounting('{$_POST['currency']}', {$_POST['decimals']}, Wizard\\\\Number::\"\n                . (isset($_POST['thousands']) ? 'WITH_THOUSANDS_SEPARATOR' : 'WITHOUT_THOUSANDS_SEPARATOR')\n                . ', Wizard\\Currency::' . (((bool) $_POST['position']) ? 'LEADING_SYMBOL' : 'TRAILING_SYMBOL')\n                . ');'\n            );\n            $helper->log('$mask = $wizard->format();');\n            $helper->log('<br />echo (string) $mask;');\n            $helper->log('<hr /><b>Mask:</b><br />');\n            $helper->log($mask . '<br />');\n            $helper->log('<br /><b>Example:</b><br />');\n            $helper->log($example);\n        } catch (SpreadsheetException $e) {\n            $helper->log(\"Exception: {$e->getMessage()}\");\n        }\n    }\n}\n"
  },
  {
    "path": "samples/Wizards/NumberFormat/Currency.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\CurrencyNegative;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\nrequire __DIR__ . '/../Header.php';\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n\n$negatives = [\n    CurrencyNegative::minus,\n    CurrencyNegative::redMinus,\n    CurrencyNegative::parentheses,\n    CurrencyNegative::redParentheses,\n];\n$negativesString = [\n    'CurrencyNegative::minus',\n    'CurrencyNegative::redMinus',\n    'CurrencyNegative::parentheses',\n    'CurrencyNegative::redParentheses',\n];\n\n$currencies = [\n    '$' => 'US Dollars ($)',\n    '€' => 'Euro (€)',\n    '¥' => 'Japanese Yen (¥)',\n    '£' => 'Pound Sterling (£)',\n    '₹' => 'Rupee (₹)',\n    '₽' => 'Rouble (₽)',\n];\n\n$postNegative = StringHelper::convertPostToString('negative');\nif (!in_array($postNegative, ['0', '1', '2', '3'], true)) {\n    $postNegative = '0';\n}\n$postNegative = (int) $postNegative;\n?>\n    <form action=\"Currency.php\" method=\"POST\">\n        <div class=\"mb-3 row\">\n            <label for=\"number\" class=\"col-sm-2 col-form-label\">Sample Number Value</label>\n            <div class=\"col-sm-10\">\n                <input name=\"number\" type=\"text\" size=\"8\" value=\"<?php echo StringHelper::convertPostToString('number', '1234.5678'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <hr />\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"currency\" class=\"col-sm-2 col-form-label\">Currency</label>\n            <div class=\"col-sm-10\">\n                <select name=\"currency\" class=\"form-select\">\n                    <?php foreach ($currencies as $currencySymbol => $currencyName) {\n                        echo \"<option value=\\\"{$currencySymbol}\\\" \" . ((isset($_POST['currency']) && $_POST['currency'] === $currencySymbol) ? 'selected' : '') . \">{$currencyName}</option>\", PHP_EOL;\n                    } ?>\n                </select>\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"decimals\" class=\"col-sm-2 col-form-label\">Decimal Places</label>\n            <div class=\"col-sm-10\">\n                <input name=\"decimals\" type=\"number\" size=\"2\" min=\"0\" max=\"14\" value=\"<?php echo StringHelper::convertPostToString('decimals', '2'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"thousands\" class=\"col-sm-2 col-form-label\">Use Thousands Separator</label>\n            <div class=\"col-sm-10\">\n                <input name=\"thousands\" type=\"checkbox\" <?php echo (isset($_POST['thousands'])) ? 'value=\"on\"' : ''; ?> <?php echo (isset($_POST['thousands'])) ? 'checked' : ''; ?>>\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"position\" class=\"col-sm-2 col-form-label\">Currency Position</label>\n            <div class=\"col-sm-10\">\n                <input name=\"position\" type=\"radio\" value=\"1\" <?php echo ((isset($_POST['position']) === false) || ($_POST['position'] === '1')) ? 'checked' : ''; ?>>Leading\n                <input name=\"position\" type=\"radio\" value=\"0\" <?php echo (isset($_POST['position']) && $_POST['position'] === '0') ? 'checked' : ''; ?>>Trailing\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"negative\" class=\"col-sm-2 col-form-label\">Negative Numbers</label>\n            <div class=\"col-sm-10\">\n                <input name=\"negative\" type=\"radio\" value=\"0\"  <?php echo ($postNegative === 0) ? 'checked' : ''; ?>>Minus Sign\n                <input name=\"negative\" type=\"radio\" value=\"1\"  <?php echo ($postNegative === 1) ? 'checked' : ''; ?>>Red Minus Sign\n                <input name=\"negative\" type=\"radio\" value=\"2\"  <?php echo ($postNegative === 2) ? 'checked' : ''; ?>>Parentheses\n                <input name=\"negative\" type=\"radio\" value=\"3\"  <?php echo ($postNegative === 3) ? 'checked' : ''; ?>>Red Parentheses\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <div class=\"col-sm-10\">\n                <input  class=\"btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Display Mask\"><br />\n            </div>\n        </div>\n    </form>\n\n<?php\n/**     If the user has submitted the form, then we need to use the wizard to build a mask and display the result */\nif (isset($_POST['submit'])) {\n    if (!is_numeric($_POST['number'])) {\n        $helper->log('The Sample Number Value must be numeric');\n    } elseif (!is_numeric($_POST['decimals']) || str_contains((string) $_POST['decimals'], '.') || (int) $_POST['decimals'] < 0) {\n        $helper->log('The Decimal Places value must be positive integer');\n    } elseif (!in_array($_POST['currency'], array_keys($currencies), true)) {\n        $helper->log('Unrecognized currency symbol');\n    } else {\n        try {\n            $negative = $negatives[$postNegative];\n            $wizard = new Wizard\\Currency($_POST['currency'], (int) $_POST['decimals'], isset($_POST['thousands']), (bool) $_POST['position']);\n            $wizard->setNegative($negative);\n            $mask = $wizard->format();\n            $example = (string) NumberFormat::toFormattedString((float) $_POST['number'], $mask, [HtmlWriter::class, 'formatColorStatic']);\n            $helper->log('<hr /><b>Code:</b><br />');\n            $helper->log('use PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;');\n            $helper->log('use PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\CurrencyNegative;');\n            $helper->log(\n                \"\\$wizard = new  Wizard\\\\Currency('{$_POST['currency']}', {$_POST['decimals']}, Wizard\\\\Number::\"\n                . (isset($_POST['thousands']) ? 'WITH_THOUSANDS_SEPARATOR' : 'WITHOUT_THOUSANDS_SEPARATOR')\n                . ', Wizard\\Currency::' . (((bool) $_POST['position']) ? 'LEADING_SYMBOL' : 'TRAILING_SYMBOL')\n                . ');'\n            );\n            $helper->log('$wizard->setNegative(' . $negativesString[$postNegative] . ');');\n            $helper->log('$mask = $wizard->format();');\n            $helper->log('<br />echo (string) $mask;');\n            $helper->log('<hr /><b>Mask:</b><br />');\n            $helper->log($mask . '<br />');\n            $helper->log('<br /><b>Example:</b><br />');\n            $helper->log($example);\n        } catch (SpreadsheetException $e) {\n            $helper->log(\"Exception: {$e->getMessage()}\");\n        }\n    }\n}\n"
  },
  {
    "path": "samples/Wizards/NumberFormat/Number.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nrequire __DIR__ . '/../Header.php';\n/** @var Sample $helper */\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n?>\n    <form action=\"Number.php\" method=\"POST\">\n        <div class=\"mb-3 row\">\n            <label for=\"number\" class=\"col-sm-2 col-form-label\">Sample Number Value</label>\n            <div class=\"col-sm-10\">\n                <input name=\"number\" type=\"text\" size=\"8\" value=\"<?php echo StringHelper::convertPostToString('number', '1234.5678'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <hr />\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"decimals\" class=\"col-sm-2 col-form-label\">Decimal Places</label>\n            <div class=\"col-sm-10\">\n                <input name=\"decimals\" type=\"number\" size=\"2\" min=\"0\" max=\"14\" value=\"<?php echo StringHelper::convertPostToString('decimals', '2'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"thousands\" class=\"col-sm-2 col-form-label\">Use Thousands Separator</label>\n            <div class=\"col-sm-10\">\n                <input name=\"thousands\" type=\"checkbox\" <?php echo (isset($_POST['thousands'])) ? 'value=\"on\"' : ''; ?> <?php echo (isset($_POST['thousands'])) ? 'checked' : ''; ?>>\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <div class=\"col-sm-10\">\n                <input  class=\"btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Display Mask\"><br />\n            </div>\n        </div>\n    </form>\n\n<?php\n/**     If the user has submitted the form, then we need to use the wizard to build a mask and display the result */\nif (isset($_POST['submit'])) {\n    if (!is_numeric($_POST['number'])) {\n        $helper->log('The Sample Number Value must be numeric');\n    } elseif (!is_numeric($_POST['decimals']) || str_contains((string) $_POST['decimals'], '.') || (int) $_POST['decimals'] < 0) {\n        $helper->log('The Decimal Places value must be positive integer');\n    } else {\n        try {\n            $wizard = new Wizard\\Number((int) $_POST['decimals'], isset($_POST['thousands']));\n            $mask = $wizard->format();\n            $example = NumberFormat::toFormattedString((float) $_POST['number'], $mask);\n            $helper->log('<hr /><b>Code:</b><br />');\n            $helper->log('use PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;');\n            $helper->log(\n                \"\\$mask = Wizard\\\\Number({$_POST['decimals']}, Wizard\\\\Number::\"\n                . (isset($_POST['thousands']) ? 'WITH_THOUSANDS_SEPARATOR' : 'WITHOUT_THOUSANDS_SEPARATOR')\n                . ');<br />'\n            );\n            $helper->log('echo (string) $mask;');\n            $helper->log('<hr /><b>Mask:</b>');\n            $helper->log($mask);\n            $helper->log('<b>Example:</b>');\n            $helper->log($example);\n        } catch (SpreadsheetException $e) {\n            $helper->log(\"Exception: {$e->getMessage()}\");\n        }\n    }\n}\n"
  },
  {
    "path": "samples/Wizards/NumberFormat/Percentage.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nrequire __DIR__ . '/../Header.php';\n/** @var Sample $helper */\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n?>\n    <form action=\"Percentage.php\" method=\"POST\">\n        <div class=\"mb-3 row\">\n            <label for=\"number\" class=\"col-sm-2 col-form-label\">Sample Number Value</label>\n            <div class=\"col-sm-10\">\n                <input name=\"number\" type=\"text\" size=\"8\" value=\"<?php echo StringHelper::convertPostToString('number', '1234.5678'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <hr />\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"decimals\" class=\"col-sm-2 col-form-label\">Decimal Places</label>\n            <div class=\"col-sm-10\">\n                <input name=\"decimals\" type=\"number\" size=\"2\" min=\"0\" max=\"14\" value=\"<?php echo StringHelper::convertPostToString('decimals', '2'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <div class=\"col-sm-10\">\n                <input  class=\"btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Display Mask\"><br />\n            </div>\n        </div>\n    </form>\n\n<?php\n/**     If the user has submitted the form, then we need to use the wizard to build a mask and display the result */\nif (isset($_POST['submit'])) {\n    if (!is_numeric($_POST['number'])) {\n        $helper->log('The Sample Number Value must be numeric');\n    } elseif (!is_numeric($_POST['decimals']) || str_contains((string) $_POST['decimals'], '.') || (int) $_POST['decimals'] < 0) {\n        $helper->log('The Decimal Places value must be positive integer');\n    } else {\n        try {\n            $wizard = new Wizard\\Percentage((int) $_POST['decimals']);\n            $mask = $wizard->format();\n            $example = (string) NumberFormat::toFormattedString((float) $_POST['number'], $mask);\n            $helper->log('<hr /><b>Code:</b><br />');\n            $helper->log('use PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;');\n            $helper->log(\"\\$mask = Wizard\\\\Percentage({$_POST['decimals']});<br />\");\n            $helper->log('echo (string) $mask;');\n            $helper->log('<hr /><b>Mask:</b><br />');\n            $helper->log($mask . '<br />');\n            $helper->log('<br /><b>Example:</b><br />');\n            $helper->log($example);\n        } catch (SpreadsheetException $e) {\n            $helper->log(\"Exception: {$e->getMessage()}\");\n        }\n    }\n}\n"
  },
  {
    "path": "samples/Wizards/NumberFormat/Scientific.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nrequire __DIR__ . '/../Header.php';\n/** @var Sample $helper */\n$helper = new Sample();\nif ($helper->isCli()) {\n    $helper->log('This example should only be run from a Web Browser' . PHP_EOL);\n\n    return;\n}\n?>\n    <form action=\"Scientific.php\" method=\"POST\">\n        <div class=\"mb-3 row\">\n            <label for=\"number\" class=\"col-sm-2 col-form-label\">Sample Number Value</label>\n            <div class=\"col-sm-10\">\n                <input name=\"number\" type=\"text\" size=\"8\" value=\"<?php echo StringHelper::convertPostToString('number', '1234.5678'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <hr />\n        </div>\n        <div class=\"mb-3 row\">\n            <label for=\"decimals\" class=\"col-sm-2 col-form-label\">Decimal Places</label>\n            <div class=\"col-sm-10\">\n                <input name=\"decimals\" type=\"number\" size=\"2\" min=\"0\" max=\"14\" value=\"<?php echo StringHelper::convertPostToString('decimals', '2'); ?>\">\n            </div>\n        </div>\n        <div class=\"mb-3 row\">\n            <div class=\"col-sm-10\">\n                <input  class=\"btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Display Mask\"><br />\n            </div>\n        </div>\n    </form>\n\n<?php\n/**     If the user has submitted the form, then we need to use the wizard to build a mask and display the result */\nif (isset($_POST['submit'])) {\n    if (!is_numeric($_POST['number'])) {\n        $helper->log('The Sample Number Value must be numeric');\n    } elseif (!is_numeric($_POST['decimals']) || str_contains((string) $_POST['decimals'], '.') || (int) $_POST['decimals'] < 0) {\n        $helper->log('The Decimal Places value must be positive integer');\n    } else {\n        try {\n            $wizard = new Wizard\\Scientific((int) $_POST['decimals']);\n            $mask = $wizard->format();\n            $example = (string) NumberFormat::toFormattedString((float) $_POST['number'], $mask);\n            $helper->log('<hr /><b>Code:</b><br />');\n            $helper->log('use PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;');\n            $helper->log(\"\\$mask = Wizard\\\\Scientific({$_POST['decimals']});<br />\");\n            $helper->log('echo (string) $mask;');\n            $helper->log('<hr /><b>Mask:</b><br />');\n            $helper->log($mask . '<br />');\n            $helper->log('<br /><b>Example:</b><br />');\n            $helper->log($example);\n        } catch (SpreadsheetException $e) {\n            $helper->log(\"Exception: {$e->getMessage()}\");\n        }\n    }\n}\n"
  },
  {
    "path": "samples/bootstrap/css/phpspreadsheet.css",
    "content": "body {\n    padding-top: 20px;\n    padding-bottom: 20px;\n}\n.navbar {\n    margin-bottom: 20px;\n}\n.navbar + h1 {\n    margin-top: 70px;\n}\n.passed {\n    color: #339900;\n}\n.failed {\n    color: #ff0000;\n}"
  },
  {
    "path": "samples/download.php",
    "content": "<?php\n\nrequire_once __DIR__ . '/Bootstrap.php';\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Downloader;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\n$filename = basename(StringHelper::convertToString($_GET['name'] ?? ''));\n$filetype = StringHelper::convertToString($_GET['type'] ?? '');\n\ntry {\n    $downloader = new Downloader((new Sample())->getTemporaryFolder(), $filename, $filetype);\n    $downloader->download();\n} catch (Exception $e) {\n    exit($e->getMessage());\n}\n"
  },
  {
    "path": "samples/index.php",
    "content": "<?php\n\nrequire_once __DIR__ . '/Header.php';\n\n$requirements = [\n    'PHP 8.1' => version_compare(PHP_VERSION, '8.1', '>='),\n    'PHP extension XML' => extension_loaded('xml'),\n    'PHP extension xmlwriter' => extension_loaded('xmlwriter'),\n    'PHP extension mbstring' => extension_loaded('mbstring'),\n    'PHP extension ZipArchive' => extension_loaded('zip'),\n    'PHP extension GD (optional)' => extension_loaded('gd'),\n    'PHP extension dom (optional)' => extension_loaded('dom'),\n];\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\nif (!$helper->isCli()) {\n    ?>\n    <div class=\"jumbotron\">\n        <p>Welcome to PHPSpreadsheet, a library written in pure PHP and providing a set of classes that allow you to read from and to write to different spreadsheet file formats, like Excel and LibreOffice Calc.</p>\n        <p>&nbsp;</p>\n        <p>\n            <a class=\"btn btn-lg btn-primary\" href=\"https://github.com/PHPOffice/PHPSpreadsheet\" role=\"button\"><i class=\"fa fa-github fa-lg\" title=\"GitHub\"></i>  Fork us on Github!</a>\n            <a class=\"btn btn-lg btn-primary\" href=\"https://phpspreadsheet.readthedocs.io\" role=\"button\"><i class=\"fa fa-book fa-lg\" title=\"Docs\"></i>  Read the Docs</a>\n        </p>\n    </div>\n    <?php\n    echo '<h3>Requirement check</h3>';\n    echo '<ul>';\n    foreach ($requirements as $label => $result) {\n        $status = $result ? 'passed' : 'failed';\n        echo \"<li>{$label} ... <span class='{$status}'>{$status}</span></li>\";\n    }\n    echo '</ul>';\n} else {\n    echo 'Requirement check:' . PHP_EOL;\n    foreach ($requirements as $label => $result) {\n        $status = $result ? '32m passed' : '31m failed';\n        echo \"{$label} ... \\033[{$status}\\033[0m\" . PHP_EOL;\n    }\n}\n"
  },
  {
    "path": "samples/templates/46readHtml.html",
    "content": "\n<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>Competency List</title>\n</head>\n<body>\n<table class=\"w3-table-all notranslate\">\n    <tr>\n    <th style=\"background-color: #0000FF;color:#FFFFFF\">Color Name</th>\n    <th style=\"background-color: #FF0000\">HEX</th>\n    <th style=\"background-color: #008000\">Color</th>\n    </tr>\n\n    <tr>\n    <td style=\"color:#000000\">Black</td>\n    <td>#000000</td>\n    <td style=\"background-color:#000000\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#0000FF\">Blue</td>\n    <td>#0000FF</td>\n    <td style=\"background-color:#0000FF\">&nbsp;</td>\n    </tr>\n\n\n    <tr>\n    <td style=\"color:#008000\">Green</td>\n    <td>#008000</td>\n    <td style=\"background-color:#008000\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#00FFFF\">Cyan</td>\n    <td>#00FFFF</td>\n    <td style=\"background-color:#00FFFF\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#800080\">Purple</td>\n    <td>#800080</td>\n    <td style=\"background-color:#800080\">&nbsp;</td>\n    </tr>\n\n\n    <tr>\n    <td style=\"color:#800080\">Grey</td>\n    <td>#808080</td>\n    <td style=\"background-color:#808080\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#87CEEB\">SkyBlue</td>\n    <td>#87CEEB</td>\n    <td style=\"background-color:#87CEEB\">&nbsp;</td>\n    </tr>\n\n\n    <tr>\n    <td style=\"color:#A52A2A\">Brown</td>\n    <td>#A52A2A</td>\n    <td style=\"background-color:#A52A2A\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#C0C0C0;background-color: #000000\">Silver</td>\n    <td>#C0C0C0</td>\n    <td style=\"background-color:#C0C0C0\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#D2691E\">Chocolate</td>\n    <td>#D2691E</td>\n    <td style=\"background-color:#D2691E\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#D2B48C;background-color: #000000\">Tan</td>\n    <td>#D2B48C</td>\n    <td style=\"background-color:#D2B48C\">&nbsp;</td>\n    </tr>\n\n\n    <tr>\n    <td style=\"color:#EE82EE;background-color: #000000\">Violet</td>\n    <td>#EE82EE</td>\n    <td style=\"background-color:#EE82EE\">&nbsp;</td>\n    </tr>\n\n\n    <tr>\n    <td style=\"color:#FF0000;background-color: #000000\">Red</td>\n    <td>#FF0000</td>\n    <td style=\"background-color:#FF0000\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#FFC0CB;background-color: #000000\">Pink</td>\n    <td>#FFC0CB</td>\n    <td style=\"background-color:#FFC0CB\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#FFD700;background-color: #000000\">Gold</td>\n    <td>#FFD700</td>\n    <td style=\"background-color:#FFD700\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#FFFF00;background-color: #000000\">Yellow</td>\n    <td>#FFFF00</td>\n    <td style=\"background-color:#FFFF00\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#FFFFE0;background-color: #000000\">LightYellow</td>\n    <td>#FFFFE0</td>\n    <td style=\"background-color:#FFFFE0\">&nbsp;</td>\n    </tr>\n\n    <tr>\n    <td style=\"color:#FFFFFF;background-color: #000000\">White</td>\n    <td>#FFFFFF</td>\n    <td style=\"background-color:#FFFFFF\">&nbsp;</td>\n    </tr>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "samples/templates/Excel2003XMLTest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><?mso-application progid=\"Excel.Sheet\"?><Workbook xmlns:c=\"urn:schemas-microsoft-com:office:component:spreadsheet\" xmlns:html=\"http://www.w3.org/TR/REC-html40\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:x2=\"http://schemas.microsoft.com/office/excel/2003/xml\" xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\">\n    <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n        <Colors>\n            <Color>\n                <Index>3</Index>\n                <RGB>#000000</RGB>\n            </Color>\n            <Color>\n                <Index>4</Index>\n                <RGB>#0000ff</RGB>\n            </Color>\n            <Color>\n                <Index>5</Index>\n                <RGB>#008000</RGB>\n            </Color>\n            <Color>\n                <Index>6</Index>\n                <RGB>#00ccff</RGB>\n            </Color>\n            <Color>\n                <Index>7</Index>\n                <RGB>#800080</RGB>\n            </Color>\n            <Color>\n                <Index>8</Index>\n                <RGB>#993366</RGB>\n            </Color>\n            <Color>\n                <Index>9</Index>\n                <RGB>#c0c0c0</RGB>\n            </Color>\n            <Color>\n                <Index>10</Index>\n                <RGB>#c47512</RGB>\n            </Color>\n            <Color>\n                <Index>11</Index>\n                <RGB>#ccffcc</RGB>\n            </Color>\n            <Color>\n                <Index>12</Index>\n                <RGB>#ddbc7d</RGB>\n            </Color>\n            <Color>\n                <Index>13</Index>\n                <RGB>#ff0000</RGB>\n            </Color>\n            <Color>\n                <Index>14</Index>\n                <RGB>#ff00ff</RGB>\n            </Color>\n            <Color>\n                <Index>15</Index>\n                <RGB>#ff6600</RGB>\n            </Color>\n            <Color>\n                <Index>16</Index>\n                <RGB>#ff9900</RGB>\n            </Color>\n            <Color>\n                <Index>17</Index>\n                <RGB>#ff99cc</RGB>\n            </Color>\n            <Color>\n                <Index>18</Index>\n                <RGB>#ffff00</RGB>\n            </Color>\n        </Colors>\n    </OfficeDocumentSettings>\n    <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n        <WindowHeight>9000</WindowHeight>\n        <WindowWidth>13860</WindowWidth>\n        <WindowTopX>240</WindowTopX>\n        <WindowTopY>75</WindowTopY>\n        <ProtectStructure>False</ProtectStructure>\n        <ProtectWindows>False</ProtectWindows>\n    </ExcelWorkbook>\n    <Styles>\n        <Style ss:ID=\"Default\" ss:Name=\"Default\"/>\n        <Style ss:ID=\"Result\" ss:Name=\"Result\">\n            <Font ss:Bold=\"1\" ss:Italic=\"1\" ss:Underline=\"Single\"/>\n        </Style>\n        <Style ss:ID=\"Result2\" ss:Name=\"Result2\">\n            <Font ss:Bold=\"1\" ss:Italic=\"1\" ss:Underline=\"Single\"/>\n            <NumberFormat ss:Format=\"Currency\"/>\n        </Style>\n        <Style ss:ID=\"Heading\" ss:Name=\"Heading\">\n            <Font ss:Bold=\"1\" ss:Italic=\"1\" ss:Size=\"16\"/>\n        </Style>\n        <Style ss:ID=\"Heading1\" ss:Name=\"Heading1\">\n            <Font ss:Bold=\"1\" ss:Italic=\"1\" ss:Size=\"16\"/>\n        </Style>\n        <Style ss:ID=\"Gnumeric-default\" ss:Name=\"Gnumeric-default\">\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\"/>\n        </Style>\n        <Style ss:ID=\"co1\"/>\n        <Style ss:ID=\"co2\"/>\n        <Style ss:ID=\"co3\"/>\n        <Style ss:ID=\"co4\"/>\n        <Style ss:ID=\"co5\"/>\n        <Style ss:ID=\"co6\"/>\n        <Style ss:ID=\"co7\"/>\n        <Style ss:ID=\"co8\"/>\n        <Style ss:ID=\"co9\"/>\n        <Style ss:ID=\"ta1\"/>\n        <Style ss:ID=\"ce1\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Bold=\"1\" ss:Color=\"#ff0000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce2\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Bold=\"1\" ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Italic=\"1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce3\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Underline=\"Single\"/>\n        </Style>\n        <Style ss:ID=\"ce4\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce5\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce6\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Underline=\"Single\"/>\n        </Style>\n        <Style ss:ID=\"ce7\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Underline=\"Double\"/>\n        </Style>\n        <Style ss:ID=\"ce8\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\" ss:StrikeThrough=\"1\"/>\n        </Style>\n        <Style ss:ID=\"ce9\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"Short Date\"/>\n        </Style>\n        <Style ss:ID=\"ce10\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"Fixed\"/>\n        </Style>\n        <Style ss:ID=\"ce11\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"Short Time\"/>\n        </Style>\n        <Style ss:ID=\"ce12\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"General Date\"/>\n        </Style>\n        <Style ss:ID=\"ce13\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\"/>\n        </Style>\n        <Style ss:ID=\"ce14\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\" ss:Underline=\"Single\"/>\n        </Style>\n        <Style ss:ID=\"ce15\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\" ss:Underline=\"Double\"/>\n        </Style>\n        <Style ss:ID=\"ce16\">\n            <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\"/>\n        </Style>\n        <Style ss:ID=\"ce17\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#0000ff\" ss:FontName=\"Sans\" ss:Size=\"10\" ss:Underline=\"Single\"/>\n        </Style>\n        <Style ss:ID=\"ce18\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\" ss:Color=\"#00b050\"/>\n                <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\" ss:Color=\"#0070c0\"/>\n                <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\" ss:Color=\"#ffff00\"/>\n                <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\" ss:Color=\"#ff0000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce19\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce20\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce21\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce22\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce23\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:Rotate=\"90\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\"/>\n        </Style>\n        <Style ss:ID=\"ce24\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"General\"/>\n        </Style>\n        <Style ss:ID=\"ce25\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"General\"/>\n        </Style>\n        <Style ss:ID=\"ce26\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Bold=\"1\" ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce27\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Italic=\"1\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce28\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:Rotate=\"45\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\"/>\n        </Style>\n        <Style ss:ID=\"ce29\">\n            <Alignment ss:Vertical=\"Top\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce30\">\n            <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce31\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:Rotate=\"-90\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\"/>\n        </Style>\n        <Style ss:ID=\"ce32\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce33\">\n            <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce34\">\n            <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce35\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:Rotate=\"-45\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Sans\" ss:Size=\"10\"/>\n        </Style>\n        <Style ss:ID=\"ce36\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce37\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#ff0000\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce38\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#ff9900\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce39\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#ffff00\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce40\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#008000\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce41\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#0000ff\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce42\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#993366\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce43\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#ff99cc\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce44\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#ddbc7d\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce45\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#00ccff\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce46\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#ff0000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce47\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#ff6600\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce48\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#ffff00\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce49\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#008000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce50\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#0000ff\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce51\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#800080\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce52\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#ff00ff\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce53\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#c47512\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce54\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#ccffcc\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n            <Interior ss:Color=\"#ff0000\" ss:Pattern=\"Solid\"/>\n        </Style>\n        <Style ss:ID=\"ce55\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce56\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce57\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce58\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce59\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce60\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce61\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce62\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce63\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce64\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce65\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders>\n                <Border ss:Position=\"Bottom\" ss:LineStyle=\"Double\" ss:Weight=\"3\" ss:Color=\"#000000\"/>\n            </Borders>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n        <Style ss:ID=\"ce66\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Bottom\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Bold=\"1\" ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"12\"/>\n        </Style>\n        <Style ss:ID=\"ce67\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"General\"/>\n        </Style>\n        <Style ss:ID=\"ce68\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"Medium Date\"/>\n        </Style>\n        <Style ss:ID=\"ce69\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"Medium Time\"/>\n        </Style>\n        <Style ss:ID=\"gr1\"/>\n        <Style ss:ID=\"gr2\"/>\n        <Style ss:ID=\"ta_extref\"/>\n        <Style ss:ID=\"P1\">\n            <Font ss:FontName=\"Sans\" ss:Size=\"10\"/>\n        </Style>\n        <Style ss:ID=\"T1\"/>\n    </Styles>\n    <ss:Worksheet ss:Name=\"Sample Data\">\n        <Table ss:StyleID=\"ta1\">\n            <Column ss:Width=\"96.4913\"/>\n            <Column ss:Span=\"1\" ss:Width=\"48.3874\"/>\n            <Column ss:Index=\"4\" ss:Width=\"35.8866\"/>\n            <Column ss:Span=\"6\" ss:Width=\"48.3874\"/>\n            <Column ss:Index=\"12\" ss:Width=\"50.2583\"/>\n            <Column ss:Span=\"1011\" ss:Width=\"48.3874\"/>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce1\">\n                    <ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\" ss:Type=\"String\">Test String 1</ss:Data>\n                    <Comment>\n                        <ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\">\n                            <Font html:Face=\"Sans\" html:Size=\"10\">Test for a simple colour-formatted string</Font>\n                        </ss:Data>\n                    </Comment>\n                </Cell>\n                <Cell ss:StyleID=\"ce4\">\n                    <Data ss:Type=\"Number\">1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce4\">\n                    <Data ss:Type=\"Number\">5</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce2\">\n                    <Data ss:Type=\"String\">A</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce26\">\n                    <Data ss:Type=\"String\">E</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B1]+[.C1]\">\n                    <Data ss:Type=\"Number\">6</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.E1]&amp;[.F1]\">\n                    <Data ss:Type=\"String\">AE</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:HRef=\"https://phpspreadsheet.readthedocs.io\">\n                    <Data ss:Type=\"String\">PhpSpreadsheet</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce2\">\n                    <Data ss:Type=\"String\">Test - String 2</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">2</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce4\">\n                    <Data ss:Type=\"Number\">6</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">B</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">F</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B2]+[.C2]\">\n                    <Data ss:Type=\"Number\">8</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.E2]&amp;[.F2]\">\n                    <Data ss:Type=\"String\">BF</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce55\">\n                    <Data ss:Type=\"String\">Dot</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce3\">\n                    <Data ss:Type=\"String\">Test #3</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce4\">\n                    <Data ss:Type=\"Number\">3</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce4\">\n                    <Data ss:Type=\"Number\">7</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce26\">\n                    <Data ss:Type=\"String\">C</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce2\">\n                    <Data ss:Type=\"String\">G</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B3]+[.C3]\">\n                    <Data ss:Type=\"Number\">10</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.E3]&amp;[.F3]\">\n                    <Data ss:Type=\"String\">CG</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce37\">\n                    <Data ss:Type=\"String\">Red</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce46\">\n                    <Data ss:Type=\"String\">Red</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce56\">\n                    <Data ss:Type=\"String\">Dash</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce4\">\n                    <Data ss:Type=\"String\">Test with (\") in string</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">4</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce4\">\n                    <Data ss:Type=\"Number\">8</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce27\">\n                    <Data ss:Type=\"String\">D</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">H</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B4]+[.C4]\">\n                    <Data ss:Type=\"Number\">12</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.E4]&amp;[.F4]\">\n                    <Data ss:Type=\"String\">DH</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce38\">\n                    <Data ss:Type=\"String\">Orange</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce47\">\n                    <Data ss:Type=\"String\">Orange</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce57\">\n                    <Data ss:Type=\"String\">Dash/Dot/Dot</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=SUM([.B1:.B4])\">\n                    <Data ss:Type=\"Number\">10</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=SUM([.C1:.C4])\">\n                    <Data ss:Type=\"Number\">26</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=SUM([.B1:.C4])\">\n                    <Data ss:Type=\"Number\">36</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce39\">\n                    <Data ss:Type=\"String\">Yellow</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce48\">\n                    <Data ss:Type=\"String\">Yellow</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce58\">\n                    <Data ss:Type=\"String\">Dash/Dot</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce6\">\n                    <Data ss:Type=\"String\">Test #3</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">1.23</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=TRUE()\">\n                    <Data ss:Type=\"Boolean\">1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce24\">\n                    <Data ss:Type=\"Boolean\">1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce40\">\n                    <Data ss:Type=\"String\">Green</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce49\">\n                    <Data ss:Type=\"String\">Green</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce56\">\n                    <Data ss:Type=\"String\">Thin Line</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce7\">\n                    <Data ss:Type=\"String\">Test #3</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">2.34</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=FALSE()\">\n                    <Data ss:Type=\"Boolean\">0</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce25\">\n                    <Data ss:Type=\"Boolean\">0</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=SUM(marksrange)\">\n                    <Data ss:Type=\"Number\">0</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce41\">\n                    <Data ss:Type=\"String\">Blue</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce50\">\n                    <Data ss:Type=\"String\">Blue</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce59\">\n                    <Data ss:Type=\"String\">Thick Dash/Dot/Dot</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:Index=\"8\" ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce8\">\n                    <Data ss:Type=\"String\">Test #3</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">3.45</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce42\">\n                    <Data ss:Type=\"String\">Purple</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce51\">\n                    <Data ss:Type=\"String\">Purple</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce60\">\n                    <Data ss:Type=\"String\">Variant Thick Dash/Dot/Dot</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"13.4929\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce43\">\n                    <Data ss:Type=\"String\">Pink</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce52\">\n                    <Data ss:Type=\"String\">Pink</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce61\">\n                    <Data ss:Type=\"String\">Thick Dash/Dot</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce9\">\n                    <Data ss:Type=\"DateTime\">1960-12-19T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce19\">\n                    <Data ss:Type=\"String\">TOP</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">0</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce44\">\n                    <Data ss:Type=\"String\">Brown</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce53\">\n                    <Data ss:Type=\"String\">Brown</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce62\">\n                    <Data ss:Type=\"String\">Thick Dash</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce10\">\n                    <Data ss:Type=\"Number\">1.5</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=12/0\">\n                    <Data ss:Type=\"Number\">0</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce63\">\n                    <Data ss:Type=\"String\">Thick Line</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"13.4929\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce20\">\n                    <Data ss:Type=\"String\">BOTTOM</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce64\">\n                    <Data ss:Type=\"String\">Extra Thick Line</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce11\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T02:30:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\" ss:Type=\"String\">Мойва сушеная</ss:Data>\n                    <Comment>\n                        <ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\">\n                            <Font html:Face=\"Sans\" html:Size=\"10\">Tests for UTF-8 content</Font>\n                        </ss:Data>\n                    </Comment>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce65\">\n                    <Data ss:Type=\"String\">Double Line</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce21\">\n                    <Data ss:Type=\"String\">LEFT</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">Ärendetext</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce12\">\n                    <Data ss:Type=\"DateTime\">1960-12-19T01:30:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">Højde</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:Index=\"16\" ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce22\">\n                    <Data ss:Type=\"String\">RIGHT</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"13.4929\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:Height=\"41.7543\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:MergeAcross=\"1\" ss:MergeDown=\"1\" ss:StyleID=\"ce18\">\n                    <Data ss:Type=\"String\">BOX</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce29\">\n                    <Data ss:Type=\"String\">Test Column 1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce30\"/>\n                <Cell ss:StyleID=\"ce33\"/>\n                <Cell ss:StyleID=\"ce36\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:Height=\"41.7543\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce30\"/>\n                <Cell ss:StyleID=\"ce32\">\n                    <Data ss:Type=\"String\">Test Column 2</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce30\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce45\">\n                    <Data ss:Type=\"String\">Patterned</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce54\">\n                    <Data ss:Type=\"String\">Patterned 2</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:Height=\"41.7543\">\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce30\"/>\n                <Cell ss:StyleID=\"ce30\"/>\n                <Cell ss:StyleID=\"ce34\">\n                    <Data ss:Type=\"String\">Test Column 3</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">Underline None</Data>\n                </Cell>\n                <Cell ss:Index=\"3\" ss:MergeAcross=\"1\" ss:MergeDown=\"4\" ss:StyleID=\"ce23\">\n                    <Data ss:Type=\"String\">Rotate 90</Data>\n                </Cell>\n                <Cell ss:MergeAcross=\"1\" ss:MergeDown=\"4\" ss:StyleID=\"ce28\">\n                    <Data ss:Type=\"String\">Rotate 45</Data>\n                </Cell>\n                <Cell ss:MergeAcross=\"1\" ss:MergeDown=\"4\" ss:StyleID=\"ce31\">\n                    <Data ss:Type=\"String\">Rotate -90</Data>\n                </Cell>\n                <Cell ss:MergeAcross=\"1\" ss:MergeDown=\"4\" ss:StyleID=\"ce35\">\n                    <Data ss:Type=\"String\">Rotate -45</Data>\n                </Cell>\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:StyleID=\"ce14\">\n                    <Data ss:Type=\"String\">Underline 1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">Subscript</Data>\n                </Cell>\n                <Cell ss:Index=\"1016\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Index=\"24\" ss:Height=\"12.8409\">\n                <Cell ss:StyleID=\"ce15\">\n                    <Data ss:Type=\"String\">Underline 2</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">Superscript</Data>\n                </Cell>\n                <Cell ss:Index=\"1016\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:StyleID=\"ce14\">\n                    <Data ss:Type=\"String\">Underline 3</Data>\n                </Cell>\n                <Cell ss:Index=\"1016\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:StyleID=\"ce15\">\n                    <Data ss:Type=\"String\">Underline 4</Data>\n                </Cell>\n                <Cell ss:Index=\"1016\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"49.2378\">\n                <Cell ss:MergeAcross=\"2\" ss:StyleID=\"ce16\">\n                    <ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\" ss:Type=\"String\">I don't know if Gnumeric supports <B>\n                            <Font html:Face=\"Sans\" html:Color=\"#000000\" html:Size=\"10\">Rich Text</Font>\n                        </B> in the same way as <B>\n                            <Font html:Face=\"Sans\" html:Color=\"#000000\" html:Size=\"10\">Excel</Font>\n                        </B>, And this row should be autofit height with text wrap</ss:Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n                <Cell ss:StyleID=\"ce16\"/>\n            </Row>\n            <Row ss:Height=\"13.4079\">\n                <Cell ss:MergeAcross=\"2\" ss:HRef=\"https://www.example.com\" ss:StyleID=\"ce17\">\n                    <Data ss:Type=\"String\">PhpSpreadsheet</Data>\n                </Cell>\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Index=\"65536\" ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n        </Table>\n        <x:WorksheetOptions/>\n    </ss:Worksheet>\n    <ss:Worksheet ss:Name=\"Report Data\">\n        <Table ss:StyleID=\"ta1\">\n            <Column ss:Span=\"2\" ss:Width=\"56.2394\"/>\n            <Column ss:Index=\"4\" ss:Width=\"78.7465\"/>\n            <Column ss:Width=\"58.5071\"/>\n            <Column ss:Width=\"27.4961\"/>\n            <Column ss:Width=\"78.7465\"/>\n            <Column ss:Width=\"68.5984\"/>\n            <Column ss:Span=\"1015\" ss:Width=\"48.3874\"/>\n            <Column ss:Index=\"1025\"/>\n            <Column ss:Span=\"1\"/>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"31.4929\">\n                <Cell ss:StyleID=\"ce66\"/>\n                <Cell ss:StyleID=\"ce66\"/>\n                <Cell ss:StyleID=\"ce66\"/>\n                <Cell ss:StyleID=\"ce66\"/>\n                <Cell ss:StyleID=\"ce66\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce66\"/>\n                <Cell ss:StyleID=\"ce66\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"31.4929\">\n                <Cell ss:StyleID=\"ce66\">\n                    <Data ss:Type=\"String\">Heading 1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce66\">\n                    <Data ss:Type=\"String\">Heading 2</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce66\">\n                    <Data ss:Type=\"String\">Third Heading</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce66\">\n                    <Data ss:Type=\"String\">Date Heading</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce66\">\n                    <Data ss:Type=\"String\">Time Heading</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce66\">\n                    <Data ss:Type=\"String\">Adjusted Date</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce66\">\n                    <Data ss:Type=\"String\">Adjusted Number</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce13\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\"/>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">Adjusted Number</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">Third Heading</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">1.11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">1.11</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">2</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">4.44</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">2.22</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">3</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">9.99</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">3.33</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">4</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">17.76</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">4.44</Data>\n                </Cell>\n            </Row>\n            <Row ss:Index=\"8\">\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">5</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">27.75</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">5.55</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">6</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">39.96</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">6.66</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">7</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">54.39</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">7.77</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">8</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">71.04</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">8.88</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">9</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">89.91</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">9.99</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">10</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">111</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">11.1</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">134.31</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">12.21</Data>\n                </Cell>\n            </Row>\n            <Row>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">12</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">159.84</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">13.32</Data>\n                </Cell>\n            </Row>\n            <Row ss:Index=\"16\">\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"String\">13</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">1.11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce13\">\n                    <Data ss:Type=\"Number\">-1.11</Data>\n                </Cell>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">ABC</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">1.11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2001-01-01T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T01:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D3]-[.B3]\">\n                    <Data ss:Type=\"DateTime\">2000-12-31T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B3]*[.C3]\">\n                    <Data ss:Type=\"Number\">1.11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">A</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B3]&amp;[.J3]\">\n                    <Data ss:Type=\"String\">1A</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">BCD</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">2</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">2.22</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2002-02-02T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T02:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D4]-[.B4]\">\n                    <Data ss:Type=\"DateTime\">2002-01-31T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B4]*[.C4]\">\n                    <Data ss:Type=\"Number\">4.44</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">B</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B4]&amp;[.J4]\">\n                    <Data ss:Type=\"String\">2B</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">CDE</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">3</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">3.33</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2003-03-03T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T03:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D5]-[.B5]\">\n                    <Data ss:Type=\"DateTime\">2003-02-28T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B5]*[.C5]\">\n                    <Data ss:Type=\"Number\">9.99</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">C</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B5]&amp;[.J5]\">\n                    <Data ss:Type=\"String\">3C</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">DEF</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">4</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">4.44</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2004-04-03T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T04:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D6]-[.B6]\">\n                    <Data ss:Type=\"DateTime\">2004-03-30T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B6]*[.C6]\">\n                    <Data ss:Type=\"Number\">17.76</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">D</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B6]&amp;[.J6]\">\n                    <Data ss:Type=\"String\">4D</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">EFG</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">5</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">5.55</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2005-05-04T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T05:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D7]-[.B7]\">\n                    <Data ss:Type=\"DateTime\">2005-04-29T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B7]*[.C7]\">\n                    <Data ss:Type=\"Number\">27.75</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">E</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B7]&amp;[.J7]\">\n                    <Data ss:Type=\"String\">5E</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">FGH</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">6</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">6.66</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2006-06-05T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T06:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D8]-[.B8]\">\n                    <Data ss:Type=\"DateTime\">2006-05-30T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B8]*[.C8]\">\n                    <Data ss:Type=\"Number\">39.96</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">F</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B8]&amp;[.J8]\">\n                    <Data ss:Type=\"String\">6F</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">GHI</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">7</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">7.77</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2007-07-06T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T07:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D9]-[.B9]\">\n                    <Data ss:Type=\"DateTime\">2007-06-29T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B9]*[.C9]\">\n                    <Data ss:Type=\"Number\">54.39</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">G</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B9]&amp;[.J9]\">\n                    <Data ss:Type=\"String\">7G</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:Index=\"24\" ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">HIJ</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">8</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">8.88</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2008-08-07T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T08:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D10]-[.B10]\">\n                    <Data ss:Type=\"DateTime\">2008-07-30T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B10]*[.C10]\">\n                    <Data ss:Type=\"Number\">71.04</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">H</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B10]&amp;[.J10]\">\n                    <Data ss:Type=\"String\">8H</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">IJK</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">9</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">9.99</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2009-09-08T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T09:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D11]-[.B11]\">\n                    <Data ss:Type=\"DateTime\">2009-08-30T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B11]*[.C11]\">\n                    <Data ss:Type=\"Number\">89.91</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">I</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B11]&amp;[.J11]\">\n                    <Data ss:Type=\"String\">9I</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">JKL</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">10</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">11.1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2010-10-09T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T10:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D12]-[.B12]\">\n                    <Data ss:Type=\"DateTime\">2010-09-29T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B12]*[.C12]\">\n                    <Data ss:Type=\"Number\">111</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">J</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B12]&amp;[.J12]\">\n                    <Data ss:Type=\"String\">10J</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">KLM</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">12.21</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2011-11-11T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T11:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D13]-[.B13]\">\n                    <Data ss:Type=\"DateTime\">2011-10-31T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B13]*[.C13]\">\n                    <Data ss:Type=\"Number\">134.31</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">K</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B13]&amp;[.J13]\">\n                    <Data ss:Type=\"String\">11K</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">LMN</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">12</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">13.32</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">2012-12-12T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T288:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D14]-[.B14]\">\n                    <Data ss:Type=\"DateTime\">2012-11-30T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B14]*[.C14]\">\n                    <Data ss:Type=\"Number\">159.84</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">L</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B14]&amp;[.J14]\">\n                    <Data ss:Type=\"String\">12L</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">ZYX</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"Number\">-1</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\">\n                    <Data ss:Type=\"Number\">-1.11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce68\">\n                    <Data ss:Type=\"DateTime\">1999-12-01T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce69\">\n                    <Data ss:Type=\"DateTime\">1899-12-31T23:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce68\" ss:Formula=\"of:=[.D15]-[.B15]\">\n                    <Data ss:Type=\"DateTime\">1999-12-02T00:00:00.000</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce67\" ss:Formula=\"of:=[.B15]*[.C15]\">\n                    <Data ss:Type=\"Number\">1.11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\">\n                    <Data ss:Type=\"String\">M</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\" ss:Formula=\"of:=[.B15]&amp;[.J15]\">\n                    <Data ss:Type=\"String\">-1M</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n                <Cell ss:StyleID=\"ce5\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n            <Row ss:Index=\"65550\" ss:Height=\"12.8409\">\n                <Cell ss:Index=\"1024\" ss:StyleID=\"ce13\"/>\n            </Row>\n        </Table>\n        <x:WorksheetOptions/>\n    </ss:Worksheet>\n</Workbook>\n"
  },
  {
    "path": "samples/templates/Mpdf2.php",
    "content": "<?php\n\n/**\n * Override to MPDF class to allow setting config options.\n */\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Pdf;\n\nclass Mpdf2 extends Mpdf\n{\n    /**\n     * Gets the implementation of external PDF library that should be used.\n     * This member extends Mpdf in order to allow specification of\n     *     non-default configuration variables. In this case,\n     *     it allows inclusion of a font which would not normally\n     *     be used by Mpdf (which would instead use a default substitution).\n     * Other configuration options may be specified here.\n     *\n     * @param array<string, mixed> $config Configuration array\n     */\n    protected function createExternalWriterInstance($config): \\Mpdf\\Mpdf\n    {\n        /** @var string[][] */\n        $defaultConfig = (new \\Mpdf\\Config\\ConfigVariables())->getDefaults();\n        $fontDirs = $defaultConfig['fontDir'];\n        $newFontDirectory = __DIR__;\n        $config['fontDir'] = array_merge($fontDirs, [$newFontDirectory]);\n\n        /** @var string[][][] */\n        $defaultFontConfig = (new \\Mpdf\\Config\\FontVariables())->getDefaults();\n        // Note that Mpdf config uses lower-case fontdata\n        //    even though it uses camel-case fontDir.\n        $fontdata = $defaultFontConfig['fontdata'];\n        $fontFile = 'ShadowsIntoLight-Regular.ttf';\n        $config['fontdata'] = $fontdata + [ // lowercase letters only in font key\n            'shadowsintolight' => [\n                'R' => $fontFile,\n            ],\n        ];\n\n        return new \\Mpdf\\Mpdf($config);\n    }\n}\n"
  },
  {
    "path": "samples/templates/ShadowsIntoLight.OFL.txt",
    "content": "Copyright (c) 2010, Kimberly Geswein (kimberlygeswein.com)\r\n\r\nThis Font Software is licensed under the SIL Open Font License, Version 1.1.\r\nThis license is copied below, and is also available with a FAQ at:\r\nhttp://scripts.sil.org/OFL\r\n\r\n\r\n-----------------------------------------------------------\r\nSIL OPEN FONT LICENSE Version 1.1 - 26 February 2007\r\n-----------------------------------------------------------\r\n\r\nPREAMBLE\r\nThe goals of the Open Font License (OFL) are to stimulate worldwide\r\ndevelopment of collaborative font projects, to support the font creation\r\nefforts of academic and linguistic communities, and to provide a free and\r\nopen framework in which fonts may be shared and improved in partnership\r\nwith others.\r\n\r\nThe OFL allows the licensed fonts to be used, studied, modified and\r\nredistributed freely as long as they are not sold by themselves. The\r\nfonts, including any derivative works, can be bundled, embedded, \r\nredistributed and/or sold with any software provided that any reserved\r\nnames are not used by derivative works. The fonts and derivatives,\r\nhowever, cannot be released under any other type of license. The\r\nrequirement for fonts to remain under this license does not apply\r\nto any document created using the fonts or their derivatives.\r\n\r\nDEFINITIONS\r\n\"Font Software\" refers to the set of files released by the Copyright\r\nHolder(s) under this license and clearly marked as such. This may\r\ninclude source files, build scripts and documentation.\r\n\r\n\"Reserved Font Name\" refers to any names specified as such after the\r\ncopyright statement(s).\r\n\r\n\"Original Version\" refers to the collection of Font Software components as\r\ndistributed by the Copyright Holder(s).\r\n\r\n\"Modified Version\" refers to any derivative made by adding to, deleting,\r\nor substituting -- in part or in whole -- any of the components of the\r\nOriginal Version, by changing formats or by porting the Font Software to a\r\nnew environment.\r\n\r\n\"Author\" refers to any designer, engineer, programmer, technical\r\nwriter or other person who contributed to the Font Software.\r\n\r\nPERMISSION & CONDITIONS\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of the Font Software, to use, study, copy, merge, embed, modify,\r\nredistribute, and sell modified and unmodified copies of the Font\r\nSoftware, subject to the following conditions:\r\n\r\n1) Neither the Font Software nor any of its individual components,\r\nin Original or Modified Versions, may be sold by itself.\r\n\r\n2) Original or Modified Versions of the Font Software may be bundled,\r\nredistributed and/or sold with any software, provided that each copy\r\ncontains the above copyright notice and this license. These can be\r\nincluded either as stand-alone text files, human-readable headers or\r\nin the appropriate machine-readable metadata fields within text or\r\nbinary files as long as those fields can be easily viewed by the user.\r\n\r\n3) No Modified Version of the Font Software may use the Reserved Font\r\nName(s) unless explicit written permission is granted by the corresponding\r\nCopyright Holder. This restriction only applies to the primary font name as\r\npresented to the users.\r\n\r\n4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font\r\nSoftware shall not be used to promote, endorse or advertise any\r\nModified Version, except to acknowledge the contribution(s) of the\r\nCopyright Holder(s) and the Author(s) or with their explicit written\r\npermission.\r\n\r\n5) The Font Software, modified or unmodified, in part or in whole,\r\nmust be distributed entirely under this license, and must not be\r\ndistributed under any other license. The requirement for fonts to\r\nremain under this license does not apply to any document created\r\nusing the Font Software.\r\n\r\nTERMINATION\r\nThis license becomes null and void if any of the above conditions are\r\nnot met.\r\n\r\nDISCLAIMER\r\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\r\nOF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE\r\nCOPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nINCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL\r\nDAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM\r\nOTHER DEALINGS IN THE FONT SOFTWARE.\r\n"
  },
  {
    "path": "samples/templates/SylkTest.slk",
    "content": "ID;PWXL;N;E\r\nP;PGeneral\r\nP;P0\r\nP;P0.00\r\nP;P#,##0\r\nP;P#,##0.00\r\nP;P#,##0;;\\-#,##0\r\nP;P#,##0;;[Red]\\-#,##0\r\nP;P#,##0.00;;\\-#,##0.00\r\nP;P#,##0.00;;[Red]\\-#,##0.00\r\nP;P\"$\"#,##0;;\\-\"$\"#,##0\r\nP;P\"$\"#,##0;;[Red]\\-\"$\"#,##0\r\nP;P\"$\"#,##0.00;;\\-\"$\"#,##0.00\r\nP;P\"$\"#,##0.00;;[Red]\\-\"$\"#,##0.00\r\nP;P0%\r\nP;P0.00%\r\nP;P0.00E+00\r\nP;P##0.0E+0\r\nP;P#\\ ?/?\r\nP;P#\\ ??/??\r\nP;Pdd/mm/yyyy\r\nP;Pdd\\-mmm\\-yy\r\nP;Pdd\\-mmm\r\nP;Pmmm\\-yy\r\nP;Ph:mm\\ AM/PM\r\nP;Ph:mm:ss\\ AM/PM\r\nP;Phh:mm\r\nP;Phh:mm:ss\r\nP;Pdd/mm/yyyy\\ hh:mm\r\nP;Pmm:ss\r\nP;Pmm:ss.0\r\nP;P@\r\nP;P[h]:mm:ss\r\nP;P_-\"$\"* #,##0_-;;\\-\"$\"* #,##0_-;;_-\"$\"* \"-\"_-;;_-@_-\r\nP;P_-* #,##0_-;;\\-* #,##0_-;;_-* \"-\"_-;;_-@_-\r\nP;P_-\"$\"* #,##0.00_-;;\\-\"$\"* #,##0.00_-;;_-\"$\"* \"-\"??_-;;_-@_-\r\nP;P_-* #,##0.00_-;;\\-* #,##0.00_-;;_-* \"-\"??_-;;_-@_-\r\nP;FArial;M200\r\nP;FArial;M200\r\nP;FArial;M200\r\nP;FArial;M200\r\nP;EArial;M200\r\nP;EArial;M200\r\nP;EArial;M200\r\nP;EArial;M200;SB\r\nP;EArial;M200;SBI\r\nP;EArial;M200;SI\r\nP;EArial;M200;SU\r\nP;EArial;M200;L11\r\nP;EArial;M200;SB\r\nP;EArial;M200\r\nP;EArial;M200;SI\r\nP;EArial;M200;SBI\r\nP;EArial;M200;SBU\r\nP;EArial;M220;SBIU\r\nP;EArial;M200\r\nP;EArial;M200;SI\r\nF;P0;DG0G8;M255\r\nB;Y18;X10;D0 0 17 9\r\nO;L;D;V0;K47;G100 0.001\r\nF;W1 1 17\r\nF;W4 6 6\r\nF;M270;R9\r\nF;M270;R12\r\nF;M270;R17\r\nF;M270;R18\r\nF;SM12;Y1;X1\r\nC;K\"Test String 1\"\r\nF;SM19;X2\r\nC;K1\r\nF;SM19;X3\r\nC;K5\r\nF;SIDM18;X5\r\nC;K\"A\"\r\nF;SDM17;X6\r\nC;K\"E\"\r\nC;X8;K6;ERC[-6]+RC[-5]\r\nC;X10;K\"AE\";ERC[-5]&RC[-4]\r\nF;SSM0;Y2;X1\r\nC;K\"Test - String 2\"\r\nC;X2;K2\r\nF;SM19;X3\r\nC;K6\r\nC;X5;K\"B\"\r\nC;X6;K\"F\"\r\nC;X8;K8;ERC[-6]+RC[-5]\r\nC;X10;K\"BF\";ERC[-5]&RC[-4]\r\nC;Y3;X1;K\"Test #3\"\r\nF;SM19;X2\r\nC;K3\r\nF;SM19;X3\r\nC;K7\r\nF;SDM13;X5\r\nC;K\"C\"\r\nF;SIDM16;X6\r\nC;K\"G\"\r\nC;X8;K10;ERC[-6]+RC[-5]\r\nC;X10;K\"CG\";ERC[-5]&RC[-4]\r\nF;SM11;Y4;X1\r\nC;K\"Test with (;;) in string\"\r\nC;X2;K4\r\nF;SM19;X3\r\nC;K8\r\nF;SIM15;X5\r\nC;K\"D\"\r\nC;X6;K\"H\"\r\nC;X8;K12;ERC[-6]+RC[-5]\r\nC;X10;K\"DH\";ERC[-5]&RC[-4]\r\nC;Y5;X8;K10;ESUM(R[-4]C[-6]:R[-1]C[-6])\r\nC;X9;K26;ESUM(R[-4]C[-6]:R[-1]C[-6])\r\nC;X10;K36;ESUM(R[-4]C[-8]:R[-1]C[-7])\r\nC;Y6;X2;K1.23\r\nC;X3;KTRUE\r\nF;P19;FG0G;X4\r\nC;Y7;X2;K2.34\r\nC;X3;KFALSE\r\nC;Y8;X2;K3.45\r\nC;Y9;X2;K2.34;EMEDIAN(R[-3]C:R[-1]C)\r\nF;Y9;X1\r\nF;X2\r\nF;X3\r\nF;X4\r\nF;X5\r\nF;X6\r\nF;X7\r\nF;X8\r\nF;X9\r\nF;X10\r\nF;P19;FG0G;Y10;X1\r\nC;K22269\r\nF;STM0;X3\r\nC;K\"TOP\"\r\nF;P17;FG0G;Y11;X1\r\nC;K1.5\r\nF;Y12\r\nF;X2\r\nF;SBM0;X3\r\nC;K\"BOTTOM\"\r\nF;X4\r\nF;X5\r\nF;X6\r\nF;X7\r\nF;X8\r\nF;X9\r\nF;X10\r\nF;SLM0;Y14;X3\r\nC;K\"LEFT\"\r\nF;SRM0;Y16\r\nC;K\"RIGHT\"\r\nF;Y17\r\nF;SLRTBM0;Y18\r\nC;K\"BOX\"\r\nE\r\n"
  },
  {
    "path": "samples/templates/chartSpreadsheet.php",
    "content": "<?php\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\n$spreadsheet = new Spreadsheet();\n$worksheet = $spreadsheet->getActiveSheet();\n$worksheet->fromArray(\n    [\n        ['', 2010, 2011, 2012],\n        ['Q1', 12, 15, 21],\n        ['Q2', 56, 73, 86],\n        ['Q3', 52, 61, 69],\n        ['Q4', 30, 32, 0],\n    ]\n);\n\n// Set the Labels for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesLabels = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n];\n// Set the X-Axis Labels\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$xAxisTickValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n];\n// Set the Data values for each data series we want to plot\n//     Datatype\n//     Cell reference for data\n//     Format Code\n//     Number of datapoints in series\n//     Data values\n//     Data Marker\n$dataSeriesValues = [\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n    new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n];\n\n// Build the dataseries\n$series = new DataSeries(\n    DataSeries::TYPE_BARCHART, // plotType\n    DataSeries::GROUPING_CLUSTERED, // plotGrouping\n    range(0, count($dataSeriesValues) - 1), // plotOrder\n    $dataSeriesLabels, // plotLabel\n    $xAxisTickValues, // plotCategory\n    $dataSeriesValues        // plotValues\n);\n// Set additional dataseries parameters\n//     Make it a horizontal bar rather than a vertical column graph\n$series->setPlotDirection(DataSeries::DIRECTION_BAR);\n\n// Set the series in the plot area\n$plotArea = new PlotArea(null, [$series]);\n// Set the chart legend\n$legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n$title = new Title('Test Bar Chart');\n$yAxisLabel = new Title('Value ($k)');\n\n// Create the chart\n$chart = new Chart(\n    'chart1', // name\n    $title, // title\n    $legend, // legend\n    $plotArea, // plotArea\n    true, // plotVisibleOnly\n    DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n    null, // xAxisLabel\n    $yAxisLabel  // yAxisLabel\n);\n\n// Set the position where the chart should appear in the worksheet\n$chart->setTopLeftPosition('A7');\n$chart->setBottomRightPosition('H20');\n\n// Add the chart to the worksheet\n$worksheet->addChart($chart);\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->renderChart($chart, __FILE__);\n\nreturn $spreadsheet;\n"
  },
  {
    "path": "samples/templates/excel2003.short.bad.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><?mso-application progid=\"Excel.Sheet\"?>\n<Workbook xmlns:c=\"urn:schemas-microsoft-com:office:component:spreadsheet\" xmlns:html=\"http://www.w3.org/TR/REC-html40\"\n          xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n          xmlns:x2=\"http://schemas.microsoft.com/office/excel/2003/xml\"\n          xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\">\n    <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n        <Colors>\n            <Color>\n                <Index>3</Index>\n                <RGB>#000000</RGB>\n            </Color>\n        </Colors>\n    </OfficeDocumentSettings>\n    <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n        <WindowHeight>9000</WindowHeight>\n        <WindowWidth>13860</WindowWidth>\n        <WindowTopX>240</WindowTopX>\n        <WindowTopY>75</WindowTopY>\n        <ProtectStructure>False</ProtectStructure>\n        <ProtectWindows>False</ProtectWindows>\n    </ExcelWorkbook>\n    <Styles>\n        <Style ss:ID=\"ce9\">\n            <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Arial1\" ss:Size=\"11\"/>\n            <NumberFormat ss:Format=\"Short Date\"/>\n        </Style>\n        <Style ss:ID=\"ce32\">\n            <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\" ss:Rotate=\"0\"/>\n            <Borders/>\n            <Font ss:Color=\"#000000\" ss:FontName=\"Calibri\" ss:Size=\"11\"/>\n        </Style>\n    </Styles>\n    <ss:Worksheet ss:Name=\"Sample Data\">\n        <Table>\n            <Column ss:Width=\"96.4913\"/>\n            <Column ss:Span=\"1\" ss:Width=\"48.3874\"/>\n            <Column ss:Index=\"4\" ss:Width=\"35.8866\"/>\n            <Column ss:Span=\"6\" ss:Width=\"48.3874\"/>\n            <Column ss:Index=\"12\" ss:Width=\"50.2583\"/>\n            <Column ss:Span=\"1011\" ss:Width=\"48.3874\"/>\n            <Row ss:Index=\"8\" ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                <Cell>\n                    <ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\" ss:Type=\"String\">Test String 1</ss:Data>\n                    <Comment>\n                        <ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\">\n                            <Font html:Face=\"Sans\" html:Size=\"10\">Test for a simple colour-formatted string</Font>\n                        </ss:Data>\n                    </Comment>\n                </Cell>\n                <Cell>\n                    <Data ss:StyleID=\"ce32\" ss:Type=\"Number\">1</Data>\n                </Cell>\n                <Cell ss:Formula=\"of:=12/1\">\n                    <Data ss:Type=\"Number\">12</Data>\n                </Cell>\n                <Cell ss:Formula=\"of:=[.C8]-[.B8]\">\n                    <Data ss:Type=\"Number\">11</Data>\n                </Cell>\n                <Cell ss:StyleID=\"ce9\">\n                    <Data ss:Type=\"DateTime\">1960-12-19T00:00:00.000</Data>\n                </Cell>\n            </Row>\n        </Table>\n        <x:WorksheetOptions/>\n    </ss:Worksheet>\n</Workbook>\n"
  },
  {
    "path": "samples/templates/excel2003.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Title>Xml2003 Workbook</Title>\r\n  <Subject>Test Gnumeric Workbook Subject</Subject>\r\n  <Author>Mark Baker</Author>\r\n  <Keywords>PHPExcel Xml Reader Test Keywords</Keywords>\r\n  <Description>Some comments about the PHPExcel Gnumeric Reader</Description>\r\n  <LastAuthor>Owen Leibman</LastAuthor>\r\n  <Created>2010-09-02T20:48:39Z</Created>\r\n  <LastSaved>2010-09-03T21:48:39Z</LastSaved>\r\n  <Category>PHPExcel Xml Reader Test Category</Category>\r\n  <Manager>Maarten Balliauw</Manager>\r\n  <Company>PHPExcel</Company>\r\n  <HyperlinkBase>https://github.com/PHPOffice/PhpSpreadsheet</HyperlinkBase>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <CustomDocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <my_API_Token dt:dt=\"string\">AbCd1234</my_API_Token>\r\n  <my_API_Token_Expiry dt:dt=\"dateTime.tz\">2019-01-31T07:00:00Z</my_API_Token_Expiry>\r\n  <my_API_Boolean dt:dt=\"boolean\">1</my_API_Boolean>\r\n  <my_API_Int dt:dt=\"string\">3</my_API_Int>\r\n  <myאInt dt:dt=\"string\">2</myאInt>\r\n  <my_API_Float dt:dt=\"float\">3.14159</my_API_Float>\r\n </CustomDocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>8964</WindowHeight>\r\n  <WindowWidth>23040</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n  <Style ss:ID=\"s62\" ss:Name=\"Hyperlink\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#0066CC\"\r\n    ss:Underline=\"Single\"/>\r\n  </Style>\r\n  <Style ss:ID=\"m1867777004784\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\"\r\n     ss:Color=\"#00B050\"/>\r\n    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\"\r\n     ss:Color=\"#0070C0\"/>\r\n    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\"\r\n     ss:Color=\"#FFFF00\"/>\r\n    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\"\r\n     ss:Color=\"#FF0000\"/>\r\n   </Borders>\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s63\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#FF0000\" ss:Bold=\"1\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s64\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s65\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\" ss:Bold=\"1\"\r\n    ss:Italic=\"1\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s66\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\" ss:Bold=\"1\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s68\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\" ss:Underline=\"Single\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s69\">\r\n   <Interior ss:Color=\"#FF0000\" ss:Pattern=\"Solid\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s70\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#FF0000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s72\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\" ss:Italic=\"1\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s73\">\r\n   <Interior ss:Color=\"#FF9900\" ss:Pattern=\"Solid\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s74\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#FF6600\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s75\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"DashDotDot\" ss:Weight=\"1\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s76\">\r\n   <Interior ss:Color=\"#FFFF00\" ss:Pattern=\"Solid\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s77\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#FFFF00\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s78\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"DashDot\" ss:Weight=\"1\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s79\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#000000\"\r\n    ss:Underline=\"Single\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s80\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <NumberFormat ss:Format=\"dd/mm/yyyy\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s81\">\r\n   <Interior ss:Color=\"#008000\" ss:Pattern=\"Solid\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s82\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#008000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s83\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s84\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#000000\"\r\n    ss:Underline=\"Double\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s85\">\r\n   <Interior ss:Color=\"#0000FF\" ss:Pattern=\"Solid\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s86\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#0000FF\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s87\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"DashDotDot\" ss:Weight=\"2\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s88\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#000000\" ss:StrikeThrough=\"1\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s89\">\r\n   <Interior ss:Color=\"#993366\" ss:Pattern=\"Solid\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s90\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#800080\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s91\">\r\n   <Interior ss:Color=\"#FF99CC\" ss:Pattern=\"Solid\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s92\">\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#FF00FF\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s93\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"DashDot\" ss:Weight=\"2\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s94\">\r\n   <Borders>\r\n    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s95\">\r\n   <Interior ss:Color=\"#DDBC7D\" ss:Pattern=\"Solid\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s96\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Dash\" ss:Weight=\"2\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s97\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <NumberFormat ss:Format=\"#\\ ?0/??0\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s98\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s99\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s100\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"3\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s101\">\r\n   <NumberFormat ss:Format=\"hh&quot;:&quot;mm&quot;:&quot;ss\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s102\">\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Double\" ss:Weight=\"3\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s103\">\r\n   <Borders>\r\n    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s104\">\r\n   <NumberFormat ss:Format=\"d/m/yy\\ hh&quot;:&quot;mm\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s105\">\r\n   <Borders>\r\n    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"2\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s113\">\r\n   <Borders>\r\n    <Border ss:Position=\"DiagonalLeft\" ss:LineStyle=\"Double\" ss:Weight=\"3\"\r\n     ss:Color=\"#FF0000\"/>\r\n    <Border ss:Position=\"DiagonalRight\" ss:LineStyle=\"Double\" ss:Weight=\"3\"\r\n     ss:Color=\"#FF0000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s114\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s115\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\"/>\r\n   <Borders>\r\n    <Border ss:Position=\"DiagonalLeft\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s116\">\r\n   <Borders>\r\n    <Border ss:Position=\"DiagonalRight\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s118\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\"/>\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#CCFFCC\"/>\r\n   <Interior ss:Color=\"#FF0000\" ss:Pattern=\"Gray0625\" ss:PatternColor=\"#FFFF00\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s121\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s123\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"90\"/>\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s125\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"45\"/>\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s127\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"-90\"/>\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s129\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:Rotate=\"-45\"/>\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s130\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\" ss:Underline=\"Single\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s131\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\" ss:VerticalAlign=\"Subscript\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s132\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\" ss:Underline=\"Double\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s133\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\" ss:VerticalAlign=\"Superscript\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s134\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\" ss:Underline=\"SingleAccounting\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s135\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\" ss:Underline=\"DoubleAccounting\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s136\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\"/>\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s139\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#0000FF\" ss:Underline=\"Single\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s140\">\r\n   <Font ss:FontName=\"Sans\" ss:Color=\"#000000\"/>\r\n   <NumberFormat ss:Format=\"0\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s141\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\"/>\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"12\" ss:Color=\"#000000\" ss:Bold=\"1\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s142\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <NumberFormat ss:Format=\"0.00;[Red]0.00\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s143\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <NumberFormat ss:Format=\"dd\\-mmm\\-yyyy\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s144\">\r\n   <Font ss:FontName=\"Arial1\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <NumberFormat ss:Format=\"hh&quot;:&quot;mm\\ AM/PM\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s145\">\r\n   <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Bottom\"/>\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Dot\" ss:Weight=\"1\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s146\">\r\n   <Alignment ss:Horizontal=\"Right\" ss:Vertical=\"Bottom\"/>\r\n   <Borders>\r\n    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Dash\" ss:Weight=\"1\"\r\n     ss:Color=\"#000000\"/>\r\n   </Borders>\r\n  </Style>\r\n  <Style ss:ID=\"s147\">\r\n   <Alignment ss:Vertical=\"Top\"/>\r\n   <Interior ss:Color=\"#00CCFF\" ss:Pattern=\"HorzStripe\" ss:PatternColor=\"#0000FF\"/>\r\n  </Style>\r\n </Styles>\r\n <Names>\r\n  <NamedRange ss:Name=\"goodname\" ss:RefersTo=\"='Sample Data'!R30C1\"/>\r\n  <NamedRange ss:Name=\"MarksRange\" ss:RefersTo=\"='Sample Data'!R1C2:R4C3\"/>\r\n </Names>\r\n <Worksheet ss:Name=\"Sample Data\">\r\n  <Table ss:ExpandedColumnCount=\"14\" ss:ExpandedRowCount=\"32\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.55\">\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"96.6\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"48.6\" ss:Span=\"1\"/>\r\n   <Column ss:Index=\"4\" ss:AutoFitWidth=\"0\" ss:Width=\"36\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"48.6\" ss:Span=\"6\"/>\r\n   <Column ss:Index=\"12\" ss:AutoFitWidth=\"0\" ss:Width=\"50.4\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"48.6\" ss:Span=\"1\"/>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s63\"><Data ss:Type=\"String\">Test String 1</Data><Comment\r\n      ss:Author=\"Mark\"><ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\"><Font\r\n        html:Face=\"Tahoma\" html:Size=\"9\" html:Color=\"#000000\">Test for a simple colour-formatted string</Font></ss:Data></Comment></Cell>\r\n    <Cell ss:StyleID=\"s64\"><Data ss:Type=\"Number\">1</Data><NamedCell\r\n      ss:Name=\"MarksRange\"/></Cell>\r\n    <Cell ss:StyleID=\"s64\"><Data ss:Type=\"Number\">5</Data><NamedCell\r\n      ss:Name=\"MarksRange\"/></Cell>\r\n    <Cell ss:Index=\"5\" ss:StyleID=\"s65\"><Data ss:Type=\"String\">A</Data></Cell>\r\n    <Cell ss:StyleID=\"s66\"><Data ss:Type=\"String\">E</Data></Cell>\r\n    <Cell ss:Index=\"8\" ss:Formula=\"=RC[-6]+RC[-5]\"><Data ss:Type=\"Number\">6</Data></Cell>\r\n    <Cell ss:Index=\"10\" ss:Formula=\"=RC[-5]&amp;RC[-4]\"><Data ss:Type=\"String\">AE</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s65\"><Data ss:Type=\"String\">Test - String 2</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">2</Data><NamedCell ss:Name=\"MarksRange\"/></Cell>\r\n    <Cell ss:StyleID=\"s64\"><Data ss:Type=\"Number\">6</Data><NamedCell\r\n      ss:Name=\"MarksRange\"/></Cell>\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"String\">B</Data></Cell>\r\n    <Cell><Data ss:Type=\"String\">F</Data></Cell>\r\n    <Cell ss:Index=\"8\" ss:Formula=\"=RC[-6]+RC[-5]\"><Data ss:Type=\"Number\">8</Data></Cell>\r\n    <Cell ss:Index=\"10\" ss:Formula=\"=RC[-5]&amp;RC[-4]\"><Data ss:Type=\"String\">BF</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s145\"><Data ss:Type=\"String\">Dot</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s68\"><Data ss:Type=\"String\">Test #3</Data></Cell>\r\n    <Cell ss:StyleID=\"s64\"><Data ss:Type=\"Number\">3</Data><NamedCell\r\n      ss:Name=\"MarksRange\"/></Cell>\r\n    <Cell ss:StyleID=\"s64\"><Data ss:Type=\"Number\">7</Data><NamedCell\r\n      ss:Name=\"MarksRange\"/></Cell>\r\n    <Cell ss:Index=\"5\" ss:StyleID=\"s66\"><Data ss:Type=\"String\">C</Data></Cell>\r\n    <Cell ss:StyleID=\"s65\"><Data ss:Type=\"String\">G</Data></Cell>\r\n    <Cell ss:Index=\"8\" ss:Formula=\"=RC[-6]+RC[-5]\"><Data ss:Type=\"Number\">10</Data></Cell>\r\n    <Cell ss:Index=\"10\" ss:Formula=\"=RC[-5]&amp;RC[-4]\"><Data ss:Type=\"String\">CG</Data></Cell>\r\n    <Cell ss:StyleID=\"s69\"><Data ss:Type=\"String\">Red</Data></Cell>\r\n    <Cell ss:StyleID=\"s70\"><Data ss:Type=\"String\">Red</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s146\"><Data ss:Type=\"String\">Dash</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s64\"><Data ss:Type=\"String\">Test with (&quot;) in string</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">4</Data><NamedCell ss:Name=\"MarksRange\"/></Cell>\r\n    <Cell ss:StyleID=\"s64\"><Data ss:Type=\"Number\">8</Data><NamedCell\r\n      ss:Name=\"MarksRange\"/></Cell>\r\n    <Cell ss:Index=\"5\" ss:StyleID=\"s72\"><Data ss:Type=\"String\">D</Data></Cell>\r\n    <Cell><Data ss:Type=\"String\">H</Data></Cell>\r\n    <Cell ss:Index=\"8\" ss:Formula=\"=RC[-6]+RC[-5]\"><Data ss:Type=\"Number\">12</Data></Cell>\r\n    <Cell ss:Index=\"10\" ss:Formula=\"=RC[-5]&amp;RC[-4]\"><Data ss:Type=\"String\">DH</Data></Cell>\r\n    <Cell ss:StyleID=\"s73\"><Data ss:Type=\"String\">Orange</Data></Cell>\r\n    <Cell ss:StyleID=\"s74\"><Data ss:Type=\"String\">Orange</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s75\"><Data ss:Type=\"String\">Dash/Dot/Dot</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:Index=\"8\" ss:Formula=\"=SUM(R[-4]C[-6]:R[-1]C[-6])\"><Data\r\n      ss:Type=\"Number\">10</Data></Cell>\r\n    <Cell ss:Formula=\"=SUM(R[-4]C[-6]:R[-1]C[-6])\"><Data ss:Type=\"Number\">26</Data></Cell>\r\n    <Cell ss:Formula=\"=SUM(R[-4]C[-8]:R[-1]C[-7])\"><Data ss:Type=\"Number\">36</Data></Cell>\r\n    <Cell ss:StyleID=\"s76\"><Data ss:Type=\"String\">Yellow</Data></Cell>\r\n    <Cell ss:StyleID=\"s77\"><Data ss:Type=\"String\">Yellow</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s78\"><Data ss:Type=\"String\">Dash/Dot</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s79\"><Data ss:Type=\"String\">Test #3</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">1.23</Data></Cell>\r\n    <Cell ss:Formula=\"=TRUE()\"><Data ss:Type=\"Boolean\">1</Data></Cell>\r\n    <Cell ss:StyleID=\"s80\"><Data ss:Type=\"Boolean\">1</Data></Cell>\r\n    <Cell ss:Index=\"8\" ss:Formula=\"=SUM(R[-1]C+R[-2]C)\"><Data ss:Type=\"Number\">22</Data></Cell>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s81\"><Data ss:Type=\"String\">Green</Data></Cell>\r\n    <Cell ss:StyleID=\"s82\"><Data ss:Type=\"String\">Green</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s83\"><Data ss:Type=\"String\">Thin Line</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s84\"><Data ss:Type=\"String\">Test #3</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">2.34</Data></Cell>\r\n    <Cell ss:Formula=\"=FALSE()\"><Data ss:Type=\"Boolean\">0</Data></Cell>\r\n    <Cell><Data ss:Type=\"Boolean\">0</Data></Cell>\r\n    <Cell ss:Index=\"8\" ss:Formula=\"=SUM(MarksRange)\"><Data ss:Type=\"Number\">36</Data></Cell>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s85\"><Data ss:Type=\"String\">Blue</Data></Cell>\r\n    <Cell ss:StyleID=\"s86\"><Data ss:Type=\"String\">Blue</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s87\"><Data ss:Type=\"String\">Thick Dash/Dot/Dot</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s88\"><Data ss:Type=\"String\">Test #3</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">3.45</Data></Cell>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s89\"><Data ss:Type=\"String\">Purple</Data></Cell>\r\n    <Cell ss:StyleID=\"s90\"><Data ss:Type=\"String\">Purple</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s87\"><Data ss:Type=\"String\">Variant Thick Dash/Dot/Dot</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"13.5\">\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s91\"><Data ss:Type=\"String\">Pink</Data></Cell>\r\n    <Cell ss:StyleID=\"s92\"><Data ss:Type=\"String\">Pink</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s93\"><Data ss:Type=\"String\">Thick Dash/Dot</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s80\"><Data ss:Type=\"DateTime\">1960-12-19T00:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"3\" ss:StyleID=\"s94\"><Data ss:Type=\"String\">TOP</Data></Cell>\r\n    <Cell ss:Index=\"7\"><Data ss:Type=\"Number\">0</Data></Cell>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s95\"><Data ss:Type=\"String\">Brown</Data></Cell>\r\n    <Cell ss:StyleID=\"s74\"><Data ss:Type=\"String\">Brown</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s96\"><Data ss:Type=\"String\">Thick Dash</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s97\"><Data ss:Type=\"Number\">1.5</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:Formula=\"=12/0\"><Data ss:Type=\"Error\">#DIV/0!</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s98\"><Data ss:Type=\"String\">Thick Line</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"13.5\">\r\n    <Cell ss:Index=\"3\" ss:StyleID=\"s99\"><Data ss:Type=\"String\">BOTTOM</Data></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s100\"><Data ss:Type=\"String\">Extra Thick Line</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s101\"><Data ss:Type=\"DateTime\">1899-12-31T02:30:00.000</Data></Cell>\r\n    <Cell ss:Index=\"6\"><Data ss:Type=\"String\">Мойва сушеная</Data><Comment\r\n      ss:Author=\"Mark\"><ss:Data xmlns=\"http://www.w3.org/TR/REC-html40\"><Font\r\n        html:Face=\"Tahoma\" html:Size=\"9\" html:Color=\"#000000\">Tests for UTF-8 content</Font></ss:Data></Comment></Cell>\r\n    <Cell ss:Index=\"14\" ss:StyleID=\"s102\"><Data ss:Type=\"String\">Double Line</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:Index=\"3\" ss:StyleID=\"s103\"><Data ss:Type=\"String\">LEFT</Data></Cell>\r\n    <Cell ss:Index=\"6\"><Data ss:Type=\"String\">Ärendetext</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s104\"><Data ss:Type=\"DateTime\">1960-12-19T01:30:00.000</Data></Cell>\r\n    <Cell ss:Index=\"6\"><Data ss:Type=\"String\">Højde</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:Index=\"3\" ss:StyleID=\"s105\"><Data ss:Type=\"String\">RIGHT</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"13.5\"/>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"27.75\">\r\n    <Cell ss:Index=\"2\" ss:MergeAcross=\"1\" ss:MergeDown=\"1\"\r\n     ss:StyleID=\"m1867777004784\"><Data ss:Type=\"String\">BOX</Data></Cell>\r\n    <Cell ss:Index=\"5\" ss:StyleID=\"s113\"/>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s114\"><Data ss:Type=\"String\">Test Column 1</Data></Cell>\r\n    <Cell ss:StyleID=\"s114\"/>\r\n    <Cell ss:StyleID=\"s115\"/>\r\n    <Cell ss:StyleID=\"s116\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"27.75\">\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s114\"/>\r\n    <Cell ss:StyleID=\"s114\"><Data ss:Type=\"String\">Test Column 2</Data></Cell>\r\n    <Cell ss:StyleID=\"s114\"/>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s147\"><Data ss:Type=\"String\">Patterned</Data></Cell>\r\n    <Cell ss:StyleID=\"s118\"><Data ss:Type=\"String\">Patterned 2</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"27.75\">\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s114\"/>\r\n    <Cell ss:StyleID=\"s114\"/>\r\n    <Cell ss:StyleID=\"s114\"><Data ss:Type=\"String\">Test Column 3</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s62\" ss:HRef=\"https://github.com/PHPOffice/PhpSpreadsheet\"><Data\r\n      ss:Type=\"String\">PhpSpreadsheet</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s121\"><Data ss:Type=\"String\">Underline None</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:MergeAcross=\"1\" ss:MergeDown=\"4\" ss:StyleID=\"s123\"><Data\r\n      ss:Type=\"String\">Rotate 90</Data></Cell>\r\n    <Cell ss:MergeAcross=\"1\" ss:MergeDown=\"4\" ss:StyleID=\"s125\"><Data\r\n      ss:Type=\"String\">Rotate 45</Data></Cell>\r\n    <Cell ss:MergeAcross=\"1\" ss:MergeDown=\"4\" ss:StyleID=\"s127\"><Data\r\n      ss:Type=\"String\">Rotate -90</Data></Cell>\r\n    <Cell ss:MergeAcross=\"1\" ss:MergeDown=\"4\" ss:StyleID=\"s129\"><Data\r\n      ss:Type=\"String\">Rotate -45</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s130\"><Data ss:Type=\"String\">Underline 1</Data></Cell>\r\n    <Cell ss:StyleID=\"s131\"><Data ss:Type=\"String\">Subscript</Data></Cell>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s132\"><Data ss:Type=\"String\">Underline 2</Data></Cell>\r\n    <Cell ss:StyleID=\"s133\"><Data ss:Type=\"String\">Superscript</Data></Cell>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s134\"><Data ss:Type=\"String\">Underline 3</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s135\"><Data ss:Type=\"String\">Underline 4</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:Index=\"11\" ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:MergeAcross=\"2\" ss:StyleID=\"s136\"><Data ss:Type=\"String\">I don't know if Gnumeric supports Rich Text in the same way as Excel, And this row should be autofit height with text wrap</Data></Cell>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n    <Cell ss:StyleID=\"s136\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell ss:MergeAcross=\"2\" ss:StyleID=\"s139\"><Data ss:Type=\"String\">Blue with underline</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\" ss:Hidden=\"1\">\r\n    <Cell ss:StyleID=\"s140\"><Data ss:Type=\"Number\">5</Data><NamedCell\r\n      ss:Name=\"goodname\"/></Cell>\r\n    <Cell ss:StyleID=\"s121\" ss:Formula=\"=goodname\"><Data ss:Type=\"Number\">5</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\" ss:Formula=\"=@badname\"><Data ss:Type=\"Error\">#NAME?</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:StyleID=\"s121\"><Data ss:Type=\"String\">Hidden row above</Data></Cell>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.72\"/>\r\n    <Footer x:Margin=\"0.72\"/>\r\n    <PageMargins x:Bottom=\"1.2\" x:Left=\"0.72\" x:Right=\"0.72\" x:Top=\"1.2\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <Print>\r\n    <ValidPrinterInfo/>\r\n    <HorizontalResolution>600</HorizontalResolution>\r\n    <VerticalResolution>600</VerticalResolution>\r\n   </Print>\r\n   <Selected/>\r\n   <TopRowVisible>3</TopRowVisible>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>18</ActiveRow>\r\n     <ActiveCol>10</ActiveCol>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n   <AllowFormatCells/>\r\n   <AllowSizeCols/>\r\n   <AllowSizeRows/>\r\n   <AllowInsertCols/>\r\n   <AllowInsertRows/>\r\n   <AllowInsertHyperlinks/>\r\n   <AllowDeleteCols/>\r\n   <AllowDeleteRows/>\r\n   <AllowSort/>\r\n   <AllowFilter/>\r\n   <AllowUsePivotTables/>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n <Worksheet ss:Name=\"Report Data\">\r\n  <Table ss:ExpandedColumnCount=\"11\" ss:ExpandedRowCount=\"16\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.55\">\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"56.4\" ss:Span=\"2\"/>\r\n   <Column ss:Index=\"4\" ss:AutoFitWidth=\"0\" ss:Width=\"78.599999999999994\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"58.2\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"27.6\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"78.599999999999994\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"68.399999999999991\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"48.6\"/>\r\n   <Column ss:Hidden=\"1\" ss:AutoFitWidth=\"0\" ss:Width=\"48.6\"/>\r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"48.6\"/>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"31.5\">\r\n    <Cell ss:StyleID=\"s141\"/>\r\n    <Cell ss:StyleID=\"s141\"/>\r\n    <Cell ss:StyleID=\"s141\"/>\r\n    <Cell ss:StyleID=\"s141\"/>\r\n    <Cell ss:StyleID=\"s141\"/>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s141\"/>\r\n    <Cell ss:StyleID=\"s141\"/>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"31.5\">\r\n    <Cell ss:StyleID=\"s141\"><Data ss:Type=\"String\">Heading 1</Data></Cell>\r\n    <Cell ss:StyleID=\"s141\"><Data ss:Type=\"String\">Heading 2</Data></Cell>\r\n    <Cell ss:StyleID=\"s141\"><Data ss:Type=\"String\">Third Heading</Data></Cell>\r\n    <Cell ss:StyleID=\"s141\"><Data ss:Type=\"String\">Date Heading</Data></Cell>\r\n    <Cell ss:StyleID=\"s141\"><Data ss:Type=\"String\">Time Heading</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s141\"><Data ss:Type=\"String\">Adjusted Date</Data></Cell>\r\n    <Cell ss:StyleID=\"s141\"><Data ss:Type=\"String\">Adjusted Number</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">ABC</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">1</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">1.1100000000000001</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2001-01-01T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T01:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2000-12-31T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">1.1100000000000001</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">A</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">1A</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">BCD</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">2</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">2.2200000000000002</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2002-02-02T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T02:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2002-01-31T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">4.4400000000000004</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">B</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">2B</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">CDE</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">3</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">3.33</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2003-03-03T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T03:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2003-02-28T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">9.99</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">C</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">3C</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">DEF</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">4</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">4.4400000000000004</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2004-04-03T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T04:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2004-03-30T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">17.760000000000002</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">D</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">4D</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">EFG</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">5</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">5.55</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2005-05-04T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T05:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2005-04-29T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">27.75</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">E</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">5E</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">FGH</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">6</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">6.66</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2006-06-05T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T06:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2006-05-30T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">39.96</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">F</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">6F</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">GHI</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">7</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">7.77</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2007-07-06T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T07:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2007-06-29T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">54.39</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">G</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">7G</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">HIJ</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">8</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">8.8800000000000008</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2008-08-07T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T08:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2008-07-30T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">71.040000000000006</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">H</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">8H</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">IJK</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">9</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">9.99</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2009-09-08T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T09:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2009-08-30T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">89.91</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">I</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">9I</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">JKL</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">10</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">11.1</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2010-10-09T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T10:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2010-09-29T23:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">111</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">J</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">10J</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">KLM</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">11</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">12.21</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2011-11-11T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T11:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2011-10-31T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">134.31</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">K</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">11K</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">LMN</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">12</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">13.32</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">2012-12-12T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1900-01-12T00:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">2012-11-30T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">159.84</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">L</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">12L</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\r\n    <Cell><Data ss:Type=\"String\">ZYX</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">-1</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\"><Data ss:Type=\"Number\">-1.1100000000000001</Data></Cell>\r\n    <Cell ss:StyleID=\"s143\"><Data ss:Type=\"DateTime\">1999-12-01T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s144\"><Data ss:Type=\"DateTime\">1899-12-31T23:00:00.000</Data></Cell>\r\n    <Cell ss:Index=\"7\" ss:StyleID=\"s143\" ss:Formula=\"=RC[-3]-RC[-5]\"><Data\r\n      ss:Type=\"DateTime\">1999-12-02T00:00:00.000</Data></Cell>\r\n    <Cell ss:StyleID=\"s142\" ss:Formula=\"=RC[-6]*RC[-5]\"><Data ss:Type=\"Number\">1.1100000000000001</Data></Cell>\r\n    <Cell ss:Index=\"10\"><Data ss:Type=\"String\">M</Data></Cell>\r\n    <Cell ss:Formula=\"=RC[-9]&amp;RC[-1]\"><Data ss:Type=\"String\">-1M</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n    <Cell ss:StyleID=\"s121\"/>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.72\"/>\r\n    <Footer x:Margin=\"0.72\"/>\r\n    <PageMargins x:Bottom=\"1.2\" x:Left=\"0.72\" x:Right=\"0.72\" x:Top=\"1.2\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <Print>\r\n    <ValidPrinterInfo/>\r\n    <NoOrientation/>\r\n    <HorizontalResolution>600</HorizontalResolution>\r\n    <VerticalResolution>600</VerticalResolution>\r\n   </Print>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveCol>8</ActiveCol>\r\n     <RangeSelection>R1C9:R15C11</RangeSelection>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n   <AllowFormatCells/>\r\n   <AllowSizeCols/>\r\n   <AllowSizeRows/>\r\n   <AllowInsertCols/>\r\n   <AllowInsertRows/>\r\n   <AllowInsertHyperlinks/>\r\n   <AllowDeleteCols/>\r\n   <AllowDeleteRows/>\r\n   <AllowSort/>\r\n   <AllowFilter/>\r\n   <AllowUsePivotTables/>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "samples/templates/largeSpreadsheet.php",
    "content": "<?php\n\n// Create new Spreadsheet object\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Create a first sheet\n$helper->log('Add data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Firstname');\n$spreadsheet->getActiveSheet()->setCellValue('B1', 'Lastname');\n$spreadsheet->getActiveSheet()->setCellValue('C1', 'Phone');\n$spreadsheet->getActiveSheet()->setCellValue('D1', 'Fax');\n$spreadsheet->getActiveSheet()->setCellValue('E1', 'Is Client ?');\n\n// Hide \"Phone\" and \"fax\" column\n$helper->log(\"Hide 'Phone' and 'fax' columns\");\n$spreadsheet->getActiveSheet()->getColumnDimension('C')->setVisible(false);\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setVisible(false);\n\n// Set outline levels\n$helper->log('Set outline levels');\n$spreadsheet->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1)\n    ->setVisible(false)\n    ->setCollapsed(true);\n\n// Freeze panes\n$helper->log('Freeze panes');\n$spreadsheet->getActiveSheet()->freezePane('A2');\n\n// Rows to repeat at top\n$helper->log('Rows to repeat at top');\n$spreadsheet->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 1);\n\n// Add data\nfor ($i = 2; $i <= 5000; ++$i) {\n    $spreadsheet->getActiveSheet()->setCellValue('A' . $i, \"FName $i\")\n        ->setCellValue('B' . $i, \"LName $i\")\n        ->setCellValue('C' . $i, \"PhoneNo $i\")\n        ->setCellValue('D' . $i, \"FaxNo $i\")\n        ->setCellValue('E' . $i, true);\n}\n\nreturn $spreadsheet;\n"
  },
  {
    "path": "samples/templates/sampleSpreadsheet.php",
    "content": "<?php\n\n// Create new Spreadsheet object\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Create a first sheet, representing sales data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('B1', 'Invoice');\n$date = new DateTime('now');\n$date->setTime(0, 0, 0);\n$spreadsheet->getActiveSheet()->setCellValue('D1', Date::PHPToExcel($date));\n$spreadsheet->getActiveSheet()->getStyle('D1')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_XLSX15);\n$spreadsheet->getActiveSheet()->setCellValue('E1', '#12566');\n\n$spreadsheet->getActiveSheet()->setCellValue('A3', 'Product Id');\n$spreadsheet->getActiveSheet()->setCellValue('B3', 'Description');\n$spreadsheet->getActiveSheet()->setCellValue('C3', 'Price');\n$spreadsheet->getActiveSheet()->setCellValue('D3', 'Amount');\n$spreadsheet->getActiveSheet()->setCellValue('E3', 'Total');\n\n$spreadsheet->getActiveSheet()->setCellValue('A4', '1001');\n$spreadsheet->getActiveSheet()->setCellValue('B4', 'PHP for dummies');\n$spreadsheet->getActiveSheet()->setCellValue('C4', '20');\n$spreadsheet->getActiveSheet()->setCellValue('D4', '1');\n$spreadsheet->getActiveSheet()->setCellValue('E4', '=IF(D4<>\"\",C4*D4,\"\")');\n\n$spreadsheet->getActiveSheet()->setCellValue('A5', '1012');\n$spreadsheet->getActiveSheet()->setCellValue('B5', 'OpenXML for dummies');\n$spreadsheet->getActiveSheet()->setCellValue('C5', '22');\n$spreadsheet->getActiveSheet()->setCellValue('D5', '2');\n$spreadsheet->getActiveSheet()->setCellValue('E5', '=IF(D5<>\"\",C5*D5,\"\")');\n\n$spreadsheet->getActiveSheet()->setCellValue('E6', '=IF(D6<>\"\",C6*D6,\"\")');\n$spreadsheet->getActiveSheet()->setCellValue('E7', '=IF(D7<>\"\",C7*D7,\"\")');\n$spreadsheet->getActiveSheet()->setCellValue('E8', '=IF(D8<>\"\",C8*D8,\"\")');\n$spreadsheet->getActiveSheet()->setCellValue('E9', '=IF(D9<>\"\",C9*D9,\"\")');\n\n$spreadsheet->getActiveSheet()->setCellValue('D11', 'Total excl.:');\n$spreadsheet->getActiveSheet()->setCellValue('E11', '=SUM(E4:E9)');\n\n$spreadsheet->getActiveSheet()->setCellValue('D12', 'VAT:');\n$spreadsheet->getActiveSheet()->setCellValue('E12', '=E11*0.21');\n\n$spreadsheet->getActiveSheet()->setCellValue('D13', 'Total incl.:');\n$spreadsheet->getActiveSheet()->setCellValue('E13', '=E11+E12');\n\n// Add comment\n$helper->log('Add comments');\n\n$spreadsheet->getActiveSheet()->getComment('E11')->setAuthor('PhpSpreadsheet');\n$commentRichText = $spreadsheet->getActiveSheet()->getComment('E11')->getText()->createTextRun('PhpSpreadsheet:');\n$commentRichText->getFontOrThrow()->setBold(true);\n$spreadsheet->getActiveSheet()->getComment('E11')->getText()->createTextRun(\"\\r\\n\");\n$spreadsheet->getActiveSheet()->getComment('E11')->getText()->createTextRun('Total amount on the current invoice, excluding VAT.');\n\n$spreadsheet->getActiveSheet()->getComment('E12')->setAuthor('PhpSpreadsheet');\n$commentRichText = $spreadsheet->getActiveSheet()->getComment('E12')->getText()->createTextRun('PhpSpreadsheet:');\n$commentRichText->getFontOrThrow()->setBold(true);\n$spreadsheet->getActiveSheet()->getComment('E12')->getText()->createTextRun(\"\\r\\n\");\n$spreadsheet->getActiveSheet()->getComment('E12')->getText()->createTextRun('Total amount of VAT on the current invoice.');\n\n$spreadsheet->getActiveSheet()->getComment('E13')->setAuthor('PhpSpreadsheet');\n$commentRichText = $spreadsheet->getActiveSheet()->getComment('E13')->getText()->createTextRun('PhpSpreadsheet:');\n$commentRichText->getFontOrThrow()->setBold(true);\n$spreadsheet->getActiveSheet()->getComment('E13')->getText()->createTextRun(\"\\r\\n\");\n$spreadsheet->getActiveSheet()->getComment('E13')->getText()->createTextRun('Total amount on the current invoice, including VAT.');\n$spreadsheet->getActiveSheet()->getComment('E13')->setWidth('100pt');\n$spreadsheet->getActiveSheet()->getComment('E13')->setHeight('100pt');\n$spreadsheet->getActiveSheet()->getComment('E13')->setMarginLeft('150pt');\n$spreadsheet->getActiveSheet()->getComment('E13')->getFillColor()->setRGB('EEEEEE');\n\n// Add rich-text string\n$helper->log('Add rich-text string');\n$richText = new RichText();\n$richText->createText('This invoice is ');\n\n$payable = $richText->createTextRun('payable within thirty days after the end of the month');\n$payable->getFontOrThrow()->setBold(true);\n$payable->getFontOrThrow()->setItalic(true);\n$payable->getFontOrThrow()->setColor(new Color(Color::COLOR_DARKGREEN));\n\n$richText->createText(', unless specified otherwise on the invoice.');\n\n$spreadsheet->getActiveSheet()->getCell('A18')->setValue($richText);\n\n// Merge cells\n$helper->log('Merge cells');\n$spreadsheet->getActiveSheet()->mergeCells('A18:E22');\n$spreadsheet->getActiveSheet()->mergeCells('A28:B28'); // Just to test...\n$spreadsheet->getActiveSheet()->unmergeCells('A28:B28'); // Just to test...\n// Protect cells\n$helper->log('Protect cells');\n$spreadsheet->getActiveSheet()->getProtection()->setSheet(true); // Needs to be set to true in order to enable any worksheet protection!\n$spreadsheet->getActiveSheet()->protectCells('A3:E13', 'PhpSpreadsheet');\n\n// Set cell number formats\n$helper->log('Set cell number formats');\n$spreadsheet->getActiveSheet()->getStyle('E4:E13')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_INTEGER);\n\n// Set column widths\n$helper->log('Set column widths');\n$spreadsheet->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(12);\n$spreadsheet->getActiveSheet()->getColumnDimension('E')->setWidth(12);\n\n// Set fonts\n$helper->log('Set fonts');\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setName('Candara');\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setSize(20);\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setUnderline(Font::UNDERLINE_SINGLE);\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->getColor()->setARGB(Color::COLOR_WHITE);\n\n$spreadsheet->getActiveSheet()->getStyle('D1')->getFont()->getColor()->setARGB(Color::COLOR_WHITE);\n$spreadsheet->getActiveSheet()->getStyle('E1')->getFont()->getColor()->setARGB(Color::COLOR_WHITE);\n\n$spreadsheet->getActiveSheet()->getStyle('D13')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('E13')->getFont()->setBold(true);\n\n// Set alignments\n$helper->log('Set alignments');\n$spreadsheet->getActiveSheet()->getStyle('D11')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('D12')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('D13')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n\n$spreadsheet->getActiveSheet()->getStyle('A18')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_JUSTIFY);\n$spreadsheet->getActiveSheet()->getStyle('A18')->getAlignment()->setVertical(Alignment::VERTICAL_CENTER);\n\n$spreadsheet->getActiveSheet()->getStyle('B5')->getAlignment()->setShrinkToFit(true);\n\n// Set thin black border outline around column\n$helper->log('Set thin black border outline around column');\n$styleThinBlackBorderOutline = [\n    'borders' => [\n        'outline' => [\n            'borderStyle' => Border::BORDER_THIN,\n            'color' => ['argb' => 'FF000000'],\n        ],\n    ],\n];\n$spreadsheet->getActiveSheet()->getStyle('A4:E10')->applyFromArray($styleThinBlackBorderOutline);\n\n// Set thick brown border outline around \"Total\"\n$helper->log('Set thick brown border outline around Total');\n$styleThickBrownBorderOutline = [\n    'borders' => [\n        'outline' => [\n            'borderStyle' => Border::BORDER_THICK,\n            'color' => ['argb' => 'FF993300'],\n        ],\n    ],\n];\n$spreadsheet->getActiveSheet()->getStyle('D13:E13')->applyFromArray($styleThickBrownBorderOutline);\n\n// Set fills\n$helper->log('Set fills');\n$spreadsheet->getActiveSheet()->getStyle('A1:E1')->getFill()->setFillType(Fill::FILL_SOLID);\n$spreadsheet->getActiveSheet()->getStyle('A1:E1')->getFill()->getStartColor()->setARGB('FF808080');\n\n// Set style for header row using alternative method\n$helper->log('Set style for header row using alternative method');\n$spreadsheet->getActiveSheet()->getStyle('A3:E3')->applyFromArray(\n    [\n        'font' => [\n            'bold' => true,\n        ],\n        'alignment' => [\n            'horizontal' => Alignment::HORIZONTAL_RIGHT,\n        ],\n        'borders' => [\n            'top' => [\n                'borderStyle' => Border::BORDER_THIN,\n            ],\n        ],\n        'fill' => [\n            'fillType' => Fill::FILL_GRADIENT_LINEAR,\n            'rotation' => 90,\n            'startColor' => [\n                'argb' => 'FFA0A0A0',\n            ],\n            'endColor' => [\n                'argb' => 'FFFFFFFF',\n            ],\n        ],\n    ]\n);\n\n$spreadsheet->getActiveSheet()->getStyle('A3')->applyFromArray(\n    [\n        'alignment' => [\n            'horizontal' => Alignment::HORIZONTAL_LEFT,\n        ],\n        'borders' => [\n            'left' => [\n                'borderStyle' => Border::BORDER_THIN,\n            ],\n        ],\n    ]\n);\n\n$spreadsheet->getActiveSheet()->getStyle('B3')->applyFromArray(\n    [\n        'alignment' => [\n            'horizontal' => Alignment::HORIZONTAL_LEFT,\n        ],\n    ]\n);\n\n$spreadsheet->getActiveSheet()->getStyle('E3')->applyFromArray(\n    [\n        'borders' => [\n            'right' => [\n                'borderStyle' => Border::BORDER_THIN,\n            ],\n        ],\n    ]\n);\n\n// Unprotect a cell\n$helper->log('Unprotect a cell');\n$spreadsheet->getActiveSheet()->getStyle('B1')->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED);\n\n// Add a hyperlink to the sheet\n$helper->log('Add a hyperlink to an external website');\n$spreadsheet->getActiveSheet()->setCellValue('E26', 'www.example.com');\n$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('https://www.example.com');\n$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setTooltip('Navigate to website');\n$spreadsheet->getActiveSheet()->getStyle('E26')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('E26')->getFont()->setHyperlinkTheme();\n\n$helper->log('Add a hyperlink to another cell on a different worksheet within the workbook');\n$spreadsheet->getActiveSheet()->setCellValue('E27', 'Terms and conditions');\n$spreadsheet->getActiveSheet()->getCell('E27')->getHyperlink()->setUrl(\"sheet://'Terms and conditions'!A1\");\n$spreadsheet->getActiveSheet()->getCell('E27')->getHyperlink()->setTooltip('Review terms and conditions');\n$spreadsheet->getActiveSheet()->getStyle('E27')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('E27')->getFont()->setHyperlinkTheme();\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet');\n$drawing = new Drawing();\n$drawing->setName('Logo');\n$drawing->setDescription('Logo');\n$drawing->setPath(__DIR__ . '/../images/officelogo.jpg');\n$drawing->setHeight(36);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet');\n$drawing = new Drawing();\n$drawing->setName('Paid');\n$drawing->setDescription('Paid');\n$drawing->setPath(__DIR__ . '/../images/paid.png');\n$drawing->setCoordinates('B15');\n$drawing->setOffsetX(110);\n$drawing->setRotation(25);\n$drawing->getShadow()->setVisible(true);\n$drawing->getShadow()->setDirection(45);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet');\n$drawing = new Drawing();\n$drawing->setName('PhpSpreadsheet logo');\n$drawing->setDescription('PhpSpreadsheet logo');\n$drawing->setPath(__DIR__ . '/../images/PhpSpreadsheet_logo.png');\n$drawing->setHeight(36);\n$drawing->setCoordinates('D24');\n$drawing->setOffsetX(10);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Play around with inserting and removing rows and columns\n$helper->log('Play around with inserting and removing rows and columns');\n$spreadsheet->getActiveSheet()->insertNewRowBefore(6, 10);\n$spreadsheet->getActiveSheet()->removeRow(6, 10);\n$spreadsheet->getActiveSheet()->insertNewColumnBefore('E', 5);\n$spreadsheet->getActiveSheet()->removeColumn('E', 5);\n\n// Set header and footer. When no different headers for odd/even are used, odd header is assumed.\n$helper->log('Set header/footer');\n$spreadsheet->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&BInvoice&RPrinted on &D');\n$spreadsheet->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $spreadsheet->getProperties()->getTitle() . '&RPage &P of &N');\n\n// Set page orientation and size\n$helper->log('Set page orientation and size');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_PORTRAIT);\n$spreadsheet->getActiveSheet()->getPageSetup()->setPaperSize(PageSetup::PAPERSIZE_A4);\n\n// Rename first worksheet\n$helper->log('Rename first worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Invoice');\n\n// Create a new worksheet, after the default sheet\n$helper->log('Create a second Worksheet object');\n$spreadsheet->createSheet();\n\n// Llorem ipsum...\n$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper tortor. Aliquam luctus purus non elit. Fusce vel elit commodo sapien dignissim dignissim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur accumsan magna sed massa. Nullam bibendum quam ac ipsum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin augue. Praesent malesuada justo sed orci. Pellentesque lacus ligula, sodales quis, ultricies a, ultricies vitae, elit. Sed luctus consectetuer dolor. Vivamus vel sem ut nisi sodales accumsan. Nunc et felis. Suspendisse semper viverra odio. Morbi at odio. Integer a orci a purus venenatis molestie. Nam mattis. Praesent rhoncus, nisi vel mattis auctor, neque nisi faucibus sem, non dapibus elit pede ac nisl. Cras turpis.';\n\n// Add some data to the second sheet, resembling some different data types\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(1);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Terms and conditions');\n$spreadsheet->getActiveSheet()->setCellValue('A3', $sLloremIpsum);\n$spreadsheet->getActiveSheet()->setCellValue('A4', $sLloremIpsum);\n$spreadsheet->getActiveSheet()->setCellValue('A5', $sLloremIpsum);\n$spreadsheet->getActiveSheet()->setCellValue('A6', $sLloremIpsum);\n\n// Set the worksheet tab color\n$helper->log('Set the worksheet tab color');\n$spreadsheet->getActiveSheet()->getTabColor()->setARGB('FF0094FF');\n\n// Set alignments\n$helper->log('Set alignments');\n$spreadsheet->getActiveSheet()->getStyle('A3:A6')->getAlignment()->setWrapText(true);\n\n// Set column widths\n$helper->log('Set column widths');\n$spreadsheet->getActiveSheet()->getColumnDimension('A')->setWidth(80);\n\n// Set fonts\n$helper->log('Set fonts');\n$spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setName('Candara');\n$spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setSize(20);\n$spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setUnderline(Font::UNDERLINE_SINGLE);\n\n$spreadsheet->getActiveSheet()->getStyle('A3:A6')->getFont()->setSize(8);\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet');\n$drawing = new Drawing();\n$drawing->setName('Terms and conditions');\n$drawing->setDescription('Terms and conditions');\n$drawing->setPath(__DIR__ . '/../images/termsconditions.jpg');\n$drawing->setCoordinates('B14');\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Set page orientation and size\n$helper->log('Set page orientation and size');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n$spreadsheet->getActiveSheet()->getPageSetup()->setPaperSize(PageSetup::PAPERSIZE_A4);\n\n// Rename second worksheet\n$helper->log('Rename second worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Terms and conditions');\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\nreturn $spreadsheet;\n"
  },
  {
    "path": "samples/templates/sampleSpreadsheet2.php",
    "content": "<?php\n\n// Create new Spreadsheet object\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\n\n/** @var PhpOffice\\PhpSpreadsheet\\Helper\\Sample $helper */\n$helper->log('Create new Spreadsheet object');\n$spreadsheet = new Spreadsheet();\n\n// Set document properties\n$helper->log('Set document properties');\n$spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n    ->setLastModifiedBy('Maarten Balliauw')\n    ->setTitle('Office 2007 XLSX Test Document')\n    ->setSubject('Office 2007 XLSX Test Document')\n    ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n    ->setKeywords('office 2007 openxml php')\n    ->setCategory('Test result file');\n\n// Create a first sheet, representing sales data\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(0);\n$spreadsheet->getActiveSheet()->setCellValue('B1', 'Invoice');\n$date = new DateTime('now');\n$date->setTime(0, 0, 0);\n$spreadsheet->getActiveSheet()->setCellValue('D1', Date::PHPToExcel($date));\n$spreadsheet->getActiveSheet()->getStyle('D1')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_XLSX15);\n$spreadsheet->getActiveSheet()->setCellValue('E1', '#12566');\n\n$spreadsheet->getActiveSheet()->setCellValue('A3', 'Product Id');\n$spreadsheet->getActiveSheet()->setCellValue('B3', 'Description');\n$spreadsheet->getActiveSheet()->setCellValue('C3', 'Price');\n$spreadsheet->getActiveSheet()->setCellValue('D3', 'Amount');\n$spreadsheet->getActiveSheet()->setCellValue('E3', 'Total');\n\n$spreadsheet->getActiveSheet()->setCellValue('A4', '1001');\n$spreadsheet->getActiveSheet()->setCellValue('B4', 'PHP for dummies');\n$spreadsheet->getActiveSheet()->setCellValue('C4', '20');\n$spreadsheet->getActiveSheet()->setCellValue('D4', '1');\n$spreadsheet->getActiveSheet()->setCellValue('E4', '=IF(D4<>\"\",C4*D4,\"\")');\n\n$spreadsheet->getActiveSheet()->setCellValue('A5', '1012');\n$spreadsheet->getActiveSheet()->setCellValue('B5', 'OpenXML for dummies');\n$spreadsheet->getActiveSheet()->setCellValue('C5', '22');\n$spreadsheet->getActiveSheet()->setCellValue('D5', '2');\n$spreadsheet->getActiveSheet()->setCellValue('E5', '=IF(D5<>\"\",C5*D5,\"\")');\n\n$spreadsheet->getActiveSheet()->setCellValue('E6', '=IF(D6<>\"\",C6*D6,\"\")');\n$spreadsheet->getActiveSheet()->setCellValue('E7', '=IF(D7<>\"\",C7*D7,\"\")');\n$spreadsheet->getActiveSheet()->setCellValue('E8', '=IF(D8<>\"\",C8*D8,\"\")');\n$spreadsheet->getActiveSheet()->setCellValue('E9', '=IF(D9<>\"\",C9*D9,\"\")');\n\n$spreadsheet->getActiveSheet()->setCellValue('D11', 'Total excl.:');\n$spreadsheet->getActiveSheet()->setCellValue('E11', '=SUM(E4:E9)');\n\n$spreadsheet->getActiveSheet()->setCellValue('D12', 'VAT:');\n$spreadsheet->getActiveSheet()->setCellValue('E12', '=E11*0.21');\n\n$spreadsheet->getActiveSheet()->setCellValue('D13', 'Total incl.:');\n$spreadsheet->getActiveSheet()->setCellValue('E13', '=E11+E12');\n\n// Add comment\n$helper->log('Add comments');\n\n$spreadsheet->getActiveSheet()->getComment('E11')->setAuthor('PhpSpreadsheet');\n$commentRichText = $spreadsheet->getActiveSheet()->getComment('E11')->getText()->createTextRun('PhpSpreadsheet:');\n$commentRichText->getFontOrThrow()->setBold(true);\n$spreadsheet->getActiveSheet()->getComment('E11')->getText()->createTextRun(\"\\r\\n\");\n$spreadsheet->getActiveSheet()->getComment('E11')->getText()->createTextRun('Total amount on the current invoice, excluding VAT.');\n\n$spreadsheet->getActiveSheet()->getComment('E12')->setAuthor('PhpSpreadsheet');\n$commentRichText = $spreadsheet->getActiveSheet()->getComment('E12')->getText()->createTextRun('PhpSpreadsheet:');\n$commentRichText->getFontOrThrow()->setBold(true);\n$spreadsheet->getActiveSheet()->getComment('E12')->getText()->createTextRun(\"\\r\\n\");\n$spreadsheet->getActiveSheet()->getComment('E12')->getText()->createTextRun('Total amount of VAT on the current invoice.');\n\n$spreadsheet->getActiveSheet()->getComment('E13')->setAuthor('PhpSpreadsheet');\n$commentRichText = $spreadsheet->getActiveSheet()->getComment('E13')->getText()->createTextRun('PhpSpreadsheet:');\n$commentRichText->getFontOrThrow()->setBold(true);\n$spreadsheet->getActiveSheet()->getComment('E13')->getText()->createTextRun(\"\\r\\n\");\n$spreadsheet->getActiveSheet()->getComment('E13')->getText()->createTextRun('Total amount on the current invoice, including VAT.');\n$spreadsheet->getActiveSheet()->getComment('E13')->setWidth('100pt');\n$spreadsheet->getActiveSheet()->getComment('E13')->setHeight('100pt');\n$spreadsheet->getActiveSheet()->getComment('E13')->setMarginLeft('150pt');\n$spreadsheet->getActiveSheet()->getComment('E13')->getFillColor()->setRGB('EEEEEE');\n\n// Add rich-text string\n$helper->log('Add rich-text string');\n$richText = new RichText();\n$richText->createText('This invoice is ');\n\n$payable = $richText->createTextRun('payable within thirty days after the end of the month');\n$payable->getFontOrThrow()->setBold(true);\n$payable->getFontOrThrow()->setItalic(true);\n$payable->getFontOrThrow()->setColor(new Color(Color::COLOR_DARKGREEN));\n\n$richText->createText(', unless specified otherwise on the invoice.');\n\n$spreadsheet->getActiveSheet()->getCell('A18')->setValue($richText);\n\n// Merge cells\n$helper->log('Merge cells');\n$spreadsheet->getActiveSheet()->mergeCells('A18:E22');\n$spreadsheet->getActiveSheet()->mergeCells('A28:B28'); // Just to test...\n$spreadsheet->getActiveSheet()->unmergeCells('A28:B28'); // Just to test...\n// Protect cells\n$helper->log('Protect cells');\n$spreadsheet->getActiveSheet()->getProtection()->setSheet(true); // Needs to be set to true in order to enable any worksheet protection!\n$spreadsheet->getActiveSheet()->protectCells('A3:E13', 'PhpSpreadsheet');\n\n// Set cell number formats\n$helper->log('Set cell number formats');\n$spreadsheet->getActiveSheet()->getStyle('E4:E13')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_INTEGER);\n\n// Set column widths\n$helper->log('Set column widths');\n$spreadsheet->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);\n$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(12);\n$spreadsheet->getActiveSheet()->getColumnDimension('E')->setWidth(12);\n\n// Set fonts\n$helper->log('Set fonts');\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setName('Candara');\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setSize(20);\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->setUnderline(Font::UNDERLINE_SINGLE);\n$spreadsheet->getActiveSheet()->getStyle('B1')->getFont()->getColor()->setARGB(Color::COLOR_WHITE);\n\n$spreadsheet->getActiveSheet()->getStyle('D1')->getFont()->getColor()->setARGB(Color::COLOR_WHITE);\n$spreadsheet->getActiveSheet()->getStyle('E1')->getFont()->getColor()->setARGB(Color::COLOR_WHITE);\n\n$spreadsheet->getActiveSheet()->getStyle('D13')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('E13')->getFont()->setBold(true);\n\n// Set alignments\n$helper->log('Set alignments');\n$spreadsheet->getActiveSheet()->getStyle('D11')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('D12')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('D13')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n\n$spreadsheet->getActiveSheet()->getStyle('A18')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_JUSTIFY);\n$spreadsheet->getActiveSheet()->getStyle('A18')->getAlignment()->setVertical(Alignment::VERTICAL_CENTER);\n\n$spreadsheet->getActiveSheet()->getStyle('B5')->getAlignment()->setShrinkToFit(true);\n\n// Set thin black border outline around column\n$helper->log('Set thin black border outline around column');\n$styleThinBlackBorderOutline = [\n    'borders' => [\n        'outline' => [\n            'borderStyle' => Border::BORDER_THIN,\n            'color' => ['argb' => 'FF000000'],\n        ],\n    ],\n];\n$spreadsheet->getActiveSheet()->getStyle('A4:E10')->applyFromArray($styleThinBlackBorderOutline);\n\n// Set thick brown border outline around \"Total\"\n$helper->log('Set thick brown border outline around Total');\n$styleThickBrownBorderOutline = [\n    'borders' => [\n        'outline' => [\n            'borderStyle' => Border::BORDER_THICK,\n            'color' => ['argb' => 'FF993300'],\n        ],\n    ],\n];\n$spreadsheet->getActiveSheet()->getStyle('D13:E13')->applyFromArray($styleThickBrownBorderOutline);\n\n// Set fills\n$helper->log('Set fills');\n$spreadsheet->getActiveSheet()->getStyle('A1:E1')->getFill()->setFillType(Fill::FILL_SOLID);\n$spreadsheet->getActiveSheet()->getStyle('A1:E1')->getFill()->getStartColor()->setARGB('FF808080');\n\n// Set style for header row using alternative method\n$helper->log('Set style for header row using alternative method');\n$spreadsheet->getActiveSheet()->getStyle('A3:E3')->applyFromArray(\n    [\n        'font' => [\n            'bold' => true,\n        ],\n        'alignment' => [\n            'horizontal' => Alignment::HORIZONTAL_RIGHT,\n        ],\n        'borders' => [\n            'top' => [\n                'borderStyle' => Border::BORDER_THIN,\n            ],\n        ],\n        'fill' => [\n            'fillType' => Fill::FILL_GRADIENT_LINEAR,\n            'rotation' => 90,\n            'startColor' => [\n                'argb' => 'FFA0A0A0',\n            ],\n            'endColor' => [\n                'argb' => 'FFFFFFFF',\n            ],\n        ],\n    ]\n);\n\n$spreadsheet->getActiveSheet()->getStyle('A3')->applyFromArray(\n    [\n        'alignment' => [\n            'horizontal' => Alignment::HORIZONTAL_LEFT,\n        ],\n        'borders' => [\n            'left' => [\n                'borderStyle' => Border::BORDER_THIN,\n            ],\n        ],\n    ]\n);\n\n$spreadsheet->getActiveSheet()->getStyle('B3')->applyFromArray(\n    [\n        'alignment' => [\n            'horizontal' => Alignment::HORIZONTAL_LEFT,\n        ],\n    ]\n);\n\n$spreadsheet->getActiveSheet()->getStyle('E3')->applyFromArray(\n    [\n        'borders' => [\n            'right' => [\n                'borderStyle' => Border::BORDER_THIN,\n            ],\n        ],\n    ]\n);\n\n// Unprotect a cell\n$helper->log('Unprotect a cell');\n$spreadsheet->getActiveSheet()->getStyle('B1')->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED);\n\n// Add a hyperlink to the sheet\n$helper->log('Add a hyperlink to an external website');\n$spreadsheet->getActiveSheet()->setCellValue('E26', 'www.example.com');\n$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('https://www.example.com');\n$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setTooltip('Navigate to website');\n$spreadsheet->getActiveSheet()->getStyle('E26')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('E26')->getFont()->setHyperlinkTheme();\n\n$helper->log('Add a hyperlink to another cell on a different worksheet within the workbook');\n$spreadsheet->getActiveSheet()->setCellValue('E27', 'Terms and conditions');\n$spreadsheet->getActiveSheet()->getCell('E27')->getHyperlink()->setUrl(\"sheet://'Terms and conditions'!A1\");\n$spreadsheet->getActiveSheet()->getCell('E27')->getHyperlink()->setTooltip('Review terms and conditions');\n$spreadsheet->getActiveSheet()->getStyle('E27')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n$spreadsheet->getActiveSheet()->getStyle('E27')->getFont()->setHyperlinkTheme();\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet');\n$drawing = new Drawing();\n$drawing->setName('Logo');\n$drawing->setDescription('Logo');\n$drawing->setPath(__DIR__ . '/../images/officelogo.jpg');\n$drawing->setHeight(36);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing to the worksheet');\n$drawing = new Drawing();\n$drawing->setName('Paid');\n$drawing->setDescription('Paid');\n$drawing->setPath(__DIR__ . '/../images/paid.png');\n$drawing->setCoordinates('B15');\n$drawing->setOffsetX(110);\n$drawing->setRotation(25);\n$drawing->getShadow()->setVisible(true);\n$drawing->getShadow()->setDirection(45);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing with Japanese file name to the worksheet');\n$drawing = new Drawing();\n$drawing->setName('PhpSpreadsheet logo');\n$drawing->setDescription('PhpSpreadsheet logo');\n$drawing->setPath(__DIR__ . '/../images/サンプル.png');\n$drawing->setHeight(36);\n$drawing->setCoordinates('D24');\n$drawing->setOffsetX(10);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Play around with inserting and removing rows and columns\n$helper->log('Play around with inserting and removing rows and columns');\n$spreadsheet->getActiveSheet()->insertNewRowBefore(6, 10);\n$spreadsheet->getActiveSheet()->removeRow(6, 10);\n$spreadsheet->getActiveSheet()->insertNewColumnBefore('E', 5);\n$spreadsheet->getActiveSheet()->removeColumn('E', 5);\n\n// Set header and footer. When no different headers for odd/even are used, odd header is assumed.\n$helper->log('Set header/footer');\n$spreadsheet->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&BInvoice&RPrinted on &D');\n$spreadsheet->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $spreadsheet->getProperties()->getTitle() . '&RPage &P of &N');\n\n// Set page orientation and size\n$helper->log('Set page orientation and size');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_PORTRAIT);\n$spreadsheet->getActiveSheet()->getPageSetup()->setPaperSize(PageSetup::PAPERSIZE_A4);\n\n// Rename first worksheet\n$helper->log('Rename first worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Invoice');\n\n// Create a new worksheet, after the default sheet\n$helper->log('Create a second Worksheet object');\n$spreadsheet->createSheet();\n\n// Llorem ipsum...\n$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper tortor. Aliquam luctus purus non elit. Fusce vel elit commodo sapien dignissim dignissim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur accumsan magna sed massa. Nullam bibendum quam ac ipsum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin augue. Praesent malesuada justo sed orci. Pellentesque lacus ligula, sodales quis, ultricies a, ultricies vitae, elit. Sed luctus consectetuer dolor. Vivamus vel sem ut nisi sodales accumsan. Nunc et felis. Suspendisse semper viverra odio. Morbi at odio. Integer a orci a purus venenatis molestie. Nam mattis. Praesent rhoncus, nisi vel mattis auctor, neque nisi faucibus sem, non dapibus elit pede ac nisl. Cras turpis.';\n\n// Add some data to the second sheet, resembling some different data types\n$helper->log('Add some data');\n$spreadsheet->setActiveSheetIndex(1);\n$spreadsheet->getActiveSheet()->setCellValue('A1', 'Terms and conditions');\n$spreadsheet->getActiveSheet()->setCellValue('A3', $sLloremIpsum);\n$spreadsheet->getActiveSheet()->setCellValue('A4', $sLloremIpsum);\n$spreadsheet->getActiveSheet()->setCellValue('A5', $sLloremIpsum);\n$spreadsheet->getActiveSheet()->setCellValue('A6', $sLloremIpsum);\n\n// Set the worksheet tab color\n$helper->log('Set the worksheet tab color');\n$spreadsheet->getActiveSheet()->getTabColor()->setARGB('FF0094FF');\n\n// Set alignments\n$helper->log('Set alignments');\n$spreadsheet->getActiveSheet()->getStyle('A3:A6')->getAlignment()->setWrapText(true);\n\n// Set column widths\n$helper->log('Set column widths');\n$spreadsheet->getActiveSheet()->getColumnDimension('A')->setWidth(80);\n\n// Set fonts\n$helper->log('Set fonts');\n$spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setName('Candara');\n$spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setSize(20);\n$spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n$spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setUnderline(Font::UNDERLINE_SINGLE);\n\n$spreadsheet->getActiveSheet()->getStyle('A3:A6')->getFont()->setSize(8);\n\n// Add a drawing to the worksheet\n$helper->log('Add a drawing with space and # in filename to the worksheet');\n$drawing = new Drawing();\n$drawing->setName('Terms and conditions');\n$drawing->setDescription('Terms and conditions');\n$drawing->setPath(__DIR__ . '/../images/terms con#ditions.jpg');\n$drawing->setCoordinates('B14');\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Repeat drawing to the worksheet\n$helper->log('Repeat drawing from other worksheet on this one');\n$drawing = new Drawing();\n$drawing->setName('PhpSpreadsheet logo');\n$drawing->setDescription('PhpSpreadsheet logo');\n$drawing->setPath(__DIR__ . '/../images/サンプル.png');\n$drawing->setHeight(36);\n$drawing->setCoordinates('B18');\n$drawing->setOffsetX(10);\n$drawing->setWorksheet($spreadsheet->getActiveSheet());\n\n// Set page orientation and size\n$helper->log('Set page orientation and size');\n$spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n$spreadsheet->getActiveSheet()->getPageSetup()->setPaperSize(PageSetup::PAPERSIZE_A4);\n\n// Rename second worksheet\n$helper->log('Rename second worksheet');\n$spreadsheet->getActiveSheet()->setTitle('Terms and conditions');\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\nreturn $spreadsheet;\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/ArrayEnabled.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\ArrayArgumentHelper;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\ArrayArgumentProcessor;\n\ntrait ArrayEnabled\n{\n    private static bool $initializationNeeded = true;\n\n    private static ArrayArgumentHelper $arrayArgumentHelper;\n\n    /**\n     * @param mixed[] $arguments\n     */\n    private static function initialiseHelper(array $arguments): void\n    {\n        if (self::$initializationNeeded === true) {\n            self::$arrayArgumentHelper = new ArrayArgumentHelper();\n            self::$initializationNeeded = false;\n        }\n        self::$arrayArgumentHelper->initialise($arguments);\n    }\n\n    /**\n     * Handles array argument processing when the function accepts a single argument that can be an array argument.\n     * Example use for:\n     *         DAYOFMONTH() or FACT().\n     *\n     * @param mixed[] $values\n     *\n     * @return mixed[]\n     */\n    protected static function evaluateSingleArgumentArray(callable $method, array $values): array\n    {\n        $result = [];\n        foreach ($values as $value) {\n            $result[] = $method($value);\n        }\n\n        return $result;\n    }\n\n    /**\n     * Handles array argument processing when the function accepts multiple arguments,\n     *     and any of them can be an array argument.\n     * Example use for:\n     *         ROUND() or DATE().\n     *\n     * @return mixed[]\n     */\n    protected static function evaluateArrayArguments(callable $method, mixed ...$arguments): array\n    {\n        self::initialiseHelper($arguments);\n        $arguments = self::$arrayArgumentHelper->arguments();\n\n        return ArrayArgumentProcessor::processArguments(self::$arrayArgumentHelper, $method, ...$arguments);\n    }\n\n    /**\n     * Handles array argument processing when the function accepts multiple arguments,\n     *     but only the first few (up to limit) can be an array arguments.\n     * Example use for:\n     *         NETWORKDAYS() or CONCATENATE(), where the last argument is a matrix (or a series of values) that need\n     *                                         to be treated as a such rather than as an array arguments.\n     *\n     * @return mixed[]\n     */\n    protected static function evaluateArrayArgumentsSubset(callable $method, int $limit, mixed ...$arguments): array\n    {\n        self::initialiseHelper(array_slice($arguments, 0, $limit));\n        $trailingArguments = array_slice($arguments, $limit);\n        $arguments = self::$arrayArgumentHelper->arguments();\n        $arguments = array_merge($arguments, $trailingArguments);\n\n        return ArrayArgumentProcessor::processArguments(self::$arrayArgumentHelper, $method, ...$arguments);\n    }\n\n    private static function testFalse(mixed $value): bool\n    {\n        return $value === false;\n    }\n\n    /**\n     * Handles array argument processing when the function accepts multiple arguments,\n     *     but only the last few (from start) can be an array arguments.\n     * Example use for:\n     *         Z.TEST() or INDEX(), where the first argument 1 is a matrix that needs to be treated as a dataset\n     *                   rather than as an array argument.\n     *\n     * @return mixed[]\n     */\n    protected static function evaluateArrayArgumentsSubsetFrom(callable $method, int $start, mixed ...$arguments): array\n    {\n        $arrayArgumentsSubset = array_combine(\n            range($start, count($arguments) - $start),\n            array_slice($arguments, $start)\n        );\n        if (self::testFalse($arrayArgumentsSubset)) {\n            return ['#VALUE!'];\n        }\n\n        self::initialiseHelper($arrayArgumentsSubset);\n        $leadingArguments = array_slice($arguments, 0, $start);\n        $arguments = self::$arrayArgumentHelper->arguments();\n        $arguments = array_merge($leadingArguments, $arguments);\n\n        return ArrayArgumentProcessor::processArguments(self::$arrayArgumentHelper, $method, ...$arguments);\n    }\n\n    /**\n     * Handles array argument processing when the function accepts multiple arguments,\n     *     and any of them can be an array argument except for the one specified by ignore.\n     * Example use for:\n     *         HLOOKUP() and VLOOKUP(), where argument 1 is a matrix that needs to be treated as a database\n     *                                  rather than as an array argument.\n     *\n     * @return mixed[]\n     */\n    protected static function evaluateArrayArgumentsIgnore(callable $method, int $ignore, mixed ...$arguments): array\n    {\n        $leadingArguments = array_slice($arguments, 0, $ignore);\n        $ignoreArgument = array_slice($arguments, $ignore, 1);\n        $trailingArguments = array_slice($arguments, $ignore + 1);\n\n        self::initialiseHelper(array_merge($leadingArguments, [[null]], $trailingArguments));\n        $arguments = self::$arrayArgumentHelper->arguments();\n\n        array_splice($arguments, $ignore, 1, $ignoreArgument);\n\n        return ArrayArgumentProcessor::processArguments(self::$arrayArgumentHelper, $method, ...$arguments);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/BinaryComparison.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass BinaryComparison\n{\n    /**\n     * Epsilon Precision used for comparisons in calculations.\n     */\n    private const DELTA = 0.1e-12;\n\n    /**\n     * Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters.\n     *\n     * @param mixed $str1 First string value for the comparison, expect ?string\n     * @param mixed $str2 Second string value for the comparison, expect ?string\n     */\n    private static function strcmpLowercaseFirst(mixed $str1, mixed $str2): int\n    {\n        $str1 = StringHelper::convertToString($str1);\n        $str2 = StringHelper::convertToString($str2);\n        $inversedStr1 = StringHelper::strCaseReverse($str1);\n        $inversedStr2 = StringHelper::strCaseReverse($str2);\n\n        return strcmp($inversedStr1, $inversedStr2);\n    }\n\n    /**\n     * PHP8.1 deprecates passing null to strcmp.\n     *\n     * @param mixed $str1 First string value for the comparison, expect ?string\n     * @param mixed $str2 Second string value for the comparison, expect ?string\n     */\n    private static function strcmpAllowNull(mixed $str1, mixed $str2): int\n    {\n        $str1 = StringHelper::convertToString($str1);\n        $str2 = StringHelper::convertToString($str2);\n\n        return strcmp($str1, $str2);\n    }\n\n    public static function compare(mixed $operand1, mixed $operand2, string $operator): bool|string\n    {\n        //    Simple validate the two operands if they are string values\n        if (is_string($operand1) && $operand1 > '' && $operand1[0] == Calculation::FORMULA_STRING_QUOTE) {\n            $operand1 = Calculation::unwrapResult($operand1);\n        }\n        if (ErrorValue::isError($operand1, true)) {\n            /** @var string $operand1 */\n            return $operand1;\n        }\n        if (is_string($operand2) && $operand2 > '' && $operand2[0] == Calculation::FORMULA_STRING_QUOTE) {\n            $operand2 = Calculation::unwrapResult($operand2);\n        }\n        if (ErrorValue::isError($operand2, true)) {\n            /** @var string $operand2 */\n            return $operand2;\n        }\n\n        // Use case-insensitive comparison if not OpenOffice mode\n        if (Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) {\n            if (is_string($operand1)) {\n                $operand1 = StringHelper::strToUpper($operand1);\n            }\n            if (is_string($operand2)) {\n                $operand2 = StringHelper::strToUpper($operand2);\n            }\n        }\n\n        $useLowercaseFirstComparison = is_string($operand1)\n            && is_string($operand2)\n            && Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE;\n\n        return self::evaluateComparison($operand1, $operand2, $operator, $useLowercaseFirstComparison);\n    }\n\n    private static function evaluateComparison(mixed $operand1, mixed $operand2, string $operator, bool $useLowercaseFirstComparison): bool\n    {\n        return match ($operator) {\n            '=' => self::equal($operand1, $operand2),\n            '>' => self::greaterThan($operand1, $operand2, $useLowercaseFirstComparison),\n            '<' => self::lessThan($operand1, $operand2, $useLowercaseFirstComparison),\n            '>=' => self::greaterThanOrEqual($operand1, $operand2, $useLowercaseFirstComparison),\n            '<=' => self::lessThanOrEqual($operand1, $operand2, $useLowercaseFirstComparison),\n            '<>' => self::notEqual($operand1, $operand2),\n            default => throw new Exception('Unsupported binary comparison operator'),\n        };\n    }\n\n    private static function equal(mixed $operand1, mixed $operand2): bool\n    {\n        if (is_numeric($operand1) && is_numeric($operand2)) {\n            $result = (abs($operand1 - $operand2) < self::DELTA);\n        } elseif (($operand1 === null && is_numeric($operand2)) || ($operand2 === null && is_numeric($operand1))) {\n            $result = $operand1 == $operand2;\n        } else {\n            $result = self::strcmpAllowNull($operand1, $operand2) == 0;\n        }\n\n        return $result;\n    }\n\n    private static function greaterThanOrEqual(mixed $operand1, mixed $operand2, bool $useLowercaseFirstComparison): bool\n    {\n        if (is_numeric($operand1) && is_numeric($operand2)) {\n            $result = ((abs($operand1 - $operand2) < self::DELTA) || ($operand1 > $operand2));\n        } elseif (($operand1 === null && is_numeric($operand2)) || ($operand2 === null && is_numeric($operand1))) {\n            $result = $operand1 >= $operand2;\n        } elseif ($useLowercaseFirstComparison) {\n            $result = self::strcmpLowercaseFirst($operand1, $operand2) >= 0;\n        } else {\n            $result = self::strcmpAllowNull($operand1, $operand2) >= 0;\n        }\n\n        return $result;\n    }\n\n    private static function lessThanOrEqual(mixed $operand1, mixed $operand2, bool $useLowercaseFirstComparison): bool\n    {\n        if (is_numeric($operand1) && is_numeric($operand2)) {\n            $result = ((abs($operand1 - $operand2) < self::DELTA) || ($operand1 < $operand2));\n        } elseif (($operand1 === null && is_numeric($operand2)) || ($operand2 === null && is_numeric($operand1))) {\n            $result = $operand1 <= $operand2;\n        } elseif ($useLowercaseFirstComparison) {\n            $result = self::strcmpLowercaseFirst($operand1, $operand2) <= 0;\n        } else {\n            $result = self::strcmpAllowNull($operand1, $operand2) <= 0;\n        }\n\n        return $result;\n    }\n\n    private static function greaterThan(mixed $operand1, mixed $operand2, bool $useLowercaseFirstComparison): bool\n    {\n        return self::lessThanOrEqual($operand1, $operand2, $useLowercaseFirstComparison) !== true;\n    }\n\n    private static function lessThan(mixed $operand1, mixed $operand2, bool $useLowercaseFirstComparison): bool\n    {\n        return self::greaterThanOrEqual($operand1, $operand2, $useLowercaseFirstComparison) !== true;\n    }\n\n    private static function notEqual(mixed $operand1, mixed $operand2): bool\n    {\n        return self::equal($operand1, $operand2) !== true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Calculation.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nuse Composer\\Pcre\\Preg; // many pregs in this program use u modifier, which has side-effects which make it unsuitable for this\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\BranchPruner;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\CyclicReferenceStack;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\Logger;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\Operands;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Token\\Stack;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\ReferenceHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse ReflectionClassConstant;\nuse ReflectionMethod;\nuse ReflectionParameter;\nuse Throwable;\nuse TypeError;\n\nclass Calculation extends CalculationLocale\n{\n    /** Constants                */\n    /** Regular Expressions        */\n    //    Numeric operand\n    const CALCULATION_REGEXP_NUMBER = '[-+]?\\d*\\.?\\d+(e[-+]?\\d+)?';\n    //    String operand\n    const CALCULATION_REGEXP_STRING = '\"(?:[^\"]|\"\")*\"';\n    //    Opening bracket\n    const CALCULATION_REGEXP_OPENBRACE = '\\(';\n    //    Function (allow for the old @ symbol that could be used to prefix a function, but we'll ignore it)\n    const CALCULATION_REGEXP_FUNCTION = '@?(?:_xlfn\\.)?(?:_xlws\\.)?((?:__xludf\\.)?[\\p{L}][\\p{L}\\p{N}\\.]*)[\\s]*\\(';\n    //    Cell reference, with or without a sheet reference)\n    const CALCULATION_REGEXP_CELLREF = '((([^\\s,!&%^\\/\\*\\+<>=:`-]*)|(\\'(?:[^\\']|\\'[^!])+?\\')|(\\\"(?:[^\\\"]|\\\"[^!])+?\\\"))!)?\\$?\\b([a-z]{1,3})\\$?(\\d{1,7})(?![\\w.])';\n    // Used only to detect spill operator #\n    const CALCULATION_REGEXP_CELLREF_SPILL = '/' . self::CALCULATION_REGEXP_CELLREF . '#/i';\n    //    Cell reference (with or without a sheet reference) ensuring absolute/relative\n    const CALCULATION_REGEXP_CELLREF_RELATIVE = '((([^\\s\\(,!&%^\\/\\*\\+<>=:`-]*)|(\\'(?:[^\\']|\\'[^!])+?\\')|(\\\"(?:[^\\\"]|\\\"[^!])+?\\\"))!)?(\\$?\\b[a-z]{1,3})(\\$?\\d{1,7})(?![\\w.])';\n    const CALCULATION_REGEXP_COLUMN_RANGE = '(((([^\\s\\(,!&%^\\/\\*\\+<>=:`-]*)|(\\'(?:[^\\']|\\'[^!])+?\\')|(\\\".(?:[^\\\"]|\\\"[^!])?\\\"))!)?(\\$?[a-z]{1,3})):(?![.*])';\n    const CALCULATION_REGEXP_ROW_RANGE = '(((([^\\s\\(,!&%^\\/\\*\\+<>=:`-]*)|(\\'(?:[^\\']|\\'[^!])+?\\')|(\\\"(?:[^\\\"]|\\\"[^!])+?\\\"))!)?(\\$?[1-9][0-9]{0,6})):(?![.*])';\n    //    Cell reference (with or without a sheet reference) ensuring absolute/relative\n    //    Cell ranges ensuring absolute/relative\n    const CALCULATION_REGEXP_COLUMNRANGE_RELATIVE = '(\\$?[a-z]{1,3}):(\\$?[a-z]{1,3})';\n    const CALCULATION_REGEXP_ROWRANGE_RELATIVE = '(\\$?\\d{1,7}):(\\$?\\d{1,7})';\n    //    Defined Names: Named Range of cells, or Named Formulae\n    const CALCULATION_REGEXP_DEFINEDNAME = '((([^\\s,!&%^\\/\\*\\+<>=-]*)|(\\'(?:[^\\']|\\'[^!])+?\\')|(\\\"(?:[^\\\"]|\\\"[^!])+?\\\"))!)?([_\\p{L}][_\\p{L}\\p{N}\\.]*)';\n    // Structured Reference (Fully Qualified and Unqualified)\n    const CALCULATION_REGEXP_STRUCTURED_REFERENCE = '([\\p{L}_\\\\\\][\\p{L}\\p{N}\\._]+)?(\\[(?:[^\\d\\]+-])?)';\n    //    Error\n    const CALCULATION_REGEXP_ERROR = '\\#[A-Z][A-Z0_\\/]*[!\\?]?';\n\n    /** constants */\n    const RETURN_ARRAY_AS_ERROR = 'error';\n    const RETURN_ARRAY_AS_VALUE = 'value';\n    const RETURN_ARRAY_AS_ARRAY = 'array';\n\n    /** Preferable to use instance variable instanceArrayReturnType rather than this static property. */\n    private static string $returnArrayAsType = self::RETURN_ARRAY_AS_VALUE;\n\n    /** Preferable to use this instance variable rather than static returnArrayAsType */\n    private ?string $instanceArrayReturnType = null;\n\n    /**\n     * Instance of this class.\n     */\n    private static ?Calculation $instance = null;\n\n    /**\n     * Instance of the spreadsheet this Calculation Engine is using.\n     */\n    private ?Spreadsheet $spreadsheet;\n\n    /**\n     * Calculation cache.\n     *\n     * @var mixed[]\n     */\n    private array $calculationCache = [];\n\n    /**\n     * Calculation cache enabled.\n     */\n    private bool $calculationCacheEnabled = true;\n\n    private BranchPruner $branchPruner;\n\n    protected bool $branchPruningEnabled = true;\n\n    /**\n     * List of operators that can be used within formulae\n     * The true/false value indicates whether it is a binary operator or a unary operator.\n     */\n    private const CALCULATION_OPERATORS = [\n        '+' => true, '-' => true, '*' => true, '/' => true,\n        '^' => true, '&' => true, '%' => false, '~' => false,\n        '>' => true, '<' => true, '=' => true, '>=' => true,\n        '<=' => true, '<>' => true, '∩' => true, '∪' => true,\n        ':' => true,\n    ];\n\n    /**\n     * List of binary operators (those that expect two operands).\n     */\n    private const BINARY_OPERATORS = [\n        '+' => true, '-' => true, '*' => true, '/' => true,\n        '^' => true, '&' => true, '>' => true, '<' => true,\n        '=' => true, '>=' => true, '<=' => true, '<>' => true,\n        '∩' => true, '∪' => true, ':' => true,\n    ];\n\n    /**\n     * The debug log generated by the calculation engine.\n     */\n    private Logger $debugLog;\n\n    private bool $suppressFormulaErrors = false;\n\n    private bool $processingAnchorArray = false;\n\n    /**\n     * Error message for any error that was raised/thrown by the calculation engine.\n     */\n    public ?string $formulaError = null;\n\n    /**\n     * An array of the nested cell references accessed by the calculation engine, used for the debug log.\n     */\n    private CyclicReferenceStack $cyclicReferenceStack;\n\n    /** @var mixed[] */\n    private array $cellStack = [];\n\n    /**\n     * Current iteration counter for cyclic formulae\n     * If the value is 0 (or less) then cyclic formulae will throw an exception,\n     * otherwise they will iterate to the limit defined here before returning a result.\n     */\n    private int $cyclicFormulaCounter = 1;\n\n    private string $cyclicFormulaCell = '';\n\n    /**\n     * Number of iterations for cyclic formulae.\n     */\n    public int $cyclicFormulaCount = 1;\n\n    /**\n     * Excel constant string translations to their PHP equivalents\n     * Constant conversion from text name/value to actual (datatyped) value.\n     */\n    private const EXCEL_CONSTANTS = [\n        'TRUE' => true,\n        'FALSE' => false,\n        'NULL' => null,\n    ];\n\n    public static function keyInExcelConstants(string $key): bool\n    {\n        return array_key_exists($key, self::EXCEL_CONSTANTS);\n    }\n\n    public static function getExcelConstants(string $key): bool|null\n    {\n        return self::EXCEL_CONSTANTS[$key];\n    }\n\n    /**\n     *    Internal functions used for special control purposes.\n     *\n     * @var array<string, array<string, array<string>|string>>\n     */\n    private static array $controlFunctions = [\n        'MKMATRIX' => [\n            'argumentCount' => '*',\n            'functionCall' => [Internal\\MakeMatrix::class, 'make'],\n        ],\n        'NAME.ERROR' => [\n            'argumentCount' => '*',\n            'functionCall' => [ExcelError::class, 'NAME'],\n        ],\n        'WILDCARDMATCH' => [\n            'argumentCount' => '2',\n            'functionCall' => [Internal\\WildcardMatch::class, 'compare'],\n        ],\n    ];\n\n    public function __construct(?Spreadsheet $spreadsheet = null)\n    {\n        $this->spreadsheet = $spreadsheet;\n        $this->cyclicReferenceStack = new CyclicReferenceStack();\n        $this->debugLog = new Logger($this->cyclicReferenceStack);\n        $this->branchPruner = new BranchPruner($this->branchPruningEnabled);\n    }\n\n    /**\n     * Get an instance of this class.\n     *\n     * @param ?Spreadsheet $spreadsheet Injected spreadsheet for working with a PhpSpreadsheet Spreadsheet object,\n     *                                    or NULL to create a standalone calculation engine\n     */\n    public static function getInstance(?Spreadsheet $spreadsheet = null): self\n    {\n        if ($spreadsheet !== null) {\n            return $spreadsheet->getCalculationEngine();\n        }\n\n        if (!self::$instance) {\n            self::$instance = new self();\n        }\n\n        return self::$instance;\n    }\n\n    /**\n     * Intended for use only via a destructor.\n     *\n     * @internal\n     */\n    public static function getInstanceOrNull(?Spreadsheet $spreadsheet = null): ?self\n    {\n        if ($spreadsheet !== null) {\n            return $spreadsheet->getCalculationEngineOrNull();\n        }\n\n        return null;\n    }\n\n    /**\n     * Flush the calculation cache for any existing instance of this class\n     *        but only if a Calculation instance exists.\n     */\n    public function flushInstance(): void\n    {\n        $this->clearCalculationCache();\n        $this->branchPruner->clearBranchStore();\n    }\n\n    /**\n     * Get the Logger for this calculation engine instance.\n     */\n    public function getDebugLog(): Logger\n    {\n        return $this->debugLog;\n    }\n\n    /**\n     * __clone implementation. Cloning should not be allowed in a Singleton!\n     */\n    final public function __clone()\n    {\n        throw new Exception('Cloning the calculation engine is not allowed!');\n    }\n\n    /**\n     * Set the Array Return Type (Array or Value of first element in the array).\n     *\n     * @param string $returnType Array return type\n     *\n     * @return bool Success or failure\n     */\n    public static function setArrayReturnType(string $returnType): bool\n    {\n        if (\n            ($returnType == self::RETURN_ARRAY_AS_VALUE)\n            || ($returnType == self::RETURN_ARRAY_AS_ERROR)\n            || ($returnType == self::RETURN_ARRAY_AS_ARRAY)\n        ) {\n            self::$returnArrayAsType = $returnType;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Return the Array Return Type (Array or Value of first element in the array).\n     *\n     * @return string $returnType Array return type\n     */\n    public static function getArrayReturnType(): string\n    {\n        return self::$returnArrayAsType;\n    }\n\n    /**\n     * Set the Instance Array Return Type (Array or Value of first element in the array).\n     *\n     * @param string $returnType Array return type\n     *\n     * @return bool Success or failure\n     */\n    public function setInstanceArrayReturnType(string $returnType): bool\n    {\n        if (\n            ($returnType == self::RETURN_ARRAY_AS_VALUE)\n            || ($returnType == self::RETURN_ARRAY_AS_ERROR)\n            || ($returnType == self::RETURN_ARRAY_AS_ARRAY)\n        ) {\n            $this->instanceArrayReturnType = $returnType;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Return the Array Return Type (Array or Value of first element in the array).\n     *\n     * @return string $returnType Array return type for instance if non-null, otherwise static property\n     */\n    public function getInstanceArrayReturnType(): string\n    {\n        return $this->instanceArrayReturnType ?? self::$returnArrayAsType;\n    }\n\n    /**\n     * Is calculation caching enabled?\n     */\n    public function getCalculationCacheEnabled(): bool\n    {\n        return $this->calculationCacheEnabled;\n    }\n\n    /**\n     * Enable/disable calculation cache.\n     */\n    public function setCalculationCacheEnabled(bool $calculationCacheEnabled): self\n    {\n        $this->calculationCacheEnabled = $calculationCacheEnabled;\n        $this->clearCalculationCache();\n\n        return $this;\n    }\n\n    /**\n     * Enable calculation cache.\n     */\n    public function enableCalculationCache(): void\n    {\n        $this->setCalculationCacheEnabled(true);\n    }\n\n    /**\n     * Disable calculation cache.\n     */\n    public function disableCalculationCache(): void\n    {\n        $this->setCalculationCacheEnabled(false);\n    }\n\n    /**\n     * Clear calculation cache.\n     */\n    public function clearCalculationCache(): void\n    {\n        $this->calculationCache = [];\n    }\n\n    /**\n     * Clear calculation cache for a specified worksheet.\n     */\n    public function clearCalculationCacheForWorksheet(string $worksheetName): void\n    {\n        if (isset($this->calculationCache[$worksheetName])) {\n            unset($this->calculationCache[$worksheetName]);\n        }\n    }\n\n    /**\n     * Rename calculation cache for a specified worksheet.\n     */\n    public function renameCalculationCacheForWorksheet(string $fromWorksheetName, string $toWorksheetName): void\n    {\n        if (isset($this->calculationCache[$fromWorksheetName])) {\n            $this->calculationCache[$toWorksheetName] = &$this->calculationCache[$fromWorksheetName];\n            unset($this->calculationCache[$fromWorksheetName]);\n        }\n    }\n\n    public function getBranchPruningEnabled(): bool\n    {\n        return $this->branchPruningEnabled;\n    }\n\n    public function setBranchPruningEnabled(mixed $enabled): self\n    {\n        $this->branchPruningEnabled = (bool) $enabled;\n        $this->branchPruner = new BranchPruner($this->branchPruningEnabled);\n\n        return $this;\n    }\n\n    public function enableBranchPruning(): void\n    {\n        $this->setBranchPruningEnabled(true);\n    }\n\n    public function disableBranchPruning(): void\n    {\n        $this->setBranchPruningEnabled(false);\n    }\n\n    /**\n     * Wrap string values in quotes.\n     */\n    public static function wrapResult(mixed $value): mixed\n    {\n        if (is_string($value)) {\n            //    Error values cannot be \"wrapped\"\n            if (Preg::isMatch('/^' . self::CALCULATION_REGEXP_ERROR . '$/i', $value, $match)) {\n                //    Return Excel errors \"as is\"\n                return $value;\n            }\n\n            //    Return strings wrapped in quotes\n            return self::FORMULA_STRING_QUOTE . $value . self::FORMULA_STRING_QUOTE;\n        } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) {\n            //    Convert numeric errors to NaN error\n            return ExcelError::NAN();\n        }\n\n        return $value;\n    }\n\n    /**\n     * Remove quotes used as a wrapper to identify string values.\n     */\n    public static function unwrapResult(mixed $value): mixed\n    {\n        if (is_string($value)) {\n            if ((isset($value[0])) && ($value[0] == self::FORMULA_STRING_QUOTE) && (substr($value, -1) == self::FORMULA_STRING_QUOTE)) {\n                return substr($value, 1, -1);\n            }\n            //    Convert numeric errors to NAN error\n        } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) {\n            return ExcelError::NAN();\n        }\n\n        return $value;\n    }\n\n    /**\n     * Calculate cell value (using formula from a cell ID)\n     * Retained for backward compatibility.\n     *\n     * @param ?Cell $cell Cell to calculate\n     */\n    public function calculate(?Cell $cell = null): mixed\n    {\n        try {\n            return $this->calculateCellValue($cell);\n        } catch (\\Exception $e) {\n            throw new Exception($e->getMessage());\n        }\n    }\n\n    /**\n     * Calculate the value of a cell formula.\n     *\n     * @param ?Cell $cell Cell to calculate\n     * @param bool $resetLog Flag indicating whether the debug log should be reset or not\n     */\n    public function calculateCellValue(?Cell $cell = null, bool $resetLog = true): mixed\n    {\n        if ($cell === null) {\n            return null;\n        }\n\n        if ($resetLog) {\n            //    Initialise the logging settings if requested\n            $this->formulaError = null;\n            $this->debugLog->clearLog();\n            $this->cyclicReferenceStack->clear();\n            $this->cyclicFormulaCounter = 1;\n        }\n\n        //    Execute the calculation for the cell formula\n        $this->cellStack[] = [\n            'sheet' => $cell->getWorksheet()->getTitle(),\n            'cell' => $cell->getCoordinate(),\n        ];\n\n        $cellAddressAttempted = false;\n        $cellAddress = null;\n\n        try {\n            $value = $cell->getValue();\n            if (is_string($value) && $cell->getDataType() === DataType::TYPE_FORMULA) {\n                $value = Preg::replaceCallback(\n                    self::CALCULATION_REGEXP_CELLREF_SPILL,\n                    fn (array $matches) => 'ANCHORARRAY(' . substr($matches[0], 0, -1) . ')',\n                    $value\n                );\n            }\n            $result = self::unwrapResult($this->_calculateFormulaValue($value, $cell->getCoordinate(), $cell)); //* @phpstan-ignore-line\n            if ($this->spreadsheet === null) {\n                throw new Exception('null spreadsheet in calculateCellValue');\n            }\n            $cellAddressAttempted = true;\n            $cellAddress = array_pop($this->cellStack);\n            if ($cellAddress === null) {\n                throw new Exception('null cellAddress in calculateCellValue');\n            }\n            /** @var array{sheet: string, cell: string} $cellAddress */\n            $testSheet = $this->spreadsheet->getSheetByName($cellAddress['sheet']);\n            if ($testSheet === null) {\n                throw new Exception('worksheet not found in calculateCellValue');\n            }\n            $testSheet->getCell($cellAddress['cell']);\n        } catch (\\Exception $e) {\n            if (!$cellAddressAttempted) {\n                $cellAddress = array_pop($this->cellStack);\n            }\n            if ($this->spreadsheet !== null && is_array($cellAddress) && array_key_exists('sheet', $cellAddress)) {\n                $sheetName = $cellAddress['sheet'] ?? null;\n                $testSheet = is_string($sheetName) ? $this->spreadsheet->getSheetByName($sheetName) : null;\n                if ($testSheet !== null && array_key_exists('cell', $cellAddress)) {\n                    /** @var array{cell: string} $cellAddress */\n                    $testSheet->getCell($cellAddress['cell']);\n                }\n            }\n\n            throw new Exception($e->getMessage(), $e->getCode(), $e);\n        }\n\n        if (is_array($result) && $this->getInstanceArrayReturnType() !== self::RETURN_ARRAY_AS_ARRAY) {\n            $testResult = Functions::flattenArray($result);\n            if ($this->getInstanceArrayReturnType() == self::RETURN_ARRAY_AS_ERROR) {\n                return ExcelError::VALUE();\n            }\n            $result = array_shift($testResult);\n        }\n\n        if ($result === null && $cell->getWorksheet()->getSheetView()->getShowZeros()) {\n            return 0;\n        } elseif ((is_float($result)) && ((is_nan($result)) || (is_infinite($result)))) {\n            return ExcelError::NAN();\n        }\n\n        return $result;\n    }\n\n    /**\n     * Validate and parse a formula string.\n     *\n     * @param string $formula Formula to parse\n     *\n     * @return array<mixed>|bool\n     */\n    public function parseFormula(string $formula): array|bool\n    {\n        $formula = Preg::replaceCallback(\n            self::CALCULATION_REGEXP_CELLREF_SPILL,\n            fn (array $matches) => 'ANCHORARRAY(' . substr($matches[0], 0, -1) . ')',\n            $formula\n        );\n        //    Basic validation that this is indeed a formula\n        //    We return an empty array if not\n        $formula = trim($formula);\n        if ((!isset($formula[0])) || ($formula[0] != '=')) {\n            return [];\n        }\n        $formula = ltrim(substr($formula, 1));\n        if (!isset($formula[0])) {\n            return [];\n        }\n\n        //    Parse the formula and return the token stack\n        return $this->internalParseFormula($formula);\n    }\n\n    /**\n     * Calculate the value of a formula.\n     *\n     * @param string $formula Formula to parse\n     * @param ?string $cellID Address of the cell to calculate\n     * @param ?Cell $cell Cell to calculate\n     */\n    public function calculateFormula(string $formula, ?string $cellID = null, ?Cell $cell = null): mixed\n    {\n        //    Initialise the logging settings\n        $this->formulaError = null;\n        $this->debugLog->clearLog();\n        $this->cyclicReferenceStack->clear();\n\n        $resetCache = $this->getCalculationCacheEnabled();\n        if ($this->spreadsheet !== null && $cellID === null && $cell === null) {\n            $cellID = 'A1';\n            $cell = $this->spreadsheet->getActiveSheet()->getCell($cellID);\n        } else {\n            //    Disable calculation cacheing because it only applies to cell calculations, not straight formulae\n            //    But don't actually flush any cache\n            $this->calculationCacheEnabled = false;\n        }\n\n        //    Execute the calculation\n        try {\n            $result = self::unwrapResult($this->_calculateFormulaValue($formula, $cellID, $cell));\n        } catch (\\Exception $e) {\n            throw new Exception($e->getMessage());\n        }\n\n        if ($this->spreadsheet === null) {\n            //    Reset calculation cacheing to its previous state\n            $this->calculationCacheEnabled = $resetCache;\n        }\n\n        return $result;\n    }\n\n    public function getValueFromCache(string $cellReference, mixed &$cellValue): bool\n    {\n        $this->debugLog->writeDebugLog('Testing cache value for cell %s', $cellReference);\n        // Is calculation cacheing enabled?\n        // If so, is the required value present in calculation cache?\n        if (($this->calculationCacheEnabled) && (isset($this->calculationCache[$cellReference]))) {\n            $this->debugLog->writeDebugLog('Retrieving value for cell %s from cache', $cellReference);\n            // Return the cached result\n\n            $cellValue = $this->calculationCache[$cellReference];\n\n            return true;\n        }\n\n        return false;\n    }\n\n    public function saveValueToCache(string $cellReference, mixed $cellValue): void\n    {\n        if ($this->calculationCacheEnabled) {\n            $this->calculationCache[$cellReference] = $cellValue;\n        }\n    }\n\n    /**\n     * Parse a cell formula and calculate its value.\n     *\n     * @param string $formula The formula to parse and calculate\n     * @param ?string $cellID The ID (e.g. A3) of the cell that we are calculating\n     * @param ?Cell $cell Cell to calculate\n     * @param bool $ignoreQuotePrefix If set to true, evaluate the formyla even if the referenced cell is quote prefixed\n     */\n    public function _calculateFormulaValue(string $formula, ?string $cellID = null, ?Cell $cell = null, bool $ignoreQuotePrefix = false): mixed\n    {\n        $cellValue = null;\n\n        //  Quote-Prefixed cell values cannot be formulae, but are treated as strings\n        if ($cell !== null && $ignoreQuotePrefix === false && $cell->getStyle()->getQuotePrefix() === true) {\n            return self::wrapResult((string) $formula);\n        }\n\n        // https://www.reddit.com/r/excel/comments/chr41y/cmd_formula_stopped_working_since_last_update/\n        if (preg_match('/^=\\s*cmd\\s*\\|/miu', $formula) !== 0) {\n            return ExcelError::REF(); // returns #BLOCKED in newer versions\n        }\n\n        //    Basic validation that this is indeed a formula\n        //    We simply return the cell value if not\n        $formula = trim($formula);\n        if ($formula === '' || $formula[0] !== '=') {\n            return self::wrapResult($formula);\n        }\n        $formula = ltrim(substr($formula, 1));\n        if (!isset($formula[0])) {\n            return self::wrapResult($formula);\n        }\n\n        $pCellParent = ($cell !== null) ? $cell->getWorksheet() : null;\n        $wsTitle = ($pCellParent !== null) ? $pCellParent->getTitle() : \"\\x00Wrk\";\n        $wsCellReference = $wsTitle . '!' . $cellID;\n\n        if (($cellID !== null) && ($this->getValueFromCache($wsCellReference, $cellValue))) {\n            return $cellValue;\n        }\n        $this->debugLog->writeDebugLog('Evaluating formula for cell %s', $wsCellReference);\n\n        if (($wsTitle[0] !== \"\\x00\") && ($this->cyclicReferenceStack->onStack($wsCellReference))) {\n            if ($this->cyclicFormulaCount <= 0) {\n                $this->cyclicFormulaCell = '';\n\n                return $this->raiseFormulaError('Cyclic Reference in Formula');\n            } elseif ($this->cyclicFormulaCell === $wsCellReference) {\n                ++$this->cyclicFormulaCounter;\n                if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) {\n                    $this->cyclicFormulaCell = '';\n\n                    return $cellValue;\n                }\n            } elseif ($this->cyclicFormulaCell == '') {\n                if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) {\n                    return $cellValue;\n                }\n                $this->cyclicFormulaCell = $wsCellReference;\n            }\n        }\n\n        $this->debugLog->writeDebugLog('Formula for cell %s is %s', $wsCellReference, $formula);\n        //    Parse the formula onto the token stack and calculate the value\n        $this->cyclicReferenceStack->push($wsCellReference);\n\n        $cellValue = $this->processTokenStack($this->internalParseFormula($formula, $cell), $cellID, $cell);\n        $this->cyclicReferenceStack->pop();\n\n        // Save to calculation cache\n        if ($cellID !== null) {\n            $this->saveValueToCache($wsCellReference, $cellValue);\n        }\n\n        //    Return the calculated value\n        return $cellValue;\n    }\n\n    /**\n     * Ensure that paired matrix operands are both matrices and of the same size.\n     *\n     * @param mixed $operand1 First matrix operand\n     *\n     * @param-out mixed[] $operand1\n     *\n     * @param mixed $operand2 Second matrix operand\n     *\n     * @param-out mixed[] $operand2\n     *\n     * @param int $resize Flag indicating whether the matrices should be resized to match\n     *                                        and (if so), whether the smaller dimension should grow or the\n     *                                        larger should shrink.\n     *                                            0 = no resize\n     *                                            1 = shrink to fit\n     *                                            2 = extend to fit\n     *\n     * @return mixed[]\n     */\n    public static function checkMatrixOperands(mixed &$operand1, mixed &$operand2, int $resize = 1): array\n    {\n        //    Examine each of the two operands, and turn them into an array if they aren't one already\n        //    Note that this function should only be called if one or both of the operand is already an array\n        if (!is_array($operand1)) {\n            if (is_array($operand2)) {\n                [$matrixRows, $matrixColumns] = self::getMatrixDimensions($operand2);\n                $operand1 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand1));\n                $resize = 0;\n            } else {\n                $operand1 = [$operand1];\n                $operand2 = [$operand2];\n            }\n        } elseif (!is_array($operand2)) {\n            [$matrixRows, $matrixColumns] = self::getMatrixDimensions($operand1);\n            $operand2 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand2));\n            $resize = 0;\n        }\n\n        [$matrix1Rows, $matrix1Columns] = self::getMatrixDimensions($operand1);\n        [$matrix2Rows, $matrix2Columns] = self::getMatrixDimensions($operand2);\n        if ($resize === 3) {\n            $resize = 2;\n        } elseif (($matrix1Rows == $matrix2Columns) && ($matrix2Rows == $matrix1Columns)) {\n            $resize = 1;\n        }\n\n        if ($resize == 2) {\n            //    Given two matrices of (potentially) unequal size, convert the smaller in each dimension to match the larger\n            self::resizeMatricesExtend($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns);\n        } elseif ($resize == 1) {\n            //    Given two matrices of (potentially) unequal size, convert the larger in each dimension to match the smaller\n            /** @var mixed[][] $operand1 */\n            /** @var mixed[][] $operand2 */\n            self::resizeMatricesShrink($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns);\n        }\n        [$matrix1Rows, $matrix1Columns] = self::getMatrixDimensions($operand1);\n        [$matrix2Rows, $matrix2Columns] = self::getMatrixDimensions($operand2);\n\n        return [$matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns];\n    }\n\n    /**\n     * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0.\n     *\n     * @param mixed[] $matrix matrix operand\n     *\n     * @return int[] An array comprising the number of rows, and number of columns\n     */\n    public static function getMatrixDimensions(array &$matrix): array\n    {\n        $matrixRows = count($matrix);\n        $matrixColumns = 0;\n        foreach ($matrix as $rowKey => $rowValue) {\n            if (!is_array($rowValue)) {\n                $matrix[$rowKey] = [$rowValue];\n                $matrixColumns = max(1, $matrixColumns);\n            } else {\n                $matrix[$rowKey] = array_values($rowValue);\n                $matrixColumns = max(count($rowValue), $matrixColumns);\n            }\n        }\n        $matrix = array_values($matrix);\n\n        return [$matrixRows, $matrixColumns];\n    }\n\n    /**\n     * Ensure that paired matrix operands are both matrices of the same size.\n     *\n     * @param mixed[][] $matrix1 First matrix operand\n     * @param mixed[][] $matrix2 Second matrix operand\n     * @param int $matrix1Rows Row size of first matrix operand\n     * @param int $matrix1Columns Column size of first matrix operand\n     * @param int $matrix2Rows Row size of second matrix operand\n     * @param int $matrix2Columns Column size of second matrix operand\n     */\n    private static function resizeMatricesShrink(array &$matrix1, array &$matrix2, int $matrix1Rows, int $matrix1Columns, int $matrix2Rows, int $matrix2Columns): void\n    {\n        if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {\n            if ($matrix2Rows < $matrix1Rows) {\n                for ($i = $matrix2Rows; $i < $matrix1Rows; ++$i) {\n                    unset($matrix1[$i]);\n                }\n            }\n            if ($matrix2Columns < $matrix1Columns) {\n                for ($i = 0; $i < $matrix1Rows; ++$i) {\n                    for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) {\n                        unset($matrix1[$i][$j]);\n                    }\n                }\n            }\n        }\n\n        if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) {\n            if ($matrix1Rows < $matrix2Rows) {\n                for ($i = $matrix1Rows; $i < $matrix2Rows; ++$i) {\n                    unset($matrix2[$i]);\n                }\n            }\n            if ($matrix1Columns < $matrix2Columns) {\n                for ($i = 0; $i < $matrix2Rows; ++$i) {\n                    for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) {\n                        unset($matrix2[$i][$j]);\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * Ensure that paired matrix operands are both matrices of the same size.\n     *\n     * @param mixed[] $matrix1 First matrix operand\n     * @param mixed[] $matrix2 Second matrix operand\n     * @param int $matrix1Rows Row size of first matrix operand\n     * @param int $matrix1Columns Column size of first matrix operand\n     * @param int $matrix2Rows Row size of second matrix operand\n     * @param int $matrix2Columns Column size of second matrix operand\n     */\n    private static function resizeMatricesExtend(array &$matrix1, array &$matrix2, int $matrix1Rows, int $matrix1Columns, int $matrix2Rows, int $matrix2Columns): void\n    {\n        if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {\n            if ($matrix2Columns < $matrix1Columns) {\n                for ($i = 0; $i < $matrix2Rows; ++$i) {\n                    /** @var mixed[][] $matrix2 */\n                    $x = ($matrix2Columns === 1) ? $matrix2[$i][0] : null;\n                    for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) {\n                        $matrix2[$i][$j] = $x;\n                    }\n                }\n            }\n            if ($matrix2Rows < $matrix1Rows) {\n                $x = ($matrix2Rows === 1) ? $matrix2[0] : array_fill(0, $matrix2Columns, null);\n                for ($i = $matrix2Rows; $i < $matrix1Rows; ++$i) {\n                    $matrix2[$i] = $x;\n                }\n            }\n        }\n\n        if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) {\n            if ($matrix1Columns < $matrix2Columns) {\n                for ($i = 0; $i < $matrix1Rows; ++$i) {\n                    /** @var mixed[][] $matrix1 */\n                    $x = ($matrix1Columns === 1) ? $matrix1[$i][0] : null;\n                    for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) {\n                        $matrix1[$i][$j] = $x;\n                    }\n                }\n            }\n            if ($matrix1Rows < $matrix2Rows) {\n                $x = ($matrix1Rows === 1) ? $matrix1[0] : array_fill(0, $matrix2Columns, null);\n                for ($i = $matrix1Rows; $i < $matrix2Rows; ++$i) {\n                    $matrix1[$i] = $x;\n                }\n            }\n        }\n    }\n\n    /**\n     * Format details of an operand for display in the log (based on operand type).\n     *\n     * @param mixed $value First matrix operand\n     */\n    private function showValue(mixed $value): mixed\n    {\n        if ($this->debugLog->getWriteDebugLog()) {\n            $testArray = Functions::flattenArray($value);\n            if (count($testArray) == 1) {\n                $value = array_pop($testArray);\n            }\n\n            if (is_array($value)) {\n                $returnMatrix = [];\n                $pad = $rpad = ', ';\n                foreach ($value as $row) {\n                    if (is_array($row)) {\n                        $returnMatrix[] = implode($pad, array_map([$this, 'showValue'], $row));\n                        $rpad = '; ';\n                    } else {\n                        $returnMatrix[] = $this->showValue($row);\n                    }\n                }\n\n                return '{ ' . implode($rpad, $returnMatrix) . ' }';\n            } elseif (is_string($value) && (trim($value, self::FORMULA_STRING_QUOTE) == $value)) {\n                return self::FORMULA_STRING_QUOTE . $value . self::FORMULA_STRING_QUOTE;\n            } elseif (is_bool($value)) {\n                return ($value) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE'];\n            } elseif ($value === null) {\n                return self::$localeBoolean['NULL'];\n            }\n        }\n\n        return Functions::flattenSingleValue($value);\n    }\n\n    /**\n     * Format type and details of an operand for display in the log (based on operand type).\n     *\n     * @param mixed $value First matrix operand\n     */\n    private function showTypeDetails(mixed $value): ?string\n    {\n        if ($this->debugLog->getWriteDebugLog()) {\n            $testArray = Functions::flattenArray($value);\n            if (count($testArray) == 1) {\n                $value = array_pop($testArray);\n            }\n\n            if ($value === null) {\n                return 'a NULL value';\n            } elseif (is_float($value)) {\n                $typeString = 'a floating point number';\n            } elseif (is_int($value)) {\n                $typeString = 'an integer number';\n            } elseif (is_bool($value)) {\n                $typeString = 'a boolean';\n            } elseif (is_array($value)) {\n                $typeString = 'a matrix';\n            } else {\n                /** @var string $value */\n                if ($value == '') {\n                    return 'an empty string';\n                } elseif ($value[0] == '#') {\n                    return 'a ' . $value . ' error';\n                }\n                $typeString = 'a string';\n            }\n\n            return $typeString . ' with a value of ' . StringHelper::convertToString($this->showValue($value));\n        }\n\n        return null;\n    }\n\n    private const MATRIX_REPLACE_FROM = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE];\n    private const MATRIX_REPLACE_TO = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];\n\n    /**\n     * @return false|string False indicates an error\n     */\n    private function convertMatrixReferences(string $formula): false|string\n    {\n        //    Convert any Excel matrix references to the MKMATRIX() function\n        if (str_contains($formula, self::FORMULA_OPEN_MATRIX_BRACE)) {\n            //    If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators\n            if (str_contains($formula, self::FORMULA_STRING_QUOTE)) {\n                //    So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded\n                //        the formula\n                $temp = explode(self::FORMULA_STRING_QUOTE, $formula);\n                //    Open and Closed counts used for trapping mismatched braces in the formula\n                $openCount = $closeCount = 0;\n                $notWithinQuotes = false;\n                foreach ($temp as &$value) {\n                    //    Only count/replace in alternating array entries\n                    $notWithinQuotes = $notWithinQuotes === false;\n                    if ($notWithinQuotes === true) {\n                        $openCount += substr_count($value, self::FORMULA_OPEN_MATRIX_BRACE);\n                        $closeCount += substr_count($value, self::FORMULA_CLOSE_MATRIX_BRACE);\n                        $value = str_replace(self::MATRIX_REPLACE_FROM, self::MATRIX_REPLACE_TO, $value);\n                    }\n                }\n                unset($value);\n                //    Then rebuild the formula string\n                $formula = implode(self::FORMULA_STRING_QUOTE, $temp);\n            } else {\n                //    If there's no quoted strings, then we do a simple count/replace\n                $openCount = substr_count($formula, self::FORMULA_OPEN_MATRIX_BRACE);\n                $closeCount = substr_count($formula, self::FORMULA_CLOSE_MATRIX_BRACE);\n                $formula = str_replace(self::MATRIX_REPLACE_FROM, self::MATRIX_REPLACE_TO, $formula);\n            }\n            //    Trap for mismatched braces and trigger an appropriate error\n            if ($openCount < $closeCount) {\n                if ($openCount > 0) {\n                    return $this->raiseFormulaError(\"Formula Error: Mismatched matrix braces '}'\");\n                }\n\n                return $this->raiseFormulaError(\"Formula Error: Unexpected '}' encountered\");\n            } elseif ($openCount > $closeCount) {\n                if ($closeCount > 0) {\n                    return $this->raiseFormulaError(\"Formula Error: Mismatched matrix braces '{'\");\n                }\n\n                return $this->raiseFormulaError(\"Formula Error: Unexpected '{' encountered\");\n            }\n        }\n\n        return $formula;\n    }\n\n    /**\n     *    Comparison (Boolean) Operators.\n     *    These operators work on two values, but always return a boolean result.\n     */\n    private const COMPARISON_OPERATORS = ['>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true];\n\n    /**\n     *    Operator Precedence.\n     *    This list includes all valid operators, whether binary (including boolean) or unary (such as %).\n     *    Array key is the operator, the value is its precedence.\n     */\n    private const OPERATOR_PRECEDENCE = [\n        ':' => 9, //    Range\n        '∩' => 8, //    Intersect\n        '∪' => 7, //    Union\n        '~' => 6, //    Negation\n        '%' => 5, //    Percentage\n        '^' => 4, //    Exponentiation\n        '*' => 3, '/' => 3, //    Multiplication and Division\n        '+' => 2, '-' => 2, //    Addition and Subtraction\n        '&' => 1, //    Concatenation\n        '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0, //    Comparison\n    ];\n\n    /** @param string[] $matches */\n    private static function unionForComma(array $matches): string\n    {\n        return $matches[1] . str_replace(',', '∪', $matches[2]);\n    }\n\n    private const CELL_OR_CELLRANGE_OR_DEFINED_NAME\n        = '(?:'\n        . self::CALCULATION_REGEXP_CELLREF // cell address\n        . '(?::' . self::CALCULATION_REGEXP_CELLREF . ')?' // optional range address, non-capturing\n        . '|' . self::CALCULATION_REGEXP_DEFINEDNAME\n        . ')'\n        ;\n\n    public const UNIONABLE_COMMAS = '/((?:[,(]|^)\\s*)' // comma or open paren or start of string, followed by optional whitespace\n        . '([(]' // open paren\n        . self::CELL_OR_CELLRANGE_OR_DEFINED_NAME // cell address\n        . '(?:\\s*,\\s*' // optioonal whitespace, comma, optional whitespace, non-capturing\n        . self::CELL_OR_CELLRANGE_OR_DEFINED_NAME // cell address\n        . ')+' // one or more occurrences\n        . '\\s*[)])/i'; // optional whitespace, end paren\n\n    /**\n     * @return array<int, mixed>|false\n     */\n    private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array\n    {\n        if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {\n            return false;\n        }\n\n        $oldFormula = $formula;\n        $formula = Preg::replaceCallback(self::UNIONABLE_COMMAS, self::unionForComma(...), $formula); // @phpstan-ignore-line\n        if ($oldFormula !== $formula) {\n            $this->debugLog->writeDebugLog('Reformulated as %s', $formula);\n        }\n        $phpSpreadsheetFunctions = &self::getFunctionsAddress();\n\n        //    If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent worksheet),\n        //        so we store the parent worksheet so that we can re-attach it when necessary\n        $pCellParent = ($cell !== null) ? $cell->getWorksheet() : null;\n\n        $regexpMatchString = '/^((?<string>' . self::CALCULATION_REGEXP_STRING\n                                . ')|(?<function>' . self::CALCULATION_REGEXP_FUNCTION\n                                . ')|(?<cellRef>' . self::CALCULATION_REGEXP_CELLREF\n                                . ')|(?<colRange>' . self::CALCULATION_REGEXP_COLUMN_RANGE\n                                . ')|(?<rowRange>' . self::CALCULATION_REGEXP_ROW_RANGE\n                                . ')|(?<number>' . self::CALCULATION_REGEXP_NUMBER\n                                . ')|(?<openBrace>' . self::CALCULATION_REGEXP_OPENBRACE\n                                . ')|(?<structuredReference>' . self::CALCULATION_REGEXP_STRUCTURED_REFERENCE\n                                . ')|(?<definedName>' . self::CALCULATION_REGEXP_DEFINEDNAME\n                                . ')|(?<error>' . self::CALCULATION_REGEXP_ERROR\n                                . '))/sui';\n\n        //    Start with initialisation\n        $index = 0;\n        $stack = new Stack($this->branchPruner);\n        $output = [];\n        $expectingOperator = false; //    We use this test in syntax-checking the expression to determine when a\n        //        - is a negation or + is a positive operator rather than an operation\n        $expectingOperand = false; //    We use this test in syntax-checking the expression to determine whether an operand\n        //        should be null in a function call\n\n        //    The guts of the lexical parser\n        //    Loop through the formula extracting each operator and operand in turn\n        while (true) {\n            // Branch pruning: we adapt the output item to the context (it will\n            // be used to limit its computation)\n            $this->branchPruner->initialiseForLoop();\n\n            $opCharacter = $formula[$index]; //    Get the first character of the value at the current index position\n            if ($opCharacter === \"\\xe2\") { // intersection or union\n                $opCharacter .= $formula[++$index];\n                $opCharacter .= $formula[++$index];\n            }\n\n            // Check for two-character operators (e.g. >=, <=, <>)\n            if ((isset(self::COMPARISON_OPERATORS[$opCharacter])) && (strlen($formula) > $index) && isset($formula[$index + 1], self::COMPARISON_OPERATORS[$formula[$index + 1]])) {\n                $opCharacter .= $formula[++$index];\n            }\n            //    Find out if we're currently at the beginning of a number, variable, cell/row/column reference,\n            //         function, defined name, structured reference, parenthesis, error or operand\n            $isOperandOrFunction = (bool) preg_match($regexpMatchString, substr($formula, $index), $match);\n\n            $expectingOperatorCopy = $expectingOperator;\n            if ($opCharacter === '-' && !$expectingOperator) {                //    Is it a negation instead of a minus?\n                //    Put a negation on the stack\n                $stack->push('Unary Operator', '~');\n                ++$index; //        and drop the negation symbol\n            } elseif ($opCharacter === '%' && $expectingOperator) {\n                //    Put a percentage on the stack\n                $stack->push('Unary Operator', '%');\n                ++$index;\n            } elseif ($opCharacter === '+' && !$expectingOperator) {            //    Positive (unary plus rather than binary operator plus) can be discarded?\n                ++$index; //    Drop the redundant plus symbol\n            } elseif ((($opCharacter === '~') /*|| ($opCharacter === '∩') || ($opCharacter === '∪')*/) && (!$isOperandOrFunction)) {\n                //    We have to explicitly deny a tilde, union or intersect because they are legal\n                return $this->raiseFormulaError(\"Formula Error: Illegal character '~'\"); //        on the stack but not in the input expression\n            } elseif ((isset(self::CALCULATION_OPERATORS[$opCharacter]) || $isOperandOrFunction) && $expectingOperator) {    //    Are we putting an operator on the stack?\n                while (self::swapOperands($stack, $opCharacter)) {\n                    $output[] = $stack->pop(); //    Swap operands and higher precedence operators from the stack to the output\n                }\n\n                //    Finally put our current operator onto the stack\n                $stack->push('Binary Operator', $opCharacter);\n\n                ++$index;\n                $expectingOperator = false;\n            } elseif ($opCharacter === ')' && $expectingOperator) { //    Are we expecting to close a parenthesis?\n                $expectingOperand = false;\n                while (($o2 = $stack->pop()) && $o2['value'] !== '(') { //    Pop off the stack back to the last (\n                    $output[] = $o2;\n                }\n                $d = $stack->last(2);\n\n                // Branch pruning we decrease the depth whether is it a function\n                // call or a parenthesis\n                $this->branchPruner->decrementDepth();\n\n                if (is_array($d) && preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', StringHelper::convertToString($d['value']), $matches)) {\n                    //    Did this parenthesis just close a function?\n                    try {\n                        $this->branchPruner->closingBrace($d['value']);\n                    } catch (Exception $e) {\n                        return $this->raiseFormulaError($e->getMessage(), $e->getCode(), $e);\n                    }\n\n                    $functionName = $matches[1]; //    Get the function name\n                    $d = $stack->pop();\n                    $argumentCount = $d['value'] ?? 0; //    See how many arguments there were (argument count is the next value stored on the stack)\n                    $output[] = $d; //    Dump the argument count on the output\n                    $output[] = $stack->pop(); //    Pop the function and push onto the output\n                    if (isset(self::$controlFunctions[$functionName])) {\n                        $expectedArgumentCount = self::$controlFunctions[$functionName]['argumentCount'];\n                    } elseif (isset($phpSpreadsheetFunctions[$functionName])) {\n                        $expectedArgumentCount = $phpSpreadsheetFunctions[$functionName]['argumentCount'];\n                    } else {    // did we somehow push a non-function on the stack? this should never happen\n                        return $this->raiseFormulaError('Formula Error: Internal error, non-function on stack');\n                    }\n                    //    Check the argument count\n                    $argumentCountError = false;\n                    $expectedArgumentCountString = null;\n                    if (is_numeric($expectedArgumentCount)) {\n                        if ($expectedArgumentCount < 0) {\n                            if ($argumentCount > abs($expectedArgumentCount + 0)) {\n                                $argumentCountError = true;\n                                $expectedArgumentCountString = 'no more than ' . abs($expectedArgumentCount + 0);\n                            }\n                        } else {\n                            if ($argumentCount != $expectedArgumentCount) {\n                                $argumentCountError = true;\n                                $expectedArgumentCountString = $expectedArgumentCount;\n                            }\n                        }\n                    } elseif (is_string($expectedArgumentCount) && $expectedArgumentCount !== '*') {\n                        if (!Preg::isMatch('/(\\d*)([-+,])(\\d*)/', $expectedArgumentCount, $argMatch)) {\n                            $argMatch = ['', '', '', ''];\n                        }\n                        switch ($argMatch[2]) {\n                            case '+':\n                                if ($argumentCount < $argMatch[1]) {\n                                    $argumentCountError = true;\n                                    $expectedArgumentCountString = $argMatch[1] . ' or more ';\n                                }\n\n                                break;\n                            case '-':\n                                if (($argumentCount < $argMatch[1]) || ($argumentCount > $argMatch[3])) {\n                                    $argumentCountError = true;\n                                    $expectedArgumentCountString = 'between ' . $argMatch[1] . ' and ' . $argMatch[3];\n                                }\n\n                                break;\n                            case ',':\n                                if (($argumentCount != $argMatch[1]) && ($argumentCount != $argMatch[3])) {\n                                    $argumentCountError = true;\n                                    $expectedArgumentCountString = 'either ' . $argMatch[1] . ' or ' . $argMatch[3];\n                                }\n\n                                break;\n                        }\n                    }\n                    if ($argumentCountError) {\n                        /** @var int $argumentCount */\n                        return $this->raiseFormulaError(\"Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, \" . $expectedArgumentCountString . ' expected');\n                    }\n                }\n                ++$index;\n            } elseif ($opCharacter === ',') { // Is this the separator for function arguments?\n                try {\n                    $this->branchPruner->argumentSeparator();\n                } catch (Exception $e) {\n                    return $this->raiseFormulaError($e->getMessage(), $e->getCode(), $e);\n                }\n\n                while (($o2 = $stack->pop()) && $o2['value'] !== '(') {        //    Pop off the stack back to the last (\n                    $output[] = $o2; // pop the argument expression stuff and push onto the output\n                }\n                //    If we've a comma when we're expecting an operand, then what we actually have is a null operand;\n                //        so push a null onto the stack\n                if (($expectingOperand) || (!$expectingOperator)) {\n                    $output[] = $stack->getStackItem('Empty Argument', null, 'NULL');\n                }\n                // make sure there was a function\n                $d = $stack->last(2);\n                /** @var string */\n                $temp = $d['value'] ?? '';\n                if (!preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $temp, $matches)) {\n                    // Can we inject a dummy function at this point so that the braces at least have some context\n                    //     because at least the braces are paired up (at this stage in the formula)\n                    // MS Excel allows this if the content is cell references; but doesn't allow actual values,\n                    //    but at this point, we can't differentiate (so allow both)\n                    //return $this->raiseFormulaError('Formula Error: Unexpected ,');\n\n                    $stack->push('Binary Operator', '∪');\n\n                    ++$index;\n                    $expectingOperator = false;\n\n                    continue;\n                }\n\n                /** @var array<string, int> $d */\n                $d = $stack->pop();\n                ++$d['value']; // increment the argument count\n\n                $stack->pushStackItem($d);\n                $stack->push('Brace', '('); // put the ( back on, we'll need to pop back to it again\n\n                $expectingOperator = false;\n                $expectingOperand = true;\n                ++$index;\n            } elseif ($opCharacter === '(' && !$expectingOperator) {\n                // Branch pruning: we go deeper\n                $this->branchPruner->incrementDepth();\n                $stack->push('Brace', '(', null);\n                ++$index;\n            } elseif ($isOperandOrFunction && !$expectingOperatorCopy) {\n                // do we now have a function/variable/number?\n                $expectingOperator = true;\n                $expectingOperand = false;\n                $val = $match[1] ?? ''; //* @phpstan-ignore-line\n                $length = strlen($val);\n\n                if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $val, $matches)) {\n                    // $val is known to be valid unicode from statement above, so Preg::replace is okay even with u modifier\n                    $val = Preg::replace('/\\s/u', '', $val);\n                    if (isset($phpSpreadsheetFunctions[strtoupper($matches[1])]) || isset(self::$controlFunctions[strtoupper($matches[1])])) {    // it's a function\n                        $valToUpper = strtoupper($val);\n                    } else {\n                        $valToUpper = 'NAME.ERROR(';\n                    }\n                    // here $matches[1] will contain values like \"IF\"\n                    // and $val \"IF(\"\n\n                    $this->branchPruner->functionCall($valToUpper);\n\n                    $stack->push('Function', $valToUpper);\n                    // tests if the function is closed right after opening\n                    $ax = preg_match('/^\\s*\\)/u', substr($formula, $index + $length));\n                    if ($ax) {\n                        $stack->push('Operand Count for Function ' . $valToUpper . ')', 0);\n                        $expectingOperator = true;\n                    } else {\n                        $stack->push('Operand Count for Function ' . $valToUpper . ')', 1);\n                        $expectingOperator = false;\n                    }\n                    $stack->push('Brace', '(');\n                } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/miu', $val, $matches)) {\n                    //    Watch for this case-change when modifying to allow cell references in different worksheets...\n                    //    Should only be applied to the actual cell column, not the worksheet name\n                    //    If the last entry on the stack was a : operator, then we have a cell range reference\n                    $testPrevOp = $stack->last(1);\n                    if ($testPrevOp !== null && $testPrevOp['value'] === ':') {\n                        //    If we have a worksheet reference, then we're playing with a 3D reference\n                        if ($matches[2] === '') {\n                            //    Otherwise, we 'inherit' the worksheet reference from the start cell reference\n                            //    The start of the cell range reference should be the last entry in $output\n                            $rangeStartCellRef = $output[count($output) - 1]['value'] ?? '';\n                            if ($rangeStartCellRef === ':') {\n                                // Do we have chained range operators?\n                                $rangeStartCellRef = $output[count($output) - 2]['value'] ?? '';\n                            }\n                            /** @var string $rangeStartCellRef */\n                            preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/miu', $rangeStartCellRef, $rangeStartMatches);\n                            if (array_key_exists(2, $rangeStartMatches)) {\n                                if ($rangeStartMatches[2] > '') {\n                                    $val = $rangeStartMatches[2] . '!' . $val;\n                                }\n                            } else {\n                                $val = ExcelError::REF();\n                            }\n                        } else {\n                            $rangeStartCellRef = $output[count($output) - 1]['value'] ?? '';\n                            if ($rangeStartCellRef === ':') {\n                                // Do we have chained range operators?\n                                $rangeStartCellRef = $output[count($output) - 2]['value'] ?? '';\n                            }\n                            /** @var string $rangeStartCellRef */\n                            preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/miu', $rangeStartCellRef, $rangeStartMatches);\n                            if (isset($rangeStartMatches[2]) && $rangeStartMatches[2] !== $matches[2]) {\n                                return $this->raiseFormulaError('3D Range references are not yet supported');\n                            }\n                        }\n                    } elseif (!str_contains($val, '!') && $pCellParent !== null) {\n                        $worksheet = $pCellParent->getTitle();\n                        $val = \"'{$worksheet}'!{$val}\";\n                    }\n                    // unescape any apostrophes or double quotes in worksheet name\n                    $val = str_replace([\"''\", '\"\"'], [\"'\", '\"'], $val);\n                    $outputItem = $stack->getStackItem('Cell Reference', $val, $val);\n\n                    $output[] = $outputItem;\n                } elseif (preg_match('/^' . self::CALCULATION_REGEXP_STRUCTURED_REFERENCE . '$/miu', $val, $matches)) {\n                    try {\n                        $structuredReference = Operands\\StructuredReference::fromParser($formula, $index, $matches);\n                    } catch (Exception $e) {\n                        return $this->raiseFormulaError($e->getMessage(), $e->getCode(), $e);\n                    }\n\n                    $val = $structuredReference->value();\n                    $length = strlen($val);\n                    $outputItem = $stack->getStackItem(Operands\\StructuredReference::NAME, $structuredReference, null);\n\n                    $output[] = $outputItem;\n                    $expectingOperator = true;\n                } else {\n                    // it's a variable, constant, string, number or boolean\n                    $localeConstant = false;\n                    $stackItemType = 'Value';\n                    $stackItemReference = null;\n\n                    //    If the last entry on the stack was a : operator, then we may have a row or column range reference\n                    $testPrevOp = $stack->last(1);\n                    if ($testPrevOp !== null && $testPrevOp['value'] === ':') {\n                        $stackItemType = 'Cell Reference';\n\n                        if (\n                            !is_numeric($val)\n                            && ((ctype_alpha($val) === false || strlen($val) > 3))\n                            && (preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '$/mui', $val) !== false)\n                            && ($this->spreadsheet === null || $this->spreadsheet->getNamedRange($val) !== null)\n                        ) {\n                            $namedRange = ($this->spreadsheet === null) ? null : $this->spreadsheet->getNamedRange($val);\n                            if ($namedRange !== null) {\n                                $stackItemType = 'Defined Name';\n                                $address = str_replace('$', '', $namedRange->getValue());\n                                $stackItemReference = $val;\n                                if (str_contains($address, ':')) {\n                                    // We'll need to manipulate the stack for an actual named range rather than a named cell\n                                    $fromTo = explode(':', $address);\n                                    $to = array_pop($fromTo);\n                                    foreach ($fromTo as $from) {\n                                        $output[] = $stack->getStackItem($stackItemType, $from, $stackItemReference);\n                                        $output[] = $stack->getStackItem('Binary Operator', ':');\n                                    }\n                                    $address = $to;\n                                }\n                                $val = $address;\n                            }\n                        } elseif ($val === ExcelError::REF()) {\n                            $stackItemReference = $val;\n                        } else {\n                            /** @var non-empty-string $startRowColRef */\n                            $startRowColRef = $output[count($output) - 1]['value'] ?? '';\n                            [$rangeWS1, $startRowColRef] = Worksheet::extractSheetTitle($startRowColRef, true);\n                            $rangeSheetRef = $rangeWS1;\n                            if ($rangeWS1 !== '') {\n                                $rangeWS1 .= '!';\n                            }\n                            if (str_starts_with($rangeSheetRef, \"'\")) {\n                                $rangeSheetRef = Worksheet::unApostrophizeTitle($rangeSheetRef);\n                            }\n                            [$rangeWS2, $val] = Worksheet::extractSheetTitle($val, true);\n                            if ($rangeWS2 !== '') {\n                                $rangeWS2 .= '!';\n                            } else {\n                                $rangeWS2 = $rangeWS1;\n                            }\n\n                            $refSheet = $pCellParent;\n                            if ($pCellParent !== null && $rangeSheetRef !== '' && $rangeSheetRef !== $pCellParent->getTitle()) {\n                                $refSheet = $pCellParent->getParentOrThrow()->getSheetByName($rangeSheetRef);\n                            }\n\n                            if (ctype_digit($val) && $val <= AddressRange::MAX_ROW) {\n                                //    Row range\n                                $stackItemType = 'Row Reference';\n                                $valx = $val;\n                                $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestDataColumn($valx) : AddressRange::MAX_COLUMN; //    Max 16,384 columns for Excel2007\n                                $val = \"{$rangeWS2}{$endRowColRef}{$val}\";\n                            } elseif (ctype_alpha($val) && strlen($val) <= 3) {\n                                //    Column range\n                                $stackItemType = 'Column Reference';\n                                $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestDataRow($val) : AddressRange::MAX_ROW; //    Max 1,048,576 rows for Excel2007\n                                $val = \"{$rangeWS2}{$val}{$endRowColRef}\";\n                            }\n                            $stackItemReference = $val;\n                        }\n                    } elseif ($opCharacter === self::FORMULA_STRING_QUOTE) {\n                        //    UnEscape any quotes within the string\n                        $val = self::wrapResult(str_replace('\"\"', self::FORMULA_STRING_QUOTE, StringHelper::convertToString(self::unwrapResult($val))));\n                    } elseif (isset(self::EXCEL_CONSTANTS[trim(strtoupper($val))])) {\n                        $stackItemType = 'Constant';\n                        $excelConstant = trim(strtoupper($val));\n                        $val = self::EXCEL_CONSTANTS[$excelConstant];\n                        $stackItemReference = $excelConstant;\n                    } elseif (($localeConstant = array_search(trim(strtoupper($val)), self::$localeBoolean)) !== false) {\n                        $stackItemType = 'Constant';\n                        $val = self::EXCEL_CONSTANTS[$localeConstant];\n                        $stackItemReference = $localeConstant;\n                    } elseif (\n                        preg_match('/^' . self::CALCULATION_REGEXP_ROW_RANGE . '/miu', substr($formula, $index), $rowRangeReference)\n                    ) {\n                        $val = $rowRangeReference[1];\n                        $length = strlen($rowRangeReference[1]);\n                        $stackItemType = 'Row Reference';\n                        // unescape any apostrophes or double quotes in worksheet name\n                        $val = str_replace([\"''\", '\"\"'], [\"'\", '\"'], $val);\n                        $column = 'A';\n                        if (($testPrevOp !== null && $testPrevOp['value'] === ':') && $pCellParent !== null) {\n                            $column = $pCellParent->getHighestDataColumn($val);\n                        }\n                        $val = \"{$rowRangeReference[2]}{$column}{$rowRangeReference[7]}\";\n                        $stackItemReference = $val;\n                    } elseif (\n                        preg_match('/^' . self::CALCULATION_REGEXP_COLUMN_RANGE . '/miu', substr($formula, $index), $columnRangeReference)\n                    ) {\n                        $val = $columnRangeReference[1];\n                        $length = strlen($val);\n                        $stackItemType = 'Column Reference';\n                        // unescape any apostrophes or double quotes in worksheet name\n                        $val = str_replace([\"''\", '\"\"'], [\"'\", '\"'], $val);\n                        $row = '1';\n                        if (($testPrevOp !== null && $testPrevOp['value'] === ':') && $pCellParent !== null) {\n                            $row = $pCellParent->getHighestDataRow($val);\n                        }\n                        $val = \"{$val}{$row}\";\n                        $stackItemReference = $val;\n                    } elseif (preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '.*/miu', $val, $match)) {\n                        $stackItemType = 'Defined Name';\n                        $stackItemReference = $val;\n                    } elseif (is_numeric($val)) {\n                        if ((str_contains((string) $val, '.')) || (stripos((string) $val, 'e') !== false) || ($val > PHP_INT_MAX) || ($val < -PHP_INT_MAX)) {\n                            $val = (float) $val;\n                        } else {\n                            $val = (int) $val;\n                        }\n                    }\n\n                    $details = $stack->getStackItem($stackItemType, $val, $stackItemReference);\n                    if ($localeConstant) {\n                        $details['localeValue'] = $localeConstant;\n                    }\n                    $output[] = $details;\n                }\n                $index += $length;\n            } elseif ($opCharacter === '$') { // absolute row or column range\n                ++$index;\n            } elseif ($opCharacter === ')') { // miscellaneous error checking\n                if ($expectingOperand) {\n                    $output[] = $stack->getStackItem('Empty Argument', null, 'NULL');\n                    $expectingOperand = false;\n                    $expectingOperator = true;\n                } else {\n                    return $this->raiseFormulaError(\"Formula Error: Unexpected ')'\");\n                }\n            } elseif (isset(self::CALCULATION_OPERATORS[$opCharacter]) && !$expectingOperator) {\n                return $this->raiseFormulaError(\"Formula Error: Unexpected operator '$opCharacter'\");\n            } else {    // I don't even want to know what you did to get here\n                return $this->raiseFormulaError('Formula Error: An unexpected error occurred');\n            }\n            //    Test for end of formula string\n            if ($index == strlen($formula)) {\n                //    Did we end with an operator?.\n                //    Only valid for the % unary operator\n                if ((isset(self::CALCULATION_OPERATORS[$opCharacter])) && ($opCharacter != '%')) {\n                    return $this->raiseFormulaError(\"Formula Error: Operator '$opCharacter' has no operands\");\n                }\n\n                break;\n            }\n            //    Ignore white space\n            while (($formula[$index] === \"\\n\") || ($formula[$index] === \"\\r\")) {\n                ++$index;\n            }\n\n            if ($formula[$index] === ' ') {\n                while ($formula[$index] === ' ') {\n                    ++$index;\n                }\n\n                //    If we're expecting an operator, but only have a space between the previous and next operands (and both are\n                //        Cell References, Defined Names or Structured References) then we have an INTERSECTION operator\n                $countOutputMinus1 = count($output) - 1;\n                if (\n                    ($expectingOperator)\n                    && array_key_exists($countOutputMinus1, $output)\n                    && is_array($output[$countOutputMinus1])\n                    && array_key_exists('type', $output[$countOutputMinus1])\n                    && (\n                        (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '.*/miu', substr($formula, $index), $match))\n                            && ($output[$countOutputMinus1]['type'] === 'Cell Reference')\n                        || (preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '.*/miu', substr($formula, $index), $match))\n                            && ($output[$countOutputMinus1]['type'] === 'Defined Name' || $output[$countOutputMinus1]['type'] === 'Value')\n                        || (preg_match('/^' . self::CALCULATION_REGEXP_STRUCTURED_REFERENCE . '.*/miu', substr($formula, $index), $match))\n                            && ($output[$countOutputMinus1]['type'] === Operands\\StructuredReference::NAME || $output[$countOutputMinus1]['type'] === 'Value')\n                    )\n                ) {\n                    while (self::swapOperands($stack, $opCharacter)) {\n                        $output[] = $stack->pop(); //    Swap operands and higher precedence operators from the stack to the output\n                    }\n                    $stack->push('Binary Operator', '∩'); //    Put an Intersect Operator on the stack\n                    $expectingOperator = false;\n                }\n            }\n        }\n\n        while (($op = $stack->pop()) !== null) {\n            // pop everything off the stack and push onto output\n            if ($op['value'] == '(') {\n                return $this->raiseFormulaError(\"Formula Error: Expecting ')'\"); // if there are any opening braces on the stack, then braces were unbalanced\n            }\n            $output[] = $op;\n        }\n\n        return $output;\n    }\n\n    /** @param mixed[] $operandData */\n    private static function dataTestReference(array &$operandData): mixed\n    {\n        $operand = $operandData['value'];\n        if (($operandData['reference'] === null) && (is_array($operand))) {\n            $rKeys = array_keys($operand);\n            $rowKey = array_shift($rKeys);\n            if (is_array($operand[$rowKey]) === false) {\n                $operandData['value'] = $operand[$rowKey];\n\n                return $operand[$rowKey];\n            }\n\n            $cKeys = array_keys(array_keys($operand[$rowKey]));\n            $colKey = array_shift($cKeys);\n            if (ctype_upper(\"$colKey\")) {\n                $operandData['reference'] = $colKey . $rowKey;\n            }\n        }\n\n        return $operand;\n    }\n\n    private static int $matchIndex8 = 8;\n\n    private static int $matchIndex9 = 9;\n\n    private static int $matchIndex10 = 10;\n\n    /**\n     * @param array<mixed>|false $tokens\n     *\n     * @return array<int, mixed>|false|string\n     */\n    private function processTokenStack(false|array $tokens, ?string $cellID = null, ?Cell $cell = null)\n    {\n        if ($tokens === false) {\n            return false;\n        }\n        $phpSpreadsheetFunctions = &self::getFunctionsAddress();\n\n        //    If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent cell collection),\n        //        so we store the parent cell collection so that we can re-attach it when necessary\n        $pCellWorksheet = ($cell !== null) ? $cell->getWorksheet() : null;\n        $originalCoordinate = $cell?->getCoordinate();\n        $pCellParent = ($cell !== null) ? $cell->getParent() : null;\n        $stack = new Stack($this->branchPruner);\n\n        // Stores branches that have been pruned\n        $fakedForBranchPruning = [];\n        // help us to know when pruning ['branchTestId' => true/false]\n        $branchStore = [];\n        //    Loop through each token in turn\n        foreach ($tokens as $tokenIdx => $tokenData) {\n            /** @var mixed[] $tokenData */\n            $this->processingAnchorArray = false;\n            if ($tokenData['type'] === 'Cell Reference' && isset($tokens[$tokenIdx + 1]) && $tokens[$tokenIdx + 1]['type'] === 'Operand Count for Function ANCHORARRAY()') { //* @phpstan-ignore-line\n                $this->processingAnchorArray = true;\n            }\n            $token = $tokenData['value'];\n            // Branch pruning: skip useless resolutions\n            /** @var ?string */\n            $storeKey = $tokenData['storeKey'] ?? null;\n            if ($this->branchPruningEnabled && isset($tokenData['onlyIf'])) {\n                /** @var string */\n                $onlyIfStoreKey = $tokenData['onlyIf'];\n                $storeValue = $branchStore[$onlyIfStoreKey] ?? null;\n                $storeValueAsBool = ($storeValue === null)\n                    ? true : (bool) Functions::flattenSingleValue($storeValue);\n                if (is_array($storeValue)) {\n                    $wrappedItem = end($storeValue);\n                    $storeValue = is_array($wrappedItem) ? end($wrappedItem) : $wrappedItem;\n                }\n\n                if (\n                    (isset($storeValue) || $tokenData['reference'] === 'NULL')\n                    && (!$storeValueAsBool || Information\\ErrorValue::isError($storeValue) || ($storeValue === 'Pruned branch'))\n                ) {\n                    // If branching value is not true, we don't need to compute\n                    /** @var string $onlyIfStoreKey */\n                    if (!isset($fakedForBranchPruning['onlyIf-' . $onlyIfStoreKey])) {\n                        /** @var string $token */\n                        $stack->push('Value', 'Pruned branch (only if ' . $onlyIfStoreKey . ') ' . $token);\n                        $fakedForBranchPruning['onlyIf-' . $onlyIfStoreKey] = true;\n                    }\n\n                    if (isset($storeKey)) {\n                        // We are processing an if condition\n                        // We cascade the pruning to the depending branches\n                        $branchStore[$storeKey] = 'Pruned branch';\n                        $fakedForBranchPruning['onlyIfNot-' . $storeKey] = true;\n                        $fakedForBranchPruning['onlyIf-' . $storeKey] = true;\n                    }\n\n                    continue;\n                }\n            }\n\n            if ($this->branchPruningEnabled && isset($tokenData['onlyIfNot'])) {\n                /** @var string */\n                $onlyIfNotStoreKey = $tokenData['onlyIfNot'];\n                $storeValue = $branchStore[$onlyIfNotStoreKey] ?? null;\n                $storeValueAsBool = ($storeValue === null)\n                    ? true : (bool) Functions::flattenSingleValue($storeValue);\n                if (is_array($storeValue)) {\n                    $wrappedItem = end($storeValue);\n                    $storeValue = is_array($wrappedItem) ? end($wrappedItem) : $wrappedItem;\n                }\n\n                if (\n                    (isset($storeValue) || $tokenData['reference'] === 'NULL')\n                    && ($storeValueAsBool || Information\\ErrorValue::isError($storeValue) || ($storeValue === 'Pruned branch'))\n                ) {\n                    // If branching value is true, we don't need to compute\n                    if (!isset($fakedForBranchPruning['onlyIfNot-' . $onlyIfNotStoreKey])) {\n                        /** @var string $token */\n                        $stack->push('Value', 'Pruned branch (only if not ' . $onlyIfNotStoreKey . ') ' . $token);\n                        $fakedForBranchPruning['onlyIfNot-' . $onlyIfNotStoreKey] = true;\n                    }\n\n                    if (isset($storeKey)) {\n                        // We are processing an if condition\n                        // We cascade the pruning to the depending branches\n                        $branchStore[$storeKey] = 'Pruned branch';\n                        $fakedForBranchPruning['onlyIfNot-' . $storeKey] = true;\n                        $fakedForBranchPruning['onlyIf-' . $storeKey] = true;\n                    }\n\n                    continue;\n                }\n            }\n\n            if ($token instanceof Operands\\StructuredReference) {\n                if ($cell === null) {\n                    return $this->raiseFormulaError('Structured References must exist in a Cell context');\n                }\n\n                try {\n                    $cellRange = $token->parse($cell);\n                    if (str_contains($cellRange, ':')) {\n                        $this->debugLog->writeDebugLog('Evaluating Structured Reference %s as Cell Range %s', $token->value(), $cellRange);\n                        $rangeValue = self::getInstance($cell->getWorksheet()->getParent())->_calculateFormulaValue(\"={$cellRange}\", $cellRange, $cell);\n                        $stack->push('Value', $rangeValue);\n                        $this->debugLog->writeDebugLog('Evaluated Structured Reference %s as value %s', $token->value(), $this->showValue($rangeValue));\n                    } else {\n                        $this->debugLog->writeDebugLog('Evaluating Structured Reference %s as Cell %s', $token->value(), $cellRange);\n                        $cellValue = $cell->getWorksheet()->getCell($cellRange)->getCalculatedValue(false);\n                        $stack->push('Cell Reference', $cellValue, $cellRange);\n                        $this->debugLog->writeDebugLog('Evaluated Structured Reference %s as value %s', $token->value(), $this->showValue($cellValue));\n                    }\n                } catch (Exception $e) {\n                    if ($e->getCode() === Exception::CALCULATION_ENGINE_PUSH_TO_STACK) {\n                        $stack->push('Error', ExcelError::REF(), null);\n                        $this->debugLog->writeDebugLog('Evaluated Structured Reference %s as error value %s', $token->value(), ExcelError::REF());\n                    } else {\n                        return $this->raiseFormulaError($e->getMessage(), $e->getCode(), $e);\n                    }\n                }\n            } elseif (!is_numeric($token) && !is_object($token) && isset($token, self::BINARY_OPERATORS[$token])) { //* @phpstan-ignore-line\n                // if the token is a binary operator, pop the top two values off the stack, do the operation, and push the result back on the stack\n                //    We must have two operands, error if we don't\n                $operand2Data = $stack->pop();\n                if ($operand2Data === null) {\n                    return $this->raiseFormulaError('Internal error - Operand value missing from stack');\n                }\n                $operand1Data = $stack->pop();\n                if ($operand1Data === null) {\n                    return $this->raiseFormulaError('Internal error - Operand value missing from stack');\n                }\n\n                $operand1 = self::dataTestReference($operand1Data);\n                $operand2 = self::dataTestReference($operand2Data);\n\n                //    Log what we're doing\n                if ($token == ':') {\n                    $this->debugLog->writeDebugLog('Evaluating Range %s %s %s', $this->showValue($operand1Data['reference']), $token, $this->showValue($operand2Data['reference']));\n                } else {\n                    $this->debugLog->writeDebugLog('Evaluating %s %s %s', $this->showValue($operand1), $token, $this->showValue($operand2));\n                }\n\n                //    Process the operation in the appropriate manner\n                switch ($token) {\n                    // Comparison (Boolean) Operators\n                    case '>': // Greater than\n                    case '<': // Less than\n                    case '>=': // Greater than or Equal to\n                    case '<=': // Less than or Equal to\n                    case '=': // Equality\n                    case '<>': // Inequality\n                        $result = $this->executeBinaryComparisonOperation($operand1, $operand2, (string) $token, $stack);\n                        if (isset($storeKey)) {\n                            $branchStore[$storeKey] = $result;\n                        }\n\n                        break;\n                    // Binary Operators\n                    case ':': // Range\n                        if ($operand1Data['type'] === 'Error') {\n                            $stack->push($operand1Data['type'], $operand1Data['value'], null);\n\n                            break;\n                        }\n                        if ($operand2Data['type'] === 'Error') {\n                            $stack->push($operand2Data['type'], $operand2Data['value'], null);\n\n                            break;\n                        }\n                        if ($operand1Data['type'] === 'Defined Name') {\n                            /** @var array{reference: string} $operand1Data */\n                            if (preg_match('/$' . self::CALCULATION_REGEXP_DEFINEDNAME . '^/mui', $operand1Data['reference']) !== false && $this->spreadsheet !== null) {\n                                /** @var string[] $operand1Data */\n                                $definedName = $this->spreadsheet->getNamedRange($operand1Data['reference']);\n                                if ($definedName !== null) {\n                                    $operand1Data['reference'] = $operand1Data['value'] = str_replace('$', '', $definedName->getValue());\n                                }\n                            }\n                        }\n                        /** @var array{reference?: ?string} $operand1Data */\n                        if (str_contains($operand1Data['reference'] ?? '', '!')) {\n                            [$sheet1, $operand1Data['reference']] = Worksheet::extractSheetTitle($operand1Data['reference'], true, true);\n                        } else {\n                            $sheet1 = ($pCellWorksheet !== null) ? $pCellWorksheet->getTitle() : '';\n                        }\n                        //$sheet1 ??= ''; // phpstan level 10 says this is unneeded\n\n                        /** @var string */\n                        $op2ref = $operand2Data['reference'];\n                        [$sheet2, $operand2Data['reference']] = Worksheet::extractSheetTitle($op2ref, true, true);\n                        if (empty($sheet2)) {\n                            $sheet2 = $sheet1;\n                        }\n\n                        if ($sheet1 === $sheet2) {\n                            /** @var array{reference: ?string, value: string|string[]} $operand1Data */\n                            if ($operand1Data['reference'] === null && $cell !== null) {\n                                if (is_array($operand1Data['value'])) {\n                                    $operand1Data['reference'] = $cell->getCoordinate();\n                                } elseif ((trim($operand1Data['value']) != '') && (is_numeric($operand1Data['value']))) {\n                                    $operand1Data['reference'] = $cell->getColumn() . $operand1Data['value'];\n                                } elseif (trim($operand1Data['value']) == '') {\n                                    $operand1Data['reference'] = $cell->getCoordinate();\n                                } else {\n                                    $operand1Data['reference'] = $operand1Data['value'] . $cell->getRow();\n                                }\n                            }\n                            /** @var array{reference: ?string, value: string|string[]} $operand2Data */\n                            if ($operand2Data['reference'] === null && $cell !== null) {\n                                if (is_array($operand2Data['value'])) {\n                                    $operand2Data['reference'] = $cell->getCoordinate();\n                                } elseif ((trim($operand2Data['value']) != '') && (is_numeric($operand2Data['value']))) {\n                                    $operand2Data['reference'] = $cell->getColumn() . $operand2Data['value'];\n                                } elseif (trim($operand2Data['value']) == '') {\n                                    $operand2Data['reference'] = $cell->getCoordinate();\n                                } else {\n                                    $operand2Data['reference'] = $operand2Data['value'] . $cell->getRow();\n                                }\n                            }\n\n                            $oData = array_merge(explode(':', $operand1Data['reference'] ?? ''), explode(':', $operand2Data['reference'] ?? ''));\n                            $oCol = $oRow = [];\n                            $breakNeeded = false;\n                            foreach ($oData as $oDatum) {\n                                try {\n                                    $oCR = Coordinate::coordinateFromString($oDatum);\n                                    $oCol[] = Coordinate::columnIndexFromString($oCR[0]) - 1;\n                                    $oRow[] = $oCR[1];\n                                } catch (\\Exception) {\n                                    $stack->push('Error', ExcelError::REF(), null);\n                                    $breakNeeded = true;\n\n                                    break;\n                                }\n                            }\n                            if ($breakNeeded) {\n                                break;\n                            }\n                            $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' . Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow); // @phpstan-ignore-line\n                            if ($pCellParent !== null && $this->spreadsheet !== null) {\n                                $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($sheet1), false);\n                            } else {\n                                return $this->raiseFormulaError('Unable to access Cell Reference');\n                            }\n\n                            $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($cellValue));\n                            $stack->push('Cell Reference', $cellValue, $cellRef);\n                        } else {\n                            $this->debugLog->writeDebugLog('Evaluation Result is a #REF! Error');\n                            $stack->push('Error', ExcelError::REF(), null);\n                        }\n\n                        break;\n                    case '+':            //    Addition\n                    case '-':            //    Subtraction\n                    case '*':            //    Multiplication\n                    case '/':            //    Division\n                    case '^':            //    Exponential\n                        $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, $stack);\n                        if (isset($storeKey)) {\n                            $branchStore[$storeKey] = $result;\n                        }\n\n                        break;\n                    case '&':            //    Concatenation\n                        //    If either of the operands is a matrix, we need to treat them both as matrices\n                        //        (converting the other operand to a matrix if need be); then perform the required\n                        //        matrix operation\n                        $operand1 = self::boolToString($operand1);\n                        $operand2 = self::boolToString($operand2);\n                        if (is_array($operand1) || is_array($operand2)) {\n                            if (is_string($operand1)) {\n                                $operand1 = self::unwrapResult($operand1);\n                            }\n                            if (is_string($operand2)) {\n                                $operand2 = self::unwrapResult($operand2);\n                            }\n                            //    Ensure that both operands are arrays/matrices\n                            [$rows, $columns] = self::checkMatrixOperands($operand1, $operand2, 2);\n\n                            for ($row = 0; $row < $rows; ++$row) {\n                                for ($column = 0; $column < $columns; ++$column) {\n                                    /** @var mixed[][] $operand1 */\n                                    $op1x = self::boolToString($operand1[$row][$column]);\n                                    /** @var mixed[][] $operand2 */\n                                    $op2x = self::boolToString($operand2[$row][$column]);\n                                    if (Information\\ErrorValue::isError($op1x)) {\n                                        // no need to do anything\n                                    } elseif (Information\\ErrorValue::isError($op2x)) {\n                                        $operand1[$row][$column] = $op2x;\n                                    } else {\n                                        /** @var string $op1x */\n                                        /** @var string $op2x */\n                                        $operand1[$row][$column]\n                                            = StringHelper::substring(\n                                                $op1x . $op2x,\n                                                0,\n                                                DataType::MAX_STRING_LENGTH\n                                            );\n                                    }\n                                }\n                            }\n                            $result = $operand1;\n                        } else {\n                            if (Information\\ErrorValue::isError($operand1)) {\n                                $result = $operand1;\n                            } elseif (Information\\ErrorValue::isError($operand2)) {\n                                $result = $operand2;\n                            } else {\n                                $result = str_replace('\"\"', self::FORMULA_STRING_QUOTE, self::unwrapResult($operand1) . self::unwrapResult($operand2)); //* @phpstan-ignore-line\n                                $result = StringHelper::substring(\n                                    $result,\n                                    0,\n                                    DataType::MAX_STRING_LENGTH\n                                );\n                                $result = self::FORMULA_STRING_QUOTE . $result . self::FORMULA_STRING_QUOTE;\n                            }\n                        }\n                        $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($result));\n                        $stack->push('Value', $result);\n\n                        if (isset($storeKey)) {\n                            $branchStore[$storeKey] = $result;\n                        }\n\n                        break;\n                    case '∩':            //    Intersect\n                        /** @var mixed[][] $operand1 */\n                        /** @var mixed[][] $operand2 */\n                        $rowIntersect = array_intersect_key($operand1, $operand2);\n                        $cellIntersect = $oCol = $oRow = [];\n                        foreach (array_keys($rowIntersect) as $row) {\n                            $oRow[] = $row;\n                            foreach ($rowIntersect[$row] as $col => $data) {\n                                $oCol[] = Coordinate::columnIndexFromString($col) - 1;\n                                $cellIntersect[$row] = array_intersect_key($operand1[$row], $operand2[$row]);\n                            }\n                        }\n                        if (count(Functions::flattenArray($cellIntersect)) === 0) {\n                            $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($cellIntersect));\n                            $stack->push('Error', ExcelError::null(), null);\n                        } else {\n                            $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' // @phpstan-ignore-line\n                                . Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow); // @phpstan-ignore-line\n                            $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($cellIntersect));\n                            $stack->push('Value', $cellIntersect, $cellRef);\n                        }\n\n                        break;\n                    case '∪':            //    union\n                        /** @var mixed[][] $operand1 */\n                        /** @var mixed[][] $operand2 */\n                        $cellUnion = array_merge($operand1, $operand2);\n                        $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($cellUnion));\n                        $stack->push('Value', $cellUnion, 'A1');\n\n                        break;\n                }\n            } elseif (($token === '~') || ($token === '%')) {\n                // if the token is a unary operator, pop one value off the stack, do the operation, and push it back on\n                if (($arg = $stack->pop()) === null) {\n                    return $this->raiseFormulaError('Internal error - Operand value missing from stack');\n                }\n                $arg = $arg['value'];\n                if ($token === '~') {\n                    $this->debugLog->writeDebugLog('Evaluating Negation of %s', $this->showValue($arg));\n                    $multiplier = -1;\n                } else {\n                    $this->debugLog->writeDebugLog('Evaluating Percentile of %s', $this->showValue($arg));\n                    $multiplier = 0.01;\n                }\n                if (is_array($arg)) {\n                    $operand2 = $multiplier;\n                    $result = $arg;\n                    [$rows, $columns] = self::checkMatrixOperands($result, $operand2, 0);\n                    for ($row = 0; $row < $rows; ++$row) {\n                        for ($column = 0; $column < $columns; ++$column) {\n                            /** @var mixed[][] $result */\n                            if (self::isNumericOrBool($result[$row][$column])) {\n                                /** @var float|int|numeric-string */\n                                $temp = $result[$row][$column];\n                                $result[$row][$column] = $temp * $multiplier;\n                            } else {\n                                $result[$row][$column] = self::makeError($result[$row][$column]);\n                            }\n                        }\n                    }\n\n                    $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($result));\n                    $stack->push('Value', $result);\n                    if (isset($storeKey)) {\n                        $branchStore[$storeKey] = $result;\n                    }\n                } else {\n                    $this->executeNumericBinaryOperation($multiplier, $arg, '*', $stack);\n                }\n            } elseif (Preg::isMatch('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', StringHelper::convertToString($token ?? ''), $matches)) {\n                $cellRef = null;\n\n                /* Phpstan says matches[8/9/10] is never set,\n                   and code coverage report seems to confirm.\n                   regex101.com confirms - only 7 capturing groups.\n                   My theory is that this code expected regexp to\n                   match cell *or* cellRange, but it does not\n                   match the latter. Retain the code for now in case\n                   we do want to add the range match later.\n                   Probably delete this block later.\n                   Until delete happens, turn code coverage off.\n                */\n                if (isset($matches[self::$matchIndex8])) {\n                    // @codeCoverageIgnoreStart\n                    if ($cell === null) {\n                        // We can't access the range, so return a REF error\n                        $cellValue = ExcelError::REF();\n                    } else {\n                        $cellRef = $matches[6] . $matches[7] . ':' . $matches[self::$matchIndex9] . $matches[self::$matchIndex10];\n                        $matches[2] = (string) $matches[2];\n                        if ($matches[2] > '') {\n                            $matches[2] = trim($matches[2], \"\\\"'\");\n                            if ((str_contains($matches[2], '[')) || (str_contains($matches[2], ']'))) {\n                                //    It's a Reference to an external spreadsheet (not currently supported)\n                                return $this->raiseFormulaError('Unable to access External Workbook');\n                            }\n                            $matches[2] = trim($matches[2], \"\\\"'\");\n                            $this->debugLog->writeDebugLog('Evaluating Cell Range %s in worksheet %s', $cellRef, $matches[2]);\n                            if ($pCellParent !== null && $this->spreadsheet !== null) {\n                                $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false);\n                            } else {\n                                return $this->raiseFormulaError('Unable to access Cell Reference');\n                            }\n                            $this->debugLog->writeDebugLog('Evaluation Result for cells %s in worksheet %s is %s', $cellRef, $matches[2], $this->showTypeDetails($cellValue));\n                        } else {\n                            $this->debugLog->writeDebugLog('Evaluating Cell Range %s in current worksheet', $cellRef);\n                            if ($pCellParent !== null) {\n                                $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false);\n                            } else {\n                                return $this->raiseFormulaError('Unable to access Cell Reference');\n                            }\n                            $this->debugLog->writeDebugLog('Evaluation Result for cells %s is %s', $cellRef, $this->showTypeDetails($cellValue));\n                        }\n                    }\n                    // @codeCoverageIgnoreEnd\n                } else {\n                    if ($cell === null) {\n                        // We can't access the cell, so return a REF error\n                        $cellValue = ExcelError::REF();\n                    } else {\n                        $cellRef = $matches[6] . $matches[7];\n                        $matches[2] = (string) $matches[2];\n                        if ($matches[2] > '') {\n                            $matches[2] = trim($matches[2], \"\\\"'\");\n                            if ((str_contains($matches[2], '[')) || (str_contains($matches[2], ']'))) {\n                                //    It's a Reference to an external spreadsheet (not currently supported)\n                                return $this->raiseFormulaError('Unable to access External Workbook');\n                            }\n                            $this->debugLog->writeDebugLog('Evaluating Cell %s in worksheet %s', $cellRef, $matches[2]);\n                            if ($pCellParent !== null && $this->spreadsheet !== null) {\n                                $cellSheet = $this->spreadsheet->getSheetByName($matches[2]);\n                                if ($cellSheet && !$cellSheet->cellExists($cellRef)) {\n                                    try {\n                                        $cellSheet->setCellValue($cellRef, null);\n                                    } catch (SpreadsheetException) {\n                                        // do nothing\n                                    }\n                                }\n                                if ($cellSheet && $cellSheet->cellExists($cellRef)) {\n                                    $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false);\n                                    $cell->attach($pCellParent);\n                                } else {\n                                    $cellRef = ($cellSheet !== null) ? \"'{$matches[2]}'!{$cellRef}\" : $cellRef;\n                                    $cellValue = ($cellSheet !== null) ? null : ExcelError::REF();\n                                }\n                            } else {\n                                return $this->raiseFormulaError('Unable to access Cell Reference');\n                            }\n                            $this->debugLog->writeDebugLog('Evaluation Result for cell %s in worksheet %s is %s', $cellRef, $matches[2], $this->showTypeDetails($cellValue));\n                        } else {\n                            $this->debugLog->writeDebugLog('Evaluating Cell %s in current worksheet', $cellRef);\n                            if ($pCellParent !== null && $pCellParent->has($cellRef)) {\n                                $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false);\n                                $cell->attach($pCellParent);\n                            } else {\n                                $cellValue = null;\n                            }\n                            $this->debugLog->writeDebugLog('Evaluation Result for cell %s is %s', $cellRef, $this->showTypeDetails($cellValue));\n                        }\n                    }\n                }\n\n                if ($this->getInstanceArrayReturnType() === self::RETURN_ARRAY_AS_ARRAY && !$this->processingAnchorArray && is_array($cellValue)) {\n                    while (is_array($cellValue)) {\n                        $cellValue = array_shift($cellValue);\n                    }\n                    if (is_string($cellValue)) {\n                        $cellValue = Preg::replace('/\"/', '\"\"', $cellValue);\n                    }\n                    $this->debugLog->writeDebugLog('Scalar Result for cell %s is %s', $cellRef, $this->showTypeDetails($cellValue));\n                }\n                $this->processingAnchorArray = false;\n                $stack->push('Cell Value', $cellValue, $cellRef);\n                if (isset($storeKey)) {\n                    $branchStore[$storeKey] = $cellValue;\n                }\n            } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', StringHelper::convertToString($token ?? ''), $matches)) {\n                // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on\n                if ($cell !== null && $pCellParent !== null) {\n                    $cell->attach($pCellParent);\n                }\n\n                $functionName = $matches[1];\n                /** @var array<string, int> $argCount */\n                $argCount = $stack->pop();\n                $argCount = $argCount['value'];\n                if ($functionName !== 'MKMATRIX') {\n                    $this->debugLog->writeDebugLog('Evaluating Function %s() with %s argument%s', self::localeFunc($functionName), (($argCount == 0) ? 'no' : $argCount), (($argCount == 1) ? '' : 's'));\n                }\n                if ((isset($phpSpreadsheetFunctions[$functionName])) || (isset(self::$controlFunctions[$functionName]))) {    // function\n                    $passByReference = false;\n                    $passCellReference = false;\n                    $functionCall = null;\n                    if (isset($phpSpreadsheetFunctions[$functionName])) {\n                        $functionCall = $phpSpreadsheetFunctions[$functionName]['functionCall'];\n                        $passByReference = isset($phpSpreadsheetFunctions[$functionName]['passByReference']);\n                        $passCellReference = isset($phpSpreadsheetFunctions[$functionName]['passCellReference']);\n                    } elseif (isset(self::$controlFunctions[$functionName])) {\n                        $functionCall = self::$controlFunctions[$functionName]['functionCall'];\n                        $passByReference = isset(self::$controlFunctions[$functionName]['passByReference']);\n                        $passCellReference = isset(self::$controlFunctions[$functionName]['passCellReference']);\n                    }\n\n                    // get the arguments for this function\n                    $args = $argArrayVals = [];\n                    $emptyArguments = [];\n                    for ($i = 0; $i < $argCount; ++$i) {\n                        $arg = $stack->pop();\n                        $a = $argCount - $i - 1;\n                        if (\n                            ($passByReference)\n                            && (isset($phpSpreadsheetFunctions[$functionName]['passByReference'][$a])) //* @phpstan-ignore-line\n                            && ($phpSpreadsheetFunctions[$functionName]['passByReference'][$a])\n                        ) {\n                            /** @var mixed[] $arg */\n                            if ($arg['reference'] === null) {\n                                $nextArg = $cellID;\n                                if ($functionName === 'ISREF' && ($arg['type'] ?? '') === 'Value') {\n                                    if (array_key_exists('value', $arg)) {\n                                        $argValue = $arg['value'];\n                                        if (is_scalar($argValue)) {\n                                            $nextArg = $argValue;\n                                        } elseif (empty($argValue)) {\n                                            $nextArg = '';\n                                        }\n                                    }\n                                } elseif (($arg['type'] ?? '') === 'Error') {\n                                    $argValue = $arg['value'];\n                                    if (is_scalar($argValue)) {\n                                        $nextArg = $argValue;\n                                    } elseif (empty($argValue)) {\n                                        $nextArg = '';\n                                    }\n                                }\n                                $args[] = $nextArg;\n                                if ($functionName !== 'MKMATRIX') {\n                                    $argArrayVals[] = $this->showValue($cellID);\n                                }\n                            } else {\n                                $args[] = $arg['reference'];\n                                if ($functionName !== 'MKMATRIX') {\n                                    $argArrayVals[] = $this->showValue($arg['reference']);\n                                }\n                            }\n                        } else {\n                            /** @var mixed[] $arg */\n                            if ($arg['type'] === 'Empty Argument' && in_array($functionName, ['MIN', 'MINA', 'MAX', 'MAXA', 'IF'], true)) {\n                                $emptyArguments[] = false;\n                                $args[] = $arg['value'] = 0;\n                                $this->debugLog->writeDebugLog('Empty Argument reevaluated as 0');\n                            } else {\n                                $emptyArguments[] = $arg['type'] === 'Empty Argument';\n                                $args[] = self::unwrapResult($arg['value']);\n                            }\n                            if ($functionName !== 'MKMATRIX') {\n                                $argArrayVals[] = $this->showValue($arg['value']);\n                            }\n                        }\n                    }\n\n                    //    Reverse the order of the arguments\n                    krsort($args);\n                    krsort($emptyArguments);\n\n                    if ($argCount > 0 && is_array($functionCall)) {\n                        /** @var string[] */\n                        $functionCallCopy = $functionCall;\n                        $args = $this->addDefaultArgumentValues($functionCallCopy, $args, $emptyArguments);\n                    }\n\n                    if (($passByReference) && ($argCount == 0)) {\n                        $args[] = $cellID;\n                        $argArrayVals[] = $this->showValue($cellID);\n                    }\n\n                    if ($functionName !== 'MKMATRIX') {\n                        if ($this->debugLog->getWriteDebugLog()) {\n                            krsort($argArrayVals);\n                            $this->debugLog->writeDebugLog('Evaluating %s ( %s )', self::localeFunc($functionName), implode(self::$localeArgumentSeparator . ' ', Functions::flattenArray($argArrayVals)));\n                        }\n                    }\n\n                    //    Process the argument with the appropriate function call\n                    if ($pCellWorksheet !== null && $originalCoordinate !== null) {\n                        $pCellWorksheet->getCell($originalCoordinate);\n                    }\n                    /** @var array<string>|string $functionCall */\n                    $args = $this->addCellReference($args, $passCellReference, $functionCall, $cell);\n\n                    if (!is_array($functionCall)) {\n                        foreach ($args as &$arg) {\n                            $arg = Functions::flattenSingleValue($arg);\n                        }\n                        unset($arg);\n                    }\n\n                    /** @var callable $functionCall */\n                    try {\n                        $result = call_user_func_array($functionCall, $args);\n                    } catch (TypeError $e) {\n                        if (!$this->suppressFormulaErrors) {\n                            throw $e;\n                        }\n                        $result = false;\n                    }\n                    if ($functionName !== 'MKMATRIX') {\n                        $this->debugLog->writeDebugLog('Evaluation Result for %s() function call is %s', self::localeFunc($functionName), $this->showTypeDetails($result));\n                    }\n                    $stack->push('Value', self::wrapResult($result));\n                    if (isset($storeKey)) {\n                        $branchStore[$storeKey] = $result;\n                    }\n                }\n            } else {\n                // if the token is a number, boolean, string or an Excel error, push it onto the stack\n                /** @var ?string $token */\n                if (isset(self::EXCEL_CONSTANTS[strtoupper($token ?? '')])) {\n                    $excelConstant = strtoupper(\"$token\");\n                    $stack->push('Constant Value', self::EXCEL_CONSTANTS[$excelConstant]);\n                    if (isset($storeKey)) {\n                        $branchStore[$storeKey] = self::EXCEL_CONSTANTS[$excelConstant];\n                    }\n                    $this->debugLog->writeDebugLog('Evaluating Constant %s as %s', $excelConstant, $this->showTypeDetails(self::EXCEL_CONSTANTS[$excelConstant]));\n                } elseif ((is_numeric($token)) || ($token === null) || (is_bool($token)) || ($token == '') || ($token[0] == self::FORMULA_STRING_QUOTE) || ($token[0] == '#')) { //* @phpstan-ignore-line\n                    /** @var array{type: string, reference: ?string} $tokenData */\n                    $stack->push($tokenData['type'], $token, $tokenData['reference']);\n                    if (isset($storeKey)) {\n                        $branchStore[$storeKey] = $token;\n                    }\n                } elseif (preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '$/miu', $token, $matches)) {\n                    // if the token is a named range or formula, evaluate it and push the result onto the stack\n                    $definedName = $matches[6];\n                    if (str_starts_with($definedName, '_xleta')) {\n                        return Functions::NOT_YET_IMPLEMENTED;\n                    }\n                    if ($cell === null || $pCellWorksheet === null) {\n                        return $this->raiseFormulaError(\"undefined name '$token'\");\n                    }\n                    $specifiedWorksheet = trim($matches[2], \"'\");\n\n                    $this->debugLog->writeDebugLog('Evaluating Defined Name %s', $definedName);\n                    $namedRange = DefinedName::resolveName($definedName, $pCellWorksheet, $specifiedWorksheet);\n                    // If not Defined Name, try as Table.\n                    if ($namedRange === null && $this->spreadsheet !== null) {\n                        $table = $this->spreadsheet->getTableByName($definedName);\n                        if ($table !== null) {\n                            $tableRange = Coordinate::getRangeBoundaries($table->getRange());\n                            if ($table->getShowHeaderRow()) {\n                                ++$tableRange[0][1];\n                            }\n                            if ($table->getShowTotalsRow()) {\n                                --$tableRange[1][1];\n                            }\n                            $tableRangeString\n                                = '$' . $tableRange[0][0]\n                                . '$' . $tableRange[0][1]\n                                . ':'\n                                . '$' . $tableRange[1][0]\n                                . '$' . $tableRange[1][1];\n                            $namedRange = new NamedRange($definedName, $table->getWorksheet(), $tableRangeString);\n                        }\n                    }\n                    if ($namedRange === null) {\n                        $result = ExcelError::NAME();\n                        $stack->push('Error', $result, null);\n                        $this->debugLog->writeDebugLog(\"Error $result\");\n                    } else {\n                        $result = $this->evaluateDefinedName($cell, $namedRange, $pCellWorksheet, $stack, $specifiedWorksheet !== '');\n                    }\n\n                    if (isset($storeKey)) {\n                        $branchStore[$storeKey] = $result;\n                    }\n                } else {\n                    return $this->raiseFormulaError(\"undefined name '$token'\");\n                }\n            }\n        }\n        // when we're out of tokens, the stack should have a single element, the final result\n        if ($stack->count() != 1) {\n            return $this->raiseFormulaError('internal error');\n        }\n        /** @var array<string, array<int, mixed>|false|string> */\n        $output = $stack->pop();\n        $output = $output['value'];\n\n        return $output;\n    }\n\n    private function validateBinaryOperand(mixed &$operand, Stack &$stack): bool\n    {\n        if (is_array($operand)) {\n            if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) {\n                do {\n                    $operand = array_pop($operand);\n                } while (is_array($operand));\n            }\n        }\n        //    Numbers, matrices and booleans can pass straight through, as they're already valid\n        if (is_string($operand)) {\n            //    We only need special validations for the operand if it is a string\n            //    Start by stripping off the quotation marks we use to identify true excel string values internally\n            if ($operand > '' && $operand[0] == self::FORMULA_STRING_QUOTE) {\n                $operand = StringHelper::convertToString(self::unwrapResult($operand));\n            }\n            //    If the string is a numeric value, we treat it as a numeric, so no further testing\n            if (!is_numeric($operand)) {\n                //    If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations\n                if ($operand > '' && $operand[0] == '#') {\n                    $stack->push('Value', $operand);\n                    $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($operand));\n\n                    return false;\n                } elseif (Engine\\FormattedNumber::convertToNumberIfFormatted($operand) === false) {\n                    //    If not a numeric, a fraction or a percentage, then it's a text string, and so can't be used in mathematical binary operations\n                    $stack->push('Error', '#VALUE!');\n                    $this->debugLog->writeDebugLog('Evaluation Result is a %s', $this->showTypeDetails('#VALUE!'));\n\n                    return false;\n                }\n            }\n        }\n\n        //    return a true if the value of the operand is one that we can use in normal binary mathematical operations\n        return true;\n    }\n\n    /** @return mixed[] */\n    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array\n    {\n        $result = [];\n        if (!is_array($operand2) && is_array($operand1)) {\n            // Operand 1 is an array, Operand 2 is a scalar\n            foreach ($operand1 as $x => $operandData) {\n                $this->debugLog->writeDebugLog('Evaluating Comparison %s %s %s', $this->showValue($operandData), $operation, $this->showValue($operand2));\n                $this->executeBinaryComparisonOperation($operandData, $operand2, $operation, $stack);\n                /** @var array<string, mixed> $r */\n                $r = $stack->pop();\n                $result[$x] = $r['value'];\n            }\n        } elseif (is_array($operand2) && !is_array($operand1)) {\n            // Operand 1 is a scalar, Operand 2 is an array\n            foreach ($operand2 as $x => $operandData) {\n                $this->debugLog->writeDebugLog('Evaluating Comparison %s %s %s', $this->showValue($operand1), $operation, $this->showValue($operandData));\n                $this->executeBinaryComparisonOperation($operand1, $operandData, $operation, $stack);\n                /** @var array<string, mixed> $r */\n                $r = $stack->pop();\n                $result[$x] = $r['value'];\n            }\n        } elseif (is_array($operand2) && is_array($operand1)) {\n            // Operand 1 and Operand 2 are both arrays\n            if (!$recursingArrays) {\n                self::checkMatrixOperands($operand1, $operand2, 2);\n            }\n            foreach ($operand1 as $x => $operandData) {\n                $this->debugLog->writeDebugLog('Evaluating Comparison %s %s %s', $this->showValue($operandData), $operation, $this->showValue($operand2[$x]));\n                $this->executeBinaryComparisonOperation($operandData, $operand2[$x], $operation, $stack, true);\n                /** @var array<string, mixed> $r */\n                $r = $stack->pop();\n                $result[$x] = $r['value'];\n            }\n        } else {\n            throw new Exception('Neither operand is an arra');\n        }\n        //    Log the result details\n        $this->debugLog->writeDebugLog('Comparison Evaluation Result is %s', $this->showTypeDetails($result));\n        //    And push the result onto the stack\n        $stack->push('Array', $result);\n\n        return $result;\n    }\n\n    /** @return array<mixed>|bool|string */\n    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool|string\n    {\n        //    If we're dealing with matrix operations, we want a matrix result\n        if ((is_array($operand1)) || (is_array($operand2))) {\n            return $this->executeArrayComparison($operand1, $operand2, $operation, $stack, $recursingArrays);\n        }\n\n        $result = BinaryComparison::compare($operand1, $operand2, $operation);\n\n        //    Log the result details\n        $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($result));\n        //    And push the result onto the stack\n        $stack->push('Value', $result);\n\n        return $result;\n    }\n\n    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed\n    {\n        //    Validate the two operands\n        if (\n            ($this->validateBinaryOperand($operand1, $stack) === false)\n            || ($this->validateBinaryOperand($operand2, $stack) === false)\n        ) {\n            return false;\n        }\n\n        if (\n            (Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE)\n            && ((is_string($operand1) && !is_numeric($operand1) && $operand1 !== '')\n                || (is_string($operand2) && !is_numeric($operand2) && $operand2 !== ''))\n        ) {\n            $result = ExcelError::VALUE();\n        } elseif (is_array($operand1) || is_array($operand2)) {\n            //    Ensure that both operands are arrays/matrices\n            if (is_array($operand1)) {\n                foreach ($operand1 as $key => $value) {\n                    $operand1[$key] = Functions::flattenArray($value);\n                }\n            }\n            if (is_array($operand2)) {\n                foreach ($operand2 as $key => $value) {\n                    $operand2[$key] = Functions::flattenArray($value);\n                }\n            }\n            [$rows, $columns] = self::checkMatrixOperands($operand1, $operand2, 3);\n\n            for ($row = 0; $row < $rows; ++$row) {\n                for ($column = 0; $column < $columns; ++$column) {\n                    /** @var mixed[][] $operand1 */\n                    if (($operand1[$row][$column] ?? null) === null) {\n                        $operand1[$row][$column] = 0;\n                    } elseif (!self::isNumericOrBool($operand1[$row][$column])) {\n                        $operand1[$row][$column] = self::makeError($operand1[$row][$column]);\n\n                        continue;\n                    }\n                    /** @var mixed[][] $operand2 */\n                    if (($operand2[$row][$column] ?? null) === null) {\n                        $operand2[$row][$column] = 0;\n                    } elseif (!self::isNumericOrBool($operand2[$row][$column])) {\n                        $operand1[$row][$column] = self::makeError($operand2[$row][$column]);\n\n                        continue;\n                    }\n                    /** @var float|int */\n                    $operand1Val = $operand1[$row][$column];\n                    /** @var float|int */\n                    $operand2Val = $operand2[$row][$column];\n                    switch ($operation) {\n                        case '+':\n                            $operand1[$row][$column] = $operand1Val + $operand2Val;\n\n                            break;\n                        case '-':\n                            $operand1[$row][$column] = $operand1Val - $operand2Val;\n\n                            break;\n                        case '*':\n                            $operand1[$row][$column] = $operand1Val * $operand2Val;\n\n                            break;\n                        case '/':\n                            if ($operand2Val == 0) {\n                                $operand1[$row][$column] = ExcelError::DIV0();\n                            } else {\n                                $operand1[$row][$column] = $operand1Val / $operand2Val;\n                            }\n\n                            break;\n                        case '^':\n                            $operand1[$row][$column] = $operand1Val ** $operand2Val;\n\n                            break;\n\n                        default:\n                            throw new Exception('Unsupported numeric binary operation');\n                    }\n                }\n            }\n            $result = $operand1;\n        } else {\n            //    If we're dealing with non-matrix operations, execute the necessary operation\n            /** @var float|int $operand1 */\n            /** @var float|int $operand2 */\n            switch ($operation) {\n                //    Addition\n                case '+':\n                    $result = $operand1 + $operand2;\n\n                    break;\n                //    Subtraction\n                case '-':\n                    $result = $operand1 - $operand2;\n\n                    break;\n                //    Multiplication\n                case '*':\n                    $result = $operand1 * $operand2;\n\n                    break;\n                //    Division\n                case '/':\n                    if ($operand2 == 0) {\n                        //    Trap for Divide by Zero error\n                        $stack->push('Error', ExcelError::DIV0());\n                        $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails(ExcelError::DIV0()));\n\n                        return false;\n                    }\n                    $result = $operand1 / $operand2;\n\n                    break;\n                //    Power\n                case '^':\n                    $result = $operand1 ** $operand2;\n\n                    break;\n\n                default:\n                    throw new Exception('Unsupported numeric binary operation');\n            }\n        }\n\n        //    Log the result details\n        $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($result));\n        //    And push the result onto the stack\n        $stack->push('Value', $result);\n\n        return $result;\n    }\n\n    /**\n     * Trigger an error, but nicely, if need be.\n     *\n     * @return false\n     */\n    protected function raiseFormulaError(string $errorMessage, int $code = 0, ?Throwable $exception = null): bool\n    {\n        $this->formulaError = $errorMessage;\n        $this->cyclicReferenceStack->clear();\n        $suppress = $this->suppressFormulaErrors;\n        $suppressed = $suppress ? ' $suppressed' : '';\n        $this->debugLog->writeDebugLog(\"Raise Error$suppressed $errorMessage\");\n        if (!$suppress) {\n            throw new Exception($errorMessage, $code, $exception);\n        }\n\n        return false;\n    }\n\n    /**\n     * Extract range values.\n     *\n     * @param string $range String based range representation\n     * @param ?Worksheet $worksheet Worksheet\n     * @param bool $resetLog Flag indicating whether calculation log should be reset or not\n     *\n     * @return mixed[] Array of values in range if range contains more than one element. Otherwise, a single value is returned.\n     */\n    public function extractCellRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true, bool $createCell = false): array\n    {\n        // Return value\n        /** @var mixed[][] */\n        $returnValue = [];\n\n        if ($worksheet !== null) {\n            $worksheetName = $worksheet->getTitle();\n\n            if (str_contains($range, '!')) {\n                [$worksheetName, $range] = Worksheet::extractSheetTitle($range, true, true);\n                $worksheet = ($this->spreadsheet === null) ? null : $this->spreadsheet->getSheetByName($worksheetName);\n            }\n\n            // Extract range\n            $aReferences = Coordinate::extractAllCellReferencesInRange($range);\n            $range = \"'\" . $worksheetName . \"'\" . '!' . $range;\n            $currentCol = '';\n            $currentRow = 0;\n            if (!isset($aReferences[1])) {\n                //    Single cell in range\n                sscanf($aReferences[0], '%[A-Z]%d', $currentCol, $currentRow);\n                /** @var string $currentCol */\n                /** @var int $currentRow */\n                if ($createCell && $worksheet !== null && !$worksheet->cellExists($aReferences[0])) {\n                    $worksheet->setCellValue($aReferences[0], null);\n                }\n                if ($worksheet !== null && $worksheet->cellExists($aReferences[0])) {\n                    $temp = $worksheet->getCell($aReferences[0])->getCalculatedValue($resetLog);\n                    if ($this->getInstanceArrayReturnType() === self::RETURN_ARRAY_AS_ARRAY) {\n                        while (is_array($temp)) {\n                            $temp = array_shift($temp);\n                        }\n                    }\n                    $returnValue[$currentRow][$currentCol] = $temp;\n                } else {\n                    $returnValue[$currentRow][$currentCol] = null;\n                }\n            } else {\n                // Extract cell data for all cells in the range\n                foreach ($aReferences as $reference) {\n                    // Extract range\n                    sscanf($reference, '%[A-Z]%d', $currentCol, $currentRow);\n                    /** @var string $currentCol */\n                    /** @var int $currentRow */\n                    if ($createCell && $worksheet !== null && !$worksheet->cellExists($reference)) {\n                        $worksheet->setCellValue($reference, null);\n                    }\n                    if ($worksheet !== null && $worksheet->cellExists($reference)) {\n                        $temp = $worksheet->getCell($reference)->getCalculatedValue($resetLog);\n                        if ($this->getInstanceArrayReturnType() === self::RETURN_ARRAY_AS_ARRAY) {\n                            while (is_array($temp)) {\n                                $temp = array_shift($temp);\n                            }\n                        }\n                        $returnValue[$currentRow][$currentCol] = $temp;\n                    } else {\n                        $returnValue[$currentRow][$currentCol] = null;\n                    }\n                }\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * Extract range values.\n     *\n     * @param string $range String based range representation\n     * @param null|Worksheet $worksheet Worksheet\n     * @param bool $resetLog Flag indicating whether calculation log should be reset or not\n     *\n     * @return mixed[]|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.\n     */\n    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array\n    {\n        // Return value\n        $returnValue = [];\n\n        if ($worksheet !== null) {\n            if (str_contains($range, '!')) {\n                [$worksheetName, $range] = Worksheet::extractSheetTitle($range, true, true);\n                $worksheet = ($this->spreadsheet === null) ? null : $this->spreadsheet->getSheetByName($worksheetName);\n            }\n\n            // Named range?\n            $namedRange = ($worksheet === null) ? null : DefinedName::resolveName($range, $worksheet);\n            if ($namedRange === null) {\n                return ExcelError::REF();\n            }\n\n            $worksheet = $namedRange->getWorksheet();\n            $range = $namedRange->getValue();\n            $splitRange = Coordinate::splitRange($range);\n            //    Convert row and column references\n            if ($worksheet !== null && ctype_alpha($splitRange[0][0])) {\n                $range = $splitRange[0][0] . '1:' . $splitRange[0][1] . $worksheet->getHighestRow();\n            } elseif ($worksheet !== null && ctype_digit($splitRange[0][0])) {\n                $range = 'A' . $splitRange[0][0] . ':' . $worksheet->getHighestColumn() . $splitRange[0][1];\n            }\n\n            // Extract range\n            $aReferences = Coordinate::extractAllCellReferencesInRange($range);\n            if (!isset($aReferences[1])) {\n                //    Single cell (or single column or row) in range\n                [$currentCol, $currentRow] = Coordinate::coordinateFromString($aReferences[0]);\n                /** @var mixed[][] $returnValue */\n                if ($worksheet !== null && $worksheet->cellExists($aReferences[0])) {\n                    $returnValue[$currentRow][$currentCol] = $worksheet->getCell($aReferences[0])->getCalculatedValue($resetLog);\n                } else {\n                    $returnValue[$currentRow][$currentCol] = null;\n                }\n            } else {\n                // Extract cell data for all cells in the range\n                foreach ($aReferences as $reference) {\n                    // Extract range\n                    [$currentCol, $currentRow] = Coordinate::coordinateFromString($reference);\n                    if ($worksheet !== null && $worksheet->cellExists($reference)) {\n                        $returnValue[$currentRow][$currentCol] = $worksheet->getCell($reference)->getCalculatedValue($resetLog);\n                    } else {\n                        $returnValue[$currentRow][$currentCol] = null;\n                    }\n                }\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * Is a specific function implemented?\n     *\n     * @param string $function Function Name\n     */\n    public function isImplemented(string $function): bool\n    {\n        $function = strtoupper($function);\n        $phpSpreadsheetFunctions = &self::getFunctionsAddress();\n        $notImplemented = !isset($phpSpreadsheetFunctions[$function]) || (is_array($phpSpreadsheetFunctions[$function]['functionCall']) && $phpSpreadsheetFunctions[$function]['functionCall'][1] === 'DUMMY');\n\n        return !$notImplemented;\n    }\n\n    /**\n     * Get a list of implemented Excel function names.\n     *\n     * @return string[]\n     */\n    public function getImplementedFunctionNames(): array\n    {\n        $returnValue = [];\n        $phpSpreadsheetFunctions = &self::getFunctionsAddress();\n        foreach ($phpSpreadsheetFunctions as $functionName => $function) {\n            if ($this->isImplemented($functionName)) {\n                $returnValue[] = $functionName;\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * @param string[] $functionCall\n     * @param mixed[] $args\n     * @param mixed[] $emptyArguments\n     *\n     * @return mixed[]\n     */\n    private function addDefaultArgumentValues(array $functionCall, array $args, array $emptyArguments): array\n    {\n        $reflector = new ReflectionMethod($functionCall[0], $functionCall[1]);\n        $methodArguments = $reflector->getParameters();\n\n        if (count($methodArguments) > 0) {\n            // Apply any defaults for empty argument values\n            foreach ($emptyArguments as $argumentId => $isArgumentEmpty) {\n                if ($isArgumentEmpty === true) {\n                    $reflectedArgumentId = count($args) - (int) $argumentId - 1;\n                    if (\n                        !array_key_exists($reflectedArgumentId, $methodArguments)\n                        || $methodArguments[$reflectedArgumentId]->isVariadic()\n                    ) {\n                        break;\n                    }\n\n                    $args[$argumentId] = $this->getArgumentDefaultValue($methodArguments[$reflectedArgumentId]);\n                }\n            }\n        }\n\n        return $args;\n    }\n\n    private function getArgumentDefaultValue(ReflectionParameter $methodArgument): mixed\n    {\n        $defaultValue = null;\n\n        if ($methodArgument->isDefaultValueAvailable()) {\n            $defaultValue = $methodArgument->getDefaultValue();\n            if ($methodArgument->isDefaultValueConstant()) {\n                $constantName = $methodArgument->getDefaultValueConstantName() ?? '';\n                // read constant value\n                if (str_contains($constantName, '::')) {\n                    [$className, $constantName] = explode('::', $constantName);\n                    /** @var class-string $className */\n                    $constantReflector = new ReflectionClassConstant($className, $constantName);\n\n                    return $constantReflector->getValue();\n                }\n\n                return constant($constantName);\n            }\n        }\n\n        return $defaultValue;\n    }\n\n    /**\n     * Add cell reference if needed while making sure that it is the last argument.\n     *\n     * @param mixed[] $args\n     * @param string|string[] $functionCall\n     *\n     * @return mixed[]\n     */\n    private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array\n    {\n        if ($passCellReference) {\n            if (is_array($functionCall)) {\n                $className = $functionCall[0];\n                $methodName = $functionCall[1];\n\n                $reflectionMethod = new ReflectionMethod($className, $methodName);\n                $argumentCount = count($reflectionMethod->getParameters());\n                while (count($args) < $argumentCount - 1) {\n                    $args[] = null;\n                }\n            }\n\n            $args[] = $cell;\n        }\n\n        return $args;\n    }\n\n    private function evaluateDefinedName(Cell $cell, DefinedName $namedRange, Worksheet $cellWorksheet, Stack $stack, bool $ignoreScope = false): mixed\n    {\n        $definedNameScope = $namedRange->getScope();\n        if ($definedNameScope !== null && $definedNameScope !== $cellWorksheet && !$ignoreScope) {\n            // The defined name isn't in our current scope, so #REF\n            $result = ExcelError::REF();\n            $stack->push('Error', $result, $namedRange->getName());\n\n            return $result;\n        }\n\n        $definedNameValue = $namedRange->getValue();\n        $definedNameType = $namedRange->isFormula() ? 'Formula' : 'Range';\n        if ($definedNameType === 'Range') {\n            if (Preg::isMatch('/^(.*!)?(.*)$/', $definedNameValue, $matches)) {\n                $matches2 = Preg::replace(\n                    ['/ +/', '/,/'],\n                    [' ∩ ', ' ∪ '],\n                    trim($matches[2])\n                );\n                $definedNameValue = $matches[1] . $matches2;\n            }\n        }\n        $definedNameWorksheet = $namedRange->getWorksheet();\n\n        if ($definedNameValue[0] !== '=') {\n            $definedNameValue = '=' . $definedNameValue;\n        }\n\n        $this->debugLog->writeDebugLog('Defined Name is a %s with a value of %s', $definedNameType, $definedNameValue);\n\n        $originalCoordinate = $cell->getCoordinate();\n        $recursiveCalculationCell = ($definedNameType !== 'Formula' && $definedNameWorksheet !== null && $definedNameWorksheet !== $cellWorksheet)\n            ? $definedNameWorksheet->getCell('A1')\n            : $cell;\n        $recursiveCalculationCellAddress = $recursiveCalculationCell->getCoordinate();\n\n        // Adjust relative references in ranges and formulae so that we execute the calculation for the correct rows and columns\n        $definedNameValue = ReferenceHelper::getInstance()\n            ->updateFormulaReferencesAnyWorksheet(\n                $definedNameValue,\n                Coordinate::columnIndexFromString(\n                    $cell->getColumn()\n                ) - 1,\n                $cell->getRow() - 1\n            );\n\n        $this->debugLog->writeDebugLog('Value adjusted for relative references is %s', $definedNameValue);\n\n        $recursiveCalculator = new self($this->spreadsheet);\n        $recursiveCalculator->getDebugLog()->setWriteDebugLog($this->getDebugLog()->getWriteDebugLog());\n        $recursiveCalculator->getDebugLog()->setEchoDebugLog($this->getDebugLog()->getEchoDebugLog());\n        $result = $recursiveCalculator->_calculateFormulaValue($definedNameValue, $recursiveCalculationCellAddress, $recursiveCalculationCell, true);\n        $cellWorksheet->getCell($originalCoordinate);\n\n        if ($this->getDebugLog()->getWriteDebugLog()) {\n            $this->debugLog->mergeDebugLog(array_slice($recursiveCalculator->getDebugLog()->getLog(), 3));\n            $this->debugLog->writeDebugLog('Evaluation Result for Named %s %s is %s', $definedNameType, $namedRange->getName(), $this->showTypeDetails($result));\n        }\n\n        $y = $namedRange->getWorksheet()?->getTitle();\n        $x = $namedRange->getLocalOnly();\n        if ($x && $y !== null) {\n            $stack->push('Defined Name', $result, \"'$y'!\" . $namedRange->getName());\n        } else {\n            $stack->push('Defined Name', $result, $namedRange->getName());\n        }\n\n        return $result;\n    }\n\n    public function setSuppressFormulaErrors(bool $suppressFormulaErrors): self\n    {\n        $this->suppressFormulaErrors = $suppressFormulaErrors;\n\n        return $this;\n    }\n\n    public function getSuppressFormulaErrors(): bool\n    {\n        return $this->suppressFormulaErrors;\n    }\n\n    public static function boolToString(mixed $operand1): mixed\n    {\n        if (is_bool($operand1)) {\n            $operand1 = ($operand1) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE'];\n        } elseif ($operand1 === null) {\n            $operand1 = '';\n        }\n\n        return $operand1;\n    }\n\n    private static function isNumericOrBool(mixed $operand): bool\n    {\n        return is_numeric($operand) || is_bool($operand);\n    }\n\n    private static function makeError(mixed $operand = ''): string\n    {\n        return (is_string($operand) && Information\\ErrorValue::isError($operand)) ? $operand : ExcelError::VALUE();\n    }\n\n    private static function swapOperands(Stack $stack, string $opCharacter): bool\n    {\n        $retVal = false;\n        if ($stack->count() > 0) {\n            $o2 = $stack->last();\n            if ($o2) {\n                /** @var array{value: string} $o2 */\n                if (isset(self::CALCULATION_OPERATORS[$o2['value']])) {\n                    $retVal = (self::OPERATOR_PRECEDENCE[$opCharacter] ?? 0) <= self::OPERATOR_PRECEDENCE[$o2['value']];\n                }\n            }\n        }\n\n        return $retVal;\n    }\n\n    public function getSpreadsheet(): ?Spreadsheet\n    {\n        return $this->spreadsheet;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/CalculationBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nclass CalculationBase\n{\n    /**\n     * Get a list of all implemented functions as an array of function objects.\n     *\n     * @return array<string, array{category: string, functionCall: string|string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool}>\n     */\n    public static function getFunctions(): array\n    {\n        return FunctionArray::$phpSpreadsheetFunctions;\n    }\n\n    /**\n     * Get address of list of all implemented functions as an array of function objects.\n     *\n     * @return array<string, array<string, mixed>>\n     */\n    protected static function &getFunctionsAddress(): array\n    {\n        return FunctionArray::$phpSpreadsheetFunctions;\n    }\n\n    /**\n     * @param array{category: string, functionCall: string|string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool} $value\n     */\n    public static function addFunction(string $key, array $value): bool\n    {\n        $key = strtoupper($key);\n        if (\n            array_key_exists($key, FunctionArray::$phpSpreadsheetFunctions)\n            && !self::isDummy($key)\n        ) {\n            return false;\n        }\n        $value['custom'] = true;\n        FunctionArray::$phpSpreadsheetFunctions[$key] = $value;\n\n        return true;\n    }\n\n    private static function isDummy(string $key): bool\n    {\n        // key is already known to exist\n        $functionCall = FunctionArray::$phpSpreadsheetFunctions[$key]['functionCall'] ?? null;\n        if (!is_array($functionCall)) {\n            return false;\n        }\n        if (($functionCall[1] ?? '') !== 'DUMMY') {\n            return false;\n        }\n\n        return true;\n    }\n\n    public static function removeFunction(string $key): bool\n    {\n        $key = strtoupper($key);\n        if (array_key_exists($key, FunctionArray::$phpSpreadsheetFunctions)) {\n            if (FunctionArray::$phpSpreadsheetFunctions[$key]['custom'] ?? false) {\n                unset(FunctionArray::$phpSpreadsheetFunctions[$key]);\n\n                return true;\n            }\n        }\n\n        return false;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/CalculationLocale.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nclass CalculationLocale extends CalculationBase\n{\n    public const FORMULA_OPEN_FUNCTION_BRACE = '(';\n    public const FORMULA_CLOSE_FUNCTION_BRACE = ')';\n    public const FORMULA_OPEN_MATRIX_BRACE = '{';\n    public const FORMULA_CLOSE_MATRIX_BRACE = '}';\n    public const FORMULA_STRING_QUOTE = '\"';\n\n    //    Strip xlfn and xlws prefixes from function name\n    public const CALCULATION_REGEXP_STRIP_XLFN_XLWS = '/(_xlfn[.])?(_xlws[.])?(?=[\\p{L}][\\p{L}\\p{N}\\.]*[\\s]*[(])/';\n\n    /**\n     * The current locale setting.\n     */\n    protected static string $localeLanguage = 'en_us'; //    US English    (default locale)\n\n    /**\n     * List of available locale settings\n     * Note that this is read for the locale subdirectory only when requested.\n     *\n     * @var string[]\n     */\n    protected static array $validLocaleLanguages = [\n        'en', //    English        (default language)\n    ];\n\n    /**\n     * Locale-specific argument separator for function arguments.\n     */\n    protected static string $localeArgumentSeparator = ',';\n\n    /** @var string[] */\n    protected static array $localeFunctions = [];\n\n    /**\n     * Locale-specific translations for Excel constants (True, False and Null).\n     *\n     * @var array<string, string>\n     */\n    protected static array $localeBoolean = [\n        'TRUE' => 'TRUE',\n        'FALSE' => 'FALSE',\n        'NULL' => 'NULL',\n    ];\n\n    /** @var array<int, array<int, string>> */\n    protected static array $falseTrueArray = [];\n\n    public static function getLocaleBoolean(string $index): string\n    {\n        return self::$localeBoolean[$index];\n    }\n\n    protected static function loadLocales(): void\n    {\n        $localeFileDirectory = __DIR__ . '/locale/';\n        $localeFileNames = glob($localeFileDirectory . '*', GLOB_ONLYDIR) ?: [];\n        foreach ($localeFileNames as $filename) {\n            $filename = substr($filename, strlen($localeFileDirectory));\n            if ($filename != 'en') {\n                self::$validLocaleLanguages[] = $filename;\n                $subdirs = glob(\"$localeFileDirectory$filename/*\", GLOB_ONLYDIR) ?: [];\n                foreach ($subdirs as $subdir) {\n                    $subdirx = basename($subdir);\n                    self::$validLocaleLanguages[] = \"{$filename}_{$subdirx}\";\n                }\n            }\n        }\n    }\n\n    /**\n     * Return the locale-specific translation of TRUE.\n     *\n     * @return string locale-specific translation of TRUE\n     */\n    public static function getTRUE(): string\n    {\n        return self::$localeBoolean['TRUE'];\n    }\n\n    /**\n     * Return the locale-specific translation of FALSE.\n     *\n     * @return string locale-specific translation of FALSE\n     */\n    public static function getFALSE(): string\n    {\n        return self::$localeBoolean['FALSE'];\n    }\n\n    /**\n     * Get the currently defined locale code.\n     */\n    public function getLocale(): string\n    {\n        return self::$localeLanguage;\n    }\n\n    protected function getLocaleFile(string $localeDir, string $locale, string $language, string $file): string\n    {\n        $localeFileName = $localeDir . str_replace('_', DIRECTORY_SEPARATOR, $locale)\n            . DIRECTORY_SEPARATOR . $file;\n        if (!file_exists($localeFileName)) {\n            //    If there isn't a locale specific file, look for a language specific file\n            $localeFileName = $localeDir . $language . DIRECTORY_SEPARATOR . $file;\n            if (!file_exists($localeFileName)) {\n                throw new Exception('Locale file not found');\n            }\n        }\n\n        return $localeFileName;\n    }\n\n    /** @return array<int, array<int, string>> */\n    public function getFalseTrueArray(): array\n    {\n        if (!empty(self::$falseTrueArray)) {\n            return self::$falseTrueArray;\n        }\n        if (count(self::$validLocaleLanguages) == 1) {\n            self::loadLocales();\n        }\n        $falseTrueArray = [['FALSE'], ['TRUE']];\n        foreach (self::$validLocaleLanguages as $language) {\n            if (str_starts_with($language, 'en')) {\n                continue;\n            }\n            $locale = $language;\n            if (str_contains($locale, '_')) {\n                [$language] = explode('_', $locale);\n            }\n            $localeDir = implode(DIRECTORY_SEPARATOR, [__DIR__, 'locale', null]);\n\n            try {\n                $functionNamesFile = $this->getLocaleFile($localeDir, $locale, $language, 'functions');\n            } catch (Exception $e) {\n                continue;\n            }\n            //    Retrieve the list of locale or language specific function names\n            $localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ?: [];\n            foreach ($localeFunctions as $localeFunction) {\n                [$localeFunction] = explode('##', $localeFunction); //    Strip out comments\n                if (str_contains($localeFunction, '=')) {\n                    [$fName, $lfName] = array_map('trim', explode('=', $localeFunction));\n                    if ($fName === 'FALSE') {\n                        $falseTrueArray[0][] = $lfName;\n                    } elseif ($fName === 'TRUE') {\n                        $falseTrueArray[1][] = $lfName;\n                    }\n                }\n            }\n        }\n        self::$falseTrueArray = $falseTrueArray;\n\n        return $falseTrueArray;\n    }\n\n    /**\n     * Set the locale code.\n     *\n     * @param string $locale The locale to use for formula translation, eg: 'en_us'\n     */\n    public function setLocale(string $locale): bool\n    {\n        //    Identify our locale and language\n        $language = $locale = strtolower($locale);\n        if (str_contains($locale, '_')) {\n            [$language] = explode('_', $locale);\n        }\n        if (count(self::$validLocaleLanguages) == 1) {\n            self::loadLocales();\n        }\n\n        //    Test whether we have any language data for this language (any locale)\n        if (in_array($language, self::$validLocaleLanguages, true)) {\n            //    initialise language/locale settings\n            self::$localeFunctions = [];\n            self::$localeArgumentSeparator = ',';\n            self::$localeBoolean = ['TRUE' => 'TRUE', 'FALSE' => 'FALSE', 'NULL' => 'NULL'];\n\n            //    Default is US English, if user isn't requesting US english, then read the necessary data from the locale files\n            if ($locale !== 'en_us') {\n                $localeDir = implode(DIRECTORY_SEPARATOR, [__DIR__, 'locale', null]);\n\n                //    Search for a file with a list of function names for locale\n                try {\n                    $functionNamesFile = $this->getLocaleFile($localeDir, $locale, $language, 'functions');\n                } catch (Exception $e) {\n                    return false;\n                }\n\n                //    Retrieve the list of locale or language specific function names\n                $localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ?: [];\n                $phpSpreadsheetFunctions = &self::getFunctionsAddress();\n                foreach ($localeFunctions as $localeFunction) {\n                    [$localeFunction] = explode('##', $localeFunction); //    Strip out comments\n                    if (str_contains($localeFunction, '=')) {\n                        [$fName, $lfName] = array_map('trim', explode('=', $localeFunction));\n                        if ((str_starts_with($fName, '*') || isset($phpSpreadsheetFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) {\n                            self::$localeFunctions[$fName] = $lfName;\n                        }\n                    }\n                }\n                //    Default the TRUE and FALSE constants to the locale names of the TRUE() and FALSE() functions\n                if (isset(self::$localeFunctions['TRUE'])) {\n                    self::$localeBoolean['TRUE'] = self::$localeFunctions['TRUE'];\n                }\n                if (isset(self::$localeFunctions['FALSE'])) {\n                    self::$localeBoolean['FALSE'] = self::$localeFunctions['FALSE'];\n                }\n\n                try {\n                    $configFile = $this->getLocaleFile($localeDir, $locale, $language, 'config');\n                } catch (Exception) {\n                    return false;\n                }\n\n                $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ?: [];\n                foreach ($localeSettings as $localeSetting) {\n                    [$localeSetting] = explode('##', $localeSetting); //    Strip out comments\n                    if (str_contains($localeSetting, '=')) {\n                        [$settingName, $settingValue] = array_map('trim', explode('=', $localeSetting));\n                        $settingName = strtoupper($settingName);\n                        if ($settingValue !== '') {\n                            switch ($settingName) {\n                                case 'ARGUMENTSEPARATOR':\n                                    self::$localeArgumentSeparator = $settingValue;\n\n                                    break;\n                            }\n                        }\n                    }\n                }\n            }\n\n            self::$functionReplaceFromExcel = self::$functionReplaceToExcel\n            = self::$functionReplaceFromLocale = self::$functionReplaceToLocale = null;\n            self::$localeLanguage = $locale;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    public static function translateSeparator(\n        string $fromSeparator,\n        string $toSeparator,\n        string $formula,\n        int &$inBracesLevel,\n        string $openBrace = self::FORMULA_OPEN_FUNCTION_BRACE,\n        string $closeBrace = self::FORMULA_CLOSE_FUNCTION_BRACE\n    ): string {\n        $strlen = mb_strlen($formula);\n        for ($i = 0; $i < $strlen; ++$i) {\n            $chr = mb_substr($formula, $i, 1);\n            switch ($chr) {\n                case $openBrace:\n                    ++$inBracesLevel;\n\n                    break;\n                case $closeBrace:\n                    --$inBracesLevel;\n\n                    break;\n                case $fromSeparator:\n                    if ($inBracesLevel > 0) {\n                        $formula = mb_substr($formula, 0, $i) . $toSeparator . mb_substr($formula, $i + 1);\n                    }\n            }\n        }\n\n        return $formula;\n    }\n\n    /**\n     * @param string[] $from\n     * @param string[] $to\n     */\n    protected static function translateFormulaBlock(\n        array $from,\n        array $to,\n        string $formula,\n        int &$inFunctionBracesLevel,\n        int &$inMatrixBracesLevel,\n        string $fromSeparator,\n        string $toSeparator\n    ): string {\n        // Function Names\n        $formula = (string) preg_replace($from, $to, $formula);\n\n        // Temporarily adjust matrix separators so that they won't be confused with function arguments\n        $formula = self::translateSeparator(';', '|', $formula, $inMatrixBracesLevel, self::FORMULA_OPEN_MATRIX_BRACE, self::FORMULA_CLOSE_MATRIX_BRACE);\n        $formula = self::translateSeparator(',', '!', $formula, $inMatrixBracesLevel, self::FORMULA_OPEN_MATRIX_BRACE, self::FORMULA_CLOSE_MATRIX_BRACE);\n        // Function Argument Separators\n        $formula = self::translateSeparator($fromSeparator, $toSeparator, $formula, $inFunctionBracesLevel);\n        // Restore matrix separators\n        $formula = self::translateSeparator('|', ';', $formula, $inMatrixBracesLevel, self::FORMULA_OPEN_MATRIX_BRACE, self::FORMULA_CLOSE_MATRIX_BRACE);\n        $formula = self::translateSeparator('!', ',', $formula, $inMatrixBracesLevel, self::FORMULA_OPEN_MATRIX_BRACE, self::FORMULA_CLOSE_MATRIX_BRACE);\n\n        return $formula;\n    }\n\n    /**\n     * @param string[] $from\n     * @param string[] $to\n     */\n    protected static function translateFormula(array $from, array $to, string $formula, string $fromSeparator, string $toSeparator): string\n    {\n        // Convert any Excel function names and constant names to the required language;\n        //     and adjust function argument separators\n        if (self::$localeLanguage !== 'en_us') {\n            $inFunctionBracesLevel = 0;\n            $inMatrixBracesLevel = 0;\n            //    If there is the possibility of separators within a quoted string, then we treat them as literals\n            if (str_contains($formula, self::FORMULA_STRING_QUOTE)) {\n                //    So instead we skip replacing in any quoted strings by only replacing in every other array element\n                //       after we've exploded the formula\n                $temp = explode(self::FORMULA_STRING_QUOTE, $formula);\n                $notWithinQuotes = false;\n                foreach ($temp as &$value) {\n                    //    Only adjust in alternating array entries\n                    $notWithinQuotes = $notWithinQuotes === false;\n                    if ($notWithinQuotes === true) {\n                        $value = self::translateFormulaBlock($from, $to, $value, $inFunctionBracesLevel, $inMatrixBracesLevel, $fromSeparator, $toSeparator);\n                    }\n                }\n                unset($value);\n                //    Then rebuild the formula string\n                $formula = implode(self::FORMULA_STRING_QUOTE, $temp);\n            } else {\n                //    If there's no quoted strings, then we do a simple count/replace\n                $formula = self::translateFormulaBlock($from, $to, $formula, $inFunctionBracesLevel, $inMatrixBracesLevel, $fromSeparator, $toSeparator);\n            }\n        }\n\n        return $formula;\n    }\n\n    /** @var null|string[] */\n    private static ?array $functionReplaceFromExcel;\n\n    /** @var null|string[] */\n    private static ?array $functionReplaceToLocale;\n\n    public function translateFormulaToLocale(string $formula): string\n    {\n        $formula = preg_replace(self::CALCULATION_REGEXP_STRIP_XLFN_XLWS, '', $formula) ?? '';\n        // Build list of function names and constants for translation\n        if (self::$functionReplaceFromExcel === null) {\n            self::$functionReplaceFromExcel = [];\n            foreach (array_keys(self::$localeFunctions) as $excelFunctionName) {\n                self::$functionReplaceFromExcel[] = '/(@?[^\\w\\.])' . preg_quote($excelFunctionName, '/') . '([\\s]*\\()/ui';\n            }\n            foreach (array_keys(self::$localeBoolean) as $excelBoolean) {\n                self::$functionReplaceFromExcel[] = '/(@?[^\\w\\.])' . preg_quote($excelBoolean, '/') . '([^\\w\\.])/ui';\n            }\n        }\n\n        if (self::$functionReplaceToLocale === null) {\n            self::$functionReplaceToLocale = [];\n            foreach (self::$localeFunctions as $localeFunctionName) {\n                self::$functionReplaceToLocale[] = '$1' . trim($localeFunctionName) . '$2';\n            }\n            foreach (self::$localeBoolean as $localeBoolean) {\n                self::$functionReplaceToLocale[] = '$1' . trim($localeBoolean) . '$2';\n            }\n        }\n\n        return self::translateFormula(\n            self::$functionReplaceFromExcel,\n            self::$functionReplaceToLocale,\n            $formula,\n            ',',\n            self::$localeArgumentSeparator\n        );\n    }\n\n    /** @var null|string[] */\n    protected static ?array $functionReplaceFromLocale;\n\n    /** @var null|string[] */\n    protected static ?array $functionReplaceToExcel;\n\n    public function translateFormulaToEnglish(string $formula): string\n    {\n        if (self::$functionReplaceFromLocale === null) {\n            self::$functionReplaceFromLocale = [];\n            foreach (self::$localeFunctions as $localeFunctionName) {\n                self::$functionReplaceFromLocale[] = '/(@?[^\\w\\.])' . preg_quote($localeFunctionName, '/') . '([\\s]*\\()/ui';\n            }\n            foreach (self::$localeBoolean as $excelBoolean) {\n                self::$functionReplaceFromLocale[] = '/(@?[^\\w\\.])' . preg_quote($excelBoolean, '/') . '([^\\w\\.])/ui';\n            }\n        }\n\n        if (self::$functionReplaceToExcel === null) {\n            self::$functionReplaceToExcel = [];\n            foreach (array_keys(self::$localeFunctions) as $excelFunctionName) {\n                self::$functionReplaceToExcel[] = '$1' . trim($excelFunctionName) . '$2';\n            }\n            foreach (array_keys(self::$localeBoolean) as $excelBoolean) {\n                self::$functionReplaceToExcel[] = '$1' . trim($excelBoolean) . '$2';\n            }\n        }\n\n        return self::translateFormula(self::$functionReplaceFromLocale, self::$functionReplaceToExcel, $formula, self::$localeArgumentSeparator, ',');\n    }\n\n    public static function localeFunc(string $function): string\n    {\n        if (self::$localeLanguage !== 'en_us') {\n            $functionName = trim($function, '(');\n            if (isset(self::$localeFunctions[$functionName])) {\n                $brace = ($functionName != $function);\n                $function = self::$localeFunctions[$functionName];\n                if ($brace) {\n                    $function .= '(';\n                }\n            }\n        }\n\n        return $function;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/CalculationParserOnly.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\n/**\n * A dedicated Calculation singleton for formula parsing only.\n *\n * This class provides an isolated instance specifically for parsing formulas\n * without branch pruning, avoiding state conflicts with the main Calculation\n * singleton used for cell value calculations.\n *\n * @internal\n */\nfinal class CalculationParserOnly extends Calculation\n{\n    /**\n     * Instance of this class.\n     */\n    private static ?CalculationParserOnly $parserInstance = null;\n\n    /**\n     * Branch pruning is disabled by default for parsing-only operations.\n     */\n    protected bool $branchPruningEnabled = false;\n\n    /**\n     * Get the singleton instance of this parser-only calculator.\n     */\n    public static function getParserInstance(): self\n    {\n        if (!self::$parserInstance) {\n            self::$parserInstance = new self();\n        }\n\n        return self::$parserInstance;\n    }\n\n    /** @param mixed $enabled Unused, property will always be false in this class */\n    public function setBranchPruningEnabled(mixed $enabled): self\n    {\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Category.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nabstract class Category\n{\n    // Function categories\n    const CATEGORY_CUBE = 'Cube';\n    const CATEGORY_DATABASE = 'Database';\n    const CATEGORY_DATE_AND_TIME = 'Date and Time';\n    const CATEGORY_ENGINEERING = 'Engineering';\n    const CATEGORY_FINANCIAL = 'Financial';\n    const CATEGORY_INFORMATION = 'Information';\n    const CATEGORY_LOGICAL = 'Logical';\n    const CATEGORY_LOOKUP_AND_REFERENCE = 'Lookup and Reference';\n    const CATEGORY_MATH_AND_TRIG = 'Math and Trig';\n    const CATEGORY_STATISTICAL = 'Statistical';\n    const CATEGORY_TEXT_AND_DATA = 'Text and Data';\n    const CATEGORY_WEB = 'Web';\n    const CATEGORY_UNCATEGORISED = 'Uncategorised';\n    const CATEGORY_MICROSOFT_INTERNAL = 'MS Internal';\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DAverage.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages;\n\nclass DAverage extends DatabaseAbstract\n{\n    /**\n     * DAVERAGE.\n     *\n     * Averages the values in a column of a list or database that match conditions you specify.\n     *\n     * Excel Function:\n     *        DAVERAGE(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                          A database is a list of related data in which rows of related\n     *                              information are records, and columns of data are fields. The\n     *                              first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                              column label enclosed between double quotation marks, such as\n     *                              \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                              represents the position of the column within the list: 1 for\n     *                              the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                          You can use any range for the criteria argument, as long as it\n     *                              includes at least one column label and at least one cell below\n     *                              the column label in which you specify a condition for the\n     *                              column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria): string|int|float\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return ExcelError::VALUE();\n        }\n\n        return Averages::average(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DCount.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts;\n\nclass DCount extends DatabaseAbstract\n{\n    /**\n     * DCOUNT.\n     *\n     * Counts the cells that contain numbers in a column of a list or database that match conditions\n     * that you specify.\n     *\n     * Excel Function:\n     *        DCOUNT(database,[field],criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria, bool $returnError = true): string|int\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($returnError && $field === null) {\n            return ExcelError::VALUE();\n        }\n\n        return Counts::COUNT(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DCountA.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts;\n\nclass DCountA extends DatabaseAbstract\n{\n    /**\n     * DCOUNTA.\n     *\n     * Counts the nonblank cells in a column of a list or database that match conditions that you specify.\n     *\n     * Excel Function:\n     *        DCOUNTA(database,[field],criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria): string|int\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return ExcelError::VALUE();\n        }\n\n        return Counts::COUNTA(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DGet.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass DGet extends DatabaseAbstract\n{\n    /**\n     * DGET.\n     *\n     * Extracts a single value from a column of a list or database that matches conditions that you\n     * specify.\n     *\n     * Excel Function:\n     *        DGET(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria): null|float|int|string\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return ExcelError::VALUE();\n        }\n\n        $columnData = self::getFilteredColumn($database, $field, $criteria);\n        if (count($columnData) > 1) {\n            return ExcelError::NAN();\n        }\n\n        /** @var array<null|float|int|string> */\n        $row = array_pop($columnData);\n\n        return array_pop($row);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DMax.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Maximum;\n\nclass DMax extends DatabaseAbstract\n{\n    /**\n     * DMAX.\n     *\n     * Returns the largest number in a column of a list or database that matches conditions you that\n     * specify.\n     *\n     * Excel Function:\n     *        DMAX(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria, bool $returnError = true): null|float|string\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return $returnError ? ExcelError::VALUE() : null;\n        }\n\n        return Maximum::max(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DMin.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Minimum;\n\nclass DMin extends DatabaseAbstract\n{\n    /**\n     * DMIN.\n     *\n     * Returns the smallest number in a column of a list or database that matches conditions you that\n     * specify.\n     *\n     * Excel Function:\n     *        DMIN(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria, bool $returnError = true): float|string|null\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return $returnError ? ExcelError::VALUE() : null;\n        }\n\n        return Minimum::min(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DProduct.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nclass DProduct extends DatabaseAbstract\n{\n    /**\n     * DPRODUCT.\n     *\n     * Multiplies the values in a column of a list or database that match conditions that you specify.\n     *\n     * Excel Function:\n     *        DPRODUCT(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria): string|float\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return ExcelError::VALUE();\n        }\n\n        return MathTrig\\Operations::product(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DStDev.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations;\n\nclass DStDev extends DatabaseAbstract\n{\n    /**\n     * DSTDEV.\n     *\n     * Estimates the standard deviation of a population based on a sample by using the numbers in a\n     * column of a list or database that match conditions that you specify.\n     *\n     * Excel Function:\n     *        DSTDEV(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria): float|string\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return ExcelError::VALUE();\n        }\n\n        return StandardDeviations::STDEV(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DStDevP.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations;\n\nclass DStDevP extends DatabaseAbstract\n{\n    /**\n     * DSTDEVP.\n     *\n     * Calculates the standard deviation of a population based on the entire population by using the\n     * numbers in a column of a list or database that match conditions that you specify.\n     *\n     * Excel Function:\n     *        DSTDEVP(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria): float|string\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return ExcelError::VALUE();\n        }\n\n        return StandardDeviations::STDEVP(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DSum.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nclass DSum extends DatabaseAbstract\n{\n    /**\n     * DSUM.\n     *\n     * Adds the numbers in a column of a list or database that match conditions that you specify.\n     *\n     * Excel Function:\n     *        DSUM(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria, bool $returnNull = false): null|float|string\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return $returnNull ? null : ExcelError::VALUE();\n        }\n\n        return MathTrig\\Sum::sumIgnoringStrings(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DVar.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances;\n\nclass DVar extends DatabaseAbstract\n{\n    /**\n     * DVAR.\n     *\n     * Estimates the variance of a population based on a sample by using the numbers in a column\n     * of a list or database that match conditions that you specify.\n     *\n     * Excel Function:\n     *        DVAR(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     *\n     * @return float|string (string if result is an error)\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria): string|float\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return ExcelError::VALUE();\n        }\n\n        return Variances::VAR(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DVarP.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Variances;\n\nclass DVarP extends DatabaseAbstract\n{\n    /**\n     * DVARP.\n     *\n     * Calculates the variance of a population based on the entire population by using the numbers\n     * in a column of a list or database that match conditions that you specify.\n     *\n     * Excel Function:\n     *        DVARP(database,field,criteria)\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     *\n     * @return float|string (string if result is an error)\n     */\n    public static function evaluate(array $database, array|null|int|string $field, array $criteria): string|float\n    {\n        $field = self::fieldExtract($database, $field);\n        if ($field === null) {\n            return ExcelError::VALUE();\n        }\n\n        return Variances::VARP(\n            self::getFilteredColumn($database, $field, $criteria)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\WildcardMatch;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nabstract class DatabaseAbstract\n{\n    /**\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param null|array<mixed>|int|string $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     * @param mixed[] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     */\n    abstract public static function evaluate(array $database, array|null|int|string $field, array $criteria): null|float|int|string;\n\n    /**\n     * fieldExtract.\n     *\n     * Extracts the column ID to use for the data field.\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param mixed $field Indicates which column is used in the function. Enter the\n     *                                        column label enclosed between double quotation marks, such as\n     *                                        \"Age\" or \"Yield,\" or a number (without quotation marks) that\n     *                                        represents the position of the column within the list: 1 for\n     *                                        the first column, 2 for the second column, and so on.\n     */\n    protected static function fieldExtract(array $database, mixed $field): ?int\n    {\n        /** @var ?string */\n        $single = Functions::flattenSingleValue($field);\n        $field = strtoupper($single ?? '');\n        if ($field === '') {\n            return null;\n        }\n\n        /** @var callable */\n        $callable = 'strtoupper';\n        $fieldNames = array_map($callable, array_shift($database)); //* @phpstan-ignore-line\n        if (is_numeric($field)) {\n            $field = (int) $field - 1;\n            if ($field < 0 || $field >= count($fieldNames)) {\n                return null;\n            }\n\n            return $field;\n        }\n        $key = array_search($field, array_values($fieldNames), true);\n\n        return ($key !== false) ? (int) $key : null;\n    }\n\n    /**\n     * filter.\n     *\n     * Parses the selection criteria, extracts the database rows that match those criteria, and\n     * returns that subset of rows.\n     *\n     * @param mixed[] $database The range of cells that makes up the list or database.\n     *                                        A database is a list of related data in which rows of related\n     *                                        information are records, and columns of data are fields. The\n     *                                        first row of the list contains labels for each column.\n     * @param mixed[][] $criteria The range of cells that contains the conditions you specify.\n     *                                        You can use any range for the criteria argument, as long as it\n     *                                        includes at least one column label and at least one cell below\n     *                                        the column label in which you specify a condition for the\n     *                                        column.\n     *\n     * @return mixed[]\n     */\n    protected static function filter(array $database, array $criteria): array\n    {\n        /** @var mixed[] */\n        $fieldNames = array_shift($database);\n        $criteriaNames = array_shift($criteria);\n\n        //    Convert the criteria into a set of AND/OR conditions with [:placeholders]\n        /** @var string[] $criteriaNames */\n        $query = self::buildQuery($criteriaNames, $criteria);\n\n        //    Loop through each row of the database\n        /** @var mixed[][] $criteriaNames */\n        return self::executeQuery($database, $query, $criteriaNames, $fieldNames);\n    }\n\n    /**\n     * @param mixed[] $database The range of cells that makes up the list or database\n     * @param mixed[][] $criteria\n     *\n     * @return mixed[]\n     */\n    protected static function getFilteredColumn(array $database, ?int $field, array $criteria): array\n    {\n        //    reduce the database to a set of rows that match all the criteria\n        $database = self::filter($database, $criteria);\n        $defaultReturnColumnValue = ($field === null) ? 1 : null;\n\n        //    extract an array of values for the requested column\n        $columnData = [];\n        /** @var mixed[] $row */\n        foreach ($database as $rowKey => $row) {\n            $keys = array_keys($row);\n            $key = ($field === null) ? null : ($keys[$field] ?? null);\n            $columnKey = $key ?? 'A';\n            $columnData[$rowKey][$columnKey] = ($key === null) ? $defaultReturnColumnValue : ($row[$key] ?? $defaultReturnColumnValue);\n        }\n\n        return $columnData;\n    }\n\n    /**\n     * @param string[] $criteriaNames\n     * @param mixed[][] $criteria\n     */\n    private static function buildQuery(array $criteriaNames, array $criteria): string\n    {\n        $baseQuery = [];\n        foreach ($criteria as $key => $criterion) {\n            foreach ($criterion as $field => $value) {\n                $criterionName = $criteriaNames[$field];\n                if ($value !== null) {\n                    $condition = self::buildCondition($value, $criterionName);\n                    $baseQuery[$key][] = $condition;\n                }\n            }\n        }\n\n        $rowQuery = array_map(\n            fn ($rowValue): string => (count($rowValue) > 1) ? 'AND(' . implode(',', $rowValue) . ')' : ($rowValue[0] ?? ''), // @phpstan-ignore-line\n            $baseQuery\n        );\n\n        return (count($rowQuery) > 1) ? 'OR(' . implode(',', $rowQuery) . ')' : ($rowQuery[0] ?? '');\n    }\n\n    private static function buildCondition(mixed $criterion, string $criterionName): string\n    {\n        $ifCondition = Functions::ifCondition($criterion);\n\n        // Check for wildcard characters used in the condition\n        $result = preg_match('/(?<operator>[^\"]*)(?<operand>\".*[*?].*\")/ui', $ifCondition, $matches);\n        if ($result !== 1) {\n            return \"[:{$criterionName}]{$ifCondition}\";\n        }\n\n        $trueFalse = ($matches['operator'] !== '<>');\n        $wildcard = WildcardMatch::wildcard($matches['operand']);\n        $condition = \"WILDCARDMATCH([:{$criterionName}],{$wildcard})\";\n        if ($trueFalse === false) {\n            $condition = \"NOT({$condition})\";\n        }\n\n        return $condition;\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     * @param array<mixed> $fields\n     *\n     * @return mixed[]\n     */\n    private static function executeQuery(array $database, string $query, array $criteria, array $fields): array\n    {\n        foreach ($database as $dataRow => $dataValues) {\n            //    Substitute actual values from the database row for our [:placeholders]\n            $conditions = $query;\n            foreach ($criteria as $criterion) {\n                /** @var string $criterion */\n                /** @var mixed[] $dataValues */\n                $conditions = self::processCondition($criterion, $fields, $dataValues, $conditions);\n            }\n\n            //    evaluate the criteria against the row data\n            $result = Calculation::getInstance()->_calculateFormulaValue('=' . $conditions);\n\n            //    If the row failed to meet the criteria, remove it from the database\n            if ($result !== true) {\n                unset($database[$dataRow]);\n            }\n        }\n\n        return $database;\n    }\n\n    /**\n     * @param array<mixed> $fields\n     * @param array<mixed> $dataValues\n     */\n    private static function processCondition(string $criterion, array $fields, array $dataValues, string $conditions): string\n    {\n        $key = array_search($criterion, $fields, true);\n\n        $dataValue = 'NULL';\n        if (is_bool($dataValues[$key])) {\n            $dataValue = ($dataValues[$key]) ? 'TRUE' : 'FALSE';\n        } elseif ($dataValues[$key] !== null) {\n            $dataValue = $dataValues[$key];\n            // escape quotes if we have a string containing quotes\n            if (is_string($dataValue) && str_contains($dataValue, '\"')) {\n                $dataValue = str_replace('\"', '\"\"', $dataValue);\n            }\n            if (is_string($dataValue)) {\n                $dataValue = Calculation::wrapResult(strtoupper($dataValue));\n            }\n            $dataValue = StringHelper::convertToString($dataValue);\n        }\n\n        return str_replace('[:' . $criterion . ']', $dataValue, $conditions);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Constants.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nclass Constants\n{\n    // Constants currently used by WeekNum; will eventually be used by WEEKDAY\n    const STARTWEEK_SUNDAY = 1;\n    const STARTWEEK_MONDAY = 2;\n    const STARTWEEK_MONDAY_ALT = 11;\n    const STARTWEEK_TUESDAY = 12;\n    const STARTWEEK_WEDNESDAY = 13;\n    const STARTWEEK_THURSDAY = 14;\n    const STARTWEEK_FRIDAY = 15;\n    const STARTWEEK_SATURDAY = 16;\n    const STARTWEEK_SUNDAY_ALT = 17;\n    const DOW_SUNDAY = 1;\n    const DOW_MONDAY = 2;\n    const DOW_TUESDAY = 3;\n    const DOW_WEDNESDAY = 4;\n    const DOW_THURSDAY = 5;\n    const DOW_FRIDAY = 6;\n    const DOW_SATURDAY = 7;\n    const STARTWEEK_MONDAY_ISO = 21;\n\n    const METHODARR = [\n        self::STARTWEEK_SUNDAY => self::DOW_SUNDAY,\n        self::DOW_MONDAY,\n        self::STARTWEEK_MONDAY_ALT => self::DOW_MONDAY,\n        self::DOW_TUESDAY,\n        self::DOW_WEDNESDAY,\n        self::DOW_THURSDAY,\n        self::DOW_FRIDAY,\n        self::DOW_SATURDAY,\n        self::DOW_SUNDAY,\n        self::STARTWEEK_MONDAY_ISO => self::STARTWEEK_MONDAY_ISO,\n    ];\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Current.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTime;\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Current\n{\n    /**\n     * DATENOW.\n     *\n     * Returns the current date.\n     * The NOW function is useful when you need to display the current date and time on a worksheet or\n     * calculate a value based on the current date and time, and have that value updated each time you\n     * open the worksheet.\n     *\n     * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date\n     * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.\n     *\n     * Excel Function:\n     *        TODAY()\n     *\n     * @return DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     */\n    public static function today(): DateTime|float|int|string\n    {\n        $dti = new DateTimeImmutable();\n        $dateArray = Helpers::dateParse($dti->format('c'));\n\n        return Helpers::dateParseSucceeded($dateArray) ? Helpers::returnIn3FormatsArray($dateArray, true) : ExcelError::VALUE();\n    }\n\n    /**\n     * DATETIMENOW.\n     *\n     * Returns the current date and time.\n     * The NOW function is useful when you need to display the current date and time on a worksheet or\n     * calculate a value based on the current date and time, and have that value updated each time you\n     * open the worksheet.\n     *\n     * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date\n     * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.\n     *\n     * Excel Function:\n     *        NOW()\n     *\n     * @return DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     */\n    public static function now(): DateTime|float|int|string\n    {\n        $dti = new DateTimeImmutable();\n        $dateArray = Helpers::dateParse($dti->format('c'));\n\n        return Helpers::dateParseSucceeded($dateArray) ? Helpers::returnIn3FormatsArray($dateArray) : ExcelError::VALUE();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Date\n{\n    use ArrayEnabled;\n\n    /**\n     * DATE.\n     *\n     * The DATE function returns a value that represents a particular date.\n     *\n     * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date\n     * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.\n     *\n     * Excel Function:\n     *        DATE(year,month,day)\n     *\n     * PhpSpreadsheet is a lot more forgiving than MS Excel when passing non-numeric values to this function.\n     * A Month name or abbreviation (English only at this point) such as 'January' or 'Jan' will still be accepted,\n     *     as will a day value with a suffix (e.g. '21st' rather than simply 21); again only English language.\n     *\n     * @param array<mixed>|float|int|string $year The value of the year argument can include one to four digits.\n     *                                Excel interprets the year argument according to the configured\n     *                                date system: 1900 or 1904.\n     *                                If year is between 0 (zero) and 1899 (inclusive), Excel adds that\n     *                                value to 1900 to calculate the year. For example, DATE(108,1,2)\n     *                                returns January 2, 2008 (1900+108).\n     *                                If year is between 1900 and 9999 (inclusive), Excel uses that\n     *                                value as the year. For example, DATE(2008,1,2) returns January 2,\n     *                                2008.\n     *                                If year is less than 0 or is 10000 or greater, Excel returns the\n     *                                #NUM! error value.\n     * @param array<mixed>|float|int|string $month A positive or negative integer representing the month of the year\n     *                                from 1 to 12 (January to December).\n     *                                If month is greater than 12, month adds that number of months to\n     *                                the first month in the year specified. For example, DATE(2008,14,2)\n     *                                returns the serial number representing February 2, 2009.\n     *                                If month is less than 1, month subtracts the magnitude of that\n     *                                number of months, plus 1, from the first month in the year\n     *                                specified. For example, DATE(2008,-3,2) returns the serial number\n     *                                representing September 2, 2007.\n     * @param array<mixed>|float|int|string $day A positive or negative integer representing the day of the month\n     *                                from 1 to 31.\n     *                                If day is greater than the number of days in the month specified,\n     *                                day adds that number of days to the first day in the month. For\n     *                                example, DATE(2008,1,35) returns the serial number representing\n     *                                February 4, 2008.\n     *                                If day is less than 1, day subtracts the magnitude that number of\n     *                                days, plus one, from the first day of the month specified. For\n     *                                example, DATE(2008,1,-15) returns the serial number representing\n     *                                December 16, 2007.\n     *\n     * @return array<mixed>|DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function fromYMD(array|float|int|string $year, null|array|bool|float|int|string $month, array|float|int|string $day): float|int|DateTime|string|array\n    {\n        if (is_array($year) || is_array($month) || is_array($day)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $year, $month, $day);\n        }\n\n        $baseYear = SharedDateHelper::getExcelCalendar();\n\n        try {\n            $year = self::getYear($year, $baseYear);\n            $month = self::getMonth($month);\n            $day = self::getDay($day);\n            self::adjustYearMonth($year, $month, $baseYear);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        $excelDateValue = SharedDateHelper::formattedPHPToExcel($year, $month, $day);\n\n        return Helpers::returnIn3FormatsFloat($excelDateValue);\n    }\n\n    /**\n     * Convert year from multiple formats to int.\n     */\n    private static function getYear(mixed $year, int $baseYear): int\n    {\n        if ($year === null) {\n            $year = 0;\n        } elseif (is_scalar($year)) {\n            $year = StringHelper::testStringAsNumeric((string) $year);\n        }\n        if (!is_numeric($year)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n        $year = (int) $year;\n\n        if ($year < ($baseYear - 1900)) {\n            throw new Exception(ExcelError::NAN());\n        }\n        if ((($baseYear - 1900) !== 0) && ($year < $baseYear) && ($year >= 1900)) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        if (($year < $baseYear) && ($year >= ($baseYear - 1900))) {\n            $year += 1900;\n        }\n\n        return (int) $year;\n    }\n\n    /**\n     * Convert month from multiple formats to int.\n     */\n    private static function getMonth(mixed $month): int\n    {\n        if (is_string($month)) {\n            if (!is_numeric($month)) {\n                $month = SharedDateHelper::monthStringToNumber($month);\n            }\n        } elseif ($month === null) {\n            $month = 0;\n        } elseif (is_bool($month)) {\n            $month = (int) $month;\n        }\n        if (!is_numeric($month)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (int) $month;\n    }\n\n    /**\n     * Convert day from multiple formats to int.\n     */\n    private static function getDay(mixed $day): int\n    {\n        if (is_string($day) && !is_numeric($day)) {\n            $day = SharedDateHelper::dayStringToNumber($day);\n        }\n\n        if ($day === null) {\n            $day = 0;\n        } elseif (is_scalar($day)) {\n            $day = StringHelper::testStringAsNumeric((string) $day);\n        }\n        if (!is_numeric($day)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (int) $day;\n    }\n\n    private static function adjustYearMonth(int &$year, int &$month, int $baseYear): void\n    {\n        if ($month < 1) {\n            //    Handle year/month adjustment if month < 1\n            --$month;\n            $year += (int) (ceil($month / 12) - 1);\n            $month = 13 - abs($month % 12);\n        } elseif ($month > 12) {\n            //    Handle year/month adjustment if month > 12\n            $year += intdiv($month, 12);\n            $month = ($month % 12);\n        }\n\n        // Re-validate the year parameter after adjustments\n        if (($year < $baseYear) || ($year >= 10000)) {\n            throw new Exception(ExcelError::NAN());\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass DateParts\n{\n    use ArrayEnabled;\n\n    /**\n     * DAYOFMONTH.\n     *\n     * Returns the day of the month, for a specified date. The day is given as an integer\n     * ranging from 1 to 31.\n     *\n     * Excel Function:\n     *        DAY(dateValue)\n     *\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     *\n     * @return array<mixed>|int|string Day of the month\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function day(mixed $dateValue): array|int|string\n    {\n        if (is_array($dateValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);\n        }\n\n        $weirdResult = self::weirdCondition($dateValue);\n        if ($weirdResult >= 0) {\n            return $weirdResult;\n        }\n\n        try {\n            $dateValue = Helpers::getDateValue($dateValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);\n        SharedDateHelper::roundMicroseconds($PHPDateObject);\n\n        return (int) $PHPDateObject->format('j');\n    }\n\n    /**\n     * MONTHOFYEAR.\n     *\n     * Returns the month of a date represented by a serial number.\n     * The month is given as an integer, ranging from 1 (January) to 12 (December).\n     *\n     * Excel Function:\n     *        MONTH(dateValue)\n     *\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     *\n     * @return array<mixed>|int|string Month of the year\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function month(mixed $dateValue): array|string|int\n    {\n        if (is_array($dateValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);\n        }\n\n        try {\n            $dateValue = Helpers::getDateValue($dateValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n        if ($dateValue < 1 && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900) {\n            return 1;\n        }\n\n        // Execute function\n        $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);\n        SharedDateHelper::roundMicroseconds($PHPDateObject);\n\n        return (int) $PHPDateObject->format('n');\n    }\n\n    /**\n     * YEAR.\n     *\n     * Returns the year corresponding to a date.\n     * The year is returned as an integer in the range 1900-9999.\n     *\n     * Excel Function:\n     *        YEAR(dateValue)\n     *\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     *\n     * @return array<mixed>|int|string Year\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function year(mixed $dateValue): array|string|int\n    {\n        if (is_array($dateValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);\n        }\n\n        try {\n            $dateValue = Helpers::getDateValue($dateValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($dateValue < 1 && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900) {\n            return 1900;\n        }\n        // Execute function\n        $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);\n        SharedDateHelper::roundMicroseconds($PHPDateObject);\n\n        return (int) $PHPDateObject->format('Y');\n    }\n\n    /**\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     */\n    private static function weirdCondition(mixed $dateValue): int\n    {\n        // Excel does not treat 0 consistently for DAY vs. (MONTH or YEAR)\n        if (SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900 && Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {\n            if (is_bool($dateValue)) {\n                return (int) $dateValue;\n            }\n            if ($dateValue === null) {\n                return 0;\n            }\n            if (is_numeric($dateValue) && $dateValue < 1 && $dateValue >= 0) {\n                return 0;\n            }\n        }\n\n        return -1;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTime;\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass DateValue\n{\n    use ArrayEnabled;\n\n    /**\n     * DATEVALUE.\n     *\n     * Returns a value that represents a particular date.\n     * Use DATEVALUE to convert a date represented by a text string to an Excel or PHP date/time stamp\n     * value.\n     *\n     * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date\n     * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.\n     *\n     * Excel Function:\n     *        DATEVALUE(dateValue)\n     *\n     * @param null|array<mixed>|bool|float|int|string $dateValue Text that represents a date in a Microsoft Excel date format.\n     *                                    For example, \"1/30/2008\" or \"30-Jan-2008\" are text strings within\n     *                                    quotation marks that represent dates. Using the default date\n     *                                    system in Excel for Windows, date_text must represent a date from\n     *                                    January 1, 1900, to December 31, 9999. Using the default date\n     *                                    system in Excel for the Macintosh, date_text must represent a date\n     *                                    from January 1, 1904, to December 31, 9999. DATEVALUE returns the\n     *                                    #VALUE! error value if date_text is out of this range.\n     *                         Or can be an array of date values\n     *\n     * @return array<mixed>|DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function fromString(null|array|string|int|bool|float $dateValue): array|string|float|int|DateTime\n    {\n        if (is_array($dateValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);\n        }\n\n        // try to parse as date iff there is at least one digit\n        if (is_string($dateValue) && preg_match('/\\d/', $dateValue) !== 1) {\n            return ExcelError::VALUE();\n        }\n\n        $dti = new DateTimeImmutable();\n        $baseYear = SharedDateHelper::getExcelCalendar();\n        $dateValue = trim((string) $dateValue, '\"');\n        //    Strip any ordinals because they're allowed in Excel (English only)\n        $dateValue = (string) preg_replace('/(\\d)(st|nd|rd|th)([ -\\/])/Ui', '$1$3', $dateValue);\n        //    Convert separators (/ . or space) to hyphens (should also handle dot used for ordinals in some countries, e.g. Denmark, Germany)\n        $dateValue = str_replace(['/', '.', '-', '  '], ' ', $dateValue);\n\n        $yearFound = false;\n        $t1 = explode(' ', $dateValue);\n        $t = '';\n        foreach ($t1 as &$t) {\n            if ((is_numeric($t)) && ($t > 31)) {\n                if ($yearFound) {\n                    return ExcelError::VALUE();\n                }\n                if ($t < 100) {\n                    $t += 1900;\n                }\n                $yearFound = true;\n            }\n        }\n        if (count($t1) === 1) {\n            //    We've been fed a time value without any date\n            return ((!str_contains((string) $t, ':'))) ? ExcelError::Value() : 0.0;\n        }\n        unset($t);\n\n        $dateValue = self::t1ToString($t1, $dti, $yearFound);\n\n        $PHPDateArray = self::setUpArray($dateValue, $dti);\n\n        return self::finalResults($PHPDateArray, $dti, $baseYear);\n    }\n\n    /** @param mixed[] $t1 */\n    private static function t1ToString(array $t1, DateTimeImmutable $dti, bool $yearFound): string\n    {\n        if (count($t1) == 2) {\n            //    We only have two parts of the date: either day/month or month/year\n            if ($yearFound) {\n                array_unshift($t1, 1);\n            } else {\n                if (is_numeric($t1[1]) && $t1[1] > 29) {\n                    $t1[1] += 1900;\n                    array_unshift($t1, 1);\n                } else {\n                    $t1[] = $dti->format('Y');\n                }\n            }\n        }\n        $dateValue = implode(' ', $t1);\n\n        return $dateValue;\n    }\n\n    /**\n     * Parse date.\n     *\n     * @return mixed[]\n     */\n    private static function setUpArray(string $dateValue, DateTimeImmutable $dti): array\n    {\n        $PHPDateArray = Helpers::dateParse($dateValue);\n        if (!Helpers::dateParseSucceeded($PHPDateArray)) {\n            // If original count was 1, we've already returned.\n            // If it was 2, we added another.\n            // Therefore, neither of the first 2 strtoks below can fail.\n            $testVal1 = strtok($dateValue, '- ');\n            $testVal2 = strtok('- ');\n            $testVal3 = strtok('- ') ?: $dti->format('Y');\n            Helpers::adjustYear((string) $testVal1, (string) $testVal2, $testVal3);\n            $PHPDateArray = Helpers::dateParse($testVal1 . '-' . $testVal2 . '-' . $testVal3);\n            if (!Helpers::dateParseSucceeded($PHPDateArray)) {\n                $PHPDateArray = Helpers::dateParse($testVal2 . '-' . $testVal1 . '-' . $testVal3);\n            }\n        }\n\n        return $PHPDateArray;\n    }\n\n    /**\n     * Final results.\n     *\n     * @param mixed[] $PHPDateArray\n     *\n     * @return DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     */\n    private static function finalResults(array $PHPDateArray, DateTimeImmutable $dti, int $baseYear): string|float|int|DateTime\n    {\n        $retValue = ExcelError::Value();\n        if (Helpers::dateParseSucceeded($PHPDateArray)) {\n            /** @var array{year: int, month: int, day: int, hour: int, minute: int, second: int} $PHPDateArray */\n            // Execute function\n            Helpers::replaceIfEmpty($PHPDateArray['year'], $dti->format('Y'));\n            if ($PHPDateArray['year'] < $baseYear) {\n                return ExcelError::VALUE();\n            }\n            Helpers::replaceIfEmpty($PHPDateArray['month'], $dti->format('m'));\n            Helpers::replaceIfEmpty($PHPDateArray['day'], $dti->format('d'));\n            /** @var array{year: int, month: int, day: int, hour: int, minute: int, second: int} $PHPDateArray */\n            $PHPDateArray['hour'] = 0;\n            $PHPDateArray['minute'] = 0;\n            $PHPDateArray['second'] = 0;\n            $month = self::getInt($PHPDateArray, 'month');\n            $day = self::getInt($PHPDateArray, 'day');\n            $year = self::getInt($PHPDateArray, 'year');\n            if (!checkdate($month, $day, $year)) {\n                return ($year === 1900 && $month === 2 && $day === 29) ? Helpers::returnIn3FormatsFloat(60.0) : ExcelError::VALUE();\n            }\n            $retValue = Helpers::returnIn3FormatsArray($PHPDateArray, true);\n        }\n\n        return $retValue;\n    }\n\n    /** @param mixed[] $array */\n    private static function getInt(array $array, string $index): int\n    {\n        return (array_key_exists($index, $array) && is_numeric($array[$index])) ? (int) $array[$index] : 0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass Days\n{\n    use ArrayEnabled;\n\n    /**\n     * DAYS.\n     *\n     * Returns the number of days between two dates\n     *\n     * Excel Function:\n     *        DAYS(endDate, startDate)\n     *\n     * @param array<mixed>|DateTimeInterface|float|int|string $endDate Excel date serial value (float),\n     *           PHP date timestamp (integer), PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param array<mixed>|DateTimeInterface|float|int|string $startDate Excel date serial value (float),\n     *           PHP date timestamp (integer), PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     *\n     * @return array<mixed>|int|string Number of days between start date and end date or an error\n     *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function between(array|DateTimeInterface|float|int|string $endDate, array|DateTimeInterface|float|int|string $startDate): array|int|string\n    {\n        if (is_array($endDate) || is_array($startDate)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $endDate, $startDate);\n        }\n\n        try {\n            $startDate = Helpers::getDateValue($startDate);\n            $endDate = Helpers::getDateValue($endDate);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        $PHPStartDateObject = SharedDateHelper::excelToDateTimeObject($startDate);\n        $PHPEndDateObject = SharedDateHelper::excelToDateTimeObject($endDate);\n\n        $days = ExcelError::VALUE();\n        $diff = $PHPStartDateObject->diff($PHPEndDateObject);\n        if (!is_bool($diff->days)) {\n            $days = $diff->days;\n            if ($diff->invert) {\n                $days = -$days;\n            }\n        }\n\n        return $days;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass Days360\n{\n    use ArrayEnabled;\n\n    /**\n     * DAYS360.\n     *\n     * Returns the number of days between two dates based on a 360-day year (twelve 30-day months),\n     * which is used in some accounting calculations. Use this function to help compute payments if\n     * your accounting system is based on twelve 30-day months.\n     *\n     * Excel Function:\n     *        DAYS360(startDate,endDate[,method])\n     *\n     * @param array|mixed $startDate Excel date serial value (float), PHP date timestamp (integer),\n     *                                        PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param array|mixed $endDate Excel date serial value (float), PHP date timestamp (integer),\n     *                                        PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param array|mixed $method US or European Method as a bool\n     *                                        FALSE or omitted: U.S. (NASD) method. If the starting date is\n     *                                        the last day of a month, it becomes equal to the 30th of the\n     *                                        same month. If the ending date is the last day of a month and\n     *                                        the starting date is earlier than the 30th of a month, the\n     *                                        ending date becomes equal to the 1st of the next month;\n     *                                        otherwise the ending date becomes equal to the 30th of the\n     *                                        same month.\n     *                                        TRUE: European method. Starting dates and ending dates that\n     *                                        occur on the 31st of a month become equal to the 30th of the\n     *                                        same month.\n     *                         Or can be an array of methods\n     *\n     * @return array<mixed>|int|string Number of days between start date and end date\n     *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function between(mixed $startDate = 0, mixed $endDate = 0, mixed $method = false): array|string|int\n    {\n        if (is_array($startDate) || is_array($endDate) || is_array($method)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $startDate, $endDate, $method);\n        }\n\n        try {\n            $startDate = Helpers::getDateValue($startDate);\n            $endDate = Helpers::getDateValue($endDate);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (!is_bool($method)) {\n            return ExcelError::VALUE();\n        }\n\n        // Execute function\n        $PHPStartDateObject = SharedDateHelper::excelToDateTimeObject($startDate);\n        $startDay = $PHPStartDateObject->format('j');\n        $startMonth = $PHPStartDateObject->format('n');\n        $startYear = $PHPStartDateObject->format('Y');\n\n        $PHPEndDateObject = SharedDateHelper::excelToDateTimeObject($endDate);\n        $endDay = $PHPEndDateObject->format('j');\n        $endMonth = $PHPEndDateObject->format('n');\n        $endYear = $PHPEndDateObject->format('Y');\n\n        return self::dateDiff360((int) $startDay, (int) $startMonth, (int) $startYear, (int) $endDay, (int) $endMonth, (int) $endYear, !$method);\n    }\n\n    /**\n     * Return the number of days between two dates based on a 360-day calendar.\n     */\n    private static function dateDiff360(int $startDay, int $startMonth, int $startYear, int $endDay, int $endMonth, int $endYear, bool $methodUS): int\n    {\n        $startDay = self::getStartDay($startDay, $startMonth, $startYear, $methodUS);\n        $endDay = self::getEndDay($endDay, $endMonth, $endYear, $startDay, $methodUS);\n\n        return $endDay + $endMonth * 30 + $endYear * 360 - $startDay - $startMonth * 30 - $startYear * 360;\n    }\n\n    private static function getStartDay(int $startDay, int $startMonth, int $startYear, bool $methodUS): int\n    {\n        if ($startDay == 31) {\n            --$startDay;\n        } elseif ($methodUS && ($startMonth == 2 && ($startDay == 29 || ($startDay == 28 && !Helpers::isLeapYear($startYear))))) {\n            $startDay = 30;\n        }\n\n        return $startDay;\n    }\n\n    private static function getEndDay(int $endDay, int &$endMonth, int &$endYear, int $startDay, bool $methodUS): int\n    {\n        if ($endDay == 31) {\n            if ($methodUS && $startDay != 30) {\n                $endDay = 1;\n                if ($endMonth == 12) {\n                    ++$endYear;\n                    $endMonth = 1;\n                } else {\n                    ++$endMonth;\n                }\n            } else {\n                $endDay = 30;\n            }\n        }\n\n        return $endDay;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateInterval;\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass Difference\n{\n    use ArrayEnabled;\n\n    /**\n     * DATEDIF.\n     *\n     * @param mixed $startDate Excel date serial value, PHP date/time stamp, PHP DateTime object\n     *                                    or a standard date string\n     *                         Or can be an array of date values\n     * @param mixed $endDate Excel date serial value, PHP date/time stamp, PHP DateTime object\n     *                                    or a standard date string\n     *                         Or can be an array of date values\n     * @param array<mixed>|string $unit Or can be an array of unit values\n     *\n     * @return array<mixed>|int|string Interval between the dates\n     *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function interval(mixed $startDate, mixed $endDate, array|string $unit = 'D')\n    {\n        if (is_array($startDate) || is_array($endDate) || is_array($unit)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $startDate, $endDate, $unit);\n        }\n\n        try {\n            $startDate = Helpers::getDateValue($startDate);\n            $endDate = Helpers::getDateValue($endDate);\n            $difference = self::initialDiff($startDate, $endDate);\n            $unit = strtoupper($unit);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        $PHPStartDateObject = SharedDateHelper::excelToDateTimeObject($startDate);\n        $startDays = (int) $PHPStartDateObject->format('j');\n        //$startMonths = (int) $PHPStartDateObject->format('n');\n        $startYears = (int) $PHPStartDateObject->format('Y');\n\n        $PHPEndDateObject = SharedDateHelper::excelToDateTimeObject($endDate);\n        $endDays = (int) $PHPEndDateObject->format('j');\n        //$endMonths = (int) $PHPEndDateObject->format('n');\n        $endYears = (int) $PHPEndDateObject->format('Y');\n\n        $PHPDiffDateObject = $PHPEndDateObject->diff($PHPStartDateObject);\n\n        $retVal = false;\n        $retVal = self::replaceRetValue($retVal, $unit, 'D') ?? self::datedifD($difference);\n        $retVal = self::replaceRetValue($retVal, $unit, 'M') ?? self::datedifM($PHPDiffDateObject);\n        $retVal = self::replaceRetValue($retVal, $unit, 'MD') ?? self::datedifMD($startDays, $endDays, $PHPEndDateObject, $PHPDiffDateObject);\n        $retVal = self::replaceRetValue($retVal, $unit, 'Y') ?? self::datedifY($PHPDiffDateObject);\n        $retVal = self::replaceRetValue($retVal, $unit, 'YD') ?? self::datedifYD($difference, $startYears, $endYears, $PHPStartDateObject, $PHPEndDateObject);\n        $retVal = self::replaceRetValue($retVal, $unit, 'YM') ?? self::datedifYM($PHPDiffDateObject);\n\n        return is_bool($retVal) ? ExcelError::VALUE() : $retVal;\n    }\n\n    private static function initialDiff(float $startDate, float $endDate): float\n    {\n        // Validate parameters\n        if ($startDate > $endDate) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $endDate - $startDate;\n    }\n\n    /**\n     * Decide whether it's time to set retVal.\n     */\n    private static function replaceRetValue(bool|int $retVal, string $unit, string $compare): null|bool|int\n    {\n        if ($retVal !== false || $unit !== $compare) {\n            return $retVal;\n        }\n\n        return null;\n    }\n\n    private static function datedifD(float $difference): int\n    {\n        return (int) $difference;\n    }\n\n    private static function datedifM(DateInterval $PHPDiffDateObject): int\n    {\n        return 12 * (int) $PHPDiffDateObject->format('%y') + (int) $PHPDiffDateObject->format('%m');\n    }\n\n    private static function datedifMD(int $startDays, int $endDays, DateTime $PHPEndDateObject, DateInterval $PHPDiffDateObject): int\n    {\n        if ($endDays < $startDays) {\n            $retVal = $endDays;\n            $PHPEndDateObject->modify('-' . $endDays . ' days');\n            $adjustDays = (int) $PHPEndDateObject->format('j');\n            $retVal += ($adjustDays - $startDays);\n        } else {\n            $retVal = (int) $PHPDiffDateObject->format('%d');\n        }\n\n        return $retVal;\n    }\n\n    private static function datedifY(DateInterval $PHPDiffDateObject): int\n    {\n        return (int) $PHPDiffDateObject->format('%y');\n    }\n\n    private static function datedifYD(float $difference, int $startYears, int $endYears, DateTime $PHPStartDateObject, DateTime $PHPEndDateObject): int\n    {\n        $retVal = (int) $difference;\n        if ($endYears > $startYears) {\n            $isLeapStartYear = $PHPStartDateObject->format('L');\n            $wasLeapEndYear = $PHPEndDateObject->format('L');\n\n            // Adjust end year to be as close as possible as start year\n            while ($PHPEndDateObject >= $PHPStartDateObject) {\n                $PHPEndDateObject->modify('-1 year');\n                //$endYears = $PHPEndDateObject->format('Y');\n            }\n            $PHPEndDateObject->modify('+1 year');\n\n            // Get the result\n            $retVal = (int) $PHPEndDateObject->diff($PHPStartDateObject)->days;\n\n            // Adjust for leap years cases\n            $isLeapEndYear = $PHPEndDateObject->format('L');\n            $limit = new DateTime($PHPEndDateObject->format('Y-02-29'));\n            if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit) {\n                --$retVal;\n            }\n        }\n\n        return (int) $retVal;\n    }\n\n    private static function datedifYM(DateInterval $PHPDiffDateObject): int\n    {\n        return (int) $PHPDiffDateObject->format('%m');\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\nuse Throwable;\n\nclass Helpers\n{\n    /**\n     * Identify if a year is a leap year or not.\n     *\n     * @param int|string $year The year to test\n     *\n     * @return bool TRUE if the year is a leap year, otherwise FALSE\n     */\n    public static function isLeapYear(int|string $year): bool\n    {\n        $year = (int) $year;\n\n        return (($year % 4) === 0) && (($year % 100) !== 0) || (($year % 400) === 0);\n    }\n\n    /**\n     * getDateValue.\n     *\n     * @return float Excel date/time serial value\n     */\n    public static function getDateValue(mixed $dateValue, bool $allowBool = true): float\n    {\n        if (is_object($dateValue)) {\n            $retval = SharedDateHelper::PHPToExcel($dateValue);\n            if (is_bool($retval)) {\n                throw new Exception(ExcelError::VALUE());\n            }\n\n            return $retval;\n        }\n\n        self::nullFalseTrueToNumber($dateValue, $allowBool);\n        if (!is_numeric($dateValue)) {\n            $saveReturnDateType = Functions::getReturnDateType();\n            Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);\n            if (is_string($dateValue)) {\n                $dateValue = DateValue::fromString($dateValue);\n            }\n            Functions::setReturnDateType($saveReturnDateType);\n            if (!is_numeric($dateValue)) {\n                throw new Exception(ExcelError::VALUE());\n            }\n        }\n        if ($dateValue < 0 && Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_OPENOFFICE) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        try {\n            SharedDateHelper::excelToDateTimeObject((float) $dateValue);\n        } catch (Throwable) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return (float) $dateValue;\n    }\n\n    /**\n     * getTimeValue.\n     *\n     * @return float|string Excel date/time serial value, or string if error\n     */\n    public static function getTimeValue(string $timeValue): string|float\n    {\n        $saveReturnDateType = Functions::getReturnDateType();\n        Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);\n        /** @var float|string $timeValue */\n        $timeValue = TimeValue::fromString($timeValue);\n        Functions::setReturnDateType($saveReturnDateType);\n\n        return $timeValue;\n    }\n\n    /**\n     * Adjust date by given months.\n     *\n     * @param float|int $dateValue date to be adjusted\n     */\n    public static function adjustDateByMonths($dateValue = 0, float $adjustmentMonths = 0): DateTime\n    {\n        // Execute function\n        $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);\n        $oMonth = (int) $PHPDateObject->format('m');\n        $oYear = (int) $PHPDateObject->format('Y');\n\n        $adjustmentMonthsString = (string) $adjustmentMonths;\n        if ($adjustmentMonths > 0) {\n            $adjustmentMonthsString = '+' . $adjustmentMonths;\n        }\n        if ($adjustmentMonths != 0) {\n            $PHPDateObject->modify($adjustmentMonthsString . ' months');\n        }\n        $nMonth = (int) $PHPDateObject->format('m');\n        $nYear = (int) $PHPDateObject->format('Y');\n\n        $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12);\n        if ($monthDiff != $adjustmentMonths) {\n            $adjustDays = (int) $PHPDateObject->format('d');\n            $adjustDaysString = '-' . $adjustDays . ' days';\n            $PHPDateObject->modify($adjustDaysString);\n        }\n\n        return $PHPDateObject;\n    }\n\n    /**\n     * Help reduce perceived complexity of some tests.\n     */\n    public static function replaceIfEmpty(mixed &$value, mixed $altValue): void\n    {\n        $value = $value ?: $altValue;\n    }\n\n    /**\n     * Adjust year in ambiguous situations.\n     */\n    public static function adjustYear(string $testVal1, string $testVal2, string &$testVal3): void\n    {\n        if (!is_numeric($testVal1) || $testVal1 < 31) {\n            if (!is_numeric($testVal2) || $testVal2 < 12) {\n                if (is_numeric($testVal3) && $testVal3 < 12) {\n                    $testVal3 = (string) ($testVal3 + 2000);\n                }\n            }\n        }\n    }\n\n    /**\n     * Return result in one of three formats.\n     *\n     * @param array{year: int, month: int, day: int, hour: int, minute: int, second: int} $dateArray\n     */\n    public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime|float|int\n    {\n        $retType = Functions::getReturnDateType();\n        if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {\n            return new DateTime(\n                $dateArray['year']\n                . '-' . $dateArray['month']\n                . '-' . $dateArray['day']\n                . ' ' . $dateArray['hour']\n                . ':' . $dateArray['minute']\n                . ':' . $dateArray['second']\n            );\n        }\n        $excelDateValue\n            = SharedDateHelper::formattedPHPToExcel(\n                $dateArray['year'],\n                $dateArray['month'],\n                $dateArray['day'],\n                $dateArray['hour'],\n                $dateArray['minute'],\n                $dateArray['second']\n            );\n        if ($retType === Functions::RETURNDATE_EXCEL) {\n            return $noFrac ? floor($excelDateValue) : $excelDateValue;\n        }\n        // RETURNDATE_UNIX_TIMESTAMP)\n\n        return SharedDateHelper::excelToTimestamp($excelDateValue);\n    }\n\n    /**\n     * Return result in one of three formats.\n     */\n    public static function returnIn3FormatsFloat(float $excelDateValue): float|int|DateTime\n    {\n        $retType = Functions::getReturnDateType();\n        if ($retType === Functions::RETURNDATE_EXCEL) {\n            return $excelDateValue;\n        }\n        if ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {\n            return SharedDateHelper::excelToTimestamp($excelDateValue);\n        }\n        // RETURNDATE_PHP_DATETIME_OBJECT\n\n        return SharedDateHelper::excelToDateTimeObject($excelDateValue);\n    }\n\n    /**\n     * Return result in one of three formats.\n     */\n    public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime|float|int\n    {\n        $retType = Functions::getReturnDateType();\n        if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {\n            return $PHPDateObject;\n        }\n        if ($retType === Functions::RETURNDATE_EXCEL) {\n            return (float) SharedDateHelper::PHPToExcel($PHPDateObject);\n        }\n        // RETURNDATE_UNIX_TIMESTAMP\n        $stamp = SharedDateHelper::PHPToExcel($PHPDateObject);\n        $stamp = is_bool($stamp) ? ((int) $stamp) : $stamp;\n\n        return SharedDateHelper::excelToTimestamp($stamp);\n    }\n\n    private static function baseDate(): int\n    {\n        if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {\n            return 0;\n        }\n        if (SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_MAC_1904) {\n            return 0;\n        }\n\n        return 1;\n    }\n\n    /**\n     * Many functions accept null/false/true argument treated as 0/0/1.\n     */\n    public static function nullFalseTrueToNumber(mixed &$number, bool $allowBool = true): void\n    {\n        $number = Functions::flattenSingleValue($number);\n        $nullVal = self::baseDate();\n        if ($number === null) {\n            $number = $nullVal;\n        } elseif ($allowBool && is_bool($number)) {\n            $number = $nullVal + (int) $number;\n        }\n    }\n\n    /**\n     * Many functions accept null argument treated as 0.\n     */\n    public static function validateNumericNull(mixed $number): int|float\n    {\n        $number = Functions::flattenSingleValue($number);\n        if ($number === null) {\n            return 0;\n        }\n        if (is_int($number)) {\n            return $number;\n        }\n        if (is_numeric($number)) {\n            return (float) $number;\n        }\n\n        throw new Exception(ExcelError::VALUE());\n    }\n\n    /**\n     * Many functions accept null/false/true argument treated as 0/0/1.\n     *\n     * @phpstan-assert float $number\n     */\n    public static function validateNotNegative(mixed $number): float\n    {\n        if (!is_numeric($number)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n        if ($number >= 0) {\n            return (float) $number;\n        }\n\n        throw new Exception(ExcelError::NAN());\n    }\n\n    public static function silly1900(DateTime $PHPDateObject, string $mod = '-1 day'): void\n    {\n        $isoDate = $PHPDateObject->format('c');\n        if ($isoDate < '1900-03-01') {\n            $PHPDateObject->modify($mod);\n        }\n    }\n\n    /** @return array{year: int, month: int, day: int, hour: int, minute: int, second: int} */\n    public static function dateParse(string $string): array\n    {\n        /** @var array{year: int, month: int, day: int, hour: int, minute: int, second: int} */\n        $temp = self::forceArray(date_parse($string));\n\n        return $temp;\n    }\n\n    /** @param mixed[] $dateArray */\n    public static function dateParseSucceeded(array $dateArray): bool\n    {\n        return $dateArray['error_count'] === 0;\n    }\n\n    /**\n     * Despite documentation, date_parse probably never returns false.\n     * Just in case, this routine helps guarantee it.\n     *\n     * @param array<mixed>|false $dateArray\n     *\n     * @return mixed[]\n     */\n    private static function forceArray(array|bool $dateArray): array\n    {\n        return is_array($dateArray) ? $dateArray : ['error_count' => 1];\n    }\n\n    public static function floatOrInt(mixed $value): float|int\n    {\n        $result = Functions::scalar($value);\n\n        return is_numeric($result) ? ($result + 0) : 0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Month\n{\n    use ArrayEnabled;\n\n    /**\n     * EDATE.\n     *\n     * Returns the serial number that represents the date that is the indicated number of months\n     * before or after a specified date (the start_date).\n     * Use EDATE to calculate maturity dates or due dates that fall on the same day of the month\n     * as the date of issue.\n     *\n     * Excel Function:\n     *        EDATE(dateValue,adjustmentMonths)\n     *\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                        PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param array<mixed>|int $adjustmentMonths The number of months before or after start_date.\n     *                                        A positive value for months yields a future date;\n     *                                        a negative value yields a past date.\n     *                         Or can be an array of adjustment values\n     *\n     * @return array<mixed>|DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     *         If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function adjust(mixed $dateValue, array|string|bool|float|int $adjustmentMonths): DateTime|float|int|string|array\n    {\n        if (is_array($dateValue) || is_array($adjustmentMonths)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $adjustmentMonths);\n        }\n\n        try {\n            $dateValue = Helpers::getDateValue($dateValue, false);\n            $adjustmentMonths = Helpers::validateNumericNull($adjustmentMonths);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n        $dateValue = floor($dateValue);\n        $adjustmentMonths = floor($adjustmentMonths);\n\n        // Execute function\n        $PHPDateObject = Helpers::adjustDateByMonths($dateValue, $adjustmentMonths);\n\n        return Helpers::returnIn3FormatsObject($PHPDateObject);\n    }\n\n    /**\n     * EOMONTH.\n     *\n     * Returns the date value for the last day of the month that is the indicated number of months\n     * before or after start_date.\n     * Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month.\n     *\n     * Excel Function:\n     *        EOMONTH(dateValue,adjustmentMonths)\n     *\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                        PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param array<mixed>|int $adjustmentMonths The number of months before or after start_date.\n     *                                        A positive value for months yields a future date;\n     *                                        a negative value yields a past date.\n     *                         Or can be an array of adjustment values\n     *\n     * @return array<mixed>|DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     *         If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function lastDay(mixed $dateValue, array|float|int|bool|string $adjustmentMonths): array|string|DateTime|float|int\n    {\n        if (is_array($dateValue) || is_array($adjustmentMonths)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $adjustmentMonths);\n        }\n\n        try {\n            $dateValue = Helpers::getDateValue($dateValue, false);\n            $adjustmentMonths = Helpers::validateNumericNull($adjustmentMonths);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n        $dateValue = floor($dateValue);\n        $adjustmentMonths = floor($adjustmentMonths);\n\n        // Execute function\n        $PHPDateObject = Helpers::adjustDateByMonths($dateValue, $adjustmentMonths + 1);\n        $adjustDays = (int) $PHPDateObject->format('d');\n        $adjustDaysString = '-' . $adjustDays . ' days';\n        $PHPDateObject->modify($adjustDaysString);\n\n        return Helpers::returnIn3FormatsObject($PHPDateObject);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass NetworkDays\n{\n    use ArrayEnabled;\n\n    /**\n     * NETWORKDAYS.\n     *\n     * Returns the number of whole working days between start_date and end_date. Working days\n     * exclude weekends and any dates identified in holidays.\n     * Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days\n     * worked during a specific term.\n     *\n     * Excel Function:\n     *        NETWORKDAYS(startDate,endDate[,holidays[,holiday[,...]]])\n     *\n     * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),\n     *                                            PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer),\n     *                                            PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param mixed $dateArgs An array of dates (such as holidays) to exclude from the calculation\n     *\n     * @return array<mixed>|int|string Interval between the dates\n     *         If an array of values is passed for the $startDate or $endDate arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function count(mixed $startDate, mixed $endDate, mixed ...$dateArgs): array|string|int\n    {\n        if (is_array($startDate) || is_array($endDate)) {\n            return self::evaluateArrayArgumentsSubset(\n                [self::class, __FUNCTION__],\n                2,\n                $startDate,\n                $endDate,\n                ...$dateArgs\n            );\n        }\n\n        try {\n            //    Retrieve the mandatory start and end date that are referenced in the function definition\n            $sDate = Helpers::getDateValue($startDate);\n            $eDate = Helpers::getDateValue($endDate);\n            $startDate = min($sDate, $eDate);\n            $endDate = max($sDate, $eDate);\n            //    Get the optional days\n            $dateArgs = Functions::flattenArray($dateArgs);\n            //    Test any extra holiday parameters\n            $holidayArray = [];\n            foreach ($dateArgs as $holidayDate) {\n                $holidayArray[] = Helpers::getDateValue($holidayDate);\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        $startDow = self::calcStartDow($startDate);\n        $endDow = self::calcEndDow($endDate);\n        $wholeWeekDays = (int) floor(($endDate - $startDate) / 7) * 5;\n        $partWeekDays = self::calcPartWeekDays($startDow, $endDow);\n\n        //    Test any extra holiday parameters\n        $holidayCountedArray = [];\n        foreach ($holidayArray as $holidayDate) {\n            if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) {\n                if ((Week::day($holidayDate, 2) < 6) && (!in_array($holidayDate, $holidayCountedArray))) {\n                    --$partWeekDays;\n                    $holidayCountedArray[] = $holidayDate;\n                }\n            }\n        }\n\n        return self::applySign($wholeWeekDays + $partWeekDays, $sDate, $eDate);\n    }\n\n    private static function calcStartDow(float $startDate): int\n    {\n        $startDow = 6 - (int) Week::day($startDate, 2);\n        if ($startDow < 0) {\n            $startDow = 5;\n        }\n\n        return $startDow;\n    }\n\n    private static function calcEndDow(float $endDate): int\n    {\n        $endDow = (int) Week::day($endDate, 2);\n        if ($endDow >= 6) {\n            $endDow = 0;\n        }\n\n        return $endDow;\n    }\n\n    private static function calcPartWeekDays(int $startDow, int $endDow): int\n    {\n        $partWeekDays = $endDow + $startDow;\n        if ($partWeekDays > 5) {\n            $partWeekDays -= 5;\n        }\n\n        return $partWeekDays;\n    }\n\n    private static function applySign(int $result, float $sDate, float $eDate): int\n    {\n        return ($sDate > $eDate) ? -$result : $result;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass Time\n{\n    use ArrayEnabled;\n\n    /**\n     * TIME.\n     *\n     * The TIME function returns a value that represents a particular time.\n     *\n     * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time\n     * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.\n     *\n     * Excel Function:\n     *        TIME(hour,minute,second)\n     *\n     * @param null|array<mixed>|bool|float|int|string $hour A number from 0 (zero) to 32767 representing the hour.\n     *                                    Any value greater than 23 will be divided by 24 and the remainder\n     *                                    will be treated as the hour value. For example, TIME(27,0,0) =\n     *                                    TIME(3,0,0) = .125 or 3:00 AM.\n     * @param null|array<mixed>|bool|float|int|string $minute A number from 0 to 32767 representing the minute.\n     *                                    Any value greater than 59 will be converted to hours and minutes.\n     *                                    For example, TIME(0,750,0) = TIME(12,30,0) = .520833 or 12:30 PM.\n     * @param null|array<mixed>|bool|float|int|string $second A number from 0 to 32767 representing the second.\n     *                                    Any value greater than 59 will be converted to hours, minutes,\n     *                                    and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148\n     *                                    or 12:33:20 AM\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     *\n     * @return array<mixed>|DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function fromHMS(array|int|float|bool|null|string $hour, array|int|float|bool|null|string $minute, array|int|float|bool|null|string $second): array|string|float|int|DateTime\n    {\n        if (is_array($hour) || is_array($minute) || is_array($second)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $hour, $minute, $second);\n        }\n\n        try {\n            $hour = self::toIntWithNullBool($hour);\n            $minute = self::toIntWithNullBool($minute);\n            $second = self::toIntWithNullBool($second);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        self::adjustSecond($second, $minute);\n        self::adjustMinute($minute, $hour);\n\n        if ($hour > 23) {\n            $hour = $hour % 24;\n        } elseif ($hour < 0) {\n            return ExcelError::NAN();\n        }\n\n        // Execute function\n        $retType = Functions::getReturnDateType();\n        if ($retType === Functions::RETURNDATE_EXCEL) {\n            $calendar = SharedDateHelper::getExcelCalendar();\n            $date = (int) ($calendar !== SharedDateHelper::CALENDAR_WINDOWS_1900);\n\n            return (float) SharedDateHelper::formattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second);\n        }\n        if ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {\n            return (int) SharedDateHelper::excelToTimestamp(SharedDateHelper::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; //    -2147472000 + 3600\n        }\n        // RETURNDATE_PHP_DATETIME_OBJECT\n        // Hour has already been normalized (0-23) above\n        $phpDateObject = new DateTime('1900-01-01 ' . $hour . ':' . $minute . ':' . $second);\n\n        return $phpDateObject;\n    }\n\n    private static function adjustSecond(int &$second, int &$minute): void\n    {\n        if ($second < 0) {\n            $minute += (int) floor($second / 60);\n            $second = 60 - abs($second % 60);\n            if ($second == 60) {\n                $second = 0;\n            }\n        } elseif ($second >= 60) {\n            $minute += intdiv($second, 60);\n            $second = $second % 60;\n        }\n    }\n\n    private static function adjustMinute(int &$minute, int &$hour): void\n    {\n        if ($minute < 0) {\n            $hour += (int) floor($minute / 60);\n            $minute = 60 - abs($minute % 60);\n            if ($minute == 60) {\n                $minute = 0;\n            }\n        } elseif ($minute >= 60) {\n            $hour += intdiv($minute, 60);\n            $minute = $minute % 60;\n        }\n    }\n\n    /**\n     * @param mixed $value expect int\n     */\n    private static function toIntWithNullBool(mixed $value): int\n    {\n        $value = $value ?? 0;\n        if (is_bool($value)) {\n            $value = (int) $value;\n        }\n        if (!is_numeric($value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (int) $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\nuse Throwable;\n\nclass TimeParts\n{\n    use ArrayEnabled;\n\n    /**\n     * HOUROFDAY.\n     *\n     * Returns the hour of a time value.\n     * The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).\n     *\n     * Excel Function:\n     *        HOUR(timeValue)\n     *\n     * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard time string\n     *                         Or can be an array of date/time values\n     *\n     * @return array<mixed>|int|string Hour\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function hour(mixed $timeValue): array|string|int\n    {\n        if (is_array($timeValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $timeValue);\n        }\n\n        try {\n            Helpers::nullFalseTrueToNumber($timeValue);\n            if (is_string($timeValue) && !is_numeric($timeValue)) {\n                $timeValue = Helpers::getTimeValue($timeValue);\n            }\n            Helpers::validateNotNegative($timeValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        try {\n            SharedDateHelper::excelToDateTimeObject($timeValue);\n        } catch (Throwable) {\n            return ExcelError::NAN();\n        }\n        $timeValue = fmod($timeValue, 1);\n        $timeValue = SharedDateHelper::excelToDateTimeObject($timeValue);\n        SharedDateHelper::roundMicroseconds($timeValue);\n\n        return (int) $timeValue->format('H');\n    }\n\n    /**\n     * MINUTE.\n     *\n     * Returns the minutes of a time value.\n     * The minute is given as an integer, ranging from 0 to 59.\n     *\n     * Excel Function:\n     *        MINUTE(timeValue)\n     *\n     * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard time string\n     *                         Or can be an array of date/time values\n     *\n     * @return array<mixed>|int|string Minute\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function minute(mixed $timeValue): array|string|int\n    {\n        if (is_array($timeValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $timeValue);\n        }\n\n        try {\n            Helpers::nullFalseTrueToNumber($timeValue);\n            if (is_string($timeValue) && !is_numeric($timeValue)) {\n                $timeValue = Helpers::getTimeValue($timeValue);\n            }\n            Helpers::validateNotNegative($timeValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        try {\n            SharedDateHelper::excelToDateTimeObject($timeValue);\n        } catch (Throwable) {\n            return ExcelError::NAN();\n        }\n        $timeValue = fmod($timeValue, 1);\n        $timeValue = SharedDateHelper::excelToDateTimeObject($timeValue);\n        SharedDateHelper::roundMicroseconds($timeValue);\n\n        return (int) $timeValue->format('i');\n    }\n\n    /**\n     * SECOND.\n     *\n     * Returns the seconds of a time value.\n     * The minute is given as an integer, ranging from 0 to 59.\n     *\n     * Excel Function:\n     *        SECOND(timeValue)\n     *\n     * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard time string\n     *                         Or can be an array of date/time values\n     *\n     * @return array<mixed>|int|string Second\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function second(mixed $timeValue): array|string|int\n    {\n        if (is_array($timeValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $timeValue);\n        }\n\n        try {\n            Helpers::nullFalseTrueToNumber($timeValue);\n            if (is_string($timeValue) && !is_numeric($timeValue)) {\n                $timeValue = Helpers::getTimeValue($timeValue);\n            }\n            Helpers::validateNotNegative($timeValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        try {\n            SharedDateHelper::excelToDateTimeObject($timeValue);\n        } catch (Throwable) {\n            return ExcelError::NAN();\n        }\n        $timeValue = fmod($timeValue, 1);\n        $timeValue = SharedDateHelper::excelToDateTimeObject($timeValue);\n        SharedDateHelper::roundMicroseconds($timeValue);\n\n        return (int) $timeValue->format('s');\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse Composer\\Pcre\\Preg;\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass TimeValue\n{\n    use ArrayEnabled;\n\n    private const EXTRACT_TIME = '/\\b'\n        . '(\\d+)' // match[1] - hour\n        . '(:' // start of match[2] (rest of string) - colon\n        . '(\\d+' // start of match[3] - minute\n        . '(:\\d+' // start of match[4] - colon and seconds\n        . '([.]\\d+)?' // match[5] - optional decimal point followed by fractional seconds\n        . ')?' // end of match[4], which is optional\n        . ')' // end of match 3\n        // Excel does not require 'm' to trail 'a' or 'p'; Php does\n        . '(\\s*(a|p))?' // match[6] optional whitespace followed by optional match[7] a or p\n        . ')' // end of match[2]\n        . '/i';\n\n    /**\n     * TIMEVALUE.\n     *\n     * Returns a value that represents a particular time.\n     * Use TIMEVALUE to convert a time represented by a text string to an Excel or PHP date/time stamp\n     * value.\n     *\n     * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time\n     * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.\n     *\n     * Excel Function:\n     *        TIMEVALUE(timeValue)\n     *\n     * @param null|array<mixed>|bool|float|int|string $timeValue A text string that represents a time in any one of the Microsoft\n     *                                    Excel time formats; for example, \"6:45 PM\" and \"18:45\" text strings\n     *                                    within quotation marks that represent time.\n     *                                    Date information in time_text is ignored.\n     *                         Or can be an array of date/time values\n     *\n     * @return array<mixed>|DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function fromString(null|array|string|int|bool|float $timeValue): array|string|DateTime|int|float\n    {\n        if (is_array($timeValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $timeValue);\n        }\n\n        // try to parse as time iff there is at least one digit\n        if (is_string($timeValue) && !Preg::isMatch('/\\d/', $timeValue)) {\n            return ExcelError::VALUE();\n        }\n\n        $timeValue = trim((string) $timeValue, '\"');\n        if (Preg::isMatch(self::EXTRACT_TIME, $timeValue, $matches)) {\n            if (empty($matches[6])) { // am/pm\n                $hour = (int) $matches[0];\n                $timeValue = ($hour % 24) . $matches[2];\n            } elseif ($matches[6] === $matches[7]) { // Excel wants space before am/pm\n                return ExcelError::VALUE();\n            } else {\n                $timeValue = $matches[0] . 'm';\n            }\n        }\n\n        $PHPDateArray = Helpers::dateParse($timeValue);\n        $retValue = ExcelError::VALUE();\n        if (Helpers::dateParseSucceeded($PHPDateArray)) {\n            $hour = $PHPDateArray['hour'];\n            $minute = $PHPDateArray['minute'];\n            $second = $PHPDateArray['second'];\n            // OpenOffice-specific code removed - it works just like Excel\n            $excelDateValue = SharedDateHelper::formattedPHPToExcel(1900, 1, 1, $hour, $minute, $second) - 1;\n\n            $retType = Functions::getReturnDateType();\n            if ($retType === Functions::RETURNDATE_EXCEL) {\n                $retValue = (float) $excelDateValue;\n            } elseif ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {\n                $retValue = (int) SharedDateHelper::excelToTimestamp($excelDateValue + 25569) - 3600;\n            } else {\n                $retValue = new DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']);\n            }\n        }\n\n        return $retValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass Week\n{\n    use ArrayEnabled;\n\n    /**\n     * WEEKNUM.\n     *\n     * Returns the week of the year for a specified date.\n     * The WEEKNUM function considers the week containing January 1 to be the first week of the year.\n     * However, there is a European standard that defines the first week as the one with the majority\n     * of days (four or more) falling in the new year. This means that for years in which there are\n     * three days or less in the first week of January, the WEEKNUM function returns week numbers\n     * that are incorrect according to the European standard.\n     *\n     * Excel Function:\n     *        WEEKNUM(dateValue[,style])\n     *\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param array<mixed>|int $method Week begins on Sunday or Monday\n     *                                        1 or omitted    Week begins on Sunday.\n     *                                        2                Week begins on Monday.\n     *                                        11               Week begins on Monday.\n     *                                        12               Week begins on Tuesday.\n     *                                        13               Week begins on Wednesday.\n     *                                        14               Week begins on Thursday.\n     *                                        15               Week begins on Friday.\n     *                                        16               Week begins on Saturday.\n     *                                        17               Week begins on Sunday.\n     *                                        21               ISO (Jan. 4 is week 1, begins on Monday).\n     *                         Or can be an array of methods\n     *\n     * @return array<mixed>|int|string Week Number\n     *         If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function number(mixed $dateValue, array|int|string|null $method = Constants::STARTWEEK_SUNDAY): array|int|string\n    {\n        if (is_array($dateValue) || is_array($method)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $method);\n        }\n\n        $origDateValueNull = empty($dateValue);\n\n        try {\n            $method = self::validateMethod($method);\n            if ($dateValue === null) { // boolean not allowed\n                $dateValue = (SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_MAC_1904 || $method === Constants::DOW_SUNDAY) ? 0 : 1;\n            }\n            $dateValue = self::validateDateValue($dateValue);\n            if (!$dateValue && self::buggyWeekNum1900($method)) {\n                // This seems to be an additional Excel bug.\n                return 0;\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);\n        if ($method == Constants::STARTWEEK_MONDAY_ISO) {\n            Helpers::silly1900($PHPDateObject);\n\n            return (int) $PHPDateObject->format('W');\n        }\n        if (self::buggyWeekNum1904($method, $origDateValueNull, $PHPDateObject)) {\n            return 0;\n        }\n        Helpers::silly1900($PHPDateObject, '+ 5 years'); // 1905 calendar matches\n        $dayOfYear = (int) $PHPDateObject->format('z');\n        $PHPDateObject->modify('-' . $dayOfYear . ' days');\n        $firstDayOfFirstWeek = (int) $PHPDateObject->format('w');\n        $daysInFirstWeek = (6 - $firstDayOfFirstWeek + $method) % 7;\n        $daysInFirstWeek += 7 * !$daysInFirstWeek;\n        $endFirstWeek = $daysInFirstWeek - 1;\n        $weekOfYear = floor(($dayOfYear - $endFirstWeek + 13) / 7);\n\n        return (int) $weekOfYear;\n    }\n\n    /**\n     * ISOWEEKNUM.\n     *\n     * Returns the ISO 8601 week number of the year for a specified date.\n     *\n     * Excel Function:\n     *        ISOWEEKNUM(dateValue)\n     *\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     *\n     * @return array<mixed>|int|string Week Number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isoWeekNumber(mixed $dateValue): array|int|string\n    {\n        if (is_array($dateValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);\n        }\n\n        if (self::apparentBug($dateValue)) {\n            return 52;\n        }\n\n        try {\n            $dateValue = Helpers::getDateValue($dateValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);\n        Helpers::silly1900($PHPDateObject);\n\n        return (int) $PHPDateObject->format('W');\n    }\n\n    /**\n     * WEEKDAY.\n     *\n     * Returns the day of the week for a specified date. The day is given as an integer\n     * ranging from 0 to 7 (dependent on the requested style).\n     *\n     * Excel Function:\n     *        WEEKDAY(dateValue[,style])\n     *\n     * @param null|array<mixed>|bool|float|int|string $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param mixed $style A number that determines the type of return value\n     *                                        1 or omitted    Numbers 1 (Sunday) through 7 (Saturday).\n     *                                        2                Numbers 1 (Monday) through 7 (Sunday).\n     *                                        3                Numbers 0 (Monday) through 6 (Sunday).\n     *                         Or can be an array of styles\n     *\n     * @return array<mixed>|int|string Day of the week value\n     *         If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function day(null|array|float|int|string|bool $dateValue, mixed $style = 1): array|string|int\n    {\n        if (is_array($dateValue) || is_array($style)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $style);\n        }\n\n        try {\n            $dateValue = Helpers::getDateValue($dateValue);\n            $style = self::validateStyle($style);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Execute function\n        $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);\n        Helpers::silly1900($PHPDateObject);\n        $DoW = (int) $PHPDateObject->format('w');\n\n        switch ($style) {\n            case 1:\n                ++$DoW;\n\n                break;\n            case 2:\n                $DoW = self::dow0Becomes7($DoW);\n\n                break;\n            case 3:\n                $DoW = self::dow0Becomes7($DoW) - 1;\n\n                break;\n        }\n\n        return $DoW;\n    }\n\n    /**\n     * @param mixed $style expect int\n     */\n    private static function validateStyle(mixed $style): int\n    {\n        if (!is_numeric($style)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n        $style = (int) $style;\n        if (($style < 1) || ($style > 3)) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $style;\n    }\n\n    private static function dow0Becomes7(int $DoW): int\n    {\n        return ($DoW === 0) ? 7 : $DoW;\n    }\n\n    /**\n     * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     */\n    private static function apparentBug(mixed $dateValue): bool\n    {\n        if (SharedDateHelper::getExcelCalendar() !== SharedDateHelper::CALENDAR_MAC_1904) {\n            if (is_bool($dateValue)) {\n                return true;\n            }\n            if (is_numeric($dateValue) && !((int) $dateValue)) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Validate dateValue parameter.\n     */\n    private static function validateDateValue(mixed $dateValue): float\n    {\n        if (is_bool($dateValue)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return Helpers::getDateValue($dateValue);\n    }\n\n    /**\n     * Validate method parameter.\n     */\n    private static function validateMethod(mixed $method): int\n    {\n        if ($method === null) {\n            $method = Constants::STARTWEEK_SUNDAY;\n        }\n\n        if (!is_numeric($method)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        $method = (int) $method;\n        if (!array_key_exists($method, Constants::METHODARR)) {\n            throw new Exception(ExcelError::NAN());\n        }\n        $method = Constants::METHODARR[$method];\n\n        return $method;\n    }\n\n    private static function buggyWeekNum1900(int $method): bool\n    {\n        return $method === Constants::DOW_SUNDAY && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900;\n    }\n\n    private static function buggyWeekNum1904(int $method, bool $origNull, DateTime $dateObject): bool\n    {\n        // This appears to be another Excel bug.\n\n        return $method === Constants::DOW_SUNDAY && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_MAC_1904\n            && !$origNull && $dateObject->format('Y-m-d') === '1904-01-01';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass WorkDay\n{\n    use ArrayEnabled;\n\n    /**\n     * WORKDAY.\n     *\n     * Returns the date that is the indicated number of working days before or after a date (the\n     * starting date). Working days exclude weekends and any dates identified as holidays.\n     * Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected\n     * delivery times, or the number of days of work performed.\n     *\n     * Excel Function:\n     *        WORKDAY(startDate,endDays[,holidays[,holiday[,...]]])\n     *\n     * @param array<mixed>|mixed $startDate Excel date serial value (float), PHP date timestamp (integer),\n     *                                        PHP DateTime object, or a standard date string\n     *                         Or can be an array of date values\n     * @param array<mixed>|int $endDays The number of nonweekend and nonholiday days before or after\n     *                                        startDate. A positive value for days yields a future date; a\n     *                                        negative value yields a past date.\n     *                         Or can be an array of int values\n     * @param null|mixed $dateArgs An array of dates (such as holidays) to exclude from the calculation\n     *\n     * @return array<mixed>|DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,\n     *                        depending on the value of the ReturnDateType flag\n     *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function date(mixed $startDate, array|int|string $endDays, mixed ...$dateArgs): array|float|int|DateTime|string\n    {\n        if (is_array($startDate) || is_array($endDays)) {\n            return self::evaluateArrayArgumentsSubset(\n                [self::class, __FUNCTION__],\n                2,\n                $startDate,\n                $endDays,\n                ...$dateArgs\n            );\n        }\n\n        //    Retrieve the mandatory start date and days that are referenced in the function definition\n        try {\n            $startDate = Helpers::getDateValue($startDate);\n            $endDays = Helpers::validateNumericNull($endDays);\n            $holidayArray = array_map([Helpers::class, 'getDateValue'], Functions::flattenArray($dateArgs));\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $startDate = (float) floor($startDate);\n        $endDays = (int) floor($endDays);\n        //    If endDays is 0, we always return startDate\n        if ($endDays == 0) {\n            return $startDate;\n        }\n        if ($endDays < 0) {\n            return self::decrementing($startDate, $endDays, $holidayArray);\n        }\n\n        return self::incrementing($startDate, $endDays, $holidayArray);\n    }\n\n    /**\n     * Use incrementing logic to determine Workday.\n     *\n     * @param array<mixed> $holidayArray\n     */\n    private static function incrementing(float $startDate, int $endDays, array $holidayArray): float|int|DateTime\n    {\n        //    Adjust the start date if it falls over a weekend\n        $startDoW = self::getWeekDay($startDate, 3);\n        if ($startDoW >= 5) {\n            $startDate += 7 - $startDoW;\n            --$endDays;\n        }\n\n        //    Add endDays\n        $endDate = (float) $startDate + ((int) ($endDays / 5) * 7);\n        $endDays = $endDays % 5;\n        while ($endDays > 0) {\n            ++$endDate;\n            //    Adjust the calculated end date if it falls over a weekend\n            $endDow = self::getWeekDay($endDate, 3);\n            if ($endDow >= 5) {\n                $endDate += 7 - $endDow;\n            }\n            --$endDays;\n        }\n\n        //    Test any extra holiday parameters\n        if (!empty($holidayArray)) {\n            $endDate = self::incrementingArray($startDate, $endDate, $holidayArray);\n        }\n\n        return Helpers::returnIn3FormatsFloat($endDate);\n    }\n\n    /** @param array<mixed> $holidayArray */\n    private static function incrementingArray(float $startDate, float $endDate, array $holidayArray): float\n    {\n        $holidayCountedArray = $holidayDates = [];\n        foreach ($holidayArray as $holidayDate) {\n            /** @var float $holidayDate */\n            if (self::getWeekDay($holidayDate, 3) < 5) {\n                $holidayDates[] = $holidayDate;\n            }\n        }\n        sort($holidayDates, SORT_NUMERIC);\n        foreach ($holidayDates as $holidayDate) {\n            if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) {\n                if (!in_array($holidayDate, $holidayCountedArray)) {\n                    ++$endDate;\n                    $holidayCountedArray[] = $holidayDate;\n                }\n            }\n            //    Adjust the calculated end date if it falls over a weekend\n            $endDoW = self::getWeekDay($endDate, 3);\n            if ($endDoW >= 5) {\n                $endDate += 7 - $endDoW;\n            }\n        }\n\n        return $endDate;\n    }\n\n    /**\n     * Use decrementing logic to determine Workday.\n     *\n     * @param array<mixed> $holidayArray\n     */\n    private static function decrementing(float $startDate, int $endDays, array $holidayArray): float|int|DateTime\n    {\n        //    Adjust the start date if it falls over a weekend\n        $startDoW = self::getWeekDay($startDate, 3);\n        if ($startDoW >= 5) {\n            $startDate += -$startDoW + 4;\n            ++$endDays;\n        }\n\n        //    Add endDays\n        $endDate = (float) $startDate + ((int) ($endDays / 5) * 7);\n        $endDays = $endDays % 5;\n        while ($endDays < 0) {\n            --$endDate;\n            //    Adjust the calculated end date if it falls over a weekend\n            $endDow = self::getWeekDay($endDate, 3);\n            if ($endDow >= 5) {\n                $endDate += 4 - $endDow;\n            }\n            ++$endDays;\n        }\n\n        //    Test any extra holiday parameters\n        if (!empty($holidayArray)) {\n            $endDate = self::decrementingArray($startDate, $endDate, $holidayArray);\n        }\n\n        return Helpers::returnIn3FormatsFloat($endDate);\n    }\n\n    /** @param array<mixed> $holidayArray */\n    private static function decrementingArray(float $startDate, float $endDate, array $holidayArray): float\n    {\n        $holidayCountedArray = $holidayDates = [];\n        foreach ($holidayArray as $holidayDate) {\n            /** @var float $holidayDate */\n            if (self::getWeekDay($holidayDate, 3) < 5) {\n                $holidayDates[] = $holidayDate;\n            }\n        }\n        rsort($holidayDates, SORT_NUMERIC);\n        foreach ($holidayDates as $holidayDate) {\n            if (($holidayDate <= $startDate) && ($holidayDate >= $endDate)) {\n                if (!in_array($holidayDate, $holidayCountedArray)) {\n                    --$endDate;\n                    $holidayCountedArray[] = $holidayDate;\n                }\n            }\n            //    Adjust the calculated end date if it falls over a weekend\n            $endDoW = self::getWeekDay($endDate, 3);\n            /** int $endDoW */\n            if ($endDoW >= 5) {\n                $endDate += -$endDoW + 4;\n            }\n        }\n\n        return $endDate;\n    }\n\n    private static function getWeekDay(float $date, int $wd): int\n    {\n        $result = Functions::scalar(Week::day($date, $wd));\n\n        return is_int($result) ? $result : -1;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDateHelper;\n\nclass YearFrac\n{\n    use ArrayEnabled;\n\n    /**\n     * YEARFRAC.\n     *\n     * Calculates the fraction of the year represented by the number of whole days between two dates\n     * (the start_date and the end_date).\n     * Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or\n     * obligations to assign to a specific term.\n     *\n     * Excel Function:\n     *        YEARFRAC(startDate,endDate[,method])\n     * See https://lists.oasis-open.org/archives/office-formula/200806/msg00039.html\n     *     for description of algorithm used in Excel\n     *\n     * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     *                         Or can be an array of values\n     * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer),\n     *                                    PHP DateTime object, or a standard date string\n     *                         Or can be an array of methods\n     * @param array<mixed>|int $method Method used for the calculation\n     *                                        0 or omitted    US (NASD) 30/360\n     *                                        1                Actual/actual\n     *                                        2                Actual/360\n     *                                        3                Actual/365\n     *                                        4                European 30/360\n     *                         Or can be an array of methods\n     *\n     * @return array<mixed>|float|int|string fraction of the year, or a string containing an error\n     *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function fraction(mixed $startDate, mixed $endDate, array|int|string|null $method = 0): array|string|int|float\n    {\n        if (is_array($startDate) || is_array($endDate) || is_array($method)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $startDate, $endDate, $method);\n        }\n\n        try {\n            $method = (int) Helpers::validateNumericNull($method);\n            $sDate = Helpers::getDateValue($startDate);\n            $eDate = Helpers::getDateValue($endDate);\n            $sDate = self::excelBug($sDate, $startDate, $endDate, $method);\n            $eDate = self::excelBug($eDate, $endDate, $startDate, $method);\n            $startDate = min($sDate, $eDate);\n            $endDate = max($sDate, $eDate);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return match ($method) {\n            0 => Helpers::floatOrInt(Days360::between($startDate, $endDate)) / 360,\n            1 => self::method1($startDate, $endDate),\n            2 => Helpers::floatOrInt(Difference::interval($startDate, $endDate)) / 360,\n            3 => Helpers::floatOrInt(Difference::interval($startDate, $endDate)) / 365,\n            4 => Helpers::floatOrInt(Days360::between($startDate, $endDate, true)) / 360,\n            default => ExcelError::NAN(),\n        };\n    }\n\n    /**\n     * Excel 1900 calendar treats date argument of null as 1900-01-00. Really.\n     */\n    private static function excelBug(float $sDate, mixed $startDate, mixed $endDate, int $method): float\n    {\n        if (Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_OPENOFFICE && SharedDateHelper::getExcelCalendar() !== SharedDateHelper::CALENDAR_MAC_1904) {\n            if ($endDate === null && $startDate !== null) {\n                if (DateParts::month($sDate) == 12 && DateParts::day($sDate) === 31 && $method === 0) {\n                    $sDate += 2;\n                } else {\n                    ++$sDate;\n                }\n            }\n        }\n\n        return $sDate;\n    }\n\n    private static function method1(float $startDate, float $endDate): float\n    {\n        $days = Helpers::floatOrInt(Difference::interval($startDate, $endDate));\n        $startYear = (int) DateParts::year($startDate);\n        $endYear = (int) DateParts::year($endDate);\n        $years = $endYear - $startYear + 1;\n        $startMonth = (int) DateParts::month($startDate);\n        $startDay = (int) DateParts::day($startDate);\n        $endMonth = (int) DateParts::month($endDate);\n        $endDay = (int) DateParts::day($endDate);\n        $startMonthDay = 100 * $startMonth + $startDay;\n        $endMonthDay = 100 * $endMonth + $endDay;\n        if ($years == 1) {\n            $tmpCalcAnnualBasis = 365 + (int) Helpers::isLeapYear($endYear);\n        } elseif ($years == 2 && $startMonthDay >= $endMonthDay) {\n            if (Helpers::isLeapYear($startYear)) {\n                $tmpCalcAnnualBasis = 365 + (int) ($startMonthDay <= 229);\n            } elseif (Helpers::isLeapYear($endYear)) {\n                $tmpCalcAnnualBasis = 365 + (int) ($endMonthDay >= 229);\n            } else {\n                $tmpCalcAnnualBasis = 365;\n            }\n        } else {\n            $tmpCalcAnnualBasis = 0;\n            for ($year = $startYear; $year <= $endYear; ++$year) {\n                $tmpCalcAnnualBasis += 365 + (int) Helpers::isLeapYear($year);\n            }\n            $tmpCalcAnnualBasis /= $years;\n        }\n\n        return $days / $tmpCalcAnnualBasis;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentHelper.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass ArrayArgumentHelper\n{\n    protected int $indexStart = 0;\n\n    /** @var mixed[] */\n    protected array $arguments;\n\n    protected int $argumentCount;\n\n    /** @var int[] */\n    protected array $rows;\n\n    /** @var int[] */\n    protected array $columns;\n\n    /** @param mixed[] $arguments */\n    public function initialise(array $arguments): void\n    {\n        $keys = array_keys($arguments);\n        $this->indexStart = (int) array_shift($keys);\n        $this->rows = $this->rows($arguments);\n        $this->columns = $this->columns($arguments);\n\n        $this->argumentCount = count($arguments);\n        $this->arguments = $this->flattenSingleCellArrays($arguments, $this->rows, $this->columns);\n\n        $this->rows = $this->rows($arguments);\n        $this->columns = $this->columns($arguments);\n\n        if ($this->arrayArguments() > 2) {\n            throw new Exception('Formulae with more than two array arguments are not supported');\n        }\n    }\n\n    /** @return mixed[] */\n    public function arguments(): array\n    {\n        return $this->arguments;\n    }\n\n    public function hasArrayArgument(): bool\n    {\n        return $this->arrayArguments() > 0;\n    }\n\n    public function getFirstArrayArgumentNumber(): int\n    {\n        $rowArrays = $this->filterArray($this->rows);\n        $columnArrays = $this->filterArray($this->columns);\n\n        for ($index = $this->indexStart; $index < $this->argumentCount; ++$index) {\n            if (isset($rowArrays[$index]) || isset($columnArrays[$index])) {\n                return ++$index;\n            }\n        }\n\n        return 0;\n    }\n\n    public function getSingleRowVector(): ?int\n    {\n        $rowVectors = $this->getRowVectors();\n\n        return count($rowVectors) === 1 ? array_pop($rowVectors) : null;\n    }\n\n    /** @return int[] */\n    private function getRowVectors(): array\n    {\n        $rowVectors = [];\n        for ($index = $this->indexStart; $index < ($this->indexStart + $this->argumentCount); ++$index) {\n            if ($this->rows[$index] === 1 && $this->columns[$index] > 1) {\n                $rowVectors[] = $index;\n            }\n        }\n\n        return $rowVectors;\n    }\n\n    public function getSingleColumnVector(): ?int\n    {\n        $columnVectors = $this->getColumnVectors();\n\n        return count($columnVectors) === 1 ? array_pop($columnVectors) : null;\n    }\n\n    /** @return int[] */\n    private function getColumnVectors(): array\n    {\n        $columnVectors = [];\n        for ($index = $this->indexStart; $index < ($this->indexStart + $this->argumentCount); ++$index) {\n            if ($this->rows[$index] > 1 && $this->columns[$index] === 1) {\n                $columnVectors[] = $index;\n            }\n        }\n\n        return $columnVectors;\n    }\n\n    /** @return int[] */\n    public function getMatrixPair(): array\n    {\n        for ($i = $this->indexStart; $i < ($this->indexStart + $this->argumentCount - 1); ++$i) {\n            for ($j = $i + 1; $j < $this->argumentCount; ++$j) {\n                if (isset($this->rows[$i], $this->rows[$j])) {\n                    return [$i, $j];\n                }\n            }\n        }\n\n        return [];\n    }\n\n    public function isVector(int $argument): bool\n    {\n        return $this->rows[$argument] === 1 || $this->columns[$argument] === 1;\n    }\n\n    public function isRowVector(int $argument): bool\n    {\n        return $this->rows[$argument] === 1;\n    }\n\n    public function isColumnVector(int $argument): bool\n    {\n        return $this->columns[$argument] === 1;\n    }\n\n    public function rowCount(int $argument): int\n    {\n        return $this->rows[$argument];\n    }\n\n    public function columnCount(int $argument): int\n    {\n        return $this->columns[$argument];\n    }\n\n    /**\n     * @param mixed[] $arguments\n     *\n     * @return int[]\n     */\n    private function rows(array $arguments): array\n    {\n        return array_map(\n            fn ($argument): int => is_countable($argument) ? count($argument) : 1,\n            $arguments\n        );\n    }\n\n    /**\n     * @param mixed[] $arguments\n     *\n     * @return int[]\n     */\n    private function columns(array $arguments): array\n    {\n        return array_map(\n            fn (mixed $argument): int => is_array($argument) && is_array($argument[array_keys($argument)[0]])\n                    ? count($argument[array_keys($argument)[0]])\n                    : 1,\n            $arguments\n        );\n    }\n\n    public function arrayArguments(): int\n    {\n        $count = 0;\n        foreach (array_keys($this->arguments) as $argument) {\n            if ($this->rows[$argument] > 1 || $this->columns[$argument] > 1) {\n                ++$count;\n            }\n        }\n\n        return $count;\n    }\n\n    /**\n     * @param mixed[] $arguments\n     * @param int[] $rows\n     * @param int[] $columns\n     *\n     * @return mixed[]\n     */\n    private function flattenSingleCellArrays(array $arguments, array $rows, array $columns): array\n    {\n        foreach ($arguments as $index => $argument) {\n            if ($rows[$index] === 1 && $columns[$index] === 1) {\n                while (is_array($argument)) {\n                    $argument = array_pop($argument);\n                }\n                $arguments[$index] = $argument;\n            }\n        }\n\n        return $arguments;\n    }\n\n    /**\n     * @param mixed[] $array\n     *\n     * @return mixed[]\n     */\n    private function filterArray(array $array): array\n    {\n        return array_filter(\n            $array,\n            fn ($value): bool => $value > 1\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentProcessor.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass ArrayArgumentProcessor\n{\n    private static ArrayArgumentHelper $arrayArgumentHelper;\n\n    /** @return mixed[] */\n    public static function processArguments(\n        ArrayArgumentHelper $arrayArgumentHelper,\n        callable $method,\n        mixed ...$arguments\n    ): array {\n        self::$arrayArgumentHelper = $arrayArgumentHelper;\n\n        if (self::$arrayArgumentHelper->hasArrayArgument() === false) {\n            return [$method(...$arguments)];\n        }\n\n        if (self::$arrayArgumentHelper->arrayArguments() === 1) {\n            $nthArgument = self::$arrayArgumentHelper->getFirstArrayArgumentNumber();\n\n            return self::evaluateNthArgumentAsArray($method, $nthArgument, ...$arguments);\n        }\n\n        $singleRowVectorIndex = self::$arrayArgumentHelper->getSingleRowVector();\n        $singleColumnVectorIndex = self::$arrayArgumentHelper->getSingleColumnVector();\n\n        if ($singleRowVectorIndex !== null && $singleColumnVectorIndex !== null) {\n            // Basic logic for a single row vector and a single column vector\n            return self::evaluateVectorPair($method, $singleRowVectorIndex, $singleColumnVectorIndex, ...$arguments);\n        }\n\n        $matrixPair = self::$arrayArgumentHelper->getMatrixPair();\n        if ($matrixPair !== []) {\n            if (\n                (self::$arrayArgumentHelper->isVector($matrixPair[0]) === true\n                    && self::$arrayArgumentHelper->isVector($matrixPair[1]) === false)\n                || (self::$arrayArgumentHelper->isVector($matrixPair[0]) === false\n                    && self::$arrayArgumentHelper->isVector($matrixPair[1]) === true)\n            ) {\n                // Logic for a matrix and a vector (row or column)\n                return self::evaluateVectorMatrixPair($method, $matrixPair, ...$arguments);\n            }\n\n            // Logic for matrix/matrix, column vector/column vector or row vector/row vector\n            return self::evaluateMatrixPair($method, $matrixPair, ...$arguments);\n        }\n\n        // Still need to work out the logic for more than two array arguments,\n        // For the moment, we're throwing an Exception when we initialise the ArrayArgumentHelper\n        return ['#VALUE!'];\n    }\n\n    /**\n     * @param int[] $matrixIndexes\n     *\n     * @return mixed[]\n     */\n    private static function evaluateVectorMatrixPair(callable $method, array $matrixIndexes, mixed ...$arguments): array\n    {\n        $matrix2 = array_pop($matrixIndexes) ?? throw new Exception('empty array 2');\n        /** @var mixed[][] $matrixValues2 */\n        $matrixValues2 = $arguments[$matrix2];\n        $matrix1 = array_pop($matrixIndexes) ?? throw new Exception('empty array 1');\n        /** @var mixed[][] $matrixValues1 */\n        $matrixValues1 = $arguments[$matrix1];\n\n        /** @var non-empty-array<int> */\n        $matrix12 = [$matrix1, $matrix2];\n        $rows = min(array_map(self::$arrayArgumentHelper->rowCount(...), $matrix12));\n        $columns = min(array_map(self::$arrayArgumentHelper->columnCount(...), $matrix12));\n\n        if ($rows === 1) {\n            $rows = max(array_map(self::$arrayArgumentHelper->rowCount(...), $matrix12));\n        }\n        if ($columns === 1) {\n            $columns = max(array_map(self::$arrayArgumentHelper->columnCount(...), $matrix12));\n        }\n\n        $result = [];\n        for ($rowIndex = 0; $rowIndex < $rows; ++$rowIndex) {\n            for ($columnIndex = 0; $columnIndex < $columns; ++$columnIndex) {\n                $rowIndex1 = self::$arrayArgumentHelper->isRowVector($matrix1) ? 0 : $rowIndex;\n                $columnIndex1 = self::$arrayArgumentHelper->isColumnVector($matrix1) ? 0 : $columnIndex;\n                $value1 = $matrixValues1[$rowIndex1][$columnIndex1];\n                $rowIndex2 = self::$arrayArgumentHelper->isRowVector($matrix2) ? 0 : $rowIndex;\n                $columnIndex2 = self::$arrayArgumentHelper->isColumnVector($matrix2) ? 0 : $columnIndex;\n                $value2 = $matrixValues2[$rowIndex2][$columnIndex2];\n                $arguments[$matrix1] = $value1;\n                $arguments[$matrix2] = $value2;\n\n                $result[$rowIndex][$columnIndex] = $method(...$arguments);\n            }\n        }\n\n        return $result;\n    }\n\n    /**\n     * @param array<int|string> $matrixIndexes\n     *\n     * @return mixed[]\n     */\n    private static function evaluateMatrixPair(callable $method, array $matrixIndexes, mixed ...$arguments): array\n    {\n        $matrix2 = array_pop($matrixIndexes);\n        /** @var mixed[][] $matrixValues2 */\n        $matrixValues2 = $arguments[$matrix2];\n        $matrix1 = array_pop($matrixIndexes);\n        /** @var mixed[][] $matrixValues1 */\n        $matrixValues1 = $arguments[$matrix1];\n\n        $result = [];\n        foreach ($matrixValues1 as $rowIndex => $row) {\n            foreach ($row as $columnIndex => $value1) {\n                if (isset($matrixValues2[$rowIndex][$columnIndex]) === false) {\n                    continue;\n                }\n\n                $value2 = $matrixValues2[$rowIndex][$columnIndex];\n                $arguments[$matrix1] = $value1;\n                $arguments[$matrix2] = $value2;\n\n                $result[$rowIndex][$columnIndex] = $method(...$arguments);\n            }\n        }\n\n        return $result;\n    }\n\n    /** @return mixed[] */\n    private static function evaluateVectorPair(callable $method, int $rowIndex, int $columnIndex, mixed ...$arguments): array\n    {\n        $rowVector = Functions::flattenArray($arguments[$rowIndex]);\n        $columnVector = Functions::flattenArray($arguments[$columnIndex]);\n\n        $result = [];\n        foreach ($columnVector as $column) {\n            $rowResults = [];\n            foreach ($rowVector as $row) {\n                $arguments[$rowIndex] = $row;\n                $arguments[$columnIndex] = $column;\n\n                $rowResults[] = $method(...$arguments);\n            }\n            $result[] = $rowResults;\n        }\n\n        return $result;\n    }\n\n    /**\n     * Note, offset is from 1 (for the first argument) rather than from 0.\n     *\n     * @return mixed[]\n     */\n    private static function evaluateNthArgumentAsArray(callable $method, int $nthArgument, mixed ...$arguments): array\n    {\n        $values = array_slice($arguments, $nthArgument - 1, 1);\n        /** @var mixed[] $values */\n        $values = array_pop($values);\n\n        $result = [];\n        foreach ($values as $value) {\n            $arguments[$nthArgument - 1] = $value;\n            $result[] = $method(...$arguments);\n        }\n\n        return $result;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engine/BranchPruner.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass BranchPruner\n{\n    protected bool $branchPruningEnabled;\n\n    /**\n     * Used to generate unique store keys.\n     */\n    private int $branchStoreKeyCounter = 0;\n\n    /**\n     * currently pending storeKey (last item of the storeKeysStack.\n     */\n    protected ?string $pendingStoreKey = null;\n\n    /**\n     * @var string[]\n     */\n    protected array $storeKeysStack = [];\n\n    /**\n     * @var bool[]\n     */\n    protected array $conditionMap = [];\n\n    /**\n     * @var bool[]\n     */\n    protected array $thenMap = [];\n\n    /**\n     * @var bool[]\n     */\n    protected array $elseMap = [];\n\n    /**\n     * @var int[]\n     */\n    protected array $braceDepthMap = [];\n\n    protected ?string $currentCondition = null;\n\n    protected ?string $currentOnlyIf = null;\n\n    protected ?string $currentOnlyIfNot = null;\n\n    protected ?string $previousStoreKey = null;\n\n    public function __construct(bool $branchPruningEnabled)\n    {\n        $this->branchPruningEnabled = $branchPruningEnabled;\n    }\n\n    public function clearBranchStore(): void\n    {\n        $this->branchStoreKeyCounter = 0;\n    }\n\n    public function initialiseForLoop(): void\n    {\n        $this->currentCondition = null;\n        $this->currentOnlyIf = null;\n        $this->currentOnlyIfNot = null;\n        $this->previousStoreKey = null;\n        $this->pendingStoreKey = empty($this->storeKeysStack) ? null : end($this->storeKeysStack);\n\n        if ($this->branchPruningEnabled) {\n            $this->initialiseCondition();\n            $this->initialiseThen();\n            $this->initialiseElse();\n        }\n    }\n\n    private function initialiseCondition(): void\n    {\n        if (isset($this->pendingStoreKey, $this->conditionMap[$this->pendingStoreKey]) && $this->conditionMap[$this->pendingStoreKey]) {\n            $this->currentCondition = $this->pendingStoreKey;\n            $stackDepth = count($this->storeKeysStack);\n            if ($stackDepth > 1) {\n                // nested if\n                $this->previousStoreKey = $this->storeKeysStack[$stackDepth - 2];\n            }\n        }\n    }\n\n    private function initialiseThen(): void\n    {\n        if (isset($this->pendingStoreKey, $this->thenMap[$this->pendingStoreKey]) && $this->thenMap[$this->pendingStoreKey]) {\n            $this->currentOnlyIf = $this->pendingStoreKey;\n        } elseif (\n            isset($this->previousStoreKey, $this->thenMap[$this->previousStoreKey])\n            && $this->thenMap[$this->previousStoreKey]\n        ) {\n            $this->currentOnlyIf = $this->previousStoreKey;\n        }\n    }\n\n    private function initialiseElse(): void\n    {\n        if (isset($this->pendingStoreKey, $this->elseMap[$this->pendingStoreKey]) && $this->elseMap[$this->pendingStoreKey]) {\n            $this->currentOnlyIfNot = $this->pendingStoreKey;\n        } elseif (\n            isset($this->previousStoreKey, $this->elseMap[$this->previousStoreKey])\n            && $this->elseMap[$this->previousStoreKey]\n        ) {\n            $this->currentOnlyIfNot = $this->previousStoreKey;\n        }\n    }\n\n    public function decrementDepth(): void\n    {\n        if (!empty($this->pendingStoreKey)) {\n            --$this->braceDepthMap[$this->pendingStoreKey];\n        }\n    }\n\n    public function incrementDepth(): void\n    {\n        if (!empty($this->pendingStoreKey)) {\n            ++$this->braceDepthMap[$this->pendingStoreKey];\n        }\n    }\n\n    public function functionCall(string $functionName): void\n    {\n        if ($this->branchPruningEnabled && ($functionName === 'IF(')) {\n            // we handle a new if\n            $this->pendingStoreKey = $this->getUnusedBranchStoreKey();\n            $this->storeKeysStack[] = $this->pendingStoreKey;\n            $this->conditionMap[$this->pendingStoreKey] = true;\n            $this->braceDepthMap[$this->pendingStoreKey] = 0;\n        } elseif (!empty($this->pendingStoreKey) && array_key_exists($this->pendingStoreKey, $this->braceDepthMap)) {\n            // this is not an if but we go deeper\n            ++$this->braceDepthMap[$this->pendingStoreKey];\n        }\n    }\n\n    public function argumentSeparator(): void\n    {\n        if (!empty($this->pendingStoreKey) && $this->braceDepthMap[$this->pendingStoreKey] === 0) {\n            // We must go to the IF next argument\n            if ($this->conditionMap[$this->pendingStoreKey]) {\n                $this->conditionMap[$this->pendingStoreKey] = false;\n                $this->thenMap[$this->pendingStoreKey] = true;\n            } elseif ($this->thenMap[$this->pendingStoreKey]) {\n                $this->thenMap[$this->pendingStoreKey] = false;\n                $this->elseMap[$this->pendingStoreKey] = true;\n            } elseif ($this->elseMap[$this->pendingStoreKey]) {\n                throw new Exception('Reaching fourth argument of an IF');\n            }\n        }\n    }\n\n    public function closingBrace(mixed $value): void\n    {\n        if (!empty($this->pendingStoreKey) && $this->braceDepthMap[$this->pendingStoreKey] === -1) {\n            // we are closing an IF(\n            if ($value !== 'IF(') {\n                throw new Exception('Parser bug we should be in an \"IF(\"');\n            }\n\n            if ($this->conditionMap[$this->pendingStoreKey]) {\n                throw new Exception('We should not be expecting a condition');\n            }\n\n            $this->thenMap[$this->pendingStoreKey] = false;\n            $this->elseMap[$this->pendingStoreKey] = false;\n            --$this->braceDepthMap[$this->pendingStoreKey];\n            array_pop($this->storeKeysStack);\n            $this->pendingStoreKey = null;\n        }\n    }\n\n    public function currentCondition(): ?string\n    {\n        return $this->currentCondition;\n    }\n\n    public function currentOnlyIf(): ?string\n    {\n        return $this->currentOnlyIf;\n    }\n\n    public function currentOnlyIfNot(): ?string\n    {\n        return $this->currentOnlyIfNot;\n    }\n\n    private function getUnusedBranchStoreKey(): string\n    {\n        $storeKeyValue = 'storeKey-' . $this->branchStoreKeyCounter;\n        ++$this->branchStoreKeyCounter;\n\n        return $storeKeyValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engine;\n\nclass CyclicReferenceStack\n{\n    /**\n     * The call stack for calculated cells.\n     *\n     * @var mixed[]\n     */\n    private array $stack = [];\n\n    /**\n     * Return the number of entries on the stack.\n     */\n    public function count(): int\n    {\n        return count($this->stack);\n    }\n\n    /**\n     * Push a new entry onto the stack.\n     *\n     * @param int|string $value The value to test\n     */\n    public function push($value): void\n    {\n        $this->stack[$value] = $value;\n    }\n\n    /**\n     * Pop the last entry from the stack.\n     */\n    public function pop(): mixed\n    {\n        return array_pop($this->stack);\n    }\n\n    /**\n     * Test to see if a specified entry exists on the stack.\n     *\n     * @param int|string $value The value to test\n     */\n    public function onStack($value): bool\n    {\n        return isset($this->stack[$value]);\n    }\n\n    /**\n     * Clear the stack.\n     */\n    public function clear(): void\n    {\n        $this->stack = [];\n    }\n\n    /**\n     * Return an array of all entries on the stack.\n     *\n     * @return mixed[]\n     */\n    public function showStack(): array\n    {\n        return $this->stack;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engine/FormattedNumber.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass FormattedNumber\n{\n    /**    Constants                */\n    /**    Regular Expressions        */\n    private const STRING_REGEXP_FRACTION = '~^\\s*(-?)((\\d*)\\s+)?(\\d+\\/\\d+)\\s*$~';\n\n    private const STRING_REGEXP_PERCENT = '~^(?:(?: *(?<PrefixedSign>[-+])? *\\% *(?<PrefixedSign2>[-+])? *(?<PrefixedValue>[0-9]+\\.?[0-9*]*(?:E[-+]?[0-9]*)?) *)|(?: *(?<PostfixedSign>[-+])? *(?<PostfixedValue>[0-9]+\\.?[0-9]*(?:E[-+]?[0-9]*)?) *\\% *))$~i';\n\n    // preg_quoted string for major currency symbols, with a %s for locale currency\n    private const CURRENCY_CONVERSION_LIST = '\\$€£¥%s';\n\n    /**\n     * Identify whether a string contains a formatted numeric value,\n     * and convert it to a numeric if it is.\n     *\n     * @param float|string $operand string value to test\n     */\n    public static function convertToNumberIfFormatted(float|string &$operand): bool\n    {\n        return self::convertToNumberIfNumeric($operand)\n            || self::convertToNumberIfFraction($operand)\n            || self::convertToNumberIfPercent($operand)\n            || self::convertToNumberIfCurrency($operand);\n    }\n\n    /**\n     * Identify whether a string contains a numeric value,\n     * and convert it to a numeric if it is.\n     *\n     * @param float|string $operand string value to test\n     */\n    public static function convertToNumberIfNumeric(float|string &$operand): bool\n    {\n        $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/');\n        $value = preg_replace(['/(\\d)' . $thousandsSeparator . '(\\d)/u', '/([+-])\\s+(\\d)/u'], ['$1$2', '$1$2'], trim(\"$operand\"));\n        $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator(), '/');\n        $value = preg_replace(['/(\\d)' . $decimalSeparator . '(\\d)/u', '/([+-])\\s+(\\d)/u'], ['$1.$2', '$1$2'], $value ?? '');\n\n        if (is_numeric($value)) {\n            $operand = (float) $value;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Identify whether a string contains a fractional numeric value,\n     * and convert it to a numeric if it is.\n     *\n     * @param string $operand string value to test\n     */\n    public static function convertToNumberIfFraction(float|string &$operand): bool\n    {\n        if (is_string($operand) && preg_match(self::STRING_REGEXP_FRACTION, $operand, $match)) {\n            $sign = ($match[1] === '-') ? '-' : '+';\n            $wholePart = ($match[3] === '') ? '' : ($sign . $match[3]);\n            $fractionFormula = '=' . $wholePart . $sign . $match[4];\n            /** @var string */\n            $operandx = Calculation::getInstance()->_calculateFormulaValue($fractionFormula);\n            $operand = $operandx;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Identify whether a string contains a percentage, and if so,\n     * convert it to a numeric.\n     *\n     * @param float|string $operand string value to test\n     */\n    public static function convertToNumberIfPercent(float|string &$operand): bool\n    {\n        $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/');\n        $value = preg_replace('/(\\d)' . $thousandsSeparator . '(\\d)/u', '$1$2', trim(\"$operand\"));\n        $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator(), '/');\n        $value = preg_replace(['/(\\d)' . $decimalSeparator . '(\\d)/u', '/([+-])\\s+(\\d)/u'], ['$1.$2', '$1$2'], $value ?? '');\n\n        $match = [];\n        if ($value !== null && preg_match(self::STRING_REGEXP_PERCENT, $value, $match, PREG_UNMATCHED_AS_NULL)) {\n            //Calculate the percentage\n            $sign = ($match['PrefixedSign'] ?? $match['PrefixedSign2'] ?? $match['PostfixedSign']) ?? '';\n            $operand = (float) ($sign . ($match['PostfixedValue'] ?? $match['PrefixedValue'])) / 100;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Identify whether a string contains a currency value, and if so,\n     * convert it to a numeric.\n     *\n     * @param float|string $operand string value to test\n     */\n    public static function convertToNumberIfCurrency(float|string &$operand): bool\n    {\n        $currencyRegexp = self::currencyMatcherRegexp();\n        $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/');\n        $value = preg_replace('/(\\d)' . $thousandsSeparator . '(\\d)/u', '$1$2', \"$operand\");\n\n        $match = [];\n        if ($value !== null && preg_match($currencyRegexp, $value, $match, PREG_UNMATCHED_AS_NULL)) {\n            //Determine the sign\n            $sign = ($match['PrefixedSign'] ?? $match['PrefixedSign2'] ?? $match['PostfixedSign']) ?? '';\n            $decimalSeparator = StringHelper::getDecimalSeparator();\n            //Cast to a float\n            $intermediate = (string) ($match['PostfixedValue'] ?? $match['PrefixedValue']);\n            $intermediate = str_replace($decimalSeparator, '.', $intermediate);\n            if (is_numeric($intermediate)) {\n                $operand = (float) ($sign . str_replace($decimalSeparator, '.', $intermediate));\n\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    public static function currencyMatcherRegexp(): string\n    {\n        $currencyCodes = sprintf(self::CURRENCY_CONVERSION_LIST, preg_quote(StringHelper::getCurrencyCode(), '/'));\n        $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator(), '/');\n\n        return '~^(?:(?: *(?<PrefixedSign>[-+])? *(?<PrefixedCurrency>[' . $currencyCodes . ']) *(?<PrefixedSign2>[-+])? *(?<PrefixedValue>[0-9]+[' . $decimalSeparator . ']?[0-9*]*(?:E[-+]?[0-9]*)?) *)|(?: *(?<PostfixedSign>[-+])? *(?<PostfixedValue>[0-9]+' . $decimalSeparator . '?[0-9]*(?:E[-+]?[0-9]*)?) *(?<PostfixedCurrency>[' . $currencyCodes . ']) *))$~ui';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engine/Logger.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engine;\n\nclass Logger\n{\n    /**\n     * Flag to determine whether a debug log should be generated by the calculation engine\n     *        If true, then a debug log will be generated\n     *        If false, then a debug log will not be generated.\n     */\n    private bool $writeDebugLog = false;\n\n    /**\n     * Flag to determine whether a debug log should be echoed by the calculation engine\n     *        If true, then a debug log will be echoed\n     *        If false, then a debug log will not be echoed\n     * A debug log can only be echoed if it is generated.\n     */\n    private bool $echoDebugLog = false;\n\n    /**\n     * The debug log generated by the calculation engine.\n     *\n     * @var string[]\n     */\n    private array $debugLog = [];\n\n    /**\n     * The calculation engine cell reference stack.\n     */\n    private CyclicReferenceStack $cellStack;\n\n    /**\n     * Instantiate a Calculation engine logger.\n     */\n    public function __construct(CyclicReferenceStack $stack)\n    {\n        $this->cellStack = $stack;\n    }\n\n    /**\n     * Enable/Disable Calculation engine logging.\n     */\n    public function setWriteDebugLog(bool $writeDebugLog): void\n    {\n        $this->writeDebugLog = $writeDebugLog;\n    }\n\n    /**\n     * Return whether calculation engine logging is enabled or disabled.\n     */\n    public function getWriteDebugLog(): bool\n    {\n        return $this->writeDebugLog;\n    }\n\n    /**\n     * Enable/Disable echoing of debug log information.\n     */\n    public function setEchoDebugLog(bool $echoDebugLog): void\n    {\n        $this->echoDebugLog = $echoDebugLog;\n    }\n\n    /**\n     * Return whether echoing of debug log information is enabled or disabled.\n     */\n    public function getEchoDebugLog(): bool\n    {\n        return $this->echoDebugLog;\n    }\n\n    /**\n     * Write an entry to the calculation engine debug log.\n     */\n    public function writeDebugLog(string $message, mixed ...$args): void\n    {\n        //    Only write the debug log if logging is enabled\n        if ($this->writeDebugLog) {\n            $message = sprintf($message, ...$args); //* @phpstan-ignore-line\n            $cellReference = implode(' -> ', $this->cellStack->showStack());\n            if ($this->echoDebugLog) {\n                echo $cellReference,\n                ($this->cellStack->count() > 0 ? ' => ' : ''),\n                $message,\n                PHP_EOL;\n            }\n            $this->debugLog[] = $cellReference\n                . ($this->cellStack->count() > 0 ? ' => ' : '')\n                . $message;\n        }\n    }\n\n    /**\n     * Write a series of entries to the calculation engine debug log.\n     *\n     * @param string[] $args\n     */\n    public function mergeDebugLog(array $args): void\n    {\n        if ($this->writeDebugLog) {\n            foreach ($args as $entry) {\n                $this->writeDebugLog($entry);\n            }\n        }\n    }\n\n    /**\n     * Clear the calculation engine debug log.\n     */\n    public function clearLog(): void\n    {\n        $this->debugLog = [];\n    }\n\n    /**\n     * Return the calculation engine debug log.\n     *\n     * @return string[]\n     */\n    public function getLog(): array\n    {\n        return $this->debugLog;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engine/Operands/Operand.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\Operands;\n\ninterface Operand\n{\n    /** @param string[] $matches */\n    public static function fromParser(string $formula, int $index, array $matches): self;\n\n    public function value(): string;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\Operands;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse Stringable;\n\nfinal class StructuredReference implements Operand, Stringable\n{\n    public const NAME = 'Structured Reference';\n\n    private const OPEN_BRACE = '[';\n    private const CLOSE_BRACE = ']';\n\n    private const ITEM_SPECIFIER_ALL = '#All';\n    private const ITEM_SPECIFIER_HEADERS = '#Headers';\n    private const ITEM_SPECIFIER_DATA = '#Data';\n    private const ITEM_SPECIFIER_TOTALS = '#Totals';\n    private const ITEM_SPECIFIER_THIS_ROW = '#This Row';\n\n    private const ITEM_SPECIFIER_ROWS_SET = [\n        self::ITEM_SPECIFIER_ALL,\n        self::ITEM_SPECIFIER_HEADERS,\n        self::ITEM_SPECIFIER_DATA,\n        self::ITEM_SPECIFIER_TOTALS,\n    ];\n\n    private const TABLE_REFERENCE = '/([\\p{L}_\\\\\\][\\p{L}\\p{N}\\._]+)?(\\[(?:[^\\]\\[]+|(?R))*+\\])/miu';\n\n    private string $value;\n\n    private string $tableName;\n\n    private Table $table;\n\n    private string $reference;\n\n    private ?int $headersRow;\n\n    private int $firstDataRow;\n\n    private int $lastDataRow;\n\n    private ?int $totalsRow;\n\n    /** @var mixed[] */\n    private array $columns;\n\n    public function __construct(string $structuredReference)\n    {\n        $this->value = $structuredReference;\n    }\n\n    /** @param string[] $matches */\n    public static function fromParser(string $formula, int $index, array $matches): self\n    {\n        $val = $matches[0];\n\n        $srCount = substr_count($val, self::OPEN_BRACE)\n            - substr_count($val, self::CLOSE_BRACE);\n        while ($srCount > 0) {\n            $srIndex = strlen($val);\n            $srStringRemainder = substr($formula, $index + $srIndex);\n            $closingPos = strpos($srStringRemainder, self::CLOSE_BRACE);\n            if ($closingPos === false) {\n                throw new Exception(\"Formula Error: No closing ']' to match opening '['\");\n            }\n            $srStringRemainder = substr($srStringRemainder, 0, $closingPos + 1);\n            --$srCount;\n            if (str_contains($srStringRemainder, self::OPEN_BRACE)) {\n                ++$srCount;\n            }\n            $val .= $srStringRemainder;\n        }\n\n        return new self($val);\n    }\n\n    /**\n     * @throws Exception\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Exception\n     */\n    public function parse(Cell $cell): string\n    {\n        $this->getTableStructure($cell);\n        $cellRange = ($this->isRowReference()) ? $this->getRowReference($cell) : $this->getColumnReference();\n        $sheetName = '';\n        $worksheet = $this->table->getWorksheet();\n        if ($worksheet !== null && $worksheet !== $cell->getWorksheet()) {\n            $sheetName = \"'\" . $worksheet->getTitle() . \"'!\";\n        }\n\n        return $sheetName . $cellRange;\n    }\n\n    private function isRowReference(): bool\n    {\n        return str_contains($this->value, '[@')\n            || str_contains($this->value, '[' . self::ITEM_SPECIFIER_THIS_ROW . ']');\n    }\n\n    /**\n     * @throws Exception\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Exception\n     */\n    private function getTableStructure(Cell $cell): void\n    {\n        preg_match(self::TABLE_REFERENCE, $this->value, $matches);\n\n        $this->tableName = $matches[1];\n        $this->table = ($this->tableName === '')\n            ? $this->getTableForCell($cell)\n            : $this->getTableByName($cell);\n        $this->reference = $matches[2];\n        $tableRange = Coordinate::getRangeBoundaries($this->table->getRange());\n\n        $this->headersRow = ($this->table->getShowHeaderRow()) ? (int) $tableRange[0][1] : null;\n        $this->firstDataRow = ($this->table->getShowHeaderRow()) ? (int) $tableRange[0][1] + 1 : $tableRange[0][1];\n        $this->totalsRow = ($this->table->getShowTotalsRow()) ? (int) $tableRange[1][1] : null;\n        $this->lastDataRow = ($this->table->getShowTotalsRow()) ? (int) $tableRange[1][1] - 1 : $tableRange[1][1];\n\n        $cellParam = $cell;\n        $worksheet = $this->table->getWorksheet();\n        if ($worksheet !== null && $worksheet !== $cell->getWorksheet()) {\n            $cellParam = $worksheet->getCell('A1');\n        }\n        $this->columns = $this->getColumns($cellParam, $tableRange);\n    }\n\n    /**\n     * @throws Exception\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Exception\n     */\n    private function getTableForCell(Cell $cell): Table\n    {\n        $tables = $cell->getWorksheet()->getTableCollection();\n        foreach ($tables as $table) {\n            /** @var Table $table */\n            $range = $table->getRange();\n            if ($cell->isInRange($range) === true) {\n                $this->tableName = $table->getName();\n\n                return $table;\n            }\n        }\n\n        throw new Exception('Table for Structured Reference cannot be identified');\n    }\n\n    /**\n     * @throws Exception\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Exception\n     */\n    private function getTableByName(Cell $cell): Table\n    {\n        $table = $cell->getWorksheet()->getTableByName($this->tableName);\n\n        if ($table === null) {\n            $spreadsheet = $cell->getWorksheet()->getParent();\n            if ($spreadsheet !== null) {\n                $table = $spreadsheet->getTableByName($this->tableName);\n            }\n        }\n\n        if ($table === null) {\n            throw new Exception(\"Table {$this->tableName} for Structured Reference cannot be located\");\n        }\n\n        return $table;\n    }\n\n    /**\n     * @param array{array{string, int}, array{string, int}} $tableRange\n     *\n     * @return mixed[]\n     */\n    private function getColumns(Cell $cell, array $tableRange): array\n    {\n        $worksheet = $cell->getWorksheet();\n        $cellReference = $cell->getCoordinate();\n\n        $columns = [];\n        $lastColumn = StringHelper::stringIncrement($tableRange[1][0]);\n        for ($column = $tableRange[0][0]; $column !== $lastColumn; StringHelper::stringIncrement($column)) {\n            /** @var string $column */\n            $columns[$column] = $worksheet\n                ->getCell($column . ($this->headersRow ?? ($this->firstDataRow - 1)))\n                ->getCalculatedValue();\n        }\n\n        $worksheet->getCell($cellReference);\n\n        return $columns;\n    }\n\n    private function getRowReference(Cell $cell): string\n    {\n        $reference = str_replace(\"\\u{a0}\", ' ', $this->reference);\n        /** @var string $reference */\n        $reference = str_replace('[' . self::ITEM_SPECIFIER_THIS_ROW . '],', '', $reference);\n\n        foreach ($this->columns as $columnId => $columnName) {\n            $columnName = str_replace(\"\\u{a0}\", ' ', $columnName); //* @phpstan-ignore-line\n            $reference = $this->adjustRowReference($columnName, $reference, $cell, $columnId);\n        }\n\n        return $this->validateParsedReference(trim($reference, '[]@, '));\n    }\n\n    private function adjustRowReference(string $columnName, string $reference, Cell $cell, string $columnId): string\n    {\n        if ($columnName !== '') {\n            $cellReference = $columnId . $cell->getRow();\n            $pattern1 = '/\\[' . preg_quote($columnName, '/') . '\\]/miu';\n            $pattern2 = '/@' . preg_quote($columnName, '/') . '/miu';\n            if (preg_match($pattern1, $reference) === 1) {\n                $reference = preg_replace($pattern1, $cellReference, $reference);\n            } elseif (preg_match($pattern2, $reference) === 1) {\n                $reference = preg_replace($pattern2, $cellReference, $reference);\n            }\n            /** @var string $reference */\n        }\n\n        return $reference;\n    }\n\n    /**\n     * @throws Exception\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Exception\n     */\n    private function getColumnReference(): string\n    {\n        $reference = str_replace(\"\\u{a0}\", ' ', $this->reference);\n        $startRow = ($this->totalsRow === null) ? $this->lastDataRow : $this->totalsRow;\n        $endRow = ($this->headersRow === null) ? $this->firstDataRow : $this->headersRow;\n\n        [$startRow, $endRow] = $this->getRowsForColumnReference($reference, $startRow, $endRow);\n        $reference = $this->getColumnsForColumnReference($reference, $startRow, $endRow);\n\n        $reference = trim($reference, '[]@, ');\n        if (substr_count($reference, ':') > 1) {\n            $cells = explode(':', $reference);\n            $firstCell = array_shift($cells);\n            $lastCell = array_pop($cells);\n            $reference = \"{$firstCell}:{$lastCell}\";\n        }\n\n        return $this->validateParsedReference($reference);\n    }\n\n    /**\n     * @throws Exception\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Exception\n     */\n    private function validateParsedReference(string $reference): string\n    {\n        if (preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . ':' . Calculation::CALCULATION_REGEXP_CELLREF . '$/miu', $reference) !== 1) {\n            if (preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/miu', $reference) !== 1) {\n                throw new Exception(\n                    \"Invalid Structured Reference {$this->reference} {$reference}\",\n                    Exception::CALCULATION_ENGINE_PUSH_TO_STACK\n                );\n            }\n        }\n\n        return $reference;\n    }\n\n    private function fullData(int $startRow, int $endRow): string\n    {\n        $columns = array_keys($this->columns);\n        $firstColumn = array_shift($columns);\n        $lastColumn = (empty($columns)) ? $firstColumn : array_pop($columns);\n\n        return \"{$firstColumn}{$startRow}:{$lastColumn}{$endRow}\";\n    }\n\n    private function getMinimumRow(string $reference): int\n    {\n        return match ($reference) {\n            self::ITEM_SPECIFIER_ALL, self::ITEM_SPECIFIER_HEADERS => $this->headersRow ?? $this->firstDataRow,\n            self::ITEM_SPECIFIER_DATA => $this->firstDataRow,\n            self::ITEM_SPECIFIER_TOTALS => $this->totalsRow ?? $this->lastDataRow,\n            default => $this->headersRow ?? $this->firstDataRow,\n        };\n    }\n\n    private function getMaximumRow(string $reference): int\n    {\n        return match ($reference) {\n            self::ITEM_SPECIFIER_HEADERS => $this->headersRow ?? $this->firstDataRow,\n            self::ITEM_SPECIFIER_DATA => $this->lastDataRow,\n            self::ITEM_SPECIFIER_ALL, self::ITEM_SPECIFIER_TOTALS => $this->totalsRow ?? $this->lastDataRow,\n            default => $this->totalsRow ?? $this->lastDataRow,\n        };\n    }\n\n    public function value(): string\n    {\n        return $this->value;\n    }\n\n    /**\n     * @return array<int, int>\n     */\n    private function getRowsForColumnReference(string &$reference, int $startRow, int $endRow): array\n    {\n        $rowsSelected = false;\n        foreach (self::ITEM_SPECIFIER_ROWS_SET as $rowReference) {\n            $pattern = '/\\[' . $rowReference . '\\]/mui';\n            if (preg_match($pattern, $reference) === 1) {\n                if (($rowReference === self::ITEM_SPECIFIER_HEADERS) && ($this->table->getShowHeaderRow() === false)) {\n                    throw new Exception(\n                        'Table Headers are Hidden, and should not be Referenced',\n                        Exception::CALCULATION_ENGINE_PUSH_TO_STACK\n                    );\n                }\n                $rowsSelected = true;\n                $startRow = min($startRow, $this->getMinimumRow($rowReference));\n                $endRow = max($endRow, $this->getMaximumRow($rowReference));\n                $reference = preg_replace($pattern, '', $reference) ?? '';\n            }\n        }\n        if ($rowsSelected === false) {\n            // If there isn't any Special Item Identifier specified, then the selection defaults to data rows only.\n            $startRow = $this->firstDataRow;\n            $endRow = $this->lastDataRow;\n        }\n\n        return [$startRow, $endRow];\n    }\n\n    private function getColumnsForColumnReference(string $reference, int $startRow, int $endRow): string\n    {\n        $columnsSelected = false;\n        foreach ($this->columns as $columnId => $columnName) {\n            $columnName = str_replace(\"\\u{a0}\", ' ', $columnName ?? ''); //* @phpstan-ignore-line\n            $cellFrom = \"{$columnId}{$startRow}\";\n            $cellTo = \"{$columnId}{$endRow}\";\n            $cellReference = ($cellFrom === $cellTo) ? $cellFrom : \"{$cellFrom}:{$cellTo}\";\n            $pattern = '/\\[' . preg_quote($columnName, '/') . '\\]/mui';\n            if (preg_match($pattern, $reference) === 1) {\n                $columnsSelected = true;\n                $reference = preg_replace($pattern, $cellReference, $reference);\n            }\n            /** @var string $reference */\n        }\n        if ($columnsSelected === false) {\n            return $this->fullData($startRow, $endRow);\n        }\n\n        return $reference;\n    }\n\n    public function __toString(): string\n    {\n        return $this->value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/BesselI.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass BesselI\n{\n    use ArrayEnabled;\n\n    /**\n     * BESSELI.\n     *\n     *    Returns the modified Bessel function In(x), which is equivalent to the Bessel function evaluated\n     *        for purely imaginary arguments\n     *\n     *    Excel Function:\n     *        BESSELI(x,ord)\n     *\n     * NOTE: The MS Excel implementation of the BESSELI function is still not accurate.\n     *       This code provides a more accurate calculation\n     *\n     * @param mixed $x A float value at which to evaluate the function.\n     *                                If x is nonnumeric, BESSELI returns the #VALUE! error value.\n     *                      Or can be an array of values\n     * @param mixed $ord The integer order of the Bessel function.\n     *                                If ord is not an integer, it is truncated.\n     *                                If $ord is nonnumeric, BESSELI returns the #VALUE! error value.\n     *                                If $ord < 0, BESSELI returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BESSELI(mixed $x, mixed $ord): array|string|float\n    {\n        if (is_array($x) || is_array($ord)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $x, $ord);\n        }\n\n        try {\n            $x = EngineeringValidations::validateFloat($x);\n            $ord = EngineeringValidations::validateInt($ord);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($ord < 0) {\n            return ExcelError::NAN();\n        }\n\n        $fResult = self::calculate($x, $ord);\n\n        return (is_nan($fResult)) ? ExcelError::NAN() : $fResult;\n    }\n\n    private static function calculate(float $x, int $ord): float\n    {\n        return match ($ord) {\n            0 => self::besselI0($x),\n            1 => self::besselI1($x),\n            default => self::besselI2($x, $ord),\n        };\n    }\n\n    private static function besselI0(float $x): float\n    {\n        $ax = abs($x);\n\n        if ($ax < 3.75) {\n            $y = $x / 3.75;\n            $y = $y * $y;\n\n            return 1.0 + $y * (3.5156229 + $y * (3.0899424 + $y * (1.2067492\n                                + $y * (0.2659732 + $y * (0.360768e-1 + $y * 0.45813e-2)))));\n        }\n\n        $y = 3.75 / $ax;\n\n        return (exp($ax) / sqrt($ax)) * (0.39894228 + $y * (0.1328592e-1 + $y * (0.225319e-2 + $y * (-0.157565e-2\n                            + $y * (0.916281e-2 + $y * (-0.2057706e-1 + $y * (0.2635537e-1\n                                        + $y * (-0.1647633e-1 + $y * 0.392377e-2))))))));\n    }\n\n    private static function besselI1(float $x): float\n    {\n        $ax = abs($x);\n\n        if ($ax < 3.75) {\n            $y = $x / 3.75;\n            $y = $y * $y;\n            $ans = $ax * (0.5 + $y * (0.87890594 + $y * (0.51498869 + $y * (0.15084934 + $y * (0.2658733e-1\n                                    + $y * (0.301532e-2 + $y * 0.32411e-3))))));\n\n            return ($x < 0.0) ? -$ans : $ans;\n        }\n\n        $y = 3.75 / $ax;\n        $ans = 0.2282967e-1 + $y * (-0.2895312e-1 + $y * (0.1787654e-1 - $y * 0.420059e-2));\n        $ans = 0.39894228 + $y * (-0.3988024e-1 + $y * (-0.362018e-2 + $y * (0.163801e-2\n                        + $y * (-0.1031555e-1 + $y * $ans))));\n        $ans *= exp($ax) / sqrt($ax);\n\n        return ($x < 0.0) ? -$ans : $ans;\n    }\n\n    private static function besselI2(float $x, int $ord): float\n    {\n        if ($x === 0.0) {\n            return 0.0;\n        }\n\n        $tox = 2.0 / abs($x);\n        $bip = 0;\n        $ans = 0.0;\n        $bi = 1.0;\n\n        for ($j = 2 * ($ord + (int) sqrt(40.0 * $ord)); $j > 0; --$j) {\n            $bim = $bip + $j * $tox * $bi;\n            $bip = $bi;\n            $bi = $bim;\n\n            if (abs($bi) > 1.0e+12) {\n                $ans *= 1.0e-12;\n                $bi *= 1.0e-12;\n                $bip *= 1.0e-12;\n            }\n\n            if ($j === $ord) {\n                $ans = $bip;\n            }\n        }\n\n        $ans *= self::besselI0($x) / $bi;\n\n        return ($x < 0.0 && (($ord % 2) === 1)) ? -$ans : $ans;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass BesselJ\n{\n    use ArrayEnabled;\n\n    /**\n     * BESSELJ.\n     *\n     *    Returns the Bessel function\n     *\n     *    Excel Function:\n     *        BESSELJ(x,ord)\n     *\n     * NOTE: The MS Excel implementation of the BESSELJ function is still not accurate, particularly for higher order\n     *       values with x < -8 and x > 8. This code provides a more accurate calculation\n     *\n     * @param mixed $x A float value at which to evaluate the function.\n     *                                If x is nonnumeric, BESSELJ returns the #VALUE! error value.\n     *                      Or can be an array of values\n     * @param mixed $ord The integer order of the Bessel function.\n     *                       If ord is not an integer, it is truncated.\n     *                                If $ord is nonnumeric, BESSELJ returns the #VALUE! error value.\n     *                                If $ord < 0, BESSELJ returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BESSELJ(mixed $x, mixed $ord): array|string|float\n    {\n        if (is_array($x) || is_array($ord)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $x, $ord);\n        }\n\n        try {\n            $x = EngineeringValidations::validateFloat($x);\n            $ord = EngineeringValidations::validateInt($ord);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($ord < 0) {\n            return ExcelError::NAN();\n        }\n\n        $fResult = self::calculate($x, $ord);\n\n        return (is_nan($fResult)) ? ExcelError::NAN() : $fResult;\n    }\n\n    private static function calculate(float $x, int $ord): float\n    {\n        return match ($ord) {\n            0 => self::besselJ0($x),\n            1 => self::besselJ1($x),\n            default => self::besselJ2($x, $ord),\n        };\n    }\n\n    private static function besselJ0(float $x): float\n    {\n        $ax = abs($x);\n\n        if ($ax < 8.0) {\n            $y = $x * $x;\n            $ans1 = 57568490574.0 + $y * (-13362590354.0 + $y * (651619640.7 + $y * (-11214424.18 + $y\n                            * (77392.33017 + $y * (-184.9052456)))));\n            $ans2 = 57568490411.0 + $y * (1029532985.0 + $y * (9494680.718 + $y * (59272.64853 + $y\n                            * (267.8532712 + $y * 1.0))));\n\n            return $ans1 / $ans2;\n        }\n\n        $z = 8.0 / $ax;\n        $y = $z * $z;\n        $xx = $ax - 0.785398164;\n        $ans1 = 1.0 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6)));\n        $ans2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y\n                    * (0.7621095161e-6 - $y * 0.934935152e-7)));\n\n        return sqrt(0.636619772 / $ax) * (cos($xx) * $ans1 - $z * sin($xx) * $ans2);\n    }\n\n    private static function besselJ1(float $x): float\n    {\n        $ax = abs($x);\n\n        if ($ax < 8.0) {\n            $y = $x * $x;\n            $ans1 = $x * (72362614232.0 + $y * (-7895059235.0 + $y * (242396853.1 + $y\n                            * (-2972611.439 + $y * (15704.48260 + $y * (-30.16036606))))));\n            $ans2 = 144725228442.0 + $y * (2300535178.0 + $y * (18583304.74 + $y * (99447.43394 + $y\n                            * (376.9991397 + $y * 1.0))));\n\n            return $ans1 / $ans2;\n        }\n\n        $z = 8.0 / $ax;\n        $y = $z * $z;\n        $xx = $ax - 2.356194491;\n\n        $ans1 = 1.0 + $y * (0.183105e-2 + $y * (-0.3516396496e-4 + $y * (0.2457520174e-5 + $y * (-0.240337019e-6))));\n        $ans2 = 0.04687499995 + $y * (-0.2002690873e-3 + $y * (0.8449199096e-5 + $y\n                    * (-0.88228987e-6 + $y * 0.105787412e-6)));\n        $ans = sqrt(0.636619772 / $ax) * (cos($xx) * $ans1 - $z * sin($xx) * $ans2);\n\n        return ($x < 0.0) ? -$ans : $ans;\n    }\n\n    private static function besselJ2(float $x, int $ord): float\n    {\n        $ax = abs($x);\n        if ($ax === 0.0) {\n            return 0.0;\n        }\n\n        if ($ax > $ord) {\n            return self::besselj2a($ax, $ord, $x);\n        }\n\n        return self::besselj2b($ax, $ord, $x);\n    }\n\n    private static function besselj2a(float $ax, int $ord, float $x): float\n    {\n        $tox = 2.0 / $ax;\n        $bjm = self::besselJ0($ax);\n        $bj = self::besselJ1($ax);\n        for ($j = 1; $j < $ord; ++$j) {\n            $bjp = $j * $tox * $bj - $bjm;\n            $bjm = $bj;\n            $bj = $bjp;\n        }\n        $ans = $bj;\n\n        return ($x < 0.0 && ($ord % 2) == 1) ? -$ans : $ans;\n    }\n\n    private static function besselj2b(float $ax, int $ord, float $x): float\n    {\n        $tox = 2.0 / $ax;\n        $jsum = false;\n        $bjp = $ans = $sum = 0.0;\n        $bj = 1.0;\n        for ($j = 2 * ($ord + (int) sqrt(40.0 * $ord)); $j > 0; --$j) {\n            $bjm = $j * $tox * $bj - $bjp;\n            $bjp = $bj;\n            $bj = $bjm;\n            if (abs($bj) > 1.0e+10) {\n                $bj *= 1.0e-10;\n                $bjp *= 1.0e-10;\n                $ans *= 1.0e-10;\n                $sum *= 1.0e-10;\n            }\n            if ($jsum === true) {\n                $sum += $bj;\n            }\n            $jsum = $jsum === false;\n            if ($j === $ord) {\n                $ans = $bjp;\n            }\n        }\n        $sum = 2.0 * $sum - $bj;\n        $ans /= $sum;\n\n        return ($x < 0.0 && ($ord % 2) === 1) ? -$ans : $ans;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/BesselK.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass BesselK\n{\n    use ArrayEnabled;\n\n    /**\n     * BESSELK.\n     *\n     *    Returns the modified Bessel function Kn(x), which is equivalent to the Bessel functions evaluated\n     *        for purely imaginary arguments.\n     *\n     *    Excel Function:\n     *        BESSELK(x,ord)\n     *\n     * @param mixed $x A float value at which to evaluate the function.\n     *                                If x is nonnumeric, BESSELK returns the #VALUE! error value.\n     *                      Or can be an array of values\n     * @param mixed $ord The integer order of the Bessel function.\n     *                       If ord is not an integer, it is truncated.\n     *                                If $ord is nonnumeric, BESSELK returns the #VALUE! error value.\n     *                       If $ord < 0, BESSELKI returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BESSELK(mixed $x, mixed $ord): array|string|float\n    {\n        if (is_array($x) || is_array($ord)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $x, $ord);\n        }\n\n        try {\n            $x = EngineeringValidations::validateFloat($x);\n            $ord = EngineeringValidations::validateInt($ord);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($ord < 0) || ($x <= 0.0)) {\n            return ExcelError::NAN();\n        }\n\n        $fBk = self::calculate($x, $ord);\n\n        return (is_nan($fBk)) ? ExcelError::NAN() : $fBk;\n    }\n\n    private static function calculate(float $x, int $ord): float\n    {\n        return match ($ord) {\n            0 => self::besselK0($x),\n            1 => self::besselK1($x),\n            default => self::besselK2($x, $ord),\n        };\n    }\n\n    /**\n     * Mollify Phpstan.\n     *\n     * @codeCoverageIgnore\n     */\n    private static function callBesselI(float $x, int $ord): float\n    {\n        $rslt = BesselI::BESSELI($x, $ord);\n        if (!is_float($rslt)) {\n            throw new Exception('Unexpected array or string');\n        }\n\n        return $rslt;\n    }\n\n    private static function besselK0(float $x): float\n    {\n        if ($x <= 2) {\n            $fNum2 = $x * 0.5;\n            $y = ($fNum2 * $fNum2);\n\n            return -log($fNum2) * self::callBesselI($x, 0)\n                + (-0.57721566 + $y * (0.42278420 + $y * (0.23069756 + $y * (0.3488590e-1 + $y * (0.262698e-2 + $y\n                                    * (0.10750e-3 + $y * 0.74e-5))))));\n        }\n\n        $y = 2 / $x;\n\n        return exp(-$x) / sqrt($x)\n            * (1.25331414 + $y * (-0.7832358e-1 + $y * (0.2189568e-1 + $y * (-0.1062446e-1 + $y\n                            * (0.587872e-2 + $y * (-0.251540e-2 + $y * 0.53208e-3))))));\n    }\n\n    private static function besselK1(float $x): float\n    {\n        if ($x <= 2) {\n            $fNum2 = $x * 0.5;\n            $y = ($fNum2 * $fNum2);\n\n            return log($fNum2) * self::callBesselI($x, 1)\n                + (1 + $y * (0.15443144 + $y * (-0.67278579 + $y * (-0.18156897 + $y * (-0.1919402e-1 + $y\n                                    * (-0.110404e-2 + $y * (-0.4686e-4))))))) / $x;\n        }\n\n        $y = 2 / $x;\n\n        return exp(-$x) / sqrt($x)\n            * (1.25331414 + $y * (0.23498619 + $y * (-0.3655620e-1 + $y * (0.1504268e-1 + $y * (-0.780353e-2 + $y\n                                * (0.325614e-2 + $y * (-0.68245e-3)))))));\n    }\n\n    private static function besselK2(float $x, int $ord): float\n    {\n        $fTox = 2 / $x;\n        $fBkm = self::besselK0($x);\n        $fBk = self::besselK1($x);\n        for ($n = 1; $n < $ord; ++$n) {\n            $fBkp = $fBkm + $n * $fTox * $fBk;\n            $fBkm = $fBk;\n            $fBk = $fBkp;\n        }\n\n        return $fBk;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/BesselY.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass BesselY\n{\n    use ArrayEnabled;\n\n    /**\n     * BESSELY.\n     *\n     * Returns the Bessel function, which is also called the Weber function or the Neumann function.\n     *\n     *    Excel Function:\n     *        BESSELY(x,ord)\n     *\n     * @param mixed $x A float value at which to evaluate the function.\n     *                   If x is nonnumeric, BESSELY returns the #VALUE! error value.\n     *                      Or can be an array of values\n     * @param mixed $ord The integer order of the Bessel function.\n     *                       If ord is not an integer, it is truncated.\n     *                       If $ord is nonnumeric, BESSELY returns the #VALUE! error value.\n     *                       If $ord < 0, BESSELY returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BESSELY(mixed $x, mixed $ord): array|string|float\n    {\n        if (is_array($x) || is_array($ord)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $x, $ord);\n        }\n\n        try {\n            $x = EngineeringValidations::validateFloat($x);\n            $ord = EngineeringValidations::validateInt($ord);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($ord < 0) || ($x <= 0.0)) {\n            return ExcelError::NAN();\n        }\n\n        $fBy = self::calculate($x, $ord);\n\n        return (is_nan($fBy)) ? ExcelError::NAN() : $fBy;\n    }\n\n    private static function calculate(float $x, int $ord): float\n    {\n        return match ($ord) {\n            0 => self::besselY0($x),\n            1 => self::besselY1($x),\n            default => self::besselY2($x, $ord),\n        };\n    }\n\n    /**\n     * Mollify Phpstan.\n     *\n     * @codeCoverageIgnore\n     */\n    private static function callBesselJ(float $x, int $ord): float\n    {\n        $rslt = BesselJ::BESSELJ($x, $ord);\n        if (!is_float($rslt)) {\n            throw new Exception('Unexpected array or string');\n        }\n\n        return $rslt;\n    }\n\n    private static function besselY0(float $x): float\n    {\n        if ($x < 8.0) {\n            $y = ($x * $x);\n            $ans1 = -2957821389.0 + $y * (7062834065.0 + $y * (-512359803.6 + $y * (10879881.29 + $y\n                            * (-86327.92757 + $y * 228.4622733))));\n            $ans2 = 40076544269.0 + $y * (745249964.8 + $y * (7189466.438 + $y\n                        * (47447.26470 + $y * (226.1030244 + $y))));\n\n            return $ans1 / $ans2 + 0.636619772 * self::callBesselJ($x, 0) * log($x);\n        }\n\n        $z = 8.0 / $x;\n        $y = ($z * $z);\n        $xx = $x - 0.785398164;\n        $ans1 = 1 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6)));\n        $ans2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y * (0.7621095161e-6 + $y\n                        * (-0.934945152e-7))));\n\n        return sqrt(0.636619772 / $x) * (sin($xx) * $ans1 + $z * cos($xx) * $ans2);\n    }\n\n    private static function besselY1(float $x): float\n    {\n        if ($x < 8.0) {\n            $y = ($x * $x);\n            $ans1 = $x * (-0.4900604943e13 + $y * (0.1275274390e13 + $y * (-0.5153438139e11 + $y\n                            * (0.7349264551e9 + $y * (-0.4237922726e7 + $y * 0.8511937935e4)))));\n            $ans2 = 0.2499580570e14 + $y * (0.4244419664e12 + $y * (0.3733650367e10 + $y * (0.2245904002e8 + $y\n                            * (0.1020426050e6 + $y * (0.3549632885e3 + $y)))));\n\n            return ($ans1 / $ans2) + 0.636619772 * (self::callBesselJ($x, 1) * log($x) - 1 / $x);\n        }\n\n        $z = 8.0 / $x;\n        $y = $z * $z;\n        $xx = $x - 2.356194491;\n        $ans1 = 1.0 + $y * (0.183105e-2 + $y * (-0.3516396496e-4 + $y * (0.2457520174e-5 + $y * (-0.240337019e-6))));\n        $ans2 = 0.04687499995 + $y * (-0.2002690873e-3 + $y * (0.8449199096e-5 + $y\n                    * (-0.88228987e-6 + $y * 0.105787412e-6)));\n\n        return sqrt(0.636619772 / $x) * (sin($xx) * $ans1 + $z * cos($xx) * $ans2);\n    }\n\n    private static function besselY2(float $x, int $ord): float\n    {\n        $fTox = 2.0 / $x;\n        $fBym = self::besselY0($x);\n        $fBy = self::besselY1($x);\n        for ($n = 1; $n < $ord; ++$n) {\n            $fByp = $n * $fTox * $fBy - $fBym;\n            $fBym = $fBy;\n            $fBy = $fByp;\n        }\n\n        return $fBy;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/BitWise.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass BitWise\n{\n    use ArrayEnabled;\n\n    const SPLIT_DIVISOR = 2 ** 24;\n\n    /**\n     * Split a number into upper and lower portions for full 32-bit support.\n     *\n     * @return int[]\n     */\n    private static function splitNumber(float|int $number): array\n    {\n        return [(int) floor($number / self::SPLIT_DIVISOR), (int) fmod($number, self::SPLIT_DIVISOR)];\n    }\n\n    /**\n     * BITAND.\n     *\n     * Returns the bitwise AND of two integer values.\n     *\n     * Excel Function:\n     *        BITAND(number1, number2)\n     *\n     * @param null|array<mixed>|bool|float|int|string $number1 Or can be an array of values\n     * @param null|array<mixed>|bool|float|int|string $number2 Or can be an array of values\n     *\n     * @return array<mixed>|int|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BITAND(null|array|bool|float|int|string $number1, null|array|bool|float|int|string $number2): array|string|int|float\n    {\n        if (is_array($number1) || is_array($number2)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2);\n        }\n\n        try {\n            $number1 = self::validateBitwiseArgument($number1);\n            $number2 = self::validateBitwiseArgument($number2);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n        $split1 = self::splitNumber($number1);\n        $split2 = self::splitNumber($number2);\n\n        return self::SPLIT_DIVISOR * ($split1[0] & $split2[0]) + ($split1[1] & $split2[1]);\n    }\n\n    /**\n     * BITOR.\n     *\n     * Returns the bitwise OR of two integer values.\n     *\n     * Excel Function:\n     *        BITOR(number1, number2)\n     *\n     * @param null|array<mixed>|bool|float|int|string $number1 Or can be an array of values\n     * @param null|array<mixed>|bool|float|int|string $number2 Or can be an array of values\n     *\n     * @return array<mixed>|int|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BITOR(null|array|bool|float|int|string $number1, null|array|bool|float|int|string $number2): array|string|int|float\n    {\n        if (is_array($number1) || is_array($number2)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2);\n        }\n\n        try {\n            $number1 = self::validateBitwiseArgument($number1);\n            $number2 = self::validateBitwiseArgument($number2);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $split1 = self::splitNumber($number1);\n        $split2 = self::splitNumber($number2);\n\n        return self::SPLIT_DIVISOR * ($split1[0] | $split2[0]) + ($split1[1] | $split2[1]);\n    }\n\n    /**\n     * BITXOR.\n     *\n     * Returns the bitwise XOR of two integer values.\n     *\n     * Excel Function:\n     *        BITXOR(number1, number2)\n     *\n     * @param null|array<mixed>|bool|float|int|string $number1 Or can be an array of values\n     * @param null|array<mixed>|bool|float|int|string $number2 Or can be an array of values\n     *\n     * @return array<mixed>|int|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BITXOR(null|array|bool|float|int|string $number1, null|array|bool|float|int|string $number2): array|string|int|float\n    {\n        if (is_array($number1) || is_array($number2)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2);\n        }\n\n        try {\n            $number1 = self::validateBitwiseArgument($number1);\n            $number2 = self::validateBitwiseArgument($number2);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $split1 = self::splitNumber($number1);\n        $split2 = self::splitNumber($number2);\n\n        return self::SPLIT_DIVISOR * ($split1[0] ^ $split2[0]) + ($split1[1] ^ $split2[1]);\n    }\n\n    /**\n     * BITLSHIFT.\n     *\n     * Returns the number value shifted left by shift_amount bits.\n     *\n     * Excel Function:\n     *        BITLSHIFT(number, shift_amount)\n     *\n     * @param null|array<mixed>|bool|float|int|string $number Or can be an array of values\n     * @param null|array<mixed>|bool|float|int|string $shiftAmount Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BITLSHIFT(null|array|bool|float|int|string $number, null|array|bool|float|int|string $shiftAmount): array|string|float\n    {\n        if (is_array($number) || is_array($shiftAmount)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $shiftAmount);\n        }\n\n        try {\n            $number = self::validateBitwiseArgument($number);\n            $shiftAmount = self::validateShiftAmount($shiftAmount);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $result = floor($number * (2 ** $shiftAmount));\n        if ($result > 2 ** 48 - 1) {\n            return ExcelError::NAN();\n        }\n\n        return $result;\n    }\n\n    /**\n     * BITRSHIFT.\n     *\n     * Returns the number value shifted right by shift_amount bits.\n     *\n     * Excel Function:\n     *        BITRSHIFT(number, shift_amount)\n     *\n     * @param null|array<mixed>|bool|float|int|string $number Or can be an array of values\n     * @param null|array<mixed>|bool|float|int|string $shiftAmount Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function BITRSHIFT(null|array|bool|float|int|string $number, null|array|bool|float|int|string $shiftAmount): array|string|float\n    {\n        if (is_array($number) || is_array($shiftAmount)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $shiftAmount);\n        }\n\n        try {\n            $number = self::validateBitwiseArgument($number);\n            $shiftAmount = self::validateShiftAmount($shiftAmount);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $result = floor($number / (2 ** $shiftAmount));\n        if ($result > 2 ** 48 - 1) { // possible because shiftAmount can be negative\n            return ExcelError::NAN();\n        }\n\n        return $result;\n    }\n\n    /**\n     * Validate arguments passed to the bitwise functions.\n     */\n    private static function validateBitwiseArgument(mixed $value): float\n    {\n        $value = self::nullFalseTrueToNumber($value);\n\n        if (is_numeric($value)) {\n            $value = (float) $value;\n            if ($value == floor($value)) {\n                if (($value > 2 ** 48 - 1) || ($value < 0)) {\n                    throw new Exception(ExcelError::NAN());\n                }\n\n                return floor($value);\n            }\n\n            throw new Exception(ExcelError::NAN());\n        }\n\n        throw new Exception(ExcelError::VALUE());\n    }\n\n    /**\n     * Validate arguments passed to the bitwise functions.\n     */\n    private static function validateShiftAmount(mixed $value): int\n    {\n        $value = self::nullFalseTrueToNumber($value);\n\n        if (is_numeric($value)) {\n            if (abs($value + 0) > 53) {\n                throw new Exception(ExcelError::NAN());\n            }\n\n            return (int) $value;\n        }\n\n        throw new Exception(ExcelError::VALUE());\n    }\n\n    /**\n     * Many functions accept null/false/true argument treated as 0/0/1.\n     */\n    private static function nullFalseTrueToNumber(mixed &$number): mixed\n    {\n        if ($number === null) {\n            $number = 0;\n        } elseif (is_bool($number)) {\n            $number = (int) $number;\n        }\n\n        return $number;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/Compare.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Compare\n{\n    use ArrayEnabled;\n\n    /**\n     * DELTA.\n     *\n     *    Excel Function:\n     *        DELTA(a[,b])\n     *\n     *    Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise.\n     *    Use this function to filter a set of values. For example, by summing several DELTA\n     *        functions you calculate the count of equal pairs. This function is also known as the\n     *        Kronecker Delta function.\n     *\n     * @param array<mixed>|bool|float|int|string $a the first number\n     *                      Or can be an array of values\n     * @param array<mixed>|bool|float|int|string $b The second number. If omitted, b is assumed to be zero.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|int|string (string in the event of an error)\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function DELTA(array|float|bool|string|int $a, array|float|bool|string|int $b = 0.0): array|string|int\n    {\n        if (is_array($a) || is_array($b)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $a, $b);\n        }\n\n        try {\n            $a = EngineeringValidations::validateFloat($a);\n            $b = EngineeringValidations::validateFloat($b);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return (int) (abs($a - $b) < 1.0e-15);\n    }\n\n    /**\n     * GESTEP.\n     *\n     *    Excel Function:\n     *        GESTEP(number[,step])\n     *\n     *    Returns 1 if number >= step; returns 0 (zero) otherwise\n     *    Use this function to filter a set of values. For example, by summing several GESTEP\n     *        functions you calculate the count of values that exceed a threshold.\n     *\n     * @param array<mixed>|bool|float|int|string $number the value to test against step\n     *                      Or can be an array of values\n     * @param null|array<mixed>|bool|float|int|string $step The threshold value. If you omit a value for step, GESTEP uses zero.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|int|string (string in the event of an error)\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function GESTEP(array|float|bool|string|int $number, $step = 0.0): array|string|int\n    {\n        if (is_array($number) || is_array($step)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $step);\n        }\n\n        try {\n            $number = EngineeringValidations::validateFloat($number);\n            $step = EngineeringValidations::validateFloat($step ?? 0.0);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return (int) ($number >= $step);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/Complex.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse Complex\\Complex as ComplexObject;\nuse Complex\\Exception as ComplexException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Complex\n{\n    use ArrayEnabled;\n\n    /**\n     * COMPLEX.\n     *\n     * Converts real and imaginary coefficients into a complex number of the form x +/- yi or x +/- yj.\n     *\n     * Excel Function:\n     *        COMPLEX(realNumber,imaginary[,suffix])\n     *\n     * @param mixed $realNumber the real float coefficient of the complex number\n     *                      Or can be an array of values\n     * @param mixed $imaginary the imaginary float coefficient of the complex number\n     *                      Or can be an array of values\n     * @param mixed $suffix The character suffix for the imaginary component of the complex number.\n     *                          If omitted, the suffix is assumed to be \"i\".\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function COMPLEX(mixed $realNumber = 0.0, mixed $imaginary = 0.0, mixed $suffix = 'i'): array|string\n    {\n        if (is_array($realNumber) || is_array($imaginary) || is_array($suffix)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $realNumber, $imaginary, $suffix);\n        }\n\n        $realNumber = $realNumber ?? 0.0;\n        $imaginary = $imaginary ?? 0.0;\n        $suffix = $suffix ?? 'i';\n\n        try {\n            $realNumber = EngineeringValidations::validateFloat($realNumber);\n            $imaginary = EngineeringValidations::validateFloat($imaginary);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($suffix === 'i') || ($suffix === 'j') || ($suffix === '')) {\n            $complex = new ComplexObject($realNumber, $imaginary, $suffix);\n\n            return (string) $complex;\n        }\n\n        return ExcelError::VALUE();\n    }\n\n    /**\n     * IMAGINARY.\n     *\n     * Returns the imaginary coefficient of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMAGINARY(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the imaginary\n     *                                         coefficient\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string (string if an error)\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMAGINARY($complexNumber): array|string|float\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return $complex->getImaginary();\n    }\n\n    /**\n     * IMREAL.\n     *\n     * Returns the real coefficient of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMREAL(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the real coefficient\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string (string if an error)\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMREAL($complexNumber): array|string|float\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return $complex->getReal();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse Complex\\Complex as ComplexObject;\nuse Complex\\Exception as ComplexException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ComplexFunctions\n{\n    use ArrayEnabled;\n\n    /**\n     * IMABS.\n     *\n     * Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMABS(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the absolute value\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMABS(array|string $complexNumber): array|float|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return $complex->abs();\n    }\n\n    /**\n     * IMARGUMENT.\n     *\n     * Returns the argument theta of a complex number, i.e. the angle in radians from the real\n     * axis to the representation of the number in polar coordinates.\n     *\n     * Excel Function:\n     *        IMARGUMENT(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the argument theta\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMARGUMENT(array|string $complexNumber): array|float|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {\n            return ExcelError::DIV0();\n        }\n\n        return $complex->argument();\n    }\n\n    /**\n     * IMCONJUGATE.\n     *\n     * Returns the complex conjugate of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMCONJUGATE(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the conjugate\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMCONJUGATE(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->conjugate();\n    }\n\n    /**\n     * IMCOS.\n     *\n     * Returns the cosine of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMCOS(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the cosine\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMCOS(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->cos();\n    }\n\n    /**\n     * IMCOSH.\n     *\n     * Returns the hyperbolic cosine of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMCOSH(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the hyperbolic cosine\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMCOSH(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->cosh();\n    }\n\n    /**\n     * IMCOT.\n     *\n     * Returns the cotangent of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMCOT(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the cotangent\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMCOT(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->cot();\n    }\n\n    /**\n     * IMCSC.\n     *\n     * Returns the cosecant of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMCSC(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the cosecant\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMCSC(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->csc();\n    }\n\n    /**\n     * IMCSCH.\n     *\n     * Returns the hyperbolic cosecant of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMCSCH(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the hyperbolic cosecant\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMCSCH(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->csch();\n    }\n\n    /**\n     * IMSIN.\n     *\n     * Returns the sine of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMSIN(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the sine\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMSIN(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->sin();\n    }\n\n    /**\n     * IMSINH.\n     *\n     * Returns the hyperbolic sine of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMSINH(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the hyperbolic sine\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMSINH(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->sinh();\n    }\n\n    /**\n     * IMSEC.\n     *\n     * Returns the secant of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMSEC(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the secant\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMSEC(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->sec();\n    }\n\n    /**\n     * IMSECH.\n     *\n     * Returns the hyperbolic secant of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMSECH(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the hyperbolic secant\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMSECH(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->sech();\n    }\n\n    /**\n     * IMTAN.\n     *\n     * Returns the tangent of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMTAN(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the tangent\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMTAN(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->tan();\n    }\n\n    /**\n     * IMSQRT.\n     *\n     * Returns the square root of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMSQRT(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the square root\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMSQRT(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        $theta = self::IMARGUMENT($complexNumber);\n        if ($theta === ExcelError::DIV0()) {\n            return '0';\n        }\n\n        return (string) $complex->sqrt();\n    }\n\n    /**\n     * IMLN.\n     *\n     * Returns the natural logarithm of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMLN(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the natural logarithm\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMLN(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->ln();\n    }\n\n    /**\n     * IMLOG10.\n     *\n     * Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMLOG10(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the common logarithm\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMLOG10(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->log10();\n    }\n\n    /**\n     * IMLOG2.\n     *\n     * Returns the base-2 logarithm of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMLOG2(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the base-2 logarithm\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMLOG2(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->log2();\n    }\n\n    /**\n     * IMEXP.\n     *\n     * Returns the exponential of a complex number in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMEXP(complexNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number for which you want the exponential\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMEXP(array|string $complexNumber): array|string\n    {\n        if (is_array($complexNumber)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $complex->exp();\n    }\n\n    /**\n     * IMPOWER.\n     *\n     * Returns a complex number in x + yi or x + yj text format raised to a power.\n     *\n     * Excel Function:\n     *        IMPOWER(complexNumber,realNumber)\n     *\n     * @param array<mixed>|string $complexNumber the complex number you want to raise to a power\n     *                      Or can be an array of values\n     * @param array<mixed>|float|int|string $realNumber the power to which you want to raise the complex number\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMPOWER(array|string $complexNumber, array|float|int|string $realNumber): array|string\n    {\n        if (is_array($complexNumber) || is_array($realNumber)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $complexNumber, $realNumber);\n        }\n\n        try {\n            $complex = new ComplexObject($complexNumber);\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        if (!is_numeric($realNumber)) {\n            return ExcelError::VALUE();\n        }\n\n        return (string) $complex->pow((float) $realNumber);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse Complex\\Complex as ComplexObject;\nuse Complex\\Exception as ComplexException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ComplexOperations\n{\n    use ArrayEnabled;\n\n    /**\n     * IMDIV.\n     *\n     * Returns the quotient of two complex numbers in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMDIV(complexDividend,complexDivisor)\n     *\n     * @param array<mixed>|string $complexDividend the complex numerator or dividend\n     *                      Or can be an array of values\n     * @param array<mixed>|string $complexDivisor the complex denominator or divisor\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMDIV(array|string $complexDividend, array|string $complexDivisor): array|string\n    {\n        if (is_array($complexDividend) || is_array($complexDivisor)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $complexDividend, $complexDivisor);\n        }\n\n        try {\n            return (string) (new ComplexObject($complexDividend))->divideby(new ComplexObject($complexDivisor));\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n    }\n\n    /**\n     * IMSUB.\n     *\n     * Returns the difference of two complex numbers in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMSUB(complexNumber1,complexNumber2)\n     *\n     * @param array<mixed>|string $complexNumber1 the complex number from which to subtract complexNumber2\n     *                      Or can be an array of values\n     * @param array<mixed>|string $complexNumber2 the complex number to subtract from complexNumber1\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function IMSUB(array|string $complexNumber1, array|string $complexNumber2): array|string\n    {\n        if (is_array($complexNumber1) || is_array($complexNumber2)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $complexNumber1, $complexNumber2);\n        }\n\n        try {\n            return (string) (new ComplexObject($complexNumber1))->subtract(new ComplexObject($complexNumber2));\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n    }\n\n    /**\n     * IMSUM.\n     *\n     * Returns the sum of two or more complex numbers in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMSUM(complexNumber[,complexNumber[,...]])\n     *\n     * @param string ...$complexNumbers Series of complex numbers to add\n     */\n    public static function IMSUM(...$complexNumbers): string\n    {\n        // Return value\n        $returnValue = new ComplexObject(0.0);\n        $aArgs = Functions::flattenArray($complexNumbers);\n\n        try {\n            // Loop through the arguments\n            foreach ($aArgs as $complex) {\n                $returnValue = $returnValue->add(new ComplexObject($complex));\n            }\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $returnValue;\n    }\n\n    /**\n     * IMPRODUCT.\n     *\n     * Returns the product of two or more complex numbers in x + yi or x + yj text format.\n     *\n     * Excel Function:\n     *        IMPRODUCT(complexNumber[,complexNumber[,...]])\n     *\n     * @param string ...$complexNumbers Series of complex numbers to multiply\n     */\n    public static function IMPRODUCT(...$complexNumbers): string\n    {\n        // Return value\n        $returnValue = new ComplexObject(1.0);\n        $aArgs = Functions::flattenArray($complexNumbers);\n\n        try {\n            // Loop through the arguments\n            foreach ($aArgs as $complex) {\n                $returnValue = $returnValue->multiply(new ComplexObject($complex));\n            }\n        } catch (ComplexException) {\n            return ExcelError::NAN();\n        }\n\n        return (string) $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/Constants.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nclass Constants\n{\n    /**\n     * EULER.\n     */\n    public const EULER = 2.71828182845904523536;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ConvertBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nabstract class ConvertBase\n{\n    use ArrayEnabled;\n\n    protected static function validateValue(mixed $value): string\n    {\n        if (is_bool($value)) {\n            if (Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_OPENOFFICE) {\n                throw new Exception(ExcelError::VALUE());\n            }\n            $value = (int) $value;\n        }\n\n        if (is_numeric($value)) {\n            if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {\n                $value = floor((float) $value);\n            }\n        }\n\n        return strtoupper(StringHelper::convertToString($value));\n    }\n\n    protected static function validatePlaces(mixed $places = null): ?int\n    {\n        if ($places === null) {\n            return $places;\n        }\n\n        if (is_numeric($places)) {\n            if ($places < 0 || $places > 10) {\n                throw new Exception(ExcelError::NAN());\n            }\n\n            return (int) $places;\n        }\n\n        throw new Exception(ExcelError::VALUE());\n    }\n\n    /**\n     * Formats a number base string value with leading zeroes.\n     *\n     * @param string $value The \"number\" to pad\n     * @param ?int $places The length that we want to pad this value\n     *\n     * @return string The padded \"number\"\n     */\n    protected static function nbrConversionFormat(string $value, ?int $places): string\n    {\n        if ($places !== null) {\n            if (strlen($value) <= $places) {\n                return substr(str_pad($value, $places, '0', STR_PAD_LEFT), -10);\n            }\n\n            return ExcelError::NAN();\n        }\n\n        return substr($value, -10);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ConvertBinary extends ConvertBase\n{\n    /**\n     * toDecimal.\n     *\n     * Return a binary value as decimal.\n     *\n     * Excel Function:\n     *        BIN2DEC(x)\n     *\n     * @param array<mixed>|bool|float|int|string $value The binary number (as a string) that you want to convert. The number\n     *                                cannot contain more than 10 characters (10 bits). The most significant\n     *                                bit of number is the sign bit. The remaining 9 bits are magnitude bits.\n     *                                Negative numbers are represented using two's-complement notation.\n     *                                If number is not a valid binary number, or if number contains more than\n     *                                10 characters (10 bits), BIN2DEC returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toDecimal($value)\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateBinary($value);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (strlen($value) == 10 && $value[0] === '1') {\n            //    Two's Complement\n            $value = substr($value, -9);\n\n            return -(512 - bindec($value));\n        }\n\n        return bindec($value);\n    }\n\n    /**\n     * toHex.\n     *\n     * Return a binary value as hex.\n     *\n     * Excel Function:\n     *        BIN2HEX(x[,places])\n     *\n     * @param array<mixed>|bool|float|int|string $value The binary number (as a string) that you want to convert. The number\n     *                                cannot contain more than 10 characters (10 bits). The most significant\n     *                                bit of number is the sign bit. The remaining 9 bits are magnitude bits.\n     *                                Negative numbers are represented using two's-complement notation.\n     *                                If number is not a valid binary number, or if number contains more than\n     *                                10 characters (10 bits), BIN2HEX returns the #NUM! error value.\n     *                      Or can be an array of values\n     * @param null|array<mixed>|float|int|string $places The number of characters to use. If places is omitted, BIN2HEX uses the\n     *                                minimum number of characters necessary. Places is useful for padding the\n     *                                return value with leading 0s (zeros).\n     *                                If places is not an integer, it is truncated.\n     *                                If places is nonnumeric, BIN2HEX returns the #VALUE! error value.\n     *                                If places is negative, BIN2HEX returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toHex($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateBinary($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (strlen($value) == 10 && $value[0] === '1') {\n            $high2 = substr($value, 0, 2);\n            $low8 = substr($value, 2);\n            $xarr = ['00' => '00000000', '01' => '00000001', '10' => 'FFFFFFFE', '11' => 'FFFFFFFF'];\n\n            return $xarr[$high2] . strtoupper(substr('0' . dechex((int) bindec($low8)), -2));\n        }\n        $hexVal = (string) strtoupper(dechex((int) bindec($value)));\n\n        return self::nbrConversionFormat($hexVal, $places);\n    }\n\n    /**\n     * toOctal.\n     *\n     * Return a binary value as octal.\n     *\n     * Excel Function:\n     *        BIN2OCT(x[,places])\n     *\n     * @param array<mixed>|bool|float|int|string $value The binary number (as a string) that you want to convert. The number\n     *                                cannot contain more than 10 characters (10 bits). The most significant\n     *                                bit of number is the sign bit. The remaining 9 bits are magnitude bits.\n     *                                Negative numbers are represented using two's-complement notation.\n     *                                If number is not a valid binary number, or if number contains more than\n     *                                10 characters (10 bits), BIN2OCT returns the #NUM! error value.\n     *                      Or can be an array of values\n     * @param null|array<mixed>|float|int|string $places The number of characters to use. If places is omitted, BIN2OCT uses the\n     *                                minimum number of characters necessary. Places is useful for padding the\n     *                                return value with leading 0s (zeros).\n     *                                If places is not an integer, it is truncated.\n     *                                If places is nonnumeric, BIN2OCT returns the #VALUE! error value.\n     *                                If places is negative, BIN2OCT returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toOctal($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateBinary($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (strlen($value) == 10 && $value[0] === '1') { //    Two's Complement\n            return str_repeat('7', 6) . strtoupper(decoct((int) bindec(\"11$value\")));\n        }\n        $octVal = (string) decoct((int) bindec($value));\n\n        return self::nbrConversionFormat($octVal, $places);\n    }\n\n    protected static function validateBinary(string $value): string\n    {\n        if ((strlen($value) > preg_match_all('/[01]/', $value)) || (strlen($value) > 10)) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ConvertDecimal extends ConvertBase\n{\n    const LARGEST_OCTAL_IN_DECIMAL = 536870911;\n    const SMALLEST_OCTAL_IN_DECIMAL = -536870912;\n    const LARGEST_BINARY_IN_DECIMAL = 511;\n    const SMALLEST_BINARY_IN_DECIMAL = -512;\n    const LARGEST_HEX_IN_DECIMAL = 549755813887;\n    const SMALLEST_HEX_IN_DECIMAL = -549755813888;\n\n    /**\n     * toBinary.\n     *\n     * Return a decimal value as binary.\n     *\n     * Excel Function:\n     *        DEC2BIN(x[,places])\n     *\n     * @param array<mixed>|bool|float|int|string $value The decimal integer you want to convert. If number is negative,\n     *                          valid place values are ignored and DEC2BIN returns a 10-character\n     *                          (10-bit) binary number in which the most significant bit is the sign\n     *                          bit. The remaining 9 bits are magnitude bits. Negative numbers are\n     *                          represented using two's-complement notation.\n     *                      If number < -512 or if number > 511, DEC2BIN returns the #NUM! error\n     *                          value.\n     *                      If number is nonnumeric, DEC2BIN returns the #VALUE! error value.\n     *                      If DEC2BIN requires more than places characters, it returns the #NUM!\n     *                          error value.\n     *                      Or can be an array of values\n     * @param null|array<mixed>|float|int|string $places The number of characters to use. If places is omitted, DEC2BIN uses\n     *                          the minimum number of characters necessary. Places is useful for\n     *                          padding the return value with leading 0s (zeros).\n     *                      If places is not an integer, it is truncated.\n     *                      If places is nonnumeric, DEC2BIN returns the #VALUE! error value.\n     *                      If places is zero or negative, DEC2BIN returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toBinary($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateDecimal($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $value = (int) floor((float) $value);\n        if ($value > self::LARGEST_BINARY_IN_DECIMAL || $value < self::SMALLEST_BINARY_IN_DECIMAL) {\n            return ExcelError::NAN();\n        }\n\n        $r = decbin($value);\n        // Two's Complement\n        $r = substr($r, -10);\n\n        return self::nbrConversionFormat($r, $places);\n    }\n\n    /**\n     * toHex.\n     *\n     * Return a decimal value as hex.\n     *\n     * Excel Function:\n     *        DEC2HEX(x[,places])\n     *\n     * @param array<mixed>|bool|float|int|string $value The decimal integer you want to convert. If number is negative,\n     *                          places is ignored and DEC2HEX returns a 10-character (40-bit)\n     *                          hexadecimal number in which the most significant bit is the sign\n     *                          bit. The remaining 39 bits are magnitude bits. Negative numbers\n     *                          are represented using two's-complement notation.\n     *                      If number < -549,755,813,888 or if number > 549,755,813,887,\n     *                          DEC2HEX returns the #NUM! error value.\n     *                      If number is nonnumeric, DEC2HEX returns the #VALUE! error value.\n     *                      If DEC2HEX requires more than places characters, it returns the\n     *                          #NUM! error value.\n     *                      Or can be an array of values\n     * @param null|array<mixed>|float|int|string $places The number of characters to use. If places is omitted, DEC2HEX uses\n     *                          the minimum number of characters necessary. Places is useful for\n     *                          padding the return value with leading 0s (zeros).\n     *                      If places is not an integer, it is truncated.\n     *                      If places is nonnumeric, DEC2HEX returns the #VALUE! error value.\n     *                      If places is zero or negative, DEC2HEX returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toHex($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateDecimal($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $value = floor((float) $value);\n        if ($value > self::LARGEST_HEX_IN_DECIMAL || $value < self::SMALLEST_HEX_IN_DECIMAL) {\n            return ExcelError::NAN();\n        }\n        $r = strtoupper(dechex((int) $value));\n        $r = self::hex32bit($value, $r);\n\n        return self::nbrConversionFormat($r, $places);\n    }\n\n    public static function hex32bit(float $value, string $hexstr, bool $force = false): string\n    {\n        if (PHP_INT_SIZE === 4 || $force) {\n            if ($value >= 2 ** 32) {\n                $quotient = (int) ($value / (2 ** 32));\n\n                return strtoupper(substr('0' . dechex($quotient), -2) . $hexstr);\n            }\n            if ($value < -(2 ** 32)) {\n                $quotient = 256 - (int) ceil((-$value) / (2 ** 32));\n\n                return strtoupper(substr('0' . dechex($quotient), -2) . substr(\"00000000$hexstr\", -8));\n            }\n            if ($value < 0) {\n                return \"FF$hexstr\";\n            }\n        }\n\n        return $hexstr;\n    }\n\n    /**\n     * toOctal.\n     *\n     * Return a decimal value as octal.\n     *\n     * Excel Function:\n     *        DEC2OCT(x[,places])\n     *\n     * @param array<mixed>|bool|float|int|string $value The decimal integer you want to convert. If number is negative,\n     *                          places is ignored and DEC2OCT returns a 10-character (30-bit)\n     *                          octal number in which the most significant bit is the sign bit.\n     *                          The remaining 29 bits are magnitude bits. Negative numbers are\n     *                          represented using two's-complement notation.\n     *                      If number < -536,870,912 or if number > 536,870,911, DEC2OCT\n     *                          returns the #NUM! error value.\n     *                      If number is nonnumeric, DEC2OCT returns the #VALUE! error value.\n     *                      If DEC2OCT requires more than places characters, it returns the\n     *                          #NUM! error value.\n     *                      Or can be an array of values\n     * @param array<mixed>|int $places The number of characters to use. If places is omitted, DEC2OCT uses\n     *                          the minimum number of characters necessary. Places is useful for\n     *                          padding the return value with leading 0s (zeros).\n     *                      If places is not an integer, it is truncated.\n     *                      If places is nonnumeric, DEC2OCT returns the #VALUE! error value.\n     *                      If places is zero or negative, DEC2OCT returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toOctal($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateDecimal($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $value = (int) floor((float) $value);\n        if ($value > self::LARGEST_OCTAL_IN_DECIMAL || $value < self::SMALLEST_OCTAL_IN_DECIMAL) {\n            return ExcelError::NAN();\n        }\n        $r = decoct($value);\n        $r = substr($r, -10);\n\n        return self::nbrConversionFormat($r, $places);\n    }\n\n    protected static function validateDecimal(string $value): string\n    {\n        if (strlen($value) > preg_match_all('/[-0123456789.]/', $value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ConvertHex extends ConvertBase\n{\n    /**\n     * toBinary.\n     *\n     * Return a hex value as binary.\n     *\n     * Excel Function:\n     *        HEX2BIN(x[,places])\n     *\n     * @param array<mixed>|bool|float|string $value The hexadecimal number you want to convert.\n     *                      Number cannot contain more than 10 characters.\n     *                      The most significant bit of number is the sign bit (40th bit from the right).\n     *                      The remaining 9 bits are magnitude bits.\n     *                      Negative numbers are represented using two's-complement notation.\n     *                      If number is negative, HEX2BIN ignores places and returns a 10-character binary number.\n     *                      If number is negative, it cannot be less than FFFFFFFE00,\n     *                          and if number is positive, it cannot be greater than 1FF.\n     *                      If number is not a valid hexadecimal number, HEX2BIN returns the #NUM! error value.\n     *                      If HEX2BIN requires more than places characters, it returns the #NUM! error value.\n     *                      Or can be an array of values\n     * @param array<mixed>|int $places The number of characters to use. If places is omitted,\n     *                          HEX2BIN uses the minimum number of characters necessary. Places\n     *                          is useful for padding the return value with leading 0s (zeros).\n     *                      If places is not an integer, it is truncated.\n     *                      If places is nonnumeric, HEX2BIN returns the #VALUE! error value.\n     *                      If places is negative, HEX2BIN returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toBinary($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateHex($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $dec = self::toDecimal($value);\n\n        return ConvertDecimal::toBinary($dec, $places);\n    }\n\n    /**\n     * toDecimal.\n     *\n     * Return a hex value as decimal.\n     *\n     * Excel Function:\n     *        HEX2DEC(x)\n     *\n     * @param array<mixed>|bool|float|int|string $value The hexadecimal number you want to convert. This number cannot\n     *                          contain more than 10 characters (40 bits). The most significant\n     *                          bit of number is the sign bit. The remaining 39 bits are magnitude\n     *                          bits. Negative numbers are represented using two's-complement\n     *                          notation.\n     *                      If number is not a valid hexadecimal number, HEX2DEC returns the\n     *                          #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toDecimal($value)\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateHex($value);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (strlen($value) > 10) {\n            return ExcelError::NAN();\n        }\n\n        $binX = '';\n        foreach (mb_str_split($value, 1, 'UTF-8') as $char) {\n            $binX .= str_pad(base_convert($char, 16, 2), 4, '0', STR_PAD_LEFT);\n        }\n        if (strlen($binX) == 40 && $binX[0] == '1') {\n            for ($i = 0; $i < 40; ++$i) {\n                $binX[$i] = ($binX[$i] == '1' ? '0' : '1');\n            }\n\n            return (bindec($binX) + 1) * -1;\n        }\n\n        return bindec($binX);\n    }\n\n    /**\n     * toOctal.\n     *\n     * Return a hex value as octal.\n     *\n     * Excel Function:\n     *        HEX2OCT(x[,places])\n     *\n     * @param array<mixed>|bool|float|int|string $value The hexadecimal number you want to convert. Number cannot\n     *                                    contain more than 10 characters. The most significant bit of\n     *                                    number is the sign bit. The remaining 39 bits are magnitude\n     *                                    bits. Negative numbers are represented using two's-complement\n     *                                    notation.\n     *                                    If number is negative, HEX2OCT ignores places and returns a\n     *                                    10-character octal number.\n     *                                    If number is negative, it cannot be less than FFE0000000, and\n     *                                    if number is positive, it cannot be greater than 1FFFFFFF.\n     *                                    If number is not a valid hexadecimal number, HEX2OCT returns\n     *                                    the #NUM! error value.\n     *                                    If HEX2OCT requires more than places characters, it returns\n     *                                    the #NUM! error value.\n     *                      Or can be an array of values\n     * @param array<mixed>|int $places The number of characters to use. If places is omitted, HEX2OCT\n     *                                    uses the minimum number of characters necessary. Places is\n     *                                    useful for padding the return value with leading 0s (zeros).\n     *                                    If places is not an integer, it is truncated.\n     *                                    If places is nonnumeric, HEX2OCT returns the #VALUE! error\n     *                                    value.\n     *                                    If places is negative, HEX2OCT returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toOctal($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateHex($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $decimal = self::toDecimal($value);\n\n        return ConvertDecimal::toOctal($decimal, $places);\n    }\n\n    protected static function validateHex(string $value): string\n    {\n        if (strlen($value) > preg_match_all('/[0123456789ABCDEF]/', $value)) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ConvertOctal extends ConvertBase\n{\n    /**\n     * toBinary.\n     *\n     * Return an octal value as binary.\n     *\n     * Excel Function:\n     *        OCT2BIN(x[,places])\n     *\n     * @param array<mixed>|bool|float|int|string $value The octal number you want to convert. Number may not\n     *                          contain more than 10 characters. The most significant\n     *                          bit of number is the sign bit. The remaining 29 bits\n     *                          are magnitude bits. Negative numbers are represented\n     *                          using two's-complement notation.\n     *                      If number is negative, OCT2BIN ignores places and returns\n     *                          a 10-character binary number.\n     *                      If number is negative, it cannot be less than 7777777000,\n     *                          and if number is positive, it cannot be greater than 777.\n     *                      If number is not a valid octal number, OCT2BIN returns\n     *                          the #NUM! error value.\n     *                      If OCT2BIN requires more than places characters, it\n     *                          returns the #NUM! error value.\n     *                      Or can be an array of values\n     * @param array<mixed>|int $places The number of characters to use. If places is omitted,\n     *                          OCT2BIN uses the minimum number of characters necessary.\n     *                          Places is useful for padding the return value with\n     *                          leading 0s (zeros).\n     *                      If places is not an integer, it is truncated.\n     *                      If places is nonnumeric, OCT2BIN returns the #VALUE!\n     *                          error value.\n     *                      If places is negative, OCT2BIN returns the #NUM! error\n     *                          value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toBinary($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateOctal($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return ConvertDecimal::toBinary(self::toDecimal($value), $places);\n    }\n\n    /**\n     * toDecimal.\n     *\n     * Return an octal value as decimal.\n     *\n     * Excel Function:\n     *        OCT2DEC(x)\n     *\n     * @param array<mixed>|bool|float|int|string $value The octal number you want to convert. Number may not contain\n     *                          more than 10 octal characters (30 bits). The most significant\n     *                          bit of number is the sign bit. The remaining 29 bits are\n     *                          magnitude bits. Negative numbers are represented using\n     *                          two's-complement notation.\n     *                      If number is not a valid octal number, OCT2DEC returns the\n     *                          #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toDecimal($value)\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateOctal($value);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $binX = '';\n        foreach (mb_str_split($value, 1, 'UTF-8') as $char) {\n            $binX .= str_pad(decbin((int) $char), 3, '0', STR_PAD_LEFT);\n        }\n        if (strlen($binX) == 30 && $binX[0] == '1') {\n            for ($i = 0; $i < 30; ++$i) {\n                $binX[$i] = ($binX[$i] == '1' ? '0' : '1');\n            }\n\n            return (bindec($binX) + 1) * -1;\n        }\n\n        return bindec($binX);\n    }\n\n    /**\n     * toHex.\n     *\n     * Return an octal value as hex.\n     *\n     * Excel Function:\n     *        OCT2HEX(x[,places])\n     *\n     * @param array<mixed>|bool|float|int|string $value The octal number you want to convert. Number may not contain\n     *                          more than 10 octal characters (30 bits). The most significant\n     *                          bit of number is the sign bit. The remaining 29 bits are\n     *                          magnitude bits. Negative numbers are represented using\n     *                          two's-complement notation.\n     *                      If number is negative, OCT2HEX ignores places and returns a\n     *                          10-character hexadecimal number.\n     *                      If number is not a valid octal number, OCT2HEX returns the\n     *                          #NUM! error value.\n     *                      If OCT2HEX requires more than places characters, it returns\n     *                          the #NUM! error value.\n     *                      Or can be an array of values\n     * @param array<mixed>|int $places The number of characters to use. If places is omitted, OCT2HEX\n     *                          uses the minimum number of characters necessary. Places is useful\n     *                          for padding the return value with leading 0s (zeros).\n     *                      If places is not an integer, it is truncated.\n     *                      If places is nonnumeric, OCT2HEX returns the #VALUE! error value.\n     *                      If places is negative, OCT2HEX returns the #NUM! error value.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string Result, or an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toHex($value, $places = null): array|string\n    {\n        if (is_array($value) || is_array($places)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $places);\n        }\n\n        try {\n            $value = self::validateValue($value);\n            $value = self::validateOctal($value);\n            $places = self::validatePlaces($places);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $hexVal = strtoupper(dechex((int) self::toDecimal($value)));\n        $hexVal = (PHP_INT_SIZE === 4 && strlen($value) === 10 && $value[0] >= '4') ? \"FF{$hexVal}\" : $hexVal;\n\n        return self::nbrConversionFormat($hexVal, $places);\n    }\n\n    protected static function validateOctal(string $value): string\n    {\n        $numDigits = (int) preg_match_all('/[01234567]/', $value);\n        if (strlen($value) > $numDigits || $numDigits > 10) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ConvertUOM\n{\n    use ArrayEnabled;\n\n    public const CATEGORY_WEIGHT_AND_MASS = 'Weight and Mass';\n    public const CATEGORY_DISTANCE = 'Distance';\n    public const CATEGORY_TIME = 'Time';\n    public const CATEGORY_PRESSURE = 'Pressure';\n    public const CATEGORY_FORCE = 'Force';\n    public const CATEGORY_ENERGY = 'Energy';\n    public const CATEGORY_POWER = 'Power';\n    public const CATEGORY_MAGNETISM = 'Magnetism';\n    public const CATEGORY_TEMPERATURE = 'Temperature';\n    public const CATEGORY_VOLUME = 'Volume and Liquid Measure';\n    public const CATEGORY_AREA = 'Area';\n    public const CATEGORY_INFORMATION = 'Information';\n    public const CATEGORY_SPEED = 'Speed';\n\n    /**\n     * Details of the Units of measure that can be used in CONVERTUOM().\n     *\n     * @var array<string, array{Group: string, UnitName: string, AllowPrefix: bool}>\n     */\n    private static array $conversionUnits = [\n        // Weight and Mass\n        'g' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Gram', 'AllowPrefix' => true],\n        'sg' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Slug', 'AllowPrefix' => false],\n        'lbm' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Pound mass (avoirdupois)', 'AllowPrefix' => false],\n        'u' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'U (atomic mass unit)', 'AllowPrefix' => true],\n        'ozm' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Ounce mass (avoirdupois)', 'AllowPrefix' => false],\n        'grain' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Grain', 'AllowPrefix' => false],\n        'cwt' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'U.S. (short) hundredweight', 'AllowPrefix' => false],\n        'shweight' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'U.S. (short) hundredweight', 'AllowPrefix' => false],\n        'uk_cwt' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Imperial hundredweight', 'AllowPrefix' => false],\n        'lcwt' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Imperial hundredweight', 'AllowPrefix' => false],\n        'hweight' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Imperial hundredweight', 'AllowPrefix' => false],\n        'stone' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Stone', 'AllowPrefix' => false],\n        'ton' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Ton', 'AllowPrefix' => false],\n        'uk_ton' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Imperial ton', 'AllowPrefix' => false],\n        'LTON' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Imperial ton', 'AllowPrefix' => false],\n        'brton' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'UnitName' => 'Imperial ton', 'AllowPrefix' => false],\n        // Distance\n        'm' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Meter', 'AllowPrefix' => true],\n        'mi' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Statute mile', 'AllowPrefix' => false],\n        'Nmi' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Nautical mile', 'AllowPrefix' => false],\n        'in' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Inch', 'AllowPrefix' => false],\n        'ft' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Foot', 'AllowPrefix' => false],\n        'yd' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Yard', 'AllowPrefix' => false],\n        'ang' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Angstrom', 'AllowPrefix' => true],\n        'ell' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Ell', 'AllowPrefix' => false],\n        'ly' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Light Year', 'AllowPrefix' => false],\n        'parsec' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Parsec', 'AllowPrefix' => false],\n        'pc' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Parsec', 'AllowPrefix' => false],\n        'Pica' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Pica (1/72 in)', 'AllowPrefix' => false],\n        'Picapt' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Pica (1/72 in)', 'AllowPrefix' => false],\n        'pica' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'Pica (1/6 in)', 'AllowPrefix' => false],\n        'survey_mi' => ['Group' => self::CATEGORY_DISTANCE, 'UnitName' => 'U.S survey mile (statute mile)', 'AllowPrefix' => false],\n        // Time\n        'yr' => ['Group' => self::CATEGORY_TIME, 'UnitName' => 'Year', 'AllowPrefix' => false],\n        'day' => ['Group' => self::CATEGORY_TIME, 'UnitName' => 'Day', 'AllowPrefix' => false],\n        'd' => ['Group' => self::CATEGORY_TIME, 'UnitName' => 'Day', 'AllowPrefix' => false],\n        'hr' => ['Group' => self::CATEGORY_TIME, 'UnitName' => 'Hour', 'AllowPrefix' => false],\n        'mn' => ['Group' => self::CATEGORY_TIME, 'UnitName' => 'Minute', 'AllowPrefix' => false],\n        'min' => ['Group' => self::CATEGORY_TIME, 'UnitName' => 'Minute', 'AllowPrefix' => false],\n        'sec' => ['Group' => self::CATEGORY_TIME, 'UnitName' => 'Second', 'AllowPrefix' => true],\n        's' => ['Group' => self::CATEGORY_TIME, 'UnitName' => 'Second', 'AllowPrefix' => true],\n        // Pressure\n        'Pa' => ['Group' => self::CATEGORY_PRESSURE, 'UnitName' => 'Pascal', 'AllowPrefix' => true],\n        'p' => ['Group' => self::CATEGORY_PRESSURE, 'UnitName' => 'Pascal', 'AllowPrefix' => true],\n        'atm' => ['Group' => self::CATEGORY_PRESSURE, 'UnitName' => 'Atmosphere', 'AllowPrefix' => true],\n        'at' => ['Group' => self::CATEGORY_PRESSURE, 'UnitName' => 'Atmosphere', 'AllowPrefix' => true],\n        'mmHg' => ['Group' => self::CATEGORY_PRESSURE, 'UnitName' => 'mm of Mercury', 'AllowPrefix' => true],\n        'psi' => ['Group' => self::CATEGORY_PRESSURE, 'UnitName' => 'PSI', 'AllowPrefix' => true],\n        'Torr' => ['Group' => self::CATEGORY_PRESSURE, 'UnitName' => 'Torr', 'AllowPrefix' => true],\n        // Force\n        'N' => ['Group' => self::CATEGORY_FORCE, 'UnitName' => 'Newton', 'AllowPrefix' => true],\n        'dyn' => ['Group' => self::CATEGORY_FORCE, 'UnitName' => 'Dyne', 'AllowPrefix' => true],\n        'dy' => ['Group' => self::CATEGORY_FORCE, 'UnitName' => 'Dyne', 'AllowPrefix' => true],\n        'lbf' => ['Group' => self::CATEGORY_FORCE, 'UnitName' => 'Pound force', 'AllowPrefix' => false],\n        'pond' => ['Group' => self::CATEGORY_FORCE, 'UnitName' => 'Pond', 'AllowPrefix' => true],\n        // Energy\n        'J' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Joule', 'AllowPrefix' => true],\n        'e' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Erg', 'AllowPrefix' => true],\n        'c' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Thermodynamic calorie', 'AllowPrefix' => true],\n        'cal' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'IT calorie', 'AllowPrefix' => true],\n        'eV' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Electron volt', 'AllowPrefix' => true],\n        'ev' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Electron volt', 'AllowPrefix' => true],\n        'HPh' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Horsepower-hour', 'AllowPrefix' => false],\n        'hh' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Horsepower-hour', 'AllowPrefix' => false],\n        'Wh' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Watt-hour', 'AllowPrefix' => true],\n        'wh' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Watt-hour', 'AllowPrefix' => true],\n        'flb' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'Foot-pound', 'AllowPrefix' => false],\n        'BTU' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'BTU', 'AllowPrefix' => false],\n        'btu' => ['Group' => self::CATEGORY_ENERGY, 'UnitName' => 'BTU', 'AllowPrefix' => false],\n        // Power\n        'HP' => ['Group' => self::CATEGORY_POWER, 'UnitName' => 'Horsepower', 'AllowPrefix' => false],\n        'h' => ['Group' => self::CATEGORY_POWER, 'UnitName' => 'Horsepower', 'AllowPrefix' => false],\n        'W' => ['Group' => self::CATEGORY_POWER, 'UnitName' => 'Watt', 'AllowPrefix' => true],\n        'w' => ['Group' => self::CATEGORY_POWER, 'UnitName' => 'Watt', 'AllowPrefix' => true],\n        'PS' => ['Group' => self::CATEGORY_POWER, 'UnitName' => 'Pferdestärke', 'AllowPrefix' => false],\n        // Magnetism\n        'T' => ['Group' => self::CATEGORY_MAGNETISM, 'UnitName' => 'Tesla', 'AllowPrefix' => true],\n        'ga' => ['Group' => self::CATEGORY_MAGNETISM, 'UnitName' => 'Gauss', 'AllowPrefix' => true],\n        // Temperature\n        'C' => ['Group' => self::CATEGORY_TEMPERATURE, 'UnitName' => 'Degrees Celsius', 'AllowPrefix' => false],\n        'cel' => ['Group' => self::CATEGORY_TEMPERATURE, 'UnitName' => 'Degrees Celsius', 'AllowPrefix' => false],\n        'F' => ['Group' => self::CATEGORY_TEMPERATURE, 'UnitName' => 'Degrees Fahrenheit', 'AllowPrefix' => false],\n        'fah' => ['Group' => self::CATEGORY_TEMPERATURE, 'UnitName' => 'Degrees Fahrenheit', 'AllowPrefix' => false],\n        'K' => ['Group' => self::CATEGORY_TEMPERATURE, 'UnitName' => 'Kelvin', 'AllowPrefix' => false],\n        'kel' => ['Group' => self::CATEGORY_TEMPERATURE, 'UnitName' => 'Kelvin', 'AllowPrefix' => false],\n        'Rank' => ['Group' => self::CATEGORY_TEMPERATURE, 'UnitName' => 'Degrees Rankine', 'AllowPrefix' => false],\n        'Reau' => ['Group' => self::CATEGORY_TEMPERATURE, 'UnitName' => 'Degrees Réaumur', 'AllowPrefix' => false],\n        // Volume\n        'l' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Litre', 'AllowPrefix' => true],\n        'L' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Litre', 'AllowPrefix' => true],\n        'lt' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Litre', 'AllowPrefix' => true],\n        'tsp' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Teaspoon', 'AllowPrefix' => false],\n        'tspm' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Modern Teaspoon', 'AllowPrefix' => false],\n        'tbs' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Tablespoon', 'AllowPrefix' => false],\n        'oz' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Fluid Ounce', 'AllowPrefix' => false],\n        'cup' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cup', 'AllowPrefix' => false],\n        'pt' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'U.S. Pint', 'AllowPrefix' => false],\n        'us_pt' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'U.S. Pint', 'AllowPrefix' => false],\n        'uk_pt' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'U.K. Pint', 'AllowPrefix' => false],\n        'qt' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Quart', 'AllowPrefix' => false],\n        'uk_qt' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Imperial Quart (UK)', 'AllowPrefix' => false],\n        'gal' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Gallon', 'AllowPrefix' => false],\n        'uk_gal' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Imperial Gallon (UK)', 'AllowPrefix' => false],\n        'ang3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Angstrom', 'AllowPrefix' => true],\n        'ang^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Angstrom', 'AllowPrefix' => true],\n        'barrel' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'US Oil Barrel', 'AllowPrefix' => false],\n        'bushel' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'US Bushel', 'AllowPrefix' => false],\n        'in3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Inch', 'AllowPrefix' => false],\n        'in^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Inch', 'AllowPrefix' => false],\n        'ft3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Foot', 'AllowPrefix' => false],\n        'ft^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Foot', 'AllowPrefix' => false],\n        'ly3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Light Year', 'AllowPrefix' => false],\n        'ly^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Light Year', 'AllowPrefix' => false],\n        'm3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Meter', 'AllowPrefix' => true],\n        'm^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Meter', 'AllowPrefix' => true],\n        'mi3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Mile', 'AllowPrefix' => false],\n        'mi^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Mile', 'AllowPrefix' => false],\n        'yd3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Yard', 'AllowPrefix' => false],\n        'yd^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Yard', 'AllowPrefix' => false],\n        'Nmi3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Nautical Mile', 'AllowPrefix' => false],\n        'Nmi^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Nautical Mile', 'AllowPrefix' => false],\n        'Pica3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Pica', 'AllowPrefix' => false],\n        'Pica^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Pica', 'AllowPrefix' => false],\n        'Picapt3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Pica', 'AllowPrefix' => false],\n        'Picapt^3' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Cubic Pica', 'AllowPrefix' => false],\n        'GRT' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Gross Registered Ton', 'AllowPrefix' => false],\n        'regton' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Gross Registered Ton', 'AllowPrefix' => false],\n        'MTON' => ['Group' => self::CATEGORY_VOLUME, 'UnitName' => 'Measurement Ton (Freight Ton)', 'AllowPrefix' => false],\n        // Area\n        'ha' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Hectare', 'AllowPrefix' => true],\n        'uk_acre' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'International Acre', 'AllowPrefix' => false],\n        'us_acre' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'US Survey/Statute Acre', 'AllowPrefix' => false],\n        'ang2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Angstrom', 'AllowPrefix' => true],\n        'ang^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Angstrom', 'AllowPrefix' => true],\n        'ar' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Are', 'AllowPrefix' => true],\n        'ft2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Feet', 'AllowPrefix' => false],\n        'ft^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Feet', 'AllowPrefix' => false],\n        'in2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Inches', 'AllowPrefix' => false],\n        'in^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Inches', 'AllowPrefix' => false],\n        'ly2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Light Years', 'AllowPrefix' => false],\n        'ly^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Light Years', 'AllowPrefix' => false],\n        'm2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Meters', 'AllowPrefix' => true],\n        'm^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Meters', 'AllowPrefix' => true],\n        'Morgen' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Morgen', 'AllowPrefix' => false],\n        'mi2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Miles', 'AllowPrefix' => false],\n        'mi^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Miles', 'AllowPrefix' => false],\n        'Nmi2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Nautical Miles', 'AllowPrefix' => false],\n        'Nmi^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Nautical Miles', 'AllowPrefix' => false],\n        'Pica2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Pica', 'AllowPrefix' => false],\n        'Pica^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Pica', 'AllowPrefix' => false],\n        'Picapt2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Pica', 'AllowPrefix' => false],\n        'Picapt^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Pica', 'AllowPrefix' => false],\n        'yd2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Yards', 'AllowPrefix' => false],\n        'yd^2' => ['Group' => self::CATEGORY_AREA, 'UnitName' => 'Square Yards', 'AllowPrefix' => false],\n        // Information\n        'byte' => ['Group' => self::CATEGORY_INFORMATION, 'UnitName' => 'Byte', 'AllowPrefix' => true],\n        'bit' => ['Group' => self::CATEGORY_INFORMATION, 'UnitName' => 'Bit', 'AllowPrefix' => true],\n        // Speed\n        'm/s' => ['Group' => self::CATEGORY_SPEED, 'UnitName' => 'Meters per second', 'AllowPrefix' => true],\n        'm/sec' => ['Group' => self::CATEGORY_SPEED, 'UnitName' => 'Meters per second', 'AllowPrefix' => true],\n        'm/h' => ['Group' => self::CATEGORY_SPEED, 'UnitName' => 'Meters per hour', 'AllowPrefix' => true],\n        'm/hr' => ['Group' => self::CATEGORY_SPEED, 'UnitName' => 'Meters per hour', 'AllowPrefix' => true],\n        'mph' => ['Group' => self::CATEGORY_SPEED, 'UnitName' => 'Miles per hour', 'AllowPrefix' => false],\n        'admkn' => ['Group' => self::CATEGORY_SPEED, 'UnitName' => 'Admiralty Knot', 'AllowPrefix' => false],\n        'kn' => ['Group' => self::CATEGORY_SPEED, 'UnitName' => 'Knot', 'AllowPrefix' => false],\n    ];\n\n    /**\n     * Details of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().\n     *\n     * @var array<string, array{multiplier: float, name: string}>\n     */\n    private static array $conversionMultipliers = [\n        'Y' => ['multiplier' => 1E24, 'name' => 'yotta'],\n        'Z' => ['multiplier' => 1E21, 'name' => 'zetta'],\n        'E' => ['multiplier' => 1E18, 'name' => 'exa'],\n        'P' => ['multiplier' => 1E15, 'name' => 'peta'],\n        'T' => ['multiplier' => 1E12, 'name' => 'tera'],\n        'G' => ['multiplier' => 1E9, 'name' => 'giga'],\n        'M' => ['multiplier' => 1E6, 'name' => 'mega'],\n        'k' => ['multiplier' => 1E3, 'name' => 'kilo'],\n        'h' => ['multiplier' => 1E2, 'name' => 'hecto'],\n        'e' => ['multiplier' => 1E1, 'name' => 'dekao'],\n        'da' => ['multiplier' => 1E1, 'name' => 'dekao'],\n        'd' => ['multiplier' => 1E-1, 'name' => 'deci'],\n        'c' => ['multiplier' => 1E-2, 'name' => 'centi'],\n        'm' => ['multiplier' => 1E-3, 'name' => 'milli'],\n        'u' => ['multiplier' => 1E-6, 'name' => 'micro'],\n        'n' => ['multiplier' => 1E-9, 'name' => 'nano'],\n        'p' => ['multiplier' => 1E-12, 'name' => 'pico'],\n        'f' => ['multiplier' => 1E-15, 'name' => 'femto'],\n        'a' => ['multiplier' => 1E-18, 'name' => 'atto'],\n        'z' => ['multiplier' => 1E-21, 'name' => 'zepto'],\n        'y' => ['multiplier' => 1E-24, 'name' => 'yocto'],\n    ];\n\n    /**\n     * Details of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().\n     *\n     * @var array<string, array{multiplier: float|int, name: string}>\n     */\n    private static array $binaryConversionMultipliers = [\n        'Yi' => ['multiplier' => 2 ** 80, 'name' => 'yobi'],\n        'Zi' => ['multiplier' => 2 ** 70, 'name' => 'zebi'],\n        'Ei' => ['multiplier' => 2 ** 60, 'name' => 'exbi'],\n        'Pi' => ['multiplier' => 2 ** 50, 'name' => 'pebi'],\n        'Ti' => ['multiplier' => 2 ** 40, 'name' => 'tebi'],\n        'Gi' => ['multiplier' => 2 ** 30, 'name' => 'gibi'],\n        'Mi' => ['multiplier' => 2 ** 20, 'name' => 'mebi'],\n        'ki' => ['multiplier' => 2 ** 10, 'name' => 'kibi'],\n    ];\n\n    /**\n     * Details of the Units of measure conversion factors, organised by group.\n     *\n     * @var array<string, array<string, float>>\n     */\n    private static array $unitConversions = [\n        // Conversion uses gram (g) as an intermediate unit\n        self::CATEGORY_WEIGHT_AND_MASS => [\n            'g' => 1.0,\n            'sg' => 6.85217658567918E-05,\n            'lbm' => 2.20462262184878E-03,\n            'u' => 6.02214179421676E+23,\n            'ozm' => 3.52739619495804E-02,\n            'grain' => 1.54323583529414E+01,\n            'cwt' => 2.20462262184878E-05,\n            'shweight' => 2.20462262184878E-05,\n            'uk_cwt' => 1.96841305522212E-05,\n            'lcwt' => 1.96841305522212E-05,\n            'hweight' => 1.96841305522212E-05,\n            'stone' => 1.57473044417770E-04,\n            'ton' => 1.10231131092439E-06,\n            'uk_ton' => 9.84206527611061E-07,\n            'LTON' => 9.84206527611061E-07,\n            'brton' => 9.84206527611061E-07,\n        ],\n        // Conversion uses meter (m) as an intermediate unit\n        self::CATEGORY_DISTANCE => [\n            'm' => 1.0,\n            'mi' => 6.21371192237334E-04,\n            'Nmi' => 5.39956803455724E-04,\n            'in' => 3.93700787401575E+01,\n            'ft' => 3.28083989501312E+00,\n            'yd' => 1.09361329833771E+00,\n            'ang' => 1.0E+10,\n            'ell' => 8.74890638670166E-01,\n            'ly' => 1.05700083402462E-16,\n            'parsec' => 3.24077928966473E-17,\n            'pc' => 3.24077928966473E-17,\n            'Pica' => 2.83464566929134E+03,\n            'Picapt' => 2.83464566929134E+03,\n            'pica' => 2.36220472440945E+02,\n            'survey_mi' => 6.21369949494950E-04,\n        ],\n        // Conversion uses second (s) as an intermediate unit\n        self::CATEGORY_TIME => [\n            'yr' => 3.16880878140289E-08,\n            'day' => 1.15740740740741E-05,\n            'd' => 1.15740740740741E-05,\n            'hr' => 2.77777777777778E-04,\n            'mn' => 1.66666666666667E-02,\n            'min' => 1.66666666666667E-02,\n            'sec' => 1.0,\n            's' => 1.0,\n        ],\n        // Conversion uses Pascal (Pa) as an intermediate unit\n        self::CATEGORY_PRESSURE => [\n            'Pa' => 1.0,\n            'p' => 1.0,\n            'atm' => 9.86923266716013E-06,\n            'at' => 9.86923266716013E-06,\n            'mmHg' => 7.50063755419211E-03,\n            'psi' => 1.45037737730209E-04,\n            'Torr' => 7.50061682704170E-03,\n        ],\n        // Conversion uses Newton (N) as an intermediate unit\n        self::CATEGORY_FORCE => [\n            'N' => 1.0,\n            'dyn' => 1.0E+5,\n            'dy' => 1.0E+5,\n            'lbf' => 2.24808923655339E-01,\n            'pond' => 1.01971621297793E+02,\n        ],\n        // Conversion uses Joule (J) as an intermediate unit\n        self::CATEGORY_ENERGY => [\n            'J' => 1.0,\n            'e' => 9.99999519343231E+06,\n            'c' => 2.39006249473467E-01,\n            'cal' => 2.38846190642017E-01,\n            'eV' => 6.24145700000000E+18,\n            'ev' => 6.24145700000000E+18,\n            'HPh' => 3.72506430801000E-07,\n            'hh' => 3.72506430801000E-07,\n            'Wh' => 2.77777916238711E-04,\n            'wh' => 2.77777916238711E-04,\n            'flb' => 2.37304222192651E+01,\n            'BTU' => 9.47815067349015E-04,\n            'btu' => 9.47815067349015E-04,\n        ],\n        // Conversion uses Horsepower (HP) as an intermediate unit\n        self::CATEGORY_POWER => [\n            'HP' => 1.0,\n            'h' => 1.0,\n            'W' => 7.45699871582270E+02,\n            'w' => 7.45699871582270E+02,\n            'PS' => 1.01386966542400E+00,\n        ],\n        // Conversion uses Tesla (T) as an intermediate unit\n        self::CATEGORY_MAGNETISM => [\n            'T' => 1.0,\n            'ga' => 10000.0,\n        ],\n        // Conversion uses litre (l) as an intermediate unit\n        self::CATEGORY_VOLUME => [\n            'l' => 1.0,\n            'L' => 1.0,\n            'lt' => 1.0,\n            'tsp' => 2.02884136211058E+02,\n            'tspm' => 2.0E+02,\n            'tbs' => 6.76280454036860E+01,\n            'oz' => 3.38140227018430E+01,\n            'cup' => 4.22675283773038E+00,\n            'pt' => 2.11337641886519E+00,\n            'us_pt' => 2.11337641886519E+00,\n            'uk_pt' => 1.75975398639270E+00,\n            'qt' => 1.05668820943259E+00,\n            'uk_qt' => 8.79876993196351E-01,\n            'gal' => 2.64172052358148E-01,\n            'uk_gal' => 2.19969248299088E-01,\n            'ang3' => 1.0E+27,\n            'ang^3' => 1.0E+27,\n            'barrel' => 6.28981077043211E-03,\n            'bushel' => 2.83775932584017E-02,\n            'in3' => 6.10237440947323E+01,\n            'in^3' => 6.10237440947323E+01,\n            'ft3' => 3.53146667214886E-02,\n            'ft^3' => 3.53146667214886E-02,\n            'ly3' => 1.18093498844171E-51,\n            'ly^3' => 1.18093498844171E-51,\n            'm3' => 1.0E-03,\n            'm^3' => 1.0E-03,\n            'mi3' => 2.39912758578928E-13,\n            'mi^3' => 2.39912758578928E-13,\n            'yd3' => 1.30795061931439E-03,\n            'yd^3' => 1.30795061931439E-03,\n            'Nmi3' => 1.57426214685811E-13,\n            'Nmi^3' => 1.57426214685811E-13,\n            'Pica3' => 2.27769904358706E+07,\n            'Pica^3' => 2.27769904358706E+07,\n            'Picapt3' => 2.27769904358706E+07,\n            'Picapt^3' => 2.27769904358706E+07,\n            'GRT' => 3.53146667214886E-04,\n            'regton' => 3.53146667214886E-04,\n            'MTON' => 8.82866668037215E-04,\n        ],\n        // Conversion uses hectare (ha) as an intermediate unit\n        self::CATEGORY_AREA => [\n            'ha' => 1.0,\n            'uk_acre' => 2.47105381467165E+00,\n            'us_acre' => 2.47104393046628E+00,\n            'ang2' => 1.0E+24,\n            'ang^2' => 1.0E+24,\n            'ar' => 1.0E+02,\n            'ft2' => 1.07639104167097E+05,\n            'ft^2' => 1.07639104167097E+05,\n            'in2' => 1.55000310000620E+07,\n            'in^2' => 1.55000310000620E+07,\n            'ly2' => 1.11725076312873E-28,\n            'ly^2' => 1.11725076312873E-28,\n            'm2' => 1.0E+04,\n            'm^2' => 1.0E+04,\n            'Morgen' => 4.0E+00,\n            'mi2' => 3.86102158542446E-03,\n            'mi^2' => 3.86102158542446E-03,\n            'Nmi2' => 2.91553349598123E-03,\n            'Nmi^2' => 2.91553349598123E-03,\n            'Pica2' => 8.03521607043214E+10,\n            'Pica^2' => 8.03521607043214E+10,\n            'Picapt2' => 8.03521607043214E+10,\n            'Picapt^2' => 8.03521607043214E+10,\n            'yd2' => 1.19599004630108E+04,\n            'yd^2' => 1.19599004630108E+04,\n        ],\n        // Conversion uses bit (bit) as an intermediate unit\n        self::CATEGORY_INFORMATION => [\n            'bit' => 1.0,\n            'byte' => 0.125,\n        ],\n        // Conversion uses Meters per Second (m/s) as an intermediate unit\n        self::CATEGORY_SPEED => [\n            'm/s' => 1.0,\n            'm/sec' => 1.0,\n            'm/h' => 3.60E+03,\n            'm/hr' => 3.60E+03,\n            'mph' => 2.23693629205440E+00,\n            'admkn' => 1.94260256941567E+00,\n            'kn' => 1.94384449244060E+00,\n        ],\n    ];\n\n    /**\n     *    getConversionGroups\n     * Returns a list of the different conversion groups for UOM conversions.\n     *\n     * @return string[]\n     */\n    public static function getConversionCategories(): array\n    {\n        $conversionGroups = [];\n        foreach (self::$conversionUnits as $conversionUnit) {\n            $conversionGroups[] = $conversionUnit['Group'];\n        }\n\n        return array_merge(array_unique($conversionGroups));\n    }\n\n    /**\n     *    getConversionGroupUnits\n     * Returns an array of units of measure, for a specified conversion group, or for all groups.\n     *\n     * @param ?string $category The group whose units of measure you want to retrieve\n     *\n     * @return string[][]\n     */\n    public static function getConversionCategoryUnits(?string $category = null): array\n    {\n        $conversionGroups = [];\n        foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) {\n            if (($category === null) || ($conversionGroup['Group'] == $category)) {\n                $conversionGroups[$conversionGroup['Group']][] = $conversionUnit;\n            }\n        }\n\n        return $conversionGroups;\n    }\n\n    /**\n     * getConversionGroupUnitDetails.\n     *\n     * @param ?string $category The group whose units of measure you want to retrieve\n     *\n     * @return array<string, list<array<string, string>>>\n     */\n    public static function getConversionCategoryUnitDetails(?string $category = null): array\n    {\n        $conversionGroups = [];\n        foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) {\n            if (($category === null) || ($conversionGroup['Group'] == $category)) {\n                $conversionGroups[$conversionGroup['Group']][] = [\n                    'unit' => $conversionUnit,\n                    'description' => $conversionGroup['UnitName'],\n                ];\n            }\n        }\n\n        return $conversionGroups;\n    }\n\n    /**\n     *    getConversionMultipliers\n     * Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().\n     *\n     * @return array<string, array{multiplier: float, name: string}>\n     */\n    public static function getConversionMultipliers(): array\n    {\n        return self::$conversionMultipliers;\n    }\n\n    /**\n     *    getBinaryConversionMultipliers\n     * Returns an array of the additional Multiplier prefixes that can be used with Information Units of Measure in CONVERTUOM().\n     *\n     * @return array<string, array{multiplier: float|int, name: string}>\n     */\n    public static function getBinaryConversionMultipliers(): array\n    {\n        return self::$binaryConversionMultipliers;\n    }\n\n    /**\n     * CONVERT.\n     *\n     * Converts a number from one measurement system to another.\n     *    For example, CONVERT can translate a table of distances in miles to a table of distances\n     * in kilometers.\n     *\n     *    Excel Function:\n     *        CONVERT(value,fromUOM,toUOM)\n     *\n     * @param array<mixed>|float|int|string $value the value in fromUOM to convert\n     *                      Or can be an array of values\n     * @param string|string[] $fromUOM the units for value\n     *                      Or can be an array of values\n     * @param string|string[] $toUOM the units for the result\n     *                      Or can be an array of values\n     *\n     * @return float|mixed[]|string Result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function CONVERT($value, $fromUOM, $toUOM)\n    {\n        if (is_array($value) || is_array($fromUOM) || is_array($toUOM)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $fromUOM, $toUOM);\n        }\n\n        if (!is_numeric($value)) {\n            return ExcelError::VALUE();\n        }\n\n        try {\n            [$fromUOM, $fromCategory, $fromMultiplier] = self::getUOMDetails($fromUOM);\n            [$toUOM, $toCategory, $toMultiplier] = self::getUOMDetails($toUOM);\n        } catch (Exception) {\n            return ExcelError::NA();\n        }\n\n        if ($fromCategory !== $toCategory) {\n            return ExcelError::NA();\n        }\n\n        // @var float $value\n        $value *= $fromMultiplier;\n\n        if (($fromUOM === $toUOM) && ($fromMultiplier === $toMultiplier)) {\n            //    We've already factored $fromMultiplier into the value, so we need\n            //        to reverse it again\n            return $value / $fromMultiplier;\n        } elseif ($fromUOM === $toUOM) {\n            return $value / $toMultiplier;\n        } elseif ($fromCategory === self::CATEGORY_TEMPERATURE) {\n            return self::convertTemperature($fromUOM, $toUOM, $value);\n        }\n\n        $baseValue = $value * (1.0 / self::$unitConversions[$fromCategory][$fromUOM]);\n\n        return ($baseValue * self::$unitConversions[$fromCategory][$toUOM]) / $toMultiplier;\n    }\n\n    /** @return array{0: string, 1: string, 2: float} */\n    private static function getUOMDetails(string $uom): array\n    {\n        if (isset(self::$conversionUnits[$uom])) {\n            $unitCategory = self::$conversionUnits[$uom]['Group'];\n\n            return [$uom, $unitCategory, 1.0];\n        }\n\n        // Check 1-character standard metric multiplier prefixes\n        $multiplierType = substr($uom, 0, 1);\n        $uom = substr($uom, 1);\n        if (isset(self::$conversionUnits[$uom], self::$conversionMultipliers[$multiplierType])) {\n            if (self::$conversionUnits[$uom]['AllowPrefix'] === false) {\n                throw new Exception('Prefix not allowed for UoM');\n            }\n            $unitCategory = self::$conversionUnits[$uom]['Group'];\n\n            return [$uom, $unitCategory, self::$conversionMultipliers[$multiplierType]['multiplier']];\n        }\n\n        $multiplierType .= substr($uom, 0, 1);\n        $uom = substr($uom, 1);\n\n        // Check 2-character standard metric multiplier prefixes\n        if (isset(self::$conversionUnits[$uom], self::$conversionMultipliers[$multiplierType])) {\n            if (self::$conversionUnits[$uom]['AllowPrefix'] === false) {\n                throw new Exception('Prefix not allowed for UoM');\n            }\n            $unitCategory = self::$conversionUnits[$uom]['Group'];\n\n            return [$uom, $unitCategory, self::$conversionMultipliers[$multiplierType]['multiplier']];\n        }\n\n        // Check 2-character binary multiplier prefixes\n        if (isset(self::$conversionUnits[$uom], self::$binaryConversionMultipliers[$multiplierType])) {\n            if (self::$conversionUnits[$uom]['AllowPrefix'] === false) {\n                throw new Exception('Prefix not allowed for UoM');\n            }\n            $unitCategory = self::$conversionUnits[$uom]['Group'];\n            if ($unitCategory !== 'Information') {\n                throw new Exception('Binary Prefix is only allowed for Information UoM');\n            }\n\n            return [$uom, $unitCategory, self::$binaryConversionMultipliers[$multiplierType]['multiplier']];\n        }\n\n        throw new Exception('UoM Not Found');\n    }\n\n    protected static function convertTemperature(string $fromUOM, string $toUOM, float|int $value): float|int\n    {\n        $fromUOM = self::resolveTemperatureSynonyms($fromUOM);\n        $toUOM = self::resolveTemperatureSynonyms($toUOM);\n\n        if ($fromUOM === $toUOM) {\n            return $value;\n        }\n\n        // Convert to Kelvin\n        switch ($fromUOM) {\n            case 'F':\n                $value = ($value - 32) / 1.8 + 273.15;\n\n                break;\n            case 'C':\n                $value += 273.15;\n\n                break;\n            case 'Rank':\n                $value /= 1.8;\n\n                break;\n            case 'Reau':\n                $value = $value * 1.25 + 273.15;\n\n                break;\n        }\n\n        // Convert from Kelvin\n        switch ($toUOM) {\n            case 'F':\n                $value = ($value - 273.15) * 1.8 + 32.00;\n\n                break;\n            case 'C':\n                $value -= 273.15;\n\n                break;\n            case 'Rank':\n                $value *= 1.8;\n\n                break;\n            case 'Reau':\n                $value = ($value - 273.15) * 0.80000;\n\n                break;\n        }\n\n        return $value;\n    }\n\n    private static function resolveTemperatureSynonyms(string $uom): string\n    {\n        return match ($uom) {\n            'fah' => 'F',\n            'cel' => 'C',\n            'kel' => 'K',\n            default => $uom,\n        };\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/EngineeringValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass EngineeringValidations\n{\n    public static function validateFloat(mixed $value): float\n    {\n        if (!is_numeric($value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (float) $value;\n    }\n\n    public static function validateInt(mixed $value): int\n    {\n        if (!is_numeric($value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (int) floor((float) $value);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/Erf.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Erf\n{\n    use ArrayEnabled;\n\n    private const TWO_SQRT_PI = 1.128379167095512574;\n\n    /**\n     * ERF.\n     *\n     * Returns the error function integrated between the lower and upper bound arguments.\n     *\n     *    Note: In Excel 2007 or earlier, if you input a negative value for the upper or lower bound arguments,\n     *            the function would return a #NUM! error. However, in Excel 2010, the function algorithm was\n     *            improved, so that it can now calculate the function for both positive and negative ranges.\n     *            PhpSpreadsheet follows Excel 2010 behaviour, and accepts negative arguments.\n     *\n     *    Excel Function:\n     *        ERF(lower[,upper])\n     *\n     * @param mixed $lower Lower bound float for integrating ERF\n     *                      Or can be an array of values\n     * @param mixed $upper Upper bound float for integrating ERF.\n     *                           If omitted, ERF integrates between zero and lower_limit\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function ERF(mixed $lower, mixed $upper = null): array|float|string\n    {\n        if (is_array($lower) || is_array($upper)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $lower, $upper);\n        }\n\n        if (is_numeric($lower)) {\n            if ($upper === null) {\n                return self::erfValue($lower);\n            }\n            if (is_numeric($upper)) {\n                return self::erfValue($upper) - self::erfValue($lower);\n            }\n        }\n\n        return ExcelError::VALUE();\n    }\n\n    /**\n     * ERFPRECISE.\n     *\n     * Returns the error function integrated between the lower and upper bound arguments.\n     *\n     *    Excel Function:\n     *        ERF.PRECISE(limit)\n     *\n     * @param mixed $limit Float bound for integrating ERF, other bound is zero\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function ERFPRECISE(mixed $limit)\n    {\n        if (is_array($limit)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $limit);\n        }\n\n        return self::ERF($limit);\n    }\n\n    private static function makeFloat(mixed $value): float\n    {\n        return is_numeric($value) ? ((float) $value) : 0.0;\n    }\n\n    /**\n     * Method to calculate the erf value.\n     */\n    public static function erfValue(float|int|string $value): float\n    {\n        $value = (float) $value;\n        if (abs($value) > 2.2) {\n            return 1 - self::makeFloat(ErfC::ERFC($value));\n        }\n        $sum = $term = $value;\n        $xsqr = ($value * $value);\n        $j = 1;\n        do {\n            $term *= $xsqr / $j;\n            $sum -= $term / (2 * $j + 1);\n            ++$j;\n            $term *= $xsqr / $j;\n            $sum += $term / (2 * $j + 1);\n            ++$j;\n            if ($sum == 0.0) {\n                break;\n            }\n        } while (abs($term / $sum) > Functions::PRECISION);\n\n        return self::TWO_SQRT_PI * $sum;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Engineering/ErfC.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ErfC\n{\n    use ArrayEnabled;\n\n    /**\n     * ERFC.\n     *\n     *    Returns the complementary ERF function integrated between x and infinity\n     *\n     *    Note: In Excel 2007 or earlier, if you input a negative value for the lower bound argument,\n     *        the function would return a #NUM! error. However, in Excel 2010, the function algorithm was\n     *        improved, so that it can now calculate the function for both positive and negative x values.\n     *            PhpSpreadsheet follows Excel 2010 behaviour, and accepts negative arguments.\n     *\n     *    Excel Function:\n     *        ERFC(x)\n     *\n     * @param mixed $value The float lower bound for integrating ERFC\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function ERFC(mixed $value)\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        if (is_numeric($value)) {\n            return self::erfcValue($value);\n        }\n\n        return ExcelError::VALUE();\n    }\n\n    private const ONE_SQRT_PI = 0.564189583547756287;\n\n    /**\n     * Method to calculate the erfc value.\n     */\n    private static function erfcValue(float|int|string $value): float|int\n    {\n        $value = (float) $value;\n        if (abs($value) < 2.2) {\n            return 1 - Erf::erfValue($value);\n        }\n        if ($value < 0) {\n            return 2 - self::erfcValue(-$value);\n        }\n        $a = $n = 1;\n        $b = $c = $value;\n        $d = ($value * $value) + 0.5;\n        $q2 = $b / $d;\n        do {\n            $t = $a * $n + $b * $value;\n            $a = $b;\n            $b = $t;\n            $t = $c * $n + $d * $value;\n            $c = $d;\n            $d = $t;\n            $n += 0.5;\n            $q1 = $q2;\n            $q2 = $b / $d;\n        } while ((abs($q1 - $q2) / $q2) > Functions::PRECISION);\n\n        return self::ONE_SQRT_PI * exp(-$value * $value) * $q2;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Exception.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass Exception extends PhpSpreadsheetException\n{\n    public const CALCULATION_ENGINE_PUSH_TO_STACK = 1;\n\n    /**\n     * Error handler callback.\n     */\n    public static function errorHandlerCallback(int $code, string $string, string $file, int $line): void\n    {\n        $e = new self($string, $code);\n        $e->line = $line;\n        $e->file = $file;\n\n        throw $e;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/ExceptionHandler.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nclass ExceptionHandler\n{\n    /**\n     * Register errorhandler.\n     */\n    public function __construct()\n    {\n        /** @var callable $callable */\n        $callable = [Exception::class, 'errorHandlerCallback'];\n        set_error_handler($callable, E_ALL);\n    }\n\n    /**\n     * Unregister errorhandler.\n     */\n    public function __destruct()\n    {\n        restore_error_handler();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Amortization.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass Amortization\n{\n    /**\n     * AMORDEGRC.\n     *\n     * Returns the depreciation for each accounting period.\n     * This function is provided for the French accounting system. If an asset is purchased in\n     * the middle of the accounting period, the prorated depreciation is taken into account.\n     * The function is similar to AMORLINC, except that a depreciation coefficient is applied in\n     * the calculation depending on the life of the assets.\n     * This function will return the depreciation until the last period of the life of the assets\n     * or until the cumulated value of depreciation is greater than the cost of the assets minus\n     * the salvage value.\n     *\n     * Excel Function:\n     *        AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis])\n     *\n     * @param mixed $cost The float cost of the asset\n     * @param mixed $purchased Date of the purchase of the asset\n     * @param mixed $firstPeriod Date of the end of the first period\n     * @param mixed $salvage The salvage value at the end of the life of the asset\n     * @param mixed $period the period (float)\n     * @param mixed $rate rate of depreciation (float)\n     * @param mixed $basis The type of day count to use (int).\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     *\n     * @return float|string (string containing the error type if there is an error)\n     */\n    public static function AMORDEGRC(\n        mixed $cost,\n        mixed $purchased,\n        mixed $firstPeriod,\n        mixed $salvage,\n        mixed $period,\n        mixed $rate,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|float {\n        $cost = Functions::flattenSingleValue($cost);\n        $purchased = Functions::flattenSingleValue($purchased);\n        $firstPeriod = Functions::flattenSingleValue($firstPeriod);\n        $salvage = Functions::flattenSingleValue($salvage);\n        $period = Functions::flattenSingleValue($period);\n        $rate = Functions::flattenSingleValue($rate);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $cost = FinancialValidations::validateFloat($cost);\n            $purchased = FinancialValidations::validateDate($purchased);\n            $firstPeriod = FinancialValidations::validateDate($firstPeriod);\n            $salvage = FinancialValidations::validateFloat($salvage);\n            $period = FinancialValidations::validateInt($period);\n            $rate = FinancialValidations::validateFloat($rate);\n            $basis = FinancialValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $yearFracx = DateTimeExcel\\YearFrac::fraction($purchased, $firstPeriod, $basis);\n        if (is_string($yearFracx)) {\n            return $yearFracx;\n        }\n        /** @var float $yearFrac */\n        $yearFrac = $yearFracx;\n\n        $amortiseCoeff = self::getAmortizationCoefficient($rate);\n\n        $rate *= $amortiseCoeff;\n        $rate = (float) (string) $rate; // ugly way to avoid rounding problem\n        $fNRate = round($yearFrac * $rate * $cost, 0);\n        $cost -= $fNRate;\n        $fRest = $cost - $salvage;\n\n        for ($n = 0; $n < $period; ++$n) {\n            $fNRate = round($rate * $cost, 0);\n            $fRest -= $fNRate;\n\n            if ($fRest < 0.0) {\n                return match ($period - $n) {\n                    1 => round($cost * 0.5, 0),\n                    default => 0.0,\n                };\n            }\n            $cost -= $fNRate;\n        }\n\n        return $fNRate;\n    }\n\n    /**\n     * AMORLINC.\n     *\n     * Returns the depreciation for each accounting period.\n     * This function is provided for the French accounting system. If an asset is purchased in\n     * the middle of the accounting period, the prorated depreciation is taken into account.\n     *\n     * Excel Function:\n     *        AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis])\n     *\n     * @param mixed $cost The cost of the asset as a float\n     * @param mixed $purchased Date of the purchase of the asset\n     * @param mixed $firstPeriod Date of the end of the first period\n     * @param mixed $salvage The salvage value at the end of the life of the asset\n     * @param mixed $period The period as a float\n     * @param mixed $rate Rate of depreciation as  float\n     * @param mixed $basis Integer indicating the type of day count to use.\n     *                             0 or omitted    US (NASD) 30/360\n     *                             1               Actual/actual\n     *                             2               Actual/360\n     *                             3               Actual/365\n     *                             4               European 30/360\n     *\n     * @return float|string (string containing the error type if there is an error)\n     */\n    public static function AMORLINC(\n        mixed $cost,\n        mixed $purchased,\n        mixed $firstPeriod,\n        mixed $salvage,\n        mixed $period,\n        mixed $rate,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|float {\n        $cost = Functions::flattenSingleValue($cost);\n        $purchased = Functions::flattenSingleValue($purchased);\n        $firstPeriod = Functions::flattenSingleValue($firstPeriod);\n        $salvage = Functions::flattenSingleValue($salvage);\n        $period = Functions::flattenSingleValue($period);\n        $rate = Functions::flattenSingleValue($rate);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $cost = FinancialValidations::validateFloat($cost);\n            $purchased = FinancialValidations::validateDate($purchased);\n            $firstPeriod = FinancialValidations::validateDate($firstPeriod);\n            $salvage = FinancialValidations::validateFloat($salvage);\n            $period = FinancialValidations::validateFloat($period);\n            $rate = FinancialValidations::validateFloat($rate);\n            $basis = FinancialValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $fOneRate = $cost * $rate;\n        $fCostDelta = $cost - $salvage;\n        //    Note, quirky variation for leap years on the YEARFRAC for this function\n        $purchasedYear = DateTimeExcel\\DateParts::year($purchased);\n        $yearFracx = DateTimeExcel\\YearFrac::fraction($purchased, $firstPeriod, $basis);\n        if (is_string($yearFracx)) {\n            return $yearFracx;\n        }\n        /** @var float $yearFrac */\n        $yearFrac = $yearFracx;\n\n        if (\n            $basis == FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL\n            && $yearFrac < 1\n        ) {\n            $temp = Functions::scalar($purchasedYear);\n            if (is_int($temp) || is_string($temp)) {\n                if (DateTimeExcel\\Helpers::isLeapYear($temp)) {\n                    $yearFrac *= 365 / 366;\n                }\n            }\n        }\n\n        $f0Rate = $yearFrac * $rate * $cost;\n        $nNumOfFullPeriods = (int) (($cost - $salvage - $f0Rate) / $fOneRate);\n\n        if ($period == 0) {\n            return $f0Rate;\n        } elseif ($period <= $nNumOfFullPeriods) {\n            return $fOneRate;\n        } elseif ($period == ($nNumOfFullPeriods + 1)) {\n            return $fCostDelta - $fOneRate * $nNumOfFullPeriods - $f0Rate;\n        }\n\n        return 0.0;\n    }\n\n    private static function getAmortizationCoefficient(float $rate): float\n    {\n        //    The depreciation coefficients are:\n        //    Life of assets (1/rate)        Depreciation coefficient\n        //    Less than 3 years            1\n        //    Between 3 and 4 years        1.5\n        //    Between 5 and 6 years        2\n        //    More than 6 years            2.5\n        $fUsePer = 1.0 / $rate;\n\n        if ($fUsePer < 3.0) {\n            return 1.0;\n        } elseif ($fUsePer < 4.0) {\n            return 1.5;\n        } elseif ($fUsePer <= 6.0) {\n            return 2.0;\n        }\n\n        return 2.5;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/CashFlowValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\FinancialValidations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass CashFlowValidations extends FinancialValidations\n{\n    public static function validateRate(mixed $rate): float\n    {\n        $rate = self::validateFloat($rate);\n\n        return $rate;\n    }\n\n    public static function validatePeriodType(mixed $type): int\n    {\n        $rate = self::validateInt($type);\n        if (\n            $type !== FinancialConstants::PAYMENT_END_OF_PERIOD\n            && $type !== FinancialConstants::PAYMENT_BEGINNING_OF_PERIOD\n        ) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $rate;\n    }\n\n    public static function validatePresentValue(mixed $presentValue): float\n    {\n        return self::validateFloat($presentValue);\n    }\n\n    public static function validateFutureValue(mixed $futureValue): float\n    {\n        return self::validateFloat($futureValue);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\CashFlowValidations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Cumulative\n{\n    /**\n     * CUMIPMT.\n     *\n     * Returns the cumulative interest paid on a loan between the start and end periods.\n     *\n     * Excel Function:\n     *        CUMIPMT(rate,nper,pv,start,end[,type])\n     *\n     * @param mixed $rate The Interest rate\n     * @param mixed $periods The total number of payment periods\n     * @param mixed $presentValue Present Value\n     * @param mixed $start The first period in the calculation.\n     *                       Payment periods are numbered beginning with 1.\n     * @param mixed $end the last period in the calculation\n     * @param mixed $type A number 0 or 1 and indicates when payments are due:\n     *                    0 or omitted    At the end of the period.\n     *                    1               At the beginning of the period.\n     */\n    public static function interest(\n        mixed $rate,\n        mixed $periods,\n        mixed $presentValue,\n        mixed $start,\n        mixed $end,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ): string|float|int {\n        $rate = Functions::flattenSingleValue($rate);\n        $periods = Functions::flattenSingleValue($periods);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $start = Functions::flattenSingleValue($start);\n        $end = Functions::flattenSingleValue($end);\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n\n        try {\n            $rate = CashFlowValidations::validateRate($rate);\n            $periods = CashFlowValidations::validateInt($periods);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $start = CashFlowValidations::validateInt($start);\n            $end = CashFlowValidations::validateInt($end);\n            $type = CashFlowValidations::validatePeriodType($type);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($start < 1 || $start > $end) {\n            return ExcelError::NAN();\n        }\n\n        // Calculate\n        $interest = 0;\n        for ($per = $start; $per <= $end; ++$per) {\n            $ipmt = Interest::payment($rate, $per, $periods, $presentValue, 0, $type);\n            if (is_string($ipmt)) {\n                return $ipmt;\n            }\n\n            $interest += $ipmt;\n        }\n\n        return $interest;\n    }\n\n    /**\n     * CUMPRINC.\n     *\n     * Returns the cumulative principal paid on a loan between the start and end periods.\n     *\n     * Excel Function:\n     *        CUMPRINC(rate,nper,pv,start,end[,type])\n     *\n     * @param mixed $rate The Interest rate\n     * @param mixed $periods The total number of payment periods as an integer\n     * @param mixed $presentValue Present Value\n     * @param mixed $start The first period in the calculation.\n     *                       Payment periods are numbered beginning with 1.\n     * @param mixed $end the last period in the calculation\n     * @param mixed $type A number 0 or 1 and indicates when payments are due:\n     *                    0 or omitted    At the end of the period.\n     *                    1               At the beginning of the period.\n     */\n    public static function principal(\n        mixed $rate,\n        mixed $periods,\n        mixed $presentValue,\n        mixed $start,\n        mixed $end,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ): string|float|int {\n        $rate = Functions::flattenSingleValue($rate);\n        $periods = Functions::flattenSingleValue($periods);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $start = Functions::flattenSingleValue($start);\n        $end = Functions::flattenSingleValue($end);\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n\n        try {\n            $rate = CashFlowValidations::validateRate($rate);\n            $periods = CashFlowValidations::validateInt($periods);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $start = CashFlowValidations::validateInt($start);\n            $end = CashFlowValidations::validateInt($end);\n            $type = CashFlowValidations::validatePeriodType($type);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($start < 1 || $start > $end) {\n            return ExcelError::VALUE();\n        }\n\n        // Calculate\n        $principal = 0;\n        for ($per = $start; $per <= $end; ++$per) {\n            $ppmt = Payments::interestPayment($rate, $per, $periods, $presentValue, 0, $type);\n            if (is_string($ppmt)) {\n                return $ppmt;\n            }\n\n            $principal += $ppmt;\n        }\n\n        return $principal;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\CashFlowValidations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Interest\n{\n    private const FINANCIAL_MAX_ITERATIONS = 128;\n\n    private const FINANCIAL_PRECISION = 1.0e-08;\n\n    /**\n     * IPMT.\n     *\n     * Returns the interest payment for a given period for an investment based on periodic, constant payments\n     *         and a constant interest rate.\n     *\n     * Excel Function:\n     *        IPMT(rate,per,nper,pv[,fv][,type])\n     *\n     * @param mixed $interestRate Interest rate per period\n     * @param mixed $period Period for which we want to find the interest\n     * @param mixed $numberOfPeriods Number of periods\n     * @param mixed $presentValue Present Value\n     * @param mixed $futureValue Future Value\n     * @param mixed $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period\n     */\n    public static function payment(\n        mixed $interestRate,\n        mixed $period,\n        mixed $numberOfPeriods,\n        mixed $presentValue,\n        mixed $futureValue = 0,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ): string|float {\n        $interestRate = Functions::flattenSingleValue($interestRate);\n        $period = Functions::flattenSingleValue($period);\n        $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $futureValue = ($futureValue === null) ? 0.0 : Functions::flattenSingleValue($futureValue);\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n\n        try {\n            $interestRate = CashFlowValidations::validateRate($interestRate);\n            $period = CashFlowValidations::validateInt($period);\n            $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $futureValue = CashFlowValidations::validateFutureValue($futureValue);\n            $type = CashFlowValidations::validatePeriodType($type);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($period <= 0 || $period > $numberOfPeriods) {\n            return ExcelError::NAN();\n        }\n\n        // Calculate\n        $interestAndPrincipal = new InterestAndPrincipal(\n            $interestRate,\n            $period,\n            $numberOfPeriods,\n            $presentValue,\n            $futureValue,\n            $type\n        );\n\n        return $interestAndPrincipal->interest();\n    }\n\n    /**\n     * ISPMT.\n     *\n     * Returns the interest payment for an investment based on an interest rate and a constant payment schedule.\n     *\n     * Excel Function:\n     *     =ISPMT(interest_rate, period, number_payments, pv)\n     *\n     * @param mixed $interestRate is the interest rate for the investment\n     * @param mixed $period is the period to calculate the interest rate.  It must be between 1 and number_payments.\n     * @param mixed $numberOfPeriods is the number of payments for the annuity\n     * @param mixed $principleRemaining is the loan amount or present value of the payments\n     */\n    public static function schedulePayment(mixed $interestRate, mixed $period, mixed $numberOfPeriods, mixed $principleRemaining): string|float\n    {\n        $interestRate = Functions::flattenSingleValue($interestRate);\n        $period = Functions::flattenSingleValue($period);\n        $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);\n        $principleRemaining = Functions::flattenSingleValue($principleRemaining);\n\n        try {\n            $interestRate = CashFlowValidations::validateRate($interestRate);\n            $period = CashFlowValidations::validateInt($period);\n            $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);\n            $principleRemaining = CashFlowValidations::validateFloat($principleRemaining);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($period <= 0 || $period > $numberOfPeriods) {\n            return ExcelError::NAN();\n        }\n\n        // Return value\n        $returnValue = 0;\n\n        // Calculate\n        $principlePayment = ($principleRemaining * 1.0) / ($numberOfPeriods * 1.0);\n        for ($i = 0; $i <= $period; ++$i) {\n            $returnValue = $interestRate * $principleRemaining * -1;\n            $principleRemaining -= $principlePayment;\n            // principle needs to be 0 after the last payment, don't let floating point screw it up\n            if ($i == $numberOfPeriods) {\n                $returnValue = 0.0;\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * RATE.\n     *\n     * Returns the interest rate per period of an annuity.\n     * RATE is calculated by iteration and can have zero or more solutions.\n     * If the successive results of RATE do not converge to within 0.0000001 after 20 iterations,\n     * RATE returns the #NUM! error value.\n     *\n     * Excel Function:\n     *        RATE(nper,pmt,pv[,fv[,type[,guess]]])\n     *\n     * @param mixed $numberOfPeriods The total number of payment periods in an annuity\n     * @param mixed $payment The payment made each period and cannot change over the life of the annuity.\n     *                           Typically, pmt includes principal and interest but no other fees or taxes.\n     * @param mixed $presentValue The present value - the total amount that a series of future payments is worth now\n     * @param mixed $futureValue The future value, or a cash balance you want to attain after the last payment is made.\n     *                               If fv is omitted, it is assumed to be 0 (the future value of a loan,\n     *                               for example, is 0).\n     * @param mixed $type A number 0 or 1 and indicates when payments are due:\n     *                      0 or omitted    At the end of the period.\n     *                      1               At the beginning of the period.\n     * @param mixed $guess Your guess for what the rate will be.\n     *                          If you omit guess, it is assumed to be 10 percent.\n     */\n    public static function rate(\n        mixed $numberOfPeriods,\n        mixed $payment,\n        mixed $presentValue,\n        mixed $futureValue = 0.0,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD,\n        mixed $guess = 0.1\n    ): string|float {\n        $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);\n        $payment = Functions::flattenSingleValue($payment);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $futureValue = Functions::flattenSingleValue($futureValue) ?? 0.0;\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n        $guess = Functions::flattenSingleValue($guess) ?? 0.1;\n\n        try {\n            $numberOfPeriods = CashFlowValidations::validateFloat($numberOfPeriods);\n            $payment = CashFlowValidations::validateFloat($payment);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $futureValue = CashFlowValidations::validateFutureValue($futureValue);\n            $type = CashFlowValidations::validatePeriodType($type);\n            $guess = CashFlowValidations::validateFloat($guess);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $rate = $guess;\n        // rest of code adapted from python/numpy\n        $close = false;\n        $iter = 0;\n        while (!$close && $iter < self::FINANCIAL_MAX_ITERATIONS) {\n            $nextdiff = self::rateNextGuess($rate, $numberOfPeriods, $payment, $presentValue, $futureValue, $type);\n            if (!is_numeric($nextdiff)) {\n                break;\n            }\n            $rate1 = $rate - $nextdiff;\n            $close = abs($rate1 - $rate) < self::FINANCIAL_PRECISION;\n            ++$iter;\n            $rate = $rate1;\n        }\n\n        return $close ? $rate : ExcelError::NAN();\n    }\n\n    private static function rateNextGuess(float $rate, float $numberOfPeriods, float $payment, float $presentValue, float $futureValue, int $type): string|float\n    {\n        if ($rate == 0.0) {\n            return ExcelError::NAN();\n        }\n        $tt1 = ($rate + 1) ** $numberOfPeriods;\n        $tt2 = ($rate + 1) ** ($numberOfPeriods - 1);\n        $numerator = $futureValue + $tt1 * $presentValue + $payment * ($tt1 - 1) * ($rate * $type + 1) / $rate;\n        $denominator = $numberOfPeriods * $tt2 * $presentValue - $payment * ($tt1 - 1)\n            * ($rate * $type + 1) / ($rate * $rate) + $numberOfPeriods\n            * $payment * $tt2 * ($rate * $type + 1) / $rate + $payment * ($tt1 - 1) * $type / $rate;\n        if ($denominator == 0) {\n            return ExcelError::NAN();\n        }\n\n        return $numerator / $denominator;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\n\nclass InterestAndPrincipal\n{\n    protected float $interest;\n\n    protected float $principal;\n\n    public function __construct(\n        float $rate = 0.0,\n        int $period = 0,\n        int $numberOfPeriods = 0,\n        float $presentValue = 0,\n        float $futureValue = 0,\n        int $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ) {\n        $payment = Payments::annuity($rate, $numberOfPeriods, $presentValue, $futureValue, $type);\n        $capital = $presentValue;\n        $interest = 0.0;\n        $principal = 0.0;\n        for ($i = 1; $i <= $period; ++$i) {\n            $interest = ($type === FinancialConstants::PAYMENT_BEGINNING_OF_PERIOD && $i == 1) ? 0 : -$capital * $rate;\n            $principal = (float) $payment - $interest;\n            $capital += $principal;\n        }\n\n        $this->interest = $interest;\n        $this->principal = $principal;\n    }\n\n    public function interest(): float\n    {\n        return $this->interest;\n    }\n\n    public function principal(): float\n    {\n        return $this->principal;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant\\Periodic;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\CashFlowValidations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Payments\n{\n    /**\n     * PMT.\n     *\n     * Returns the constant payment (annuity) for a cash flow with a constant interest rate.\n     *\n     * @param mixed $interestRate Interest rate per period\n     * @param mixed $numberOfPeriods Number of periods\n     * @param mixed $presentValue Present Value\n     * @param mixed $futureValue Future Value\n     * @param mixed $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function annuity(\n        mixed $interestRate,\n        mixed $numberOfPeriods,\n        mixed $presentValue,\n        mixed $futureValue = 0.0,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ): string|float {\n        $interestRate = Functions::flattenSingleValue($interestRate);\n        $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $futureValue = Functions::flattenSingleValue($futureValue) ?? 0.0;\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n\n        try {\n            $interestRate = CashFlowValidations::validateRate($interestRate);\n            $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $futureValue = CashFlowValidations::validateFutureValue($futureValue);\n            $type = CashFlowValidations::validatePeriodType($type);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Calculate\n        if ($interestRate != 0.0) {\n            return (-$futureValue - $presentValue * (1 + $interestRate) ** $numberOfPeriods)\n                / (1 + $interestRate * $type) / (((1 + $interestRate) ** $numberOfPeriods - 1) / $interestRate);\n        }\n\n        return (-$presentValue - $futureValue) / $numberOfPeriods;\n    }\n\n    /**\n     * PPMT.\n     *\n     * Returns the interest payment for a given period for an investment based on periodic, constant payments\n     *         and a constant interest rate.\n     *\n     * @param mixed $interestRate Interest rate per period\n     * @param mixed $period Period for which we want to find the interest\n     * @param mixed $numberOfPeriods Number of periods\n     * @param mixed $presentValue Present Value\n     * @param mixed $futureValue Future Value\n     * @param mixed $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function interestPayment(\n        mixed $interestRate,\n        mixed $period,\n        mixed $numberOfPeriods,\n        mixed $presentValue,\n        mixed $futureValue = 0,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ): string|float {\n        $interestRate = Functions::flattenSingleValue($interestRate);\n        $period = Functions::flattenSingleValue($period);\n        $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $futureValue = ($futureValue === null) ? 0.0 : Functions::flattenSingleValue($futureValue);\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n\n        try {\n            $interestRate = CashFlowValidations::validateRate($interestRate);\n            $period = CashFlowValidations::validateInt($period);\n            $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $futureValue = CashFlowValidations::validateFutureValue($futureValue);\n            $type = CashFlowValidations::validatePeriodType($type);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($period <= 0 || $period > $numberOfPeriods) {\n            return ExcelError::NAN();\n        }\n\n        // Calculate\n        $interestAndPrincipal = new InterestAndPrincipal(\n            $interestRate,\n            $period,\n            $numberOfPeriods,\n            $presentValue,\n            $futureValue,\n            $type\n        );\n\n        return $interestAndPrincipal->principal();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Constant;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\CashFlowValidations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Periodic\n{\n    /**\n     * FV.\n     *\n     * Returns the Future Value of a cash flow with constant payments and interest rate (annuities).\n     *\n     * Excel Function:\n     *        FV(rate,nper,pmt[,pv[,type]])\n     *\n     * @param mixed $rate The interest rate per period\n     * @param mixed $numberOfPeriods Total number of payment periods in an annuity as an integer\n     * @param mixed $payment The payment made each period: it cannot change over the\n     *                            life of the annuity. Typically, pmt contains principal\n     *                            and interest but no other fees or taxes.\n     * @param mixed $presentValue present Value, or the lump-sum amount that a series of\n     *                            future payments is worth right now\n     * @param mixed $type A number 0 or 1 and indicates when payments are due:\n     *                      0 or omitted    At the end of the period.\n     *                      1               At the beginning of the period.\n     */\n    public static function futureValue(\n        mixed $rate,\n        mixed $numberOfPeriods,\n        mixed $payment = 0.0,\n        mixed $presentValue = 0.0,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ): string|float {\n        $rate = Functions::flattenSingleValue($rate);\n        $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);\n        $payment = Functions::flattenSingleValue($payment) ?? 0.0;\n        $presentValue = Functions::flattenSingleValue($presentValue) ?? 0.0;\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n\n        try {\n            $rate = CashFlowValidations::validateRate($rate);\n            $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);\n            $payment = CashFlowValidations::validateFloat($payment);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $type = CashFlowValidations::validatePeriodType($type);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return self::calculateFutureValue($rate, $numberOfPeriods, $payment, $presentValue, $type);\n    }\n\n    /**\n     * PV.\n     *\n     * Returns the Present Value of a cash flow with constant payments and interest rate (annuities).\n     *\n     * @param mixed $rate Interest rate per period\n     * @param mixed $numberOfPeriods Number of periods as an integer\n     * @param mixed $payment Periodic payment (annuity)\n     * @param mixed $futureValue Future Value\n     * @param mixed $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function presentValue(\n        mixed $rate,\n        mixed $numberOfPeriods,\n        mixed $payment = 0.0,\n        mixed $futureValue = 0.0,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ): string|float {\n        $rate = Functions::flattenSingleValue($rate);\n        $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);\n        $payment = Functions::flattenSingleValue($payment) ?? 0.0;\n        $futureValue = Functions::flattenSingleValue($futureValue) ?? 0.0;\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n\n        try {\n            $rate = CashFlowValidations::validateRate($rate);\n            $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);\n            $payment = CashFlowValidations::validateFloat($payment);\n            $futureValue = CashFlowValidations::validateFutureValue($futureValue);\n            $type = CashFlowValidations::validatePeriodType($type);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($numberOfPeriods < 0) {\n            return ExcelError::NAN();\n        }\n\n        return self::calculatePresentValue($rate, $numberOfPeriods, $payment, $futureValue, $type);\n    }\n\n    /**\n     * NPER.\n     *\n     * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate.\n     *\n     * @param mixed $rate Interest rate per period\n     * @param mixed $payment Periodic payment (annuity)\n     * @param mixed $presentValue Present Value\n     * @param mixed $futureValue Future Value\n     * @param mixed $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function periods(\n        mixed $rate,\n        mixed $payment,\n        mixed $presentValue,\n        mixed $futureValue = 0.0,\n        mixed $type = FinancialConstants::PAYMENT_END_OF_PERIOD\n    ) {\n        $rate = Functions::flattenSingleValue($rate);\n        $payment = Functions::flattenSingleValue($payment);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $futureValue = Functions::flattenSingleValue($futureValue) ?? 0.0;\n        $type = Functions::flattenSingleValue($type) ?? FinancialConstants::PAYMENT_END_OF_PERIOD;\n\n        try {\n            $rate = CashFlowValidations::validateRate($rate);\n            $payment = CashFlowValidations::validateFloat($payment);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $futureValue = CashFlowValidations::validateFutureValue($futureValue);\n            $type = CashFlowValidations::validatePeriodType($type);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($payment == 0.0) {\n            return ExcelError::NAN();\n        }\n\n        return self::calculatePeriods($rate, $payment, $presentValue, $futureValue, $type);\n    }\n\n    private static function calculateFutureValue(\n        float $rate,\n        int $numberOfPeriods,\n        float $payment,\n        float $presentValue,\n        int $type\n    ): float {\n        if ($rate != 0) {\n            return -$presentValue\n                * (1 + $rate) ** $numberOfPeriods - $payment * (1 + $rate * $type) * ((1 + $rate) ** $numberOfPeriods - 1)\n                    / $rate;\n        }\n\n        return -$presentValue - $payment * $numberOfPeriods;\n    }\n\n    private static function calculatePresentValue(\n        float $rate,\n        int $numberOfPeriods,\n        float $payment,\n        float $futureValue,\n        int $type\n    ): float {\n        if ($rate != 0.0) {\n            return (-$payment * (1 + $rate * $type)\n                    * (((1 + $rate) ** $numberOfPeriods - 1) / $rate) - $futureValue) / (1 + $rate) ** $numberOfPeriods;\n        }\n\n        return -$futureValue - $payment * $numberOfPeriods;\n    }\n\n    private static function calculatePeriods(\n        float $rate,\n        float $payment,\n        float $presentValue,\n        float $futureValue,\n        int $type\n    ): string|float {\n        if ($rate != 0.0) {\n            if ($presentValue == 0.0) {\n                return ExcelError::NAN();\n            }\n\n            return log(($payment * (1 + $rate * $type) / $rate - $futureValue)\n                    / ($presentValue + $payment * (1 + $rate * $type) / $rate)) / log(1 + $rate);\n        }\n\n        return (-$presentValue - $futureValue) / $payment;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/Single.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Single\n{\n    /**\n     * FVSCHEDULE.\n     *\n     * Returns the future value of an initial principal after applying a series of compound interest rates.\n     * Use FVSCHEDULE to calculate the future value of an investment with a variable or adjustable rate.\n     *\n     * Excel Function:\n     *        FVSCHEDULE(principal,schedule)\n     *\n     * @param mixed $principal the present value\n     * @param float[] $schedule an array of interest rates to apply\n     */\n    public static function futureValue(mixed $principal, array $schedule): string|float\n    {\n        $principal = Functions::flattenSingleValue($principal);\n        $schedule = Functions::flattenArray($schedule);\n\n        try {\n            $principal = CashFlowValidations::validateFloat($principal);\n\n            foreach ($schedule as $rate) {\n                $rate = CashFlowValidations::validateFloat($rate);\n                $principal *= 1 + $rate;\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return $principal;\n    }\n\n    /**\n     * PDURATION.\n     *\n     * Calculates the number of periods required for an investment to reach a specified value.\n     *\n     * @param mixed $rate Interest rate per period\n     * @param mixed $presentValue Present Value\n     * @param mixed $futureValue Future Value\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function periods(mixed $rate, mixed $presentValue, mixed $futureValue): string|float\n    {\n        $rate = Functions::flattenSingleValue($rate);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $futureValue = Functions::flattenSingleValue($futureValue);\n\n        try {\n            $rate = CashFlowValidations::validateRate($rate);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $futureValue = CashFlowValidations::validateFutureValue($futureValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($rate <= 0.0 || $presentValue <= 0.0 || $futureValue <= 0.0) {\n            return ExcelError::NAN();\n        }\n\n        return (log($futureValue) - log($presentValue)) / log(1 + $rate);\n    }\n\n    /**\n     * RRI.\n     *\n     * Calculates the interest rate required for an investment to grow to a specified future value .\n     *\n     * @param mixed $periods The number of periods over which the investment is made, expect array|float\n     * @param mixed $presentValue Present Value, expect array|float\n     * @param mixed $futureValue Future Value, expect array|float\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function interestRate(mixed $periods = 0.0, mixed $presentValue = 0.0, mixed $futureValue = 0.0): string|float\n    {\n        $periods = Functions::flattenSingleValue($periods);\n        $presentValue = Functions::flattenSingleValue($presentValue);\n        $futureValue = Functions::flattenSingleValue($futureValue);\n\n        try {\n            $periods = CashFlowValidations::validateFloat($periods);\n            $presentValue = CashFlowValidations::validatePresentValue($presentValue);\n            $futureValue = CashFlowValidations::validateFutureValue($futureValue);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if ($periods <= 0.0 || $presentValue <= 0.0 || $futureValue < 0.0) {\n            return ExcelError::NAN();\n        }\n\n        return ($futureValue / $presentValue) ** (1 / $periods) - 1;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass NonPeriodic\n{\n    const FINANCIAL_MAX_ITERATIONS = 128;\n\n    const FINANCIAL_PRECISION = 1.0e-08;\n\n    const DEFAULT_GUESS = 0.1;\n\n    /**\n     * XIRR.\n     *\n     * Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic.\n     *\n     * Excel Function:\n     *        =XIRR(values,dates,guess)\n     *\n     * @param array<int, float|int|numeric-string> $values     A series of cash flow payments, expecting float[]\n     *                                The series of values must contain at least one positive value & one negative value\n     * @param array<int, float|int|numeric-string> $dates      A series of payment dates\n     *                                The first payment date indicates the beginning of the schedule of payments\n     *                                All other dates must be later than this date, but they may occur in any order\n     * @param mixed $guess        An optional guess at the expected answer\n     */\n    public static function rate(mixed $values, $dates, mixed $guess = self::DEFAULT_GUESS): float|string\n    {\n        $rslt = self::xirrPart1($values, $dates);\n        /** @var array<int, float|int|numeric-string> $dates */\n        if ($rslt !== '') {\n            return $rslt;\n        }\n\n        // create an initial range, with a root somewhere between 0 and guess\n        $guess = Functions::flattenSingleValue($guess) ?? self::DEFAULT_GUESS;\n        if (!is_numeric($guess)) {\n            return ExcelError::VALUE();\n        }\n        $guess = ($guess + 0.0) ?: self::DEFAULT_GUESS;\n        $x1 = 0.0;\n        $x2 = $guess + 0.0;\n        $f1 = self::xnpvOrdered($x1, $values, $dates, false);\n        $f2 = self::xnpvOrdered($x2, $values, $dates, false);\n        $found = false;\n        for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {\n            if (!is_numeric($f1)) {\n                return $f1;\n            }\n            if (!is_numeric($f2)) {\n                return $f2;\n            }\n            $f1 = (float) $f1;\n            $f2 = (float) $f2;\n            if (($f1 * $f2) < 0.0) {\n                $found = true;\n\n                break;\n            } elseif (abs($f1) < abs($f2)) {\n                $x1 += 1.6 * ($x1 - $x2);\n                $f1 = self::xnpvOrdered($x1, $values, $dates, false);\n            } else {\n                $x2 += 1.6 * ($x2 - $x1);\n                $f2 = self::xnpvOrdered($x2, $values, $dates, false);\n            }\n        }\n        if ($found) {\n            return self::xirrPart3($values, $dates, $x1, $x2);\n        }\n\n        // Newton-Raphson didn't work - try bisection\n        $x1 = $guess - 0.5;\n        $x2 = $guess + 0.5;\n        for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {\n            $f1 = self::xnpvOrdered($x1, $values, $dates, false, true);\n            $f2 = self::xnpvOrdered($x2, $values, $dates, false, true);\n            if (!is_numeric($f1) || !is_numeric($f2)) {\n                break;\n            }\n            if ($f1 * $f2 <= 0) {\n                $found = true;\n\n                break;\n            }\n            $x1 -= 0.5;\n            $x2 += 0.5;\n        }\n        if ($found) {\n            /** @var array<int, float|int|numeric-string> $dates */\n            return self::xirrBisection($values, $dates, $x1, $x2);\n        }\n\n        return ExcelError::NAN();\n    }\n\n    /**\n     * XNPV.\n     *\n     * Returns the net present value for a schedule of cash flows that is not necessarily periodic.\n     * To calculate the net present value for a series of cash flows that is periodic, use the NPV function.\n     *\n     * Excel Function:\n     *        =XNPV(rate,values,dates)\n     *\n     * @param mixed $rate the discount rate to apply to the cash flows, expect array|float\n     * @param array<int,float|int|numeric-string> $values A series of cash flows that corresponds to a schedule of payments in dates, expecting float[].\n     *                          The first payment is optional and corresponds to a cost or payment that occurs\n     *                              at the beginning of the investment.\n     *                          If the first value is a cost or payment, it must be a negative value.\n     *                             All succeeding payments are discounted based on a 365-day year.\n     *                          The series of values must contain at least one positive value and one negative value.\n     * @param mixed $dates A schedule of payment dates that corresponds to the cash flow payments, expecting mixed[].\n     *                         The first payment date indicates the beginning of the schedule of payments.\n     *                         All other dates must be later than this date, but they may occur in any order.\n     */\n    public static function presentValue(mixed $rate, mixed $values, mixed $dates): float|string\n    {\n        return self::xnpvOrdered($rate, $values, $dates, true);\n    }\n\n    private static function bothNegAndPos(bool $neg, bool $pos): bool\n    {\n        return $neg && $pos;\n    }\n\n    /** @param array<int, float|int|numeric-string> $values */\n    private static function xirrPart1(mixed &$values, mixed &$dates): string\n    {\n        /** @var array<int, float|int|numeric-string> */\n        $temp = Functions::flattenArray($values);\n        $values = $temp;\n        $dates = Functions::flattenArray($dates);\n        $valuesIsArray = count($values) > 1;\n        $datesIsArray = count($dates) > 1;\n        if (!$valuesIsArray && !$datesIsArray) {\n            return ExcelError::NA();\n        }\n        if (count($values) != count($dates)) {\n            return ExcelError::NAN();\n        }\n\n        $datesCount = count($dates);\n        for ($i = 0; $i < $datesCount; ++$i) {\n            try {\n                $dates[$i] = DateTimeExcel\\Helpers::getDateValue($dates[$i]);\n            } catch (Exception $e) {\n                return $e->getMessage();\n            }\n        }\n\n        return self::xirrPart2($values);\n    }\n\n    /** @param array<int, float|int|numeric-string> $values */\n    private static function xirrPart2(array &$values): string\n    {\n        $valCount = count($values);\n        $foundpos = false;\n        $foundneg = false;\n        for ($i = 0; $i < $valCount; ++$i) {\n            $fld = $values[$i];\n            if (!is_numeric($fld)) { //* @phpstan-ignore-line\n                return ExcelError::VALUE();\n            } elseif ($fld > 0) {\n                $foundpos = true;\n            } elseif ($fld < 0) {\n                $foundneg = true;\n            }\n        }\n        if (!self::bothNegAndPos($foundneg, $foundpos)) {\n            return ExcelError::NAN();\n        }\n\n        return '';\n    }\n\n    /**\n     * @param array<int, float|int|numeric-string> $values\n     * @param array<int, float|int|numeric-string> $dates\n     */\n    private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float|string\n    {\n        $f = self::xnpvOrdered($x1, $values, $dates, false);\n        if ($f < 0.0) {\n            $rtb = $x1;\n            $dx = $x2 - $x1;\n        } else {\n            $rtb = $x2;\n            $dx = $x1 - $x2;\n        }\n\n        $rslt = ExcelError::VALUE();\n        for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {\n            $dx *= 0.5;\n            $x_mid = $rtb + $dx;\n            $f_mid = (float) self::xnpvOrdered($x_mid, $values, $dates, false);\n            if ($f_mid <= 0.0) {\n                $rtb = $x_mid;\n            }\n            if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) {\n                $rslt = $x_mid;\n\n                break;\n            }\n        }\n\n        return $rslt;\n    }\n\n    /**\n     * @param array<int, float|int|numeric-string> $values\n     * @param array<int, float|int|numeric-string> $dates\n     */\n    private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string|float\n    {\n        $rslt = ExcelError::NAN();\n        for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {\n            $rslt = ExcelError::NAN();\n            $f1 = self::xnpvOrdered($x1, $values, $dates, false, true);\n            $f2 = self::xnpvOrdered($x2, $values, $dates, false, true);\n            if (!is_numeric($f1) || !is_numeric($f2)) {\n                break;\n            }\n            $f1 = (float) $f1;\n            $f2 = (float) $f2;\n            if (abs($f1) < self::FINANCIAL_PRECISION && abs($f2) < self::FINANCIAL_PRECISION) {\n                break;\n            }\n            if ($f1 * $f2 > 0) {\n                break;\n            }\n            $rslt = ($x1 + $x2) / 2;\n            $f3 = self::xnpvOrdered($rslt, $values, $dates, false, true);\n            if (!is_float($f3)) {\n                break;\n            }\n            if ($f3 * $f1 < 0) {\n                $x2 = $rslt;\n            } else {\n                $x1 = $rslt;\n            }\n            if (abs($f3) < self::FINANCIAL_PRECISION) {\n                break;\n            }\n        }\n\n        return $rslt;\n    }\n\n    /** @param array<int,float|int|numeric-string> $values> */\n    private static function xnpvOrdered(mixed $rate, mixed $values, mixed $dates, bool $ordered = true, bool $capAtNegative1 = false): float|string\n    {\n        $rate = Functions::flattenSingleValue($rate);\n        if (!is_numeric($rate)) {\n            return ExcelError::VALUE();\n        }\n        $values = Functions::flattenArray($values);\n        $dates = Functions::flattenArray($dates);\n        $valCount = count($values);\n\n        try {\n            self::validateXnpv($rate, $values, $dates);\n            if ($capAtNegative1 && $rate <= -1) {\n                $rate = -1.0 + 1.0E-10;\n            }\n            $date0 = DateTimeExcel\\Helpers::getDateValue($dates[0]);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $xnpv = 0.0;\n        for ($i = 0; $i < $valCount; ++$i) {\n            if (!is_numeric($values[$i])) {\n                return ExcelError::VALUE();\n            }\n\n            try {\n                $datei = DateTimeExcel\\Helpers::getDateValue($dates[$i]);\n            } catch (Exception $e) {\n                return $e->getMessage();\n            }\n            if ($date0 > $datei) {\n                $dif = $ordered ? ExcelError::NAN() : -((int) DateTimeExcel\\Difference::interval($datei, $date0, 'd'));\n            } else {\n                $dif = Functions::scalar(DateTimeExcel\\Difference::interval($date0, $datei, 'd'));\n            }\n            if (!is_numeric($dif)) {\n                return StringHelper::convertToString($dif);\n            }\n            if ($rate <= -1.0) {\n                $xnpv += -abs($values[$i] + 0) / (-1 - $rate) ** ($dif / 365);\n            } else {\n                $xnpv += $values[$i] / (1 + $rate) ** ($dif / 365);\n            }\n        }\n\n        return is_finite($xnpv) ? $xnpv : ExcelError::VALUE();\n    }\n\n    /**\n     * @param mixed[] $values\n     * @param mixed[] $dates\n     */\n    private static function validateXnpv(mixed $rate, array $values, array $dates): void\n    {\n        if (!is_numeric($rate)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n        $valCount = count($values);\n        if ($valCount != count($dates)) {\n            throw new Exception(ExcelError::NAN());\n        }\n        if (count($values) > 1 && ((min($values) > 0) || (max($values) < 0))) {\n            throw new Exception(ExcelError::NAN());\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\CashFlow\\Variable;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Periodic\n{\n    const FINANCIAL_MAX_ITERATIONS = 128;\n\n    const FINANCIAL_PRECISION = 1.0e-08;\n\n    /**\n     * IRR.\n     *\n     * Returns the internal rate of return for a series of cash flows represented by the numbers in values.\n     * These cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur\n     * at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received\n     * for an investment consisting of payments (negative values) and income (positive values) that occur at regular\n     * periods.\n     *\n     * Excel Function:\n     *        IRR(values[,guess])\n     *\n     * @param mixed $values An array or a reference to cells that contain numbers for which you want\n     *                                    to calculate the internal rate of return.\n     *                                Values must contain at least one positive value and one negative value to\n     *                                    calculate the internal rate of return.\n     * @param mixed $guess A number that you guess is close to the result of IRR\n     */\n    public static function rate(mixed $values, mixed $guess = 0.1): string|float\n    {\n        if (!is_array($values)) {\n            return ExcelError::VALUE();\n        }\n        $values = Functions::flattenArray($values);\n        $guess = Functions::flattenSingleValue($guess);\n        if (!is_numeric($guess)) {\n            return ExcelError::VALUE();\n        }\n\n        // create an initial range, with a root somewhere between 0 and guess\n        $x1 = 0.0;\n        $x2 = $guess;\n        $f1 = self::presentValue($x1, $values);\n        $f2 = self::presentValue($x2, $values);\n        for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {\n            if (($f1 * $f2) < 0.0) {\n                break;\n            }\n            if (abs($f1) < abs($f2)) {\n                $f1 = self::presentValue($x1 += 1.6 * ($x1 - $x2), $values);\n            } else {\n                $f2 = self::presentValue($x2 += 1.6 * ($x2 - $x1), $values);\n            }\n        }\n        if (($f1 * $f2) > 0.0) {\n            return ExcelError::VALUE();\n        }\n\n        $f = self::presentValue($x1, $values);\n        if ($f < 0.0) {\n            $rtb = $x1;\n            $dx = $x2 - $x1;\n        } else {\n            $rtb = $x2;\n            $dx = $x1 - $x2;\n        }\n\n        for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {\n            $dx *= 0.5;\n            $x_mid = $rtb + $dx;\n            $f_mid = self::presentValue($x_mid, $values);\n            if ($f_mid <= 0.0) {\n                $rtb = $x_mid;\n            }\n            if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) {\n                return $x_mid;\n            }\n        }\n\n        return ExcelError::VALUE();\n    }\n\n    /**\n     * MIRR.\n     *\n     * Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both\n     *        the cost of the investment and the interest received on reinvestment of cash.\n     *\n     * Excel Function:\n     *        MIRR(values,finance_rate, reinvestment_rate)\n     *\n     * @param mixed $values An array or a reference to cells that contain a series of payments and\n     *                         income occurring at regular intervals.\n     *                      Payments are negative value, income is positive values.\n     * @param mixed $financeRate The interest rate you pay on the money used in the cash flows\n     * @param mixed $reinvestmentRate The interest rate you receive on the cash flows as you reinvest them\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function modifiedRate(mixed $values, mixed $financeRate, mixed $reinvestmentRate): string|float\n    {\n        if (!is_array($values)) {\n            return ExcelError::DIV0();\n        }\n        $values = Functions::flattenArray($values);\n        /** @var float */\n        $financeRate = Functions::flattenSingleValue($financeRate);\n        /** @var float */\n        $reinvestmentRate = Functions::flattenSingleValue($reinvestmentRate);\n        $n = count($values);\n\n        $rr = 1.0 + $reinvestmentRate;\n        $fr = 1.0 + $financeRate;\n\n        $npvPos = $npvNeg = 0.0;\n        foreach ($values as $i => $v) {\n            /** @var float $v */\n            if ($v >= 0) {\n                $npvPos += $v / $rr ** $i;\n            } else {\n                $npvNeg += $v / $fr ** $i;\n            }\n        }\n\n        if ($npvNeg === 0.0 || $npvPos === 0.0) {\n            return ExcelError::DIV0();\n        }\n\n        $mirr = ((-$npvPos * $rr ** $n)\n                / ($npvNeg * ($rr))) ** (1.0 / ($n - 1)) - 1.0;\n\n        return is_finite($mirr) ? $mirr : ExcelError::NAN();\n    }\n\n    /**\n     * NPV.\n     *\n     * Returns the Net Present Value of a cash flow series given a discount rate.\n     *\n     * @param array<mixed> $args\n     */\n    public static function presentValue(mixed $rate, ...$args): int|float\n    {\n        $returnValue = 0;\n\n        /** @var float */\n        $rate = Functions::flattenSingleValue($rate);\n        $aArgs = Functions::flattenArray($args);\n\n        // Calculate\n        $countArgs = count($aArgs);\n        for ($i = 1; $i <= $countArgs; ++$i) {\n            // Is it a numeric value?\n            if (is_numeric($aArgs[$i - 1])) {\n                $returnValue += $aArgs[$i - 1] / (1 + $rate) ** $i;\n            }\n        }\n\n        return $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Constants.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nclass Constants\n{\n    public const BASIS_DAYS_PER_YEAR_NASD = 0;\n    public const BASIS_DAYS_PER_YEAR_ACTUAL = 1;\n    public const BASIS_DAYS_PER_YEAR_360 = 2;\n    public const BASIS_DAYS_PER_YEAR_365 = 3;\n    public const BASIS_DAYS_PER_YEAR_360_EUROPEAN = 4;\n\n    public const FREQUENCY_ANNUAL = 1;\n    public const FREQUENCY_SEMI_ANNUAL = 2;\n    public const FREQUENCY_QUARTERLY = 4;\n\n    public const PAYMENT_END_OF_PERIOD = 0;\n    public const PAYMENT_BEGINNING_OF_PERIOD = 1;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Coupons.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\n\nclass Coupons\n{\n    private const PERIOD_DATE_PREVIOUS = false;\n    private const PERIOD_DATE_NEXT = true;\n\n    /**\n     * COUPDAYBS.\n     *\n     * Returns the number of days from the beginning of the coupon period to the settlement date.\n     *\n     * Excel Function:\n     *        COUPDAYBS(settlement,maturity,frequency[,basis])\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue\n     *                                  date when the security is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $frequency The number of coupon payments per year (int).\n     *                             Valid frequency values are:\n     *                               1    Annual\n     *                               2    Semi-Annual\n     *                               4    Quarterly\n     * @param mixed $basis The type of day count to use (int).\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     */\n    public static function COUPDAYBS(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $frequency,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|int|float {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $frequency = Functions::flattenSingleValue($frequency);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            self::validateCouponPeriod($settlement, $maturity);\n            $frequency = FinancialValidations::validateFrequency($frequency);\n            $basis = FinancialValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $daysPerYear = Helpers::daysPerYear(Functions::scalar(DateTimeExcel\\DateParts::year($settlement)), $basis);\n        if (is_string($daysPerYear)) {\n            return ExcelError::VALUE();\n        }\n        $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_PREVIOUS);\n\n        if ($basis === FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL) {\n            return abs((float) DateTimeExcel\\Days::between($prev, $settlement));\n        }\n\n        return (float) DateTimeExcel\\YearFrac::fraction($prev, $settlement, $basis) * $daysPerYear;\n    }\n\n    /**\n     * COUPDAYS.\n     *\n     * Returns the number of days in the coupon period that contains the settlement date.\n     *\n     * Excel Function:\n     *        COUPDAYS(settlement,maturity,frequency[,basis])\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue\n     *                                  date when the security is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $frequency The number of coupon payments per year.\n     *                             Valid frequency values are:\n     *                               1    Annual\n     *                               2    Semi-Annual\n     *                               4    Quarterly\n     * @param mixed $basis The type of day count to use (int).\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     */\n    public static function COUPDAYS(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $frequency,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|int|float {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $frequency = Functions::flattenSingleValue($frequency);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            self::validateCouponPeriod($settlement, $maturity);\n            $frequency = FinancialValidations::validateFrequency($frequency);\n            $basis = FinancialValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        switch ($basis) {\n            case FinancialConstants::BASIS_DAYS_PER_YEAR_365:\n                // Actual/365\n                return 365 / $frequency;\n            case FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL:\n                // Actual/actual\n                if ($frequency == FinancialConstants::FREQUENCY_ANNUAL) {\n                    $daysPerYear = (int) Helpers::daysPerYear(Functions::scalar(DateTimeExcel\\DateParts::year($settlement)), $basis);\n\n                    return $daysPerYear / $frequency;\n                }\n                $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_PREVIOUS);\n                $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_NEXT);\n\n                return $next - $prev;\n            default:\n                // US (NASD) 30/360, Actual/360 or European 30/360\n                return 360 / $frequency;\n        }\n    }\n\n    /**\n     * COUPDAYSNC.\n     *\n     * Returns the number of days from the settlement date to the next coupon date.\n     *\n     * Excel Function:\n     *        COUPDAYSNC(settlement,maturity,frequency[,basis])\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue\n     *                                  date when the security is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $frequency The number of coupon payments per year.\n     *                             Valid frequency values are:\n     *                               1    Annual\n     *                               2    Semi-Annual\n     *                               4    Quarterly\n     * @param mixed $basis The type of day count to use (int) .\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     */\n    public static function COUPDAYSNC(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $frequency,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|float {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $frequency = Functions::flattenSingleValue($frequency);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            self::validateCouponPeriod($settlement, $maturity);\n            $frequency = FinancialValidations::validateFrequency($frequency);\n            $basis = FinancialValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        /** @var int $daysPerYear */\n        $daysPerYear = Helpers::daysPerYear(Functions::Scalar(DateTimeExcel\\DateParts::year($settlement)), $basis);\n        $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_NEXT);\n\n        if ($basis === FinancialConstants::BASIS_DAYS_PER_YEAR_NASD) {\n            $settlementDate = Date::excelToDateTimeObject($settlement);\n            $settlementEoM = Helpers::isLastDayOfMonth($settlementDate);\n            if ($settlementEoM) {\n                ++$settlement;\n            }\n        }\n\n        return (float) DateTimeExcel\\YearFrac::fraction($settlement, $next, $basis) * $daysPerYear;\n    }\n\n    /**\n     * COUPNCD.\n     *\n     * Returns the next coupon date after the settlement date.\n     *\n     * Excel Function:\n     *        COUPNCD(settlement,maturity,frequency[,basis])\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue\n     *                                  date when the security is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $frequency The number of coupon payments per year.\n     *                             Valid frequency values are:\n     *                               1    Annual\n     *                               2    Semi-Annual\n     *                               4    Quarterly\n     * @param mixed $basis The type of day count to use (int).\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     *\n     * @return float|string Excel date/time serial value or error message\n     */\n    public static function COUPNCD(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $frequency,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|float {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $frequency = Functions::flattenSingleValue($frequency);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            self::validateCouponPeriod($settlement, $maturity);\n            $frequency = FinancialValidations::validateFrequency($frequency);\n            FinancialValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_NEXT);\n    }\n\n    /**\n     * COUPNUM.\n     *\n     * Returns the number of coupons payable between the settlement date and maturity date,\n     * rounded up to the nearest whole coupon.\n     *\n     * Excel Function:\n     *        COUPNUM(settlement,maturity,frequency[,basis])\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue\n     *                                  date when the security is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $frequency The number of coupon payments per year.\n     *                             Valid frequency values are:\n     *                               1    Annual\n     *                               2    Semi-Annual\n     *                               4    Quarterly\n     * @param mixed $basis The type of day count to use (int).\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     */\n    public static function COUPNUM(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $frequency,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|int {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $frequency = Functions::flattenSingleValue($frequency);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            self::validateCouponPeriod($settlement, $maturity);\n            $frequency = FinancialValidations::validateFrequency($frequency);\n            FinancialValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $yearsBetweenSettlementAndMaturity = DateTimeExcel\\YearFrac::fraction(\n            $settlement,\n            $maturity,\n            FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n        );\n\n        return (int) ceil((float) $yearsBetweenSettlementAndMaturity * $frequency);\n    }\n\n    /**\n     * COUPPCD.\n     *\n     * Returns the previous coupon date before the settlement date.\n     *\n     * Excel Function:\n     *        COUPPCD(settlement,maturity,frequency[,basis])\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue\n     *                              date when the security is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $frequency The number of coupon payments per year.\n     *                             Valid frequency values are:\n     *                               1    Annual\n     *                               2    Semi-Annual\n     *                               4    Quarterly\n     * @param mixed $basis The type of day count to use (int).\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     *\n     * @return float|string Excel date/time serial value or error message\n     */\n    public static function COUPPCD(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $frequency,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|float {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $frequency = Functions::flattenSingleValue($frequency);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            self::validateCouponPeriod($settlement, $maturity);\n            $frequency = FinancialValidations::validateFrequency($frequency);\n            FinancialValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_PREVIOUS);\n    }\n\n    private static function monthsDiff(DateTime $result, int $months, string $plusOrMinus, int $day, bool $lastDayFlag): void\n    {\n        $result->setDate((int) $result->format('Y'), (int) $result->format('m'), 1);\n        $result->modify(\"$plusOrMinus $months months\");\n        $daysInMonth = (int) $result->format('t');\n        $result->setDate((int) $result->format('Y'), (int) $result->format('m'), $lastDayFlag ? $daysInMonth : min($day, $daysInMonth));\n    }\n\n    private static function couponFirstPeriodDate(float $settlement, float $maturity, int $frequency, bool $next): float\n    {\n        $months = 12 / $frequency;\n\n        $result = Date::excelToDateTimeObject($maturity);\n        $day = (int) $result->format('d');\n        $lastDayFlag = Helpers::isLastDayOfMonth($result);\n\n        while ($settlement < Date::PHPToExcel($result)) {\n            self::monthsDiff($result, $months, '-', $day, $lastDayFlag);\n        }\n        if ($next === true) {\n            self::monthsDiff($result, $months, '+', $day, $lastDayFlag);\n        }\n\n        return (float) Date::PHPToExcel($result);\n    }\n\n    private static function validateCouponPeriod(float $settlement, float $maturity): void\n    {\n        if ($settlement >= $maturity) {\n            throw new Exception(ExcelError::NAN());\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Depreciation.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Depreciation\n{\n    private static float $zeroPointZero = 0.0;\n\n    /**\n     * DB.\n     *\n     * Returns the depreciation of an asset for a specified period using the\n     * fixed-declining balance method.\n     * This form of depreciation is used if you want to get a higher depreciation value\n     * at the beginning of the depreciation (as opposed to linear depreciation). The\n     * depreciation value is reduced with every depreciation period by the depreciation\n     * already deducted from the initial cost.\n     *\n     * Excel Function:\n     *        DB(cost,salvage,life,period[,month])\n     *\n     * @param mixed $cost Initial cost of the asset\n     * @param mixed $salvage Value at the end of the depreciation.\n     *                             (Sometimes called the salvage value of the asset)\n     * @param mixed $life Number of periods over which the asset is depreciated.\n     *                           (Sometimes called the useful life of the asset)\n     * @param mixed $period The period for which you want to calculate the\n     *                          depreciation. Period must use the same units as life.\n     * @param mixed $month Number of months in the first year. If month is omitted,\n     *                         it defaults to 12.\n     */\n    public static function DB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $month = 12): string|float|int\n    {\n        $cost = Functions::flattenSingleValue($cost);\n        $salvage = Functions::flattenSingleValue($salvage);\n        $life = Functions::flattenSingleValue($life);\n        $period = Functions::flattenSingleValue($period);\n        $month = Functions::flattenSingleValue($month);\n\n        try {\n            $cost = self::validateCost($cost);\n            $salvage = self::validateSalvage($salvage);\n            $life = self::validateLife($life);\n            $period = self::validatePeriod($period);\n            $month = self::validateMonth($month);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($cost === self::$zeroPointZero) {\n            return 0.0;\n        }\n\n        //    Set Fixed Depreciation Rate\n        $fixedDepreciationRate = 1 - ($salvage / $cost) ** (1 / $life);\n        $fixedDepreciationRate = round($fixedDepreciationRate, 3);\n\n        //    Loop through each period calculating the depreciation\n        // TODO Handle period value between 0 and 1 (e.g. 0.5)\n        $previousDepreciation = 0;\n        $depreciation = 0;\n        for ($per = 1; $per <= $period; ++$per) {\n            if ($per == 1) {\n                $depreciation = $cost * $fixedDepreciationRate * $month / 12;\n            } elseif ($per == ($life + 1)) {\n                $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate * (12 - $month) / 12;\n            } else {\n                $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate;\n            }\n            $previousDepreciation += $depreciation;\n        }\n\n        return $depreciation;\n    }\n\n    /**\n     * DDB.\n     *\n     * Returns the depreciation of an asset for a specified period using the\n     * double-declining balance method or some other method you specify.\n     *\n     * Excel Function:\n     *        DDB(cost,salvage,life,period[,factor])\n     *\n     * @param mixed $cost Initial cost of the asset\n     * @param mixed $salvage Value at the end of the depreciation.\n     *                                (Sometimes called the salvage value of the asset)\n     * @param mixed $life Number of periods over which the asset is depreciated.\n     *                                (Sometimes called the useful life of the asset)\n     * @param mixed $period The period for which you want to calculate the\n     *                                depreciation. Period must use the same units as life.\n     * @param mixed $factor The rate at which the balance declines.\n     *                                If factor is omitted, it is assumed to be 2 (the\n     *                                double-declining balance method).\n     */\n    public static function DDB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $factor = 2.0): float|string\n    {\n        $cost = Functions::flattenSingleValue($cost);\n        $salvage = Functions::flattenSingleValue($salvage);\n        $life = Functions::flattenSingleValue($life);\n        $period = Functions::flattenSingleValue($period);\n        $factor = Functions::flattenSingleValue($factor);\n\n        try {\n            $cost = self::validateCost($cost);\n            $salvage = self::validateSalvage($salvage);\n            $life = self::validateLife($life);\n            $period = self::validatePeriod($period);\n            $factor = self::validateFactor($factor);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($period > $life) {\n            return ExcelError::NAN();\n        }\n\n        // Loop through each period calculating the depreciation\n        // TODO Handling for fractional $period values\n        $previousDepreciation = 0;\n        $depreciation = 0;\n        for ($per = 1; $per <= $period; ++$per) {\n            $depreciation = min(\n                ($cost - $previousDepreciation) * ($factor / $life),\n                ($cost - $salvage - $previousDepreciation)\n            );\n            $previousDepreciation += $depreciation;\n        }\n\n        return $depreciation;\n    }\n\n    /**\n     * SLN.\n     *\n     * Returns the straight-line depreciation of an asset for one period\n     *\n     * @param mixed $cost Initial cost of the asset\n     * @param mixed $salvage Value at the end of the depreciation\n     * @param mixed $life Number of periods over which the asset is depreciated\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function SLN(mixed $cost, mixed $salvage, mixed $life): string|float\n    {\n        $cost = Functions::flattenSingleValue($cost);\n        $salvage = Functions::flattenSingleValue($salvage);\n        $life = Functions::flattenSingleValue($life);\n\n        try {\n            $cost = self::validateCost($cost, true);\n            $salvage = self::validateSalvage($salvage, true);\n            $life = self::validateLife($life, true);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($life === self::$zeroPointZero) {\n            return ExcelError::DIV0();\n        }\n\n        return ($cost - $salvage) / $life;\n    }\n\n    /**\n     * SYD.\n     *\n     * Returns the sum-of-years' digits depreciation of an asset for a specified period.\n     *\n     * @param mixed $cost Initial cost of the asset\n     * @param mixed $salvage Value at the end of the depreciation\n     * @param mixed $life Number of periods over which the asset is depreciated\n     * @param mixed $period Period\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function SYD(mixed $cost, mixed $salvage, mixed $life, mixed $period): string|float\n    {\n        $cost = Functions::flattenSingleValue($cost);\n        $salvage = Functions::flattenSingleValue($salvage);\n        $life = Functions::flattenSingleValue($life);\n        $period = Functions::flattenSingleValue($period);\n\n        try {\n            $cost = self::validateCost($cost, true);\n            $salvage = self::validateSalvage($salvage);\n            $life = self::validateLife($life);\n            $period = self::validatePeriod($period);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($period > $life) {\n            return ExcelError::NAN();\n        }\n\n        $syd = (($cost - $salvage) * ($life - $period + 1) * 2) / ($life * ($life + 1));\n\n        return $syd;\n    }\n\n    private static function validateCost(mixed $cost, bool $negativeValueAllowed = false): float\n    {\n        $cost = FinancialValidations::validateFloat($cost);\n        if ($cost < 0.0 && $negativeValueAllowed === false) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $cost;\n    }\n\n    private static function validateSalvage(mixed $salvage, bool $negativeValueAllowed = false): float\n    {\n        $salvage = FinancialValidations::validateFloat($salvage);\n        if ($salvage < 0.0 && $negativeValueAllowed === false) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $salvage;\n    }\n\n    private static function validateLife(mixed $life, bool $negativeValueAllowed = false): float\n    {\n        $life = FinancialValidations::validateFloat($life);\n        if ($life < 0.0 && $negativeValueAllowed === false) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $life;\n    }\n\n    private static function validatePeriod(mixed $period, bool $negativeValueAllowed = false): float\n    {\n        $period = FinancialValidations::validateFloat($period);\n        if ($period <= 0.0 && $negativeValueAllowed === false) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $period;\n    }\n\n    private static function validateMonth(mixed $month): int\n    {\n        $month = FinancialValidations::validateInt($month);\n        if ($month < 1) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $month;\n    }\n\n    private static function validateFactor(mixed $factor): float\n    {\n        $factor = FinancialValidations::validateFloat($factor);\n        if ($factor <= 0.0) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $factor;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Dollar.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format;\n\nclass Dollar\n{\n    use ArrayEnabled;\n\n    /**\n     * DOLLAR.\n     *\n     * This function converts a number to text using currency format, with the decimals rounded to the specified place.\n     * The format used is $#,##0.00_);($#,##0.00)..\n     *\n     * @param mixed $number The value to format, or can be an array of numbers\n     *                         Or can be an array of values\n     * @param mixed $precision The number of digits to display to the right of the decimal point (as an integer).\n     *                            If precision is negative, number is rounded to the left of the decimal point.\n     *                            If you omit precision, it is assumed to be 2\n     *              Or can be an array of precision values\n     *\n     * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function format(mixed $number, mixed $precision = 2)\n    {\n        return Format::DOLLAR($number, $precision);\n    }\n\n    /**\n     * DOLLARDE.\n     *\n     * Converts a dollar price expressed as an integer part and a fraction\n     *        part into a dollar price expressed as a decimal number.\n     * Fractional dollar numbers are sometimes used for security prices.\n     *\n     * Excel Function:\n     *        DOLLARDE(fractional_dollar,fraction)\n     *\n     * @param mixed $fractionalDollar Fractional Dollar\n     *              Or can be an array of values\n     * @param mixed $fraction Fraction\n     *              Or can be an array of values\n     *\n     * @return array<mixed>|float|string\n     */\n    public static function decimal(mixed $fractionalDollar = null, mixed $fraction = 0): array|string|float\n    {\n        if (is_array($fractionalDollar) || is_array($fraction)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $fractionalDollar, $fraction);\n        }\n\n        try {\n            $fractionalDollar = FinancialValidations::validateFloat(\n                Functions::flattenSingleValue($fractionalDollar) ?? 0.0\n            );\n            $fraction = FinancialValidations::validateInt(Functions::flattenSingleValue($fraction));\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Additional parameter validations\n        if ($fraction < 0) {\n            return ExcelError::NAN();\n        }\n        if ($fraction == 0) {\n            return ExcelError::DIV0();\n        }\n\n        $dollars = ($fractionalDollar < 0) ? ceil($fractionalDollar) : floor($fractionalDollar);\n        $cents = fmod($fractionalDollar, 1.0);\n        $cents /= $fraction;\n        $cents *= 10 ** ceil(log10($fraction));\n\n        return $dollars + $cents;\n    }\n\n    /**\n     * DOLLARFR.\n     *\n     * Converts a dollar price expressed as a decimal number into a dollar price\n     *        expressed as a fraction.\n     * Fractional dollar numbers are sometimes used for security prices.\n     *\n     * Excel Function:\n     *        DOLLARFR(decimal_dollar,fraction)\n     *\n     * @param mixed $decimalDollar Decimal Dollar\n     *              Or can be an array of values\n     * @param mixed $fraction Fraction\n     *              Or can be an array of values\n     *\n     * @return array<mixed>|float|string\n     */\n    public static function fractional(mixed $decimalDollar = null, mixed $fraction = 0): array|string|float\n    {\n        if (is_array($decimalDollar) || is_array($fraction)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $decimalDollar, $fraction);\n        }\n\n        try {\n            $decimalDollar = FinancialValidations::validateFloat(\n                Functions::flattenSingleValue($decimalDollar) ?? 0.0\n            );\n            $fraction = FinancialValidations::validateInt(Functions::flattenSingleValue($fraction));\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Additional parameter validations\n        if ($fraction < 0) {\n            return ExcelError::NAN();\n        }\n        if ($fraction == 0) {\n            return ExcelError::DIV0();\n        }\n\n        $dollars = ($decimalDollar < 0.0) ? ceil($decimalDollar) : floor($decimalDollar);\n        $cents = fmod($decimalDollar, 1);\n        $cents *= $fraction;\n        $cents *= 10 ** (-ceil(log10($fraction)));\n\n        return $dollars + $cents;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass FinancialValidations\n{\n    public static function validateDate(mixed $date): float\n    {\n        return DateTimeExcel\\Helpers::getDateValue($date);\n    }\n\n    public static function validateSettlementDate(mixed $settlement): float\n    {\n        return self::validateDate($settlement);\n    }\n\n    public static function validateMaturityDate(mixed $maturity): float\n    {\n        return self::validateDate($maturity);\n    }\n\n    public static function validateFloat(mixed $value): float\n    {\n        if (!is_numeric($value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (float) $value;\n    }\n\n    public static function validateInt(mixed $value): int\n    {\n        if (!is_numeric($value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (int) floor((float) $value);\n    }\n\n    public static function validateRate(mixed $rate): float\n    {\n        $rate = self::validateFloat($rate);\n        if ($rate < 0.0) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $rate;\n    }\n\n    public static function validateFrequency(mixed $frequency): int\n    {\n        $frequency = self::validateInt($frequency);\n        if (\n            ($frequency !== FinancialConstants::FREQUENCY_ANNUAL)\n            && ($frequency !== FinancialConstants::FREQUENCY_SEMI_ANNUAL)\n            && ($frequency !== FinancialConstants::FREQUENCY_QUARTERLY)\n        ) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $frequency;\n    }\n\n    public static function validateBasis(mixed $basis): int\n    {\n        if (!is_numeric($basis)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        $basis = (int) $basis;\n        if (($basis < 0) || ($basis > 4)) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $basis;\n    }\n\n    public static function validatePrice(mixed $price): float\n    {\n        $price = self::validateFloat($price);\n        if ($price < 0.0) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $price;\n    }\n\n    public static function validateParValue(mixed $parValue): float\n    {\n        $parValue = self::validateFloat($parValue);\n        if ($parValue < 0.0) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $parValue;\n    }\n\n    public static function validateYield(mixed $yield): float\n    {\n        $yield = self::validateFloat($yield);\n        if ($yield < 0.0) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $yield;\n    }\n\n    public static function validateDiscount(mixed $discount): float\n    {\n        $discount = self::validateFloat($discount);\n        if ($discount <= 0.0) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $discount;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Helpers.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Helpers\n{\n    /**\n     * daysPerYear.\n     *\n     * Returns the number of days in a specified year, as defined by the \"basis\" value\n     *\n     * @param mixed $year The year against which we're testing, expect int|string\n     * @param int|string $basis The type of day count:\n     *                              0 or omitted US (NASD)   360\n     *                              1                        Actual (365 or 366 in a leap year)\n     *                              2                        360\n     *                              3                        365\n     *                              4                        European 360\n     *\n     * @return int|string Result, or a string containing an error\n     */\n    public static function daysPerYear(mixed $year, $basis = 0): string|int\n    {\n        if (!is_int($year) && !is_string($year)) {\n            return ExcelError::VALUE();\n        }\n        if (!is_numeric($basis)) {\n            return ExcelError::NAN();\n        }\n\n        switch ($basis) {\n            case FinancialConstants::BASIS_DAYS_PER_YEAR_NASD:\n            case FinancialConstants::BASIS_DAYS_PER_YEAR_360:\n            case FinancialConstants::BASIS_DAYS_PER_YEAR_360_EUROPEAN:\n                return 360;\n            case FinancialConstants::BASIS_DAYS_PER_YEAR_365:\n                return 365;\n            case FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL:\n                return (DateTimeExcel\\Helpers::isLeapYear($year)) ? 366 : 365;\n        }\n\n        return ExcelError::NAN();\n    }\n\n    /**\n     * isLastDayOfMonth.\n     *\n     * Returns a boolean TRUE/FALSE indicating if this date is the last date of the month\n     *\n     * @param DateTimeInterface $date The date for testing\n     */\n    public static function isLastDayOfMonth(DateTimeInterface $date): bool\n    {\n        return $date->format('d') === $date->format('t');\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/InterestRate.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass InterestRate\n{\n    /**\n     * EFFECT.\n     *\n     * Returns the effective interest rate given the nominal rate and the number of\n     *        compounding payments per year.\n     *\n     * Excel Function:\n     *        EFFECT(nominal_rate,npery)\n     *\n     * @param mixed $nominalRate Nominal interest rate as a float\n     * @param mixed $periodsPerYear Integer number of compounding payments per year\n     */\n    public static function effective(mixed $nominalRate = 0, mixed $periodsPerYear = 0): string|float\n    {\n        $nominalRate = Functions::flattenSingleValue($nominalRate);\n        $periodsPerYear = Functions::flattenSingleValue($periodsPerYear);\n\n        try {\n            $nominalRate = FinancialValidations::validateFloat($nominalRate);\n            $periodsPerYear = FinancialValidations::validateInt($periodsPerYear);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($nominalRate <= 0 || $periodsPerYear < 1) {\n            return ExcelError::NAN();\n        }\n\n        return ((1 + $nominalRate / $periodsPerYear) ** $periodsPerYear) - 1;\n    }\n\n    /**\n     * NOMINAL.\n     *\n     * Returns the nominal interest rate given the effective rate and the number of compounding payments per year.\n     *\n     * @param mixed $effectiveRate Effective interest rate as a float\n     * @param mixed $periodsPerYear Integer number of compounding payments per year\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function nominal(mixed $effectiveRate = 0, mixed $periodsPerYear = 0): string|float\n    {\n        $effectiveRate = Functions::flattenSingleValue($effectiveRate);\n        $periodsPerYear = Functions::flattenSingleValue($periodsPerYear);\n\n        try {\n            $effectiveRate = FinancialValidations::validateFloat($effectiveRate);\n            $periodsPerYear = FinancialValidations::validateInt($periodsPerYear);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($effectiveRate <= 0 || $periodsPerYear < 1) {\n            return ExcelError::NAN();\n        }\n\n        // Calculate\n        return $periodsPerYear * (($effectiveRate + 1) ** (1 / $periodsPerYear) - 1);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\YearFrac;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass AccruedInterest\n{\n    public const ACCRINT_CALCMODE_ISSUE_TO_SETTLEMENT = true;\n\n    public const ACCRINT_CALCMODE_FIRST_INTEREST_TO_SETTLEMENT = false;\n\n    /**\n     * ACCRINT.\n     *\n     * Returns the accrued interest for a security that pays periodic interest.\n     *\n     * Excel Function:\n     *        ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis][,calc_method])\n     *\n     * @param mixed $issue the security's issue date\n     * @param mixed $firstInterest the security's first interest date\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue date\n     *                                  when the security is traded to the buyer.\n     * @param mixed $rate The security's annual coupon rate\n     * @param mixed $parValue The security's par value.\n     *                            If you omit par, ACCRINT uses $1,000.\n     * @param mixed $frequency The number of coupon payments per year.\n     *                             Valid frequency values are:\n     *                               1    Annual\n     *                               2    Semi-Annual\n     *                               4    Quarterly\n     * @param mixed $basis The type of day count to use.\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     * @param mixed $calcMethod Unused by PhpSpreadsheet, and apparently by Excel (https://exceljet.net/functions/accrint-function)\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function periodic(\n        mixed $issue,\n        mixed $firstInterest,\n        mixed $settlement,\n        mixed $rate,\n        mixed $parValue = 1000,\n        mixed $frequency = FinancialConstants::FREQUENCY_ANNUAL,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD,\n        mixed $calcMethod = self::ACCRINT_CALCMODE_ISSUE_TO_SETTLEMENT\n    ) {\n        $issue = Functions::flattenSingleValue($issue);\n        $firstInterest = Functions::flattenSingleValue($firstInterest);\n        $settlement = Functions::flattenSingleValue($settlement);\n        $rate = Functions::flattenSingleValue($rate);\n        $parValue = ($parValue === null) ? 1000 : Functions::flattenSingleValue($parValue);\n        $frequency = Functions::flattenSingleValue($frequency) ?? FinancialConstants::FREQUENCY_ANNUAL;\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $issue = SecurityValidations::validateIssueDate($issue);\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            SecurityValidations::validateSecurityPeriod($issue, $settlement);\n            $rate = SecurityValidations::validateRate($rate);\n            $parValue = SecurityValidations::validateParValue($parValue);\n            SecurityValidations::validateFrequency($frequency);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $daysBetweenIssueAndSettlement = Functions::scalar(YearFrac::fraction($issue, $settlement, $basis));\n        if (!is_numeric($daysBetweenIssueAndSettlement)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenIssueAndSettlement);\n        }\n        $daysBetweenFirstInterestAndSettlement = Functions::scalar(YearFrac::fraction($firstInterest, $settlement, $basis));\n        if (!is_numeric($daysBetweenFirstInterestAndSettlement)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenFirstInterestAndSettlement);\n        }\n\n        return $parValue * $rate * $daysBetweenIssueAndSettlement;\n    }\n\n    /**\n     * ACCRINTM.\n     *\n     * Returns the accrued interest for a security that pays interest at maturity.\n     *\n     * Excel Function:\n     *        ACCRINTM(issue,settlement,rate[,par[,basis]])\n     *\n     * @param mixed $issue The security's issue date\n     * @param mixed $settlement The security's settlement (or maturity) date\n     * @param mixed $rate The security's annual coupon rate\n     * @param mixed $parValue The security's par value.\n     *                            If you omit parValue, ACCRINT uses $1,000.\n     * @param mixed $basis The type of day count to use.\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function atMaturity(\n        mixed $issue,\n        mixed $settlement,\n        mixed $rate,\n        mixed $parValue = 1000,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ) {\n        $issue = Functions::flattenSingleValue($issue);\n        $settlement = Functions::flattenSingleValue($settlement);\n        $rate = Functions::flattenSingleValue($rate);\n        $parValue = ($parValue === null) ? 1000 : Functions::flattenSingleValue($parValue);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $issue = SecurityValidations::validateIssueDate($issue);\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            SecurityValidations::validateSecurityPeriod($issue, $settlement);\n            $rate = SecurityValidations::validateRate($rate);\n            $parValue = SecurityValidations::validateParValue($parValue);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $daysBetweenIssueAndSettlement = Functions::scalar(YearFrac::fraction($issue, $settlement, $basis));\n        if (!is_numeric($daysBetweenIssueAndSettlement)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenIssueAndSettlement);\n        }\n\n        return $parValue * $rate * $daysBetweenIssueAndSettlement;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Coupons;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Helpers;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Price\n{\n    /**\n     * PRICE.\n     *\n     * Returns the price per $100 face value of a security that pays periodic interest.\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue date when the security\n     *                              is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                                The maturity date is the date when the security expires.\n     * @param mixed $rate the security's annual coupon rate\n     * @param mixed $yield the security's annual yield\n     * @param mixed $redemption The number of coupon payments per year.\n     *                              For annual payments, frequency = 1;\n     *                              for semiannual, frequency = 2;\n     *                              for quarterly, frequency = 4.\n     * @param mixed $basis The type of day count to use.\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function price(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $rate,\n        mixed $yield,\n        mixed $redemption,\n        mixed $frequency,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): string|float {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $rate = Functions::flattenSingleValue($rate);\n        $yield = Functions::flattenSingleValue($yield);\n        $redemption = Functions::flattenSingleValue($redemption);\n        $frequency = Functions::flattenSingleValue($frequency);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            $maturity = SecurityValidations::validateMaturityDate($maturity);\n            SecurityValidations::validateSecurityPeriod($settlement, $maturity);\n            $rate = SecurityValidations::validateRate($rate);\n            $yield = SecurityValidations::validateYield($yield);\n            $redemption = SecurityValidations::validateRedemption($redemption);\n            $frequency = SecurityValidations::validateFrequency($frequency);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $dsc = (float) Coupons::COUPDAYSNC($settlement, $maturity, $frequency, $basis);\n        $e = (float) Coupons::COUPDAYS($settlement, $maturity, $frequency, $basis);\n        $n = (int) Coupons::COUPNUM($settlement, $maturity, $frequency, $basis);\n        $a = (float) Coupons::COUPDAYBS($settlement, $maturity, $frequency, $basis);\n\n        $baseYF = 1.0 + ($yield / $frequency);\n        $rfp = 100 * ($rate / $frequency);\n        $de = $dsc / $e;\n\n        $result = $redemption / $baseYF ** (--$n + $de);\n        for ($k = 0; $k <= $n; ++$k) {\n            $result += $rfp / ($baseYF ** ($k + $de));\n        }\n        $result -= $rfp * ($a / $e);\n\n        return $result;\n    }\n\n    /**\n     * PRICEDISC.\n     *\n     * Returns the price per $100 face value of a discounted security.\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue date when the security\n     *                              is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                                The maturity date is the date when the security expires.\n     * @param mixed $discount The security's discount rate\n     * @param mixed $redemption The security's redemption value per $100 face value\n     * @param mixed $basis The type of day count to use.\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function priceDiscounted(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $discount,\n        mixed $redemption,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ) {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $discount = Functions::flattenSingleValue($discount);\n        $redemption = Functions::flattenSingleValue($redemption);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            $maturity = SecurityValidations::validateMaturityDate($maturity);\n            SecurityValidations::validateSecurityPeriod($settlement, $maturity);\n            $discount = SecurityValidations::validateDiscount($discount);\n            $redemption = SecurityValidations::validateRedemption($redemption);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $daysBetweenSettlementAndMaturity = Functions::scalar(DateTimeExcel\\YearFrac::fraction($settlement, $maturity, $basis));\n        if (!is_numeric($daysBetweenSettlementAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenSettlementAndMaturity);\n        }\n\n        return $redemption * (1 - $discount * $daysBetweenSettlementAndMaturity);\n    }\n\n    /**\n     * PRICEMAT.\n     *\n     * Returns the price per $100 face value of a security that pays interest at maturity.\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security's settlement date is the date after the issue date when the\n     *                              security is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                                The maturity date is the date when the security expires.\n     * @param mixed $issue The security's issue date\n     * @param mixed $rate The security's interest rate at date of issue\n     * @param mixed $yield The security's annual yield\n     * @param mixed $basis The type of day count to use.\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function priceAtMaturity(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $issue,\n        mixed $rate,\n        mixed $yield,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ) {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $issue = Functions::flattenSingleValue($issue);\n        $rate = Functions::flattenSingleValue($rate);\n        $yield = Functions::flattenSingleValue($yield);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            $maturity = SecurityValidations::validateMaturityDate($maturity);\n            SecurityValidations::validateSecurityPeriod($settlement, $maturity);\n            $issue = SecurityValidations::validateIssueDate($issue);\n            $rate = SecurityValidations::validateRate($rate);\n            $yield = SecurityValidations::validateYield($yield);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $daysPerYear = Helpers::daysPerYear(Functions::scalar(DateTimeExcel\\DateParts::year($settlement)), $basis);\n        if (!is_numeric($daysPerYear)) {\n            return $daysPerYear;\n        }\n        $daysBetweenIssueAndSettlement = Functions::scalar(DateTimeExcel\\YearFrac::fraction($issue, $settlement, $basis));\n        if (!is_numeric($daysBetweenIssueAndSettlement)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenIssueAndSettlement);\n        }\n        $daysBetweenIssueAndSettlement *= $daysPerYear;\n        $daysBetweenIssueAndMaturity = Functions::scalar(DateTimeExcel\\YearFrac::fraction($issue, $maturity, $basis));\n        if (!is_numeric($daysBetweenIssueAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenIssueAndMaturity);\n        }\n        $daysBetweenIssueAndMaturity *= $daysPerYear;\n        $daysBetweenSettlementAndMaturity = Functions::scalar(DateTimeExcel\\YearFrac::fraction($settlement, $maturity, $basis));\n        if (!is_numeric($daysBetweenSettlementAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenSettlementAndMaturity);\n        }\n        $daysBetweenSettlementAndMaturity *= $daysPerYear;\n\n        return (100 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate * 100))\n            / (1 + (($daysBetweenSettlementAndMaturity / $daysPerYear) * $yield))\n            - (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate * 100);\n    }\n\n    /**\n     * RECEIVED.\n     *\n     * Returns the amount received at maturity for a fully invested Security.\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue date when the security\n     *                                  is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $investment The amount invested in the security\n     * @param mixed $discount The security's discount rate\n     * @param mixed $basis The type of day count to use.\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function received(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $investment,\n        mixed $discount,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ) {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $investment = Functions::flattenSingleValue($investment);\n        $discount = Functions::flattenSingleValue($discount);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            $maturity = SecurityValidations::validateMaturityDate($maturity);\n            SecurityValidations::validateSecurityPeriod($settlement, $maturity);\n            $investment = SecurityValidations::validateFloat($investment);\n            $discount = SecurityValidations::validateDiscount($discount);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($investment <= 0) {\n            return ExcelError::NAN();\n        }\n        $daysBetweenSettlementAndMaturity = DateTimeExcel\\YearFrac::fraction($settlement, $maturity, $basis);\n        if (!is_numeric($daysBetweenSettlementAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString(Functions::scalar($daysBetweenSettlementAndMaturity));\n        }\n\n        return $investment / (1 - ($discount * $daysBetweenSettlementAndMaturity));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Rates\n{\n    /**\n     * DISC.\n     *\n     * Returns the discount rate for a security.\n     *\n     * Excel Function:\n     *        DISC(settlement,maturity,price,redemption[,basis])\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue\n     *                                  date when the security is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $price The security's price per $100 face value\n     * @param mixed $redemption The security's redemption value per $100 face value\n     * @param mixed $basis The type of day count to use.\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     */\n    public static function discount(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $price,\n        mixed $redemption,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): float|string {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $price = Functions::flattenSingleValue($price);\n        $redemption = Functions::flattenSingleValue($redemption);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            $maturity = SecurityValidations::validateMaturityDate($maturity);\n            SecurityValidations::validateSecurityPeriod($settlement, $maturity);\n            $price = SecurityValidations::validatePrice($price);\n            $redemption = SecurityValidations::validateRedemption($redemption);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($price <= 0.0) {\n            return ExcelError::NAN();\n        }\n\n        $daysBetweenSettlementAndMaturity = Functions::scalar(DateTimeExcel\\YearFrac::fraction($settlement, $maturity, $basis));\n        if (!is_numeric($daysBetweenSettlementAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenSettlementAndMaturity);\n        }\n\n        return (1 - $price / $redemption) / $daysBetweenSettlementAndMaturity;\n    }\n\n    /**\n     * INTRATE.\n     *\n     * Returns the interest rate for a fully invested security.\n     *\n     * Excel Function:\n     *        INTRATE(settlement,maturity,investment,redemption[,basis])\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security settlement date is the date after the issue date when the security\n     *                                  is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $investment the amount invested in the security\n     * @param mixed $redemption the amount to be received at maturity\n     * @param mixed $basis The type of day count to use.\n     *                         0 or omitted    US (NASD) 30/360\n     *                         1               Actual/actual\n     *                         2               Actual/360\n     *                         3               Actual/365\n     *                         4               European 30/360\n     */\n    public static function interest(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $investment,\n        mixed $redemption,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ): float|string {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $investment = Functions::flattenSingleValue($investment);\n        $redemption = Functions::flattenSingleValue($redemption);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            $maturity = SecurityValidations::validateMaturityDate($maturity);\n            SecurityValidations::validateSecurityPeriod($settlement, $maturity);\n            $investment = SecurityValidations::validateFloat($investment);\n            $redemption = SecurityValidations::validateRedemption($redemption);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($investment <= 0) {\n            return ExcelError::NAN();\n        }\n\n        $daysBetweenSettlementAndMaturity = Functions::scalar(DateTimeExcel\\YearFrac::fraction($settlement, $maturity, $basis));\n        if (!is_numeric($daysBetweenSettlementAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenSettlementAndMaturity);\n        }\n\n        return (($redemption / $investment) - 1) / ($daysBetweenSettlementAndMaturity);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Securities/SecurityValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\FinancialValidations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass SecurityValidations extends FinancialValidations\n{\n    public static function validateIssueDate(mixed $issue): float\n    {\n        return self::validateDate($issue);\n    }\n\n    public static function validateSecurityPeriod(mixed $settlement, mixed $maturity): void\n    {\n        if ($settlement >= $maturity) {\n            throw new Exception(ExcelError::NAN());\n        }\n    }\n\n    public static function validateRedemption(mixed $redemption): float\n    {\n        $redemption = self::validateFloat($redemption);\n        if ($redemption <= 0.0) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $redemption;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Securities;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Helpers;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Yields\n{\n    /**\n     * YIELDDISC.\n     *\n     * Returns the annual yield of a security that pays interest at maturity.\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security's settlement date is the date after the issue date when the security\n     *                              is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $price The security's price per $100 face value\n     * @param mixed $redemption The security's redemption value per $100 face value\n     * @param mixed $basis The type of day count to use.\n     *                       0 or omitted    US (NASD) 30/360\n     *                       1               Actual/actual\n     *                       2               Actual/360\n     *                       3               Actual/365\n     *                       4               European 30/360\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function yieldDiscounted(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $price,\n        mixed $redemption,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ) {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $price = Functions::flattenSingleValue($price);\n        $redemption = Functions::flattenSingleValue($redemption);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            $maturity = SecurityValidations::validateMaturityDate($maturity);\n            SecurityValidations::validateSecurityPeriod($settlement, $maturity);\n            $price = SecurityValidations::validatePrice($price);\n            $redemption = SecurityValidations::validateRedemption($redemption);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $daysPerYear = Helpers::daysPerYear(Functions::scalar(DateTimeExcel\\DateParts::year($settlement)), $basis);\n        if (!is_numeric($daysPerYear)) {\n            return $daysPerYear;\n        }\n        $daysBetweenSettlementAndMaturity = Functions::scalar(DateTimeExcel\\YearFrac::fraction($settlement, $maturity, $basis));\n        if (!is_numeric($daysBetweenSettlementAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenSettlementAndMaturity);\n        }\n        $daysBetweenSettlementAndMaturity *= $daysPerYear;\n\n        return (($redemption - $price) / $price) * ($daysPerYear / $daysBetweenSettlementAndMaturity);\n    }\n\n    /**\n     * YIELDMAT.\n     *\n     * Returns the annual yield of a security that pays interest at maturity.\n     *\n     * @param mixed $settlement The security's settlement date.\n     *                              The security's settlement date is the date after the issue date when the security\n     *                              is traded to the buyer.\n     * @param mixed $maturity The security's maturity date.\n     *                            The maturity date is the date when the security expires.\n     * @param mixed $issue The security's issue date\n     * @param mixed $rate The security's interest rate at date of issue\n     * @param mixed $price The security's price per $100 face value\n     * @param mixed $basis The type of day count to use.\n     *                       0 or omitted    US (NASD) 30/360\n     *                       1               Actual/actual\n     *                       2               Actual/360\n     *                       3               Actual/365\n     *                       4               European 30/360\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function yieldAtMaturity(\n        mixed $settlement,\n        mixed $maturity,\n        mixed $issue,\n        mixed $rate,\n        mixed $price,\n        mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n    ) {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $issue = Functions::flattenSingleValue($issue);\n        $rate = Functions::flattenSingleValue($rate);\n        $price = Functions::flattenSingleValue($price);\n        $basis = Functions::flattenSingleValue($basis) ?? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD;\n\n        try {\n            $settlement = SecurityValidations::validateSettlementDate($settlement);\n            $maturity = SecurityValidations::validateMaturityDate($maturity);\n            SecurityValidations::validateSecurityPeriod($settlement, $maturity);\n            $issue = SecurityValidations::validateIssueDate($issue);\n            $rate = SecurityValidations::validateRate($rate);\n            $price = SecurityValidations::validatePrice($price);\n            $basis = SecurityValidations::validateBasis($basis);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $daysPerYear = Helpers::daysPerYear(Functions::scalar(DateTimeExcel\\DateParts::year($settlement)), $basis);\n        if (!is_numeric($daysPerYear)) {\n            return $daysPerYear;\n        }\n        $daysBetweenIssueAndSettlement = Functions::scalar(DateTimeExcel\\YearFrac::fraction($issue, $settlement, $basis));\n        if (!is_numeric($daysBetweenIssueAndSettlement)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenIssueAndSettlement);\n        }\n        $daysBetweenIssueAndSettlement *= $daysPerYear;\n        $daysBetweenIssueAndMaturity = Functions::scalar(DateTimeExcel\\YearFrac::fraction($issue, $maturity, $basis));\n        if (!is_numeric($daysBetweenIssueAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenIssueAndMaturity);\n        }\n        $daysBetweenIssueAndMaturity *= $daysPerYear;\n        $daysBetweenSettlementAndMaturity = Functions::scalar(DateTimeExcel\\YearFrac::fraction($settlement, $maturity, $basis));\n        if (!is_numeric($daysBetweenSettlementAndMaturity)) {\n            //    return date error\n            return StringHelper::convertToString($daysBetweenSettlementAndMaturity);\n        }\n        $daysBetweenSettlementAndMaturity *= $daysPerYear;\n\n        return ((1 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate)\n                    - (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate)))\n                / (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate)))\n            * ($daysPerYear / $daysBetweenSettlementAndMaturity);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass TreasuryBill\n{\n    /**\n     * TBILLEQ.\n     *\n     * Returns the bond-equivalent yield for a Treasury bill.\n     *\n     * @param mixed $settlement The Treasury bill's settlement date.\n     *                                The Treasury bill's settlement date is the date after the issue date\n     *                                    when the Treasury bill is traded to the buyer.\n     * @param mixed $maturity The Treasury bill's maturity date.\n     *                                The maturity date is the date when the Treasury bill expires.\n     * @param mixed $discount The Treasury bill's discount rate\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function bondEquivalentYield(mixed $settlement, mixed $maturity, mixed $discount): string|float\n    {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $discount = Functions::flattenSingleValue($discount);\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            $discount = FinancialValidations::validateFloat($discount);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($discount <= 0) {\n            return ExcelError::NAN();\n        }\n\n        $daysBetweenSettlementAndMaturity = $maturity - $settlement;\n        $daysPerYear = Helpers::daysPerYear(\n            Functions::scalar(DateTimeExcel\\DateParts::year($maturity)),\n            FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL\n        );\n\n        if ($daysBetweenSettlementAndMaturity > $daysPerYear || $daysBetweenSettlementAndMaturity < 0) {\n            return ExcelError::NAN();\n        }\n\n        return (365 * $discount) / (360 - $discount * $daysBetweenSettlementAndMaturity);\n    }\n\n    /**\n     * TBILLPRICE.\n     *\n     * Returns the price per $100 face value for a Treasury bill.\n     *\n     * @param mixed $settlement The Treasury bill's settlement date.\n     *                                The Treasury bill's settlement date is the date after the issue date\n     *                                    when the Treasury bill is traded to the buyer.\n     * @param mixed $maturity The Treasury bill's maturity date.\n     *                                The maturity date is the date when the Treasury bill expires.\n     * @param mixed $discount The Treasury bill's discount rate\n     *\n     * @return float|string Result, or a string containing an error\n     */\n    public static function price(mixed $settlement, mixed $maturity, mixed $discount): string|float\n    {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $discount = Functions::flattenSingleValue($discount);\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            $discount = FinancialValidations::validateFloat($discount);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($discount <= 0) {\n            return ExcelError::NAN();\n        }\n\n        $daysBetweenSettlementAndMaturity = $maturity - $settlement;\n        $daysPerYear = Helpers::daysPerYear(\n            Functions::scalar(DateTimeExcel\\DateParts::year($maturity)),\n            FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL\n        );\n\n        if ($daysBetweenSettlementAndMaturity > $daysPerYear || $daysBetweenSettlementAndMaturity < 0) {\n            return ExcelError::NAN();\n        }\n\n        $price = 100 * (1 - (($discount * $daysBetweenSettlementAndMaturity) / 360));\n        if ($price < 0.0) {\n            return ExcelError::NAN();\n        }\n\n        return $price;\n    }\n\n    /**\n     * TBILLYIELD.\n     *\n     * Returns the yield for a Treasury bill.\n     *\n     * @param mixed $settlement The Treasury bill's settlement date.\n     *                                The Treasury bill's settlement date is the date after the issue date when\n     *                                    the Treasury bill is traded to the buyer.\n     * @param mixed $maturity The Treasury bill's maturity date.\n     *                                The maturity date is the date when the Treasury bill expires.\n     * @param float|string $price The Treasury bill's price per $100 face value\n     */\n    public static function yield(mixed $settlement, mixed $maturity, $price): string|float\n    {\n        $settlement = Functions::flattenSingleValue($settlement);\n        $maturity = Functions::flattenSingleValue($maturity);\n        $price = Functions::flattenSingleValue($price);\n\n        try {\n            $settlement = FinancialValidations::validateSettlementDate($settlement);\n            $maturity = FinancialValidations::validateMaturityDate($maturity);\n            $price = FinancialValidations::validatePrice($price);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $daysBetweenSettlementAndMaturity = $maturity - $settlement;\n        $daysPerYear = Helpers::daysPerYear(\n            Functions::scalar(DateTimeExcel\\DateParts::year($maturity)),\n            FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL\n        );\n\n        if ($daysBetweenSettlementAndMaturity > $daysPerYear || $daysBetweenSettlementAndMaturity < 0) {\n            return ExcelError::NAN();\n        }\n\n        return ((100 - $price) / $price) * (360 / $daysBetweenSettlementAndMaturity);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/FormulaParser.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\n/**\n * PARTLY BASED ON:\n * Copyright (c) 2007 E. W. Bachtal, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software\n * and associated documentation files (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial\n * portions of the Software.\n *\n * The software is provided \"as is\", without warranty of any kind, express or implied, including but not\n * limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In\n * no event shall the authors or copyright holders be liable for any claim, damages or other liability,\n * whether in an action of contract, tort or otherwise, arising from, out of or in connection with the\n * software or the use or other dealings in the software.\n *\n * The following links are no longer valid.\n * https://ewbi.blogs.com/develops/2007/03/excel_formula_p.html\n * https://ewbi.blogs.com/develops/2004/12/excel_formula_p.html\n *\n * @deprecated 5.5.0 No replacement.\n */\nclass FormulaParser\n{\n    // Character constants\n    const QUOTE_DOUBLE = '\"';\n    const QUOTE_SINGLE = '\\'';\n    const BRACKET_CLOSE = ']';\n    const BRACKET_OPEN = '[';\n    const BRACE_OPEN = '{';\n    const BRACE_CLOSE = '}';\n    const PAREN_OPEN = '(';\n    const PAREN_CLOSE = ')';\n    const SEMICOLON = ';';\n    const WHITESPACE = ' ';\n    const COMMA = ',';\n    const ERROR_START = '#';\n\n    const OPERATORS_SN = '+-';\n    const OPERATORS_INFIX = '+-*/^&=><';\n    const OPERATORS_POSTFIX = '%';\n\n    /**\n     * Formula.\n     */\n    private string $formula;\n\n    /**\n     * Tokens.\n     *\n     * @var FormulaToken[]\n     */\n    private array $tokens = [];\n\n    /**\n     * Create a new FormulaParser.\n     *\n     * @param ?string $formula Formula to parse\n     */\n    public function __construct(?string $formula = '')\n    {\n        // Check parameters\n        if ($formula === null) {\n            throw new Exception('Invalid parameter passed: formula');\n        }\n\n        // Initialise values\n        $this->formula = trim($formula);\n        // Parse!\n        $this->parseToTokens();\n    }\n\n    /**\n     * Get Formula.\n     */\n    public function getFormula(): string\n    {\n        return $this->formula;\n    }\n\n    /**\n     * Get Token.\n     *\n     * @param int $id Token id\n     */\n    public function getToken(int $id = 0): FormulaToken\n    {\n        if (isset($this->tokens[$id])) {\n            return $this->tokens[$id];\n        }\n\n        throw new Exception(\"Token with id $id does not exist.\");\n    }\n\n    /**\n     * Get Token count.\n     */\n    public function getTokenCount(): int\n    {\n        return count($this->tokens);\n    }\n\n    /**\n     * Get Tokens.\n     *\n     * @return FormulaToken[]\n     */\n    public function getTokens(): array\n    {\n        return $this->tokens;\n    }\n\n    /**\n     * Parse to tokens.\n     */\n    private function parseToTokens(): void\n    {\n        // No attempt is made to verify formulas; assumes formulas are derived from Excel, where\n        // they can only exist if valid; stack overflows/underflows sunk as nulls without exceptions.\n\n        // Check if the formula has a valid starting =\n        $formulaLength = strlen($this->formula);\n        if ($formulaLength < 2 || $this->formula[0] != '=') {\n            return;\n        }\n\n        // Helper variables\n        $tokens1 = $tokens2 = $stack = [];\n        $inString = $inPath = $inRange = $inError = false;\n        $nextToken = null;\n        //$token = $previousToken = null;\n\n        $index = 1;\n        $value = '';\n\n        $ERRORS = ['#NULL!', '#DIV/0!', '#VALUE!', '#REF!', '#NAME?', '#NUM!', '#N/A'];\n        $COMPARATORS_MULTI = ['>=', '<=', '<>'];\n\n        while ($index < $formulaLength) {\n            // state-dependent character evaluation (order is important)\n\n            // double-quoted strings\n            // embeds are doubled\n            // end marks token\n            if ($inString) {\n                if ($this->formula[$index] == self::QUOTE_DOUBLE) {\n                    if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == self::QUOTE_DOUBLE)) {\n                        $value .= self::QUOTE_DOUBLE;\n                        ++$index;\n                    } else {\n                        $inString = false;\n                        $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND, FormulaToken::TOKEN_SUBTYPE_TEXT);\n                        $value = '';\n                    }\n                } else {\n                    $value .= $this->formula[$index];\n                }\n                ++$index;\n\n                continue;\n            }\n\n            // single-quoted strings (links)\n            // embeds are double\n            // end does not mark a token\n            if ($inPath) {\n                if ($this->formula[$index] == self::QUOTE_SINGLE) {\n                    if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == self::QUOTE_SINGLE)) {\n                        $value .= self::QUOTE_SINGLE;\n                        ++$index;\n                    } else {\n                        $inPath = false;\n                    }\n                } else {\n                    $value .= $this->formula[$index];\n                }\n                ++$index;\n\n                continue;\n            }\n\n            // bracked strings (R1C1 range index or linked workbook name)\n            // no embeds (changed to \"()\" by Excel)\n            // end does not mark a token\n            if ($inRange) {\n                if ($this->formula[$index] == self::BRACKET_CLOSE) {\n                    $inRange = false;\n                }\n                $value .= $this->formula[$index];\n                ++$index;\n\n                continue;\n            }\n\n            // error values\n            // end marks a token, determined from absolute list of values\n            if ($inError) {\n                $value .= $this->formula[$index];\n                ++$index;\n                if (in_array($value, $ERRORS)) {\n                    $inError = false;\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND, FormulaToken::TOKEN_SUBTYPE_ERROR);\n                    $value = '';\n                }\n\n                continue;\n            }\n\n            // scientific notation check\n            if (str_contains(self::OPERATORS_SN, $this->formula[$index])) {\n                if (strlen($value) > 1) {\n                    if (preg_match('/^[1-9]{1}(\\.\\d+)?E{1}$/', $this->formula[$index]) != 0) {\n                        $value .= $this->formula[$index];\n                        ++$index;\n\n                        continue;\n                    }\n                }\n            }\n\n            // independent character evaluation (order not important)\n\n            // establish state-dependent character evaluations\n            if ($this->formula[$index] == self::QUOTE_DOUBLE) {\n                if ($value !== '') {\n                    // unexpected\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN);\n                    $value = '';\n                }\n                $inString = true;\n                ++$index;\n\n                continue;\n            }\n\n            if ($this->formula[$index] == self::QUOTE_SINGLE) {\n                if ($value !== '') {\n                    // unexpected\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN);\n                    $value = '';\n                }\n                $inPath = true;\n                ++$index;\n\n                continue;\n            }\n\n            if ($this->formula[$index] == self::BRACKET_OPEN) {\n                $inRange = true;\n                $value .= self::BRACKET_OPEN;\n                ++$index;\n\n                continue;\n            }\n\n            if ($this->formula[$index] == self::ERROR_START) {\n                if ($value !== '') {\n                    // unexpected\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN);\n                    $value = '';\n                }\n                $inError = true;\n                $value .= self::ERROR_START;\n                ++$index;\n\n                continue;\n            }\n\n            // mark start and end of arrays and array rows\n            if ($this->formula[$index] == self::BRACE_OPEN) {\n                if ($value !== '') {\n                    // unexpected\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN);\n                    $value = '';\n                }\n\n                $tmp = new FormulaToken('ARRAY', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START);\n                $tokens1[] = $tmp;\n                $stack[] = clone $tmp;\n\n                $tmp = new FormulaToken('ARRAYROW', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START);\n                $tokens1[] = $tmp;\n                $stack[] = clone $tmp;\n\n                ++$index;\n\n                continue;\n            }\n\n            if ($this->formula[$index] == self::SEMICOLON) {\n                if ($value !== '') {\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n                    $value = '';\n                }\n\n                /** @var FormulaToken $tmp */\n                $tmp = array_pop($stack);\n                $tmp->setValue('');\n                $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);\n                $tokens1[] = $tmp;\n\n                $tmp = new FormulaToken(',', FormulaToken::TOKEN_TYPE_ARGUMENT);\n                $tokens1[] = $tmp;\n\n                $tmp = new FormulaToken('ARRAYROW', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START);\n                $tokens1[] = $tmp;\n                $stack[] = clone $tmp;\n\n                ++$index;\n\n                continue;\n            }\n\n            if ($this->formula[$index] == self::BRACE_CLOSE) {\n                if ($value !== '') {\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n                    $value = '';\n                }\n\n                /** @var FormulaToken $tmp */\n                $tmp = array_pop($stack);\n                $tmp->setValue('');\n                $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);\n                $tokens1[] = $tmp;\n\n                /** @var FormulaToken $tmp */\n                $tmp = array_pop($stack);\n                $tmp->setValue('');\n                $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);\n                $tokens1[] = $tmp;\n\n                ++$index;\n\n                continue;\n            }\n\n            // trim white-space\n            if ($this->formula[$index] == self::WHITESPACE) {\n                if ($value !== '') {\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n                    $value = '';\n                }\n                $tokens1[] = new FormulaToken('', FormulaToken::TOKEN_TYPE_WHITESPACE);\n                ++$index;\n                while (($this->formula[$index] == self::WHITESPACE) && ($index < $formulaLength)) {\n                    ++$index;\n                }\n\n                continue;\n            }\n\n            // multi-character comparators\n            if (($index + 2) <= $formulaLength) {\n                if (in_array(substr($this->formula, $index, 2), $COMPARATORS_MULTI)) {\n                    if ($value !== '') {\n                        $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n                        $value = '';\n                    }\n                    $tokens1[] = new FormulaToken(substr($this->formula, $index, 2), FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_LOGICAL);\n                    $index += 2;\n\n                    continue;\n                }\n            }\n\n            // standard infix operators\n            if (str_contains(self::OPERATORS_INFIX, $this->formula[$index])) {\n                if ($value !== '') {\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n                    $value = '';\n                }\n                $tokens1[] = new FormulaToken($this->formula[$index], FormulaToken::TOKEN_TYPE_OPERATORINFIX);\n                ++$index;\n\n                continue;\n            }\n\n            // standard postfix operators (only one)\n            if (str_contains(self::OPERATORS_POSTFIX, $this->formula[$index])) {\n                if ($value !== '') {\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n                    $value = '';\n                }\n                $tokens1[] = new FormulaToken($this->formula[$index], FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);\n                ++$index;\n\n                continue;\n            }\n\n            // start subexpression or function\n            if ($this->formula[$index] == self::PAREN_OPEN) {\n                if ($value !== '') {\n                    $tmp = new FormulaToken($value, FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START);\n                    $tokens1[] = $tmp;\n                    $stack[] = clone $tmp;\n                    $value = '';\n                } else {\n                    $tmp = new FormulaToken('', FormulaToken::TOKEN_TYPE_SUBEXPRESSION, FormulaToken::TOKEN_SUBTYPE_START);\n                    $tokens1[] = $tmp;\n                    $stack[] = clone $tmp;\n                }\n                ++$index;\n\n                continue;\n            }\n\n            // function, subexpression, or array parameters, or operand unions\n            if ($this->formula[$index] == self::COMMA) {\n                if ($value !== '') {\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n                    $value = '';\n                }\n\n                /** @var FormulaToken $tmp */\n                $tmp = array_pop($stack);\n                $tmp->setValue('');\n                $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);\n                $stack[] = $tmp;\n\n                if ($tmp->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) {\n                    $tokens1[] = new FormulaToken(',', FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_UNION);\n                } else {\n                    $tokens1[] = new FormulaToken(',', FormulaToken::TOKEN_TYPE_ARGUMENT);\n                }\n                ++$index;\n\n                continue;\n            }\n\n            // stop subexpression\n            if ($this->formula[$index] == self::PAREN_CLOSE) {\n                if ($value !== '') {\n                    $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n                    $value = '';\n                }\n\n                /** @var FormulaToken $tmp */\n                $tmp = array_pop($stack);\n                $tmp->setValue('');\n                $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);\n                $tokens1[] = $tmp;\n\n                ++$index;\n\n                continue;\n            }\n\n            // token accumulation\n            $value .= $this->formula[$index];\n            ++$index;\n        }\n\n        // dump remaining accumulation\n        if ($value !== '') {\n            $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);\n        }\n\n        // move tokenList to new set, excluding unnecessary white-space tokens and converting necessary ones to intersections\n        $tokenCount = count($tokens1);\n        for ($i = 0; $i < $tokenCount; ++$i) {\n            $token = $tokens1[$i];\n            $previousToken = $tokens1[$i - 1] ?? null;\n            $nextToken = $tokens1[$i + 1] ?? null;\n\n            if ($token->getTokenType() != FormulaToken::TOKEN_TYPE_WHITESPACE) {\n                $tokens2[] = $token;\n\n                continue;\n            }\n\n            if ($previousToken === null) {\n                continue;\n            }\n\n            if (\n                !(\n                    (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP))\n                || (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP))\n                || ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)\n                )\n            ) {\n                continue;\n            }\n\n            if ($nextToken === null) {\n                continue;\n            }\n\n            if (\n                !(\n                    (($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && ($nextToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_START))\n                || (($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($nextToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_START))\n                || ($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)\n                )\n            ) {\n                continue;\n            }\n\n            $tokens2[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_INTERSECTION);\n        }\n\n        // move tokens to final list, switching infix \"-\" operators to prefix when appropriate, switching infix \"+\" operators\n        // to noop when appropriate, identifying operand and infix-operator subtypes, and pulling \"@\" from function names\n        $this->tokens = [];\n\n        $tokenCount = count($tokens2);\n        for ($i = 0; $i < $tokenCount; ++$i) {\n            $token = $tokens2[$i];\n            $previousToken = $tokens2[$i - 1] ?? null;\n\n            if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == '-') {\n                if ($i == 0) {\n                    $token->setTokenType(FormulaToken::TOKEN_TYPE_OPERATORPREFIX);\n                } elseif (\n                    (($previousToken?->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION)\n                        && ($previousToken?->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP))\n                    || (($previousToken?->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION)\n                        && ($previousToken?->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP))\n                    || ($previousToken?->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX)\n                    || ($previousToken?->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)\n                ) {\n                    $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH);\n                } else {\n                    $token->setTokenType(FormulaToken::TOKEN_TYPE_OPERATORPREFIX);\n                }\n\n                $this->tokens[] = $token;\n\n                continue;\n            }\n\n            if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == '+') {\n                if ($i == 0) {\n                    continue;\n                } elseif (\n                    (($previousToken?->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION)\n                        && ($previousToken?->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP))\n                    || (($previousToken?->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION)\n                        && ($previousToken?->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP))\n                    || ($previousToken?->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX)\n                    || ($previousToken?->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)\n                ) {\n                    $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH);\n                } else {\n                    continue;\n                }\n\n                $this->tokens[] = $token;\n\n                continue;\n            }\n\n            if (\n                $token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX\n                && $token->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_NOTHING\n            ) {\n                if (str_contains('<>=', substr($token->getValue(), 0, 1))) {\n                    $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_LOGICAL);\n                } elseif ($token->getValue() == '&') {\n                    $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_CONCATENATION);\n                } else {\n                    $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH);\n                }\n\n                $this->tokens[] = $token;\n\n                continue;\n            }\n\n            if (\n                $token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND\n                && $token->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_NOTHING\n            ) {\n                if (!is_numeric($token->getValue())) {\n                    if (strtoupper($token->getValue()) == 'TRUE' || strtoupper($token->getValue()) == 'FALSE') {\n                        $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_LOGICAL);\n                    } else {\n                        $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_RANGE);\n                    }\n                } else {\n                    $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_NUMBER);\n                }\n\n                $this->tokens[] = $token;\n\n                continue;\n            }\n\n            if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) {\n                if ($token->getValue() !== '') {\n                    if (str_starts_with($token->getValue(), '@')) {\n                        $token->setValue(substr($token->getValue(), 1));\n                    }\n                }\n            }\n\n            $this->tokens[] = $token;\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/FormulaToken.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\n/**\n * PARTLY BASED ON:\n * Copyright (c) 2007 E. W. Bachtal, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software\n * and associated documentation files (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial\n * portions of the Software.\n *\n * The software is provided \"as is\", without warranty of any kind, express or implied, including but not\n * limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In\n * no event shall the authors or copyright holders be liable for any claim, damages or other liability,\n * whether in an action of contract, tort or otherwise, arising from, out of or in connection with the\n * software or the use or other dealings in the software.\n *\n * The following links are no longer valid.\n * https://ewbi.blogs.com/develops/2007/03/excel_formula_p.html\n * https://ewbi.blogs.com/develops/2004/12/excel_formula_p.html\n *\n * @deprecated 5.5.0 No replacement.\n */\nclass FormulaToken\n{\n    // Token types\n    const TOKEN_TYPE_NOOP = 'Noop';\n    const TOKEN_TYPE_OPERAND = 'Operand';\n    const TOKEN_TYPE_FUNCTION = 'Function';\n    const TOKEN_TYPE_SUBEXPRESSION = 'Subexpression';\n    const TOKEN_TYPE_ARGUMENT = 'Argument';\n    const TOKEN_TYPE_OPERATORPREFIX = 'OperatorPrefix';\n    const TOKEN_TYPE_OPERATORINFIX = 'OperatorInfix';\n    const TOKEN_TYPE_OPERATORPOSTFIX = 'OperatorPostfix';\n    const TOKEN_TYPE_WHITESPACE = 'Whitespace';\n    const TOKEN_TYPE_UNKNOWN = 'Unknown';\n\n    // Token subtypes\n    const TOKEN_SUBTYPE_NOTHING = 'Nothing';\n    const TOKEN_SUBTYPE_START = 'Start';\n    const TOKEN_SUBTYPE_STOP = 'Stop';\n    const TOKEN_SUBTYPE_TEXT = 'Text';\n    const TOKEN_SUBTYPE_NUMBER = 'Number';\n    const TOKEN_SUBTYPE_LOGICAL = 'Logical';\n    const TOKEN_SUBTYPE_ERROR = 'Error';\n    const TOKEN_SUBTYPE_RANGE = 'Range';\n    const TOKEN_SUBTYPE_MATH = 'Math';\n    const TOKEN_SUBTYPE_CONCATENATION = 'Concatenation';\n    const TOKEN_SUBTYPE_INTERSECTION = 'Intersection';\n    const TOKEN_SUBTYPE_UNION = 'Union';\n\n    /**\n     * Value.\n     */\n    private string $value;\n\n    /**\n     * Token Type (represented by TOKEN_TYPE_*).\n     */\n    private string $tokenType;\n\n    /**\n     * Token SubType (represented by TOKEN_SUBTYPE_*).\n     */\n    private string $tokenSubType;\n\n    /**\n     * Create a new FormulaToken.\n     *\n     * @param string $tokenType Token type (represented by TOKEN_TYPE_*)\n     * @param string $tokenSubType Token Subtype (represented by TOKEN_SUBTYPE_*)\n     */\n    public function __construct(string $value, string $tokenType = self::TOKEN_TYPE_UNKNOWN, string $tokenSubType = self::TOKEN_SUBTYPE_NOTHING)\n    {\n        // Initialise values\n        $this->value = $value;\n        $this->tokenType = $tokenType;\n        $this->tokenSubType = $tokenSubType;\n    }\n\n    /**\n     * Get Value.\n     */\n    public function getValue(): string\n    {\n        return $this->value;\n    }\n\n    /**\n     * Set Value.\n     */\n    public function setValue(string $value): void\n    {\n        $this->value = $value;\n    }\n\n    /**\n     * Get Token Type (represented by TOKEN_TYPE_*).\n     */\n    public function getTokenType(): string\n    {\n        return $this->tokenType;\n    }\n\n    /**\n     * Set Token Type (represented by TOKEN_TYPE_*).\n     */\n    public function setTokenType(string $value): void\n    {\n        $this->tokenType = $value;\n    }\n\n    /**\n     * Get Token SubType (represented by TOKEN_SUBTYPE_*).\n     */\n    public function getTokenSubType(): string\n    {\n        return $this->tokenSubType;\n    }\n\n    /**\n     * Set Token SubType (represented by TOKEN_SUBTYPE_*).\n     */\n    public function setTokenSubType(string $value): void\n    {\n        $this->tokenSubType = $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/FunctionArray.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nclass FunctionArray extends CalculationBase\n{\n    /**\n     * Array of functions usable on Spreadsheet.\n     *\n     * @var array<string, array{category: string, functionCall: string|string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool}>\n     */\n    protected static array $phpSpreadsheetFunctions = [\n        'ABS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Absolute::class, 'evaluate'],\n            'argumentCount' => '1',\n        ],\n        'ACCRINT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\AccruedInterest::class, 'periodic'],\n            'argumentCount' => '4-8',\n        ],\n        'ACCRINTM' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\AccruedInterest::class, 'atMaturity'],\n            'argumentCount' => '3-5',\n        ],\n        'ACOS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cosine::class, 'acos'],\n            'argumentCount' => '1',\n        ],\n        'ACOSH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cosine::class, 'acosh'],\n            'argumentCount' => '1',\n        ],\n        'ACOT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cotangent::class, 'acot'],\n            'argumentCount' => '1',\n        ],\n        'ACOTH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cotangent::class, 'acoth'],\n            'argumentCount' => '1',\n        ],\n        'ADDRESS' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Address::class, 'cell'],\n            'argumentCount' => '2-5',\n        ],\n        'AGGREGATE' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3+',\n        ],\n        'AMORDEGRC' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Amortization::class, 'AMORDEGRC'],\n            'argumentCount' => '6,7',\n        ],\n        'AMORLINC' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Amortization::class, 'AMORLINC'],\n            'argumentCount' => '6,7',\n        ],\n        'ANCHORARRAY' => [\n            'category' => Category::CATEGORY_MICROSOFT_INTERNAL,\n            'functionCall' => [Internal\\ExcelArrayPseudoFunctions::class, 'anchorArray'],\n            'argumentCount' => '1',\n            'passCellReference' => true,\n            'passByReference' => [true],\n        ],\n        'AND' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Operations::class, 'logicalAnd'],\n            'argumentCount' => '1+',\n        ],\n        'ARABIC' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Arabic::class, 'evaluate'],\n            'argumentCount' => '1',\n        ],\n        'AREAS' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1',\n        ],\n        'ARRAYTOTEXT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Text::class, 'fromArray'],\n            'argumentCount' => '1,2',\n        ],\n        'ASC' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1',\n        ],\n        'ASIN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Sine::class, 'asin'],\n            'argumentCount' => '1',\n        ],\n        'ASINH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Sine::class, 'asinh'],\n            'argumentCount' => '1',\n        ],\n        'ATAN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Tangent::class, 'atan'],\n            'argumentCount' => '1',\n        ],\n        'ATAN2' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Tangent::class, 'atan2'],\n            'argumentCount' => '2',\n        ],\n        'ATANH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Tangent::class, 'atanh'],\n            'argumentCount' => '1',\n        ],\n        'AVEDEV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages::class, 'averageDeviations'],\n            'argumentCount' => '1+',\n        ],\n        'AVERAGE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages::class, 'average'],\n            'argumentCount' => '1+',\n        ],\n        'AVERAGEA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages::class, 'averageA'],\n            'argumentCount' => '1+',\n        ],\n        'AVERAGEIF' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Conditional::class, 'AVERAGEIF'],\n            'argumentCount' => '2,3',\n        ],\n        'AVERAGEIFS' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Conditional::class, 'AVERAGEIFS'],\n            'argumentCount' => '3+',\n        ],\n        'BAHTTEXT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Thai::class, 'getBahtText'],\n            'argumentCount' => '1',\n        ],\n        'BASE' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Base::class, 'evaluate'],\n            'argumentCount' => '2,3',\n        ],\n        'BESSELI' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BesselI::class, 'BESSELI'],\n            'argumentCount' => '2',\n        ],\n        'BESSELJ' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BesselJ::class, 'BESSELJ'],\n            'argumentCount' => '2',\n        ],\n        'BESSELK' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BesselK::class, 'BESSELK'],\n            'argumentCount' => '2',\n        ],\n        'BESSELY' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BesselY::class, 'BESSELY'],\n            'argumentCount' => '2',\n        ],\n        'BETADIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Beta::class, 'distribution'],\n            'argumentCount' => '3-5',\n        ],\n        'BETA.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '4-6',\n        ],\n        'BETAINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Beta::class, 'inverse'],\n            'argumentCount' => '3-5',\n        ],\n        'BETA.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Beta::class, 'inverse'],\n            'argumentCount' => '3-5',\n        ],\n        'BIN2DEC' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertBinary::class, 'toDecimal'],\n            'argumentCount' => '1',\n        ],\n        'BIN2HEX' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertBinary::class, 'toHex'],\n            'argumentCount' => '1,2',\n        ],\n        'BIN2OCT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertBinary::class, 'toOctal'],\n            'argumentCount' => '1,2',\n        ],\n        'BINOMDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Binomial::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'BINOM.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Binomial::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'BINOM.DIST.RANGE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Binomial::class, 'range'],\n            'argumentCount' => '3,4',\n        ],\n        'BINOM.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Binomial::class, 'inverse'],\n            'argumentCount' => '3',\n        ],\n        'BITAND' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BitWise::class, 'BITAND'],\n            'argumentCount' => '2',\n        ],\n        'BITOR' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BitWise::class, 'BITOR'],\n            'argumentCount' => '2',\n        ],\n        'BITXOR' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BitWise::class, 'BITXOR'],\n            'argumentCount' => '2',\n        ],\n        'BITLSHIFT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BitWise::class, 'BITLSHIFT'],\n            'argumentCount' => '2',\n        ],\n        'BITRSHIFT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\BitWise::class, 'BITRSHIFT'],\n            'argumentCount' => '2',\n        ],\n        'BYCOL' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'BYROW' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'CEILING' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Ceiling::class, 'ceiling'],\n            'argumentCount' => '1-2', // 2 for Excel, 1-2 for Ods/Gnumeric\n        ],\n        'CEILING.MATH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Ceiling::class, 'math'],\n            'argumentCount' => '1-3',\n        ],\n        // pseudo-function to help with Ods\n        'CEILING.ODS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Ceiling::class, 'mathOds'],\n            'argumentCount' => '1-3',\n        ],\n        'CEILING.PRECISE' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Ceiling::class, 'precise'],\n            'argumentCount' => '1,2',\n        ],\n        // pseudo-function implemented in Ods\n        'CEILING.XCL' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Ceiling::class, 'ceiling'],\n            'argumentCount' => '2',\n        ],\n        'CELL' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1,2',\n        ],\n        'CHAR' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\CharacterConvert::class, 'character'],\n            'argumentCount' => '1',\n        ],\n        'CHIDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\ChiSquared::class, 'distributionRightTail'],\n            'argumentCount' => '2',\n        ],\n        'CHISQ.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\ChiSquared::class, 'distributionLeftTail'],\n            'argumentCount' => '3',\n        ],\n        'CHISQ.DIST.RT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\ChiSquared::class, 'distributionRightTail'],\n            'argumentCount' => '2',\n        ],\n        'CHIINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\ChiSquared::class, 'inverseRightTail'],\n            'argumentCount' => '2',\n        ],\n        'CHISQ.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\ChiSquared::class, 'inverseLeftTail'],\n            'argumentCount' => '2',\n        ],\n        'CHISQ.INV.RT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\ChiSquared::class, 'inverseRightTail'],\n            'argumentCount' => '2',\n        ],\n        'CHITEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\ChiSquared::class, 'test'],\n            'argumentCount' => '2',\n        ],\n        'CHISQ.TEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\ChiSquared::class, 'test'],\n            'argumentCount' => '2',\n        ],\n        'CHOOSE' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Selection::class, 'CHOOSE'],\n            'argumentCount' => '2+',\n        ],\n        'CHOOSECOLS' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\ChooseRowsEtc::class, 'chooseCols'],\n            'argumentCount' => '2+',\n        ],\n        'CHOOSEROWS' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\ChooseRowsEtc::class, 'chooseRows'],\n            'argumentCount' => '2+',\n        ],\n        'CLEAN' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Trim::class, 'nonPrintable'],\n            'argumentCount' => '1',\n        ],\n        'CODE' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\CharacterConvert::class, 'code'],\n            'argumentCount' => '1',\n        ],\n        'COLUMN' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\RowColumnInformation::class, 'COLUMN'],\n            'argumentCount' => '-1',\n            'passCellReference' => true,\n            'passByReference' => [true],\n        ],\n        'COLUMNS' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\RowColumnInformation::class, 'COLUMNS'],\n            'argumentCount' => '1',\n        ],\n        'COMBIN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Combinations::class, 'withoutRepetition'],\n            'argumentCount' => '2',\n        ],\n        'COMBINA' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Combinations::class, 'withRepetition'],\n            'argumentCount' => '2',\n        ],\n        'COMPLEX' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\Complex::class, 'COMPLEX'],\n            'argumentCount' => '2,3',\n        ],\n        'CONCAT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Concatenate::class, 'CONCATENATE'],\n            'argumentCount' => '1+',\n        ],\n        'CONCATENATE' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Concatenate::class, 'actualCONCATENATE'],\n            'argumentCount' => '1+',\n            'passCellReference' => true,\n        ],\n        'CONFIDENCE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Confidence::class, 'CONFIDENCE'],\n            'argumentCount' => '3',\n        ],\n        'CONFIDENCE.NORM' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Confidence::class, 'CONFIDENCE'],\n            'argumentCount' => '3',\n        ],\n        'CONFIDENCE.T' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3',\n        ],\n        'CONVERT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertUOM::class, 'CONVERT'],\n            'argumentCount' => '3',\n        ],\n        'CORREL' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'CORREL'],\n            'argumentCount' => '2',\n        ],\n        'COS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cosine::class, 'cos'],\n            'argumentCount' => '1',\n        ],\n        'COSH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cosine::class, 'cosh'],\n            'argumentCount' => '1',\n        ],\n        'COT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cotangent::class, 'cot'],\n            'argumentCount' => '1',\n        ],\n        'COTH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cotangent::class, 'coth'],\n            'argumentCount' => '1',\n        ],\n        'COUNT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Counts::class, 'COUNT'],\n            'argumentCount' => '1+',\n        ],\n        'COUNTA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Counts::class, 'COUNTA'],\n            'argumentCount' => '1+',\n        ],\n        'COUNTBLANK' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Counts::class, 'COUNTBLANK'],\n            'argumentCount' => '1',\n        ],\n        'COUNTIF' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Conditional::class, 'COUNTIF'],\n            'argumentCount' => '2',\n        ],\n        'COUNTIFS' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Conditional::class, 'COUNTIFS'],\n            'argumentCount' => '2+',\n        ],\n        'COUPDAYBS' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Coupons::class, 'COUPDAYBS'],\n            'argumentCount' => '3,4',\n        ],\n        'COUPDAYS' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Coupons::class, 'COUPDAYS'],\n            'argumentCount' => '3,4',\n        ],\n        'COUPDAYSNC' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Coupons::class, 'COUPDAYSNC'],\n            'argumentCount' => '3,4',\n        ],\n        'COUPNCD' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Coupons::class, 'COUPNCD'],\n            'argumentCount' => '3,4',\n        ],\n        'COUPNUM' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Coupons::class, 'COUPNUM'],\n            'argumentCount' => '3,4',\n        ],\n        'COUPPCD' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Coupons::class, 'COUPPCD'],\n            'argumentCount' => '3,4',\n        ],\n        'COVAR' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'COVAR'],\n            'argumentCount' => '2',\n        ],\n        'COVARIANCE.P' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'COVAR'],\n            'argumentCount' => '2',\n        ],\n        'COVARIANCE.S' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2',\n        ],\n        'CRITBINOM' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Binomial::class, 'inverse'],\n            'argumentCount' => '3',\n        ],\n        'CSC' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cosecant::class, 'csc'],\n            'argumentCount' => '1',\n        ],\n        'CSCH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Cosecant::class, 'csch'],\n            'argumentCount' => '1',\n        ],\n        'CUBEKPIMEMBER' => [\n            'category' => Category::CATEGORY_CUBE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'CUBEMEMBER' => [\n            'category' => Category::CATEGORY_CUBE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'CUBEMEMBERPROPERTY' => [\n            'category' => Category::CATEGORY_CUBE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'CUBERANKEDMEMBER' => [\n            'category' => Category::CATEGORY_CUBE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'CUBESET' => [\n            'category' => Category::CATEGORY_CUBE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'CUBESETCOUNT' => [\n            'category' => Category::CATEGORY_CUBE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'CUBEVALUE' => [\n            'category' => Category::CATEGORY_CUBE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'CUMIPMT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic\\Cumulative::class, 'interest'],\n            'argumentCount' => '6',\n        ],\n        'CUMPRINC' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic\\Cumulative::class, 'principal'],\n            'argumentCount' => '6',\n        ],\n        'DATE' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Date::class, 'fromYMD'],\n            'argumentCount' => '3',\n        ],\n        'DATEDIF' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Difference::class, 'interval'],\n            'argumentCount' => '2,3',\n        ],\n        'DATESTRING' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'DATEVALUE' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\DateValue::class, 'fromString'],\n            'argumentCount' => '1',\n        ],\n        'DAVERAGE' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DAverage::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DAY' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\DateParts::class, 'day'],\n            'argumentCount' => '1',\n        ],\n        'DAYS' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Days::class, 'between'],\n            'argumentCount' => '2',\n        ],\n        'DAYS360' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Days360::class, 'between'],\n            'argumentCount' => '2,3',\n        ],\n        'DB' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Depreciation::class, 'DB'],\n            'argumentCount' => '4,5',\n        ],\n        'DBCS' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1',\n        ],\n        'DCOUNT' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DCount::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DCOUNTA' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DCountA::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DDB' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Depreciation::class, 'DDB'],\n            'argumentCount' => '4,5',\n        ],\n        'DEC2BIN' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertDecimal::class, 'toBinary'],\n            'argumentCount' => '1,2',\n        ],\n        'DEC2HEX' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertDecimal::class, 'toHex'],\n            'argumentCount' => '1,2',\n        ],\n        'DEC2OCT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertDecimal::class, 'toOctal'],\n            'argumentCount' => '1,2',\n        ],\n        'DECIMAL' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2',\n        ],\n        'DEGREES' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Angle::class, 'toDegrees'],\n            'argumentCount' => '1',\n        ],\n        'DELTA' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\Compare::class, 'DELTA'],\n            'argumentCount' => '1,2',\n        ],\n        'DEVSQ' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Deviations::class, 'sumSquares'],\n            'argumentCount' => '1+',\n        ],\n        'DGET' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DGet::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DISC' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\Rates::class, 'discount'],\n            'argumentCount' => '4,5',\n        ],\n        'DMAX' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DMax::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DMIN' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DMin::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DOLLAR' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Format::class, 'DOLLAR'],\n            'argumentCount' => '1,2',\n        ],\n        'DOLLARDE' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Dollar::class, 'decimal'],\n            'argumentCount' => '2',\n        ],\n        'DOLLARFR' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Dollar::class, 'fractional'],\n            'argumentCount' => '2',\n        ],\n        'DPRODUCT' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DProduct::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DROP' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\ChooseRowsEtc::class, 'drop'],\n            'argumentCount' => '2-3',\n        ],\n        'DSTDEV' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DStDev::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DSTDEVP' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DStDevP::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DSUM' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DSum::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DURATION' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '5,6',\n        ],\n        'DVAR' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DVar::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'DVARP' => [\n            'category' => Category::CATEGORY_DATABASE,\n            'functionCall' => [Database\\DVarP::class, 'evaluate'],\n            'argumentCount' => '3',\n        ],\n        'ECMA.CEILING' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1,2',\n        ],\n        'EDATE' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Month::class, 'adjust'],\n            'argumentCount' => '2',\n        ],\n        'EFFECT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\InterestRate::class, 'effective'],\n            'argumentCount' => '2',\n        ],\n        'ENCODEURL' => [\n            'category' => Category::CATEGORY_WEB,\n            'functionCall' => [Web\\Service::class, 'urlEncode'],\n            'argumentCount' => '1',\n        ],\n        'EOMONTH' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Month::class, 'lastDay'],\n            'argumentCount' => '2',\n        ],\n        'ERF' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\Erf::class, 'ERF'],\n            'argumentCount' => '1,2',\n        ],\n        'ERF.PRECISE' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\Erf::class, 'ERFPRECISE'],\n            'argumentCount' => '1',\n        ],\n        'ERFC' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ErfC::class, 'ERFC'],\n            'argumentCount' => '1',\n        ],\n        'ERFC.PRECISE' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ErfC::class, 'ERFC'],\n            'argumentCount' => '1',\n        ],\n        'ERROR.TYPE' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\ExcelError::class, 'type'],\n            'argumentCount' => '1',\n        ],\n        'EVEN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Round::class, 'even'],\n            'argumentCount' => '1',\n        ],\n        'EXACT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Text::class, 'exact'],\n            'argumentCount' => '2',\n        ],\n        'EXP' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Exp::class, 'evaluate'],\n            'argumentCount' => '1',\n        ],\n        'EXPAND' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\ChooseRowsEtc::class, 'expand'],\n            'argumentCount' => '2-4',\n        ],\n        'EXPONDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Exponential::class, 'distribution'],\n            'argumentCount' => '3',\n        ],\n        'EXPON.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Exponential::class, 'distribution'],\n            'argumentCount' => '3',\n        ],\n        'FACT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Factorial::class, 'fact'],\n            'argumentCount' => '1',\n        ],\n        'FACTDOUBLE' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Factorial::class, 'factDouble'],\n            'argumentCount' => '1',\n        ],\n        'FALSE' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Boolean::class, 'FALSE'],\n            'argumentCount' => '0',\n        ],\n        'FDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3',\n        ],\n        'F.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\F::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'F.DIST.RT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3',\n        ],\n        'FILTER' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Filter::class, 'filter'],\n            'argumentCount' => '2-3',\n        ],\n        'FILTERXML' => [\n            'category' => Category::CATEGORY_WEB,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2',\n        ],\n        'FIND' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Search::class, 'sensitive'],\n            'argumentCount' => '2,3',\n        ],\n        'FINDB' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Search::class, 'sensitive'],\n            'argumentCount' => '2,3',\n        ],\n        'FINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3',\n        ],\n        'F.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3',\n        ],\n        'F.INV.RT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3',\n        ],\n        'FISHER' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Fisher::class, 'distribution'],\n            'argumentCount' => '1',\n        ],\n        'FISHERINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Fisher::class, 'inverse'],\n            'argumentCount' => '1',\n        ],\n        'FIXED' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Format::class, 'FIXEDFORMAT'],\n            'argumentCount' => '1-3',\n        ],\n        'FLOOR' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Floor::class, 'floor'],\n            'argumentCount' => '1-2', // Excel requires 2, Ods/Gnumeric 1-2\n        ],\n        'FLOOR.MATH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Floor::class, 'math'],\n            'argumentCount' => '1-3',\n        ],\n        // pseudo-function to help with Ods\n        'FLOOR.ODS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Floor::class, 'mathOds'],\n            'argumentCount' => '1-3',\n        ],\n        'FLOOR.PRECISE' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Floor::class, 'precise'],\n            'argumentCount' => '1-2',\n        ],\n        // pseudo-function implemented in Ods\n        'FLOOR.XCL' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Floor::class, 'floor'],\n            'argumentCount' => '2',\n        ],\n        'FORECAST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'FORECAST'],\n            'argumentCount' => '3',\n        ],\n        'FORECAST.ETS' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3-6',\n        ],\n        'FORECAST.ETS.CONFINT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3-6',\n        ],\n        'FORECAST.ETS.SEASONALITY' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2-4',\n        ],\n        'FORECAST.ETS.STAT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3-6',\n        ],\n        'FORECAST.LINEAR' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'FORECAST'],\n            'argumentCount' => '3',\n        ],\n        'FORMULATEXT' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Formula::class, 'text'],\n            'argumentCount' => '1',\n            'passCellReference' => true,\n            'passByReference' => [true],\n        ],\n        'FREQUENCY' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2',\n        ],\n        'FTEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2',\n        ],\n        'F.TEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2',\n        ],\n        'FV' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic::class, 'futureValue'],\n            'argumentCount' => '3-5',\n        ],\n        'FVSCHEDULE' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Single::class, 'futureValue'],\n            'argumentCount' => '2',\n        ],\n        'GAMMA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Gamma::class, 'gamma'],\n            'argumentCount' => '1',\n        ],\n        'GAMMADIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Gamma::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'GAMMA.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Gamma::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'GAMMAINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Gamma::class, 'inverse'],\n            'argumentCount' => '3',\n        ],\n        'GAMMA.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Gamma::class, 'inverse'],\n            'argumentCount' => '3',\n        ],\n        'GAMMALN' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Gamma::class, 'ln'],\n            'argumentCount' => '1',\n        ],\n        'GAMMALN.PRECISE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Gamma::class, 'ln'],\n            'argumentCount' => '1',\n        ],\n        'GAUSS' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StandardNormal::class, 'gauss'],\n            'argumentCount' => '1',\n        ],\n        'GCD' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Gcd::class, 'evaluate'],\n            'argumentCount' => '1+',\n        ],\n        'GEOMEAN' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages\\Mean::class, 'geometric'],\n            'argumentCount' => '1+',\n        ],\n        'GESTEP' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\Compare::class, 'GESTEP'],\n            'argumentCount' => '1,2',\n        ],\n        'GETPIVOTDATA' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2+',\n        ],\n        'GROUPBY' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3-7',\n        ],\n        'GROWTH' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'GROWTH'],\n            'argumentCount' => '1-4',\n        ],\n        'HARMEAN' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages\\Mean::class, 'harmonic'],\n            'argumentCount' => '1+',\n        ],\n        'HEX2BIN' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertHex::class, 'toBinary'],\n            'argumentCount' => '1,2',\n        ],\n        'HEX2DEC' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertHex::class, 'toDecimal'],\n            'argumentCount' => '1',\n        ],\n        'HEX2OCT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertHex::class, 'toOctal'],\n            'argumentCount' => '1,2',\n        ],\n        'HLOOKUP' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\HLookup::class, 'lookup'],\n            'argumentCount' => '3,4',\n        ],\n        'HOUR' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\TimeParts::class, 'hour'],\n            'argumentCount' => '1',\n        ],\n        'HSTACK' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Hstack::class, 'hstack'],\n            'argumentCount' => '1+',\n        ],\n        'HYPERLINK' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Hyperlink::class, 'set'],\n            'argumentCount' => '1,2',\n            'passCellReference' => true,\n        ],\n        'HYPGEOMDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\HyperGeometric::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'HYPGEOM.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '5',\n        ],\n        'IF' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Conditional::class, 'statementIf'],\n            'argumentCount' => '2-3',\n        ],\n        'IFERROR' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Conditional::class, 'IFERROR'],\n            'argumentCount' => '2',\n        ],\n        'IFNA' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Conditional::class, 'IFNA'],\n            'argumentCount' => '2',\n        ],\n        'IFS' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Conditional::class, 'IFS'],\n            'argumentCount' => '2+',\n        ],\n        'IMABS' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMABS'],\n            'argumentCount' => '1',\n        ],\n        'IMAGINARY' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\Complex::class, 'IMAGINARY'],\n            'argumentCount' => '1',\n        ],\n        'IMARGUMENT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMARGUMENT'],\n            'argumentCount' => '1',\n        ],\n        'IMCONJUGATE' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMCONJUGATE'],\n            'argumentCount' => '1',\n        ],\n        'IMCOS' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMCOS'],\n            'argumentCount' => '1',\n        ],\n        'IMCOSH' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMCOSH'],\n            'argumentCount' => '1',\n        ],\n        'IMCOT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMCOT'],\n            'argumentCount' => '1',\n        ],\n        'IMCSC' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMCSC'],\n            'argumentCount' => '1',\n        ],\n        'IMCSCH' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMCSCH'],\n            'argumentCount' => '1',\n        ],\n        'IMDIV' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexOperations::class, 'IMDIV'],\n            'argumentCount' => '2',\n        ],\n        'IMEXP' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMEXP'],\n            'argumentCount' => '1',\n        ],\n        'IMLN' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMLN'],\n            'argumentCount' => '1',\n        ],\n        'IMLOG10' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMLOG10'],\n            'argumentCount' => '1',\n        ],\n        'IMLOG2' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMLOG2'],\n            'argumentCount' => '1',\n        ],\n        'IMPOWER' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMPOWER'],\n            'argumentCount' => '2',\n        ],\n        'IMPRODUCT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexOperations::class, 'IMPRODUCT'],\n            'argumentCount' => '1+',\n        ],\n        'IMREAL' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\Complex::class, 'IMREAL'],\n            'argumentCount' => '1',\n        ],\n        'IMSEC' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMSEC'],\n            'argumentCount' => '1',\n        ],\n        'IMSECH' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMSECH'],\n            'argumentCount' => '1',\n        ],\n        'IMSIN' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMSIN'],\n            'argumentCount' => '1',\n        ],\n        'IMSINH' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMSINH'],\n            'argumentCount' => '1',\n        ],\n        'IMSQRT' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMSQRT'],\n            'argumentCount' => '1',\n        ],\n        'IMSUB' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexOperations::class, 'IMSUB'],\n            'argumentCount' => '2',\n        ],\n        'IMSUM' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexOperations::class, 'IMSUM'],\n            'argumentCount' => '1+',\n        ],\n        'IMTAN' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ComplexFunctions::class, 'IMTAN'],\n            'argumentCount' => '1',\n        ],\n        'INDEX' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Matrix::class, 'index'],\n            'argumentCount' => '2-4',\n        ],\n        'INDIRECT' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Indirect::class, 'INDIRECT'],\n            'argumentCount' => '1,2',\n            'passCellReference' => true,\n        ],\n        'INFO' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Info::class, 'getInfo'],\n            'argumentCount' => '1',\n            'passCellReference' => true,\n        ],\n        'INT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\IntClass::class, 'evaluate'],\n            'argumentCount' => '1',\n        ],\n        'INTERCEPT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'INTERCEPT'],\n            'argumentCount' => '2',\n        ],\n        'INTRATE' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\Rates::class, 'interest'],\n            'argumentCount' => '4,5',\n        ],\n        'IPMT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic\\Interest::class, 'payment'],\n            'argumentCount' => '4-6',\n        ],\n        'IRR' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Variable\\Periodic::class, 'rate'],\n            'argumentCount' => '1,2',\n        ],\n        'ISBLANK' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isBlank'],\n            'argumentCount' => '1',\n        ],\n        'ISERR' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\ErrorValue::class, 'isErr'],\n            'argumentCount' => '1',\n        ],\n        'ISERROR' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\ErrorValue::class, 'isError'],\n            'argumentCount' => '1',\n        ],\n        'ISEVEN' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isEven'],\n            'argumentCount' => '1',\n        ],\n        'ISFORMULA' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isFormula'],\n            'argumentCount' => '1',\n            'passCellReference' => true,\n            'passByReference' => [true],\n        ],\n        'ISLOGICAL' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isLogical'],\n            'argumentCount' => '1',\n        ],\n        'ISNA' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\ErrorValue::class, 'isNa'],\n            'argumentCount' => '1',\n        ],\n        'ISNONTEXT' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isNonText'],\n            'argumentCount' => '1',\n        ],\n        'ISNUMBER' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isNumber'],\n            'argumentCount' => '1',\n        ],\n        'ISO.CEILING' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1,2',\n        ],\n        'ISODD' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isOdd'],\n            'argumentCount' => '1',\n        ],\n        'ISOMITTED' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'ISOWEEKNUM' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Week::class, 'isoWeekNumber'],\n            'argumentCount' => '1',\n        ],\n        'ISPMT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic\\Interest::class, 'schedulePayment'],\n            'argumentCount' => '4',\n        ],\n        'ISREF' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isRef'],\n            'argumentCount' => '1',\n            'passCellReference' => true,\n            'passByReference' => [true],\n        ],\n        'ISTEXT' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'isText'],\n            'argumentCount' => '1',\n        ],\n        'ISTHAIDIGIT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'JIS' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1',\n        ],\n        'KURT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Deviations::class, 'kurtosis'],\n            'argumentCount' => '1+',\n        ],\n        'LAMBDA' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'LARGE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Size::class, 'large'],\n            'argumentCount' => '2',\n        ],\n        'LCM' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Lcm::class, 'evaluate'],\n            'argumentCount' => '1+',\n        ],\n        'LEFT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Extract::class, 'left'],\n            'argumentCount' => '1,2',\n        ],\n        'LEFTB' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Extract::class, 'left'],\n            'argumentCount' => '1,2',\n        ],\n        'LEN' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Text::class, 'length'],\n            'argumentCount' => '1',\n        ],\n        'LENB' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Text::class, 'length'],\n            'argumentCount' => '1',\n        ],\n        'LET' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'LINEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'LINEST'],\n            'argumentCount' => '1-4',\n        ],\n        'LN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Logarithms::class, 'natural'],\n            'argumentCount' => '1',\n        ],\n        'LOG' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Logarithms::class, 'withBase'],\n            'argumentCount' => '1,2',\n        ],\n        'LOG10' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Logarithms::class, 'base10'],\n            'argumentCount' => '1',\n        ],\n        'LOGEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'LOGEST'],\n            'argumentCount' => '1-4',\n        ],\n        'LOGINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\LogNormal::class, 'inverse'],\n            'argumentCount' => '3',\n        ],\n        'LOGNORMDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\LogNormal::class, 'cumulative'],\n            'argumentCount' => '3',\n        ],\n        'LOGNORM.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\LogNormal::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'LOGNORM.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\LogNormal::class, 'inverse'],\n            'argumentCount' => '3',\n        ],\n        'LOOKUP' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Lookup::class, 'lookup'],\n            'argumentCount' => '2,3',\n        ],\n        'LOWER' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\CaseConvert::class, 'lower'],\n            'argumentCount' => '1',\n        ],\n        'MAKEARRAY' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'MAP' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'MATCH' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\ExcelMatch::class, 'MATCH'],\n            'argumentCount' => '2,3',\n        ],\n        'MAX' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Maximum::class, 'max'],\n            'argumentCount' => '1+',\n        ],\n        'MAXA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Maximum::class, 'maxA'],\n            'argumentCount' => '1+',\n        ],\n        'MAXIFS' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Conditional::class, 'MAXIFS'],\n            'argumentCount' => '3+',\n        ],\n        'MDETERM' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\MatrixFunctions::class, 'determinant'],\n            'argumentCount' => '1',\n        ],\n        'MDURATION' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '5,6',\n        ],\n        'MEDIAN' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages::class, 'median'],\n            'argumentCount' => '1+',\n        ],\n        'MEDIANIF' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2+',\n        ],\n        'MID' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Extract::class, 'mid'],\n            'argumentCount' => '3',\n        ],\n        'MIDB' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Extract::class, 'mid'],\n            'argumentCount' => '3',\n        ],\n        'MIN' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Minimum::class, 'min'],\n            'argumentCount' => '1+',\n        ],\n        'MINA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Minimum::class, 'minA'],\n            'argumentCount' => '1+',\n        ],\n        'MINIFS' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Conditional::class, 'MINIFS'],\n            'argumentCount' => '3+',\n        ],\n        'MINUTE' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\TimeParts::class, 'minute'],\n            'argumentCount' => '1',\n        ],\n        'MINVERSE' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\MatrixFunctions::class, 'inverse'],\n            'argumentCount' => '1',\n        ],\n        'MIRR' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Variable\\Periodic::class, 'modifiedRate'],\n            'argumentCount' => '3',\n        ],\n        'MMULT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\MatrixFunctions::class, 'multiply'],\n            'argumentCount' => '2',\n        ],\n        'MOD' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Operations::class, 'mod'],\n            'argumentCount' => '2',\n        ],\n        'MODE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages::class, 'mode'],\n            'argumentCount' => '1+',\n        ],\n        'MODE.MULT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1+',\n        ],\n        'MODE.SNGL' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages::class, 'mode'],\n            'argumentCount' => '1+',\n        ],\n        'MONTH' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\DateParts::class, 'month'],\n            'argumentCount' => '1',\n        ],\n        'MROUND' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Round::class, 'multiple'],\n            'argumentCount' => '2',\n        ],\n        'MULTINOMIAL' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Factorial::class, 'multinomial'],\n            'argumentCount' => '1+',\n        ],\n        'MUNIT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\MatrixFunctions::class, 'identity'],\n            'argumentCount' => '1',\n        ],\n        'N' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'asNumber'],\n            'argumentCount' => '1',\n        ],\n        'NA' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\ExcelError::class, 'NA'],\n            'argumentCount' => '0',\n        ],\n        'NEGBINOMDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Binomial::class, 'negative'],\n            'argumentCount' => '3',\n        ],\n        'NEGBINOM.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '4',\n        ],\n        'NETWORKDAYS' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\NetworkDays::class, 'count'],\n            'argumentCount' => '2-3',\n        ],\n        'NETWORKDAYS.INTL' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2-4',\n        ],\n        'NOMINAL' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\InterestRate::class, 'nominal'],\n            'argumentCount' => '2',\n        ],\n        'NORMDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Normal::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'NORM.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Normal::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'NORMINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Normal::class, 'inverse'],\n            'argumentCount' => '3',\n        ],\n        'NORM.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Normal::class, 'inverse'],\n            'argumentCount' => '3',\n        ],\n        'NORMSDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StandardNormal::class, 'cumulative'],\n            'argumentCount' => '1',\n        ],\n        'NORM.S.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StandardNormal::class, 'distribution'],\n            'argumentCount' => '1,2',\n        ],\n        'NORMSINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StandardNormal::class, 'inverse'],\n            'argumentCount' => '1',\n        ],\n        'NORM.S.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StandardNormal::class, 'inverse'],\n            'argumentCount' => '1',\n        ],\n        'NOT' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Operations::class, 'NOT'],\n            'argumentCount' => '1',\n        ],\n        'NOW' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Current::class, 'now'],\n            'argumentCount' => '0',\n        ],\n        'NPER' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic::class, 'periods'],\n            'argumentCount' => '3-5',\n        ],\n        'NPV' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Variable\\Periodic::class, 'presentValue'],\n            'argumentCount' => '2+',\n        ],\n        'NUMBERSTRING' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'NUMBERVALUE' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Format::class, 'NUMBERVALUE'],\n            'argumentCount' => '1+',\n        ],\n        'OCT2BIN' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertOctal::class, 'toBinary'],\n            'argumentCount' => '1,2',\n        ],\n        'OCT2DEC' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertOctal::class, 'toDecimal'],\n            'argumentCount' => '1',\n        ],\n        'OCT2HEX' => [\n            'category' => Category::CATEGORY_ENGINEERING,\n            'functionCall' => [Engineering\\ConvertOctal::class, 'toHex'],\n            'argumentCount' => '1,2',\n        ],\n        'ODD' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Round::class, 'odd'],\n            'argumentCount' => '1',\n        ],\n        'ODDFPRICE' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '8,9',\n        ],\n        'ODDFYIELD' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '8,9',\n        ],\n        'ODDLPRICE' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '7,8',\n        ],\n        'ODDLYIELD' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '7,8',\n        ],\n        'OFFSET' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Offset::class, 'OFFSET'],\n            'argumentCount' => '3-5',\n            'passCellReference' => true,\n            'passByReference' => [true],\n        ],\n        'OR' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Operations::class, 'logicalOr'],\n            'argumentCount' => '1+',\n        ],\n        'PDURATION' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Single::class, 'periods'],\n            'argumentCount' => '3',\n        ],\n        'PEARSON' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'CORREL'],\n            'argumentCount' => '2',\n        ],\n        'PERCENTILE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Percentiles::class, 'PERCENTILE'],\n            'argumentCount' => '2',\n        ],\n        'PERCENTILE.EXC' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2',\n        ],\n        'PERCENTILE.INC' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Percentiles::class, 'PERCENTILE'],\n            'argumentCount' => '2',\n        ],\n        'PERCENTRANK' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Percentiles::class, 'PERCENTRANK'],\n            'argumentCount' => '2,3',\n        ],\n        'PERCENTRANK.EXC' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2,3',\n        ],\n        'PERCENTRANK.INC' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Percentiles::class, 'PERCENTRANK'],\n            'argumentCount' => '2,3',\n        ],\n        'PERMUT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Permutations::class, 'PERMUT'],\n            'argumentCount' => '2',\n        ],\n        'PERMUTATIONA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Permutations::class, 'PERMUTATIONA'],\n            'argumentCount' => '2',\n        ],\n        'PHONETIC' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1',\n        ],\n        'PHI' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1',\n        ],\n        'PI' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => 'pi',\n            'argumentCount' => '0',\n        ],\n        'PMT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic\\Payments::class, 'annuity'],\n            'argumentCount' => '3-5',\n        ],\n        'POISSON' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Poisson::class, 'distribution'],\n            'argumentCount' => '3',\n        ],\n        'POISSON.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Poisson::class, 'distribution'],\n            'argumentCount' => '3',\n        ],\n        'POWER' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Operations::class, 'power'],\n            'argumentCount' => '2',\n        ],\n        'PPMT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic\\Payments::class, 'interestPayment'],\n            'argumentCount' => '4-6',\n        ],\n        'PRICE' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\Price::class, 'price'],\n            'argumentCount' => '6,7',\n        ],\n        'PRICEDISC' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\Price::class, 'priceDiscounted'],\n            'argumentCount' => '4,5',\n        ],\n        'PRICEMAT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\Price::class, 'priceAtMaturity'],\n            'argumentCount' => '5,6',\n        ],\n        'PROB' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3,4',\n        ],\n        'PRODUCT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Operations::class, 'product'],\n            'argumentCount' => '1+',\n        ],\n        'PROPER' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\CaseConvert::class, 'proper'],\n            'argumentCount' => '1',\n        ],\n        'PV' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic::class, 'presentValue'],\n            'argumentCount' => '3-5',\n        ],\n        'QUARTILE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Percentiles::class, 'QUARTILE'],\n            'argumentCount' => '2',\n        ],\n        'QUARTILE.EXC' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2',\n        ],\n        'QUARTILE.INC' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Percentiles::class, 'QUARTILE'],\n            'argumentCount' => '2',\n        ],\n        'QUOTIENT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Operations::class, 'quotient'],\n            'argumentCount' => '2',\n        ],\n        'RADIANS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Angle::class, 'toRadians'],\n            'argumentCount' => '1',\n        ],\n        'RAND' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Random::class, 'rand'],\n            'argumentCount' => '0',\n        ],\n        'RANDARRAY' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Random::class, 'randArray'],\n            'argumentCount' => '0-5',\n        ],\n        'RANDBETWEEN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Random::class, 'randBetween'],\n            'argumentCount' => '2',\n        ],\n        'RANK' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Percentiles::class, 'RANK'],\n            'argumentCount' => '2,3',\n        ],\n        'RANK.AVG' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2,3',\n        ],\n        'RANK.EQ' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Percentiles::class, 'RANK'],\n            'argumentCount' => '2,3',\n        ],\n        'RATE' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Constant\\Periodic\\Interest::class, 'rate'],\n            'argumentCount' => '3-6',\n        ],\n        'RECEIVED' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\Price::class, 'received'],\n            'argumentCount' => '4-5',\n        ],\n        'REDUCE' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'REPLACE' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Replace::class, 'replace'],\n            'argumentCount' => '4',\n        ],\n        'REPLACEB' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Replace::class, 'replace'],\n            'argumentCount' => '4',\n        ],\n        'REPT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Concatenate::class, 'builtinREPT'],\n            'argumentCount' => '2',\n        ],\n        'RIGHT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Extract::class, 'right'],\n            'argumentCount' => '1,2',\n        ],\n        'RIGHTB' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Extract::class, 'right'],\n            'argumentCount' => '1,2',\n        ],\n        'ROMAN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Roman::class, 'evaluate'],\n            'argumentCount' => '1,2',\n        ],\n        'ROUND' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Round::class, 'round'],\n            'argumentCount' => '2',\n        ],\n        'ROUNDBAHTDOWN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'ROUNDBAHTUP' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'ROUNDDOWN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Round::class, 'down'],\n            'argumentCount' => '2',\n        ],\n        'ROUNDUP' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Round::class, 'up'],\n            'argumentCount' => '2',\n        ],\n        'ROW' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\RowColumnInformation::class, 'ROW'],\n            'argumentCount' => '-1',\n            'passCellReference' => true,\n            'passByReference' => [true],\n        ],\n        'ROWS' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\RowColumnInformation::class, 'ROWS'],\n            'argumentCount' => '1',\n        ],\n        'RRI' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Single::class, 'interestRate'],\n            'argumentCount' => '3',\n        ],\n        'RSQ' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'RSQ'],\n            'argumentCount' => '2',\n        ],\n        'RTD' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1+',\n        ],\n        'SEARCH' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Search::class, 'insensitive'],\n            'argumentCount' => '2,3',\n        ],\n        'SCAN' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '*',\n        ],\n        'SEARCHB' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Search::class, 'insensitive'],\n            'argumentCount' => '2,3',\n        ],\n        'SEC' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Secant::class, 'sec'],\n            'argumentCount' => '1',\n        ],\n        'SECH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Secant::class, 'sech'],\n            'argumentCount' => '1',\n        ],\n        'SECOND' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\TimeParts::class, 'second'],\n            'argumentCount' => '1',\n        ],\n        'SEQUENCE' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\MatrixFunctions::class, 'sequence'],\n            'argumentCount' => '1-4',\n        ],\n        'SERIESSUM' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\SeriesSum::class, 'evaluate'],\n            'argumentCount' => '4',\n        ],\n        'SHEET' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '0,1',\n        ],\n        'SHEETS' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '0,1',\n        ],\n        'SIGN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Sign::class, 'evaluate'],\n            'argumentCount' => '1',\n        ],\n        'SIN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Sine::class, 'sin'],\n            'argumentCount' => '1',\n        ],\n        'SINGLE' => [\n            'category' => Category::CATEGORY_MICROSOFT_INTERNAL,\n            'functionCall' => [Internal\\ExcelArrayPseudoFunctions::class, 'single'],\n            'argumentCount' => '1',\n            'passCellReference' => true,\n            'passByReference' => [true],\n        ],\n        'SINH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Sine::class, 'sinh'],\n            'argumentCount' => '1',\n        ],\n        'SKEW' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Deviations::class, 'skew'],\n            'argumentCount' => '1+',\n        ],\n        'SKEW.P' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '1+',\n        ],\n        'SLN' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Depreciation::class, 'SLN'],\n            'argumentCount' => '3',\n        ],\n        'SLOPE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'SLOPE'],\n            'argumentCount' => '2',\n        ],\n        'SMALL' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Size::class, 'small'],\n            'argumentCount' => '2',\n        ],\n        'SORT' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Sort::class, 'sort'],\n            'argumentCount' => '1-4',\n        ],\n        'SORTBY' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Sort::class, 'sortBy'],\n            'argumentCount' => '2+',\n        ],\n        'SQRT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Sqrt::class, 'sqrt'],\n            'argumentCount' => '1',\n        ],\n        'SQRTPI' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Sqrt::class, 'pi'],\n            'argumentCount' => '1',\n        ],\n        'STANDARDIZE' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Standardize::class, 'execute'],\n            'argumentCount' => '3',\n        ],\n        'STDEV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\StandardDeviations::class, 'STDEV'],\n            'argumentCount' => '1+',\n        ],\n        'STDEV.S' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\StandardDeviations::class, 'STDEV'],\n            'argumentCount' => '1+',\n        ],\n        'STDEV.P' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\StandardDeviations::class, 'STDEVP'],\n            'argumentCount' => '1+',\n        ],\n        'STDEVA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\StandardDeviations::class, 'STDEVA'],\n            'argumentCount' => '1+',\n        ],\n        'STDEVP' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\StandardDeviations::class, 'STDEVP'],\n            'argumentCount' => '1+',\n        ],\n        'STDEVPA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\StandardDeviations::class, 'STDEVPA'],\n            'argumentCount' => '1+',\n        ],\n        'STEYX' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'STEYX'],\n            'argumentCount' => '2',\n        ],\n        'SUBSTITUTE' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Replace::class, 'substitute'],\n            'argumentCount' => '3,4',\n        ],\n        'SUBTOTAL' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Subtotal::class, 'evaluate'],\n            'argumentCount' => '2+',\n            'passCellReference' => true,\n        ],\n        'SUM' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Sum::class, 'sumErroringStrings'],\n            'argumentCount' => '1+',\n        ],\n        'SUMIF' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Statistical\\Conditional::class, 'SUMIF'],\n            'argumentCount' => '2,3',\n        ],\n        'SUMIFS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Statistical\\Conditional::class, 'SUMIFS'],\n            'argumentCount' => '3+',\n        ],\n        'SUMPRODUCT' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Sum::class, 'product'],\n            'argumentCount' => '1+',\n        ],\n        'SUMSQ' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\SumSquares::class, 'sumSquare'],\n            'argumentCount' => '1+',\n        ],\n        'SUMX2MY2' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\SumSquares::class, 'sumXSquaredMinusYSquared'],\n            'argumentCount' => '2',\n        ],\n        'SUMX2PY2' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\SumSquares::class, 'sumXSquaredPlusYSquared'],\n            'argumentCount' => '2',\n        ],\n        'SUMXMY2' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\SumSquares::class, 'sumXMinusYSquared'],\n            'argumentCount' => '2',\n        ],\n        'SWITCH' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Conditional::class, 'statementSwitch'],\n            'argumentCount' => '3+',\n        ],\n        'SYD' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Depreciation::class, 'SYD'],\n            'argumentCount' => '4',\n        ],\n        'T' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Text::class, 'test'],\n            'argumentCount' => '1',\n        ],\n        'TAKE' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\ChooseRowsEtc::class, 'take'],\n            'argumentCount' => '2-3',\n        ],\n        'TAN' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Tangent::class, 'tan'],\n            'argumentCount' => '1',\n        ],\n        'TANH' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trig\\Tangent::class, 'tanh'],\n            'argumentCount' => '1',\n        ],\n        'TBILLEQ' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\TreasuryBill::class, 'bondEquivalentYield'],\n            'argumentCount' => '3',\n        ],\n        'TBILLPRICE' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\TreasuryBill::class, 'price'],\n            'argumentCount' => '3',\n        ],\n        'TBILLYIELD' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\TreasuryBill::class, 'yield'],\n            'argumentCount' => '3',\n        ],\n        'TDIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StudentT::class, 'distribution'],\n            'argumentCount' => '3',\n        ],\n        'T.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StudentT::class, 'tDotDist'],\n            'argumentCount' => '3',\n        ],\n        'T.DIST.2T' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StudentT::class, 'tDotDistDot2T'],\n            'argumentCount' => '2',\n        ],\n        'T.DIST.RT' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StudentT::class, 'tDotDistDotRT'],\n            'argumentCount' => '2',\n        ],\n        'TEXT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Format::class, 'TEXTFORMAT'],\n            'argumentCount' => '2',\n        ],\n        'TEXTAFTER' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Extract::class, 'after'],\n            'argumentCount' => '2-6',\n        ],\n        'TEXTBEFORE' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Extract::class, 'before'],\n            'argumentCount' => '2-6',\n        ],\n        'TEXTJOIN' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Concatenate::class, 'TEXTJOIN'],\n            'argumentCount' => '3+',\n        ],\n        'TEXTSPLIT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Text::class, 'split'],\n            'argumentCount' => '2-6',\n        ],\n        'THAIDAYOFWEEK' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'THAIDIGIT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'THAIMONTHOFYEAR' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'THAINUMSOUND' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'THAINUMSTRING' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'THAISTRINGLENGTH' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'THAIYEAR' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '?',\n        ],\n        'TIME' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Time::class, 'fromHMS'],\n            'argumentCount' => '3',\n        ],\n        'TIMEVALUE' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\TimeValue::class, 'fromString'],\n            'argumentCount' => '1',\n        ],\n        'TINV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StudentT::class, 'inverse'],\n            'argumentCount' => '2',\n        ],\n        'T.INV' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StudentT::class, 'tDotInv'],\n            'argumentCount' => '2',\n        ],\n        'T.INV.2T' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StudentT::class, 'inverse'],\n            'argumentCount' => '2',\n        ],\n        'TODAY' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Current::class, 'today'],\n            'argumentCount' => '0',\n        ],\n        'TOCOL' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\TorowTocol::class, 'tocol'],\n            'argumentCount' => '1-3',\n        ],\n        'TOROW' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\TorowTocol::class, 'torow'],\n            'argumentCount' => '1-3',\n        ],\n        'TRANSPOSE' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Matrix::class, 'transpose'],\n            'argumentCount' => '1',\n        ],\n        'TREND' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Trends::class, 'TREND'],\n            'argumentCount' => '1-4',\n        ],\n        'TRIM' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Trim::class, 'spaces'],\n            'argumentCount' => '1',\n        ],\n        'TRIMMEAN' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Averages\\Mean::class, 'trim'],\n            'argumentCount' => '2',\n        ],\n        'TRUE' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Boolean::class, 'TRUE'],\n            'argumentCount' => '0',\n        ],\n        'TRUNC' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [MathTrig\\Trunc::class, 'evaluate'],\n            'argumentCount' => '1,2',\n        ],\n        'TTEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '4',\n        ],\n        'T.TEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '4',\n        ],\n        'TYPE' => [\n            'category' => Category::CATEGORY_INFORMATION,\n            'functionCall' => [Information\\Value::class, 'type'],\n            'argumentCount' => '1',\n        ],\n        'UNICHAR' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\CharacterConvert::class, 'characterUnicode'],\n            'argumentCount' => '1',\n        ],\n        'UNICODE' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\CharacterConvert::class, 'codeUnicode'],\n            'argumentCount' => '1',\n        ],\n        'UNIQUE' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Unique::class, 'unique'],\n            'argumentCount' => '1+',\n        ],\n        'UPPER' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\CaseConvert::class, 'upper'],\n            'argumentCount' => '1',\n        ],\n        'USDOLLAR' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Dollar::class, 'format'],\n            'argumentCount' => '2',\n        ],\n        'VALUE' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Format::class, 'VALUE'],\n            'argumentCount' => '1',\n        ],\n        'VALUETOTEXT' => [\n            'category' => Category::CATEGORY_TEXT_AND_DATA,\n            'functionCall' => [TextData\\Format::class, 'valueToText'],\n            'argumentCount' => '1,2',\n        ],\n        'VAR' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Variances::class, 'VAR'],\n            'argumentCount' => '1+',\n        ],\n        'VAR.P' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Variances::class, 'VARP'],\n            'argumentCount' => '1+',\n        ],\n        'VAR.S' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Variances::class, 'VAR'],\n            'argumentCount' => '1+',\n        ],\n        'VARA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Variances::class, 'VARA'],\n            'argumentCount' => '1+',\n        ],\n        'VARP' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Variances::class, 'VARP'],\n            'argumentCount' => '1+',\n        ],\n        'VARPA' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Variances::class, 'VARPA'],\n            'argumentCount' => '1+',\n        ],\n        'VDB' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '5-7',\n        ],\n        'VLOOKUP' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\VLookup::class, 'lookup'],\n            'argumentCount' => '3,4',\n        ],\n        'VSTACK' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [LookupRef\\Vstack::class, 'vstack'],\n            'argumentCount' => '1+',\n        ],\n        'WEBSERVICE' => [\n            'category' => Category::CATEGORY_WEB,\n            'functionCall' => [Web\\Service::class, 'webService'],\n            'argumentCount' => '1',\n            'passCellReference' => true,\n        ],\n        'WEEKDAY' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Week::class, 'day'],\n            'argumentCount' => '1,2',\n        ],\n        'WEEKNUM' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\Week::class, 'number'],\n            'argumentCount' => '1,2',\n        ],\n        'WEIBULL' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Weibull::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'WEIBULL.DIST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\Weibull::class, 'distribution'],\n            'argumentCount' => '4',\n        ],\n        'WORKDAY' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\WorkDay::class, 'date'],\n            'argumentCount' => '2-3',\n        ],\n        'WORKDAY.INTL' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2-4',\n        ],\n        'WRAPCOLS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2-3',\n        ],\n        'WRAPROWS' => [\n            'category' => Category::CATEGORY_MATH_AND_TRIG,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2-3',\n        ],\n        'XIRR' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Variable\\NonPeriodic::class, 'rate'],\n            'argumentCount' => '2,3',\n        ],\n        'XLOOKUP' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '3-6',\n        ],\n        'XNPV' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\CashFlow\\Variable\\NonPeriodic::class, 'presentValue'],\n            'argumentCount' => '3',\n        ],\n        'XMATCH' => [\n            'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '2,3',\n        ],\n        'XOR' => [\n            'category' => Category::CATEGORY_LOGICAL,\n            'functionCall' => [Logical\\Operations::class, 'logicalXor'],\n            'argumentCount' => '1+',\n        ],\n        'YEAR' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\DateParts::class, 'year'],\n            'argumentCount' => '1',\n        ],\n        'YEARFRAC' => [\n            'category' => Category::CATEGORY_DATE_AND_TIME,\n            'functionCall' => [DateTimeExcel\\YearFrac::class, 'fraction'],\n            'argumentCount' => '2,3',\n        ],\n        'YIELD' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Functions::class, 'DUMMY'],\n            'argumentCount' => '6,7',\n        ],\n        'YIELDDISC' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\Yields::class, 'yieldDiscounted'],\n            'argumentCount' => '4,5',\n        ],\n        'YIELDMAT' => [\n            'category' => Category::CATEGORY_FINANCIAL,\n            'functionCall' => [Financial\\Securities\\Yields::class, 'yieldAtMaturity'],\n            'argumentCount' => '5,6',\n        ],\n        'ZTEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StandardNormal::class, 'zTest'],\n            'argumentCount' => '2-3',\n        ],\n        'Z.TEST' => [\n            'category' => Category::CATEGORY_STATISTICAL,\n            'functionCall' => [Statistical\\Distributions\\StandardNormal::class, 'zTest'],\n            'argumentCount' => '2-3',\n        ],\n    ];\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Functions.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Functions\n{\n    const PRECISION = 8.88E-016;\n\n    /**\n     * 2 / PI.\n     */\n    const M_2DIVPI = 0.63661977236758134307553505349006;\n\n    const COMPATIBILITY_EXCEL = 'Excel';\n    const COMPATIBILITY_GNUMERIC = 'Gnumeric';\n    const COMPATIBILITY_OPENOFFICE = 'OpenOfficeCalc';\n\n    /** Use of RETURNDATE_PHP_NUMERIC is discouraged - not 32-bit Y2038-safe, no timezone. */\n    const RETURNDATE_PHP_NUMERIC = 'P';\n    /** Use of RETURNDATE_UNIX_TIMESTAMP is discouraged - not 32-bit Y2038-safe, no timezone. */\n    const RETURNDATE_UNIX_TIMESTAMP = 'P';\n    const RETURNDATE_PHP_OBJECT = 'O';\n    const RETURNDATE_PHP_DATETIME_OBJECT = 'O';\n    const RETURNDATE_EXCEL = 'E';\n\n    public const NOT_YET_IMPLEMENTED = '#Not Yet Implemented';\n\n    /**\n     * Compatibility mode to use for error checking and responses.\n     */\n    protected static string $compatibilityMode = self::COMPATIBILITY_EXCEL;\n\n    /**\n     * Data Type to use when returning date values.\n     */\n    protected static string $returnDateType = self::RETURNDATE_EXCEL;\n\n    /**\n     * Set the Compatibility Mode.\n     *\n     * @param string $compatibilityMode Compatibility Mode\n     *                                  Permitted values are:\n     *                                      Functions::COMPATIBILITY_EXCEL        'Excel'\n     *                                      Functions::COMPATIBILITY_GNUMERIC     'Gnumeric'\n     *                                      Functions::COMPATIBILITY_OPENOFFICE   'OpenOfficeCalc'\n     *\n     * @return bool (Success or Failure)\n     */\n    public static function setCompatibilityMode(string $compatibilityMode): bool\n    {\n        if (\n            ($compatibilityMode == self::COMPATIBILITY_EXCEL)\n            || ($compatibilityMode == self::COMPATIBILITY_GNUMERIC)\n            || ($compatibilityMode == self::COMPATIBILITY_OPENOFFICE)\n        ) {\n            self::$compatibilityMode = $compatibilityMode;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Return the current Compatibility Mode.\n     *\n     * @return string Compatibility Mode\n     *                Possible Return values are:\n     *                    Functions::COMPATIBILITY_EXCEL        'Excel'\n     *                    Functions::COMPATIBILITY_GNUMERIC     'Gnumeric'\n     *                    Functions::COMPATIBILITY_OPENOFFICE   'OpenOfficeCalc'\n     */\n    public static function getCompatibilityMode(): string\n    {\n        return self::$compatibilityMode;\n    }\n\n    /**\n     * Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP DateTime Object).\n     *\n     * @param string $returnDateType Return Date Format\n     *                               Permitted values are:\n     *                                   Functions::RETURNDATE_UNIX_TIMESTAMP       'P'\n     *                                   Functions::RETURNDATE_PHP_DATETIME_OBJECT  'O'\n     *                                   Functions::RETURNDATE_EXCEL                'E'\n     *\n     * @return bool Success or failure\n     */\n    public static function setReturnDateType(string $returnDateType): bool\n    {\n        if (\n            ($returnDateType == self::RETURNDATE_UNIX_TIMESTAMP)\n            || ($returnDateType == self::RETURNDATE_PHP_DATETIME_OBJECT)\n            || ($returnDateType == self::RETURNDATE_EXCEL)\n        ) {\n            self::$returnDateType = $returnDateType;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object).\n     *\n     * @return string Return Date Format\n     *                Possible Return values are:\n     *                    Functions::RETURNDATE_UNIX_TIMESTAMP         'P'\n     *                    Functions::RETURNDATE_PHP_DATETIME_OBJECT    'O'\n     *                    Functions::RETURNDATE_EXCEL            '     'E'\n     */\n    public static function getReturnDateType(): string\n    {\n        return self::$returnDateType;\n    }\n\n    /**\n     * DUMMY.\n     *\n     * @return string #Not Yet Implemented\n     */\n    public static function DUMMY(): string\n    {\n        return self::NOT_YET_IMPLEMENTED;\n    }\n\n    public static function isMatrixValue(mixed $idx): bool\n    {\n        $idx = StringHelper::convertToString($idx);\n\n        return (substr_count($idx, '.') <= 1) || (preg_match('/\\.[A-Z]/', $idx) > 0);\n    }\n\n    public static function isValue(mixed $idx): bool\n    {\n        $idx = StringHelper::convertToString($idx);\n\n        return substr_count($idx, '.') === 0;\n    }\n\n    public static function isCellValue(mixed $idx): bool\n    {\n        $idx = StringHelper::convertToString($idx);\n\n        return substr_count($idx, '.') > 1;\n    }\n\n    public static function ifCondition(mixed $condition): string\n    {\n        $condition = self::flattenSingleValue($condition);\n\n        if ($condition === '' || $condition === null) {\n            return '=\"\"';\n        }\n        if (!is_string($condition) || !in_array($condition[0], ['>', '<', '='], true)) {\n            $condition = self::operandSpecialHandling($condition);\n            if (is_bool($condition)) {\n                return '=' . ($condition ? 'TRUE' : 'FALSE');\n            }\n            if (!is_numeric($condition)) {\n                if ($condition !== '\"\"') { // Not an empty string\n                    // Escape any quotes in the string value\n                    $condition = (string) preg_replace('/\"/ui', '\"\"', $condition);\n                }\n                $condition = Calculation::wrapResult(strtoupper($condition));\n            }\n\n            return str_replace('\"\"\"\"', '\"\"', '=' . StringHelper::convertToString($condition));\n        }\n        $operator = $operand = '';\n        if (1 === preg_match('/(=|<[>=]?|>=?)(.*)/', $condition, $matches)) {\n            [, $operator, $operand] = $matches;\n        }\n\n        $operand = (string) self::operandSpecialHandling($operand);\n        if (is_numeric(trim($operand, '\"'))) {\n            $operand = trim($operand, '\"');\n        } elseif (!is_numeric($operand) && $operand !== 'FALSE' && $operand !== 'TRUE') {\n            $operand = str_replace('\"', '\"\"', $operand);\n            $operand = Calculation::wrapResult(strtoupper($operand));\n            $operand = StringHelper::convertToString($operand);\n        }\n\n        return str_replace('\"\"\"\"', '\"\"', $operator . $operand);\n    }\n\n    private static function operandSpecialHandling(mixed $operand): bool|float|int|string\n    {\n        if (is_numeric($operand) || is_bool($operand)) {\n            return $operand;\n        }\n        $operand = StringHelper::convertToString($operand);\n        if (strtoupper($operand) === Calculation::getTRUE() || strtoupper($operand) === Calculation::getFALSE()) {\n            return strtoupper($operand);\n        }\n\n        // Check for percentage\n        if (preg_match('/^\\-?\\d*\\.?\\d*\\s?\\%$/', $operand)) {\n            return ((float) rtrim($operand, '%')) / 100;\n        }\n\n        // Check for dates\n        if (($dateValueOperand = Date::stringToExcel($operand)) !== false) {\n            return $dateValueOperand;\n        }\n\n        return $operand;\n    }\n\n    /**\n     * Convert a multi-dimensional array to a simple 1-dimensional array.\n     *\n     * @param mixed $array Array to be flattened\n     *\n     * @return array<mixed> Flattened array\n     */\n    public static function flattenArray(mixed $array): array\n    {\n        if (!is_array($array)) {\n            return (array) $array;\n        }\n\n        $flattened = [];\n        $stack = array_values($array);\n\n        while (!empty($stack)) {\n            $value = array_shift($stack);\n\n            if (is_array($value)) {\n                array_unshift($stack, ...array_values($value));\n            } else {\n                $flattened[] = $value;\n            }\n        }\n\n        return $flattened;\n    }\n\n    /**\n     * Convert a multi-dimensional array to a simple 1-dimensional array.\n     * Same as above but argument is specified in ... format.\n     *\n     * @param mixed $array Array to be flattened\n     *\n     * @return array<mixed> Flattened array\n     */\n    public static function flattenArray2(mixed ...$array): array\n    {\n        $flattened = [];\n        $stack = array_values($array);\n\n        while (!empty($stack)) {\n            $value = array_shift($stack);\n\n            if (is_array($value)) {\n                array_unshift($stack, ...array_values($value));\n            } else {\n                $flattened[] = $value;\n            }\n        }\n\n        return $flattened;\n    }\n\n    public static function scalar(mixed $value): mixed\n    {\n        if (!is_array($value)) {\n            return $value;\n        }\n\n        do {\n            $value = array_pop($value);\n        } while (is_array($value));\n\n        return $value;\n    }\n\n    /**\n     * Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing.\n     *\n     * @param array|mixed $array Array to be flattened\n     *\n     * @return array<mixed> Flattened array\n     */\n    public static function flattenArrayIndexed($array): array\n    {\n        if (!is_array($array)) {\n            return (array) $array;\n        }\n\n        $arrayValues = [];\n        foreach ($array as $k1 => $value) {\n            if (is_array($value)) {\n                foreach ($value as $k2 => $val) {\n                    if (is_array($val)) {\n                        foreach ($val as $k3 => $v) {\n                            $arrayValues[$k1 . '.' . $k2 . '.' . $k3] = $v;\n                        }\n                    } else {\n                        $arrayValues[$k1 . '.' . $k2] = $val;\n                    }\n                }\n            } else {\n                $arrayValues[$k1] = $value;\n            }\n        }\n\n        return $arrayValues;\n    }\n\n    /**\n     * Convert an array to a single scalar value by extracting the first element.\n     *\n     * @param mixed $value Array or scalar value\n     */\n    public static function flattenSingleValue(mixed $value): mixed\n    {\n        while (is_array($value)) {\n            $value = array_shift($value);\n        }\n\n        return $value;\n    }\n\n    public static function expandDefinedName(string $coordinate, Cell $cell): string\n    {\n        $worksheet = $cell->getWorksheet();\n        $spreadsheet = $worksheet->getParentOrThrow();\n        // Uppercase coordinate\n        $pCoordinatex = strtoupper($coordinate);\n        // Eliminate leading equal sign\n        $pCoordinatex = (string) preg_replace('/^=/', '', $pCoordinatex);\n        $defined = $spreadsheet->getDefinedName($pCoordinatex, $worksheet);\n        if ($defined !== null) {\n            $worksheet2 = $defined->getWorkSheet();\n            if (!$defined->isFormula() && $worksheet2 !== null) {\n                $coordinate = \"'\" . $worksheet2->getTitle() . \"'!\"\n                    . (string) preg_replace('/^=/', '', str_replace('$', '', $defined->getValue()));\n            }\n        }\n\n        return $coordinate;\n    }\n\n    public static function trimTrailingRange(string $coordinate): string\n    {\n        return (string) preg_replace('/:[\\w\\$]+$/', '', $coordinate);\n    }\n\n    public static function trimSheetFromCellReference(string $coordinate): string\n    {\n        if (str_contains($coordinate, '!')) {\n            $coordinate = substr($coordinate, strrpos($coordinate, '!') + 1);\n        }\n\n        return $coordinate;\n    }\n\n    /** @param mixed[] $array */\n    public static function convertArrayToCellRange(array $array): string\n    {\n        $retVal = '';\n        $lastRow = $lastColumn = $firstRow = $firstColumn = 0;\n        foreach ($array as $rowkey => $row) {\n            if (!is_array($row) || !is_int($rowkey) || $rowkey < 1) {\n                $firstRow = 0;\n\n                break;\n            }\n            if ($firstRow > $rowkey || $firstRow === 0) {\n                $firstRow = $rowkey;\n            }\n            if ($lastRow < $rowkey) {\n                $lastRow = $rowkey;\n            }\n            foreach ($row as $colkey => $cellValue) {\n                if (!preg_match('/^[A-Z]{1,3}$/', $colkey)) {\n                    $firstRow = 0;\n\n                    break 2;\n                }\n                $column = Coordinate::columnIndexFromString($colkey);\n                if ($firstColumn > $column || $firstColumn === 0) {\n                    $firstColumn = $column;\n                }\n                if ($lastColumn < $column) {\n                    $lastColumn = $column;\n                }\n            }\n        }\n        if ($firstRow > 0 && $firstColumn > 0 && ($firstRow !== $lastRow || $firstColumn !== $lastColumn)) {\n            $retVal = Coordinate::stringFromColumnIndex($firstColumn)\n                . $firstRow\n                . ':'\n                . Coordinate::stringFromColumnIndex($lastColumn)\n                . $lastRow;\n        }\n\n        return $retVal;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Information/ErrorValue.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass ErrorValue\n{\n    use ArrayEnabled;\n\n    /**\n     * IS_ERR.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isErr(mixed $value = ''): array|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        return self::isError($value) && (!self::isNa(($value)));\n    }\n\n    /**\n     * IS_ERROR.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isError(mixed $value = '', bool $tryNotImplemented = false): array|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        if (!is_string($value)) {\n            return false;\n        }\n        if ($tryNotImplemented && $value === Functions::NOT_YET_IMPLEMENTED) {\n            return true;\n        }\n\n        return in_array($value, ExcelError::ERROR_CODES, true);\n    }\n\n    /**\n     * IS_NA.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isNa(mixed $value = ''): array|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        return $value === ExcelError::NA();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Information/ExcelError.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\n\nclass ExcelError\n{\n    use ArrayEnabled;\n\n    /**\n     * List of error codes.\n     *\n     * @var array<string, string>\n     */\n    public const ERROR_CODES = [\n        'null' => '#NULL!', // 1\n        'divisionbyzero' => '#DIV/0!', // 2\n        'value' => '#VALUE!', // 3\n        'reference' => '#REF!', // 4\n        'name' => '#NAME?', // 5\n        'num' => '#NUM!', // 6\n        'na' => '#N/A', // 7\n        'gettingdata' => '#GETTING_DATA', // 8\n        'spill' => '#SPILL!', // 9\n        'connect' => '#CONNECT!', //10\n        'blocked' => '#BLOCKED!', //11\n        'unknown' => '#UNKNOWN!', //12\n        'field' => '#FIELD!', //13\n        'calculation' => '#CALC!', //14\n    ];\n\n    public static function throwError(mixed $value): string\n    {\n        return in_array($value, self::ERROR_CODES, true) ? $value : self::ERROR_CODES['value'];\n    }\n\n    /**\n     * ERROR_TYPE.\n     *\n     * @param mixed $value Value to check\n     *\n     * @return array<mixed>|int|string\n     */\n    public static function type(mixed $value = ''): array|int|string\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        $i = 1;\n        foreach (self::ERROR_CODES as $errorCode) {\n            if ($value === $errorCode) {\n                return $i;\n            }\n            ++$i;\n        }\n\n        return self::NA();\n    }\n\n    /**\n     * NULL.\n     *\n     * Returns the error value #NULL!\n     *\n     * @return string #NULL!\n     */\n    public static function null(): string\n    {\n        return self::ERROR_CODES['null'];\n    }\n\n    /**\n     * NaN.\n     *\n     * Returns the error value #NUM!\n     *\n     * @return string #NUM!\n     */\n    public static function NAN(): string\n    {\n        return self::ERROR_CODES['num'];\n    }\n\n    /**\n     * REF.\n     *\n     * Returns the error value #REF!\n     *\n     * @return string #REF!\n     */\n    public static function REF(): string\n    {\n        return self::ERROR_CODES['reference'];\n    }\n\n    /**\n     * NA.\n     *\n     * Excel Function:\n     *        =NA()\n     *\n     * Returns the error value #N/A\n     *        #N/A is the error value that means \"no value is available.\"\n     *\n     * @return string #N/A!\n     */\n    public static function NA(): string\n    {\n        return self::ERROR_CODES['na'];\n    }\n\n    /**\n     * VALUE.\n     *\n     * Returns the error value #VALUE!\n     *\n     * @return string #VALUE!\n     */\n    public static function VALUE(): string\n    {\n        return self::ERROR_CODES['value'];\n    }\n\n    /**\n     * NAME.\n     *\n     * Returns the error value #NAME?\n     *\n     * @return string #NAME?\n     */\n    public static function NAME(): string\n    {\n        return self::ERROR_CODES['name'];\n    }\n\n    /**\n     * DIV0.\n     *\n     * @return string #DIV/0!\n     */\n    public static function DIV0(): string\n    {\n        return self::ERROR_CODES['divisionbyzero'];\n    }\n\n    /**\n     * CALC.\n     *\n     * @return string #CALC!\n     */\n    public static function CALC(): string\n    {\n        return self::ERROR_CODES['calculation'];\n    }\n\n    /**\n     * SPILL.\n     *\n     * @return string #SPILL!\n     */\n    public static function SPILL(): string\n    {\n        return self::ERROR_CODES['spill'];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Information/Info.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\n\nclass Info\n{\n    /**\n     * @internal\n     */\n    public static bool $infoSupported = true;\n\n    /**\n     * INFO.\n     *\n     * Excel Function:\n     *        =INFO(type_text)\n     *\n     * @param mixed $typeText String specifying the type of information to be returned\n     * @param ?Cell $cell Cell from which spreadsheet information is retrieved\n     *\n     * @return int|string The requested information about the current operating environment\n     */\n    public static function getInfo(mixed $typeText = '', ?Cell $cell = null): int|string\n    {\n        if (!self::$infoSupported) {\n            return Functions::DUMMY();\n        }\n\n        return match (is_string($typeText) ? strtolower($typeText) : $typeText) {\n            'directory' => '/',\n            'numfile' => $cell?->getWorksheetOrNull()?->getParent()?->getSheetCount() ?? 1,\n            'origin' => '$A:$A$1',\n            'osversion' => 'PHP ' . PHP_VERSION,\n            'recalc' => 'Automatic',\n            'release' => PHP_VERSION,\n            'system' => 'PHP',\n            'memavail', 'memused', 'totmem' => ExcelError::NA(),\n            default => ExcelError::VALUE(),\n        };\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Information/Value.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Value\n{\n    use ArrayEnabled;\n\n    /**\n     * IS_BLANK.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isBlank(mixed $value = null): array|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        return $value === null;\n    }\n\n    /**\n     * IS_REF.\n     *\n     * @param mixed $value Value to check\n     */\n    public static function isRef(mixed $value, ?Cell $cell = null): bool\n    {\n        if ($cell === null) {\n            return false;\n        }\n\n        $value = StringHelper::convertToString($value);\n        $cellValue = Functions::trimTrailingRange($value);\n        if (preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/ui', $cellValue) === 1) {\n            [$worksheet, $cellValue] = Worksheet::extractSheetTitle($cellValue, true, true);\n            if (!empty($worksheet) && $cell->getWorksheet()->getParentOrThrow()->getSheetByName($worksheet) === null) {\n                return false;\n            }\n\n            try {\n                [$column, $row] = Coordinate::indexesFromString($cellValue ?? '');\n            } catch (SpreadsheetException) {\n                return false;\n            }\n\n            return true;\n        }\n\n        $namedRange = $cell->getWorksheet()->getParentOrThrow()->getNamedRange($value);\n\n        return $namedRange instanceof NamedRange;\n    }\n\n    /**\n     * IS_EVEN.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isEven(mixed $value = null): array|string|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        if ($value === null) {\n            return ExcelError::NAME();\n        }\n        if (!is_numeric($value)) {\n            return ExcelError::VALUE();\n        }\n\n        return ((int) fmod($value + 0, 2)) === 0;\n    }\n\n    /**\n     * IS_ODD.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isOdd(mixed $value = null): array|string|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        if ($value === null) {\n            return ExcelError::NAME();\n        }\n        if (!is_numeric($value)) {\n            return ExcelError::VALUE();\n        }\n\n        return ((int) fmod($value + 0, 2)) !== 0;\n    }\n\n    /**\n     * IS_NUMBER.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isNumber(mixed $value = null): array|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        if (is_string($value)) {\n            return false;\n        }\n\n        return is_numeric($value);\n    }\n\n    /**\n     * IS_LOGICAL.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isLogical(mixed $value = null): array|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        return is_bool($value);\n    }\n\n    /**\n     * IS_TEXT.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isText(mixed $value = null): array|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        return is_string($value) && !ErrorValue::isError($value);\n    }\n\n    /**\n     * IS_NONTEXT.\n     *\n     * @param mixed $value Value to check\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function isNonText(mixed $value = null): array|bool\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        return !self::isText($value);\n    }\n\n    /**\n     * ISFORMULA.\n     *\n     * @param mixed $cellReference The cell to check\n     * @param ?Cell $cell The current cell (containing this formula)\n     *\n     * @return array<mixed>|bool|string\n     */\n    public static function isFormula(mixed $cellReference = '', ?Cell $cell = null): array|bool|string\n    {\n        if ($cell === null) {\n            return ExcelError::REF();\n        }\n        $cellReference = StringHelper::convertToString($cellReference);\n\n        $fullCellReference = Functions::expandDefinedName($cellReference, $cell);\n\n        if (str_contains($cellReference, '!')) {\n            $cellReference = Functions::trimSheetFromCellReference($cellReference);\n            $cellReferences = Coordinate::extractAllCellReferencesInRange($cellReference);\n            if (count($cellReferences) > 1) {\n                return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $cellReferences, $cell);\n            }\n        }\n\n        $fullCellReference = Functions::trimTrailingRange($fullCellReference);\n\n        $worksheetName = '';\n        if (1 == preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $fullCellReference, $matches)) {\n            $fullCellReference = $matches[6] . $matches[7];\n            $worksheetName = str_replace(\"''\", \"'\", trim($matches[2], \"'\"));\n        }\n\n        $worksheet = (!empty($worksheetName))\n            ? $cell->getWorksheet()->getParentOrThrow()->getSheetByName($worksheetName)\n            : $cell->getWorksheet();\n        if ($worksheet === null) {\n            return ExcelError::REF();\n        }\n\n        try {\n            return $worksheet->getCell($fullCellReference)->isFormula();\n        } catch (SpreadsheetException) {\n            return true;\n        }\n    }\n\n    /**\n     * N.\n     *\n     * Returns a value converted to a number\n     *\n     * @param null|mixed $value The value you want converted\n     *\n     * @return number|string N converts values listed in the following table\n     *        If value is or refers to N returns\n     *        A number            That number value\n     *        A date              The Excel serialized number of that date\n     *        TRUE                1\n     *        FALSE               0\n     *        An error value      The error value\n     *        Anything else       0\n     */\n    public static function asNumber($value = null)\n    {\n        while (is_array($value)) {\n            $value = array_shift($value);\n        }\n        if (is_float($value) || is_int($value)) {\n            return $value;\n        }\n        if (is_bool($value)) {\n            return (int) $value;\n        }\n        if (is_string($value) && str_starts_with($value, '#')) {\n            return $value;\n        }\n\n        return 0;\n    }\n\n    /**\n     * TYPE.\n     *\n     * Returns a number that identifies the type of a value\n     *\n     * @param null|mixed $value The value you want tested\n     *\n     * @return int N converts values listed in the following table\n     *        If value is or refers to N returns\n     *        A number            1\n     *        Text                2\n     *        Logical Value       4\n     *        An error value      16\n     *        Array or Matrix     64\n     */\n    public static function type($value = null): int\n    {\n        $value = Functions::flattenArrayIndexed($value);\n        if (count($value) > 1) {\n            end($value);\n            $a = key($value);\n            //    Range of cells is an error\n            if (Functions::isCellValue($a)) {\n                return 16;\n            //    Test for Matrix\n            } elseif (Functions::isMatrixValue($a)) {\n                return 64;\n            }\n        } elseif (empty($value)) {\n            //    Empty Cell\n            return 1;\n        }\n\n        $value = Functions::flattenSingleValue($value);\n        if (($value === null) || (is_float($value)) || (is_int($value))) {\n            return 1;\n        } elseif (is_bool($value)) {\n            return 4;\n        } elseif (is_array($value)) {\n            return 64;\n        } elseif (is_string($value)) {\n            //    Errors\n            if (($value !== '') && ($value[0] == '#')) {\n                return 16;\n            }\n\n            return 2;\n        }\n\n        return 0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Internal/ExcelArrayPseudoFunctions.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Internal;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass ExcelArrayPseudoFunctions\n{\n    public static function single(string $cellReference, Cell $cell): mixed\n    {\n        $worksheet = $cell->getWorksheet();\n\n        [$referenceWorksheetName, $referenceCellCoordinate] = Worksheet::extractSheetTitle($cellReference, true, true);\n        if (preg_match('/^([$]?[a-z]{1,3})([$]?([0-9]{1,7})):([$]?[a-z]{1,3})([$]?([0-9]{1,7}))$/i', \"$referenceCellCoordinate\", $matches) === 1) {\n            $ourRow = $cell->getRow();\n            $firstRow = (int) $matches[3];\n            $lastRow = (int) $matches[6];\n            if ($ourRow < $firstRow || $ourRow > $lastRow || $matches[1] !== $matches[4]) {\n                return ExcelError::VALUE();\n            }\n            $referenceCellCoordinate = $matches[1] . $ourRow;\n        }\n        $referenceCell = ($referenceWorksheetName === '')\n            ? $worksheet->getCell((string) $referenceCellCoordinate)\n            : $worksheet->getParentOrThrow()\n                ->getSheetByNameOrThrow((string) $referenceWorksheetName)\n                ->getCell((string) $referenceCellCoordinate);\n\n        $result = $referenceCell->getCalculatedValue();\n        while (is_array($result)) {\n            $result = array_shift($result);\n        }\n\n        return $result;\n    }\n\n    /** @return array<mixed>|string */\n    public static function anchorArray(string $cellReference, Cell $cell): array|string\n    {\n        //$coordinate = $cell->getCoordinate();\n        $worksheet = $cell->getWorksheet();\n\n        [$referenceWorksheetName, $referenceCellCoordinate] = Worksheet::extractSheetTitle($cellReference, true, true);\n        $referenceCell = ($referenceWorksheetName === '')\n            ? $worksheet->getCell((string) $referenceCellCoordinate)\n            : $worksheet->getParentOrThrow()\n                ->getSheetByNameOrThrow((string) $referenceWorksheetName)\n                ->getCell((string) $referenceCellCoordinate);\n\n        // We should always use the sizing for the array formula range from the referenced cell formula\n        //$referenceRange = null;\n        /*if ($referenceCell->isFormula() && $referenceCell->isArrayFormula()) {\n            $referenceRange = $referenceCell->arrayFormulaRange();\n        }*/\n\n        $calcEngine = Calculation::getInstance($worksheet->getParent());\n        $result = $calcEngine->calculateCellValue($referenceCell, false);\n        if (!is_array($result)) {\n            $result = ExcelError::REF();\n        }\n\n        // Ensure that our array result dimensions match the specified array formula range dimensions,\n        //    from the referenced cell, expanding or shrinking it as necessary.\n        /*$result = Functions::resizeMatrix(\n            $result,\n            ...Coordinate::rangeDimension($referenceRange ?? $coordinate)\n        );*/\n\n        // Set the result for our target cell (with spillage)\n        // But if we do write it, we get problems with #SPILL! Errors if the spreadsheet is saved\n        // TODO How are we going to identify and handle a #SPILL! or a #CALC! error?\n//        IOFactory::setLoading(true);\n//        $worksheet->fromArray(\n//            $result,\n//            null,\n//            $coordinate,\n//            true\n//        );\n//        IOFactory::setLoading(true);\n\n        // Calculate the array formula range that we should set for our target, based on our target cell coordinate\n//        [$col, $row] = Coordinate::indexesFromString($coordinate);\n//        $row += count($result) - 1;\n//        $col = Coordinate::stringFromColumnIndex($col + count($result[0]) - 1);\n//        $arrayFormulaRange = \"{$coordinate}:{$col}{$row}\";\n//        $formulaAttributes = ['t' => 'array', 'ref' => $arrayFormulaRange];\n\n        // Using fromArray() would reset the value for this cell with the calculation result\n        //      as well as updating the spillage cells,\n        //  so we need to restore this cell to its formula value, attributes, and datatype\n//        $cell = $worksheet->getCell($coordinate);\n//        $cell->setValueExplicit($value, DataType::TYPE_FORMULA, true, $arrayFormulaRange);\n//        $cell->setFormulaAttributes($formulaAttributes);\n\n//        $cell->updateInCollection();\n\n        return $result;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Internal/MakeMatrix.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Internal;\n\nclass MakeMatrix\n{\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[]\n     */\n    public static function make(...$args): array\n    {\n        return $args;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Internal/WildcardMatch.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Internal;\n\nclass WildcardMatch\n{\n    private const SEARCH_SET = [\n        '~~', // convert double tilde to unprintable value\n        '~\\*', // convert tilde backslash asterisk to [*] (matches literal asterisk in regexp)\n        '\\*', // convert backslash asterisk to .* (matches string of any length in regexp)\n        '~\\?', // convert tilde backslash question to [?] (matches literal question mark in regexp)\n        '\\?', // convert backslash question to . (matches one character in regexp)\n        \"\\x1c\", // convert original double tilde to single tilde\n    ];\n\n    private const REPLACEMENT_SET = [\n        \"\\x1c\",\n        '[*]',\n        '.*',\n        '[?]',\n        '.',\n        '~',\n    ];\n\n    public static function wildcard(string $wildcard): string\n    {\n        // Preg Escape the wildcard, but protecting the Excel * and ? search characters\n        return str_replace(self::SEARCH_SET, self::REPLACEMENT_SET, preg_quote($wildcard, '/'));\n    }\n\n    public static function compare(?string $value, string $wildcard): bool\n    {\n        if ($value === '' || $value === null) {\n            return false;\n        }\n\n        return (bool) preg_match(\"/^{$wildcard}\\$/mui\", $value);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Logical/Boolean.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Logical;\n\nclass Boolean\n{\n    /**\n     * TRUE.\n     *\n     * Returns the boolean TRUE.\n     *\n     * Excel Function:\n     *        =TRUE()\n     *\n     * @return bool True\n     */\n    public static function true(): bool\n    {\n        return true;\n    }\n\n    /**\n     * FALSE.\n     *\n     * Returns the boolean FALSE.\n     *\n     * Excel Function:\n     *        =FALSE()\n     *\n     * @return bool False\n     */\n    public static function false(): bool\n    {\n        return false;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Logical/Conditional.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Logical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\n\nclass Conditional\n{\n    use ArrayEnabled;\n\n    /**\n     * STATEMENT_IF.\n     *\n     * Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.\n     *\n     * Excel Function:\n     *        =IF(condition[,returnIfTrue[,returnIfFalse]])\n     *\n     *        Condition is any value or expression that can be evaluated to TRUE or FALSE.\n     *            For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100,\n     *            the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE.\n     *            This argument can use any comparison calculation operator.\n     *        ReturnIfTrue is the value that is returned if condition evaluates to TRUE.\n     *            For example, if this argument is the text string \"Within budget\" and\n     *                the condition argument evaluates to TRUE, then the IF function returns the text \"Within budget\"\n     *            If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero).\n     *            To display the word TRUE, use the logical value TRUE for this argument.\n     *            ReturnIfTrue can be another formula.\n     *        ReturnIfFalse is the value that is returned if condition evaluates to FALSE.\n     *            For example, if this argument is the text string \"Over budget\" and the condition argument evaluates\n     *                to FALSE, then the IF function returns the text \"Over budget\".\n     *            If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned.\n     *            If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned.\n     *            ReturnIfFalse can be another formula.\n     *\n     * @param mixed $condition Condition to evaluate\n     * @param mixed $returnIfTrue Value to return when condition is true\n     *              Note that this can be an array value\n     * @param mixed $returnIfFalse Optional value to return when condition is false\n     *              Note that this can be an array value\n     *\n     * @return mixed The value of returnIfTrue or returnIfFalse determined by condition\n     */\n    public static function statementIf(mixed $condition = true, mixed $returnIfTrue = 0, mixed $returnIfFalse = false): mixed\n    {\n        $condition = ($condition === null) ? true : Functions::flattenSingleValue($condition);\n\n        if (ErrorValue::isError($condition, true)) {\n            return $condition;\n        }\n\n        $returnIfTrue = $returnIfTrue ?? 0;\n        $returnIfFalse = $returnIfFalse ?? false;\n\n        return ((bool) $condition) ? $returnIfTrue : $returnIfFalse;\n    }\n\n    /**\n     * STATEMENT_SWITCH.\n     *\n     * Returns corresponding with first match (any data type such as a string, numeric, date, etc).\n     *\n     * Excel Function:\n     *        =SWITCH (expression, value1, result1, value2, result2, ... value_n, result_n [, default])\n     *\n     *        Expression\n     *              The expression to compare to a list of values.\n     *        value1, value2, ... value_n\n     *              A list of values that are compared to expression.\n     *              The SWITCH function is looking for the first value that matches the expression.\n     *        result1, result2, ... result_n\n     *              A list of results. The SWITCH function returns the corresponding result when a value\n     *              matches expression.\n     *              Note that these can be array values to be returned\n     *         default\n     *              Optional. It is the default to return if expression does not match any of the values\n     *              (value1, value2, ... value_n).\n     *              Note that this can be an array value to be returned\n     *\n     * @param mixed $arguments Statement arguments\n     *\n     * @return mixed The value of matched expression\n     */\n    public static function statementSwitch(mixed ...$arguments): mixed\n    {\n        $result = ExcelError::VALUE();\n\n        if (count($arguments) > 0) {\n            $targetValue = Functions::flattenSingleValue($arguments[0]);\n            $argc = count($arguments) - 1;\n            $switchCount = floor($argc / 2);\n            $hasDefaultClause = $argc % 2 !== 0;\n            $defaultClause = $argc % 2 === 0 ? null : $arguments[$argc];\n\n            $switchSatisfied = false;\n            if ($switchCount > 0) {\n                for ($index = 0; $index < $switchCount; ++$index) {\n                    if ($targetValue == Functions::flattenSingleValue($arguments[$index * 2 + 1])) {\n                        $result = $arguments[$index * 2 + 2];\n                        $switchSatisfied = true;\n\n                        break;\n                    }\n                }\n            }\n\n            if ($switchSatisfied !== true) {\n                $result = $hasDefaultClause ? $defaultClause : ExcelError::NA();\n            }\n        }\n\n        return $result;\n    }\n\n    /**\n     * IFERROR.\n     *\n     * Excel Function:\n     *        =IFERROR(testValue,errorpart)\n     *\n     * @param mixed $testValue Value to check, is also the value returned when no error\n     *                      Or can be an array of values\n     * @param mixed $errorpart Value to return when testValue is an error condition\n     *              Note that this can be an array value to be returned\n     *\n     * @return mixed The value of errorpart or testValue determined by error condition\n     *         If an array of values is passed as the $testValue argument, then the returned result will also be\n     *            an array with the same dimensions\n     */\n    public static function IFERROR(mixed $testValue = '', mixed $errorpart = ''): mixed\n    {\n        if (is_array($testValue)) {\n            return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $testValue, $errorpart);\n        }\n\n        $errorpart = $errorpart ?? '';\n        $testValue = $testValue ?? 0; // this is how Excel handles empty cell\n\n        return self::statementIf(ErrorValue::isError($testValue), $errorpart, $testValue);\n    }\n\n    /**\n     * IFNA.\n     *\n     * Excel Function:\n     *        =IFNA(testValue,napart)\n     *\n     * @param mixed $testValue Value to check, is also the value returned when not an NA\n     *                      Or can be an array of values\n     * @param mixed $napart Value to return when testValue is an NA condition\n     *              Note that this can be an array value to be returned\n     *\n     * @return mixed The value of errorpart or testValue determined by error condition\n     *         If an array of values is passed as the $testValue argument, then the returned result will also be\n     *            an array with the same dimensions\n     */\n    public static function IFNA(mixed $testValue = '', mixed $napart = ''): mixed\n    {\n        if (is_array($testValue)) {\n            return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $testValue, $napart);\n        }\n\n        $napart = $napart ?? '';\n        $testValue = $testValue ?? 0; // this is how Excel handles empty cell\n\n        return self::statementIf(ErrorValue::isNa($testValue), $napart, $testValue);\n    }\n\n    /**\n     * IFS.\n     *\n     * Excel Function:\n     *         =IFS(testValue1;returnIfTrue1;testValue2;returnIfTrue2;...;testValue_n;returnIfTrue_n)\n     *\n     *         testValue1 ... testValue_n\n     *             Conditions to Evaluate\n     *         returnIfTrue1 ... returnIfTrue_n\n     *             Value returned if corresponding testValue (nth) was true\n     *\n     * @param mixed ...$arguments Statement arguments\n     *              Note that this can be an array value to be returned\n     *\n     * @return mixed|string The value of returnIfTrue_n, if testValue_n was true. #N/A if none of testValues was true\n     */\n    public static function IFS(mixed ...$arguments)\n    {\n        $argumentCount = count($arguments);\n\n        if ($argumentCount % 2 != 0) {\n            return ExcelError::NA();\n        }\n        // We use instance of Exception as a falseValue in order to prevent string collision with value in cell\n        $falseValueException = new Exception();\n        for ($i = 0; $i < $argumentCount; $i += 2) {\n            $testValue = ($arguments[$i] === null) ? '' : Functions::flattenSingleValue($arguments[$i]);\n            $returnIfTrue = ($arguments[$i + 1] === null) ? '' : $arguments[$i + 1];\n            $result = self::statementIf($testValue, $returnIfTrue, $falseValueException);\n\n            if ($result !== $falseValueException) {\n                return $result;\n            }\n        }\n\n        return ExcelError::NA();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Logical/Operations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Logical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Operations\n{\n    use ArrayEnabled;\n\n    /**\n     * LOGICAL_AND.\n     *\n     * Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.\n     *\n     * Excel Function:\n     *        =AND(logical1[,logical2[, ...]])\n     *\n     *        The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays\n     *            or references that contain logical values.\n     *\n     *        Boolean arguments are treated as True or False as appropriate\n     *        Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False\n     *        If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string\n     *            holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return bool|string the logical AND of the arguments\n     */\n    public static function logicalAnd(mixed ...$args)\n    {\n        return self::countTrueValues($args, fn (int $trueValueCount, int $count): bool => $trueValueCount === $count);\n    }\n\n    /**\n     * LOGICAL_OR.\n     *\n     * Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.\n     *\n     * Excel Function:\n     *        =OR(logical1[,logical2[, ...]])\n     *\n     *        The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays\n     *            or references that contain logical values.\n     *\n     *        Boolean arguments are treated as True or False as appropriate\n     *        Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False\n     *        If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string\n     *            holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value\n     *\n     * @param mixed $args Data values\n     *\n     * @return bool|string the logical OR of the arguments\n     */\n    public static function logicalOr(mixed ...$args)\n    {\n        return self::countTrueValues($args, fn (int $trueValueCount): bool => $trueValueCount > 0);\n    }\n\n    /**\n     * LOGICAL_XOR.\n     *\n     * Returns the Exclusive Or logical operation for one or more supplied conditions.\n     * i.e. the Xor function returns TRUE if an odd number of the supplied conditions evaluate to TRUE,\n     *      and FALSE otherwise.\n     *\n     * Excel Function:\n     *        =XOR(logical1[,logical2[, ...]])\n     *\n     *        The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays\n     *            or references that contain logical values.\n     *\n     *        Boolean arguments are treated as True or False as appropriate\n     *        Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False\n     *        If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string\n     *            holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value\n     *\n     * @param mixed $args Data values\n     *\n     * @return bool|string the logical XOR of the arguments\n     */\n    public static function logicalXor(mixed ...$args)\n    {\n        return self::countTrueValues($args, fn (int $trueValueCount): bool => $trueValueCount % 2 === 1);\n    }\n\n    /**\n     * NOT.\n     *\n     * Returns the boolean inverse of the argument.\n     *\n     * Excel Function:\n     *        =NOT(logical)\n     *\n     *        The argument must evaluate to a logical value such as TRUE or FALSE\n     *\n     *        Boolean arguments are treated as True or False as appropriate\n     *        Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False\n     *        If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string\n     *            holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value\n     *\n     * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|bool|string the boolean inverse of the argument\n     *         If an array of values is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function NOT(mixed $logical = false): array|bool|string\n    {\n        if (is_array($logical)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $logical);\n        }\n\n        if (is_string($logical)) {\n            $logical = mb_strtoupper($logical, 'UTF-8');\n            if (($logical == 'TRUE') || ($logical == Calculation::getTRUE())) {\n                return false;\n            } elseif (($logical == 'FALSE') || ($logical == Calculation::getFALSE())) {\n                return true;\n            }\n\n            return ExcelError::VALUE();\n        }\n\n        return !$logical;\n    }\n\n    /**\n     * @param mixed[] $args\n     * @param callable(int, int): bool $func\n     */\n    private static function countTrueValues(array $args, callable $func): bool|string\n    {\n        $trueValueCount = 0;\n        $count = 0;\n\n        $aArgs = Functions::flattenArrayIndexed($args);\n        foreach ($aArgs as $k => $arg) {\n            ++$count;\n            // Is it a boolean value?\n            if (is_bool($arg)) {\n                $trueValueCount += $arg;\n            } elseif (is_string($arg)) {\n                $isLiteral = !Functions::isCellValue($k);\n                $arg = mb_strtoupper($arg, 'UTF-8');\n                if ($isLiteral && ($arg == 'TRUE' || $arg == Calculation::getTRUE())) {\n                    ++$trueValueCount;\n                } elseif ($isLiteral && ($arg == 'FALSE' || $arg == Calculation::getFALSE())) {\n                    //$trueValueCount += 0;\n                } else {\n                    --$count;\n                }\n            } elseif (is_int($arg) || is_float($arg)) {\n                $trueValueCount += (int) ($arg != 0);\n            } else {\n                --$count;\n            }\n        }\n\n        return ($count === 0) ? ExcelError::VALUE() : $func($trueValueCount, $count);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Address.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressHelper;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Address\n{\n    use ArrayEnabled;\n\n    public const ADDRESS_ABSOLUTE = 1;\n    public const ADDRESS_COLUMN_RELATIVE = 2;\n    public const ADDRESS_ROW_RELATIVE = 3;\n    public const ADDRESS_RELATIVE = 4;\n\n    public const REFERENCE_STYLE_A1 = true;\n    public const REFERENCE_STYLE_R1C1 = false;\n\n    /**\n     * ADDRESS.\n     *\n     * Creates a cell address as text, given specified row and column numbers.\n     *\n     * Excel Function:\n     *        =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])\n     *\n     * @param mixed $row Row number (integer) to use in the cell reference\n     *                      Or can be an array of values\n     * @param mixed $column Column number (integer) to use in the cell reference\n     *                      Or can be an array of values\n     * @param mixed $relativity Integer flag indicating the type of reference to return\n     *                             1 or omitted    Absolute\n     *                             2               Absolute row; relative column\n     *                             3               Relative row; absolute column\n     *                             4               Relative\n     *                      Or can be an array of values\n     * @param mixed $referenceStyle A logical (boolean) value that specifies the A1 or R1C1 reference style.\n     *                                TRUE or omitted    ADDRESS returns an A1-style reference\n     *                                FALSE              ADDRESS returns an R1C1-style reference\n     *                      Or can be an array of values\n     * @param mixed $sheetName Optional Name of worksheet to use\n     *                      Or can be an array of values\n     *\n     * @return mixed[]|string If an array of values is passed as the $testValue argument, then the returned result will also be\n     *            an array with the same dimensions\n     */\n    public static function cell(mixed $row, mixed $column, mixed $relativity = 1, mixed $referenceStyle = true, mixed $sheetName = ''): array|string\n    {\n        if (\n            is_array($row) || is_array($column)\n            || is_array($relativity) || is_array($referenceStyle) || is_array($sheetName)\n        ) {\n            return self::evaluateArrayArguments(\n                [self::class, __FUNCTION__],\n                $row,\n                $column,\n                $relativity,\n                $referenceStyle,\n                $sheetName\n            );\n        }\n\n        $relativity = ($relativity === null) ? 1 : (int) StringHelper::convertToString($relativity);\n        $referenceStyle = $referenceStyle ?? true;\n        $row = (int) StringHelper::convertToString($row);\n        $column = (int) StringHelper::convertToString($column);\n\n        if (($row < 1) || ($column < 1)) {\n            return ExcelError::VALUE();\n        }\n\n        $sheetName = self::sheetName(StringHelper::convertToString($sheetName));\n\n        if (is_int($referenceStyle)) {\n            $referenceStyle = (bool) $referenceStyle;\n        }\n        if ((!is_bool($referenceStyle)) || $referenceStyle === self::REFERENCE_STYLE_A1) {\n            return self::formatAsA1($row, $column, $relativity, $sheetName);\n        }\n\n        return self::formatAsR1C1($row, $column, $relativity, $sheetName);\n    }\n\n    private static function sheetName(string $sheetName): string\n    {\n        if ($sheetName > '') {\n            if (str_contains($sheetName, ' ') || str_contains($sheetName, '[')) {\n                $sheetName = \"'{$sheetName}'\";\n            }\n            $sheetName .= '!';\n        }\n\n        return $sheetName;\n    }\n\n    private static function formatAsA1(int $row, int $column, int $relativity, string $sheetName): string\n    {\n        $rowRelative = $columnRelative = '$';\n        if (($relativity == self::ADDRESS_COLUMN_RELATIVE) || ($relativity == self::ADDRESS_RELATIVE)) {\n            $columnRelative = '';\n        }\n        if (($relativity == self::ADDRESS_ROW_RELATIVE) || ($relativity == self::ADDRESS_RELATIVE)) {\n            $rowRelative = '';\n        }\n        $column = Coordinate::stringFromColumnIndex($column);\n\n        return \"{$sheetName}{$columnRelative}{$column}{$rowRelative}{$row}\";\n    }\n\n    private static function formatAsR1C1(int $row, int $column, int $relativity, string $sheetName): string\n    {\n        if (($relativity == self::ADDRESS_COLUMN_RELATIVE) || ($relativity == self::ADDRESS_RELATIVE)) {\n            $column = \"[{$column}]\";\n        }\n        if (($relativity == self::ADDRESS_ROW_RELATIVE) || ($relativity == self::ADDRESS_RELATIVE)) {\n            $row = \"[{$row}]\";\n        }\n        [$rowChar, $colChar] = AddressHelper::getRowAndColumnChars();\n\n        return \"{$sheetName}$rowChar{$row}$colChar{$column}\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ChooseRowsEtc\n{\n    /**\n     * Transpose 2-dimensional array.\n     * See https://stackoverflow.com/questions/797251/transposing-multidimensional-arrays-in-php\n     * especially the comment from user17994717.\n     *\n     * @param mixed[] $array\n     *\n     * @return mixed[]\n     */\n    public static function transpose(array $array): array\n    {\n        return empty($array) ? [] : (array_map((count($array) === 1) ? (fn ($x) => [$x]) : null, ...$array)); // @phpstan-ignore-line\n    }\n\n    /** @return mixed[] */\n    private static function arrayValues(mixed $array): array\n    {\n        return is_array($array) ? array_values($array) : [$array];\n    }\n\n    /**\n     * CHOOSECOLS.\n     *\n     * @param mixed $input expecting two-dimensional array\n     *\n     * @return mixed[]|string\n     */\n    public static function chooseCols(mixed $input, mixed ...$args): array|string\n    {\n        if (!is_array($input)) {\n            $input = [[$input]];\n        }\n        $retval = self::chooseRows(self::transpose($input), ...$args);\n\n        return is_array($retval) ? self::transpose($retval) : $retval;\n    }\n\n    /**\n     * CHOOSEROWS.\n     *\n     * @param mixed $input expecting two-dimensional array\n     *\n     * @return mixed[]|string\n     */\n    public static function chooseRows(mixed $input, mixed ...$args): array|string\n    {\n        if (!is_array($input)) {\n            $input = [[$input]];\n        }\n        $inputArray = [[]]; // no row 0\n        $numRows = 0;\n        foreach ($input as $inputRow) {\n            $inputArray[] = self::arrayValues($inputRow);\n            ++$numRows;\n        }\n        $outputArray = [];\n        foreach (Functions::flattenArray2(...$args) as $arg) {\n            if (!is_numeric($arg)) {\n                return ExcelError::VALUE();\n            }\n            $index = (int) $arg;\n            if ($index < 0) {\n                $index += $numRows + 1;\n            }\n            if ($index <= 0 || $index > $numRows) {\n                return ExcelError::VALUE();\n            }\n            $outputArray[] = $inputArray[$index];\n        }\n\n        return $outputArray;\n    }\n\n    /**\n     * @param mixed[] $array\n     *\n     * @return mixed[]|string\n     */\n    private static function dropRows(array $array, mixed $offset): array|string\n    {\n        if ($offset === null) {\n            return $array;\n        }\n        if (!is_numeric($offset)) {\n            return ExcelError::VALUE();\n        }\n        $offset = (int) $offset;\n        $count = count($array);\n        if (abs($offset) >= $count) {\n            // In theory, this should be #CALC!, but Excel treats\n            // #CALC! as corrupt, and it's not worth figuring out why\n            return ExcelError::VALUE();\n        }\n        if ($offset === 0) {\n            return $array;\n        }\n        if ($offset > 0) {\n            return array_slice($array, $offset);\n        }\n\n        return array_slice($array, 0, $count + $offset);\n    }\n\n    /**\n     * DROP.\n     *\n     * @param mixed $input expect two-dimensional array\n     *\n     * @return mixed[]|string\n     */\n    public static function drop(mixed $input, mixed $rows = null, mixed $columns = null): array|string\n    {\n        if (!is_array($input)) {\n            $input = [[$input]];\n        }\n        $inputArray = []; // no row 0\n        foreach ($input as $inputRow) {\n            $inputArray[] = self::arrayValues($inputRow);\n        }\n        $outputArray1 = self::dropRows($inputArray, $rows);\n        if (is_string($outputArray1)) {\n            return $outputArray1;\n        }\n        $outputArray2 = self::transpose($outputArray1);\n        $outputArray3 = self::dropRows($outputArray2, $columns);\n        if (is_string($outputArray3)) {\n            return $outputArray3;\n        }\n\n        return self::transpose($outputArray3);\n    }\n\n    /**\n     * @param mixed[] $array\n     *\n     * @return mixed[]|string\n     */\n    private static function takeRows(array $array, mixed $offset): array|string\n    {\n        if ($offset === null) {\n            return $array;\n        }\n        if (!is_numeric($offset)) {\n            return ExcelError::VALUE();\n        }\n        $offset = (int) $offset;\n        if ($offset === 0) {\n            // should be #CALC! - see above\n            return ExcelError::VALUE();\n        }\n        $count = count($array);\n        if (abs($offset) >= $count) {\n            return $array;\n        }\n        if ($offset > 0) {\n            return array_slice($array, 0, $offset);\n        }\n\n        return array_slice($array, $count + $offset);\n    }\n\n    /**\n     * TAKE.\n     *\n     * @param mixed $input expecting two-dimensional array\n     *\n     * @return mixed[]|string\n     */\n    public static function take(mixed $input, mixed $rows, mixed $columns = null): array|string\n    {\n        if (!is_array($input)) {\n            $input = [[$input]];\n        }\n        if ($rows === null && $columns === null) {\n            return $input;\n        }\n        $inputArray = [];\n        foreach ($input as $inputRow) {\n            $inputArray[] = self::arrayValues($inputRow);\n        }\n        $outputArray1 = self::takeRows($inputArray, $rows);\n        if (is_string($outputArray1)) {\n            return $outputArray1;\n        }\n        $outputArray2 = self::transpose($outputArray1);\n        $outputArray3 = self::takeRows($outputArray2, $columns);\n        if (is_string($outputArray3)) {\n            return $outputArray3;\n        }\n\n        return self::transpose($outputArray3);\n    }\n\n    /**\n     * EXPAND.\n     *\n     * @param mixed $input expecting two-dimensional array\n     *\n     * @return mixed[]|string\n     */\n    public static function expand(mixed $input, mixed $rows, mixed $columns = null, mixed $pad = '#N/A'): array|string\n    {\n        if (!is_array($input)) {\n            $input = [[$input]];\n        }\n        if ($rows === null && $columns === null) {\n            return $input;\n        }\n        $numRows = count($input);\n        $rows ??= $numRows;\n        if (!is_numeric($rows)) {\n            return ExcelError::VALUE();\n        }\n        $rows = (int) $rows;\n        if ($rows < count($input)) {\n            return ExcelError::VALUE();\n        }\n        $numCols = 0;\n        foreach ($input as $inputRow) {\n            $numCols = max($numCols, is_array($inputRow) ? count($inputRow) : 1);\n        }\n        $columns ??= $numCols;\n        if (!is_numeric($columns)) {\n            return ExcelError::VALUE();\n        }\n        $columns = (int) $columns;\n        if ($columns < $numCols) {\n            return ExcelError::VALUE();\n        }\n        $inputArray = [];\n        foreach ($input as $inputRow) {\n            $inputArray[] = array_pad(self::arrayValues($inputRow), $columns, $pad);\n        }\n        $outputArray = [];\n        $padRow = array_pad([], $columns, $pad);\n        for ($count = 0; $count < $rows; ++$count) {\n            $outputArray[] = ($count >= $numRows) ? $padRow : $inputArray[$count];\n        }\n\n        return $outputArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\WildcardMatch;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass ExcelMatch\n{\n    use ArrayEnabled;\n\n    public const MATCHTYPE_SMALLEST_VALUE = -1;\n    public const MATCHTYPE_FIRST_VALUE = 0;\n    public const MATCHTYPE_LARGEST_VALUE = 1;\n\n    /**\n     * MATCH.\n     *\n     * The MATCH function searches for a specified item in a range of cells\n     *\n     * Excel Function:\n     *        =MATCH(lookup_value, lookup_array, [match_type])\n     *\n     * @param mixed $lookupValue The value that you want to match in lookup_array\n     * @param mixed $lookupArray The range of cells being searched\n     * @param mixed $matchType The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below.\n     *                         If match_type is 1 or -1, the list has to be ordered.\n     *\n     * @return array<mixed>|float|int|string The relative position of the found item\n     */\n    public static function MATCH(mixed $lookupValue, mixed $lookupArray, mixed $matchType = self::MATCHTYPE_LARGEST_VALUE): array|string|int|float\n    {\n        if (is_array($lookupValue)) {\n            return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $lookupValue, $lookupArray, $matchType);\n        }\n\n        $lookupArray = Functions::flattenArray($lookupArray);\n\n        try {\n            // Input validation\n            self::validateLookupValue($lookupValue);\n            $matchType = self::validateMatchType($matchType);\n            self::validateLookupArray($lookupArray);\n\n            $keySet = array_keys($lookupArray);\n            if ($matchType == self::MATCHTYPE_LARGEST_VALUE) {\n                // If match_type is 1 the list has to be processed from last to first\n                $lookupArray = array_reverse($lookupArray);\n                $keySet = array_reverse($keySet);\n            }\n\n            $lookupArray = self::prepareLookupArray($lookupArray, $matchType);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // MATCH() is not case-sensitive, so we convert lookup value to be lower cased if it's a string type.\n        if (is_string($lookupValue)) {\n            $lookupValue = StringHelper::strToLower($lookupValue);\n        }\n\n        $valueKey = match ($matchType) {\n            self::MATCHTYPE_LARGEST_VALUE => self::matchLargestValue($lookupArray, $lookupValue, $keySet),\n            self::MATCHTYPE_FIRST_VALUE => self::matchFirstValue($lookupArray, $lookupValue),\n            default => self::matchSmallestValue($lookupArray, $lookupValue),\n        };\n\n        if ($valueKey !== null) {\n            return ++$valueKey; //* @phpstan-ignore-line\n        }\n\n        // Unsuccessful in finding a match, return #N/A error value\n        return ExcelError::NA();\n    }\n\n    /** @param mixed[] $lookupArray */\n    private static function matchFirstValue(array $lookupArray, mixed $lookupValue): int|string|null\n    {\n        if (is_string($lookupValue)) {\n            $valueIsString = true;\n            $wildcard = WildcardMatch::wildcard($lookupValue);\n        } else {\n            $valueIsString = false;\n            $wildcard = '';\n        }\n\n        $valueIsNumeric = is_int($lookupValue) || is_float($lookupValue);\n        foreach ($lookupArray as $i => $lookupArrayValue) {\n            if (\n                $valueIsString\n                && is_string($lookupArrayValue)\n            ) {\n                if (WildcardMatch::compare($lookupArrayValue, $wildcard)) {\n                    return $i; // wildcard match\n                }\n            } else {\n                if ($lookupArrayValue === $lookupValue) {\n                    return $i; // exact match\n                }\n                if (\n                    $valueIsNumeric\n                    && (is_float($lookupArrayValue) || is_int($lookupArrayValue))\n                    && $lookupArrayValue == $lookupValue\n                ) {\n                    return $i; // exact match\n                }\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * @param mixed[] $lookupArray\n     * @param mixed[] $keySet\n     */\n    private static function matchLargestValue(array $lookupArray, mixed $lookupValue, array $keySet): mixed\n    {\n        if (is_string($lookupValue)) {\n            if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {\n                $wildcard = WildcardMatch::wildcard($lookupValue);\n                foreach (array_reverse($lookupArray) as $i => $lookupArrayValue) {\n                    if (is_string($lookupArrayValue) && WildcardMatch::compare($lookupArrayValue, $wildcard)) {\n                        return $i;\n                    }\n                }\n            } else {\n                foreach ($lookupArray as $i => $lookupArrayValue) {\n                    if ($lookupArrayValue === $lookupValue) {\n                        return $keySet[$i];\n                    }\n                }\n            }\n        }\n        $valueIsNumeric = is_int($lookupValue) || is_float($lookupValue);\n        foreach ($lookupArray as $i => $lookupArrayValue) {\n            if ($valueIsNumeric && (is_int($lookupArrayValue) || is_float($lookupArrayValue))) {\n                if ($lookupArrayValue <= $lookupValue) {\n                    return array_search($i, $keySet);\n                }\n            }\n            $typeMatch = gettype($lookupValue) === gettype($lookupArrayValue);\n            if ($typeMatch && ($lookupArrayValue <= $lookupValue)) {\n                return array_search($i, $keySet);\n            }\n        }\n\n        return null;\n    }\n\n    /** @param mixed[] $lookupArray */\n    private static function matchSmallestValue(array $lookupArray, mixed $lookupValue): int|string|null\n    {\n        $valueKey = null;\n        if (is_string($lookupValue)) {\n            if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {\n                $wildcard = WildcardMatch::wildcard($lookupValue);\n                foreach ($lookupArray as $i => $lookupArrayValue) {\n                    if (is_string($lookupArrayValue) && WildcardMatch::compare($lookupArrayValue, $wildcard)) {\n                        return $i;\n                    }\n                }\n            }\n        }\n\n        $valueIsNumeric = is_int($lookupValue) || is_float($lookupValue);\n        // The basic algorithm is:\n        // Iterate and keep the highest match until the next element is smaller than the searched value.\n        // Return immediately if perfect match is found\n        foreach ($lookupArray as $i => $lookupArrayValue) {\n            $typeMatch = gettype($lookupValue) === gettype($lookupArrayValue);\n            $bothNumeric = $valueIsNumeric && (is_int($lookupArrayValue) || is_float($lookupArrayValue));\n\n            if ($lookupArrayValue === $lookupValue) {\n                // Another \"special\" case. If a perfect match is found,\n                // the algorithm gives up immediately\n                return $i;\n            }\n            if ($bothNumeric && $lookupValue == $lookupArrayValue) {\n                return $i; // exact match, as above\n            }\n            if (($typeMatch || $bothNumeric) && $lookupArrayValue >= $lookupValue) {\n                $valueKey = $i;\n            } elseif ($typeMatch && $lookupArrayValue < $lookupValue) {\n                //Excel algorithm gives up immediately if the first element is smaller than the searched value\n                break;\n            }\n        }\n\n        return $valueKey;\n    }\n\n    private static function validateLookupValue(mixed $lookupValue): void\n    {\n        // Lookup_value type has to be number, text, or logical values\n        if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) {\n            throw new Exception(ExcelError::NA());\n        }\n    }\n\n    private static function validateMatchType(mixed $matchType): int\n    {\n        // Match_type is 0, 1 or -1\n        // However Excel accepts other numeric values,\n        //  including numeric strings and floats.\n        //  It seems to just be interested in the sign.\n        if (!is_numeric($matchType)) {\n            throw new Exception(ExcelError::Value());\n        }\n        if ($matchType > 0) {\n            return self::MATCHTYPE_LARGEST_VALUE;\n        }\n        if ($matchType < 0) {\n            return self::MATCHTYPE_SMALLEST_VALUE;\n        }\n\n        return self::MATCHTYPE_FIRST_VALUE;\n    }\n\n    /** @param mixed[] $lookupArray */\n    private static function validateLookupArray(array $lookupArray): void\n    {\n        // Lookup_array should not be empty\n        $lookupArraySize = count($lookupArray);\n        if ($lookupArraySize <= 0) {\n            throw new Exception(ExcelError::NA());\n        }\n    }\n\n    /**\n     * @param mixed[] $lookupArray\n     *\n     * @return mixed[]\n     */\n    private static function prepareLookupArray(array $lookupArray, mixed $matchType): array\n    {\n        // Lookup_array should contain only number, text, or logical values, or empty (null) cells\n        foreach ($lookupArray as $i => $value) {\n            //    check the type of the value\n            if ((!is_numeric($value)) && (!is_string($value)) && (!is_bool($value)) && ($value !== null)) {\n                throw new Exception(ExcelError::NA());\n            }\n            // Convert strings to lowercase for case-insensitive testing\n            if (is_string($value)) {\n                $lookupArray[$i] = StringHelper::strToLower($value);\n            }\n            if (\n                ($value === null)\n                && (($matchType == self::MATCHTYPE_LARGEST_VALUE) || ($matchType == self::MATCHTYPE_SMALLEST_VALUE))\n            ) {\n                unset($lookupArray[$i]);\n            }\n        }\n\n        return $lookupArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Filter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Filter\n{\n    public static function filter(mixed $lookupArray, mixed $matchArray, mixed $ifEmpty = null): mixed\n    {\n        if (!is_array($lookupArray)) {\n            return ExcelError::VALUE();\n        }\n        /** @var mixed[] $lookupArray */\n        if (!is_array($matchArray)) {\n            return ExcelError::VALUE();\n        }\n\n        $matchArray = self::enumerateArrayKeys($matchArray);\n\n        $result = (Matrix::isColumnVector($matchArray))\n            ? self::filterByRow($lookupArray, $matchArray)\n            : self::filterByColumn($lookupArray, $matchArray);\n\n        if (empty($result)) {\n            return $ifEmpty ?? ExcelError::CALC();\n        }\n        /** @var callable(mixed): mixed */\n        $func = 'array_values';\n\n        return array_values(array_map($func, $result));\n    }\n\n    /**\n     * @param mixed[] $sortArray\n     *\n     * @return mixed[]\n     */\n    private static function enumerateArrayKeys(array $sortArray): array\n    {\n        array_walk(\n            $sortArray,\n            function (&$columns): void {\n                if (is_array($columns)) {\n                    $columns = array_values($columns);\n                }\n            }\n        );\n\n        return array_values($sortArray);\n    }\n\n    /**\n     * @param mixed[] $lookupArray\n     * @param mixed[] $matchArray\n     *\n     * @return mixed[]\n     */\n    private static function filterByRow(array $lookupArray, array $matchArray): array\n    {\n        $matchArray = array_values(array_column($matchArray, 0)); // @phpstan-ignore-line\n\n        return array_filter(\n            array_values($lookupArray),\n            fn ($index): bool => (bool) ($matchArray[$index] ?? null),\n            ARRAY_FILTER_USE_KEY\n        );\n    }\n\n    /**\n     * @param mixed[] $lookupArray\n     * @param mixed[] $matchArray\n     *\n     * @return mixed[]\n     */\n    private static function filterByColumn(array $lookupArray, array $matchArray): array\n    {\n        $lookupArray = Matrix::transpose($lookupArray);\n\n        if (count($matchArray) === 1) {\n            $matchArray = array_pop($matchArray);\n        }\n        /** @var mixed[] $matchArray */\n        array_walk(\n            $matchArray,\n            function (&$value): void {\n                $value = [$value];\n            }\n        );\n\n        $result = self::filterByRow($lookupArray, $matchArray);\n\n        return Matrix::transpose($result);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Formula.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Formula\n{\n    /**\n     * FORMULATEXT.\n     *\n     * @param mixed $cellReference The cell to check\n     * @param ?Cell $cell The current cell (containing this formula)\n     */\n    public static function text(mixed $cellReference = '', ?Cell $cell = null): string\n    {\n        if ($cell === null) {\n            return ExcelError::REF();\n        }\n\n        $worksheet = null;\n        $cellReference = StringHelper::convertToString($cellReference);\n        if (1 === preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches)) {\n            $cellReference = $matches[6] . $matches[7];\n            $worksheetName = trim($matches[3], \"'\");\n            $worksheet = (!empty($worksheetName))\n                ? $cell->getWorksheet()->getParentOrThrow()->getSheetByName($worksheetName)\n                : $cell->getWorksheet();\n        }\n\n        if (\n            $worksheet === null\n            || !$worksheet->cellExists($cellReference)\n            || !$worksheet->getCell($cellReference)->isFormula()\n        ) {\n            return ExcelError::NA();\n        }\n\n        return $worksheet->getCell($cellReference)->getValueString();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass HLookup extends LookupBase\n{\n    use ArrayEnabled;\n\n    /**\n     * HLOOKUP\n     * The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value\n     *     in the same column based on the index_number.\n     *\n     * @param mixed $lookupValue The value that you want to match in lookup_array\n     * @param mixed[][] $lookupArray The range of cells being searched\n     * @param array<mixed>|float|int|string $indexNumber The row number in table_array from which the matching value must be returned.\n     *                                The first row is 1.\n     * @param mixed $notExactMatch determines if you are looking for an exact match based on lookup_value\n     *\n     * @return mixed The value of the found cell\n     */\n    public static function lookup(mixed $lookupValue, $lookupArray, $indexNumber, mixed $notExactMatch = true): mixed\n    {\n        if (is_array($lookupValue) || is_array($indexNumber)) {\n            return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $lookupValue, $lookupArray, $indexNumber, $notExactMatch);\n        }\n\n        $notExactMatch = (bool) ($notExactMatch ?? true);\n\n        try {\n            self::validateLookupArray($lookupArray);\n            $lookupArray = self::convertLiteralArray($lookupArray);\n            $indexNumber = self::validateIndexLookup($lookupArray, $indexNumber);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $f = array_keys($lookupArray);\n        $firstRow = reset($f);\n        if ((!is_array($lookupArray[$firstRow])) || ($indexNumber > count($lookupArray))) {\n            return ExcelError::REF();\n        }\n\n        $firstkey = $f[0] - 1;\n        $returnColumn = $firstkey + $indexNumber;\n        /** @var mixed[][] $lookupArray */\n        $firstColumn = array_shift($f) ?? 1;\n        $rowNumber = self::hLookupSearch($lookupValue, $lookupArray, $firstColumn, $notExactMatch);\n\n        if ($rowNumber !== null) {\n            //  otherwise return the appropriate value\n            return $lookupArray[$returnColumn][Coordinate::stringFromColumnIndex($rowNumber)];\n        }\n\n        return ExcelError::NA();\n    }\n\n    /**\n     * @param mixed $lookupValue The value that you want to match in lookup_array\n     * @param mixed[][] $lookupArray\n     * @param  int|string $column\n     */\n    private static function hLookupSearch(mixed $lookupValue, array $lookupArray, $column, bool $notExactMatch): ?int\n    {\n        $lookupLower = StringHelper::strToLower(StringHelper::convertToString($lookupValue));\n\n        $rowNumber = null;\n        foreach ($lookupArray[$column] as $rowKey => $rowData) {\n            // break if we have passed possible keys\n            /** @var string $rowKey */\n            $bothNumeric = is_numeric($lookupValue) && is_numeric($rowData);\n            $bothNotNumeric = !is_numeric($lookupValue) && !is_numeric($rowData);\n            /** @var scalar $rowData */\n            $cellDataLower = StringHelper::strToLower((string) $rowData);\n\n            if (\n                $notExactMatch\n                && (($bothNumeric && $rowData > $lookupValue) || ($bothNotNumeric && $cellDataLower > $lookupLower))\n            ) {\n                break;\n            }\n\n            $rowNumber = self::checkMatch(\n                $bothNumeric,\n                $bothNotNumeric,\n                $notExactMatch,\n                Coordinate::columnIndexFromString($rowKey),\n                $cellDataLower,\n                $lookupLower,\n                $rowNumber\n            );\n        }\n\n        return $rowNumber;\n    }\n\n    /**\n     * @param mixed[] $lookupArray\n     *\n     * @return mixed[]\n     */\n    private static function convertLiteralArray(array $lookupArray): array\n    {\n        if (array_key_exists(0, $lookupArray)) {\n            $lookupArray2 = [];\n            $row = 0;\n            foreach ($lookupArray as $arrayVal) {\n                ++$row;\n                if (!is_array($arrayVal)) {\n                    $arrayVal = [$arrayVal];\n                }\n                $arrayVal2 = [];\n                foreach ($arrayVal as $key2 => $val2) {\n                    $index = Coordinate::stringFromColumnIndex($key2 + 1);\n                    $arrayVal2[$index] = $val2;\n                }\n                $lookupArray2[$row] = $arrayVal2;\n            }\n            $lookupArray = $lookupArray2;\n        }\n\n        return $lookupArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressHelper;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Helpers\n{\n    public const CELLADDRESS_USE_A1 = true;\n\n    public const CELLADDRESS_USE_R1C1 = false;\n\n    private static function convertR1C1(string &$cellAddress1, ?string &$cellAddress2, bool $a1, ?int $baseRow = null, ?int $baseCol = null): string\n    {\n        if ($a1 === self::CELLADDRESS_USE_R1C1) {\n            $cellAddress1 = AddressHelper::convertToA1($cellAddress1, $baseRow ?? 1, $baseCol ?? 1);\n            if ($cellAddress2) {\n                $cellAddress2 = AddressHelper::convertToA1($cellAddress2, $baseRow ?? 1, $baseCol ?? 1);\n            }\n        }\n\n        return $cellAddress1 . ($cellAddress2 ? \":$cellAddress2\" : '');\n    }\n\n    private static function adjustSheetTitle(string &$sheetTitle, ?string $value): void\n    {\n        if ($sheetTitle) {\n            $sheetTitle .= '!';\n            if (stripos($value ?? '', $sheetTitle) === 0) {\n                $sheetTitle = '';\n            }\n        }\n    }\n\n    /** @return array{string, ?string, string} */\n    public static function extractCellAddresses(string $cellAddress, bool $a1, Worksheet $sheet, string $sheetName = '', ?int $baseRow = null, ?int $baseCol = null): array\n    {\n        $cellAddress1 = $cellAddress;\n        $cellAddress2 = null;\n        $namedRange = DefinedName::resolveName($cellAddress1, $sheet, $sheetName);\n        if ($namedRange !== null) {\n            $workSheet = $namedRange->getWorkSheet();\n            $sheetTitle = ($workSheet === null) ? '' : $workSheet->getTitle();\n            $value = (string) preg_replace('/^=/', '', $namedRange->getValue());\n            self::adjustSheetTitle($sheetTitle, $value);\n            $cellAddress1 = $sheetTitle . $value;\n            $cellAddress = $cellAddress1;\n            $a1 = self::CELLADDRESS_USE_A1;\n        }\n        if (str_contains($cellAddress, ':')) {\n            [$cellAddress1, $cellAddress2] = explode(':', $cellAddress);\n        }\n        $cellAddress = self::convertR1C1($cellAddress1, $cellAddress2, $a1, $baseRow, $baseCol);\n\n        return [$cellAddress1, $cellAddress2, $cellAddress];\n    }\n\n    /** @return array{string, ?Worksheet, string} */\n    public static function extractWorksheet(string $cellAddress, Cell $cell): array\n    {\n        $sheetName = '';\n        if (str_contains($cellAddress, '!')) {\n            [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true, true);\n        }\n\n        $worksheet = ($sheetName !== '')\n            ? $cell->getWorksheet()->getParentOrThrow()->getSheetByName($sheetName)\n            : $cell->getWorksheet();\n\n        return [$cellAddress, $worksheet, $sheetName];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Hstack.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Hstack\n{\n    /**\n     * Excel function HSTACK.\n     *\n     * @return mixed[]|string\n     */\n    public static function hstack(mixed ...$inputData): array|string\n    {\n        $maxRow = 0;\n        foreach ($inputData as $matrix) {\n            if (!is_array($matrix)) {\n                $count = 1;\n            } else {\n                $count = count($matrix);\n            }\n            $maxRow = max($maxRow, $count);\n        }\n        /** @var mixed[] $inputData */\n        foreach ($inputData as &$matrix) {\n            if (!is_array($matrix)) {\n                $matrix = [$matrix];\n            }\n            $rows = count($matrix);\n            $reset = reset($matrix);\n            $columns = is_array($reset) ? count($reset) : 1;\n            while ($maxRow > $rows) {\n                $matrix[] = array_pad([], $columns, ExcelError::NA());\n                ++$rows;\n            }\n        }\n\n        $transpose = array_map(null, ...$inputData); //* @phpstan-ignore-line\n        $returnMatrix = [];\n        foreach ($transpose as $array) {\n            $returnMatrix[] = Functions::flattenArray($array);\n        }\n\n        return $returnMatrix;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Hyperlink.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Hyperlink\n{\n    /**\n     * HYPERLINK.\n     *\n     * Excel Function:\n     *        =HYPERLINK(linkURL, [displayName])\n     *\n     * @param mixed $linkURL Expect string. Value to check, is also the value returned when no error\n     * @param mixed $displayName Expect string. Value to return when testValue is an error condition\n     * @param ?Cell $cell The cell to set the hyperlink in\n     *\n     * @return string The value of $displayName (or $linkURL if $displayName was blank)\n     */\n    public static function set(mixed $linkURL = '', mixed $displayName = null, ?Cell $cell = null): string\n    {\n        $worksheet = null;\n        $coordinate = '';\n        if ($cell !== null) {\n            $coordinate = $cell->getCoordinate();\n            $worksheet = $cell->getWorksheetOrNull();\n        }\n\n        $linkURL = ($linkURL === null) ? '' : StringHelper::convertToString(Functions::flattenSingleValue($linkURL));\n        $displayName = ($displayName === null) ? '' : Functions::flattenSingleValue($displayName);\n\n        if ((!is_object($cell)) || (trim($linkURL) == '')) {\n            return ExcelError::REF();\n        }\n\n        $displayName = StringHelper::convertToString($displayName, false);\n        if (trim($displayName) === '') {\n            $displayName = $linkURL;\n        }\n\n        $worksheet?->getCell($coordinate)\n            ->getHyperlink()\n            ->setUrl($linkURL)\n            ->setTooltip($displayName)\n            ->setDisplay('');\n\n        return $displayName;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Indirect.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Indirect\n{\n    /**\n     * Determine whether cell address is in A1 (true) or R1C1 (false) format.\n     *\n     * @param mixed $a1fmt Expect bool Helpers::CELLADDRESS_USE_A1 or CELLADDRESS_USE_R1C1,\n     *                      but can be provided as numeric which is cast to bool\n     */\n    private static function a1Format(mixed $a1fmt): bool\n    {\n        $a1fmt = Functions::flattenSingleValue($a1fmt);\n        if ($a1fmt === null) {\n            return Helpers::CELLADDRESS_USE_A1;\n        }\n        if (is_string($a1fmt)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (bool) $a1fmt;\n    }\n\n    /**\n     * Convert cellAddress to string, verify not null string.\n     *\n     * @param null|mixed[]|string $cellAddress\n     */\n    private static function validateAddress(array|string|null $cellAddress): string\n    {\n        $cellAddress = Functions::flattenSingleValue($cellAddress);\n        if (!is_string($cellAddress) || !$cellAddress) {\n            throw new Exception(ExcelError::REF());\n        }\n\n        return $cellAddress;\n    }\n\n    /**\n     * INDIRECT.\n     *\n     * Returns the reference specified by a text string.\n     * References are immediately evaluated to display their contents.\n     *\n     * Excel Function:\n     *        =INDIRECT(cellAddress, bool) where the bool argument is optional\n     *\n     * @param mixed[]|string $cellAddress $cellAddress The cell address of the current cell (containing this formula)\n     * @param mixed $a1fmt Expect bool Helpers::CELLADDRESS_USE_A1 or CELLADDRESS_USE_R1C1,\n     *                      but can be provided as numeric which is cast to bool\n     * @param Cell $cell The current cell (containing this formula)\n     *\n     * @return mixed[]|string An array containing a cell or range of cells, or a string on error\n     */\n    public static function INDIRECT($cellAddress, mixed $a1fmt, Cell $cell): string|array\n    {\n        [$baseCol, $baseRow] = Coordinate::indexesFromString($cell->getCoordinate());\n\n        try {\n            $a1 = self::a1Format($a1fmt);\n            $cellAddress = self::validateAddress($cellAddress);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        [$cellAddress, $worksheet, $sheetName] = Helpers::extractWorksheet($cellAddress, $cell);\n\n        if (preg_match('/^' . Calculation::CALCULATION_REGEXP_COLUMNRANGE_RELATIVE . '$/miu', $cellAddress, $matches)) {\n            $cellAddress = self::handleRowColumnRanges($worksheet, ...explode(':', $cellAddress));\n        } elseif (preg_match('/^' . Calculation::CALCULATION_REGEXP_ROWRANGE_RELATIVE . '$/miu', $cellAddress, $matches)) {\n            $cellAddress = self::handleRowColumnRanges($worksheet, ...explode(':', $cellAddress));\n        }\n\n        try {\n            [$cellAddress1, $cellAddress2, $cellAddress] = Helpers::extractCellAddresses($cellAddress, $a1, $cell->getWorkSheet(), $sheetName, $baseRow, $baseCol);\n        } catch (Exception) {\n            return ExcelError::REF();\n        }\n\n        if (\n            (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/miu', $cellAddress1, $matches))\n            || (($cellAddress2 !== null) && (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/miu', $cellAddress2, $matches)))\n        ) {\n            return ExcelError::REF();\n        }\n\n        return self::extractRequiredCells($worksheet, $cellAddress);\n    }\n\n    /**\n     * Extract range values.\n     *\n     * @return mixed[] Array of values in range if range contains more than one element.\n     *                  Otherwise, a single value is returned.\n     */\n    private static function extractRequiredCells(?Worksheet $worksheet, string $cellAddress): array\n    {\n        return Calculation::getInstance($worksheet?->getParent())\n            ->extractCellRange($cellAddress, $worksheet, false, createCell: true);\n    }\n\n    private static function handleRowColumnRanges(?Worksheet $worksheet, string $start, string $end): string\n    {\n        // Being lazy, we're only checking a single row/column to get the max\n        if (ctype_digit($start) && $start <= AddressRange::MAX_ROW) {\n            // Max 16,384 columns for Excel2007\n            $endColRef = ($worksheet !== null) ? $worksheet->getHighestDataColumn((int) $start) : AddressRange::MAX_COLUMN;\n\n            return \"A{$start}:{$endColRef}{$end}\";\n        } elseif (ctype_alpha($start) && strlen($start) <= 3) {\n            // Max 1,048,576 rows for Excel2007\n            $endRowRef = ($worksheet !== null) ? $worksheet->getHighestDataRow($start) : AddressRange::MAX_ROW;\n\n            return \"{$start}1:{$end}{$endRowRef}\";\n        }\n\n        return \"{$start}:{$end}\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Lookup\n{\n    use ArrayEnabled;\n\n    /**\n     * LOOKUP\n     * The LOOKUP function searches for value either from a one-row or one-column range or from an array.\n     *\n     * @param mixed $lookupValue The value that you want to match in lookup_array\n     * @param mixed $lookupVector The range of cells being searched\n     * @param null|mixed $resultVector The column from which the matching value must be returned\n     *\n     * @return mixed The value of the found cell\n     */\n    public static function lookup(mixed $lookupValue, mixed $lookupVector, $resultVector = null): mixed\n    {\n        if (is_array($lookupValue)) {\n            return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $lookupValue, $lookupVector, $resultVector);\n        }\n\n        if (!is_array($lookupVector)) {\n            return ExcelError::NA();\n        }\n        /** @var mixed[][] $lookupVector */\n        $hasResultVector = isset($resultVector);\n        $lookupRows = self::rowCount($lookupVector);\n        $lookupColumns = self::columnCount($lookupVector);\n        // we correctly orient our results\n        if (($lookupRows === 1 && $lookupColumns > 1) || (!$hasResultVector && $lookupRows === 2 && $lookupColumns !== 2)) {\n            $lookupVector = Matrix::transpose($lookupVector);\n            $lookupRows = self::rowCount($lookupVector);\n            /** @var mixed[][] $lookupVector */\n            $lookupColumns = self::columnCount($lookupVector);\n        }\n\n        $resultVector = self::verifyResultVector($resultVector ?? $lookupVector); //* @phpstan-ignore-line\n\n        if ($lookupRows === 2 && !$hasResultVector) {\n            $resultVector = array_pop($lookupVector);\n            $lookupVector = array_shift($lookupVector);\n        }\n\n        /** @var array<int, mixed> $lookupVector */\n        /** @var array<int, mixed> $resultVector */\n        if ($lookupColumns !== 2) {\n            $lookupVector = self::verifyLookupValues($lookupVector, $resultVector);\n        }\n\n        return VLookup::lookup($lookupValue, $lookupVector, 2);\n    }\n\n    /**\n     * @param array<int, mixed> $lookupVector\n     * @param array<int, mixed> $resultVector\n     *\n     * @return mixed[]\n     */\n    private static function verifyLookupValues(array $lookupVector, array $resultVector): array\n    {\n        foreach ($lookupVector as &$value) {\n            if (is_array($value)) {\n                $k = array_keys($value);\n                $key1 = $key2 = array_shift($k);\n                ++$key2;\n                $dataValue1 = $value[$key1];\n            } else {\n                $key1 = 0;\n                $key2 = 1;\n                $dataValue1 = $value;\n            }\n\n            $dataValue2 = array_shift($resultVector);\n            if (is_array($dataValue2)) {\n                $dataValue2 = array_shift($dataValue2);\n            }\n            /** @var int $key2 */\n            $value = [$key1 => $dataValue1, $key2 => $dataValue2];\n        }\n        unset($value);\n\n        return $lookupVector;\n    }\n\n    /**\n     * @param mixed[][] $resultVector\n     *\n     * @return mixed[]\n     */\n    private static function verifyResultVector(array $resultVector): array\n    {\n        $resultRows = self::rowCount($resultVector);\n        $resultColumns = self::columnCount($resultVector);\n\n        // we correctly orient our results\n        if ($resultRows === 1 && $resultColumns > 1) {\n            $resultVector = Matrix::transpose($resultVector);\n        }\n\n        return $resultVector;\n    }\n\n    /** @param mixed[] $dataArray */\n    private static function rowCount(array $dataArray): int\n    {\n        return count($dataArray);\n    }\n\n    /** @param mixed[][] $dataArray */\n    private static function columnCount(array $dataArray): int\n    {\n        $rowKeys = array_keys($dataArray);\n        $row = array_shift($rowKeys);\n\n        return count($dataArray[$row]);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nabstract class LookupBase\n{\n    protected static function validateLookupArray(mixed $lookupArray): void\n    {\n        if (!is_array($lookupArray)) {\n            throw new Exception(ExcelError::REF());\n        }\n    }\n\n    /**\n     * @param mixed[] $lookupArray\n     * @param float|int|string $index_number number >= 1\n     */\n    protected static function validateIndexLookup(array $lookupArray, $index_number): int\n    {\n        // index_number must be a number greater than or equal to 1.\n        // Excel results are inconsistent when index is non-numeric.\n        // VLOOKUP(whatever, whatever, SQRT(-1)) yields NUM error, but\n        // VLOOKUP(whatever, whatever, cellref) yields REF error\n        //   when cellref is '=SQRT(-1)'. So just try our best here.\n        // Similar results if string (literal yields VALUE, cellRef REF).\n        if (!is_numeric($index_number)) {\n            throw new Exception(ExcelError::throwError($index_number));\n        }\n        if ($index_number < 1) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        // index_number must be less than or equal to the number of columns in lookupArray\n        if (empty($lookupArray)) {\n            throw new Exception(ExcelError::REF());\n        }\n\n        return (int) $index_number;\n    }\n\n    protected static function checkMatch(\n        bool $bothNumeric,\n        bool $bothNotNumeric,\n        bool $notExactMatch,\n        int $rowKey,\n        string $cellDataLower,\n        string $lookupLower,\n        ?int $rowNumber\n    ): ?int {\n        // remember the last key, but only if datatypes match\n        if ($bothNumeric || $bothNotNumeric) {\n            // Spreadsheets software returns first exact match,\n            // we have sorted and we might have broken key orders\n            // we want the first one (by its initial index)\n            if ($notExactMatch) {\n                $rowNumber = $rowKey;\n            } elseif (($cellDataLower == $lookupLower) && (($rowNumber === null) || ($rowKey < $rowNumber))) {\n                $rowNumber = $rowKey;\n            }\n        }\n\n        return $rowNumber;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/LookupRefValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass LookupRefValidations\n{\n    public static function validateInt(mixed $value): int\n    {\n        if (!is_numeric($value)) {\n            if (is_string($value) && ErrorValue::isError($value, true)) {\n                throw new Exception($value);\n            }\n\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (int) floor((float) $value);\n    }\n\n    public static function validatePositiveInt(mixed $value, bool $allowZero = true): int\n    {\n        $value = self::validateInt($value);\n\n        if (($allowZero === false && $value <= 0) || $value < 0) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Matrix.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Matrix\n{\n    use ArrayEnabled;\n\n    /**\n     * Helper function; NOT an implementation of any Excel Function.\n     *\n     * @param mixed[] $values\n     */\n    public static function isColumnVector(array $values): bool\n    {\n        return count($values, COUNT_RECURSIVE) === (count($values, COUNT_NORMAL) * 2);\n    }\n\n    /**\n     * Helper function; NOT an implementation of any Excel Function.\n     *\n     * @param mixed[] $values\n     */\n    public static function isRowVector(array $values): bool\n    {\n        return count($values, COUNT_RECURSIVE) > 1\n            && (count($values, COUNT_NORMAL) === 1 || count($values, COUNT_RECURSIVE) === count($values, COUNT_NORMAL));\n    }\n\n    /**\n     * TRANSPOSE.\n     *\n     * @param mixed $matrixData A matrix of values\n     *\n     * @return mixed[]\n     */\n    public static function transpose($matrixData): array\n    {\n        $returnMatrix = [];\n        if (!is_array($matrixData)) {\n            $matrixData = [[$matrixData]];\n        }\n        if (!is_array(end($matrixData))) {\n            $matrixData = [$matrixData];\n        }\n\n        $column = 0;\n        /** @var mixed[][] $matrixData */\n        foreach ($matrixData as $matrixRow) {\n            $row = 0;\n            foreach ($matrixRow as $matrixCell) {\n                $returnMatrix[$row][$column] = $matrixCell;\n                ++$row;\n            }\n            ++$column;\n        }\n\n        return $returnMatrix;\n    }\n\n    /**\n     * INDEX.\n     *\n     * Uses an index to choose a value from a reference or array\n     *\n     * Excel Function:\n     *        =INDEX(range_array, row_num, [column_num], [area_num])\n     *\n     * @param mixed $matrix A range of cells or an array constant\n     * @param mixed $rowNum The row in the array or range from which to return a value.\n     *                          If row_num is omitted, column_num is required.\n     *                      Or can be an array of values\n     * @param mixed $columnNum The column in the array or range from which to return a value.\n     *                          If column_num is omitted, row_num is required.\n     *                      Or can be an array of values\n     *\n     * TODO Provide support for area_num, currently not supported\n     *\n     * @return mixed the value of a specified cell or array of cells\n     *         If an array of values is passed as the $rowNum and/or $columnNum arguments, then the returned result\n     *            will also be an array with the same dimensions\n     */\n    public static function index(mixed $matrix, mixed $rowNum = 0, mixed $columnNum = null): mixed\n    {\n        if (is_array($rowNum) || is_array($columnNum)) {\n            return self::evaluateArrayArgumentsSubsetFrom([self::class, __FUNCTION__], 1, $matrix, $rowNum, $columnNum);\n        }\n\n        $rowNum = $rowNum ?? 0;\n        $columnNum = $columnNum ?? 0;\n        if (is_scalar($matrix)) {\n            if ($rowNum === 0 || $rowNum === 1) {\n                if ($columnNum === 0 || $columnNum === 1) {\n                    if ($columnNum === 1 || $rowNum === 1) {\n                        return $matrix;\n                    }\n                }\n            }\n        }\n\n        try {\n            $rowNum = LookupRefValidations::validatePositiveInt($rowNum);\n            $columnNum = LookupRefValidations::validatePositiveInt($columnNum);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (is_array($matrix) && count($matrix) === 1 && $rowNum > 1) {\n            $matrixKey = array_keys($matrix)[0];\n            if (is_array($matrix[$matrixKey])) {\n                $tempMatrix = [];\n                foreach ($matrix[$matrixKey] as $key => $value) {\n                    $tempMatrix[$key] = [$value];\n                }\n                $matrix = $tempMatrix;\n            }\n        }\n\n        if (!is_array($matrix) || ($rowNum > count($matrix))) {\n            return ExcelError::REF();\n        }\n\n        $rowKeys = array_keys($matrix);\n        $columnKeys = @array_keys($matrix[$rowKeys[0]]); //* @phpstan-ignore-line\n\n        if ($columnNum > count($columnKeys)) {\n            return ExcelError::REF();\n        }\n\n        if ($columnNum === 0) {\n            return self::extractRowValue($matrix, $rowKeys, $rowNum);\n        }\n\n        $columnNum = $columnKeys[--$columnNum]; //* @phpstan-ignore-line\n        if ($rowNum === 0) {\n            return array_map(\n                fn ($value): array => [$value],\n                array_column($matrix, $columnNum)\n            );\n        }\n        $rowNum = $rowKeys[--$rowNum]; //* @phpstan-ignore-line\n        /** @var mixed[][] $matrix */\n\n        return $matrix[$rowNum][$columnNum];\n    }\n\n    /**\n     * @param mixed[] $matrix\n     * @param array<int, int> $rowKeys\n     */\n    private static function extractRowValue(array $matrix, array $rowKeys, int $rowNum): mixed\n    {\n        if ($rowNum === 0) {\n            return $matrix;\n        }\n\n        $rowNum = $rowKeys[--$rowNum];\n        $row = $matrix[$rowNum];\n        if (is_array($row)) {\n            return [$rowNum => $row];\n        }\n\n        return $row;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Offset.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Validations;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Offset\n{\n    /**\n     * OFFSET.\n     *\n     * Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells.\n     * The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and\n     * the number of columns to be returned.\n     *\n     * Excel Function:\n     *        =OFFSET(cellAddress, rows, cols, [height], [width])\n     *\n     * @param null|string $cellAddress The reference from which you want to base the offset.\n     *                                     Reference must refer to a cell or range of adjacent cells;\n     *                                     otherwise, OFFSET returns the #VALUE! error value.\n     * @param int $rows The number of rows, up or down, that you want the upper-left cell to refer to.\n     *                        Using 5 as the rows argument specifies that the upper-left cell in the\n     *                        reference is five rows below reference. Rows can be positive (which means\n     *                        below the starting reference) or negative (which means above the starting\n     *                        reference).\n     * @param int $columns The number of columns, to the left or right, that you want the upper-left cell\n     *                           of the result to refer to. Using 5 as the cols argument specifies that the\n     *                           upper-left cell in the reference is five columns to the right of reference.\n     *                           Cols can be positive (which means to the right of the starting reference)\n     *                           or negative (which means to the left of the starting reference).\n     * @param ?int $height The height, in number of rows, that you want the returned reference to be.\n     *                          Height must be a positive number.\n     * @param ?int $width The width, in number of columns, that you want the returned reference to be.\n     *                         Width must be a positive number.\n     *\n     * @return array<mixed>|string An array containing a cell or range of cells, or a string on error\n     */\n    public static function OFFSET(?string $cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null, ?Cell $cell = null): string|array\n    {\n        /** @var int */\n        $rows = Functions::flattenSingleValue($rows);\n        /** @var int */\n        $columns = Functions::flattenSingleValue($columns);\n        /** @var int */\n        $height = Functions::flattenSingleValue($height);\n        /** @var int */\n        $width = Functions::flattenSingleValue($width);\n\n        if ($cellAddress === null || $cellAddress === '') {\n            return ExcelError::VALUE();\n        }\n\n        if (!is_object($cell)) {\n            return ExcelError::REF();\n        }\n        $sheet = $cell->getParent()?->getParent(); // worksheet\n        if ($sheet !== null) {\n            $cellAddress = Validations::definedNameToCoordinate($cellAddress, $sheet);\n        }\n\n        [$cellAddress, $worksheet] = self::extractWorksheet($cellAddress, $cell);\n\n        $startCell = $endCell = $cellAddress;\n        if (strpos($cellAddress, ':')) {\n            [$startCell, $endCell] = explode(':', $cellAddress);\n        }\n        [$startCellColumn, $startCellRow] = Coordinate::indexesFromString($startCell);\n        [, $endCellRow, $endCellColumn] = Coordinate::indexesFromString($endCell);\n\n        $startCellRow += $rows;\n        $startCellColumn += $columns - 1;\n\n        if (($startCellRow <= 0) || ($startCellColumn < 0)) {\n            return ExcelError::REF();\n        }\n\n        $endCellColumn = self::adjustEndCellColumnForWidth($endCellColumn, $width, $startCellColumn, $columns);\n        $startCellColumn = Coordinate::stringFromColumnIndex($startCellColumn + 1);\n\n        $endCellRow = self::adjustEndCellRowForHeight($height, $startCellRow, $rows, $endCellRow);\n\n        if (($endCellRow <= 0) || ($endCellColumn < 0)) {\n            return ExcelError::REF();\n        }\n        $endCellColumn = Coordinate::stringFromColumnIndex($endCellColumn + 1);\n\n        $cellAddress = \"{$startCellColumn}{$startCellRow}\";\n        if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) {\n            $cellAddress .= \":{$endCellColumn}{$endCellRow}\";\n        }\n\n        return self::extractRequiredCells($worksheet, $cellAddress);\n    }\n\n    /** @return mixed[] */\n    private static function extractRequiredCells(?Worksheet $worksheet, string $cellAddress): array\n    {\n        return Calculation::getInstance($worksheet?->getParent())\n            ->extractCellRange($cellAddress, $worksheet, false);\n    }\n\n    /** @return array{string, ?Worksheet} */\n    private static function extractWorksheet(?string $cellAddress, Cell $cell): array\n    {\n        $cellAddress = self::assessCellAddress($cellAddress ?? '', $cell);\n\n        $sheetName = '';\n        if (str_contains($cellAddress, '!')) {\n            [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true, true);\n        }\n\n        $worksheet = ($sheetName !== '')\n            ? $cell->getWorksheet()->getParentOrThrow()->getSheetByName($sheetName)\n            : $cell->getWorksheet();\n\n        return [$cellAddress, $worksheet];\n    }\n\n    private static function assessCellAddress(string $cellAddress, Cell $cell): string\n    {\n        if (preg_match('/^' . Calculation::CALCULATION_REGEXP_DEFINEDNAME . '$/mui', $cellAddress) !== false) {\n            $cellAddress = Functions::expandDefinedName($cellAddress, $cell);\n        }\n\n        return $cellAddress;\n    }\n\n    /**\n     * @param null|object|scalar $width\n     * @param scalar $columns\n     */\n    private static function adjustEndCellColumnForWidth(string $endCellColumn, $width, int $startCellColumn, $columns): int\n    {\n        $endCellColumn = Coordinate::columnIndexFromString($endCellColumn) - 1;\n        if (($width !== null) && (!is_object($width))) {\n            $endCellColumn = $startCellColumn + (int) $width - 1;\n        } else {\n            $endCellColumn += (int) $columns;\n        }\n\n        return $endCellColumn;\n    }\n\n    /**\n     * @param null|object|scalar $height\n     * @param scalar $rows\n     */\n    private static function adjustEndCellRowForHeight($height, int $startCellRow, $rows, int $endCellRow): int\n    {\n        if (($height !== null) && (!is_object($height))) {\n            $endCellRow = $startCellRow + (int) $height - 1;\n        } else {\n            $endCellRow += (int) $rows;\n        }\n\n        return $endCellRow;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass RowColumnInformation\n{\n    /**\n     * Test if cellAddress is null or whitespace string.\n     *\n     * @param null|mixed[]|string $cellAddress A reference to a range of cells\n     */\n    private static function cellAddressNullOrWhitespace($cellAddress): bool\n    {\n        return $cellAddress === null || (!is_array($cellAddress) && trim($cellAddress) === '');\n    }\n\n    private static function cellColumn(?Cell $cell): int\n    {\n        return ($cell !== null) ? Coordinate::columnIndexFromString($cell->getColumn()) : 1;\n    }\n\n    /**\n     * COLUMN.\n     *\n     * Returns the column number of the given cell reference\n     *     If the cell reference is a range of cells, COLUMN returns the column numbers of each column\n     *        in the reference as a horizontal array.\n     *     If cell reference is omitted, and the function is being called through the calculation engine,\n     *        then it is assumed to be the reference of the cell in which the COLUMN function appears;\n     *        otherwise this function returns 1.\n     *\n     * Excel Function:\n     *        =COLUMN([cellAddress])\n     *\n     * @param null|mixed[]|string $cellAddress A reference to a range of cells for which you want the column numbers\n     *\n     * @return int|int[]|string\n     */\n    public static function COLUMN($cellAddress = null, ?Cell $cell = null): int|string|array\n    {\n        if (self::cellAddressNullOrWhitespace($cellAddress)) {\n            return self::cellColumn($cell);\n        }\n\n        if (is_array($cellAddress)) {\n            foreach ($cellAddress as $columnKey => $value) {\n                $columnKey = (string) preg_replace('/[^a-z]/i', '', $columnKey);\n\n                return Coordinate::columnIndexFromString($columnKey);\n            }\n\n            return self::cellColumn($cell);\n        }\n\n        $cellAddress = $cellAddress ?? '';\n        if ($cell != null) {\n            [,, $sheetName] = Helpers::extractWorksheet($cellAddress, $cell);\n            [,, $cellAddress] = Helpers::extractCellAddresses($cellAddress, true, $cell->getWorksheet(), $sheetName);\n        }\n        [, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);\n        $cellAddress ??= '';\n\n        if (str_contains($cellAddress, ':')) {\n            [$startAddress, $endAddress] = explode(':', $cellAddress);\n            $startAddress = (string) preg_replace('/[^a-z]/i', '', $startAddress);\n            $endAddress = (string) preg_replace('/[^a-z]/i', '', $endAddress);\n\n            return range(\n                Coordinate::columnIndexFromString($startAddress),\n                Coordinate::columnIndexFromString($endAddress)\n            );\n        }\n\n        $cellAddress = (string) preg_replace('/[^a-z]/i', '', $cellAddress);\n\n        try {\n            return Coordinate::columnIndexFromString($cellAddress);\n        } catch (SpreadsheetException) {\n            return ExcelError::NAME();\n        }\n    }\n\n    /**\n     * COLUMNS.\n     *\n     * Returns the number of columns in an array or reference.\n     *\n     * Excel Function:\n     *        =COLUMNS(cellAddress)\n     *\n     * @param null|mixed[]|string $cellAddress An array or array formula, or a reference to a range of cells\n     *                                          for which you want the number of columns\n     *\n     * @return int|string The number of columns in cellAddress, or a string if arguments are invalid\n     */\n    public static function COLUMNS($cellAddress = null)\n    {\n        if (self::cellAddressNullOrWhitespace($cellAddress)) {\n            return 1;\n        }\n        if (is_string($cellAddress) && ErrorValue::isError($cellAddress, true)) {\n            return $cellAddress;\n        }\n        if (!is_array($cellAddress)) {\n            return ExcelError::VALUE();\n        }\n\n        reset($cellAddress);\n        $isMatrix = (is_numeric(key($cellAddress)));\n        [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);\n\n        if ($isMatrix) {\n            return $rows;\n        }\n\n        return $columns;\n    }\n\n    private static function cellRow(?Cell $cell): int|string\n    {\n        return ($cell !== null) ? self::convert0ToName($cell->getRow()) : 1;\n    }\n\n    private static function convert0ToName(int|string $result): int|string\n    {\n        if (is_int($result) && ($result <= 0 || $result > AddressRange::MAX_ROW)) {\n            return ExcelError::NAME();\n        }\n\n        return $result;\n    }\n\n    /**\n     * ROW.\n     *\n     * Returns the row number of the given cell reference\n     *     If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference\n     *        as a vertical array.\n     *     If cell reference is omitted, and the function is being called through the calculation engine,\n     *        then it is assumed to be the reference of the cell in which the ROW function appears;\n     *        otherwise this function returns 1.\n     *\n     * Excel Function:\n     *        =ROW([cellAddress])\n     *\n     * @param null|mixed[][]|string $cellAddress A reference to a range of cells for which you want the row numbers\n     *\n     * @return int|mixed[]|string\n     */\n    public static function ROW($cellAddress = null, ?Cell $cell = null): int|string|array\n    {\n        if (self::cellAddressNullOrWhitespace($cellAddress)) {\n            return self::cellRow($cell);\n        }\n\n        if (is_array($cellAddress)) {\n            foreach ($cellAddress as $rowKey => $rowValue) {\n                foreach ($rowValue as $columnKey => $cellValue) {\n                    return (int) preg_replace('/\\D/', '', $rowKey);\n                }\n            }\n\n            return self::cellRow($cell);\n        }\n\n        $cellAddress = $cellAddress ?? '';\n        if ($cell !== null) {\n            [,, $sheetName] = Helpers::extractWorksheet($cellAddress, $cell);\n            [,, $cellAddress] = Helpers::extractCellAddresses($cellAddress, true, $cell->getWorksheet(), $sheetName);\n        }\n        [, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);\n        $cellAddress ??= '';\n        if (str_contains($cellAddress, ':')) {\n            [$startAddress, $endAddress] = explode(':', $cellAddress);\n            $startAddress = (int) (string) preg_replace('/\\D/', '', $startAddress);\n            $endAddress = (int) (string) preg_replace('/\\D/', '', $endAddress);\n\n            return array_map(\n                fn ($value): array => [$value],\n                range($startAddress, $endAddress)\n            );\n        }\n        [$cellAddress] = explode(':', $cellAddress);\n\n        return self::convert0ToName((int) preg_replace('/\\D/', '', $cellAddress));\n    }\n\n    /**\n     * ROWS.\n     *\n     * Returns the number of rows in an array or reference.\n     *\n     * Excel Function:\n     *        =ROWS(cellAddress)\n     *\n     * @param null|mixed[]|string $cellAddress An array or array formula, or a reference to a range of cells\n     *                                          for which you want the number of rows\n     *\n     * @return int|string The number of rows in cellAddress, or a string if arguments are invalid\n     */\n    public static function ROWS($cellAddress = null)\n    {\n        if (self::cellAddressNullOrWhitespace($cellAddress)) {\n            return 1;\n        }\n        if (is_string($cellAddress) && ErrorValue::isError($cellAddress, true)) {\n            return $cellAddress;\n        }\n        if (!is_array($cellAddress)) {\n            return ExcelError::VALUE();\n        }\n\n        reset($cellAddress);\n        $isMatrix = (is_numeric(key($cellAddress)));\n        [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);\n\n        if ($isMatrix) {\n            return $columns;\n        }\n\n        return $rows;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Selection.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Selection\n{\n    use ArrayEnabled;\n\n    /**\n     * CHOOSE.\n     *\n     * Uses lookup_value to return a value from the list of value arguments.\n     * Use CHOOSE to select one of up to 254 values based on the lookup_value.\n     *\n     * Excel Function:\n     *        =CHOOSE(index_num, value1, [value2], ...)\n     *\n     * @param mixed $chosenEntry The entry to select from the list (indexed from 1)\n     * @param mixed ...$chooseArgs Data values\n     *\n     * @return mixed The selected value\n     */\n    public static function choose(mixed $chosenEntry, mixed ...$chooseArgs): mixed\n    {\n        if (is_array($chosenEntry)) {\n            return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $chosenEntry, ...$chooseArgs);\n        }\n\n        $entryCount = count($chooseArgs) - 1;\n\n        if (is_numeric($chosenEntry)) {\n            --$chosenEntry;\n        } else {\n            return ExcelError::VALUE();\n        }\n        $chosenEntry = (int) floor($chosenEntry);\n        if (($chosenEntry < 0) || ($chosenEntry > $entryCount)) {\n            return ExcelError::VALUE();\n        }\n\n        if (is_array($chooseArgs[$chosenEntry])) {\n            return Functions::flattenArray($chooseArgs[$chosenEntry]);\n        }\n\n        return $chooseArgs[$chosenEntry];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Sort.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Sort extends LookupRefValidations\n{\n    public const ORDER_ASCENDING = 1;\n    public const ORDER_DESCENDING = -1;\n\n    /**\n     * SORT\n     * The SORT function returns a sorted array of the elements in an array.\n     * The returned array is the same shape as the provided array argument.\n     * Both $sortIndex and $sortOrder can be arrays, to provide multi-level sorting.\n     *\n     * NOTE: If $sortArray contains a mixture of data types\n     * (string/int/bool), the results may be unexpected.\n     * This is also true if the array consists of string\n     * representations of numbers, especially if there are\n     * both positive and negative numbers in the mix.\n     *\n     * @param mixed $sortArray The range of cells being sorted\n     * @param mixed $sortIndex The column or row number within the sortArray to sort on\n     * @param mixed $sortOrder Flag indicating whether to sort ascending or descending\n     *                          Ascending = 1 (self::ORDER_ASCENDING)\n     *                          Descending = -1 (self::ORDER_DESCENDING)\n     * @param mixed $byColumn Whether the sort should be determined by row (the default) or by column\n     *\n     * @return mixed The sorted values from the sort range\n     */\n    public static function sort(mixed $sortArray, mixed $sortIndex = 1, mixed $sortOrder = self::ORDER_ASCENDING, mixed $byColumn = false): mixed\n    {\n        if (!is_array($sortArray)) {\n            $sortArray = [[$sortArray]];\n        }\n\n        /** @var mixed[][] */\n        $sortArray = self::enumerateArrayKeys($sortArray);\n\n        $byColumn = (bool) $byColumn;\n        $lookupIndexSize = $byColumn ? count($sortArray) : count($sortArray[0]);\n\n        try {\n            // If $sortIndex and $sortOrder are scalars, then convert them into arrays\n            if (!is_array($sortIndex)) {\n                $sortIndex = [$sortIndex];\n                $sortOrder = is_scalar($sortOrder) ? [$sortOrder] : $sortOrder;\n            }\n            // but the values of those array arguments still need validation\n            $sortOrder = (empty($sortOrder) ? [self::ORDER_ASCENDING] : $sortOrder);\n            self::validateArrayArgumentsForSort($sortIndex, $sortOrder, $lookupIndexSize);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // We want a simple, enumerated array of arrays where we can reference column by its index number.\n        /** @var callable(mixed): mixed */\n        $temp = 'array_values';\n        /** @var array<int> $sortOrder */\n        $sortArray = array_values(array_map($temp, $sortArray));\n        /** @var int[] $sortIndex */\n\n        return ($byColumn === true)\n            ? self::sortByColumn($sortArray, $sortIndex, $sortOrder)\n            : self::sortByRow($sortArray, $sortIndex, $sortOrder);\n    }\n\n    /**\n     * SORTBY\n     * The SORTBY function sorts the contents of a range or array based on the values in a corresponding range or array.\n     * The returned array is the same shape as the provided array argument.\n     * Both $sortIndex and $sortOrder can be arrays, to provide multi-level sorting.\n     * Microsoft doesn't even bother documenting that a column sort\n     * is possible. However, it is. According to:\n     * https://exceljet.net/functions/sortby-function\n     * When by_array is a horizontal range, SORTBY sorts horizontally by columns.\n     * My interpretation of this is that by_array must be an\n     * array which contains exactly one row.\n     *\n     * NOTE: If the \"byArray\" contains a mixture of data types\n     * (string/int/bool), the results may be unexpected.\n     * This is also true if the array consists of string\n     * representations of numbers, especially if there are\n     * both positive and negative numbers in the mix.\n     *\n     * @param mixed $sortArray The range of cells being sorted\n     * @param mixed $args\n     *              At least one additional argument must be provided, The vector or range to sort on\n     *              After that, arguments are passed as pairs:\n     *                    sort order: ascending or descending\n     *                         Ascending = 1 (self::ORDER_ASCENDING)\n     *                         Descending = -1 (self::ORDER_DESCENDING)\n     *                    additional arrays or ranges for multi-level sorting\n     *\n     * @return mixed The sorted values from the sort range\n     */\n    public static function sortBy(mixed $sortArray, mixed ...$args): mixed\n    {\n        if (!is_array($sortArray)) {\n            $sortArray = [[$sortArray]];\n        }\n        $transpose = false;\n        $args0 = $args[0] ?? null;\n        if (is_array($args0) && count($args0) === 1) {\n            $args0 = reset($args0);\n            if (is_array($args0) && count($args0) > 1) {\n                $transpose = true;\n                $sortArray = Matrix::transpose($sortArray);\n            }\n        }\n\n        $sortArray = self::enumerateArrayKeys($sortArray);\n\n        $lookupArraySize = count($sortArray);\n        $argumentCount = count($args);\n\n        try {\n            $sortBy = $sortOrder = [];\n            for ($i = 0; $i < $argumentCount; $i += 2) {\n                $argsI = $args[$i];\n                if (!is_array($argsI)) {\n                    $argsI = [[$argsI]];\n                }\n                $sortBy[] = self::validateSortVector($argsI, $lookupArraySize);\n                $sortOrder[] = self::validateSortOrder($args[$i + 1] ?? self::ORDER_ASCENDING);\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $temp = self::processSortBy($sortArray, $sortBy, $sortOrder);\n        if ($transpose) {\n            $temp = Matrix::transpose($temp);\n        }\n\n        return $temp;\n    }\n\n    /**\n     * @param mixed[] $sortArray\n     *\n     * @return mixed[]\n     */\n    private static function enumerateArrayKeys(array $sortArray): array\n    {\n        array_walk(\n            $sortArray,\n            function (&$columns): void {\n                if (is_array($columns)) {\n                    $columns = array_values($columns);\n                }\n            }\n        );\n\n        return array_values($sortArray);\n    }\n\n    private static function validateScalarArgumentsForSort(mixed &$sortIndex, mixed &$sortOrder, int $sortArraySize): void\n    {\n        $sortIndex = self::validatePositiveInt($sortIndex, false);\n\n        if ($sortIndex > $sortArraySize) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        $sortOrder = self::validateSortOrder($sortOrder);\n    }\n\n    /**\n     * @param mixed[] $sortVector\n     *\n     * @return mixed[]\n     */\n    private static function validateSortVector(array $sortVector, int $sortArraySize): array\n    {\n        // It doesn't matter if it's a row or a column vectors, it works either way\n        $sortVector = Functions::flattenArray($sortVector);\n        if (count($sortVector) !== $sortArraySize) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return $sortVector;\n    }\n\n    private static function validateSortOrder(mixed $sortOrder): int\n    {\n        $sortOrder = self::validateInt($sortOrder);\n        if (($sortOrder == self::ORDER_ASCENDING || $sortOrder === self::ORDER_DESCENDING) === false) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return $sortOrder;\n    }\n\n    /** @param mixed[] $sortIndex */\n    private static function validateArrayArgumentsForSort(array &$sortIndex, mixed &$sortOrder, int $sortArraySize): void\n    {\n        // It doesn't matter if they're row or column vectors, it works either way\n        $sortIndex = Functions::flattenArray($sortIndex);\n        $sortOrder = Functions::flattenArray($sortOrder);\n\n        if (\n            count($sortOrder) === 0 || count($sortOrder) > $sortArraySize\n            || (count($sortOrder) > count($sortIndex))\n        ) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        if (count($sortIndex) > count($sortOrder)) {\n            // If $sortOrder has fewer elements than $sortIndex, then the last order element is repeated.\n            $sortOrder = array_merge(\n                $sortOrder,\n                array_fill(0, count($sortIndex) - count($sortOrder), array_pop($sortOrder))\n            );\n        }\n\n        foreach ($sortIndex as $key => &$value) {\n            self::validateScalarArgumentsForSort($value, $sortOrder[$key], $sortArraySize);\n        }\n    }\n\n    /**\n     * @param mixed[] $sortVector\n     *\n     * @return mixed[]\n     */\n    private static function prepareSortVectorValues(array $sortVector): array\n    {\n        // Strings should be sorted case-insensitive.\n        // Booleans are a complete mess. Excel always seems to sort\n        // booleans in a mixed vector at either the top or the bottom,\n        // so converting them to string or int doesn't really work.\n        // Best advice is to use them in a boolean-only vector.\n        // Code below chooses int conversion, which is sensible,\n        // and, as a bonus, compatible with LibreOffice.\n        return array_map(\n            function ($value) {\n                if (is_bool($value)) {\n                    return (int) $value;\n                }\n                if (is_string($value)) {\n                    return StringHelper::strToLower($value);\n                }\n\n                return $value;\n            },\n            $sortVector\n        );\n    }\n\n    /**\n     * @param mixed[] $sortArray\n     * @param mixed[] $sortIndex\n     * @param int[] $sortOrder\n     *\n     * @return mixed[]\n     */\n    private static function processSortBy(array $sortArray, array $sortIndex, array $sortOrder): array\n    {\n        $sortArguments = [];\n        /** @var mixed[] */\n        $sortData = [];\n        foreach ($sortIndex as $index => $sortValues) {\n            /** @var mixed[] $sortValues */\n            $sortData[] = $sortValues;\n            $sortArguments[] = self::prepareSortVectorValues($sortValues);\n            $sortArguments[] = $sortOrder[$index] === self::ORDER_ASCENDING ? SORT_ASC : SORT_DESC;\n        }\n\n        $sortVector = self::executeVectorSortQuery($sortData, $sortArguments);\n\n        return self::sortLookupArrayFromVector($sortArray, $sortVector);\n    }\n\n    /**\n     * @param mixed[] $sortArray\n     * @param int[] $sortIndex\n     * @param int[] $sortOrder\n     *\n     * @return mixed[]\n     */\n    private static function sortByRow(array $sortArray, array $sortIndex, array $sortOrder): array\n    {\n        $sortVector = self::buildVectorForSort($sortArray, $sortIndex, $sortOrder);\n\n        return self::sortLookupArrayFromVector($sortArray, $sortVector);\n    }\n\n    /**\n     * @param mixed[] $sortArray\n     * @param int[] $sortIndex\n     * @param int[] $sortOrder\n     *\n     * @return mixed[]\n     */\n    private static function sortByColumn(array $sortArray, array $sortIndex, array $sortOrder): array\n    {\n        $sortArray = Matrix::transpose($sortArray);\n        $result = self::sortByRow($sortArray, $sortIndex, $sortOrder);\n\n        return Matrix::transpose($result);\n    }\n\n    /**\n     * @param mixed[] $sortArray\n     * @param int[] $sortIndex\n     * @param int[] $sortOrder\n     *\n     * @return mixed[]\n     */\n    private static function buildVectorForSort(array $sortArray, array $sortIndex, array $sortOrder): array\n    {\n        $sortArguments = [];\n        $sortData = [];\n        foreach ($sortIndex as $index => $sortIndexValue) {\n            $sortValues = array_column($sortArray, $sortIndexValue - 1);\n            $sortData[] = $sortValues;\n            $sortArguments[] = self::prepareSortVectorValues($sortValues);\n            $sortArguments[] = $sortOrder[$index] === self::ORDER_ASCENDING ? SORT_ASC : SORT_DESC;\n        }\n\n        $sortData = self::executeVectorSortQuery($sortData, $sortArguments);\n\n        return $sortData;\n    }\n\n    /**\n     * @param mixed[] $sortData\n     * @param mixed[] $sortArguments\n     *\n     * @return mixed[]\n     */\n    private static function executeVectorSortQuery(array $sortData, array $sortArguments): array\n    {\n        $sortData = Matrix::transpose($sortData);\n\n        // We need to set an index that can be retained, as array_multisort doesn't maintain numeric keys.\n        $sortDataIndexed = [];\n        foreach ($sortData as $key => $value) {\n            $sortDataIndexed[Coordinate::stringFromColumnIndex($key + 1)] = $value;\n        }\n        unset($sortData);\n\n        $sortArguments[] = &$sortDataIndexed;\n\n        array_multisort(...$sortArguments);\n\n        // After the sort, we restore the numeric keys that will now be in the correct, sorted order\n        $sortedData = [];\n        foreach (array_keys($sortDataIndexed) as $key) {\n            $sortedData[] = Coordinate::columnIndexFromString($key) - 1;\n        }\n\n        return $sortedData;\n    }\n\n    /**\n     * @param mixed[] $sortArray\n     * @param mixed[] $sortVector\n     *\n     * @return mixed[]\n     */\n    private static function sortLookupArrayFromVector(array $sortArray, array $sortVector): array\n    {\n        // Building a new array in the correct (sorted) order works; but may be memory heavy for larger arrays\n        $sortedArray = [];\n        foreach ($sortVector as $index) {\n            /** @var int|string $index */\n            $sortedArray[] = $sortArray[$index];\n        }\n\n        return $sortedArray;\n\n//        uksort(\n//            $lookupArray,\n//            function (int $a, int $b) use (array $sortVector) {\n//                return $sortVector[$a] <=> $sortVector[$b];\n//            }\n//        );\n//\n//        return $lookupArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/TorowTocol.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass TorowTocol\n{\n    /**\n     * Excel function TOCOL.\n     *\n     * @return mixed[]|string\n     */\n    public static function tocol(mixed $array, mixed $ignore = 0, mixed $byColumn = false): array|string\n    {\n        $result = self::torow($array, $ignore, $byColumn);\n        if (is_array($result)) {\n            return array_map((fn ($x) => [$x]), $result);\n        }\n\n        return $result;\n    }\n\n    /**\n     * Excel function TOROW.\n     *\n     * @return mixed[]|string\n     */\n    public static function torow(mixed $array, mixed $ignore = 0, mixed $byColumn = false): array|string\n    {\n        if (!is_numeric($ignore)) {\n            return ExcelError::VALUE();\n        }\n        $ignore = (int) $ignore;\n        if ($ignore < 0 || $ignore > 3) {\n            return ExcelError::VALUE();\n        }\n        if (is_int($byColumn) || is_float($byColumn)) {\n            $byColumn = (bool) $byColumn;\n        }\n        if (!is_bool($byColumn)) {\n            return ExcelError::VALUE();\n        }\n        if (!is_array($array)) {\n            $array = [$array];\n        }\n        if ($byColumn) {\n            $temp = [];\n            foreach ($array as $row) {\n                if (!is_array($row)) {\n                    $row = [$row];\n                }\n                $temp[] = Functions::flattenArray($row);\n            }\n            $array = ChooseRowsEtc::transpose($temp);\n        } else {\n            $array = Functions::flattenArray($array);\n        }\n\n        return self::byRow($array, $ignore);\n    }\n\n    /**\n     * @param mixed[] $array\n     *\n     * @return mixed[]\n     */\n    private static function byRow(array $array, int $ignore): array\n    {\n        $returnMatrix = [];\n        foreach ($array as $row) {\n            if (!is_array($row)) {\n                $row = [$row];\n            }\n            foreach ($row as $cell) {\n                if ($cell === null) {\n                    if ($ignore === 1 || $ignore === 3) {\n                        continue;\n                    }\n                    $cell = 0;\n                } elseif (ErrorValue::isError($cell, true)) {\n                    if ($ignore === 2 || $ignore === 3) {\n                        continue;\n                    }\n                }\n                $returnMatrix[] = $cell;\n            }\n        }\n\n        return $returnMatrix;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Unique.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Unique\n{\n    /**\n     * UNIQUE\n     * The UNIQUE function searches for value either from a one-row or one-column range or from an array.\n     *\n     * @param mixed $lookupVector The range of cells being searched\n     * @param mixed $byColumn Whether the uniqueness should be determined by row (the default) or by column\n     * @param mixed $exactlyOnce Whether the function should return only entries that occur just once in the list\n     *\n     * @return mixed The unique values from the search range\n     */\n    public static function unique(mixed $lookupVector, mixed $byColumn = false, mixed $exactlyOnce = false): mixed\n    {\n        if (!is_array($lookupVector)) {\n            // Scalars are always returned \"as is\"\n            return $lookupVector;\n        }\n\n        $byColumn = (bool) $byColumn;\n        $exactlyOnce = (bool) $exactlyOnce;\n\n        return ($byColumn === true)\n            ? self::uniqueByColumn($lookupVector, $exactlyOnce)\n            : self::uniqueByRow($lookupVector, $exactlyOnce);\n    }\n\n    /** @param mixed[] $lookupVector */\n    private static function uniqueByRow(array $lookupVector, bool $exactlyOnce): mixed\n    {\n        // When not $byColumn, we count whole rows or values, not individual values\n        //      so implode each row into a single string value\n        array_walk(\n            $lookupVector,\n            //* @phpstan-ignore-next-line\n            function (array &$value): void {\n                $valuex = '';\n                $separator = '';\n                $numericIndicator = \"\\x01\";\n                foreach ($value as $cellValue) {\n                    /** @var scalar $cellValue */\n                    $valuex .= $separator . $cellValue;\n                    $separator = \"\\x00\";\n                    if (is_int($cellValue) || is_float($cellValue)) {\n                        $valuex .= $numericIndicator;\n                    }\n                }\n                $value = $valuex;\n            }\n        );\n\n        /** @var string[] $lookupVector */\n        $result = self::countValuesCaseInsensitive($lookupVector);\n\n        if ($exactlyOnce === true) {\n            $result = self::exactlyOnceFilter($result);\n        }\n\n        if (count($result) === 0) {\n            return ExcelError::CALC();\n        }\n\n        $result = array_keys($result);\n\n        // restore rows from their strings\n        array_walk(\n            $result,\n            function (string &$value): void {\n                $value = explode(\"\\x00\", $value);\n                foreach ($value as &$stringValue) {\n                    if (str_ends_with($stringValue, \"\\x01\")) {\n                        // x01 should only end a string which is otherwise a float or int,\n                        // so phpstan is technically correct but what it fears should not happen.\n                        $stringValue = 0 + substr($stringValue, 0, -1); //@phpstan-ignore-line\n                    }\n                }\n            }\n        );\n\n        return (count($result) === 1) ? array_pop($result) : $result;\n    }\n\n    /** @param mixed[] $lookupVector */\n    private static function uniqueByColumn(array $lookupVector, bool $exactlyOnce): mixed\n    {\n        /** @var string[] */\n        $flattenedLookupVector = Functions::flattenArray($lookupVector);\n\n        if (count($lookupVector, COUNT_RECURSIVE) > count($flattenedLookupVector, COUNT_RECURSIVE) + 1) {\n            // We're looking at a full column check (multiple rows)\n            $transpose = Matrix::transpose($lookupVector);\n            $result = self::uniqueByRow($transpose, $exactlyOnce);\n\n            return (is_array($result)) ? Matrix::transpose($result) : $result;\n        }\n\n        $result = self::countValuesCaseInsensitive($flattenedLookupVector);\n\n        if ($exactlyOnce === true) {\n            $result = self::exactlyOnceFilter($result);\n        }\n\n        if (count($result) === 0) {\n            return ExcelError::CALC();\n        }\n\n        $result = array_keys($result);\n\n        return $result;\n    }\n\n    /**\n     * @param string[] $caseSensitiveLookupValues\n     *\n     * @return mixed[]\n     */\n    private static function countValuesCaseInsensitive(array $caseSensitiveLookupValues): array\n    {\n        $caseInsensitiveCounts = array_count_values(\n            array_map(\n                fn (string $value): string => StringHelper::strToUpper($value),\n                $caseSensitiveLookupValues\n            )\n        );\n\n        $caseSensitiveCounts = [];\n        foreach ($caseInsensitiveCounts as $caseInsensitiveKey => $count) {\n            if (is_numeric($caseInsensitiveKey)) {\n                $caseSensitiveCounts[$caseInsensitiveKey] = $count;\n            } else {\n                foreach ($caseSensitiveLookupValues as $caseSensitiveValue) {\n                    if ($caseInsensitiveKey === StringHelper::strToUpper($caseSensitiveValue)) {\n                        $caseSensitiveCounts[$caseSensitiveValue] = $count;\n\n                        break;\n                    }\n                }\n            }\n        }\n\n        return $caseSensitiveCounts;\n    }\n\n    /**\n     * @param mixed[] $values\n     *\n     * @return mixed[]\n     */\n    private static function exactlyOnceFilter(array $values): array\n    {\n        return array_filter(\n            $values,\n            fn ($value): bool => $value === 1\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass VLookup extends LookupBase\n{\n    use ArrayEnabled;\n\n    /**\n     * VLOOKUP\n     * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value\n     *     in the same row based on the index_number.\n     *\n     * @param mixed $lookupValue The value that you want to match in lookup_array\n     * @param mixed[] $lookupArray The range of cells being searched\n     * @param array<mixed>|float|int|string $indexNumber The column number in table_array from which the matching value must be returned.\n     *                                The first column is 1.\n     * @param mixed $notExactMatch determines if you are looking for an exact match based on lookup_value\n     *\n     * @return mixed The value of the found cell\n     */\n    public static function lookup(mixed $lookupValue, $lookupArray, mixed $indexNumber, mixed $notExactMatch = true): mixed\n    {\n        if (is_array($lookupValue) || is_array($indexNumber)) {\n            return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $lookupValue, $lookupArray, $indexNumber, $notExactMatch);\n        }\n\n        $notExactMatch = (bool) ($notExactMatch ?? true);\n\n        try {\n            self::validateLookupArray($lookupArray);\n            $indexNumber = self::validateIndexLookup($lookupArray, $indexNumber);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $f = array_keys($lookupArray);\n        $firstRow = array_pop($f);\n        if ((!is_array($lookupArray[$firstRow])) || ($indexNumber > count($lookupArray[$firstRow]))) {\n            return ExcelError::REF();\n        }\n        $columnKeys = array_keys($lookupArray[$firstRow]);\n        $returnColumn = $columnKeys[--$indexNumber];\n        $firstColumn = array_shift($columnKeys) ?? 1;\n\n        if (!$notExactMatch) {\n            /** @var callable $callable */\n            $callable = [self::class, 'vlookupSort'];\n            uasort($lookupArray, $callable);\n        }\n\n        /** @var string[][] $lookupArray */\n        $rowNumber = self::vLookupSearch($lookupValue, $lookupArray, $firstColumn, $notExactMatch);\n\n        if ($rowNumber !== null) {\n            // return the appropriate value\n            return $lookupArray[$rowNumber][$returnColumn];\n        }\n\n        return ExcelError::NA();\n    }\n\n    /**\n     * @param scalar[] $a\n     * @param scalar[] $b\n     */\n    private static function vlookupSort(array $a, array $b): int\n    {\n        reset($a);\n        $firstColumn = key($a);\n        $aLower = StringHelper::strToLower((string) $a[$firstColumn]);\n        $bLower = StringHelper::strToLower((string) $b[$firstColumn]);\n\n        if ($aLower == $bLower) {\n            return 0;\n        }\n\n        return ($aLower < $bLower) ? -1 : 1;\n    }\n\n    /**\n     * @param mixed $lookupValue The value that you want to match in lookup_array\n     * @param string[][] $lookupArray\n     * @param  int|string $column\n     */\n    private static function vLookupSearch(mixed $lookupValue, array $lookupArray, $column, bool $notExactMatch): ?int\n    {\n        $lookupLower = StringHelper::strToLower(StringHelper::convertToString($lookupValue));\n\n        $rowNumber = null;\n        foreach ($lookupArray as $rowKey => $rowData) {\n            $bothNumeric = self::numeric($lookupValue) && self::numeric($rowData[$column]);\n            $bothNotNumeric = !self::numeric($lookupValue) && !self::numeric($rowData[$column]);\n            $cellDataLower = StringHelper::strToLower((string) $rowData[$column]);\n\n            // break if we have passed possible keys\n            if (\n                $notExactMatch\n                && (($bothNumeric && ($rowData[$column] > $lookupValue))\n                || ($bothNotNumeric && ($cellDataLower > $lookupLower)))\n            ) {\n                break;\n            }\n\n            $rowNumber = self::checkMatch(\n                $bothNumeric,\n                $bothNotNumeric,\n                $notExactMatch,\n                $rowKey,\n                $cellDataLower,\n                $lookupLower,\n                $rowNumber\n            );\n        }\n\n        return $rowNumber;\n    }\n\n    private static function numeric(mixed $value): bool\n    {\n        return is_int($value) || is_float($value);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/LookupRef/Vstack.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Vstack\n{\n    /**\n     * Excel function VSTACK.\n     *\n     * @return mixed[]\n     */\n    public static function vstack(mixed ...$inputData): array|string\n    {\n        $returnMatrix = [];\n\n        $columns = 0;\n        foreach ($inputData as $matrix) {\n            if (!is_array($matrix)) {\n                $count = 1;\n            } else {\n                $count = count(reset($matrix)); //* @phpstan-ignore-line\n            }\n            $columns = max($columns, $count);\n        }\n\n        foreach ($inputData as $matrix) {\n            if (!is_array($matrix)) {\n                $matrix = [$matrix];\n            }\n            foreach ($matrix as $row) {\n                if (!is_array($row)) {\n                    $row = [$row];\n                }\n                $returnMatrix[] = array_values(array_pad($row, $columns, ExcelError::NA()));\n            }\n        }\n\n        return $returnMatrix;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Absolute\n{\n    use ArrayEnabled;\n\n    /**\n     * ABS.\n     *\n     * Returns the result of builtin function abs after validating args.\n     *\n     * @param mixed $number Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|int|string rounded number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function evaluate(mixed $number): array|string|int|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return abs($number);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Angle.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Angle\n{\n    use ArrayEnabled;\n\n    /**\n     * DEGREES.\n     *\n     * Returns the result of builtin function rad2deg after validating args.\n     *\n     * @param mixed $number Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Rounded number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toDegrees(mixed $number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return rad2deg($number);\n    }\n\n    /**\n     * RADIANS.\n     *\n     * Returns the result of builtin function deg2rad after validating args.\n     *\n     * @param mixed $number Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Rounded number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function toRadians(mixed $number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return deg2rad($number);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Arabic\n{\n    use ArrayEnabled;\n\n    private const ROMAN_LOOKUP = [\n        'M' => 1000,\n        'D' => 500,\n        'C' => 100,\n        'L' => 50,\n        'X' => 10,\n        'V' => 5,\n        'I' => 1,\n    ];\n\n    /**\n     * Recursively calculate the arabic value of a roman numeral.\n     *\n     * @param string[] $roman\n     */\n    private static function calculateArabic(array $roman, int &$sum = 0, int $subtract = 0): int\n    {\n        $numeral = array_shift($roman);\n        if (!isset(self::ROMAN_LOOKUP[$numeral])) {\n            throw new Exception('Invalid character detected');\n        }\n\n        $arabic = self::ROMAN_LOOKUP[$numeral];\n        if (count($roman) > 0 && isset(self::ROMAN_LOOKUP[$roman[0]]) && $arabic < self::ROMAN_LOOKUP[$roman[0]]) {\n            $subtract += $arabic;\n        } else {\n            $sum += ($arabic - $subtract);\n            $subtract = 0;\n        }\n\n        if (count($roman) > 0) {\n            self::calculateArabic($roman, $sum, $subtract);\n        }\n\n        return $sum;\n    }\n\n    /**\n     * ARABIC.\n     *\n     * Converts a Roman numeral to an Arabic numeral.\n     *\n     * Excel Function:\n     *        ARABIC(text)\n     *\n     * @param string|string[] $roman Should be a string, or can be an array of strings\n     *\n     * @return array<mixed>|int|string the arabic numeral contrived from the roman numeral\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function evaluate(mixed $roman): array|int|string\n    {\n        if (is_array($roman)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $roman);\n        }\n\n        // An empty string should return 0\n        $roman = substr(trim(strtoupper((string) $roman)), 0, 255);\n        if ($roman === '') {\n            return 0;\n        }\n\n        // Convert the roman numeral to an arabic number\n        $negativeNumber = $roman[0] === '-';\n        if ($negativeNumber) {\n            $roman = trim(substr($roman, 1));\n            if ($roman === '') {\n                return ExcelError::NAN();\n            }\n        }\n\n        try {\n            $arabic = self::calculateArabic(mb_str_split($roman, 1, 'UTF-8'));\n        } catch (Exception) {\n            return ExcelError::VALUE(); // Invalid character detected\n        }\n\n        if ($negativeNumber) {\n            $arabic *= -1; // The number should be negative\n        }\n\n        return $arabic;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Base.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Base\n{\n    use ArrayEnabled;\n\n    /**\n     * BASE.\n     *\n     * Converts a number into a text representation with the given radix (base).\n     *\n     * Excel Function:\n     *        BASE(Number, Radix [Min_length])\n     *\n     * @param mixed $number expect float\n     *                      Or can be an array of values\n     * @param mixed $radix expect float\n     *                      Or can be an array of values\n     * @param mixed $minLength expect int or null\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|string the text representation with the given radix (base)\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function evaluate(mixed $number, mixed $radix, mixed $minLength = null): array|string\n    {\n        if (is_array($number) || is_array($radix) || is_array($minLength)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $radix, $minLength);\n        }\n\n        try {\n            $number = (float) floor(Helpers::validateNumericNullBool($number));\n            $radix = (int) Helpers::validateNumericNullBool($radix);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return self::calculate($number, $radix, $minLength);\n    }\n\n    private static function calculate(float $number, int $radix, mixed $minLength): string\n    {\n        if ($minLength === null || is_numeric($minLength)) {\n            if ($number < 0 || $number >= 2 ** 53 || $radix < 2 || $radix > 36) {\n                return ExcelError::NAN(); // Numeric range constraints\n            }\n\n            $outcome = strtoupper((string) base_convert(\"$number\", 10, $radix));\n            if ($minLength !== null) {\n                $outcome = str_pad($outcome, (int) $minLength, '0', STR_PAD_LEFT); // String padding\n            }\n\n            return $outcome;\n        }\n\n        return ExcelError::VALUE();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Ceiling\n{\n    use ArrayEnabled;\n\n    /**\n     * CEILING.\n     *\n     * Returns number rounded up, away from zero, to the nearest multiple of significance.\n     *        For example, if you want to avoid using pennies in your prices and your product is\n     *        priced at $4.42, use the formula =CEILING(4.42,0.05) to round prices up to the\n     *        nearest nickel.\n     *\n     * Excel Function:\n     *        CEILING(number[,significance])\n     *\n     * @param array<mixed>|float $number the number you want the ceiling\n     *                      Or can be an array of values\n     * @param array<mixed>|float $significance the multiple to which you want to round\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function ceiling($number, $significance = null)\n    {\n        if (is_array($number) || is_array($significance)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance);\n        }\n\n        if ($significance === null) {\n            self::floorCheck1Arg();\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $significance = Helpers::validateNumericNullSubstitution($significance, ($number < 0) ? -1 : 1);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return self::argumentsOk((float) $number, (float) $significance);\n    }\n\n    /**\n     * CEILING.MATH.\n     *\n     * Round a number down to the nearest integer or to the nearest multiple of significance.\n     *\n     * Excel Function:\n     *        CEILING.MATH(number[,significance[,mode]])\n     *\n     * @param mixed $number Number to round\n     *                      Or can be an array of values\n     * @param mixed $significance Significance\n     *                      Or can be an array of values\n     * @param array<mixed>|int $mode direction to round negative numbers\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function math(mixed $number, mixed $significance = null, $mode = 0, bool $checkSigns = false): array|string|float\n    {\n        if (is_array($number) || is_array($significance) || is_array($mode)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance, $mode);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $significance = Helpers::validateNumericNullSubstitution($significance, ($number < 0) ? -1 : 1);\n            $mode = Helpers::validateNumericNullSubstitution($mode, null);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (empty($significance * $number)) {\n            return 0.0;\n        }\n        if ($checkSigns) {\n            if (($number > 0 && $significance < 0) || ($number < 0 && $significance > 0)) {\n                return ExcelError::NAN();\n            }\n        }\n        if (self::ceilingMathTest((float) $significance, (float) $number, (int) $mode)) {\n            return floor($number / $significance) * $significance;\n        }\n\n        return ceil($number / $significance) * $significance;\n    }\n\n    /**\n     * CEILING.PRECISE.\n     *\n     * Rounds number up, away from zero, to the nearest multiple of significance.\n     *\n     * Excel Function:\n     *        CEILING.PRECISE(number[,significance])\n     *\n     * @param mixed $number the number you want to round\n     *                      Or can be an array of values\n     * @param array<mixed>|float $significance the multiple to which you want to round\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function precise(mixed $number, $significance = 1): array|string|float\n    {\n        if (is_array($number) || is_array($significance)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $significance = Helpers::validateNumericNullSubstitution($significance, null);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (!$significance) {\n            return 0.0;\n        }\n        $result = $number / abs($significance);\n\n        return ceil($result) * $significance * (($significance < 0) ? -1 : 1);\n    }\n\n    /**\n     * CEILING.ODS, pseudo-function - CEILING as implemented in ODS.\n     *\n     * ODS Function (theoretical):\n     *        CEILING.ODS(number[,significance[,mode]])\n     *\n     * @param mixed $number Number to round\n     * @param mixed $significance Significance\n     * @param array<mixed>|int $mode direction to round negative numbers\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     */\n    public static function mathOds(mixed $number, mixed $significance = null, $mode = 0): array|string|float\n    {\n        return self::math($number, $significance, $mode, true);\n    }\n\n    /**\n     * Let CEILINGMATH complexity pass Scrutinizer.\n     */\n    private static function ceilingMathTest(float $significance, float $number, int $mode): bool\n    {\n        return ($significance < 0) || ($number < 0 && !empty($mode));\n    }\n\n    /**\n     * Avoid Scrutinizer problems concerning complexity.\n     */\n    private static function argumentsOk(float $number, float $significance): float|string\n    {\n        if (empty($number * $significance)) {\n            return 0.0;\n        }\n        $signSig = Helpers::returnSign($significance);\n        $signNum = Helpers::returnSign($number);\n        if (\n            ($signSig === 1 && ($signNum === 1 || Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_GNUMERIC))\n            || ($signSig === -1 && $signNum === -1)\n        ) {\n            return ceil($number / $significance) * $significance;\n        }\n\n        return ExcelError::NAN();\n    }\n\n    private static function floorCheck1Arg(): void\n    {\n        $compatibility = Functions::getCompatibilityMode();\n        if ($compatibility === Functions::COMPATIBILITY_EXCEL) {\n            throw new Exception('Excel requires 2 arguments for CEILING');\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Combinations\n{\n    use ArrayEnabled;\n\n    /**\n     * COMBIN.\n     *\n     * Returns the number of combinations for a given number of items. Use COMBIN to\n     *        determine the total possible number of groups for a given number of items.\n     *\n     * Excel Function:\n     *        COMBIN(numObjs,numInSet)\n     *\n     * @param mixed $numObjs Number of different objects, or can be an array of numbers\n     * @param mixed $numInSet Number of objects in each combination, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Number of combinations, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function withoutRepetition(mixed $numObjs, mixed $numInSet): array|string|float\n    {\n        if (is_array($numObjs) || is_array($numInSet)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $numObjs, $numInSet);\n        }\n\n        try {\n            $numObjs = Helpers::validateNumericNullSubstitution($numObjs, null);\n            $numInSet = Helpers::validateNumericNullSubstitution($numInSet, null);\n            Helpers::validateNotNegative($numInSet);\n            Helpers::validateNotNegative($numObjs - $numInSet);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        /** @var float */\n        $quotient = Factorial::fact($numObjs);\n        /** @var float */\n        $divisor1 = Factorial::fact($numObjs - $numInSet);\n        /** @var float */\n        $divisor2 = Factorial::fact($numInSet);\n\n        return round($quotient / ($divisor1 * $divisor2));\n    }\n\n    /**\n     * COMBINA.\n     *\n     * Returns the number of combinations for a given number of items. Use COMBIN to\n     *        determine the total possible number of groups for a given number of items.\n     *\n     * Excel Function:\n     *        COMBINA(numObjs,numInSet)\n     *\n     * @param mixed $numObjs Number of different objects, or can be an array of numbers\n     * @param mixed $numInSet Number of objects in each combination, or can be an array of numbers\n     *\n     * @return array<mixed>|float|int|string Number of combinations, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function withRepetition(mixed $numObjs, mixed $numInSet): array|int|string|float\n    {\n        if (is_array($numObjs) || is_array($numInSet)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $numObjs, $numInSet);\n        }\n\n        try {\n            $numObjs = Helpers::validateNumericNullSubstitution($numObjs, null);\n            $numInSet = Helpers::validateNumericNullSubstitution($numInSet, null);\n            Helpers::validateNotNegative($numInSet);\n            Helpers::validateNotNegative($numObjs);\n            $numObjs = (int) $numObjs;\n            $numInSet = (int) $numInSet;\n            // Microsoft documentation says following is true, but Excel\n            //  does not enforce this restriction.\n            //Helpers::validateNotNegative($numObjs - $numInSet);\n            if ($numObjs === 0) {\n                Helpers::validateNotNegative(-$numInSet);\n\n                return 1;\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        /** @var float */\n        $quotient = Factorial::fact($numObjs + $numInSet - 1);\n        /** @var float */\n        $divisor1 = Factorial::fact($numObjs - 1);\n        /** @var float */\n        $divisor2 = Factorial::fact($numInSet);\n\n        return round($quotient / ($divisor1 * $divisor2));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Exp.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Exp\n{\n    use ArrayEnabled;\n\n    /**\n     * EXP.\n     *\n     * Returns the result of builtin function exp after validating args.\n     *\n     * @param mixed $number Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Rounded number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function evaluate(mixed $number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return exp($number);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nclass Factorial\n{\n    use ArrayEnabled;\n\n    /**\n     * FACT.\n     *\n     * Returns the factorial of a number.\n     * The factorial of a number is equal to 1*2*3*...* number.\n     *\n     * Excel Function:\n     *        FACT(factVal)\n     *\n     * @param array<mixed>|float $factVal Factorial Value, or can be an array of numbers\n     *\n     * @return array<mixed>|float|int|string Factorial, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function fact($factVal): array|string|float|int\n    {\n        if (is_array($factVal)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $factVal);\n        }\n\n        try {\n            $factVal = Helpers::validateNumericNullBool($factVal);\n            Helpers::validateNotNegative($factVal);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $factLoop = floor($factVal);\n        if ($factVal > $factLoop) {\n            if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {\n                return Statistical\\Distributions\\Gamma::gammaValue($factVal + 1);\n            }\n        }\n\n        $factorial = 1;\n        while ($factLoop > 1) {\n            $factorial *= $factLoop--;\n        }\n\n        return $factorial;\n    }\n\n    /**\n     * FACTDOUBLE.\n     *\n     * Returns the double factorial of a number.\n     *\n     * Excel Function:\n     *        FACTDOUBLE(factVal)\n     *\n     * @param array<mixed>|float $factVal Factorial Value, or can be an array of numbers\n     *\n     * @return array<mixed>|float|int|string Double Factorial, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function factDouble($factVal): array|string|float|int\n    {\n        if (is_array($factVal)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $factVal);\n        }\n\n        try {\n            $factVal = Helpers::validateNumericNullSubstitution($factVal, 0);\n            Helpers::validateNotNegative($factVal);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $factLoop = floor($factVal);\n        $factorial = 1;\n        while ($factLoop > 1) {\n            $factorial *= $factLoop;\n            $factLoop -= 2;\n        }\n\n        return $factorial;\n    }\n\n    /**\n     * MULTINOMIAL.\n     *\n     * Returns the ratio of the factorial of a sum of values to the product of factorials.\n     *\n     * @param mixed[] $args An array of mixed values for the Data Series\n     *\n     * @return float|int|string The result, or a string containing an error\n     */\n    public static function multinomial(...$args): string|int|float\n    {\n        $summer = 0;\n        $divisor = 1;\n\n        try {\n            // Loop through arguments\n            foreach (Functions::flattenArray($args) as $argx) {\n                $arg = Helpers::validateNumericNullSubstitution($argx, null);\n                Helpers::validateNotNegative($arg);\n                $arg = (int) $arg;\n                $summer += $arg;\n                /** @var float|int */\n                $temp = self::fact($arg);\n                $divisor *= $temp;\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $summer = self::fact($summer);\n\n        return is_numeric($summer) ? ($summer / $divisor) : ExcelError::VALUE();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Floor.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Floor\n{\n    use ArrayEnabled;\n\n    private static function floorCheck1Arg(): void\n    {\n        $compatibility = Functions::getCompatibilityMode();\n        if ($compatibility === Functions::COMPATIBILITY_EXCEL) {\n            throw new Exception('Excel requires 2 arguments for FLOOR');\n        }\n    }\n\n    /**\n     * FLOOR.\n     *\n     * Rounds number down, toward zero, to the nearest multiple of significance.\n     *\n     * Excel Function:\n     *        FLOOR(number[,significance])\n     *\n     * @param mixed $number Expect float. Number to round\n     *                      Or can be an array of values\n     * @param mixed $significance Expect float. Significance\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function floor(mixed $number, mixed $significance = null)\n    {\n        if (is_array($number) || is_array($significance)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance);\n        }\n\n        if ($significance === null) {\n            self::floorCheck1Arg();\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $significance = Helpers::validateNumericNullSubstitution($significance, ($number < 0) ? -1 : 1);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return self::argumentsOk((float) $number, (float) $significance);\n    }\n\n    /**\n     * FLOOR.MATH.\n     *\n     * Round a number down to the nearest integer or to the nearest multiple of significance.\n     *\n     * Excel Function:\n     *        FLOOR.MATH(number[,significance[,mode]])\n     *\n     * @param mixed $number Number to round\n     *                      Or can be an array of values\n     * @param mixed $significance Significance\n     *                      Or can be an array of values\n     * @param mixed $mode direction to round negative numbers\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function math(mixed $number, mixed $significance = null, mixed $mode = 0, bool $checkSigns = false)\n    {\n        if (is_array($number) || is_array($significance) || is_array($mode)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance, $mode);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $significance = Helpers::validateNumericNullSubstitution($significance, ($number < 0) ? -1 : 1);\n            $mode = Helpers::validateNumericNullSubstitution($mode, null);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (empty($significance * $number)) {\n            return 0.0;\n        }\n        if ($checkSigns) {\n            if (($number > 0 && $significance < 0) || ($number < 0 && $significance > 0)) {\n                return ExcelError::NAN();\n            }\n        }\n\n        return self::argsOk((float) $number, (float) $significance, (int) $mode);\n    }\n\n    /**\n     * FLOOR.ODS, pseudo-function - FLOOR as implemented in ODS.\n     *\n     * Round a number down to the nearest integer or to the nearest multiple of significance.\n     *\n     * ODS Function (theoretical):\n     *        FLOOR.ODS(number[,significance[,mode]])\n     *\n     * @param mixed $number Number to round\n     * @param mixed $significance Significance\n     * @param array<mixed>|int $mode direction to round negative numbers\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     */\n    public static function mathOds(mixed $number, mixed $significance = null, mixed $mode = 0)\n    {\n        return self::math($number, $significance, $mode, true);\n    }\n\n    /**\n     * FLOOR.PRECISE.\n     *\n     * Rounds number down, toward zero, to the nearest multiple of significance.\n     *\n     * Excel Function:\n     *        FLOOR.PRECISE(number[,significance])\n     *\n     * @param array<mixed>|float $number Number to round\n     *                      Or can be an array of values\n     * @param array<mixed>|float $significance Significance\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function precise($number, $significance = 1)\n    {\n        if (is_array($number) || is_array($significance)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $significance = Helpers::validateNumericNullSubstitution($significance, null);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n        if (!$significance) {\n            return 0.0;\n        }\n\n        return self::argumentsOkPrecise((float) $number, (float) $significance);\n    }\n\n    /**\n     * Avoid Scrutinizer problems concerning complexity.\n     */\n    private static function argumentsOkPrecise(float $number, float $significance): string|float\n    {\n        if ($significance == 0.0) {\n            return ExcelError::DIV0();\n        }\n        if ($number == 0.0) {\n            return 0.0;\n        }\n\n        return floor($number / abs($significance)) * abs($significance);\n    }\n\n    /**\n     * Avoid Scrutinizer complexity problems.\n     *\n     * @return float|string Rounded Number, or a string containing an error\n     */\n    private static function argsOk(float $number, float $significance, int $mode): string|float\n    {\n        if (!$significance) {\n            return ExcelError::DIV0();\n        }\n        if (!$number) {\n            return 0.0;\n        }\n        if (self::floorMathTest($number, $significance, $mode)) {\n            return ceil($number / $significance) * $significance;\n        }\n\n        return floor($number / $significance) * $significance;\n    }\n\n    /**\n     * Let FLOORMATH complexity pass Scrutinizer.\n     */\n    private static function floorMathTest(float $number, float $significance, int $mode): bool\n    {\n        return Helpers::returnSign($significance) == -1 || (Helpers::returnSign($number) == -1 && !empty($mode));\n    }\n\n    /**\n     * Avoid Scrutinizer problems concerning complexity.\n     */\n    private static function argumentsOk(float $number, float $significance): string|float\n    {\n        if ($significance == 0.0) {\n            return ExcelError::DIV0();\n        }\n        if ($number == 0.0) {\n            return 0.0;\n        }\n        $signSig = Helpers::returnSign($significance);\n        $signNum = Helpers::returnSign($number);\n        if (\n            ($signSig === 1 && ($signNum === 1 || Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_GNUMERIC))\n            || ($signNum === -1 && $signSig === -1)\n        ) {\n            return floor($number / $significance) * $significance;\n        }\n\n        return ExcelError::NAN();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Gcd.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Gcd\n{\n    /**\n     * Recursively determine GCD.\n     *\n     * Returns the greatest common divisor of a series of numbers.\n     * The greatest common divisor is the largest integer that divides both\n     *        number1 and number2 without a remainder.\n     *\n     * Excel Function:\n     *        GCD(number1[,number2[, ...]])\n     */\n    private static function evaluateGCD(float|int $a, float|int $b): float|int\n    {\n        return $b ? self::evaluateGCD($b, $a % $b) : $a;\n    }\n\n    /**\n     * GCD.\n     *\n     * Returns the greatest common divisor of a series of numbers.\n     * The greatest common divisor is the largest integer that divides both\n     *        number1 and number2 without a remainder.\n     *\n     * Excel Function:\n     *        GCD(number1[,number2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|int|string Greatest Common Divisor, or a string containing an error\n     */\n    public static function evaluate(mixed ...$args)\n    {\n        try {\n            $arrayArgs = [];\n            foreach (Functions::flattenArray($args) as $value1) {\n                if ($value1 !== null) {\n                    $value = Helpers::validateNumericNullSubstitution($value1, 1);\n                    Helpers::validateNotNegative($value);\n                    $arrayArgs[] = (int) $value;\n                }\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (count($arrayArgs) <= 0) {\n            return ExcelError::VALUE();\n        }\n        $gcd = (int) array_pop($arrayArgs);\n        do {\n            $gcd = self::evaluateGCD($gcd, (int) array_pop($arrayArgs));\n        } while (!empty($arrayArgs));\n\n        return $gcd;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Helpers.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Helpers\n{\n    /**\n     * Many functions accept null/false/true argument treated as 0/0/1.\n     *\n     * @return float|string quotient or DIV0 if denominator is too small\n     */\n    public static function verySmallDenominator(float $numerator, float $denominator): string|float\n    {\n        return (abs($denominator) < 1.0E-12) ? ExcelError::DIV0() : ($numerator / $denominator);\n    }\n\n    /**\n     * Many functions accept null/false/true argument treated as 0/0/1.\n     */\n    public static function validateNumericNullBool(mixed $number): int|float\n    {\n        $number = Functions::flattenSingleValue($number);\n        if ($number === null) {\n            return 0;\n        }\n        if (is_bool($number)) {\n            return (int) $number;\n        }\n        if (is_numeric($number)) {\n            return 0 + $number;\n        }\n\n        throw new Exception(ExcelError::throwError($number));\n    }\n\n    /**\n     * Validate numeric, but allow substitute for null.\n     */\n    public static function validateNumericNullSubstitution(mixed $number, null|float|int $substitute): float|int\n    {\n        $number = Functions::flattenSingleValue($number);\n        if ($number === null && $substitute !== null) {\n            return $substitute;\n        }\n        if (is_numeric($number)) {\n            return 0 + $number;\n        }\n\n        throw new Exception(ExcelError::throwError($number));\n    }\n\n    /**\n     * Confirm number >= 0.\n     */\n    public static function validateNotNegative(float|int $number, ?string $except = null): void\n    {\n        if ($number >= 0) {\n            return;\n        }\n\n        throw new Exception($except ?? ExcelError::NAN());\n    }\n\n    /**\n     * Confirm number > 0.\n     */\n    public static function validatePositive(float|int $number, ?string $except = null): void\n    {\n        if ($number > 0) {\n            return;\n        }\n\n        throw new Exception($except ?? ExcelError::NAN());\n    }\n\n    /**\n     * Confirm number != 0.\n     */\n    public static function validateNotZero(float|int $number): void\n    {\n        if ($number) {\n            return;\n        }\n\n        throw new Exception(ExcelError::DIV0());\n    }\n\n    public static function returnSign(float $number): int\n    {\n        return $number ? (($number > 0) ? 1 : -1) : 0;\n    }\n\n    public static function getEven(float $number): float\n    {\n        $significance = 2 * self::returnSign($number);\n\n        return $significance ? (ceil($number / $significance) * $significance) : 0;\n    }\n\n    /**\n     * Return NAN or value depending on argument.\n     */\n    public static function numberOrNan(float $result): float|string\n    {\n        return is_nan($result) ? ExcelError::NAN() : $result;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/IntClass.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass IntClass\n{\n    use ArrayEnabled;\n\n    /**\n     * INT.\n     *\n     * Casts a floating point value to an integer\n     *\n     * Excel Function:\n     *        INT(number)\n     *\n     * @param array<mixed>|float $number Number to cast to an integer, or can be an array of numbers\n     *\n     * @return array<mixed>|int|string Integer value, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function evaluate($number): array|string|int\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return (int) floor($number);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Lcm.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Lcm\n{\n    /**\n     *  Private method to return an array of the factors of the input value.\n     *\n     * @return int[]\n     */\n    private static function factors(float $value): array\n    {\n        $startVal = floor(sqrt($value));\n\n        $factorArray = [];\n        for ($i = $startVal; $i > 1; --$i) {\n            if (($value % $i) == 0) {\n                $factorArray = array_merge($factorArray, self::factors($value / $i));\n                $factorArray = array_merge($factorArray, self::factors($i));\n                if ($i <= sqrt($value)) {\n                    break;\n                }\n            }\n        }\n        if (!empty($factorArray)) {\n            rsort($factorArray);\n            /** @var int[] $factorArray */\n\n            return $factorArray;\n        }\n\n        return [(int) $value];\n    }\n\n    /**\n     * LCM.\n     *\n     * Returns the lowest common multiplier of a series of numbers\n     * The least common multiple is the smallest positive integer that is a multiple\n     * of all integer arguments number1, number2, and so on. Use LCM to add fractions\n     * with different denominators.\n     *\n     * Excel Function:\n     *        LCM(number1[,number2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return int|string Lowest Common Multiplier, or a string containing an error\n     */\n    public static function evaluate(mixed ...$args): int|string\n    {\n        try {\n            $arrayArgs = [];\n            $anyZeros = 0;\n            $anyNonNulls = 0;\n            foreach (Functions::flattenArray($args) as $value1) {\n                $anyNonNulls += (int) ($value1 !== null);\n                $value = Helpers::validateNumericNullSubstitution($value1, 1);\n                Helpers::validateNotNegative($value);\n                $arrayArgs[] = (int) $value;\n                $anyZeros += (int) !((bool) $value);\n            }\n            self::testNonNulls($anyNonNulls);\n            if ($anyZeros) {\n                return 0;\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $returnValue = 1;\n        $allPoweredFactors = [];\n        // Loop through arguments\n        foreach ($arrayArgs as $value) {\n            $myFactors = self::factors(floor($value));\n            $myCountedFactors = array_count_values($myFactors);\n            $myPoweredFactors = [];\n            foreach ($myCountedFactors as $myCountedFactor => $myCountedPower) {\n                $myPoweredFactors[$myCountedFactor] = $myCountedFactor ** $myCountedPower;\n            }\n            self::processPoweredFactors($allPoweredFactors, $myPoweredFactors);\n        }\n        foreach ($allPoweredFactors as $allPoweredFactor) {\n            /** @var scalar $allPoweredFactor */\n            $returnValue *= (int) $allPoweredFactor;\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * @param mixed[] $allPoweredFactors\n     * @param mixed[] $myPoweredFactors\n     */\n    private static function processPoweredFactors(array &$allPoweredFactors, array &$myPoweredFactors): void\n    {\n        foreach ($myPoweredFactors as $myPoweredValue => $myPoweredFactor) {\n            if (isset($allPoweredFactors[$myPoweredValue])) {\n                if ($allPoweredFactors[$myPoweredValue] < $myPoweredFactor) {\n                    $allPoweredFactors[$myPoweredValue] = $myPoweredFactor;\n                }\n            } else {\n                $allPoweredFactors[$myPoweredValue] = $myPoweredFactor;\n            }\n        }\n    }\n\n    private static function testNonNulls(int $anyNonNulls): void\n    {\n        if (!$anyNonNulls) {\n            throw new Exception(ExcelError::VALUE());\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Logarithms\n{\n    use ArrayEnabled;\n\n    /**\n     * LOG_BASE.\n     *\n     * Returns the logarithm of a number to a specified base. The default base is 10.\n     *\n     * Excel Function:\n     *        LOG(number[,base])\n     *\n     * @param mixed $number The positive real number for which you want the logarithm\n     *                      Or can be an array of values\n     * @param mixed $base The base of the logarithm. If base is omitted, it is assumed to be 10.\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function withBase(mixed $number, mixed $base = 10): array|string|float\n    {\n        if (is_array($number) || is_array($base)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $base);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            Helpers::validatePositive($number);\n            $base = Helpers::validateNumericNullBool($base);\n            Helpers::validatePositive($base);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return log($number, $base);\n    }\n\n    /**\n     * LOG10.\n     *\n     * Returns the result of builtin function log after validating args.\n     *\n     * @param mixed $number Should be numeric\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Rounded number\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function base10(mixed $number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            Helpers::validatePositive($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return log10($number);\n    }\n\n    /**\n     * LN.\n     *\n     * Returns the result of builtin function log after validating args.\n     *\n     * @param mixed $number Should be numeric\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Rounded number\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function natural(mixed $number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            Helpers::validatePositive($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return log($number);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse Matrix\\Builder;\nuse Matrix\\Div0Exception as MatrixDiv0Exception;\nuse Matrix\\Exception as MatrixException;\nuse Matrix\\Matrix;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass MatrixFunctions\n{\n    /**\n     * Convert parameter to Matrix.\n     *\n     * @param mixed $matrixValues A matrix of values\n     */\n    private static function getMatrix(mixed $matrixValues): Matrix\n    {\n        $matrixData = [];\n        if (!is_array($matrixValues)) {\n            $matrixValues = [[$matrixValues]];\n        }\n\n        $row = 0;\n        foreach ($matrixValues as $matrixRow) {\n            if (!is_array($matrixRow)) {\n                $matrixRow = [$matrixRow];\n            }\n            $column = 0;\n            foreach ($matrixRow as $matrixCell) {\n                if ((is_string($matrixCell)) || ($matrixCell === null)) {\n                    throw new Exception(ExcelError::VALUE());\n                }\n                $matrixData[$row][$column] = $matrixCell;\n                ++$column;\n            }\n            ++$row;\n        }\n\n        return new Matrix($matrixData);\n    }\n\n    /**\n     * SEQUENCE.\n     *\n     * Generates a list of sequential numbers in an array.\n     *\n     * Excel Function:\n     *      SEQUENCE(rows,[columns],[start],[step])\n     *\n     * @param mixed $rows the number of rows to return, defaults to 1\n     * @param mixed $columns the number of columns to return, defaults to 1\n     * @param mixed $start the first number in the sequence, defaults to 1\n     * @param mixed $step the amount to increment each subsequent value in the array, defaults to 1\n     *\n     * @return array<mixed>|string The resulting array, or a string containing an error\n     */\n    public static function sequence(mixed $rows = 1, mixed $columns = 1, mixed $start = 1, mixed $step = 1): string|array\n    {\n        try {\n            $rows = (int) Helpers::validateNumericNullSubstitution($rows, 1);\n            Helpers::validatePositive($rows);\n            $columns = (int) Helpers::validateNumericNullSubstitution($columns, 1);\n            Helpers::validatePositive($columns);\n            $start = Helpers::validateNumericNullSubstitution($start, 1);\n            $step = Helpers::validateNumericNullSubstitution($step, 1);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($step === 0) {\n            return array_chunk(\n                array_fill(0, $rows * $columns, $start),\n                max($columns, 1)\n            );\n        }\n\n        return array_chunk(\n            range($start, $start + (($rows * $columns - 1) * $step), $step),\n            max($columns, 1)\n        );\n    }\n\n    /**\n     * MDETERM.\n     *\n     * Returns the matrix determinant of an array.\n     *\n     * Excel Function:\n     *        MDETERM(array)\n     *\n     * @param mixed $matrixValues A matrix of values\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function determinant(mixed $matrixValues)\n    {\n        try {\n            $matrix = self::getMatrix($matrixValues);\n\n            return $matrix->determinant();\n        } catch (MatrixException) {\n            return ExcelError::VALUE();\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n    }\n\n    /**\n     * MINVERSE.\n     *\n     * Returns the inverse matrix for the matrix stored in an array.\n     *\n     * Excel Function:\n     *        MINVERSE(array)\n     *\n     * @param mixed $matrixValues A matrix of values\n     *\n     * @return array<mixed>|string The result, or a string containing an error\n     */\n    public static function inverse(mixed $matrixValues): array|string\n    {\n        try {\n            $matrix = self::getMatrix($matrixValues);\n\n            return $matrix->inverse()->toArray();\n        } catch (MatrixDiv0Exception) {\n            return ExcelError::NAN();\n        } catch (MatrixException) {\n            return ExcelError::VALUE();\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n    }\n\n    /**\n     * MMULT.\n     *\n     * @param mixed $matrixData1 A matrix of values\n     * @param mixed $matrixData2 A matrix of values\n     *\n     * @return array<mixed>|string The result, or a string containing an error\n     */\n    public static function multiply(mixed $matrixData1, mixed $matrixData2): array|string\n    {\n        try {\n            $matrixA = self::getMatrix($matrixData1);\n            $matrixB = self::getMatrix($matrixData2);\n\n            return $matrixA->multiply($matrixB)->toArray();\n        } catch (MatrixException) {\n            return ExcelError::VALUE();\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n    }\n\n    /**\n     * MUnit.\n     *\n     * @param mixed $dimension Number of rows and columns\n     *\n     * @return array<mixed>|string The result, or a string containing an error\n     */\n    public static function identity(mixed $dimension)\n    {\n        try {\n            $dimension = (int) Helpers::validateNumericNullBool($dimension);\n            Helpers::validatePositive($dimension, ExcelError::VALUE());\n            $matrix = Builder::createIdentityMatrix($dimension, 0)->toArray();\n\n            return $matrix;\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Operations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Operations\n{\n    use ArrayEnabled;\n\n    /**\n     * MOD.\n     *\n     * @param mixed $dividend Dividend\n     *                      Or can be an array of values\n     * @param mixed $divisor Divisor\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Remainder, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function mod(mixed $dividend, mixed $divisor): array|string|float\n    {\n        if (is_array($dividend) || is_array($divisor)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $dividend, $divisor);\n        }\n\n        try {\n            $dividend = Helpers::validateNumericNullBool($dividend);\n            $divisor = Helpers::validateNumericNullBool($divisor);\n            Helpers::validateNotZero($divisor);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($dividend < 0.0) && ($divisor > 0.0)) {\n            return $divisor - fmod(abs($dividend), $divisor);\n        }\n        if (($dividend > 0.0) && ($divisor < 0.0)) {\n            return $divisor + fmod($dividend, abs($divisor));\n        }\n\n        return fmod($dividend, $divisor);\n    }\n\n    /**\n     * POWER.\n     *\n     * Computes x raised to the power y.\n     *\n     * @param null|array<mixed>|bool|float|int|string $x Or can be an array of values\n     * @param null|array<mixed>|bool|float|int|string $y Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function power(null|array|bool|float|int|string $x, null|array|bool|float|int|string $y): array|float|int|string\n    {\n        if (is_array($x) || is_array($y)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $x, $y);\n        }\n\n        try {\n            $x = Helpers::validateNumericNullBool($x);\n            $y = Helpers::validateNumericNullBool($y);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Validate parameters\n        if (!$x && !$y) {\n            return ExcelError::NAN();\n        }\n        if (!$x && $y < 0.0) {\n            return ExcelError::DIV0();\n        }\n\n        // Return\n        $result = $x ** $y;\n\n        return Helpers::numberOrNan($result);\n    }\n\n    /**\n     * PRODUCT.\n     *\n     * PRODUCT returns the product of all the values and cells referenced in the argument list.\n     *\n     * Excel Function:\n     *        PRODUCT(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function product(mixed ...$args): string|float\n    {\n        $args = array_filter(\n            Functions::flattenArray($args),\n            fn ($value): bool => $value !== null\n        );\n\n        // Return value\n        $returnValue = (count($args) === 0) ? 0.0 : 1.0;\n\n        // Loop through arguments\n        foreach ($args as $arg) {\n            // Is it a numeric value?\n            if (is_numeric($arg)) {\n                $returnValue *= $arg;\n            } else {\n                return ExcelError::throwError($arg);\n            }\n        }\n\n        return (float) $returnValue;\n    }\n\n    /**\n     * QUOTIENT.\n     *\n     * QUOTIENT function returns the integer portion of a division. Numerator is the divided number\n     *        and denominator is the divisor.\n     *\n     * Excel Function:\n     *        QUOTIENT(value1,value2)\n     *\n     * @param mixed $numerator Expect float|int\n     *                      Or can be an array of values\n     * @param mixed $denominator Expect float|int\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|int|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function quotient(mixed $numerator, mixed $denominator): array|string|int\n    {\n        if (is_array($numerator) || is_array($denominator)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $numerator, $denominator);\n        }\n\n        try {\n            $numerator = Helpers::validateNumericNullSubstitution($numerator, 0);\n            $denominator = Helpers::validateNumericNullSubstitution($denominator, 0);\n            Helpers::validateNotZero($denominator);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return (int) ($numerator / $denominator);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Random.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Random\n{\n    use ArrayEnabled;\n\n    /**\n     * RAND.\n     *\n     * @return float|int Random number\n     */\n    public static function rand(): int|float\n    {\n        return mt_rand(0, 10000000) / 10000000;\n    }\n\n    /**\n     * RANDBETWEEN.\n     *\n     * @param mixed $min Minimal value\n     *                      Or can be an array of values\n     * @param mixed $max Maximal value\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|int|string Random number\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function randBetween(mixed $min, mixed $max): array|string|int\n    {\n        if (is_array($min) || is_array($max)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $min, $max);\n        }\n\n        try {\n            $min = (int) Helpers::validateNumericNullBool($min);\n            $max = (int) Helpers::validateNumericNullBool($max);\n            Helpers::validateNotNegative($max - $min);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return mt_rand($min, $max);\n    }\n\n    /**\n     * RANDARRAY.\n     *\n     * Generates a list of sequential numbers in an array.\n     *\n     * Excel Function:\n     *      RANDARRAY([rows],[columns],[start],[step])\n     *\n     * @param mixed $rows the number of rows to return, defaults to 1\n     * @param mixed $columns the number of columns to return, defaults to 1\n     * @param mixed $min the minimum number to be returned, defaults to 0\n     * @param mixed $max the maximum number to be returned, defaults to 1\n     * @param bool $wholeNumber the type of numbers to return:\n     *                             False - Decimal numbers to 15 decimal places. (default)\n     *                             True - Whole (integer) numbers\n     *\n     * @return array<mixed>|string The resulting array, or a string containing an error\n     */\n    public static function randArray(mixed $rows = 1, mixed $columns = 1, mixed $min = 0, mixed $max = 1, bool $wholeNumber = false): string|array\n    {\n        try {\n            $rows = (int) Helpers::validateNumericNullSubstitution($rows, 1);\n            Helpers::validatePositive($rows);\n            $columns = (int) Helpers::validateNumericNullSubstitution($columns, 1);\n            Helpers::validatePositive($columns);\n            $min = Helpers::validateNumericNullSubstitution($min, 1);\n            $max = Helpers::validateNumericNullSubstitution($max, 1);\n\n            if ($max <= $min) {\n                return ExcelError::VALUE();\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return array_chunk(\n            array_map(\n                fn (): int|float => $wholeNumber\n                        ? mt_rand((int) $min, (int) $max)\n                        : (mt_rand() / mt_getrandmax()) * ($max - $min) + $min,\n                array_fill(0, $rows * $columns, $min)\n            ),\n            max($columns, 1)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Roman.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Roman\n{\n    use ArrayEnabled;\n\n    private const VALUES = [\n        45 => ['VL'],\n        46 => ['VLI'],\n        47 => ['VLII'],\n        48 => ['VLIII'],\n        49 => ['VLIV', 'IL'],\n        95 => ['VC'],\n        96 => ['VCI'],\n        97 => ['VCII'],\n        98 => ['VCIII'],\n        99 => ['VCIV', 'IC'],\n        145 => ['CVL'],\n        146 => ['CVLI'],\n        147 => ['CVLII'],\n        148 => ['CVLIII'],\n        149 => ['CVLIV', 'CIL'],\n        195 => ['CVC'],\n        196 => ['CVCI'],\n        197 => ['CVCII'],\n        198 => ['CVCIII'],\n        199 => ['CVCIV', 'CIC'],\n        245 => ['CCVL'],\n        246 => ['CCVLI'],\n        247 => ['CCVLII'],\n        248 => ['CCVLIII'],\n        249 => ['CCVLIV', 'CCIL'],\n        295 => ['CCVC'],\n        296 => ['CCVCI'],\n        297 => ['CCVCII'],\n        298 => ['CCVCIII'],\n        299 => ['CCVCIV', 'CCIC'],\n        345 => ['CCCVL'],\n        346 => ['CCCVLI'],\n        347 => ['CCCVLII'],\n        348 => ['CCCVLIII'],\n        349 => ['CCCVLIV', 'CCCIL'],\n        395 => ['CCCVC'],\n        396 => ['CCCVCI'],\n        397 => ['CCCVCII'],\n        398 => ['CCCVCIII'],\n        399 => ['CCCVCIV', 'CCCIC'],\n        445 => ['CDVL'],\n        446 => ['CDVLI'],\n        447 => ['CDVLII'],\n        448 => ['CDVLIII'],\n        449 => ['CDVLIV', 'CDIL'],\n        450 => ['LD'],\n        451 => ['LDI'],\n        452 => ['LDII'],\n        453 => ['LDIII'],\n        454 => ['LDIV'],\n        455 => ['LDV'],\n        456 => ['LDVI'],\n        457 => ['LDVII'],\n        458 => ['LDVIII'],\n        459 => ['LDIX'],\n        460 => ['LDX'],\n        461 => ['LDXI'],\n        462 => ['LDXII'],\n        463 => ['LDXIII'],\n        464 => ['LDXIV'],\n        465 => ['LDXV'],\n        466 => ['LDXVI'],\n        467 => ['LDXVII'],\n        468 => ['LDXVIII'],\n        469 => ['LDXIX'],\n        470 => ['LDXX'],\n        471 => ['LDXXI'],\n        472 => ['LDXXII'],\n        473 => ['LDXXIII'],\n        474 => ['LDXXIV'],\n        475 => ['LDXXV'],\n        476 => ['LDXXVI'],\n        477 => ['LDXXVII'],\n        478 => ['LDXXVIII'],\n        479 => ['LDXXIX'],\n        480 => ['LDXXX'],\n        481 => ['LDXXXI'],\n        482 => ['LDXXXII'],\n        483 => ['LDXXXIII'],\n        484 => ['LDXXXIV'],\n        485 => ['LDXXXV'],\n        486 => ['LDXXXVI'],\n        487 => ['LDXXXVII'],\n        488 => ['LDXXXVIII'],\n        489 => ['LDXXXIX'],\n        490 => ['LDXL', 'XD'],\n        491 => ['LDXLI', 'XDI'],\n        492 => ['LDXLII', 'XDII'],\n        493 => ['LDXLIII', 'XDIII'],\n        494 => ['LDXLIV', 'XDIV'],\n        495 => ['LDVL', 'XDV', 'VD'],\n        496 => ['LDVLI', 'XDVI', 'VDI'],\n        497 => ['LDVLII', 'XDVII', 'VDII'],\n        498 => ['LDVLIII', 'XDVIII', 'VDIII'],\n        499 => ['LDVLIV', 'XDIX', 'VDIV', 'ID'],\n        545 => ['DVL'],\n        546 => ['DVLI'],\n        547 => ['DVLII'],\n        548 => ['DVLIII'],\n        549 => ['DVLIV', 'DIL'],\n        595 => ['DVC'],\n        596 => ['DVCI'],\n        597 => ['DVCII'],\n        598 => ['DVCIII'],\n        599 => ['DVCIV', 'DIC'],\n        645 => ['DCVL'],\n        646 => ['DCVLI'],\n        647 => ['DCVLII'],\n        648 => ['DCVLIII'],\n        649 => ['DCVLIV', 'DCIL'],\n        695 => ['DCVC'],\n        696 => ['DCVCI'],\n        697 => ['DCVCII'],\n        698 => ['DCVCIII'],\n        699 => ['DCVCIV', 'DCIC'],\n        745 => ['DCCVL'],\n        746 => ['DCCVLI'],\n        747 => ['DCCVLII'],\n        748 => ['DCCVLIII'],\n        749 => ['DCCVLIV', 'DCCIL'],\n        795 => ['DCCVC'],\n        796 => ['DCCVCI'],\n        797 => ['DCCVCII'],\n        798 => ['DCCVCIII'],\n        799 => ['DCCVCIV', 'DCCIC'],\n        845 => ['DCCCVL'],\n        846 => ['DCCCVLI'],\n        847 => ['DCCCVLII'],\n        848 => ['DCCCVLIII'],\n        849 => ['DCCCVLIV', 'DCCCIL'],\n        895 => ['DCCCVC'],\n        896 => ['DCCCVCI'],\n        897 => ['DCCCVCII'],\n        898 => ['DCCCVCIII'],\n        899 => ['DCCCVCIV', 'DCCCIC'],\n        945 => ['CMVL'],\n        946 => ['CMVLI'],\n        947 => ['CMVLII'],\n        948 => ['CMVLIII'],\n        949 => ['CMVLIV', 'CMIL'],\n        950 => ['LM'],\n        951 => ['LMI'],\n        952 => ['LMII'],\n        953 => ['LMIII'],\n        954 => ['LMIV'],\n        955 => ['LMV'],\n        956 => ['LMVI'],\n        957 => ['LMVII'],\n        958 => ['LMVIII'],\n        959 => ['LMIX'],\n        960 => ['LMX'],\n        961 => ['LMXI'],\n        962 => ['LMXII'],\n        963 => ['LMXIII'],\n        964 => ['LMXIV'],\n        965 => ['LMXV'],\n        966 => ['LMXVI'],\n        967 => ['LMXVII'],\n        968 => ['LMXVIII'],\n        969 => ['LMXIX'],\n        970 => ['LMXX'],\n        971 => ['LMXXI'],\n        972 => ['LMXXII'],\n        973 => ['LMXXIII'],\n        974 => ['LMXXIV'],\n        975 => ['LMXXV'],\n        976 => ['LMXXVI'],\n        977 => ['LMXXVII'],\n        978 => ['LMXXVIII'],\n        979 => ['LMXXIX'],\n        980 => ['LMXXX'],\n        981 => ['LMXXXI'],\n        982 => ['LMXXXII'],\n        983 => ['LMXXXIII'],\n        984 => ['LMXXXIV'],\n        985 => ['LMXXXV'],\n        986 => ['LMXXXVI'],\n        987 => ['LMXXXVII'],\n        988 => ['LMXXXVIII'],\n        989 => ['LMXXXIX'],\n        990 => ['LMXL', 'XM'],\n        991 => ['LMXLI', 'XMI'],\n        992 => ['LMXLII', 'XMII'],\n        993 => ['LMXLIII', 'XMIII'],\n        994 => ['LMXLIV', 'XMIV'],\n        995 => ['LMVL', 'XMV', 'VM'],\n        996 => ['LMVLI', 'XMVI', 'VMI'],\n        997 => ['LMVLII', 'XMVII', 'VMII'],\n        998 => ['LMVLIII', 'XMVIII', 'VMIII'],\n        999 => ['LMVLIV', 'XMIX', 'VMIV', 'IM'],\n        1045 => ['MVL'],\n        1046 => ['MVLI'],\n        1047 => ['MVLII'],\n        1048 => ['MVLIII'],\n        1049 => ['MVLIV', 'MIL'],\n        1095 => ['MVC'],\n        1096 => ['MVCI'],\n        1097 => ['MVCII'],\n        1098 => ['MVCIII'],\n        1099 => ['MVCIV', 'MIC'],\n        1145 => ['MCVL'],\n        1146 => ['MCVLI'],\n        1147 => ['MCVLII'],\n        1148 => ['MCVLIII'],\n        1149 => ['MCVLIV', 'MCIL'],\n        1195 => ['MCVC'],\n        1196 => ['MCVCI'],\n        1197 => ['MCVCII'],\n        1198 => ['MCVCIII'],\n        1199 => ['MCVCIV', 'MCIC'],\n        1245 => ['MCCVL'],\n        1246 => ['MCCVLI'],\n        1247 => ['MCCVLII'],\n        1248 => ['MCCVLIII'],\n        1249 => ['MCCVLIV', 'MCCIL'],\n        1295 => ['MCCVC'],\n        1296 => ['MCCVCI'],\n        1297 => ['MCCVCII'],\n        1298 => ['MCCVCIII'],\n        1299 => ['MCCVCIV', 'MCCIC'],\n        1345 => ['MCCCVL'],\n        1346 => ['MCCCVLI'],\n        1347 => ['MCCCVLII'],\n        1348 => ['MCCCVLIII'],\n        1349 => ['MCCCVLIV', 'MCCCIL'],\n        1395 => ['MCCCVC'],\n        1396 => ['MCCCVCI'],\n        1397 => ['MCCCVCII'],\n        1398 => ['MCCCVCIII'],\n        1399 => ['MCCCVCIV', 'MCCCIC'],\n        1445 => ['MCDVL'],\n        1446 => ['MCDVLI'],\n        1447 => ['MCDVLII'],\n        1448 => ['MCDVLIII'],\n        1449 => ['MCDVLIV', 'MCDIL'],\n        1450 => ['MLD'],\n        1451 => ['MLDI'],\n        1452 => ['MLDII'],\n        1453 => ['MLDIII'],\n        1454 => ['MLDIV'],\n        1455 => ['MLDV'],\n        1456 => ['MLDVI'],\n        1457 => ['MLDVII'],\n        1458 => ['MLDVIII'],\n        1459 => ['MLDIX'],\n        1460 => ['MLDX'],\n        1461 => ['MLDXI'],\n        1462 => ['MLDXII'],\n        1463 => ['MLDXIII'],\n        1464 => ['MLDXIV'],\n        1465 => ['MLDXV'],\n        1466 => ['MLDXVI'],\n        1467 => ['MLDXVII'],\n        1468 => ['MLDXVIII'],\n        1469 => ['MLDXIX'],\n        1470 => ['MLDXX'],\n        1471 => ['MLDXXI'],\n        1472 => ['MLDXXII'],\n        1473 => ['MLDXXIII'],\n        1474 => ['MLDXXIV'],\n        1475 => ['MLDXXV'],\n        1476 => ['MLDXXVI'],\n        1477 => ['MLDXXVII'],\n        1478 => ['MLDXXVIII'],\n        1479 => ['MLDXXIX'],\n        1480 => ['MLDXXX'],\n        1481 => ['MLDXXXI'],\n        1482 => ['MLDXXXII'],\n        1483 => ['MLDXXXIII'],\n        1484 => ['MLDXXXIV'],\n        1485 => ['MLDXXXV'],\n        1486 => ['MLDXXXVI'],\n        1487 => ['MLDXXXVII'],\n        1488 => ['MLDXXXVIII'],\n        1489 => ['MLDXXXIX'],\n        1490 => ['MLDXL', 'MXD'],\n        1491 => ['MLDXLI', 'MXDI'],\n        1492 => ['MLDXLII', 'MXDII'],\n        1493 => ['MLDXLIII', 'MXDIII'],\n        1494 => ['MLDXLIV', 'MXDIV'],\n        1495 => ['MLDVL', 'MXDV', 'MVD'],\n        1496 => ['MLDVLI', 'MXDVI', 'MVDI'],\n        1497 => ['MLDVLII', 'MXDVII', 'MVDII'],\n        1498 => ['MLDVLIII', 'MXDVIII', 'MVDIII'],\n        1499 => ['MLDVLIV', 'MXDIX', 'MVDIV', 'MID'],\n        1545 => ['MDVL'],\n        1546 => ['MDVLI'],\n        1547 => ['MDVLII'],\n        1548 => ['MDVLIII'],\n        1549 => ['MDVLIV', 'MDIL'],\n        1595 => ['MDVC'],\n        1596 => ['MDVCI'],\n        1597 => ['MDVCII'],\n        1598 => ['MDVCIII'],\n        1599 => ['MDVCIV', 'MDIC'],\n        1645 => ['MDCVL'],\n        1646 => ['MDCVLI'],\n        1647 => ['MDCVLII'],\n        1648 => ['MDCVLIII'],\n        1649 => ['MDCVLIV', 'MDCIL'],\n        1695 => ['MDCVC'],\n        1696 => ['MDCVCI'],\n        1697 => ['MDCVCII'],\n        1698 => ['MDCVCIII'],\n        1699 => ['MDCVCIV', 'MDCIC'],\n        1745 => ['MDCCVL'],\n        1746 => ['MDCCVLI'],\n        1747 => ['MDCCVLII'],\n        1748 => ['MDCCVLIII'],\n        1749 => ['MDCCVLIV', 'MDCCIL'],\n        1795 => ['MDCCVC'],\n        1796 => ['MDCCVCI'],\n        1797 => ['MDCCVCII'],\n        1798 => ['MDCCVCIII'],\n        1799 => ['MDCCVCIV', 'MDCCIC'],\n        1845 => ['MDCCCVL'],\n        1846 => ['MDCCCVLI'],\n        1847 => ['MDCCCVLII'],\n        1848 => ['MDCCCVLIII'],\n        1849 => ['MDCCCVLIV', 'MDCCCIL'],\n        1895 => ['MDCCCVC'],\n        1896 => ['MDCCCVCI'],\n        1897 => ['MDCCCVCII'],\n        1898 => ['MDCCCVCIII'],\n        1899 => ['MDCCCVCIV', 'MDCCCIC'],\n        1945 => ['MCMVL'],\n        1946 => ['MCMVLI'],\n        1947 => ['MCMVLII'],\n        1948 => ['MCMVLIII'],\n        1949 => ['MCMVLIV', 'MCMIL'],\n        1950 => ['MLM'],\n        1951 => ['MLMI'],\n        1952 => ['MLMII'],\n        1953 => ['MLMIII'],\n        1954 => ['MLMIV'],\n        1955 => ['MLMV'],\n        1956 => ['MLMVI'],\n        1957 => ['MLMVII'],\n        1958 => ['MLMVIII'],\n        1959 => ['MLMIX'],\n        1960 => ['MLMX'],\n        1961 => ['MLMXI'],\n        1962 => ['MLMXII'],\n        1963 => ['MLMXIII'],\n        1964 => ['MLMXIV'],\n        1965 => ['MLMXV'],\n        1966 => ['MLMXVI'],\n        1967 => ['MLMXVII'],\n        1968 => ['MLMXVIII'],\n        1969 => ['MLMXIX'],\n        1970 => ['MLMXX'],\n        1971 => ['MLMXXI'],\n        1972 => ['MLMXXII'],\n        1973 => ['MLMXXIII'],\n        1974 => ['MLMXXIV'],\n        1975 => ['MLMXXV'],\n        1976 => ['MLMXXVI'],\n        1977 => ['MLMXXVII'],\n        1978 => ['MLMXXVIII'],\n        1979 => ['MLMXXIX'],\n        1980 => ['MLMXXX'],\n        1981 => ['MLMXXXI'],\n        1982 => ['MLMXXXII'],\n        1983 => ['MLMXXXIII'],\n        1984 => ['MLMXXXIV'],\n        1985 => ['MLMXXXV'],\n        1986 => ['MLMXXXVI'],\n        1987 => ['MLMXXXVII'],\n        1988 => ['MLMXXXVIII'],\n        1989 => ['MLMXXXIX'],\n        1990 => ['MLMXL', 'MXM'],\n        1991 => ['MLMXLI', 'MXMI'],\n        1992 => ['MLMXLII', 'MXMII'],\n        1993 => ['MLMXLIII', 'MXMIII'],\n        1994 => ['MLMXLIV', 'MXMIV'],\n        1995 => ['MLMVL', 'MXMV', 'MVM'],\n        1996 => ['MLMVLI', 'MXMVI', 'MVMI'],\n        1997 => ['MLMVLII', 'MXMVII', 'MVMII'],\n        1998 => ['MLMVLIII', 'MXMVIII', 'MVMIII'],\n        1999 => ['MLMVLIV', 'MXMIX', 'MVMIV', 'MIM'],\n        2045 => ['MMVL'],\n        2046 => ['MMVLI'],\n        2047 => ['MMVLII'],\n        2048 => ['MMVLIII'],\n        2049 => ['MMVLIV', 'MMIL'],\n        2095 => ['MMVC'],\n        2096 => ['MMVCI'],\n        2097 => ['MMVCII'],\n        2098 => ['MMVCIII'],\n        2099 => ['MMVCIV', 'MMIC'],\n        2145 => ['MMCVL'],\n        2146 => ['MMCVLI'],\n        2147 => ['MMCVLII'],\n        2148 => ['MMCVLIII'],\n        2149 => ['MMCVLIV', 'MMCIL'],\n        2195 => ['MMCVC'],\n        2196 => ['MMCVCI'],\n        2197 => ['MMCVCII'],\n        2198 => ['MMCVCIII'],\n        2199 => ['MMCVCIV', 'MMCIC'],\n        2245 => ['MMCCVL'],\n        2246 => ['MMCCVLI'],\n        2247 => ['MMCCVLII'],\n        2248 => ['MMCCVLIII'],\n        2249 => ['MMCCVLIV', 'MMCCIL'],\n        2295 => ['MMCCVC'],\n        2296 => ['MMCCVCI'],\n        2297 => ['MMCCVCII'],\n        2298 => ['MMCCVCIII'],\n        2299 => ['MMCCVCIV', 'MMCCIC'],\n        2345 => ['MMCCCVL'],\n        2346 => ['MMCCCVLI'],\n        2347 => ['MMCCCVLII'],\n        2348 => ['MMCCCVLIII'],\n        2349 => ['MMCCCVLIV', 'MMCCCIL'],\n        2395 => ['MMCCCVC'],\n        2396 => ['MMCCCVCI'],\n        2397 => ['MMCCCVCII'],\n        2398 => ['MMCCCVCIII'],\n        2399 => ['MMCCCVCIV', 'MMCCCIC'],\n        2445 => ['MMCDVL'],\n        2446 => ['MMCDVLI'],\n        2447 => ['MMCDVLII'],\n        2448 => ['MMCDVLIII'],\n        2449 => ['MMCDVLIV', 'MMCDIL'],\n        2450 => ['MMLD'],\n        2451 => ['MMLDI'],\n        2452 => ['MMLDII'],\n        2453 => ['MMLDIII'],\n        2454 => ['MMLDIV'],\n        2455 => ['MMLDV'],\n        2456 => ['MMLDVI'],\n        2457 => ['MMLDVII'],\n        2458 => ['MMLDVIII'],\n        2459 => ['MMLDIX'],\n        2460 => ['MMLDX'],\n        2461 => ['MMLDXI'],\n        2462 => ['MMLDXII'],\n        2463 => ['MMLDXIII'],\n        2464 => ['MMLDXIV'],\n        2465 => ['MMLDXV'],\n        2466 => ['MMLDXVI'],\n        2467 => ['MMLDXVII'],\n        2468 => ['MMLDXVIII'],\n        2469 => ['MMLDXIX'],\n        2470 => ['MMLDXX'],\n        2471 => ['MMLDXXI'],\n        2472 => ['MMLDXXII'],\n        2473 => ['MMLDXXIII'],\n        2474 => ['MMLDXXIV'],\n        2475 => ['MMLDXXV'],\n        2476 => ['MMLDXXVI'],\n        2477 => ['MMLDXXVII'],\n        2478 => ['MMLDXXVIII'],\n        2479 => ['MMLDXXIX'],\n        2480 => ['MMLDXXX'],\n        2481 => ['MMLDXXXI'],\n        2482 => ['MMLDXXXII'],\n        2483 => ['MMLDXXXIII'],\n        2484 => ['MMLDXXXIV'],\n        2485 => ['MMLDXXXV'],\n        2486 => ['MMLDXXXVI'],\n        2487 => ['MMLDXXXVII'],\n        2488 => ['MMLDXXXVIII'],\n        2489 => ['MMLDXXXIX'],\n        2490 => ['MMLDXL', 'MMXD'],\n        2491 => ['MMLDXLI', 'MMXDI'],\n        2492 => ['MMLDXLII', 'MMXDII'],\n        2493 => ['MMLDXLIII', 'MMXDIII'],\n        2494 => ['MMLDXLIV', 'MMXDIV'],\n        2495 => ['MMLDVL', 'MMXDV', 'MMVD'],\n        2496 => ['MMLDVLI', 'MMXDVI', 'MMVDI'],\n        2497 => ['MMLDVLII', 'MMXDVII', 'MMVDII'],\n        2498 => ['MMLDVLIII', 'MMXDVIII', 'MMVDIII'],\n        2499 => ['MMLDVLIV', 'MMXDIX', 'MMVDIV', 'MMID'],\n        2545 => ['MMDVL'],\n        2546 => ['MMDVLI'],\n        2547 => ['MMDVLII'],\n        2548 => ['MMDVLIII'],\n        2549 => ['MMDVLIV', 'MMDIL'],\n        2595 => ['MMDVC'],\n        2596 => ['MMDVCI'],\n        2597 => ['MMDVCII'],\n        2598 => ['MMDVCIII'],\n        2599 => ['MMDVCIV', 'MMDIC'],\n        2645 => ['MMDCVL'],\n        2646 => ['MMDCVLI'],\n        2647 => ['MMDCVLII'],\n        2648 => ['MMDCVLIII'],\n        2649 => ['MMDCVLIV', 'MMDCIL'],\n        2695 => ['MMDCVC'],\n        2696 => ['MMDCVCI'],\n        2697 => ['MMDCVCII'],\n        2698 => ['MMDCVCIII'],\n        2699 => ['MMDCVCIV', 'MMDCIC'],\n        2745 => ['MMDCCVL'],\n        2746 => ['MMDCCVLI'],\n        2747 => ['MMDCCVLII'],\n        2748 => ['MMDCCVLIII'],\n        2749 => ['MMDCCVLIV', 'MMDCCIL'],\n        2795 => ['MMDCCVC'],\n        2796 => ['MMDCCVCI'],\n        2797 => ['MMDCCVCII'],\n        2798 => ['MMDCCVCIII'],\n        2799 => ['MMDCCVCIV', 'MMDCCIC'],\n        2845 => ['MMDCCCVL'],\n        2846 => ['MMDCCCVLI'],\n        2847 => ['MMDCCCVLII'],\n        2848 => ['MMDCCCVLIII'],\n        2849 => ['MMDCCCVLIV', 'MMDCCCIL'],\n        2895 => ['MMDCCCVC'],\n        2896 => ['MMDCCCVCI'],\n        2897 => ['MMDCCCVCII'],\n        2898 => ['MMDCCCVCIII'],\n        2899 => ['MMDCCCVCIV', 'MMDCCCIC'],\n        2945 => ['MMCMVL'],\n        2946 => ['MMCMVLI'],\n        2947 => ['MMCMVLII'],\n        2948 => ['MMCMVLIII'],\n        2949 => ['MMCMVLIV', 'MMCMIL'],\n        2950 => ['MMLM'],\n        2951 => ['MMLMI'],\n        2952 => ['MMLMII'],\n        2953 => ['MMLMIII'],\n        2954 => ['MMLMIV'],\n        2955 => ['MMLMV'],\n        2956 => ['MMLMVI'],\n        2957 => ['MMLMVII'],\n        2958 => ['MMLMVIII'],\n        2959 => ['MMLMIX'],\n        2960 => ['MMLMX'],\n        2961 => ['MMLMXI'],\n        2962 => ['MMLMXII'],\n        2963 => ['MMLMXIII'],\n        2964 => ['MMLMXIV'],\n        2965 => ['MMLMXV'],\n        2966 => ['MMLMXVI'],\n        2967 => ['MMLMXVII'],\n        2968 => ['MMLMXVIII'],\n        2969 => ['MMLMXIX'],\n        2970 => ['MMLMXX'],\n        2971 => ['MMLMXXI'],\n        2972 => ['MMLMXXII'],\n        2973 => ['MMLMXXIII'],\n        2974 => ['MMLMXXIV'],\n        2975 => ['MMLMXXV'],\n        2976 => ['MMLMXXVI'],\n        2977 => ['MMLMXXVII'],\n        2978 => ['MMLMXXVIII'],\n        2979 => ['MMLMXXIX'],\n        2980 => ['MMLMXXX'],\n        2981 => ['MMLMXXXI'],\n        2982 => ['MMLMXXXII'],\n        2983 => ['MMLMXXXIII'],\n        2984 => ['MMLMXXXIV'],\n        2985 => ['MMLMXXXV'],\n        2986 => ['MMLMXXXVI'],\n        2987 => ['MMLMXXXVII'],\n        2988 => ['MMLMXXXVIII'],\n        2989 => ['MMLMXXXIX'],\n        2990 => ['MMLMXL', 'MMXM'],\n        2991 => ['MMLMXLI', 'MMXMI'],\n        2992 => ['MMLMXLII', 'MMXMII'],\n        2993 => ['MMLMXLIII', 'MMXMIII'],\n        2994 => ['MMLMXLIV', 'MMXMIV'],\n        2995 => ['MMLMVL', 'MMXMV', 'MMVM'],\n        2996 => ['MMLMVLI', 'MMXMVI', 'MMVMI'],\n        2997 => ['MMLMVLII', 'MMXMVII', 'MMVMII'],\n        2998 => ['MMLMVLIII', 'MMXMVIII', 'MMVMIII'],\n        2999 => ['MMLMVLIV', 'MMXMIX', 'MMVMIV', 'MMIM'],\n        3045 => ['MMMVL'],\n        3046 => ['MMMVLI'],\n        3047 => ['MMMVLII'],\n        3048 => ['MMMVLIII'],\n        3049 => ['MMMVLIV', 'MMMIL'],\n        3095 => ['MMMVC'],\n        3096 => ['MMMVCI'],\n        3097 => ['MMMVCII'],\n        3098 => ['MMMVCIII'],\n        3099 => ['MMMVCIV', 'MMMIC'],\n        3145 => ['MMMCVL'],\n        3146 => ['MMMCVLI'],\n        3147 => ['MMMCVLII'],\n        3148 => ['MMMCVLIII'],\n        3149 => ['MMMCVLIV', 'MMMCIL'],\n        3195 => ['MMMCVC'],\n        3196 => ['MMMCVCI'],\n        3197 => ['MMMCVCII'],\n        3198 => ['MMMCVCIII'],\n        3199 => ['MMMCVCIV', 'MMMCIC'],\n        3245 => ['MMMCCVL'],\n        3246 => ['MMMCCVLI'],\n        3247 => ['MMMCCVLII'],\n        3248 => ['MMMCCVLIII'],\n        3249 => ['MMMCCVLIV', 'MMMCCIL'],\n        3295 => ['MMMCCVC'],\n        3296 => ['MMMCCVCI'],\n        3297 => ['MMMCCVCII'],\n        3298 => ['MMMCCVCIII'],\n        3299 => ['MMMCCVCIV', 'MMMCCIC'],\n        3345 => ['MMMCCCVL'],\n        3346 => ['MMMCCCVLI'],\n        3347 => ['MMMCCCVLII'],\n        3348 => ['MMMCCCVLIII'],\n        3349 => ['MMMCCCVLIV', 'MMMCCCIL'],\n        3395 => ['MMMCCCVC'],\n        3396 => ['MMMCCCVCI'],\n        3397 => ['MMMCCCVCII'],\n        3398 => ['MMMCCCVCIII'],\n        3399 => ['MMMCCCVCIV', 'MMMCCCIC'],\n        3445 => ['MMMCDVL'],\n        3446 => ['MMMCDVLI'],\n        3447 => ['MMMCDVLII'],\n        3448 => ['MMMCDVLIII'],\n        3449 => ['MMMCDVLIV', 'MMMCDIL'],\n        3450 => ['MMMLD'],\n        3451 => ['MMMLDI'],\n        3452 => ['MMMLDII'],\n        3453 => ['MMMLDIII'],\n        3454 => ['MMMLDIV'],\n        3455 => ['MMMLDV'],\n        3456 => ['MMMLDVI'],\n        3457 => ['MMMLDVII'],\n        3458 => ['MMMLDVIII'],\n        3459 => ['MMMLDIX'],\n        3460 => ['MMMLDX'],\n        3461 => ['MMMLDXI'],\n        3462 => ['MMMLDXII'],\n        3463 => ['MMMLDXIII'],\n        3464 => ['MMMLDXIV'],\n        3465 => ['MMMLDXV'],\n        3466 => ['MMMLDXVI'],\n        3467 => ['MMMLDXVII'],\n        3468 => ['MMMLDXVIII'],\n        3469 => ['MMMLDXIX'],\n        3470 => ['MMMLDXX'],\n        3471 => ['MMMLDXXI'],\n        3472 => ['MMMLDXXII'],\n        3473 => ['MMMLDXXIII'],\n        3474 => ['MMMLDXXIV'],\n        3475 => ['MMMLDXXV'],\n        3476 => ['MMMLDXXVI'],\n        3477 => ['MMMLDXXVII'],\n        3478 => ['MMMLDXXVIII'],\n        3479 => ['MMMLDXXIX'],\n        3480 => ['MMMLDXXX'],\n        3481 => ['MMMLDXXXI'],\n        3482 => ['MMMLDXXXII'],\n        3483 => ['MMMLDXXXIII'],\n        3484 => ['MMMLDXXXIV'],\n        3485 => ['MMMLDXXXV'],\n        3486 => ['MMMLDXXXVI'],\n        3487 => ['MMMLDXXXVII'],\n        3488 => ['MMMLDXXXVIII'],\n        3489 => ['MMMLDXXXIX'],\n        3490 => ['MMMLDXL', 'MMMXD'],\n        3491 => ['MMMLDXLI', 'MMMXDI'],\n        3492 => ['MMMLDXLII', 'MMMXDII'],\n        3493 => ['MMMLDXLIII', 'MMMXDIII'],\n        3494 => ['MMMLDXLIV', 'MMMXDIV'],\n        3495 => ['MMMLDVL', 'MMMXDV', 'MMMVD'],\n        3496 => ['MMMLDVLI', 'MMMXDVI', 'MMMVDI'],\n        3497 => ['MMMLDVLII', 'MMMXDVII', 'MMMVDII'],\n        3498 => ['MMMLDVLIII', 'MMMXDVIII', 'MMMVDIII'],\n        3499 => ['MMMLDVLIV', 'MMMXDIX', 'MMMVDIV', 'MMMID'],\n        3545 => ['MMMDVL'],\n        3546 => ['MMMDVLI'],\n        3547 => ['MMMDVLII'],\n        3548 => ['MMMDVLIII'],\n        3549 => ['MMMDVLIV', 'MMMDIL'],\n        3595 => ['MMMDVC'],\n        3596 => ['MMMDVCI'],\n        3597 => ['MMMDVCII'],\n        3598 => ['MMMDVCIII'],\n        3599 => ['MMMDVCIV', 'MMMDIC'],\n        3645 => ['MMMDCVL'],\n        3646 => ['MMMDCVLI'],\n        3647 => ['MMMDCVLII'],\n        3648 => ['MMMDCVLIII'],\n        3649 => ['MMMDCVLIV', 'MMMDCIL'],\n        3695 => ['MMMDCVC'],\n        3696 => ['MMMDCVCI'],\n        3697 => ['MMMDCVCII'],\n        3698 => ['MMMDCVCIII'],\n        3699 => ['MMMDCVCIV', 'MMMDCIC'],\n        3745 => ['MMMDCCVL'],\n        3746 => ['MMMDCCVLI'],\n        3747 => ['MMMDCCVLII'],\n        3748 => ['MMMDCCVLIII'],\n        3749 => ['MMMDCCVLIV', 'MMMDCCIL'],\n        3795 => ['MMMDCCVC'],\n        3796 => ['MMMDCCVCI'],\n        3797 => ['MMMDCCVCII'],\n        3798 => ['MMMDCCVCIII'],\n        3799 => ['MMMDCCVCIV', 'MMMDCCIC'],\n        3845 => ['MMMDCCCVL'],\n        3846 => ['MMMDCCCVLI'],\n        3847 => ['MMMDCCCVLII'],\n        3848 => ['MMMDCCCVLIII'],\n        3849 => ['MMMDCCCVLIV', 'MMMDCCCIL'],\n        3895 => ['MMMDCCCVC'],\n        3896 => ['MMMDCCCVCI'],\n        3897 => ['MMMDCCCVCII'],\n        3898 => ['MMMDCCCVCIII'],\n        3899 => ['MMMDCCCVCIV', 'MMMDCCCIC'],\n        3945 => ['MMMCMVL'],\n        3946 => ['MMMCMVLI'],\n        3947 => ['MMMCMVLII'],\n        3948 => ['MMMCMVLIII'],\n        3949 => ['MMMCMVLIV', 'MMMCMIL'],\n        3950 => ['MMMLM'],\n        3951 => ['MMMLMI'],\n        3952 => ['MMMLMII'],\n        3953 => ['MMMLMIII'],\n        3954 => ['MMMLMIV'],\n        3955 => ['MMMLMV'],\n        3956 => ['MMMLMVI'],\n        3957 => ['MMMLMVII'],\n        3958 => ['MMMLMVIII'],\n        3959 => ['MMMLMIX'],\n        3960 => ['MMMLMX'],\n        3961 => ['MMMLMXI'],\n        3962 => ['MMMLMXII'],\n        3963 => ['MMMLMXIII'],\n        3964 => ['MMMLMXIV'],\n        3965 => ['MMMLMXV'],\n        3966 => ['MMMLMXVI'],\n        3967 => ['MMMLMXVII'],\n        3968 => ['MMMLMXVIII'],\n        3969 => ['MMMLMXIX'],\n        3970 => ['MMMLMXX'],\n        3971 => ['MMMLMXXI'],\n        3972 => ['MMMLMXXII'],\n        3973 => ['MMMLMXXIII'],\n        3974 => ['MMMLMXXIV'],\n        3975 => ['MMMLMXXV'],\n        3976 => ['MMMLMXXVI'],\n        3977 => ['MMMLMXXVII'],\n        3978 => ['MMMLMXXVIII'],\n        3979 => ['MMMLMXXIX'],\n        3980 => ['MMMLMXXX'],\n        3981 => ['MMMLMXXXI'],\n        3982 => ['MMMLMXXXII'],\n        3983 => ['MMMLMXXXIII'],\n        3984 => ['MMMLMXXXIV'],\n        3985 => ['MMMLMXXXV'],\n        3986 => ['MMMLMXXXVI'],\n        3987 => ['MMMLMXXXVII'],\n        3988 => ['MMMLMXXXVIII'],\n        3989 => ['MMMLMXXXIX'],\n        3990 => ['MMMLMXL', 'MMMXM'],\n        3991 => ['MMMLMXLI', 'MMMXMI'],\n        3992 => ['MMMLMXLII', 'MMMXMII'],\n        3993 => ['MMMLMXLIII', 'MMMXMIII'],\n        3994 => ['MMMLMXLIV', 'MMMXMIV'],\n        3995 => ['MMMLMVL', 'MMMXMV', 'MMMVM'],\n        3996 => ['MMMLMVLI', 'MMMXMVI', 'MMMVMI'],\n        3997 => ['MMMLMVLII', 'MMMXMVII', 'MMMVMII'],\n        3998 => ['MMMLMVLIII', 'MMMXMVIII', 'MMMVMIII'],\n        3999 => ['MMMLMVLIV', 'MMMXMIX', 'MMMVMIV', 'MMMIM'],\n    ];\n\n    private const THOUSANDS = ['', 'M', 'MM', 'MMM'];\n    private const HUNDREDS = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM'];\n    private const TENS = ['', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'];\n    private const ONES = ['', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'];\n    const MAX_ROMAN_VALUE = 3999;\n    const MAX_ROMAN_STYLE = 4;\n\n    private static function valueOk(int $aValue, int $style): string\n    {\n        $origValue = $aValue;\n        $m = \\intdiv($aValue, 1000);\n        $aValue %= 1000;\n        $c = \\intdiv($aValue, 100);\n        $aValue %= 100;\n        $t = \\intdiv($aValue, 10);\n        $aValue %= 10;\n        $result = self::THOUSANDS[$m] . self::HUNDREDS[$c] . self::TENS[$t] . self::ONES[$aValue];\n        if ($style > 0) {\n            if (array_key_exists($origValue, self::VALUES)) {\n                $arr = self::VALUES[$origValue];\n                $idx = min($style, count($arr)) - 1;\n                $result = $arr[$idx];\n            }\n        }\n\n        return $result;\n    }\n\n    private static function styleOk(int $aValue, int $style): string\n    {\n        return ($aValue < 0 || $aValue > self::MAX_ROMAN_VALUE) ? ExcelError::VALUE() : self::valueOk($aValue, $style);\n    }\n\n    public static function calculateRoman(int $aValue, int $style): string\n    {\n        return ($style < 0 || $style > self::MAX_ROMAN_STYLE) ? ExcelError::VALUE() : self::styleOk($aValue, $style);\n    }\n\n    /**\n     * ROMAN.\n     *\n     * Converts a number to Roman numeral\n     *\n     * @param mixed $aValue Number to convert\n     *                      Or can be an array of numbers\n     * @param mixed $style Number indicating one of five possible forms\n     *                      Or can be an array of styles\n     *\n     * @return array<mixed>|string Roman numeral, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function evaluate(mixed $aValue, mixed $style = 0): array|string\n    {\n        if (is_array($aValue) || is_array($style)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $aValue, $style);\n        }\n\n        try {\n            $aValue = Helpers::validateNumericNullBool($aValue);\n            if (is_bool($style)) {\n                $style = $style ? 0 : 4;\n            }\n            $style = Helpers::validateNumericNullSubstitution($style, null);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return self::calculateRoman((int) $aValue, (int) $style);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Round.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n// following added in Php8.4\nuse RoundingMode;\n\nclass Round\n{\n    use ArrayEnabled;\n\n    /**\n     * ROUND.\n     *\n     * Returns the result of builtin function round after validating args.\n     *\n     * @param mixed $number Should be numeric, or can be an array of numbers\n     * @param mixed $precision Should be int, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Rounded number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function round(mixed $number, mixed $precision): array|string|float\n    {\n        if (is_array($number) || is_array($precision)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $precision);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $precision = Helpers::validateNumericNullBool($precision);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return round($number, (int) $precision);\n    }\n\n    /**\n     * ROUNDUP.\n     *\n     * Rounds a number up to a specified number of decimal places\n     *\n     * @param array<mixed>|float $number Number to round, or can be an array of numbers\n     * @param array<mixed>|int $digits Number of digits to which you want to round $number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function up($number, $digits): array|string|float\n    {\n        if (is_array($number) || is_array($digits)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $digits);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $digits = (int) Helpers::validateNumericNullSubstitution($digits, null);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($number == 0.0) {\n            return 0.0;\n        }\n\n        if (PHP_VERSION_ID >= 80400) {\n            return round(\n                (float) (string) $number,\n                $digits,\n                RoundingMode::AwayFromZero //* @phpstan-ignore-line\n            );\n        }\n\n        // @codeCoverageIgnoreStart\n        if ($number < 0.0) {\n            return round($number - 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_DOWN);\n        }\n\n        return round($number + 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_DOWN);\n        // @codeCoverageIgnoreEnd\n    }\n\n    /**\n     * ROUNDDOWN.\n     *\n     * Rounds a number down to a specified number of decimal places\n     *\n     * @param null|array<mixed>|float|string $number Number to round, or can be an array of numbers\n     * @param array<mixed>|float|int|string $digits Number of digits to which you want to round $number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function down($number, $digits): array|string|float\n    {\n        if (is_array($number) || is_array($digits)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $digits);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n            $digits = (int) Helpers::validateNumericNullSubstitution($digits, null);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($number == 0.0) {\n            return 0.0;\n        }\n\n        if (PHP_VERSION_ID >= 80400) {\n            return round(\n                (float) (string) $number,\n                $digits,\n                RoundingMode::TowardsZero //* @phpstan-ignore-line\n            );\n        }\n\n        // @codeCoverageIgnoreStart\n        if ($number < 0.0) {\n            return round($number + 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_UP);\n        }\n\n        return round($number - 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_UP);\n        // @codeCoverageIgnoreEnd\n    }\n\n    /**\n     * MROUND.\n     *\n     * Rounds a number to the nearest multiple of a specified value\n     *\n     * @param mixed $number Expect float. Number to round, or can be an array of numbers\n     * @param mixed $multiple Expect int. Multiple to which you want to round, or can be an array of numbers.\n     *\n     * @return array<mixed>|float|int|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function multiple(mixed $number, mixed $multiple): array|string|int|float\n    {\n        if (is_array($number) || is_array($multiple)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $multiple);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullSubstitution($number, 0);\n            $multiple = Helpers::validateNumericNullSubstitution($multiple, null);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($number == 0 || $multiple == 0) {\n            return 0;\n        }\n        if ((Helpers::returnSign($number)) == (Helpers::returnSign($multiple))) {\n            $multiplier = 1 / $multiple;\n\n            return round($number * $multiplier) / $multiplier;\n        }\n\n        return ExcelError::NAN();\n    }\n\n    /**\n     * EVEN.\n     *\n     * Returns number rounded up to the nearest even integer.\n     * You can use this function for processing items that come in twos. For example,\n     *        a packing crate accepts rows of one or two items. The crate is full when\n     *        the number of items, rounded up to the nearest two, matches the crate's\n     *        capacity.\n     *\n     * Excel Function:\n     *        EVEN(number)\n     *\n     * @param array<mixed>|float $number Number to round, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function even($number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::getEven($number);\n    }\n\n    /**\n     * ODD.\n     *\n     * Returns number rounded up to the nearest odd integer.\n     *\n     * @param array<mixed>|float $number Number to round, or can be an array of numbers\n     *\n     * @return array<mixed>|float|int|string Rounded Number, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function odd($number): array|string|int|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $significance = Helpers::returnSign($number);\n        if ($significance == 0) {\n            return 1;\n        }\n\n        $result = ceil($number / $significance) * $significance;\n        if ($result == Helpers::getEven($result)) {\n            $result += $significance;\n        }\n\n        return $result;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/SeriesSum.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass SeriesSum\n{\n    use ArrayEnabled;\n\n    /**\n     * SERIESSUM.\n     *\n     * Returns the sum of a power series\n     *\n     * @param mixed $x Input value\n     * @param mixed $n Initial power\n     * @param mixed $m Step\n     * @param mixed[] $args An array of coefficients for the Data Series\n     *\n     * @return array<mixed>|float|int|string The result, or a string containing an error\n     */\n    public static function evaluate(mixed $x, mixed $n, mixed $m, ...$args): array|string|float|int\n    {\n        if (is_array($x) || is_array($n) || is_array($m)) {\n            return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 3, $x, $n, $m, ...$args);\n        }\n\n        try {\n            $x = Helpers::validateNumericNullSubstitution($x, 0);\n            $n = Helpers::validateNumericNullSubstitution($n, 0);\n            $m = Helpers::validateNumericNullSubstitution($m, 0);\n\n            // Loop through arguments\n            $aArgs = Functions::flattenArray($args);\n            $returnValue = 0;\n            $i = 0;\n            foreach ($aArgs as $argx) {\n                if ($argx !== null) {\n                    $arg = Helpers::validateNumericNullSubstitution($argx, 0);\n                    $returnValue += $arg * $x ** ($n + ($m * $i));\n                    ++$i;\n                }\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Sign.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Sign\n{\n    use ArrayEnabled;\n\n    /**\n     * SIGN.\n     *\n     * Determines the sign of a number. Returns 1 if the number is positive, zero (0)\n     *        if the number is 0, and -1 if the number is negative.\n     *\n     * @param array<mixed>|float $number Number to round, or can be an array of numbers\n     *\n     * @return array<mixed>|int|string sign value, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function evaluate($number): array|string|int\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::returnSign($number);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\n\nclass Sqrt\n{\n    use ArrayEnabled;\n\n    /**\n     * SQRT.\n     *\n     * Returns the result of builtin function sqrt after validating args.\n     *\n     * @param mixed $number Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string square root\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function sqrt(mixed $number)\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::numberOrNan(sqrt($number));\n    }\n\n    /**\n     * SQRTPI.\n     *\n     * Returns the square root of (number * pi).\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string Square Root of Number * Pi, or a string containing an error\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function pi($number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullSubstitution($number, 0);\n            Helpers::validateNotNegative($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return sqrt($number * M_PI);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\n\nclass Subtotal\n{\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[]\n     */\n    protected static function filterHiddenArgs(Cell $cellReference, array $args): array\n    {\n        return array_filter(\n            $args,\n            function ($index) use ($cellReference) {\n                $explodeArray = explode('.', $index);\n                $row = $explodeArray[1] ?? '';\n                if (!is_numeric($row)) {\n                    return true;\n                }\n\n                return $cellReference->getWorksheet()->getRowDimension((int) $row)->getVisible();\n            },\n            ARRAY_FILTER_USE_KEY\n        );\n    }\n\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[]\n     */\n    protected static function filterFilteredArgs(Cell $cellReference, array $args): array\n    {\n        return array_filter(\n            $args,\n            function ($index) use ($cellReference) {\n                $explodeArray = explode('.', $index);\n                $row = $explodeArray[1] ?? '';\n\n                return is_numeric($row) ? ($cellReference->getWorksheet()->getRowDimension((int) $row)->getVisibleAfterFilter()) : true;\n            },\n            ARRAY_FILTER_USE_KEY\n        );\n    }\n\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[]\n     */\n    protected static function filterFormulaArgs(Cell $cellReference, array $args): array\n    {\n        return array_filter(\n            $args,\n            function ($index) use ($cellReference): bool {\n                $explodeArray = explode('.', $index);\n                $row = $explodeArray[1] ?? '';\n                $column = $explodeArray[2] ?? '';\n                $retVal = true;\n                if ($cellReference->getWorksheet()->cellExists($column . $row)) {\n                    //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula\n                    $isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula();\n                    $cellFormula = !preg_match(\n                        '/^=.*\\b(SUBTOTAL|AGGREGATE)\\s*\\(/i',\n                        $cellReference->getWorksheet()->getCell($column . $row)->getValueString()\n                    );\n\n                    $retVal = !$isFormula || $cellFormula;\n                }\n\n                return $retVal;\n            },\n            ARRAY_FILTER_USE_KEY\n        );\n    }\n\n    /**\n     * @var array<int, callable>\n     */\n    private const CALL_FUNCTIONS = [\n        1 => [Statistical\\Averages::class, 'average'], // 1 and 101\n        [Statistical\\Counts::class, 'COUNT'], // 2 and 102\n        [Statistical\\Counts::class, 'COUNTA'], // 3 and 103\n        [Statistical\\Maximum::class, 'max'], // 4 and 104\n        [Statistical\\Minimum::class, 'min'], // 5 and 105\n        [Operations::class, 'product'], // 6 and 106\n        [Statistical\\StandardDeviations::class, 'STDEV'], // 7 and 107\n        [Statistical\\StandardDeviations::class, 'STDEVP'], // 8 and 108\n        [Sum::class, 'sumIgnoringStrings'], // 9 and 109\n        [Statistical\\Variances::class, 'VAR'], // 10 and 110\n        [Statistical\\Variances::class, 'VARP'], // 111 and 111\n    ];\n\n    /**\n     * SUBTOTAL.\n     *\n     * Returns a subtotal in a list or database.\n     *\n     * @param mixed $functionType\n     *            A number 1 to 11 that specifies which function to\n     *                    use in calculating subtotals within a range\n     *                    list\n     *            Numbers 101 to 111 shadow the functions of 1 to 11\n     *                    but ignore any values in the range that are\n     *                    in hidden rows\n     * @param mixed[] $args A mixed data series of values\n     */\n    public static function evaluate(mixed $functionType, ...$args): float|int|string\n    {\n        /** @var Cell */\n        $cellReference = array_pop($args);\n        $bArgs = Functions::flattenArrayIndexed($args);\n        $aArgs = [];\n        // int keys must come before string keys for PHP 8.0+\n        // Otherwise, PHP thinks positional args follow keyword\n        //    in the subsequent call to call_user_func_array.\n        // Fortunately, order of args is unimportant to Subtotal.\n        foreach ($bArgs as $key => $value) {\n            if (is_int($key)) {\n                $aArgs[$key] = $value;\n            }\n        }\n        foreach ($bArgs as $key => $value) {\n            if (!is_int($key)) {\n                $aArgs[$key] = $value;\n            }\n        }\n\n        try {\n            $subtotal = (int) Helpers::validateNumericNullBool($functionType);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        // Calculate\n        if ($subtotal > 100) {\n            $aArgs = self::filterHiddenArgs($cellReference, $aArgs);\n            $subtotal -= 100;\n        } else {\n            $aArgs = self::filterFilteredArgs($cellReference, $aArgs);\n        }\n\n        $aArgs = self::filterFormulaArgs($cellReference, $aArgs);\n        if (array_key_exists($subtotal, self::CALL_FUNCTIONS)) {\n            $call = self::CALL_FUNCTIONS[$subtotal];\n\n            return call_user_func_array($call, $aArgs); //* @phpstan-ignore-line\n        }\n\n        return ExcelError::VALUE();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Sum.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Sum\n{\n    /**\n     * SUM, ignoring non-numeric non-error strings. This is eventually used by SUMIF.\n     *\n     * SUM computes the sum of all the values and cells referenced in the argument list.\n     *\n     * Excel Function:\n     *        SUM(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function sumIgnoringStrings(mixed ...$args): float|int|string\n    {\n        $returnValue = 0;\n\n        // Loop through the arguments\n        foreach (Functions::flattenArray($args) as $arg) {\n            // Is it a numeric value?\n            if (is_numeric($arg)) {\n                $returnValue += $arg;\n            } elseif (ErrorValue::isError($arg)) {\n                /** @var string $arg */\n                return $arg;\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * SUM, returning error for non-numeric strings. This is used by Excel SUM function.\n     *\n     * SUM computes the sum of all the values and cells referenced in the argument list.\n     *\n     * Excel Function:\n     *        SUM(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return array<mixed>|float|int|string\n     */\n    public static function sumErroringStrings(mixed ...$args): float|int|string|array\n    {\n        $returnValue = 0;\n        // Loop through the arguments\n        $aArgs = Functions::flattenArrayIndexed($args);\n        foreach ($aArgs as $k => $arg) {\n            // Is it a numeric value?\n            if (is_numeric($arg)) {\n                $returnValue += $arg;\n            } elseif (is_bool($arg)) {\n                $returnValue += (int) $arg;\n            } elseif (ErrorValue::isError($arg, true)) {\n                /** @var string $arg */\n                return $arg;\n            } elseif ($arg !== null && !Functions::isCellValue($k)) {\n                // ignore non-numerics from cell, but fail as literals (except null)\n                return ExcelError::VALUE();\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * SUMPRODUCT.\n     *\n     * Excel Function:\n     *        SUMPRODUCT(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|int|string The result, or a string containing an error\n     */\n    public static function product(mixed ...$args): string|int|float\n    {\n        $arrayList = $args;\n\n        $wrkArray = Functions::flattenArray(array_shift($arrayList));\n        $wrkCellCount = count($wrkArray);\n\n        for ($i = 0; $i < $wrkCellCount; ++$i) {\n            if ((!is_numeric($wrkArray[$i])) || (is_string($wrkArray[$i]))) {\n                $wrkArray[$i] = 0;\n            }\n        }\n\n        foreach ($arrayList as $matrixData) {\n            $array2 = Functions::flattenArray($matrixData);\n            $count = count($array2);\n            if ($wrkCellCount != $count) {\n                return ExcelError::VALUE();\n            }\n\n            foreach ($array2 as $i => $val) {\n                if ((!is_numeric($val)) || (is_string($val))) {\n                    $val = 0;\n                }\n                /** @var array<float|int> $wrkArray */\n                $wrkArray[$i] *= $val;\n            }\n        }\n\n        /** @var array<float|int> $wrkArray */\n        return array_sum($wrkArray);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass SumSquares\n{\n    /**\n     * SUMSQ.\n     *\n     * SUMSQ returns the sum of the squares of the arguments\n     *\n     * Excel Function:\n     *        SUMSQ(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function sumSquare(mixed ...$args): string|int|float\n    {\n        try {\n            $returnValue = 0;\n\n            // Loop through arguments\n            foreach (Functions::flattenArray($args) as $arg) {\n                $arg1 = Helpers::validateNumericNullSubstitution($arg, 0);\n                $returnValue += ($arg1 * $arg1);\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * @param mixed[] $array1\n     * @param mixed[] $array2\n     */\n    private static function getCount(array $array1, array $array2): int\n    {\n        $count = count($array1);\n        if ($count !== count($array2)) {\n            throw new Exception(ExcelError::NA());\n        }\n\n        return $count;\n    }\n\n    /**\n     * These functions accept only numeric arguments, not even strings which are numeric.\n     */\n    private static function numericNotString(mixed $item): bool\n    {\n        return is_numeric($item) && !is_string($item);\n    }\n\n    /**\n     * SUMX2MY2.\n     *\n     * @param mixed[] $matrixData1 Matrix #1\n     * @param mixed[] $matrixData2 Matrix #2\n     */\n    public static function sumXSquaredMinusYSquared(array $matrixData1, array $matrixData2): string|int|float\n    {\n        try {\n            /** @var array<float|int> */\n            $array1 = Functions::flattenArray($matrixData1);\n            /** @var array<float|int> */\n            $array2 = Functions::flattenArray($matrixData2);\n            $count = self::getCount($array1, $array2);\n\n            $result = 0;\n            for ($i = 0; $i < $count; ++$i) {\n                if (self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {\n                    $result += ($array1[$i] * $array1[$i]) - ($array2[$i] * $array2[$i]);\n                }\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return $result;\n    }\n\n    /**\n     * SUMX2PY2.\n     *\n     * @param mixed[] $matrixData1 Matrix #1\n     * @param mixed[] $matrixData2 Matrix #2\n     */\n    public static function sumXSquaredPlusYSquared(array $matrixData1, array $matrixData2): string|int|float\n    {\n        try {\n            /** @var array<float|int> */\n            $array1 = Functions::flattenArray($matrixData1);\n            /** @var array<float|int> */\n            $array2 = Functions::flattenArray($matrixData2);\n            $count = self::getCount($array1, $array2);\n\n            $result = 0;\n            for ($i = 0; $i < $count; ++$i) {\n                if (self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {\n                    $result += ($array1[$i] * $array1[$i]) + ($array2[$i] * $array2[$i]);\n                }\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return $result;\n    }\n\n    /**\n     * SUMXMY2.\n     *\n     * @param mixed[] $matrixData1 Matrix #1\n     * @param mixed[] $matrixData2 Matrix #2\n     */\n    public static function sumXMinusYSquared(array $matrixData1, array $matrixData2): string|int|float\n    {\n        try {\n            /** @var array<float|int> */\n            $array1 = Functions::flattenArray($matrixData1);\n            /** @var array<float|int> */\n            $array2 = Functions::flattenArray($matrixData2);\n            $count = self::getCount($array1, $array2);\n\n            $result = 0;\n            for ($i = 0; $i < $count; ++$i) {\n                if (self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {\n                    $result += ($array1[$i] - $array2[$i]) * ($array1[$i] - $array2[$i]);\n                }\n            }\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return $result;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Helpers;\n\nclass Cosecant\n{\n    use ArrayEnabled;\n\n    /**\n     * CSC.\n     *\n     * Returns the cosecant of an angle.\n     *\n     * @param array<mixed>|float $angle Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The cosecant of the angle\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function csc($angle)\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::verySmallDenominator(1.0, sin($angle));\n    }\n\n    /**\n     * CSCH.\n     *\n     * Returns the hyperbolic cosecant of an angle.\n     *\n     * @param array<mixed>|float $angle Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The hyperbolic cosecant of the angle\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function csch($angle)\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::verySmallDenominator(1.0, sinh($angle));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Helpers;\n\nclass Cosine\n{\n    use ArrayEnabled;\n\n    /**\n     * COS.\n     *\n     * Returns the result of builtin function cos after validating args.\n     *\n     * @param mixed $number Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string cosine\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function cos(mixed $number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return cos($number);\n    }\n\n    /**\n     * COSH.\n     *\n     * Returns the result of builtin function cosh after validating args.\n     *\n     * @param mixed $number Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string hyperbolic cosine\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function cosh(mixed $number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return cosh($number);\n    }\n\n    /**\n     * ACOS.\n     *\n     * Returns the arccosine of a number.\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The arccosine of the number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function acos($number)\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::numberOrNan(acos($number));\n    }\n\n    /**\n     * ACOSH.\n     *\n     * Returns the arc inverse hyperbolic cosine of a number.\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The inverse hyperbolic cosine of the number, or an error string\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function acosh($number)\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::numberOrNan(acosh($number));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Helpers;\n\nclass Cotangent\n{\n    use ArrayEnabled;\n\n    /**\n     * COT.\n     *\n     * Returns the cotangent of an angle.\n     *\n     * @param array<mixed>|float $angle Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The cotangent of the angle\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function cot($angle)\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::verySmallDenominator(cos($angle), sin($angle));\n    }\n\n    /**\n     * COTH.\n     *\n     * Returns the hyperbolic cotangent of an angle.\n     *\n     * @param array<mixed>|float $angle Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The hyperbolic cotangent of the angle\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function coth($angle)\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::verySmallDenominator(1.0, tanh($angle));\n    }\n\n    /**\n     * ACOT.\n     *\n     * Returns the arccotangent of a number.\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The arccotangent of the number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function acot($number): array|string|float\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return (M_PI / 2) - atan($number);\n    }\n\n    /**\n     * ACOTH.\n     *\n     * Returns the hyperbolic arccotangent of a number.\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The hyperbolic arccotangent of the number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function acoth($number)\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $result = ($number === 1) ? NAN : (log(($number + 1) / ($number - 1)) / 2);\n\n        return Helpers::numberOrNan($result);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Helpers;\n\nclass Secant\n{\n    use ArrayEnabled;\n\n    /**\n     * SEC.\n     *\n     * Returns the secant of an angle.\n     *\n     * @param array<mixed>|float $angle Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The secant of the angle\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function sec($angle)\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::verySmallDenominator(1.0, cos($angle));\n    }\n\n    /**\n     * SECH.\n     *\n     * Returns the hyperbolic secant of an angle.\n     *\n     * @param array<mixed>|float $angle Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The hyperbolic secant of the angle\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function sech($angle)\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::verySmallDenominator(1.0, cosh($angle));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Helpers;\n\nclass Sine\n{\n    use ArrayEnabled;\n\n    /**\n     * SIN.\n     *\n     * Returns the result of builtin function sin after validating args.\n     *\n     * @param mixed $angle Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string sine\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function sin(mixed $angle): array|string|float\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return sin($angle);\n    }\n\n    /**\n     * SINH.\n     *\n     * Returns the result of builtin function sinh after validating args.\n     *\n     * @param mixed $angle Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string hyperbolic sine\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function sinh(mixed $angle): array|string|float\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return sinh($angle);\n    }\n\n    /**\n     * ASIN.\n     *\n     * Returns the arcsine of a number.\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The arcsine of the number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function asin($number)\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::numberOrNan(asin($number));\n    }\n\n    /**\n     * ASINH.\n     *\n     * Returns the inverse hyperbolic sine of a number.\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The inverse hyperbolic sine of the number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function asinh($number)\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::numberOrNan(asinh($number));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Trig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Helpers;\n\nclass Tangent\n{\n    use ArrayEnabled;\n\n    /**\n     * TAN.\n     *\n     * Returns the result of builtin function tan after validating args.\n     *\n     * @param mixed $angle Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string tangent\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function tan(mixed $angle)\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::verySmallDenominator(sin($angle), cos($angle));\n    }\n\n    /**\n     * TANH.\n     *\n     * Returns the result of builtin function sinh after validating args.\n     *\n     * @param mixed $angle Should be numeric, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string hyperbolic tangent\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function tanh(mixed $angle): array|string|float\n    {\n        if (is_array($angle)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $angle);\n        }\n\n        try {\n            $angle = Helpers::validateNumericNullBool($angle);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return tanh($angle);\n    }\n\n    /**\n     * ATAN.\n     *\n     * Returns the arctangent of a number.\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The arctangent of the number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function atan($number)\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::numberOrNan(atan($number));\n    }\n\n    /**\n     * ATANH.\n     *\n     * Returns the inverse hyperbolic tangent of a number.\n     *\n     * @param array<mixed>|float $number Number, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The inverse hyperbolic tangent of the number\n     *         If an array of numbers is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function atanh($number)\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return Helpers::numberOrNan(atanh($number));\n    }\n\n    /**\n     * ATAN2.\n     *\n     * This function calculates the arc tangent of the two variables x and y. It is similar to\n     *        calculating the arc tangent of y ÷ x, except that the signs of both arguments are used\n     *        to determine the quadrant of the result.\n     * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a\n     *        point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between\n     *        -pi and pi, excluding -pi.\n     *\n     * Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard\n     *        PHP atan2() function, so we need to reverse them here before calling the PHP atan() function.\n     *\n     * Excel Function:\n     *        ATAN2(xCoordinate,yCoordinate)\n     *\n     * @param mixed $xCoordinate should be float, the x-coordinate of the point, or can be an array of numbers\n     * @param mixed $yCoordinate should be float, the y-coordinate of the point, or can be an array of numbers\n     *\n     * @return array<mixed>|float|string The inverse tangent of the specified x- and y-coordinates, or a string containing an error\n     *         If an array of numbers is passed as one of the arguments, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function atan2(mixed $xCoordinate, mixed $yCoordinate): array|string|float\n    {\n        if (is_array($xCoordinate) || is_array($yCoordinate)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $xCoordinate, $yCoordinate);\n        }\n\n        try {\n            $xCoordinate = Helpers::validateNumericNullBool($xCoordinate);\n            $yCoordinate = Helpers::validateNumericNullBool($yCoordinate);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($xCoordinate == 0) && ($yCoordinate == 0)) {\n            return ExcelError::DIV0();\n        }\n\n        return atan2($yCoordinate, $xCoordinate);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/MathTrig/Trunc.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\n\nclass Trunc\n{\n    use ArrayEnabled;\n\n    /**\n     * TRUNC.\n     *\n     * Truncates value to the number of fractional digits by number_digits.\n     * This will probably not be the precise result in the unlikely\n     * event that the number of digits to the left of the decimal\n     * plus the number of digits to the right exceeds PHP_FLOAT_DIG\n     * (or possibly that value minus 1).\n     * Excel is unlikely to do any better.\n     *\n     * @param null|array<mixed>|float|string $value Or can be an array of values\n     * @param array<mixed>|float|int|string $digits Or can be an array of values\n     *\n     * @return array<mixed>|float|string Truncated value, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function evaluate(array|float|string|null $value = 0, array|float|int|string $digits = 0): array|float|string\n    {\n        if (is_array($value) || is_array($digits)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $digits);\n        }\n\n        return Round::down($value, $digits);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/AggregateBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nabstract class AggregateBase\n{\n    /**\n     * MS Excel does not count Booleans if passed as cell values, but they are counted if passed as literals.\n     * OpenOffice Calc always counts Booleans.\n     * Gnumeric never counts Booleans.\n     */\n    protected static function testAcceptedBoolean(mixed $arg, mixed $k): mixed\n    {\n        if (!is_bool($arg)) {\n            return $arg;\n        }\n        if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_GNUMERIC) {\n            return $arg;\n        }\n        if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {\n            return (int) $arg;\n        }\n        if (!Functions::isCellValue($k)) {\n            return (int) $arg;\n        }\n        /*if (\n            (is_bool($arg)) &&\n            ((!Functions::isCellValue($k) && (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_EXCEL)) ||\n                (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE))\n        ) {\n            $arg = (int) $arg;\n        }*/\n\n        return $arg;\n    }\n\n    protected static function isAcceptedCountable(mixed $arg, mixed $k, bool $countNull = false): bool\n    {\n        if ($countNull && $arg === null && !Functions::isCellValue($k) && Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_GNUMERIC) {\n            return true;\n        }\n        if (!is_numeric($arg)) {\n            return false;\n        }\n        if (!is_string($arg)) {\n            return true;\n        }\n        if (!Functions::isCellValue($k) && Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {\n            return true;\n        }\n        if (!Functions::isCellValue($k) && Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_GNUMERIC) {\n            return true;\n        }\n\n        return false;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Averages/Mean.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Counts;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Minimum;\n\nclass Mean\n{\n    /**\n     * GEOMEAN.\n     *\n     * Returns the geometric mean of an array or range of positive data. For example, you\n     *        can use GEOMEAN to calculate average growth rate given compound interest with\n     *        variable rates.\n     *\n     * Excel Function:\n     *        GEOMEAN(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function geometric(mixed ...$args): float|int|string\n    {\n        $aArgs = Functions::flattenArray($args);\n\n        $aMean = MathTrig\\Operations::product($aArgs);\n        if (is_numeric($aMean) && ($aMean > 0)) {\n            $aCount = Counts::COUNT($aArgs);\n            if (Minimum::min($aArgs) > 0) {\n                return $aMean ** (1 / $aCount);\n            }\n        }\n\n        return ExcelError::NAN();\n    }\n\n    /**\n     * HARMEAN.\n     *\n     * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the\n     *        arithmetic mean of reciprocals.\n     *\n     * Excel Function:\n     *        HARMEAN(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function harmonic(mixed ...$args): string|float|int\n    {\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n        if (Minimum::min($aArgs) < 0) {\n            return ExcelError::NAN();\n        }\n\n        $returnValue = 0;\n        $aCount = 0;\n        foreach ($aArgs as $arg) {\n            // Is it a numeric value?\n            if ((is_numeric($arg)) && (!is_string($arg))) {\n                if ($arg <= 0) {\n                    return ExcelError::NAN();\n                }\n                $returnValue += (1 / $arg);\n                ++$aCount;\n            }\n        }\n\n        // Return\n        if ($aCount > 0) {\n            return 1 / ($returnValue / $aCount);\n        }\n\n        return ExcelError::NA();\n    }\n\n    /**\n     * TRIMMEAN.\n     *\n     * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean\n     *        taken by excluding a percentage of data points from the top and bottom tails\n     *        of a data set.\n     *\n     * Excel Function:\n     *        TRIMEAN(value1[,value2[, ...]], $discard)\n     *\n     * @param mixed $args Data values\n     */\n    public static function trim(mixed ...$args): float|string\n    {\n        $aArgs = Functions::flattenArray($args);\n\n        // Calculate\n        $percent = array_pop($aArgs);\n\n        if ((is_numeric($percent)) && (!is_string($percent))) {\n            if (($percent < 0) || ($percent > 1)) {\n                return ExcelError::NAN();\n            }\n\n            $mArgs = [];\n            foreach ($aArgs as $arg) {\n                // Is it a numeric value?\n                if ((is_numeric($arg)) && (!is_string($arg))) {\n                    $mArgs[] = $arg;\n                }\n            }\n\n            $discard = floor(Counts::COUNT($mArgs) * $percent / 2);\n            sort($mArgs);\n\n            for ($i = 0; $i < $discard; ++$i) {\n                array_pop($mArgs);\n                array_shift($mArgs);\n            }\n\n            return Averages::average($mArgs);\n        }\n\n        return ExcelError::VALUE();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Averages.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Averages extends AggregateBase\n{\n    /**\n     * AVEDEV.\n     *\n     * Returns the average of the absolute deviations of data points from their mean.\n     * AVEDEV is a measure of the variability in a data set.\n     *\n     * Excel Function:\n     *        AVEDEV(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|string (string if result is an error)\n     */\n    public static function averageDeviations(mixed ...$args): string|float\n    {\n        $aArgs = Functions::flattenArrayIndexed($args);\n\n        // Return value\n        $returnValue = 0.0;\n\n        $aMean = self::average(...$args);\n        if ($aMean === ExcelError::DIV0()) {\n            return ExcelError::NAN();\n        } elseif ($aMean === ExcelError::VALUE()) {\n            return ExcelError::VALUE();\n        }\n\n        $aCount = 0;\n        foreach ($aArgs as $k => $arg) {\n            $arg = self::testAcceptedBoolean($arg, $k);\n            // Is it a numeric value?\n            // Strings containing numeric values are only counted if they are string literals (not cell values)\n            //    and then only in MS Excel and in Open Office, not in Gnumeric\n            if ((is_string($arg)) && (!is_numeric($arg)) && (!Functions::isCellValue($k))) {\n                return ExcelError::VALUE();\n            }\n            if (self::isAcceptedCountable($arg, $k)) {\n                /** @var float|int|numeric-string $arg */\n                /** @var float|int|numeric-string $aMean */\n                $returnValue += abs($arg - $aMean);\n                ++$aCount;\n            }\n        }\n\n        // Return\n        if ($aCount === 0) {\n            return ExcelError::DIV0();\n        }\n\n        return $returnValue / $aCount;\n    }\n\n    /**\n     * AVERAGE.\n     *\n     * Returns the average (arithmetic mean) of the arguments\n     *\n     * Excel Function:\n     *        AVERAGE(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|int|string (string if result is an error)\n     */\n    public static function average(mixed ...$args): string|int|float\n    {\n        $returnValue = $aCount = 0;\n\n        // Loop through arguments\n        foreach (Functions::flattenArrayIndexed($args) as $k => $arg) {\n            $arg = self::testAcceptedBoolean($arg, $k);\n            // Is it a numeric value?\n            // Strings containing numeric values are only counted if they are string literals (not cell values)\n            //    and then only in MS Excel and in Open Office, not in Gnumeric\n            if ((is_string($arg)) && (!is_numeric($arg)) && (!Functions::isCellValue($k))) {\n                return ExcelError::VALUE();\n            }\n            if (self::isAcceptedCountable($arg, $k)) {\n                /** @var float|int|numeric-string $arg */\n                $returnValue += $arg;\n                ++$aCount;\n            }\n        }\n\n        // Return\n        if ($aCount > 0) {\n            return $returnValue / $aCount;\n        }\n\n        return ExcelError::DIV0();\n    }\n\n    /**\n     * AVERAGEA.\n     *\n     * Returns the average of its arguments, including numbers, text, and logical values\n     *\n     * Excel Function:\n     *        AVERAGEA(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|int|string (string if result is an error)\n     */\n    public static function averageA(mixed ...$args): string|int|float\n    {\n        $returnValue = null;\n\n        $aCount = 0;\n        // Loop through arguments\n        foreach (Functions::flattenArrayIndexed($args) as $k => $arg) {\n            if (is_numeric($arg)) {\n                // do nothing\n            } elseif (is_bool($arg)) {\n                $arg = (int) $arg;\n            } elseif (!Functions::isMatrixValue($k)) {\n                $arg = 0;\n            } else {\n                return ExcelError::VALUE();\n            }\n            $returnValue += $arg;\n            ++$aCount;\n        }\n\n        if ($aCount > 0) {\n            return $returnValue / $aCount;\n        }\n\n        return ExcelError::DIV0();\n    }\n\n    /**\n     * MEDIAN.\n     *\n     * Returns the median of the given numbers. The median is the number in the middle of a set of numbers.\n     *\n     * Excel Function:\n     *        MEDIAN(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function median(mixed ...$args): float|string\n    {\n        $aArgs = Functions::flattenArray($args);\n\n        $returnValue = ExcelError::NAN();\n\n        /** @var array<float|int> */\n        $aArgs = self::filterArguments($aArgs);\n        $valueCount = count($aArgs);\n        if ($valueCount > 0) {\n            sort($aArgs, SORT_NUMERIC);\n            $valueCount = $valueCount / 2;\n            if ($valueCount == floor($valueCount)) {\n                $returnValue = ($aArgs[$valueCount--] + $aArgs[$valueCount]) / 2; //* @phpstan-ignore-line\n            } else {\n                $valueCount = (int) floor($valueCount);\n                $returnValue = $aArgs[$valueCount];\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * MODE.\n     *\n     * Returns the most frequently occurring, or repetitive, value in an array or range of data\n     *\n     * Excel Function:\n     *        MODE(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function mode(mixed ...$args): float|string\n    {\n        $returnValue = ExcelError::NA();\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n        $aArgs = self::filterArguments($aArgs);\n\n        if (!empty($aArgs)) {\n            return self::modeCalc($aArgs);\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[]\n     */\n    protected static function filterArguments(array $args): array\n    {\n        return array_filter(\n            $args,\n            function ($value): bool {\n                // Is it a numeric value?\n                return is_numeric($value) && (!is_string($value));\n            }\n        );\n    }\n\n    /**\n     * Special variant of array_count_values that isn't limited to strings and integers,\n     * but can work with floating point numbers as values.\n     *\n     * @param mixed[] $data\n     */\n    private static function modeCalc(array $data): float|string\n    {\n        $frequencyArray = [];\n        $index = 0;\n        $maxfreq = 0;\n        $maxfreqkey = '';\n        $maxfreqdatum = '';\n        foreach ($data as $datum) {\n            /** @var float|string $datum */\n            $found = false;\n            ++$index;\n            foreach ($frequencyArray as $key => $value) {\n                /** @var string[] $value */\n                if ((string) $value['value'] == (string) $datum) {\n                    ++$frequencyArray[$key]['frequency'];\n                    $freq = $frequencyArray[$key]['frequency'];\n                    if ($freq > $maxfreq) {\n                        $maxfreq = $freq;\n                        $maxfreqkey = $key;\n                        $maxfreqdatum = $datum;\n                    } elseif ($freq == $maxfreq) {\n                        if ($frequencyArray[$key]['index'] < $frequencyArray[$maxfreqkey]['index']) { //* @phpstan-ignore-line\n                            $maxfreqkey = $key;\n                            $maxfreqdatum = $datum;\n                        }\n                    }\n                    $found = true;\n\n                    break;\n                }\n            }\n\n            if ($found === false) {\n                $frequencyArray[] = [\n                    'value' => $datum,\n                    'frequency' => 1,\n                    'index' => $index,\n                ];\n            }\n        }\n\n        if ($maxfreq <= 1) {\n            return ExcelError::NA();\n        }\n\n        return $maxfreqdatum;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Conditional.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DAverage;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DCount;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DMax;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DMin;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DSum;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Conditional\n{\n    private const CONDITION_COLUMN_NAME = 'CONDITION';\n    private const VALUE_COLUMN_NAME = 'VALUE';\n    private const CONDITIONAL_COLUMN_NAME = 'CONDITIONAL %d';\n\n    /**\n     * AVERAGEIF.\n     *\n     * Returns the average value from a range of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        AVERAGEIF(range,condition[, average_range])\n     *\n     * @param mixed $range Data values, expect array\n     * @param null|mixed[]|string $condition the criteria that defines which cells will be checked\n     * @param mixed $averageRange Data values\n     */\n    public static function AVERAGEIF(mixed $range, null|array|string $condition, mixed $averageRange = []): null|int|float|string\n    {\n        if (!is_array($range) || !is_array($averageRange) || array_key_exists(0, $range) || array_key_exists(0, $averageRange)) {\n            $refError = ExcelError::REF();\n            if (in_array($refError, [$range, $averageRange], true)) {\n                return $refError;\n            }\n\n            throw new CalcException('Must specify range of cells, not any kind of literal');\n        }\n        $database = self::databaseFromRangeAndValue($range, $averageRange);\n        $condition = Functions::flattenSingleValue($condition);\n        $condition = [[self::CONDITION_COLUMN_NAME, self::VALUE_COLUMN_NAME], [$condition, null]];\n\n        return DAverage::evaluate($database, self::VALUE_COLUMN_NAME, $condition);\n    }\n\n    /**\n     * AVERAGEIFS.\n     *\n     * Counts the number of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2]…)\n     *\n     * @param mixed $args Pairs of Ranges and Criteria\n     */\n    public static function AVERAGEIFS(mixed ...$args): null|int|float|string\n    {\n        if (empty($args)) {\n            return 0.0;\n        }\n        if (count($args) === 3) {\n            return self::AVERAGEIF($args[1], $args[2], $args[0]); //* @phpstan-ignore-line\n        }\n        foreach ($args as $arg) {\n            if (is_array($arg) && array_key_exists(0, $arg)) {\n                throw new CalcException('Must specify range of cells, not any kind of literal');\n            }\n        }\n\n        $conditions = self::buildConditionSetForValueRange(...$args);\n        $database = self::buildDatabaseWithValueRange(...$args);\n\n        return DAverage::evaluate($database, self::VALUE_COLUMN_NAME, $conditions);\n    }\n\n    /**\n     * COUNTIF.\n     *\n     * Counts the number of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        COUNTIF(range,condition)\n     *\n     * @param mixed $range Data values, expect array\n     * @param null|mixed[]|string $condition the criteria that defines which cells will be counted\n     */\n    public static function COUNTIF(mixed $range, null|array|string $condition): string|int\n    {\n        if (\n            !is_array($range)\n            || array_key_exists(0, $range)\n        ) {\n            if ($range === ExcelError::REF()) {\n                return $range;\n            }\n\n            throw new CalcException('Must specify range of cells, not any kind of literal');\n        }\n        // Filter out any empty values that shouldn't be included in a COUNT\n        $range = array_filter(\n            Functions::flattenArray($range),\n            fn ($value): bool => $value !== null && $value !== ''\n        );\n\n        $range = array_merge([[self::CONDITION_COLUMN_NAME]], array_chunk($range, 1));\n        $condition = Functions::flattenSingleValue($condition);\n        $condition = array_merge([[self::CONDITION_COLUMN_NAME]], [[$condition]]);\n\n        return DCount::evaluate($range, null, $condition, false);\n    }\n\n    /**\n     * COUNTIFS.\n     *\n     * Counts the number of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)\n     *\n     * @param mixed $args Pairs of Ranges and Criteria\n     */\n    public static function COUNTIFS(mixed ...$args): int|string\n    {\n        if (empty($args)) {\n            return 0;\n        } elseif (count($args) === 2) {\n            return self::COUNTIF(...$args);\n        }\n\n        $database = self::buildDatabase(...$args);\n        $conditions = self::buildConditionSet(...$args);\n\n        return DCount::evaluate($database, null, $conditions, false);\n    }\n\n    /**\n     * MAXIFS.\n     *\n     * Returns the maximum value within a range of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2]…)\n     *\n     * @param mixed $args Pairs of Ranges and Criteria\n     */\n    public static function MAXIFS(mixed ...$args): null|float|string\n    {\n        if (empty($args)) {\n            return 0.0;\n        }\n\n        $conditions = self::buildConditionSetForValueRange(...$args);\n        $database = self::buildDatabaseWithValueRange(...$args);\n\n        return DMax::evaluate($database, self::VALUE_COLUMN_NAME, $conditions, false);\n    }\n\n    /**\n     * MINIFS.\n     *\n     * Returns the minimum value within a range of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2]…)\n     *\n     * @param mixed $args Pairs of Ranges and Criteria\n     */\n    public static function MINIFS(mixed ...$args): null|float|string\n    {\n        if (empty($args)) {\n            return 0.0;\n        }\n\n        $conditions = self::buildConditionSetForValueRange(...$args);\n        $database = self::buildDatabaseWithValueRange(...$args);\n\n        return DMin::evaluate($database, self::VALUE_COLUMN_NAME, $conditions, false);\n    }\n\n    /**\n     * SUMIF.\n     *\n     * Totals the values of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        SUMIF(range, criteria, [sum_range])\n     *\n     * @param mixed $range Data values, expecting array\n     * @param mixed $sumRange Data values, expecting array\n     */\n    public static function SUMIF(mixed $range, mixed $condition, mixed $sumRange = []): null|float|string\n    {\n        if (\n            !is_array($range)\n            || array_key_exists(0, $range)\n            || !is_array($sumRange)\n            || array_key_exists(0, $sumRange)\n        ) {\n            $refError = ExcelError::REF();\n            if (in_array($refError, [$range, $sumRange], true)) {\n                return $refError;\n            }\n\n            throw new CalcException('Must specify range of cells, not any kind of literal');\n        }\n        $database = self::databaseFromRangeAndValue($range, $sumRange);\n        $condition = Functions::flattenSingleValue($condition);\n        $condition = [[self::CONDITION_COLUMN_NAME, self::VALUE_COLUMN_NAME], [$condition, null]];\n\n        return DSum::evaluate($database, self::VALUE_COLUMN_NAME, $condition);\n    }\n\n    /**\n     * SUMIFS.\n     *\n     * Counts the number of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        SUMIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2]…)\n     *\n     * @param mixed $args Pairs of Ranges and Criteria\n     */\n    public static function SUMIFS(mixed ...$args): null|float|string\n    {\n        if (empty($args)) {\n            return 0.0;\n        } elseif (count($args) === 3) {\n            return self::SUMIF($args[1], $args[2], $args[0]);\n        }\n\n        $conditions = self::buildConditionSetForValueRange(...$args);\n        $database = self::buildDatabaseWithValueRange(...$args);\n\n        return DSum::evaluate($database, self::VALUE_COLUMN_NAME, $conditions);\n    }\n\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[][]\n     */\n    private static function buildConditionSet(...$args): array\n    {\n        $conditions = self::buildConditions(1, ...$args);\n\n        return array_map(null, ...$conditions);\n    }\n\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[][]\n     */\n    private static function buildConditionSetForValueRange(...$args): array\n    {\n        $conditions = self::buildConditions(2, ...$args);\n\n        if (count($conditions) === 1) {\n            return array_map(\n                fn ($value): array => [$value],\n                $conditions[0]\n            );\n        }\n\n        return array_map(null, ...$conditions);\n    }\n\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[][]\n     */\n    private static function buildConditions(int $startOffset, ...$args): array\n    {\n        $conditions = [];\n\n        $pairCount = 1;\n        $argumentCount = count($args);\n        for ($argument = $startOffset; $argument < $argumentCount; $argument += 2) {\n            $conditions[] = array_merge([sprintf(self::CONDITIONAL_COLUMN_NAME, $pairCount)], [$args[$argument]]);\n            ++$pairCount;\n        }\n\n        return $conditions;\n    }\n\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[]\n     */\n    private static function buildDatabase(...$args): array\n    {\n        $database = [];\n\n        return self::buildDataSet(0, $database, ...$args);\n    }\n\n    /**\n     * @param mixed[] $args\n     *\n     * @return mixed[]\n     */\n    private static function buildDatabaseWithValueRange(...$args): array\n    {\n        $database = [];\n        $database[] = array_merge(\n            [self::VALUE_COLUMN_NAME],\n            Functions::flattenArray($args[0])\n        );\n\n        return self::buildDataSet(1, $database, ...$args);\n    }\n\n    /**\n     * @param mixed[][] $database\n     * @param mixed[] $args\n     *\n     * @return mixed[]\n     */\n    private static function buildDataSet(int $startOffset, array $database, ...$args): array\n    {\n        $pairCount = 1;\n        $argumentCount = count($args);\n        for ($argument = $startOffset; $argument < $argumentCount; $argument += 2) {\n            $database[] = array_merge(\n                [sprintf(self::CONDITIONAL_COLUMN_NAME, $pairCount)],\n                Functions::flattenArray($args[$argument])\n            );\n            ++$pairCount;\n        }\n\n        return array_map(null, ...$database);\n    }\n\n    /**\n     * @param mixed[] $range\n     * @param mixed[] $valueRange\n     *\n     * @return mixed[]\n     */\n    private static function databaseFromRangeAndValue(array $range, array $valueRange = []): array\n    {\n        $range = Functions::flattenArray($range);\n\n        $valueRange = Functions::flattenArray($valueRange);\n        if (empty($valueRange)) {\n            $valueRange = $range;\n        }\n\n        $database = array_map(null, array_merge([self::CONDITION_COLUMN_NAME], $range), array_merge([self::VALUE_COLUMN_NAME], $valueRange));\n\n        return $database;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Confidence.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Confidence\n{\n    use ArrayEnabled;\n\n    /**\n     * CONFIDENCE.\n     *\n     * Returns the confidence interval for a population mean\n     *\n     * @param mixed $alpha As a float\n     *                      Or can be an array of values\n     * @param mixed $stdDev Standard Deviation as a float\n     *                      Or can be an array of values\n     * @param mixed $size As an integer\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function CONFIDENCE(mixed $alpha, mixed $stdDev, mixed $size)\n    {\n        if (is_array($alpha) || is_array($stdDev) || is_array($size)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $alpha, $stdDev, $size);\n        }\n\n        try {\n            $alpha = StatisticalValidations::validateFloat($alpha);\n            $stdDev = StatisticalValidations::validateFloat($stdDev);\n            $size = StatisticalValidations::validateInt($size);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($alpha <= 0) || ($alpha >= 1) || ($stdDev <= 0) || ($size < 1)) {\n            return ExcelError::NAN();\n        }\n        /** @var float $temp */\n        $temp = Distributions\\StandardNormal::inverse(1 - $alpha / 2);\n\n        /** @var float */\n        $result = Functions::scalar($temp * $stdDev / sqrt($size));\n\n        return $result;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Counts.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass Counts extends AggregateBase\n{\n    /**\n     * COUNT.\n     *\n     * Counts the number of cells that contain numbers within the list of arguments\n     *\n     * Excel Function:\n     *        COUNT(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function COUNT(mixed ...$args): int\n    {\n        $returnValue = 0;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArrayIndexed($args);\n        foreach ($aArgs as $k => $arg) {\n            $arg = self::testAcceptedBoolean($arg, $k);\n            // Is it a numeric value?\n            // Strings containing numeric values are only counted if they are string literals (not cell values)\n            //    and then only in MS Excel and in Open Office, not in Gnumeric\n            if (self::isAcceptedCountable($arg, $k, true)) {\n                ++$returnValue;\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * COUNTA.\n     *\n     * Counts the number of cells that are not empty within the list of arguments\n     *\n     * Excel Function:\n     *        COUNTA(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function COUNTA(mixed ...$args): int\n    {\n        $returnValue = 0;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArrayIndexed($args);\n        foreach ($aArgs as $k => $arg) {\n            // Nulls are counted if literals, but not if cell values\n            if ($arg !== null || (!Functions::isCellValue($k))) {\n                ++$returnValue;\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * COUNTBLANK.\n     *\n     * Counts the number of empty cells within the list of arguments\n     *\n     * Excel Function:\n     *        COUNTBLANK(value1[,value2[, ...]])\n     *\n     * @param mixed $range Data values\n     */\n    public static function COUNTBLANK(mixed $range): int\n    {\n        if ($range === null) {\n            return 1;\n        }\n        if (!is_array($range) || array_key_exists(0, $range)) {\n            throw new CalcException('Must specify range of cells, not any kind of literal');\n        }\n        $returnValue = 0;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($range);\n        foreach ($aArgs as $arg) {\n            // Is it a blank cell?\n            if (($arg === null) || ((is_string($arg)) && ($arg == ''))) {\n                ++$returnValue;\n            }\n        }\n\n        return $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Deviations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Deviations\n{\n    /**\n     * DEVSQ.\n     *\n     * Returns the sum of squares of deviations of data points from their sample mean.\n     *\n     * Excel Function:\n     *        DEVSQ(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function sumSquares(mixed ...$args): string|float\n    {\n        $aArgs = Functions::flattenArrayIndexed($args);\n\n        $aMean = Averages::average($aArgs);\n        if (!is_numeric($aMean)) {\n            return ExcelError::NAN();\n        }\n\n        // Return value\n        $returnValue = 0.0;\n        $aCount = -1;\n        foreach ($aArgs as $k => $arg) {\n            // Is it a numeric value?\n            if (\n                (is_bool($arg))\n                && ((!Functions::isCellValue($k))\n                    || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))\n            ) {\n                $arg = (int) $arg;\n            }\n            if ((is_numeric($arg)) && (!is_string($arg))) {\n                $returnValue += ($arg - $aMean) ** 2;\n                ++$aCount;\n            }\n        }\n\n        return $aCount === 0 ? ExcelError::VALUE() : $returnValue;\n    }\n\n    /**\n     * KURT.\n     *\n     * Returns the kurtosis of a data set. Kurtosis characterizes the relative peakedness\n     * or flatness of a distribution compared with the normal distribution. Positive\n     * kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a\n     * relatively flat distribution.\n     *\n     * @param mixed[] ...$args Data Series\n     */\n    public static function kurtosis(...$args): string|int|float\n    {\n        $aArgs = Functions::flattenArrayIndexed($args);\n        $mean = Averages::average($aArgs);\n        if (!is_numeric($mean)) {\n            return ExcelError::DIV0();\n        }\n        $stdDev = (float) StandardDeviations::STDEV($aArgs);\n\n        if ($stdDev > 0) {\n            $count = $summer = 0;\n\n            foreach ($aArgs as $k => $arg) {\n                if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {\n                } else {\n                    // Is it a numeric value?\n                    if ((is_numeric($arg)) && (!is_string($arg))) {\n                        $summer += (($arg - $mean) / $stdDev) ** 4;\n                        ++$count;\n                    }\n                }\n            }\n\n            if ($count > 3) {\n                return $summer * ($count * ($count + 1)\n                        / (($count - 1) * ($count - 2) * ($count - 3))) - (3 * ($count - 1) ** 2\n                        / (($count - 2) * ($count - 3)));\n            }\n        }\n\n        return ExcelError::DIV0();\n    }\n\n    /**\n     * SKEW.\n     *\n     * Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry\n     * of a distribution around its mean. Positive skewness indicates a distribution with an\n     * asymmetric tail extending toward more positive values. Negative skewness indicates a\n     * distribution with an asymmetric tail extending toward more negative values.\n     *\n     * @param mixed[] ...$args Data Series\n     *\n     * @return float|int|string The result, or a string containing an error\n     */\n    public static function skew(...$args): string|int|float\n    {\n        $aArgs = Functions::flattenArrayIndexed($args);\n        $mean = Averages::average($aArgs);\n        if (!is_numeric($mean)) {\n            return ExcelError::DIV0();\n        }\n        $stdDev = StandardDeviations::STDEV($aArgs);\n        if ($stdDev === 0.0 || is_string($stdDev)) {\n            return ExcelError::DIV0();\n        }\n\n        $count = $summer = 0;\n        // Loop through arguments\n        foreach ($aArgs as $k => $arg) {\n            if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {\n            } elseif (!is_numeric($arg)) {\n                return ExcelError::VALUE();\n            } else {\n                // Is it a numeric value?\n                if (!is_string($arg)) {\n                    $summer += (($arg - $mean) / $stdDev) ** 3;\n                    ++$count;\n                }\n            }\n        }\n\n        if ($count > 2) {\n            return $summer * ($count / (($count - 1) * ($count - 2)));\n        }\n\n        return ExcelError::DIV0();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Beta\n{\n    use ArrayEnabled;\n\n    private const MAX_ITERATIONS = 256;\n\n    private const LOG_GAMMA_X_MAX_VALUE = 2.55e305;\n\n    private const XMININ = 2.23e-308;\n\n    /**\n     * BETADIST.\n     *\n     * Returns the beta distribution.\n     *\n     * @param mixed $value Float value at which you want to evaluate the distribution\n     *                      Or can be an array of values\n     * @param mixed $alpha Parameter to the distribution as a float\n     *                      Or can be an array of values\n     * @param mixed $beta Parameter to the distribution as a float\n     *                      Or can be an array of values\n     * @param mixed $rMin as a float\n     *                      Or can be an array of values\n     * @param mixed $rMax as a float\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $alpha, mixed $beta, mixed $rMin = 0.0, mixed $rMax = 1.0): array|string|float\n    {\n        if (is_array($value) || is_array($alpha) || is_array($beta) || is_array($rMin) || is_array($rMax)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $alpha, $beta, $rMin, $rMax);\n        }\n\n        $rMin = $rMin ?? 0.0;\n        $rMax = $rMax ?? 1.0;\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $alpha = DistributionValidations::validateFloat($alpha);\n            $beta = DistributionValidations::validateFloat($beta);\n            $rMax = DistributionValidations::validateFloat($rMax);\n            $rMin = DistributionValidations::validateFloat($rMin);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($rMin > $rMax) {\n            $tmp = $rMin;\n            $rMin = $rMax;\n            $rMax = $tmp;\n        }\n        if (($value < $rMin) || ($value > $rMax) || ($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax)) {\n            return ExcelError::NAN();\n        }\n\n        $value -= $rMin;\n        $value /= ($rMax - $rMin);\n\n        return self::incompleteBeta($value, $alpha, $beta);\n    }\n\n    /**\n     * BETAINV.\n     *\n     * Returns the inverse of the Beta distribution.\n     *\n     * @param mixed $probability Float probability at which you want to evaluate the distribution\n     *                      Or can be an array of values\n     * @param mixed $alpha Parameter to the distribution as a float\n     *                      Or can be an array of values\n     * @param mixed $beta Parameter to the distribution as a float\n     *                      Or can be an array of values\n     * @param mixed $rMin Minimum value as a float\n     *                      Or can be an array of values\n     * @param mixed $rMax Maximum value as a float\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverse(mixed $probability, mixed $alpha, mixed $beta, mixed $rMin = 0.0, mixed $rMax = 1.0): array|string|float\n    {\n        if (is_array($probability) || is_array($alpha) || is_array($beta) || is_array($rMin) || is_array($rMax)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $alpha, $beta, $rMin, $rMax);\n        }\n\n        $rMin = $rMin ?? 0.0;\n        $rMax = $rMax ?? 1.0;\n\n        try {\n            $probability = DistributionValidations::validateProbability($probability);\n            $alpha = DistributionValidations::validateFloat($alpha);\n            $beta = DistributionValidations::validateFloat($beta);\n            $rMax = DistributionValidations::validateFloat($rMax);\n            $rMin = DistributionValidations::validateFloat($rMin);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($rMin > $rMax) {\n            $tmp = $rMin;\n            $rMin = $rMax;\n            $rMax = $tmp;\n        }\n        if (($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax) || ($probability <= 0.0)) {\n            return ExcelError::NAN();\n        }\n\n        return self::calculateInverse($probability, $alpha, $beta, $rMin, $rMax);\n    }\n\n    private static function calculateInverse(float $probability, float $alpha, float $beta, float $rMin, float $rMax): string|float\n    {\n        $a = 0;\n        $b = 2;\n        $guess = ($a + $b) / 2;\n\n        $i = 0;\n        while ((($b - $a) > Functions::PRECISION) && (++$i <= self::MAX_ITERATIONS)) {\n            $guess = ($a + $b) / 2;\n            $result = self::distribution($guess, $alpha, $beta);\n            if (($result === $probability) || ($result === 0.0)) {\n                $b = $a;\n            } elseif ($result > $probability) {\n                $b = $guess;\n            } else {\n                $a = $guess;\n            }\n        }\n\n        if ($i === self::MAX_ITERATIONS) {\n            return ExcelError::NA();\n        }\n\n        return round($rMin + $guess * ($rMax - $rMin), 12);\n    }\n\n    /**\n     * Incomplete beta function.\n     *\n     * @author Jaco van Kooten\n     * @author Paul Meagher\n     *\n     * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992).\n     *\n     * @param float $x require 0<=x<=1\n     * @param float $p require p>0\n     * @param float $q require q>0\n     *\n     * @return float 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow\n     */\n    public static function incompleteBeta(float $x, float $p, float $q): float\n    {\n        if ($x <= 0.0) {\n            return 0.0;\n        } elseif ($x >= 1.0) {\n            return 1.0;\n        } elseif (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) {\n            return 0.0;\n        }\n\n        $beta_gam = exp((0 - self::logBeta($p, $q)) + $p * log($x) + $q * log(1.0 - $x));\n        if ($x < ($p + 1.0) / ($p + $q + 2.0)) {\n            return $beta_gam * self::betaFraction($x, $p, $q) / $p;\n        }\n\n        return 1.0 - ($beta_gam * self::betaFraction(1 - $x, $q, $p) / $q);\n    }\n\n    // Function cache for logBeta function\n\n    private static float $logBetaCacheP = 0.0;\n\n    private static float $logBetaCacheQ = 0.0;\n\n    private static float $logBetaCacheResult = 0.0;\n\n    /**\n     * The natural logarithm of the beta function.\n     *\n     * @param float $p require p>0\n     * @param float $q require q>0\n     *\n     * @return float 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow\n     *\n     * @author Jaco van Kooten\n     */\n    private static function logBeta(float $p, float $q): float\n    {\n        if ($p != self::$logBetaCacheP || $q != self::$logBetaCacheQ) {\n            self::$logBetaCacheP = $p;\n            self::$logBetaCacheQ = $q;\n            if (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) {\n                self::$logBetaCacheResult = 0.0;\n            } else {\n                self::$logBetaCacheResult = Gamma::logGamma($p) + Gamma::logGamma($q) - Gamma::logGamma($p + $q);\n            }\n        }\n\n        return self::$logBetaCacheResult;\n    }\n\n    /**\n     * Evaluates of continued fraction part of incomplete beta function.\n     * Based on an idea from Numerical Recipes (W.H. Press et al, 1992).\n     *\n     * @author Jaco van Kooten\n     */\n    private static function betaFraction(float $x, float $p, float $q): float\n    {\n        $c = 1.0;\n        $sum_pq = $p + $q;\n        $p_plus = $p + 1.0;\n        $p_minus = $p - 1.0;\n        $h = 1.0 - $sum_pq * $x / $p_plus;\n        if (abs($h) < self::XMININ) {\n            $h = self::XMININ;\n        }\n        $h = 1.0 / $h;\n        $frac = $h;\n        $m = 1;\n        $delta = 0.0;\n        while ($m <= self::MAX_ITERATIONS && abs($delta - 1.0) > Functions::PRECISION) {\n            $m2 = 2 * $m;\n            // even index for d\n            $d = $m * ($q - $m) * $x / (($p_minus + $m2) * ($p + $m2));\n            $h = 1.0 + $d * $h;\n            if (abs($h) < self::XMININ) {\n                $h = self::XMININ;\n            }\n            $h = 1.0 / $h;\n            $c = 1.0 + $d / $c;\n            if (abs($c) < self::XMININ) {\n                $c = self::XMININ;\n            }\n            $frac *= $h * $c;\n            // odd index for d\n            $d = -($p + $m) * ($sum_pq + $m) * $x / (($p + $m2) * ($p_plus + $m2));\n            $h = 1.0 + $d * $h;\n            if (abs($h) < self::XMININ) {\n                $h = self::XMININ;\n            }\n            $h = 1.0 / $h;\n            $c = 1.0 + $d / $c;\n            if (abs($c) < self::XMININ) {\n                $c = self::XMININ;\n            }\n            $delta = $h * $c;\n            $frac *= $delta;\n            ++$m;\n        }\n\n        return $frac;\n    }\n\n    /*\n    private static function betaValue(float $a, float $b): float\n    {\n        return (Gamma::gammaValue($a) * Gamma::gammaValue($b)) /\n            Gamma::gammaValue($a + $b);\n    }\n\n    private static function regularizedIncompleteBeta(float $value, float $a, float $b): float\n    {\n        return self::incompleteBeta($value, $a, $b) / self::betaValue($a, $b);\n    }\n    */\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Combinations;\n\nclass Binomial\n{\n    use ArrayEnabled;\n\n    /**\n     * BINOMDIST.\n     *\n     * Returns the individual term binomial distribution probability. Use BINOMDIST in problems with\n     *        a fixed number of tests or trials, when the outcomes of any trial are only success or failure,\n     *        when trials are independent, and when the probability of success is constant throughout the\n     *        experiment. For example, BINOMDIST can calculate the probability that two of the next three\n     *        babies born are male.\n     *\n     * @param mixed $value Integer number of successes in trials\n     *                      Or can be an array of values\n     * @param mixed $trials Integer umber of trials\n     *                      Or can be an array of values\n     * @param mixed $probability Probability of success on each trial as a float\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $trials, mixed $probability, mixed $cumulative)\n    {\n        if (is_array($value) || is_array($trials) || is_array($probability) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $trials, $probability, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateInt($value);\n            $trials = DistributionValidations::validateInt($trials);\n            $probability = DistributionValidations::validateProbability($probability);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value < 0) || ($value > $trials)) {\n            return ExcelError::NAN();\n        }\n\n        if ($cumulative) {\n            return self::calculateCumulativeBinomial($value, $trials, $probability);\n        }\n        /** @var float $comb */\n        $comb = Combinations::withoutRepetition($trials, $value);\n\n        return $comb * $probability ** $value\n            * (1 - $probability) ** ($trials - $value);\n    }\n\n    /**\n     * BINOM.DIST.RANGE.\n     *\n     * Returns the Binomial Distribution probability for the number of successes from a specified number\n     *     of trials falling into a specified range.\n     *\n     * @param mixed $trials Integer number of trials\n     *                      Or can be an array of values\n     * @param mixed $probability Probability of success on each trial as a float\n     *                      Or can be an array of values\n     * @param mixed $successes The integer number of successes in trials\n     *                      Or can be an array of values\n     * @param mixed $limit Upper limit for successes in trials as null, or an integer\n     *                           If null, then this will indicate the same as the number of Successes\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function range(mixed $trials, mixed $probability, mixed $successes, mixed $limit = null): array|string|float|int\n    {\n        if (is_array($trials) || is_array($probability) || is_array($successes) || is_array($limit)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $trials, $probability, $successes, $limit);\n        }\n\n        $limit = $limit ?? $successes;\n\n        try {\n            $trials = DistributionValidations::validateInt($trials);\n            $probability = DistributionValidations::validateProbability($probability);\n            $successes = DistributionValidations::validateInt($successes);\n            $limit = DistributionValidations::validateInt($limit);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($successes < 0) || ($successes > $trials)) {\n            return ExcelError::NAN();\n        }\n        if (($limit < 0) || ($limit > $trials) || $limit < $successes) {\n            return ExcelError::NAN();\n        }\n\n        $summer = 0;\n        for ($i = $successes; $i <= $limit; ++$i) {\n            /** @var float $comb */\n            $comb = Combinations::withoutRepetition($trials, $i);\n            $summer += $comb * $probability ** $i\n                * (1 - $probability) ** ($trials - $i);\n        }\n\n        return $summer;\n    }\n\n    /**\n     * NEGBINOMDIST.\n     *\n     * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that\n     *        there will be number_f failures before the number_s-th success, when the constant\n     *        probability of a success is probability_s. This function is similar to the binomial\n     *        distribution, except that the number of successes is fixed, and the number of trials is\n     *        variable. Like the binomial, trials are assumed to be independent.\n     *\n     * @param mixed $failures Number of Failures as an integer\n     *                      Or can be an array of values\n     * @param mixed $successes Threshold number of Successes as an integer\n     *                      Or can be an array of values\n     * @param mixed $probability Probability of success on each trial as a float\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     *\n     * TODO Add support for the cumulative flag not present for NEGBINOMDIST, but introduced for NEGBINOM.DIST\n     *      The cumulative default should be false to reflect the behaviour of NEGBINOMDIST\n     */\n    public static function negative(mixed $failures, mixed $successes, mixed $probability): array|string|float\n    {\n        if (is_array($failures) || is_array($successes) || is_array($probability)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $failures, $successes, $probability);\n        }\n\n        try {\n            $failures = DistributionValidations::validateInt($failures);\n            $successes = DistributionValidations::validateInt($successes);\n            $probability = DistributionValidations::validateProbability($probability);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($failures < 0) || ($successes < 1)) {\n            return ExcelError::NAN();\n        }\n        if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {\n            if (($failures + $successes - 1) <= 0) {\n                return ExcelError::NAN();\n            }\n        }\n        /** @var float $comb */\n        $comb = Combinations::withoutRepetition($failures + $successes - 1, $successes - 1);\n\n        return $comb\n            * ($probability ** $successes) * ((1 - $probability) ** $failures);\n    }\n\n    /**\n     * BINOM.INV.\n     *\n     * Returns the smallest value for which the cumulative binomial distribution is greater\n     *        than or equal to a criterion value\n     *\n     * @param mixed $trials number of Bernoulli trials as an integer\n     *                      Or can be an array of values\n     * @param mixed $probability probability of a success on each trial as a float\n     *                      Or can be an array of values\n     * @param mixed $alpha criterion value as a float\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|int|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverse(mixed $trials, mixed $probability, mixed $alpha): array|string|int\n    {\n        if (is_array($trials) || is_array($probability) || is_array($alpha)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $trials, $probability, $alpha);\n        }\n\n        try {\n            $trials = DistributionValidations::validateInt($trials);\n            $probability = DistributionValidations::validateProbability($probability);\n            $alpha = DistributionValidations::validateFloat($alpha);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($trials < 0) {\n            return ExcelError::NAN();\n        } elseif (($alpha < 0.0) || ($alpha > 1.0)) {\n            return ExcelError::NAN();\n        }\n\n        $successes = 0;\n        while ($successes <= $trials) {\n            $result = self::calculateCumulativeBinomial($successes, $trials, $probability);\n            if ($result >= $alpha) {\n                break;\n            }\n            ++$successes;\n        }\n\n        return $successes;\n    }\n\n    private static function calculateCumulativeBinomial(int $value, int $trials, float $probability): float|int\n    {\n        $summer = 0;\n        for ($i = 0; $i <= $value; ++$i) {\n            /** @var float $comb */\n            $comb = Combinations::withoutRepetition($trials, $i);\n            $summer += $comb * $probability ** $i\n                * (1 - $probability) ** ($trials - $i);\n        }\n\n        return $summer;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass ChiSquared\n{\n    use ArrayEnabled;\n\n    private const EPS = 2.22e-16;\n\n    /**\n     * CHIDIST.\n     *\n     * Returns the one-tailed probability of the chi-squared distribution.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $degrees Integer degrees of freedom\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distributionRightTail(mixed $value, mixed $degrees): array|string|int|float\n    {\n        if (is_array($value) || is_array($degrees)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $degrees);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $degrees = DistributionValidations::validateInt($degrees);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($degrees < 1) {\n            return ExcelError::NAN();\n        }\n        if ($value < 0) {\n            if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {\n                return 1;\n            }\n\n            return ExcelError::NAN();\n        }\n\n        return 1 - (Gamma::incompleteGamma($degrees / 2, $value / 2) / Gamma::gammaValue($degrees / 2));\n    }\n\n    /**\n     * CHIDIST.\n     *\n     * Returns the one-tailed probability of the chi-squared distribution.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $degrees Integer degrees of freedom\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distributionLeftTail(mixed $value, mixed $degrees, mixed $cumulative): array|string|int|float\n    {\n        if (is_array($value) || is_array($degrees) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $degrees, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $degrees = DistributionValidations::validateInt($degrees);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($degrees < 1) {\n            return ExcelError::NAN();\n        }\n        if ($value < 0) {\n            if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {\n                return 1;\n            }\n\n            return ExcelError::NAN();\n        }\n\n        if ($cumulative === true) {\n            $temp = self::distributionRightTail($value, $degrees);\n\n            return 1 - (is_numeric($temp) ? $temp : 0);\n        }\n\n        return ($value ** (($degrees / 2) - 1) * exp(-$value / 2))\n            / ((2 ** ($degrees / 2)) * Gamma::gammaValue($degrees / 2));\n    }\n\n    /**\n     * CHIINV.\n     *\n     * Returns the inverse of the right-tailed probability of the chi-squared distribution.\n     *\n     * @param mixed $probability Float probability at which you want to evaluate the distribution\n     *                      Or can be an array of values\n     * @param mixed $degrees Integer degrees of freedom\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverseRightTail(mixed $probability, mixed $degrees)\n    {\n        if (is_array($probability) || is_array($degrees)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $degrees);\n        }\n\n        try {\n            $probability = DistributionValidations::validateProbability($probability);\n            $degrees = DistributionValidations::validateInt($degrees);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($degrees < 1) {\n            return ExcelError::NAN();\n        }\n\n        $callback = fn (float $value): float => 1 - (Gamma::incompleteGamma($degrees / 2, $value / 2)\n                    / Gamma::gammaValue($degrees / 2));\n\n        $newtonRaphson = new NewtonRaphson($callback);\n\n        return $newtonRaphson->execute($probability);\n    }\n\n    /**\n     * CHIINV.\n     *\n     * Returns the inverse of the left-tailed probability of the chi-squared distribution.\n     *\n     * @param mixed $probability Float probability at which you want to evaluate the distribution\n     *                      Or can be an array of values\n     * @param mixed $degrees Integer degrees of freedom\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverseLeftTail(mixed $probability, mixed $degrees): array|string|float\n    {\n        if (is_array($probability) || is_array($degrees)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $degrees);\n        }\n\n        try {\n            $probability = DistributionValidations::validateProbability($probability);\n            $degrees = DistributionValidations::validateInt($degrees);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($degrees < 1) {\n            return ExcelError::NAN();\n        }\n\n        return self::inverseLeftTailCalculation($probability, $degrees);\n    }\n\n    /**\n     * CHITEST.\n     *\n     * Uses the chi-square test to calculate the probability that the differences between two supplied data sets\n     *      (of observed and expected frequencies), are likely to be simply due to sampling error,\n     *      or if they are likely to be real.\n     *\n     * @param float[] $actual an array of observed frequencies\n     * @param float[] $expected an array of expected frequencies\n     */\n    public static function test($actual, $expected): float|string\n    {\n        $rows = count($actual);\n        /** @var float[] */\n        $actual = Functions::flattenArray($actual);\n        /** @var float[] */\n        $expected = Functions::flattenArray($expected);\n        $columns = intdiv(count($actual), $rows);\n\n        $countActuals = count($actual);\n        $countExpected = count($expected);\n        if ($countActuals !== $countExpected || $countActuals === 1) {\n            return ExcelError::NAN();\n        }\n\n        $result = 0.0;\n        for ($i = 0; $i < $countActuals; ++$i) {\n            if ($expected[$i] == 0.0) {\n                return ExcelError::DIV0();\n            } elseif ($expected[$i] < 0.0) {\n                return ExcelError::NAN();\n            }\n            $result += (($actual[$i] - $expected[$i]) ** 2) / $expected[$i];\n        }\n\n        $degrees = self::degrees($rows, $columns);\n\n        /** @var float|string */\n        $result = Functions::scalar(self::distributionRightTail($result, $degrees));\n\n        return $result;\n    }\n\n    protected static function degrees(int $rows, int $columns): int\n    {\n        if ($rows === 1) {\n            return $columns - 1;\n        } elseif ($columns === 1) {\n            return $rows - 1;\n        }\n\n        return ($columns - 1) * ($rows - 1);\n    }\n\n    private static function inverseLeftTailCalculation(float $probability, int $degrees): float\n    {\n        // bracket the root\n        $min = 0;\n        $sd = sqrt(2.0 * $degrees);\n        $max = 2 * $sd;\n        $s = -1;\n\n        while ($s * self::pchisq($max, $degrees) > $probability * $s) {\n            $min = $max;\n            $max += 2 * $sd;\n        }\n\n        // Find root using bisection\n        $chi2 = 0.5 * ($min + $max);\n\n        while (($max - $min) > self::EPS * $chi2) {\n            if ($s * self::pchisq($chi2, $degrees) > $probability * $s) {\n                $min = $chi2;\n            } else {\n                $max = $chi2;\n            }\n            $chi2 = 0.5 * ($min + $max);\n        }\n\n        return $chi2;\n    }\n\n    private static function pchisq(float $chi2, int $degrees): float\n    {\n        return self::gammp($degrees, 0.5 * $chi2);\n    }\n\n    private static function gammp(int $n, float $x): float\n    {\n        if ($x < 0.5 * $n + 1) {\n            return self::gser($n, $x);\n        }\n\n        return 1 - self::gcf($n, $x);\n    }\n\n    // Return the incomplete gamma function P(n/2,x) evaluated by\n    // series representation. Algorithm from numerical recipe.\n    // Assume that n is a positive integer and x>0, won't check arguments.\n    // Relative error controlled by the eps parameter\n    private static function gser(int $n, float $x): float\n    {\n        /** @var float $gln */\n        $gln = Gamma::ln($n / 2);\n        $a = 0.5 * $n;\n        $ap = $a;\n        $sum = 1.0 / $a;\n        $del = $sum;\n        for ($i = 1; $i < 101; ++$i) {\n            ++$ap;\n            $del = $del * $x / $ap;\n            $sum += $del;\n            if ($del < $sum * self::EPS) {\n                break;\n            }\n        }\n\n        return $sum * exp(-$x + $a * log($x) - $gln);\n    }\n\n    // Return the incomplete gamma function Q(n/2,x) evaluated by\n    // its continued fraction representation. Algorithm from numerical recipe.\n    // Assume that n is a postive integer and x>0, won't check arguments.\n    // Relative error controlled by the eps parameter\n    private static function gcf(int $n, float $x): float\n    {\n        /** @var float $gln */\n        $gln = Gamma::ln($n / 2);\n        $a = 0.5 * $n;\n        $b = $x + 1 - $a;\n        $fpmin = 1.e-300;\n        $c = 1 / $fpmin;\n        $d = 1 / $b;\n        $h = $d;\n        for ($i = 1; $i < 101; ++$i) {\n            $an = -$i * ($i - $a);\n            $b += 2;\n            $d = $an * $d + $b;\n            if (abs($d) < $fpmin) {\n                $d = $fpmin;\n            }\n            $c = $b + $an / $c;\n            if (abs($c) < $fpmin) {\n                $c = $fpmin;\n            }\n            $d = 1 / $d;\n            $del = $d * $c;\n            $h = $h * $del;\n            if (abs($del - 1) < self::EPS) {\n                break;\n            }\n        }\n\n        return $h * exp(-$x + $a * log($x) - $gln);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/DistributionValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StatisticalValidations;\n\nclass DistributionValidations extends StatisticalValidations\n{\n    public static function validateProbability(mixed $probability): float\n    {\n        $probability = self::validateFloat($probability);\n\n        if ($probability < 0.0 || $probability > 1.0) {\n            throw new Exception(ExcelError::NAN());\n        }\n\n        return $probability;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Exponential\n{\n    use ArrayEnabled;\n\n    /**\n     * EXPONDIST.\n     *\n     *    Returns the exponential distribution. Use EXPONDIST to model the time between events,\n     *        such as how long an automated bank teller takes to deliver cash. For example, you can\n     *        use EXPONDIST to determine the probability that the process takes at most 1 minute.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $lambda The parameter value as a float\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $lambda, mixed $cumulative): array|string|float\n    {\n        if (is_array($value) || is_array($lambda) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $lambda, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $lambda = DistributionValidations::validateFloat($lambda);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value < 0) || ($lambda < 0)) {\n            return ExcelError::NAN();\n        }\n\n        if ($cumulative === true) {\n            return 1 - exp(0 - $value * $lambda);\n        }\n\n        return $lambda * exp(0 - $value * $lambda);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass F\n{\n    use ArrayEnabled;\n\n    /**\n     * F.DIST.\n     *\n     *    Returns the F probability distribution.\n     *    You can use this function to determine whether two data sets have different degrees of diversity.\n     *    For example, you can examine the test scores of men and women entering high school, and determine\n     *        if the variability in the females is different from that found in the males.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $u The numerator degrees of freedom as an integer\n     *                      Or can be an array of values\n     * @param mixed $v The denominator degrees of freedom as an integer\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $u, mixed $v, mixed $cumulative): array|string|float\n    {\n        if (is_array($value) || is_array($u) || is_array($v) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $u, $v, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $u = DistributionValidations::validateInt($u);\n            $v = DistributionValidations::validateInt($v);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($value < 0 || $u < 1 || $v < 1) {\n            return ExcelError::NAN();\n        }\n\n        if ($cumulative) {\n            $adjustedValue = ($u * $value) / ($u * $value + $v);\n\n            return Beta::incompleteBeta($adjustedValue, $u / 2, $v / 2);\n        }\n\n        return (Gamma::gammaValue(($v + $u) / 2)\n                / (Gamma::gammaValue($u / 2) * Gamma::gammaValue($v / 2)))\n            * (($u / $v) ** ($u / 2))\n            * (($value ** (($u - 2) / 2)) / ((1 + ($u / $v) * $value) ** (($u + $v) / 2)));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Fisher\n{\n    use ArrayEnabled;\n\n    /**\n     * FISHER.\n     *\n     * Returns the Fisher transformation at x. This transformation produces a function that\n     *        is normally distributed rather than skewed. Use this function to perform hypothesis\n     *        testing on the correlation coefficient.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value): array|string|float\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value <= -1) || ($value >= 1)) {\n            return ExcelError::NAN();\n        }\n\n        return 0.5 * log((1 + $value) / (1 - $value));\n    }\n\n    /**\n     * FISHERINV.\n     *\n     * Returns the inverse of the Fisher transformation. Use this transformation when\n     *        analyzing correlations between ranges or arrays of data. If y = FISHER(x), then\n     *        FISHERINV(y) = x.\n     *\n     * @param mixed $probability Float probability at which you want to evaluate the distribution\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverse(mixed $probability): array|string|float\n    {\n        if (is_array($probability)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $probability);\n        }\n\n        try {\n            $probability = DistributionValidations::validateFloat($probability);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        return (exp(2 * $probability) - 1) / (exp(2 * $probability) + 1);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Gamma extends GammaBase\n{\n    use ArrayEnabled;\n\n    /**\n     * GAMMA.\n     *\n     * Return the gamma function value.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function gamma(mixed $value): array|string|float\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ((((int) $value) == ((float) $value)) && $value <= 0.0) {\n            return ExcelError::NAN();\n        }\n\n        return self::gammaValue($value);\n    }\n\n    /**\n     * GAMMADIST.\n     *\n     * Returns the gamma distribution.\n     *\n     * @param mixed $value Float Value at which you want to evaluate the distribution\n     *                      Or can be an array of values\n     * @param mixed $a Parameter to the distribution as a float\n     *                      Or can be an array of values\n     * @param mixed $b Parameter to the distribution as a float\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $a, mixed $b, mixed $cumulative)\n    {\n        if (is_array($value) || is_array($a) || is_array($b) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $a, $b, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $a = DistributionValidations::validateFloat($a);\n            $b = DistributionValidations::validateFloat($b);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value < 0) || ($a <= 0) || ($b <= 0)) {\n            return ExcelError::NAN();\n        }\n\n        return self::calculateDistribution($value, $a, $b, $cumulative);\n    }\n\n    /**\n     * GAMMAINV.\n     *\n     * Returns the inverse of the Gamma distribution.\n     *\n     * @param mixed $probability Float probability at which you want to evaluate the distribution\n     *                      Or can be an array of values\n     * @param mixed $alpha Parameter to the distribution as a float\n     *                      Or can be an array of values\n     * @param mixed $beta Parameter to the distribution as a float\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverse(mixed $probability, mixed $alpha, mixed $beta)\n    {\n        if (is_array($probability) || is_array($alpha) || is_array($beta)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $alpha, $beta);\n        }\n\n        try {\n            $probability = DistributionValidations::validateProbability($probability);\n            $alpha = DistributionValidations::validateFloat($alpha);\n            $beta = DistributionValidations::validateFloat($beta);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($alpha <= 0.0) || ($beta <= 0.0)) {\n            return ExcelError::NAN();\n        }\n\n        return self::calculateInverse($probability, $alpha, $beta);\n    }\n\n    /**\n     * GAMMALN.\n     *\n     * Returns the natural logarithm of the gamma function.\n     *\n     * @param mixed $value Float Value at which you want to evaluate the distribution\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function ln(mixed $value): array|string|float\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($value <= 0) {\n            return ExcelError::NAN();\n        }\n\n        return log(self::gammaValue($value));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nabstract class GammaBase\n{\n    private const LOG_GAMMA_X_MAX_VALUE = 2.55e305;\n\n    private const EPS = 2.22e-16;\n\n    private const MAX_VALUE = 1.2e308;\n\n    private const SQRT2PI = 2.5066282746310005024157652848110452530069867406099;\n\n    private const MAX_ITERATIONS = 256;\n\n    protected static function calculateDistribution(float $value, float $a, float $b, bool $cumulative): float\n    {\n        if ($cumulative) {\n            return self::incompleteGamma($a, $value / $b) / self::gammaValue($a);\n        }\n\n        return (1 / ($b ** $a * self::gammaValue($a))) * $value ** ($a - 1) * exp(0 - ($value / $b));\n    }\n\n    /** @return float|string */\n    protected static function calculateInverse(float $probability, float $alpha, float $beta)\n    {\n        $xLo = 0;\n        $xHi = $alpha * $beta * 5;\n\n        $dx = 1024;\n        $x = $xNew = 1;\n        $i = 0;\n\n        while ((abs($dx) > Functions::PRECISION) && (++$i <= self::MAX_ITERATIONS)) {\n            // Apply Newton-Raphson step\n            $result = self::calculateDistribution($x, $alpha, $beta, true);\n            $error = $result - $probability;\n\n            if ($error == 0.0) {\n                $dx = 0;\n            } elseif ($error < 0.0) {\n                $xLo = $x;\n            } else {\n                $xHi = $x;\n            }\n\n            $pdf = self::calculateDistribution($x, $alpha, $beta, false);\n            // Avoid division by zero\n            if ($pdf !== 0.0) {\n                $dx = $error / $pdf;\n                $xNew = $x - $dx;\n            }\n\n            // If the NR fails to converge (which for example may be the\n            // case if the initial guess is too rough) we apply a bisection\n            // step to determine a more narrow interval around the root.\n            if (($xNew < $xLo) || ($xNew > $xHi) || ($pdf == 0.0)) {\n                $xNew = ($xLo + $xHi) / 2;\n                $dx = $xNew - $x;\n            }\n            $x = $xNew;\n        }\n\n        if ($i === self::MAX_ITERATIONS) {\n            return ExcelError::NA();\n        }\n\n        return $x;\n    }\n\n    //\n    //    Implementation of the incomplete Gamma function\n    //\n    public static function incompleteGamma(float $a, float $x): float\n    {\n        static $max = 32;\n        $summer = 0;\n        for ($n = 0; $n <= $max; ++$n) {\n            $divisor = $a;\n            for ($i = 1; $i <= $n; ++$i) {\n                $divisor *= ($a + $i);\n            }\n            $summer += ($x ** $n / $divisor);\n        }\n\n        return $x ** $a * exp(0 - $x) * $summer;\n    }\n\n    private const GAMMA_VALUE_P0 = 1.000000000190015;\n    private const GAMMA_VALUE_P = [\n        1 => 76.18009172947146,\n        2 => -86.50532032941677,\n        3 => 24.01409824083091,\n        4 => -1.231739572450155,\n        5 => 1.208650973866179e-3,\n        6 => -5.395239384953e-6,\n    ];\n\n    //\n    //    Implementation of the Gamma function\n    //\n    public static function gammaValue(float $value): float\n    {\n        if ($value == 0.0) {\n            return 0;\n        }\n\n        $y = $x = $value;\n        $tmp = $x + 5.5;\n        $tmp -= ($x + 0.5) * log($tmp);\n\n        $summer = self::GAMMA_VALUE_P0;\n        for ($j = 1; $j <= 6; ++$j) {\n            $summer += (self::GAMMA_VALUE_P[$j] / ++$y);\n        }\n\n        return exp(0 - $tmp + log(self::SQRT2PI * $summer / $x));\n    }\n\n    private const LG_D1 = -0.5772156649015328605195174;\n\n    private const LG_D2 = 0.4227843350984671393993777;\n\n    private const LG_D4 = 1.791759469228055000094023;\n\n    private const LG_P1 = [\n        4.945235359296727046734888,\n        201.8112620856775083915565,\n        2290.838373831346393026739,\n        11319.67205903380828685045,\n        28557.24635671635335736389,\n        38484.96228443793359990269,\n        26377.48787624195437963534,\n        7225.813979700288197698961,\n    ];\n\n    private const LG_P2 = [\n        4.974607845568932035012064,\n        542.4138599891070494101986,\n        15506.93864978364947665077,\n        184793.2904445632425417223,\n        1088204.76946882876749847,\n        3338152.967987029735917223,\n        5106661.678927352456275255,\n        3074109.054850539556250927,\n    ];\n\n    private const LG_P4 = [\n        14745.02166059939948905062,\n        2426813.369486704502836312,\n        121475557.4045093227939592,\n        2663432449.630976949898078,\n        29403789566.34553899906876,\n        170266573776.5398868392998,\n        492612579337.743088758812,\n        560625185622.3951465078242,\n    ];\n\n    private const LG_Q1 = [\n        67.48212550303777196073036,\n        1113.332393857199323513008,\n        7738.757056935398733233834,\n        27639.87074403340708898585,\n        54993.10206226157329794414,\n        61611.22180066002127833352,\n        36351.27591501940507276287,\n        8785.536302431013170870835,\n    ];\n\n    private const LG_Q2 = [\n        183.0328399370592604055942,\n        7765.049321445005871323047,\n        133190.3827966074194402448,\n        1136705.821321969608938755,\n        5267964.117437946917577538,\n        13467014.54311101692290052,\n        17827365.30353274213975932,\n        9533095.591844353613395747,\n    ];\n\n    private const LG_Q4 = [\n        2690.530175870899333379843,\n        639388.5654300092398984238,\n        41355999.30241388052042842,\n        1120872109.61614794137657,\n        14886137286.78813811542398,\n        101680358627.2438228077304,\n        341747634550.7377132798597,\n        446315818741.9713286462081,\n    ];\n\n    private const LG_C = [\n        -0.001910444077728,\n        8.4171387781295e-4,\n        -5.952379913043012e-4,\n        7.93650793500350248e-4,\n        -0.002777777777777681622553,\n        0.08333333333333333331554247,\n        0.0057083835261,\n    ];\n\n    // Rough estimate of the fourth root of logGamma_xBig\n    private const LG_FRTBIG = 2.25e76;\n\n    private const PNT68 = 0.6796875;\n\n    // Function cache for logGamma\n\n    private static float $logGammaCacheResult = 0.0;\n\n    private static float $logGammaCacheX = 0.0;\n\n    /**\n     * logGamma function.\n     *\n     * Original author was Jaco van Kooten. Ported to PHP by Paul Meagher.\n     *\n     * The natural logarithm of the gamma function. <br />\n     * Based on public domain NETLIB (Fortran) code by W. J. Cody and L. Stoltz <br />\n     * Applied Mathematics Division <br />\n     * Argonne National Laboratory <br />\n     * Argonne, IL 60439 <br />\n     * <p>\n     * References:\n     * <ol>\n     * <li>W. J. Cody and K. E. Hillstrom, 'Chebyshev Approximations for the Natural\n     *     Logarithm of the Gamma Function,' Math. Comp. 21, 1967, pp. 198-203.</li>\n     * <li>K. E. Hillstrom, ANL/AMD Program ANLC366S, DGAMMA/DLGAMA, May, 1969.</li>\n     * <li>Hart, Et. Al., Computer Approximations, Wiley and sons, New York, 1968.</li>\n     * </ol>\n     * </p>\n     * <p>\n     * From the original documentation:\n     * </p>\n     * <p>\n     * This routine calculates the LOG(GAMMA) function for a positive real argument X.\n     * Computation is based on an algorithm outlined in references 1 and 2.\n     * The program uses rational functions that theoretically approximate LOG(GAMMA)\n     * to at least 18 significant decimal digits. The approximation for X > 12 is from\n     * reference 3, while approximations for X < 12.0 are similar to those in reference\n     * 1, but are unpublished. The accuracy achieved depends on the arithmetic system,\n     * the compiler, the intrinsic functions, and proper selection of the\n     * machine-dependent constants.\n     * </p>\n     * <p>\n     * Error returns: <br />\n     * The program returns the value XINF for X .LE. 0.0 or when overflow would occur.\n     * The computation is believed to be free of underflow and overflow.\n     * </p>\n     *\n     * @version 1.1\n     *\n     * @author Jaco van Kooten\n     *\n     * @return float MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305\n     */\n    public static function logGamma(float $x): float\n    {\n        if ($x == self::$logGammaCacheX) {\n            return self::$logGammaCacheResult;\n        }\n\n        $y = $x;\n        if ($y > 0.0 && $y <= self::LOG_GAMMA_X_MAX_VALUE) {\n            if ($y <= self::EPS) {\n                $res = -log($y);\n            } elseif ($y <= 1.5) {\n                $res = self::logGamma1($y);\n            } elseif ($y <= 4.0) {\n                $res = self::logGamma2($y);\n            } elseif ($y <= 12.0) {\n                $res = self::logGamma3($y);\n            } else {\n                $res = self::logGamma4($y);\n            }\n        } else {\n            // --------------------------\n            //    Return for bad arguments\n            // --------------------------\n            $res = self::MAX_VALUE;\n        }\n\n        // ------------------------------\n        //    Final adjustments and return\n        // ------------------------------\n        self::$logGammaCacheX = $x;\n        self::$logGammaCacheResult = $res;\n\n        return $res;\n    }\n\n    private static function logGamma1(float $y): float\n    {\n        // ---------------------\n        //    EPS .LT. X .LE. 1.5\n        // ---------------------\n        if ($y < self::PNT68) {\n            $corr = -log($y);\n            $xm1 = $y;\n        } else {\n            $corr = 0.0;\n            $xm1 = $y - 1.0;\n        }\n\n        $xden = 1.0;\n        $xnum = 0.0;\n        if ($y <= 0.5 || $y >= self::PNT68) {\n            for ($i = 0; $i < 8; ++$i) {\n                $xnum = $xnum * $xm1 + self::LG_P1[$i];\n                $xden = $xden * $xm1 + self::LG_Q1[$i];\n            }\n\n            return $corr + $xm1 * (self::LG_D1 + $xm1 * ($xnum / $xden));\n        }\n\n        $xm2 = $y - 1.0;\n        for ($i = 0; $i < 8; ++$i) {\n            $xnum = $xnum * $xm2 + self::LG_P2[$i];\n            $xden = $xden * $xm2 + self::LG_Q2[$i];\n        }\n\n        return $corr + $xm2 * (self::LG_D2 + $xm2 * ($xnum / $xden));\n    }\n\n    private static function logGamma2(float $y): float\n    {\n        // ---------------------\n        //    1.5 .LT. X .LE. 4.0\n        // ---------------------\n        $xm2 = $y - 2.0;\n        $xden = 1.0;\n        $xnum = 0.0;\n        for ($i = 0; $i < 8; ++$i) {\n            $xnum = $xnum * $xm2 + self::LG_P2[$i];\n            $xden = $xden * $xm2 + self::LG_Q2[$i];\n        }\n\n        return $xm2 * (self::LG_D2 + $xm2 * ($xnum / $xden));\n    }\n\n    protected static function logGamma3(float $y): float\n    {\n        // ----------------------\n        //    4.0 .LT. X .LE. 12.0\n        // ----------------------\n        $xm4 = $y - 4.0;\n        $xden = -1.0;\n        $xnum = 0.0;\n        for ($i = 0; $i < 8; ++$i) {\n            $xnum = $xnum * $xm4 + self::LG_P4[$i];\n            $xden = $xden * $xm4 + self::LG_Q4[$i];\n        }\n\n        return self::LG_D4 + $xm4 * ($xnum / $xden);\n    }\n\n    protected static function logGamma4(float $y): float\n    {\n        // ---------------------------------\n        //    Evaluate for argument .GE. 12.0\n        // ---------------------------------\n        $res = 0.0;\n        if ($y <= self::LG_FRTBIG) {\n            $res = self::LG_C[6];\n            $ysq = $y * $y;\n            for ($i = 0; $i < 6; ++$i) {\n                $res = $res / $ysq + self::LG_C[$i];\n            }\n            $res /= $y;\n            $corr = log($y);\n            $res = $res + log(self::SQRT2PI) - 0.5 * $corr;\n            $res += $y * ($corr - 1.0);\n        }\n\n        return $res;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Combinations;\n\nclass HyperGeometric\n{\n    use ArrayEnabled;\n\n    /**\n     * HYPGEOMDIST.\n     *\n     * Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of\n     * sample successes, given the sample size, population successes, and population size.\n     *\n     * @param mixed $sampleSuccesses Integer number of successes in the sample\n     *                      Or can be an array of values\n     * @param mixed $sampleNumber Integer size of the sample\n     *                      Or can be an array of values\n     * @param mixed $populationSuccesses Integer number of successes in the population\n     *                      Or can be an array of values\n     * @param mixed $populationNumber Integer population size\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $sampleSuccesses, mixed $sampleNumber, mixed $populationSuccesses, mixed $populationNumber): array|string|float\n    {\n        if (\n            is_array($sampleSuccesses) || is_array($sampleNumber)\n            || is_array($populationSuccesses) || is_array($populationNumber)\n        ) {\n            return self::evaluateArrayArguments(\n                [self::class, __FUNCTION__],\n                $sampleSuccesses,\n                $sampleNumber,\n                $populationSuccesses,\n                $populationNumber\n            );\n        }\n\n        try {\n            $sampleSuccesses = DistributionValidations::validateInt($sampleSuccesses);\n            $sampleNumber = DistributionValidations::validateInt($sampleNumber);\n            $populationSuccesses = DistributionValidations::validateInt($populationSuccesses);\n            $populationNumber = DistributionValidations::validateInt($populationNumber);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($sampleSuccesses < 0) || ($sampleSuccesses > $sampleNumber) || ($sampleSuccesses > $populationSuccesses)) {\n            return ExcelError::NAN();\n        }\n        if (($sampleNumber <= 0) || ($sampleNumber > $populationNumber)) {\n            return ExcelError::NAN();\n        }\n        if (($populationSuccesses <= 0) || ($populationSuccesses > $populationNumber)) {\n            return ExcelError::NAN();\n        }\n\n        $successesPopulationAndSample = (float) Combinations::withoutRepetition($populationSuccesses, $sampleSuccesses);\n        $numbersPopulationAndSample = (float) Combinations::withoutRepetition($populationNumber, $sampleNumber);\n        $adjustedPopulationAndSample = (float) Combinations::withoutRepetition(\n            $populationNumber - $populationSuccesses,\n            $sampleNumber - $sampleSuccesses\n        );\n\n        return $successesPopulationAndSample * $adjustedPopulationAndSample / $numbersPopulationAndSample;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass LogNormal\n{\n    use ArrayEnabled;\n\n    /**\n     * LOGNORMDIST.\n     *\n     * Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed\n     * with parameters mean and standard_dev.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $mean Mean value as a float\n     *                      Or can be an array of values\n     * @param mixed $stdDev Standard Deviation as a float\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function cumulative(mixed $value, mixed $mean, mixed $stdDev)\n    {\n        if (is_array($value) || is_array($mean) || is_array($stdDev)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $mean, $stdDev);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $mean = DistributionValidations::validateFloat($mean);\n            $stdDev = DistributionValidations::validateFloat($stdDev);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value <= 0) || ($stdDev <= 0)) {\n            return ExcelError::NAN();\n        }\n\n        return StandardNormal::cumulative((log($value) - $mean) / $stdDev);\n    }\n\n    /**\n     * LOGNORM.DIST.\n     *\n     * Returns the lognormal distribution of x, where ln(x) is normally distributed\n     * with parameters mean and standard_dev.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $mean Mean value as a float\n     *                      Or can be an array of values\n     * @param mixed $stdDev Standard Deviation as a float\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $mean, mixed $stdDev, mixed $cumulative = false)\n    {\n        if (is_array($value) || is_array($mean) || is_array($stdDev) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $mean, $stdDev, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $mean = DistributionValidations::validateFloat($mean);\n            $stdDev = DistributionValidations::validateFloat($stdDev);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value <= 0) || ($stdDev <= 0)) {\n            return ExcelError::NAN();\n        }\n\n        if ($cumulative === true) {\n            return StandardNormal::distribution((log($value) - $mean) / $stdDev, true);\n        }\n\n        return (1 / (sqrt(2 * M_PI) * $stdDev * $value))\n            * exp(0 - ((log($value) - $mean) ** 2 / (2 * $stdDev ** 2)));\n    }\n\n    /**\n     * LOGINV.\n     *\n     * Returns the inverse of the lognormal cumulative distribution\n     *\n     * @param mixed $probability Float probability for which we want the value\n     *                      Or can be an array of values\n     * @param mixed $mean Mean Value as a float\n     *                      Or can be an array of values\n     * @param mixed $stdDev Standard Deviation as a float\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     *\n     * @TODO    Try implementing P J Acklam's refinement algorithm for greater\n     *            accuracy if I can get my head round the mathematics\n     *            (as described at) http://home.online.no/~pjacklam/notes/invnorm/\n     */\n    public static function inverse(mixed $probability, mixed $mean, mixed $stdDev): array|string|float\n    {\n        if (is_array($probability) || is_array($mean) || is_array($stdDev)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $mean, $stdDev);\n        }\n\n        try {\n            $probability = DistributionValidations::validateProbability($probability);\n            $mean = DistributionValidations::validateFloat($mean);\n            $stdDev = DistributionValidations::validateFloat($stdDev);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($stdDev <= 0) {\n            return ExcelError::NAN();\n        }\n        /** @var float $inverse */\n        $inverse = StandardNormal::inverse($probability);\n\n        return exp($mean + $stdDev * $inverse);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/NewtonRaphson.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass NewtonRaphson\n{\n    private const MAX_ITERATIONS = 256;\n\n    /** @var callable(float): mixed */\n    protected $callback;\n\n    /** @param callable(float): mixed $callback */\n    public function __construct(callable $callback)\n    {\n        $this->callback = $callback;\n    }\n\n    public function execute(float $probability): string|int|float\n    {\n        $xLo = 100;\n        $xHi = 0;\n\n        $dx = 1;\n        $x = $xNew = 1;\n        $i = 0;\n\n        while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {\n            // Apply Newton-Raphson step\n            $result = call_user_func($this->callback, $x);\n            if (!is_float($result)) {\n                return ExcelError::VALUE();\n            }\n            $error = $result - $probability;\n\n            if ($error == 0.0) {\n                $dx = 0;\n            } elseif ($error < 0.0) {\n                $xLo = $x;\n            } else {\n                $xHi = $x;\n            }\n\n            // Avoid division by zero\n            if ($result != 0.0) {\n                $dx = $error / $result;\n                $xNew = $x - $dx;\n            }\n\n            // If the NR fails to converge (which for example may be the\n            // case if the initial guess is too rough) we apply a bisection\n            // step to determine a more narrow interval around the root.\n            if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) {\n                $xNew = ($xLo + $xHi) / 2;\n                $dx = $xNew - $x;\n            }\n            $x = $xNew;\n        }\n\n        if ($i == self::MAX_ITERATIONS) {\n            return ExcelError::NA();\n        }\n\n        return $x;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Normal\n{\n    use ArrayEnabled;\n\n    public const SQRT2PI = 2.5066282746310005024157652848110452530069867406099;\n\n    /**\n     * NORMDIST.\n     *\n     * Returns the normal distribution for the specified mean and standard deviation. This\n     * function has a very wide range of applications in statistics, including hypothesis\n     * testing.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $mean Mean value as a float\n     *                      Or can be an array of values\n     * @param mixed $stdDev Standard Deviation as a float\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $mean, mixed $stdDev, mixed $cumulative): array|string|float\n    {\n        if (is_array($value) || is_array($mean) || is_array($stdDev) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $mean, $stdDev, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $mean = DistributionValidations::validateFloat($mean);\n            $stdDev = DistributionValidations::validateFloat($stdDev);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($stdDev < 0) {\n            return ExcelError::NAN();\n        }\n\n        if ($cumulative) {\n            return 0.5 * (1 + Engineering\\Erf::erfValue(($value - $mean) / ($stdDev * sqrt(2))));\n        }\n\n        return (1 / (self::SQRT2PI * $stdDev)) * exp(0 - (($value - $mean) ** 2 / (2 * ($stdDev * $stdDev))));\n    }\n\n    /**\n     * NORMINV.\n     *\n     * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.\n     *\n     * @param mixed $probability Float probability for which we want the value\n     *                      Or can be an array of values\n     * @param mixed $mean Mean Value as a float\n     *                      Or can be an array of values\n     * @param mixed $stdDev Standard Deviation as a float\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverse(mixed $probability, mixed $mean, mixed $stdDev): array|string|float\n    {\n        if (is_array($probability) || is_array($mean) || is_array($stdDev)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $mean, $stdDev);\n        }\n\n        try {\n            $probability = DistributionValidations::validateProbability($probability);\n            $mean = DistributionValidations::validateFloat($mean);\n            $stdDev = DistributionValidations::validateFloat($stdDev);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($stdDev < 0) {\n            return ExcelError::NAN();\n        }\n\n        return (self::inverseNcdf($probability) * $stdDev) + $mean;\n    }\n\n    /*\n     *                                inverse_ncdf.php\n     *                            -------------------\n     *    begin                : Friday, January 16, 2004\n     *    copyright            : (C) 2004 Michael Nickerson\n     *    email                : nickersonm@yahoo.com\n     *\n     */\n    private static function inverseNcdf(float $p): float\n    {\n        //    Inverse ncdf approximation by Peter J. Acklam, implementation adapted to\n        //    PHP by Michael Nickerson, using Dr. Thomas Ziegler's C implementation as\n        //    a guide. http://home.online.no/~pjacklam/notes/invnorm/index.html\n        //    I have not checked the accuracy of this implementation. Be aware that PHP\n        //    will truncate the coeficcients to 14 digits.\n\n        //    You have permission to use and distribute this function freely for\n        //    whatever purpose you want, but please show common courtesy and give credit\n        //    where credit is due.\n\n        //    Input parameter is $p - probability - where 0 < p < 1.\n\n        //    Coefficients in rational approximations\n        /** @var array<int, float> */\n        static $a = [\n            1 => -3.969683028665376e+01,\n            2 => 2.209460984245205e+02,\n            3 => -2.759285104469687e+02,\n            4 => 1.383577518672690e+02,\n            5 => -3.066479806614716e+01,\n            6 => 2.506628277459239e+00,\n        ];\n\n        /** @var array<int, float> */\n        static $b = [\n            1 => -5.447609879822406e+01,\n            2 => 1.615858368580409e+02,\n            3 => -1.556989798598866e+02,\n            4 => 6.680131188771972e+01,\n            5 => -1.328068155288572e+01,\n        ];\n\n        /** @var array<int, float> */\n        static $c = [\n            1 => -7.784894002430293e-03,\n            2 => -3.223964580411365e-01,\n            3 => -2.400758277161838e+00,\n            4 => -2.549732539343734e+00,\n            5 => 4.374664141464968e+00,\n            6 => 2.938163982698783e+00,\n        ];\n\n        /** @var array<int, float> */\n        static $d = [\n            1 => 7.784695709041462e-03,\n            2 => 3.224671290700398e-01,\n            3 => 2.445134137142996e+00,\n            4 => 3.754408661907416e+00,\n        ];\n\n        //    Define lower and upper region break-points.\n        $p_low = 0.02425; //Use lower region approx. below this\n        $p_high = 1 - $p_low; //Use upper region approx. above this\n\n        if (0 < $p && $p < $p_low) {\n            //    Rational approximation for lower region.\n            $q = sqrt(-2 * log($p));\n\n            return ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6])\n                / (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1);\n        } elseif ($p_high < $p && $p < 1) {\n            //    Rational approximation for upper region.\n            $q = sqrt(-2 * log(1 - $p));\n\n            return -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6])\n                / (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1);\n        }\n\n        //    Rational approximation for central region.\n        $q = $p - 0.5;\n        $r = $q * $q;\n\n        return ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) * $r + $a[6]) * $q\n                / ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r + $b[4]) * $r + $b[5]) * $r + 1);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nclass Poisson\n{\n    use ArrayEnabled;\n\n    /**\n     * POISSON.\n     *\n     * Returns the Poisson distribution. A common application of the Poisson distribution\n     * is predicting the number of events over a specific time, such as the number of\n     * cars arriving at a toll plaza in 1 minute.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $mean Mean value as a float\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $mean, mixed $cumulative): array|string|float\n    {\n        if (is_array($value) || is_array($mean) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $mean, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $mean = DistributionValidations::validateFloat($mean);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value < 0) || ($mean < 0)) {\n            return ExcelError::NAN();\n        }\n\n        if ($cumulative) {\n            $summer = 0;\n            $floor = floor($value);\n            for ($i = 0; $i <= $floor; ++$i) {\n                /** @var float $fact */\n                $fact = MathTrig\\Factorial::fact($i);\n                $summer += $mean ** $i / $fact;\n            }\n\n            return exp(0 - $mean) * $summer;\n        }\n        /** @var float $fact */\n        $fact = MathTrig\\Factorial::fact($value);\n\n        return (exp(0 - $mean) * $mean ** $value) / $fact;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Averages;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\StandardDeviations;\n\nclass StandardNormal\n{\n    use ArrayEnabled;\n\n    /**\n     * NORMSDIST.\n     *\n     * Returns the standard normal cumulative distribution function. The distribution has\n     * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a\n     * table of standard normal curve areas.\n     *\n     * NOTE: We don't need to check for arrays to array-enable this function, because that is already\n     *       handled by the logic in Normal::distribution()\n     *       All we need to do is pass the value through as scalar or as array.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function cumulative(mixed $value)\n    {\n        return Normal::distribution($value, 0, 1, true);\n    }\n\n    /**\n     * NORM.S.DIST.\n     *\n     * Returns the standard normal cumulative distribution function. The distribution has\n     * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a\n     * table of standard normal curve areas.\n     *\n     * NOTE: We don't need to check for arrays to array-enable this function, because that is already\n     *       handled by the logic in Normal::distribution()\n     *       All we need to do is pass the value and cumulative through as scalar or as array.\n     *\n     * @param mixed $value Float value for which we want the probability\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $cumulative)\n    {\n        return Normal::distribution($value, 0, 1, $cumulative);\n    }\n\n    /**\n     * NORMSINV.\n     *\n     * Returns the inverse of the standard normal cumulative distribution\n     *\n     * @param mixed $value float probability for which we want the value\n     *                      Or can be an array of values\n     *\n     * NOTE: We don't need to check for arrays to array-enable this function, because that is already\n     *       handled by the logic in Normal::inverse()\n     *       All we need to do is pass the value through as scalar or as array\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverse(mixed $value)\n    {\n        return Normal::inverse($value, 0, 1);\n    }\n\n    /**\n     * GAUSS.\n     *\n     * Calculates the probability that a member of a standard normal population will fall between\n     *     the mean and z standard deviations from the mean.\n     *\n     * @param mixed $value Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function gauss(mixed $value): array|string|float\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        if (!is_numeric($value)) {\n            return ExcelError::VALUE();\n        }\n        /** @var float $dist */\n        $dist = self::distribution($value, true);\n\n        return $dist - 0.5;\n    }\n\n    /**\n     * ZTEST.\n     *\n     * Returns the one-tailed P-value of a z-test.\n     *\n     * For a given hypothesized population mean, x, Z.TEST returns the probability that the sample mean would be\n     *     greater than the average of observations in the data set (array) — that is, the observed sample mean.\n     *\n     * @param mixed $dataSet The dataset should be an array of float values for the observations\n     * @param mixed $m0 Alpha Parameter\n     *                      Or can be an array of values\n     * @param mixed $sigma A null or float value for the Beta (Standard Deviation) Parameter;\n     *                       if null, we use the standard deviation of the dataset\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string (string if result is an error)\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function zTest(mixed $dataSet, mixed $m0, mixed $sigma = null)\n    {\n        if (is_array($m0) || is_array($sigma)) {\n            return self::evaluateArrayArgumentsSubsetFrom([self::class, __FUNCTION__], 1, $dataSet, $m0, $sigma);\n        }\n\n        $dataSet = Functions::flattenArrayIndexed($dataSet);\n\n        if (!is_numeric($m0) || ($sigma !== null && !is_numeric($sigma))) {\n            return ExcelError::VALUE();\n        }\n\n        if ($sigma === null) {\n            /** @var float $sigma */\n            $sigma = StandardDeviations::STDEV($dataSet);\n        }\n        $n = count($dataSet);\n\n        $sub1 = Averages::average($dataSet);\n\n        if (!is_numeric($sub1)) {\n            return $sub1;\n        }\n\n        $temp = self::cumulative(($sub1 - $m0) / ($sigma / sqrt($n)));\n\n        return 1 - (is_numeric($temp) ? $temp : 0);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\n/**\n * Some of this code is drived from Perl CPAN Statistical::Distributions.\n * Its copyright statement is:\n * Copyright 2003 Michael Kospach. All rights reserved.\n *\n * This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.\n */\nclass StudentT\n{\n    use ArrayEnabled;\n\n    /**\n     * TDIST.\n     *\n     * Returns the probability of Student's T distribution.\n     *\n     * @param mixed $value Float value for the distribution\n     *                      Or can be an array of values\n     * @param mixed $degrees Integer value for degrees of freedom\n     *                      Or can be an array of values\n     * @param mixed $tails Integer value for the number of tails (1 or 2)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $degrees, mixed $tails)\n    {\n        return self::calcDistribution($value, $degrees, $tails, self::distribution(...));\n    }\n\n    /**\n     * T.DIST.2T.\n     * Returns the two-tailed Student's t distribution.\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     */\n    public static function tDotDistDot2T(mixed $value, mixed $degrees)\n    {\n        return self::calcDistribution($value, $degrees, 2, self::distribution(...));\n    }\n\n    /**\n     * T.DIST.RT.\n     * Returns the right-tailed Student's t distribution.\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     */\n    public static function tDotDistDotRT(mixed $value, mixed $degrees)\n    {\n        return self::calcDistribution($value, $degrees, 1, self::distribution(...));\n    }\n\n    /**\n     * @return array<mixed>|float|string The result, or a string containing an error\n     */\n    private static function calcDistribution(mixed $value, mixed $degrees, mixed $tails, callable $callback)\n    {\n        if (is_array($value) || is_array($degrees) || is_array($tails)) {\n            return self::evaluateArrayArguments($callback, $value, $degrees, $tails);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $degrees = DistributionValidations::validateInt($degrees);\n            $tails = DistributionValidations::validateInt($tails);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value < 0) || ($degrees < 1) || ($tails < 1) || ($tails > 2)) {\n            return ExcelError::NAN();\n        }\n\n        return self::subTProb($value, $degrees, $tails);\n    }\n\n    /**\n     * Based on code from Perl CPAN Statistical::Distributions.\n     */\n    private static function subTProb(float $x, int $n, int $tails): float\n    {\n        $w = atan2($x / sqrt($n), 1);\n        $z = cos($w) ** 2;\n        $y = 1;\n\n        for ($i = $n - 2; $i >= 2; $i -= 2) {\n            $y = 1 + ($i - 1) / $i * $z * $y;\n        }\n\n        if ($n % 2 == 0) {\n            $a = sin($w) / 2;\n            $b = 0.5;\n        } else {\n            $a = ($n == 1) ? 0 : (sin($w) * cos($w) / M_PI);\n            $b = 0.5 + $w / M_PI;\n        }\n\n        return $tails * max(0, 1 - $b - $a * $y);\n    }\n\n    /**\n     * T.DIST.\n     * Returns the Student's left-tailed t distribution,\n     * either as a cumulative distribution function (cdf) (TRUE)\n     * or as a probability density function (pdf) (FALSE),\n     * where TRUE/FALSE are the value of $cumulative parameter.\n     *\n     * \"True\" algoritm adapted from java.\n     * org.apache.commons.math3.distribution.TDistribution.\n     * \"False\" algorithm comes from:\n     * https://statproofbook.github.io/P/t-pdf.html\n     *\n     * @param mixed $cumulative Expecting bool. See above for explanation.\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     */\n    public static function tDotDist(mixed $value, mixed $degrees, mixed $cumulative)\n    {\n        if (is_array($value) || is_array($degrees) || is_array($cumulative)) {\n            return self::evaluateArrayArguments(self::tDotDist(...), $value, $degrees, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $degrees = DistributionValidations::validateInt($degrees);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        /** @var int $degrees */\n        if (($degrees < 1)) {\n            return ExcelError::NAN();\n        }\n        /** @var float $value */\n        if (!$cumulative) {\n            return self::tDotDistFalse($value, $degrees);\n        }\n\n        $f16 = $degrees / ($degrees + $value * $value);\n        $g16 = 0.5 * $degrees;\n        $h16 = 0.5;\n        $result = Beta::distribution($f16, $g16, $h16);\n        if (is_numeric($result)) {\n            $result = ($value < 0) ? (0.5 * $result) : (1 - 0.5 * $result);\n        }\n\n        return $result;\n    }\n\n    private static function tDotDistFalse(float $value, int $degrees): float|string\n    {\n        $result = $k15 = Gamma::gamma(($degrees + 1) / 2);\n        if (is_numeric($k15)) {\n            $result = $k16 = Gamma::gamma($degrees / 2);\n            if (is_numeric($k16)) {\n                $k17 = sqrt(M_PI * $degrees);\n                $k18 = $k15 / ($k16 * $k17);\n                $k19 = $value * $value / $degrees + 1;\n                $k20 = -($degrees + 1) / 2;\n                $k21 = $k19 ** $k20;\n                $result = $k18 * $k21;\n            }\n        }\n\n        /** @var float|string $result */\n        return $result;\n    }\n\n    /**\n     * TINV and T.INV.2T.\n     * Returns the two-tailed inverse of the Student t distribution.\n     *\n     * @param mixed $probability Float probability for the function\n     *                      Or can be an array of values\n     * @param mixed $degrees Integer value for degrees of freedom\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function inverse(mixed $probability, mixed $degrees)\n    {\n        return self::calcInverse($probability, $degrees, 2, self::inverse(...));\n    }\n\n    /**\n     * @return array<mixed>|float|string The result, or a string containing an error\n     */\n    private static function calcInverse(mixed $probability, mixed $degrees, int $tails, callable $callback2)\n    {\n        if (is_array($probability) || is_array($degrees)) {\n            return self::evaluateArrayArguments($callback2, $probability, $degrees, $tails);\n        }\n\n        try {\n            $probability = DistributionValidations::validateProbability($probability);\n            $degrees = DistributionValidations::validateInt($degrees);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($degrees <= 0) {\n            return ExcelError::NAN();\n        }\n\n        $callback = fn ($value) => self::distribution($value, $degrees, $tails);\n\n        $newtonRaphson = new NewtonRaphson($callback);\n\n        $result = $newtonRaphson->execute($probability);\n        if (is_numeric($result) && $tails === 1) {\n            $result = -$result; // @codeCoverageIgnore\n        }\n\n        return $result;\n    }\n\n    /**\n     * T.INV.\n     * Returns the left-tailed inverse of the Student's t distribution.\n     *\n     * Based on code from Perl CPAN Statistical::Distributions.\n     *\n     * @return array<mixed>|float|string The result, or a string containing an error\n     */\n    public static function tDotInv(mixed $probability, mixed $degrees)\n    {\n        if (is_array($probability) || is_array($degrees)) {\n            return self::evaluateArrayArguments(self::tDotInv(...), $probability, $degrees);\n        }\n\n        try {\n            $probability = DistributionValidations::validateProbability($probability);\n            $degrees = DistributionValidations::validateInt($degrees);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($degrees < 1) {\n            return ExcelError::NAN();\n        }\n        if ($probability == 0.5) {\n            return 0.0;\n        }\n        if ($probability < 0.5) {\n            $result = self::tDotInv(1.0 - $probability, $degrees);\n\n            return is_numeric($result) ? -$result : $result;\n        }\n        $p = $probability;\n        $n = $degrees;\n        $u = self::subU($p);\n        $u2 = $u ** 2;\n\n        $a = ($u2 + 1) / 4;\n        $b = ((5 * $u2 + 16) * $u2 + 3) / 96;\n        $c = (((3 * $u2 + 19) * $u2 + 17) * $u2 - 15) / 384;\n        $d = ((((79 * $u2 + 776) * $u2 + 1482) * $u2 - 1920) * $u2 - 945) / 92160;\n        $e = (((((27 * $u2 + 339) * $u2 + 930) * $u2 - 1782) * $u2 - 765) * $u2 + 17955) / 368640;\n\n        $x = $u * (1 + ($a + ($b + ($c + ($d + $e / $n) / $n) / $n) / $n) / $n);\n\n        if ($n <= log10($p) ** 2 + 3) {\n            do {\n                $p1 = self::subTProb($x, $n, 1);\n                $n1 = $n + 1;\n                $delta = ($p1 - $p)\n                    / exp(($n1 * log($n1 / ($n + $x * $x))\n                    + log($n / $n1 / 2 / M_PI) - 1\n                        + (1 / $n1 - 1 / $n) / 6) / 2);\n                $x += $delta;\n                $round = sprintf('%.' . abs((int) (log10(abs($x)) - 4)) . 'F', $delta);\n            } while (($x) && ($round != 0));\n        }\n\n        return -$x;\n    }\n\n    /**\n     * Based on code from Perl CPAN Statistical::Distributions.\n     */\n    private static function subU(float $p): float\n    {\n        $y = -log(4 * $p * (1 - $p));\n        $x = sqrt(\n            $y * (1.570796288\n              + $y * (.03706987906\n                + $y * (-.8364353589E-3\n                  + $y * (-.2250947176E-3\n                    + $y * (.6841218299E-5\n                      + $y * (0.5824238515E-5\n                        + $y * (-.104527497E-5\n                          + $y * (.8360937017E-7\n                            + $y * (-.3231081277E-8\n                              + $y * (.3657763036E-10\n                                + $y * .6936233982E-12))))))))))\n        );\n        if ($p > 0.5) {\n            $x = -$x;\n        }\n\n        return $x;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Weibull\n{\n    use ArrayEnabled;\n\n    /**\n     * WEIBULL.\n     *\n     * Returns the Weibull distribution. Use this distribution in reliability\n     * analysis, such as calculating a device's mean time to failure.\n     *\n     * @param mixed $value Float value for the distribution\n     *                      Or can be an array of values\n     * @param mixed $alpha Float alpha Parameter\n     *                      Or can be an array of values\n     * @param mixed $beta Float beta Parameter\n     *                      Or can be an array of values\n     * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string (string if result is an error)\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function distribution(mixed $value, mixed $alpha, mixed $beta, mixed $cumulative): array|string|float\n    {\n        if (is_array($value) || is_array($alpha) || is_array($beta) || is_array($cumulative)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $alpha, $beta, $cumulative);\n        }\n\n        try {\n            $value = DistributionValidations::validateFloat($value);\n            $alpha = DistributionValidations::validateFloat($alpha);\n            $beta = DistributionValidations::validateFloat($beta);\n            $cumulative = DistributionValidations::validateBool($cumulative);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($value < 0) || ($alpha <= 0) || ($beta <= 0)) {\n            return ExcelError::NAN();\n        }\n\n        if ($cumulative) {\n            return 1 - exp(0 - ($value / $beta) ** $alpha);\n        }\n\n        return ($alpha / $beta ** $alpha) * $value ** ($alpha - 1) * exp(0 - ($value / $beta) ** $alpha);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/MaxMinBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nabstract class MaxMinBase\n{\n    protected static function datatypeAdjustmentAllowStrings(int|float|string|bool $value): int|float\n    {\n        if (is_bool($value)) {\n            return (int) $value;\n        } elseif (is_string($value)) {\n            return 0;\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Maximum.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\n\nclass Maximum extends MaxMinBase\n{\n    /**\n     * MAX.\n     *\n     * MAX returns the value of the element of the values passed that has the highest value,\n     *        with negative numbers considered smaller than positive numbers.\n     *\n     * Excel Function:\n     *        MAX(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function max(mixed ...$args): float|int|string\n    {\n        $returnValue = null;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n        foreach ($aArgs as $arg) {\n            if (ErrorValue::isError($arg, true)) {\n                $returnValue = $arg;\n\n                break;\n            }\n            // Is it a numeric value?\n            if ((is_numeric($arg)) && (!is_string($arg))) {\n                if (($returnValue === null) || ($arg > $returnValue)) {\n                    $returnValue = $arg;\n                }\n            }\n        }\n\n        if ($returnValue === null) {\n            return 0;\n        }\n        /** @var float|int|string $returnValue */\n\n        return $returnValue;\n    }\n\n    /**\n     * MAXA.\n     *\n     * Returns the greatest value in a list of arguments, including numbers, text, and logical values\n     *\n     * Excel Function:\n     *        MAXA(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function maxA(mixed ...$args): float|int|string\n    {\n        $returnValue = null;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n        foreach ($aArgs as $arg) {\n            if (ErrorValue::isError($arg, true)) {\n                $returnValue = $arg;\n\n                break;\n            }\n            // Is it a numeric value?\n            if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {\n                $arg = self::datatypeAdjustmentAllowStrings($arg);\n                if (($returnValue === null) || ($arg > $returnValue)) {\n                    $returnValue = $arg;\n                }\n            }\n        }\n\n        if ($returnValue === null) {\n            return 0;\n        }\n        /** @var float|int|string $returnValue */\n\n        return $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Minimum.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\n\nclass Minimum extends MaxMinBase\n{\n    /**\n     * MIN.\n     *\n     * MIN returns the value of the element of the values passed that has the smallest value,\n     *        with negative numbers considered smaller than positive numbers.\n     *\n     * Excel Function:\n     *        MIN(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function min(mixed ...$args): float|int|string\n    {\n        $returnValue = null;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n        foreach ($aArgs as $arg) {\n            if (ErrorValue::isError($arg, true)) {\n                $returnValue = $arg;\n\n                break;\n            }\n            // Is it a numeric value?\n            if ((is_numeric($arg)) && (!is_string($arg))) {\n                if (($returnValue === null) || ($arg < $returnValue)) {\n                    $returnValue = $arg;\n                }\n            }\n        }\n\n        if ($returnValue === null) {\n            return 0;\n        }\n        /** @var float|int|string $returnValue */\n\n        return $returnValue;\n    }\n\n    /**\n     * MINA.\n     *\n     * Returns the smallest value in a list of arguments, including numbers, text, and logical values\n     *\n     * Excel Function:\n     *        MINA(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function minA(mixed ...$args): float|int|string\n    {\n        $returnValue = null;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n        foreach ($aArgs as $arg) {\n            if (ErrorValue::isError($arg, true)) {\n                $returnValue = $arg;\n\n                break;\n            }\n            // Is it a numeric value?\n            if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {\n                $arg = self::datatypeAdjustmentAllowStrings($arg);\n                if (($returnValue === null) || ($arg < $returnValue)) {\n                    $returnValue = $arg;\n                }\n            }\n        }\n\n        if ($returnValue === null) {\n            return 0;\n        }\n        /** @var float|int|string $returnValue */\n\n        return $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Percentiles.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Percentiles\n{\n    public const RANK_SORT_DESCENDING = 0;\n\n    public const RANK_SORT_ASCENDING = 1;\n\n    /**\n     * PERCENTILE.\n     *\n     * Returns the nth percentile of values in a range..\n     *\n     * Excel Function:\n     *        PERCENTILE(value1[,value2[, ...]],entry)\n     *\n     * @param mixed $args Data values\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function PERCENTILE(mixed ...$args)\n    {\n        $aArgs = Functions::flattenArray($args);\n\n        // Calculate\n        $entry = array_pop($aArgs);\n\n        try {\n            $entry = StatisticalValidations::validateFloat($entry);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if (($entry < 0) || ($entry > 1)) {\n            return ExcelError::NAN();\n        }\n\n        $mArgs = self::percentileFilterValues($aArgs);\n        $mValueCount = count($mArgs);\n        if ($mValueCount > 0) {\n            sort($mArgs);\n            /** @var float[] $mArgs */\n            $count = Counts::COUNT($mArgs);\n            $index = $entry * ($count - 1);\n            $indexFloor = floor($index);\n            $iBase = (int) $indexFloor;\n            if ($index == $indexFloor) {\n                return $mArgs[$iBase];\n            }\n            $iNext = $iBase + 1;\n            $iProportion = $index - $iBase;\n\n            return $mArgs[$iBase] + (($mArgs[$iNext] - $mArgs[$iBase]) * $iProportion);\n        }\n\n        return ExcelError::NAN();\n    }\n\n    /**\n     * PERCENTRANK.\n     *\n     * Returns the rank of a value in a data set as a percentage of the data set.\n     * Note that the returned rank is simply rounded to the appropriate significant digits,\n     *      rather than floored (as MS Excel), so value 3 for a value set of  1, 2, 3, 4 will return\n     *      0.667 rather than 0.666\n     *\n     * @param mixed $valueSet An array of (float) values, or a reference to, a list of numbers\n     * @param mixed $value The number whose rank you want to find\n     * @param mixed $significance The (integer) number of significant digits for the returned percentage value\n     *\n     * @return float|string (string if result is an error)\n     */\n    public static function PERCENTRANK(mixed $valueSet, mixed $value, mixed $significance = 3): string|float\n    {\n        $valueSet = Functions::flattenArray($valueSet);\n        $value = Functions::flattenSingleValue($value);\n        $significance = ($significance === null) ? 3 : Functions::flattenSingleValue($significance);\n\n        try {\n            $value = StatisticalValidations::validateFloat($value);\n            $significance = StatisticalValidations::validateInt($significance);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $valueSet = self::rankFilterValues($valueSet);\n        $valueCount = count($valueSet);\n        if ($valueCount == 0) {\n            return ExcelError::NA();\n        }\n        sort($valueSet, SORT_NUMERIC);\n\n        $valueAdjustor = $valueCount - 1;\n        if (($value < $valueSet[0]) || ($value > $valueSet[$valueAdjustor])) {\n            return ExcelError::NA();\n        }\n\n        $pos = array_search($value, $valueSet);\n        if ($pos === false) {\n            /** @var float[] $valueSet */\n            $pos = 0;\n            $testValue = $valueSet[0];\n            while ($testValue < $value) {\n                $testValue = $valueSet[++$pos];\n            }\n            --$pos;\n            $pos += (($value - $valueSet[$pos]) / ($testValue - $valueSet[$pos]));\n        }\n\n        return round(((float) $pos) / $valueAdjustor, $significance);\n    }\n\n    /**\n     * QUARTILE.\n     *\n     * Returns the quartile of a data set.\n     *\n     * Excel Function:\n     *        QUARTILE(value1[,value2[, ...]],entry)\n     *\n     * @param mixed $args Data values\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function QUARTILE(mixed ...$args)\n    {\n        $aArgs = Functions::flattenArray($args);\n        $entry = array_pop($aArgs);\n\n        try {\n            $entry = StatisticalValidations::validateFloat($entry);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $entry = floor($entry);\n        $entry /= 4;\n        if (($entry < 0) || ($entry > 1)) {\n            return ExcelError::NAN();\n        }\n\n        return self::PERCENTILE($aArgs, $entry);\n    }\n\n    /**\n     * RANK.\n     *\n     * Returns the rank of a number in a list of numbers.\n     *\n     * @param mixed $value The number whose rank you want to find\n     * @param mixed $valueSet An array of float values, or a reference to, a list of numbers\n     * @param mixed $order Order to sort the values in the value set\n     *\n     * @return float|string The result, or a string containing an error (0 = Descending, 1 = Ascending)\n     */\n    public static function RANK(mixed $value, mixed $valueSet, mixed $order = self::RANK_SORT_DESCENDING)\n    {\n        $value = Functions::flattenSingleValue($value);\n        $valueSet = Functions::flattenArray($valueSet);\n        $order = ($order === null) ? self::RANK_SORT_DESCENDING : Functions::flattenSingleValue($order);\n\n        try {\n            $value = StatisticalValidations::validateFloat($value);\n            $order = StatisticalValidations::validateInt($order);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $valueSet = self::rankFilterValues($valueSet);\n        if ($order === self::RANK_SORT_DESCENDING) {\n            rsort($valueSet, SORT_NUMERIC);\n        } else {\n            sort($valueSet, SORT_NUMERIC);\n        }\n\n        $pos = array_search($value, $valueSet);\n        if ($pos === false) {\n            return ExcelError::NA();\n        }\n\n        return ++$pos;\n    }\n\n    /**\n     * @param mixed[] $dataSet\n     *\n     * @return mixed[]\n     */\n    protected static function percentileFilterValues(array $dataSet): array\n    {\n        return array_filter(\n            $dataSet,\n            fn ($value): bool => is_numeric($value) && !is_string($value)\n        );\n    }\n\n    /**\n     * @param mixed[] $dataSet\n     *\n     * @return mixed[]\n     */\n    protected static function rankFilterValues(array $dataSet): array\n    {\n        return array_filter(\n            $dataSet,\n            fn ($value): bool => is_numeric($value)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Permutations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\IntOrFloat;\n\nclass Permutations\n{\n    use ArrayEnabled;\n\n    /**\n     * PERMUT.\n     *\n     * Returns the number of permutations for a given number of objects that can be\n     *        selected from number objects. A permutation is any set or subset of objects or\n     *        events where internal order is significant. Permutations are different from\n     *        combinations, for which the internal order is not significant. Use this function\n     *        for lottery-style probability calculations.\n     *\n     * @param mixed $numObjs Integer number of different objects\n     *                      Or can be an array of values\n     * @param mixed $numInSet Integer number of objects in each permutation\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string Number of permutations, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function PERMUT(mixed $numObjs, mixed $numInSet)\n    {\n        if (is_array($numObjs) || is_array($numInSet)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $numObjs, $numInSet);\n        }\n\n        try {\n            $numObjs = StatisticalValidations::validateInt($numObjs);\n            $numInSet = StatisticalValidations::validateInt($numInSet);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($numObjs < $numInSet) {\n            return ExcelError::NAN();\n        }\n        /** @var float|int|string */\n        $result1 = MathTrig\\Factorial::fact($numObjs);\n        if (is_string($result1)) {\n            return $result1;\n        }\n        /** @var float|int|string */\n        $result2 = MathTrig\\Factorial::fact($numObjs - $numInSet);\n        if (is_string($result2)) {\n            return $result2;\n        }\n        $result = round($result1 / $result2);\n\n        return IntOrFloat::evaluate($result);\n    }\n\n    /**\n     * PERMUTATIONA.\n     *\n     * Returns the number of permutations for a given number of objects (with repetitions)\n     *     that can be selected from the total objects.\n     *\n     * @param mixed $numObjs Integer number of different objects\n     *                      Or can be an array of values\n     * @param mixed $numInSet Integer number of objects in each permutation\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|int|string Number of permutations, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function PERMUTATIONA(mixed $numObjs, mixed $numInSet)\n    {\n        if (is_array($numObjs) || is_array($numInSet)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $numObjs, $numInSet);\n        }\n\n        try {\n            $numObjs = StatisticalValidations::validateInt($numObjs);\n            $numInSet = StatisticalValidations::validateInt($numInSet);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($numObjs < 0 || $numInSet < 0) {\n            return ExcelError::NAN();\n        }\n\n        $result = $numObjs ** $numInSet;\n\n        return IntOrFloat::evaluate($result);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Size.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Size\n{\n    /**\n     * LARGE.\n     *\n     * Returns the nth largest value in a data set. You can use this function to\n     *        select a value based on its relative standing.\n     *\n     * Excel Function:\n     *        LARGE(value1[,value2[, ...]],entry)\n     *\n     * @param mixed $args Data values\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function large(mixed ...$args)\n    {\n        $aArgs = Functions::flattenArray($args);\n        $entry = array_pop($aArgs);\n\n        if ((is_numeric($entry)) && (!is_string($entry))) {\n            $entry = (int) floor($entry);\n\n            $mArgs = self::filter($aArgs);\n            $count = Counts::COUNT($mArgs);\n            --$entry;\n            if ($count === 0 || $entry < 0 || $entry >= $count) {\n                return ExcelError::NAN();\n            }\n            rsort($mArgs);\n            /** @var float[] $mArgs */\n\n            return $mArgs[$entry];\n        }\n\n        return ExcelError::VALUE();\n    }\n\n    /**\n     * SMALL.\n     *\n     * Returns the nth smallest value in a data set. You can use this function to\n     *        select a value based on its relative standing.\n     *\n     * Excel Function:\n     *        SMALL(value1[,value2[, ...]],entry)\n     *\n     * @param mixed $args Data values\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function small(mixed ...$args)\n    {\n        $aArgs = Functions::flattenArray($args);\n\n        $entry = array_pop($aArgs);\n\n        if ((is_numeric($entry)) && (!is_string($entry))) {\n            $entry = (int) floor($entry);\n\n            $mArgs = self::filter($aArgs);\n            $count = Counts::COUNT($mArgs);\n            --$entry;\n            if ($count === 0 || $entry < 0 || $entry >= $count) {\n                return ExcelError::NAN();\n            }\n            sort($mArgs);\n            /** @var float[] $mArgs */\n\n            return $mArgs[$entry];\n        }\n\n        return ExcelError::VALUE();\n    }\n\n    /**\n     * @param mixed[] $args Data values\n     *\n     * @return mixed[]\n     */\n    protected static function filter(array $args): array\n    {\n        $mArgs = [];\n\n        foreach ($args as $arg) {\n            // Is it a numeric value?\n            if ((is_numeric($arg)) && (!is_string($arg))) {\n                $mArgs[] = $arg;\n            }\n        }\n\n        return $mArgs;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/StandardDeviations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nclass StandardDeviations\n{\n    /**\n     * STDEV.\n     *\n     * Estimates standard deviation based on a sample. The standard deviation is a measure of how\n     *        widely values are dispersed from the average value (the mean).\n     *\n     * Excel Function:\n     *        STDEV(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function STDEV(mixed ...$args)\n    {\n        $result = Variances::VAR(...$args);\n        if (!is_numeric($result)) {\n            return $result;\n        }\n\n        return sqrt((float) $result);\n    }\n\n    /**\n     * STDEVA.\n     *\n     * Estimates standard deviation based on a sample, including numbers, text, and logical values\n     *\n     * Excel Function:\n     *        STDEVA(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function STDEVA(mixed ...$args): float|string\n    {\n        $result = Variances::VARA(...$args);\n        if (!is_numeric($result)) {\n            return $result;\n        }\n\n        return sqrt((float) $result);\n    }\n\n    /**\n     * STDEVP.\n     *\n     * Calculates standard deviation based on the entire population\n     *\n     * Excel Function:\n     *        STDEVP(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function STDEVP(mixed ...$args): float|string\n    {\n        $result = Variances::VARP(...$args);\n        if (!is_numeric($result)) {\n            return $result;\n        }\n\n        return sqrt((float) $result);\n    }\n\n    /**\n     * STDEVPA.\n     *\n     * Calculates standard deviation based on the entire population, including numbers, text, and logical values\n     *\n     * Excel Function:\n     *        STDEVPA(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     */\n    public static function STDEVPA(mixed ...$args): float|string\n    {\n        $result = Variances::VARPA(...$args);\n        if (!is_numeric($result)) {\n            return $result;\n        }\n\n        return sqrt((float) $result);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Standardize.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Standardize extends StatisticalValidations\n{\n    use ArrayEnabled;\n\n    /**\n     * STANDARDIZE.\n     *\n     * Returns a normalized value from a distribution characterized by mean and standard_dev.\n     *\n     * @param array<mixed>|float $value Value to normalize\n     *                      Or can be an array of values\n     * @param array<mixed>|float $mean Mean Value\n     *                      Or can be an array of values\n     * @param array<mixed>|float $stdDev Standard Deviation\n     *                      Or can be an array of values\n     *\n     * @return array<mixed>|float|string Standardized value, or a string containing an error\n     *         If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function execute($value, $mean, $stdDev): array|string|float\n    {\n        if (is_array($value) || is_array($mean) || is_array($stdDev)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $mean, $stdDev);\n        }\n\n        try {\n            $value = self::validateFloat($value);\n            $mean = self::validateFloat($mean);\n            $stdDev = self::validateFloat($stdDev);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        if ($stdDev <= 0) {\n            return ExcelError::NAN();\n        }\n\n        return ($value - $mean) / $stdDev;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/StatisticalValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass StatisticalValidations\n{\n    public static function validateFloat(mixed $value): float\n    {\n        if (!is_numeric($value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (float) $value;\n    }\n\n    public static function validateInt(mixed $value): int\n    {\n        if (!is_numeric($value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (int) floor((float) $value);\n    }\n\n    public static function validateBool(mixed $value): bool\n    {\n        if (!is_bool($value) && !is_numeric($value)) {\n            throw new Exception(ExcelError::VALUE());\n        }\n\n        return (bool) $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Trends.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\Trend;\n\nclass Trends\n{\n    use ArrayEnabled;\n\n    /**\n     * @param array<mixed> $array1\n     * @param array<mixed> $array2\n     */\n    private static function filterTrendValues(array &$array1, array &$array2): void\n    {\n        foreach ($array1 as $key => $value) {\n            if ((is_bool($value)) || (is_string($value)) || ($value === null)) {\n                unset($array1[$key], $array2[$key]);\n            }\n        }\n    }\n\n    /**\n     * @param mixed $array1 should be array, but scalar is made into one\n     * @param mixed $array2 should be array, but scalar is made into one\n     *\n     * @param-out array<mixed> $array1\n     * @param-out array<mixed> $array2\n     */\n    private static function checkTrendArrays(mixed &$array1, mixed &$array2): void\n    {\n        if (!is_array($array1)) {\n            $array1 = [$array1];\n        }\n        if (!is_array($array2)) {\n            $array2 = [$array2];\n        }\n\n        $array1 = Functions::flattenArray($array1);\n        $array2 = Functions::flattenArray($array2);\n\n        self::filterTrendValues($array1, $array2);\n        self::filterTrendValues($array2, $array1);\n\n        // Reset the array indexes\n        $array1 = array_merge($array1);\n        $array2 = array_merge($array2);\n    }\n\n    /**\n     * @param mixed[] $yValues\n     * @param mixed[] $xValues\n     */\n    protected static function validateTrendArrays(array $yValues, array $xValues): void\n    {\n        $yValueCount = count($yValues);\n        $xValueCount = count($xValues);\n\n        if (($yValueCount === 0) || ($yValueCount !== $xValueCount)) {\n            throw new Exception(ExcelError::NA());\n        } elseif ($yValueCount === 1) {\n            throw new Exception(ExcelError::DIV0());\n        }\n    }\n\n    /**\n     * CORREL.\n     *\n     * Returns covariance, the average of the products of deviations for each data point pair.\n     *\n     * @param mixed $yValues array of mixed Data Series Y\n     * @param null|mixed $xValues array of mixed Data Series X\n     */\n    public static function CORREL(mixed $yValues, $xValues = null): float|string\n    {\n        if (($xValues === null) || (!is_array($yValues)) || (!is_array($xValues))) {\n            return ExcelError::VALUE();\n        }\n\n        try {\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);\n\n        return $bestFitLinear->getCorrelation();\n    }\n\n    /**\n     * COVAR.\n     *\n     * Returns covariance, the average of the products of deviations for each data point pair.\n     *\n     * @param mixed[] $yValues array of mixed Data Series Y\n     * @param mixed[] $xValues array of mixed Data Series X\n     */\n    public static function COVAR(array $yValues, array $xValues): float|string\n    {\n        try {\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);\n\n        return $bestFitLinear->getCovariance();\n    }\n\n    /**\n     * FORECAST.\n     *\n     * Calculates, or predicts, a future value by using existing values.\n     * The predicted value is a y-value for a given x-value.\n     *\n     * @param mixed $xValue Float value of X for which we want to find Y\n     *                      Or can be an array of values\n     * @param mixed[] $yValues array of mixed Data Series Y\n     * @param mixed[] $xValues array of mixed Data Series X\n     *\n     * @return array<mixed>|bool|float|string If an array of numbers is passed as an argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function FORECAST(mixed $xValue, array $yValues, array $xValues)\n    {\n        if (is_array($xValue)) {\n            return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $xValue, $yValues, $xValues);\n        }\n\n        try {\n            $xValue = StatisticalValidations::validateFloat($xValue);\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);\n\n        return $bestFitLinear->getValueOfYForX($xValue);\n    }\n\n    /**\n     * GROWTH.\n     *\n     * Returns values along a predicted exponential Trend\n     *\n     * @param mixed[] $yValues Data Series Y\n     * @param mixed[] $xValues Data Series X\n     * @param mixed[] $newValues Values of X for which we want to find Y\n     * @param mixed $const A logical (boolean) value specifying whether to force the intersect to equal 0 or not\n     *\n     * @return array<int, array<int, array<int, float>>>\n     */\n    public static function GROWTH(array $yValues, array $xValues = [], array $newValues = [], mixed $const = true): array\n    {\n        $yValues = Functions::flattenArray($yValues);\n        $xValues = Functions::flattenArray($xValues);\n        $newValues = Functions::flattenArray($newValues);\n        $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);\n\n        $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);\n        if (empty($newValues)) {\n            $newValues = $bestFitExponential->getXValues();\n        }\n\n        $returnArray = [];\n        foreach ($newValues as $xValue) {\n            /** @var float $xValue */\n            $returnArray[0][] = [$bestFitExponential->getValueOfYForX($xValue)];\n        }\n\n        return $returnArray;\n    }\n\n    /**\n     * INTERCEPT.\n     *\n     * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values.\n     *\n     * @param mixed[] $yValues Data Series Y\n     * @param mixed[] $xValues Data Series X\n     */\n    public static function INTERCEPT(array $yValues, array $xValues): float|string\n    {\n        try {\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);\n\n        return $bestFitLinear->getIntersect();\n    }\n\n    /**\n     * LINEST.\n     *\n     * Calculates the statistics for a line by using the \"least squares\" method to calculate a straight line\n     *     that best fits your data, and then returns an array that describes the line.\n     *\n     * @param mixed[] $yValues Data Series Y\n     * @param null|mixed[] $xValues Data Series X\n     * @param mixed $const A logical (boolean) value specifying whether to force the intersect to equal 0 or not\n     * @param mixed $stats A logical (boolean) value specifying whether to return additional regression statistics\n     *\n     * @return array<mixed>|string The result, or a string containing an error\n     */\n    public static function LINEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string|array\n    {\n        $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);\n        $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);\n        if ($xValues === null) {\n            $xValues = $yValues;\n        }\n\n        try {\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const);\n\n        if ($stats === true) {\n            return [\n                [\n                    $bestFitLinear->getSlope(),\n                    $bestFitLinear->getIntersect(),\n                ],\n                [\n                    $bestFitLinear->getSlopeSE(),\n                    ($const === false) ? ExcelError::NA() : $bestFitLinear->getIntersectSE(),\n                ],\n                [\n                    $bestFitLinear->getGoodnessOfFit(),\n                    $bestFitLinear->getStdevOfResiduals(),\n                ],\n                [\n                    $bestFitLinear->getF(),\n                    $bestFitLinear->getDFResiduals(),\n                ],\n                [\n                    $bestFitLinear->getSSRegression(),\n                    $bestFitLinear->getSSResiduals(),\n                ],\n            ];\n        }\n\n        return [\n            $bestFitLinear->getSlope(),\n            $bestFitLinear->getIntersect(),\n        ];\n    }\n\n    /**\n     * LOGEST.\n     *\n     * Calculates an exponential curve that best fits the X and Y data series,\n     *        and then returns an array that describes the line.\n     *\n     * @param mixed[] $yValues Data Series Y\n     * @param null|mixed[] $xValues Data Series X\n     * @param mixed $const A logical (boolean) value specifying whether to force the intersect to equal 0 or not\n     * @param mixed $stats A logical (boolean) value specifying whether to return additional regression statistics\n     *\n     * @return array<mixed>|string The result, or a string containing an error\n     */\n    public static function LOGEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string|array\n    {\n        $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);\n        $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);\n        if ($xValues === null) {\n            $xValues = $yValues;\n        }\n\n        try {\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        foreach ($yValues as $value) {\n            if ($value < 0.0) {\n                return ExcelError::NAN();\n            }\n        }\n\n        $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);\n\n        if ($stats === true) {\n            return [\n                [\n                    $bestFitExponential->getSlope(),\n                    $bestFitExponential->getIntersect(),\n                ],\n                [\n                    $bestFitExponential->getSlopeSE(),\n                    ($const === false) ? ExcelError::NA() : $bestFitExponential->getIntersectSE(),\n                ],\n                [\n                    $bestFitExponential->getGoodnessOfFit(),\n                    $bestFitExponential->getStdevOfResiduals(),\n                ],\n                [\n                    $bestFitExponential->getF(),\n                    $bestFitExponential->getDFResiduals(),\n                ],\n                [\n                    $bestFitExponential->getSSRegression(),\n                    $bestFitExponential->getSSResiduals(),\n                ],\n            ];\n        }\n\n        return [\n            $bestFitExponential->getSlope(),\n            $bestFitExponential->getIntersect(),\n        ];\n    }\n\n    /**\n     * RSQ.\n     *\n     * Returns the square of the Pearson product moment correlation coefficient through data points\n     *     in known_y's and known_x's.\n     *\n     * @param mixed[] $yValues Data Series Y\n     * @param mixed[] $xValues Data Series X\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function RSQ(array $yValues, array $xValues)\n    {\n        try {\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);\n\n        return $bestFitLinear->getGoodnessOfFit();\n    }\n\n    /**\n     * SLOPE.\n     *\n     * Returns the slope of the linear regression line through data points in known_y's and known_x's.\n     *\n     * @param mixed[] $yValues Data Series Y\n     * @param mixed[] $xValues Data Series X\n     *\n     * @return float|string The result, or a string containing an error\n     */\n    public static function SLOPE(array $yValues, array $xValues)\n    {\n        try {\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);\n\n        return $bestFitLinear->getSlope();\n    }\n\n    /**\n     * STEYX.\n     *\n     * Returns the standard error of the predicted y-value for each x in the regression.\n     *\n     * @param mixed[] $yValues Data Series Y\n     * @param mixed[] $xValues Data Series X\n     */\n    public static function STEYX(array $yValues, array $xValues): float|string\n    {\n        try {\n            self::checkTrendArrays($yValues, $xValues);\n            self::validateTrendArrays($yValues, $xValues);\n        } catch (Exception $e) {\n            return $e->getMessage();\n        }\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);\n\n        return $bestFitLinear->getStdevOfResiduals();\n    }\n\n    /**\n     * TREND.\n     *\n     * Returns values along a linear Trend\n     *\n     * @param mixed[] $yValues Data Series Y\n     * @param mixed[] $xValues Data Series X\n     * @param mixed[] $newValues Values of X for which we want to find Y\n     * @param mixed $const A logical (boolean) value specifying whether to force the intersect to equal 0 or not\n     *\n     * @return array<int, array<int, array<int, float>>>\n     */\n    public static function TREND(array $yValues, array $xValues = [], array $newValues = [], mixed $const = true): array\n    {\n        $yValues = Functions::flattenArray($yValues);\n        $xValues = Functions::flattenArray($xValues);\n        $newValues = Functions::flattenArray($newValues);\n        $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);\n\n        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const);\n        if (empty($newValues)) {\n            $newValues = $bestFitLinear->getXValues();\n        }\n\n        $returnArray = [];\n        foreach ($newValues as $xValue) {\n            /** @var float $xValue */\n            $returnArray[0][] = [$bestFitLinear->getValueOfYForX($xValue)];\n        }\n\n        return $returnArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nabstract class VarianceBase\n{\n    protected static function datatypeAdjustmentAllowStrings(int|float|string|bool $value): int|float\n    {\n        if (is_bool($value)) {\n            return (int) $value;\n        } elseif (is_string($value)) {\n            return 0;\n        }\n\n        return $value;\n    }\n\n    protected static function datatypeAdjustmentBooleans(mixed $value): mixed\n    {\n        if (is_bool($value) && (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE)) {\n            return (int) $value;\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Statistical/Variances.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Variances extends VarianceBase\n{\n    /**\n     * VAR.\n     *\n     * Estimates variance based on a sample.\n     *\n     * Excel Function:\n     *        VAR(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|string (string if result is an error)\n     */\n    public static function VAR(mixed ...$args): float|string\n    {\n        $returnValue = ExcelError::DIV0();\n\n        $summerA = $summerB = 0.0;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n        $aCount = 0;\n        foreach ($aArgs as $arg) {\n            $arg = self::datatypeAdjustmentBooleans($arg);\n\n            // Is it a numeric value?\n            if ((is_numeric($arg)) && (!is_string($arg))) {\n                $summerA += ($arg * $arg);\n                $summerB += $arg;\n                ++$aCount;\n            }\n        }\n\n        if ($aCount > 1) {\n            $summerA *= $aCount;\n            $summerB *= $summerB;\n\n            return ($summerA - $summerB) / ($aCount * ($aCount - 1));\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * VARA.\n     *\n     * Estimates variance based on a sample, including numbers, text, and logical values\n     *\n     * Excel Function:\n     *        VARA(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|string (string if result is an error)\n     */\n    public static function VARA(mixed ...$args): string|float\n    {\n        $returnValue = ExcelError::DIV0();\n\n        $summerA = $summerB = 0.0;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArrayIndexed($args);\n        $aCount = 0;\n        foreach ($aArgs as $k => $arg) {\n            if ((is_string($arg)) && (Functions::isValue($k))) {\n                return ExcelError::VALUE();\n            } elseif ((is_string($arg)) && (!Functions::isMatrixValue($k))) {\n            } else {\n                // Is it a numeric value?\n                if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {\n                    $arg = self::datatypeAdjustmentAllowStrings($arg);\n                    $summerA += ($arg * $arg);\n                    $summerB += $arg;\n                    ++$aCount;\n                }\n            }\n        }\n\n        if ($aCount > 1) {\n            $summerA *= $aCount;\n            $summerB *= $summerB;\n\n            return ($summerA - $summerB) / ($aCount * ($aCount - 1));\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * VARP.\n     *\n     * Calculates variance based on the entire population\n     *\n     * Excel Function:\n     *        VARP(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|string (string if result is an error)\n     */\n    public static function VARP(mixed ...$args): float|string\n    {\n        // Return value\n        $returnValue = ExcelError::DIV0();\n\n        $summerA = $summerB = 0.0;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n        $aCount = 0;\n        foreach ($aArgs as $arg) {\n            $arg = self::datatypeAdjustmentBooleans($arg);\n\n            // Is it a numeric value?\n            if ((is_numeric($arg)) && (!is_string($arg))) {\n                $summerA += ($arg * $arg);\n                $summerB += $arg;\n                ++$aCount;\n            }\n        }\n\n        if ($aCount > 0) {\n            $summerA *= $aCount;\n            $summerB *= $summerB;\n\n            return ($summerA - $summerB) / ($aCount * $aCount);\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * VARPA.\n     *\n     * Calculates variance based on the entire population, including numbers, text, and logical values\n     *\n     * Excel Function:\n     *        VARPA(value1[,value2[, ...]])\n     *\n     * @param mixed ...$args Data values\n     *\n     * @return float|string (string if result is an error)\n     */\n    public static function VARPA(mixed ...$args): string|float\n    {\n        $returnValue = ExcelError::DIV0();\n\n        $summerA = $summerB = 0.0;\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArrayIndexed($args);\n        $aCount = 0;\n        foreach ($aArgs as $k => $arg) {\n            if ((is_string($arg)) && (Functions::isValue($k))) {\n                return ExcelError::VALUE();\n            } elseif ((is_string($arg)) && (!Functions::isMatrixValue($k))) {\n            } else {\n                // Is it a numeric value?\n                if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {\n                    $arg = self::datatypeAdjustmentAllowStrings($arg);\n                    $summerA += ($arg * $arg);\n                    $summerB += $arg;\n                    ++$aCount;\n                }\n            }\n        }\n\n        if ($aCount > 0) {\n            $summerA *= $aCount;\n            $summerB *= $summerB;\n\n            return ($summerA - $summerB) / ($aCount * $aCount);\n        }\n\n        return $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass CaseConvert\n{\n    use ArrayEnabled;\n\n    /**\n     * LOWERCASE.\n     *\n     * Converts a string value to upper case.\n     *\n     * @param mixed $mixedCaseValue The string value to convert to lower case\n     *                              Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function lower(mixed $mixedCaseValue): array|string\n    {\n        if (is_array($mixedCaseValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);\n        }\n\n        try {\n            $mixedCaseValue = Helpers::extractString($mixedCaseValue, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        return StringHelper::strToLower($mixedCaseValue);\n    }\n\n    /**\n     * UPPERCASE.\n     *\n     * Converts a string value to upper case.\n     *\n     * @param mixed $mixedCaseValue The string value to convert to upper case\n     *                              Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function upper(mixed $mixedCaseValue): array|string\n    {\n        if (is_array($mixedCaseValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);\n        }\n\n        try {\n            $mixedCaseValue = Helpers::extractString($mixedCaseValue, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        return StringHelper::strToUpper($mixedCaseValue);\n    }\n\n    /**\n     * PROPERCASE.\n     *\n     * Converts a string value to proper or title case.\n     *\n     * @param mixed $mixedCaseValue The string value to convert to title case\n     *                              Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function proper(mixed $mixedCaseValue): array|string\n    {\n        if (is_array($mixedCaseValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);\n        }\n\n        try {\n            $mixedCaseValue = Helpers::extractString($mixedCaseValue, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        return StringHelper::strToTitle($mixedCaseValue);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass CharacterConvert\n{\n    use ArrayEnabled;\n\n    private static string $oneByteCharacterSet = 'Windows-1252';\n\n    /**\n     * CHAR.\n     *\n     * @param mixed $character Integer Value to convert to its character representation\n     *                              Or can be an array of values\n     *\n     * @return array<mixed>|string The character string\n     *         If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function character(mixed $character): array|string\n    {\n        if (is_array($character)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $character);\n        }\n\n        return self::characterBoth($character, true);\n    }\n\n    /** @return array<mixed>|string */\n    public static function characterUnicode(mixed $character): array|string\n    {\n        if (is_array($character)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $character);\n        }\n\n        return self::characterBoth($character, false);\n    }\n\n    private static function characterBoth(mixed $character, bool $ansi = true): string\n    {\n        try {\n            $character = Helpers::validateInt($character, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        if ($ansi && $character === 219 && self::$oneByteCharacterSet[0] === 'M') {\n            return '€';\n        }\n\n        $min = Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE ? 0 : 1;\n        if ($character < $min || ($ansi && $character > 255) || $character > 0x10FFFF) {\n            return ExcelError::VALUE();\n        }\n        if ($character > 0x10FFFD) { // last assigned\n            return ExcelError::NA();\n        }\n        if ($ansi) {\n            $result = chr($character);\n\n            return (string) iconv(self::$oneByteCharacterSet, 'UTF-8//IGNORE', $result);\n        }\n\n        return mb_chr($character, 'UTF-8');\n    }\n\n    /**\n     * CODE.\n     *\n     * @param mixed $characters String character to convert to its ASCII value\n     *                              Or can be an array of values\n     *\n     * @return array<mixed>|int|string A string if arguments are invalid\n     *         If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function code(mixed $characters): array|string|int\n    {\n        if (is_array($characters)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $characters);\n        }\n        if (is_bool($characters) && Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {\n            $characters = $characters ? '1' : '0';\n        }\n\n        return self::codeBoth(StringHelper::convertToString($characters, convertBool: true), true);\n    }\n\n    /** @return array<mixed>|int|string */\n    public static function codeUnicode(mixed $characters): array|string|int\n    {\n        if (is_array($characters)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $characters);\n        }\n        if (is_bool($characters) && Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {\n            $characters = $characters ? '1' : '0';\n        }\n\n        return self::codeBoth(StringHelper::convertToString($characters, convertBool: true), false);\n    }\n\n    private static function codeBoth(string $characters, bool $ansi = true): int|string\n    {\n        try {\n            $characters = Helpers::extractString($characters, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        if ($characters === '') {\n            return ExcelError::VALUE();\n        }\n\n        $character = $characters;\n        if (mb_strlen($characters, 'UTF-8') > 1) {\n            $character = mb_substr($characters, 0, 1, 'UTF-8');\n        }\n        if ($ansi && $character === '€' && self::$oneByteCharacterSet[0] === 'M') {\n            return 219;\n        }\n\n        $result = mb_ord($character, 'UTF-8');\n        if ($ansi) {\n            $result = iconv('UTF-8', self::$oneByteCharacterSet . '//IGNORE', $character);\n\n            return ($result !== '') ? ord(\"$result\") : 63; // question mark\n        }\n\n        return $result;\n    }\n\n    public static function setWindowsCharacterSet(): void\n    {\n        self::$oneByteCharacterSet = 'Windows-1252';\n    }\n\n    public static function setMacCharacterSet(): void\n    {\n        self::$oneByteCharacterSet = 'MAC';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Concatenate.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\ExcelArrayPseudoFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Concatenate\n{\n    use ArrayEnabled;\n\n    /**\n     * This implements the CONCAT function, *not* CONCATENATE.\n     *\n     * @param mixed $args data to be concatenated\n     */\n    public static function CONCATENATE(...$args): string\n    {\n        $returnValue = '';\n\n        // Loop through arguments\n        $aArgs = Functions::flattenArray($args);\n\n        foreach ($aArgs as $arg) {\n            $value = Helpers::extractString($arg);\n            if (ErrorValue::isError($value, true)) {\n                $returnValue = $value;\n\n                break;\n            }\n            $returnValue .= Helpers::extractString($arg);\n            if (StringHelper::countCharacters($returnValue) > DataType::MAX_STRING_LENGTH) {\n                $returnValue = ExcelError::CALC();\n\n                break;\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * This implements the CONCATENATE function.\n     *\n     * @param mixed $args data to be concatenated\n     *\n     * @return array<string>|string\n     */\n    public static function actualCONCATENATE(...$args): array|string\n    {\n        $useSingle = false;\n        $cell = null;\n        $count = count($args);\n        if ($args[$count - 1] instanceof Cell) {\n            /** @var Cell */\n            $cell = array_pop($args);\n            $type = $cell->getWorksheet()->getParent()?->getCalculationEngine()->getInstanceArrayReturnType() ?? Calculation::getArrayReturnType();\n            $useSingle = $type === Calculation::RETURN_ARRAY_AS_VALUE;\n        }\n        if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_GNUMERIC) {\n            return self::CONCATENATE(...$args);\n        }\n        $result = '';\n        foreach ($args as $operand2) {\n            if ($useSingle && $cell instanceof Cell && is_array($operand2)) {\n                $temp = Functions::convertArrayToCellRange($operand2);\n                if ($temp !== '') {\n                    $operand2 = ExcelArrayPseudoFunctions::single($temp, $cell);\n                }\n            }\n            /** @var null|array<mixed>|bool|float|int|string $operand2 */\n            $result = self::concatenate2Args($result, $operand2);\n            if (ErrorValue::isError($result, true) === true) {\n                break;\n            }\n        }\n\n        return $result;\n    }\n\n    /**\n     * @param array<string>|string $operand1\n     * @param null|array<mixed>|bool|float|int|string $operand2\n     *\n     * @return array<string>|string\n     */\n    private static function concatenate2Args(array|string $operand1, null|array|bool|float|int|string $operand2): array|string\n    {\n        if (is_array($operand1) || is_array($operand2)) {\n            $operand1 = Calculation::boolToString($operand1);\n            $operand2 = Calculation::boolToString($operand2);\n            [$rows, $columns] = Calculation::checkMatrixOperands($operand1, $operand2, 2);\n            $errorFound = false;\n            for ($row = 0; $row < $rows && !$errorFound; ++$row) {\n                for ($column = 0; $column < $columns; ++$column) {\n                    /** @var string[][] $operand2 */\n                    if (ErrorValue::isError($operand2[$row][$column])) {\n                        return $operand2[$row][$column];\n                    }\n                    /** @var string[][] $operand1 */\n                    $operand1[$row][$column]\n                        = StringHelper::convertToString($operand1[$row][$column], convertBool: true)\n                        . StringHelper::convertToString($operand2[$row][$column], convertBool: true);\n                    if (mb_strlen($operand1[$row][$column]) > DataType::MAX_STRING_LENGTH) {\n                        $operand1 = ExcelError::CALC();\n                        $errorFound = true;\n\n                        break;\n                    }\n                }\n            }\n        } elseif (ErrorValue::isError($operand2, true) === true) {\n            $operand1 = (string) $operand2;\n        } else {\n            $operand1 .= StringHelper::convertToString($operand2, convertBool: true);\n            if (mb_strlen($operand1) > DataType::MAX_STRING_LENGTH) {\n                $operand1 = ExcelError::CALC();\n            }\n        }\n        /** @var array<string>|string $operand1 */\n\n        return $operand1;\n    }\n\n    /**\n     * TEXTJOIN.\n     *\n     * @param null|string|string[] $delimiter The delimiter to use between the joined arguments\n     *                         Or can be an array of values\n     * @param null|bool|bool[] $ignoreEmpty true/false Flag indicating whether empty arguments should be skipped\n     *                         Or can be an array of values\n     * @param mixed $args The values to join\n     *\n     * @return array<mixed>|string The joined string\n     *         If an array of values is passed for the $delimiter or $ignoreEmpty arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function TEXTJOIN($delimiter = '', $ignoreEmpty = true, mixed ...$args): array|string\n    {\n        if (is_array($delimiter) || is_array($ignoreEmpty)) {\n            return self::evaluateArrayArgumentsSubset(\n                [self::class, __FUNCTION__],\n                2,\n                $delimiter,\n                $ignoreEmpty,\n                ...$args\n            );\n        }\n\n        $delimiter ??= '';\n        $ignoreEmpty ??= true;\n        /** @var mixed[] */\n        $aArgs = Functions::flattenArray($args);\n        $returnValue = self::evaluateTextJoinArray($ignoreEmpty, $aArgs);\n\n        $returnValue ??= implode($delimiter, $aArgs);\n        if (StringHelper::countCharacters($returnValue) > DataType::MAX_STRING_LENGTH) {\n            $returnValue = ExcelError::CALC();\n        }\n\n        return $returnValue;\n    }\n\n    /** @param mixed[] $aArgs */\n    private static function evaluateTextJoinArray(bool $ignoreEmpty, array &$aArgs): ?string\n    {\n        foreach ($aArgs as $key => &$arg) {\n            $value = Helpers::extractString($arg);\n            if (ErrorValue::isError($value, true)) {\n                return $value;\n            }\n\n            if ($ignoreEmpty === true && ((is_string($arg) && trim($arg) === '') || $arg === null)) {\n                unset($aArgs[$key]);\n            } elseif (is_bool($arg)) {\n                $arg = Helpers::convertBooleanValue($arg);\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * REPT.\n     *\n     * Returns the result of builtin function round after validating args.\n     *\n     * @param mixed $stringValue The value to repeat\n     *                         Or can be an array of values\n     * @param mixed $repeatCount The number of times the string value should be repeated\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string The repeated string\n     *         If an array of values is passed for the $stringValue or $repeatCount arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array|string\n    {\n        if (is_array($stringValue) || is_array($repeatCount)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $stringValue, $repeatCount);\n        }\n\n        $stringValue = Helpers::extractString($stringValue);\n\n        if (!is_numeric($repeatCount) || $repeatCount < 0) {\n            $returnValue = ExcelError::VALUE();\n        } elseif (ErrorValue::isError($stringValue, true)) {\n            $returnValue = $stringValue;\n        } else {\n            $returnValue = str_repeat($stringValue, (int) $repeatCount);\n            if (StringHelper::countCharacters($returnValue) > DataType::MAX_STRING_LENGTH) {\n                $returnValue = ExcelError::VALUE(); // note VALUE not CALC\n            }\n        }\n\n        return $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Extract.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Extract\n{\n    use ArrayEnabled;\n\n    /**\n     * LEFT.\n     *\n     * @param mixed $value String value from which to extract characters\n     *                         Or can be an array of values\n     * @param mixed $chars The number of characters to extract (as an integer)\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string The joined string\n     *         If an array of values is passed for the $value or $chars arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function left(mixed $value, mixed $chars = 1): array|string\n    {\n        if (is_array($value) || is_array($chars)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $chars);\n        }\n\n        try {\n            $value = Helpers::extractString($value, true);\n            $chars = Helpers::extractInt($chars, 0, 1);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        return mb_substr($value, 0, $chars, 'UTF-8');\n    }\n\n    /**\n     * MID.\n     *\n     * @param mixed $value String value from which to extract characters\n     *                         Or can be an array of values\n     * @param mixed $start Integer offset of the first character that we want to extract\n     *                         Or can be an array of values\n     * @param mixed $chars The number of characters to extract (as an integer)\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string The joined string\n     *         If an array of values is passed for the $value, $start or $chars arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function mid(mixed $value, mixed $start, mixed $chars): array|string\n    {\n        if (is_array($value) || is_array($start) || is_array($chars)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $start, $chars);\n        }\n\n        try {\n            $value = Helpers::extractString($value, true);\n            $start = Helpers::extractInt($start, 1);\n            $chars = Helpers::extractInt($chars, 0);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        return mb_substr($value, --$start, $chars, 'UTF-8');\n    }\n\n    /**\n     * RIGHT.\n     *\n     * @param mixed $value String value from which to extract characters\n     *                         Or can be an array of values\n     * @param mixed $chars The number of characters to extract (as an integer)\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string The joined string\n     *         If an array of values is passed for the $value or $chars arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function right(mixed $value, mixed $chars = 1): array|string\n    {\n        if (is_array($value) || is_array($chars)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $chars);\n        }\n\n        try {\n            $value = Helpers::extractString($value, true);\n            $chars = Helpers::extractInt($chars, 0, 1);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        return mb_substr($value, mb_strlen($value, 'UTF-8') - $chars, $chars, 'UTF-8');\n    }\n\n    /**\n     * TEXTBEFORE.\n     *\n     * @param mixed $text the text that you're searching\n     *                    Or can be an array of values\n     * @param null|array<string>|string $delimiter the text that marks the point before which you want to extract\n     *                                 Multiple delimiters can be passed as an array of string values\n     * @param mixed $instance The instance of the delimiter after which you want to extract the text.\n     *                            By default, this is the first instance (1).\n     *                            A negative value means start searching from the end of the text string.\n     *                        Or can be an array of values\n     * @param mixed $matchMode Determines whether the match is case-sensitive or not.\n     *                           0 - Case-sensitive\n     *                           1 - Case-insensitive\n     *                        Or can be an array of values\n     * @param mixed $matchEnd Treats the end of text as a delimiter.\n     *                          0 - Don't match the delimiter against the end of the text.\n     *                          1 - Match the delimiter against the end of the text.\n     *                        Or can be an array of values\n     * @param array<string>|bool|float|int|string $ifNotFound value to return if no match is found\n     *                             The default is a #N/A Error\n     *                          Or can be an array of values\n     *\n     * @return array<mixed>|string the string extracted from text before the delimiter; or the $ifNotFound value\n     *         If an array of values is passed for any of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function before(mixed $text, $delimiter, mixed $instance = 1, mixed $matchMode = 0, mixed $matchEnd = 0, mixed $ifNotFound = '#N/A'): array|string\n    {\n        if (is_array($text) || is_array($instance) || is_array($matchMode) || is_array($matchEnd) || is_array($ifNotFound)) {\n            return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $text, $delimiter, $instance, $matchMode, $matchEnd, $ifNotFound);\n        }\n\n        try {\n            $text = Helpers::extractString($text ?? '', true);\n            Helpers::extractString(Functions::flattenSingleValue($delimiter ?? ''), true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        $instance = (int) StringHelper::convertToString($instance);\n        $matchMode = (int) StringHelper::convertToString($matchMode);\n        $matchEnd = (int) StringHelper::convertToString($matchEnd);\n\n        $split = self::validateTextBeforeAfter($text, $delimiter, $instance, $matchMode, $matchEnd, $ifNotFound);\n        if (is_string($split)) {\n            return $split;\n        }\n        if (Helpers::extractString(Functions::flattenSingleValue($delimiter ?? '')) === '') {\n            return ($instance > 0) ? '' : $text;\n        }\n\n        // Adjustment for a match as the first element of the split\n        $flags = self::matchFlags($matchMode);\n        $delimiter = self::buildDelimiter($delimiter);\n        $adjust = preg_match('/^' . $delimiter . \"\\$/{$flags}\", $split[0]);\n        $oddReverseAdjustment = count($split) % 2;\n\n        $split = ($instance < 0)\n            ? array_slice($split, 0, max(count($split) - (abs($instance) * 2 - 1) - $adjust - $oddReverseAdjustment, 0))\n            : array_slice($split, 0, $instance * 2 - 1 - $adjust);\n\n        return implode('', $split);\n    }\n\n    /**\n     * TEXTAFTER.\n     *\n     * @param mixed $text the text that you're searching\n     * @param null|array<string>|string $delimiter the text that marks the point before which you want to extract\n     *                                 Multiple delimiters can be passed as an array of string values\n     * @param mixed $instance The instance of the delimiter after which you want to extract the text.\n     *                          By default, this is the first instance (1).\n     *                          A negative value means start searching from the end of the text string.\n     *                        Or can be an array of values\n     * @param mixed $matchMode Determines whether the match is case-sensitive or not.\n     *                            0 - Case-sensitive\n     *                            1 - Case-insensitive\n     *                         Or can be an array of values\n     * @param mixed $matchEnd Treats the end of text as a delimiter.\n     *                          0 - Don't match the delimiter against the end of the text.\n     *                          1 - Match the delimiter against the end of the text.\n     *                        Or can be an array of values\n     * @param array<string>|scalar $ifNotFound value to return if no match is found\n     *                             The default is a #N/A Error\n     *                          Or can be an array of values\n     *\n     * @return array<mixed>|string the string extracted from text before the delimiter; or the $ifNotFound value\n     *         If an array of values is passed for any of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function after(mixed $text, $delimiter, mixed $instance = 1, mixed $matchMode = 0, mixed $matchEnd = 0, mixed $ifNotFound = '#N/A'): array|string\n    {\n        if (is_array($text) || is_array($instance) || is_array($matchMode) || is_array($matchEnd) || is_array($ifNotFound)) {\n            return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $text, $delimiter, $instance, $matchMode, $matchEnd, $ifNotFound);\n        }\n\n        try {\n            $text = Helpers::extractString($text ?? '', true);\n            Helpers::extractString(Functions::flattenSingleValue($delimiter ?? ''), true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        $instance = (int) StringHelper::convertToString($instance);\n        $matchMode = (int) StringHelper::convertToString($matchMode);\n        $matchEnd = (int) StringHelper::convertToString($matchEnd);\n\n        $split = self::validateTextBeforeAfter($text, $delimiter, $instance, $matchMode, $matchEnd, $ifNotFound);\n        if (is_string($split)) {\n            return $split;\n        }\n        if (Helpers::extractString(Functions::flattenSingleValue($delimiter ?? '')) === '') {\n            return ($instance < 0) ? '' : $text;\n        }\n\n        // Adjustment for a match as the first element of the split\n        $flags = self::matchFlags($matchMode);\n        $delimiter = self::buildDelimiter($delimiter);\n        $adjust = preg_match('/^' . $delimiter . \"\\$/{$flags}\", $split[0]);\n        $oddReverseAdjustment = count($split) % 2;\n\n        $split = ($instance < 0)\n            ? array_slice($split, count($split) - ((int) abs($instance + 1) * 2) - $adjust - $oddReverseAdjustment)\n            : array_slice($split, $instance * 2 - $adjust);\n\n        return implode('', $split);\n    }\n\n    /**\n     * @param null|array<string>|string $delimiter\n     * @param array<string>|scalar $ifNotFound\n     *\n     * @return array<string>|string\n     */\n    private static function validateTextBeforeAfter(string $text, null|array|string $delimiter, int $instance, int $matchMode, int $matchEnd, mixed $ifNotFound): array|string\n    {\n        $flags = self::matchFlags($matchMode);\n        $delimiter = self::buildDelimiter($delimiter);\n\n        if (preg_match('/' . $delimiter . \"/{$flags}\", $text) === 0 && $matchEnd === 0) {\n            return is_array($ifNotFound) ? $ifNotFound : StringHelper::convertToString($ifNotFound);\n        }\n\n        $split = preg_split('/' . $delimiter . \"/{$flags}\", $text, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n        if ($split === false) {\n            return ExcelError::NA();\n        }\n\n        if ($instance === 0 || abs($instance) > StringHelper::countCharacters($text)) {\n            return ExcelError::VALUE();\n        }\n\n        if ($matchEnd === 0 && (abs($instance) > floor(count($split) / 2))) {\n            return ExcelError::NA();\n        } elseif ($matchEnd !== 0 && (abs($instance) - 1 > ceil(count($split) / 2))) {\n            return ExcelError::NA();\n        }\n\n        return $split;\n    }\n\n    /**\n     * @param null|array<string>|string $delimiter the text that marks the point before which you want to extract\n     *                                 Multiple delimiters can be passed as an array of string values\n     */\n    private static function buildDelimiter($delimiter): string\n    {\n        if (is_array($delimiter)) {\n            /** @var array<?string> */\n            $delimiter = Functions::flattenArray($delimiter);\n            $quotedDelimiters = array_map(\n                fn (?string $delimiter): string => preg_quote($delimiter ?? '', '/'),\n                $delimiter\n            );\n            $delimiters = implode('|', $quotedDelimiters);\n\n            return '(' . $delimiters . ')';\n        }\n        /** @var ?string $delimiter */\n\n        return '(' . preg_quote($delimiter ?? '', '/') . ')';\n    }\n\n    private static function matchFlags(int $matchMode): string\n    {\n        return ($matchMode === 0) ? 'mu' : 'miu';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Format.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse Composer\\Pcre\\Preg;\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nclass Format\n{\n    use ArrayEnabled;\n\n    /**\n     * DOLLAR.\n     *\n     * This function converts a number to text using currency format, with the decimals rounded to the specified place.\n     * The format used is $#,##0.00_);($#,##0.00)..\n     *\n     * @param mixed $value The value to format\n     *                         Or can be an array of values\n     * @param mixed $decimals The number of digits to display to the right of the decimal point (as an integer).\n     *                            If decimals is negative, number is rounded to the left of the decimal point.\n     *                            If you omit decimals, it is assumed to be 2\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function DOLLAR(mixed $value = 0, mixed $decimals = 2)\n    {\n        if (is_array($value) || is_array($decimals)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $decimals);\n        }\n\n        try {\n            $value = Helpers::extractFloat($value);\n            $decimals = Helpers::extractInt($decimals, -100, 0, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        $mask = '$#,##0';\n        if ($decimals > 0) {\n            $mask .= '.' . str_repeat('0', $decimals);\n        } else {\n            $round = 10 ** abs($decimals);\n            if ($value < 0) {\n                $round = 0 - $round;\n            }\n            /** @var float|int|string */\n            $value = MathTrig\\Round::multiple($value, $round);\n        }\n        $mask = \"{$mask};-{$mask}\";\n\n        return NumberFormat::toFormattedString($value, $mask);\n    }\n\n    /**\n     * FIXED.\n     *\n     * @param mixed $value The value to format\n     *                         Or can be an array of values\n     * @param mixed $decimals Integer value for the number of decimal places that should be formatted\n     *                         Or can be an array of values\n     * @param mixed $noCommas Boolean value indicating whether the value should have thousands separators or not\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function FIXEDFORMAT(mixed $value, mixed $decimals = 2, mixed $noCommas = false): array|string\n    {\n        if (is_array($value) || is_array($decimals) || is_array($noCommas)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $decimals, $noCommas);\n        }\n\n        try {\n            $value = Helpers::extractFloat($value);\n            $decimals = Helpers::extractInt($decimals, -100, 0, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        $valueResult = round($value, $decimals);\n        if ($decimals < 0) {\n            $decimals = 0;\n        }\n        if ($noCommas === false) {\n            $valueResult = number_format(\n                $valueResult,\n                $decimals,\n                StringHelper::getDecimalSeparator(),\n                StringHelper::getThousandsSeparator()\n            );\n        }\n\n        return (string) $valueResult;\n    }\n\n    /**\n     * TEXT.\n     *\n     * @param mixed $value The value to format\n     *                         Or can be an array of values\n     * @param mixed $format A string with the Format mask that should be used\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function TEXTFORMAT(mixed $value, mixed $format): array|string\n    {\n        if (is_array($value) || is_array($format)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $format);\n        }\n\n        try {\n            $value = Helpers::extractString($value, true);\n            $format = Helpers::extractString($format, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        $format = (string) NumberFormat::convertSystemFormats($format);\n\n        if (!is_numeric($value) && Date::isDateTimeFormatCode($format) && !Preg::isMatch('/^\\s*\\d+(\\s+\\d+)+\\s*$/', $value)) {\n            $value1 = DateTimeExcel\\DateValue::fromString($value);\n            $value2 = DateTimeExcel\\TimeValue::fromString($value);\n            /** @var float|int|string */\n            $value = (is_numeric($value1) && is_numeric($value2)) ? ($value1 + $value2) : (is_numeric($value1) ? $value1 : (is_numeric($value2) ? $value2 : $value));\n        }\n\n        return (string) NumberFormat::toFormattedString($value, $format);\n    }\n\n    /**\n     * @param mixed $value Value to check\n     */\n    private static function convertValue(mixed $value, bool $spacesMeanZero = false): mixed\n    {\n        $value = $value ?? 0;\n        if (is_bool($value)) {\n            if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {\n                $value = (int) $value;\n            } else {\n                throw new CalcExp(ExcelError::VALUE());\n            }\n        }\n        if (is_string($value)) {\n            $value = trim($value);\n            if (ErrorValue::isError($value, true)) {\n                throw new CalcExp($value);\n            }\n            if ($spacesMeanZero && $value === '') {\n                $value = 0;\n            }\n        }\n\n        return $value;\n    }\n\n    /**\n     * VALUE.\n     *\n     * @param mixed $value Value to check\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|DateTimeInterface|float|int|string A string if arguments are invalid\n     *         If an array of values is passed for the argument, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function VALUE(mixed $value = '')\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        try {\n            $value = self::convertValue($value);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n        if (!is_numeric($value)) {\n            $value = StringHelper::convertToString($value);\n            $numberValue = str_replace(\n                StringHelper::getThousandsSeparator(),\n                '',\n                trim($value, \" \\t\\n\\r\\0\\x0B\" . StringHelper::getCurrencyCode())\n            );\n            if ($numberValue === '') {\n                return ExcelError::VALUE();\n            }\n            if (is_numeric($numberValue)) {\n                return (float) $numberValue;\n            }\n\n            $dateSetting = Functions::getReturnDateType();\n            Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);\n\n            if (str_contains($value, ':')) {\n                $timeValue = Functions::scalar(DateTimeExcel\\TimeValue::fromString($value));\n                if ($timeValue !== ExcelError::VALUE()) {\n                    Functions::setReturnDateType($dateSetting);\n\n                    return $timeValue; //* @phpstan-ignore-line\n                }\n            }\n            $dateValue = Functions::scalar(DateTimeExcel\\DateValue::fromString($value));\n            if ($dateValue !== ExcelError::VALUE()) {\n                Functions::setReturnDateType($dateSetting);\n\n                return $dateValue; //* @phpstan-ignore-line\n            }\n            Functions::setReturnDateType($dateSetting);\n\n            return ExcelError::VALUE();\n        }\n\n        return (float) $value;\n    }\n\n    /**\n     * VALUETOTEXT.\n     *\n     * @param mixed $value The value to format\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function valueToText(mixed $value, mixed $format = false): array|string\n    {\n        if (is_array($value) || is_array($format)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $format);\n        }\n\n        $format = (bool) $format;\n\n        if (is_object($value) && $value instanceof RichText) {\n            $value = $value->getPlainText();\n        }\n        if (is_string($value)) {\n            $value = ($format === true) ? StringHelper::convertToString(Calculation::wrapResult($value)) : $value;\n            $value = str_replace(\"\\n\", '', $value);\n        } elseif (is_bool($value)) {\n            $value = Calculation::getLocaleBoolean($value ? 'TRUE' : 'FALSE');\n        }\n\n        return StringHelper::convertToString($value);\n    }\n\n    private static function getDecimalSeparator(mixed $decimalSeparator): string\n    {\n        return empty($decimalSeparator) ? StringHelper::getDecimalSeparator() : StringHelper::convertToString($decimalSeparator);\n    }\n\n    private static function getGroupSeparator(mixed $groupSeparator): string\n    {\n        return empty($groupSeparator) ? StringHelper::getThousandsSeparator() : StringHelper::convertToString($groupSeparator);\n    }\n\n    /**\n     * NUMBERVALUE.\n     *\n     * @param mixed $value The value to format\n     *                         Or can be an array of values\n     * @param mixed $decimalSeparator A string with the decimal separator to use, defaults to locale defined value\n     *                         Or can be an array of values\n     * @param mixed $groupSeparator A string with the group/thousands separator to use, defaults to locale defined value\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|float|string\n     */\n    public static function NUMBERVALUE(mixed $value = '', mixed $decimalSeparator = null, mixed $groupSeparator = null): array|string|float\n    {\n        if (is_array($value) || is_array($decimalSeparator) || is_array($groupSeparator)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $decimalSeparator, $groupSeparator);\n        }\n\n        try {\n            $value = self::convertValue($value, true);\n            $decimalSeparator = self::getDecimalSeparator($decimalSeparator);\n            $groupSeparator = self::getGroupSeparator($groupSeparator);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        /** @var null|array<scalar>|scalar $value */\n        if (!is_array($value) && !is_numeric($value)) {\n            $value = StringHelper::convertToString($value);\n            $decimalPositions = Preg::matchAllWithOffsets('/' . preg_quote($decimalSeparator, '/') . '/', $value, $matches);\n            if ($decimalPositions > 1) {\n                return ExcelError::VALUE();\n            }\n            $decimalOffset = array_pop($matches[0])[1] ?? null;\n            if ($decimalOffset === null || strpos($value, $groupSeparator, $decimalOffset) !== false) {\n                return ExcelError::VALUE();\n            }\n\n            $value = str_replace([$groupSeparator, $decimalSeparator], ['', '.'], $value);\n\n            // Handle the special case of trailing % signs\n            $percentageString = rtrim($value, '%');\n            if (!is_numeric($percentageString)) {\n                return ExcelError::VALUE();\n            }\n\n            $percentageAdjustment = strlen($value) - strlen($percentageString);\n            if ($percentageAdjustment) {\n                $value = (float) $percentageString;\n                $value /= 10 ** ($percentageAdjustment * 2);\n            }\n        }\n\n        return is_array($value) ? ExcelError::VALUE() : (float) $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Helpers.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Helpers\n{\n    public static function convertBooleanValue(bool $value): string\n    {\n        if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {\n            return $value ? '1' : '0';\n        }\n\n        return ($value) ? Calculation::getTRUE() : Calculation::getFALSE();\n    }\n\n    /**\n     * @param mixed $value String value from which to extract characters\n     */\n    public static function extractString(mixed $value, bool $throwIfError = false): string\n    {\n        if (is_bool($value)) {\n            return self::convertBooleanValue($value);\n        }\n        if ($throwIfError && is_string($value) && ErrorValue::isError($value, true)) {\n            throw new CalcExp($value);\n        }\n\n        return StringHelper::convertToString($value);\n    }\n\n    public static function extractInt(mixed $value, int $minValue, int $gnumericNull = 0, bool $ooBoolOk = false): int\n    {\n        if ($value === null) {\n            // usually 0, but sometimes 1 for Gnumeric\n            $value = (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_GNUMERIC) ? $gnumericNull : 0;\n        }\n        if (is_bool($value) && ($ooBoolOk || Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_OPENOFFICE)) {\n            $value = (int) $value;\n        }\n        if (!is_numeric($value)) {\n            throw new CalcExp(ExcelError::VALUE());\n        }\n        $value = (int) $value;\n        if ($value < $minValue) {\n            throw new CalcExp(ExcelError::VALUE());\n        }\n\n        return (int) $value;\n    }\n\n    public static function extractFloat(mixed $value): float\n    {\n        if ($value === null) {\n            $value = 0.0;\n        }\n        if (is_bool($value)) {\n            $value = (float) $value;\n        }\n        if (!is_numeric($value)) {\n            if (is_string($value) && ErrorValue::isError($value, true)) {\n                throw new CalcExp($value);\n            }\n\n            throw new CalcExp(ExcelError::VALUE());\n        }\n\n        return (float) $value;\n    }\n\n    public static function validateInt(mixed $value, bool $throwIfError = false): int\n    {\n        if ($value === null) {\n            $value = 0;\n        } elseif (is_bool($value)) {\n            $value = (int) $value;\n        } elseif ($throwIfError && is_string($value) && !is_numeric($value)) {\n            if (!ErrorValue::isError($value, true)) {\n                $value = ExcelError::VALUE();\n            }\n\n            throw new CalcExp($value);\n        }\n\n        return (int) StringHelper::convertToString($value);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Replace.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Replace\n{\n    use ArrayEnabled;\n\n    /**\n     * REPLACE.\n     *\n     * @param mixed $oldText The text string value to modify\n     *                         Or can be an array of values\n     * @param mixed $start Integer offset for start character of the replacement\n     *                         Or can be an array of values\n     * @param mixed $chars Integer number of characters to replace from the start offset\n     *                         Or can be an array of values\n     * @param mixed $newText String to replace in the defined position\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function replace(mixed $oldText, mixed $start, mixed $chars, mixed $newText): array|string\n    {\n        if (is_array($oldText) || is_array($start) || is_array($chars) || is_array($newText)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $oldText, $start, $chars, $newText);\n        }\n\n        try {\n            $start = Helpers::extractInt($start, 1, 0, true);\n            $chars = Helpers::extractInt($chars, 0, 0, true);\n            $oldText = Helpers::extractString($oldText, true);\n            $newText = Helpers::extractString($newText, true);\n            $left = StringHelper::substring($oldText, 0, $start - 1);\n\n            $right = StringHelper::substring($oldText, $start + $chars - 1, null);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n        $returnValue = $left . $newText . $right;\n        if (StringHelper::countCharacters($returnValue) > DataType::MAX_STRING_LENGTH) {\n            $returnValue = ExcelError::VALUE();\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * SUBSTITUTE.\n     *\n     * @param mixed $text The text string value to modify\n     *                         Or can be an array of values\n     * @param mixed $fromText The string value that we want to replace in $text\n     *                         Or can be an array of values\n     * @param mixed $toText The string value that we want to replace with in $text\n     *                         Or can be an array of values\n     * @param mixed $instance Integer instance Number for the occurrence of frmText to change\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function substitute(mixed $text = '', mixed $fromText = '', mixed $toText = '', mixed $instance = null): array|string\n    {\n        if (is_array($text) || is_array($fromText) || is_array($toText) || is_array($instance)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $text, $fromText, $toText, $instance);\n        }\n\n        try {\n            $text = Helpers::extractString($text, true);\n            $fromText = Helpers::extractString($fromText, true);\n            $toText = Helpers::extractString($toText, true);\n            if ($instance === null) {\n                $returnValue = str_replace($fromText, $toText, $text);\n            } else {\n                if (is_bool($instance)) {\n                    if ($instance === false || Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_OPENOFFICE) {\n                        return ExcelError::Value();\n                    }\n                    $instance = 1;\n                }\n                $instance = Helpers::extractInt($instance, 1, 0, true);\n                $returnValue = self::executeSubstitution($text, $fromText, $toText, $instance);\n            }\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n        if (StringHelper::countCharacters($returnValue) > DataType::MAX_STRING_LENGTH) {\n            $returnValue = ExcelError::VALUE();\n        }\n\n        return $returnValue;\n    }\n\n    private static function executeSubstitution(string $text, string $fromText, string $toText, int $instance): string\n    {\n        $pos = -1;\n        while ($instance > 0) {\n            $pos = mb_strpos($text, $fromText, $pos + 1, 'UTF-8');\n            if ($pos === false) {\n                return $text;\n            }\n            --$instance;\n        }\n\n        return StringHelper::convertToString(Functions::scalar(self::REPLACE($text, ++$pos, StringHelper::countCharacters($fromText), $toText)));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Search.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Search\n{\n    use ArrayEnabled;\n\n    /**\n     * FIND (case-sensitive search).\n     *\n     * @param mixed $needle The string to look for\n     *                         Or can be an array of values\n     * @param mixed $haystack The string in which to look\n     *                         Or can be an array of values\n     * @param mixed $offset Integer offset within $haystack to start searching from\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|int|string The offset where the first occurrence of needle was found in the haystack\n     *         If an array of values is passed for the $value or $chars arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function sensitive(mixed $needle, mixed $haystack, mixed $offset = 1): array|string|int\n    {\n        if (is_array($needle) || is_array($haystack) || is_array($offset)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $needle, $haystack, $offset);\n        }\n\n        try {\n            $needle = Helpers::extractString($needle, true);\n            $haystack = Helpers::extractString($haystack, true);\n            $offset = Helpers::extractInt($offset, 1, 0, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        if (StringHelper::countCharacters($haystack) >= $offset) {\n            if (StringHelper::countCharacters($needle) === 0) {\n                return $offset;\n            }\n\n            $pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8');\n            if ($pos !== false) {\n                return ++$pos;\n            }\n        }\n\n        return ExcelError::VALUE();\n    }\n\n    /**\n     * SEARCH (case-insensitive search).\n     *\n     * @param mixed $needle The string to look for\n     *                         Or can be an array of values\n     * @param mixed $haystack The string in which to look\n     *                         Or can be an array of values\n     * @param mixed $offset Integer offset within $haystack to start searching from\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|int|string The offset where the first occurrence of needle was found in the haystack\n     *         If an array of values is passed for the $value or $chars arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function insensitive(mixed $needle, mixed $haystack, mixed $offset = 1): array|string|int\n    {\n        if (is_array($needle) || is_array($haystack) || is_array($offset)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $needle, $haystack, $offset);\n        }\n\n        try {\n            $needle = Helpers::extractString($needle, true);\n            $haystack = Helpers::extractString($haystack, true);\n            $offset = Helpers::extractInt($offset, 1, 0, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        if (StringHelper::countCharacters($haystack) >= $offset) {\n            if (StringHelper::countCharacters($needle) === 0) {\n                return $offset;\n            }\n\n            $pos = mb_stripos($haystack, $needle, --$offset, 'UTF-8');\n            if ($pos !== false) {\n                return ++$pos;\n            }\n        }\n\n        return ExcelError::VALUE();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Text.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Text\n{\n    use ArrayEnabled;\n\n    /**\n     * LEN.\n     *\n     * @param mixed $value String Value\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|int|string If an array of values is passed for the argument, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function length(mixed $value = ''): array|int|string\n    {\n        if (is_array($value)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);\n        }\n\n        try {\n            $value = Helpers::extractString($value, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        return mb_strlen($value, 'UTF-8');\n    }\n\n    /**\n     * Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise.\n     * EXACT is case-sensitive but ignores formatting differences.\n     * Use EXACT to test text being entered into a document.\n     *\n     * @param mixed $value1 String Value\n     *                         Or can be an array of values\n     * @param mixed $value2 String Value\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|bool|string If an array of values is passed for either of the arguments, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function exact(mixed $value1, mixed $value2): array|bool|string\n    {\n        if (is_array($value1) || is_array($value2)) {\n            return self::evaluateArrayArguments([self::class, __FUNCTION__], $value1, $value2);\n        }\n\n        try {\n            $value1 = Helpers::extractString($value1, true);\n            $value2 = Helpers::extractString($value2, true);\n        } catch (CalcExp $e) {\n            return $e->getMessage();\n        }\n\n        return $value2 === $value1;\n    }\n\n    /**\n     * T.\n     *\n     * @param mixed $testValue Value to check\n     *                         Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed for the argument, then the returned result\n     *            will also be an array with matching dimensions\n     */\n    public static function test(mixed $testValue = ''): array|string\n    {\n        if (is_array($testValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $testValue);\n        }\n\n        if (is_string($testValue)) {\n            return $testValue;\n        }\n\n        return '';\n    }\n\n    /**\n     * TEXTSPLIT.\n     *\n     * @param mixed $text the text that you're searching\n     * @param null|array<string>|string $columnDelimiter The text that marks the point where to spill the text across columns.\n     *                          Multiple delimiters can be passed as an array of string values\n     * @param null|array<string>|string $rowDelimiter The text that marks the point where to spill the text down rows.\n     *                          Multiple delimiters can be passed as an array of string values\n     * @param bool $ignoreEmpty Specify FALSE to create an empty cell when two delimiters are consecutive.\n     *                              true = create empty cells\n     *                              false = skip empty cells\n     *                              Defaults to TRUE, which creates an empty cell\n     * @param bool $matchMode Determines whether the match is case-sensitive or not.\n     *                              true = case-sensitive\n     *                              false = case-insensitive\n     *                         By default, a case-sensitive match is done.\n     * @param mixed $padding The value with which to pad the result.\n     *                              The default is #N/A.\n     *\n     * @return array<mixed>|string the array built from the text, split by the row and column delimiters, or an error string\n     */\n    public static function split(mixed $text, $columnDelimiter = null, $rowDelimiter = null, bool $ignoreEmpty = false, bool $matchMode = true, mixed $padding = '#N/A'): array|string\n    {\n        $text = Functions::flattenSingleValue($text);\n        if (ErrorValue::isError($text, true)) {\n            return StringHelper::convertToString($text);\n        }\n\n        $flags = self::matchFlags($matchMode);\n\n        if ($rowDelimiter !== null) {\n            $delimiter = self::buildDelimiter($rowDelimiter);\n            $rows = ($delimiter === '()')\n                ? [$text]\n                : Preg::split(\"/{$delimiter}/{$flags}\", StringHelper::convertToString($text));\n        } else {\n            $rows = [$text];\n        }\n\n        if ($ignoreEmpty === true) {\n            $rows = array_values(array_filter(\n                $rows,\n                fn ($row): bool => $row !== ''\n            ));\n        }\n\n        if ($columnDelimiter !== null) {\n            $delimiter = self::buildDelimiter($columnDelimiter);\n            array_walk(\n                $rows,\n                function (&$row) use ($delimiter, $flags, $ignoreEmpty): void {\n                    $row = ($delimiter === '()')\n                        ? [$row]\n                        : Preg::split(\"/{$delimiter}/{$flags}\", StringHelper::convertToString($row));\n                    if ($ignoreEmpty === true) {\n                        $row = array_values(array_filter(\n                            $row,\n                            fn ($value): bool => $value !== ''\n                        ));\n                    }\n                }\n            );\n            if ($ignoreEmpty === true) {\n                $rows = array_values(array_filter(\n                    $rows,\n                    fn ($row): bool => $row !== [] && $row !== ['']\n                ));\n            }\n        }\n\n        return self::applyPadding($rows, $padding);\n    }\n\n    /**\n     * @param mixed[] $rows\n     *\n     * @return mixed[]\n     */\n    private static function applyPadding(array $rows, mixed $padding): array\n    {\n        $columnCount = array_reduce(\n            $rows,\n            fn (int $counter, array $row): int => max($counter, count($row)), //* @phpstan-ignore-line\n            0\n        );\n\n        return array_map(\n            fn (array $row): array => (count($row) < $columnCount) //* @phpstan-ignore-line\n                    ? array_merge($row, array_fill(0, $columnCount - count($row), $padding))\n                    : $row,\n            $rows\n        );\n    }\n\n    /**\n     * @param null|array<string>|string $delimiter the text that marks the point before which you want to split\n     *                                 Multiple delimiters can be passed as an array of string values\n     */\n    private static function buildDelimiter($delimiter): string\n    {\n        $valueSet = Functions::flattenArray($delimiter);\n\n        if (is_array($delimiter) && count($valueSet) > 1) {\n            /** @var array<?string> $valueSet */\n            $quotedDelimiters = array_map(\n                fn (?string $delimiter): string => preg_quote($delimiter ?? '', '/'),\n                $valueSet\n            );\n            $delimiters = implode('|', $quotedDelimiters);\n\n            return '(' . $delimiters . ')';\n        }\n\n        return '(' . preg_quote(StringHelper::convertToString(Functions::flattenSingleValue($delimiter)), '/') . ')';\n    }\n\n    private static function matchFlags(bool $matchMode): string\n    {\n        return ($matchMode === true) ? 'miu' : 'mu';\n    }\n\n    /** @param mixed[][] $array */\n    public static function fromArray(array $array, int $format = 0): string\n    {\n        $result = [];\n        foreach ($array as $row) {\n            $cells = [];\n            foreach ($row as $cellValue) {\n                $value = ($format === 1) ? self::formatValueMode1($cellValue) : self::formatValueMode0($cellValue);\n                $cells[] = $value;\n            }\n            $result[] = implode(($format === 1) ? ',' : ', ', $cells);\n        }\n\n        $result = implode(($format === 1) ? ';' : ', ', $result);\n\n        return ($format === 1) ? '{' . $result . '}' : $result;\n    }\n\n    private static function formatValueMode0(mixed $cellValue): string\n    {\n        if (is_bool($cellValue)) {\n            return Calculation::getLocaleBoolean($cellValue ? 'TRUE' : 'FALSE');\n        }\n\n        return StringHelper::convertToString($cellValue);\n    }\n\n    private static function formatValueMode1(mixed $cellValue): string\n    {\n        if (is_string($cellValue) && ErrorValue::isError($cellValue) === false) {\n            return Calculation::FORMULA_STRING_QUOTE . $cellValue . Calculation::FORMULA_STRING_QUOTE;\n        } elseif (is_bool($cellValue)) {\n            return Calculation::getLocaleBoolean($cellValue ? 'TRUE' : 'FALSE');\n        }\n\n        return StringHelper::convertToString($cellValue);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Thai.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nclass Thai\n{\n    use ArrayEnabled;\n\n    private const THAI_DIGITS = [\n        0 => 'ศูนย์',\n        1 => 'หนึ่ง',\n        2 => 'สอง',\n        3 => 'สาม',\n        4 => 'สี่',\n        5 => 'ห้า',\n        6 => 'หก',\n        7 => 'เจ็ด',\n        8 => 'แปด',\n        9 => 'เก้า',\n    ];\n\n    private const THAI_UNITS = [\n        1 => 'สิบ',\n        2 => 'ร้อย',\n        3 => 'พัน',\n        4 => 'หมื่น',\n        5 => 'แสน',\n        6 => 'ล้าน',\n    ];\n\n    private const THAI_COMPOUND_ONE = 'เอ็ด';\n    private const THAI_COMPOUND_TWO = 'ยี่';\n    private const THAI_INTEGER = 'ถ้วน';\n    private const THAI_MINUS = 'ลบ';\n    private const THAI_BAHT = 'บาท';\n    private const THAI_SATANG = 'สตางค์';\n\n    /**\n     * BAHTTEXT.\n     *\n     * @param mixed $number The number or array of numbers to convert\n     *\n     * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array with the same dimensions\n     */\n    public static function getBahtText(mixed $number): array|string\n    {\n        if (is_array($number)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);\n        }\n\n        if (is_string($number) && preg_match('/^-?\\d+$/', $number)) {\n            $isNegative = str_starts_with($number, '-');\n            $baht = ltrim($number, '-0') ?: '0';\n            $satang = '00';\n        } elseif (is_bool($number) || is_numeric($number)) {\n            $number += 0;\n            $isNegative = $number < 0;\n            [$baht, $satang] = explode('.', number_format(abs($number), 2, '.', ''));\n        } else {\n            return ExcelError::VALUE();\n        }\n\n        $hasWhole = $baht !== '0';\n        $hasFraction = $satang !== '00';\n\n        if (!$hasWhole && !$hasFraction) {\n            return self::THAI_DIGITS[0] . self::THAI_BAHT . self::THAI_INTEGER;\n        }\n\n        $text = $isNegative\n            ? self::THAI_MINUS\n            : '';\n\n        if ($hasWhole) {\n            $text .= self::convertLarge($baht) . self::THAI_BAHT;\n        }\n\n        $text .= $hasFraction\n            ? self::convertBlock($satang) . self::THAI_SATANG\n            : self::THAI_INTEGER;\n\n        return $text;\n    }\n\n    private static function convertLarge(string $digits): string\n    {\n        $length = strlen($digits) % 6 ?: 6;\n\n        $chunks = [\n            substr($digits, 0, $length),\n            ...str_split(substr($digits, $length), 6),\n        ];\n\n        $chunks = array_filter($chunks, fn (string $chunk): bool => $chunk !== '');\n\n        return implode(\n            self::THAI_UNITS[6],\n            array_map(self::convertBlock(...), $chunks)\n        );\n    }\n\n    private static function convertBlock(string $block): string\n    {\n        $out = '';\n        $length = strlen($block);\n        $i = 0;\n\n        // Hundreds and higher powers\n        for ($power = $length - 1; $power >= 2; --$power) {\n            $digit = $block[$i++];\n            if ($digit !== '0') {\n                $out .= self::THAI_DIGITS[$digit] . self::THAI_UNITS[$power];\n            }\n        }\n\n        // Tens\n        $ten = $length > 1 ? $block[$i++] : '0';\n        if ($ten !== '0') {\n            $out .= match ($ten) {\n                '1' => '',\n                '2' => self::THAI_COMPOUND_TWO,\n                default => self::THAI_DIGITS[$ten],\n            } . self::THAI_UNITS[1];\n        }\n\n        // Ones\n        $one = $block[$i] ?? '0';\n        if ($one !== '0') {\n            $out .= $ten !== '0' && $one === '1'\n                ? self::THAI_COMPOUND_ONE\n                : self::THAI_DIGITS[$one];\n        }\n\n        return $out;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/TextData/Trim.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled;\n\nclass Trim\n{\n    use ArrayEnabled;\n\n    /**\n     * CLEAN.\n     *\n     * @param mixed $stringValue String Value to check\n     *                              Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function nonPrintable(mixed $stringValue = '')\n    {\n        if (is_array($stringValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $stringValue);\n        }\n\n        $stringValue = Helpers::extractString($stringValue);\n\n        return (string) preg_replace('/[\\x00-\\x1f]/', '', \"$stringValue\");\n    }\n\n    /**\n     * TRIM.\n     *\n     * @param mixed $stringValue String Value to check\n     *                              Or can be an array of values\n     *\n     * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array\n     *            with the same dimensions\n     */\n    public static function spaces(mixed $stringValue = ''): array|string\n    {\n        if (is_array($stringValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $stringValue);\n        }\n\n        $stringValue = Helpers::extractString($stringValue);\n\n        return trim(preg_replace('/ +/', ' ', trim(\"$stringValue\", ' ')) ?? '', ' ');\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Token/Stack.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Token;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\BranchPruner;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Stack\n{\n    private BranchPruner $branchPruner;\n\n    /**\n     * The parser stack for formulae.\n     *\n     * @var array<int, array<mixed>>\n     */\n    private array $stack = [];\n\n    /**\n     * Count of entries in the parser stack.\n     */\n    private int $count = 0;\n\n    public function __construct(BranchPruner $branchPruner)\n    {\n        $this->branchPruner = $branchPruner;\n    }\n\n    /**\n     * Return the number of entries on the stack.\n     */\n    public function count(): int\n    {\n        return $this->count;\n    }\n\n    /**\n     * Push a new entry onto the stack.\n     */\n    public function push(string $type, mixed $value, ?string $reference = null): void\n    {\n        $stackItem = $this->getStackItem($type, $value, $reference);\n        $this->stack[$this->count++] = $stackItem;\n\n        if ($type === 'Function') {\n            $localeFunction = Calculation::localeFunc(StringHelper::convertToString($value));\n            if ($localeFunction != $value) {\n                $this->stack[($this->count - 1)]['localeValue'] = $localeFunction;\n            }\n        }\n    }\n\n    /** @param array<mixed> $stackItem */\n    public function pushStackItem(array $stackItem): void\n    {\n        $this->stack[$this->count++] = $stackItem;\n    }\n\n    /** @return array<mixed> */\n    public function getStackItem(string $type, mixed $value, ?string $reference = null): array\n    {\n        $stackItem = [\n            'type' => $type,\n            'value' => $value,\n            'reference' => $reference,\n        ];\n\n        // will store the result under this alias\n        $storeKey = $this->branchPruner->currentCondition();\n        if (isset($storeKey) || $reference === 'NULL') {\n            $stackItem['storeKey'] = $storeKey;\n        }\n\n        // will only run computation if the matching store key is true\n        $onlyIf = $this->branchPruner->currentOnlyIf();\n        if (isset($onlyIf) || $reference === 'NULL') {\n            $stackItem['onlyIf'] = $onlyIf;\n        }\n\n        // will only run computation if the matching store key is false\n        $onlyIfNot = $this->branchPruner->currentOnlyIfNot();\n        if (isset($onlyIfNot) || $reference === 'NULL') {\n            $stackItem['onlyIfNot'] = $onlyIfNot;\n        }\n\n        return $stackItem;\n    }\n\n    /**\n     * Pop the last entry from the stack.\n     *\n     * @return null|array<mixed>\n     */\n    public function pop(): ?array\n    {\n        if ($this->count > 0) {\n            return $this->stack[--$this->count];\n        }\n\n        return null;\n    }\n\n    /**\n     * Return an entry from the stack without removing it.\n     *\n     * @return null|array<mixed>\n     */\n    public function last(int $n = 1): ?array\n    {\n        if ($this->count - $n < 0) {\n            return null;\n        }\n\n        return $this->stack[$this->count - $n];\n    }\n\n    /**\n     * Clear the stack.\n     */\n    public function clear(): void\n    {\n        $this->stack = [];\n        $this->count = 0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/Web/Service.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Calculation\\Web;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Service\n{\n    /**\n     * WEBSERVICE.\n     *\n     * Returns data from a web service on the Internet or Intranet.\n     *\n     * Excel Function:\n     *        Webservice(url)\n     *\n     * @return string the output resulting from a call to the webservice\n     */\n    public static function webService(mixed $url, ?Cell $cell = null): ?string\n    {\n        if (is_array($url)) {\n            $url = Functions::flattenSingleValue($url);\n        }\n        $url = trim(StringHelper::convertToString($url, false));\n        if (mb_strlen($url) > 2048) {\n            return ExcelError::VALUE(); // Invalid URL length\n        }\n        $parsed = parse_url($url);\n        $scheme = $parsed['scheme'] ?? '';\n        if ($scheme !== 'http' && $scheme !== 'https') {\n            return ExcelError::VALUE(); // Invalid protocol\n        }\n        $domainWhiteList = $cell?->getWorksheet()->getParent()?->getDomainWhiteList() ?? [];\n        $host = $parsed['host'] ?? '';\n        if (!in_array($host, $domainWhiteList, true)) {\n            return ($cell === null) ? null : Functions::NOT_YET_IMPLEMENTED; // will be converted to oldCalculatedValue or null\n        }\n\n        // Get results from the webservice\n        $ctxArray = [\n            'http' => [\n                'user_agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',\n            ],\n        ];\n        if ($scheme === 'https') {\n            $ctxArray['ssl'] = ['crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT];\n        }\n        $ctx = stream_context_create($ctxArray);\n        $output = @file_get_contents($url, false, $ctx);\n        if ($output === false || mb_strlen($output) > 32767) {\n            return ExcelError::VALUE(); // Output not a string or too long\n        }\n\n        return $output;\n    }\n\n    /**\n     * URLENCODE.\n     *\n     * Returns data from a web service on the Internet or Intranet.\n     *\n     * Excel Function:\n     *        urlEncode(text)\n     *\n     * @return string the url encoded output\n     */\n    public static function urlEncode(mixed $text): string\n    {\n        if (!is_string($text)) {\n            return ExcelError::VALUE();\n        }\n\n        return str_replace('+', '%20', urlencode($text));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/bg/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## български (Bulgarian)\n##\n############################################################\n\nArgumentSeparator = ;\n##\n##  (For future use)\n##\ncurrencySymbol = лв\n\n##\n## Error Codes\n##\nNULL = #ПРАЗНО!\nDIV0 = #ДЕЛ/0!\nVALUE = #СТОЙНОСТ!\nREF = #РЕФ!\nNAME = #ИМЕ?\nNUM = #ЧИСЛО!\nNA = #Н/Д\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/bg/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## български (Bulgarian)\n##\n############################################################\n\n\n##\n## Функции Куб (Cube Functions)\n##\nCUBEKPIMEMBER = КУБЭЛЕМЕНТКИП\nCUBEMEMBER = КУБЭЛЕМЕНТ\nCUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА\nCUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ\nCUBESET = КУБМНОЖ\nCUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ\nCUBEVALUE = КУБЗНАЧЕНИЕ\n\n##\n## Функции для работы с базами данных (Database Functions)\n##\nDAVERAGE = ДСРЗНАЧ\nDCOUNT = БСЧЁТ\nDCOUNTA = БСЧЁТА\nDGET = БИЗВЛЕЧЬ\nDMAX = ДМАКС\nDMIN = ДМИН\nDPRODUCT = БДПРОИЗВЕД\nDSTDEV = ДСТАНДОТКЛ\nDSTDEVP = ДСТАНДОТКЛП\nDSUM = БДСУММ\nDVAR = БДДИСП\nDVARP = БДДИСПП\n\n##\n## Функции даты и времени (Date & Time Functions)\n##\nDATE = ДАТА\nDATEVALUE = ДАТАЗНАЧ\nDAY = ДЕНЬ\nDAYS360 = ДНЕЙ360\nEDATE = ДАТАМЕС\nEOMONTH = КОНМЕСЯЦА\nHOUR = ЧАС\nMINUTE = МИНУТЫ\nMONTH = МЕСЯЦ\nNETWORKDAYS = ЧИСТРАБДНИ\nNOW = ТДАТА\nSECOND = СЕКУНДЫ\nTIME = ВРЕМЯ\nTIMEVALUE = ВРЕМЗНАЧ\nTODAY = СЕГОДНЯ\nWEEKDAY = ДЕНЬНЕД\nWEEKNUM = НОМНЕДЕЛИ\nWORKDAY = РАБДЕНЬ\nYEAR = ГОД\nYEARFRAC = ДОЛЯГОДА\n\n##\n## Инженерные функции (Engineering Functions)\n##\nBESSELI = БЕССЕЛЬ.I\nBESSELJ = БЕССЕЛЬ.J\nBESSELK = БЕССЕЛЬ.K\nBESSELY = БЕССЕЛЬ.Y\nBIN2DEC = ДВ.В.ДЕС\nBIN2HEX = ДВ.В.ШЕСТН\nBIN2OCT = ДВ.В.ВОСЬМ\nCOMPLEX = КОМПЛЕКСН\nCONVERT = ПРЕОБР\nDEC2BIN = ДЕС.В.ДВ\nDEC2HEX = ДЕС.В.ШЕСТН\nDEC2OCT = ДЕС.В.ВОСЬМ\nDELTA = ДЕЛЬТА\nERF = ФОШ\nERFC = ДФОШ\nGESTEP = ПОРОГ\nHEX2BIN = ШЕСТН.В.ДВ\nHEX2DEC = ШЕСТН.В.ДЕС\nHEX2OCT = ШЕСТН.В.ВОСЬМ\nIMABS = МНИМ.ABS\nIMAGINARY = МНИМ.ЧАСТЬ\nIMARGUMENT = МНИМ.АРГУМЕНТ\nIMCONJUGATE = МНИМ.СОПРЯЖ\nIMCOS = МНИМ.COS\nIMDIV = МНИМ.ДЕЛ\nIMEXP = МНИМ.EXP\nIMLN = МНИМ.LN\nIMLOG10 = МНИМ.LOG10\nIMLOG2 = МНИМ.LOG2\nIMPOWER = МНИМ.СТЕПЕНЬ\nIMPRODUCT = МНИМ.ПРОИЗВЕД\nIMREAL = МНИМ.ВЕЩ\nIMSIN = МНИМ.SIN\nIMSQRT = МНИМ.КОРЕНЬ\nIMSUB = МНИМ.РАЗН\nIMSUM = МНИМ.СУММ\nOCT2BIN = ВОСЬМ.В.ДВ\nOCT2DEC = ВОСЬМ.В.ДЕС\nOCT2HEX = ВОСЬМ.В.ШЕСТН\n\n##\n## Финансовые функции (Financial Functions)\n##\nACCRINT = НАКОПДОХОД\nACCRINTM = НАКОПДОХОДПОГАШ\nAMORDEGRC = АМОРУМ\nAMORLINC = АМОРУВ\nCOUPDAYBS = ДНЕЙКУПОНДО\nCOUPDAYS = ДНЕЙКУПОН\nCOUPDAYSNC = ДНЕЙКУПОНПОСЛЕ\nCOUPNCD = ДАТАКУПОНПОСЛЕ\nCOUPNUM = ЧИСЛКУПОН\nCOUPPCD = ДАТАКУПОНДО\nCUMIPMT = ОБЩПЛАТ\nCUMPRINC = ОБЩДОХОД\nDB = ФУО\nDDB = ДДОБ\nDISC = СКИДКА\nDOLLARDE = РУБЛЬ.ДЕС\nDOLLARFR = РУБЛЬ.ДРОБЬ\nDURATION = ДЛИТ\nEFFECT = ЭФФЕКТ\nFV = БС\nFVSCHEDULE = БЗРАСПИС\nINTRATE = ИНОРМА\nIPMT = ПРПЛТ\nIRR = ВСД\nISPMT = ПРОЦПЛАТ\nMDURATION = МДЛИТ\nMIRR = МВСД\nNOMINAL = НОМИНАЛ\nNPER = КПЕР\nNPV = ЧПС\nODDFPRICE = ЦЕНАПЕРВНЕРЕГ\nODDFYIELD = ДОХОДПЕРВНЕРЕГ\nODDLPRICE = ЦЕНАПОСЛНЕРЕГ\nODDLYIELD = ДОХОДПОСЛНЕРЕГ\nPMT = ПЛТ\nPPMT = ОСПЛТ\nPRICE = ЦЕНА\nPRICEDISC = ЦЕНАСКИДКА\nPRICEMAT = ЦЕНАПОГАШ\nPV = ПС\nRATE = СТАВКА\nRECEIVED = ПОЛУЧЕНО\nSLN = АПЛ\nSYD = АСЧ\nTBILLEQ = РАВНОКЧЕК\nTBILLPRICE = ЦЕНАКЧЕК\nTBILLYIELD = ДОХОДКЧЕК\nVDB = ПУО\nXIRR = ЧИСТВНДОХ\nXNPV = ЧИСТНЗ\nYIELD = ДОХОД\nYIELDDISC = ДОХОДСКИДКА\nYIELDMAT = ДОХОДПОГАШ\n\n##\n## Информационные функции (Information Functions)\n##\nCELL = ЯЧЕЙКА\nERROR.TYPE = ТИП.ОШИБКИ\nINFO = ИНФОРМ\nISBLANK = ЕПУСТО\nISERR = ЕОШ\nISERROR = ЕОШИБКА\nISEVEN = ЕЧЁТН\nISLOGICAL = ЕЛОГИЧ\nISNA = ЕНД\nISNONTEXT = ЕНЕТЕКСТ\nISNUMBER = ЕЧИСЛО\nISODD = ЕНЕЧЁТ\nISREF = ЕССЫЛКА\nISTEXT = ЕТЕКСТ\nN = Ч\nNA = НД\nTYPE = ТИП\n\n##\n## Логические функции (Logical Functions)\n##\nAND = И\nFALSE = ЛОЖЬ\nIF = ЕСЛИ\nIFERROR = ЕСЛИОШИБКА\nNOT = НЕ\nOR = ИЛИ\nTRUE = ИСТИНА\n\n##\n## Функции ссылки и поиска (Lookup & Reference Functions)\n##\nADDRESS = АДРЕС\nAREAS = ОБЛАСТИ\nCHOOSE = ВЫБОР\nCOLUMN = СТОЛБЕЦ\nCOLUMNS = ЧИСЛСТОЛБ\nGETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ\nHLOOKUP = ГПР\nHYPERLINK = ГИПЕРССЫЛКА\nINDEX = ИНДЕКС\nINDIRECT = ДВССЫЛ\nLOOKUP = ПРОСМОТР\nMATCH = ПОИСКПОЗ\nOFFSET = СМЕЩ\nROW = СТРОКА\nROWS = ЧСТРОК\nRTD = ДРВ\nTRANSPOSE = ТРАНСП\nVLOOKUP = ВПР\n\n##\n## Математические и тригонометрические функции (Math & Trig Functions)\n##\nABS = ABS\nACOS = ACOS\nACOSH = ACOSH\nASIN = ASIN\nASINH = ASINH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nCOMBIN = ЧИСЛКОМБ\nCOS = COS\nCOSH = COSH\nDEGREES = ГРАДУСЫ\nEVEN = ЧЁТН\nEXP = EXP\nFACT = ФАКТР\nFACTDOUBLE = ДВФАКТР\nGCD = НОД\nINT = ЦЕЛОЕ\nLCM = НОК\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = МОПРЕД\nMINVERSE = МОБР\nMMULT = МУМНОЖ\nMOD = ОСТАТ\nMROUND = ОКРУГЛТ\nMULTINOMIAL = МУЛЬТИНОМ\nODD = НЕЧЁТ\nPI = ПИ\nPOWER = СТЕПЕНЬ\nPRODUCT = ПРОИЗВЕД\nQUOTIENT = ЧАСТНОЕ\nRADIANS = РАДИАНЫ\nRAND = СЛЧИС\nRANDBETWEEN = СЛУЧМЕЖДУ\nROMAN = РИМСКОЕ\nROUND = ОКРУГЛ\nROUNDDOWN = ОКРУГЛВНИЗ\nROUNDUP = ОКРУГЛВВЕРХ\nSERIESSUM = РЯД.СУММ\nSIGN = ЗНАК\nSIN = SIN\nSINH = SINH\nSQRT = КОРЕНЬ\nSQRTPI = КОРЕНЬПИ\nSUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ\nSUM = СУММ\nSUMIF = СУММЕСЛИ\nSUMIFS = СУММЕСЛИМН\nSUMPRODUCT = СУММПРОИЗВ\nSUMSQ = СУММКВ\nSUMX2MY2 = СУММРАЗНКВ\nSUMX2PY2 = СУММСУММКВ\nSUMXMY2 = СУММКВРАЗН\nTAN = TAN\nTANH = TANH\nTRUNC = ОТБР\n\n##\n## Статистические функции (Statistical Functions)\n##\nAVEDEV = СРОТКЛ\nAVERAGE = СРЗНАЧ\nAVERAGEA = СРЗНАЧА\nAVERAGEIF = СРЗНАЧЕСЛИ\nAVERAGEIFS = СРЗНАЧЕСЛИМН\nCORREL = КОРРЕЛ\nCOUNT = СЧЁТ\nCOUNTA = СЧЁТЗ\nCOUNTBLANK = СЧИТАТЬПУСТОТЫ\nCOUNTIF = СЧЁТЕСЛИ\nCOUNTIFS = СЧЁТЕСЛИМН\nDEVSQ = КВАДРОТКЛ\nFISHER = ФИШЕР\nFISHERINV = ФИШЕРОБР\nFREQUENCY = ЧАСТОТА\nGAMMALN = ГАММАНЛОГ\nGEOMEAN = СРГЕОМ\nGROWTH = РОСТ\nHARMEAN = СРГАРМ\nINTERCEPT = ОТРЕЗОК\nKURT = ЭКСЦЕСС\nLARGE = НАИБОЛЬШИЙ\nLINEST = ЛИНЕЙН\nLOGEST = ЛГРФПРИБЛ\nMAX = МАКС\nMAXA = МАКСА\nMEDIAN = МЕДИАНА\nMIN = МИН\nMINA = МИНА\nPEARSON = ПИРСОН\nPERMUT = ПЕРЕСТ\nPROB = ВЕРОЯТНОСТЬ\nRSQ = КВПИРСОН\nSKEW = СКОС\nSLOPE = НАКЛОН\nSMALL = НАИМЕНЬШИЙ\nSTANDARDIZE = НОРМАЛИЗАЦИЯ\nSTDEVA = СТАНДОТКЛОНА\nSTDEVPA = СТАНДОТКЛОНПА\nSTEYX = СТОШYX\nTREND = ТЕНДЕНЦИЯ\nTRIMMEAN = УРЕЗСРЕДНЕЕ\nVARA = ДИСПА\nVARPA = ДИСПРА\n\n##\n## Текстовые функции (Text Functions)\n##\nASC = ASC\nBAHTTEXT = БАТТЕКСТ\nCHAR = СИМВОЛ\nCLEAN = ПЕЧСИМВ\nCODE = КОДСИМВ\nDOLLAR = РУБЛЬ\nEXACT = СОВПАД\nFIND = НАЙТИ\nFINDB = НАЙТИБ\nFIXED = ФИКСИРОВАННЫЙ\nLEFT = ЛЕВСИМВ\nLEFTB = ЛЕВБ\nLEN = ДЛСТР\nLENB = ДЛИНБ\nLOWER = СТРОЧН\nMID = ПСТР\nMIDB = ПСТРБ\nPHONETIC = PHONETIC\nPROPER = ПРОПНАЧ\nREPLACE = ЗАМЕНИТЬ\nREPLACEB = ЗАМЕНИТЬБ\nREPT = ПОВТОР\nRIGHT = ПРАВСИМВ\nRIGHTB = ПРАВБ\nSEARCH = ПОИСК\nSEARCHB = ПОИСКБ\nSUBSTITUTE = ПОДСТАВИТЬ\nT = Т\nTEXT = ТЕКСТ\nTRIM = СЖПРОБЕЛЫ\nUPPER = ПРОПИСН\nVALUE = ЗНАЧЕН\n\n##\n##  (Web Functions)\n##\n\n##\n##  (Compatibility Functions)\n##\nBETADIST = БЕТАРАСП\nBETAINV = БЕТАОБР\nBINOMDIST = БИНОМРАСП\nCEILING = ОКРВВЕРХ\nCHIDIST = ХИ2РАСП\nCHIINV = ХИ2ОБР\nCHITEST = ХИ2ТЕСТ\nCONCATENATE = СЦЕПИТЬ\nCONFIDENCE = ДОВЕРИТ\nCOVAR = КОВАР\nCRITBINOM = КРИТБИНОМ\nEXPONDIST = ЭКСПРАСП\nFDIST = FРАСП\nFINV = FРАСПОБР\nFLOOR = ОКРВНИЗ\nFORECAST = ПРЕДСКАЗ\nFTEST = ФТЕСТ\nGAMMADIST = ГАММАРАСП\nGAMMAINV = ГАММАОБР\nHYPGEOMDIST = ГИПЕРГЕОМЕТ\nLOGINV = ЛОГНОРМОБР\nLOGNORMDIST = ЛОГНОРМРАСП\nMODE = МОДА\nNEGBINOMDIST = ОТРБИНОМРАСП\nNORMDIST = НОРМРАСП\nNORMINV = НОРМОБР\nNORMSDIST = НОРМСТРАСП\nNORMSINV = НОРМСТОБР\nPERCENTILE = ПЕРСЕНТИЛЬ\nPERCENTRANK = ПРОЦЕНТРАНГ\nPOISSON = ПУАССОН\nQUARTILE = КВАРТИЛЬ\nRANK = РАНГ\nSTDEV = СТАНДОТКЛОН\nSTDEVP = СТАНДОТКЛОНП\nTDIST = СТЬЮДРАСП\nTINV = СТЬЮДРАСПОБР\nTTEST = ТТЕСТ\nVAR = ДИСП\nVARP = ДИСПР\nWEIBULL = ВЕЙБУЛЛ\nZTEST = ZТЕСТ\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/cs/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Ceština (Czech)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL\nDIV0 = #DĚLENÍ_NULOU!\nVALUE = #HODNOTA!\nREF = #ODKAZ!\nNAME = #NÁZEV?\nNUM = #ČÍSLO!\nNA = #NENÍ_K_DISPOZICI\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/cs/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Ceština (Czech)\n##\n############################################################\n\n\n##\n## Funkce pro práci s datovými krychlemi (Cube Functions)\n##\nCUBEKPIMEMBER = CUBEKPIMEMBER\nCUBEMEMBER = CUBEMEMBER\nCUBEMEMBERPROPERTY = CUBEMEMBERPROPERTY\nCUBERANKEDMEMBER = CUBERANKEDMEMBER\nCUBESET = CUBESET\nCUBESETCOUNT = CUBESETCOUNT\nCUBEVALUE = CUBEVALUE\n\n##\n## Funkce databáze (Database Functions)\n##\nDAVERAGE = DPRŮMĚR\nDCOUNT = DPOČET\nDCOUNTA = DPOČET2\nDGET = DZÍSKAT\nDMAX = DMAX\nDMIN = DMIN\nDPRODUCT = DSOUČIN\nDSTDEV = DSMODCH.VÝBĚR\nDSTDEVP = DSMODCH\nDSUM = DSUMA\nDVAR = DVAR.VÝBĚR\nDVARP = DVAR\n\n##\n## Funkce data a času (Date & Time Functions)\n##\nDATE = DATUM\nDATEVALUE = DATUMHODN\nDAY = DEN\nDAYS = DAYS\nDAYS360 = ROK360\nEDATE = EDATE\nEOMONTH = EOMONTH\nHOUR = HODINA\nISOWEEKNUM = ISOWEEKNUM\nMINUTE = MINUTA\nMONTH = MĚSÍC\nNETWORKDAYS = NETWORKDAYS\nNETWORKDAYS.INTL = NETWORKDAYS.INTL\nNOW = NYNÍ\nSECOND = SEKUNDA\nTIME = ČAS\nTIMEVALUE = ČASHODN\nTODAY = DNES\nWEEKDAY = DENTÝDNE\nWEEKNUM = WEEKNUM\nWORKDAY = WORKDAY\nWORKDAY.INTL = WORKDAY.INTL\nYEAR = ROK\nYEARFRAC = YEARFRAC\n\n##\n## Inženýrské funkce (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BIN2DEC\nBIN2HEX = BIN2HEX\nBIN2OCT = BIN2OCT\nBITAND = BITAND\nBITLSHIFT = BITLSHIFT\nBITOR = BITOR\nBITRSHIFT = BITRSHIFT\nBITXOR = BITXOR\nCOMPLEX = COMPLEX\nCONVERT = CONVERT\nDEC2BIN = DEC2BIN\nDEC2HEX = DEC2HEX\nDEC2OCT = DEC2OCT\nDELTA = DELTA\nERF = ERF\nERF.PRECISE = ERF.PRECISE\nERFC = ERFC\nERFC.PRECISE = ERFC.PRECISE\nGESTEP = GESTEP\nHEX2BIN = HEX2BIN\nHEX2DEC = HEX2DEC\nHEX2OCT = HEX2OCT\nIMABS = IMABS\nIMAGINARY = IMAGINARY\nIMARGUMENT = IMARGUMENT\nIMCONJUGATE = IMCONJUGATE\nIMCOS = IMCOS\nIMCOSH = IMCOSH\nIMCOT = IMCOT\nIMCSC = IMCSC\nIMCSCH = IMCSCH\nIMDIV = IMDIV\nIMEXP = IMEXP\nIMLN = IMLN\nIMLOG10 = IMLOG10\nIMLOG2 = IMLOG2\nIMPOWER = IMPOWER\nIMPRODUCT = IMPRODUCT\nIMREAL = IMREAL\nIMSEC = IMSEC\nIMSECH = IMSECH\nIMSIN = IMSIN\nIMSINH = IMSINH\nIMSQRT = IMSQRT\nIMSUB = IMSUB\nIMSUM = IMSUM\nIMTAN = IMTAN\nOCT2BIN = OCT2BIN\nOCT2DEC = OCT2DEC\nOCT2HEX = OCT2HEX\n\n##\n## Finanční funkce (Financial Functions)\n##\nACCRINT = ACCRINT\nACCRINTM = ACCRINTM\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = COUPDAYBS\nCOUPDAYS = COUPDAYS\nCOUPDAYSNC = COUPDAYSNC\nCOUPNCD = COUPNCD\nCOUPNUM = COUPNUM\nCOUPPCD = COUPPCD\nCUMIPMT = CUMIPMT\nCUMPRINC = CUMPRINC\nDB = ODPIS.ZRYCH\nDDB = ODPIS.ZRYCH2\nDISC = DISC\nDOLLARDE = DOLLARDE\nDOLLARFR = DOLLARFR\nDURATION = DURATION\nEFFECT = EFFECT\nFV = BUDHODNOTA\nFVSCHEDULE = FVSCHEDULE\nINTRATE = INTRATE\nIPMT = PLATBA.ÚROK\nIRR = MÍRA.VÝNOSNOSTI\nISPMT = ISPMT\nMDURATION = MDURATION\nMIRR = MOD.MÍRA.VÝNOSNOSTI\nNOMINAL = NOMINAL\nNPER = POČET.OBDOBÍ\nNPV = ČISTÁ.SOUČHODNOTA\nODDFPRICE = ODDFPRICE\nODDFYIELD = ODDFYIELD\nODDLPRICE = ODDLPRICE\nODDLYIELD = ODDLYIELD\nPDURATION = PDURATION\nPMT = PLATBA\nPPMT = PLATBA.ZÁKLAD\nPRICE = PRICE\nPRICEDISC = PRICEDISC\nPRICEMAT = PRICEMAT\nPV = SOUČHODNOTA\nRATE = ÚROKOVÁ.MÍRA\nRECEIVED = RECEIVED\nRRI = RRI\nSLN = ODPIS.LIN\nSYD = ODPIS.NELIN\nTBILLEQ = TBILLEQ\nTBILLPRICE = TBILLPRICE\nTBILLYIELD = TBILLYIELD\nVDB = ODPIS.ZA.INT\nXIRR = XIRR\nXNPV = XNPV\nYIELD = YIELD\nYIELDDISC = YIELDDISC\nYIELDMAT = YIELDMAT\n\n##\n## Informační funkce (Information Functions)\n##\nCELL = POLÍČKO\nERROR.TYPE = CHYBA.TYP\nINFO = O.PROSTŘEDÍ\nISBLANK = JE.PRÁZDNÉ\nISERR = JE.CHYBA\nISERROR = JE.CHYBHODN\nISEVEN = ISEVEN\nISFORMULA = ISFORMULA\nISLOGICAL = JE.LOGHODN\nISNA = JE.NEDEF\nISNONTEXT = JE.NETEXT\nISNUMBER = JE.ČISLO\nISODD = ISODD\nISREF = JE.ODKAZ\nISTEXT = JE.TEXT\nN = N\nNA = NEDEF\nSHEET = SHEET\nSHEETS = SHEETS\nTYPE = TYP\n\n##\n## Logické funkce (Logical Functions)\n##\nAND = A\nFALSE = NEPRAVDA\nIF = KDYŽ\nIFERROR = IFERROR\nIFNA = IFNA\nIFS = IFS\nNOT = NE\nOR = NEBO\nSWITCH = SWITCH\nTRUE = PRAVDA\nXOR = XOR\n\n##\n## Vyhledávací funkce a funkce pro odkazy (Lookup & Reference Functions)\n##\nADDRESS = ODKAZ\nAREAS = POČET.BLOKŮ\nCHOOSE = ZVOLIT\nCOLUMN = SLOUPEC\nCOLUMNS = SLOUPCE\nFORMULATEXT = FORMULATEXT\nGETPIVOTDATA = ZÍSKATKONTDATA\nHLOOKUP = VVYHLEDAT\nHYPERLINK = HYPERTEXTOVÝ.ODKAZ\nINDEX = INDEX\nINDIRECT = NEPŘÍMÝ.ODKAZ\nLOOKUP = VYHLEDAT\nMATCH = POZVYHLEDAT\nOFFSET = POSUN\nROW = ŘÁDEK\nROWS = ŘÁDKY\nRTD = RTD\nTRANSPOSE = TRANSPOZICE\nVLOOKUP = SVYHLEDAT\n\n##\n## Matematické a trigonometrické funkce (Math & Trig Functions)\n##\nABS = ABS\nACOS = ARCCOS\nACOSH = ARCCOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = AGGREGATE\nARABIC = ARABIC\nASIN = ARCSIN\nASINH = ARCSINH\nATAN = ARCTG\nATAN2 = ARCTG2\nATANH = ARCTGH\nBASE = BASE\nCEILING.MATH = CEILING.MATH\nCOMBIN = KOMBINACE\nCOMBINA = COMBINA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = DECIMAL\nDEGREES = DEGREES\nEVEN = ZAOKROUHLIT.NA.SUDÉ\nEXP = EXP\nFACT = FAKTORIÁL\nFACTDOUBLE = FACTDOUBLE\nFLOOR.MATH = FLOOR.MATH\nGCD = GCD\nINT = CELÁ.ČÁST\nLCM = LCM\nLN = LN\nLOG = LOGZ\nLOG10 = LOG\nMDETERM = DETERMINANT\nMINVERSE = INVERZE\nMMULT = SOUČIN.MATIC\nMOD = MOD\nMROUND = MROUND\nMULTINOMIAL = MULTINOMIAL\nMUNIT = MUNIT\nODD = ZAOKROUHLIT.NA.LICHÉ\nPI = PI\nPOWER = POWER\nPRODUCT = SOUČIN\nQUOTIENT = QUOTIENT\nRADIANS = RADIANS\nRAND = NÁHČÍSLO\nRANDBETWEEN = RANDBETWEEN\nROMAN = ROMAN\nROUND = ZAOKROUHLIT\nROUNDDOWN = ROUNDDOWN\nROUNDUP = ROUNDUP\nSEC = SEC\nSECH = SECH\nSERIESSUM = SERIESSUM\nSIGN = SIGN\nSIN = SIN\nSINH = SINH\nSQRT = ODMOCNINA\nSQRTPI = SQRTPI\nSUBTOTAL = SUBTOTAL\nSUM = SUMA\nSUMIF = SUMIF\nSUMIFS = SUMIFS\nSUMPRODUCT = SOUČIN.SKALÁRNÍ\nSUMSQ = SUMA.ČTVERCŮ\nSUMX2MY2 = SUMX2MY2\nSUMX2PY2 = SUMX2PY2\nSUMXMY2 = SUMXMY2\nTAN = TG\nTANH = TGH\nTRUNC = USEKNOUT\n\n##\n## Statistické funkce (Statistical Functions)\n##\nAVEDEV = PRŮMODCHYLKA\nAVERAGE = PRŮMĚR\nAVERAGEA = AVERAGEA\nAVERAGEIF = AVERAGEIF\nAVERAGEIFS = AVERAGEIFS\nBETA.DIST = BETA.DIST\nBETA.INV = BETA.INV\nBINOM.DIST = BINOM.DIST\nBINOM.DIST.RANGE = BINOM.DIST.RANGE\nBINOM.INV = BINOM.INV\nCHISQ.DIST = CHISQ.DIST\nCHISQ.DIST.RT = CHISQ.DIST.RT\nCHISQ.INV = CHISQ.INV\nCHISQ.INV.RT = CHISQ.INV.RT\nCHISQ.TEST = CHISQ.TEST\nCONFIDENCE.NORM = CONFIDENCE.NORM\nCONFIDENCE.T = CONFIDENCE.T\nCORREL = CORREL\nCOUNT = POČET\nCOUNTA = POČET2\nCOUNTBLANK = COUNTBLANK\nCOUNTIF = COUNTIF\nCOUNTIFS = COUNTIFS\nCOVARIANCE.P = COVARIANCE.P\nCOVARIANCE.S = COVARIANCE.S\nDEVSQ = DEVSQ\nEXPON.DIST = EXPON.DIST\nF.DIST = F.DIST\nF.DIST.RT = F.DIST.RT\nF.INV = F.INV\nF.INV.RT = F.INV.RT\nF.TEST = F.TEST\nFISHER = FISHER\nFISHERINV = FISHERINV\nFORECAST.ETS = FORECAST.ETS\nFORECAST.ETS.CONFINT = FORECAST.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = FORECAST.ETS.SEASONALITY\nFORECAST.ETS.STAT = FORECAST.ETS.STAT\nFORECAST.LINEAR = FORECAST.LINEAR\nFREQUENCY = ČETNOSTI\nGAMMA = GAMMA\nGAMMA.DIST = GAMMA.DIST\nGAMMA.INV = GAMMA.INV\nGAMMALN = GAMMALN\nGAMMALN.PRECISE = GAMMALN.PRECISE\nGAUSS = GAUSS\nGEOMEAN = GEOMEAN\nGROWTH = LOGLINTREND\nHARMEAN = HARMEAN\nHYPGEOM.DIST = HYPGEOM.DIST\nINTERCEPT = INTERCEPT\nKURT = KURT\nLARGE = LARGE\nLINEST = LINREGRESE\nLOGEST = LOGLINREGRESE\nLOGNORM.DIST = LOGNORM.DIST\nLOGNORM.INV = LOGNORM.INV\nMAX = MAX\nMAXA = MAXA\nMAXIFS = MAXIFS\nMEDIAN = MEDIAN\nMIN = MIN\nMINA = MINA\nMINIFS = MINIFS\nMODE.MULT = MODE.MULT\nMODE.SNGL = MODE.SNGL\nNEGBINOM.DIST = NEGBINOM.DIST\nNORM.DIST = NORM.DIST\nNORM.INV = NORM.INV\nNORM.S.DIST = NORM.S.DIST\nNORM.S.INV = NORM.S.INV\nPEARSON = PEARSON\nPERCENTILE.EXC = PERCENTIL.EXC\nPERCENTILE.INC = PERCENTIL.INC\nPERCENTRANK.EXC = PERCENTRANK.EXC\nPERCENTRANK.INC = PERCENTRANK.INC\nPERMUT = PERMUTACE\nPERMUTATIONA = PERMUTATIONA\nPHI = PHI\nPOISSON.DIST = POISSON.DIST\nPROB = PROB\nQUARTILE.EXC = QUARTIL.EXC\nQUARTILE.INC = QUARTIL.INC\nRANK.AVG = RANK.AVG\nRANK.EQ = RANK.EQ\nRSQ = RKQ\nSKEW = SKEW\nSKEW.P = SKEW.P\nSLOPE = SLOPE\nSMALL = SMALL\nSTANDARDIZE = STANDARDIZE\nSTDEV.P = SMODCH.P\nSTDEV.S = SMODCH.VÝBĚR.S\nSTDEVA = STDEVA\nSTDEVPA = STDEVPA\nSTEYX = STEYX\nT.DIST = T.DIST\nT.DIST.2T = T.DIST.2T\nT.DIST.RT = T.DIST.RT\nT.INV = T.INV\nT.INV.2T = T.INV.2T\nT.TEST = T.TEST\nTREND = LINTREND\nTRIMMEAN = TRIMMEAN\nVAR.P = VAR.P\nVAR.S = VAR.S\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = WEIBULL.DIST\nZ.TEST = Z.TEST\n\n##\n## Textové funkce (Text Functions)\n##\nBAHTTEXT = BAHTTEXT\nCHAR = ZNAK\nCLEAN = VYČISTIT\nCODE = KÓD\nCONCAT = CONCAT\nDOLLAR = KČ\nEXACT = STEJNÉ\nFIND = NAJÍT\nFIXED = ZAOKROUHLIT.NA.TEXT\nLEFT = ZLEVA\nLEN = DÉLKA\nLOWER = MALÁ\nMID = ČÁST\nNUMBERVALUE = NUMBERVALUE\nPHONETIC = ZVUKOVÉ\nPROPER = VELKÁ2\nREPLACE = NAHRADIT\nREPT = OPAKOVAT\nRIGHT = ZPRAVA\nSEARCH = HLEDAT\nSUBSTITUTE = DOSADIT\nT = T\nTEXT = HODNOTA.NA.TEXT\nTEXTJOIN = TEXTJOIN\nTRIM = PROČISTIT\nUNICHAR = UNICHAR\nUNICODE = UNICODE\nUPPER = VELKÁ\nVALUE = HODNOTA\n\n##\n## Webové funkce (Web Functions)\n##\nENCODEURL = ENCODEURL\nFILTERXML = FILTERXML\nWEBSERVICE = WEBSERVICE\n\n##\n## Funkce pro kompatibilitu (Compatibility Functions)\n##\nBETADIST = BETADIST\nBETAINV = BETAINV\nBINOMDIST = BINOMDIST\nCEILING = ZAOKR.NAHORU\nCHIDIST = CHIDIST\nCHIINV = CHIINV\nCHITEST = CHITEST\nCONCATENATE = CONCATENATE\nCONFIDENCE = CONFIDENCE\nCOVAR = COVAR\nCRITBINOM = CRITBINOM\nEXPONDIST = EXPONDIST\nFDIST = FDIST\nFINV = FINV\nFLOOR = ZAOKR.DOLŮ\nFORECAST = FORECAST\nFTEST = FTEST\nGAMMADIST = GAMMADIST\nGAMMAINV = GAMMAINV\nHYPGEOMDIST = HYPGEOMDIST\nLOGINV = LOGINV\nLOGNORMDIST = LOGNORMDIST\nMODE = MODE\nNEGBINOMDIST = NEGBINOMDIST\nNORMDIST = NORMDIST\nNORMINV = NORMINV\nNORMSDIST = NORMSDIST\nNORMSINV = NORMSINV\nPERCENTILE = PERCENTIL\nPERCENTRANK = PERCENTRANK\nPOISSON = POISSON\nQUARTILE = QUARTIL\nRANK = RANK\nSTDEV = SMODCH.VÝBĚR\nSTDEVP = SMODCH\nTDIST = TDIST\nTINV = TINV\nTTEST = TTEST\nVAR = VAR.VÝBĚR\nVARP = VAR\nWEIBULL = WEIBULL\nZTEST = ZTEST\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/da/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Dansk (Danish)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #NUL!\nDIV0\nVALUE = #VÆRDI!\nREF = #REFERENCE!\nNAME = #NAVN?\nNUM\nNA = #I/T\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/da/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Dansk (Danish)\n##\n############################################################\n\n\n##\n## Kubefunktioner (Cube Functions)\n##\nCUBEKPIMEMBER = KUBE.KPI.MEDLEM\nCUBEMEMBER = KUBEMEDLEM\nCUBEMEMBERPROPERTY = KUBEMEDLEM.EGENSKAB\nCUBERANKEDMEMBER = KUBERANGERET.MEDLEM\nCUBESET = KUBESÆT\nCUBESETCOUNT = KUBESÆT.ANTAL\nCUBEVALUE = KUBEVÆRDI\n\n##\n## Databasefunktioner (Database Functions)\n##\nDAVERAGE = DMIDDEL\nDCOUNT = DTÆL\nDCOUNTA = DTÆLV\nDGET = DHENT\nDMAX = DMAKS\nDMIN = DMIN\nDPRODUCT = DPRODUKT\nDSTDEV = DSTDAFV\nDSTDEVP = DSTDAFVP\nDSUM = DSUM\nDVAR = DVARIANS\nDVARP = DVARIANSP\n\n##\n## Dato- og klokkeslætfunktioner (Date & Time Functions)\n##\nDATE = DATO\nDATEDIF = DATO.FORSKEL\nDATESTRING = DATOSTRENG\nDATEVALUE = DATOVÆRDI\nDAY = DAG\nDAYS = DAGE\nDAYS360 = DAGE360\nEDATE = EDATO\nEOMONTH = SLUT.PÅ.MÅNED\nHOUR = TIME\nISOWEEKNUM = ISOUGE.NR\nMINUTE = MINUT\nMONTH = MÅNED\nNETWORKDAYS = ANTAL.ARBEJDSDAGE\nNETWORKDAYS.INTL = ANTAL.ARBEJDSDAGE.INTL\nNOW = NU\nSECOND = SEKUND\nTHAIDAYOFWEEK = THAILANDSKUGEDAG\nTHAIMONTHOFYEAR = THAILANDSKMÅNED\nTHAIYEAR = THAILANDSKÅR\nTIME = TID\nTIMEVALUE = TIDSVÆRDI\nTODAY = IDAG\nWEEKDAY = UGEDAG\nWEEKNUM = UGE.NR\nWORKDAY = ARBEJDSDAG\nWORKDAY.INTL = ARBEJDSDAG.INTL\nYEAR = ÅR\nYEARFRAC = ÅR.BRØK\n\n##\n## Tekniske funktioner (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BIN.TIL.DEC\nBIN2HEX = BIN.TIL.HEX\nBIN2OCT = BIN.TIL.OKT\nBITAND = BITOG\nBITLSHIFT = BITLSKIFT\nBITOR = BITELLER\nBITRSHIFT = BITRSKIFT\nBITXOR = BITXELLER\nCOMPLEX = KOMPLEKS\nCONVERT = KONVERTER\nDEC2BIN = DEC.TIL.BIN\nDEC2HEX = DEC.TIL.HEX\nDEC2OCT = DEC.TIL.OKT\nDELTA = DELTA\nERF = FEJLFUNK\nERF.PRECISE = ERF.PRECISE\nERFC = FEJLFUNK.KOMP\nERFC.PRECISE = ERFC.PRECISE\nGESTEP = GETRIN\nHEX2BIN = HEX.TIL.BIN\nHEX2DEC = HEX.TIL.DEC\nHEX2OCT = HEX.TIL.OKT\nIMABS = IMAGABS\nIMAGINARY = IMAGINÆR\nIMARGUMENT = IMAGARGUMENT\nIMCONJUGATE = IMAGKONJUGERE\nIMCOS = IMAGCOS\nIMCOSH = IMAGCOSH\nIMCOT = IMAGCOT\nIMCSC = IMAGCSC\nIMCSCH = IMAGCSCH\nIMDIV = IMAGDIV\nIMEXP = IMAGEKSP\nIMLN = IMAGLN\nIMLOG10 = IMAGLOG10\nIMLOG2 = IMAGLOG2\nIMPOWER = IMAGPOTENS\nIMPRODUCT = IMAGPRODUKT\nIMREAL = IMAGREELT\nIMSEC = IMAGSEC\nIMSECH = IMAGSECH\nIMSIN = IMAGSIN\nIMSINH = IMAGSINH\nIMSQRT = IMAGKVROD\nIMSUB = IMAGSUB\nIMSUM = IMAGSUM\nIMTAN = IMAGTAN\nOCT2BIN = OKT.TIL.BIN\nOCT2DEC = OKT.TIL.DEC\nOCT2HEX = OKT.TIL.HEX\n\n##\n## Finansielle funktioner (Financial Functions)\n##\nACCRINT = PÅLØBRENTE\nACCRINTM = PÅLØBRENTE.UDLØB\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = KUPONDAGE.SA\nCOUPDAYS = KUPONDAGE.A\nCOUPDAYSNC = KUPONDAGE.ANK\nCOUPNCD = KUPONDAG.NÆSTE\nCOUPNUM = KUPONBETALINGER\nCOUPPCD = KUPONDAG.FORRIGE\nCUMIPMT = AKKUM.RENTE\nCUMPRINC = AKKUM.HOVEDSTOL\nDB = DB\nDDB = DSA\nDISC = DISKONTO\nDOLLARDE = KR.DECIMAL\nDOLLARFR = KR.BRØK\nDURATION = VARIGHED\nEFFECT = EFFEKTIV.RENTE\nFV = FV\nFVSCHEDULE = FVTABEL\nINTRATE = RENTEFOD\nIPMT = R.YDELSE\nIRR = IA\nISPMT = ISPMT\nMDURATION = MVARIGHED\nMIRR = MIA\nNOMINAL = NOMINEL\nNPER = NPER\nNPV = NUTIDSVÆRDI\nODDFPRICE = ULIGE.KURS.PÅLYDENDE\nODDFYIELD = ULIGE.FØRSTE.AFKAST\nODDLPRICE = ULIGE.SIDSTE.KURS\nODDLYIELD = ULIGE.SIDSTE.AFKAST\nPDURATION = PVARIGHED\nPMT = YDELSE\nPPMT = H.YDELSE\nPRICE = KURS\nPRICEDISC = KURS.DISKONTO\nPRICEMAT = KURS.UDLØB\nPV = NV\nRATE = RENTE\nRECEIVED = MODTAGET.VED.UDLØB\nRRI = RRI\nSLN = LA\nSYD = ÅRSAFSKRIVNING\nTBILLEQ = STATSOBLIGATION\nTBILLPRICE = STATSOBLIGATION.KURS\nTBILLYIELD = STATSOBLIGATION.AFKAST\nVDB = VSA\nXIRR = INTERN.RENTE\nXNPV = NETTO.NUTIDSVÆRDI\nYIELD = AFKAST\nYIELDDISC = AFKAST.DISKONTO\nYIELDMAT = AFKAST.UDLØBSDATO\n\n##\n## Informationsfunktioner (Information Functions)\n##\nCELL = CELLE\nERROR.TYPE = FEJLTYPE\nINFO = INFO\nISBLANK = ER.TOM\nISERR = ER.FJL\nISERROR = ER.FEJL\nISEVEN = ER.LIGE\nISFORMULA = ER.FORMEL\nISLOGICAL = ER.LOGISK\nISNA = ER.IKKE.TILGÆNGELIG\nISNONTEXT = ER.IKKE.TEKST\nISNUMBER = ER.TAL\nISODD = ER.ULIGE\nISREF = ER.REFERENCE\nISTEXT = ER.TEKST\nN = TAL\nNA = IKKE.TILGÆNGELIG\nSHEET = ARK\nSHEETS = ARK.FLERE\nTYPE = VÆRDITYPE\n\n##\n## Logiske funktioner (Logical Functions)\n##\nAND = OG\nFALSE = FALSK\nIF = HVIS\nIFERROR = HVIS.FEJL\nIFNA = HVISIT\nIFS = HVISER\nNOT = IKKE\nOR = ELLER\nSWITCH = SKIFT\nTRUE = SAND\nXOR = XELLER\n\n##\n## Opslags- og referencefunktioner (Lookup & Reference Functions)\n##\nADDRESS = ADRESSE\nAREAS = OMRÅDER\nCHOOSE = VÆLG\nCOLUMN = KOLONNE\nCOLUMNS = KOLONNER\nFORMULATEXT = FORMELTEKST\nGETPIVOTDATA = GETPIVOTDATA\nHLOOKUP = VOPSLAG\nHYPERLINK = HYPERLINK\nINDEX = INDEKS\nINDIRECT = INDIREKTE\nLOOKUP = SLÅ.OP\nMATCH = SAMMENLIGN\nOFFSET = FORSKYDNING\nROW = RÆKKE\nROWS = RÆKKER\nRTD = RTD\nTRANSPOSE = TRANSPONER\nVLOOKUP = LOPSLAG\n*RC = RK\n\n##\n## Matematiske og trigonometriske funktioner (Math & Trig Functions)\n##\nABS = ABS\nACOS = ARCCOS\nACOSH = ARCCOSH\nACOT = ARCCOT\nACOTH = ARCCOTH\nAGGREGATE = SAMLING\nARABIC = ARABISK\nASIN = ARCSIN\nASINH = ARCSINH\nATAN = ARCTAN\nATAN2 = ARCTAN2\nATANH = ARCTANH\nBASE = BASIS\nCEILING.MATH = LOFT.MAT\nCEILING.PRECISE = LOFT.PRECISE\nCOMBIN = KOMBIN\nCOMBINA = KOMBINA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = DECIMAL\nDEGREES = GRADER\nECMA.CEILING = ECMA.LOFT\nEVEN = LIGE\nEXP = EKSP\nFACT = FAKULTET\nFACTDOUBLE = DOBBELT.FAKULTET\nFLOOR.MATH = AFRUND.BUND.MAT\nFLOOR.PRECISE = AFRUND.GULV.PRECISE\nGCD = STØRSTE.FÆLLES.DIVISOR\nINT = HELTAL\nISO.CEILING = ISO.LOFT\nLCM = MINDSTE.FÆLLES.MULTIPLUM\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MDETERM\nMINVERSE = MINVERT\nMMULT = MPRODUKT\nMOD = REST\nMROUND = MAFRUND\nMULTINOMIAL = MULTINOMIAL\nMUNIT = MENHED\nODD = ULIGE\nPI = PI\nPOWER = POTENS\nPRODUCT = PRODUKT\nQUOTIENT = KVOTIENT\nRADIANS = RADIANER\nRAND = SLUMP\nRANDBETWEEN = SLUMPMELLEM\nROMAN = ROMERTAL\nROUND = AFRUND\nROUNDBAHTDOWN = RUNDBAHTNED\nROUNDBAHTUP = RUNDBAHTOP\nROUNDDOWN = RUND.NED\nROUNDUP = RUND.OP\nSEC = SEC\nSECH = SECH\nSERIESSUM = SERIESUM\nSIGN = FORTEGN\nSIN = SIN\nSINH = SINH\nSQRT = KVROD\nSQRTPI = KVRODPI\nSUBTOTAL = SUBTOTAL\nSUM = SUM\nSUMIF = SUM.HVIS\nSUMIFS = SUM.HVISER\nSUMPRODUCT = SUMPRODUKT\nSUMSQ = SUMKV\nSUMX2MY2 = SUMX2MY2\nSUMX2PY2 = SUMX2PY2\nSUMXMY2 = SUMXMY2\nTAN = TAN\nTANH = TANH\nTRUNC = AFKORT\n\n##\n## Statistiske funktioner (Statistical Functions)\n##\nAVEDEV = MAD\nAVERAGE = MIDDEL\nAVERAGEA = MIDDELV\nAVERAGEIF = MIDDEL.HVIS\nAVERAGEIFS = MIDDEL.HVISER\nBETA.DIST = BETA.FORDELING\nBETA.INV = BETA.INV\nBINOM.DIST = BINOMIAL.FORDELING\nBINOM.DIST.RANGE = BINOMIAL.DIST.INTERVAL\nBINOM.INV = BINOMIAL.INV\nCHISQ.DIST = CHI2.FORDELING\nCHISQ.DIST.RT = CHI2.FORD.RT\nCHISQ.INV = CHI2.INV\nCHISQ.INV.RT = CHI2.INV.RT\nCHISQ.TEST = CHI2.TEST\nCONFIDENCE.NORM = KONFIDENS.NORM\nCONFIDENCE.T = KONFIDENST\nCORREL = KORRELATION\nCOUNT = TÆL\nCOUNTA = TÆLV\nCOUNTBLANK = ANTAL.BLANKE\nCOUNTIF = TÆL.HVIS\nCOUNTIFS = TÆL.HVISER\nCOVARIANCE.P = KOVARIANS.P\nCOVARIANCE.S = KOVARIANS.S\nDEVSQ = SAK\nEXPON.DIST = EKSP.FORDELING\nF.DIST = F.FORDELING\nF.DIST.RT = F.FORDELING.RT\nF.INV = F.INV\nF.INV.RT = F.INV.RT\nF.TEST = F.TEST\nFISHER = FISHER\nFISHERINV = FISHERINV\nFORECAST.ETS = PROGNOSE.ETS\nFORECAST.ETS.CONFINT = PROGNOSE.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = PROGNOSE.ETS.SÆSONUDSVING\nFORECAST.ETS.STAT = PROGNOSE.ETS.STAT\nFORECAST.LINEAR = PROGNOSE.LINEÆR\nFREQUENCY = FREKVENS\nGAMMA = GAMMA\nGAMMA.DIST = GAMMA.FORDELING\nGAMMA.INV = GAMMA.INV\nGAMMALN = GAMMALN\nGAMMALN.PRECISE = GAMMALN.PRECISE\nGAUSS = GAUSS\nGEOMEAN = GEOMIDDELVÆRDI\nGROWTH = FORØGELSE\nHARMEAN = HARMIDDELVÆRDI\nHYPGEOM.DIST = HYPGEO.FORDELING\nINTERCEPT = SKÆRING\nKURT = TOPSTEJL\nLARGE = STØRSTE\nLINEST = LINREGR\nLOGEST = LOGREGR\nLOGNORM.DIST = LOGNORM.FORDELING\nLOGNORM.INV = LOGNORM.INV\nMAX = MAKS\nMAXA = MAKSV\nMAXIFS = MAKSHVISER\nMEDIAN = MEDIAN\nMIN = MIN\nMINA = MINV\nMINIFS = MINHVISER\nMODE.MULT = HYPPIGST.FLERE\nMODE.SNGL = HYPPIGST.ENKELT\nNEGBINOM.DIST = NEGBINOM.FORDELING\nNORM.DIST = NORMAL.FORDELING\nNORM.INV = NORM.INV\nNORM.S.DIST = STANDARD.NORM.FORDELING\nNORM.S.INV = STANDARD.NORM.INV\nPEARSON = PEARSON\nPERCENTILE.EXC = FRAKTIL.UDELAD\nPERCENTILE.INC = FRAKTIL.MEDTAG\nPERCENTRANK.EXC = PROCENTPLADS.UDELAD\nPERCENTRANK.INC = PROCENTPLADS.MEDTAG\nPERMUT = PERMUT\nPERMUTATIONA = PERMUTATIONA\nPHI = PHI\nPOISSON.DIST = POISSON.FORDELING\nPROB = SANDSYNLIGHED\nQUARTILE.EXC = KVARTIL.UDELAD\nQUARTILE.INC = KVARTIL.MEDTAG\nRANK.AVG = PLADS.GNSN\nRANK.EQ = PLADS.LIGE\nRSQ = FORKLARINGSGRAD\nSKEW = SKÆVHED\nSKEW.P = SKÆVHED.P\nSLOPE = STIGNING\nSMALL = MINDSTE\nSTANDARDIZE = STANDARDISER\nSTDEV.P = STDAFV.P\nSTDEV.S = STDAFV.S\nSTDEVA = STDAFVV\nSTDEVPA = STDAFVPV\nSTEYX = STFYX\nT.DIST = T.FORDELING\nT.DIST.2T = T.FORDELING.2T\nT.DIST.RT = T.FORDELING.RT\nT.INV = T.INV\nT.INV.2T = T.INV.2T\nT.TEST = T.TEST\nTREND = TENDENS\nTRIMMEAN = TRIMMIDDELVÆRDI\nVAR.P = VARIANS.P\nVAR.S = VARIANS.S\nVARA = VARIANSV\nVARPA = VARIANSPV\nWEIBULL.DIST = WEIBULL.FORDELING\nZ.TEST = Z.TEST\n\n##\n## Tekstfunktioner (Text Functions)\n##\nBAHTTEXT = BAHTTEKST\nCHAR = TEGN\nCLEAN = RENS\nCODE = KODE\nCONCAT = CONCAT\nDOLLAR = KR\nEXACT = EKSAKT\nFIND = FIND\nFIXED = FAST\nISTHAIDIGIT = ERTHAILANDSKCIFFER\nLEFT = VENSTRE\nLEN = LÆNGDE\nLOWER = SMÅ.BOGSTAVER\nMID = MIDT\nNUMBERSTRING = TALSTRENG\nNUMBERVALUE = TALVÆRDI\nPHONETIC = FONETISK\nPROPER = STORT.FORBOGSTAV\nREPLACE = ERSTAT\nREPT = GENTAG\nRIGHT = HØJRE\nSEARCH = SØG\nSUBSTITUTE = UDSKIFT\nT = T\nTEXT = TEKST\nTEXTJOIN = TEKST.KOMBINER\nTHAIDIGIT = THAILANDSKCIFFER\nTHAINUMSOUND = THAILANDSKNUMLYD\nTHAINUMSTRING = THAILANDSKNUMSTRENG\nTHAISTRINGLENGTH = THAILANDSKSTRENGLÆNGDE\nTRIM = FJERN.OVERFLØDIGE.BLANKE\nUNICHAR = UNICHAR\nUNICODE = UNICODE\nUPPER = STORE.BOGSTAVER\nVALUE = VÆRDI\n\n##\n## Webfunktioner (Web Functions)\n##\nENCODEURL = KODNINGSURL\nFILTERXML = FILTRERXML\nWEBSERVICE = WEBTJENESTE\n\n##\n## Kompatibilitetsfunktioner (Compatibility Functions)\n##\nBETADIST = BETAFORDELING\nBETAINV = BETAINV\nBINOMDIST = BINOMIALFORDELING\nCEILING = AFRUND.LOFT\nCHIDIST = CHIFORDELING\nCHIINV = CHIINV\nCHITEST = CHITEST\nCONCATENATE = SAMMENKÆDNING\nCONFIDENCE = KONFIDENSINTERVAL\nCOVAR = KOVARIANS\nCRITBINOM = KRITBINOM\nEXPONDIST = EKSPFORDELING\nFDIST = FFORDELING\nFINV = FINV\nFLOOR = AFRUND.GULV\nFORECAST = PROGNOSE\nFTEST = FTEST\nGAMMADIST = GAMMAFORDELING\nGAMMAINV = GAMMAINV\nHYPGEOMDIST = HYPGEOFORDELING\nLOGINV = LOGINV\nLOGNORMDIST = LOGNORMFORDELING\nMODE = HYPPIGST\nNEGBINOMDIST = NEGBINOMFORDELING\nNORMDIST = NORMFORDELING\nNORMINV = NORMINV\nNORMSDIST = STANDARDNORMFORDELING\nNORMSINV = STANDARDNORMINV\nPERCENTILE = FRAKTIL\nPERCENTRANK = PROCENTPLADS\nPOISSON = POISSON\nQUARTILE = KVARTIL\nRANK = PLADS\nSTDEV = STDAFV\nSTDEVP = STDAFVP\nTDIST = TFORDELING\nTINV = TINV\nTTEST = TTEST\nVAR = VARIANS\nVARP = VARIANSP\nWEIBULL = WEIBULL\nZTEST = ZTEST\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/de/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Deutsch (German)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL\nDIV0\nVALUE = #WERT!\nREF = #BEZUG!\nNAME\nNUM = #ZAHL!\nNA = #NV\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/de/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Deutsch (German)\n##\n############################################################\n\n\n##\n## Cubefunktionen (Cube Functions)\n##\nCUBEKPIMEMBER = CUBEKPIELEMENT\nCUBEMEMBER = CUBEELEMENT\nCUBEMEMBERPROPERTY = CUBEELEMENTEIGENSCHAFT\nCUBERANKEDMEMBER = CUBERANGELEMENT\nCUBESET = CUBEMENGE\nCUBESETCOUNT = CUBEMENGENANZAHL\nCUBEVALUE = CUBEWERT\n\n##\n## Datenbankfunktionen (Database Functions)\n##\nDAVERAGE = DBMITTELWERT\nDCOUNT = DBANZAHL\nDCOUNTA = DBANZAHL2\nDGET = DBAUSZUG\nDMAX = DBMAX\nDMIN = DBMIN\nDPRODUCT = DBPRODUKT\nDSTDEV = DBSTDABW\nDSTDEVP = DBSTDABWN\nDSUM = DBSUMME\nDVAR = DBVARIANZ\nDVARP = DBVARIANZEN\n\n##\n## Datums- und Uhrzeitfunktionen (Date & Time Functions)\n##\nDATE = DATUM\nDATEVALUE = DATWERT\nDAY = TAG\nDAYS = TAGE\nDAYS360 = TAGE360\nEDATE = EDATUM\nEOMONTH = MONATSENDE\nHOUR = STUNDE\nISOWEEKNUM = ISOKALENDERWOCHE\nMINUTE = MINUTE\nMONTH = MONAT\nNETWORKDAYS = NETTOARBEITSTAGE\nNETWORKDAYS.INTL = NETTOARBEITSTAGE.INTL\nNOW = JETZT\nSECOND = SEKUNDE\nTHAIDAYOFWEEK = THAIWOCHENTAG\nTHAIMONTHOFYEAR = THAIMONATDESJAHRES\nTHAIYEAR = THAIJAHR\nTIME = ZEIT\nTIMEVALUE = ZEITWERT\nTODAY = HEUTE\nWEEKDAY = WOCHENTAG\nWEEKNUM = KALENDERWOCHE\nWORKDAY = ARBEITSTAG\nWORKDAY.INTL = ARBEITSTAG.INTL\nYEAR = JAHR\nYEARFRAC = BRTEILJAHRE\n\n##\n## Technische Funktionen (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BININDEZ\nBIN2HEX = BININHEX\nBIN2OCT = BININOKT\nBITAND = BITUND\nBITLSHIFT = BITLVERSCHIEB\nBITOR = BITODER\nBITRSHIFT = BITRVERSCHIEB\nBITXOR = BITXODER\nCOMPLEX = KOMPLEXE\nCONVERT = UMWANDELN\nDEC2BIN = DEZINBIN\nDEC2HEX = DEZINHEX\nDEC2OCT = DEZINOKT\nDELTA = DELTA\nERF = GAUSSFEHLER\nERF.PRECISE = GAUSSF.GENAU\nERFC = GAUSSFKOMPL\nERFC.PRECISE = GAUSSFKOMPL.GENAU\nGESTEP = GGANZZAHL\nHEX2BIN = HEXINBIN\nHEX2DEC = HEXINDEZ\nHEX2OCT = HEXINOKT\nIMABS = IMABS\nIMAGINARY = IMAGINÄRTEIL\nIMARGUMENT = IMARGUMENT\nIMCONJUGATE = IMKONJUGIERTE\nIMCOS = IMCOS\nIMCOSH = IMCOSHYP\nIMCOT = IMCOT\nIMCSC = IMCOSEC\nIMCSCH = IMCOSECHYP\nIMDIV = IMDIV\nIMEXP = IMEXP\nIMLN = IMLN\nIMLOG10 = IMLOG10\nIMLOG2 = IMLOG2\nIMPOWER = IMAPOTENZ\nIMPRODUCT = IMPRODUKT\nIMREAL = IMREALTEIL\nIMSEC = IMSEC\nIMSECH = IMSECHYP\nIMSIN = IMSIN\nIMSINH = IMSINHYP\nIMSQRT = IMWURZEL\nIMSUB = IMSUB\nIMSUM = IMSUMME\nIMTAN = IMTAN\nOCT2BIN = OKTINBIN\nOCT2DEC = OKTINDEZ\nOCT2HEX = OKTINHEX\n\n##\n## Finanzmathematische Funktionen (Financial Functions)\n##\nACCRINT = AUFGELZINS\nACCRINTM = AUFGELZINSF\nAMORDEGRC = AMORDEGRK\nAMORLINC = AMORLINEARK\nCOUPDAYBS = ZINSTERMTAGVA\nCOUPDAYS = ZINSTERMTAGE\nCOUPDAYSNC = ZINSTERMTAGNZ\nCOUPNCD = ZINSTERMNZ\nCOUPNUM = ZINSTERMZAHL\nCOUPPCD = ZINSTERMVZ\nCUMIPMT = KUMZINSZ\nCUMPRINC = KUMKAPITAL\nDB = GDA2\nDDB = GDA\nDISC = DISAGIO\nDOLLARDE = NOTIERUNGDEZ\nDOLLARFR = NOTIERUNGBRU\nDURATION = DURATION\nEFFECT = EFFEKTIV\nFV = ZW\nFVSCHEDULE = ZW2\nINTRATE = ZINSSATZ\nIPMT = ZINSZ\nIRR = IKV\nISPMT = ISPMT\nMDURATION = MDURATION\nMIRR = QIKV\nNOMINAL = NOMINAL\nNPER = ZZR\nNPV = NBW\nODDFPRICE = UNREGER.KURS\nODDFYIELD = UNREGER.REND\nODDLPRICE = UNREGLE.KURS\nODDLYIELD = UNREGLE.REND\nPDURATION = PDURATION\nPMT = RMZ\nPPMT = KAPZ\nPRICE = KURS\nPRICEDISC = KURSDISAGIO\nPRICEMAT = KURSFÄLLIG\nPV = BW\nRATE = ZINS\nRECEIVED = AUSZAHLUNG\nRRI = ZSATZINVEST\nSLN = LIA\nSYD = DIA\nTBILLEQ = TBILLÄQUIV\nTBILLPRICE = TBILLKURS\nTBILLYIELD = TBILLRENDITE\nVDB = VDB\nXIRR = XINTZINSFUSS\nXNPV = XKAPITALWERT\nYIELD = RENDITE\nYIELDDISC = RENDITEDIS\nYIELDMAT = RENDITEFÄLL\n\n##\n## Informationsfunktionen (Information Functions)\n##\nCELL = ZELLE\nERROR.TYPE = FEHLER.TYP\nINFO = INFO\nISBLANK = ISTLEER\nISERR = ISTFEHL\nISERROR = ISTFEHLER\nISEVEN = ISTGERADE\nISFORMULA = ISTFORMEL\nISLOGICAL = ISTLOG\nISNA = ISTNV\nISNONTEXT = ISTKTEXT\nISNUMBER = ISTZAHL\nISODD = ISTUNGERADE\nISREF = ISTBEZUG\nISTEXT = ISTTEXT\nN = N\nNA = NV\nSHEET = BLATT\nSHEETS = BLÄTTER\nTYPE = TYP\n\n##\n## Logische Funktionen (Logical Functions)\n##\nAND = UND\nFALSE = FALSCH\nIF = WENN\nIFERROR = WENNFEHLER\nIFNA = WENNNV\nIFS = WENNS\nNOT = NICHT\nOR = ODER\nSWITCH = ERSTERWERT\nTRUE = WAHR\nXOR = XODER\n\n##\n## Nachschlage- und Verweisfunktionen (Lookup & Reference Functions)\n##\nADDRESS = ADRESSE\nAREAS = BEREICHE\nCHOOSE = WAHL\nCOLUMN = SPALTE\nCOLUMNS = SPALTEN\nFORMULATEXT = FORMELTEXT\nGETPIVOTDATA = PIVOTDATENZUORDNEN\nHLOOKUP = WVERWEIS\nHYPERLINK = HYPERLINK\nINDEX = INDEX\nINDIRECT = INDIREKT\nLOOKUP = VERWEIS\nMATCH = VERGLEICH\nOFFSET = BEREICH.VERSCHIEBEN\nROW = ZEILE\nROWS = ZEILEN\nRTD = RTD\nTRANSPOSE = MTRANS\nVLOOKUP = SVERWEIS\n*RC = ZS\n\n##\n## Mathematische und trigonometrische Funktionen (Math & Trig Functions)\n##\nABS = ABS\nACOS = ARCCOS\nACOSH = ARCCOSHYP\nACOT = ARCCOT\nACOTH = ARCCOTHYP\nAGGREGATE = AGGREGAT\nARABIC = ARABISCH\nASIN = ARCSIN\nASINH = ARCSINHYP\nATAN = ARCTAN\nATAN2 = ARCTAN2\nATANH = ARCTANHYP\nBASE = BASIS\nCEILING.MATH = OBERGRENZE.MATHEMATIK\nCEILING.PRECISE = OBERGRENZE.GENAU\nCOMBIN = KOMBINATIONEN\nCOMBINA = KOMBINATIONEN2\nCOS = COS\nCOSH = COSHYP\nCOT = COT\nCOTH = COTHYP\nCSC = COSEC\nCSCH = COSECHYP\nDECIMAL = DEZIMAL\nDEGREES = GRAD\nECMA.CEILING = ECMA.OBERGRENZE\nEVEN = GERADE\nEXP = EXP\nFACT = FAKULTÄT\nFACTDOUBLE = ZWEIFAKULTÄT\nFLOOR.MATH = UNTERGRENZE.MATHEMATIK\nFLOOR.PRECISE = UNTERGRENZE.GENAU\nGCD = GGT\nINT = GANZZAHL\nISO.CEILING = ISO.OBERGRENZE\nLCM = KGV\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MDET\nMINVERSE = MINV\nMMULT = MMULT\nMOD = REST\nMROUND = VRUNDEN\nMULTINOMIAL = POLYNOMIAL\nMUNIT = MEINHEIT\nODD = UNGERADE\nPI = PI\nPOWER = POTENZ\nPRODUCT = PRODUKT\nQUOTIENT = QUOTIENT\nRADIANS = BOGENMASS\nRAND = ZUFALLSZAHL\nRANDBETWEEN = ZUFALLSBEREICH\nROMAN = RÖMISCH\nROUND = RUNDEN\nROUNDBAHTDOWN = RUNDBAHTNED\nROUNDBAHTUP = BAHTAUFRUNDEN\nROUNDDOWN = ABRUNDEN\nROUNDUP = AUFRUNDEN\nSEC = SEC\nSECH = SECHYP\nSERIESSUM = POTENZREIHE\nSIGN = VORZEICHEN\nSIN = SIN\nSINH = SINHYP\nSQRT = WURZEL\nSQRTPI = WURZELPI\nSUBTOTAL = TEILERGEBNIS\nSUM = SUMME\nSUMIF = SUMMEWENN\nSUMIFS = SUMMEWENNS\nSUMPRODUCT = SUMMENPRODUKT\nSUMSQ = QUADRATESUMME\nSUMX2MY2 = SUMMEX2MY2\nSUMX2PY2 = SUMMEX2PY2\nSUMXMY2 = SUMMEXMY2\nTAN = TAN\nTANH = TANHYP\nTRUNC = KÜRZEN\n\n##\n## Statistische Funktionen (Statistical Functions)\n##\nAVEDEV = MITTELABW\nAVERAGE = MITTELWERT\nAVERAGEA = MITTELWERTA\nAVERAGEIF = MITTELWERTWENN\nAVERAGEIFS = MITTELWERTWENNS\nBETA.DIST = BETA.VERT\nBETA.INV = BETA.INV\nBINOM.DIST = BINOM.VERT\nBINOM.DIST.RANGE = BINOM.VERT.BEREICH\nBINOM.INV = BINOM.INV\nCHISQ.DIST = CHIQU.VERT\nCHISQ.DIST.RT = CHIQU.VERT.RE\nCHISQ.INV = CHIQU.INV\nCHISQ.INV.RT = CHIQU.INV.RE\nCHISQ.TEST = CHIQU.TEST\nCONFIDENCE.NORM = KONFIDENZ.NORM\nCONFIDENCE.T = KONFIDENZ.T\nCORREL = KORREL\nCOUNT = ANZAHL\nCOUNTA = ANZAHL2\nCOUNTBLANK = ANZAHLLEEREZELLEN\nCOUNTIF = ZÄHLENWENN\nCOUNTIFS = ZÄHLENWENNS\nCOVARIANCE.P = KOVARIANZ.P\nCOVARIANCE.S = KOVARIANZ.S\nDEVSQ = SUMQUADABW\nEXPON.DIST = EXPON.VERT\nF.DIST = F.VERT\nF.DIST.RT = F.VERT.RE\nF.INV = F.INV\nF.INV.RT = F.INV.RE\nF.TEST = F.TEST\nFISHER = FISHER\nFISHERINV = FISHERINV\nFORECAST.ETS = PROGNOSE.ETS\nFORECAST.ETS.CONFINT = PROGNOSE.ETS.KONFINT\nFORECAST.ETS.SEASONALITY = PROGNOSE.ETS.SAISONALITÄT\nFORECAST.ETS.STAT = PROGNOSE.ETS.STAT\nFORECAST.LINEAR = PROGNOSE.LINEAR\nFREQUENCY = HÄUFIGKEIT\nGAMMA = GAMMA\nGAMMA.DIST = GAMMA.VERT\nGAMMA.INV = GAMMA.INV\nGAMMALN = GAMMALN\nGAMMALN.PRECISE = GAMMALN.GENAU\nGAUSS = GAUSS\nGEOMEAN = GEOMITTEL\nGROWTH = VARIATION\nHARMEAN = HARMITTEL\nHYPGEOM.DIST = HYPGEOM.VERT\nINTERCEPT = ACHSENABSCHNITT\nKURT = KURT\nLARGE = KGRÖSSTE\nLINEST = RGP\nLOGEST = RKP\nLOGNORM.DIST = LOGNORM.VERT\nLOGNORM.INV = LOGNORM.INV\nMAX = MAX\nMAXA = MAXA\nMAXIFS = MAXWENNS\nMEDIAN = MEDIAN\nMIN = MIN\nMINA = MINA\nMINIFS = MINWENNS\nMODE.MULT = MODUS.VIELF\nMODE.SNGL = MODUS.EINF\nNEGBINOM.DIST = NEGBINOM.VERT\nNORM.DIST = NORM.VERT\nNORM.INV = NORM.INV\nNORM.S.DIST = NORM.S.VERT\nNORM.S.INV = NORM.S.INV\nPEARSON = PEARSON\nPERCENTILE.EXC = QUANTIL.EXKL\nPERCENTILE.INC = QUANTIL.INKL\nPERCENTRANK.EXC = QUANTILSRANG.EXKL\nPERCENTRANK.INC = QUANTILSRANG.INKL\nPERMUT = VARIATIONEN\nPERMUTATIONA = VARIATIONEN2\nPHI = PHI\nPOISSON.DIST = POISSON.VERT\nPROB = WAHRSCHBEREICH\nQUARTILE.EXC = QUARTILE.EXKL\nQUARTILE.INC = QUARTILE.INKL\nRANK.AVG = RANG.MITTELW\nRANK.EQ = RANG.GLEICH\nRSQ = BESTIMMTHEITSMASS\nSKEW = SCHIEFE\nSKEW.P = SCHIEFE.P\nSLOPE = STEIGUNG\nSMALL = KKLEINSTE\nSTANDARDIZE = STANDARDISIERUNG\nSTDEV.P = STABW.N\nSTDEV.S = STABW.S\nSTDEVA = STABWA\nSTDEVPA = STABWNA\nSTEYX = STFEHLERYX\nT.DIST = T.VERT\nT.DIST.2T = T.VERT.2S\nT.DIST.RT = T.VERT.RE\nT.INV = T.INV\nT.INV.2T = T.INV.2S\nT.TEST = T.TEST\nTREND = TREND\nTRIMMEAN = GESTUTZTMITTEL\nVAR.P = VAR.P\nVAR.S = VAR.S\nVARA = VARIANZA\nVARPA = VARIANZENA\nWEIBULL.DIST = WEIBULL.VERT\nZ.TEST = G.TEST\n\n##\n## Textfunktionen (Text Functions)\n##\nBAHTTEXT = BAHTTEXT\nCHAR = ZEICHEN\nCLEAN = SÄUBERN\nCODE = CODE\nCONCAT = TEXTKETTE\nDOLLAR = DM\nEXACT = IDENTISCH\nFIND = FINDEN\nFIXED = FEST\nISTHAIDIGIT = ISTTHAIZAHLENWORT\nLEFT = LINKS\nLEN = LÄNGE\nLOWER = KLEIN\nMID = TEIL\nNUMBERVALUE = ZAHLENWERT\nPROPER = GROSS2\nREPLACE = ERSETZEN\nREPT = WIEDERHOLEN\nRIGHT = RECHTS\nSEARCH = SUCHEN\nSUBSTITUTE = WECHSELN\nT = T\nTEXT = TEXT\nTEXTJOIN = TEXTVERKETTEN\nTHAIDIGIT = THAIZAHLENWORT\nTHAINUMSOUND = THAIZAHLSOUND\nTHAINUMSTRING = THAILANDSKNUMSTRENG\nTHAISTRINGLENGTH = THAIZEICHENFOLGENLÄNGE\nTRIM = GLÄTTEN\nUNICHAR = UNIZEICHEN\nUNICODE = UNICODE\nUPPER = GROSS\nVALUE = WERT\n\n##\n## Webfunktionen (Web Functions)\n##\nENCODEURL = URLCODIEREN\nFILTERXML = XMLFILTERN\nWEBSERVICE = WEBDIENST\n\n##\n## Kompatibilitätsfunktionen (Compatibility Functions)\n##\nBETADIST = BETAVERT\nBETAINV = BETAINV\nBINOMDIST = BINOMVERT\nCEILING = OBERGRENZE\nCHIDIST = CHIVERT\nCHIINV = CHIINV\nCHITEST = CHITEST\nCONCATENATE = VERKETTEN\nCONFIDENCE = KONFIDENZ\nCOVAR = KOVAR\nCRITBINOM = KRITBINOM\nEXPONDIST = EXPONVERT\nFDIST = FVERT\nFINV = FINV\nFLOOR = UNTERGRENZE\nFORECAST = SCHÄTZER\nFTEST = FTEST\nGAMMADIST = GAMMAVERT\nGAMMAINV = GAMMAINV\nHYPGEOMDIST = HYPGEOMVERT\nLOGINV = LOGINV\nLOGNORMDIST = LOGNORMVERT\nMODE = MODALWERT\nNEGBINOMDIST = NEGBINOMVERT\nNORMDIST = NORMVERT\nNORMINV = NORMINV\nNORMSDIST = STANDNORMVERT\nNORMSINV = STANDNORMINV\nPERCENTILE = QUANTIL\nPERCENTRANK = QUANTILSRANG\nPOISSON = POISSON\nQUARTILE = QUARTILE\nRANK = RANG\nSTDEV = STABW\nSTDEVP = STABWN\nTDIST = TVERT\nTINV = TINV\nTTEST = TTEST\nVAR = VARIANZ\nVARP = VARIANZEN\nWEIBULL = WEIBULL\nZTEST = GTEST\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/en/uk/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## English-UK (English-UK)\n##\n############################################################\n\nArgumentSeparator = ,\n##\n##  (For future use)\n##\ncurrencySymbol = £\n\n##\n## Error Codes\n##\nNULL\nDIV0\nVALUE\nREF\nNAME\nNUM\nNA\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/es/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Español (Spanish)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #¡NULO!\nDIV0 = #¡DIV/0!\nVALUE = #¡VALOR!\nREF = #¡REF!\nNAME = #¿NOMBRE?\nNUM = #¡NUM!\nNA\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/es/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Español (Spanish)\n##\n############################################################\n\n\n##\n## Funciones de cubo (Cube Functions)\n##\nCUBEKPIMEMBER = MIEMBROKPICUBO\nCUBEMEMBER = MIEMBROCUBO\nCUBEMEMBERPROPERTY = PROPIEDADMIEMBROCUBO\nCUBERANKEDMEMBER = MIEMBRORANGOCUBO\nCUBESET = CONJUNTOCUBO\nCUBESETCOUNT = RECUENTOCONJUNTOCUBO\nCUBEVALUE = VALORCUBO\n\n##\n## Funciones de base de datos (Database Functions)\n##\nDAVERAGE = BDPROMEDIO\nDCOUNT = BDCONTAR\nDCOUNTA = BDCONTARA\nDGET = BDEXTRAER\nDMAX = BDMAX\nDMIN = BDMIN\nDPRODUCT = BDPRODUCTO\nDSTDEV = BDDESVEST\nDSTDEVP = BDDESVESTP\nDSUM = BDSUMA\nDVAR = BDVAR\nDVARP = BDVARP\n\n##\n## Funciones de fecha y hora (Date & Time Functions)\n##\nDATE = FECHA\nDATEDIF = SIFECHA\nDATESTRING = CADENA.FECHA\nDATEVALUE = FECHANUMERO\nDAY = DIA\nDAYS = DIAS\nDAYS360 = DIAS360\nEDATE = FECHA.MES\nEOMONTH = FIN.MES\nHOUR = HORA\nISOWEEKNUM = ISO.NUM.DE.SEMANA\nMINUTE = MINUTO\nMONTH = MES\nNETWORKDAYS = DIAS.LAB\nNETWORKDAYS.INTL = DIAS.LAB.INTL\nNOW = AHORA\nSECOND = SEGUNDO\nTHAIDAYOFWEEK = DIASEMTAI\nTHAIMONTHOFYEAR = MESAÑOTAI\nTHAIYEAR = AÑOTAI\nTIME = NSHORA\nTIMEVALUE = HORANUMERO\nTODAY = HOY\nWEEKDAY = DIASEM\nWEEKNUM = NUM.DE.SEMANA\nWORKDAY = DIA.LAB\nWORKDAY.INTL = DIA.LAB.INTL\nYEAR = AÑO\nYEARFRAC = FRAC.AÑO\n\n##\n## Funciones de ingeniería (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BIN.A.DEC\nBIN2HEX = BIN.A.HEX\nBIN2OCT = BIN.A.OCT\nBITAND = BIT.Y\nBITLSHIFT = BIT.DESPLIZQDA\nBITOR = BIT.O\nBITRSHIFT = BIT.DESPLDCHA\nBITXOR = BIT.XO\nCOMPLEX = COMPLEJO\nCONVERT = CONVERTIR\nDEC2BIN = DEC.A.BIN\nDEC2HEX = DEC.A.HEX\nDEC2OCT = DEC.A.OCT\nDELTA = DELTA\nERF = FUN.ERROR\nERF.PRECISE = FUN.ERROR.EXACTO\nERFC = FUN.ERROR.COMPL\nERFC.PRECISE = FUN.ERROR.COMPL.EXACTO\nGESTEP = MAYOR.O.IGUAL\nHEX2BIN = HEX.A.BIN\nHEX2DEC = HEX.A.DEC\nHEX2OCT = HEX.A.OCT\nIMABS = IM.ABS\nIMAGINARY = IMAGINARIO\nIMARGUMENT = IM.ANGULO\nIMCONJUGATE = IM.CONJUGADA\nIMCOS = IM.COS\nIMCOSH = IM.COSH\nIMCOT = IM.COT\nIMCSC = IM.CSC\nIMCSCH = IM.CSCH\nIMDIV = IM.DIV\nIMEXP = IM.EXP\nIMLN = IM.LN\nIMLOG10 = IM.LOG10\nIMLOG2 = IM.LOG2\nIMPOWER = IM.POT\nIMPRODUCT = IM.PRODUCT\nIMREAL = IM.REAL\nIMSEC = IM.SEC\nIMSECH = IM.SECH\nIMSIN = IM.SENO\nIMSINH = IM.SENOH\nIMSQRT = IM.RAIZ2\nIMSUB = IM.SUSTR\nIMSUM = IM.SUM\nIMTAN = IM.TAN\nOCT2BIN = OCT.A.BIN\nOCT2DEC = OCT.A.DEC\nOCT2HEX = OCT.A.HEX\n\n##\n## Funciones financieras (Financial Functions)\n##\nACCRINT = INT.ACUM\nACCRINTM = INT.ACUM.V\nAMORDEGRC = AMORTIZ.PROGRE\nAMORLINC = AMORTIZ.LIN\nCOUPDAYBS = CUPON.DIAS.L1\nCOUPDAYS = CUPON.DIAS\nCOUPDAYSNC = CUPON.DIAS.L2\nCOUPNCD = CUPON.FECHA.L2\nCOUPNUM = CUPON.NUM\nCOUPPCD = CUPON.FECHA.L1\nCUMIPMT = PAGO.INT.ENTRE\nCUMPRINC = PAGO.PRINC.ENTRE\nDB = DB\nDDB = DDB\nDISC = TASA.DESC\nDOLLARDE = MONEDA.DEC\nDOLLARFR = MONEDA.FRAC\nDURATION = DURACION\nEFFECT = INT.EFECTIVO\nFV = VF\nFVSCHEDULE = VF.PLAN\nINTRATE = TASA.INT\nIPMT = PAGOINT\nIRR = TIR\nISPMT = INT.PAGO.DIR\nMDURATION = DURACION.MODIF\nMIRR = TIRM\nNOMINAL = TASA.NOMINAL\nNPER = NPER\nNPV = VNA\nODDFPRICE = PRECIO.PER.IRREGULAR.1\nODDFYIELD = RENDTO.PER.IRREGULAR.1\nODDLPRICE = PRECIO.PER.IRREGULAR.2\nODDLYIELD = RENDTO.PER.IRREGULAR.2\nPDURATION = P.DURACION\nPMT = PAGO\nPPMT = PAGOPRIN\nPRICE = PRECIO\nPRICEDISC = PRECIO.DESCUENTO\nPRICEMAT = PRECIO.VENCIMIENTO\nPV = VA\nRATE = TASA\nRECEIVED = CANTIDAD.RECIBIDA\nRRI = RRI\nSLN = SLN\nSYD = SYD\nTBILLEQ = LETRA.DE.TEST.EQV.A.BONO\nTBILLPRICE = LETRA.DE.TES.PRECIO\nTBILLYIELD = LETRA.DE.TES.RENDTO\nVDB = DVS\nXIRR = TIR.NO.PER\nXNPV = VNA.NO.PER\nYIELD = RENDTO\nYIELDDISC = RENDTO.DESC\nYIELDMAT = RENDTO.VENCTO\n\n##\n## Funciones de información (Information Functions)\n##\nCELL = CELDA\nERROR.TYPE = TIPO.DE.ERROR\nINFO = INFO\nISBLANK = ESBLANCO\nISERR = ESERR\nISERROR = ESERROR\nISEVEN = ES.PAR\nISFORMULA = ESFORMULA\nISLOGICAL = ESLOGICO\nISNA = ESNOD\nISNONTEXT = ESNOTEXTO\nISNUMBER = ESNUMERO\nISODD = ES.IMPAR\nISREF = ESREF\nISTEXT = ESTEXTO\nN = N\nNA = NOD\nSHEET = HOJA\nSHEETS = HOJAS\nTYPE = TIPO\n\n##\n## Funciones lógicas (Logical Functions)\n##\nAND = Y\nFALSE = FALSO\nIF = SI\nIFERROR = SI.ERROR\nIFNA = SI.ND\nIFS = SI.CONJUNTO\nNOT = NO\nOR = O\nSWITCH = CAMBIAR\nTRUE = VERDADERO\nXOR = XO\n\n##\n## Funciones de búsqueda y referencia (Lookup & Reference Functions)\n##\nADDRESS = DIRECCION\nAREAS = AREAS\nCHOOSE = ELEGIR\nCOLUMN = COLUMNA\nCOLUMNS = COLUMNAS\nFORMULATEXT = FORMULATEXTO\nGETPIVOTDATA = IMPORTARDATOSDINAMICOS\nHLOOKUP = BUSCARH\nHYPERLINK = HIPERVINCULO\nINDEX = INDICE\nINDIRECT = INDIRECTO\nLOOKUP = BUSCAR\nMATCH = COINCIDIR\nOFFSET = DESREF\nROW = FILA\nROWS = FILAS\nRTD = RDTR\nTRANSPOSE = TRANSPONER\nVLOOKUP = BUSCARV\n*RC = FC\n\n##\n## Funciones matemáticas y trigonométricas (Math & Trig Functions)\n##\nABS = ABS\nACOS = ACOS\nACOSH = ACOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = AGREGAR\nARABIC = NUMERO.ARABE\nASIN = ASENO\nASINH = ASENOH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nBASE = BASE\nCEILING.MATH = MULTIPLO.SUPERIOR.MAT\nCEILING.PRECISE = MULTIPLO.SUPERIOR.EXACTO\nCOMBIN = COMBINAT\nCOMBINA = COMBINA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = CONV.DECIMAL\nDEGREES = GRADOS\nECMA.CEILING = MULTIPLO.SUPERIOR.ECMA\nEVEN = REDONDEA.PAR\nEXP = EXP\nFACT = FACT\nFACTDOUBLE = FACT.DOBLE\nFLOOR.MATH = MULTIPLO.INFERIOR.MAT\nFLOOR.PRECISE = MULTIPLO.INFERIOR.EXACTO\nGCD = M.C.D\nINT = ENTERO\nISO.CEILING = MULTIPLO.SUPERIOR.ISO\nLCM = M.C.M\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MDETERM\nMINVERSE = MINVERSA\nMMULT = MMULT\nMOD = RESIDUO\nMROUND = REDOND.MULT\nMULTINOMIAL = MULTINOMIAL\nMUNIT = M.UNIDAD\nODD = REDONDEA.IMPAR\nPI = PI\nPOWER = POTENCIA\nPRODUCT = PRODUCTO\nQUOTIENT = COCIENTE\nRADIANS = RADIANES\nRAND = ALEATORIO\nRANDBETWEEN = ALEATORIO.ENTRE\nROMAN = NUMERO.ROMANO\nROUND = REDONDEAR\nROUNDBAHTDOWN = REDONDEAR.BAHT.MAS\nROUNDBAHTUP = REDONDEAR.BAHT.MENOS\nROUNDDOWN = REDONDEAR.MENOS\nROUNDUP = REDONDEAR.MAS\nSEC = SEC\nSECH = SECH\nSERIESSUM = SUMA.SERIES\nSIGN = SIGNO\nSIN = SENO\nSINH = SENOH\nSQRT = RAIZ\nSQRTPI = RAIZ2PI\nSUBTOTAL = SUBTOTALES\nSUM = SUMA\nSUMIF = SUMAR.SI\nSUMIFS = SUMAR.SI.CONJUNTO\nSUMPRODUCT = SUMAPRODUCTO\nSUMSQ = SUMA.CUADRADOS\nSUMX2MY2 = SUMAX2MENOSY2\nSUMX2PY2 = SUMAX2MASY2\nSUMXMY2 = SUMAXMENOSY2\nTAN = TAN\nTANH = TANH\nTRUNC = TRUNCAR\n\n##\n## Funciones estadísticas (Statistical Functions)\n##\nAVEDEV = DESVPROM\nAVERAGE = PROMEDIO\nAVERAGEA = PROMEDIOA\nAVERAGEIF = PROMEDIO.SI\nAVERAGEIFS = PROMEDIO.SI.CONJUNTO\nBETA.DIST = DISTR.BETA.N\nBETA.INV = INV.BETA.N\nBINOM.DIST = DISTR.BINOM.N\nBINOM.DIST.RANGE = DISTR.BINOM.SERIE\nBINOM.INV = INV.BINOM\nCHISQ.DIST = DISTR.CHICUAD\nCHISQ.DIST.RT = DISTR.CHICUAD.CD\nCHISQ.INV = INV.CHICUAD\nCHISQ.INV.RT = INV.CHICUAD.CD\nCHISQ.TEST = PRUEBA.CHICUAD\nCONFIDENCE.NORM = INTERVALO.CONFIANZA.NORM\nCONFIDENCE.T = INTERVALO.CONFIANZA.T\nCORREL = COEF.DE.CORREL\nCOUNT = CONTAR\nCOUNTA = CONTARA\nCOUNTBLANK = CONTAR.BLANCO\nCOUNTIF = CONTAR.SI\nCOUNTIFS = CONTAR.SI.CONJUNTO\nCOVARIANCE.P = COVARIANCE.P\nCOVARIANCE.S = COVARIANZA.M\nDEVSQ = DESVIA2\nEXPON.DIST = DISTR.EXP.N\nF.DIST = DISTR.F.N\nF.DIST.RT = DISTR.F.CD\nF.INV = INV.F\nF.INV.RT = INV.F.CD\nF.TEST = PRUEBA.F.N\nFISHER = FISHER\nFISHERINV = PRUEBA.FISHER.INV\nFORECAST.ETS = PRONOSTICO.ETS\nFORECAST.ETS.CONFINT = PRONOSTICO.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = PRONOSTICO.ETS.ESTACIONALIDAD\nFORECAST.ETS.STAT = PRONOSTICO.ETS.STAT\nFORECAST.LINEAR = PRONOSTICO.LINEAL\nFREQUENCY = FRECUENCIA\nGAMMA = GAMMA\nGAMMA.DIST = DISTR.GAMMA.N\nGAMMA.INV = INV.GAMMA\nGAMMALN = GAMMA.LN\nGAMMALN.PRECISE = GAMMA.LN.EXACTO\nGAUSS = GAUSS\nGEOMEAN = MEDIA.GEOM\nGROWTH = CRECIMIENTO\nHARMEAN = MEDIA.ARMO\nHYPGEOM.DIST = DISTR.HIPERGEOM.N\nINTERCEPT = INTERSECCION.EJE\nKURT = CURTOSIS\nLARGE = K.ESIMO.MAYOR\nLINEST = ESTIMACION.LINEAL\nLOGEST = ESTIMACION.LOGARITMICA\nLOGNORM.DIST = DISTR.LOGNORM\nLOGNORM.INV = INV.LOGNORM\nMAX = MAX\nMAXA = MAXA\nMAXIFS = MAX.SI.CONJUNTO\nMEDIAN = MEDIANA\nMIN = MIN\nMINA = MINA\nMINIFS = MIN.SI.CONJUNTO\nMODE.MULT = MODA.VARIOS\nMODE.SNGL = MODA.UNO\nNEGBINOM.DIST = NEGBINOM.DIST\nNORM.DIST = DISTR.NORM.N\nNORM.INV = INV.NORM\nNORM.S.DIST = DISTR.NORM.ESTAND.N\nNORM.S.INV = INV.NORM.ESTAND\nPEARSON = PEARSON\nPERCENTILE.EXC = PERCENTIL.EXC\nPERCENTILE.INC = PERCENTIL.INC\nPERCENTRANK.EXC = RANGO.PERCENTIL.EXC\nPERCENTRANK.INC = RANGO.PERCENTIL.INC\nPERMUT = PERMUTACIONES\nPERMUTATIONA = PERMUTACIONES.A\nPHI = FI\nPOISSON.DIST = POISSON.DIST\nPROB = PROBABILIDAD\nQUARTILE.EXC = CUARTIL.EXC\nQUARTILE.INC = CUARTIL.INC\nRANK.AVG = JERARQUIA.MEDIA\nRANK.EQ = JERARQUIA.EQV\nRSQ = COEFICIENTE.R2\nSKEW = COEFICIENTE.ASIMETRIA\nSKEW.P = COEFICIENTE.ASIMETRIA.P\nSLOPE = PENDIENTE\nSMALL = K.ESIMO.MENOR\nSTANDARDIZE = NORMALIZACION\nSTDEV.P = DESVEST.P\nSTDEV.S = DESVEST.M\nSTDEVA = DESVESTA\nSTDEVPA = DESVESTPA\nSTEYX = ERROR.TIPICO.XY\nT.DIST = DISTR.T.N\nT.DIST.2T = DISTR.T.2C\nT.DIST.RT = DISTR.T.CD\nT.INV = INV.T\nT.INV.2T = INV.T.2C\nT.TEST = PRUEBA.T.N\nTREND = TENDENCIA\nTRIMMEAN = MEDIA.ACOTADA\nVAR.P = VAR.P\nVAR.S = VAR.S\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = DISTR.WEIBULL\nZ.TEST = PRUEBA.Z.N\n\n##\n## Funciones de texto (Text Functions)\n##\nBAHTTEXT = TEXTOBAHT\nCHAR = CARACTER\nCLEAN = LIMPIAR\nCODE = CODIGO\nCONCAT = CONCAT\nDOLLAR = MONEDA\nEXACT = IGUAL\nFIND = ENCONTRAR\nFIXED = DECIMAL\nISTHAIDIGIT = ESDIGITOTAI\nLEFT = IZQUIERDA\nLEN = LARGO\nLOWER = MINUSC\nMID = EXTRAE\nNUMBERSTRING = CADENA.NUMERO\nNUMBERVALUE = VALOR.NUMERO\nPHONETIC = FONETICO\nPROPER = NOMPROPIO\nREPLACE = REEMPLAZAR\nREPT = REPETIR\nRIGHT = DERECHA\nSEARCH = HALLAR\nSUBSTITUTE = SUSTITUIR\nT = T\nTEXT = TEXTO\nTEXTJOIN = UNIRCADENAS\nTHAIDIGIT = DIGITOTAI\nTHAINUMSOUND = SONNUMTAI\nTHAINUMSTRING = CADENANUMTAI\nTHAISTRINGLENGTH = LONGCADENATAI\nTRIM = ESPACIOS\nUNICHAR = UNICAR\nUNICODE = UNICODE\nUPPER = MAYUSC\nVALUE = VALOR\n\n##\n## Funciones web (Web Functions)\n##\nENCODEURL = URLCODIF\nFILTERXML = XMLFILTRO\nWEBSERVICE = SERVICIOWEB\n\n##\n## Funciones de compatibilidad (Compatibility Functions)\n##\nBETADIST = DISTR.BETA\nBETAINV = DISTR.BETA.INV\nBINOMDIST = DISTR.BINOM\nCEILING = MULTIPLO.SUPERIOR\nCHIDIST = DISTR.CHI\nCHIINV = PRUEBA.CHI.INV\nCHITEST = PRUEBA.CHI\nCONCATENATE = CONCATENAR\nCONFIDENCE = INTERVALO.CONFIANZA\nCOVAR = COVAR\nCRITBINOM = BINOM.CRIT\nEXPONDIST = DISTR.EXP\nFDIST = DISTR.F\nFINV = DISTR.F.INV\nFLOOR = MULTIPLO.INFERIOR\nFORECAST = PRONOSTICO\nFTEST = PRUEBA.F\nGAMMADIST = DISTR.GAMMA\nGAMMAINV = DISTR.GAMMA.INV\nHYPGEOMDIST = DISTR.HIPERGEOM\nLOGINV = DISTR.LOG.INV\nLOGNORMDIST = DISTR.LOG.NORM\nMODE = MODA\nNEGBINOMDIST = NEGBINOMDIST\nNORMDIST = DISTR.NORM\nNORMINV = DISTR.NORM.INV\nNORMSDIST = DISTR.NORM.ESTAND\nNORMSINV = DISTR.NORM.ESTAND.INV\nPERCENTILE = PERCENTIL\nPERCENTRANK = RANGO.PERCENTIL\nPOISSON = POISSON\nQUARTILE = CUARTIL\nRANK = JERARQUIA\nSTDEV = DESVEST\nSTDEVP = DESVESTP\nTDIST = DISTR.T\nTINV = DISTR.T.INV\nTTEST = PRUEBA.T\nVAR = VAR\nVARP = VARP\nWEIBULL = DIST.WEIBULL\nZTEST = PRUEBA.Z\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/fi/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Suomi (Finnish)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #TYHJÄ!\nDIV0 = #JAKO/0!\nVALUE = #ARVO!\nREF = #VIITTAUS!\nNAME = #NIMI?\nNUM = #LUKU!\nNA = #PUUTTUU!\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/fi/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Suomi (Finnish)\n##\n############################################################\n\n\n##\n## Kuutiofunktiot (Cube Functions)\n##\nCUBEKPIMEMBER = KUUTIOKPIJÄSEN\nCUBEMEMBER = KUUTIONJÄSEN\nCUBEMEMBERPROPERTY = KUUTIONJÄSENENOMINAISUUS\nCUBERANKEDMEMBER = KUUTIONLUOKITELTUJÄSEN\nCUBESET = KUUTIOJOUKKO\nCUBESETCOUNT = KUUTIOJOUKKOJENMÄÄRÄ\nCUBEVALUE = KUUTIONARVO\n\n##\n## Tietokantafunktiot (Database Functions)\n##\nDAVERAGE = TKESKIARVO\nDCOUNT = TLASKE\nDCOUNTA = TLASKEA\nDGET = TNOUDA\nDMAX = TMAKS\nDMIN = TMIN\nDPRODUCT = TTULO\nDSTDEV = TKESKIHAJONTA\nDSTDEVP = TKESKIHAJONTAP\nDSUM = TSUMMA\nDVAR = TVARIANSSI\nDVARP = TVARIANSSIP\n\n##\n## Päivämäärä- ja aikafunktiot (Date & Time Functions)\n##\nDATE = PÄIVÄYS\nDATEDIF = PVMERO\nDATESTRING = PVMMERKKIJONO\nDATEVALUE = PÄIVÄYSARVO\nDAY = PÄIVÄ\nDAYS = PÄIVÄT\nDAYS360 = PÄIVÄT360\nEDATE = PÄIVÄ.KUUKAUSI\nEOMONTH = KUUKAUSI.LOPPU\nHOUR = TUNNIT\nISOWEEKNUM = VIIKKO.ISO.NRO\nMINUTE = MINUUTIT\nMONTH = KUUKAUSI\nNETWORKDAYS = TYÖPÄIVÄT\nNETWORKDAYS.INTL = TYÖPÄIVÄT.KANSVÄL\nNOW = NYT\nSECOND = SEKUNNIT\nTHAIDAYOFWEEK = THAI.VIIKONPÄIVÄ\nTHAIMONTHOFYEAR = THAI.KUUKAUSI\nTHAIYEAR = THAI.VUOSI\nTIME = AIKA\nTIMEVALUE = AIKA_ARVO\nTODAY = TÄMÄ.PÄIVÄ\nWEEKDAY = VIIKONPÄIVÄ\nWEEKNUM = VIIKKO.NRO\nWORKDAY = TYÖPÄIVÄ\nWORKDAY.INTL = TYÖPÄIVÄ.KANSVÄL\nYEAR = VUOSI\nYEARFRAC = VUOSI.OSA\n\n##\n## Tekniset funktiot (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BINDES\nBIN2HEX = BINHEKSA\nBIN2OCT = BINOKT\nBITAND = BITTI.JA\nBITLSHIFT = BITTI.SIIRTO.V\nBITOR = BITTI.TAI\nBITRSHIFT = BITTI.SIIRTO.O\nBITXOR = BITTI.EHDOTON.TAI\nCOMPLEX = KOMPLEKSI\nCONVERT = MUUNNA\nDEC2BIN = DESBIN\nDEC2HEX = DESHEKSA\nDEC2OCT = DESOKT\nDELTA = SAMA.ARVO\nERF = VIRHEFUNKTIO\nERF.PRECISE = VIRHEFUNKTIO.TARKKA\nERFC = VIRHEFUNKTIO.KOMPLEMENTTI\nERFC.PRECISE = VIRHEFUNKTIO.KOMPLEMENTTI.TARKKA\nGESTEP = RAJA\nHEX2BIN = HEKSABIN\nHEX2DEC = HEKSADES\nHEX2OCT = HEKSAOKT\nIMABS = KOMPLEKSI.ABS\nIMAGINARY = KOMPLEKSI.IMAG\nIMARGUMENT = KOMPLEKSI.ARG\nIMCONJUGATE = KOMPLEKSI.KONJ\nIMCOS = KOMPLEKSI.COS\nIMCOSH = IMCOSH\nIMCOT = KOMPLEKSI.COT\nIMCSC = KOMPLEKSI.KOSEK\nIMCSCH = KOMPLEKSI.KOSEKH\nIMDIV = KOMPLEKSI.OSAM\nIMEXP = KOMPLEKSI.EKSP\nIMLN = KOMPLEKSI.LN\nIMLOG10 = KOMPLEKSI.LOG10\nIMLOG2 = KOMPLEKSI.LOG2\nIMPOWER = KOMPLEKSI.POT\nIMPRODUCT = KOMPLEKSI.TULO\nIMREAL = KOMPLEKSI.REAALI\nIMSEC = KOMPLEKSI.SEK\nIMSECH = KOMPLEKSI.SEKH\nIMSIN = KOMPLEKSI.SIN\nIMSINH = KOMPLEKSI.SINH\nIMSQRT = KOMPLEKSI.NELIÖJ\nIMSUB = KOMPLEKSI.EROTUS\nIMSUM = KOMPLEKSI.SUM\nIMTAN = KOMPLEKSI.TAN\nOCT2BIN = OKTBIN\nOCT2DEC = OKTDES\nOCT2HEX = OKTHEKSA\n\n##\n## Rahoitusfunktiot (Financial Functions)\n##\nACCRINT = KERTYNYT.KORKO\nACCRINTM = KERTYNYT.KORKO.LOPUSSA\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = KORKOPÄIVÄT.ALUSTA\nCOUPDAYS = KORKOPÄIVÄT\nCOUPDAYSNC = KORKOPÄIVÄT.SEURAAVA\nCOUPNCD = KORKOPÄIVÄ.SEURAAVA\nCOUPNUM = KORKOPÄIVÄ.JAKSOT\nCOUPPCD = KORKOPÄIVÄ.EDELLINEN\nCUMIPMT = MAKSETTU.KORKO\nCUMPRINC = MAKSETTU.LYHENNYS\nDB = DB\nDDB = DDB\nDISC = DISKONTTOKORKO\nDOLLARDE = VALUUTTA.DES\nDOLLARFR = VALUUTTA.MURTO\nDURATION = KESTO\nEFFECT = KORKO.EFEKT\nFV = TULEVA.ARVO\nFVSCHEDULE = TULEVA.ARVO.ERIKORKO\nINTRATE = KORKO.ARVOPAPERI\nIPMT = IPMT\nIRR = SISÄINEN.KORKO\nISPMT = ISPMT\nMDURATION = KESTO.MUUNN\nMIRR = MSISÄINEN\nNOMINAL = KORKO.VUOSI\nNPER = NJAKSO\nNPV = NNA\nODDFPRICE = PARITON.ENS.NIMELLISARVO\nODDFYIELD = PARITON.ENS.TUOTTO\nODDLPRICE = PARITON.VIIM.NIMELLISARVO\nODDLYIELD = PARITON.VIIM.TUOTTO\nPDURATION = KESTO.JAKSO\nPMT = MAKSU\nPPMT = PPMT\nPRICE = HINTA\nPRICEDISC = HINTA.DISK\nPRICEMAT = HINTA.LUNASTUS\nPV = NA\nRATE = KORKO\nRECEIVED = SAATU.HINTA\nRRI = TOT.ROI\nSLN = STP\nSYD = VUOSIPOISTO\nTBILLEQ = OBLIG.TUOTTOPROS\nTBILLPRICE = OBLIG.HINTA\nTBILLYIELD = OBLIG.TUOTTO\nVDB = VDB\nXIRR = SISÄINEN.KORKO.JAKSOTON\nXNPV = NNA.JAKSOTON\nYIELD = TUOTTO\nYIELDDISC = TUOTTO.DISK\nYIELDMAT = TUOTTO.ERÄP\n\n##\n## Tietofunktiot (Information Functions)\n##\nCELL = SOLU\nERROR.TYPE = VIRHEEN.LAJI\nINFO = KUVAUS\nISBLANK = ONTYHJÄ\nISERR = ONVIRH\nISERROR = ONVIRHE\nISEVEN = ONPARILLINEN\nISFORMULA = ONKAAVA\nISLOGICAL = ONTOTUUS\nISNA = ONPUUTTUU\nISNONTEXT = ONEI_TEKSTI\nISNUMBER = ONLUKU\nISODD = ONPARITON\nISREF = ONVIITT\nISTEXT = ONTEKSTI\nN = N\nNA = PUUTTUU\nSHEET = TAULUKKO\nSHEETS = TAULUKOT\nTYPE = TYYPPI\n\n##\n## Loogiset funktiot (Logical Functions)\n##\nAND = JA\nFALSE = EPÄTOSI\nIF = JOS\nIFERROR = JOSVIRHE\nIFNA = JOSPUUTTUU\nIFS = JOSS\nNOT = EI\nOR = TAI\nSWITCH = MUUTA\nTRUE = TOSI\nXOR = EHDOTON.TAI\n\n##\n## Haku- ja viitefunktiot (Lookup & Reference Functions)\n##\nADDRESS = OSOITE\nAREAS = ALUEET\nCHOOSE = VALITSE.INDEKSI\nCOLUMN = SARAKE\nCOLUMNS = SARAKKEET\nFORMULATEXT = KAAVA.TEKSTI\nGETPIVOTDATA = NOUDA.PIVOT.TIEDOT\nHLOOKUP = VHAKU\nHYPERLINK = HYPERLINKKI\nINDEX = INDEKSI\nINDIRECT = EPÄSUORA\nLOOKUP = HAKU\nMATCH = VASTINE\nOFFSET = SIIRTYMÄ\nROW = RIVI\nROWS = RIVIT\nRTD = RTD\nTRANSPOSE = TRANSPONOI\nVLOOKUP = PHAKU\n*RC = RS\n\n##\n## Matemaattiset ja trigonometriset funktiot (Math & Trig Functions)\n##\nABS = ITSEISARVO\nACOS = ACOS\nACOSH = ACOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = KOOSTE\nARABIC = ARABIA\nASIN = ASIN\nASINH = ASINH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nBASE = PERUS\nCEILING.MATH = PYÖRISTÄ.KERR.YLÖS.MATEMAATTINEN\nCEILING.PRECISE = PYÖRISTÄ.KERR.YLÖS.TARKKA\nCOMBIN = KOMBINAATIO\nCOMBINA = KOMBINAATIOA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = KOSEK\nCSCH = KOSEKH\nDECIMAL = DESIMAALI\nDEGREES = ASTEET\nECMA.CEILING = ECMA.PYÖRISTÄ.KERR.YLÖS\nEVEN = PARILLINEN\nEXP = EKSPONENTTI\nFACT = KERTOMA\nFACTDOUBLE = KERTOMA.OSA\nFLOOR.MATH = PYÖRISTÄ.KERR.ALAS.MATEMAATTINEN\nFLOOR.PRECISE = PYÖRISTÄ.KERR.ALAS.TARKKA\nGCD = SUURIN.YHT.TEKIJÄ\nINT = KOKONAISLUKU\nISO.CEILING = ISO.PYÖRISTÄ.KERR.YLÖS\nLCM = PIENIN.YHT.JAETTAVA\nLN = LUONNLOG\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MDETERM\nMINVERSE = MKÄÄNTEINEN\nMMULT = MKERRO\nMOD = JAKOJ\nMROUND = PYÖRISTÄ.KERR\nMULTINOMIAL = MULTINOMI\nMUNIT = YKSIKKÖM\nODD = PARITON\nPI = PII\nPOWER = POTENSSI\nPRODUCT = TULO\nQUOTIENT = OSAMÄÄRÄ\nRADIANS = RADIAANIT\nRAND = SATUNNAISLUKU\nRANDBETWEEN = SATUNNAISLUKU.VÄLILTÄ\nROMAN = ROMAN\nROUND = PYÖRISTÄ\nROUNDBAHTDOWN = PYÖRISTÄ.BAHT.ALAS\nROUNDBAHTUP = PYÖRISTÄ.BAHT.YLÖS\nROUNDDOWN = PYÖRISTÄ.DES.ALAS\nROUNDUP = PYÖRISTÄ.DES.YLÖS\nSEC = SEK\nSECH = SEKH\nSERIESSUM = SARJA.SUMMA\nSIGN = ETUMERKKI\nSIN = SIN\nSINH = SINH\nSQRT = NELIÖJUURI\nSQRTPI = NELIÖJUURI.PII\nSUBTOTAL = VÄLISUMMA\nSUM = SUMMA\nSUMIF = SUMMA.JOS\nSUMIFS = SUMMA.JOS.JOUKKO\nSUMPRODUCT = TULOJEN.SUMMA\nSUMSQ = NELIÖSUMMA\nSUMX2MY2 = NELIÖSUMMIEN.EROTUS\nSUMX2PY2 = NELIÖSUMMIEN.SUMMA\nSUMXMY2 = EROTUSTEN.NELIÖSUMMA\nTAN = TAN\nTANH = TANH\nTRUNC = KATKAISE\n\n##\n## Tilastolliset funktiot (Statistical Functions)\n##\nAVEDEV = KESKIPOIKKEAMA\nAVERAGE = KESKIARVO\nAVERAGEA = KESKIARVOA\nAVERAGEIF = KESKIARVO.JOS\nAVERAGEIFS = KESKIARVO.JOS.JOUKKO\nBETA.DIST = BEETA.JAKAUMA\nBETA.INV = BEETA.KÄÄNT\nBINOM.DIST = BINOMI.JAKAUMA\nBINOM.DIST.RANGE = BINOMI.JAKAUMA.ALUE\nBINOM.INV = BINOMIJAKAUMA.KÄÄNT\nCHISQ.DIST = CHINELIÖ.JAKAUMA\nCHISQ.DIST.RT = CHINELIÖ.JAKAUMA.OH\nCHISQ.INV = CHINELIÖ.KÄÄNT\nCHISQ.INV.RT = CHINELIÖ.KÄÄNT.OH\nCHISQ.TEST = CHINELIÖ.TESTI\nCONFIDENCE.NORM = LUOTTAMUSVÄLI.NORM\nCONFIDENCE.T = LUOTTAMUSVÄLI.T\nCORREL = KORRELAATIO\nCOUNT = LASKE\nCOUNTA = LASKE.A\nCOUNTBLANK = LASKE.TYHJÄT\nCOUNTIF = LASKE.JOS\nCOUNTIFS = LASKE.JOS.JOUKKO\nCOVARIANCE.P = KOVARIANSSI.P\nCOVARIANCE.S = KOVARIANSSI.S\nDEVSQ = OIKAISTU.NELIÖSUMMA\nEXPON.DIST = EKSPONENTIAALI.JAKAUMA\nF.DIST = F.JAKAUMA\nF.DIST.RT = F.JAKAUMA.OH\nF.INV = F.KÄÄNT\nF.INV.RT = F.KÄÄNT.OH\nF.TEST = F.TESTI\nFISHER = FISHER\nFISHERINV = FISHER.KÄÄNT\nFORECAST.ETS = ENNUSTE.ETS\nFORECAST.ETS.CONFINT = ENNUSTE.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = ENNUSTE.ETS.KAUSIVAIHTELU\nFORECAST.ETS.STAT = ENNUSTE.ETS.STAT\nFORECAST.LINEAR = ENNUSTE.LINEAARINEN\nFREQUENCY = TAAJUUS\nGAMMA = GAMMA\nGAMMA.DIST = GAMMA.JAKAUMA\nGAMMA.INV = GAMMA.JAKAUMA.KÄÄNT\nGAMMALN = GAMMALN\nGAMMALN.PRECISE = GAMMALN.TARKKA\nGAUSS = GAUSS\nGEOMEAN = KESKIARVO.GEOM\nGROWTH = KASVU\nHARMEAN = KESKIARVO.HARM\nHYPGEOM.DIST = HYPERGEOM_JAKAUMA\nINTERCEPT = LEIKKAUSPISTE\nKURT = KURT\nLARGE = SUURI\nLINEST = LINREGR\nLOGEST = LOGREGR\nLOGNORM.DIST = LOGNORM_JAKAUMA\nLOGNORM.INV = LOGNORM.KÄÄNT\nMAX = MAKS\nMAXA = MAKSA\nMAXIFS = MAKS.JOS\nMEDIAN = MEDIAANI\nMIN = MIN\nMINA = MINA\nMINIFS = MIN.JOS\nMODE.MULT = MOODI.USEA\nMODE.SNGL = MOODI.YKSI\nNEGBINOM.DIST = BINOMI.JAKAUMA.NEG\nNORM.DIST = NORMAALI.JAKAUMA\nNORM.INV = NORMAALI.JAKAUMA.KÄÄNT\nNORM.S.DIST = NORM_JAKAUMA.NORMIT\nNORM.S.INV = NORM_JAKAUMA.KÄÄNT\nPEARSON = PEARSON\nPERCENTILE.EXC = PROSENTTIPISTE.ULK\nPERCENTILE.INC = PROSENTTIPISTE.SIS\nPERCENTRANK.EXC = PROSENTTIJÄRJESTYS.ULK\nPERCENTRANK.INC = PROSENTTIJÄRJESTYS.SIS\nPERMUT = PERMUTAATIO\nPERMUTATIONA = PERMUTAATIOA\nPHI = FII\nPOISSON.DIST = POISSON.JAKAUMA\nPROB = TODENNÄKÖISYYS\nQUARTILE.EXC = NELJÄNNES.ULK\nQUARTILE.INC = NELJÄNNES.SIS\nRANK.AVG = ARVON.MUKAAN.KESKIARVO\nRANK.EQ = ARVON.MUKAAN.TASAN\nRSQ = PEARSON.NELIÖ\nSKEW = JAKAUMAN.VINOUS\nSKEW.P = JAKAUMAN.VINOUS.POP\nSLOPE = KULMAKERROIN\nSMALL = PIENI\nSTANDARDIZE = NORMITA\nSTDEV.P = KESKIHAJONTA.P\nSTDEV.S = KESKIHAJONTA.S\nSTDEVA = KESKIHAJONTAA\nSTDEVPA = KESKIHAJONTAPA\nSTEYX = KESKIVIRHE\nT.DIST = T.JAKAUMA\nT.DIST.2T = T.JAKAUMA.2S\nT.DIST.RT = T.JAKAUMA.OH\nT.INV = T.KÄÄNT\nT.INV.2T = T.KÄÄNT.2S\nT.TEST = T.TESTI\nTREND = SUUNTAUS\nTRIMMEAN = KESKIARVO.TASATTU\nVAR.P = VAR.P\nVAR.S = VAR.S\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = WEIBULL.JAKAUMA\nZ.TEST = Z.TESTI\n\n##\n## Tekstifunktiot (Text Functions)\n##\nBAHTTEXT = BAHTTEKSTI\nCHAR = MERKKI\nCLEAN = SIIVOA\nCODE = KOODI\nCONCAT = YHDISTÄ\nDOLLAR = VALUUTTA\nEXACT = VERTAA\nFIND = ETSI\nFIXED = KIINTEÄ\nISTHAIDIGIT = ON.THAI.NUMERO\nLEFT = VASEN\nLEN = PITUUS\nLOWER = PIENET\nMID = POIMI.TEKSTI\nNUMBERSTRING = NROMERKKIJONO\nNUMBERVALUE = NROARVO\nPHONETIC = FONEETTINEN\nPROPER = ERISNIMI\nREPLACE = KORVAA\nREPT = TOISTA\nRIGHT = OIKEA\nSEARCH = KÄY.LÄPI\nSUBSTITUTE = VAIHDA\nT = T\nTEXT = TEKSTI\nTEXTJOIN = TEKSTI.YHDISTÄ\nTHAIDIGIT = THAI.NUMERO\nTHAINUMSOUND = THAI.LUKU.ÄÄNI\nTHAINUMSTRING = THAI.LUKU.MERKKIJONO\nTHAISTRINGLENGTH = THAI.MERKKIJONON.PITUUS\nTRIM = POISTA.VÄLIT\nUNICHAR = UNICODEMERKKI\nUNICODE = UNICODE\nUPPER = ISOT\nVALUE = ARVO\n\n##\n## Verkkofunktiot (Web Functions)\n##\nENCODEURL = URLKOODAUS\nFILTERXML = SUODATA.XML\nWEBSERVICE = VERKKOPALVELU\n\n##\n## Yhteensopivuusfunktiot (Compatibility Functions)\n##\nBETADIST = BEETAJAKAUMA\nBETAINV = BEETAJAKAUMA.KÄÄNT\nBINOMDIST = BINOMIJAKAUMA\nCEILING = PYÖRISTÄ.KERR.YLÖS\nCHIDIST = CHIJAKAUMA\nCHIINV = CHIJAKAUMA.KÄÄNT\nCHITEST = CHITESTI\nCONCATENATE = KETJUTA\nCONFIDENCE = LUOTTAMUSVÄLI\nCOVAR = KOVARIANSSI\nCRITBINOM = BINOMIJAKAUMA.KRIT\nEXPONDIST = EKSPONENTIAALIJAKAUMA\nFDIST = FJAKAUMA\nFINV = FJAKAUMA.KÄÄNT\nFLOOR = PYÖRISTÄ.KERR.ALAS\nFORECAST = ENNUSTE\nFTEST = FTESTI\nGAMMADIST = GAMMAJAKAUMA\nGAMMAINV = GAMMAJAKAUMA.KÄÄNT\nHYPGEOMDIST = HYPERGEOM.JAKAUMA\nLOGINV = LOGNORM.JAKAUMA.KÄÄNT\nLOGNORMDIST = LOGNORM.JAKAUMA\nMODE = MOODI\nNEGBINOMDIST = BINOMIJAKAUMA.NEG\nNORMDIST = NORM.JAKAUMA\nNORMINV = NORM.JAKAUMA.KÄÄNT\nNORMSDIST = NORM.JAKAUMA.NORMIT\nNORMSINV = NORM.JAKAUMA.NORMIT.KÄÄNT\nPERCENTILE = PROSENTTIPISTE\nPERCENTRANK = PROSENTTIJÄRJESTYS\nPOISSON = POISSON\nQUARTILE = NELJÄNNES\nRANK = ARVON.MUKAAN\nSTDEV = KESKIHAJONTA\nSTDEVP = KESKIHAJONTAP\nTDIST = TJAKAUMA\nTINV = TJAKAUMA.KÄÄNT\nTTEST = TTESTI\nVAR = VAR\nVARP = VARP\nWEIBULL = WEIBULL\nZTEST = ZTESTI\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/fr/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Français (French)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #NUL!\nDIV0\nVALUE = #VALEUR!\nREF\nNAME = #NOM?\nNUM = #NOMBRE!\nNA\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/fr/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Français (French)\n##\n############################################################\n\n\n##\n## Fonctions Cube (Cube Functions)\n##\nCUBEKPIMEMBER = MEMBREKPICUBE\nCUBEMEMBER = MEMBRECUBE\nCUBEMEMBERPROPERTY = PROPRIETEMEMBRECUBE\nCUBERANKEDMEMBER = RANGMEMBRECUBE\nCUBESET = JEUCUBE\nCUBESETCOUNT = NBJEUCUBE\nCUBEVALUE = VALEURCUBE\n\n##\n## Fonctions de base de données (Database Functions)\n##\nDAVERAGE = BDMOYENNE\nDCOUNT = BDNB\nDCOUNTA = BDNBVAL\nDGET = BDLIRE\nDMAX = BDMAX\nDMIN = BDMIN\nDPRODUCT = BDPRODUIT\nDSTDEV = BDECARTYPE\nDSTDEVP = BDECARTYPEP\nDSUM = BDSOMME\nDVAR = BDVAR\nDVARP = BDVARP\n\n##\n## Fonctions de date et d’heure (Date & Time Functions)\n##\nDATE = DATE\nDATEVALUE = DATEVAL\nDAY = JOUR\nDAYS = JOURS\nDAYS360 = JOURS360\nEDATE = MOIS.DECALER\nEOMONTH = FIN.MOIS\nHOUR = HEURE\nISOWEEKNUM = NO.SEMAINE.ISO\nMINUTE = MINUTE\nMONTH = MOIS\nNETWORKDAYS = NB.JOURS.OUVRES\nNETWORKDAYS.INTL = NB.JOURS.OUVRES.INTL\nNOW = MAINTENANT\nSECOND = SECONDE\nTIME = TEMPS\nTIMEVALUE = TEMPSVAL\nTODAY = AUJOURDHUI\nWEEKDAY = JOURSEM\nWEEKNUM = NO.SEMAINE\nWORKDAY = SERIE.JOUR.OUVRE\nWORKDAY.INTL = SERIE.JOUR.OUVRE.INTL\nYEAR = ANNEE\nYEARFRAC = FRACTION.ANNEE\n\n##\n## Fonctions d’ingénierie (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BINDEC\nBIN2HEX = BINHEX\nBIN2OCT = BINOCT\nBITAND = BITET\nBITLSHIFT = BITDECALG\nBITOR = BITOU\nBITRSHIFT = BITDECALD\nBITXOR = BITOUEXCLUSIF\nCOMPLEX = COMPLEXE\nCONVERT = CONVERT\nDEC2BIN = DECBIN\nDEC2HEX = DECHEX\nDEC2OCT = DECOCT\nDELTA = DELTA\nERF = ERF\nERF.PRECISE = ERF.PRECIS\nERFC = ERFC\nERFC.PRECISE = ERFC.PRECIS\nGESTEP = SUP.SEUIL\nHEX2BIN = HEXBIN\nHEX2DEC = HEXDEC\nHEX2OCT = HEXOCT\nIMABS = COMPLEXE.MODULE\nIMAGINARY = COMPLEXE.IMAGINAIRE\nIMARGUMENT = COMPLEXE.ARGUMENT\nIMCONJUGATE = COMPLEXE.CONJUGUE\nIMCOS = COMPLEXE.COS\nIMCOSH = COMPLEXE.COSH\nIMCOT = COMPLEXE.COT\nIMCSC = COMPLEXE.CSC\nIMCSCH = COMPLEXE.CSCH\nIMDIV = COMPLEXE.DIV\nIMEXP = COMPLEXE.EXP\nIMLN = COMPLEXE.LN\nIMLOG10 = COMPLEXE.LOG10\nIMLOG2 = COMPLEXE.LOG2\nIMPOWER = COMPLEXE.PUISSANCE\nIMPRODUCT = COMPLEXE.PRODUIT\nIMREAL = COMPLEXE.REEL\nIMSEC = COMPLEXE.SEC\nIMSECH = COMPLEXE.SECH\nIMSIN = COMPLEXE.SIN\nIMSINH = COMPLEXE.SINH\nIMSQRT = COMPLEXE.RACINE\nIMSUB = COMPLEXE.DIFFERENCE\nIMSUM = COMPLEXE.SOMME\nIMTAN = COMPLEXE.TAN\nOCT2BIN = OCTBIN\nOCT2DEC = OCTDEC\nOCT2HEX = OCTHEX\n\n##\n## Fonctions financières (Financial Functions)\n##\nACCRINT = INTERET.ACC\nACCRINTM = INTERET.ACC.MAT\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = NB.JOURS.COUPON.PREC\nCOUPDAYS = NB.JOURS.COUPONS\nCOUPDAYSNC = NB.JOURS.COUPON.SUIV\nCOUPNCD = DATE.COUPON.SUIV\nCOUPNUM = NB.COUPONS\nCOUPPCD = DATE.COUPON.PREC\nCUMIPMT = CUMUL.INTER\nCUMPRINC = CUMUL.PRINCPER\nDB = DB\nDDB = DDB\nDISC = TAUX.ESCOMPTE\nDOLLARDE = PRIX.DEC\nDOLLARFR = PRIX.FRAC\nDURATION = DUREE\nEFFECT = TAUX.EFFECTIF\nFV = VC\nFVSCHEDULE = VC.PAIEMENTS\nINTRATE = TAUX.INTERET\nIPMT = INTPER\nIRR = TRI\nISPMT = ISPMT\nMDURATION = DUREE.MODIFIEE\nMIRR = TRIM\nNOMINAL = TAUX.NOMINAL\nNPER = NPM\nNPV = VAN\nODDFPRICE = PRIX.PCOUPON.IRREG\nODDFYIELD = REND.PCOUPON.IRREG\nODDLPRICE = PRIX.DCOUPON.IRREG\nODDLYIELD = REND.DCOUPON.IRREG\nPDURATION = PDUREE\nPMT = VPM\nPPMT = PRINCPER\nPRICE = PRIX.TITRE\nPRICEDISC = VALEUR.ENCAISSEMENT\nPRICEMAT = PRIX.TITRE.ECHEANCE\nPV = VA\nRATE = TAUX\nRECEIVED = VALEUR.NOMINALE\nRRI = TAUX.INT.EQUIV\nSLN = AMORLIN\nSYD = SYD\nTBILLEQ = TAUX.ESCOMPTE.R\nTBILLPRICE = PRIX.BON.TRESOR\nTBILLYIELD = RENDEMENT.BON.TRESOR\nVDB = VDB\nXIRR = TRI.PAIEMENTS\nXNPV = VAN.PAIEMENTS\nYIELD = RENDEMENT.TITRE\nYIELDDISC = RENDEMENT.SIMPLE\nYIELDMAT = RENDEMENT.TITRE.ECHEANCE\n\n##\n## Fonctions d’information (Information Functions)\n##\nCELL = CELLULE\nERROR.TYPE = TYPE.ERREUR\nINFO = INFORMATIONS\nISBLANK = ESTVIDE\nISERR = ESTERR\nISERROR = ESTERREUR\nISEVEN = EST.PAIR\nISFORMULA = ESTFORMULE\nISLOGICAL = ESTLOGIQUE\nISNA = ESTNA\nISNONTEXT = ESTNONTEXTE\nISNUMBER = ESTNUM\nISODD = EST.IMPAIR\nISREF = ESTREF\nISTEXT = ESTTEXTE\nN = N\nNA = NA\nSHEET = FEUILLE\nSHEETS = FEUILLES\nTYPE = TYPE\n\n##\n## Fonctions logiques (Logical Functions)\n##\nAND = ET\nFALSE = FAUX\nIF = SI\nIFERROR = SIERREUR\nIFNA = SI.NON.DISP\nIFS = SI.CONDITIONS\nNOT = NON\nOR = OU\nSWITCH = SI.MULTIPLE\nTRUE = VRAI\nXOR = OUX\n\n##\n## Fonctions de recherche et de référence (Lookup & Reference Functions)\n##\nADDRESS = ADRESSE\nAREAS = ZONES\nCHOOSE = CHOISIR\nCOLUMN = COLONNE\nCOLUMNS = COLONNES\nFORMULATEXT = FORMULETEXTE\nGETPIVOTDATA = LIREDONNEESTABCROISDYNAMIQUE\nHLOOKUP = RECHERCHEH\nHYPERLINK = LIEN_HYPERTEXTE\nINDEX = INDEX\nINDIRECT = INDIRECT\nLOOKUP = RECHERCHE\nMATCH = EQUIV\nOFFSET = DECALER\nROW = LIGNE\nROWS = LIGNES\nRTD = RTD\nTRANSPOSE = TRANSPOSE\nVLOOKUP = RECHERCHEV\n*RC = LC\n\n##\n## Fonctions mathématiques et trigonométriques (Math & Trig Functions)\n##\nABS = ABS\nACOS = ACOS\nACOSH = ACOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = AGREGAT\nARABIC = CHIFFRE.ARABE\nASIN = ASIN\nASINH = ASINH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nBASE = BASE\nCEILING.MATH = PLAFOND.MATH\nCEILING.PRECISE = PLAFOND.PRECIS\nCOMBIN = COMBIN\nCOMBINA = COMBINA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = DECIMAL\nDEGREES = DEGRES\nECMA.CEILING = ECMA.PLAFOND\nEVEN = PAIR\nEXP = EXP\nFACT = FACT\nFACTDOUBLE = FACTDOUBLE\nFLOOR.MATH = PLANCHER.MATH\nFLOOR.PRECISE = PLANCHER.PRECIS\nGCD = PGCD\nINT = ENT\nISO.CEILING = ISO.PLAFOND\nLCM = PPCM\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = DETERMAT\nMINVERSE = INVERSEMAT\nMMULT = PRODUITMAT\nMOD = MOD\nMROUND = ARRONDI.AU.MULTIPLE\nMULTINOMIAL = MULTINOMIALE\nMUNIT = MATRICE.UNITAIRE\nODD = IMPAIR\nPI = PI\nPOWER = PUISSANCE\nPRODUCT = PRODUIT\nQUOTIENT = QUOTIENT\nRADIANS = RADIANS\nRAND = ALEA\nRANDBETWEEN = ALEA.ENTRE.BORNES\nROMAN = ROMAIN\nROUND = ARRONDI\nROUNDDOWN = ARRONDI.INF\nROUNDUP = ARRONDI.SUP\nSEC = SEC\nSECH = SECH\nSERIESSUM = SOMME.SERIES\nSIGN = SIGNE\nSIN = SIN\nSINH = SINH\nSQRT = RACINE\nSQRTPI = RACINE.PI\nSUBTOTAL = SOUS.TOTAL\nSUM = SOMME\nSUMIF = SOMME.SI\nSUMIFS = SOMME.SI.ENS\nSUMPRODUCT = SOMMEPROD\nSUMSQ = SOMME.CARRES\nSUMX2MY2 = SOMME.X2MY2\nSUMX2PY2 = SOMME.X2PY2\nSUMXMY2 = SOMME.XMY2\nTAN = TAN\nTANH = TANH\nTRUNC = TRONQUE\n\n##\n## Fonctions statistiques (Statistical Functions)\n##\nAVEDEV = ECART.MOYEN\nAVERAGE = MOYENNE\nAVERAGEA = AVERAGEA\nAVERAGEIF = MOYENNE.SI\nAVERAGEIFS = MOYENNE.SI.ENS\nBETA.DIST = LOI.BETA.N\nBETA.INV = BETA.INVERSE.N\nBINOM.DIST = LOI.BINOMIALE.N\nBINOM.DIST.RANGE = LOI.BINOMIALE.SERIE\nBINOM.INV = LOI.BINOMIALE.INVERSE\nCHISQ.DIST = LOI.KHIDEUX.N\nCHISQ.DIST.RT = LOI.KHIDEUX.DROITE\nCHISQ.INV = LOI.KHIDEUX.INVERSE\nCHISQ.INV.RT = LOI.KHIDEUX.INVERSE.DROITE\nCHISQ.TEST = CHISQ.TEST\nCONFIDENCE.NORM = INTERVALLE.CONFIANCE.NORMAL\nCONFIDENCE.T = INTERVALLE.CONFIANCE.STUDENT\nCORREL = COEFFICIENT.CORRELATION\nCOUNT = NB\nCOUNTA = NBVAL\nCOUNTBLANK = NB.VIDE\nCOUNTIF = NB.SI\nCOUNTIFS = NB.SI.ENS\nCOVARIANCE.P = COVARIANCE.PEARSON\nCOVARIANCE.S = COVARIANCE.STANDARD\nDEVSQ = SOMME.CARRES.ECARTS\nEXPON.DIST = LOI.EXPONENTIELLE.N\nF.DIST = LOI.F.N\nF.DIST.RT = LOI.F.DROITE\nF.INV = INVERSE.LOI.F.N\nF.INV.RT = INVERSE.LOI.F.DROITE\nF.TEST = F.TEST\nFISHER = FISHER\nFISHERINV = FISHER.INVERSE\nFORECAST.ETS = PREVISION.ETS\nFORECAST.ETS.CONFINT = PREVISION.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = PREVISION.ETS.CARACTERESAISONNIER\nFORECAST.ETS.STAT = PREVISION.ETS.STAT\nFORECAST.LINEAR = PREVISION.LINEAIRE\nFREQUENCY = FREQUENCE\nGAMMA = GAMMA\nGAMMA.DIST = LOI.GAMMA.N\nGAMMA.INV = LOI.GAMMA.INVERSE.N\nGAMMALN = LNGAMMA\nGAMMALN.PRECISE = LNGAMMA.PRECIS\nGAUSS = GAUSS\nGEOMEAN = MOYENNE.GEOMETRIQUE\nGROWTH = CROISSANCE\nHARMEAN = MOYENNE.HARMONIQUE\nHYPGEOM.DIST = LOI.HYPERGEOMETRIQUE.N\nINTERCEPT = ORDONNEE.ORIGINE\nKURT = KURTOSIS\nLARGE = GRANDE.VALEUR\nLINEST = DROITEREG\nLOGEST = LOGREG\nLOGNORM.DIST = LOI.LOGNORMALE.N\nLOGNORM.INV = LOI.LOGNORMALE.INVERSE.N\nMAX = MAX\nMAXA = MAXA\nMAXIFS = MAX.SI\nMEDIAN = MEDIANE\nMIN = MIN\nMINA = MINA\nMINIFS = MIN.SI\nMODE.MULT = MODE.MULTIPLE\nMODE.SNGL = MODE.SIMPLE\nNEGBINOM.DIST = LOI.BINOMIALE.NEG.N\nNORM.DIST = LOI.NORMALE.N\nNORM.INV = LOI.NORMALE.INVERSE.N\nNORM.S.DIST = LOI.NORMALE.STANDARD.N\nNORM.S.INV = LOI.NORMALE.STANDARD.INVERSE.N\nPEARSON = PEARSON\nPERCENTILE.EXC = CENTILE.EXCLURE\nPERCENTILE.INC = CENTILE.INCLURE\nPERCENTRANK.EXC = RANG.POURCENTAGE.EXCLURE\nPERCENTRANK.INC = RANG.POURCENTAGE.INCLURE\nPERMUT = PERMUTATION\nPERMUTATIONA = PERMUTATIONA\nPHI = PHI\nPOISSON.DIST = LOI.POISSON.N\nPROB = PROBABILITE\nQUARTILE.EXC = QUARTILE.EXCLURE\nQUARTILE.INC = QUARTILE.INCLURE\nRANK.AVG = MOYENNE.RANG\nRANK.EQ = EQUATION.RANG\nRSQ = COEFFICIENT.DETERMINATION\nSKEW = COEFFICIENT.ASYMETRIE\nSKEW.P = COEFFICIENT.ASYMETRIE.P\nSLOPE = PENTE\nSMALL = PETITE.VALEUR\nSTANDARDIZE = CENTREE.REDUITE\nSTDEV.P = ECARTYPE.PEARSON\nSTDEV.S = ECARTYPE.STANDARD\nSTDEVA = STDEVA\nSTDEVPA = STDEVPA\nSTEYX = ERREUR.TYPE.XY\nT.DIST = LOI.STUDENT.N\nT.DIST.2T = LOI.STUDENT.BILATERALE\nT.DIST.RT = LOI.STUDENT.DROITE\nT.INV = LOI.STUDENT.INVERSE.N\nT.INV.2T = LOI.STUDENT.INVERSE.BILATERALE\nT.TEST = T.TEST\nTREND = TENDANCE\nTRIMMEAN = MOYENNE.REDUITE\nVAR.P = VAR.P.N\nVAR.S = VAR.S\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = LOI.WEIBULL.N\nZ.TEST = Z.TEST\n\n##\n## Fonctions de texte (Text Functions)\n##\nBAHTTEXT = BAHTTEXT\nCHAR = CAR\nCLEAN = EPURAGE\nCODE = CODE\nCONCAT = CONCAT\nDOLLAR = DEVISE\nEXACT = EXACT\nFIND = TROUVE\nFIXED = CTXT\nLEFT = GAUCHE\nLEN = NBCAR\nLOWER = MINUSCULE\nMID = STXT\nNUMBERVALUE = VALEURNOMBRE\nPHONETIC = PHONETIQUE\nPROPER = NOMPROPRE\nREPLACE = REMPLACER\nREPT = REPT\nRIGHT = DROITE\nSEARCH = CHERCHE\nSUBSTITUTE = SUBSTITUE\nT = T\nTEXT = TEXTE\nTEXTJOIN = JOINDRE.TEXTE\nTRIM = SUPPRESPACE\nUNICHAR = UNICAR\nUNICODE = UNICODE\nUPPER = MAJUSCULE\nVALUE = CNUM\n\n##\n## Fonctions web (Web Functions)\n##\nENCODEURL = URLENCODAGE\nFILTERXML = FILTRE.XML\nWEBSERVICE = SERVICEWEB\n\n##\n## Fonctions de compatibilité (Compatibility Functions)\n##\nBETADIST = LOI.BETA\nBETAINV = BETA.INVERSE\nBINOMDIST = LOI.BINOMIALE\nCEILING = PLAFOND\nCHIDIST = LOI.KHIDEUX\nCHIINV = KHIDEUX.INVERSE\nCHITEST = TEST.KHIDEUX\nCONCATENATE = CONCATENER\nCONFIDENCE = INTERVALLE.CONFIANCE\nCOVAR = COVARIANCE\nCRITBINOM = CRITERE.LOI.BINOMIALE\nEXPONDIST = LOI.EXPONENTIELLE\nFDIST = LOI.F\nFINV = INVERSE.LOI.F\nFLOOR = PLANCHER\nFORECAST = PREVISION\nFTEST = TEST.F\nGAMMADIST = LOI.GAMMA\nGAMMAINV = LOI.GAMMA.INVERSE\nHYPGEOMDIST = LOI.HYPERGEOMETRIQUE\nLOGINV = LOI.LOGNORMALE.INVERSE\nLOGNORMDIST = LOI.LOGNORMALE\nMODE = MODE\nNEGBINOMDIST = LOI.BINOMIALE.NEG\nNORMDIST = LOI.NORMALE\nNORMINV = LOI.NORMALE.INVERSE\nNORMSDIST = LOI.NORMALE.STANDARD\nNORMSINV = LOI.NORMALE.STANDARD.INVERSE\nPERCENTILE = CENTILE\nPERCENTRANK = RANG.POURCENTAGE\nPOISSON = LOI.POISSON\nQUARTILE = QUARTILE\nRANK = RANG\nSTDEV = ECARTYPE\nSTDEVP = ECARTYPEP\nTDIST = LOI.STUDENT\nTINV = LOI.STUDENT.INVERSE\nTTEST = TEST.STUDENT\nVAR = VAR\nVARP = VAR.P\nWEIBULL = LOI.WEIBULL\nZTEST = TEST.Z\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/hu/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Magyar (Hungarian)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #NULLA!\nDIV0 = #ZÉRÓOSZTÓ!\nVALUE = #ÉRTÉK!\nREF = #HIV!\nNAME = #NÉV?\nNUM = #SZÁM!\nNA = #HIÁNYZIK\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/hu/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Magyar (Hungarian)\n##\n############################################################\n\n\n##\n## Kockafüggvények (Cube Functions)\n##\nCUBEKPIMEMBER = KOCKA.FŐTELJMUT\nCUBEMEMBER = KOCKA.TAG\nCUBEMEMBERPROPERTY = KOCKA.TAG.TUL\nCUBERANKEDMEMBER = KOCKA.HALM.ELEM\nCUBESET = KOCKA.HALM\nCUBESETCOUNT = KOCKA.HALM.DB\nCUBEVALUE = KOCKA.ÉRTÉK\n\n##\n## Adatbázis-kezelő függvények (Database Functions)\n##\nDAVERAGE = AB.ÁTLAG\nDCOUNT = AB.DARAB\nDCOUNTA = AB.DARAB2\nDGET = AB.MEZŐ\nDMAX = AB.MAX\nDMIN = AB.MIN\nDPRODUCT = AB.SZORZAT\nDSTDEV = AB.SZÓRÁS\nDSTDEVP = AB.SZÓRÁS2\nDSUM = AB.SZUM\nDVAR = AB.VAR\nDVARP = AB.VAR2\n\n##\n## Dátumfüggvények (Date & Time Functions)\n##\nDATE = DÁTUM\nDATEDIF = DÁTUMTÓLIG\nDATESTRING = DÁTUMSZÖVEG\nDATEVALUE = DÁTUMÉRTÉK\nDAY = NAP\nDAYS = NAPOK\nDAYS360 = NAP360\nEDATE = KALK.DÁTUM\nEOMONTH = HÓNAP.UTOLSÓ.NAP\nHOUR = ÓRA\nISOWEEKNUM = ISO.HÉT.SZÁMA\nMINUTE = PERCEK\nMONTH = HÓNAP\nNETWORKDAYS = ÖSSZ.MUNKANAP\nNETWORKDAYS.INTL = ÖSSZ.MUNKANAP.INTL\nNOW = MOST\nSECOND = MPERC\nTHAIDAYOFWEEK = THAIHÉTNAPJA\nTHAIMONTHOFYEAR = THAIHÓNAP\nTHAIYEAR = THAIÉV\nTIME = IDŐ\nTIMEVALUE = IDŐÉRTÉK\nTODAY = MA\nWEEKDAY = HÉT.NAPJA\nWEEKNUM = HÉT.SZÁMA\nWORKDAY = KALK.MUNKANAP\nWORKDAY.INTL = KALK.MUNKANAP.INTL\nYEAR = ÉV\nYEARFRAC = TÖRTÉV\n\n##\n## Mérnöki függvények (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BIN.DEC\nBIN2HEX = BIN.HEX\nBIN2OCT = BIN.OKT\nBITAND = BIT.ÉS\nBITLSHIFT = BIT.BAL.ELTOL\nBITOR = BIT.VAGY\nBITRSHIFT = BIT.JOBB.ELTOL\nBITXOR = BIT.XVAGY\nCOMPLEX = KOMPLEX\nCONVERT = KONVERTÁLÁS\nDEC2BIN = DEC.BIN\nDEC2HEX = DEC.HEX\nDEC2OCT = DEC.OKT\nDELTA = DELTA\nERF = HIBAF\nERF.PRECISE = HIBAF.PONTOS\nERFC = HIBAF.KOMPLEMENTER\nERFC.PRECISE = HIBAFKOMPLEMENTER.PONTOS\nGESTEP = KÜSZÖBNÉL.NAGYOBB\nHEX2BIN = HEX.BIN\nHEX2DEC = HEX.DEC\nHEX2OCT = HEX.OKT\nIMABS = KÉPZ.ABSZ\nIMAGINARY = KÉPZETES\nIMARGUMENT = KÉPZ.ARGUMENT\nIMCONJUGATE = KÉPZ.KONJUGÁLT\nIMCOS = KÉPZ.COS\nIMCOSH = KÉPZ.COSH\nIMCOT = KÉPZ.COT\nIMCSC = KÉPZ.CSC\nIMCSCH = KÉPZ.CSCH\nIMDIV = KÉPZ.HÁNYAD\nIMEXP = KÉPZ.EXP\nIMLN = KÉPZ.LN\nIMLOG10 = KÉPZ.LOG10\nIMLOG2 = KÉPZ.LOG2\nIMPOWER = KÉPZ.HATV\nIMPRODUCT = KÉPZ.SZORZAT\nIMREAL = KÉPZ.VALÓS\nIMSEC = KÉPZ.SEC\nIMSECH = KÉPZ.SECH\nIMSIN = KÉPZ.SIN\nIMSINH = KÉPZ.SINH\nIMSQRT = KÉPZ.GYÖK\nIMSUB = KÉPZ.KÜL\nIMSUM = KÉPZ.ÖSSZEG\nIMTAN = KÉPZ.TAN\nOCT2BIN = OKT.BIN\nOCT2DEC = OKT.DEC\nOCT2HEX = OKT.HEX\n\n##\n## Pénzügyi függvények (Financial Functions)\n##\nACCRINT = IDŐSZAKI.KAMAT\nACCRINTM = LEJÁRATI.KAMAT\nAMORDEGRC = ÉRTÉKCSÖKK.TÉNYEZŐVEL\nAMORLINC = ÉRTÉKCSÖKK\nCOUPDAYBS = SZELVÉNYIDŐ.KEZDETTŐL\nCOUPDAYS = SZELVÉNYIDŐ\nCOUPDAYSNC = SZELVÉNYIDŐ.KIFIZETÉSTŐL\nCOUPNCD = ELSŐ.SZELVÉNYDÁTUM\nCOUPNUM = SZELVÉNYSZÁM\nCOUPPCD = UTOLSÓ.SZELVÉNYDÁTUM\nCUMIPMT = ÖSSZES.KAMAT\nCUMPRINC = ÖSSZES.TŐKERÉSZ\nDB = KCS2\nDDB = KCSA\nDISC = LESZÁM\nDOLLARDE = FORINT.DEC\nDOLLARFR = FORINT.TÖRT\nDURATION = KAMATÉRZ\nEFFECT = TÉNYLEGES\nFV = JBÉ\nFVSCHEDULE = KJÉ\nINTRATE = KAMATRÁTA\nIPMT = RRÉSZLET\nIRR = BMR\nISPMT = LRÉSZLETKAMAT\nMDURATION = MKAMATÉRZ\nMIRR = MEGTÉRÜLÉS\nNOMINAL = NÉVLEGES\nNPER = PER.SZÁM\nNPV = NMÉ\nODDFPRICE = ELTÉRŐ.EÁR\nODDFYIELD = ELTÉRŐ.EHOZAM\nODDLPRICE = ELTÉRŐ.UÁR\nODDLYIELD = ELTÉRŐ.UHOZAM\nPDURATION = KAMATÉRZ.PER\nPMT = RÉSZLET\nPPMT = PRÉSZLET\nPRICE = ÁR\nPRICEDISC = ÁR.LESZÁM\nPRICEMAT = ÁR.LEJÁRAT\nPV = MÉ\nRATE = RÁTA\nRECEIVED = KAPOTT\nRRI = MR\nSLN = LCSA\nSYD = ÉSZÖ\nTBILLEQ = KJEGY.EGYENÉRT\nTBILLPRICE = KJEGY.ÁR\nTBILLYIELD = KJEGY.HOZAM\nVDB = ÉCSRI\nXIRR = XBMR\nXNPV = XNJÉ\nYIELD = HOZAM\nYIELDDISC = HOZAM.LESZÁM\nYIELDMAT = HOZAM.LEJÁRAT\n\n##\n## Információs függvények (Information Functions)\n##\nCELL = CELLA\nERROR.TYPE = HIBA.TÍPUS\nINFO = INFÓ\nISBLANK = ÜRES\nISERR = HIBA.E\nISERROR = HIBÁS\nISEVEN = PÁROSE\nISFORMULA = KÉPLET\nISLOGICAL = LOGIKAI\nISNA = NINCS\nISNONTEXT = NEM.SZÖVEG\nISNUMBER = SZÁM\nISODD = PÁRATLANE\nISREF = HIVATKOZÁS\nISTEXT = SZÖVEG.E\nN = S\nNA = HIÁNYZIK\nSHEET = LAP\nSHEETS = LAPOK\nTYPE = TÍPUS\n\n##\n## Logikai függvények (Logical Functions)\n##\nAND = ÉS\nFALSE = HAMIS\nIF = HA\nIFERROR = HAHIBA\nIFNA = HAHIÁNYZIK\nIFS = HAELSŐIGAZ\nNOT = NEM\nOR = VAGY\nSWITCH = ÁTVÁLT\nTRUE = IGAZ\nXOR = XVAGY\n\n##\n## Keresési és hivatkozási függvények (Lookup & Reference Functions)\n##\nADDRESS = CÍM\nAREAS = TERÜLET\nCHOOSE = VÁLASZT\nCOLUMN = OSZLOP\nCOLUMNS = OSZLOPOK\nFORMULATEXT = KÉPLETSZÖVEG\nGETPIVOTDATA = KIMUTATÁSADATOT.VESZ\nHLOOKUP = VKERES\nHYPERLINK = HIPERHIVATKOZÁS\nINDEX = INDEX\nINDIRECT = INDIREKT\nLOOKUP = KERES\nMATCH = HOL.VAN\nOFFSET = ELTOLÁS\nROW = SOR\nROWS = SOROK\nRTD = VIA\nTRANSPOSE = TRANSZPONÁLÁS\nVLOOKUP = FKERES\n*RC = SO\n\n##\n## Matematikai és trigonometrikus függvények (Math & Trig Functions)\n##\nABS = ABS\nACOS = ARCCOS\nACOSH = ACOSH\nACOT = ARCCOT\nACOTH = ARCCOTH\nAGGREGATE = ÖSSZESÍT\nARABIC = ARAB\nASIN = ARCSIN\nASINH = ASINH\nATAN = ARCTAN\nATAN2 = ARCTAN2\nATANH = ATANH\nBASE = ALAP\nCEILING.MATH = PLAFON.MAT\nCEILING.PRECISE = PLAFON.PONTOS\nCOMBIN = KOMBINÁCIÓK\nCOMBINA = KOMBINÁCIÓK.ISM\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = TIZEDES\nDEGREES = FOK\nECMA.CEILING = ECMA.PLAFON\nEVEN = PÁROS\nEXP = KITEVŐ\nFACT = FAKT\nFACTDOUBLE = FAKTDUPLA\nFLOOR.MATH = PADLÓ.MAT\nFLOOR.PRECISE = PADLÓ.PONTOS\nGCD = LKO\nINT = INT\nISO.CEILING = ISO.PLAFON\nLCM = LKT\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MDETERM\nMINVERSE = INVERZ.MÁTRIX\nMMULT = MSZORZAT\nMOD = MARADÉK\nMROUND = TÖBBSZ.KEREKÍT\nMULTINOMIAL = SZORHÁNYFAKT\nMUNIT = MMÁTRIX\nODD = PÁRATLAN\nPI = PI\nPOWER = HATVÁNY\nPRODUCT = SZORZAT\nQUOTIENT = KVÓCIENS\nRADIANS = RADIÁN\nRAND = VÉL\nRANDBETWEEN = VÉLETLEN.KÖZÖTT\nROMAN = RÓMAI\nROUND = KEREKÍTÉS\nROUNDBAHTDOWN = BAHTKEREK.LE\nROUNDBAHTUP = BAHTKEREK.FEL\nROUNDDOWN = KEREK.LE\nROUNDUP = KEREK.FEL\nSEC = SEC\nSECH = SECH\nSERIESSUM = SORÖSSZEG\nSIGN = ELŐJEL\nSIN = SIN\nSINH = SINH\nSQRT = GYÖK\nSQRTPI = GYÖKPI\nSUBTOTAL = RÉSZÖSSZEG\nSUM = SZUM\nSUMIF = SZUMHA\nSUMIFS = SZUMHATÖBB\nSUMPRODUCT = SZORZATÖSSZEG\nSUMSQ = NÉGYZETÖSSZEG\nSUMX2MY2 = SZUMX2BŐLY2\nSUMX2PY2 = SZUMX2MEGY2\nSUMXMY2 = SZUMXBŐLY2\nTAN = TAN\nTANH = TANH\nTRUNC = CSONK\n\n##\n## Statisztikai függvények (Statistical Functions)\n##\nAVEDEV = ÁTL.ELTÉRÉS\nAVERAGE = ÁTLAG\nAVERAGEA = ÁTLAGA\nAVERAGEIF = ÁTLAGHA\nAVERAGEIFS = ÁTLAGHATÖBB\nBETA.DIST = BÉTA.ELOSZL\nBETA.INV = BÉTA.INVERZ\nBINOM.DIST = BINOM.ELOSZL\nBINOM.DIST.RANGE = BINOM.ELOSZL.TART\nBINOM.INV = BINOM.INVERZ\nCHISQ.DIST = KHINÉGYZET.ELOSZLÁS\nCHISQ.DIST.RT = KHINÉGYZET.ELOSZLÁS.JOBB\nCHISQ.INV = KHINÉGYZET.INVERZ\nCHISQ.INV.RT = KHINÉGYZET.INVERZ.JOBB\nCHISQ.TEST = KHINÉGYZET.PRÓBA\nCONFIDENCE.NORM = MEGBÍZHATÓSÁG.NORM\nCONFIDENCE.T = MEGBÍZHATÓSÁG.T\nCORREL = KORREL\nCOUNT = DARAB\nCOUNTA = DARAB2\nCOUNTBLANK = DARABÜRES\nCOUNTIF = DARABTELI\nCOUNTIFS = DARABHATÖBB\nCOVARIANCE.P = KOVARIANCIA.S\nCOVARIANCE.S = KOVARIANCIA.M\nDEVSQ = SQ\nEXPON.DIST = EXP.ELOSZL\nF.DIST = F.ELOSZL\nF.DIST.RT = F.ELOSZLÁS.JOBB\nF.INV = F.INVERZ\nF.INV.RT = F.INVERZ.JOBB\nF.TEST = F.PRÓB\nFISHER = FISHER\nFISHERINV = INVERZ.FISHER\nFORECAST.ETS = ELŐREJELZÉS.ESIM\nFORECAST.ETS.CONFINT = ELŐREJELZÉS.ESIM.KONFINT\nFORECAST.ETS.SEASONALITY = ELŐREJELZÉS.ESIM.SZEZONALITÁS\nFORECAST.ETS.STAT = ELŐREJELZÉS.ESIM.STAT\nFORECAST.LINEAR = ELŐREJELZÉS.LINEÁRIS\nFREQUENCY = GYAKORISÁG\nGAMMA = GAMMA\nGAMMA.DIST = GAMMA.ELOSZL\nGAMMA.INV = GAMMA.INVERZ\nGAMMALN = GAMMALN\nGAMMALN.PRECISE = GAMMALN.PONTOS\nGAUSS = GAUSS\nGEOMEAN = MÉRTANI.KÖZÉP\nGROWTH = NÖV\nHARMEAN = HARM.KÖZÉP\nHYPGEOM.DIST = HIPGEOM.ELOSZLÁS\nINTERCEPT = METSZ\nKURT = CSÚCSOSSÁG\nLARGE = NAGY\nLINEST = LIN.ILL\nLOGEST = LOG.ILL\nLOGNORM.DIST = LOGNORM.ELOSZLÁS\nLOGNORM.INV = LOGNORM.INVERZ\nMAX = MAX\nMAXA = MAXA\nMAXIFS = MAXHA\nMEDIAN = MEDIÁN\nMIN = MIN\nMINA = MIN2\nMINIFS = MINHA\nMODE.MULT = MÓDUSZ.TÖBB\nMODE.SNGL = MÓDUSZ.EGY\nNEGBINOM.DIST = NEGBINOM.ELOSZLÁS\nNORM.DIST = NORM.ELOSZLÁS\nNORM.INV = NORM.INVERZ\nNORM.S.DIST = NORM.S.ELOSZLÁS\nNORM.S.INV = NORM.S.INVERZ\nPEARSON = PEARSON\nPERCENTILE.EXC = PERCENTILIS.KIZÁR\nPERCENTILE.INC = PERCENTILIS.TARTALMAZ\nPERCENTRANK.EXC = SZÁZALÉKRANG.KIZÁR\nPERCENTRANK.INC = SZÁZALÉKRANG.TARTALMAZ\nPERMUT = VARIÁCIÓK\nPERMUTATIONA = VARIÁCIÓK.ISM\nPHI = FI\nPOISSON.DIST = POISSON.ELOSZLÁS\nPROB = VALÓSZÍNŰSÉG\nQUARTILE.EXC = KVARTILIS.KIZÁR\nQUARTILE.INC = KVARTILIS.TARTALMAZ\nRANK.AVG = RANG.ÁTL\nRANK.EQ = RANG.EGY\nRSQ = RNÉGYZET\nSKEW = FERDESÉG\nSKEW.P = FERDESÉG.P\nSLOPE = MEREDEKSÉG\nSMALL = KICSI\nSTANDARDIZE = NORMALIZÁLÁS\nSTDEV.P = SZÓR.S\nSTDEV.S = SZÓR.M\nSTDEVA = SZÓRÁSA\nSTDEVPA = SZÓRÁSPA\nSTEYX = STHIBAYX\nT.DIST = T.ELOSZL\nT.DIST.2T = T.ELOSZLÁS.2SZ\nT.DIST.RT = T.ELOSZLÁS.JOBB\nT.INV = T.INVERZ\nT.INV.2T = T.INVERZ.2SZ\nT.TEST = T.PRÓB\nTREND = TREND\nTRIMMEAN = RÉSZÁTLAG\nVAR.P = VAR.S\nVAR.S = VAR.M\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = WEIBULL.ELOSZLÁS\nZ.TEST = Z.PRÓB\n\n##\n## Szövegműveletekhez használható függvények (Text Functions)\n##\nBAHTTEXT = BAHTSZÖVEG\nCHAR = KARAKTER\nCLEAN = TISZTÍT\nCODE = KÓD\nCONCAT = FŰZ\nDOLLAR = FORINT\nEXACT = AZONOS\nFIND = SZÖVEG.TALÁL\nFIXED = FIX\nISTHAIDIGIT = ON.THAI.NUMERO\nLEFT = BAL\nLEN = HOSSZ\nLOWER = KISBETŰ\nMID = KÖZÉP\nNUMBERSTRING = SZÁM.BETŰVEL\nNUMBERVALUE = SZÁMÉRTÉK\nPHONETIC = FONETIKUS\nPROPER = TNÉV\nREPLACE = CSERE\nREPT = SOKSZOR\nRIGHT = JOBB\nSEARCH = SZÖVEG.KERES\nSUBSTITUTE = HELYETTE\nT = T\nTEXT = SZÖVEG\nTEXTJOIN = SZÖVEGÖSSZEFŰZÉS\nTHAIDIGIT = THAISZÁM\nTHAINUMSOUND = THAISZÁMHANG\nTHAINUMSTRING = THAISZÁMKAR\nTHAISTRINGLENGTH = THAIKARHOSSZ\nTRIM = KIMETSZ\nUNICHAR = UNIKARAKTER\nUNICODE = UNICODE\nUPPER = NAGYBETŰS\nVALUE = ÉRTÉK\n\n##\n## Webes függvények (Web Functions)\n##\nENCODEURL = URL.KÓDOL\nFILTERXML = XMLSZŰRÉS\nWEBSERVICE = WEBSZOLGÁLTATÁS\n\n##\n## Kompatibilitási függvények (Compatibility Functions)\n##\nBETADIST = BÉTA.ELOSZLÁS\nBETAINV = INVERZ.BÉTA\nBINOMDIST = BINOM.ELOSZLÁS\nCEILING = PLAFON\nCHIDIST = KHI.ELOSZLÁS\nCHIINV = INVERZ.KHI\nCHITEST = KHI.PRÓBA\nCONCATENATE = ÖSSZEFŰZ\nCONFIDENCE = MEGBÍZHATÓSÁG\nCOVAR = KOVAR\nCRITBINOM = KRITBINOM\nEXPONDIST = EXP.ELOSZLÁS\nFDIST = F.ELOSZLÁS\nFINV = INVERZ.F\nFLOOR = PADLÓ\nFORECAST = ELŐREJELZÉS\nFTEST = F.PRÓBA\nGAMMADIST = GAMMA.ELOSZLÁS\nGAMMAINV = INVERZ.GAMMA\nHYPGEOMDIST = HIPERGEOM.ELOSZLÁS\nLOGINV = INVERZ.LOG.ELOSZLÁS\nLOGNORMDIST = LOG.ELOSZLÁS\nMODE = MÓDUSZ\nNEGBINOMDIST = NEGBINOM.ELOSZL\nNORMDIST = NORM.ELOSZL\nNORMINV = INVERZ.NORM\nNORMSDIST = STNORMELOSZL\nNORMSINV = INVERZ.STNORM\nPERCENTILE = PERCENTILIS\nPERCENTRANK = SZÁZALÉKRANG\nPOISSON = POISSON\nQUARTILE = KVARTILIS\nRANK = SORSZÁM\nSTDEV = SZÓRÁS\nSTDEVP = SZÓRÁSP\nTDIST = T.ELOSZLÁS\nTINV = INVERZ.T\nTTEST = T.PRÓBA\nVAR = VAR\nVARP = VARP\nWEIBULL = WEIBULL\nZTEST = Z.PRÓBA\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/it/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Italiano (Italian)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL\nDIV0\nVALUE = #VALORE!\nREF = #RIF!\nNAME = #NOME?\nNUM\nNA = #N/D\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/it/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Italiano (Italian)\n##\n############################################################\n\n\n##\n## Funzioni cubo (Cube Functions)\n##\nCUBEKPIMEMBER = MEMBRO.KPI.CUBO\nCUBEMEMBER = MEMBRO.CUBO\nCUBEMEMBERPROPERTY = PROPRIETÀ.MEMBRO.CUBO\nCUBERANKEDMEMBER = MEMBRO.CUBO.CON.RANGO\nCUBESET = SET.CUBO\nCUBESETCOUNT = CONTA.SET.CUBO\nCUBEVALUE = VALORE.CUBO\n\n##\n## Funzioni di database (Database Functions)\n##\nDAVERAGE = DB.MEDIA\nDCOUNT = DB.CONTA.NUMERI\nDCOUNTA = DB.CONTA.VALORI\nDGET = DB.VALORI\nDMAX = DB.MAX\nDMIN = DB.MIN\nDPRODUCT = DB.PRODOTTO\nDSTDEV = DB.DEV.ST\nDSTDEVP = DB.DEV.ST.POP\nDSUM = DB.SOMMA\nDVAR = DB.VAR\nDVARP = DB.VAR.POP\n\n##\n## Funzioni data e ora (Date & Time Functions)\n##\nDATE = DATA\nDATEDIF = DATA.DIFF\nDATESTRING = DATA.STRINGA\nDATEVALUE = DATA.VALORE\nDAY = GIORNO\nDAYS = GIORNI\nDAYS360 = GIORNO360\nEDATE = DATA.MESE\nEOMONTH = FINE.MESE\nHOUR = ORA\nISOWEEKNUM = NUM.SETTIMANA.ISO\nMINUTE = MINUTO\nMONTH = MESE\nNETWORKDAYS = GIORNI.LAVORATIVI.TOT\nNETWORKDAYS.INTL = GIORNI.LAVORATIVI.TOT.INTL\nNOW = ADESSO\nSECOND = SECONDO\nTHAIDAYOFWEEK = THAIGIORNODELLASETTIMANA\nTHAIMONTHOFYEAR = THAIMESEDELLANNO\nTHAIYEAR = THAIANNO\nTIME = ORARIO\nTIMEVALUE = ORARIO.VALORE\nTODAY = OGGI\nWEEKDAY = GIORNO.SETTIMANA\nWEEKNUM = NUM.SETTIMANA\nWORKDAY = GIORNO.LAVORATIVO\nWORKDAY.INTL = GIORNO.LAVORATIVO.INTL\nYEAR = ANNO\nYEARFRAC = FRAZIONE.ANNO\n\n##\n## Funzioni ingegneristiche (Engineering Functions)\n##\nBESSELI = BESSEL.I\nBESSELJ = BESSEL.J\nBESSELK = BESSEL.K\nBESSELY = BESSEL.Y\nBIN2DEC = BINARIO.DECIMALE\nBIN2HEX = BINARIO.HEX\nBIN2OCT = BINARIO.OCT\nBITAND = BITAND\nBITLSHIFT = BIT.SPOSTA.SX\nBITOR = BITOR\nBITRSHIFT = BIT.SPOSTA.DX\nBITXOR = BITXOR\nCOMPLEX = COMPLESSO\nCONVERT = CONVERTI\nDEC2BIN = DECIMALE.BINARIO\nDEC2HEX = DECIMALE.HEX\nDEC2OCT = DECIMALE.OCT\nDELTA = DELTA\nERF = FUNZ.ERRORE\nERF.PRECISE = FUNZ.ERRORE.PRECISA\nERFC = FUNZ.ERRORE.COMP\nERFC.PRECISE = FUNZ.ERRORE.COMP.PRECISA\nGESTEP = SOGLIA\nHEX2BIN = HEX.BINARIO\nHEX2DEC = HEX.DECIMALE\nHEX2OCT = HEX.OCT\nIMABS = COMP.MODULO\nIMAGINARY = COMP.IMMAGINARIO\nIMARGUMENT = COMP.ARGOMENTO\nIMCONJUGATE = COMP.CONIUGATO\nIMCOS = COMP.COS\nIMCOSH = COMP.COSH\nIMCOT = COMP.COT\nIMCSC = COMP.CSC\nIMCSCH = COMP.CSCH\nIMDIV = COMP.DIV\nIMEXP = COMP.EXP\nIMLN = COMP.LN\nIMLOG10 = COMP.LOG10\nIMLOG2 = COMP.LOG2\nIMPOWER = COMP.POTENZA\nIMPRODUCT = COMP.PRODOTTO\nIMREAL = COMP.PARTE.REALE\nIMSEC = COMP.SEC\nIMSECH = COMP.SECH\nIMSIN = COMP.SEN\nIMSINH = COMP.SENH\nIMSQRT = COMP.RADQ\nIMSUB = COMP.DIFF\nIMSUM = COMP.SOMMA\nIMTAN = COMP.TAN\nOCT2BIN = OCT.BINARIO\nOCT2DEC = OCT.DECIMALE\nOCT2HEX = OCT.HEX\n\n##\n## Funzioni finanziarie (Financial Functions)\n##\nACCRINT = INT.MATURATO.PER\nACCRINTM = INT.MATURATO.SCAD\nAMORDEGRC = AMMORT.DEGR\nAMORLINC = AMMORT.PER\nCOUPDAYBS = GIORNI.CED.INIZ.LIQ\nCOUPDAYS = GIORNI.CED\nCOUPDAYSNC = GIORNI.CED.NUOVA\nCOUPNCD = DATA.CED.SUCC\nCOUPNUM = NUM.CED\nCOUPPCD = DATA.CED.PREC\nCUMIPMT = INT.CUMUL\nCUMPRINC = CAP.CUM\nDB = AMMORT.FISSO\nDDB = AMMORT\nDISC = TASSO.SCONTO\nDOLLARDE = VALUTA.DEC\nDOLLARFR = VALUTA.FRAZ\nDURATION = DURATA\nEFFECT = EFFETTIVO\nFV = VAL.FUT\nFVSCHEDULE = VAL.FUT.CAPITALE\nINTRATE = TASSO.INT\nIPMT = INTERESSI\nIRR = TIR.COST\nISPMT = INTERESSE.RATA\nMDURATION = DURATA.M\nMIRR = TIR.VAR\nNOMINAL = NOMINALE\nNPER = NUM.RATE\nNPV = VAN\nODDFPRICE = PREZZO.PRIMO.IRR\nODDFYIELD = REND.PRIMO.IRR\nODDLPRICE = PREZZO.ULTIMO.IRR\nODDLYIELD = REND.ULTIMO.IRR\nPDURATION = DURATA.P\nPMT = RATA\nPPMT = P.RATA\nPRICE = PREZZO\nPRICEDISC = PREZZO.SCONT\nPRICEMAT = PREZZO.SCAD\nPV = VA\nRATE = TASSO\nRECEIVED = RICEV.SCAD\nRRI = RIT.INVEST.EFFETT\nSLN = AMMORT.COST\nSYD = AMMORT.ANNUO\nTBILLEQ = BOT.EQUIV\nTBILLPRICE = BOT.PREZZO\nTBILLYIELD = BOT.REND\nVDB = AMMORT.VAR\nXIRR = TIR.X\nXNPV = VAN.X\nYIELD = REND\nYIELDDISC = REND.TITOLI.SCONT\nYIELDMAT = REND.SCAD\n\n##\n## Funzioni relative alle informazioni (Information Functions)\n##\nCELL = CELLA\nERROR.TYPE = ERRORE.TIPO\nINFO = AMBIENTE.INFO\nISBLANK = VAL.VUOTO\nISERR = VAL.ERR\nISERROR = VAL.ERRORE\nISEVEN = VAL.PARI\nISFORMULA = VAL.FORMULA\nISLOGICAL = VAL.LOGICO\nISNA = VAL.NON.DISP\nISNONTEXT = VAL.NON.TESTO\nISNUMBER = VAL.NUMERO\nISODD = VAL.DISPARI\nISREF = VAL.RIF\nISTEXT = VAL.TESTO\nN = NUM\nNA = NON.DISP\nSHEET = FOGLIO\nSHEETS = FOGLI\nTYPE = TIPO\n\n##\n## Funzioni logiche (Logical Functions)\n##\nAND = E\nFALSE = FALSO\nIF = SE\nIFERROR = SE.ERRORE\nIFNA = SE.NON.DISP.\nIFS = PIÙ.SE\nNOT = NON\nOR = O\nSWITCH = SWITCH\nTRUE = VERO\nXOR = XOR\n\n##\n## Funzioni di ricerca e di riferimento (Lookup & Reference Functions)\n##\nADDRESS = INDIRIZZO\nAREAS = AREE\nCHOOSE = SCEGLI\nCOLUMN = RIF.COLONNA\nCOLUMNS = COLONNE\nFORMULATEXT = TESTO.FORMULA\nGETPIVOTDATA = INFO.DATI.TAB.PIVOT\nHLOOKUP = CERCA.ORIZZ\nHYPERLINK = COLLEG.IPERTESTUALE\nINDEX = INDICE\nINDIRECT = INDIRETTO\nLOOKUP = CERCA\nMATCH = CONFRONTA\nOFFSET = SCARTO\nROW = RIF.RIGA\nROWS = RIGHE\nRTD = DATITEMPOREALE\nTRANSPOSE = MATR.TRASPOSTA\nVLOOKUP = CERCA.VERT\n\n##\n## Funzioni matematiche e trigonometriche (Math & Trig Functions)\n##\nABS = ASS\nACOS = ARCCOS\nACOSH = ARCCOSH\nACOT = ARCCOT\nACOTH = ARCCOTH\nAGGREGATE = AGGREGA\nARABIC = ARABO\nASIN = ARCSEN\nASINH = ARCSENH\nATAN = ARCTAN\nATAN2 = ARCTAN.2\nATANH = ARCTANH\nBASE = BASE\nCEILING.MATH = ARROTONDA.ECCESSO.MAT\nCEILING.PRECISE = ARROTONDA.ECCESSO.PRECISA\nCOMBIN = COMBINAZIONE\nCOMBINA = COMBINAZIONE.VALORI\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = DECIMALE\nDEGREES = GRADI\nECMA.CEILING = ECMA.ARROTONDA.ECCESSO\nEVEN = PARI\nEXP = EXP\nFACT = FATTORIALE\nFACTDOUBLE = FATT.DOPPIO\nFLOOR.MATH = ARROTONDA.DIFETTO.MAT\nFLOOR.PRECISE = ARROTONDA.DIFETTO.PRECISA\nGCD = MCD\nINT = INT\nISO.CEILING = ISO.ARROTONDA.ECCESSO\nLCM = MCM\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MATR.DETERM\nMINVERSE = MATR.INVERSA\nMMULT = MATR.PRODOTTO\nMOD = RESTO\nMROUND = ARROTONDA.MULTIPLO\nMULTINOMIAL = MULTINOMIALE\nMUNIT = MATR.UNIT\nODD = DISPARI\nPI = PI.GRECO\nPOWER = POTENZA\nPRODUCT = PRODOTTO\nQUOTIENT = QUOZIENTE\nRADIANS = RADIANTI\nRAND = CASUALE\nRANDBETWEEN = CASUALE.TRA\nROMAN = ROMANO\nROUND = ARROTONDA\nROUNDBAHTDOWN = ARROTBAHTGIU\nROUNDBAHTUP = ARROTBAHTSU\nROUNDDOWN = ARROTONDA.PER.DIF\nROUNDUP = ARROTONDA.PER.ECC\nSEC = SEC\nSECH = SECH\nSERIESSUM = SOMMA.SERIE\nSIGN = SEGNO\nSIN = SEN\nSINH = SENH\nSQRT = RADQ\nSQRTPI = RADQ.PI.GRECO\nSUBTOTAL = SUBTOTALE\nSUM = SOMMA\nSUMIF = SOMMA.SE\nSUMIFS = SOMMA.PIÙ.SE\nSUMPRODUCT = MATR.SOMMA.PRODOTTO\nSUMSQ = SOMMA.Q\nSUMX2MY2 = SOMMA.DIFF.Q\nSUMX2PY2 = SOMMA.SOMMA.Q\nSUMXMY2 = SOMMA.Q.DIFF\nTAN = TAN\nTANH = TANH\nTRUNC = TRONCA\n\n##\n## Funzioni statistiche (Statistical Functions)\n##\nAVEDEV = MEDIA.DEV\nAVERAGE = MEDIA\nAVERAGEA = MEDIA.VALORI\nAVERAGEIF = MEDIA.SE\nAVERAGEIFS = MEDIA.PIÙ.SE\nBETA.DIST = DISTRIB.BETA.N\nBETA.INV = INV.BETA.N\nBINOM.DIST = DISTRIB.BINOM.N\nBINOM.DIST.RANGE = INTERVALLO.DISTRIB.BINOM.N.\nBINOM.INV = INV.BINOM\nCHISQ.DIST = DISTRIB.CHI.QUAD\nCHISQ.DIST.RT = DISTRIB.CHI.QUAD.DS\nCHISQ.INV = INV.CHI.QUAD\nCHISQ.INV.RT = INV.CHI.QUAD.DS\nCHISQ.TEST = TEST.CHI.QUAD\nCONFIDENCE.NORM = CONFIDENZA.NORM\nCONFIDENCE.T = CONFIDENZA.T\nCORREL = CORRELAZIONE\nCOUNT = CONTA.NUMERI\nCOUNTA = CONTA.VALORI\nCOUNTBLANK = CONTA.VUOTE\nCOUNTIF = CONTA.SE\nCOUNTIFS = CONTA.PIÙ.SE\nCOVARIANCE.P = COVARIANZA.P\nCOVARIANCE.S = COVARIANZA.C\nDEVSQ = DEV.Q\nEXPON.DIST = DISTRIB.EXP.N\nF.DIST = DISTRIBF\nF.DIST.RT = DISTRIB.F.DS\nF.INV = INVF\nF.INV.RT = INV.F.DS\nF.TEST = TESTF\nFISHER = FISHER\nFISHERINV = INV.FISHER\nFORECAST.ETS = PREVISIONE.ETS\nFORECAST.ETS.CONFINT = PREVISIONE.ETS.INTCONF\nFORECAST.ETS.SEASONALITY = PREVISIONE.ETS.STAGIONALITÀ\nFORECAST.ETS.STAT = PREVISIONE.ETS.STAT\nFORECAST.LINEAR = PREVISIONE.LINEARE\nFREQUENCY = FREQUENZA\nGAMMA = GAMMA\nGAMMA.DIST = DISTRIB.GAMMA.N\nGAMMA.INV = INV.GAMMA.N\nGAMMALN = LN.GAMMA\nGAMMALN.PRECISE = LN.GAMMA.PRECISA\nGAUSS = GAUSS\nGEOMEAN = MEDIA.GEOMETRICA\nGROWTH = CRESCITA\nHARMEAN = MEDIA.ARMONICA\nHYPGEOM.DIST = DISTRIB.IPERGEOM.N\nINTERCEPT = INTERCETTA\nKURT = CURTOSI\nLARGE = GRANDE\nLINEST = REGR.LIN\nLOGEST = REGR.LOG\nLOGNORM.DIST = DISTRIB.LOGNORM.N\nLOGNORM.INV = INV.LOGNORM.N\nMAX = MAX\nMAXA = MAX.VALORI\nMAXIFS = MAX.PIÙ.SE\nMEDIAN = MEDIANA\nMIN = MIN\nMINA = MIN.VALORI\nMINIFS = MIN.PIÙ.SE\nMODE.MULT = MODA.MULT\nMODE.SNGL = MODA.SNGL\nNEGBINOM.DIST = DISTRIB.BINOM.NEG.N\nNORM.DIST = DISTRIB.NORM.N\nNORM.INV = INV.NORM.N\nNORM.S.DIST = DISTRIB.NORM.ST.N\nNORM.S.INV = INV.NORM.S\nPEARSON = PEARSON\nPERCENTILE.EXC = ESC.PERCENTILE\nPERCENTILE.INC = INC.PERCENTILE\nPERCENTRANK.EXC = ESC.PERCENT.RANGO\nPERCENTRANK.INC = INC.PERCENT.RANGO\nPERMUT = PERMUTAZIONE\nPERMUTATIONA = PERMUTAZIONE.VALORI\nPHI = PHI\nPOISSON.DIST = DISTRIB.POISSON\nPROB = PROBABILITÀ\nQUARTILE.EXC = ESC.QUARTILE\nQUARTILE.INC = INC.QUARTILE\nRANK.AVG = RANGO.MEDIA\nRANK.EQ = RANGO.UG\nRSQ = RQ\nSKEW = ASIMMETRIA\nSKEW.P = ASIMMETRIA.P\nSLOPE = PENDENZA\nSMALL = PICCOLO\nSTANDARDIZE = NORMALIZZA\nSTDEV.P = DEV.ST.P\nSTDEV.S = DEV.ST.C\nSTDEVA = DEV.ST.VALORI\nSTDEVPA = DEV.ST.POP.VALORI\nSTEYX = ERR.STD.YX\nT.DIST = DISTRIB.T.N\nT.DIST.2T = DISTRIB.T.2T\nT.DIST.RT = DISTRIB.T.DS\nT.INV = INVT\nT.INV.2T = INV.T.2T\nT.TEST = TESTT\nTREND = TENDENZA\nTRIMMEAN = MEDIA.TRONCATA\nVAR.P = VAR.P\nVAR.S = VAR.C\nVARA = VAR.VALORI\nVARPA = VAR.POP.VALORI\nWEIBULL.DIST = DISTRIB.WEIBULL\nZ.TEST = TESTZ\n\n##\n## Funzioni di testo (Text Functions)\n##\nBAHTTEXT = BAHTTESTO\nCHAR = CODICE.CARATT\nCLEAN = LIBERA\nCODE = CODICE\nCONCAT = CONCAT\nDOLLAR = VALUTA\nEXACT = IDENTICO\nFIND = TROVA\nFIXED = FISSO\nISTHAIDIGIT = ÈTHAICIFRA\nLEFT = SINISTRA\nLEN = LUNGHEZZA\nLOWER = MINUSC\nMID = STRINGA.ESTRAI\nNUMBERSTRING = NUMERO.STRINGA\nNUMBERVALUE = NUMERO.VALORE\nPHONETIC = FURIGANA\nPROPER = MAIUSC.INIZ\nREPLACE = RIMPIAZZA\nREPT = RIPETI\nRIGHT = DESTRA\nSEARCH = RICERCA\nSUBSTITUTE = SOSTITUISCI\nT = T\nTEXT = TESTO\nTEXTJOIN = TESTO.UNISCI\nTHAIDIGIT = THAICIFRA\nTHAINUMSOUND = THAINUMSUONO\nTHAINUMSTRING = THAISZÁMKAR\nTHAISTRINGLENGTH = THAILUNGSTRINGA\nTRIM = ANNULLA.SPAZI\nUNICHAR = CARATT.UNI\nUNICODE = UNICODE\nUPPER = MAIUSC\nVALUE = VALORE\n\n##\n## Funzioni Web (Web Functions)\n##\nENCODEURL = CODIFICA.URL\nFILTERXML = FILTRO.XML\nWEBSERVICE = SERVIZIO.WEB\n\n##\n## Funzioni di compatibilità (Compatibility Functions)\n##\nBETADIST = DISTRIB.BETA\nBETAINV = INV.BETA\nBINOMDIST = DISTRIB.BINOM\nCEILING = ARROTONDA.ECCESSO\nCHIDIST = DISTRIB.CHI\nCHIINV = INV.CHI\nCHITEST = TEST.CHI\nCONCATENATE = CONCATENA\nCONFIDENCE = CONFIDENZA\nCOVAR = COVARIANZA\nCRITBINOM = CRIT.BINOM\nEXPONDIST = DISTRIB.EXP\nFDIST = DISTRIB.F\nFINV = INV.F\nFLOOR = ARROTONDA.DIFETTO\nFORECAST = PREVISIONE\nFTEST = TEST.F\nGAMMADIST = DISTRIB.GAMMA\nGAMMAINV = INV.GAMMA\nHYPGEOMDIST = DISTRIB.IPERGEOM\nLOGINV = INV.LOGNORM\nLOGNORMDIST = DISTRIB.LOGNORM\nMODE = MODA\nNEGBINOMDIST = DISTRIB.BINOM.NEG\nNORMDIST = DISTRIB.NORM\nNORMINV = INV.NORM\nNORMSDIST = DISTRIB.NORM.ST\nNORMSINV = INV.NORM.ST\nPERCENTILE = PERCENTILE\nPERCENTRANK = PERCENT.RANGO\nPOISSON = POISSON\nQUARTILE = QUARTILE\nRANK = RANGO\nSTDEV = DEV.ST\nSTDEVP = DEV.ST.POP\nTDIST = DISTRIB.T\nTINV = INV.T\nTTEST = TEST.T\nVAR = VAR\nVARP = VAR.POP\nWEIBULL = WEIBULL\nZTEST = TEST.Z\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/nb/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Norsk Bokmål (Norwegian Bokmål)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL\nDIV0\nVALUE = #VERDI!\nREF\nNAME = #NAVN?\nNUM\nNA = #N/D\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/nb/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Norsk Bokmål (Norwegian Bokmål)\n##\n############################################################\n\n\n##\n## Kubefunksjoner (Cube Functions)\n##\nCUBEKPIMEMBER = KUBEKPIMEDLEM\nCUBEMEMBER = KUBEMEDLEM\nCUBEMEMBERPROPERTY = KUBEMEDLEMEGENSKAP\nCUBERANKEDMEMBER = KUBERANGERTMEDLEM\nCUBESET = KUBESETT\nCUBESETCOUNT = KUBESETTANTALL\nCUBEVALUE = KUBEVERDI\n\n##\n## Databasefunksjoner (Database Functions)\n##\nDAVERAGE = DGJENNOMSNITT\nDCOUNT = DANTALL\nDCOUNTA = DANTALLA\nDGET = DHENT\nDMAX = DMAKS\nDMIN = DMIN\nDPRODUCT = DPRODUKT\nDSTDEV = DSTDAV\nDSTDEVP = DSTDAVP\nDSUM = DSUMMER\nDVAR = DVARIANS\nDVARP = DVARIANSP\n\n##\n## Dato- og tidsfunksjoner (Date & Time Functions)\n##\nDATE = DATO\nDATEDIF = DATODIFF\nDATESTRING = DATOSTRENG\nDATEVALUE = DATOVERDI\nDAY = DAG\nDAYS = DAGER\nDAYS360 = DAGER360\nEDATE = DAG.ETTER\nEOMONTH = MÅNEDSSLUTT\nHOUR = TIME\nISOWEEKNUM = ISOUKENR\nMINUTE = MINUTT\nMONTH = MÅNED\nNETWORKDAYS = NETT.ARBEIDSDAGER\nNETWORKDAYS.INTL = NETT.ARBEIDSDAGER.INTL\nNOW = NÅ\nSECOND = SEKUND\nTHAIDAYOFWEEK = THAIUKEDAG\nTHAIMONTHOFYEAR = THAIMÅNED\nTHAIYEAR = THAIÅR\nTIME = TID\nTIMEVALUE = TIDSVERDI\nTODAY = IDAG\nWEEKDAY = UKEDAG\nWEEKNUM = UKENR\nWORKDAY = ARBEIDSDAG\nWORKDAY.INTL = ARBEIDSDAG.INTL\nYEAR = ÅR\nYEARFRAC = ÅRDEL\n\n##\n## Tekniske funksjoner (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BINTILDES\nBIN2HEX = BINTILHEKS\nBIN2OCT = BINTILOKT\nBITAND = BITOG\nBITLSHIFT = BITVFORSKYV\nBITOR = BITELLER\nBITRSHIFT = BITHFORSKYV\nBITXOR = BITEKSKLUSIVELLER\nCOMPLEX = KOMPLEKS\nCONVERT = KONVERTER\nDEC2BIN = DESTILBIN\nDEC2HEX = DESTILHEKS\nDEC2OCT = DESTILOKT\nDELTA = DELTA\nERF = FEILF\nERF.PRECISE = FEILF.PRESIS\nERFC = FEILFK\nERFC.PRECISE = FEILFK.PRESIS\nGESTEP = GRENSEVERDI\nHEX2BIN = HEKSTILBIN\nHEX2DEC = HEKSTILDES\nHEX2OCT = HEKSTILOKT\nIMABS = IMABS\nIMAGINARY = IMAGINÆR\nIMARGUMENT = IMARGUMENT\nIMCONJUGATE = IMKONJUGERT\nIMCOS = IMCOS\nIMCOSH = IMCOSH\nIMCOT = IMCOT\nIMCSC = IMCSC\nIMCSCH = IMCSCH\nIMDIV = IMDIV\nIMEXP = IMEKSP\nIMLN = IMLN\nIMLOG10 = IMLOG10\nIMLOG2 = IMLOG2\nIMPOWER = IMOPPHØY\nIMPRODUCT = IMPRODUKT\nIMREAL = IMREELL\nIMSEC = IMSEC\nIMSECH = IMSECH\nIMSIN = IMSIN\nIMSINH = IMSINH\nIMSQRT = IMROT\nIMSUB = IMSUB\nIMSUM = IMSUMMER\nIMTAN = IMTAN\nOCT2BIN = OKTTILBIN\nOCT2DEC = OKTTILDES\nOCT2HEX = OKTTILHEKS\n\n##\n## Økonomiske funksjoner (Financial Functions)\n##\nACCRINT = PÅLØPT.PERIODISK.RENTE\nACCRINTM = PÅLØPT.FORFALLSRENTE\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = OBLIG.DAGER.FF\nCOUPDAYS = OBLIG.DAGER\nCOUPDAYSNC = OBLIG.DAGER.NF\nCOUPNCD = OBLIG.DAGER.EF\nCOUPNUM = OBLIG.ANTALL\nCOUPPCD = OBLIG.DAG.FORRIGE\nCUMIPMT = SAMLET.RENTE\nCUMPRINC = SAMLET.HOVEDSTOL\nDB = DAVSKR\nDDB = DEGRAVS\nDISC = DISKONTERT\nDOLLARDE = DOLLARDE\nDOLLARFR = DOLLARBR\nDURATION = VARIGHET\nEFFECT = EFFEKTIV.RENTE\nFV = SLUTTVERDI\nFVSCHEDULE = SVPLAN\nINTRATE = RENTESATS\nIPMT = RAVDRAG\nIRR = IR\nISPMT = ER.AVDRAG\nMDURATION = MVARIGHET\nMIRR = MODIR\nNOMINAL = NOMINELL\nNPER = PERIODER\nNPV = NNV\nODDFPRICE = AVVIKFP.PRIS\nODDFYIELD = AVVIKFP.AVKASTNING\nODDLPRICE = AVVIKSP.PRIS\nODDLYIELD = AVVIKSP.AVKASTNING\nPDURATION = PVARIGHET\nPMT = AVDRAG\nPPMT = AMORT\nPRICE = PRIS\nPRICEDISC = PRIS.DISKONTERT\nPRICEMAT = PRIS.FORFALL\nPV = NÅVERDI\nRATE = RENTE\nRECEIVED = MOTTATT.AVKAST\nRRI = REALISERT.AVKASTNING\nSLN = LINAVS\nSYD = ÅRSAVS\nTBILLEQ = TBILLEKV\nTBILLPRICE = TBILLPRIS\nTBILLYIELD = TBILLAVKASTNING\nVDB = VERDIAVS\nXIRR = XIR\nXNPV = XNNV\nYIELD = AVKAST\nYIELDDISC = AVKAST.DISKONTERT\nYIELDMAT = AVKAST.FORFALL\n\n##\n## Informasjonsfunksjoner (Information Functions)\n##\nCELL = CELLE\nERROR.TYPE = FEIL.TYPE\nINFO = INFO\nISBLANK = ERTOM\nISERR = ERF\nISERROR = ERFEIL\nISEVEN = ERPARTALL\nISFORMULA = ERFORMEL\nISLOGICAL = ERLOGISK\nISNA = ERIT\nISNONTEXT = ERIKKETEKST\nISNUMBER = ERTALL\nISODD = ERODDE\nISREF = ERREF\nISTEXT = ERTEKST\nN = N\nNA = IT\nSHEET = ARK\nSHEETS = ANTALL.ARK\nTYPE = VERDITYPE\n\n##\n## Logiske funksjoner (Logical Functions)\n##\nAND = OG\nFALSE = USANN\nIF = HVIS\nIFERROR = HVISFEIL\nIFNA = HVIS.IT\nIFS = HVIS.SETT\nNOT = IKKE\nOR = ELLER\nSWITCH = BRYTER\nTRUE = SANN\nXOR = EKSKLUSIVELLER\n\n##\n## Oppslag- og referansefunksjoner (Lookup & Reference Functions)\n##\nADDRESS = ADRESSE\nAREAS = OMRÅDER\nCHOOSE = VELG\nCOLUMN = KOLONNE\nCOLUMNS = KOLONNER\nFORMULATEXT = FORMELTEKST\nGETPIVOTDATA = HENTPIVOTDATA\nHLOOKUP = FINN.KOLONNE\nHYPERLINK = HYPERKOBLING\nINDEX = INDEKS\nINDIRECT = INDIREKTE\nLOOKUP = SLÅ.OPP\nMATCH = SAMMENLIGNE\nOFFSET = FORSKYVNING\nROW = RAD\nROWS = RADER\nRTD = RTD\nTRANSPOSE = TRANSPONER\nVLOOKUP = FINN.RAD\n*RC = RK\n\n##\n## Matematikk- og trigonometrifunksjoner (Math & Trig Functions)\n##\nABS = ABS\nACOS = ARCCOS\nACOSH = ARCCOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = MENGDE\nARABIC = ARABISK\nASIN = ARCSIN\nASINH = ARCSINH\nATAN = ARCTAN\nATAN2 = ARCTAN2\nATANH = ARCTANH\nBASE = GRUNNTALL\nCEILING.MATH = AVRUND.GJELDENDE.MULTIPLUM.OPP.MATEMATISK\nCEILING.PRECISE = AVRUND.GJELDENDE.MULTIPLUM.PRESIS\nCOMBIN = KOMBINASJON\nCOMBINA = KOMBINASJONA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = DESIMAL\nDEGREES = GRADER\nECMA.CEILING = ECMA.AVRUND.GJELDENDE.MULTIPLUM\nEVEN = AVRUND.TIL.PARTALL\nEXP = EKSP\nFACT = FAKULTET\nFACTDOUBLE = DOBBELFAKT\nFLOOR.MATH = AVRUND.GJELDENDE.MULTIPLUM.NED.MATEMATISK\nFLOOR.PRECISE = AVRUND.GJELDENDE.MULTIPLUM.NED.PRESIS\nGCD = SFF\nINT = HELTALL\nISO.CEILING = ISO.AVRUND.GJELDENDE.MULTIPLUM\nLCM = MFM\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MDETERM\nMINVERSE = MINVERS\nMMULT = MMULT\nMOD = REST\nMROUND = MRUND\nMULTINOMIAL = MULTINOMINELL\nMUNIT = MENHET\nODD = AVRUND.TIL.ODDETALL\nPI = PI\nPOWER = OPPHØYD.I\nPRODUCT = PRODUKT\nQUOTIENT = KVOTIENT\nRADIANS = RADIANER\nRAND = TILFELDIG\nRANDBETWEEN = TILFELDIGMELLOM\nROMAN = ROMERTALL\nROUND = AVRUND\nROUNDBAHTDOWN = RUNDAVBAHTNEDOVER\nROUNDBAHTUP = RUNDAVBAHTOPPOVER\nROUNDDOWN = AVRUND.NED\nROUNDUP = AVRUND.OPP\nSEC = SEC\nSECH = SECH\nSERIESSUM = SUMMER.REKKE\nSIGN = FORTEGN\nSIN = SIN\nSINH = SINH\nSQRT = ROT\nSQRTPI = ROTPI\nSUBTOTAL = DELSUM\nSUM = SUMMER\nSUMIF = SUMMERHVIS\nSUMIFS = SUMMER.HVIS.SETT\nSUMPRODUCT = SUMMERPRODUKT\nSUMSQ = SUMMERKVADRAT\nSUMX2MY2 = SUMMERX2MY2\nSUMX2PY2 = SUMMERX2PY2\nSUMXMY2 = SUMMERXMY2\nTAN = TAN\nTANH = TANH\nTRUNC = AVKORT\n\n##\n## Statistiske funksjoner (Statistical Functions)\n##\nAVEDEV = GJENNOMSNITTSAVVIK\nAVERAGE = GJENNOMSNITT\nAVERAGEA = GJENNOMSNITTA\nAVERAGEIF = GJENNOMSNITTHVIS\nAVERAGEIFS = GJENNOMSNITT.HVIS.SETT\nBETA.DIST = BETA.FORDELING.N\nBETA.INV = BETA.INV\nBINOM.DIST = BINOM.FORDELING.N\nBINOM.DIST.RANGE = BINOM.FORDELING.OMRÅDE\nBINOM.INV = BINOM.INV\nCHISQ.DIST = KJIKVADRAT.FORDELING\nCHISQ.DIST.RT = KJIKVADRAT.FORDELING.H\nCHISQ.INV = KJIKVADRAT.INV\nCHISQ.INV.RT = KJIKVADRAT.INV.H\nCHISQ.TEST = KJIKVADRAT.TEST\nCONFIDENCE.NORM = KONFIDENS.NORM\nCONFIDENCE.T = KONFIDENS.T\nCORREL = KORRELASJON\nCOUNT = ANTALL\nCOUNTA = ANTALLA\nCOUNTBLANK = TELLBLANKE\nCOUNTIF = ANTALL.HVIS\nCOUNTIFS = ANTALL.HVIS.SETT\nCOVARIANCE.P = KOVARIANS.P\nCOVARIANCE.S = KOVARIANS.S\nDEVSQ = AVVIK.KVADRERT\nEXPON.DIST = EKSP.FORDELING.N\nF.DIST = F.FORDELING\nF.DIST.RT = F.FORDELING.H\nF.INV = F.INV\nF.INV.RT = F.INV.H\nF.TEST = F.TEST\nFISHER = FISHER\nFISHERINV = FISHERINV\nFORECAST.ETS = PROGNOSE.ETS\nFORECAST.ETS.CONFINT = PROGNOSE.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = PROGNOSE.ETS.SESONGAVHENGIGHET\nFORECAST.ETS.STAT = PROGNOSE.ETS.STAT\nFORECAST.LINEAR = PROGNOSE.LINEÆR\nFREQUENCY = FREKVENS\nGAMMA = GAMMA\nGAMMA.DIST = GAMMA.FORDELING\nGAMMA.INV = GAMMA.INV\nGAMMALN = GAMMALN\nGAMMALN.PRECISE = GAMMALN.PRESIS\nGAUSS = GAUSS\nGEOMEAN = GJENNOMSNITT.GEOMETRISK\nGROWTH = VEKST\nHARMEAN = GJENNOMSNITT.HARMONISK\nHYPGEOM.DIST = HYPGEOM.FORDELING.N\nINTERCEPT = SKJÆRINGSPUNKT\nKURT = KURT\nLARGE = N.STØRST\nLINEST = RETTLINJE\nLOGEST = KURVE\nLOGNORM.DIST = LOGNORM.FORDELING\nLOGNORM.INV = LOGNORM.INV\nMAX = STØRST\nMAXA = MAKSA\nMAXIFS = MAKS.HVIS.SETT\nMEDIAN = MEDIAN\nMIN = MIN\nMINA = MINA\nMINIFS = MIN.HVIS.SETT\nMODE.MULT = MODUS.MULT\nMODE.SNGL = MODUS.SNGL\nNEGBINOM.DIST = NEGBINOM.FORDELING.N\nNORM.DIST = NORM.FORDELING\nNORM.INV = NORM.INV\nNORM.S.DIST = NORM.S.FORDELING\nNORM.S.INV = NORM.S.INV\nPEARSON = PEARSON\nPERCENTILE.EXC = PERSENTIL.EKS\nPERCENTILE.INC = PERSENTIL.INK\nPERCENTRANK.EXC = PROSENTDEL.EKS\nPERCENTRANK.INC = PROSENTDEL.INK\nPERMUT = PERMUTER\nPERMUTATIONA = PERMUTASJONA\nPHI = PHI\nPOISSON.DIST = POISSON.FORDELING\nPROB = SANNSYNLIG\nQUARTILE.EXC = KVARTIL.EKS\nQUARTILE.INC = KVARTIL.INK\nRANK.AVG = RANG.GJSN\nRANK.EQ = RANG.EKV\nRSQ = RKVADRAT\nSKEW = SKJEVFORDELING\nSKEW.P = SKJEVFORDELING.P\nSLOPE = STIGNINGSTALL\nSMALL = N.MINST\nSTANDARDIZE = NORMALISER\nSTDEV.P = STDAV.P\nSTDEV.S = STDAV.S\nSTDEVA = STDAVVIKA\nSTDEVPA = STDAVVIKPA\nSTEYX = STANDARDFEIL\nT.DIST = T.FORDELING\nT.DIST.2T = T.FORDELING.2T\nT.DIST.RT = T.FORDELING.H\nT.INV = T.INV\nT.INV.2T = T.INV.2T\nT.TEST = T.TEST\nTREND = TREND\nTRIMMEAN = TRIMMET.GJENNOMSNITT\nVAR.P = VARIANS.P\nVAR.S = VARIANS.S\nVARA = VARIANSA\nVARPA = VARIANSPA\nWEIBULL.DIST = WEIBULL.DIST.N\nZ.TEST = Z.TEST\n\n##\n## Tekstfunksjoner (Text Functions)\n##\nASC = STIGENDE\nBAHTTEXT = BAHTTEKST\nCHAR = TEGNKODE\nCLEAN = RENSK\nCODE = KODE\nCONCAT = KJED.SAMMEN\nDOLLAR = VALUTA\nEXACT = EKSAKT\nFIND = FINN\nFIXED = FASTSATT\nISTHAIDIGIT = ERTHAISIFFER\nLEFT = VENSTRE\nLEN = LENGDE\nLOWER = SMÅ\nMID = DELTEKST\nNUMBERSTRING = TALLSTRENG\nNUMBERVALUE = TALLVERDI\nPHONETIC = FURIGANA\nPROPER = STOR.FORBOKSTAV\nREPLACE = ERSTATT\nREPT = GJENTA\nRIGHT = HØYRE\nSEARCH = SØK\nSUBSTITUTE = BYTT.UT\nT = T\nTEXT = TEKST\nTEXTJOIN = TEKST.KOMBINER\nTHAIDIGIT = THAISIFFER\nTHAINUMSOUND = THAINUMLYD\nTHAINUMSTRING = THAINUMSTRENG\nTHAISTRINGLENGTH = THAISTRENGLENGDE\nTRIM = TRIMME\nUNICHAR = UNICODETEGN\nUNICODE = UNICODE\nUPPER = STORE\nVALUE = VERDI\n\n##\n## Nettfunksjoner (Web Functions)\n##\nENCODEURL = URL.KODE\nFILTERXML = FILTRERXML\nWEBSERVICE = NETTJENESTE\n\n##\n## Kompatibilitetsfunksjoner (Compatibility Functions)\n##\nBETADIST = BETA.FORDELING\nBETAINV = INVERS.BETA.FORDELING\nBINOMDIST = BINOM.FORDELING\nCEILING = AVRUND.GJELDENDE.MULTIPLUM\nCHIDIST = KJI.FORDELING\nCHIINV = INVERS.KJI.FORDELING\nCHITEST = KJI.TEST\nCONCATENATE = KJEDE.SAMMEN\nCONFIDENCE = KONFIDENS\nCOVAR = KOVARIANS\nCRITBINOM = GRENSE.BINOM\nEXPONDIST = EKSP.FORDELING\nFDIST = FFORDELING\nFINV = FFORDELING.INVERS\nFLOOR = AVRUND.GJELDENDE.MULTIPLUM.NED\nFORECAST = PROGNOSE\nFTEST = FTEST\nGAMMADIST = GAMMAFORDELING\nGAMMAINV = GAMMAINV\nHYPGEOMDIST = HYPGEOM.FORDELING\nLOGINV = LOGINV\nLOGNORMDIST = LOGNORMFORD\nMODE = MODUS\nNEGBINOMDIST = NEGBINOM.FORDELING\nNORMDIST = NORMALFORDELING\nNORMINV = NORMINV\nNORMSDIST = NORMSFORDELING\nNORMSINV = NORMSINV\nPERCENTILE = PERSENTIL\nPERCENTRANK = PROSENTDEL\nPOISSON = POISSON\nQUARTILE = KVARTIL\nRANK = RANG\nSTDEV = STDAV\nSTDEVP = STDAVP\nTDIST = TFORDELING\nTINV = TINV\nTTEST = TTEST\nVAR = VARIANS\nVARP = VARIANSP\nWEIBULL = WEIBULL.FORDELING\nZTEST = ZTEST\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/nl/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Nederlands (Dutch)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #LEEG!\nDIV0 = #DEEL/0!\nVALUE = #WAARDE!\nREF = #VERW!\nNAME = #NAAM?\nNUM = #GETAL!\nNA = #N/B\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/nl/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Nederlands (Dutch)\n##\n############################################################\n\n\n##\n## Kubusfuncties (Cube Functions)\n##\nCUBEKPIMEMBER = KUBUSKPILID\nCUBEMEMBER = KUBUSLID\nCUBEMEMBERPROPERTY = KUBUSLIDEIGENSCHAP\nCUBERANKEDMEMBER = KUBUSGERANGSCHIKTLID\nCUBESET = KUBUSSET\nCUBESETCOUNT = KUBUSSETAANTAL\nCUBEVALUE = KUBUSWAARDE\n\n##\n## Databasefuncties (Database Functions)\n##\nDAVERAGE = DBGEMIDDELDE\nDCOUNT = DBAANTAL\nDCOUNTA = DBAANTALC\nDGET = DBLEZEN\nDMAX = DBMAX\nDMIN = DBMIN\nDPRODUCT = DBPRODUCT\nDSTDEV = DBSTDEV\nDSTDEVP = DBSTDEVP\nDSUM = DBSOM\nDVAR = DBVAR\nDVARP = DBVARP\n\n##\n## Datum- en tijdfuncties (Date & Time Functions)\n##\nDATE = DATUM\nDATEDIF = DATUMVERSCHIL\nDATESTRING = DATUMNOTATIE\nDATEVALUE = DATUMWAARDE\nDAY = DAG\nDAYS = DAGEN\nDAYS360 = DAGEN360\nEDATE = ZELFDE.DAG\nEOMONTH = LAATSTE.DAG\nHOUR = UUR\nISOWEEKNUM = ISO.WEEKNUMMER\nMINUTE = MINUUT\nMONTH = MAAND\nNETWORKDAYS = NETTO.WERKDAGEN\nNETWORKDAYS.INTL = NETWERKDAGEN.INTL\nNOW = NU\nSECOND = SECONDE\nTHAIDAYOFWEEK = THAIS.WEEKDAG\nTHAIMONTHOFYEAR = THAIS.MAAND.VAN.JAAR\nTHAIYEAR = THAIS.JAAR\nTIME = TIJD\nTIMEVALUE = TIJDWAARDE\nTODAY = VANDAAG\nWEEKDAY = WEEKDAG\nWEEKNUM = WEEKNUMMER\nWORKDAY = WERKDAG\nWORKDAY.INTL = WERKDAG.INTL\nYEAR = JAAR\nYEARFRAC = JAAR.DEEL\n\n##\n## Technische functies (Engineering Functions)\n##\nBESSELI = BESSEL.I\nBESSELJ = BESSEL.J\nBESSELK = BESSEL.K\nBESSELY = BESSEL.Y\nBIN2DEC = BIN.N.DEC\nBIN2HEX = BIN.N.HEX\nBIN2OCT = BIN.N.OCT\nBITAND = BIT.EN\nBITLSHIFT = BIT.VERSCHUIF.LINKS\nBITOR = BIT.OF\nBITRSHIFT = BIT.VERSCHUIF.RECHTS\nBITXOR = BIT.EX.OF\nCOMPLEX = COMPLEX\nCONVERT = CONVERTEREN\nDEC2BIN = DEC.N.BIN\nDEC2HEX = DEC.N.HEX\nDEC2OCT = DEC.N.OCT\nDELTA = DELTA\nERF = FOUTFUNCTIE\nERF.PRECISE = FOUTFUNCTIE.NAUWKEURIG\nERFC = FOUT.COMPLEMENT\nERFC.PRECISE = FOUT.COMPLEMENT.NAUWKEURIG\nGESTEP = GROTER.DAN\nHEX2BIN = HEX.N.BIN\nHEX2DEC = HEX.N.DEC\nHEX2OCT = HEX.N.OCT\nIMABS = C.ABS\nIMAGINARY = C.IM.DEEL\nIMARGUMENT = C.ARGUMENT\nIMCONJUGATE = C.TOEGEVOEGD\nIMCOS = C.COS\nIMCOSH = C.COSH\nIMCOT = C.COT\nIMCSC = C.COSEC\nIMCSCH = C.COSECH\nIMDIV = C.QUOTIENT\nIMEXP = C.EXP\nIMLN = C.LN\nIMLOG10 = C.LOG10\nIMLOG2 = C.LOG2\nIMPOWER = C.MACHT\nIMPRODUCT = C.PRODUCT\nIMREAL = C.REEEL.DEEL\nIMSEC = C.SEC\nIMSECH = C.SECH\nIMSIN = C.SIN\nIMSINH = C.SINH\nIMSQRT = C.WORTEL\nIMSUB = C.VERSCHIL\nIMSUM = C.SOM\nIMTAN = C.TAN\nOCT2BIN = OCT.N.BIN\nOCT2DEC = OCT.N.DEC\nOCT2HEX = OCT.N.HEX\n\n##\n## Financiële functies (Financial Functions)\n##\nACCRINT = SAMENG.RENTE\nACCRINTM = SAMENG.RENTE.V\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = COUP.DAGEN.BB\nCOUPDAYS = COUP.DAGEN\nCOUPDAYSNC = COUP.DAGEN.VV\nCOUPNCD = COUP.DATUM.NB\nCOUPNUM = COUP.AANTAL\nCOUPPCD = COUP.DATUM.VB\nCUMIPMT = CUM.RENTE\nCUMPRINC = CUM.HOOFDSOM\nDB = DB\nDDB = DDB\nDISC = DISCONTO\nDOLLARDE = EURO.DE\nDOLLARFR = EURO.BR\nDURATION = DUUR\nEFFECT = EFFECT.RENTE\nFV = TW\nFVSCHEDULE = TOEK.WAARDE2\nINTRATE = RENTEPERCENTAGE\nIPMT = IBET\nIRR = IR\nISPMT = ISBET\nMDURATION = AANG.DUUR\nMIRR = GIR\nNOMINAL = NOMINALE.RENTE\nNPER = NPER\nNPV = NHW\nODDFPRICE = AFW.ET.PRIJS\nODDFYIELD = AFW.ET.REND\nODDLPRICE = AFW.LT.PRIJS\nODDLYIELD = AFW.LT.REND\nPDURATION = PDUUR\nPMT = BET\nPPMT = PBET\nPRICE = PRIJS.NOM\nPRICEDISC = PRIJS.DISCONTO\nPRICEMAT = PRIJS.VERVALDAG\nPV = HW\nRATE = RENTE\nRECEIVED = OPBRENGST\nRRI = RRI\nSLN = LIN.AFSCHR\nSYD = SYD\nTBILLEQ = SCHATK.OBL\nTBILLPRICE = SCHATK.PRIJS\nTBILLYIELD = SCHATK.REND\nVDB = VDB\nXIRR = IR.SCHEMA\nXNPV = NHW2\nYIELD = RENDEMENT\nYIELDDISC = REND.DISCONTO\nYIELDMAT = REND.VERVAL\n\n##\n## Informatiefuncties (Information Functions)\n##\nCELL = CEL\nERROR.TYPE = TYPE.FOUT\nINFO = INFO\nISBLANK = ISLEEG\nISERR = ISFOUT2\nISERROR = ISFOUT\nISEVEN = IS.EVEN\nISFORMULA = ISFORMULE\nISLOGICAL = ISLOGISCH\nISNA = ISNB\nISNONTEXT = ISGEENTEKST\nISNUMBER = ISGETAL\nISODD = IS.ONEVEN\nISREF = ISVERWIJZING\nISTEXT = ISTEKST\nN = N\nNA = NB\nSHEET = BLAD\nSHEETS = BLADEN\nTYPE = TYPE\n\n##\n## Logische functies (Logical Functions)\n##\nAND = EN\nFALSE = ONWAAR\nIF = ALS\nIFERROR = ALS.FOUT\nIFNA = ALS.NB\nIFS = ALS.VOORWAARDEN\nNOT = NIET\nOR = OF\nSWITCH = SCHAKELEN\nTRUE = WAAR\nXOR = EX.OF\n\n##\n## Zoek- en verwijzingsfuncties (Lookup & Reference Functions)\n##\nADDRESS = ADRES\nAREAS = BEREIKEN\nCHOOSE = KIEZEN\nCOLUMN = KOLOM\nCOLUMNS = KOLOMMEN\nFORMULATEXT = FORMULETEKST\nGETPIVOTDATA = DRAAITABEL.OPHALEN\nHLOOKUP = HORIZ.ZOEKEN\nHYPERLINK = HYPERLINK\nINDEX = INDEX\nINDIRECT = INDIRECT\nLOOKUP = ZOEKEN\nMATCH = VERGELIJKEN\nOFFSET = VERSCHUIVING\nROW = RIJ\nROWS = RIJEN\nRTD = RTG\nTRANSPOSE = TRANSPONEREN\nVLOOKUP = VERT.ZOEKEN\n*RC = RK\n\n##\n## Wiskundige en trigonometrische functies (Math & Trig Functions)\n##\nABS = ABS\nACOS = BOOGCOS\nACOSH = BOOGCOSH\nACOT = BOOGCOT\nACOTH = BOOGCOTH\nAGGREGATE = AGGREGAAT\nARABIC = ARABISCH\nASIN = BOOGSIN\nASINH = BOOGSINH\nATAN = BOOGTAN\nATAN2 = BOOGTAN2\nATANH = BOOGTANH\nBASE = BASIS\nCEILING.MATH = AFRONDEN.BOVEN.WISK\nCEILING.PRECISE = AFRONDEN.BOVEN.NAUWKEURIG\nCOMBIN = COMBINATIES\nCOMBINA = COMBIN.A\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = COSEC\nCSCH = COSECH\nDECIMAL = DECIMAAL\nDEGREES = GRADEN\nECMA.CEILING = ECMA.AFRONDEN.BOVEN\nEVEN = EVEN\nEXP = EXP\nFACT = FACULTEIT\nFACTDOUBLE = DUBBELE.FACULTEIT\nFLOOR.MATH = AFRONDEN.BENEDEN.WISK\nFLOOR.PRECISE = AFRONDEN.BENEDEN.NAUWKEURIG\nGCD = GGD\nINT = INTEGER\nISO.CEILING = ISO.AFRONDEN.BOVEN\nLCM = KGV\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = DETERMINANTMAT\nMINVERSE = INVERSEMAT\nMMULT = PRODUCTMAT\nMOD = REST\nMROUND = AFRONDEN.N.VEELVOUD\nMULTINOMIAL = MULTINOMIAAL\nMUNIT = EENHEIDMAT\nODD = ONEVEN\nPI = PI\nPOWER = MACHT\nPRODUCT = PRODUCT\nQUOTIENT = QUOTIENT\nRADIANS = RADIALEN\nRAND = ASELECT\nRANDBETWEEN = ASELECTTUSSEN\nROMAN = ROMEINS\nROUND = AFRONDEN\nROUNDBAHTDOWN = BAHT.AFR.NAAR.BENEDEN\nROUNDBAHTUP = BAHT.AFR.NAAR.BOVEN\nROUNDDOWN = AFRONDEN.NAAR.BENEDEN\nROUNDUP = AFRONDEN.NAAR.BOVEN\nSEC = SEC\nSECH = SECH\nSERIESSUM = SOM.MACHTREEKS\nSIGN = POS.NEG\nSIN = SIN\nSINH = SINH\nSQRT = WORTEL\nSQRTPI = WORTEL.PI\nSUBTOTAL = SUBTOTAAL\nSUM = SOM\nSUMIF = SOM.ALS\nSUMIFS = SOMMEN.ALS\nSUMPRODUCT = SOMPRODUCT\nSUMSQ = KWADRATENSOM\nSUMX2MY2 = SOM.X2MINY2\nSUMX2PY2 = SOM.X2PLUSY2\nSUMXMY2 = SOM.XMINY.2\nTAN = TAN\nTANH = TANH\nTRUNC = GEHEEL\n\n##\n## Statistische functies (Statistical Functions)\n##\nAVEDEV = GEM.DEVIATIE\nAVERAGE = GEMIDDELDE\nAVERAGEA = GEMIDDELDEA\nAVERAGEIF = GEMIDDELDE.ALS\nAVERAGEIFS = GEMIDDELDEN.ALS\nBETA.DIST = BETA.VERD\nBETA.INV = BETA.INV\nBINOM.DIST = BINOM.VERD\nBINOM.DIST.RANGE = BINOM.VERD.BEREIK\nBINOM.INV = BINOMIALE.INV\nCHISQ.DIST = CHIKW.VERD\nCHISQ.DIST.RT = CHIKW.VERD.RECHTS\nCHISQ.INV = CHIKW.INV\nCHISQ.INV.RT = CHIKW.INV.RECHTS\nCHISQ.TEST = CHIKW.TEST\nCONFIDENCE.NORM = VERTROUWELIJKHEID.NORM\nCONFIDENCE.T = VERTROUWELIJKHEID.T\nCORREL = CORRELATIE\nCOUNT = AANTAL\nCOUNTA = AANTALARG\nCOUNTBLANK = AANTAL.LEGE.CELLEN\nCOUNTIF = AANTAL.ALS\nCOUNTIFS = AANTALLEN.ALS\nCOVARIANCE.P = COVARIANTIE.P\nCOVARIANCE.S = COVARIANTIE.S\nDEVSQ = DEV.KWAD\nEXPON.DIST = EXPON.VERD.N\nF.DIST = F.VERD\nF.DIST.RT = F.VERD.RECHTS\nF.INV = F.INV\nF.INV.RT = F.INV.RECHTS\nF.TEST = F.TEST\nFISHER = FISHER\nFISHERINV = FISHER.INV\nFORECAST.ETS = VOORSPELLEN.ETS\nFORECAST.ETS.CONFINT = VOORSPELLEN.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = VOORSPELLEN.ETS.SEASONALITY\nFORECAST.ETS.STAT = FORECAST.ETS.STAT\nFORECAST.LINEAR = VOORSPELLEN.LINEAR\nFREQUENCY = INTERVAL\nGAMMA = GAMMA\nGAMMA.DIST = GAMMA.VERD.N\nGAMMA.INV = GAMMA.INV.N\nGAMMALN = GAMMA.LN\nGAMMALN.PRECISE = GAMMA.LN.NAUWKEURIG\nGAUSS = GAUSS\nGEOMEAN = MEETK.GEM\nGROWTH = GROEI\nHARMEAN = HARM.GEM\nHYPGEOM.DIST = HYPGEOM.VERD\nINTERCEPT = SNIJPUNT\nKURT = KURTOSIS\nLARGE = GROOTSTE\nLINEST = LIJNSCH\nLOGEST = LOGSCH\nLOGNORM.DIST = LOGNORM.VERD\nLOGNORM.INV = LOGNORM.INV\nMAX = MAX\nMAXA = MAXA\nMAXIFS = MAX.ALS.VOORWAARDEN\nMEDIAN = MEDIAAN\nMIN = MIN\nMINA = MINA\nMINIFS = MIN.ALS.VOORWAARDEN\nMODE.MULT = MODUS.MEERV\nMODE.SNGL = MODUS.ENKELV\nNEGBINOM.DIST = NEGBINOM.VERD\nNORM.DIST = NORM.VERD.N\nNORM.INV = NORM.INV.N\nNORM.S.DIST = NORM.S.VERD\nNORM.S.INV = NORM.S.INV\nPEARSON = PEARSON\nPERCENTILE.EXC = PERCENTIEL.EXC\nPERCENTILE.INC = PERCENTIEL.INC\nPERCENTRANK.EXC = PROCENTRANG.EXC\nPERCENTRANK.INC = PROCENTRANG.INC\nPERMUT = PERMUTATIES\nPERMUTATIONA = PERMUTATIE.A\nPHI = PHI\nPOISSON.DIST = POISSON.VERD\nPROB = KANS\nQUARTILE.EXC = KWARTIEL.EXC\nQUARTILE.INC = KWARTIEL.INC\nRANK.AVG = RANG.GEMIDDELDE\nRANK.EQ = RANG.GELIJK\nRSQ = R.KWADRAAT\nSKEW = SCHEEFHEID\nSKEW.P = SCHEEFHEID.P\nSLOPE = RICHTING\nSMALL = KLEINSTE\nSTANDARDIZE = NORMALISEREN\nSTDEV.P = STDEV.P\nSTDEV.S = STDEV.S\nSTDEVA = STDEVA\nSTDEVPA = STDEVPA\nSTEYX = STAND.FOUT.YX\nT.DIST = T.DIST\nT.DIST.2T = T.VERD.2T\nT.DIST.RT = T.VERD.RECHTS\nT.INV = T.INV\nT.INV.2T = T.INV.2T\nT.TEST = T.TEST\nTREND = TREND\nTRIMMEAN = GETRIMD.GEM\nVAR.P = VAR.P\nVAR.S = VAR.S\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = WEIBULL.VERD\nZ.TEST = Z.TEST\n\n##\n## Tekstfuncties (Text Functions)\n##\nBAHTTEXT = BAHT.TEKST\nCHAR = TEKEN\nCLEAN = WISSEN.CONTROL\nCODE = CODE\nCONCAT = TEKST.SAMENV\nDOLLAR = EURO\nEXACT = GELIJK\nFIND = VIND.ALLES\nFIXED = VAST\nISTHAIDIGIT = IS.THAIS.CIJFER\nLEFT = LINKS\nLEN = LENGTE\nLOWER = KLEINE.LETTERS\nMID = DEEL\nNUMBERSTRING = GETALNOTATIE\nNUMBERVALUE = NUMERIEKE.WAARDE\nPHONETIC = FONETISCH\nPROPER = BEGINLETTERS\nREPLACE = VERVANGEN\nREPT = HERHALING\nRIGHT = RECHTS\nSEARCH = VIND.SPEC\nSUBSTITUTE = SUBSTITUEREN\nT = T\nTEXT = TEKST\nTEXTJOIN = TEKST.COMBINEREN\nTHAIDIGIT = THAIS.CIJFER\nTHAINUMSOUND = THAIS.GETAL.GELUID\nTHAINUMSTRING = THAIS.GETAL.REEKS\nTHAISTRINGLENGTH = THAIS.REEKS.LENGTE\nTRIM = SPATIES.WISSEN\nUNICHAR = UNITEKEN\nUNICODE = UNICODE\nUPPER = HOOFDLETTERS\nVALUE = WAARDE\n\n##\n## Webfuncties (Web Functions)\n##\nENCODEURL = URL.CODEREN\nFILTERXML = XML.FILTEREN\nWEBSERVICE = WEBSERVICE\n\n##\n## Compatibiliteitsfuncties (Compatibility Functions)\n##\nBETADIST = BETAVERD\nBETAINV = BETAINV\nBINOMDIST = BINOMIALE.VERD\nCEILING = AFRONDEN.BOVEN\nCHIDIST = CHI.KWADRAAT\nCHIINV = CHI.KWADRAAT.INV\nCHITEST = CHI.TOETS\nCONCATENATE = TEKST.SAMENVOEGEN\nCONFIDENCE = BETROUWBAARHEID\nCOVAR = COVARIANTIE\nCRITBINOM = CRIT.BINOM\nEXPONDIST = EXPON.VERD\nFDIST = F.VERDELING\nFINV = F.INVERSE\nFLOOR = AFRONDEN.BENEDEN\nFORECAST = VOORSPELLEN\nFTEST = F.TOETS\nGAMMADIST = GAMMA.VERD\nGAMMAINV = GAMMA.INV\nHYPGEOMDIST = HYPERGEO.VERD\nLOGINV = LOG.NORM.INV\nLOGNORMDIST = LOG.NORM.VERD\nMODE = MODUS\nNEGBINOMDIST = NEG.BINOM.VERD\nNORMDIST = NORM.VERD\nNORMINV = NORM.INV\nNORMSDIST = STAND.NORM.VERD\nNORMSINV = STAND.NORM.INV\nPERCENTILE = PERCENTIEL\nPERCENTRANK = PERCENT.RANG\nPOISSON = POISSON\nQUARTILE = KWARTIEL\nRANK = RANG\nSTDEV = STDEV\nSTDEVP = STDEVP\nTDIST = T.VERD\nTINV = TINV\nTTEST = T.TOETS\nVAR = VAR\nVARP = VARP\nWEIBULL = WEIBULL\nZTEST = Z.TOETS\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/pl/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Jezyk polski (Polish)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #ZERO!\nDIV0 = #DZIEL/0!\nVALUE = #ARG!\nREF = #ADR!\nNAME = #NAZWA?\nNUM = #LICZBA!\nNA = #N/D!\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/pl/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Jezyk polski (Polish)\n##\n############################################################\n\n\n##\n## Funkcje baz danych (Cube Functions)\n##\nCUBEKPIMEMBER = ELEMENT.KPI.MODUŁU\nCUBEMEMBER = ELEMENT.MODUŁU\nCUBEMEMBERPROPERTY = WŁAŚCIWOŚĆ.ELEMENTU.MODUŁU\nCUBERANKEDMEMBER = USZEREGOWANY.ELEMENT.MODUŁU\nCUBESET = ZESTAW.MODUŁÓW\nCUBESETCOUNT = LICZNIK.MODUŁÓW.ZESTAWU\nCUBEVALUE = WARTOŚĆ.MODUŁU\n\n##\n## Funkcje baz danych (Database Functions)\n##\nDAVERAGE = BD.ŚREDNIA\nDCOUNT = BD.ILE.REKORDÓW\nDCOUNTA = BD.ILE.REKORDÓW.A\nDGET = BD.POLE\nDMAX = BD.MAX\nDMIN = BD.MIN\nDPRODUCT = BD.ILOCZYN\nDSTDEV = BD.ODCH.STANDARD\nDSTDEVP = BD.ODCH.STANDARD.POPUL\nDSUM = BD.SUMA\nDVAR = BD.WARIANCJA\nDVARP = BD.WARIANCJA.POPUL\n\n##\n## Funkcje daty i godziny (Date & Time Functions)\n##\nDATE = DATA\nDATEDIF = DATA.RÓŻNICA\nDATESTRING = DATA.CIĄG.ZNAK\nDATEVALUE = DATA.WARTOŚĆ\nDAY = DZIEŃ\nDAYS = DNI\nDAYS360 = DNI.360\nEDATE = NR.SER.DATY\nEOMONTH = NR.SER.OST.DN.MIES\nHOUR = GODZINA\nISOWEEKNUM = ISO.NUM.TYG\nMINUTE = MINUTA\nMONTH = MIESIĄC\nNETWORKDAYS = DNI.ROBOCZE\nNETWORKDAYS.INTL = DNI.ROBOCZE.NIESTAND\nNOW = TERAZ\nSECOND = SEKUNDA\nTHAIDAYOFWEEK = TAJ.DZIEŃ.TYGODNIA\nTHAIMONTHOFYEAR = TAJ.MIESIĄC.ROKU\nTHAIYEAR = TAJ.ROK\nTIME = CZAS\nTIMEVALUE = CZAS.WARTOŚĆ\nTODAY = DZIŚ\nWEEKDAY = DZIEŃ.TYG\nWEEKNUM = NUM.TYG\nWORKDAY = DZIEŃ.ROBOCZY\nWORKDAY.INTL = DZIEŃ.ROBOCZY.NIESTAND\nYEAR = ROK\nYEARFRAC = CZĘŚĆ.ROKU\n\n##\n## Funkcje inżynierskie (Engineering Functions)\n##\nBESSELI = BESSEL.I\nBESSELJ = BESSEL.J\nBESSELK = BESSEL.K\nBESSELY = BESSEL.Y\nBIN2DEC = DWÓJK.NA.DZIES\nBIN2HEX = DWÓJK.NA.SZESN\nBIN2OCT = DWÓJK.NA.ÓSM\nBITAND = BITAND\nBITLSHIFT = BIT.PRZESUNIĘCIE.W.LEWO\nBITOR = BITOR\nBITRSHIFT = BIT.PRZESUNIĘCIE.W.PRAWO\nBITXOR = BITXOR\nCOMPLEX = LICZBA.ZESP\nCONVERT = KONWERTUJ\nDEC2BIN = DZIES.NA.DWÓJK\nDEC2HEX = DZIES.NA.SZESN\nDEC2OCT = DZIES.NA.ÓSM\nDELTA = CZY.RÓWNE\nERF = FUNKCJA.BŁ\nERF.PRECISE = FUNKCJA.BŁ.DOKŁ\nERFC = KOMP.FUNKCJA.BŁ\nERFC.PRECISE = KOMP.FUNKCJA.BŁ.DOKŁ\nGESTEP = SPRAWDŹ.PRÓG\nHEX2BIN = SZESN.NA.DWÓJK\nHEX2DEC = SZESN.NA.DZIES\nHEX2OCT = SZESN.NA.ÓSM\nIMABS = MODUŁ.LICZBY.ZESP\nIMAGINARY = CZ.UROJ.LICZBY.ZESP\nIMARGUMENT = ARG.LICZBY.ZESP\nIMCONJUGATE = SPRZĘŻ.LICZBY.ZESP\nIMCOS = COS.LICZBY.ZESP\nIMCOSH = COSH.LICZBY.ZESP\nIMCOT = COT.LICZBY.ZESP\nIMCSC = CSC.LICZBY.ZESP\nIMCSCH = CSCH.LICZBY.ZESP\nIMDIV = ILORAZ.LICZB.ZESP\nIMEXP = EXP.LICZBY.ZESP\nIMLN = LN.LICZBY.ZESP\nIMLOG10 = LOG10.LICZBY.ZESP\nIMLOG2 = LOG2.LICZBY.ZESP\nIMPOWER = POTĘGA.LICZBY.ZESP\nIMPRODUCT = ILOCZYN.LICZB.ZESP\nIMREAL = CZ.RZECZ.LICZBY.ZESP\nIMSEC = SEC.LICZBY.ZESP\nIMSECH = SECH.LICZBY.ZESP\nIMSIN = SIN.LICZBY.ZESP\nIMSINH = SINH.LICZBY.ZESP\nIMSQRT = PIERWIASTEK.LICZBY.ZESP\nIMSUB = RÓŻN.LICZB.ZESP\nIMSUM = SUMA.LICZB.ZESP\nIMTAN = TAN.LICZBY.ZESP\nOCT2BIN = ÓSM.NA.DWÓJK\nOCT2DEC = ÓSM.NA.DZIES\nOCT2HEX = ÓSM.NA.SZESN\n\n##\n## Funkcje finansowe (Financial Functions)\n##\nACCRINT = NAL.ODS\nACCRINTM = NAL.ODS.WYKUP\nAMORDEGRC = AMORT.NIELIN\nAMORLINC = AMORT.LIN\nCOUPDAYBS = WYPŁ.DNI.OD.POCZ\nCOUPDAYS = WYPŁ.DNI\nCOUPDAYSNC = WYPŁ.DNI.NAST\nCOUPNCD = WYPŁ.DATA.NAST\nCOUPNUM = WYPŁ.LICZBA\nCOUPPCD = WYPŁ.DATA.POPRZ\nCUMIPMT = SPŁAC.ODS\nCUMPRINC = SPŁAC.KAPIT\nDB = DB\nDDB = DDB\nDISC = STOPA.DYSK\nDOLLARDE = CENA.DZIES\nDOLLARFR = CENA.UŁAM\nDURATION = ROCZ.PRZYCH\nEFFECT = EFEKTYWNA\nFV = FV\nFVSCHEDULE = WART.PRZYSZŁ.KAP\nINTRATE = STOPA.PROC\nIPMT = IPMT\nIRR = IRR\nISPMT = ISPMT\nMDURATION = ROCZ.PRZYCH.M\nMIRR = MIRR\nNOMINAL = NOMINALNA\nNPER = NPER\nNPV = NPV\nODDFPRICE = CENA.PIERW.OKR\nODDFYIELD = RENT.PIERW.OKR\nODDLPRICE = CENA.OST.OKR\nODDLYIELD = RENT.OST.OKR\nPDURATION = O.CZAS.TRWANIA\nPMT = PMT\nPPMT = PPMT\nPRICE = CENA\nPRICEDISC = CENA.DYSK\nPRICEMAT = CENA.WYKUP\nPV = PV\nRATE = RATE\nRECEIVED = KWOTA.WYKUP\nRRI = RÓWNOW.STOPA.PROC\nSLN = SLN\nSYD = SYD\nTBILLEQ = RENT.EKW.BS\nTBILLPRICE = CENA.BS\nTBILLYIELD = RENT.BS\nVDB = VDB\nXIRR = XIRR\nXNPV = XNPV\nYIELD = RENTOWNOŚĆ\nYIELDDISC = RENT.DYSK\nYIELDMAT = RENT.WYKUP\n\n##\n## Funkcje informacyjne (Information Functions)\n##\nCELL = KOMÓRKA\nERROR.TYPE = NR.BŁĘDU\nINFO = INFO\nISBLANK = CZY.PUSTA\nISERR = CZY.BŁ\nISERROR = CZY.BŁĄD\nISEVEN = CZY.PARZYSTE\nISFORMULA = CZY.FORMUŁA\nISLOGICAL = CZY.LOGICZNA\nISNA = CZY.BRAK\nISNONTEXT = CZY.NIE.TEKST\nISNUMBER = CZY.LICZBA\nISODD = CZY.NIEPARZYSTE\nISREF = CZY.ADR\nISTEXT = CZY.TEKST\nN = N\nNA = BRAK\nSHEET = ARKUSZ\nSHEETS = ARKUSZE\nTYPE = TYP\n\n##\n## Funkcje logiczne (Logical Functions)\n##\nAND = ORAZ\nFALSE = FAŁSZ\nIF = JEŻELI\nIFERROR = JEŻELI.BŁĄD\nIFNA = JEŻELI.ND\nIFS = WARUNKI\nNOT = NIE\nOR = LUB\nSWITCH = PRZEŁĄCZ\nTRUE = PRAWDA\nXOR = XOR\n\n##\n## Funkcje wyszukiwania i odwołań (Lookup & Reference Functions)\n##\nADDRESS = ADRES\nAREAS = OBSZARY\nCHOOSE = WYBIERZ\nCOLUMN = NR.KOLUMNY\nCOLUMNS = LICZBA.KOLUMN\nFORMULATEXT = FORMUŁA.TEKST\nGETPIVOTDATA = WEŹDANETABELI\nHLOOKUP = WYSZUKAJ.POZIOMO\nHYPERLINK = HIPERŁĄCZE\nINDEX = INDEKS\nINDIRECT = ADR.POŚR\nLOOKUP = WYSZUKAJ\nMATCH = PODAJ.POZYCJĘ\nOFFSET = PRZESUNIĘCIE\nROW = WIERSZ\nROWS = ILE.WIERSZY\nRTD = DANE.CZASU.RZECZ\nTRANSPOSE = TRANSPONUJ\nVLOOKUP = WYSZUKAJ.PIONOWO\n\n##\n## Funkcje matematyczne i trygonometryczne (Math & Trig Functions)\n##\nABS = MODUŁ.LICZBY\nACOS = ACOS\nACOSH = ACOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = AGREGUJ\nARABIC = ARABSKIE\nASIN = ASIN\nASINH = ASINH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nBASE = PODSTAWA\nCEILING.MATH = ZAOKR.W.GÓRĘ.MATEMATYCZNE\nCEILING.PRECISE = ZAOKR.W.GÓRĘ.DOKŁ\nCOMBIN = KOMBINACJE\nCOMBINA = KOMBINACJE.A\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = DZIESIĘTNA\nDEGREES = STOPNIE\nECMA.CEILING = ECMA.ZAOKR.W.GÓRĘ\nEVEN = ZAOKR.DO.PARZ\nEXP = EXP\nFACT = SILNIA\nFACTDOUBLE = SILNIA.DWUKR\nFLOOR.MATH = ZAOKR.W.DÓŁ.MATEMATYCZNE\nFLOOR.PRECISE = ZAOKR.W.DÓŁ.DOKŁ\nGCD = NAJW.WSP.DZIEL\nINT = ZAOKR.DO.CAŁK\nISO.CEILING = ISO.ZAOKR.W.GÓRĘ\nLCM = NAJMN.WSP.WIEL\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = WYZNACZNIK.MACIERZY\nMINVERSE = MACIERZ.ODW\nMMULT = MACIERZ.ILOCZYN\nMOD = MOD\nMROUND = ZAOKR.DO.WIELOKR\nMULTINOMIAL = WIELOMIAN\nMUNIT = MACIERZ.JEDNOSTKOWA\nODD = ZAOKR.DO.NPARZ\nPI = PI\nPOWER = POTĘGA\nPRODUCT = ILOCZYN\nQUOTIENT = CZ.CAŁK.DZIELENIA\nRADIANS = RADIANY\nRAND = LOS\nRANDBETWEEN = LOS.ZAKR\nROMAN = RZYMSKIE\nROUND = ZAOKR\nROUNDBAHTDOWN = ZAOKR.DÓŁ.BAT\nROUNDBAHTUP = ZAOKR.GÓRA.BAT\nROUNDDOWN = ZAOKR.DÓŁ\nROUNDUP = ZAOKR.GÓRA\nSEC = SEC\nSECH = SECH\nSERIESSUM = SUMA.SZER.POT\nSIGN = ZNAK.LICZBY\nSIN = SIN\nSINH = SINH\nSQRT = PIERWIASTEK\nSQRTPI = PIERW.PI\nSUBTOTAL = SUMY.CZĘŚCIOWE\nSUM = SUMA\nSUMIF = SUMA.JEŻELI\nSUMIFS = SUMA.WARUNKÓW\nSUMPRODUCT = SUMA.ILOCZYNÓW\nSUMSQ = SUMA.KWADRATÓW\nSUMX2MY2 = SUMA.X2.M.Y2\nSUMX2PY2 = SUMA.X2.P.Y2\nSUMXMY2 = SUMA.XMY.2\nTAN = TAN\nTANH = TANH\nTRUNC = LICZBA.CAŁK\n\n##\n## Funkcje statystyczne (Statistical Functions)\n##\nAVEDEV = ODCH.ŚREDNIE\nAVERAGE = ŚREDNIA\nAVERAGEA = ŚREDNIA.A\nAVERAGEIF = ŚREDNIA.JEŻELI\nAVERAGEIFS = ŚREDNIA.WARUNKÓW\nBETA.DIST = ROZKŁ.BETA\nBETA.INV = ROZKŁ.BETA.ODWR\nBINOM.DIST = ROZKŁ.DWUM\nBINOM.DIST.RANGE = ROZKŁ.DWUM.ZAKRES\nBINOM.INV = ROZKŁ.DWUM.ODWR\nCHISQ.DIST = ROZKŁ.CHI\nCHISQ.DIST.RT = ROZKŁ.CHI.PS\nCHISQ.INV = ROZKŁ.CHI.ODWR\nCHISQ.INV.RT = ROZKŁ.CHI.ODWR.PS\nCHISQ.TEST = CHI.TEST\nCONFIDENCE.NORM = UFNOŚĆ.NORM\nCONFIDENCE.T = UFNOŚĆ.T\nCORREL = WSP.KORELACJI\nCOUNT = ILE.LICZB\nCOUNTA = ILE.NIEPUSTYCH\nCOUNTBLANK = LICZ.PUSTE\nCOUNTIF = LICZ.JEŻELI\nCOUNTIFS = LICZ.WARUNKI\nCOVARIANCE.P = KOWARIANCJA.POPUL\nCOVARIANCE.S = KOWARIANCJA.PRÓBKI\nDEVSQ = ODCH.KWADRATOWE\nEXPON.DIST = ROZKŁ.EXP\nF.DIST = ROZKŁ.F\nF.DIST.RT = ROZKŁ.F.PS\nF.INV = ROZKŁ.F.ODWR\nF.INV.RT = ROZKŁ.F.ODWR.PS\nF.TEST = F.TEST\nFISHER = ROZKŁAD.FISHER\nFISHERINV = ROZKŁAD.FISHER.ODW\nFORECAST.ETS = REGLINX.ETS\nFORECAST.ETS.CONFINT = REGLINX.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = REGLINX.ETS.SEZONOWOŚĆ\nFORECAST.ETS.STAT = REGLINX.ETS.STATYSTYKA\nFORECAST.LINEAR = REGLINX.LINIOWA\nFREQUENCY = CZĘSTOŚĆ\nGAMMA = GAMMA\nGAMMA.DIST = ROZKŁ.GAMMA\nGAMMA.INV = ROZKŁ.GAMMA.ODWR\nGAMMALN = ROZKŁAD.LIN.GAMMA\nGAMMALN.PRECISE = ROZKŁAD.LIN.GAMMA.DOKŁ\nGAUSS = GAUSS\nGEOMEAN = ŚREDNIA.GEOMETRYCZNA\nGROWTH = REGEXPW\nHARMEAN = ŚREDNIA.HARMONICZNA\nHYPGEOM.DIST = ROZKŁ.HIPERGEOM\nINTERCEPT = ODCIĘTA\nKURT = KURTOZA\nLARGE = MAX.K\nLINEST = REGLINP\nLOGEST = REGEXPP\nLOGNORM.DIST = ROZKŁ.LOG\nLOGNORM.INV = ROZKŁ.LOG.ODWR\nMAX = MAX\nMAXA = MAX.A\nMAXIFS = MAKS.WARUNKÓW\nMEDIAN = MEDIANA\nMIN = MIN\nMINA = MIN.A\nMINIFS = MIN.WARUNKÓW\nMODE.MULT = WYST.NAJCZĘŚCIEJ.TABL\nMODE.SNGL = WYST.NAJCZĘŚCIEJ.WART\nNEGBINOM.DIST = ROZKŁ.DWUM.PRZEC\nNORM.DIST = ROZKŁ.NORMALNY\nNORM.INV = ROZKŁ.NORMALNY.ODWR\nNORM.S.DIST = ROZKŁ.NORMALNY.S\nNORM.S.INV = ROZKŁ.NORMALNY.S.ODWR\nPEARSON = PEARSON\nPERCENTILE.EXC = PERCENTYL.PRZEDZ.OTW\nPERCENTILE.INC = PERCENTYL.PRZEDZ.ZAMK\nPERCENTRANK.EXC = PROC.POZ.PRZEDZ.OTW\nPERCENTRANK.INC = PROC.POZ.PRZEDZ.ZAMK\nPERMUT = PERMUTACJE\nPERMUTATIONA = PERMUTACJE.A\nPHI = PHI\nPOISSON.DIST = ROZKŁ.POISSON\nPROB = PRAWDPD\nQUARTILE.EXC = KWARTYL.PRZEDZ.OTW\nQUARTILE.INC = KWARTYL.PRZEDZ.ZAMK\nRANK.AVG = POZYCJA.ŚR\nRANK.EQ = POZYCJA.NAJW\nRSQ = R.KWADRAT\nSKEW = SKOŚNOŚĆ\nSKEW.P = SKOŚNOŚĆ.P\nSLOPE = NACHYLENIE\nSMALL = MIN.K\nSTANDARDIZE = NORMALIZUJ\nSTDEV.P = ODCH.STAND.POPUL\nSTDEV.S = ODCH.STANDARD.PRÓBKI\nSTDEVA = ODCH.STANDARDOWE.A\nSTDEVPA = ODCH.STANDARD.POPUL.A\nSTEYX = REGBŁSTD\nT.DIST = ROZKŁ.T\nT.DIST.2T = ROZKŁ.T.DS\nT.DIST.RT = ROZKŁ.T.PS\nT.INV = ROZKŁ.T.ODWR\nT.INV.2T = ROZKŁ.T.ODWR.DS\nT.TEST = T.TEST\nTREND = REGLINW\nTRIMMEAN = ŚREDNIA.WEWN\nVAR.P = WARIANCJA.POP\nVAR.S = WARIANCJA.PRÓBKI\nVARA = WARIANCJA.A\nVARPA = WARIANCJA.POPUL.A\nWEIBULL.DIST = ROZKŁ.WEIBULL\nZ.TEST = Z.TEST\n\n##\n## Funkcje tekstowe (Text Functions)\n##\nBAHTTEXT = BAT.TEKST\nCHAR = ZNAK\nCLEAN = OCZYŚĆ\nCODE = KOD\nCONCAT = ZŁĄCZ.TEKST\nDOLLAR = KWOTA\nEXACT = PORÓWNAJ\nFIND = ZNAJDŹ\nFIXED = ZAOKR.DO.TEKST\nISTHAIDIGIT = CZY.CYFRA.TAJ\nLEFT = LEWY\nLEN = DŁ\nLOWER = LITERY.MAŁE\nMID = FRAGMENT.TEKSTU\nNUMBERSTRING = LICZBA.CIĄG.ZNAK\nNUMBERVALUE = WARTOŚĆ.LICZBOWA\nPROPER = Z.WIELKIEJ.LITERY\nREPLACE = ZASTĄP\nREPT = POWT\nRIGHT = PRAWY\nSEARCH = SZUKAJ.TEKST\nSUBSTITUTE = PODSTAW\nT = T\nTEXT = TEKST\nTEXTJOIN = POŁĄCZ.TEKSTY\nTHAIDIGIT = TAJ.CYFRA\nTHAINUMSOUND = TAJ.DŹWIĘK.NUM\nTHAINUMSTRING = TAJ.CIĄG.NUM\nTHAISTRINGLENGTH = TAJ.DŁUGOŚĆ.CIĄGU\nTRIM = USUŃ.ZBĘDNE.ODSTĘPY\nUNICHAR = ZNAK.UNICODE\nUNICODE = UNICODE\nUPPER = LITERY.WIELKIE\nVALUE = WARTOŚĆ\n\n##\n## Funkcje sieci Web (Web Functions)\n##\nENCODEURL = ENCODEURL\nFILTERXML = FILTERXML\nWEBSERVICE = WEBSERVICE\n\n##\n## Funkcje zgodności (Compatibility Functions)\n##\nBETADIST = ROZKŁAD.BETA\nBETAINV = ROZKŁAD.BETA.ODW\nBINOMDIST = ROZKŁAD.DWUM\nCEILING = ZAOKR.W.GÓRĘ\nCHIDIST = ROZKŁAD.CHI\nCHIINV = ROZKŁAD.CHI.ODW\nCHITEST = TEST.CHI\nCONCATENATE = ZŁĄCZ.TEKSTY\nCONFIDENCE = UFNOŚĆ\nCOVAR = KOWARIANCJA\nCRITBINOM = PRÓG.ROZKŁAD.DWUM\nEXPONDIST = ROZKŁAD.EXP\nFDIST = ROZKŁAD.F\nFINV = ROZKŁAD.F.ODW\nFLOOR = ZAOKR.W.DÓŁ\nFORECAST = REGLINX\nFTEST = TEST.F\nGAMMADIST = ROZKŁAD.GAMMA\nGAMMAINV = ROZKŁAD.GAMMA.ODW\nHYPGEOMDIST = ROZKŁAD.HIPERGEOM\nLOGINV = ROZKŁAD.LOG.ODW\nLOGNORMDIST = ROZKŁAD.LOG\nMODE = WYST.NAJCZĘŚCIEJ\nNEGBINOMDIST = ROZKŁAD.DWUM.PRZEC\nNORMDIST = ROZKŁAD.NORMALNY\nNORMINV = ROZKŁAD.NORMALNY.ODW\nNORMSDIST = ROZKŁAD.NORMALNY.S\nNORMSINV = ROZKŁAD.NORMALNY.S.ODW\nPERCENTILE = PERCENTYL\nPERCENTRANK = PROCENT.POZYCJA\nPOISSON = ROZKŁAD.POISSON\nQUARTILE = KWARTYL\nRANK = POZYCJA\nSTDEV = ODCH.STANDARDOWE\nSTDEVP = ODCH.STANDARD.POPUL\nTDIST = ROZKŁAD.T\nTINV = ROZKŁAD.T.ODW\nTTEST = TEST.T\nVAR = WARIANCJA\nVARP = WARIANCJA.POPUL\nWEIBULL = ROZKŁAD.WEIBULL\nZTEST = TEST.Z\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/pt/br/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Português Brasileiro (Brazilian Portuguese)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #NULO!\nDIV0\nVALUE = #VALOR!\nREF\nNAME = #NOME?\nNUM = #NÚM!\nNA = #N/D\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/pt/br/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Português Brasileiro (Brazilian Portuguese)\n##\n############################################################\n\n\n##\n## Funções de cubo (Cube Functions)\n##\nCUBEKPIMEMBER = MEMBROKPICUBO\nCUBEMEMBER = MEMBROCUBO\nCUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO\nCUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO\nCUBESET = CONJUNTOCUBO\nCUBESETCOUNT = CONTAGEMCONJUNTOCUBO\nCUBEVALUE = VALORCUBO\n\n##\n## Funções de banco de dados (Database Functions)\n##\nDAVERAGE = BDMÉDIA\nDCOUNT = BDCONTAR\nDCOUNTA = BDCONTARA\nDGET = BDEXTRAIR\nDMAX = BDMÁX\nDMIN = BDMÍN\nDPRODUCT = BDMULTIPL\nDSTDEV = BDEST\nDSTDEVP = BDDESVPA\nDSUM = BDSOMA\nDVAR = BDVAREST\nDVARP = BDVARP\n\n##\n## Funções de data e hora (Date & Time Functions)\n##\nDATE = DATA\nDATEDIF = DATADIF\nDATESTRING = DATA.SÉRIE\nDATEVALUE = DATA.VALOR\nDAY = DIA\nDAYS = DIAS\nDAYS360 = DIAS360\nEDATE = DATAM\nEOMONTH = FIMMÊS\nHOUR = HORA\nISOWEEKNUM = NÚMSEMANAISO\nMINUTE = MINUTO\nMONTH = MÊS\nNETWORKDAYS = DIATRABALHOTOTAL\nNETWORKDAYS.INTL = DIATRABALHOTOTAL.INTL\nNOW = AGORA\nSECOND = SEGUNDO\nTIME = TEMPO\nTIMEVALUE = VALOR.TEMPO\nTODAY = HOJE\nWEEKDAY = DIA.DA.SEMANA\nWEEKNUM = NÚMSEMANA\nWORKDAY = DIATRABALHO\nWORKDAY.INTL = DIATRABALHO.INTL\nYEAR = ANO\nYEARFRAC = FRAÇÃOANO\n\n##\n## Funções de engenharia (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BINADEC\nBIN2HEX = BINAHEX\nBIN2OCT = BINAOCT\nBITAND = BITAND\nBITLSHIFT = DESLOCESQBIT\nBITOR = BITOR\nBITRSHIFT = DESLOCDIRBIT\nBITXOR = BITXOR\nCOMPLEX = COMPLEXO\nCONVERT = CONVERTER\nDEC2BIN = DECABIN\nDEC2HEX = DECAHEX\nDEC2OCT = DECAOCT\nDELTA = DELTA\nERF = FUNERRO\nERF.PRECISE = FUNERRO.PRECISO\nERFC = FUNERROCOMPL\nERFC.PRECISE = FUNERROCOMPL.PRECISO\nGESTEP = DEGRAU\nHEX2BIN = HEXABIN\nHEX2DEC = HEXADEC\nHEX2OCT = HEXAOCT\nIMABS = IMABS\nIMAGINARY = IMAGINÁRIO\nIMARGUMENT = IMARG\nIMCONJUGATE = IMCONJ\nIMCOS = IMCOS\nIMCOSH = IMCOSH\nIMCOT = IMCOT\nIMCSC = IMCOSEC\nIMCSCH = IMCOSECH\nIMDIV = IMDIV\nIMEXP = IMEXP\nIMLN = IMLN\nIMLOG10 = IMLOG10\nIMLOG2 = IMLOG2\nIMPOWER = IMPOT\nIMPRODUCT = IMPROD\nIMREAL = IMREAL\nIMSEC = IMSEC\nIMSECH = IMSECH\nIMSIN = IMSENO\nIMSINH = IMSENH\nIMSQRT = IMRAIZ\nIMSUB = IMSUBTR\nIMSUM = IMSOMA\nIMTAN = IMTAN\nOCT2BIN = OCTABIN\nOCT2DEC = OCTADEC\nOCT2HEX = OCTAHEX\n\n##\n## Funções financeiras (Financial Functions)\n##\nACCRINT = JUROSACUM\nACCRINTM = JUROSACUMV\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = CUPDIASINLIQ\nCOUPDAYS = CUPDIAS\nCOUPDAYSNC = CUPDIASPRÓX\nCOUPNCD = CUPDATAPRÓX\nCOUPNUM = CUPNÚM\nCOUPPCD = CUPDATAANT\nCUMIPMT = PGTOJURACUM\nCUMPRINC = PGTOCAPACUM\nDB = BD\nDDB = BDD\nDISC = DESC\nDOLLARDE = MOEDADEC\nDOLLARFR = MOEDAFRA\nDURATION = DURAÇÃO\nEFFECT = EFETIVA\nFV = VF\nFVSCHEDULE = VFPLANO\nINTRATE = TAXAJUROS\nIPMT = IPGTO\nIRR = TIR\nISPMT = ÉPGTO\nMDURATION = MDURAÇÃO\nMIRR = MTIR\nNOMINAL = NOMINAL\nNPER = NPER\nNPV = VPL\nODDFPRICE = PREÇOPRIMINC\nODDFYIELD = LUCROPRIMINC\nODDLPRICE = PREÇOÚLTINC\nODDLYIELD = LUCROÚLTINC\nPDURATION = DURAÇÃOP\nPMT = PGTO\nPPMT = PPGTO\nPRICE = PREÇO\nPRICEDISC = PREÇODESC\nPRICEMAT = PREÇOVENC\nPV = VP\nRATE = TAXA\nRECEIVED = RECEBER\nRRI = TAXAJURO\nSLN = DPD\nSYD = SDA\nTBILLEQ = OTN\nTBILLPRICE = OTNVALOR\nTBILLYIELD = OTNLUCRO\nVDB = BDV\nXIRR = XTIR\nXNPV = XVPL\nYIELD = LUCRO\nYIELDDISC = LUCRODESC\nYIELDMAT = LUCROVENC\n\n##\n## Funções de informação (Information Functions)\n##\nCELL = CÉL\nERROR.TYPE = TIPO.ERRO\nINFO = INFORMAÇÃO\nISBLANK = ÉCÉL.VAZIA\nISERR = ÉERRO\nISERROR = ÉERROS\nISEVEN = ÉPAR\nISFORMULA = ÉFÓRMULA\nISLOGICAL = ÉLÓGICO\nISNA = É.NÃO.DISP\nISNONTEXT = É.NÃO.TEXTO\nISNUMBER = ÉNÚM\nISODD = ÉIMPAR\nISREF = ÉREF\nISTEXT = ÉTEXTO\nN = N\nNA = NÃO.DISP\nSHEET = PLAN\nSHEETS = PLANS\nTYPE = TIPO\n\n##\n## Funções lógicas (Logical Functions)\n##\nAND = E\nFALSE = FALSO\nIF = SE\nIFERROR = SEERRO\nIFNA = SENÃODISP\nIFS = SES\nNOT = NÃO\nOR = OU\nSWITCH = PARÂMETRO\nTRUE = VERDADEIRO\nXOR = XOR\n\n##\n## Funções de pesquisa e referência (Lookup & Reference Functions)\n##\nADDRESS = ENDEREÇO\nAREAS = ÁREAS\nCHOOSE = ESCOLHER\nCOLUMN = COL\nCOLUMNS = COLS\nFORMULATEXT = FÓRMULATEXTO\nGETPIVOTDATA = INFODADOSTABELADINÂMICA\nHLOOKUP = PROCH\nHYPERLINK = HIPERLINK\nINDEX = ÍNDICE\nINDIRECT = INDIRETO\nLOOKUP = PROC\nMATCH = CORRESP\nOFFSET = DESLOC\nROW = LIN\nROWS = LINS\nRTD = RTD\nTRANSPOSE = TRANSPOR\nVLOOKUP = PROCV\n*RC = LC\n\n##\n## Funções matemáticas e trigonométricas (Math & Trig Functions)\n##\nABS = ABS\nACOS = ACOS\nACOSH = ACOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = AGREGAR\nARABIC = ARÁBICO\nASIN = ASEN\nASINH = ASENH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nBASE = BASE\nCEILING.MATH = TETO.MAT\nCEILING.PRECISE = TETO.PRECISO\nCOMBIN = COMBIN\nCOMBINA = COMBINA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = COSEC\nCSCH = COSECH\nDECIMAL = DECIMAL\nDEGREES = GRAUS\nECMA.CEILING = ECMA.TETO\nEVEN = PAR\nEXP = EXP\nFACT = FATORIAL\nFACTDOUBLE = FATDUPLO\nFLOOR.MATH = ARREDMULTB.MAT\nFLOOR.PRECISE = ARREDMULTB.PRECISO\nGCD = MDC\nINT = INT\nISO.CEILING = ISO.TETO\nLCM = MMC\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MATRIZ.DETERM\nMINVERSE = MATRIZ.INVERSO\nMMULT = MATRIZ.MULT\nMOD = MOD\nMROUND = MARRED\nMULTINOMIAL = MULTINOMIAL\nMUNIT = MUNIT\nODD = ÍMPAR\nPI = PI\nPOWER = POTÊNCIA\nPRODUCT = MULT\nQUOTIENT = QUOCIENTE\nRADIANS = RADIANOS\nRAND = ALEATÓRIO\nRANDBETWEEN = ALEATÓRIOENTRE\nROMAN = ROMANO\nROUND = ARRED\nROUNDDOWN = ARREDONDAR.PARA.BAIXO\nROUNDUP = ARREDONDAR.PARA.CIMA\nSEC = SEC\nSECH = SECH\nSERIESSUM = SOMASEQÜÊNCIA\nSIGN = SINAL\nSIN = SEN\nSINH = SENH\nSQRT = RAIZ\nSQRTPI = RAIZPI\nSUBTOTAL = SUBTOTAL\nSUM = SOMA\nSUMIF = SOMASE\nSUMIFS = SOMASES\nSUMPRODUCT = SOMARPRODUTO\nSUMSQ = SOMAQUAD\nSUMX2MY2 = SOMAX2DY2\nSUMX2PY2 = SOMAX2SY2\nSUMXMY2 = SOMAXMY2\nTAN = TAN\nTANH = TANH\nTRUNC = TRUNCAR\n\n##\n## Funções estatísticas (Statistical Functions)\n##\nAVEDEV = DESV.MÉDIO\nAVERAGE = MÉDIA\nAVERAGEA = MÉDIAA\nAVERAGEIF = MÉDIASE\nAVERAGEIFS = MÉDIASES\nBETA.DIST = DIST.BETA\nBETA.INV = INV.BETA\nBINOM.DIST = DISTR.BINOM\nBINOM.DIST.RANGE = INTERV.DISTR.BINOM\nBINOM.INV = INV.BINOM\nCHISQ.DIST = DIST.QUIQUA\nCHISQ.DIST.RT = DIST.QUIQUA.CD\nCHISQ.INV = INV.QUIQUA\nCHISQ.INV.RT = INV.QUIQUA.CD\nCHISQ.TEST = TESTE.QUIQUA\nCONFIDENCE.NORM = INT.CONFIANÇA.NORM\nCONFIDENCE.T = INT.CONFIANÇA.T\nCORREL = CORREL\nCOUNT = CONT.NÚM\nCOUNTA = CONT.VALORES\nCOUNTBLANK = CONTAR.VAZIO\nCOUNTIF = CONT.SE\nCOUNTIFS = CONT.SES\nCOVARIANCE.P = COVARIAÇÃO.P\nCOVARIANCE.S = COVARIAÇÃO.S\nDEVSQ = DESVQ\nEXPON.DIST = DISTR.EXPON\nF.DIST = DIST.F\nF.DIST.RT = DIST.F.CD\nF.INV = INV.F\nF.INV.RT = INV.F.CD\nF.TEST = TESTE.F\nFISHER = FISHER\nFISHERINV = FISHERINV\nFORECAST.ETS = PREVISÃO.ETS\nFORECAST.ETS.CONFINT = PREVISÃO.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = PREVISÃO.ETS.SAZONALIDADE\nFORECAST.ETS.STAT = PREVISÃO.ETS.STAT\nFORECAST.LINEAR = PREVISÃO.LINEAR\nFREQUENCY = FREQÜÊNCIA\nGAMMA = GAMA\nGAMMA.DIST = DIST.GAMA\nGAMMA.INV = INV.GAMA\nGAMMALN = LNGAMA\nGAMMALN.PRECISE = LNGAMA.PRECISO\nGAUSS = GAUSS\nGEOMEAN = MÉDIA.GEOMÉTRICA\nGROWTH = CRESCIMENTO\nHARMEAN = MÉDIA.HARMÔNICA\nHYPGEOM.DIST = DIST.HIPERGEOM.N\nINTERCEPT = INTERCEPÇÃO\nKURT = CURT\nLARGE = MAIOR\nLINEST = PROJ.LIN\nLOGEST = PROJ.LOG\nLOGNORM.DIST = DIST.LOGNORMAL.N\nLOGNORM.INV = INV.LOGNORMAL\nMAX = MÁXIMO\nMAXA = MÁXIMOA\nMAXIFS = MÁXIMOSES\nMEDIAN = MED\nMIN = MÍNIMO\nMINA = MÍNIMOA\nMINIFS = MÍNIMOSES\nMODE.MULT = MODO.MULT\nMODE.SNGL = MODO.ÚNICO\nNEGBINOM.DIST = DIST.BIN.NEG.N\nNORM.DIST = DIST.NORM.N\nNORM.INV = INV.NORM.N\nNORM.S.DIST = DIST.NORMP.N\nNORM.S.INV = INV.NORMP.N\nPEARSON = PEARSON\nPERCENTILE.EXC = PERCENTIL.EXC\nPERCENTILE.INC = PERCENTIL.INC\nPERCENTRANK.EXC = ORDEM.PORCENTUAL.EXC\nPERCENTRANK.INC = ORDEM.PORCENTUAL.INC\nPERMUT = PERMUT\nPERMUTATIONA = PERMUTAS\nPHI = PHI\nPOISSON.DIST = DIST.POISSON\nPROB = PROB\nQUARTILE.EXC = QUARTIL.EXC\nQUARTILE.INC = QUARTIL.INC\nRANK.AVG = ORDEM.MÉD\nRANK.EQ = ORDEM.EQ\nRSQ = RQUAD\nSKEW = DISTORÇÃO\nSKEW.P = DISTORÇÃO.P\nSLOPE = INCLINAÇÃO\nSMALL = MENOR\nSTANDARDIZE = PADRONIZAR\nSTDEV.P = DESVPAD.P\nSTDEV.S = DESVPAD.A\nSTDEVA = DESVPADA\nSTDEVPA = DESVPADPA\nSTEYX = EPADYX\nT.DIST = DIST.T\nT.DIST.2T = DIST.T.BC\nT.DIST.RT = DIST.T.CD\nT.INV = INV.T\nT.INV.2T = INV.T.BC\nT.TEST = TESTE.T\nTREND = TENDÊNCIA\nTRIMMEAN = MÉDIA.INTERNA\nVAR.P = VAR.P\nVAR.S = VAR.A\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = DIST.WEIBULL\nZ.TEST = TESTE.Z\n\n##\n## Funções de texto (Text Functions)\n##\nBAHTTEXT = BAHTTEXT\nCHAR = CARACT\nCLEAN = TIRAR\nCODE = CÓDIGO\nCONCAT = CONCAT\nDOLLAR = MOEDA\nEXACT = EXATO\nFIND = PROCURAR\nFIXED = DEF.NÚM.DEC\nLEFT = ESQUERDA\nLEN = NÚM.CARACT\nLOWER = MINÚSCULA\nMID = EXT.TEXTO\nNUMBERSTRING = SEQÜÊNCIA.NÚMERO\nNUMBERVALUE = VALORNUMÉRICO\nPHONETIC = FONÉTICA\nPROPER = PRI.MAIÚSCULA\nREPLACE = MUDAR\nREPT = REPT\nRIGHT = DIREITA\nSEARCH = LOCALIZAR\nSUBSTITUTE = SUBSTITUIR\nT = T\nTEXT = TEXTO\nTEXTJOIN = UNIRTEXTO\nTRIM = ARRUMAR\nUNICHAR = CARACTUNICODE\nUNICODE = UNICODE\nUPPER = MAIÚSCULA\nVALUE = VALOR\n\n##\n## Funções da Web (Web Functions)\n##\nENCODEURL = CODIFURL\nFILTERXML = FILTROXML\nWEBSERVICE = SERVIÇOWEB\n\n##\n## Funções de compatibilidade (Compatibility Functions)\n##\nBETADIST = DISTBETA\nBETAINV = BETA.ACUM.INV\nBINOMDIST = DISTRBINOM\nCEILING = TETO\nCHIDIST = DIST.QUI\nCHIINV = INV.QUI\nCHITEST = TESTE.QUI\nCONCATENATE = CONCATENAR\nCONFIDENCE = INT.CONFIANÇA\nCOVAR = COVAR\nCRITBINOM = CRIT.BINOM\nEXPONDIST = DISTEXPON\nFDIST = DISTF\nFINV = INVF\nFLOOR = ARREDMULTB\nFORECAST = PREVISÃO\nFTEST = TESTEF\nGAMMADIST = DISTGAMA\nGAMMAINV = INVGAMA\nHYPGEOMDIST = DIST.HIPERGEOM\nLOGINV = INVLOG\nLOGNORMDIST = DIST.LOGNORMAL\nMODE = MODO\nNEGBINOMDIST = DIST.BIN.NEG\nNORMDIST = DISTNORM\nNORMINV = INV.NORM\nNORMSDIST = DISTNORMP\nNORMSINV = INV.NORMP\nPERCENTILE = PERCENTIL\nPERCENTRANK = ORDEM.PORCENTUAL\nPOISSON = POISSON\nQUARTILE = QUARTIL\nRANK = ORDEM\nSTDEV = DESVPAD\nSTDEVP = DESVPADP\nTDIST = DISTT\nTINV = INVT\nTTEST = TESTET\nVAR = VAR\nVARP = VARP\nWEIBULL = WEIBULL\nZTEST = TESTEZ\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/pt/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Português (Portuguese)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #NULO!\nDIV0\nVALUE = #VALOR!\nREF\nNAME = #NOME?\nNUM = #NÚM!\nNA = #N/D\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/pt/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Português (Portuguese)\n##\n############################################################\n\n\n##\n## Funções de cubo (Cube Functions)\n##\nCUBEKPIMEMBER = MEMBROKPICUBO\nCUBEMEMBER = MEMBROCUBO\nCUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO\nCUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO\nCUBESET = CONJUNTOCUBO\nCUBESETCOUNT = CONTARCONJUNTOCUBO\nCUBEVALUE = VALORCUBO\n\n##\n## Funções de base de dados (Database Functions)\n##\nDAVERAGE = BDMÉDIA\nDCOUNT = BDCONTAR\nDCOUNTA = BDCONTAR.VAL\nDGET = BDOBTER\nDMAX = BDMÁX\nDMIN = BDMÍN\nDPRODUCT = BDMULTIPL\nDSTDEV = BDDESVPAD\nDSTDEVP = BDDESVPADP\nDSUM = BDSOMA\nDVAR = BDVAR\nDVARP = BDVARP\n\n##\n## Funções de data e hora (Date & Time Functions)\n##\nDATE = DATA\nDATEDIF = DATADIF\nDATESTRING = DATA.CADEIA\nDATEVALUE = DATA.VALOR\nDAY = DIA\nDAYS = DIAS\nDAYS360 = DIAS360\nEDATE = DATAM\nEOMONTH = FIMMÊS\nHOUR = HORA\nISOWEEKNUM = NUMSEMANAISO\nMINUTE = MINUTO\nMONTH = MÊS\nNETWORKDAYS = DIATRABALHOTOTAL\nNETWORKDAYS.INTL = DIATRABALHOTOTAL.INTL\nNOW = AGORA\nSECOND = SEGUNDO\nTHAIDAYOFWEEK = DIA.DA.SEMANA.TAILANDÊS\nTHAIMONTHOFYEAR = MÊS.DO.ANO.TAILANDÊS\nTHAIYEAR = ANO.TAILANDÊS\nTIME = TEMPO\nTIMEVALUE = VALOR.TEMPO\nTODAY = HOJE\nWEEKDAY = DIA.SEMANA\nWEEKNUM = NÚMSEMANA\nWORKDAY = DIATRABALHO\nWORKDAY.INTL = DIATRABALHO.INTL\nYEAR = ANO\nYEARFRAC = FRAÇÃOANO\n\n##\n## Funções de engenharia (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BINADEC\nBIN2HEX = BINAHEX\nBIN2OCT = BINAOCT\nBITAND = BIT.E\nBITLSHIFT = BITDESL.ESQ\nBITOR = BIT.OU\nBITRSHIFT = BITDESL.DIR\nBITXOR = BIT.XOU\nCOMPLEX = COMPLEXO\nCONVERT = CONVERTER\nDEC2BIN = DECABIN\nDEC2HEX = DECAHEX\nDEC2OCT = DECAOCT\nDELTA = DELTA\nERF = FUNCERRO\nERF.PRECISE = FUNCERRO.PRECISO\nERFC = FUNCERROCOMPL\nERFC.PRECISE = FUNCERROCOMPL.PRECISO\nGESTEP = DEGRAU\nHEX2BIN = HEXABIN\nHEX2DEC = HEXADEC\nHEX2OCT = HEXAOCT\nIMABS = IMABS\nIMAGINARY = IMAGINÁRIO\nIMARGUMENT = IMARG\nIMCONJUGATE = IMCONJ\nIMCOS = IMCOS\nIMCOSH = IMCOSH\nIMCOT = IMCOT\nIMCSC = IMCSC\nIMCSCH = IMCSCH\nIMDIV = IMDIV\nIMEXP = IMEXP\nIMLN = IMLN\nIMLOG10 = IMLOG10\nIMLOG2 = IMLOG2\nIMPOWER = IMPOT\nIMPRODUCT = IMPROD\nIMREAL = IMREAL\nIMSEC = IMSEC\nIMSECH = IMSECH\nIMSIN = IMSENO\nIMSINH = IMSENOH\nIMSQRT = IMRAIZ\nIMSUB = IMSUBTR\nIMSUM = IMSOMA\nIMTAN = IMTAN\nOCT2BIN = OCTABIN\nOCT2DEC = OCTADEC\nOCT2HEX = OCTAHEX\n\n##\n## Funções financeiras (Financial Functions)\n##\nACCRINT = JUROSACUM\nACCRINTM = JUROSACUMV\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = CUPDIASINLIQ\nCOUPDAYS = CUPDIAS\nCOUPDAYSNC = CUPDIASPRÓX\nCOUPNCD = CUPDATAPRÓX\nCOUPNUM = CUPNÚM\nCOUPPCD = CUPDATAANT\nCUMIPMT = PGTOJURACUM\nCUMPRINC = PGTOCAPACUM\nDB = BD\nDDB = BDD\nDISC = DESC\nDOLLARDE = MOEDADEC\nDOLLARFR = MOEDAFRA\nDURATION = DURAÇÃO\nEFFECT = EFETIVA\nFV = VF\nFVSCHEDULE = VFPLANO\nINTRATE = TAXAJUROS\nIPMT = IPGTO\nIRR = TIR\nISPMT = É.PGTO\nMDURATION = MDURAÇÃO\nMIRR = MTIR\nNOMINAL = NOMINAL\nNPER = NPER\nNPV = VAL\nODDFPRICE = PREÇOPRIMINC\nODDFYIELD = LUCROPRIMINC\nODDLPRICE = PREÇOÚLTINC\nODDLYIELD = LUCROÚLTINC\nPDURATION = PDURAÇÃO\nPMT = PGTO\nPPMT = PPGTO\nPRICE = PREÇO\nPRICEDISC = PREÇODESC\nPRICEMAT = PREÇOVENC\nPV = VA\nRATE = TAXA\nRECEIVED = RECEBER\nRRI = DEVOLVERTAXAJUROS\nSLN = AMORT\nSYD = AMORTD\nTBILLEQ = OTN\nTBILLPRICE = OTNVALOR\nTBILLYIELD = OTNLUCRO\nVDB = BDV\nXIRR = XTIR\nXNPV = XVAL\nYIELD = LUCRO\nYIELDDISC = LUCRODESC\nYIELDMAT = LUCROVENC\n\n##\n## Funções de informação (Information Functions)\n##\nCELL = CÉL\nERROR.TYPE = TIPO.ERRO\nINFO = INFORMAÇÃO\nISBLANK = É.CÉL.VAZIA\nISERR = É.ERROS\nISERROR = É.ERRO\nISEVEN = ÉPAR\nISFORMULA = É.FORMULA\nISLOGICAL = É.LÓGICO\nISNA = É.NÃO.DISP\nISNONTEXT = É.NÃO.TEXTO\nISNUMBER = É.NÚM\nISODD = ÉÍMPAR\nISREF = É.REF\nISTEXT = É.TEXTO\nN = N\nNA = NÃO.DISP\nSHEET = FOLHA\nSHEETS = FOLHAS\nTYPE = TIPO\n\n##\n## Funções lógicas (Logical Functions)\n##\nAND = E\nFALSE = FALSO\nIF = SE\nIFERROR = SE.ERRO\nIFNA = SEND\nIFS = SE.S\nNOT = NÃO\nOR = OU\nSWITCH = PARÂMETRO\nTRUE = VERDADEIRO\nXOR = XOU\n\n##\n## Funções de pesquisa e referência (Lookup & Reference Functions)\n##\nADDRESS = ENDEREÇO\nAREAS = ÁREAS\nCHOOSE = SELECIONAR\nCOLUMN = COL\nCOLUMNS = COLS\nFORMULATEXT = FÓRMULA.TEXTO\nGETPIVOTDATA = OBTERDADOSDIN\nHLOOKUP = PROCH\nHYPERLINK = HIPERLIGAÇÃO\nINDEX = ÍNDICE\nINDIRECT = INDIRETO\nLOOKUP = PROC\nMATCH = CORRESP\nOFFSET = DESLOCAMENTO\nROW = LIN\nROWS = LINS\nRTD = RTD\nTRANSPOSE = TRANSPOR\nVLOOKUP = PROCV\n*RC = LC\n\n##\n## Funções matemáticas e trigonométricas (Math & Trig Functions)\n##\nABS = ABS\nACOS = ACOS\nACOSH = ACOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = AGREGAR\nARABIC = ÁRABE\nASIN = ASEN\nASINH = ASENH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nBASE = BASE\nCEILING.MATH = ARRED.EXCESSO.MAT\nCEILING.PRECISE = ARRED.EXCESSO.PRECISO\nCOMBIN = COMBIN\nCOMBINA = COMBIN.R\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = DECIMAL\nDEGREES = GRAUS\nECMA.CEILING = ARRED.EXCESSO.ECMA\nEVEN = PAR\nEXP = EXP\nFACT = FATORIAL\nFACTDOUBLE = FATDUPLO\nFLOOR.MATH = ARRED.DEFEITO.MAT\nFLOOR.PRECISE = ARRED.DEFEITO.PRECISO\nGCD = MDC\nINT = INT\nISO.CEILING = ARRED.EXCESSO.ISO\nLCM = MMC\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MATRIZ.DETERM\nMINVERSE = MATRIZ.INVERSA\nMMULT = MATRIZ.MULT\nMOD = RESTO\nMROUND = MARRED\nMULTINOMIAL = POLINOMIAL\nMUNIT = UNIDM\nODD = ÍMPAR\nPI = PI\nPOWER = POTÊNCIA\nPRODUCT = PRODUTO\nQUOTIENT = QUOCIENTE\nRADIANS = RADIANOS\nRAND = ALEATÓRIO\nRANDBETWEEN = ALEATÓRIOENTRE\nROMAN = ROMANO\nROUND = ARRED\nROUNDBAHTDOWN = ARREDOND.BAHT.BAIXO\nROUNDBAHTUP = ARREDOND.BAHT.CIMA\nROUNDDOWN = ARRED.PARA.BAIXO\nROUNDUP = ARRED.PARA.CIMA\nSEC = SEC\nSECH = SECH\nSERIESSUM = SOMASÉRIE\nSIGN = SINAL\nSIN = SEN\nSINH = SENH\nSQRT = RAIZQ\nSQRTPI = RAIZPI\nSUBTOTAL = SUBTOTAL\nSUM = SOMA\nSUMIF = SOMA.SE\nSUMIFS = SOMA.SE.S\nSUMPRODUCT = SOMARPRODUTO\nSUMSQ = SOMARQUAD\nSUMX2MY2 = SOMAX2DY2\nSUMX2PY2 = SOMAX2SY2\nSUMXMY2 = SOMAXMY2\nTAN = TAN\nTANH = TANH\nTRUNC = TRUNCAR\n\n##\n## Funções estatísticas (Statistical Functions)\n##\nAVEDEV = DESV.MÉDIO\nAVERAGE = MÉDIA\nAVERAGEA = MÉDIAA\nAVERAGEIF = MÉDIA.SE\nAVERAGEIFS = MÉDIA.SE.S\nBETA.DIST = DIST.BETA\nBETA.INV = INV.BETA\nBINOM.DIST = DISTR.BINOM\nBINOM.DIST.RANGE = DIST.BINOM.INTERVALO\nBINOM.INV = INV.BINOM\nCHISQ.DIST = DIST.CHIQ\nCHISQ.DIST.RT = DIST.CHIQ.DIR\nCHISQ.INV = INV.CHIQ\nCHISQ.INV.RT = INV.CHIQ.DIR\nCHISQ.TEST = TESTE.CHIQ\nCONFIDENCE.NORM = INT.CONFIANÇA.NORM\nCONFIDENCE.T = INT.CONFIANÇA.T\nCORREL = CORREL\nCOUNT = CONTAR\nCOUNTA = CONTAR.VAL\nCOUNTBLANK = CONTAR.VAZIO\nCOUNTIF = CONTAR.SE\nCOUNTIFS = CONTAR.SE.S\nCOVARIANCE.P = COVARIÂNCIA.P\nCOVARIANCE.S = COVARIÂNCIA.S\nDEVSQ = DESVQ\nEXPON.DIST = DIST.EXPON\nF.DIST = DIST.F\nF.DIST.RT = DIST.F.DIR\nF.INV = INV.F\nF.INV.RT = INV.F.DIR\nF.TEST = TESTE.F\nFISHER = FISHER\nFISHERINV = FISHERINV\nFORECAST.ETS = PREVISÃO.ETS\nFORECAST.ETS.CONFINT = PREVISÃO.ETS.CONFINT\nFORECAST.ETS.SEASONALITY = PREVISÃO.ETS.SAZONALIDADE\nFORECAST.ETS.STAT = PREVISÃO.ETS.ESTATÍSTICA\nFORECAST.LINEAR = PREVISÃO.LINEAR\nFREQUENCY = FREQUÊNCIA\nGAMMA = GAMA\nGAMMA.DIST = DIST.GAMA\nGAMMA.INV = INV.GAMA\nGAMMALN = LNGAMA\nGAMMALN.PRECISE = LNGAMA.PRECISO\nGAUSS = GAUSS\nGEOMEAN = MÉDIA.GEOMÉTRICA\nGROWTH = CRESCIMENTO\nHARMEAN = MÉDIA.HARMÓNICA\nHYPGEOM.DIST = DIST.HIPGEOM\nINTERCEPT = INTERCETAR\nKURT = CURT\nLARGE = MAIOR\nLINEST = PROJ.LIN\nLOGEST = PROJ.LOG\nLOGNORM.DIST = DIST.NORMLOG\nLOGNORM.INV = INV.NORMALLOG\nMAX = MÁXIMO\nMAXA = MÁXIMOA\nMAXIFS = MÁXIMO.SE.S\nMEDIAN = MED\nMIN = MÍNIMO\nMINA = MÍNIMOA\nMINIFS = MÍNIMO.SE.S\nMODE.MULT = MODO.MÚLT\nMODE.SNGL = MODO.SIMPLES\nNEGBINOM.DIST = DIST.BINOM.NEG\nNORM.DIST = DIST.NORMAL\nNORM.INV = INV.NORMAL\nNORM.S.DIST = DIST.S.NORM\nNORM.S.INV = INV.S.NORM\nPEARSON = PEARSON\nPERCENTILE.EXC = PERCENTIL.EXC\nPERCENTILE.INC = PERCENTIL.INC\nPERCENTRANK.EXC = ORDEM.PERCENTUAL.EXC\nPERCENTRANK.INC = ORDEM.PERCENTUAL.INC\nPERMUT = PERMUTAR\nPERMUTATIONA = PERMUTAR.R\nPHI = PHI\nPOISSON.DIST = DIST.POISSON\nPROB = PROB\nQUARTILE.EXC = QUARTIL.EXC\nQUARTILE.INC = QUARTIL.INC\nRANK.AVG = ORDEM.MÉD\nRANK.EQ = ORDEM.EQ\nRSQ = RQUAD\nSKEW = DISTORÇÃO\nSKEW.P = DISTORÇÃO.P\nSLOPE = DECLIVE\nSMALL = MENOR\nSTANDARDIZE = NORMALIZAR\nSTDEV.P = DESVPAD.P\nSTDEV.S = DESVPAD.S\nSTDEVA = DESVPADA\nSTDEVPA = DESVPADPA\nSTEYX = EPADYX\nT.DIST = DIST.T\nT.DIST.2T = DIST.T.2C\nT.DIST.RT = DIST.T.DIR\nT.INV = INV.T\nT.INV.2T = INV.T.2C\nT.TEST = TESTE.T\nTREND = TENDÊNCIA\nTRIMMEAN = MÉDIA.INTERNA\nVAR.P = VAR.P\nVAR.S = VAR.S\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = DIST.WEIBULL\nZ.TEST = TESTE.Z\n\n##\n## Funções de texto (Text Functions)\n##\nBAHTTEXT = TEXTO.BAHT\nCHAR = CARÁT\nCLEAN = LIMPARB\nCODE = CÓDIGO\nCONCAT = CONCAT\nDOLLAR = MOEDA\nEXACT = EXATO\nFIND = LOCALIZAR\nFIXED = FIXA\nISTHAIDIGIT = É.DÍGITO.TAILANDÊS\nLEFT = ESQUERDA\nLEN = NÚM.CARAT\nLOWER = MINÚSCULAS\nMID = SEG.TEXTO\nNUMBERSTRING = NÚMERO.CADEIA\nNUMBERVALUE = VALOR.NÚMERO\nPHONETIC = FONÉTICA\nPROPER = INICIAL.MAIÚSCULA\nREPLACE = SUBSTITUIR\nREPT = REPETIR\nRIGHT = DIREITA\nSEARCH = PROCURAR\nSUBSTITUTE = SUBST\nT = T\nTEXT = TEXTO\nTEXTJOIN = UNIRTEXTO\nTHAIDIGIT = DÍGITO.TAILANDÊS\nTHAINUMSOUND = SOM.NÚM.TAILANDÊS\nTHAINUMSTRING = CADEIA.NÚM.TAILANDÊS\nTHAISTRINGLENGTH = COMP.CADEIA.TAILANDÊS\nTRIM = COMPACTAR\nUNICHAR = UNICARÁT\nUNICODE = UNICODE\nUPPER = MAIÚSCULAS\nVALUE = VALOR\n\n##\n## Funções da Web (Web Functions)\n##\nENCODEURL = CODIFICAÇÃOURL\nFILTERXML = FILTRARXML\nWEBSERVICE = SERVIÇOWEB\n\n##\n## Funções de compatibilidade (Compatibility Functions)\n##\nBETADIST = DISTBETA\nBETAINV = BETA.ACUM.INV\nBINOMDIST = DISTRBINOM\nCEILING = ARRED.EXCESSO\nCHIDIST = DIST.CHI\nCHIINV = INV.CHI\nCHITEST = TESTE.CHI\nCONCATENATE = CONCATENAR\nCONFIDENCE = INT.CONFIANÇA\nCOVAR = COVAR\nCRITBINOM = CRIT.BINOM\nEXPONDIST = DISTEXPON\nFDIST = DISTF\nFINV = INVF\nFLOOR = ARRED.DEFEITO\nFORECAST = PREVISÃO\nFTEST = TESTEF\nGAMMADIST = DISTGAMA\nGAMMAINV = INVGAMA\nHYPGEOMDIST = DIST.HIPERGEOM\nLOGINV = INVLOG\nLOGNORMDIST = DIST.NORMALLOG\nMODE = MODA\nNEGBINOMDIST = DIST.BIN.NEG\nNORMDIST = DIST.NORM\nNORMINV = INV.NORM\nNORMSDIST = DIST.NORMP\nNORMSINV = INV.NORMP\nPERCENTILE = PERCENTIL\nPERCENTRANK = ORDEM.PERCENTUAL\nPOISSON = POISSON\nQUARTILE = QUARTIL\nRANK = ORDEM\nSTDEV = DESVPAD\nSTDEVP = DESVPADP\nTDIST = DISTT\nTINV = INVT\nTTEST = TESTET\nVAR = VAR\nVARP = VARP\nWEIBULL = WEIBULL\nZTEST = TESTEZ\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/ru/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## русский язык (Russian)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #ПУСТО!\nDIV0 = #ДЕЛ/0!\nVALUE = #ЗНАЧ!\nREF = #ССЫЛКА!\nNAME = #ИМЯ?\nNUM = #ЧИСЛО!\nNA = #Н/Д\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/ru/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## русский язык (Russian)\n##\n############################################################\n\n\n##\n## Функции кубов (Cube Functions)\n##\nCUBEKPIMEMBER = КУБЭЛЕМЕНТКИП\nCUBEMEMBER = КУБЭЛЕМЕНТ\nCUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА\nCUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ\nCUBESET = КУБМНОЖ\nCUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ\nCUBEVALUE = КУБЗНАЧЕНИЕ\n\n##\n## Функции для работы с базами данных (Database Functions)\n##\nDAVERAGE = ДСРЗНАЧ\nDCOUNT = БСЧЁТ\nDCOUNTA = БСЧЁТА\nDGET = БИЗВЛЕЧЬ\nDMAX = ДМАКС\nDMIN = ДМИН\nDPRODUCT = БДПРОИЗВЕД\nDSTDEV = ДСТАНДОТКЛ\nDSTDEVP = ДСТАНДОТКЛП\nDSUM = БДСУММ\nDVAR = БДДИСП\nDVARP = БДДИСПП\n\n##\n## Функции даты и времени (Date & Time Functions)\n##\nDATE = ДАТА\nDATEDIF = РАЗНДАТ\nDATESTRING = СТРОКАДАННЫХ\nDATEVALUE = ДАТАЗНАЧ\nDAY = ДЕНЬ\nDAYS = ДНИ\nDAYS360 = ДНЕЙ360\nEDATE = ДАТАМЕС\nEOMONTH = КОНМЕСЯЦА\nHOUR = ЧАС\nISOWEEKNUM = НОМНЕДЕЛИ.ISO\nMINUTE = МИНУТЫ\nMONTH = МЕСЯЦ\nNETWORKDAYS = ЧИСТРАБДНИ\nNETWORKDAYS.INTL = ЧИСТРАБДНИ.МЕЖД\nNOW = ТДАТА\nSECOND = СЕКУНДЫ\nTHAIDAYOFWEEK = ТАЙДЕНЬНЕД\nTHAIMONTHOFYEAR = ТАЙМЕСЯЦ\nTHAIYEAR = ТАЙГОД\nTIME = ВРЕМЯ\nTIMEVALUE = ВРЕМЗНАЧ\nTODAY = СЕГОДНЯ\nWEEKDAY = ДЕНЬНЕД\nWEEKNUM = НОМНЕДЕЛИ\nWORKDAY = РАБДЕНЬ\nWORKDAY.INTL = РАБДЕНЬ.МЕЖД\nYEAR = ГОД\nYEARFRAC = ДОЛЯГОДА\n\n##\n## Инженерные функции (Engineering Functions)\n##\nBESSELI = БЕССЕЛЬ.I\nBESSELJ = БЕССЕЛЬ.J\nBESSELK = БЕССЕЛЬ.K\nBESSELY = БЕССЕЛЬ.Y\nBIN2DEC = ДВ.В.ДЕС\nBIN2HEX = ДВ.В.ШЕСТН\nBIN2OCT = ДВ.В.ВОСЬМ\nBITAND = БИТ.И\nBITLSHIFT = БИТ.СДВИГЛ\nBITOR = БИТ.ИЛИ\nBITRSHIFT = БИТ.СДВИГП\nBITXOR = БИТ.ИСКЛИЛИ\nCOMPLEX = КОМПЛЕКСН\nCONVERT = ПРЕОБР\nDEC2BIN = ДЕС.В.ДВ\nDEC2HEX = ДЕС.В.ШЕСТН\nDEC2OCT = ДЕС.В.ВОСЬМ\nDELTA = ДЕЛЬТА\nERF = ФОШ\nERF.PRECISE = ФОШ.ТОЧН\nERFC = ДФОШ\nERFC.PRECISE = ДФОШ.ТОЧН\nGESTEP = ПОРОГ\nHEX2BIN = ШЕСТН.В.ДВ\nHEX2DEC = ШЕСТН.В.ДЕС\nHEX2OCT = ШЕСТН.В.ВОСЬМ\nIMABS = МНИМ.ABS\nIMAGINARY = МНИМ.ЧАСТЬ\nIMARGUMENT = МНИМ.АРГУМЕНТ\nIMCONJUGATE = МНИМ.СОПРЯЖ\nIMCOS = МНИМ.COS\nIMCOSH = МНИМ.COSH\nIMCOT = МНИМ.COT\nIMCSC = МНИМ.CSC\nIMCSCH = МНИМ.CSCH\nIMDIV = МНИМ.ДЕЛ\nIMEXP = МНИМ.EXP\nIMLN = МНИМ.LN\nIMLOG10 = МНИМ.LOG10\nIMLOG2 = МНИМ.LOG2\nIMPOWER = МНИМ.СТЕПЕНЬ\nIMPRODUCT = МНИМ.ПРОИЗВЕД\nIMREAL = МНИМ.ВЕЩ\nIMSEC = МНИМ.SEC\nIMSECH = МНИМ.SECH\nIMSIN = МНИМ.SIN\nIMSINH = МНИМ.SINH\nIMSQRT = МНИМ.КОРЕНЬ\nIMSUB = МНИМ.РАЗН\nIMSUM = МНИМ.СУММ\nIMTAN = МНИМ.TAN\nOCT2BIN = ВОСЬМ.В.ДВ\nOCT2DEC = ВОСЬМ.В.ДЕС\nOCT2HEX = ВОСЬМ.В.ШЕСТН\n\n##\n## Финансовые функции (Financial Functions)\n##\nACCRINT = НАКОПДОХОД\nACCRINTM = НАКОПДОХОДПОГАШ\nAMORDEGRC = АМОРУМ\nAMORLINC = АМОРУВ\nCOUPDAYBS = ДНЕЙКУПОНДО\nCOUPDAYS = ДНЕЙКУПОН\nCOUPDAYSNC = ДНЕЙКУПОНПОСЛЕ\nCOUPNCD = ДАТАКУПОНПОСЛЕ\nCOUPNUM = ЧИСЛКУПОН\nCOUPPCD = ДАТАКУПОНДО\nCUMIPMT = ОБЩПЛАТ\nCUMPRINC = ОБЩДОХОД\nDB = ФУО\nDDB = ДДОБ\nDISC = СКИДКА\nDOLLARDE = РУБЛЬ.ДЕС\nDOLLARFR = РУБЛЬ.ДРОБЬ\nDURATION = ДЛИТ\nEFFECT = ЭФФЕКТ\nFV = БС\nFVSCHEDULE = БЗРАСПИС\nINTRATE = ИНОРМА\nIPMT = ПРПЛТ\nIRR = ВСД\nISPMT = ПРОЦПЛАТ\nMDURATION = МДЛИТ\nMIRR = МВСД\nNOMINAL = НОМИНАЛ\nNPER = КПЕР\nNPV = ЧПС\nODDFPRICE = ЦЕНАПЕРВНЕРЕГ\nODDFYIELD = ДОХОДПЕРВНЕРЕГ\nODDLPRICE = ЦЕНАПОСЛНЕРЕГ\nODDLYIELD = ДОХОДПОСЛНЕРЕГ\nPDURATION = ПДЛИТ\nPMT = ПЛТ\nPPMT = ОСПЛТ\nPRICE = ЦЕНА\nPRICEDISC = ЦЕНАСКИДКА\nPRICEMAT = ЦЕНАПОГАШ\nPV = ПС\nRATE = СТАВКА\nRECEIVED = ПОЛУЧЕНО\nRRI = ЭКВ.СТАВКА\nSLN = АПЛ\nSYD = АСЧ\nTBILLEQ = РАВНОКЧЕК\nTBILLPRICE = ЦЕНАКЧЕК\nTBILLYIELD = ДОХОДКЧЕК\nUSDOLLAR = ДОЛЛСША\nVDB = ПУО\nXIRR = ЧИСТВНДОХ\nXNPV = ЧИСТНЗ\nYIELD = ДОХОД\nYIELDDISC = ДОХОДСКИДКА\nYIELDMAT = ДОХОДПОГАШ\n\n##\n## Информационные функции (Information Functions)\n##\nCELL = ЯЧЕЙКА\nERROR.TYPE = ТИП.ОШИБКИ\nINFO = ИНФОРМ\nISBLANK = ЕПУСТО\nISERR = ЕОШ\nISERROR = ЕОШИБКА\nISEVEN = ЕЧЁТН\nISFORMULA = ЕФОРМУЛА\nISLOGICAL = ЕЛОГИЧ\nISNA = ЕНД\nISNONTEXT = ЕНЕТЕКСТ\nISNUMBER = ЕЧИСЛО\nISODD = ЕНЕЧЁТ\nISREF = ЕССЫЛКА\nISTEXT = ЕТЕКСТ\nN = Ч\nNA = НД\nSHEET = ЛИСТ\nSHEETS = ЛИСТЫ\nTYPE = ТИП\n\n##\n## Логические функции (Logical Functions)\n##\nAND = И\nFALSE = ЛОЖЬ\nIF = ЕСЛИ\nIFERROR = ЕСЛИОШИБКА\nIFNA = ЕСНД\nIFS = УСЛОВИЯ\nNOT = НЕ\nOR = ИЛИ\nSWITCH = ПЕРЕКЛЮЧ\nTRUE = ИСТИНА\nXOR = ИСКЛИЛИ\n\n##\n## Функции ссылки и поиска (Lookup & Reference Functions)\n##\nADDRESS = АДРЕС\nAREAS = ОБЛАСТИ\nCHOOSE = ВЫБОР\nCOLUMN = СТОЛБЕЦ\nCOLUMNS = ЧИСЛСТОЛБ\nFILTER = ФИЛЬТР\nFORMULATEXT = Ф.ТЕКСТ\nGETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ\nHLOOKUP = ГПР\nHYPERLINK = ГИПЕРССЫЛКА\nINDEX = ИНДЕКС\nINDIRECT = ДВССЫЛ\nLOOKUP = ПРОСМОТР\nMATCH = ПОИСКПОЗ\nOFFSET = СМЕЩ\nROW = СТРОКА\nROWS = ЧСТРОК\nRTD = ДРВ\nSORT = СОРТ\nSORTBY = СОРТПО\nTRANSPOSE = ТРАНСП\nUNIQUE = УНИК\nVLOOKUP = ВПР\nXLOOKUP = ПРОСМОТРX\nXMATCH = ПОИСКПОЗX\n\n##\n## Математические и тригонометрические функции (Math & Trig Functions)\n##\nABS = ABS\nACOS = ACOS\nACOSH = ACOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = АГРЕГАТ\nARABIC = АРАБСКОЕ\nASIN = ASIN\nASINH = ASINH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nBASE = ОСНОВАНИЕ\nCEILING.MATH = ОКРВВЕРХ.МАТ\nCEILING.PRECISE = ОКРВВЕРХ.ТОЧН\nCOMBIN = ЧИСЛКОМБ\nCOMBINA = ЧИСЛКОМБА\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = ДЕС\nDEGREES = ГРАДУСЫ\nECMA.CEILING = ECMA.ОКРВВЕРХ\nEVEN = ЧЁТН\nEXP = EXP\nFACT = ФАКТР\nFACTDOUBLE = ДВФАКТР\nFLOOR.MATH = ОКРВНИЗ.МАТ\nFLOOR.PRECISE = ОКРВНИЗ.ТОЧН\nGCD = НОД\nINT = ЦЕЛОЕ\nISO.CEILING = ISO.ОКРВВЕРХ\nLCM = НОК\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = МОПРЕД\nMINVERSE = МОБР\nMMULT = МУМНОЖ\nMOD = ОСТАТ\nMROUND = ОКРУГЛТ\nMULTINOMIAL = МУЛЬТИНОМ\nMUNIT = МЕДИН\nODD = НЕЧЁТ\nPI = ПИ\nPOWER = СТЕПЕНЬ\nPRODUCT = ПРОИЗВЕД\nQUOTIENT = ЧАСТНОЕ\nRADIANS = РАДИАНЫ\nRAND = СЛЧИС\nRANDARRAY = СЛУЧМАССИВ\nRANDBETWEEN = СЛУЧМЕЖДУ\nROMAN = РИМСКОЕ\nROUND = ОКРУГЛ\nROUNDBAHTDOWN = ОКРУГЛБАТВНИЗ\nROUNDBAHTUP = ОКРУГЛБАТВВЕРХ\nROUNDDOWN = ОКРУГЛВНИЗ\nROUNDUP = ОКРУГЛВВЕРХ\nSEC = SEC\nSECH = SECH\nSERIESSUM = РЯД.СУММ\nSEQUENCE = ПОСЛЕДОВ\nSIGN = ЗНАК\nSIN = SIN\nSINH = SINH\nSQRT = КОРЕНЬ\nSQRTPI = КОРЕНЬПИ\nSUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ\nSUM = СУММ\nSUMIF = СУММЕСЛИ\nSUMIFS = СУММЕСЛИМН\nSUMPRODUCT = СУММПРОИЗВ\nSUMSQ = СУММКВ\nSUMX2MY2 = СУММРАЗНКВ\nSUMX2PY2 = СУММСУММКВ\nSUMXMY2 = СУММКВРАЗН\nTAN = TAN\nTANH = TANH\nTRUNC = ОТБР\n\n##\n## Статистические функции (Statistical Functions)\n##\nAVEDEV = СРОТКЛ\nAVERAGE = СРЗНАЧ\nAVERAGEA = СРЗНАЧА\nAVERAGEIF = СРЗНАЧЕСЛИ\nAVERAGEIFS = СРЗНАЧЕСЛИМН\nBETA.DIST = БЕТА.РАСП\nBETA.INV = БЕТА.ОБР\nBINOM.DIST = БИНОМ.РАСП\nBINOM.DIST.RANGE = БИНОМ.РАСП.ДИАП\nBINOM.INV = БИНОМ.ОБР\nCHISQ.DIST = ХИ2.РАСП\nCHISQ.DIST.RT = ХИ2.РАСП.ПХ\nCHISQ.INV = ХИ2.ОБР\nCHISQ.INV.RT = ХИ2.ОБР.ПХ\nCHISQ.TEST = ХИ2.ТЕСТ\nCONFIDENCE.NORM = ДОВЕРИТ.НОРМ\nCONFIDENCE.T = ДОВЕРИТ.СТЬЮДЕНТ\nCORREL = КОРРЕЛ\nCOUNT = СЧЁТ\nCOUNTA = СЧЁТЗ\nCOUNTBLANK = СЧИТАТЬПУСТОТЫ\nCOUNTIF = СЧЁТЕСЛИ\nCOUNTIFS = СЧЁТЕСЛИМН\nCOVARIANCE.P = КОВАРИАЦИЯ.Г\nCOVARIANCE.S = КОВАРИАЦИЯ.В\nDEVSQ = КВАДРОТКЛ\nEXPON.DIST = ЭКСП.РАСП\nF.DIST = F.РАСП\nF.DIST.RT = F.РАСП.ПХ\nF.INV = F.ОБР\nF.INV.RT = F.ОБР.ПХ\nF.TEST = F.ТЕСТ\nFISHER = ФИШЕР\nFISHERINV = ФИШЕРОБР\nFORECAST.ETS = ПРЕДСКАЗ.ETS\nFORECAST.ETS.CONFINT = ПРЕДСКАЗ.ЕTS.ДОВИНТЕРВАЛ\nFORECAST.ETS.SEASONALITY = ПРЕДСКАЗ.ETS.СЕЗОННОСТЬ\nFORECAST.ETS.STAT = ПРЕДСКАЗ.ETS.СТАТ\nFORECAST.LINEAR = ПРЕДСКАЗ.ЛИНЕЙН\nFREQUENCY = ЧАСТОТА\nGAMMA = ГАММА\nGAMMA.DIST = ГАММА.РАСП\nGAMMA.INV = ГАММА.ОБР\nGAMMALN = ГАММАНЛОГ\nGAMMALN.PRECISE = ГАММАНЛОГ.ТОЧН\nGAUSS = ГАУСС\nGEOMEAN = СРГЕОМ\nGROWTH = РОСТ\nHARMEAN = СРГАРМ\nHYPGEOM.DIST = ГИПЕРГЕОМ.РАСП\nINTERCEPT = ОТРЕЗОК\nKURT = ЭКСЦЕСС\nLARGE = НАИБОЛЬШИЙ\nLINEST = ЛИНЕЙН\nLOGEST = ЛГРФПРИБЛ\nLOGNORM.DIST = ЛОГНОРМ.РАСП\nLOGNORM.INV = ЛОГНОРМ.ОБР\nMAX = МАКС\nMAXA = МАКСА\nMAXIFS = МАКСЕСЛИ\nMEDIAN = МЕДИАНА\nMIN = МИН\nMINA = МИНА\nMINIFS = МИНЕСЛИ\nMODE.MULT = МОДА.НСК\nMODE.SNGL = МОДА.ОДН\nNEGBINOM.DIST = ОТРБИНОМ.РАСП\nNORM.DIST = НОРМ.РАСП\nNORM.INV = НОРМ.ОБР\nNORM.S.DIST = НОРМ.СТ.РАСП\nNORM.S.INV = НОРМ.СТ.ОБР\nPEARSON = PEARSON\nPERCENTILE.EXC = ПРОЦЕНТИЛЬ.ИСКЛ\nPERCENTILE.INC = ПРОЦЕНТИЛЬ.ВКЛ\nPERCENTRANK.EXC = ПРОЦЕНТРАНГ.ИСКЛ\nPERCENTRANK.INC = ПРОЦЕНТРАНГ.ВКЛ\nPERMUT = ПЕРЕСТ\nPERMUTATIONA = ПЕРЕСТА\nPHI = ФИ\nPOISSON.DIST = ПУАССОН.РАСП\nPROB = ВЕРОЯТНОСТЬ\nQUARTILE.EXC = КВАРТИЛЬ.ИСКЛ\nQUARTILE.INC = КВАРТИЛЬ.ВКЛ\nRANK.AVG = РАНГ.СР\nRANK.EQ = РАНГ.РВ\nRSQ = КВПИРСОН\nSKEW = СКОС\nSKEW.P = СКОС.Г\nSLOPE = НАКЛОН\nSMALL = НАИМЕНЬШИЙ\nSTANDARDIZE = НОРМАЛИЗАЦИЯ\nSTDEV.P = СТАНДОТКЛОН.Г\nSTDEV.S = СТАНДОТКЛОН.В\nSTDEVA = СТАНДОТКЛОНА\nSTDEVPA = СТАНДОТКЛОНПА\nSTEYX = СТОШYX\nT.DIST = СТЬЮДЕНТ.РАСП\nT.DIST.2T = СТЬЮДЕНТ.РАСП.2Х\nT.DIST.RT = СТЬЮДЕНТ.РАСП.ПХ\nT.INV = СТЬЮДЕНТ.ОБР\nT.INV.2T = СТЬЮДЕНТ.ОБР.2Х\nT.TEST = СТЬЮДЕНТ.ТЕСТ\nTREND = ТЕНДЕНЦИЯ\nTRIMMEAN = УРЕЗСРЕДНЕЕ\nVAR.P = ДИСП.Г\nVAR.S = ДИСП.В\nVARA = ДИСПА\nVARPA = ДИСПРА\nWEIBULL.DIST = ВЕЙБУЛЛ.РАСП\nZ.TEST = Z.ТЕСТ\n\n##\n## Текстовые функции (Text Functions)\n##\nARRAYTOTEXT = МАССИВВТЕКСТ\nBAHTTEXT = БАТТЕКСТ\nCHAR = СИМВОЛ\nCLEAN = ПЕЧСИМВ\nCODE = КОДСИМВ\nCONCAT = СЦЕП\nDBCS = БДЦС\nDOLLAR = РУБЛЬ\nEXACT = СОВПАД\nFIND = НАЙТИ\nFINDB = НАЙТИБ\nFIXED = ФИКСИРОВАННЫЙ\nISTHAIDIGIT = ЕТАЙЦИФРЫ\nLEFT = ЛЕВСИМВ\nLEFTB = ЛЕВБ\nLEN = ДЛСТР\nLENB = ДЛИНБ\nLOWER = СТРОЧН\nMID = ПСТР\nMIDB = ПСТРБ\nNUMBERSTRING = СТРОКАЧИСЕЛ\nNUMBERVALUE = ЧЗНАЧ\nPROPER = ПРОПНАЧ\nREPLACE = ЗАМЕНИТЬ\nREPLACEB = ЗАМЕНИТЬБ\nREPT = ПОВТОР\nRIGHT = ПРАВСИМВ\nRIGHTB = ПРАВБ\nSEARCH = ПОИСК\nSEARCHB = ПОИСКБ\nSUBSTITUTE = ПОДСТАВИТЬ\nT = Т\nTEXT = ТЕКСТ\nTEXTJOIN = ОБЪЕДИНИТЬ\nTHAIDIGIT = ТАЙЦИФРА\nTHAINUMSOUND = ТАЙЧИСЛОВЗВУК\nTHAINUMSTRING = ТАЙЧИСЛОВСТРОКУ\nTHAISTRINGLENGTH = ТАЙДЛИНАСТРОКИ\nTRIM = СЖПРОБЕЛЫ\nUNICHAR = ЮНИСИМВ\nUNICODE = UNICODE\nUPPER = ПРОПИСН\nVALUE = ЗНАЧЕН\nVALUETOTEXT = ЗНАЧЕНИЕВТЕКСТ\n\n##\n## Веб-функции (Web Functions)\n##\nENCODEURL = КОДИР.URL\nFILTERXML = ФИЛЬТР.XML\nWEBSERVICE = ВЕБСЛУЖБА\n\n##\n## Функции совместимости (Compatibility Functions)\n##\nBETADIST = БЕТАРАСП\nBETAINV = БЕТАОБР\nBINOMDIST = БИНОМРАСП\nCEILING = ОКРВВЕРХ\nCHIDIST = ХИ2РАСП\nCHIINV = ХИ2ОБР\nCHITEST = ХИ2ТЕСТ\nCONCATENATE = СЦЕПИТЬ\nCONFIDENCE = ДОВЕРИТ\nCOVAR = КОВАР\nCRITBINOM = КРИТБИНОМ\nEXPONDIST = ЭКСПРАСП\nFDIST = FРАСП\nFINV = FРАСПОБР\nFLOOR = ОКРВНИЗ\nFORECAST = ПРЕДСКАЗ\nFTEST = ФТЕСТ\nGAMMADIST = ГАММАРАСП\nGAMMAINV = ГАММАОБР\nHYPGEOMDIST = ГИПЕРГЕОМЕТ\nLOGINV = ЛОГНОРМОБР\nLOGNORMDIST = ЛОГНОРМРАСП\nMODE = МОДА\nNEGBINOMDIST = ОТРБИНОМРАСП\nNORMDIST = НОРМРАСП\nNORMINV = НОРМОБР\nNORMSDIST = НОРМСТРАСП\nNORMSINV = НОРМСТОБР\nPERCENTILE = ПЕРСЕНТИЛЬ\nPERCENTRANK = ПРОЦЕНТРАНГ\nPOISSON = ПУАССОН\nQUARTILE = КВАРТИЛЬ\nRANK = РАНГ\nSTDEV = СТАНДОТКЛОН\nSTDEVP = СТАНДОТКЛОНП\nTDIST = СТЬЮДРАСП\nTINV = СТЬЮДРАСПОБР\nTTEST = ТТЕСТ\nVAR = ДИСП\nVARP = ДИСПР\nWEIBULL = ВЕЙБУЛЛ\nZTEST = ZТЕСТ\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/sv/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Svenska (Swedish)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #SKÄRNING!\nDIV0 = #DIVISION/0!\nVALUE = #VÄRDEFEL!\nREF = #REFERENS!\nNAME = #NAMN?\nNUM = #OGILTIGT!\nNA = #SAKNAS!\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/sv/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Svenska (Swedish)\n##\n############################################################\n\n\n##\n## Kubfunktioner (Cube Functions)\n##\nCUBEKPIMEMBER = KUBKPIMEDLEM\nCUBEMEMBER = KUBMEDLEM\nCUBEMEMBERPROPERTY = KUBMEDLEMSEGENSKAP\nCUBERANKEDMEMBER = KUBRANGORDNADMEDLEM\nCUBESET = KUBUPPSÄTTNING\nCUBESETCOUNT = KUBUPPSÄTTNINGANTAL\nCUBEVALUE = KUBVÄRDE\n\n##\n## Databasfunktioner (Database Functions)\n##\nDAVERAGE = DMEDEL\nDCOUNT = DANTAL\nDCOUNTA = DANTALV\nDGET = DHÄMTA\nDMAX = DMAX\nDMIN = DMIN\nDPRODUCT = DPRODUKT\nDSTDEV = DSTDAV\nDSTDEVP = DSTDAVP\nDSUM = DSUMMA\nDVAR = DVARIANS\nDVARP = DVARIANSP\n\n##\n## Tid- och datumfunktioner (Date & Time Functions)\n##\nDATE = DATUM\nDATEVALUE = DATUMVÄRDE\nDAY = DAG\nDAYS = DAGAR\nDAYS360 = DAGAR360\nEDATE = EDATUM\nEOMONTH = SLUTMÅNAD\nHOUR = TIMME\nISOWEEKNUM = ISOVECKONR\nMINUTE = MINUT\nMONTH = MÅNAD\nNETWORKDAYS = NETTOARBETSDAGAR\nNETWORKDAYS.INTL = NETTOARBETSDAGAR.INT\nNOW = NU\nSECOND = SEKUND\nTHAIDAYOFWEEK = THAIVECKODAG\nTHAIMONTHOFYEAR = THAIMÅNAD\nTHAIYEAR = THAIÅR\nTIME = KLOCKSLAG\nTIMEVALUE = TIDVÄRDE\nTODAY = IDAG\nWEEKDAY = VECKODAG\nWEEKNUM = VECKONR\nWORKDAY = ARBETSDAGAR\nWORKDAY.INTL = ARBETSDAGAR.INT\nYEAR = ÅR\nYEARFRAC = ÅRDEL\n\n##\n## Tekniska funktioner (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BIN.TILL.DEC\nBIN2HEX = BIN.TILL.HEX\nBIN2OCT = BIN.TILL.OKT\nBITAND = BITOCH\nBITLSHIFT = BITVSKIFT\nBITOR = BITELLER\nBITRSHIFT = BITHSKIFT\nBITXOR = BITXELLER\nCOMPLEX = KOMPLEX\nCONVERT = KONVERTERA\nDEC2BIN = DEC.TILL.BIN\nDEC2HEX = DEC.TILL.HEX\nDEC2OCT = DEC.TILL.OKT\nDELTA = DELTA\nERF = FELF\nERF.PRECISE = FELF.EXAKT\nERFC = FELFK\nERFC.PRECISE = FELFK.EXAKT\nGESTEP = SLSTEG\nHEX2BIN = HEX.TILL.BIN\nHEX2DEC = HEX.TILL.DEC\nHEX2OCT = HEX.TILL.OKT\nIMABS = IMABS\nIMAGINARY = IMAGINÄR\nIMARGUMENT = IMARGUMENT\nIMCONJUGATE = IMKONJUGAT\nIMCOS = IMCOS\nIMCOSH = IMCOSH\nIMCOT = IMCOT\nIMCSC = IMCSC\nIMCSCH = IMCSCH\nIMDIV = IMDIV\nIMEXP = IMEUPPHÖJT\nIMLN = IMLN\nIMLOG10 = IMLOG10\nIMLOG2 = IMLOG2\nIMPOWER = IMUPPHÖJT\nIMPRODUCT = IMPRODUKT\nIMREAL = IMREAL\nIMSEC = IMSEK\nIMSECH = IMSEKH\nIMSIN = IMSIN\nIMSINH = IMSINH\nIMSQRT = IMROT\nIMSUB = IMDIFF\nIMSUM = IMSUM\nIMTAN = IMTAN\nOCT2BIN = OKT.TILL.BIN\nOCT2DEC = OKT.TILL.DEC\nOCT2HEX = OKT.TILL.HEX\n\n##\n## Finansiella funktioner (Financial Functions)\n##\nACCRINT = UPPLRÄNTA\nACCRINTM = UPPLOBLRÄNTA\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = KUPDAGBB\nCOUPDAYS = KUPDAGB\nCOUPDAYSNC = KUPDAGNK\nCOUPNCD = KUPNKD\nCOUPNUM = KUPANT\nCOUPPCD = KUPFKD\nCUMIPMT = KUMRÄNTA\nCUMPRINC = KUMPRIS\nDB = DB\nDDB = DEGAVSKR\nDISC = DISK\nDOLLARDE = DECTAL\nDOLLARFR = BRÅK\nDURATION = LÖPTID\nEFFECT = EFFRÄNTA\nFV = SLUTVÄRDE\nFVSCHEDULE = FÖRRÄNTNING\nINTRATE = ÅRSRÄNTA\nIPMT = RBETALNING\nIRR = IR\nISPMT = RALÅN\nMDURATION = MLÖPTID\nMIRR = MODIR\nNOMINAL = NOMRÄNTA\nNPER = PERIODER\nNPV = NETNUVÄRDE\nODDFPRICE = UDDAFPRIS\nODDFYIELD = UDDAFAVKASTNING\nODDLPRICE = UDDASPRIS\nODDLYIELD = UDDASAVKASTNING\nPDURATION = PLÖPTID\nPMT = BETALNING\nPPMT = AMORT\nPRICE = PRIS\nPRICEDISC = PRISDISK\nPRICEMAT = PRISFÖRF\nPV = NUVÄRDE\nRATE = RÄNTA\nRECEIVED = BELOPP\nRRI = AVKPÅINVEST\nSLN = LINAVSKR\nSYD = ÅRSAVSKR\nTBILLEQ = SSVXEKV\nTBILLPRICE = SSVXPRIS\nTBILLYIELD = SSVXRÄNTA\nVDB = VDEGRAVSKR\nXIRR = XIRR\nXNPV = XNUVÄRDE\nYIELD = NOMAVK\nYIELDDISC = NOMAVKDISK\nYIELDMAT = NOMAVKFÖRF\n\n##\n## Informationsfunktioner (Information Functions)\n##\nCELL = CELL\nERROR.TYPE = FEL.TYP\nINFO = INFO\nISBLANK = ÄRTOM\nISERR = ÄRF\nISERROR = ÄRFEL\nISEVEN = ÄRJÄMN\nISFORMULA = ÄRFORMEL\nISLOGICAL = ÄRLOGISK\nISNA = ÄRSAKNAD\nISNONTEXT = ÄREJTEXT\nISNUMBER = ÄRTAL\nISODD = ÄRUDDA\nISREF = ÄRREF\nISTEXT = ÄRTEXT\nN = N\nNA = SAKNAS\nSHEET = BLAD\nSHEETS = ANTALBLAD\nTYPE = VÄRDETYP\n\n##\n## Logiska funktioner (Logical Functions)\n##\nAND = OCH\nFALSE = FALSKT\nIF = OM\nIFERROR = OMFEL\nIFNA = OMSAKNAS\nIFS = IFS\nNOT = ICKE\nOR = ELLER\nSWITCH = VÄXLA\nTRUE = SANT\nXOR = XELLER\n\n##\n## Sök- och referensfunktioner (Lookup & Reference Functions)\n##\nADDRESS = ADRESS\nAREAS = OMRÅDEN\nCHOOSE = VÄLJ\nCOLUMN = KOLUMN\nCOLUMNS = KOLUMNER\nFORMULATEXT = FORMELTEXT\nGETPIVOTDATA = HÄMTA.PIVOTDATA\nHLOOKUP = LETAKOLUMN\nHYPERLINK = HYPERLÄNK\nINDEX = INDEX\nINDIRECT = INDIREKT\nLOOKUP = LETAUPP\nMATCH = PASSA\nOFFSET = FÖRSKJUTNING\nROW = RAD\nROWS = RADER\nRTD = RTD\nTRANSPOSE = TRANSPONERA\nVLOOKUP = LETARAD\n*RC = RK\n\n##\n## Matematiska och trigonometriska funktioner (Math & Trig Functions)\n##\nABS = ABS\nACOS = ARCCOS\nACOSH = ARCCOSH\nACOT = ARCCOT\nACOTH = ARCCOTH\nAGGREGATE = MÄNGD\nARABIC = ARABISKA\nASIN = ARCSIN\nASINH = ARCSINH\nATAN = ARCTAN\nATAN2 = ARCTAN2\nATANH = ARCTANH\nBASE = BAS\nCEILING.MATH = RUNDA.UPP.MATEMATISKT\nCEILING.PRECISE = RUNDA.UPP.EXAKT\nCOMBIN = KOMBIN\nCOMBINA = KOMBINA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = DECIMAL\nDEGREES = GRADER\nECMA.CEILING = ECMA.RUNDA.UPP\nEVEN = JÄMN\nEXP = EXP\nFACT = FAKULTET\nFACTDOUBLE = DUBBELFAKULTET\nFLOOR.MATH = RUNDA.NER.MATEMATISKT\nFLOOR.PRECISE = RUNDA.NER.EXAKT\nGCD = SGD\nINT = HELTAL\nISO.CEILING = ISO.RUNDA.UPP\nLCM = MGM\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = MDETERM\nMINVERSE = MINVERT\nMMULT = MMULT\nMOD = REST\nMROUND = MAVRUNDA\nMULTINOMIAL = MULTINOMIAL\nMUNIT = MENHET\nODD = UDDA\nPI = PI\nPOWER = UPPHÖJT.TILL\nPRODUCT = PRODUKT\nQUOTIENT = KVOT\nRADIANS = RADIANER\nRAND = SLUMP\nRANDBETWEEN = SLUMP.MELLAN\nROMAN = ROMERSK\nROUND = AVRUNDA\nROUNDBAHTDOWN = AVRUNDABAHTNEDÅT\nROUNDBAHTUP = AVRUNDABAHTUPPÅT\nROUNDDOWN = AVRUNDA.NEDÅT\nROUNDUP = AVRUNDA.UPPÅT\nSEC = SEK\nSECH = SEKH\nSERIESSUM = SERIESUMMA\nSIGN = TECKEN\nSIN = SIN\nSINH = SINH\nSQRT = ROT\nSQRTPI = ROTPI\nSUBTOTAL = DELSUMMA\nSUM = SUMMA\nSUMIF = SUMMA.OM\nSUMIFS = SUMMA.OMF\nSUMPRODUCT = PRODUKTSUMMA\nSUMSQ = KVADRATSUMMA\nSUMX2MY2 = SUMMAX2MY2\nSUMX2PY2 = SUMMAX2PY2\nSUMXMY2 = SUMMAXMY2\nTAN = TAN\nTANH = TANH\nTRUNC = AVKORTA\n\n##\n## Statistiska funktioner (Statistical Functions)\n##\nAVEDEV = MEDELAVV\nAVERAGE = MEDEL\nAVERAGEA = AVERAGEA\nAVERAGEIF = MEDEL.OM\nAVERAGEIFS = MEDEL.OMF\nBETA.DIST = BETA.FÖRD\nBETA.INV = BETA.INV\nBINOM.DIST = BINOM.FÖRD\nBINOM.DIST.RANGE = BINOM.FÖRD.INTERVALL\nBINOM.INV = BINOM.INV\nCHISQ.DIST = CHI2.FÖRD\nCHISQ.DIST.RT = CHI2.FÖRD.RT\nCHISQ.INV = CHI2.INV\nCHISQ.INV.RT = CHI2.INV.RT\nCHISQ.TEST = CHI2.TEST\nCONFIDENCE.NORM = KONFIDENS.NORM\nCONFIDENCE.T = KONFIDENS.T\nCORREL = KORREL\nCOUNT = ANTAL\nCOUNTA = ANTALV\nCOUNTBLANK = ANTAL.TOMMA\nCOUNTIF = ANTAL.OM\nCOUNTIFS = ANTAL.OMF\nCOVARIANCE.P = KOVARIANS.P\nCOVARIANCE.S = KOVARIANS.S\nDEVSQ = KVADAVV\nEXPON.DIST = EXPON.FÖRD\nF.DIST = F.FÖRD\nF.DIST.RT = F.FÖRD.RT\nF.INV = F.INV\nF.INV.RT = F.INV.RT\nF.TEST = F.TEST\nFISHER = FISHER\nFISHERINV = FISHERINV\nFORECAST.ETS = PROGNOS.ETS\nFORECAST.ETS.CONFINT = PROGNOS.ETS.KONFINT\nFORECAST.ETS.SEASONALITY = PROGNOS.ETS.SÄSONGSBEROENDE\nFORECAST.ETS.STAT = PROGNOS.ETS.STAT\nFORECAST.LINEAR = PROGNOS.LINJÄR\nFREQUENCY = FREKVENS\nGAMMA = GAMMA\nGAMMA.DIST = GAMMA.FÖRD\nGAMMA.INV = GAMMA.INV\nGAMMALN = GAMMALN\nGAMMALN.PRECISE = GAMMALN.EXAKT\nGAUSS = GAUSS\nGEOMEAN = GEOMEDEL\nGROWTH = EXPTREND\nHARMEAN = HARMMEDEL\nHYPGEOM.DIST = HYPGEOM.FÖRD\nINTERCEPT = SKÄRNINGSPUNKT\nKURT = TOPPIGHET\nLARGE = STÖRSTA\nLINEST = REGR\nLOGEST = EXPREGR\nLOGNORM.DIST = LOGNORM.FÖRD\nLOGNORM.INV = LOGNORM.INV\nMAX = MAX\nMAXA = MAXA\nMAXIFS = MAXIFS\nMEDIAN = MEDIAN\nMIN = MIN\nMINA = MINA\nMINIFS = MINIFS\nMODE.MULT = TYPVÄRDE.FLERA\nMODE.SNGL = TYPVÄRDE.ETT\nNEGBINOM.DIST = NEGBINOM.FÖRD\nNORM.DIST = NORM.FÖRD\nNORM.INV = NORM.INV\nNORM.S.DIST = NORM.S.FÖRD\nNORM.S.INV = NORM.S.INV\nPEARSON = PEARSON\nPERCENTILE.EXC = PERCENTIL.EXK\nPERCENTILE.INC = PERCENTIL.INK\nPERCENTRANK.EXC = PROCENTRANG.EXK\nPERCENTRANK.INC = PROCENTRANG.INK\nPERMUT = PERMUT\nPERMUTATIONA = PERMUTATIONA\nPHI = PHI\nPOISSON.DIST = POISSON.FÖRD\nPROB = SANNOLIKHET\nQUARTILE.EXC = KVARTIL.EXK\nQUARTILE.INC = KVARTIL.INK\nRANK.AVG = RANG.MED\nRANK.EQ = RANG.EKV\nRSQ = RKV\nSKEW = SNEDHET\nSKEW.P = SNEDHET.P\nSLOPE = LUTNING\nSMALL = MINSTA\nSTANDARDIZE = STANDARDISERA\nSTDEV.P = STDAV.P\nSTDEV.S = STDAV.S\nSTDEVA = STDEVA\nSTDEVPA = STDEVPA\nSTEYX = STDFELYX\nT.DIST = T.FÖRD\nT.DIST.2T = T.FÖRD.2T\nT.DIST.RT = T.FÖRD.RT\nT.INV = T.INV\nT.INV.2T = T.INV.2T\nT.TEST = T.TEST\nTREND = TREND\nTRIMMEAN = TRIMMEDEL\nVAR.P = VARIANS.P\nVAR.S = VARIANS.S\nVARA = VARA\nVARPA = VARPA\nWEIBULL.DIST = WEIBULL.FÖRD\nZ.TEST = Z.TEST\n\n##\n## Textfunktioner (Text Functions)\n##\nBAHTTEXT = BAHTTEXT\nCHAR = TECKENKOD\nCLEAN = STÄDA\nCODE = KOD\nCONCAT = SAMMAN\nDOLLAR = VALUTA\nEXACT = EXAKT\nFIND = HITTA\nFIXED = FASTTAL\nLEFT = VÄNSTER\nLEN = LÄNGD\nLOWER = GEMENER\nMID = EXTEXT\nNUMBERVALUE = TALVÄRDE\nPROPER = INITIAL\nREPLACE = ERSÄTT\nREPT = REP\nRIGHT = HÖGER\nSEARCH = SÖK\nSUBSTITUTE = BYT.UT\nT = T\nTEXT = TEXT\nTEXTJOIN = TEXTJOIN\nTHAIDIGIT = THAISIFFRA\nTHAINUMSOUND = THAITALLJUD\nTHAINUMSTRING = THAITALSTRÄNG\nTHAISTRINGLENGTH = THAISTRÄNGLÄNGD\nTRIM = RENSA\nUNICHAR = UNITECKENKOD\nUNICODE = UNICODE\nUPPER = VERSALER\nVALUE = TEXTNUM\n\n##\n## Webbfunktioner (Web Functions)\n##\nENCODEURL = KODAWEBBADRESS\nFILTERXML = FILTRERAXML\nWEBSERVICE = WEBBTJÄNST\n\n##\n## Kompatibilitetsfunktioner (Compatibility Functions)\n##\nBETADIST = BETAFÖRD\nBETAINV = BETAINV\nBINOMDIST = BINOMFÖRD\nCEILING = RUNDA.UPP\nCHIDIST = CHI2FÖRD\nCHIINV = CHI2INV\nCHITEST = CHI2TEST\nCONCATENATE = SAMMANFOGA\nCONFIDENCE = KONFIDENS\nCOVAR = KOVAR\nCRITBINOM = KRITBINOM\nEXPONDIST = EXPONFÖRD\nFDIST = FFÖRD\nFINV = FINV\nFLOOR = RUNDA.NER\nFORECAST = PREDIKTION\nFTEST = FTEST\nGAMMADIST = GAMMAFÖRD\nGAMMAINV = GAMMAINV\nHYPGEOMDIST = HYPGEOMFÖRD\nLOGINV = LOGINV\nLOGNORMDIST = LOGNORMFÖRD\nMODE = TYPVÄRDE\nNEGBINOMDIST = NEGBINOMFÖRD\nNORMDIST = NORMFÖRD\nNORMINV = NORMINV\nNORMSDIST = NORMSFÖRD\nNORMSINV = NORMSINV\nPERCENTILE = PERCENTIL\nPERCENTRANK = PROCENTRANG\nPOISSON = POISSON\nQUARTILE = KVARTIL\nRANK = RANG\nSTDEV = STDAV\nSTDEVP = STDAVP\nTDIST = TFÖRD\nTINV = TINV\nTTEST = TTEST\nVAR = VARIANS\nVARP = VARIANSP\nWEIBULL = WEIBULL\nZTEST = ZTEST\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/tr/config",
    "content": "############################################################\n##\n## PhpSpreadsheet - locale settings\n##\n## Türkçe (Turkish)\n##\n############################################################\n\nArgumentSeparator = ;\n\n##\n## Error Codes\n##\nNULL = #BOŞ!\nDIV0 = #SAYI/0!\nVALUE = #DEĞER!\nREF = #BAŞV!\nNAME = #AD?\nNUM = #SAYI!\nNA = #YOK\n"
  },
  {
    "path": "src/PhpSpreadsheet/Calculation/locale/tr/functions",
    "content": "############################################################\n##\n## PhpSpreadsheet - function name translations\n##\n## Türkçe (Turkish)\n##\n############################################################\n\n\n##\n## Küp işlevleri (Cube Functions)\n##\nCUBEKPIMEMBER = KÜPKPIÜYESİ\nCUBEMEMBER = KÜPÜYESİ\nCUBEMEMBERPROPERTY = KÜPÜYEÖZELLİĞİ\nCUBERANKEDMEMBER = DERECELİKÜPÜYESİ\nCUBESET = KÜPKÜMESİ\nCUBESETCOUNT = KÜPKÜMESAYISI\nCUBEVALUE = KÜPDEĞERİ\n\n##\n## Veritabanı işlevleri (Database Functions)\n##\nDAVERAGE = VSEÇORT\nDCOUNT = VSEÇSAY\nDCOUNTA = VSEÇSAYDOLU\nDGET = VAL\nDMAX = VSEÇMAK\nDMIN = VSEÇMİN\nDPRODUCT = VSEÇÇARP\nDSTDEV = VSEÇSTDSAPMA\nDSTDEVP = VSEÇSTDSAPMAS\nDSUM = VSEÇTOPLA\nDVAR = VSEÇVAR\nDVARP = VSEÇVARS\n\n##\n## Tarih ve saat işlevleri (Date & Time Functions)\n##\nDATE = TARİH\nDATEDIF = ETARİHLİ\nDATESTRING = TARİHDİZİ\nDATEVALUE = TARİHSAYISI\nDAY = GÜN\nDAYS = GÜNSAY\nDAYS360 = GÜN360\nEDATE = SERİTARİH\nEOMONTH = SERİAY\nHOUR = SAAT\nISOWEEKNUM = ISOHAFTASAY\nMINUTE = DAKİKA\nMONTH = AY\nNETWORKDAYS = TAMİŞGÜNÜ\nNETWORKDAYS.INTL = TAMİŞGÜNÜ.ULUSL\nNOW = ŞİMDİ\nSECOND = SANİYE\nTHAIDAYOFWEEK = TAYHAFTANINGÜNÜ\nTHAIMONTHOFYEAR = TAYYILINAYI\nTHAIYEAR = TAYYILI\nTIME = ZAMAN\nTIMEVALUE = ZAMANSAYISI\nTODAY = BUGÜN\nWEEKDAY = HAFTANINGÜNÜ\nWEEKNUM = HAFTASAY\nWORKDAY = İŞGÜNÜ\nWORKDAY.INTL = İŞGÜNÜ.ULUSL\nYEAR = YIL\nYEARFRAC = YILORAN\n\n##\n## Mühendislik işlevleri (Engineering Functions)\n##\nBESSELI = BESSELI\nBESSELJ = BESSELJ\nBESSELK = BESSELK\nBESSELY = BESSELY\nBIN2DEC = BIN2DEC\nBIN2HEX = BIN2HEX\nBIN2OCT = BIN2OCT\nBITAND = BİTVE\nBITLSHIFT = BİTSOLAKAYDIR\nBITOR = BİTVEYA\nBITRSHIFT = BİTSAĞAKAYDIR\nBITXOR = BİTÖZELVEYA\nCOMPLEX = KARMAŞIK\nCONVERT = ÇEVİR\nDEC2BIN = DEC2BIN\nDEC2HEX = DEC2HEX\nDEC2OCT = DEC2OCT\nDELTA = DELTA\nERF = HATAİŞLEV\nERF.PRECISE = HATAİŞLEV.DUYARLI\nERFC = TÜMHATAİŞLEV\nERFC.PRECISE = TÜMHATAİŞLEV.DUYARLI\nGESTEP = BESINIR\nHEX2BIN = HEX2BIN\nHEX2DEC = HEX2DEC\nHEX2OCT = HEX2OCT\nIMABS = SANMUTLAK\nIMAGINARY = SANAL\nIMARGUMENT = SANBAĞ_DEĞİŞKEN\nIMCONJUGATE = SANEŞLENEK\nIMCOS = SANCOS\nIMCOSH = SANCOSH\nIMCOT = SANCOT\nIMCSC = SANCSC\nIMCSCH = SANCSCH\nIMDIV = SANBÖL\nIMEXP = SANÜS\nIMLN = SANLN\nIMLOG10 = SANLOG10\nIMLOG2 = SANLOG2\nIMPOWER = SANKUVVET\nIMPRODUCT = SANÇARP\nIMREAL = SANGERÇEK\nIMSEC = SANSEC\nIMSECH = SANSECH\nIMSIN = SANSIN\nIMSINH = SANSINH\nIMSQRT = SANKAREKÖK\nIMSUB = SANTOPLA\nIMSUM = SANÇIKAR\nIMTAN = SANTAN\nOCT2BIN = OCT2BIN\nOCT2DEC = OCT2DEC\nOCT2HEX = OCT2HEX\n\n##\n## Finansal işlevler (Financial Functions)\n##\nACCRINT = GERÇEKFAİZ\nACCRINTM = GERÇEKFAİZV\nAMORDEGRC = AMORDEGRC\nAMORLINC = AMORLINC\nCOUPDAYBS = KUPONGÜNBD\nCOUPDAYS = KUPONGÜN\nCOUPDAYSNC = KUPONGÜNDSK\nCOUPNCD = KUPONGÜNSKT\nCOUPNUM = KUPONSAYI\nCOUPPCD = KUPONGÜNÖKT\nCUMIPMT = TOPÖDENENFAİZ\nCUMPRINC = TOPANAPARA\nDB = AZALANBAKİYE\nDDB = ÇİFTAZALANBAKİYE\nDISC = İNDİRİM\nDOLLARDE = LİRAON\nDOLLARFR = LİRAKES\nDURATION = SÜRE\nEFFECT = ETKİN\nFV = GD\nFVSCHEDULE = GDPROGRAM\nINTRATE = FAİZORANI\nIPMT = FAİZTUTARI\nIRR = İÇ_VERİM_ORANI\nISPMT = ISPMT\nMDURATION = MSÜRE\nMIRR = D_İÇ_VERİM_ORANI\nNOMINAL = NOMİNAL\nNPER = TAKSİT_SAYISI\nNPV = NBD\nODDFPRICE = TEKYDEĞER\nODDFYIELD = TEKYÖDEME\nODDLPRICE = TEKSDEĞER\nODDLYIELD = TEKSÖDEME\nPDURATION = PSÜRE\nPMT = DEVRESEL_ÖDEME\nPPMT = ANA_PARA_ÖDEMESİ\nPRICE = DEĞER\nPRICEDISC = DEĞERİND\nPRICEMAT = DEĞERVADE\nPV = BD\nRATE = FAİZ_ORANI\nRECEIVED = GETİRİ\nRRI = GERÇEKLEŞENYATIRIMGETİRİSİ\nSLN = DA\nSYD = YAT\nTBILLEQ = HTAHEŞ\nTBILLPRICE = HTAHDEĞER\nTBILLYIELD = HTAHÖDEME\nVDB = DAB\nXIRR = AİÇVERİMORANI\nXNPV = ANBD\nYIELD = ÖDEME\nYIELDDISC = ÖDEMEİND\nYIELDMAT = ÖDEMEVADE\n\n##\n## Bilgi işlevleri (Information Functions)\n##\nCELL = HÜCRE\nERROR.TYPE = HATA.TİPİ\nINFO = BİLGİ\nISBLANK = EBOŞSA\nISERR = EHATA\nISERROR = EHATALIYSA\nISEVEN = ÇİFTMİ\nISFORMULA = EFORMÜLSE\nISLOGICAL = EMANTIKSALSA\nISNA = EYOKSA\nISNONTEXT = EMETİNDEĞİLSE\nISNUMBER = ESAYIYSA\nISODD = TEKMİ\nISREF = EREFSE\nISTEXT = EMETİNSE\nN = S\nNA = YOKSAY\nSHEET = SAYFA\nSHEETS = SAYFALAR\nTYPE = TÜR\n\n##\n## Mantıksal işlevler (Logical Functions)\n##\nAND = VE\nFALSE = YANLIŞ\nIF = EĞER\nIFERROR = EĞERHATA\nIFNA = EĞERYOKSA\nIFS = ÇOKEĞER\nNOT = DEĞİL\nOR = YADA\nSWITCH = İLKEŞLEŞEN\nTRUE = DOĞRU\nXOR = ÖZELVEYA\n\n##\n## Arama ve başvuru işlevleri (Lookup & Reference Functions)\n##\nADDRESS = ADRES\nAREAS = ALANSAY\nCHOOSE = ELEMAN\nCOLUMN = SÜTUN\nCOLUMNS = SÜTUNSAY\nFORMULATEXT = FORMÜLMETNİ\nGETPIVOTDATA = ÖZETVERİAL\nHLOOKUP = YATAYARA\nHYPERLINK = KÖPRÜ\nINDEX = İNDİS\nINDIRECT = DOLAYLI\nLOOKUP = ARA\nMATCH = KAÇINCI\nOFFSET = KAYDIR\nROW = SATIR\nROWS = SATIRSAY\nRTD = GZV\nTRANSPOSE = DEVRİK_DÖNÜŞÜM\nVLOOKUP = DÜŞEYARA\n\n##\n## Matematik ve trigonometri işlevleri (Math & Trig Functions)\n##\nABS = MUTLAK\nACOS = ACOS\nACOSH = ACOSH\nACOT = ACOT\nACOTH = ACOTH\nAGGREGATE = TOPLAMA\nARABIC = ARAP\nASIN = ASİN\nASINH = ASİNH\nATAN = ATAN\nATAN2 = ATAN2\nATANH = ATANH\nBASE = TABAN\nCEILING.MATH = TAVANAYUVARLA.MATEMATİK\nCEILING.PRECISE = TAVANAYUVARLA.DUYARLI\nCOMBIN = KOMBİNASYON\nCOMBINA = KOMBİNASYONA\nCOS = COS\nCOSH = COSH\nCOT = COT\nCOTH = COTH\nCSC = CSC\nCSCH = CSCH\nDECIMAL = ONDALIK\nDEGREES = DERECE\nECMA.CEILING = ECMA.TAVAN\nEVEN = ÇİFT\nEXP = ÜS\nFACT = ÇARPINIM\nFACTDOUBLE = ÇİFTFAKTÖR\nFLOOR.MATH = TABANAYUVARLA.MATEMATİK\nFLOOR.PRECISE = TABANAYUVARLA.DUYARLI\nGCD = OBEB\nINT = TAMSAYI\nISO.CEILING = ISO.TAVAN\nLCM = OKEK\nLN = LN\nLOG = LOG\nLOG10 = LOG10\nMDETERM = DETERMİNANT\nMINVERSE = DİZEY_TERS\nMMULT = DÇARP\nMOD = MOD\nMROUND = KYUVARLA\nMULTINOMIAL = ÇOKTERİMLİ\nMUNIT = BİRİMMATRİS\nODD = TEK\nPI = Pİ\nPOWER = KUVVET\nPRODUCT = ÇARPIM\nQUOTIENT = BÖLÜM\nRADIANS = RADYAN\nRAND = S_SAYI_ÜRET\nRANDBETWEEN = RASTGELEARADA\nROMAN = ROMEN\nROUND = YUVARLA\nROUNDBAHTDOWN = BAHTAŞAĞIYUVARLA\nROUNDBAHTUP = BAHTYUKARIYUVARLA\nROUNDDOWN = AŞAĞIYUVARLA\nROUNDUP = YUKARIYUVARLA\nSEC = SEC\nSECH = SECH\nSERIESSUM = SERİTOPLA\nSIGN = İŞARET\nSIN = SİN\nSINH = SİNH\nSQRT = KAREKÖK\nSQRTPI = KAREKÖKPİ\nSUBTOTAL = ALTTOPLAM\nSUM = TOPLA\nSUMIF = ETOPLA\nSUMIFS = ÇOKETOPLA\nSUMPRODUCT = TOPLA.ÇARPIM\nSUMSQ = TOPKARE\nSUMX2MY2 = TOPX2EY2\nSUMX2PY2 = TOPX2AY2\nSUMXMY2 = TOPXEY2\nTAN = TAN\nTANH = TANH\nTRUNC = NSAT\n\n##\n## İstatistik işlevleri (Statistical Functions)\n##\nAVEDEV = ORTSAP\nAVERAGE = ORTALAMA\nAVERAGEA = ORTALAMAA\nAVERAGEIF = EĞERORTALAMA\nAVERAGEIFS = ÇOKEĞERORTALAMA\nBETA.DIST = BETA.DAĞ\nBETA.INV = BETA.TERS\nBINOM.DIST = BİNOM.DAĞ\nBINOM.DIST.RANGE = BİNOM.DAĞ.ARALIK\nBINOM.INV = BİNOM.TERS\nCHISQ.DIST = KİKARE.DAĞ\nCHISQ.DIST.RT = KİKARE.DAĞ.SAĞK\nCHISQ.INV = KİKARE.TERS\nCHISQ.INV.RT = KİKARE.TERS.SAĞK\nCHISQ.TEST = KİKARE.TEST\nCONFIDENCE.NORM = GÜVENİLİRLİK.NORM\nCONFIDENCE.T = GÜVENİLİRLİK.T\nCORREL = KORELASYON\nCOUNT = BAĞ_DEĞ_SAY\nCOUNTA = BAĞ_DEĞ_DOLU_SAY\nCOUNTBLANK = BOŞLUKSAY\nCOUNTIF = EĞERSAY\nCOUNTIFS = ÇOKEĞERSAY\nCOVARIANCE.P = KOVARYANS.P\nCOVARIANCE.S = KOVARYANS.S\nDEVSQ = SAPKARE\nEXPON.DIST = ÜSTEL.DAĞ\nF.DIST = F.DAĞ\nF.DIST.RT = F.DAĞ.SAĞK\nF.INV = F.TERS\nF.INV.RT = F.TERS.SAĞK\nF.TEST = F.TEST\nFISHER = FISHER\nFISHERINV = FISHERTERS\nFORECAST.ETS = TAHMİN.ETS\nFORECAST.ETS.CONFINT = TAHMİN.ETS.GVNARAL\nFORECAST.ETS.SEASONALITY = TAHMİN.ETS.MEVSİMSELLİK\nFORECAST.ETS.STAT = TAHMİN.ETS.İSTAT\nFORECAST.LINEAR = TAHMİN.DOĞRUSAL\nFREQUENCY = SIKLIK\nGAMMA = GAMA\nGAMMA.DIST = GAMA.DAĞ\nGAMMA.INV = GAMA.TERS\nGAMMALN = GAMALN\nGAMMALN.PRECISE = GAMALN.DUYARLI\nGAUSS = GAUSS\nGEOMEAN = GEOORT\nGROWTH = BÜYÜME\nHARMEAN = HARORT\nHYPGEOM.DIST = HİPERGEOM.DAĞ\nINTERCEPT = KESMENOKTASI\nKURT = BASIKLIK\nLARGE = BÜYÜK\nLINEST = DOT\nLOGEST = LOT\nLOGNORM.DIST = LOGNORM.DAĞ\nLOGNORM.INV = LOGNORM.TERS\nMAX = MAK\nMAXA = MAKA\nMAXIFS = ÇOKEĞERMAK\nMEDIAN = ORTANCA\nMIN = MİN\nMINA = MİNA\nMINIFS = ÇOKEĞERMİN\nMODE.MULT = ENÇOK_OLAN.ÇOK\nMODE.SNGL = ENÇOK_OLAN.TEK\nNEGBINOM.DIST = NEGBİNOM.DAĞ\nNORM.DIST = NORM.DAĞ\nNORM.INV = NORM.TERS\nNORM.S.DIST = NORM.S.DAĞ\nNORM.S.INV = NORM.S.TERS\nPEARSON = PEARSON\nPERCENTILE.EXC = YÜZDEBİRLİK.HRC\nPERCENTILE.INC = YÜZDEBİRLİK.DHL\nPERCENTRANK.EXC = YÜZDERANK.HRC\nPERCENTRANK.INC = YÜZDERANK.DHL\nPERMUT = PERMÜTASYON\nPERMUTATIONA = PERMÜTASYONA\nPHI = PHI\nPOISSON.DIST = POISSON.DAĞ\nPROB = OLASILIK\nQUARTILE.EXC = DÖRTTEBİRLİK.HRC\nQUARTILE.INC = DÖRTTEBİRLİK.DHL\nRANK.AVG = RANK.ORT\nRANK.EQ = RANK.EŞİT\nRSQ = RKARE\nSKEW = ÇARPIKLIK\nSKEW.P = ÇARPIKLIK.P\nSLOPE = EĞİM\nSMALL = KÜÇÜK\nSTANDARDIZE = STANDARTLAŞTIRMA\nSTDEV.P = STDSAPMA.P\nSTDEV.S = STDSAPMA.S\nSTDEVA = STDSAPMAA\nSTDEVPA = STDSAPMASA\nSTEYX = STHYX\nT.DIST = T.DAĞ\nT.DIST.2T = T.DAĞ.2K\nT.DIST.RT = T.DAĞ.SAĞK\nT.INV = T.TERS\nT.INV.2T = T.TERS.2K\nT.TEST = T.TEST\nTREND = EĞİLİM\nTRIMMEAN = KIRPORTALAMA\nVAR.P = VAR.P\nVAR.S = VAR.S\nVARA = VARA\nVARPA = VARSA\nWEIBULL.DIST = WEIBULL.DAĞ\nZ.TEST = Z.TEST\n\n##\n## Metin işlevleri (Text Functions)\n##\nBAHTTEXT = BAHTMETİN\nCHAR = DAMGA\nCLEAN = TEMİZ\nCODE = KOD\nCONCAT = ARALIKBİRLEŞTİR\nDOLLAR = LİRA\nEXACT = ÖZDEŞ\nFIND = BUL\nFIXED = SAYIDÜZENLE\nISTHAIDIGIT = TAYRAKAMIYSA\nLEFT = SOLDAN\nLEN = UZUNLUK\nLOWER = KÜÇÜKHARF\nMID = PARÇAAL\nNUMBERSTRING = SAYIDİZİ\nNUMBERVALUE = SAYIDEĞERİ\nPHONETIC = SES\nPROPER = YAZIM.DÜZENİ\nREPLACE = DEĞİŞTİR\nREPT = YİNELE\nRIGHT = SAĞDAN\nSEARCH = MBUL\nSUBSTITUTE = YERİNEKOY\nT = M\nTEXT = METNEÇEVİR\nTEXTJOIN = METİNBİRLEŞTİR\nTHAIDIGIT = TAYRAKAM\nTHAINUMSOUND = TAYSAYISES\nTHAINUMSTRING = TAYSAYIDİZE\nTHAISTRINGLENGTH = TAYDİZEUZUNLUĞU\nTRIM = KIRP\nUNICHAR = UNICODEKARAKTERİ\nUNICODE = UNICODE\nUPPER = BÜYÜKHARF\nVALUE = SAYIYAÇEVİR\n\n##\n## Metin işlevleri (Web Functions)\n##\nENCODEURL = URLKODLA\nFILTERXML = XMLFİLTRELE\nWEBSERVICE = WEBHİZMETİ\n\n##\n## Uyumluluk işlevleri (Compatibility Functions)\n##\nBETADIST = BETADAĞ\nBETAINV = BETATERS\nBINOMDIST = BİNOMDAĞ\nCEILING = TAVANAYUVARLA\nCHIDIST = KİKAREDAĞ\nCHIINV = KİKARETERS\nCHITEST = KİKARETEST\nCONCATENATE = BİRLEŞTİR\nCONFIDENCE = GÜVENİRLİK\nCOVAR = KOVARYANS\nCRITBINOM = KRİTİKBİNOM\nEXPONDIST = ÜSTELDAĞ\nFDIST = FDAĞ\nFINV = FTERS\nFLOOR = TABANAYUVARLA\nFORECAST = TAHMİN\nFTEST = FTEST\nGAMMADIST = GAMADAĞ\nGAMMAINV = GAMATERS\nHYPGEOMDIST = HİPERGEOMDAĞ\nLOGINV = LOGTERS\nLOGNORMDIST = LOGNORMDAĞ\nMODE = ENÇOK_OLAN\nNEGBINOMDIST = NEGBİNOMDAĞ\nNORMDIST = NORMDAĞ\nNORMINV = NORMTERS\nNORMSDIST = NORMSDAĞ\nNORMSINV = NORMSTERS\nPERCENTILE = YÜZDEBİRLİK\nPERCENTRANK = YÜZDERANK\nPOISSON = POISSON\nQUARTILE = DÖRTTEBİRLİK\nRANK = RANK\nSTDEV = STDSAPMA\nSTDEVP = STDSAPMAS\nTDIST = TDAĞ\nTINV = TTERS\nTTEST = TTEST\nVAR = VAR\nVARP = VARS\nWEIBULL = WEIBULL\nZTEST = ZTEST\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/AddressHelper.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\n\nclass AddressHelper\n{\n    public const R1C1_COORDINATE_REGEX = '/(R((?:\\[-?\\d*\\])|(?:\\d*))?)(C((?:\\[-?\\d*\\])|(?:\\d*))?)/i';\n\n    /** @return string[] */\n    public static function getRowAndColumnChars(): array\n    {\n        $rowChar = 'R';\n        $colChar = 'C';\n        if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_EXCEL) {\n            $rowColChars = Calculation::localeFunc('*RC');\n            if (mb_strlen($rowColChars) === 2) {\n                $rowChar = mb_substr($rowColChars, 0, 1);\n                $colChar = mb_substr($rowColChars, 1, 1);\n            }\n        }\n\n        return [$rowChar, $colChar];\n    }\n\n    /**\n     * Converts an R1C1 format cell address to an A1 format cell address.\n     */\n    public static function convertToA1(\n        string $address,\n        int $currentRowNumber = 1,\n        int $currentColumnNumber = 1,\n        bool $useLocale = true\n    ): string {\n        [$rowChar, $colChar] = $useLocale ? self::getRowAndColumnChars() : ['R', 'C'];\n        $regex = '/^(' . $rowChar . '(\\[?[-+]?\\d*\\]?))(' . $colChar . '(\\[?[-+]?\\d*\\]?))$/i';\n        $validityCheck = preg_match($regex, $address, $cellReference);\n\n        if (empty($validityCheck)) {\n            throw new Exception('Invalid R1C1-format Cell Reference');\n        }\n\n        $rowReference = $cellReference[2];\n        //    Empty R reference is the current row\n        if ($rowReference === '') {\n            $rowReference = (string) $currentRowNumber;\n        }\n        //    Bracketed R references are relative to the current row\n        if ($rowReference[0] === '[') {\n            $rowReference = $currentRowNumber + (int) trim($rowReference, '[]');\n        }\n        $columnReference = $cellReference[4];\n        //    Empty C reference is the current column\n        if ($columnReference === '') {\n            $columnReference = (string) $currentColumnNumber;\n        }\n        //    Bracketed C references are relative to the current column\n        if (is_string($columnReference) && $columnReference[0] === '[') { // @phpstan-ignore-line\n            $columnReference = $currentColumnNumber + (int) trim($columnReference, '[]');\n        }\n        $columnReference = (int) $columnReference;\n\n        if ($columnReference <= 0 || $rowReference <= 0) {\n            throw new Exception('Invalid R1C1-format Cell Reference, Value out of range');\n        }\n        $A1CellReference = Coordinate::stringFromColumnIndex($columnReference) . $rowReference;\n\n        return $A1CellReference;\n    }\n\n    protected static function convertSpreadsheetMLFormula(string $formula): string\n    {\n        $formula = substr($formula, 3);\n        $temp = explode('\"', $formula);\n        $key = false;\n        foreach ($temp as &$value) {\n            //    Only replace in alternate array entries (i.e. non-quoted blocks)\n            $key = $key === false;\n            if ($key) {\n                $value = str_replace(['[.', ':.', ']'], ['', ':', ''], $value);\n            }\n        }\n        unset($value);\n\n        return implode('\"', $temp);\n    }\n\n    /**\n     * Converts a formula that uses R1C1/SpreadsheetXML format cell address to an A1 format cell address.\n     */\n    public static function convertFormulaToA1(\n        string $formula,\n        int $currentRowNumber = 1,\n        int $currentColumnNumber = 1\n    ): string {\n        if (str_starts_with($formula, 'of:')) {\n            // We have an old-style SpreadsheetML Formula\n            return self::convertSpreadsheetMLFormula($formula);\n        }\n\n        //    Convert R1C1 style references to A1 style references (but only when not quoted)\n        $temp = explode('\"', $formula);\n        $key = false;\n        foreach ($temp as &$value) {\n            //    Only replace in alternate array entries (i.e. non-quoted blocks)\n            $key = $key === false;\n            if ($key) {\n                preg_match_all(self::R1C1_COORDINATE_REGEX, $value, $cellReferences, PREG_SET_ORDER + PREG_OFFSET_CAPTURE);\n                //    Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way\n                //        through the formula from left to right. Reversing means that we work right to left.through\n                //        the formula\n                $cellReferences = array_reverse($cellReferences);\n                //    Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent,\n                //        then modify the formula to use that new reference\n                foreach ($cellReferences as $cellReference) {\n                    $A1CellReference = self::convertToA1($cellReference[0][0], $currentRowNumber, $currentColumnNumber, false);\n                    $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0]));\n                }\n            }\n        }\n        unset($value);\n\n        //    Then rebuild the formula string\n        return implode('\"', $temp);\n    }\n\n    /**\n     * Converts an A1 format cell address to an R1C1 format cell address.\n     * If $currentRowNumber or $currentColumnNumber are provided, then the R1C1 address will be formatted as a relative address.\n     */\n    public static function convertToR1C1(\n        string $address,\n        ?int $currentRowNumber = null,\n        ?int $currentColumnNumber = null\n    ): string {\n        if (1 !== preg_match(Coordinate::A1_COORDINATE_REGEX, $address, $cellReference)) {\n            throw new Exception('Invalid A1-format Cell Reference');\n        }\n\n        if ($cellReference['col'][0] === '$') {\n            // Column must be absolute address\n            $currentColumnNumber = null;\n        }\n        $columnId = Coordinate::columnIndexFromString(ltrim($cellReference['col'], '$'));\n\n        if ($cellReference['row'][0] === '$') {\n            // Row must be absolute address\n            $currentRowNumber = null;\n        }\n        $rowId = (int) ltrim($cellReference['row'], '$');\n\n        if ($currentRowNumber !== null) {\n            if ($rowId === $currentRowNumber) {\n                $rowId = '';\n            } else {\n                $rowId = '[' . ($rowId - $currentRowNumber) . ']';\n            }\n        }\n\n        if ($currentColumnNumber !== null) {\n            if ($columnId === $currentColumnNumber) {\n                $columnId = '';\n            } else {\n                $columnId = '[' . ($columnId - $currentColumnNumber) . ']';\n            }\n        }\n\n        $R1C1Address = \"R{$rowId}C{$columnId}\";\n\n        return $R1C1Address;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/AddressRange.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\n/**\n * @template T\n */\ninterface AddressRange\n{\n    public const MAX_ROW = 1_048_576;\n    public const MAX_COLUMN = 'XFD';\n    public const MAX_COLUMN_INT = 16_384;\n\n    public const MAX_ROW_XLS_OLD = 16_384;\n    public const MAX_ROW_XLS = 65_536;\n    public const MAX_COLUMN_XLS = 'IV';\n    public const MAX_COLUMN_INT_XLS = 256;\n\n    /**\n     * @return T\n     */\n    public function from(): mixed;\n\n    /**\n     * @return T\n     */\n    public function to(): mixed;\n\n    public function __toString(): string;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/AdvancedValueBinder.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\FormattedNumber;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nclass AdvancedValueBinder extends DefaultValueBinder implements IValueBinder\n{\n    /**\n     * Bind value to a cell.\n     *\n     * @param Cell $cell Cell to bind value to\n     * @param mixed $value Value to bind in cell\n     */\n    public function bindValue(Cell $cell, mixed $value = null): bool\n    {\n        if ($value === null) {\n            return parent::bindValue($cell, $value);\n        } elseif (is_string($value)) {\n            // sanitize UTF-8 strings\n            $value = StringHelper::sanitizeUTF8($value);\n        }\n\n        // Find out data type\n        $dataType = parent::dataTypeForValue($value);\n\n        // Style logic - strings\n        if ($dataType === DataType::TYPE_STRING && is_string($value)) {\n            //    Test for booleans using locale-setting\n            if (StringHelper::strToUpper($value) === Calculation::getTRUE()) {\n                $cell->setValueExplicit(true, DataType::TYPE_BOOL);\n\n                return true;\n            } elseif (StringHelper::strToUpper($value) === Calculation::getFALSE()) {\n                $cell->setValueExplicit(false, DataType::TYPE_BOOL);\n\n                return true;\n            }\n\n            // Check for fractions\n            if (preg_match('~^([+-]?)\\s*(\\d+)\\s*/\\s*(\\d+)$~', $value, $matches)) {\n                return $this->setProperFraction($matches, $cell);\n            } elseif (preg_match('~^([+-]?)(\\d+)\\s+(\\d+)\\s*/\\s*(\\d+)$~', $value, $matches)) {\n                return $this->setImproperFraction($matches, $cell);\n            }\n\n            $decimalSeparatorNoPreg = StringHelper::getDecimalSeparator();\n            $decimalSeparator = preg_quote($decimalSeparatorNoPreg, '/');\n            $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/');\n\n            // Check for percentage\n            if (preg_match('/^\\-?\\d*' . $decimalSeparator . '?\\d*\\s?\\%$/', (string) preg_replace('/(\\d)' . $thousandsSeparator . '(\\d)/u', '$1$2', $value))) {\n                return $this->setPercentage((string) preg_replace('/(\\d)' . $thousandsSeparator . '(\\d)/u', '$1$2', $value), $cell);\n            }\n\n            // Check for currency\n            if (preg_match(FormattedNumber::currencyMatcherRegexp(), (string) preg_replace('/(\\d)' . $thousandsSeparator . '(\\d)/u', '$1$2', $value), $matches, PREG_UNMATCHED_AS_NULL)) {\n                // Convert value to number\n                $sign = ($matches['PrefixedSign'] ?? $matches['PrefixedSign2'] ?? $matches['PostfixedSign']) ?? null;\n                $currencyCode = $matches['PrefixedCurrency'] ?? $matches['PostfixedCurrency'] ?? '';\n                /** @var string */\n                $temp = str_replace([$decimalSeparatorNoPreg, $currencyCode, ' ', '-'], ['.', '', '', ''], (string) preg_replace('/(\\d)' . $thousandsSeparator . '(\\d)/u', '$1$2', $value));\n                $value = (float) ($sign . trim($temp));\n\n                return $this->setCurrency($value, $cell, $currencyCode);\n            }\n\n            // Check for time without seconds e.g. '9:45', '09:45'\n            if (preg_match('/^(\\d|[0-1]\\d|2[0-3]):[0-5]\\d$/', $value)) {\n                return $this->setTimeHoursMinutes($value, $cell);\n            }\n\n            // Check for time with seconds '9:45:59', '09:45:59'\n            if (preg_match('/^(\\d|[0-1]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$/', $value)) {\n                return $this->setTimeHoursMinutesSeconds($value, $cell);\n            }\n\n            // Check for datetime, e.g. '2008-12-31', '2008-12-31 15:59', '2008-12-31 15:59:10'\n            if (($d = Date::stringToExcel($value)) !== false) {\n                // Convert value to number\n                $cell->setValueExplicit($d, DataType::TYPE_NUMERIC);\n                // Determine style. Either there is a time part or not. Look for ':'\n                if (str_contains($value, ':')) {\n                    $formatCode = 'yyyy-mm-dd h:mm';\n                } else {\n                    $formatCode = 'yyyy-mm-dd';\n                }\n                $cell->getWorksheet()->getStyle($cell->getCoordinate())\n                    ->getNumberFormat()->setFormatCode($formatCode);\n\n                return true;\n            }\n\n            // Check for newline character \"\\n\"\n            if (str_contains($value, \"\\n\")) {\n                $cell->setValueExplicit($value, DataType::TYPE_STRING);\n                // Set style\n                $cell->getWorksheet()->getStyle($cell->getCoordinate())\n                    ->getAlignment()->setWrapText(true);\n\n                return true;\n            }\n        }\n\n        // Not bound yet? Use parent...\n        return parent::bindValue($cell, $value);\n    }\n\n    /** @param array{0: string, 1: ?string, 2: numeric-string, 3: numeric-string, 4: numeric-string} $matches */\n    protected function setImproperFraction(array $matches, Cell $cell): bool\n    {\n        // Convert value to number\n        $value = $matches[2] + ($matches[3] / $matches[4]);\n        if ($matches[1] === '-') {\n            $value = 0 - $value;\n        }\n        $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC);\n\n        // Build the number format mask based on the size of the matched values\n        $dividend = str_repeat('?', strlen($matches[3]));\n        $divisor = str_repeat('?', strlen($matches[4]));\n        $fractionMask = \"# {$dividend}/{$divisor}\";\n        // Set style\n        $cell->getWorksheet()->getStyle($cell->getCoordinate())\n            ->getNumberFormat()->setFormatCode($fractionMask);\n\n        return true;\n    }\n\n    /** @param array{0: string, 1: ?string, 2: numeric-string, 3: numeric-string} $matches */\n    protected function setProperFraction(array $matches, Cell $cell): bool\n    {\n        // Convert value to number\n        $value = $matches[2] / $matches[3];\n        if ($matches[1] === '-') {\n            $value = 0 - $value;\n        }\n        $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC);\n\n        // Build the number format mask based on the size of the matched values\n        $dividend = str_repeat('?', strlen($matches[2]));\n        $divisor = str_repeat('?', strlen($matches[3]));\n        $fractionMask = \"{$dividend}/{$divisor}\";\n        // Set style\n        $cell->getWorksheet()->getStyle($cell->getCoordinate())\n            ->getNumberFormat()->setFormatCode($fractionMask);\n\n        return true;\n    }\n\n    protected function setPercentage(string $value, Cell $cell): bool\n    {\n        // Convert value to number\n        $value = ((float) str_replace('%', '', $value)) / 100;\n        $cell->setValueExplicit($value, DataType::TYPE_NUMERIC);\n\n        // Set style\n        $cell->getWorksheet()->getStyle($cell->getCoordinate())\n            ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_PERCENTAGE_00);\n\n        return true;\n    }\n\n    protected function setCurrency(float $value, Cell $cell, string $currencyCode): bool\n    {\n        $cell->setValueExplicit($value, DataType::TYPE_NUMERIC);\n        // Set style\n        $cell->getWorksheet()->getStyle($cell->getCoordinate())\n            ->getNumberFormat()->setFormatCode(\n                str_replace('$', '[$' . $currencyCode . ']', NumberFormat::FORMAT_CURRENCY_USD)\n            );\n\n        return true;\n    }\n\n    protected function setTimeHoursMinutes(string $value, Cell $cell): bool\n    {\n        // Convert value to number\n        [$hours, $minutes] = explode(':', $value);\n        $hours = (int) $hours;\n        $minutes = (int) $minutes;\n        $days = ($hours / 24) + ($minutes / 1440);\n        $cell->setValueExplicit($days, DataType::TYPE_NUMERIC);\n\n        // Set style\n        $cell->getWorksheet()->getStyle($cell->getCoordinate())\n            ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_TIME3);\n\n        return true;\n    }\n\n    protected function setTimeHoursMinutesSeconds(string $value, Cell $cell): bool\n    {\n        // Convert value to number\n        [$hours, $minutes, $seconds] = explode(':', $value);\n        $hours = (int) $hours;\n        $minutes = (int) $minutes;\n        $seconds = (int) $seconds;\n        $days = ($hours / 24) + ($minutes / 1440) + ($seconds / 86400);\n        $cell->setValueExplicit($days, DataType::TYPE_NUMERIC);\n\n        // Set style\n        $cell->getWorksheet()->getStyle($cell->getCoordinate())\n            ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_TIME4);\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/Cell.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Collection\\Cells;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\CellStyleAssessor;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Stringable;\n\nclass Cell implements Stringable\n{\n    /**\n     * Value binder to use.\n     */\n    private static ?IValueBinder $valueBinder = null;\n\n    /**\n     * Value of the cell.\n     */\n    private mixed $value;\n\n    /**\n     *    Calculated value of the cell (used for caching)\n     *    This returns the value last calculated by MS Excel or whichever spreadsheet program was used to\n     *        create the original spreadsheet file.\n     *    Note that this value is not guaranteed to reflect the actual calculated value because it is\n     *        possible that auto-calculation was disabled in the original spreadsheet, and underlying data\n     *        values used by the formula have changed since it was last calculated.\n     *\n     * @var mixed\n     */\n    private $calculatedValue;\n\n    /**\n     * Type of the cell data.\n     */\n    private string $dataType;\n\n    /**\n     * The collection of cells that this cell belongs to (i.e. The Cell Collection for the parent Worksheet).\n     */\n    private ?Cells $parent;\n\n    /**\n     * Index to the cellXf reference for the styling of this cell.\n     */\n    private int $xfIndex = 0;\n\n    /**\n     * Attributes of the formula.\n     *\n     * @var null|array<string, string>\n     */\n    private ?array $formulaAttributes = null;\n\n    private IgnoredErrors $ignoredErrors;\n\n    /**\n     * Update the cell into the cell collection.\n     *\n     * @throws SpreadsheetException\n     */\n    public function updateInCollection(): self\n    {\n        $parent = $this->parent;\n        if ($parent === null) {\n            throw new SpreadsheetException('Cannot update when cell is not bound to a worksheet');\n        }\n        $parent->update($this);\n\n        return $this;\n    }\n\n    public function detach(): void\n    {\n        $this->parent = null;\n    }\n\n    public function attach(Cells $parent): void\n    {\n        $this->parent = $parent;\n    }\n\n    /**\n     * Create a new Cell.\n     *\n     * @throws SpreadsheetException\n     */\n    public function __construct(mixed $value, ?string $dataType, Worksheet $worksheet)\n    {\n        // Initialise cell value\n        $this->value = $value;\n\n        // Set worksheet cache\n        $this->parent = $worksheet->getCellCollection();\n\n        // Set datatype?\n        if ($dataType !== null) {\n            if ($dataType == DataType::TYPE_STRING2) {\n                $dataType = DataType::TYPE_STRING;\n            }\n            $this->dataType = $dataType;\n        } else {\n            $valueBinder = $worksheet->getParent()?->getValueBinder() ?? self::getValueBinder();\n            if ($valueBinder->bindValue($this, $value) === false) {\n                throw new SpreadsheetException('Value could not be bound to cell.');\n            }\n        }\n        $this->ignoredErrors = new IgnoredErrors();\n    }\n\n    /**\n     * Get cell coordinate column.\n     *\n     * @throws SpreadsheetException\n     */\n    public function getColumn(): string\n    {\n        $parent = $this->parent;\n        if ($parent === null) {\n            throw new SpreadsheetException('Cannot get column when cell is not bound to a worksheet');\n        }\n\n        return $parent->getCurrentColumn();\n    }\n\n    /**\n     * Get cell coordinate row.\n     *\n     * @throws SpreadsheetException\n     */\n    public function getRow(): int\n    {\n        $parent = $this->parent;\n        if ($parent === null) {\n            throw new SpreadsheetException('Cannot get row when cell is not bound to a worksheet');\n        }\n\n        return $parent->getCurrentRow();\n    }\n\n    /**\n     * Get cell coordinate.\n     *\n     * @throws SpreadsheetException\n     */\n    public function getCoordinate(): string\n    {\n        $parent = $this->parent;\n        if ($parent !== null) {\n            $coordinate = $parent->getCurrentCoordinate();\n        } else {\n            $coordinate = null;\n        }\n        if ($coordinate === null) {\n            throw new SpreadsheetException('Coordinate no longer exists');\n        }\n\n        return $coordinate;\n    }\n\n    /**\n     * Get cell value.\n     */\n    public function getValue(): mixed\n    {\n        return $this->value;\n    }\n\n    public function getValueString(): string\n    {\n        return StringHelper::convertToString($this->value, false);\n    }\n\n    /**\n     * Get cell value with formatting.\n     */\n    public function getFormattedValue(): string\n    {\n        $currentCalendar = SharedDate::getExcelCalendar();\n        SharedDate::setExcelCalendar($this->getWorksheet()->getParent()?->getExcelCalendar());\n        $formattedValue = (string) NumberFormat::toFormattedString(\n            $this->getCalculatedValueString(),\n            (string) $this->getStyle()->getNumberFormat()->getFormatCode(true)\n        );\n        SharedDate::setExcelCalendar($currentCalendar);\n\n        return $formattedValue;\n    }\n\n    protected static function updateIfCellIsTableHeader(?Worksheet $workSheet, self $cell, mixed $oldValue, mixed $newValue): void\n    {\n        $oldValue = StringHelper::convertToString($oldValue, false);\n        $newValue = StringHelper::convertToString($newValue, false);\n        if (StringHelper::strToLower($oldValue) === StringHelper::strToLower($newValue) || $workSheet === null) {\n            return;\n        }\n\n        foreach ($workSheet->getTableCollection() as $table) {\n            /** @var Table $table */\n            if ($cell->isInRange($table->getRange())) {\n                $rangeRowsColumns = Coordinate::getRangeBoundaries($table->getRange());\n                if ($cell->getRow() === (int) $rangeRowsColumns[0][1]) {\n                    Table\\Column::updateStructuredReferences($workSheet, $oldValue, $newValue);\n                }\n\n                return;\n            }\n        }\n    }\n\n    /**\n     * Set cell value.\n     *\n     *    Sets the value for a cell, automatically determining the datatype using the value binder\n     *\n     * @param mixed $value Value\n     * @param null|IValueBinder $binder Value Binder to override the currently set Value Binder\n     *\n     * @throws SpreadsheetException\n     */\n    public function setValue(mixed $value, ?IValueBinder $binder = null): self\n    {\n        if ($this->hadHyperlink) {\n            $this->clearHyperlink();\n        }\n        // Cells?->Worksheet?->Spreadsheet\n        $binder ??= $this->parent?->getParent()?->getParent()?->getValueBinder() ?? self::getValueBinder();\n        if (!$binder->bindValue($this, $value)) {\n            throw new SpreadsheetException('Value could not be bound to cell.');\n        }\n\n        return $this;\n    }\n\n    private bool $hadHyperlink = false;\n\n    /** @internal */\n    public function setHadHyperlink(bool $hadHyperlink): void\n    {\n        $this->hadHyperlink = $hadHyperlink;\n    }\n\n    private function clearHyperlink(): void\n    {\n        $worksheet = $this->getWorksheetOrNull();\n        if ($worksheet !== null) {\n            $coordinate = $this->getCoordinate();\n            $worksheet->setHyperlink($coordinate, null);\n        }\n        $this->hadHyperlink = false;\n    }\n\n    /**\n     * Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the value binder).\n     *\n     * @param mixed $value Value\n     * @param string $dataType Explicit data type, see DataType::TYPE_*\n     *        This parameter is currently optional (default = string).\n     *        Omitting it is ***DEPRECATED***, and the default will be removed in a future release.\n     *        Note that PhpSpreadsheet does not validate that the value and datatype are consistent, in using this\n     *             method, then it is your responsibility as an end-user developer to validate that the value and\n     *             the datatype match.\n     *       If you do mismatch value and datatype, then the value you enter may be changed to match the datatype\n     *          that you specify.\n     *\n     * @throws SpreadsheetException\n     */\n    public function setValueExplicit(mixed $value, string $dataType = DataType::TYPE_STRING): self\n    {\n        if ($this->hadHyperlink) {\n            $this->clearHyperlink();\n        }\n        $oldValue = $this->value;\n        $quotePrefix = false;\n\n        // set the value according to data type\n        switch ($dataType) {\n            case DataType::TYPE_NULL:\n                $this->value = null;\n\n                break;\n            case DataType::TYPE_STRING2:\n                $dataType = DataType::TYPE_STRING;\n                // no break\n            case DataType::TYPE_STRING:\n                // Synonym for string\n                if (is_string($value) && strlen($value) > 1 && $value[0] === '=') {\n                    $quotePrefix = true;\n                }\n                // no break\n            case DataType::TYPE_INLINE:\n                // Rich text\n                $value2 = StringHelper::convertToString($value, true);\n                // Cells?->Worksheet?->Spreadsheet\n                $binder = $this->parent?->getParent()?->getParent()?->getValueBinder();\n                $preserveCr = false;\n                if ($binder !== null && method_exists($binder, 'getPreserveCr')) {\n                    /** @var bool */\n                    $preserveCr = $binder->getPreserveCr();\n                }\n                $this->value = DataType::checkString(($value instanceof RichText) ? $value : $value2, $preserveCr);\n\n                break;\n            case DataType::TYPE_NUMERIC:\n                if ($value !== null && !is_bool($value) && !is_numeric($value)) {\n                    throw new SpreadsheetException('Invalid numeric value for datatype Numeric');\n                }\n                $this->value = 0 + $value;\n\n                break;\n            case DataType::TYPE_FORMULA:\n                $this->value = StringHelper::convertToString($value, true);\n\n                break;\n            case DataType::TYPE_BOOL:\n                $this->value = (bool) $value;\n\n                break;\n            case DataType::TYPE_ISO_DATE:\n                $this->value = SharedDate::convertIsoDate($value);\n                $dataType = DataType::TYPE_NUMERIC;\n\n                break;\n            case DataType::TYPE_DRAWING_IN_CELL:\n                if ($value instanceof BaseDrawing) {\n                    $this->value = $value;\n                } else {\n                    throw new SpreadsheetException('Item is not a drawing');\n                }\n\n                break;\n            case DataType::TYPE_ERROR:\n                $this->value = DataType::checkErrorCode($value);\n\n                break;\n            default:\n                throw new SpreadsheetException('Invalid datatype: ' . $dataType);\n        }\n\n        // set the datatype\n        $this->dataType = $dataType;\n\n        $this->updateInCollection();\n        $cellCoordinate = $this->getCoordinate();\n        self::updateIfCellIsTableHeader($this->getParent()?->getParent(), $this, $oldValue, $value);\n        $worksheet = $this->getWorksheet();\n        $spreadsheet = $worksheet->getParent();\n        if (isset($spreadsheet) && $spreadsheet->getIndex($worksheet, true) >= 0) {\n            $originalSelected = $worksheet->getSelectedCells();\n            $activeSheetIndex = $spreadsheet->getActiveSheetIndex();\n            $style = $this->getStyle();\n            $oldQuotePrefix = $style->getQuotePrefix();\n            if ($oldQuotePrefix !== $quotePrefix) {\n                $style->setQuotePrefix($quotePrefix);\n            }\n            $worksheet->setSelectedCells($originalSelected);\n            if ($activeSheetIndex >= 0) {\n                $spreadsheet->setActiveSheetIndex($activeSheetIndex);\n            }\n        }\n\n        return $this->getParent()?->get($cellCoordinate) ?? $this;\n    }\n\n    public const CALCULATE_DATE_TIME_ASIS = 0;\n    public const CALCULATE_DATE_TIME_FLOAT = 1;\n    public const CALCULATE_TIME_FLOAT = 2;\n\n    private static int $calculateDateTimeType = self::CALCULATE_DATE_TIME_ASIS;\n\n    public static function getCalculateDateTimeType(): int\n    {\n        return self::$calculateDateTimeType;\n    }\n\n    /** @throws CalculationException */\n    public static function setCalculateDateTimeType(int $calculateDateTimeType): void\n    {\n        self::$calculateDateTimeType = match ($calculateDateTimeType) {\n            self::CALCULATE_DATE_TIME_ASIS, self::CALCULATE_DATE_TIME_FLOAT, self::CALCULATE_TIME_FLOAT => $calculateDateTimeType,\n            default => throw new CalculationException(\"Invalid value $calculateDateTimeType for calculated date time type\"),\n        };\n    }\n\n    /**\n     * Convert date, time, or datetime from int to float if desired.\n     */\n    private function convertDateTimeInt(mixed $result): mixed\n    {\n        if (is_int($result)) {\n            if (self::$calculateDateTimeType === self::CALCULATE_TIME_FLOAT) {\n                if (SharedDate::isDateTime($this, $result, false)) {\n                    $result = (float) $result;\n                }\n            } elseif (self::$calculateDateTimeType === self::CALCULATE_DATE_TIME_FLOAT) {\n                if (SharedDate::isDateTime($this, $result, true)) {\n                    $result = (float) $result;\n                }\n            }\n        }\n\n        return $result;\n    }\n\n    /**\n     * Get calculated cell value converted to string.\n     */\n    public function getCalculatedValueString(): string\n    {\n        $value = $this->getCalculatedValue();\n        while (is_array($value)) {\n            $value = array_shift($value);\n        }\n\n        return StringHelper::convertToString($value, false);\n    }\n\n    /**\n     * Get calculated cell value.\n     *\n     * @param bool $resetLog Whether the calculation engine logger should be reset or not\n     *\n     * @throws CalculationException\n     */\n    public function getCalculatedValue(bool $resetLog = true): mixed\n    {\n        $title = 'unknown';\n        $oldAttributes = $this->formulaAttributes;\n        $oldAttributesT = $oldAttributes['t'] ?? '';\n        $coordinate = $this->getCoordinate();\n        $oldAttributesRef = $oldAttributes['ref'] ?? $coordinate;\n        $originalValue = $this->value;\n        $originalDataType = $this->dataType;\n        $this->formulaAttributes = [];\n        $spill = false;\n\n        if ($this->dataType === DataType::TYPE_FORMULA) {\n            try {\n                $currentCalendar = SharedDate::getExcelCalendar();\n                SharedDate::setExcelCalendar($this->getWorksheet()->getParent()?->getExcelCalendar());\n                $thisworksheet = $this->getWorksheet();\n                $index = $thisworksheet->getParentOrThrow()->getActiveSheetIndex();\n                $selected = $thisworksheet->getSelectedCells();\n                $title = $thisworksheet->getTitle();\n                $calculation = Calculation::getInstance($thisworksheet->getParent());\n                $result = $calculation->calculateCellValue($this, $resetLog);\n                $result = $this->convertDateTimeInt($result);\n                $thisworksheet->setSelectedCells($selected);\n                $thisworksheet->getParentOrThrow()->setActiveSheetIndex($index);\n                if (is_array($result) && $calculation->getInstanceArrayReturnType() !== Calculation::RETURN_ARRAY_AS_ARRAY) {\n                    while (is_array($result)) {\n                        $result = array_shift($result);\n                    }\n                }\n                if (\n                    !is_array($result)\n                    && $calculation->getInstanceArrayReturnType() === Calculation::RETURN_ARRAY_AS_ARRAY\n                    && $oldAttributesT === 'array'\n                    && ($oldAttributesRef === $coordinate || $oldAttributesRef === \"$coordinate:$coordinate\")\n                ) {\n                    $result = [$result];\n                }\n                // if return_as_array for formula like '=sheet!cell'\n                if (is_array($result) && count($result) === 1) {\n                    $resultKey = array_keys($result)[0];\n                    $resultValue = $result[$resultKey];\n                    if (is_int($resultKey) && is_array($resultValue) && count($resultValue) === 1) {\n                        $resultKey2 = array_keys($resultValue)[0];\n                        $resultValue2 = $resultValue[$resultKey2];\n                        if (is_string($resultKey2) && !is_array($resultValue2) && preg_match('/[a-zA-Z]{1,3}/', $resultKey2) === 1) {\n                            $result = $resultValue2;\n                        }\n                    }\n                }\n                $newColumn = $this->getColumn();\n                if (is_array($result)) {\n                    $result = self::convertSpecialArray($result);\n                    $this->formulaAttributes['t'] = 'array';\n                    $this->formulaAttributes['ref'] = $maxCoordinate = $coordinate;\n                    $newRow = $row = $this->getRow();\n                    $column = $this->getColumn();\n                    foreach ($result as $resultRow) {\n                        if (is_array($resultRow)) {\n                            $newColumn = $column;\n                            foreach ($resultRow as $resultValue) {\n                                if ($row !== $newRow || $column !== $newColumn) {\n                                    $maxCoordinate = $newColumn . $newRow;\n                                    if ($thisworksheet->getCell($newColumn . $newRow)->getValue() !== null) {\n                                        if (!Coordinate::coordinateIsInsideRange($oldAttributesRef, $newColumn . $newRow)) {\n                                            $spill = true;\n\n                                            break;\n                                        }\n                                    }\n                                }\n                                /** @var string $newColumn */\n                                StringHelper::stringIncrement($newColumn);\n                            }\n                            ++$newRow;\n                        } else {\n                            if ($row !== $newRow || $column !== $newColumn) {\n                                $maxCoordinate = $newColumn . $newRow;\n                                if ($thisworksheet->getCell($newColumn . $newRow)->getValue() !== null) {\n                                    if (!Coordinate::coordinateIsInsideRange($oldAttributesRef, $newColumn . $newRow)) {\n                                        $spill = true;\n                                    }\n                                }\n                            }\n                            StringHelper::stringIncrement($newColumn);\n                        }\n                        if ($spill) {\n                            break;\n                        }\n                    }\n                    if (!$spill) {\n                        $this->formulaAttributes['ref'] .= \":$maxCoordinate\";\n                    }\n                    $thisworksheet->getCell($column . $row);\n                }\n                if (is_array($result)) {\n                    if ($oldAttributes !== null && $calculation->getInstanceArrayReturnType() === Calculation::RETURN_ARRAY_AS_ARRAY) {\n                        if (($oldAttributesT) === 'array') {\n                            $thisworksheet = $this->getWorksheet();\n                            $coordinate = $this->getCoordinate();\n                            $ref = $oldAttributesRef;\n                            if (preg_match('/^([A-Z]{1,3})([0-9]{1,7})(:([A-Z]{1,3})([0-9]{1,7}))?$/', $ref, $matches) === 1) {\n                                if (isset($matches[3])) {\n                                    $minCol = $matches[1];\n                                    $minRow = (int) $matches[2];\n                                    $maxCol = $matches[4];\n                                    StringHelper::stringIncrement($maxCol);\n                                    $maxRow = (int) $matches[5];\n                                    for ($row = $minRow; $row <= $maxRow; ++$row) {\n                                        for ($col = $minCol; $col !== $maxCol; StringHelper::stringIncrement($col)) {\n                                            /** @var string $col */\n                                            if (\"$col$row\" !== $coordinate) {\n                                                $thisworksheet->getCell(\"$col$row\")->setValue(null);\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                            $thisworksheet->getCell($coordinate);\n                        }\n                    }\n                }\n                if ($spill) {\n                    $result = ExcelError::SPILL();\n                }\n                if (is_array($result)) {\n                    $newRow = $row = $this->getRow();\n                    $newColumn = $column = $this->getColumn();\n                    foreach ($result as $resultRow) {\n                        if (is_array($resultRow)) {\n                            $newColumn = $column;\n                            foreach ($resultRow as $resultValue) {\n                                if ($row !== $newRow || $column !== $newColumn) {\n                                    $thisworksheet\n                                        ->getCell($newColumn . $newRow)\n                                        ->setValue($resultValue);\n                                }\n                                StringHelper::stringIncrement($newColumn);\n                            }\n                            ++$newRow;\n                        } else {\n                            if ($row !== $newRow || $column !== $newColumn) {\n                                $thisworksheet->getCell($newColumn . $newRow)->setValue($resultRow);\n                            }\n                            StringHelper::stringIncrement($newColumn);\n                        }\n                    }\n                    $thisworksheet->getCell($column . $row);\n                    $this->value = $originalValue;\n                    $this->dataType = $originalDataType;\n                }\n            } catch (SpreadsheetException $ex) {\n                SharedDate::setExcelCalendar($currentCalendar);\n                if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->calculatedValue !== null)) {\n                    return $this->calculatedValue; // Fallback for calculations referencing external files.\n                } elseif (preg_match('/[Uu]ndefined (name|offset: 2|array key 2)/', $ex->getMessage()) === 1) {\n                    return ExcelError::NAME();\n                }\n\n                throw new CalculationException(\n                    $title . '!' . $this->getCoordinate() . ' -> ' . $ex->getMessage(),\n                    $ex->getCode(),\n                    $ex\n                );\n            }\n            SharedDate::setExcelCalendar($currentCalendar);\n\n            if ($result === Functions::NOT_YET_IMPLEMENTED) {\n                $this->formulaAttributes = $oldAttributes;\n\n                return $this->calculatedValue; // Fallback if calculation engine does not support the formula.\n            }\n\n            return $result;\n        } elseif ($this->value instanceof RichText) {\n            return $this->value->getPlainText();\n        }\n\n        return $this->convertDateTimeInt($this->value);\n    }\n\n    /**\n     * Convert array like the following (preserve values, lose indexes):\n     * [\n     *   rowNumber1 => [colLetter1 => value, colLetter2 => value ...],\n     *   rowNumber2 => [colLetter1 => value, colLetter2 => value ...],\n     *   ...\n     * ].\n     *\n     * @param mixed[] $array\n     *\n     * @return mixed[]\n     */\n    private static function convertSpecialArray(array $array): array\n    {\n        $newArray = [];\n        foreach ($array as $rowIndex => $row) {\n            if (!is_int($rowIndex) || $rowIndex <= 0 || !is_array($row)) {\n                return $array;\n            }\n            $keys = array_keys($row);\n            $key0 = $keys[0] ?? '';\n            if (!is_string($key0)) {\n                return $array;\n            }\n            $newArray[] = array_values($row);\n        }\n\n        return $newArray;\n    }\n\n    /**\n     * Set old calculated value (cached).\n     *\n     * @param mixed $originalValue Value\n     */\n    public function setCalculatedValue(mixed $originalValue, bool $tryNumeric = true): self\n    {\n        if ($originalValue !== null) {\n            $this->calculatedValue = ($tryNumeric && is_numeric($originalValue)) ? (0 + $originalValue) : $originalValue;\n        }\n\n        return $this->updateInCollection();\n    }\n\n    /**\n     *    Get old calculated value (cached)\n     *    This returns the value last calculated by MS Excel or whichever spreadsheet program was used to\n     *        create the original spreadsheet file.\n     *    Note that this value is not guaranteed to reflect the actual calculated value because it is\n     *        possible that auto-calculation was disabled in the original spreadsheet, and underlying data\n     *        values used by the formula have changed since it was last calculated.\n     */\n    public function getOldCalculatedValue(): mixed\n    {\n        return $this->calculatedValue;\n    }\n\n    /**\n     * Get cell data type.\n     */\n    public function getDataType(): string\n    {\n        return $this->dataType;\n    }\n\n    /**\n     * Set cell data type.\n     *\n     * @param string $dataType see DataType::TYPE_*\n     */\n    public function setDataType(string $dataType): self\n    {\n        $this->setValueExplicit($this->value, $dataType);\n\n        return $this;\n    }\n\n    /**\n     * Identify if the cell contains a formula.\n     */\n    public function isFormula(): bool\n    {\n        return $this->dataType === DataType::TYPE_FORMULA && $this->getStyle()->getQuotePrefix() === false;\n    }\n\n    /**\n     *    Does this cell contain Data validation rules?\n     *\n     * @throws SpreadsheetException\n     */\n    public function hasDataValidation(): bool\n    {\n        if (!isset($this->parent)) {\n            throw new SpreadsheetException('Cannot check for data validation when cell is not bound to a worksheet');\n        }\n\n        return $this->getWorksheet()->dataValidationExists($this->getCoordinate());\n    }\n\n    /**\n     * Get Data validation rules.\n     *\n     * @throws SpreadsheetException\n     */\n    public function getDataValidation(): DataValidation\n    {\n        if (!isset($this->parent)) {\n            throw new SpreadsheetException('Cannot get data validation for cell that is not bound to a worksheet');\n        }\n\n        return $this->getWorksheet()->getDataValidation($this->getCoordinate());\n    }\n\n    /**\n     * Set Data validation rules.\n     *\n     * @throws SpreadsheetException\n     */\n    public function setDataValidation(?DataValidation $dataValidation = null): self\n    {\n        if (!isset($this->parent)) {\n            throw new SpreadsheetException('Cannot set data validation for cell that is not bound to a worksheet');\n        }\n\n        $this->getWorksheet()->setDataValidation($this->getCoordinate(), $dataValidation);\n\n        return $this->updateInCollection();\n    }\n\n    /**\n     * Does this cell contain valid value?\n     */\n    public function hasValidValue(): bool\n    {\n        $validator = new DataValidator();\n\n        return $validator->isValid($this);\n    }\n\n    /**\n     * Does this cell contain a Hyperlink?\n     *\n     * @throws SpreadsheetException\n     */\n    public function hasHyperlink(): bool\n    {\n        if (!isset($this->parent)) {\n            throw new SpreadsheetException('Cannot check for hyperlink when cell is not bound to a worksheet');\n        }\n\n        return $this->getWorksheet()->hyperlinkExists($this->getCoordinate());\n    }\n\n    /**\n     * Get Hyperlink.\n     *\n     * @throws SpreadsheetException\n     */\n    public function getHyperlink(): Hyperlink\n    {\n        if (!isset($this->parent)) {\n            throw new SpreadsheetException('Cannot get hyperlink for cell that is not bound to a worksheet');\n        }\n\n        return $this->getWorksheet()\n            ->getHyperlink($this->getCoordinate());\n    }\n\n    /**\n     * Set Hyperlink.\n     *\n     * @throws SpreadsheetException\n     */\n    public function setHyperlink(?Hyperlink $hyperlink = null): self\n    {\n        if (!isset($this->parent)) {\n            throw new SpreadsheetException('Cannot set hyperlink for cell that is not bound to a worksheet');\n        }\n\n        $this->getWorksheet()\n            ->setHyperlink($this->getCoordinate(), $hyperlink);\n\n        return $this->updateInCollection();\n    }\n\n    /**\n     * Get cell collection.\n     */\n    public function getParent(): ?Cells\n    {\n        return $this->parent;\n    }\n\n    /**\n     * Get parent worksheet.\n     *\n     * @throws SpreadsheetException\n     */\n    public function getWorksheet(): Worksheet\n    {\n        $parent = $this->parent;\n        if ($parent !== null) {\n            $worksheet = $parent->getParent();\n        } else {\n            $worksheet = null;\n        }\n\n        if ($worksheet === null) {\n            throw new SpreadsheetException('Worksheet no longer exists');\n        }\n\n        return $worksheet;\n    }\n\n    public function getWorksheetOrNull(): ?Worksheet\n    {\n        $parent = $this->parent;\n        if ($parent !== null) {\n            $worksheet = $parent->getParent();\n        } else {\n            $worksheet = null;\n        }\n\n        return $worksheet;\n    }\n\n    /**\n     * Is this cell in a merge range.\n     */\n    public function isInMergeRange(): bool\n    {\n        return (bool) $this->getMergeRange();\n    }\n\n    /**\n     * Is this cell the master (top left cell) in a merge range (that holds the actual data value).\n     */\n    public function isMergeRangeValueCell(): bool\n    {\n        if ($mergeRange = $this->getMergeRange()) {\n            $mergeRange = Coordinate::splitRange($mergeRange);\n            [$startCell] = $mergeRange[0];\n\n            return $this->getCoordinate() === $startCell;\n        }\n\n        return false;\n    }\n\n    /**\n     * If this cell is in a merge range, then return the range.\n     *\n     * @return false|string\n     */\n    public function getMergeRange()\n    {\n        foreach ($this->getWorksheet()->getMergeCells() as $mergeRange) {\n            if ($this->isInRange($mergeRange)) {\n                return $mergeRange;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Get cell style.\n     */\n    public function getStyle(): Style\n    {\n        return $this->getWorksheet()->getStyle($this->getCoordinate());\n    }\n\n    /**\n     * Get cell style.\n     */\n    public function getAppliedStyle(): Style\n    {\n        if ($this->getWorksheet()->conditionalStylesExists($this->getCoordinate()) === false) {\n            return $this->getStyle();\n        }\n        $range = $this->getWorksheet()->getConditionalRange($this->getCoordinate());\n        if ($range === null) {\n            return $this->getStyle();\n        }\n\n        $matcher = new CellStyleAssessor($this, $range);\n\n        return $matcher->matchConditions($this->getWorksheet()->getConditionalStyles($this->getCoordinate()));\n    }\n\n    /**\n     * Re-bind parent.\n     */\n    public function rebindParent(Worksheet $parent): self\n    {\n        $this->parent = $parent->getCellCollection();\n\n        return $this->updateInCollection();\n    }\n\n    /**\n     *    Is cell in a specific range?\n     *\n     * @param string $range Cell range (e.g. A1:A1)\n     */\n    public function isInRange(string $range): bool\n    {\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($range);\n\n        // Translate properties\n        $myColumn = Coordinate::columnIndexFromString($this->getColumn());\n        $myRow = $this->getRow();\n\n        // Verify if cell is in range\n        return ($rangeStart[0] <= $myColumn) && ($rangeEnd[0] >= $myColumn)\n            && ($rangeStart[1] <= $myRow) && ($rangeEnd[1] >= $myRow);\n    }\n\n    /**\n     * Compare 2 cells.\n     *\n     * @param Cell $a Cell a\n     * @param Cell $b Cell b\n     *\n     * @return int Result of comparison (always -1 or 1, never zero!)\n     */\n    public static function compareCells(self $a, self $b): int\n    {\n        if ($a->getRow() < $b->getRow()) {\n            return -1;\n        } elseif ($a->getRow() > $b->getRow()) {\n            return 1;\n        } elseif (Coordinate::columnIndexFromString($a->getColumn()) < Coordinate::columnIndexFromString($b->getColumn())) {\n            return -1;\n        }\n\n        return 1;\n    }\n\n    /**\n     * Get value binder to use.\n     */\n    public static function getValueBinder(): IValueBinder\n    {\n        if (self::$valueBinder === null) {\n            self::$valueBinder = new DefaultValueBinder();\n        }\n\n        return self::$valueBinder;\n    }\n\n    /**\n     * Set value binder to use.\n     */\n    public static function setValueBinder(IValueBinder $binder): void\n    {\n        self::$valueBinder = $binder;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $propertyName => $propertyValue) {\n            if ((is_object($propertyValue)) && ($propertyName !== 'parent')) {\n                $this->$propertyName = clone $propertyValue;\n            } else {\n                $this->$propertyName = $propertyValue;\n            }\n        }\n    }\n\n    /**\n     * Get index to cellXf.\n     */\n    public function getXfIndex(): int\n    {\n        return $this->xfIndex;\n    }\n\n    /**\n     * Set index to cellXf.\n     */\n    public function setXfIndex(int $indexValue): self\n    {\n        $this->xfIndex = $indexValue;\n\n        return $this->updateInCollection();\n    }\n\n    /**\n     * Set the formula attributes.\n     *\n     * @param null|array<string, string> $attributes\n     */\n    public function setFormulaAttributes(?array $attributes): self\n    {\n        $this->formulaAttributes = $attributes;\n\n        return $this;\n    }\n\n    /**\n     * Get the formula attributes.\n     *\n     * @return null|array<string, string>\n     */\n    public function getFormulaAttributes(): mixed\n    {\n        return $this->formulaAttributes;\n    }\n\n    /**\n     * Convert to string.\n     */\n    public function __toString(): string\n    {\n        $retVal = $this->value;\n\n        return StringHelper::convertToString($retVal, false);\n    }\n\n    public function getIgnoredErrors(): IgnoredErrors\n    {\n        return $this->ignoredErrors;\n    }\n\n    public function isLocked(): bool\n    {\n        $protected = $this->parent?->getParent()?->getProtection()?->getSheet();\n        if ($protected !== true) {\n            return false;\n        }\n        $locked = $this->getStyle()->getProtection()->getLocked();\n\n        return $locked !== Protection::PROTECTION_UNPROTECTED;\n    }\n\n    public function isHiddenOnFormulaBar(): bool\n    {\n        if ($this->getDataType() !== DataType::TYPE_FORMULA) {\n            return false;\n        }\n        $protected = $this->parent?->getParent()?->getProtection()?->getSheet();\n        if ($protected !== true) {\n            return false;\n        }\n        $hidden = $this->getStyle()->getProtection()->getHidden();\n\n        return $hidden !== Protection::PROTECTION_UNPROTECTED;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/CellAddress.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Stringable;\n\nclass CellAddress implements Stringable\n{\n    protected ?Worksheet $worksheet;\n\n    protected string $cellAddress;\n\n    protected string $columnName = '';\n\n    protected int $columnId;\n\n    protected int $rowId;\n\n    public function __construct(string $cellAddress, ?Worksheet $worksheet = null)\n    {\n        $this->cellAddress = str_replace('$', '', $cellAddress);\n        [$this->columnId, $this->rowId, $this->columnName] = Coordinate::indexesFromString($this->cellAddress);\n        $this->worksheet = $worksheet;\n    }\n\n    public function __destruct()\n    {\n        unset($this->worksheet);\n    }\n\n    /**\n     * @phpstan-assert int|numeric-string $columnId\n     * @phpstan-assert int|numeric-string $rowId\n     */\n    private static function validateColumnAndRow(int|string $columnId, int|string $rowId): void\n    {\n        if (!is_numeric($columnId) || $columnId <= 0 || !is_numeric($rowId) || $rowId <= 0) {\n            throw new Exception('Row and Column Ids must be positive integer values');\n        }\n    }\n\n    public static function fromColumnAndRow(int|string $columnId, int|string $rowId, ?Worksheet $worksheet = null): self\n    {\n        self::validateColumnAndRow($columnId, $rowId);\n\n        return new self(Coordinate::stringFromColumnIndex($columnId) . $rowId, $worksheet);\n    }\n\n    /** @param array<int, int> $array */\n    public static function fromColumnRowArray(array $array, ?Worksheet $worksheet = null): self\n    {\n        [$columnId, $rowId] = $array;\n\n        return self::fromColumnAndRow($columnId, $rowId, $worksheet);\n    }\n\n    public static function fromCellAddress(string $cellAddress, ?Worksheet $worksheet = null): self\n    {\n        return new self($cellAddress, $worksheet);\n    }\n\n    /**\n     * The returned address string will contain the worksheet name as well, if available,\n     *     (ie. if a Worksheet was provided to the constructor).\n     *     e.g. \"'Mark''s Worksheet'!C5\".\n     */\n    public function fullCellAddress(): string\n    {\n        if ($this->worksheet !== null) {\n            $title = str_replace(\"'\", \"''\", $this->worksheet->getTitle());\n\n            return \"'{$title}'!{$this->cellAddress}\";\n        }\n\n        return $this->cellAddress;\n    }\n\n    public function worksheet(): ?Worksheet\n    {\n        return $this->worksheet;\n    }\n\n    /**\n     * The returned address string will contain just the column/row address,\n     *     (even if a Worksheet was provided to the constructor).\n     *     e.g. \"C5\".\n     */\n    public function cellAddress(): string\n    {\n        return $this->cellAddress;\n    }\n\n    public function rowId(): int\n    {\n        return $this->rowId;\n    }\n\n    public function columnId(): int\n    {\n        return $this->columnId;\n    }\n\n    public function columnName(): string\n    {\n        return $this->columnName;\n    }\n\n    public function nextRow(int $offset = 1): self\n    {\n        $newRowId = $this->rowId + $offset;\n        if ($newRowId < 1) {\n            $newRowId = 1;\n        }\n\n        return self::fromColumnAndRow($this->columnId, $newRowId);\n    }\n\n    public function previousRow(int $offset = 1): self\n    {\n        return $this->nextRow(0 - $offset);\n    }\n\n    public function nextColumn(int $offset = 1): self\n    {\n        $newColumnId = $this->columnId + $offset;\n        if ($newColumnId < 1) {\n            $newColumnId = 1;\n        }\n\n        return self::fromColumnAndRow($newColumnId, $this->rowId);\n    }\n\n    public function previousColumn(int $offset = 1): self\n    {\n        return $this->nextColumn(0 - $offset);\n    }\n\n    /**\n     * The returned address string will contain the worksheet name as well, if available,\n     *     (ie. if a Worksheet was provided to the constructor).\n     *     e.g. \"'Mark''s Worksheet'!C5\".\n     */\n    public function __toString(): string\n    {\n        return $this->fullCellAddress();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/CellRange.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Stringable;\n\n/**\n * @implements AddressRange<CellAddress>\n */\nclass CellRange implements AddressRange, Stringable\n{\n    protected CellAddress $from;\n\n    protected CellAddress $to;\n\n    public function __construct(CellAddress $from, CellAddress $to)\n    {\n        $this->validateFromTo($from, $to);\n    }\n\n    private function validateFromTo(CellAddress $from, CellAddress $to): void\n    {\n        // Identify actual top-left and bottom-right values (in case we've been given top-right and bottom-left)\n        $firstColumn = min($from->columnId(), $to->columnId());\n        $firstRow = min($from->rowId(), $to->rowId());\n        $lastColumn = max($from->columnId(), $to->columnId());\n        $lastRow = max($from->rowId(), $to->rowId());\n\n        $fromWorksheet = $from->worksheet();\n        $toWorksheet = $to->worksheet();\n        $this->validateWorksheets($fromWorksheet, $toWorksheet);\n\n        $this->from = $this->cellAddressWrapper($firstColumn, $firstRow, $fromWorksheet);\n        $this->to = $this->cellAddressWrapper($lastColumn, $lastRow, $toWorksheet);\n    }\n\n    private function validateWorksheets(?Worksheet $fromWorksheet, ?Worksheet $toWorksheet): void\n    {\n        if ($fromWorksheet !== null && $toWorksheet !== null) {\n            // We could simply compare worksheets rather than worksheet titles; but at some point we may introduce\n            //    support for 3d ranges; and at that point we drop this check and let the validation fall through\n            //    to the check for same workbook; but unless we check on titles, this test will also detect if the\n            //    worksheets are in different spreadsheets, and the next check will never execute or throw its\n            //    own exception.\n            if ($fromWorksheet->getTitle() !== $toWorksheet->getTitle()) {\n                throw new Exception('3d Cell Ranges are not supported');\n            } elseif ($fromWorksheet->getParent() !== $toWorksheet->getParent()) {\n                throw new Exception('Worksheets must be in the same spreadsheet');\n            }\n        }\n    }\n\n    private function cellAddressWrapper(int $column, int $row, ?Worksheet $worksheet = null): CellAddress\n    {\n        $cellAddress = Coordinate::stringFromColumnIndex($column) . (string) $row;\n\n        return new class ($cellAddress, $worksheet) extends CellAddress {\n            public function nextRow(int $offset = 1): CellAddress\n            {\n                /** @var CellAddress $result */\n                $result = parent::nextRow($offset);\n                $this->rowId = $result->rowId;\n                $this->cellAddress = $result->cellAddress;\n\n                return $this;\n            }\n\n            public function previousRow(int $offset = 1): CellAddress\n            {\n                /** @var CellAddress $result */\n                $result = parent::previousRow($offset);\n                $this->rowId = $result->rowId;\n                $this->cellAddress = $result->cellAddress;\n\n                return $this;\n            }\n\n            public function nextColumn(int $offset = 1): CellAddress\n            {\n                /** @var CellAddress $result */\n                $result = parent::nextColumn($offset);\n                $this->columnId = $result->columnId;\n                $this->columnName = $result->columnName;\n                $this->cellAddress = $result->cellAddress;\n\n                return $this;\n            }\n\n            public function previousColumn(int $offset = 1): CellAddress\n            {\n                /** @var CellAddress $result */\n                $result = parent::previousColumn($offset);\n                $this->columnId = $result->columnId;\n                $this->columnName = $result->columnName;\n                $this->cellAddress = $result->cellAddress;\n\n                return $this;\n            }\n        };\n    }\n\n    public function from(): CellAddress\n    {\n        // Re-order from/to in case the cell addresses have been modified\n        $this->validateFromTo($this->from, $this->to);\n\n        return $this->from;\n    }\n\n    public function to(): CellAddress\n    {\n        // Re-order from/to in case the cell addresses have been modified\n        $this->validateFromTo($this->from, $this->to);\n\n        return $this->to;\n    }\n\n    public function __toString(): string\n    {\n        // Re-order from/to in case the cell addresses have been modified\n        $this->validateFromTo($this->from, $this->to);\n\n        if ($this->from->cellAddress() === $this->to->cellAddress()) {\n            return \"{$this->from->fullCellAddress()}\";\n        }\n\n        $fromAddress = $this->from->fullCellAddress();\n        $toAddress = $this->to->cellAddress();\n\n        return \"{$fromAddress}:{$toAddress}\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/ColumnRange.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Stringable;\n\n/**\n * @implements AddressRange<string>\n */\nclass ColumnRange implements AddressRange, Stringable\n{\n    protected ?Worksheet $worksheet;\n\n    protected int $from;\n\n    protected int $to;\n\n    public function __construct(string $from, ?string $to = null, ?Worksheet $worksheet = null)\n    {\n        $this->validateFromTo(\n            Coordinate::columnIndexFromString($from),\n            Coordinate::columnIndexFromString($to ?? $from)\n        );\n        $this->worksheet = $worksheet;\n    }\n\n    public function __destruct()\n    {\n        $this->worksheet = null;\n    }\n\n    public static function fromColumnIndexes(int $from, int $to, ?Worksheet $worksheet = null): self\n    {\n        return new self(Coordinate::stringFromColumnIndex($from), Coordinate::stringFromColumnIndex($to), $worksheet);\n    }\n\n    /**\n     * @param array<int|string> $array\n     */\n    public static function fromArray(array $array, ?Worksheet $worksheet = null): self\n    {\n        array_walk(\n            $array,\n            function (&$column): void {\n                $column = is_numeric($column) ? Coordinate::stringFromColumnIndex((int) $column) : $column;\n            }\n        );\n        /** @var string $from */\n        /** @var string $to */\n        [$from, $to] = $array;\n\n        return new self($from, $to, $worksheet);\n    }\n\n    private function validateFromTo(int $from, int $to): void\n    {\n        // Identify actual top and bottom values (in case we've been given bottom and top)\n        $this->from = min($from, $to);\n        $this->to = max($from, $to);\n    }\n\n    public function columnCount(): int\n    {\n        return $this->to - $this->from + 1;\n    }\n\n    public function shiftDown(int $offset = 1): self\n    {\n        $newFrom = $this->from + $offset;\n        $newFrom = ($newFrom < 1) ? 1 : $newFrom;\n\n        $newTo = $this->to + $offset;\n        $newTo = ($newTo < 1) ? 1 : $newTo;\n\n        return self::fromColumnIndexes($newFrom, $newTo, $this->worksheet);\n    }\n\n    public function shiftUp(int $offset = 1): self\n    {\n        return $this->shiftDown(0 - $offset);\n    }\n\n    public function from(): string\n    {\n        return Coordinate::stringFromColumnIndex($this->from);\n    }\n\n    public function to(): string\n    {\n        return Coordinate::stringFromColumnIndex($this->to);\n    }\n\n    public function fromIndex(): int\n    {\n        return $this->from;\n    }\n\n    public function toIndex(): int\n    {\n        return $this->to;\n    }\n\n    public function toCellRange(): CellRange\n    {\n        return new CellRange(\n            CellAddress::fromColumnAndRow($this->from, 1, $this->worksheet),\n            CellAddress::fromColumnAndRow($this->to, AddressRange::MAX_ROW)\n        );\n    }\n\n    public function __toString(): string\n    {\n        $from = $this->from();\n        $to = $this->to();\n\n        if ($this->worksheet !== null) {\n            $title = str_replace(\"'\", \"''\", $this->worksheet->getTitle());\n\n            return \"'{$title}'!{$from}:{$to}\";\n        }\n\n        return \"{$from}:{$to}\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/Coordinate.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Validations;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\n/**\n * Helper class to manipulate cell coordinates.\n *\n * Columns indexes and rows are always based on 1, **not** on 0. This match the behavior\n * that Excel users are used to, and also match the Excel functions `COLUMN()` and `ROW()`.\n */\nabstract class Coordinate\n{\n    public const A1_COORDINATE_REGEX = '/^(?<col>\\$?[A-Z]{1,3})(?<row>\\$?\\d{1,7})$/i';\n    public const FULL_REFERENCE_REGEX = '/^(?:(?<worksheet>[^!]*)!)?(?<localReference>(?<firstCoordinate>[$]?[A-Z]{1,3}[$]?\\d{1,7})(?:\\:(?<secondCoordinate>[$]?[A-Z]{1,3}[$]?\\d{1,7}))?)$/i';\n\n    /**\n     * Default range variable constant.\n     *\n     * @var string\n     */\n    const DEFAULT_RANGE = 'A1:A1';\n\n    /**\n     * Convert string coordinate to [0 => int column index, 1 => int row index].\n     *\n     * @param string $cellAddress eg: 'A1'\n     *\n     * @return array{0: string, 1: string} Array containing column and row (indexes 0 and 1)\n     */\n    public static function coordinateFromString(string $cellAddress): array\n    {\n        if (preg_match(self::A1_COORDINATE_REGEX, $cellAddress, $matches)) {\n            $row = (int) ltrim($matches['row'], '$');\n            // reluctantly allow row 0 due to regression problems\n            if (/*$row > 0 &&*/ $row <= AddressRange::MAX_ROW) {\n                return [$matches['col'], $matches['row']];\n            }\n        } elseif (self::coordinateIsRange($cellAddress)) {\n            throw new Exception('Cell coordinate string can not be a range of cells');\n        } elseif ($cellAddress == '') {\n            throw new Exception('Cell coordinate can not be zero-length string');\n        }\n\n        throw new Exception('Invalid cell coordinate ' . $cellAddress);\n    }\n\n    /**\n     * Convert string coordinate to [0 => int column index, 1 => int row index, 2 => string column string].\n     *\n     * @param string $coordinates eg: 'A1', '$B$12'\n     *\n     * @return array{0: int, 1: int, 2: string} Array containing column and row index, and column string\n     */\n    public static function indexesFromString(string $coordinates): array\n    {\n        [$column, $row] = self::coordinateFromString($coordinates);\n        $column = ltrim($column, '$');\n\n        return [\n            self::columnIndexFromString($column),\n            (int) ltrim($row, '$'),\n            $column,\n        ];\n    }\n\n    /**\n     * Checks if a Cell Address represents a range of cells.\n     *\n     * @param string $cellAddress eg: 'A1' or 'A1:A2' or 'A1:A2,C1:C2'\n     *\n     * @return bool Whether the coordinate represents a range of cells\n     */\n    public static function coordinateIsRange(string $cellAddress): bool\n    {\n        return str_contains($cellAddress, ':') || str_contains($cellAddress, ',');\n    }\n\n    /**\n     * Make string row, column or cell coordinate absolute.\n     *\n     * @param int|string $cellAddress e.g. 'A' or '1' or 'A1'\n     *                    Note that this value can be a row or column reference as well as a cell reference\n     *\n     * @return string Absolute coordinate        e.g. '$A' or '$1' or '$A$1'\n     */\n    public static function absoluteReference(int|string $cellAddress): string\n    {\n        $cellAddress = (string) $cellAddress;\n        if (self::coordinateIsRange($cellAddress)) {\n            throw new Exception('Cell coordinate string can not be a range of cells');\n        }\n\n        // Split out any worksheet name from the reference\n        [$worksheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);\n        if ($worksheet > '') {\n            $worksheet .= '!';\n        }\n\n        // Create absolute coordinate\n        $cellAddress = \"$cellAddress\";\n        if (ctype_digit($cellAddress)) {\n            return $worksheet . '$' . $cellAddress;\n        } elseif (ctype_alpha($cellAddress)) {\n            return $worksheet . '$' . strtoupper($cellAddress);\n        }\n\n        return $worksheet . self::absoluteCoordinate($cellAddress);\n    }\n\n    /**\n     * Make string coordinate absolute.\n     *\n     * @param string $cellAddress e.g. 'A1'\n     *\n     * @return string Absolute coordinate        e.g. '$A$1'\n     */\n    public static function absoluteCoordinate(string $cellAddress): string\n    {\n        if (self::coordinateIsRange($cellAddress)) {\n            throw new Exception('Cell coordinate string can not be a range of cells');\n        }\n\n        // Split out any worksheet name from the coordinate\n        [$worksheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);\n        if ($worksheet > '') {\n            $worksheet .= '!';\n        }\n\n        // Create absolute coordinate\n        [$column, $row] = self::coordinateFromString($cellAddress ?? 'A1');\n        $column = ltrim($column, '$');\n        $row = ltrim($row, '$');\n\n        return $worksheet . '$' . $column . '$' . $row;\n    }\n\n    /**\n     * Split range into coordinate strings, using comma for union\n     * and ignoring intersection (space).\n     *\n     * @param string $range e.g. 'B4:D9' or 'B4:D9,H2:O11' or 'B4'\n     *\n     * @return array<array<string>> Array containing one or more arrays containing one or two coordinate strings\n     *                                e.g. ['B4','D9'] or [['B4','D9'], ['H2','O11']]\n     *                                        or ['B4']\n     */\n    public static function splitRange(string $range): array\n    {\n        // Ensure $pRange is a valid range\n        if (empty($range)) {\n            $range = self::DEFAULT_RANGE;\n        }\n\n        $exploded = explode(',', $range);\n        $outArray = [];\n        foreach ($exploded as $value) {\n            $outArray[] = explode(':', $value);\n        }\n\n        return $outArray;\n    }\n\n    /**\n     * Split range into coordinate strings, resolving unions and intersections.\n     *\n     * @param string $range e.g. 'B4:D9' or 'B4:D9,H2:O11' or 'B4'\n     * @param bool $unionIsComma true=comma is union, space is intersection\n     *                           false=space is union, comma is intersection\n     *\n     * @return array<array<string>> Array containing one or more arrays containing one or two coordinate strings\n     *                                e.g. ['B4','D9'] or [['B4','D9'], ['H2','O11']]\n     *                                        or ['B4']\n     */\n    public static function allRanges(string $range, bool $unionIsComma = true): array\n    {\n        if (!$unionIsComma) {\n            $range = str_replace([',', ' ', \"\\0\"], [\"\\0\", ',', ' '], $range);\n        }\n\n        return self::splitRange(\n            self::resolveUnionAndIntersection($range)\n        );\n    }\n\n    /**\n     * Build range from coordinate strings.\n     *\n     * @param mixed[] $range Array containing one or more arrays containing one or two coordinate strings\n     *\n     * @return string String representation of $pRange\n     */\n    public static function buildRange(array $range): string\n    {\n        // Verify range\n        if (empty($range)) {\n            throw new Exception('Range does not contain any information');\n        }\n\n        // Build range\n        $counter = count($range);\n        for ($i = 0; $i < $counter; ++$i) {\n            if (!is_array($range[$i])) {\n                throw new Exception('Each array entry must be an array');\n            }\n            $range[$i] = implode(':', $range[$i]);\n        }\n\n        return implode(',', $range);\n    }\n\n    /**\n     * Calculate range boundaries.\n     *\n     * @param string $range Cell range, Single Cell, Row/Column Range (e.g. A1:A1, B2, B:C, 2:3)\n     *\n     * @return array{array{int, int}, array{int, int}} Range coordinates [Start Cell, End Cell]\n     *                    where Start Cell and End Cell are arrays (Column Number, Row Number)\n     */\n    public static function rangeBoundaries(string $range): array\n    {\n        // Ensure $pRange is a valid range\n        if (empty($range)) {\n            $range = self::DEFAULT_RANGE;\n        }\n\n        // Uppercase coordinate\n        $range = strtoupper($range);\n\n        // Extract range\n        if (!str_contains($range, ':')) {\n            $rangeA = $rangeB = $range;\n        } else {\n            [$rangeA, $rangeB] = explode(':', $range);\n        }\n\n        if (is_numeric($rangeA) && is_numeric($rangeB)) {\n            $rangeA = 'A' . $rangeA;\n            $rangeB = AddressRange::MAX_COLUMN . $rangeB;\n        }\n\n        if (ctype_alpha($rangeA) && ctype_alpha($rangeB)) {\n            $rangeA = $rangeA . '1';\n            $rangeB = $rangeB . AddressRange::MAX_ROW;\n        }\n\n        // Calculate range outer borders\n        $rangeStart = self::coordinateFromString($rangeA);\n        $rangeEnd = self::coordinateFromString($rangeB);\n\n        // Translate column into index\n        $rangeStart[0] = self::columnIndexFromString($rangeStart[0]);\n        $rangeEnd[0] = self::columnIndexFromString($rangeEnd[0]);\n        $rangeStart[1] = (int) $rangeStart[1];\n        $rangeEnd[1] = (int) $rangeEnd[1];\n\n        return [$rangeStart, $rangeEnd];\n    }\n\n    /**\n     * Calculate range dimension.\n     *\n     * @param string $range Cell range, Single Cell, Row/Column Range (e.g. A1:A1, B2, B:C, 2:3)\n     *\n     * @return array{int, int} Range dimension (width, height)\n     */\n    public static function rangeDimension(string $range): array\n    {\n        // Calculate range outer borders\n        [$rangeStart, $rangeEnd] = self::rangeBoundaries($range);\n\n        return [($rangeEnd[0] - $rangeStart[0] + 1), ($rangeEnd[1] - $rangeStart[1] + 1)];\n    }\n\n    /**\n     * Calculate range boundaries.\n     *\n     * @param string $range Cell range, Single Cell, Row/Column Range (e.g. A1:A1, B2, B:C, 2:3)\n     *\n     * @return array{array{string, int}, array{string, int}} Range coordinates [Start Cell, End Cell]\n     *                    where Start Cell and End Cell are arrays [Column ID, Row Number]\n     */\n    public static function getRangeBoundaries(string $range): array\n    {\n        [$rangeA, $rangeB] = self::rangeBoundaries($range);\n\n        return [\n            [self::stringFromColumnIndex($rangeA[0]), $rangeA[1]],\n            [self::stringFromColumnIndex($rangeB[0]), $rangeB[1]],\n        ];\n    }\n\n    /**\n     * Check if cell or range reference is valid and return an array with type of reference (cell or range), worksheet (if it was given)\n     * and the coordinate or the first coordinate and second coordinate if it is a range.\n     *\n     * @param string $reference Coordinate or Range (e.g. A1:A1, B2, B:C, 2:3)\n     *\n     * @return array{type: string, firstCoordinate?: string, secondCoordinate?: string, coordinate?: string, worksheet?: string, localReference?: string} reference data\n     */\n    private static function validateReferenceAndGetData($reference): array\n    {\n        $data = [];\n        if (1 !== preg_match(self::FULL_REFERENCE_REGEX, $reference, $matches)) {\n            return ['type' => 'invalid'];\n        }\n\n        if (isset($matches['secondCoordinate'])) {\n            $data['type'] = 'range';\n            $data['firstCoordinate'] = str_replace('$', '', $matches['firstCoordinate']);\n            $data['secondCoordinate'] = str_replace('$', '', $matches['secondCoordinate']);\n        } else {\n            $data['type'] = 'coordinate';\n            $data['coordinate'] = str_replace('$', '', $matches['firstCoordinate']);\n        }\n\n        $worksheet = $matches['worksheet'];\n        if ($worksheet !== '') {\n            if (str_starts_with($worksheet, \"'\") && str_ends_with($worksheet, \"'\")) {\n                $worksheet = substr($worksheet, 1, -1);\n            }\n            $data['worksheet'] = strtolower($worksheet);\n        }\n        $data['localReference'] = str_replace('$', '', $matches['localReference']);\n\n        return $data;\n    }\n\n    /**\n     * Check if coordinate is inside a range.\n     *\n     * @param string $range Cell range, Single Cell, Row/Column Range (e.g. A1:A1, B2, B:C, 2:3)\n     * @param string $coordinate Cell coordinate (e.g. A1)\n     *\n     * @return bool true if coordinate is inside range\n     */\n    public static function coordinateIsInsideRange(string $range, string $coordinate): bool\n    {\n        $range = Validations::convertWholeRowColumn($range);\n        $rangeData = self::validateReferenceAndGetData($range);\n        if ($rangeData['type'] === 'invalid') {\n            throw new Exception('First argument needs to be a range');\n        }\n\n        $coordinateData = self::validateReferenceAndGetData($coordinate);\n        if ($coordinateData['type'] === 'invalid') {\n            throw new Exception('Second argument needs to be a single coordinate');\n        }\n\n        if (isset($coordinateData['worksheet']) && !isset($rangeData['worksheet'])) {\n            return false;\n        }\n        if (!isset($coordinateData['worksheet']) && isset($rangeData['worksheet'])) {\n            return false;\n        }\n\n        if (isset($coordinateData['worksheet'], $rangeData['worksheet'])) {\n            if ($coordinateData['worksheet'] !== $rangeData['worksheet']) {\n                return false;\n            }\n        }\n\n        if (!isset($rangeData['localReference'])) {\n            return false;\n        }\n        $boundaries = self::rangeBoundaries($rangeData['localReference']);\n        if (!isset($coordinateData['localReference'])) {\n            return false;\n        }\n        $coordinates = self::indexesFromString($coordinateData['localReference']);\n\n        $columnIsInside = $boundaries[0][0] <= $coordinates[0] && $coordinates[0] <= $boundaries[1][0];\n        if (!$columnIsInside) {\n            return false;\n        }\n        $rowIsInside = $boundaries[0][1] <= $coordinates[1] && $coordinates[1] <= $boundaries[1][1];\n        if (!$rowIsInside) {\n            return false;\n        }\n\n        return true;\n    }\n\n    /**\n     * Column index from string.\n     *\n     * @param ?string $columnAddress eg 'A'\n     *\n     * @return int Column index (A = 1)\n     */\n    public static function columnIndexFromString(?string $columnAddress): int\n    {\n        //    Using a lookup cache adds a slight memory overhead, but boosts speed\n        //    caching using a static within the method is faster than a class static,\n        //        though it's additional memory overhead\n        /** @var int[] */\n        static $indexCache = [];\n        $columnAddress = $columnAddress ?? '';\n\n        if (isset($indexCache[$columnAddress])) {\n            return $indexCache[$columnAddress];\n        }\n        //    It's surprising how costly the strtoupper() and ord() calls actually are, so we use a lookup array\n        //        rather than use ord() and make it case-insensitive to get rid of the strtoupper() as well.\n        //        Because it's a static, there's no significant memory overhead either.\n        /** @var array<string, int> */\n        static $columnLookup = [\n            'A' => 1, 'B' => 2, 'C' => 3, 'D' => 4, 'E' => 5, 'F' => 6, 'G' => 7, 'H' => 8, 'I' => 9, 'J' => 10,\n            'K' => 11, 'L' => 12, 'M' => 13, 'N' => 14, 'O' => 15, 'P' => 16, 'Q' => 17, 'R' => 18, 'S' => 19,\n            'T' => 20, 'U' => 21, 'V' => 22, 'W' => 23, 'X' => 24, 'Y' => 25, 'Z' => 26,\n            'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5, 'f' => 6, 'g' => 7, 'h' => 8, 'i' => 9, 'j' => 10,\n            'k' => 11, 'l' => 12, 'm' => 13, 'n' => 14, 'o' => 15, 'p' => 16, 'q' => 17, 'r' => 18, 's' => 19,\n            't' => 20, 'u' => 21, 'v' => 22, 'w' => 23, 'x' => 24, 'y' => 25, 'z' => 26,\n        ];\n\n        //    We also use the language construct isset() rather than the more costly strlen() function to match the\n        //       length of $columnAddress for improved performance\n        if (isset($columnAddress[0])) {\n            if (!isset($columnAddress[1])) {\n                $indexCache[$columnAddress] = $columnLookup[$columnAddress];\n\n                return $indexCache[$columnAddress];\n            }\n            if (!isset($columnAddress[2])) {\n                $indexCache[$columnAddress] = $columnLookup[$columnAddress[0]] * 26\n                    + $columnLookup[$columnAddress[1]];\n\n                return $indexCache[$columnAddress];\n            }\n            if (!isset($columnAddress[3])) {\n                $temp = $columnLookup[$columnAddress[0]] * 676\n                    + $columnLookup[$columnAddress[1]] * 26\n                    + $columnLookup[$columnAddress[2]];\n\n                if ($temp <= AddressRange::MAX_COLUMN_INT) {\n                    $indexCache[$columnAddress] = $temp;\n\n                    return $temp;\n                }\n            }\n        }\n\n        throw new Exception(\n            'Column string index can not be ' . ((isset($columnAddress[0])) ? ('beyond ' . AddressRange::MAX_COLUMN) : 'empty')\n        );\n    }\n\n    private const LOOKUP_CACHE = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n    /**\n     * String from column index.\n     *\n     * @param int|numeric-string $columnIndex Column index (A = 1)\n     */\n    public static function stringFromColumnIndex(int|string $columnIndex, bool $tolerateZero = false): string\n    {\n        /** @var string[] */\n        static $indexCache = [];\n        $columnIndex2 = (int) $columnIndex;\n        if ($columnIndex2 === 0 && $tolerateZero) {\n            return '';\n        }\n        if ($columnIndex2 < 1 || $columnIndex2 > AddressRange::MAX_COLUMN_INT) {\n            throw new Exception(\"Invalid column index $columnIndex\");\n        }\n\n        $columnIndex = $columnIndex2;\n        if (!isset($indexCache[$columnIndex])) {\n            $indexValue = $columnIndex;\n            $base26 = '';\n            do {\n                $characterValue = ($indexValue % 26) ?: 26;\n                $indexValue = ($indexValue - $characterValue) / 26;\n                $base26 = self::LOOKUP_CACHE[$characterValue] . $base26;\n            } while ($indexValue > 0);\n            $indexCache[$columnIndex] = $base26;\n        }\n\n        return $indexCache[$columnIndex];\n    }\n\n    /**\n     * Extract all cell references in range, which may be comprised of multiple cell ranges.\n     *\n     * @param string $cellRange Range: e.g. 'A1' or 'A1:C10' or 'A1:E10,A20:E25' or 'A1:E5 C3:G7' or 'A1:C1,A3:C3 B1:C3'\n     *\n     * @return string[] Array containing single cell references\n     */\n    public static function extractAllCellReferencesInRange(string $cellRange): array\n    {\n        if (substr_count($cellRange, '!') > 1) {\n            throw new Exception('3-D Range References are not supported');\n        }\n\n        [$worksheet, $cellRange] = Worksheet::extractSheetTitle($cellRange, true);\n        $quoted = '';\n        if ($worksheet) {\n            $quoted = Worksheet::nameRequiresQuotes($worksheet) ? \"'\" : '';\n            if (str_starts_with($worksheet, \"'\") && str_ends_with($worksheet, \"'\")) {\n                $worksheet = substr($worksheet, 1, -1);\n            }\n            $worksheet = str_replace(\"'\", \"''\", $worksheet);\n        }\n        [$ranges, $operators] = self::getCellBlocksFromRangeString($cellRange ?? 'A1');\n\n        $cells = [];\n        foreach ($ranges as $range) {\n            /** @var string $range */\n            $cells[] = self::getReferencesForCellBlock($range);\n        }\n\n        /** @var mixed[] */\n        $cells = self::processRangeSetOperators($operators, $cells);\n\n        if (empty($cells)) {\n            return [];\n        }\n\n        /** @var string[] */\n        $cellList = array_merge(...$cells); //* @phpstan-ignore-line\n        // Unsure how to satisfy phpstan in line above\n\n        $retVal = array_map(\n            fn (string $cellAddress) => ($worksheet !== '') ? \"{$quoted}{$worksheet}{$quoted}!{$cellAddress}\" : $cellAddress,\n            self::sortCellReferenceArray($cellList)\n        );\n\n        return $retVal;\n    }\n\n    /**\n     * @param mixed[] $operators\n     * @param mixed[][] $cells\n     *\n     * @return mixed[]\n     */\n    private static function processRangeSetOperators(array $operators, array $cells): array\n    {\n        $operatorCount = count($operators);\n        for ($offset = 0; $offset < $operatorCount; ++$offset) {\n            $operator = $operators[$offset];\n            if ($operator !== ' ') {\n                continue;\n            }\n\n            $cells[$offset] = array_intersect($cells[$offset], $cells[$offset + 1]);\n            unset($operators[$offset], $cells[$offset + 1]);\n            $operators = array_values($operators);\n            $cells = array_values($cells);\n            --$offset;\n            --$operatorCount;\n        }\n\n        return $cells;\n    }\n\n    /**\n     * @param string[] $cellList\n     *\n     * @return string[]\n     */\n    private static function sortCellReferenceArray(array $cellList): array\n    {\n        //    Sort the result by column and row\n        $sortKeys = [];\n        foreach ($cellList as $coordinate) {\n            $column = '';\n            $row = 0;\n            sscanf($coordinate, '%[A-Z]%d', $column, $row);\n            /** @var int $row */\n            $key = (--$row * AddressRange::MAX_COLUMN_INT) + self::columnIndexFromString((string) $column);\n            $sortKeys[$key] = $coordinate;\n        }\n        ksort($sortKeys);\n\n        return array_values($sortKeys);\n    }\n\n    /**\n     * Get all cell references applying union and intersection.\n     *\n     * @param string $cellBlock A cell range e.g. A1:B5,D1:E5 B2:C4\n     *\n     * @return string A string without intersection operator.\n     *   If there was no intersection to begin with, return original argument.\n     *   Otherwise, return cells and/or cell ranges in that range separated by comma.\n     */\n    public static function resolveUnionAndIntersection(string $cellBlock, string $implodeCharacter = ','): string\n    {\n        $cellBlock = preg_replace('/  +/', ' ', trim($cellBlock)) ?? $cellBlock;\n        $cellBlock = preg_replace('/ ,/', ',', $cellBlock) ?? $cellBlock;\n        $cellBlock = preg_replace('/, /', ',', $cellBlock) ?? $cellBlock;\n        $array1 = [];\n        $blocks = explode(',', $cellBlock);\n        foreach ($blocks as $block) {\n            $block0 = explode(' ', $block);\n            if (count($block0) === 1) {\n                $array1 = array_merge($array1, $block0);\n            } else {\n                $blockIdx = -1;\n                $array2 = [];\n                foreach ($block0 as $block00) {\n                    ++$blockIdx;\n                    if ($blockIdx === 0) {\n                        $array2 = self::getReferencesForCellBlock($block00);\n                    } else {\n                        $array2 = array_intersect($array2, self::getReferencesForCellBlock($block00));\n                    }\n                }\n                $array1 = array_merge($array1, $array2);\n            }\n        }\n\n        return implode($implodeCharacter, $array1);\n    }\n\n    /**\n     * Get all cell references for an individual cell block.\n     *\n     * @param string $cellBlock A cell range e.g. A4:B5\n     *\n     * @return string[] All individual cells in that range\n     */\n    private static function getReferencesForCellBlock(string $cellBlock): array\n    {\n        $returnValue = [];\n\n        // Single cell?\n        if (!self::coordinateIsRange($cellBlock)) {\n            return (array) $cellBlock;\n        }\n\n        // Range...\n        $ranges = self::splitRange($cellBlock);\n        foreach ($ranges as $range) {\n            // Single cell?\n            if (!isset($range[1])) {\n                $returnValue[] = $range[0];\n\n                continue;\n            }\n\n            // Range...\n            [$rangeStart, $rangeEnd] = $range;\n            [$startColumn, $startRow] = self::coordinateFromString($rangeStart);\n            [$endColumn, $endRow] = self::coordinateFromString($rangeEnd);\n            $startColumnIndex = self::columnIndexFromString($startColumn);\n            $endColumnIndex = self::columnIndexFromString($endColumn);\n            ++$endColumnIndex;\n\n            // Current data\n            $currentColumnIndex = $startColumnIndex;\n            $currentRow = $startRow;\n\n            self::validateRange($cellBlock, $startColumnIndex, $endColumnIndex, (int) $currentRow, (int) $endRow);\n\n            // Loop cells\n            while ($currentColumnIndex < $endColumnIndex) {\n                /** @var int $currentRow */\n                /** @var int $endRow */\n                while ($currentRow <= $endRow) {\n                    $returnValue[] = self::stringFromColumnIndex($currentColumnIndex) . $currentRow;\n                    ++$currentRow;\n                }\n                ++$currentColumnIndex;\n                $currentRow = $startRow;\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * Convert an associative array of single cell coordinates to values to an associative array\n     * of cell ranges to values.  Only adjacent cell coordinates with the same\n     * value will be merged.  If the value is an object, it must implement the method getHashCode().\n     *\n     * For example, this function converts:\n     *\n     *    [ 'A1' => 'x', 'A2' => 'x', 'A3' => 'x', 'A4' => 'y' ]\n     *\n     * to:\n     *\n     *    [ 'A1:A3' => 'x', 'A4' => 'y' ]\n     *\n     * @param array<string, mixed> $coordinateCollection associative array mapping coordinates to values\n     *\n     * @return array<string, mixed> associative array mapping coordinate ranges to values\n     */\n    public static function mergeRangesInCollection(array $coordinateCollection): array\n    {\n        $hashedValues = [];\n        $mergedCoordCollection = [];\n\n        foreach ($coordinateCollection as $coord => $value) {\n            if (self::coordinateIsRange($coord)) {\n                $mergedCoordCollection[$coord] = $value;\n\n                continue;\n            }\n\n            [$column, $row] = self::coordinateFromString($coord);\n            $row = (int) (ltrim($row, '$'));\n            $hashCode = $column . '-' . StringHelper::convertToString((is_object($value) && method_exists($value, 'getHashCode')) ? $value->getHashCode() : $value);\n\n            if (!isset($hashedValues[$hashCode])) {\n                $hashedValues[$hashCode] = (object) [\n                    'value' => $value,\n                    'col' => $column,\n                    'rows' => [$row],\n                ];\n            } else {\n                $hashedValues[$hashCode]->rows[] = $row;\n            }\n        }\n\n        ksort($hashedValues);\n\n        foreach ($hashedValues as $hashedValue) {\n            sort($hashedValue->rows);\n            $rowStart = null;\n            $rowEnd = null;\n            $ranges = [];\n\n            foreach ($hashedValue->rows as $row) {\n                if ($rowStart === null) {\n                    $rowStart = $row;\n                    $rowEnd = $row;\n                } elseif ($rowEnd === $row - 1) {\n                    $rowEnd = $row;\n                } else {\n                    if ($rowStart == $rowEnd) {\n                        $ranges[] = $hashedValue->col . $rowStart;\n                    } else {\n                        $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd;\n                    }\n\n                    $rowStart = $row;\n                    $rowEnd = $row;\n                }\n            }\n\n            if ($rowStart !== null) { // @phpstan-ignore-line\n                if ($rowStart == $rowEnd) {\n                    $ranges[] = $hashedValue->col . $rowStart;\n                } else {\n                    $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd;\n                }\n            }\n\n            foreach ($ranges as $range) {\n                $mergedCoordCollection[$range] = $hashedValue->value;\n            }\n        }\n\n        return $mergedCoordCollection;\n    }\n\n    /**\n     * Get the individual cell blocks from a range string, removing any $ characters.\n     *      then splitting by operators and returning an array with ranges and operators.\n     *\n     * @return mixed[][]\n     */\n    private static function getCellBlocksFromRangeString(string $rangeString): array\n    {\n        $rangeString = str_replace('$', '', strtoupper($rangeString));\n\n        // split range sets on intersection (space) or union (,) operators\n        $tokens = preg_split('/([ ,])/', $rangeString, -1, PREG_SPLIT_DELIM_CAPTURE) ?: [];\n        $split = array_chunk($tokens, 2);\n        $ranges = array_column($split, 0);\n        $operators = array_column($split, 1);\n\n        return [$ranges, $operators];\n    }\n\n    /**\n     * Check that the given range is valid, i.e. that the start column and row are not greater than the end column and\n     * row.\n     *\n     * @param string $cellBlock The original range, for displaying a meaningful error message\n     */\n    private static function validateRange(string $cellBlock, int $startColumnIndex, int $endColumnIndex, int $currentRow, int $endRow): void\n    {\n        if ($startColumnIndex >= $endColumnIndex || $currentRow > $endRow) {\n            throw new Exception('Invalid range: \"' . $cellBlock . '\"');\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/DataType.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass DataType\n{\n    // Data types\n    const TYPE_STRING2 = 'str';\n    const TYPE_STRING = 's';\n    const TYPE_FORMULA = 'f';\n    const TYPE_NUMERIC = 'n';\n    const TYPE_BOOL = 'b';\n    const TYPE_NULL = 'null';\n    const TYPE_INLINE = 'inlineStr';\n    const TYPE_ERROR = 'e';\n    const TYPE_ISO_DATE = 'd';\n    const TYPE_DRAWING_IN_CELL = 'drawingCell';\n\n    /**\n     * List of error codes.\n     *\n     * @var array<string, int>\n     */\n    private static array $errorCodes = [\n        '#NULL!' => 0,\n        '#DIV/0!' => 1,\n        '#VALUE!' => 2,\n        '#REF!' => 3,\n        '#NAME?' => 4,\n        '#NUM!' => 5,\n        '#N/A' => 6,\n        '#CALC!' => 7,\n    ];\n\n    public const MAX_STRING_LENGTH = 32767;\n\n    /**\n     * Get list of error codes.\n     *\n     * @return array<string, int>\n     */\n    public static function getErrorCodes(): array\n    {\n        return self::$errorCodes;\n    }\n\n    /**\n     * Check a string that it satisfies Excel requirements.\n     *\n     * @param null|RichText|string $textValue Value to sanitize to an Excel string\n     *\n     * @return RichText|string Sanitized value\n     */\n    public static function checkString(null|RichText|string $textValue, bool $preserveCr = false): RichText|string\n    {\n        if ($textValue instanceof RichText) {\n            // TODO: Sanitize Rich-Text string (max. character count is 32,767)\n            return $textValue;\n        }\n\n        // string must never be longer than 32,767 characters, truncate if necessary\n        $textValue = StringHelper::substring((string) $textValue, 0, self::MAX_STRING_LENGTH);\n\n        // we require that newline is represented as \"\\n\" in core, not as \"\\r\\n\" or \"\\r\"\n        if (!$preserveCr) {\n            $textValue = str_replace([\"\\r\\n\", \"\\r\"], \"\\n\", $textValue);\n        }\n\n        return $textValue;\n    }\n\n    /**\n     * Check a value that it is a valid error code.\n     *\n     * @param mixed $value Value to sanitize to an Excel error code\n     *\n     * @return string Sanitized value\n     */\n    public static function checkErrorCode(mixed $value): string\n    {\n        $default = '#NULL!';\n        $value = ($value === null) ? $default : StringHelper::convertToString($value, false, $default);\n\n        if (!isset(self::$errorCodes[$value])) {\n            $value = $default;\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/DataValidation.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nclass DataValidation\n{\n    // Data validation types\n    const TYPE_NONE = 'none';\n    const TYPE_CUSTOM = 'custom';\n    const TYPE_DATE = 'date';\n    const TYPE_DECIMAL = 'decimal';\n    const TYPE_LIST = 'list';\n    const TYPE_TEXTLENGTH = 'textLength';\n    const TYPE_TIME = 'time';\n    const TYPE_WHOLE = 'whole';\n\n    // Data validation error styles\n    const STYLE_STOP = 'stop';\n    const STYLE_WARNING = 'warning';\n    const STYLE_INFORMATION = 'information';\n\n    // Data validation operators\n    const OPERATOR_BETWEEN = 'between';\n    const OPERATOR_EQUAL = 'equal';\n    const OPERATOR_GREATERTHAN = 'greaterThan';\n    const OPERATOR_GREATERTHANOREQUAL = 'greaterThanOrEqual';\n    const OPERATOR_LESSTHAN = 'lessThan';\n    const OPERATOR_LESSTHANOREQUAL = 'lessThanOrEqual';\n    const OPERATOR_NOTBETWEEN = 'notBetween';\n    const OPERATOR_NOTEQUAL = 'notEqual';\n    private const DEFAULT_OPERATOR = self::OPERATOR_BETWEEN;\n\n    /**\n     * Formula 1.\n     */\n    private string $formula1 = '';\n\n    /**\n     * Formula 2.\n     */\n    private string $formula2 = '';\n\n    /**\n     * Type.\n     */\n    private string $type = self::TYPE_NONE;\n\n    /**\n     * Error style.\n     */\n    private string $errorStyle = self::STYLE_STOP;\n\n    /**\n     * Operator.\n     */\n    private string $operator = self::DEFAULT_OPERATOR;\n\n    /**\n     * Allow Blank.\n     */\n    private bool $allowBlank = false;\n\n    /**\n     * Show DropDown.\n     */\n    private bool $showDropDown = false;\n\n    /**\n     * Show InputMessage.\n     */\n    private bool $showInputMessage = false;\n\n    /**\n     * Show ErrorMessage.\n     */\n    private bool $showErrorMessage = false;\n\n    /**\n     * Error title.\n     */\n    private string $errorTitle = '';\n\n    /**\n     * Error.\n     */\n    private string $error = '';\n\n    /**\n     * Prompt title.\n     */\n    private string $promptTitle = '';\n\n    /**\n     * Prompt.\n     */\n    private string $prompt = '';\n\n    /**\n     * Get Formula 1.\n     */\n    public function getFormula1(): string\n    {\n        return $this->formula1;\n    }\n\n    /**\n     * Set Formula 1.\n     *\n     * @return $this\n     */\n    public function setFormula1(string $formula): static\n    {\n        $this->formula1 = $formula;\n\n        return $this;\n    }\n\n    /**\n     * Get Formula 2.\n     */\n    public function getFormula2(): string\n    {\n        return $this->formula2;\n    }\n\n    /**\n     * Set Formula 2.\n     *\n     * @return $this\n     */\n    public function setFormula2(string $formula): static\n    {\n        $this->formula2 = $formula;\n\n        return $this;\n    }\n\n    /**\n     * Get Type.\n     */\n    public function getType(): string\n    {\n        return $this->type;\n    }\n\n    /**\n     * Set Type.\n     *\n     * @return $this\n     */\n    public function setType(string $type): static\n    {\n        $this->type = $type;\n\n        return $this;\n    }\n\n    /**\n     * Get Error style.\n     */\n    public function getErrorStyle(): string\n    {\n        return $this->errorStyle;\n    }\n\n    /**\n     * Set Error style.\n     *\n     * @param string $errorStyle see self::STYLE_*\n     *\n     * @return $this\n     */\n    public function setErrorStyle(string $errorStyle): static\n    {\n        $this->errorStyle = $errorStyle;\n\n        return $this;\n    }\n\n    /**\n     * Get Operator.\n     */\n    public function getOperator(): string\n    {\n        return $this->operator;\n    }\n\n    /**\n     * Set Operator.\n     *\n     * @return $this\n     */\n    public function setOperator(string $operator): static\n    {\n        $this->operator = ($operator === '') ? self::DEFAULT_OPERATOR : $operator;\n\n        return $this;\n    }\n\n    /**\n     * Get Allow Blank.\n     */\n    public function getAllowBlank(): bool\n    {\n        return $this->allowBlank;\n    }\n\n    /**\n     * Set Allow Blank.\n     *\n     * @return $this\n     */\n    public function setAllowBlank(bool $allowBlank): static\n    {\n        $this->allowBlank = $allowBlank;\n\n        return $this;\n    }\n\n    /**\n     * Get Show DropDown.\n     */\n    public function getShowDropDown(): bool\n    {\n        return $this->showDropDown;\n    }\n\n    /**\n     * Set Show DropDown.\n     *\n     * @return $this\n     */\n    public function setShowDropDown(bool $showDropDown): static\n    {\n        $this->showDropDown = $showDropDown;\n\n        return $this;\n    }\n\n    /**\n     * Get Show InputMessage.\n     */\n    public function getShowInputMessage(): bool\n    {\n        return $this->showInputMessage;\n    }\n\n    /**\n     * Set Show InputMessage.\n     *\n     * @return $this\n     */\n    public function setShowInputMessage(bool $showInputMessage): static\n    {\n        $this->showInputMessage = $showInputMessage;\n\n        return $this;\n    }\n\n    /**\n     * Get Show ErrorMessage.\n     */\n    public function getShowErrorMessage(): bool\n    {\n        return $this->showErrorMessage;\n    }\n\n    /**\n     * Set Show ErrorMessage.\n     *\n     * @return $this\n     */\n    public function setShowErrorMessage(bool $showErrorMessage): static\n    {\n        $this->showErrorMessage = $showErrorMessage;\n\n        return $this;\n    }\n\n    /**\n     * Get Error title.\n     */\n    public function getErrorTitle(): string\n    {\n        return $this->errorTitle;\n    }\n\n    /**\n     * Set Error title.\n     *\n     * @return $this\n     */\n    public function setErrorTitle(string $errorTitle): static\n    {\n        $this->errorTitle = $errorTitle;\n\n        return $this;\n    }\n\n    /**\n     * Get Error.\n     */\n    public function getError(): string\n    {\n        return $this->error;\n    }\n\n    /**\n     * Set Error.\n     *\n     * @return $this\n     */\n    public function setError(string $error): static\n    {\n        $this->error = $error;\n\n        return $this;\n    }\n\n    /**\n     * Get Prompt title.\n     */\n    public function getPromptTitle(): string\n    {\n        return $this->promptTitle;\n    }\n\n    /**\n     * Set Prompt title.\n     *\n     * @return $this\n     */\n    public function setPromptTitle(string $promptTitle): static\n    {\n        $this->promptTitle = $promptTitle;\n\n        return $this;\n    }\n\n    /**\n     * Get Prompt.\n     */\n    public function getPrompt(): string\n    {\n        return $this->prompt;\n    }\n\n    /**\n     * Set Prompt.\n     *\n     * @return $this\n     */\n    public function setPrompt(string $prompt): static\n    {\n        $this->prompt = $prompt;\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->formula1\n            . $this->formula2\n            . $this->type\n            . $this->errorStyle\n            . $this->operator\n            . ($this->allowBlank ? 't' : 'f')\n            . ($this->showDropDown ? 't' : 'f')\n            . ($this->showInputMessage ? 't' : 'f')\n            . ($this->showErrorMessage ? 't' : 'f')\n            . $this->errorTitle\n            . $this->error\n            . $this->promptTitle\n            . $this->prompt\n            . $this->sqref\n            . __CLASS__\n        );\n    }\n\n    private ?string $sqref = null;\n\n    public function getSqref(): ?string\n    {\n        return $this->sqref;\n    }\n\n    public function setSqref(?string $str): self\n    {\n        $this->sqref = $str;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/DataValidator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\n/**\n * Validate a cell value according to its validation rules.\n */\nclass DataValidator\n{\n    /**\n     * Does this cell contain valid value?\n     *\n     * @param Cell $cell Cell to check the value\n     */\n    public function isValid(Cell $cell): bool\n    {\n        if (!$cell->hasDataValidation() || $cell->getDataValidation()->getType() === DataValidation::TYPE_NONE) {\n            return true;\n        }\n\n        $cellValue = $cell->getValue();\n        $dataValidation = $cell->getDataValidation();\n\n        if (!$dataValidation->getAllowBlank() && ($cellValue === null || $cellValue === '')) {\n            return false;\n        }\n\n        $returnValue = false;\n        $type = $dataValidation->getType();\n        if ($type === DataValidation::TYPE_LIST) {\n            $returnValue = $this->isValueInList($cell);\n        } elseif ($type === DataValidation::TYPE_WHOLE) {\n            if (!is_numeric($cellValue) || fmod((float) $cellValue, 1) != 0) {\n                $returnValue = false;\n            } else {\n                $returnValue = $this->numericOperator($dataValidation, (int) $cellValue, $cell);\n            }\n        } elseif ($type === DataValidation::TYPE_DECIMAL || $type === DataValidation::TYPE_DATE || $type === DataValidation::TYPE_TIME) {\n            if (!is_numeric($cellValue)) {\n                $returnValue = false;\n            } else {\n                $returnValue = $this->numericOperator($dataValidation, (float) $cellValue, $cell);\n            }\n        } elseif ($type === DataValidation::TYPE_TEXTLENGTH) {\n            $returnValue = $this->numericOperator($dataValidation, mb_strlen($cell->getValueString()), $cell);\n        }\n\n        return $returnValue;\n    }\n\n    private const TWO_FORMULAS = [DataValidation::OPERATOR_BETWEEN, DataValidation::OPERATOR_NOTBETWEEN];\n\n    private static function evaluateNumericFormula(mixed $formula, Cell $cell): mixed\n    {\n        if (!is_numeric($formula)) {\n            $calculation = Calculation::getInstance($cell->getWorksheet()->getParent());\n\n            try {\n                $formula2 = StringHelper::convertToString($formula);\n                $result = $calculation\n                    ->calculateFormula(\"=$formula2\", $cell->getCoordinate(), $cell);\n                while (is_array($result)) {\n                    $result = array_pop($result);\n                }\n                $formula = $result;\n            } catch (Exception) {\n                // do nothing\n            }\n        }\n\n        return $formula;\n    }\n\n    private function numericOperator(DataValidation $dataValidation, int|float $cellValue, Cell $cell): bool\n    {\n        $operator = $dataValidation->getOperator();\n        $formula1 = self::evaluateNumericFormula(\n            $dataValidation->getFormula1(),\n            $cell\n        );\n\n        $formula2 = 0;\n        if (in_array($operator, self::TWO_FORMULAS, true)) {\n            $formula2 = self::evaluateNumericFormula(\n                $dataValidation->getFormula2(),\n                $cell\n            );\n        }\n\n        return match ($operator) {\n            DataValidation::OPERATOR_BETWEEN => $cellValue >= $formula1 && $cellValue <= $formula2,\n            DataValidation::OPERATOR_NOTBETWEEN => $cellValue < $formula1 || $cellValue > $formula2,\n            DataValidation::OPERATOR_EQUAL => $cellValue == $formula1,\n            DataValidation::OPERATOR_NOTEQUAL => $cellValue != $formula1,\n            DataValidation::OPERATOR_LESSTHAN => $cellValue < $formula1,\n            DataValidation::OPERATOR_LESSTHANOREQUAL => $cellValue <= $formula1,\n            DataValidation::OPERATOR_GREATERTHAN => $cellValue > $formula1,\n            DataValidation::OPERATOR_GREATERTHANOREQUAL => $cellValue >= $formula1,\n            default => false,\n        };\n    }\n\n    /**\n     * Does this cell contain valid value, based on list?\n     *\n     * @param Cell $cell Cell to check the value\n     */\n    private function isValueInList(Cell $cell): bool\n    {\n        $cellValueString = $cell->getValueString();\n        $dataValidation = $cell->getDataValidation();\n\n        $formula1 = $dataValidation->getFormula1();\n        if (!empty($formula1)) {\n            // inline values list\n            if ($formula1[0] === '\"') {\n                return in_array(strtolower($cellValueString), explode(',', strtolower(trim($formula1, '\"'))), true);\n            }\n            $calculation = Calculation::getInstance($cell->getWorksheet()->getParent());\n\n            try {\n                $result = $calculation->calculateFormula(\"=$formula1\", $cell->getCoordinate(), $cell);\n                $result = is_array($result) ? Functions::flattenArray($result) : [$result];\n                foreach ($result as $oneResult) {\n                    if (is_scalar($oneResult) && strcasecmp((string) $oneResult, $cellValueString) === 0) {\n                        return true;\n                    }\n                }\n            } catch (Exception) {\n                // do nothing\n            }\n\n            return false;\n        }\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/DefaultValueBinder.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse Composer\\Pcre\\Preg;\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\CalculationParserOnly;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse Stringable;\n\nclass DefaultValueBinder implements IValueBinder\n{\n    //                            123 456 789 012 345\n    private const FIFTEEN_NINES = 999_999_999_999_999;\n\n    /**\n     * Bind value to a cell.\n     *\n     * @param Cell $cell Cell to bind value to\n     * @param mixed $value Value to bind in cell\n     */\n    public function bindValue(Cell $cell, mixed $value): bool\n    {\n        // sanitize UTF-8 strings\n        if (is_string($value)) {\n            $value = StringHelper::sanitizeUTF8($value);\n        } elseif ($value === null || is_scalar($value) || $value instanceof RichText) {\n            // No need to do anything\n        } elseif ($value instanceof DateTimeInterface) {\n            $value = $value->format('Y-m-d H:i:s');\n        } elseif ($value instanceof Stringable) {\n            $value = (string) $value;\n        } elseif ($value instanceof BaseDrawing) {\n            $value->setCoordinates($cell->getCoordinate());\n            $value->setResizeProportional(false);\n            $value->setInCell(true);\n            $value->setWorksheet($cell->getWorksheet(), true);\n        } else {\n            throw new SpreadsheetException('Unable to bind unstringable ' . gettype($value));\n        }\n\n        // Set value explicit\n        $cell->setValueExplicit($value, static::dataTypeForValue($value));\n\n        // Done!\n        return true;\n    }\n\n    /**\n     * DataType for value.\n     */\n    public static function dataTypeForValue(mixed $value): string\n    {\n        // Match the value against a few data types\n        if ($value === null) {\n            return DataType::TYPE_NULL;\n        }\n        if (is_int($value) && abs($value) > self::FIFTEEN_NINES) {\n            return DataType::TYPE_STRING;\n        }\n        if (is_float($value) || is_int($value)) {\n            return DataType::TYPE_NUMERIC;\n        }\n        if (is_bool($value)) {\n            return DataType::TYPE_BOOL;\n        }\n        if ($value === '') {\n            return DataType::TYPE_STRING;\n        }\n        if ($value instanceof RichText) {\n            return DataType::TYPE_INLINE;\n        }\n        if ($value instanceof BaseDrawing) {\n            return DataType::TYPE_DRAWING_IN_CELL;\n        }\n        if ($value instanceof Stringable) {\n            $value = (string) $value;\n        }\n        if (!is_string($value)) {\n            $gettype = is_object($value) ? get_class($value) : gettype($value);\n\n            throw new SpreadsheetException(\"unusable type $gettype\");\n        }\n        if (strlen($value) > 1 && $value[0] === '=') {\n            $calculation = CalculationParserOnly::getParserInstance();\n\n            try {\n                if (empty($calculation->parseFormula($value))) {\n                    return DataType::TYPE_STRING;\n                }\n            } catch (CalculationException $e) {\n                $message = $e->getMessage();\n                if (\n                    $message === 'Formula Error: An unexpected error occurred'\n                    || str_contains($message, 'has no operands')\n                ) {\n                    return DataType::TYPE_STRING;\n                }\n            }\n\n            return DataType::TYPE_FORMULA;\n        }\n        if (Preg::isMatch('/^[\\+\\-]?(\\d+\\.?\\d*|\\d*\\.?\\d+)([Ee][\\-\\+]?[0-2]?\\d{1,3})?$/', $value)) {\n            $tValue = ltrim($value, '+-');\n            if (strlen($tValue) > 1 && $tValue[0] === '0' && $tValue[1] !== '.') {\n                return DataType::TYPE_STRING;\n            }\n            if (!Preg::isMatch('/[eE.]/', $value)) {\n                $aValue = abs((float) $value);\n                if ($aValue > self::FIFTEEN_NINES) {\n                    return DataType::TYPE_STRING;\n                }\n            }\n            if (!is_numeric($value) || !is_finite((float) $value)) {\n                return DataType::TYPE_STRING;\n            }\n\n            return DataType::TYPE_NUMERIC;\n        }\n        $errorCodes = DataType::getErrorCodes();\n        if (isset($errorCodes[$value])) {\n            return DataType::TYPE_ERROR;\n        }\n\n        return DataType::TYPE_STRING;\n    }\n\n    protected bool $preserveCr = false;\n\n    public function getPreserveCr(): bool\n    {\n        return $this->preserveCr;\n    }\n\n    public function setPreserveCr(bool $preserveCr): self\n    {\n        $this->preserveCr = $preserveCr;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/Hyperlink.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nclass Hyperlink\n{\n    /**\n     * URL to link the cell to.\n     */\n    private string $url;\n\n    /**\n     * Tooltip to display on the hyperlink.\n     */\n    private string $tooltip;\n\n    private string $display = '';\n\n    /**\n     * Create a new Hyperlink.\n     *\n     * @param string $url Url to link the cell to\n     * @param string $tooltip Tooltip to display on the hyperlink\n     */\n    public function __construct(string $url = '', string $tooltip = '')\n    {\n        // Initialise member variables\n        $this->url = $url;\n        $this->tooltip = $tooltip;\n    }\n\n    /**\n     * Get URL.\n     */\n    public function getUrl(): string\n    {\n        return $this->url;\n    }\n\n    /**\n     * Set URL.\n     *\n     * @return $this\n     */\n    public function setUrl(string $url): static\n    {\n        $this->url = $url;\n\n        return $this;\n    }\n\n    /**\n     * Get tooltip.\n     */\n    public function getTooltip(): string\n    {\n        return $this->tooltip;\n    }\n\n    /**\n     * Set tooltip.\n     *\n     * @return $this\n     */\n    public function setTooltip(string $tooltip): static\n    {\n        $this->tooltip = $tooltip;\n\n        return $this;\n    }\n\n    /**\n     * Is this hyperlink internal? (to another worksheet or a cell in this worksheet).\n     */\n    public function isInternal(): bool\n    {\n        return str_starts_with($this->url, 'sheet://') || str_starts_with($this->url, '#');\n    }\n\n    public function getTypeHyperlink(): string\n    {\n        return $this->isInternal() ? '' : 'External';\n    }\n\n    public function getDisplay(): string\n    {\n        return $this->display;\n    }\n\n    /**\n     * This can be displayed in cell rather than actual cell contents.\n     * It seems to be ignored by Excel.\n     * It may be used by Google Sheets.\n     */\n    public function setDisplay(string $display): self\n    {\n        $this->display = $display;\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->url\n            . ','\n            . $this->tooltip\n            . ','\n            . $this->display\n            . ','\n            . __CLASS__\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/IValueBinder.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\ninterface IValueBinder\n{\n    /**\n     * Bind value to a cell.\n     *\n     * @param Cell $cell Cell to bind value to\n     * @param mixed $value Value to bind in cell\n     */\n    public function bindValue(Cell $cell, mixed $value): bool;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/IgnoredErrors.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nclass IgnoredErrors\n{\n    private bool $numberStoredAsText = false;\n\n    private bool $formula = false;\n\n    private bool $formulaRange = false;\n\n    private bool $twoDigitTextYear = false;\n\n    private bool $evalError = false;\n\n    public function setNumberStoredAsText(bool $value): self\n    {\n        $this->numberStoredAsText = $value;\n\n        return $this;\n    }\n\n    public function getNumberStoredAsText(): bool\n    {\n        return $this->numberStoredAsText;\n    }\n\n    public function setFormula(bool $value): self\n    {\n        $this->formula = $value;\n\n        return $this;\n    }\n\n    public function getFormula(): bool\n    {\n        return $this->formula;\n    }\n\n    public function setFormulaRange(bool $value): self\n    {\n        $this->formulaRange = $value;\n\n        return $this;\n    }\n\n    public function getFormulaRange(): bool\n    {\n        return $this->formulaRange;\n    }\n\n    public function setTwoDigitTextYear(bool $value): self\n    {\n        $this->twoDigitTextYear = $value;\n\n        return $this;\n    }\n\n    public function getTwoDigitTextYear(): bool\n    {\n        return $this->twoDigitTextYear;\n    }\n\n    public function setEvalError(bool $value): self\n    {\n        $this->evalError = $value;\n\n        return $this;\n    }\n\n    public function getEvalError(): bool\n    {\n        return $this->evalError;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/RowRange.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Stringable;\n\n/**\n * @implements AddressRange<int>\n */\nclass RowRange implements AddressRange, Stringable\n{\n    protected ?Worksheet $worksheet;\n\n    protected int $from;\n\n    protected int $to;\n\n    public function __construct(int $from, ?int $to = null, ?Worksheet $worksheet = null)\n    {\n        $this->validateFromTo($from, $to ?? $from);\n        $this->worksheet = $worksheet;\n    }\n\n    public function __destruct()\n    {\n        $this->worksheet = null;\n    }\n\n    /** @param array{int, int} $array */\n    public static function fromArray(array $array, ?Worksheet $worksheet = null): self\n    {\n        [$from, $to] = $array;\n\n        return new self($from, $to, $worksheet);\n    }\n\n    private function validateFromTo(int $from, int $to): void\n    {\n        // Identify actual top and bottom values (in case we've been given bottom and top)\n        $this->from = min($from, $to);\n        $this->to = max($from, $to);\n    }\n\n    public function from(): int\n    {\n        return $this->from;\n    }\n\n    public function to(): int\n    {\n        return $this->to;\n    }\n\n    public function rowCount(): int\n    {\n        return $this->to - $this->from + 1;\n    }\n\n    public function shiftRight(int $offset = 1): self\n    {\n        $newFrom = $this->from + $offset;\n        $newFrom = ($newFrom < 1) ? 1 : $newFrom;\n\n        $newTo = $this->to + $offset;\n        $newTo = ($newTo < 1) ? 1 : $newTo;\n\n        return new self($newFrom, $newTo, $this->worksheet);\n    }\n\n    public function shiftLeft(int $offset = 1): self\n    {\n        return $this->shiftRight(0 - $offset);\n    }\n\n    public function toCellRange(): CellRange\n    {\n        return new CellRange(\n            CellAddress::fromColumnAndRow(Coordinate::columnIndexFromString('A'), $this->from, $this->worksheet),\n            CellAddress::fromColumnAndRow(Coordinate::columnIndexFromString(AddressRange::MAX_COLUMN), $this->to)\n        );\n    }\n\n    public function __toString(): string\n    {\n        if ($this->worksheet !== null) {\n            $title = str_replace(\"'\", \"''\", $this->worksheet->getTitle());\n\n            return \"'{$title}'!{$this->from}:{$this->to}\";\n        }\n\n        return \"{$this->from}:{$this->to}\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Cell/StringValueBinder.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Cell;\n\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse Stringable;\n\nclass StringValueBinder extends DefaultValueBinder implements IValueBinder\n{\n    protected bool $convertNull = true;\n\n    protected bool $convertBoolean = true;\n\n    protected bool $convertNumeric = true;\n\n    protected bool $convertFormula = true;\n\n    protected bool $setIgnoredErrors = false;\n\n    public function setSetIgnoredErrors(bool $setIgnoredErrors = false): self\n    {\n        $this->setIgnoredErrors = $setIgnoredErrors;\n\n        return $this;\n    }\n\n    public function setNullConversion(bool $suppressConversion = false): self\n    {\n        $this->convertNull = $suppressConversion;\n\n        return $this;\n    }\n\n    public function setBooleanConversion(bool $suppressConversion = false): self\n    {\n        $this->convertBoolean = $suppressConversion;\n\n        return $this;\n    }\n\n    public function getBooleanConversion(): bool\n    {\n        return $this->convertBoolean;\n    }\n\n    public function setNumericConversion(bool $suppressConversion = false): self\n    {\n        $this->convertNumeric = $suppressConversion;\n\n        return $this;\n    }\n\n    public function setFormulaConversion(bool $suppressConversion = false): self\n    {\n        $this->convertFormula = $suppressConversion;\n\n        return $this;\n    }\n\n    public function setConversionForAllValueTypes(bool $suppressConversion = false): self\n    {\n        $this->convertNull = $suppressConversion;\n        $this->convertBoolean = $suppressConversion;\n        $this->convertNumeric = $suppressConversion;\n        $this->convertFormula = $suppressConversion;\n\n        return $this;\n    }\n\n    /**\n     * Bind value to a cell.\n     *\n     * @param Cell $cell Cell to bind value to\n     * @param mixed $value Value to bind in cell\n     */\n    public function bindValue(Cell $cell, mixed $value): bool\n    {\n        if (is_object($value)) {\n            return $this->bindObjectValue($cell, $value);\n        }\n        if ($value !== null && !is_scalar($value)) {\n            throw new SpreadsheetException('Unable to bind unstringable ' . gettype($value));\n        }\n\n        // sanitize UTF-8 strings\n        if (is_string($value)) {\n            $value = StringHelper::sanitizeUTF8($value);\n        }\n\n        $ignoredErrors = false;\n        if ($value === null && $this->convertNull === false) {\n            $cell->setValueExplicit($value, DataType::TYPE_NULL);\n        } elseif (is_bool($value) && $this->convertBoolean === false) {\n            $cell->setValueExplicit($value, DataType::TYPE_BOOL);\n        } elseif ((is_int($value) || is_float($value)) && $this->convertNumeric === false) {\n            $cell->setValueExplicit($value, DataType::TYPE_NUMERIC);\n        } elseif (is_string($value) && strlen($value) > 1 && $value[0] === '=' && $this->convertFormula === false && parent::dataTypeForValue($value) === DataType::TYPE_FORMULA) {\n            $cell->setValueExplicit($value, DataType::TYPE_FORMULA);\n        } else {\n            $ignoredErrors = is_numeric($value);\n            $cell->setValueExplicit((string) $value, DataType::TYPE_STRING);\n        }\n        if ($this->setIgnoredErrors) {\n            $cell->getIgnoredErrors()->setNumberStoredAsText($ignoredErrors);\n        }\n\n        return true;\n    }\n\n    protected function bindObjectValue(Cell $cell, object $value): bool\n    {\n        // Handle any objects that might be injected\n        $ignoredErrors = false;\n        if ($value instanceof DateTimeInterface) {\n            $value = $value->format('Y-m-d H:i:s');\n            $cell->setValueExplicit($value, DataType::TYPE_STRING);\n        } elseif ($value instanceof RichText) {\n            $cell->setValueExplicit($value, DataType::TYPE_INLINE);\n            $ignoredErrors = is_numeric($value->getPlainText());\n        } elseif ($value instanceof Stringable) {\n            $cell->setValueExplicit((string) $value, DataType::TYPE_STRING);\n            $ignoredErrors = is_numeric((string) $value);\n        } else {\n            throw new SpreadsheetException('Unable to bind unstringable object of type ' . get_class($value));\n        }\n        if ($this->setIgnoredErrors) {\n            $cell->getIgnoredErrors()->setNumberStoredAsText($ignoredErrors);\n        }\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/CellReferenceHelper.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\n\nclass CellReferenceHelper\n{\n    protected string $beforeCellAddress;\n\n    protected int $beforeColumn;\n\n    protected bool $beforeColumnAbsolute = false;\n\n    protected string $beforeColumnString;\n\n    protected int $beforeRow;\n\n    protected bool $beforeRowAbsolute = false;\n\n    protected int $numberOfColumns;\n\n    protected int $numberOfRows;\n\n    public function __construct(string $beforeCellAddress = 'A1', int $numberOfColumns = 0, int $numberOfRows = 0)\n    {\n        $this->beforeColumnAbsolute = $beforeCellAddress[0] === '$';\n        $this->beforeRowAbsolute = strpos($beforeCellAddress, '$', 1) !== false;\n        $this->beforeCellAddress = str_replace('$', '', $beforeCellAddress);\n        $this->numberOfColumns = $numberOfColumns;\n        $this->numberOfRows = $numberOfRows;\n\n        // Get coordinate of $beforeCellAddress\n        [$beforeColumn, $beforeRow] = Coordinate::coordinateFromString($beforeCellAddress);\n        $this->beforeColumnString = $beforeColumn;\n        $this->beforeColumn = (int) Coordinate::columnIndexFromString($beforeColumn);\n        $this->beforeRow = (int) $beforeRow;\n    }\n\n    public function beforeCellAddress(): string\n    {\n        return $this->beforeCellAddress;\n    }\n\n    public function refreshRequired(string $beforeCellAddress, int $numberOfColumns, int $numberOfRows): bool\n    {\n        return $this->beforeCellAddress !== $beforeCellAddress\n            || $this->numberOfColumns !== $numberOfColumns\n            || $this->numberOfRows !== $numberOfRows;\n    }\n\n    public function updateCellReference(string $cellReference = 'A1', bool $includeAbsoluteReferences = false, bool $onlyAbsoluteReferences = false, ?bool $topLeft = null): string\n    {\n        if (Coordinate::coordinateIsRange($cellReference)) {\n            throw new Exception('Only single cell references may be passed to this method.');\n        }\n\n        // Get coordinate of $cellReference\n        [$newColumn, $newRow] = Coordinate::coordinateFromString($cellReference);\n        $newColumnIndex = Coordinate::columnIndexFromString(str_replace('$', '', $newColumn));\n        $newRowIndex = (int) str_replace('$', '', $newRow);\n\n        $absoluteColumn = $newColumn[0] === '$' ? '$' : '';\n        $absoluteRow = $newRow[0] === '$' ? '$' : '';\n        // Verify which parts should be updated\n        if ($onlyAbsoluteReferences === true) {\n            $updateColumn = (($absoluteColumn === '$') && $newColumnIndex >= $this->beforeColumn);\n            $updateRow = (($absoluteRow === '$') && $newRowIndex >= $this->beforeRow);\n        } elseif ($includeAbsoluteReferences === false) {\n            $updateColumn = (($absoluteColumn !== '$') && $newColumnIndex >= $this->beforeColumn);\n            $updateRow = (($absoluteRow !== '$') && $newRowIndex >= $this->beforeRow);\n        } else {\n            $newColumnIndex = $this->computeNewColumnIndex($newColumnIndex, $topLeft);\n            $newColumn = $absoluteColumn . Coordinate::stringFromColumnIndex($newColumnIndex);\n            $updateColumn = false;\n\n            $newRowIndex = $this->computeNewRowIndex($newRowIndex, $topLeft);\n            $newRow = $absoluteRow . $newRowIndex;\n            $updateRow = false;\n        }\n\n        // Create new column reference\n        if ($updateColumn) {\n            $newColumn = $this->updateColumnReference($newColumnIndex, $absoluteColumn);\n        }\n\n        // Create new row reference\n        if ($updateRow) {\n            $newRow = $this->updateRowReference($newRowIndex, $absoluteRow);\n        }\n\n        // Return new reference\n        return \"{$newColumn}{$newRow}\";\n    }\n\n    public function computeNewColumnIndex(int $newColumnIndex, ?bool $topLeft): int\n    {\n        // A special case is removing the left/top or bottom/right edge of a range\n        // $topLeft is null if we aren't adjusting a range at all.\n        if (\n            $topLeft !== null\n            && $this->numberOfColumns < 0\n            && $newColumnIndex >= $this->beforeColumn + $this->numberOfColumns\n            && $newColumnIndex <= $this->beforeColumn - 1\n        ) {\n            if ($topLeft) {\n                $newColumnIndex = $this->beforeColumn + $this->numberOfColumns;\n            } else {\n                $newColumnIndex = $this->beforeColumn + $this->numberOfColumns - 1;\n            }\n        } elseif ($newColumnIndex >= $this->beforeColumn) {\n            // Create new column reference\n            $newColumnIndex += $this->numberOfColumns;\n        }\n\n        return $newColumnIndex;\n    }\n\n    public function computeNewRowIndex(int $newRowIndex, ?bool $topLeft): int\n    {\n        // A special case is removing the left/top or bottom/right edge of a range\n        // $topLeft is null if we aren't adjusting a range at all.\n        if (\n            $topLeft !== null\n            && $this->numberOfRows < 0\n            && $newRowIndex >= $this->beforeRow + $this->numberOfRows\n            && $newRowIndex <= $this->beforeRow - 1\n        ) {\n            if ($topLeft) {\n                $newRowIndex = $this->beforeRow + $this->numberOfRows;\n            } else {\n                $newRowIndex = $this->beforeRow + $this->numberOfRows - 1;\n            }\n        } elseif ($newRowIndex >= $this->beforeRow) {\n            $newRowIndex = $newRowIndex + $this->numberOfRows;\n        }\n\n        return $newRowIndex;\n    }\n\n    public function cellAddressInDeleteRange(string $cellAddress): bool\n    {\n        [$cellColumn, $cellRow] = Coordinate::coordinateFromString($cellAddress);\n        $cellColumnIndex = Coordinate::columnIndexFromString($cellColumn);\n        //    Is cell within the range of rows/columns if we're deleting\n        if (\n            $this->numberOfRows < 0\n            && ($cellRow >= ($this->beforeRow + $this->numberOfRows))\n            && ($cellRow < $this->beforeRow)\n        ) {\n            return true;\n        } elseif (\n            $this->numberOfColumns < 0\n            && ($cellColumnIndex >= ($this->beforeColumn + $this->numberOfColumns))\n            && ($cellColumnIndex < $this->beforeColumn)\n        ) {\n            return true;\n        }\n\n        return false;\n    }\n\n    protected function updateColumnReference(int $newColumnIndex, string $absoluteColumn): string\n    {\n        $newColumn = Coordinate::stringFromColumnIndex(min($newColumnIndex + $this->numberOfColumns, AddressRange::MAX_COLUMN_INT));\n\n        return \"{$absoluteColumn}{$newColumn}\";\n    }\n\n    protected function updateRowReference(int $newRowIndex, string $absoluteRow): string\n    {\n        $newRow = $newRowIndex + $this->numberOfRows;\n        $newRow = ($newRow > AddressRange::MAX_ROW) ? AddressRange::MAX_ROW : $newRow;\n\n        return \"{$absoluteRow}{$newRow}\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Axis.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\n/**\n * Created by PhpStorm.\n * User: Wiktor Trzonkowski\n * Date: 6/17/14\n * Time: 12:11 PM.\n */\nclass Axis extends Properties\n{\n    const AXIS_TYPE_CATEGORY = 'catAx';\n    const AXIS_TYPE_DATE = 'dateAx';\n    const AXIS_TYPE_VALUE = 'valAx';\n\n    const TIME_UNIT_DAYS = 'days';\n    const TIME_UNIT_MONTHS = 'months';\n    const TIME_UNIT_YEARS = 'years';\n\n    public function __construct()\n    {\n        parent::__construct();\n        $this->fillColor = new ChartColor();\n    }\n\n    /**\n     * Chart Major Gridlines as.\n     */\n    private ?GridLines $majorGridlines = null;\n\n    /**\n     * Chart Minor Gridlines as.\n     */\n    private ?GridLines $minorGridlines = null;\n\n    /**\n     * Axis Number.\n     *\n     * @var array{format: string, source_linked: int, numeric: ?bool}\n     */\n    private array $axisNumber = [\n        'format' => self::FORMAT_CODE_GENERAL,\n        'source_linked' => 1,\n        'numeric' => null,\n    ];\n\n    private string $axisType = '';\n\n    private ?AxisText $axisText = null;\n\n    private ?Title $dispUnitsTitle = null;\n\n    /**\n     * Axis Options.\n     *\n     * @var array<string, null|string>\n     */\n    private array $axisOptions = [\n        'minimum' => null,\n        'maximum' => null,\n        'major_unit' => null,\n        'minor_unit' => null,\n        'orientation' => self::ORIENTATION_NORMAL,\n        'minor_tick_mark' => self::TICK_MARK_NONE,\n        'major_tick_mark' => self::TICK_MARK_NONE,\n        'axis_labels' => self::AXIS_LABELS_NEXT_TO,\n        'horizontal_crosses' => self::HORIZONTAL_CROSSES_AUTOZERO,\n        'horizontal_crosses_value' => null,\n        'textRotation' => null,\n        'hidden' => null,\n        'majorTimeUnit' => self::TIME_UNIT_YEARS,\n        'minorTimeUnit' => self::TIME_UNIT_MONTHS,\n        'baseTimeUnit' => self::TIME_UNIT_DAYS,\n        'logBase' => null,\n        'dispUnitsBuiltIn' => null,\n    ];\n    public const DISP_UNITS_HUNDREDS = 'hundreds';\n    public const DISP_UNITS_THOUSANDS = 'thousands';\n    public const DISP_UNITS_TEN_THOUSANDS = 'tenThousands';\n    public const DISP_UNITS_HUNDRED_THOUSANDS = 'hundredThousands';\n    public const DISP_UNITS_MILLIONS = 'millions';\n    public const DISP_UNITS_TEN_MILLIONS = 'tenMillions';\n    public const DISP_UNITS_HUNDRED_MILLIONS = 'hundredMillions';\n    public const DISP_UNITS_BILLIONS = 'billions';\n    public const DISP_UNITS_TRILLIONS = 'trillions';\n    public const TRILLION_INDEX = (PHP_INT_SIZE > 4) ? 1000000000000 : '1000000000000';\n    public const DISP_UNITS_BUILTIN_INT = [\n        100 => self::DISP_UNITS_HUNDREDS,\n        1000 => self::DISP_UNITS_THOUSANDS,\n        10000 => self::DISP_UNITS_TEN_THOUSANDS,\n        100000 => self::DISP_UNITS_HUNDRED_THOUSANDS,\n        1000000 => self::DISP_UNITS_MILLIONS,\n        10000000 => self::DISP_UNITS_TEN_MILLIONS,\n        100000000 => self::DISP_UNITS_HUNDRED_MILLIONS,\n        1000000000 => self::DISP_UNITS_BILLIONS,\n        self::TRILLION_INDEX => self::DISP_UNITS_TRILLIONS, // overflow for 32-bit\n    ];\n\n    /**\n     * Fill Properties.\n     */\n    private ChartColor $fillColor;\n\n    private const NUMERIC_FORMAT = [\n        Properties::FORMAT_CODE_NUMBER,\n        Properties::FORMAT_CODE_DATE,\n        Properties::FORMAT_CODE_DATE_ISO8601,\n    ];\n\n    private bool $noFill = false;\n\n    /**\n     * Get Series Data Type.\n     */\n    public function setAxisNumberProperties(string $format_code, ?bool $numeric = null, int $sourceLinked = 0): void\n    {\n        $format = $format_code;\n        $this->axisNumber['format'] = $format;\n        $this->axisNumber['source_linked'] = $sourceLinked;\n        if (is_bool($numeric)) {\n            $this->axisNumber['numeric'] = $numeric;\n        } elseif (in_array($format, self::NUMERIC_FORMAT, true)) {\n            $this->axisNumber['numeric'] = true;\n        }\n    }\n\n    /**\n     * Get Axis Number Format Data Type.\n     */\n    public function getAxisNumberFormat(): string\n    {\n        return $this->axisNumber['format'];\n    }\n\n    /**\n     * Get Axis Number Source Linked.\n     */\n    public function getAxisNumberSourceLinked(): string\n    {\n        return (string) $this->axisNumber['source_linked'];\n    }\n\n    public function getAxisIsNumericFormat(): bool\n    {\n        return $this->axisType === self::AXIS_TYPE_DATE || (bool) $this->axisNumber['numeric'];\n    }\n\n    public function setAxisOption(string $key, null|float|int|string $value): void\n    {\n        if ($value !== null && $value !== '') {\n            $this->axisOptions[$key] = (string) $value;\n        }\n    }\n\n    /**\n     * Set Axis Options Properties.\n     */\n    public function setAxisOptionsProperties(\n        string $axisLabels,\n        ?string $horizontalCrossesValue = null,\n        ?string $horizontalCrosses = null,\n        ?string $axisOrientation = null,\n        ?string $majorTmt = null,\n        ?string $minorTmt = null,\n        null|float|int|string $minimum = null,\n        null|float|int|string $maximum = null,\n        null|float|int|string $majorUnit = null,\n        null|float|int|string $minorUnit = null,\n        null|float|int|string $textRotation = null,\n        ?string $hidden = null,\n        ?string $baseTimeUnit = null,\n        ?string $majorTimeUnit = null,\n        ?string $minorTimeUnit = null,\n        null|float|int|string $logBase = null,\n        ?string $dispUnitsBuiltIn = null\n    ): void {\n        $this->axisOptions['axis_labels'] = $axisLabels;\n        $this->setAxisOption('horizontal_crosses_value', $horizontalCrossesValue);\n        $this->setAxisOption('horizontal_crosses', $horizontalCrosses);\n        $this->setAxisOption('orientation', $axisOrientation);\n        $this->setAxisOption('major_tick_mark', $majorTmt);\n        $this->setAxisOption('minor_tick_mark', $minorTmt);\n        $this->setAxisOption('minimum', $minimum);\n        $this->setAxisOption('maximum', $maximum);\n        $this->setAxisOption('major_unit', $majorUnit);\n        $this->setAxisOption('minor_unit', $minorUnit);\n        $this->setAxisOption('textRotation', $textRotation);\n        $this->setAxisOption('hidden', $hidden);\n        $this->setAxisOption('baseTimeUnit', $baseTimeUnit);\n        $this->setAxisOption('majorTimeUnit', $majorTimeUnit);\n        $this->setAxisOption('minorTimeUnit', $minorTimeUnit);\n        $this->setAxisOption('logBase', $logBase);\n        $this->setAxisOption('dispUnitsBuiltIn', $dispUnitsBuiltIn);\n    }\n\n    /**\n     * Get Axis Options Property.\n     */\n    public function getAxisOptionsProperty(string $property): ?string\n    {\n        if ($property === 'textRotation') {\n            if ($this->axisText !== null) {\n                if ($this->axisText->getRotation() !== null) {\n                    return (string) $this->axisText->getRotation();\n                }\n            }\n        }\n\n        return $this->axisOptions[$property];\n    }\n\n    /**\n     * Set Axis Orientation Property.\n     */\n    public function setAxisOrientation(string $orientation): void\n    {\n        $this->axisOptions['orientation'] = (string) $orientation;\n    }\n\n    public function getAxisType(): string\n    {\n        return $this->axisType;\n    }\n\n    public function setAxisType(string $type): self\n    {\n        if ($type === self::AXIS_TYPE_CATEGORY || $type === self::AXIS_TYPE_VALUE || $type === self::AXIS_TYPE_DATE) {\n            $this->axisType = $type;\n        } else {\n            $this->axisType = '';\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set Fill Property.\n     */\n    public function setFillParameters(?string $color, ?int $alpha = null, ?string $AlphaType = ChartColor::EXCEL_COLOR_TYPE_RGB): void\n    {\n        $this->fillColor->setColorProperties($color, $alpha, $AlphaType);\n    }\n\n    /**\n     * Get Fill Property.\n     */\n    public function getFillProperty(string $property): string\n    {\n        return (string) $this->fillColor->getColorProperty($property);\n    }\n\n    public function getFillColorObject(): ChartColor\n    {\n        return $this->fillColor;\n    }\n\n    private string $crossBetween = ''; // 'between' or 'midCat' might be better\n\n    public function setCrossBetween(string $crossBetween): self\n    {\n        $this->crossBetween = $crossBetween;\n\n        return $this;\n    }\n\n    public function getCrossBetween(): string\n    {\n        return $this->crossBetween;\n    }\n\n    public function getMajorGridlines(): ?GridLines\n    {\n        return $this->majorGridlines;\n    }\n\n    public function getMinorGridlines(): ?GridLines\n    {\n        return $this->minorGridlines;\n    }\n\n    public function setMajorGridlines(?GridLines $gridlines): self\n    {\n        $this->majorGridlines = $gridlines;\n\n        return $this;\n    }\n\n    public function setMinorGridlines(?GridLines $gridlines): self\n    {\n        $this->minorGridlines = $gridlines;\n\n        return $this;\n    }\n\n    public function getAxisText(): ?AxisText\n    {\n        return $this->axisText;\n    }\n\n    public function setAxisText(?AxisText $axisText): self\n    {\n        $this->axisText = $axisText;\n\n        return $this;\n    }\n\n    public function setNoFill(bool $noFill): self\n    {\n        $this->noFill = $noFill;\n\n        return $this;\n    }\n\n    public function getNoFill(): bool\n    {\n        return $this->noFill;\n    }\n\n    public function setDispUnitsTitle(?Title $dispUnitsTitle): self\n    {\n        $this->dispUnitsTitle = $dispUnitsTitle;\n\n        return $this;\n    }\n\n    public function getDispUnitsTitle(): ?Title\n    {\n        return $this->dispUnitsTitle;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        parent::__clone();\n        $this->majorGridlines = ($this->majorGridlines === null) ? null : clone $this->majorGridlines;\n        $this->majorGridlines = ($this->minorGridlines === null) ? null : clone $this->minorGridlines;\n        $this->axisText = ($this->axisText === null) ? null : clone $this->axisText;\n        $this->dispUnitsTitle = ($this->dispUnitsTitle === null) ? null : clone $this->dispUnitsTitle;\n        $this->fillColor = clone $this->fillColor;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/AxisText.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass AxisText extends Properties\n{\n    private ?int $rotation = null;\n\n    private Font $font;\n\n    public function __construct()\n    {\n        parent::__construct();\n        $this->font = new Font();\n        $this->font->setSize(null, true);\n    }\n\n    public function setRotation(?int $rotation): self\n    {\n        $this->rotation = $rotation;\n\n        return $this;\n    }\n\n    public function getRotation(): ?int\n    {\n        return $this->rotation;\n    }\n\n    public function getFillColorObject(): ChartColor\n    {\n        $fillColor = $this->font->getChartColor();\n        if ($fillColor === null) {\n            $fillColor = new ChartColor();\n            $this->font->setChartColorFromObject($fillColor);\n        }\n\n        return $fillColor;\n    }\n\n    public function getFont(): Font\n    {\n        return $this->font;\n    }\n\n    public function setFont(Font $font): self\n    {\n        $this->font = $font;\n\n        return $this;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        parent::__clone();\n        $this->font = clone $this->font;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Chart.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Chart\n{\n    /**\n     * Chart Name.\n     */\n    private string $name;\n\n    /**\n     * Worksheet.\n     */\n    private ?Worksheet $worksheet = null;\n\n    /**\n     * Chart Title.\n     */\n    private ?Title $title;\n\n    /**\n     * Chart Legend.\n     */\n    private ?Legend $legend;\n\n    /**\n     * X-Axis Label.\n     */\n    private ?Title $xAxisLabel;\n\n    /**\n     * Y-Axis Label.\n     */\n    private ?Title $yAxisLabel;\n\n    /**\n     * Chart Plot Area.\n     */\n    private ?PlotArea $plotArea;\n\n    /**\n     * Plot Visible Only.\n     */\n    private bool $plotVisibleOnly;\n\n    /**\n     * Display Blanks as.\n     */\n    private string $displayBlanksAs;\n\n    /**\n     * Chart Asix Y as.\n     */\n    private Axis $yAxis;\n\n    /**\n     * Chart Asix X as.\n     */\n    private Axis $xAxis;\n\n    /**\n     * Top-Left Cell Position.\n     */\n    private string $topLeftCellRef = 'A1';\n\n    /**\n     * Top-Left X-Offset.\n     */\n    private int $topLeftXOffset = 0;\n\n    /**\n     * Top-Left Y-Offset.\n     */\n    private int $topLeftYOffset = 0;\n\n    /**\n     * Bottom-Right Cell Position.\n     */\n    private string $bottomRightCellRef = '';\n\n    /**\n     * Bottom-Right X-Offset.\n     */\n    private int $bottomRightXOffset = 10;\n\n    /**\n     * Bottom-Right Y-Offset.\n     */\n    private int $bottomRightYOffset = 10;\n\n    private ?int $rotX = null;\n\n    private ?int $rotY = null;\n\n    private ?int $rAngAx = null;\n\n    private ?int $perspective = null;\n\n    private bool $oneCellAnchor = false;\n\n    private bool $autoTitleDeleted = false;\n\n    private bool $noFill = false;\n\n    private bool $noBorder = false;\n\n    private bool $roundedCorners = false;\n\n    private GridLines $borderLines;\n\n    private ChartColor $fillColor;\n\n    /**\n     * Rendered width in pixels.\n     */\n    private ?float $renderedWidth = null;\n\n    /**\n     * Rendered height in pixels.\n     */\n    private ?float $renderedHeight = null;\n\n    /**\n     * Create a new Chart.\n     * majorGridlines and minorGridlines are deprecated, moved to Axis.\n     */\n    public function __construct(string $name, ?Title $title = null, ?Legend $legend = null, ?PlotArea $plotArea = null, bool $plotVisibleOnly = true, string $displayBlanksAs = DataSeries::DEFAULT_EMPTY_AS, ?Title $xAxisLabel = null, ?Title $yAxisLabel = null, ?Axis $xAxis = null, ?Axis $yAxis = null, ?GridLines $majorGridlines = null, ?GridLines $minorGridlines = null)\n    {\n        $this->name = $name;\n        $this->title = $title;\n        $this->legend = $legend;\n        $this->xAxisLabel = $xAxisLabel;\n        $this->yAxisLabel = $yAxisLabel;\n        $this->plotArea = $plotArea;\n        $this->plotVisibleOnly = $plotVisibleOnly;\n        $this->setDisplayBlanksAs($displayBlanksAs);\n        $this->xAxis = $xAxis ?? new Axis();\n        $this->yAxis = $yAxis ?? new Axis();\n        if ($majorGridlines !== null) {\n            $this->yAxis->setMajorGridlines($majorGridlines);\n        }\n        if ($minorGridlines !== null) {\n            $this->yAxis->setMinorGridlines($minorGridlines);\n        }\n        $this->fillColor = new ChartColor();\n        $this->borderLines = new GridLines();\n    }\n\n    public function __destruct()\n    {\n        $this->worksheet = null;\n    }\n\n    /**\n     * Get Name.\n     */\n    public function getName(): string\n    {\n        return $this->name;\n    }\n\n    public function setName(string $name): self\n    {\n        $this->name = $name;\n\n        return $this;\n    }\n\n    /**\n     * Get Worksheet.\n     */\n    public function getWorksheet(): ?Worksheet\n    {\n        return $this->worksheet;\n    }\n\n    /**\n     * Set Worksheet.\n     *\n     * @return $this\n     */\n    public function setWorksheet(?Worksheet $worksheet = null): static\n    {\n        $this->worksheet = $worksheet;\n\n        return $this;\n    }\n\n    public function getTitle(): ?Title\n    {\n        return $this->title;\n    }\n\n    /**\n     * Set Title.\n     *\n     * @return $this\n     */\n    public function setTitle(Title $title): static\n    {\n        $this->title = $title;\n\n        return $this;\n    }\n\n    public function getLegend(): ?Legend\n    {\n        return $this->legend;\n    }\n\n    /**\n     * Set Legend.\n     *\n     * @return $this\n     */\n    public function setLegend(Legend $legend): static\n    {\n        $this->legend = $legend;\n\n        return $this;\n    }\n\n    public function getXAxisLabel(): ?Title\n    {\n        return $this->xAxisLabel;\n    }\n\n    /**\n     * Set X-Axis Label.\n     *\n     * @return $this\n     */\n    public function setXAxisLabel(Title $label): static\n    {\n        $this->xAxisLabel = $label;\n\n        return $this;\n    }\n\n    public function getYAxisLabel(): ?Title\n    {\n        return $this->yAxisLabel;\n    }\n\n    /**\n     * Set Y-Axis Label.\n     *\n     * @return $this\n     */\n    public function setYAxisLabel(Title $label): static\n    {\n        $this->yAxisLabel = $label;\n\n        return $this;\n    }\n\n    public function getPlotArea(): ?PlotArea\n    {\n        return $this->plotArea;\n    }\n\n    public function getPlotAreaOrThrow(): PlotArea\n    {\n        $plotArea = $this->getPlotArea();\n        if ($plotArea !== null) {\n            return $plotArea;\n        }\n\n        throw new Exception('Chart has no PlotArea');\n    }\n\n    /**\n     * Set Plot Area.\n     */\n    public function setPlotArea(PlotArea $plotArea): self\n    {\n        $this->plotArea = $plotArea;\n\n        return $this;\n    }\n\n    /**\n     * Get Plot Visible Only.\n     */\n    public function getPlotVisibleOnly(): bool\n    {\n        return $this->plotVisibleOnly;\n    }\n\n    /**\n     * Set Plot Visible Only.\n     *\n     * @return $this\n     */\n    public function setPlotVisibleOnly(bool $plotVisibleOnly): static\n    {\n        $this->plotVisibleOnly = $plotVisibleOnly;\n\n        return $this;\n    }\n\n    /**\n     * Get Display Blanks as.\n     */\n    public function getDisplayBlanksAs(): string\n    {\n        return $this->displayBlanksAs;\n    }\n\n    /**\n     * Set Display Blanks as.\n     *\n     * @return $this\n     */\n    public function setDisplayBlanksAs(string $displayBlanksAs): static\n    {\n        $displayBlanksAs = strtolower($displayBlanksAs);\n        $this->displayBlanksAs = in_array($displayBlanksAs, DataSeries::VALID_EMPTY_AS, true) ? $displayBlanksAs : DataSeries::DEFAULT_EMPTY_AS;\n\n        return $this;\n    }\n\n    public function getChartAxisY(): Axis\n    {\n        return $this->yAxis;\n    }\n\n    /**\n     * Set yAxis.\n     */\n    public function setChartAxisY(?Axis $axis): self\n    {\n        $this->yAxis = $axis ?? new Axis();\n\n        return $this;\n    }\n\n    public function getChartAxisX(): Axis\n    {\n        return $this->xAxis;\n    }\n\n    /**\n     * Set xAxis.\n     */\n    public function setChartAxisX(?Axis $axis): self\n    {\n        $this->xAxis = $axis ?? new Axis();\n\n        return $this;\n    }\n\n    /**\n     * Set the Top Left position for the chart.\n     *\n     * @return $this\n     */\n    public function setTopLeftPosition(string $cellAddress, ?int $xOffset = null, ?int $yOffset = null): static\n    {\n        $this->topLeftCellRef = $cellAddress;\n        if ($xOffset !== null) {\n            $this->setTopLeftXOffset($xOffset);\n        }\n        if ($yOffset !== null) {\n            $this->setTopLeftYOffset($yOffset);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get the top left position of the chart.\n     *\n     * Returns ['cell' => string cell address, 'xOffset' => int, 'yOffset' => int].\n     *\n     * @return array{cell: string, xOffset: int, yOffset: int} an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell\n     */\n    public function getTopLeftPosition(): array\n    {\n        return [\n            'cell' => $this->topLeftCellRef,\n            'xOffset' => $this->topLeftXOffset,\n            'yOffset' => $this->topLeftYOffset,\n        ];\n    }\n\n    /**\n     * Get the cell address where the top left of the chart is fixed.\n     */\n    public function getTopLeftCell(): string\n    {\n        return $this->topLeftCellRef;\n    }\n\n    /**\n     * Set the Top Left cell position for the chart.\n     *\n     * @return $this\n     */\n    public function setTopLeftCell(string $cellAddress): static\n    {\n        $this->topLeftCellRef = $cellAddress;\n\n        return $this;\n    }\n\n    /**\n     * Set the offset position within the Top Left cell for the chart.\n     *\n     * @return $this\n     */\n    public function setTopLeftOffset(?int $xOffset, ?int $yOffset): static\n    {\n        if ($xOffset !== null) {\n            $this->setTopLeftXOffset($xOffset);\n        }\n\n        if ($yOffset !== null) {\n            $this->setTopLeftYOffset($yOffset);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get the offset position within the Top Left cell for the chart.\n     *\n     * @return int[]\n     */\n    public function getTopLeftOffset(): array\n    {\n        return [\n            'X' => $this->topLeftXOffset,\n            'Y' => $this->topLeftYOffset,\n        ];\n    }\n\n    /**\n     * @return $this\n     */\n    public function setTopLeftXOffset(int $xOffset): static\n    {\n        $this->topLeftXOffset = $xOffset;\n\n        return $this;\n    }\n\n    public function getTopLeftXOffset(): int\n    {\n        return $this->topLeftXOffset;\n    }\n\n    /**\n     * @return $this\n     */\n    public function setTopLeftYOffset(int $yOffset): static\n    {\n        $this->topLeftYOffset = $yOffset;\n\n        return $this;\n    }\n\n    public function getTopLeftYOffset(): int\n    {\n        return $this->topLeftYOffset;\n    }\n\n    /**\n     * Set the Bottom Right position of the chart.\n     *\n     * @return $this\n     */\n    public function setBottomRightPosition(string $cellAddress = '', ?int $xOffset = null, ?int $yOffset = null): static\n    {\n        $this->bottomRightCellRef = $cellAddress;\n        if ($xOffset !== null) {\n            $this->setBottomRightXOffset($xOffset);\n        }\n        if ($yOffset !== null) {\n            $this->setBottomRightYOffset($yOffset);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get the bottom right position of the chart.\n     *\n     * @return array{cell: string, xOffset: int, yOffset:int} an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell\n     */\n    public function getBottomRightPosition(): array\n    {\n        return [\n            'cell' => $this->bottomRightCellRef,\n            'xOffset' => $this->bottomRightXOffset,\n            'yOffset' => $this->bottomRightYOffset,\n        ];\n    }\n\n    /**\n     * Set the Bottom Right cell for the chart.\n     *\n     * @return $this\n     */\n    public function setBottomRightCell(string $cellAddress = ''): static\n    {\n        $this->bottomRightCellRef = $cellAddress;\n\n        return $this;\n    }\n\n    /**\n     * Get the cell address where the bottom right of the chart is fixed.\n     */\n    public function getBottomRightCell(): string\n    {\n        return $this->bottomRightCellRef;\n    }\n\n    /**\n     * Set the offset position within the Bottom Right cell for the chart.\n     *\n     * @return $this\n     */\n    public function setBottomRightOffset(?int $xOffset, ?int $yOffset): static\n    {\n        if ($xOffset !== null) {\n            $this->setBottomRightXOffset($xOffset);\n        }\n\n        if ($yOffset !== null) {\n            $this->setBottomRightYOffset($yOffset);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get the offset position within the Bottom Right cell for the chart.\n     *\n     * @return int[]\n     */\n    public function getBottomRightOffset(): array\n    {\n        return [\n            'X' => $this->bottomRightXOffset,\n            'Y' => $this->bottomRightYOffset,\n        ];\n    }\n\n    /**\n     * @return $this\n     */\n    public function setBottomRightXOffset(int $xOffset): static\n    {\n        $this->bottomRightXOffset = $xOffset;\n\n        return $this;\n    }\n\n    public function getBottomRightXOffset(): int\n    {\n        return $this->bottomRightXOffset;\n    }\n\n    /**\n     * @return $this\n     */\n    public function setBottomRightYOffset(int $yOffset): static\n    {\n        $this->bottomRightYOffset = $yOffset;\n\n        return $this;\n    }\n\n    public function getBottomRightYOffset(): int\n    {\n        return $this->bottomRightYOffset;\n    }\n\n    public function refresh(): void\n    {\n        if ($this->worksheet !== null && $this->plotArea !== null) {\n            $this->plotArea->refresh($this->worksheet);\n        }\n    }\n\n    /**\n     * Render the chart to given file (or stream).\n     *\n     * @param ?string $outputDestination Name of the file render to\n     *\n     * @return bool true on success\n     */\n    public function render(?string $outputDestination = null): bool\n    {\n        if ($outputDestination == 'php://output') {\n            $outputDestination = null;\n        }\n\n        $libraryName = Settings::getChartRenderer();\n        if ($libraryName === null) {\n            return false;\n        }\n\n        // Ensure that data series values are up-to-date before we render\n        $this->refresh();\n\n        $renderer = new $libraryName($this);\n\n        return $renderer->render($outputDestination);\n    }\n\n    public function getRotX(): ?int\n    {\n        return $this->rotX;\n    }\n\n    public function setRotX(?int $rotX): self\n    {\n        $this->rotX = $rotX;\n\n        return $this;\n    }\n\n    public function getRotY(): ?int\n    {\n        return $this->rotY;\n    }\n\n    public function setRotY(?int $rotY): self\n    {\n        $this->rotY = $rotY;\n\n        return $this;\n    }\n\n    public function getRAngAx(): ?int\n    {\n        return $this->rAngAx;\n    }\n\n    public function setRAngAx(?int $rAngAx): self\n    {\n        $this->rAngAx = $rAngAx;\n\n        return $this;\n    }\n\n    public function getPerspective(): ?int\n    {\n        return $this->perspective;\n    }\n\n    public function setPerspective(?int $perspective): self\n    {\n        $this->perspective = $perspective;\n\n        return $this;\n    }\n\n    public function getOneCellAnchor(): bool\n    {\n        return $this->oneCellAnchor;\n    }\n\n    public function setOneCellAnchor(bool $oneCellAnchor): self\n    {\n        $this->oneCellAnchor = $oneCellAnchor;\n\n        return $this;\n    }\n\n    public function getAutoTitleDeleted(): bool\n    {\n        return $this->autoTitleDeleted;\n    }\n\n    public function setAutoTitleDeleted(bool $autoTitleDeleted): self\n    {\n        $this->autoTitleDeleted = $autoTitleDeleted;\n\n        return $this;\n    }\n\n    public function getNoFill(): bool\n    {\n        return $this->noFill;\n    }\n\n    public function setNoFill(bool $noFill): self\n    {\n        $this->noFill = $noFill;\n\n        return $this;\n    }\n\n    public function getNoBorder(): bool\n    {\n        return $this->noBorder;\n    }\n\n    public function setNoBorder(bool $noBorder): self\n    {\n        $this->noBorder = $noBorder;\n\n        return $this;\n    }\n\n    public function getRoundedCorners(): bool\n    {\n        return $this->roundedCorners;\n    }\n\n    public function setRoundedCorners(?bool $roundedCorners): self\n    {\n        if ($roundedCorners !== null) {\n            $this->roundedCorners = $roundedCorners;\n        }\n\n        return $this;\n    }\n\n    public function getBorderLines(): GridLines\n    {\n        return $this->borderLines;\n    }\n\n    public function setBorderLines(GridLines $borderLines): self\n    {\n        $this->borderLines = $borderLines;\n\n        return $this;\n    }\n\n    public function getFillColor(): ChartColor\n    {\n        return $this->fillColor;\n    }\n\n    public function setRenderedWidth(?float $width): self\n    {\n        $this->renderedWidth = $width;\n\n        return $this;\n    }\n\n    public function getRenderedWidth(): ?float\n    {\n        return $this->renderedWidth;\n    }\n\n    public function setRenderedHeight(?float $height): self\n    {\n        $this->renderedHeight = $height;\n\n        return $this;\n    }\n\n    public function getRenderedHeight(): ?float\n    {\n        return $this->renderedHeight;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $this->worksheet = null;\n        $this->title = ($this->title === null) ? null : clone $this->title;\n        $this->legend = ($this->legend === null) ? null : clone $this->legend;\n        $this->xAxisLabel = ($this->xAxisLabel === null) ? null : clone $this->xAxisLabel;\n        $this->yAxisLabel = ($this->yAxisLabel === null) ? null : clone $this->yAxisLabel;\n        $this->plotArea = ($this->plotArea === null) ? null : clone $this->plotArea;\n        $this->xAxis = clone $this->xAxis;\n        $this->yAxis = clone $this->yAxis;\n        $this->borderLines = clone $this->borderLines;\n        $this->fillColor = clone $this->fillColor;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/ChartColor.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nclass ChartColor\n{\n    const EXCEL_COLOR_TYPE_STANDARD = 'prstClr';\n    const EXCEL_COLOR_TYPE_SCHEME = 'schemeClr';\n    const EXCEL_COLOR_TYPE_RGB = 'srgbClr';\n    const EXCEL_COLOR_TYPES = [\n        self::EXCEL_COLOR_TYPE_RGB,\n        self::EXCEL_COLOR_TYPE_SCHEME,\n        self::EXCEL_COLOR_TYPE_STANDARD,\n    ];\n\n    private string $value = '';\n\n    private string $type = '';\n\n    private ?int $alpha = null;\n\n    private ?int $brightness = null;\n\n    /**\n     * @param array{value: ?string, alpha: null|int|string, brightness?: null|int|string, type: ?string}|string  $value\n     */\n    public function __construct($value = '', ?int $alpha = null, ?string $type = null, ?int $brightness = null)\n    {\n        if (is_array($value)) {\n            $this->setColorPropertiesArray($value);\n        } else {\n            $this->setColorProperties($value, $alpha, $type, $brightness);\n        }\n    }\n\n    public function getValue(): string\n    {\n        return $this->value;\n    }\n\n    public function setValue(string $value): self\n    {\n        $this->value = $value;\n\n        return $this;\n    }\n\n    public function getType(): string\n    {\n        return $this->type;\n    }\n\n    public function setType(string $type): self\n    {\n        $this->type = $type;\n\n        return $this;\n    }\n\n    public function getAlpha(): ?int\n    {\n        return $this->alpha;\n    }\n\n    public function setAlpha(?int $alpha): self\n    {\n        $this->alpha = $alpha;\n\n        return $this;\n    }\n\n    public function getBrightness(): ?int\n    {\n        return $this->brightness;\n    }\n\n    public function setBrightness(?int $brightness): self\n    {\n        $this->brightness = $brightness;\n\n        return $this;\n    }\n\n    public function setColorProperties(?string $color, null|float|int|string $alpha = null, ?string $type = null, null|float|int|string $brightness = null): self\n    {\n        if (empty($type) && !empty($color)) {\n            if (str_starts_with($color, '*')) {\n                $type = 'schemeClr';\n                $color = substr($color, 1);\n            } elseif (str_starts_with($color, '/')) {\n                $type = 'prstClr';\n                $color = substr($color, 1);\n            } elseif (preg_match('/^[0-9A-Fa-f]{6}$/', $color) === 1) {\n                $type = 'srgbClr';\n            }\n        }\n        if ($color !== null) {\n            $this->setValue(\"$color\");\n        }\n        if ($type !== null) {\n            $this->setType($type);\n        }\n        if ($alpha === null) {\n            $this->setAlpha(null);\n        } elseif (is_numeric($alpha)) {\n            $this->setAlpha((int) $alpha);\n        }\n        if ($brightness === null) {\n            $this->setBrightness(null);\n        } elseif (is_numeric($brightness)) {\n            $this->setBrightness((int) $brightness);\n        }\n\n        return $this;\n    }\n\n    /** @param array{value: ?string, alpha: null|int|string, brightness?: null|int|string, type: ?string}  $color */\n    public function setColorPropertiesArray(array $color): self\n    {\n        return $this->setColorProperties(\n            $color['value'] ?? '',\n            $color['alpha'] ?? null,\n            $color['type'] ?? null,\n            $color['brightness'] ?? null\n        );\n    }\n\n    public function isUsable(): bool\n    {\n        return $this->type !== '' && $this->value !== '';\n    }\n\n    /**\n     * Get Color Property.\n     */\n    public function getColorProperty(string $propertyName): null|int|string\n    {\n        $retVal = null;\n        if ($propertyName === 'value') {\n            $retVal = $this->value;\n        } elseif ($propertyName === 'type') {\n            $retVal = $this->type;\n        } elseif ($propertyName === 'alpha') {\n            $retVal = $this->alpha;\n        } elseif ($propertyName === 'brightness') {\n            $retVal = $this->brightness;\n        }\n\n        return $retVal;\n    }\n\n    public static function alphaToXml(int $alpha): string\n    {\n        return (string) (100 - $alpha) . '000';\n    }\n\n    public static function alphaFromXml(float|int|string $alpha): int\n    {\n        return 100 - ((int) $alpha / 1000);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/DataSeries.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass DataSeries\n{\n    const TYPE_BARCHART = 'barChart';\n    const TYPE_BARCHART_3D = 'bar3DChart';\n    const TYPE_LINECHART = 'lineChart';\n    const TYPE_LINECHART_3D = 'line3DChart';\n    const TYPE_AREACHART = 'areaChart';\n    const TYPE_AREACHART_3D = 'area3DChart';\n    const TYPE_PIECHART = 'pieChart';\n    const TYPE_PIECHART_3D = 'pie3DChart';\n    const TYPE_DOUGHNUTCHART = 'doughnutChart';\n    const TYPE_DONUTCHART = self::TYPE_DOUGHNUTCHART; // Synonym\n    const TYPE_SCATTERCHART = 'scatterChart';\n    const TYPE_SURFACECHART = 'surfaceChart';\n    const TYPE_SURFACECHART_3D = 'surface3DChart';\n    const TYPE_RADARCHART = 'radarChart';\n    const TYPE_BUBBLECHART = 'bubbleChart';\n    const TYPE_STOCKCHART = 'stockChart';\n    const TYPE_CANDLECHART = self::TYPE_STOCKCHART; // Synonym\n\n    const GROUPING_CLUSTERED = 'clustered';\n    const GROUPING_STACKED = 'stacked';\n    const GROUPING_PERCENT_STACKED = 'percentStacked';\n    const GROUPING_STANDARD = 'standard';\n\n    const DIRECTION_BAR = 'bar';\n    const DIRECTION_HORIZONTAL = self::DIRECTION_BAR;\n    const DIRECTION_COL = 'col';\n    const DIRECTION_COLUMN = self::DIRECTION_COL;\n    const DIRECTION_VERTICAL = self::DIRECTION_COL;\n\n    const STYLE_LINEMARKER = 'lineMarker';\n    const STYLE_SMOOTHMARKER = 'smoothMarker';\n    const STYLE_MARKER = 'marker';\n    const STYLE_FILLED = 'filled';\n\n    const EMPTY_AS_GAP = 'gap';\n    const EMPTY_AS_ZERO = 'zero';\n    const EMPTY_AS_SPAN = 'span';\n    const DEFAULT_EMPTY_AS = self::EMPTY_AS_GAP;\n    const VALID_EMPTY_AS = [self::EMPTY_AS_GAP, self::EMPTY_AS_ZERO, self::EMPTY_AS_SPAN];\n\n    /**\n     * Series Plot Type.\n     */\n    private ?string $plotType;\n\n    /**\n     * Plot Grouping Type.\n     */\n    private ?string $plotGrouping;\n\n    /**\n     * Plot Direction.\n     */\n    private string $plotDirection;\n\n    /**\n     * Plot Style.\n     */\n    private ?string $plotStyle;\n\n    /**\n     * Order of plots in Series.\n     *\n     * @var int[]\n     */\n    private array $plotOrder;\n\n    /**\n     * Plot Label.\n     *\n     * @var DataSeriesValues[]\n     */\n    private array $plotLabel;\n\n    /**\n     * Plot Category.\n     *\n     * @var DataSeriesValues[]\n     */\n    private array $plotCategory;\n\n    /**\n     * Smooth Line. Must be specified for both DataSeries and DataSeriesValues.\n     */\n    private bool $smoothLine;\n\n    /**\n     * Plot Values.\n     *\n     * @var DataSeriesValues[]\n     */\n    private array $plotValues;\n\n    /**\n     * Plot Bubble Sizes.\n     *\n     * @var DataSeriesValues[]\n     */\n    private array $plotBubbleSizes = [];\n\n    /**\n     * Create a new DataSeries.\n     *\n     * @param int[] $plotOrder\n     * @param DataSeriesValues[] $plotLabel\n     * @param DataSeriesValues[] $plotCategory\n     * @param DataSeriesValues[] $plotValues\n     */\n    public function __construct(\n        null|string $plotType = null,\n        null|string $plotGrouping = null,\n        array $plotOrder = [],\n        array $plotLabel = [],\n        array $plotCategory = [],\n        array $plotValues = [],\n        ?string $plotDirection = null,\n        bool $smoothLine = false,\n        ?string $plotStyle = null\n    ) {\n        $this->plotType = $plotType;\n        $this->plotGrouping = $plotGrouping;\n        $this->plotOrder = $plotOrder;\n        $keys = array_keys($plotValues);\n        $this->plotValues = $plotValues;\n        if (!isset($plotLabel[$keys[0]])) {\n            $plotLabel[$keys[0]] = new DataSeriesValues();\n        }\n        $this->plotLabel = $plotLabel;\n\n        if (!isset($plotCategory[$keys[0]])) {\n            $plotCategory[$keys[0]] = new DataSeriesValues();\n        }\n        $this->plotCategory = $plotCategory;\n\n        $this->smoothLine = (bool) $smoothLine;\n        $this->plotStyle = $plotStyle;\n\n        if ($plotDirection === null) {\n            $plotDirection = self::DIRECTION_COL;\n        }\n        $this->plotDirection = $plotDirection;\n    }\n\n    /**\n     * Get Plot Type.\n     */\n    public function getPlotType(): ?string\n    {\n        return $this->plotType;\n    }\n\n    /**\n     * Set Plot Type.\n     *\n     * @return $this\n     */\n    public function setPlotType(string $plotType): static\n    {\n        $this->plotType = $plotType;\n\n        return $this;\n    }\n\n    /**\n     * Get Plot Grouping Type.\n     */\n    public function getPlotGrouping(): ?string\n    {\n        return $this->plotGrouping;\n    }\n\n    /**\n     * Set Plot Grouping Type.\n     *\n     * @return $this\n     */\n    public function setPlotGrouping(string $groupingType): static\n    {\n        $this->plotGrouping = $groupingType;\n\n        return $this;\n    }\n\n    /**\n     * Get Plot Direction.\n     */\n    public function getPlotDirection(): string\n    {\n        return $this->plotDirection;\n    }\n\n    /**\n     * Set Plot Direction.\n     *\n     * @return $this\n     */\n    public function setPlotDirection(string $plotDirection): static\n    {\n        $this->plotDirection = $plotDirection;\n\n        return $this;\n    }\n\n    /**\n     * Get Plot Order.\n     *\n     * @return int[]\n     */\n    public function getPlotOrder(): array\n    {\n        return $this->plotOrder;\n    }\n\n    /**\n     * Get Plot Labels.\n     *\n     * @return DataSeriesValues[]\n     */\n    public function getPlotLabels(): array\n    {\n        return $this->plotLabel;\n    }\n\n    /**\n     * Get Plot Label by Index.\n     *\n     * @return DataSeriesValues|false\n     */\n    public function getPlotLabelByIndex(int $index): bool|DataSeriesValues\n    {\n        $keys = array_keys($this->plotLabel);\n        if (in_array($index, $keys)) {\n            return $this->plotLabel[$index];\n        }\n\n        return false;\n    }\n\n    /**\n     * Get Plot Categories.\n     *\n     * @return DataSeriesValues[]\n     */\n    public function getPlotCategories(): array\n    {\n        return $this->plotCategory;\n    }\n\n    /**\n     * Get Plot Category by Index.\n     *\n     * @return DataSeriesValues|false\n     */\n    public function getPlotCategoryByIndex(int $index): bool|DataSeriesValues\n    {\n        $keys = array_keys($this->plotCategory);\n        if (in_array($index, $keys)) {\n            return $this->plotCategory[$index];\n        } elseif (isset($keys[$index])) {\n            return $this->plotCategory[$keys[$index]];\n        }\n\n        return false;\n    }\n\n    /**\n     * Get Plot Style.\n     */\n    public function getPlotStyle(): ?string\n    {\n        return $this->plotStyle;\n    }\n\n    /**\n     * Set Plot Style.\n     *\n     * @return $this\n     */\n    public function setPlotStyle(?string $plotStyle): static\n    {\n        $this->plotStyle = $plotStyle;\n\n        return $this;\n    }\n\n    /**\n     * Get Plot Values.\n     *\n     * @return DataSeriesValues[]\n     */\n    public function getPlotValues(): array\n    {\n        return $this->plotValues;\n    }\n\n    /**\n     * Get Plot Values by Index.\n     *\n     * @return DataSeriesValues|false\n     */\n    public function getPlotValuesByIndex(int $index): bool|DataSeriesValues\n    {\n        $keys = array_keys($this->plotValues);\n        if (in_array($index, $keys)) {\n            return $this->plotValues[$index];\n        }\n\n        return false;\n    }\n\n    /**\n     * Get Plot Bubble Sizes.\n     *\n     * @return DataSeriesValues[]\n     */\n    public function getPlotBubbleSizes(): array\n    {\n        return $this->plotBubbleSizes;\n    }\n\n    /**\n     * Set Plot Bubble Sizes.\n     *\n     * @param DataSeriesValues[] $plotBubbleSizes\n     */\n    public function setPlotBubbleSizes(array $plotBubbleSizes): self\n    {\n        $this->plotBubbleSizes = $plotBubbleSizes;\n\n        return $this;\n    }\n\n    /**\n     * Get Number of Plot Series.\n     */\n    public function getPlotSeriesCount(): int\n    {\n        return count($this->plotValues);\n    }\n\n    /**\n     * Get Smooth Line.\n     */\n    public function getSmoothLine(): bool\n    {\n        return $this->smoothLine;\n    }\n\n    /**\n     * Set Smooth Line.\n     *\n     * @return $this\n     */\n    public function setSmoothLine(bool $smoothLine): static\n    {\n        $this->smoothLine = $smoothLine;\n\n        return $this;\n    }\n\n    public function refresh(Worksheet $worksheet): void\n    {\n        foreach ($this->plotValues as $plotValues) {\n            $plotValues->refresh($worksheet, true);\n        }\n        foreach ($this->plotLabel as $plotValues) {\n            $plotValues->refresh($worksheet, true);\n        }\n        foreach ($this->plotCategory as $plotValues) {\n            $plotValues->refresh($worksheet, false);\n        }\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $plotLabels = $this->plotLabel;\n        $this->plotLabel = [];\n        foreach ($plotLabels as $plotLabel) {\n            $this->plotLabel[] = $plotLabel;\n        }\n        $plotCategories = $this->plotCategory;\n        $this->plotCategory = [];\n        foreach ($plotCategories as $plotCategory) {\n            $this->plotCategory[] = clone $plotCategory;\n        }\n        $plotValues = $this->plotValues;\n        $this->plotValues = [];\n        foreach ($plotValues as $plotValue) {\n            $this->plotValues[] = clone $plotValue;\n        }\n        $plotBubbleSizes = $this->plotBubbleSizes;\n        $this->plotBubbleSizes = [];\n        foreach ($plotBubbleSizes as $plotBubbleSize) {\n            $this->plotBubbleSizes[] = clone $plotBubbleSize;\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/DataSeriesValues.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass DataSeriesValues extends Properties\n{\n    const DATASERIES_TYPE_STRING = 'String';\n    const DATASERIES_TYPE_NUMBER = 'Number';\n\n    private const DATA_TYPE_VALUES = [\n        self::DATASERIES_TYPE_STRING,\n        self::DATASERIES_TYPE_NUMBER,\n    ];\n\n    /**\n     * Series Data Type.\n     */\n    private string $dataType;\n\n    /**\n     * Series Data Source.\n     */\n    private ?string $dataSource;\n\n    /**\n     * Format Code.\n     */\n    private ?string $formatCode;\n\n    /**\n     * Series Point Marker.\n     */\n    private ?string $pointMarker;\n\n    private ChartColor $markerFillColor;\n\n    private ChartColor $markerBorderColor;\n\n    /**\n     * Series Point Size.\n     */\n    private int $pointSize = 3;\n\n    /**\n     * Point Count (The number of datapoints in the dataseries).\n     */\n    private int $pointCount;\n\n    /**\n     * Data Values.\n     *\n     * @var null|mixed[]\n     */\n    private ?array $dataValues;\n\n    /**\n     * Fill color (can be array with colors if dataseries have custom colors).\n     *\n     * @var null|ChartColor|ChartColor[]\n     */\n    private $fillColor;\n\n    private bool $scatterLines = true;\n\n    private bool $bubble3D = false;\n\n    private ?Layout $labelLayout = null;\n\n    /** @var TrendLine[] */\n    private array $trendLines = [];\n\n    /**\n     * Create a new DataSeriesValues object.\n     *\n     * @param null|mixed[] $dataValues\n     * @param null|ChartColor|ChartColor[]|string|string[] $fillColor\n     */\n    public function __construct(\n        string $dataType = self::DATASERIES_TYPE_NUMBER,\n        ?string $dataSource = null,\n        ?string $formatCode = null,\n        int $pointCount = 0,\n        ?array $dataValues = [],\n        ?string $marker = null,\n        null|ChartColor|array|string $fillColor = null,\n        int|string $pointSize = 3\n    ) {\n        parent::__construct();\n        $this->markerFillColor = new ChartColor();\n        $this->markerBorderColor = new ChartColor();\n        $this->setDataType($dataType);\n        $this->dataSource = $dataSource;\n        $this->formatCode = $formatCode;\n        $this->pointCount = $pointCount;\n        $this->dataValues = $dataValues;\n        $this->pointMarker = $marker;\n        if ($fillColor !== null) {\n            $this->setFillColor($fillColor);\n        }\n        if (is_numeric($pointSize)) {\n            $this->pointSize = (int) $pointSize;\n        }\n    }\n\n    /**\n     * Get Series Data Type.\n     */\n    public function getDataType(): string\n    {\n        return $this->dataType;\n    }\n\n    /**\n     * Set Series Data Type.\n     *\n     * @param string $dataType Datatype of this data series\n     *                                Typical values are:\n     *                                    DataSeriesValues::DATASERIES_TYPE_STRING\n     *                                        Normally used for axis point values\n     *                                    DataSeriesValues::DATASERIES_TYPE_NUMBER\n     *                                        Normally used for chart data values\n     *\n     * @return $this\n     */\n    public function setDataType(string $dataType): static\n    {\n        if (!in_array($dataType, self::DATA_TYPE_VALUES)) {\n            throw new Exception('Invalid datatype for chart data series values');\n        }\n        $this->dataType = $dataType;\n\n        return $this;\n    }\n\n    /**\n     * Get Series Data Source (formula).\n     */\n    public function getDataSource(): ?string\n    {\n        return $this->dataSource;\n    }\n\n    /**\n     * Set Series Data Source (formula).\n     *\n     * @return $this\n     */\n    public function setDataSource(?string $dataSource): static\n    {\n        $this->dataSource = $dataSource;\n\n        return $this;\n    }\n\n    /**\n     * Get Point Marker.\n     */\n    public function getPointMarker(): ?string\n    {\n        return $this->pointMarker;\n    }\n\n    /**\n     * Set Point Marker.\n     *\n     * @return $this\n     */\n    public function setPointMarker(string $marker): static\n    {\n        $this->pointMarker = $marker;\n\n        return $this;\n    }\n\n    public function getMarkerFillColor(): ChartColor\n    {\n        return $this->markerFillColor;\n    }\n\n    public function getMarkerBorderColor(): ChartColor\n    {\n        return $this->markerBorderColor;\n    }\n\n    /**\n     * Get Point Size.\n     */\n    public function getPointSize(): int\n    {\n        return $this->pointSize;\n    }\n\n    /**\n     * Set Point Size.\n     *\n     * @return $this\n     */\n    public function setPointSize(int $size = 3): static\n    {\n        $this->pointSize = $size;\n\n        return $this;\n    }\n\n    /**\n     * Get Series Format Code.\n     */\n    public function getFormatCode(): ?string\n    {\n        return $this->formatCode;\n    }\n\n    /**\n     * Set Series Format Code.\n     *\n     * @return $this\n     */\n    public function setFormatCode(string $formatCode): static\n    {\n        $this->formatCode = $formatCode;\n\n        return $this;\n    }\n\n    /**\n     * Get Series Point Count.\n     */\n    public function getPointCount(): int\n    {\n        return $this->pointCount;\n    }\n\n    /**\n     * Get fill color object.\n     *\n     * @return null|ChartColor|ChartColor[]\n     */\n    public function getFillColorObject()\n    {\n        return $this->fillColor;\n    }\n\n    private function stringToChartColor(string $fillString): ChartColor\n    {\n        $value = $type = '';\n        if (str_starts_with($fillString, '*')) {\n            $type = 'schemeClr';\n            $value = substr($fillString, 1);\n        } elseif (str_starts_with($fillString, '/')) {\n            $type = 'prstClr';\n            $value = substr($fillString, 1);\n        } elseif ($fillString !== '') {\n            $type = 'srgbClr';\n            $value = $fillString;\n            $this->validateColor($value);\n        }\n\n        return new ChartColor($value, null, $type);\n    }\n\n    private function chartColorToString(ChartColor $chartColor): string\n    {\n        $type = (string) $chartColor->getColorProperty('type');\n        $value = (string) $chartColor->getColorProperty('value');\n        if ($type === '' || $value === '') {\n            return '';\n        }\n        if ($type === 'schemeClr') {\n            return \"*$value\";\n        }\n        if ($type === 'prstClr') {\n            return \"/$value\";\n        }\n\n        return $value;\n    }\n\n    /**\n     * Get fill color.\n     *\n     * @return string|string[] HEX color or array with HEX colors\n     */\n    public function getFillColor(): string|array\n    {\n        if ($this->fillColor === null) {\n            return '';\n        }\n        if (is_array($this->fillColor)) {\n            $array = [];\n            foreach ($this->fillColor as $chartColor) {\n                $array[] = $this->chartColorToString($chartColor);\n            }\n\n            return $array;\n        }\n\n        return $this->chartColorToString($this->fillColor);\n    }\n\n    /**\n     * Set fill color for series.\n     *\n     * @param ChartColor|ChartColor[]|string|string[] $color HEX color or array with HEX colors\n     *\n     * @return   $this\n     */\n    public function setFillColor($color): static\n    {\n        if (is_array($color)) {\n            $this->fillColor = [];\n            foreach ($color as $fillString) {\n                if ($fillString instanceof ChartColor) {\n                    $this->fillColor[] = $fillString;\n                } else {\n                    $this->fillColor[] = $this->stringToChartColor($fillString);\n                }\n            }\n        } elseif ($color instanceof ChartColor) {\n            $this->fillColor = $color;\n        } else {\n            $this->fillColor = $this->stringToChartColor($color);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Method for validating hex color.\n     *\n     * @param string $color value for color\n     */\n    private function validateColor(string $color): void\n    {\n        if (!preg_match('/^[a-f0-9]{6}$/i', $color)) {\n            throw new Exception(sprintf('Invalid hex color for chart series (color: \"%s\")', $color));\n        }\n    }\n\n    /**\n     * Get line width for series.\n     */\n    public function getLineWidth(): null|float|int\n    {\n        /** @var null|float|int */\n        $temp = $this->lineStyleProperties['width'];\n\n        return $temp;\n    }\n\n    /**\n     * Set line width for the series.\n     *\n     * @return $this\n     */\n    public function setLineWidth(null|float|int $width): static\n    {\n        $this->lineStyleProperties['width'] = $width;\n\n        return $this;\n    }\n\n    /**\n     * Identify if the Data Series is a multi-level or a simple series.\n     */\n    public function isMultiLevelSeries(): ?bool\n    {\n        if (!empty($this->dataValues)) {\n            return is_array(array_values($this->dataValues)[0]);\n        }\n\n        return null;\n    }\n\n    /**\n     * Return the level count of a multi-level Data Series.\n     */\n    public function multiLevelCount(): int\n    {\n        $levelCount = 0;\n        foreach (($this->dataValues ?? []) as $dataValueSet) {\n            /** @var mixed[] $dataValueSet */\n            $levelCount = max($levelCount, count($dataValueSet));\n        }\n\n        return $levelCount;\n    }\n\n    /**\n     * Get Series Data Values.\n     *\n     * @return null|mixed[]\n     */\n    public function getDataValues(): ?array\n    {\n        return $this->dataValues;\n    }\n\n    /**\n     * Get the first Series Data value.\n     */\n    public function getDataValue(): mixed\n    {\n        if ($this->dataValues === null) {\n            return null;\n        }\n        $count = count($this->dataValues);\n        if ($count == 0) {\n            return null;\n        } elseif ($count == 1) {\n            return $this->dataValues[0];\n        }\n\n        return $this->dataValues;\n    }\n\n    /**\n     * Set Series Data Values.\n     *\n     * @param mixed[] $dataValues\n     *\n     * @return $this\n     */\n    public function setDataValues(array $dataValues): static\n    {\n        $this->dataValues = Functions::flattenArray($dataValues);\n        $this->pointCount = count($dataValues);\n\n        return $this;\n    }\n\n    public function refresh(Worksheet $worksheet, bool $flatten = true): void\n    {\n        if ($this->dataSource !== null) {\n            $calcEngine = Calculation::getInstance($worksheet->getParent());\n            $newDataValues = Calculation::unwrapResult(\n                $calcEngine->_calculateFormulaValue(\n                    '=' . $this->dataSource,\n                    null,\n                    $worksheet->getCell('A1')\n                )\n            );\n            if ($flatten) {\n                $this->dataValues = Functions::flattenArray($newDataValues);\n                foreach ($this->dataValues as &$dataValue) {\n                    if (is_string($dataValue) && !empty($dataValue) && $dataValue[0] == '#') {\n                        $dataValue = 0.0;\n                    }\n                }\n                unset($dataValue);\n            } else {\n                [, $cellRange] = Worksheet::extractSheetTitle($this->dataSource, true);\n                $dimensions = Coordinate::rangeDimension(str_replace('$', '', $cellRange ?? ''));\n                if (($dimensions[0] == 1) || ($dimensions[1] == 1)) {\n                    $this->dataValues = Functions::flattenArray($newDataValues);\n                } else {\n                    /** @var array<int, mixed[]> */\n                    $newDataValuesx = $newDataValues;\n                    /** @var mixed[][] $newArray */\n                    $newArray = array_values(array_shift($newDataValuesx) ?? []);\n                    foreach ($newArray as $i => $newDataSet) {\n                        $newArray[$i] = [$newDataSet];\n                    }\n\n                    foreach ($newDataValuesx as $newDataSet) {\n                        $i = 0;\n                        foreach ($newDataSet as $newDataVal) {\n                            array_unshift($newArray[$i++], $newDataVal);\n                        }\n                    }\n                    $this->dataValues = $newArray;\n                }\n            }\n            $this->pointCount = count($this->dataValues ?? []);\n        }\n    }\n\n    public function getScatterLines(): bool\n    {\n        return $this->scatterLines;\n    }\n\n    public function setScatterLines(bool $scatterLines): self\n    {\n        $this->scatterLines = $scatterLines;\n\n        return $this;\n    }\n\n    public function getBubble3D(): bool\n    {\n        return $this->bubble3D;\n    }\n\n    public function setBubble3D(bool $bubble3D): self\n    {\n        $this->bubble3D = $bubble3D;\n\n        return $this;\n    }\n\n    /**\n     * Smooth Line. Must be specified for both DataSeries and DataSeriesValues.\n     */\n    private bool $smoothLine = false;\n\n    /**\n     * Get Smooth Line.\n     */\n    public function getSmoothLine(): bool\n    {\n        return $this->smoothLine;\n    }\n\n    /**\n     * Set Smooth Line.\n     *\n     * @return $this\n     */\n    public function setSmoothLine(bool $smoothLine): static\n    {\n        $this->smoothLine = $smoothLine;\n\n        return $this;\n    }\n\n    public function getLabelLayout(): ?Layout\n    {\n        return $this->labelLayout;\n    }\n\n    public function setLabelLayout(?Layout $labelLayout): self\n    {\n        $this->labelLayout = $labelLayout;\n\n        return $this;\n    }\n\n    /** @param TrendLine[] $trendLines */\n    public function setTrendLines(array $trendLines): self\n    {\n        $this->trendLines = $trendLines;\n\n        return $this;\n    }\n\n    /** @return TrendLine[] */\n    public function getTrendLines(): array\n    {\n        return $this->trendLines;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        parent::__clone();\n        $this->markerFillColor = clone $this->markerFillColor;\n        $this->markerBorderColor = clone $this->markerBorderColor;\n        if (is_array($this->fillColor)) {\n            $fillColor = $this->fillColor;\n            $this->fillColor = [];\n            foreach ($fillColor as $color) {\n                $this->fillColor[] = clone $color;\n            }\n        } elseif ($this->fillColor instanceof ChartColor) {\n            $this->fillColor = clone $this->fillColor;\n        }\n        $this->labelLayout = ($this->labelLayout === null) ? null : clone $this->labelLayout;\n        $trendLines = $this->trendLines;\n        $this->trendLines = [];\n        foreach ($trendLines as $trendLine) {\n            $this->trendLines[] = clone $trendLine;\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Exception.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass Exception extends PhpSpreadsheetException\n{\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/GridLines.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\n/**\n * Created by PhpStorm.\n * User: Wiktor Trzonkowski\n * Date: 7/2/14\n * Time: 2:36 PM.\n */\nclass GridLines extends Properties\n{\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Layout.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass Layout\n{\n    /**\n     * layoutTarget.\n     */\n    private ?string $layoutTarget = null;\n\n    /**\n     * X Mode.\n     */\n    private ?string $xMode = null;\n\n    /**\n     * Y Mode.\n     */\n    private ?string $yMode = null;\n\n    /**\n     * X-Position.\n     */\n    private ?float $xPos = null;\n\n    /**\n     * Y-Position.\n     */\n    private ?float $yPos = null;\n\n    /**\n     * width.\n     */\n    private ?float $width = null;\n\n    /**\n     * height.\n     */\n    private ?float $height = null;\n\n    /**\n     * Position - t=top.\n     */\n    private string $dLblPos = '';\n\n    private string $numFmtCode = '';\n\n    private bool $numFmtLinked = false;\n\n    /**\n     * show legend key\n     * Specifies that legend keys should be shown in data labels.\n     */\n    private ?bool $showLegendKey = null;\n\n    /**\n     * show value\n     * Specifies that the value should be shown in a data label.\n     */\n    private ?bool $showVal = null;\n\n    /**\n     * show category name\n     * Specifies that the category name should be shown in the data label.\n     */\n    private ?bool $showCatName = null;\n\n    /**\n     * show data series name\n     * Specifies that the series name should be shown in the data label.\n     */\n    private ?bool $showSerName = null;\n\n    /**\n     * show percentage\n     * Specifies that the percentage should be shown in the data label.\n     */\n    private ?bool $showPercent = null;\n\n    /**\n     * show bubble size.\n     */\n    private ?bool $showBubbleSize = null;\n\n    /**\n     * show leader lines\n     * Specifies that leader lines should be shown for the data label.\n     */\n    private ?bool $showLeaderLines = null;\n\n    private ?ChartColor $labelFillColor = null;\n\n    private ?ChartColor $labelBorderColor = null;\n\n    private ?Font $labelFont = null;\n\n    private ?Properties $labelEffects = null;\n\n    /**\n     * Create a new Layout.\n     *\n     * @param array<mixed> $layout\n     */\n    public function __construct(array $layout = [])\n    {\n        /** @var array{layoutTarget?: string, xMode?: string, yMode?: string, x?: float, y?: float, w?:float, h?:float, dLblPos?: string, labelFont?: ?mixed, labelFontColor?: ?mixed, labelEffects?: ?mixed, numFmtCode?: string} $layout */\n        if (isset($layout['layoutTarget'])) {\n            $this->layoutTarget = $layout['layoutTarget'];\n        }\n        if (isset($layout['xMode'])) {\n            $this->xMode = $layout['xMode'];\n        }\n        if (isset($layout['yMode'])) {\n            $this->yMode = $layout['yMode'];\n        }\n        if (isset($layout['x'])) {\n            $this->xPos = (float) $layout['x'];\n        }\n        if (isset($layout['y'])) {\n            $this->yPos = (float) $layout['y'];\n        }\n        if (isset($layout['w'])) {\n            $this->width = (float) $layout['w'];\n        }\n        if (isset($layout['h'])) {\n            $this->height = (float) $layout['h'];\n        }\n        if (isset($layout['dLblPos'])) {\n            $this->dLblPos = (string) $layout['dLblPos'];\n        }\n        if (isset($layout['numFmtCode'])) {\n            $this->numFmtCode = (string) $layout['numFmtCode'];\n        }\n        $this->initBoolean($layout, 'showLegendKey');\n        $this->initBoolean($layout, 'showVal');\n        $this->initBoolean($layout, 'showCatName');\n        $this->initBoolean($layout, 'showSerName');\n        $this->initBoolean($layout, 'showPercent');\n        $this->initBoolean($layout, 'showBubbleSize');\n        $this->initBoolean($layout, 'showLeaderLines');\n        $this->initBoolean($layout, 'numFmtLinked');\n        $this->initColor($layout, 'labelFillColor');\n        $this->initColor($layout, 'labelBorderColor');\n        $labelFont = $layout['labelFont'] ?? null;\n        if ($labelFont instanceof Font) {\n            $this->labelFont = $labelFont;\n        }\n        $labelFontColor = $layout['labelFontColor'] ?? null;\n        if ($labelFontColor instanceof ChartColor) {\n            $this->setLabelFontColor($labelFontColor);\n        }\n        $labelEffects = $layout['labelEffects'] ?? null;\n        if ($labelEffects instanceof Properties) {\n            $this->labelEffects = $labelEffects;\n        }\n    }\n\n    /** @param mixed[] $layout */\n    private function initBoolean(array $layout, string $name): void\n    {\n        if (isset($layout[$name])) {\n            $this->$name = (bool) $layout[$name];\n        }\n    }\n\n    /** @param mixed[] $layout */\n    private function initColor(array $layout, string $name): void\n    {\n        if (isset($layout[$name]) && $layout[$name] instanceof ChartColor) {\n            $this->$name = $layout[$name];\n        }\n    }\n\n    /**\n     * Get Layout Target.\n     */\n    public function getLayoutTarget(): ?string\n    {\n        return $this->layoutTarget;\n    }\n\n    /**\n     * Set Layout Target.\n     *\n     * @return $this\n     */\n    public function setLayoutTarget(?string $target): static\n    {\n        $this->layoutTarget = $target;\n\n        return $this;\n    }\n\n    /**\n     * Get X-Mode.\n     */\n    public function getXMode(): ?string\n    {\n        return $this->xMode;\n    }\n\n    /**\n     * Set X-Mode.\n     *\n     * @return $this\n     */\n    public function setXMode(?string $mode): static\n    {\n        $this->xMode = (string) $mode;\n\n        return $this;\n    }\n\n    /**\n     * Get Y-Mode.\n     */\n    public function getYMode(): ?string\n    {\n        return $this->yMode;\n    }\n\n    /**\n     * Set Y-Mode.\n     *\n     * @return $this\n     */\n    public function setYMode(?string $mode): static\n    {\n        $this->yMode = (string) $mode;\n\n        return $this;\n    }\n\n    /**\n     * Get X-Position.\n     */\n    public function getXPosition(): null|float|int\n    {\n        return $this->xPos;\n    }\n\n    /**\n     * Set X-Position.\n     *\n     * @return $this\n     */\n    public function setXPosition(float $position): static\n    {\n        $this->xPos = $position;\n\n        return $this;\n    }\n\n    /**\n     * Get Y-Position.\n     */\n    public function getYPosition(): ?float\n    {\n        return $this->yPos;\n    }\n\n    /**\n     * Set Y-Position.\n     *\n     * @return $this\n     */\n    public function setYPosition(float $position): static\n    {\n        $this->yPos = $position;\n\n        return $this;\n    }\n\n    /**\n     * Get Width.\n     */\n    public function getWidth(): ?float\n    {\n        return $this->width;\n    }\n\n    /**\n     * Set Width.\n     *\n     * @return $this\n     */\n    public function setWidth(?float $width): static\n    {\n        $this->width = $width;\n\n        return $this;\n    }\n\n    /**\n     * Get Height.\n     */\n    public function getHeight(): ?float\n    {\n        return $this->height;\n    }\n\n    /**\n     * Set Height.\n     *\n     * @return $this\n     */\n    public function setHeight(?float $height): static\n    {\n        $this->height = $height;\n\n        return $this;\n    }\n\n    public function getShowLegendKey(): ?bool\n    {\n        return $this->showLegendKey;\n    }\n\n    /**\n     * Set show legend key\n     * Specifies that legend keys should be shown in data labels.\n     */\n    public function setShowLegendKey(?bool $showLegendKey): self\n    {\n        $this->showLegendKey = $showLegendKey;\n\n        return $this;\n    }\n\n    public function getShowVal(): ?bool\n    {\n        return $this->showVal;\n    }\n\n    /**\n     * Set show val\n     * Specifies that the value should be shown in data labels.\n     */\n    public function setShowVal(?bool $showDataLabelValues): self\n    {\n        $this->showVal = $showDataLabelValues;\n\n        return $this;\n    }\n\n    public function getShowCatName(): ?bool\n    {\n        return $this->showCatName;\n    }\n\n    /**\n     * Set show cat name\n     * Specifies that the category name should be shown in data labels.\n     */\n    public function setShowCatName(?bool $showCategoryName): self\n    {\n        $this->showCatName = $showCategoryName;\n\n        return $this;\n    }\n\n    public function getShowSerName(): ?bool\n    {\n        return $this->showSerName;\n    }\n\n    /**\n     * Set show data series name.\n     * Specifies that the series name should be shown in data labels.\n     */\n    public function setShowSerName(?bool $showSeriesName): self\n    {\n        $this->showSerName = $showSeriesName;\n\n        return $this;\n    }\n\n    public function getShowPercent(): ?bool\n    {\n        return $this->showPercent;\n    }\n\n    /**\n     * Set show percentage.\n     * Specifies that the percentage should be shown in data labels.\n     */\n    public function setShowPercent(?bool $showPercentage): self\n    {\n        $this->showPercent = $showPercentage;\n\n        return $this;\n    }\n\n    public function getShowBubbleSize(): ?bool\n    {\n        return $this->showBubbleSize;\n    }\n\n    /**\n     * Set show bubble size.\n     * Specifies that the bubble size should be shown in data labels.\n     */\n    public function setShowBubbleSize(?bool $showBubbleSize): self\n    {\n        $this->showBubbleSize = $showBubbleSize;\n\n        return $this;\n    }\n\n    public function getShowLeaderLines(): ?bool\n    {\n        return $this->showLeaderLines;\n    }\n\n    /**\n     * Set show leader lines.\n     * Specifies that leader lines should be shown in data labels.\n     */\n    public function setShowLeaderLines(?bool $showLeaderLines): self\n    {\n        $this->showLeaderLines = $showLeaderLines;\n\n        return $this;\n    }\n\n    public function getLabelFillColor(): ?ChartColor\n    {\n        return $this->labelFillColor;\n    }\n\n    public function setLabelFillColor(?ChartColor $chartColor): self\n    {\n        $this->labelFillColor = $chartColor;\n\n        return $this;\n    }\n\n    public function getLabelBorderColor(): ?ChartColor\n    {\n        return $this->labelBorderColor;\n    }\n\n    public function setLabelBorderColor(?ChartColor $chartColor): self\n    {\n        $this->labelBorderColor = $chartColor;\n\n        return $this;\n    }\n\n    public function getLabelFont(): ?Font\n    {\n        return $this->labelFont;\n    }\n\n    public function setLabelFont(?Font $labelFont): self\n    {\n        $this->labelFont = $labelFont;\n\n        return $this;\n    }\n\n    public function getLabelEffects(): ?Properties\n    {\n        return $this->labelEffects;\n    }\n\n    public function getLabelFontColor(): ?ChartColor\n    {\n        if ($this->labelFont === null) {\n            return null;\n        }\n\n        return $this->labelFont->getChartColor();\n    }\n\n    public function setLabelFontColor(?ChartColor $chartColor): self\n    {\n        if ($this->labelFont === null) {\n            $this->labelFont = new Font();\n            $this->labelFont->setSize(null, true);\n        }\n        $this->labelFont->setChartColorFromObject($chartColor);\n\n        return $this;\n    }\n\n    public function getDLblPos(): string\n    {\n        return $this->dLblPos;\n    }\n\n    public function setDLblPos(string $dLblPos): self\n    {\n        $this->dLblPos = $dLblPos;\n\n        return $this;\n    }\n\n    public function getNumFmtCode(): string\n    {\n        return $this->numFmtCode;\n    }\n\n    public function setNumFmtCode(string $numFmtCode): self\n    {\n        $this->numFmtCode = $numFmtCode;\n\n        return $this;\n    }\n\n    public function getNumFmtLinked(): bool\n    {\n        return $this->numFmtLinked;\n    }\n\n    public function setNumFmtLinked(bool $numFmtLinked): self\n    {\n        $this->numFmtLinked = $numFmtLinked;\n\n        return $this;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $this->labelFillColor = ($this->labelFillColor === null) ? null : clone $this->labelFillColor;\n        $this->labelBorderColor = ($this->labelBorderColor === null) ? null : clone $this->labelBorderColor;\n        $this->labelFont = ($this->labelFont === null) ? null : clone $this->labelFont;\n        $this->labelEffects = ($this->labelEffects === null) ? null : clone $this->labelEffects;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Legend.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nclass Legend\n{\n    /** Legend positions */\n    const XL_LEGEND_POSITION_BOTTOM = -4107; //    Below the chart.\n    const XL_LEGEND_POSITION_CORNER = 2; //    In the upper right-hand corner of the chart border.\n    const XL_LEGEND_POSITION_CUSTOM = -4161; //    A custom position.\n    const XL_LEGEND_POSITION_LEFT = -4131; //    Left of the chart.\n    const XL_LEGEND_POSITION_RIGHT = -4152; //    Right of the chart.\n    const XL_LEGEND_POSITION_TOP = -4160; //    Above the chart.\n\n    const POSITION_RIGHT = 'r';\n    const POSITION_LEFT = 'l';\n    const POSITION_BOTTOM = 'b';\n    const POSITION_TOP = 't';\n    const POSITION_TOPRIGHT = 'tr';\n\n    const POSITION_XLREF = [\n        self::XL_LEGEND_POSITION_BOTTOM => self::POSITION_BOTTOM,\n        self::XL_LEGEND_POSITION_CORNER => self::POSITION_TOPRIGHT,\n        self::XL_LEGEND_POSITION_CUSTOM => '??',\n        self::XL_LEGEND_POSITION_LEFT => self::POSITION_LEFT,\n        self::XL_LEGEND_POSITION_RIGHT => self::POSITION_RIGHT,\n        self::XL_LEGEND_POSITION_TOP => self::POSITION_TOP,\n    ];\n\n    /**\n     * Legend position.\n     */\n    private string $position = self::POSITION_RIGHT;\n\n    /**\n     * Allow overlay of other elements?\n     */\n    private bool $overlay = true;\n\n    /**\n     * Legend Layout.\n     */\n    private ?Layout $layout;\n\n    private GridLines $borderLines;\n\n    private ChartColor $fillColor;\n\n    private ?AxisText $legendText = null;\n\n    /**\n     * Create a new Legend.\n     */\n    public function __construct(string $position = self::POSITION_RIGHT, ?Layout $layout = null, bool $overlay = false)\n    {\n        $this->setPosition($position);\n        $this->layout = $layout;\n        $this->setOverlay($overlay);\n        $this->borderLines = new GridLines();\n        $this->fillColor = new ChartColor();\n    }\n\n    public function getFillColor(): ChartColor\n    {\n        return $this->fillColor;\n    }\n\n    /**\n     * Get legend position as an Excel string value.\n     */\n    public function getPosition(): string\n    {\n        return $this->position;\n    }\n\n    /**\n     * Get legend position using an Excel string value.\n     *\n     * @param string $position see self::POSITION_*\n     */\n    public function setPosition(string $position): bool\n    {\n        if (!in_array($position, self::POSITION_XLREF)) {\n            return false;\n        }\n\n        $this->position = $position;\n\n        return true;\n    }\n\n    /**\n     * Get legend position as an Excel internal numeric value.\n     */\n    public function getPositionXL(): false|int\n    {\n        return array_search($this->position, self::POSITION_XLREF);\n    }\n\n    /**\n     * Set legend position using an Excel internal numeric value.\n     *\n     * @param int $positionXL see self::XL_LEGEND_POSITION_*\n     */\n    public function setPositionXL(int $positionXL): bool\n    {\n        if (!isset(self::POSITION_XLREF[$positionXL])) {\n            return false;\n        }\n\n        $this->position = self::POSITION_XLREF[$positionXL];\n\n        return true;\n    }\n\n    /**\n     * Get allow overlay of other elements?\n     */\n    public function getOverlay(): bool\n    {\n        return $this->overlay;\n    }\n\n    /**\n     * Set allow overlay of other elements?\n     */\n    public function setOverlay(bool $overlay): void\n    {\n        $this->overlay = $overlay;\n    }\n\n    /**\n     * Get Layout.\n     */\n    public function getLayout(): ?Layout\n    {\n        return $this->layout;\n    }\n\n    public function getLegendText(): ?AxisText\n    {\n        return $this->legendText;\n    }\n\n    public function setLegendText(?AxisText $legendText): self\n    {\n        $this->legendText = $legendText;\n\n        return $this;\n    }\n\n    public function getBorderLines(): GridLines\n    {\n        return $this->borderLines;\n    }\n\n    public function setBorderLines(GridLines $borderLines): self\n    {\n        $this->borderLines = $borderLines;\n\n        return $this;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $this->layout = ($this->layout === null) ? null : clone $this->layout;\n        $this->legendText = ($this->legendText === null) ? null : clone $this->legendText;\n        $this->borderLines = clone $this->borderLines;\n        $this->fillColor = clone $this->fillColor;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/PlotArea.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass PlotArea\n{\n    /**\n     * No fill in plot area (show Excel gridlines through chart).\n     */\n    private bool $noFill = false;\n\n    /**\n     * PlotArea Gradient Stop list.\n     * Each entry is a 2-element array.\n     *     First is position in %.\n     *     Second is ChartColor.\n     *\n     * @var array<array{float, ChartColor}>\n     */\n    private array $gradientFillStops = [];\n\n    /**\n     * PlotArea Gradient Angle.\n     */\n    private ?float $gradientFillAngle = null;\n\n    /**\n     * PlotArea Layout.\n     */\n    private ?Layout $layout;\n\n    /**\n     * Plot Series.\n     *\n     * @var DataSeries[]\n     */\n    private array $plotSeries;\n\n    /**\n     * Create a new PlotArea.\n     *\n     * @param DataSeries[] $plotSeries\n     */\n    public function __construct(?Layout $layout = null, array $plotSeries = [])\n    {\n        $this->layout = $layout;\n        $this->plotSeries = $plotSeries;\n    }\n\n    public function getLayout(): ?Layout\n    {\n        return $this->layout;\n    }\n\n    /**\n     * Get Number of Plot Groups.\n     */\n    public function getPlotGroupCount(): int\n    {\n        return count($this->plotSeries);\n    }\n\n    /**\n     * Get Number of Plot Series.\n     */\n    public function getPlotSeriesCount(): int|float\n    {\n        $seriesCount = 0;\n        foreach ($this->plotSeries as $plot) {\n            $seriesCount += $plot->getPlotSeriesCount();\n        }\n\n        return $seriesCount;\n    }\n\n    /**\n     * Get Plot Series.\n     *\n     * @return DataSeries[]\n     */\n    public function getPlotGroup(): array\n    {\n        return $this->plotSeries;\n    }\n\n    /**\n     * Get Plot Series by Index.\n     */\n    public function getPlotGroupByIndex(int $index): DataSeries\n    {\n        return $this->plotSeries[$index];\n    }\n\n    /**\n     * Set Plot Series.\n     *\n     * @param DataSeries[] $plotSeries\n     *\n     * @return $this\n     */\n    public function setPlotSeries(array $plotSeries): static\n    {\n        $this->plotSeries = $plotSeries;\n\n        return $this;\n    }\n\n    public function refresh(Worksheet $worksheet): void\n    {\n        foreach ($this->plotSeries as $plotSeries) {\n            $plotSeries->refresh($worksheet);\n        }\n    }\n\n    public function setNoFill(bool $noFill): self\n    {\n        $this->noFill = $noFill;\n\n        return $this;\n    }\n\n    public function getNoFill(): bool\n    {\n        return $this->noFill;\n    }\n\n    /** @param array<array{float, ChartColor}> $gradientFillStops */\n    public function setGradientFillProperties(array $gradientFillStops, ?float $gradientFillAngle): self\n    {\n        $this->gradientFillStops = $gradientFillStops;\n        $this->gradientFillAngle = $gradientFillAngle;\n\n        return $this;\n    }\n\n    /**\n     * Get gradientFillAngle.\n     */\n    public function getGradientFillAngle(): ?float\n    {\n        return $this->gradientFillAngle;\n    }\n\n    /**\n     * Get gradientFillStops.\n     *\n     * @return array<array{float, ChartColor}>\n     */\n    public function getGradientFillStops(): array\n    {\n        return $this->gradientFillStops;\n    }\n\n    private ?int $gapWidth = null;\n\n    private bool $useUpBars = false;\n\n    private bool $useDownBars = false;\n\n    public function getGapWidth(): ?int\n    {\n        return $this->gapWidth;\n    }\n\n    public function setGapWidth(?int $gapWidth): self\n    {\n        $this->gapWidth = $gapWidth;\n\n        return $this;\n    }\n\n    public function getUseUpBars(): bool\n    {\n        return $this->useUpBars;\n    }\n\n    public function setUseUpBars(bool $useUpBars): self\n    {\n        $this->useUpBars = $useUpBars;\n\n        return $this;\n    }\n\n    public function getUseDownBars(): bool\n    {\n        return $this->useDownBars;\n    }\n\n    public function setUseDownBars(bool $useDownBars): self\n    {\n        $this->useDownBars = $useDownBars;\n\n        return $this;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $this->layout = ($this->layout === null) ? null : clone $this->layout;\n        $plotSeries = $this->plotSeries;\n        $this->plotSeries = [];\n        foreach ($plotSeries as $series) {\n            $this->plotSeries[] = clone $series;\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Properties.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\n/**\n * Created by PhpStorm.\n * User: nhw2h8s\n * Date: 7/2/14\n * Time: 5:45 PM.\n */\nabstract class Properties\n{\n    const AXIS_LABELS_LOW = 'low';\n    const AXIS_LABELS_HIGH = 'high';\n    const AXIS_LABELS_NEXT_TO = 'nextTo';\n    const AXIS_LABELS_NONE = 'none';\n\n    const TICK_MARK_NONE = 'none';\n    const TICK_MARK_INSIDE = 'in';\n    const TICK_MARK_OUTSIDE = 'out';\n    const TICK_MARK_CROSS = 'cross';\n\n    const HORIZONTAL_CROSSES_AUTOZERO = 'autoZero';\n    const HORIZONTAL_CROSSES_MAXIMUM = 'max';\n\n    const FORMAT_CODE_GENERAL = 'General';\n    const FORMAT_CODE_NUMBER = '#,##0.00';\n    const FORMAT_CODE_CURRENCY = '$#,##0.00';\n    const FORMAT_CODE_ACCOUNTING = '_($* #,##0.00_);_($* (#,##0.00);_($* \"-\"??_);_(@_)';\n    const FORMAT_CODE_DATE = 'm/d/yyyy';\n    const FORMAT_CODE_DATE_ISO8601 = 'yyyy-mm-dd';\n    const FORMAT_CODE_TIME = '[$-F400]h:mm:ss AM/PM';\n    const FORMAT_CODE_PERCENTAGE = '0.00%';\n    const FORMAT_CODE_FRACTION = '# ?/?';\n    const FORMAT_CODE_SCIENTIFIC = '0.00E+00';\n    const FORMAT_CODE_TEXT = '@';\n    const FORMAT_CODE_SPECIAL = '00000';\n\n    const ORIENTATION_NORMAL = 'minMax';\n    const ORIENTATION_REVERSED = 'maxMin';\n\n    const LINE_STYLE_COMPOUND_SIMPLE = 'sng';\n    const LINE_STYLE_COMPOUND_DOUBLE = 'dbl';\n    const LINE_STYLE_COMPOUND_THICKTHIN = 'thickThin';\n    const LINE_STYLE_COMPOUND_THINTHICK = 'thinThick';\n    const LINE_STYLE_COMPOUND_TRIPLE = 'tri';\n    const LINE_STYLE_DASH_SOLID = 'solid';\n    const LINE_STYLE_DASH_ROUND_DOT = 'sysDot';\n    const LINE_STYLE_DASH_SQUARE_DOT = 'sysDash';\n    const LINE_STYPE_DASH_DASH = 'dash';\n    const LINE_STYLE_DASH_DASH_DOT = 'dashDot';\n    const LINE_STYLE_DASH_LONG_DASH = 'lgDash';\n    const LINE_STYLE_DASH_LONG_DASH_DOT = 'lgDashDot';\n    const LINE_STYLE_DASH_LONG_DASH_DOT_DOT = 'lgDashDotDot';\n    const LINE_STYLE_CAP_SQUARE = 'sq';\n    const LINE_STYLE_CAP_ROUND = 'rnd';\n    const LINE_STYLE_CAP_FLAT = 'flat';\n    const LINE_STYLE_JOIN_ROUND = 'round';\n    const LINE_STYLE_JOIN_MITER = 'miter';\n    const LINE_STYLE_JOIN_BEVEL = 'bevel';\n    const LINE_STYLE_ARROW_TYPE_NOARROW = null;\n    const LINE_STYLE_ARROW_TYPE_ARROW = 'triangle';\n    const LINE_STYLE_ARROW_TYPE_OPEN = 'arrow';\n    const LINE_STYLE_ARROW_TYPE_STEALTH = 'stealth';\n    const LINE_STYLE_ARROW_TYPE_DIAMOND = 'diamond';\n    const LINE_STYLE_ARROW_TYPE_OVAL = 'oval';\n    const LINE_STYLE_ARROW_SIZE_1 = 1;\n    const LINE_STYLE_ARROW_SIZE_2 = 2;\n    const LINE_STYLE_ARROW_SIZE_3 = 3;\n    const LINE_STYLE_ARROW_SIZE_4 = 4;\n    const LINE_STYLE_ARROW_SIZE_5 = 5;\n    const LINE_STYLE_ARROW_SIZE_6 = 6;\n    const LINE_STYLE_ARROW_SIZE_7 = 7;\n    const LINE_STYLE_ARROW_SIZE_8 = 8;\n    const LINE_STYLE_ARROW_SIZE_9 = 9;\n\n    const SHADOW_PRESETS_NOSHADOW = null;\n    const SHADOW_PRESETS_OUTER_BOTTTOM_RIGHT = 1;\n    const SHADOW_PRESETS_OUTER_BOTTOM = 2;\n    const SHADOW_PRESETS_OUTER_BOTTOM_LEFT = 3;\n    const SHADOW_PRESETS_OUTER_RIGHT = 4;\n    const SHADOW_PRESETS_OUTER_CENTER = 5;\n    const SHADOW_PRESETS_OUTER_LEFT = 6;\n    const SHADOW_PRESETS_OUTER_TOP_RIGHT = 7;\n    const SHADOW_PRESETS_OUTER_TOP = 8;\n    const SHADOW_PRESETS_OUTER_TOP_LEFT = 9;\n    const SHADOW_PRESETS_INNER_BOTTTOM_RIGHT = 10;\n    const SHADOW_PRESETS_INNER_BOTTOM = 11;\n    const SHADOW_PRESETS_INNER_BOTTOM_LEFT = 12;\n    const SHADOW_PRESETS_INNER_RIGHT = 13;\n    const SHADOW_PRESETS_INNER_CENTER = 14;\n    const SHADOW_PRESETS_INNER_LEFT = 15;\n    const SHADOW_PRESETS_INNER_TOP_RIGHT = 16;\n    const SHADOW_PRESETS_INNER_TOP = 17;\n    const SHADOW_PRESETS_INNER_TOP_LEFT = 18;\n    const SHADOW_PRESETS_PERSPECTIVE_BELOW = 19;\n    const SHADOW_PRESETS_PERSPECTIVE_UPPER_RIGHT = 20;\n    const SHADOW_PRESETS_PERSPECTIVE_UPPER_LEFT = 21;\n    const SHADOW_PRESETS_PERSPECTIVE_LOWER_RIGHT = 22;\n    const SHADOW_PRESETS_PERSPECTIVE_LOWER_LEFT = 23;\n\n    const POINTS_WIDTH_MULTIPLIER = 12_700;\n    const ANGLE_MULTIPLIER = 60_000; // direction and size-kx size-ky\n    const PERCENTAGE_MULTIPLIER = 100_000; // size sx and sy, and gradient pos\n    const MAX_SKEW_ANGLE_XML = 90 * self::ANGLE_MULTIPLIER - 1;\n    const MAX_SKEW_ANGLE_DEGREES = self::MAX_SKEW_ANGLE_XML / self::ANGLE_MULTIPLIER; // max for size-kx size-ky\n\n    protected bool $objectState = false; // used only for minor gridlines\n\n    protected ?float $glowSize = null;\n\n    protected ChartColor $glowColor;\n\n    /** @var array{size: ?float} */\n    protected array $softEdges = [\n        'size' => null,\n    ];\n\n    /** @var mixed[] */\n    protected array $shadowProperties = self::PRESETS_OPTIONS[0];\n\n    protected ChartColor $shadowColor;\n\n    public function __construct()\n    {\n        $this->lineColor = new ChartColor();\n        $this->glowColor = new ChartColor();\n        $this->shadowColor = new ChartColor();\n        $this->shadowColor->setType(ChartColor::EXCEL_COLOR_TYPE_STANDARD);\n        $this->shadowColor->setValue('black');\n        $this->shadowColor->setAlpha(40);\n    }\n\n    /**\n     * Get Object State.\n     */\n    public function getObjectState(): bool\n    {\n        return $this->objectState;\n    }\n\n    /**\n     * Change Object State to True.\n     *\n     * @return $this\n     */\n    public function activateObject()\n    {\n        $this->objectState = true;\n\n        return $this;\n    }\n\n    public static function pointsToXml(float $width): string\n    {\n        return (string) (int) ($width * self::POINTS_WIDTH_MULTIPLIER);\n    }\n\n    public static function xmlToPoints(string $width): float\n    {\n        return ((float) $width) / self::POINTS_WIDTH_MULTIPLIER;\n    }\n\n    public static function angleToXml(float $angle): string\n    {\n        return (string) (int) ($angle * self::ANGLE_MULTIPLIER);\n    }\n\n    public static function xmlToAngle(string $angle): float\n    {\n        return ((float) $angle) / self::ANGLE_MULTIPLIER;\n    }\n\n    public static function tenthOfPercentToXml(float $value): string\n    {\n        return (string) (int) ($value * self::PERCENTAGE_MULTIPLIER);\n    }\n\n    public static function xmlToTenthOfPercent(string $value): float\n    {\n        return ((float) $value) / self::PERCENTAGE_MULTIPLIER;\n    }\n\n    /** @return array{type: ?string, value: ?string, alpha: ?int} */\n    protected function setColorProperties(?string $color, null|float|int|string $alpha, ?string $colorType): array\n    {\n        return [\n            'type' => $colorType,\n            'value' => $color,\n            'alpha' => ($alpha === null) ? null : (int) $alpha,\n        ];\n    }\n\n    protected const PRESETS_OPTIONS = [\n        //NONE\n        0 => [\n            'presets' => self::SHADOW_PRESETS_NOSHADOW,\n            'effect' => null,\n            //'color' => [\n            //    'type' => ChartColor::EXCEL_COLOR_TYPE_STANDARD,\n            //    'value' => 'black',\n            //    'alpha' => 40,\n            //],\n            'size' => [\n                'sx' => null,\n                'sy' => null,\n                'kx' => null,\n                'ky' => null,\n            ],\n            'blur' => null,\n            'direction' => null,\n            'distance' => null,\n            'algn' => null,\n            'rotWithShape' => null,\n        ],\n        //OUTER\n        1 => [\n            'effect' => 'outerShdw',\n            'blur' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 2700000 / self::ANGLE_MULTIPLIER,\n            'algn' => 'tl',\n            'rotWithShape' => '0',\n        ],\n        2 => [\n            'effect' => 'outerShdw',\n            'blur' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 5400000 / self::ANGLE_MULTIPLIER,\n            'algn' => 't',\n            'rotWithShape' => '0',\n        ],\n        3 => [\n            'effect' => 'outerShdw',\n            'blur' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 8100000 / self::ANGLE_MULTIPLIER,\n            'algn' => 'tr',\n            'rotWithShape' => '0',\n        ],\n        4 => [\n            'effect' => 'outerShdw',\n            'blur' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'algn' => 'l',\n            'rotWithShape' => '0',\n        ],\n        5 => [\n            'effect' => 'outerShdw',\n            'size' => [\n                'sx' => 102000 / self::PERCENTAGE_MULTIPLIER,\n                'sy' => 102000 / self::PERCENTAGE_MULTIPLIER,\n            ],\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'algn' => 'ctr',\n            'rotWithShape' => '0',\n        ],\n        6 => [\n            'effect' => 'outerShdw',\n            'blur' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 10800000 / self::ANGLE_MULTIPLIER,\n            'algn' => 'r',\n            'rotWithShape' => '0',\n        ],\n        7 => [\n            'effect' => 'outerShdw',\n            'blur' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 18900000 / self::ANGLE_MULTIPLIER,\n            'algn' => 'bl',\n            'rotWithShape' => '0',\n        ],\n        8 => [\n            'effect' => 'outerShdw',\n            'blur' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 16200000 / self::ANGLE_MULTIPLIER,\n            'rotWithShape' => '0',\n        ],\n        9 => [\n            'effect' => 'outerShdw',\n            'blur' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 38100 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 13500000 / self::ANGLE_MULTIPLIER,\n            'algn' => 'br',\n            'rotWithShape' => '0',\n        ],\n        //INNER\n        10 => [\n            'effect' => 'innerShdw',\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 2700000 / self::ANGLE_MULTIPLIER,\n        ],\n        11 => [\n            'effect' => 'innerShdw',\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 5400000 / self::ANGLE_MULTIPLIER,\n        ],\n        12 => [\n            'effect' => 'innerShdw',\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 8100000 / self::ANGLE_MULTIPLIER,\n        ],\n        13 => [\n            'effect' => 'innerShdw',\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n        ],\n        14 => [\n            'effect' => 'innerShdw',\n            'blur' => 114300 / self::POINTS_WIDTH_MULTIPLIER,\n        ],\n        15 => [\n            'effect' => 'innerShdw',\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 10800000 / self::ANGLE_MULTIPLIER,\n        ],\n        16 => [\n            'effect' => 'innerShdw',\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 18900000 / self::ANGLE_MULTIPLIER,\n        ],\n        17 => [\n            'effect' => 'innerShdw',\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 16200000 / self::ANGLE_MULTIPLIER,\n        ],\n        18 => [\n            'effect' => 'innerShdw',\n            'blur' => 63500 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 50800 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 13500000 / self::ANGLE_MULTIPLIER,\n        ],\n        //perspective\n        19 => [\n            'effect' => 'outerShdw',\n            'blur' => 152400 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 317500 / self::POINTS_WIDTH_MULTIPLIER,\n            'size' => [\n                'sx' => 90000 / self::PERCENTAGE_MULTIPLIER,\n                'sy' => -19000 / self::PERCENTAGE_MULTIPLIER,\n            ],\n            'direction' => 5400000 / self::ANGLE_MULTIPLIER,\n            'rotWithShape' => '0',\n        ],\n        20 => [\n            'effect' => 'outerShdw',\n            'blur' => 76200 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 18900000 / self::ANGLE_MULTIPLIER,\n            'size' => [\n                'sy' => 23000 / self::PERCENTAGE_MULTIPLIER,\n                'kx' => -1200000 / self::ANGLE_MULTIPLIER,\n            ],\n            'algn' => 'bl',\n            'rotWithShape' => '0',\n        ],\n        21 => [\n            'effect' => 'outerShdw',\n            'blur' => 76200 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 13500000 / self::ANGLE_MULTIPLIER,\n            'size' => [\n                'sy' => 23000 / self::PERCENTAGE_MULTIPLIER,\n                'kx' => 1200000 / self::ANGLE_MULTIPLIER,\n            ],\n            'algn' => 'br',\n            'rotWithShape' => '0',\n        ],\n        22 => [\n            'effect' => 'outerShdw',\n            'blur' => 76200 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 12700 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 2700000 / self::ANGLE_MULTIPLIER,\n            'size' => [\n                'sy' => -23000 / self::PERCENTAGE_MULTIPLIER,\n                'kx' => -800400 / self::ANGLE_MULTIPLIER,\n            ],\n            'algn' => 'bl',\n            'rotWithShape' => '0',\n        ],\n        23 => [\n            'effect' => 'outerShdw',\n            'blur' => 76200 / self::POINTS_WIDTH_MULTIPLIER,\n            'distance' => 12700 / self::POINTS_WIDTH_MULTIPLIER,\n            'direction' => 8100000 / self::ANGLE_MULTIPLIER,\n            'size' => [\n                'sy' => -23000 / self::PERCENTAGE_MULTIPLIER,\n                'kx' => 800400 / self::ANGLE_MULTIPLIER,\n            ],\n            'algn' => 'br',\n            'rotWithShape' => '0',\n        ],\n    ];\n\n    /** @return mixed[] */\n    protected function getShadowPresetsMap(int $presetsOption): array\n    {\n        return self::PRESETS_OPTIONS[$presetsOption] ?? self::PRESETS_OPTIONS[0];\n    }\n\n    /**\n     * Get value of array element.\n     *\n     * @param mixed[] $properties\n     * @param array<mixed>|int|string $elements\n     */\n    protected function getArrayElementsValue(array $properties, array|int|string $elements): mixed\n    {\n        $reference = &$properties;\n        if (!is_array($elements)) {\n            return $reference[$elements];\n        }\n\n        foreach ($elements as $keys) {\n            $reference = &$reference[$keys]; //* @phpstan-ignore-line\n        }\n\n        return $reference;\n    }\n\n    /**\n     * Set Glow Properties.\n     */\n    public function setGlowProperties(float $size, ?string $colorValue = null, ?int $colorAlpha = null, ?string $colorType = null): void\n    {\n        $this\n            ->activateObject()\n            ->setGlowSize($size);\n        $this->glowColor->setColorPropertiesArray(\n            [\n                'value' => $colorValue,\n                'type' => $colorType,\n                'alpha' => $colorAlpha,\n            ]\n        );\n    }\n\n    /**\n     * Get Glow Property.\n     *\n     * @param mixed[]|string $property\n     *\n     * @return null|array<mixed>|float|int|string\n     */\n    public function getGlowProperty(array|string $property): null|array|float|int|string\n    {\n        $retVal = null;\n        if ($property === 'size') {\n            $retVal = $this->glowSize;\n        } elseif ($property === 'color') {\n            $retVal = [\n                'value' => $this->glowColor->getColorProperty('value'),\n                'type' => $this->glowColor->getColorProperty('type'),\n                'alpha' => $this->glowColor->getColorProperty('alpha'),\n            ];\n        } elseif (is_array($property) && count($property) >= 2 && $property[0] === 'color') {\n            /** @var string */\n            $temp = $property[1];\n            $retVal = $this->glowColor->getColorProperty($temp);\n        }\n\n        return $retVal;\n    }\n\n    /**\n     * Get Glow Color Property.\n     */\n    public function getGlowColor(string $propertyName): null|int|string\n    {\n        return $this->glowColor->getColorProperty($propertyName);\n    }\n\n    public function getGlowColorObject(): ChartColor\n    {\n        return $this->glowColor;\n    }\n\n    /**\n     * Get Glow Size.\n     */\n    public function getGlowSize(): ?float\n    {\n        return $this->glowSize;\n    }\n\n    /**\n     * Set Glow Size.\n     *\n     * @return $this\n     */\n    protected function setGlowSize(?float $size)\n    {\n        $this->glowSize = $size;\n\n        return $this;\n    }\n\n    /**\n     * Set Soft Edges Size.\n     */\n    public function setSoftEdges(?float $size): void\n    {\n        if ($size !== null) {\n            $this->activateObject();\n            $this->softEdges['size'] = $size;\n        }\n    }\n\n    /**\n     * Get Soft Edges Size.\n     */\n    public function getSoftEdgesSize(): ?float\n    {\n        return $this->softEdges['size'];\n    }\n\n    /** @param null|array{value?: ?string, alpha?: null|int|string, brightness?: null|int|string, type?: ?string}|float|string  $value */\n    public function setShadowProperty(string $propertyName, mixed $value): self\n    {\n        $this->activateObject();\n        if ($propertyName === 'color' && is_array($value)) {\n            /** @var array{value: ?string, alpha: null|int|string, brightness?: null|int|string, type: ?string} */\n            $valuex = $value;\n            $this->shadowColor->setColorPropertiesArray($valuex);\n        } else {\n            $this->shadowProperties[$propertyName] = $value;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set Shadow Properties.\n     */\n    public function setShadowProperties(int $presets, ?string $colorValue = null, ?string $colorType = null, null|float|int|string $colorAlpha = null, ?float $blur = null, ?int $angle = null, ?float $distance = null): void\n    {\n        $this->activateObject()->setShadowPresetsProperties((int) $presets);\n        if ($presets === 0) {\n            $this->shadowColor->setType(ChartColor::EXCEL_COLOR_TYPE_STANDARD);\n            $this->shadowColor->setValue('black');\n            $this->shadowColor->setAlpha(40);\n        }\n        if ($colorValue !== null) {\n            $this->shadowColor->setValue($colorValue);\n        }\n        if ($colorType !== null) {\n            $this->shadowColor->setType($colorType);\n        }\n        if (is_numeric($colorAlpha)) {\n            $this->shadowColor->setAlpha((int) $colorAlpha);\n        }\n        $this\n            ->setShadowBlur($blur)\n            ->setShadowAngle($angle)\n            ->setShadowDistance($distance);\n    }\n\n    /**\n     * Set Shadow Presets Properties.\n     *\n     * @return $this\n     */\n    protected function setShadowPresetsProperties(int $presets)\n    {\n        $this->shadowProperties['presets'] = $presets;\n        $this->setShadowPropertiesMapValues($this->getShadowPresetsMap($presets));\n\n        return $this;\n    }\n\n    protected const SHADOW_ARRAY_KEYS = ['size', 'color'];\n\n    /**\n     * Set Shadow Properties Values.\n     *\n     * @param mixed[] $propertiesMap\n     * @param null|mixed[] $reference\n     *\n     * @return $this\n     */\n    protected function setShadowPropertiesMapValues(array $propertiesMap, ?array &$reference = null)\n    {\n        $base_reference = $reference;\n        foreach ($propertiesMap as $property_key => $property_val) {\n            if (is_array($property_val)) {\n                if (in_array($property_key, self::SHADOW_ARRAY_KEYS, true)) {\n                    /** @var null|array<mixed> */\n                    $temp = &$this->shadowProperties[$property_key];\n                    $reference = &$temp;\n                    $this->setShadowPropertiesMapValues(\n                        $property_val,\n                        $reference\n                    );\n                }\n            } else {\n                if ($base_reference === null) {\n                    $this->shadowProperties[$property_key] = $property_val;\n                } else {\n                    $reference[$property_key] = $property_val;\n                }\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set Shadow Blur.\n     *\n     * @return $this\n     */\n    protected function setShadowBlur(?float $blur)\n    {\n        if ($blur !== null) {\n            $this->shadowProperties['blur'] = $blur;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set Shadow Angle.\n     *\n     * @return $this\n     */\n    protected function setShadowAngle(null|float|int|string $angle)\n    {\n        if (is_numeric($angle)) {\n            $this->shadowProperties['direction'] = $angle;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set Shadow Distance.\n     *\n     * @return $this\n     */\n    protected function setShadowDistance(?float $distance)\n    {\n        if ($distance !== null) {\n            $this->shadowProperties['distance'] = $distance;\n        }\n\n        return $this;\n    }\n\n    public function getShadowColorObject(): ChartColor\n    {\n        return $this->shadowColor;\n    }\n\n    /**\n     * Get Shadow Property.\n     *\n     * @param string|string[] $elements\n     *\n     * @return null|mixed[]|string\n     */\n    public function getShadowProperty($elements): array|string|null\n    {\n        if ($elements === 'color') {\n            return [\n                'value' => $this->shadowColor->getValue(),\n                'type' => $this->shadowColor->getType(),\n                'alpha' => $this->shadowColor->getAlpha(),\n            ];\n        }\n        $retVal = $this->getArrayElementsValue($this->shadowProperties, $elements);\n        if (is_scalar($retVal)) {\n            $retVal = (string) $retVal;\n        } elseif ($retVal !== null && !is_array($retVal)) {\n            // @codeCoverageIgnoreStart\n            throw new Exception('Unexpected value for shadowProperty');\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $retVal;\n    }\n\n    /** @return mixed[] */\n    public function getShadowArray(): array\n    {\n        $array = $this->shadowProperties;\n        if ($this->getShadowColorObject()->isUsable()) {\n            $array['color'] = $this->getShadowProperty('color');\n        }\n\n        return $array;\n    }\n\n    protected ChartColor $lineColor;\n\n    /** @var array{width: null|float|int|string, compound: ?string, dash: ?string, cap: ?string, join: ?string, arrow: array{head: array{type: ?string, size: null|int|string, w: ?string, len: ?string}, end: array{type: ?string, size: null|int|string, w: ?string, len: ?string}}} */\n    protected array $lineStyleProperties = [\n        'width' => null, //'9525',\n        'compound' => '', //self::LINE_STYLE_COMPOUND_SIMPLE,\n        'dash' => '', //self::LINE_STYLE_DASH_SOLID,\n        'cap' => '', //self::LINE_STYLE_CAP_FLAT,\n        'join' => '', //self::LINE_STYLE_JOIN_BEVEL,\n        'arrow' => [\n            'head' => [\n                'type' => '', //self::LINE_STYLE_ARROW_TYPE_NOARROW,\n                'size' => '', //self::LINE_STYLE_ARROW_SIZE_5,\n                'w' => '',\n                'len' => '',\n            ],\n            'end' => [\n                'type' => '', //self::LINE_STYLE_ARROW_TYPE_NOARROW,\n                'size' => '', //self::LINE_STYLE_ARROW_SIZE_8,\n                'w' => '',\n                'len' => '',\n            ],\n        ],\n    ];\n\n    public function copyLineStyles(self $otherProperties): void\n    {\n        $this->lineStyleProperties = $otherProperties->lineStyleProperties;\n        $this->lineColor = $otherProperties->lineColor;\n        $this->glowSize = $otherProperties->glowSize;\n        $this->glowColor = $otherProperties->glowColor;\n        $this->softEdges = $otherProperties->softEdges;\n        $this->shadowProperties = $otherProperties->shadowProperties;\n    }\n\n    public function getLineColor(): ChartColor\n    {\n        return $this->lineColor;\n    }\n\n    /**\n     * Set Line Color Properties.\n     */\n    public function setLineColorProperties(?string $value, ?int $alpha = null, ?string $colorType = null): void\n    {\n        $this->activateObject();\n        $this->lineColor->setColorPropertiesArray(\n            $this->setColorProperties(\n                $value,\n                $alpha,\n                $colorType\n            )\n        );\n    }\n\n    /**\n     * Get Line Color Property.\n     */\n    public function getLineColorProperty(string $propertyName): null|int|string\n    {\n        return $this->lineColor->getColorProperty($propertyName);\n    }\n\n    /**\n     * Set Line Style Properties.\n     */\n    public function setLineStyleProperties(\n        null|float|int|string $lineWidth = null,\n        ?string $compoundType = '',\n        ?string $dashType = '',\n        ?string $capType = '',\n        ?string $joinType = '',\n        ?string $headArrowType = '',\n        int $headArrowSize = 0,\n        ?string $endArrowType = '',\n        int $endArrowSize = 0,\n        ?string $headArrowWidth = '',\n        ?string $headArrowLength = '',\n        ?string $endArrowWidth = '',\n        ?string $endArrowLength = ''\n    ): void {\n        $this->activateObject();\n        if (is_numeric($lineWidth)) {\n            $this->lineStyleProperties['width'] = $lineWidth;\n        }\n        if ($compoundType !== '') {\n            $this->lineStyleProperties['compound'] = $compoundType;\n        }\n        if ($dashType !== '') {\n            $this->lineStyleProperties['dash'] = $dashType;\n        }\n        if ($capType !== '') {\n            $this->lineStyleProperties['cap'] = $capType;\n        }\n        if ($joinType !== '') {\n            $this->lineStyleProperties['join'] = $joinType;\n        }\n        if ($headArrowType !== '') {\n            $this->lineStyleProperties['arrow']['head']['type'] = $headArrowType;\n        }\n        if (isset(self::ARROW_SIZES[$headArrowSize])) {\n            $this->lineStyleProperties['arrow']['head']['size'] = $headArrowSize;\n            $this->lineStyleProperties['arrow']['head']['w'] = self::ARROW_SIZES[$headArrowSize]['w'];\n            $this->lineStyleProperties['arrow']['head']['len'] = self::ARROW_SIZES[$headArrowSize]['len'];\n        }\n        if ($endArrowType !== '') {\n            $this->lineStyleProperties['arrow']['end']['type'] = $endArrowType;\n        }\n        if (isset(self::ARROW_SIZES[$endArrowSize])) {\n            $this->lineStyleProperties['arrow']['end']['size'] = $endArrowSize;\n            $this->lineStyleProperties['arrow']['end']['w'] = self::ARROW_SIZES[$endArrowSize]['w'];\n            $this->lineStyleProperties['arrow']['end']['len'] = self::ARROW_SIZES[$endArrowSize]['len'];\n        }\n        if ($headArrowWidth !== '') {\n            $this->lineStyleProperties['arrow']['head']['w'] = $headArrowWidth;\n        }\n        if ($headArrowLength !== '') {\n            $this->lineStyleProperties['arrow']['head']['len'] = $headArrowLength;\n        }\n        if ($endArrowWidth !== '') {\n            $this->lineStyleProperties['arrow']['end']['w'] = $endArrowWidth;\n        }\n        if ($endArrowLength !== '') {\n            $this->lineStyleProperties['arrow']['end']['len'] = $endArrowLength;\n        }\n    }\n\n    /** @return mixed[] */\n    public function getLineStyleArray(): array\n    {\n        return $this->lineStyleProperties;\n    }\n\n    /** @param mixed[] $lineStyleProperties */\n    public function setLineStyleArray(array $lineStyleProperties = []): self\n    {\n        /** @var array{width?: ?string, compound?: string, dash?: string, cap?: string, join?: string, arrow?: array{head?: array{type?: string, size?: int, w?: string, len?: string}, end?: array{type?: string, size?: int, w?: string, len?: string}}} $lineStyleProperties */\n        $this->activateObject();\n        $this->lineStyleProperties['width'] = $lineStyleProperties['width'] ?? null;\n        $this->lineStyleProperties['compound'] = $lineStyleProperties['compound'] ?? '';\n        $this->lineStyleProperties['dash'] = $lineStyleProperties['dash'] ?? '';\n        $this->lineStyleProperties['cap'] = $lineStyleProperties['cap'] ?? '';\n        $this->lineStyleProperties['join'] = $lineStyleProperties['join'] ?? '';\n        $this->lineStyleProperties['arrow']['head']['type'] = $lineStyleProperties['arrow']['head']['type'] ?? '';\n        $this->lineStyleProperties['arrow']['head']['size'] = $lineStyleProperties['arrow']['head']['size'] ?? '';\n        $this->lineStyleProperties['arrow']['head']['w'] = $lineStyleProperties['arrow']['head']['w'] ?? '';\n        $this->lineStyleProperties['arrow']['head']['len'] = $lineStyleProperties['arrow']['head']['len'] ?? '';\n        $this->lineStyleProperties['arrow']['end']['type'] = $lineStyleProperties['arrow']['end']['type'] ?? '';\n        $this->lineStyleProperties['arrow']['end']['size'] = $lineStyleProperties['arrow']['end']['size'] ?? '';\n        $this->lineStyleProperties['arrow']['end']['w'] = $lineStyleProperties['arrow']['end']['w'] ?? '';\n        $this->lineStyleProperties['arrow']['end']['len'] = $lineStyleProperties['arrow']['end']['len'] ?? '';\n\n        return $this;\n    }\n\n    public function setLineStyleProperty(string $propertyName, mixed $value): self\n    {\n        $this->activateObject();\n        $this->lineStyleProperties[$propertyName] = $value; //* @phpstan-ignore-line\n\n        return $this;\n    }\n\n    /**\n     * Get Line Style Property.\n     *\n     * @param array<mixed>|string $elements\n     */\n    public function getLineStyleProperty(array|string $elements): ?string\n    {\n        $retVal = $this->getArrayElementsValue($this->lineStyleProperties, $elements);\n        if (is_scalar($retVal)) {\n            $retVal = (string) $retVal;\n        } elseif ($retVal !== null) {\n            // @codeCoverageIgnoreStart\n            throw new Exception('Unexpected value for lineStyleProperty');\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $retVal;\n    }\n\n    protected const ARROW_SIZES = [\n        1 => ['w' => 'sm', 'len' => 'sm'],\n        2 => ['w' => 'sm', 'len' => 'med'],\n        3 => ['w' => 'sm', 'len' => 'lg'],\n        4 => ['w' => 'med', 'len' => 'sm'],\n        5 => ['w' => 'med', 'len' => 'med'],\n        6 => ['w' => 'med', 'len' => 'lg'],\n        7 => ['w' => 'lg', 'len' => 'sm'],\n        8 => ['w' => 'lg', 'len' => 'med'],\n        9 => ['w' => 'lg', 'len' => 'lg'],\n    ];\n\n    /**\n     * Get Line Style Arrow Size.\n     */\n    protected function getLineStyleArrowSize(int $arraySelector, string $arrayKaySelector): string\n    {\n        return self::ARROW_SIZES[$arraySelector][$arrayKaySelector] ?? '';\n    }\n\n    /**\n     * Get Line Style Arrow Parameters.\n     */\n    public function getLineStyleArrowParameters(string $arrowSelector, string $propertySelector): string\n    {\n        return $this->getLineStyleArrowSize((int) $this->lineStyleProperties['arrow'][$arrowSelector]['size'], $propertySelector);\n    }\n\n    /**\n     * Get Line Style Arrow Width.\n     */\n    public function getLineStyleArrowWidth(string $arrow): ?string\n    {\n        return $this->getLineStyleProperty(['arrow', $arrow, 'w']);\n    }\n\n    /**\n     * Get Line Style Arrow Excel Length.\n     */\n    public function getLineStyleArrowLength(string $arrow): ?string\n    {\n        return $this->getLineStyleProperty(['arrow', $arrow, 'len']);\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $this->lineColor = clone $this->lineColor;\n        $this->glowColor = clone $this->glowColor;\n        $this->shadowColor = clone $this->shadowColor;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Renderer/IRenderer.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart\\Renderer;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\n\ninterface IRenderer\n{\n    /**\n     * IRenderer constructor.\n     */\n    public function __construct(Chart $chart);\n\n    /**\n     * Render the chart to given file (or stream).\n     *\n     * @param ?string $filename Name of the file render to\n     *\n     * @return bool true on success\n     */\n    public function render(?string $filename): bool;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Renderer/JpGraph.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart\\Renderer;\n\n/**\n * Jpgraph is not officially maintained in Composer, so the version there\n * could be out of date. For that reason, all unit test requiring Jpgraph\n * are skipped. So, do not measure code coverage for this class till that\n * is fixed.\n *\n * This implementation uses abandoned package\n * https://packagist.org/packages/jpgraph/jpgraph\n *\n * @codeCoverageIgnore\n */\nclass JpGraph extends JpGraphRendererBase\n{\n    protected static function init(): void\n    {\n        static $loaded = false;\n        if ($loaded) {\n            return;\n        }\n\n        // JpGraph is no longer included with distribution, but user may install it.\n        // So Scrutinizer's complaint that it can't find it is reasonable, but unfixable.\n        \\JpGraph\\JpGraph::load();\n        \\JpGraph\\JpGraph::module('bar');\n        \\JpGraph\\JpGraph::module('contour');\n        \\JpGraph\\JpGraph::module('line');\n        \\JpGraph\\JpGraph::module('pie');\n        \\JpGraph\\JpGraph::module('pie3d');\n        \\JpGraph\\JpGraph::module('radar');\n        \\JpGraph\\JpGraph::module('regstat');\n        \\JpGraph\\JpGraph::module('scatter');\n        \\JpGraph\\JpGraph::module('stock');\n\n        $loaded = true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart\\Renderer;\n\nuse AccBarPlot;\nuse AccLinePlot;\nuse BarPlot;\nuse ContourPlot;\nuse Graph;\nuse GroupBarPlot;\nuse LinePlot;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PieGraph;\nuse PiePlot;\nuse PiePlot3D;\nuse PiePlotC;\nuse RadarGraph;\nuse RadarPlot;\nuse ScatterPlot;\nuse Spline;\nuse StockPlot;\n\n/**\n * Base class for different Jpgraph implementations as charts renderer.\n */\nabstract class JpGraphRendererBase implements IRenderer\n{\n    private const DEFAULT_WIDTH = 640.0;\n\n    private const DEFAULT_HEIGHT = 480.0;\n\n    private static $colourSet = [\n        'mediumpurple1', 'palegreen3', 'gold1', 'cadetblue1',\n        'darkmagenta', 'coral', 'dodgerblue3', 'eggplant',\n        'mediumblue', 'magenta', 'sandybrown', 'cyan',\n        'firebrick1', 'forestgreen', 'deeppink4', 'darkolivegreen',\n        'goldenrod2',\n    ];\n\n    private static array $markSet;\n\n    private Chart $chart;\n\n    private $graph;\n\n    private static $plotColour = 0;\n\n    private static $plotMark = 0;\n\n    /**\n     * Create a new jpgraph.\n     */\n    public function __construct(Chart $chart)\n    {\n        static::init();\n        $this->graph = null;\n        $this->chart = $chart;\n\n        self::$markSet = [\n            'diamond' => MARK_DIAMOND,\n            'square' => MARK_SQUARE,\n            'triangle' => MARK_UTRIANGLE,\n            'x' => MARK_X,\n            'star' => MARK_STAR,\n            'dot' => MARK_FILLEDCIRCLE,\n            'dash' => MARK_DTRIANGLE,\n            'circle' => MARK_CIRCLE,\n            'plus' => MARK_CROSS,\n        ];\n    }\n\n    private function getGraphWidth(): float\n    {\n        return $this->chart->getRenderedWidth() ?? self::DEFAULT_WIDTH;\n    }\n\n    private function getGraphHeight(): float\n    {\n        return $this->chart->getRenderedHeight() ?? self::DEFAULT_HEIGHT;\n    }\n\n    /**\n     * This method should be overridden in descendants to do real JpGraph library initialization.\n     */\n    abstract protected static function init(): void;\n\n    private function formatPointMarker($seriesPlot, $markerID)\n    {\n        $plotMarkKeys = array_keys(self::$markSet);\n        if ($markerID === null) {\n            //    Use default plot marker (next marker in the series)\n            self::$plotMark %= count(self::$markSet);\n            $seriesPlot->mark->SetType(self::$markSet[$plotMarkKeys[self::$plotMark++]]);\n        } elseif ($markerID !== 'none') {\n            //    Use specified plot marker (if it exists)\n            if (isset(self::$markSet[$markerID])) {\n                $seriesPlot->mark->SetType(self::$markSet[$markerID]);\n            } else {\n                //    If the specified plot marker doesn't exist, use default plot marker (next marker in the series)\n                self::$plotMark %= count(self::$markSet);\n                $seriesPlot->mark->SetType(self::$markSet[$plotMarkKeys[self::$plotMark++]]);\n            }\n        } else {\n            //    Hide plot marker\n            $seriesPlot->mark->Hide();\n        }\n        $seriesPlot->mark->SetColor(self::$colourSet[self::$plotColour]);\n        $seriesPlot->mark->SetFillColor(self::$colourSet[self::$plotColour]);\n        $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]);\n\n        return $seriesPlot;\n    }\n\n    private function formatDataSetLabels(int $groupID, array $datasetLabels, $rotation = '')\n    {\n        $datasetLabelFormatCode = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getFormatCode() ?? '';\n        //    Retrieve any label formatting code\n        $datasetLabelFormatCode = stripslashes($datasetLabelFormatCode);\n\n        $testCurrentIndex = 0;\n        foreach ($datasetLabels as $i => $datasetLabel) {\n            if (is_array($datasetLabel)) {\n                if ($rotation == 'bar') {\n                    $datasetLabels[$i] = implode(' ', $datasetLabel);\n                } else {\n                    $datasetLabel = array_reverse($datasetLabel);\n                    $datasetLabels[$i] = implode(\"\\n\", $datasetLabel);\n                }\n            } else {\n                //    Format labels according to any formatting code\n                if ($datasetLabelFormatCode !== null) {\n                    $datasetLabels[$i] = NumberFormat::toFormattedString($datasetLabel, $datasetLabelFormatCode);\n                }\n            }\n            ++$testCurrentIndex;\n        }\n\n        return $datasetLabels;\n    }\n\n    private function percentageSumCalculation(int $groupID, $seriesCount)\n    {\n        $sumValues = [];\n        //    Adjust our values to a percentage value across all series in the group\n        for ($i = 0; $i < $seriesCount; ++$i) {\n            if ($i == 0) {\n                $sumValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();\n            } else {\n                $nextValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();\n                foreach ($nextValues as $k => $value) {\n                    if (isset($sumValues[$k])) {\n                        $sumValues[$k] += $value;\n                    } else {\n                        $sumValues[$k] = $value;\n                    }\n                }\n            }\n        }\n\n        return $sumValues;\n    }\n\n    private function percentageAdjustValues(array $dataValues, array $sumValues)\n    {\n        foreach ($dataValues as $k => $dataValue) {\n            $dataValues[$k] = $dataValue / $sumValues[$k] * 100;\n        }\n\n        return $dataValues;\n    }\n\n    private function getCaption($captionElement)\n    {\n        //    Read any caption\n        $caption = ($captionElement !== null) ? $captionElement->getCaption() : null;\n        //    Test if we have a title caption to display\n        if ($caption !== null) {\n            //    If we do, it could be a plain string or an array\n            if (is_array($caption)) {\n                //    Implode an array to a plain string\n                $caption = implode('', $caption);\n            }\n        }\n\n        return $caption;\n    }\n\n    private function renderTitle(): void\n    {\n        $title = $this->getCaption($this->chart->getTitle());\n        if ($title !== null) {\n            $this->graph->title->Set($title);\n        }\n    }\n\n    private function renderLegend(): void\n    {\n        $legend = $this->chart->getLegend();\n        if ($legend !== null) {\n            $legendPosition = $legend->getPosition();\n            switch ($legendPosition) {\n                case 'r':\n                    $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); //    right\n                    $this->graph->legend->SetColumns(1);\n\n                    break;\n                case 'l':\n                    $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); //    left\n                    $this->graph->legend->SetColumns(1);\n\n                    break;\n                case 't':\n                    $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); //    top\n\n                    break;\n                case 'b':\n                    $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); //    bottom\n\n                    break;\n                default:\n                    $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); //    top-right\n                    $this->graph->legend->SetColumns(1);\n\n                    break;\n            }\n        } else {\n            $this->graph->legend->Hide();\n        }\n    }\n\n    private function renderCartesianPlotArea(string $type = 'textlin'): void\n    {\n        $this->graph = new Graph($this->getGraphWidth(), $this->getGraphHeight());\n        $this->graph->SetScale($type);\n\n        $this->renderTitle();\n\n        //    Rotate for bar rather than column chart\n        $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotDirection();\n        $reverse = $rotation == 'bar';\n\n        $xAxisLabel = $this->chart->getXAxisLabel();\n        if ($xAxisLabel !== null) {\n            $title = $this->getCaption($xAxisLabel);\n            if ($title !== null) {\n                $this->graph->xaxis->SetTitle($title, 'center');\n                $this->graph->xaxis->title->SetMargin(35);\n                if ($reverse) {\n                    $this->graph->xaxis->title->SetAngle(90);\n                    $this->graph->xaxis->title->SetMargin(90);\n                }\n            }\n        }\n\n        $yAxisLabel = $this->chart->getYAxisLabel();\n        if ($yAxisLabel !== null) {\n            $title = $this->getCaption($yAxisLabel);\n            if ($title !== null) {\n                $this->graph->yaxis->SetTitle($title, 'center');\n                if ($reverse) {\n                    $this->graph->yaxis->title->SetAngle(0);\n                    $this->graph->yaxis->title->SetMargin(-55);\n                }\n            }\n        }\n    }\n\n    private function renderPiePlotArea(): void\n    {\n        $this->graph = new PieGraph($this->getGraphWidth(), $this->getGraphHeight());\n\n        $this->renderTitle();\n    }\n\n    private function renderRadarPlotArea(): void\n    {\n        $this->graph = new RadarGraph($this->getGraphWidth(), $this->getGraphHeight());\n        $this->graph->SetScale('lin');\n\n        $this->renderTitle();\n    }\n\n    private function getDataLabel(int $groupId, int $index): mixed\n    {\n        $plotLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupId)->getPlotLabelByIndex($index);\n        if (!$plotLabel) {\n            return '';\n        }\n\n        return $plotLabel->getDataValue();\n    }\n\n    private function renderPlotLine(int $groupID, bool $filled = false, bool $combination = false): void\n    {\n        $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping();\n\n        $index = array_keys($this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotOrder())[0];\n        $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($index)->getPointCount();\n        if ($labelCount > 0) {\n            $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues();\n            $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels);\n            $this->graph->xaxis->SetTickLabels($datasetLabels);\n        }\n\n        $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();\n        $seriesPlots = [];\n        if ($grouping == 'percentStacked') {\n            $sumValues = $this->percentageSumCalculation($groupID, $seriesCount);\n        } else {\n            $sumValues = [];\n        }\n\n        //    Loop through each data series in turn\n        for ($i = 0; $i < $seriesCount; ++$i) {\n            $index = array_keys($this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotOrder())[$i];\n            $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($index)->getDataValues();\n            $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($index)->getPointMarker();\n\n            if ($grouping == 'percentStacked') {\n                $dataValues = $this->percentageAdjustValues($dataValues, $sumValues);\n            }\n\n            //    Fill in any missing values in the $dataValues array\n            $testCurrentIndex = 0;\n            foreach ($dataValues as $k => $dataValue) {\n                while ($k != $testCurrentIndex) {\n                    $dataValues[$testCurrentIndex] = null;\n                    ++$testCurrentIndex;\n                }\n                ++$testCurrentIndex;\n            }\n\n            $seriesPlot = new LinePlot($dataValues);\n            if ($combination) {\n                $seriesPlot->SetBarCenter();\n            }\n\n            if ($filled) {\n                $seriesPlot->SetFilled(true);\n                $seriesPlot->SetColor('black');\n                $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour++]);\n            } else {\n                //    Set the appropriate plot marker\n                $this->formatPointMarker($seriesPlot, $marker);\n            }\n\n            $seriesPlot->SetLegend($this->getDataLabel($groupID, $index));\n\n            $seriesPlots[] = $seriesPlot;\n        }\n\n        if ($grouping == 'standard') {\n            $groupPlot = $seriesPlots;\n        } else {\n            $groupPlot = new AccLinePlot($seriesPlots);\n        }\n        $this->graph->Add($groupPlot);\n    }\n\n    private function renderPlotBar(int $groupID, ?string $dimensions = '2d'): void\n    {\n        $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotDirection();\n        //    Rotate for bar rather than column chart\n        if (($groupID == 0) && ($rotation == 'bar')) {\n            $this->graph->Set90AndMargin();\n        }\n        $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping();\n\n        $index = array_keys($this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotOrder())[0];\n        $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($index)->getPointCount();\n        if ($labelCount > 0) {\n            $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues();\n            $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $rotation);\n            //    Rotate for bar rather than column chart\n            if ($rotation == 'bar') {\n                $datasetLabels = array_reverse($datasetLabels);\n                $this->graph->yaxis->SetPos('max');\n                $this->graph->yaxis->SetLabelAlign('center', 'top');\n                $this->graph->yaxis->SetLabelSide(SIDE_RIGHT);\n            }\n            $this->graph->xaxis->SetTickLabels($datasetLabels);\n        }\n\n        $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();\n        $seriesPlots = [];\n        if ($grouping == 'percentStacked') {\n            $sumValues = $this->percentageSumCalculation($groupID, $seriesCount);\n        } else {\n            $sumValues = [];\n        }\n\n        //    Loop through each data series in turn\n        for ($j = 0; $j < $seriesCount; ++$j) {\n            $index = array_keys($this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotOrder())[$j];\n            $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($index)->getDataValues();\n            if ($grouping == 'percentStacked') {\n                $dataValues = $this->percentageAdjustValues($dataValues, $sumValues);\n            }\n\n            //    Fill in any missing values in the $dataValues array\n            $testCurrentIndex = 0;\n            foreach ($dataValues as $k => $dataValue) {\n                while ($k != $testCurrentIndex) {\n                    $dataValues[$testCurrentIndex] = null;\n                    ++$testCurrentIndex;\n                }\n                ++$testCurrentIndex;\n            }\n\n            //    Reverse the $dataValues order for bar rather than column chart\n            if ($rotation == 'bar') {\n                $dataValues = array_reverse($dataValues);\n            }\n            $seriesPlot = new BarPlot($dataValues);\n            $seriesPlot->SetColor('black');\n            $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour++]);\n            if ($dimensions == '3d') {\n                $seriesPlot->SetShadow();\n            }\n\n            $seriesPlot->SetLegend($this->getDataLabel($groupID, $j));\n\n            $seriesPlots[] = $seriesPlot;\n        }\n        //    Reverse the plot order for bar rather than column chart\n        if (($rotation == 'bar') && ($grouping != 'percentStacked')) {\n            $seriesPlots = array_reverse($seriesPlots);\n        }\n\n        if ($grouping == 'clustered') {\n            $groupPlot = new GroupBarPlot($seriesPlots);\n        } elseif ($grouping == 'standard') {\n            $groupPlot = new GroupBarPlot($seriesPlots);\n        } else {\n            $groupPlot = new AccBarPlot($seriesPlots);\n            if ($dimensions == '3d') {\n                $groupPlot->SetShadow();\n            }\n        }\n\n        $this->graph->Add($groupPlot);\n    }\n\n    private function renderPlotScatter(int $groupID, bool $bubble): void\n    {\n        $scatterStyle = $bubbleSize = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle();\n\n        $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();\n\n        //    Loop through each data series in turn\n        for ($i = 0; $i < $seriesCount; ++$i) {\n            $plotCategoryByIndex = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i);\n            if ($plotCategoryByIndex === false) {\n                $plotCategoryByIndex = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0);\n            }\n            $dataValuesY = $plotCategoryByIndex->getDataValues();\n            $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();\n\n            $redoDataValuesY = true;\n            if ($bubble) {\n                if (!$bubbleSize) {\n                    $bubbleSize = '10';\n                }\n                $redoDataValuesY = false;\n                foreach ($dataValuesY as $dataValueY) {\n                    if (!is_int($dataValueY) && !is_float($dataValueY)) {\n                        $redoDataValuesY = true;\n\n                        break;\n                    }\n                }\n            }\n            if ($redoDataValuesY) {\n                foreach ($dataValuesY as $k => $dataValueY) {\n                    $dataValuesY[$k] = $k;\n                }\n            }\n\n            $seriesPlot = new ScatterPlot($dataValuesX, $dataValuesY);\n            if ($scatterStyle == 'lineMarker') {\n                $seriesPlot->SetLinkPoints();\n                $seriesPlot->link->SetColor(self::$colourSet[self::$plotColour]);\n            } elseif ($scatterStyle == 'smoothMarker') {\n                $spline = new Spline($dataValuesY, $dataValuesX);\n                [$splineDataY, $splineDataX] = $spline->Get(count($dataValuesX) * $this->getGraphWidth() / 20);\n                $lplot = new LinePlot($splineDataX, $splineDataY);\n                $lplot->SetColor(self::$colourSet[self::$plotColour]);\n\n                $this->graph->Add($lplot);\n            }\n\n            if ($bubble) {\n                $this->formatPointMarker($seriesPlot, 'dot');\n                $seriesPlot->mark->SetColor('black');\n                $seriesPlot->mark->SetSize($bubbleSize);\n            } else {\n                $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker();\n                $this->formatPointMarker($seriesPlot, $marker);\n            }\n            $seriesPlot->SetLegend($this->getDataLabel($groupID, $i));\n\n            $this->graph->Add($seriesPlot);\n        }\n    }\n\n    private function renderPlotRadar(int $groupID): void\n    {\n        $radarStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle();\n\n        $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();\n\n        //    Loop through each data series in turn\n        for ($i = 0; $i < $seriesCount; ++$i) {\n            $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues();\n            $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();\n            $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker();\n\n            $dataValues = [];\n            foreach ($dataValuesY as $k => $dataValueY) {\n                $dataValues[$k] = is_array($dataValueY) ? implode(' ', array_reverse($dataValueY)) : $dataValueY;\n            }\n            $tmp = array_shift($dataValues);\n            $dataValues[] = $tmp;\n            $tmp = array_shift($dataValuesX);\n            $dataValuesX[] = $tmp;\n\n            $this->graph->SetTitles(array_reverse($dataValues));\n\n            $seriesPlot = new RadarPlot(array_reverse($dataValuesX));\n\n            $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]);\n            if ($radarStyle == 'filled') {\n                $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour]);\n            }\n            $this->formatPointMarker($seriesPlot, $marker);\n            $seriesPlot->SetLegend($this->getDataLabel($groupID, $i));\n\n            $this->graph->Add($seriesPlot);\n        }\n    }\n\n    private function renderPlotContour(int $groupID): void\n    {\n        $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();\n\n        $dataValues = [];\n        //    Loop through each data series in turn\n        for ($i = 0; $i < $seriesCount; ++$i) {\n            $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();\n\n            $dataValues[$i] = $dataValuesX;\n        }\n        $seriesPlot = new ContourPlot($dataValues);\n\n        $this->graph->Add($seriesPlot);\n    }\n\n    private function renderPlotStock(int $groupID): void\n    {\n        $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();\n        $plotOrder = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotOrder();\n\n        $dataValues = [];\n        //    Loop through each data series in turn and build the plot arrays\n        foreach ($plotOrder as $i => $v) {\n            $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($v);\n            if ($dataValuesX === false) {\n                continue;\n            }\n            $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($v)->getDataValues();\n            foreach ($dataValuesX as $j => $dataValueX) {\n                $dataValues[$plotOrder[$i]][$j] = $dataValueX;\n            }\n        }\n        if (empty($dataValues)) {\n            return;\n        }\n\n        $dataValuesPlot = [];\n        // Flatten the plot arrays to a single dimensional array to work with jpgraph\n        $jMax = count($dataValues[0]);\n        for ($j = 0; $j < $jMax; ++$j) {\n            for ($i = 0; $i < $seriesCount; ++$i) {\n                $dataValuesPlot[] = $dataValues[$i][$j] ?? null;\n            }\n        }\n\n        // Set the x-axis labels\n        $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount();\n        if ($labelCount > 0) {\n            $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues();\n            $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels);\n            $this->graph->xaxis->SetTickLabels($datasetLabels);\n        }\n\n        $seriesPlot = new StockPlot($dataValuesPlot);\n        $seriesPlot->SetWidth(20);\n\n        $this->graph->Add($seriesPlot);\n    }\n\n    private function renderAreaChart($groupCount): void\n    {\n        $this->renderCartesianPlotArea();\n\n        for ($i = 0; $i < $groupCount; ++$i) {\n            $this->renderPlotLine($i, true, false);\n        }\n    }\n\n    private function renderLineChart($groupCount): void\n    {\n        $this->renderCartesianPlotArea();\n\n        for ($i = 0; $i < $groupCount; ++$i) {\n            $this->renderPlotLine($i, false, false);\n        }\n    }\n\n    private function renderBarChart($groupCount, ?string $dimensions = '2d'): void\n    {\n        $this->renderCartesianPlotArea();\n\n        for ($i = 0; $i < $groupCount; ++$i) {\n            $this->renderPlotBar($i, $dimensions);\n        }\n    }\n\n    private function renderScatterChart($groupCount): void\n    {\n        $this->renderCartesianPlotArea('linlin');\n\n        for ($i = 0; $i < $groupCount; ++$i) {\n            $this->renderPlotScatter($i, false);\n        }\n    }\n\n    private function renderBubbleChart($groupCount): void\n    {\n        $this->renderCartesianPlotArea('linlin');\n\n        for ($i = 0; $i < $groupCount; ++$i) {\n            $this->renderPlotScatter($i, true);\n        }\n    }\n\n    private function renderPieChart($groupCount, ?string $dimensions = '2d', bool $doughnut = false, bool $multiplePlots = false): void\n    {\n        $this->renderPiePlotArea();\n\n        $iLimit = ($multiplePlots) ? $groupCount : 1;\n        for ($groupID = 0; $groupID < $iLimit; ++$groupID) {\n            $exploded = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle();\n            $datasetLabels = [];\n            if ($groupID == 0) {\n                $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount();\n                if ($labelCount > 0) {\n                    $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues();\n                    $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels);\n                }\n            }\n\n            $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();\n            //    For pie charts, we only display the first series: doughnut charts generally display all series\n            $jLimit = ($multiplePlots) ? $seriesCount : 1;\n            //    Loop through each data series in turn\n            for ($j = 0; $j < $jLimit; ++$j) {\n                $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($j)->getDataValues();\n\n                //    Fill in any missing values in the $dataValues array\n                $testCurrentIndex = 0;\n                foreach ($dataValues as $k => $dataValue) {\n                    while ($k != $testCurrentIndex) {\n                        $dataValues[$testCurrentIndex] = null;\n                        ++$testCurrentIndex;\n                    }\n                    ++$testCurrentIndex;\n                }\n\n                if ($dimensions == '3d') {\n                    $seriesPlot = new PiePlot3D($dataValues);\n                } else {\n                    if ($doughnut) {\n                        $seriesPlot = new PiePlotC($dataValues);\n                    } else {\n                        $seriesPlot = new PiePlot($dataValues);\n                    }\n                }\n\n                if ($multiplePlots) {\n                    $seriesPlot->SetSize(($jLimit - $j) / ($jLimit * 4));\n                }\n\n                if ($doughnut && method_exists($seriesPlot, 'SetMidColor')) {\n                    $seriesPlot->SetMidColor('white');\n                }\n\n                $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]);\n                if (count($datasetLabels) > 0) {\n                    $seriesPlot->SetLabels(array_fill(0, count($datasetLabels), ''));\n                }\n                if ($dimensions != '3d') {\n                    $seriesPlot->SetGuideLines(false);\n                }\n                if ($j == 0) {\n                    if ($exploded) {\n                        $seriesPlot->ExplodeAll();\n                    }\n                    $seriesPlot->SetLegends($datasetLabels);\n                }\n\n                $this->graph->Add($seriesPlot);\n            }\n        }\n    }\n\n    private function renderRadarChart($groupCount): void\n    {\n        $this->renderRadarPlotArea();\n\n        for ($groupID = 0; $groupID < $groupCount; ++$groupID) {\n            $this->renderPlotRadar($groupID);\n        }\n    }\n\n    private function renderStockChart($groupCount): void\n    {\n        $this->renderCartesianPlotArea('intint');\n\n        for ($groupID = 0; $groupID < $groupCount; ++$groupID) {\n            $this->renderPlotStock($groupID);\n        }\n    }\n\n    private function renderContourChart($groupCount): void\n    {\n        $this->renderCartesianPlotArea('intint');\n\n        for ($i = 0; $i < $groupCount; ++$i) {\n            $this->renderPlotContour($i);\n        }\n    }\n\n    private function renderCombinationChart($groupCount, $outputDestination): bool\n    {\n        $this->renderCartesianPlotArea();\n\n        for ($i = 0; $i < $groupCount; ++$i) {\n            $dimensions = null;\n            $chartType = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType();\n            switch ($chartType) {\n                case 'area3DChart':\n                case 'areaChart':\n                    $this->renderPlotLine($i, true, true);\n\n                    break;\n                case 'bar3DChart':\n                    $dimensions = '3d';\n                    // no break\n                case 'barChart':\n                    $this->renderPlotBar($i, $dimensions);\n\n                    break;\n                case 'line3DChart':\n                case 'lineChart':\n                    $this->renderPlotLine($i, false, true);\n\n                    break;\n                case 'scatterChart':\n                    $this->renderPlotScatter($i, false);\n\n                    break;\n                case 'bubbleChart':\n                    $this->renderPlotScatter($i, true);\n\n                    break;\n                default:\n                    $this->graph = null;\n\n                    return false;\n            }\n        }\n\n        $this->renderLegend();\n\n        $this->graph->Stroke($outputDestination);\n\n        return true;\n    }\n\n    public function render(?string $outputDestination): bool\n    {\n        self::$plotColour = 0;\n\n        $groupCount = $this->chart->getPlotArea()->getPlotGroupCount();\n\n        $dimensions = null;\n        if ($groupCount == 1) {\n            $chartType = $this->chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType();\n        } else {\n            $chartTypes = [];\n            for ($i = 0; $i < $groupCount; ++$i) {\n                $chartTypes[] = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType();\n            }\n            $chartTypes = array_unique($chartTypes);\n            if (count($chartTypes) == 1) {\n                $chartType = array_pop($chartTypes);\n            } elseif (count($chartTypes) == 0) {\n                echo 'Chart is not yet implemented<br />';\n\n                return false;\n            } else {\n                return $this->renderCombinationChart($groupCount, $outputDestination);\n            }\n        }\n\n        switch ($chartType) {\n            case 'area3DChart':\n                $dimensions = '3d';\n                // no break\n            case 'areaChart':\n                $this->renderAreaChart($groupCount);\n\n                break;\n            case 'bar3DChart':\n                $dimensions = '3d';\n                // no break\n            case 'barChart':\n                $this->renderBarChart($groupCount, $dimensions);\n\n                break;\n            case 'line3DChart':\n                $dimensions = '3d';\n                // no break\n            case 'lineChart':\n                $this->renderLineChart($groupCount);\n\n                break;\n            case 'pie3DChart':\n                $dimensions = '3d';\n                // no break\n            case 'pieChart':\n                $this->renderPieChart($groupCount, $dimensions, false, false);\n\n                break;\n            case 'doughnut3DChart':\n                $dimensions = '3d';\n                // no break\n            case 'doughnutChart':\n                $this->renderPieChart($groupCount, $dimensions, true, true);\n\n                break;\n            case 'scatterChart':\n                $this->renderScatterChart($groupCount);\n\n                break;\n            case 'bubbleChart':\n                $this->renderBubbleChart($groupCount);\n\n                break;\n            case 'radarChart':\n                $this->renderRadarChart($groupCount);\n\n                break;\n            case 'surface3DChart':\n            case 'surfaceChart':\n                $this->renderContourChart($groupCount);\n\n                break;\n            case 'stockChart':\n                $this->renderStockChart($groupCount);\n\n                break;\n            default:\n                echo $chartType . ' is not yet implemented<br />';\n\n                return false;\n        }\n        $this->renderLegend();\n\n        $this->graph->Stroke($outputDestination);\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Renderer/MtJpGraphRenderer.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart\\Renderer;\n\nuse mitoteam\\jpgraph\\MtJpGraph;\n\n/**\n * Jpgraph is not officially maintained by Composer at packagist.org.\n *\n * This renderer implementation uses package\n * https://packagist.org/packages/mitoteam/jpgraph\n *\n * This package is up to date for June 2023 and has PHP 8.2 support.\n */\nclass MtJpGraphRenderer extends JpGraphRendererBase\n{\n    protected static function init(): void\n    {\n        static $loaded = false;\n        if ($loaded) {\n            return;\n        }\n\n        MtJpGraph::load([\n            'bar',\n            'contour',\n            'line',\n            'pie',\n            'pie3d',\n            'radar',\n            'regstat',\n            'scatter',\n            'stock',\n        ], true); // enable Extended mode\n\n        $loaded = true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt",
    "content": "ChartDirector\n\thttps://www.advsofteng.com/cdphp.html\n\nGraPHPite\n\thttp://graphpite.sourceforge.net/\n\nJpGraph\n\thttps://jpgraph.net/\n\tUsed composer packages:\n        https://packagist.org/packages/jpgraph/jpgraph (\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph)\n        https://packagist.org/packages/mitoteam/jpgraph (\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer)\n\nLibChart\n\thttps://naku.dohcrew.com/libchart/pages/introduction/\n\npChart\n\thttp://pchart.sourceforge.net/\n\nTeeChart\n\thttps://www.steema.com/\n\nPHPGraphLib\n    http://www.ebrueggeman.com/phpgraphlib\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/Title.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass Title\n{\n    public const TITLE_CELL_REFERENCE\n        = '/^(.*)!' // beginning of string, everything up to ! is match[1]\n        . '[$]([A-Z]{1,3})' // absolute column string match[2]\n        . '[$](\\d{1,7})$/i'; // absolute row string match[3]\n\n    /**\n     * Title Caption.\n     *\n     * @var array<RichText|string>|RichText|string\n     */\n    private array|RichText|string $caption;\n\n    /**\n     * Allow overlay of other elements?\n     */\n    private bool $overlay = true;\n\n    /**\n     * Title Layout.\n     */\n    private ?Layout $layout;\n\n    private string $cellReference = '';\n\n    private ?Font $font = null;\n\n    /**\n     * Create a new Title.\n     *\n     * @param array<RichText|string>|RichText|string $caption\n     */\n    public function __construct(array|RichText|string $caption = '', ?Layout $layout = null, bool $overlay = false)\n    {\n        $this->caption = $caption;\n        $this->layout = $layout;\n        $this->setOverlay($overlay);\n    }\n\n    /**\n     * Get caption.\n     *\n     * @return array<RichText|string>|RichText|string\n     */\n    public function getCaption(): array|RichText|string\n    {\n        return $this->caption;\n    }\n\n    public function getCaptionText(?Spreadsheet $spreadsheet = null): string\n    {\n        if ($spreadsheet !== null) {\n            $caption = $this->getCalculatedTitle($spreadsheet);\n            if ($caption !== null) {\n                return $caption;\n            }\n        }\n        $caption = $this->caption;\n        if (is_string($caption)) {\n            return $caption;\n        }\n        if ($caption instanceof RichText) {\n            return $caption->getPlainText();\n        }\n        $retVal = '';\n        foreach ($caption as $textx) {\n            /** @var RichText|string $text */\n            $text = $textx;\n            if ($text instanceof RichText) {\n                $retVal .= $text->getPlainText();\n            } else {\n                $retVal .= $text;\n            }\n        }\n\n        return $retVal;\n    }\n\n    /**\n     * Set caption.\n     *\n     * @param array<RichText|string>|RichText|string $caption\n     *\n     * @return $this\n     */\n    public function setCaption(array|RichText|string $caption): static\n    {\n        $this->caption = $caption;\n\n        return $this;\n    }\n\n    /**\n     * Get allow overlay of other elements?\n     */\n    public function getOverlay(): bool\n    {\n        return $this->overlay;\n    }\n\n    /**\n     * Set allow overlay of other elements?\n     */\n    public function setOverlay(bool $overlay): self\n    {\n        $this->overlay = $overlay;\n\n        return $this;\n    }\n\n    public function getLayout(): ?Layout\n    {\n        return $this->layout;\n    }\n\n    public function setCellReference(string $cellReference): self\n    {\n        $this->cellReference = $cellReference;\n\n        return $this;\n    }\n\n    public function getCellReference(): string\n    {\n        return $this->cellReference;\n    }\n\n    public function getCalculatedTitle(?Spreadsheet $spreadsheet): ?string\n    {\n        preg_match(self::TITLE_CELL_REFERENCE, $this->cellReference, $matches);\n        if (count($matches) === 0 || $spreadsheet === null) {\n            return null;\n        }\n        $sheetName = preg_replace(\"/^'(.*)'$/\", '$1', $matches[1]) ?? '';\n\n        return $spreadsheet->getSheetByName($sheetName)?->getCell($matches[2] . $matches[3])?->getFormattedValue();\n    }\n\n    public function getFont(): ?Font\n    {\n        return $this->font;\n    }\n\n    public function setFont(?Font $font): self\n    {\n        $this->font = $font;\n\n        return $this;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $this->layout = ($this->layout === null) ? null : clone $this->layout;\n        $this->font = ($this->font === null) ? null : clone $this->font;\n        if (is_array($this->caption)) {\n            $captions = [];\n            foreach ($this->caption as $caption) {\n                $captions[] = is_object($caption) ? (clone $caption) : $caption;\n            }\n            $this->caption = $captions;\n        } else {\n            $this->caption = is_object($this->caption) ? (clone $this->caption) : $this->caption;\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Chart/TrendLine.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Chart;\n\nclass TrendLine extends Properties\n{\n    const TRENDLINE_EXPONENTIAL = 'exp';\n    const TRENDLINE_LINEAR = 'linear';\n    const TRENDLINE_LOGARITHMIC = 'log';\n    const TRENDLINE_POLYNOMIAL = 'poly'; // + 'order'\n    const TRENDLINE_POWER = 'power';\n    const TRENDLINE_MOVING_AVG = 'movingAvg'; // + 'period'\n    const TRENDLINE_TYPES = [\n        self::TRENDLINE_EXPONENTIAL,\n        self::TRENDLINE_LINEAR,\n        self::TRENDLINE_LOGARITHMIC,\n        self::TRENDLINE_POLYNOMIAL,\n        self::TRENDLINE_POWER,\n        self::TRENDLINE_MOVING_AVG,\n    ];\n\n    private string $trendLineType = 'linear'; // TRENDLINE_LINEAR\n\n    private int $order = 2;\n\n    private int $period = 3;\n\n    private bool $dispRSqr = false;\n\n    private bool $dispEq = false;\n\n    private string $name = '';\n\n    private float $backward = 0.0;\n\n    private float $forward = 0.0;\n\n    private float $intercept = 0.0;\n\n    /**\n     * Create a new TrendLine object.\n     */\n    public function __construct(\n        string $trendLineType = '',\n        ?int $order = null,\n        ?int $period = null,\n        bool $dispRSqr = false,\n        bool $dispEq = false,\n        ?float $backward = null,\n        ?float $forward = null,\n        ?float $intercept = null,\n        ?string $name = null\n    ) {\n        parent::__construct();\n        $this->setTrendLineProperties(\n            $trendLineType,\n            $order,\n            $period,\n            $dispRSqr,\n            $dispEq,\n            $backward,\n            $forward,\n            $intercept,\n            $name\n        );\n    }\n\n    public function getTrendLineType(): string\n    {\n        return $this->trendLineType;\n    }\n\n    public function setTrendLineType(string $trendLineType): self\n    {\n        $this->trendLineType = $trendLineType;\n\n        return $this;\n    }\n\n    public function getOrder(): int\n    {\n        return $this->order;\n    }\n\n    public function setOrder(int $order): self\n    {\n        $this->order = $order;\n\n        return $this;\n    }\n\n    public function getPeriod(): int\n    {\n        return $this->period;\n    }\n\n    public function setPeriod(int $period): self\n    {\n        $this->period = $period;\n\n        return $this;\n    }\n\n    public function getDispRSqr(): bool\n    {\n        return $this->dispRSqr;\n    }\n\n    public function setDispRSqr(bool $dispRSqr): self\n    {\n        $this->dispRSqr = $dispRSqr;\n\n        return $this;\n    }\n\n    public function getDispEq(): bool\n    {\n        return $this->dispEq;\n    }\n\n    public function setDispEq(bool $dispEq): self\n    {\n        $this->dispEq = $dispEq;\n\n        return $this;\n    }\n\n    public function getName(): string\n    {\n        return $this->name;\n    }\n\n    public function setName(string $name): self\n    {\n        $this->name = $name;\n\n        return $this;\n    }\n\n    public function getBackward(): float\n    {\n        return $this->backward;\n    }\n\n    public function setBackward(float $backward): self\n    {\n        $this->backward = $backward;\n\n        return $this;\n    }\n\n    public function getForward(): float\n    {\n        return $this->forward;\n    }\n\n    public function setForward(float $forward): self\n    {\n        $this->forward = $forward;\n\n        return $this;\n    }\n\n    public function getIntercept(): float\n    {\n        return $this->intercept;\n    }\n\n    public function setIntercept(float $intercept): self\n    {\n        $this->intercept = $intercept;\n\n        return $this;\n    }\n\n    public function setTrendLineProperties(\n        ?string $trendLineType = null,\n        ?int $order = 0,\n        ?int $period = 0,\n        ?bool $dispRSqr = false,\n        ?bool $dispEq = false,\n        ?float $backward = null,\n        ?float $forward = null,\n        ?float $intercept = null,\n        ?string $name = null\n    ): self {\n        if (!empty($trendLineType)) {\n            $this->setTrendLineType($trendLineType);\n        }\n        if ($order !== null) {\n            $this->setOrder($order);\n        }\n        if ($period !== null) {\n            $this->setPeriod($period);\n        }\n        if ($dispRSqr !== null) {\n            $this->setDispRSqr($dispRSqr);\n        }\n        if ($dispEq !== null) {\n            $this->setDispEq($dispEq);\n        }\n        if ($backward !== null) {\n            $this->setBackward($backward);\n        }\n        if ($forward !== null) {\n            $this->setForward($forward);\n        }\n        if ($intercept !== null) {\n            $this->setIntercept($intercept);\n        }\n        if ($name !== null) {\n            $this->setName($name);\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Collection/Cells.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Collection;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Psr\\SimpleCache\\CacheInterface;\n\nclass Cells\n{\n    /** @deprecated 5.6.0 use AddressRange::MAX_COLUMN_INT */\n    protected const MAX_COLUMN_ID = AddressRange::MAX_COLUMN_INT;\n\n    private CacheInterface $cache;\n\n    /**\n     * Parent worksheet.\n     */\n    private ?Worksheet $parent;\n\n    /**\n     * The currently active Cell.\n     */\n    private ?Cell $currentCell = null;\n\n    /**\n     * Coordinate of the currently active Cell.\n     */\n    private ?string $currentCoordinate = null;\n\n    /**\n     * Flag indicating whether the currently active Cell requires saving.\n     */\n    private bool $currentCellIsDirty = false;\n\n    /**\n     * An index of existing cells. int pointer to the coordinate (0-base-indexed row * 16,384 + 1-base indexed column)\n     *    indexed by their coordinate.\n     *\n     * @var int[]\n     */\n    private array $index = [];\n\n    /**\n     * Flag to avoid sorting the index every time.\n     */\n    private bool $indexSorted = false;\n\n    /**\n     * Index keys cache to avoid recalculating on large arrays.\n     *\n     * @var null|string[]\n     */\n    private ?array $indexKeysCache = null;\n\n    /**\n     * Index values cache to avoid recalculating on large arrays.\n     *\n     * @var null|int[]\n     */\n    private ?array $indexValuesCache = null;\n\n    /**\n     * Prefix used to uniquely identify cache data for this worksheet.\n     */\n    private string $cachePrefix;\n\n    /**\n     * Initialise this new cell collection.\n     *\n     * @param Worksheet $parent The worksheet for this cell collection\n     */\n    public function __construct(Worksheet $parent, CacheInterface $cache)\n    {\n        // Set our parent worksheet.\n        // This is maintained here to facilitate re-attaching it to Cell objects when\n        // they are woken from a serialized state\n        $this->parent = $parent;\n        $this->cache = $cache;\n        $this->cachePrefix = $this->getUniqueID();\n    }\n\n    /**\n     * Return the parent worksheet for this cell collection.\n     */\n    public function getParent(): ?Worksheet\n    {\n        return $this->parent;\n    }\n\n    /**\n     * Whether the collection holds a cell for the given coordinate.\n     *\n     * @param string $cellCoordinate Coordinate of the cell to check\n     */\n    public function has(string $cellCoordinate): bool\n    {\n        return ($cellCoordinate === $this->currentCoordinate) || isset($this->index[$cellCoordinate]);\n    }\n\n    public function has2(string $cellCoordinate): bool\n    {\n        return isset($this->index[$cellCoordinate]);\n    }\n\n    /**\n     * Add or update a cell in the collection.\n     *\n     * @param Cell $cell Cell to update\n     */\n    public function update(Cell $cell): Cell\n    {\n        return $this->add($cell->getCoordinate(), $cell);\n    }\n\n    /**\n     * Delete a cell in cache identified by coordinate.\n     *\n     * @param string $cellCoordinate Coordinate of the cell to delete\n     */\n    public function delete(string $cellCoordinate): void\n    {\n        if ($cellCoordinate === $this->currentCoordinate && $this->currentCell !== null) {\n            $this->currentCell->detach();\n            $this->currentCoordinate = null;\n            $this->currentCell = null;\n            $this->currentCellIsDirty = false;\n        }\n\n        unset($this->index[$cellCoordinate]);\n\n        // Clear index caches\n        $this->indexKeysCache = null;\n        $this->indexValuesCache = null;\n\n        // Delete the entry from cache\n        $this->cache->delete($this->cachePrefix . $cellCoordinate);\n    }\n\n    /**\n     * Get a list of all cell coordinates currently held in the collection.\n     *\n     * @return string[]\n     */\n    public function getCoordinates(): array\n    {\n        // Build or rebuild index keys cache\n        if ($this->indexKeysCache === null) {\n            $this->indexKeysCache = array_keys($this->index);\n        }\n\n        return $this->indexKeysCache;\n    }\n\n    /**\n     * Get a sorted list of all cell coordinates currently held in the collection by row and column.\n     *\n     * @return string[]\n     */\n    public function getSortedCoordinates(): array\n    {\n        // Sort only when required\n        if (!$this->indexSorted) {\n            asort($this->index);\n            $this->indexSorted = true;\n            // Clear unsorted cache\n            $this->indexKeysCache = null;\n            $this->indexValuesCache = null;\n        }\n\n        // Build or rebuild index keys cache\n        if ($this->indexKeysCache === null) {\n            $this->indexKeysCache = array_keys($this->index);\n        }\n\n        return $this->indexKeysCache;\n    }\n\n    /**\n     * Get a sorted list of all cell coordinates currently held in the collection by index (16384*row+column).\n     *\n     * @return int[]\n     */\n    public function getSortedCoordinatesInt(): array\n    {\n        if (!$this->indexSorted) {\n            asort($this->index);\n            $this->indexSorted = true;\n            // Clear unsorted cache\n            $this->indexKeysCache = null;\n            $this->indexValuesCache = null;\n        }\n\n        if ($this->indexValuesCache === null) {\n            $this->indexValuesCache = array_values($this->index);\n        }\n\n        return $this->indexValuesCache;\n    }\n\n    /**\n     * Return the cell coordinate of the currently active cell object.\n     */\n    public function getCurrentCoordinate(): ?string\n    {\n        return $this->currentCoordinate;\n    }\n\n    /**\n     * Return the column coordinate of the currently active cell object.\n     */\n    public function getCurrentColumn(): string\n    {\n        $column = 0;\n        $row = '';\n        sscanf($this->currentCoordinate ?? '', '%[A-Z]%d', $column, $row);\n\n        return (string) $column;\n    }\n\n    /**\n     * Return the row coordinate of the currently active cell object.\n     */\n    public function getCurrentRow(): int\n    {\n        $column = 0;\n        $row = '';\n        sscanf($this->currentCoordinate ?? '', '%[A-Z]%d', $column, $row);\n\n        return (int) $row;\n    }\n\n    /**\n     * Get highest worksheet column and highest row that have cell records.\n     *\n     * @return array{row: int, column: string} Highest column name and highest row number\n     */\n    public function getHighestRowAndColumn(): array\n    {\n        // Lookup highest column and highest row\n        $maxRow = $maxColumn = 1;\n        foreach ($this->index as $coordinate) {\n            $row = (int) floor(($coordinate - 1) / AddressRange::MAX_COLUMN_INT) + 1;\n            $maxRow = ($maxRow > $row) ? $maxRow : $row;\n            $column = ($coordinate % AddressRange::MAX_COLUMN_INT) ?: AddressRange::MAX_COLUMN_INT;\n            $maxColumn = ($maxColumn > $column) ? $maxColumn : $column;\n        }\n\n        return [\n            'row' => $maxRow,\n            'column' => Coordinate::stringFromColumnIndex($maxColumn),\n        ];\n    }\n\n    /**\n     * Get highest worksheet column.\n     *\n     * @param null|int|string $row Return the highest column for the specified row,\n     *                    or the highest column of any row if no row number is passed\n     *\n     * @return string Highest column name\n     */\n    public function getHighestColumn($row = null): string\n    {\n        if ($row === null) {\n            return $this->getHighestRowAndColumn()['column'];\n        }\n\n        $row = (int) $row;\n        if ($row <= 0) {\n            throw new PhpSpreadsheetException('Row number must be a positive integer');\n        }\n\n        $maxColumn = 1;\n        $toRow = $row * AddressRange::MAX_COLUMN_INT;\n        $fromRow = --$row * AddressRange::MAX_COLUMN_INT;\n        foreach ($this->index as $coordinate) {\n            if ($coordinate < $fromRow || $coordinate >= $toRow) {\n                continue;\n            }\n            $column = ($coordinate % AddressRange::MAX_COLUMN_INT) ?: AddressRange::MAX_COLUMN_INT;\n            $maxColumn = max($column, $maxColumn);\n        }\n\n        return Coordinate::stringFromColumnIndex($maxColumn);\n    }\n\n    /**\n     * Get highest worksheet row.\n     *\n     * @param null|string $column Return the highest row for the specified column,\n     *                       or the highest row of any column if no column letter is passed\n     *\n     * @return int Highest row number\n     */\n    public function getHighestRow(?string $column = null): int\n    {\n        if ($column === null) {\n            return $this->getHighestRowAndColumn()['row'];\n        }\n\n        $maxRow = 1;\n        $columnIndex = Coordinate::columnIndexFromString($column);\n        foreach ($this->index as $coordinate) {\n            if ($coordinate % AddressRange::MAX_COLUMN_INT !== $columnIndex) {\n                continue;\n            }\n            $row = (int) floor($coordinate / AddressRange::MAX_COLUMN_INT) + 1;\n            $maxRow = ($maxRow > $row) ? $maxRow : $row;\n        }\n\n        return $maxRow;\n    }\n\n    /**\n     * Generate a unique ID for cache referencing.\n     *\n     * @return string Unique Reference\n     */\n    private function getUniqueID(): string\n    {\n        $cacheType = Settings::getCache();\n\n        return ($cacheType instanceof Memory\\SimpleCache1 || $cacheType instanceof Memory\\SimpleCache3)\n            ? random_bytes(7) . ':'\n            : uniqid('phpspreadsheet.', true) . '.';\n    }\n\n    /**\n     * Clone the cell collection.\n     */\n    public function cloneCellCollection(Worksheet $worksheet): static\n    {\n        $this->storeCurrentCell();\n        $newCollection = clone $this;\n\n        $newCollection->parent = $worksheet;\n        $newCollection->cachePrefix = $newCollection->getUniqueID();\n\n        foreach ($this->index as $key => $value) {\n            $newCollection->index[$key] = $value;\n            $stored = $newCollection->cache->set(\n                $newCollection->cachePrefix . $key,\n                clone $this->getCache($key)\n            );\n            if ($stored === false) {\n                $this->destructIfNeeded($newCollection, 'Failed to copy cells in cache');\n            }\n        }\n\n        // Clear index sorted flag and index caches\n        $newCollection->indexSorted = false;\n        $newCollection->indexKeysCache = null;\n        $newCollection->indexValuesCache = null;\n\n        return $newCollection;\n    }\n\n    /**\n     * Remove a row, deleting all cells in that row.\n     *\n     * @param int|string $row Row number to remove\n     */\n    public function removeRow($row): void\n    {\n        $this->storeCurrentCell();\n        $row = (int) $row;\n        if ($row <= 0) {\n            throw new PhpSpreadsheetException('Row number must be a positive integer');\n        }\n\n        $toRow = $row * AddressRange::MAX_COLUMN_INT;\n        $fromRow = --$row * AddressRange::MAX_COLUMN_INT;\n        foreach ($this->index as $coordinate) {\n            if ($coordinate >= $fromRow && $coordinate < $toRow) {\n                $row = (int) floor($coordinate / AddressRange::MAX_COLUMN_INT) + 1;\n                $column = Coordinate::stringFromColumnIndex($coordinate % AddressRange::MAX_COLUMN_INT);\n                $this->delete(\"{$column}{$row}\");\n            }\n        }\n    }\n\n    /**\n     * Remove a column, deleting all cells in that column.\n     *\n     * @param string $column Column ID to remove\n     */\n    public function removeColumn(string $column): void\n    {\n        $this->storeCurrentCell();\n\n        $columnIndex = Coordinate::columnIndexFromString($column);\n        foreach ($this->index as $coordinate) {\n            if ($coordinate % AddressRange::MAX_COLUMN_INT === $columnIndex) {\n                $row = (int) floor($coordinate / AddressRange::MAX_COLUMN_INT) + 1;\n                $column = Coordinate::stringFromColumnIndex($coordinate % AddressRange::MAX_COLUMN_INT);\n                $this->delete(\"{$column}{$row}\");\n            }\n        }\n    }\n\n    /**\n     * Store cell data in cache for the current cell object if it's \"dirty\",\n     * and the 'nullify' the current cell object.\n     */\n    private function storeCurrentCell(): void\n    {\n        if ($this->currentCellIsDirty && isset($this->currentCoordinate, $this->currentCell)) {\n            $this->currentCell->detach();\n\n            $stored = $this->cache->set($this->cachePrefix . $this->currentCoordinate, $this->currentCell);\n            if ($stored === false) {\n                $this->destructIfNeeded($this, \"Failed to store cell {$this->currentCoordinate} in cache\");\n            }\n            $this->currentCellIsDirty = false;\n        }\n\n        $this->currentCoordinate = null;\n        $this->currentCell = null;\n    }\n\n    private function destructIfNeeded(self $cells, string $message): void\n    {\n        $cells->__destruct();\n\n        throw new PhpSpreadsheetException($message);\n    }\n\n    /**\n     * Add or update a cell identified by its coordinate into the collection.\n     *\n     * @param string $cellCoordinate Coordinate of the cell to update\n     * @param Cell $cell Cell to update\n     */\n    public function add(string $cellCoordinate, Cell $cell): Cell\n    {\n        if ($cellCoordinate !== $this->currentCoordinate) {\n            $this->storeCurrentCell();\n        }\n        $column = 0;\n        $row = '';\n        sscanf($cellCoordinate, '%[A-Z]%d', $column, $row);\n        /** @var int $row */\n        $this->index[$cellCoordinate] = (--$row * AddressRange::MAX_COLUMN_INT) + Coordinate::columnIndexFromString((string) $column);\n\n        // Clear index sorted flag and index caches\n        $this->indexSorted = false;\n        $this->indexKeysCache = null;\n        $this->indexValuesCache = null;\n\n        $this->currentCoordinate = $cellCoordinate;\n        $this->currentCell = $cell;\n        $this->currentCellIsDirty = true;\n\n        return $cell;\n    }\n\n    /**\n     * Get cell at a specific coordinate.\n     *\n     * @param string $cellCoordinate Coordinate of the cell\n     *\n     * @return null|Cell Cell that was found, or null if not found\n     */\n    public function get(string $cellCoordinate): ?Cell\n    {\n        if ($cellCoordinate === $this->currentCoordinate) {\n            return $this->currentCell;\n        }\n        $this->storeCurrentCell();\n\n        // Return null if requested entry doesn't exist in collection\n        if ($this->has($cellCoordinate) === false) {\n            return null;\n        }\n\n        $cell = $this->getcache($cellCoordinate);\n\n        // Set current entry to the requested entry\n        $this->currentCoordinate = $cellCoordinate;\n        $this->currentCell = $cell;\n        // Re-attach this as the cell's parent\n        $this->currentCell->attach($this);\n\n        // Return requested entry\n        return $this->currentCell;\n    }\n\n    /**\n     * Clear the cell collection and disconnect from our parent.\n     */\n    public function unsetWorksheetCells(): void\n    {\n        if ($this->currentCell !== null) {\n            $this->currentCell->detach();\n            $this->currentCell = null;\n            $this->currentCoordinate = null;\n        }\n\n        // Flush the cache\n        $this->__destruct();\n\n        $this->index = [];\n\n        // Clear index sorted flag and index caches\n        $this->indexSorted = false;\n        $this->indexKeysCache = null;\n        $this->indexValuesCache = null;\n\n        // detach ourself from the worksheet, so that it can then delete this object successfully\n        $this->parent = null;\n    }\n\n    /**\n     * Destroy this cell collection.\n     */\n    public function __destruct()\n    {\n        $this->cache->deleteMultiple($this->getAllCacheKeys());\n        $this->parent = null;\n    }\n\n    /**\n     * Returns all known cache keys.\n     *\n     * @return iterable<string>\n     */\n    private function getAllCacheKeys(): iterable\n    {\n        foreach ($this->index as $coordinate => $value) {\n            yield $this->cachePrefix . $coordinate;\n        }\n    }\n\n    private function getCache(string $cellCoordinate): Cell\n    {\n        $cell = $this->cache->get($this->cachePrefix . $cellCoordinate);\n        if (!($cell instanceof Cell)) {\n            throw new PhpSpreadsheetException(\"Cell entry {$cellCoordinate} no longer exists in cache. This probably means that the cache was cleared by someone else.\");\n        }\n\n        return $cell;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Collection/CellsFactory.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Collection;\n\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nabstract class CellsFactory\n{\n    /**\n     * Initialise the cache storage.\n     *\n     * @param Worksheet $worksheet Enable cell caching for this worksheet\n     *\n     * */\n    public static function getInstance(Worksheet $worksheet): Cells\n    {\n        return new Cells($worksheet, Settings::getCache());\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Collection\\Memory;\n\nuse Psr\\SimpleCache\\CacheInterface;\n\n/**\n * This is the default implementation for in-memory cell collection.\n *\n * Alternative implementation should leverage off-memory, non-volatile storage\n * to reduce overall memory usage.\n *\n * Either SimpleCache1 or SimpleCache3, but not both, may be used.\n * For code coverage testing, it will always be SimpleCache3.\n *\n * @codeCoverageIgnore\n */\nclass SimpleCache1 implements CacheInterface\n{\n    /**\n     * @var array Cell Cache\n     */\n    private array $cache = [];\n\n    public function clear(): bool\n    {\n        $this->cache = [];\n\n        return true;\n    }\n\n    public function delete($key): bool\n    {\n        unset($this->cache[$key]);\n\n        return true;\n    }\n\n    public function deleteMultiple($keys): bool\n    {\n        foreach ($keys as $key) {\n            $this->delete($key);\n        }\n\n        return true;\n    }\n\n    public function get($key, $default = null): mixed\n    {\n        if ($this->has($key)) {\n            return $this->cache[$key];\n        }\n\n        return $default;\n    }\n\n    public function getMultiple($keys, $default = null): iterable\n    {\n        $results = [];\n        foreach ($keys as $key) {\n            $results[$key] = $this->get($key, $default);\n        }\n\n        return $results;\n    }\n\n    public function has($key): bool\n    {\n        return array_key_exists($key, $this->cache);\n    }\n\n    public function set($key, $value, $ttl = null): bool\n    {\n        $this->cache[$key] = $value;\n\n        return true;\n    }\n\n    public function setMultiple($values, $ttl = null): bool\n    {\n        foreach ($values as $key => $value) {\n            $this->set($key, $value);\n        }\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Collection\\Memory;\n\nuse DateInterval;\nuse Psr\\SimpleCache\\CacheInterface;\n\n/**\n * This is the default implementation for in-memory cell collection.\n *\n * Alternative implementation should leverage off-memory, non-volatile storage\n * to reduce overall memory usage.\n */\nclass SimpleCache3 implements CacheInterface\n{\n    private array $cache = [];\n\n    public function clear(): bool\n    {\n        $this->cache = [];\n\n        return true;\n    }\n\n    public function delete(string $key): bool\n    {\n        unset($this->cache[$key]);\n\n        return true;\n    }\n\n    public function deleteMultiple(iterable $keys): bool\n    {\n        foreach ($keys as $key) {\n            $this->delete($key);\n        }\n\n        return true;\n    }\n\n    public function get(string $key, mixed $default = null): mixed\n    {\n        if ($this->has($key)) {\n            return $this->cache[$key];\n        }\n\n        return $default;\n    }\n\n    public function getMultiple(iterable $keys, mixed $default = null): iterable\n    {\n        $results = [];\n        foreach ($keys as $key) {\n            $results[$key] = $this->get($key, $default);\n        }\n\n        return $results;\n    }\n\n    public function has(string $key): bool\n    {\n        return array_key_exists($key, $this->cache);\n    }\n\n    public function set(string $key, mixed $value, null|int|DateInterval $ttl = null): bool\n    {\n        $this->cache[$key] = $value;\n\n        return true;\n    }\n\n    public function setMultiple(iterable $values, null|int|DateInterval $ttl = null): bool\n    {\n        foreach ($values as $key => $value) {\n            $this->set($key, $value);\n        }\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Comment.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Size;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Drawing as SharedDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse Stringable;\n\nclass Comment implements IComparable, Stringable\n{\n    /**\n     * Author.\n     */\n    private string $author;\n\n    /**\n     * Rich text comment.\n     */\n    private RichText $text;\n\n    /**\n     * Comment width (CSS style, i.e. XXpx or YYpt).\n     */\n    private string $width = '96pt';\n\n    /**\n     * Left margin (CSS style, i.e. XXpx or YYpt).\n     */\n    private string $marginLeft = '59.25pt';\n\n    /**\n     * Top margin (CSS style, i.e. XXpx or YYpt).\n     */\n    private string $marginTop = '1.5pt';\n\n    /**\n     * Visible.\n     */\n    private bool $visible = false;\n\n    /**\n     * Comment height (CSS style, i.e. XXpx or YYpt).\n     */\n    private string $height = '55.5pt';\n\n    /**\n     * Comment fill color.\n     */\n    private Color $fillColor;\n\n    /**\n     * Alignment.\n     */\n    private string $alignment;\n\n    /**\n     * Background image in comment.\n     */\n    private Drawing $backgroundImage;\n\n    public const TEXTBOX_DIRECTION_RTL = 'rtl';\n    public const TEXTBOX_DIRECTION_LTR = 'ltr';\n    // MS uses 'auto' in xml but 'context' in UI\n    public const TEXTBOX_DIRECTION_AUTO = 'auto';\n    public const TEXTBOX_DIRECTION_CONTEXT = 'auto';\n\n    private string $textboxDirection = '';\n\n    /**\n     * Create a new Comment.\n     */\n    public function __construct()\n    {\n        // Initialise variables\n        $this->author = 'Author';\n        $this->text = new RichText();\n        $this->fillColor = new Color('FFFFFFE1');\n        $this->alignment = Alignment::HORIZONTAL_GENERAL;\n        $this->backgroundImage = new Drawing();\n    }\n\n    /**\n     * Get Author.\n     */\n    public function getAuthor(): string\n    {\n        return $this->author;\n    }\n\n    /**\n     * Set Author.\n     */\n    public function setAuthor(string $author): self\n    {\n        $this->author = $author;\n\n        return $this;\n    }\n\n    /**\n     * Get Rich text comment.\n     */\n    public function getText(): RichText\n    {\n        return $this->text;\n    }\n\n    /**\n     * Set Rich text comment.\n     */\n    public function setText(RichText $text): self\n    {\n        $this->text = $text;\n\n        return $this;\n    }\n\n    /**\n     * Get comment width (CSS style, i.e. XXpx or YYpt).\n     */\n    public function getWidth(): string\n    {\n        return $this->width;\n    }\n\n    /**\n     * Set comment width (CSS style, i.e. XXpx or YYpt). Default unit is pt.\n     */\n    public function setWidth(string $width): self\n    {\n        $width = new Size($width);\n        if ($width->valid()) {\n            $this->width = (string) $width;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get comment height (CSS style, i.e. XXpx or YYpt).\n     */\n    public function getHeight(): string\n    {\n        return $this->height;\n    }\n\n    /**\n     * Set comment height (CSS style, i.e. XXpx or YYpt). Default unit is pt.\n     */\n    public function setHeight(string $height): self\n    {\n        $height = new Size($height);\n        if ($height->valid()) {\n            $this->height = (string) $height;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get left margin (CSS style, i.e. XXpx or YYpt).\n     */\n    public function getMarginLeft(): string\n    {\n        return $this->marginLeft;\n    }\n\n    /**\n     * Set left margin (CSS style, i.e. XXpx or YYpt). Default unit is pt.\n     */\n    public function setMarginLeft(string $margin): self\n    {\n        $margin = new Size($margin);\n        if ($margin->valid()) {\n            $this->marginLeft = (string) $margin;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get top margin (CSS style, i.e. XXpx or YYpt).\n     */\n    public function getMarginTop(): string\n    {\n        return $this->marginTop;\n    }\n\n    /**\n     * Set top margin (CSS style, i.e. XXpx or YYpt). Default unit is pt.\n     */\n    public function setMarginTop(string $margin): self\n    {\n        $margin = new Size($margin);\n        if ($margin->valid()) {\n            $this->marginTop = (string) $margin;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Is the comment visible by default?\n     */\n    public function getVisible(): bool\n    {\n        return $this->visible;\n    }\n\n    /**\n     * Set comment default visibility.\n     */\n    public function setVisible(bool $visibility): self\n    {\n        $this->visible = $visibility;\n\n        return $this;\n    }\n\n    /**\n     * Set fill color.\n     */\n    public function setFillColor(Color $color): self\n    {\n        $this->fillColor = $color;\n\n        return $this;\n    }\n\n    /**\n     * Get fill color.\n     */\n    public function getFillColor(): Color\n    {\n        return $this->fillColor;\n    }\n\n    public function setAlignment(string $alignment): self\n    {\n        $this->alignment = $alignment;\n\n        return $this;\n    }\n\n    public function getAlignment(): string\n    {\n        return $this->alignment;\n    }\n\n    public function setTextboxDirection(string $textboxDirection): self\n    {\n        $this->textboxDirection = $textboxDirection;\n\n        return $this;\n    }\n\n    public function getTextboxDirection(): string\n    {\n        return $this->textboxDirection;\n    }\n\n    /**\n     * Get hash code.\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->author\n            . $this->text->getHashCode()\n            . $this->width\n            . $this->height\n            . $this->marginLeft\n            . $this->marginTop\n            . ($this->visible ? 1 : 0)\n            . $this->fillColor->getHashCode()\n            . $this->alignment\n            . $this->textboxDirection\n            . ($this->hasBackgroundImage() ? $this->backgroundImage->getHashCode() : '')\n            . __CLASS__\n        );\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                $this->$key = clone $value;\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n\n    /**\n     * Convert to string.\n     */\n    public function __toString(): string\n    {\n        return $this->text->getPlainText();\n    }\n\n    /**\n     * Check is background image exists.\n     */\n    public function hasBackgroundImage(): bool\n    {\n        $path = $this->backgroundImage->getPath();\n\n        if (empty($path)) {\n            return false;\n        }\n\n        return getimagesize($path) !== false;\n    }\n\n    /**\n     * Returns background image.\n     */\n    public function getBackgroundImage(): Drawing\n    {\n        return $this->backgroundImage;\n    }\n\n    /**\n     * Sets background image.\n     */\n    public function setBackgroundImage(Drawing $objDrawing): self\n    {\n        if (!array_key_exists($objDrawing->getType(), Drawing::IMAGE_TYPES_CONVERTION_MAP)) {\n            throw new PhpSpreadsheetException('Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n        $this->backgroundImage = $objDrawing;\n\n        return $this;\n    }\n\n    /**\n     * Sets size of comment as size of background image.\n     */\n    public function setSizeAsBackgroundImage(): self\n    {\n        if ($this->hasBackgroundImage()) {\n            $this->setWidth(SharedDrawing::pixelsToPoints($this->backgroundImage->getWidth()) . 'pt');\n            $this->setHeight(SharedDrawing::pixelsToPoints($this->backgroundImage->getHeight()) . 'pt');\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/DefinedName.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nabstract class DefinedName\n{\n    protected const REGEXP_IDENTIFY_FORMULA = '[^_\\p{N}\\p{L}:, \\$\\'!]';\n\n    /**\n     * Name.\n     */\n    protected string $name;\n\n    /**\n     * Worksheet on which the defined name can be resolved.\n     */\n    protected ?Worksheet $worksheet;\n\n    /**\n     * Value of the named object.\n     */\n    protected string $value;\n\n    /**\n     * Is the defined named local? (i.e. can only be used on $this->worksheet).\n     */\n    protected bool $localOnly;\n\n    /**\n     * Scope.\n     */\n    protected ?Worksheet $scope;\n\n    /**\n     * Whether this is a named range or a named formula.\n     */\n    protected bool $isFormula;\n\n    /**\n     * Create a new Defined Name.\n     */\n    public function __construct(\n        string $name,\n        ?Worksheet $worksheet = null,\n        ?string $value = null,\n        bool $localOnly = false,\n        ?Worksheet $scope = null\n    ) {\n        if ($worksheet === null) {\n            $worksheet = $scope;\n        }\n\n        // Set local members\n        $this->name = $name;\n        $this->worksheet = $worksheet;\n        $this->value = (string) $value;\n        $this->localOnly = $localOnly;\n        // If local only, then the scope will be set to worksheet unless a scope is explicitly set\n        $this->scope = ($localOnly === true) ? (($scope === null) ? $worksheet : $scope) : null;\n        // If the range string contains characters that aren't associated with the range definition (A-Z,1-9\n        //      for cell references, and $, or the range operators (colon comma or space), quotes and ! for\n        //      worksheet names\n        //  then this is treated as a named formula, and not a named range\n        $this->isFormula = self::testIfFormula($this->value);\n    }\n\n    public function __destruct()\n    {\n        $this->worksheet = null;\n        $this->scope = null;\n    }\n\n    /**\n     * Create a new defined name, either a range or a formula.\n     */\n    public static function createInstance(\n        string $name,\n        ?Worksheet $worksheet = null,\n        ?string $value = null,\n        bool $localOnly = false,\n        ?Worksheet $scope = null\n    ): self {\n        $value = (string) $value;\n        $isFormula = self::testIfFormula($value);\n        if ($isFormula) {\n            return new NamedFormula($name, $worksheet, $value, $localOnly, $scope);\n        }\n\n        return new NamedRange($name, $worksheet, $value, $localOnly, $scope);\n    }\n\n    public static function testIfFormula(string $value): bool\n    {\n        if (str_starts_with($value, '=')) {\n            $value = substr($value, 1);\n        }\n\n        if (is_numeric($value)) {\n            return true;\n        }\n\n        $segMatcher = false;\n        foreach (explode(\"'\", $value) as $subVal) {\n            //    Only test in alternate array entries (the non-quoted blocks)\n            $segMatcher = $segMatcher === false;\n            if (\n                $segMatcher\n                && (preg_match('/' . self::REGEXP_IDENTIFY_FORMULA . '/miu', $subVal))\n            ) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Get name.\n     */\n    public function getName(): string\n    {\n        return $this->name;\n    }\n\n    /**\n     * Set name.\n     */\n    public function setName(string $name): self\n    {\n        if (!empty($name)) {\n            // Old title\n            $oldTitle = $this->name;\n\n            // Re-attach\n            if ($this->worksheet !== null) {\n                $this->worksheet->getParentOrThrow()->removeNamedRange($this->name, $this->worksheet);\n            }\n            $this->name = $name;\n\n            if ($this->worksheet !== null) {\n                $this->worksheet->getParentOrThrow()->addDefinedName($this);\n            }\n\n            if ($this->worksheet !== null) {\n                // New title\n                $newTitle = $this->name;\n                ReferenceHelper::getInstance()->updateNamedFormulae($this->worksheet->getParentOrThrow(), $oldTitle, $newTitle);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get worksheet.\n     */\n    public function getWorksheet(): ?Worksheet\n    {\n        return $this->worksheet;\n    }\n\n    /**\n     * Set worksheet.\n     */\n    public function setWorksheet(?Worksheet $worksheet): self\n    {\n        $this->worksheet = $worksheet;\n\n        return $this;\n    }\n\n    /**\n     * Get range or formula value.\n     */\n    public function getValue(): string\n    {\n        return $this->value;\n    }\n\n    /**\n     * Set range or formula  value.\n     */\n    public function setValue(string $value): self\n    {\n        $this->value = $value;\n\n        return $this;\n    }\n\n    /**\n     * Get localOnly.\n     */\n    public function getLocalOnly(): bool\n    {\n        return $this->localOnly;\n    }\n\n    /**\n     * Set localOnly.\n     */\n    public function setLocalOnly(bool $localScope): self\n    {\n        $this->localOnly = $localScope;\n        $this->scope = $localScope ? $this->worksheet : null;\n\n        return $this;\n    }\n\n    /**\n     * Get scope.\n     */\n    public function getScope(): ?Worksheet\n    {\n        return $this->scope;\n    }\n\n    /**\n     * Set scope.\n     */\n    public function setScope(?Worksheet $worksheet): self\n    {\n        $this->scope = $worksheet;\n        $this->localOnly = $worksheet !== null;\n\n        return $this;\n    }\n\n    /**\n     * Identify whether this is a named range or a named formula.\n     */\n    public function isFormula(): bool\n    {\n        return $this->isFormula;\n    }\n\n    /**\n     * Resolve a named range to a regular cell range or formula.\n     */\n    public static function resolveName(string $definedName, Worksheet $worksheet, string $sheetName = ''): ?self\n    {\n        if ($sheetName === '') {\n            $worksheet2 = $worksheet;\n        } else {\n            $worksheet2 = $worksheet->getParentOrThrow()->getSheetByName($sheetName);\n            if ($worksheet2 === null) {\n                return null;\n            }\n        }\n\n        return $worksheet->getParentOrThrow()->getDefinedName($definedName, $worksheet2);\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                $this->$key = clone $value;\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Document/Properties.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Document;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\IntOrFloat;\n\nclass Properties\n{\n    /** constants */\n    public const PROPERTY_TYPE_BOOLEAN = 'b';\n    public const PROPERTY_TYPE_INTEGER = 'i';\n    public const PROPERTY_TYPE_FLOAT = 'f';\n    public const PROPERTY_TYPE_DATE = 'd';\n    public const PROPERTY_TYPE_STRING = 's';\n    public const PROPERTY_TYPE_UNKNOWN = 'u';\n\n    private const VALID_PROPERTY_TYPE_LIST = [\n        self::PROPERTY_TYPE_BOOLEAN,\n        self::PROPERTY_TYPE_INTEGER,\n        self::PROPERTY_TYPE_FLOAT,\n        self::PROPERTY_TYPE_DATE,\n        self::PROPERTY_TYPE_STRING,\n    ];\n\n    /**\n     * Creator.\n     */\n    private string $creator = 'Unknown Creator';\n\n    /**\n     * LastModifiedBy.\n     */\n    private string $lastModifiedBy;\n\n    /**\n     * Created.\n     */\n    private float|int $created;\n\n    /**\n     * Modified.\n     */\n    private float|int $modified;\n\n    /**\n     * Title.\n     */\n    private string $title = 'Untitled Spreadsheet';\n\n    /**\n     * Description.\n     */\n    private string $description = '';\n\n    /**\n     * Subject.\n     */\n    private string $subject = '';\n\n    /**\n     * Keywords.\n     */\n    private string $keywords = '';\n\n    /**\n     * Category.\n     */\n    private string $category = '';\n\n    /**\n     * Manager.\n     */\n    private string $manager = '';\n\n    /**\n     * Company.\n     */\n    private string $company = '';\n\n    /**\n     * Custom Properties.\n     *\n     * @var array{value: null|bool|float|int|string, type: string}[]\n     */\n    private array $customProperties = [];\n\n    private string $hyperlinkBase = '';\n\n    private string $viewport = '';\n\n    /**\n     * Create a new Document Properties instance.\n     */\n    public function __construct()\n    {\n        // Initialise values\n        $this->lastModifiedBy = $this->creator;\n        $this->created = self::intOrFloatTimestamp(null);\n        $this->modified = $this->created;\n    }\n\n    /**\n     * Get Creator.\n     */\n    public function getCreator(): string\n    {\n        return $this->creator;\n    }\n\n    /**\n     * Set Creator.\n     *\n     * @return $this\n     */\n    public function setCreator(string $creator): self\n    {\n        $this->creator = $creator;\n\n        return $this;\n    }\n\n    /**\n     * Get Last Modified By.\n     */\n    public function getLastModifiedBy(): string\n    {\n        return $this->lastModifiedBy;\n    }\n\n    /**\n     * Set Last Modified By.\n     *\n     * @return $this\n     */\n    public function setLastModifiedBy(string $modifiedBy): self\n    {\n        $this->lastModifiedBy = $modifiedBy;\n\n        return $this;\n    }\n\n    private static function intOrFloatTimestamp(null|bool|float|int|string $timestamp): float|int\n    {\n        if ($timestamp === null || is_bool($timestamp)) {\n            $timestamp = (float) (new DateTime())->format('U');\n        } elseif (is_string($timestamp)) {\n            if (is_numeric($timestamp)) {\n                $timestamp = (float) $timestamp;\n            } else {\n                $timestamp = (string) preg_replace('/[.][0-9]*$/', '', $timestamp);\n                $timestamp = (string) preg_replace('/^(\\d{4})- (\\d)/', '$1-0$2', $timestamp);\n                $timestamp = (string) preg_replace('/^(\\d{4}-\\d{2})- (\\d)/', '$1-0$2', $timestamp);\n                $timestamp = (float) (new DateTime($timestamp))->format('U');\n            }\n        }\n\n        return IntOrFloat::evaluate($timestamp);\n    }\n\n    /**\n     * Get Created.\n     */\n    public function getCreated(): float|int\n    {\n        return $this->created;\n    }\n\n    /**\n     * Set Created.\n     *\n     * @return $this\n     */\n    public function setCreated(null|float|int|string $timestamp): self\n    {\n        $this->created = self::intOrFloatTimestamp($timestamp);\n\n        return $this;\n    }\n\n    /**\n     * Get Modified.\n     */\n    public function getModified(): float|int\n    {\n        return $this->modified;\n    }\n\n    /**\n     * Set Modified.\n     *\n     * @return $this\n     */\n    public function setModified(null|float|int|string $timestamp): self\n    {\n        $this->modified = self::intOrFloatTimestamp($timestamp);\n\n        return $this;\n    }\n\n    /**\n     * Get Title.\n     */\n    public function getTitle(): string\n    {\n        return $this->title;\n    }\n\n    /**\n     * Set Title.\n     *\n     * @return $this\n     */\n    public function setTitle(string $title): self\n    {\n        $this->title = $title;\n\n        return $this;\n    }\n\n    /**\n     * Get Description.\n     */\n    public function getDescription(): string\n    {\n        return $this->description;\n    }\n\n    /**\n     * Set Description.\n     *\n     * @return $this\n     */\n    public function setDescription(string $description): self\n    {\n        $this->description = $description;\n\n        return $this;\n    }\n\n    /**\n     * Get Subject.\n     */\n    public function getSubject(): string\n    {\n        return $this->subject;\n    }\n\n    /**\n     * Set Subject.\n     *\n     * @return $this\n     */\n    public function setSubject(string $subject): self\n    {\n        $this->subject = $subject;\n\n        return $this;\n    }\n\n    /**\n     * Get Keywords.\n     */\n    public function getKeywords(): string\n    {\n        return $this->keywords;\n    }\n\n    /**\n     * Set Keywords.\n     *\n     * @return $this\n     */\n    public function setKeywords(string $keywords): self\n    {\n        $this->keywords = $keywords;\n\n        return $this;\n    }\n\n    /**\n     * Get Category.\n     */\n    public function getCategory(): string\n    {\n        return $this->category;\n    }\n\n    /**\n     * Set Category.\n     *\n     * @return $this\n     */\n    public function setCategory(string $category): self\n    {\n        $this->category = $category;\n\n        return $this;\n    }\n\n    /**\n     * Get Company.\n     */\n    public function getCompany(): string\n    {\n        return $this->company;\n    }\n\n    /**\n     * Set Company.\n     *\n     * @return $this\n     */\n    public function setCompany(string $company): self\n    {\n        $this->company = $company;\n\n        return $this;\n    }\n\n    /**\n     * Get Manager.\n     */\n    public function getManager(): string\n    {\n        return $this->manager;\n    }\n\n    /**\n     * Set Manager.\n     *\n     * @return $this\n     */\n    public function setManager(string $manager): self\n    {\n        $this->manager = $manager;\n\n        return $this;\n    }\n\n    /**\n     * Get a List of Custom Property Names.\n     *\n     * @return string[]\n     */\n    public function getCustomProperties(): array\n    {\n        return array_keys($this->customProperties);\n    }\n\n    /**\n     * Check if a Custom Property is defined.\n     */\n    public function isCustomPropertySet(string $propertyName): bool\n    {\n        return array_key_exists($propertyName, $this->customProperties);\n    }\n\n    /**\n     * Get a Custom Property Value.\n     */\n    public function getCustomPropertyValue(string $propertyName): bool|int|float|string|null\n    {\n        if (isset($this->customProperties[$propertyName])) {\n            return $this->customProperties[$propertyName]['value'];\n        }\n\n        return null;\n    }\n\n    /**\n     * Get a Custom Property Type.\n     */\n    public function getCustomPropertyType(string $propertyName): ?string\n    {\n        return $this->customProperties[$propertyName]['type'] ?? null;\n    }\n\n    private function identifyPropertyType(bool|int|float|string|null $propertyValue): string\n    {\n        if (is_float($propertyValue)) {\n            return self::PROPERTY_TYPE_FLOAT;\n        }\n        if (is_int($propertyValue)) {\n            return self::PROPERTY_TYPE_INTEGER;\n        }\n        if (is_bool($propertyValue)) {\n            return self::PROPERTY_TYPE_BOOLEAN;\n        }\n\n        return self::PROPERTY_TYPE_STRING;\n    }\n\n    /**\n     * Set a Custom Property.\n     *\n     * @param ?string $propertyType see `self::VALID_PROPERTY_TYPE_LIST`\n     *\n     * @return $this\n     */\n    public function setCustomProperty(string $propertyName, bool|int|float|string|null $propertyValue = '', ?string $propertyType = null): self\n    {\n        if (($propertyType === null) || (!in_array($propertyType, self::VALID_PROPERTY_TYPE_LIST))) {\n            $propertyType = $this->identifyPropertyType($propertyValue);\n        }\n\n        $this->customProperties[$propertyName] = [\n            'value' => self::convertProperty($propertyValue, $propertyType),\n            'type' => $propertyType,\n        ];\n\n        return $this;\n    }\n\n    private const PROPERTY_TYPE_ARRAY = [\n        'i' => self::PROPERTY_TYPE_INTEGER,      //    Integer\n        'i1' => self::PROPERTY_TYPE_INTEGER,     //    1-Byte Signed Integer\n        'i2' => self::PROPERTY_TYPE_INTEGER,     //    2-Byte Signed Integer\n        'i4' => self::PROPERTY_TYPE_INTEGER,     //    4-Byte Signed Integer\n        'i8' => self::PROPERTY_TYPE_INTEGER,     //    8-Byte Signed Integer\n        'int' => self::PROPERTY_TYPE_INTEGER,    //    Integer\n        'ui1' => self::PROPERTY_TYPE_INTEGER,    //    1-Byte Unsigned Integer\n        'ui2' => self::PROPERTY_TYPE_INTEGER,    //    2-Byte Unsigned Integer\n        'ui4' => self::PROPERTY_TYPE_INTEGER,    //    4-Byte Unsigned Integer\n        'ui8' => self::PROPERTY_TYPE_INTEGER,    //    8-Byte Unsigned Integer\n        'uint' => self::PROPERTY_TYPE_INTEGER,   //    Unsigned Integer\n        'f' => self::PROPERTY_TYPE_FLOAT,        //    Real Number\n        'r4' => self::PROPERTY_TYPE_FLOAT,       //    4-Byte Real Number\n        'r8' => self::PROPERTY_TYPE_FLOAT,       //    8-Byte Real Number\n        'decimal' => self::PROPERTY_TYPE_FLOAT,  //    Decimal\n        's' => self::PROPERTY_TYPE_STRING,       //    String\n        'empty' => self::PROPERTY_TYPE_STRING,   //    Empty\n        'null' => self::PROPERTY_TYPE_STRING,    //    Null\n        'lpstr' => self::PROPERTY_TYPE_STRING,   //    LPSTR\n        'lpwstr' => self::PROPERTY_TYPE_STRING,  //    LPWSTR\n        'bstr' => self::PROPERTY_TYPE_STRING,    //    Basic String\n        'd' => self::PROPERTY_TYPE_DATE,         //    Date and Time\n        'date' => self::PROPERTY_TYPE_DATE,      //    Date and Time\n        'filetime' => self::PROPERTY_TYPE_DATE,  //    File Time\n        'b' => self::PROPERTY_TYPE_BOOLEAN,      //    Boolean\n        'bool' => self::PROPERTY_TYPE_BOOLEAN,   //    Boolean\n    ];\n\n    private const SPECIAL_TYPES = [\n        'empty' => '',\n        'null' => null,\n    ];\n\n    /**\n     * Convert property to form desired by Excel.\n     */\n    public static function convertProperty(bool|int|float|string|null $propertyValue, string $propertyType): bool|int|float|string|null\n    {\n        return self::SPECIAL_TYPES[$propertyType] ?? self::convertProperty2($propertyValue, $propertyType);\n    }\n\n    /**\n     * Convert property to form desired by Excel.\n     */\n    private static function convertProperty2(bool|int|float|string|null $propertyValue, string $type): bool|int|float|string|null\n    {\n        $propertyType = self::convertPropertyType($type);\n        switch ($propertyType) {\n            case self::PROPERTY_TYPE_INTEGER:\n                $intValue = (int) $propertyValue;\n\n                return ($type[0] === 'u') ? abs($intValue) : $intValue;\n            case self::PROPERTY_TYPE_FLOAT:\n                return (float) $propertyValue;\n            case self::PROPERTY_TYPE_DATE:\n                return self::intOrFloatTimestamp($propertyValue);\n            case self::PROPERTY_TYPE_BOOLEAN:\n                return is_bool($propertyValue) ? $propertyValue : ($propertyValue === 'true');\n            default: // includes string\n                return $propertyValue;\n        }\n    }\n\n    public static function convertPropertyType(string $propertyType): string\n    {\n        return self::PROPERTY_TYPE_ARRAY[$propertyType] ?? self::PROPERTY_TYPE_UNKNOWN;\n    }\n\n    public function getHyperlinkBase(): string\n    {\n        return $this->hyperlinkBase;\n    }\n\n    public function setHyperlinkBase(string $hyperlinkBase): self\n    {\n        $this->hyperlinkBase = $hyperlinkBase;\n\n        return $this;\n    }\n\n    public function getViewport(): string\n    {\n        return $this->viewport;\n    }\n\n    public const SUGGESTED_VIEWPORT = 'width=device-width, initial-scale=1';\n\n    public function setViewport(string $viewport): self\n    {\n        $this->viewport = $viewport;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Document/Security.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Document;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\PasswordHasher;\n\nclass Security\n{\n    /**\n     * LockRevision.\n     */\n    private bool $lockRevision = false;\n\n    /**\n     * LockStructure.\n     */\n    private bool $lockStructure = false;\n\n    /**\n     * LockWindows.\n     */\n    private bool $lockWindows = false;\n\n    /**\n     * RevisionsPassword.\n     */\n    private string $revisionsPassword = '';\n\n    /**\n     * WorkbookPassword.\n     */\n    private string $workbookPassword = '';\n\n    private string $workbookAlgorithmName = '';\n\n    private string $workbookHashValue = '';\n\n    private string $workbookSaltValue = '';\n\n    private int $workbookSpinCount = 0;\n\n    private string $revisionsAlgorithmName = '';\n\n    private string $revisionsHashValue = '';\n\n    private string $revisionsSaltValue = '';\n\n    private int $revisionsSpinCount = 0;\n\n    /**\n     * Is some sort of document security enabled?\n     */\n    public function isSecurityEnabled(): bool\n    {\n        return $this->lockRevision\n                || $this->lockStructure\n                || $this->lockWindows;\n    }\n\n    public function getLockRevision(): bool\n    {\n        return $this->lockRevision;\n    }\n\n    public function setLockRevision(?bool $locked): self\n    {\n        if ($locked !== null) {\n            $this->lockRevision = $locked;\n        }\n\n        return $this;\n    }\n\n    public function getLockStructure(): bool\n    {\n        return $this->lockStructure;\n    }\n\n    public function setLockStructure(?bool $locked): self\n    {\n        if ($locked !== null) {\n            $this->lockStructure = $locked;\n        }\n\n        return $this;\n    }\n\n    public function getLockWindows(): bool\n    {\n        return $this->lockWindows;\n    }\n\n    public function setLockWindows(?bool $locked): self\n    {\n        if ($locked !== null) {\n            $this->lockWindows = $locked;\n        }\n\n        return $this;\n    }\n\n    public function getRevisionsPassword(): string\n    {\n        return $this->revisionsPassword;\n    }\n\n    /**\n     * Set RevisionsPassword.\n     *\n     * @param bool $alreadyHashed If the password has already been hashed, set this to true\n     *\n     * @return $this\n     */\n    public function setRevisionsPassword(?string $password, bool $alreadyHashed = false): static\n    {\n        if ($password !== null) {\n            if ($this->advancedRevisionsPassword()) {\n                if (!$alreadyHashed) {\n                    $password = PasswordHasher::hashPassword($password, $this->revisionsAlgorithmName, $this->revisionsSaltValue, $this->revisionsSpinCount);\n                }\n                $this->revisionsHashValue = $password;\n                $this->revisionsPassword = '';\n            } else {\n                if (!$alreadyHashed) {\n                    $password = PasswordHasher::hashPassword($password);\n                }\n                $this->revisionsPassword = $password;\n            }\n        }\n\n        return $this;\n    }\n\n    public function getWorkbookPassword(): string\n    {\n        return $this->workbookPassword;\n    }\n\n    /**\n     * Set WorkbookPassword.\n     *\n     * @param bool $alreadyHashed If the password has already been hashed, set this to true\n     *\n     * @return $this\n     */\n    public function setWorkbookPassword(?string $password, bool $alreadyHashed = false): static\n    {\n        if ($password !== null) {\n            if ($this->advancedPassword()) {\n                if (!$alreadyHashed) {\n                    $password = PasswordHasher::hashPassword($password, $this->workbookAlgorithmName, $this->workbookSaltValue, $this->workbookSpinCount);\n                }\n                $this->workbookHashValue = $password;\n                $this->workbookPassword = '';\n            } else {\n                if (!$alreadyHashed) {\n                    $password = PasswordHasher::hashPassword($password);\n                }\n                $this->workbookPassword = $password;\n            }\n        }\n\n        return $this;\n    }\n\n    public function getWorkbookHashValue(): string\n    {\n        return $this->advancedPassword() ? $this->workbookHashValue : '';\n    }\n\n    public function advancedPassword(): bool\n    {\n        return $this->workbookAlgorithmName !== '' && $this->workbookSaltValue !== '' && $this->workbookSpinCount > 0;\n    }\n\n    public function getWorkbookAlgorithmName(): string\n    {\n        return $this->workbookAlgorithmName;\n    }\n\n    public function setWorkbookAlgorithmName(string $workbookAlgorithmName): static\n    {\n        $this->workbookAlgorithmName = $workbookAlgorithmName;\n\n        return $this;\n    }\n\n    public function getWorkbookSpinCount(): int\n    {\n        return $this->workbookSpinCount;\n    }\n\n    public function setWorkbookSpinCount(int $workbookSpinCount): static\n    {\n        $this->workbookSpinCount = $workbookSpinCount;\n\n        return $this;\n    }\n\n    public function getWorkbookSaltValue(): string\n    {\n        return $this->workbookSaltValue;\n    }\n\n    public function setWorkbookSaltValue(string $workbookSaltValue, bool $base64Required): static\n    {\n        $this->workbookSaltValue = $base64Required ? base64_encode($workbookSaltValue) : $workbookSaltValue;\n\n        return $this;\n    }\n\n    public function getRevisionsHashValue(): string\n    {\n        return $this->advancedRevisionsPassword() ? $this->revisionsHashValue : '';\n    }\n\n    public function advancedRevisionsPassword(): bool\n    {\n        return $this->revisionsAlgorithmName !== '' && $this->revisionsSaltValue !== '' && $this->revisionsSpinCount > 0;\n    }\n\n    public function getRevisionsAlgorithmName(): string\n    {\n        return $this->revisionsAlgorithmName;\n    }\n\n    public function setRevisionsAlgorithmName(string $revisionsAlgorithmName): static\n    {\n        $this->revisionsAlgorithmName = $revisionsAlgorithmName;\n\n        return $this;\n    }\n\n    public function getRevisionsSpinCount(): int\n    {\n        return $this->revisionsSpinCount;\n    }\n\n    public function setRevisionsSpinCount(int $revisionsSpinCount): static\n    {\n        $this->revisionsSpinCount = $revisionsSpinCount;\n\n        return $this;\n    }\n\n    public function getRevisionsSaltValue(): string\n    {\n        return $this->revisionsSaltValue;\n    }\n\n    public function setRevisionsSaltValue(string $revisionsSaltValue, bool $base64Required): static\n    {\n        $this->revisionsSaltValue = $base64Required ? base64_encode($revisionsSaltValue) : $revisionsSaltValue;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Exception.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse RuntimeException;\n\nclass Exception extends RuntimeException\n{\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/HashTable.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\n/**\n * @template T of IComparable\n */\nclass HashTable\n{\n    /**\n     * HashTable elements.\n     *\n     * @var array<string, T>\n     */\n    protected array $items = [];\n\n    /**\n     * HashTable key map.\n     *\n     * @var array<int, string>\n     */\n    protected array $keyMap = [];\n\n    /**\n     * Create a new HashTable.\n     *\n     * @param T[] $source Optional source array to create HashTable from\n     */\n    public function __construct(?array $source = [])\n    {\n        if ($source !== null) {\n            // Create HashTable\n            $this->addFromSource($source);\n        }\n    }\n\n    /**\n     * Add HashTable items from source.\n     *\n     * @param T[] $source Source array to create HashTable from\n     */\n    public function addFromSource(?array $source = null): void\n    {\n        // Check if an array was passed\n        if ($source === null) {\n            return;\n        }\n\n        foreach ($source as $item) {\n            $this->add($item);\n        }\n    }\n\n    /**\n     * Add HashTable item.\n     *\n     * @param T $source Item to add\n     */\n    public function add(IComparable $source): void\n    {\n        $hash = $source->getHashCode();\n        if (!isset($this->items[$hash])) {\n            $this->items[$hash] = $source;\n            $this->keyMap[count($this->items) - 1] = $hash;\n        }\n    }\n\n    /**\n     * Remove HashTable item.\n     *\n     * @param T $source Item to remove\n     */\n    public function remove(IComparable $source): void\n    {\n        $hash = $source->getHashCode();\n        if (isset($this->items[$hash])) {\n            unset($this->items[$hash]);\n\n            $deleteKey = -1;\n            foreach ($this->keyMap as $key => $value) {\n                if ($deleteKey >= 0) {\n                    $this->keyMap[$key - 1] = $value;\n                }\n\n                if ($value == $hash) {\n                    $deleteKey = $key;\n                }\n            }\n            unset($this->keyMap[count($this->keyMap) - 1]);\n        }\n    }\n\n    /**\n     * Clear HashTable.\n     */\n    public function clear(): void\n    {\n        $this->items = [];\n        $this->keyMap = [];\n    }\n\n    /**\n     * Count.\n     */\n    public function count(): int\n    {\n        return count($this->items);\n    }\n\n    /**\n     * Get index for hash code.\n     */\n    public function getIndexForHashCode(string $hashCode): false|int\n    {\n        return array_search($hashCode, $this->keyMap, true);\n    }\n\n    /**\n     * Get by index.\n     *\n     * @return null|T\n     */\n    public function getByIndex(int $index): ?IComparable\n    {\n        if (isset($this->keyMap[$index])) {\n            return $this->getByHashCode($this->keyMap[$index]);\n        }\n\n        return null;\n    }\n\n    /**\n     * Get by hashcode.\n     *\n     * @return null|T\n     */\n    public function getByHashCode(string $hashCode): ?IComparable\n    {\n        if (isset($this->items[$hashCode])) {\n            return $this->items[$hashCode];\n        }\n\n        return null;\n    }\n\n    /**\n     * HashTable to array.\n     *\n     * @return T[]\n     */\n    public function toArray(): array\n    {\n        return $this->items;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            // each member of this class is an array\n            if (is_array($value)) {\n                $array1 = $value;\n                foreach ($array1 as $key1 => $value1) {\n                    if (is_object($value1)) {\n                        $array1[$key1] = clone $value1;\n                    }\n                }\n                $this->$key = $array1;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Helper/Dimension.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Helper;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass Dimension\n{\n    public const UOM_CENTIMETERS = 'cm';\n    public const UOM_MILLIMETERS = 'mm';\n    public const UOM_INCHES = 'in';\n    public const UOM_PIXELS = 'px';\n    public const UOM_POINTS = 'pt';\n    public const UOM_PICA = 'pc';\n\n    /**\n     * Based on 96 dpi.\n     */\n    const ABSOLUTE_UNITS = [\n        self::UOM_CENTIMETERS => 96.0 / 2.54,\n        self::UOM_MILLIMETERS => 96.0 / 25.4,\n        self::UOM_INCHES => 96.0,\n        self::UOM_PIXELS => 1.0,\n        self::UOM_POINTS => 96.0 / 72,\n        self::UOM_PICA => 96.0 * 12 / 72,\n    ];\n\n    /**\n     * Based on a standard column width of 8.54 units in MS Excel.\n     */\n    const RELATIVE_UNITS = [\n        'em' => 10.0 / 8.54,\n        'ex' => 10.0 / 8.54,\n        'ch' => 10.0 / 8.54,\n        'rem' => 10.0 / 8.54,\n        'vw' => 8.54,\n        'vh' => 8.54,\n        'vmin' => 8.54,\n        'vmax' => 8.54,\n        '%' => 8.54 / 100,\n    ];\n\n    /**\n     * @var float|int If this is a width, then size is measured in pixels (if is set)\n     *                   or in Excel's default column width units if $unit is null.\n     *                If this is a height, then size is measured in pixels ()\n     *                   or in points () if $unit is null.\n     */\n    protected float|int $size;\n\n    protected ?string $unit = null;\n\n    public function __construct(string $dimension)\n    {\n        $size = 0.0;\n        $unit = '';\n        $sscanf = sscanf($dimension, '%[1234567890.]%s');\n        if (is_array($sscanf)) {\n            $size = (float) ($sscanf[0] ?? 0.0);\n            $unit = strtolower($sscanf[1] ?? '');\n        }\n\n        // If a UoM is specified, then convert the size to pixels for internal storage\n        if (isset(self::ABSOLUTE_UNITS[$unit])) {\n            $size *= self::ABSOLUTE_UNITS[$unit];\n            $this->unit = self::UOM_PIXELS;\n        } elseif (isset(self::RELATIVE_UNITS[$unit])) {\n            $size *= self::RELATIVE_UNITS[$unit];\n            $size = round($size, 4);\n        }\n\n        $this->size = $size;\n    }\n\n    public function width(): float\n    {\n        return (float) ($this->unit === null)\n            ? $this->size\n            : round(Drawing::pixelsToCellDimension((int) $this->size, new Font(false)), 4);\n    }\n\n    public function height(): float\n    {\n        return (float) ($this->unit === null)\n            ? $this->size\n            : $this->toUnit(self::UOM_POINTS);\n    }\n\n    public function toUnit(string $unitOfMeasure): float\n    {\n        $unitOfMeasure = strtolower($unitOfMeasure);\n        if (!array_key_exists($unitOfMeasure, self::ABSOLUTE_UNITS)) {\n            throw new Exception(\"{$unitOfMeasure} is not a vaid unit of measure\");\n        }\n\n        $size = $this->size;\n        if ($this->unit === null) {\n            $size = Drawing::cellDimensionToPixels($size, new Font(false));\n        }\n\n        return $size / self::ABSOLUTE_UNITS[$unitOfMeasure];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Helper/Downloader.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Helper;\n\nuse DateTimeImmutable;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\n\n/**\n * Assist downloading files when samples are run in browser.\n * Never run as part of unit tests, which are command line.\n *\n * @codeCoverageIgnore\n */\nclass Downloader\n{\n    protected string $filepath;\n\n    protected string $filename;\n\n    protected string $filetype;\n\n    protected const CONTENT_TYPES = [\n        'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n        'xls' => 'application/vnd.ms-excel',\n        'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n        'csv' => 'text/csv',\n        'html' => 'text/html',\n        'pdf' => 'application/pdf',\n    ];\n\n    public function __construct(string $folder, string $filename, ?string $filetype = null)\n    {\n        if ((is_dir($folder) === false) || (is_readable($folder) === false)) {\n            throw new Exception('Folder is not accessible');\n        }\n        $filepath = \"{$folder}/{$filename}\";\n        $this->filepath = (string) realpath($filepath);\n        $this->filename = basename($filepath);\n        clearstatcache();\n        if ((is_file($this->filepath) === false) || (is_readable($this->filepath) === false)) {\n            throw new Exception('File not found, or not a regular file, or cannot be read');\n        }\n\n        $filetype ??= pathinfo($filename, PATHINFO_EXTENSION);\n        if (array_key_exists(strtolower($filetype), self::CONTENT_TYPES) === false) {\n            throw new Exception('Invalid filetype: file cannot be downloaded');\n        }\n        $this->filetype = strtolower($filetype);\n    }\n\n    public function download(): void\n    {\n        $this->headers();\n\n        readfile($this->filepath);\n    }\n\n    public function headers(): void\n    {\n        // I cannot tell what this ob_clean is paired with.\n        // I have never seen a problem with it, but someone has - issue 3739.\n        // Perhaps it should be removed altogether,\n        // but making it conditional seems harmless, and safer.\n        if ((int) ob_get_length() > 0) {\n            ob_clean();\n        }\n\n        $this->contentType();\n        $this->contentDisposition();\n        $this->cacheHeaders();\n        $this->fileSize();\n\n        flush();\n    }\n\n    protected function contentType(): void\n    {\n        header('Content-Type: ' . self::CONTENT_TYPES[$this->filetype]);\n    }\n\n    protected function contentDisposition(): void\n    {\n        header('Content-Disposition: attachment;filename=\"' . $this->filename . '\"');\n    }\n\n    protected function cacheHeaders(): void\n    {\n        header('Cache-Control: max-age=0');\n        // If you're serving to IE 9, then the following may be needed\n        header('Cache-Control: max-age=1');\n\n        // If you're serving to IE over SSL, then the following may be needed\n        header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n        $dt = new DateTimeImmutable(timezone: new DateTimeZone('UTC'));\n        header('Last-Modified: ' . $dt->format('D, d M Y H:i:s') . ' GMT'); // always modified\n        header('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n        header('Pragma: public'); // HTTP/1.0\n    }\n\n    protected function fileSize(): void\n    {\n        header('Content-Length: ' . filesize($this->filepath));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Helper/Handler.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Helper;\n\nclass Handler\n{\n    private static string $invalidHex = 'Y';\n\n    // A bunch of methods to show that we continue\n    // to capture messages even using PhpUnit 10.\n    public static function suppressed(): bool\n    {\n        return @trigger_error('hello');\n    }\n\n    public static function deprecated(): string\n    {\n        return (string) hexdec(self::$invalidHex);\n    }\n\n    public static function notice(string $value): void\n    {\n        date_default_timezone_set($value);\n    }\n\n    public static function warning(): bool\n    {\n        return file_get_contents(__FILE__ . 'noexist') !== false;\n    }\n\n    public static function userDeprecated(): bool\n    {\n        return trigger_error('hello', E_USER_DEPRECATED);\n    }\n\n    public static function userNotice(): bool\n    {\n        return trigger_error('userNotice', E_USER_NOTICE);\n    }\n\n    public static function userWarning(): bool\n    {\n        return trigger_error('userWarning', E_USER_WARNING);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Helper/Html.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Helper;\n\nuse DOMAttr;\nuse DOMDocument;\nuse DOMElement;\nuse DOMNode;\nuse DOMText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass Html\n{\n    protected const COLOUR_MAP = [\n        'aliceblue' => 'f0f8ff',\n        'antiquewhite' => 'faebd7',\n        'antiquewhite1' => 'ffefdb',\n        'antiquewhite2' => 'eedfcc',\n        'antiquewhite3' => 'cdc0b0',\n        'antiquewhite4' => '8b8378',\n        'aqua' => '00ffff',\n        'aquamarine1' => '7fffd4',\n        'aquamarine2' => '76eec6',\n        'aquamarine4' => '458b74',\n        'azure1' => 'f0ffff',\n        'azure2' => 'e0eeee',\n        'azure3' => 'c1cdcd',\n        'azure4' => '838b8b',\n        'beige' => 'f5f5dc',\n        'bisque1' => 'ffe4c4',\n        'bisque2' => 'eed5b7',\n        'bisque3' => 'cdb79e',\n        'bisque4' => '8b7d6b',\n        'black' => '000000',\n        'blanchedalmond' => 'ffebcd',\n        'blue' => '0000ff',\n        'blue1' => '0000ff',\n        'blue2' => '0000ee',\n        'blue4' => '00008b',\n        'blueviolet' => '8a2be2',\n        'brown' => 'a52a2a',\n        'brown1' => 'ff4040',\n        'brown2' => 'ee3b3b',\n        'brown3' => 'cd3333',\n        'brown4' => '8b2323',\n        'burlywood' => 'deb887',\n        'burlywood1' => 'ffd39b',\n        'burlywood2' => 'eec591',\n        'burlywood3' => 'cdaa7d',\n        'burlywood4' => '8b7355',\n        'cadetblue' => '5f9ea0',\n        'cadetblue1' => '98f5ff',\n        'cadetblue2' => '8ee5ee',\n        'cadetblue3' => '7ac5cd',\n        'cadetblue4' => '53868b',\n        'chartreuse1' => '7fff00',\n        'chartreuse2' => '76ee00',\n        'chartreuse3' => '66cd00',\n        'chartreuse4' => '458b00',\n        'chocolate' => 'd2691e',\n        'chocolate1' => 'ff7f24',\n        'chocolate2' => 'ee7621',\n        'chocolate3' => 'cd661d',\n        'coral' => 'ff7f50',\n        'coral1' => 'ff7256',\n        'coral2' => 'ee6a50',\n        'coral3' => 'cd5b45',\n        'coral4' => '8b3e2f',\n        'cornflowerblue' => '6495ed',\n        'cornsilk1' => 'fff8dc',\n        'cornsilk2' => 'eee8cd',\n        'cornsilk3' => 'cdc8b1',\n        'cornsilk4' => '8b8878',\n        'cyan1' => '00ffff',\n        'cyan2' => '00eeee',\n        'cyan3' => '00cdcd',\n        'cyan4' => '008b8b',\n        'darkgoldenrod' => 'b8860b',\n        'darkgoldenrod1' => 'ffb90f',\n        'darkgoldenrod2' => 'eead0e',\n        'darkgoldenrod3' => 'cd950c',\n        'darkgoldenrod4' => '8b6508',\n        'darkgreen' => '006400',\n        'darkkhaki' => 'bdb76b',\n        'darkolivegreen' => '556b2f',\n        'darkolivegreen1' => 'caff70',\n        'darkolivegreen2' => 'bcee68',\n        'darkolivegreen3' => 'a2cd5a',\n        'darkolivegreen4' => '6e8b3d',\n        'darkorange' => 'ff8c00',\n        'darkorange1' => 'ff7f00',\n        'darkorange2' => 'ee7600',\n        'darkorange3' => 'cd6600',\n        'darkorange4' => '8b4500',\n        'darkorchid' => '9932cc',\n        'darkorchid1' => 'bf3eff',\n        'darkorchid2' => 'b23aee',\n        'darkorchid3' => '9a32cd',\n        'darkorchid4' => '68228b',\n        'darksalmon' => 'e9967a',\n        'darkseagreen' => '8fbc8f',\n        'darkseagreen1' => 'c1ffc1',\n        'darkseagreen2' => 'b4eeb4',\n        'darkseagreen3' => '9bcd9b',\n        'darkseagreen4' => '698b69',\n        'darkslateblue' => '483d8b',\n        'darkslategray' => '2f4f4f',\n        'darkslategray1' => '97ffff',\n        'darkslategray2' => '8deeee',\n        'darkslategray3' => '79cdcd',\n        'darkslategray4' => '528b8b',\n        'darkturquoise' => '00ced1',\n        'darkviolet' => '9400d3',\n        'deeppink1' => 'ff1493',\n        'deeppink2' => 'ee1289',\n        'deeppink3' => 'cd1076',\n        'deeppink4' => '8b0a50',\n        'deepskyblue1' => '00bfff',\n        'deepskyblue2' => '00b2ee',\n        'deepskyblue3' => '009acd',\n        'deepskyblue4' => '00688b',\n        'dimgray' => '696969',\n        'dodgerblue1' => '1e90ff',\n        'dodgerblue2' => '1c86ee',\n        'dodgerblue3' => '1874cd',\n        'dodgerblue4' => '104e8b',\n        'firebrick' => 'b22222',\n        'firebrick1' => 'ff3030',\n        'firebrick2' => 'ee2c2c',\n        'firebrick3' => 'cd2626',\n        'firebrick4' => '8b1a1a',\n        'floralwhite' => 'fffaf0',\n        'forestgreen' => '228b22',\n        'fuchsia' => 'ff00ff',\n        'gainsboro' => 'dcdcdc',\n        'ghostwhite' => 'f8f8ff',\n        'gold1' => 'ffd700',\n        'gold2' => 'eec900',\n        'gold3' => 'cdad00',\n        'gold4' => '8b7500',\n        'goldenrod' => 'daa520',\n        'goldenrod1' => 'ffc125',\n        'goldenrod2' => 'eeb422',\n        'goldenrod3' => 'cd9b1d',\n        'goldenrod4' => '8b6914',\n        'gray' => 'bebebe',\n        'gray1' => '030303',\n        'gray10' => '1a1a1a',\n        'gray11' => '1c1c1c',\n        'gray12' => '1f1f1f',\n        'gray13' => '212121',\n        'gray14' => '242424',\n        'gray15' => '262626',\n        'gray16' => '292929',\n        'gray17' => '2b2b2b',\n        'gray18' => '2e2e2e',\n        'gray19' => '303030',\n        'gray2' => '050505',\n        'gray20' => '333333',\n        'gray21' => '363636',\n        'gray22' => '383838',\n        'gray23' => '3b3b3b',\n        'gray24' => '3d3d3d',\n        'gray25' => '404040',\n        'gray26' => '424242',\n        'gray27' => '454545',\n        'gray28' => '474747',\n        'gray29' => '4a4a4a',\n        'gray3' => '080808',\n        'gray30' => '4d4d4d',\n        'gray31' => '4f4f4f',\n        'gray32' => '525252',\n        'gray33' => '545454',\n        'gray34' => '575757',\n        'gray35' => '595959',\n        'gray36' => '5c5c5c',\n        'gray37' => '5e5e5e',\n        'gray38' => '616161',\n        'gray39' => '636363',\n        'gray4' => '0a0a0a',\n        'gray40' => '666666',\n        'gray41' => '696969',\n        'gray42' => '6b6b6b',\n        'gray43' => '6e6e6e',\n        'gray44' => '707070',\n        'gray45' => '737373',\n        'gray46' => '757575',\n        'gray47' => '787878',\n        'gray48' => '7a7a7a',\n        'gray49' => '7d7d7d',\n        'gray5' => '0d0d0d',\n        'gray50' => '7f7f7f',\n        'gray51' => '828282',\n        'gray52' => '858585',\n        'gray53' => '878787',\n        'gray54' => '8a8a8a',\n        'gray55' => '8c8c8c',\n        'gray56' => '8f8f8f',\n        'gray57' => '919191',\n        'gray58' => '949494',\n        'gray59' => '969696',\n        'gray6' => '0f0f0f',\n        'gray60' => '999999',\n        'gray61' => '9c9c9c',\n        'gray62' => '9e9e9e',\n        'gray63' => 'a1a1a1',\n        'gray64' => 'a3a3a3',\n        'gray65' => 'a6a6a6',\n        'gray66' => 'a8a8a8',\n        'gray67' => 'ababab',\n        'gray68' => 'adadad',\n        'gray69' => 'b0b0b0',\n        'gray7' => '121212',\n        'gray70' => 'b3b3b3',\n        'gray71' => 'b5b5b5',\n        'gray72' => 'b8b8b8',\n        'gray73' => 'bababa',\n        'gray74' => 'bdbdbd',\n        'gray75' => 'bfbfbf',\n        'gray76' => 'c2c2c2',\n        'gray77' => 'c4c4c4',\n        'gray78' => 'c7c7c7',\n        'gray79' => 'c9c9c9',\n        'gray8' => '141414',\n        'gray80' => 'cccccc',\n        'gray81' => 'cfcfcf',\n        'gray82' => 'd1d1d1',\n        'gray83' => 'd4d4d4',\n        'gray84' => 'd6d6d6',\n        'gray85' => 'd9d9d9',\n        'gray86' => 'dbdbdb',\n        'gray87' => 'dedede',\n        'gray88' => 'e0e0e0',\n        'gray89' => 'e3e3e3',\n        'gray9' => '171717',\n        'gray90' => 'e5e5e5',\n        'gray91' => 'e8e8e8',\n        'gray92' => 'ebebeb',\n        'gray93' => 'ededed',\n        'gray94' => 'f0f0f0',\n        'gray95' => 'f2f2f2',\n        'gray97' => 'f7f7f7',\n        'gray98' => 'fafafa',\n        'gray99' => 'fcfcfc',\n        'green' => '00ff00',\n        'green1' => '00ff00',\n        'green2' => '00ee00',\n        'green3' => '00cd00',\n        'green4' => '008b00',\n        'greenyellow' => 'adff2f',\n        'honeydew1' => 'f0fff0',\n        'honeydew2' => 'e0eee0',\n        'honeydew3' => 'c1cdc1',\n        'honeydew4' => '838b83',\n        'hotpink' => 'ff69b4',\n        'hotpink1' => 'ff6eb4',\n        'hotpink2' => 'ee6aa7',\n        'hotpink3' => 'cd6090',\n        'hotpink4' => '8b3a62',\n        'indianred' => 'cd5c5c',\n        'indianred1' => 'ff6a6a',\n        'indianred2' => 'ee6363',\n        'indianred3' => 'cd5555',\n        'indianred4' => '8b3a3a',\n        'ivory1' => 'fffff0',\n        'ivory2' => 'eeeee0',\n        'ivory3' => 'cdcdc1',\n        'ivory4' => '8b8b83',\n        'khaki' => 'f0e68c',\n        'khaki1' => 'fff68f',\n        'khaki2' => 'eee685',\n        'khaki3' => 'cdc673',\n        'khaki4' => '8b864e',\n        'lavender' => 'e6e6fa',\n        'lavenderblush1' => 'fff0f5',\n        'lavenderblush2' => 'eee0e5',\n        'lavenderblush3' => 'cdc1c5',\n        'lavenderblush4' => '8b8386',\n        'lawngreen' => '7cfc00',\n        'lemonchiffon1' => 'fffacd',\n        'lemonchiffon2' => 'eee9bf',\n        'lemonchiffon3' => 'cdc9a5',\n        'lemonchiffon4' => '8b8970',\n        'light' => 'eedd82',\n        'lightblue' => 'add8e6',\n        'lightblue1' => 'bfefff',\n        'lightblue2' => 'b2dfee',\n        'lightblue3' => '9ac0cd',\n        'lightblue4' => '68838b',\n        'lightcoral' => 'f08080',\n        'lightcyan1' => 'e0ffff',\n        'lightcyan2' => 'd1eeee',\n        'lightcyan3' => 'b4cdcd',\n        'lightcyan4' => '7a8b8b',\n        'lightgoldenrod1' => 'ffec8b',\n        'lightgoldenrod2' => 'eedc82',\n        'lightgoldenrod3' => 'cdbe70',\n        'lightgoldenrod4' => '8b814c',\n        'lightgoldenrodyellow' => 'fafad2',\n        'lightgray' => 'd3d3d3',\n        'lightpink' => 'ffb6c1',\n        'lightpink1' => 'ffaeb9',\n        'lightpink2' => 'eea2ad',\n        'lightpink3' => 'cd8c95',\n        'lightpink4' => '8b5f65',\n        'lightsalmon1' => 'ffa07a',\n        'lightsalmon2' => 'ee9572',\n        'lightsalmon3' => 'cd8162',\n        'lightsalmon4' => '8b5742',\n        'lightseagreen' => '20b2aa',\n        'lightskyblue' => '87cefa',\n        'lightskyblue1' => 'b0e2ff',\n        'lightskyblue2' => 'a4d3ee',\n        'lightskyblue3' => '8db6cd',\n        'lightskyblue4' => '607b8b',\n        'lightslateblue' => '8470ff',\n        'lightslategray' => '778899',\n        'lightsteelblue' => 'b0c4de',\n        'lightsteelblue1' => 'cae1ff',\n        'lightsteelblue2' => 'bcd2ee',\n        'lightsteelblue3' => 'a2b5cd',\n        'lightsteelblue4' => '6e7b8b',\n        'lightyellow1' => 'ffffe0',\n        'lightyellow2' => 'eeeed1',\n        'lightyellow3' => 'cdcdb4',\n        'lightyellow4' => '8b8b7a',\n        'lime' => '00ff00',\n        'limegreen' => '32cd32',\n        'linen' => 'faf0e6',\n        'magenta' => 'ff00ff',\n        'magenta2' => 'ee00ee',\n        'magenta3' => 'cd00cd',\n        'magenta4' => '8b008b',\n        'maroon' => 'b03060',\n        'maroon1' => 'ff34b3',\n        'maroon2' => 'ee30a7',\n        'maroon3' => 'cd2990',\n        'maroon4' => '8b1c62',\n        'medium' => '66cdaa',\n        'mediumaquamarine' => '66cdaa',\n        'mediumblue' => '0000cd',\n        'mediumorchid' => 'ba55d3',\n        'mediumorchid1' => 'e066ff',\n        'mediumorchid2' => 'd15fee',\n        'mediumorchid3' => 'b452cd',\n        'mediumorchid4' => '7a378b',\n        'mediumpurple' => '9370db',\n        'mediumpurple1' => 'ab82ff',\n        'mediumpurple2' => '9f79ee',\n        'mediumpurple3' => '8968cd',\n        'mediumpurple4' => '5d478b',\n        'mediumseagreen' => '3cb371',\n        'mediumslateblue' => '7b68ee',\n        'mediumspringgreen' => '00fa9a',\n        'mediumturquoise' => '48d1cc',\n        'mediumvioletred' => 'c71585',\n        'midnightblue' => '191970',\n        'mintcream' => 'f5fffa',\n        'mistyrose1' => 'ffe4e1',\n        'mistyrose2' => 'eed5d2',\n        'mistyrose3' => 'cdb7b5',\n        'mistyrose4' => '8b7d7b',\n        'moccasin' => 'ffe4b5',\n        'navajowhite1' => 'ffdead',\n        'navajowhite2' => 'eecfa1',\n        'navajowhite3' => 'cdb38b',\n        'navajowhite4' => '8b795e',\n        'navy' => '000080',\n        'navyblue' => '000080',\n        'oldlace' => 'fdf5e6',\n        'olive' => '808000',\n        'olivedrab' => '6b8e23',\n        'olivedrab1' => 'c0ff3e',\n        'olivedrab2' => 'b3ee3a',\n        'olivedrab4' => '698b22',\n        'orange' => 'ffa500',\n        'orange1' => 'ffa500',\n        'orange2' => 'ee9a00',\n        'orange3' => 'cd8500',\n        'orange4' => '8b5a00',\n        'orangered1' => 'ff4500',\n        'orangered2' => 'ee4000',\n        'orangered3' => 'cd3700',\n        'orangered4' => '8b2500',\n        'orchid' => 'da70d6',\n        'orchid1' => 'ff83fa',\n        'orchid2' => 'ee7ae9',\n        'orchid3' => 'cd69c9',\n        'orchid4' => '8b4789',\n        'pale' => 'db7093',\n        'palegoldenrod' => 'eee8aa',\n        'palegreen' => '98fb98',\n        'palegreen1' => '9aff9a',\n        'palegreen2' => '90ee90',\n        'palegreen3' => '7ccd7c',\n        'palegreen4' => '548b54',\n        'paleturquoise' => 'afeeee',\n        'paleturquoise1' => 'bbffff',\n        'paleturquoise2' => 'aeeeee',\n        'paleturquoise3' => '96cdcd',\n        'paleturquoise4' => '668b8b',\n        'palevioletred' => 'db7093',\n        'palevioletred1' => 'ff82ab',\n        'palevioletred2' => 'ee799f',\n        'palevioletred3' => 'cd6889',\n        'palevioletred4' => '8b475d',\n        'papayawhip' => 'ffefd5',\n        'peachpuff1' => 'ffdab9',\n        'peachpuff2' => 'eecbad',\n        'peachpuff3' => 'cdaf95',\n        'peachpuff4' => '8b7765',\n        'pink' => 'ffc0cb',\n        'pink1' => 'ffb5c5',\n        'pink2' => 'eea9b8',\n        'pink3' => 'cd919e',\n        'pink4' => '8b636c',\n        'plum' => 'dda0dd',\n        'plum1' => 'ffbbff',\n        'plum2' => 'eeaeee',\n        'plum3' => 'cd96cd',\n        'plum4' => '8b668b',\n        'powderblue' => 'b0e0e6',\n        'purple' => 'a020f0',\n        'rebeccapurple' => '663399',\n        'purple1' => '9b30ff',\n        'purple2' => '912cee',\n        'purple3' => '7d26cd',\n        'purple4' => '551a8b',\n        'red' => 'ff0000',\n        'red1' => 'ff0000',\n        'red2' => 'ee0000',\n        'red3' => 'cd0000',\n        'red4' => '8b0000',\n        'rosybrown' => 'bc8f8f',\n        'rosybrown1' => 'ffc1c1',\n        'rosybrown2' => 'eeb4b4',\n        'rosybrown3' => 'cd9b9b',\n        'rosybrown4' => '8b6969',\n        'royalblue' => '4169e1',\n        'royalblue1' => '4876ff',\n        'royalblue2' => '436eee',\n        'royalblue3' => '3a5fcd',\n        'royalblue4' => '27408b',\n        'saddlebrown' => '8b4513',\n        'salmon' => 'fa8072',\n        'salmon1' => 'ff8c69',\n        'salmon2' => 'ee8262',\n        'salmon3' => 'cd7054',\n        'salmon4' => '8b4c39',\n        'sandybrown' => 'f4a460',\n        'seagreen1' => '54ff9f',\n        'seagreen2' => '4eee94',\n        'seagreen3' => '43cd80',\n        'seagreen4' => '2e8b57',\n        'seashell1' => 'fff5ee',\n        'seashell2' => 'eee5de',\n        'seashell3' => 'cdc5bf',\n        'seashell4' => '8b8682',\n        'sienna' => 'a0522d',\n        'sienna1' => 'ff8247',\n        'sienna2' => 'ee7942',\n        'sienna3' => 'cd6839',\n        'sienna4' => '8b4726',\n        'silver' => 'c0c0c0',\n        'skyblue' => '87ceeb',\n        'skyblue1' => '87ceff',\n        'skyblue2' => '7ec0ee',\n        'skyblue3' => '6ca6cd',\n        'skyblue4' => '4a708b',\n        'slateblue' => '6a5acd',\n        'slateblue1' => '836fff',\n        'slateblue2' => '7a67ee',\n        'slateblue3' => '6959cd',\n        'slateblue4' => '473c8b',\n        'slategray' => '708090',\n        'slategray1' => 'c6e2ff',\n        'slategray2' => 'b9d3ee',\n        'slategray3' => '9fb6cd',\n        'slategray4' => '6c7b8b',\n        'snow1' => 'fffafa',\n        'snow2' => 'eee9e9',\n        'snow3' => 'cdc9c9',\n        'snow4' => '8b8989',\n        'springgreen1' => '00ff7f',\n        'springgreen2' => '00ee76',\n        'springgreen3' => '00cd66',\n        'springgreen4' => '008b45',\n        'steelblue' => '4682b4',\n        'steelblue1' => '63b8ff',\n        'steelblue2' => '5cacee',\n        'steelblue3' => '4f94cd',\n        'steelblue4' => '36648b',\n        'tan' => 'd2b48c',\n        'tan1' => 'ffa54f',\n        'tan2' => 'ee9a49',\n        'tan3' => 'cd853f',\n        'tan4' => '8b5a2b',\n        'teal' => '008080',\n        'thistle' => 'd8bfd8',\n        'thistle1' => 'ffe1ff',\n        'thistle2' => 'eed2ee',\n        'thistle3' => 'cdb5cd',\n        'thistle4' => '8b7b8b',\n        'tomato1' => 'ff6347',\n        'tomato2' => 'ee5c42',\n        'tomato3' => 'cd4f39',\n        'tomato4' => '8b3626',\n        'turquoise' => '40e0d0',\n        'turquoise1' => '00f5ff',\n        'turquoise2' => '00e5ee',\n        'turquoise3' => '00c5cd',\n        'turquoise4' => '00868b',\n        'violet' => 'ee82ee',\n        'violetred' => 'd02090',\n        'violetred1' => 'ff3e96',\n        'violetred2' => 'ee3a8c',\n        'violetred3' => 'cd3278',\n        'violetred4' => '8b2252',\n        'wheat' => 'f5deb3',\n        'wheat1' => 'ffe7ba',\n        'wheat2' => 'eed8ae',\n        'wheat3' => 'cdba96',\n        'wheat4' => '8b7e66',\n        'white' => 'ffffff',\n        'whitesmoke' => 'f5f5f5',\n        'yellow' => 'ffff00',\n        'yellow1' => 'ffff00',\n        'yellow2' => 'eeee00',\n        'yellow3' => 'cdcd00',\n        'yellow4' => '8b8b00',\n        'yellowgreen' => '9acd32',\n    ];\n\n    private ?string $face = null;\n\n    private ?string $size = null;\n\n    private ?string $color = null;\n\n    private bool $bold = false;\n\n    private bool $italic = false;\n\n    private bool $underline = false;\n\n    private bool $superscript = false;\n\n    private bool $subscript = false;\n\n    private bool $strikethrough = false;\n\n    /** @var callable[] */\n    protected array $startTagCallbacks;\n\n    /** @var callable[] */\n    protected array $endTagCallbacks;\n\n    /** @var mixed[] */\n    private array $stack = [];\n\n    public string $stringData = '';\n\n    private RichText $richTextObject;\n\n    private bool $preserveWhiteSpace = false;\n\n    public function __construct()\n    {\n        if (!isset($this->startTagCallbacks)) {\n            $this->startTagCallbacks = [\n                'font' => $this->startFontTag(...),\n                'b' => $this->startBoldTag(...),\n                'strong' => $this->startBoldTag(...),\n                'i' => $this->startItalicTag(...),\n                'em' => $this->startItalicTag(...),\n                'u' => $this->startUnderlineTag(...),\n                'ins' => $this->startUnderlineTag(...),\n                'del' => $this->startStrikethruTag(...),\n                's' => $this->startStrikethruTag(...),\n                'sup' => $this->startSuperscriptTag(...),\n                'sub' => $this->startSubscriptTag(...),\n            ];\n        }\n        if (!isset($this->endTagCallbacks)) {\n            $this->endTagCallbacks = [\n                'font' => $this->endFontTag(...),\n                'b' => $this->endBoldTag(...),\n                'strong' => $this->endBoldTag(...),\n                'i' => $this->endItalicTag(...),\n                'em' => $this->endItalicTag(...),\n                'u' => $this->endUnderlineTag(...),\n                'ins' => $this->endUnderlineTag(...),\n                'del' => $this->endStrikethruTag(...),\n                's' => $this->endStrikethruTag(...),\n                'sup' => $this->endSuperscriptTag(...),\n                'sub' => $this->endSubscriptTag(...),\n                'br' => $this->breakTag(...),\n                'p' => $this->breakTag(...),\n                'h1' => $this->breakTag(...),\n                'h2' => $this->breakTag(...),\n                'h3' => $this->breakTag(...),\n                'h4' => $this->breakTag(...),\n                'h5' => $this->breakTag(...),\n                'h6' => $this->breakTag(...),\n            ];\n        }\n    }\n\n    private function initialise(): void\n    {\n        $this->face = $this->size = $this->color = null;\n        $this->bold = $this->italic = $this->underline = $this->superscript = $this->subscript = $this->strikethrough = false;\n\n        $this->stack = [];\n\n        $this->stringData = '';\n    }\n\n    /**\n     * Parse HTML formatting and return the resulting RichText.\n     */\n    public function toRichTextObject(string $html, bool $preserveWhiteSpace = false): RichText\n    {\n        $this->initialise();\n\n        //    Create a new DOM object\n        $dom = new DOMDocument();\n        //    Load the HTML file into the DOM object\n        //  Note the use of error suppression, because typically this will be an html fragment, so not fully valid markup\n        $prefix = '<?xml encoding=\"UTF-8\">';\n        @$dom->loadHTML($prefix . $html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n        //    Discard excess white space\n        $dom->preserveWhiteSpace = false;\n\n        $this->richTextObject = new RichText();\n        $this->preserveWhiteSpace = $preserveWhiteSpace;\n        $this->parseElements($dom);\n        $this->preserveWhiteSpace = false;\n\n        // Clean any further spurious whitespace\n        $this->cleanWhitespace();\n\n        return $this->richTextObject;\n    }\n\n    private function cleanWhitespace(): void\n    {\n        foreach ($this->richTextObject->getRichTextElements() as $key => $element) {\n            $text = $element->getText();\n            // Trim any leading spaces on the first run\n            if ($key == 0) {\n                $text = ltrim($text);\n            }\n            // Trim any spaces immediately after a line break\n            $text = (string) preg_replace('/\\n */mu', \"\\n\", $text);\n            $element->setText($text);\n        }\n    }\n\n    private function buildTextRun(): void\n    {\n        $text = $this->stringData;\n        if (trim($text) === '') {\n            return;\n        }\n\n        $richtextRun = $this->richTextObject->createTextRun($this->stringData);\n        $font = $richtextRun->getFont();\n        if ($font !== null) {\n            if ($this->face) {\n                $font->setName($this->face);\n            }\n            if ($this->size) {\n                $font->setSize($this->size);\n            }\n            if ($this->color) {\n                $font->setColor(new Color('ff' . $this->color));\n            }\n            if ($this->bold) {\n                $font->setBold(true);\n            }\n            if ($this->italic) {\n                $font->setItalic(true);\n            }\n            if ($this->underline) {\n                $font->setUnderline(Font::UNDERLINE_SINGLE);\n            }\n            if ($this->superscript) {\n                $font->setSuperscript(true);\n            }\n            if ($this->subscript) {\n                $font->setSubscript(true);\n            }\n            if ($this->strikethrough) {\n                $font->setStrikethrough(true);\n            }\n        }\n        $this->stringData = '';\n    }\n\n    private function rgbToColour(string $rgbValue): string\n    {\n        preg_match_all('/\\d+/', $rgbValue, $values);\n        foreach ($values[0] as &$value) {\n            $value = str_pad(dechex((int) $value), 2, '0', STR_PAD_LEFT);\n        }\n\n        return implode('', $values[0]);\n    }\n\n    public static function colourNameLookup(string $colorName): string\n    {\n        /** @var string[] */\n        $temp = static::COLOUR_MAP;\n\n        return $temp[$colorName] ?? '';\n    }\n\n    protected function startFontTag(DOMElement $tag): void\n    {\n        $attrs = $tag->attributes ?? [];\n        /** @var DOMAttr $attribute */\n        foreach ($attrs as $attribute) {\n            $attributeName = strtolower($attribute->name);\n            $attributeName = preg_replace('/^html:/', '', $attributeName) ?? $attributeName; // in case from Xml spreadsheet\n            $attributeValue = $attribute->value;\n\n            if ($attributeName === 'color') {\n                if (preg_match('/rgb\\s*\\(/', $attributeValue)) {\n                    $this->$attributeName = $this->rgbToColour($attributeValue);\n                } elseif (str_starts_with(trim($attributeValue), '#')) {\n                    $this->$attributeName = ltrim($attributeValue, '#');\n                } else {\n                    $this->$attributeName = static::colourNameLookup($attributeValue);\n                }\n            } elseif ($attributeName === 'face' || $attributeName === 'size') {\n                $this->$attributeName = $attributeValue;\n            }\n        }\n    }\n\n    protected function endFontTag(): void\n    {\n        $this->face = $this->size = $this->color = null;\n    }\n\n    protected function startBoldTag(): void\n    {\n        $this->bold = true;\n    }\n\n    protected function endBoldTag(): void\n    {\n        $this->bold = false;\n    }\n\n    protected function startItalicTag(): void\n    {\n        $this->italic = true;\n    }\n\n    protected function endItalicTag(): void\n    {\n        $this->italic = false;\n    }\n\n    protected function startUnderlineTag(): void\n    {\n        $this->underline = true;\n    }\n\n    protected function endUnderlineTag(): void\n    {\n        $this->underline = false;\n    }\n\n    protected function startSubscriptTag(): void\n    {\n        $this->subscript = true;\n    }\n\n    protected function endSubscriptTag(): void\n    {\n        $this->subscript = false;\n    }\n\n    protected function startSuperscriptTag(): void\n    {\n        $this->superscript = true;\n    }\n\n    protected function endSuperscriptTag(): void\n    {\n        $this->superscript = false;\n    }\n\n    protected function startStrikethruTag(): void\n    {\n        $this->strikethrough = true;\n    }\n\n    protected function endStrikethruTag(): void\n    {\n        $this->strikethrough = false;\n    }\n\n    public function breakTag(): void\n    {\n        $this->stringData .= \"\\n\";\n    }\n\n    private function parseTextNode(DOMText $textNode): void\n    {\n        if ($this->preserveWhiteSpace) {\n            $domText = $textNode->nodeValue ?? '';\n        } else {\n            $domText = (string) preg_replace(\n                '/\\s+/u',\n                ' ',\n                str_replace([\"\\r\", \"\\n\"], ' ', $textNode->nodeValue ?? '')\n            );\n        }\n        $this->stringData .= $domText;\n        $this->buildTextRun();\n    }\n\n    public function addStartTagCallback(string $tag, callable $callback): void\n    {\n        $this->startTagCallbacks[$tag] = $callback;\n    }\n\n    public function addEndTagCallback(string $tag, callable $callback): void\n    {\n        $this->endTagCallbacks[$tag] = $callback;\n    }\n\n    /** @param callable[] $callbacks */\n    private function handleCallback(DOMElement $element, string $callbackTag, array $callbacks): void\n    {\n        if (isset($callbacks[$callbackTag])) {\n            $elementHandler = $callbacks[$callbackTag];\n            call_user_func($elementHandler, $element, $this);\n        }\n    }\n\n    private function parseElementNode(DOMElement $element): void\n    {\n        $callbackTag = strtolower($element->nodeName);\n        $this->stack[] = $callbackTag;\n\n        $this->handleCallback($element, $callbackTag, $this->startTagCallbacks);\n\n        $this->parseElements($element);\n        array_pop($this->stack);\n\n        $this->handleCallback($element, $callbackTag, $this->endTagCallbacks);\n    }\n\n    private function parseElements(DOMNode $element): void\n    {\n        foreach ($element->childNodes as $child) {\n            if ($child instanceof DOMText) {\n                $this->parseTextNode($child);\n            } elseif ($child instanceof DOMElement) {\n                $this->parseElementNode($child);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Helper/Sample.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Helper;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\IWriter;\nuse RecursiveDirectoryIterator;\nuse RecursiveIteratorIterator;\nuse RecursiveRegexIterator;\nuse ReflectionClass;\nuse RegexIterator;\nuse RuntimeException;\nuse Throwable;\n\n/**\n * Helper class to be used in sample code.\n */\nclass Sample\n{\n    /**\n     * Returns whether we run on CLI or browser.\n     */\n    public function isCli(): bool\n    {\n        return PHP_SAPI === 'cli';\n    }\n\n    /**\n     * Return the filename currently being executed.\n     */\n    public function getScriptFilename(): string\n    {\n        return basename(StringHelper::convertToString($_SERVER['SCRIPT_FILENAME']), '.php');\n    }\n\n    /**\n     * Whether we are executing the index page.\n     */\n    public function isIndex(): bool\n    {\n        return $this->getScriptFilename() === 'index';\n    }\n\n    /**\n     * Return the page title.\n     */\n    public function getPageTitle(): string\n    {\n        return $this->isIndex() ? 'PHPSpreadsheet' : $this->getScriptFilename();\n    }\n\n    /**\n     * Return the page heading.\n     */\n    public function getPageHeading(): string\n    {\n        return $this->isIndex() ? '' : '<h1>' . str_replace('_', ' ', $this->getScriptFilename()) . '</h1>';\n    }\n\n    /**\n     * Returns an array of all known samples.\n     *\n     * @return string[][] [$name => $path]\n     */\n    public function getSamples(): array\n    {\n        // Populate samples\n        $baseDir = realpath(__DIR__ . '/../../../samples');\n        if ($baseDir === false) {\n            // @codeCoverageIgnoreStart\n            throw new RuntimeException('realpath returned false');\n            // @codeCoverageIgnoreEnd\n        }\n        $directory = new RecursiveDirectoryIterator($baseDir);\n        $iterator = new RecursiveIteratorIterator($directory);\n        $regex = new RegexIterator($iterator, '/^.+\\.php$/', RecursiveRegexIterator::GET_MATCH);\n\n        $files = [];\n        /** @var string[] $file */\n        foreach ($regex as $file) {\n            $file = str_replace(str_replace('\\\\', '/', $baseDir) . '/', '', str_replace('\\\\', '/', $file[0]));\n            $info = pathinfo($file);\n            $category = str_replace('_', ' ', $info['dirname'] ?? '');\n            $name = str_replace('_', ' ', (string) preg_replace('/(|\\.php)/', '', $info['filename']));\n            if (!in_array($category, ['.', 'bootstrap', 'templates']) && $name !== 'Header') {\n                if (!isset($files[$category])) {\n                    $files[$category] = [];\n                }\n                $files[$category][$name] = $file;\n            }\n        }\n\n        // Sort everything\n        ksort($files);\n        foreach ($files as &$f) {\n            asort($f);\n        }\n\n        return $files;\n    }\n\n    /**\n     * Write documents.\n     *\n     * @param string[] $writers\n     */\n    public function write(Spreadsheet $spreadsheet, string $filename, array $writers = ['Xlsx', 'Xls'], bool $withCharts = false, ?callable $writerCallback = null, bool $resetActiveSheet = true): void\n    {\n        // Set active sheet index to the first sheet, so Excel opens this as the first sheet\n        if ($resetActiveSheet) {\n            $spreadsheet->setActiveSheetIndex(0);\n        }\n\n        // Write documents\n        foreach ($writers as $writerType) {\n            $path = $this->getFilename($filename, mb_strtolower($writerType));\n            if (preg_match('/(mpdf|tcpdf)$/', $path)) {\n                $path .= '.pdf';\n            }\n            $writer = IOFactory::createWriter($spreadsheet, $writerType);\n            $writer->setIncludeCharts($withCharts);\n            if ($writerCallback !== null) {\n                $writerCallback($writer);\n            }\n            $callStartTime = microtime(true);\n            $writer->save($path);\n            $this->logWrite($writer, $path, $callStartTime);\n            $this->addDownloadLink($path);\n        }\n\n        $this->logEndingNotes();\n    }\n\n    public function addDownloadLink(string $path): void\n    {\n        if ($this->isCli() === false) {\n            // @codeCoverageIgnoreStart\n            echo '<a href=\"/download.php?type=' . pathinfo($path, PATHINFO_EXTENSION) . '&name=' . basename($path) . '\">Download ' . basename($path) . '</a><br />';\n            // @codeCoverageIgnoreEnd\n        }\n    }\n\n    protected function isDirOrMkdir(string $folder): bool\n    {\n        return \\is_dir($folder) || \\mkdir($folder);\n    }\n\n    /**\n     * Returns the temporary directory and make sure it exists.\n     */\n    public function getTemporaryFolder(): string\n    {\n        $tempFolder = sys_get_temp_dir() . '/phpspreadsheet';\n        if (!$this->isDirOrMkdir($tempFolder)) {\n            throw new RuntimeException(sprintf('Directory \"%s\" was not created', $tempFolder));\n        }\n\n        return $tempFolder;\n    }\n\n    /**\n     * Returns the filename that should be used for sample output.\n     */\n    public function getFilename(string $filename, string $extension = 'xlsx'): string\n    {\n        $originalExtension = pathinfo($filename, PATHINFO_EXTENSION);\n\n        return $this->getTemporaryFolder() . '/' . str_replace('.' . $originalExtension, '.' . $extension, basename($filename));\n    }\n\n    /**\n     * Return a random temporary file name.\n     */\n    public function getTemporaryFilename(string $extension = 'xlsx'): string\n    {\n        $temporaryFilename = tempnam($this->getTemporaryFolder(), 'phpspreadsheet-');\n        if ($temporaryFilename === false) {\n            // @codeCoverageIgnoreStart\n            throw new RuntimeException('tempnam returned false');\n            // @codeCoverageIgnoreEnd\n        }\n        unlink($temporaryFilename);\n\n        return $temporaryFilename . '.' . $extension;\n    }\n\n    public function log(mixed $message): void\n    {\n        $eol = $this->isCli() ? PHP_EOL : '<br />';\n        echo ($this->isCli() ? date('H:i:s ') : '') . StringHelper::convertToString($message) . $eol;\n    }\n\n    /**\n     * Render chart as part of running chart samples in browser.\n     * Charts are not rendered in unit tests, which are command line.\n     *\n     * @codeCoverageIgnore\n     */\n    public function renderChart(Chart $chart, string $fileName, ?Spreadsheet $spreadsheet = null): void\n    {\n        if ($this->isCli() === true) {\n            return;\n        }\n        Settings::setChartRenderer(MtJpGraphRenderer::class);\n\n        $fileName = $this->getFilename($fileName, 'png');\n        $title = $chart->getTitle();\n        $caption = null;\n        if ($title !== null) {\n            $calculatedTitle = $title->getCalculatedTitle($spreadsheet);\n            if ($calculatedTitle !== null) {\n                $caption = $title->getCaption();\n                $title->setCaption($calculatedTitle);\n            }\n        }\n\n        try {\n            $chart->render($fileName);\n            $this->log('Rendered image: ' . $fileName);\n            $imageData = @file_get_contents($fileName);\n            if ($imageData !== false) {\n                echo '<div><img src=\"data:image/gif;base64,' . base64_encode($imageData) . '\" /></div>';\n            } else {\n                $this->log('Unable to open chart' . PHP_EOL);\n            }\n        } catch (Throwable $e) {\n            $this->log('Error rendering chart: ' . $e->getMessage() . PHP_EOL);\n        }\n        if (isset($title, $caption)) {\n            $title->setCaption($caption);\n        }\n        Settings::unsetChartRenderer();\n    }\n\n    public function titles(string $category, string $functionName, ?string $description = null): void\n    {\n        $this->log(sprintf('%s Functions:', $category));\n        $description === null\n            ? $this->log(sprintf('Function: %s()', rtrim($functionName, '()')))\n            : $this->log(sprintf('Function: %s() - %s.', rtrim($functionName, '()'), rtrim($description, '.')));\n    }\n\n    /** @param mixed[][] $matrix */\n    public function displayGrid(array $matrix, null|bool|TextGridRightAlign $numbersRight = null): void\n    {\n        $renderer = new TextGrid($matrix, $this->isCli());\n        if (is_bool($numbersRight)) {\n            $numbersRight = $numbersRight ? TextGridRightAlign::numeric : TextGridRightAlign::none;\n        }\n        if ($numbersRight !== null) {\n            $renderer->setNumbersRight($numbersRight);\n        }\n        echo $renderer->render();\n    }\n\n    public function logCalculationResult(\n        Worksheet $worksheet,\n        string $functionName,\n        string $formulaCell,\n        ?string $descriptionCell = null\n    ): void {\n        if ($descriptionCell !== null) {\n            $this->log($worksheet->getCell($descriptionCell)->getValueString());\n        }\n        $this->log($worksheet->getCell($formulaCell)->getValueString());\n        $this->log(sprintf('%s() Result is ', $functionName) . $worksheet->getCell($formulaCell)->getCalculatedValueString());\n    }\n\n    /**\n     * Log ending notes.\n     */\n    public function logEndingNotes(): void\n    {\n        // Do not show execution time for index\n        $this->log('Peak memory usage: ' . (memory_get_peak_usage(true) / 1024 / 1024) . 'MB');\n    }\n\n    /**\n     * Log a line about the write operation.\n     */\n    public function logWrite(IWriter $writer, string $path, float $callStartTime): void\n    {\n        $callEndTime = microtime(true);\n        $callTime = $callEndTime - $callStartTime;\n        $reflection = new ReflectionClass($writer);\n        $format = $reflection->getShortName();\n\n        $codePath = $this->isCli() ? $path : \"<code>$path</code>\";\n        $message = \"Write {$format} format to {$codePath}  in \" . sprintf('%.4f', $callTime) . ' seconds';\n\n        $this->log($message);\n    }\n\n    /**\n     * Log a line about the read operation.\n     */\n    public function logRead(string $format, string $path, float $callStartTime): void\n    {\n        $callEndTime = microtime(true);\n        $callTime = $callEndTime - $callStartTime;\n        $message = \"Read {$format} format from <code>{$path}</code>  in \" . sprintf('%.4f', $callTime) . ' seconds';\n\n        $this->log($message);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Helper/Size.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Helper;\n\nuse Stringable;\n\nclass Size implements Stringable\n{\n    const REGEXP_SIZE_VALIDATION = '/^(?P<size>\\d*\\.?\\d+)(?P<unit>pt|px|em)?$/i';\n\n    protected bool $valid = false;\n\n    protected string $size = '';\n\n    protected string $unit = '';\n\n    public function __construct(string $size)\n    {\n        if (1 === preg_match(self::REGEXP_SIZE_VALIDATION, $size, $matches)) {\n            $this->valid = true;\n            $this->size = $matches['size'];\n            $this->unit = $matches['unit'] ?? 'pt';\n        }\n    }\n\n    public function valid(): bool\n    {\n        return $this->valid;\n    }\n\n    public function size(): string\n    {\n        return $this->size;\n    }\n\n    public function unit(): string\n    {\n        return $this->unit;\n    }\n\n    public function __toString(): string\n    {\n        return $this->size . $this->unit;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Helper/TextGrid.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Helper;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass TextGrid\n{\n    protected bool $isCli;\n\n    /** @var mixed[][] */\n    protected array $matrix;\n\n    /** @var int[] */\n    protected array $rows;\n\n    /** @var string[] */\n    protected array $columns;\n\n    protected string $gridDisplay;\n\n    protected bool $rowDividers = false;\n\n    protected bool $rowHeaders = true;\n\n    protected bool $columnHeaders = true;\n\n    protected TextGridRightAlign $numbersRight = TextGridRightAlign::none;\n\n    /** @param mixed[][] $matrix */\n    public function __construct(array $matrix, bool $isCli = true, bool $rowDividers = false, bool $rowHeaders = true, bool $columnHeaders = true, TextGridRightAlign $numbersRight = TextGridRightAlign::none)\n    {\n        $this->rows = array_keys($matrix);\n        $this->columns = array_keys($matrix[$this->rows[0]]);\n\n        $matrix = array_values($matrix);\n        array_walk(\n            $matrix,\n            function (&$row): void {\n                $row = array_values($row);\n            }\n        );\n\n        $this->matrix = $matrix;\n        $this->isCli = $isCli;\n        $this->rowDividers = $rowDividers;\n        $this->rowHeaders = $rowHeaders;\n        $this->columnHeaders = $columnHeaders;\n        $this->numbersRight = $numbersRight;\n    }\n\n    public function setNumbersRight(TextGridRightAlign $numbersRight): void\n    {\n        $this->numbersRight = $numbersRight;\n    }\n\n    public function render(): string\n    {\n        $this->gridDisplay = $this->isCli ? '' : ('<pre>' . PHP_EOL);\n\n        if (!empty($this->rows)) {\n            $maxRow = max($this->rows);\n            $maxRowLength = $this->strlen((string) $maxRow) + 1;\n            $columnWidths = $this->getColumnWidths();\n\n            $this->renderColumnHeader($maxRowLength, $columnWidths);\n            $this->renderRows($maxRowLength, $columnWidths);\n            if (!$this->rowDividers) {\n                $this->renderFooter($maxRowLength, $columnWidths);\n            }\n        }\n\n        $this->gridDisplay .= $this->isCli ? '' : '</pre>';\n\n        return $this->gridDisplay;\n    }\n\n    /** @param int[] $columnWidths */\n    protected function renderRows(int $maxRowLength, array $columnWidths): void\n    {\n        foreach ($this->matrix as $row => $rowData) {\n            if ($this->rowHeaders) {\n                $this->gridDisplay .= '|' . str_pad((string) $this->rows[$row], $maxRowLength, ' ', STR_PAD_LEFT) . ' ';\n            }\n            $this->renderCells($rowData, $columnWidths);\n            $this->gridDisplay .= '|' . PHP_EOL;\n            if ($this->rowDividers) {\n                $this->renderFooter($maxRowLength, $columnWidths);\n            }\n        }\n    }\n\n    /**\n     * @param mixed[] $rowData\n     * @param int[] $columnWidths\n     */\n    protected function renderCells(array $rowData, array $columnWidths): void\n    {\n        foreach ($rowData as $column => $cell) {\n            $valueForLength = $this->getString($cell);\n            $displayCell = $this->isCli ? $valueForLength : htmlentities($valueForLength);\n            $this->gridDisplay .= '| ';\n            if ($this->rightAlign($displayCell, $cell)) {\n                $this->gridDisplay .= str_repeat(' ', $columnWidths[$column] - $this->strlen($valueForLength)) . $displayCell . ' ';\n            } else {\n                $this->gridDisplay .= $displayCell . str_repeat(' ', $columnWidths[$column] - $this->strlen($valueForLength) + 1);\n            }\n        }\n    }\n\n    protected function rightAlign(string $displayCell, mixed $cell = null): bool\n    {\n        return ($this->numbersRight === TextGridRightAlign::numeric && is_numeric($displayCell)) || ($this->numbersRight === TextGridRightAlign::floatOrInt && (is_int($cell) || is_float($cell)));\n    }\n\n    /** @param int[] $columnWidths */\n    protected function renderColumnHeader(int $maxRowLength, array &$columnWidths): void\n    {\n        if (!$this->columnHeaders) {\n            $this->renderFooter($maxRowLength, $columnWidths);\n\n            return;\n        }\n        foreach ($this->columns as $column => $reference) {\n            /** @var string $reference */\n            $columnWidths[$column] = max($columnWidths[$column], $this->strlen($reference));\n        }\n        if ($this->rowHeaders) {\n            $this->gridDisplay .= str_repeat(' ', $maxRowLength + 2);\n        }\n        foreach ($this->columns as $column => $reference) {\n            $this->gridDisplay .= '+-' . str_repeat('-', $columnWidths[$column] + 1);\n        }\n        $this->gridDisplay .= '+' . PHP_EOL;\n\n        if ($this->rowHeaders) {\n            $this->gridDisplay .= str_repeat(' ', $maxRowLength + 2);\n        }\n        foreach ($this->columns as $column => $reference) {\n            /** @var scalar $reference */\n            $this->gridDisplay .= '| ' . str_pad((string) $reference, $columnWidths[$column] + 1, ' ');\n        }\n        $this->gridDisplay .= '|' . PHP_EOL;\n\n        $this->renderFooter($maxRowLength, $columnWidths);\n    }\n\n    /** @param int[] $columnWidths */\n    protected function renderFooter(int $maxRowLength, array $columnWidths): void\n    {\n        if ($this->rowHeaders) {\n            $this->gridDisplay .= '+' . str_repeat('-', $maxRowLength + 1);\n        }\n        foreach ($this->columns as $column => $reference) {\n            $this->gridDisplay .= '+-';\n            $this->gridDisplay .= str_pad((string) '', $columnWidths[$column] + 1, '-');\n        }\n        $this->gridDisplay .= '+' . PHP_EOL;\n    }\n\n    /** @return int[] */\n    protected function getColumnWidths(): array\n    {\n        $columnCount = count($this->matrix, COUNT_RECURSIVE) / count($this->matrix);\n        $columnWidths = [];\n        for ($column = 0; $column < $columnCount; ++$column) {\n            $columnWidths[] = $this->getColumnWidth(array_column($this->matrix, $column));\n        }\n\n        return $columnWidths;\n    }\n\n    /** @param mixed[] $columnData */\n    protected function getColumnWidth(array $columnData): int\n    {\n        $columnWidth = 0;\n        $columnData = array_values($columnData);\n\n        foreach ($columnData as $columnValue) {\n            $columnWidth = max($columnWidth, $this->strlen($this->getString($columnValue)));\n        }\n\n        return $columnWidth;\n    }\n\n    protected function getString(mixed $value): string\n    {\n        return StringHelper::convertToString($value, convertBool: true);\n    }\n\n    protected function strlen(string $value): int\n    {\n        return mb_strlen($value);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Helper/TextGridRightAlign.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Helper;\n\nenum TextGridRightAlign\n{\n    case none;\n    case numeric;\n    case floatOrInt;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/IComparable.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\ninterface IComparable\n{\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/IOFactory.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\IWriter;\n\n/**\n * Factory to create readers and writers easily.\n *\n * It is not required to use this class, but it should make it easier to read and write files.\n * Especially for reading files with an unknown format.\n */\nabstract class IOFactory\n{\n    public const READER_XLSX = 'Xlsx';\n    public const READER_XLS = 'Xls';\n    public const READER_XML = 'Xml';\n    public const READER_ODS = 'Ods';\n    public const READER_SYLK = 'Slk';\n    public const READER_SLK = 'Slk';\n    public const READER_GNUMERIC = 'Gnumeric';\n    public const READER_HTML = 'Html';\n    public const READER_CSV = 'Csv';\n\n    public const WRITER_XLSX = 'Xlsx';\n    public const WRITER_XLS = 'Xls';\n    public const WRITER_ODS = 'Ods';\n    public const WRITER_CSV = 'Csv';\n    public const WRITER_HTML = 'Html';\n\n    /** @var array<string, class-string<IReader>> */\n    private static array $readers = [\n        self::READER_XLSX => Reader\\Xlsx::class,\n        self::READER_XLS => Reader\\Xls::class,\n        self::READER_XML => Reader\\Xml::class,\n        self::READER_ODS => Reader\\Ods::class,\n        self::READER_SLK => Reader\\Slk::class,\n        self::READER_GNUMERIC => Reader\\Gnumeric::class,\n        self::READER_HTML => Reader\\Html::class,\n        self::READER_CSV => Reader\\Csv::class,\n    ];\n\n    /** @var array<string, class-string<IWriter>> */\n    private static array $writers = [\n        self::WRITER_XLS => Writer\\Xls::class,\n        self::WRITER_XLSX => Writer\\Xlsx::class,\n        self::WRITER_ODS => Writer\\Ods::class,\n        self::WRITER_CSV => Writer\\Csv::class,\n        self::WRITER_HTML => Writer\\Html::class,\n        'Tcpdf' => Writer\\Pdf\\Tcpdf::class,\n        'Dompdf' => Writer\\Pdf\\Dompdf::class,\n        'Mpdf' => Writer\\Pdf\\Mpdf::class,\n    ];\n\n    /** @internal */\n    public static function restoreDefaultReadersAndWriters(): void\n    {\n        self::$readers = [\n            self::READER_XLSX => Reader\\Xlsx::class,\n            self::READER_XLS => Reader\\Xls::class,\n            self::READER_XML => Reader\\Xml::class,\n            self::READER_ODS => Reader\\Ods::class,\n            self::READER_SLK => Reader\\Slk::class,\n            self::READER_GNUMERIC => Reader\\Gnumeric::class,\n            self::READER_HTML => Reader\\Html::class,\n            self::READER_CSV => Reader\\Csv::class,\n        ];\n        self::$writers = [\n            self::WRITER_XLS => Writer\\Xls::class,\n            self::WRITER_XLSX => Writer\\Xlsx::class,\n            self::WRITER_ODS => Writer\\Ods::class,\n            self::WRITER_CSV => Writer\\Csv::class,\n            self::WRITER_HTML => Writer\\Html::class,\n            'Tcpdf' => Writer\\Pdf\\Tcpdf::class,\n            'Dompdf' => Writer\\Pdf\\Dompdf::class,\n            'Mpdf' => Writer\\Pdf\\Mpdf::class,\n        ];\n    }\n\n    /**\n     * Create Writer\\IWriter.\n     */\n    public static function createWriter(Spreadsheet $spreadsheet, string $writerType): IWriter\n    {\n        /** @var class-string<IWriter> */\n        $className = $writerType;\n        if (!in_array($writerType, self::$writers, true)) {\n            if (!isset(self::$writers[$writerType])) {\n                throw new Writer\\Exception(\"No writer found for type $writerType\");\n            }\n\n            // Instantiate writer\n            $className = self::$writers[$writerType];\n        }\n\n        return new $className($spreadsheet);\n    }\n\n    /**\n     * Create IReader.\n     */\n    public static function createReader(string $readerType): IReader\n    {\n        /** @var class-string<IReader> */\n        $className = $readerType;\n        if (!in_array($readerType, self::$readers, true)) {\n            if (!isset(self::$readers[$readerType])) {\n                throw new Reader\\Exception(\"No reader found for type $readerType\");\n            }\n\n            // Instantiate reader\n            $className = self::$readers[$readerType];\n        }\n\n        return new $className();\n    }\n\n    /**\n     * Loads Spreadsheet from file using automatic Reader\\IReader resolution.\n     *\n     * @param string $filename The name of the spreadsheet file\n     * @param int $flags the optional second parameter flags may be used to identify specific elements\n     *                       that should be loaded, but which won't be loaded by default, using these values:\n     *                            IReader::LOAD_WITH_CHARTS - Include any charts that are defined in the loaded file.\n     *                            IReader::READ_DATA_ONLY - Read cell values only, not formatting or merge structure.\n     *                            IReader::IGNORE_EMPTY_CELLS - Don't load empty cells into the model.\n     * @param string[] $readers An array of Readers to use to identify the file type. By default, load() will try\n     *                             all possible Readers until it finds a match; but this allows you to pass in a\n     *                             list of Readers so it will only try the subset that you specify here.\n     *                          Values in this list can be any of the constant values defined in the set\n     *                                 IOFactory::READER_*.\n     */\n    public static function load(string $filename, int $flags = 0, ?array $readers = null): Spreadsheet\n    {\n        $reader = self::createReaderForFile($filename, $readers);\n\n        return $reader->load($filename, $flags);\n    }\n\n    /**\n     * Identify file type using automatic IReader resolution.\n     *\n     * @param string[] $readers\n     */\n    public static function identify(string $filename, ?array $readers = null, bool $fullClassName = false): string\n    {\n        $reader = self::createReaderForFile($filename, $readers);\n        $className = $reader::class;\n        if ($fullClassName) {\n            return $className;\n        }\n        $classType = explode('\\\\', $className);\n\n        return array_pop($classType);\n    }\n\n    /**\n     * Create Reader\\IReader for file using automatic IReader resolution.\n     *\n     * @param string[] $readers An array of Readers to use to identify the file type. By default, load() will try\n     *                             all possible Readers until it finds a match; but this allows you to pass in a\n     *                             list of Readers so it will only try the subset that you specify here.\n     *                          Values in this list can be any of the constant values defined in the set\n     *                                 IOFactory::READER_*.\n     */\n    public static function createReaderForFile(string $filename, ?array $readers = null): IReader\n    {\n        File::assertFile($filename);\n\n        $testReaders = self::$readers;\n        if ($readers !== null) {\n            $readers = array_map('strtoupper', $readers);\n            $testReaders = array_filter(\n                self::$readers,\n                fn (string $readerType): bool => in_array(strtoupper($readerType), $readers, true),\n                ARRAY_FILTER_USE_KEY\n            );\n        }\n\n        // First, lucky guess by inspecting file extension\n        $guessedReader = self::getReaderTypeFromExtension($filename);\n        if (($guessedReader !== null) && array_key_exists($guessedReader, $testReaders)) {\n            $reader = self::createReader($guessedReader);\n\n            // Let's see if we are lucky\n            if ($reader->canRead($filename)) {\n                return $reader;\n            }\n        }\n\n        // If we reach here then \"lucky guess\" didn't give any result\n        // Try walking through all the options in self::$readers (or the selected subset)\n        foreach ($testReaders as $readerType => $class) {\n            //    Ignore our original guess, we know that won't work\n            if ($readerType !== $guessedReader) {\n                $reader = self::createReader($readerType);\n                if ($reader->canRead($filename)) {\n                    return $reader;\n                }\n            }\n        }\n\n        throw new Reader\\Exception('Unable to identify a reader for this file');\n    }\n\n    /**\n     * Guess a reader type from the file extension, if any.\n     */\n    private static function getReaderTypeFromExtension(string $filename): ?string\n    {\n        $pathinfo = pathinfo($filename);\n        if (!isset($pathinfo['extension'])) {\n            return null;\n        }\n\n        return match (strtolower($pathinfo['extension'])) {\n            // Excel (OfficeOpenXML) Spreadsheet\n            'xlsx',\n            // Excel (OfficeOpenXML) Macro Spreadsheet (macros will be discarded)\n            'xlsm',\n            // Excel (OfficeOpenXML) Template\n            'xltx',\n            // Excel (OfficeOpenXML) Macro Template (macros will be discarded)\n            'xltm' => 'Xlsx',\n            // Excel (BIFF) Spreadsheet\n            'xls',\n            // Excel (BIFF) Template\n            'xlt' => 'Xls',\n            // Open/Libre Offic Calc\n            'ods',\n            // Open/Libre Offic Calc Template\n            'ots' => 'Ods',\n            'slk' => 'Slk',\n            // Excel 2003 SpreadSheetML\n            'xml' => 'Xml',\n            'gnumeric' => 'Gnumeric',\n            'htm', 'html' => 'Html',\n            // Do nothing\n            // We must not try to use CSV reader since it loads\n            // all files including Excel files etc.\n            'csv' => null,\n            default => null,\n        };\n    }\n\n    /**\n     * Register a writer with its type and class name.\n     *\n     * @param class-string<IWriter> $writerClass\n     */\n    public static function registerWriter(string $writerType, string $writerClass): void\n    {\n        // We want phpstan to validate caller, but still need this test\n        if (!is_a($writerClass, IWriter::class, true)) { //* @phpstan-ignore-line\n            throw new Writer\\Exception('Registered writers must implement ' . IWriter::class);\n        }\n\n        self::$writers[$writerType] = $writerClass;\n    }\n\n    /**\n     * Register a reader with its type and class name.\n     *\n     * @param class-string<IReader> $readerClass\n     */\n    public static function registerReader(string $readerType, string $readerClass): void\n    {\n        // We want phpstan to validate caller, but still need this test\n        if (!is_a($readerClass, IReader::class, true)) { //* @phpstan-ignore-line\n            throw new Reader\\Exception('Registered readers must implement ' . IReader::class);\n        }\n\n        self::$readers[$readerType] = $readerClass;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/NamedFormula.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass NamedFormula extends DefinedName\n{\n    /**\n     * Create a new Named Formula.\n     */\n    public function __construct(\n        string $name,\n        ?Worksheet $worksheet = null,\n        ?string $formula = null,\n        bool $localOnly = false,\n        ?Worksheet $scope = null\n    ) {\n        // Validate data\n        if (!isset($formula)) {\n            throw new Exception('You must specify a Formula value for a Named Formula');\n        }\n        parent::__construct($name, $worksheet, $formula, $localOnly, $scope);\n    }\n\n    /**\n     * Get the formula value.\n     */\n    public function getFormula(): string\n    {\n        return $this->value;\n    }\n\n    /**\n     * Set the formula value.\n     */\n    public function setFormula(string $formula): self\n    {\n        if (!empty($formula)) {\n            $this->value = $formula;\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/NamedRange.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass NamedRange extends DefinedName\n{\n    /**\n     * Create a new Named Range.\n     */\n    public function __construct(\n        string $name,\n        ?Worksheet $worksheet = null,\n        string $range = 'A1',\n        bool $localOnly = false,\n        ?Worksheet $scope = null\n    ) {\n        if ($worksheet === null && $scope === null) {\n            throw new Exception('You must specify a worksheet or a scope for a Named Range');\n        }\n        parent::__construct($name, $worksheet, $range, $localOnly, $scope);\n    }\n\n    /**\n     * Get the range value.\n     */\n    public function getRange(): string\n    {\n        return $this->value;\n    }\n\n    /**\n     * Set the range value.\n     */\n    public function setRange(string $range): self\n    {\n        if (!empty($range)) {\n            $this->value = $range;\n        }\n\n        return $this;\n    }\n\n    /** @return string[] */\n    public function getCellsInRange(): array\n    {\n        $range = $this->value;\n        if (str_starts_with($range, '=')) {\n            $range = substr($range, 1);\n        }\n\n        return Coordinate::extractAllCellReferencesInRange($range);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/BaseReader.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse Closure;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Security\\XmlScanner;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nabstract class BaseReader implements IReader\n{\n    /**\n     * Read data only?\n     * Identifies whether the Reader should only read data values for cells, and ignore any formatting information;\n     *        or whether it should read both data and formatting.\n     */\n    protected bool $readDataOnly = false;\n\n    /**\n     * Read empty cells?\n     * Identifies whether the Reader should read data values for all cells, or should ignore cells containing\n     *         null value or empty string.\n     */\n    protected bool $readEmptyCells = true;\n\n    /**\n     * Read charts that are defined in the workbook?\n     * Identifies whether the Reader should read the definitions for any charts that exist in the workbook;.\n     */\n    protected bool $includeCharts = false;\n\n    /**\n     * Restrict which sheets should be loaded?\n     * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.\n     * This property is ignored for Csv, Html, and Slk.\n     *\n     * @var null|string[]\n     */\n    protected ?array $loadSheetsOnly = null;\n\n    /**\n     * Ignore rows with no cells?\n     * Identifies whether the Reader should ignore rows with no cells.\n     *        Currently implemented only for Xlsx.\n     */\n    protected bool $ignoreRowsWithNoCells = false;\n\n    /**\n     * Allow external images. Use with caution.\n     * Improper specification of these within a spreadsheet\n     * can subject the caller to security exploits.\n     */\n    protected bool $allowExternalImages = false;\n\n    /**\n     * Create a blank sheet if none are read,\n     * possibly due to a typo when using LoadSheetsOnly.\n     */\n    protected bool $createBlankSheetIfNoneRead = false;\n\n    /**\n     * Enable drawing pass-through?\n     * Identifies whether the Reader should preserve unsupported drawing elements (shapes, grouped images, etc.)\n     * by storing the original XML for pass-through during write operations.\n     * When enabled, drawings cannot be modified programmatically but are preserved exactly.\n     */\n    protected bool $enableDrawingPassThrough = false;\n\n    /**\n     * IReadFilter instance.\n     */\n    protected IReadFilter $readFilter;\n\n    /** @var resource */\n    protected $fileHandle;\n\n    protected ?XmlScanner $securityScanner = null;\n\n    protected ?IValueBinder $valueBinder = null;\n\n    /** @var null|Closure(string):bool function to return whether image path is okay */\n    protected ?Closure $isWhitelisted = null;\n\n    public function __construct()\n    {\n        $this->readFilter = new DefaultReadFilter();\n    }\n\n    public function getReadDataOnly(): bool\n    {\n        return $this->readDataOnly;\n    }\n\n    public function setReadDataOnly(bool $readCellValuesOnly): self\n    {\n        $this->readDataOnly = $readCellValuesOnly;\n\n        return $this;\n    }\n\n    public function getReadEmptyCells(): bool\n    {\n        return $this->readEmptyCells;\n    }\n\n    public function setReadEmptyCells(bool $readEmptyCells): self\n    {\n        $this->readEmptyCells = $readEmptyCells;\n\n        return $this;\n    }\n\n    public function getIgnoreRowsWithNoCells(): bool\n    {\n        return $this->ignoreRowsWithNoCells;\n    }\n\n    public function setIgnoreRowsWithNoCells(bool $ignoreRowsWithNoCells): self\n    {\n        $this->ignoreRowsWithNoCells = $ignoreRowsWithNoCells;\n\n        return $this;\n    }\n\n    public function getIncludeCharts(): bool\n    {\n        return $this->includeCharts;\n    }\n\n    public function setIncludeCharts(bool $includeCharts): self\n    {\n        $this->includeCharts = $includeCharts;\n\n        return $this;\n    }\n\n    public function getEnableDrawingPassThrough(): bool\n    {\n        return $this->enableDrawingPassThrough;\n    }\n\n    public function setEnableDrawingPassThrough(bool $enableDrawingPassThrough): self\n    {\n        $this->enableDrawingPassThrough = $enableDrawingPassThrough;\n\n        return $this;\n    }\n\n    /** @return null|string[] */\n    public function getLoadSheetsOnly(): ?array\n    {\n        return $this->loadSheetsOnly;\n    }\n\n    /** @param null|string|string[] $sheetList */\n    public function setLoadSheetsOnly(string|array|null $sheetList): self\n    {\n        if ($sheetList === null) {\n            return $this->setLoadAllSheets();\n        }\n\n        $this->loadSheetsOnly = is_array($sheetList) ? $sheetList : [$sheetList];\n\n        return $this;\n    }\n\n    public function setLoadAllSheets(): self\n    {\n        $this->loadSheetsOnly = null;\n\n        return $this;\n    }\n\n    public function getReadFilter(): IReadFilter\n    {\n        return $this->readFilter;\n    }\n\n    public function setReadFilter(IReadFilter $readFilter): self\n    {\n        $this->readFilter = $readFilter;\n\n        return $this;\n    }\n\n    /**\n     * USE WITH CAUTION (and in conjunction with setIsWhiteListed)!\n     * Allow external images;\n     * these can be specified within a spreadsheet\n     * in a way that can subject the caller to security exploits.\n     */\n    public function setAllowExternalImages(bool $allowExternalImages): self\n    {\n        $this->allowExternalImages = $allowExternalImages;\n\n        return $this;\n    }\n\n    public function getAllowExternalImages(): bool\n    {\n        return $this->allowExternalImages;\n    }\n\n    /**\n     * USE WITH CAUTION!\n     * Supply a callback to determine whether a path should be whitelisted,\n     * used in conjunction with setAllowExternalImages;\n     * supplying a method which might return true\n     * can subject the caller to security exploits.\n     *\n     * @param Closure(string):bool $isWhitelisted\n     */\n    public function setIsWhitelisted(Closure $isWhitelisted): self\n    {\n        $this->isWhitelisted = $isWhitelisted;\n\n        return $this;\n    }\n\n    /**\n     * Create a blank sheet if none are read,\n     * possibly due to a typo when using LoadSheetsOnly.\n     */\n    public function setCreateBlankSheetIfNoneRead(bool $createBlankSheetIfNoneRead): self\n    {\n        $this->createBlankSheetIfNoneRead = $createBlankSheetIfNoneRead;\n\n        return $this;\n    }\n\n    public function getSecurityScanner(): ?XmlScanner\n    {\n        return $this->securityScanner;\n    }\n\n    public function getSecurityScannerOrThrow(): XmlScanner\n    {\n        if ($this->securityScanner === null) {\n            throw new ReaderException('Security scanner is unexpectedly null');\n        }\n\n        return $this->securityScanner;\n    }\n\n    protected function processFlags(int $flags): void\n    {\n        if (((bool) ($flags & self::LOAD_WITH_CHARTS)) === true) {\n            $this->setIncludeCharts(true);\n        }\n        if (((bool) ($flags & self::READ_DATA_ONLY)) === true) {\n            $this->setReadDataOnly(true);\n        }\n        if (((bool) ($flags & self::IGNORE_EMPTY_CELLS)) === true) {\n            $this->setReadEmptyCells(false);\n        }\n        if (((bool) ($flags & self::IGNORE_ROWS_WITH_NO_CELLS)) === true) {\n            $this->setIgnoreRowsWithNoCells(true);\n        }\n        if (((bool) ($flags & self::ALLOW_EXTERNAL_IMAGES)) === true) {\n            $this->setAllowExternalImages(true);\n        }\n        if (((bool) ($flags & self::DONT_ALLOW_EXTERNAL_IMAGES)) === true) {\n            $this->setAllowExternalImages(false);\n        }\n        if (((bool) ($flags & self::CREATE_BLANK_SHEET_IF_NONE_READ)) === true) {\n            $this->setCreateBlankSheetIfNoneRead(true);\n        }\n    }\n\n    protected function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        throw new PhpSpreadsheetException('Reader classes must implement their own loadSpreadsheetFromFile() method');\n    }\n\n    /**\n     * Loads Spreadsheet from file.\n     *\n     * @param int $flags the optional second parameter flags may be used to identify specific elements\n     *                       that should be loaded, but which won't be loaded by default, using these values:\n     *                            IReader::LOAD_WITH_CHARTS - Include any charts that are defined in the loaded file\n     */\n    public function load(string $filename, int $flags = 0): Spreadsheet\n    {\n        $this->processFlags($flags);\n\n        try {\n            return $this->loadSpreadsheetFromFile($filename);\n        } catch (ReaderException $e) {\n            throw $e;\n        }\n    }\n\n    /**\n     * Open file for reading.\n     */\n    protected function openFile(string $filename): void\n    {\n        $fileHandle = false;\n        if ($filename) {\n            File::assertFile($filename);\n\n            // Open file\n            $fileHandle = fopen($filename, 'rb');\n        }\n        if ($fileHandle === false) {\n            throw new ReaderException('Could not open file ' . $filename . ' for reading.');\n        }\n\n        $this->fileHandle = $fileHandle;\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        throw new PhpSpreadsheetException('Reader classes must implement their own listWorksheetInfo() method');\n    }\n\n    /**\n     * Returns names of the worksheets from a file,\n     * possibly without parsing the whole file to a Spreadsheet object.\n     * Readers will often have a more efficient method with which\n     * they can override this method.\n     *\n     * @return string[]\n     */\n    public function listWorksheetNames(string $filename): array\n    {\n        $returnArray = [];\n        $info = $this->listWorksheetInfo($filename);\n        foreach ($info as $infoArray) {\n            $returnArray[] = $infoArray['worksheetName'];\n        }\n\n        return $returnArray;\n    }\n\n    public function getValueBinder(): ?IValueBinder\n    {\n        return $this->valueBinder;\n    }\n\n    public function setValueBinder(?IValueBinder $valueBinder): self\n    {\n        $this->valueBinder = $valueBinder;\n\n        return $this;\n    }\n\n    protected function newSpreadsheet(): Spreadsheet\n    {\n        return new Spreadsheet();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Csv/Delimiter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\n\nclass Delimiter\n{\n    protected const POTENTIAL_DELIMITERS = [',', ';', \"\\t\", '|', ':', ' ', '~'];\n\n    /** @var resource */\n    protected $fileHandle;\n\n    protected string $escapeCharacter;\n\n    protected string $enclosure;\n\n    /** @var array<string, int[]> */\n    protected array $counts = [];\n\n    protected int $numberLines = 0;\n\n    protected ?string $delimiter = null;\n\n    /**\n     * @param resource $fileHandle\n     */\n    public function __construct($fileHandle, string $escapeCharacter, string $enclosure)\n    {\n        $this->fileHandle = $fileHandle;\n        $this->escapeCharacter = $escapeCharacter;\n        $this->enclosure = $enclosure;\n\n        $this->countPotentialDelimiters();\n    }\n\n    public function getDefaultDelimiter(): string\n    {\n        return self::POTENTIAL_DELIMITERS[0];\n    }\n\n    public function linesCounted(): int\n    {\n        return $this->numberLines;\n    }\n\n    protected function countPotentialDelimiters(): void\n    {\n        $this->counts = array_fill_keys(self::POTENTIAL_DELIMITERS, []);\n        $delimiterKeys = array_flip(self::POTENTIAL_DELIMITERS);\n\n        // Count how many times each of the potential delimiters appears in each line\n        $this->numberLines = 0;\n        while (($line = $this->getNextLine()) !== false && (++$this->numberLines < 1000)) {\n            $this->countDelimiterValues($line, $delimiterKeys);\n        }\n    }\n\n    /** @param array<string, int> $delimiterKeys */\n    protected function countDelimiterValues(string $line, array $delimiterKeys): void\n    {\n        $splitString = mb_str_split($line, 1, 'UTF-8');\n        $distribution = array_count_values($splitString);\n        $countLine = array_intersect_key($distribution, $delimiterKeys);\n\n        foreach (self::POTENTIAL_DELIMITERS as $delimiter) {\n            $this->counts[$delimiter][] = $countLine[$delimiter] ?? 0;\n        }\n    }\n\n    public function infer(): ?string\n    {\n        // Calculate the mean square deviations for each delimiter\n        //     (ignoring delimiters that haven't been found consistently)\n        $meanSquareDeviations = [];\n        $middleIdx = (int) floor(($this->numberLines - 1) / 2);\n\n        foreach (self::POTENTIAL_DELIMITERS as $delimiter) {\n            $series = $this->counts[$delimiter];\n            sort($series);\n\n            $median = ($this->numberLines % 2)\n                ? $series[$middleIdx]\n                : ($series[$middleIdx] + $series[$middleIdx + 1]) / 2;\n\n            if ($median === 0) {\n                continue;\n            }\n\n            $meanSquareDeviations[$delimiter] = array_reduce(\n                $series,\n                fn ($sum, $value): int|float => $sum + ($value - $median) ** 2\n            ) / count($series);\n        }\n\n        // ... and pick the delimiter with the smallest mean square deviation\n        //         (in case of ties, the order in potentialDelimiters is respected)\n        $min = INF;\n        foreach (self::POTENTIAL_DELIMITERS as $delimiter) {\n            if (!isset($meanSquareDeviations[$delimiter])) {\n                continue;\n            }\n\n            if ($meanSquareDeviations[$delimiter] < $min) {\n                $min = $meanSquareDeviations[$delimiter];\n                $this->delimiter = $delimiter;\n            }\n        }\n\n        return $this->delimiter;\n    }\n\n    /**\n     * Get the next full line from the file.\n     *\n     * @return false|string\n     */\n    public function getNextLine()\n    {\n        $line = '';\n        $enclosure = ($this->escapeCharacter === '' ? ''\n                : ('(?<!' . preg_quote($this->escapeCharacter, '/') . ')'))\n            . preg_quote($this->enclosure, '/');\n\n        do {\n            // Get the next line in the file\n            $newLine = fgets($this->fileHandle);\n\n            // Return false if there is no next line\n            if ($newLine === false) {\n                return false;\n            }\n\n            // Add the new line to the line passed in\n            $line = $line . $newLine;\n\n            // Drop everything that is enclosed to avoid counting false positives in enclosures\n            $line = (string) preg_replace('/(' . $enclosure . '.*' . $enclosure . ')/Us', '', $line);\n\n            // See if we have any enclosures left in the line\n            // if we still have an enclosure then we need to read the next line as well\n        } while (preg_match('/(' . $enclosure . ')/', $line) > 0);\n\n        return ($line !== '') ? $line : false;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Csv.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv\\Delimiter;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Throwable;\n\nclass Csv extends BaseReader\n{\n    const DEFAULT_FALLBACK_ENCODING = 'CP1252';\n    const GUESS_ENCODING = 'guess';\n    const UTF8_BOM = \"\\xEF\\xBB\\xBF\";\n    const UTF8_BOM_LEN = 3;\n    const UTF16BE_BOM = \"\\xfe\\xff\";\n    const UTF16BE_BOM_LEN = 2;\n    const UTF16BE_LF = \"\\x00\\x0a\";\n    const UTF16LE_BOM = \"\\xff\\xfe\";\n    const UTF16LE_BOM_LEN = 2;\n    const UTF16LE_LF = \"\\x0a\\x00\";\n    const UTF32BE_BOM = \"\\x00\\x00\\xfe\\xff\";\n    const UTF32BE_BOM_LEN = 4;\n    const UTF32BE_LF = \"\\x00\\x00\\x00\\x0a\";\n    const UTF32LE_BOM = \"\\xff\\xfe\\x00\\x00\";\n    const UTF32LE_BOM_LEN = 4;\n    const UTF32LE_LF = \"\\x0a\\x00\\x00\\x00\";\n\n    /**\n     * Input encoding.\n     */\n    private string $inputEncoding = 'UTF-8';\n\n    /**\n     * Fallback encoding if guess strikes out.\n     */\n    private string $fallbackEncoding = self::DEFAULT_FALLBACK_ENCODING;\n\n    /**\n     * Delimiter.\n     */\n    private ?string $delimiter = null;\n\n    /**\n     * Enclosure.\n     */\n    private string $enclosure = '\"';\n\n    /**\n     * Sheet index to read.\n     */\n    private int $sheetIndex = 0;\n\n    /**\n     * Load rows contiguously.\n     */\n    private bool $contiguous = false;\n\n    /**\n     * The character that can escape the enclosure.\n     * This will probably become unsupported in Php 9.\n     * Not yet ready to mark deprecated in order to give users\n     * a migration path.\n     */\n    private ?string $escapeCharacter = null;\n\n    /**\n     * Callback for setting defaults in construction.\n     *\n     * @var ?callable\n     */\n    private static $constructorCallback;\n\n    /** Changed from true to false in release 4.0.0 */\n    public const DEFAULT_TEST_AUTODETECT = false;\n\n    /**\n     * Attempt autodetect line endings (deprecated after PHP8.1)?\n     */\n    private bool $testAutodetect = self::DEFAULT_TEST_AUTODETECT;\n\n    protected bool $castFormattedNumberToNumeric = false;\n\n    protected bool $preserveNumericFormatting = false;\n\n    private bool $preserveNullString = false;\n\n    private bool $sheetNameIsFileName = false;\n\n    private string $getTrue = 'true';\n\n    private string $getFalse = 'false';\n\n    private string $thousandsSeparator = ',';\n\n    private string $decimalSeparator = '.';\n\n    /**\n     * Create a new CSV Reader instance.\n     */\n    public function __construct()\n    {\n        parent::__construct();\n        $callback = self::$constructorCallback;\n        if ($callback !== null) {\n            $callback($this);\n        }\n    }\n\n    /**\n     * Set a callback to change the defaults.\n     *\n     * The callback must accept the Csv Reader object as the first parameter,\n     * and it should return void.\n     */\n    public static function setConstructorCallback(?callable $callback): void\n    {\n        self::$constructorCallback = $callback;\n    }\n\n    public static function getConstructorCallback(): ?callable\n    {\n        return self::$constructorCallback;\n    }\n\n    public function setInputEncoding(string $encoding): self\n    {\n        $this->inputEncoding = $encoding;\n\n        return $this;\n    }\n\n    public function getInputEncoding(): string\n    {\n        return $this->inputEncoding;\n    }\n\n    public function setFallbackEncoding(string $fallbackEncoding): self\n    {\n        $this->fallbackEncoding = $fallbackEncoding;\n\n        return $this;\n    }\n\n    public function getFallbackEncoding(): string\n    {\n        return $this->fallbackEncoding;\n    }\n\n    /**\n     * Move filepointer past any BOM marker.\n     */\n    protected function skipBOM(): void\n    {\n        rewind($this->fileHandle);\n\n        if (fgets($this->fileHandle, self::UTF8_BOM_LEN + 1) !== self::UTF8_BOM) {\n            rewind($this->fileHandle);\n        }\n    }\n\n    /**\n     * Identify any separator that is explicitly set in the file.\n     */\n    protected function checkSeparator(): void\n    {\n        $line = fgets($this->fileHandle);\n        if ($line === false) {\n            return;\n        }\n\n        if ((strlen(trim($line, \"\\r\\n\")) == 5) && (stripos($line, 'sep=') === 0)) {\n            $this->delimiter = substr($line, 4, 1);\n\n            return;\n        }\n\n        $this->skipBOM();\n    }\n\n    /**\n     * Infer the separator if it isn't explicitly set in the file or specified by the user.\n     */\n    protected function inferSeparator(): void\n    {\n        $temp = $this->delimiter;\n        if ($temp !== null) {\n            return;\n        }\n\n        $inferenceEngine = new Delimiter($this->fileHandle, $this->getEscapeCharacter(), $this->enclosure);\n\n        // If number of lines is 0, nothing to infer : fall back to the default\n        if ($inferenceEngine->linesCounted() === 0) {\n            $this->delimiter = $inferenceEngine->getDefaultDelimiter();\n            $this->skipBOM();\n\n            return;\n        }\n\n        $this->delimiter = $inferenceEngine->infer();\n\n        // If no delimiter could be detected, fall back to the default\n        if ($this->delimiter === null) {\n            $this->delimiter = $inferenceEngine->getDefaultDelimiter();\n        }\n\n        $this->skipBOM();\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        // Open file\n        $this->openFileOrMemory($filename);\n        $fileHandle = $this->fileHandle;\n\n        // Skip BOM, if any\n        $this->skipBOM();\n        $this->checkSeparator();\n        $this->inferSeparator();\n\n        $worksheetInfo = [\n            [\n                'worksheetName' => 'Worksheet',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 0,\n                'totalColumns' => 0,\n            ],\n        ];\n        $delimiter = $this->delimiter ?? '';\n\n        // Loop through each line of the file in turn\n        $rowData = self::getCsv($fileHandle, 0, $delimiter, $this->enclosure, $this->escapeCharacter);\n        while (is_array($rowData)) {\n            ++$worksheetInfo[0]['totalRows'];\n            $worksheetInfo[0]['lastColumnIndex'] = max($worksheetInfo[0]['lastColumnIndex'], count($rowData) - 1);\n            $rowData = self::getCsv($fileHandle, 0, $delimiter, $this->enclosure, $this->escapeCharacter);\n        }\n\n        $worksheetInfo[0]['lastColumnLetter'] = Coordinate::stringFromColumnIndex($worksheetInfo[0]['lastColumnIndex'] + 1, true);\n        $worksheetInfo[0]['totalColumns'] = $worksheetInfo[0]['lastColumnIndex'] + 1;\n        $worksheetInfo[0]['sheetState'] = Worksheet::SHEETSTATE_VISIBLE;\n\n        // Close file\n        fclose($fileHandle);\n\n        return $worksheetInfo;\n    }\n\n    /**\n     * Loads Spreadsheet from file.\n     */\n    protected function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        $spreadsheet = $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n\n        // Load into this instance\n        return $this->loadIntoExisting($filename, $spreadsheet);\n    }\n\n    /**\n     * Loads Spreadsheet from string.\n     */\n    public function loadSpreadsheetFromString(string $contents): Spreadsheet\n    {\n        $spreadsheet = $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n\n        // Load into this instance\n        return $this->loadStringOrFile('data://text/plain,' . urlencode($contents), $spreadsheet, true);\n    }\n\n    private function openFileOrMemory(string $filename): void\n    {\n        // Open file\n        $fhandle = $this->canRead($filename);\n        if (!$fhandle) {\n            throw new ReaderException($filename . ' is an Invalid Spreadsheet file.');\n        }\n        if ($this->inputEncoding === 'UTF-8') {\n            $encoding = self::guessEncodingBom($filename);\n            if ($encoding !== '') {\n                $this->inputEncoding = $encoding;\n            }\n        }\n        if ($this->inputEncoding === self::GUESS_ENCODING) {\n            $this->inputEncoding = self::guessEncoding($filename, $this->fallbackEncoding);\n        }\n        $this->openFile($filename);\n        if ($this->inputEncoding !== 'UTF-8') {\n            fclose($this->fileHandle);\n            $entireFile = file_get_contents($filename);\n            $fileHandle = fopen('php://memory', 'r+b');\n            if ($fileHandle !== false && $entireFile !== false) {\n                $this->fileHandle = $fileHandle;\n                $data = StringHelper::convertEncoding($entireFile, 'UTF-8', $this->inputEncoding);\n                fwrite($this->fileHandle, $data);\n                $this->skipBOM();\n            }\n        }\n    }\n\n    public function setTestAutoDetect(bool $value): self\n    {\n        $this->testAutodetect = $value;\n\n        return $this;\n    }\n\n    private function setAutoDetect(?string $value, int $version = PHP_VERSION_ID): ?string\n    {\n        $retVal = null;\n        if ($value !== null && $this->testAutodetect && $version < 90000) {\n            $retVal2 = @ini_set('auto_detect_line_endings', $value);\n            if (is_string($retVal2)) {\n                $retVal = $retVal2;\n            }\n        }\n\n        return $retVal;\n    }\n\n    public function castFormattedNumberToNumeric(\n        bool $castFormattedNumberToNumeric,\n        bool $preserveNumericFormatting = false\n    ): void {\n        $this->castFormattedNumberToNumeric = $castFormattedNumberToNumeric;\n        $this->preserveNumericFormatting = $preserveNumericFormatting;\n    }\n\n    /**\n     * Open data uri for reading.\n     */\n    private function openDataUri(string $filename): void\n    {\n        $fileHandle = fopen($filename, 'rb');\n        if ($fileHandle === false) {\n            // @codeCoverageIgnoreStart\n            throw new ReaderException('Could not open file ' . $filename . ' for reading.');\n            // @codeCoverageIgnoreEnd\n        }\n\n        $this->fileHandle = $fileHandle;\n    }\n\n    /**\n     * Loads PhpSpreadsheet from file into PhpSpreadsheet instance.\n     */\n    public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet): Spreadsheet\n    {\n        return $this->loadStringOrFile($filename, $spreadsheet, false);\n    }\n\n    /**\n     * Loads PhpSpreadsheet from file into PhpSpreadsheet instance.\n     */\n    private function loadStringOrFile(string $filename, Spreadsheet $spreadsheet, bool $dataUri): Spreadsheet\n    {\n        // Deprecated in Php8.1\n        $iniset = $this->setAutoDetect('1');\n\n        try {\n            $this->loadStringOrFile2($filename, $spreadsheet, $dataUri);\n            $this->setAutoDetect($iniset);\n        } catch (Throwable $e) {\n            $this->setAutoDetect($iniset);\n\n            throw $e;\n        }\n\n        return $spreadsheet;\n    }\n\n    private function loadStringOrFile2(string $filename, Spreadsheet $spreadsheet, bool $dataUri): void\n    {\n\n        // Open file\n        if ($dataUri) {\n            $this->openDataUri($filename);\n        } else {\n            $this->openFileOrMemory($filename);\n        }\n        $fileHandle = $this->fileHandle;\n\n        // Skip BOM, if any\n        $this->skipBOM();\n        $this->checkSeparator();\n        $this->inferSeparator();\n\n        // Create new PhpSpreadsheet object\n        while ($spreadsheet->getSheetCount() <= $this->sheetIndex) {\n            $spreadsheet->createSheet();\n        }\n        $sheet = $spreadsheet->setActiveSheetIndex($this->sheetIndex);\n        if ($this->sheetNameIsFileName) {\n            $sheet->setTitle(substr(basename($filename, '.csv'), 0, Worksheet::SHEET_TITLE_MAXIMUM_LENGTH));\n        }\n\n        // Set our starting row based on whether we're in contiguous mode or not\n        $currentRow = 1;\n        $outRow = 0;\n\n        // Loop through each line of the file in turn\n        $delimiter = $this->delimiter ?? '';\n        $rowData = self::getCsv($fileHandle, 0, $delimiter, $this->enclosure, $this->escapeCharacter);\n        $valueBinder = $this->valueBinder ?? Cell::getValueBinder();\n        $preserveBooleanString = method_exists($valueBinder, 'getBooleanConversion') && $valueBinder->getBooleanConversion();\n        $this->getTrue = Calculation::getTRUE();\n        $this->getFalse = Calculation::getFALSE();\n        $this->thousandsSeparator = StringHelper::getThousandsSeparator();\n        $this->decimalSeparator = StringHelper::getDecimalSeparator();\n        while (is_array($rowData)) {\n            $noOutputYet = true;\n            $columnLetter = 'A';\n            foreach ($rowData as $rowDatum) {\n                if ($preserveBooleanString) {\n                    $rowDatum = $rowDatum ?? '';\n                } else {\n                    $this->convertBoolean($rowDatum);\n                }\n                $numberFormatMask = $this->castFormattedNumberToNumeric ? $this->convertFormattedNumber($rowDatum) : '';\n                if (($rowDatum !== '' || $this->preserveNullString) && $this->readFilter->readCell($columnLetter, $currentRow)) {\n                    if ($this->contiguous) {\n                        if ($noOutputYet) {\n                            $noOutputYet = false;\n                            ++$outRow;\n                        }\n                    } else {\n                        $outRow = $currentRow;\n                    }\n                    // Set basic styling for the value (Note that this could be overloaded by styling in a value binder)\n                    if ($numberFormatMask !== '') {\n                        $sheet->getStyle($columnLetter . $outRow)\n                            ->getNumberFormat()\n                            ->setFormatCode($numberFormatMask);\n                    }\n                    // Set cell value\n                    $sheet->getCell($columnLetter . $outRow)->setValue($rowDatum);\n                }\n                StringHelper::stringIncrement($columnLetter);\n            }\n            $rowData = self::getCsv($fileHandle, 0, $delimiter, $this->enclosure, $this->escapeCharacter);\n            ++$currentRow;\n        }\n\n        // Close file\n        fclose($fileHandle);\n    }\n\n    /**\n     * Convert string true/false to boolean, and null to null-string.\n     */\n    private function convertBoolean(mixed &$rowDatum): void\n    {\n        if (is_string($rowDatum)) {\n            if (strcasecmp($this->getTrue, $rowDatum) === 0 || strcasecmp('true', $rowDatum) === 0) {\n                $rowDatum = true;\n            } elseif (strcasecmp($this->getFalse, $rowDatum) === 0 || strcasecmp('false', $rowDatum) === 0) {\n                $rowDatum = false;\n            }\n        } else {\n            $rowDatum = $rowDatum ?? '';\n        }\n    }\n\n    /**\n     * Convert numeric strings to int or float values.\n     */\n    private function convertFormattedNumber(mixed &$rowDatum): string\n    {\n        $numberFormatMask = '';\n        if ($this->castFormattedNumberToNumeric === true && is_string($rowDatum)) {\n            $numeric = str_replace(\n                [$this->thousandsSeparator, $this->decimalSeparator],\n                ['', '.'],\n                $rowDatum\n            );\n\n            if (is_numeric($numeric)) {\n                $decimalPos = strpos($rowDatum, $this->decimalSeparator);\n                if ($this->preserveNumericFormatting === true) {\n                    $numberFormatMask = (str_contains($rowDatum, $this->thousandsSeparator))\n                        ? '#,##0' : '0';\n                    if ($decimalPos !== false) {\n                        $decimals = strlen($rowDatum) - $decimalPos - 1;\n                        $numberFormatMask .= '.' . str_repeat('0', min($decimals, 6));\n                    }\n                }\n\n                $rowDatum = ($decimalPos !== false) ? (float) $numeric : (int) $numeric;\n            }\n        }\n\n        return $numberFormatMask;\n    }\n\n    public function getDelimiter(): ?string\n    {\n        return $this->delimiter;\n    }\n\n    public function setDelimiter(?string $delimiter): self\n    {\n        $this->delimiter = $delimiter;\n\n        return $this;\n    }\n\n    public function getEnclosure(): string\n    {\n        return $this->enclosure;\n    }\n\n    public function setEnclosure(string $enclosure): self\n    {\n        if ($enclosure == '') {\n            $enclosure = '\"';\n        }\n        $this->enclosure = $enclosure;\n\n        return $this;\n    }\n\n    public function getSheetIndex(): int\n    {\n        return $this->sheetIndex;\n    }\n\n    public function setSheetIndex(int $indexValue): self\n    {\n        $this->sheetIndex = $indexValue;\n\n        return $this;\n    }\n\n    public function setContiguous(bool $contiguous): self\n    {\n        $this->contiguous = $contiguous;\n\n        return $this;\n    }\n\n    public function getContiguous(): bool\n    {\n        return $this->contiguous;\n    }\n\n    /**\n     * Php9 intends to drop support for this parameter in fgetcsv.\n     * Not yet ready to mark deprecated in order to give users\n     * a migration path.\n     */\n    public function setEscapeCharacter(string $escapeCharacter, int $version = PHP_VERSION_ID): self\n    {\n        if ($version >= 90000 && $escapeCharacter !== '') {\n            throw new ReaderException('Escape character must be null string for Php9+');\n        }\n\n        $this->escapeCharacter = $escapeCharacter;\n\n        return $this;\n    }\n\n    public function getEscapeCharacter(int $version = PHP_VERSION_ID): string\n    {\n        return $this->escapeCharacter ?? self::getDefaultEscapeCharacter($version);\n    }\n\n    /**\n     * Can the current IReader read the file?\n     */\n    public function canRead(string $filename): bool\n    {\n        // Check if file exists\n        try {\n            $this->openFile($filename);\n        } catch (ReaderException) {\n            return false;\n        }\n\n        fclose($this->fileHandle);\n\n        // Trust file extension if any\n        $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));\n        if (in_array($extension, ['csv', 'tsv'])) {\n            return true;\n        }\n\n        // Attempt to guess mimetype\n        $type = mime_content_type($filename);\n        $supportedTypes = [\n            'application/csv',\n            'text/csv',\n            'text/plain',\n            'inode/x-empty',\n            'application/x-empty', // has now replaced previous\n            'text/html',\n        ];\n\n        return in_array($type, $supportedTypes, true);\n    }\n\n    private static function guessEncodingTestNoBom(string &$encoding, string &$contents, string $compare, string $setEncoding): void\n    {\n        if ($encoding === '') {\n            $pos = strpos($contents, $compare);\n            if ($pos !== false && $pos % strlen($compare) === 0) {\n                $encoding = $setEncoding;\n            }\n        }\n    }\n\n    private static function guessEncodingNoBom(string $filename): string\n    {\n        $encoding = '';\n        $contents = (string) file_get_contents($filename);\n        self::guessEncodingTestNoBom($encoding, $contents, self::UTF32BE_LF, 'UTF-32BE');\n        self::guessEncodingTestNoBom($encoding, $contents, self::UTF32LE_LF, 'UTF-32LE');\n        self::guessEncodingTestNoBom($encoding, $contents, self::UTF16BE_LF, 'UTF-16BE');\n        self::guessEncodingTestNoBom($encoding, $contents, self::UTF16LE_LF, 'UTF-16LE');\n        if ($encoding === '' && preg_match('//u', $contents) === 1) {\n            $encoding = 'UTF-8';\n        }\n\n        return $encoding;\n    }\n\n    private static function guessEncodingTestBom(string &$encoding, string $first4, string $compare, string $setEncoding): void\n    {\n        if ($encoding === '') {\n            if (str_starts_with($first4, $compare)) {\n                $encoding = $setEncoding;\n            }\n        }\n    }\n\n    public static function guessEncodingBom(string $filename, ?string $convertString = null): string\n    {\n        $encoding = '';\n        $first4 = $convertString ?? (string) file_get_contents($filename, false, null, 0, 4);\n        self::guessEncodingTestBom($encoding, $first4, self::UTF8_BOM, 'UTF-8');\n        self::guessEncodingTestBom($encoding, $first4, self::UTF16BE_BOM, 'UTF-16BE');\n        self::guessEncodingTestBom($encoding, $first4, self::UTF32BE_BOM, 'UTF-32BE');\n        self::guessEncodingTestBom($encoding, $first4, self::UTF32LE_BOM, 'UTF-32LE');\n        self::guessEncodingTestBom($encoding, $first4, self::UTF16LE_BOM, 'UTF-16LE');\n\n        return $encoding;\n    }\n\n    public static function guessEncoding(string $filename, string $dflt = self::DEFAULT_FALLBACK_ENCODING): string\n    {\n        $encoding = self::guessEncodingBom($filename);\n        if ($encoding === '') {\n            $encoding = self::guessEncodingNoBom($filename);\n        }\n\n        return ($encoding === '') ? $dflt : $encoding;\n    }\n\n    public function setPreserveNullString(bool $value): self\n    {\n        $this->preserveNullString = $value;\n\n        return $this;\n    }\n\n    public function getPreserveNullString(): bool\n    {\n        return $this->preserveNullString;\n    }\n\n    public function setSheetNameIsFileName(bool $sheetNameIsFileName): self\n    {\n        $this->sheetNameIsFileName = $sheetNameIsFileName;\n\n        return $this;\n    }\n\n    /**\n     * Php8.4 deprecates use of anything other than null string\n     * as escape Character.\n     *\n     * @param resource $stream\n     * @param null|int<0, max> $length\n     *\n     * @return array<int,?string>|false\n     */\n    private static function getCsv(\n        $stream,\n        ?int $length = null,\n        string $separator = ',',\n        string $enclosure = '\"',\n        ?string $escape = null,\n        int $version = PHP_VERSION_ID\n    ): array|false {\n        $escape = $escape ?? self::getDefaultEscapeCharacter();\n        if ($version >= 80400 && $escape !== '') {\n            return @fgetcsv($stream, $length, $separator, $enclosure, $escape);\n        }\n\n        return fgetcsv($stream, $length, $separator, $enclosure, $escape);\n    }\n\n    public static function affectedByPhp9(\n        string $filename,\n        string $inputEncoding = 'UTF-8',\n        ?string $delimiter = null,\n        string $enclosure = '\"',\n        string $escapeCharacter = '\\\\',\n        int $version = PHP_VERSION_ID\n    ): bool {\n        if ($version < 70400 || $version >= 90000) {\n            throw new ReaderException('Function valid only for Php7.4 or Php8');\n        }\n        $reader1 = new self();\n        $reader1->setInputEncoding($inputEncoding)\n            ->setTestAutoDetect(true)\n            ->setEscapeCharacter($escapeCharacter)\n            ->setDelimiter($delimiter)\n            ->setEnclosure($enclosure);\n        $spreadsheet1 = $reader1->load($filename);\n        $sheet1 = $spreadsheet1->getActiveSheet();\n        $array1 = $sheet1->toArray(null, false, false);\n        $spreadsheet1->disconnectWorksheets();\n\n        $reader2 = new self();\n        $reader2->setInputEncoding($inputEncoding)\n            ->setTestAutoDetect(false)\n            ->setEscapeCharacter('')\n            ->setDelimiter($delimiter)\n            ->setEnclosure($enclosure);\n        $spreadsheet2 = $reader2->load($filename);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $array2 = $sheet2->toArray(null, false, false);\n        $spreadsheet2->disconnectWorksheets();\n\n        return $array1 !== $array2;\n    }\n\n    /**\n     * The character that will be supplied to fgetcsv\n     * when escapeCharacter is null.\n     * It is anticipated that it will conditionally be set\n     * to null-string for Php9 and above.\n     */\n    private static function getDefaultEscapeCharacter(int $version = PHP_VERSION_ID): string\n    {\n        return $version < 90000 ? '\\\\' : '';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/DefaultReadFilter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nclass DefaultReadFilter implements IReadFilter\n{\n    /**\n     * Should this cell be read?\n     *\n     * @param string $columnAddress Column address (as a string value like \"A\", or \"IV\")\n     * @param int $row Row number\n     * @param string $worksheetName Optional worksheet name\n     */\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Exception.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass Exception extends PhpSpreadsheetException\n{\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Gnumeric/PageSetup.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageMargins;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup as WorksheetPageSetup;\nuse SimpleXMLElement;\n\nclass PageSetup\n{\n    private Spreadsheet $spreadsheet;\n\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n    }\n\n    public function printInformation(SimpleXMLElement $sheet): self\n    {\n        if (isset($sheet->PrintInformation, $sheet->PrintInformation[0])) {\n            $printInformation = $sheet->PrintInformation[0];\n            $setup = $this->spreadsheet->getActiveSheet()->getPageSetup();\n\n            $attributes = $printInformation->Scale->attributes();\n            if (isset($attributes['percentage'])) {\n                $setup->setScale((int) $attributes['percentage']);\n            }\n            $pageOrder = (string) $printInformation->order;\n            if ($pageOrder === 'r_then_d') {\n                $setup->setPageOrder(WorksheetPageSetup::PAGEORDER_OVER_THEN_DOWN);\n            } elseif ($pageOrder === 'd_then_r') {\n                $setup->setPageOrder(WorksheetPageSetup::PAGEORDER_DOWN_THEN_OVER);\n            }\n            $orientation = (string) $printInformation->orientation;\n            if ($orientation !== '') {\n                $setup->setOrientation($orientation);\n            }\n            $attributes = $printInformation->hcenter->attributes();\n            if (isset($attributes['value'])) {\n                $setup->setHorizontalCentered((bool) (string) $attributes['value']);\n            }\n            $attributes = $printInformation->vcenter->attributes();\n            if (isset($attributes['value'])) {\n                $setup->setVerticalCentered((bool) (string) $attributes['value']);\n            }\n        }\n\n        return $this;\n    }\n\n    public function sheetMargins(SimpleXMLElement $sheet): self\n    {\n        if (isset($sheet->PrintInformation, $sheet->PrintInformation->Margins)) {\n            $marginSet = [\n                // Default Settings\n                'top' => 0.75,\n                'header' => 0.3,\n                'left' => 0.7,\n                'right' => 0.7,\n                'bottom' => 0.75,\n                'footer' => 0.3,\n            ];\n\n            $marginSet = $this->buildMarginSet($sheet, $marginSet);\n            $this->adjustMargins($marginSet);\n        }\n\n        return $this;\n    }\n\n    /**\n     * @param float[] $marginSet\n     *\n     * @return float[]\n     */\n    private function buildMarginSet(SimpleXMLElement $sheet, array $marginSet): array\n    {\n        foreach ($sheet->PrintInformation->Margins->children(Gnumeric::NAMESPACE_GNM) as $key => $margin) {\n            $marginAttributes = $margin->attributes();\n            $marginSize = ($marginAttributes['Points']) ?? 72; //    Default is 72pt\n            // Convert value in points to inches\n            $marginSize = PageMargins::fromPoints((float) $marginSize);\n            $marginSet[$key] = $marginSize;\n        }\n\n        return $marginSet;\n    }\n\n    /** @param float[] $marginSet */\n    private function adjustMargins(array $marginSet): void\n    {\n        foreach ($marginSet as $key => $marginSize) {\n            // Gnumeric is quirky in the way it displays the header/footer values:\n            //    header is actually the sum of top and header; footer is actually the sum of bottom and footer\n            //    then top is actually the header value, and bottom is actually the footer value\n            switch ($key) {\n                case 'left':\n                case 'right':\n                    $this->sheetMargin($key, $marginSize);\n\n                    break;\n                case 'top':\n                    $this->sheetMargin($key, $marginSet['header'] ?? 0);\n\n                    break;\n                case 'bottom':\n                    $this->sheetMargin($key, $marginSet['footer'] ?? 0);\n\n                    break;\n                case 'header':\n                    $this->sheetMargin($key, ($marginSet['top'] ?? 0) - $marginSize);\n\n                    break;\n                case 'footer':\n                    $this->sheetMargin($key, ($marginSet['bottom'] ?? 0) - $marginSize);\n\n                    break;\n            }\n        }\n    }\n\n    private function sheetMargin(string $key, float $marginSize): void\n    {\n        switch ($key) {\n            case 'top':\n                $this->spreadsheet->getActiveSheet()->getPageMargins()->setTop($marginSize);\n\n                break;\n            case 'bottom':\n                $this->spreadsheet->getActiveSheet()->getPageMargins()->setBottom($marginSize);\n\n                break;\n            case 'left':\n                $this->spreadsheet->getActiveSheet()->getPageMargins()->setLeft($marginSize);\n\n                break;\n            case 'right':\n                $this->spreadsheet->getActiveSheet()->getPageMargins()->setRight($marginSize);\n\n                break;\n            case 'header':\n                $this->spreadsheet->getActiveSheet()->getPageMargins()->setHeader($marginSize);\n\n                break;\n            case 'footer':\n                $this->spreadsheet->getActiveSheet()->getPageMargins()->setFooter($marginSize);\n\n                break;\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Gnumeric/Properties.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse SimpleXMLElement;\n\nclass Properties\n{\n    protected Spreadsheet $spreadsheet;\n\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n    }\n\n    private function docPropertiesOld(SimpleXMLElement $gnmXML): void\n    {\n        $docProps = $this->spreadsheet->getProperties();\n        foreach ($gnmXML->Summary->Item as $summaryItem) {\n            $propertyName = $summaryItem->name;\n            $propertyValue = $summaryItem->{'val-string'};\n            switch ($propertyName) {\n                case 'title':\n                    $docProps->setTitle(trim($propertyValue));\n\n                    break;\n                case 'comments':\n                    $docProps->setDescription(trim($propertyValue));\n\n                    break;\n                case 'keywords':\n                    $docProps->setKeywords(trim($propertyValue));\n\n                    break;\n                case 'category':\n                    $docProps->setCategory(trim($propertyValue));\n\n                    break;\n                case 'manager':\n                    $docProps->setManager(trim($propertyValue));\n\n                    break;\n                case 'author':\n                    $docProps->setCreator(trim($propertyValue));\n                    $docProps->setLastModifiedBy(trim($propertyValue));\n\n                    break;\n                case 'company':\n                    $docProps->setCompany(trim($propertyValue));\n\n                    break;\n            }\n        }\n    }\n\n    private function docPropertiesDC(SimpleXMLElement $officePropertyDC): void\n    {\n        $docProps = $this->spreadsheet->getProperties();\n        foreach ($officePropertyDC as $propertyName => $propertyValue) {\n            $propertyValue = trim((string) $propertyValue);\n            switch ($propertyName) {\n                case 'title':\n                    $docProps->setTitle($propertyValue);\n\n                    break;\n                case 'subject':\n                    $docProps->setSubject($propertyValue);\n\n                    break;\n                case 'creator':\n                    $docProps->setCreator($propertyValue);\n                    $docProps->setLastModifiedBy($propertyValue);\n\n                    break;\n                case 'date':\n                    $creationDate = $propertyValue;\n                    $docProps->setModified($creationDate);\n\n                    break;\n                case 'description':\n                    $docProps->setDescription($propertyValue);\n\n                    break;\n            }\n        }\n    }\n\n    private function docPropertiesMeta(SimpleXMLElement $officePropertyMeta): void\n    {\n        $docProps = $this->spreadsheet->getProperties();\n        foreach ($officePropertyMeta as $propertyName => $propertyValue) {\n            $attributes = $propertyValue->attributes(Gnumeric::NAMESPACE_META);\n            $propertyValue = trim((string) $propertyValue);\n            switch ($propertyName) {\n                case 'keyword':\n                    $docProps->setKeywords($propertyValue);\n\n                    break;\n                case 'initial-creator':\n                    $docProps->setCreator($propertyValue);\n                    $docProps->setLastModifiedBy($propertyValue);\n\n                    break;\n                case 'creation-date':\n                    $creationDate = $propertyValue;\n                    $docProps->setCreated($creationDate);\n\n                    break;\n                case 'user-defined':\n                    if ($attributes) {\n                        [, $attrName] = explode(':', (string) $attributes['name']);\n                        $this->userDefinedProperties($attrName, $propertyValue);\n                    }\n\n                    break;\n            }\n        }\n    }\n\n    private function userDefinedProperties(string $attrName, string $propertyValue): void\n    {\n        $docProps = $this->spreadsheet->getProperties();\n        switch ($attrName) {\n            case 'publisher':\n                $docProps->setCompany($propertyValue);\n\n                break;\n            case 'category':\n                $docProps->setCategory($propertyValue);\n\n                break;\n            case 'manager':\n                $docProps->setManager($propertyValue);\n\n                break;\n        }\n    }\n\n    public function readProperties(SimpleXMLElement $xml, SimpleXMLElement $gnmXML): void\n    {\n        $officeXML = $xml->children(Gnumeric::NAMESPACE_OFFICE);\n        if (!empty($officeXML)) {\n            $officeDocXML = $officeXML->{'document-meta'};\n            $officeDocMetaXML = $officeDocXML->meta;\n\n            foreach ($officeDocMetaXML as $officePropertyData) {\n                $officePropertyDC = $officePropertyData->children(Gnumeric::NAMESPACE_DC);\n                $this->docPropertiesDC($officePropertyDC);\n\n                $officePropertyMeta = $officePropertyData->children(Gnumeric::NAMESPACE_META);\n                $this->docPropertiesMeta($officePropertyMeta);\n            }\n        } elseif (isset($gnmXML->Summary)) {\n            $this->docPropertiesOld($gnmXML);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Gnumeric/Styles.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse SimpleXMLElement;\n\nclass Styles\n{\n    private Spreadsheet $spreadsheet;\n\n    protected bool $readDataOnly;\n\n    /** @var array<string, string[]> */\n    public static array $mappings = [\n        'borderStyle' => [\n            '0' => Border::BORDER_NONE,\n            '1' => Border::BORDER_THIN,\n            '2' => Border::BORDER_MEDIUM,\n            '3' => Border::BORDER_SLANTDASHDOT,\n            '4' => Border::BORDER_DASHED,\n            '5' => Border::BORDER_THICK,\n            '6' => Border::BORDER_DOUBLE,\n            '7' => Border::BORDER_DOTTED,\n            '8' => Border::BORDER_MEDIUMDASHED,\n            '9' => Border::BORDER_DASHDOT,\n            '10' => Border::BORDER_MEDIUMDASHDOT,\n            '11' => Border::BORDER_DASHDOTDOT,\n            '12' => Border::BORDER_MEDIUMDASHDOTDOT,\n            '13' => Border::BORDER_MEDIUMDASHDOTDOT,\n        ],\n        'fillType' => [\n            '1' => Fill::FILL_SOLID,\n            '2' => Fill::FILL_PATTERN_DARKGRAY,\n            '3' => Fill::FILL_PATTERN_MEDIUMGRAY,\n            '4' => Fill::FILL_PATTERN_LIGHTGRAY,\n            '5' => Fill::FILL_PATTERN_GRAY125,\n            '6' => Fill::FILL_PATTERN_GRAY0625,\n            '7' => Fill::FILL_PATTERN_DARKHORIZONTAL, // horizontal stripe\n            '8' => Fill::FILL_PATTERN_DARKVERTICAL, // vertical stripe\n            '9' => Fill::FILL_PATTERN_DARKDOWN, // diagonal stripe\n            '10' => Fill::FILL_PATTERN_DARKUP, // reverse diagonal stripe\n            '11' => Fill::FILL_PATTERN_DARKGRID, // diagonal crosshatch\n            '12' => Fill::FILL_PATTERN_DARKTRELLIS, // thick diagonal crosshatch\n            '13' => Fill::FILL_PATTERN_LIGHTHORIZONTAL,\n            '14' => Fill::FILL_PATTERN_LIGHTVERTICAL,\n            '15' => Fill::FILL_PATTERN_LIGHTUP,\n            '16' => Fill::FILL_PATTERN_LIGHTDOWN,\n            '17' => Fill::FILL_PATTERN_LIGHTGRID, // thin horizontal crosshatch\n            '18' => Fill::FILL_PATTERN_LIGHTTRELLIS, // thin diagonal crosshatch\n        ],\n        'horizontal' => [\n            '1' => Alignment::HORIZONTAL_GENERAL,\n            '2' => Alignment::HORIZONTAL_LEFT,\n            '4' => Alignment::HORIZONTAL_RIGHT,\n            '8' => Alignment::HORIZONTAL_CENTER,\n            '16' => Alignment::HORIZONTAL_CENTER_CONTINUOUS,\n            '32' => Alignment::HORIZONTAL_JUSTIFY,\n            '64' => Alignment::HORIZONTAL_CENTER_CONTINUOUS,\n        ],\n        'underline' => [\n            '1' => Font::UNDERLINE_SINGLE,\n            '2' => Font::UNDERLINE_DOUBLE,\n            '3' => Font::UNDERLINE_SINGLEACCOUNTING,\n            '4' => Font::UNDERLINE_DOUBLEACCOUNTING,\n        ],\n        'vertical' => [\n            '1' => Alignment::VERTICAL_TOP,\n            '2' => Alignment::VERTICAL_BOTTOM,\n            '4' => Alignment::VERTICAL_CENTER,\n            '8' => Alignment::VERTICAL_JUSTIFY,\n        ],\n    ];\n\n    public function __construct(Spreadsheet $spreadsheet, bool $readDataOnly)\n    {\n        $this->spreadsheet = $spreadsheet;\n        $this->readDataOnly = $readDataOnly;\n    }\n\n    public function read(SimpleXMLElement $sheet, int $maxRow, int $maxCol): void\n    {\n        if ($sheet->Styles->StyleRegion !== null) {\n            $this->readStyles($sheet->Styles->StyleRegion, $maxRow, $maxCol);\n        }\n    }\n\n    private function readStyles(SimpleXMLElement $styleRegion, int $maxRow, int $maxCol): void\n    {\n        foreach ($styleRegion as $style) {\n            $styleAttributes = $style->attributes();\n            if ($styleAttributes !== null && ($styleAttributes['startRow'] <= $maxRow) && ($styleAttributes['startCol'] <= $maxCol)) {\n                $cellRange = $this->readStyleRange($styleAttributes, $maxCol, $maxRow);\n\n                $styleAttributes = $style->Style->attributes();\n\n                /** @var mixed[][] */\n                $styleArray = [];\n                // We still set the number format mask for date/time values, even if readDataOnly is true\n                //    so that we can identify whether a float is a float or a date value\n                $formatCode = $styleAttributes ? (string) $styleAttributes['Format'] : null;\n                if ($formatCode && Date::isDateTimeFormatCode($formatCode)) {\n                    $styleArray['numberFormat']['formatCode'] = $formatCode;\n                }\n                if ($this->readDataOnly === false && $styleAttributes !== null) {\n                    //    If readDataOnly is false, we set all formatting information\n                    $styleArray['numberFormat']['formatCode'] = $formatCode;\n                    $styleArray = $this->readStyle($styleArray, $styleAttributes, $style);\n                }\n                /** @var mixed[][] $styleArray */\n                $this->spreadsheet\n                    ->getActiveSheet()\n                    ->getStyle($cellRange)\n                    ->applyFromArray($styleArray);\n            }\n        }\n    }\n\n    /** @param mixed[][] $styleArray */\n    private function addBorderDiagonal(SimpleXMLElement $srssb, array &$styleArray): void\n    {\n        if (isset($srssb->Diagonal, $srssb->{'Rev-Diagonal'})) {\n            $styleArray['borders']['diagonal'] = self::parseBorderAttributes($srssb->Diagonal->attributes());\n            $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_BOTH;\n        } elseif (isset($srssb->Diagonal)) {\n            $styleArray['borders']['diagonal'] = self::parseBorderAttributes($srssb->Diagonal->attributes());\n            $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_UP;\n        } elseif (isset($srssb->{'Rev-Diagonal'})) {\n            $styleArray['borders']['diagonal'] = self::parseBorderAttributes($srssb->{'Rev-Diagonal'}->attributes());\n            $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_DOWN;\n        }\n    }\n\n    /** @param mixed[][] $styleArray */\n    private function addBorderStyle(SimpleXMLElement $srssb, array &$styleArray, string $direction): void\n    {\n        $ucDirection = ucfirst($direction);\n        if (isset($srssb->$ucDirection)) {\n            /** @var SimpleXMLElement */\n            $temp = $srssb->$ucDirection;\n            $styleArray['borders'][$direction] = self::parseBorderAttributes($temp->attributes());\n        }\n    }\n\n    private function calcRotation(SimpleXMLElement $styleAttributes): int\n    {\n        $rotation = (int) $styleAttributes->Rotation;\n        if ($rotation >= 270 && $rotation <= 360) {\n            $rotation -= 360;\n        }\n        $rotation = (abs($rotation) > 90) ? 0 : $rotation;\n\n        return $rotation;\n    }\n\n    /** @param mixed[][] $styleArray */\n    private static function addStyle(array &$styleArray, string $key, string $value): void\n    {\n        if (array_key_exists($value, self::$mappings[$key])) {\n            $styleArray[$key] = self::$mappings[$key][$value]; //* @phpstan-ignore-line\n        }\n    }\n\n    /** @param mixed[][] $styleArray */\n    private static function addStyle2(array &$styleArray, string $key1, string $key, string $value): void\n    {\n        if (array_key_exists($value, self::$mappings[$key])) {\n            $styleArray[$key1][$key] = self::$mappings[$key][$value];\n        }\n    }\n\n    /** @return mixed[][] */\n    private static function parseBorderAttributes(?SimpleXMLElement $borderAttributes): array\n    {\n        /** @var mixed[][] */\n        $styleArray = [];\n        if ($borderAttributes !== null) {\n            if (isset($borderAttributes['Color'])) {\n                $styleArray['color']['rgb'] = self::parseGnumericColour($borderAttributes['Color']);\n            }\n\n            self::addStyle($styleArray, 'borderStyle', (string) $borderAttributes['Style']);\n        }\n        /** @var mixed[][] $styleArray */\n\n        return $styleArray;\n    }\n\n    private static function parseGnumericColour(string $gnmColour): string\n    {\n        [$gnmR, $gnmG, $gnmB] = explode(':', $gnmColour);\n        $gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2);\n        $gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);\n        $gnmB = substr(str_pad($gnmB, 4, '0', STR_PAD_RIGHT), 0, 2);\n\n        return $gnmR . $gnmG . $gnmB;\n    }\n\n    /** @param mixed[][] $styleArray */\n    private function addColors(array &$styleArray, SimpleXMLElement $styleAttributes): void\n    {\n        $RGB = self::parseGnumericColour((string) $styleAttributes['Fore']);\n        /** @var mixed[][][] $styleArray */\n        $styleArray['font']['color']['rgb'] = $RGB;\n        $RGB = self::parseGnumericColour((string) $styleAttributes['Back']);\n        $shade = (string) $styleAttributes['Shade'];\n        if (($RGB !== '000000') || ($shade !== '0')) {\n            $RGB2 = self::parseGnumericColour((string) $styleAttributes['PatternColor']);\n            if ($shade === '1') {\n                $styleArray['fill']['startColor']['rgb'] = $RGB;\n                $styleArray['fill']['endColor']['rgb'] = $RGB2;\n            } else {\n                $styleArray['fill']['endColor']['rgb'] = $RGB;\n                $styleArray['fill']['startColor']['rgb'] = $RGB2;\n            }\n            self::addStyle2($styleArray, 'fill', 'fillType', $shade);\n        }\n    }\n\n    private function readStyleRange(SimpleXMLElement $styleAttributes, int $maxCol, int $maxRow): string\n    {\n        $startColumn = Coordinate::stringFromColumnIndex((int) $styleAttributes['startCol'] + 1);\n        $startRow = $styleAttributes['startRow'] + 1;\n\n        $endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : (int) $styleAttributes['endCol'];\n        $endColumn = Coordinate::stringFromColumnIndex($endColumn + 1);\n\n        $endRow = 1 + (($styleAttributes['endRow'] > $maxRow) ? $maxRow : (int) $styleAttributes['endRow']);\n        $cellRange = $startColumn . $startRow . ':' . $endColumn . $endRow;\n\n        return $cellRange;\n    }\n\n    /**\n     * @param mixed[][] $styleArray\n     *\n     * @return mixed[]\n     */\n    private function readStyle(array $styleArray, SimpleXMLElement $styleAttributes, SimpleXMLElement $style): array\n    {\n        self::addStyle2($styleArray, 'alignment', 'horizontal', (string) $styleAttributes['HAlign']);\n        self::addStyle2($styleArray, 'alignment', 'vertical', (string) $styleAttributes['VAlign']);\n        $styleArray['alignment']['wrapText'] = $styleAttributes['WrapText'] == '1';\n        $styleArray['alignment']['textRotation'] = $this->calcRotation($styleAttributes);\n        $styleArray['alignment']['shrinkToFit'] = $styleAttributes['ShrinkToFit'] == '1';\n        $styleArray['alignment']['indent'] = ((int) ($styleAttributes['Indent']) > 0) ? $styleAttributes['indent'] : 0;\n\n        $this->addColors($styleArray, $styleAttributes);\n\n        $fontAttributes = $style->Style->Font->attributes();\n        if ($fontAttributes !== null) {\n            $styleArray['font']['name'] = (string) $style->Style->Font;\n            $styleArray['font']['size'] = (int) ($fontAttributes['Unit']);\n            $styleArray['font']['bold'] = $fontAttributes['Bold'] == '1';\n            $styleArray['font']['italic'] = $fontAttributes['Italic'] == '1';\n            $styleArray['font']['strikethrough'] = $fontAttributes['StrikeThrough'] == '1';\n            self::addStyle2($styleArray, 'font', 'underline', (string) $fontAttributes['Underline']);\n\n            switch ($fontAttributes['Script']) {\n                case '1':\n                    $styleArray['font']['superscript'] = true;\n\n                    break;\n                case '-1':\n                    $styleArray['font']['subscript'] = true;\n\n                    break;\n            }\n        }\n\n        if (isset($style->Style->StyleBorder)) {\n            $srssb = $style->Style->StyleBorder;\n            $this->addBorderStyle($srssb, $styleArray, 'top');\n            $this->addBorderStyle($srssb, $styleArray, 'bottom');\n            $this->addBorderStyle($srssb, $styleArray, 'left');\n            $this->addBorderStyle($srssb, $styleArray, 'right');\n            $this->addBorderDiagonal($srssb, $styleArray);\n        }\n        //    TO DO\n        /*\n        if (isset($style->Style->HyperLink)) {\n            $hyperlink = $style->Style->HyperLink->attributes();\n        }\n        */\n\n        return $styleArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Gnumeric.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric\\Styles;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Security\\XmlScanner;\nuse PhpOffice\\PhpSpreadsheet\\ReferenceHelper;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\nuse XMLReader;\n\nclass Gnumeric extends BaseReader\n{\n    const NAMESPACE_GNM = 'http://www.gnumeric.org/v10.dtd'; // gmr in old sheets\n\n    const NAMESPACE_XSI = 'http://www.w3.org/2001/XMLSchema-instance';\n\n    const NAMESPACE_OFFICE = 'urn:oasis:names:tc:opendocument:xmlns:office:1.0';\n\n    const NAMESPACE_XLINK = 'http://www.w3.org/1999/xlink';\n\n    const NAMESPACE_DC = 'http://purl.org/dc/elements/1.1/';\n\n    const NAMESPACE_META = 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0';\n\n    const NAMESPACE_OOO = 'http://openoffice.org/2004/office';\n\n    const GNM_SHEET_VISIBILITY_VISIBLE = 'GNM_SHEET_VISIBILITY_VISIBLE';\n    const GNM_SHEET_VISIBILITY_HIDDEN = 'GNM_SHEET_VISIBILITY_HIDDEN';\n\n    /**\n     * Shared Expressions.\n     *\n     * @var array<array{column: int, row: int, formula:string}>\n     */\n    private array $expressions = [];\n\n    /**\n     * Spreadsheet shared across all functions.\n     */\n    private Spreadsheet $spreadsheet;\n\n    private ReferenceHelper $referenceHelper;\n\n    /** @var array{'dataType': string[]} */\n    public static array $mappings = [\n        'dataType' => [\n            '10' => DataType::TYPE_NULL,\n            '20' => DataType::TYPE_BOOL,\n            '30' => DataType::TYPE_NUMERIC, // Integer doesn't exist in Excel\n            '40' => DataType::TYPE_NUMERIC, // Float\n            '50' => DataType::TYPE_ERROR,\n            '60' => DataType::TYPE_STRING,\n            //'70':        //    Cell Range\n            //'80':        //    Array\n        ],\n    ];\n\n    /**\n     * Create a new Gnumeric.\n     */\n    public function __construct()\n    {\n        parent::__construct();\n        $this->referenceHelper = ReferenceHelper::getInstance();\n        $this->securityScanner = XmlScanner::getInstance($this);\n    }\n\n    /**\n     * Can the current IReader read the file?\n     */\n    public function canRead(string $filename): bool\n    {\n        $data = null;\n        if (File::testFileNoThrow($filename)) {\n            $data = $this->gzfileGetContents($filename);\n            if (!str_contains($data, self::NAMESPACE_GNM)) {\n                $data = '';\n            }\n        }\n\n        return !empty($data);\n    }\n\n    private static function matchXml(XMLReader $xml, string $expectedLocalName): bool\n    {\n        return $xml->namespaceURI === self::NAMESPACE_GNM\n            && $xml->localName === $expectedLocalName\n            && $xml->nodeType === XMLReader::ELEMENT;\n    }\n\n    /**\n     * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object.\n     *\n     * @return string[]\n     */\n    public function listWorksheetNames(string $filename): array\n    {\n        File::assertFile($filename);\n        if (!$this->canRead($filename)) {\n            throw new Exception($filename . ' is an invalid Gnumeric file.');\n        }\n\n        $xml = new XMLReader();\n        $contents = $this->gzfileGetContents($filename);\n        $xml->xml($contents);\n        $xml->setParserProperty(2, true);\n\n        $worksheetNames = [];\n        while ($xml->read()) {\n            if (self::matchXml($xml, 'SheetName')) {\n                $xml->read(); //    Move onto the value node\n                $worksheetNames[] = (string) $xml->value;\n            } elseif (self::matchXml($xml, 'Sheets')) {\n                //    break out of the loop once we've got our sheet names rather than parse the entire file\n                break;\n            }\n        }\n\n        return $worksheetNames;\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        File::assertFile($filename);\n        if (!$this->canRead($filename)) {\n            throw new Exception($filename . ' is an invalid Gnumeric file.');\n        }\n\n        $xml = new XMLReader();\n        $contents = $this->gzfileGetContents($filename);\n        $xml->xml($contents);\n        $xml->setParserProperty(2, true);\n\n        $worksheetInfo = [];\n        while ($xml->read()) {\n            if (self::matchXml($xml, 'Sheet')) {\n                $tmpInfo = [\n                    'worksheetName' => '',\n                    'lastColumnLetter' => 'A',\n                    'lastColumnIndex' => 0,\n                    'totalRows' => 0,\n                    'totalColumns' => 0,\n                    'sheetState' => Worksheet::SHEETSTATE_VISIBLE,\n                ];\n                $visibility = $xml->getAttribute('Visibility');\n                if ((string) $visibility === self::GNM_SHEET_VISIBILITY_HIDDEN) {\n                    $tmpInfo['sheetState'] = Worksheet::SHEETSTATE_HIDDEN;\n                }\n\n                while ($xml->read()) {\n                    if (self::matchXml($xml, 'Name')) {\n                        $xml->read(); //    Move onto the value node\n                        $tmpInfo['worksheetName'] = (string) $xml->value;\n                    } elseif (self::matchXml($xml, 'MaxCol')) {\n                        $xml->read(); //    Move onto the value node\n                        $tmpInfo['lastColumnIndex'] = (int) $xml->value;\n                        $tmpInfo['totalColumns'] = (int) $xml->value + 1;\n                    } elseif (self::matchXml($xml, 'MaxRow')) {\n                        $xml->read(); //    Move onto the value node\n                        $tmpInfo['totalRows'] = (int) $xml->value + 1;\n\n                        break;\n                    }\n                }\n                $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1, true);\n                $worksheetInfo[] = $tmpInfo;\n            }\n        }\n\n        return $worksheetInfo;\n    }\n\n    private function gzfileGetContents(string $filename): string\n    {\n        $data = '';\n        $contents = @file_get_contents($filename);\n        if ($contents !== false) {\n            if (str_starts_with($contents, \"\\x1f\\x8b\")) {\n                // Check if gzlib functions are available\n                if (function_exists('gzdecode')) {\n                    $contents = @gzdecode($contents);\n                    if ($contents !== false) {\n                        $data = $contents;\n                    }\n                }\n            } else {\n                $data = $contents;\n            }\n        }\n        if ($data !== '') {\n            $data = $this->getSecurityScannerOrThrow()->scan($data);\n        }\n\n        return $data;\n    }\n\n    /** @return mixed[] */\n    public static function gnumericMappings(): array\n    {\n        return array_merge(self::$mappings, Styles::$mappings);\n    }\n\n    private function processComments(SimpleXMLElement $sheet): void\n    {\n        if ((!$this->readDataOnly) && (isset($sheet->Objects))) {\n            foreach ($sheet->Objects->children(self::NAMESPACE_GNM) as $key => $comment) {\n                $commentAttributes = $comment->attributes();\n                //    Only comment objects are handled at the moment\n                if ($commentAttributes && $commentAttributes->Text) {\n                    $this->spreadsheet->getActiveSheet()->getComment((string) $commentAttributes->ObjectBound)\n                        ->setAuthor((string) $commentAttributes->Author)\n                        ->setText($this->parseRichText((string) $commentAttributes->Text));\n                }\n            }\n        }\n    }\n\n    private static function testSimpleXml(mixed $value): SimpleXMLElement\n    {\n        return ($value instanceof SimpleXMLElement) ? $value : new SimpleXMLElement('<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>');\n    }\n\n    /**\n     * Loads Spreadsheet from file.\n     */\n    protected function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        $spreadsheet = $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n        $spreadsheet->removeSheetByIndex(0);\n\n        // Load into this instance\n        return $this->loadIntoExisting($filename, $spreadsheet);\n    }\n\n    /**\n     * Loads from file into Spreadsheet instance.\n     */\n    public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet): Spreadsheet\n    {\n        $this->spreadsheet = $spreadsheet;\n        File::assertFile($filename);\n        if (!$this->canRead($filename)) {\n            throw new Exception($filename . ' is an invalid Gnumeric file.');\n        }\n\n        $gFileData = $this->gzfileGetContents($filename);\n\n        /** @var XmlScanner */\n        $securityScanner = $this->securityScanner;\n        $xml2 = simplexml_load_string($securityScanner->scan($gFileData));\n        $xml = self::testSimpleXml($xml2);\n\n        $gnmXML = $xml->children(self::NAMESPACE_GNM);\n        (new Properties($this->spreadsheet))->readProperties($xml, $gnmXML);\n\n        $worksheetID = 0;\n        $sheetCreated = false;\n        foreach ($gnmXML->Sheets->Sheet as $sheetOrNull) {\n            $sheet = self::testSimpleXml($sheetOrNull);\n            $worksheetName = (string) $sheet->Name;\n            if (is_array($this->loadSheetsOnly) && !in_array($worksheetName, $this->loadSheetsOnly, true)) {\n                continue;\n            }\n\n            $maxRow = $maxCol = 0;\n\n            // Create new Worksheet\n            $this->spreadsheet->createSheet();\n            $sheetCreated = true;\n            $this->spreadsheet->setActiveSheetIndex($worksheetID);\n            //    Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula\n            //        cells... during the load, all formulae should be correct, and we're simply bringing the worksheet\n            //        name in line with the formula, not the reverse\n            $this->spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false);\n\n            $visibility = $sheet->attributes()['Visibility'] ?? self::GNM_SHEET_VISIBILITY_VISIBLE;\n            if ((string) $visibility !== self::GNM_SHEET_VISIBILITY_VISIBLE) {\n                $this->spreadsheet->getActiveSheet()->setSheetState(Worksheet::SHEETSTATE_HIDDEN);\n            }\n\n            if (!$this->readDataOnly) {\n                (new PageSetup($this->spreadsheet))\n                    ->printInformation($sheet)\n                    ->sheetMargins($sheet);\n            }\n\n            foreach ($sheet->Cells->Cell as $cellOrNull) {\n                $cell = self::testSimpleXml($cellOrNull);\n                $cellAttributes = self::testSimpleXml($cell->attributes());\n                $row = (int) $cellAttributes->Row + 1;\n                $column = (int) $cellAttributes->Col;\n\n                $maxRow = max($maxRow, $row);\n                $maxCol = max($maxCol, $column);\n\n                $column = Coordinate::stringFromColumnIndex($column + 1);\n\n                // Read cell?\n                if (!$this->getReadFilter()->readCell($column, $row, $worksheetName)) {\n                    continue;\n                }\n\n                $this->loadCell($cell, $worksheetName, $cellAttributes, $column, $row);\n            }\n\n            if ($sheet->Styles !== null) {\n                (new Styles($this->spreadsheet, $this->readDataOnly))->read($sheet, $maxRow, $maxCol);\n            }\n\n            $this->processComments($sheet);\n            $this->processColumnWidths($sheet, $maxCol);\n            $this->processRowHeights($sheet, $maxRow);\n            $this->processMergedCells($sheet);\n            $this->processAutofilter($sheet);\n\n            $this->setSelectedCells($sheet);\n            ++$worksheetID;\n        }\n        if ($this->createBlankSheetIfNoneRead && !$sheetCreated) {\n            $this->spreadsheet->createSheet();\n        }\n\n        $this->processDefinedNames($gnmXML);\n\n        $this->setSelectedSheet($gnmXML);\n\n        // Return\n        return $this->spreadsheet;\n    }\n\n    private function setSelectedSheet(SimpleXMLElement $gnmXML): void\n    {\n        if (isset($gnmXML->UIData)) {\n            $attributes = self::testSimpleXml($gnmXML->UIData->attributes());\n            $selectedSheet = (int) $attributes['SelectedTab'];\n            $this->spreadsheet->setActiveSheetIndex($selectedSheet);\n        }\n    }\n\n    private function setSelectedCells(?SimpleXMLElement $sheet): void\n    {\n        if ($sheet !== null && isset($sheet->Selections)) {\n            foreach ($sheet->Selections as $selection) {\n                $startCol = (int) ($selection->StartCol ?? 0);\n                $startRow = (int) ($selection->StartRow ?? 0) + 1;\n                $endCol = (int) ($selection->EndCol ?? $startCol);\n                $endRow = (int) ($selection->endRow ?? 0) + 1;\n\n                $startColumn = Coordinate::stringFromColumnIndex($startCol + 1);\n                $endColumn = Coordinate::stringFromColumnIndex($endCol + 1);\n\n                $startCell = \"{$startColumn}{$startRow}\";\n                $endCell = \"{$endColumn}{$endRow}\";\n                $selectedRange = $startCell . (($endCell !== $startCell) ? ':' . $endCell : '');\n                $this->spreadsheet->getActiveSheet()->setSelectedCell($selectedRange);\n\n                break;\n            }\n        }\n    }\n\n    private function processMergedCells(?SimpleXMLElement $sheet): void\n    {\n        //    Handle Merged Cells in this worksheet\n        if ($sheet !== null && isset($sheet->MergedRegions)) {\n            foreach ($sheet->MergedRegions->Merge as $mergeCells) {\n                if (str_contains((string) $mergeCells, ':')) {\n                    $this->spreadsheet->getActiveSheet()->mergeCells($mergeCells, Worksheet::MERGE_CELL_CONTENT_HIDE);\n                }\n            }\n        }\n    }\n\n    private function processAutofilter(?SimpleXMLElement $sheet): void\n    {\n        if ($sheet !== null && isset($sheet->Filters)) {\n            foreach ($sheet->Filters->Filter as $autofilter) {\n                $attributes = $autofilter->attributes();\n                if (isset($attributes['Area'])) {\n                    $this->spreadsheet->getActiveSheet()->setAutoFilter((string) $attributes['Area']);\n                }\n            }\n        }\n    }\n\n    private function setColumnWidth(int $whichColumn, float $defaultWidth): void\n    {\n        $this->spreadsheet->getActiveSheet()\n            ->getColumnDimension(\n                Coordinate::stringFromColumnIndex($whichColumn + 1)\n            )\n            ->setWidth($defaultWidth);\n    }\n\n    private function setColumnInvisible(int $whichColumn): void\n    {\n        $this->spreadsheet->getActiveSheet()\n            ->getColumnDimension(\n                Coordinate::stringFromColumnIndex($whichColumn + 1)\n            )\n            ->setVisible(false);\n    }\n\n    private function processColumnLoop(int $whichColumn, int $maxCol, ?SimpleXMLElement $columnOverride, float $defaultWidth): int\n    {\n        $columnOverride = self::testSimpleXml($columnOverride);\n        $columnAttributes = self::testSimpleXml($columnOverride->attributes());\n        $column = $columnAttributes['No'];\n        $columnWidth = ((float) $columnAttributes['Unit']) / 5.4;\n        $hidden = (isset($columnAttributes['Hidden'])) && ((string) $columnAttributes['Hidden'] == '1');\n        $columnCount = (int) ($columnAttributes['Count'] ?? 1);\n        while ($whichColumn < $column) {\n            $this->setColumnWidth($whichColumn, $defaultWidth);\n            ++$whichColumn;\n        }\n        while (($whichColumn < ($column + $columnCount)) && ($whichColumn <= $maxCol)) {\n            $this->setColumnWidth($whichColumn, $columnWidth);\n            if ($hidden) {\n                $this->setColumnInvisible($whichColumn);\n            }\n            ++$whichColumn;\n        }\n\n        return $whichColumn;\n    }\n\n    private function processColumnWidths(?SimpleXMLElement $sheet, int $maxCol): void\n    {\n        if ((!$this->readDataOnly) && $sheet !== null && (isset($sheet->Cols))) {\n            //    Column Widths\n            $defaultWidth = 0;\n            $columnAttributes = $sheet->Cols->attributes();\n            if ($columnAttributes !== null) {\n                $defaultWidth = $columnAttributes['DefaultSizePts'] / 5.4;\n            }\n            $whichColumn = 0;\n            foreach ($sheet->Cols->ColInfo as $columnOverride) {\n                $whichColumn = $this->processColumnLoop($whichColumn, $maxCol, $columnOverride, $defaultWidth);\n            }\n            while ($whichColumn <= $maxCol) {\n                $this->setColumnWidth($whichColumn, $defaultWidth);\n                ++$whichColumn;\n            }\n        }\n    }\n\n    private function setRowHeight(int $whichRow, float $defaultHeight): void\n    {\n        $this->spreadsheet\n            ->getActiveSheet()\n            ->getRowDimension($whichRow)\n            ->setRowHeight($defaultHeight);\n    }\n\n    private function setRowInvisible(int $whichRow): void\n    {\n        $this->spreadsheet\n            ->getActiveSheet()\n            ->getRowDimension($whichRow)\n            ->setVisible(false);\n    }\n\n    private function processRowLoop(int $whichRow, int $maxRow, ?SimpleXMLElement $rowOverride, float $defaultHeight): int\n    {\n        $rowOverride = self::testSimpleXml($rowOverride);\n        $rowAttributes = self::testSimpleXml($rowOverride->attributes());\n        $row = $rowAttributes['No'];\n        $rowHeight = (float) $rowAttributes['Unit'];\n        $hidden = (isset($rowAttributes['Hidden'])) && ((string) $rowAttributes['Hidden'] == '1');\n        $rowCount = (int) ($rowAttributes['Count'] ?? 1);\n        while ($whichRow < $row) {\n            ++$whichRow;\n            $this->setRowHeight($whichRow, $defaultHeight);\n        }\n        while (($whichRow < ($row + $rowCount)) && ($whichRow < $maxRow)) {\n            ++$whichRow;\n            $this->setRowHeight($whichRow, $rowHeight);\n            if ($hidden) {\n                $this->setRowInvisible($whichRow);\n            }\n        }\n\n        return $whichRow;\n    }\n\n    private function processRowHeights(?SimpleXMLElement $sheet, int $maxRow): void\n    {\n        if ((!$this->readDataOnly) && $sheet !== null && (isset($sheet->Rows))) {\n            //    Row Heights\n            $defaultHeight = 0;\n            $rowAttributes = $sheet->Rows->attributes();\n            if ($rowAttributes !== null) {\n                $defaultHeight = (float) $rowAttributes['DefaultSizePts'];\n            }\n            $whichRow = 0;\n\n            foreach ($sheet->Rows->RowInfo as $rowOverride) {\n                $whichRow = $this->processRowLoop($whichRow, $maxRow, $rowOverride, $defaultHeight);\n            }\n            // never executed, I can't figure out any circumstances\n            // under which it would be executed, and, even if\n            // such exist, I'm not convinced this is needed.\n            //while ($whichRow < $maxRow) {\n            //    ++$whichRow;\n            //    $this->spreadsheet->getActiveSheet()->getRowDimension($whichRow)->setRowHeight($defaultHeight);\n            //}\n        }\n    }\n\n    private function processDefinedNames(?SimpleXMLElement $gnmXML): void\n    {\n        //    Loop through definedNames (global named ranges)\n        if ($gnmXML !== null && isset($gnmXML->Names)) {\n            foreach ($gnmXML->Names->Name as $definedName) {\n                $name = (string) $definedName->name;\n                $value = (string) $definedName->value;\n                if (stripos($value, '#REF!') !== false || empty($value)) {\n                    continue;\n                }\n\n                $value = str_replace(\"\\\\'\", \"''\", $value);\n                [$worksheetName] = Worksheet::extractSheetTitle($value, true, true);\n                $worksheet = $this->spreadsheet->getSheetByName($worksheetName);\n                // Worksheet might still be null if we're only loading selected sheets rather than the full spreadsheet\n                if ($worksheet !== null) {\n                    $this->spreadsheet->addDefinedName(DefinedName::createInstance($name, $worksheet, $value));\n                }\n            }\n        }\n    }\n\n    private function parseRichText(string $is): RichText\n    {\n        $value = new RichText();\n        $value->createText($is);\n\n        return $value;\n    }\n\n    private function loadCell(\n        SimpleXMLElement $cell,\n        string $worksheetName,\n        SimpleXMLElement $cellAttributes,\n        string $column,\n        int $row\n    ): void {\n        $ValueType = $cellAttributes->ValueType;\n        $ExprID = (string) $cellAttributes->ExprID;\n        $rows = (int) ($cellAttributes->Rows ?? 0);\n        $cols = (int) ($cellAttributes->Cols ?? 0);\n        $type = DataType::TYPE_FORMULA;\n        $isArrayFormula = ($rows > 0 && $cols > 0);\n        $arrayFormulaRange = $isArrayFormula ? $this->getArrayFormulaRange($column, $row, $cols, $rows) : null;\n        if ($ExprID > '') {\n            if (((string) $cell) > '') {\n                // Formula\n                $this->expressions[$ExprID] = [\n                    'column' => (int) $cellAttributes->Col,\n                    'row' => (int) $cellAttributes->Row,\n                    'formula' => (string) $cell,\n                ];\n            } else {\n                // Shared Formula\n                $expression = $this->expressions[$ExprID];\n\n                $cell = $this->referenceHelper->updateFormulaReferences(\n                    $expression['formula'],\n                    'A1',\n                    $cellAttributes->Col - $expression['column'],\n                    $cellAttributes->Row - $expression['row'],\n                    $worksheetName\n                );\n            }\n            $type = DataType::TYPE_FORMULA;\n        } elseif ($isArrayFormula === false) {\n            $vtype = (string) $ValueType;\n            if (array_key_exists($vtype, self::$mappings['dataType'])) {\n                $type = self::$mappings['dataType'][$vtype];\n            }\n            if ($vtype === '20') { //    Boolean\n                $cell = $cell == 'TRUE';\n            }\n        }\n\n        $this->spreadsheet->getActiveSheet()->getCell($column . $row)->setValueExplicit((string) $cell, $type);\n        if ($arrayFormulaRange === null) {\n            $this->spreadsheet->getActiveSheet()->getCell($column . $row)->setFormulaAttributes(null);\n        } else {\n            $this->spreadsheet->getActiveSheet()->getCell($column . $row)->setFormulaAttributes(['t' => 'array', 'ref' => $arrayFormulaRange]);\n        }\n        if (isset($cellAttributes->ValueFormat)) {\n            $this->spreadsheet->getActiveSheet()->getCell($column . $row)\n                ->getStyle()->getNumberFormat()\n                ->setFormatCode((string) $cellAttributes->ValueFormat);\n        }\n    }\n\n    private function getArrayFormulaRange(string $column, int $row, int $cols, int $rows): string\n    {\n        $arrayFormulaRange = $column . $row;\n        $arrayFormulaRange .= ':'\n            . Coordinate::stringFromColumnIndex(\n                Coordinate::columnIndexFromString($column)\n                + $cols - 1\n            )\n            . (string) ($row + $rows - 1);\n\n        return $arrayFormulaRange;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Html.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse DOMAttr;\nuse DOMDocument;\nuse DOMElement;\nuse DOMNode;\nuse DOMText;\nuse LibXMLError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension as CssDimension;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Html as HelperHtml;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Security\\XmlScanner;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Throwable;\n\nclass Html extends BaseReader\n{\n    /**\n     * Sample size to read to determine if it's HTML or not.\n     */\n    const TEST_SAMPLE_SIZE = 2048;\n\n    private const STARTS_WITH_BOM = '/^(?:\\xfe\\xff|\\xff\\xfe|\\xEF\\xBB\\xBF)/';\n\n    private const DECLARES_CHARSET = '/\\bcharset=/i';\n\n    /**\n     * Input encoding.\n     */\n    protected string $inputEncoding = 'ANSI';\n\n    /**\n     * Sheet index to read.\n     */\n    protected int $sheetIndex = 0;\n\n    /**\n     * Formats.\n     */\n    protected const FORMATS = [\n        'h1' => [\n            'font' => [\n                'bold' => true,\n                'size' => 24,\n            ],\n        ], //    Bold, 24pt\n        'h2' => [\n            'font' => [\n                'bold' => true,\n                'size' => 18,\n            ],\n        ], //    Bold, 18pt\n        'h3' => [\n            'font' => [\n                'bold' => true,\n                'size' => 13.5,\n            ],\n        ], //    Bold, 13.5pt\n        'h4' => [\n            'font' => [\n                'bold' => true,\n                'size' => 12,\n            ],\n        ], //    Bold, 12pt\n        'h5' => [\n            'font' => [\n                'bold' => true,\n                'size' => 10,\n            ],\n        ], //    Bold, 10pt\n        'h6' => [\n            'font' => [\n                'bold' => true,\n                'size' => 7.5,\n            ],\n        ], //    Bold, 7.5pt\n        'a' => [\n            'font' => [\n                'underline' => true,\n                'color' => [\n                    'argb' => Color::COLOR_BLUE,\n                ],\n            ],\n        ], //    Blue underlined\n        'hr' => [\n            'borders' => [\n                'bottom' => [\n                    'borderStyle' => Border::BORDER_THIN,\n                    'color' => [\n                        Color::COLOR_BLACK,\n                    ],\n                ],\n            ],\n        ], //    Bottom border\n        'strong' => [\n            'font' => [\n                'bold' => true,\n            ],\n        ], //    Bold\n        'b' => [\n            'font' => [\n                'bold' => true,\n            ],\n        ], //    Bold\n        'i' => [\n            'font' => [\n                'italic' => true,\n            ],\n        ], //    Italic\n        'em' => [\n            'font' => [\n                'italic' => true,\n            ],\n        ], //    Italic\n    ];\n\n    /** @var array<string, bool> */\n    protected array $rowspan = [];\n\n    /**\n     * Default setting uses current setting of libxml_use_internal_errors.\n     * It will probably change to 'true' in a future release.\n     */\n    protected ?bool $suppressLoadWarnings = null;\n\n    /** @var LibXMLError[] */\n    protected array $libxmlMessages = [];\n\n    /**\n     * Suppress load warning messages, keeping them available\n     * in $this->libxmlMessages().\n     */\n    public function setSuppressLoadWarnings(?bool $suppressLoadWarnings): self\n    {\n        $this->suppressLoadWarnings = $suppressLoadWarnings;\n\n        return $this;\n    }\n\n    /** @return LibXMLError[] */\n    public function getLibxmlMessages(): array\n    {\n        return $this->libxmlMessages;\n    }\n\n    /**\n     * Create a new HTML Reader instance.\n     */\n    public function __construct()\n    {\n        parent::__construct();\n        $this->securityScanner = XmlScanner::getInstance($this);\n    }\n\n    /**\n     * Validate that the current file is an HTML file.\n     */\n    public function canRead(string $filename): bool\n    {\n        // Check if file exists\n        try {\n            $this->openFile($filename);\n        } catch (Exception) {\n            return false;\n        }\n\n        $beginning = preg_replace(self::STARTS_WITH_BOM, '', $this->readBeginning()) ?? '';\n\n        $startWithTag = self::startsWithTag($beginning);\n        $containsTags = self::containsTags($beginning);\n        $endsWithTag = self::endsWithTag($this->readEnding());\n\n        fclose($this->fileHandle);\n\n        return $startWithTag && $containsTags && $endsWithTag;\n    }\n\n    private function readBeginning(): string\n    {\n        fseek($this->fileHandle, 0);\n\n        return (string) fread($this->fileHandle, self::TEST_SAMPLE_SIZE);\n    }\n\n    private function readEnding(): string\n    {\n        $meta = stream_get_meta_data($this->fileHandle);\n        // Phpstan incorrectly flags following line for Php8.2-, corrected in 8.3\n        $filename = $meta['uri']; //@phpstan-ignore-line\n\n        clearstatcache(true, $filename);\n        $size = (int) filesize($filename);\n        if ($size === 0) {\n            return '';\n        }\n\n        $blockSize = self::TEST_SAMPLE_SIZE;\n        if ($size < $blockSize) {\n            $blockSize = $size;\n        }\n\n        fseek($this->fileHandle, $size - $blockSize);\n\n        return (string) fread($this->fileHandle, $blockSize);\n    }\n\n    private static function startsWithTag(string $data): bool\n    {\n        return str_starts_with(trim($data), '<');\n    }\n\n    private static function endsWithTag(string $data): bool\n    {\n        return str_ends_with(trim($data), '>');\n    }\n\n    private static function containsTags(string $data): bool\n    {\n        return strlen($data) !== strlen(strip_tags($data));\n    }\n\n    /**\n     * Loads Spreadsheet from file.\n     */\n    public function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        $spreadsheet = $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n\n        // Load into this instance\n        return $this->loadIntoExisting($filename, $spreadsheet);\n    }\n\n    /**\n     * Data Array used for testing only, should write to\n     * Spreadsheet object on completion of tests.\n     *\n     * @deprecated 5.4.0 No replacement.\n     *\n     * @var mixed[][]\n     */\n    protected array $dataArray = [];\n\n    protected int $tableLevel = 0;\n\n    /** @var string[] */\n    protected array $nestedColumn = ['A'];\n\n    protected function setTableStartColumn(string $column): string\n    {\n        if ($this->tableLevel == 0) {\n            $column = 'A';\n        }\n        ++$this->tableLevel;\n        $this->nestedColumn[$this->tableLevel] = $column;\n\n        return $this->nestedColumn[$this->tableLevel];\n    }\n\n    protected function getTableStartColumn(): string\n    {\n        return $this->nestedColumn[$this->tableLevel];\n    }\n\n    protected function releaseTableStartColumn(): string\n    {\n        --$this->tableLevel;\n\n        return array_pop($this->nestedColumn) ?? '';\n    }\n\n    /**\n     * Flush cell.\n     *\n     * @param string[] $attributeArray\n     *\n     * @param-out string $cellContentx\n     */\n    protected function flushCell(Worksheet $sheet, string $column, int|string $row, mixed &$cellContentx, array $attributeArray): void\n    {\n        $cellContent = $cellContentx;\n        if (is_string($cellContent)) {\n            //    Simple String content\n            if (trim($cellContent) > '') {\n                //    Only actually write it if there's content in the string\n                //    Write to worksheet to be done here...\n                //    ... we return the cell, so we can mess about with styles more easily\n\n                // Set cell value explicitly if there is data-type attribute\n                if (isset($attributeArray['data-checkbox'])) {\n                    $sheet->getStyle($column . $row)\n                        ->setCheckBox(true);\n                }\n                if (isset($attributeArray['data-type'])) {\n                    $datatype = $attributeArray['data-type'];\n                    if (in_array($datatype, [DataType::TYPE_STRING, DataType::TYPE_STRING2, DataType::TYPE_INLINE])) {\n                        //Prevent to Excel treat string with beginning equal sign or convert big numbers to scientific number\n                        if (str_starts_with($cellContent, '=')) {\n                            $sheet->getCell($column . $row)\n                                ->getStyle()\n                                ->setQuotePrefix(true);\n                        }\n                    }\n                    if ($datatype === DataType::TYPE_BOOL) {\n                        // This is the case where we can set cellContent to bool rather than string\n                        if ($cellContent === '☑') {\n                            $cellContent = true;\n                            $sheet->getStyle($column . $row)\n                                ->setCheckBox(true);\n                        } elseif ($cellContent === '☐') {\n                            $cellContent = false;\n                            $sheet->getStyle($column . $row)\n                                ->setCheckBox(true);\n                        } else {\n                            $cellContent = self::convertBoolean($cellContent);\n                            if (!is_bool($cellContent)) {\n                                $attributeArray['data-type'] = DataType::TYPE_STRING;\n                            }\n                        }\n                    }\n\n                    //catching the Exception and ignoring the invalid data types\n                    $hyperlink = $sheet->hyperlinkExists($column . $row) ? $sheet->getHyperlink($column . $row) : null;\n\n                    try {\n                        if (isset($attributeArray['data-formula'])) {\n                            $sheet->setCellValueExplicit($column . $row, $attributeArray['data-formula'], DataType::TYPE_FORMULA);\n                            $sheet->getCell($column . $row)\n                                ->setCalculatedValue(\n                                    $cellContent\n                                );\n                        } else {\n                            $sheet->setCellValueExplicit($column . $row, $cellContent, $attributeArray['data-type']);\n                        }\n                    } catch (SpreadsheetException) {\n                        $sheet->setCellValue($column . $row, $cellContent);\n                    }\n                    $sheet->setHyperlink($column . $row, $hyperlink);\n                } else {\n                    $hyperlink = null;\n                    if ($sheet->hyperlinkExists($column . $row)) {\n                        $hyperlink = $sheet->getHyperlink($column . $row);\n                    }\n                    $sheet->setCellValue($column . $row, $cellContent);\n                    $sheet->setHyperlink($column . $row, $hyperlink);\n                }\n                $this->dataArray[$row][$column] = $cellContent; // @phpstan-ignore-line\n            }\n        } else {\n            //    We have a Rich Text run.\n            //    I don't actually see any way to reach this line.\n            //    TODO\n            // @phpstan-ignore-next-line\n            $this->dataArray[$row][$column] = 'RICH TEXT: ' . StringHelper::convertToString($cellContent); // @codeCoverageIgnore\n        }\n        $cellContentx = '';\n    }\n\n    /** @var array<int, array<int, string>> */\n    private static array $falseTrueArray = [];\n\n    private static function convertBoolean(?string $cellContent): bool|string\n    {\n        if ($cellContent === '1') {\n            return true;\n        }\n        if ($cellContent === '0' || $cellContent === '' || $cellContent === null) {\n            return false;\n        }\n        if (empty(self::$falseTrueArray)) {\n            $calc = Calculation::getInstance();\n            self::$falseTrueArray = $calc->getFalseTrueArray();\n        }\n        if (in_array(mb_strtoupper($cellContent), self::$falseTrueArray[1], true)) {\n            return true;\n        }\n        if (in_array(mb_strtoupper($cellContent), self::$falseTrueArray[0], true)) {\n            return false;\n        }\n\n        return $cellContent;\n    }\n\n    private function processDomElementBody(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child): void\n    {\n        $attributeArray = [];\n        /** @var DOMAttr $attribute */\n        foreach (($child->attributes ?? []) as $attribute) {\n            $attributeArray[$attribute->name] = $attribute->value;\n        }\n\n        if ($child->nodeName === 'body') {\n            $row = 1;\n            $column = 'A';\n            $cellContent = '';\n            $this->tableLevel = 0;\n            $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n        } else {\n            $this->processDomElementTitle($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementTitle(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName === 'title') {\n            $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n\n            try {\n                $sheet->setTitle($cellContent, true, true);\n                $sheet->getParent()?->getProperties()?->setTitle($cellContent);\n            } catch (SpreadsheetException) {\n                // leave default title if too long or illegal chars\n            }\n            $cellContent = '';\n        } else {\n            $this->processDomElementSpanEtc($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    private const SPAN_ETC = ['span', 'div', 'font', 'i', 'em', 'strong', 'b'];\n\n    /** @param string[] $attributeArray */\n    private function processDomElementSpanEtc(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if (in_array((string) $child->nodeName, self::SPAN_ETC, true)) {\n            if (isset($attributeArray['class']) && $attributeArray['class'] === 'comment') {\n                $sheet->getComment($column . $row)\n                    ->getText()\n                    ->createTextRun($child->textContent);\n                if (isset($attributeArray['dir']) && $attributeArray['dir'] === 'rtl') {\n                    $sheet->getComment($column . $row)->setTextboxDirection(Comment::TEXTBOX_DIRECTION_RTL);\n                }\n                if (isset($attributeArray['style'])) {\n                    $alignStyle = $attributeArray['style'];\n                    if (preg_match('/\\btext-align:\\s*(left|right|center|justify)\\b/', (string) $alignStyle, $matches) === 1) {\n                        $sheet->getComment($column . $row)->setAlignment($matches[1]);\n                    }\n                }\n            } else {\n                $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n            }\n\n            if (isset(self::FORMATS[$child->nodeName])) {\n                $sheet->getStyle($column . $row)->applyFromArray(self::FORMATS[$child->nodeName]);\n            }\n        } else {\n            $this->processDomElementHr($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementHr(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName === 'hr') {\n            $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray);\n            ++$row;\n            $sheet->getStyle($column . $row)->applyFromArray(self::FORMATS[$child->nodeName]);\n            ++$row;\n        }\n        // fall through to br\n        $this->processDomElementBr($sheet, $row, $column, $cellContent, $child, $attributeArray);\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementBr(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName === 'br' || $child->nodeName === 'hr') {\n            if ($this->tableLevel > 0) {\n                //    If we're inside a table, replace with a newline and set the cell to wrap\n                $cellContent .= \"\\n\";\n                $sheet->getStyle($column . $row)->getAlignment()->setWrapText(true);\n            } else {\n                //    Otherwise flush our existing content and move the row cursor on\n                $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray);\n                ++$row;\n            }\n        } else {\n            $this->processDomElementA($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementA(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName === 'a') {\n            foreach ($attributeArray as $attributeName => $attributeValue) {\n                switch ($attributeName) {\n                    case 'href':\n                        $sheet->getCell($column . $row)->getHyperlink()->setUrl($attributeValue);\n                        $sheet->getStyle($column . $row)->applyFromArray(self::FORMATS[$child->nodeName]);\n\n                        break;\n                    case 'class':\n                        if ($attributeValue === 'comment-indicator') {\n                            break; // Ignore - it's just a red square.\n                        }\n                }\n            }\n            // no idea why this should be needed\n            //$cellContent .= ' ';\n            $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n        } else {\n            $this->processDomElementH1Etc($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    private const H1_ETC = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', 'p'];\n\n    /** @param string[] $attributeArray */\n    private function processDomElementH1Etc(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if (in_array((string) $child->nodeName, self::H1_ETC, true)) {\n            if ($this->tableLevel > 0) {\n                //    If we're inside a table, replace with a newline\n                $cellContent .= $cellContent ? \"\\n\" : '';\n                $sheet->getStyle($column . $row)->getAlignment()->setWrapText(true);\n                $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n            } else {\n                if ($cellContent > '') {\n                    $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray);\n                    ++$row;\n                }\n                $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n                $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray);\n\n                if (isset(self::FORMATS[$child->nodeName])) {\n                    $sheet->getStyle($column . $row)->applyFromArray(self::FORMATS[$child->nodeName]);\n                }\n\n                ++$row;\n                $column = 'A';\n            }\n        } else {\n            $this->processDomElementLi($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementLi(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName === 'li') {\n            if ($this->tableLevel > 0) {\n                //    If we're inside a table, replace with a newline\n                $cellContent .= $cellContent ? \"\\n\" : '';\n                $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n            } else {\n                if ($cellContent > '') {\n                    $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray);\n                }\n                ++$row;\n                $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n                $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray);\n                $column = 'A';\n            }\n        } else {\n            $this->processDomElementImg($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementImg(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName === 'img') {\n            $this->insertImage($sheet, $column, $row, $attributeArray);\n        } else {\n            $this->processDomElementTable($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    private string $currentColumn = 'A';\n\n    /** @param string[] $attributeArray */\n    private function processDomElementTable(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName === 'table') {\n            if (isset($attributeArray['class'])) {\n                $classes = explode(' ', $attributeArray['class']);\n                $sheet->setShowGridlines(in_array('gridlines', $classes, true));\n                $sheet->setPrintGridlines(in_array('gridlinesp', $classes, true));\n            }\n            if (isset($attributeArray['data-printarea'])) {\n                $sheet->getPageSetup()\n                    ->setPrintArea($attributeArray['data-printarea']);\n            }\n            if ('rtl' === ($attributeArray['dir'] ?? '')) {\n                $sheet->setRightToLeft(true);\n            }\n            $this->currentColumn = 'A';\n            $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray);\n            $column = $this->setTableStartColumn($column);\n            if ($this->tableLevel > 1 && $row > 1) {\n                --$row;\n            }\n            $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n            $column = $this->releaseTableStartColumn();\n            if ($this->tableLevel > 1) {\n                StringHelper::stringIncrement($column);\n            } else {\n                ++$row;\n            }\n        } else {\n            $this->processDomElementTr($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementTr(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName === 'col') {\n            $this->applyInlineStyle($sheet, -1, $this->currentColumn, $attributeArray);\n            StringHelper::stringIncrement($this->currentColumn);\n        } elseif ($child->nodeName === 'tr') {\n            $column = $this->getTableStartColumn();\n            $cellContent = '';\n            $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n\n            if (isset($attributeArray['height'])) {\n                $sheet->getRowDimension($row)->setRowHeight((float) $attributeArray['height']);\n            }\n\n            ++$row;\n        } else {\n            $this->processDomElementThTdOther($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementThTdOther(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        if ($child->nodeName !== 'td' && $child->nodeName !== 'th') {\n            $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n        } else {\n            $this->processDomElementThTd($sheet, $row, $column, $cellContent, $child, $attributeArray);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementBgcolor(Worksheet $sheet, int $row, string $column, array $attributeArray): void\n    {\n        if (isset($attributeArray['bgcolor'])) {\n            $sheet->getStyle(\"$column$row\")->applyFromArray(\n                [\n                    'fill' => [\n                        'fillType' => Fill::FILL_SOLID,\n                        'color' => ['rgb' => $this->getStyleColor($attributeArray['bgcolor'])],\n                    ],\n                ]\n            );\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementWidth(Worksheet $sheet, string $column, array $attributeArray): void\n    {\n        if (isset($attributeArray['width'])) {\n            $sheet->getColumnDimension($column)->setWidth((new CssDimension($attributeArray['width']))->width());\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementHeight(Worksheet $sheet, int $row, array $attributeArray): void\n    {\n        if (isset($attributeArray['height'])) {\n            $sheet->getRowDimension($row)->setRowHeight((new CssDimension($attributeArray['height']))->height());\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementAlign(Worksheet $sheet, int $row, string $column, array $attributeArray): void\n    {\n        if (isset($attributeArray['align'])) {\n            $sheet->getStyle($column . $row)->getAlignment()->setHorizontal($attributeArray['align']);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementVAlign(Worksheet $sheet, int $row, string $column, array $attributeArray): void\n    {\n        if (isset($attributeArray['valign'])) {\n            $sheet->getStyle($column . $row)->getAlignment()->setVertical($attributeArray['valign']);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementDataFormat(Worksheet $sheet, int $row, string $column, array $attributeArray): void\n    {\n        if (isset($attributeArray['data-format'])) {\n            $sheet->getStyle($column . $row)->getNumberFormat()->setFormatCode($attributeArray['data-format']);\n        }\n    }\n\n    /** @param string[] $attributeArray */\n    private function processDomElementThTd(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void\n    {\n        while (isset($this->rowspan[$column . $row])) {\n            $temp = (string) $column;\n            $column = StringHelper::stringIncrement($temp);\n        }\n        $this->processDomElement($child, $sheet, $row, $column, $cellContent);\n\n        // apply inline style\n        $this->applyInlineStyle($sheet, $row, $column, $attributeArray);\n\n        /** @var string $cellContent */\n        $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray);\n\n        $this->processDomElementBgcolor($sheet, $row, $column, $attributeArray);\n        $this->processDomElementWidth($sheet, $column, $attributeArray);\n        $this->processDomElementHeight($sheet, $row, $attributeArray);\n        $this->processDomElementAlign($sheet, $row, $column, $attributeArray);\n        $this->processDomElementVAlign($sheet, $row, $column, $attributeArray);\n        $this->processDomElementDataFormat($sheet, $row, $column, $attributeArray);\n\n        if (isset($attributeArray['rowspan'], $attributeArray['colspan'])) {\n            //create merging rowspan and colspan\n            $columnTo = $column;\n            for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) {\n                StringHelper::stringIncrement($columnTo);\n            }\n            $range = $column . $row . ':' . $columnTo . ($row + (int) $attributeArray['rowspan'] - 1);\n            foreach (Coordinate::extractAllCellReferencesInRange($range) as $value) {\n                $this->rowspan[$value] = true;\n            }\n            $sheet->mergeCells($range);\n            $column = $columnTo;\n        } elseif (isset($attributeArray['rowspan'])) {\n            //create merging rowspan\n            $range = $column . $row . ':' . $column . ($row + (int) $attributeArray['rowspan'] - 1);\n            foreach (Coordinate::extractAllCellReferencesInRange($range) as $value) {\n                $this->rowspan[$value] = true;\n            }\n            $sheet->mergeCells($range);\n        } elseif (isset($attributeArray['colspan'])) {\n            //create merging colspan\n            $columnTo = $column;\n            for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) {\n                StringHelper::stringIncrement($columnTo);\n            }\n            $sheet->mergeCells($column . $row . ':' . $columnTo . $row);\n            $column = $columnTo;\n        }\n\n        StringHelper::stringIncrement($column);\n    }\n\n    protected function processDomElement(DOMNode $element, Worksheet $sheet, int &$row, string &$column, string &$cellContent): void\n    {\n        foreach ($element->childNodes as $child) {\n            if ($child instanceof DOMText) {\n                $domText = (string) preg_replace('/\\s+/', ' ', trim($child->nodeValue ?? ''));\n                if ($domText === \"\\u{a0}\") {\n                    $domText = '';\n                }\n                //    simply append the text if the cell content is a plain text string\n                $cellContent .= $domText;\n                //    but if we have a rich text run instead, we need to append it correctly\n                //    TODO\n            } elseif ($child instanceof DOMElement) {\n                $this->processDomElementBody($sheet, $row, $column, $cellContent, $child);\n            }\n        }\n    }\n\n    /**\n     * Loads PhpSpreadsheet from file into PhpSpreadsheet instance.\n     */\n    public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet): Spreadsheet\n    {\n        // Validate\n        if (!$this->canRead($filename)) {\n            throw new Exception($filename . ' is an Invalid HTML file.');\n        }\n\n        // Create a new DOM object\n        $dom = new DOMDocument();\n\n        // Reload the HTML file into the DOM object\n        if (is_bool($this->suppressLoadWarnings)) {\n            $useErrors = libxml_use_internal_errors($this->suppressLoadWarnings);\n        } else {\n            $useErrors = null;\n        }\n\n        try {\n            $convert = $this->getSecurityScannerOrThrow()->scanFile($filename);\n            $convert = static::replaceNonAsciiIfNeeded($convert);\n            $loaded = ($convert === null) ? false : $dom->loadHTML($convert);\n        } catch (Throwable $e) {\n            $loaded = false;\n        } finally {\n            $this->libxmlMessages = libxml_get_errors();\n            if (is_bool($useErrors)) {\n                libxml_use_internal_errors($useErrors);\n            }\n        }\n        if ($loaded === false) {\n            throw new Exception('Failed to load file ' . $filename . ' as a DOM Document', 0, $e ?? null);\n        }\n        self::loadProperties($dom, $spreadsheet);\n\n        return $this->loadDocument($dom, $spreadsheet);\n    }\n\n    private static function loadProperties(DOMDocument $dom, Spreadsheet $spreadsheet): void\n    {\n        $properties = $spreadsheet->getProperties();\n        foreach ($dom->getElementsByTagName('meta') as $meta) {\n            $metaContent = (string) $meta->getAttribute('content');\n            if ($metaContent !== '') {\n                $metaName = (string) $meta->getAttribute('name');\n                switch ($metaName) {\n                    case 'author':\n                        $properties->setCreator($metaContent);\n\n                        break;\n                    case 'category':\n                        $properties->setCategory($metaContent);\n\n                        break;\n                    case 'company':\n                        $properties->setCompany($metaContent);\n\n                        break;\n                    case 'created':\n                        $properties->setCreated($metaContent);\n\n                        break;\n                    case 'description':\n                        $properties->setDescription($metaContent);\n\n                        break;\n                    case 'keywords':\n                        $properties->setKeywords($metaContent);\n\n                        break;\n                    case 'lastModifiedBy':\n                        $properties->setLastModifiedBy($metaContent);\n\n                        break;\n                    case 'manager':\n                        $properties->setManager($metaContent);\n\n                        break;\n                    case 'modified':\n                        $properties->setModified($metaContent);\n\n                        break;\n                    case 'subject':\n                        $properties->setSubject($metaContent);\n\n                        break;\n                    case 'title':\n                        $properties->setTitle($metaContent);\n\n                        break;\n                    case 'viewport':\n                        $properties->setViewport($metaContent);\n\n                        break;\n                    default:\n                        if (preg_match('/^custom[.](bool|date|float|int|string)[.](.+)$/', $metaName, $matches) === 1) {\n                            match ($matches[1]) {\n                                'bool' => $properties->setCustomProperty($matches[2], (bool) $metaContent, Properties::PROPERTY_TYPE_BOOLEAN),\n                                'float' => $properties->setCustomProperty($matches[2], (float) $metaContent, Properties::PROPERTY_TYPE_FLOAT),\n                                'int' => $properties->setCustomProperty($matches[2], (int) $metaContent, Properties::PROPERTY_TYPE_INTEGER),\n                                'date' => $properties->setCustomProperty($matches[2], $metaContent, Properties::PROPERTY_TYPE_DATE),\n                                // string\n                                default => $properties->setCustomProperty($matches[2], $metaContent, Properties::PROPERTY_TYPE_STRING),\n                            };\n                        }\n                }\n            }\n        }\n        if (!empty($dom->baseURI)) {\n            $properties->setHyperlinkBase($dom->baseURI);\n        }\n    }\n\n    /** @param string[] $matches */\n    private static function replaceNonAscii(array $matches): string\n    {\n        return '&#' . mb_ord($matches[0], 'UTF-8') . ';';\n    }\n\n    /** @internal */\n    protected static function replaceNonAsciiIfNeeded(string $convert): ?string\n    {\n        if (preg_match(self::STARTS_WITH_BOM, $convert) !== 1 && preg_match(self::DECLARES_CHARSET, $convert) !== 1) {\n            $lowend = \"\\u{80}\";\n            $highend = \"\\u{10ffff}\";\n            $regexp = \"/[$lowend-$highend]/u\";\n            /** @var callable $callback */\n            $callback = [self::class, 'replaceNonAscii'];\n            $convert = preg_replace_callback($regexp, $callback, $convert);\n        }\n\n        return $convert;\n    }\n\n    /**\n     * Spreadsheet from content.\n     */\n    public function loadFromString(string $content, ?Spreadsheet $spreadsheet = null): Spreadsheet\n    {\n        //    Create a new DOM object\n        $dom = new DOMDocument();\n\n        //    Reload the HTML file into the DOM object\n        if (is_bool($this->suppressLoadWarnings)) {\n            $useErrors = libxml_use_internal_errors($this->suppressLoadWarnings);\n        } else {\n            $useErrors = null;\n        }\n\n        try {\n            $convert = $this->getSecurityScannerOrThrow()->scan($content);\n            $convert = static::replaceNonAsciiIfNeeded($convert);\n            $loaded = ($convert === null) ? false : $dom->loadHTML($convert);\n        } catch (Throwable $e) {\n            $loaded = false;\n        } finally {\n            $this->libxmlMessages = libxml_get_errors();\n            if (is_bool($useErrors)) {\n                libxml_use_internal_errors($useErrors);\n            }\n        }\n        if ($loaded === false) {\n            throw new Exception('Failed to load content as a DOM Document', 0, $e ?? null);\n        }\n        $spreadsheet = $spreadsheet ?? $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n        self::loadProperties($dom, $spreadsheet);\n\n        return $this->loadDocument($dom, $spreadsheet);\n    }\n\n    /**\n     * Loads PhpSpreadsheet from DOMDocument into PhpSpreadsheet instance.\n     */\n    private function loadDocument(DOMDocument $document, Spreadsheet $spreadsheet): Spreadsheet\n    {\n        while ($spreadsheet->getSheetCount() <= $this->sheetIndex) {\n            $spreadsheet->createSheet();\n        }\n        $spreadsheet->setActiveSheetIndex($this->sheetIndex);\n\n        // Discard white space\n        $document->preserveWhiteSpace = false;\n\n        $row = 0;\n        $column = 'A';\n        $content = '';\n        $this->rowspan = [];\n        $this->processDomElement($document, $spreadsheet->getActiveSheet(), $row, $column, $content);\n\n        // Return\n        return $spreadsheet;\n    }\n\n    /**\n     * Get sheet index.\n     */\n    public function getSheetIndex(): int\n    {\n        return $this->sheetIndex;\n    }\n\n    /**\n     * Set sheet index.\n     *\n     * @param int $sheetIndex Sheet index\n     *\n     * @return $this\n     */\n    public function setSheetIndex(int $sheetIndex): static\n    {\n        $this->sheetIndex = $sheetIndex;\n\n        return $this;\n    }\n\n    /**\n     * Apply inline css inline style.\n     *\n     * NOTES :\n     * Currently only intended for td & th element,\n     * and only takes 'background-color' and 'color'; property with HEX color\n     *\n     * TODO :\n     * - Implement to other properties, such as border\n     *\n     * @param string[] $attributeArray\n     */\n    private function applyInlineStyle(Worksheet &$sheet, int $row, string $column, array $attributeArray): void\n    {\n        if (!isset($attributeArray['style'])) {\n            return;\n        }\n\n        if ($row <= 0 || $column === '') {\n            $cellStyle = new Style();\n        } elseif (isset($attributeArray['rowspan'], $attributeArray['colspan'])) {\n            $columnTo = $column;\n            for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) {\n                StringHelper::stringIncrement($columnTo);\n            }\n            $range = $column . $row . ':' . $columnTo . ($row + (int) $attributeArray['rowspan'] - 1);\n            $cellStyle = $sheet->getStyle($range);\n        } elseif (isset($attributeArray['rowspan'])) {\n            $range = $column . $row . ':' . $column . ($row + (int) $attributeArray['rowspan'] - 1);\n            $cellStyle = $sheet->getStyle($range);\n        } elseif (isset($attributeArray['colspan'])) {\n            $columnTo = $column;\n            for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) {\n                StringHelper::stringIncrement($columnTo);\n            }\n            $range = $column . $row . ':' . $columnTo . $row;\n            $cellStyle = $sheet->getStyle($range);\n        } else {\n            $cellStyle = $sheet->getStyle($column . $row);\n        }\n\n        // add color styles (background & text) from dom element,currently support : td & th, using ONLY inline css style with RGB color\n        $styles = explode(';', $attributeArray['style']);\n        foreach ($styles as $st) {\n            $value = explode(':', $st);\n            $styleName = trim($value[0]);\n            $styleValue = isset($value[1]) ? trim($value[1]) : null;\n            $styleValueString = (string) $styleValue;\n\n            if (!$styleName) {\n                continue;\n            }\n\n            switch ($styleName) {\n                case 'background':\n                case 'background-color':\n                    $styleColor = $this->getStyleColor($styleValueString);\n\n                    if (!$styleColor) {\n                        continue 2;\n                    }\n\n                    $cellStyle->applyFromArray(['fill' => ['fillType' => Fill::FILL_SOLID, 'color' => ['rgb' => $styleColor]]]);\n\n                    break;\n                case 'color':\n                    $styleColor = $this->getStyleColor($styleValueString);\n\n                    if (!$styleColor) {\n                        continue 2;\n                    }\n\n                    $cellStyle->applyFromArray(['font' => ['color' => ['rgb' => $styleColor]]]);\n\n                    break;\n\n                case 'border':\n                    $this->setBorderStyle($cellStyle, $styleValueString, 'allBorders');\n\n                    break;\n\n                case 'border-top':\n                    $this->setBorderStyle($cellStyle, $styleValueString, 'top');\n\n                    break;\n\n                case 'border-bottom':\n                    $this->setBorderStyle($cellStyle, $styleValueString, 'bottom');\n\n                    break;\n\n                case 'border-left':\n                    $this->setBorderStyle($cellStyle, $styleValueString, 'left');\n\n                    break;\n\n                case 'border-right':\n                    $this->setBorderStyle($cellStyle, $styleValueString, 'right');\n\n                    break;\n\n                case 'font-size':\n                    $cellStyle->getFont()->setSize(\n                        (float) $styleValue\n                    );\n\n                    break;\n\n                case 'direction':\n                    if ($styleValue === 'rtl') {\n                        $cellStyle->getAlignment()\n                            ->setReadOrder(Alignment::READORDER_RTL);\n                    } elseif ($styleValue === 'ltr') {\n                        $cellStyle->getAlignment()\n                            ->setReadOrder(Alignment::READORDER_LTR);\n                    }\n\n                    break;\n\n                case 'font-weight':\n                    if ($styleValue === 'bold' || $styleValue >= 500) {\n                        $cellStyle->getFont()->setBold(true);\n                    }\n\n                    break;\n\n                case 'font-style':\n                    if ($styleValue === 'italic') {\n                        $cellStyle->getFont()->setItalic(true);\n                    }\n\n                    break;\n\n                case 'font-family':\n                    $cellStyle->getFont()->setName(str_replace('\\'', '', $styleValueString));\n\n                    break;\n\n                case 'text-decoration':\n                    switch ($styleValue) {\n                        case 'underline':\n                            $cellStyle->getFont()->setUnderline(Font::UNDERLINE_SINGLE);\n\n                            break;\n                        case 'line-through':\n                            $cellStyle->getFont()->setStrikethrough(true);\n\n                            break;\n                    }\n\n                    break;\n\n                case 'text-align':\n                    $cellStyle->getAlignment()->setHorizontal($styleValueString);\n\n                    break;\n\n                case 'vertical-align':\n                    $cellStyle->getAlignment()->setVertical($styleValueString);\n\n                    break;\n\n                case 'width':\n                    if ($column !== '') {\n                        $sheet->getColumnDimension($column)->setWidth(\n                            (new CssDimension($styleValue ?? ''))->width()\n                        );\n                    }\n\n                    break;\n\n                case 'height':\n                    if ($row > 0) {\n                        $sheet->getRowDimension($row)->setRowHeight(\n                            (new CssDimension($styleValue ?? ''))->height()\n                        );\n                    }\n\n                    break;\n\n                case 'word-wrap':\n                    $cellStyle->getAlignment()->setWrapText(\n                        $styleValue === 'break-word'\n                    );\n\n                    break;\n\n                case 'text-indent':\n                    $indentDimension = new CssDimension($styleValueString);\n                    $indent = $indentDimension\n                        ->toUnit(CssDimension::UOM_PIXELS);\n                    $cellStyle->getAlignment()->setIndent(\n                        (int) ($indent / Alignment::INDENT_UNITS_TO_PIXELS)\n                    );\n\n                    break;\n            }\n        }\n    }\n\n    /**\n     * Check if has #, so we can get clean hex.\n     */\n    public function getStyleColor(?string $value): string\n    {\n        $value = (string) $value;\n        if (str_starts_with($value, '#')) {\n            return substr($value, 1);\n        }\n\n        return HelperHtml::colourNameLookup($value);\n    }\n\n    /** @param string[] $attributes */\n    private function insertImage(Worksheet $sheet, string $column, int $row, array $attributes): void\n    {\n        if (!isset($attributes['src'])) {\n            return;\n        }\n        $styleArray = self::getStyleArray($attributes);\n\n        $src = $attributes['src'];\n        if (!str_starts_with($src, 'data:')) {\n            $src = urldecode($src);\n        }\n        $width = isset($attributes['width']) ? (float) $attributes['width'] : ($styleArray['width'] ?? null);\n        $height = isset($attributes['height']) ? (float) $attributes['height'] : ($styleArray['height'] ?? null);\n        $name = $attributes['alt'] ?? null;\n\n        $drawing = new Drawing();\n        $drawing->setPath($src, false, allowExternal: $this->allowExternalImages, isWhitelisted: $this->isWhitelisted);\n        if ($drawing->getPath() === '') {\n            return;\n        }\n        $drawing->setWorksheet($sheet);\n        $drawing->setCoordinates($column . $row);\n        $drawing->setOffsetX(0);\n        $drawing->setOffsetY(10);\n        $drawing->setResizeProportional(true);\n\n        if ($name) {\n            $drawing->setName($name);\n        }\n\n        /** @var null|scalar $width */\n        /** @var null|scalar $height */\n        if ($width) {\n            if ($height) {\n                $drawing->setWidthAndHeight((int) $width, (int) $height);\n            } else {\n                $drawing->setWidth((int) $width);\n            }\n        } elseif ($height) {\n            $drawing->setHeight((int) $height);\n        }\n\n        $sheet->getColumnDimension($column)->setWidth(\n            $drawing->getWidth() / 6\n        );\n\n        $sheet->getRowDimension($row)->setRowHeight(\n            $drawing->getHeight() * 0.9\n        );\n\n        if (isset($styleArray['opacity'])) {\n            $opacity = $styleArray['opacity'];\n            if (is_numeric($opacity)) {\n                $drawing->setOpacity((int) ($opacity * 100000));\n            }\n        }\n    }\n\n    /**\n     * @param string[] $attributes\n     *\n     * @return mixed[]\n     */\n    private static function getStyleArray(array $attributes): array\n    {\n        $styleArray = [];\n        if (isset($attributes['style'])) {\n            $styles = explode(';', $attributes['style']);\n            foreach ($styles as $style) {\n                $value = explode(':', $style);\n                if (count($value) === 2) {\n                    $arrayKey = trim($value[0]);\n                    $arrayValue = trim($value[1]);\n                    if ($arrayKey === 'width') {\n                        if (str_ends_with($arrayValue, 'px')) {\n                            $arrayValue = (string) (((float) substr($arrayValue, 0, -2)));\n                        } else {\n                            $arrayValue = (new CssDimension($arrayValue))->toUnit(CssDimension::UOM_PIXELS);\n                        }\n                    } elseif ($arrayKey === 'height') {\n                        if (str_ends_with($arrayValue, 'px')) {\n                            $arrayValue = substr($arrayValue, 0, -2);\n                        } else {\n                            $arrayValue = (new CssDimension($arrayValue))->toUnit(CssDimension::UOM_PIXELS);\n                        }\n                    }\n                    $styleArray[$arrayKey] = $arrayValue;\n                }\n            }\n        }\n\n        return $styleArray;\n    }\n\n    private const BORDER_MAPPINGS = [\n        'dash-dot' => Border::BORDER_DASHDOT,\n        'dash-dot-dot' => Border::BORDER_DASHDOTDOT,\n        'dashed' => Border::BORDER_DASHED,\n        'dotted' => Border::BORDER_DOTTED,\n        'double' => Border::BORDER_DOUBLE,\n        'hair' => Border::BORDER_HAIR,\n        'medium' => Border::BORDER_MEDIUM,\n        'medium-dashed' => Border::BORDER_MEDIUMDASHED,\n        'medium-dash-dot' => Border::BORDER_MEDIUMDASHDOT,\n        'medium-dash-dot-dot' => Border::BORDER_MEDIUMDASHDOTDOT,\n        'none' => Border::BORDER_NONE,\n        'slant-dash-dot' => Border::BORDER_SLANTDASHDOT,\n        'solid' => Border::BORDER_THIN,\n        'thick' => Border::BORDER_THICK,\n    ];\n\n    /** @return array<string, string> */\n    public static function getBorderMappings(): array\n    {\n        return self::BORDER_MAPPINGS;\n    }\n\n    /**\n     * Map html border style to PhpSpreadsheet border style.\n     */\n    public function getBorderStyle(string $style): ?string\n    {\n        return self::BORDER_MAPPINGS[$style] ?? null;\n    }\n\n    private function setBorderStyle(Style $cellStyle, string $styleValue, string $type): void\n    {\n        if (trim($styleValue) === Border::BORDER_NONE) {\n            $borderStyle = Border::BORDER_NONE;\n            $color = null;\n        } else {\n            $borderArray = explode(' ', $styleValue);\n            $borderCount = count($borderArray);\n            if ($borderCount >= 3) {\n                $borderStyle = $borderArray[1];\n                $color = $borderArray[2];\n            } else {\n                $borderStyle = $borderArray[0];\n                $color = $borderArray[1] ?? null;\n            }\n        }\n\n        $cellStyle->applyFromArray([\n            'borders' => [\n                $type => [\n                    'borderStyle' => $this->getBorderStyle($borderStyle),\n                    'color' => ['rgb' => $this->getStyleColor($color)],\n                ],\n            ],\n        ]);\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        $info = [];\n        $spreadsheet = $this->newSpreadsheet();\n        $this->loadIntoExisting($filename, $spreadsheet);\n        foreach ($spreadsheet->getAllSheets() as $sheet) {\n            $newEntry = ['worksheetName' => $sheet->getTitle()];\n            $newEntry['lastColumnLetter'] = $sheet->getHighestDataColumn();\n            $newEntry['lastColumnIndex'] = Coordinate::columnIndexFromString($sheet->getHighestDataColumn()) - 1;\n            $newEntry['totalRows'] = $sheet->getHighestDataRow();\n            $newEntry['totalColumns'] = $newEntry['lastColumnIndex'] + 1;\n            $newEntry['sheetState'] = Worksheet::SHEETSTATE_VISIBLE;\n            $info[] = $newEntry;\n        }\n        $spreadsheet->disconnectWorksheets();\n\n        return $info;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/IReadFilter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\ninterface IReadFilter\n{\n    /**\n     * Should this cell be read?\n     *\n     * @param string $columnAddress Column address (as a string value like \"A\", or \"IV\")\n     * @param int $row Row number\n     * @param string $worksheetName Optional worksheet name\n     */\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/IReader.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\ninterface IReader\n{\n    /**\n     * Flag used to load the charts.\n     *\n     * This flag is supported only for some formats.\n     */\n    public const LOAD_WITH_CHARTS = 1;\n\n    /**\n     * Flag used to read data only, not style or structure information.\n     */\n    public const READ_DATA_ONLY = 2;\n\n    /**\n     * Flag used to ignore empty cells when reading.\n     *\n     * The ignored cells will not be instantiated.\n     */\n    public const IGNORE_EMPTY_CELLS = 4;\n\n    /**\n     * Flag used to ignore rows without cells.\n     *\n     * This flag is supported only for some formats.\n     * This can heavily improve performance for some files.\n     */\n    public const IGNORE_ROWS_WITH_NO_CELLS = 8;\n\n    /**\n     * Allow external images. Use with caution.\n     * Improper specification of these within a spreadsheet\n     * can subject the caller to security exploits.\n     */\n    public const ALLOW_EXTERNAL_IMAGES = 16;\n    public const DONT_ALLOW_EXTERNAL_IMAGES = 32;\n\n    public const CREATE_BLANK_SHEET_IF_NONE_READ = 64;\n\n    public function __construct();\n\n    /**\n     * Can the current IReader read the file?\n     */\n    public function canRead(string $filename): bool;\n\n    /**\n     * Read data only?\n     *        If this is true, then the Reader will only read data values for cells, it will not read any formatting\n     *           or structural information (like merges).\n     *        If false (the default) it will read data and formatting.\n     */\n    public function getReadDataOnly(): bool;\n\n    /**\n     * Set read data only\n     *        Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting\n     *            or structural information (like merges).\n     *        Set to false (the default) to advise the Reader to read both data and formatting for cells.\n     *\n     * @return $this\n     */\n    public function setReadDataOnly(bool $readDataOnly): self;\n\n    /**\n     * Read empty cells?\n     *        If this is true (the default), then the Reader will read data values for all cells, irrespective of value.\n     *        If false it will not read data for cells containing a null value or an empty string.\n     */\n    public function getReadEmptyCells(): bool;\n\n    /**\n     * Set read empty cells\n     *        Set to true (the default) to advise the Reader read data values for all cells, irrespective of value.\n     *        Set to false to advise the Reader to ignore cells containing a null value or an empty string.\n     *\n     * @return $this\n     */\n    public function setReadEmptyCells(bool $readEmptyCells): self;\n\n    /**\n     * Read charts in workbook?\n     *      If this is true, then the Reader will include any charts that exist in the workbook.\n     *         Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value.\n     *      If false (the default) it will ignore any charts defined in the workbook file.\n     */\n    public function getIncludeCharts(): bool;\n\n    /**\n     * Set read charts in workbook\n     *     Set to true, to advise the Reader to include any charts that exist in the workbook.\n     *         Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value.\n     *     Set to false (the default) to discard charts.\n     *\n     * @return $this\n     */\n    public function setIncludeCharts(bool $includeCharts): self;\n\n    /**\n     * Get which sheets to load\n     * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null\n     *        indicating that all worksheets in the workbook should be loaded.\n     *\n     * @return null|string[]\n     */\n    public function getLoadSheetsOnly(): ?array;\n\n    /**\n     * Set which sheets to load.\n     *\n     * @param null|string|string[] $value This should be either an array of worksheet names to be loaded,\n     *          or a string containing a single worksheet name. If NULL, then it tells the Reader to\n     *          read all worksheets in the workbook\n     *\n     * @return $this\n     */\n    public function setLoadSheetsOnly(string|array|null $value): self;\n\n    /**\n     * Set all sheets to load\n     *        Tells the Reader to load all worksheets from the workbook.\n     *\n     * @return $this\n     */\n    public function setLoadAllSheets(): self;\n\n    /**\n     * Read filter.\n     */\n    public function getReadFilter(): IReadFilter;\n\n    /**\n     * Set read filter.\n     *\n     * @return $this\n     */\n    public function setReadFilter(IReadFilter $readFilter): self;\n\n    /**\n     * Allow external images. Use with caution.\n     * Improper specification of these within a spreadsheet\n     * can subject the caller to security exploits.\n     */\n    public function setAllowExternalImages(bool $allowExternalImages): self;\n\n    public function getAllowExternalImages(): bool;\n\n    /**\n     * Create a blank sheet if none are read,\n     * possibly due to a typo when using LoadSheetsOnly.\n     */\n    public function setCreateBlankSheetIfNoneRead(bool $createBlankSheetIfNoneRead): self;\n\n    /**\n     * Loads PhpSpreadsheet from file.\n     *\n     * @param string $filename The name of the file to load\n     * @param int $flags Flags that can change the behaviour of the Writer:\n     *            self::LOAD_WITH_CHARTS    Load any charts that are defined (if the Reader supports Charts)\n     *            self::READ_DATA_ONLY      Read only data, not style or structure information, from the file\n     *            self::IGNORE_EMPTY_CELLS  Don't read empty cells (cells that contain a null value,\n     *                                      empty string, or a string containing only whitespace characters)\n     *            self::IGNORE_ROWS_WITH_NO_CELLS    Don't load any rows that contain no cells.\n     *            self::ALLOW_EXTERNAL_IMAGES    Attempt to fetch images stored outside the spreadsheet.\n     *            self::DONT_ALLOW_EXTERNAL_IMAGES    Don't attempt to fetch images stored outside the spreadsheet.\n     *            self::CREATE_BLANK_SHEET_IF_NONE_READ    If no sheets are read, create a blank one.\n     */\n    public function load(string $filename, int $flags = 0): Spreadsheet;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Ods/AutoFilter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\n\nuse DOMElement;\nuse DOMNode;\n\nclass AutoFilter extends BaseLoader\n{\n    public function read(DOMElement $workbookData): void\n    {\n        $this->readAutoFilters($workbookData);\n    }\n\n    protected function readAutoFilters(DOMElement $workbookData): void\n    {\n        $databases = $workbookData->getElementsByTagNameNS($this->tableNs, 'database-ranges');\n\n        foreach ($databases as $autofilters) {\n            foreach ($autofilters->childNodes as $autofilter) {\n                $autofilterRange = $this->getAttributeValue($autofilter, 'target-range-address');\n                if ($autofilterRange !== null) {\n                    $baseAddress = FormulaTranslator::convertToExcelAddressValue($autofilterRange);\n                    $this->spreadsheet->getActiveSheet()->setAutoFilter($baseAddress);\n                }\n            }\n        }\n    }\n\n    protected function getAttributeValue(?DOMNode $node, string $attributeName): ?string\n    {\n        if ($node !== null && $node->attributes !== null) {\n            $attribute = $node->attributes->getNamedItemNS(\n                $this->tableNs,\n                $attributeName\n            );\n\n            if ($attribute !== null) {\n                return $attribute->nodeValue;\n            }\n        }\n\n        return null;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Ods/BaseLoader.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\n\nuse DOMElement;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nabstract class BaseLoader\n{\n    protected Spreadsheet $spreadsheet;\n\n    protected string $tableNs;\n\n    public function __construct(Spreadsheet $spreadsheet, string $tableNs)\n    {\n        $this->spreadsheet = $spreadsheet;\n        $this->tableNs = $tableNs;\n    }\n\n    abstract public function read(DOMElement $workbookData): void;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Ods/DefinedNames.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\n\nuse DOMElement;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass DefinedNames extends BaseLoader\n{\n    public function read(DOMElement $workbookData): void\n    {\n        $this->readDefinedRanges($workbookData);\n        $this->readDefinedExpressions($workbookData);\n    }\n\n    /**\n     * Read any Named Ranges that are defined in this spreadsheet.\n     */\n    protected function readDefinedRanges(DOMElement $workbookData): void\n    {\n        $namedRanges = $workbookData->getElementsByTagNameNS($this->tableNs, 'named-range');\n        foreach ($namedRanges as $definedNameElement) {\n            $definedName = $definedNameElement->getAttributeNS($this->tableNs, 'name');\n            $baseAddress = $definedNameElement->getAttributeNS($this->tableNs, 'base-cell-address');\n            $range = $definedNameElement->getAttributeNS($this->tableNs, 'cell-range-address');\n\n            /** @var non-empty-string $baseAddress */\n            $baseAddress = FormulaTranslator::convertToExcelAddressValue($baseAddress);\n            $range = FormulaTranslator::convertToExcelAddressValue($range);\n\n            $this->addDefinedName($baseAddress, $definedName, $range);\n        }\n    }\n\n    /**\n     * Read any Named Formulae that are defined in this spreadsheet.\n     */\n    protected function readDefinedExpressions(DOMElement $workbookData): void\n    {\n        $namedExpressions = $workbookData->getElementsByTagNameNS($this->tableNs, 'named-expression');\n        foreach ($namedExpressions as $definedNameElement) {\n            $definedName = $definedNameElement->getAttributeNS($this->tableNs, 'name');\n            $baseAddress = $definedNameElement->getAttributeNS($this->tableNs, 'base-cell-address');\n            $expression = $definedNameElement->getAttributeNS($this->tableNs, 'expression');\n\n            /** @var non-empty-string $baseAddress */\n            $baseAddress = FormulaTranslator::convertToExcelAddressValue($baseAddress);\n            $expression = substr($expression, strpos($expression, ':=') + 1);\n            $expression = FormulaTranslator::convertToExcelFormulaValue($expression);\n\n            $this->addDefinedName($baseAddress, $definedName, $expression);\n        }\n    }\n\n    /**\n     * Assess scope and store the Defined Name.\n     *\n     * @param non-empty-string $baseAddress\n     */\n    private function addDefinedName(string $baseAddress, string $definedName, string $value): void\n    {\n        [$sheetReference] = Worksheet::extractSheetTitle($baseAddress, true, true);\n        $worksheet = $this->spreadsheet->getSheetByName($sheetReference);\n        // Worksheet might still be null if we're only loading selected sheets rather than the full spreadsheet\n        if ($worksheet !== null) {\n            $this->spreadsheet->addDefinedName(DefinedName::createInstance((string) $definedName, $worksheet, $value));\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Ods/FormulaTranslator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FormulaTranslator\n{\n    private static function replaceQuotedPeriod(string $value): string\n    {\n        $value2 = '';\n        $quoted = false;\n        foreach (mb_str_split($value, 1, 'UTF-8') as $char) {\n            if ($char === \"'\") {\n                $quoted = !$quoted;\n            } elseif ($char === '.' && $quoted) {\n                $char = \"\\u{fffe}\";\n            }\n            $value2 .= $char;\n        }\n\n        return $value2;\n    }\n\n    public static function convertToExcelAddressValue(string $openOfficeAddress): string\n    {\n        // Cell range 3-d reference\n        // As we don't support 3-d ranges, we're just going to take a quick and dirty approach\n        //  and assume that the second worksheet reference is the same as the first\n        $excelAddress = Preg::replace(\n            [\n                '/\\$?([^\\.]+)\\.([^\\.]+):\\$?([^\\.]+)\\.([^\\.]+)/miu',\n                '/\\$?([^\\.]+)\\.([^\\.]+):\\.([^\\.]+)/miu', // Cell range reference in another sheet\n                '/\\$?([^\\.]+)\\.([^\\.]+)/miu', // Cell reference in another sheet\n                '/\\.([^\\.]+):\\.([^\\.]+)/miu', // Cell range reference\n                '/\\.([^\\.]+)/miu', // Simple cell reference\n                '/\\x{FFFE}/miu', // restore quoted periods\n            ],\n            [\n                '$1!$2:$4',\n                '$1!$2:$3',\n                '$1!$2',\n                '$1:$2',\n                '$1',\n                '.',\n            ],\n            self::replaceQuotedPeriod($openOfficeAddress)\n        );\n\n        return $excelAddress;\n    }\n\n    public static function convertToExcelFormulaValue(string $openOfficeFormula): string\n    {\n        $temp = explode(Calculation::FORMULA_STRING_QUOTE, $openOfficeFormula);\n        $tKey = false;\n        $inMatrixBracesLevel = 0;\n        $inFunctionBracesLevel = 0;\n        foreach ($temp as &$value) {\n            // @var string $value\n            // Only replace in alternate array entries (i.e. non-quoted blocks)\n            //      so that conversion isn't done in string values\n            $tKey = $tKey === false;\n            if ($tKey) {\n                $value = Preg::replace(\n                    [\n                        '/\\[\\$?([^\\.]+)\\.([^\\.]+):\\.([^\\.]+)\\]/miu', // Cell range reference in another sheet\n                        '/\\[\\$?([^\\.]+)\\.([^\\.]+)\\]/miu', // Cell reference in another sheet\n                        '/\\[\\.([^\\.]+):\\.([^\\.]+)\\]/miu', // Cell range reference\n                        '/\\[\\.([^\\.]+)\\]/miu', // Simple cell reference\n                        '/\\x{FFFE}/miu', // restore quoted periods\n                    ],\n                    [\n                        '$1!$2:$3',\n                        '$1!$2',\n                        '$1:$2',\n                        '$1',\n                        '.',\n                    ],\n                    self::replaceQuotedPeriod($value)\n                );\n                // Convert references to defined names/formulae\n                $value = str_replace('$$', '', $value);\n\n                // Convert ODS function argument separators to Excel function argument separators\n                $value = Calculation::translateSeparator(';', ',', $value, $inFunctionBracesLevel);\n\n                // Convert ODS matrix separators to Excel matrix separators\n                $value = Calculation::translateSeparator(\n                    ';',\n                    ',',\n                    $value,\n                    $inMatrixBracesLevel,\n                    Calculation::FORMULA_OPEN_MATRIX_BRACE,\n                    Calculation::FORMULA_CLOSE_MATRIX_BRACE\n                );\n                $value = Calculation::translateSeparator(\n                    '|',\n                    ';',\n                    $value,\n                    $inMatrixBracesLevel,\n                    Calculation::FORMULA_OPEN_MATRIX_BRACE,\n                    Calculation::FORMULA_CLOSE_MATRIX_BRACE\n                );\n\n                $value = Preg::replace(\n                    [\n                        '/\\b(?<!com[.]microsoft[.])'\n                            . '(floor|ceiling)\\s*[(]/ui',\n                        '/COM\\.MICROSOFT\\./ui',\n                    ],\n                    [\n                        '$1.ODS(',\n                        '',\n                    ],\n                    $value\n                );\n            }\n        }\n\n        // Then rebuild the formula string\n        $excelFormula = implode('\"', $temp);\n\n        return $excelFormula;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Ods/PageSettings.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\n\nuse DOMDocument;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse stdClass;\n\nclass PageSettings\n{\n    private string $officeNs = '';\n\n    private string $stylesNs = '';\n\n    private string $stylesFo = '';\n\n    private string $tableNs = '';\n\n    /**\n     * @var string[]\n     */\n    private array $tableStylesCrossReference = [];\n\n    /** @var mixed[] */\n    private array $pageLayoutStyles = [];\n\n    /**\n     * @var string[]\n     */\n    private array $masterStylesCrossReference = [];\n\n    /**\n     * @var string[]\n     */\n    private array $masterPrintStylesCrossReference = [];\n\n    public function __construct(DOMDocument $styleDom)\n    {\n        $this->setDomNameSpaces($styleDom);\n        $this->readPageSettingStyles($styleDom);\n        $this->readStyleMasterLookup($styleDom);\n    }\n\n    private function setDomNameSpaces(DOMDocument $styleDom): void\n    {\n        $this->officeNs = (string) $styleDom->lookupNamespaceUri('office');\n        $this->stylesNs = (string) $styleDom->lookupNamespaceUri('style');\n        $this->stylesFo = (string) $styleDom->lookupNamespaceUri('fo');\n        $this->tableNs = (string) $styleDom->lookupNamespaceUri('table');\n    }\n\n    private function readPageSettingStyles(DOMDocument $styleDom): void\n    {\n        $item0 = $styleDom->getElementsByTagNameNS($this->officeNs, 'automatic-styles')->item(0);\n        $styles = ($item0 === null) ? [] : $item0->getElementsByTagNameNS($this->stylesNs, 'page-layout');\n\n        foreach ($styles as $styleSet) {\n            $styleName = $styleSet->getAttributeNS($this->stylesNs, 'name');\n            $pageLayoutProperties = $styleSet->getElementsByTagNameNS($this->stylesNs, 'page-layout-properties')->item(0);\n            $styleOrientation = $pageLayoutProperties?->getAttributeNS($this->stylesNs, 'print-orientation');\n            $styleScale = $pageLayoutProperties?->getAttributeNS($this->stylesNs, 'scale-to');\n            $stylePrintOrder = $pageLayoutProperties?->getAttributeNS($this->stylesNs, 'print-page-order');\n            $centered = $pageLayoutProperties?->getAttributeNS($this->stylesNs, 'table-centering');\n\n            $marginLeft = $pageLayoutProperties?->getAttributeNS($this->stylesFo, 'margin-left');\n            $marginRight = $pageLayoutProperties?->getAttributeNS($this->stylesFo, 'margin-right');\n            $marginTop = $pageLayoutProperties?->getAttributeNS($this->stylesFo, 'margin-top');\n            $marginBottom = $pageLayoutProperties?->getAttributeNS($this->stylesFo, 'margin-bottom');\n            $header = $styleSet->getElementsByTagNameNS($this->stylesNs, 'header-style')->item(0);\n            $headerProperties = $header?->getElementsByTagNameNS($this->stylesNs, 'header-footer-properties')?->item(0);\n            $marginHeader = $headerProperties?->getAttributeNS($this->stylesFo, 'min-height');\n            $footer = $styleSet->getElementsByTagNameNS($this->stylesNs, 'footer-style')->item(0);\n            $footerProperties = $footer?->getElementsByTagNameNS($this->stylesNs, 'header-footer-properties')?->item(0);\n            $marginFooter = $footerProperties?->getAttributeNS($this->stylesFo, 'min-height');\n\n            $this->pageLayoutStyles[$styleName] = (object) [\n                'orientation' => $styleOrientation ?: PageSetup::ORIENTATION_DEFAULT,\n                'scale' => $styleScale ?: 100,\n                'printOrder' => $stylePrintOrder,\n                'horizontalCentered' => $centered === 'horizontal' || $centered === 'both',\n                'verticalCentered' => $centered === 'vertical' || $centered === 'both',\n                // margin size is already stored in inches, so no UOM conversion is required\n                'marginLeft' => (float) ($marginLeft ?? 0.7),\n                'marginRight' => (float) ($marginRight ?? 0.7),\n                'marginTop' => (float) ($marginTop ?? 0.3),\n                'marginBottom' => (float) ($marginBottom ?? 0.3),\n                'marginHeader' => (float) ($marginHeader ?? 0.45),\n                'marginFooter' => (float) ($marginFooter ?? 0.45),\n            ];\n        }\n    }\n\n    private function readStyleMasterLookup(DOMDocument $styleDom): void\n    {\n        $item0 = $styleDom->getElementsByTagNameNS($this->officeNs, 'master-styles')->item(0);\n        $styleMasterLookup = ($item0 === null) ? [] : $item0->getElementsByTagNameNS($this->stylesNs, 'master-page');\n\n        foreach ($styleMasterLookup as $styleMasterSet) {\n            $styleMasterName = $styleMasterSet->getAttributeNS($this->stylesNs, 'name');\n            $pageLayoutName = $styleMasterSet->getAttributeNS($this->stylesNs, 'page-layout-name');\n            $this->masterPrintStylesCrossReference[$styleMasterName] = $pageLayoutName;\n        }\n    }\n\n    public function readStyleCrossReferences(DOMDocument $contentDom): void\n    {\n        $item0 = $contentDom->getElementsByTagNameNS($this->officeNs, 'automatic-styles')->item(0);\n        $styleXReferences = ($item0 === null) ? [] : $item0->getElementsByTagNameNS($this->stylesNs, 'style');\n\n        foreach ($styleXReferences as $styleXreferenceSet) {\n            $styleXRefName = $styleXreferenceSet->getAttributeNS($this->stylesNs, 'name');\n            $stylePageLayoutName = $styleXreferenceSet->getAttributeNS($this->stylesNs, 'master-page-name');\n            $styleFamilyName = $styleXreferenceSet->getAttributeNS($this->stylesNs, 'family');\n            if (!empty($styleFamilyName) && $styleFamilyName === 'table') {\n                $styleVisibility = 'true';\n                foreach ($styleXreferenceSet->getElementsByTagNameNS($this->stylesNs, 'table-properties') as $tableProperties) {\n                    $styleVisibility = $tableProperties->getAttributeNS($this->tableNs, 'display');\n                }\n                $this->tableStylesCrossReference[$styleXRefName] = $styleVisibility;\n            }\n            if (!empty($stylePageLayoutName)) {\n                $this->masterStylesCrossReference[$styleXRefName] = $stylePageLayoutName;\n            }\n        }\n    }\n\n    public function setVisibilityForWorksheet(Worksheet $worksheet, string $styleName): void\n    {\n        if (!array_key_exists($styleName, $this->tableStylesCrossReference)) {\n            return;\n        }\n\n        $worksheet->setSheetState(\n            $this->tableStylesCrossReference[$styleName] === 'false'\n                ? Worksheet::SHEETSTATE_HIDDEN\n                : Worksheet::SHEETSTATE_VISIBLE\n        );\n    }\n\n    public function setPrintSettingsForWorksheet(Worksheet $worksheet, string $styleName): void\n    {\n        if (!array_key_exists($styleName, $this->masterStylesCrossReference)) {\n            return;\n        }\n        $masterStyleName = $this->masterStylesCrossReference[$styleName];\n\n        if (!array_key_exists($masterStyleName, $this->masterPrintStylesCrossReference)) {\n            return;\n        }\n        $printSettingsIndex = $this->masterPrintStylesCrossReference[$masterStyleName];\n\n        if (!array_key_exists($printSettingsIndex, $this->pageLayoutStyles)) {\n            return;\n        }\n        /** @var (object{orientation: string, scale: int|string, printOrder: ?string,\n         * horizontalCentered: bool, verticalCentered: bool, marginLeft: float, marginRight: float, marginTop: float,\n         * marginBottom: float, marginHeader: float, marginFooter: float}&stdClass) */\n        $printSettings = $this->pageLayoutStyles[$printSettingsIndex];\n\n        $worksheet->getPageSetup()\n            ->setOrientation($printSettings->orientation ?? PageSetup::ORIENTATION_DEFAULT)\n            ->setPageOrder($printSettings->printOrder === 'ltr' ? PageSetup::PAGEORDER_OVER_THEN_DOWN : PageSetup::PAGEORDER_DOWN_THEN_OVER)\n            ->setScale((int) trim((string) $printSettings->scale, '%'))\n            ->setHorizontalCentered($printSettings->horizontalCentered)\n            ->setVerticalCentered($printSettings->verticalCentered);\n\n        $worksheet->getPageMargins()\n            ->setLeft($printSettings->marginLeft)\n            ->setRight($printSettings->marginRight)\n            ->setTop($printSettings->marginTop)\n            ->setBottom($printSettings->marginBottom)\n            ->setHeader($printSettings->marginHeader)\n            ->setFooter($printSettings->marginFooter);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Ods/Properties.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties as DocumentProperties;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse SimpleXMLElement;\n\nclass Properties\n{\n    private Spreadsheet $spreadsheet;\n\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n    }\n\n    /** @param array{meta?: string, office?: string, dc?: string} $namespacesMeta */\n    public function load(SimpleXMLElement $xml, array $namespacesMeta): void\n    {\n        $docProps = $this->spreadsheet->getProperties();\n        $officeProperty = $xml->children($namespacesMeta['office'] ?? '');\n        foreach ($officeProperty as $officePropertyData) {\n            if (isset($namespacesMeta['dc'])) {\n                $officePropertiesDC = $officePropertyData->children($namespacesMeta['dc']);\n                $this->setCoreProperties($docProps, $officePropertiesDC);\n            }\n\n            $officePropertyMeta = null;\n            if (isset($namespacesMeta['dc'])) {\n                $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta'] ?? '');\n            }\n            $officePropertyMeta = $officePropertyMeta ?? [];\n            foreach ($officePropertyMeta as $propertyName => $propertyValue) {\n                $this->setMetaProperties($namespacesMeta, $propertyValue, $propertyName, $docProps);\n            }\n        }\n    }\n\n    private function setCoreProperties(DocumentProperties $docProps, SimpleXMLElement $officePropertyDC): void\n    {\n        foreach ($officePropertyDC as $propertyName => $propertyValue) {\n            $propertyValue = (string) $propertyValue;\n            switch ($propertyName) {\n                case 'title':\n                    $docProps->setTitle($propertyValue);\n\n                    break;\n                case 'subject':\n                    $docProps->setSubject($propertyValue);\n\n                    break;\n                case 'creator':\n                    $docProps->setCreator($propertyValue);\n                    $docProps->setLastModifiedBy($propertyValue);\n\n                    break;\n                case 'date':\n                    $docProps->setModified($propertyValue);\n\n                    break;\n                case 'description':\n                    $docProps->setDescription($propertyValue);\n\n                    break;\n            }\n        }\n    }\n\n    /** @param array{meta?: string, office?: mixed, dc?: mixed} $namespacesMeta */\n    private function setMetaProperties(\n        array $namespacesMeta,\n        SimpleXMLElement $propertyValue,\n        string $propertyName,\n        DocumentProperties $docProps\n    ): void {\n        $propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta'] ?? '');\n        $propertyValue = (string) $propertyValue;\n        switch ($propertyName) {\n            case 'initial-creator':\n                $docProps->setCreator($propertyValue);\n\n                break;\n            case 'keyword':\n                $docProps->setKeywords($propertyValue);\n\n                break;\n            case 'creation-date':\n                $docProps->setCreated($propertyValue);\n\n                break;\n            case 'user-defined':\n                $name2 = (string) ($propertyValueAttributes['name'] ?? '');\n                if ($name2 === 'Company') {\n                    $docProps->setCompany($propertyValue);\n                } elseif ($name2 === 'category') {\n                    $docProps->setCategory($propertyValue);\n                } else {\n                    $this->setUserDefinedProperty($propertyValueAttributes, $propertyValue, $docProps);\n                }\n\n                break;\n        }\n    }\n\n    /** @param iterable<string> $propertyValueAttributes */\n    private function setUserDefinedProperty(iterable $propertyValueAttributes, string $propertyValue, DocumentProperties $docProps): void\n    {\n        $propertyValueName = '';\n        $propertyValueType = DocumentProperties::PROPERTY_TYPE_STRING;\n        foreach ($propertyValueAttributes as $key => $value) {\n            if ($key == 'name') {\n                /** @var scalar $value */\n                $propertyValueName = (string) $value;\n            } elseif ($key == 'value-type') {\n                /** @var string $value */\n                switch ($value) {\n                    case 'date':\n                        $propertyValue = DocumentProperties::convertProperty($propertyValue, 'date');\n                        $propertyValueType = DocumentProperties::PROPERTY_TYPE_DATE;\n\n                        break;\n                    case 'boolean':\n                        $propertyValue = DocumentProperties::convertProperty($propertyValue, 'bool');\n                        $propertyValueType = DocumentProperties::PROPERTY_TYPE_BOOLEAN;\n\n                        break;\n                    case 'float':\n                        $propertyValue = DocumentProperties::convertProperty($propertyValue, 'r4');\n                        $propertyValueType = DocumentProperties::PROPERTY_TYPE_FLOAT;\n\n                        break;\n                    default:\n                        $propertyValueType = DocumentProperties::PROPERTY_TYPE_STRING;\n                }\n            }\n        }\n\n        $docProps->setCustomProperty($propertyValueName, $propertyValue, $propertyValueType);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Ods.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse Closure;\nuse Composer\\Pcre\\Preg;\nuse DateTime;\nuse DateTimeZone;\nuse DOMAttr;\nuse DOMDocument;\nuse DOMElement;\nuse DOMNode;\nuse DOMText;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension as HelperDimension;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods\\DefinedNames;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods\\FormulaTranslator;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods\\PageSettings;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods\\Properties as DocumentProperties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Security\\XmlScanner;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Throwable;\nuse XMLReader;\nuse ZipArchive;\n\nclass Ods extends BaseReader\n{\n    const INITIAL_FILE = 'content.xml';\n\n    /**\n     * Create a new Ods Reader instance.\n     */\n    public function __construct()\n    {\n        parent::__construct();\n        $this->securityScanner = XmlScanner::getInstance($this);\n    }\n\n    /**\n     * Can the current IReader read the file?\n     */\n    public function canRead(string $filename): bool\n    {\n        $mimeType = 'UNKNOWN';\n\n        // Load file\n\n        if (File::testFileNoThrow($filename, '')) {\n            $zip = new ZipArchive();\n            if ($zip->open($filename) === true) {\n                // check if it is an OOXML archive\n                $stat = $zip->statName('mimetype');\n                if (!empty($stat) && ($stat['size'] <= 255)) {\n                    $mimeType = $zip->getFromName($stat['name']);\n                } elseif ($zip->statName('META-INF/manifest.xml')) {\n                    $xml = simplexml_load_string(\n                        $this->getSecurityScannerOrThrow()\n                            ->scan(\n                                $zip->getFromName(\n                                    'META-INF/manifest.xml'\n                                )\n                            )\n                    );\n                    if ($xml !== false) {\n                        $namespacesContent = $xml->getNamespaces(true);\n                        if (isset($namespacesContent['manifest'])) {\n                            $manifest = $xml->children($namespacesContent['manifest']);\n                            foreach ($manifest as $manifestDataSet) {\n                                $manifestAttributes = $manifestDataSet->attributes($namespacesContent['manifest']);\n                                if ($manifestAttributes && $manifestAttributes->{'full-path'} == '/') {\n                                    $mimeType = (string) $manifestAttributes->{'media-type'};\n\n                                    break;\n                                }\n                            }\n                        }\n                    }\n                }\n\n                $zip->close();\n            }\n        }\n\n        return $mimeType === 'application/vnd.oasis.opendocument.spreadsheet';\n    }\n\n    /**\n     * Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object.\n     *\n     * @return string[]\n     */\n    public function listWorksheetNames(string $filename): array\n    {\n        File::assertFile($filename, self::INITIAL_FILE);\n\n        $worksheetNames = [];\n\n        $xml = new XMLReader();\n        $xml->xml(\n            $this->getSecurityScannerOrThrow()\n                ->scanFile(\n                    'zip://' . realpath($filename) . '#' . self::INITIAL_FILE\n                )\n        );\n        $xml->setParserProperty(2, true);\n\n        // Step into the first level of content of the XML\n        $xml->read();\n        while ($xml->read()) {\n            // Quickly jump through to the office:body node\n            while ($xml->name !== 'office:body') {\n                if ($xml->isEmptyElement) {\n                    $xml->read();\n                } else {\n                    $xml->next();\n                }\n            }\n            // Now read each node until we find our first table:table node\n            while ($xml->read()) {\n                $xmlName = $xml->name;\n                if ($xmlName == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) {\n                    // Loop through each table:table node reading the table:name attribute for each worksheet name\n                    do {\n                        $worksheetName = $xml->getAttribute('table:name');\n                        if (!empty($worksheetName)) {\n                            $worksheetNames[] = $worksheetName;\n                        }\n                        $xml->next();\n                    } while ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT);\n                }\n            }\n        }\n\n        return $worksheetNames;\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{\n     *   worksheetName: string,\n     *   lastColumnLetter: string,\n     *   lastColumnIndex: int,\n     *   totalRows: int,\n     *   totalColumns: int,\n     *   sheetState: string\n     * }>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        File::assertFile($filename, self::INITIAL_FILE);\n\n        $worksheetInfo = [];\n\n        $xml = new XMLReader();\n        $xml->xml(\n            $this->getSecurityScannerOrThrow()\n                ->scanFile(\n                    'zip://' . realpath($filename) . '#' . self::INITIAL_FILE\n                )\n        );\n        $xml->setParserProperty(2, true);\n\n        // Step into the first level of content of the XML\n        $xml->read();\n        $tableVisibility = [];\n        $lastTableStyle = '';\n\n        while ($xml->read()) {\n            if ($xml->name === 'style:style') {\n                $styleType = $xml->getAttribute('style:family');\n                if ($styleType === 'table') {\n                    $lastTableStyle = $xml->getAttribute('style:name');\n                }\n            } elseif ($xml->name === 'style:table-properties') {\n                $visibility = $xml->getAttribute('table:display');\n                $tableVisibility[$lastTableStyle] = ($visibility === 'false') ? Worksheet::SHEETSTATE_HIDDEN : Worksheet::SHEETSTATE_VISIBLE;\n            } elseif ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) {\n                $worksheetNames[] = $xml->getAttribute('table:name');\n\n                $styleName = $xml->getAttribute('table:style-name') ?? '';\n                $visibility = $tableVisibility[$styleName] ?? '';\n                $tmpInfo = [\n                    'worksheetName' => (string) $xml->getAttribute('table:name'),\n                    'lastColumnLetter' => 'A',\n                    'lastColumnIndex' => 0,\n                    'totalRows' => 0,\n                    'totalColumns' => 0,\n                    'sheetState' => $visibility,\n                ];\n\n                // Loop through each child node of the table:table element reading\n                $currRow = 0;\n                do {\n                    $xml->read();\n                    if ($xml->name == 'table:table-row' && $xml->nodeType == XMLReader::ELEMENT) {\n                        $rowspan = $xml->getAttribute('table:number-rows-repeated');\n                        $rowspan = empty($rowspan) ? 1 : (int) $rowspan;\n                        $currRow += $rowspan;\n                        $currCol = 0;\n                        // Step into the row\n                        $xml->read();\n                        do {\n                            $doread = true;\n                            if ($xml->name == 'table:table-cell' && $xml->nodeType == XMLReader::ELEMENT) {\n                                $mergeSize = $xml->getAttribute('table:number-columns-repeated');\n                                $mergeSize = empty($mergeSize) ? 1 : (int) $mergeSize;\n                                $currCol += $mergeSize;\n                                if (!$xml->isEmptyElement) {\n                                    $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCol);\n                                    $tmpInfo['totalRows'] = $currRow;\n                                    $xml->next();\n                                    $doread = false;\n                                }\n                            } elseif ($xml->name == 'table:covered-table-cell' && $xml->nodeType == XMLReader::ELEMENT) {\n                                $mergeSize = $xml->getAttribute('table:number-columns-repeated');\n                                $currCol += (int) $mergeSize;\n                            }\n                            if ($doread) {\n                                $xml->read();\n                            }\n                        } while ($xml->name != 'table:table-row');\n                    }\n                } while ($xml->name != 'table:table');\n\n                $tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1;\n                $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1, true);\n                $worksheetInfo[] = $tmpInfo;\n            }\n        }\n\n        return $worksheetInfo;\n    }\n\n    /**\n     * Loads PhpSpreadsheet from file.\n     */\n    protected function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        $spreadsheet = $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n        $spreadsheet->removeSheetByIndex(0);\n\n        // Load into this instance\n        return $this->loadIntoExisting($filename, $spreadsheet);\n    }\n\n    /** @var array<string,\n     *  array{\n     *     font?:array{\n     *       autoColor?: true,\n     *       bold?: true,\n     *       color?: array{rgb: string},\n     *       italic?: true,\n     *       name?: non-empty-string,\n     *       size?: float|int,\n     *       strikethrough?: true,\n     *       underline?: 'double'|'single',\n     *    },\n     *    fill?:array{\n     *      fillType?: string,\n     *      startColor?: array{rgb: string},\n     *    },\n     *    alignment?:array{\n     *      horizontal?: string,\n     *      readOrder?: int,\n     *      shrinkToFit?: bool,\n     *      textRotation?: int,\n     *      vertical?: string,\n     *      wrapText?: bool,\n     *    },\n     *    protection?:array{\n     *      locked?: string,\n     *      hidden?: string,\n     *    },\n     *    borders?:array{\n     *      bottom?: array{borderStyle:string, color:array{rgb: string}},\n     *      left?: array{borderStyle:string, color:array{rgb: string}},\n     *      right?: array{borderStyle:string, color:array{rgb: string}},\n     *      top?: array{borderStyle:string, color:array{rgb: string}},\n     *      diagonal?: array{borderStyle:string, color:array{rgb: string}},\n     *      diagonalDirection?: int,\n     *    },\n     *  }>\n     */\n    private array $allStyles;\n\n    private int $highestDataIndex;\n\n    /**\n     * Loads PhpSpreadsheet from file into PhpSpreadsheet instance.\n     */\n    public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet): Spreadsheet\n    {\n        File::assertFile($filename, self::INITIAL_FILE);\n\n        $zip = new ZipArchive();\n        $zip->open($filename);\n\n        // Meta\n\n        $xml = @simplexml_load_string(\n            $this->getSecurityScannerOrThrow()\n                ->scan($zip->getFromName('meta.xml'))\n        );\n        if ($xml === false) {\n            throw new Exception('Unable to read data from {$pFilename}');\n        }\n\n        /** @var array{meta?: string, office?: string, dc?: string} */\n        $namespacesMeta = $xml->getNamespaces(true);\n\n        (new DocumentProperties($spreadsheet))->load($xml, $namespacesMeta);\n\n        // Styles\n\n        $this->allStyles = [];\n        $dom = new DOMDocument('1.01', 'UTF-8');\n        $dom->loadXML(\n            $this->getSecurityScannerOrThrow()\n                ->scan($zip->getFromName('styles.xml'))\n        );\n        $officeNs = (string) $dom->lookupNamespaceUri('office');\n        $styleNs = (string) $dom->lookupNamespaceUri('style');\n        $fontNs = (string) $dom->lookupNamespaceUri('fo');\n\n        $automaticStyle0 = $this->readDataOnly ? null : $dom->getElementsByTagNameNS($officeNs, 'styles')->item(0);\n        $automaticStyles = ($automaticStyle0 === null) ? [] : $automaticStyle0->getElementsByTagNameNS($styleNs, 'default-style');\n        foreach ($automaticStyles as $automaticStyle) {\n            $styleFamily = $automaticStyle->getAttributeNS($styleNs, 'family');\n            if ($styleFamily === 'table-cell') {\n                $fonts = [];\n                foreach ($automaticStyle->getElementsByTagNameNS($styleNs, 'text-properties') as $textProperty) {\n                    $fonts = $this->getFontStyles($textProperty, $styleNs, $fontNs);\n                }\n                if (!empty($fonts)) {\n                    $spreadsheet->getDefaultStyle()\n                        ->getFont()\n                        ->applyFromArray($fonts);\n                }\n            }\n        }\n        $automaticStyles = ($automaticStyle0 === null) ? [] : $automaticStyle0->getElementsByTagNameNS($styleNs, 'style');\n        foreach ($automaticStyles as $automaticStyle) {\n            $styleName = $automaticStyle->getAttributeNS($styleNs, 'name');\n            $styleFamily = $automaticStyle->getAttributeNS($styleNs, 'family');\n            if ($styleFamily === 'table-cell') {\n                $fills = $fonts = [];\n                foreach ($automaticStyle->getElementsByTagNameNS($styleNs, 'text-properties') as $textProperty) {\n                    $fonts = $this->getFontStyles($textProperty, $styleNs, $fontNs);\n                }\n                foreach ($automaticStyle->getElementsByTagNameNS($styleNs, 'table-cell-properties') as $tableCellProperty) {\n                    $fills = $this->getFillStyles($tableCellProperty, $fontNs);\n                }\n                if ($styleName !== '') {\n                    if (!empty($fonts)) {\n                        $this->allStyles[$styleName]['font'] = $fonts;\n                        if ($styleName === 'Default') {\n                            $spreadsheet->getDefaultStyle()\n                                ->getFont()\n                                ->applyFromArray($fonts);\n                        }\n                    }\n                    if (!empty($fills)) {\n                        $this->allStyles[$styleName]['fill'] = $fills;\n                        if ($styleName === 'Default') {\n                            $spreadsheet->getDefaultStyle()\n                                ->getFill()\n                                ->applyFromArray($fills);\n                        }\n                    }\n                }\n            }\n        }\n\n        $pageSettings = new PageSettings($dom);\n\n        // Main Content\n\n        $dom = new DOMDocument('1.01', 'UTF-8');\n        $dom->loadXML(\n            $this->getSecurityScannerOrThrow()\n                ->scan($zip->getFromName(self::INITIAL_FILE))\n        );\n\n        $tableNs = (string) $dom->lookupNamespaceUri('table');\n        $textNs = (string) $dom->lookupNamespaceUri('text');\n        $xlinkNs = (string) $dom->lookupNamespaceUri('xlink');\n\n        $pageSettings->readStyleCrossReferences($dom);\n\n        $autoFilterReader = new AutoFilter($spreadsheet, $tableNs);\n        $definedNameReader = new DefinedNames($spreadsheet, $tableNs);\n        $columnWidths = [];\n        $automaticStyle0 = $this->readDataOnly ? null : $dom->getElementsByTagNameNS($officeNs, 'automatic-styles')->item(0);\n        $automaticStyles = ($automaticStyle0 === null) ? [] : $automaticStyle0->getElementsByTagNameNS($styleNs, 'style');\n        foreach ($automaticStyles as $automaticStyle) {\n            $styleName = $automaticStyle->getAttributeNS($styleNs, 'name');\n            $styleFamily = $automaticStyle->getAttributeNS($styleNs, 'family');\n            if ($styleFamily === 'table-column') {\n                $tcprops = $automaticStyle->getElementsByTagNameNS($styleNs, 'table-column-properties');\n                $tcprop = $tcprops->item(0);\n                if ($tcprop !== null) {\n                    $columnWidth = $tcprop->getAttributeNs($styleNs, 'column-width');\n                    $columnWidths[$styleName] = $columnWidth;\n                }\n            }\n            if ($styleFamily === 'table-cell') {\n                $fonts = $fills = $alignment1 = $alignment2 = $protection = $borders = [];\n                foreach ($automaticStyle->getElementsByTagNameNS($styleNs, 'text-properties') as $textProperty) {\n                    $fonts = $this->getFontStyles($textProperty, $styleNs, $fontNs);\n                }\n                foreach ($automaticStyle->getElementsByTagNameNS($styleNs, 'table-cell-properties') as $tableCellProperty) {\n                    $fills = $this->getFillStyles($tableCellProperty, $fontNs);\n                    $borders = $this->getBorderStyles($tableCellProperty, $fontNs, $styleNs);\n                    $protection = $this->getProtectionStyles($tableCellProperty, $styleNs);\n                }\n                foreach ($automaticStyle->getElementsByTagNameNS($styleNs, 'table-cell-properties') as $tableCellProperty) {\n                    $alignment1 = $this->getAlignment1Styles($tableCellProperty, $styleNs, $fontNs);\n                }\n                foreach ($automaticStyle->getElementsByTagNameNS($styleNs, 'paragraph-properties') as $paragraphProperty) {\n                    $alignment2 = $this->getAlignment2Styles($paragraphProperty, $styleNs, $fontNs);\n                }\n                if ($styleName !== '') {\n                    if (!empty($fonts)) {\n                        $this->allStyles[$styleName]['font'] = $fonts;\n                    }\n                    if (!empty($fills)) {\n                        $this->allStyles[$styleName]['fill'] = $fills;\n                    }\n                    $alignment = array_merge($alignment1, $alignment2);\n                    if (!empty($alignment)) {\n                        $this->allStyles[$styleName]['alignment'] = $alignment;\n                    }\n                    if (!empty($protection)) {\n                        $this->allStyles[$styleName]['protection'] = $protection;\n                    }\n                    if (!empty($borders)) {\n                        $this->allStyles[$styleName]['borders'] = $borders;\n                    }\n                }\n            }\n        }\n\n        // Content\n        $item0 = $dom->getElementsByTagNameNS($officeNs, 'body')->item(0);\n        $spreadsheets = ($item0 === null) ? [] : $item0->getElementsByTagNameNS($officeNs, 'spreadsheet');\n\n        foreach ($spreadsheets as $workbookData) {\n            /** @var DOMElement $workbookData */\n            $tables = $workbookData->getElementsByTagNameNS($tableNs, 'table');\n\n            $worksheetID = 0;\n            $sheetCreated = false;\n            foreach ($tables as $worksheetDataSet) {\n                /** @var DOMElement $worksheetDataSet */\n                $worksheetName = $worksheetDataSet->getAttributeNS($tableNs, 'name');\n\n                // Check loadSheetsOnly\n                if (\n                    $this->loadSheetsOnly !== null\n                    && $worksheetName\n                    && !in_array($worksheetName, $this->loadSheetsOnly)\n                ) {\n                    continue;\n                }\n\n                $worksheetStyleName = $worksheetDataSet->getAttributeNS($tableNs, 'style-name');\n\n                // Create sheet\n                $spreadsheet->createSheet();\n                $sheetCreated = true;\n                $spreadsheet->setActiveSheetIndex($worksheetID);\n\n                if ($worksheetName || is_numeric($worksheetName)) {\n                    // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in\n                    // formula cells... during the load, all formulae should be correct, and we're simply\n                    // bringing the worksheet name in line with the formula, not the reverse\n                    $spreadsheet->getActiveSheet()\n                        ->setTitle((string) $worksheetName, false, false);\n                }\n\n                // Go through every child of table element\n                $rowID = 1;\n                $tableColumnIndex = 1;\n                $this->highestDataIndex = AddressRange::MAX_COLUMN_INT;\n                foreach ($worksheetDataSet->childNodes as $childNode) {\n                    /** @var DOMElement $childNode */\n\n                    // Filter elements which are not under the \"table\" ns\n                    if ($childNode->namespaceURI != $tableNs) {\n                        continue;\n                    }\n\n                    $key = self::extractNodeName($childNode->nodeName);\n\n                    switch ($key) {\n                        case 'table-header-rows':\n                        case 'table-rows':\n                            $this->processTableHeaderRows(\n                                $childNode,\n                                $tableNs,\n                                $rowID,\n                                $worksheetName,\n                                $officeNs,\n                                $textNs,\n                                $xlinkNs,\n                                $spreadsheet\n                            );\n\n                            break;\n                        case 'table-row-group':\n                            $this->processTableRowGroup(\n                                $childNode,\n                                $tableNs,\n                                $rowID,\n                                $worksheetName,\n                                $officeNs,\n                                $textNs,\n                                $xlinkNs,\n                                $spreadsheet\n                            );\n\n                            break;\n                        case 'table-row':\n                            $this->processTableRow(\n                                $childNode,\n                                $tableNs,\n                                $rowID,\n                                $worksheetName,\n                                $officeNs,\n                                $textNs,\n                                $xlinkNs,\n                                $spreadsheet\n                            );\n\n                            break;\n                        case 'table-header-columns':\n                        case 'table-columns':\n                            $this->processTableColumnHeader(\n                                $childNode,\n                                $tableNs,\n                                $columnWidths,\n                                $tableColumnIndex,\n                                $spreadsheet,\n                                $this->readEmptyCells,\n                                true\n                            );\n\n                            break;\n                        case 'table-column-group':\n                            $this->processTableColumnGroup(\n                                $childNode,\n                                $tableNs,\n                                $columnWidths,\n                                $tableColumnIndex,\n                                $spreadsheet,\n                                $this->readEmptyCells,\n                                true\n                            );\n\n                            break;\n                        case 'table-column':\n                            $this->processTableColumn(\n                                $childNode,\n                                $tableNs,\n                                $columnWidths,\n                                $tableColumnIndex,\n                                $spreadsheet,\n                                $this->readEmptyCells,\n                                true\n                            );\n\n                            break;\n                    }\n                }\n                $pageSettings->setVisibilityForWorksheet(\n                    $spreadsheet->getActiveSheet(),\n                    $worksheetStyleName\n                );\n                $pageSettings->setPrintSettingsForWorksheet(\n                    $spreadsheet->getActiveSheet(),\n                    $worksheetStyleName\n                );\n                ++$worksheetID;\n            }\n            if ($this->createBlankSheetIfNoneRead && !$sheetCreated) {\n                $spreadsheet->createSheet();\n            }\n        }\n\n        foreach ($spreadsheets as $workbookData) {\n            /** @var DOMElement $workbookData */\n            $tables = $workbookData->getElementsByTagNameNS($tableNs, 'table');\n\n            $worksheetID = 0;\n            foreach ($tables as $worksheetDataSet) {\n                /** @var DOMElement $worksheetDataSet */\n                $worksheetName = $worksheetDataSet->getAttributeNS($tableNs, 'name');\n\n                // Check loadSheetsOnly\n                if (\n                    $this->loadSheetsOnly !== null\n                    && $worksheetName\n                    && !in_array($worksheetName, $this->loadSheetsOnly)\n                ) {\n                    continue;\n                }\n\n                // Create sheet\n                $spreadsheet->setActiveSheetIndex($worksheetID);\n                $highestDataColumn = $spreadsheet->getActiveSheet()->getHighestDataColumn();\n                $this->highestDataIndex = Coordinate::columnIndexFromString($highestDataColumn);\n\n                // Go through every child of table element processing column widths\n                $rowID = 1;\n                $tableColumnIndex = 1;\n                foreach ($worksheetDataSet->childNodes as $childNode) {\n                    /** @var DOMElement $childNode */\n                    if (empty($columnWidths) || $this->readEmptyCells) {\n                        break;\n                    }\n\n                    // Filter elements which are not under the \"table\" ns\n                    if ($childNode->namespaceURI != $tableNs) {\n                        continue;\n                    }\n\n                    $key = self::extractNodeName($childNode->nodeName);\n\n                    switch ($key) {\n                        case 'table-header-columns':\n                        case 'table-columns':\n                            $this->processTableColumnHeader(\n                                $childNode,\n                                $tableNs,\n                                $columnWidths,\n                                $tableColumnIndex,\n                                $spreadsheet,\n                                true,\n                                false\n                            );\n\n                            break;\n                        case 'table-column-group':\n                            $this->processTableColumnGroup(\n                                $childNode,\n                                $tableNs,\n                                $columnWidths,\n                                $tableColumnIndex,\n                                $spreadsheet,\n                                true,\n                                false\n                            );\n\n                            break;\n                        case 'table-column':\n                            $this->processTableColumn(\n                                $childNode,\n                                $tableNs,\n                                $columnWidths,\n                                $tableColumnIndex,\n                                $spreadsheet,\n                                true,\n                                false\n                            );\n\n                            break;\n                    }\n                }\n                ++$worksheetID;\n            }\n\n            $autoFilterReader->read($workbookData);\n            $definedNameReader->read($workbookData);\n        }\n\n        $spreadsheet->setActiveSheetIndex(0);\n\n        if ($zip->locateName('settings.xml') !== false) {\n            $this->processSettings($zip, $spreadsheet);\n        }\n\n        // Return\n        return $spreadsheet;\n    }\n\n    private function processTableHeaderRows(\n        DOMElement $childNode,\n        string $tableNs,\n        int &$rowID,\n        string $worksheetName,\n        string $officeNs,\n        string $textNs,\n        string $xlinkNs,\n        Spreadsheet $spreadsheet\n    ): void {\n        foreach ($childNode->childNodes as $grandchildNode) {\n            /** @var DOMElement $grandchildNode */\n            $grandkey = self::extractNodeName($grandchildNode->nodeName);\n            switch ($grandkey) {\n                case 'table-row':\n                    $this->processTableRow(\n                        $grandchildNode,\n                        $tableNs,\n                        $rowID,\n                        $worksheetName,\n                        $officeNs,\n                        $textNs,\n                        $xlinkNs,\n                        $spreadsheet\n                    );\n\n                    break;\n            }\n        }\n    }\n\n    private function processTableRowGroup(\n        DOMElement $childNode,\n        string $tableNs,\n        int &$rowID,\n        string $worksheetName,\n        string $officeNs,\n        string $textNs,\n        string $xlinkNs,\n        Spreadsheet $spreadsheet\n    ): void {\n        foreach ($childNode->childNodes as $grandchildNode) {\n            /** @var DOMElement $grandchildNode */\n            $grandkey = self::extractNodeName($grandchildNode->nodeName);\n            switch ($grandkey) {\n                case 'table-row':\n                    $this->processTableRow(\n                        $grandchildNode,\n                        $tableNs,\n                        $rowID,\n                        $worksheetName,\n                        $officeNs,\n                        $textNs,\n                        $xlinkNs,\n                        $spreadsheet\n                    );\n\n                    break;\n                case 'table-header-rows':\n                case 'table-rows':\n                    $this->processTableHeaderRows(\n                        $grandchildNode,\n                        $tableNs,\n                        $rowID,\n                        $worksheetName,\n                        $officeNs,\n                        $textNs,\n                        $xlinkNs,\n                        $spreadsheet\n                    );\n\n                    break;\n                case 'table-row-group':\n                    $this->processTableRowGroup(\n                        $grandchildNode,\n                        $tableNs,\n                        $rowID,\n                        $worksheetName,\n                        $officeNs,\n                        $textNs,\n                        $xlinkNs,\n                        $spreadsheet\n                    );\n\n                    break;\n            }\n        }\n    }\n\n    private function processTableRow(\n        DOMElement $childNode,\n        string $tableNs,\n        int &$rowID,\n        string $worksheetName,\n        string $officeNs,\n        string $textNs,\n        string $xlinkNs,\n        Spreadsheet $spreadsheet\n    ): void {\n        if ($childNode->hasAttributeNS($tableNs, 'number-rows-repeated')) {\n            $rowRepeats = (int) $childNode->getAttributeNS($tableNs, 'number-rows-repeated');\n        } else {\n            $rowRepeats = 1;\n        }\n        $worksheet = $spreadsheet->getSheetByName($worksheetName);\n\n        $columnID = 'A';\n        /** @var DOMElement|DOMText $cellData */\n        foreach ($childNode->childNodes as $cellData) {\n            if ($cellData instanceof DOMText) {\n                continue; // should just be whitespace\n            }\n            if ($cellData->hasAttributeNS($tableNs, 'number-columns-repeated')) {\n                $colRepeats = (int) $cellData->getAttributeNS($tableNs, 'number-columns-repeated');\n            } else {\n                $colRepeats = 1;\n            }\n            $styleName = $cellData->getAttributeNS($tableNs, 'style-name');\n\n            // When a cell has number-columns-repeated, check if ANY column in the\n            // repeated range passes the read filter. If not, skip the entire group.\n            // If some columns pass, we need to fall through to the processing block\n            // which will handle per-column filtering.\n            if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {\n                if ($colRepeats <= 1) {\n                    StringHelper::stringIncrement($columnID);\n\n                    continue;\n                }\n\n                // Check if any column within this repeated group passes the filter\n                $anyColumnPasses = false;\n                $tempCol = $columnID;\n                for ($i = 0; $i < $colRepeats; ++$i) {\n                    if ($i > 0) {\n                        StringHelper::stringIncrement($tempCol);\n                    }\n                    if ($this->getReadFilter()->readCell($tempCol, $rowID, $worksheetName)) {\n                        $anyColumnPasses = true;\n\n                        break;\n                    }\n                }\n\n                if (!$anyColumnPasses) {\n                    for ($i = 0; $i < $colRepeats; ++$i) {\n                        StringHelper::stringIncrement($columnID);\n                    }\n\n                    continue;\n                }\n                // Fall through to process the cell, with per-column filter checks\n            }\n            if ($worksheet !== null && ($cellData->hasChildNodes() || ($cellData->nextSibling !== null)) && isset($this->allStyles[$styleName])) {\n                $spannedRange = \"$columnID$rowID\";\n                // the following is sufficient for ods,\n                // and does no harm for xlsx/xls.\n                $worksheet->getStyle($spannedRange)\n                    ->applyFromArray($this->allStyles[$styleName]);\n                // the rest of this block is needed for xlsx/xls,\n                // and does no harm for ods.\n                if (isset($this->allStyles[$styleName]['borders'])) {\n                    $spannedRows = $cellData->getAttributeNS($tableNs, 'number-columns-spanned');\n                    $spannedColumns = $cellData->getAttributeNS($tableNs, 'number-rows-spanned');\n                    $spannedRows = max((int) $spannedRows, 1);\n                    $spannedColumns = max((int) $spannedColumns, 1);\n                    if ($spannedRows > 1 || $spannedColumns > 1) {\n                        $endRow = $rowID + $spannedRows - 1;\n                        $endCol = $columnID;\n                        while ($spannedColumns > 1) {\n                            StringHelper::stringIncrement($endCol);\n                            --$spannedColumns;\n                        }\n                        $spannedRange .= \":$endCol$endRow\";\n                        $worksheet->getStyle($spannedRange)\n                            ->getBorders()\n                            ->applyFromArray(\n                                $this->allStyles[$styleName]['borders']\n                            );\n                    }\n                }\n            }\n\n            // Initialize variables\n            $formatting = $hyperlink = null;\n            $hasCalculatedValue = false;\n            $cellDataFormula = '';\n            $cellDataType = '';\n            $cellDataRef = '';\n\n            if ($cellData->hasAttributeNS($tableNs, 'formula')) {\n                $cellDataFormula = $cellData->getAttributeNS($tableNs, 'formula');\n                $hasCalculatedValue = true;\n            }\n            if ($cellData->hasAttributeNS($tableNs, 'number-matrix-columns-spanned')) {\n                if ($cellData->hasAttributeNS($tableNs, 'number-matrix-rows-spanned')) {\n                    $cellDataType = 'array';\n                    $arrayRow = (int) $cellData->getAttributeNS($tableNs, 'number-matrix-rows-spanned');\n                    $arrayCol = (int) $cellData->getAttributeNS($tableNs, 'number-matrix-columns-spanned');\n                    $lastRow = $rowID + $arrayRow - 1;\n                    $lastCol = $columnID;\n                    while ($arrayCol > 1) {\n                        StringHelper::stringIncrement($lastCol);\n                        --$arrayCol;\n                    }\n                    $cellDataRef = \"$columnID$rowID:$lastCol$lastRow\";\n                }\n            }\n\n            // Annotations\n            $annotation = $cellData->getElementsByTagNameNS($officeNs, 'annotation');\n\n            if ($annotation->length > 0 && $annotation->item(0) !== null) {\n                $textNode = $annotation->item(0)->getElementsByTagNameNS($textNs, 'p');\n                $textNodeLength = $textNode->length;\n                $newLineOwed = false;\n                for ($textNodeIndex = 0; $textNodeIndex < $textNodeLength; ++$textNodeIndex) {\n                    $textNodeItem = $textNode->item($textNodeIndex);\n                    if ($textNodeItem !== null) {\n                        $text = $this->scanElementForText($textNodeItem);\n                        if ($newLineOwed) {\n                            $spreadsheet->getActiveSheet()\n                                ->getComment($columnID . $rowID)\n                                ->getText()\n                                ->createText(\"\\n\");\n                        }\n                        $newLineOwed = true;\n\n                        $spreadsheet->getActiveSheet()\n                            ->getComment($columnID . $rowID)\n                            ->getText()\n                            ->createText(\n                                $this->parseRichText($text)\n                            );\n                    }\n                }\n            }\n\n            // Content\n\n            /** @var DOMElement[] $paragraphs */\n            $paragraphs = [];\n\n            foreach ($cellData->childNodes as $item) {\n                /** @var DOMElement $item */\n\n                // Filter text:p elements\n                if ($item->nodeName == 'text:p') {\n                    $paragraphs[] = $item;\n                }\n            }\n\n            if (count($paragraphs) > 0) {\n                $dataValue = null;\n                // Consolidate if there are multiple p records (maybe with spans as well)\n                $dataArray = [];\n\n                // Text can have multiple text:p and within those, multiple text:span.\n                // text:p newlines, but text:span does not.\n                // Also, here we assume there is no text data is span fields are specified, since\n                // we have no way of knowing proper positioning anyway.\n\n                foreach ($paragraphs as $pData) {\n                    $dataArray[] = $this->scanElementForText($pData);\n                }\n                $allCellDataText = implode(\"\\n\", $dataArray);\n\n                $type = $cellData->getAttributeNS($officeNs, 'value-type');\n                $symbol = '';\n                $leftHandCurrency = Preg::isMatch('/\\$|£|￥/', $allCellDataText, $matches);\n                if ($leftHandCurrency) {\n                    $type = str_replace('float', 'currency', $type);\n                    $symbol = (string) $matches[0];\n                }\n                $customFormatting = '';\n                if ($this->formatCallback !== null) {\n                    $temp = ($this->formatCallback)($type, $allCellDataText);\n                    if ($temp !== '') {\n                        $customFormatting = $temp;\n                    }\n                }\n\n                switch ($type) {\n                    case 'string':\n                        $type = DataType::TYPE_STRING;\n                        $dataValue = $allCellDataText;\n\n                        foreach ($paragraphs as $paragraph) {\n                            $link = $paragraph->getElementsByTagNameNS($textNs, 'a');\n                            if ($link->length > 0 && $link->item(0) !== null) {\n                                $hyperlink = $link->item(0)->getAttributeNS($xlinkNs, 'href');\n                            }\n                        }\n\n                        break;\n                    case 'boolean':\n                        $type = DataType::TYPE_BOOL;\n                        $dataValue = ($cellData->getAttributeNS($officeNs, 'boolean-value') === 'true') ? true : false;\n\n                        break;\n                    case 'percentage':\n                        if (!str_contains($allCellDataText, '.')) {\n                            $formatting = NumberFormat::FORMAT_PERCENTAGE;\n                        } elseif (substr($allCellDataText, -3, 1) === '.') {\n                            $formatting = NumberFormat::FORMAT_PERCENTAGE_0;\n                        } else {\n                            $formatting = NumberFormat::FORMAT_PERCENTAGE_00;\n                        }\n                        $type = DataType::TYPE_NUMERIC;\n                        $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value');\n\n                        break;\n                    case 'currency':\n                        $type = DataType::TYPE_NUMERIC;\n                        $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value');\n\n                        $currency = $cellData->getAttributeNS($officeNs, 'currency');\n                        if ($leftHandCurrency) {\n                            $typeValue = 'currency';\n                            $formatting = str_contains($allCellDataText, '.') ? NumberFormat::FORMAT_CURRENCY_USD : NumberFormat::FORMAT_CURRENCY_USD_INTEGER;\n                            if ($symbol !== '$') {\n                                $formatting = str_replace('$', $symbol, $formatting);\n                            }\n                        } elseif (str_contains($allCellDataText, '€')) {\n                            $typeValue = 'currency';\n                            $formatting = str_contains($allCellDataText, '.') ? NumberFormat::FORMAT_CURRENCY_EUR : NumberFormat::FORMAT_CURRENCY_EUR_INTEGER;\n                        }\n\n                        break;\n                    case 'float':\n                        $type = DataType::TYPE_NUMERIC;\n                        $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value');\n\n                        if ($dataValue !== floor($dataValue)) {\n                            // do nothing\n                        } elseif (substr($allCellDataText, -2, 1) === '.') {\n                            $formatting = NumberFormat::FORMAT_NUMBER_0;\n                        } elseif (substr($allCellDataText, -3, 1) === '.') {\n                            $formatting = NumberFormat::FORMAT_NUMBER_00;\n                        }\n                        if (floor($dataValue) == $dataValue) {\n                            if ($dataValue == (int) $dataValue) {\n                                $dataValue = (int) $dataValue;\n                            }\n                        }\n\n                        break;\n                    case 'date':\n                        $type = DataType::TYPE_NUMERIC;\n                        $value = $cellData->getAttributeNS($officeNs, 'date-value');\n                        $dataValue = Date::convertIsoDate($value);\n\n                        if (Preg::isMatch('/^\\d\\d\\d\\d-\\d\\d-\\d\\d$/', $allCellDataText)) {\n                            $formatting = 'yyyy-mm-dd';\n                        } elseif (Preg::isMatch('/^\\d\\d?-[a-zA-Z]+-\\d\\d\\d\\d$/', $allCellDataText)) {\n                            $formatting = 'd-mmm-yyyy';\n                        } elseif ($dataValue != floor($dataValue)) {\n                            $formatting = NumberFormat::FORMAT_DATE_XLSX15\n                                . ' '\n                                . NumberFormat::FORMAT_DATE_TIME4;\n                        } else {\n                            $formatting = NumberFormat::FORMAT_DATE_XLSX15;\n                        }\n\n                        break;\n                    case 'time':\n                        $type = DataType::TYPE_NUMERIC;\n\n                        $timeValue = $cellData->getAttributeNS($officeNs, 'time-value');\n                        $minus = '';\n                        if (str_starts_with($timeValue, '-')) {\n                            $minus = '-';\n                            $timeValue = substr($timeValue, 1);\n                        }\n                        $timeArray = sscanf($timeValue, 'PT%dH%dM%dS');\n                        if (is_array($timeArray)) {\n                            /** @var array{int, int, int} $timeArray */\n                            $days = intdiv($timeArray[0], 24);\n                            $hours = $timeArray[0] % 24;\n                            $dt = new DateTime(\"1899-12-30 $hours:{$timeArray[1]}:{$timeArray[2]}\", new DateTimeZone('UTC'));\n                            $dt->modify(\"+$days days\");\n                            $dataValue = Date::PHPToExcel($dt);\n                            if ($minus === '-') {\n                                $dataValue *= -1;\n                                $formatting = '[hh]:mm:ss';\n                            } else {\n                                $formatting = NumberFormat::FORMAT_DATE_TIME4;\n                            }\n                        }\n\n                        break;\n                    default:\n                        $dataValue = null;\n                }\n                if ($customFormatting !== '') {\n                    $formatting = $customFormatting;\n                }\n            } else {\n                $type = DataType::TYPE_NULL;\n                $dataValue = null;\n            }\n\n            if ($hasCalculatedValue) {\n                $type = DataType::TYPE_FORMULA;\n                $cellDataFormula = substr($cellDataFormula, strpos($cellDataFormula, ':=') + 1);\n                $cellDataFormula = FormulaTranslator::convertToExcelFormulaValue($cellDataFormula);\n            }\n\n            for ($i = 0; $i < $colRepeats; ++$i) {\n                if ($i > 0) {\n                    StringHelper::stringIncrement($columnID);\n                }\n\n                if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {\n                    continue;\n                }\n\n                if ($type !== DataType::TYPE_NULL) {\n                    for ($rowAdjust = 0; $rowAdjust < $rowRepeats; ++$rowAdjust) {\n                        $rID = $rowID + $rowAdjust;\n\n                        $cell = $spreadsheet->getActiveSheet()\n                            ->getCell($columnID . $rID);\n\n                        // Set value\n                        if ($hasCalculatedValue) {\n                            $cell->setValueExplicit($cellDataFormula, $type);\n                            if ($cellDataType === 'array') {\n                                $cell->setFormulaAttributes(['t' => 'array', 'ref' => $cellDataRef]);\n                            }\n                        } elseif ($type !== '' || $dataValue !== null) {\n                            $cell->setValueExplicit($dataValue, $type);\n                        }\n\n                        if ($hasCalculatedValue) {\n                            $cell->setCalculatedValue($dataValue, $type === DataType::TYPE_NUMERIC);\n                        }\n\n                        // Set other properties\n                        if ($formatting !== null) {\n                            $spreadsheet->getActiveSheet()\n                                ->getStyle($columnID . $rID)\n                                ->getNumberFormat()\n                                ->setFormatCode($formatting);\n                        } else {\n                            $spreadsheet->getActiveSheet()\n                                ->getStyle($columnID . $rID)\n                                ->getNumberFormat()\n                                ->setFormatCode(NumberFormat::FORMAT_GENERAL);\n                        }\n\n                        if ($hyperlink !== null) {\n                            if ($hyperlink[0] === '#') {\n                                $hyperlink = 'sheet://' . substr($hyperlink, 1);\n                            }\n                            $cell->getHyperlink()\n                                ->setUrl($hyperlink);\n                        }\n                    }\n                }\n            }\n\n            // Merged cells\n            $this->processMergedCells($cellData, $tableNs, $type, $columnID, $rowID, $spreadsheet);\n\n            StringHelper::stringIncrement($columnID);\n        }\n        $rowID += $rowRepeats;\n    }\n\n    private static function extractNodeName(string $key): string\n    {\n        // Remove ns from node name\n        if (str_contains($key, ':')) {\n            $keyChunks = explode(':', $key);\n            $key = array_pop($keyChunks);\n        }\n\n        return $key;\n    }\n\n    /**\n     * @param string[] $columnWidths\n     */\n    private function processTableColumnHeader(\n        DOMElement $childNode,\n        string $tableNs,\n        array $columnWidths,\n        int &$tableColumnIndex,\n        Spreadsheet $spreadsheet,\n        bool $processWidths = true,\n        bool $processStyles = true\n    ): void {\n        foreach ($childNode->childNodes as $grandchildNode) {\n            /** @var DOMElement $grandchildNode */\n            $grandkey = self::extractNodeName($grandchildNode->nodeName);\n            switch ($grandkey) {\n                case 'table-column':\n                    $this->processTableColumn(\n                        $grandchildNode,\n                        $tableNs,\n                        $columnWidths,\n                        $tableColumnIndex,\n                        $spreadsheet,\n                        $processWidths,\n                        $processStyles\n                    );\n\n                    break;\n            }\n        }\n    }\n\n    /**\n     * @param string[] $columnWidths\n     */\n    private function processTableColumnGroup(\n        DOMElement $childNode,\n        string $tableNs,\n        array $columnWidths,\n        int &$tableColumnIndex,\n        Spreadsheet $spreadsheet,\n        bool $processWidths = true,\n        bool $processStyles = true\n    ): void {\n        foreach ($childNode->childNodes as $grandchildNode) {\n            /** @var DOMElement $grandchildNode */\n            $grandkey = self::extractNodeName($grandchildNode->nodeName);\n            switch ($grandkey) {\n                case 'table-column':\n                    $this->processTableColumn(\n                        $grandchildNode,\n                        $tableNs,\n                        $columnWidths,\n                        $tableColumnIndex,\n                        $spreadsheet,\n                        $processWidths,\n                        $processStyles\n                    );\n\n                    break;\n                case 'table-header-columns':\n                case 'table-columns':\n                    $this->processTableColumnHeader(\n                        $grandchildNode,\n                        $tableNs,\n                        $columnWidths,\n                        $tableColumnIndex,\n                        $spreadsheet,\n                        $processWidths,\n                        $processStyles\n                    );\n\n                    break;\n                case 'table-column-group':\n                    $this->processTableColumnGroup(\n                        $grandchildNode,\n                        $tableNs,\n                        $columnWidths,\n                        $tableColumnIndex,\n                        $spreadsheet,\n                        $processWidths,\n                        $processStyles\n                    );\n\n                    break;\n            }\n        }\n    }\n\n    /**\n     * @param string[] $columnWidths\n     */\n    private function processTableColumn(\n        DOMElement $childNode,\n        string $tableNs,\n        array $columnWidths,\n        int &$tableColumnIndex,\n        Spreadsheet $spreadsheet,\n        bool $processWidths = true,\n        bool $processStyles = true\n    ): void {\n        if ($childNode->hasAttributeNS($tableNs, 'number-columns-repeated')) {\n            $rowRepeats = (int) $childNode->getAttributeNS($tableNs, 'number-columns-repeated');\n        } else {\n            $rowRepeats = 1;\n        }\n        $tableStyleName = $childNode->getAttributeNS($tableNs, 'style-name');\n        if ($processWidths) {\n            if (isset($columnWidths[$tableStyleName])) {\n                $columnWidth = new HelperDimension($columnWidths[$tableStyleName]);\n                $tableColumnIndex2 = $tableColumnIndex;\n                $tableColumnString = Coordinate::stringFromColumnIndex($tableColumnIndex2);\n                for ($rowRepeats2 = $rowRepeats; $rowRepeats2 > 0 && $tableColumnIndex2 <= AddressRange::MAX_COLUMN_INT; --$rowRepeats2) {\n                    if (!$this->readEmptyCells && $tableColumnIndex2 > $this->highestDataIndex) {\n                        break;\n                    }\n                    $spreadsheet->getActiveSheet()\n                        ->getColumnDimension($tableColumnString)\n                        ->setWidth($columnWidth->toUnit('cm'), 'cm');\n                    StringHelper::stringIncrement(\n                        $tableColumnString\n                    );\n                    ++$tableColumnIndex2;\n                }\n            }\n        }\n        if ($processStyles) {\n            $defaultStyleName = $childNode->getAttributeNS($tableNs, 'default-cell-style-name');\n            if ($defaultStyleName !== 'Default' && isset($this->allStyles[$defaultStyleName])) {\n                $tableColumnIndex2 = $tableColumnIndex;\n                $tableColumnString = Coordinate::stringFromColumnIndex($tableColumnIndex2);\n                for ($rowRepeats2 = $rowRepeats; $rowRepeats2 > 0 && $tableColumnIndex2 <= AddressRange::MAX_COLUMN_INT; --$rowRepeats2) {\n                    $spreadsheet->getActiveSheet()\n                        ->getStyle($tableColumnString)\n                        ->applyFromArray(\n                            $this->allStyles[$defaultStyleName]\n                        );\n                    StringHelper::stringIncrement(\n                        $tableColumnString\n                    );\n                    ++$tableColumnIndex2;\n                }\n            }\n        }\n        $tableColumnIndex += $rowRepeats;\n    }\n\n    private function processSettings(ZipArchive $zip, Spreadsheet $spreadsheet): void\n    {\n        $dom = new DOMDocument('1.01', 'UTF-8');\n        $dom->loadXML(\n            $this->getSecurityScannerOrThrow()\n                ->scan($zip->getFromName('settings.xml'))\n        );\n        $configNs = (string) $dom->lookupNamespaceUri('config');\n        $officeNs = (string) $dom->lookupNamespaceUri('office');\n        $settings = $dom->getElementsByTagNameNS($officeNs, 'settings')\n            ->item(0);\n        if ($settings !== null) {\n            $this->lookForActiveSheet($settings, $spreadsheet, $configNs);\n            $this->lookForSelectedCells($settings, $spreadsheet, $configNs);\n        }\n    }\n\n    private function lookForActiveSheet(DOMElement $settings, Spreadsheet $spreadsheet, string $configNs): void\n    {\n        /** @var DOMElement $t */\n        foreach ($settings->getElementsByTagNameNS($configNs, 'config-item') as $t) {\n            if ($t->getAttributeNs($configNs, 'name') === 'ActiveTable') {\n                try {\n                    $spreadsheet->setActiveSheetIndexByName($t->nodeValue ?? '');\n                } catch (Throwable) {\n                    // do nothing\n                }\n\n                break;\n            }\n        }\n    }\n\n    private function lookForSelectedCells(DOMElement $settings, Spreadsheet $spreadsheet, string $configNs): void\n    {\n        /** @var DOMElement $t */\n        foreach ($settings->getElementsByTagNameNS($configNs, 'config-item-map-named') as $t) {\n            if ($t->getAttributeNs($configNs, 'name') === 'Tables') {\n                foreach ($t->getElementsByTagNameNS($configNs, 'config-item-map-entry') as $ws) {\n                    $setRow = $setCol = '';\n                    $wsname = $ws->getAttributeNs($configNs, 'name');\n                    foreach ($ws->getElementsByTagNameNS($configNs, 'config-item') as $configItem) {\n                        $attrName = $configItem->getAttributeNs($configNs, 'name');\n                        if ($attrName === 'CursorPositionX') {\n                            $setCol = $configItem->nodeValue;\n                        }\n                        if ($attrName === 'CursorPositionY') {\n                            $setRow = $configItem->nodeValue;\n                        }\n                    }\n                    $this->setSelected($spreadsheet, $wsname, \"$setCol\", \"$setRow\");\n                }\n\n                break;\n            }\n        }\n    }\n\n    private function setSelected(Spreadsheet $spreadsheet, string $wsname, string $setCol, string $setRow): void\n    {\n        if (is_numeric($setCol) && is_numeric($setRow)) {\n            $sheet = $spreadsheet->getSheetByName($wsname);\n            if ($sheet !== null) {\n                $sheet->setSelectedCells([(int) $setCol + 1, (int) $setRow + 1]);\n            }\n        }\n    }\n\n    /**\n     * Recursively scan element.\n     */\n    protected function scanElementForText(DOMNode $element): string\n    {\n        $str = '';\n        foreach ($element->childNodes as $child) {\n            /** @var DOMNode $child */\n            if ($child->nodeType == XML_TEXT_NODE) {\n                $str .= $child->nodeValue;\n            } elseif ($child->nodeType == XML_ELEMENT_NODE && $child->nodeName == 'text:line-break') {\n                $str .= \"\\n\";\n            } elseif ($child->nodeType == XML_ELEMENT_NODE && $child->nodeName == 'text:s') {\n                // It's a space\n\n                // Multiple spaces?\n                $attributes = $child->attributes;\n                /** @var ?DOMAttr $cAttr */\n                $cAttr = ($attributes === null) ? null : $attributes->getNamedItem('c');\n                $multiplier = self::getMultiplier($cAttr);\n                $str .= str_repeat(' ', $multiplier);\n            }\n\n            if ($child->hasChildNodes()) {\n                $str .= $this->scanElementForText($child);\n            }\n        }\n\n        return $str;\n    }\n\n    private static function getMultiplier(?DOMAttr $cAttr): int\n    {\n        if ($cAttr) {\n            $multiplier = (int) $cAttr->nodeValue;\n        } else {\n            $multiplier = 1;\n        }\n\n        return $multiplier;\n    }\n\n    private function parseRichText(string $is): RichText\n    {\n        $value = new RichText();\n        $value->createText($is);\n\n        return $value;\n    }\n\n    private function processMergedCells(\n        DOMElement $cellData,\n        string $tableNs,\n        string $type,\n        string $columnID,\n        int $rowID,\n        Spreadsheet $spreadsheet\n    ): void {\n        if (\n            $cellData->hasAttributeNS($tableNs, 'number-columns-spanned')\n            || $cellData->hasAttributeNS($tableNs, 'number-rows-spanned')\n        ) {\n            if (($type !== DataType::TYPE_NULL) || ($this->readDataOnly === false)) {\n                $columnTo = $columnID;\n\n                if ($cellData->hasAttributeNS($tableNs, 'number-columns-spanned')) {\n                    $columnIndex = Coordinate::columnIndexFromString($columnID);\n                    $columnIndex += (int) $cellData->getAttributeNS($tableNs, 'number-columns-spanned');\n                    $columnIndex -= 2;\n\n                    $columnTo = Coordinate::stringFromColumnIndex($columnIndex + 1);\n                }\n\n                $rowTo = $rowID;\n\n                if ($cellData->hasAttributeNS($tableNs, 'number-rows-spanned')) {\n                    $rowTo = $rowTo + (int) $cellData->getAttributeNS($tableNs, 'number-rows-spanned') - 1;\n                }\n\n                $cellRange = $columnID . $rowID . ':' . $columnTo . $rowTo;\n                $spreadsheet->getActiveSheet()->mergeCells($cellRange, Worksheet::MERGE_CELL_CONTENT_HIDE);\n            }\n        }\n    }\n\n    /** @var null|Closure(string, string):string */\n    private ?Closure $formatCallback = null;\n\n    /** @param Closure(string, string):string $formatCallback */\n    public function setFormatCallback(Closure $formatCallback): void\n    {\n        $this->formatCallback = $formatCallback;\n    }\n\n    /** @return array{\n     *   autoColor?: true,\n     *   bold?: true,\n     *   color?: array{rgb: string},\n     *   italic?: true,\n     *   name?: non-empty-string,\n     *   size?: float|int,\n     *   strikethrough?: true,\n     *   underline?: 'double'|'single',\n     * }\n     */\n    protected function getFontStyles(DOMElement $textProperty, string $styleNs, string $fontNs): array\n    {\n        $fonts = [];\n        $temp = $textProperty->getAttributeNs($styleNs, 'font-name') ?: $textProperty->getAttributeNs($fontNs, 'font-family');\n        if ($temp !== '') {\n            $fonts['name'] = $temp;\n        }\n        $temp = $textProperty->getAttributeNs($fontNs, 'font-size');\n        if ($temp !== '' && str_ends_with($temp, 'pt')) {\n            $fonts['size'] = (float) substr($temp, 0, -2);\n        }\n        $temp = $textProperty->getAttributeNs($fontNs, 'font-style');\n        if ($temp === 'italic') {\n            $fonts['italic'] = true;\n        }\n        $temp = $textProperty->getAttributeNs($fontNs, 'font-weight');\n        if ($temp === 'bold') {\n            $fonts['bold'] = true;\n        }\n        $temp = $textProperty->getAttributeNs($fontNs, 'color');\n        if (Preg::isMatch('/^#[a-f0-9]{6}$/i', $temp)) {\n            $fonts['color'] = ['rgb' => substr($temp, 1)];\n        }\n        $temp = $textProperty->getAttributeNs($styleNs, 'use-window-font-color');\n        if ($temp === 'true') {\n            $fonts['autoColor'] = true;\n        }\n        $temp = $textProperty->getAttributeNs($styleNs, 'text-underline-type');\n        if ($temp === '') {\n            $temp = $textProperty->getAttributeNs($styleNs, 'text-underline-style');\n            if ($temp !== '' && $temp !== 'none') {\n                $temp = 'single';\n            }\n        }\n        if ($temp === 'single' || $temp === 'double') {\n            $fonts['underline'] = $temp;\n        }\n        $temp = $textProperty->getAttributeNs($styleNs, 'text-line-through-type');\n        if ($temp !== '' && $temp !== 'none') {\n            $fonts['strikethrough'] = true;\n        }\n\n        return $fonts;\n    }\n\n    /** @return array{\n     *   fillType?: string,\n     *   startColor?: array{rgb: string},\n     * }\n     */\n    protected function getFillStyles(DOMElement $tableCellProperties, string $fontNs): array\n    {\n        $fills = [];\n        $temp = $tableCellProperties->getAttributeNs($fontNs, 'background-color');\n        if (Preg::isMatch('/^#[a-f0-9]{6}$/i', $temp)) {\n            $fills['fillType'] = Fill::FILL_SOLID;\n            $fills['startColor'] = ['rgb' => substr($temp, 1)];\n        } elseif ($temp === 'transparent') {\n            $fills['fillType'] = Fill::FILL_NONE;\n        }\n\n        return $fills;\n    }\n\n    private const MAP_VERTICAL = [\n        'top' => Alignment::VERTICAL_TOP,\n        'middle' => Alignment::VERTICAL_CENTER,\n        'automatic' => Alignment::VERTICAL_JUSTIFY,\n        'bottom' => Alignment::VERTICAL_BOTTOM,\n    ];\n    private const MAP_HORIZONTAL = [\n        'center' => Alignment::HORIZONTAL_CENTER,\n        'end' => Alignment::HORIZONTAL_RIGHT,\n        'justify' => Alignment::HORIZONTAL_FILL,\n        'start' => Alignment::HORIZONTAL_LEFT,\n    ];\n\n    /** @return array{\n     *   shrinkToFit?: bool,\n     *   textRotation?: int,\n     *   vertical?: string,\n     *   wrapText?: bool,\n     * }\n     */\n    protected function getAlignment1Styles(DOMElement $tableCellProperties, string $styleNs, string $fontNs): array\n    {\n        $alignment1 = [];\n        $temp = $tableCellProperties->getAttributeNs($styleNs, 'rotation-angle');\n        if (is_numeric($temp)) {\n            $temp2 = (int) $temp;\n            if ($temp2 > 90) {\n                $temp2 -= 360;\n            }\n            if ($temp2 >= -90 && $temp2 <= 90) {\n                $alignment1['textRotation'] = (int) $temp2;\n            }\n        }\n        $temp = $tableCellProperties->getAttributeNs($styleNs, 'vertical-align');\n        $temp2 = self::MAP_VERTICAL[$temp] ?? '';\n        if ($temp2 !== '') {\n            $alignment1['vertical'] = $temp2;\n        }\n        $temp = $tableCellProperties->getAttributeNs($fontNs, 'wrap-option');\n        if ($temp === 'wrap') {\n            $alignment1['wrapText'] = true;\n        } elseif ($temp === 'no-wrap') {\n            $alignment1['wrapText'] = false;\n        }\n        $temp = $tableCellProperties->getAttributeNs($styleNs, 'shrink-to-fit');\n        if ($temp === 'true' || $temp === 'false') {\n            $alignment1['shrinkToFit'] = $temp === 'true';\n        }\n\n        return $alignment1;\n    }\n\n    /** @return array{\n     *   horizontal?: string,\n     *   readOrder?: int,\n     * }\n     */\n    protected function getAlignment2Styles(DOMElement $paragraphProperties, string $styleNs, string $fontNs): array\n    {\n        $alignment2 = [];\n        $temp = $paragraphProperties->getAttributeNs($fontNs, 'text-align');\n        $temp2 = self::MAP_HORIZONTAL[$temp] ?? '';\n        if ($temp2 !== '') {\n            $alignment2['horizontal'] = $temp2;\n        }\n        $temp = $paragraphProperties->getAttributeNs($fontNs, 'margin-left') ?: $paragraphProperties->getAttributeNs($fontNs, 'margin-right');\n        if (Preg::isMatch('/^\\d+([.]\\d+)?(cm|in|mm|pt)$/', $temp)) {\n            $dimension = new HelperDimension($temp);\n            $alignment2['indent'] = (int) round($dimension->toUnit('px') / Alignment::INDENT_UNITS_TO_PIXELS);\n        }\n\n        $temp = $paragraphProperties->getAttributeNs($styleNs, 'writing-mode');\n        if ($temp === 'rl-tb') {\n            $alignment2['readOrder'] = Alignment::READORDER_RTL;\n        } elseif ($temp === 'lr-tb') {\n            $alignment2['readOrder'] = Alignment::READORDER_LTR;\n        }\n\n        return $alignment2;\n    }\n\n    /** @return array{\n     *   locked?: string,\n     *   hidden?: string,\n     * }\n     */\n    protected function getProtectionStyles(DOMElement $tableCellProperties, string $styleNs): array\n    {\n        $protection = [];\n        $temp = $tableCellProperties->getAttributeNs($styleNs, 'cell-protect');\n        switch ($temp) {\n            case 'protected formula-hidden':\n                $protection['locked'] = Protection::PROTECTION_PROTECTED;\n                $protection['hidden'] = Protection::PROTECTION_PROTECTED;\n\n                break;\n            case 'formula-hidden':\n                $protection['locked'] = Protection::PROTECTION_UNPROTECTED;\n                $protection['hidden'] = Protection::PROTECTION_PROTECTED;\n\n                break;\n            case 'protected':\n                $protection['locked'] = Protection::PROTECTION_PROTECTED;\n                $protection['hidden'] = Protection::PROTECTION_UNPROTECTED;\n\n                break;\n            case 'none':\n                $protection['locked'] = Protection::PROTECTION_UNPROTECTED;\n                $protection['hidden'] = Protection::PROTECTION_UNPROTECTED;\n\n                break;\n        }\n\n        return $protection;\n    }\n\n    private const MAP_BORDER_STYLE = [ // default BORDER_THIN\n        'none' => Border::BORDER_NONE,\n        'hidden' => Border::BORDER_NONE,\n        'dotted' => Border::BORDER_DOTTED,\n        'dash-dot' => Border::BORDER_DASHDOT,\n        'dash-dot-dot' => Border::BORDER_DASHDOTDOT,\n        'dashed' => Border::BORDER_DASHED,\n        'double' => Border::BORDER_DOUBLE,\n    ];\n\n    private const MAP_BORDER_MEDIUM = [\n        Border::BORDER_THIN => Border::BORDER_MEDIUM,\n        Border::BORDER_DASHDOT => Border::BORDER_MEDIUMDASHDOT,\n        Border::BORDER_DASHDOTDOT => Border::BORDER_MEDIUMDASHDOTDOT,\n        Border::BORDER_DASHED => Border::BORDER_MEDIUMDASHED,\n    ];\n\n    private const MAP_BORDER_THICK = [\n        Border::BORDER_THIN => Border::BORDER_THICK,\n        Border::BORDER_DASHDOT => Border::BORDER_MEDIUMDASHDOT,\n        Border::BORDER_DASHDOTDOT => Border::BORDER_MEDIUMDASHDOTDOT,\n        Border::BORDER_DASHED => Border::BORDER_MEDIUMDASHED,\n    ];\n\n    /** @return array{\n     *   bottom?: array{borderStyle:string, color:array{rgb: string}},\n     *   top?: array{borderStyle:string, color:array{rgb: string}},\n     *   left?: array{borderStyle:string, color:array{rgb: string}},\n     *   right?: array{borderStyle:string, color:array{rgb: string}},\n     *   diagonal?: array{borderStyle:string, color:array{rgb: string}},\n     *   diagonalDirection?: int,\n     * }\n     */\n    protected function getBorderStyles(DOMElement $tableCellProperties, string $fontNs, string $styleNs): array\n    {\n        $borders = [];\n        $temp = $tableCellProperties->getAttributeNs($fontNs, 'border');\n        $diagonalIndex = Borders::DIAGONAL_NONE;\n        foreach (['bottom', 'left', 'right', 'top', 'diagonal-tl-br', 'diagonal-bl-tr'] as $direction) {\n            if (str_starts_with($direction, 'diagonal')) {\n                $directionIndex = 'diagonal';\n                $temp = $tableCellProperties->getAttributeNs($styleNs, $direction);\n            } else {\n                $directionIndex = $direction;\n                $temp = $tableCellProperties->getAttributeNs($fontNs, \"border-$direction\");\n            }\n            if (Preg::isMatch('/^(\\d+(?:[.]\\d+)?)pt\\s+([-\\w]+)\\s+#([0-9a-fA-F]{6})$/', $temp, $matches)) {\n                $style = self::MAP_BORDER_STYLE[$matches[2]] ?? Border::BORDER_THIN;\n                $width = (float) $matches[1];\n                if ($width >= 2.5) {\n                    $style = self::MAP_BORDER_THICK[$style] ?? $style;\n                } elseif ($width >= 1.75) {\n                    $style = self::MAP_BORDER_MEDIUM[$style] ?? $style;\n                }\n                $color = $matches[3];\n                $borders[$directionIndex] = ['borderStyle' => $style, 'color' => ['rgb' => $matches[3]]];\n                if ($direction === 'diagonal-tl-br') {\n                    $diagonalIndex = Borders::DIAGONAL_DOWN;\n                } elseif ($direction === 'diagonal-bl-tr') {\n                    $diagonalIndex = ($diagonalIndex === Borders::DIAGONAL_NONE) ? Borders::DIAGONAL_UP : Borders::DIAGONAL_BOTH;\n                }\n            }\n        }\n        if ($diagonalIndex !== Borders::DIAGONAL_NONE) {\n            $borders['diagonalDirection'] = $diagonalIndex;\n        }\n\n        return $borders; // @phpstan-ignore-line\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Security/XmlScanner.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Security;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader;\n\nclass XmlScanner\n{\n    private const ENCODING_PATTERN = '/encoding\\s*=\\s*([\"\\'])(.+?)\\1/s';\n    private const ENCODING_UTF7 = '/encoding\\s*=\\s*([\"\\'])UTF-7\\1/si';\n\n    private string $pattern;\n\n    /** @var ?callable */\n    private $callback;\n\n    public function __construct(string $pattern = '<!DOCTYPE')\n    {\n        $this->pattern = $pattern;\n    }\n\n    public static function getInstance(Reader\\IReader $reader): self\n    {\n        $pattern = ($reader instanceof Reader\\Html) ? '<!ENTITY' : '<!DOCTYPE';\n\n        return new self($pattern);\n    }\n\n    public function setAdditionalCallback(callable $callback): void\n    {\n        $this->callback = $callback;\n    }\n\n    private static function forceString(mixed $arg): string\n    {\n        return is_string($arg) ? $arg : '';\n    }\n\n    private function toUtf8(string $xml): string\n    {\n        $charset = $this->findCharSet($xml);\n        $foundUtf7 = $charset === 'UTF-7';\n        if ($charset !== 'UTF-8') {\n            $testStart = '/^.{0,4}\\s*<?xml/s';\n            $startWithXml1 = preg_match($testStart, $xml);\n            $xml = self::forceString(mb_convert_encoding($xml, 'UTF-8', $charset));\n            if ($startWithXml1 === 1 && preg_match($testStart, $xml) !== 1) {\n                throw new Reader\\Exception('Double encoding not permitted');\n            }\n            $foundUtf7 = $foundUtf7 || (preg_match(self::ENCODING_UTF7, $xml) === 1);\n            $xml = preg_replace(self::ENCODING_PATTERN, '', $xml) ?? $xml;\n        } else {\n            $foundUtf7 = $foundUtf7 || (preg_match(self::ENCODING_UTF7, $xml) === 1);\n        }\n        if ($foundUtf7) {\n            throw new Reader\\Exception('UTF-7 encoding not permitted');\n        }\n        if (substr($xml, 0, Reader\\Csv::UTF8_BOM_LEN) === Reader\\Csv::UTF8_BOM) {\n            $xml = substr($xml, Reader\\Csv::UTF8_BOM_LEN);\n        }\n\n        return $xml;\n    }\n\n    private function findCharSet(string $xml): string\n    {\n        if (str_starts_with($xml, \"\\x4c\\x6f\\xa7\\x94\")) {\n            throw new Reader\\Exception('EBCDIC encoding not permitted');\n        }\n        $encoding = Reader\\Csv::guessEncodingBom('', $xml);\n        if ($encoding !== '') {\n            return $encoding;\n        }\n        $xml = str_replace(\"\\0\", '', $xml);\n        if (preg_match(self::ENCODING_PATTERN, $xml, $matches)) {\n            return strtoupper($matches[2]);\n        }\n\n        return 'UTF-8';\n    }\n\n    /**\n     * Scan the XML for use of <!ENTITY to prevent XXE/XEE attacks.\n     *\n     * @param false|string $xml\n     */\n    public function scan($xml): string\n    {\n        // Don't rely purely on libxml_disable_entity_loader()\n        $pattern = '/\\0*' . implode('\\0*', mb_str_split($this->pattern, 1, 'UTF-8')) . '\\0*/';\n\n        $xml = \"$xml\";\n        if (preg_match($pattern, $xml)) {\n            throw new Reader\\Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks');\n        }\n\n        $xml = $this->toUtf8($xml);\n        if (preg_match($pattern, $xml)) {\n            throw new Reader\\Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks');\n        }\n\n        if ($this->callback !== null) {\n            $xml = call_user_func($this->callback, $xml);\n        }\n        /** @var string $xml */\n\n        return $xml;\n    }\n\n    /**\n     * Scan the XML for use of <!ENTITY to prevent XXE/XEE attacks.\n     */\n    public function scanFile(string $filestream): string\n    {\n        return $this->scan(file_get_contents($filestream));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Slk.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\ReferenceHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Slk extends BaseReader\n{\n    /**\n     * Sheet index to read.\n     */\n    private int $sheetIndex = 0;\n\n    /**\n     * Formats.\n     *\n     * @var mixed[]\n     */\n    private array $formats = [];\n\n    /**\n     * Format Count.\n     */\n    private int $format = 0;\n\n    /**\n     * Fonts.\n     *\n     * @var mixed[]\n     */\n    private array $fonts = [];\n\n    /**\n     * Font Count.\n     */\n    private int $fontcount = 0;\n\n    /**\n     * Create a new SYLK Reader instance.\n     */\n    public function __construct()\n    {\n        parent::__construct();\n    }\n\n    /**\n     * Validate that the current file is a SYLK file.\n     */\n    public function canRead(string $filename): bool\n    {\n        try {\n            $this->openFile($filename);\n        } catch (ReaderException) {\n            return false;\n        }\n\n        // Read sample data (first 2 KB will do)\n        $data = (string) fread($this->fileHandle, 2048);\n\n        // Count delimiters in file\n        $delimiterCount = substr_count($data, ';');\n        $hasDelimiter = $delimiterCount > 0;\n\n        // Analyze first line looking for ID; signature\n        $lines = explode(\"\\n\", $data);\n        $hasId = str_starts_with($lines[0], 'ID;P');\n\n        fclose($this->fileHandle);\n\n        return $hasDelimiter && $hasId;\n    }\n\n    private function canReadOrBust(string $filename): void\n    {\n        if (!$this->canRead($filename)) {\n            throw new ReaderException($filename . ' is an Invalid SYLK file.');\n        }\n        $this->openFile($filename);\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        // Open file\n        $this->canReadOrBust($filename);\n        $fileHandle = $this->fileHandle;\n        rewind($fileHandle);\n\n        $worksheetInfo = [['worksheetName' => basename($filename, '.slk')]];\n\n        // loop through one row (line) at a time in the file\n        $rowIndex = 0;\n        $columnIndex = 0;\n        while (($rowData = fgets($fileHandle)) !== false) {\n            $columnIndex = 0;\n\n            // convert SYLK encoded $rowData to UTF-8\n            $rowData = StringHelper::SYLKtoUTF8($rowData);\n\n            // explode each row at semicolons while taking into account that literal semicolon (;)\n            // is escaped like this (;;)\n            $rowData = explode(\"\\t\", str_replace('¤', ';', str_replace(';', \"\\t\", str_replace(';;', '¤', rtrim($rowData)))));\n\n            $dataType = array_shift($rowData);\n            if ($dataType == 'B') {\n                foreach ($rowData as $rowDatum) {\n                    switch ($rowDatum[0]) {\n                        case 'X':\n                            $columnIndex = (int) substr($rowDatum, 1) - 1;\n\n                            break;\n                        case 'Y':\n                            $rowIndex = (int) substr($rowDatum, 1);\n\n                            break;\n                    }\n                }\n\n                break;\n            }\n        }\n\n        $worksheetInfo[0]['lastColumnIndex'] = $columnIndex;\n        $worksheetInfo[0]['totalRows'] = $rowIndex;\n        $worksheetInfo[0]['lastColumnLetter'] = Coordinate::stringFromColumnIndex($worksheetInfo[0]['lastColumnIndex'] + 1, true);\n        $worksheetInfo[0]['totalColumns'] = $worksheetInfo[0]['lastColumnIndex'] + 1;\n        $worksheetInfo[0]['sheetState'] = Worksheet::SHEETSTATE_VISIBLE;\n\n        // Close file\n        fclose($fileHandle);\n\n        return $worksheetInfo;\n    }\n\n    /**\n     * Loads PhpSpreadsheet from file.\n     */\n    protected function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        $spreadsheet = $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n\n        // Load into this instance\n        return $this->loadIntoExisting($filename, $spreadsheet);\n    }\n\n    private const COLOR_ARRAY = [\n        'FF00FFFF', // 0 - cyan\n        'FF000000', // 1 - black\n        'FFFFFFFF', // 2 - white\n        'FFFF0000', // 3 - red\n        'FF00FF00', // 4 - green\n        'FF0000FF', // 5 - blue\n        'FFFFFF00', // 6 - yellow\n        'FFFF00FF', // 7 - magenta\n    ];\n\n    private const FONT_STYLE_MAPPINGS = [\n        'B' => 'bold',\n        'I' => 'italic',\n        'U' => 'underline',\n    ];\n\n    /**\n     * @param-out true $hasCalculatedValue\n     */\n    private function processFormula(string $rowDatum, bool &$hasCalculatedValue, string &$cellDataFormula, string $row, string $column): void\n    {\n        $cellDataFormula = '=' . substr($rowDatum, 1);\n        //    Convert R1C1 style references to A1 style references (but only when not quoted)\n        $temp = explode('\"', $cellDataFormula);\n        $key = false;\n        foreach ($temp as &$value) {\n            //    Only count/replace in alternate array entries\n            $key = $key === false;\n            if ($key) {\n                preg_match_all('/(R(\\[?-?\\d*\\]?))(C(\\[?-?\\d*\\]?))/', $value, $cellReferences, PREG_SET_ORDER + PREG_OFFSET_CAPTURE);\n                //    Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way\n                //        through the formula from left to right. Reversing means that we work right to left.through\n                //        the formula\n                $cellReferences = array_reverse($cellReferences);\n                //    Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent,\n                //        then modify the formula to use that new reference\n                foreach ($cellReferences as $cellReference) {\n                    $rowReference = $cellReference[2][0];\n                    //    Empty R reference is the current row\n                    if ($rowReference == '') {\n                        $rowReference = $row;\n                    }\n                    //    Bracketed R references are relative to the current row\n                    if ($rowReference[0] == '[') {\n                        $rowReference = (int) $row + (int) trim($rowReference, '[]');\n                    }\n                    $columnReference = $cellReference[4][0];\n                    //    Empty C reference is the current column\n                    if ($columnReference == '') {\n                        $columnReference = $column;\n                    }\n                    //    Bracketed C references are relative to the current column\n                    if ($columnReference[0] == '[') {\n                        $columnReference = (int) $column + (int) trim($columnReference, '[]');\n                    }\n                    $A1CellReference = Coordinate::stringFromColumnIndex((int) $columnReference) . $rowReference;\n\n                    $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0]));\n                }\n            }\n        }\n        unset($value);\n        //    Then rebuild the formula string\n        $cellDataFormula = implode('\"', $temp);\n        $hasCalculatedValue = true;\n    }\n\n    /** @param mixed[] $rowData */\n    private function processCRecord(array $rowData, Spreadsheet &$spreadsheet, string &$row, string &$column): void\n    {\n        //    Read cell value data\n        $hasCalculatedValue = false;\n        $tryNumeric = false;\n        $cellDataFormula = $cellData = '';\n        $sharedColumn = $sharedRow = -1;\n        $sharedFormula = false;\n        foreach ($rowData as $rowDatum) {\n            /** @var string $rowDatum */\n            switch ($rowDatum[0]) {\n                case 'X':\n                    $column = substr($rowDatum, 1);\n\n                    break;\n                case 'Y':\n                    $row = substr($rowDatum, 1);\n\n                    break;\n                case 'K':\n                    $cellData = substr($rowDatum, 1);\n                    $tryNumeric = is_numeric($cellData);\n\n                    break;\n                case 'E':\n                    $this->processFormula($rowDatum, $hasCalculatedValue, $cellDataFormula, $row, $column);\n\n                    break;\n                case 'A':\n                    $comment = substr($rowDatum, 1);\n                    $columnLetter = Coordinate::stringFromColumnIndex((int) $column);\n                    $spreadsheet->getActiveSheet()\n                        ->getComment(\"$columnLetter$row\")\n                        ->getText()\n                        ->createText($comment);\n\n                    break;\n                case 'C':\n                    $sharedColumn = (int) substr($rowDatum, 1);\n\n                    break;\n                case 'R':\n                    $sharedRow = (int) substr($rowDatum, 1);\n\n                    break;\n                case 'S':\n                    $sharedFormula = true;\n\n                    break;\n            }\n        }\n        if ($sharedFormula === true && $sharedRow >= 0 && $sharedColumn >= 0) {\n            $thisCoordinate = Coordinate::stringFromColumnIndex((int) $column) . $row;\n            $sharedCoordinate = Coordinate::stringFromColumnIndex($sharedColumn) . $sharedRow;\n            /** @var string */\n            $formula = $spreadsheet->getActiveSheet()->getCell($sharedCoordinate)->getValue();\n            $spreadsheet->getActiveSheet()->getCell($thisCoordinate)->setValue($formula);\n            $referenceHelper = ReferenceHelper::getInstance();\n            $newFormula = $referenceHelper->updateFormulaReferences($formula, 'A1', (int) $column - $sharedColumn, (int) $row - $sharedRow, '', true, false);\n            $spreadsheet->getActiveSheet()->getCell($thisCoordinate)->setValue($newFormula);\n            //$calc = $spreadsheet->getActiveSheet()->getCell($thisCoordinate)->getCalculatedValue();\n            //$spreadsheet->getActiveSheet()->getCell($thisCoordinate)->setCalculatedValue($calc);\n            $cellData = Calculation::unwrapResult($cellData);\n            $spreadsheet->getActiveSheet()->getCell($thisCoordinate)->setCalculatedValue($cellData, $tryNumeric);\n\n            return;\n        }\n        $columnLetter = Coordinate::stringFromColumnIndex((int) $column);\n        /** @var string */\n        $cellData = Calculation::unwrapResult($cellData);\n\n        // Set cell value\n        $this->processCFinal($spreadsheet, $hasCalculatedValue, $cellDataFormula, $cellData, \"$columnLetter$row\", $tryNumeric);\n    }\n\n    private function processCFinal(Spreadsheet &$spreadsheet, bool $hasCalculatedValue, string $cellDataFormula, string $cellData, string $coordinate, bool $tryNumeric): void\n    {\n        // Set cell value\n        $spreadsheet->getActiveSheet()->getCell($coordinate)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData);\n        if ($hasCalculatedValue) {\n            $cellData = Calculation::unwrapResult($cellData);\n            $spreadsheet->getActiveSheet()->getCell($coordinate)->setCalculatedValue($cellData, $tryNumeric);\n        }\n    }\n\n    /** @param mixed[] $rowData */\n    private function processFRecord(array $rowData, Spreadsheet &$spreadsheet, string &$row, string &$column): void\n    {\n        //    Read cell formatting\n        $formatStyle = $columnWidth = '';\n        $startCol = $endCol = '';\n        $fontStyle = '';\n        $styleData = [];\n        foreach ($rowData as $rowDatum) {\n            /** @var string $rowDatum */\n            switch ($rowDatum[0]) {\n                case 'C':\n                case 'X':\n                    $column = substr($rowDatum, 1);\n\n                    break;\n                case 'R':\n                case 'Y':\n                    $row = substr($rowDatum, 1);\n\n                    break;\n                case 'P':\n                    $formatStyle = $rowDatum;\n\n                    break;\n                case 'W':\n                    [$startCol, $endCol, $columnWidth] = explode(' ', substr($rowDatum, 1));\n\n                    break;\n                case 'S':\n                    $this->styleSettings($rowDatum, $styleData, $fontStyle);\n\n                    break;\n            }\n        }\n        /** @var string $formatStyle */\n        $this->addFormats($spreadsheet, $formatStyle, $row, $column);\n        $this->addFonts($spreadsheet, $fontStyle, $row, $column);\n        $this->addStyle($spreadsheet, $styleData, $row, $column);\n        $this->addWidth($spreadsheet, $columnWidth, $startCol, $endCol);\n    }\n\n    private const STYLE_SETTINGS_FONT = ['D' => 'bold', 'I' => 'italic'];\n\n    private const STYLE_SETTINGS_BORDER = [\n        'B' => 'bottom',\n        'L' => 'left',\n        'R' => 'right',\n        'T' => 'top',\n    ];\n\n    /** @param mixed[][] $styleData */\n    private function styleSettings(string $rowDatum, array &$styleData, string &$fontStyle): void\n    {\n        $styleSettings = substr($rowDatum, 1);\n        $iMax = strlen($styleSettings);\n        for ($i = 0; $i < $iMax; ++$i) {\n            $char = $styleSettings[$i];\n            if (array_key_exists($char, self::STYLE_SETTINGS_FONT)) {\n                $styleData['font'][self::STYLE_SETTINGS_FONT[$char]] = true;\n            } elseif (array_key_exists($char, self::STYLE_SETTINGS_BORDER)) {\n                $styleData['borders'][self::STYLE_SETTINGS_BORDER[$char]]['borderStyle'] = Border::BORDER_THIN; //* @phpstan-ignore-line\n            } elseif ($char == 'S') {\n                $styleData['fill']['fillType'] = Fill::FILL_PATTERN_GRAY125;\n            } elseif ($char == 'M') {\n                if (preg_match('/M([1-9]\\d*)/', $styleSettings, $matches)) {\n                    $fontStyle = $matches[1];\n                }\n            }\n        }\n    }\n\n    private function addFormats(Spreadsheet &$spreadsheet, string $formatStyle, string $row, string $column): void\n    {\n        if ($formatStyle && $column > '' && $row > '') {\n            $columnLetter = Coordinate::stringFromColumnIndex((int) $column);\n            if (isset($this->formats[$formatStyle]) && is_array($this->formats[$formatStyle])) {\n                $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($this->formats[$formatStyle]);\n            }\n        }\n    }\n\n    private function addFonts(Spreadsheet &$spreadsheet, string $fontStyle, string $row, string $column): void\n    {\n        if ($fontStyle && $column > '' && $row > '') {\n            $columnLetter = Coordinate::stringFromColumnIndex((int) $column);\n            if (isset($this->fonts[$fontStyle]) && is_array($this->fonts[$fontStyle])) {\n                $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($this->fonts[$fontStyle]);\n            }\n        }\n    }\n\n    /** @param mixed[] $styleData */\n    private function addStyle(Spreadsheet &$spreadsheet, array $styleData, string $row, string $column): void\n    {\n        if ((!empty($styleData)) && $column > '' && $row > '') {\n            $columnLetter = Coordinate::stringFromColumnIndex((int) $column);\n            $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($styleData);\n        }\n    }\n\n    private function addWidth(Spreadsheet $spreadsheet, string $columnWidth, string $startCol, string $endCol): void\n    {\n        if ($columnWidth > '') {\n            if ($startCol == $endCol) {\n                $startCol = Coordinate::stringFromColumnIndex((int) $startCol);\n                $spreadsheet->getActiveSheet()->getColumnDimension($startCol)->setWidth((float) $columnWidth);\n            } else {\n                $startCol = Coordinate::stringFromColumnIndex((int) $startCol);\n                $endCol = Coordinate::stringFromColumnIndex((int) $endCol);\n                $spreadsheet->getActiveSheet()->getColumnDimension($startCol)->setWidth((float) $columnWidth);\n                do {\n                    /** @var string $startCol */\n                    $spreadsheet->getActiveSheet()\n                        ->getColumnDimension(\n                            StringHelper::stringIncrement($startCol)\n                        )\n                        ->setWidth((float) $columnWidth);\n                } while ($startCol !== $endCol);\n            }\n        }\n    }\n\n    /** @param string[] $rowData */\n    private function processPRecord(array $rowData, Spreadsheet &$spreadsheet): void\n    {\n        //    Read shared styles\n        $formatArray = [];\n        $fromFormats = ['\\-', '\\ '];\n        $toFormats = ['-', ' '];\n        foreach ($rowData as $rowDatum) {\n            switch ($rowDatum[0]) {\n                case 'P':\n                    $formatArray['numberFormat']['formatCode'] = str_replace($fromFormats, $toFormats, substr($rowDatum, 1));\n\n                    break;\n                case 'E':\n                case 'F':\n                    $formatArray['font']['name'] = substr($rowDatum, 1);\n\n                    break;\n                case 'M':\n                    $formatArray['font']['size'] = ((float) substr($rowDatum, 1)) / 20;\n\n                    break;\n                case 'L':\n                    /** @var mixed[][][] $formatArray */\n                    $this->processPColors($rowDatum, $formatArray);\n\n                    break;\n                case 'S':\n                    $this->processPFontStyles($rowDatum, $formatArray);\n\n                    break;\n            }\n        }\n        $this->processPFinal($spreadsheet, $formatArray);\n    }\n\n    /** @param mixed[][][] $formatArray */\n    private function processPColors(string $rowDatum, array &$formatArray): void\n    {\n        if (preg_match('/L([1-9]\\d*)/', $rowDatum, $matches)) {\n            $fontColor = ((int) $matches[1]) % 8;\n            $formatArray['font']['color']['argb'] = self::COLOR_ARRAY[$fontColor];\n        }\n    }\n\n    /** @param mixed[][] $formatArray */\n    private function processPFontStyles(string $rowDatum, array &$formatArray): void\n    {\n        $styleSettings = substr($rowDatum, 1);\n        $iMax = strlen($styleSettings);\n        for ($i = 0; $i < $iMax; ++$i) {\n            if (array_key_exists($styleSettings[$i], self::FONT_STYLE_MAPPINGS)) {\n                $formatArray['font'][self::FONT_STYLE_MAPPINGS[$styleSettings[$i]]] = true;\n            }\n        }\n    }\n\n    /** @param mixed[] $formatArray */\n    private function processPFinal(Spreadsheet &$spreadsheet, array $formatArray): void\n    {\n        if (array_key_exists('numberFormat', $formatArray)) {\n            $this->formats['P' . $this->format] = $formatArray;\n            ++$this->format;\n        } elseif (array_key_exists('font', $formatArray)) {\n            ++$this->fontcount;\n            $this->fonts[$this->fontcount] = $formatArray;\n            if ($this->fontcount === 1) {\n                $spreadsheet->getDefaultStyle()->applyFromArray($formatArray);\n            }\n        }\n    }\n\n    /**\n     * Loads PhpSpreadsheet from file into PhpSpreadsheet instance.\n     */\n    public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet): Spreadsheet\n    {\n        // Open file\n        $this->canReadOrBust($filename);\n        $fileHandle = $this->fileHandle;\n        rewind($fileHandle);\n\n        // Create new Worksheets\n        while ($spreadsheet->getSheetCount() <= $this->sheetIndex) {\n            $spreadsheet->createSheet();\n        }\n        $spreadsheet->setActiveSheetIndex($this->sheetIndex);\n        $spreadsheet->getActiveSheet()->setTitle(substr(basename($filename, '.slk'), 0, Worksheet::SHEET_TITLE_MAXIMUM_LENGTH));\n\n        // Loop through file\n        $column = $row = '';\n\n        // loop through one row (line) at a time in the file\n        while (($rowDataTxt = fgets($fileHandle)) !== false) {\n            // convert SYLK encoded $rowData to UTF-8\n            $rowDataTxt = StringHelper::SYLKtoUTF8($rowDataTxt);\n\n            // explode each row at semicolons while taking into account that literal semicolon (;)\n            // is escaped like this (;;)\n            $rowData = explode(\"\\t\", str_replace('¤', ';', str_replace(';', \"\\t\", str_replace(';;', '¤', rtrim($rowDataTxt)))));\n\n            $dataType = array_shift($rowData);\n            if ($dataType == 'P') {\n                //    Read shared styles\n                $this->processPRecord($rowData, $spreadsheet);\n            } elseif ($dataType == 'C') {\n                //    Read cell value data\n                $this->processCRecord($rowData, $spreadsheet, $row, $column);\n            } elseif ($dataType == 'F') {\n                //    Read cell formatting\n                $this->processFRecord($rowData, $spreadsheet, $row, $column);\n            } else {\n                $this->columnRowFromRowData($rowData, $column, $row);\n            }\n        }\n\n        // Close file\n        fclose($fileHandle);\n\n        // Return\n        return $spreadsheet;\n    }\n\n    /** @param string[] $rowData */\n    private function columnRowFromRowData(array $rowData, string &$column, string &$row): void\n    {\n        foreach ($rowData as $rowDatum) {\n            $char0 = $rowDatum[0];\n            if ($char0 === 'X' || $char0 == 'C') {\n                $column = substr($rowDatum, 1);\n            } elseif ($char0 === 'Y' || $char0 == 'R') {\n                $row = substr($rowDatum, 1);\n            }\n        }\n    }\n\n    /**\n     * Get sheet index.\n     */\n    public function getSheetIndex(): int\n    {\n        return $this->sheetIndex;\n    }\n\n    /**\n     * Set sheet index.\n     *\n     * @param int $sheetIndex Sheet index\n     *\n     * @return $this\n     */\n    public function setSheetIndex(int $sheetIndex): static\n    {\n        $this->sheetIndex = $sheetIndex;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Biff5.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nclass Biff5 extends Xls\n{\n    /**\n     * Reads a cell range address in BIFF5 e.g. 'A2:B6' or 'A1'\n     * always fixed range\n     * section 2.5.14.\n     */\n    public static function readBIFF5CellRangeAddressFixed(string $subData): string\n    {\n        // offset: 0; size: 2; index to first row\n        $fr = self::getUInt2d($subData, 0) + 1;\n\n        // offset: 2; size: 2; index to last row\n        $lr = self::getUInt2d($subData, 2) + 1;\n\n        // offset: 4; size: 1; index to first column\n        $fc = ord($subData[4]);\n\n        // offset: 5; size: 1; index to last column\n        $lc = ord($subData[5]);\n\n        // check values\n        if ($fr > $lr || $fc > $lc) {\n            throw new ReaderException('Not a cell range address');\n        }\n\n        // column index to letter\n        $fc = Coordinate::stringFromColumnIndex($fc + 1);\n        $lc = Coordinate::stringFromColumnIndex($lc + 1);\n\n        if ($fr == $lr && $fc == $lc) {\n            return \"$fc$fr\";\n        }\n\n        return \"$fc$fr:$lc$lr\";\n    }\n\n    /**\n     * Read BIFF5 cell range address list\n     * section 2.5.15.\n     *\n     * @return array{size: int, cellRangeAddresses: string[]}\n     */\n    public static function readBIFF5CellRangeAddressList(string $subData): array\n    {\n        $cellRangeAddresses = [];\n\n        // offset: 0; size: 2; number of the following cell range addresses\n        $nm = self::getUInt2d($subData, 0);\n\n        $offset = 2;\n        // offset: 2; size: 6 * $nm; list of $nm (fixed) cell range addresses\n        for ($i = 0; $i < $nm; ++$i) {\n            $cellRangeAddresses[] = self::readBIFF5CellRangeAddressFixed(substr($subData, $offset, 6));\n            $offset += 6;\n        }\n\n        return [\n            'size' => 2 + 6 * $nm,\n            'cellRangeAddresses' => $cellRangeAddresses,\n        ];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Biff8.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nclass Biff8 extends Xls\n{\n    /**\n     * read BIFF8 constant value array from array data\n     * returns e.g. ['value' => '{1,2;3,4}', 'size' => 40]\n     * section 2.5.8.\n     *\n     * @return array{value: string, size: int}\n     */\n    protected static function readBIFF8ConstantArray(string $arrayData): array\n    {\n        // offset: 0; size: 1; number of columns decreased by 1\n        $nc = ord($arrayData[0]);\n\n        // offset: 1; size: 2; number of rows decreased by 1\n        $nr = self::getUInt2d($arrayData, 1);\n        $size = 3; // initialize\n        $arrayData = substr($arrayData, 3);\n\n        // offset: 3; size: var; list of ($nc + 1) * ($nr + 1) constant values\n        $matrixChunks = [];\n        for ($r = 1; $r <= $nr + 1; ++$r) {\n            $items = [];\n            for ($c = 1; $c <= $nc + 1; ++$c) {\n                $constant = self::readBIFF8Constant($arrayData);\n                $items[] = $constant['value'];\n                $arrayData = substr($arrayData, $constant['size']);\n                $size += $constant['size'];\n            }\n            $matrixChunks[] = implode(',', $items); // looks like e.g. '1,\"hello\"'\n        }\n        $matrix = '{' . implode(';', $matrixChunks) . '}';\n\n        return [\n            'value' => $matrix,\n            'size' => $size,\n        ];\n    }\n\n    /**\n     * read BIFF8 constant value which may be 'Empty Value', 'Number', 'String Value', 'Boolean Value', 'Error Value'\n     * section 2.5.7\n     * returns e.g. ['value' => '5', 'size' => 9].\n     *\n     * @return array{value: bool|float|int|string, size: int}\n     */\n    private static function readBIFF8Constant(string $valueData): array\n    {\n        // offset: 0; size: 1; identifier for type of constant\n        $identifier = ord($valueData[0]);\n\n        switch ($identifier) {\n            case 0x00: // empty constant (what is this?)\n                $value = '';\n                $size = 9;\n\n                break;\n            case 0x01: // number\n                // offset: 1; size: 8; IEEE 754 floating-point value\n                $value = self::extractNumber(substr($valueData, 1, 8));\n                $size = 9;\n\n                break;\n            case 0x02: // string value\n                // offset: 1; size: var; Unicode string, 16-bit string length\n                $string = self::readUnicodeStringLong(substr($valueData, 1));\n                $value = '\"' . $string['value'] . '\"';\n                $size = 1 + $string['size'];\n\n                break;\n            case 0x04: // boolean\n                // offset: 1; size: 1; 0 = FALSE, 1 = TRUE\n                if (ord($valueData[1])) {\n                    $value = 'TRUE';\n                } else {\n                    $value = 'FALSE';\n                }\n                $size = 9;\n\n                break;\n            case 0x10: // error code\n                // offset: 1; size: 1; error code\n                $value = ErrorCode::lookup(ord($valueData[1]));\n                $size = 9;\n\n                break;\n            default:\n                throw new ReaderException('Unsupported BIFF8 constant');\n        }\n\n        return [\n            'value' => $value,\n            'size' => $size,\n        ];\n    }\n\n    /**\n     * Read BIFF8 cell range address list\n     * section 2.5.15.\n     *\n     * @return array{size: int, cellRangeAddresses: mixed[]}\n     */\n    public static function readBIFF8CellRangeAddressList(string $subData): array\n    {\n        $cellRangeAddresses = [];\n\n        // offset: 0; size: 2; number of the following cell range addresses\n        $nm = self::getUInt2d($subData, 0);\n\n        $offset = 2;\n        // offset: 2; size: 8 * $nm; list of $nm (fixed) cell range addresses\n        for ($i = 0; $i < $nm; ++$i) {\n            $cellRangeAddresses[] = self::readBIFF8CellRangeAddressFixed(substr($subData, $offset, 8));\n            $offset += 8;\n        }\n\n        return [\n            'size' => 2 + 8 * $nm,\n            'cellRangeAddresses' => $cellRangeAddresses,\n        ];\n    }\n\n    /**\n     * Reads a cell address in BIFF8 e.g. 'A2' or '$A$2'\n     * section 3.3.4.\n     */\n    protected static function readBIFF8CellAddress(string $cellAddressStructure): string\n    {\n        // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767))\n        $row = self::getUInt2d($cellAddressStructure, 0) + 1;\n\n        // offset: 2; size: 2; index to column or column offset + relative flags\n        // bit: 7-0; mask 0x00FF; column index\n        $column = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($cellAddressStructure, 2)) + 1);\n\n        // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)\n        if (!(0x4000 & self::getUInt2d($cellAddressStructure, 2))) {\n            $column = '$' . $column;\n        }\n        // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)\n        if (!(0x8000 & self::getUInt2d($cellAddressStructure, 2))) {\n            $row = '$' . $row;\n        }\n\n        return $column . $row;\n    }\n\n    /**\n     * Reads a cell address in BIFF8 for shared formulas. Uses positive and negative values for row and column\n     * to indicate offsets from a base cell\n     * section 3.3.4.\n     *\n     * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas\n     */\n    protected static function readBIFF8CellAddressB(string $cellAddressStructure, string $baseCell = 'A1'): string\n    {\n        [$baseCol, $baseRow] = Coordinate::coordinateFromString($baseCell);\n        $baseCol = Coordinate::columnIndexFromString($baseCol) - 1;\n        $baseRow = (int) $baseRow;\n\n        // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767))\n        $rowIndex = self::getUInt2d($cellAddressStructure, 0);\n        $row = self::getUInt2d($cellAddressStructure, 0) + 1;\n\n        // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)\n        if (!(0x4000 & self::getUInt2d($cellAddressStructure, 2))) {\n            // offset: 2; size: 2; index to column or column offset + relative flags\n            // bit: 7-0; mask 0x00FF; column index\n            $colIndex = 0x00FF & self::getUInt2d($cellAddressStructure, 2);\n\n            $column = Coordinate::stringFromColumnIndex($colIndex + 1);\n            $column = '$' . $column;\n        } else {\n            // offset: 2; size: 2; index to column or column offset + relative flags\n            // bit: 7-0; mask 0x00FF; column index\n            $relativeColIndex = 0x00FF & self::getInt2d($cellAddressStructure, 2);\n            $colIndex = $baseCol + $relativeColIndex;\n            $colIndex = ($colIndex < 256) ? $colIndex : $colIndex - 256;\n            $colIndex = ($colIndex >= 0) ? $colIndex : $colIndex + 256;\n            $column = Coordinate::stringFromColumnIndex($colIndex + 1);\n        }\n\n        // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)\n        if (!(0x8000 & self::getUInt2d($cellAddressStructure, 2))) {\n            $row = '$' . $row;\n        } else {\n            $rowIndex = ($rowIndex <= 32767) ? $rowIndex : $rowIndex - 65536;\n            $row = $baseRow + $rowIndex;\n        }\n\n        return $column . $row;\n    }\n\n    /**\n     * Reads a cell range address in BIFF8 e.g. 'A2:B6' or 'A1'\n     * always fixed range\n     * section 2.5.14.\n     */\n    protected static function readBIFF8CellRangeAddressFixed(string $subData): string\n    {\n        // offset: 0; size: 2; index to first row\n        $fr = self::getUInt2d($subData, 0) + 1;\n\n        // offset: 2; size: 2; index to last row\n        $lr = self::getUInt2d($subData, 2) + 1;\n\n        // offset: 4; size: 2; index to first column\n        $fc = self::getUInt2d($subData, 4);\n\n        // offset: 6; size: 2; index to last column\n        $lc = self::getUInt2d($subData, 6);\n\n        // check values\n        if ($fr > $lr || $fc > $lc) {\n            throw new ReaderException('Not a cell range address');\n        }\n\n        // column index to letter\n        $fc = Coordinate::stringFromColumnIndex($fc + 1);\n        $lc = Coordinate::stringFromColumnIndex($lc + 1);\n\n        if ($fr == $lr && $fc == $lc) {\n            return \"$fc$fr\";\n        }\n\n        return \"$fc$fr:$lc$lr\";\n    }\n\n    /**\n     * Reads a cell range address in BIFF8 e.g. 'A2:B6' or '$A$2:$B$6'\n     * there are flags indicating whether column/row index is relative\n     * section 3.3.4.\n     */\n    protected static function readBIFF8CellRangeAddress(string $subData): string\n    {\n        // todo: if cell range is just a single cell, should this function\n        // not just return e.g. 'A1' and not 'A1:A1' ?\n\n        // offset: 0; size: 2; index to first row (0... 65535) (or offset (-32768... 32767))\n        $fr = self::getUInt2d($subData, 0) + 1;\n\n        // offset: 2; size: 2; index to last row (0... 65535) (or offset (-32768... 32767))\n        $lr = self::getUInt2d($subData, 2) + 1;\n\n        // offset: 4; size: 2; index to first column or column offset + relative flags\n\n        // bit: 7-0; mask 0x00FF; column index\n        $fc = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($subData, 4)) + 1);\n\n        // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)\n        if (!(0x4000 & self::getUInt2d($subData, 4))) {\n            $fc = '$' . $fc;\n        }\n\n        // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)\n        if (!(0x8000 & self::getUInt2d($subData, 4))) {\n            $fr = '$' . $fr;\n        }\n\n        // offset: 6; size: 2; index to last column or column offset + relative flags\n\n        // bit: 7-0; mask 0x00FF; column index\n        $lc = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($subData, 6)) + 1);\n\n        // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)\n        if (!(0x4000 & self::getUInt2d($subData, 6))) {\n            $lc = '$' . $lc;\n        }\n\n        // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)\n        if (!(0x8000 & self::getUInt2d($subData, 6))) {\n            $lr = '$' . $lr;\n        }\n\n        return \"$fc$fr:$lc$lr\";\n    }\n\n    /**\n     * Reads a cell range address in BIFF8 for shared formulas. Uses positive and negative values for row and column\n     * to indicate offsets from a base cell\n     * section 3.3.4.\n     *\n     * @param string $baseCell Base cell\n     *\n     * @return string Cell range address\n     */\n    protected static function readBIFF8CellRangeAddressB(string $subData, string $baseCell = 'A1'): string\n    {\n        [$baseCol, $baseRow] = Coordinate::indexesFromString($baseCell);\n        $baseCol = $baseCol - 1;\n\n        // TODO: if cell range is just a single cell, should this function\n        // not just return e.g. 'A1' and not 'A1:A1' ?\n\n        // offset: 0; size: 2; first row\n        $frIndex = self::getUInt2d($subData, 0); // adjust below\n\n        // offset: 2; size: 2; relative index to first row (0... 65535) should be treated as offset (-32768... 32767)\n        $lrIndex = self::getUInt2d($subData, 2); // adjust below\n\n        // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)\n        if (!(0x4000 & self::getUInt2d($subData, 4))) {\n            // absolute column index\n            // offset: 4; size: 2; first column with relative/absolute flags\n            // bit: 7-0; mask 0x00FF; column index\n            $fcIndex = 0x00FF & self::getUInt2d($subData, 4);\n            $fc = Coordinate::stringFromColumnIndex($fcIndex + 1);\n            $fc = '$' . $fc;\n        } else {\n            // column offset\n            // offset: 4; size: 2; first column with relative/absolute flags\n            // bit: 7-0; mask 0x00FF; column index\n            $relativeFcIndex = 0x00FF & self::getInt2d($subData, 4);\n            $fcIndex = $baseCol + $relativeFcIndex;\n            $fcIndex = ($fcIndex < 256) ? $fcIndex : $fcIndex - 256;\n            $fcIndex = ($fcIndex >= 0) ? $fcIndex : $fcIndex + 256;\n            $fc = Coordinate::stringFromColumnIndex($fcIndex + 1);\n        }\n\n        // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)\n        if (!(0x8000 & self::getUInt2d($subData, 4))) {\n            // absolute row index\n            $fr = $frIndex + 1;\n            $fr = '$' . $fr;\n        } else {\n            // row offset\n            $frIndex = ($frIndex <= 32767) ? $frIndex : $frIndex - 65536;\n            $fr = $baseRow + $frIndex;\n        }\n\n        // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)\n        if (!(0x4000 & self::getUInt2d($subData, 6))) {\n            // absolute column index\n            // offset: 6; size: 2; last column with relative/absolute flags\n            // bit: 7-0; mask 0x00FF; column index\n            $lcIndex = 0x00FF & self::getUInt2d($subData, 6);\n            $lc = Coordinate::stringFromColumnIndex($lcIndex + 1);\n            $lc = '$' . $lc;\n        } else {\n            // column offset\n            // offset: 6; size: 2; last column with relative/absolute flags\n            // bit: 7-0; mask 0x00FF; column index\n            $relativeLcIndex = 0x00FF & self::getInt2d($subData, 6);\n            $lcIndex = $baseCol + $relativeLcIndex;\n            $lcIndex = ($lcIndex < 256) ? $lcIndex : $lcIndex - 256;\n            $lcIndex = ($lcIndex >= 0) ? $lcIndex : $lcIndex + 256;\n            $lc = Coordinate::stringFromColumnIndex($lcIndex + 1);\n        }\n\n        // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)\n        if (!(0x8000 & self::getUInt2d($subData, 6))) {\n            // absolute row index\n            $lr = $lrIndex + 1;\n            $lr = '$' . $lr;\n        } else {\n            // row offset\n            $lrIndex = ($lrIndex <= 32767) ? $lrIndex : $lrIndex - 65536;\n            $lr = $baseRow + $lrIndex;\n        }\n\n        return \"$fc$fr:$lc$lr\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Color;\n\nclass BIFF5\n{\n    private const BIFF5_COLOR_MAP = [\n        0x08 => '000000',\n        0x09 => 'FFFFFF',\n        0x0A => 'FF0000',\n        0x0B => '00FF00',\n        0x0C => '0000FF',\n        0x0D => 'FFFF00',\n        0x0E => 'FF00FF',\n        0x0F => '00FFFF',\n        0x10 => '800000',\n        0x11 => '008000',\n        0x12 => '000080',\n        0x13 => '808000',\n        0x14 => '800080',\n        0x15 => '008080',\n        0x16 => 'C0C0C0',\n        0x17 => '808080',\n        0x18 => '8080FF',\n        0x19 => '802060',\n        0x1A => 'FFFFC0',\n        0x1B => 'A0E0F0',\n        0x1C => '600080',\n        0x1D => 'FF8080',\n        0x1E => '0080C0',\n        0x1F => 'C0C0FF',\n        0x20 => '000080',\n        0x21 => 'FF00FF',\n        0x22 => 'FFFF00',\n        0x23 => '00FFFF',\n        0x24 => '800080',\n        0x25 => '800000',\n        0x26 => '008080',\n        0x27 => '0000FF',\n        0x28 => '00CFFF',\n        0x29 => '69FFFF',\n        0x2A => 'E0FFE0',\n        0x2B => 'FFFF80',\n        0x2C => 'A6CAF0',\n        0x2D => 'DD9CB3',\n        0x2E => 'B38FEE',\n        0x2F => 'E3E3E3',\n        0x30 => '2A6FF9',\n        0x31 => '3FB8CD',\n        0x32 => '488436',\n        0x33 => '958C41',\n        0x34 => '8E5E42',\n        0x35 => 'A0627A',\n        0x36 => '624FAC',\n        0x37 => '969696',\n        0x38 => '1D2FBE',\n        0x39 => '286676',\n        0x3A => '004500',\n        0x3B => '453E01',\n        0x3C => '6A2813',\n        0x3D => '85396A',\n        0x3E => '4A3285',\n        0x3F => '424242',\n    ];\n\n    /**\n     * Map color array from BIFF5 built-in color index.\n     *\n     * @return array{rgb: string}\n     */\n    public static function lookup(int $color): array\n    {\n        return ['rgb' => self::BIFF5_COLOR_MAP[$color] ?? '000000'];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Color;\n\nclass BIFF8\n{\n    private const BIFF8_COLOR_MAP = [\n        0x08 => '000000',\n        0x09 => 'FFFFFF',\n        0x0A => 'FF0000',\n        0x0B => '00FF00',\n        0x0C => '0000FF',\n        0x0D => 'FFFF00',\n        0x0E => 'FF00FF',\n        0x0F => '00FFFF',\n        0x10 => '800000',\n        0x11 => '008000',\n        0x12 => '000080',\n        0x13 => '808000',\n        0x14 => '800080',\n        0x15 => '008080',\n        0x16 => 'C0C0C0',\n        0x17 => '808080',\n        0x18 => '9999FF',\n        0x19 => '993366',\n        0x1A => 'FFFFCC',\n        0x1B => 'CCFFFF',\n        0x1C => '660066',\n        0x1D => 'FF8080',\n        0x1E => '0066CC',\n        0x1F => 'CCCCFF',\n        0x20 => '000080',\n        0x21 => 'FF00FF',\n        0x22 => 'FFFF00',\n        0x23 => '00FFFF',\n        0x24 => '800080',\n        0x25 => '800000',\n        0x26 => '008080',\n        0x27 => '0000FF',\n        0x28 => '00CCFF',\n        0x29 => 'CCFFFF',\n        0x2A => 'CCFFCC',\n        0x2B => 'FFFF99',\n        0x2C => '99CCFF',\n        0x2D => 'FF99CC',\n        0x2E => 'CC99FF',\n        0x2F => 'FFCC99',\n        0x30 => '3366FF',\n        0x31 => '33CCCC',\n        0x32 => '99CC00',\n        0x33 => 'FFCC00',\n        0x34 => 'FF9900',\n        0x35 => 'FF6600',\n        0x36 => '666699',\n        0x37 => '969696',\n        0x38 => '003366',\n        0x39 => '339966',\n        0x3A => '003300',\n        0x3B => '333300',\n        0x3C => '993300',\n        0x3D => '993366',\n        0x3E => '333399',\n        0x3F => '333333',\n    ];\n\n    /**\n     * Map color array from BIFF8 built-in color index.\n     *\n     * @return array{rgb: string}\n     */\n    public static function lookup(int $color): array\n    {\n        return ['rgb' => self::BIFF8_COLOR_MAP[$color] ?? '000000'];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Color;\n\nclass BuiltIn\n{\n    private const BUILTIN_COLOR_MAP = [\n        0x00 => '000000',\n        0x01 => 'FFFFFF',\n        0x02 => 'FF0000',\n        0x03 => '00FF00',\n        0x04 => '0000FF',\n        0x05 => 'FFFF00',\n        0x06 => 'FF00FF',\n        0x07 => '00FFFF',\n        0x40 => '000000', // system window text color\n        0x41 => 'FFFFFF', // system window background color\n    ];\n\n    /**\n     * Map built-in color to RGB value.\n     *\n     * @param int $color Indexed color\n     *\n     * @return array{rgb: string}\n     */\n    public static function lookup(int $color): array\n    {\n        return ['rgb' => self::BUILTIN_COLOR_MAP[$color] ?? '000000'];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Color.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nclass Color\n{\n    /**\n     * Read color.\n     *\n     * @param int $color Indexed color\n     * @param string[][] $palette Color palette\n     *\n     * @return string[] RGB color value, example: ['rgb' => 'FF0000']\n     */\n    public static function map(int $color, array $palette, int $version): array\n    {\n        if ($color <= 0x07 || $color >= 0x40) {\n            // special built-in color\n            return Color\\BuiltIn::lookup($color);\n        } elseif (isset($palette[$color - 8])) {\n            // palette color, color index 0x08 maps to pallete index 0\n            return $palette[$color - 8];\n        }\n\n        return ($version === Xls::XLS_BIFF8) ? Color\\BIFF8::lookup($color) : Color\\BIFF5::lookup($color);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/ConditionalFormatting.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Style\\FillPattern;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nclass ConditionalFormatting extends Xls\n{\n    /**\n     * @var array<int, string>\n     */\n    private static array $types = [\n        0x01 => Conditional::CONDITION_CELLIS,\n        0x02 => Conditional::CONDITION_EXPRESSION,\n    ];\n\n    /**\n     * @var array<int, string>\n     */\n    private static array $operators = [\n        0x00 => Conditional::OPERATOR_NONE,\n        0x01 => Conditional::OPERATOR_BETWEEN,\n        0x02 => Conditional::OPERATOR_NOTBETWEEN,\n        0x03 => Conditional::OPERATOR_EQUAL,\n        0x04 => Conditional::OPERATOR_NOTEQUAL,\n        0x05 => Conditional::OPERATOR_GREATERTHAN,\n        0x06 => Conditional::OPERATOR_LESSTHAN,\n        0x07 => Conditional::OPERATOR_GREATERTHANOREQUAL,\n        0x08 => Conditional::OPERATOR_LESSTHANOREQUAL,\n    ];\n\n    public static function type(int $type): ?string\n    {\n        return self::$types[$type] ?? null;\n    }\n\n    public static function operator(int $operator): ?string\n    {\n        return self::$operators[$operator] ?? null;\n    }\n\n    /**\n     * Parse conditional formatting blocks.\n     *\n     * @see https://www.openoffice.org/sc/excelfileformat.pdf Search for CFHEADER followed by CFRULE\n     *\n     * @return mixed[]\n     */\n    protected function readCFHeader2(Xls $xls): array\n    {\n        $length = self::getUInt2d($xls->data, $xls->pos + 2);\n        $recordData = $xls->readRecordData($xls->data, $xls->pos + 4, $length);\n\n        // move stream pointer forward to next record\n        $xls->pos += 4 + $length;\n\n        if ($xls->readDataOnly) {\n            return [];\n        }\n\n        // offset: 0; size: 2; Rule Count\n//        $ruleCount = self::getUInt2d($recordData, 0);\n\n        // offset: var; size: var; cell range address list with\n        $cellRangeAddressList = ($xls->version == self::XLS_BIFF8)\n            ? Biff8::readBIFF8CellRangeAddressList(substr($recordData, 12))\n            : Biff5::readBIFF5CellRangeAddressList(substr($recordData, 12));\n        $cellRangeAddresses = $cellRangeAddressList['cellRangeAddresses'];\n\n        return $cellRangeAddresses;\n    }\n\n    /** @param string[] $cellRangeAddresses */\n    protected function readCFRule2(array $cellRangeAddresses, Xls $xls): void\n    {\n        $length = self::getUInt2d($xls->data, $xls->pos + 2);\n        $recordData = $xls->readRecordData($xls->data, $xls->pos + 4, $length);\n\n        // move stream pointer forward to next record\n        $xls->pos += 4 + $length;\n\n        if ($xls->readDataOnly) {\n            return;\n        }\n\n        // offset: 0; size: 2; Options\n        $cfRule = self::getUInt2d($recordData, 0);\n\n        // bit: 8-15; mask: 0x00FF; type\n        $type = (0x00FF & $cfRule) >> 0;\n        $type = self::type($type);\n\n        // bit: 0-7; mask: 0xFF00; type\n        $operator = (0xFF00 & $cfRule) >> 8;\n        $operator = self::operator($operator);\n\n        if ($type === null || $operator === null) {\n            return;\n        }\n\n        // offset: 2; size: 2; Size1\n        $size1 = self::getUInt2d($recordData, 2);\n\n        // offset: 4; size: 2; Size2\n        $size2 = self::getUInt2d($recordData, 4);\n\n        // offset: 6; size: 4; Options\n        $options = self::getInt4d($recordData, 6);\n\n        $style = new Style(false, true); // non-supervisor, conditional\n        $noFormatSet = true;\n        //$xls->getCFStyleOptions($options, $style);\n\n        $hasFontRecord = (bool) ((0x04000000 & $options) >> 26);\n        $hasAlignmentRecord = (bool) ((0x08000000 & $options) >> 27);\n        $hasBorderRecord = (bool) ((0x10000000 & $options) >> 28);\n        $hasFillRecord = (bool) ((0x20000000 & $options) >> 29);\n        $hasProtectionRecord = (bool) ((0x40000000 & $options) >> 30);\n        // note unexpected values for following 4\n        $hasBorderLeft = !(bool) (0x00000400 & $options);\n        $hasBorderRight = !(bool) (0x00000800 & $options);\n        $hasBorderTop = !(bool) (0x00001000 & $options);\n        $hasBorderBottom = !(bool) (0x00002000 & $options);\n\n        $offset = 12;\n\n        if ($hasFontRecord === true) {\n            $fontStyle = substr($recordData, $offset, 118);\n            $this->getCFFontStyle($fontStyle, $style, $xls);\n            $offset += 118;\n            $noFormatSet = false;\n        }\n\n        if ($hasAlignmentRecord === true) {\n            //$alignmentStyle = substr($recordData, $offset, 8);\n            //$this->getCFAlignmentStyle($alignmentStyle, $style, $xls);\n            $offset += 8;\n        }\n\n        if ($hasBorderRecord === true) {\n            $borderStyle = substr($recordData, $offset, 8);\n            $this->getCFBorderStyle($borderStyle, $style, $hasBorderLeft, $hasBorderRight, $hasBorderTop, $hasBorderBottom, $xls);\n            $offset += 8;\n            $noFormatSet = false;\n        }\n\n        if ($hasFillRecord === true) {\n            $fillStyle = substr($recordData, $offset, 4);\n            $this->getCFFillStyle($fillStyle, $style, $xls);\n            $offset += 4;\n            $noFormatSet = false;\n        }\n\n        if ($hasProtectionRecord === true) {\n            //$protectionStyle = substr($recordData, $offset, 4);\n            //$this->getCFProtectionStyle($protectionStyle, $style, $xls);\n            $offset += 2;\n        }\n\n        $formula1 = $formula2 = null;\n        if ($size1 > 0) {\n            $formula1 = $this->readCFFormula($recordData, $offset, $size1, $xls);\n            if ($formula1 === null) {\n                return;\n            }\n\n            $offset += $size1;\n        }\n\n        if ($size2 > 0) {\n            $formula2 = $this->readCFFormula($recordData, $offset, $size2, $xls);\n            if ($formula2 === null) {\n                return;\n            }\n\n            $offset += $size2;\n        }\n\n        $this->setCFRules($cellRangeAddresses, $type, $operator, $formula1, $formula2, $style, $noFormatSet, $xls);\n    }\n\n    /*private function getCFStyleOptions(int $options, Style $style, Xls $xls): void\n    {\n    }*/\n\n    private function getCFFontStyle(string $options, Style $style, Xls $xls): void\n    {\n        $fontSize = self::getInt4d($options, 64);\n        if ($fontSize !== -1) {\n            $style->getFont()->setSize($fontSize / 20); // Convert twips to points\n        }\n        $options68 = self::getInt4d($options, 68);\n        $options88 = self::getInt4d($options, 88);\n\n        if (($options88 & 2) === 0) {\n            $bold = self::getUInt2d($options, 72); // 400 = normal, 700 = bold\n            if ($bold !== 0) {\n                $style->getFont()->setBold($bold >= 550);\n            }\n            if (($options68 & 2) !== 0) {\n                $style->getFont()->setItalic(true);\n            }\n        }\n        if (($options88 & 0x80) === 0) {\n            if (($options68 & 0x80) !== 0) {\n                $style->getFont()->setStrikethrough(true);\n            }\n        }\n\n        $color = self::getInt4d($options, 80);\n\n        if ($color !== -1) {\n            $style->getFont()\n                ->getColor()\n                ->setRGB(Color::map($color, $xls->palette, $xls->version)['rgb']);\n        }\n    }\n\n    /*private function getCFAlignmentStyle(string $options, Style $style, Xls $xls): void\n    {\n    }*/\n\n    private function getCFBorderStyle(string $options, Style $style, bool $hasBorderLeft, bool $hasBorderRight, bool $hasBorderTop, bool $hasBorderBottom, Xls $xls): void\n    {\n        /** @var false|int[] */\n        $valueArray = unpack('V', $options);\n        $value = is_array($valueArray) ? $valueArray[1] : 0;\n        $left = $value & 15;\n        $right = ($value >> 4) & 15;\n        $top = ($value >> 8) & 15;\n        $bottom = ($value >> 12) & 15;\n        $leftc = ($value >> 16) & 0x7F;\n        $rightc = ($value >> 23) & 0x7F;\n        /** @var false|int[] */\n        $valueArray = unpack('V', substr($options, 4));\n        $value = is_array($valueArray) ? $valueArray[1] : 0;\n        $topc = $value & 0x7F;\n        $bottomc = ($value & 0x3F80) >> 7;\n        if ($hasBorderLeft) {\n            $style->getBorders()->getLeft()\n                ->setBorderStyle(self::BORDER_STYLE_MAP[$left]);\n            $style->getBorders()->getLeft()->getColor()\n                ->setRGB(Color::map($leftc, $xls->palette, $xls->version)['rgb']);\n        }\n        if ($hasBorderRight) {\n            $style->getBorders()->getRight()\n                ->setBorderStyle(self::BORDER_STYLE_MAP[$right]);\n            $style->getBorders()->getRight()->getColor()\n                ->setRGB(Color::map($rightc, $xls->palette, $xls->version)['rgb']);\n        }\n        if ($hasBorderTop) {\n            $style->getBorders()->getTop()\n                ->setBorderStyle(self::BORDER_STYLE_MAP[$top]);\n            $style->getBorders()->getTop()->getColor()\n                ->setRGB(Color::map($topc, $xls->palette, $xls->version)['rgb']);\n        }\n        if ($hasBorderBottom) {\n            $style->getBorders()->getBottom()\n                ->setBorderStyle(self::BORDER_STYLE_MAP[$bottom]);\n            $style->getBorders()->getBottom()->getColor()\n                ->setRGB(Color::map($bottomc, $xls->palette, $xls->version)['rgb']);\n        }\n    }\n\n    private function getCFFillStyle(string $options, Style $style, Xls $xls): void\n    {\n        $fillPattern = self::getUInt2d($options, 0);\n        // bit: 10-15; mask: 0xFC00; type\n        $fillPattern = (0xFC00 & $fillPattern) >> 10;\n        $fillPattern = FillPattern::lookup($fillPattern);\n        $fillPattern = $fillPattern === Fill::FILL_NONE ? Fill::FILL_SOLID : $fillPattern;\n\n        if ($fillPattern !== Fill::FILL_NONE) {\n            $style->getFill()->setFillType($fillPattern);\n\n            $fillColors = self::getUInt2d($options, 2);\n\n            // bit: 0-6; mask: 0x007F; type\n            $color1 = (0x007F & $fillColors) >> 0;\n\n            // bit: 7-13; mask: 0x3F80; type\n            $color2 = (0x3F80 & $fillColors) >> 7;\n            if ($fillPattern === Fill::FILL_SOLID) {\n                $style->getFill()->getStartColor()->setRGB(Color::map($color2, $xls->palette, $xls->version)['rgb']);\n            } else {\n                $style->getFill()->getStartColor()->setRGB(Color::map($color1, $xls->palette, $xls->version)['rgb']);\n                $style->getFill()->getEndColor()->setRGB(Color::map($color2, $xls->palette, $xls->version)['rgb']);\n            }\n        }\n    }\n\n    /*private function getCFProtectionStyle(string $options, Style $style, Xls $xls): void\n    {\n    }*/\n\n    private function readCFFormula(string $recordData, int $offset, int $size, Xls $xls): float|int|string|null\n    {\n        try {\n            $formula = substr($recordData, $offset, $size);\n            $formula = pack('v', $size) . $formula; // prepend the length\n\n            $formula = $xls->getFormulaFromStructure($formula);\n            if (is_numeric($formula)) {\n                return (str_contains($formula, '.')) ? (float) $formula : (int) $formula;\n            }\n\n            return $formula;\n        } catch (PhpSpreadsheetException) {\n            return null;\n        }\n    }\n\n    /** @param string[] $cellRanges */\n    private function setCFRules(array $cellRanges, string $type, string $operator, null|float|int|string $formula1, null|float|int|string $formula2, Style $style, bool $noFormatSet, Xls $xls): void\n    {\n        foreach ($cellRanges as $cellRange) {\n            $conditional = new Conditional();\n            $conditional->setNoFormatSet($noFormatSet);\n            $conditional->setConditionType($type);\n            $conditional->setOperatorType($operator);\n            $conditional->setStopIfTrue(true);\n            if ($formula1 !== null) {\n                $conditional->addCondition($formula1);\n            }\n            if ($formula2 !== null) {\n                $conditional->addCondition($formula2);\n            }\n            $conditional->setStyle($style);\n\n            $conditionalStyles = $xls->phpSheet\n                ->getStyle($cellRange)\n                ->getConditionalStyles();\n            $conditionalStyles[] = $conditional;\n\n            $xls->phpSheet\n                ->getStyle($cellRange)\n                ->setConditionalStyles($conditionalStyles);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/DataValidationHelper.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nclass DataValidationHelper extends Xls\n{\n    /**\n     * @var array<int, string>\n     */\n    private static array $types = [\n        0x00 => DataValidation::TYPE_NONE,\n        0x01 => DataValidation::TYPE_WHOLE,\n        0x02 => DataValidation::TYPE_DECIMAL,\n        0x03 => DataValidation::TYPE_LIST,\n        0x04 => DataValidation::TYPE_DATE,\n        0x05 => DataValidation::TYPE_TIME,\n        0x06 => DataValidation::TYPE_TEXTLENGTH,\n        0x07 => DataValidation::TYPE_CUSTOM,\n    ];\n\n    /**\n     * @var array<int, string>\n     */\n    private static array $errorStyles = [\n        0x00 => DataValidation::STYLE_STOP,\n        0x01 => DataValidation::STYLE_WARNING,\n        0x02 => DataValidation::STYLE_INFORMATION,\n    ];\n\n    /**\n     * @var array<int, string>\n     */\n    private static array $operators = [\n        0x00 => DataValidation::OPERATOR_BETWEEN,\n        0x01 => DataValidation::OPERATOR_NOTBETWEEN,\n        0x02 => DataValidation::OPERATOR_EQUAL,\n        0x03 => DataValidation::OPERATOR_NOTEQUAL,\n        0x04 => DataValidation::OPERATOR_GREATERTHAN,\n        0x05 => DataValidation::OPERATOR_LESSTHAN,\n        0x06 => DataValidation::OPERATOR_GREATERTHANOREQUAL,\n        0x07 => DataValidation::OPERATOR_LESSTHANOREQUAL,\n    ];\n\n    public static function type(int $type): ?string\n    {\n        return self::$types[$type] ?? null;\n    }\n\n    public static function errorStyle(int $errorStyle): ?string\n    {\n        return self::$errorStyles[$errorStyle] ?? null;\n    }\n\n    public static function operator(int $operator): ?string\n    {\n        return self::$operators[$operator] ?? null;\n    }\n\n    /**\n     * Read DATAVALIDATION record.\n     */\n    protected function readDataValidation2(Xls $xls): void\n    {\n        $length = self::getUInt2d($xls->data, $xls->pos + 2);\n        $recordData = $xls->readRecordData($xls->data, $xls->pos + 4, $length);\n\n        // move stream pointer forward to next record\n        $xls->pos += 4 + $length;\n\n        if ($xls->readDataOnly) {\n            return;\n        }\n\n        // offset: 0; size: 4; Options\n        $options = self::getInt4d($recordData, 0);\n\n        // bit: 0-3; mask: 0x0000000F; type\n        $type = (0x0000000F & $options) >> 0;\n        $type = self::type($type);\n\n        // bit: 4-6; mask: 0x00000070; error type\n        $errorStyle = (0x00000070 & $options) >> 4;\n        $errorStyle = self::errorStyle($errorStyle);\n\n        // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list)\n        // I have only seen cases where this is 1\n        //$explicitFormula = (0x00000080 & $options) >> 7;\n\n        // bit: 8; mask: 0x00000100; 1= empty cells allowed\n        $allowBlank = (0x00000100 & $options) >> 8;\n\n        // bit: 9; mask: 0x00000200; 1= suppress drop down arrow in list type validity\n        $suppressDropDown = (0x00000200 & $options) >> 9;\n\n        // bit: 18; mask: 0x00040000; 1= show prompt box if cell selected\n        $showInputMessage = (0x00040000 & $options) >> 18;\n\n        // bit: 19; mask: 0x00080000; 1= show error box if invalid values entered\n        $showErrorMessage = (0x00080000 & $options) >> 19;\n\n        // bit: 20-23; mask: 0x00F00000; condition operator\n        $operator = (0x00F00000 & $options) >> 20;\n        $operator = self::operator($operator);\n\n        if ($type === null || $errorStyle === null || $operator === null) {\n            return;\n        }\n\n        // offset: 4; size: var; title of the prompt box\n        $offset = 4;\n        $string = self::readUnicodeStringLong(substr($recordData, $offset));\n        $promptTitle = $string['value'] !== chr(0) ? $string['value'] : '';\n        $offset += $string['size'];\n\n        // offset: var; size: var; title of the error box\n        $string = self::readUnicodeStringLong(substr($recordData, $offset));\n        $errorTitle = $string['value'] !== chr(0) ? $string['value'] : '';\n        $offset += $string['size'];\n\n        // offset: var; size: var; text of the prompt box\n        $string = self::readUnicodeStringLong(substr($recordData, $offset));\n        $prompt = $string['value'] !== chr(0) ? $string['value'] : '';\n        $offset += $string['size'];\n\n        // offset: var; size: var; text of the error box\n        $string = self::readUnicodeStringLong(substr($recordData, $offset));\n        $error = $string['value'] !== chr(0) ? $string['value'] : '';\n        $offset += $string['size'];\n\n        // offset: var; size: 2; size of the formula data for the first condition\n        $sz1 = self::getUInt2d($recordData, $offset);\n        $offset += 2;\n\n        // offset: var; size: 2; not used\n        $offset += 2;\n\n        // offset: var; size: $sz1; formula data for first condition (without size field)\n        $formula1 = substr($recordData, $offset, $sz1);\n        $formula1 = pack('v', $sz1) . $formula1; // prepend the length\n\n        try {\n            $formula1 = $xls->getFormulaFromStructure($formula1);\n\n            // in list type validity, null characters are used as item separators\n            if ($type == DataValidation::TYPE_LIST) {\n                $formula1 = str_replace(chr(0), ',', $formula1);\n            }\n        } catch (PhpSpreadsheetException $e) {\n            return;\n        }\n        $offset += $sz1;\n\n        // offset: var; size: 2; size of the formula data for the first condition\n        $sz2 = self::getUInt2d($recordData, $offset);\n        $offset += 2;\n\n        // offset: var; size: 2; not used\n        $offset += 2;\n\n        // offset: var; size: $sz2; formula data for second condition (without size field)\n        $formula2 = substr($recordData, $offset, $sz2);\n        $formula2 = pack('v', $sz2) . $formula2; // prepend the length\n\n        try {\n            $formula2 = $xls->getFormulaFromStructure($formula2);\n        } catch (PhpSpreadsheetException) {\n            return;\n        }\n        $offset += $sz2;\n\n        // offset: var; size: var; cell range address list with\n        $cellRangeAddressList = Biff8::readBIFF8CellRangeAddressList(substr($recordData, $offset));\n        /** @var string[] */\n        $cellRangeAddresses = $cellRangeAddressList['cellRangeAddresses'];\n        $maxRow = (string) AddressRange::MAX_ROW;\n        $maxCol = AddressRange::MAX_COLUMN;\n        $maxXlsRow = (string) AddressRange::MAX_ROW_XLS;\n        $maxXlsColumnString = AddressRange::MAX_COLUMN_XLS;\n\n        foreach ($cellRangeAddresses as $cellRange) {\n            $cellRange = preg_replace(\n                [\n                    \"/([a-z]+)1:([a-z]+)$maxXlsRow/i\",\n                    \"/([a-z]+\\\\d+):([a-z]+)$maxXlsRow/i\",\n                    \"/A(\\\\d+):$maxXlsColumnString(\\\\d+)/i\",\n                    \"/([a-z]+\\\\d+):$maxXlsColumnString(\\\\d+)/i\",\n                ],\n                [\n                    '$1:$2',\n                    '$1:${2}' . $maxRow,\n                    '$1:$2',\n                    '$1:' . $maxCol . '$2',\n                ],\n                $cellRange\n            ) ?? $cellRange;\n            $objValidation = new DataValidation();\n            $objValidation->setType($type);\n            $objValidation->setErrorStyle($errorStyle);\n            $objValidation->setAllowBlank((bool) $allowBlank);\n            $objValidation->setShowInputMessage((bool) $showInputMessage);\n            $objValidation->setShowErrorMessage((bool) $showErrorMessage);\n            $objValidation->setShowDropDown(!$suppressDropDown);\n            $objValidation->setOperator($operator);\n            $objValidation->setErrorTitle($errorTitle);\n            $objValidation->setError($error);\n            $objValidation->setPromptTitle($promptTitle);\n            $objValidation->setPrompt($prompt);\n            $objValidation->setFormula1($formula1);\n            $objValidation->setFormula2($formula2);\n            $xls->phpSheet->setDataValidation($cellRange, $objValidation);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/ErrorCode.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nclass ErrorCode\n{\n    private const ERROR_CODE_MAP = [\n        0x00 => '#NULL!',\n        0x07 => '#DIV/0!',\n        0x0F => '#VALUE!',\n        0x17 => '#REF!',\n        0x1D => '#NAME?',\n        0x24 => '#NUM!',\n        0x2A => '#N/A',\n    ];\n\n    /**\n     * Map error code, e.g. '#N/A'.\n     */\n    public static function lookup(int $code): string|bool\n    {\n        return self::ERROR_CODE_MAP[$code] ?? false;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Escher.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer\\SpContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE\\Blip;\n\n/**\n * @template T of BSE|BstoreContainer|DgContainer|DggContainer|\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher|SpContainer|SpgrContainer\n */\nclass Escher\n{\n    const DGGCONTAINER = 0xF000;\n    const BSTORECONTAINER = 0xF001;\n    const DGCONTAINER = 0xF002;\n    const SPGRCONTAINER = 0xF003;\n    const SPCONTAINER = 0xF004;\n    const DGG = 0xF006;\n    const BSE = 0xF007;\n    const DG = 0xF008;\n    const SPGR = 0xF009;\n    const SP = 0xF00A;\n    const OPT = 0xF00B;\n    const CLIENTTEXTBOX = 0xF00D;\n    const CLIENTANCHOR = 0xF010;\n    const CLIENTDATA = 0xF011;\n    const BLIPJPEG = 0xF01D;\n    const BLIPPNG = 0xF01E;\n    const SPLITMENUCOLORS = 0xF11E;\n    const TERTIARYOPT = 0xF122;\n\n    /**\n     * Escher stream data (binary).\n     */\n    private string $data;\n\n    /**\n     * Size in bytes of the Escher stream data.\n     */\n    private int $dataSize;\n\n    /**\n     * Current position of stream pointer in Escher stream data.\n     */\n    private int $pos;\n\n    /**\n     * The object to be returned by the reader. Modified during load.\n     *\n     * @var T\n     */\n    private BSE|BstoreContainer|DgContainer|DggContainer|\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher|SpContainer|SpgrContainer $object;\n\n    /**\n     * Create a new Escher instance.\n     *\n     * @param T $object\n     */\n    public function __construct(BSE|BstoreContainer|DgContainer|DggContainer|\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher|SpContainer|SpgrContainer $object)\n    {\n        $this->object = $object;\n    }\n\n    private const WHICH_ROUTINE = [\n        self::DGGCONTAINER => 'readDggContainer',\n        self::DGG => 'readDgg',\n        self::BSTORECONTAINER => 'readBstoreContainer',\n        self::BSE => 'readBSE',\n        self::BLIPJPEG => 'readBlipJPEG',\n        self::BLIPPNG => 'readBlipPNG',\n        self::OPT => 'readOPT',\n        self::TERTIARYOPT => 'readTertiaryOPT',\n        self::SPLITMENUCOLORS => 'readSplitMenuColors',\n        self::DGCONTAINER => 'readDgContainer',\n        self::DG => 'readDg',\n        self::SPGRCONTAINER => 'readSpgrContainer',\n        self::SPCONTAINER => 'readSpContainer',\n        self::SPGR => 'readSpgr',\n        self::SP => 'readSp',\n        self::CLIENTTEXTBOX => 'readClientTextbox',\n        self::CLIENTANCHOR => 'readClientAnchor',\n        self::CLIENTDATA => 'readClientData',\n    ];\n\n    /**\n     * Load Escher stream data. May be a partial Escher stream.\n     *\n     * @return T\n     */\n    public function load(string $data): BSE|BstoreContainer|DgContainer|DggContainer|\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher|SpContainer|SpgrContainer\n    {\n        $this->data = $data;\n\n        // total byte size of Excel data (workbook global substream + sheet substreams)\n        $this->dataSize = strlen($this->data);\n\n        $this->pos = 0;\n\n        // Parse Escher stream\n        while ($this->pos < $this->dataSize) {\n            // offset: 2; size: 2: Record Type\n            $fbt = Xls::getUInt2d($this->data, $this->pos + 2);\n            $routine = self::WHICH_ROUTINE[$fbt] ?? 'readDefault';\n            if (method_exists($this, $routine)) {\n                $this->$routine();\n            }\n        }\n\n        return $this->object;\n    }\n\n    /**\n     * Read a generic record.\n     */\n    private function readDefault(): void\n    {\n        // offset 0; size: 2; recVer and recInstance\n        //$verInstance = Xls::getUInt2d($this->data, $this->pos);\n\n        // offset: 2; size: 2: Record Type\n        //$fbt = Xls::getUInt2d($this->data, $this->pos + 2);\n\n        // bit: 0-3; mask: 0x000F; recVer\n        //$recVer = (0x000F & $verInstance) >> 0;\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read DggContainer record (Drawing Group Container).\n     */\n    private function readDggContainer(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        // record is a container, read contents\n        $dggContainer = new DggContainer();\n        $this->applyAttribute('setDggContainer', $dggContainer);\n        $reader = new self($dggContainer);\n        $reader->load($recordData);\n    }\n\n    /**\n     * Read Dgg record (Drawing Group).\n     */\n    private function readDgg(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read BstoreContainer record (Blip Store Container).\n     */\n    private function readBstoreContainer(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        // record is a container, read contents\n        $bstoreContainer = new BstoreContainer();\n        $this->applyAttribute('setBstoreContainer', $bstoreContainer);\n        $reader = new self($bstoreContainer);\n        $reader->load($recordData);\n    }\n\n    /**\n     * Read BSE record.\n     */\n    private function readBSE(): void\n    {\n        // offset: 0; size: 2; recVer and recInstance\n\n        // bit: 4-15; mask: 0xFFF0; recInstance\n        $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        // add BSE to BstoreContainer\n        $BSE = new BSE();\n        $this->applyAttribute('addBSE', $BSE);\n\n        $BSE->setBLIPType($recInstance);\n\n        // offset: 0; size: 1; btWin32 (MSOBLIPTYPE)\n        //$btWin32 = ord($recordData[0]);\n\n        // offset: 1; size: 1; btWin32 (MSOBLIPTYPE)\n        //$btMacOS = ord($recordData[1]);\n\n        // offset: 2; size: 16; MD4 digest\n        //$rgbUid = substr($recordData, 2, 16);\n\n        // offset: 18; size: 2; tag\n        //$tag = Xls::getUInt2d($recordData, 18);\n\n        // offset: 20; size: 4; size of BLIP in bytes\n        //$size = Xls::getInt4d($recordData, 20);\n\n        // offset: 24; size: 4; number of references to this BLIP\n        //$cRef = Xls::getInt4d($recordData, 24);\n\n        // offset: 28; size: 4; MSOFO file offset\n        //$foDelay = Xls::getInt4d($recordData, 28);\n\n        // offset: 32; size: 1; unused1\n        //$unused1 = ord($recordData[32]);\n\n        // offset: 33; size: 1; size of nameData in bytes (including null terminator)\n        $cbName = ord($recordData[33]);\n\n        // offset: 34; size: 1; unused2\n        //$unused2 = ord($recordData[34]);\n\n        // offset: 35; size: 1; unused3\n        //$unused3 = ord($recordData[35]);\n\n        // offset: 36; size: $cbName; nameData\n        //$nameData = substr($recordData, 36, $cbName);\n\n        // offset: 36 + $cbName, size: var; the BLIP data\n        $blipData = substr($recordData, 36 + $cbName);\n\n        // record is a container, read contents\n        $reader = new self($BSE);\n        $reader->load($blipData);\n    }\n\n    /**\n     * Read BlipJPEG record. Holds raw JPEG image data.\n     */\n    private function readBlipJPEG(): void\n    {\n        // offset: 0; size: 2; recVer and recInstance\n\n        // bit: 4-15; mask: 0xFFF0; recInstance\n        $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        $pos = 0;\n\n        // offset: 0; size: 16; rgbUid1 (MD4 digest of)\n        //$rgbUid1 = substr($recordData, 0, 16);\n        $pos += 16;\n\n        // offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3\n        if (in_array($recInstance, [0x046B, 0x06E3])) {\n            //$rgbUid2 = substr($recordData, 16, 16);\n            $pos += 16;\n        }\n\n        // offset: var; size: 1; tag\n        //$tag = ord($recordData[$pos]);\n        ++$pos;\n\n        // offset: var; size: var; the raw image data\n        $data = substr($recordData, $pos);\n\n        $blip = new Blip();\n        $blip->setData($data);\n\n        $this->applyAttribute('setBlip', $blip);\n    }\n\n    /**\n     * Read BlipPNG record. Holds raw PNG image data.\n     */\n    private function readBlipPNG(): void\n    {\n        // offset: 0; size: 2; recVer and recInstance\n\n        // bit: 4-15; mask: 0xFFF0; recInstance\n        $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        $pos = 0;\n\n        // offset: 0; size: 16; rgbUid1 (MD4 digest of)\n        //$rgbUid1 = substr($recordData, 0, 16);\n        $pos += 16;\n\n        // offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3\n        if ($recInstance == 0x06E1) {\n            //$rgbUid2 = substr($recordData, 16, 16);\n            $pos += 16;\n        }\n\n        // offset: var; size: 1; tag\n        //$tag = ord($recordData[$pos]);\n        ++$pos;\n\n        // offset: var; size: var; the raw image data\n        $data = substr($recordData, $pos);\n\n        $blip = new Blip();\n        $blip->setData($data);\n\n        $this->applyAttribute('setBlip', $blip);\n    }\n\n    /**\n     * Read OPT record. This record may occur within DggContainer record or SpContainer.\n     */\n    private function readOPT(): void\n    {\n        // offset: 0; size: 2; recVer and recInstance\n\n        // bit: 4-15; mask: 0xFFF0; recInstance\n        $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        $this->readOfficeArtRGFOPTE($recordData, $recInstance);\n    }\n\n    /**\n     * Read TertiaryOPT record.\n     */\n    private function readTertiaryOPT(): void\n    {\n        // offset: 0; size: 2; recVer and recInstance\n\n        // bit: 4-15; mask: 0xFFF0; recInstance\n        //$recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read SplitMenuColors record.\n     */\n    private function readSplitMenuColors(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read DgContainer record (Drawing Container).\n     */\n    private function readDgContainer(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        // record is a container, read contents\n        $dgContainer = new DgContainer();\n        $this->applyAttribute('setDgContainer', $dgContainer);\n        $reader = new self($dgContainer);\n        $reader->load($recordData);\n    }\n\n    /**\n     * Read Dg record (Drawing).\n     */\n    private function readDg(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read SpgrContainer record (Shape Group Container).\n     */\n    private function readSpgrContainer(): void\n    {\n        // context is either context DgContainer or SpgrContainer\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        // record is a container, read contents\n        $spgrContainer = new SpgrContainer();\n\n        if ($this->object instanceof DgContainer) {\n            // DgContainer\n            $this->object->setSpgrContainer($spgrContainer);\n        } elseif ($this->object instanceof SpgrContainer) {\n            // SpgrContainer\n            $this->object->addChild($spgrContainer);\n        }\n\n        $reader = new self($spgrContainer);\n        $reader->load($recordData);\n    }\n\n    /**\n     * Read SpContainer record (Shape Container).\n     */\n    private function readSpContainer(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // add spContainer to spgrContainer\n        $spContainer = new SpContainer();\n        $this->applyAttribute('addChild', $spContainer);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        // record is a container, read contents\n        $reader = new self($spContainer);\n        $reader->load($recordData);\n    }\n\n    /**\n     * Read Spgr record (Shape Group).\n     */\n    private function readSpgr(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read Sp record (Shape).\n     */\n    private function readSp(): void\n    {\n        // offset: 0; size: 2; recVer and recInstance\n\n        // bit: 4-15; mask: 0xFFF0; recInstance\n        //$recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read ClientTextbox record.\n     */\n    private function readClientTextbox(): void\n    {\n        // offset: 0; size: 2; recVer and recInstance\n\n        // bit: 4-15; mask: 0xFFF0; recInstance\n        //$recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;\n\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read ClientAnchor record. This record holds information about where the shape is anchored in worksheet.\n     */\n    private function readClientAnchor(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        $recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n\n        // offset: 2; size: 2; upper-left corner column index (0-based)\n        $c1 = Xls::getUInt2d($recordData, 2);\n\n        // offset: 4; size: 2; upper-left corner horizontal offset in 1/1024 of column width\n        $startOffsetX = Xls::getUInt2d($recordData, 4);\n\n        // offset: 6; size: 2; upper-left corner row index (0-based)\n        $r1 = Xls::getUInt2d($recordData, 6);\n\n        // offset: 8; size: 2; upper-left corner vertical offset in 1/256 of row height\n        $startOffsetY = Xls::getUInt2d($recordData, 8);\n\n        // offset: 10; size: 2; bottom-right corner column index (0-based)\n        $c2 = Xls::getUInt2d($recordData, 10);\n\n        // offset: 12; size: 2; bottom-right corner horizontal offset in 1/1024 of column width\n        $endOffsetX = Xls::getUInt2d($recordData, 12);\n\n        // offset: 14; size: 2; bottom-right corner row index (0-based)\n        $r2 = Xls::getUInt2d($recordData, 14);\n\n        // offset: 16; size: 2; bottom-right corner vertical offset in 1/256 of row height\n        $endOffsetY = Xls::getUInt2d($recordData, 16);\n\n        $this->applyAttribute('setStartCoordinates', Coordinate::stringFromColumnIndex($c1 + 1) . ($r1 + 1));\n        $this->applyAttribute('setStartOffsetX', $startOffsetX);\n        $this->applyAttribute('setStartOffsetY', $startOffsetY);\n        $this->applyAttribute('setEndCoordinates', Coordinate::stringFromColumnIndex($c2 + 1) . ($r2 + 1));\n        $this->applyAttribute('setEndOffsetX', $endOffsetX);\n        $this->applyAttribute('setEndOffsetY', $endOffsetY);\n    }\n\n    private function applyAttribute(string $name, mixed $value): void\n    {\n        if (method_exists($this->object, $name)) {\n            $this->object->$name($value);\n        }\n    }\n\n    /**\n     * Read ClientData record.\n     */\n    private function readClientData(): void\n    {\n        $length = Xls::getInt4d($this->data, $this->pos + 4);\n        //$recordData = substr($this->data, $this->pos + 8, $length);\n\n        // move stream pointer to next record\n        $this->pos += 8 + $length;\n    }\n\n    /**\n     * Read OfficeArtRGFOPTE table of property-value pairs.\n     *\n     * @param string $data Binary data\n     * @param int $n Number of properties\n     */\n    private function readOfficeArtRGFOPTE(string $data, int $n): void\n    {\n        $splicedComplexData = substr($data, 6 * $n);\n\n        // loop through property-value pairs\n        for ($i = 0; $i < $n; ++$i) {\n            // read 6 bytes at a time\n            $fopte = substr($data, 6 * $i, 6);\n\n            // offset: 0; size: 2; opid\n            $opid = Xls::getUInt2d($fopte, 0);\n\n            // bit: 0-13; mask: 0x3FFF; opid.opid\n            $opidOpid = (0x3FFF & $opid) >> 0;\n\n            // bit: 14; mask 0x4000; 1 = value in op field is BLIP identifier\n            //$opidFBid = (0x4000 & $opid) >> 14;\n\n            // bit: 15; mask 0x8000; 1 = this is a complex property, op field specifies size of complex data\n            $opidFComplex = (0x8000 & $opid) >> 15;\n\n            // offset: 2; size: 4; the value for this property\n            $op = Xls::getInt4d($fopte, 2);\n\n            if ($opidFComplex) {\n                $complexData = substr($splicedComplexData, 0, $op);\n                $splicedComplexData = substr($splicedComplexData, $op);\n\n                // we store string value with complex data\n                $value = $complexData;\n            } else {\n                // we store integer value\n                $value = $op;\n            }\n\n            if (method_exists($this->object, 'setOPT')) {\n                $this->object->setOPT($opidOpid, $value);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/ListFunctions.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass ListFunctions extends Xls\n{\n    /**\n     * Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object.\n     *\n     * @return string[]\n     */\n    protected function listWorksheetNames2(string $filename, Xls $xls): array\n    {\n        File::assertFile($filename);\n\n        $worksheetNames = [];\n\n        // Read the OLE file\n        $xls->loadOLE($filename);\n\n        // total byte size of Excel data (workbook global substream + sheet substreams)\n        $xls->dataSize = strlen($xls->data);\n\n        $xls->pos = 0;\n        $xls->sheets = [];\n\n        // Parse Workbook Global Substream\n        while ($xls->pos < $xls->dataSize) {\n            $code = self::getUInt2d($xls->data, $xls->pos);\n\n            match ($code) {\n                self::XLS_TYPE_BOF => $xls->readBof(),\n                self::XLS_TYPE_SHEET => $xls->readSheet(),\n                self::XLS_TYPE_EOF => $xls->readDefault(),\n                self::XLS_TYPE_CODEPAGE => $xls->readCodepage(),\n                default => $xls->readDefault(),\n            };\n\n            if ($code === self::XLS_TYPE_EOF) {\n                break;\n            }\n        }\n\n        foreach ($xls->sheets as $sheet) {\n            if ($sheet['sheetType'] === 0x00) {\n                // 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module\n                $worksheetNames[] = $sheet['name'];\n            }\n        }\n\n        return $worksheetNames;\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    protected function listWorksheetInfo2(string $filename, Xls $xls): array\n    {\n        File::assertFile($filename);\n\n        $worksheetInfo = [];\n\n        // Read the OLE file\n        $xls->loadOLE($filename);\n\n        // total byte size of Excel data (workbook global substream + sheet substreams)\n        $xls->dataSize = strlen($xls->data);\n\n        // initialize\n        $xls->pos = 0;\n        $xls->sheets = [];\n\n        // Parse Workbook Global Substream\n        while ($xls->pos < $xls->dataSize) {\n            $code = self::getUInt2d($xls->data, $xls->pos);\n\n            match ($code) {\n                self::XLS_TYPE_BOF => $xls->readBof(),\n                self::XLS_TYPE_SHEET => $xls->readSheet(),\n                self::XLS_TYPE_EOF => $xls->readDefault(),\n                self::XLS_TYPE_CODEPAGE => $xls->readCodepage(),\n                default => $xls->readDefault(),\n            };\n\n            if ($code === self::XLS_TYPE_EOF) {\n                break;\n            }\n        }\n\n        // Parse the individual sheets\n        foreach ($xls->sheets as $sheet) {\n            if ($sheet['sheetType'] !== 0x00) {\n                // 0x00: Worksheet\n                // 0x02: Chart\n                // 0x06: Visual Basic module\n                continue;\n            }\n\n            $tmpInfo = [];\n            $tmpInfo['worksheetName'] = StringHelper::convertToString($sheet['name']);\n            $tmpInfo['lastColumnLetter'] = 'A';\n            $tmpInfo['lastColumnIndex'] = 0;\n            $tmpInfo['totalRows'] = 0;\n            $tmpInfo['totalColumns'] = 0;\n            $tmpInfo['sheetState'] = StringHelper::convertToString($sheet['sheetState']);\n\n            $xls->pos = $sheet['offset'];\n\n            while ($xls->pos <= $xls->dataSize - 4) {\n                $code = self::getUInt2d($xls->data, $xls->pos);\n\n                switch ($code) {\n                    case self::XLS_TYPE_RK:\n                    case self::XLS_TYPE_LABELSST:\n                    case self::XLS_TYPE_NUMBER:\n                    case self::XLS_TYPE_FORMULA:\n                    case self::XLS_TYPE_BOOLERR:\n                    case self::XLS_TYPE_LABEL:\n                    case self::XLS_TYPE_MULRK:\n                        $length = self::getUInt2d($xls->data, $xls->pos + 2);\n                        $recordData = $xls->readRecordData($xls->data, $xls->pos + 4, $length);\n\n                        // move stream pointer to next record\n                        $xls->pos += 4 + $length;\n\n                        $rowIndex = self::getUInt2d($recordData, 0) + 1;\n                        if ($code === self::XLS_TYPE_MULRK) {\n                            $columnIndex = self::getUInt2d($recordData, $length - 2);\n                        } else {\n                            $columnIndex = self::getUInt2d($recordData, 2);\n                        }\n\n                        $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex);\n                        $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex);\n\n                        break;\n                    case self::XLS_TYPE_BOF:\n                        $xls->readBof();\n\n                        break;\n                    case self::XLS_TYPE_EOF:\n                        $xls->readDefault();\n\n                        break 2;\n                    default:\n                        $xls->readDefault();\n\n                        break;\n                }\n            }\n\n            $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1, true);\n            $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1;\n\n            $worksheetInfo[] = $tmpInfo;\n        }\n\n        return $worksheetInfo;\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, dimensionsMinR: int, dimensionsMinC: int, dimensionsMaxR: int, dimensionsMaxC: int, lastColumnLetter: string}>\n     */\n    protected function listWorksheetDimensions2(string $filename, Xls $xls): array\n    {\n        File::assertFile($filename);\n\n        $worksheetInfo = [];\n\n        // Read the OLE file\n        $xls->loadOLE($filename);\n\n        // total byte size of Excel data (workbook global substream + sheet substreams)\n        $xls->dataSize = strlen($xls->data);\n\n        // initialize\n        $xls->pos = 0;\n        $xls->sheets = [];\n\n        // Parse Workbook Global Substream\n        while ($xls->pos < $xls->dataSize) {\n            $code = self::getUInt2d($xls->data, $xls->pos);\n\n            match ($code) {\n                self::XLS_TYPE_BOF => $xls->readBof(),\n                self::XLS_TYPE_SHEET => $xls->readSheet(),\n                self::XLS_TYPE_EOF => $xls->readDefault(),\n                self::XLS_TYPE_CODEPAGE => $xls->readCodepage(),\n                default => $xls->readDefault(),\n            };\n\n            if ($code === self::XLS_TYPE_EOF) {\n                break;\n            }\n        }\n\n        // Parse the individual sheets\n        foreach ($xls->sheets as $sheet) {\n            if ($sheet['sheetType'] !== 0x00) {\n                // 0x00: Worksheet\n                // 0x02: Chart\n                // 0x06: Visual Basic module\n                continue;\n            }\n\n            $tmpInfo = [];\n            $tmpInfo['worksheetName'] = StringHelper::convertToString($sheet['name']);\n            $tmpInfo['dimensionsMinR'] = -1;\n            $tmpInfo['dimensionsMaxR'] = -1;\n            $tmpInfo['dimensionsMinC'] = -1;\n            $tmpInfo['dimensionsMaxC'] = -1;\n            $tmpInfo['lastColumnLetter'] = '';\n\n            $xls->pos = $sheet['offset'];\n\n            while ($xls->pos <= $xls->dataSize - 4) {\n                $code = self::getUInt2d($xls->data, $xls->pos);\n\n                switch ($code) {\n                    case self::XLS_TYPE_BOF:\n                        $xls->readBof();\n\n                        break;\n                    case self::XLS_TYPE_EOF:\n                        $xls->readDefault();\n\n                        break 2;\n                    case self::XLS_TYPE_DIMENSION:\n                        $length = self::getUInt2d($xls->data, $xls->pos + 2);\n                        if ($length === 14) {\n                            $dimensionsData = substr($xls->data, $xls->pos + 4, $length);\n                            $data = unpack('VrwMic/VrwMac/vcolMic/vcolMac/vreserved', $dimensionsData);\n                            if (is_array($data)) {\n                                /** @var int[] $data */\n                                $tmpInfo['dimensionsMinR'] = $data['rwMic'];\n                                $tmpInfo['dimensionsMaxR'] = $data['rwMac'];\n                                $tmpInfo['dimensionsMinC'] = $data['colMic'];\n                                $tmpInfo['dimensionsMaxC'] = $data['colMac'];\n                                $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['dimensionsMaxC'], true);\n                            }\n                        }\n                        $xls->readDefault();\n\n                        break;\n                    default:\n                        $xls->readDefault();\n\n                        break;\n                }\n            }\n\n            $worksheetInfo[] = $tmpInfo;\n        }\n\n        return $worksheetInfo;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\CodePage;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher as SharedEscher;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer\\SpContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Xls as SharedXls;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass LoadSpreadsheet extends Xls\n{\n    /**\n     * Loads PhpSpreadsheet from file.\n     */\n    protected function loadSpreadsheetFromFile2(string $filename, Xls $xls): Spreadsheet\n    {\n        // Read the OLE file\n        $xls->loadOLE($filename);\n\n        // Initialisations\n        $xls->spreadsheet = $this->newSpreadsheet();\n        $xls->spreadsheet->setValueBinder($xls->valueBinder);\n        $xls->spreadsheet->removeSheetByIndex(0); // remove 1st sheet\n        if (!$xls->readDataOnly) {\n            $xls->spreadsheet->removeCellStyleXfByIndex(0); // remove the default style\n            $xls->spreadsheet->removeCellXfByIndex(0); // remove the default style\n        }\n\n        // Read the summary information stream (containing metadata)\n        $xls->readSummaryInformation();\n\n        // Read the Additional document summary information stream (containing application-specific metadata)\n        $xls->readDocumentSummaryInformation();\n\n        // total byte size of Excel data (workbook global substream + sheet substreams)\n        $xls->dataSize = strlen($xls->data);\n\n        // initialize\n        $xls->pos = 0;\n        $xls->codepage = $xls->codepage ?: CodePage::DEFAULT_CODE_PAGE;\n        $xls->formats = [];\n        $xls->objFonts = [];\n        $xls->palette = [];\n        $xls->sheets = [];\n        $xls->externalBooks = [];\n        $xls->ref = [];\n        $xls->definedname = []; //* @phpstan-ignore-line\n        $xls->sst = [];\n        $xls->drawingGroupData = '';\n        $xls->xfIndex = 0;\n        $xls->mapCellXfIndex = [];\n        $xls->mapCellStyleXfIndex = [];\n\n        // Parse Workbook Global Substream\n        while ($xls->pos < $xls->dataSize) {\n            $code = self::getUInt2d($xls->data, $xls->pos);\n\n            match ($code) {\n                self::XLS_TYPE_BOF => $xls->readBof(),\n                self::XLS_TYPE_FILEPASS => $xls->readFilepass(),\n                self::XLS_TYPE_CODEPAGE => $xls->readCodepage(),\n                self::XLS_TYPE_DATEMODE => $xls->readDateMode(),\n                self::XLS_TYPE_FONT => $xls->readFont(),\n                self::XLS_TYPE_FORMAT => $xls->readFormat(),\n                self::XLS_TYPE_XF => $xls->readXf(),\n                self::XLS_TYPE_XFEXT => $xls->readXfExt(),\n                self::XLS_TYPE_STYLE => $xls->readStyle(),\n                self::XLS_TYPE_PALETTE => $xls->readPalette(),\n                self::XLS_TYPE_SHEET => $xls->readSheet(),\n                self::XLS_TYPE_EXTERNALBOOK => $xls->readExternalBook(),\n                self::XLS_TYPE_EXTERNNAME => $xls->readExternName(),\n                self::XLS_TYPE_EXTERNSHEET => $xls->readExternSheet(),\n                self::XLS_TYPE_DEFINEDNAME => $xls->readDefinedName(),\n                self::XLS_TYPE_MSODRAWINGGROUP => $xls->readMsoDrawingGroup(),\n                self::XLS_TYPE_SST => $xls->readSst(),\n                self::XLS_TYPE_EOF => $xls->readDefault(),\n                default => $xls->readDefault(),\n            };\n\n            if ($code === self::XLS_TYPE_EOF) {\n                break;\n            }\n        }\n\n        // Resolve indexed colors for font, fill, and border colors\n        // Cannot be resolved already in XF record, because PALETTE record comes afterwards\n        if (!$xls->readDataOnly) {\n            foreach ($xls->objFonts as $objFont) {\n                if (isset($objFont->colorIndex)) {\n                    $color = Color::map($objFont->colorIndex, $xls->palette, $xls->version);\n                    $objFont->getColor()->setRGB($color['rgb']);\n                }\n            }\n\n            foreach ($xls->spreadsheet->getCellXfCollection() as $objStyle) {\n                // fill start and end color\n                $fill = $objStyle->getFill();\n\n                if (isset($fill->startcolorIndex)) {\n                    $startColor = Color::map($fill->startcolorIndex, $xls->palette, $xls->version);\n                    $fill->getStartColor()->setRGB($startColor['rgb']);\n                }\n                if (isset($fill->endcolorIndex)) {\n                    $endColor = Color::map($fill->endcolorIndex, $xls->palette, $xls->version);\n                    $fill->getEndColor()->setRGB($endColor['rgb']);\n                }\n\n                // border colors\n                $top = $objStyle->getBorders()->getTop();\n                $right = $objStyle->getBorders()->getRight();\n                $bottom = $objStyle->getBorders()->getBottom();\n                $left = $objStyle->getBorders()->getLeft();\n                $diagonal = $objStyle->getBorders()->getDiagonal();\n\n                if (isset($top->colorIndex)) {\n                    $borderTopColor = Color::map($top->colorIndex, $xls->palette, $xls->version);\n                    $top->getColor()->setRGB($borderTopColor['rgb']);\n                }\n                if (isset($right->colorIndex)) {\n                    $borderRightColor = Color::map($right->colorIndex, $xls->palette, $xls->version);\n                    $right->getColor()->setRGB($borderRightColor['rgb']);\n                }\n                if (isset($bottom->colorIndex)) {\n                    $borderBottomColor = Color::map($bottom->colorIndex, $xls->palette, $xls->version);\n                    $bottom->getColor()->setRGB($borderBottomColor['rgb']);\n                }\n                if (isset($left->colorIndex)) {\n                    $borderLeftColor = Color::map($left->colorIndex, $xls->palette, $xls->version);\n                    $left->getColor()->setRGB($borderLeftColor['rgb']);\n                }\n                if (isset($diagonal->colorIndex)) {\n                    $borderDiagonalColor = Color::map($diagonal->colorIndex, $xls->palette, $xls->version);\n                    $diagonal->getColor()->setRGB($borderDiagonalColor['rgb']);\n                }\n            }\n        }\n\n        // treat MSODRAWINGGROUP records, workbook-level Escher\n        $escherWorkbook = null;\n        if (!$xls->readDataOnly && $xls->drawingGroupData) {\n            $escher = new SharedEscher();\n            $reader = new Escher($escher);\n            $escherWorkbook = $reader->load($xls->drawingGroupData);\n        }\n\n        // Parse the individual sheets\n        $xls->activeSheetSet = false;\n        $sheetCreated = false;\n        foreach ($xls->sheets as $sheet) {\n            $selectedCells = '';\n            if ($sheet['sheetType'] != 0x00) {\n                // 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module\n                continue;\n            }\n\n            // check if sheet should be skipped\n            if (isset($xls->loadSheetsOnly) && !in_array($sheet['name'], $xls->loadSheetsOnly)) {\n                continue;\n            }\n\n            // add sheet to PhpSpreadsheet object\n            $xls->phpSheet = $xls->spreadsheet->createSheet();\n            $sheetCreated = true;\n            //    Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula\n            //        cells... during the load, all formulae should be correct, and we're simply bringing the worksheet\n            //        name in line with the formula, not the reverse\n            $xls->phpSheet->setTitle($sheet['name'], false, false);\n            $xls->phpSheet->setSheetState($sheet['sheetState']);\n\n            $xls->pos = $sheet['offset'];\n\n            // Initialize isFitToPages. May change after reading SHEETPR record.\n            $xls->isFitToPages = false;\n\n            // Initialize drawingData\n            $xls->drawingData = '';\n\n            // Initialize objs\n            $xls->objs = [];\n\n            // Initialize shared formula parts\n            $xls->sharedFormulaParts = [];\n\n            // Initialize shared formulas\n            $xls->sharedFormulas = [];\n\n            // Initialize text objs\n            $xls->textObjects = [];\n\n            // Initialize cell annotations\n            $xls->cellNotes = [];\n            $xls->textObjRef = -1;\n\n            while ($xls->pos <= $xls->dataSize - 4) {\n                $code = self::getUInt2d($xls->data, $xls->pos);\n\n                switch ($code) {\n                    case self::XLS_TYPE_BOF:\n                        $xls->readBof();\n\n                        break;\n                    case self::XLS_TYPE_PRINTGRIDLINES:\n                        $xls->readPrintGridlines();\n\n                        break;\n                    case self::XLS_TYPE_DEFAULTROWHEIGHT:\n                        $xls->readDefaultRowHeight();\n\n                        break;\n                    case self::XLS_TYPE_SHEETPR:\n                        $xls->readSheetPr();\n\n                        break;\n                    case self::XLS_TYPE_HORIZONTALPAGEBREAKS:\n                        $xls->readHorizontalPageBreaks();\n\n                        break;\n                    case self::XLS_TYPE_VERTICALPAGEBREAKS:\n                        $xls->readVerticalPageBreaks();\n\n                        break;\n                    case self::XLS_TYPE_HEADER:\n                        $xls->readHeader();\n\n                        break;\n                    case self::XLS_TYPE_FOOTER:\n                        $xls->readFooter();\n\n                        break;\n                    case self::XLS_TYPE_HCENTER:\n                        $xls->readHcenter();\n\n                        break;\n                    case self::XLS_TYPE_VCENTER:\n                        $xls->readVcenter();\n\n                        break;\n                    case self::XLS_TYPE_LEFTMARGIN:\n                        $xls->readLeftMargin();\n\n                        break;\n                    case self::XLS_TYPE_RIGHTMARGIN:\n                        $xls->readRightMargin();\n\n                        break;\n                    case self::XLS_TYPE_TOPMARGIN:\n                        $xls->readTopMargin();\n\n                        break;\n                    case self::XLS_TYPE_BOTTOMMARGIN:\n                        $xls->readBottomMargin();\n\n                        break;\n                    case self::XLS_TYPE_PAGESETUP:\n                        $xls->readPageSetup();\n\n                        break;\n                    case self::XLS_TYPE_PROTECT:\n                        $xls->readProtect();\n\n                        break;\n                    case self::XLS_TYPE_SCENPROTECT:\n                        $xls->readScenProtect();\n\n                        break;\n                    case self::XLS_TYPE_OBJECTPROTECT:\n                        $xls->readObjectProtect();\n\n                        break;\n                    case self::XLS_TYPE_PASSWORD:\n                        $xls->readPassword();\n\n                        break;\n                    case self::XLS_TYPE_DEFCOLWIDTH:\n                        $xls->readDefColWidth();\n\n                        break;\n                    case self::XLS_TYPE_COLINFO:\n                        $xls->readColInfo();\n\n                        break;\n                    case self::XLS_TYPE_DIMENSION:\n                        $xls->readDefault();\n\n                        break;\n                    case self::XLS_TYPE_ROW:\n                        $xls->readRow();\n\n                        break;\n                    case self::XLS_TYPE_DBCELL:\n                        $xls->readDefault();\n\n                        break;\n                    case self::XLS_TYPE_RK:\n                        $xls->readRk();\n\n                        break;\n                    case self::XLS_TYPE_LABELSST:\n                        $xls->readLabelSst();\n\n                        break;\n                    case self::XLS_TYPE_MULRK:\n                        $xls->readMulRk();\n\n                        break;\n                    case self::XLS_TYPE_NUMBER:\n                        $xls->readNumber();\n\n                        break;\n                    case self::XLS_TYPE_FORMULA:\n                        $xls->readFormula();\n\n                        break;\n                    case self::XLS_TYPE_SHAREDFMLA:\n                        $xls->readSharedFmla();\n\n                        break;\n                    case self::XLS_TYPE_BOOLERR:\n                        $xls->readBoolErr();\n\n                        break;\n                    case self::XLS_TYPE_MULBLANK:\n                        $xls->readMulBlank();\n\n                        break;\n                    case self::XLS_TYPE_LABEL:\n                        $xls->readLabel();\n\n                        break;\n                    case self::XLS_TYPE_BLANK:\n                        $xls->readBlank();\n\n                        break;\n                    case self::XLS_TYPE_MSODRAWING:\n                        $xls->readMsoDrawing();\n\n                        break;\n                    case self::XLS_TYPE_OBJ:\n                        $xls->readObj();\n\n                        break;\n                    case self::XLS_TYPE_WINDOW2:\n                        $xls->readWindow2();\n\n                        break;\n                    case self::XLS_TYPE_PAGELAYOUTVIEW:\n                        $xls->readPageLayoutView();\n\n                        break;\n                    case self::XLS_TYPE_SCL:\n                        $xls->readScl();\n\n                        break;\n                    case self::XLS_TYPE_PANE:\n                        $xls->readPane();\n\n                        break;\n                    case self::XLS_TYPE_SELECTION:\n                        $selectedCells = $xls->readSelection();\n\n                        break;\n                    case self::XLS_TYPE_MERGEDCELLS:\n                        $xls->readMergedCells();\n\n                        break;\n                    case self::XLS_TYPE_HYPERLINK:\n                        $xls->readHyperLink();\n\n                        break;\n                    case self::XLS_TYPE_DATAVALIDATIONS:\n                        $xls->readDataValidations();\n\n                        break;\n                    case self::XLS_TYPE_DATAVALIDATION:\n                        $xls->readDataValidation();\n\n                        break;\n                    case self::XLS_TYPE_CFHEADER:\n                        /** @var string[] */\n                        $cellRangeAddresses = $xls->readCFHeader();\n\n                        break;\n                    case self::XLS_TYPE_CFRULE:\n                        $xls->readCFRule($cellRangeAddresses ?? []);\n\n                        break;\n                    case self::XLS_TYPE_SHEETLAYOUT:\n                        $xls->readSheetLayout();\n\n                        break;\n                    case self::XLS_TYPE_SHEETPROTECTION:\n                        $xls->readSheetProtection();\n\n                        break;\n                    case self::XLS_TYPE_RANGEPROTECTION:\n                        $xls->readRangeProtection();\n\n                        break;\n                    case self::XLS_TYPE_NOTE:\n                        $xls->readNote();\n\n                        break;\n                    case self::XLS_TYPE_TXO:\n                        $xls->readTextObject();\n\n                        break;\n                    case self::XLS_TYPE_CONTINUE:\n                        $xls->readContinue();\n\n                        break;\n                    case self::XLS_TYPE_EOF:\n                        $xls->readDefault();\n\n                        break 2;\n                    default:\n                        $xls->readDefault();\n\n                        break;\n                }\n            }\n\n            // treat MSODRAWING records, sheet-level Escher\n            if (!$xls->readDataOnly && $xls->drawingData) {\n                $escherWorksheet = new SharedEscher();\n                $reader = new Escher($escherWorksheet);\n                $escherWorksheet = $reader->load($xls->drawingData);\n\n                // get all spContainers in one long array, so they can be mapped to OBJ records\n                /** @var SpContainer[] $allSpContainers */\n                $allSpContainers = $escherWorksheet->getDgContainerOrThrow()->getSpgrContainerOrThrow()->getAllSpContainers();\n            }\n\n            // treat OBJ records\n            foreach ($xls->objs as $n => $obj) {\n                // the first shape container never has a corresponding OBJ record, hence $n + 1\n                if (isset($allSpContainers[$n + 1])) {\n                    $spContainer = $allSpContainers[$n + 1];\n\n                    // we skip all spContainers that are a part of a group shape since we cannot yet handle those\n                    if ($spContainer->getNestingLevel() > 1) {\n                        continue;\n                    }\n\n                    // calculate the width and height of the shape\n                    /** @var int $startRow */\n                    [$startColumn, $startRow] = Coordinate::coordinateFromString($spContainer->getStartCoordinates());\n                    /** @var int $endRow */\n                    [$endColumn, $endRow] = Coordinate::coordinateFromString($spContainer->getEndCoordinates());\n\n                    $startOffsetX = $spContainer->getStartOffsetX();\n                    $startOffsetY = $spContainer->getStartOffsetY();\n                    $endOffsetX = $spContainer->getEndOffsetX();\n                    $endOffsetY = $spContainer->getEndOffsetY();\n\n                    $width = SharedXls::getDistanceX($xls->phpSheet, $startColumn, $startOffsetX, $endColumn, $endOffsetX);\n                    $height = SharedXls::getDistanceY($xls->phpSheet, $startRow, $startOffsetY, $endRow, $endOffsetY);\n\n                    // calculate offsetX and offsetY of the shape\n                    $offsetX = (int) ($startOffsetX * SharedXls::sizeCol($xls->phpSheet, $startColumn) / 1024);\n                    $offsetY = (int) ($startOffsetY * SharedXls::sizeRow($xls->phpSheet, $startRow) / 256);\n\n                    /** @var int[] $obj */\n                    switch ($obj['otObjType']) {\n                        case 0x19:\n                            // Note\n                            if (isset($xls->cellNotes[$obj['idObjID']])) {\n                                //$cellNote = $xls->cellNotes[$obj['idObjID']];\n\n                                if (isset($xls->textObjects[$obj['idObjID']])) {\n                                    $textObject = $xls->textObjects[$obj['idObjID']];\n                                    $xls->cellNotes[$obj['idObjID']]['objTextData'] = $textObject; //* @phpstan-ignore-line\n                                }\n                            }\n\n                            break;\n                        case 0x08:\n                            // picture\n                            // get index to BSE entry (1-based)\n                            /** @var int */\n                            $BSEindex = $spContainer->getOPT(0x0104);\n\n                            // If there is no BSE Index, we will fail here and other fields are not read.\n                            // Fix by checking here.\n                            // TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field?\n                            // More likely: an incompatible picture\n                            if (!$BSEindex) {\n                                continue 2;\n                            }\n\n                            if ($escherWorkbook) {\n                                /** @var BSE[] */\n                                $BSECollection = $escherWorkbook->getDggContainerOrThrow()->getBstoreContainerOrThrow()->getBSECollection();\n                                $BSE = $BSECollection[$BSEindex - 1];\n                                $blipType = $BSE->getBlipType();\n\n                                // need check because some blip types are not supported by Escher reader such as EMF\n                                if ($blip = $BSE->getBlip()) {\n                                    $ih = imagecreatefromstring($blip->getData());\n                                    if ($ih !== false) {\n                                        $drawing = new MemoryDrawing();\n                                        $drawing->setImageResource($ih);\n\n                                        // width, height, offsetX, offsetY\n                                        $drawing->setResizeProportional(false);\n                                        $drawing->setWidth($width);\n                                        $drawing->setHeight($height);\n                                        $drawing->setOffsetX($offsetX);\n                                        $drawing->setOffsetY($offsetY);\n\n                                        switch ($blipType) {\n                                            case BSE::BLIPTYPE_JPEG:\n                                                $drawing->setRenderingFunction(MemoryDrawing::RENDERING_JPEG);\n                                                $drawing->setMimeType(MemoryDrawing::MIMETYPE_JPEG);\n\n                                                break;\n                                            case BSE::BLIPTYPE_PNG:\n                                                imagealphablending($ih, false);\n                                                imagesavealpha($ih, true);\n                                                $drawing->setRenderingFunction(MemoryDrawing::RENDERING_PNG);\n                                                $drawing->setMimeType(MemoryDrawing::MIMETYPE_PNG);\n\n                                                break;\n                                        }\n\n                                        $drawing->setWorksheet($xls->phpSheet);\n                                        $drawing->setCoordinates($spContainer->getStartCoordinates());\n                                    }\n                                }\n                            }\n\n                            break;\n                        default:\n                            // other object type\n                            break;\n                    }\n                }\n            }\n\n            // treat SHAREDFMLA records\n            if ($xls->version == self::XLS_BIFF8) {\n                foreach ($xls->sharedFormulaParts as $cell => $baseCell) {\n                    /** @var int $row */\n                    [$column, $row] = Coordinate::coordinateFromString($cell);\n                    /** @var string $baseCell */\n                    if ($xls->getReadFilter()->readCell($column, $row, $xls->phpSheet->getTitle())) {\n                        /** @var string */\n                        $temp = $xls->sharedFormulas[$baseCell];\n                        $formula = $xls->getFormulaFromStructure($temp, $cell);\n                        $xls->phpSheet->getCell($cell)->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA);\n                    }\n                }\n            }\n\n            if (!empty($xls->cellNotes)) {\n                foreach ($xls->cellNotes as $note => $noteDetails) {\n                    /** @var array{author: string, cellRef: string, objTextData?: mixed[]} $noteDetails */\n                    if (!isset($noteDetails['objTextData'])) {\n                        if (isset($xls->textObjects[$note])) {\n                            $textObject = $xls->textObjects[$note];\n                            $noteDetails['objTextData'] = $textObject;\n                        } else {\n                            $noteDetails['objTextData']['text'] = '';\n                        }\n                    }\n                    $cellAddress = str_replace('$', '', $noteDetails['cellRef']);\n                    /** @var string */\n                    $tempDetails = $noteDetails['objTextData']['text'];\n                    $xls->phpSheet\n                        ->getComment($cellAddress)\n                        ->setAuthor($noteDetails['author'])\n                        ->setText(\n                            $xls->parseRichText($tempDetails)\n                        );\n                }\n            }\n            if ($selectedCells !== '') {\n                $xls->phpSheet->setSelectedCells($selectedCells);\n            }\n        }\n        if ($xls->createBlankSheetIfNoneRead && !$sheetCreated) {\n            $xls->spreadsheet->createSheet();\n        }\n        if ($xls->activeSheetSet === false) {\n            $xls->spreadsheet->setActiveSheetIndex(0);\n        }\n\n        // add the named ranges (defined names)\n        foreach ($xls->definedname as $definedName) {\n            /** @var array{isBuiltInName: int, name: string, formula: string, scope: int} $definedName */\n            if ($definedName['isBuiltInName']) {\n                switch ($definedName['name']) {\n                    case pack('C', 0x06):\n                        // print area\n                        //    in general, formula looks like this: Foo!$C$7:$J$66,Bar!$A$1:$IV$2\n                        $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma?\n\n                        $extractedRanges = [];\n                        $sheetName = '';\n                        /** @var non-empty-string $range */\n                        foreach ($ranges as $range) {\n                            // $range should look like one of these\n                            //        Foo!$C$7:$J$66\n                            //        Bar!$A$1:$IV$2\n                            $explodes = Worksheet::extractSheetTitle($range, true, true);\n                            $sheetName = (string) $explodes[0];\n                            if (!str_contains($explodes[1], ':')) {\n                                $explodes[1] = $explodes[1] . ':' . $explodes[1];\n                            }\n                            $extractedRanges[] = str_replace('$', '', $explodes[1]); // C7:J66\n                        }\n                        if ($docSheet = $xls->spreadsheet->getSheetByName($sheetName)) {\n                            $docSheet->getPageSetup()->setPrintArea(implode(',', $extractedRanges)); // C7:J66,A1:IV2\n                        }\n\n                        break;\n                    case pack('C', 0x07):\n                        // print titles (repeating rows)\n                        // Assuming BIFF8, there are 3 cases\n                        // 1. repeating rows\n                        //        formula looks like this: Sheet!$A$1:$IV$2\n                        //        rows 1-2 repeat\n                        // 2. repeating columns\n                        //        formula looks like this: Sheet!$A$1:$B$65536\n                        //        columns A-B repeat\n                        // 3. both repeating rows and repeating columns\n                        //        formula looks like this: Sheet!$A$1:$B$65536,Sheet!$A$1:$IV$2\n                        $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma?\n                        foreach ($ranges as $range) {\n                            // $range should look like this one of these\n                            //        Sheet!$A$1:$B$65536\n                            //        Sheet!$A$1:$IV$2\n                            if (str_contains($range, '!')) {\n                                $explodes = Worksheet::extractSheetTitle($range, true, true);\n                                $docSheet = $xls->spreadsheet->getSheetByName($explodes[0]);\n                                if ($docSheet) {\n                                    $extractedRange = $explodes[1];\n                                    $extractedRange = str_replace('$', '', $extractedRange);\n\n                                    $coordinateStrings = explode(':', $extractedRange);\n                                    if (count($coordinateStrings) == 2) {\n                                        [$firstColumn, $firstRow] = Coordinate::coordinateFromString($coordinateStrings[0]);\n                                        [$lastColumn, $lastRow] = Coordinate::coordinateFromString($coordinateStrings[1]);\n                                        $firstRow = (int) $firstRow;\n                                        $lastRow = (int) $lastRow;\n\n                                        if ($firstColumn == 'A' && $lastColumn == 'IV') {\n                                            // then we have repeating rows\n                                            $docSheet->getPageSetup()->setRowsToRepeatAtTop([$firstRow, $lastRow]);\n                                        } elseif ($firstRow === 1 && $lastRow === AddressRange::MAX_ROW_XLS) {\n                                            // then we have repeating columns\n                                            $docSheet->getPageSetup()->setColumnsToRepeatAtLeft([$firstColumn, $lastColumn]);\n                                        }\n                                    }\n                                }\n                            }\n                        }\n\n                        break;\n                }\n            } else {\n                // Extract range\n                $formula = $definedName['formula'];\n                if (str_contains($formula, '!')) {\n                    $explodes = Worksheet::extractSheetTitle($formula, true, true);\n                    $docSheet = $xls->spreadsheet->getSheetByName($explodes[0]);\n                    if ($docSheet) {\n                        $extractedRange = $explodes[1];\n\n                        $localOnly = ($definedName['scope'] === 0) ? false : true;\n\n                        $scope = ($definedName['scope'] === 0) ? null : $xls->spreadsheet->getSheetByName($xls->sheets[$definedName['scope'] - 1]['name']);\n\n                        $xls->spreadsheet->addNamedRange(new NamedRange((string) $definedName['name'], $docSheet, $extractedRange, $localOnly, $scope));\n                    }\n                }\n                //    Named Value\n                //    TODO Provide support for named values\n            }\n        }\n        $xls->data = '';\n\n        return $xls->spreadsheet;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/MD5.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\n\nclass MD5\n{\n    private int $a;\n\n    private int $b;\n\n    private int $c;\n\n    private int $d;\n\n    private static int $allOneBits;\n\n    /**\n     * MD5 stream constructor.\n     */\n    public function __construct()\n    {\n        self::$allOneBits = self::signedInt(0xFFFFFFFF);\n        $this->reset();\n    }\n\n    /**\n     * Reset the MD5 stream context.\n     */\n    public function reset(): void\n    {\n        $this->a = 0x67452301;\n        $this->b = self::signedInt(0xEFCDAB89);\n        $this->c = self::signedInt(0x98BADCFE);\n        $this->d = 0x10325476;\n    }\n\n    /**\n     * Get MD5 stream context.\n     */\n    public function getContext(): string\n    {\n        $s = '';\n        foreach (['a', 'b', 'c', 'd'] as $i) {\n            $v = $this->{$i};\n            $s .= chr($v & 0xFF);\n            $s .= chr(($v >> 8) & 0xFF);\n            $s .= chr(($v >> 16) & 0xFF);\n            $s .= chr(($v >> 24) & 0xFF);\n        }\n\n        return $s;\n    }\n\n    /**\n     * Add data to context.\n     *\n     * @param string $data Data to add\n     */\n    public function add(string $data): void\n    {\n        $unpacked = unpack('V16', $data) ?: throw new ReaderException('unable to unpack data');\n        /** @var int[] */\n        $words = array_values($unpacked);\n\n        $A = $this->a;\n        $B = $this->b;\n        $C = $this->c;\n        $D = $this->d;\n\n        $F = [self::class, 'f'];\n        $G = [self::class, 'g'];\n        $H = [self::class, 'h'];\n        $I = [self::class, 'i'];\n\n        // ROUND 1\n        self::step($F, $A, $B, $C, $D, $words[0], 7, 0xD76AA478);\n        self::step($F, $D, $A, $B, $C, $words[1], 12, 0xE8C7B756);\n        self::step($F, $C, $D, $A, $B, $words[2], 17, 0x242070DB);\n        self::step($F, $B, $C, $D, $A, $words[3], 22, 0xC1BDCEEE);\n        self::step($F, $A, $B, $C, $D, $words[4], 7, 0xF57C0FAF);\n        self::step($F, $D, $A, $B, $C, $words[5], 12, 0x4787C62A);\n        self::step($F, $C, $D, $A, $B, $words[6], 17, 0xA8304613);\n        self::step($F, $B, $C, $D, $A, $words[7], 22, 0xFD469501);\n        self::step($F, $A, $B, $C, $D, $words[8], 7, 0x698098D8);\n        self::step($F, $D, $A, $B, $C, $words[9], 12, 0x8B44F7AF);\n        self::step($F, $C, $D, $A, $B, $words[10], 17, 0xFFFF5BB1);\n        self::step($F, $B, $C, $D, $A, $words[11], 22, 0x895CD7BE);\n        self::step($F, $A, $B, $C, $D, $words[12], 7, 0x6B901122);\n        self::step($F, $D, $A, $B, $C, $words[13], 12, 0xFD987193);\n        self::step($F, $C, $D, $A, $B, $words[14], 17, 0xA679438E);\n        self::step($F, $B, $C, $D, $A, $words[15], 22, 0x49B40821);\n\n        // ROUND 2\n        self::step($G, $A, $B, $C, $D, $words[1], 5, 0xF61E2562);\n        self::step($G, $D, $A, $B, $C, $words[6], 9, 0xC040B340);\n        self::step($G, $C, $D, $A, $B, $words[11], 14, 0x265E5A51);\n        self::step($G, $B, $C, $D, $A, $words[0], 20, 0xE9B6C7AA);\n        self::step($G, $A, $B, $C, $D, $words[5], 5, 0xD62F105D);\n        self::step($G, $D, $A, $B, $C, $words[10], 9, 0x02441453);\n        self::step($G, $C, $D, $A, $B, $words[15], 14, 0xD8A1E681);\n        self::step($G, $B, $C, $D, $A, $words[4], 20, 0xE7D3FBC8);\n        self::step($G, $A, $B, $C, $D, $words[9], 5, 0x21E1CDE6);\n        self::step($G, $D, $A, $B, $C, $words[14], 9, 0xC33707D6);\n        self::step($G, $C, $D, $A, $B, $words[3], 14, 0xF4D50D87);\n        self::step($G, $B, $C, $D, $A, $words[8], 20, 0x455A14ED);\n        self::step($G, $A, $B, $C, $D, $words[13], 5, 0xA9E3E905);\n        self::step($G, $D, $A, $B, $C, $words[2], 9, 0xFCEFA3F8);\n        self::step($G, $C, $D, $A, $B, $words[7], 14, 0x676F02D9);\n        self::step($G, $B, $C, $D, $A, $words[12], 20, 0x8D2A4C8A);\n\n        // ROUND 3\n        self::step($H, $A, $B, $C, $D, $words[5], 4, 0xFFFA3942);\n        self::step($H, $D, $A, $B, $C, $words[8], 11, 0x8771F681);\n        self::step($H, $C, $D, $A, $B, $words[11], 16, 0x6D9D6122);\n        self::step($H, $B, $C, $D, $A, $words[14], 23, 0xFDE5380C);\n        self::step($H, $A, $B, $C, $D, $words[1], 4, 0xA4BEEA44);\n        self::step($H, $D, $A, $B, $C, $words[4], 11, 0x4BDECFA9);\n        self::step($H, $C, $D, $A, $B, $words[7], 16, 0xF6BB4B60);\n        self::step($H, $B, $C, $D, $A, $words[10], 23, 0xBEBFBC70);\n        self::step($H, $A, $B, $C, $D, $words[13], 4, 0x289B7EC6);\n        self::step($H, $D, $A, $B, $C, $words[0], 11, 0xEAA127FA);\n        self::step($H, $C, $D, $A, $B, $words[3], 16, 0xD4EF3085);\n        self::step($H, $B, $C, $D, $A, $words[6], 23, 0x04881D05);\n        self::step($H, $A, $B, $C, $D, $words[9], 4, 0xD9D4D039);\n        self::step($H, $D, $A, $B, $C, $words[12], 11, 0xE6DB99E5);\n        self::step($H, $C, $D, $A, $B, $words[15], 16, 0x1FA27CF8);\n        self::step($H, $B, $C, $D, $A, $words[2], 23, 0xC4AC5665);\n\n        // ROUND 4\n        self::step($I, $A, $B, $C, $D, $words[0], 6, 0xF4292244);\n        self::step($I, $D, $A, $B, $C, $words[7], 10, 0x432AFF97);\n        self::step($I, $C, $D, $A, $B, $words[14], 15, 0xAB9423A7);\n        self::step($I, $B, $C, $D, $A, $words[5], 21, 0xFC93A039);\n        self::step($I, $A, $B, $C, $D, $words[12], 6, 0x655B59C3);\n        self::step($I, $D, $A, $B, $C, $words[3], 10, 0x8F0CCC92);\n        self::step($I, $C, $D, $A, $B, $words[10], 15, 0xFFEFF47D);\n        self::step($I, $B, $C, $D, $A, $words[1], 21, 0x85845DD1);\n        self::step($I, $A, $B, $C, $D, $words[8], 6, 0x6FA87E4F);\n        self::step($I, $D, $A, $B, $C, $words[15], 10, 0xFE2CE6E0);\n        self::step($I, $C, $D, $A, $B, $words[6], 15, 0xA3014314);\n        self::step($I, $B, $C, $D, $A, $words[13], 21, 0x4E0811A1);\n        self::step($I, $A, $B, $C, $D, $words[4], 6, 0xF7537E82);\n        self::step($I, $D, $A, $B, $C, $words[11], 10, 0xBD3AF235);\n        self::step($I, $C, $D, $A, $B, $words[2], 15, 0x2AD7D2BB);\n        self::step($I, $B, $C, $D, $A, $words[9], 21, 0xEB86D391);\n\n        $this->a = ($this->a + $A) & self::$allOneBits;\n        $this->b = ($this->b + $B) & self::$allOneBits;\n        $this->c = ($this->c + $C) & self::$allOneBits;\n        $this->d = ($this->d + $D) & self::$allOneBits;\n    }\n\n    private static function f(int $X, int $Y, int $Z): int\n    {\n        return ($X & $Y) | ((~$X) & $Z); // X AND Y OR NOT X AND Z\n    }\n\n    private static function g(int $X, int $Y, int $Z): int\n    {\n        return ($X & $Z) | ($Y & (~$Z)); // X AND Z OR Y AND NOT Z\n    }\n\n    private static function h(int $X, int $Y, int $Z): int\n    {\n        return $X ^ $Y ^ $Z; // X XOR Y XOR Z\n    }\n\n    private static function i(int $X, int $Y, int $Z): int\n    {\n        return $Y ^ ($X | (~$Z)); // Y XOR (X OR NOT Z)\n    }\n\n    /** @param float|int $t may be float on 32-bit system */\n    private static function step(callable $func, int &$A, int $B, int $C, int $D, int $M, int $s, $t): void\n    {\n        $t = self::signedInt($t);\n        /** @var int */\n        $temp = call_user_func($func, $B, $C, $D);\n        $A = (int) ($A + $temp + $M + $t) & self::$allOneBits;\n        $A = self::rotate($A, $s);\n        $A = (int) ($B + $A) & self::$allOneBits;\n    }\n\n    /** @param float|int $result may be float on 32-bit system */\n    private static function signedInt($result): int\n    {\n        return is_int($result) ? $result : (int) (PHP_INT_MIN + $result - 1 - PHP_INT_MAX);\n    }\n\n    private static function rotate(int $decimal, int $bits): int\n    {\n        $binary = str_pad(decbin($decimal), 32, '0', STR_PAD_LEFT);\n\n        return self::signedInt(bindec(substr($binary, $bits) . substr($binary, 0, $bits)));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Mappings.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nclass Mappings\n{\n    /**\n     * Map tFunc values (functions with fixed number of arguments).\n     * Key is tFunc value.\n     * First element of array is Excel function name.\n     * Second element of array is number of arguments.\n     */\n    const TFUNC_MAPPINGS = [\n        2 => ['ISNA', 1],\n        3 => ['ISERROR', 1],\n        10 => ['NA', 0],\n        15 => ['SIN', 1],\n        16 => ['COS', 1],\n        17 => ['TAN', 1],\n        18 => ['ATAN', 1],\n        19 => ['PI', 0],\n        20 => ['SQRT', 1],\n        21 => ['EXP', 1],\n        22 => ['LN', 1],\n        23 => ['LOG10', 1],\n        24 => ['ABS', 1],\n        25 => ['INT', 1],\n        26 => ['SIGN', 1],\n        27 => ['ROUND', 2],\n        30 => ['REPT', 2],\n        31 => ['MID', 3],\n        32 => ['LEN', 1],\n        33 => ['VALUE', 1],\n        34 => ['TRUE', 0],\n        35 => ['FALSE', 0],\n        38 => ['NOT', 1],\n        39 => ['MOD', 2],\n        40 => ['DCOUNT', 3],\n        41 => ['DSUM', 3],\n        42 => ['DAVERAGE', 3],\n        43 => ['DMIN', 3],\n        44 => ['DMAX', 3],\n        45 => ['DSTDEV', 3],\n        48 => ['TEXT', 2],\n        61 => ['MIRR', 3],\n        63 => ['RAND', 0],\n        65 => ['DATE', 3],\n        66 => ['TIME', 3],\n        67 => ['DAY', 1],\n        68 => ['MONTH', 1],\n        69 => ['YEAR', 1],\n        71 => ['HOUR', 1],\n        72 => ['MINUTE', 1],\n        73 => ['SECOND', 1],\n        74 => ['NOW', 0],\n        75 => ['AREAS', 1],\n        76 => ['ROWS', 1],\n        77 => ['COLUMNS', 1],\n        83 => ['TRANSPOSE', 1],\n        86 => ['TYPE', 1],\n        97 => ['ATAN2', 2],\n        98 => ['ASIN', 1],\n        99 => ['ACOS', 1],\n        105 => ['ISREF', 1],\n        111 => ['CHAR', 1],\n        112 => ['LOWER', 1],\n        113 => ['UPPER', 1],\n        114 => ['PROPER', 1],\n        117 => ['EXACT', 2],\n        118 => ['TRIM', 1],\n        119 => ['REPLACE', 4],\n        121 => ['CODE', 1],\n        126 => ['ISERR', 1],\n        127 => ['ISTEXT', 1],\n        128 => ['ISNUMBER', 1],\n        129 => ['ISBLANK', 1],\n        130 => ['T', 1],\n        131 => ['N', 1],\n        140 => ['DATEVALUE', 1],\n        141 => ['TIMEVALUE', 1],\n        142 => ['SLN', 3],\n        143 => ['SYD', 4],\n        162 => ['CLEAN', 1],\n        163 => ['MDETERM', 1],\n        164 => ['MINVERSE', 1],\n        165 => ['MMULT', 2],\n        184 => ['FACT', 1],\n        189 => ['DPRODUCT', 3],\n        190 => ['ISNONTEXT', 1],\n        195 => ['DSTDEVP', 3],\n        196 => ['DVARP', 3],\n        198 => ['ISLOGICAL', 1],\n        199 => ['DCOUNTA', 3],\n        207 => ['REPLACEB', 4],\n        210 => ['MIDB', 3],\n        211 => ['LENB', 1],\n        212 => ['ROUNDUP', 2],\n        213 => ['ROUNDDOWN', 2],\n        214 => ['ASC', 1],\n        215 => ['DBCS', 1],\n        221 => ['TODAY', 0],\n        229 => ['SINH', 1],\n        230 => ['COSH', 1],\n        231 => ['TANH', 1],\n        232 => ['ASINH', 1],\n        233 => ['ACOSH', 1],\n        234 => ['ATANH', 1],\n        235 => ['DGET', 3],\n        244 => ['INFO', 1],\n        252 => ['FREQUENCY', 2],\n        261 => ['ERROR.TYPE', 1],\n        271 => ['GAMMALN', 1],\n        273 => ['BINOMDIST', 4],\n        274 => ['CHIDIST', 2],\n        275 => ['CHIINV', 2],\n        276 => ['COMBIN', 2],\n        277 => ['CONFIDENCE', 3],\n        278 => ['CRITBINOM', 3],\n        279 => ['EVEN', 1],\n        280 => ['EXPONDIST', 3],\n        281 => ['FDIST', 3],\n        282 => ['FINV', 3],\n        283 => ['FISHER', 1],\n        284 => ['FISHERINV', 1],\n        285 => ['FLOOR', 2],\n        286 => ['GAMMADIST', 4],\n        287 => ['GAMMAINV', 3],\n        288 => ['CEILING', 2],\n        289 => ['HYPGEOMDIST', 4],\n        290 => ['LOGNORMDIST', 3],\n        291 => ['LOGINV', 3],\n        292 => ['NEGBINOMDIST', 3],\n        293 => ['NORMDIST', 4],\n        294 => ['NORMSDIST', 1],\n        295 => ['NORMINV', 3],\n        296 => ['NORMSINV', 1],\n        297 => ['STANDARDIZE', 3],\n        298 => ['ODD', 1],\n        299 => ['PERMUT', 2],\n        300 => ['POISSON', 3],\n        301 => ['TDIST', 3],\n        302 => ['WEIBULL', 4],\n        303 => ['SUMXMY2', 2],\n        304 => ['SUMX2MY2', 2],\n        305 => ['SUMX2PY2', 2],\n        306 => ['CHITEST', 2],\n        307 => ['CORREL', 2],\n        308 => ['COVAR', 2],\n        309 => ['FORECAST', 3],\n        310 => ['FTEST', 2],\n        311 => ['INTERCEPT', 2],\n        312 => ['PEARSON', 2],\n        313 => ['RSQ', 2],\n        314 => ['STEYX', 2],\n        315 => ['SLOPE', 2],\n        316 => ['TTEST', 4],\n        325 => ['LARGE', 2],\n        326 => ['SMALL', 2],\n        327 => ['QUARTILE', 2],\n        328 => ['PERCENTILE', 2],\n        331 => ['TRIMMEAN', 2],\n        332 => ['TINV', 2],\n        337 => ['POWER', 2],\n        342 => ['RADIANS', 1],\n        343 => ['DEGREES', 1],\n        346 => ['COUNTIF', 2],\n        347 => ['COUNTBLANK', 1],\n        350 => ['ISPMT', 4],\n        351 => ['DATEDIF', 3],\n        352 => ['DATESTRING', 1],\n        353 => ['NUMBERSTRING', 2],\n        360 => ['PHONETIC', 1],\n        368 => ['BAHTTEXT', 1],\n    ];\n\n    /**\n     * Map tFuncV values (functions with variable number of arguments).\n     * Key is tFuncV value.\n     * Value is Excel function name.\n     */\n    const TFUNCV_MAPPINGS = [\n        0 => 'COUNT',\n        1 => 'IF',\n        4 => 'SUM',\n        5 => 'AVERAGE',\n        6 => 'MIN',\n        7 => 'MAX',\n        8 => 'ROW',\n        9 => 'COLUMN',\n        11 => 'NPV',\n        12 => 'STDEV',\n        13 => 'DOLLAR',\n        14 => 'FIXED',\n        28 => 'LOOKUP',\n        29 => 'INDEX',\n        36 => 'AND',\n        37 => 'OR',\n        46 => 'VAR',\n        49 => 'LINEST',\n        50 => 'TREND',\n        51 => 'LOGEST',\n        52 => 'GROWTH',\n        56 => 'PV',\n        57 => 'FV',\n        58 => 'NPER',\n        59 => 'PMT',\n        60 => 'RATE',\n        62 => 'IRR',\n        64 => 'MATCH',\n        70 => 'WEEKDAY',\n        78 => 'OFFSET',\n        82 => 'SEARCH',\n        100 => 'CHOOSE',\n        101 => 'HLOOKUP',\n        102 => 'VLOOKUP',\n        109 => 'LOG',\n        115 => 'LEFT',\n        116 => 'RIGHT',\n        120 => 'SUBSTITUTE',\n        124 => 'FIND',\n        125 => 'CELL',\n        144 => 'DDB',\n        148 => 'INDIRECT',\n        167 => 'IPMT',\n        168 => 'PPMT',\n        169 => 'COUNTA',\n        183 => 'PRODUCT',\n        193 => 'STDEVP',\n        194 => 'VARP',\n        197 => 'TRUNC',\n        204 => 'USDOLLAR',\n        205 => 'FINDB',\n        206 => 'SEARCHB',\n        208 => 'LEFTB',\n        209 => 'RIGHTB',\n        216 => 'RANK',\n        219 => 'ADDRESS',\n        220 => 'DAYS360',\n        222 => 'VDB',\n        227 => 'MEDIAN',\n        228 => 'SUMPRODUCT',\n        247 => 'DB',\n        255 => '',\n        269 => 'AVEDEV',\n        270 => 'BETADIST',\n        272 => 'BETAINV',\n        317 => 'PROB',\n        318 => 'DEVSQ',\n        319 => 'GEOMEAN',\n        320 => 'HARMEAN',\n        321 => 'SUMSQ',\n        322 => 'KURT',\n        323 => 'SKEW',\n        324 => 'ZTEST',\n        329 => 'PERCENTRANK',\n        330 => 'MODE',\n        336 => 'CONCATENATE',\n        344 => 'SUBTOTAL',\n        345 => 'SUMIF',\n        354 => 'ROMAN',\n        358 => 'GETPIVOTDATA',\n        359 => 'HYPERLINK',\n        361 => 'AVERAGEA',\n        362 => 'MAXA',\n        363 => 'MINA',\n        364 => 'STDEVPA',\n        365 => 'VARPA',\n        366 => 'STDEVA',\n        367 => 'VARA',\n    ];\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/RC4.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\n\nclass RC4\n{\n    /** @var int[] */\n    protected array $s = []; // Context\n\n    protected int $i = 0;\n\n    protected int $j = 0;\n\n    /**\n     * RC4 stream decryption/encryption constructor.\n     *\n     * @param string $key Encryption key/passphrase\n     */\n    public function __construct(string $key)\n    {\n        $len = strlen($key);\n\n        for ($this->i = 0; $this->i < 256; ++$this->i) {\n            $this->s[$this->i] = $this->i;\n        }\n\n        $this->j = 0;\n        for ($this->i = 0; $this->i < 256; ++$this->i) {\n            $this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256;\n            $t = $this->s[$this->i];\n            $this->s[$this->i] = $this->s[$this->j];\n            $this->s[$this->j] = $t;\n        }\n        $this->i = $this->j = 0;\n    }\n\n    /**\n     * Symmetric decryption/encryption function.\n     *\n     * @param string $data Data to encrypt/decrypt\n     */\n    public function RC4(string $data): string\n    {\n        $len = strlen($data);\n        for ($c = 0; $c < $len; ++$c) {\n            $this->i = ($this->i + 1) % 256;\n            $this->j = ($this->j + $this->s[$this->i]) % 256;\n            $t = $this->s[$this->i];\n            $this->s[$this->i] = $this->s[$this->j];\n            $this->s[$this->j] = $t;\n\n            $t = ($this->s[$this->i] + $this->s[$this->j]) % 256;\n\n            $data[$c] = chr(ord($data[$c]) ^ $this->s[$t]);\n        }\n\n        return $data;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Style/Border.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border as StyleBorder;\n\nclass Border\n{\n    /**\n     * @var array<int, string>\n     */\n    protected static array $borderStyleMap = [\n        0x00 => StyleBorder::BORDER_NONE,\n        0x01 => StyleBorder::BORDER_THIN,\n        0x02 => StyleBorder::BORDER_MEDIUM,\n        0x03 => StyleBorder::BORDER_DASHED,\n        0x04 => StyleBorder::BORDER_DOTTED,\n        0x05 => StyleBorder::BORDER_THICK,\n        0x06 => StyleBorder::BORDER_DOUBLE,\n        0x07 => StyleBorder::BORDER_HAIR,\n        0x08 => StyleBorder::BORDER_MEDIUMDASHED,\n        0x09 => StyleBorder::BORDER_DASHDOT,\n        0x0A => StyleBorder::BORDER_MEDIUMDASHDOT,\n        0x0B => StyleBorder::BORDER_DASHDOTDOT,\n        0x0C => StyleBorder::BORDER_MEDIUMDASHDOTDOT,\n        0x0D => StyleBorder::BORDER_SLANTDASHDOT,\n    ];\n\n    public static function lookup(int $index): string\n    {\n        return self::$borderStyleMap[$index] ?? StyleBorder::BORDER_NONE;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Style/CellAlignment.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\n\nclass CellAlignment\n{\n    /**\n     * @var array<int, string>\n     */\n    protected static array $horizontalAlignmentMap = [\n        0 => Alignment::HORIZONTAL_GENERAL,\n        1 => Alignment::HORIZONTAL_LEFT,\n        2 => Alignment::HORIZONTAL_CENTER,\n        3 => Alignment::HORIZONTAL_RIGHT,\n        4 => Alignment::HORIZONTAL_FILL,\n        5 => Alignment::HORIZONTAL_JUSTIFY,\n        6 => Alignment::HORIZONTAL_CENTER_CONTINUOUS,\n    ];\n\n    /**\n     * @var array<int, string>\n     */\n    protected static array $verticalAlignmentMap = [\n        0 => Alignment::VERTICAL_TOP,\n        1 => Alignment::VERTICAL_CENTER,\n        2 => Alignment::VERTICAL_BOTTOM,\n        3 => Alignment::VERTICAL_JUSTIFY,\n    ];\n\n    public static function horizontal(Alignment $alignment, int $horizontal): void\n    {\n        if (array_key_exists($horizontal, self::$horizontalAlignmentMap)) {\n            $alignment->setHorizontal(self::$horizontalAlignmentMap[$horizontal]);\n        }\n    }\n\n    public static function vertical(Alignment $alignment, int $vertical): void\n    {\n        if (array_key_exists($vertical, self::$verticalAlignmentMap)) {\n            $alignment->setVertical(self::$verticalAlignmentMap[$vertical]);\n        }\n    }\n\n    public static function wrap(Alignment $alignment, int $wrap): void\n    {\n        $alignment->setWrapText((bool) $wrap);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Style/CellFont.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass CellFont\n{\n    public static function escapement(Font $font, int $escapement): void\n    {\n        switch ($escapement) {\n            case 0x0001:\n                $font->setSuperscript(true);\n\n                break;\n            case 0x0002:\n                $font->setSubscript(true);\n\n                break;\n        }\n    }\n\n    /**\n     * @var array<int, string>\n     */\n    protected static array $underlineMap = [\n        0x01 => Font::UNDERLINE_SINGLE,\n        0x02 => Font::UNDERLINE_DOUBLE,\n        0x21 => Font::UNDERLINE_SINGLEACCOUNTING,\n        0x22 => Font::UNDERLINE_DOUBLEACCOUNTING,\n    ];\n\n    public static function underline(Font $font, int $underline): void\n    {\n        if (array_key_exists($underline, self::$underlineMap)) {\n            $font->setUnderline(self::$underlineMap[$underline]);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\n\nclass FillPattern\n{\n    /**\n     * @var array<int, string>\n     */\n    protected static array $fillPatternMap = [\n        0x00 => Fill::FILL_NONE,\n        0x01 => Fill::FILL_SOLID,\n        0x02 => Fill::FILL_PATTERN_MEDIUMGRAY,\n        0x03 => Fill::FILL_PATTERN_DARKGRAY,\n        0x04 => Fill::FILL_PATTERN_LIGHTGRAY,\n        0x05 => Fill::FILL_PATTERN_DARKHORIZONTAL,\n        0x06 => Fill::FILL_PATTERN_DARKVERTICAL,\n        0x07 => Fill::FILL_PATTERN_DARKDOWN,\n        0x08 => Fill::FILL_PATTERN_DARKUP,\n        0x09 => Fill::FILL_PATTERN_DARKGRID,\n        0x0A => Fill::FILL_PATTERN_DARKTRELLIS,\n        0x0B => Fill::FILL_PATTERN_LIGHTHORIZONTAL,\n        0x0C => Fill::FILL_PATTERN_LIGHTVERTICAL,\n        0x0D => Fill::FILL_PATTERN_LIGHTDOWN,\n        0x0E => Fill::FILL_PATTERN_LIGHTUP,\n        0x0F => Fill::FILL_PATTERN_LIGHTGRID,\n        0x10 => Fill::FILL_PATTERN_LIGHTTRELLIS,\n        0x11 => Fill::FILL_PATTERN_GRAY125,\n        0x12 => Fill::FILL_PATTERN_GRAY0625,\n    ];\n\n    /**\n     * Get fill pattern from index\n     * OpenOffice documentation: 2.5.12.\n     */\n    public static function lookup(int $index): string\n    {\n        return self::$fillPatternMap[$index] ?? Fill::FILL_NONE;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xls.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Style\\CellFont;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Style\\FillPattern;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\CodePage;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLERead;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\SheetView;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\n// Original file header of ParseXL (used as the base for this class):\n// --------------------------------------------------------------------------------\n// Adapted from Excel_Spreadsheet_Reader developed by users bizon153,\n// trex005, and mmp11 (SourceForge.net)\n// https://sourceforge.net/projects/phpexcelreader/\n// Primary changes made by canyoncasa (dvc) for ParseXL 1.00 ...\n//     Modelled moreso after Perl Excel Parse/Write modules\n//     Added Parse_Excel_Spreadsheet object\n//         Reads a whole worksheet or tab as row,column array or as\n//         associated hash of indexed rows and named column fields\n//     Added variables for worksheet (tab) indexes and names\n//     Added an object call for loading individual woorksheets\n//     Changed default indexing defaults to 0 based arrays\n//     Fixed date/time and percent formats\n//     Includes patches found at SourceForge...\n//         unicode patch by nobody\n//         unpack(\"d\") machine depedency patch by matchy\n//         boundsheet utf16 patch by bjaenichen\n//     Renamed functions for shorter names\n//     General code cleanup and rigor, including <80 column width\n//     Included a testcase Excel file and PHP example calls\n//     Code works for PHP 5.x\n\n// Primary changes made by canyoncasa (dvc) for ParseXL 1.10 ...\n// http://sourceforge.net/tracker/index.php?func=detail&aid=1466964&group_id=99160&atid=623334\n//     Decoding of formula conditions, results, and tokens.\n//     Support for user-defined named cells added as an array \"namedcells\"\n//         Patch code for user-defined named cells supports single cells only.\n//         NOTE: this patch only works for BIFF8 as BIFF5-7 use a different\n//         external sheet reference structure\nclass Xls extends XlsBase\n{\n    /**\n     * Summary Information stream data.\n     */\n    protected ?string $summaryInformation = null;\n\n    /**\n     * Extended Summary Information stream data.\n     */\n    protected ?string $documentSummaryInformation = null;\n\n    /**\n     * Workbook stream data. (Includes workbook globals substream as well as sheet substreams).\n     */\n    protected string $data;\n\n    /**\n     * Size in bytes of $this->data.\n     */\n    protected int $dataSize;\n\n    /**\n     * Current position in stream.\n     */\n    protected int $pos;\n\n    /**\n     * Workbook to be returned by the reader.\n     */\n    protected Spreadsheet $spreadsheet;\n\n    /**\n     * Worksheet that is currently being built by the reader.\n     */\n    protected Worksheet $phpSheet;\n\n    /**\n     * BIFF version.\n     */\n    protected int $version = 0;\n\n    /**\n     * Shared formats.\n     *\n     * @var mixed[]\n     */\n    protected array $formats;\n\n    /**\n     * Shared fonts.\n     *\n     * @var Font[]\n     */\n    protected array $objFonts;\n\n    /**\n     * Color palette.\n     *\n     * @var string[][]\n     */\n    protected array $palette;\n\n    /**\n     * Worksheets.\n     *\n     * @var array<array{name: string, offset: int, sheetState: string, sheetType: int|string}>\n     */\n    protected array $sheets;\n\n    /**\n     * External books.\n     *\n     * @var mixed[][]\n     */\n    protected array $externalBooks;\n\n    /**\n     * REF structures. Only applies to BIFF8.\n     *\n     * @var array<int, array{'externalBookIndex': int, 'firstSheetIndex': int, 'lastSheetIndex': int}>\n     */\n    protected array $ref;\n\n    /**\n     * External names.\n     *\n     * @var array<array<string, mixed>|string>\n     */\n    protected array $externalNames;\n\n    /**\n     * Defined names.\n     *\n     * @var array{isBuiltInName: int, name: string, formula: string, scope: int}\n     */\n    protected array $definedname;\n\n    /**\n     * Shared strings. Only applies to BIFF8.\n     *\n     * @var array<array{value: string, fmtRuns: mixed[]}>\n     */\n    protected array $sst;\n\n    /**\n     * Panes are frozen? (in sheet currently being read). See WINDOW2 record.\n     */\n    protected bool $frozen;\n\n    /**\n     * Fit printout to number of pages? (in sheet currently being read). See SHEETPR record.\n     */\n    protected bool $isFitToPages;\n\n    /**\n     * Objects. One OBJ record contributes with one entry.\n     *\n     * @var mixed[]\n     */\n    protected array $objs;\n\n    /**\n     * Text Objects. One TXO record corresponds with one entry.\n     *\n     * @var array<array{text: string, format: string, alignment: int, rotation: int}>\n     */\n    protected array $textObjects;\n\n    /**\n     * Cell Annotations (BIFF8).\n     *\n     * @var mixed[]\n     */\n    protected array $cellNotes;\n\n    /**\n     * The combined MSODRAWINGGROUP data.\n     */\n    protected string $drawingGroupData;\n\n    /**\n     * The combined MSODRAWING data (per sheet).\n     */\n    protected string $drawingData;\n\n    /**\n     * Keep track of XF index.\n     */\n    protected int $xfIndex;\n\n    /**\n     * Mapping of XF index (that is a cell XF) to final index in cellXf collection.\n     *\n     * @var int[]\n     */\n    protected array $mapCellXfIndex;\n\n    /**\n     * Mapping of XF index (that is a style XF) to final index in cellStyleXf collection.\n     *\n     * @var int[]\n     */\n    protected array $mapCellStyleXfIndex;\n\n    /**\n     * The shared formulas in a sheet. One SHAREDFMLA record contributes with one value.\n     *\n     * @var mixed[]\n     */\n    protected array $sharedFormulas;\n\n    /**\n     * The shared formula parts in a sheet. One FORMULA record contributes with one value if it\n     * refers to a shared formula.\n     *\n     * @var mixed[]\n     */\n    protected array $sharedFormulaParts;\n\n    /**\n     * The type of encryption in use.\n     */\n    protected int $encryption = 0;\n\n    /**\n     * The position in the stream after which contents are encrypted.\n     */\n    protected int $encryptionStartPos = 0;\n\n    protected string $encryptionPassword = 'VelvetSweatshop';\n\n    /**\n     * The current RC4 decryption object.\n     */\n    protected ?Xls\\RC4 $rc4Key = null;\n\n    /**\n     * The position in the stream that the RC4 decryption object was left at.\n     */\n    protected int $rc4Pos = 0;\n\n    /**\n     * The current MD5 context state.\n     * It is set via call-by-reference to verifyPassword.\n     */\n    private string $md5Ctxt = '';\n\n    protected int $textObjRef;\n\n    protected string $baseCell;\n\n    protected bool $activeSheetSet = false;\n\n    /**\n     * Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object.\n     *\n     * @return string[]\n     */\n    public function listWorksheetNames(string $filename): array\n    {\n        return (new Xls\\ListFunctions())->listWorksheetNames2($filename, $this);\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        return (new Xls\\ListFunctions())->listWorksheetInfo2($filename, $this);\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, dimensionsMinR: int, dimensionsMinC: int, dimensionsMaxR: int, dimensionsMaxC: int, lastColumnLetter: string}>\n     */\n    public function listWorksheetDimensions(string $filename): array\n    {\n        return (new Xls\\ListFunctions())->listWorksheetDimensions2($filename, $this);\n    }\n\n    /**\n     * Loads PhpSpreadsheet from file.\n     */\n    protected function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        return (new Xls\\LoadSpreadsheet())->loadSpreadsheetFromFile2($filename, $this);\n    }\n\n    /**\n     * Read record data from stream, decrypting as required.\n     *\n     * @param string $data Data stream to read from\n     * @param int $pos Position to start reading from\n     * @param int $len Record data length\n     *\n     * @return string Record data\n     */\n    protected function readRecordData(string $data, int $pos, int $len): string\n    {\n        $data = substr($data, $pos, $len);\n\n        // File not encrypted, or record before encryption start point\n        if ($this->encryption == self::MS_BIFF_CRYPTO_NONE || $pos < $this->encryptionStartPos) {\n            return $data;\n        }\n\n        $recordData = '';\n        if ($this->encryption == self::MS_BIFF_CRYPTO_RC4) {\n            $oldBlock = floor($this->rc4Pos / self::REKEY_BLOCK);\n            $block = (int) floor($pos / self::REKEY_BLOCK);\n            $endBlock = (int) floor(($pos + $len) / self::REKEY_BLOCK);\n\n            // Spin an RC4 decryptor to the right spot. If we have a decryptor sitting\n            // at a point earlier in the current block, re-use it as we can save some time.\n            if ($block != $oldBlock || $pos < $this->rc4Pos || !$this->rc4Key) {\n                $this->rc4Key = $this->makeKey($block, $this->md5Ctxt);\n                $step = $pos % self::REKEY_BLOCK;\n            } else {\n                $step = $pos - $this->rc4Pos;\n            }\n            $this->rc4Key->RC4(str_repeat(\"\\0\", $step));\n\n            // Decrypt record data (re-keying at the end of every block)\n            while ($block != $endBlock) {\n                $step = self::REKEY_BLOCK - ($pos % self::REKEY_BLOCK);\n                $recordData .= $this->rc4Key->RC4(substr($data, 0, $step));\n                $data = substr($data, $step);\n                $pos += $step;\n                $len -= $step;\n                ++$block;\n                $this->rc4Key = $this->makeKey($block, $this->md5Ctxt);\n            }\n            $recordData .= $this->rc4Key->RC4(substr($data, 0, $len));\n\n            // Keep track of the position of this decryptor.\n            // We'll try and re-use it later if we can to speed things up\n            $this->rc4Pos = $pos + $len;\n        } elseif ($this->encryption == self::MS_BIFF_CRYPTO_XOR) {\n            throw new Exception('XOr encryption not supported');\n        }\n\n        return $recordData;\n    }\n\n    /**\n     * Use OLE reader to extract the relevant data streams from the OLE file.\n     */\n    protected function loadOLE(string $filename): void\n    {\n        // OLE reader\n        $ole = new OLERead();\n        // get excel data,\n        $ole->read($filename);\n        // Get workbook data: workbook stream + sheet streams\n        $this->data = $ole->getStream($ole->wrkbook); // @phpstan-ignore-line\n        // Get summary information data\n        $this->summaryInformation = $ole->getStream($ole->summaryInformation);\n        // Get additional document summary information data\n        $this->documentSummaryInformation = $ole->getStream($ole->documentSummaryInformation);\n    }\n\n    /**\n     * Read summary information.\n     */\n    protected function readSummaryInformation(): void\n    {\n        if (!isset($this->summaryInformation)) {\n            return;\n        }\n\n        // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark)\n        // offset: 2; size: 2;\n        // offset: 4; size: 2; OS version\n        // offset: 6; size: 2; OS indicator\n        // offset: 8; size: 16\n        // offset: 24; size: 4; section count\n        //$secCount = self::getInt4d($this->summaryInformation, 24);\n\n        // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9\n        // offset: 44; size: 4\n        $secOffset = self::getInt4d($this->summaryInformation, 44);\n\n        // section header\n        // offset: $secOffset; size: 4; section length\n        //$secLength = self::getInt4d($this->summaryInformation, $secOffset);\n\n        // offset: $secOffset+4; size: 4; property count\n        $countProperties = self::getInt4d($this->summaryInformation, $secOffset + 4);\n\n        // initialize code page (used to resolve string values)\n        $codePage = 'CP1252';\n\n        // offset: ($secOffset+8); size: var\n        // loop through property decarations and properties\n        for ($i = 0; $i < $countProperties; ++$i) {\n            // offset: ($secOffset+8) + (8 * $i); size: 4; property ID\n            $id = self::getInt4d($this->summaryInformation, ($secOffset + 8) + (8 * $i));\n\n            // Use value of property id as appropriate\n            // offset: ($secOffset+12) + (8 * $i); size: 4; offset from beginning of section (48)\n            $offset = self::getInt4d($this->summaryInformation, ($secOffset + 12) + (8 * $i));\n\n            $type = self::getInt4d($this->summaryInformation, $secOffset + $offset);\n\n            // initialize property value\n            $value = null;\n\n            // extract property value based on property type\n            switch ($type) {\n                case 0x02: // 2 byte signed integer\n                    $value = self::getUInt2d($this->summaryInformation, $secOffset + 4 + $offset);\n\n                    break;\n                case 0x03: // 4 byte signed integer\n                    $value = self::getInt4d($this->summaryInformation, $secOffset + 4 + $offset);\n\n                    break;\n                case 0x13: // 4 byte unsigned integer\n                    // not needed yet, fix later if necessary\n                    break;\n                case 0x1E: // null-terminated string prepended by dword string length\n                    $byteLength = self::getInt4d($this->summaryInformation, $secOffset + 4 + $offset);\n                    $value = substr($this->summaryInformation, $secOffset + 8 + $offset, $byteLength);\n                    $value = StringHelper::convertEncoding($value, 'UTF-8', $codePage);\n                    $value = rtrim($value);\n\n                    break;\n                case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)\n                    // PHP-time\n                    $value = OLE::OLE2LocalDate(substr($this->summaryInformation, $secOffset + 4 + $offset, 8));\n\n                    break;\n                case 0x47: // Clipboard format\n                    // not needed yet, fix later if necessary\n                    break;\n            }\n\n            switch ($id) {\n                case 0x01:    //    Code Page\n                    $codePage = CodePage::numberToName((int) $value);\n\n                    break;\n                case 0x02:    //    Title\n                    $this->spreadsheet->getProperties()->setTitle(\"$value\");\n\n                    break;\n                case 0x03:    //    Subject\n                    $this->spreadsheet->getProperties()->setSubject(\"$value\");\n\n                    break;\n                case 0x04:    //    Author (Creator)\n                    $this->spreadsheet->getProperties()->setCreator(\"$value\");\n\n                    break;\n                case 0x05:    //    Keywords\n                    $this->spreadsheet->getProperties()->setKeywords(\"$value\");\n\n                    break;\n                case 0x06:    //    Comments (Description)\n                    $this->spreadsheet->getProperties()->setDescription(\"$value\");\n\n                    break;\n                case 0x07:    //    Template\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x08:    //    Last Saved By (LastModifiedBy)\n                    $this->spreadsheet->getProperties()->setLastModifiedBy(\"$value\");\n\n                    break;\n                case 0x09:    //    Revision\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0A:    //    Total Editing Time\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0B:    //    Last Printed\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0C:    //    Created Date/Time\n                    $this->spreadsheet->getProperties()->setCreated($value);\n\n                    break;\n                case 0x0D:    //    Modified Date/Time\n                    $this->spreadsheet->getProperties()->setModified($value);\n\n                    break;\n                case 0x0E:    //    Number of Pages\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0F:    //    Number of Words\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x10:    //    Number of Characters\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x11:    //    Thumbnail\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x12:    //    Name of creating application\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x13:    //    Security\n                    //    Not supported by PhpSpreadsheet\n                    break;\n            }\n        }\n    }\n\n    /**\n     * Read additional document summary information.\n     */\n    protected function readDocumentSummaryInformation(): void\n    {\n        if (!isset($this->documentSummaryInformation)) {\n            return;\n        }\n\n        //    offset: 0;    size: 2;    must be 0xFE 0xFF (UTF-16 LE byte order mark)\n        //    offset: 2;    size: 2;\n        //    offset: 4;    size: 2;    OS version\n        //    offset: 6;    size: 2;    OS indicator\n        //    offset: 8;    size: 16\n        //    offset: 24;    size: 4;    section count\n        //$secCount = self::getInt4d($this->documentSummaryInformation, 24);\n\n        // offset: 28;    size: 16;    first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae\n        // offset: 44;    size: 4;    first section offset\n        $secOffset = self::getInt4d($this->documentSummaryInformation, 44);\n\n        //    section header\n        //    offset: $secOffset;    size: 4;    section length\n        //$secLength = self::getInt4d($this->documentSummaryInformation, $secOffset);\n\n        //    offset: $secOffset+4;    size: 4;    property count\n        $countProperties = self::getInt4d($this->documentSummaryInformation, $secOffset + 4);\n\n        // initialize code page (used to resolve string values)\n        $codePage = 'CP1252';\n\n        //    offset: ($secOffset+8);    size: var\n        //    loop through property decarations and properties\n        for ($i = 0; $i < $countProperties; ++$i) {\n            //    offset: ($secOffset+8) + (8 * $i);    size: 4;    property ID\n            $id = self::getInt4d($this->documentSummaryInformation, ($secOffset + 8) + (8 * $i));\n\n            // Use value of property id as appropriate\n            // offset: 60 + 8 * $i;    size: 4;    offset from beginning of section (48)\n            $offset = self::getInt4d($this->documentSummaryInformation, ($secOffset + 12) + (8 * $i));\n\n            $type = self::getInt4d($this->documentSummaryInformation, $secOffset + $offset);\n\n            // initialize property value\n            $value = null;\n\n            // extract property value based on property type\n            switch ($type) {\n                case 0x02:    //    2 byte signed integer\n                    $value = self::getUInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset);\n\n                    break;\n                case 0x03:    //    4 byte signed integer\n                    $value = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset);\n\n                    break;\n                case 0x0B:  // Boolean\n                    $value = self::getUInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset);\n                    $value = ($value == 0 ? false : true);\n\n                    break;\n                case 0x13:    //    4 byte unsigned integer\n                    // not needed yet, fix later if necessary\n                    break;\n                case 0x1E:    //    null-terminated string prepended by dword string length\n                    $byteLength = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset);\n                    $value = substr($this->documentSummaryInformation, $secOffset + 8 + $offset, $byteLength);\n                    $value = StringHelper::convertEncoding($value, 'UTF-8', $codePage);\n                    $value = rtrim($value);\n\n                    break;\n                case 0x40:    //    Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)\n                    // PHP-Time\n                    $value = OLE::OLE2LocalDate(substr($this->documentSummaryInformation, $secOffset + 4 + $offset, 8));\n\n                    break;\n                case 0x47:    //    Clipboard format\n                    // not needed yet, fix later if necessary\n                    break;\n            }\n\n            switch ($id) {\n                case 0x01:    //    Code Page\n                    $codePage = CodePage::numberToName((int) $value);\n\n                    break;\n                case 0x02:    //    Category\n                    $this->spreadsheet->getProperties()->setCategory(\"$value\");\n\n                    break;\n                case 0x03:    //    Presentation Target\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x04:    //    Bytes\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x05:    //    Lines\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x06:    //    Paragraphs\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x07:    //    Slides\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x08:    //    Notes\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x09:    //    Hidden Slides\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0A:    //    MM Clips\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0B:    //    Scale Crop\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0C:    //    Heading Pairs\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0D:    //    Titles of Parts\n                    //    Not supported by PhpSpreadsheet\n                    break;\n                case 0x0E:    //    Manager\n                    $this->spreadsheet->getProperties()->setManager(\"$value\");\n\n                    break;\n                case 0x0F:    //    Company\n                    $this->spreadsheet->getProperties()->setCompany(\"$value\");\n\n                    break;\n                case 0x10:    //    Links up-to-date\n                    //    Not supported by PhpSpreadsheet\n                    break;\n            }\n        }\n    }\n\n    /**\n     * Reads a general type of BIFF record. Does nothing except for moving stream pointer forward to next record.\n     */\n    protected function readDefault(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n    }\n\n    /**\n     *    The NOTE record specifies a comment associated with a particular cell. In Excel 95 (BIFF7) and earlier versions,\n     *        this record stores a note (cell note). This feature was significantly enhanced in Excel 97.\n     */\n    protected function readNote(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->readDataOnly) {\n            return;\n        }\n\n        $cellAddress = Xls\\Biff8::readBIFF8CellAddress(substr($recordData, 0, 4));\n        if ($this->version == self::XLS_BIFF8) {\n            $noteObjID = self::getUInt2d($recordData, 6);\n            $noteAuthor = self::readUnicodeStringLong(substr($recordData, 8));\n            $noteAuthor = $noteAuthor['value'];\n            $this->cellNotes[$noteObjID] = [\n                'cellRef' => $cellAddress,\n                'objectID' => $noteObjID,\n                'author' => $noteAuthor,\n            ];\n        } else {\n            $extension = false;\n            if ($cellAddress === '$B$' . AddressRange::MAX_ROW_XLS) {\n                //    If the address row is -1 and the column is 0, (which translates as $B$65536) then this is a continuation\n                //        note from the previous cell annotation. We're not yet handling this, so annotations longer than the\n                //        max 2048 bytes will probably throw a wobbly.\n                //$row = self::getUInt2d($recordData, 0);\n                $extension = true;\n                $arrayKeys = array_keys($this->phpSheet->getComments());\n                $cellAddress = array_pop($arrayKeys);\n            }\n\n            $cellAddress = str_replace('$', '', (string) $cellAddress);\n            //$noteLength = self::getUInt2d($recordData, 4);\n            $noteText = trim(substr($recordData, 6));\n\n            if ($extension) {\n                //    Concatenate this extension with the currently set comment for the cell\n                $comment = $this->phpSheet->getComment($cellAddress);\n                $commentText = $comment->getText()->getPlainText();\n                $comment->setText($this->parseRichText($commentText . $noteText));\n            } else {\n                //    Set comment for the cell\n                $this->phpSheet->getComment($cellAddress)->setText($this->parseRichText($noteText));\n//                                                    ->setAuthor($author)\n            }\n        }\n    }\n\n    /**\n     * The TEXT Object record contains the text associated with a cell annotation.\n     */\n    protected function readTextObject(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->readDataOnly) {\n            return;\n        }\n\n        // recordData consists of an array of subrecords looking like this:\n        //    grbit: 2 bytes; Option Flags\n        //    rot: 2 bytes; rotation\n        //    cchText: 2 bytes; length of the text (in the first continue record)\n        //    cbRuns: 2 bytes; length of the formatting (in the second continue record)\n        // followed by the continuation records containing the actual text and formatting\n        $grbitOpts = self::getUInt2d($recordData, 0);\n        $rot = self::getUInt2d($recordData, 2);\n        //$cchText = self::getUInt2d($recordData, 10);\n        $cbRuns = self::getUInt2d($recordData, 12);\n        $text = $this->getSplicedRecordData();\n\n        /** @var int[] */\n        $tempSplice = $text['spliceOffsets'];\n        /** @var int */\n        $temp = $tempSplice[0];\n        /** @var int */\n        $temp1 = $tempSplice[1];\n        $textByte = $temp1 - $temp - 1;\n        /** @var string */\n        $textRecordData = $text['recordData'];\n        $textStr = substr($textRecordData, $temp + 1, $textByte);\n        // get 1 byte\n        $is16Bit = ord($textRecordData[0]);\n        // it is possible to use a compressed format,\n        // which omits the high bytes of all characters, if they are all zero\n        if (($is16Bit & 0x01) === 0) {\n            $textStr = StringHelper::ConvertEncoding($textStr, 'UTF-8', 'ISO-8859-1');\n        } else {\n            $textStr = $this->decodeCodepage($textStr);\n        }\n\n        $this->textObjects[$this->textObjRef] = [\n            'text' => $textStr,\n            'format' => substr($textRecordData, $tempSplice[1], $cbRuns),\n            'alignment' => $grbitOpts,\n            'rotation' => $rot,\n        ];\n    }\n\n    /**\n     * Read BOF.\n     */\n    protected function readBof(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = substr($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 2; size: 2; type of the following data\n        $substreamType = self::getUInt2d($recordData, 2);\n\n        switch ($substreamType) {\n            case self::XLS_WORKBOOKGLOBALS:\n                $version = self::getUInt2d($recordData, 0);\n                if (($version != self::XLS_BIFF8) && ($version != self::XLS_BIFF7)) {\n                    throw new Exception('Cannot read this Excel file. Version is too old.');\n                }\n                $this->version = $version;\n\n                break;\n            case self::XLS_WORKSHEET:\n                // do not use this version information for anything\n                // it is unreliable (OpenOffice doc, 5.8), use only version information from the global stream\n                break;\n            default:\n                // substream, e.g. chart\n                // just skip the entire substream\n                do {\n                    $code = self::getUInt2d($this->data, $this->pos);\n                    $this->readDefault();\n                } while ($code != self::XLS_TYPE_EOF && $this->pos < $this->dataSize);\n\n                break;\n        }\n    }\n\n    public function setEncryptionPassword(string $encryptionPassword): self\n    {\n        $this->encryptionPassword = $encryptionPassword;\n\n        return $this;\n    }\n\n    /**\n     * FILEPASS.\n     *\n     * This record is part of the File Protection Block. It\n     * contains information about the read/write password of the\n     * file. All record contents following this record will be\n     * encrypted.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     *\n     * The decryption functions and objects used from here on in\n     * are based on the source of Spreadsheet-ParseExcel:\n     * https://metacpan.org/release/Spreadsheet-ParseExcel\n     */\n    protected function readFilepass(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n\n        if ($length < 54) {\n            throw new Exception('Unexpected file pass record length');\n        }\n\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (substr($recordData, 0, 2) !== \"\\x01\\x00\" || substr($recordData, 4, 2) !== \"\\x01\\x00\") {\n            throw new Exception('Unsupported encryption algorithm');\n        }\n        if (!$this->verifyPassword($this->encryptionPassword, substr($recordData, 6, 16), substr($recordData, 22, 16), substr($recordData, 38, 16), $this->md5Ctxt)) {\n            throw new Exception('Decryption password incorrect');\n        }\n\n        $this->encryption = self::MS_BIFF_CRYPTO_RC4;\n\n        // Decryption required from the record after next onwards\n        $this->encryptionStartPos = $this->pos + self::getUInt2d($this->data, $this->pos + 2);\n    }\n\n    /**\n     * Make an RC4 decryptor for the given block.\n     *\n     * @param int $block Block for which to create decrypto\n     * @param string $valContext MD5 context state\n     */\n    private function makeKey(int $block, string $valContext): Xls\\RC4\n    {\n        $pwarray = str_repeat(\"\\0\", 64);\n\n        for ($i = 0; $i < 5; ++$i) {\n            $pwarray[$i] = $valContext[$i];\n        }\n\n        $pwarray[5] = chr($block & 0xFF);\n        $pwarray[6] = chr(($block >> 8) & 0xFF);\n        $pwarray[7] = chr(($block >> 16) & 0xFF);\n        $pwarray[8] = chr(($block >> 24) & 0xFF);\n\n        $pwarray[9] = \"\\x80\";\n        $pwarray[56] = \"\\x48\";\n\n        $md5 = new Xls\\MD5();\n        $md5->add($pwarray);\n\n        $s = $md5->getContext();\n\n        return new Xls\\RC4($s);\n    }\n\n    /**\n     * Verify RC4 file password.\n     *\n     * @param string $password Password to check\n     * @param string $docid Document id\n     * @param string $salt_data Salt data\n     * @param string $hashedsalt_data Hashed salt data\n     * @param string $valContext Set to the MD5 context of the value\n     *\n     * @return bool Success\n     */\n    private function verifyPassword(string $password, string $docid, string $salt_data, string $hashedsalt_data, string &$valContext): bool\n    {\n        $pwarray = str_repeat(\"\\0\", 64);\n\n        $iMax = strlen($password);\n        for ($i = 0; $i < $iMax; ++$i) {\n            $o = ord(substr($password, $i, 1));\n            $pwarray[2 * $i] = chr($o & 0xFF);\n            $pwarray[2 * $i + 1] = chr(($o >> 8) & 0xFF);\n        }\n        $pwarray[2 * $i] = chr(0x80);\n        $pwarray[56] = chr(($i << 4) & 0xFF);\n\n        $md5 = new Xls\\MD5();\n        $md5->add($pwarray);\n\n        $mdContext1 = $md5->getContext();\n\n        $offset = 0;\n        $keyoffset = 0;\n        $tocopy = 5;\n\n        $md5->reset();\n\n        while ($offset != 16) {\n            if ((64 - $offset) < 5) {\n                $tocopy = 64 - $offset;\n            }\n            for ($i = 0; $i <= $tocopy; ++$i) {\n                $pwarray[$offset + $i] = $mdContext1[$keyoffset + $i];\n            }\n            $offset += $tocopy;\n\n            if ($offset == 64) {\n                $md5->add($pwarray);\n                $keyoffset = $tocopy;\n                $tocopy = 5 - $tocopy;\n                $offset = 0;\n\n                continue;\n            }\n\n            $keyoffset = 0;\n            $tocopy = 5;\n            for ($i = 0; $i < 16; ++$i) {\n                $pwarray[$offset + $i] = $docid[$i];\n            }\n            $offset += 16;\n        }\n\n        $pwarray[16] = \"\\x80\";\n        for ($i = 0; $i < 47; ++$i) {\n            $pwarray[17 + $i] = \"\\0\";\n        }\n        $pwarray[56] = \"\\x80\";\n        $pwarray[57] = \"\\x0a\";\n\n        $md5->add($pwarray);\n        $valContext = $md5->getContext();\n\n        $key = $this->makeKey(0, $valContext);\n\n        $salt = $key->RC4($salt_data);\n        $hashedsalt = $key->RC4($hashedsalt_data);\n\n        $salt .= \"\\x80\" . str_repeat(\"\\0\", 47);\n        $salt[56] = \"\\x80\";\n\n        $md5->reset();\n        $md5->add($salt);\n        $mdContext2 = $md5->getContext();\n\n        return $mdContext2 == $hashedsalt;\n    }\n\n    /**\n     * CODEPAGE.\n     *\n     * This record stores the text encoding used to write byte\n     * strings, stored as MS Windows code page identifier.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readCodepage(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; code page identifier\n        $codepage = self::getUInt2d($recordData, 0);\n\n        $this->codepage = CodePage::numberToName($codepage);\n    }\n\n    /**\n     * DATEMODE.\n     *\n     * This record specifies the base date for displaying date\n     * values. All dates are stored as count of days past this\n     * base date. In BIFF2-BIFF4 this record is part of the\n     * Calculation Settings Block. In BIFF5-BIFF8 it is\n     * stored in the Workbook Globals Substream.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readDateMode(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; 0 = base 1900, 1 = base 1904\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n        $this->spreadsheet->setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n        if (ord($recordData[0]) == 1) {\n            Date::setExcelCalendar(Date::CALENDAR_MAC_1904);\n            $this->spreadsheet->setExcelCalendar(Date::CALENDAR_MAC_1904);\n        }\n    }\n\n    /**\n     * Read a FONT record.\n     */\n    protected function readFont(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            $objFont = new Font();\n\n            // offset: 0; size: 2; height of the font (in twips = 1/20 of a point)\n            $size = self::getUInt2d($recordData, 0);\n            $objFont->setSize($size / 20);\n\n            // offset: 2; size: 2; option flags\n            // bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8)\n            // bit: 1; mask 0x0002; italic\n            $isItalic = (0x0002 & self::getUInt2d($recordData, 2)) >> 1;\n            if ($isItalic) {\n                $objFont->setItalic(true);\n            }\n\n            // bit: 2; mask 0x0004; underlined (redundant in BIFF5-BIFF8)\n            // bit: 3; mask 0x0008; strikethrough\n            $isStrike = (0x0008 & self::getUInt2d($recordData, 2)) >> 3;\n            if ($isStrike) {\n                $objFont->setStrikethrough(true);\n            }\n\n            // offset: 4; size: 2; colour index\n            $colorIndex = self::getUInt2d($recordData, 4);\n            $objFont->colorIndex = $colorIndex;\n\n            // offset: 6; size: 2; font weight\n            $weight = self::getUInt2d($recordData, 6); // regular=400 bold=700\n            if ($weight >= 550) {\n                $objFont->setBold(true);\n            }\n\n            // offset: 8; size: 2; escapement type\n            $escapement = self::getUInt2d($recordData, 8);\n            CellFont::escapement($objFont, $escapement);\n\n            // offset: 10; size: 1; underline type\n            $underlineType = ord($recordData[10]);\n            CellFont::underline($objFont, $underlineType);\n\n            // offset: 11; size: 1; font family\n            // offset: 12; size: 1; character set\n            // offset: 13; size: 1; not used\n            // offset: 14; size: var; font name\n            if ($this->version == self::XLS_BIFF8) {\n                $string = self::readUnicodeStringShort(substr($recordData, 14));\n            } else {\n                $string = $this->readByteStringShort(substr($recordData, 14));\n            }\n            /** @var string[] $string */\n            $objFont->setName($string['value']);\n\n            $this->objFonts[] = $objFont;\n        }\n    }\n\n    /**\n     * FORMAT.\n     *\n     * This record contains information about a number format.\n     * All FORMAT records occur together in a sequential list.\n     *\n     * In BIFF2-BIFF4 other records referencing a FORMAT record\n     * contain a zero-based index into this list. From BIFF5 on\n     * the FORMAT record contains the index itself that will be\n     * used by other records.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readFormat(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            $indexCode = self::getUInt2d($recordData, 0);\n\n            if ($this->version == self::XLS_BIFF8) {\n                $string = self::readUnicodeStringLong(substr($recordData, 2));\n            } else {\n                // BIFF7\n                $string = $this->readByteStringShort(substr($recordData, 2));\n            }\n\n            $formatString = $string['value'];\n            // Apache Open Office sets wrong case writing to xls - issue 2239\n            if ($formatString === 'GENERAL') {\n                $formatString = NumberFormat::FORMAT_GENERAL;\n            }\n            $this->formats[$indexCode] = $formatString;\n        }\n    }\n\n    /**\n     * XF - Extended Format.\n     *\n     * This record contains formatting information for cells, rows, columns or styles.\n     * According to https://support.microsoft.com/en-us/help/147732 there are always at least 15 cell style XF\n     * and 1 cell XF.\n     * Inspection of Excel files generated by MS Office Excel shows that XF records 0-14 are cell style XF\n     * and XF record 15 is a cell XF\n     * We only read the first cell style XF and skip the remaining cell style XF records\n     * We read all cell XF records.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readXf(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        $objStyle = new Style();\n\n        if (!$this->readDataOnly) {\n            // offset:  0; size: 2; Index to FONT record\n            if (self::getUInt2d($recordData, 0) < 4) {\n                $fontIndex = self::getUInt2d($recordData, 0);\n            } else {\n                // this has to do with that index 4 is omitted in all BIFF versions for some strange reason\n                // check the OpenOffice documentation of the FONT record\n                $fontIndex = self::getUInt2d($recordData, 0) - 1;\n            }\n            if (isset($this->objFonts[$fontIndex])) {\n                $objStyle->setFont($this->objFonts[$fontIndex]);\n            }\n\n            // offset:  2; size: 2; Index to FORMAT record\n            $numberFormatIndex = self::getUInt2d($recordData, 2);\n            if (isset($this->formats[$numberFormatIndex])) {\n                // then we have user-defined format code\n                $numberFormat = ['formatCode' => $this->formats[$numberFormatIndex]];\n            } elseif (($code = NumberFormat::builtInFormatCode($numberFormatIndex)) !== '') {\n                // then we have built-in format code\n                $numberFormat = ['formatCode' => $code];\n            } else {\n                // we set the general format code\n                $numberFormat = ['formatCode' => NumberFormat::FORMAT_GENERAL];\n            }\n            /** @var string[] $numberFormat */\n            $objStyle->getNumberFormat()\n                ->setFormatCode($numberFormat['formatCode']);\n\n            // offset:  4; size: 2; XF type, cell protection, and parent style XF\n            // bit 2-0; mask 0x0007; XF_TYPE_PROT\n            $xfTypeProt = self::getUInt2d($recordData, 4);\n            // bit 0; mask 0x01; 1 = cell is locked\n            $isLocked = (0x01 & $xfTypeProt) >> 0;\n            $objStyle->getProtection()->setLocked($isLocked ? Protection::PROTECTION_INHERIT : Protection::PROTECTION_UNPROTECTED);\n\n            // bit 1; mask 0x02; 1 = Formula is hidden\n            $isHidden = (0x02 & $xfTypeProt) >> 1;\n            $objStyle->getProtection()->setHidden($isHidden ? Protection::PROTECTION_PROTECTED : Protection::PROTECTION_UNPROTECTED);\n\n            // bit 2; mask 0x04; 0 = Cell XF, 1 = Cell Style XF\n            $isCellStyleXf = (0x04 & $xfTypeProt) >> 2;\n\n            // offset:  6; size: 1; Alignment and text break\n            // bit 2-0, mask 0x07; horizontal alignment\n            $horAlign = (0x07 & ord($recordData[6])) >> 0;\n            Xls\\Style\\CellAlignment::horizontal($objStyle->getAlignment(), $horAlign);\n\n            // bit 3, mask 0x08; wrap text\n            $wrapText = (0x08 & ord($recordData[6])) >> 3;\n            Xls\\Style\\CellAlignment::wrap($objStyle->getAlignment(), $wrapText);\n\n            // bit 6-4, mask 0x70; vertical alignment\n            $vertAlign = (0x70 & ord($recordData[6])) >> 4;\n            Xls\\Style\\CellAlignment::vertical($objStyle->getAlignment(), $vertAlign);\n\n            if ($this->version == self::XLS_BIFF8) {\n                // offset:  7; size: 1; XF_ROTATION: Text rotation angle\n                $angle = ord($recordData[7]);\n                $rotation = 0;\n                if ($angle <= 90) {\n                    $rotation = $angle;\n                } elseif ($angle <= 180) {\n                    $rotation = 90 - $angle;\n                } elseif ($angle == Alignment::TEXTROTATION_STACK_EXCEL) {\n                    $rotation = Alignment::TEXTROTATION_STACK_PHPSPREADSHEET;\n                }\n                $objStyle->getAlignment()->setTextRotation($rotation);\n\n                // offset:  8; size: 1; Indentation, shrink to cell size, and text direction\n                // bit: 3-0; mask: 0x0F; indent level\n                $indent = (0x0F & ord($recordData[8])) >> 0;\n                $objStyle->getAlignment()->setIndent($indent);\n\n                // bit: 4; mask: 0x10; 1 = shrink content to fit into cell\n                $shrinkToFit = (0x10 & ord($recordData[8])) >> 4;\n                switch ($shrinkToFit) {\n                    case 0:\n                        $objStyle->getAlignment()->setShrinkToFit(false);\n\n                        break;\n                    case 1:\n                        $objStyle->getAlignment()->setShrinkToFit(true);\n\n                        break;\n                }\n                $readOrder = (0xC0 & ord($recordData[8])) >> 6;\n                $objStyle->getAlignment()->setReadOrder($readOrder);\n\n                // offset:  9; size: 1; Flags used for attribute groups\n\n                // offset: 10; size: 4; Cell border lines and background area\n                // bit: 3-0; mask: 0x0000000F; left style\n                if ($bordersLeftStyle = Xls\\Style\\Border::lookup((0x0000000F & self::getInt4d($recordData, 10)) >> 0)) {\n                    $objStyle->getBorders()->getLeft()->setBorderStyle($bordersLeftStyle);\n                }\n                // bit: 7-4; mask: 0x000000F0; right style\n                if ($bordersRightStyle = Xls\\Style\\Border::lookup((0x000000F0 & self::getInt4d($recordData, 10)) >> 4)) {\n                    $objStyle->getBorders()->getRight()->setBorderStyle($bordersRightStyle);\n                }\n                // bit: 11-8; mask: 0x00000F00; top style\n                if ($bordersTopStyle = Xls\\Style\\Border::lookup((0x00000F00 & self::getInt4d($recordData, 10)) >> 8)) {\n                    $objStyle->getBorders()->getTop()->setBorderStyle($bordersTopStyle);\n                }\n                // bit: 15-12; mask: 0x0000F000; bottom style\n                if ($bordersBottomStyle = Xls\\Style\\Border::lookup((0x0000F000 & self::getInt4d($recordData, 10)) >> 12)) {\n                    $objStyle->getBorders()->getBottom()->setBorderStyle($bordersBottomStyle);\n                }\n                // bit: 22-16; mask: 0x007F0000; left color\n                $objStyle->getBorders()->getLeft()->colorIndex = (0x007F0000 & self::getInt4d($recordData, 10)) >> 16;\n\n                // bit: 29-23; mask: 0x3F800000; right color\n                $objStyle->getBorders()->getRight()->colorIndex = (0x3F800000 & self::getInt4d($recordData, 10)) >> 23;\n\n                // bit: 30; mask: 0x40000000; 1 = diagonal line from top left to right bottom\n                $diagonalDown = (0x40000000 & self::getInt4d($recordData, 10)) >> 30 ? true : false;\n\n                // bit: 31; mask: 0x800000; 1 = diagonal line from bottom left to top right\n                $diagonalUp = (self::HIGH_ORDER_BIT & self::getInt4d($recordData, 10)) >> 31 ? true : false;\n\n                if ($diagonalUp === false) {\n                    if ($diagonalDown === false) {\n                        $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_NONE);\n                    } else {\n                        $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_DOWN);\n                    }\n                } elseif ($diagonalDown === false) {\n                    $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_UP);\n                } else {\n                    $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_BOTH);\n                }\n\n                // offset: 14; size: 4;\n                // bit: 6-0; mask: 0x0000007F; top color\n                $objStyle->getBorders()->getTop()->colorIndex = (0x0000007F & self::getInt4d($recordData, 14)) >> 0;\n\n                // bit: 13-7; mask: 0x00003F80; bottom color\n                $objStyle->getBorders()->getBottom()->colorIndex = (0x00003F80 & self::getInt4d($recordData, 14)) >> 7;\n\n                // bit: 20-14; mask: 0x001FC000; diagonal color\n                $objStyle->getBorders()->getDiagonal()->colorIndex = (0x001FC000 & self::getInt4d($recordData, 14)) >> 14;\n\n                // bit: 24-21; mask: 0x01E00000; diagonal style\n                if ($bordersDiagonalStyle = Xls\\Style\\Border::lookup((0x01E00000 & self::getInt4d($recordData, 14)) >> 21)) {\n                    $objStyle->getBorders()->getDiagonal()->setBorderStyle($bordersDiagonalStyle);\n                }\n\n                // bit: 31-26; mask: 0xFC000000 fill pattern\n                if ($fillType = FillPattern::lookup((self::FC000000 & self::getInt4d($recordData, 14)) >> 26)) {\n                    $objStyle->getFill()->setFillType($fillType);\n                }\n                // offset: 18; size: 2; pattern and background colour\n                // bit: 6-0; mask: 0x007F; color index for pattern color\n                $objStyle->getFill()->startcolorIndex = (0x007F & self::getUInt2d($recordData, 18)) >> 0;\n\n                // bit: 13-7; mask: 0x3F80; color index for pattern background\n                $objStyle->getFill()->endcolorIndex = (0x3F80 & self::getUInt2d($recordData, 18)) >> 7;\n            } else {\n                // BIFF5\n\n                // offset: 7; size: 1; Text orientation and flags\n                $orientationAndFlags = ord($recordData[7]);\n\n                // bit: 1-0; mask: 0x03; XF_ORIENTATION: Text orientation\n                $xfOrientation = (0x03 & $orientationAndFlags) >> 0;\n                switch ($xfOrientation) {\n                    case 0:\n                        $objStyle->getAlignment()->setTextRotation(0);\n\n                        break;\n                    case 1:\n                        $objStyle->getAlignment()->setTextRotation(Alignment::TEXTROTATION_STACK_PHPSPREADSHEET);\n\n                        break;\n                    case 2:\n                        $objStyle->getAlignment()->setTextRotation(90);\n\n                        break;\n                    case 3:\n                        $objStyle->getAlignment()->setTextRotation(-90);\n\n                        break;\n                }\n\n                // offset: 8; size: 4; cell border lines and background area\n                $borderAndBackground = self::getInt4d($recordData, 8);\n\n                // bit: 6-0; mask: 0x0000007F; color index for pattern color\n                $objStyle->getFill()->startcolorIndex = (0x0000007F & $borderAndBackground) >> 0;\n\n                // bit: 13-7; mask: 0x00003F80; color index for pattern background\n                $objStyle->getFill()->endcolorIndex = (0x00003F80 & $borderAndBackground) >> 7;\n\n                // bit: 21-16; mask: 0x003F0000; fill pattern\n                $objStyle->getFill()->setFillType(FillPattern::lookup((0x003F0000 & $borderAndBackground) >> 16));\n\n                // bit: 24-22; mask: 0x01C00000; bottom line style\n                $objStyle->getBorders()->getBottom()->setBorderStyle(Xls\\Style\\Border::lookup((0x01C00000 & $borderAndBackground) >> 22));\n\n                // bit: 31-25; mask: 0xFE000000; bottom line color\n                $objStyle->getBorders()->getBottom()->colorIndex = (self::FE000000 & $borderAndBackground) >> 25;\n\n                // offset: 12; size: 4; cell border lines\n                $borderLines = self::getInt4d($recordData, 12);\n\n                // bit: 2-0; mask: 0x00000007; top line style\n                $objStyle->getBorders()->getTop()->setBorderStyle(Xls\\Style\\Border::lookup((0x00000007 & $borderLines) >> 0));\n\n                // bit: 5-3; mask: 0x00000038; left line style\n                $objStyle->getBorders()->getLeft()->setBorderStyle(Xls\\Style\\Border::lookup((0x00000038 & $borderLines) >> 3));\n\n                // bit: 8-6; mask: 0x000001C0; right line style\n                $objStyle->getBorders()->getRight()->setBorderStyle(Xls\\Style\\Border::lookup((0x000001C0 & $borderLines) >> 6));\n\n                // bit: 15-9; mask: 0x0000FE00; top line color index\n                $objStyle->getBorders()->getTop()->colorIndex = (0x0000FE00 & $borderLines) >> 9;\n\n                // bit: 22-16; mask: 0x007F0000; left line color index\n                $objStyle->getBorders()->getLeft()->colorIndex = (0x007F0000 & $borderLines) >> 16;\n\n                // bit: 29-23; mask: 0x3F800000; right line color index\n                $objStyle->getBorders()->getRight()->colorIndex = (0x3F800000 & $borderLines) >> 23;\n            }\n\n            // add cellStyleXf or cellXf and update mapping\n            if ($isCellStyleXf) {\n                // we only read one style XF record which is always the first\n                if ($this->xfIndex == 0) {\n                    $this->spreadsheet->addCellStyleXf($objStyle);\n                    $this->mapCellStyleXfIndex[$this->xfIndex] = 0;\n                }\n            } else {\n                // we read all cell XF records\n                $this->spreadsheet->addCellXf($objStyle);\n                $this->mapCellXfIndex[$this->xfIndex] = count($this->spreadsheet->getCellXfCollection()) - 1;\n            }\n\n            // update XF index for when we read next record\n            ++$this->xfIndex;\n        }\n    }\n\n    protected function readXfExt(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; 0x087D = repeated header\n\n            // offset: 2; size: 2\n\n            // offset: 4; size: 8; not used\n\n            // offset: 12; size: 2; record version\n\n            // offset: 14; size: 2; index to XF record which this record modifies\n            $ixfe = self::getUInt2d($recordData, 14);\n\n            // offset: 16; size: 2; not used\n\n            // offset: 18; size: 2; number of extension properties that follow\n            //$cexts = self::getUInt2d($recordData, 18);\n\n            // start reading the actual extension data\n            $offset = 20;\n            while ($offset < $length) {\n                // extension type\n                $extType = self::getUInt2d($recordData, $offset);\n\n                // extension length\n                $cb = self::getUInt2d($recordData, $offset + 2);\n\n                // extension data\n                $extData = substr($recordData, $offset + 4, $cb);\n\n                switch ($extType) {\n                    case 4:        // fill start color\n                        $xclfType = self::getUInt2d($extData, 0); // color type\n                        $xclrValue = substr($extData, 4, 4); // color value (value based on color type)\n\n                        if ($xclfType == 2) {\n                            $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));\n\n                            // modify the relevant style property\n                            if (isset($this->mapCellXfIndex[$ixfe])) {\n                                $fill = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFill();\n                                $fill->getStartColor()->setRGB($rgb);\n                                $fill->startcolorIndex = null; // normal color index does not apply, discard\n                            }\n                        }\n\n                        break;\n                    case 5:        // fill end color\n                        $xclfType = self::getUInt2d($extData, 0); // color type\n                        $xclrValue = substr($extData, 4, 4); // color value (value based on color type)\n\n                        if ($xclfType == 2) {\n                            $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));\n\n                            // modify the relevant style property\n                            if (isset($this->mapCellXfIndex[$ixfe])) {\n                                $fill = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFill();\n                                $fill->getEndColor()->setRGB($rgb);\n                                $fill->endcolorIndex = null; // normal color index does not apply, discard\n                            }\n                        }\n\n                        break;\n                    case 7:        // border color top\n                        $xclfType = self::getUInt2d($extData, 0); // color type\n                        $xclrValue = substr($extData, 4, 4); // color value (value based on color type)\n\n                        if ($xclfType == 2) {\n                            $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));\n\n                            // modify the relevant style property\n                            if (isset($this->mapCellXfIndex[$ixfe])) {\n                                $top = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getTop();\n                                $top->getColor()->setRGB($rgb);\n                                $top->colorIndex = null; // normal color index does not apply, discard\n                            }\n                        }\n\n                        break;\n                    case 8:        // border color bottom\n                        $xclfType = self::getUInt2d($extData, 0); // color type\n                        $xclrValue = substr($extData, 4, 4); // color value (value based on color type)\n\n                        if ($xclfType == 2) {\n                            $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));\n\n                            // modify the relevant style property\n                            if (isset($this->mapCellXfIndex[$ixfe])) {\n                                $bottom = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getBottom();\n                                $bottom->getColor()->setRGB($rgb);\n                                $bottom->colorIndex = null; // normal color index does not apply, discard\n                            }\n                        }\n\n                        break;\n                    case 9:        // border color left\n                        $xclfType = self::getUInt2d($extData, 0); // color type\n                        $xclrValue = substr($extData, 4, 4); // color value (value based on color type)\n\n                        if ($xclfType == 2) {\n                            $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));\n\n                            // modify the relevant style property\n                            if (isset($this->mapCellXfIndex[$ixfe])) {\n                                $left = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getLeft();\n                                $left->getColor()->setRGB($rgb);\n                                $left->colorIndex = null; // normal color index does not apply, discard\n                            }\n                        }\n\n                        break;\n                    case 10:        // border color right\n                        $xclfType = self::getUInt2d($extData, 0); // color type\n                        $xclrValue = substr($extData, 4, 4); // color value (value based on color type)\n\n                        if ($xclfType == 2) {\n                            $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));\n\n                            // modify the relevant style property\n                            if (isset($this->mapCellXfIndex[$ixfe])) {\n                                $right = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getRight();\n                                $right->getColor()->setRGB($rgb);\n                                $right->colorIndex = null; // normal color index does not apply, discard\n                            }\n                        }\n\n                        break;\n                    case 11:        // border color diagonal\n                        $xclfType = self::getUInt2d($extData, 0); // color type\n                        $xclrValue = substr($extData, 4, 4); // color value (value based on color type)\n\n                        if ($xclfType == 2) {\n                            $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));\n\n                            // modify the relevant style property\n                            if (isset($this->mapCellXfIndex[$ixfe])) {\n                                $diagonal = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getDiagonal();\n                                $diagonal->getColor()->setRGB($rgb);\n                                $diagonal->colorIndex = null; // normal color index does not apply, discard\n                            }\n                        }\n\n                        break;\n                    case 13:    // font color\n                        $xclfType = self::getUInt2d($extData, 0); // color type\n                        $xclrValue = substr($extData, 4, 4); // color value (value based on color type)\n\n                        if ($xclfType == 2) {\n                            $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));\n\n                            // modify the relevant style property\n                            if (isset($this->mapCellXfIndex[$ixfe])) {\n                                $font = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFont();\n                                $font->getColor()->setRGB($rgb);\n                                $font->colorIndex = null; // normal color index does not apply, discard\n                            }\n                        }\n\n                        break;\n                }\n\n                $offset += $cb;\n            }\n        }\n    }\n\n    /**\n     * Read STYLE record.\n     */\n    protected function readStyle(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; index to XF record and flag for built-in style\n            $ixfe = self::getUInt2d($recordData, 0);\n\n            // bit: 11-0; mask 0x0FFF; index to XF record\n            //$xfIndex = (0x0FFF & $ixfe) >> 0;\n\n            // bit: 15; mask 0x8000; 0 = user-defined style, 1 = built-in style\n            $isBuiltIn = (bool) ((0x8000 & $ixfe) >> 15);\n\n            if ($isBuiltIn) {\n                // offset: 2; size: 1; identifier for built-in style\n                $builtInId = ord($recordData[2]);\n\n                switch ($builtInId) {\n                    case 0x00:\n                        // currently, we are not using this for anything\n                        break;\n                    default:\n                        break;\n                }\n            }\n            // user-defined; not supported by PhpSpreadsheet\n        }\n    }\n\n    /**\n     * Read PALETTE record.\n     */\n    protected function readPalette(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; number of following colors\n            $nm = self::getUInt2d($recordData, 0);\n\n            // list of RGB colors\n            for ($i = 0; $i < $nm; ++$i) {\n                $rgb = substr($recordData, 2 + 4 * $i, 4);\n                $this->palette[] = self::readRGB($rgb);\n            }\n        }\n    }\n\n    /**\n     * SHEET.\n     *\n     * This record is  located in the  Workbook Globals\n     * Substream  and represents a sheet inside the workbook.\n     * One SHEET record is written for each sheet. It stores the\n     * sheet name and a stream offset to the BOF record of the\n     * respective Sheet Substream within the Workbook Stream.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readSheet(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // offset: 0; size: 4; absolute stream position of the BOF record of the sheet\n        // NOTE: not encrypted\n        $rec_offset = self::getInt4d($this->data, $this->pos + 4);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 4; size: 1; sheet state\n        $sheetState = match (ord($recordData[4])) {\n            0x00 => Worksheet::SHEETSTATE_VISIBLE,\n            0x01 => Worksheet::SHEETSTATE_HIDDEN,\n            0x02 => Worksheet::SHEETSTATE_VERYHIDDEN,\n            default => Worksheet::SHEETSTATE_VISIBLE,\n        };\n\n        // offset: 5; size: 1; sheet type\n        $sheetType = ord($recordData[5]);\n\n        // offset: 6; size: var; sheet name\n        $rec_name = null;\n        if ($this->version == self::XLS_BIFF8) {\n            $string = self::readUnicodeStringShort(substr($recordData, 6));\n            $rec_name = $string['value'];\n        } elseif ($this->version == self::XLS_BIFF7) {\n            $string = $this->readByteStringShort(substr($recordData, 6));\n            $rec_name = $string['value'];\n        }\n        /** @var string $rec_name */\n        $this->sheets[] = [\n            'name' => $rec_name,\n            'offset' => $rec_offset,\n            'sheetState' => $sheetState,\n            'sheetType' => $sheetType,\n        ];\n    }\n\n    /**\n     * Read EXTERNALBOOK record.\n     */\n    protected function readExternalBook(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset within record data\n        $offset = 0;\n\n        // there are 4 types of records\n        if (strlen($recordData) > 4) {\n            // external reference\n            // offset: 0; size: 2; number of sheet names ($nm)\n            $nm = self::getUInt2d($recordData, 0);\n            $offset += 2;\n\n            // offset: 2; size: var; encoded URL without sheet name (Unicode string, 16-bit length)\n            $encodedUrlString = self::readUnicodeStringLong(substr($recordData, 2));\n            $offset += $encodedUrlString['size'];\n\n            // offset: var; size: var; list of $nm sheet names (Unicode strings, 16-bit length)\n            $externalSheetNames = [];\n            for ($i = 0; $i < $nm; ++$i) {\n                $externalSheetNameString = self::readUnicodeStringLong(substr($recordData, $offset));\n                $externalSheetNames[] = $externalSheetNameString['value'];\n                $offset += $externalSheetNameString['size'];\n            }\n\n            // store the record data\n            $this->externalBooks[] = [\n                'type' => 'external',\n                'encodedUrl' => $encodedUrlString['value'],\n                'externalSheetNames' => $externalSheetNames,\n            ];\n        } elseif (substr($recordData, 2, 2) == pack('CC', 0x01, 0x04)) {\n            // internal reference\n            // offset: 0; size: 2; number of sheet in this document\n            // offset: 2; size: 2; 0x01 0x04\n            $this->externalBooks[] = [\n                'type' => 'internal',\n            ];\n        } elseif (substr($recordData, 0, 4) == pack('vCC', 0x0001, 0x01, 0x3A)) {\n            // add-in function\n            // offset: 0; size: 2; 0x0001\n            $this->externalBooks[] = [\n                'type' => 'addInFunction',\n            ];\n        } elseif (substr($recordData, 0, 2) == pack('v', 0x0000)) {\n            // DDE links, OLE links\n            // offset: 0; size: 2; 0x0000\n            // offset: 2; size: var; encoded source document name\n            $this->externalBooks[] = [\n                'type' => 'DDEorOLE',\n            ];\n        }\n    }\n\n    /**\n     * Read EXTERNNAME record.\n     */\n    protected function readExternName(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // external sheet references provided for named cells\n        if ($this->version == self::XLS_BIFF8) {\n            // offset: 0; size: 2; options\n            //$options = self::getUInt2d($recordData, 0);\n\n            // offset: 2; size: 2;\n\n            // offset: 4; size: 2; not used\n\n            // offset: 6; size: var\n            $nameString = self::readUnicodeStringShort(substr($recordData, 6));\n\n            // offset: var; size: var; formula data\n            $offset = 6 + $nameString['size'];\n            $formula = $this->getFormulaFromStructure(substr($recordData, $offset));\n\n            $this->externalNames[] = [\n                'name' => $nameString['value'],\n                'formula' => $formula,\n            ];\n        }\n    }\n\n    /**\n     * Read EXTERNSHEET record.\n     */\n    protected function readExternSheet(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // external sheet references provided for named cells\n        if ($this->version == self::XLS_BIFF8) {\n            // offset: 0; size: 2; number of following ref structures\n            $nm = self::getUInt2d($recordData, 0);\n            for ($i = 0; $i < $nm; ++$i) {\n                $this->ref[] = [\n                    // offset: 2 + 6 * $i; index to EXTERNALBOOK record\n                    'externalBookIndex' => self::getUInt2d($recordData, 2 + 6 * $i),\n                    // offset: 4 + 6 * $i; index to first sheet in EXTERNALBOOK record\n                    'firstSheetIndex' => self::getUInt2d($recordData, 4 + 6 * $i),\n                    // offset: 6 + 6 * $i; index to last sheet in EXTERNALBOOK record\n                    'lastSheetIndex' => self::getUInt2d($recordData, 6 + 6 * $i),\n                ];\n            }\n        }\n    }\n\n    /**\n     * DEFINEDNAME.\n     *\n     * This record is part of a Link Table. It contains the name\n     * and the token array of an internal defined name. Token\n     * arrays of defined names contain tokens with aberrant\n     * token classes.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readDefinedName(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->version == self::XLS_BIFF8) {\n            // retrieves named cells\n\n            // offset: 0; size: 2; option flags\n            $opts = self::getUInt2d($recordData, 0);\n\n            // bit: 5; mask: 0x0020; 0 = user-defined name, 1 = built-in-name\n            $isBuiltInName = (0x0020 & $opts) >> 5;\n\n            // offset: 2; size: 1; keyboard shortcut\n\n            // offset: 3; size: 1; length of the name (character count)\n            $nlen = ord($recordData[3]);\n\n            // offset: 4; size: 2; size of the formula data (it can happen that this is zero)\n            // note: there can also be additional data, this is not included in $flen\n            $flen = self::getUInt2d($recordData, 4);\n\n            // offset: 8; size: 2; 0=Global name, otherwise index to sheet (1-based)\n            $scope = self::getUInt2d($recordData, 8);\n\n            // offset: 14; size: var; Name (Unicode string without length field)\n            $string = self::readUnicodeString(substr($recordData, 14), $nlen);\n\n            // offset: var; size: $flen; formula data\n            $offset = 14 + $string['size'];\n            $formulaStructure = pack('v', $flen) . substr($recordData, $offset);\n\n            try {\n                $formula = $this->getFormulaFromStructure($formulaStructure);\n            } catch (PhpSpreadsheetException) {\n                $formula = '';\n                $isBuiltInName = 0;\n            }\n\n            $this->definedname[] = [\n                'isBuiltInName' => $isBuiltInName,\n                'name' => $string['value'],\n                'formula' => $formula,\n                'scope' => $scope,\n            ];\n        }\n    }\n\n    /**\n     * Read MSODRAWINGGROUP record.\n     */\n    protected function readMsoDrawingGroup(): void\n    {\n        //$length = self::getUInt2d($this->data, $this->pos + 2);\n\n        // get spliced record data\n        $splicedRecordData = $this->getSplicedRecordData();\n        /** @var string */\n        $recordData = $splicedRecordData['recordData'];\n\n        $this->drawingGroupData .= $recordData;\n    }\n\n    /**\n     * SST - Shared String Table.\n     *\n     * This record contains a list of all strings used anywhere\n     * in the workbook. Each string occurs only once. The\n     * workbook uses indexes into the list to reference the\n     * strings.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readSst(): void\n    {\n        // offset within (spliced) record data\n        $pos = 0;\n\n        // Limit global SST position, further control for bad SST Length in BIFF8 data\n        $limitposSST = 0;\n\n        // get spliced record data\n        $splicedRecordData = $this->getSplicedRecordData();\n\n        $recordData = $splicedRecordData['recordData'];\n        /** @var mixed[] */\n        $spliceOffsets = $splicedRecordData['spliceOffsets'];\n\n        // offset: 0; size: 4; total number of strings in the workbook\n        $pos += 4;\n\n        // offset: 4; size: 4; number of following strings ($nm)\n        /** @var string $recordData */\n        $nm = self::getInt4d($recordData, 4);\n        $pos += 4;\n\n        // look up limit position\n        foreach ($spliceOffsets as $spliceOffset) {\n            // it can happen that the string is empty, therefore we need\n            // <= and not just <\n            if ($pos <= $spliceOffset) {\n                $limitposSST = $spliceOffset;\n            }\n        }\n\n        // loop through the Unicode strings (16-bit length)\n        for ($i = 0; $i < $nm && $pos < $limitposSST; ++$i) {\n            // number of characters in the Unicode string\n            /** @var int $pos */\n            $numChars = self::getUInt2d($recordData, $pos);\n            /** @var int $pos */\n            $pos += 2;\n\n            // option flags\n            /** @var string $recordData */\n            $optionFlags = ord($recordData[$pos]);\n            ++$pos;\n\n            // bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed\n            $isCompressed = (($optionFlags & 0x01) == 0);\n\n            // bit: 2; mask: 0x02; 0 = ordinary; 1 = Asian phonetic\n            $hasAsian = (($optionFlags & 0x04) != 0);\n\n            // bit: 3; mask: 0x03; 0 = ordinary; 1 = Rich-Text\n            $hasRichText = (($optionFlags & 0x08) != 0);\n\n            $formattingRuns = 0;\n            if ($hasRichText) {\n                // number of Rich-Text formatting runs\n                $formattingRuns = self::getUInt2d($recordData, $pos);\n                $pos += 2;\n            }\n\n            $extendedRunLength = 0;\n            if ($hasAsian) {\n                // size of Asian phonetic setting\n                $extendedRunLength = self::getInt4d($recordData, $pos);\n                $pos += 4;\n            }\n\n            // expected byte length of character array if not split\n            $len = ($isCompressed) ? $numChars : $numChars * 2;\n\n            // look up limit position - Check it again to be sure that no error occurs when parsing SST structure\n            $limitpos = null;\n            foreach ($spliceOffsets as $spliceOffset) {\n                // it can happen that the string is empty, therefore we need\n                // <= and not just <\n                if ($pos <= $spliceOffset) {\n                    $limitpos = $spliceOffset;\n\n                    break;\n                }\n            }\n\n            /** @var int $limitpos */\n            if ($pos + $len <= $limitpos) {\n                // character array is not split between records\n\n                $retstr = substr($recordData, $pos, $len);\n                $pos += $len;\n            } else {\n                // character array is split between records\n\n                // first part of character array\n                $retstr = substr($recordData, $pos, $limitpos - $pos);\n\n                $bytesRead = $limitpos - $pos;\n\n                // remaining characters in Unicode string\n                $charsLeft = $numChars - (($isCompressed) ? $bytesRead : ($bytesRead / 2));\n\n                $pos = $limitpos;\n\n                // keep reading the characters\n                while ($charsLeft > 0) {\n                    // look up next limit position, in case the string span more than one continue record\n                    foreach ($spliceOffsets as $spliceOffset) {\n                        if ($pos < $spliceOffset) {\n                            $limitpos = $spliceOffset;\n\n                            break;\n                        }\n                    }\n\n                    // repeated option flags\n                    // OpenOffice.org documentation 5.21\n                    /** @var int $pos */\n                    $option = ord($recordData[$pos]);\n                    ++$pos;\n\n                    /** @var int $limitpos */\n                    if ($isCompressed && ($option == 0)) {\n                        // 1st fragment compressed\n                        // this fragment compressed\n                        /** @var int */\n                        $len = min($charsLeft, $limitpos - $pos);\n                        $retstr .= substr($recordData, $pos, $len);\n                        $charsLeft -= $len;\n                        $isCompressed = true;\n                    } elseif (!$isCompressed && ($option != 0)) {\n                        // 1st fragment uncompressed\n                        // this fragment uncompressed\n                        /** @var int */\n                        $len = min($charsLeft * 2, $limitpos - $pos);\n                        $retstr .= substr($recordData, $pos, $len);\n                        $charsLeft -= $len / 2;\n                        $isCompressed = false;\n                    } elseif (!$isCompressed && ($option == 0)) {\n                        // 1st fragment uncompressed\n                        // this fragment compressed\n                        $len = min($charsLeft, $limitpos - $pos);\n                        for ($j = 0; $j < $len; ++$j) {\n                            $retstr .= $recordData[$pos + $j]\n                                . chr(0);\n                        }\n                        $charsLeft -= $len;\n                        $isCompressed = false;\n                    } else {\n                        // 1st fragment compressed\n                        // this fragment uncompressed\n                        $newstr = '';\n                        $jMax = strlen($retstr);\n                        for ($j = 0; $j < $jMax; ++$j) {\n                            $newstr .= $retstr[$j] . chr(0);\n                        }\n                        $retstr = $newstr;\n                        /** @var int */\n                        $len = min($charsLeft * 2, $limitpos - $pos);\n                        $retstr .= substr($recordData, $pos, $len);\n                        $charsLeft -= $len / 2;\n                        $isCompressed = false;\n                    }\n\n                    $pos += $len;\n                }\n            }\n\n            // convert to UTF-8\n            $retstr = self::encodeUTF16($retstr, $isCompressed);\n\n            // read additional Rich-Text information, if any\n            $fmtRuns = [];\n            if ($hasRichText) {\n                // list of formatting runs\n                for ($j = 0; $j < $formattingRuns; ++$j) {\n                    // first formatted character; zero-based\n                    /** @var int $pos */\n                    $charPos = self::getUInt2d($recordData, $pos + $j * 4);\n\n                    // index to font record\n                    $fontIndex = self::getUInt2d($recordData, $pos + 2 + $j * 4);\n\n                    $fmtRuns[] = [\n                        'charPos' => $charPos,\n                        'fontIndex' => $fontIndex,\n                    ];\n                }\n                $pos += 4 * $formattingRuns;\n            }\n\n            // read additional Asian phonetics information, if any\n            if ($hasAsian) {\n                // For Asian phonetic settings, we skip the extended string data\n                $pos += $extendedRunLength;\n            }\n\n            // store the shared sting\n            $this->sst[] = [\n                'value' => $retstr,\n                'fmtRuns' => $fmtRuns,\n            ];\n        }\n\n        // getSplicedRecordData() takes care of moving current position in data stream\n    }\n\n    /**\n     * Read PRINTGRIDLINES record.\n     */\n    protected function readPrintGridlines(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {\n            // offset: 0; size: 2; 0 = do not print sheet grid lines; 1 = print sheet gridlines\n            $printGridlines = (bool) self::getUInt2d($recordData, 0);\n            $this->phpSheet->setPrintGridlines($printGridlines);\n        }\n    }\n\n    /**\n     * Read DEFAULTROWHEIGHT record.\n     */\n    protected function readDefaultRowHeight(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; option flags\n        // offset: 2; size: 2; default height for unused rows, (twips 1/20 point)\n        $height = self::getUInt2d($recordData, 2);\n        $this->phpSheet->getDefaultRowDimension()->setRowHeight($height / 20);\n    }\n\n    /**\n     * Read SHEETPR record.\n     */\n    protected function readSheetPr(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2\n\n        // bit: 6; mask: 0x0040; 0 = outline buttons above outline group\n        $isSummaryBelow = (0x0040 & self::getUInt2d($recordData, 0)) >> 6;\n        $this->phpSheet->setShowSummaryBelow((bool) $isSummaryBelow);\n\n        // bit: 7; mask: 0x0080; 0 = outline buttons left of outline group\n        $isSummaryRight = (0x0080 & self::getUInt2d($recordData, 0)) >> 7;\n        $this->phpSheet->setShowSummaryRight((bool) $isSummaryRight);\n\n        // bit: 8; mask: 0x100; 0 = scale printout in percent, 1 = fit printout to number of pages\n        // this corresponds to radio button setting in page setup dialog in Excel\n        $this->isFitToPages = (bool) ((0x0100 & self::getUInt2d($recordData, 0)) >> 8);\n    }\n\n    /**\n     * Read HORIZONTALPAGEBREAKS record.\n     */\n    protected function readHorizontalPageBreaks(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {\n            // offset: 0; size: 2; number of the following row index structures\n            $nm = self::getUInt2d($recordData, 0);\n\n            // offset: 2; size: 6 * $nm; list of $nm row index structures\n            for ($i = 0; $i < $nm; ++$i) {\n                $r = self::getUInt2d($recordData, 2 + 6 * $i);\n                $cf = self::getUInt2d($recordData, 2 + 6 * $i + 2);\n                //$cl = self::getUInt2d($recordData, 2 + 6 * $i + 4);\n\n                // not sure why two column indexes are necessary?\n                $this->phpSheet->setBreak([$cf + 1, $r], Worksheet::BREAK_ROW);\n            }\n        }\n    }\n\n    /**\n     * Read VERTICALPAGEBREAKS record.\n     */\n    protected function readVerticalPageBreaks(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {\n            // offset: 0; size: 2; number of the following column index structures\n            $nm = self::getUInt2d($recordData, 0);\n\n            // offset: 2; size: 6 * $nm; list of $nm row index structures\n            for ($i = 0; $i < $nm; ++$i) {\n                $c = self::getUInt2d($recordData, 2 + 6 * $i);\n                $rf = self::getUInt2d($recordData, 2 + 6 * $i + 2);\n                //$rl = self::getUInt2d($recordData, 2 + 6 * $i + 4);\n\n                // not sure why two row indexes are necessary?\n                $this->phpSheet->setBreak([$c + 1, ($rf > 0) ? $rf : 1], Worksheet::BREAK_COLUMN);\n            }\n        }\n    }\n\n    /**\n     * Read HEADER record.\n     */\n    protected function readHeader(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: var\n            // realized that $recordData can be empty even when record exists\n            if ($recordData) {\n                if ($this->version == self::XLS_BIFF8) {\n                    $string = self::readUnicodeStringLong($recordData);\n                } else {\n                    $string = $this->readByteStringShort($recordData);\n                }\n\n                /** @var string[] $string */\n                $this->phpSheet\n                    ->getHeaderFooter()\n                    ->setOddHeader($string['value']);\n                $this->phpSheet\n                    ->getHeaderFooter()\n                    ->setEvenHeader($string['value']);\n            }\n        }\n    }\n\n    /**\n     * Read FOOTER record.\n     */\n    protected function readFooter(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: var\n            // realized that $recordData can be empty even when record exists\n            if ($recordData) {\n                if ($this->version == self::XLS_BIFF8) {\n                    $string = self::readUnicodeStringLong($recordData);\n                } else {\n                    $string = $this->readByteStringShort($recordData);\n                }\n                /** @var string */\n                $temp = $string['value'];\n                $this->phpSheet\n                    ->getHeaderFooter()\n                    ->setOddFooter($temp);\n                $this->phpSheet\n                    ->getHeaderFooter()\n                    ->setEvenFooter($temp);\n            }\n        }\n    }\n\n    /**\n     * Read HCENTER record.\n     */\n    protected function readHcenter(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; 0 = print sheet left aligned, 1 = print sheet centered horizontally\n            $isHorizontalCentered = (bool) self::getUInt2d($recordData, 0);\n\n            $this->phpSheet->getPageSetup()->setHorizontalCentered($isHorizontalCentered);\n        }\n    }\n\n    /**\n     * Read VCENTER record.\n     */\n    protected function readVcenter(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; 0 = print sheet aligned at top page border, 1 = print sheet vertically centered\n            $isVerticalCentered = (bool) self::getUInt2d($recordData, 0);\n\n            $this->phpSheet->getPageSetup()->setVerticalCentered($isVerticalCentered);\n        }\n    }\n\n    /**\n     * Read LEFTMARGIN record.\n     */\n    protected function readLeftMargin(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 8\n            $this->phpSheet->getPageMargins()->setLeft(self::extractNumber($recordData));\n        }\n    }\n\n    /**\n     * Read RIGHTMARGIN record.\n     */\n    protected function readRightMargin(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 8\n            $this->phpSheet->getPageMargins()->setRight(self::extractNumber($recordData));\n        }\n    }\n\n    /**\n     * Read TOPMARGIN record.\n     */\n    protected function readTopMargin(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 8\n            $this->phpSheet->getPageMargins()->setTop(self::extractNumber($recordData));\n        }\n    }\n\n    /**\n     * Read BOTTOMMARGIN record.\n     */\n    protected function readBottomMargin(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 8\n            $this->phpSheet->getPageMargins()->setBottom(self::extractNumber($recordData));\n        }\n    }\n\n    /**\n     * Read PAGESETUP record.\n     */\n    protected function readPageSetup(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; paper size\n            $paperSize = self::getUInt2d($recordData, 0);\n\n            // offset: 2; size: 2; scaling factor\n            $scale = self::getUInt2d($recordData, 2);\n\n            // offset: 6; size: 2; fit worksheet width to this number of pages, 0 = use as many as needed\n            $fitToWidth = self::getUInt2d($recordData, 6);\n\n            // offset: 8; size: 2; fit worksheet height to this number of pages, 0 = use as many as needed\n            $fitToHeight = self::getUInt2d($recordData, 8);\n\n            // offset: 10; size: 2; option flags\n\n            // bit: 0; mask: 0x0001; 0=down then over, 1=over then down\n            $isOverThenDown = (0x0001 & self::getUInt2d($recordData, 10));\n\n            // bit: 1; mask: 0x0002; 0=landscape, 1=portrait\n            $isPortrait = (0x0002 & self::getUInt2d($recordData, 10)) >> 1;\n\n            // bit: 2; mask: 0x0004; 1= paper size, scaling factor, paper orient. not init\n            // when this bit is set, do not use flags for those properties\n            $isNotInit = (0x0004 & self::getUInt2d($recordData, 10)) >> 2;\n\n            if (!$isNotInit) {\n                $this->phpSheet->getPageSetup()->setPaperSize($paperSize);\n                $this->phpSheet->getPageSetup()->setPageOrder(((bool) $isOverThenDown) ? PageSetup::PAGEORDER_OVER_THEN_DOWN : PageSetup::PAGEORDER_DOWN_THEN_OVER);\n                $this->phpSheet->getPageSetup()->setOrientation(((bool) $isPortrait) ? PageSetup::ORIENTATION_PORTRAIT : PageSetup::ORIENTATION_LANDSCAPE);\n\n                $this->phpSheet->getPageSetup()->setScale($scale, false);\n                $this->phpSheet->getPageSetup()->setFitToPage((bool) $this->isFitToPages);\n                $this->phpSheet->getPageSetup()->setFitToWidth($fitToWidth, false);\n                $this->phpSheet->getPageSetup()->setFitToHeight($fitToHeight, false);\n            }\n\n            // offset: 16; size: 8; header margin (IEEE 754 floating-point value)\n            $marginHeader = self::extractNumber(substr($recordData, 16, 8));\n            $this->phpSheet->getPageMargins()->setHeader($marginHeader);\n\n            // offset: 24; size: 8; footer margin (IEEE 754 floating-point value)\n            $marginFooter = self::extractNumber(substr($recordData, 24, 8));\n            $this->phpSheet->getPageMargins()->setFooter($marginFooter);\n        }\n    }\n\n    /**\n     * PROTECT - Sheet protection (BIFF2 through BIFF8)\n     *   if this record is omitted, then it also means no sheet protection.\n     */\n    protected function readProtect(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->readDataOnly) {\n            return;\n        }\n\n        // offset: 0; size: 2;\n\n        // bit 0, mask 0x01; 1 = sheet is protected\n        $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0;\n        $this->phpSheet->getProtection()->setSheet((bool) $bool);\n    }\n\n    /**\n     * SCENPROTECT.\n     */\n    protected function readScenProtect(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->readDataOnly) {\n            return;\n        }\n\n        // offset: 0; size: 2;\n\n        // bit: 0, mask 0x01; 1 = scenarios are protected\n        $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0;\n\n        $this->phpSheet->getProtection()->setScenarios((bool) $bool);\n    }\n\n    /**\n     * OBJECTPROTECT.\n     */\n    protected function readObjectProtect(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->readDataOnly) {\n            return;\n        }\n\n        // offset: 0; size: 2;\n\n        // bit: 0, mask 0x01; 1 = objects are protected\n        $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0;\n\n        $this->phpSheet->getProtection()->setObjects((bool) $bool);\n    }\n\n    /**\n     * PASSWORD - Sheet protection (hashed) password (BIFF2 through BIFF8).\n     */\n    protected function readPassword(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; 16-bit hash value of password\n            $password = strtoupper(dechex(self::getUInt2d($recordData, 0))); // the hashed password\n            $this->phpSheet->getProtection()->setPassword($password, true);\n        }\n    }\n\n    /**\n     * Read DEFCOLWIDTH record.\n     */\n    protected function readDefColWidth(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; default column width\n        $width = self::getUInt2d($recordData, 0);\n        if ($width != 8) {\n            $this->phpSheet->getDefaultColumnDimension()->setWidth($width);\n        }\n    }\n\n    /**\n     * Read COLINFO record.\n     */\n    protected function readColInfo(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; index to first column in range\n            $firstColumnIndex = self::getUInt2d($recordData, 0);\n\n            // offset: 2; size: 2; index to last column in range\n            $lastColumnIndex = self::getUInt2d($recordData, 2);\n\n            // offset: 4; size: 2; width of the column in 1/256 of the width of the zero character\n            $width = self::getUInt2d($recordData, 4);\n\n            // offset: 6; size: 2; index to XF record for default column formatting\n            $xfIndex = self::getUInt2d($recordData, 6);\n\n            // offset: 8; size: 2; option flags\n            // bit: 0; mask: 0x0001; 1= columns are hidden\n            $isHidden = (0x0001 & self::getUInt2d($recordData, 8)) >> 0;\n\n            // bit: 10-8; mask: 0x0700; outline level of the columns (0 = no outline)\n            $level = (0x0700 & self::getUInt2d($recordData, 8)) >> 8;\n\n            // bit: 12; mask: 0x1000; 1 = collapsed\n            $isCollapsed = (bool) ((0x1000 & self::getUInt2d($recordData, 8)) >> 12);\n\n            // offset: 10; size: 2; not used\n\n            for ($i = $firstColumnIndex + 1; $i <= $lastColumnIndex + 1; ++$i) {\n                if ($lastColumnIndex == AddressRange::MAX_COLUMN_INT_XLS - 1 || $lastColumnIndex == AddressRange::MAX_COLUMN_INT) {\n                    $this->phpSheet->getDefaultColumnDimension()->setWidth($width / 256);\n\n                    break;\n                }\n                $this->phpSheet->getColumnDimensionByColumn($i)->setWidth($width / 256);\n                $this->phpSheet->getColumnDimensionByColumn($i)->setVisible(!$isHidden);\n                $this->phpSheet->getColumnDimensionByColumn($i)->setOutlineLevel($level);\n                $this->phpSheet->getColumnDimensionByColumn($i)->setCollapsed($isCollapsed);\n                if (isset($this->mapCellXfIndex[$xfIndex])) {\n                    $this->phpSheet->getColumnDimensionByColumn($i)->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n                }\n            }\n        }\n    }\n\n    /**\n     * ROW.\n     *\n     * This record contains the properties of a single row in a\n     * sheet. Rows and cells in a sheet are divided into blocks\n     * of 32 rows.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readRow(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; index of this row\n            $r = self::getUInt2d($recordData, 0);\n\n            // offset: 2; size: 2; index to column of the first cell which is described by a cell record\n\n            // offset: 4; size: 2; index to column of the last cell which is described by a cell record, increased by 1\n\n            // offset: 6; size: 2;\n\n            // bit: 14-0; mask: 0x7FFF; height of the row, in twips = 1/20 of a point\n            $height = (0x7FFF & self::getUInt2d($recordData, 6)) >> 0;\n\n            // bit: 15: mask: 0x8000; 0 = row has custom height; 1= row has default height\n            $useDefaultHeight = (0x8000 & self::getUInt2d($recordData, 6)) >> 15;\n\n            if (!$useDefaultHeight) {\n                if (\n                    $this->phpSheet->getDefaultRowDimension()->getRowHeight() > 0\n                ) {\n                    $this->phpSheet->getRowDimension($r + 1)\n                        ->setCustomFormat(true, ($height === 255) ? -1 : ($height / 20));\n                } else {\n                    $this->phpSheet->getRowDimension($r + 1)->setRowHeight($height / 20);\n                }\n            }\n\n            // offset: 8; size: 2; not used\n\n            // offset: 10; size: 2; not used in BIFF5-BIFF8\n\n            // offset: 12; size: 4; option flags and default row formatting\n\n            // bit: 2-0: mask: 0x00000007; outline level of the row\n            $level = (0x00000007 & self::getInt4d($recordData, 12)) >> 0;\n            $this->phpSheet->getRowDimension($r + 1)->setOutlineLevel($level);\n\n            // bit: 4; mask: 0x00000010; 1 = outline group start or ends here... and is collapsed\n            $isCollapsed = (bool) ((0x00000010 & self::getInt4d($recordData, 12)) >> 4);\n            $this->phpSheet->getRowDimension($r + 1)->setCollapsed($isCollapsed);\n\n            // bit: 5; mask: 0x00000020; 1 = row is hidden\n            $isHidden = (0x00000020 & self::getInt4d($recordData, 12)) >> 5;\n            $this->phpSheet->getRowDimension($r + 1)->setVisible(!$isHidden);\n\n            // bit: 7; mask: 0x00000080; 1 = row has explicit format\n            $hasExplicitFormat = (0x00000080 & self::getInt4d($recordData, 12)) >> 7;\n\n            // bit: 27-16; mask: 0x0FFF0000; only applies when hasExplicitFormat = 1; index to XF record\n            $xfIndex = (0x0FFF0000 & self::getInt4d($recordData, 12)) >> 16;\n\n            if ($hasExplicitFormat && isset($this->mapCellXfIndex[$xfIndex])) {\n                $this->phpSheet->getRowDimension($r + 1)->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n            }\n        }\n    }\n\n    /**\n     * Read RK record\n     * This record represents a cell that contains an RK value\n     * (encoded integer or floating-point value). If a\n     * floating-point value cannot be encoded to an RK value,\n     * a NUMBER record will be written. This record replaces the\n     * record INTEGER written in BIFF2.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readRk(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; index to row\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; index to column\n        $column = self::getUInt2d($recordData, 2);\n        $columnString = Coordinate::stringFromColumnIndex($column + 1);\n\n        // Read cell?\n        if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n            // offset: 4; size: 2; index to XF record\n            $xfIndex = self::getUInt2d($recordData, 4);\n\n            // offset: 6; size: 4; RK value\n            $rknum = self::getInt4d($recordData, 6);\n            $numValue = self::getIEEE754($rknum);\n\n            $cell = $this->phpSheet->getCell($columnString . ($row + 1));\n            if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) {\n                // add style information\n                $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n            }\n\n            // add cell\n            $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC);\n        }\n    }\n\n    /**\n     * Read LABELSST record\n     * This record represents a cell that contains a string. It\n     * replaces the LABEL record and RSTRING record used in\n     * BIFF2-BIFF5.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readLabelSst(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; index to row\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; index to column\n        $column = self::getUInt2d($recordData, 2);\n        $columnString = Coordinate::stringFromColumnIndex($column + 1);\n\n        $cell = null;\n        // Read cell?\n        if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n            // offset: 4; size: 2; index to XF record\n            $xfIndex = self::getUInt2d($recordData, 4);\n\n            // offset: 6; size: 4; index to SST record\n            $index = self::getInt4d($recordData, 6);\n\n            // add cell\n            if (($fmtRuns = $this->sst[$index]['fmtRuns']) && !$this->readDataOnly) {\n                // then we should treat as rich text\n                $richText = new RichText();\n                $charPos = 0;\n                $sstCount = count($this->sst[$index]['fmtRuns']);\n                for ($i = 0; $i <= $sstCount; ++$i) {\n                    /** @var mixed[][] $fmtRuns */\n                    if (isset($fmtRuns[$i])) {\n                        /** @var int[] */\n                        $temp = $fmtRuns[$i];\n                        $temp = $temp['charPos'];\n                        /** @var int $charPos */\n                        $text = StringHelper::substring($this->sst[$index]['value'], $charPos, $temp - $charPos);\n                        $charPos = $temp;\n                    } else {\n                        $text = StringHelper::substring($this->sst[$index]['value'], $charPos, StringHelper::countCharacters($this->sst[$index]['value']));\n                    }\n\n                    if (StringHelper::countCharacters($text) > 0) {\n                        if ($i == 0) { // first text run, no style\n                            $richText->createText($text);\n                        } else {\n                            $textRun = $richText->createTextRun($text);\n                            /** @var int[][] $fmtRuns */\n                            if (isset($fmtRuns[$i - 1])) {\n                                if ($fmtRuns[$i - 1]['fontIndex'] < 4) {\n                                    $fontIndex = $fmtRuns[$i - 1]['fontIndex'];\n                                } else {\n                                    // this has to do with that index 4 is omitted in all BIFF versions for some stra          nge reason\n                                    // check the OpenOffice documentation of the FONT record\n                                    /** @var int */\n                                    $temp = $fmtRuns[$i - 1]['fontIndex'];\n                                    $fontIndex = $temp - 1;\n                                }\n                                if (array_key_exists($fontIndex, $this->objFonts) === false) {\n                                    $fontIndex = count($this->objFonts) - 1;\n                                }\n                                $textRun->setFont(clone $this->objFonts[$fontIndex]);\n                            }\n                        }\n                    }\n                }\n                if ($this->readEmptyCells || trim($richText->getPlainText()) !== '') {\n                    $cell = $this->phpSheet->getCell($columnString . ($row + 1));\n                    $cell->setValueExplicit($richText, DataType::TYPE_STRING);\n                }\n            } else {\n                if ($this->readEmptyCells || trim($this->sst[$index]['value']) !== '') {\n                    $cell = $this->phpSheet->getCell($columnString . ($row + 1));\n                    $cell->setValueExplicit($this->sst[$index]['value'], DataType::TYPE_STRING);\n                }\n            }\n\n            if (!$this->readDataOnly && $cell !== null && isset($this->mapCellXfIndex[$xfIndex])) {\n                // add style information\n                $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n            }\n        }\n    }\n\n    /**\n     * Read MULRK record\n     * This record represents a cell range containing RK value\n     * cells. All cells are located in the same row.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readMulRk(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; index to row\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; index to first column\n        $colFirst = self::getUInt2d($recordData, 2);\n\n        // offset: var; size: 2; index to last column\n        $colLast = self::getUInt2d($recordData, $length - 2);\n        $columns = $colLast - $colFirst + 1;\n\n        // offset within record data\n        $offset = 4;\n\n        for ($i = 1; $i <= $columns; ++$i) {\n            $columnString = Coordinate::stringFromColumnIndex($colFirst + $i);\n\n            // Read cell?\n            if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n                // offset: var; size: 2; index to XF record\n                $xfIndex = self::getUInt2d($recordData, $offset);\n\n                // offset: var; size: 4; RK value\n                $numValue = self::getIEEE754(self::getInt4d($recordData, $offset + 2));\n                $cell = $this->phpSheet->getCell($columnString . ($row + 1));\n                if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) {\n                    // add style\n                    $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n                }\n\n                // add cell value\n                $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC);\n            }\n\n            $offset += 6;\n        }\n    }\n\n    /**\n     * Read NUMBER record\n     * This record represents a cell that contains a\n     * floating-point value.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readNumber(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; index to row\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size 2; index to column\n        $column = self::getUInt2d($recordData, 2);\n        $columnString = Coordinate::stringFromColumnIndex($column + 1);\n\n        // Read cell?\n        if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n            // offset 4; size: 2; index to XF record\n            $xfIndex = self::getUInt2d($recordData, 4);\n\n            $numValue = self::extractNumber(substr($recordData, 6, 8));\n\n            $cell = $this->phpSheet->getCell($columnString . ($row + 1));\n            if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) {\n                // add cell style\n                $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n            }\n\n            // add cell value\n            $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC);\n        }\n    }\n\n    /**\n     * Read FORMULA record + perhaps a following STRING record if formula result is a string\n     * This record contains the token array and the result of a\n     * formula cell.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readFormula(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; row index\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; col index\n        $column = self::getUInt2d($recordData, 2);\n        $columnString = Coordinate::stringFromColumnIndex($column + 1);\n\n        // offset: 20: size: variable; formula structure\n        $formulaStructure = substr($recordData, 20);\n\n        // offset: 14: size: 2; option flags, recalculate always, recalculate on open etc.\n        $options = self::getUInt2d($recordData, 14);\n\n        // bit: 0; mask: 0x0001; 1 = recalculate always\n        // bit: 1; mask: 0x0002; 1 = calculate on open\n        // bit: 2; mask: 0x0008; 1 = part of a shared formula\n        $isPartOfSharedFormula = (bool) (0x0008 & $options);\n\n        // WARNING:\n        // We can apparently not rely on $isPartOfSharedFormula. Even when $isPartOfSharedFormula = true\n        // the formula data may be ordinary formula data, therefore we need to check\n        // explicitly for the tExp token (0x01)\n        $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure[2]) == 0x01;\n\n        if ($isPartOfSharedFormula) {\n            // part of shared formula which means there will be a formula with a tExp token and nothing else\n            // get the base cell, grab tExp token\n            $baseRow = self::getUInt2d($formulaStructure, 3);\n            $baseCol = self::getUInt2d($formulaStructure, 5);\n            $this->baseCell = Coordinate::stringFromColumnIndex($baseCol + 1) . ($baseRow + 1);\n        }\n\n        // Read cell?\n        if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n            if ($isPartOfSharedFormula) {\n                // formula is added to this cell after the sheet has been read\n                $this->sharedFormulaParts[$columnString . ($row + 1)] = $this->baseCell;\n            }\n\n            // offset: 16: size: 4; not used\n\n            // offset: 4; size: 2; XF index\n            $xfIndex = self::getUInt2d($recordData, 4);\n\n            // offset: 6; size: 8; result of the formula\n            if ((ord($recordData[6]) == 0) && (ord($recordData[12]) == 255) && (ord($recordData[13]) == 255)) {\n                // String formula. Result follows in appended STRING record\n                $dataType = DataType::TYPE_STRING;\n\n                // read possible SHAREDFMLA record\n                $code = self::getUInt2d($this->data, $this->pos);\n                if ($code == self::XLS_TYPE_SHAREDFMLA) {\n                    $this->readSharedFmla();\n                }\n\n                // read STRING record\n                $value = $this->readString();\n            } elseif (\n                (ord($recordData[6]) == 1)\n                && (ord($recordData[12]) == 255)\n                && (ord($recordData[13]) == 255)\n            ) {\n                // Boolean formula. Result is in +2; 0=false, 1=true\n                $dataType = DataType::TYPE_BOOL;\n                $value = (bool) ord($recordData[8]);\n            } elseif (\n                (ord($recordData[6]) == 2)\n                && (ord($recordData[12]) == 255)\n                && (ord($recordData[13]) == 255)\n            ) {\n                // Error formula. Error code is in +2\n                $dataType = DataType::TYPE_ERROR;\n                $value = Xls\\ErrorCode::lookup(ord($recordData[8]));\n            } elseif (\n                (ord($recordData[6]) == 3)\n                && (ord($recordData[12]) == 255)\n                && (ord($recordData[13]) == 255)\n            ) {\n                // Formula result is a null string\n                $dataType = DataType::TYPE_NULL;\n                $value = '';\n            } else {\n                // forumla result is a number, first 14 bytes like _NUMBER record\n                $dataType = DataType::TYPE_NUMERIC;\n                $value = self::extractNumber(substr($recordData, 6, 8));\n            }\n\n            $cell = $this->phpSheet->getCell($columnString . ($row + 1));\n            if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) {\n                // add cell style\n                $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n            }\n\n            // store the formula\n            if (!$isPartOfSharedFormula) {\n                // not part of shared formula\n                // add cell value. If we can read formula, populate with formula, otherwise just used cached value\n                try {\n                    if ($this->version != self::XLS_BIFF8) {\n                        throw new Exception('Not BIFF8. Can only read BIFF8 formulas');\n                    }\n                    $formula = $this->getFormulaFromStructure($formulaStructure); // get formula in human language\n                    $cell->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA);\n                } catch (PhpSpreadsheetException) {\n                    $cell->setValueExplicit($value, $dataType);\n                }\n            } else {\n                if ($this->version == self::XLS_BIFF8) {\n                    // do nothing at this point, formula id added later in the code\n                } else {\n                    $cell->setValueExplicit($value, $dataType);\n                }\n            }\n\n            // store the cached calculated value\n            $cell->setCalculatedValue($value, $dataType === DataType::TYPE_NUMERIC);\n        }\n    }\n\n    /**\n     * Read a SHAREDFMLA record. This function just stores the binary shared formula in the reader,\n     * which usually contains relative references.\n     * These will be used to construct the formula in each shared formula part after the sheet is read.\n     */\n    protected function readSharedFmla(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0, size: 6; cell range address of the area used by the shared formula, not used for anything\n        //$cellRange = substr($recordData, 0, 6);\n        //$cellRange = Xls\\Biff5::readBIFF5CellRangeAddressFixed($cellRange); // note: even BIFF8 uses BIFF5 syntax\n\n        // offset: 6, size: 1; not used\n\n        // offset: 7, size: 1; number of existing FORMULA records for this shared formula\n        //$no = ord($recordData[7]);\n\n        // offset: 8, size: var; Binary token array of the shared formula\n        $formula = substr($recordData, 8);\n\n        // at this point we only store the shared formula for later use\n        $this->sharedFormulas[$this->baseCell] = $formula;\n    }\n\n    /**\n     * Read a STRING record from current stream position and advance the stream pointer to next record\n     * This record is used for storing result from FORMULA record when it is a string, and\n     * it occurs directly after the FORMULA record.\n     *\n     * @return string The string contents as UTF-8\n     */\n    protected function readString(): string\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->version == self::XLS_BIFF8) {\n            $string = self::readUnicodeStringLong($recordData);\n            $value = $string['value'];\n        } else {\n            $string = $this->readByteStringLong($recordData);\n            $value = $string['value'];\n        }\n        /** @var string $value */\n\n        return $value;\n    }\n\n    /**\n     * Read BOOLERR record\n     * This record represents a Boolean value or error value\n     * cell.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readBoolErr(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; row index\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; column index\n        $column = self::getUInt2d($recordData, 2);\n        $columnString = Coordinate::stringFromColumnIndex($column + 1);\n\n        // Read cell?\n        if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n            // offset: 4; size: 2; index to XF record\n            $xfIndex = self::getUInt2d($recordData, 4);\n\n            // offset: 6; size: 1; the boolean value or error value\n            $boolErr = ord($recordData[6]);\n\n            // offset: 7; size: 1; 0=boolean; 1=error\n            $isError = ord($recordData[7]);\n\n            $cell = $this->phpSheet->getCell($columnString . ($row + 1));\n            switch ($isError) {\n                case 0: // boolean\n                    $value = (bool) $boolErr;\n\n                    // add cell value\n                    $cell->setValueExplicit($value, DataType::TYPE_BOOL);\n\n                    break;\n                case 1: // error type\n                    $value = Xls\\ErrorCode::lookup($boolErr);\n\n                    // add cell value\n                    $cell->setValueExplicit($value, DataType::TYPE_ERROR);\n\n                    break;\n            }\n\n            if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) {\n                // add cell style\n                $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n            }\n        }\n    }\n\n    /**\n     * Read MULBLANK record\n     * This record represents a cell range of empty cells. All\n     * cells are located in the same row.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readMulBlank(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; index to row\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; index to first column\n        $fc = self::getUInt2d($recordData, 2);\n\n        // offset: 4; size: 2 x nc; list of indexes to XF records\n        // add style information\n        if (!$this->readDataOnly && $this->readEmptyCells) {\n            for ($i = 0; $i < $length / 2 - 3; ++$i) {\n                $columnString = Coordinate::stringFromColumnIndex($fc + $i + 1);\n\n                // Read cell?\n                if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n                    $xfIndex = self::getUInt2d($recordData, 4 + 2 * $i);\n                    if (isset($this->mapCellXfIndex[$xfIndex])) {\n                        $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n                    }\n                }\n            }\n        }\n\n        // offset: 6; size 2; index to last column (not needed)\n    }\n\n    /**\n     * Read LABEL record\n     * This record represents a cell that contains a string. In\n     * BIFF8 it is usually replaced by the LABELSST record.\n     * Excel still uses this record, if it copies unformatted\n     * text cells to the clipboard.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readLabel(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; index to row\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; index to column\n        $column = self::getUInt2d($recordData, 2);\n        $columnString = Coordinate::stringFromColumnIndex($column + 1);\n\n        // Read cell?\n        if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n            // offset: 4; size: 2; XF index\n            $xfIndex = self::getUInt2d($recordData, 4);\n\n            // add cell value\n            // todo: what if string is very long? continue record\n            if ($this->version == self::XLS_BIFF8) {\n                $string = self::readUnicodeStringLong(substr($recordData, 6));\n                $value = $string['value'];\n            } else {\n                $string = $this->readByteStringLong(substr($recordData, 6));\n                $value = $string['value'];\n            }\n            /** @var string $value */\n            if ($this->readEmptyCells || trim($value) !== '') {\n                $cell = $this->phpSheet->getCell($columnString . ($row + 1));\n                $cell->setValueExplicit($value, DataType::TYPE_STRING);\n\n                if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) {\n                    // add cell style\n                    $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n                }\n            }\n        }\n    }\n\n    /**\n     * Read BLANK record.\n     */\n    protected function readBlank(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; row index\n        $row = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; col index\n        $col = self::getUInt2d($recordData, 2);\n        $columnString = Coordinate::stringFromColumnIndex($col + 1);\n\n        // Read cell?\n        if ($this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) {\n            // offset: 4; size: 2; XF index\n            $xfIndex = self::getUInt2d($recordData, 4);\n\n            // add style information\n            if (!$this->readDataOnly && $this->readEmptyCells && isset($this->mapCellXfIndex[$xfIndex])) {\n                $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]);\n            }\n        }\n    }\n\n    /**\n     * Read MSODRAWING record.\n     */\n    protected function readMsoDrawing(): void\n    {\n        //$length = self::getUInt2d($this->data, $this->pos + 2);\n\n        // get spliced record data\n        $splicedRecordData = $this->getSplicedRecordData();\n        $recordData = $splicedRecordData['recordData'];\n\n        $this->drawingData .= StringHelper::convertToString($recordData);\n    }\n\n    /**\n     * Read OBJ record.\n     */\n    protected function readObj(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->readDataOnly || $this->version != self::XLS_BIFF8) {\n            return;\n        }\n\n        // recordData consists of an array of subrecords looking like this:\n        //    ft: 2 bytes; ftCmo type (0x15)\n        //    cb: 2 bytes; size in bytes of ftCmo data\n        //    ot: 2 bytes; Object Type\n        //    id: 2 bytes; Object id number\n        //    grbit: 2 bytes; Option Flags\n        //    data: var; subrecord data\n\n        // for now, we are just interested in the second subrecord containing the object type\n        $ftCmoType = self::getUInt2d($recordData, 0);\n        $cbCmoSize = self::getUInt2d($recordData, 2);\n        $otObjType = self::getUInt2d($recordData, 4);\n        $idObjID = self::getUInt2d($recordData, 6);\n        $grbitOpts = self::getUInt2d($recordData, 6);\n\n        $this->objs[] = [\n            'ftCmoType' => $ftCmoType,\n            'cbCmoSize' => $cbCmoSize,\n            'otObjType' => $otObjType,\n            'idObjID' => $idObjID,\n            'grbitOpts' => $grbitOpts,\n        ];\n        $this->textObjRef = $idObjID;\n    }\n\n    /**\n     * Read WINDOW2 record.\n     */\n    protected function readWindow2(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; option flags\n        $options = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; index to first visible row\n        //$firstVisibleRow = self::getUInt2d($recordData, 2);\n\n        // offset: 4; size: 2; index to first visible colum\n        //$firstVisibleColumn = self::getUInt2d($recordData, 4);\n        $zoomscaleInPageBreakPreview = 0;\n        $zoomscaleInNormalView = 0;\n        if ($this->version === self::XLS_BIFF8) {\n            // offset:  8; size: 2; not used\n            // offset: 10; size: 2; cached magnification factor in page break preview (in percent); 0 = Default (60%)\n            // offset: 12; size: 2; cached magnification factor in normal view (in percent); 0 = Default (100%)\n            // offset: 14; size: 4; not used\n            if (!isset($recordData[10])) {\n                $zoomscaleInPageBreakPreview = 0;\n            } else {\n                $zoomscaleInPageBreakPreview = self::getUInt2d($recordData, 10);\n            }\n\n            if ($zoomscaleInPageBreakPreview === 0) {\n                $zoomscaleInPageBreakPreview = 60;\n            }\n\n            if (!isset($recordData[12])) {\n                $zoomscaleInNormalView = 0;\n            } else {\n                $zoomscaleInNormalView = self::getUInt2d($recordData, 12);\n            }\n\n            if ($zoomscaleInNormalView === 0) {\n                $zoomscaleInNormalView = 100;\n            }\n        }\n\n        // bit: 1; mask: 0x0002; 0 = do not show gridlines, 1 = show gridlines\n        $showGridlines = (bool) ((0x0002 & $options) >> 1);\n        $this->phpSheet->setShowGridlines($showGridlines);\n\n        // bit: 2; mask: 0x0004; 0 = do not show headers, 1 = show headers\n        $showRowColHeaders = (bool) ((0x0004 & $options) >> 2);\n        $this->phpSheet->setShowRowColHeaders($showRowColHeaders);\n\n        // bit: 3; mask: 0x0008; 0 = panes are not frozen, 1 = panes are frozen\n        $this->frozen = (bool) ((0x0008 & $options) >> 3);\n\n        // bit: 6; mask: 0x0040; 0 = columns from left to right, 1 = columns from right to left\n        $this->phpSheet->setRightToLeft((bool) ((0x0040 & $options) >> 6));\n\n        // bit: 10; mask: 0x0400; 0 = sheet not active, 1 = sheet active\n        $isActive = (bool) ((0x0400 & $options) >> 10);\n        if ($isActive) {\n            $this->spreadsheet->setActiveSheetIndex($this->spreadsheet->getIndex($this->phpSheet));\n            $this->activeSheetSet = true;\n        }\n\n        // bit: 11; mask: 0x0800; 0 = normal view, 1 = page break view\n        $isPageBreakPreview = (bool) ((0x0800 & $options) >> 11);\n\n        //FIXME: set $firstVisibleRow and $firstVisibleColumn\n\n        if ($this->phpSheet->getSheetView()->getView() !== SheetView::SHEETVIEW_PAGE_LAYOUT) {\n            //NOTE: this setting is inferior to page layout view(Excel2007-)\n            $view = $isPageBreakPreview ? SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW : SheetView::SHEETVIEW_NORMAL;\n            $this->phpSheet->getSheetView()->setView($view);\n            if ($this->version === self::XLS_BIFF8) {\n                $zoomScale = $isPageBreakPreview ? $zoomscaleInPageBreakPreview : $zoomscaleInNormalView;\n                $this->phpSheet->getSheetView()->setZoomScale($zoomScale);\n                $this->phpSheet->getSheetView()->setZoomScaleNormal($zoomscaleInNormalView);\n            }\n        }\n    }\n\n    /**\n     * Read PLV Record(Created by Excel2007 or upper).\n     */\n    protected function readPageLayoutView(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; rt\n        //->ignore\n        //$rt = self::getUInt2d($recordData, 0);\n        // offset: 2; size: 2; grbitfr\n        //->ignore\n        //$grbitFrt = self::getUInt2d($recordData, 2);\n        // offset: 4; size: 8; reserved\n        //->ignore\n\n        // offset: 12; size 2; zoom scale\n        $wScalePLV = self::getUInt2d($recordData, 12);\n        // offset: 14; size 2; grbit\n        $grbit = self::getUInt2d($recordData, 14);\n\n        // decomprise grbit\n        $fPageLayoutView = $grbit & 0x01;\n        //$fRulerVisible = ($grbit >> 1) & 0x01; //no support\n        //$fWhitespaceHidden = ($grbit >> 3) & 0x01; //no support\n\n        if ($fPageLayoutView === 1) {\n            $this->phpSheet->getSheetView()->setView(SheetView::SHEETVIEW_PAGE_LAYOUT);\n            $this->phpSheet->getSheetView()->setZoomScale($wScalePLV); //set by Excel2007 only if SHEETVIEW_PAGE_LAYOUT\n        }\n        //otherwise, we cannot know whether SHEETVIEW_PAGE_LAYOUT or SHEETVIEW_PAGE_BREAK_PREVIEW.\n    }\n\n    /**\n     * Read SCL record.\n     */\n    protected function readScl(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; numerator of the view magnification\n        $numerator = self::getUInt2d($recordData, 0);\n\n        // offset: 2; size: 2; numerator of the view magnification\n        $denumerator = self::getUInt2d($recordData, 2);\n\n        // set the zoom scale (in percent)\n        $this->phpSheet->getSheetView()->setZoomScale($numerator * 100 / $denumerator);\n    }\n\n    /**\n     * Read PANE record.\n     */\n    protected function readPane(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; position of vertical split\n            $px = self::getUInt2d($recordData, 0);\n\n            // offset: 2; size: 2; position of horizontal split\n            $py = self::getUInt2d($recordData, 2);\n\n            // offset: 4; size: 2; top most visible row in the bottom pane\n            $rwTop = self::getUInt2d($recordData, 4);\n\n            // offset: 6; size: 2; first visible left column in the right pane\n            $colLeft = self::getUInt2d($recordData, 6);\n\n            if ($this->frozen) {\n                // frozen panes\n                $cell = Coordinate::stringFromColumnIndex($px + 1) . ($py + 1);\n                $topLeftCell = Coordinate::stringFromColumnIndex($colLeft + 1) . ($rwTop + 1);\n                $this->phpSheet->freezePane($cell, $topLeftCell);\n            }\n            // unfrozen panes; split windows; not supported by PhpSpreadsheet core\n        }\n    }\n\n    private const REGEX_WHOLE_COLUMN = '/^([A-Z]+1\\:[A-Z]+)'\n        . '(' . AddressRange::MAX_ROW_XLS_OLD . '|' . AddressRange::MAX_ROW_XLS . ')'\n        . '$/';\n    private const REGEX_WHOLE_COLUMN_REPLACE = '${1}' . AddressRange::MAX_ROW;\n    private const REGEX_WHOLE_ROW = '/^(A\\d+\\:)'\n        . AddressRange::MAX_COLUMN_XLS\n        . '(\\d+)$/';\n    private const REGEX_WHOLE_ROW_REPLACE = '${1}'\n        . AddressRange::MAX_COLUMN\n        . '${2}';\n\n    /**\n     * Read SELECTION record. There is one such record for each pane in the sheet.\n     */\n    protected function readSelection(): string\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n        $selectedCells = '';\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 1; pane identifier\n            //$paneId = ord($recordData[0]);\n\n            // offset: 1; size: 2; index to row of the active cell\n            //$r = self::getUInt2d($recordData, 1);\n\n            // offset: 3; size: 2; index to column of the active cell\n            //$c = self::getUInt2d($recordData, 3);\n\n            // offset: 5; size: 2; index into the following cell range list to the\n            //  entry that contains the active cell\n            //$index = self::getUInt2d($recordData, 5);\n\n            // offset: 7; size: var; cell range address list containing all selected cell ranges\n            $data = substr($recordData, 7);\n            $cellRangeAddressList = Xls\\Biff5::readBIFF5CellRangeAddressList($data); // note: also BIFF8 uses BIFF5 syntax\n\n            $selectedCells = $cellRangeAddressList['cellRangeAddresses'][0];\n\n            // first row '1' + last row '16384' or '65536' indicates that full column is selected (apparently also in BIFF8!)\n            if (Preg::isMatch(self::REGEX_WHOLE_COLUMN, $selectedCells)) {\n                $selectedCells = Preg::replace(self::REGEX_WHOLE_COLUMN, self::REGEX_WHOLE_COLUMN_REPLACE, $selectedCells);\n            }\n\n            // first column 'A' + last column 'IV' indicates that full row is selected\n            if (Preg::isMatch(self::REGEX_WHOLE_ROW, $selectedCells)) {\n                $selectedCells = Preg::replace(self::REGEX_WHOLE_ROW, self::REGEX_WHOLE_ROW_REPLACE, $selectedCells);\n            }\n\n            $this->phpSheet->setSelectedCells($selectedCells);\n        }\n\n        return $selectedCells;\n    }\n\n    private function includeCellRangeFiltered(string $cellRangeAddress): bool\n    {\n        $includeCellRange = false;\n        $rangeBoundaries = Coordinate::getRangeBoundaries($cellRangeAddress);\n        StringHelper::stringIncrement($rangeBoundaries[1][0]);\n        for ($row = $rangeBoundaries[0][1]; $row <= $rangeBoundaries[1][1]; ++$row) {\n            for ($column = $rangeBoundaries[0][0]; $column != $rangeBoundaries[1][0]; StringHelper::stringIncrement($column)) {\n                if ($this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) {\n                    $includeCellRange = true;\n\n                    break 2;\n                }\n            }\n        }\n\n        return $includeCellRange;\n    }\n\n    /**\n     * MERGEDCELLS.\n     *\n     * This record contains the addresses of merged cell ranges\n     * in the current sheet.\n     *\n     * --    \"OpenOffice.org's Documentation of the Microsoft\n     *         Excel File Format\"\n     */\n    protected function readMergedCells(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {\n            $cellRangeAddressList = Xls\\Biff8::readBIFF8CellRangeAddressList($recordData);\n            foreach ($cellRangeAddressList['cellRangeAddresses'] as $cellRangeAddress) {\n                /** @var string $cellRangeAddress */\n                if (\n                    (str_contains($cellRangeAddress, ':'))\n                    && ($this->includeCellRangeFiltered($cellRangeAddress))\n                ) {\n                    $this->phpSheet->mergeCells($cellRangeAddress, Worksheet::MERGE_CELL_CONTENT_HIDE);\n                }\n            }\n        }\n    }\n\n    /**\n     * Read HYPERLINK record.\n     */\n    protected function readHyperLink(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer forward to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 8; cell range address of all cells containing this hyperlink\n            try {\n                $cellRange = Xls\\Biff8::readBIFF8CellRangeAddressFixed($recordData);\n            } catch (PhpSpreadsheetException) {\n                return;\n            }\n\n            // offset: 8, size: 16; GUID of StdLink\n\n            // offset: 24, size: 4; unknown value\n\n            // offset: 28, size: 4; option flags\n            // bit: 0; mask: 0x00000001; 0 = no link or extant, 1 = file link or URL\n            $isFileLinkOrUrl = (0x00000001 & self::getUInt2d($recordData, 28)) >> 0;\n\n            // bit: 1; mask: 0x00000002; 0 = relative path, 1 = absolute path or URL\n            //$isAbsPathOrUrl = (0x00000001 & self::getUInt2d($recordData, 28)) >> 1;\n\n            // bit: 2 (and 4); mask: 0x00000014; 0 = no description\n            $hasDesc = (0x00000014 & self::getUInt2d($recordData, 28)) >> 2;\n\n            // bit: 3; mask: 0x00000008; 0 = no text, 1 = has text\n            $hasText = (0x00000008 & self::getUInt2d($recordData, 28)) >> 3;\n\n            // bit: 7; mask: 0x00000080; 0 = no target frame, 1 = has target frame\n            $hasFrame = (0x00000080 & self::getUInt2d($recordData, 28)) >> 7;\n\n            // bit: 8; mask: 0x00000100; 0 = file link or URL, 1 = UNC path (inc. server name)\n            $isUNC = (0x00000100 & self::getUInt2d($recordData, 28)) >> 8;\n\n            // offset within record data\n            $offset = 32;\n\n            if ($hasDesc) {\n                // offset: 32; size: var; character count of description text\n                $dl = self::getInt4d($recordData, 32);\n                // offset: 36; size: var; character array of description text, no Unicode string header, always 16-bit characters, zero terminated\n                //$desc = self::encodeUTF16(substr($recordData, 36, 2 * ($dl - 1)), false);\n                $offset += 4 + 2 * $dl;\n            }\n            if ($hasFrame) {\n                $fl = self::getInt4d($recordData, $offset);\n                $offset += 4 + 2 * $fl;\n            }\n\n            // detect type of hyperlink (there are 4 types)\n            $hyperlinkType = null;\n\n            if ($isUNC) {\n                $hyperlinkType = 'UNC';\n            } elseif (!$isFileLinkOrUrl) {\n                $hyperlinkType = 'workbook';\n            } elseif (ord($recordData[$offset]) == 0x03) {\n                $hyperlinkType = 'local';\n            } elseif (ord($recordData[$offset]) == 0xE0) {\n                $hyperlinkType = 'URL';\n            }\n\n            switch ($hyperlinkType) {\n                case 'URL':\n                    // section 5.58.2: Hyperlink containing a URL\n                    // e.g. http://example.org/index.php\n\n                    // offset: var; size: 16; GUID of URL Moniker\n                    $offset += 16;\n                    // offset: var; size: 4; size (in bytes) of character array of the URL including trailing zero word\n                    $us = self::getInt4d($recordData, $offset);\n                    $offset += 4;\n                    // offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated\n                    $url = self::encodeUTF16(substr($recordData, $offset, $us - 2), false);\n                    $nullOffset = strpos($url, chr(0x00));\n                    if ($nullOffset) {\n                        $url = substr($url, 0, $nullOffset);\n                    }\n                    $url .= $hasText ? '#' : '';\n                    $offset += $us;\n\n                    break;\n                case 'local':\n                    // section 5.58.3: Hyperlink to local file\n                    // examples:\n                    //   mydoc.txt\n                    //   ../../somedoc.xls#Sheet!A1\n\n                    // offset: var; size: 16; GUI of File Moniker\n                    $offset += 16;\n\n                    // offset: var; size: 2; directory up-level count.\n                    $upLevelCount = self::getUInt2d($recordData, $offset);\n                    $offset += 2;\n\n                    // offset: var; size: 4; character count of the shortened file path and name, including trailing zero word\n                    $sl = self::getInt4d($recordData, $offset);\n                    $offset += 4;\n\n                    // offset: var; size: sl; character array of the shortened file path and name in 8.3-DOS-format (compressed Unicode string)\n                    $shortenedFilePath = substr($recordData, $offset, $sl);\n                    $shortenedFilePath = self::encodeUTF16($shortenedFilePath, true);\n                    $shortenedFilePath = substr($shortenedFilePath, 0, -1); // remove trailing zero\n\n                    $offset += $sl;\n\n                    // offset: var; size: 24; unknown sequence\n                    $offset += 24;\n\n                    // extended file path\n                    // offset: var; size: 4; size of the following file link field including string lenth mark\n                    $sz = self::getInt4d($recordData, $offset);\n                    $offset += 4;\n\n                    $extendedFilePath = '';\n                    // only present if $sz > 0\n                    if ($sz > 0) {\n                        // offset: var; size: 4; size of the character array of the extended file path and name\n                        $xl = self::getInt4d($recordData, $offset);\n                        $offset += 4;\n\n                        // offset: var; size 2; unknown\n                        $offset += 2;\n\n                        // offset: var; size $xl; character array of the extended file path and name.\n                        $extendedFilePath = substr($recordData, $offset, $xl);\n                        $extendedFilePath = self::encodeUTF16($extendedFilePath, false);\n                        $offset += $xl;\n                    }\n\n                    // construct the path\n                    $url = str_repeat('..\\\\', $upLevelCount);\n                    $url .= ($sz > 0) ? $extendedFilePath : $shortenedFilePath; // use extended path if available\n                    $url .= $hasText ? '#' : '';\n\n                    break;\n                case 'UNC':\n                    // section 5.58.4: Hyperlink to a File with UNC (Universal Naming Convention) Path\n                    // todo: implement\n                    return;\n                case 'workbook':\n                    // section 5.58.5: Hyperlink to the Current Workbook\n                    // e.g. Sheet2!B1:C2, stored in text mark field\n                    $url = 'sheet://';\n\n                    break;\n                default:\n                    return;\n            }\n\n            if ($hasText) {\n                // offset: var; size: 4; character count of text mark including trailing zero word\n                $tl = self::getInt4d($recordData, $offset);\n                $offset += 4;\n                // offset: var; size: var; character array of the text mark without the # sign, no Unicode header, always 16-bit characters, zero-terminated\n                $text = self::encodeUTF16(substr($recordData, $offset, 2 * ($tl - 1)), false);\n                $url .= $text;\n            }\n\n            // apply the hyperlink to all the relevant cells\n            foreach (Coordinate::extractAllCellReferencesInRange($cellRange) as $coordinate) {\n                $this->phpSheet->getCell($coordinate)->getHyperLink()->setUrl($url);\n            }\n        }\n    }\n\n    /**\n     * Read DATAVALIDATIONS record.\n     */\n    protected function readDataValidations(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        //$recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer forward to next record\n        $this->pos += 4 + $length;\n    }\n\n    /**\n     * Read DATAVALIDATION record.\n     */\n    protected function readDataValidation(): void\n    {\n        (new Xls\\DataValidationHelper())->readDataValidation2($this);\n    }\n\n    /**\n     * Read SHEETLAYOUT record. Stores sheet tab color information.\n     */\n    protected function readSheetLayout(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if (!$this->readDataOnly) {\n            // offset: 0; size: 2; repeated record identifier 0x0862\n\n            // offset: 2; size: 10; not used\n\n            // offset: 12; size: 4; size of record data\n            // Excel 2003 uses size of 0x14 (documented), Excel 2007 uses size of 0x28 (not documented?)\n            $sz = self::getInt4d($recordData, 12);\n\n            switch ($sz) {\n                case 0x14:\n                    // offset: 16; size: 2; color index for sheet tab\n                    $colorIndex = self::getUInt2d($recordData, 16);\n                    /** @var string[] */\n                    $color = Xls\\Color::map($colorIndex, $this->palette, $this->version);\n                    $this->phpSheet->getTabColor()->setRGB($color['rgb']);\n\n                    break;\n                case 0x28:\n                    // TODO: Investigate structure for .xls SHEETLAYOUT record as saved by MS Office Excel 2007\n                    return;\n            }\n        }\n    }\n\n    /**\n     * Read SHEETPROTECTION record (FEATHEADR).\n     */\n    protected function readSheetProtection(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        if ($this->readDataOnly) {\n            return;\n        }\n\n        // offset: 0; size: 2; repeated record header\n\n        // offset: 2; size: 2; FRT cell reference flag (=0 currently)\n\n        // offset: 4; size: 8; Currently not used and set to 0\n\n        // offset: 12; size: 2; Shared feature type index (2=Enhanced Protetion, 4=SmartTag)\n        $isf = self::getUInt2d($recordData, 12);\n        if ($isf != 2) {\n            return;\n        }\n\n        // offset: 14; size: 1; =1 since this is a feat header\n\n        // offset: 15; size: 4; size of rgbHdrSData\n\n        // rgbHdrSData, assume \"Enhanced Protection\"\n        // offset: 19; size: 2; option flags\n        $options = self::getUInt2d($recordData, 19);\n\n        // bit: 0; mask 0x0001; 1 = user may edit objects, 0 = users must not edit objects\n        // Note - do not negate $bool\n        $bool = (0x0001 & $options) >> 0;\n        $this->phpSheet->getProtection()->setObjects((bool) $bool);\n\n        // bit: 1; mask 0x0002; edit scenarios\n        // Note - do not negate $bool\n        $bool = (0x0002 & $options) >> 1;\n        $this->phpSheet->getProtection()->setScenarios((bool) $bool);\n\n        // bit: 2; mask 0x0004; format cells\n        $bool = (0x0004 & $options) >> 2;\n        $this->phpSheet->getProtection()->setFormatCells(!$bool);\n\n        // bit: 3; mask 0x0008; format columns\n        $bool = (0x0008 & $options) >> 3;\n        $this->phpSheet->getProtection()->setFormatColumns(!$bool);\n\n        // bit: 4; mask 0x0010; format rows\n        $bool = (0x0010 & $options) >> 4;\n        $this->phpSheet->getProtection()->setFormatRows(!$bool);\n\n        // bit: 5; mask 0x0020; insert columns\n        $bool = (0x0020 & $options) >> 5;\n        $this->phpSheet->getProtection()->setInsertColumns(!$bool);\n\n        // bit: 6; mask 0x0040; insert rows\n        $bool = (0x0040 & $options) >> 6;\n        $this->phpSheet->getProtection()->setInsertRows(!$bool);\n\n        // bit: 7; mask 0x0080; insert hyperlinks\n        $bool = (0x0080 & $options) >> 7;\n        $this->phpSheet->getProtection()->setInsertHyperlinks(!$bool);\n\n        // bit: 8; mask 0x0100; delete columns\n        $bool = (0x0100 & $options) >> 8;\n        $this->phpSheet->getProtection()->setDeleteColumns(!$bool);\n\n        // bit: 9; mask 0x0200; delete rows\n        $bool = (0x0200 & $options) >> 9;\n        $this->phpSheet->getProtection()->setDeleteRows(!$bool);\n\n        // bit: 10; mask 0x0400; select locked cells\n        // Note that this is opposite of most of above.\n        $bool = (0x0400 & $options) >> 10;\n        $this->phpSheet->getProtection()->setSelectLockedCells((bool) $bool);\n\n        // bit: 11; mask 0x0800; sort cell range\n        $bool = (0x0800 & $options) >> 11;\n        $this->phpSheet->getProtection()->setSort(!$bool);\n\n        // bit: 12; mask 0x1000; auto filter\n        $bool = (0x1000 & $options) >> 12;\n        $this->phpSheet->getProtection()->setAutoFilter(!$bool);\n\n        // bit: 13; mask 0x2000; pivot tables\n        $bool = (0x2000 & $options) >> 13;\n        $this->phpSheet->getProtection()->setPivotTables(!$bool);\n\n        // bit: 14; mask 0x4000; select unlocked cells\n        // Note that this is opposite of most of above.\n        $bool = (0x4000 & $options) >> 14;\n        $this->phpSheet->getProtection()->setSelectUnlockedCells((bool) $bool);\n\n        // offset: 21; size: 2; not used\n    }\n\n    /**\n     * Read RANGEPROTECTION record\n     * Reading of this record is based on Microsoft Office Excel 97-2000 Binary File Format Specification,\n     * where it is referred to as FEAT record.\n     */\n    protected function readRangeProtection(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // local pointer in record data\n        $offset = 0;\n\n        if (!$this->readDataOnly) {\n            $offset += 12;\n\n            // offset: 12; size: 2; shared feature type, 2 = enhanced protection, 4 = smart tag\n            $isf = self::getUInt2d($recordData, 12);\n            if ($isf != 2) {\n                // we only read FEAT records of type 2\n                return;\n            }\n            $offset += 2;\n\n            $offset += 5;\n\n            // offset: 19; size: 2; count of ref ranges this feature is on\n            $cref = self::getUInt2d($recordData, 19);\n            $offset += 2;\n\n            $offset += 6;\n\n            // offset: 27; size: 8 * $cref; list of cell ranges (like in hyperlink record)\n            $cellRanges = [];\n            for ($i = 0; $i < $cref; ++$i) {\n                try {\n                    $cellRange = Xls\\Biff8::readBIFF8CellRangeAddressFixed(substr($recordData, 27 + 8 * $i, 8));\n                } catch (PhpSpreadsheetException) {\n                    return;\n                }\n                $cellRanges[] = $cellRange;\n                $offset += 8;\n            }\n\n            // offset: var; size: var; variable length of feature specific data\n            //$rgbFeat = substr($recordData, $offset);\n            $offset += 4;\n\n            // offset: var; size: 4; the encrypted password (only 16-bit although field is 32-bit)\n            $wPassword = self::getInt4d($recordData, $offset);\n            $offset += 4;\n\n            // Apply range protection to sheet\n            if ($cellRanges) {\n                $this->phpSheet->protectCells(implode(' ', $cellRanges), ($wPassword === 0) ? '' : strtoupper(dechex($wPassword)), true);\n            }\n        }\n    }\n\n    /**\n     * Read a free CONTINUE record. Free CONTINUE record may be a camouflaged MSODRAWING record\n     * When MSODRAWING data on a sheet exceeds 8224 bytes, CONTINUE records are used instead. Undocumented.\n     * In this case, we must treat the CONTINUE record as a MSODRAWING record.\n     */\n    protected function readContinue(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // check if we are reading drawing data\n        // this is in case a free CONTINUE record occurs in other circumstances we are unaware of\n        if ($this->drawingData == '') {\n            // move stream pointer to next record\n            $this->pos += 4 + $length;\n\n            return;\n        }\n\n        // check if record data is at least 4 bytes long, otherwise there is no chance this is MSODRAWING data\n        if ($length < 4) {\n            // move stream pointer to next record\n            $this->pos += 4 + $length;\n\n            return;\n        }\n\n        // dirty check to see if CONTINUE record could be a camouflaged MSODRAWING record\n        // look inside CONTINUE record to see if it looks like a part of an Escher stream\n        // we know that Escher stream may be split at least at\n        //        0xF003 MsofbtSpgrContainer\n        //        0xF004 MsofbtSpContainer\n        //        0xF00D MsofbtClientTextbox\n        $validSplitPoints = [0xF003, 0xF004, 0xF00D]; // add identifiers if we find more\n\n        $splitPoint = self::getUInt2d($recordData, 2);\n        if (in_array($splitPoint, $validSplitPoints)) {\n            // get spliced record data (and move pointer to next record)\n            $splicedRecordData = $this->getSplicedRecordData();\n            $this->drawingData .= StringHelper::convertToString($splicedRecordData['recordData']);\n\n            return;\n        }\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n    }\n\n    /**\n     * Reads a record from current position in data stream and continues reading data as long as CONTINUE\n     * records are found. Splices the record data pieces and returns the combined string as if record data\n     * is in one piece.\n     * Moves to next current position in data stream to start of next record different from a CONtINUE record.\n     *\n     * @return mixed[]\n     */\n    private function getSplicedRecordData(): array\n    {\n        $data = '';\n        $spliceOffsets = [];\n\n        $i = 0;\n        $spliceOffsets[0] = 0;\n\n        do {\n            ++$i;\n\n            // offset: 0; size: 2; identifier\n            //$identifier = self::getUInt2d($this->data, $this->pos);\n            // offset: 2; size: 2; length\n            $length = self::getUInt2d($this->data, $this->pos + 2);\n            $data .= $this->readRecordData($this->data, $this->pos + 4, $length);\n\n            $spliceOffsets[$i] = $spliceOffsets[$i - 1] + $length;\n\n            $this->pos += 4 + $length;\n            $nextIdentifier = self::getUInt2d($this->data, $this->pos);\n        } while ($nextIdentifier == self::XLS_TYPE_CONTINUE);\n\n        return [\n            'recordData' => $data,\n            'spliceOffsets' => $spliceOffsets,\n        ];\n    }\n\n    /**\n     * Convert formula structure into human readable Excel formula like 'A3+A5*5'.\n     *\n     * @param string $formulaStructure The complete binary data for the formula\n     * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas\n     *\n     * @return string Human readable formula\n     */\n    protected function getFormulaFromStructure(string $formulaStructure, string $baseCell = 'A1'): string\n    {\n        // offset: 0; size: 2; size of the following formula data\n        $sz = self::getUInt2d($formulaStructure, 0);\n\n        // offset: 2; size: sz\n        $formulaData = substr($formulaStructure, 2, $sz);\n\n        // offset: 2 + sz; size: variable (optional)\n        if (strlen($formulaStructure) > 2 + $sz) {\n            $additionalData = substr($formulaStructure, 2 + $sz);\n        } else {\n            $additionalData = '';\n        }\n\n        return $this->getFormulaFromData($formulaData, $additionalData, $baseCell);\n    }\n\n    /**\n     * Take formula data and additional data for formula and return human readable formula.\n     *\n     * @param string $formulaData The binary data for the formula itself\n     * @param string $additionalData Additional binary data going with the formula\n     * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas\n     *\n     * @return string Human readable formula\n     */\n    private function getFormulaFromData(string $formulaData, string $additionalData = '', string $baseCell = 'A1'): string\n    {\n        // start parsing the formula data\n        $tokens = [];\n\n        while ($formulaData !== '' && $token = $this->getNextToken($formulaData, $baseCell)) {\n            $tokens[] = $token;\n            /** @var int[] $token */\n            $formulaData = substr($formulaData, $token['size']);\n        }\n\n        $formulaString = $this->createFormulaFromTokens($tokens, $additionalData);\n\n        return $formulaString;\n    }\n\n    /**\n     * Take array of tokens together with additional data for formula and return human readable formula.\n     *\n     * @param mixed[][] $tokens\n     * @param string $additionalData Additional binary data going with the formula\n     *\n     * @return string Human readable formula\n     */\n    private function createFormulaFromTokens(array $tokens, string $additionalData): string\n    {\n        // empty formula?\n        if (empty($tokens)) {\n            return '';\n        }\n\n        $formulaStrings = [];\n        foreach ($tokens as $token) {\n            // initialize spaces\n            $space0 = $space0 ?? ''; // spaces before next token, not tParen\n            $space1 = $space1 ?? ''; // carriage returns before next token, not tParen\n            $space2 = $space2 ?? ''; // spaces before opening parenthesis\n            $space3 = $space3 ?? ''; // carriage returns before opening parenthesis\n            $space4 = $space4 ?? ''; // spaces before closing parenthesis\n            $space5 = $space5 ?? ''; // carriage returns before closing parenthesis\n            /** @var string */\n            $tokenData = $token['data'] ?? '';\n            switch ($token['name']) {\n                case 'tAdd': // addition\n                case 'tConcat': // addition\n                case 'tDiv': // division\n                case 'tEQ': // equality\n                case 'tGE': // greater than or equal\n                case 'tGT': // greater than\n                case 'tIsect': // intersection\n                case 'tLE': // less than or equal\n                case 'tList': // less than or equal\n                case 'tLT': // less than\n                case 'tMul': // multiplication\n                case 'tNE': // multiplication\n                case 'tPower': // power\n                case 'tRange': // range\n                case 'tSub': // subtraction\n                    $op2 = array_pop($formulaStrings);\n                    $op1 = array_pop($formulaStrings);\n                    $formulaStrings[] = \"$op1$space1$space0{$tokenData}$op2\";\n                    unset($space0, $space1);\n\n                    break;\n                case 'tUplus': // unary plus\n                case 'tUminus': // unary minus\n                    $op = array_pop($formulaStrings);\n                    $formulaStrings[] = \"$space1$space0{$tokenData}$op\";\n                    unset($space0, $space1);\n\n                    break;\n                case 'tPercent': // percent sign\n                    $op = array_pop($formulaStrings);\n                    $formulaStrings[] = \"$op$space1$space0{$tokenData}\";\n                    unset($space0, $space1);\n\n                    break;\n                case 'tAttrVolatile': // indicates volatile function\n                case 'tAttrIf':\n                case 'tAttrSkip':\n                case 'tAttrChoose':\n                    // token is only important for Excel formula evaluator\n                    // do nothing\n                    break;\n                case 'tAttrSpace': // space / carriage return\n                    // space will be used when next token arrives, do not alter formulaString stack\n                    /** @var string[][] $token */\n                    switch ($token['data']['spacetype']) {\n                        case 'type0':\n                            $space0 = str_repeat(' ', (int) $token['data']['spacecount']);\n\n                            break;\n                        case 'type1':\n                            $space1 = str_repeat(\"\\n\", (int) $token['data']['spacecount']);\n\n                            break;\n                        case 'type2':\n                            $space2 = str_repeat(' ', (int) $token['data']['spacecount']);\n\n                            break;\n                        case 'type3':\n                            $space3 = str_repeat(\"\\n\", (int) $token['data']['spacecount']);\n\n                            break;\n                        case 'type4':\n                            $space4 = str_repeat(' ', (int) $token['data']['spacecount']);\n\n                            break;\n                        case 'type5':\n                            $space5 = str_repeat(\"\\n\", (int) $token['data']['spacecount']);\n\n                            break;\n                    }\n\n                    break;\n                case 'tAttrSum': // SUM function with one parameter\n                    $op = array_pop($formulaStrings);\n                    $formulaStrings[] = \"{$space1}{$space0}SUM($op)\";\n                    unset($space0, $space1);\n\n                    break;\n                case 'tFunc': // function with fixed number of arguments\n                case 'tFuncV': // function with variable number of arguments\n                    /** @var string[] */\n                    $temp1 = $token['data'];\n                    $temp2 = $temp1['function'];\n                    if ($temp2 != '') {\n                        // normal function\n                        $ops = []; // array of operators\n                        $temp3 = (int) $temp1['args'];\n                        for ($i = 0; $i < $temp3; ++$i) {\n                            $ops[] = array_pop($formulaStrings);\n                        }\n                        $ops = array_reverse($ops);\n                        $formulaStrings[] = \"$space1$space0{$temp2}(\" . implode(',', $ops) . ')';\n                        unset($space0, $space1);\n                    } else {\n                        // add-in function\n                        $ops = []; // array of operators\n                        /** @var int[] */\n                        $temp = $token['data'];\n                        for ($i = 0; $i < $temp['args'] - 1; ++$i) {\n                            $ops[] = array_pop($formulaStrings);\n                        }\n                        $ops = array_reverse($ops);\n                        $function = array_pop($formulaStrings);\n                        $formulaStrings[] = \"$space1$space0$function(\" . implode(',', $ops) . ')';\n                        unset($space0, $space1);\n                    }\n\n                    break;\n                case 'tParen': // parenthesis\n                    $expression = array_pop($formulaStrings);\n                    $formulaStrings[] = \"$space3$space2($expression$space5$space4)\";\n                    unset($space2, $space3, $space4, $space5);\n\n                    break;\n                case 'tArray': // array constant\n                    $constantArray = Xls\\Biff8::readBIFF8ConstantArray($additionalData);\n                    $formulaStrings[] = $space1 . $space0 . $constantArray['value'];\n                    $additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data\n                    unset($space0, $space1);\n\n                    break;\n                case 'tMemArea':\n                    // bite off chunk of additional data\n                    $cellRangeAddressList = Xls\\Biff8::readBIFF8CellRangeAddressList($additionalData);\n                    $additionalData = substr($additionalData, $cellRangeAddressList['size']);\n                    $formulaStrings[] = \"$space1$space0{$tokenData}\";\n                    unset($space0, $space1);\n\n                    break;\n                case 'tArea': // cell range address\n                case 'tBool': // boolean\n                case 'tErr': // error code\n                case 'tInt': // integer\n                case 'tMemErr':\n                case 'tMemFunc':\n                case 'tMissArg':\n                case 'tName':\n                case 'tNameX':\n                case 'tNum': // number\n                case 'tRef': // single cell reference\n                case 'tRef3d': // 3d cell reference\n                case 'tArea3d': // 3d cell range reference\n                case 'tRefN':\n                case 'tAreaN':\n                case 'tStr': // string\n                    $formulaStrings[] = \"$space1$space0{$tokenData}\";\n                    unset($space0, $space1);\n\n                    break;\n            }\n        }\n        $formulaString = $formulaStrings[0];\n\n        return $formulaString;\n    }\n\n    /**\n     * Fetch next token from binary formula data.\n     *\n     * @param string $formulaData Formula data\n     * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas\n     *\n     * @return mixed[]\n     */\n    private function getNextToken(string $formulaData, string $baseCell = 'A1'): array\n    {\n        // offset: 0; size: 1; token id\n        $id = ord($formulaData[0]); // token id\n        $name = false; // initialize token name\n\n        switch ($id) {\n            case 0x03:\n                $name = 'tAdd';\n                $size = 1;\n                $data = '+';\n\n                break;\n            case 0x04:\n                $name = 'tSub';\n                $size = 1;\n                $data = '-';\n\n                break;\n            case 0x05:\n                $name = 'tMul';\n                $size = 1;\n                $data = '*';\n\n                break;\n            case 0x06:\n                $name = 'tDiv';\n                $size = 1;\n                $data = '/';\n\n                break;\n            case 0x07:\n                $name = 'tPower';\n                $size = 1;\n                $data = '^';\n\n                break;\n            case 0x08:\n                $name = 'tConcat';\n                $size = 1;\n                $data = '&';\n\n                break;\n            case 0x09:\n                $name = 'tLT';\n                $size = 1;\n                $data = '<';\n\n                break;\n            case 0x0A:\n                $name = 'tLE';\n                $size = 1;\n                $data = '<=';\n\n                break;\n            case 0x0B:\n                $name = 'tEQ';\n                $size = 1;\n                $data = '=';\n\n                break;\n            case 0x0C:\n                $name = 'tGE';\n                $size = 1;\n                $data = '>=';\n\n                break;\n            case 0x0D:\n                $name = 'tGT';\n                $size = 1;\n                $data = '>';\n\n                break;\n            case 0x0E:\n                $name = 'tNE';\n                $size = 1;\n                $data = '<>';\n\n                break;\n            case 0x0F:\n                $name = 'tIsect';\n                $size = 1;\n                $data = ' ';\n\n                break;\n            case 0x10:\n                $name = 'tList';\n                $size = 1;\n                $data = ',';\n\n                break;\n            case 0x11:\n                $name = 'tRange';\n                $size = 1;\n                $data = ':';\n\n                break;\n            case 0x12:\n                $name = 'tUplus';\n                $size = 1;\n                $data = '+';\n\n                break;\n            case 0x13:\n                $name = 'tUminus';\n                $size = 1;\n                $data = '-';\n\n                break;\n            case 0x14:\n                $name = 'tPercent';\n                $size = 1;\n                $data = '%';\n\n                break;\n            case 0x15:    //    parenthesis\n                $name = 'tParen';\n                $size = 1;\n                $data = null;\n\n                break;\n            case 0x16:    //    missing argument\n                $name = 'tMissArg';\n                $size = 1;\n                $data = '';\n\n                break;\n            case 0x17:    //    string\n                $name = 'tStr';\n                // offset: 1; size: var; Unicode string, 8-bit string length\n                $string = self::readUnicodeStringShort(substr($formulaData, 1));\n                $size = 1 + $string['size'];\n                $data = self::UTF8toExcelDoubleQuoted($string['value']);\n\n                break;\n            case 0x19:    //    Special attribute\n                // offset: 1; size: 1; attribute type flags:\n                switch (ord($formulaData[1])) {\n                    case 0x01:\n                        $name = 'tAttrVolatile';\n                        $size = 4;\n                        $data = null;\n\n                        break;\n                    case 0x02:\n                        $name = 'tAttrIf';\n                        $size = 4;\n                        $data = null;\n\n                        break;\n                    case 0x04:\n                        $name = 'tAttrChoose';\n                        // offset: 2; size: 2; number of choices in the CHOOSE function ($nc, number of parameters decreased by 1)\n                        $nc = self::getUInt2d($formulaData, 2);\n                        // offset: 4; size: 2 * $nc\n                        // offset: 4 + 2 * $nc; size: 2\n                        $size = 2 * $nc + 6;\n                        $data = null;\n\n                        break;\n                    case 0x08:\n                        $name = 'tAttrSkip';\n                        $size = 4;\n                        $data = null;\n\n                        break;\n                    case 0x10:\n                        $name = 'tAttrSum';\n                        $size = 4;\n                        $data = null;\n\n                        break;\n                    case 0x40:\n                    case 0x41:\n                        $name = 'tAttrSpace';\n                        $size = 4;\n                        // offset: 2; size: 2; space type and position\n                        $spacetype = match (ord($formulaData[2])) {\n                            0x00 => 'type0',\n                            0x01 => 'type1',\n                            0x02 => 'type2',\n                            0x03 => 'type3',\n                            0x04 => 'type4',\n                            0x05 => 'type5',\n                            default => throw new Exception('Unrecognized space type in tAttrSpace token'),\n                        };\n                        // offset: 3; size: 1; number of inserted spaces/carriage returns\n                        $spacecount = ord($formulaData[3]);\n\n                        $data = ['spacetype' => $spacetype, 'spacecount' => $spacecount];\n\n                        break;\n                    default:\n                        throw new Exception('Unrecognized attribute flag in tAttr token');\n                }\n\n                break;\n            case 0x1C:    //    error code\n                // offset: 1; size: 1; error code\n                $name = 'tErr';\n                $size = 2;\n                $data = Xls\\ErrorCode::lookup(ord($formulaData[1]));\n\n                break;\n            case 0x1D:    //    boolean\n                // offset: 1; size: 1; 0 = false, 1 = true;\n                $name = 'tBool';\n                $size = 2;\n                $data = ord($formulaData[1]) ? 'TRUE' : 'FALSE';\n\n                break;\n            case 0x1E:    //    integer\n                // offset: 1; size: 2; unsigned 16-bit integer\n                $name = 'tInt';\n                $size = 3;\n                $data = self::getUInt2d($formulaData, 1);\n\n                break;\n            case 0x1F:    //    number\n                // offset: 1; size: 8;\n                $name = 'tNum';\n                $size = 9;\n                $data = self::extractNumber(substr($formulaData, 1));\n                $data = str_replace(',', '.', (string) $data); // in case non-English locale\n\n                break;\n            case 0x20:    //    array constant\n            case 0x40:\n            case 0x60:\n                // offset: 1; size: 7; not used\n                $name = 'tArray';\n                $size = 8;\n                $data = null;\n\n                break;\n            case 0x21:    //    function with fixed number of arguments\n            case 0x41:\n            case 0x61:\n                $name = 'tFunc';\n                $size = 3;\n                // offset: 1; size: 2; index to built-in sheet function\n                $mapping = Xls\\Mappings::TFUNC_MAPPINGS[self::getUInt2d($formulaData, 1)] ?? null;\n                if ($mapping === null) {\n                    throw new Exception('Unrecognized function in formula');\n                }\n                $data = ['function' => $mapping[0], 'args' => $mapping[1]];\n\n                break;\n            case 0x22:    //    function with variable number of arguments\n            case 0x42:\n            case 0x62:\n                $name = 'tFuncV';\n                $size = 4;\n                // offset: 1; size: 1; number of arguments\n                $args = ord($formulaData[1]);\n                // offset: 2: size: 2; index to built-in sheet function\n                $index = self::getUInt2d($formulaData, 2);\n                $function = Xls\\Mappings::TFUNCV_MAPPINGS[$index] ?? null;\n                if ($function === null) {\n                    throw new Exception('Unrecognized function in formula');\n                }\n                $data = ['function' => $function, 'args' => $args];\n\n                break;\n            case 0x23:    //    index to defined name\n            case 0x43:\n            case 0x63:\n                $name = 'tName';\n                $size = 5;\n                // offset: 1; size: 2; one-based index to definedname record\n                $definedNameIndex = self::getUInt2d($formulaData, 1) - 1;\n                // offset: 2; size: 2; not used\n                /** @var string[] */\n                $data = $this->definedname[$definedNameIndex]['name'] ?? ''; //* @phpstan-ignore-line\n\n                break;\n            case 0x24:    //    single cell reference e.g. A5\n            case 0x44:\n            case 0x64:\n                $name = 'tRef';\n                $size = 5;\n                $data = Xls\\Biff8::readBIFF8CellAddress(substr($formulaData, 1, 4));\n\n                break;\n            case 0x25:    //    cell range reference to cells in the same sheet (2d)\n            case 0x45:\n            case 0x65:\n                $name = 'tArea';\n                $size = 9;\n                $data = Xls\\Biff8::readBIFF8CellRangeAddress(substr($formulaData, 1, 8));\n\n                break;\n            case 0x26:    //    Constant reference sub-expression\n            case 0x46:\n            case 0x66:\n                $name = 'tMemArea';\n                // offset: 1; size: 4; not used\n                // offset: 5; size: 2; size of the following subexpression\n                $subSize = self::getUInt2d($formulaData, 5);\n                $size = 7 + $subSize;\n                $data = $this->getFormulaFromData(substr($formulaData, 7, $subSize));\n\n                break;\n            case 0x27:    //    Deleted constant reference sub-expression\n            case 0x47:\n            case 0x67:\n                $name = 'tMemErr';\n                // offset: 1; size: 4; not used\n                // offset: 5; size: 2; size of the following subexpression\n                $subSize = self::getUInt2d($formulaData, 5);\n                $size = 7 + $subSize;\n                $data = $this->getFormulaFromData(substr($formulaData, 7, $subSize));\n\n                break;\n            case 0x29:    //    Variable reference sub-expression\n            case 0x49:\n            case 0x69:\n                $name = 'tMemFunc';\n                // offset: 1; size: 2; size of the following sub-expression\n                $subSize = self::getUInt2d($formulaData, 1);\n                $size = 3 + $subSize;\n                $data = $this->getFormulaFromData(substr($formulaData, 3, $subSize));\n\n                break;\n            case 0x2C: // Relative 2d cell reference reference, used in shared formulas and some other places\n            case 0x4C:\n            case 0x6C:\n                $name = 'tRefN';\n                $size = 5;\n                $data = Xls\\Biff8::readBIFF8CellAddressB(substr($formulaData, 1, 4), $baseCell);\n\n                break;\n            case 0x2D:    //    Relative 2d range reference\n            case 0x4D:\n            case 0x6D:\n                $name = 'tAreaN';\n                $size = 9;\n                $data = Xls\\Biff8::readBIFF8CellRangeAddressB(substr($formulaData, 1, 8), $baseCell);\n\n                break;\n            case 0x39:    //    External name\n            case 0x59:\n            case 0x79:\n                $name = 'tNameX';\n                $size = 7;\n                // offset: 1; size: 2; index to REF entry in EXTERNSHEET record\n                // offset: 3; size: 2; one-based index to DEFINEDNAME or EXTERNNAME record\n                $index = self::getUInt2d($formulaData, 3);\n                // assume index is to EXTERNNAME record\n                $data = $this->externalNames[$index - 1]['name'] ?? '';\n\n                // offset: 5; size: 2; not used\n                break;\n            case 0x3A:    //    3d reference to cell\n            case 0x5A:\n            case 0x7A:\n                $name = 'tRef3d';\n                $size = 7;\n\n                try {\n                    // offset: 1; size: 2; index to REF entry\n                    $sheetRange = $this->readSheetRangeByRefIndex(self::getUInt2d($formulaData, 1));\n                    // offset: 3; size: 4; cell address\n                    $cellAddress = Xls\\Biff8::readBIFF8CellAddress(substr($formulaData, 3, 4));\n\n                    $data = \"$sheetRange!$cellAddress\";\n                } catch (PhpSpreadsheetException) {\n                    // deleted sheet reference\n                    $data = '#REF!';\n                }\n\n                break;\n            case 0x3B:    //    3d reference to cell range\n            case 0x5B:\n            case 0x7B:\n                $name = 'tArea3d';\n                $size = 11;\n\n                try {\n                    // offset: 1; size: 2; index to REF entry\n                    $sheetRange = $this->readSheetRangeByRefIndex(self::getUInt2d($formulaData, 1));\n                    // offset: 3; size: 8; cell address\n                    $cellRangeAddress = Xls\\Biff8::readBIFF8CellRangeAddress(substr($formulaData, 3, 8));\n\n                    $data = \"$sheetRange!$cellRangeAddress\";\n                } catch (PhpSpreadsheetException) {\n                    // deleted sheet reference\n                    $data = '#REF!';\n                }\n\n                break;\n                // Unknown cases    // don't know how to deal with\n            default:\n                throw new Exception('Unrecognized token ' . sprintf('%02X', $id) . ' in formula');\n        }\n\n        return [\n            'id' => $id,\n            'name' => $name,\n            'size' => $size,\n            'data' => $data,\n        ];\n    }\n\n    /**\n     * Get a sheet range like Sheet1:Sheet3 from REF index\n     * Note: If there is only one sheet in the range, one gets e.g Sheet1\n     * It can also happen that the REF structure uses the -1 (FFFF) code to indicate deleted sheets,\n     * in which case an Exception is thrown.\n     */\n    protected function readSheetRangeByRefIndex(int $index): string|false\n    {\n        if (isset($this->ref[$index])) {\n            $type = $this->externalBooks[$this->ref[$index]['externalBookIndex']]['type'];\n\n            switch ($type) {\n                case 'internal':\n                    // check if we have a deleted 3d reference\n                    if ($this->ref[$index]['firstSheetIndex'] == 0xFFFF || $this->ref[$index]['lastSheetIndex'] == 0xFFFF) {\n                        throw new Exception('Deleted sheet reference');\n                    }\n\n                    // we have normal sheet range (collapsed or uncollapsed)\n                    $firstSheetName = $this->sheets[$this->ref[$index]['firstSheetIndex']]['name'];\n                    $lastSheetName = $this->sheets[$this->ref[$index]['lastSheetIndex']]['name'];\n\n                    if ($firstSheetName == $lastSheetName) {\n                        // collapsed sheet range\n                        $sheetRange = $firstSheetName;\n                    } else {\n                        $sheetRange = \"$firstSheetName:$lastSheetName\";\n                    }\n\n                    // escape the single-quotes\n                    $sheetRange = str_replace(\"'\", \"''\", $sheetRange);\n\n                    // if there are special characters, we need to enclose the range in single-quotes\n                    // todo: check if we have identified the whole set of special characters\n                    // it seems that the following characters are not accepted for sheet names\n                    // and we may assume that they are not present: []*/:\\?\n                    // 'u' qualifier makes it risky to use Preg::isMatch here\n                    if (preg_match(\"/[ !\\\"@#£$%&{()}<>=+'|^,;-]/u\", $sheetRange)) {\n                        $sheetRange = \"'$sheetRange'\";\n                    }\n\n                    return $sheetRange;\n                default:\n                    // TODO: external sheet support\n                    throw new Exception('Xls reader only supports internal sheets in formulas');\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Read byte string (8-bit string length)\n     * OpenOffice documentation: 2.5.2.\n     *\n     * @return array{value: mixed, size: int}\n     */\n    protected function readByteStringShort(string $subData): array\n    {\n        // offset: 0; size: 1; length of the string (character count)\n        $ln = ord($subData[0]);\n\n        // offset: 1: size: var; character array (8-bit characters)\n        $value = $this->decodeCodepage(substr($subData, 1, $ln));\n\n        return [\n            'value' => $value,\n            'size' => 1 + $ln, // size in bytes of data structure\n        ];\n    }\n\n    /**\n     * Read byte string (16-bit string length)\n     * OpenOffice documentation: 2.5.2.\n     *\n     * @return array{value: mixed, size: int}\n     */\n    protected function readByteStringLong(string $subData): array\n    {\n        // offset: 0; size: 2; length of the string (character count)\n        $ln = self::getUInt2d($subData, 0);\n\n        // offset: 2: size: var; character array (8-bit characters)\n        $value = $this->decodeCodepage(substr($subData, 2));\n\n        //return $string;\n        return [\n            'value' => $value,\n            'size' => 2 + $ln, // size in bytes of data structure\n        ];\n    }\n\n    protected function parseRichText(string $is): RichText\n    {\n        $value = new RichText();\n        $value->createText($is);\n\n        return $value;\n    }\n\n    /**\n     * Phpstan 1.4.4 complains that this property is never read.\n     * So, we might be able to get rid of it altogether.\n     * For now, however, this function makes it readable,\n     * which satisfies Phpstan.\n     *\n     * @return mixed[]\n     *\n     * @codeCoverageIgnore\n     */\n    public function getMapCellStyleXfIndex(): array\n    {\n        return $this->mapCellStyleXfIndex;\n    }\n\n    /**\n     * Parse conditional formatting blocks.\n     *\n     * @see https://www.openoffice.org/sc/excelfileformat.pdf Search for CFHEADER followed by CFRULE\n     *\n     * @return mixed[]\n     */\n    protected function readCFHeader(): array\n    {\n        return (new Xls\\ConditionalFormatting())->readCFHeader2($this);\n    }\n\n    /** @param string[] $cellRangeAddresses */\n    protected function readCFRule(array $cellRangeAddresses): void\n    {\n        (new Xls\\ConditionalFormatting())->readCFRule2($cellRangeAddresses, $this);\n    }\n\n    public function getVersion(): int\n    {\n        return $this->version;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/XlsBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\CodePage;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLERead;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\n\nclass XlsBase extends BaseReader\n{\n    final protected const HIGH_ORDER_BIT = 0x80 << 24;\n    final protected const FC000000 = 0xFC << 24;\n    final protected const FE000000 = 0xFE << 24;\n\n    // ParseXL definitions\n    final const XLS_BIFF8 = 0x0600;\n    final const XLS_BIFF7 = 0x0500;\n    final const XLS_WORKBOOKGLOBALS = 0x0005;\n    final const XLS_WORKSHEET = 0x0010;\n\n    // record identifiers\n    final const XLS_TYPE_FORMULA = 0x0006;\n    final const XLS_TYPE_EOF = 0x000A;\n    final const XLS_TYPE_PROTECT = 0x0012;\n    final const XLS_TYPE_PASSWORD = 0x0013;\n    final const XLS_TYPE_HEADER = 0x0014;\n    final const XLS_TYPE_FOOTER = 0x0015;\n    final const XLS_TYPE_EXTERNSHEET = 0x0017;\n    final const XLS_TYPE_DEFINEDNAME = 0x0018;\n    final const XLS_TYPE_VERTICALPAGEBREAKS = 0x001A;\n    final const XLS_TYPE_HORIZONTALPAGEBREAKS = 0x001B;\n    final const XLS_TYPE_NOTE = 0x001C;\n    final const XLS_TYPE_SELECTION = 0x001D;\n    final const XLS_TYPE_DATEMODE = 0x0022;\n    final const XLS_TYPE_EXTERNNAME = 0x0023;\n    final const XLS_TYPE_LEFTMARGIN = 0x0026;\n    final const XLS_TYPE_RIGHTMARGIN = 0x0027;\n    final const XLS_TYPE_TOPMARGIN = 0x0028;\n    final const XLS_TYPE_BOTTOMMARGIN = 0x0029;\n    final const XLS_TYPE_PRINTGRIDLINES = 0x002B;\n    final const XLS_TYPE_FILEPASS = 0x002F;\n    final const XLS_TYPE_FONT = 0x0031;\n    final const XLS_TYPE_CONTINUE = 0x003C;\n    final const XLS_TYPE_PANE = 0x0041;\n    final const XLS_TYPE_CODEPAGE = 0x0042;\n    final const XLS_TYPE_DEFCOLWIDTH = 0x0055;\n    final const XLS_TYPE_OBJ = 0x005D;\n    final const XLS_TYPE_OBJECTPROTECT = 0x0063;\n    final const XLS_TYPE_COLINFO = 0x007D;\n    final const XLS_TYPE_IMDATA = 0x007F;\n    final const XLS_TYPE_SHEETPR = 0x0081;\n    final const XLS_TYPE_HCENTER = 0x0083;\n    final const XLS_TYPE_VCENTER = 0x0084;\n    final const XLS_TYPE_SHEET = 0x0085;\n    final const XLS_TYPE_PALETTE = 0x0092;\n    final const XLS_TYPE_SCL = 0x00A0;\n    final const XLS_TYPE_PAGESETUP = 0x00A1;\n    final const XLS_TYPE_MULRK = 0x00BD;\n    final const XLS_TYPE_MULBLANK = 0x00BE;\n    final const XLS_TYPE_DBCELL = 0x00D7;\n    final const XLS_TYPE_SCENPROTECT = 0x00DD;\n    final const XLS_TYPE_XF = 0x00E0;\n    final const XLS_TYPE_MERGEDCELLS = 0x00E5;\n    final const XLS_TYPE_MSODRAWINGGROUP = 0x00EB;\n    final const XLS_TYPE_MSODRAWING = 0x00EC;\n    final const XLS_TYPE_SST = 0x00FC;\n    final const XLS_TYPE_LABELSST = 0x00FD;\n    final const XLS_TYPE_EXTSST = 0x00FF;\n    final const XLS_TYPE_EXTERNALBOOK = 0x01AE;\n    final const XLS_TYPE_CFHEADER = 0x01B0;\n    final const XLS_TYPE_CFRULE = 0x01B1;\n    final const XLS_TYPE_DATAVALIDATIONS = 0x01B2;\n    final const XLS_TYPE_TXO = 0x01B6;\n    final const XLS_TYPE_HYPERLINK = 0x01B8;\n    final const XLS_TYPE_DATAVALIDATION = 0x01BE;\n    final const XLS_TYPE_DIMENSION = 0x0200;\n    final const XLS_TYPE_BLANK = 0x0201;\n    final const XLS_TYPE_NUMBER = 0x0203;\n    final const XLS_TYPE_LABEL = 0x0204;\n    final const XLS_TYPE_BOOLERR = 0x0205;\n    final const XLS_TYPE_STRING = 0x0207;\n    final const XLS_TYPE_ROW = 0x0208;\n    final const XLS_TYPE_INDEX = 0x020B;\n    final const XLS_TYPE_ARRAY = 0x0221;\n    final const XLS_TYPE_DEFAULTROWHEIGHT = 0x0225;\n    final const XLS_TYPE_WINDOW2 = 0x023E;\n    final const XLS_TYPE_RK = 0x027E;\n    final const XLS_TYPE_STYLE = 0x0293;\n    final const XLS_TYPE_FORMAT = 0x041E;\n    final const XLS_TYPE_SHAREDFMLA = 0x04BC;\n    final const XLS_TYPE_BOF = 0x0809;\n    final const XLS_TYPE_SHEETLAYOUT = 0x0862;\n    final const XLS_TYPE_SHEETPROTECTION = 0x0867;\n    final const XLS_TYPE_RANGEPROTECTION = 0x0868;\n    final const XLS_TYPE_XFEXT = 0x087D;\n    final const XLS_TYPE_PAGELAYOUTVIEW = 0x088B;\n    final const XLS_TYPE_UNKNOWN = 0xFFFF;\n\n    // Encryption type\n    final const MS_BIFF_CRYPTO_NONE = 0;\n    final const MS_BIFF_CRYPTO_XOR = 1;\n    final const MS_BIFF_CRYPTO_RC4 = 2;\n\n    // Size of stream blocks when using RC4 encryption\n    final const REKEY_BLOCK = 0x400;\n\n    // should be consistent with Writer\\Xls\\Style\\CellBorder\n    final const BORDER_STYLE_MAP = [\n        Border::BORDER_NONE, // => 0x00,\n        Border::BORDER_THIN,  // => 0x01,\n        Border::BORDER_MEDIUM, // => 0x02,\n        Border::BORDER_DASHED, // => 0x03,\n        Border::BORDER_DOTTED,  // => 0x04,\n        Border::BORDER_THICK, // => 0x05,\n        Border::BORDER_DOUBLE, // => 0x06,\n        Border::BORDER_HAIR, // => 0x07,\n        Border::BORDER_MEDIUMDASHED, // => 0x08,\n        Border::BORDER_DASHDOT, // => 0x09,\n        Border::BORDER_MEDIUMDASHDOT, // => 0x0A,\n        Border::BORDER_DASHDOTDOT, // => 0x0B,\n        Border::BORDER_MEDIUMDASHDOTDOT, // => 0x0C,\n        Border::BORDER_SLANTDASHDOT, // => 0x0D,\n        Border::BORDER_OMIT, // => 0x0E,\n        Border::BORDER_OMIT, // => 0x0F,\n    ];\n\n    /**\n     * Codepage set in the Excel file being read. Only important for BIFF5 (Excel 5.0 - Excel 95)\n     * For BIFF8 (Excel 97 - Excel 2003) this will always have the value 'UTF-16LE'.\n     */\n    protected string $codepage = '';\n\n    public function setCodepage(string $codepage): void\n    {\n        if (CodePage::validate($codepage) === false) {\n            throw new PhpSpreadsheetException('Unknown codepage: ' . $codepage);\n        }\n\n        $this->codepage = $codepage;\n    }\n\n    public function getCodepage(): string\n    {\n        return $this->codepage;\n    }\n\n    /**\n     * Can the current IReader read the file?\n     */\n    public function canRead(string $filename): bool\n    {\n        if (File::testFileNoThrow($filename) === false) {\n            return false;\n        }\n\n        try {\n            // Use ParseXL for the hard work.\n            $ole = new OLERead();\n\n            // get excel data\n            $ole->read($filename);\n            if ($ole->wrkbook === null) {\n                throw new Exception('The filename ' . $filename . ' is not recognised as a Spreadsheet file');\n            }\n\n            return true;\n        } catch (PhpSpreadsheetException) {\n            return false;\n        }\n    }\n\n    /**\n     * Extract RGB color\n     * OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.4.\n     *\n     * @param string $rgb Encoded RGB value (4 bytes)\n     *\n     * @return array{rgb: string}\n     */\n    protected static function readRGB(string $rgb): array\n    {\n        // offset: 0; size 1; Red component\n        $r = ord($rgb[0]);\n\n        // offset: 1; size: 1; Green component\n        $g = ord($rgb[1]);\n\n        // offset: 2; size: 1; Blue component\n        $b = ord($rgb[2]);\n\n        // HEX notation, e.g. 'FF00FC'\n        $rgb = sprintf('%02X%02X%02X', $r, $g, $b);\n\n        return ['rgb' => $rgb];\n    }\n\n    /**\n     * Extracts an Excel Unicode short string (8-bit string length)\n     * OpenOffice documentation: 2.5.3\n     * function will automatically find out where the Unicode string ends.\n     *\n     * @return array{value: string, size: int}\n     */\n    protected static function readUnicodeStringShort(string $subData): array\n    {\n        // offset: 0: size: 1; length of the string (character count)\n        $characterCount = ord($subData[0]);\n\n        $string = self::readUnicodeString(substr($subData, 1), $characterCount);\n\n        // add 1 for the string length\n        ++$string['size'];\n\n        return $string;\n    }\n\n    /**\n     * Extracts an Excel Unicode long string (16-bit string length)\n     * OpenOffice documentation: 2.5.3\n     * this function is under construction, needs to support rich text, and Asian phonetic settings.\n     *\n     * @return array{value: string, size: int}\n     */\n    protected static function readUnicodeStringLong(string $subData): array\n    {\n        // offset: 0: size: 2; length of the string (character count)\n        $characterCount = self::getUInt2d($subData, 0);\n\n        $string = self::readUnicodeString(substr($subData, 2), $characterCount);\n\n        // add 2 for the string length\n        $string['size'] += 2;\n\n        return $string;\n    }\n\n    /**\n     * Read Unicode string with no string length field, but with known character count\n     * this function is under construction, needs to support rich text, and Asian phonetic settings\n     * OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.3.\n     *\n     * @return array{value: string, size: int}\n     */\n    protected static function readUnicodeString(string $subData, int $characterCount): array\n    {\n        // offset: 0: size: 1; option flags\n        // bit: 0; mask: 0x01; character compression (0 = compressed 8-bit, 1 = uncompressed 16-bit)\n        $isCompressed = !((0x01 & ord($subData[0])) >> 0);\n\n        // bit: 2; mask: 0x04; Asian phonetic settings\n        //$hasAsian = (0x04) & ord($subData[0]) >> 2;\n\n        // bit: 3; mask: 0x08; Rich-Text settings\n        //$hasRichText = (0x08) & ord($subData[0]) >> 3;\n\n        // offset: 1: size: var; character array\n        // this offset assumes richtext and Asian phonetic settings are off which is generally wrong\n        // needs to be fixed\n        $value = self::encodeUTF16(substr($subData, 1, $isCompressed ? $characterCount : 2 * $characterCount), $isCompressed);\n\n        return [\n            'value' => $value,\n            'size' => $isCompressed ? 1 + $characterCount : 1 + 2 * $characterCount, // the size in bytes including the option flags\n        ];\n    }\n\n    /**\n     * Convert UTF-8 string to string surounded by double quotes. Used for explicit string tokens in formulas.\n     * Example:  hello\"world  -->  \"hello\"\"world\".\n     *\n     * @param string $value UTF-8 encoded string\n     */\n    protected static function UTF8toExcelDoubleQuoted(string $value): string\n    {\n        return '\"' . str_replace('\"', '\"\"', $value) . '\"';\n    }\n\n    /**\n     * Reads first 8 bytes of a string and return IEEE 754 float.\n     *\n     * @param string $data Binary string that is at least 8 bytes long\n     */\n    protected static function extractNumber(string $data): int|float\n    {\n        $rknumhigh = self::getInt4d($data, 4);\n        $rknumlow = self::getInt4d($data, 0);\n        $sign = ($rknumhigh & self::HIGH_ORDER_BIT) >> 31;\n        $exp = (($rknumhigh & 0x7FF00000) >> 20) - 1023;\n        $mantissa = (0x100000 | ($rknumhigh & 0x000FFFFF));\n        $mantissalow1 = ($rknumlow & self::HIGH_ORDER_BIT) >> 31;\n        $mantissalow2 = ($rknumlow & 0x7FFFFFFF);\n        $value = $mantissa / 2 ** (20 - $exp);\n\n        if ($mantissalow1 != 0) {\n            $value += 1 / 2 ** (21 - $exp);\n        }\n\n        if ($mantissalow2 != 0) {\n            $value += $mantissalow2 / 2 ** (52 - $exp);\n        }\n        if ($sign) {\n            $value *= -1;\n        }\n\n        return $value;\n    }\n\n    protected static function getIEEE754(int $rknum): float|int\n    {\n        if (($rknum & 0x02) != 0) {\n            $value = $rknum >> 2;\n        } else {\n            // changes by mmp, info on IEEE754 encoding from\n            // research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html\n            // The RK format calls for using only the most significant 30 bits\n            // of the 64 bit floating point value. The other 34 bits are assumed\n            // to be 0 so we use the upper 30 bits of $rknum as follows...\n            $sign = ($rknum & self::HIGH_ORDER_BIT) >> 31;\n            $exp = ($rknum & 0x7FF00000) >> 20;\n            $mantissa = (0x100000 | ($rknum & 0x000FFFFC));\n            $value = $mantissa / 2 ** (20 - ($exp - 1023));\n            if ($sign) {\n                $value = -1 * $value;\n            }\n            //end of changes by mmp\n        }\n        if (($rknum & 0x01) != 0) {\n            $value /= 100;\n        }\n\n        return $value;\n    }\n\n    /**\n     * Get UTF-8 string from (compressed or uncompressed) UTF-16 string.\n     */\n    protected static function encodeUTF16(string $string, bool $compressed = false): string\n    {\n        if ($compressed) {\n            $string = self::uncompressByteString($string);\n        }\n\n        return StringHelper::convertEncoding($string, 'UTF-8', 'UTF-16LE');\n    }\n\n    /**\n     * Convert UTF-16 string in compressed notation to uncompressed form. Only used for BIFF8.\n     */\n    protected static function uncompressByteString(string $string): string\n    {\n        $uncompressedString = '';\n        $strLen = strlen($string);\n        for ($i = 0; $i < $strLen; ++$i) {\n            $uncompressedString .= $string[$i] . \"\\0\";\n        }\n\n        return $uncompressedString;\n    }\n\n    /**\n     * Convert string to UTF-8. Only used for BIFF5.\n     */\n    protected function decodeCodepage(string $string): string\n    {\n        return StringHelper::convertEncoding($string, 'UTF-8', $this->codepage);\n    }\n\n    protected static function confirmPos(string $data, int $pos): void\n    {\n        if ($pos >= strlen($data)) {\n            throw new PhpSpreadsheetException('File appears to be corrupt'); // @codeCoverageIgnore\n        }\n    }\n\n    /**\n     * Read 16-bit unsigned integer.\n     */\n    public static function getUInt2d(string $data, int $pos): int\n    {\n        self::confirmPos($data, $pos + 1);\n\n        return ord($data[$pos]) | (ord($data[$pos + 1]) << 8);\n    }\n\n    /**\n     * Read 16-bit signed integer.\n     */\n    public static function getInt2d(string $data, int $pos): int\n    {\n        self::confirmPos($data, $pos + 1);\n\n        return unpack('s', $data[$pos] . $data[$pos + 1])[1]; // @phpstan-ignore-line\n    }\n\n    /**\n     * Read 32-bit signed integer.\n     */\n    public static function getInt4d(string $data, int $pos): int\n    {\n        self::confirmPos($data, $pos + 3);\n\n        // FIX: represent numbers correctly on 64-bit system\n        // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334\n        // Changed by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems\n        $_or_24 = ord($data[$pos + 3]);\n        if ($_or_24 >= 128) {\n            // negative number\n            $_ord_24 = -abs((256 - $_or_24) << 24);\n        } else {\n            $_ord_24 = ($_or_24 & 127) << 24;\n        }\n\n        return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\n\nclass AutoFilter\n{\n    private Table|Worksheet $parent;\n\n    private SimpleXMLElement $worksheetXml;\n\n    public function __construct(Table|Worksheet $parent, SimpleXMLElement $worksheetXml)\n    {\n        $this->parent = $parent;\n        $this->worksheetXml = $worksheetXml;\n    }\n\n    public function load(): void\n    {\n        // Remove all \"$\" in the auto filter range\n        $attrs = $this->worksheetXml->autoFilter->attributes() ?? [];\n        $autoFilterRange = (string) preg_replace('/\\$/', '', $attrs['ref'] ?? '');\n        if (str_contains($autoFilterRange, ':')) {\n            $this->readAutoFilter($autoFilterRange);\n        }\n    }\n\n    private function readAutoFilter(string $autoFilterRange): void\n    {\n        $autoFilter = $this->parent->getAutoFilter();\n        $autoFilter->setRange($autoFilterRange);\n\n        foreach ($this->worksheetXml->autoFilter->filterColumn as $filterColumn) {\n            $attributes = $filterColumn->attributes() ?? [];\n            $column = $autoFilter->getColumnByOffset((int) ($attributes['colId'] ?? 0));\n            //    Check for standard filters\n            if ($filterColumn->filters) {\n                $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n                $filters = Xlsx::testSimpleXml($filterColumn->filters->attributes());\n                if ((isset($filters['blank'])) && ((int) $filters['blank'] == 1)) {\n                    //    Operator is undefined, but always treated as EQUAL\n                    $column->createRule()->setRule('', '')->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER);\n                }\n                //    Standard filters are always an OR join, so no join rule needs to be set\n                //    Entries can be either filter elements\n                foreach ($filterColumn->filters->filter as $filterRule) {\n                    //    Operator is undefined, but always treated as EQUAL\n                    /** @var SimpleXMLElement */\n                    $attr2 = $filterRule->attributes() ?? ['val' => ''];\n                    $column->createRule()->setRule('', (string) $attr2['val'])->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER);\n                }\n\n                //    Or Date Group elements\n                $this->readDateRangeAutoFilter($filterColumn->filters, $column);\n            }\n\n            //    Check for custom filters\n            $this->readCustomAutoFilter($filterColumn, $column);\n            //    Check for dynamic filters\n            $this->readDynamicAutoFilter($filterColumn, $column);\n            //    Check for dynamic filters\n            $this->readTopTenAutoFilter($filterColumn, $column);\n        }\n        $autoFilter->setEvaluated(true);\n    }\n\n    private function readDateRangeAutoFilter(SimpleXMLElement $filters, Column $column): void\n    {\n        foreach ($filters->dateGroupItem as $dateGroupItemx) {\n            //    Operator is undefined, but always treated as EQUAL\n            $dateGroupItem = $dateGroupItemx->attributes();\n            if ($dateGroupItem !== null) {\n                $column->createRule()->setRule(\n                    '',\n                    [\n                        'year' => (string) $dateGroupItem['year'],\n                        'month' => (string) $dateGroupItem['month'],\n                        'day' => (string) $dateGroupItem['day'],\n                        'hour' => (string) $dateGroupItem['hour'],\n                        'minute' => (string) $dateGroupItem['minute'],\n                        'second' => (string) $dateGroupItem['second'],\n                    ],\n                    (string) $dateGroupItem['dateTimeGrouping']\n                )->setRuleType(Rule::AUTOFILTER_RULETYPE_DATEGROUP);\n            }\n        }\n    }\n\n    private function readCustomAutoFilter(?SimpleXMLElement $filterColumn, Column $column): void\n    {\n        if (isset($filterColumn, $filterColumn->customFilters)) {\n            $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n            $customFilters = $filterColumn->customFilters;\n            $attributes = $customFilters->attributes();\n            //    Custom filters can an AND or an OR join;\n            //        and there should only ever be one or two entries\n            if ((isset($attributes['and'])) && ((string) $attributes['and'] === '1')) {\n                $column->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);\n            }\n            foreach ($customFilters->customFilter as $filterRule) {\n                /** @var SimpleXMLElement */\n                $attr2 = $filterRule->attributes() ?? ['operator' => '', 'val' => ''];\n                $column->createRule()->setRule(\n                    (string) $attr2['operator'],\n                    (string) $attr2['val']\n                )->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n            }\n        }\n    }\n\n    private function readDynamicAutoFilter(?SimpleXMLElement $filterColumn, Column $column): void\n    {\n        if (isset($filterColumn, $filterColumn->dynamicFilter)) {\n            $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n            //    We should only ever have one dynamic filter\n            foreach ($filterColumn->dynamicFilter as $filterRule) {\n                //    Operator is undefined, but always treated as EQUAL\n                $attr2 = $filterRule->attributes() ?? [];\n                $column->createRule()->setRule(\n                    '',\n                    (string) ($attr2['val'] ?? ''),\n                    (string) ($attr2['type'] ?? '')\n                )->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n                if (isset($attr2['val'])) {\n                    $column->setAttribute('val', (string) $attr2['val']);\n                }\n                if (isset($attr2['maxVal'])) {\n                    $column->setAttribute('maxVal', (string) $attr2['maxVal']);\n                }\n            }\n        }\n    }\n\n    private function readTopTenAutoFilter(?SimpleXMLElement $filterColumn, Column $column): void\n    {\n        if (isset($filterColumn, $filterColumn->top10)) {\n            $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER);\n            //    We should only ever have one top10 filter\n            foreach ($filterColumn->top10 as $filterRule) {\n                $attr2 = $filterRule->attributes() ?? [];\n                $column->createRule()->setRule(\n                    (\n                        ((isset($attr2['percent'])) && ((string) $attr2['percent'] === '1'))\n                        ? Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT\n                        : Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE\n                    ),\n                    (string) ($attr2['val'] ?? ''),\n                    (\n                        ((isset($attr2['top'])) && ((string) $attr2['top'] === '1'))\n                        ? Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP\n                        : Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM\n                    )\n                )->setRuleType(Rule::AUTOFILTER_RULETYPE_TOPTENFILTER);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse Stringable;\n\nclass BaseParserClass\n{\n    protected static function boolean(mixed $value): bool\n    {\n        if (is_object($value)) {\n            $value = ($value instanceof Stringable) ? ((string) $value) : 'true';\n        }\n\n        if (is_numeric($value)) {\n            return (bool) $value;\n        }\n\n        return $value === 'true' || $value === 'TRUE';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/Chart.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\AxisText;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\GridLines;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties as ChartProperties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\TrendLine;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse SimpleXMLElement;\n\nclass Chart\n{\n    private string $cNamespace;\n\n    private string $aNamespace;\n\n    public function __construct(string $cNamespace = Namespaces::CHART, string $aNamespace = Namespaces::DRAWINGML)\n    {\n        $this->cNamespace = $cNamespace;\n        $this->aNamespace = $aNamespace;\n    }\n\n    private static function getAttributeString(SimpleXMLElement $component, string $name): string|null\n    {\n        $attributes = $component->attributes();\n        if (@isset($attributes[$name])) {\n            return (string) $attributes[$name];\n        }\n\n        return null;\n    }\n\n    private static function getAttributeInteger(SimpleXMLElement $component, string $name): int|null\n    {\n        $attributes = $component->attributes();\n        if (@isset($attributes[$name])) {\n            return (int) $attributes[$name];\n        }\n\n        return null;\n    }\n\n    private static function getAttributeBoolean(SimpleXMLElement $component, string $name): bool|null\n    {\n        $attributes = $component->attributes();\n        if (@isset($attributes[$name])) {\n            $value = (string) $attributes[$name];\n\n            return $value === 'true' || $value === '1';\n        }\n\n        return null;\n    }\n\n    private static function getAttributeFloat(SimpleXMLElement $component, string $name): float|null\n    {\n        $attributes = $component->attributes();\n        if (@isset($attributes[$name])) {\n            return (float) $attributes[$name];\n        }\n\n        return null;\n    }\n\n    public function readChart(SimpleXMLElement $chartElements, string $chartName): \\PhpOffice\\PhpSpreadsheet\\Chart\\Chart\n    {\n        $chartElementsC = $chartElements->children($this->cNamespace);\n\n        $XaxisLabel = $YaxisLabel = $legend = $title = null;\n        $dispBlanksAs = null;\n        $plotVisOnly = false;\n        $plotArea = null;\n        $rotX = $rotY = $rAngAx = $perspective = null;\n        $xAxis = new Axis();\n        $yAxis = new Axis();\n        $autoTitleDeleted = null;\n        $chartNoFill = false;\n        $chartBorderLines = null;\n        $chartFillColor = null;\n        $gradientArray = [];\n        $gradientLin = null;\n        $roundedCorners = false;\n        $gapWidth = null;\n        $useUpBars = null;\n        $useDownBars = null;\n        $noBorder = false;\n        foreach ($chartElementsC as $chartElementKey => $chartElement) {\n            switch ($chartElementKey) {\n                case 'spPr':\n                    $children = $chartElementsC->spPr->children($this->aNamespace);\n                    if (isset($children->noFill)) {\n                        $chartNoFill = true;\n                    }\n                    if (isset($children->solidFill)) {\n                        $chartFillColor = $this->readColor($children->solidFill);\n                    }\n                    if (isset($children->ln)) {\n                        $chartBorderLines = new GridLines();\n                        $this->readLineStyle($chartElementsC, $chartBorderLines);\n                        if (isset($children->ln->noFill)) {\n                            $noBorder = true;\n                        }\n                    }\n\n                    break;\n                case 'roundedCorners':\n                    /** @var bool $roundedCorners */\n                    $roundedCorners = self::getAttributeBoolean($chartElementsC->roundedCorners, 'val');\n\n                    break;\n                case 'chart':\n                    foreach ($chartElement as $chartDetailsKey => $chartDetails) {\n                        $chartDetails = Xlsx::testSimpleXml($chartDetails);\n                        switch ($chartDetailsKey) {\n                            case 'autoTitleDeleted':\n                                /** @var bool $autoTitleDeleted */\n                                $autoTitleDeleted = self::getAttributeBoolean($chartElementsC->chart->autoTitleDeleted, 'val');\n\n                                break;\n                            case 'view3D':\n                                $rotX = self::getAttributeInteger($chartDetails->rotX, 'val');\n                                $rotY = self::getAttributeInteger($chartDetails->rotY, 'val');\n                                $rAngAx = self::getAttributeInteger($chartDetails->rAngAx, 'val');\n                                $perspective = self::getAttributeInteger($chartDetails->perspective, 'val');\n\n                                break;\n                            case 'plotArea':\n                                $plotAreaLayout = $XaxisLabel = $YaxisLabel = null;\n                                $plotSeries = $plotAttributes = [];\n                                $catAxRead = false;\n                                $plotNoFill = false;\n                                foreach ($chartDetails as $chartDetailKey => $chartDetail) {\n                                    $chartDetail = Xlsx::testSimpleXml($chartDetail);\n                                    switch ($chartDetailKey) {\n                                        case 'spPr':\n                                            $possibleNoFill = $chartDetails->spPr->children($this->aNamespace);\n                                            if (isset($possibleNoFill->noFill)) {\n                                                $plotNoFill = true;\n                                            }\n                                            if (isset($possibleNoFill->gradFill->gsLst)) {\n                                                foreach ($possibleNoFill->gradFill->gsLst->gs as $gradient) {\n                                                    $gradient = Xlsx::testSimpleXml($gradient);\n                                                    /** @var float $pos */\n                                                    $pos = self::getAttributeFloat($gradient, 'pos');\n                                                    $gradientArray[] = [\n                                                        $pos / ChartProperties::PERCENTAGE_MULTIPLIER,\n                                                        new ChartColor($this->readColor($gradient)),\n                                                    ];\n                                                }\n                                            }\n                                            if (isset($possibleNoFill->gradFill->lin)) {\n                                                $gradientLin = ChartProperties::XmlToAngle((string) self::getAttributeString($possibleNoFill->gradFill->lin, 'ang'));\n                                            }\n\n                                            break;\n                                        case 'layout':\n                                            $plotAreaLayout = $this->chartLayoutDetails($chartDetail);\n\n                                            break;\n                                        case Axis::AXIS_TYPE_CATEGORY:\n                                        case Axis::AXIS_TYPE_DATE:\n                                            $catAxRead = true;\n                                            if (isset($chartDetail->title)) {\n                                                $XaxisLabel = $this->chartTitle($chartDetail->title->children($this->cNamespace));\n                                            }\n                                            $xAxis->setAxisType($chartDetailKey);\n                                            $this->readEffects($chartDetail, $xAxis);\n                                            $this->readLineStyle($chartDetail, $xAxis);\n                                            if (isset($chartDetail->spPr)) {\n                                                $sppr = $chartDetail->spPr->children($this->aNamespace);\n                                                if (isset($sppr->solidFill)) {\n                                                    $axisColorArray = $this->readColor($sppr->solidFill);\n                                                    $xAxis->setFillParameters($axisColorArray['value'], $axisColorArray['alpha'], $axisColorArray['type']);\n                                                }\n                                                if (isset($chartDetail->spPr->ln->noFill)) {\n                                                    $xAxis->setNoFill(true);\n                                                }\n                                            }\n                                            if (isset($chartDetail->majorGridlines)) {\n                                                $majorGridlines = new GridLines();\n                                                if (isset($chartDetail->majorGridlines->spPr)) {\n                                                    $this->readEffects($chartDetail->majorGridlines, $majorGridlines);\n                                                    $this->readLineStyle($chartDetail->majorGridlines, $majorGridlines);\n                                                }\n                                                $xAxis->setMajorGridlines($majorGridlines);\n                                            }\n                                            if (isset($chartDetail->minorGridlines)) {\n                                                $minorGridlines = new GridLines();\n                                                $minorGridlines->activateObject();\n                                                if (isset($chartDetail->minorGridlines->spPr)) {\n                                                    $this->readEffects($chartDetail->minorGridlines, $minorGridlines);\n                                                    $this->readLineStyle($chartDetail->minorGridlines, $minorGridlines);\n                                                }\n                                                $xAxis->setMinorGridlines($minorGridlines);\n                                            }\n                                            $this->setAxisProperties($chartDetail, $xAxis);\n\n                                            break;\n                                        case Axis::AXIS_TYPE_VALUE:\n                                            $whichAxis = null;\n                                            $axPos = null;\n                                            if (isset($chartDetail->axPos)) {\n                                                $axPos = self::getAttributeString($chartDetail->axPos, 'val');\n                                            }\n                                            if ($catAxRead) {\n                                                $whichAxis = $yAxis;\n                                                $yAxis->setAxisType($chartDetailKey);\n                                            } elseif (!empty($axPos)) {\n                                                switch ($axPos) {\n                                                    case 't':\n                                                    case 'b':\n                                                        $whichAxis = $xAxis;\n                                                        $xAxis->setAxisType($chartDetailKey);\n\n                                                        break;\n                                                    case 'r':\n                                                    case 'l':\n                                                        $whichAxis = $yAxis;\n                                                        $yAxis->setAxisType($chartDetailKey);\n\n                                                        break;\n                                                }\n                                            }\n                                            if (isset($chartDetail->title)) {\n                                                $axisLabel = $this->chartTitle($chartDetail->title->children($this->cNamespace));\n\n                                                switch ($axPos) {\n                                                    case 't':\n                                                    case 'b':\n                                                        $XaxisLabel = $axisLabel;\n\n                                                        break;\n                                                    case 'r':\n                                                    case 'l':\n                                                        $YaxisLabel = $axisLabel;\n\n                                                        break;\n                                                }\n                                            }\n                                            $this->readEffects($chartDetail, $whichAxis);\n                                            $this->readLineStyle($chartDetail, $whichAxis);\n                                            if ($whichAxis !== null && isset($chartDetail->spPr)) {\n                                                $sppr = $chartDetail->spPr->children($this->aNamespace);\n                                                if (isset($sppr->solidFill)) {\n                                                    $axisColorArray = $this->readColor($sppr->solidFill);\n                                                    $whichAxis->setFillParameters($axisColorArray['value'], $axisColorArray['alpha'], $axisColorArray['type']);\n                                                }\n                                                if (isset($sppr->ln->noFill)) {\n                                                    $whichAxis->setNoFill(true);\n                                                }\n                                            }\n                                            if ($whichAxis !== null && isset($chartDetail->majorGridlines)) {\n                                                $majorGridlines = new GridLines();\n                                                if (isset($chartDetail->majorGridlines->spPr)) {\n                                                    $this->readEffects($chartDetail->majorGridlines, $majorGridlines);\n                                                    $this->readLineStyle($chartDetail->majorGridlines, $majorGridlines);\n                                                }\n                                                $whichAxis->setMajorGridlines($majorGridlines);\n                                            }\n                                            if ($whichAxis !== null && isset($chartDetail->minorGridlines)) {\n                                                $minorGridlines = new GridLines();\n                                                $minorGridlines->activateObject();\n                                                if (isset($chartDetail->minorGridlines->spPr)) {\n                                                    $this->readEffects($chartDetail->minorGridlines, $minorGridlines);\n                                                    $this->readLineStyle($chartDetail->minorGridlines, $minorGridlines);\n                                                }\n                                                $whichAxis->setMinorGridlines($minorGridlines);\n                                            }\n                                            $this->setAxisProperties($chartDetail, $whichAxis);\n\n                                            break;\n                                        case 'barChart':\n                                        case 'bar3DChart':\n                                            $barDirection = self::getAttributeString($chartDetail->barDir, 'val');\n                                            $plotSer = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            $plotSer->setPlotDirection(\"$barDirection\");\n                                            $plotSeries[] = $plotSer;\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                        case 'lineChart':\n                                        case 'line3DChart':\n                                            $plotSeries[] = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                        case 'areaChart':\n                                        case 'area3DChart':\n                                            $plotSeries[] = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                        case 'doughnutChart':\n                                        case 'pieChart':\n                                        case 'pie3DChart':\n                                            $explosion = self::getAttributeString($chartDetail->ser->explosion, 'val');\n                                            $plotSer = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            $plotSer->setPlotStyle(\"$explosion\");\n                                            $plotSeries[] = $plotSer;\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                        case 'scatterChart':\n                                            $scatterStyle = self::getAttributeString($chartDetail->scatterStyle, 'val');\n                                            $plotSer = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            $plotSer->setPlotStyle($scatterStyle);\n                                            $plotSeries[] = $plotSer;\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                        case 'bubbleChart':\n                                            $bubbleScale = self::getAttributeInteger($chartDetail->bubbleScale, 'val');\n                                            $plotSer = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            $plotSer->setPlotStyle(\"$bubbleScale\");\n                                            $plotSeries[] = $plotSer;\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                        case 'radarChart':\n                                            $radarStyle = self::getAttributeString($chartDetail->radarStyle, 'val');\n                                            $plotSer = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            $plotSer->setPlotStyle($radarStyle);\n                                            $plotSeries[] = $plotSer;\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                        case 'surfaceChart':\n                                        case 'surface3DChart':\n                                            $wireFrame = self::getAttributeBoolean($chartDetail->wireframe, 'val');\n                                            $plotSer = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            $plotSer->setPlotStyle(\"$wireFrame\");\n                                            $plotSeries[] = $plotSer;\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                        case 'stockChart':\n                                            $plotSeries[] = $this->chartDataSeries($chartDetail, $chartDetailKey);\n                                            if (isset($chartDetail->upDownBars->gapWidth)) {\n                                                $gapWidth = self::getAttributeInteger($chartDetail->upDownBars->gapWidth, 'val');\n                                            }\n                                            if (isset($chartDetail->upDownBars->upBars)) {\n                                                $useUpBars = true;\n                                            }\n                                            if (isset($chartDetail->upDownBars->downBars)) {\n                                                $useDownBars = true;\n                                            }\n                                            $plotAttributes = $this->readChartAttributes($chartDetail);\n\n                                            break;\n                                    }\n                                }\n                                if ($plotAreaLayout == null) {\n                                    $plotAreaLayout = new Layout();\n                                }\n                                $plotArea = new PlotArea($plotAreaLayout, $plotSeries);\n                                $this->setChartAttributes($plotAreaLayout, $plotAttributes);\n                                if ($plotNoFill) {\n                                    $plotArea->setNoFill(true);\n                                }\n                                if (!empty($gradientArray)) {\n                                    $plotArea->setGradientFillProperties($gradientArray, $gradientLin);\n                                }\n                                if (is_int($gapWidth)) {\n                                    $plotArea->setGapWidth($gapWidth);\n                                }\n                                if ($useUpBars === true) {\n                                    $plotArea->setUseUpBars(true);\n                                }\n                                if ($useDownBars === true) {\n                                    $plotArea->setUseDownBars(true);\n                                }\n\n                                break;\n                            case 'plotVisOnly':\n                                $plotVisOnly = (bool) self::getAttributeString($chartDetails, 'val');\n\n                                break;\n                            case 'dispBlanksAs':\n                                $dispBlanksAs = self::getAttributeString($chartDetails, 'val');\n\n                                break;\n                            case 'title':\n                                $title = $this->chartTitle($chartDetails);\n\n                                break;\n                            case 'legend':\n                                $legendPos = 'r';\n                                $legendLayout = null;\n                                $legendOverlay = false;\n                                $legendBorderLines = null;\n                                $legendFillColor = null;\n                                $legendText = null;\n                                $addLegendText = false;\n                                foreach ($chartDetails as $chartDetailKey => $chartDetail) {\n                                    $chartDetail = Xlsx::testSimpleXml($chartDetail);\n                                    switch ($chartDetailKey) {\n                                        case 'legendPos':\n                                            $legendPos = self::getAttributeString($chartDetail, 'val');\n\n                                            break;\n                                        case 'overlay':\n                                            $legendOverlay = self::getAttributeBoolean($chartDetail, 'val');\n\n                                            break;\n                                        case 'layout':\n                                            $legendLayout = $this->chartLayoutDetails($chartDetail);\n\n                                            break;\n                                        case 'spPr':\n                                            $children = $chartDetails->spPr->children($this->aNamespace);\n                                            if (isset($children->solidFill)) {\n                                                $legendFillColor = $this->readColor($children->solidFill);\n                                            }\n                                            if (isset($children->ln)) {\n                                                $legendBorderLines = new GridLines();\n                                                $this->readLineStyle($chartDetails, $legendBorderLines);\n                                            }\n\n                                            break;\n                                        case 'txPr':\n                                            $children = $chartDetails->txPr->children($this->aNamespace);\n                                            $addLegendText = false;\n                                            $legendText = new AxisText();\n                                            if (isset($children->p->pPr->defRPr->solidFill)) {\n                                                $colorArray = $this->readColor($children->p->pPr->defRPr->solidFill);\n                                                $legendText->getFillColorObject()->setColorPropertiesArray($colorArray);\n                                                $addLegendText = true;\n                                            }\n                                            if (isset($children->p->pPr->defRPr->effectLst)) {\n                                                $this->readEffects($children->p->pPr->defRPr, $legendText, false);\n                                                $addLegendText = true;\n                                            }\n\n                                            break;\n                                    }\n                                }\n                                $legend = new Legend(\"$legendPos\", $legendLayout, (bool) $legendOverlay);\n                                if ($legendFillColor !== null) {\n                                    $legend->getFillColor()->setColorPropertiesArray($legendFillColor);\n                                }\n                                if ($legendBorderLines !== null) {\n                                    $legend->setBorderLines($legendBorderLines);\n                                }\n                                if ($addLegendText) {\n                                    $legend->setLegendText($legendText);\n                                }\n\n                                break;\n                        }\n                    }\n            }\n        }\n        $chart = new \\PhpOffice\\PhpSpreadsheet\\Chart\\Chart($chartName, $title, $legend, $plotArea, $plotVisOnly, (string) $dispBlanksAs, $XaxisLabel, $YaxisLabel, $xAxis, $yAxis);\n        if ($chartNoFill) {\n            $chart->setNoFill(true);\n        }\n        if ($chartFillColor !== null) {\n            $chart->getFillColor()->setColorPropertiesArray($chartFillColor);\n        }\n        if ($chartBorderLines !== null) {\n            $chart->setBorderLines($chartBorderLines);\n        }\n        $chart->setNoBorder($noBorder);\n        $chart->setRoundedCorners($roundedCorners);\n        if (is_bool($autoTitleDeleted)) {\n            $chart->setAutoTitleDeleted($autoTitleDeleted);\n        }\n        if (is_int($rotX)) {\n            $chart->setRotX($rotX);\n        }\n        if (is_int($rotY)) {\n            $chart->setRotY($rotY);\n        }\n        if (is_int($rAngAx)) {\n            $chart->setRAngAx($rAngAx);\n        }\n        if (is_int($perspective)) {\n            $chart->setPerspective($perspective);\n        }\n\n        return $chart;\n    }\n\n    private function chartTitle(SimpleXMLElement $titleDetails): Title\n    {\n        $caption = '';\n        $titleLayout = null;\n        $titleOverlay = false;\n        $titleFormula = null;\n        $titleFont = null;\n        foreach ($titleDetails as $titleDetailKey => $chartDetail) {\n            $chartDetail = Xlsx::testSimpleXml($chartDetail);\n            switch ($titleDetailKey) {\n                case 'tx':\n                    $caption = [];\n                    if (isset($chartDetail->rich)) {\n                        $titleDetails = $chartDetail->rich->children($this->aNamespace);\n                        foreach ($titleDetails as $titleKey => $titleDetail) {\n                            $titleDetail = Xlsx::testSimpleXml($titleDetail);\n                            switch ($titleKey) {\n                                case 'p':\n                                    $titleDetailPart = $titleDetail->children($this->aNamespace);\n                                    $caption[] = $this->parseRichText($titleDetailPart);\n                            }\n                        }\n                    } elseif (isset($chartDetail->strRef->strCache)) {\n                        foreach ($chartDetail->strRef->strCache->pt as $pt) {\n                            if (isset($pt->v)) {\n                                $caption[] = (string) $pt->v;\n                            }\n                        }\n                        if (isset($chartDetail->strRef->f)) {\n                            $titleFormula = (string) $chartDetail->strRef->f;\n                        }\n                    }\n\n                    break;\n                case 'overlay':\n                    $titleOverlay = self::getAttributeBoolean($chartDetail, 'val');\n\n                    break;\n                case 'layout':\n                    $titleLayout = $this->chartLayoutDetails($chartDetail);\n\n                    break;\n                case 'txPr':\n                    if (isset($chartDetail->children($this->aNamespace)->p)) {\n                        $titleFont = $this->parseFont($chartDetail->children($this->aNamespace)->p);\n                    }\n\n                    break;\n            }\n        }\n        $title = new Title($caption, $titleLayout, (bool) $titleOverlay);\n        if (!empty($titleFormula)) {\n            $title->setCellReference($titleFormula);\n        }\n        if ($titleFont !== null) {\n            $title->setFont($titleFont);\n        }\n\n        return $title;\n    }\n\n    private function chartLayoutDetails(SimpleXMLElement $chartDetail): ?Layout\n    {\n        if (!isset($chartDetail->manualLayout)) {\n            return null;\n        }\n        $details = $chartDetail->manualLayout->children($this->cNamespace);\n        if ($details === null) {\n            return null;\n        }\n        $layout = [];\n        foreach ($details as $detailKey => $detail) {\n            $detail = Xlsx::testSimpleXml($detail);\n            $layout[$detailKey] = self::getAttributeString($detail, 'val');\n        }\n\n        return new Layout($layout);\n    }\n\n    private function chartDataSeries(SimpleXMLElement $chartDetail, string $plotType): DataSeries\n    {\n        $multiSeriesType = null;\n        $smoothLine = false;\n        $seriesLabel = $seriesCategory = $seriesValues = $plotOrder = $seriesBubbles = [];\n        $plotDirection = null;\n\n        $seriesDetailSet = $chartDetail->children($this->cNamespace);\n        foreach ($seriesDetailSet as $seriesDetailKey => $seriesDetails) {\n            switch ($seriesDetailKey) {\n                case 'grouping':\n                    $multiSeriesType = self::getAttributeString($chartDetail->grouping, 'val');\n\n                    break;\n                case 'ser':\n                    $marker = null;\n                    $seriesIndex = '';\n                    $fillColor = null;\n                    $pointSize = null;\n                    $noFill = false;\n                    $bubble3D = false;\n                    $dptColors = [];\n                    $markerFillColor = null;\n                    $markerBorderColor = null;\n                    $lineStyle = null;\n                    $labelLayout = null;\n                    $trendLines = [];\n                    foreach ($seriesDetails as $seriesKey => $seriesDetail) {\n                        $seriesDetail = Xlsx::testSimpleXml($seriesDetail);\n                        switch ($seriesKey) {\n                            case 'idx':\n                                $seriesIndex = self::getAttributeInteger($seriesDetail, 'val');\n\n                                break;\n                            case 'order':\n                                $seriesOrder = self::getAttributeInteger($seriesDetail, 'val');\n                                if ($seriesOrder !== null) {\n                                    $plotOrder[$seriesIndex] = $seriesOrder;\n                                }\n\n                                break;\n                            case 'tx':\n                                $temp = $this->chartDataSeriesValueSet($seriesDetail);\n                                if ($temp !== null) {\n                                    $seriesLabel[$seriesIndex] = $temp;\n                                }\n\n                                break;\n                            case 'spPr':\n                                $children = $seriesDetail->children($this->aNamespace);\n                                if (isset($children->ln)) {\n                                    $ln = $children->ln;\n                                    if (is_countable($ln->noFill) && count($ln->noFill) === 1) {\n                                        $noFill = true;\n                                    }\n                                    $lineStyle = new GridLines();\n                                    $this->readLineStyle($seriesDetails, $lineStyle);\n                                }\n                                if (isset($children->effectLst)) {\n                                    if ($lineStyle === null) {\n                                        $lineStyle = new GridLines();\n                                    }\n                                    $this->readEffects($seriesDetails, $lineStyle);\n                                }\n                                if (isset($children->solidFill)) {\n                                    $fillColor = new ChartColor($this->readColor($children->solidFill));\n                                }\n\n                                break;\n                            case 'dPt':\n                                $dptIdx = (int) self::getAttributeString($seriesDetail->idx, 'val');\n                                if (isset($seriesDetail->spPr)) {\n                                    $children = $seriesDetail->spPr->children($this->aNamespace);\n                                    if (isset($children->solidFill)) {\n                                        $arrayColors = $this->readColor($children->solidFill);\n                                        $dptColors[$dptIdx] = new ChartColor($arrayColors);\n                                    }\n                                }\n\n                                break;\n                            case 'trendline':\n                                $trendLine = new TrendLine();\n                                $this->readLineStyle($seriesDetail, $trendLine);\n                                $trendLineType = self::getAttributeString($seriesDetail->trendlineType, 'val');\n                                $dispRSqr = self::getAttributeBoolean($seriesDetail->dispRSqr, 'val');\n                                $dispEq = self::getAttributeBoolean($seriesDetail->dispEq, 'val');\n                                $order = self::getAttributeInteger($seriesDetail->order, 'val');\n                                $period = self::getAttributeInteger($seriesDetail->period, 'val');\n                                $forward = self::getAttributeFloat($seriesDetail->forward, 'val');\n                                $backward = self::getAttributeFloat($seriesDetail->backward, 'val');\n                                $intercept = self::getAttributeFloat($seriesDetail->intercept, 'val');\n                                $name = (string) $seriesDetail->name;\n                                $trendLine->setTrendLineProperties(\n                                    $trendLineType,\n                                    $order,\n                                    $period,\n                                    $dispRSqr,\n                                    $dispEq,\n                                    $backward,\n                                    $forward,\n                                    $intercept,\n                                    $name\n                                );\n                                $trendLines[] = $trendLine;\n\n                                break;\n                            case 'marker':\n                                $marker = self::getAttributeString($seriesDetail->symbol, 'val');\n                                $pointSize = self::getAttributeString($seriesDetail->size, 'val');\n                                $pointSize = is_numeric($pointSize) ? ((int) $pointSize) : null;\n                                if (isset($seriesDetail->spPr)) {\n                                    $children = $seriesDetail->spPr->children($this->aNamespace);\n                                    if (isset($children->solidFill)) {\n                                        $markerFillColor = $this->readColor($children->solidFill);\n                                    }\n                                    if (isset($children->ln->solidFill)) {\n                                        $markerBorderColor = $this->readColor($children->ln->solidFill);\n                                    }\n                                }\n\n                                break;\n                            case 'smooth':\n                                $smoothLine = self::getAttributeBoolean($seriesDetail, 'val') ?? false;\n\n                                break;\n                            case 'cat':\n                                $temp = $this->chartDataSeriesValueSet($seriesDetail);\n                                if ($temp !== null) {\n                                    $seriesCategory[$seriesIndex] = $temp;\n                                }\n\n                                break;\n                            case 'val':\n                                $temp = $this->chartDataSeriesValueSet($seriesDetail, \"$marker\", $fillColor, \"$pointSize\");\n                                if ($temp !== null) {\n                                    $seriesValues[$seriesIndex] = $temp;\n                                }\n\n                                break;\n                            case 'xVal':\n                                $temp = $this->chartDataSeriesValueSet($seriesDetail, \"$marker\", $fillColor, \"$pointSize\");\n                                if ($temp !== null) {\n                                    $seriesCategory[$seriesIndex] = $temp;\n                                }\n\n                                break;\n                            case 'yVal':\n                                $temp = $this->chartDataSeriesValueSet($seriesDetail, \"$marker\", $fillColor, \"$pointSize\");\n                                if ($temp !== null) {\n                                    $seriesValues[$seriesIndex] = $temp;\n                                }\n\n                                break;\n                            case 'bubbleSize':\n                                $seriesBubble = $this->chartDataSeriesValueSet($seriesDetail, \"$marker\", $fillColor, \"$pointSize\");\n                                if ($seriesBubble !== null) {\n                                    $seriesBubbles[$seriesIndex] = $seriesBubble;\n                                }\n\n                                break;\n                            case 'bubble3D':\n                                $bubble3D = self::getAttributeBoolean($seriesDetail, 'val');\n\n                                break;\n                            case 'dLbls':\n                                $labelLayout = new Layout($this->readChartAttributes($seriesDetails));\n\n                                break;\n                        }\n                    }\n                    if ($labelLayout) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->setLabelLayout($labelLayout);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->setLabelLayout($labelLayout);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->setLabelLayout($labelLayout);\n                        }\n                    }\n                    if ($noFill) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->setScatterLines(false);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->setScatterLines(false);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->setScatterLines(false);\n                        }\n                    }\n                    if ($lineStyle !== null) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->copyLineStyles($lineStyle);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->copyLineStyles($lineStyle);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->copyLineStyles($lineStyle);\n                        }\n                    }\n                    if ($bubble3D) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->setBubble3D($bubble3D);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->setBubble3D($bubble3D);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->setBubble3D($bubble3D);\n                        }\n                    }\n                    if (!empty($dptColors)) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->setFillColor($dptColors);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->setFillColor($dptColors);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->setFillColor($dptColors);\n                        }\n                    }\n                    if ($markerFillColor !== null) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->getMarkerFillColor()->setColorPropertiesArray($markerFillColor);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->getMarkerFillColor()->setColorPropertiesArray($markerFillColor);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->getMarkerFillColor()->setColorPropertiesArray($markerFillColor);\n                        }\n                    }\n                    if ($markerBorderColor !== null) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->getMarkerBorderColor()->setColorPropertiesArray($markerBorderColor);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->getMarkerBorderColor()->setColorPropertiesArray($markerBorderColor);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->getMarkerBorderColor()->setColorPropertiesArray($markerBorderColor);\n                        }\n                    }\n                    if ($smoothLine) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->setSmoothLine(true);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->setSmoothLine(true);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->setSmoothLine(true);\n                        }\n                    }\n                    if (!empty($trendLines)) {\n                        if (isset($seriesLabel[$seriesIndex])) {\n                            $seriesLabel[$seriesIndex]->setTrendLines($trendLines);\n                        }\n                        if (isset($seriesCategory[$seriesIndex])) {\n                            $seriesCategory[$seriesIndex]->setTrendLines($trendLines);\n                        }\n                        if (isset($seriesValues[$seriesIndex])) {\n                            $seriesValues[$seriesIndex]->setTrendLines($trendLines);\n                        }\n                    }\n            }\n        }\n        $series = new DataSeries($plotType, $multiSeriesType, $plotOrder, $seriesLabel, $seriesCategory, $seriesValues, $plotDirection, $smoothLine);\n        $series->setPlotBubbleSizes($seriesBubbles);\n\n        return $series;\n    }\n\n    private function chartDataSeriesValueSet(SimpleXMLElement $seriesDetail, ?string $marker = null, ?ChartColor $fillColor = null, ?string $pointSize = null): ?DataSeriesValues\n    {\n        if (isset($seriesDetail->strRef)) {\n            $seriesSource = (string) $seriesDetail->strRef->f;\n            $seriesValues = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, null, 0, null, $marker, $fillColor, \"$pointSize\");\n\n            if (isset($seriesDetail->strRef->strCache)) {\n                /** @var array{formatCode: string, dataValues: mixed[]} */\n                $seriesData = $this->chartDataSeriesValues($seriesDetail->strRef->strCache->children($this->cNamespace), 's');\n                $seriesValues\n                    ->setFormatCode($seriesData['formatCode'])\n                    ->setDataValues($seriesData['dataValues']);\n            }\n\n            return $seriesValues;\n        } elseif (isset($seriesDetail->numRef)) {\n            $seriesSource = (string) $seriesDetail->numRef->f;\n            $seriesValues = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, $seriesSource, null, 0, null, $marker, $fillColor, \"$pointSize\");\n            if (isset($seriesDetail->numRef->numCache)) {\n                /** @var array{formatCode: string, dataValues: mixed[]} */\n                $seriesData = $this->chartDataSeriesValues($seriesDetail->numRef->numCache->children($this->cNamespace));\n                $seriesValues\n                    ->setFormatCode($seriesData['formatCode'])\n                    ->setDataValues($seriesData['dataValues']);\n            }\n\n            return $seriesValues;\n        } elseif (isset($seriesDetail->multiLvlStrRef)) {\n            $seriesSource = (string) $seriesDetail->multiLvlStrRef->f;\n            $seriesValues = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, null, 0, null, $marker, $fillColor, \"$pointSize\");\n\n            if (isset($seriesDetail->multiLvlStrRef->multiLvlStrCache)) {\n                /** @var array{formatCode: string, dataValues: mixed[]} */\n                $seriesData = $this->chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlStrRef->multiLvlStrCache->children($this->cNamespace), 's');\n                $seriesValues\n                    ->setFormatCode($seriesData['formatCode'])\n                    ->setDataValues($seriesData['dataValues']);\n            }\n\n            return $seriesValues;\n        } elseif (isset($seriesDetail->multiLvlNumRef)) {\n            $seriesSource = (string) $seriesDetail->multiLvlNumRef->f;\n            $seriesValues = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, null, 0, null, $marker, $fillColor, \"$pointSize\");\n\n            if (isset($seriesDetail->multiLvlNumRef->multiLvlNumCache)) {\n                /** @var array{formatCode: string, dataValues: mixed[]} */\n                $seriesData = $this->chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlNumRef->multiLvlNumCache->children($this->cNamespace), 's');\n                $seriesValues\n                    ->setFormatCode($seriesData['formatCode'])\n                    ->setDataValues($seriesData['dataValues']);\n            }\n\n            return $seriesValues;\n        }\n\n        if (isset($seriesDetail->v)) {\n            return new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_STRING,\n                null,\n                null,\n                1,\n                [(string) $seriesDetail->v]\n            );\n        }\n\n        return null;\n    }\n\n    /** @return mixed[] */\n    private function chartDataSeriesValues(SimpleXMLElement $seriesValueSet, string $dataType = 'n'): array\n    {\n        $seriesVal = [];\n        $formatCode = '';\n        $pointCount = 0;\n\n        foreach ($seriesValueSet as $seriesValueIdx => $seriesValue) {\n            $seriesValue = Xlsx::testSimpleXml($seriesValue);\n            switch ($seriesValueIdx) {\n                case 'ptCount':\n                    $pointCount = self::getAttributeInteger($seriesValue, 'val');\n\n                    break;\n                case 'formatCode':\n                    $formatCode = (string) $seriesValue;\n\n                    break;\n                case 'pt':\n                    $pointVal = self::getAttributeInteger($seriesValue, 'idx');\n                    if ($dataType == 's') {\n                        $seriesVal[$pointVal] = (string) $seriesValue->v;\n                    } elseif ((string) $seriesValue->v === ExcelError::NA()) {\n                        $seriesVal[$pointVal] = null;\n                    } else {\n                        $seriesVal[$pointVal] = (float) $seriesValue->v;\n                    }\n\n                    break;\n            }\n        }\n\n        return [\n            'formatCode' => $formatCode,\n            'pointCount' => $pointCount,\n            'dataValues' => $seriesVal,\n        ];\n    }\n\n    /** @return mixed[] */\n    private function chartDataSeriesValuesMultiLevel(SimpleXMLElement $seriesValueSet, string $dataType = 'n'): array\n    {\n        $seriesVal = [];\n        $formatCode = '';\n        $pointCount = 0;\n\n        foreach ($seriesValueSet->lvl as $seriesLevelIdx => $seriesLevel) {\n            foreach ($seriesLevel as $seriesValueIdx => $seriesValue) {\n                $seriesValue = Xlsx::testSimpleXml($seriesValue);\n                switch ($seriesValueIdx) {\n                    case 'ptCount':\n                        $pointCount = self::getAttributeInteger($seriesValue, 'val');\n\n                        break;\n                    case 'formatCode':\n                        $formatCode = (string) $seriesValue;\n\n                        break;\n                    case 'pt':\n                        $pointVal = self::getAttributeInteger($seriesValue, 'idx');\n                        if ($dataType == 's') {\n                            $seriesVal[$pointVal][] = (string) $seriesValue->v;\n                        } elseif ((string) $seriesValue->v === ExcelError::NA()) {\n                            $seriesVal[$pointVal] = null;\n                        } else {\n                            $seriesVal[$pointVal][] = (float) $seriesValue->v;\n                        }\n\n                        break;\n                }\n            }\n        }\n\n        return [\n            'formatCode' => $formatCode,\n            'pointCount' => $pointCount,\n            'dataValues' => $seriesVal,\n        ];\n    }\n\n    private function parseRichText(SimpleXMLElement $titleDetailPart): RichText\n    {\n        $value = new RichText();\n        $defaultFontSize = null;\n        $defaultBold = null;\n        $defaultItalic = null;\n        $defaultUnderscore = null;\n        $defaultStrikethrough = null;\n        $defaultBaseline = null;\n        $defaultFontName = null;\n        $defaultLatin = null;\n        $defaultEastAsian = null;\n        $defaultComplexScript = null;\n        $defaultFontColor = null;\n        if (isset($titleDetailPart->pPr->defRPr)) {\n            $defaultFontSize = self::getAttributeInteger($titleDetailPart->pPr->defRPr, 'sz');\n            $defaultBold = self::getAttributeBoolean($titleDetailPart->pPr->defRPr, 'b');\n            $defaultItalic = self::getAttributeBoolean($titleDetailPart->pPr->defRPr, 'i');\n            $defaultUnderscore = self::getAttributeString($titleDetailPart->pPr->defRPr, 'u');\n            $defaultStrikethrough = self::getAttributeString($titleDetailPart->pPr->defRPr, 'strike');\n            $defaultBaseline = self::getAttributeInteger($titleDetailPart->pPr->defRPr, 'baseline');\n            if (isset($titleDetailPart->defRPr->rFont['val'])) {\n                $defaultFontName = (string) $titleDetailPart->defRPr->rFont['val'];\n            }\n            if (isset($titleDetailPart->pPr->defRPr->latin)) {\n                $defaultLatin = self::getAttributeString($titleDetailPart->pPr->defRPr->latin, 'typeface');\n            }\n            if (isset($titleDetailPart->pPr->defRPr->ea)) {\n                $defaultEastAsian = self::getAttributeString($titleDetailPart->pPr->defRPr->ea, 'typeface');\n            }\n            if (isset($titleDetailPart->pPr->defRPr->cs)) {\n                $defaultComplexScript = self::getAttributeString($titleDetailPart->pPr->defRPr->cs, 'typeface');\n            }\n            if (isset($titleDetailPart->pPr->defRPr->solidFill)) {\n                $defaultFontColor = $this->readColor($titleDetailPart->pPr->defRPr->solidFill);\n            }\n        }\n        foreach ($titleDetailPart as $titleDetailElementKey => $titleDetailElement) {\n            if (\n                (string) $titleDetailElementKey !== 'r'\n                || !isset($titleDetailElement->t)\n            ) {\n                continue;\n            }\n            $objText = $value->createTextRun((string) $titleDetailElement->t);\n            if ($objText->getFont() === null) {\n                // @codeCoverageIgnoreStart\n                continue;\n                // @codeCoverageIgnoreEnd\n            }\n            $fontSize = null;\n            $bold = null;\n            $italic = null;\n            $underscore = null;\n            $strikethrough = null;\n            $baseline = null;\n            $fontName = null;\n            $latinName = null;\n            $eastAsian = null;\n            $complexScript = null;\n            $fontColor = null;\n            $underlineColor = null;\n            if (isset($titleDetailElement->rPr)) {\n                // not used now, not sure it ever was, grandfathering\n                if (isset($titleDetailElement->rPr->rFont['val'])) {\n                    // @codeCoverageIgnoreStart\n                    $fontName = (string) $titleDetailElement->rPr->rFont['val'];\n                    // @codeCoverageIgnoreEnd\n                }\n                if (isset($titleDetailElement->rPr->latin)) {\n                    $latinName = self::getAttributeString($titleDetailElement->rPr->latin, 'typeface');\n                }\n                if (isset($titleDetailElement->rPr->ea)) {\n                    $eastAsian = self::getAttributeString($titleDetailElement->rPr->ea, 'typeface');\n                }\n                if (isset($titleDetailElement->rPr->cs)) {\n                    $complexScript = self::getAttributeString($titleDetailElement->rPr->cs, 'typeface');\n                }\n                $fontSize = self::getAttributeInteger($titleDetailElement->rPr, 'sz');\n\n                // not used now, not sure it ever was, grandfathering\n                if (isset($titleDetailElement->rPr->solidFill)) {\n                    $fontColor = $this->readColor($titleDetailElement->rPr->solidFill);\n                }\n\n                $bold = self::getAttributeBoolean($titleDetailElement->rPr, 'b');\n                $italic = self::getAttributeBoolean($titleDetailElement->rPr, 'i');\n                $baseline = self::getAttributeInteger($titleDetailElement->rPr, 'baseline');\n                $underscore = self::getAttributeString($titleDetailElement->rPr, 'u');\n                if (isset($titleDetailElement->rPr->uFill->solidFill)) {\n                    $underlineColor = $this->readColor($titleDetailElement->rPr->uFill->solidFill);\n                }\n\n                $strikethrough = self::getAttributeString($titleDetailElement->rPr, 'strike');\n            }\n\n            $fontFound = false;\n            $latinName = $latinName ?? $defaultLatin;\n            if ($latinName !== null) {\n                $objText->getFont()->setLatin($latinName);\n                $fontFound = true;\n            }\n            $eastAsian = $eastAsian ?? $defaultEastAsian;\n            if ($eastAsian !== null) {\n                $objText->getFont()->setEastAsian($eastAsian);\n                $fontFound = true;\n            }\n            $complexScript = $complexScript ?? $defaultComplexScript;\n            if ($complexScript !== null) {\n                $objText->getFont()->setComplexScript($complexScript);\n                $fontFound = true;\n            }\n            $fontName = $fontName ?? $defaultFontName;\n            if ($fontName !== null) {\n                // @codeCoverageIgnoreStart\n                $objText->getFont()->setName($fontName);\n                $fontFound = true;\n                // @codeCoverageIgnoreEnd\n            }\n\n            $fontSize = $fontSize ?? $defaultFontSize;\n            if (is_int($fontSize)) {\n                $objText->getFont()->setSize(floor($fontSize / 100));\n                $fontFound = true;\n            } else {\n                $objText->getFont()->setSize(null, true);\n            }\n\n            $fontColor = $fontColor ?? $defaultFontColor;\n            if (!empty($fontColor)) {\n                $objText->getFont()->setChartColor($fontColor);\n                $fontFound = true;\n            }\n\n            $bold = $bold ?? $defaultBold;\n            if ($bold !== null) {\n                $objText->getFont()->setBold($bold);\n                $fontFound = true;\n            }\n\n            $italic = $italic ?? $defaultItalic;\n            if ($italic !== null) {\n                $objText->getFont()->setItalic($italic);\n                $fontFound = true;\n            }\n\n            $baseline = $baseline ?? $defaultBaseline;\n            if ($baseline !== null) {\n                $objText->getFont()->setBaseLine($baseline);\n                if ($baseline > 0) {\n                    $objText->getFont()->setSuperscript(true);\n                } elseif ($baseline < 0) {\n                    $objText->getFont()->setSubscript(true);\n                }\n                $fontFound = true;\n            }\n\n            $underscore = $underscore ?? $defaultUnderscore;\n            if ($underscore !== null) {\n                if ($underscore == 'sng') {\n                    $objText->getFont()->setUnderline(Font::UNDERLINE_SINGLE);\n                } elseif ($underscore == 'dbl') {\n                    $objText->getFont()->setUnderline(Font::UNDERLINE_DOUBLE);\n                } elseif ($underscore !== '') {\n                    $objText->getFont()->setUnderline($underscore);\n                } else {\n                    $objText->getFont()->setUnderline(Font::UNDERLINE_NONE);\n                }\n                $fontFound = true;\n                if ($underlineColor) {\n                    $objText->getFont()->setUnderlineColor($underlineColor);\n                }\n            }\n\n            $strikethrough = $strikethrough ?? $defaultStrikethrough;\n            if ($strikethrough !== null) {\n                $objText->getFont()->setStrikeType($strikethrough);\n                if ($strikethrough == 'noStrike') {\n                    $objText->getFont()->setStrikethrough(false);\n                } else {\n                    $objText->getFont()->setStrikethrough(true);\n                }\n                $fontFound = true;\n            }\n            if ($fontFound === false) {\n                $objText->setFont(null);\n            }\n        }\n\n        return $value;\n    }\n\n    private function parseFont(SimpleXMLElement $titleDetailPart): ?Font\n    {\n        if (!isset($titleDetailPart->pPr->defRPr)) {\n            return null;\n        }\n        $fontArray = [];\n        $fontArray['size'] = self::getAttributeInteger($titleDetailPart->pPr->defRPr, 'sz');\n        if ($fontArray['size'] !== null && $fontArray['size'] >= 100) {\n            $fontArray['size'] /= 100.0;\n        }\n        if ($fontArray['size'] !== null) {\n            $fontArray['size'] = (int) ($fontArray['size']);\n        }\n        $fontArray['bold'] = (bool) self::getAttributeBoolean($titleDetailPart->pPr->defRPr, 'b');\n        $fontArray['italic'] = (bool) self::getAttributeBoolean($titleDetailPart->pPr->defRPr, 'i');\n        $fontArray['underscore'] = self::getAttributeString($titleDetailPart->pPr->defRPr, 'u');\n        $strikethrough = self::getAttributeString($titleDetailPart->pPr->defRPr, 'strike');\n        if ($strikethrough !== null) {\n            if ($strikethrough == 'noStrike') {\n                $fontArray['strikethrough'] = false;\n            } else {\n                $fontArray['strikethrough'] = true;\n            }\n        }\n        $fontArray['cap'] = (string) self::getAttributeString($titleDetailPart->pPr->defRPr, 'cap');\n\n        if (isset($titleDetailPart->pPr->defRPr->latin)) {\n            $fontArray['latin'] = (string) self::getAttributeString($titleDetailPart->pPr->defRPr->latin, 'typeface');\n        }\n        if (isset($titleDetailPart->pPr->defRPr->ea)) {\n            $fontArray['eastAsian'] = (string) self::getAttributeString($titleDetailPart->pPr->defRPr->ea, 'typeface');\n        }\n        if (isset($titleDetailPart->pPr->defRPr->cs)) {\n            $fontArray['complexScript'] = (string) self::getAttributeString($titleDetailPart->pPr->defRPr->cs, 'typeface');\n        }\n        if (isset($titleDetailPart->pPr->defRPr->solidFill)) {\n            $fontArray['chartColor'] = new ChartColor($this->readColor($titleDetailPart->pPr->defRPr->solidFill));\n        }\n        $font = new Font();\n        //$font->setSize(null, true);\n        $font->applyFromArray($fontArray);\n\n        return $font;\n    }\n\n    /** @return mixed[] */\n    private function readChartAttributes(?SimpleXMLElement $chartDetail): array\n    {\n        $plotAttributes = [];\n        if (isset($chartDetail->dLbls)) {\n            if (isset($chartDetail->dLbls->dLblPos)) {\n                $plotAttributes['dLblPos'] = self::getAttributeString($chartDetail->dLbls->dLblPos, 'val');\n            }\n            if (isset($chartDetail->dLbls->numFmt)) {\n                $plotAttributes['numFmtCode'] = self::getAttributeString($chartDetail->dLbls->numFmt, 'formatCode');\n                $plotAttributes['numFmtLinked'] = self::getAttributeBoolean($chartDetail->dLbls->numFmt, 'sourceLinked');\n            }\n            if (isset($chartDetail->dLbls->showLegendKey)) {\n                $plotAttributes['showLegendKey'] = self::getAttributeString($chartDetail->dLbls->showLegendKey, 'val');\n            }\n            if (isset($chartDetail->dLbls->showVal)) {\n                $plotAttributes['showVal'] = self::getAttributeString($chartDetail->dLbls->showVal, 'val');\n            }\n            if (isset($chartDetail->dLbls->showCatName)) {\n                $plotAttributes['showCatName'] = self::getAttributeString($chartDetail->dLbls->showCatName, 'val');\n            }\n            if (isset($chartDetail->dLbls->showSerName)) {\n                $plotAttributes['showSerName'] = self::getAttributeString($chartDetail->dLbls->showSerName, 'val');\n            }\n            if (isset($chartDetail->dLbls->showPercent)) {\n                $plotAttributes['showPercent'] = self::getAttributeString($chartDetail->dLbls->showPercent, 'val');\n            }\n            if (isset($chartDetail->dLbls->showBubbleSize)) {\n                $plotAttributes['showBubbleSize'] = self::getAttributeString($chartDetail->dLbls->showBubbleSize, 'val');\n            }\n            if (isset($chartDetail->dLbls->showLeaderLines)) {\n                $plotAttributes['showLeaderLines'] = self::getAttributeString($chartDetail->dLbls->showLeaderLines, 'val');\n            }\n            if (isset($chartDetail->dLbls->spPr)) {\n                $sppr = $chartDetail->dLbls->spPr->children($this->aNamespace);\n                if (isset($sppr->solidFill)) {\n                    $plotAttributes['labelFillColor'] = new ChartColor($this->readColor($sppr->solidFill));\n                }\n                if (isset($sppr->ln->solidFill)) {\n                    $plotAttributes['labelBorderColor'] = new ChartColor($this->readColor($sppr->ln->solidFill));\n                }\n            }\n            if (isset($chartDetail->dLbls->txPr)) {\n                $txpr = $chartDetail->dLbls->txPr->children($this->aNamespace);\n                if (isset($txpr->p)) {\n                    $plotAttributes['labelFont'] = $this->parseFont($txpr->p);\n                    if (isset($txpr->p->pPr->defRPr->effectLst)) {\n                        $labelEffects = new GridLines();\n                        $this->readEffects($txpr->p->pPr->defRPr, $labelEffects, false);\n                        $plotAttributes['labelEffects'] = $labelEffects;\n                    }\n                }\n            }\n        }\n\n        return $plotAttributes;\n    }\n\n    /** @param array<mixed> $plotAttributes */\n    private function setChartAttributes(Layout $plotArea, array $plotAttributes): void\n    {\n        foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) {\n            /** @var ?bool $plotAttributeValue */\n            switch ($plotAttributeKey) {\n                case 'showLegendKey':\n                    $plotArea->setShowLegendKey($plotAttributeValue);\n\n                    break;\n                case 'showVal':\n                    $plotArea->setShowVal($plotAttributeValue);\n\n                    break;\n                case 'showCatName':\n                    $plotArea->setShowCatName($plotAttributeValue);\n\n                    break;\n                case 'showSerName':\n                    $plotArea->setShowSerName($plotAttributeValue);\n\n                    break;\n                case 'showPercent':\n                    $plotArea->setShowPercent($plotAttributeValue);\n\n                    break;\n                case 'showBubbleSize':\n                    $plotArea->setShowBubbleSize($plotAttributeValue);\n\n                    break;\n                case 'showLeaderLines':\n                    $plotArea->setShowLeaderLines($plotAttributeValue);\n\n                    break;\n                case 'labelFont':\n                    /** @var ?Font $plotAttributeValue */\n                    $plotArea->setLabelFont($plotAttributeValue);\n\n                    break;\n            }\n        }\n    }\n\n    private function readEffects(SimpleXMLElement $chartDetail, ?ChartProperties $chartObject, bool $getSppr = true): void\n    {\n        if (!isset($chartObject)) {\n            return;\n        }\n        if ($getSppr) {\n            if (!isset($chartDetail->spPr)) {\n                return;\n            }\n            $sppr = $chartDetail->spPr->children($this->aNamespace);\n        } else {\n            $sppr = $chartDetail;\n        }\n        if (isset($sppr->effectLst->glow)) {\n            $axisGlowSize = (float) self::getAttributeInteger($sppr->effectLst->glow, 'rad') / ChartProperties::POINTS_WIDTH_MULTIPLIER;\n            if ($axisGlowSize != 0.0) {\n                $colorArray = $this->readColor($sppr->effectLst->glow);\n                $chartObject->setGlowProperties($axisGlowSize, $colorArray['value'], $colorArray['alpha'], $colorArray['type']);\n            }\n        }\n\n        if (isset($sppr->effectLst->softEdge)) {\n            $softEdgeSize = self::getAttributeString($sppr->effectLst->softEdge, 'rad');\n            if (is_numeric($softEdgeSize)) {\n                $chartObject->setSoftEdges((float) ChartProperties::xmlToPoints($softEdgeSize));\n            }\n        }\n\n        $type = '';\n        foreach (self::SHADOW_TYPES as $shadowType) {\n            if (isset($sppr->effectLst->$shadowType)) {\n                $type = $shadowType;\n\n                break;\n            }\n        }\n        if ($type !== '') {\n            $blur = self::getAttributeString($sppr->effectLst->$type, 'blurRad');\n            $blur = is_numeric($blur) ? ChartProperties::xmlToPoints($blur) : null;\n            $dist = self::getAttributeString($sppr->effectLst->$type, 'dist');\n            $dist = is_numeric($dist) ? ChartProperties::xmlToPoints($dist) : null;\n            $direction = self::getAttributeString($sppr->effectLst->$type, 'dir');\n            $direction = is_numeric($direction) ? ChartProperties::xmlToAngle($direction) : null;\n            $algn = self::getAttributeString($sppr->effectLst->$type, 'algn');\n            $rot = self::getAttributeString($sppr->effectLst->$type, 'rotWithShape');\n            $size = [];\n            foreach (['sx', 'sy'] as $sizeType) {\n                $sizeValue = self::getAttributeString($sppr->effectLst->$type, $sizeType);\n                if (is_numeric($sizeValue)) {\n                    $size[$sizeType] = ChartProperties::xmlToTenthOfPercent((string) $sizeValue);\n                } else {\n                    $size[$sizeType] = null;\n                }\n            }\n            foreach (['kx', 'ky'] as $sizeType) {\n                $sizeValue = self::getAttributeString($sppr->effectLst->$type, $sizeType);\n                if (is_numeric($sizeValue)) {\n                    $size[$sizeType] = ChartProperties::xmlToAngle((string) $sizeValue);\n                } else {\n                    $size[$sizeType] = null;\n                }\n            }\n            $colorArray = $this->readColor($sppr->effectLst->$type);\n            $chartObject\n                ->setShadowProperty('effect', $type)\n                ->setShadowProperty('blur', $blur)\n                ->setShadowProperty('direction', $direction)\n                ->setShadowProperty('distance', $dist)\n                ->setShadowProperty('algn', $algn)\n                ->setShadowProperty('rotWithShape', $rot)\n                ->setShadowProperty('size', $size)\n                ->setShadowProperty('color', $colorArray);\n        }\n    }\n\n    private const SHADOW_TYPES = [\n        'outerShdw',\n        'innerShdw',\n    ];\n\n    /** @return array{type: ?string, value: ?string, alpha: ?int, brightness: ?int} */\n    private function readColor(SimpleXMLElement $colorXml): array\n    {\n        $result = [\n            'type' => null,\n            'value' => null,\n            'alpha' => null,\n            'brightness' => null,\n        ];\n        foreach (ChartColor::EXCEL_COLOR_TYPES as $type) {\n            if (isset($colorXml->$type)) {\n                $result['type'] = $type;\n                $result['value'] = self::getAttributeString($colorXml->$type, 'val');\n                if (isset($colorXml->$type->alpha)) {\n                    $alpha = self::getAttributeString($colorXml->$type->alpha, 'val');\n                    if (is_numeric($alpha)) {\n                        $result['alpha'] = ChartColor::alphaFromXml($alpha);\n                    }\n                }\n                if (isset($colorXml->$type->lumMod)) {\n                    $brightness = self::getAttributeString($colorXml->$type->lumMod, 'val');\n                    if (is_numeric($brightness)) {\n                        $result['brightness'] = ChartColor::alphaFromXml($brightness);\n                    }\n                }\n\n                break;\n            }\n        }\n\n        return $result;\n    }\n\n    private function readLineStyle(SimpleXMLElement $chartDetail, ?ChartProperties $chartObject): void\n    {\n        if (!isset($chartObject, $chartDetail->spPr)) {\n            return;\n        }\n        $sppr = $chartDetail->spPr->children($this->aNamespace);\n\n        if (!isset($sppr->ln)) {\n            return;\n        }\n        $lineWidth = null;\n        $lineWidthTemp = self::getAttributeString($sppr->ln, 'w');\n        if (is_numeric($lineWidthTemp)) {\n            $lineWidth = ChartProperties::xmlToPoints($lineWidthTemp);\n        }\n        $compoundType = self::getAttributeString($sppr->ln, 'cmpd');\n        $dashType = self::getAttributeString($sppr->ln->prstDash, 'val');\n        $capType = self::getAttributeString($sppr->ln, 'cap');\n        if (isset($sppr->ln->miter)) {\n            $joinType = ChartProperties::LINE_STYLE_JOIN_MITER;\n        } elseif (isset($sppr->ln->bevel)) {\n            $joinType = ChartProperties::LINE_STYLE_JOIN_BEVEL;\n        } else {\n            $joinType = '';\n        }\n        $headArrowSize = 0;\n        $endArrowSize = 0;\n        $headArrowType = self::getAttributeString($sppr->ln->headEnd, 'type');\n        $headArrowWidth = self::getAttributeString($sppr->ln->headEnd, 'w');\n        $headArrowLength = self::getAttributeString($sppr->ln->headEnd, 'len');\n        $endArrowType = self::getAttributeString($sppr->ln->tailEnd, 'type');\n        $endArrowWidth = self::getAttributeString($sppr->ln->tailEnd, 'w');\n        $endArrowLength = self::getAttributeString($sppr->ln->tailEnd, 'len');\n        $chartObject->setLineStyleProperties(\n            $lineWidth,\n            $compoundType,\n            $dashType,\n            $capType,\n            $joinType,\n            $headArrowType,\n            $headArrowSize,\n            $endArrowType,\n            $endArrowSize,\n            $headArrowWidth,\n            $headArrowLength,\n            $endArrowWidth,\n            $endArrowLength\n        );\n        $colorArray = $this->readColor($sppr->ln->solidFill);\n        $chartObject->getLineColor()->setColorPropertiesArray($colorArray);\n    }\n\n    private function setAxisProperties(SimpleXMLElement $chartDetail, ?Axis $whichAxis): void\n    {\n        if (!isset($whichAxis)) {\n            return;\n        }\n        if (isset($chartDetail->delete)) {\n            $whichAxis->setAxisOption('hidden', (string) self::getAttributeString($chartDetail->delete, 'val'));\n        }\n        if (isset($chartDetail->numFmt)) {\n            $whichAxis->setAxisNumberProperties(\n                (string) self::getAttributeString($chartDetail->numFmt, 'formatCode'),\n                null,\n                (int) self::getAttributeInteger($chartDetail->numFmt, 'sourceLinked')\n            );\n        }\n        if (isset($chartDetail->crossBetween)) {\n            $whichAxis->setCrossBetween((string) self::getAttributeString($chartDetail->crossBetween, 'val'));\n        }\n        if (isset($chartDetail->dispUnits, $chartDetail->dispUnits->builtInUnit)) {\n            $whichAxis->setAxisOption('dispUnitsBuiltIn', (string) self::getAttributeString($chartDetail->dispUnits->builtInUnit, 'val'));\n            if (isset($chartDetail->dispUnits->dispUnitsLbl)) {\n                $whichAxis->setDispUnitsTitle(new Title());\n                // TODO parse title elements\n            }\n        }\n        if (isset($chartDetail->majorTickMark)) {\n            $whichAxis->setAxisOption('major_tick_mark', (string) self::getAttributeString($chartDetail->majorTickMark, 'val'));\n        }\n        if (isset($chartDetail->minorTickMark)) {\n            $whichAxis->setAxisOption('minor_tick_mark', (string) self::getAttributeString($chartDetail->minorTickMark, 'val'));\n        }\n        if (isset($chartDetail->tickLblPos)) {\n            $whichAxis->setAxisOption('axis_labels', (string) self::getAttributeString($chartDetail->tickLblPos, 'val'));\n        }\n        if (isset($chartDetail->crosses)) {\n            $whichAxis->setAxisOption('horizontal_crosses', (string) self::getAttributeString($chartDetail->crosses, 'val'));\n        }\n        if (isset($chartDetail->crossesAt)) {\n            $whichAxis->setAxisOption('horizontal_crosses_value', (string) self::getAttributeString($chartDetail->crossesAt, 'val'));\n        }\n        if (isset($chartDetail->scaling->logBase)) {\n            $whichAxis->setAxisOption('logBase', (string) self::getAttributeString($chartDetail->scaling->logBase, 'val'));\n        }\n        if (isset($chartDetail->scaling->orientation)) {\n            $whichAxis->setAxisOption('orientation', (string) self::getAttributeString($chartDetail->scaling->orientation, 'val'));\n        }\n        if (isset($chartDetail->scaling->max)) {\n            $whichAxis->setAxisOption('maximum', (string) self::getAttributeString($chartDetail->scaling->max, 'val'));\n        }\n        if (isset($chartDetail->scaling->min)) {\n            $whichAxis->setAxisOption('minimum', (string) self::getAttributeString($chartDetail->scaling->min, 'val'));\n        }\n        if (isset($chartDetail->scaling->min)) {\n            $whichAxis->setAxisOption('minimum', (string) self::getAttributeString($chartDetail->scaling->min, 'val'));\n        }\n        if (isset($chartDetail->majorUnit)) {\n            $whichAxis->setAxisOption('major_unit', (string) self::getAttributeString($chartDetail->majorUnit, 'val'));\n        }\n        if (isset($chartDetail->minorUnit)) {\n            $whichAxis->setAxisOption('minor_unit', (string) self::getAttributeString($chartDetail->minorUnit, 'val'));\n        }\n        if (isset($chartDetail->baseTimeUnit)) {\n            $whichAxis->setAxisOption('baseTimeUnit', (string) self::getAttributeString($chartDetail->baseTimeUnit, 'val'));\n        }\n        if (isset($chartDetail->majorTimeUnit)) {\n            $whichAxis->setAxisOption('majorTimeUnit', (string) self::getAttributeString($chartDetail->majorTimeUnit, 'val'));\n        }\n        if (isset($chartDetail->minorTimeUnit)) {\n            $whichAxis->setAxisOption('minorTimeUnit', (string) self::getAttributeString($chartDetail->minorTimeUnit, 'val'));\n        }\n        if (isset($chartDetail->txPr)) {\n            $children = $chartDetail->txPr->children($this->aNamespace);\n            $addAxisText = false;\n            $axisText = new AxisText();\n            if (isset($children->bodyPr)) {\n                $textRotation = self::getAttributeString($children->bodyPr, 'rot');\n                if (is_numeric($textRotation)) {\n                    $axisText->setRotation((int) ChartProperties::xmlToAngle($textRotation));\n                    $addAxisText = true;\n                }\n            }\n            if (isset($children->p->pPr->defRPr)) {\n                $font = $this->parseFont($children->p);\n                if ($font !== null) {\n                    $axisText->setFont($font);\n                    $addAxisText = true;\n                }\n            }\n            if (isset($children->p->pPr->defRPr->effectLst)) {\n                $this->readEffects($children->p->pPr->defRPr, $axisText, false);\n                $addAxisText = true;\n            }\n            if ($addAxisText) {\n                $whichAxis->setAxisText($axisText);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\DefaultReadFilter;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\n\nclass ColumnAndRowAttributes extends BaseParserClass\n{\n    private Worksheet $worksheet;\n\n    private ?SimpleXMLElement $worksheetXml;\n\n    public function __construct(Worksheet $workSheet, ?SimpleXMLElement $worksheetXml = null)\n    {\n        $this->worksheet = $workSheet;\n        $this->worksheetXml = $worksheetXml;\n    }\n\n    /**\n     * Set Worksheet column attributes by attributes array passed.\n     *\n     * @param string $columnAddress A, B, ... DX, ...\n     * @param array{xfIndex?: int, visible?: bool, collapsed?: bool, collapsed?: bool, outlineLevel?: int, rowHeight?: float, width?: int} $columnAttributes array of attributes (indexes are attribute name, values are value)\n     */\n    private function setColumnAttributes(string $columnAddress, array $columnAttributes): void\n    {\n        if (isset($columnAttributes['xfIndex'])) {\n            $this->worksheet->getColumnDimension($columnAddress)->setXfIndex($columnAttributes['xfIndex']);\n        }\n        if (isset($columnAttributes['visible'])) {\n            $this->worksheet->getColumnDimension($columnAddress)->setVisible($columnAttributes['visible']);\n        }\n        if (isset($columnAttributes['collapsed'])) {\n            $this->worksheet->getColumnDimension($columnAddress)->setCollapsed($columnAttributes['collapsed']);\n        }\n        if (isset($columnAttributes['outlineLevel'])) {\n            $this->worksheet->getColumnDimension($columnAddress)->setOutlineLevel($columnAttributes['outlineLevel']);\n        }\n        if (isset($columnAttributes['width'])) {\n            $this->worksheet->getColumnDimension($columnAddress)->setWidth($columnAttributes['width']);\n        }\n    }\n\n    /**\n     * Set Worksheet row attributes by attributes array passed.\n     *\n     * @param int $rowNumber 1, 2, 3, ... 99, ...\n     * @param array{xfIndex?: int, visible?: bool, collapsed?: bool, collapsed?: bool, outlineLevel?: int, rowHeight?: float, customFormat?: bool, ht?: float} $rowAttributes array of attributes (indexes are attribute name, values are value)\n     *                               'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'rowHeight', ... ?\n     */\n    private function setRowAttributes(int $rowNumber, array $rowAttributes): void\n    {\n        if (isset($rowAttributes['xfIndex'])) {\n            $this->worksheet->getRowDimension($rowNumber)\n                ->setXfIndex($rowAttributes['xfIndex']);\n        }\n        if (isset($rowAttributes['visible'])) {\n            $this->worksheet->getRowDimension($rowNumber)\n                ->setVisible($rowAttributes['visible']);\n        }\n        if (isset($rowAttributes['collapsed'])) {\n            $this->worksheet->getRowDimension($rowNumber)\n                ->setCollapsed($rowAttributes['collapsed']);\n        }\n        if (isset($rowAttributes['outlineLevel'])) {\n            $this->worksheet->getRowDimension($rowNumber)\n                ->setOutlineLevel($rowAttributes['outlineLevel']);\n        }\n        if (isset($rowAttributes['customFormat'], $rowAttributes['rowHeight'])) {\n            $this->worksheet->getRowDimension($rowNumber)\n                ->setCustomFormat($rowAttributes['customFormat'], $rowAttributes['rowHeight']);\n        } elseif (isset($rowAttributes['rowHeight'])) {\n            $this->worksheet->getRowDimension($rowNumber)\n                ->setRowHeight($rowAttributes['rowHeight']);\n        }\n    }\n\n    public function load(?IReadFilter $readFilter = null, bool $readDataOnly = false, bool $ignoreRowsWithNoCells = false): bool\n    {\n        if ($this->worksheetXml === null) {\n            return false;\n        }\n        if ($readFilter !== null && $readFilter::class === DefaultReadFilter::class) {\n            $readFilter = null;\n        }\n\n        $columnsAttributes = [];\n        $rowsAttributes = [];\n        if (isset($this->worksheetXml->cols)) {\n            $columnsAttributes = $this->readColumnAttributes($this->worksheetXml->cols, $readDataOnly);\n        }\n\n        if ($this->worksheetXml->sheetData && $this->worksheetXml->sheetData->row) {\n            $rowsAttributes = $this->readRowAttributes($this->worksheetXml->sheetData->row, $readDataOnly, $ignoreRowsWithNoCells, $readFilter !== null);\n        }\n\n        // set columns/rows attributes\n        $columnsAttributesAreSet = [];\n        foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) {\n            if (\n                $readFilter === null\n                || !$this->isFilteredColumn($readFilter, $columnCoordinate, $rowsAttributes)\n            ) {\n                if (!isset($columnsAttributesAreSet[$columnCoordinate])) {\n                    /** @var array{xfIndex?: int, visible?: bool, collapsed?: bool, collapsed?: bool, outlineLevel?: int, rowHeight?: float, width?: int} $columnAttributes */\n                    $this->setColumnAttributes($columnCoordinate, $columnAttributes);\n                    $columnsAttributesAreSet[$columnCoordinate] = true;\n                }\n            }\n        }\n\n        $rowsAttributesAreSet = [];\n        foreach ($rowsAttributes as $rowCoordinate => $rowAttributes) {\n            if (\n                $readFilter === null\n                || !$this->isFilteredRow($readFilter, $rowCoordinate, $columnsAttributes)\n            ) {\n                if (!isset($rowsAttributesAreSet[$rowCoordinate])) {\n                    /** @var array{xfIndex?: int, visible?: bool, collapsed?: bool, collapsed?: bool, outlineLevel?: int, rowHeight?: float} $rowAttributes */\n                    $this->setRowAttributes($rowCoordinate, $rowAttributes);\n                    $rowsAttributesAreSet[$rowCoordinate] = true;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    /** @param mixed[] $rowsAttributes */\n    private function isFilteredColumn(IReadFilter $readFilter, string $columnCoordinate, array $rowsAttributes): bool\n    {\n        foreach ($rowsAttributes as $rowCoordinate => $rowAttributes) {\n            if ($readFilter->readCell($columnCoordinate, $rowCoordinate, $this->worksheet->getTitle())) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    /** @return mixed[] */\n    private function readColumnAttributes(SimpleXMLElement $worksheetCols, bool $readDataOnly): array\n    {\n        $columnAttributes = [];\n\n        foreach ($worksheetCols->col as $columnx) {\n            $column = $columnx->attributes();\n            if ($column !== null) {\n                $startColumn = Coordinate::stringFromColumnIndex((int) $column['min']);\n                $endColumn = Coordinate::stringFromColumnIndex((int) $column['max']);\n                StringHelper::stringIncrement($endColumn);\n                for ($columnAddress = $startColumn; $columnAddress !== $endColumn; StringHelper::stringIncrement($columnAddress)) {\n                    $columnAttributes[$columnAddress] = $this->readColumnRangeAttributes($column, $readDataOnly);\n\n                    if ((int) ($column['max']) === AddressRange::MAX_COLUMN_INT) {\n                        break;\n                    }\n                }\n            }\n        }\n\n        return $columnAttributes;\n    }\n\n    /** @return mixed[] */\n    private function readColumnRangeAttributes(?SimpleXMLElement $column, bool $readDataOnly): array\n    {\n        $columnAttributes = [];\n        if ($column !== null) {\n            if (isset($column['style']) && !$readDataOnly) {\n                $columnAttributes['xfIndex'] = (int) $column['style'];\n            }\n            if (isset($column['hidden']) && self::boolean($column['hidden'])) {\n                $columnAttributes['visible'] = false;\n            }\n            if (isset($column['collapsed']) && self::boolean($column['collapsed'])) {\n                $columnAttributes['collapsed'] = true;\n            }\n            if (isset($column['outlineLevel']) && ((int) $column['outlineLevel']) > 0) {\n                $columnAttributes['outlineLevel'] = (int) $column['outlineLevel'];\n            }\n            if (isset($column['width'])) {\n                $columnAttributes['width'] = (float) $column['width'];\n            }\n        }\n\n        return $columnAttributes;\n    }\n\n    /** @param mixed[] $columnsAttributes */\n    private function isFilteredRow(IReadFilter $readFilter, int $rowCoordinate, array $columnsAttributes): bool\n    {\n        foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) {\n            if (!$readFilter->readCell($columnCoordinate, $rowCoordinate, $this->worksheet->getTitle())) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /** @return mixed[] */\n    private function readRowAttributes(SimpleXMLElement $worksheetRow, bool $readDataOnly, bool $ignoreRowsWithNoCells, bool $readFilterIsNotNull): array\n    {\n        $rowAttributes = [];\n\n        foreach ($worksheetRow as $rowx) {\n            $row = $rowx->attributes();\n            if ($row !== null && (!$ignoreRowsWithNoCells || isset($rowx->c))) {\n                $rowIndex = (int) $row['r'];\n                if (!$readDataOnly) {\n                    if (isset($row['ht'])) {\n                        $rowAttributes[$rowIndex]['rowHeight'] = (float) $row['ht'];\n                    }\n                    if (isset($row['customFormat']) && self::boolean($row['customFormat'])) {\n                        $rowAttributes[$rowIndex]['customFormat'] = true;\n                    }\n                    if (isset($row['hidden']) && self::boolean($row['hidden'])) {\n                        $rowAttributes[$rowIndex]['visible'] = false;\n                    }\n                    if (isset($row['collapsed']) && self::boolean($row['collapsed'])) {\n                        $rowAttributes[$rowIndex]['collapsed'] = true;\n                    }\n                    if (isset($row['outlineLevel']) && (int) $row['outlineLevel'] > 0) {\n                        $rowAttributes[$rowIndex]['outlineLevel'] = (int) $row['outlineLevel'];\n                    }\n                    if (isset($row['s'])) {\n                        $rowAttributes[$rowIndex]['xfIndex'] = (int) $row['s'];\n                    }\n                }\n                if ($readFilterIsNotNull && empty($rowAttributes[$rowIndex])) {\n                    $rowAttributes[$rowIndex]['exists'] = true;\n                }\n            }\n        }\n\n        return $rowAttributes;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Styles as StyleReader;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalColorScale;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalDataBar;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalFormattingRuleExtension;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalFormatValueObject;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalIconSet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\IconSetValues;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style as Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\nuse stdClass;\n\nclass ConditionalStyles\n{\n    private Worksheet $worksheet;\n\n    private SimpleXMLElement $worksheetXml;\n\n    /** @var string[] */\n    private array $ns;\n\n    /** @var Style[] */\n    private array $dxfs;\n\n    private StyleReader $styleReader;\n\n    /** @param Style[] $dxfs */\n    public function __construct(Worksheet $workSheet, SimpleXMLElement $worksheetXml, array $dxfs, StyleReader $styleReader)\n    {\n        $this->worksheet = $workSheet;\n        $this->worksheetXml = $worksheetXml;\n        $this->dxfs = $dxfs;\n        $this->styleReader = $styleReader;\n    }\n\n    public function load(): void\n    {\n        $selectedCells = $this->worksheet->getSelectedCells();\n\n        $this->setConditionalStyles(\n            $this->worksheet,\n            $this->readConditionalStyles($this->worksheetXml),\n            $this->worksheetXml->extLst\n        );\n\n        $this->worksheet->setSelectedCells($selectedCells);\n    }\n\n    public function loadFromExt(): void\n    {\n        $selectedCells = $this->worksheet->getSelectedCells();\n\n        $this->ns = $this->worksheetXml->getNamespaces(true);\n        $this->setConditionalsFromExt(\n            $this->readConditionalsFromExt($this->worksheetXml->extLst)\n        );\n\n        $this->worksheet->setSelectedCells($selectedCells);\n    }\n\n    /** @param Conditional[][] $conditionals */\n    private function setConditionalsFromExt(array $conditionals): void\n    {\n        foreach ($conditionals as $conditionalRange => $cfRules) {\n            ksort($cfRules);\n            // Priority is used as the key for sorting; but may not start at 0,\n            // so we use array_values to reset the index after sorting.\n            $existing = $this->worksheet->getConditionalStylesCollection();\n            if (array_key_exists($conditionalRange, $existing)) {\n                $conditionalStyle = $existing[$conditionalRange];\n                $cfRules = array_merge($conditionalStyle, $cfRules);\n            }\n            $this->worksheet->getStyle($conditionalRange)\n                ->setConditionalStyles(array_values($cfRules));\n        }\n    }\n\n    /** @return array<string, array<int, Conditional>> */\n    private function readConditionalsFromExt(SimpleXMLElement $extLst): array\n    {\n        $conditionals = [];\n        if (!isset($extLst->ext)) {\n            return $conditionals;\n        }\n\n        foreach ($extLst->ext as $extlstcond) {\n            $extAttrs = $extlstcond->attributes() ?? [];\n            $extUri = (string) ($extAttrs['uri'] ?? '');\n            if ($extUri !== '{78C0D931-6437-407d-A8EE-F0AAD7539E65}') {\n                continue;\n            }\n            $conditionalFormattingRuleXml = $extlstcond->children($this->ns['x14']);\n            if (!$conditionalFormattingRuleXml->conditionalFormattings) {\n                return [];\n            }\n\n            foreach ($conditionalFormattingRuleXml->children($this->ns['x14']) as $extFormattingXml) {\n                $extFormattingRangeXml = $extFormattingXml->children($this->ns['xm']);\n                if (!$extFormattingRangeXml->sqref) {\n                    continue;\n                }\n\n                $sqref = (string) $extFormattingRangeXml->sqref;\n                $extCfRuleXml = $extFormattingXml->cfRule;\n\n                $attributes = $extCfRuleXml->attributes();\n                if (!$attributes) {\n                    continue;\n                }\n                $conditionType = (string) $attributes->type;\n                if (\n                    !Conditional::isValidConditionType($conditionType)\n                    || $conditionType === Conditional::CONDITION_DATABAR\n                ) {\n                    continue;\n                }\n\n                $priority = (int) $attributes->priority;\n\n                $conditional = $this->readConditionalRuleFromExt($extCfRuleXml, $attributes);\n                $cfStyle = $this->readStyleFromExt($extCfRuleXml);\n                $conditional->setStyle($cfStyle);\n                $conditionals[$sqref][$priority] = $conditional;\n            }\n        }\n\n        return $conditionals;\n    }\n\n    private function readConditionalRuleFromExt(SimpleXMLElement $cfRuleXml, SimpleXMLElement $attributes): Conditional\n    {\n        $conditionType = (string) $attributes->type;\n        $operatorType = (string) $attributes->operator;\n        $priority = (int) (string) $attributes->priority;\n        $stopIfTrue = (int) (string) $attributes->stopIfTrue;\n\n        $operands = [];\n        foreach ($cfRuleXml->children($this->ns['xm']) as $cfRuleOperandsXml) {\n            $operands[] = (string) $cfRuleOperandsXml;\n        }\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($conditionType);\n        $conditional->setOperatorType($operatorType);\n        $conditional->setPriority($priority);\n        $conditional->setStopIfTrue($stopIfTrue === 1);\n        if (\n            $conditionType === Conditional::CONDITION_CONTAINSTEXT\n            || $conditionType === Conditional::CONDITION_NOTCONTAINSTEXT\n            || $conditionType === Conditional::CONDITION_BEGINSWITH\n            || $conditionType === Conditional::CONDITION_ENDSWITH\n            || $conditionType === Conditional::CONDITION_TIMEPERIOD\n        ) {\n            $conditional->setText(array_pop($operands) ?? '');\n        }\n        $conditional->setConditions($operands);\n\n        return $conditional;\n    }\n\n    private function readStyleFromExt(SimpleXMLElement $extCfRuleXml): Style\n    {\n        $cfStyle = new Style(false, true);\n        if ($extCfRuleXml->dxf) {\n            $styleXML = $extCfRuleXml->dxf->children();\n\n            if ($styleXML->borders) {\n                $this->styleReader->readBorderStyle($cfStyle->getBorders(), $styleXML->borders);\n            }\n            if ($styleXML->fill) {\n                $this->styleReader->readFillStyle($cfStyle->getFill(), $styleXML->fill);\n            }\n            if ($styleXML->font) {\n                $this->styleReader->readFontStyle($cfStyle->getFont(), $styleXML->font);\n            }\n        }\n\n        return $cfStyle;\n    }\n\n    /** @return mixed[] */\n    private function readConditionalStyles(SimpleXMLElement $xmlSheet): array\n    {\n        $conditionals = [];\n        foreach ($xmlSheet->conditionalFormatting as $conditional) {\n            foreach ($conditional->cfRule as $cfRule) {\n                if (Conditional::isValidConditionType((string) $cfRule['type']) && (!isset($cfRule['dxfId']) || isset($this->dxfs[(int) ($cfRule['dxfId'])]))) {\n                    $conditionals[(string) $conditional['sqref']][(int) ($cfRule['priority'])] = $cfRule;\n                } elseif ((string) $cfRule['type'] == Conditional::CONDITION_DATABAR) {\n                    $conditionals[(string) $conditional['sqref']][(int) ($cfRule['priority'])] = $cfRule;\n                }\n            }\n        }\n\n        return $conditionals;\n    }\n\n    /** @param mixed[] $conditionals */\n    private function setConditionalStyles(Worksheet $worksheet, array $conditionals, SimpleXMLElement $xmlExtLst): void\n    {\n        foreach ($conditionals as $cellRangeReference => $cfRules) {\n            /** @var mixed[] $cfRules */\n            ksort($cfRules); // no longer needed for Xlsx, but helps Xls\n            $conditionalStyles = $this->readStyleRules($cfRules, $xmlExtLst);\n\n            // Extract all cell references in $cellRangeReference\n            // N.B. In Excel UI, intersection is space and union is comma.\n            // But in Xml, intersection is comma and union is space.\n            $cellRangeReference = str_replace(['$', ' ', ',', '^'], ['', '^', ' ', ','], strtoupper($cellRangeReference));\n\n            foreach ($conditionalStyles as $cs) {\n                $scale = $cs->getColorScale();\n                if ($scale !== null) {\n                    $scale->setSqRef($cellRangeReference, $worksheet);\n                }\n            }\n            $worksheet->getStyle($cellRangeReference)->setConditionalStyles($conditionalStyles);\n        }\n    }\n\n    /**\n     * @param mixed[] $cfRules\n     *\n     * @return Conditional[]\n     */\n    private function readStyleRules(array $cfRules, SimpleXMLElement $extLst): array\n    {\n        /** @var ConditionalFormattingRuleExtension[] */\n        $conditionalFormattingRuleExtensions = ConditionalFormattingRuleExtension::parseExtLstXml($extLst);\n        $conditionalStyles = [];\n\n        /** @var SimpleXMLElement $cfRule */\n        foreach ($cfRules as $cfRule) {\n            $objConditional = new Conditional();\n            $objConditional->setConditionType((string) $cfRule['type']);\n            $objConditional->setOperatorType((string) $cfRule['operator']);\n            $objConditional->setPriority((int) (string) $cfRule['priority']);\n            $objConditional->setNoFormatSet(!isset($cfRule['dxfId']));\n\n            if ((string) $cfRule['text'] != '') {\n                $objConditional->setText((string) $cfRule['text']);\n            } elseif ((string) $cfRule['timePeriod'] != '') {\n                $objConditional->setText((string) $cfRule['timePeriod']);\n            }\n\n            if (isset($cfRule['stopIfTrue']) && (int) $cfRule['stopIfTrue'] === 1) {\n                $objConditional->setStopIfTrue(true);\n            }\n\n            if (count($cfRule->formula) >= 1) {\n                foreach ($cfRule->formula as $formulax) {\n                    $formula = (string) $formulax;\n                    $formula = str_replace(['_xlfn.', '_xlws.'], '', $formula);\n                    if ($formula === 'TRUE') {\n                        $objConditional->addCondition(true);\n                    } elseif ($formula === 'FALSE') {\n                        $objConditional->addCondition(false);\n                    } else {\n                        $objConditional->addCondition($formula);\n                    }\n                }\n            } else {\n                $objConditional->addCondition('');\n            }\n\n            if (isset($cfRule->dataBar)) {\n                $objConditional->setDataBar(\n                    $this->readDataBarOfConditionalRule($cfRule, $conditionalFormattingRuleExtensions)\n                );\n            } elseif (isset($cfRule->colorScale)) {\n                $objConditional->setColorScale(\n                    $this->readColorScale($cfRule)\n                );\n            } elseif (isset($cfRule->iconSet)) {\n                $objConditional->setIconSet($this->readIconSet($cfRule));\n            } elseif (isset($cfRule['dxfId'])) {\n                $objConditional->setStyle(clone $this->dxfs[(int) ($cfRule['dxfId'])]);\n            }\n\n            $conditionalStyles[] = $objConditional;\n        }\n\n        return $conditionalStyles;\n    }\n\n    /** @param ConditionalFormattingRuleExtension[] $conditionalFormattingRuleExtensions */\n    private function readDataBarOfConditionalRule(SimpleXMLElement $cfRule, array $conditionalFormattingRuleExtensions): ConditionalDataBar\n    {\n        $dataBar = new ConditionalDataBar();\n        //dataBar attribute\n        if (isset($cfRule->dataBar['showValue'])) {\n            $dataBar->setShowValue((bool) $cfRule->dataBar['showValue']);\n        }\n\n        //dataBar children\n        //conditionalFormatValueObjects\n        $cfvoXml = $cfRule->dataBar->cfvo;\n        $cfvoIndex = 0;\n        foreach ((count($cfvoXml) > 1 ? $cfvoXml : [$cfvoXml]) as $cfvo) { //* @phpstan-ignore-line\n            /** @var SimpleXMLElement $cfvo */\n            if ($cfvoIndex === 0) {\n                $dataBar->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject((string) $cfvo['type'], (string) $cfvo['val']));\n            }\n            if ($cfvoIndex === 1) {\n                $dataBar->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject((string) $cfvo['type'], (string) $cfvo['val']));\n            }\n            ++$cfvoIndex;\n        }\n\n        //color\n        if (isset($cfRule->dataBar->color)) {\n            $dataBar->setColor($this->styleReader->readColor($cfRule->dataBar->color));\n        }\n        //extLst\n        $this->readDataBarExtLstOfConditionalRule($dataBar, $cfRule, $conditionalFormattingRuleExtensions);\n\n        return $dataBar;\n    }\n\n    private function readColorScale(SimpleXMLElement|stdClass $cfRule): ConditionalColorScale\n    {\n        $colorScale = new ConditionalColorScale();\n        /** @var SimpleXMLElement $cfRule */\n        $count = count($cfRule->colorScale->cfvo);\n        $idx = 0;\n        foreach ($cfRule->colorScale->cfvo as $cfvoXml) {\n            $attr = $cfvoXml->attributes() ?? [];\n            $type = (string) ($attr['type'] ?? '');\n            $val = $attr['val'] ?? null;\n            if ($idx === 0) {\n                $method = 'setMinimumConditionalFormatValueObject';\n            } elseif ($idx === 1 && $count === 3) {\n                $method = 'setMidpointConditionalFormatValueObject';\n            } else {\n                $method = 'setMaximumConditionalFormatValueObject';\n            }\n            if ($type !== 'formula') {\n                $colorScale->$method(new ConditionalFormatValueObject($type, $val));\n            } else {\n                $colorScale->$method(new ConditionalFormatValueObject($type, null, $val));\n            }\n            ++$idx;\n        }\n        $idx = 0;\n        foreach ($cfRule->colorScale->color as $color) {\n            $rgb = $this->styleReader->readColor($color);\n            if ($idx === 0) {\n                $colorScale->setMinimumColor(new Color($rgb));\n            } elseif ($idx === 1 && $count === 3) {\n                $colorScale->setMidpointColor(new Color($rgb));\n            } else {\n                $colorScale->setMaximumColor(new Color($rgb));\n            }\n            ++$idx;\n        }\n\n        return $colorScale;\n    }\n\n    private function readIconSet(SimpleXMLElement $cfRule): ConditionalIconSet\n    {\n        $iconSet = new ConditionalIconSet();\n\n        if (isset($cfRule->iconSet['iconSet'])) {\n            $iconSet->setIconSetType(IconSetValues::from($cfRule->iconSet['iconSet']));\n        }\n        if (isset($cfRule->iconSet['reverse'])) {\n            $iconSet->setReverse('1' === (string) $cfRule->iconSet['reverse']);\n        }\n        if (isset($cfRule->iconSet['showValue'])) {\n            $iconSet->setShowValue('1' === (string) $cfRule->iconSet['showValue']);\n        }\n        if (isset($cfRule->iconSet['custom'])) {\n            $iconSet->setCustom('1' === (string) $cfRule->iconSet['custom']);\n        }\n\n        $cfvos = [];\n        foreach ($cfRule->iconSet->cfvo as $cfvoXml) {\n            $type = (string) $cfvoXml['type'];\n            $value = (string) ($cfvoXml['val'] ?? '');\n            $cfvo = new ConditionalFormatValueObject($type, $value);\n            if (isset($cfvoXml['gte'])) {\n                $cfvo->setGreaterThanOrEqual('1' === (string) $cfvoXml['gte']);\n            }\n            $cfvos[] = $cfvo;\n        }\n        $iconSet->setCfvos($cfvos);\n\n        // TODO: The cfIcon element is not implemented yet.\n\n        return $iconSet;\n    }\n\n    /** @param ConditionalFormattingRuleExtension[] $conditionalFormattingRuleExtensions */\n    private function readDataBarExtLstOfConditionalRule(ConditionalDataBar $dataBar, SimpleXMLElement $cfRule, array $conditionalFormattingRuleExtensions): void\n    {\n        if (isset($cfRule->extLst)) {\n            $ns = $cfRule->extLst->getNamespaces(true);\n            foreach ((count($cfRule->extLst) > 0 ? $cfRule->extLst->ext : [$cfRule->extLst->ext]) as $ext) { //* @phpstan-ignore-line\n                /** @var SimpleXMLElement $ext */\n                $extId = (string) $ext->children($ns['x14'])->id;\n                if (isset($conditionalFormattingRuleExtensions[$extId]) && (string) $ext['uri'] === '{B025F937-C7B1-47D3-B67F-A62EFF666E3E}') {\n                    $dataBar->setConditionalFormattingRuleExt($conditionalFormattingRuleExtensions[$extId]);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\n\nclass DataValidations\n{\n    private Worksheet $worksheet;\n\n    private SimpleXMLElement $worksheetXml;\n\n    public function __construct(Worksheet $workSheet, SimpleXMLElement $worksheetXml)\n    {\n        $this->worksheet = $workSheet;\n        $this->worksheetXml = $worksheetXml;\n    }\n\n    public function load(): void\n    {\n        foreach ($this->worksheetXml->dataValidations->dataValidation as $dataValidation) {\n            // Uppercase coordinate\n            $range = strtoupper((string) $dataValidation['sqref']);\n            $rangeSet = explode(' ', $range);\n            foreach ($rangeSet as $range) {\n                if (preg_match('/^[A-Z]{1,3}\\d{1,7}/', $range, $matches) === 1) {\n                    // Ensure left/top row of range exists, thereby\n                    // adjusting high row/column.\n                    $this->worksheet->getCell($matches[0]);\n                }\n            }\n        }\n        foreach ($this->worksheetXml->dataValidations->dataValidation as $dataValidation) {\n            // Uppercase coordinate\n            $range = strtoupper((string) $dataValidation['sqref']);\n            $docValidation = new DataValidation();\n            $docValidation->setType((string) $dataValidation['type']);\n            $docValidation->setErrorStyle((string) $dataValidation['errorStyle']);\n            $docValidation->setOperator((string) $dataValidation['operator']);\n            $docValidation->setAllowBlank(filter_var($dataValidation['allowBlank'], FILTER_VALIDATE_BOOLEAN));\n            // showDropDown is inverted (works as hideDropDown if true)\n            $docValidation->setShowDropDown(!filter_var($dataValidation['showDropDown'], FILTER_VALIDATE_BOOLEAN));\n            $docValidation->setShowInputMessage(filter_var($dataValidation['showInputMessage'], FILTER_VALIDATE_BOOLEAN));\n            $docValidation->setShowErrorMessage(filter_var($dataValidation['showErrorMessage'], FILTER_VALIDATE_BOOLEAN));\n            $docValidation->setErrorTitle((string) $dataValidation['errorTitle']);\n            $docValidation->setError((string) $dataValidation['error']);\n            $docValidation->setPromptTitle((string) $dataValidation['promptTitle']);\n            $docValidation->setPrompt((string) $dataValidation['prompt']);\n            $docValidation->setFormula1(Xlsx::replacePrefixes((string) $dataValidation->formula1));\n            $docValidation->setFormula2(Xlsx::replacePrefixes((string) $dataValidation->formula2));\n            $this->worksheet->setDataValidation($range, $docValidation);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\n\nclass Hyperlinks\n{\n    private Worksheet $worksheet;\n\n    /** @var string[] */\n    private array $hyperlinks = [];\n\n    public function __construct(Worksheet $workSheet)\n    {\n        $this->worksheet = $workSheet;\n    }\n\n    public function readHyperlinks(SimpleXMLElement $relsWorksheet): void\n    {\n        foreach ($relsWorksheet->children(Namespaces::RELATIONSHIPS)->Relationship as $elementx) {\n            $element = Xlsx::getAttributes($elementx);\n            if ($element->Type == Namespaces::HYPERLINK) {\n                $this->hyperlinks[(string) $element->Id] = (string) $element->Target;\n            }\n        }\n    }\n\n    public function setHyperlinks(SimpleXMLElement $worksheetXml): void\n    {\n        foreach ($worksheetXml->children(Namespaces::MAIN)->hyperlink as $hyperlink) {\n            $this->setHyperlink($hyperlink, $this->worksheet);\n        }\n    }\n\n    private function setHyperlink(SimpleXMLElement $hyperlink, Worksheet $worksheet): void\n    {\n        // Link url\n        $linkRel = Xlsx::getAttributes($hyperlink, Namespaces::SCHEMA_OFFICE_DOCUMENT);\n\n        $attributes = Xlsx::getAttributes($hyperlink);\n        foreach (Coordinate::extractAllCellReferencesInRange($attributes->ref) as $cellReference) {\n            $cell = $worksheet->getCell($cellReference);\n            if (isset($attributes['location'])) {\n                $cell->getHyperlink()->setUrl('sheet://' . (string) $attributes['location']);\n            } elseif (isset($linkRel['id'])) {\n                $hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']] ?? '';\n                $cell->getHyperlink()->setUrl($hyperlinkUrl);\n            }\n\n            // Tooltip\n            if (isset($attributes['tooltip'])) {\n                $cell->getHyperlink()->setTooltip((string) $attributes['tooltip']);\n            }\n\n            if (isset($attributes['display'])) {\n                $cell->getHyperlink()->setDisplay((string) $attributes['display']);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/Namespaces.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Namespaces\n{\n    const SCHEMAS = 'http://schemas.openxmlformats.org';\n\n    const RELATIONSHIPS = 'http://schemas.openxmlformats.org/package/2006/relationships';\n\n    // This one used in Reader\\Xlsx\n    const CORE_PROPERTIES = 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties';\n\n    // This one used in Reader\\Xlsx\\Properties\n    const CORE_PROPERTIES2 = 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties';\n\n    const THUMBNAIL = 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail';\n\n    const THEME = 'http://schemas.openxmlformats.org/package/2006/relationships/theme';\n\n    const THEME2 = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme';\n\n    const COMPATIBILITY = 'http://schemas.openxmlformats.org/markup-compatibility/2006';\n\n    const MAIN = 'http://schemas.openxmlformats.org/spreadsheetml/2006/main';\n\n    const RELATIONSHIPS_DRAWING = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing';\n\n    const DRAWINGML = 'http://schemas.openxmlformats.org/drawingml/2006/main';\n\n    const CHART = 'http://schemas.openxmlformats.org/drawingml/2006/chart';\n\n    const CHART_ALTERNATE = 'http://schemas.microsoft.com/office/drawing/2007/8/2/chart';\n\n    const RELATIONSHIPS_CHART = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart';\n\n    const SPREADSHEET_DRAWING = 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing';\n\n    const SCHEMA_OFFICE_DOCUMENT = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships';\n\n    const COMMENTS = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments';\n\n    const RELATIONSHIPS_CUSTOM_PROPERTIES = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties';\n\n    const RELATIONSHIPS_EXTENDED_PROPERTIES = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties';\n\n    const RELATIONSHIPS_CTRLPROP = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp';\n\n    const CUSTOM_PROPERTIES = 'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties';\n\n    const EXTENDED_PROPERTIES = 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties';\n\n    const PROPERTIES_VTYPES = 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes';\n\n    const HYPERLINK = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink';\n\n    const OFFICE_DOCUMENT = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument';\n\n    const SHARED_STRINGS = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings';\n\n    const STYLES = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles';\n\n    const IMAGE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image';\n\n    const VML = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing';\n\n    const WORKSHEET = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet';\n\n    const CHARTSHEET = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet';\n\n    const SCHEMA_MICROSOFT = 'http://schemas.microsoft.com/office/2006/relationships';\n\n    const EXTENSIBILITY = 'http://schemas.microsoft.com/office/2006/relationships/ui/extensibility';\n\n    const VBA = 'http://schemas.microsoft.com/office/2006/relationships/vbaProject';\n\n    const VBA_SIGNATURE = 'http://schemas.microsoft.com/office/2006/relationships/vbaProject';\n\n    const DATA_VALIDATIONS1 = 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/main';\n\n    const DATA_VALIDATIONS2 = 'http://schemas.microsoft.com/office/excel/2006/main';\n\n    const CONTENT_TYPES = 'http://schemas.openxmlformats.org/package/2006/content-types';\n\n    const RELATIONSHIPS_METADATA = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata';\n\n    const RELATIONSHIPS_PRINTER_SETTINGS = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings';\n\n    const RELATIONSHIPS_TABLE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/table';\n\n    const SPREADSHEETML_AC = 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac';\n\n    const DC_ELEMENTS = 'http://purl.org/dc/elements/1.1/';\n\n    const DC_TERMS = 'http://purl.org/dc/terms/';\n\n    const DC_DCMITYPE = 'http://purl.org/dc/dcmitype/';\n\n    const SCHEMA_INSTANCE = 'http://www.w3.org/2001/XMLSchema-instance';\n\n    const URN_EXCEL = 'urn:schemas-microsoft-com:office:excel';\n\n    const URN_MSOFFICE = 'urn:schemas-microsoft-com:office:office';\n\n    const URN_VML = 'urn:schemas-microsoft-com:vml';\n\n    const SCHEMA_PURL = 'http://purl.oclc.org/ooxml';\n\n    const PURL_OFFICE_DOCUMENT = 'http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument';\n\n    const PURL_RELATIONSHIPS = 'http://purl.oclc.org/ooxml/officeDocument/relationships';\n\n    const PURL_MAIN = 'http://purl.oclc.org/ooxml/spreadsheetml/main';\n\n    const PURL_DRAWING = 'http://purl.oclc.org/ooxml/drawingml/main';\n\n    const PURL_CHART = 'http://purl.oclc.org/ooxml/drawingml/chart';\n\n    const PURL_WORKSHEET = 'http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet';\n\n    const DYNAMIC_ARRAY = 'http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray';\n\n    const DYNAMIC_ARRAY_RICHDATA = 'http://schemas.microsoft.com/office/spreadsheetml/2017/richdata';\n\n    const RELATIONSHIPS_RICH_VALUE_TYPES = 'http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueTypes';\n\n    const RELATIONSHIPS_RICH_VALUE_STRUCTURE = 'http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueStructure';\n\n    const RELATIONSHIPS_RICH_VALUE = 'http://schemas.microsoft.com/office/2017/06/relationships/rdRichValue';\n\n    const RELATIONSHIPS_RICH_VALUE_REL = 'http://schemas.microsoft.com/office/2022/10/relationships/richValueRel';\n\n    const FEATURE_PROPERTY_BAG = 'http://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybag';\n    const RELATIONSHIPS_FEATURE_PROPERTY_BAG = 'http://schemas.microsoft.com/office/2022/11/relationships/FeaturePropertyBag';\n    const STYLE_CHECKBOX_URI = '{C7286773-470A-42A8-94C5-96B5CB345126}';\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\n\nclass PageSetup extends BaseParserClass\n{\n    private Worksheet $worksheet;\n\n    private ?SimpleXMLElement $worksheetXml;\n\n    public function __construct(Worksheet $workSheet, ?SimpleXMLElement $worksheetXml = null)\n    {\n        $this->worksheet = $workSheet;\n        $this->worksheetXml = $worksheetXml;\n    }\n\n    /**\n     * @param mixed[] $unparsedLoadedData\n     *\n     * @return mixed[]\n     */\n    public function load(array $unparsedLoadedData): array\n    {\n        $worksheetXml = $this->worksheetXml;\n        if ($worksheetXml === null) {\n            return $unparsedLoadedData;\n        }\n\n        $this->margins($worksheetXml, $this->worksheet);\n        $unparsedLoadedData = $this->pageSetup($worksheetXml, $this->worksheet, $unparsedLoadedData);\n        $this->headerFooter($worksheetXml, $this->worksheet);\n        $this->pageBreaks($worksheetXml, $this->worksheet);\n\n        return $unparsedLoadedData;\n    }\n\n    private function margins(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void\n    {\n        if ($xmlSheet->pageMargins) {\n            $docPageMargins = $worksheet->getPageMargins();\n            $docPageMargins->setLeft((float) ($xmlSheet->pageMargins['left']));\n            $docPageMargins->setRight((float) ($xmlSheet->pageMargins['right']));\n            $docPageMargins->setTop((float) ($xmlSheet->pageMargins['top']));\n            $docPageMargins->setBottom((float) ($xmlSheet->pageMargins['bottom']));\n            $docPageMargins->setHeader((float) ($xmlSheet->pageMargins['header']));\n            $docPageMargins->setFooter((float) ($xmlSheet->pageMargins['footer']));\n        }\n    }\n\n    /**\n     * @param mixed[] $unparsedLoadedData\n     *\n     * @return mixed[]\n     */\n    private function pageSetup(SimpleXMLElement $xmlSheet, Worksheet $worksheet, array $unparsedLoadedData): array\n    {\n        if ($xmlSheet->pageSetup) {\n            $docPageSetup = $worksheet->getPageSetup();\n\n            if (isset($xmlSheet->pageSetup['orientation'])) {\n                $docPageSetup->setOrientation((string) $xmlSheet->pageSetup['orientation']);\n            }\n            if (isset($xmlSheet->pageSetup['paperSize'])) {\n                $docPageSetup->setPaperSize((int) ($xmlSheet->pageSetup['paperSize']));\n            }\n            if (isset($xmlSheet->pageSetup['scale'])) {\n                $docPageSetup->setScale((int) ($xmlSheet->pageSetup['scale']), false);\n            }\n            if (isset($xmlSheet->pageSetup['fitToHeight']) && (int) ($xmlSheet->pageSetup['fitToHeight']) >= 0) {\n                $docPageSetup->setFitToHeight((int) ($xmlSheet->pageSetup['fitToHeight']), false);\n            }\n            if (isset($xmlSheet->pageSetup['fitToWidth']) && (int) ($xmlSheet->pageSetup['fitToWidth']) >= 0) {\n                $docPageSetup->setFitToWidth((int) ($xmlSheet->pageSetup['fitToWidth']), false);\n            }\n            if (\n                isset($xmlSheet->pageSetup['firstPageNumber'], $xmlSheet->pageSetup['useFirstPageNumber'])\n                && self::boolean((string) $xmlSheet->pageSetup['useFirstPageNumber'])\n            ) {\n                $docPageSetup->setFirstPageNumber((int) ($xmlSheet->pageSetup['firstPageNumber']));\n            }\n            if (isset($xmlSheet->pageSetup['pageOrder'])) {\n                $docPageSetup->setPageOrder((string) $xmlSheet->pageSetup['pageOrder']);\n            }\n\n            $relAttributes = $xmlSheet->pageSetup->attributes(Namespaces::SCHEMA_OFFICE_DOCUMENT);\n            if (isset($relAttributes['id'])) {\n                $relid = (string) $relAttributes['id'];\n                if (!str_ends_with($relid, 'ps')) {\n                    $relid .= 'ps';\n                }\n                /** @var mixed[][][] $unparsedLoadedData */\n                $unparsedLoadedData['sheets'][$worksheet->getCodeName()]['pageSetupRelId'] = $relid;\n            }\n        }\n\n        return $unparsedLoadedData;\n    }\n\n    private function headerFooter(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void\n    {\n        if ($xmlSheet->headerFooter) {\n            $docHeaderFooter = $worksheet->getHeaderFooter();\n\n            if (\n                isset($xmlSheet->headerFooter['differentOddEven'])\n                && self::boolean((string) $xmlSheet->headerFooter['differentOddEven'])\n            ) {\n                $docHeaderFooter->setDifferentOddEven(true);\n            } else {\n                $docHeaderFooter->setDifferentOddEven(false);\n            }\n            if (\n                isset($xmlSheet->headerFooter['differentFirst'])\n                && self::boolean((string) $xmlSheet->headerFooter['differentFirst'])\n            ) {\n                $docHeaderFooter->setDifferentFirst(true);\n            } else {\n                $docHeaderFooter->setDifferentFirst(false);\n            }\n            if (\n                isset($xmlSheet->headerFooter['scaleWithDoc'])\n                && !self::boolean((string) $xmlSheet->headerFooter['scaleWithDoc'])\n            ) {\n                $docHeaderFooter->setScaleWithDocument(false);\n            } else {\n                $docHeaderFooter->setScaleWithDocument(true);\n            }\n            if (\n                isset($xmlSheet->headerFooter['alignWithMargins'])\n                && !self::boolean((string) $xmlSheet->headerFooter['alignWithMargins'])\n            ) {\n                $docHeaderFooter->setAlignWithMargins(false);\n            } else {\n                $docHeaderFooter->setAlignWithMargins(true);\n            }\n\n            $docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader);\n            $docHeaderFooter->setOddFooter((string) $xmlSheet->headerFooter->oddFooter);\n            $docHeaderFooter->setEvenHeader((string) $xmlSheet->headerFooter->evenHeader);\n            $docHeaderFooter->setEvenFooter((string) $xmlSheet->headerFooter->evenFooter);\n            $docHeaderFooter->setFirstHeader((string) $xmlSheet->headerFooter->firstHeader);\n            $docHeaderFooter->setFirstFooter((string) $xmlSheet->headerFooter->firstFooter);\n        }\n    }\n\n    private function pageBreaks(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void\n    {\n        if ($xmlSheet->rowBreaks && $xmlSheet->rowBreaks->brk) {\n            $this->rowBreaks($xmlSheet, $worksheet);\n        }\n        if ($xmlSheet->colBreaks && $xmlSheet->colBreaks->brk) {\n            $this->columnBreaks($xmlSheet, $worksheet);\n        }\n    }\n\n    private function rowBreaks(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void\n    {\n        foreach ($xmlSheet->rowBreaks->brk as $brk) {\n            $rowBreakMax = /*isset($brk['max']) ? ((int) $brk['max']) :*/ -1;\n            if ($brk['man']) {\n                $worksheet->setBreak(\"A{$brk['id']}\", Worksheet::BREAK_ROW, $rowBreakMax);\n            }\n        }\n    }\n\n    private function columnBreaks(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void\n    {\n        foreach ($xmlSheet->colBreaks->brk as $brk) {\n            if ($brk['man']) {\n                $worksheet->setBreak(\n                    Coordinate::stringFromColumnIndex(((int) $brk['id']) + 1) . '1',\n                    Worksheet::BREAK_COLUMN\n                );\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/Properties.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties as DocumentProperties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Security\\XmlScanner;\nuse SimpleXMLElement;\n\nclass Properties\n{\n    private XmlScanner $securityScanner;\n\n    private DocumentProperties $docProps;\n\n    public function __construct(XmlScanner $securityScanner, DocumentProperties $docProps)\n    {\n        $this->securityScanner = $securityScanner;\n        $this->docProps = $docProps;\n    }\n\n    private function extractPropertyData(string $propertyData): ?SimpleXMLElement\n    {\n        // okay to omit namespace because everything will be processed by xpath\n        $obj = simplexml_load_string(\n            $this->securityScanner->scan($propertyData)\n        );\n\n        return $obj === false ? null : $obj;\n    }\n\n    public function readCoreProperties(string $propertyData): void\n    {\n        $xmlCore = $this->extractPropertyData($propertyData);\n\n        if (is_object($xmlCore)) {\n            $xmlCore->registerXPathNamespace('dc', Namespaces::DC_ELEMENTS);\n            $xmlCore->registerXPathNamespace('dcterms', Namespaces::DC_TERMS);\n            $xmlCore->registerXPathNamespace('cp', Namespaces::CORE_PROPERTIES2);\n\n            $this->docProps->setCreator($this->getArrayItem($xmlCore->xpath('dc:creator')));\n            $this->docProps->setLastModifiedBy($this->getArrayItem($xmlCore->xpath('cp:lastModifiedBy')));\n            $this->docProps->setCreated($this->getArrayItem($xmlCore->xpath('dcterms:created'))); //! respect xsi:type\n            $this->docProps->setModified($this->getArrayItem($xmlCore->xpath('dcterms:modified'))); //! respect xsi:type\n            $this->docProps->setTitle($this->getArrayItem($xmlCore->xpath('dc:title')));\n            $this->docProps->setDescription($this->getArrayItem($xmlCore->xpath('dc:description')));\n            $this->docProps->setSubject($this->getArrayItem($xmlCore->xpath('dc:subject')));\n            $this->docProps->setKeywords($this->getArrayItem($xmlCore->xpath('cp:keywords')));\n            $this->docProps->setCategory($this->getArrayItem($xmlCore->xpath('cp:category')));\n        }\n    }\n\n    public function readExtendedProperties(string $propertyData): void\n    {\n        $xmlCore = $this->extractPropertyData($propertyData);\n\n        if (is_object($xmlCore)) {\n            if (isset($xmlCore->Company)) {\n                $this->docProps->setCompany((string) $xmlCore->Company);\n            }\n            if (isset($xmlCore->Manager)) {\n                $this->docProps->setManager((string) $xmlCore->Manager);\n            }\n            if (isset($xmlCore->HyperlinkBase)) {\n                $this->docProps->setHyperlinkBase((string) $xmlCore->HyperlinkBase);\n            }\n        }\n    }\n\n    public function readCustomProperties(string $propertyData): void\n    {\n        $xmlCore = $this->extractPropertyData($propertyData);\n\n        if (is_object($xmlCore)) {\n            foreach ($xmlCore as $xmlProperty) {\n                /** @var SimpleXMLElement $xmlProperty */\n                $cellDataOfficeAttributes = $xmlProperty->attributes();\n                if (isset($cellDataOfficeAttributes['name'])) {\n                    $propertyName = (string) $cellDataOfficeAttributes['name'];\n                    $cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes');\n\n                    $attributeType = $cellDataOfficeChildren->getName();\n                    /** @var SimpleXMLElement */\n                    $attributeValue = $cellDataOfficeChildren->{$attributeType};\n                    $attributeValue = (string) $attributeValue;\n                    $attributeValue = DocumentProperties::convertProperty($attributeValue, $attributeType);\n                    $attributeType = DocumentProperties::convertPropertyType($attributeType);\n                    $this->docProps->setCustomProperty($propertyName, $attributeValue, $attributeType);\n                }\n            }\n        }\n    }\n\n    /** @param null|false|scalar[] $array */\n    private function getArrayItem(null|array|false $array): string\n    {\n        return is_array($array) ? (string) ($array[0] ?? '') : '';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/SharedFormula.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass SharedFormula\n{\n    private string $master;\n\n    private string $formula;\n\n    public function __construct(string $master, string $formula)\n    {\n        $this->master = $master;\n        $this->formula = $formula;\n    }\n\n    public function master(): string\n    {\n        return $this->master;\n    }\n\n    public function formula(): string\n    {\n        return $this->formula;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\n\nclass SheetViewOptions extends BaseParserClass\n{\n    private Worksheet $worksheet;\n\n    private ?SimpleXMLElement $worksheetXml;\n\n    public function __construct(Worksheet $workSheet, ?SimpleXMLElement $worksheetXml = null)\n    {\n        $this->worksheet = $workSheet;\n        $this->worksheetXml = $worksheetXml;\n    }\n\n    public function load(bool $readDataOnly, Styles $styleReader): void\n    {\n        if ($this->worksheetXml === null) {\n            return;\n        }\n\n        if (isset($this->worksheetXml->sheetPr)) {\n            $sheetPr = $this->worksheetXml->sheetPr;\n            $this->tabColor($sheetPr, $styleReader);\n            $this->codeName($sheetPr);\n            $this->outlines($sheetPr);\n            $this->pageSetup($sheetPr);\n        }\n\n        if (isset($this->worksheetXml->sheetFormatPr)) {\n            $this->sheetFormat($this->worksheetXml->sheetFormatPr);\n        }\n\n        if (!$readDataOnly && isset($this->worksheetXml->printOptions)) {\n            $this->printOptions($this->worksheetXml->printOptions);\n        }\n    }\n\n    private function tabColor(SimpleXMLElement $sheetPr, Styles $styleReader): void\n    {\n        if (isset($sheetPr->tabColor)) {\n            $this->worksheet->getTabColor()->setARGB($styleReader->readColor($sheetPr->tabColor));\n        }\n    }\n\n    private function codeName(SimpleXMLElement $sheetPrx): void\n    {\n        $sheetPr = $sheetPrx->attributes() ?? [];\n        if (isset($sheetPr['codeName'])) {\n            $this->worksheet->setCodeName((string) $sheetPr['codeName'], false);\n        }\n    }\n\n    private function outlines(SimpleXMLElement $sheetPr): void\n    {\n        if (isset($sheetPr->outlinePr)) {\n            $attr = $sheetPr->outlinePr->attributes() ?? [];\n            if (\n                isset($attr['summaryRight'])\n                && !self::boolean((string) $attr['summaryRight'])\n            ) {\n                $this->worksheet->setShowSummaryRight(false);\n            } else {\n                $this->worksheet->setShowSummaryRight(true);\n            }\n\n            if (\n                isset($attr['summaryBelow'])\n                && !self::boolean((string) $attr['summaryBelow'])\n            ) {\n                $this->worksheet->setShowSummaryBelow(false);\n            } else {\n                $this->worksheet->setShowSummaryBelow(true);\n            }\n        }\n    }\n\n    private function pageSetup(SimpleXMLElement $sheetPr): void\n    {\n        if (isset($sheetPr->pageSetUpPr)) {\n            $attr = $sheetPr->pageSetUpPr->attributes() ?? [];\n            if (\n                isset($attr['fitToPage'])\n                && !self::boolean((string) $attr['fitToPage'])\n            ) {\n                $this->worksheet->getPageSetup()->setFitToPage(false);\n            } else {\n                $this->worksheet->getPageSetup()->setFitToPage(true);\n            }\n        }\n    }\n\n    private function sheetFormat(SimpleXMLElement $sheetFormatPrx): void\n    {\n        $sheetFormatPr = $sheetFormatPrx->attributes() ?? [];\n        if (\n            isset($sheetFormatPr['customHeight'])\n            && self::boolean((string) $sheetFormatPr['customHeight'])\n            && isset($sheetFormatPr['defaultRowHeight'])\n        ) {\n            $this->worksheet->getDefaultRowDimension()\n                ->setRowHeight((float) $sheetFormatPr['defaultRowHeight']);\n        }\n\n        if (isset($sheetFormatPr['defaultColWidth'])) {\n            $this->worksheet->getDefaultColumnDimension()\n                ->setWidth((float) $sheetFormatPr['defaultColWidth']);\n        }\n\n        if (\n            isset($sheetFormatPr['zeroHeight'])\n            && ((string) $sheetFormatPr['zeroHeight'] === '1')\n        ) {\n            $this->worksheet->getDefaultRowDimension()->setZeroHeight(true);\n        }\n    }\n\n    private function printOptions(SimpleXMLElement $printOptionsx): void\n    {\n        $printOptions = $printOptionsx->attributes() ?? [];\n        // Spec is weird. gridLines (default false)\n        // and gridLinesSet (default true) must both be true.\n        if (isset($printOptions['gridLines']) && self::boolean((string) $printOptions['gridLines'])) {\n            if (!isset($printOptions['gridLinesSet']) || self::boolean((string) $printOptions['gridLinesSet'])) {\n                $this->worksheet->setPrintGridlines(true);\n            }\n        }\n        if (isset($printOptions['horizontalCentered']) && self::boolean((string) $printOptions['horizontalCentered'])) {\n            $this->worksheet->getPageSetup()->setHorizontalCentered(true);\n        }\n        if (isset($printOptions['verticalCentered']) && self::boolean((string) $printOptions['verticalCentered'])) {\n            $this->worksheet->getPageSetup()->setVerticalCentered(true);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Pane;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\n\nclass SheetViews extends BaseParserClass\n{\n    private SimpleXMLElement $sheetViewXml;\n\n    private SimpleXMLElement $sheetViewAttributes;\n\n    private Worksheet $worksheet;\n\n    private string $activePane = '';\n\n    public function __construct(SimpleXMLElement $sheetViewXml, Worksheet $workSheet)\n    {\n        $this->sheetViewXml = $sheetViewXml;\n        $this->sheetViewAttributes = Xlsx::testSimpleXml($sheetViewXml->attributes());\n        $this->worksheet = $workSheet;\n    }\n\n    public function load(): void\n    {\n        $this->topLeft();\n        $this->zoomScale();\n        $this->view();\n        $this->gridLines();\n        $this->headers();\n        $this->direction();\n        $this->showZeros();\n\n        $usesPanes = false;\n        if (isset($this->sheetViewXml->pane)) {\n            $this->pane();\n            $usesPanes = true;\n        }\n        if (isset($this->sheetViewXml->selection)) {\n            foreach ($this->sheetViewXml->selection as $selection) {\n                $this->selection($selection, $usesPanes);\n            }\n        }\n    }\n\n    private function zoomScale(): void\n    {\n        if (isset($this->sheetViewAttributes->zoomScale)) {\n            $zoomScale = (int) ($this->sheetViewAttributes->zoomScale);\n            if ($zoomScale <= 0) {\n                // setZoomScale will throw an Exception if the scale is less than or equals 0\n                // that is OK when manually creating documents, but we should be able to read all documents\n                $zoomScale = 100;\n            }\n\n            $this->worksheet->getSheetView()->setZoomScale($zoomScale);\n        }\n\n        if (isset($this->sheetViewAttributes->zoomScaleNormal)) {\n            $zoomScaleNormal = (int) ($this->sheetViewAttributes->zoomScaleNormal);\n            if ($zoomScaleNormal <= 0) {\n                // setZoomScaleNormal will throw an Exception if the scale is less than or equals 0\n                // that is OK when manually creating documents, but we should be able to read all documents\n                $zoomScaleNormal = 100;\n            }\n\n            $this->worksheet->getSheetView()->setZoomScaleNormal($zoomScaleNormal);\n        }\n\n        if (isset($this->sheetViewAttributes->zoomScalePageLayoutView)) {\n            $zoomScaleNormal = (int) ($this->sheetViewAttributes->zoomScalePageLayoutView);\n            if ($zoomScaleNormal > 0) {\n                $this->worksheet->getSheetView()->setZoomScalePageLayoutView($zoomScaleNormal);\n            }\n        }\n\n        if (isset($this->sheetViewAttributes->zoomScaleSheetLayoutView)) {\n            $zoomScaleNormal = (int) ($this->sheetViewAttributes->zoomScaleSheetLayoutView);\n            if ($zoomScaleNormal > 0) {\n                $this->worksheet->getSheetView()->setZoomScaleSheetLayoutView($zoomScaleNormal);\n            }\n        }\n    }\n\n    private function view(): void\n    {\n        if (isset($this->sheetViewAttributes->view)) {\n            $this->worksheet->getSheetView()->setView((string) $this->sheetViewAttributes->view);\n        }\n    }\n\n    private function topLeft(): void\n    {\n        if (isset($this->sheetViewAttributes->topLeftCell)) {\n            $this->worksheet->setTopLeftCell($this->sheetViewAttributes->topLeftCell);\n        }\n    }\n\n    private function gridLines(): void\n    {\n        if (isset($this->sheetViewAttributes->showGridLines)) {\n            $this->worksheet->setShowGridLines(\n                self::boolean((string) $this->sheetViewAttributes->showGridLines)\n            );\n        }\n    }\n\n    private function headers(): void\n    {\n        if (isset($this->sheetViewAttributes->showRowColHeaders)) {\n            $this->worksheet->setShowRowColHeaders(\n                self::boolean((string) $this->sheetViewAttributes->showRowColHeaders)\n            );\n        }\n    }\n\n    private function direction(): void\n    {\n        if (isset($this->sheetViewAttributes->rightToLeft)) {\n            $this->worksheet->setRightToLeft(\n                self::boolean((string) $this->sheetViewAttributes->rightToLeft)\n            );\n        }\n    }\n\n    private function showZeros(): void\n    {\n        if (isset($this->sheetViewAttributes->showZeros)) {\n            $this->worksheet->getSheetView()->setShowZeros(\n                self::boolean((string) $this->sheetViewAttributes->showZeros)\n            );\n        }\n    }\n\n    private function pane(): void\n    {\n        $xSplit = 0;\n        $ySplit = 0;\n        $topLeftCell = null;\n        $paneAttributes = $this->sheetViewXml->pane->attributes();\n\n        if (isset($paneAttributes->xSplit)) {\n            $xSplit = (int) ($paneAttributes->xSplit);\n            $this->worksheet->setXSplit($xSplit);\n        }\n\n        if (isset($paneAttributes->ySplit)) {\n            $ySplit = (int) ($paneAttributes->ySplit);\n            $this->worksheet->setYSplit($ySplit);\n        }\n        $paneState = isset($paneAttributes->state) ? ((string) $paneAttributes->state) : '';\n        $this->worksheet->setPaneState($paneState);\n        if (isset($paneAttributes->topLeftCell)) {\n            $topLeftCell = (string) $paneAttributes->topLeftCell;\n            $this->worksheet->setPaneTopLeftCell($topLeftCell);\n            if ($paneState === Worksheet::PANE_FROZEN) {\n                $this->worksheet->setTopLeftCell($topLeftCell);\n            }\n        }\n        $activePane = isset($paneAttributes->activePane) ? ((string) $paneAttributes->activePane) : 'topLeft';\n        $this->worksheet->setActivePane($activePane);\n        $this->activePane = $activePane;\n        if ($paneState === Worksheet::PANE_FROZEN || $paneState === Worksheet::PANE_FROZENSPLIT) {\n            $this->worksheet->freezePane(\n                Coordinate::stringFromColumnIndex($xSplit + 1) . ($ySplit + 1),\n                $topLeftCell,\n                $paneState === Worksheet::PANE_FROZENSPLIT\n            );\n        }\n    }\n\n    private function selection(?SimpleXMLElement $selection, bool $usesPanes): void\n    {\n        $attributes = ($selection === null) ? null : $selection->attributes();\n        if ($attributes !== null) {\n            $position = (string) $attributes->pane;\n            if ($usesPanes && $position === '') {\n                $position = 'topLeft';\n            }\n            $activeCell = (string) $attributes->activeCell;\n            $sqref = (string) $attributes->sqref;\n            $sqref = explode(' ', $sqref);\n            $sqref = $sqref[0];\n            if ($position === '') {\n                $this->worksheet->setSelectedCells($sqref);\n            } else {\n                $pane = new Pane($position, $sqref, $activeCell);\n                $this->worksheet->setPane($position, $pane);\n                if ($position === $this->activePane && $sqref !== '') {\n                    $this->worksheet->setSelectedCells($sqref);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/Styles.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableDxfsStyle;\nuse SimpleXMLElement;\nuse stdClass;\n\nclass Styles extends BaseParserClass\n{\n    /**\n     * Theme instance.\n     */\n    private ?Theme $theme = null;\n\n    /** @var string[] */\n    private array $workbookPalette = [];\n\n    /** @var mixed[] */\n    private array $styles = [];\n\n    /** @var array<SimpleXMLElement|stdClass> */\n    private array $cellStyles = [];\n\n    private SimpleXMLElement $styleXml;\n\n    private string $namespace = '';\n\n    /** @var array<string, int> */\n    private array $fontCharsets = [];\n\n    /** @return array<string, int> */\n    public function getFontCharsets(): array\n    {\n        return $this->fontCharsets;\n    }\n\n    public function setNamespace(string $namespace): void\n    {\n        $this->namespace = $namespace;\n    }\n\n    /** @param string[] $palette */\n    public function setWorkbookPalette(array $palette): void\n    {\n        $this->workbookPalette = $palette;\n    }\n\n    private function getStyleAttributes(SimpleXMLElement $value): SimpleXMLElement\n    {\n        $attr = $value->attributes('');\n        if ($attr === null || count($attr) === 0) {\n            $attr = $value->attributes($this->namespace);\n        }\n\n        return Xlsx::testSimpleXml($attr);\n    }\n\n    public function setStyleXml(SimpleXMLElement $styleXml): void\n    {\n        $this->styleXml = $styleXml;\n    }\n\n    public function setTheme(Theme $theme): void\n    {\n        $this->theme = $theme;\n    }\n\n    /**\n     * @param mixed[] $styles\n     * @param array<SimpleXMLElement|stdClass> $cellStyles\n     */\n    public function setStyleBaseData(?Theme $theme = null, array $styles = [], array $cellStyles = []): void\n    {\n        $this->theme = $theme;\n        $this->styles = $styles;\n        $this->cellStyles = $cellStyles;\n    }\n\n    public function readFontStyle(Font $fontStyle, SimpleXMLElement $fontStyleXml): void\n    {\n        if (isset($fontStyleXml->name)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->name);\n            if (isset($attr['val'])) {\n                $fontStyle->setName((string) $attr['val']);\n            }\n            if (isset($fontStyleXml->charset)) {\n                $charsetAttr = $this->getStyleAttributes($fontStyleXml->charset);\n                if (isset($charsetAttr['val'])) {\n                    $charsetVal = (int) $charsetAttr['val'];\n                    $this->fontCharsets[$fontStyle->getName()] = $charsetVal;\n                }\n            }\n        }\n        if (isset($fontStyleXml->sz)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->sz);\n            if (isset($attr['val'])) {\n                $fontStyle->setSize((float) $attr['val']);\n            }\n        }\n        if (isset($fontStyleXml->b)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->b);\n            $fontStyle->setBold(!isset($attr['val']) || self::boolean((string) $attr['val']));\n        }\n        if (isset($fontStyleXml->i)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->i);\n            $fontStyle->setItalic(!isset($attr['val']) || self::boolean((string) $attr['val']));\n        }\n        if (isset($fontStyleXml->strike)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->strike);\n            $fontStyle->setStrikethrough(!isset($attr['val']) || self::boolean((string) $attr['val']));\n        }\n        $fontStyle->getColor()\n            ->setARGB(\n                $this->readColor($fontStyleXml->color)\n            );\n        $theme = $this->readColorTheme($fontStyleXml->color);\n        if ($theme >= 0) {\n            $fontStyle->getColor()->setTheme($theme);\n        }\n\n        if (isset($fontStyleXml->u)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->u);\n            if (!isset($attr['val'])) {\n                $fontStyle->setUnderline(Font::UNDERLINE_SINGLE);\n            } else {\n                $fontStyle->setUnderline((string) $attr['val']);\n            }\n        }\n        if (isset($fontStyleXml->vertAlign)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->vertAlign);\n            if (isset($attr['val'])) {\n                $verticalAlign = strtolower((string) $attr['val']);\n                if ($verticalAlign === 'superscript') {\n                    $fontStyle->setSuperscript(true);\n                } elseif ($verticalAlign === 'subscript') {\n                    $fontStyle->setSubscript(true);\n                }\n            }\n        }\n        if (isset($fontStyleXml->scheme)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->scheme);\n            $fontStyle->setScheme((string) $attr['val']);\n        }\n        if (isset($fontStyleXml->auto)) {\n            $attr = $this->getStyleAttributes($fontStyleXml->auto);\n            if (isset($attr['val'])) {\n                $fontStyle->setAutoColor(self::boolean((string) $attr['val']));\n            }\n        }\n    }\n\n    private function readNumberFormat(NumberFormat $numfmtStyle, SimpleXMLElement $numfmtStyleXml): void\n    {\n        if ((string) $numfmtStyleXml['formatCode'] !== '') {\n            $numfmtStyle->setFormatCode(self::formatGeneral((string) $numfmtStyleXml['formatCode']));\n\n            return;\n        }\n        $numfmt = $this->getStyleAttributes($numfmtStyleXml);\n        if (isset($numfmt['formatCode'])) {\n            $numfmtStyle->setFormatCode(self::formatGeneral((string) $numfmt['formatCode']));\n        }\n    }\n\n    public function readFillStyle(Fill $fillStyle, SimpleXMLElement $fillStyleXml): void\n    {\n        if ($fillStyleXml->gradientFill) {\n            /** @var SimpleXMLElement $gradientFill */\n            $gradientFill = $fillStyleXml->gradientFill[0];\n            $attr = $this->getStyleAttributes($gradientFill);\n            if (!empty($attr['type'])) {\n                $fillStyle->setFillType((string) $attr['type']);\n            }\n            $fillStyle->setRotation((float) ($attr['degree']));\n            $gradientFill->registerXPathNamespace('sml', Namespaces::MAIN);\n            $fillStyle->getStartColor()->setARGB($this->readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=0]'))->color)); //* @phpstan-ignore-line\n            $fillStyle->getEndColor()->setARGB($this->readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=1]'))->color)); //* @phpstan-ignore-line\n        } elseif ($fillStyleXml->patternFill) {\n            $defaultFillStyle = ($fillStyle->getFillType() !== null) ? Fill::FILL_NONE : '';\n            $fgFound = false;\n            $bgFound = false;\n            if ($fillStyleXml->patternFill->fgColor) {\n                $fillStyle->getStartColor()->setARGB($this->readColor($fillStyleXml->patternFill->fgColor, true));\n                if ($fillStyle->getFillType() !== null) {\n                    $defaultFillStyle = Fill::FILL_SOLID;\n                }\n                $fgFound = true;\n            }\n            if ($fillStyleXml->patternFill->bgColor) {\n                $fillStyle->getEndColor()->setARGB($this->readColor($fillStyleXml->patternFill->bgColor, true));\n                if ($fillStyle->getFillType() !== null) {\n                    $defaultFillStyle = Fill::FILL_SOLID;\n                }\n                $bgFound = true;\n            }\n\n            $type = '';\n            if ((string) $fillStyleXml->patternFill['patternType'] !== '') {\n                $type = (string) $fillStyleXml->patternFill['patternType'];\n            } else {\n                $attr = $this->getStyleAttributes($fillStyleXml->patternFill);\n                $type = (string) $attr['patternType'];\n            }\n            $patternType = ($type === '') ? $defaultFillStyle : $type;\n\n            $fillStyle->setFillType($patternType);\n            if (\n                !$fgFound // no foreground color specified\n                && !in_array($patternType, [Fill::FILL_NONE, Fill::FILL_SOLID], true) // these patterns aren't relevant\n                && $fillStyle->getStartColor()->getARGB() // not conditional\n            ) {\n                $fillStyle->getStartColor()\n                    ->setARGB('', true);\n            }\n            if (\n                !$bgFound // no background color specified\n                && !in_array($patternType, [Fill::FILL_NONE, Fill::FILL_SOLID], true) // these patterns aren't relevant\n                && $fillStyle->getEndColor()->getARGB() // not conditional\n            ) {\n                $fillStyle->getEndColor()\n                    ->setARGB('', true);\n            }\n        }\n    }\n\n    public function readBorderStyle(Borders $borderStyle, SimpleXMLElement $borderStyleXml): void\n    {\n        $diagonalUp = $this->getAttribute($borderStyleXml, 'diagonalUp');\n        $diagonalUp = self::boolean($diagonalUp);\n        $diagonalDown = $this->getAttribute($borderStyleXml, 'diagonalDown');\n        $diagonalDown = self::boolean($diagonalDown);\n        if ($diagonalUp === false) {\n            if ($diagonalDown === false) {\n                $borderStyle->setDiagonalDirection(Borders::DIAGONAL_NONE);\n            } else {\n                $borderStyle->setDiagonalDirection(Borders::DIAGONAL_DOWN);\n            }\n        } elseif ($diagonalDown === false) {\n            $borderStyle->setDiagonalDirection(Borders::DIAGONAL_UP);\n        } else {\n            $borderStyle->setDiagonalDirection(Borders::DIAGONAL_BOTH);\n        }\n\n        if (isset($borderStyleXml->left)) {\n            $this->readBorder($borderStyle->getLeft(), $borderStyleXml->left);\n        }\n        if (isset($borderStyleXml->right)) {\n            $this->readBorder($borderStyle->getRight(), $borderStyleXml->right);\n        }\n        if (isset($borderStyleXml->top)) {\n            $this->readBorder($borderStyle->getTop(), $borderStyleXml->top);\n        }\n        if (isset($borderStyleXml->bottom)) {\n            $this->readBorder($borderStyle->getBottom(), $borderStyleXml->bottom);\n        }\n        if (isset($borderStyleXml->diagonal)) {\n            $this->readBorder($borderStyle->getDiagonal(), $borderStyleXml->diagonal);\n        }\n    }\n\n    private function getAttribute(SimpleXMLElement $xml, string $attribute): string\n    {\n        $style = '';\n        if ((string) $xml[$attribute] !== '') {\n            $style = (string) $xml[$attribute];\n        } else {\n            $attr = $this->getStyleAttributes($xml);\n            if (isset($attr[$attribute])) {\n                $style = (string) $attr[$attribute];\n            }\n        }\n\n        return $style;\n    }\n\n    private function readBorder(Border $border, SimpleXMLElement $borderXml): void\n    {\n        $style = $this->getAttribute($borderXml, 'style');\n        if ($style !== '') {\n            $border->setBorderStyle((string) $style);\n        } else {\n            $border->setBorderStyle(Border::BORDER_NONE);\n        }\n        if (isset($borderXml->color)) {\n            $border->getColor()->setARGB($this->readColor($borderXml->color));\n        }\n    }\n\n    public function readAlignmentStyle(Alignment $alignment, SimpleXMLElement $alignmentXml): void\n    {\n        $horizontal = (string) $this->getAttribute($alignmentXml, 'horizontal');\n        if ($horizontal !== '') {\n            $alignment->setHorizontal($horizontal);\n        }\n        $justifyLastLine = (string) $this->getAttribute($alignmentXml, 'justifyLastLine');\n        if ($justifyLastLine !== '') {\n            $alignment->setJustifyLastLine(\n                self::boolean($justifyLastLine)\n            );\n        }\n        $vertical = (string) $this->getAttribute($alignmentXml, 'vertical');\n        if ($vertical !== '') {\n            $alignment->setVertical($vertical);\n        }\n\n        $textRotation = (int) $this->getAttribute($alignmentXml, 'textRotation');\n        if ($textRotation > 90) {\n            $textRotation = 90 - $textRotation;\n        }\n        $alignment->setTextRotation($textRotation);\n\n        $wrapText = $this->getAttribute($alignmentXml, 'wrapText');\n        $alignment->setWrapText(self::boolean((string) $wrapText));\n        $shrinkToFit = $this->getAttribute($alignmentXml, 'shrinkToFit');\n        $alignment->setShrinkToFit(self::boolean((string) $shrinkToFit));\n        $indent = (int) $this->getAttribute($alignmentXml, 'indent');\n        $alignment->setIndent(max($indent, 0));\n        $readingOrder = (int) $this->getAttribute($alignmentXml, 'readingOrder');\n        $alignment->setReadOrder(max($readingOrder, 0));\n    }\n\n    private static function formatGeneral(string $formatString): string\n    {\n        if ($formatString === 'GENERAL') {\n            $formatString = NumberFormat::FORMAT_GENERAL;\n        }\n\n        return $formatString;\n    }\n\n    /**\n     * Read style.\n     */\n    public function readStyle(Style $docStyle, SimpleXMLElement|stdClass $style): void\n    {\n        if ($style instanceof SimpleXMLElement) {\n            $this->readNumberFormat($docStyle->getNumberFormat(), $style->numFmt);\n        } else {\n            /** @var SimpleXMLElement */\n            $temp = $style->numFmt;\n            $docStyle->getNumberFormat()->setFormatCode(self::formatGeneral((string) $temp));\n        }\n\n        /** @var SimpleXMLElement $style */\n        if (isset($style->font)) {\n            $this->readFontStyle($docStyle->getFont(), $style->font);\n        }\n\n        if (isset($style->fill)) {\n            $this->readFillStyle($docStyle->getFill(), $style->fill);\n        }\n\n        if (isset($style->border)) {\n            $this->readBorderStyle($docStyle->getBorders(), $style->border);\n        }\n\n        if (isset($style->alignment)) {\n            $this->readAlignmentStyle($docStyle->getAlignment(), $style->alignment);\n        }\n\n        // protection\n        if (isset($style->protection)) {\n            $this->readProtectionLocked($docStyle, $style->protection);\n            $this->readProtectionHidden($docStyle, $style->protection);\n        }\n\n        // top-level style settings\n        if (isset($style->quotePrefix)) {\n            $docStyle->setQuotePrefix((bool) $style->quotePrefix);\n        }\n    }\n\n    /**\n     * Read protection locked attribute.\n     */\n    public function readProtectionLocked(Style $docStyle, SimpleXMLElement $style): void\n    {\n        $locked = '';\n        if ((string) $style['locked'] !== '') {\n            $locked = (string) $style['locked'];\n        } else {\n            $attr = $this->getStyleAttributes($style);\n            if (isset($attr['locked'])) {\n                $locked = (string) $attr['locked'];\n            }\n        }\n        if ($locked !== '') {\n            if (self::boolean($locked)) {\n                $docStyle->getProtection()->setLocked(Protection::PROTECTION_PROTECTED);\n            } else {\n                $docStyle->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED);\n            }\n        }\n    }\n\n    /**\n     * Read protection hidden attribute.\n     */\n    public function readProtectionHidden(Style $docStyle, SimpleXMLElement $style): void\n    {\n        $hidden = '';\n        if ((string) $style['hidden'] !== '') {\n            $hidden = (string) $style['hidden'];\n        } else {\n            $attr = $this->getStyleAttributes($style);\n            if (isset($attr['hidden'])) {\n                $hidden = (string) $attr['hidden'];\n            }\n        }\n        if ($hidden !== '') {\n            if (self::boolean((string) $hidden)) {\n                $docStyle->getProtection()->setHidden(Protection::PROTECTION_PROTECTED);\n            } else {\n                $docStyle->getProtection()->setHidden(Protection::PROTECTION_UNPROTECTED);\n            }\n        }\n    }\n\n    public function readColorTheme(SimpleXMLElement $color): int\n    {\n        $attr = $this->getStyleAttributes($color);\n        $retVal = -1;\n        if (isset($attr['theme']) && is_numeric((string) $attr['theme']) && !isset($attr['tint'])) {\n            $retVal = (int) $attr['theme'];\n        }\n\n        return $retVal;\n    }\n\n    public function readColor(SimpleXMLElement $color, bool $background = false): string\n    {\n        $attr = $this->getStyleAttributes($color);\n        if (isset($attr['rgb'])) {\n            return (string) $attr['rgb'];\n        }\n        if (isset($attr['indexed'])) {\n            $indexedColor = (int) $attr['indexed'];\n            if ($indexedColor >= count($this->workbookPalette)) {\n                return Color::indexedColor($indexedColor - 7, $background)->getARGB() ?? '';\n            }\n\n            return Color::indexedColor($indexedColor, $background, $this->workbookPalette)->getARGB() ?? '';\n        }\n        if (isset($attr['theme'])) {\n            if ($this->theme !== null) {\n                $returnColour = $this->theme->getColourByIndex((int) $attr['theme']);\n                if (isset($attr['tint'])) {\n                    $tintAdjust = (float) $attr['tint'];\n                    $returnColour = Color::changeBrightness($returnColour ?? '', $tintAdjust);\n                }\n\n                return 'FF' . $returnColour;\n            }\n        }\n\n        return ($background) ? 'FFFFFFFF' : 'FF000000';\n    }\n\n    /** @return Style[] */\n    public function dxfs(bool $readDataOnly = false): array\n    {\n        $dxfs = [];\n        if (!$readDataOnly && $this->styleXml) {\n            //    Conditional Styles\n            if ($this->styleXml->dxfs) {\n                foreach ($this->styleXml->dxfs->dxf as $dxf) {\n                    $style = new Style(false, true);\n                    $this->readStyle($style, $dxf);\n                    $dxfs[] = $style;\n                }\n            }\n            //    Cell Styles\n            if ($this->styleXml->cellStyles) {\n                foreach ($this->styleXml->cellStyles->cellStyle as $cellStylex) {\n                    $cellStyle = Xlsx::getAttributes($cellStylex);\n                    if ((int) ($cellStyle['builtinId']) == 0) {\n                        if (isset($this->cellStyles[(int) ($cellStyle['xfId'])])) {\n                            // Set default style\n                            $style = new Style();\n                            $this->readStyle($style, $this->cellStyles[(int) ($cellStyle['xfId'])]);\n\n                            // normal style, currently not using it for anything\n                        }\n                    }\n                }\n            }\n        }\n\n        return $dxfs;\n    }\n\n    /** @return TableDxfsStyle[] */\n    public function tableStyles(bool $readDataOnly = false): array\n    {\n        $tableStyles = [];\n        if (!$readDataOnly && $this->styleXml) {\n            //    Conditional Styles\n            if ($this->styleXml->tableStyles) {\n                foreach ($this->styleXml->tableStyles->tableStyle as $s) {\n                    $attrs = Xlsx::getAttributes($s);\n                    if (isset($attrs['name'][0])) {\n                        $style = new TableDxfsStyle((string) ($attrs['name'][0]));\n                        foreach ($s->tableStyleElement as $e) {\n                            $a = Xlsx::getAttributes($e);\n                            if (isset($a['dxfId'][0], $a['type'][0])) {\n                                switch ($a['type'][0]) {\n                                    case 'headerRow':\n                                        $style->setHeaderRow((int) ($a['dxfId'][0]));\n\n                                        break;\n                                    case 'firstRowStripe':\n                                        $style->setFirstRowStripe((int) ($a['dxfId'][0]));\n\n                                        break;\n                                    case 'secondRowStripe':\n                                        $style->setSecondRowStripe((int) ($a['dxfId'][0]));\n\n                                        break;\n                                    default:\n                                }\n                            }\n                        }\n                        $tableStyles[] = $style;\n                    }\n                }\n            }\n        }\n\n        return $tableStyles;\n    }\n\n    /** @return mixed[] */\n    public function styles(): array\n    {\n        return $this->styles;\n    }\n\n    /**\n     * Get array item.\n     *\n     * @param false|mixed[] $array (usually array, in theory can be false)\n     */\n    private static function getArrayItem(mixed $array): ?SimpleXMLElement\n    {\n        return is_array($array) ? ($array[0] ?? null) : null; // @phpstan-ignore-line\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/TableReader.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableDxfsStyle;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableStyle;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\n\nclass TableReader\n{\n    private Worksheet $worksheet;\n\n    private SimpleXMLElement $tableXml;\n\n    /** @var mixed[]|SimpleXMLElement */\n    private $tableAttributes;\n\n    public function __construct(Worksheet $workSheet, SimpleXMLElement $tableXml)\n    {\n        $this->worksheet = $workSheet;\n        $this->tableXml = $tableXml;\n    }\n\n    /**\n     * Loads Table into the Worksheet.\n     *\n     * @param TableDxfsStyle[] $tableStyles\n     * @param Style[] $dxfs\n     */\n    public function load(array $tableStyles, array $dxfs): void\n    {\n        $this->tableAttributes = $this->tableXml->attributes() ?? [];\n        // Remove all \"$\" in the table range\n        $tableRange = (string) preg_replace('/\\$/', '', $this->tableAttributes['ref'] ?? '');\n        if (str_contains($tableRange, ':')) {\n            $this->readTable($tableRange, $tableStyles, $dxfs);\n        }\n    }\n\n    /**\n     * Read Table from xml.\n     *\n     * @param TableDxfsStyle[] $tableStyles\n     * @param Style[] $dxfs\n     */\n    private function readTable(string $tableRange, array $tableStyles, array $dxfs): void\n    {\n        $table = new Table($tableRange);\n        /** @var string[] */\n        $attributes = $this->tableAttributes;\n        $table->setName((string) ($attributes['displayName'] ?? ''));\n        $table->setShowHeaderRow(((string) ($attributes['headerRowCount'] ?? '')) !== '0');\n        $table->setShowTotalsRow(((string) ($attributes['totalsRowCount'] ?? '')) === '1');\n\n        $this->readTableAutoFilter($table, $this->tableXml->autoFilter);\n        $this->readTableColumns($table, $this->tableXml->tableColumns);\n        $this->readTableStyle($table, $this->tableXml->tableStyleInfo, $tableStyles, $dxfs);\n\n        (new AutoFilter($table, $this->tableXml))->load();\n        $this->worksheet->addTable($table);\n    }\n\n    /**\n     * Reads TableAutoFilter from xml.\n     */\n    private function readTableAutoFilter(Table $table, SimpleXMLElement $autoFilterXml): void\n    {\n        if ($autoFilterXml->filterColumn === null) {\n            $table->setAllowFilter(false);\n\n            return;\n        }\n\n        foreach ($autoFilterXml->filterColumn as $filterColumn) {\n            /** @var SimpleXMLElement */\n            $attributes = $filterColumn->attributes() ?? ['colId' => 0, 'hiddenButton' => 0];\n            $column = $table->getColumnByOffset((int) $attributes['colId']);\n            $column->setShowFilterButton(((string) $attributes['hiddenButton']) !== '1');\n        }\n    }\n\n    /**\n     * Reads TableColumns from xml.\n     */\n    private function readTableColumns(Table $table, SimpleXMLElement $tableColumnsXml): void\n    {\n        $offset = 0;\n        foreach ($tableColumnsXml->tableColumn as $tableColumn) {\n            /** @var SimpleXMLElement */\n            $attributes = $tableColumn->attributes() ?? ['totalsRowLabel' => 0, 'totalsRowFunction' => 0];\n            $column = $table->getColumnByOffset($offset++);\n\n            if ($table->getShowTotalsRow()) {\n                if ($attributes['totalsRowLabel']) {\n                    $column->setTotalsRowLabel((string) $attributes['totalsRowLabel']);\n                }\n\n                if ($attributes['totalsRowFunction']) {\n                    $column->setTotalsRowFunction((string) $attributes['totalsRowFunction']);\n                }\n            }\n\n            if ($tableColumn->calculatedColumnFormula) {\n                $column->setColumnFormula((string) $tableColumn->calculatedColumnFormula);\n            }\n        }\n    }\n\n    /**\n     * Reads TableStyle from xml.\n     *\n     * @param TableDxfsStyle[] $tableStyles\n     * @param Style[] $dxfs\n     */\n    private function readTableStyle(Table $table, SimpleXMLElement $tableStyleInfoXml, array $tableStyles, array $dxfs): void\n    {\n        $tableStyle = new TableStyle();\n        $attributes = $tableStyleInfoXml->attributes();\n        if ($attributes !== null) {\n            $tableStyle->setTheme((string) $attributes['name']);\n            $tableStyle->setShowRowStripes((string) $attributes['showRowStripes'] === '1');\n            $tableStyle->setShowColumnStripes((string) $attributes['showColumnStripes'] === '1');\n            $tableStyle->setShowFirstColumn((string) $attributes['showFirstColumn'] === '1');\n            $tableStyle->setShowLastColumn((string) $attributes['showLastColumn'] === '1');\n\n            foreach ($tableStyles as $style) {\n                if ($style->getName() === (string) $attributes['name']) {\n                    $tableStyle->setTableDxfsStyle($style, $dxfs);\n                }\n            }\n        }\n        $table->setStyle($tableStyle);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/Theme.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Theme\n{\n    /**\n     * Theme Name.\n     */\n    private string $themeName;\n\n    /**\n     * Colour Scheme Name.\n     */\n    private string $colourSchemeName;\n\n    /**\n     * Colour Map.\n     *\n     * @var string[]\n     */\n    private array $colourMap;\n\n    /**\n     * Create a new Theme.\n     *\n     * @param string[] $colourMap\n     */\n    public function __construct(string $themeName, string $colourSchemeName, array $colourMap)\n    {\n        // Initialise values\n        $this->themeName = $themeName;\n        $this->colourSchemeName = $colourSchemeName;\n        $this->colourMap = $colourMap;\n    }\n\n    /**\n     * Not called by Reader, never accessible any other time.\n     *\n     * @codeCoverageIgnore\n     */\n    public function getThemeName(): string\n    {\n        return $this->themeName;\n    }\n\n    /**\n     * Not called by Reader, never accessible any other time.\n     *\n     * @codeCoverageIgnore\n     */\n    public function getColourSchemeName(): string\n    {\n        return $this->colourSchemeName;\n    }\n\n    /**\n     * Get colour Map Value by Position.\n     */\n    public function getColourByIndex(int $index): ?string\n    {\n        return $this->colourMap[$index] ?? null;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx/WorkbookView.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse SimpleXMLElement;\n\nclass WorkbookView\n{\n    private Spreadsheet $spreadsheet;\n\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n    }\n\n    /** @param array<int, ?int> $mapSheetId */\n    public function viewSettings(SimpleXMLElement $xmlWorkbook, string $mainNS, array $mapSheetId, bool $readDataOnly): void\n    {\n        // Default active sheet index to the first loaded worksheet from the file\n        $this->spreadsheet->setActiveSheetIndex(0);\n\n        $workbookView = $xmlWorkbook->children($mainNS)->bookViews->workbookView;\n        if ($readDataOnly !== true && !empty($workbookView)) {\n            $workbookViewAttributes = self::testSimpleXml(self::getAttributes($workbookView));\n            // active sheet index\n            $activeTab = (int) $workbookViewAttributes->activeTab; // refers to old sheet index\n            // keep active sheet index if sheet is still loaded, else first sheet is set as the active worksheet\n            if (isset($mapSheetId[$activeTab])) {\n                $this->spreadsheet->setActiveSheetIndex($mapSheetId[$activeTab]);\n            }\n\n            $this->horizontalScroll($workbookViewAttributes);\n            $this->verticalScroll($workbookViewAttributes);\n            $this->sheetTabs($workbookViewAttributes);\n            $this->minimized($workbookViewAttributes);\n            $this->autoFilterDateGrouping($workbookViewAttributes);\n            $this->firstSheet($workbookViewAttributes);\n            $this->visibility($workbookViewAttributes);\n            $this->tabRatio($workbookViewAttributes);\n        }\n    }\n\n    public static function testSimpleXml(mixed $value): SimpleXMLElement\n    {\n        return ($value instanceof SimpleXMLElement)\n            ? $value\n            : new SimpleXMLElement('<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>');\n    }\n\n    public static function getAttributes(?SimpleXMLElement $value, string $ns = ''): SimpleXMLElement\n    {\n        return self::testSimpleXml($value === null ? $value : $value->attributes($ns));\n    }\n\n    /**\n     * Convert an 'xsd:boolean' XML value to a PHP boolean value.\n     * A valid 'xsd:boolean' XML value can be one of the following\n     * four values: 'true', 'false', '1', '0'.  It is case-sensitive.\n     *\n     * Note that just doing '(bool) $xsdBoolean' is not safe,\n     * since '(bool) \"false\"' returns true.\n     *\n     * @see https://www.w3.org/TR/xmlschema11-2/#boolean\n     *\n     * @param string $xsdBoolean An XML string value of type 'xsd:boolean'\n     *\n     * @return bool  Boolean value\n     */\n    private function castXsdBooleanToBool(string $xsdBoolean): bool\n    {\n        if ($xsdBoolean === 'false') {\n            return false;\n        }\n\n        return (bool) $xsdBoolean;\n    }\n\n    private function horizontalScroll(SimpleXMLElement $workbookViewAttributes): void\n    {\n        if (isset($workbookViewAttributes->showHorizontalScroll)) {\n            $showHorizontalScroll = (string) $workbookViewAttributes->showHorizontalScroll;\n            $this->spreadsheet->setShowHorizontalScroll($this->castXsdBooleanToBool($showHorizontalScroll));\n        }\n    }\n\n    private function verticalScroll(SimpleXMLElement $workbookViewAttributes): void\n    {\n        if (isset($workbookViewAttributes->showVerticalScroll)) {\n            $showVerticalScroll = (string) $workbookViewAttributes->showVerticalScroll;\n            $this->spreadsheet->setShowVerticalScroll($this->castXsdBooleanToBool($showVerticalScroll));\n        }\n    }\n\n    private function sheetTabs(SimpleXMLElement $workbookViewAttributes): void\n    {\n        if (isset($workbookViewAttributes->showSheetTabs)) {\n            $showSheetTabs = (string) $workbookViewAttributes->showSheetTabs;\n            $this->spreadsheet->setShowSheetTabs($this->castXsdBooleanToBool($showSheetTabs));\n        }\n    }\n\n    private function minimized(SimpleXMLElement $workbookViewAttributes): void\n    {\n        if (isset($workbookViewAttributes->minimized)) {\n            $minimized = (string) $workbookViewAttributes->minimized;\n            $this->spreadsheet->setMinimized($this->castXsdBooleanToBool($minimized));\n        }\n    }\n\n    private function autoFilterDateGrouping(SimpleXMLElement $workbookViewAttributes): void\n    {\n        if (isset($workbookViewAttributes->autoFilterDateGrouping)) {\n            $autoFilterDateGrouping = (string) $workbookViewAttributes->autoFilterDateGrouping;\n            $this->spreadsheet->setAutoFilterDateGrouping($this->castXsdBooleanToBool($autoFilterDateGrouping));\n        }\n    }\n\n    private function firstSheet(SimpleXMLElement $workbookViewAttributes): void\n    {\n        if (isset($workbookViewAttributes->firstSheet)) {\n            $firstSheet = (string) $workbookViewAttributes->firstSheet;\n            $this->spreadsheet->setFirstSheetIndex((int) $firstSheet);\n        }\n    }\n\n    private function visibility(SimpleXMLElement $workbookViewAttributes): void\n    {\n        if (isset($workbookViewAttributes->visibility)) {\n            $visibility = (string) $workbookViewAttributes->visibility;\n            $this->spreadsheet->setVisibility($visibility);\n        }\n    }\n\n    private function tabRatio(SimpleXMLElement $workbookViewAttributes): void\n    {\n        if (isset($workbookViewAttributes->tabRatio)) {\n            $tabRatio = (string) $workbookViewAttributes->tabRatio;\n            $this->spreadsheet->setTabRatio((int) $tabRatio);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xlsx.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink;\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Security\\XmlScanner;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\ColumnAndRowAttributes;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\ConditionalStyles;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\DataValidations;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Hyperlinks;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Properties as PropertyReader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\SharedFormula;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\SheetViewOptions;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\SheetViews;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Styles;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\TableReader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Theme;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\WorkbookView;\nuse PhpOffice\\PhpSpreadsheet\\ReferenceHelper;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font as StyleFont;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooterDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableDxfsStyle;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\nuse Throwable;\nuse XMLReader;\nuse ZipArchive;\n\nclass Xlsx extends BaseReader\n{\n    const INITIAL_FILE = '_rels/.rels';\n\n    /**\n     * ReferenceHelper instance.\n     */\n    private ReferenceHelper $referenceHelper;\n\n    private ZipArchive $zip;\n\n    private Styles $styleReader;\n\n    /** @var SharedFormula[] */\n    private array $sharedFormulae = [];\n\n    private bool $parseHuge = false;\n\n    /**\n     * Allow use of LIBXML_PARSEHUGE.\n     * This option can lead to memory leaks and failures,\n     * and is not recommended. But some very large spreadsheets\n     * seem to require it.\n     */\n    public function setParseHuge(bool $parseHuge): void\n    {\n        $this->parseHuge = $parseHuge;\n    }\n\n    /**\n     * Create a new Xlsx Reader instance.\n     */\n    public function __construct()\n    {\n        parent::__construct();\n        $this->referenceHelper = ReferenceHelper::getInstance();\n        $this->securityScanner = XmlScanner::getInstance($this);\n    }\n\n    /**\n     * Can the current IReader read the file?\n     */\n    public function canRead(string $filename): bool\n    {\n        if (!File::testFileNoThrow($filename, self::INITIAL_FILE)) {\n            return false;\n        }\n\n        $result = false;\n        $this->zip = $zip = new ZipArchive();\n\n        if ($zip->open($filename) === true) {\n            [$workbookBasename] = $this->getWorkbookBaseName();\n            $result = !empty($workbookBasename);\n\n            $zip->close();\n        }\n\n        return $result;\n    }\n\n    public static function testSimpleXml(mixed $value): SimpleXMLElement\n    {\n        return ($value instanceof SimpleXMLElement) ? $value : new SimpleXMLElement('<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>');\n    }\n\n    public static function getAttributes(?SimpleXMLElement $value, string $ns = ''): SimpleXMLElement\n    {\n        return self::testSimpleXml($value === null ? $value : $value->attributes($ns));\n    }\n\n    // Phpstan thinks, correctly, that xpath can return false.\n    /** @return mixed[] */\n    private static function xpathNoFalse(SimpleXMLElement $sxml, string $path): array\n    {\n        return self::falseToArray($sxml->xpath($path));\n    }\n\n    /** @return mixed[] */\n    public static function falseToArray(mixed $value): array\n    {\n        return is_array($value) ? $value : [];\n    }\n\n    private function loadZip(string $filename, string $ns = '', bool $replaceUnclosedBr = false): SimpleXMLElement\n    {\n        $contents = $this->getFromZipArchive($this->zip, $filename);\n        if ($replaceUnclosedBr) {\n            $contents = str_replace('<br>', '<br/>', $contents);\n        }\n        $rels = @simplexml_load_string(\n            $this->getSecurityScannerOrThrow()->scan($contents),\n            SimpleXMLElement::class,\n            $this->parseHuge ? LIBXML_PARSEHUGE : 0,\n            $ns\n        );\n\n        return self::testSimpleXml($rels);\n    }\n\n    // This function is just to identify cases where I'm not sure\n    // why empty namespace is required.\n    private function loadZipNonamespace(string $filename, string $ns): SimpleXMLElement\n    {\n        $contents = $this->getFromZipArchive($this->zip, $filename);\n        $rels = simplexml_load_string(\n            $this->getSecurityScannerOrThrow()->scan($contents),\n            SimpleXMLElement::class,\n            $this->parseHuge ? LIBXML_PARSEHUGE : 0,\n            ($ns === '' ? $ns : '')\n        );\n\n        return self::testSimpleXml($rels);\n    }\n\n    private const REL_TO_MAIN = [\n        Namespaces::PURL_OFFICE_DOCUMENT => Namespaces::PURL_MAIN,\n        Namespaces::THUMBNAIL => '',\n    ];\n\n    private const REL_TO_DRAWING = [\n        Namespaces::PURL_RELATIONSHIPS => Namespaces::PURL_DRAWING,\n    ];\n\n    private const REL_TO_CHART = [\n        Namespaces::PURL_RELATIONSHIPS => Namespaces::PURL_CHART,\n    ];\n\n    /**\n     * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object.\n     *\n     * @return string[]\n     */\n    public function listWorksheetNames(string $filename): array\n    {\n        File::assertFile($filename, self::INITIAL_FILE);\n\n        $worksheetNames = [];\n\n        $this->zip = $zip = new ZipArchive();\n        $zip->open($filename);\n\n        //    The files we're looking at here are small enough that simpleXML is more efficient than XMLReader\n        $rels = $this->loadZip(self::INITIAL_FILE, Namespaces::RELATIONSHIPS);\n        foreach ($rels->Relationship as $relx) {\n            $rel = self::getAttributes($relx);\n            $relType = (string) $rel['Type'];\n            $mainNS = self::REL_TO_MAIN[$relType] ?? Namespaces::MAIN;\n            if ($mainNS !== '') {\n                $xmlWorkbook = $this->loadZip((string) $rel['Target'], $mainNS);\n\n                if ($xmlWorkbook->sheets) {\n                    foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {\n                        // Check if sheet should be skipped\n                        $worksheetNames[] = (string) self::getAttributes($eleSheet)['name'];\n                    }\n                }\n            }\n        }\n\n        $zip->close();\n\n        return $worksheetNames;\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        File::assertFile($filename, self::INITIAL_FILE);\n\n        $worksheetInfo = [];\n\n        $this->zip = $zip = new ZipArchive();\n        $zip->open($filename);\n\n        $rels = $this->loadZip(self::INITIAL_FILE, Namespaces::RELATIONSHIPS);\n        foreach ($rels->Relationship as $relx) {\n            $rel = self::getAttributes($relx);\n            $relType = (string) $rel['Type'];\n            $mainNS = self::REL_TO_MAIN[$relType] ?? Namespaces::MAIN;\n            if ($mainNS !== '') {\n                $relTarget = (string) $rel['Target'];\n                $dir = dirname($relTarget);\n                $namespace = dirname($relType);\n                $relsWorkbook = $this->loadZip(\"$dir/_rels/\" . basename($relTarget) . '.rels', Namespaces::RELATIONSHIPS);\n\n                $worksheets = [];\n                foreach ($relsWorkbook->Relationship as $elex) {\n                    $ele = self::getAttributes($elex);\n                    if (\n                        ((string) $ele['Type'] === \"$namespace/worksheet\")\n                        || ((string) $ele['Type'] === \"$namespace/chartsheet\")\n                    ) {\n                        $worksheets[(string) $ele['Id']] = $ele['Target'];\n                    }\n                }\n\n                $xmlWorkbook = $this->loadZip($relTarget, $mainNS);\n                if ($xmlWorkbook->sheets) {\n                    $dir = dirname($relTarget);\n\n                    foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {\n                        $tmpInfo = [\n                            'worksheetName' => (string) self::getAttributes($eleSheet)['name'],\n                            'lastColumnLetter' => 'A',\n                            'lastColumnIndex' => 0,\n                            'totalRows' => 0,\n                            'totalColumns' => 0,\n                        ];\n                        $sheetState = (string) (self::getAttributes($eleSheet)['state'] ?? Worksheet::SHEETSTATE_VISIBLE);\n                        $tmpInfo['sheetState'] = $sheetState;\n\n                        $fileWorksheet = (string) $worksheets[self::getArrayItemString(self::getAttributes($eleSheet, $namespace), 'id')];\n                        $fileWorksheetPath = str_starts_with($fileWorksheet, '/') ? substr($fileWorksheet, 1) : \"$dir/$fileWorksheet\";\n\n                        $xml = new XMLReader();\n                        $xml->xml(\n                            $this->getSecurityScannerOrThrow()\n                                ->scan(\n                                    $this->getFromZipArchive(\n                                        $this->zip,\n                                        $fileWorksheetPath\n                                    )\n                                ),\n                            null,\n                            $this->parseHuge ? LIBXML_PARSEHUGE : 0\n                        );\n                        $xml->setParserProperty(2, true);\n\n                        $currCells = 0;\n                        $currRow = 0;\n                        while ($xml->read()) {\n                            if ($xml->localName == 'row' && $xml->nodeType == XMLReader::ELEMENT && $xml->namespaceURI === $mainNS) {\n                                $row = (int) $xml->getAttribute('r');\n                                if ($this->readEmptyCells) {\n                                    $tmpInfo['totalRows'] = $row;\n                                } else {\n                                    $currRow = $row;\n                                }\n                                $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells);\n                                $currCells = 0;\n                            } elseif ($xml->localName == 'c' && $xml->nodeType == XMLReader::ELEMENT && $xml->namespaceURI === $mainNS) {\n                                if ($this->readEmptyCells || !$xml->isEmptyElement) {\n                                    if ($currRow !== 0) {\n                                        $tmpInfo['totalRows'] = $currRow;\n                                        $currRow = 0;\n                                    }\n                                    $cell = $xml->getAttribute('r');\n                                    $currCells = $cell ? max($currCells, Coordinate::indexesFromString($cell)[0]) : ($currCells + 1);\n                                }\n                            }\n                        }\n                        $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells);\n                        $xml->close();\n\n                        $tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1;\n                        $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1, true);\n\n                        $worksheetInfo[] = $tmpInfo;\n                    }\n                }\n            }\n        }\n\n        $zip->close();\n\n        return $worksheetInfo;\n    }\n\n    private static function castToBoolean(SimpleXMLElement $c): bool\n    {\n        $value = isset($c->v) ? (string) $c->v : null;\n        if ($value == '0') {\n            return false;\n        } elseif ($value == '1') {\n            return true;\n        }\n\n        return (bool) $c->v;\n    }\n\n    private static function castToError(?SimpleXMLElement $c): ?string\n    {\n        return isset($c, $c->v) ? (string) $c->v : null;\n    }\n\n    private static function castToString(?SimpleXMLElement $c): ?string\n    {\n        return isset($c, $c->v) ? (string) $c->v : null;\n    }\n\n    public static function replacePrefixes(string $formula): string\n    {\n        return str_replace(['_xlfn.', '_xlws.'], '', $formula);\n    }\n\n    private function castToFormula(?SimpleXMLElement $c, string $r, string &$cellDataType, mixed &$value, mixed &$calculatedValue, string $castBaseType, bool $updateSharedCells = true): void\n    {\n        if ($c === null) {\n            return;\n        }\n        $attr = $c->f->attributes();\n        $cellDataType = DataType::TYPE_FORMULA;\n        $formula = self::replacePrefixes((string) $c->f);\n        $value = \"=$formula\";\n        $calculatedValue = self::$castBaseType($c);\n\n        // Shared formula?\n        if (isset($attr['t']) && strtolower((string) $attr['t']) == 'shared') {\n            $instance = (string) $attr['si'];\n\n            if (!isset($this->sharedFormulae[(string) $attr['si']])) {\n                $this->sharedFormulae[$instance] = new SharedFormula($r, $value);\n            } elseif ($updateSharedCells === true) {\n                // It's only worth the overhead of adjusting the shared formula for this cell if we're actually loading\n                //     the cell, which may not be the case if we're using a read filter.\n                $master = Coordinate::indexesFromString($this->sharedFormulae[$instance]->master());\n                $current = Coordinate::indexesFromString($r);\n\n                $difference = [0, 0];\n                $difference[0] = $current[0] - $master[0];\n                $difference[1] = $current[1] - $master[1];\n\n                $value = $this->referenceHelper->updateFormulaReferences($this->sharedFormulae[$instance]->formula(), 'A1', $difference[0], $difference[1]);\n            }\n        }\n    }\n\n    private function fileExistsInArchive(ZipArchive $archive, string $fileName = ''): bool\n    {\n        // Root-relative paths\n        if (str_contains($fileName, '//')) {\n            $fileName = substr($fileName, strpos($fileName, '//') + 1);\n        }\n        $fileName = File::realpath($fileName);\n\n        // Sadly, some 3rd party xlsx generators don't use consistent case for filenaming\n        //    so we need to load case-insensitively from the zip file\n\n        // Apache POI fixes\n        $contents = $archive->locateName($fileName, ZipArchive::FL_NOCASE);\n        if ($contents === false) {\n            $contents = $archive->locateName(substr($fileName, 1), ZipArchive::FL_NOCASE);\n        }\n\n        return $contents !== false;\n    }\n\n    private function getFromZipArchive(ZipArchive $archive, string $fileName = ''): string\n    {\n        // Root-relative paths\n        if (str_contains($fileName, '//')) {\n            $fileName = substr($fileName, strpos($fileName, '//') + 1);\n        }\n        // Relative paths generated by dirname($filename) when $filename\n        // has no path (i.e.files in root of the zip archive)\n        $fileName = Preg::replace('/^\\.\\//', '', $fileName);\n        $fileName = File::realpath($fileName);\n\n        // Sadly, some 3rd party xlsx generators don't use consistent case for filenaming\n        //    so we need to load case-insensitively from the zip file\n\n        $contents = $archive->getFromName($fileName, 0, ZipArchive::FL_NOCASE);\n\n        // Apache POI fixes\n        if ($contents === false) {\n            $contents = $archive->getFromName(substr($fileName, 1), 0, ZipArchive::FL_NOCASE);\n        }\n\n        // Has the file been saved with Windoze directory separators rather than unix?\n        if ($contents === false) {\n            $contents = $archive->getFromName(str_replace('/', '\\\\', $fileName), 0, ZipArchive::FL_NOCASE);\n        }\n\n        return ($contents === false) ? '' : $contents;\n    }\n\n    /**\n     * Loads Spreadsheet from file.\n     */\n    protected function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        File::assertFile($filename, self::INITIAL_FILE);\n\n        // Initialisations\n        $excel = $this->newSpreadsheet();\n        $excel->setValueBinder($this->valueBinder);\n        $excel->removeSheetByIndex(0);\n        $addingFirstCellStyleXf = true;\n        $addingFirstCellXf = true;\n\n        /** @var mixed[][][][] */\n        $unparsedLoadedData = [];\n\n        $this->zip = $zip = new ZipArchive();\n        $zip->open($filename);\n\n        //    Read the theme first, because we need the colour scheme when reading the styles\n        [$workbookBasename, $xmlNamespaceBase] = $this->getWorkbookBaseName();\n        $drawingNS = self::REL_TO_DRAWING[$xmlNamespaceBase] ?? Namespaces::DRAWINGML;\n        $chartNS = self::REL_TO_CHART[$xmlNamespaceBase] ?? Namespaces::CHART;\n        $wbRels = $this->loadZip(\"xl/_rels/{$workbookBasename}.rels\", Namespaces::RELATIONSHIPS);\n        $theme = null;\n        $this->styleReader = new Styles();\n        foreach ($wbRels->Relationship as $relx) {\n            $rel = self::getAttributes($relx);\n            $relTarget = (string) $rel['Target'];\n            if (str_starts_with($relTarget, '/xl/')) {\n                $relTarget = substr($relTarget, 4);\n            }\n            switch ($rel['Type']) {\n                case \"$xmlNamespaceBase/sheetMetadata\":\n                    if ($this->fileExistsInArchive($zip, \"xl/{$relTarget}\")) {\n                        $excel->returnArrayAsArray();\n                    }\n\n                    break;\n                case \"$xmlNamespaceBase/theme\":\n                    if (!$this->fileExistsInArchive($zip, \"xl/{$relTarget}\")) {\n                        break; // issue3770\n                    }\n                    $themeOrderArray = ['lt1', 'dk1', 'lt2', 'dk2'];\n                    $themeOrderAdditional = count($themeOrderArray);\n\n                    $xmlTheme = $this->loadZip(\"xl/{$relTarget}\", $drawingNS);\n                    $xmlThemeName = self::getAttributes($xmlTheme);\n                    $xmlTheme = $xmlTheme->children($drawingNS);\n                    $themeName = (string) $xmlThemeName['name'];\n\n                    $colourScheme = self::getAttributes($xmlTheme->themeElements->clrScheme);\n                    $colourSchemeName = (string) $colourScheme['name'];\n                    $excel->getTheme()->setThemeColorName($colourSchemeName);\n                    $colourScheme = $xmlTheme->themeElements->clrScheme->children($drawingNS);\n\n                    $themeColours = [];\n                    foreach ($colourScheme as $k => $xmlColour) {\n                        $themePos = array_search($k, $themeOrderArray);\n                        if ($themePos === false) {\n                            $themePos = $themeOrderAdditional++;\n                        }\n                        if (isset($xmlColour->sysClr)) {\n                            $xmlColourData = self::getAttributes($xmlColour->sysClr);\n                            $themeColours[$themePos] = (string) $xmlColourData['lastClr'];\n                            $excel->getTheme()->setThemeColor($k, (string) $xmlColourData['lastClr']);\n                        } elseif (isset($xmlColour->srgbClr)) {\n                            $xmlColourData = self::getAttributes($xmlColour->srgbClr);\n                            $themeColours[$themePos] = (string) $xmlColourData['val'];\n                            $excel->getTheme()->setThemeColor($k, (string) $xmlColourData['val']);\n                        }\n                    }\n                    $theme = new Theme($themeName, $colourSchemeName, $themeColours);\n                    $this->styleReader->setTheme($theme);\n\n                    $fontScheme = self::getAttributes($xmlTheme->themeElements->fontScheme);\n                    $fontSchemeName = (string) $fontScheme['name'];\n                    $excel->getTheme()->setThemeFontName($fontSchemeName);\n                    $majorFonts = [];\n                    $minorFonts = [];\n                    $fontScheme = $xmlTheme->themeElements->fontScheme->children($drawingNS);\n                    $majorLatin = self::getAttributes($fontScheme->majorFont->latin)['typeface'] ?? '';\n                    $majorEastAsian = self::getAttributes($fontScheme->majorFont->ea)['typeface'] ?? '';\n                    $majorComplexScript = self::getAttributes($fontScheme->majorFont->cs)['typeface'] ?? '';\n                    $minorLatin = self::getAttributes($fontScheme->minorFont->latin)['typeface'] ?? '';\n                    $minorEastAsian = self::getAttributes($fontScheme->minorFont->ea)['typeface'] ?? '';\n                    $minorComplexScript = self::getAttributes($fontScheme->minorFont->cs)['typeface'] ?? '';\n\n                    foreach ($fontScheme->majorFont->font as $xmlFont) {\n                        $fontAttributes = self::getAttributes($xmlFont);\n                        $script = (string) ($fontAttributes['script'] ?? '');\n                        if (!empty($script)) {\n                            $majorFonts[$script] = (string) ($fontAttributes['typeface'] ?? '');\n                        }\n                    }\n                    foreach ($fontScheme->minorFont->font as $xmlFont) {\n                        $fontAttributes = self::getAttributes($xmlFont);\n                        $script = (string) ($fontAttributes['script'] ?? '');\n                        if (!empty($script)) {\n                            $minorFonts[$script] = (string) ($fontAttributes['typeface'] ?? '');\n                        }\n                    }\n                    $excel->getTheme()->setMajorFontValues($majorLatin, $majorEastAsian, $majorComplexScript, $majorFonts);\n                    $excel->getTheme()->setMinorFontValues($minorLatin, $minorEastAsian, $minorComplexScript, $minorFonts);\n\n                    break;\n            }\n        }\n\n        $rels = $this->loadZip(self::INITIAL_FILE, Namespaces::RELATIONSHIPS);\n\n        $propertyReader = new PropertyReader($this->getSecurityScannerOrThrow(), $excel->getProperties());\n        $charts = $chartDetails = [];\n        foreach ($rels->Relationship as $relx) {\n            $rel = self::getAttributes($relx);\n            $relTarget = (string) $rel['Target'];\n            // issue 3553\n            if ($relTarget[0] === '/') {\n                $relTarget = substr($relTarget, 1);\n            }\n            $relType = (string) $rel['Type'];\n            $mainNS = self::REL_TO_MAIN[$relType] ?? Namespaces::MAIN;\n            switch ($relType) {\n                case Namespaces::CORE_PROPERTIES:\n                    $propertyReader->readCoreProperties($this->getFromZipArchive($zip, $relTarget));\n\n                    break;\n                case \"$xmlNamespaceBase/extended-properties\":\n                    $propertyReader->readExtendedProperties($this->getFromZipArchive($zip, $relTarget));\n\n                    break;\n                case \"$xmlNamespaceBase/custom-properties\":\n                    $propertyReader->readCustomProperties($this->getFromZipArchive($zip, $relTarget));\n\n                    break;\n                    //Ribbon\n                case Namespaces::EXTENSIBILITY:\n                    $customUI = $relTarget;\n                    if ($customUI) {\n                        $this->readRibbon($excel, $customUI, $zip);\n                    }\n\n                    break;\n                case \"$xmlNamespaceBase/officeDocument\":\n                    $dir = dirname($relTarget);\n\n                    // Do not specify namespace in next stmt - do it in Xpath\n                    $relsWorkbook = $this->loadZip(\"$dir/_rels/\" . basename($relTarget) . '.rels', Namespaces::RELATIONSHIPS);\n                    $relsWorkbook->registerXPathNamespace('rel', Namespaces::RELATIONSHIPS);\n\n                    $worksheets = [];\n                    $macros = $customUI = null;\n                    foreach ($relsWorkbook->Relationship as $elex) {\n                        $ele = self::getAttributes($elex);\n                        switch ($ele['Type']) {\n                            case Namespaces::WORKSHEET:\n                            case Namespaces::PURL_WORKSHEET:\n                                $worksheets[(string) $ele['Id']] = $ele['Target'];\n\n                                break;\n                            case Namespaces::CHARTSHEET:\n                                if ($this->includeCharts === true) {\n                                    $worksheets[(string) $ele['Id']] = $ele['Target'];\n                                }\n\n                                break;\n                                // a vbaProject ? (: some macros)\n                            case Namespaces::VBA:\n                                $macros = $ele['Target'];\n\n                                break;\n                        }\n                    }\n\n                    if ($macros !== null) {\n                        $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin'); //vbaProject.bin always in 'xl' dir and always named vbaProject.bin\n                        if (!empty($macrosCode)) {\n                            $excel->setMacrosCode($macrosCode);\n                            $excel->setHasMacros(true);\n                            //short-circuit : not reading vbaProject.bin.rel to get Signature =>allways vbaProjectSignature.bin in 'xl' dir\n                            $Certificate = $this->getFromZipArchive($zip, 'xl/vbaProjectSignature.bin');\n                            $excel->setMacrosCertificate($Certificate);\n                        }\n                    }\n\n                    $relType = \"rel:Relationship[@Type='\"\n                        . \"$xmlNamespaceBase/styles\"\n                        . \"']\";\n                    /** @var ?SimpleXMLElement */\n                    $xpath = self::getArrayItem(self::xpathNoFalse($relsWorkbook, $relType));\n\n                    if ($xpath === null) {\n                        $xmlStyles = self::testSimpleXml(null);\n                    } else {\n                        $stylesTarget = (string) $xpath['Target'];\n                        $stylesTarget = str_starts_with($stylesTarget, '/') ? substr($stylesTarget, 1) : \"$dir/$stylesTarget\";\n                        $xmlStyles = $this->loadZip($stylesTarget, $mainNS);\n                    }\n\n                    $palette = self::extractPalette($xmlStyles);\n                    $this->styleReader->setWorkbookPalette($palette);\n                    $fills = self::extractStyles($xmlStyles, 'fills', 'fill');\n                    $fonts = self::extractStyles($xmlStyles, 'fonts', 'font');\n                    $borders = self::extractStyles($xmlStyles, 'borders', 'border');\n                    $xfTags = self::extractStyles($xmlStyles, 'cellXfs', 'xf');\n                    $cellXfTags = self::extractStyles($xmlStyles, 'cellStyleXfs', 'xf');\n\n                    $styles = [];\n                    $cellStyles = [];\n                    $numFmts = null;\n                    if (/*$xmlStyles && */ $xmlStyles->numFmts[0]) {\n                        $numFmts = $xmlStyles->numFmts[0];\n                    }\n                    if (isset($numFmts)) {\n                        /** @var SimpleXMLElement $numFmts */\n                        $numFmts->registerXPathNamespace('sml', $mainNS);\n                    }\n                    $this->styleReader->setNamespace($mainNS);\n                    if (!$this->readDataOnly/* && $xmlStyles*/) {\n                        foreach ($xfTags as $xfTag) {\n                            /** @var SimpleXMLElement $xfTag */\n                            $xf = self::getAttributes($xfTag);\n                            $numFmt = null;\n\n                            if ($xf['numFmtId']) {\n                                if (isset($numFmts)) {\n                                    /** @var ?SimpleXMLElement */\n                                    $tmpNumFmt = self::getArrayItem($numFmts->xpath(\"sml:numFmt[@numFmtId=$xf[numFmtId]]\"));\n\n                                    if (isset($tmpNumFmt['formatCode'])) {\n                                        $numFmt = (string) $tmpNumFmt['formatCode'];\n                                    }\n                                }\n\n                                // We shouldn't override any of the built-in MS Excel values (values below id 164)\n                                //  But there's a lot of naughty homebrew xlsx writers that do use \"reserved\" id values that aren't actually used\n                                //  So we make allowance for them rather than lose formatting masks\n                                if (\n                                    $numFmt === null\n                                    && (int) $xf['numFmtId'] < 164\n                                    && NumberFormat::builtInFormatCode((int) $xf['numFmtId']) !== ''\n                                ) {\n                                    $numFmt = NumberFormat::builtInFormatCode((int) $xf['numFmtId']);\n                                }\n                            }\n                            $quotePrefix = (bool) (string) ($xf['quotePrefix'] ?? '');\n\n                            $style = (object) [\n                                'numFmt' => $numFmt ?? NumberFormat::FORMAT_GENERAL,\n                                'font' => $fonts[(int) ($xf['fontId'])],\n                                'fill' => $fills[(int) ($xf['fillId'])],\n                                'border' => $borders[(int) ($xf['borderId'])],\n                                'alignment' => $xfTag->alignment,\n                                'protection' => $xfTag->protection,\n                                'quotePrefix' => $quotePrefix,\n                            ];\n                            $styles[] = $style;\n\n                            // add style to cellXf collection\n                            $objStyle = new Style();\n                            $this->styleReader\n                                ->readStyle($objStyle, $style);\n                            if (isset($xfTag->extLst)) {\n                                foreach ($xfTag->extLst->ext as $extTag) {\n                                    $attributes = $extTag->attributes();\n                                    if (isset($attributes['uri'])) {\n                                        if ((string) $attributes['uri'] === Namespaces::STYLE_CHECKBOX_URI) {\n                                            $objStyle->setCheckBox(true);\n                                        }\n                                    }\n                                }\n                            }\n                            foreach ($this->styleReader->getFontCharsets() as $fontName => $charset) {\n                                $excel->addFontCharset($fontName, $charset);\n                            }\n                            if ($addingFirstCellXf) {\n                                $excel->removeCellXfByIndex(0); // remove the default style\n                                $addingFirstCellXf = false;\n                            }\n                            $excel->addCellXf($objStyle);\n                        }\n\n                        foreach ($cellXfTags as $xfTag) {\n                            /** @var SimpleXMLElement $xfTag */\n                            $xf = self::getAttributes($xfTag);\n                            $numFmt = NumberFormat::FORMAT_GENERAL;\n                            if ($numFmts && $xf['numFmtId']) {\n                                /** @var ?SimpleXMLElement */\n                                $tmpNumFmt = self::getArrayItem($numFmts->xpath(\"sml:numFmt[@numFmtId=$xf[numFmtId]]\"));\n                                if (isset($tmpNumFmt['formatCode'])) {\n                                    $numFmt = (string) $tmpNumFmt['formatCode'];\n                                } elseif ((int) $xf['numFmtId'] < 165) {\n                                    $numFmt = NumberFormat::builtInFormatCode((int) $xf['numFmtId']);\n                                }\n                            }\n\n                            $quotePrefix = (bool) (string) ($xf['quotePrefix'] ?? '');\n\n                            $cellStyle = (object) [\n                                'numFmt' => $numFmt,\n                                'font' => $fonts[(int) ($xf['fontId'])],\n                                'fill' => $fills[((int) $xf['fillId'])],\n                                'border' => $borders[(int) ($xf['borderId'])],\n                                'alignment' => $xfTag->alignment,\n                                'protection' => $xfTag->protection,\n                                'quotePrefix' => $quotePrefix,\n                            ];\n                            $cellStyles[] = $cellStyle;\n\n                            // add style to cellStyleXf collection\n                            $objStyle = new Style();\n                            $this->styleReader->readStyle($objStyle, $cellStyle);\n                            if ($addingFirstCellStyleXf) {\n                                $excel->removeCellStyleXfByIndex(0); // remove the default style\n                                $addingFirstCellStyleXf = false;\n                            }\n                            $excel->addCellStyleXf($objStyle);\n                        }\n                    }\n                    $this->styleReader->setStyleXml($xmlStyles);\n                    $this->styleReader->setNamespace($mainNS);\n                    $this->styleReader->setStyleBaseData($theme, $styles, $cellStyles);\n                    $dxfs = $this->styleReader->dxfs($this->readDataOnly);\n                    $tableStyles = $this->styleReader->tableStyles($this->readDataOnly);\n                    $styles = $this->styleReader->styles();\n\n                    // Read content after setting the styles\n                    $sharedStrings = [];\n                    $relType = \"rel:Relationship[@Type='\"\n                        //. Namespaces::SHARED_STRINGS\n                        . \"$xmlNamespaceBase/sharedStrings\"\n                        . \"']\";\n                    /** @var ?SimpleXMLElement */\n                    $xpath = self::getArrayItem($relsWorkbook->xpath($relType));\n\n                    if ($xpath) {\n                        $sharedStringsTarget = (string) $xpath['Target'];\n                        $sharedStringsTarget = str_starts_with($sharedStringsTarget, '/') ? substr($sharedStringsTarget, 1) : \"$dir/$sharedStringsTarget\";\n                        $xmlStrings = $this->loadZip($sharedStringsTarget, $mainNS);\n                        if (isset($xmlStrings->si)) {\n                            foreach ($xmlStrings->si as $val) {\n                                if (isset($val->t)) {\n                                    $sharedStrings[] = StringHelper::controlCharacterOOXML2PHP((string) $val->t);\n                                } elseif (isset($val->r)) {\n                                    $sharedStrings[] = $this->parseRichText($val);\n                                } else {\n                                    $sharedStrings[] = '';\n                                }\n                            }\n                        }\n                    }\n\n                    $xmlWorkbook = $this->loadZipNoNamespace($relTarget, $mainNS);\n                    $xmlWorkbookNS = $this->loadZip($relTarget, $mainNS);\n\n                    // Set base date\n                    $excel->setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n                    if ($xmlWorkbookNS->workbookPr) {\n                        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n                        $attrs1904 = self::getAttributes($xmlWorkbookNS->workbookPr);\n                        if (isset($attrs1904['date1904'])) {\n                            if (self::boolean((string) $attrs1904['date1904'])) {\n                                Date::setExcelCalendar(Date::CALENDAR_MAC_1904);\n                                $excel->setExcelCalendar(Date::CALENDAR_MAC_1904);\n                            }\n                        }\n                    }\n\n                    // Set protection\n                    $this->readProtection($excel, $xmlWorkbook);\n\n                    $sheetId = 0; // keep track of new sheet id in final workbook\n                    $oldSheetId = -1; // keep track of old sheet id in final workbook\n                    $countSkippedSheets = 0; // keep track of number of skipped sheets\n                    $mapSheetId = []; // mapping of sheet ids from old to new\n\n                    $charts = $chartDetails = [];\n\n                    // Add richData (contains relation of in-cell images)\n                    $richData = [];\n                    $relationsFileName = $dir . '/richData/_rels/richValueRel.xml.rels';\n                    if ($zip->locateName($relationsFileName)) {\n                        $relsWorksheet = $this->loadZip($relationsFileName, Namespaces::RELATIONSHIPS);\n                        foreach ($relsWorksheet->Relationship as $elex) {\n                            $ele = self::getAttributes($elex);\n                            if ($ele['Type'] == Namespaces::IMAGE) {\n                                $richData['image'][(string) $ele['Id']] = (string) $ele['Target'];\n                            }\n                        }\n                    }\n\n                    $sheetCreated = false;\n                    if ($xmlWorkbookNS->sheets) {\n                        foreach ($xmlWorkbookNS->sheets->sheet as $eleSheet) {\n                            $eleSheetAttr = self::getAttributes($eleSheet);\n                            ++$oldSheetId;\n\n                            // Check if sheet should be skipped\n                            if (is_array($this->loadSheetsOnly) && !in_array((string) $eleSheetAttr['name'], $this->loadSheetsOnly)) {\n                                ++$countSkippedSheets;\n                                $mapSheetId[$oldSheetId] = null;\n\n                                continue;\n                            }\n\n                            $sheetReferenceId = self::getArrayItemString(self::getAttributes($eleSheet, $xmlNamespaceBase), 'id');\n                            if (isset($worksheets[$sheetReferenceId]) === false) {\n                                ++$countSkippedSheets;\n                                $mapSheetId[$oldSheetId] = null;\n\n                                continue;\n                            }\n                            // Map old sheet id in original workbook to new sheet id.\n                            // They will differ if loadSheetsOnly() is being used\n                            $mapSheetId[$oldSheetId] = $oldSheetId - $countSkippedSheets;\n\n                            // Load sheet\n                            $docSheet = $excel->createSheet();\n                            $sheetCreated = true;\n                            //    Use false for $updateFormulaCellReferences to prevent adjustment of worksheet\n                            //        references in formula cells... during the load, all formulae should be correct,\n                            //        and we're simply bringing the worksheet name in line with the formula, not the\n                            //        reverse\n                            $docSheet->setTitle((string) $eleSheetAttr['name'], false, false);\n\n                            $fileWorksheet = (string) $worksheets[$sheetReferenceId];\n                            // issue 3665 adds test for /.\n                            // This broke XlsxRootZipFilesTest,\n                            //  but Excel reports an error with that file.\n                            //  Testing dir for . avoids this problem.\n                            //  It might be better just to drop the test.\n                            if ($fileWorksheet[0] == '/' && $dir !== '.') {\n                                $fileWorksheet = substr($fileWorksheet, strlen($dir) + 2);\n                            }\n                            $xmlSheet = $this->loadZipNoNamespace(\"$dir/$fileWorksheet\", $mainNS);\n                            $xmlSheetNS = $this->loadZip(\"$dir/$fileWorksheet\", $mainNS);\n\n                            // Shared Formula table is unique to each Worksheet, so we need to reset it here\n                            $this->sharedFormulae = [];\n\n                            if (isset($eleSheetAttr['state']) && (string) $eleSheetAttr['state'] != '') {\n                                $docSheet->setSheetState((string) $eleSheetAttr['state']);\n                            }\n                            if ($xmlSheetNS) {\n                                $xmlSheetMain = $xmlSheetNS->children($mainNS);\n                                // Setting Conditional Styles adjusts selected cells, so we need to execute this\n                                //    before reading the sheet view data to get the actual selected cells\n                                if (!$this->readDataOnly && ($xmlSheet->conditionalFormatting)) {\n                                    (new ConditionalStyles($docSheet, $xmlSheet, $dxfs, $this->styleReader))->load();\n                                }\n                                if (!$this->readDataOnly && $xmlSheet->extLst) {\n                                    (new ConditionalStyles($docSheet, $xmlSheet, $dxfs, $this->styleReader))->loadFromExt();\n                                }\n                                if (isset($xmlSheetMain->sheetViews, $xmlSheetMain->sheetViews->sheetView)) {\n                                    $sheetViews = new SheetViews($xmlSheetMain->sheetViews->sheetView, $docSheet);\n                                    $sheetViews->load();\n                                }\n\n                                $sheetViewOptions = new SheetViewOptions($docSheet, $xmlSheetNS);\n                                $sheetViewOptions->load($this->readDataOnly, $this->styleReader);\n\n                                (new ColumnAndRowAttributes($docSheet, $xmlSheetNS))\n                                    ->load($this->getReadFilter(), $this->readDataOnly, $this->ignoreRowsWithNoCells);\n                            }\n\n                            $holdSelectedCells = $docSheet->getSelectedCells();\n                            if ($xmlSheetNS && $xmlSheetNS->sheetData && $xmlSheetNS->sheetData->row) {\n                                $cIndex = 1; // Cell Start from 1\n                                foreach ($xmlSheetNS->sheetData->row as $row) {\n                                    $rowIndex = 1;\n                                    foreach ($row->c as $c) {\n                                        $cAttr = self::getAttributes($c);\n                                        $r = (string) $cAttr['r'];\n                                        if ($r == '') {\n                                            $r = Coordinate::stringFromColumnIndex($rowIndex) . $cIndex;\n                                        }\n                                        $cellDataType = (string) $cAttr['t'];\n                                        $originalCellDataTypeNumeric = $cellDataType === '';\n                                        $value = null;\n                                        $calculatedValue = null;\n\n                                        // Read cell?\n                                        $coordinates = Coordinate::coordinateFromString($r);\n\n                                        if (!$this->getReadFilter()->readCell($coordinates[0], (int) $coordinates[1], $docSheet->getTitle())) {\n                                            // Normally, just testing for the f attribute should identify this cell as containing a formula\n                                            // that we need to read, even though it is outside of the filter range, in case it is a shared formula.\n                                            // But in some cases, this attribute isn't set; so we need to delve a level deeper and look at\n                                            // whether or not the cell has a child formula element that is shared.\n                                            if (isset($cAttr->f) || (isset($c->f, $c->f->attributes()['t']) && strtolower((string) $c->f->attributes()['t']) === 'shared')) {\n                                                $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToError', false);\n                                            }\n                                            ++$rowIndex;\n\n                                            continue;\n                                        }\n\n                                        // Read cell!\n                                        $useFormula = isset($c->f)\n                                            && ((string) $c->f !== '' || (isset($c->f->attributes()['t']) && strtolower((string) $c->f->attributes()['t']) === 'shared'));\n                                        switch ($cellDataType) {\n                                            case DataType::TYPE_STRING:\n                                                if ((string) $c->v != '') {\n                                                    $value = $sharedStrings[(int) ($c->v)];\n\n                                                    if ($value instanceof RichText) {\n                                                        $value = clone $value;\n                                                    }\n                                                } else {\n                                                    $value = '';\n                                                }\n\n                                                break;\n                                            case DataType::TYPE_BOOL:\n                                                if (!$useFormula) {\n                                                    if (isset($c->v)) {\n                                                        $value = self::castToBoolean($c);\n                                                    } else {\n                                                        $value = null;\n                                                        $cellDataType = DataType::TYPE_NULL;\n                                                    }\n                                                } else {\n                                                    // Formula\n                                                    $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToBoolean');\n                                                    self::storeFormulaAttributes($c->f, $docSheet, $r);\n                                                }\n\n                                                break;\n                                            case DataType::TYPE_STRING2:\n                                                if ($useFormula) {\n                                                    $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToString');\n                                                    self::storeFormulaAttributes($c->f, $docSheet, $r);\n                                                } else {\n                                                    $value = self::castToString($c);\n                                                }\n\n                                                break;\n                                            case DataType::TYPE_INLINE:\n                                                if ($useFormula) {\n                                                    $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToError');\n                                                    self::storeFormulaAttributes($c->f, $docSheet, $r);\n                                                } else {\n                                                    $value = $this->parseRichText($c->is);\n                                                }\n\n                                                break;\n                                            case DataType::TYPE_ERROR:\n                                                if (isset($cAttr->vm, $richData['image']['rId' . $cAttr->vm]) && !$useFormula) {\n                                                    $imagePath = $dir . '/' . str_replace('../', '', $richData['image']['rId' . $cAttr->vm]);\n                                                    $objDrawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing();\n                                                    $objDrawing->setPath(\n                                                        'zip://' . File::realpath($filename) . '#' . $imagePath,\n                                                        false,\n                                                        $zip\n                                                    );\n\n                                                    $objDrawing->setCoordinates($r);\n                                                    $objDrawing->setResizeProportional(false);\n                                                    $objDrawing->setInCell(true);\n                                                    $objDrawing->setWorksheet($docSheet);\n\n                                                    $value = $objDrawing;\n                                                    $cellDataType = DataType::TYPE_DRAWING_IN_CELL;\n                                                    $c->t = DataType::TYPE_ERROR;\n\n                                                    break;\n                                                }\n\n                                                if (!$useFormula) {\n                                                    $value = self::castToError($c);\n                                                } else {\n                                                    // Formula\n                                                    $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToError');\n                                                    $eattr = $c->attributes();\n                                                    if (isset($eattr['vm'])) {\n                                                        if ($calculatedValue === ExcelError::VALUE()) {\n                                                            $calculatedValue = ExcelError::SPILL();\n                                                        }\n                                                    }\n                                                }\n\n                                                break;\n                                            default:\n                                                if (!$useFormula) {\n                                                    $value = self::castToString($c);\n                                                    if (is_numeric($value)) {\n                                                        $value += 0;\n                                                        $cellDataType = DataType::TYPE_NUMERIC;\n                                                    }\n                                                } else {\n                                                    // Formula\n                                                    $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToString');\n                                                    if (is_numeric($calculatedValue)) {\n                                                        $calculatedValue += 0;\n                                                    }\n                                                    self::storeFormulaAttributes($c->f, $docSheet, $r);\n                                                }\n\n                                                break;\n                                        }\n\n                                        // read empty cells or the cells are not empty\n                                        if ($this->readEmptyCells || ($value !== null && $value !== '')) {\n                                            // Rich text?\n                                            if ($value instanceof RichText && $this->readDataOnly) {\n                                                $value = $value->getPlainText();\n                                            }\n\n                                            $cell = $docSheet->getCell($r);\n                                            // Assign value\n                                            if ($cellDataType != '') {\n                                                // it is possible, that datatype is numeric but with an empty string, which result in an error\n                                                if ($cellDataType === DataType::TYPE_NUMERIC && ($value === '' || $value === null)) {\n                                                    $cellDataType = DataType::TYPE_NULL;\n                                                }\n                                                if ($cellDataType !== DataType::TYPE_NULL) {\n                                                    $cell->setValueExplicit($value, $cellDataType);\n                                                }\n                                            } else {\n                                                $cell->setValue($value);\n                                            }\n                                            if ($calculatedValue !== null) {\n                                                $cell->setCalculatedValue($calculatedValue, $originalCellDataTypeNumeric);\n                                            }\n\n                                            // Style information?\n                                            if (!$this->readDataOnly) {\n                                                $cAttrS = (int) ($cAttr['s'] ?? 0);\n                                                // no style index means 0, it seems\n                                                $cAttrS = isset($styles[$cAttrS]) ? $cAttrS : 0;\n                                                $cell->setXfIndex($cAttrS);\n                                                // issue 3495\n                                                if ($cellDataType === DataType::TYPE_FORMULA && $styles[$cAttrS]->quotePrefix === true) { //* @phpstan-ignore-line\n                                                    $holdSelected = $docSheet->getSelectedCells();\n                                                    $cell->getStyle()->setQuotePrefix(false);\n                                                    $docSheet->setSelectedCells($holdSelected);\n                                                }\n                                            }\n                                        }\n                                        ++$rowIndex;\n                                    }\n                                    ++$cIndex;\n                                }\n                            }\n                            $docSheet->setSelectedCells($holdSelectedCells);\n                            if (!$this->readDataOnly && $xmlSheetNS && $xmlSheetNS->ignoredErrors) {\n                                foreach ($xmlSheetNS->ignoredErrors->ignoredError as $ignoredError) {\n                                    $this->processIgnoredErrors($ignoredError, $docSheet);\n                                }\n                            }\n\n                            if (!$this->readDataOnly && $xmlSheetNS && $xmlSheetNS->sheetProtection) {\n                                $protAttr = $xmlSheetNS->sheetProtection->attributes() ?? [];\n                                foreach ($protAttr as $key => $value) {\n                                    $method = 'set' . ucfirst($key);\n                                    $docSheet->getProtection()->$method(self::boolean((string) $value));\n                                }\n                            }\n\n                            if ($xmlSheet) {\n                                $this->readSheetProtection($docSheet, $xmlSheet);\n                            }\n\n                            if ($this->readDataOnly === false) {\n                                $this->readAutoFilter($xmlSheetNS, $docSheet);\n                                $this->readBackgroundImage($xmlSheetNS, $docSheet, dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels');\n                            }\n\n                            $this->readTables($xmlSheetNS, $docSheet, $dir, $fileWorksheet, $zip, $mainNS, $tableStyles, $dxfs);\n\n                            if ($xmlSheetNS && $xmlSheetNS->mergeCells && $xmlSheetNS->mergeCells->mergeCell && !$this->readDataOnly) {\n                                foreach ($xmlSheetNS->mergeCells->mergeCell as $mergeCellx) {\n                                    $mergeCell = $mergeCellx->attributes();\n                                    $mergeRef = (string) ($mergeCell['ref'] ?? '');\n                                    if (str_contains($mergeRef, ':')) {\n                                        $docSheet->mergeCells($mergeRef, Worksheet::MERGE_CELL_CONTENT_HIDE);\n                                    }\n                                }\n                            }\n\n                            if ($xmlSheet && !$this->readDataOnly) {\n                                $unparsedLoadedData = (new PageSetup($docSheet, $xmlSheet))->load($unparsedLoadedData);\n                            }\n\n                            if (isset($xmlSheet->extLst->ext)) {\n                                foreach ($xmlSheet->extLst->ext as $extlst) {\n                                    $extAttrs = $extlst->attributes() ?? [];\n                                    $extUri = (string) ($extAttrs['uri'] ?? '');\n                                    if ($extUri !== '{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}') {\n                                        continue;\n                                    }\n                                    // Create dataValidations node if does not exists, maybe is better inside the foreach ?\n                                    if (!$xmlSheet->dataValidations) {\n                                        $xmlSheet->addChild('dataValidations');\n                                    }\n\n                                    foreach ($extlst->children(Namespaces::DATA_VALIDATIONS1)->dataValidations->dataValidation as $item) {\n                                        $item = self::testSimpleXml($item);\n                                        $node = self::testSimpleXml($xmlSheet->dataValidations)->addChild('dataValidation');\n                                        foreach ($item->attributes() ?? [] as $attr) {\n                                            $node->addAttribute($attr->getName(), $attr);\n                                        }\n                                        $node->addAttribute('sqref', $item->children(Namespaces::DATA_VALIDATIONS2)->sqref);\n                                        if (isset($item->formula1)) {\n                                            $childNode = $node->addChild('formula1');\n                                            if ($childNode !== null) { // null should never happen\n                                                // see https://github.com/phpstan/phpstan/issues/8236\n                                                // resolved with Phpstan 2.1.23\n                                                $childNode[0] = (string) $item->formula1->children(Namespaces::DATA_VALIDATIONS2)->f;\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n\n                            if ($xmlSheet && $xmlSheet->dataValidations && !$this->readDataOnly) {\n                                (new DataValidations($docSheet, $xmlSheet))->load();\n                            }\n\n                            // unparsed sheet AlternateContent\n                            if ($xmlSheet && !$this->readDataOnly) {\n                                $mc = $xmlSheet->children(Namespaces::COMPATIBILITY);\n                                if ($mc->AlternateContent) {\n                                    foreach ($mc->AlternateContent as $alternateContent) {\n                                        $alternateContent = self::testSimpleXml($alternateContent);\n                                        /** @var mixed[][][][] $unparsedLoadedData */\n                                        $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['AlternateContents'][] = $alternateContent->asXML();\n                                    }\n                                }\n                            }\n\n                            // Add hyperlinks\n                            if (!$this->readDataOnly) {\n                                $hyperlinkReader = new Hyperlinks($docSheet);\n                                // Locate hyperlink relations\n                                $relationsFileName = dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels';\n                                if ($zip->locateName($relationsFileName) !== false) {\n                                    $relsWorksheet = $this->loadZip($relationsFileName, Namespaces::RELATIONSHIPS);\n                                    $hyperlinkReader->readHyperlinks($relsWorksheet);\n                                }\n\n                                // Loop through hyperlinks\n                                if ($xmlSheetNS && $xmlSheetNS->children($mainNS)->hyperlinks) {\n                                    $hyperlinkReader->setHyperlinks($xmlSheetNS->children($mainNS)->hyperlinks);\n                                }\n                            }\n\n                            // Add comments\n                            $comments = [];\n                            $vmlComments = [];\n                            if (!$this->readDataOnly) {\n                                // Locate comment relations\n                                $commentRelations = dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels';\n                                if ($zip->locateName($commentRelations) !== false) {\n                                    $relsWorksheet = $this->loadZip($commentRelations, Namespaces::RELATIONSHIPS);\n                                    foreach ($relsWorksheet->Relationship as $elex) {\n                                        $ele = self::getAttributes($elex);\n                                        if ($ele['Type'] == Namespaces::COMMENTS) {\n                                            $comments[(string) $ele['Id']] = (string) $ele['Target'];\n                                        }\n                                        if ($ele['Type'] == Namespaces::VML) {\n                                            $vmlComments[(string) $ele['Id']] = (string) $ele['Target'];\n                                        }\n                                    }\n                                }\n\n                                // Loop through comments\n                                foreach ($comments as $relName => $relPath) {\n                                    // Load comments file\n                                    $relPath = File::realpath(dirname(\"$dir/$fileWorksheet\") . '/' . $relPath);\n                                    // okay to ignore namespace - using xpath\n                                    $commentsFile = $this->loadZip($relPath, '');\n\n                                    // Utility variables\n                                    $authors = [];\n                                    $commentsFile->registerXpathNamespace('com', $mainNS);\n                                    $authorPath = self::xpathNoFalse($commentsFile, 'com:authors/com:author');\n                                    foreach ($authorPath as $author) {\n                                        /** @var SimpleXMLElement $author */\n                                        $authors[] = (string) $author;\n                                    }\n\n                                    // Loop through contents\n                                    $contentPath = self::xpathNoFalse($commentsFile, 'com:commentList/com:comment');\n                                    foreach ($contentPath as $comment) {\n                                        /** @var SimpleXMLElement $comment */\n                                        $commentx = $comment->attributes();\n                                        /** @var array{ref: scalar, authorId?: scalar}  $commentx */\n                                        $commentModel = $docSheet->getComment((string) $commentx['ref']);\n                                        if (isset($commentx['authorId'])) {\n                                            $commentModel->setAuthor($authors[(int) $commentx['authorId']]);\n                                        }\n                                        /** @var SimpleXMLElement */\n                                        $temp = $comment->children($mainNS);\n                                        $commentModel->setText($this->parseRichText($temp->text));\n                                    }\n                                }\n\n                                // later we will remove from it real vmlComments\n                                $unparsedVmlDrawings = $vmlComments;\n                                $vmlDrawingContents = [];\n\n                                // Loop through VML comments\n                                foreach ($vmlComments as $relName => $relPath) {\n                                    // Load VML comments file\n                                    $relPath = File::realpath(dirname(\"$dir/$fileWorksheet\") . '/' . $relPath);\n\n                                    try {\n                                        // no namespace okay - processed with Xpath\n                                        $vmlCommentsFile = $this->loadZip($relPath, '', true);\n                                        $vmlCommentsFile->registerXPathNamespace('v', Namespaces::URN_VML);\n                                    } catch (Throwable) {\n                                        //Ignore unparsable vmlDrawings. Later they will be moved from $unparsedVmlDrawings to $unparsedLoadedData\n                                        continue;\n                                    }\n\n                                    // Locate VML drawings image relations\n                                    $drowingImages = [];\n                                    $VMLDrawingsRelations = dirname($relPath) . '/_rels/' . basename($relPath) . '.rels';\n                                    $vmlDrawingContents[$relName] = $this->getSecurityScannerOrThrow()->scan($this->getFromZipArchive($zip, $relPath));\n                                    if ($zip->locateName($VMLDrawingsRelations) !== false) {\n                                        $relsVMLDrawing = $this->loadZip($VMLDrawingsRelations, Namespaces::RELATIONSHIPS);\n                                        foreach ($relsVMLDrawing->Relationship as $elex) {\n                                            $ele = self::getAttributes($elex);\n                                            if ($ele['Type'] == Namespaces::IMAGE) {\n                                                $drowingImages[(string) $ele['Id']] = (string) $ele['Target'];\n                                            }\n                                        }\n                                    }\n\n                                    $shapes = self::xpathNoFalse($vmlCommentsFile, '//v:shape');\n                                    foreach ($shapes as $shape) {\n                                        /** @var SimpleXMLElement $shape */\n                                        $vmlNamespaces = $shape->getNamespaces();\n                                        $shape->registerXPathNamespace('v', $vmlNamespaces['v'] ?? Namespaces::URN_VML);\n                                        $shape->registerXPathNamespace('x', $vmlNamespaces['x'] ?? Namespaces::URN_EXCEL);\n                                        $shape->registerXPathNamespace('o', $vmlNamespaces['o'] ?? Namespaces::URN_MSOFFICE);\n\n                                        if (isset($shape['style'])) {\n                                            $style = (string) $shape['style'];\n                                            $fillColor = strtoupper(substr((string) $shape['fillcolor'], 1));\n                                            $column = null;\n                                            $row = null;\n                                            $textHAlign = null;\n                                            $fillImageRelId = null;\n                                            $fillImageTitle = '';\n\n                                            $clientData = $shape->xpath('.//x:ClientData');\n                                            $textboxDirection = '';\n                                            $textboxPath = $shape->xpath('.//v:textbox');\n                                            $textbox = (string) ($textboxPath[0]['style'] ?? '');\n                                            if (Preg::isMatch('/rtl/i', $textbox)) {\n                                                $textboxDirection = Comment::TEXTBOX_DIRECTION_RTL;\n                                            } elseif (Preg::isMatch('/ltr/i', $textbox)) {\n                                                $textboxDirection = Comment::TEXTBOX_DIRECTION_LTR;\n                                            }\n                                            if (is_array($clientData) && !empty($clientData)) {\n                                                /** @var SimpleXMLElement */\n                                                $clientData = $clientData[0];\n\n                                                if (isset($clientData['ObjectType']) && (string) $clientData['ObjectType'] == 'Note') {\n                                                    $clientData->registerXPathNamespace('x', $vmlNamespaces['x'] ?? Namespaces::URN_EXCEL);\n                                                    $temp = $clientData->xpath('.//x:Row');\n                                                    if (is_array($temp)) {\n                                                        $row = $temp[0];\n                                                    }\n\n                                                    $temp = $clientData->xpath('.//x:Column');\n                                                    if (is_array($temp)) {\n                                                        $column = $temp[0];\n                                                    }\n                                                    $temp = $clientData->xpath('.//x:TextHAlign');\n                                                    if (!empty($temp)) {\n                                                        $textHAlign = strtolower($temp[0]);\n                                                    }\n                                                }\n                                            }\n                                            $rowx = (string) $row;\n                                            $colx = (string) $column;\n                                            if (is_numeric($rowx) && is_numeric($colx) && $textHAlign !== null) {\n                                                $docSheet->getComment([1 + (int) $colx, 1 + (int) $rowx], false)->setAlignment((string) $textHAlign);\n                                            }\n                                            if (is_numeric($rowx) && is_numeric($colx) && $textboxDirection !== '') {\n                                                $docSheet->getComment([1 + (int) $colx, 1 + (int) $rowx], false)->setTextboxDirection($textboxDirection);\n                                            }\n\n                                            $fillImageRelNode = $shape->xpath('.//v:fill/@o:relid');\n                                            if (is_array($fillImageRelNode) && !empty($fillImageRelNode)) {\n                                                /** @var SimpleXMLElement */\n                                                $fillImageRelNode = $fillImageRelNode[0];\n\n                                                if (isset($fillImageRelNode['relid'])) {\n                                                    $fillImageRelId = (string) $fillImageRelNode['relid'];\n                                                }\n                                            }\n\n                                            $fillImageTitleNode = $shape->xpath('.//v:fill/@o:title');\n                                            if (is_array($fillImageTitleNode) && !empty($fillImageTitleNode)) {\n                                                /** @var SimpleXMLElement */\n                                                $fillImageTitleNode = $fillImageTitleNode[0];\n\n                                                if (isset($fillImageTitleNode['title'])) {\n                                                    $fillImageTitle = (string) $fillImageTitleNode['title'];\n                                                }\n                                            }\n\n                                            if (($column !== null) && ($row !== null)) {\n                                                // Set comment properties\n                                                $comment = $docSheet->getComment([(int) $column + 1, (int) $row + 1]);\n                                                $comment->getFillColor()->setRGB($fillColor);\n                                                if (isset($fillImageRelId, $drowingImages[$fillImageRelId])) {\n                                                    $objDrawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing();\n                                                    $objDrawing->setName($fillImageTitle);\n                                                    $imagePath = str_replace(['../', '/xl/'], 'xl/', $drowingImages[$fillImageRelId]);\n                                                    $objDrawing->setPath(\n                                                        'zip://' . File::realpath($filename) . '#' . $imagePath,\n                                                        true,\n                                                        $zip\n                                                    );\n                                                    $comment->setBackgroundImage($objDrawing);\n                                                }\n\n                                                // Parse style\n                                                $styleArray = explode(';', str_replace(' ', '', $style));\n                                                foreach ($styleArray as $stylePair) {\n                                                    $stylePair = explode(':', $stylePair);\n\n                                                    if ($stylePair[0] == 'margin-left') {\n                                                        $comment->setMarginLeft($stylePair[1]);\n                                                    }\n                                                    if ($stylePair[0] == 'margin-top') {\n                                                        $comment->setMarginTop($stylePair[1]);\n                                                    }\n                                                    if ($stylePair[0] == 'width') {\n                                                        $comment->setWidth($stylePair[1]);\n                                                    }\n                                                    if ($stylePair[0] == 'height') {\n                                                        $comment->setHeight($stylePair[1]);\n                                                    }\n                                                    if ($stylePair[0] == 'visibility') {\n                                                        $comment->setVisible($stylePair[1] == 'visible');\n                                                    }\n                                                }\n\n                                                unset($unparsedVmlDrawings[$relName]);\n                                            }\n                                        }\n                                    }\n                                }\n\n                                // unparsed vmlDrawing\n                                if ($unparsedVmlDrawings) {\n                                    foreach ($unparsedVmlDrawings as $rId => $relPath) {\n                                        /** @var mixed[][][] $unparsedLoadedData */\n                                        $rId = substr($rId, 3); // rIdXXX\n                                        /** @var mixed[][] */\n                                        $unparsedVmlDrawing = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['vmlDrawings'];\n                                        $unparsedVmlDrawing[$rId] = [];\n                                        $unparsedVmlDrawing[$rId]['filePath'] = self::dirAdd(\"$dir/$fileWorksheet\", $relPath);\n                                        $unparsedVmlDrawing[$rId]['relFilePath'] = $relPath;\n                                        $unparsedVmlDrawing[$rId]['content'] = $this->getSecurityScannerOrThrow()->scan($this->getFromZipArchive($zip, $unparsedVmlDrawing[$rId]['filePath']));\n                                        unset($unparsedVmlDrawing);\n                                    }\n                                }\n\n                                // Header/footer images\n                                if ($xmlSheetNS && $xmlSheetNS->legacyDrawingHF) {\n                                    $vmlHfRid = '';\n                                    $vmlHfRidAttr = $xmlSheetNS->legacyDrawingHF->attributes(Namespaces::SCHEMA_OFFICE_DOCUMENT);\n                                    if ($vmlHfRidAttr !== null && isset($vmlHfRidAttr['id'])) {\n                                        $vmlHfRid = (string) $vmlHfRidAttr['id'][0];\n                                    }\n                                    if ($zip->locateName(dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels') !== false) {\n                                        $relsWorksheet = $this->loadZipNoNamespace(dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels', Namespaces::RELATIONSHIPS);\n                                        $vmlRelationship = '';\n\n                                        foreach ($relsWorksheet->Relationship as $ele) {\n                                            if ((string) $ele['Type'] == Namespaces::VML && (string) $ele['Id'] === $vmlHfRid) {\n                                                $vmlRelationship = self::dirAdd(\"$dir/$fileWorksheet\", $ele['Target']);\n\n                                                break;\n                                            }\n                                        }\n\n                                        if ($vmlRelationship != '') {\n                                            // Fetch linked images\n                                            $relsVML = $this->loadZipNoNamespace(dirname($vmlRelationship) . '/_rels/' . basename($vmlRelationship) . '.rels', Namespaces::RELATIONSHIPS);\n                                            $drawings = [];\n                                            if (isset($relsVML->Relationship)) {\n                                                foreach ($relsVML->Relationship as $ele) {\n                                                    if ($ele['Type'] == Namespaces::IMAGE) {\n                                                        $drawings[(string) $ele['Id']] = self::dirAdd($vmlRelationship, $ele['Target']);\n                                                    }\n                                                }\n                                            }\n                                            // Fetch VML document\n                                            $vmlDrawing = $this->loadZipNoNamespace($vmlRelationship, '');\n                                            $vmlDrawing->registerXPathNamespace('v', Namespaces::URN_VML);\n\n                                            $hfImages = [];\n\n                                            $shapes = self::xpathNoFalse($vmlDrawing, '//v:shape');\n                                            foreach ($shapes as $idx => $shape) {\n                                                /** @var SimpleXMLElement $shape */\n                                                $shape->registerXPathNamespace('v', Namespaces::URN_VML);\n                                                $imageData = $shape->xpath('//v:imagedata');\n\n                                                if (empty($imageData)) {\n                                                    continue;\n                                                }\n\n                                                $imageData = $imageData[$idx];\n\n                                                $imageData = self::getAttributes($imageData, Namespaces::URN_MSOFFICE);\n                                                /** @var array{width: int, height: int, margin-left?: int, margin-top: int} */\n                                                $style = self::toCSSArray((string) $shape['style']);\n\n                                                if (array_key_exists((string) $imageData['relid'], $drawings)) {\n                                                    $shapeId = (string) $shape['id'];\n                                                    $hfImages[$shapeId] = new HeaderFooterDrawing();\n                                                    if (isset($imageData['title'])) {\n                                                        $hfImages[$shapeId]->setName((string) $imageData['title']);\n                                                    }\n\n                                                    $hfImages[$shapeId]->setPath('zip://' . File::realpath($filename) . '#' . $drawings[(string) $imageData['relid']], false, $zip);\n                                                    $hfImages[$shapeId]->setResizeProportional(false);\n                                                    $hfImages[$shapeId]->setWidth($style['width']);\n                                                    $hfImages[$shapeId]->setHeight($style['height']);\n                                                    if (isset($style['margin-left'])) {\n                                                        $hfImages[$shapeId]->setOffsetX($style['margin-left']);\n                                                    }\n                                                    $hfImages[$shapeId]->setOffsetY($style['margin-top']);\n                                                    $hfImages[$shapeId]->setResizeProportional(true);\n                                                }\n                                            }\n\n                                            $docSheet->getHeaderFooter()->setImages($hfImages);\n                                        }\n                                    }\n                                }\n                            }\n\n                            // TODO: Autoshapes from twoCellAnchors!\n                            $drawingFilename = dirname(\"$dir/$fileWorksheet\")\n                                . '/_rels/'\n                                . basename($fileWorksheet)\n                                . '.rels';\n                            if (str_starts_with($drawingFilename, 'xl//xl/')) {\n                                $drawingFilename = substr($drawingFilename, 4);\n                            }\n                            if (str_starts_with($drawingFilename, '/xl//xl/')) {\n                                $drawingFilename = substr($drawingFilename, 5);\n                            }\n                            if ($zip->locateName($drawingFilename) !== false) {\n                                $relsWorksheet = $this->loadZip($drawingFilename, Namespaces::RELATIONSHIPS);\n                                $drawings = [];\n                                foreach ($relsWorksheet->Relationship as $elex) {\n                                    $ele = self::getAttributes($elex);\n                                    if ((string) $ele['Type'] === \"$xmlNamespaceBase/drawing\") {\n                                        $eleTarget = (string) $ele['Target'];\n                                        if (str_starts_with($eleTarget, '/xl/')) {\n                                            $drawings[(string) $ele['Id']] = substr($eleTarget, 1);\n                                        } else {\n                                            $drawings[(string) $ele['Id']] = self::dirAdd(\"$dir/$fileWorksheet\", $ele['Target']);\n                                        }\n                                    }\n                                }\n\n                                if ($xmlSheetNS->drawing && !$this->readDataOnly) {\n                                    $unparsedDrawings = [];\n                                    $fileDrawing = null;\n                                    foreach ($xmlSheetNS->drawing as $drawing) {\n                                        $drawingRelId = self::getArrayItemString(self::getAttributes($drawing, $xmlNamespaceBase), 'id');\n                                        $fileDrawing = $drawings[$drawingRelId];\n                                        $drawingFilename = dirname($fileDrawing) . '/_rels/' . basename($fileDrawing) . '.rels';\n                                        $relsDrawing = $this->loadZip($drawingFilename, Namespaces::RELATIONSHIPS);\n\n                                        $images = [];\n                                        $hyperlinks = [];\n                                        if ($relsDrawing && $relsDrawing->Relationship) {\n                                            foreach ($relsDrawing->Relationship as $elex) {\n                                                $ele = self::getAttributes($elex);\n                                                $eleType = (string) $ele['Type'];\n                                                if ($eleType === Namespaces::HYPERLINK) {\n                                                    $hyperlinks[(string) $ele['Id']] = (string) $ele['Target'];\n                                                }\n                                                if ($eleType === \"$xmlNamespaceBase/image\") {\n                                                    $eleTarget = (string) $ele['Target'];\n                                                    if (str_starts_with($eleTarget, '/xl/')) {\n                                                        $eleTarget = substr($eleTarget, 1);\n                                                        $images[(string) $ele['Id']] = $eleTarget;\n                                                    } else {\n                                                        $images[(string) $ele['Id']] = self::dirAdd($fileDrawing, $eleTarget);\n                                                    }\n                                                } elseif ($eleType === \"$xmlNamespaceBase/chart\") {\n                                                    if ($this->includeCharts) {\n                                                        $eleTarget = (string) $ele['Target'];\n                                                        if (str_starts_with($eleTarget, '/xl/')) {\n                                                            $index = substr($eleTarget, 1);\n                                                        } else {\n                                                            $index = self::dirAdd($fileDrawing, $eleTarget);\n                                                        }\n                                                        $charts[$index] = [\n                                                            'id' => (string) $ele['Id'],\n                                                            'sheet' => $docSheet->getTitle(),\n                                                        ];\n                                                    }\n                                                }\n                                            }\n                                        }\n\n                                        $xmlDrawing = $this->loadZipNoNamespace($fileDrawing, '');\n                                        $xmlDrawingChildren = $xmlDrawing->children(Namespaces::SPREADSHEET_DRAWING);\n\n                                        // Store drawing XML for pass-through if enabled\n                                        if ($this->enableDrawingPassThrough) {\n                                            $unparsedDrawings[$drawingRelId] = $xmlDrawing->asXML();\n                                            // Mark that pass-through is enabled for this sheet\n                                            $sheetCodeName = $docSheet->getCodeName();\n                                            if (!isset($unparsedLoadedData['sheets']) || !is_array($unparsedLoadedData['sheets'])) {\n                                                $unparsedLoadedData['sheets'] = [];\n                                            }\n                                            if (!isset($unparsedLoadedData['sheets'][$sheetCodeName]) || !is_array($unparsedLoadedData['sheets'][$sheetCodeName])) {\n                                                $unparsedLoadedData['sheets'][$sheetCodeName] = [];\n                                            }\n                                            /** @var array<string, mixed> $sheetUnparsedData */\n                                            $sheetUnparsedData = &$unparsedLoadedData['sheets'][$sheetCodeName];\n                                            $sheetUnparsedData['drawingPassThroughEnabled'] = true;\n                                            // Store original drawing relationships for pass-through\n                                            if ($relsDrawing) {\n                                                $sheetUnparsedData['drawingRelationships'] = $relsDrawing->asXML();\n                                            }\n                                            // Store original media files paths and source file for pass-through\n                                            $sheetUnparsedData['drawingMediaFiles'] = $images;\n                                            $sheetUnparsedData['drawingSourceFile'] = File::realpath($filename);\n                                        }\n\n                                        if ($xmlDrawingChildren->oneCellAnchor) {\n                                            foreach ($xmlDrawingChildren->oneCellAnchor as $oneCellAnchor) {\n                                                $oneCellAnchor = self::testSimpleXml($oneCellAnchor);\n                                                if ($oneCellAnchor->pic->blipFill) {\n                                                    $objDrawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing();\n                                                    $blip = $oneCellAnchor->pic->blipFill->children(Namespaces::DRAWINGML)->blip;\n                                                    if (isset($blip, $blip->alphaModFix)) {\n                                                        $temp = (string) $blip->alphaModFix->attributes()->amt;\n                                                        if (is_numeric($temp)) {\n                                                            $objDrawing->setOpacity((int) $temp);\n                                                        }\n                                                    }\n                                                    $xfrm = $oneCellAnchor->pic->spPr->children(Namespaces::DRAWINGML)->xfrm;\n                                                    $outerShdw = $oneCellAnchor->pic->spPr->children(Namespaces::DRAWINGML)->effectLst->outerShdw;\n\n                                                    $objDrawing->setName(self::getArrayItemString(self::getAttributes($oneCellAnchor->pic->nvPicPr->cNvPr), 'name'));\n                                                    $objDrawing->setDescription(self::getArrayItemString(self::getAttributes($oneCellAnchor->pic->nvPicPr->cNvPr), 'descr'));\n                                                    $embedImageKey = self::getArrayItemString(\n                                                        self::getAttributes($blip, $xmlNamespaceBase),\n                                                        'embed'\n                                                    );\n                                                    if (isset($images[$embedImageKey])) {\n                                                        $objDrawing->setPath(\n                                                            'zip://' . File::realpath($filename) . '#'\n                                                            . $images[$embedImageKey],\n                                                            false,\n                                                            $zip\n                                                        );\n                                                    } else {\n                                                        $linkImageKey = self::getArrayItemString(\n                                                            $blip->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'),\n                                                            'link'\n                                                        );\n                                                        if (isset($images[$linkImageKey])) {\n                                                            $url = str_replace('xl/drawings/', '', $images[$linkImageKey]);\n                                                            $objDrawing->setPath($url, false, allowExternal: $this->allowExternalImages, isWhitelisted: $this->isWhitelisted);\n                                                        }\n                                                        if ($objDrawing->getPath() === '') {\n                                                            continue;\n                                                        }\n                                                    }\n                                                    $objDrawing->setCoordinates(Coordinate::stringFromColumnIndex(((int) $oneCellAnchor->from->col) + 1) . ($oneCellAnchor->from->row + 1));\n\n                                                    $objDrawing->setOffsetX((int) Drawing::EMUToPixels($oneCellAnchor->from->colOff));\n                                                    $objDrawing->setOffsetY(Drawing::EMUToPixels($oneCellAnchor->from->rowOff));\n                                                    $objDrawing->setResizeProportional(false);\n                                                    $objDrawing->setWidth(Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($oneCellAnchor->ext), 'cx')));\n                                                    $objDrawing->setHeight(Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($oneCellAnchor->ext), 'cy')));\n                                                    if ($xfrm) {\n                                                        $objDrawing->setRotation((int) Drawing::angleToDegrees(self::getArrayItemIntOrSxml(self::getAttributes($xfrm), 'rot')));\n                                                        $objDrawing->setFlipVertical((bool) self::getArrayItem(self::getAttributes($xfrm), 'flipV'));\n                                                        $objDrawing->setFlipHorizontal((bool) self::getArrayItem(self::getAttributes($xfrm), 'flipH'));\n                                                    }\n                                                    if ($outerShdw) {\n                                                        $shadow = $objDrawing->getShadow();\n                                                        $shadow->setVisible(true);\n                                                        $shadow->setBlurRadius(Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($outerShdw), 'blurRad')));\n                                                        $shadow->setDistance(Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($outerShdw), 'dist')));\n                                                        $shadow->setDirection(Drawing::angleToDegrees(self::getArrayItemIntOrSxml(self::getAttributes($outerShdw), 'dir')));\n                                                        $shadow->setAlignment(self::getArrayItemString(self::getAttributes($outerShdw), 'algn'));\n                                                        $clr = $outerShdw->srgbClr ?? $outerShdw->prstClr;\n                                                        $shadow->getColor()->setRGB(self::getArrayItemString(self::getAttributes($clr), 'val'));\n                                                        if ($clr->alpha) {\n                                                            $alpha = StringHelper::convertToString(self::getArrayItem(self::getAttributes($clr->alpha), 'val'));\n                                                            if (is_numeric($alpha)) {\n                                                                $alpha = (int) ($alpha / 1000);\n                                                                $shadow->setAlpha($alpha);\n                                                            }\n                                                        }\n                                                    }\n\n                                                    $this->readHyperLinkDrawing($objDrawing, $oneCellAnchor, $hyperlinks);\n\n                                                    $objDrawing->setWorksheet($docSheet);\n                                                } elseif ($this->includeCharts && $oneCellAnchor->graphicFrame) {\n                                                    // Exported XLSX from Google Sheets positions charts with a oneCellAnchor\n                                                    $coordinates = Coordinate::stringFromColumnIndex(((int) $oneCellAnchor->from->col) + 1) . ($oneCellAnchor->from->row + 1);\n                                                    $offsetX = Drawing::EMUToPixels($oneCellAnchor->from->colOff);\n                                                    $offsetY = Drawing::EMUToPixels($oneCellAnchor->from->rowOff);\n                                                    $width = Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($oneCellAnchor->ext), 'cx'));\n                                                    $height = Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($oneCellAnchor->ext), 'cy'));\n\n                                                    $graphic = $oneCellAnchor->graphicFrame->children(Namespaces::DRAWINGML)->graphic;\n                                                    $chartRef = $graphic->graphicData->children(Namespaces::CHART)->chart;\n                                                    $thisChart = (string) self::getAttributes($chartRef, $xmlNamespaceBase);\n\n                                                    $chartDetails[$docSheet->getTitle() . '!' . $thisChart] = [\n                                                        'fromCoordinate' => $coordinates,\n                                                        'fromOffsetX' => $offsetX,\n                                                        'fromOffsetY' => $offsetY,\n                                                        'width' => $width,\n                                                        'height' => $height,\n                                                        'worksheetTitle' => $docSheet->getTitle(),\n                                                        'oneCellAnchor' => true,\n                                                    ];\n                                                }\n                                            }\n                                        }\n                                        if ($xmlDrawingChildren->twoCellAnchor) {\n                                            foreach ($xmlDrawingChildren->twoCellAnchor as $twoCellAnchor) {\n                                                $twoCellAnchor = self::testSimpleXml($twoCellAnchor);\n                                                if ($twoCellAnchor->pic->blipFill) {\n                                                    $objDrawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing();\n                                                    $blip = $twoCellAnchor->pic->blipFill->children(Namespaces::DRAWINGML)->blip;\n                                                    if (isset($blip, $blip->alphaModFix)) {\n                                                        $temp = (string) $blip->alphaModFix->attributes()->amt;\n                                                        if (is_numeric($temp)) {\n                                                            $objDrawing->setOpacity((int) $temp);\n                                                        }\n                                                    }\n                                                    if (isset($twoCellAnchor->pic->blipFill->children(Namespaces::DRAWINGML)->srcRect)) {\n                                                        $objDrawing->setSrcRect($twoCellAnchor->pic->blipFill->children(Namespaces::DRAWINGML)->srcRect->attributes());\n                                                    }\n                                                    $xfrm = $twoCellAnchor->pic->spPr->children(Namespaces::DRAWINGML)->xfrm;\n                                                    $outerShdw = $twoCellAnchor->pic->spPr->children(Namespaces::DRAWINGML)->effectLst->outerShdw;\n                                                    $editAs = $twoCellAnchor->attributes();\n                                                    if (isset($editAs, $editAs['editAs'])) {\n                                                        $objDrawing->setEditAs($editAs['editAs']);\n                                                    }\n                                                    $objDrawing->setName((string) self::getArrayItemString(self::getAttributes($twoCellAnchor->pic->nvPicPr->cNvPr), 'name'));\n                                                    $objDrawing->setDescription(self::getArrayItemString(self::getAttributes($twoCellAnchor->pic->nvPicPr->cNvPr), 'descr'));\n                                                    $embedImageKey = self::getArrayItemString(\n                                                        self::getAttributes($blip, $xmlNamespaceBase),\n                                                        'embed'\n                                                    );\n                                                    if (isset($images[$embedImageKey])) {\n                                                        $objDrawing->setPath(\n                                                            'zip://' . File::realpath($filename) . '#'\n                                                            . $images[$embedImageKey],\n                                                            false,\n                                                            $zip\n                                                        );\n                                                    } else {\n                                                        $linkImageKey = self::getArrayItemString(\n                                                            $blip->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'),\n                                                            'link'\n                                                        );\n                                                        if (isset($images[$linkImageKey])) {\n                                                            $url = str_replace('xl/drawings/', '', $images[$linkImageKey]);\n                                                            $objDrawing->setPath($url, false, allowExternal: $this->allowExternalImages, isWhitelisted: $this->isWhitelisted);\n                                                        }\n                                                        if ($objDrawing->getPath() === '') {\n                                                            continue;\n                                                        }\n                                                    }\n                                                    $objDrawing->setCoordinates(Coordinate::stringFromColumnIndex(((int) $twoCellAnchor->from->col) + 1) . ($twoCellAnchor->from->row + 1));\n\n                                                    $objDrawing->setOffsetX(Drawing::EMUToPixels($twoCellAnchor->from->colOff));\n                                                    $objDrawing->setOffsetY(Drawing::EMUToPixels($twoCellAnchor->from->rowOff));\n\n                                                    $objDrawing->setCoordinates2(Coordinate::stringFromColumnIndex(((int) $twoCellAnchor->to->col) + 1) . ($twoCellAnchor->to->row + 1));\n\n                                                    $objDrawing->setOffsetX2(Drawing::EMUToPixels($twoCellAnchor->to->colOff));\n                                                    $objDrawing->setOffsetY2(Drawing::EMUToPixels($twoCellAnchor->to->rowOff));\n\n                                                    $objDrawing->setResizeProportional(false);\n\n                                                    if ($xfrm) {\n                                                        $objDrawing->setWidth(Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($xfrm->ext), 'cx')));\n                                                        $objDrawing->setHeight(Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($xfrm->ext), 'cy')));\n                                                        $objDrawing->setRotation(Drawing::angleToDegrees(self::getArrayItemIntOrSxml(self::getAttributes($xfrm), 'rot')));\n                                                        $objDrawing->setFlipVertical((bool) self::getArrayItem(self::getAttributes($xfrm), 'flipV'));\n                                                        $objDrawing->setFlipHorizontal((bool) self::getArrayItem(self::getAttributes($xfrm), 'flipH'));\n                                                    }\n                                                    if ($outerShdw) {\n                                                        $shadow = $objDrawing->getShadow();\n                                                        $shadow->setVisible(true);\n                                                        $shadow->setBlurRadius(Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($outerShdw), 'blurRad')));\n                                                        $shadow->setDistance(Drawing::EMUToPixels(self::getArrayItemIntOrSxml(self::getAttributes($outerShdw), 'dist')));\n                                                        $shadow->setDirection(Drawing::angleToDegrees(self::getArrayItemIntOrSxml(self::getAttributes($outerShdw), 'dir')));\n                                                        $shadow->setAlignment(self::getArrayItemString(self::getAttributes($outerShdw), 'algn'));\n                                                        $clr = $outerShdw->srgbClr ?? $outerShdw->prstClr;\n                                                        $shadow->getColor()->setRGB(self::getArrayItemString(self::getAttributes($clr), 'val'));\n                                                        if ($clr->alpha) {\n                                                            $alpha = StringHelper::convertToString(self::getArrayItem(self::getAttributes($clr->alpha), 'val'));\n                                                            if (is_numeric($alpha)) {\n                                                                $alpha = (int) ($alpha / 1000);\n                                                                $shadow->setAlpha($alpha);\n                                                            }\n                                                        }\n                                                    }\n\n                                                    $this->readHyperLinkDrawing($objDrawing, $twoCellAnchor, $hyperlinks);\n\n                                                    $objDrawing->setWorksheet($docSheet);\n                                                } elseif (($this->includeCharts) && ($twoCellAnchor->graphicFrame)) {\n                                                    $fromCoordinate = Coordinate::stringFromColumnIndex(((int) $twoCellAnchor->from->col) + 1) . ($twoCellAnchor->from->row + 1);\n                                                    $fromOffsetX = Drawing::EMUToPixels($twoCellAnchor->from->colOff);\n                                                    $fromOffsetY = Drawing::EMUToPixels($twoCellAnchor->from->rowOff);\n                                                    $toCoordinate = Coordinate::stringFromColumnIndex(((int) $twoCellAnchor->to->col) + 1) . ($twoCellAnchor->to->row + 1);\n                                                    $toOffsetX = Drawing::EMUToPixels($twoCellAnchor->to->colOff);\n                                                    $toOffsetY = Drawing::EMUToPixels($twoCellAnchor->to->rowOff);\n                                                    $graphic = $twoCellAnchor->graphicFrame->children(Namespaces::DRAWINGML)->graphic;\n                                                    $chartRef = $graphic->graphicData->children(Namespaces::CHART)->chart;\n                                                    $thisChart = (string) self::getAttributes($chartRef, $xmlNamespaceBase);\n\n                                                    $chartDetails[$docSheet->getTitle() . '!' . $thisChart] = [\n                                                        'fromCoordinate' => $fromCoordinate,\n                                                        'fromOffsetX' => $fromOffsetX,\n                                                        'fromOffsetY' => $fromOffsetY,\n                                                        'toCoordinate' => $toCoordinate,\n                                                        'toOffsetX' => $toOffsetX,\n                                                        'toOffsetY' => $toOffsetY,\n                                                        'worksheetTitle' => $docSheet->getTitle(),\n                                                    ];\n                                                }\n                                            }\n                                        }\n                                        if ($xmlDrawingChildren->absoluteAnchor) {\n                                            foreach ($xmlDrawingChildren->absoluteAnchor as $absoluteAnchor) {\n                                                if (($this->includeCharts) && ($absoluteAnchor->graphicFrame)) {\n                                                    $graphic = $absoluteAnchor->graphicFrame->children(Namespaces::DRAWINGML)->graphic;\n                                                    $chartRef = $graphic->graphicData->children(Namespaces::CHART)->chart;\n                                                    $thisChart = (string) self::getAttributes($chartRef, $xmlNamespaceBase);\n                                                    $width = Drawing::EMUToPixels((int) self::getArrayItemString(self::getAttributes($absoluteAnchor->ext), 'cx')[0]);\n                                                    $height = Drawing::EMUToPixels((int) self::getArrayItemString(self::getAttributes($absoluteAnchor->ext), 'cy')[0]);\n\n                                                    $chartDetails[$docSheet->getTitle() . '!' . $thisChart] = [\n                                                        'fromCoordinate' => 'A1',\n                                                        'fromOffsetX' => 0,\n                                                        'fromOffsetY' => 0,\n                                                        'width' => $width,\n                                                        'height' => $height,\n                                                        'worksheetTitle' => $docSheet->getTitle(),\n                                                    ];\n                                                }\n                                            }\n                                        }\n                                        if (empty($relsDrawing) && $xmlDrawing->count() == 0) {\n                                            // Save Drawing without rels and children as unparsed\n                                            $unparsedDrawings[$drawingRelId] = $xmlDrawing->asXML();\n                                        }\n                                    }\n\n                                    // store original rId of drawing files\n                                    /** @var mixed[][][][] $unparsedLoadedData */\n                                    $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'] = [];\n                                    foreach ($relsWorksheet->Relationship as $elex) {\n                                        $ele = self::getAttributes($elex);\n                                        if ((string) $ele['Type'] === \"$xmlNamespaceBase/drawing\") {\n                                            $drawingRelId = (string) $ele['Id'];\n                                            $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'][(string) $ele['Target']] = $drawingRelId;\n                                            if (isset($unparsedDrawings[$drawingRelId])) {\n                                                $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['Drawings'][$drawingRelId] = $unparsedDrawings[$drawingRelId];\n                                            }\n                                        }\n                                    }\n                                    if ($xmlSheet->legacyDrawing && !$this->readDataOnly) {\n                                        foreach ($xmlSheet->legacyDrawing as $drawing) {\n                                            $drawingRelId = self::getArrayItemString(self::getAttributes($drawing, $xmlNamespaceBase), 'id');\n                                            if (isset($vmlDrawingContents[$drawingRelId])) {\n                                                if (self::onlyNoteVml($vmlDrawingContents[$drawingRelId]) === false) {\n                                                    $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['legacyDrawing'] = $vmlDrawingContents[$drawingRelId];\n                                                }\n                                            }\n                                        }\n                                    }\n\n                                    // unparsed drawing AlternateContent\n                                    $xmlAltDrawing = $this->loadZip((string) $fileDrawing, Namespaces::COMPATIBILITY);\n\n                                    if ($xmlAltDrawing->AlternateContent) {\n                                        foreach ($xmlAltDrawing->AlternateContent as $alternateContent) {\n                                            $alternateContent = self::testSimpleXml($alternateContent);\n                                            /** @var mixed[][][][][] $unparsedLoadedData */\n                                            $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingAlternateContents'][] = $alternateContent->asXML();\n                                        }\n                                    }\n                                }\n                            }\n\n                            /** @var mixed[][][][] $unparsedLoadedData */\n                            $this->readFormControlProperties($excel, $dir, $fileWorksheet, $docSheet, $unparsedLoadedData);\n                            $this->readPrinterSettings($excel, $dir, $fileWorksheet, $docSheet, $unparsedLoadedData);\n\n                            // Loop through definedNames\n                            if ($xmlWorkbook->definedNames) {\n                                foreach ($xmlWorkbook->definedNames->definedName as $definedName) {\n                                    // Extract range\n                                    $extractedRange = (string) $definedName;\n                                    if (($spos = strpos($extractedRange, '!')) !== false) {\n                                        $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos));\n                                    } else {\n                                        $extractedRange = str_replace('$', '', $extractedRange);\n                                    }\n\n                                    // Valid range?\n                                    if ($extractedRange == '') {\n                                        continue;\n                                    }\n\n                                    // Some definedNames are only applicable if we are on the same sheet...\n                                    if ((string) $definedName['localSheetId'] != '' && (string) $definedName['localSheetId'] == $oldSheetId) {\n                                        // Switch on type\n                                        switch ((string) $definedName['name']) {\n                                            case '_xlnm._FilterDatabase':\n                                                if ((string) $definedName['hidden'] !== '1') {\n                                                    $extractedRange = explode(',', $extractedRange);\n                                                    foreach ($extractedRange as $range) {\n                                                        $autoFilterRange = $range;\n                                                        if (str_contains($autoFilterRange, ':')) {\n                                                            $docSheet->getAutoFilter()->setRange($autoFilterRange);\n                                                        }\n                                                    }\n                                                }\n\n                                                break;\n                                            case '_xlnm.Print_Titles':\n                                                // Split $extractedRange\n                                                $extractedRange = explode(',', $extractedRange);\n\n                                                // Set print titles\n                                                foreach ($extractedRange as $range) {\n                                                    $matches = [];\n                                                    $range = str_replace('$', '', $range);\n\n                                                    // check for repeating columns, e g. 'A:A' or 'A:D'\n                                                    if (Preg::isMatch('/!?([A-Z]+)\\:([A-Z]+)$/', $range, $matches)) {\n                                                        $docSheet->getPageSetup()->setColumnsToRepeatAtLeft([$matches[1], $matches[2]]);\n                                                    } elseif (Preg::isMatch('/!?(\\d+)\\:(\\d+)$/', $range, $matches)) {\n                                                        // check for repeating rows, e.g. '1:1' or '1:5'\n                                                        $docSheet->getPageSetup()->setRowsToRepeatAtTop([(int) $matches[1], (int) $matches[2]]);\n                                                    }\n                                                }\n\n                                                break;\n                                            case '_xlnm.Print_Area':\n                                                $rangeSets = Preg::split(\"/('?(?:.*?)'?(?:![A-Z0-9]+:[A-Z0-9]+)),?/\", $extractedRange, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) ?: [];\n                                                $newRangeSets = [];\n                                                foreach ($rangeSets as $rangeSet) {\n                                                    [, $rangeSet] = Worksheet::extractSheetTitle($rangeSet, true);\n                                                    if (empty($rangeSet)) {\n                                                        continue;\n                                                    }\n                                                    if (!str_contains($rangeSet, ':')) {\n                                                        $rangeSet = $rangeSet . ':' . $rangeSet;\n                                                    }\n                                                    $newRangeSets[] = str_replace('$', '', $rangeSet);\n                                                }\n                                                if (count($newRangeSets) > 0) {\n                                                    $docSheet->getPageSetup()->setPrintArea(implode(',', $newRangeSets));\n                                                }\n\n                                                break;\n                                            default:\n                                                break;\n                                        }\n                                    }\n                                }\n                            }\n\n                            // Next sheet id\n                            ++$sheetId;\n                        }\n\n                        // Loop through definedNames\n                        if ($xmlWorkbook->definedNames) {\n                            foreach ($xmlWorkbook->definedNames->definedName as $definedName) {\n                                // Extract range\n                                $extractedRange = (string) $definedName;\n\n                                // Valid range?\n                                if ($extractedRange == '') {\n                                    continue;\n                                }\n\n                                // Some definedNames are only applicable if we are on the same sheet...\n                                if ((string) $definedName['localSheetId'] != '') {\n                                    // Local defined name\n                                    // Switch on type\n                                    switch ((string) $definedName['name']) {\n                                        case '_xlnm._FilterDatabase':\n                                        case '_xlnm.Print_Titles':\n                                        case '_xlnm.Print_Area':\n                                            break;\n                                        default:\n                                            if ($mapSheetId[(int) $definedName['localSheetId']] !== null) {\n                                                $range = Worksheet::extractSheetTitle($extractedRange, true);\n                                                $scope = $excel->getSheet($mapSheetId[(int) $definedName['localSheetId']]);\n                                                if (str_contains((string) $definedName, '!')) {\n                                                    $range[0] = str_replace(\"''\", \"'\", $range[0]);\n                                                    $range[0] = str_replace(\"'\", '', $range[0]);\n                                                    if ($worksheet = $excel->getSheetByName($range[0])) {\n                                                        $excel->addDefinedName(DefinedName::createInstance((string) $definedName['name'], $worksheet, $extractedRange, true, $scope));\n                                                    } else {\n                                                        $excel->addDefinedName(DefinedName::createInstance((string) $definedName['name'], $scope, $extractedRange, true, $scope));\n                                                    }\n                                                } else {\n                                                    $excel->addDefinedName(DefinedName::createInstance((string) $definedName['name'], $scope, $extractedRange, true));\n                                                }\n                                            }\n\n                                            break;\n                                    }\n                                } elseif (!isset($definedName['localSheetId'])) {\n                                    // \"Global\" definedNames\n                                    $locatedSheet = null;\n                                    if (str_contains((string) $definedName, '!')) {\n                                        // Modify range, and extract the first worksheet reference\n                                        // Need to split on a comma or a space if not in quotes, and extract the first part.\n                                        $definedNameValueParts = Preg::split(\"/[ ,](?=([^']*'[^']*')*[^']*$)/miuU\", $extractedRange);\n                                        // Extract sheet name\n                                        [$extractedSheetName] = Worksheet::extractSheetTitle((string) $definedNameValueParts[0], true, true);\n\n                                        // Locate sheet\n                                        $locatedSheet = $excel->getSheetByName(\"$extractedSheetName\");\n                                    }\n\n                                    if ($locatedSheet === null && !DefinedName::testIfFormula($extractedRange)) {\n                                        $extractedRange = '#REF!';\n                                    }\n                                    $excel->addDefinedName(DefinedName::createInstance((string) $definedName['name'], $locatedSheet, $extractedRange, false));\n                                }\n                            }\n                        }\n                    }\n                    if ($this->createBlankSheetIfNoneRead && !$sheetCreated) {\n                        $excel->createSheet();\n                    }\n\n                    (new WorkbookView($excel))->viewSettings($xmlWorkbook, $mainNS, $mapSheetId, $this->readDataOnly);\n\n                    break;\n            }\n        }\n\n        if (!$this->readDataOnly) {\n            $contentTypes = $this->loadZip('[Content_Types].xml');\n\n            // Default content types\n            foreach ($contentTypes->Default as $contentType) {\n                switch ($contentType['ContentType']) {\n                    case 'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings':\n                        $unparsedLoadedData['default_content_types'][(string) $contentType['Extension']] = (string) $contentType['ContentType'];\n\n                        break;\n                }\n            }\n\n            // Override content types\n            foreach ($contentTypes->Override as $contentType) {\n                switch ($contentType['ContentType']) {\n                    case 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml':\n                        if ($this->includeCharts) {\n                            $chartEntryRef = ltrim((string) $contentType['PartName'], '/');\n                            $chartElements = $this->loadZip($chartEntryRef);\n                            $chartReader = new Chart($chartNS, $drawingNS);\n                            $objChart = $chartReader->readChart($chartElements, basename($chartEntryRef, '.xml'));\n                            if (isset($charts[$chartEntryRef])) {\n                                $chartPositionRef = $charts[$chartEntryRef]['sheet'] . '!' . $charts[$chartEntryRef]['id'];\n                                if (isset($chartDetails[$chartPositionRef]) && $excel->getSheetByName($charts[$chartEntryRef]['sheet']) !== null) {\n                                    $excel->getSheetByName($charts[$chartEntryRef]['sheet'])->addChart($objChart);\n                                    $objChart->setWorksheet($excel->getSheetByName($charts[$chartEntryRef]['sheet']));\n                                    // For oneCellAnchor or absoluteAnchor positioned charts,\n                                    //     toCoordinate is not in the data. Does it need to be calculated?\n                                    if (array_key_exists('toCoordinate', $chartDetails[$chartPositionRef])) {\n                                        // twoCellAnchor\n                                        $objChart->setTopLeftPosition($chartDetails[$chartPositionRef]['fromCoordinate'], $chartDetails[$chartPositionRef]['fromOffsetX'], $chartDetails[$chartPositionRef]['fromOffsetY']);\n                                        $objChart->setBottomRightPosition($chartDetails[$chartPositionRef]['toCoordinate'], $chartDetails[$chartPositionRef]['toOffsetX'], $chartDetails[$chartPositionRef]['toOffsetY']);\n                                    } else {\n                                        // oneCellAnchor or absoluteAnchor (e.g. Chart sheet)\n                                        $objChart->setTopLeftPosition($chartDetails[$chartPositionRef]['fromCoordinate'], $chartDetails[$chartPositionRef]['fromOffsetX'], $chartDetails[$chartPositionRef]['fromOffsetY']);\n                                        $objChart->setBottomRightPosition('', $chartDetails[$chartPositionRef]['width'], $chartDetails[$chartPositionRef]['height']);\n                                        if (array_key_exists('oneCellAnchor', $chartDetails[$chartPositionRef])) {\n                                            $objChart->setOneCellAnchor($chartDetails[$chartPositionRef]['oneCellAnchor']);\n                                        }\n                                    }\n                                }\n                            }\n                        }\n\n                        break;\n\n                        // unparsed\n                    case 'application/vnd.ms-excel.controlproperties+xml':\n                        $unparsedLoadedData['override_content_types'][(string) $contentType['PartName']] = (string) $contentType['ContentType'];\n\n                        break;\n                }\n            }\n        }\n\n        /** @var array<array<array<array<string>|string>>> $unparsedLoadedData */\n        $excel->setUnparsedLoadedData($unparsedLoadedData);\n\n        $zip->close();\n\n        return $excel;\n    }\n\n    private function parseRichText(?SimpleXMLElement $is): RichText\n    {\n        $value = new RichText();\n\n        if (isset($is->t)) {\n            $value->createText(StringHelper::controlCharacterOOXML2PHP((string) $is->t));\n        } elseif ($is !== null) {\n            if (is_object($is->r)) {\n                foreach ($is->r as $run) {\n                    if (!isset($run->rPr)) {\n                        $value->createText(StringHelper::controlCharacterOOXML2PHP((string) $run->t));\n                    } else {\n                        $objText = $value->createTextRun(StringHelper::controlCharacterOOXML2PHP((string) $run->t));\n                        $objFont = $objText->getFont() ?? new StyleFont();\n\n                        if (isset($run->rPr->rFont)) {\n                            $attr = $run->rPr->rFont->attributes();\n                            if (isset($attr['val'])) {\n                                $objFont->setName((string) $attr['val']);\n                            }\n                        }\n                        if (isset($run->rPr->sz)) {\n                            $attr = $run->rPr->sz->attributes();\n                            if (isset($attr['val'])) {\n                                $objFont->setSize((float) $attr['val']);\n                            }\n                        }\n                        if (isset($run->rPr->color)) {\n                            $objFont->setColor(new Color($this->styleReader->readColor($run->rPr->color)));\n                        }\n                        if (isset($run->rPr->b)) {\n                            $attr = $run->rPr->b->attributes();\n                            if (\n                                (isset($attr['val']) && self::boolean((string) $attr['val']))\n                                || (!isset($attr['val']))\n                            ) {\n                                $objFont->setBold(true);\n                            }\n                        }\n                        if (isset($run->rPr->i)) {\n                            $attr = $run->rPr->i->attributes();\n                            if (\n                                (isset($attr['val']) && self::boolean((string) $attr['val']))\n                                || (!isset($attr['val']))\n                            ) {\n                                $objFont->setItalic(true);\n                            }\n                        }\n                        if (isset($run->rPr->vertAlign)) {\n                            $attr = $run->rPr->vertAlign->attributes();\n                            if (isset($attr['val'])) {\n                                $vertAlign = strtolower((string) $attr['val']);\n                                if ($vertAlign == 'superscript') {\n                                    $objFont->setSuperscript(true);\n                                }\n                                if ($vertAlign == 'subscript') {\n                                    $objFont->setSubscript(true);\n                                }\n                            }\n                        }\n                        if (isset($run->rPr->u)) {\n                            $attr = $run->rPr->u->attributes();\n                            if (!isset($attr['val'])) {\n                                $objFont->setUnderline(StyleFont::UNDERLINE_SINGLE);\n                            } else {\n                                $objFont->setUnderline((string) $attr['val']);\n                            }\n                        }\n                        if (isset($run->rPr->strike)) {\n                            $attr = $run->rPr->strike->attributes();\n                            if (\n                                (isset($attr['val']) && self::boolean((string) $attr['val']))\n                                || (!isset($attr['val']))\n                            ) {\n                                $objFont->setStrikethrough(true);\n                            }\n                        }\n                    }\n                }\n            }\n        }\n\n        return $value;\n    }\n\n    private function readRibbon(Spreadsheet $excel, string $customUITarget, ZipArchive $zip): void\n    {\n        $baseDir = dirname($customUITarget);\n        $nameCustomUI = basename($customUITarget);\n        // get the xml file (ribbon)\n        $localRibbon = $this->getFromZipArchive($zip, $customUITarget);\n        $customUIImagesNames = [];\n        $customUIImagesBinaries = [];\n        // something like customUI/_rels/customUI.xml.rels\n        $pathRels = $baseDir . '/_rels/' . $nameCustomUI . '.rels';\n        $dataRels = $this->getFromZipArchive($zip, $pathRels);\n        if ($dataRels) {\n            // exists and not empty if the ribbon have some pictures (other than internal MSO)\n            $UIRels = simplexml_load_string(\n                $this->getSecurityScannerOrThrow()\n                    ->scan($dataRels),\n                SimpleXMLElement::class,\n                $this->parseHuge ? LIBXML_PARSEHUGE : 0\n            );\n            if (false !== $UIRels) {\n                // we need to save id and target to avoid parsing customUI.xml and \"guess\" if it's a pseudo callback who load the image\n                foreach ($UIRels->Relationship as $ele) {\n                    if ((string) $ele['Type'] === Namespaces::SCHEMA_OFFICE_DOCUMENT . '/image') {\n                        // an image ?\n                        $customUIImagesNames[(string) $ele['Id']] = (string) $ele['Target'];\n                        $customUIImagesBinaries[(string) $ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']);\n                    }\n                }\n            }\n        }\n        if ($localRibbon) {\n            $excel->setRibbonXMLData($customUITarget, $localRibbon);\n            if (count($customUIImagesNames) > 0 && count($customUIImagesBinaries) > 0) {\n                $excel->setRibbonBinObjects($customUIImagesNames, $customUIImagesBinaries);\n            } else {\n                $excel->setRibbonBinObjects(null, null);\n            }\n        } else {\n            $excel->setRibbonXMLData(null, null);\n            $excel->setRibbonBinObjects(null, null);\n        }\n    }\n\n    /** @param null|bool|mixed[]|SimpleXMLElement $array */\n    private static function getArrayItem(null|array|bool|SimpleXMLElement $array, int|string $key = 0): mixed\n    {\n        return ($array === null || is_bool($array)) ? null : ($array[$key] ?? null);\n    }\n\n    /** @param null|bool|mixed[]|SimpleXMLElement $array */\n    private static function getArrayItemString(null|array|bool|SimpleXMLElement $array, int|string $key = 0): string\n    {\n        $retVal = self::getArrayItem($array, $key);\n\n        return StringHelper::convertToString($retVal, false);\n    }\n\n    /** @param null|bool|mixed[]|SimpleXMLElement $array */\n    private static function getArrayItemIntOrSxml(null|array|bool|SimpleXMLElement $array, int|string $key = 0): int|SimpleXMLElement\n    {\n        $retVal = self::getArrayItem($array, $key);\n\n        return (is_int($retVal) || $retVal instanceof SimpleXMLElement) ? $retVal : 0;\n    }\n\n    private static function dirAdd(null|SimpleXMLElement|string $base, null|SimpleXMLElement|string $add): string\n    {\n        $base = (string) $base;\n        $add = (string) $add;\n\n        return Preg::replace('~[^/]+/\\.\\./~', '', dirname($base) . \"/$add\");\n    }\n\n    /** @return mixed[] */\n    private static function toCSSArray(string $style): array\n    {\n        $style = self::stripWhiteSpaceFromStyleString($style);\n\n        $temp = explode(';', $style);\n        $style = [];\n        foreach ($temp as $item) {\n            $item = explode(':', $item);\n\n            if (str_contains($item[1], 'px')) {\n                $item[1] = str_replace('px', '', $item[1]);\n            } elseif (str_contains($item[1], 'pt')) {\n                $item[1] = str_replace('pt', '', $item[1]);\n                $item[1] = Font::fontSizeToPixels((float) $item[1]);\n            } elseif (str_contains($item[1], 'in')) {\n                $item[1] = str_replace('in', '', $item[1]);\n                $item[1] = (int) Font::inchSizeToPixels((float) $item[1]);\n            } elseif (str_contains($item[1], 'cm')) {\n                $item[1] = str_replace('cm', '', $item[1]);\n                $item[1] = (int) Font::centimeterSizeToPixels((float) $item[1]);\n            } elseif (str_contains($item[1], 'mm')) {\n                $item[1] = str_replace('mm', '', $item[1]);\n                $item[1] = (int) Font::centimeterSizeToPixels((float) $item[1] / 10);\n            }\n\n            $style[$item[0]] = $item[1];\n        }\n\n        return $style;\n    }\n\n    public static function stripWhiteSpaceFromStyleString(string $string): string\n    {\n        return trim(str_replace([\"\\r\", \"\\n\", ' '], '', $string), ';');\n    }\n\n    private static function boolean(string $value): bool\n    {\n        if (is_numeric($value)) {\n            return (bool) $value;\n        }\n\n        return $value === 'true' || $value === 'TRUE';\n    }\n\n    /** @param string[] $hyperlinks */\n    private function readHyperLinkDrawing(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing $objDrawing, SimpleXMLElement $cellAnchor, array $hyperlinks): void\n    {\n        $hlinkClick = $cellAnchor->pic->nvPicPr->cNvPr->children(Namespaces::DRAWINGML)->hlinkClick;\n\n        if ($hlinkClick->count() === 0) {\n            return;\n        }\n\n        $hlinkId = (string) self::getAttributes($hlinkClick, Namespaces::SCHEMA_OFFICE_DOCUMENT)['id'];\n        $hyperlink = new Hyperlink(\n            Preg::replace('/^#/', 'sheet://', $hyperlinks[$hlinkId]),\n            self::getArrayItemString(\n                self::getAttributes(\n                    $cellAnchor->pic->nvPicPr->cNvPr\n                ),\n                'name'\n            )\n        );\n        $objDrawing->setHyperlink($hyperlink);\n    }\n\n    private function readProtection(Spreadsheet $excel, SimpleXMLElement $xmlWorkbook): void\n    {\n        if (!$xmlWorkbook->workbookProtection) {\n            return;\n        }\n\n        $security = $excel->getSecurity();\n        $security->setLockRevision(\n            self::getLockValue($xmlWorkbook->workbookProtection, 'lockRevision')\n        );\n        $security->setLockStructure(\n            self::getLockValue($xmlWorkbook->workbookProtection, 'lockStructure')\n        );\n        $security->setLockWindows(\n            self::getLockValue($xmlWorkbook->workbookProtection, 'lockWindows')\n        );\n\n        if ($xmlWorkbook->workbookProtection['revisionsPassword']) {\n            $security->setRevisionsPassword(\n                (string) $xmlWorkbook->workbookProtection['revisionsPassword'],\n                true\n            );\n        }\n        if ($xmlWorkbook->workbookProtection['revisionsAlgorithmName']) {\n            $security->setRevisionsAlgorithmName(\n                (string) $xmlWorkbook->workbookProtection['revisionsAlgorithmName']\n            );\n        }\n        if ($xmlWorkbook->workbookProtection['revisionsSaltValue']) {\n            $security->setRevisionsSaltValue(\n                (string) $xmlWorkbook->workbookProtection['revisionsSaltValue'],\n                false\n            );\n        }\n        if ($xmlWorkbook->workbookProtection['revisionsSpinCount']) {\n            $security->setRevisionsSpinCount(\n                (int) $xmlWorkbook->workbookProtection['revisionsSpinCount']\n            );\n        }\n        if ($xmlWorkbook->workbookProtection['revisionsHashValue']) {\n            if ($security->advancedRevisionsPassword()) {\n                $security->setRevisionsPassword(\n                    (string) $xmlWorkbook->workbookProtection['revisionsHashValue'],\n                    true\n                );\n            }\n        }\n\n        if ($xmlWorkbook->workbookProtection['workbookPassword']) {\n            $security->setWorkbookPassword(\n                (string) $xmlWorkbook->workbookProtection['workbookPassword'],\n                true\n            );\n        }\n\n        if ($xmlWorkbook->workbookProtection['workbookAlgorithmName']) {\n            $security->setWorkbookAlgorithmName(\n                (string) $xmlWorkbook->workbookProtection['workbookAlgorithmName']\n            );\n        }\n        if ($xmlWorkbook->workbookProtection['workbookSaltValue']) {\n            $security->setWorkbookSaltValue(\n                (string) $xmlWorkbook->workbookProtection['workbookSaltValue'],\n                false\n            );\n        }\n        if ($xmlWorkbook->workbookProtection['workbookSpinCount']) {\n            $security->setWorkbookSpinCount(\n                (int) $xmlWorkbook->workbookProtection['workbookSpinCount']\n            );\n        }\n        if ($xmlWorkbook->workbookProtection['workbookHashValue']) {\n            if ($security->advancedPassword()) {\n                $security->setWorkbookPassword(\n                    (string) $xmlWorkbook->workbookProtection['workbookHashValue'],\n                    true\n                );\n            }\n        }\n    }\n\n    private static function getLockValue(SimpleXMLElement $protection, string $key): ?bool\n    {\n        $returnValue = null;\n        $protectKey = $protection[$key];\n        if (!empty($protectKey)) {\n            $protectKey = (string) $protectKey;\n            $returnValue = $protectKey !== 'false' && (bool) $protectKey;\n        }\n\n        return $returnValue;\n    }\n\n    /** @param mixed[][][][] $unparsedLoadedData */\n    private function readFormControlProperties(Spreadsheet $excel, string $dir, string $fileWorksheet, Worksheet $docSheet, array &$unparsedLoadedData): void\n    {\n        $zip = $this->zip;\n        if ($zip->locateName(dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels') === false) {\n            return;\n        }\n\n        $filename = dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels';\n        $relsWorksheet = $this->loadZipNoNamespace($filename, Namespaces::RELATIONSHIPS);\n        $ctrlProps = [];\n        foreach ($relsWorksheet->Relationship as $ele) {\n            if ((string) $ele['Type'] === Namespaces::SCHEMA_OFFICE_DOCUMENT . '/ctrlProp') {\n                $ctrlProps[(string) $ele['Id']] = $ele;\n            }\n        }\n\n        /** @var mixed[][] */\n        $unparsedCtrlProps = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['ctrlProps'];\n        foreach ($ctrlProps as $rId => $ctrlProp) {\n            $rId = substr($rId, 3); // rIdXXX\n            $unparsedCtrlProps[$rId] = [];\n            $unparsedCtrlProps[$rId]['filePath'] = self::dirAdd(\"$dir/$fileWorksheet\", $ctrlProp['Target']);\n            $unparsedCtrlProps[$rId]['relFilePath'] = (string) $ctrlProp['Target'];\n            $unparsedCtrlProps[$rId]['content'] = $this->getSecurityScannerOrThrow()->scan($this->getFromZipArchive($zip, $unparsedCtrlProps[$rId]['filePath']));\n        }\n        unset($unparsedCtrlProps);\n    }\n\n    /** @param mixed[][][][] $unparsedLoadedData */\n    private function readPrinterSettings(Spreadsheet $excel, string $dir, string $fileWorksheet, Worksheet $docSheet, array &$unparsedLoadedData): void\n    {\n        if ($this->readDataOnly) {\n            return;\n        }\n        $zip = $this->zip;\n        if ($zip->locateName(dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels') === false) {\n            return;\n        }\n\n        $filename = dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels';\n        $relsWorksheet = $this->loadZipNoNamespace($filename, Namespaces::RELATIONSHIPS);\n        $sheetPrinterSettings = [];\n        foreach ($relsWorksheet->Relationship as $ele) {\n            if ((string) $ele['Type'] === Namespaces::SCHEMA_OFFICE_DOCUMENT . '/printerSettings') {\n                $sheetPrinterSettings[(string) $ele['Id']] = $ele;\n            }\n        }\n\n        /** @var mixed[][] */\n        $unparsedPrinterSettings = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['printerSettings'];\n        foreach ($sheetPrinterSettings as $rId => $printerSettings) {\n            $rId = substr($rId, 3); // rIdXXX\n            if (!str_ends_with($rId, 'ps')) {\n                $rId = $rId . 'ps'; // rIdXXX, add 'ps' suffix to avoid identical resource identifier collision with unparsed vmlDrawing\n            }\n            $unparsedPrinterSettings[$rId] = [];\n            $target = (string) str_replace('/xl/', '../', (string) $printerSettings['Target']);\n            $unparsedPrinterSettings[$rId]['filePath'] = self::dirAdd(\"$dir/$fileWorksheet\", $target);\n            $unparsedPrinterSettings[$rId]['relFilePath'] = $target;\n            $unparsedPrinterSettings[$rId]['content'] = $this->getSecurityScannerOrThrow()->scan($this->getFromZipArchive($zip, $unparsedPrinterSettings[$rId]['filePath']));\n        }\n        unset($unparsedPrinterSettings);\n    }\n\n    /** @return array{string, string} */\n    private function getWorkbookBaseName(): array\n    {\n        $workbookBasename = '';\n        $xmlNamespaceBase = '';\n\n        // check if it is an OOXML archive\n        $rels = $this->loadZip(self::INITIAL_FILE);\n        foreach ($rels->children(Namespaces::RELATIONSHIPS)->Relationship as $rel) {\n            $rel = self::getAttributes($rel);\n            $type = (string) $rel['Type'];\n            switch ($type) {\n                case Namespaces::OFFICE_DOCUMENT:\n                case Namespaces::PURL_OFFICE_DOCUMENT:\n                    $basename = basename((string) $rel['Target']);\n                    $xmlNamespaceBase = dirname($type);\n                    if (Preg::isMatch('/workbook.*\\.xml/', $basename)) {\n                        $workbookBasename = $basename;\n                    }\n\n                    break;\n            }\n        }\n\n        return [$workbookBasename, $xmlNamespaceBase];\n    }\n\n    private function readSheetProtection(Worksheet $docSheet, SimpleXMLElement $xmlSheet): void\n    {\n        if ($this->readDataOnly || !$xmlSheet->sheetProtection) {\n            return;\n        }\n\n        $algorithmName = (string) $xmlSheet->sheetProtection['algorithmName'];\n        $protection = $docSheet->getProtection();\n        $protection->setAlgorithm($algorithmName);\n\n        if ($algorithmName) {\n            $protection->setPassword((string) $xmlSheet->sheetProtection['hashValue'], true);\n            $protection->setSalt((string) $xmlSheet->sheetProtection['saltValue']);\n            $protection->setSpinCount((int) $xmlSheet->sheetProtection['spinCount']);\n        } else {\n            $protection->setPassword((string) $xmlSheet->sheetProtection['password'], true);\n        }\n\n        if ($xmlSheet->protectedRanges->protectedRange) {\n            foreach ($xmlSheet->protectedRanges->protectedRange as $protectedRange) {\n                $docSheet->protectCells((string) $protectedRange['sqref'], (string) $protectedRange['password'], true, (string) $protectedRange['name'], (string) $protectedRange['securityDescriptor']);\n            }\n        }\n    }\n\n    private function readAutoFilter(\n        SimpleXMLElement $xmlSheet,\n        Worksheet $docSheet\n    ): void {\n        if ($xmlSheet && $xmlSheet->autoFilter) {\n            (new AutoFilter($docSheet, $xmlSheet))->load();\n        }\n    }\n\n    private function readBackgroundImage(\n        SimpleXMLElement $xmlSheet,\n        Worksheet $docSheet,\n        string $relsName\n    ): void {\n        if ($xmlSheet && $xmlSheet->picture) {\n            $id = (string) self::getArrayItemString(self::getAttributes($xmlSheet->picture, Namespaces::SCHEMA_OFFICE_DOCUMENT), 'id');\n            $rels = $this->loadZip($relsName);\n            foreach ($rels->Relationship as $rel) {\n                $attrs = $rel->attributes() ?? [];\n                $rid = (string) ($attrs['Id'] ?? '');\n                $target = (string) ($attrs['Target'] ?? '');\n                if ($rid === $id && str_starts_with($target, '..')) {\n                    $target = 'xl' . substr($target, 2);\n                    $content = $this->getFromZipArchive($this->zip, $target);\n                    $docSheet->setBackgroundImage($content);\n                }\n            }\n        }\n    }\n\n    /**\n     * @param TableDxfsStyle[] $tableStyles\n     * @param Style[] $dxfs\n     */\n    private function readTables(\n        SimpleXMLElement $xmlSheet,\n        Worksheet $docSheet,\n        string $dir,\n        string $fileWorksheet,\n        ZipArchive $zip,\n        string $namespaceTable,\n        array $tableStyles,\n        array $dxfs\n    ): void {\n        if ($xmlSheet && $xmlSheet->tableParts) {\n            /** @var array{count: scalar} */\n            $attributes = $xmlSheet->tableParts->attributes() ?? ['count' => 0];\n            if (((int) $attributes['count']) > 0) {\n                $this->readTablesInTablesFile($xmlSheet, $dir, $fileWorksheet, $zip, $docSheet, $namespaceTable, $tableStyles, $dxfs);\n            }\n        }\n    }\n\n    /**\n     * @param TableDxfsStyle[] $tableStyles\n     * @param Style[] $dxfs\n     */\n    private function readTablesInTablesFile(\n        SimpleXMLElement $xmlSheet,\n        string $dir,\n        string $fileWorksheet,\n        ZipArchive $zip,\n        Worksheet $docSheet,\n        string $namespaceTable,\n        array $tableStyles,\n        array $dxfs\n    ): void {\n        foreach ($xmlSheet->tableParts->tablePart as $tablePart) {\n            $relation = self::getAttributes($tablePart, Namespaces::SCHEMA_OFFICE_DOCUMENT);\n            $tablePartRel = (string) $relation['id'];\n            $relationsFileName = dirname(\"$dir/$fileWorksheet\") . '/_rels/' . basename($fileWorksheet) . '.rels';\n\n            if ($zip->locateName($relationsFileName) !== false) {\n                $relsTableReferences = $this->loadZip($relationsFileName, Namespaces::RELATIONSHIPS);\n                foreach ($relsTableReferences->Relationship as $relationship) {\n                    $relationshipAttributes = self::getAttributes($relationship, '');\n\n                    if ((string) $relationshipAttributes['Id'] === $tablePartRel) {\n                        $relationshipFileName = (string) $relationshipAttributes['Target'];\n                        $relationshipFilePath = dirname(\"$dir/$fileWorksheet\") . '/' . $relationshipFileName;\n                        $relationshipFilePath = File::realpath($relationshipFilePath);\n\n                        if ($this->fileExistsInArchive($this->zip, $relationshipFilePath)) {\n                            $tableXml = $this->loadZip($relationshipFilePath, $namespaceTable);\n                            (new TableReader($docSheet, $tableXml))->load($tableStyles, $dxfs);\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    /** @return mixed[] */\n    private static function extractStyles(?SimpleXMLElement $sxml, string $node1, string $node2): array\n    {\n        $array = [];\n        if ($sxml && $sxml->{$node1}->{$node2}) {\n            /** @var SimpleXMLElement */\n            $temp = $sxml->{$node1}->{$node2};\n            foreach ($temp as $node) {\n                $array[] = $node;\n            }\n        }\n\n        return $array;\n    }\n\n    /** @return string[] */\n    private static function extractPalette(?SimpleXMLElement $sxml): array\n    {\n        $array = [];\n        if ($sxml && $sxml->colors->indexedColors) {\n            foreach ($sxml->colors->indexedColors->rgbColor as $node) {\n                $attr = $node->attributes();\n                if (isset($attr['rgb'])) {\n                    $array[] = (string) $attr['rgb'];\n                }\n            }\n        }\n\n        return $array;\n    }\n\n    private function processIgnoredErrors(SimpleXMLElement $xml, Worksheet $sheet): void\n    {\n        $cellCollection = $sheet->getCellCollection();\n        $attributes = self::getAttributes($xml);\n        $sqref = (string) ($attributes['sqref'] ?? '');\n        $numberStoredAsText = (string) ($attributes['numberStoredAsText'] ?? '');\n        $formula = (string) ($attributes['formula'] ?? '');\n        $formulaRange = (string) ($attributes['formulaRange'] ?? '');\n        $twoDigitTextYear = (string) ($attributes['twoDigitTextYear'] ?? '');\n        $evalError = (string) ($attributes['evalError'] ?? '');\n        if (!empty($sqref)) {\n            $explodedSqref = explode(' ', $sqref);\n            $pattern1 = '/^([A-Z]{1,3})([0-9]{1,7})(:([A-Z]{1,3})([0-9]{1,7}))?$/';\n            foreach ($explodedSqref as $sqref1) {\n                if (Preg::isMatch($pattern1, $sqref1, $matches)) {\n                    $firstRow = $matches[2];\n                    $firstCol = $matches[1];\n                    if ($matches[3] !== null) {\n                        $lastCol = (string) $matches[4];\n                        $lastRow = (string) $matches[5];\n                    } else {\n                        $lastCol = $firstCol;\n                        $lastRow = $firstRow;\n                    }\n                    StringHelper::stringIncrement($lastCol);\n                    for ($row = $firstRow; $row <= $lastRow; ++$row) {\n                        for ($col = $firstCol; $col !== $lastCol; StringHelper::stringIncrement($col)) {\n                            if (!$cellCollection->has2(\"$col$row\")) {\n                                continue;\n                            }\n                            if ($numberStoredAsText === '1') {\n                                $sheet->getCell(\"$col$row\")->getIgnoredErrors()->setNumberStoredAsText(true);\n                            }\n                            if ($formula === '1') {\n                                $sheet->getCell(\"$col$row\")->getIgnoredErrors()->setFormula(true);\n                            }\n                            if ($formulaRange === '1') {\n                                $sheet->getCell(\"$col$row\")->getIgnoredErrors()->setFormulaRange(true);\n                            }\n                            if ($twoDigitTextYear === '1') {\n                                $sheet->getCell(\"$col$row\")->getIgnoredErrors()->setTwoDigitTextYear(true);\n                            }\n                            if ($evalError === '1') {\n                                $sheet->getCell(\"$col$row\")->getIgnoredErrors()->setEvalError(true);\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    private static function storeFormulaAttributes(SimpleXMLElement $f, Worksheet $docSheet, string $r): void\n    {\n        $formulaAttributes = [];\n        $attributes = $f->attributes();\n        if (isset($attributes['t'])) {\n            $formulaAttributes['t'] = (string) $attributes['t'];\n        }\n        if (isset($attributes['ref'])) {\n            $formulaAttributes['ref'] = (string) $attributes['ref'];\n        }\n        if (!empty($formulaAttributes)) {\n            $docSheet->getCell($r)->setFormulaAttributes($formulaAttributes);\n        }\n    }\n\n    private static function onlyNoteVml(string $data): bool\n    {\n        $data = str_replace('<br>', '<br/>', $data);\n\n        try {\n            $sxml = @simplexml_load_string($data);\n        } catch (Throwable) {\n            $sxml = false;\n        }\n\n        if ($sxml === false) {\n            return false;\n        }\n        $shapes = $sxml->children(Namespaces::URN_VML);\n        foreach ($shapes->shape as $shape) {\n            $clientData = $shape->children(Namespaces::URN_EXCEL);\n            if (!isset($clientData->ClientData)) {\n                return false;\n            }\n            $attrs = $clientData->ClientData->attributes();\n            if (!isset($attrs['ObjectType'])) {\n                return false;\n            }\n            $objectType = (string) $attrs['ObjectType'];\n            if ($objectType !== 'Note') {\n                return false;\n            }\n        }\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/DataValidations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressHelper;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse SimpleXMLElement;\n\nclass DataValidations\n{\n    private const OPERATOR_MAPPINGS = [\n        'between' => DataValidation::OPERATOR_BETWEEN,\n        'equal' => DataValidation::OPERATOR_EQUAL,\n        'greater' => DataValidation::OPERATOR_GREATERTHAN,\n        'greaterorequal' => DataValidation::OPERATOR_GREATERTHANOREQUAL,\n        'less' => DataValidation::OPERATOR_LESSTHAN,\n        'lessorequal' => DataValidation::OPERATOR_LESSTHANOREQUAL,\n        'notbetween' => DataValidation::OPERATOR_NOTBETWEEN,\n        'notequal' => DataValidation::OPERATOR_NOTEQUAL,\n    ];\n\n    private const TYPE_MAPPINGS = [\n        'textlength' => DataValidation::TYPE_TEXTLENGTH,\n    ];\n\n    private int $thisRow = 0;\n\n    private int $thisColumn = 0;\n\n    /** @param string[] $matches */\n    private function replaceR1C1(array $matches): string\n    {\n        return AddressHelper::convertToA1($matches[0], $this->thisRow, $this->thisColumn, false);\n    }\n\n    public function loadDataValidations(SimpleXMLElement $worksheet, Spreadsheet $spreadsheet): void\n    {\n        $xmlX = $worksheet->children(Namespaces::URN_EXCEL);\n        $sheet = $spreadsheet->getActiveSheet();\n        /** @var callable $pregCallback */\n        $pregCallback = [$this, 'replaceR1C1'];\n        foreach ($xmlX->DataValidation as $dataValidation) {\n            $combinedCells = '';\n            $separator = '';\n            $validation = new DataValidation();\n\n            // set defaults\n            $validation->setShowDropDown(true);\n            $validation->setShowInputMessage(true);\n            $validation->setShowErrorMessage(true);\n            $validation->setShowDropDown(true);\n            $this->thisRow = 1;\n            $this->thisColumn = 1;\n\n            foreach ($dataValidation as $tagName => $tagValue) {\n                $tagValue = (string) $tagValue;\n                $tagValueLower = strtolower($tagValue);\n                switch ($tagName) {\n                    case 'Range':\n                        foreach (explode(',', $tagValue) as $range) {\n                            $cell = '';\n                            if (preg_match('/^R(\\d+)C(\\d+):R(\\d+)C(\\d+)$/', (string) $range, $selectionMatches) === 1) {\n                                // range\n                                $firstCell = Coordinate::stringFromColumnIndex((int) $selectionMatches[2])\n                                    . $selectionMatches[1];\n                                $cell = $firstCell\n                                    . ':'\n                                    . Coordinate::stringFromColumnIndex((int) $selectionMatches[4])\n                                    . $selectionMatches[3];\n                                $this->thisRow = (int) $selectionMatches[1];\n                                $this->thisColumn = (int) $selectionMatches[2];\n                                $sheet->getCell($firstCell);\n                                $combinedCells .= \"$separator$cell\";\n                                $separator = ' ';\n                            } elseif (preg_match('/^R(\\d+)C(\\d+)$/', (string) $range, $selectionMatches) === 1) {\n                                // cell\n                                $cell = Coordinate::stringFromColumnIndex((int) $selectionMatches[2])\n                                    . $selectionMatches[1];\n                                $sheet->getCell($cell);\n                                $this->thisRow = (int) $selectionMatches[1];\n                                $this->thisColumn = (int) $selectionMatches[2];\n                                $combinedCells .= \"$separator$cell\";\n                                $separator = ' ';\n                            } elseif (preg_match('/^C(\\d+)(:C(]\\d+))?$/', (string) $range, $selectionMatches) === 1) {\n                                // column\n                                $firstCol = $selectionMatches[1];\n                                $firstColString = Coordinate::stringFromColumnIndex((int) $firstCol);\n                                $lastCol = $selectionMatches[3] ?? $firstCol;\n                                $lastColString = Coordinate::stringFromColumnIndex((int) $lastCol);\n                                $firstCell = \"{$firstColString}1\";\n                                $cell = \"$firstColString:$lastColString\";\n                                $this->thisColumn = (int) $firstCol;\n                                $sheet->getCell($firstCell);\n                                $combinedCells .= \"$separator$cell\";\n                                $separator = ' ';\n                            } elseif (preg_match('/^R(\\d+)(:R(]\\d+))?$/', (string) $range, $selectionMatches)) {\n                                // row\n                                $firstRow = $selectionMatches[1];\n                                $lastRow = $selectionMatches[3] ?? $firstRow;\n                                $firstCell = \"A$firstRow\";\n                                $cell = \"$firstRow:$lastRow\";\n                                $this->thisRow = (int) $firstRow;\n                                $sheet->getCell($firstCell);\n                                $combinedCells .= \"$separator$cell\";\n                                $separator = ' ';\n                            }\n                        }\n\n                        break;\n                    case 'Type':\n                        $validation->setType(self::TYPE_MAPPINGS[$tagValueLower] ?? $tagValueLower);\n\n                        break;\n                    case 'Qualifier':\n                        $validation->setOperator(self::OPERATOR_MAPPINGS[$tagValueLower] ?? $tagValueLower);\n\n                        break;\n                    case 'InputTitle':\n                        $validation->setPromptTitle($tagValue);\n\n                        break;\n                    case 'InputMessage':\n                        $validation->setPrompt($tagValue);\n\n                        break;\n                    case 'InputHide':\n                        $validation->setShowInputMessage(false);\n\n                        break;\n                    case 'ErrorStyle':\n                        $validation->setErrorStyle($tagValueLower);\n\n                        break;\n                    case 'ErrorTitle':\n                        $validation->setErrorTitle($tagValue);\n\n                        break;\n                    case 'ErrorMessage':\n                        $validation->setError($tagValue);\n\n                        break;\n                    case 'ErrorHide':\n                        $validation->setShowErrorMessage(false);\n\n                        break;\n                    case 'ComboHide':\n                        $validation->setShowDropDown(false);\n\n                        break;\n                    case 'UseBlank':\n                        $validation->setAllowBlank(true);\n\n                        break;\n                    case 'CellRangeList':\n                        // FIXME missing FIXME\n\n                        break;\n                    case 'Min':\n                    case 'Value':\n                        $tagValue = (string) preg_replace_callback(AddressHelper::R1C1_COORDINATE_REGEX, $pregCallback, $tagValue);\n                        $validation->setFormula1($tagValue);\n\n                        break;\n                    case 'Max':\n                        $tagValue = (string) preg_replace_callback(AddressHelper::R1C1_COORDINATE_REGEX, $pregCallback, $tagValue);\n                        $validation->setFormula2($tagValue);\n\n                        break;\n                }\n            }\n\n            $sheet->setDataValidation($combinedCells, $validation);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/PageSettings.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse SimpleXMLElement;\nuse stdClass;\n\nclass PageSettings\n{\n    /** @var (object{orientation: string, scale: ?int, printOrder: ?string,\n     * paperSize: int,\n     * horizontalCentered: bool, verticalCentered: bool, leftMargin: float, rightMargin: float, topMargin: float,\n     * bottomMargin: float, headerMargin: float, footerMargin: float}&stdClass) */\n    private stdClass $printSettings;\n\n    public function __construct(SimpleXMLElement $xmlX)\n    {\n        $printSettings = $this->pageSetup($xmlX, $this->getPrintDefaults());\n        $this->printSettings = $this->printSetup($xmlX, $printSettings); //* @phpstan-ignore-line\n    }\n\n    public function loadPageSettings(Spreadsheet $spreadsheet): void\n    {\n        $spreadsheet->getActiveSheet()->getPageSetup()\n            ->setPaperSize($this->printSettings->paperSize)\n            ->setOrientation($this->printSettings->orientation)\n            ->setScale($this->printSettings->scale)\n            ->setVerticalCentered($this->printSettings->verticalCentered)\n            ->setHorizontalCentered($this->printSettings->horizontalCentered)\n            ->setPageOrder($this->printSettings->printOrder);\n        $spreadsheet->getActiveSheet()->getPageMargins()\n            ->setTop($this->printSettings->topMargin)\n            ->setHeader($this->printSettings->headerMargin)\n            ->setLeft($this->printSettings->leftMargin)\n            ->setRight($this->printSettings->rightMargin)\n            ->setBottom($this->printSettings->bottomMargin)\n            ->setFooter($this->printSettings->footerMargin);\n    }\n\n    private function getPrintDefaults(): stdClass\n    {\n        return (object) [\n            'paperSize' => 9,\n            'orientation' => PageSetup::ORIENTATION_DEFAULT,\n            'scale' => 100,\n            'horizontalCentered' => false,\n            'verticalCentered' => false,\n            'printOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            'topMargin' => 0.75,\n            'headerMargin' => 0.3,\n            'leftMargin' => 0.7,\n            'rightMargin' => 0.7,\n            'bottomMargin' => 0.75,\n            'footerMargin' => 0.3,\n        ];\n    }\n\n    private function pageSetup(SimpleXMLElement $xmlX, stdClass $printDefaults): stdClass\n    {\n        if (isset($xmlX->WorksheetOptions->PageSetup)) {\n            foreach ($xmlX->WorksheetOptions->PageSetup as $pageSetupData) {\n                foreach ($pageSetupData as $pageSetupKey => $pageSetupValue) {\n                    $pageSetupAttributes = $pageSetupValue->attributes(Namespaces::URN_EXCEL);\n                    if ($pageSetupAttributes !== null) {\n                        switch ($pageSetupKey) {\n                            case 'Layout':\n                                $this->setLayout($printDefaults, $pageSetupAttributes);\n\n                                break;\n                            case 'Header':\n                                $printDefaults->headerMargin = (float) $pageSetupAttributes->Margin ?: 1.0;\n\n                                break;\n                            case 'Footer':\n                                $printDefaults->footerMargin = (float) $pageSetupAttributes->Margin ?: 1.0;\n\n                                break;\n                            case 'PageMargins':\n                                $this->setMargins($printDefaults, $pageSetupAttributes);\n\n                                break;\n                        }\n                    }\n                }\n            }\n        }\n\n        return $printDefaults;\n    }\n\n    private function printSetup(SimpleXMLElement $xmlX, stdClass $printDefaults): stdClass\n    {\n        if (isset($xmlX->WorksheetOptions->Print)) {\n            foreach ($xmlX->WorksheetOptions->Print as $printData) {\n                foreach ($printData as $printKey => $printValue) {\n                    switch ($printKey) {\n                        case 'LeftToRight':\n                            $printDefaults->printOrder = PageSetup::PAGEORDER_OVER_THEN_DOWN;\n\n                            break;\n                        case 'PaperSizeIndex':\n                            $printDefaults->paperSize = (int) $printValue ?: 9;\n\n                            break;\n                        case 'Scale':\n                            $printDefaults->scale = (int) $printValue ?: 100;\n\n                            break;\n                    }\n                }\n            }\n        }\n\n        return $printDefaults;\n    }\n\n    private function setLayout(stdClass $printDefaults, SimpleXMLElement $pageSetupAttributes): void\n    {\n        $printDefaults->orientation = (string) strtolower($pageSetupAttributes->Orientation ?? '') ?: PageSetup::ORIENTATION_PORTRAIT;\n        $printDefaults->horizontalCentered = (bool) $pageSetupAttributes->CenterHorizontal ?: false;\n        $printDefaults->verticalCentered = (bool) $pageSetupAttributes->CenterVertical ?: false;\n    }\n\n    private function setMargins(stdClass $printDefaults, SimpleXMLElement $pageSetupAttributes): void\n    {\n        $printDefaults->leftMargin = (float) $pageSetupAttributes->Left ?: 1.0;\n        $printDefaults->rightMargin = (float) $pageSetupAttributes->Right ?: 1.0;\n        $printDefaults->topMargin = (float) $pageSetupAttributes->Top ?: 1.0;\n        $printDefaults->bottomMargin = (float) $pageSetupAttributes->Bottom ?: 1.0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/Properties.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties as DocumentProperties;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse SimpleXMLElement;\n\nclass Properties\n{\n    protected Spreadsheet $spreadsheet;\n\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n    }\n\n    /** @param string[] $namespaces */\n    public function readProperties(SimpleXMLElement $xml, array $namespaces): void\n    {\n        $this->readStandardProperties($xml);\n        $this->readCustomProperties($xml, $namespaces);\n    }\n\n    protected function readStandardProperties(SimpleXMLElement $xml): void\n    {\n        if (isset($xml->DocumentProperties[0])) {\n            $docProps = $this->spreadsheet->getProperties();\n\n            foreach ($xml->DocumentProperties[0] as $propertyName => $propertyValue) {\n                $propertyValue = (string) $propertyValue;\n\n                $this->processStandardProperty($docProps, $propertyName, $propertyValue);\n            }\n        }\n    }\n\n    /** @param string[] $namespaces */\n    protected function readCustomProperties(SimpleXMLElement $xml, array $namespaces): void\n    {\n        if (isset($xml->CustomDocumentProperties) && is_iterable($xml->CustomDocumentProperties[0])) {\n            $docProps = $this->spreadsheet->getProperties();\n\n            foreach ($xml->CustomDocumentProperties[0] as $propertyName => $propertyValue) {\n                $propertyAttributes = self::getAttributes($propertyValue, $namespaces['dt']);\n                $propertyName = (string) preg_replace_callback('/_x([0-9a-f]{4})_/i', [$this, 'hex2str'], $propertyName);\n\n                $this->processCustomProperty($docProps, $propertyName, $propertyValue, $propertyAttributes);\n            }\n        }\n    }\n\n    protected function processStandardProperty(\n        DocumentProperties $docProps,\n        string $propertyName,\n        string $stringValue\n    ): void {\n        switch ($propertyName) {\n            case 'Title':\n                $docProps->setTitle($stringValue);\n\n                break;\n            case 'Subject':\n                $docProps->setSubject($stringValue);\n\n                break;\n            case 'Author':\n                $docProps->setCreator($stringValue);\n\n                break;\n            case 'Created':\n                $docProps->setCreated($stringValue);\n\n                break;\n            case 'LastAuthor':\n                $docProps->setLastModifiedBy($stringValue);\n\n                break;\n            case 'LastSaved':\n                $docProps->setModified($stringValue);\n\n                break;\n            case 'Company':\n                $docProps->setCompany($stringValue);\n\n                break;\n            case 'Category':\n                $docProps->setCategory($stringValue);\n\n                break;\n            case 'Manager':\n                $docProps->setManager($stringValue);\n\n                break;\n            case 'HyperlinkBase':\n                $docProps->setHyperlinkBase($stringValue);\n\n                break;\n            case 'Keywords':\n                $docProps->setKeywords($stringValue);\n\n                break;\n            case 'Description':\n                $docProps->setDescription($stringValue);\n\n                break;\n        }\n    }\n\n    protected function processCustomProperty(\n        DocumentProperties $docProps,\n        string $propertyName,\n        ?SimpleXMLElement $propertyValue,\n        SimpleXMLElement $propertyAttributes\n    ): void {\n        switch ((string) $propertyAttributes) {\n            case 'boolean':\n                $propertyType = DocumentProperties::PROPERTY_TYPE_BOOLEAN;\n                $propertyValue = (bool) (string) $propertyValue;\n\n                break;\n            case 'integer':\n                $propertyType = DocumentProperties::PROPERTY_TYPE_INTEGER;\n                $propertyValue = (int) $propertyValue;\n\n                break;\n            case 'float':\n                $propertyType = DocumentProperties::PROPERTY_TYPE_FLOAT;\n                $propertyValue = (float) $propertyValue;\n\n                break;\n            case 'dateTime.tz':\n            case 'dateTime.iso8601tz':\n                $propertyType = DocumentProperties::PROPERTY_TYPE_DATE;\n                $propertyValue = trim((string) $propertyValue);\n\n                break;\n            default:\n                $propertyType = DocumentProperties::PROPERTY_TYPE_STRING;\n                $propertyValue = trim((string) $propertyValue);\n\n                break;\n        }\n\n        $docProps->setCustomProperty($propertyName, $propertyValue, $propertyType);\n    }\n\n    /** @param string[] $hex */\n    protected function hex2str(array $hex): string\n    {\n        return mb_chr((int) hexdec($hex[1]), 'UTF-8');\n    }\n\n    private static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement\n    {\n        return ($simple === null) ? new SimpleXMLElement('<xml></xml>') : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>'));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/Style/Alignment.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment as AlignmentStyles;\nuse SimpleXMLElement;\n\nclass Alignment extends StyleBase\n{\n    protected const VERTICAL_ALIGNMENT_STYLES = [\n        AlignmentStyles::VERTICAL_BOTTOM,\n        AlignmentStyles::VERTICAL_TOP,\n        AlignmentStyles::VERTICAL_CENTER,\n        AlignmentStyles::VERTICAL_JUSTIFY,\n    ];\n\n    protected const HORIZONTAL_ALIGNMENT_STYLES = [\n        AlignmentStyles::HORIZONTAL_GENERAL,\n        AlignmentStyles::HORIZONTAL_LEFT,\n        AlignmentStyles::HORIZONTAL_RIGHT,\n        AlignmentStyles::HORIZONTAL_CENTER,\n        AlignmentStyles::HORIZONTAL_CENTER_CONTINUOUS,\n        AlignmentStyles::HORIZONTAL_JUSTIFY,\n    ];\n\n    /** @return mixed[] */\n    public function parseStyle(SimpleXMLElement $styleAttributes): array\n    {\n        $style = [];\n\n        foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) {\n            $styleAttributeValue = (string) $styleAttributeValue;\n            switch ($styleAttributeKey) {\n                case 'Vertical':\n                    if (self::identifyFixedStyleValue(self::VERTICAL_ALIGNMENT_STYLES, $styleAttributeValue)) {\n                        $style['alignment']['vertical'] = $styleAttributeValue;\n                    }\n\n                    break;\n                case 'Horizontal':\n                    if (self::identifyFixedStyleValue(self::HORIZONTAL_ALIGNMENT_STYLES, $styleAttributeValue)) {\n                        $style['alignment']['horizontal'] = $styleAttributeValue;\n                    }\n\n                    break;\n                case 'WrapText':\n                    $style['alignment']['wrapText'] = true;\n\n                    break;\n                case 'Rotate':\n                    $style['alignment']['textRotation'] = $styleAttributeValue;\n\n                    break;\n                case 'Indent':\n                    $style['alignment']['indent'] = $styleAttributeValue;\n\n                    break;\n                case 'ReadingOrder':\n                    if ($styleAttributeValue === 'RightToLeft') {\n                        $style['alignment']['readOrder'] = AlignmentStyles::READORDER_RTL;\n                    } elseif ($styleAttributeValue === 'LeftToRight') {\n                        $style['alignment']['readOrder'] = AlignmentStyles::READORDER_LTR;\n                    }\n\n                    break;\n            }\n        }\n\n        return $style;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/Style/Border.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border as BorderStyle;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse SimpleXMLElement;\n\nclass Border extends StyleBase\n{\n    protected const BORDER_POSITIONS = [\n        'top',\n        'left',\n        'bottom',\n        'right',\n    ];\n\n    public const BORDER_MAPPINGS = [\n        'borderStyle' => [\n            'continuous' => BorderStyle::BORDER_HAIR,\n            'dash' => BorderStyle::BORDER_DASHED,\n            'dashdot' => BorderStyle::BORDER_DASHDOT,\n            'dashdotdot' => BorderStyle::BORDER_DASHDOTDOT,\n            'dot' => BorderStyle::BORDER_DOTTED,\n            'double' => BorderStyle::BORDER_DOUBLE,\n            '0continuous' => BorderStyle::BORDER_HAIR,\n            '0dash' => BorderStyle::BORDER_DASHED,\n            '0dashdot' => BorderStyle::BORDER_DASHDOT,\n            '0dashdotdot' => BorderStyle::BORDER_DASHDOTDOT,\n            '0dot' => BorderStyle::BORDER_DOTTED,\n            '0double' => BorderStyle::BORDER_DOUBLE,\n            '1continuous' => BorderStyle::BORDER_THIN,\n            '1dash' => BorderStyle::BORDER_DASHED,\n            '1dashdot' => BorderStyle::BORDER_DASHDOT,\n            '1dashdotdot' => BorderStyle::BORDER_DASHDOTDOT,\n            '1dot' => BorderStyle::BORDER_DOTTED,\n            '1double' => BorderStyle::BORDER_DOUBLE,\n            '2continuous' => BorderStyle::BORDER_MEDIUM,\n            '2dash' => BorderStyle::BORDER_MEDIUMDASHED,\n            '2dashdot' => BorderStyle::BORDER_MEDIUMDASHDOT,\n            '2dashdotdot' => BorderStyle::BORDER_MEDIUMDASHDOTDOT,\n            '2dot' => BorderStyle::BORDER_DOTTED,\n            '2double' => BorderStyle::BORDER_DOUBLE,\n            '3continuous' => BorderStyle::BORDER_THICK,\n            '3dash' => BorderStyle::BORDER_MEDIUMDASHED,\n            '3dashdot' => BorderStyle::BORDER_MEDIUMDASHDOT,\n            '3dashdotdot' => BorderStyle::BORDER_MEDIUMDASHDOTDOT,\n            '3dot' => BorderStyle::BORDER_DOTTED,\n            '3double' => BorderStyle::BORDER_DOUBLE,\n        ],\n    ];\n\n    /**\n     * @param string[] $namespaces\n     *\n     * @return mixed[]\n     */\n    public function parseStyle(SimpleXMLElement $styleData, array $namespaces): array\n    {\n        $style = [];\n\n        $diagonalDirection = Borders::DIAGONAL_NONE;\n        foreach ($styleData->Border as $borderStyle) {\n            $borderAttributes = self::getAttributes($borderStyle, $namespaces['ss']);\n            /** @var array{color?: array{rgb: string}, borderStyle: string} */\n            $thisBorder = [];\n            $styleType = (string) $borderAttributes->Weight;\n            $styleType .= strtolower((string) $borderAttributes->LineStyle);\n            $thisBorder['borderStyle'] = self::BORDER_MAPPINGS['borderStyle'][$styleType] ?? BorderStyle::BORDER_NONE;\n\n            $color = (string) ($borderAttributes['Color'] ?? '');\n            if ($color !== '') {\n                $thisBorder['color']['rgb'] = substr($color, 1);\n            }\n            $position = (string) ($borderAttributes['Position'] ?? '');\n            if ($position !== '') {\n                [$borderPosition, $diagonalDirection] = $this->parsePosition($position, $diagonalDirection);\n                if ($borderPosition) {\n                    $style['borders'][$borderPosition] = $thisBorder;\n                } elseif ($diagonalDirection !== Borders::DIAGONAL_NONE) {\n                    $style['borders']['diagonalDirection'] = $diagonalDirection;\n                    $style['borders']['diagonal'] = $thisBorder;\n                }\n            }\n        }\n\n        return $style;\n    }\n\n    /** @return array{0: string, 1: int} */\n    protected function parsePosition(string $borderStyleValue, int $diagonalDirection): array\n    {\n        $borderStyleValue = strtolower($borderStyleValue);\n        $borderPosition = '';\n\n        if (in_array($borderStyleValue, self::BORDER_POSITIONS)) {\n            $borderPosition = $borderStyleValue;\n        } elseif ($borderStyleValue === 'diagonalleft') {\n            $diagonalDirection = ($diagonalDirection !== Borders::DIAGONAL_NONE) ? Borders::DIAGONAL_BOTH : Borders::DIAGONAL_DOWN;\n        } elseif ($borderStyleValue === 'diagonalright') {\n            $diagonalDirection = ($diagonalDirection !== Borders::DIAGONAL_NONE) ? Borders::DIAGONAL_BOTH : Borders::DIAGONAL_UP;\n        }\n\n        return [$borderPosition, $diagonalDirection];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/Style/Fill.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill as FillStyles;\nuse SimpleXMLElement;\n\nclass Fill extends StyleBase\n{\n    public const FILL_MAPPINGS = [\n        'fillType' => [\n            'solid' => FillStyles::FILL_SOLID,\n            'gray75' => FillStyles::FILL_PATTERN_DARKGRAY,\n            'gray50' => FillStyles::FILL_PATTERN_MEDIUMGRAY,\n            'gray25' => FillStyles::FILL_PATTERN_LIGHTGRAY,\n            'gray125' => FillStyles::FILL_PATTERN_GRAY125,\n            'gray0625' => FillStyles::FILL_PATTERN_GRAY0625,\n            'horzstripe' => FillStyles::FILL_PATTERN_DARKHORIZONTAL, // horizontal stripe\n            'vertstripe' => FillStyles::FILL_PATTERN_DARKVERTICAL, // vertical stripe\n            'reversediagstripe' => FillStyles::FILL_PATTERN_DARKUP, // reverse diagonal stripe\n            'diagstripe' => FillStyles::FILL_PATTERN_DARKDOWN, // diagonal stripe\n            'diagcross' => FillStyles::FILL_PATTERN_DARKGRID, // diagoanl crosshatch\n            'thickdiagcross' => FillStyles::FILL_PATTERN_DARKTRELLIS, // thick diagonal crosshatch\n            'thinhorzstripe' => FillStyles::FILL_PATTERN_LIGHTHORIZONTAL,\n            'thinvertstripe' => FillStyles::FILL_PATTERN_LIGHTVERTICAL,\n            'thinreversediagstripe' => FillStyles::FILL_PATTERN_LIGHTUP,\n            'thindiagstripe' => FillStyles::FILL_PATTERN_LIGHTDOWN,\n            'thinhorzcross' => FillStyles::FILL_PATTERN_LIGHTGRID, // thin horizontal crosshatch\n            'thindiagcross' => FillStyles::FILL_PATTERN_LIGHTTRELLIS, // thin diagonal crosshatch\n        ],\n    ];\n\n    /** @return mixed[] */\n    public function parseStyle(SimpleXMLElement $styleAttributes): array\n    {\n        $style = [];\n\n        foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValuex) {\n            $styleAttributeValue = (string) $styleAttributeValuex;\n            switch ($styleAttributeKey) {\n                case 'Color':\n                    $style['fill']['endColor']['rgb'] = substr($styleAttributeValue, 1);\n                    $style['fill']['startColor']['rgb'] = substr($styleAttributeValue, 1);\n\n                    break;\n                case 'PatternColor':\n                    $style['fill']['startColor']['rgb'] = substr($styleAttributeValue, 1);\n\n                    break;\n                case 'Pattern':\n                    $lcStyleAttributeValue = strtolower((string) $styleAttributeValue);\n                    $style['fill']['fillType']\n                        = self::FILL_MAPPINGS['fillType'][$lcStyleAttributeValue] ?? FillStyles::FILL_NONE;\n\n                    break;\n            }\n        }\n\n        return $style;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/Style/Font.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font as FontUnderline;\nuse SimpleXMLElement;\n\nclass Font extends StyleBase\n{\n    protected const UNDERLINE_STYLES = [\n        FontUnderline::UNDERLINE_NONE,\n        FontUnderline::UNDERLINE_DOUBLE,\n        FontUnderline::UNDERLINE_DOUBLEACCOUNTING,\n        FontUnderline::UNDERLINE_SINGLE,\n        FontUnderline::UNDERLINE_SINGLEACCOUNTING,\n    ];\n\n    /**\n     * @param mixed[][] $style\n     *\n     * @return mixed[][]\n     */\n    protected function parseUnderline(array $style, string $styleAttributeValue): array\n    {\n        if (self::identifyFixedStyleValue(self::UNDERLINE_STYLES, $styleAttributeValue)) {\n            $style['font']['underline'] = $styleAttributeValue;\n        }\n\n        return $style;\n    }\n\n    /**\n     * @param mixed[][] $style\n     *\n     * @return mixed[][]\n     */\n    protected function parseVerticalAlign(array $style, string $styleAttributeValue): array\n    {\n        if ($styleAttributeValue == 'Superscript') {\n            $style['font']['superscript'] = true;\n        }\n        if ($styleAttributeValue == 'Subscript') {\n            $style['font']['subscript'] = true;\n        }\n\n        return $style;\n    }\n\n    /** @return mixed[] */\n    public function parseStyle(SimpleXMLElement $styleAttributes): array\n    {\n        $style = [];\n\n        foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) {\n            $styleAttributeValue = (string) $styleAttributeValue;\n            switch ($styleAttributeKey) {\n                case 'FontName':\n                    $style['font']['name'] = $styleAttributeValue;\n\n                    break;\n                case 'Size':\n                    $style['font']['size'] = $styleAttributeValue;\n\n                    break;\n                case 'Color':\n                    /** @var string[][][] $style */\n                    $style['font']['color']['rgb'] = substr($styleAttributeValue, 1);\n\n                    break;\n                case 'Bold':\n                    $style['font']['bold'] = $styleAttributeValue === '1';\n\n                    break;\n                case 'Italic':\n                    $style['font']['italic'] = $styleAttributeValue === '1';\n\n                    break;\n                case 'Underline':\n                    $style = $this->parseUnderline($style, $styleAttributeValue);\n\n                    break;\n                case 'VerticalAlign':\n                    $style = $this->parseVerticalAlign($style, $styleAttributeValue);\n\n                    break;\n            }\n        }\n\n        return $style;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/Style/NumberFormat.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\Style;\n\nuse SimpleXMLElement;\n\nclass NumberFormat extends StyleBase\n{\n    /** @return mixed[] */\n    public function parseStyle(SimpleXMLElement $styleAttributes): array\n    {\n        $style = [];\n\n        $fromFormats = ['\\-', '\\ '];\n        $toFormats = ['-', ' '];\n\n        foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) {\n            $styleAttributeValue = str_replace($fromFormats, $toFormats, (string) $styleAttributeValue);\n\n            switch ($styleAttributeValue) {\n                case 'Short Date':\n                    $styleAttributeValue = 'dd/mm/yyyy';\n\n                    break;\n            }\n\n            if ($styleAttributeValue > '') {\n                $style['numberFormat']['formatCode'] = $styleAttributeValue;\n            }\n        }\n\n        return $style;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/Style/StyleBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\Style;\n\nuse SimpleXMLElement;\n\nabstract class StyleBase\n{\n    /** @param string[] $styleList */\n    protected static function identifyFixedStyleValue(array $styleList, string &$styleAttributeValue): bool\n    {\n        $returnValue = false;\n\n        $styleAttributeValue = strtolower($styleAttributeValue);\n        foreach ($styleList as $style) {\n            if ($styleAttributeValue == strtolower($style)) {\n                $styleAttributeValue = $style;\n                $returnValue = true;\n\n                break;\n            }\n        }\n\n        return $returnValue;\n    }\n\n    protected static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement\n    {\n        return ($simple === null) ? new SimpleXMLElement('<xml></xml>') : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>'));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml/Style.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse SimpleXMLElement;\n\nclass Style\n{\n    /**\n     * Formats.\n     *\n     * @var mixed[]\n     */\n    protected array $styles = [];\n\n    /**\n     * @param string[] $namespaces\n     *\n     * @return mixed[]\n     */\n    public function parseStyles(SimpleXMLElement $xml, array $namespaces): array\n    {\n        $children = $xml->children('urn:schemas-microsoft-com:office:spreadsheet');\n        $stylesXml = $children->Styles[0];\n        if (!isset($stylesXml)) {\n            return [];\n        }\n\n        $alignmentStyleParser = new Style\\Alignment();\n        $borderStyleParser = new Style\\Border();\n        $fontStyleParser = new Style\\Font();\n        $fillStyleParser = new Style\\Fill();\n        $numberFormatStyleParser = new Style\\NumberFormat();\n\n        foreach ($stylesXml as $style) {\n            /** @var SimpleXMLElement $style */\n            $style_ss = self::getAttributes($style, $namespaces['ss']);\n            $styleID = (string) $style_ss['ID'];\n            $this->styles[$styleID] = $this->styles['Default'] ?? [];\n\n            $alignment = $border = $font = $fill = $numberFormat = $protection = [];\n\n            foreach ($style as $styleType => $styleDatax) {\n                $styleData = self::getSxml($styleDatax);\n                $styleAttributes = $styleData->attributes($namespaces['ss']);\n\n                switch ($styleType) {\n                    case 'Alignment':\n                        if ($styleAttributes) {\n                            $alignment = $alignmentStyleParser->parseStyle($styleAttributes);\n                        }\n\n                        break;\n                    case 'Borders':\n                        $border = $borderStyleParser->parseStyle($styleData, $namespaces);\n\n                        break;\n                    case 'Font':\n                        if ($styleAttributes) {\n                            $font = $fontStyleParser->parseStyle($styleAttributes);\n                        }\n\n                        break;\n                    case 'Interior':\n                        if ($styleAttributes) {\n                            $fill = $fillStyleParser->parseStyle($styleAttributes);\n                        }\n\n                        break;\n                    case 'NumberFormat':\n                        if ($styleAttributes) {\n                            $numberFormat = $numberFormatStyleParser->parseStyle($styleAttributes);\n                        }\n\n                        break;\n                    case 'Protection':\n                        $locked = $hidden = null;\n                        $styleAttributesP = array_key_exists('x', $namespaces) ? $styleData->attributes($namespaces['x']) : [];\n                        if (isset($styleAttributes['Protected'])) {\n                            $locked = ((bool) (string) $styleAttributes['Protected']) ? Protection::PROTECTION_PROTECTED : Protection::PROTECTION_UNPROTECTED;\n                        }\n                        if (isset($styleAttributesP['HideFormula'])) {\n                            $hidden = ((bool) (string) $styleAttributesP['HideFormula']) ? Protection::PROTECTION_PROTECTED : Protection::PROTECTION_UNPROTECTED;\n                        }\n                        if ($locked !== null || $hidden !== null) {\n                            $protection['protection'] = [];\n                            if ($locked !== null) {\n                                $protection['protection']['locked'] = $locked;\n                            }\n                            if ($hidden !== null) {\n                                $protection['protection']['hidden'] = $hidden;\n                            }\n                        }\n\n                        break;\n                }\n            }\n\n            $this->styles[$styleID] = array_merge($alignment, $border, $font, $fill, $numberFormat, $protection);\n        }\n\n        return $this->styles;\n    }\n\n    private static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement\n    {\n        return ($simple === null) ? new SimpleXMLElement('<xml></xml>') : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>'));\n    }\n\n    private static function getSxml(?SimpleXMLElement $simple): SimpleXMLElement\n    {\n        return ($simple !== null) ? $simple : new SimpleXMLElement('<xml></xml>');\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Reader/Xml.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Reader;\n\nuse DateTime;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressHelper;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Html as HelperHtml;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Security\\XmlScanner;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\PageSettings;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml\\Style;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\SheetView;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse SimpleXMLElement;\nuse Throwable;\n\n/**\n * Reader for SpreadsheetML, the XML schema for Microsoft Office Excel 2003.\n */\nclass Xml extends BaseReader\n{\n    public const NAMESPACES_SS = 'urn:schemas-microsoft-com:office:spreadsheet';\n\n    /**\n     * Formats.\n     *\n     * @var mixed[]\n     */\n    protected array $styles = [];\n\n    /**\n     * Create a new Excel2003XML Reader instance.\n     */\n    public function __construct()\n    {\n        parent::__construct();\n        $this->securityScanner = XmlScanner::getInstance($this);\n        /** @var callable */\n        $unentity = [self::class, 'unentity'];\n        $this->securityScanner->setAdditionalCallback($unentity);\n    }\n\n    public static function unentity(string $contents): string\n    {\n        $contents = preg_replace('/&(amp|lt|gt|quot|apos);/', \"\\u{fffe}\\u{feff}\\$1;\", trim($contents)) ?? $contents;\n        $contents = html_entity_decode($contents, ENT_NOQUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8');\n        $contents = str_replace(\"\\u{fffe}\\u{feff}\", '&', $contents);\n\n        return $contents;\n    }\n\n    private string $fileContents = '';\n\n    private string $xmlFailMessage = '';\n\n    /** @return mixed[] */\n    public static function xmlMappings(): array\n    {\n        return array_merge(\n            Style\\Fill::FILL_MAPPINGS,\n            Style\\Border::BORDER_MAPPINGS\n        );\n    }\n\n    /**\n     * Can the current IReader read the file?\n     */\n    public function canRead(string $filename): bool\n    {\n        //    Office                    xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n        //    Excel                    xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n        //    XML Spreadsheet            xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n        //    Spreadsheet component    xmlns:c=\"urn:schemas-microsoft-com:office:component:spreadsheet\"\n        //    XML schema                 xmlns:s=\"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882\"\n        //    XML data type            xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"\n        //    MS-persist recordset    xmlns:rs=\"urn:schemas-microsoft-com:rowset\"\n        //    Rowset                    xmlns:z=\"#RowsetSchema\"\n        //\n\n        $signature = [\n            '<?xml version=\"1.0\"',\n            'xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet',\n        ];\n\n        // Open file\n        $data = (string) file_get_contents($filename);\n        $data = $this->getSecurityScannerOrThrow()->scan($data);\n\n        // Why?\n        //$data = str_replace(\"'\", '\"', $data); // fix headers with single quote\n\n        $valid = true;\n        foreach ($signature as $match) {\n            // every part of the signature must be present\n            if (!str_contains($data, $match)) {\n                $valid = false;\n\n                break;\n            }\n        }\n\n        $this->fileContents = $data;\n\n        return $valid;\n    }\n\n    /** @return false|SimpleXMLElement */\n    private function trySimpleXMLLoadStringPrivate(string $filename, string $fileOrString = 'file'): SimpleXMLElement|bool\n    {\n        $this->xmlFailMessage = \"Cannot load invalid XML $fileOrString: \" . $filename;\n        $xml = false;\n\n        try {\n            $data = $this->fileContents;\n            $continue = true;\n            if ($data === '' && $fileOrString === 'file') {\n                if ($filename === '') {\n                    $this->xmlFailMessage = 'Cannot load empty path';\n                    $continue = false;\n                } else {\n                    $datax = @file_get_contents($filename);\n                    $data = $datax ?: '';\n                    $continue = $datax !== false;\n                }\n            }\n            if ($continue) {\n                $xml = @simplexml_load_string(\n                    $this->getSecurityScannerOrThrow()\n                        ->scan($data)\n                );\n            }\n        } catch (Throwable $e) {\n            throw new Exception($this->xmlFailMessage, 0, $e);\n        }\n        $this->fileContents = '';\n\n        return $xml;\n    }\n\n    /**\n     * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object.\n     *\n     * @return string[]\n     */\n    public function listWorksheetNames(string $filename): array\n    {\n        File::assertFile($filename);\n        if (!$this->canRead($filename)) {\n            throw new Exception($filename . ' is an Invalid Spreadsheet file.');\n        }\n\n        $worksheetNames = [];\n\n        $xml = $this->trySimpleXMLLoadStringPrivate($filename);\n        if ($xml === false) {\n            throw new Exception(\"Problem reading {$filename}\");\n        }\n\n        $xml_ss = $xml->children(self::NAMESPACES_SS);\n        foreach ($xml_ss->Worksheet as $worksheet) {\n            $worksheet_ss = self::getAttributes($worksheet, self::NAMESPACES_SS);\n            $worksheetNames[] = (string) $worksheet_ss['Name'];\n        }\n\n        return $worksheetNames;\n    }\n\n    /**\n     * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).\n     *\n     * @return array<int, array{worksheetName: string, lastColumnLetter: string, lastColumnIndex: int, totalRows: int, totalColumns: int, sheetState: string}>\n     */\n    public function listWorksheetInfo(string $filename): array\n    {\n        File::assertFile($filename);\n        if (!$this->canRead($filename)) {\n            throw new Exception($filename . ' is an Invalid Spreadsheet file.');\n        }\n\n        $worksheetInfo = [];\n\n        $xml = $this->trySimpleXMLLoadStringPrivate($filename);\n        if ($xml === false) {\n            throw new Exception(\"Problem reading {$filename}\");\n        }\n\n        $worksheetID = 1;\n        $xml_ss = $xml->children(self::NAMESPACES_SS);\n        foreach ($xml_ss->Worksheet as $worksheet) {\n            $worksheet_ss = self::getAttributes($worksheet, self::NAMESPACES_SS);\n\n            $tmpInfo = [];\n            $tmpInfo['worksheetName'] = '';\n            $tmpInfo['lastColumnLetter'] = 'A';\n            $tmpInfo['lastColumnIndex'] = 0;\n            $tmpInfo['totalRows'] = 0;\n            $tmpInfo['totalColumns'] = 0;\n\n            $tmpInfo['worksheetName'] = \"Worksheet_{$worksheetID}\";\n            if (isset($worksheet_ss['Name'])) {\n                $tmpInfo['worksheetName'] = (string) $worksheet_ss['Name'];\n            }\n\n            if (isset($worksheet->Table->Row)) {\n                $rowIndex = 0;\n\n                foreach ($worksheet->Table->Row as $rowData) {\n                    $columnIndex = 0;\n                    $rowHasData = false;\n\n                    foreach ($rowData->Cell as $cell) {\n                        if (isset($cell->Data)) {\n                            $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex);\n                            $rowHasData = true;\n                        }\n\n                        ++$columnIndex;\n                    }\n\n                    ++$rowIndex;\n\n                    if ($rowHasData) {\n                        $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex);\n                    }\n                }\n            }\n\n            $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1, true);\n            $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1;\n            $tmpInfo['sheetState'] = Worksheet::SHEETSTATE_VISIBLE;\n\n            $worksheetInfo[] = $tmpInfo;\n            ++$worksheetID;\n        }\n\n        return $worksheetInfo;\n    }\n\n    /**\n     * Loads Spreadsheet from string.\n     */\n    public function loadSpreadsheetFromString(string $contents): Spreadsheet\n    {\n        $spreadsheet = $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n        $spreadsheet->removeSheetByIndex(0);\n\n        // Load into this instance\n        return $this->loadIntoExisting($contents, $spreadsheet, true);\n    }\n\n    /**\n     * Loads Spreadsheet from file.\n     */\n    protected function loadSpreadsheetFromFile(string $filename): Spreadsheet\n    {\n        $spreadsheet = $this->newSpreadsheet();\n        $spreadsheet->setValueBinder($this->valueBinder);\n        $spreadsheet->removeSheetByIndex(0);\n\n        // Load into this instance\n        return $this->loadIntoExisting($filename, $spreadsheet);\n    }\n\n    /**\n     * Loads from file or contents into Spreadsheet instance.\n     *\n     * @param string $filename file name if useContents is false else file contents\n     */\n    public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet, bool $useContents = false): Spreadsheet\n    {\n        if ($useContents) {\n            $this->fileContents = $filename;\n            $fileOrString = 'string';\n        } else {\n            File::assertFile($filename);\n            if (!$this->canRead($filename)) {\n                throw new Exception($filename . ' is an Invalid Spreadsheet file.');\n            }\n            $fileOrString = 'file';\n        }\n\n        $xml = $this->trySimpleXMLLoadStringPrivate($filename, $fileOrString);\n        if ($xml === false) {\n            throw new Exception($this->xmlFailMessage);\n        }\n\n        $namespaces = $xml->getNamespaces(true);\n\n        (new Properties($spreadsheet))->readProperties($xml, $namespaces);\n\n        $this->styles = (new Style())->parseStyles($xml, $namespaces);\n        if (isset($this->styles['Default']) && is_array($this->styles['Default'])) {\n            $spreadsheet->getCellXfCollection()[0]->applyFromArray($this->styles['Default']);\n        }\n\n        $worksheetID = 0;\n        $xml_ss = $xml->children(self::NAMESPACES_SS);\n\n        $sheetCreated = false;\n        /** @var null|SimpleXMLElement $worksheetx */\n        foreach ($xml_ss->Worksheet as $worksheetx) {\n            $worksheet = $worksheetx ?? new SimpleXMLElement('<xml></xml>');\n            $worksheet_ss = self::getAttributes($worksheet, self::NAMESPACES_SS);\n\n            if (\n                isset($this->loadSheetsOnly, $worksheet_ss['Name'])\n                && (!in_array($worksheet_ss['Name'], $this->loadSheetsOnly))\n            ) {\n                continue;\n            }\n\n            // Create new Worksheet\n            $spreadsheet->createSheet();\n            $sheetCreated = true;\n            $spreadsheet->setActiveSheetIndex($worksheetID);\n            $worksheetName = '';\n            if (isset($worksheet_ss['Name'])) {\n                $worksheetName = (string) $worksheet_ss['Name'];\n                //    Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in\n                //        formula cells... during the load, all formulae should be correct, and we're simply bringing\n                //        the worksheet name in line with the formula, not the reverse\n                $spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false);\n            }\n            if (isset($worksheet_ss['Protected'])) {\n                $protection = (string) $worksheet_ss['Protected'] === '1';\n                $spreadsheet->getActiveSheet()->getProtection()->setSheet($protection);\n            }\n\n            // locally scoped defined names\n            if (isset($worksheet->Names[0])) {\n                foreach ($worksheet->Names[0] as $definedName) {\n                    $definedName_ss = self::getAttributes($definedName, self::NAMESPACES_SS);\n                    $name = (string) $definedName_ss['Name'];\n                    $definedValue = (string) $definedName_ss['RefersTo'];\n                    $convertedValue = AddressHelper::convertFormulaToA1($definedValue);\n                    if ($convertedValue[0] === '=') {\n                        $convertedValue = substr($convertedValue, 1);\n                    }\n                    $spreadsheet->addDefinedName(DefinedName::createInstance($name, $spreadsheet->getActiveSheet(), $convertedValue, true));\n                }\n            }\n\n            $columnID = 'A';\n            if (isset($worksheet->Table->Column)) {\n                foreach ($worksheet->Table->Column as $columnData) {\n                    $columnData_ss = self::getAttributes($columnData, self::NAMESPACES_SS);\n                    $colspan = 0;\n                    if (isset($columnData_ss['Span'])) {\n                        $spanAttr = (string) $columnData_ss['Span'];\n                        if (is_numeric($spanAttr)) {\n                            $colspan = max(0, (int) $spanAttr);\n                        }\n                    }\n                    if (isset($columnData_ss['Index'])) {\n                        $columnID = Coordinate::stringFromColumnIndex((int) $columnData_ss['Index']);\n                    }\n                    $columnWidth = null;\n                    if (isset($columnData_ss['Width'])) {\n                        $columnWidth = $columnData_ss['Width'];\n                    }\n                    $columnVisible = null;\n                    if (isset($columnData_ss['Hidden'])) {\n                        $columnVisible = ((string) $columnData_ss['Hidden']) !== '1';\n                    }\n                    while ($colspan >= 0) {\n                        /** @var string $columnID */\n                        if (isset($columnWidth)) {\n                            $spreadsheet->getActiveSheet()->getColumnDimension($columnID)->setWidth($columnWidth / 5.4);\n                        }\n                        if (isset($columnVisible)) {\n                            $spreadsheet->getActiveSheet()->getColumnDimension($columnID)->setVisible($columnVisible);\n                        }\n                        StringHelper::stringIncrement($columnID);\n                        --$colspan;\n                    }\n                }\n            }\n\n            $rowID = 1;\n            if (isset($worksheet->Table->Row)) {\n                $additionalMergedCells = 0;\n                foreach ($worksheet->Table->Row as $rowData) {\n                    $rowHasData = false;\n                    $row_ss = self::getAttributes($rowData, self::NAMESPACES_SS);\n                    if (isset($row_ss['Index'])) {\n                        $rowID = (int) $row_ss['Index'];\n                    }\n                    if (isset($row_ss['Hidden'])) {\n                        $rowVisible = ((string) $row_ss['Hidden']) !== '1';\n                        $spreadsheet->getActiveSheet()->getRowDimension($rowID)->setVisible($rowVisible);\n                    }\n\n                    $columnID = 'A';\n                    foreach ($rowData->Cell as $cell) {\n                        $arrayRef = '';\n                        $cell_ss = self::getAttributes($cell, self::NAMESPACES_SS);\n                        if (isset($cell_ss['Index'])) {\n                            $columnID = Coordinate::stringFromColumnIndex((int) $cell_ss['Index']);\n                        }\n                        $cellRange = $columnID . $rowID;\n                        if (isset($cell_ss['ArrayRange'])) {\n                            $arrayRange = (string) $cell_ss['ArrayRange'];\n                            $arrayRef = AddressHelper::convertFormulaToA1($arrayRange, $rowID, Coordinate::columnIndexFromString($columnID));\n                        }\n\n                        if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {\n                            StringHelper::stringIncrement($columnID);\n\n                            continue;\n                        }\n\n                        if (isset($cell_ss['HRef'])) {\n                            $spreadsheet->getActiveSheet()->getCell($cellRange)->getHyperlink()->setUrl((string) $cell_ss['HRef']);\n                        }\n\n                        if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) {\n                            $columnTo = $columnID;\n                            if (isset($cell_ss['MergeAcross'])) {\n                                $additionalMergedCells += (int) $cell_ss['MergeAcross'];\n                                $columnTo = Coordinate::stringFromColumnIndex((int) (Coordinate::columnIndexFromString($columnID) + $cell_ss['MergeAcross']));\n                            }\n                            $rowTo = $rowID;\n                            if (isset($cell_ss['MergeDown'])) {\n                                $rowTo = $rowTo + $cell_ss['MergeDown'];\n                            }\n                            $cellRange .= ':' . $columnTo . $rowTo;\n                            $spreadsheet->getActiveSheet()->mergeCells($cellRange, Worksheet::MERGE_CELL_CONTENT_HIDE);\n                        }\n\n                        $hasCalculatedValue = false;\n                        $cellDataFormula = '';\n                        if (isset($cell_ss['Formula'])) {\n                            $cellDataFormula = $cell_ss['Formula'];\n                            $hasCalculatedValue = true;\n                            if ($arrayRef !== '') {\n                                $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setFormulaAttributes(['t' => 'array', 'ref' => $arrayRef]);\n                            }\n                        }\n                        if (isset($cell->Data)) {\n                            $cellData = $cell->Data;\n                            $cellValue = (string) $cellData;\n                            $type = DataType::TYPE_NULL;\n                            $cellData_ss = self::getAttributes($cellData, self::NAMESPACES_SS);\n                            if (isset($cellData_ss['Type'])) {\n                                $cellDataType = $cellData_ss['Type'];\n                                switch ($cellDataType) {\n                                    /*\n                                    const TYPE_STRING        = 's';\n                                    const TYPE_FORMULA        = 'f';\n                                    const TYPE_NUMERIC        = 'n';\n                                    const TYPE_BOOL            = 'b';\n                                    const TYPE_NULL            = 'null';\n                                    const TYPE_INLINE        = 'inlineStr';\n                                    const TYPE_ERROR        = 'e';\n                                    */\n                                    case 'String':\n                                        $type = DataType::TYPE_STRING;\n                                        $rich = $cellData->children('http://www.w3.org/TR/REC-html40');\n                                        if ($rich) {\n                                            // in case of HTML content we extract the payload\n                                            // and convert it into a rich text object\n                                            $content = $cellData->asXML() ?: '';\n                                            $html = new HelperHtml();\n                                            $cellValue = $html->toRichTextObject($content, true);\n                                        }\n\n                                        break;\n                                    case 'Number':\n                                        $type = DataType::TYPE_NUMERIC;\n                                        $cellValue = (float) $cellValue;\n                                        if (floor($cellValue) == $cellValue) {\n                                            $cellValue = (int) $cellValue;\n                                        }\n\n                                        break;\n                                    case 'Boolean':\n                                        $type = DataType::TYPE_BOOL;\n                                        $cellValue = ($cellValue != 0);\n\n                                        break;\n                                    case 'DateTime':\n                                        $type = DataType::TYPE_NUMERIC;\n                                        $dateTime = new DateTime($cellValue, new DateTimeZone('UTC'));\n                                        $cellValue = Date::PHPToExcel($dateTime);\n\n                                        break;\n                                    case 'Error':\n                                        $type = DataType::TYPE_ERROR;\n                                        $hasCalculatedValue = false;\n\n                                        break;\n                                }\n                            }\n\n                            $originalType = $type;\n                            if ($hasCalculatedValue) {\n                                $type = DataType::TYPE_FORMULA;\n                                $columnNumber = Coordinate::columnIndexFromString($columnID);\n                                $cellDataFormula = AddressHelper::convertFormulaToA1($cellDataFormula, $rowID, $columnNumber);\n                            }\n\n                            $hyperlink = null;\n                            if ($spreadsheet->getActiveSheet()->hyperlinkExists($columnID . $rowID)) {\n                                $hyperlink = $spreadsheet->getActiveSheet()->getHyperlink($columnID . $rowID);\n                            }\n                            $spreadsheet->getActiveSheet()\n                                ->getCell($columnID . $rowID)\n                                ->setValueExplicit(\n                                    $hasCalculatedValue ? $cellDataFormula : $cellValue,\n                                    $type\n                                );\n                            $spreadsheet->getActiveSheet()\n                                ->setHyperlink($columnID . $rowID, $hyperlink);\n                            if ($hasCalculatedValue) {\n                                $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setCalculatedValue($cellValue, $originalType === DataType::TYPE_NUMERIC);\n                            }\n                            $rowHasData = true;\n                        }\n\n                        if (isset($cell->Comment)) {\n                            $this->parseCellComment($cell->Comment, $spreadsheet, $columnID, $rowID);\n                        }\n\n                        if (isset($cell_ss['StyleID'])) {\n                            $style = (string) $cell_ss['StyleID'];\n                            if ((isset($this->styles[$style])) && is_array($this->styles[$style]) && (!empty($this->styles[$style]))) {\n                                $spreadsheet->getActiveSheet()->getStyle($cellRange)\n                                    ->applyFromArray($this->styles[$style]);\n                            }\n                        }\n                        StringHelper::stringIncrement($columnID);\n                        while ($additionalMergedCells > 0) {\n                            StringHelper::stringIncrement($columnID);\n                            --$additionalMergedCells;\n                        }\n                    }\n\n                    if ($rowHasData) {\n                        if (isset($row_ss['Height'])) {\n                            $rowHeight = $row_ss['Height'];\n                            $spreadsheet->getActiveSheet()->getRowDimension($rowID)->setRowHeight((float) $rowHeight);\n                        }\n                    }\n\n                    ++$rowID;\n                }\n            }\n\n            $dataValidations = new Xml\\DataValidations();\n            $dataValidations->loadDataValidations($worksheet, $spreadsheet);\n            $xmlX = $worksheet->children(Namespaces::URN_EXCEL);\n            if (isset($xmlX->WorksheetOptions)) {\n                if (isset($xmlX->WorksheetOptions->ShowPageBreakZoom)) {\n                    $spreadsheet->getActiveSheet()->getSheetView()->setView(SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW);\n                }\n                if (isset($xmlX->WorksheetOptions->Zoom)) {\n                    $zoomScaleNormal = (int) $xmlX->WorksheetOptions->Zoom;\n                    if ($zoomScaleNormal > 0) {\n                        $spreadsheet->getActiveSheet()->getSheetView()->setZoomScaleNormal($zoomScaleNormal);\n                        $spreadsheet->getActiveSheet()->getSheetView()->setZoomScale($zoomScaleNormal);\n                    }\n                }\n                if (isset($xmlX->WorksheetOptions->PageBreakZoom)) {\n                    $zoomScaleNormal = (int) $xmlX->WorksheetOptions->PageBreakZoom;\n                    if ($zoomScaleNormal > 0) {\n                        $spreadsheet->getActiveSheet()->getSheetView()->setZoomScaleSheetLayoutView($zoomScaleNormal);\n                    }\n                }\n                if (isset($xmlX->WorksheetOptions->ShowPageBreakZoom)) {\n                    $spreadsheet->getActiveSheet()->getSheetView()->setView(SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW);\n                }\n                if (isset($xmlX->WorksheetOptions->FreezePanes)) {\n                    $freezeRow = $freezeColumn = 1;\n                    if (isset($xmlX->WorksheetOptions->SplitHorizontal)) {\n                        $freezeRow = (int) $xmlX->WorksheetOptions->SplitHorizontal + 1;\n                    }\n                    if (isset($xmlX->WorksheetOptions->SplitVertical)) {\n                        $freezeColumn = (int) $xmlX->WorksheetOptions->SplitVertical + 1;\n                    }\n                    $leftTopRow = (string) $xmlX->WorksheetOptions->TopRowBottomPane;\n                    $leftTopColumn = (string) $xmlX->WorksheetOptions->LeftColumnRightPane;\n                    if (is_numeric($leftTopRow) && is_numeric($leftTopColumn)) {\n                        $leftTopCoordinate = Coordinate::stringFromColumnIndex((int) $leftTopColumn + 1) . (string) ($leftTopRow + 1);\n                        $spreadsheet->getActiveSheet()->freezePane(Coordinate::stringFromColumnIndex($freezeColumn) . (string) $freezeRow, $leftTopCoordinate, !isset($xmlX->WorksheetOptions->FrozenNoSplit));\n                    } else {\n                        $spreadsheet->getActiveSheet()->freezePane(Coordinate::stringFromColumnIndex($freezeColumn) . (string) $freezeRow, null, !isset($xmlX->WorksheetOptions->FrozenNoSplit));\n                    }\n                } elseif (isset($xmlX->WorksheetOptions->SplitVertical) || isset($xmlX->WorksheetOptions->SplitHorizontal)) {\n                    if (isset($xmlX->WorksheetOptions->SplitHorizontal)) {\n                        $ySplit = (int) $xmlX->WorksheetOptions->SplitHorizontal;\n                        $spreadsheet->getActiveSheet()->setYSplit($ySplit);\n                    }\n                    if (isset($xmlX->WorksheetOptions->SplitVertical)) {\n                        $xSplit = (int) $xmlX->WorksheetOptions->SplitVertical;\n                        $spreadsheet->getActiveSheet()->setXSplit($xSplit);\n                    }\n                    if (isset($xmlX->WorksheetOptions->LeftColumnVisible) || isset($xmlX->WorksheetOptions->TopRowVisible)) {\n                        $leftTopColumn = $leftTopRow = 1;\n                        if (isset($xmlX->WorksheetOptions->LeftColumnVisible)) {\n                            $leftTopColumn = 1 + (int) $xmlX->WorksheetOptions->LeftColumnVisible;\n                        }\n                        if (isset($xmlX->WorksheetOptions->TopRowVisible)) {\n                            $leftTopRow = 1 + (int) $xmlX->WorksheetOptions->TopRowVisible;\n                        }\n                        $leftTopCoordinate = Coordinate::stringFromColumnIndex($leftTopColumn) . \"$leftTopRow\";\n                        $spreadsheet->getActiveSheet()->setTopLeftCell($leftTopCoordinate);\n                    }\n\n                    $leftTopColumn = $leftTopRow = 1;\n                    if (isset($xmlX->WorksheetOptions->LeftColumnRightPane)) {\n                        $leftTopColumn = 1 + (int) $xmlX->WorksheetOptions->LeftColumnRightPane;\n                    }\n                    if (isset($xmlX->WorksheetOptions->TopRowBottomPane)) {\n                        $leftTopRow = 1 + (int) $xmlX->WorksheetOptions->TopRowBottomPane;\n                    }\n                    $leftTopCoordinate = Coordinate::stringFromColumnIndex($leftTopColumn) . \"$leftTopRow\";\n                    $spreadsheet->getActiveSheet()->setPaneTopLeftCell($leftTopCoordinate);\n                }\n                (new PageSettings($xmlX))->loadPageSettings($spreadsheet);\n                if (isset($xmlX->WorksheetOptions->TopRowVisible, $xmlX->WorksheetOptions->LeftColumnVisible)) {\n                    $leftTopRow = (string) $xmlX->WorksheetOptions->TopRowVisible;\n                    $leftTopColumn = (string) $xmlX->WorksheetOptions->LeftColumnVisible;\n                    if (is_numeric($leftTopRow) && is_numeric($leftTopColumn)) {\n                        $leftTopCoordinate = Coordinate::stringFromColumnIndex((int) $leftTopColumn + 1) . (string) ($leftTopRow + 1);\n                        $spreadsheet->getActiveSheet()->setTopLeftCell($leftTopCoordinate);\n                    }\n                }\n                $rangeCalculated = false;\n                if (isset($xmlX->WorksheetOptions->Panes->Pane->RangeSelection)) {\n                    if (1 === preg_match('/^R(\\d+)C(\\d+):R(\\d+)C(\\d+)$/', (string) $xmlX->WorksheetOptions->Panes->Pane->RangeSelection, $selectionMatches)) {\n                        $selectedCell = Coordinate::stringFromColumnIndex((int) $selectionMatches[2])\n                            . $selectionMatches[1]\n                            . ':'\n                            . Coordinate::stringFromColumnIndex((int) $selectionMatches[4])\n                            . $selectionMatches[3];\n                        $spreadsheet->getActiveSheet()->setSelectedCells($selectedCell);\n                        $rangeCalculated = true;\n                    }\n                }\n                if (!$rangeCalculated) {\n                    if (isset($xmlX->WorksheetOptions->Panes->Pane->ActiveRow)) {\n                        $activeRow = (string) $xmlX->WorksheetOptions->Panes->Pane->ActiveRow;\n                    } else {\n                        $activeRow = 0;\n                    }\n                    if (isset($xmlX->WorksheetOptions->Panes->Pane->ActiveCol)) {\n                        $activeColumn = (string) $xmlX->WorksheetOptions->Panes->Pane->ActiveCol;\n                    } else {\n                        $activeColumn = 0;\n                    }\n                    if (is_numeric($activeRow) && is_numeric($activeColumn)) {\n                        $selectedCell = Coordinate::stringFromColumnIndex((int) $activeColumn + 1) . (string) ($activeRow + 1);\n                        $spreadsheet->getActiveSheet()->setSelectedCells($selectedCell);\n                    }\n                }\n            }\n            if (isset($xmlX->PageBreaks)) {\n                if (isset($xmlX->PageBreaks->ColBreaks)) {\n                    foreach ($xmlX->PageBreaks->ColBreaks->ColBreak as $colBreak) {\n                        $colBreak = (string) $colBreak->Column;\n                        $spreadsheet->getActiveSheet()->setBreak([1 + (int) $colBreak, 1], Worksheet::BREAK_COLUMN);\n                    }\n                }\n                if (isset($xmlX->PageBreaks->RowBreaks)) {\n                    foreach ($xmlX->PageBreaks->RowBreaks->RowBreak as $rowBreak) {\n                        $rowBreak = (string) $rowBreak->Row;\n                        $spreadsheet->getActiveSheet()->setBreak([1, (int) $rowBreak], Worksheet::BREAK_ROW);\n                    }\n                }\n            }\n            ++$worksheetID;\n        }\n        if ($this->createBlankSheetIfNoneRead && !$sheetCreated) {\n            $spreadsheet->createSheet();\n        }\n\n        // Globally scoped defined names\n        $activeSheetIndex = 0;\n        if (isset($xml->ExcelWorkbook->ActiveSheet)) {\n            $activeSheetIndex = (int) (string) $xml->ExcelWorkbook->ActiveSheet;\n        }\n        $activeWorksheet = $spreadsheet->setActiveSheetIndex($activeSheetIndex);\n        if (isset($xml->Names[0])) {\n            foreach ($xml->Names[0] as $definedName) {\n                $definedName_ss = self::getAttributes($definedName, self::NAMESPACES_SS);\n                $name = (string) $definedName_ss['Name'];\n                $definedValue = (string) $definedName_ss['RefersTo'];\n                $convertedValue = AddressHelper::convertFormulaToA1($definedValue);\n                if ($convertedValue[0] === '=') {\n                    $convertedValue = substr($convertedValue, 1);\n                }\n                $spreadsheet->addDefinedName(DefinedName::createInstance($name, $activeWorksheet, $convertedValue));\n            }\n        }\n\n        // Return\n        return $spreadsheet;\n    }\n\n    protected function parseCellComment(\n        SimpleXMLElement $comment,\n        Spreadsheet $spreadsheet,\n        string $columnID,\n        int $rowID\n    ): void {\n        $commentAttributes = $comment->attributes(self::NAMESPACES_SS);\n        $author = 'unknown';\n        if (isset($commentAttributes->Author)) {\n            $author = (string) $commentAttributes->Author;\n        }\n\n        $node = $comment->Data->asXML();\n        $annotation = strip_tags((string) $node);\n        $spreadsheet->getActiveSheet()->getComment($columnID . $rowID)\n            ->setAuthor($author)\n            ->setText($this->parseRichText($annotation));\n    }\n\n    protected function parseRichText(string $annotation): RichText\n    {\n        $value = new RichText();\n\n        $value->createText($annotation);\n\n        return $value;\n    }\n\n    private static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement\n    {\n        return ($simple === null)\n            ? new SimpleXMLElement('<xml></xml>')\n            : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>'));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/ReferenceHelper.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass ReferenceHelper\n{\n    /**    Constants                */\n    /**    Regular Expressions      */\n    private const SHEETNAME_PART = '((\\w*|\\'[^!]*\\')!)';\n    private const SHEETNAME_PART_WITH_SLASHES = '/' . self::SHEETNAME_PART . '/';\n    const REFHELPER_REGEXP_CELLREF = self::SHEETNAME_PART . '?(?<![:a-z1-9_\\.\\$])(\\$?[a-z]{1,3}\\$?\\d+)(?=[^:!\\d\\'])';\n    const REFHELPER_REGEXP_CELLRANGE = self::SHEETNAME_PART . '?(\\$?[a-z]{1,3}\\$?\\d+):(\\$?[a-z]{1,3}\\$?\\d+)';\n    const REFHELPER_REGEXP_ROWRANGE = self::SHEETNAME_PART . '?(\\$?\\d+):(\\$?\\d+)';\n    const REFHELPER_REGEXP_COLRANGE = self::SHEETNAME_PART . '?(\\$?[a-z]{1,3}):(\\$?[a-z]{1,3})';\n\n    /**\n     * Instance of this class.\n     */\n    private static ?ReferenceHelper $instance = null;\n\n    private ?CellReferenceHelper $cellReferenceHelper = null;\n\n    /**\n     * Get an instance of this class.\n     */\n    public static function getInstance(): self\n    {\n        if (self::$instance === null) {\n            self::$instance = new self();\n        }\n\n        return self::$instance;\n    }\n\n    /**\n     * Create a new ReferenceHelper.\n     */\n    protected function __construct()\n    {\n    }\n\n    /**\n     * Compare two column addresses\n     * Intended for use as a Callback function for sorting column addresses by column.\n     *\n     * @param string $a First column to test (e.g. 'AA')\n     * @param string $b Second column to test (e.g. 'Z')\n     */\n    public static function columnSort(string $a, string $b): int\n    {\n        return strcasecmp(strlen($a) . $a, strlen($b) . $b);\n    }\n\n    /**\n     * Compare two column addresses\n     * Intended for use as a Callback function for reverse sorting column addresses by column.\n     *\n     * @param string $a First column to test (e.g. 'AA')\n     * @param string $b Second column to test (e.g. 'Z')\n     */\n    public static function columnReverseSort(string $a, string $b): int\n    {\n        return -strcasecmp(strlen($a) . $a, strlen($b) . $b);\n    }\n\n    /**\n     * Compare two cell addresses\n     * Intended for use as a Callback function for sorting cell addresses by column and row.\n     *\n     * @param string $a First cell to test (e.g. 'AA1')\n     * @param string $b Second cell to test (e.g. 'Z1')\n     */\n    public static function cellSort(string $a, string $b): int\n    {\n        sscanf($a, '%[A-Z]%d', $ac, $ar);\n        /** @var int $ar */\n        /** @var string $ac */\n        sscanf($b, '%[A-Z]%d', $bc, $br);\n        /** @var int $br */\n        /** @var string $bc */\n        if ($ar === $br) {\n            return strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc);\n        }\n\n        return ($ar < $br) ? -1 : 1;\n    }\n\n    /**\n     * Compare two cell addresses\n     * Intended for use as a Callback function for sorting cell addresses by column and row.\n     *\n     * @param string $a First cell to test (e.g. 'AA1')\n     * @param string $b Second cell to test (e.g. 'Z1')\n     */\n    public static function cellReverseSort(string $a, string $b): int\n    {\n        sscanf($a, '%[A-Z]%d', $ac, $ar);\n        /** @var int $ar */\n        /** @var string $ac */\n        sscanf($b, '%[A-Z]%d', $bc, $br);\n        /** @var int $br */\n        /** @var string $bc */\n        if ($ar === $br) {\n            return -strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc);\n        }\n\n        return ($ar < $br) ? 1 : -1;\n    }\n\n    /**\n     * Update page breaks when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion)\n     * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion)\n     */\n    protected function adjustPageBreaks(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void\n    {\n        $aBreaks = $worksheet->getBreaks();\n        ($numberOfColumns > 0 || $numberOfRows > 0)\n            ? uksort($aBreaks, [self::class, 'cellReverseSort'])\n            : uksort($aBreaks, [self::class, 'cellSort']);\n\n        foreach ($aBreaks as $cellAddress => $value) {\n            /** @var CellReferenceHelper */\n            $cellReferenceHelper = $this->cellReferenceHelper;\n            if ($cellReferenceHelper->cellAddressInDeleteRange($cellAddress) === true) {\n                //    If we're deleting, then clear any defined breaks that are within the range\n                //        of rows/columns that we're deleting\n                $worksheet->setBreak($cellAddress, Worksheet::BREAK_NONE);\n            } else {\n                //    Otherwise update any affected breaks by inserting a new break at the appropriate point\n                //        and removing the old affected break\n                $newReference = $this->updateCellReference($cellAddress);\n                if ($cellAddress !== $newReference) {\n                    $worksheet->setBreak($newReference, $value)\n                        ->setBreak($cellAddress, Worksheet::BREAK_NONE);\n                }\n            }\n        }\n    }\n\n    /**\n     * Update cell comments when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     */\n    protected function adjustComments(Worksheet $worksheet): void\n    {\n        $aComments = $worksheet->getComments();\n        $aNewComments = []; // the new array of all comments\n\n        foreach ($aComments as $cellAddress => &$value) {\n            // Any comments inside a deleted range will be ignored\n            /** @var CellReferenceHelper */\n            $cellReferenceHelper = $this->cellReferenceHelper;\n            if ($cellReferenceHelper->cellAddressInDeleteRange($cellAddress) === false) {\n                // Otherwise build a new array of comments indexed by the adjusted cell reference\n                $newReference = $this->updateCellReference($cellAddress);\n                $aNewComments[$newReference] = $value;\n            }\n        }\n        //    Replace the comments array with the new set of comments\n        $worksheet->setComments($aNewComments);\n    }\n\n    /**\n     * Update hyperlinks when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion)\n     * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion)\n     */\n    protected function adjustHyperlinks(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void\n    {\n        $aHyperlinkCollection = $worksheet->getHyperlinkCollection();\n        ($numberOfColumns > 0 || $numberOfRows > 0)\n            ? uksort($aHyperlinkCollection, [self::class, 'cellReverseSort'])\n            : uksort($aHyperlinkCollection, [self::class, 'cellSort']);\n\n        foreach ($aHyperlinkCollection as $cellAddress => $value) {\n            $newReference = $this->updateCellReference($cellAddress);\n            /** @var CellReferenceHelper */\n            $cellReferenceHelper = $this->cellReferenceHelper;\n            if ($cellReferenceHelper->cellAddressInDeleteRange($cellAddress) === true) {\n                $worksheet->setHyperlink($cellAddress, null);\n            } elseif ($cellAddress !== $newReference) {\n                $worksheet->setHyperlink($cellAddress, null);\n                if ($newReference) {\n                    $worksheet->setHyperlink($newReference, $value);\n                }\n            }\n        }\n    }\n\n    /**\n     * Update conditional formatting styles when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion)\n     * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion)\n     */\n    protected function adjustConditionalFormatting(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void\n    {\n        $aStyles = $worksheet->getConditionalStylesCollection();\n        ($numberOfColumns > 0 || $numberOfRows > 0)\n            ? uksort($aStyles, [self::class, 'cellReverseSort'])\n            : uksort($aStyles, [self::class, 'cellSort']);\n\n        foreach ($aStyles as $cellAddress => $cfRules) {\n            $worksheet->removeConditionalStyles($cellAddress);\n            $newReference = $this->updateCellReference($cellAddress);\n\n            foreach ($cfRules as &$cfRule) {\n                /** @var Conditional $cfRule */\n                $conditions = $cfRule->getConditions();\n                foreach ($conditions as &$condition) {\n                    if (is_string($condition)) {\n                        /** @var CellReferenceHelper */\n                        $cellReferenceHelper = $this->cellReferenceHelper;\n                        $condition = $this->updateFormulaReferences(\n                            $condition,\n                            $cellReferenceHelper->beforeCellAddress(),\n                            $numberOfColumns,\n                            $numberOfRows,\n                            $worksheet->getTitle(),\n                            true\n                        );\n                    }\n                }\n                $cfRule->setConditions($conditions);\n            }\n            $worksheet->setConditionalStyles($newReference, $cfRules);\n        }\n    }\n\n    /**\n     * Update data validations when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion)\n     * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion)\n     */\n    protected function adjustDataValidations(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows, string $beforeCellAddress): void\n    {\n        $aDataValidationCollection = $worksheet->getDataValidationCollection();\n        ($numberOfColumns > 0 || $numberOfRows > 0)\n            ? uksort($aDataValidationCollection, [self::class, 'cellReverseSort'])\n            : uksort($aDataValidationCollection, [self::class, 'cellSort']);\n\n        foreach ($aDataValidationCollection as $cellAddress => $dataValidation) {\n            $formula = $dataValidation->getFormula1();\n            if ($formula !== '') {\n                $dataValidation->setFormula1(\n                    $this->updateFormulaReferences(\n                        $formula,\n                        $beforeCellAddress,\n                        $numberOfColumns,\n                        $numberOfRows,\n                        $worksheet->getTitle(),\n                        true\n                    )\n                );\n            }\n            $formula = $dataValidation->getFormula2();\n            if ($formula !== '') {\n                $dataValidation->setFormula2(\n                    $this->updateFormulaReferences(\n                        $formula,\n                        $beforeCellAddress,\n                        $numberOfColumns,\n                        $numberOfRows,\n                        $worksheet->getTitle(),\n                        true\n                    )\n                );\n            }\n            $addressParts = explode(' ', $cellAddress);\n            $newReference = '';\n            $separator = '';\n            foreach ($addressParts as $addressPart) {\n                $newReference .= $separator . $this->updateCellReference($addressPart);\n                $separator = ' ';\n            }\n            if ($cellAddress !== $newReference) {\n                $worksheet->setDataValidation($newReference, $dataValidation);\n                $worksheet->setDataValidation($cellAddress, null);\n                if ($newReference) {\n                    $worksheet->setDataValidation($newReference, $dataValidation);\n                }\n            }\n        }\n    }\n\n    /**\n     * Update merged cells when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     */\n    protected function adjustMergeCells(Worksheet $worksheet): void\n    {\n        $aMergeCells = $worksheet->getMergeCells();\n        $aNewMergeCells = []; // the new array of all merge cells\n        foreach ($aMergeCells as $cellAddress => &$value) {\n            $newReference = $this->updateCellReference($cellAddress);\n            if ($newReference) {\n                $aNewMergeCells[$newReference] = $newReference;\n            }\n        }\n        $worksheet->setMergeCells($aNewMergeCells); // replace the merge cells array\n    }\n\n    /**\n     * Update protected cells when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion)\n     * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion)\n     */\n    protected function adjustProtectedCells(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void\n    {\n        $aProtectedCells = $worksheet->getProtectedCellRanges();\n        /** @var CellReferenceHelper */\n        $cellReferenceHelper = $this->cellReferenceHelper;\n        if ($numberOfRows >= 0 && $numberOfColumns >= 0) {\n            foreach ($aProtectedCells as $key2 => $value) {\n                $ranges = $value->allRanges();\n                $newKey = $separator = '';\n                foreach ($ranges as $key => $range) {\n                    $oldKey = $range[0] . (array_key_exists(1, $range) ? (':' . $range[1]) : '');\n                    $newKey .= $separator . $this->updateCellReference($oldKey);\n                    $separator = ' ';\n                }\n                if ($key2 !== $newKey) {\n                    $worksheet->unprotectCells($key2);\n                    $worksheet->protectCells($newKey, $value->getPassword(), true, $value->getName(), $value->getSecurityDescriptor());\n                }\n            }\n        } else {\n            foreach ($aProtectedCells as $key2 => $value) {\n                $range = str_replace([' ', ',', \"\\0\"], [\"\\0\", ' ', ','], $key2);\n                $extracted = Coordinate::extractAllCellReferencesInRange($range);\n                $outArray = [];\n                foreach ($extracted as $cellAddress) {\n                    if (!$cellReferenceHelper->cellAddressInDeleteRange($cellAddress)) {\n                        $outArray[$this->updateCellReference($cellAddress)] = 'x';\n                    }\n                }\n                $outArray2 = Coordinate::mergeRangesInCollection($outArray);\n                $newKey = implode(' ', array_keys($outArray2));\n                if ($key2 !== $newKey) {\n                    $worksheet->unprotectCells($key2);\n                    $worksheet->protectCells($newKey, $value->getPassword(), true, $value->getName(), $value->getSecurityDescriptor());\n                }\n            }\n        }\n    }\n\n    /**\n     * Update column dimensions when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     */\n    protected function adjustColumnDimensions(Worksheet $worksheet): void\n    {\n        $aColumnDimensions = array_reverse($worksheet->getColumnDimensions(), true);\n        if (!empty($aColumnDimensions)) {\n            foreach ($aColumnDimensions as $objColumnDimension) {\n                $newReference = $this->updateCellReference($objColumnDimension->getColumnIndex() . '1');\n                [$newReference] = Coordinate::coordinateFromString($newReference);\n                if ($objColumnDimension->getColumnIndex() !== $newReference) {\n                    $objColumnDimension->setColumnIndex($newReference);\n                }\n            }\n\n            $worksheet->refreshColumnDimensions();\n        }\n    }\n\n    /**\n     * Update row dimensions when inserting/deleting rows/columns.\n     *\n     * @param Worksheet $worksheet The worksheet that we're editing\n     * @param int $beforeRow Number of the row we're inserting/deleting before\n     * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion)\n     */\n    protected function adjustRowDimensions(Worksheet $worksheet, int $beforeRow, int $numberOfRows): void\n    {\n        $aRowDimensions = array_reverse($worksheet->getRowDimensions(), true);\n        if (!empty($aRowDimensions)) {\n            foreach ($aRowDimensions as $objRowDimension) {\n                $newReference = $this->updateCellReference('A' . $objRowDimension->getRowIndex());\n                [, $newReference] = Coordinate::coordinateFromString($newReference);\n                $newRoweference = (int) $newReference;\n                if ($objRowDimension->getRowIndex() !== $newRoweference) {\n                    $objRowDimension->setRowIndex($newRoweference);\n                }\n            }\n\n            $worksheet->refreshRowDimensions();\n\n            $copyDimension = $worksheet->getRowDimension($beforeRow - 1);\n            for ($i = $beforeRow; $i <= $beforeRow - 1 + $numberOfRows; ++$i) {\n                $newDimension = $worksheet->getRowDimension($i);\n                $newDimension->setRowHeight($copyDimension->getRowHeight());\n                $newDimension->setVisible($copyDimension->getVisible());\n                $newDimension->setOutlineLevel($copyDimension->getOutlineLevel());\n                $newDimension->setCollapsed($copyDimension->getCollapsed());\n            }\n        }\n    }\n\n    /**\n     * Insert a new column or row, updating all possible related data.\n     *\n     * @param string $beforeCellAddress Insert before this cell address (e.g. 'A1')\n     * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion)\n     * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion)\n     * @param Worksheet $worksheet The worksheet that we're editing\n     */\n    public function insertNewBefore(\n        string $beforeCellAddress,\n        int $numberOfColumns,\n        int $numberOfRows,\n        Worksheet $worksheet\n    ): void {\n        $remove = ($numberOfColumns < 0 || $numberOfRows < 0);\n\n        if (\n            $this->cellReferenceHelper === null\n            || $this->cellReferenceHelper->refreshRequired($beforeCellAddress, $numberOfColumns, $numberOfRows)\n        ) {\n            $this->cellReferenceHelper = new CellReferenceHelper($beforeCellAddress, $numberOfColumns, $numberOfRows);\n        }\n\n        // Get coordinate of $beforeCellAddress\n        [$beforeColumn, $beforeRow, $beforeColumnString] = Coordinate::indexesFromString($beforeCellAddress);\n\n        // Clear cells if we are removing columns or rows\n        $highestColumn = $worksheet->getHighestColumn();\n        $highestDataColumn = $worksheet->getHighestDataColumn();\n        $highestRow = $worksheet->getHighestRow();\n        $highestDataRow = $worksheet->getHighestDataRow();\n\n        // 1. Clear column strips if we are removing columns\n        if ($numberOfColumns < 0 && $beforeColumn - 2 + $numberOfColumns > 0) {\n            $this->clearColumnStrips($highestRow, $beforeColumn, $numberOfColumns, $worksheet);\n        }\n\n        // 2. Clear row strips if we are removing rows\n        if ($numberOfRows < 0 && $beforeRow - 1 + $numberOfRows > 0) {\n            $this->clearRowStrips($highestColumn, $beforeColumn, $beforeRow, $numberOfRows, $worksheet);\n        }\n\n        // Find missing coordinates. This is important when inserting or deleting column before the last column\n        $startRow = $startCol = 1;\n        $startColString = 'A';\n        if ($numberOfRows === 0) {\n            $startCol = $beforeColumn;\n            $startColString = $beforeColumnString;\n        } elseif ($numberOfColumns === 0) {\n            $startRow = $beforeRow;\n        }\n        $highColumn = Coordinate::columnIndexFromString($highestDataColumn);\n        for ($row = $startRow; $row <= $highestDataRow; ++$row) {\n            for ($col = $startCol, $colString = $startColString; $col <= $highColumn; ++$col, StringHelper::stringIncrement($colString)) {\n                $worksheet->getCell(\"$colString$row\"); // create cell if it doesn't exist\n            }\n        }\n\n        $allCoordinates = $worksheet->getCoordinates();\n        if ($remove) {\n            // It's faster to reverse and pop than to use unshift, especially with large cell collections\n            $allCoordinates = array_reverse($allCoordinates);\n        }\n\n        // Loop through cells, bottom-up, and change cell coordinate\n        while ($coordinate = array_pop($allCoordinates)) {\n            $cell = $worksheet->getCell($coordinate);\n            $cellIndex = Coordinate::columnIndexFromString($cell->getColumn());\n\n            // Don't update cells that are being removed\n            if ($numberOfColumns < 0 && $cellIndex >= $beforeColumn + $numberOfColumns && $cellIndex < $beforeColumn) {\n                continue;\n            }\n\n            // Should the cell be updated? Move value and cellXf index from one cell to another.\n            if (($cellIndex >= $beforeColumn) && ($cell->getRow() >= $beforeRow)) {\n                // New coordinate\n                $newColumn = $cellIndex + $numberOfColumns;\n                $newRow = $cell->getRow() + $numberOfRows;\n                if ($newColumn > 0 && $newRow > 0 && $newColumn <= AddressRange::MAX_COLUMN_INT && $newRow <= AddressRange::MAX_ROW) {\n                    $newCoordinate = Coordinate::stringFromColumnIndex($newColumn) . $newRow;\n                    // Update cell styles\n                    $worksheet->getCell($newCoordinate)\n                        ->setXfIndex($cell->getXfIndex());\n\n                    // Insert this cell at its new location\n                    if ($cell->getDataType() === DataType::TYPE_FORMULA) {\n                        // Formula should be adjusted\n                        $worksheet->getCell($newCoordinate)\n                            ->setValue(\n                                $this->updateFormulaReferences(\n                                    $cell->getValueString(),\n                                    $beforeCellAddress,\n                                    $numberOfColumns,\n                                    $numberOfRows,\n                                    $worksheet->getTitle(),\n                                    true\n                                )\n                            );\n                    } else {\n                        // Cell value should not be adjusted\n                        $worksheet->getCell($newCoordinate)\n                            ->setValueExplicit($cell->getValue(), $cell->getDataType());\n                    }\n                }\n\n                // Clear the original cell\n                $worksheet->getCellCollection()\n                    ->delete($coordinate);\n            } else {\n                /*    We don't need to update styles for rows/columns before our insertion position,\n                        but we do still need to adjust any formulae in those cells                    */\n                if ($cell->getDataType() === DataType::TYPE_FORMULA) {\n                    // Formula should be adjusted\n                    $cell->setValue(\n                        $this->updateFormulaReferences(\n                            $cell->getValueString(),\n                            $beforeCellAddress,\n                            $numberOfColumns,\n                            $numberOfRows,\n                            $worksheet->getTitle(),\n                            true\n                        )\n                    );\n                }\n            }\n        }\n\n        // Duplicate styles for the newly inserted cells\n        $highestColumn = $worksheet->getHighestColumn();\n        $highestRow = $worksheet->getHighestRow();\n\n        if ($numberOfColumns > 0 && $beforeColumn > 1) {\n            $this->duplicateStylesByColumn($worksheet, $beforeColumn, $beforeRow, $highestRow, $numberOfColumns);\n        }\n\n        if ($numberOfRows > 0 && $beforeRow - 1 > 0) {\n            $this->duplicateStylesByRow($worksheet, $beforeColumn, $beforeRow, $highestColumn, $numberOfRows);\n        }\n\n        // Update worksheet: column dimensions\n        $this->adjustColumnDimensions($worksheet);\n\n        // Update worksheet: row dimensions\n        $this->adjustRowDimensions($worksheet, $beforeRow, $numberOfRows);\n\n        //    Update worksheet: page breaks\n        $this->adjustPageBreaks($worksheet, $numberOfColumns, $numberOfRows);\n\n        //    Update worksheet: comments\n        $this->adjustComments($worksheet);\n\n        // Update worksheet: hyperlinks\n        $this->adjustHyperlinks($worksheet, $numberOfColumns, $numberOfRows);\n\n        // Update worksheet: conditional formatting styles\n        $this->adjustConditionalFormatting($worksheet, $numberOfColumns, $numberOfRows);\n\n        // Update worksheet: data validations\n        $this->adjustDataValidations($worksheet, $numberOfColumns, $numberOfRows, $beforeCellAddress);\n\n        // Update worksheet: merge cells\n        $this->adjustMergeCells($worksheet);\n\n        // Update worksheet: protected cells\n        $this->adjustProtectedCells($worksheet, $numberOfColumns, $numberOfRows);\n\n        // Update worksheet: autofilter\n        $this->adjustAutoFilter($worksheet, $beforeCellAddress, $numberOfColumns);\n\n        // Update worksheet: table\n        $this->adjustTable($worksheet, $beforeCellAddress, $numberOfColumns);\n\n        // Update worksheet: freeze pane\n        if ($worksheet->getFreezePane()) {\n            $splitCell = $worksheet->getFreezePane();\n            $topLeftCell = $worksheet->getTopLeftCell() ?? '';\n\n            $splitCell = $this->updateCellReference($splitCell);\n            $topLeftCell = $this->updateCellReference($topLeftCell);\n\n            $worksheet->freezePane($splitCell, $topLeftCell);\n        }\n\n        $this->updatePrintAreas($worksheet, $beforeCellAddress, $numberOfColumns, $numberOfRows);\n\n        // Update worksheet: drawings\n        $aDrawings = $worksheet->getDrawingCollection();\n        foreach ($aDrawings as $objDrawing) {\n            $newReference = $this->updateCellReference($objDrawing->getCoordinates());\n            if ($objDrawing->getCoordinates() != $newReference) {\n                $objDrawing->setCoordinates($newReference);\n            }\n            if ($objDrawing->getCoordinates2() !== '') {\n                $newReference = $this->updateCellReference($objDrawing->getCoordinates2());\n                if ($objDrawing->getCoordinates2() != $newReference) {\n                    $objDrawing->setCoordinates2($newReference);\n                }\n            }\n        }\n\n        // Update workbook: define names\n        if (count($worksheet->getParentOrThrow()->getDefinedNames()) > 0) {\n            $this->updateDefinedNames($worksheet, $beforeCellAddress, $numberOfColumns, $numberOfRows);\n        }\n\n        // Garbage collect\n        $worksheet->garbageCollect();\n    }\n\n    private function updatePrintAreas(Worksheet $worksheet, string $beforeCellAddress, int $numberOfColumns, int $numberOfRows): void\n    {\n        $pageSetup = $worksheet->getPageSetup();\n        if (!$pageSetup->isPrintAreaSet()) {\n            return;\n        }\n        $printAreas = explode(',', $pageSetup->getPrintArea());\n        $newPrintAreas = [];\n        foreach ($printAreas as $printArea) {\n            $result = $this->updatePrintArea($printArea, $beforeCellAddress, $numberOfColumns, $numberOfRows);\n            if ($result !== '') {\n                $newPrintAreas[] = $result;\n            }\n        }\n        $result = implode(',', $newPrintAreas);\n        if ($result === '') {\n            $pageSetup->clearPrintArea();\n        } else {\n            $pageSetup->setPrintArea($result);\n        }\n    }\n\n    private function updatePrintArea(string $printArea, string $beforeCellAddress, int $numberOfColumns, int $numberOfRows): string\n    {\n        $coordinates = Coordinate::indexesFromString($beforeCellAddress);\n        if (preg_match('/^([A-Z]{1,3})(\\d{1,7}):([A-Z]{1,3})(\\d{1,7})$/i', $printArea, $matches) === 1) {\n            $firstRow = (int) $matches[2];\n            $lastRow = (int) $matches[4];\n            $firstColumnString = $matches[1];\n            $lastColumnString = $matches[3];\n            if ($numberOfRows < 0) {\n                $affectedRow = $coordinates[1] + $numberOfRows - 1;\n                $lastAffectedRow = $coordinates[1] - 1;\n                if ($affectedRow >= $firstRow && $affectedRow <= $lastRow) {\n                    $newLastRow = max($affectedRow, $lastRow + $numberOfRows);\n                    if ($newLastRow >= $firstRow) {\n                        return $matches[1] . $matches[2] . ':' . $matches[3] . $newLastRow;\n                    }\n\n                    return '';\n                }\n                if ($lastAffectedRow >= $firstRow && $affectedRow <= $lastRow) {\n                    $newFirstRow = $affectedRow + 1;\n                    $newLastRow = $lastRow + $numberOfRows;\n                    if ($newFirstRow >= 1 && $newLastRow >= $newFirstRow) {\n                        return $matches[1] . $newFirstRow . ':' . $matches[3] . $newLastRow;\n                    }\n\n                    return '';\n                }\n            }\n            if ($numberOfColumns < 0) {\n                $firstColumnInt = Coordinate::columnIndexFromString($firstColumnString);\n                $lastColumnInt = Coordinate::columnIndexFromString($lastColumnString);\n                $affectedColumn = $coordinates[0] + $numberOfColumns - 1;\n                $lastAffectedColumn = $coordinates[0] - 1;\n                if ($affectedColumn >= $firstColumnInt && $affectedColumn <= $lastColumnInt) {\n                    $newLastColumnInt = max($affectedColumn, $lastColumnInt + $numberOfColumns);\n                    if ($newLastColumnInt >= $firstColumnInt) {\n                        $newLastColumnString = Coordinate::stringFromColumnIndex($newLastColumnInt);\n\n                        return $matches[1] . $matches[2] . ':' . $newLastColumnString . $matches[4];\n                    }\n\n                    return '';\n                }\n                if ($affectedColumn < $firstColumnInt && $lastAffectedColumn > $lastColumnInt) {\n                    return '';\n                }\n                if ($lastAffectedColumn >= $firstColumnInt && $lastAffectedColumn <= $lastColumnInt) {\n                    $newFirstColumn = $affectedColumn + 1;\n                    $newLastColumn = $lastColumnInt + $numberOfColumns;\n                    if ($newFirstColumn >= 1 && $newLastColumn >= $newFirstColumn) {\n                        $firstString = Coordinate::stringFromColumnIndex($newFirstColumn);\n                        $lastString = Coordinate::stringFromColumnIndex($newLastColumn);\n\n                        return $firstString . $matches[2] . ':' . $lastString . $matches[4];\n                    }\n\n                    return '';\n                }\n            }\n        }\n\n        return $this->updateCellReference($printArea);\n    }\n\n    private static function matchSheetName(?string $match, string $worksheetName): bool\n    {\n        return $match === null || $match === '' || $match === \"'\\u{fffc}'\" || $match === \"'\\u{fffb}'\" || strcasecmp(trim($match, \"'\"), $worksheetName) === 0;\n    }\n\n    private static function sheetnameBeforeCells(string $match, string $worksheetName, string $cells): string\n    {\n        $toString = ($match > '') ? \"$match!\" : '';\n\n        return str_replace([\"\\u{fffc}\", \"'\\u{fffb}'\"], $worksheetName, $toString) . $cells;\n    }\n\n    /**\n     * Update references within formulas.\n     *\n     * @param string $formula Formula to update\n     * @param string $beforeCellAddress Insert before this one\n     * @param int $numberOfColumns Number of columns to insert\n     * @param int $numberOfRows Number of rows to insert\n     * @param string $worksheetName Worksheet name/title\n     *\n     * @return string Updated formula\n     */\n    public function updateFormulaReferences(\n        string $formula = '',\n        string $beforeCellAddress = 'A1',\n        int $numberOfColumns = 0,\n        int $numberOfRows = 0,\n        string $worksheetName = '',\n        bool $includeAbsoluteReferences = false,\n        bool $onlyAbsoluteReferences = false\n    ): string {\n        $callback = fn (array $matches): string => (strcasecmp(trim($matches[2], \"'\"), $worksheetName) === 0) ? (($matches[2][0] === \"'\") ? \"'\\u{fffc}'!\" : \"'\\u{fffb}'!\") : \"'\\u{fffd}'!\";\n        if (\n            $this->cellReferenceHelper === null\n            || $this->cellReferenceHelper->refreshRequired($beforeCellAddress, $numberOfColumns, $numberOfRows)\n        ) {\n            $this->cellReferenceHelper = new CellReferenceHelper($beforeCellAddress, $numberOfColumns, $numberOfRows);\n        }\n\n        //    Update cell references in the formula\n        $formulaBlocks = explode('\"', $formula);\n        $i = false;\n        foreach ($formulaBlocks as &$formulaBlock) {\n            //    Ignore blocks that were enclosed in quotes (alternating entries in the $formulaBlocks array after the explode)\n            $i = $i === false;\n            if ($i) {\n                $adjustCount = 0;\n                $newCellTokens = $cellTokens = [];\n                //    Search for row ranges (e.g. 'Sheet1'!3:5 or 3:5) with or without $ absolutes (e.g. $3:5)\n                $formulaBlockx = ' ' . (preg_replace_callback(self::SHEETNAME_PART_WITH_SLASHES, $callback, $formulaBlock) ?? $formulaBlock) . ' ';\n                $matchCount = preg_match_all('/' . self::REFHELPER_REGEXP_ROWRANGE . '/mui', $formulaBlockx, $matches, PREG_SET_ORDER);\n                if ($matchCount > 0) {\n                    foreach ($matches as $match) {\n                        $fromString = self::sheetnameBeforeCells($match[2], $worksheetName, \"{$match[3]}:{$match[4]}\");\n                        $modified3 = substr($this->updateCellReference('$A' . $match[3], $includeAbsoluteReferences, $onlyAbsoluteReferences, true), 2);\n                        $modified4 = substr($this->updateCellReference('$A' . $match[4], $includeAbsoluteReferences, $onlyAbsoluteReferences, false), 2);\n\n                        if ($match[3] . ':' . $match[4] !== $modified3 . ':' . $modified4) {\n                            if (self::matchSheetName($match[2], $worksheetName)) {\n                                $toString = self::sheetnameBeforeCells($match[2], $worksheetName, \"$modified3:$modified4\");\n                                //    Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more\n                                $column = 100000;\n                                $row = 10000000 + (int) trim($match[3], '$');\n                                $cellIndex = \"{$column}{$row}\";\n\n                                $newCellTokens[$cellIndex] = preg_quote($toString, '/');\n                                $cellTokens[$cellIndex] = '/(?<!\\d\\$\\!)' . preg_quote($fromString, '/') . '(?!\\d)/i';\n                                ++$adjustCount;\n                            }\n                        }\n                    }\n                }\n                //    Search for column ranges (e.g. 'Sheet1'!C:E or C:E) with or without $ absolutes (e.g. $C:E)\n                $formulaBlockx = ' ' . (preg_replace_callback(self::SHEETNAME_PART_WITH_SLASHES, $callback, $formulaBlock) ?? $formulaBlock) . ' ';\n                $matchCount = preg_match_all('/' . self::REFHELPER_REGEXP_COLRANGE . '/mui', $formulaBlockx, $matches, PREG_SET_ORDER);\n                if ($matchCount > 0) {\n                    foreach ($matches as $match) {\n                        $fromString = self::sheetnameBeforeCells($match[2], $worksheetName, \"{$match[3]}:{$match[4]}\");\n                        $modified3 = substr($this->updateCellReference($match[3] . '$1', $includeAbsoluteReferences, $onlyAbsoluteReferences, true), 0, -2);\n                        $modified4 = substr($this->updateCellReference($match[4] . '$1', $includeAbsoluteReferences, $onlyAbsoluteReferences, false), 0, -2);\n\n                        if ($match[3] . ':' . $match[4] !== $modified3 . ':' . $modified4) {\n                            if (self::matchSheetName($match[2], $worksheetName)) {\n                                $toString = self::sheetnameBeforeCells($match[2], $worksheetName, \"$modified3:$modified4\");\n                                //    Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more\n                                $column = Coordinate::columnIndexFromString(trim($match[3], '$')) + 100000;\n                                $row = 10000000;\n                                $cellIndex = \"{$column}{$row}\";\n\n                                $newCellTokens[$cellIndex] = preg_quote($toString, '/');\n                                $cellTokens[$cellIndex] = '/(?<![A-Z\\$\\!])' . preg_quote($fromString, '/') . '(?![A-Z])/i';\n                                ++$adjustCount;\n                            }\n                        }\n                    }\n                }\n                //    Search for cell ranges (e.g. 'Sheet1'!A3:C5 or A3:C5) with or without $ absolutes (e.g. $A1:C$5)\n                $formulaBlockx = ' ' . (preg_replace_callback(self::SHEETNAME_PART_WITH_SLASHES, $callback, \"$formulaBlock\") ?? \"$formulaBlock\") . ' ';\n                $matchCount = preg_match_all('/' . self::REFHELPER_REGEXP_CELLRANGE . '/mui', $formulaBlockx, $matches, PREG_SET_ORDER);\n                if ($matchCount > 0) {\n                    foreach ($matches as $match) {\n                        $fromString = self::sheetnameBeforeCells($match[2], $worksheetName, \"{$match[3]}:{$match[4]}\");\n                        $modified3 = $this->updateCellReference($match[3], $includeAbsoluteReferences, $onlyAbsoluteReferences, true);\n                        $modified4 = $this->updateCellReference($match[4], $includeAbsoluteReferences, $onlyAbsoluteReferences, false);\n\n                        if ($match[3] . $match[4] !== $modified3 . $modified4) {\n                            if (self::matchSheetName($match[2], $worksheetName)) {\n                                $toString = self::sheetnameBeforeCells($match[2], $worksheetName, \"$modified3:$modified4\");\n                                [$column, $row] = Coordinate::coordinateFromString($match[3]);\n                                //    Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more\n                                $column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000;\n                                $row = (int) trim($row, '$') + 10000000;\n                                $cellIndex = \"{$column}{$row}\";\n\n                                $newCellTokens[$cellIndex] = preg_quote($toString, '/');\n                                $cellTokens[$cellIndex] = '/(?<![A-Z]\\$\\!)' . preg_quote($fromString, '/') . '(?!\\d)/i';\n                                ++$adjustCount;\n                            }\n                        }\n                    }\n                }\n                //    Search for cell references (e.g. 'Sheet1'!A3 or C5) with or without $ absolutes (e.g. $A1 or C$5)\n\n                $formulaBlockx = ' ' . (preg_replace_callback(self::SHEETNAME_PART_WITH_SLASHES, $callback, $formulaBlock) ?? $formulaBlock) . ' ';\n                $matchCount = preg_match_all('/' . self::REFHELPER_REGEXP_CELLREF . '/mui', $formulaBlockx, $matches, PREG_SET_ORDER);\n\n                if ($matchCount > 0) {\n                    foreach ($matches as $match) {\n                        $fromString = self::sheetnameBeforeCells($match[2], $worksheetName, \"{$match[3]}\");\n\n                        $modified3 = $this->updateCellReference($match[3], $includeAbsoluteReferences, $onlyAbsoluteReferences, null);\n                        if ($match[3] !== $modified3) {\n                            if (self::matchSheetName($match[2], $worksheetName)) {\n                                $toString = self::sheetnameBeforeCells($match[2], $worksheetName, \"$modified3\");\n                                [$column, $row] = Coordinate::coordinateFromString($match[3]);\n                                $columnAdditionalIndex = $column[0] === '$' ? 1 : 0;\n                                $rowAdditionalIndex = $row[0] === '$' ? 1 : 0;\n                                //    Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more\n                                $column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000;\n                                $row = (int) trim($row, '$') + 10000000;\n                                $cellIndex = $row . $rowAdditionalIndex . $column . $columnAdditionalIndex;\n\n                                $newCellTokens[$cellIndex] = preg_quote($toString, '/');\n                                $cellTokens[$cellIndex] = '/(?<![A-Z\\$\\!])' . preg_quote($fromString, '/') . '(?!\\d)/i';\n                                ++$adjustCount;\n                            }\n                        }\n                    }\n                }\n                if ($adjustCount > 0) {\n                    if ($numberOfColumns > 0 || $numberOfRows > 0) {\n                        krsort($cellTokens);\n                        krsort($newCellTokens);\n                    } else {\n                        ksort($cellTokens);\n                        ksort($newCellTokens);\n                    }   //  Update cell references in the formula\n                    $formulaBlock = str_replace('\\\\', '', (string) preg_replace($cellTokens, $newCellTokens, $formulaBlock));\n                }\n            }\n        }\n        unset($formulaBlock);\n\n        //    Then rebuild the formula string\n        return implode('\"', $formulaBlocks);\n    }\n\n    /**\n     * Update all cell references within a formula, irrespective of worksheet.\n     */\n    public function updateFormulaReferencesAnyWorksheet(string $formula = '', int $numberOfColumns = 0, int $numberOfRows = 0): string\n    {\n        $formula = $this->updateCellReferencesAllWorksheets($formula, $numberOfColumns, $numberOfRows);\n\n        if ($numberOfColumns !== 0) {\n            $formula = $this->updateColumnRangesAllWorksheets($formula, $numberOfColumns);\n        }\n\n        if ($numberOfRows !== 0) {\n            $formula = $this->updateRowRangesAllWorksheets($formula, $numberOfRows);\n        }\n\n        return $formula;\n    }\n\n    private function updateCellReferencesAllWorksheets(string $formula, int $numberOfColumns, int $numberOfRows): string\n    {\n        $splitCount = preg_match_all(\n            '/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/mui',\n            $formula,\n            $splitRanges,\n            PREG_OFFSET_CAPTURE\n        );\n\n        $columnLengths = array_map('strlen', array_column($splitRanges[6], 0));\n        $rowLengths = array_map('strlen', array_column($splitRanges[7], 0));\n        $columnOffsets = array_column($splitRanges[6], 1);\n        $rowOffsets = array_column($splitRanges[7], 1);\n\n        $columns = $splitRanges[6];\n        $rows = $splitRanges[7];\n\n        while ($splitCount > 0) {\n            --$splitCount;\n            $columnLength = $columnLengths[$splitCount];\n            $rowLength = $rowLengths[$splitCount];\n            $columnOffset = $columnOffsets[$splitCount];\n            $rowOffset = $rowOffsets[$splitCount];\n            $column = $columns[$splitCount][0];\n            $row = $rows[$splitCount][0];\n\n            if ($column[0] !== '$') {\n                $column = ((Coordinate::columnIndexFromString($column) + $numberOfColumns) % AddressRange::MAX_COLUMN_INT) ?: AddressRange::MAX_COLUMN_INT;\n                $column = Coordinate::stringFromColumnIndex($column);\n                $rowOffset -= ($columnLength - strlen($column));\n                $formula = substr($formula, 0, $columnOffset) . $column . substr($formula, $columnOffset + $columnLength);\n            }\n            if (!empty($row) && $row[0] !== '$') {\n                $row = (((int) $row + $numberOfRows) % AddressRange::MAX_ROW) ?: AddressRange::MAX_ROW;\n                $formula = substr($formula, 0, $rowOffset) . $row . substr($formula, $rowOffset + $rowLength);\n            }\n        }\n\n        return $formula;\n    }\n\n    private function updateColumnRangesAllWorksheets(string $formula, int $numberOfColumns): string\n    {\n        $splitCount = preg_match_all(\n            '/' . Calculation::CALCULATION_REGEXP_COLUMNRANGE_RELATIVE . '/mui',\n            $formula,\n            $splitRanges,\n            PREG_OFFSET_CAPTURE\n        );\n\n        $fromColumnLengths = array_map('strlen', array_column($splitRanges[1], 0));\n        $fromColumnOffsets = array_column($splitRanges[1], 1);\n        $toColumnLengths = array_map('strlen', array_column($splitRanges[2], 0));\n        $toColumnOffsets = array_column($splitRanges[2], 1);\n\n        $fromColumns = $splitRanges[1];\n        $toColumns = $splitRanges[2];\n\n        while ($splitCount > 0) {\n            --$splitCount;\n            $fromColumnLength = $fromColumnLengths[$splitCount];\n            $toColumnLength = $toColumnLengths[$splitCount];\n            $fromColumnOffset = $fromColumnOffsets[$splitCount];\n            $toColumnOffset = $toColumnOffsets[$splitCount];\n            $fromColumn = $fromColumns[$splitCount][0];\n            $toColumn = $toColumns[$splitCount][0];\n\n            if (!empty($fromColumn) && $fromColumn[0] !== '$') {\n                $fromColumn = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($fromColumn) + $numberOfColumns);\n                $formula = substr($formula, 0, $fromColumnOffset) . $fromColumn . substr($formula, $fromColumnOffset + $fromColumnLength);\n            }\n            if (!empty($toColumn) && $toColumn[0] !== '$') {\n                $toColumn = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($toColumn) + $numberOfColumns);\n                $formula = substr($formula, 0, $toColumnOffset) . $toColumn . substr($formula, $toColumnOffset + $toColumnLength);\n            }\n        }\n\n        return $formula;\n    }\n\n    private function updateRowRangesAllWorksheets(string $formula, int $numberOfRows): string\n    {\n        $splitCount = preg_match_all(\n            '/' . Calculation::CALCULATION_REGEXP_ROWRANGE_RELATIVE . '/mui',\n            $formula,\n            $splitRanges,\n            PREG_OFFSET_CAPTURE\n        );\n\n        $fromRowLengths = array_map('strlen', array_column($splitRanges[1], 0));\n        $fromRowOffsets = array_column($splitRanges[1], 1);\n        $toRowLengths = array_map('strlen', array_column($splitRanges[2], 0));\n        $toRowOffsets = array_column($splitRanges[2], 1);\n\n        $fromRows = $splitRanges[1];\n        $toRows = $splitRanges[2];\n\n        while ($splitCount > 0) {\n            --$splitCount;\n            $fromRowLength = $fromRowLengths[$splitCount];\n            $toRowLength = $toRowLengths[$splitCount];\n            $fromRowOffset = $fromRowOffsets[$splitCount];\n            $toRowOffset = $toRowOffsets[$splitCount];\n            $fromRow = $fromRows[$splitCount][0];\n            $toRow = $toRows[$splitCount][0];\n\n            if (!empty($fromRow) && $fromRow[0] !== '$') {\n                $fromRow = (int) $fromRow + $numberOfRows;\n                $formula = substr($formula, 0, $fromRowOffset) . $fromRow . substr($formula, $fromRowOffset + $fromRowLength);\n            }\n            if (!empty($toRow) && $toRow[0] !== '$') {\n                $toRow = (int) $toRow + $numberOfRows;\n                $formula = substr($formula, 0, $toRowOffset) . $toRow . substr($formula, $toRowOffset + $toRowLength);\n            }\n        }\n\n        return $formula;\n    }\n\n    /**\n     * Update cell reference.\n     *\n     * @param string $cellReference Cell address or range of addresses\n     *\n     * @return string Updated cell range\n     */\n    private function updateCellReference(string $cellReference = 'A1', bool $includeAbsoluteReferences = false, bool $onlyAbsoluteReferences = false, ?bool $topLeft = null)\n    {\n        // Is it in another worksheet? Will not have to update anything.\n        if (str_contains($cellReference, '!')) {\n            return $cellReference;\n        }\n        // Is it a range or a single cell?\n        if (!Coordinate::coordinateIsRange($cellReference)) {\n            // Single cell\n            /** @var CellReferenceHelper */\n            $cellReferenceHelper = $this->cellReferenceHelper;\n\n            return $cellReferenceHelper->updateCellReference($cellReference, $includeAbsoluteReferences, $onlyAbsoluteReferences, $topLeft);\n        }\n\n        // Range\n        return $this->updateCellRange($cellReference, $includeAbsoluteReferences, $onlyAbsoluteReferences);\n    }\n\n    /**\n     * Update named formulae (i.e. containing worksheet references / named ranges).\n     *\n     * @param Spreadsheet $spreadsheet Object to update\n     * @param string $oldName Old name (name to replace)\n     * @param string $newName New name\n     */\n    public function updateNamedFormulae(Spreadsheet $spreadsheet, string $oldName = '', string $newName = ''): void\n    {\n        if ($oldName == '') {\n            return;\n        }\n\n        foreach ($spreadsheet->getWorksheetIterator() as $sheet) {\n            foreach ($sheet->getCoordinates(false) as $coordinate) {\n                $cell = $sheet->getCell($coordinate);\n                if ($cell->getDataType() === DataType::TYPE_FORMULA) {\n                    $formula = $cell->getValueString();\n                    if (str_contains($formula, $oldName)) {\n                        $formula = str_replace(\"'\" . $oldName . \"'!\", \"'\" . $newName . \"'!\", $formula);\n                        $formula = str_replace($oldName . '!', $newName . '!', $formula);\n                        $cell->setValueExplicit($formula, DataType::TYPE_FORMULA);\n                    }\n                }\n            }\n        }\n    }\n\n    private function updateDefinedNames(Worksheet $worksheet, string $beforeCellAddress, int $numberOfColumns, int $numberOfRows): void\n    {\n        foreach ($worksheet->getParentOrThrow()->getDefinedNames() as $definedName) {\n            if ($definedName->isFormula() === false) {\n                $this->updateNamedRange($definedName, $worksheet, $beforeCellAddress, $numberOfColumns, $numberOfRows);\n            } else {\n                $this->updateNamedFormula($definedName, $worksheet, $beforeCellAddress, $numberOfColumns, $numberOfRows);\n            }\n        }\n    }\n\n    private function updateNamedRange(DefinedName $definedName, Worksheet $worksheet, string $beforeCellAddress, int $numberOfColumns, int $numberOfRows): void\n    {\n        $cellAddress = $definedName->getValue();\n        $asFormula = ($cellAddress[0] === '=');\n        if ($definedName->getWorksheet() === $worksheet) {\n            /**\n             * If we delete the entire range that is referenced by a Named Range, MS Excel sets the value to #REF!\n             * PhpSpreadsheet still only does a basic adjustment, so the Named Range will still reference Cells.\n             * Note that this applies only when deleting columns/rows; subsequent insertion won't fix the #REF!\n             * TODO Can we work out a method to identify Named Ranges that cease to be valid, so that we can replace\n             *      them with a #REF!\n             */\n            if ($asFormula === true) {\n                $formula = $this->updateFormulaReferences($cellAddress, $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle(), true, true);\n                $definedName->setValue($formula);\n            } else {\n                $definedName->setValue($this->updateCellReference(ltrim($cellAddress, '='), true));\n            }\n        }\n    }\n\n    private function updateNamedFormula(DefinedName $definedName, Worksheet $worksheet, string $beforeCellAddress, int $numberOfColumns, int $numberOfRows): void\n    {\n        if ($definedName->getWorksheet() === $worksheet) {\n            /**\n             * If we delete the entire range that is referenced by a Named Formula, MS Excel sets the value to #REF!\n             * PhpSpreadsheet still only does a basic adjustment, so the Named Formula will still reference Cells.\n             * Note that this applies only when deleting columns/rows; subsequent insertion won't fix the #REF!\n             * TODO Can we work out a method to identify Named Ranges that cease to be valid, so that we can replace\n             *      them with a #REF!\n             */\n            $formula = $definedName->getValue();\n            $formula = $this->updateFormulaReferences($formula, $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle(), true);\n            $definedName->setValue($formula);\n        }\n    }\n\n    /**\n     * Update cell range.\n     *\n     * @param string $cellRange Cell range    (e.g. 'B2:D4', 'B:C' or '2:3')\n     *\n     * @return string Updated cell range\n     */\n    private function updateCellRange(string $cellRange = 'A1:A1', bool $includeAbsoluteReferences = false, bool $onlyAbsoluteReferences = false): string\n    {\n        if (!Coordinate::coordinateIsRange($cellRange)) {\n            throw new Exception('Only cell ranges may be passed to this method.');\n        }\n\n        // Update range\n        $range = Coordinate::splitRange($cellRange);\n        $ic = count($range);\n        for ($i = 0; $i < $ic; ++$i) {\n            $jc = count($range[$i]);\n            for ($j = 0; $j < $jc; ++$j) {\n                /** @var CellReferenceHelper */\n                $cellReferenceHelper = $this->cellReferenceHelper;\n                if (ctype_alpha($range[$i][$j])) {\n                    $range[$i][$j] = Coordinate::coordinateFromString(\n                        $cellReferenceHelper->updateCellReference($range[$i][$j] . '1', $includeAbsoluteReferences, $onlyAbsoluteReferences, null)\n                    )[0];\n                } elseif (ctype_digit($range[$i][$j])) {\n                    $range[$i][$j] = Coordinate::coordinateFromString(\n                        $cellReferenceHelper->updateCellReference('A' . $range[$i][$j], $includeAbsoluteReferences, $onlyAbsoluteReferences, null)\n                    )[1];\n                } else {\n                    $range[$i][$j] = $cellReferenceHelper->updateCellReference($range[$i][$j], $includeAbsoluteReferences, $onlyAbsoluteReferences, null);\n                }\n            }\n        }\n\n        // Recreate range string\n        return Coordinate::buildRange($range);\n    }\n\n    private function clearColumnStrips(int $highestRow, int $beforeColumn, int $numberOfColumns, Worksheet $worksheet): void\n    {\n        $startColumnId = Coordinate::stringFromColumnIndex($beforeColumn + $numberOfColumns);\n        $endColumnId = Coordinate::stringFromColumnIndex($beforeColumn);\n\n        for ($row = 1; $row <= $highestRow - 1; ++$row) {\n            for ($column = $startColumnId; $column !== $endColumnId; StringHelper::stringIncrement($column)) {\n                $coordinate = $column . $row;\n                $this->clearStripCell($worksheet, $coordinate);\n            }\n        }\n    }\n\n    private function clearRowStrips(string $highestColumn, int $beforeColumn, int $beforeRow, int $numberOfRows, Worksheet $worksheet): void\n    {\n        $startColumnId = Coordinate::stringFromColumnIndex($beforeColumn);\n        StringHelper::stringIncrement($highestColumn);\n\n        for ($column = $startColumnId; $column !== $highestColumn; StringHelper::stringIncrement($column)) {\n            for ($row = $beforeRow + $numberOfRows; $row <= $beforeRow - 1; ++$row) {\n                $coordinate = $column . $row;\n                $this->clearStripCell($worksheet, $coordinate);\n            }\n        }\n    }\n\n    private function clearStripCell(Worksheet $worksheet, string $coordinate): void\n    {\n        $worksheet->removeConditionalStyles($coordinate);\n        $worksheet->setHyperlink($coordinate, null, false);\n        $worksheet->setDataValidation($coordinate);\n        $worksheet->removeComment($coordinate);\n\n        if ($worksheet->cellExists($coordinate)) {\n            $worksheet->getCell($coordinate)->setValueExplicit(null, DataType::TYPE_NULL);\n            $worksheet->getCell($coordinate)->setXfIndex(0);\n        }\n    }\n\n    private function adjustAutoFilter(Worksheet $worksheet, string $beforeCellAddress, int $numberOfColumns): void\n    {\n        $autoFilter = $worksheet->getAutoFilter();\n        $autoFilterRange = $autoFilter->getRange();\n        if (!empty($autoFilterRange)) {\n            if ($numberOfColumns !== 0) {\n                $autoFilterColumns = $autoFilter->getColumns();\n                if (count($autoFilterColumns) > 0) {\n                    $column = '';\n                    $row = 0;\n                    sscanf($beforeCellAddress, '%[A-Z]%d', $column, $row);\n                    $columnIndex = Coordinate::columnIndexFromString((string) $column);\n                    [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($autoFilterRange);\n                    if ($columnIndex <= $rangeEnd[0]) {\n                        if ($numberOfColumns < 0) {\n                            $this->adjustAutoFilterDeleteRules($columnIndex, $numberOfColumns, $autoFilterColumns, $autoFilter);\n                        }\n                        $startCol = ($columnIndex > $rangeStart[0]) ? $columnIndex : $rangeStart[0];\n\n                        //    Shuffle columns in autofilter range\n                        if ($numberOfColumns > 0) {\n                            $this->adjustAutoFilterInsert($startCol, $numberOfColumns, $rangeEnd[0], $autoFilter);\n                        } else {\n                            $this->adjustAutoFilterDelete($startCol, $numberOfColumns, $rangeEnd[0], $autoFilter);\n                        }\n                    }\n                }\n            }\n\n            $worksheet->setAutoFilter(\n                $this->updateCellReference($autoFilterRange)\n            );\n        }\n    }\n\n    /** @param mixed[] $autoFilterColumns */\n    private function adjustAutoFilterDeleteRules(int $columnIndex, int $numberOfColumns, array $autoFilterColumns, AutoFilter $autoFilter): void\n    {\n        // If we're actually deleting any columns that fall within the autofilter range,\n        //    then we delete any rules for those columns\n        $deleteColumn = $columnIndex + $numberOfColumns - 1;\n        $deleteCount = abs($numberOfColumns);\n\n        for ($i = 1; $i <= $deleteCount; ++$i) {\n            $columnName = Coordinate::stringFromColumnIndex($deleteColumn + 1);\n            if (isset($autoFilterColumns[$columnName])) {\n                $autoFilter->clearColumn($columnName);\n            }\n            ++$deleteColumn;\n        }\n    }\n\n    private function adjustAutoFilterInsert(int $startCol, int $numberOfColumns, int $rangeEnd, AutoFilter $autoFilter): void\n    {\n        $startColRef = $startCol;\n        $endColRef = $rangeEnd;\n        $toColRef = $rangeEnd + $numberOfColumns;\n\n        do {\n            $autoFilter->shiftColumn(\n                Coordinate::stringFromColumnIndex($endColRef),\n                Coordinate::stringFromColumnIndex($toColRef)\n            );\n            --$endColRef;\n            --$toColRef;\n        } while ($startColRef <= $endColRef);\n    }\n\n    private function adjustAutoFilterDelete(int $startCol, int $numberOfColumns, int $rangeEnd, AutoFilter $autoFilter): void\n    {\n        // For delete, we shuffle from beginning to end to avoid overwriting\n        $startColID = Coordinate::stringFromColumnIndex($startCol);\n        $toColID = Coordinate::stringFromColumnIndex($startCol + $numberOfColumns);\n        $endColID = Coordinate::stringFromColumnIndex($rangeEnd + 1);\n\n        do {\n            $autoFilter->shiftColumn($startColID, $toColID);\n            StringHelper::stringIncrement($toColID);\n            StringHelper::stringIncrement($startColID);\n        } while ($startColID !== $endColID);\n    }\n\n    private function adjustTable(Worksheet $worksheet, string $beforeCellAddress, int $numberOfColumns): void\n    {\n        $tableCollection = $worksheet->getTableCollection();\n\n        foreach ($tableCollection as $table) {\n            $tableRange = $table->getRange();\n            if (!empty($tableRange)) {\n                if ($numberOfColumns !== 0) {\n                    $tableColumns = $table->getColumns();\n                    if (count($tableColumns) > 0) {\n                        $column = '';\n                        $row = 0;\n                        sscanf($beforeCellAddress, '%[A-Z]%d', $column, $row);\n                        $columnIndex = Coordinate::columnIndexFromString((string) $column);\n                        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($tableRange);\n                        if ($columnIndex <= $rangeEnd[0]) {\n                            if ($numberOfColumns < 0) {\n                                $this->adjustTableDeleteRules($columnIndex, $numberOfColumns, $tableColumns, $table);\n                            }\n                            $startCol = ($columnIndex > $rangeStart[0]) ? $columnIndex : $rangeStart[0];\n\n                            //    Shuffle columns in table range\n                            if ($numberOfColumns > 0) {\n                                $this->adjustTableInsert($startCol, $numberOfColumns, $rangeEnd[0], $table);\n                            } else {\n                                $this->adjustTableDelete($startCol, $numberOfColumns, $rangeEnd[0], $table);\n                            }\n                        }\n                    }\n                }\n\n                $table->setRange($this->updateCellReference($tableRange));\n            }\n        }\n    }\n\n    /** @param mixed[] $tableColumns */\n    private function adjustTableDeleteRules(int $columnIndex, int $numberOfColumns, array $tableColumns, Table $table): void\n    {\n        // If we're actually deleting any columns that fall within the table range,\n        //    then we delete any rules for those columns\n        $deleteColumn = $columnIndex + $numberOfColumns - 1;\n        $deleteCount = abs($numberOfColumns);\n\n        for ($i = 1; $i <= $deleteCount; ++$i) {\n            $columnName = Coordinate::stringFromColumnIndex($deleteColumn + 1);\n            if (isset($tableColumns[$columnName])) {\n                $table->clearColumn($columnName);\n            }\n            ++$deleteColumn;\n        }\n    }\n\n    private function adjustTableInsert(int $startCol, int $numberOfColumns, int $rangeEnd, Table $table): void\n    {\n        $startColRef = $startCol;\n        $endColRef = $rangeEnd;\n        $toColRef = $rangeEnd + $numberOfColumns;\n\n        do {\n            $table->shiftColumn(\n                Coordinate::stringFromColumnIndex($endColRef),\n                Coordinate::stringFromColumnIndex($toColRef)\n            );\n            --$endColRef;\n            --$toColRef;\n        } while ($startColRef <= $endColRef);\n    }\n\n    private function adjustTableDelete(int $startCol, int $numberOfColumns, int $rangeEnd, Table $table): void\n    {\n        // For delete, we shuffle from beginning to end to avoid overwriting\n        $startColID = Coordinate::stringFromColumnIndex($startCol);\n        $toColID = Coordinate::stringFromColumnIndex($startCol + $numberOfColumns);\n        $endColID = Coordinate::stringFromColumnIndex($rangeEnd + 1);\n\n        do {\n            $table->shiftColumn($startColID, $toColID);\n            StringHelper::stringIncrement($toColID);\n            StringHelper::stringIncrement($startColID);\n        } while ($startColID !== $endColID);\n    }\n\n    private function duplicateStylesByColumn(Worksheet $worksheet, int $beforeColumn, int $beforeRow, int $highestRow, int $numberOfColumns): void\n    {\n        $beforeColumnName = Coordinate::stringFromColumnIndex($beforeColumn - 1);\n        for ($i = $beforeRow; $i <= $highestRow; ++$i) {\n            // Style\n            $coordinate = $beforeColumnName . $i;\n            if ($worksheet->cellExists($coordinate)) {\n                $xfIndex = $worksheet->getCell($coordinate)->getXfIndex();\n                for ($j = $beforeColumn; $j <= $beforeColumn - 1 + $numberOfColumns; ++$j) {\n                    if (!empty($xfIndex) || $worksheet->cellExists([$j, $i])) {\n                        $worksheet->getCell([$j, $i])->setXfIndex($xfIndex);\n                    }\n                }\n            }\n        }\n    }\n\n    private function duplicateStylesByRow(Worksheet $worksheet, int $beforeColumn, int $beforeRow, string $highestColumn, int $numberOfRows): void\n    {\n        $highestColumnIndex = Coordinate::columnIndexFromString($highestColumn);\n        for ($i = $beforeColumn; $i <= $highestColumnIndex; ++$i) {\n            // Style\n            $coordinate = Coordinate::stringFromColumnIndex($i) . ($beforeRow - 1);\n            if ($worksheet->cellExists($coordinate)) {\n                $xfIndex = $worksheet->getCell($coordinate)->getXfIndex();\n                for ($j = $beforeRow; $j <= $beforeRow - 1 + $numberOfRows; ++$j) {\n                    if (!empty($xfIndex) || $worksheet->cellExists([$i, $j])) {\n                        $worksheet->getCell(Coordinate::stringFromColumnIndex($i) . $j)->setXfIndex($xfIndex);\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * __clone implementation. Cloning should not be allowed in a Singleton!\n     */\n    final public function __clone()\n    {\n        throw new Exception('Cloning a Singleton is not allowed!');\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/RichText/ITextElement.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\RichText;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\ninterface ITextElement\n{\n    /**\n     * Get text.\n     */\n    public function getText(): string;\n\n    /**\n     * Set text.\n     *\n     * @param string $text Text\n     *\n     * @return $this\n     */\n    public function setText(string $text): self;\n\n    /**\n     * Get font.\n     */\n    public function getFont(): ?Font;\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/RichText/RichText.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\RichText;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\IComparable;\nuse Stringable;\n\nclass RichText implements IComparable, Stringable\n{\n    /**\n     * Rich text elements.\n     *\n     * @var ITextElement[]\n     */\n    private array $richTextElements;\n\n    /**\n     * Create a new RichText instance.\n     */\n    public function __construct(?Cell $cell = null)\n    {\n        // Initialise variables\n        $this->richTextElements = [];\n\n        // Rich-Text string attached to cell?\n        if ($cell !== null) {\n            // Add cell text and style\n            if ($cell->getValueString() !== '') {\n                $objRun = new Run($cell->getValueString());\n                $objRun->setFont(clone $cell->getWorksheet()->getStyle($cell->getCoordinate())->getFont());\n                $this->addText($objRun);\n            }\n\n            // Set parent value\n            $cell->setValueExplicit($this, DataType::TYPE_STRING);\n        }\n    }\n\n    /**\n     * Add text.\n     *\n     * @param ITextElement $text Rich text element\n     *\n     * @return $this\n     */\n    public function addText(ITextElement $text): static\n    {\n        $this->richTextElements[] = $text;\n\n        return $this;\n    }\n\n    /**\n     * Create text.\n     *\n     * @param string $text Text\n     */\n    public function createText(string $text): TextElement\n    {\n        $objText = new TextElement($text);\n        $this->addText($objText);\n\n        return $objText;\n    }\n\n    /**\n     * Create text run.\n     *\n     * @param string $text Text\n     */\n    public function createTextRun(string $text): Run\n    {\n        $objText = new Run($text);\n        $this->addText($objText);\n\n        return $objText;\n    }\n\n    /**\n     * Get plain text.\n     */\n    public function getPlainText(): string\n    {\n        // Return value\n        $returnValue = '';\n\n        // Loop through all ITextElements\n        foreach ($this->richTextElements as $text) {\n            $returnValue .= $text->getText();\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * Convert to string.\n     */\n    public function __toString(): string\n    {\n        return $this->getPlainText();\n    }\n\n    /**\n     * Get Rich Text elements.\n     *\n     * @return ITextElement[]\n     */\n    public function getRichTextElements(): array\n    {\n        return $this->richTextElements;\n    }\n\n    /**\n     * Set Rich Text elements.\n     *\n     * @param ITextElement[] $textElements Array of elements\n     *\n     * @return $this\n     */\n    public function setRichTextElements(array $textElements): static\n    {\n        $this->richTextElements = $textElements;\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        $hashElements = '';\n        foreach ($this->richTextElements as $element) {\n            $hashElements .= $element->getHashCode();\n        }\n\n        return md5(\n            $hashElements\n            . __CLASS__\n        );\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            $newValue = is_object($value) ? (clone $value) : $value;\n            if (is_array($value)) {\n                $newValue = [];\n                foreach ($value as $key2 => $value2) {\n                    $newValue[$key2] = is_object($value2) ? (clone $value2) : $value2;\n                }\n            }\n            $this->$key = $newValue;\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/RichText/Run.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\RichText;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass Run extends TextElement implements ITextElement\n{\n    /**\n     * Font.\n     */\n    private ?Font $font;\n\n    /**\n     * Create a new Run instance.\n     *\n     * @param string $text Text\n     */\n    public function __construct(string $text = '')\n    {\n        parent::__construct($text);\n        // Initialise variables\n        $this->font = new Font();\n    }\n\n    /**\n     * Get font.\n     */\n    public function getFont(): ?Font\n    {\n        return $this->font;\n    }\n\n    public function getFontOrThrow(): Font\n    {\n        if ($this->font === null) {\n            throw new SpreadsheetException('unexpected null font');\n        }\n\n        return $this->font;\n    }\n\n    /**\n     * Set font.\n     *\n     * @param ?Font $font Font\n     *\n     * @return $this\n     */\n    public function setFont(?Font $font = null): static\n    {\n        $this->font = $font;\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->getText()\n            . (($this->font === null) ? '' : $this->font->getHashCode())\n            . __CLASS__\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/RichText/TextElement.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\RichText;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass TextElement implements ITextElement\n{\n    /**\n     * Text.\n     */\n    private string $text;\n\n    /**\n     * Create a new TextElement instance.\n     *\n     * @param string $text Text\n     */\n    public function __construct(string $text = '')\n    {\n        // Initialise variables\n        $this->text = $text;\n    }\n\n    /**\n     * Get text.\n     *\n     * @return string Text\n     */\n    public function getText(): string\n    {\n        return $this->text;\n    }\n\n    /**\n     * Set text.\n     *\n     * @param string $text Text\n     *\n     * @return $this\n     */\n    public function setText(string $text): self\n    {\n        $this->text = $text;\n\n        return $this;\n    }\n\n    /**\n     * Get font. For this class, the return value is always null.\n     */\n    public function getFont(): ?Font\n    {\n        return null;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->text\n            . __CLASS__\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Settings.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\IRenderer;\nuse PhpOffice\\PhpSpreadsheet\\Collection\\Memory;\nuse Psr\\SimpleCache\\CacheInterface;\nuse ReflectionClass;\n\nclass Settings\n{\n    /**\n     * Class name of the chart renderer used for rendering charts\n     * eg: PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph.\n     *\n     * @var null|class-string<IRenderer>\n     */\n    private static ?string $chartRenderer = null;\n\n    /**\n     * The cache implementation to be used for cell collection.\n     */\n    private static ?CacheInterface $cache = null;\n\n    private static mixed $httpClient = null;\n\n    private static mixed $requestFactory = null;\n\n    /**\n     * Set the locale code to use for formula translations and any special formatting.\n     *\n     * @param string $locale The locale code to use (e.g. \"fr\" or \"pt_br\" or \"en_uk\")\n     *\n     * @return bool Success or failure\n     */\n    public static function setLocale(string $locale): bool\n    {\n        return Calculation::getInstance()->setLocale($locale);\n    }\n\n    public static function getLocale(): string\n    {\n        return Calculation::getInstance()->getLocale();\n    }\n\n    /**\n     * Identify to PhpSpreadsheet the external library to use for rendering charts.\n     *\n     * @param class-string<IRenderer> $rendererClassName Class name of the chart renderer\n     *    eg: PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph\n     */\n    public static function setChartRenderer(string $rendererClassName): void\n    {\n        // We want phpstan to validate caller, but still need this test\n        if (!is_a($rendererClassName, IRenderer::class, true)) { //* @phpstan-ignore-line\n            throw new Exception('Chart renderer must implement ' . IRenderer::class);\n        }\n\n        self::$chartRenderer = $rendererClassName;\n    }\n\n    public static function unsetChartRenderer(): void\n    {\n        self::$chartRenderer = null;\n    }\n\n    /**\n     * Return the Chart Rendering Library that PhpSpreadsheet is currently configured to use.\n     *\n     * @return null|class-string<IRenderer> Class name of the chart renderer\n     *    eg: PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\JpGraph\n     */\n    public static function getChartRenderer(): ?string\n    {\n        return self::$chartRenderer;\n    }\n\n    public static function htmlEntityFlags(): int\n    {\n        return ENT_COMPAT;\n    }\n\n    /**\n     * Sets the implementation of cache that should be used for cell collection.\n     */\n    public static function setCache(?CacheInterface $cache): void\n    {\n        self::$cache = $cache;\n    }\n\n    /**\n     * Gets the implementation of cache that is being used for cell collection.\n     */\n    public static function getCache(): CacheInterface\n    {\n        if (!self::$cache) {\n            self::$cache = self::useSimpleCacheVersion3() ? new Memory\\SimpleCache3() : new Memory\\SimpleCache1();\n        }\n\n        return self::$cache;\n    }\n\n    public static function useSimpleCacheVersion3(): bool\n    {\n        return (new ReflectionClass(CacheInterface::class))->getMethod('get')->getReturnType() !== null;\n    }\n\n    /**\n     * Set the HTTP client implementation to be used for network request.\n     *\n     * @deprecated 5.4.0 No replacement.\n     *\n     * @codeCoverageIgnore\n     */\n    public static function setHttpClient(mixed $httpClient, mixed $requestFactory): void\n    {\n        self::$httpClient = $httpClient;\n        self::$requestFactory = $requestFactory;\n    }\n\n    /**\n     * Unset the HTTP client configuration.\n     *\n     * @deprecated 5.4.0 No replacement.\n     *\n     * @codeCoverageIgnore\n     */\n    public static function unsetHttpClient(): void\n    {\n        self::$httpClient = null;\n        self::$requestFactory = null;\n    }\n\n    /**\n     * Get the HTTP client implementation to be used for network request.\n     *\n     * @deprecated 5.4.0 No replacement.\n     *\n     * @codeCoverageIgnore\n     */\n    public static function getHttpClient(): mixed\n    {\n        return self::$httpClient;\n    }\n\n    /**\n     * Get the HTTP request factory.\n     *\n     * @deprecated 5.4.0 No replacement.\n     *\n     * @codeCoverageIgnore\n     */\n    public static function getRequestFactory(): mixed\n    {\n        return self::$requestFactory;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/CodePage.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass CodePage\n{\n    public const DEFAULT_CODE_PAGE = 'CP1252';\n\n    /** @var array<int, array<int, string>|string> */\n    private static array $pageArray = [\n        0 => 'CP1252', //    CodePage is not always correctly set when the xls file was saved by Apple's Numbers program\n        367 => 'ASCII', //    ASCII\n        437 => 'CP437', //    OEM US\n        //720 => 'notsupported', //    OEM Arabic\n        737 => 'CP737', //    OEM Greek\n        775 => 'CP775', //    OEM Baltic\n        850 => 'CP850', //    OEM Latin I\n        852 => 'CP852', //    OEM Latin II (Central European)\n        855 => 'CP855', //    OEM Cyrillic\n        857 => 'CP857', //    OEM Turkish\n        858 => 'CP858', //    OEM Multilingual Latin I with Euro\n        860 => 'CP860', //    OEM Portugese\n        861 => 'CP861', //    OEM Icelandic\n        862 => 'CP862', //    OEM Hebrew\n        863 => 'CP863', //    OEM Canadian (French)\n        864 => 'CP864', //    OEM Arabic\n        865 => 'CP865', //    OEM Nordic\n        866 => 'CP866', //    OEM Cyrillic (Russian)\n        869 => 'CP869', //    OEM Greek (Modern)\n        874 => 'CP874', //    ANSI Thai\n        932 => 'CP932', //    ANSI Japanese Shift-JIS\n        936 => 'CP936', //    ANSI Chinese Simplified GBK\n        949 => 'CP949', //    ANSI Korean (Wansung)\n        950 => 'CP950', //    ANSI Chinese Traditional BIG5\n        1200 => 'UTF-16LE', //    UTF-16 (BIFF8)\n        1250 => 'CP1250', //    ANSI Latin II (Central European)\n        1251 => 'CP1251', //    ANSI Cyrillic\n        1252 => 'CP1252', //    ANSI Latin I (BIFF4-BIFF7)\n        1253 => 'CP1253', //    ANSI Greek\n        1254 => 'CP1254', //    ANSI Turkish\n        1255 => 'CP1255', //    ANSI Hebrew\n        1256 => 'CP1256', //    ANSI Arabic\n        1257 => 'CP1257', //    ANSI Baltic\n        1258 => 'CP1258', //    ANSI Vietnamese\n        1361 => 'CP1361', //    ANSI Korean (Johab)\n        10000 => 'MAC', //    Apple Roman\n        10001 => 'CP932', //    Macintosh Japanese\n        10002 => 'CP950', //    Macintosh Chinese Traditional\n        10003 => 'CP1361', //    Macintosh Korean\n        10004 => 'MACARABIC', //    Apple Arabic\n        10005 => 'MACHEBREW', //    Apple Hebrew\n        10006 => 'MACGREEK', //    Macintosh Greek\n        10007 => 'MACCYRILLIC', //    Macintosh Cyrillic\n        10008 => 'CP936', //    Macintosh - Simplified Chinese (GB 2312)\n        10010 => 'MACROMANIA', //    Macintosh Romania\n        10017 => 'MACUKRAINE', //    Macintosh Ukraine\n        10021 => 'MACTHAI', //    Macintosh Thai\n        10029 => ['MACCENTRALEUROPE', 'MAC-CENTRALEUROPE'], //    Macintosh Central Europe\n        10079 => 'MACICELAND', //    Macintosh Icelandic\n        10081 => 'MACTURKISH', //    Macintosh Turkish\n        10082 => 'MACCROATIAN', //    Macintosh Croatian\n        21010 => 'UTF-16LE', //    UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE\n        32768 => 'MAC', //    Apple Roman\n        //32769 => 'unsupported', //    ANSI Latin I (BIFF2-BIFF3)\n        65000 => 'UTF-7', //    Unicode (UTF-7)\n        65001 => 'UTF-8', //    Unicode (UTF-8)\n        99999 => ['unsupported'], //    Unicode (UTF-8)\n    ];\n\n    public static function validate(string $codePage): bool\n    {\n        return in_array($codePage, self::$pageArray, true);\n    }\n\n    /**\n     * Convert Microsoft Code Page Identifier to Code Page Name which iconv\n     * and mbstring understands.\n     *\n     * @param int $codePage Microsoft Code Page Identifier\n     *\n     * @return string Code Page Name\n     */\n    public static function numberToName(int $codePage): string\n    {\n        if (array_key_exists($codePage, self::$pageArray)) {\n            $value = self::$pageArray[$codePage];\n            if (is_array($value)) {\n                foreach ($value as $encoding) {\n                    if (@iconv('UTF-8', $encoding, ' ') !== false) {\n                        self::$pageArray[$codePage] = $encoding;\n\n                        return $encoding;\n                    }\n                }\n\n                throw new PhpSpreadsheetException(\"Code page $codePage not implemented on this system.\");\n            } else {\n                return $value;\n            }\n        }\n        if ($codePage == 720 || $codePage == 32769) {\n            throw new PhpSpreadsheetException(\"Code page $codePage not supported.\"); //    OEM Arabic\n        }\n\n        throw new PhpSpreadsheetException('Unknown codepage: ' . $codePage);\n    }\n\n    /** @return array<int, array<int, string>|string> */\n    public static function getEncodings(): array\n    {\n        return self::$pageArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Date.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse Throwable;\n\nclass Date\n{\n    /** constants */\n    const CALENDAR_WINDOWS_1900 = 1900; //    Base date of 1st Jan 1900 = 1.0\n    const CALENDAR_MAC_1904 = 1904; //    Base date of 2nd Jan 1904 = 1.0\n\n    /**\n     * Names of the months of the year, indexed by shortname\n     * Planned usage for locale settings.\n     *\n     * @var string[]\n     */\n    public static array $monthNames = [\n        'Jan' => 'January',\n        'Feb' => 'February',\n        'Mar' => 'March',\n        'Apr' => 'April',\n        'May' => 'May',\n        'Jun' => 'June',\n        'Jul' => 'July',\n        'Aug' => 'August',\n        'Sep' => 'September',\n        'Oct' => 'October',\n        'Nov' => 'November',\n        'Dec' => 'December',\n    ];\n\n    /**\n     * @var string[]\n     */\n    public static array $numberSuffixes = [\n        'st',\n        'nd',\n        'rd',\n        'th',\n    ];\n\n    /**\n     * Base calendar year to use for calculations\n     * Value is either CALENDAR_WINDOWS_1900 (1900) or CALENDAR_MAC_1904 (1904).\n     */\n    protected static int $excelCalendar = self::CALENDAR_WINDOWS_1900;\n\n    /**\n     * Default timezone to use for DateTime objects.\n     */\n    protected static ?DateTimeZone $defaultTimeZone = null;\n\n    /**\n     * Set the Excel calendar (Windows 1900 or Mac 1904).\n     *\n     * @param ?int $baseYear Excel base date (1900 or 1904)\n     *\n     * @return bool Success or failure\n     */\n    public static function setExcelCalendar(?int $baseYear): bool\n    {\n        if (\n            ($baseYear === self::CALENDAR_WINDOWS_1900)\n            || ($baseYear === self::CALENDAR_MAC_1904)\n        ) {\n            self::$excelCalendar = $baseYear;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Return the Excel calendar (Windows 1900 or Mac 1904).\n     *\n     * @return int Excel base date (1900 or 1904)\n     */\n    public static function getExcelCalendar(): int\n    {\n        return self::$excelCalendar;\n    }\n\n    /**\n     * Set the Default timezone to use for dates.\n     *\n     * @param null|DateTimeZone|string $timeZone The timezone to set for all Excel datetimestamp to PHP DateTime Object conversions\n     *\n     * @return bool Success or failure\n     */\n    public static function setDefaultTimezone($timeZone): bool\n    {\n        try {\n            $timeZone = self::validateTimeZone($timeZone);\n            self::$defaultTimeZone = $timeZone;\n            $retval = true;\n        } catch (PhpSpreadsheetException) {\n            $retval = false;\n        }\n\n        return $retval;\n    }\n\n    /**\n     * Return the Default timezone, or UTC if default not set.\n     */\n    public static function getDefaultTimezone(): DateTimeZone\n    {\n        return self::$defaultTimeZone ?? new DateTimeZone('UTC');\n    }\n\n    /**\n     * Return the Default timezone, or local timezone if default is not set.\n     */\n    public static function getDefaultOrLocalTimezone(): DateTimeZone\n    {\n        return self::$defaultTimeZone ?? new DateTimeZone(date_default_timezone_get());\n    }\n\n    /**\n     * Return the Default timezone even if null.\n     */\n    public static function getDefaultTimezoneOrNull(): ?DateTimeZone\n    {\n        return self::$defaultTimeZone;\n    }\n\n    /**\n     * Validate a timezone.\n     *\n     * @param null|DateTimeZone|string $timeZone The timezone to validate, either as a timezone string or object\n     *\n     * @return ?DateTimeZone The timezone as a timezone object\n     */\n    private static function validateTimeZone($timeZone): ?DateTimeZone\n    {\n        if ($timeZone instanceof DateTimeZone || $timeZone === null) {\n            return $timeZone;\n        }\n        if (in_array($timeZone, DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC))) {\n            return new DateTimeZone($timeZone);\n        }\n\n        throw new PhpSpreadsheetException('Invalid timezone');\n    }\n\n    /**\n     * @param mixed $value Converts a date/time in ISO-8601 standard format date string to an Excel\n     *                         serialized timestamp.\n     *                     See https://en.wikipedia.org/wiki/ISO_8601 for details of the ISO-8601 standard format.\n     */\n    public static function convertIsoDate(mixed $value): float|int\n    {\n        if (!is_string($value)) {\n            throw new Exception('Non-string value supplied for Iso Date conversion');\n        }\n\n        $date = new DateTime($value);\n        $dateErrors = DateTime::getLastErrors();\n\n        if (is_array($dateErrors) && ($dateErrors['warning_count'] > 0 || $dateErrors['error_count'] > 0)) {\n            throw new Exception(\"Invalid string $value supplied for datatype Date\");\n        }\n\n        $newValue = self::dateTimeToExcel($date);\n\n        if (preg_match('/^\\s*\\d?\\d:\\d\\d(:\\d\\d([.]\\d+)?)?\\s*(am|pm)?\\s*$/i', $value) == 1) {\n            $newValue = fmod($newValue, 1.0);\n        }\n\n        return $newValue;\n    }\n\n    /**\n     * Convert a MS serialized datetime value from Excel to a PHP Date/Time object.\n     *\n     * @param float|int $excelTimestamp MS Excel serialized date/time value\n     * @param null|DateTimeZone|string $timeZone The timezone to assume for the Excel timestamp,\n     *                                           if you don't want to treat it as a UTC value\n     *                                           Use the default (UTC) unless you absolutely need a conversion\n     *\n     * @return DateTime PHP date/time object\n     */\n    public static function excelToDateTimeObject(float|int $excelTimestamp, null|DateTimeZone|string $timeZone = null): DateTime\n    {\n        $timeZone = ($timeZone === null) ? self::getDefaultTimezone() : self::validateTimeZone($timeZone);\n        if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {\n            if ($excelTimestamp < 1 && self::$excelCalendar === self::CALENDAR_WINDOWS_1900) {\n                // Unix timestamp base date\n                $baseDate = new DateTime('1970-01-01', $timeZone);\n            } else {\n                // MS Excel calendar base dates\n                if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) {\n                    // Allow adjustment for 1900 Leap Year in MS Excel\n                    $baseDate = ($excelTimestamp < 60) ? new DateTime('1899-12-31', $timeZone) : new DateTime('1899-12-30', $timeZone);\n                } else {\n                    $baseDate = new DateTime('1904-01-01', $timeZone);\n                }\n            }\n        } else {\n            $baseDate = new DateTime('1899-12-30', $timeZone);\n        }\n\n        if (is_int($excelTimestamp)) {\n            if ($excelTimestamp >= 0) {\n                return $baseDate->modify(\"+ $excelTimestamp days\");\n            }\n\n            return $baseDate->modify(\"$excelTimestamp days\");\n        }\n        $days = floor($excelTimestamp);\n        $partDay = $excelTimestamp - $days;\n        $hms = 86400 * $partDay;\n        $microseconds = (int) round(fmod($hms, 1) * 1000000);\n        $hms = (int) floor($hms);\n        $hours = intdiv($hms, 3600);\n        $hms -= $hours * 3600;\n        $minutes = intdiv($hms, 60);\n        $seconds = $hms % 60;\n\n        if ($days >= 0) {\n            $days = '+' . $days;\n        }\n        $interval = $days . ' days';\n\n        return $baseDate->modify($interval)\n            ->setTime($hours, $minutes, $seconds, $microseconds);\n    }\n\n    /**\n     * Convert a MS serialized datetime value from Excel to a unix timestamp.\n     * The use of Unix timestamps, and therefore this function, is discouraged.\n     * They are not Y2038-safe on a 32-bit system, and have no timezone info.\n     *\n     * @param float|int $excelTimestamp MS Excel serialized date/time value\n     * @param null|DateTimeZone|string $timeZone The timezone to assume for the Excel timestamp,\n     *                                               if you don't want to treat it as a UTC value\n     *                                               Use the default (UTC) unless you absolutely need a conversion\n     *\n     * @return int Unix timetamp for this date/time\n     */\n    public static function excelToTimestamp($excelTimestamp, $timeZone = null): int\n    {\n        $dto = self::excelToDateTimeObject($excelTimestamp, $timeZone);\n        self::roundMicroseconds($dto);\n\n        return (int) $dto->format('U');\n    }\n\n    /**\n     * Convert a date from PHP to an MS Excel serialized date/time value.\n     *\n     * @param mixed $dateValue PHP DateTime object or a string - Unix timestamp is also permitted, but discouraged;\n     *    not Y2038-safe on a 32-bit system, and no timezone info\n     *\n     * @return false|float Excel date/time value\n     *                                  or boolean FALSE on failure\n     */\n    public static function PHPToExcel(mixed $dateValue)\n    {\n        if ((is_object($dateValue)) && ($dateValue instanceof DateTimeInterface)) {\n            return self::dateTimeToExcel($dateValue);\n        } elseif (is_numeric($dateValue)) {\n            return self::timestampToExcel($dateValue);\n        } elseif (is_string($dateValue)) {\n            return self::stringToExcel($dateValue);\n        }\n\n        return false;\n    }\n\n    /**\n     * Convert a PHP DateTime object to an MS Excel serialized date/time value.\n     *\n     * @param DateTimeInterface $dateValue PHP DateTime object\n     *\n     * @return float MS Excel serialized date/time value\n     */\n    public static function dateTimeToExcel(DateTimeInterface $dateValue): float\n    {\n        $seconds = (float) sprintf('%d.%06d', $dateValue->format('s'), $dateValue->format('u'));\n\n        return self::formattedPHPToExcel(\n            (int) $dateValue->format('Y'),\n            (int) $dateValue->format('m'),\n            (int) $dateValue->format('d'),\n            (int) $dateValue->format('H'),\n            (int) $dateValue->format('i'),\n            $seconds\n        );\n    }\n\n    /**\n     * Convert a Unix timestamp to an MS Excel serialized date/time value.\n     * The use of Unix timestamps, and therefore this function, is discouraged.\n     * They are not Y2038-safe on a 32-bit system, and have no timezone info.\n     *\n     * @param float|int|string $unixTimestamp Unix Timestamp\n     *\n     * @return false|float MS Excel serialized date/time value\n     */\n    public static function timestampToExcel($unixTimestamp): bool|float\n    {\n        if (!is_numeric($unixTimestamp)) {\n            return false;\n        }\n\n        return self::dateTimeToExcel(new DateTime('@' . $unixTimestamp));\n    }\n\n    /**\n     * formattedPHPToExcel.\n     *\n     * @return float Excel date/time value\n     */\n    public static function formattedPHPToExcel(int $year, int $month, int $day, int $hours = 0, int $minutes = 0, float|int $seconds = 0): float\n    {\n        if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) {\n            //\n            //    Fudge factor for the erroneous fact that the year 1900 is treated as a Leap Year in MS Excel\n            //    This affects every date following 28th February 1900\n            //\n            $excel1900isLeapYear = true;\n            if (($year == 1900) && ($month <= 2)) {\n                $excel1900isLeapYear = false;\n            }\n            $myexcelBaseDate = 2415020;\n        } else {\n            $myexcelBaseDate = 2416481;\n            $excel1900isLeapYear = false;\n        }\n\n        //    Julian base date Adjustment\n        if ($month > 2) {\n            $month -= 3;\n        } else {\n            $month += 9;\n            --$year;\n        }\n\n        //    Calculate the Julian Date, then subtract the Excel base date (JD 2415020 = 31-Dec-1899 Giving Excel Date of 0)\n        $century = (int) substr((string) $year, 0, 2);\n        $decade = (int) substr((string) $year, 2, 2);\n        $excelDate = floor((146097 * $century) / 4) + floor((1461 * $decade) / 4) + floor((153 * $month + 2) / 5) + $day + 1721119 - $myexcelBaseDate + $excel1900isLeapYear;\n\n        $excelTime = (($hours * 3600) + ($minutes * 60) + $seconds) / 86400;\n\n        return (float) $excelDate + $excelTime;\n    }\n\n    /**\n     * Is a given cell a date/time?\n     */\n    public static function isDateTime(Cell $cell, mixed $value = null, bool $dateWithoutTimeOkay = true): bool\n    {\n        $result = false;\n        $worksheet = $cell->getWorksheetOrNull();\n        $spreadsheet = ($worksheet === null) ? null : $worksheet->getParent();\n        if ($worksheet !== null && $spreadsheet !== null) {\n            $index = $spreadsheet->getActiveSheetIndex();\n            $selected = $worksheet->getSelectedCells();\n\n            try {\n                if ($value === null) {\n                    $value = Functions::flattenSingleValue(\n                        $cell->getCalculatedValue()\n                    );\n                }\n                if (is_numeric($value)) {\n                    $result = self::isDateTimeFormat(\n                        $worksheet->getStyle(\n                            $cell->getCoordinate()\n                        )->getNumberFormat(),\n                        $dateWithoutTimeOkay\n                    );\n                    /** @var float|int $value */\n                    self::excelToDateTimeObject($value);\n                }\n            } catch (Throwable) {\n                $result = false;\n            }\n            $worksheet->setSelectedCells($selected);\n            $spreadsheet->setActiveSheetIndex($index);\n        }\n\n        return $result;\n    }\n\n    /**\n     * Is a given NumberFormat code a date/time format code?\n     */\n    public static function isDateTimeFormat(NumberFormat $excelFormatCode, bool $dateWithoutTimeOkay = true): bool\n    {\n        return self::isDateTimeFormatCode((string) $excelFormatCode->getFormatCode(), $dateWithoutTimeOkay);\n    }\n\n    private const POSSIBLE_DATETIME_FORMAT_CHARACTERS = 'eymdHs';\n    private const POSSIBLE_TIME_FORMAT_CHARACTERS = 'Hs'; // note - no 'm' due to ambiguity\n\n    /**\n     * Is a given number format code a date/time?\n     */\n    public static function isDateTimeFormatCode(string $excelFormatCode, bool $dateWithoutTimeOkay = true): bool\n    {\n        if (strtolower($excelFormatCode) === strtolower(NumberFormat::FORMAT_GENERAL)) {\n            //    \"General\" contains an epoch letter 'e', so we trap for it explicitly here (case-insensitive check)\n            return false;\n        }\n        if (preg_match('/[0#]E[+-]0/i', $excelFormatCode)) {\n            //    Scientific format\n            return false;\n        }\n\n        // Switch on formatcode\n        $excelFormatCode = (string) NumberFormat::convertSystemFormats($excelFormatCode);\n        if (in_array($excelFormatCode, NumberFormat::DATE_TIME_OR_DATETIME_ARRAY, true)) {\n            return $dateWithoutTimeOkay || in_array($excelFormatCode, NumberFormat::TIME_OR_DATETIME_ARRAY);\n        }\n\n        //    Typically number, currency or accounting (or occasionally fraction) formats\n        if ((str_starts_with($excelFormatCode, '_')) || (str_starts_with($excelFormatCode, '0 '))) {\n            return false;\n        }\n        // Some \"special formats\" provided in German Excel versions were detected as date time value,\n        // so filter them out here - \"\\C\\H\\-00000\" (Switzerland) and \"\\D-00000\" (Germany).\n        if (str_contains($excelFormatCode, '-00000')) {\n            return false;\n        }\n        $possibleFormatCharacters = $dateWithoutTimeOkay ? self::POSSIBLE_DATETIME_FORMAT_CHARACTERS : self::POSSIBLE_TIME_FORMAT_CHARACTERS;\n        // Try checking for any of the date formatting characters that don't appear within square braces\n        if (preg_match('/(^|\\])[^\\[]*[' . $possibleFormatCharacters . ']/i', $excelFormatCode)) {\n            //    We might also have a format mask containing quoted strings...\n            //        we don't want to test for any of our characters within the quoted blocks\n            if (str_contains($excelFormatCode, '\"')) {\n                $segMatcher = false;\n                foreach (explode('\"', $excelFormatCode) as $subVal) {\n                    //    Only test in alternate array entries (the non-quoted blocks)\n                    $segMatcher = $segMatcher === false;\n                    if (\n                        $segMatcher\n                        && (preg_match('/(^|\\])[^\\[]*[' . $possibleFormatCharacters . ']/i', $subVal))\n                    ) {\n                        return true;\n                    }\n                }\n\n                return false;\n            }\n\n            return true;\n        }\n\n        // No date...\n        return false;\n    }\n\n    /**\n     * Convert a date/time string to Excel time.\n     *\n     * @param string $dateValue Examples: '2009-12-31', '2009-12-31 15:59', '2009-12-31 15:59:10'\n     *\n     * @return false|float Excel date/time serial value\n     */\n    public static function stringToExcel(string $dateValue): bool|float\n    {\n        if (strlen($dateValue) < 2) {\n            return false;\n        }\n        if (!preg_match('/^(\\d{1,4}[ \\.\\/\\-][A-Z]{3,9}([ \\.\\/\\-]\\d{1,4})?|[A-Z]{3,9}[ \\.\\/\\-]\\d{1,4}([ \\.\\/\\-]\\d{1,4})?|\\d{1,4}[ \\.\\/\\-]\\d{1,4}([ \\.\\/\\-]\\d{1,4})?)( \\d{1,2}:\\d{1,2}(:\\d{1,2}([.]\\d+)?)?)?$/iu', $dateValue)) {\n            return false;\n        }\n\n        $dateValueNew = DateTimeExcel\\DateValue::fromString($dateValue);\n\n        if (!is_float($dateValueNew)) {\n            return false;\n        }\n\n        if (str_contains($dateValue, ':')) {\n            $timeValue = DateTimeExcel\\TimeValue::fromString($dateValue);\n            if (!is_float($timeValue)) {\n                return false;\n            }\n            $dateValueNew += $timeValue;\n        }\n\n        return $dateValueNew;\n    }\n\n    /**\n     * Converts a month name (either a long or a short name) to a month number.\n     *\n     * @param string $monthName Month name or abbreviation\n     *\n     * @return int|string Month number (1 - 12), or the original string argument if it isn't a valid month name\n     */\n    public static function monthStringToNumber(string $monthName)\n    {\n        $monthIndex = 1;\n        foreach (self::$monthNames as $shortMonthName => $longMonthName) {\n            if (($monthName === $longMonthName) || ($monthName === $shortMonthName)) {\n                return $monthIndex;\n            }\n            ++$monthIndex;\n        }\n\n        return $monthName;\n    }\n\n    /**\n     * Strips an ordinal from a numeric value.\n     *\n     * @param string $day Day number with an ordinal\n     *\n     * @return int|string The integer value with any ordinal stripped, or the original string argument if it isn't a valid numeric\n     */\n    public static function dayStringToNumber(string $day)\n    {\n        $strippedDayValue = (str_replace(self::$numberSuffixes, '', $day));\n        if (is_numeric($strippedDayValue)) {\n            return (int) $strippedDayValue;\n        }\n\n        return $day;\n    }\n\n    public static function dateTimeFromTimestamp(string $date, ?DateTimeZone $timeZone = null): DateTime\n    {\n        $dtobj = DateTime::createFromFormat('U', $date) ?: new DateTime();\n        $dtobj->setTimeZone($timeZone ?? self::getDefaultOrLocalTimezone());\n\n        return $dtobj;\n    }\n\n    public static function formattedDateTimeFromTimestamp(string $date, string $format, ?DateTimeZone $timeZone = null): string\n    {\n        $dtobj = self::dateTimeFromTimestamp($date, $timeZone);\n\n        return $dtobj->format($format);\n    }\n\n    /**\n     * Round the given DateTime object to seconds.\n     */\n    public static function roundMicroseconds(DateTime $dti): void\n    {\n        $microseconds = (int) $dti->format('u');\n        $rounded = (int) round($microseconds, -6);\n        $modify = $rounded - $microseconds;\n        if ($modify !== 0) {\n            $dti->modify(($modify > 0 ? '+' : '') . $modify . ' microseconds');\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Drawing.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse SimpleXMLElement;\n\nclass Drawing\n{\n    /**\n     * Convert pixels to EMU.\n     *\n     * @param int $pixelValue Value in pixels\n     *\n     * @return float|int Value in EMU\n     */\n    public static function pixelsToEMU(int $pixelValue): int|float\n    {\n        return $pixelValue * 9525;\n    }\n\n    /**\n     * Convert EMU to pixels.\n     *\n     * @param int|SimpleXMLElement $emuValue Value in EMU\n     *\n     * @return int Value in pixels\n     */\n    public static function EMUToPixels($emuValue): int\n    {\n        $emuValue = (int) $emuValue;\n        if ($emuValue != 0) {\n            return (int) round($emuValue / 9525);\n        }\n\n        return 0;\n    }\n\n    /**\n     * Convert pixels to column width. Exact algorithm not known.\n     * By inspection of a real Excel file using Calibri 11, one finds 1000px ~ 142.85546875\n     * This gives a conversion factor of 7. Also, we assume that pixels and font size are proportional.\n     *\n     * @param int $pixelValue Value in pixels\n     *\n     * @return float|int Value in cell dimension\n     */\n    public static function pixelsToCellDimension(int $pixelValue, \\PhpOffice\\PhpSpreadsheet\\Style\\Font $defaultFont): int|float\n    {\n        // Font name and size\n        $name = $defaultFont->getName();\n        $size = $defaultFont->getSize();\n        $sizex = ($size !== null && $size == (int) $size) ? ((int) $size) : \"$size\";\n\n        if (isset(Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex])) {\n            // Exact width can be determined\n            return $pixelValue * Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['width']\n                / Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['px'];\n        }\n\n        // We don't have data for this particular font and size, use approximation by\n        // extrapolating from Calibri 11\n        return $pixelValue * 11 * Font::DEFAULT_COLUMN_WIDTHS['Calibri'][11]['width']\n            / Font::DEFAULT_COLUMN_WIDTHS['Calibri'][11]['px'] / $size;\n    }\n\n    /**\n     * Convert column width from (intrinsic) Excel units to pixels.\n     *\n     * @param float $cellWidth Value in cell dimension\n     * @param \\PhpOffice\\PhpSpreadsheet\\Style\\Font $defaultFont Default font of the workbook\n     *\n     * @return int Value in pixels\n     */\n    public static function cellDimensionToPixels(float $cellWidth, \\PhpOffice\\PhpSpreadsheet\\Style\\Font $defaultFont): int\n    {\n        // Font name and size\n        $name = $defaultFont->getName();\n        $size = $defaultFont->getSize();\n        $sizex = ($size !== null && $size == (int) $size) ? ((int) $size) : \"$size\";\n\n        if (isset(Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex])) {\n            // Exact width can be determined\n            $colWidth = $cellWidth * Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['px']\n                / Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['width'];\n        } else {\n            // We don't have data for this particular font and size, use approximation by\n            // extrapolating from Calibri 11\n            $colWidth = $cellWidth * $size * Font::DEFAULT_COLUMN_WIDTHS['Calibri'][11]['px']\n                / Font::DEFAULT_COLUMN_WIDTHS['Calibri'][11]['width'] / 11;\n        }\n\n        // Round pixels to closest integer\n        $colWidth = (int) round($colWidth);\n\n        return $colWidth;\n    }\n\n    /**\n     * Convert pixels to points.\n     *\n     * @param int $pixelValue Value in pixels\n     *\n     * @return float Value in points\n     */\n    public static function pixelsToPoints(int $pixelValue): float\n    {\n        return $pixelValue * 0.75;\n    }\n\n    /**\n     * Convert points to pixels.\n     *\n     * @param float|int $pointValue Value in points\n     *\n     * @return int Value in pixels\n     */\n    public static function pointsToPixels($pointValue): int\n    {\n        return (int) ceil($pointValue / 0.75);\n    }\n\n    /**\n     * Convert degrees to angle.\n     *\n     * @param int $degrees Degrees\n     *\n     * @return int Angle\n     */\n    public static function degreesToAngle(int $degrees): int\n    {\n        return (int) round($degrees * 60000);\n    }\n\n    /**\n     * Convert angle to degrees.\n     *\n     * @param int|SimpleXMLElement $angle Angle\n     *\n     * @return int Degrees\n     */\n    public static function angleToDegrees($angle): int\n    {\n        $angle = (int) $angle;\n        if ($angle != 0) {\n            return (int) round($angle / 60000);\n        }\n\n        return 0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer;\n\nclass SpContainer\n{\n    /**\n     * Parent Shape Group Container.\n     */\n    private SpgrContainer $parent;\n\n    /**\n     * Is this a group shape?\n     */\n    private bool $spgr = false;\n\n    /**\n     * Shape type.\n     */\n    private int $spType;\n\n    /**\n     * Shape flag.\n     */\n    private int $spFlag;\n\n    /**\n     * Shape index (usually group shape has index 0, and the rest: 1,2,3...).\n     */\n    private int $spId;\n\n    /**\n     * Array of options.\n     *\n     * @var mixed[]\n     */\n    private array $OPT = [];\n\n    /**\n     * Cell coordinates of upper-left corner of shape, e.g. 'A1'.\n     */\n    private string $startCoordinates = '';\n\n    /**\n     * Horizontal offset of upper-left corner of shape measured in 1/1024 of column width.\n     */\n    private int|float $startOffsetX;\n\n    /**\n     * Vertical offset of upper-left corner of shape measured in 1/256 of row height.\n     */\n    private int|float $startOffsetY;\n\n    /**\n     * Cell coordinates of bottom-right corner of shape, e.g. 'B2'.\n     */\n    private string $endCoordinates;\n\n    /**\n     * Horizontal offset of bottom-right corner of shape measured in 1/1024 of column width.\n     */\n    private int|float $endOffsetX;\n\n    /**\n     * Vertical offset of bottom-right corner of shape measured in 1/256 of row height.\n     */\n    private int|float $endOffsetY;\n\n    /**\n     * Set parent Shape Group Container.\n     */\n    public function setParent(SpgrContainer $parent): void\n    {\n        $this->parent = $parent;\n    }\n\n    /**\n     * Get the parent Shape Group Container.\n     */\n    public function getParent(): SpgrContainer\n    {\n        return $this->parent;\n    }\n\n    /**\n     * Set whether this is a group shape.\n     */\n    public function setSpgr(bool $value): void\n    {\n        $this->spgr = $value;\n    }\n\n    /**\n     * Get whether this is a group shape.\n     */\n    public function getSpgr(): bool\n    {\n        return $this->spgr;\n    }\n\n    /**\n     * Set the shape type.\n     */\n    public function setSpType(int $value): void\n    {\n        $this->spType = $value;\n    }\n\n    /**\n     * Get the shape type.\n     */\n    public function getSpType(): int\n    {\n        return $this->spType;\n    }\n\n    /**\n     * Set the shape flag.\n     */\n    public function setSpFlag(int $value): void\n    {\n        $this->spFlag = $value;\n    }\n\n    /**\n     * Get the shape flag.\n     */\n    public function getSpFlag(): int\n    {\n        return $this->spFlag;\n    }\n\n    /**\n     * Set the shape index.\n     */\n    public function setSpId(int $value): void\n    {\n        $this->spId = $value;\n    }\n\n    /**\n     * Get the shape index.\n     */\n    public function getSpId(): int\n    {\n        return $this->spId;\n    }\n\n    /**\n     * Set an option for the Shape Group Container.\n     *\n     * @param int $property The number specifies the option\n     */\n    public function setOPT(int $property, mixed $value): void\n    {\n        $this->OPT[$property] = $value;\n    }\n\n    /**\n     * Get an option for the Shape Group Container.\n     *\n     * @param int $property The number specifies the option\n     */\n    public function getOPT(int $property): mixed\n    {\n        return $this->OPT[$property] ?? null;\n    }\n\n    /**\n     * Get the collection of options.\n     *\n     * @return mixed[]\n     */\n    public function getOPTCollection(): array\n    {\n        return $this->OPT;\n    }\n\n    /**\n     * Set cell coordinates of upper-left corner of shape.\n     *\n     * @param string $value eg: 'A1'\n     */\n    public function setStartCoordinates(string $value): void\n    {\n        $this->startCoordinates = $value;\n    }\n\n    /**\n     * Get cell coordinates of upper-left corner of shape.\n     */\n    public function getStartCoordinates(): string\n    {\n        return $this->startCoordinates;\n    }\n\n    /**\n     * Set offset in x-direction of upper-left corner of shape measured in 1/1024 of column width.\n     */\n    public function setStartOffsetX(int|float $startOffsetX): void\n    {\n        $this->startOffsetX = $startOffsetX;\n    }\n\n    /**\n     * Get offset in x-direction of upper-left corner of shape measured in 1/1024 of column width.\n     */\n    public function getStartOffsetX(): int|float\n    {\n        return $this->startOffsetX;\n    }\n\n    /**\n     * Set offset in y-direction of upper-left corner of shape measured in 1/256 of row height.\n     */\n    public function setStartOffsetY(int|float $startOffsetY): void\n    {\n        $this->startOffsetY = $startOffsetY;\n    }\n\n    /**\n     * Get offset in y-direction of upper-left corner of shape measured in 1/256 of row height.\n     */\n    public function getStartOffsetY(): int|float\n    {\n        return $this->startOffsetY;\n    }\n\n    /**\n     * Set cell coordinates of bottom-right corner of shape.\n     *\n     * @param string $value eg: 'A1'\n     */\n    public function setEndCoordinates(string $value): void\n    {\n        $this->endCoordinates = $value;\n    }\n\n    /**\n     * Get cell coordinates of bottom-right corner of shape.\n     */\n    public function getEndCoordinates(): string\n    {\n        return $this->endCoordinates;\n    }\n\n    /**\n     * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width.\n     */\n    public function setEndOffsetX(int|float $endOffsetX): void\n    {\n        $this->endOffsetX = $endOffsetX;\n    }\n\n    /**\n     * Get offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width.\n     */\n    public function getEndOffsetX(): int|float\n    {\n        return $this->endOffsetX;\n    }\n\n    /**\n     * Set offset in y-direction of bottom-right corner of shape measured in 1/256 of row height.\n     */\n    public function setEndOffsetY(int|float $endOffsetY): void\n    {\n        $this->endOffsetY = $endOffsetY;\n    }\n\n    /**\n     * Get offset in y-direction of bottom-right corner of shape measured in 1/256 of row height.\n     */\n    public function getEndOffsetY(): int|float\n    {\n        return $this->endOffsetY;\n    }\n\n    /**\n     * Get the nesting level of this spContainer. This is the number of spgrContainers between this spContainer and\n     * the dgContainer. A value of 1 = immediately within first spgrContainer\n     * Higher nesting level occurs if and only if spContainer is part of a shape group.\n     *\n     * @return int Nesting level\n     */\n    public function getNestingLevel(): int\n    {\n        $nestingLevel = 0;\n\n        $parent = $this->getParent();\n        while ($parent instanceof SpgrContainer) {\n            ++$nestingLevel;\n            $parent = $parent->getParent();\n        }\n\n        return $nestingLevel;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer;\n\nclass SpgrContainer\n{\n    /**\n     * Parent Shape Group Container.\n     */\n    private ?self $parent = null;\n\n    /**\n     * Shape Container collection.\n     *\n     * @var mixed[]\n     */\n    private array $children = [];\n\n    /**\n     * Set parent Shape Group Container.\n     */\n    public function setParent(?self $parent): void\n    {\n        $this->parent = $parent;\n    }\n\n    /**\n     * Get the parent Shape Group Container if any.\n     */\n    public function getParent(): ?self\n    {\n        return $this->parent;\n    }\n\n    /**\n     * Add a child. This will be either spgrContainer or spContainer.\n     *\n     * @param SpgrContainer|SpgrContainer\\SpContainer $child child to be added\n     */\n    public function addChild(mixed $child): void\n    {\n        $this->children[] = $child;\n        $child->setParent($this);\n    }\n\n    /**\n     * Get collection of Shape Containers.\n     *\n     * @return mixed[]\n     */\n    public function getChildren(): array\n    {\n        return $this->children;\n    }\n\n    /**\n     * Recursively get all spContainers within this spgrContainer.\n     *\n     * @return SpgrContainer\\SpContainer[]\n     */\n    public function getAllSpContainers(): array\n    {\n        $allSpContainers = [];\n\n        foreach ($this->children as $child) {\n            if ($child instanceof self) {\n                $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers());\n            } else {\n                $allSpContainers[] = $child;\n            }\n        }\n        /** @var SpgrContainer\\SpContainer[] $allSpContainers */\n\n        return $allSpContainers;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Escher/DgContainer.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Escher;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer;\n\nclass DgContainer\n{\n    /**\n     * Drawing index, 1-based.\n     */\n    private ?int $dgId = null;\n\n    /**\n     * Last shape index in this drawing.\n     */\n    private ?int $lastSpId = null;\n\n    private ?SpgrContainer $spgrContainer = null;\n\n    public function getDgId(): ?int\n    {\n        return $this->dgId;\n    }\n\n    public function setDgId(int $value): void\n    {\n        $this->dgId = $value;\n    }\n\n    public function getLastSpId(): ?int\n    {\n        return $this->lastSpId;\n    }\n\n    public function setLastSpId(int $value): void\n    {\n        $this->lastSpId = $value;\n    }\n\n    public function getSpgrContainer(): ?SpgrContainer\n    {\n        return $this->spgrContainer;\n    }\n\n    public function getSpgrContainerOrThrow(): SpgrContainer\n    {\n        if ($this->spgrContainer !== null) {\n            return $this->spgrContainer;\n        }\n\n        throw new SpreadsheetException('spgrContainer is unexpectedly null');\n    }\n\n    public function setSpgrContainer(SpgrContainer $spgrContainer): SpgrContainer\n    {\n        return $this->spgrContainer = $spgrContainer;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE;\n\nclass Blip\n{\n    /**\n     * The parent BSE.\n     */\n    private BSE $parent;\n\n    /**\n     * Raw image data.\n     */\n    private string $data;\n\n    /**\n     * Get the raw image data.\n     */\n    public function getData(): string\n    {\n        return $this->data;\n    }\n\n    /**\n     * Set the raw image data.\n     */\n    public function setData(string $data): void\n    {\n        $this->data = $data;\n    }\n\n    /**\n     * Set parent BSE.\n     */\n    public function setParent(BSE $parent): void\n    {\n        $this->parent = $parent;\n    }\n\n    /**\n     * Get parent BSE.\n     */\n    public function getParent(): BSE\n    {\n        return $this->parent;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer;\n\nclass BSE\n{\n    const BLIPTYPE_ERROR = 0x00;\n    const BLIPTYPE_UNKNOWN = 0x01;\n    const BLIPTYPE_EMF = 0x02;\n    const BLIPTYPE_WMF = 0x03;\n    const BLIPTYPE_PICT = 0x04;\n    const BLIPTYPE_JPEG = 0x05;\n    const BLIPTYPE_PNG = 0x06;\n    const BLIPTYPE_DIB = 0x07;\n    const BLIPTYPE_TIFF = 0x11;\n    const BLIPTYPE_CMYKJPEG = 0x12;\n\n    /**\n     * The parent BLIP Store Entry Container.\n     * Property is currently unused.\n     */\n    private BstoreContainer $parent;\n\n    /**\n     * The BLIP (Big Large Image or Picture).\n     */\n    private ?BSE\\Blip $blip = null;\n\n    /**\n     * The BLIP type.\n     */\n    private int $blipType;\n\n    /**\n     * Set parent BLIP Store Entry Container.\n     */\n    public function setParent(BstoreContainer $parent): void\n    {\n        $this->parent = $parent;\n    }\n\n    public function getParent(): BstoreContainer\n    {\n        return $this->parent;\n    }\n\n    /**\n     * Get the BLIP.\n     */\n    public function getBlip(): ?BSE\\Blip\n    {\n        return $this->blip;\n    }\n\n    /**\n     * Set the BLIP.\n     */\n    public function setBlip(BSE\\Blip $blip): void\n    {\n        $this->blip = $blip;\n        $blip->setParent($this);\n    }\n\n    /**\n     * Get the BLIP type.\n     */\n    public function getBlipType(): int\n    {\n        return $this->blipType;\n    }\n\n    /**\n     * Set the BLIP type.\n     */\n    public function setBlipType(int $blipType): void\n    {\n        $this->blipType = $blipType;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer;\n\nclass BstoreContainer\n{\n    /**\n     * BLIP Store Entries. Each of them holds one BLIP (Big Large Image or Picture).\n     *\n     * @var BstoreContainer\\BSE[]\n     */\n    private array $BSECollection = [];\n\n    /**\n     * Add a BLIP Store Entry.\n     */\n    public function addBSE(BstoreContainer\\BSE $BSE): void\n    {\n        $this->BSECollection[] = $BSE;\n        $BSE->setParent($this);\n    }\n\n    /**\n     * Get the collection of BLIP Store Entries.\n     *\n     * @return BstoreContainer\\BSE[]\n     */\n    public function getBSECollection(): array\n    {\n        return $this->BSECollection;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Escher/DggContainer.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Escher;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\n\nclass DggContainer\n{\n    /**\n     * Maximum shape index of all shapes in all drawings increased by one.\n     */\n    private int $spIdMax;\n\n    /**\n     * Total number of drawings saved.\n     */\n    private int $cDgSaved;\n\n    /**\n     * Total number of shapes saved (including group shapes).\n     */\n    private int $cSpSaved;\n\n    /**\n     * BLIP Store Container.\n     */\n    private ?DggContainer\\BstoreContainer $bstoreContainer = null;\n\n    /**\n     * Array of options for the drawing group.\n     *\n     * @var mixed[]\n     */\n    private array $OPT = [];\n\n    /**\n     * Array of identifier clusters containing information about the maximum shape identifiers.\n     *\n     * @var mixed[]\n     */\n    private array $IDCLs = [];\n\n    /**\n     * Get maximum shape index of all shapes in all drawings (plus one).\n     */\n    public function getSpIdMax(): int\n    {\n        return $this->spIdMax;\n    }\n\n    /**\n     * Set maximum shape index of all shapes in all drawings (plus one).\n     */\n    public function setSpIdMax(int $value): void\n    {\n        $this->spIdMax = $value;\n    }\n\n    /**\n     * Get total number of drawings saved.\n     */\n    public function getCDgSaved(): int\n    {\n        return $this->cDgSaved;\n    }\n\n    /**\n     * Set total number of drawings saved.\n     */\n    public function setCDgSaved(int $value): void\n    {\n        $this->cDgSaved = $value;\n    }\n\n    /**\n     * Get total number of shapes saved (including group shapes).\n     */\n    public function getCSpSaved(): int\n    {\n        return $this->cSpSaved;\n    }\n\n    /**\n     * Set total number of shapes saved (including group shapes).\n     */\n    public function setCSpSaved(int $value): void\n    {\n        $this->cSpSaved = $value;\n    }\n\n    /**\n     * Get BLIP Store Container.\n     */\n    public function getBstoreContainer(): ?DggContainer\\BstoreContainer\n    {\n        return $this->bstoreContainer;\n    }\n\n    /**\n     * Get BLIP Store Container.\n     */\n    public function getBstoreContainerOrThrow(): DggContainer\\BstoreContainer\n    {\n        return $this->bstoreContainer ?? throw new SpreadsheetException('bstoreContainer is unexpectedly null');\n    }\n\n    /**\n     * Set BLIP Store Container.\n     */\n    public function setBstoreContainer(DggContainer\\BstoreContainer $bstoreContainer): void\n    {\n        $this->bstoreContainer = $bstoreContainer;\n    }\n\n    /**\n     * Set an option for the drawing group.\n     *\n     * @param int $property The number specifies the option\n     */\n    public function setOPT(int $property, mixed $value): void\n    {\n        $this->OPT[$property] = $value;\n    }\n\n    /**\n     * Get an option for the drawing group.\n     *\n     * @param int $property The number specifies the option\n     */\n    public function getOPT(int $property): mixed\n    {\n        if (isset($this->OPT[$property])) {\n            return $this->OPT[$property];\n        }\n\n        return null;\n    }\n\n    /**\n     * Get identifier clusters.\n     *\n     * @return mixed[]\n     */\n    public function getIDCLs(): array\n    {\n        return $this->IDCLs;\n    }\n\n    /**\n     * Set identifier clusters. [<drawingId> => <max shape id>, ...].\n     *\n     * @param mixed[] $IDCLs\n     */\n    public function setIDCLs(array $IDCLs): void\n    {\n        $this->IDCLs = $IDCLs;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Escher.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\n\nclass Escher\n{\n    /**\n     * Drawing Group Container.\n     */\n    private ?Escher\\DggContainer $dggContainer = null;\n\n    /**\n     * Drawing Container.\n     */\n    private ?Escher\\DgContainer $dgContainer = null;\n\n    /**\n     * Get Drawing Group Container.\n     */\n    public function getDggContainer(): ?Escher\\DggContainer\n    {\n        return $this->dggContainer;\n    }\n\n    /**\n     * Get Drawing Group Container.\n     */\n    public function getDggContainerOrThrow(): Escher\\DggContainer\n    {\n        return $this->dggContainer ?? throw new SpreadsheetException('dggContainer is unexpectedly null');\n    }\n\n    /**\n     * Set Drawing Group Container.\n     */\n    public function setDggContainer(Escher\\DggContainer $dggContainer): Escher\\DggContainer\n    {\n        return $this->dggContainer = $dggContainer;\n    }\n\n    /**\n     * Get Drawing Container.\n     */\n    public function getDgContainer(): ?Escher\\DgContainer\n    {\n        return $this->dgContainer;\n    }\n\n    /**\n     * Get Drawing Container.\n     */\n    public function getDgContainerOrThrow(): Escher\\DgContainer\n    {\n        return $this->dgContainer ?? throw new SpreadsheetException('dgContainer is unexpectedly null');\n    }\n\n    /**\n     * Set Drawing Container.\n     */\n    public function setDgContainer(Escher\\DgContainer $dgContainer): Escher\\DgContainer\n    {\n        return $this->dgContainer = $dgContainer;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/File.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse ZipArchive;\n\nclass File\n{\n    /**\n     * Use Temp or File Upload Temp for temporary files.\n     */\n    protected static bool $useUploadTempDirectory = false;\n\n    /**\n     * Set the flag indicating whether the File Upload Temp directory should be used for temporary files.\n     */\n    public static function setUseUploadTempDirectory(bool $useUploadTempDir): void\n    {\n        self::$useUploadTempDirectory = (bool) $useUploadTempDir;\n    }\n\n    /**\n     * Get the flag indicating whether the File Upload Temp directory should be used for temporary files.\n     */\n    public static function getUseUploadTempDirectory(): bool\n    {\n        return self::$useUploadTempDirectory;\n    }\n\n    // https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT\n    // Section 4.3.7\n    // Looks like there might be endian-ness considerations\n    private const ZIP_FIRST_4 = [\n        \"\\x50\\x4b\\x03\\x04\", // what it looks like on my system\n        \"\\x04\\x03\\x4b\\x50\", // what it says in documentation\n    ];\n\n    private static function validateZipFirst4(string $zipFile): bool\n    {\n        $contents = @file_get_contents($zipFile, false, null, 0, 4);\n\n        return in_array($contents, self::ZIP_FIRST_4, true);\n    }\n\n    /**\n     * Verify if a file exists.\n     */\n    public static function fileExists(string $filename): bool\n    {\n        // Sick construction, but it seems that\n        // file_exists returns strange values when\n        // doing the original file_exists on ZIP archives...\n        if (strtolower(substr($filename, 0, 6)) == 'zip://') {\n            // Open ZIP file and verify if the file exists\n            $zipFile = substr($filename, 6, strrpos($filename, '#') - 6);\n            $archiveFile = substr($filename, strrpos($filename, '#') + 1);\n\n            if (self::validateZipFirst4($zipFile)) {\n                $zip = new ZipArchive();\n                $res = $zip->open($zipFile);\n                if ($res === true) {\n                    $returnValue = ($zip->getFromName($archiveFile) !== false);\n                    $zip->close();\n\n                    return $returnValue;\n                }\n            }\n\n            return false;\n        }\n\n        return file_exists($filename);\n    }\n\n    /**\n     * Returns canonicalized absolute pathname, also for ZIP archives.\n     */\n    public static function realpath(string $filename): string\n    {\n        // Returnvalue\n        $returnValue = '';\n\n        // Try using realpath()\n        if (file_exists($filename)) {\n            $returnValue = realpath($filename) ?: '';\n        }\n\n        // Found something?\n        if ($returnValue === '') {\n            $pathArray = explode('/', $filename);\n            while (in_array('..', $pathArray) && $pathArray[0] != '..') {\n                $iMax = count($pathArray);\n                for ($i = 1; $i < $iMax; ++$i) {\n                    if ($pathArray[$i] == '..') {\n                        array_splice($pathArray, $i - 1, 2);\n\n                        break;\n                    }\n                }\n            }\n            $returnValue = implode('/', $pathArray);\n        }\n\n        // Return\n        return $returnValue;\n    }\n\n    /**\n     * Get the systems temporary directory.\n     */\n    public static function sysGetTempDir(): string\n    {\n        $path = sys_get_temp_dir();\n        if (self::$useUploadTempDirectory) {\n            //  use upload-directory when defined to allow running on environments having very restricted\n            //      open_basedir configs\n            if (ini_get('upload_tmp_dir') !== false) {\n                if ($temp = ini_get('upload_tmp_dir')) {\n                    if (file_exists($temp)) {\n                        $path = $temp;\n                    }\n                }\n            }\n        }\n\n        return realpath($path) ?: '';\n    }\n\n    public static function temporaryFilename(): string\n    {\n        return tempnam(self::sysGetTempDir(), 'phpspreadsheet') ?: throw new Exception('Could not create temporary file');\n    }\n\n    /**\n     * Assert that given path is an existing file and is readable, otherwise throw exception.\n     */\n    public static function assertFile(string $filename, string $zipMember = ''): void\n    {\n        if (!is_file($filename) || !is_readable($filename)) {\n            throw new ReaderException('File \"' . $filename . '\" does not exist or is not readable.');\n        }\n\n        if ($zipMember !== '') {\n            $zipfile = \"zip://$filename#$zipMember\";\n            if (!self::fileExists($zipfile)) {\n                // Has the file been saved with Windoze directory separators rather than unix?\n                $zipfile = \"zip://$filename#\" . str_replace('/', '\\\\', $zipMember);\n                if (!self::fileExists($zipfile)) {\n                    throw new ReaderException(\"Could not find zip member $zipfile\");\n                }\n            }\n        }\n    }\n\n    /**\n     * Same as assertFile, except return true/false and don't throw Exception.\n     */\n    public static function testFileNoThrow(string $filename, ?string $zipMember = null): bool\n    {\n        if (!is_file($filename) || !is_readable($filename)) {\n            return false;\n        }\n        if ($zipMember === null) {\n            return true;\n        }\n        // validate zip, but don't check specific member\n        if ($zipMember === '') {\n            return self::validateZipFirst4($filename);\n        }\n\n        $zipfile = \"zip://$filename#$zipMember\";\n        if (self::fileExists($zipfile)) {\n            return true;\n        }\n\n        // Has the file been saved with Windoze directory separators rather than unix?\n        $zipfile = \"zip://$filename#\" . str_replace('/', '\\\\', $zipMember);\n\n        return self::fileExists($zipfile);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Font.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font as FontStyle;\nuse RecursiveDirectoryIterator;\nuse RecursiveIteratorIterator;\n\nclass Font\n{\n    // Methods for resolving autosize value\n    const AUTOSIZE_METHOD_APPROX = 'approx';\n    const AUTOSIZE_METHOD_EXACT = 'exact';\n\n    private const AUTOSIZE_METHODS = [\n        self::AUTOSIZE_METHOD_APPROX,\n        self::AUTOSIZE_METHOD_EXACT,\n    ];\n\n    /** Character set codes used by BIFF5-8 in Font records */\n    const CHARSET_ANSI_LATIN = 0x00;\n    const CHARSET_SYSTEM_DEFAULT = 0x01;\n    const CHARSET_SYMBOL = 0x02;\n    const CHARSET_APPLE_ROMAN = 0x4D;\n    const CHARSET_ANSI_JAPANESE_SHIFTJIS = 0x80;\n    const CHARSET_ANSI_KOREAN_HANGUL = 0x81;\n    const CHARSET_ANSI_KOREAN_JOHAB = 0x82;\n    const CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86; //    gb2312\n    const CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88; //    big5\n    const CHARSET_ANSI_GREEK = 0xA1;\n    const CHARSET_ANSI_TURKISH = 0xA2;\n    const CHARSET_ANSI_VIETNAMESE = 0xA3;\n    const CHARSET_ANSI_HEBREW = 0xB1;\n    const CHARSET_ANSI_ARABIC = 0xB2;\n    const CHARSET_ANSI_BALTIC = 0xBA;\n    const CHARSET_ANSI_CYRILLIC = 0xCC;\n    const CHARSET_ANSI_THAI = 0xDD;\n    const CHARSET_ANSI_LATIN_II = 0xEE;\n    const CHARSET_OEM_LATIN_I = 0xFF;\n\n    //  XXX: Constants created!\n    /** Font filenames */\n    const ARIAL = 'arial.ttf';\n    const ARIAL_BOLD = 'arialbd.ttf';\n    const ARIAL_ITALIC = 'ariali.ttf';\n    const ARIAL_BOLD_ITALIC = 'arialbi.ttf';\n\n    const CALIBRI = 'calibri.ttf';\n    const CALIBRI_BOLD = 'calibrib.ttf';\n    const CALIBRI_ITALIC = 'calibrii.ttf';\n    const CALIBRI_BOLD_ITALIC = 'calibriz.ttf';\n\n    const COMIC_SANS_MS = 'comic.ttf';\n    const COMIC_SANS_MS_BOLD = 'comicbd.ttf';\n\n    const COURIER_NEW = 'cour.ttf';\n    const COURIER_NEW_BOLD = 'courbd.ttf';\n    const COURIER_NEW_ITALIC = 'couri.ttf';\n    const COURIER_NEW_BOLD_ITALIC = 'courbi.ttf';\n\n    const GEORGIA = 'georgia.ttf';\n    const GEORGIA_BOLD = 'georgiab.ttf';\n    const GEORGIA_ITALIC = 'georgiai.ttf';\n    const GEORGIA_BOLD_ITALIC = 'georgiaz.ttf';\n\n    const IMPACT = 'impact.ttf';\n\n    const LIBERATION_SANS = 'LiberationSans-Regular.ttf';\n    const LIBERATION_SANS_BOLD = 'LiberationSans-Bold.ttf';\n    const LIBERATION_SANS_ITALIC = 'LiberationSans-Italic.ttf';\n    const LIBERATION_SANS_BOLD_ITALIC = 'LiberationSans-BoldItalic.ttf';\n\n    const LUCIDA_CONSOLE = 'lucon.ttf';\n    const LUCIDA_SANS_UNICODE = 'l_10646.ttf';\n\n    const MICROSOFT_SANS_SERIF = 'micross.ttf';\n\n    const PALATINO_LINOTYPE = 'pala.ttf';\n    const PALATINO_LINOTYPE_BOLD = 'palab.ttf';\n    const PALATINO_LINOTYPE_ITALIC = 'palai.ttf';\n    const PALATINO_LINOTYPE_BOLD_ITALIC = 'palabi.ttf';\n\n    const SYMBOL = 'symbol.ttf';\n\n    const TAHOMA = 'tahoma.ttf';\n    const TAHOMA_BOLD = 'tahomabd.ttf';\n\n    const TIMES_NEW_ROMAN = 'times.ttf';\n    const TIMES_NEW_ROMAN_BOLD = 'timesbd.ttf';\n    const TIMES_NEW_ROMAN_ITALIC = 'timesi.ttf';\n    const TIMES_NEW_ROMAN_BOLD_ITALIC = 'timesbi.ttf';\n\n    const TREBUCHET_MS = 'trebuc.ttf';\n    const TREBUCHET_MS_BOLD = 'trebucbd.ttf';\n    const TREBUCHET_MS_ITALIC = 'trebucit.ttf';\n    const TREBUCHET_MS_BOLD_ITALIC = 'trebucbi.ttf';\n\n    const VERDANA = 'verdana.ttf';\n    const VERDANA_BOLD = 'verdanab.ttf';\n    const VERDANA_ITALIC = 'verdanai.ttf';\n    const VERDANA_BOLD_ITALIC = 'verdanaz.ttf';\n\n    const FONT_FILE_NAMES = [\n        'Arial' => [\n            'x' => self::ARIAL,\n            'xb' => self::ARIAL_BOLD,\n            'xi' => self::ARIAL_ITALIC,\n            'xbi' => self::ARIAL_BOLD_ITALIC,\n        ],\n        'Calibri' => [\n            'x' => self::CALIBRI,\n            'xb' => self::CALIBRI_BOLD,\n            'xi' => self::CALIBRI_ITALIC,\n            'xbi' => self::CALIBRI_BOLD_ITALIC,\n        ],\n        'Comic Sans MS' => [\n            'x' => self::COMIC_SANS_MS,\n            'xb' => self::COMIC_SANS_MS_BOLD,\n            'xi' => self::COMIC_SANS_MS,\n            'xbi' => self::COMIC_SANS_MS_BOLD,\n        ],\n        'Courier New' => [\n            'x' => self::COURIER_NEW,\n            'xb' => self::COURIER_NEW_BOLD,\n            'xi' => self::COURIER_NEW_ITALIC,\n            'xbi' => self::COURIER_NEW_BOLD_ITALIC,\n        ],\n        'Georgia' => [\n            'x' => self::GEORGIA,\n            'xb' => self::GEORGIA_BOLD,\n            'xi' => self::GEORGIA_ITALIC,\n            'xbi' => self::GEORGIA_BOLD_ITALIC,\n        ],\n        'Impact' => [\n            'x' => self::IMPACT,\n            'xb' => self::IMPACT,\n            'xi' => self::IMPACT,\n            'xbi' => self::IMPACT,\n        ],\n        'Liberation Sans' => [\n            'x' => self::LIBERATION_SANS,\n            'xb' => self::LIBERATION_SANS_BOLD,\n            'xi' => self::LIBERATION_SANS_ITALIC,\n            'xbi' => self::LIBERATION_SANS_BOLD_ITALIC,\n        ],\n        'Lucida Console' => [\n            'x' => self::LUCIDA_CONSOLE,\n            'xb' => self::LUCIDA_CONSOLE,\n            'xi' => self::LUCIDA_CONSOLE,\n            'xbi' => self::LUCIDA_CONSOLE,\n        ],\n        'Lucida Sans Unicode' => [\n            'x' => self::LUCIDA_SANS_UNICODE,\n            'xb' => self::LUCIDA_SANS_UNICODE,\n            'xi' => self::LUCIDA_SANS_UNICODE,\n            'xbi' => self::LUCIDA_SANS_UNICODE,\n        ],\n        'Microsoft Sans Serif' => [\n            'x' => self::MICROSOFT_SANS_SERIF,\n            'xb' => self::MICROSOFT_SANS_SERIF,\n            'xi' => self::MICROSOFT_SANS_SERIF,\n            'xbi' => self::MICROSOFT_SANS_SERIF,\n        ],\n        'Palatino Linotype' => [\n            'x' => self::PALATINO_LINOTYPE,\n            'xb' => self::PALATINO_LINOTYPE_BOLD,\n            'xi' => self::PALATINO_LINOTYPE_ITALIC,\n            'xbi' => self::PALATINO_LINOTYPE_BOLD_ITALIC,\n        ],\n        'Symbol' => [\n            'x' => self::SYMBOL,\n            'xb' => self::SYMBOL,\n            'xi' => self::SYMBOL,\n            'xbi' => self::SYMBOL,\n        ],\n        'Tahoma' => [\n            'x' => self::TAHOMA,\n            'xb' => self::TAHOMA_BOLD,\n            'xi' => self::TAHOMA,\n            'xbi' => self::TAHOMA_BOLD,\n        ],\n        'Times New Roman' => [\n            'x' => self::TIMES_NEW_ROMAN,\n            'xb' => self::TIMES_NEW_ROMAN_BOLD,\n            'xi' => self::TIMES_NEW_ROMAN_ITALIC,\n            'xbi' => self::TIMES_NEW_ROMAN_BOLD_ITALIC,\n        ],\n        'Trebuchet MS' => [\n            'x' => self::TREBUCHET_MS,\n            'xb' => self::TREBUCHET_MS_BOLD,\n            'xi' => self::TREBUCHET_MS_ITALIC,\n            'xbi' => self::TREBUCHET_MS_BOLD_ITALIC,\n        ],\n        'Verdana' => [\n            'x' => self::VERDANA,\n            'xb' => self::VERDANA_BOLD,\n            'xi' => self::VERDANA_ITALIC,\n            'xbi' => self::VERDANA_BOLD_ITALIC,\n        ],\n    ];\n\n    /**\n     * Array that can be used to supplement FONT_FILE_NAMES for calculating exact width.\n     *\n     * @var array<string, array<string, string>>\n     */\n    private static array $extraFontArray = [];\n\n    /** @param array<string, array<string, string>> $extraFontArray */\n    public static function setExtraFontArray(array $extraFontArray): void\n    {\n        self::$extraFontArray = $extraFontArray;\n    }\n\n    /** @return array<string, array<string, string>> */\n    public static function getExtraFontArray(): array\n    {\n        return self::$extraFontArray;\n    }\n\n    /**\n     * AutoSize method.\n     */\n    private static string $autoSizeMethod = self::AUTOSIZE_METHOD_APPROX;\n\n    /**\n     * Path to folder containing TrueType font .ttf files.\n     */\n    private static string $trueTypeFontPath = '';\n\n    /**\n     * How wide is a default column for a given default font and size?\n     * Empirical data found by inspecting real Excel files and reading off the pixel width\n     * in Microsoft Office Excel 2007.\n     * Added height in points.\n     */\n    public const DEFAULT_COLUMN_WIDTHS = [\n        'Arial' => [\n            1 => ['px' => 24, 'width' => 12.00000000, 'height' => 5.25],\n            2 => ['px' => 24, 'width' => 12.00000000, 'height' => 5.25],\n            3 => ['px' => 32, 'width' => 10.66406250, 'height' => 6.0],\n\n            4 => ['px' => 32, 'width' => 10.66406250, 'height' => 6.75],\n            5 => ['px' => 40, 'width' => 10.00000000, 'height' => 8.25],\n            6 => ['px' => 48, 'width' => 9.59765625, 'height' => 8.25],\n            7 => ['px' => 48, 'width' => 9.59765625, 'height' => 9.0],\n            8 => ['px' => 56, 'width' => 9.33203125, 'height' => 11.25],\n            9 => ['px' => 64, 'width' => 9.14062500, 'height' => 12.0],\n            10 => ['px' => 64, 'width' => 9.14062500, 'height' => 12.75],\n        ],\n        'Calibri' => [\n            1 => ['px' => 24, 'width' => 12.00000000, 'height' => 5.25],\n            2 => ['px' => 24, 'width' => 12.00000000, 'height' => 5.25],\n            3 => ['px' => 32, 'width' => 10.66406250, 'height' => 6.00],\n            4 => ['px' => 32, 'width' => 10.66406250, 'height' => 6.75],\n            5 => ['px' => 40, 'width' => 10.00000000, 'height' => 8.25],\n            6 => ['px' => 48, 'width' => 9.59765625, 'height' => 8.25],\n            7 => ['px' => 48, 'width' => 9.59765625, 'height' => 9.0],\n            8 => ['px' => 56, 'width' => 9.33203125, 'height' => 11.25],\n            9 => ['px' => 56, 'width' => 9.33203125, 'height' => 12.0],\n            10 => ['px' => 64, 'width' => 9.14062500, 'height' => 12.75],\n            11 => ['px' => 64, 'width' => 9.14062500, 'height' => 15.0],\n        ],\n        'Verdana' => [\n            1 => ['px' => 24, 'width' => 12.00000000, 'height' => 5.25],\n            2 => ['px' => 24, 'width' => 12.00000000, 'height' => 5.25],\n            3 => ['px' => 32, 'width' => 10.66406250, 'height' => 6.0],\n            4 => ['px' => 32, 'width' => 10.66406250, 'height' => 6.75],\n            5 => ['px' => 40, 'width' => 10.00000000, 'height' => 8.25],\n            6 => ['px' => 48, 'width' => 9.59765625, 'height' => 8.25],\n            7 => ['px' => 48, 'width' => 9.59765625, 'height' => 9.0],\n            8 => ['px' => 64, 'width' => 9.14062500, 'height' => 10.5],\n            9 => ['px' => 72, 'width' => 9.00000000, 'height' => 11.25],\n            10 => ['px' => 72, 'width' => 9.00000000, 'height' => 12.75],\n        ],\n    ];\n\n    /**\n     * Set autoSize method.\n     *\n     * @param string $method see self::AUTOSIZE_METHOD_*\n     *\n     * @return bool Success or failure\n     */\n    public static function setAutoSizeMethod(string $method): bool\n    {\n        if (!in_array($method, self::AUTOSIZE_METHODS)) {\n            return false;\n        }\n        self::$autoSizeMethod = $method;\n\n        return true;\n    }\n\n    /**\n     * Get autoSize method.\n     */\n    public static function getAutoSizeMethod(): string\n    {\n        return self::$autoSizeMethod;\n    }\n\n    /**\n     * Set the path to the folder containing .ttf files. There should be a trailing slash.\n     * Path will be recursively searched for font file.\n     * Typical locations on various platforms:\n     *    <ul>\n     *        <li>C:/Windows/Fonts/</li>\n     *        <li>/usr/share/fonts/truetype/</li>\n     *        <li>~/.fonts/</li>\n     * </ul>.\n     */\n    public static function setTrueTypeFontPath(string $folderPath): void\n    {\n        self::$trueTypeFontPath = $folderPath;\n    }\n\n    /**\n     * Get the path to the folder containing .ttf files.\n     */\n    public static function getTrueTypeFontPath(): string\n    {\n        return self::$trueTypeFontPath;\n    }\n\n    /**\n     * Pad amount for exact in pixels; use best guess if null.\n     */\n    private static null|float|int $paddingAmountExact = null;\n\n    /**\n     * Set pad amount for exact in pixels; use best guess if null.\n     */\n    public static function setPaddingAmountExact(null|float|int $paddingAmountExact): void\n    {\n        self::$paddingAmountExact = $paddingAmountExact;\n    }\n\n    /**\n     * Get pad amount for exact in pixels; or null if using best guess.\n     */\n    public static function getPaddingAmountExact(): null|float|int\n    {\n        return self::$paddingAmountExact;\n    }\n\n    /**\n     * Calculate an (approximate) OpenXML column width, based on font size and text contained.\n     *\n     * @param FontStyle $font Font object\n     * @param null|RichText|string $cellText Text to calculate width\n     * @param int $rotation Rotation angle\n     * @param null|FontStyle $defaultFont Font object\n     * @param bool $filterAdjustment Add space for Autofilter or Table dropdown\n     */\n    public static function calculateColumnWidth(\n        FontStyle $font,\n        $cellText = '',\n        int $rotation = 0,\n        ?FontStyle $defaultFont = null,\n        bool $filterAdjustment = false,\n        int $indentAdjustment = 0\n    ): float {\n        // If it is rich text, use plain text\n        if ($cellText instanceof RichText) {\n            $cellText = $cellText->getPlainText();\n        }\n\n        // Special case if there are one or more newline characters (\"\\n\")\n        $cellText = (string) $cellText;\n        if (str_contains($cellText, \"\\n\")) {\n            $lineTexts = explode(\"\\n\", $cellText);\n            $lineWidths = [];\n            foreach ($lineTexts as $lineText) {\n                $lineWidths[] = self::calculateColumnWidth($font, $lineText, $rotation = 0, $defaultFont, $filterAdjustment);\n            }\n\n            return max($lineWidths); // width of longest line in cell\n        }\n\n        // Try to get the exact text width in pixels\n        $approximate = self::$autoSizeMethod === self::AUTOSIZE_METHOD_APPROX;\n        $columnWidth = 0;\n        if (!$approximate) {\n            try {\n                $columnWidthAdjust = ceil(\n                    self::getTextWidthPixelsExact(\n                        str_repeat('n', 1 * (($filterAdjustment ? 3 : 1) + ($indentAdjustment * 2))),\n                        $font,\n                        0\n                    ) * 1.07\n                );\n\n                // Width of text in pixels excl. padding\n                // and addition because Excel adds some padding, just use approx width of 'n' glyph\n                $columnWidth = self::getTextWidthPixelsExact($cellText, $font, $rotation) + (self::$paddingAmountExact ?? $columnWidthAdjust);\n            } catch (PhpSpreadsheetException) {\n                $approximate = true;\n            }\n        }\n\n        if ($approximate) {\n            $columnWidthAdjust = self::getTextWidthPixelsApprox(\n                str_repeat('n', 1 * (($filterAdjustment ? 3 : 1) + ($indentAdjustment * 2))),\n                $font,\n                0\n            );\n            // Width of text in pixels excl. padding, approximation\n            // and addition because Excel adds some padding, just use approx width of 'n' glyph\n            $columnWidth = self::getTextWidthPixelsApprox($cellText, $font, $rotation) + $columnWidthAdjust;\n        }\n\n        // Convert from pixel width to column width\n        $columnWidth = Drawing::pixelsToCellDimension((int) $columnWidth, $defaultFont ?? new FontStyle());\n\n        // Return\n        return round($columnWidth, 4);\n    }\n\n    /**\n     * Get GD text width in pixels for a string of text in a certain font at a certain rotation angle.\n     */\n    public static function getTextWidthPixelsExact(string $text, FontStyle $font, int $rotation = 0): float\n    {\n        // font size should really be supplied in pixels in GD2,\n        // but since GD2 seems to assume 72dpi, pixels and points are the same\n        $fontFile = self::getTrueTypeFontFileFromFont($font);\n        $textBox = imagettfbbox($font->getSize() ?? 10.0, $rotation, $fontFile, $text);\n        if ($textBox === false) {\n            // @codeCoverageIgnoreStart\n            throw new PhpSpreadsheetException('imagettfbbox failed');\n            // @codeCoverageIgnoreEnd\n        }\n\n        // Get corners positions\n        /** @var int[] $textBox */\n        $lowerLeftCornerX = $textBox[0];\n        $lowerRightCornerX = $textBox[2];\n        $upperRightCornerX = $textBox[4];\n        $upperLeftCornerX = $textBox[6];\n\n        // Consider the rotation when calculating the width\n        return round(max($lowerRightCornerX - $upperLeftCornerX, $upperRightCornerX - $lowerLeftCornerX), 4);\n    }\n\n    /**\n     * Get approximate width in pixels for a string of text in a certain font at a certain rotation angle.\n     *\n     * @return int Text width in pixels (no padding added)\n     */\n    public static function getTextWidthPixelsApprox(string $columnText, FontStyle $font, int $rotation = 0): int\n    {\n        $fontName = $font->getName();\n        $fontSize = $font->getSize();\n\n        // Calculate column width in pixels.\n        // We assume fixed glyph width, but count double for \"fullwidth\" characters.\n        // Result varies with font name and size.\n        switch ($fontName) {\n            case 'Arial':\n                // value 8 was set because of experience in different exports at Arial 10 font.\n                $columnWidth = (int) (8 * StringHelper::countCharactersDbcs($columnText));\n                $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size\n\n                break;\n            case 'Verdana':\n                // value 8 was found via interpolation by inspecting real Excel files with Verdana 10 font.\n                $columnWidth = (int) (8 * StringHelper::countCharactersDbcs($columnText));\n                $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size\n\n                break;\n            default:\n                // just assume Calibri\n                // value 8.26 was found via interpolation by inspecting real Excel files with Calibri 11 font.\n                $columnWidth = (int) (8.26 * StringHelper::countCharactersDbcs($columnText));\n                $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size\n\n                break;\n        }\n\n        // Calculate approximate rotated column width\n        if ($rotation !== 0) {\n            if ($rotation == Alignment::TEXTROTATION_STACK_PHPSPREADSHEET) {\n                // stacked text\n                $columnWidth = 4; // approximation\n            } else {\n                // rotated text\n                $columnWidth = $columnWidth * cos(deg2rad($rotation))\n                                + $fontSize * abs(sin(deg2rad($rotation))) / 5; // approximation\n            }\n        }\n\n        // pixel width is an integer\n        return (int) $columnWidth;\n    }\n\n    /**\n     * Calculate an (approximate) pixel size, based on a font points size.\n     *\n     * @param float|int $fontSizeInPoints Font size (in points)\n     *\n     * @return int Font size (in pixels)\n     */\n    public static function fontSizeToPixels(float|int $fontSizeInPoints): int\n    {\n        return (int) ((4 / 3) * $fontSizeInPoints);\n    }\n\n    /**\n     * Calculate an (approximate) pixel size, based on inch size.\n     *\n     * @param float|int $sizeInInch Font size (in inch)\n     *\n     * @return float|int Size (in pixels)\n     */\n    public static function inchSizeToPixels(int|float $sizeInInch): int|float\n    {\n        return $sizeInInch * 96;\n    }\n\n    /**\n     * Calculate an (approximate) pixel size, based on centimeter size.\n     *\n     * @param float|int $sizeInCm Font size (in centimeters)\n     *\n     * @return float Size (in pixels)\n     */\n    public static function centimeterSizeToPixels(int|float $sizeInCm): float\n    {\n        return $sizeInCm * 37.795275591;\n    }\n\n    /**\n     * Returns the font path given the font.\n     *\n     * @return string Path to TrueType font file\n     */\n    public static function getTrueTypeFontFileFromFont(FontStyle $font, bool $checkPath = true): string\n    {\n        if ($checkPath && (!file_exists(self::$trueTypeFontPath) || !is_dir(self::$trueTypeFontPath))) {\n            throw new PhpSpreadsheetException('Valid directory to TrueType Font files not specified');\n        }\n\n        $name = $font->getName();\n        $fontArray = array_merge(self::FONT_FILE_NAMES, self::$extraFontArray);\n        if (!isset($fontArray[$name])) {\n            throw new PhpSpreadsheetException('Unknown font name \"' . $name . '\". Cannot map to TrueType font file');\n        }\n        $bold = $font->getBold();\n        $italic = $font->getItalic();\n        $index = 'x';\n        if ($bold) {\n            $index .= 'b';\n        }\n        if ($italic) {\n            $index .= 'i';\n        }\n        $fontFile = $fontArray[$name][$index];\n\n        $separator = '';\n        if (mb_strlen(self::$trueTypeFontPath) > 1 && mb_substr(self::$trueTypeFontPath, -1) !== '/' && mb_substr(self::$trueTypeFontPath, -1) !== '\\\\') {\n            $separator = DIRECTORY_SEPARATOR;\n        }\n        $fontFileAbsolute = preg_match('~^([A-Za-z]:)?[/\\\\\\]~', $fontFile) === 1;\n        if (!$fontFileAbsolute) {\n            $fontFile = self::findFontFile(self::$trueTypeFontPath, $fontFile) ?? self::$trueTypeFontPath . $separator . $fontFile;\n        }\n\n        // Check if file actually exists\n        if ($checkPath && !file_exists($fontFile) && !$fontFileAbsolute) {\n            $alternateName = $name;\n            if ($index !== 'x' && $fontArray[$name][$index] !== $fontArray[$name]['x']) {\n                // Bold but no italic:\n                //   Comic Sans\n                //   Tahoma\n                // Neither bold nor italic:\n                //   Impact\n                //   Lucida Console\n                //   Lucida Sans Unicode\n                //   Microsoft Sans Serif\n                //   Symbol\n                if ($index === 'xb') {\n                    $alternateName .= ' Bold';\n                } elseif ($index === 'xi') {\n                    $alternateName .= ' Italic';\n                } elseif ($fontArray[$name]['xb'] === $fontArray[$name]['xbi']) {\n                    $alternateName .= ' Bold';\n                } else {\n                    $alternateName .= ' Bold Italic';\n                }\n            }\n            $fontFile = self::$trueTypeFontPath . $separator . $alternateName . '.ttf';\n            if (!file_exists($fontFile)) {\n                throw new PhpSpreadsheetException('TrueType Font file not found');\n            }\n        }\n\n        return $fontFile;\n    }\n\n    public const CHARSET_FROM_FONT_NAME = [\n        'EucrosiaUPC' => self::CHARSET_ANSI_THAI,\n        'Wingdings' => self::CHARSET_SYMBOL,\n        'Wingdings 2' => self::CHARSET_SYMBOL,\n        'Wingdings 3' => self::CHARSET_SYMBOL,\n    ];\n\n    /**\n     * Returns the associated charset for the font name.\n     *\n     * @param string $fontName Font name\n     *\n     * @return int Character set code\n     */\n    public static function getCharsetFromFontName(string $fontName): int\n    {\n        return self::CHARSET_FROM_FONT_NAME[$fontName] ?? self::CHARSET_ANSI_LATIN;\n    }\n\n    /**\n     * Get the effective column width for columns without a column dimension or column with width -1\n     * For example, for Calibri 11 this is 9.140625 (64 px).\n     *\n     * @param FontStyle $font The workbooks default font\n     * @param bool $returnAsPixels true = return column width in pixels, false = return in OOXML units\n     *\n     * @return ($returnAsPixels is true ? int : float) Column width\n     */\n    public static function getDefaultColumnWidthByFont(FontStyle $font, bool $returnAsPixels = false): float|int\n    {\n        $size = $font->getSize();\n        $sizex = ($size !== null && $size == (int) $size) ? ((int) $size) : \"$size\";\n        if (isset(self::DEFAULT_COLUMN_WIDTHS[$font->getName()][$sizex])) {\n            // Exact width can be determined\n            $columnWidth = $returnAsPixels\n                ? self::DEFAULT_COLUMN_WIDTHS[$font->getName()][$sizex]['px']\n                    : self::DEFAULT_COLUMN_WIDTHS[$font->getName()][$sizex]['width'];\n        } else {\n            // We don't have data for this particular font and size, use approximation by\n            // extrapolating from Calibri 11\n            $columnWidth = $returnAsPixels\n                ? self::DEFAULT_COLUMN_WIDTHS['Calibri'][11]['px']\n                    : self::DEFAULT_COLUMN_WIDTHS['Calibri'][11]['width'];\n            $columnWidth = $columnWidth * $font->getSize() / 11;\n\n            // Round pixels to closest integer\n            if ($returnAsPixels) {\n                $columnWidth = (int) round($columnWidth);\n            }\n        }\n\n        return $columnWidth;\n    }\n\n    /**\n     * Get the effective row height for rows without a row dimension or rows with height -1\n     * For example, for Calibri 11 this is 15 points.\n     *\n     * @param FontStyle $font The workbooks default font\n     *\n     * @return float Row height in points\n     */\n    public static function getDefaultRowHeightByFont(FontStyle $font): float\n    {\n        $name = $font->getName();\n        $size = $font->getSize();\n        $sizex = ($size !== null && $size == (int) $size) ? ((int) $size) : \"$size\";\n        if (isset(self::DEFAULT_COLUMN_WIDTHS[$name][$sizex])) {\n            $rowHeight = self::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['height'];\n        } elseif ($name === 'Arial' || $name === 'Verdana') {\n            $rowHeight = self::DEFAULT_COLUMN_WIDTHS[$name][10]['height'] * $size / 10.0;\n        } else {\n            $rowHeight = self::DEFAULT_COLUMN_WIDTHS['Calibri'][11]['height'] * $size / 11.0;\n        }\n\n        return $rowHeight;\n    }\n\n    private static function findFontFile(string $startDirectory, string $desiredFont): ?string\n    {\n        $fontPath = null;\n        if ($startDirectory === '') {\n            return null;\n        }\n        if (file_exists(\"$startDirectory/$desiredFont\")) {\n            $fontPath = \"$startDirectory/$desiredFont\";\n        } else {\n            $iterations = 0;\n            $it = new RecursiveDirectoryIterator(\n                $startDirectory,\n                RecursiveDirectoryIterator::SKIP_DOTS\n                | RecursiveDirectoryIterator::FOLLOW_SYMLINKS\n            );\n            foreach (\n                new RecursiveIteratorIterator(\n                    $it,\n                    RecursiveIteratorIterator::LEAVES_ONLY,\n                    RecursiveIteratorIterator::CATCH_GET_CHILD\n                ) as $filex\n            ) {\n                /** @var string */\n                $file = $filex;\n                if (basename($file) === $desiredFont) {\n                    $fontPath = $file;\n\n                    break;\n                }\n                ++$iterations;\n                if ($iterations > 5000) {\n                    // @codeCoverageIgnoreStart\n                    break;\n                    // @codeCoverageIgnoreEnd\n                }\n            }\n        }\n\n        return $fontPath;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/IntOrFloat.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nclass IntOrFloat\n{\n    /**\n     * Help some functions with large results operate correctly on 32-bit,\n     * by returning result as int when possible, float otherwise.\n     */\n    public static function evaluate(float|int $value): float|int\n    {\n        $iValue = (int) $value;\n\n        return ($value == $iValue) ? $iValue : $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\n\nclass ChainedBlockStream\n{\n    /** @var mixed */\n    public $context;\n\n    /**\n     * The OLE container of the file that is being read.\n     */\n    public ?OLE $ole = null;\n\n    /**\n     * Parameters specified by fopen().\n     *\n     * @var mixed[]\n     */\n    public array $params = [];\n\n    /**\n     * The binary data of the file.\n     */\n    public string $data;\n\n    /**\n     * The file pointer.\n     *\n     * @var int byte offset\n     */\n    public int $pos = 0;\n\n    /**\n     * Implements support for fopen().\n     * For creating streams using this wrapper, use OLE_PPS_File::getStream().\n     *\n     * @param string $path resource name including scheme, e.g.\n     *                                    ole-chainedblockstream://oleInstanceId=1\n     * @param string $mode only \"r\" is supported\n     * @param int $options mask of STREAM_REPORT_ERRORS and STREAM_USE_PATH\n     * @param ?string $openedPath absolute path of the opened stream (out parameter)\n     *\n     * @return bool true on success\n     */\n    public function stream_open(string $path, string $mode, int $options, ?string &$openedPath): bool // @codingStandardsIgnoreLine\n    {\n        if ($mode[0] !== 'r') {\n            if ($options & STREAM_REPORT_ERRORS) {\n                trigger_error('Only reading is supported', E_USER_WARNING);\n            }\n\n            return false;\n        }\n\n        // 25 is length of \"ole-chainedblockstream://\"\n        parse_str(substr($path, 25), $this->params);\n        if (!isset($this->params['oleInstanceId'], $this->params['blockId'], $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']])) { //* @phpstan-ignore-line\n            if ($options & STREAM_REPORT_ERRORS) {\n                trigger_error('OLE stream not found', E_USER_WARNING);\n            }\n\n            return false;\n        }\n        $this->ole = $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']]; //* @phpstan-ignore-line\n        if (!($this->ole instanceof OLE)) { //* @phpstan-ignore-line\n            throw new Exception('class is not OLE');\n        }\n\n        $blockId = $this->params['blockId'];\n        $this->data = '';\n        if (isset($this->params['size']) && $this->params['size'] < $this->ole->bigBlockThreshold && $blockId != $this->ole->root->startBlock) {\n            // Block id refers to small blocks\n            $rootPos = $this->ole->getBlockOffset((int) $this->ole->root->startBlock);\n            while ($blockId != -2) {\n                /** @var int $blockId */\n                $pos = $rootPos + $blockId * $this->ole->bigBlockSize;\n                $blockId = $this->ole->sbat[$blockId];\n                fseek($this->ole->_file_handle, $pos);\n                $this->data .= fread($this->ole->_file_handle, $this->ole->bigBlockSize);\n            }\n        } else {\n            // Block id refers to big blocks\n            while ($blockId != -2) {\n                /** @var int $blockId */\n                $pos = $this->ole->getBlockOffset($blockId);\n                fseek($this->ole->_file_handle, $pos);\n                $this->data .= fread($this->ole->_file_handle, $this->ole->bigBlockSize);\n                $blockId = $this->ole->bbat[$blockId];\n            }\n        }\n        if (isset($this->params['size'])) {\n            $this->data = substr($this->data, 0, $this->params['size']); //* @phpstan-ignore-line\n        }\n\n        if ($options & STREAM_USE_PATH) {\n            $openedPath = $path;\n        }\n\n        return true;\n    }\n\n    /**\n     * Implements support for fclose().\n     */\n    public function stream_close(): void // @codingStandardsIgnoreLine\n    {\n        $this->ole = null;\n        unset($GLOBALS['_OLE_INSTANCES']);\n    }\n\n    /**\n     * Implements support for fread(), fgets() etc.\n     *\n     * @param int $count maximum number of bytes to read\n     *\n     * @return false|string\n     */\n    public function stream_read(int $count): bool|string // @codingStandardsIgnoreLine\n    {\n        if ($this->stream_eof()) {\n            return false;\n        }\n        $s = substr($this->data, (int) $this->pos, $count);\n        $this->pos += $count;\n\n        return $s;\n    }\n\n    /**\n     * Implements support for feof().\n     *\n     * @return bool TRUE if the file pointer is at EOF; otherwise FALSE\n     */\n    public function stream_eof(): bool // @codingStandardsIgnoreLine\n    {\n        return $this->pos >= strlen($this->data);\n    }\n\n    /**\n     * Returns the position of the file pointer, i.e. its offset into the file\n     * stream. Implements support for ftell().\n     */\n    public function stream_tell(): int // @codingStandardsIgnoreLine\n    {\n        return $this->pos;\n    }\n\n    /**\n     * Implements support for fseek().\n     *\n     * @param int $offset byte offset\n     * @param int $whence SEEK_SET, SEEK_CUR or SEEK_END\n     */\n    public function stream_seek(int $offset, int $whence): bool // @codingStandardsIgnoreLine\n    {\n        if ($whence == SEEK_SET && $offset >= 0) {\n            $this->pos = $offset;\n        } elseif ($whence == SEEK_CUR && -$offset <= $this->pos) {\n            $this->pos += $offset;\n        } elseif ($whence == SEEK_END && -$offset <= count($this->data)) { // @phpstan-ignore-line\n            $this->pos = strlen($this->data) + $offset;\n        } else {\n            return false;\n        }\n\n        return true;\n    }\n\n    /**\n     * Implements support for fstat(). Currently the only supported field is\n     * \"size\".\n     *\n     * @return array{size: int}\n     */\n    public function stream_stat(): array // @codingStandardsIgnoreLine\n    {\n        return [\n            'size' => strlen($this->data),\n        ];\n    }\n\n    // Methods used by stream_wrapper_register() that are not implemented:\n    // bool stream_flush ( void )\n    // int stream_write ( string data )\n    // bool rename ( string path_from, string path_to )\n    // bool mkdir ( string path, int mode, int options )\n    // bool rmdir ( string path, int options )\n    // bool dir_opendir ( string path, int options )\n    // array url_stat ( string path, int flags )\n    // string dir_readdir ( void )\n    // bool dir_rewinddir ( void )\n    // bool dir_closedir ( void )\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/OLE/PPS/File.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\PPS;\n\n// vim: set expandtab tabstop=4 shiftwidth=4:\n// +----------------------------------------------------------------------+\n// | PHP Version 4                                                        |\n// +----------------------------------------------------------------------+\n// | Copyright (c) 1997-2002 The PHP Group                                |\n// +----------------------------------------------------------------------+\n// | This source file is subject to version 2.02 of the PHP license,      |\n// | that is bundled with this package in the file LICENSE, and is        |\n// | available at through the world-wide-web at                           |\n// | http://www.php.net/license/2_02.txt.                                 |\n// | If you did not receive a copy of the PHP license and are unable to   |\n// | obtain it through the world-wide-web, please send a note to          |\n// | license@php.net so we can mail you a copy immediately.               |\n// +----------------------------------------------------------------------+\n// | Author: Xavier Noguer <xnoguer@php.net>                              |\n// | Based on OLE::Storage_Lite by Kawai, Takanori                        |\n// +----------------------------------------------------------------------+\n//\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\PPS;\n\n/**\n * Class for creating File PPS's for OLE containers.\n *\n * @author   Xavier Noguer <xnoguer@php.net>\n */\nclass File extends PPS\n{\n    /**\n     * The constructor.\n     *\n     * @param string $name The name of the file (in Unicode)\n     *\n     * @see OLE::ascToUcs()\n     */\n    public function __construct(string $name)\n    {\n        parent::__construct(null, $name, OLE::OLE_PPS_TYPE_FILE, null, null, null, null, null, '', []);\n    }\n\n    /**\n     * Initialization method. Has to be called right after OLE_PPS_File().\n     */\n    public function init(): bool\n    {\n        return true;\n    }\n\n    /**\n     * Append data to PPS.\n     *\n     * @param string $data The data to append\n     */\n    public function append(string $data): void\n    {\n        $this->_data .= $data;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/OLE/PPS/Root.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\PPS;\n\n// vim: set expandtab tabstop=4 shiftwidth=4:\n// +----------------------------------------------------------------------+\n// | PHP Version 4                                                        |\n// +----------------------------------------------------------------------+\n// | Copyright (c) 1997-2002 The PHP Group                                |\n// +----------------------------------------------------------------------+\n// | This source file is subject to version 2.02 of the PHP license,      |\n// | that is bundled with this package in the file LICENSE, and is        |\n// | available at through the world-wide-web at                           |\n// | http://www.php.net/license/2_02.txt.                                 |\n// | If you did not receive a copy of the PHP license and are unable to   |\n// | obtain it through the world-wide-web, please send a note to          |\n// | license@php.net so we can mail you a copy immediately.               |\n// +----------------------------------------------------------------------+\n// | Author: Xavier Noguer <xnoguer@php.net>                              |\n// | Based on OLE::Storage_Lite by Kawai, Takanori                        |\n// +----------------------------------------------------------------------+\n//\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\PPS;\n\n/**\n * Class for creating Root PPS's for OLE containers.\n *\n * @author   Xavier Noguer <xnoguer@php.net>\n */\nclass Root extends PPS\n{\n    /**\n     * @var resource\n     */\n    private $fileHandle;\n\n    private ?int $smallBlockSize = null;\n\n    private ?int $bigBlockSize = null;\n\n    /**\n     * @param null|float|int $time_1st A timestamp\n     * @param null|float|int $time_2nd A timestamp\n     * @param File[] $raChild\n     */\n    public function __construct($time_1st, $time_2nd, array $raChild)\n    {\n        parent::__construct(null, OLE::ascToUcs('Root Entry'), OLE::OLE_PPS_TYPE_ROOT, null, null, null, $time_1st, $time_2nd, null, $raChild);\n    }\n\n    /**\n     * Method for saving the whole OLE container (including files).\n     * In fact, if called with an empty argument (or '-'), it saves to a\n     * temporary file and then outputs it's contents to stdout.\n     * If a resource pointer to a stream created by fopen() is passed\n     * it will be used, but you have to close such stream by yourself.\n     *\n     * @param resource $fileHandle the name of the file or stream where to save the OLE container\n     *\n     * @return bool true on success\n     */\n    public function save($fileHandle): bool\n    {\n        $this->fileHandle = $fileHandle;\n\n        // Initial Setting for saving\n        $this->bigBlockSize = (int) (2 ** (\n            (isset($this->bigBlockSize)) ? self::adjust2($this->bigBlockSize) : 9\n        ));\n        $this->smallBlockSize = (int) (2 ** (\n            (isset($this->smallBlockSize)) ? self::adjust2($this->smallBlockSize) : 6\n        ));\n\n        // Make an array of PPS's (for Save)\n        $aList = [];\n        PPS::savePpsSetPnt($aList, [$this]);\n        // calculate values for header\n        [$iSBDcnt, $iBBcnt, $iPPScnt] = $this->calcSize($aList); //, $rhInfo);\n        // Save Header\n        $this->saveHeader((int) $iSBDcnt, (int) $iBBcnt, (int) $iPPScnt);\n\n        // Make Small Data string (write SBD)\n        $this->_data = $this->makeSmallData($aList);\n\n        // Write BB\n        $this->saveBigData((int) $iSBDcnt, $aList);\n        // Write PPS\n        $this->savePps($aList);\n        // Write Big Block Depot and BDList and Adding Header informations\n        $this->saveBbd((int) $iSBDcnt, (int) $iBBcnt, (int) $iPPScnt);\n\n        return true;\n    }\n\n    /**\n     * Calculate some numbers.\n     *\n     * @param PPS[] $raList Reference to an array of PPS's\n     *\n     * @return float[] The array of numbers\n     */\n    private function calcSize(array &$raList): array\n    {\n        // Calculate Basic Setting\n        [$iSBDcnt, $iBBcnt, $iPPScnt] = [0, 0, 0];\n        $iSBcnt = 0;\n        $iCount = count($raList);\n        for ($i = 0; $i < $iCount; ++$i) {\n            if ($raList[$i]->Type == OLE::OLE_PPS_TYPE_FILE) {\n                $raList[$i]->Size = $raList[$i]->getDataLen();\n                if ($raList[$i]->Size < OLE::OLE_DATA_SIZE_SMALL) {\n                    $iSBcnt += floor($raList[$i]->Size / $this->smallBlockSize)\n                        + (($raList[$i]->Size % $this->smallBlockSize) ? 1 : 0);\n                } else {\n                    $iBBcnt += (floor($raList[$i]->Size / $this->bigBlockSize)\n                        + (($raList[$i]->Size % $this->bigBlockSize) ? 1 : 0));\n                }\n            }\n        }\n        $iSmallLen = $iSBcnt * $this->smallBlockSize;\n        $iSlCnt = floor($this->bigBlockSize / OLE::OLE_LONG_INT_SIZE);\n        $iSBDcnt = floor($iSBcnt / $iSlCnt) + (($iSBcnt % $iSlCnt) ? 1 : 0);\n        $iBBcnt += (floor($iSmallLen / $this->bigBlockSize)\n            + (($iSmallLen % $this->bigBlockSize) ? 1 : 0));\n        $iCnt = count($raList);\n        $iBdCnt = $this->bigBlockSize / OLE::OLE_PPS_SIZE;\n        $iPPScnt = (floor($iCnt / $iBdCnt) + (($iCnt % $iBdCnt) ? 1 : 0));\n\n        return [$iSBDcnt, $iBBcnt, $iPPScnt];\n    }\n\n    /**\n     * Helper function for calculating a magic value for block sizes.\n     *\n     * @param int $i2 The argument\n     *\n     * @see save()\n     */\n    private static function adjust2(int $i2): float\n    {\n        $iWk = log($i2) / log(2);\n\n        return ($iWk > floor($iWk)) ? floor($iWk) + 1 : $iWk;\n    }\n\n    /**\n     * Save OLE header.\n     */\n    private function saveHeader(int $iSBDcnt, int $iBBcnt, int $iPPScnt): void\n    {\n        $FILE = $this->fileHandle;\n\n        // Calculate Basic Setting\n        $iBlCnt = $this->bigBlockSize / OLE::OLE_LONG_INT_SIZE;\n        $i1stBdL = ($this->bigBlockSize - 0x4C) / OLE::OLE_LONG_INT_SIZE;\n\n        $iBdExL = 0;\n        $iAll = $iBBcnt + $iPPScnt + $iSBDcnt;\n        $iAllW = $iAll;\n        $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0);\n        $iBdCnt = floor(($iAll + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0);\n\n        // Calculate BD count\n        if ($iBdCnt > $i1stBdL) {\n            while (1) {\n                ++$iBdExL;\n                ++$iAllW;\n                $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0);\n                $iBdCnt = floor(($iAllW + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0);\n                if ($iBdCnt <= ($iBdExL * $iBlCnt + $i1stBdL)) {\n                    break;\n                }\n            }\n        }\n\n        // Save Header\n        fwrite(\n            $FILE,\n            \"\\xD0\\xCF\\x11\\xE0\\xA1\\xB1\\x1A\\xE1\"\n            . \"\\x00\\x00\\x00\\x00\"\n            . \"\\x00\\x00\\x00\\x00\"\n            . \"\\x00\\x00\\x00\\x00\"\n            . \"\\x00\\x00\\x00\\x00\"\n            . pack('v', 0x3B)\n            . pack('v', 0x03)\n            . pack('v', -2)\n            . pack('v', 9)\n            . pack('v', 6)\n            . pack('v', 0)\n            . \"\\x00\\x00\\x00\\x00\"\n            . \"\\x00\\x00\\x00\\x00\"\n            . pack('V', $iBdCnt)\n            . pack('V', $iBBcnt + $iSBDcnt) //ROOT START\n            . pack('V', 0)\n            . pack('V', 0x1000)\n            . pack('V', $iSBDcnt ? 0 : -2) //Small Block Depot\n            . pack('V', $iSBDcnt)\n        );\n        // Extra BDList Start, Count\n        if ($iBdCnt < $i1stBdL) {\n            fwrite(\n                $FILE,\n                pack('V', -2) // Extra BDList Start\n                . pack('V', 0)// Extra BDList Count\n            );\n        } else {\n            fwrite($FILE, pack('V', $iAll + $iBdCnt) . pack('V', $iBdExL));\n        }\n\n        // BDList\n        for ($i = 0; $i < $i1stBdL && $i < $iBdCnt; ++$i) {\n            fwrite($FILE, pack('V', $iAll + $i));\n        }\n        if ($i < $i1stBdL) {\n            $jB = $i1stBdL - $i;\n            for ($j = 0; $j < $jB; ++$j) {\n                fwrite($FILE, (pack('V', -1)));\n            }\n        }\n    }\n\n    /**\n     * Saving big data (PPS's with data bigger than \\PhpOffice\\PhpSpreadsheet\\Shared\\OLE::OLE_DATA_SIZE_SMALL).\n     *\n     * @param PPS[] $raList Reference to array of PPS's\n     */\n    private function saveBigData(int $iStBlk, array &$raList): void\n    {\n        $FILE = $this->fileHandle;\n\n        // cycle through PPS's\n        $iCount = count($raList);\n        for ($i = 0; $i < $iCount; ++$i) {\n            if ($raList[$i]->Type != OLE::OLE_PPS_TYPE_DIR) {\n                $raList[$i]->Size = $raList[$i]->getDataLen();\n                if (($raList[$i]->Size >= OLE::OLE_DATA_SIZE_SMALL) || (($raList[$i]->Type == OLE::OLE_PPS_TYPE_ROOT) && isset($raList[$i]->_data))) {\n                    fwrite($FILE, $raList[$i]->_data);\n\n                    if ($raList[$i]->Size % $this->bigBlockSize) {\n                        fwrite($FILE, str_repeat(\"\\x00\", $this->bigBlockSize - ($raList[$i]->Size % $this->bigBlockSize)));\n                    }\n                    // Set For PPS\n                    $raList[$i]->startBlock = $iStBlk;\n                    $iStBlk\n                        += ((int) floor($raList[$i]->Size / $this->bigBlockSize)\n                            + (($raList[$i]->Size % $this->bigBlockSize) ? 1 : 0));\n                }\n            }\n        }\n    }\n\n    /**\n     * get small data (PPS's with data smaller than \\PhpOffice\\PhpSpreadsheet\\Shared\\OLE::OLE_DATA_SIZE_SMALL).\n     *\n     * @param PPS[] $raList Reference to array of PPS's\n     */\n    private function makeSmallData(array &$raList): string\n    {\n        $sRes = '';\n        $FILE = $this->fileHandle;\n        $iSmBlk = 0;\n\n        $iCount = count($raList);\n        for ($i = 0; $i < $iCount; ++$i) {\n            // Make SBD, small data string\n            if ($raList[$i]->Type == OLE::OLE_PPS_TYPE_FILE) {\n                if ($raList[$i]->Size <= 0) {\n                    continue;\n                }\n                if ($raList[$i]->Size < OLE::OLE_DATA_SIZE_SMALL) {\n                    $iSmbCnt = (int) floor($raList[$i]->Size / $this->smallBlockSize)\n                        + (($raList[$i]->Size % $this->smallBlockSize) ? 1 : 0);\n                    // Add to SBD\n                    $jB = $iSmbCnt - 1;\n                    for ($j = 0; $j < $jB; ++$j) {\n                        fwrite($FILE, pack('V', $j + $iSmBlk + 1));\n                    }\n                    fwrite($FILE, pack('V', -2));\n\n                    // Add to Data String(this will be written for RootEntry)\n                    $sRes .= $raList[$i]->_data;\n                    if ($raList[$i]->Size % $this->smallBlockSize) {\n                        $sRes .= str_repeat(\"\\x00\", $this->smallBlockSize - ($raList[$i]->Size % $this->smallBlockSize));\n                    }\n                    // Set for PPS\n                    $raList[$i]->startBlock = $iSmBlk;\n                    $iSmBlk += $iSmbCnt;\n                }\n            }\n        }\n        $iSbCnt = floor($this->bigBlockSize / OLE::OLE_LONG_INT_SIZE);\n        if ($iSmBlk % $iSbCnt) {\n            $iB = $iSbCnt - ($iSmBlk % $iSbCnt);\n            for ($i = 0; $i < $iB; ++$i) {\n                fwrite($FILE, pack('V', -1));\n            }\n        }\n\n        return $sRes;\n    }\n\n    /**\n     * Saves all the PPS's WKs.\n     *\n     * @param PPS[] $raList Reference to an array with all PPS's\n     */\n    private function savePps(array &$raList): void\n    {\n        // Save each PPS WK\n        $iC = count($raList);\n        for ($i = 0; $i < $iC; ++$i) {\n            fwrite($this->fileHandle, $raList[$i]->getPpsWk());\n        }\n        // Adjust for Block\n        $iCnt = count($raList);\n        $iBCnt = $this->bigBlockSize / OLE::OLE_PPS_SIZE;\n        if ($iCnt % $iBCnt) {\n            fwrite($this->fileHandle, str_repeat(\"\\x00\", ($iBCnt - ($iCnt % $iBCnt)) * OLE::OLE_PPS_SIZE));\n        }\n    }\n\n    /**\n     * Saving Big Block Depot.\n     */\n    private function saveBbd(int $iSbdSize, int $iBsize, int $iPpsCnt): void\n    {\n        $FILE = $this->fileHandle;\n        // Calculate Basic Setting\n        $iBbCnt = $this->bigBlockSize / OLE::OLE_LONG_INT_SIZE;\n        $i1stBdL = ($this->bigBlockSize - 0x4C) / OLE::OLE_LONG_INT_SIZE;\n\n        $iBdExL = 0;\n        $iAll = $iBsize + $iPpsCnt + $iSbdSize;\n        $iAllW = $iAll;\n        $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0);\n        $iBdCnt = floor(($iAll + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0);\n        // Calculate BD count\n        if ($iBdCnt > $i1stBdL) {\n            while (1) {\n                ++$iBdExL;\n                ++$iAllW;\n                $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0);\n                $iBdCnt = floor(($iAllW + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0);\n                if ($iBdCnt <= ($iBdExL * $iBbCnt + $i1stBdL)) {\n                    break;\n                }\n            }\n        }\n\n        // Making BD\n        // Set for SBD\n        if ($iSbdSize > 0) {\n            for ($i = 0; $i < ($iSbdSize - 1); ++$i) {\n                fwrite($FILE, pack('V', $i + 1));\n            }\n            fwrite($FILE, pack('V', -2));\n        }\n        // Set for B\n        for ($i = 0; $i < ($iBsize - 1); ++$i) {\n            fwrite($FILE, pack('V', $i + $iSbdSize + 1));\n        }\n        fwrite($FILE, pack('V', -2));\n\n        // Set for PPS\n        for ($i = 0; $i < ($iPpsCnt - 1); ++$i) {\n            fwrite($FILE, pack('V', $i + $iSbdSize + $iBsize + 1));\n        }\n        fwrite($FILE, pack('V', -2));\n        // Set for BBD itself ( 0xFFFFFFFD : BBD)\n        for ($i = 0; $i < $iBdCnt; ++$i) {\n            fwrite($FILE, pack('V', 0xFFFFFFFD));\n        }\n        // Set for ExtraBDList\n        for ($i = 0; $i < $iBdExL; ++$i) {\n            fwrite($FILE, pack('V', 0xFFFFFFFC));\n        }\n        // Adjust for Block\n        if (($iAllW + $iBdCnt) % $iBbCnt) {\n            $iBlock = ($iBbCnt - (($iAllW + $iBdCnt) % $iBbCnt));\n            for ($i = 0; $i < $iBlock; ++$i) {\n                fwrite($FILE, pack('V', -1));\n            }\n        }\n        // Extra BDList\n        if ($iBdCnt > $i1stBdL) {\n            $iN = 0;\n            $iNb = 0;\n            for ($i = $i1stBdL; $i < $iBdCnt; $i++, ++$iN) {\n                if ($iN >= ($iBbCnt - 1)) {\n                    $iN = 0;\n                    ++$iNb;\n                    fwrite($FILE, pack('V', $iAll + $iBdCnt + $iNb));\n                }\n                fwrite($FILE, pack('V', $iBsize + $iSbdSize + $iPpsCnt + $i));\n            }\n            if (($iBdCnt - $i1stBdL) % ($iBbCnt - 1)) {\n                $iB = ($iBbCnt - 1) - (($iBdCnt - $i1stBdL) % ($iBbCnt - 1));\n                for ($i = 0; $i < $iB; ++$i) {\n                    fwrite($FILE, pack('V', -1));\n                }\n            }\n            fwrite($FILE, pack('V', -2));\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/OLE/PPS.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\n\n// vim: set expandtab tabstop=4 shiftwidth=4:\n// +----------------------------------------------------------------------+\n// | PHP Version 4                                                        |\n// +----------------------------------------------------------------------+\n// | Copyright (c) 1997-2002 The PHP Group                                |\n// +----------------------------------------------------------------------+\n// | This source file is subject to version 2.02 of the PHP license,      |\n// | that is bundled with this package in the file LICENSE, and is        |\n// | available at through the world-wide-web at                           |\n// | http://www.php.net/license/2_02.txt.                                 |\n// | If you did not receive a copy of the PHP license and are unable to   |\n// | obtain it through the world-wide-web, please send a note to          |\n// | license@php.net so we can mail you a copy immediately.               |\n// +----------------------------------------------------------------------+\n// | Author: Xavier Noguer <xnoguer@php.net>                              |\n// | Based on OLE::Storage_Lite by Kawai, Takanori                        |\n// +----------------------------------------------------------------------+\n//\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\n\n/**\n * Class for creating PPS's for OLE containers.\n *\n * @author   Xavier Noguer <xnoguer@php.net>\n */\nclass PPS\n{\n    private const ALL_ONE_BITS = (PHP_INT_SIZE > 4) ? 0xFFFFFFFF : -1;\n\n    /**\n     * The PPS index.\n     */\n    public int $No;\n\n    /**\n     * The PPS name (in Unicode).\n     */\n    public string $Name;\n\n    /**\n     * The PPS type. Dir, Root or File.\n     */\n    public int $Type;\n\n    /**\n     * The index of the previous PPS.\n     */\n    public int $PrevPps;\n\n    /**\n     * The index of the next PPS.\n     */\n    public int $NextPps;\n\n    /**\n     * The index of it's first child if this is a Dir or Root PPS.\n     */\n    public int $DirPps;\n\n    /**\n     * A timestamp.\n     */\n    public float|int $Time1st;\n\n    /**\n     * A timestamp.\n     */\n    public float|int $Time2nd;\n\n    /**\n     * Starting block (small or big) for this PPS's data  inside the container.\n     */\n    public ?int $startBlock = null;\n\n    /**\n     * The size of the PPS's data (in bytes).\n     */\n    public int $Size;\n\n    /**\n     * The PPS's data (only used if it's not using a temporary file).\n     */\n    public string $_data = '';\n\n    /**\n     * Array of child PPS's (only used by Root and Dir PPS's).\n     *\n     * @var mixed[]\n     */\n    public array $children = [];\n\n    /**\n     * Pointer to OLE container.\n     */\n    public OLE $ole;\n\n    /**\n     * The constructor.\n     *\n     * @param ?int $No The PPS index\n     * @param ?string $name The PPS name\n     * @param ?int $type The PPS type. Dir, Root or File\n     * @param ?int $prev The index of the previous PPS\n     * @param ?int $next The index of the next PPS\n     * @param ?int $dir The index of it's first child if this is a Dir or Root PPS\n     * @param null|float|int $time_1st A timestamp\n     * @param null|float|int $time_2nd A timestamp\n     * @param ?string $data The (usually binary) source data of the PPS\n     * @param mixed[] $children Array containing children PPS for this PPS\n     */\n    public function __construct(?int $No, ?string $name, ?int $type, ?int $prev, ?int $next, ?int $dir, $time_1st, $time_2nd, ?string $data, array $children)\n    {\n        $this->No = (int) $No;\n        $this->Name = (string) $name;\n        $this->Type = (int) $type;\n        $this->PrevPps = (int) $prev;\n        $this->NextPps = (int) $next;\n        $this->DirPps = (int) $dir;\n        $this->Time1st = $time_1st ?? 0;\n        $this->Time2nd = $time_2nd ?? 0;\n        $this->_data = (string) $data;\n        $this->children = $children;\n        $this->Size = strlen((string) $data);\n    }\n\n    /**\n     * Returns the amount of data saved for this PPS.\n     *\n     * @return int The amount of data (in bytes)\n     */\n    public function getDataLen(): int\n    {\n        //if (!isset($this->_data)) {\n        //    return 0;\n        //}\n\n        return strlen($this->_data);\n    }\n\n    /**\n     * Returns a string with the PPS's WK (What is a WK?).\n     *\n     * @return string The binary string\n     */\n    public function getPpsWk(): string\n    {\n        $ret = str_pad($this->Name, 64, \"\\x00\");\n\n        $ret .= pack('v', strlen($this->Name) + 2)  // 66\n            . pack('c', $this->Type)              // 67\n            . pack('c', 0x00) //UK                // 68\n            . pack('V', $this->PrevPps) //Prev    // 72\n            . pack('V', $this->NextPps) //Next    // 76\n            . pack('V', $this->DirPps)  //Dir     // 80\n            . \"\\x00\\x09\\x02\\x00\"                  // 84\n            . \"\\x00\\x00\\x00\\x00\"                  // 88\n            . \"\\xc0\\x00\\x00\\x00\"                  // 92\n            . \"\\x00\\x00\\x00\\x46\"                  // 96 // Seems to be ok only for Root\n            . \"\\x00\\x00\\x00\\x00\"                  // 100\n            . OLE::localDateToOLE($this->Time1st)          // 108\n            . OLE::localDateToOLE($this->Time2nd)          // 116\n            . pack('V', $this->startBlock ?? 0)  // 120\n            . pack('V', $this->Size)               // 124\n            . pack('V', 0); // 128\n\n        return $ret;\n    }\n\n    /**\n     * Updates index and pointers to previous, next and children PPS's for this\n     * PPS. I don't think it'll work with Dir PPS's.\n     *\n     * @param self[] $raList Reference to the array of PPS's for the whole OLE\n     *                          container\n     *\n     * @return int The index for this PPS\n     */\n    public static function savePpsSetPnt(array &$raList, mixed $to_save, int $depth = 0): int\n    {\n        if (!is_array($to_save) || (empty($to_save))) {\n            return self::ALL_ONE_BITS;\n        }\n        /** @var self[] $to_save */\n        if (count($to_save) == 1) {\n            $cnt = count($raList);\n            // If the first entry, it's the root... Don't clone it!\n            $raList[$cnt] = ($depth == 0) ? $to_save[0] : clone $to_save[0];\n            $raList[$cnt]->No = $cnt;\n            $raList[$cnt]->PrevPps = self::ALL_ONE_BITS;\n            $raList[$cnt]->NextPps = self::ALL_ONE_BITS;\n            $raList[$cnt]->DirPps = self::savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++);\n        } else {\n            $iPos = (int) floor(count($to_save) / 2);\n            $aPrev = array_slice($to_save, 0, $iPos);\n            $aNext = array_slice($to_save, $iPos + 1);\n            $cnt = count($raList);\n            // If the first entry, it's the root... Don't clone it!\n            $raList[$cnt] = ($depth == 0) ? $to_save[$iPos] : clone $to_save[$iPos];\n            $raList[$cnt]->No = $cnt;\n            $raList[$cnt]->PrevPps = self::savePpsSetPnt($raList, $aPrev, $depth++);\n            $raList[$cnt]->NextPps = self::savePpsSetPnt($raList, $aNext, $depth++);\n            $raList[$cnt]->DirPps = self::savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++);\n        }\n\n        return $cnt;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/OLE.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\n// vim: set expandtab tabstop=4 shiftwidth=4:\n// +----------------------------------------------------------------------+\n// | PHP Version 4                                                        |\n// +----------------------------------------------------------------------+\n// | Copyright (c) 1997-2002 The PHP Group                                |\n// +----------------------------------------------------------------------+\n// | This source file is subject to version 2.02 of the PHP license,      |\n// | that is bundled with this package in the file LICENSE, and is        |\n// | available at through the world-wide-web at                           |\n// | http://www.php.net/license/2_02.txt.                                 |\n// | If you did not receive a copy of the PHP license and are unable to   |\n// | obtain it through the world-wide-web, please send a note to          |\n// | license@php.net so we can mail you a copy immediately.               |\n// +----------------------------------------------------------------------+\n// | Author: Xavier Noguer <xnoguer@php.net>                              |\n// | Based on OLE::Storage_Lite by Kawai, Takanori                        |\n// +----------------------------------------------------------------------+\n//\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\ChainedBlockStream;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\PPS\\Root;\n\n/*\n * Array for storing OLE instances that are accessed from\n * OLE_ChainedBlockStream::stream_open().\n *\n * @var array\n */\n$GLOBALS['_OLE_INSTANCES'] = [];\n\n/**\n * OLE package base class.\n *\n * @author   Xavier Noguer <xnoguer@php.net>\n * @author   Christian Schmidt <schmidt@php.net>\n */\nclass OLE\n{\n    const OLE_PPS_TYPE_ROOT = 5;\n    const OLE_PPS_TYPE_DIR = 1;\n    const OLE_PPS_TYPE_FILE = 2;\n    const OLE_DATA_SIZE_SMALL = 0x1000;\n    const OLE_LONG_INT_SIZE = 4;\n    const OLE_PPS_SIZE = 0x80;\n\n    /**\n     * The file handle for reading an OLE container.\n     *\n     * @var resource\n     */\n    public $_file_handle;\n\n    /**\n     * Array of PPS's found on the OLE container.\n     *\n     * @var array<OLE\\PPS|OLE\\PPS\\File|Root>\n     */\n    public array $_list = [];\n\n    /**\n     * Root directory of OLE container.\n     */\n    public Root $root;\n\n    /**\n     * Big Block Allocation Table.\n     *\n     * @var mixed[] (blockId => nextBlockId)\n     */\n    public array $bbat;\n\n    /**\n     * Short Block Allocation Table.\n     *\n     * @var mixed[] (blockId => nextBlockId)\n     */\n    public array $sbat;\n\n    /**\n     * Size of big blocks. This is usually 512.\n     *\n     * @var int<1, max> number of octets per block\n     */\n    public int $bigBlockSize;\n\n    /**\n     * Size of small blocks. This is usually 64.\n     *\n     * @var int number of octets per block\n     */\n    public int $smallBlockSize;\n\n    /**\n     * Threshold for big blocks.\n     */\n    public int $bigBlockThreshold;\n\n    /**\n     * Reads an OLE container from the contents of the file given.\n     *\n     * @acces public\n     *\n     * @return bool true on success, PEAR_Error on failure\n     */\n    public function read(string $filename): bool\n    {\n        $fh = @fopen($filename, 'rb');\n        if ($fh === false) {\n            throw new ReaderException(\"Can't open file $filename\");\n        }\n        $this->_file_handle = $fh;\n\n        $signature = fread($fh, 8);\n        if (\"\\xD0\\xCF\\x11\\xE0\\xA1\\xB1\\x1A\\xE1\" != $signature) {\n            throw new ReaderException(\"File doesn't seem to be an OLE container.\");\n        }\n        fseek($fh, 28);\n        if (fread($fh, 2) != \"\\xFE\\xFF\") {\n            // This shouldn't be a problem in practice\n            throw new ReaderException('Only Little-Endian encoding is supported.');\n        }\n        // Size of blocks and short blocks in bytes\n        /** @var int<1, max> */\n        $temp = 2 ** self::readInt2($fh);\n        $this->bigBlockSize = $temp;\n        $this->smallBlockSize = 2 ** self::readInt2($fh);\n\n        // Skip UID, revision number and version number\n        fseek($fh, 44);\n        // Number of blocks in Big Block Allocation Table\n        $bbatBlockCount = self::readInt4($fh);\n\n        // Root chain 1st block\n        $directoryFirstBlockId = self::readInt4($fh);\n\n        // Skip unused bytes\n        fseek($fh, 56);\n        // Streams shorter than this are stored using small blocks\n        $this->bigBlockThreshold = self::readInt4($fh);\n        // Block id of first sector in Short Block Allocation Table\n        $sbatFirstBlockId = self::readInt4($fh);\n        // Number of blocks in Short Block Allocation Table\n        $sbbatBlockCount = self::readInt4($fh);\n        // Block id of first sector in Master Block Allocation Table\n        $mbatFirstBlockId = self::readInt4($fh);\n        // Number of blocks in Master Block Allocation Table\n        $mbbatBlockCount = self::readInt4($fh);\n        $this->bbat = [];\n\n        // Remaining 4 * 109 bytes of current block is beginning of Master\n        // Block Allocation Table\n        $mbatBlocks = [];\n        for ($i = 0; $i < 109; ++$i) {\n            $mbatBlocks[] = self::readInt4($fh);\n        }\n\n        // Read rest of Master Block Allocation Table (if any is left)\n        $pos = $this->getBlockOffset($mbatFirstBlockId);\n        for ($i = 0; $i < $mbbatBlockCount; ++$i) {\n            fseek($fh, $pos);\n            for ($j = 0; $j < $this->bigBlockSize / 4 - 1; ++$j) {\n                $mbatBlocks[] = self::readInt4($fh);\n            }\n            // Last block id in each block points to next block\n            $pos = $this->getBlockOffset(self::readInt4($fh));\n        }\n\n        // Read Big Block Allocation Table according to chain specified by $mbatBlocks\n        for ($i = 0; $i < $bbatBlockCount; ++$i) {\n            $pos = $this->getBlockOffset($mbatBlocks[$i]);\n            fseek($fh, $pos);\n            for ($j = 0; $j < $this->bigBlockSize / 4; ++$j) {\n                $this->bbat[] = self::readInt4($fh);\n            }\n        }\n\n        // Read short block allocation table (SBAT)\n        $this->sbat = [];\n        $shortBlockCount = $sbbatBlockCount * $this->bigBlockSize / 4;\n        $sbatFh = $this->getStream($sbatFirstBlockId);\n        for ($blockId = 0; $blockId < $shortBlockCount; ++$blockId) {\n            $this->sbat[$blockId] = self::readInt4($sbatFh);\n        }\n        fclose($sbatFh);\n\n        $this->readPpsWks($directoryFirstBlockId);\n\n        return true;\n    }\n\n    /**\n     * @param int $blockId byte offset from beginning of file\n     */\n    public function getBlockOffset(int $blockId): int\n    {\n        return 512 + $blockId * $this->bigBlockSize;\n    }\n\n    /**\n     * Returns a stream for use with fread() etc. External callers should\n     * use \\PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\PPS\\File::getStream().\n     *\n     * @param int|OLE\\PPS $blockIdOrPps block id or PPS\n     *\n     * @return resource read-only stream\n     */\n    public function getStream($blockIdOrPps)\n    {\n        static $isRegistered = false;\n        if (!$isRegistered) {\n            stream_wrapper_register('ole-chainedblockstream', ChainedBlockStream::class);\n            $isRegistered = true;\n        }\n\n        // Store current instance in global array, so that it can be accessed\n        // in OLE_ChainedBlockStream::stream_open().\n        // Object is removed from self::$instances in OLE_Stream::close().\n        $GLOBALS['_OLE_INSTANCES'][] = $this; //* @phpstan-ignore-line\n        $keys = array_keys($GLOBALS['_OLE_INSTANCES']); //* @phpstan-ignore-line\n        $instanceId = end($keys);\n\n        $path = 'ole-chainedblockstream://oleInstanceId=' . $instanceId;\n        if ($blockIdOrPps instanceof OLE\\PPS) {\n            $path .= '&blockId=' . $blockIdOrPps->startBlock;\n            $path .= '&size=' . $blockIdOrPps->Size;\n        } else {\n            $path .= '&blockId=' . $blockIdOrPps;\n        }\n\n        $resource = fopen($path, 'rb') ?: throw new Exception(\"Unable to open stream $path\");\n\n        return $resource;\n    }\n\n    /**\n     * Reads a signed char.\n     *\n     * @param resource $fileHandle file handle\n     */\n    private static function readInt1($fileHandle): int\n    {\n        [, $tmp] = unpack('c', fread($fileHandle, 1) ?: '') ?: [0, 0];\n        /** @var int $tmp */\n\n        return $tmp;\n    }\n\n    /**\n     * Reads an unsigned short (2 octets).\n     *\n     * @param resource $fileHandle file handle\n     */\n    private static function readInt2($fileHandle): int\n    {\n        [, $tmp] = unpack('v', fread($fileHandle, 2) ?: '') ?: [0, 0];\n        /** @var int $tmp */\n\n        return $tmp;\n    }\n\n    private const SIGNED_4OCTET_LIMIT = 2147483648;\n\n    private const SIGNED_4OCTET_SUBTRACT = 2 * self::SIGNED_4OCTET_LIMIT;\n\n    /**\n     * Reads long (4 octets), interpreted as if signed on 32-bit system.\n     *\n     * @param resource $fileHandle file handle\n     */\n    private static function readInt4($fileHandle): int\n    {\n        [, $tmp] = unpack('V', fread($fileHandle, 4) ?: '') ?: [0, 0];\n        /** @var int $tmp */\n        if ($tmp >= self::SIGNED_4OCTET_LIMIT) {\n            $tmp -= self::SIGNED_4OCTET_SUBTRACT;\n        }\n\n        return $tmp;\n    }\n\n    /**\n     * Gets information about all PPS's on the OLE container from the PPS WK's\n     * creates an OLE_PPS object for each one.\n     *\n     * @param int $blockId the block id of the first block\n     *\n     * @return bool true on success, PEAR_Error on failure\n     */\n    public function readPpsWks(int $blockId): bool\n    {\n        $fh = $this->getStream($blockId);\n        for ($pos = 0; true; $pos += 128) {\n            fseek($fh, $pos, SEEK_SET);\n            $nameUtf16 = (string) fread($fh, 64);\n            $nameLength = self::readInt2($fh);\n            $nameUtf16 = substr($nameUtf16, 0, $nameLength - 2);\n            // Simple conversion from UTF-16LE to ISO-8859-1\n            $name = str_replace(\"\\x00\", '', $nameUtf16);\n            $type = self::readInt1($fh);\n            switch ($type) {\n                case self::OLE_PPS_TYPE_ROOT:\n                    $pps = new Root(null, null, []);\n                    $this->root = $pps;\n\n                    break;\n                case self::OLE_PPS_TYPE_DIR:\n                    $pps = new OLE\\PPS(null, null, null, null, null, null, null, null, null, []);\n\n                    break;\n                case self::OLE_PPS_TYPE_FILE:\n                    $pps = new OLE\\PPS\\File($name);\n\n                    break;\n                default:\n                    throw new Exception('Unsupported PPS type');\n            }\n            fseek($fh, 1, SEEK_CUR);\n            $pps->Type = $type;\n            $pps->Name = $name;\n            $pps->PrevPps = self::readInt4($fh);\n            $pps->NextPps = self::readInt4($fh);\n            $pps->DirPps = self::readInt4($fh);\n            fseek($fh, 20, SEEK_CUR);\n            $pps->Time1st = self::OLE2LocalDate((string) fread($fh, 8));\n            $pps->Time2nd = self::OLE2LocalDate((string) fread($fh, 8));\n            $pps->startBlock = self::readInt4($fh);\n            $pps->Size = self::readInt4($fh);\n            $pps->No = count($this->_list);\n            $this->_list[] = $pps;\n\n            // check if the PPS tree (starting from root) is complete\n            if (isset($this->root) && $this->ppsTreeComplete($this->root->No)) {\n                break;\n            }\n        }\n        fclose($fh);\n\n        // Initialize $pps->children on directories\n        foreach ($this->_list as $pps) {\n            if ($pps->Type == self::OLE_PPS_TYPE_DIR || $pps->Type == self::OLE_PPS_TYPE_ROOT) {\n                $nos = [$pps->DirPps];\n                $pps->children = [];\n                while (!empty($nos)) {\n                    $no = array_pop($nos);\n                    if ($no != -1) {\n                        $childPps = $this->_list[$no];\n                        $nos[] = $childPps->PrevPps;\n                        $nos[] = $childPps->NextPps;\n                        $pps->children[] = $childPps;\n                    }\n                }\n            }\n        }\n\n        return true;\n    }\n\n    /**\n     * It checks whether the PPS tree is complete (all PPS's read)\n     * starting with the given PPS (not necessarily root).\n     *\n     * @param int $index The index of the PPS from which we are checking\n     *\n     * @return bool Whether the PPS tree for the given PPS is complete\n     */\n    private function ppsTreeComplete(int $index): bool\n    {\n        if (!isset($this->_list[$index])) {\n            return false;\n        }\n        $pps = $this->_list[$index];\n\n        return\n            ($pps->PrevPps == -1\n                || $this->ppsTreeComplete($pps->PrevPps))\n            && ($pps->NextPps == -1\n                || $this->ppsTreeComplete($pps->NextPps))\n            && ($pps->DirPps == -1\n                || $this->ppsTreeComplete($pps->DirPps));\n    }\n\n    /**\n     * Checks whether a PPS is a File PPS or not.\n     * If there is no PPS for the index given, it will return false.\n     *\n     * @param int $index The index for the PPS\n     *\n     * @return bool true if it's a File PPS, false otherwise\n     */\n    public function isFile(int $index): bool\n    {\n        if (isset($this->_list[$index])) {\n            return $this->_list[$index]->Type == self::OLE_PPS_TYPE_FILE;\n        }\n\n        return false;\n    }\n\n    /**\n     * Checks whether a PPS is a Root PPS or not.\n     * If there is no PPS for the index given, it will return false.\n     *\n     * @param int $index the index for the PPS\n     *\n     * @return bool true if it's a Root PPS, false otherwise\n     */\n    public function isRoot(int $index): bool\n    {\n        if (isset($this->_list[$index])) {\n            return $this->_list[$index]->Type == self::OLE_PPS_TYPE_ROOT;\n        }\n\n        return false;\n    }\n\n    /**\n     * Gives the total number of PPS's found in the OLE container.\n     *\n     * @return int The total number of PPS's found in the OLE container\n     */\n    public function ppsTotal(): int\n    {\n        return count($this->_list);\n    }\n\n    /**\n     * Gets data from a PPS\n     * If there is no PPS for the index given, it will return an empty string.\n     *\n     * @param int $index The index for the PPS\n     * @param int $position The position from which to start reading\n     *                          (relative to the PPS)\n     * @param int $length The amount of bytes to read (at most)\n     *\n     * @return string The binary string containing the data requested\n     *\n     * @see OLE_PPS_File::getStream()\n     */\n    public function getData(int $index, int $position, int $length): string\n    {\n        // if position is not valid return empty string\n        if (!isset($this->_list[$index]) || ($position >= $this->_list[$index]->Size) || ($position < 0)) {\n            return '';\n        }\n        $fh = $this->getStream($this->_list[$index]);\n        $data = (string) stream_get_contents($fh, $length, $position);\n        fclose($fh);\n\n        return $data;\n    }\n\n    /**\n     * Gets the data length from a PPS\n     * If there is no PPS for the index given, it will return 0.\n     *\n     * @param int $index The index for the PPS\n     *\n     * @return int The amount of bytes in data the PPS has\n     */\n    public function getDataLength(int $index): int\n    {\n        if (isset($this->_list[$index])) {\n            return $this->_list[$index]->Size;\n        }\n\n        return 0;\n    }\n\n    /**\n     * Utility function to transform ASCII text to Unicode.\n     *\n     * @param string $ascii The ASCII string to transform\n     *\n     * @return string The string in Unicode\n     */\n    public static function ascToUcs(string $ascii): string\n    {\n        $rawname = '';\n        $iMax = strlen($ascii);\n        for ($i = 0; $i < $iMax; ++$i) {\n            $rawname .= $ascii[$i]\n                . \"\\x00\";\n        }\n\n        return $rawname;\n    }\n\n    /**\n     * Utility function\n     * Returns a string for the OLE container with the date given.\n     *\n     * @param float|int $date A timestamp\n     *\n     * @return string The string for the OLE container\n     */\n    public static function localDateToOLE($date): string\n    {\n        if (!$date) {\n            return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\n        }\n        $dateTime = Date::dateTimeFromTimestamp(\"$date\");\n\n        // days from 1-1-1601 until the beginning of UNIX era\n        $days = 134774;\n        // calculate seconds\n        $big_date = $days * 24 * 3600 + (float) $dateTime->format('U');\n        // multiply just to make MS happy\n        $big_date *= 10000000;\n\n        // Make HEX string\n        $res = '';\n\n        $factor = 2 ** 56;\n        while ($factor >= 1) {\n            $hex = (int) floor($big_date / $factor);\n            $res = pack('c', $hex) . $res;\n            $big_date = fmod($big_date, $factor);\n            $factor /= 256;\n        }\n\n        return $res;\n    }\n\n    /**\n     * Returns a timestamp from an OLE container's date.\n     *\n     * @param string $oleTimestamp A binary string with the encoded date\n     *\n     * @return float|int The Unix timestamp corresponding to the string\n     */\n    public static function OLE2LocalDate(string $oleTimestamp)\n    {\n        if (strlen($oleTimestamp) != 8) {\n            throw new ReaderException('Expecting 8 byte string');\n        }\n\n        // convert to units of 100 ns since 1601:\n        /** @var int[] */\n        $unpackedTimestamp = unpack('v4', $oleTimestamp) ?: [];\n        $timestampHigh = (float) $unpackedTimestamp[4] * 65536 + (float) $unpackedTimestamp[3];\n        $timestampLow = (float) $unpackedTimestamp[2] * 65536 + (float) $unpackedTimestamp[1];\n\n        // translate to seconds since 1601:\n        $timestampHigh /= 10000000;\n        $timestampLow /= 10000000;\n\n        // days from 1601 to 1970:\n        $days = 134774;\n\n        // translate to seconds since 1970:\n        $unixTimestamp = floor(65536.0 * 65536.0 * $timestampHigh + $timestampLow - $days * 24 * 3600 + 0.5);\n\n        return IntOrFloat::evaluate($unixTimestamp);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/OLERead.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\n\nclass OLERead\n{\n    private string $data = '';\n\n    // Size of a sector = 512 bytes\n    const BIG_BLOCK_SIZE = 0x200;\n\n    // Size of a short sector = 64 bytes\n    const SMALL_BLOCK_SIZE = 0x40;\n\n    // Size of a directory entry always = 128 bytes\n    const PROPERTY_STORAGE_BLOCK_SIZE = 0x80;\n\n    // Minimum size of a standard stream = 4096 bytes, streams smaller than this are stored as short streams\n    const SMALL_BLOCK_THRESHOLD = 0x1000;\n\n    // header offsets\n    const NUM_BIG_BLOCK_DEPOT_BLOCKS_POS = 0x2C;\n    const ROOT_START_BLOCK_POS = 0x30;\n    const SMALL_BLOCK_DEPOT_BLOCK_POS = 0x3C;\n    const EXTENSION_BLOCK_POS = 0x44;\n    const NUM_EXTENSION_BLOCK_POS = 0x48;\n    const BIG_BLOCK_DEPOT_BLOCKS_POS = 0x4C;\n\n    // property storage offsets (directory offsets)\n    const SIZE_OF_NAME_POS = 0x40;\n    const TYPE_POS = 0x42;\n    const START_BLOCK_POS = 0x74;\n    const SIZE_POS = 0x78;\n\n    public ?int $wrkbook = null;\n\n    public ?int $summaryInformation = null;\n\n    public ?int $documentSummaryInformation = null;\n\n    private int $numBigBlockDepotBlocks;\n\n    private int $rootStartBlock;\n\n    private int $sbdStartBlock;\n\n    private int $extensionBlock;\n\n    private int $numExtensionBlocks;\n\n    private string $bigBlockChain;\n\n    private string $smallBlockChain;\n\n    private string $entry;\n\n    private int $rootentry;\n\n    /** @var mixed[][] */\n    private array $props = [];\n\n    /**\n     * Read the file.\n     */\n    public function read(string $filename): void\n    {\n        File::assertFile($filename);\n\n        // Get the file identifier\n        // Don't bother reading the whole file until we know it's a valid OLE file\n        $this->data = (string) file_get_contents($filename, false, null, 0, 8);\n\n        // Check OLE identifier\n        $identifierOle = pack('CCCCCCCC', 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1);\n        if ($this->data != $identifierOle) {\n            throw new ReaderException('The filename ' . $filename . ' is not recognised as an OLE file');\n        }\n\n        // Get the file data\n        $this->data = (string) file_get_contents($filename);\n\n        // Total number of sectors used for the SAT\n        $this->numBigBlockDepotBlocks = self::getInt4d($this->data, self::NUM_BIG_BLOCK_DEPOT_BLOCKS_POS);\n\n        // SecID of the first sector of the directory stream\n        $this->rootStartBlock = self::getInt4d($this->data, self::ROOT_START_BLOCK_POS);\n\n        // SecID of the first sector of the SSAT (or -2 if not extant)\n        $this->sbdStartBlock = self::getInt4d($this->data, self::SMALL_BLOCK_DEPOT_BLOCK_POS);\n\n        // SecID of the first sector of the MSAT (or -2 if no additional sectors are used)\n        $this->extensionBlock = self::getInt4d($this->data, self::EXTENSION_BLOCK_POS);\n\n        // Total number of sectors used by MSAT\n        $this->numExtensionBlocks = self::getInt4d($this->data, self::NUM_EXTENSION_BLOCK_POS);\n\n        $bigBlockDepotBlocks = [];\n        $pos = self::BIG_BLOCK_DEPOT_BLOCKS_POS;\n\n        $bbdBlocks = $this->numBigBlockDepotBlocks;\n\n        if ($this->numExtensionBlocks !== 0) {\n            $bbdBlocks = (self::BIG_BLOCK_SIZE - self::BIG_BLOCK_DEPOT_BLOCKS_POS) / 4;\n        }\n\n        for ($i = 0; $i < $bbdBlocks; ++$i) {\n            $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos);\n            $pos += 4;\n        }\n\n        for ($j = 0; $j < $this->numExtensionBlocks; ++$j) {\n            $pos = ($this->extensionBlock + 1) * self::BIG_BLOCK_SIZE;\n            $blocksToRead = min($this->numBigBlockDepotBlocks - $bbdBlocks, self::BIG_BLOCK_SIZE / 4 - 1);\n\n            for ($i = $bbdBlocks; $i < $bbdBlocks + $blocksToRead; ++$i) {\n                $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos);\n                $pos += 4;\n            }\n\n            $bbdBlocks += $blocksToRead;\n            if ($bbdBlocks < $this->numBigBlockDepotBlocks) {\n                $this->extensionBlock = self::getInt4d($this->data, $pos);\n            }\n        }\n\n        $pos = 0;\n        $this->bigBlockChain = '';\n        $bbs = self::BIG_BLOCK_SIZE / 4;\n        for ($i = 0; $i < $this->numBigBlockDepotBlocks; ++$i) {\n            $pos = ($bigBlockDepotBlocks[$i] + 1) * self::BIG_BLOCK_SIZE;\n\n            $this->bigBlockChain .= substr($this->data, $pos, 4 * $bbs);\n            $pos += 4 * $bbs;\n        }\n\n        $sbdBlock = $this->sbdStartBlock;\n        $this->smallBlockChain = '';\n        while ($sbdBlock != -2) {\n            $pos = ($sbdBlock + 1) * self::BIG_BLOCK_SIZE;\n\n            $this->smallBlockChain .= substr($this->data, $pos, 4 * $bbs);\n            $pos += 4 * $bbs;\n\n            $sbdBlock = self::getInt4d($this->bigBlockChain, $sbdBlock * 4);\n        }\n\n        // read the directory stream\n        $block = $this->rootStartBlock;\n        $this->entry = $this->readData($block);\n\n        $this->readPropertySets();\n    }\n\n    /**\n     * Extract binary stream data.\n     */\n    public function getStream(?int $stream): ?string\n    {\n        if ($stream === null) {\n            return null;\n        }\n\n        $streamData = '';\n\n        if ($this->props[$stream]['size'] < self::SMALL_BLOCK_THRESHOLD) {\n            /** @var int */\n            $temp = $this->props[$this->rootentry]['startBlock'];\n            $rootdata = $this->readData($temp);\n\n            /** @var int */\n            $block = $this->props[$stream]['startBlock'];\n\n            while ($block != -2) {\n                $pos = $block * self::SMALL_BLOCK_SIZE;\n                $streamData .= substr($rootdata, $pos, self::SMALL_BLOCK_SIZE);\n\n                $block = self::getInt4d($this->smallBlockChain, $block * 4);\n            }\n\n            return $streamData;\n        }\n        /** @var int */\n        $temp = $this->props[$stream]['size'];\n        $numBlocks = $temp / self::BIG_BLOCK_SIZE;\n        if ($temp % self::BIG_BLOCK_SIZE != 0) {\n            ++$numBlocks;\n        }\n\n        if ($numBlocks == 0) {\n            return '';\n        }\n\n        /** @var int */\n        $block = $this->props[$stream]['startBlock'];\n\n        while ($block != -2) {\n            $pos = ($block + 1) * self::BIG_BLOCK_SIZE;\n            $streamData .= substr($this->data, $pos, self::BIG_BLOCK_SIZE);\n            $block = self::getInt4d($this->bigBlockChain, $block * 4);\n        }\n\n        return $streamData;\n    }\n\n    /**\n     * Read a standard stream (by joining sectors using information from SAT).\n     *\n     * @param int $block Sector ID where the stream starts\n     *\n     * @return string Data for standard stream\n     */\n    private function readData(int $block): string\n    {\n        $data = '';\n\n        while ($block != -2) {\n            $pos = ($block + 1) * self::BIG_BLOCK_SIZE;\n            $data .= substr($this->data, $pos, self::BIG_BLOCK_SIZE);\n            $block = self::getInt4d($this->bigBlockChain, $block * 4);\n        }\n\n        return $data;\n    }\n\n    /**\n     * Read entries in the directory stream.\n     */\n    private function readPropertySets(): void\n    {\n        $offset = 0;\n\n        // loop through entries, each entry is 128 bytes\n        $entryLen = strlen($this->entry);\n        while ($offset < $entryLen) {\n            // entry data (128 bytes)\n            $d = substr($this->entry, $offset, self::PROPERTY_STORAGE_BLOCK_SIZE);\n\n            // size in bytes of name\n            $nameSize = ord($d[self::SIZE_OF_NAME_POS]) | (ord($d[self::SIZE_OF_NAME_POS + 1]) << 8);\n\n            // type of entry\n            $type = ord($d[self::TYPE_POS]);\n\n            // sectorID of first sector or short sector, if this entry refers to a stream (the case with workbook)\n            // sectorID of first sector of the short-stream container stream, if this entry is root entry\n            $startBlock = self::getInt4d($d, self::START_BLOCK_POS);\n\n            $size = self::getInt4d($d, self::SIZE_POS);\n\n            $name = str_replace(\"\\x00\", '', substr($d, 0, $nameSize));\n\n            $this->props[] = [\n                'name' => $name,\n                'type' => $type,\n                'startBlock' => $startBlock,\n                'size' => $size,\n            ];\n\n            // tmp helper to simplify checks\n            $upName = strtoupper($name);\n\n            // Workbook directory entry (BIFF5 uses Book, BIFF8 uses Workbook)\n            if (($upName === 'WORKBOOK') || ($upName === 'BOOK')) {\n                $this->wrkbook = count($this->props) - 1;\n            } elseif ($upName === 'ROOT ENTRY' || $upName === 'R') {\n                // Root entry\n                $this->rootentry = count($this->props) - 1;\n            }\n\n            // Summary information\n            if ($name == chr(5) . 'SummaryInformation') {\n                $this->summaryInformation = count($this->props) - 1;\n            }\n\n            // Additional Document Summary information\n            if ($name == chr(5) . 'DocumentSummaryInformation') {\n                $this->documentSummaryInformation = count($this->props) - 1;\n            }\n\n            $offset += self::PROPERTY_STORAGE_BLOCK_SIZE;\n        }\n    }\n\n    /**\n     * Read 4 bytes of data at specified position.\n     */\n    private static function getInt4d(string $data, int $pos): int\n    {\n        if ($pos < 0) {\n            // Invalid position\n            throw new ReaderException('Parameter pos=' . $pos . ' is invalid.');\n        }\n\n        $len = strlen($data);\n        if ($len < $pos + 4) {\n            $data .= str_repeat(\"\\0\", $pos + 4 - $len);\n        }\n\n        // FIX: represent numbers correctly on 64-bit system\n        // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334\n        // Changed by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems\n        $_or_24 = ord($data[$pos + 3]);\n        if ($_or_24 >= 128) {\n            // negative number\n            $_ord_24 = -abs((256 - $_or_24) << 24);\n        } else {\n            $_ord_24 = ($_or_24 & 127) << 24;\n        }\n\n        return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/PasswordHasher.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Protection;\n\nclass PasswordHasher\n{\n    const MAX_PASSWORD_LENGTH = 255;\n\n    /**\n     * Get algorithm name for PHP.\n     */\n    private static function getAlgorithm(string $algorithmName): string\n    {\n        if (!$algorithmName) {\n            return '';\n        }\n\n        // Mapping between algorithm name in Excel and algorithm name in PHP\n        $mapping = [\n            Protection::ALGORITHM_MD2 => 'md2',\n            Protection::ALGORITHM_MD4 => 'md4',\n            Protection::ALGORITHM_MD5 => 'md5',\n            Protection::ALGORITHM_SHA_1 => 'sha1',\n            Protection::ALGORITHM_SHA_256 => 'sha256',\n            Protection::ALGORITHM_SHA_384 => 'sha384',\n            Protection::ALGORITHM_SHA_512 => 'sha512',\n            Protection::ALGORITHM_RIPEMD_128 => 'ripemd128',\n            Protection::ALGORITHM_RIPEMD_160 => 'ripemd160',\n            Protection::ALGORITHM_WHIRLPOOL => 'whirlpool',\n        ];\n\n        if (array_key_exists($algorithmName, $mapping)) {\n            return $mapping[$algorithmName];\n        }\n\n        throw new SpException('Unsupported password algorithm: ' . $algorithmName);\n    }\n\n    /**\n     * Create a password hash from a given string.\n     *\n     * This method is based on the spec at:\n     * https://interoperability.blob.core.windows.net/files/MS-OFFCRYPTO/[MS-OFFCRYPTO].pdf\n     * 2.3.7.1 Binary Document Password Verifier Derivation Method 1\n     *\n     * It replaces a method based on the algorithm provided by\n     * Daniel Rentz of OpenOffice and the PEAR package\n     * Spreadsheet_Excel_Writer by Xavier Noguer <xnoguer@rezebra.com>.\n     *\n     * @param string $password Password to hash\n     */\n    private static function defaultHashPassword(string $password): string\n    {\n        $verifier = 0;\n        $pwlen = strlen($password);\n        $passwordArray = pack('c', $pwlen) . $password;\n        for ($i = $pwlen; $i >= 0; --$i) {\n            $intermediate1 = (($verifier & 0x4000) === 0) ? 0 : 1;\n            $intermediate2 = 2 * $verifier;\n            $intermediate2 = $intermediate2 & 0x7FFF;\n            $intermediate3 = $intermediate1 | $intermediate2;\n            $verifier = $intermediate3 ^ ord($passwordArray[$i]);\n        }\n        $verifier ^= 0xCE4B;\n\n        return strtoupper(dechex($verifier));\n    }\n\n    /**\n     * Create a password hash from a given string by a specific algorithm.\n     *\n     * 2.4.2.4 ISO Write Protection Method\n     *\n     * @see https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-offcrypto/1357ea58-646e-4483-92ef-95d718079d6f\n     *\n     * @param string $password Password to hash\n     * @param string $algorithm Hash algorithm used to compute the password hash value\n     * @param string $salt Pseudorandom base64-encoded string\n     * @param int $spinCount Number of times to iterate on a hash of a password\n     *\n     * @return string Hashed password\n     */\n    public static function hashPassword(string $password, string $algorithm = '', string $salt = '', int $spinCount = 10000): string\n    {\n        if (strlen($password) > self::MAX_PASSWORD_LENGTH) {\n            throw new SpException('Password exceeds ' . self::MAX_PASSWORD_LENGTH . ' characters');\n        }\n        $phpAlgorithm = self::getAlgorithm($algorithm);\n        if (!$phpAlgorithm) {\n            return self::defaultHashPassword($password);\n        }\n\n        $saltValue = base64_decode($salt);\n        $encodedPassword = mb_convert_encoding($password, 'UCS-2LE', 'UTF-8');\n\n        $hashValue = hash($phpAlgorithm, $saltValue . $encodedPassword, true);\n        for ($i = 0; $i < $spinCount; ++$i) {\n            $hashValue = hash($phpAlgorithm, $hashValue . pack('L', $i), true);\n        }\n\n        return base64_encode($hashValue);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/StringHelper.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse Composer\\Pcre\\Preg;\nuse IntlCalendar;\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse Stringable;\n\nclass StringHelper\n{\n    private const CONTROL_CHARACTERS_KEYS = [\n        \"\\x00\",\n        \"\\x01\",\n        \"\\x02\",\n        \"\\x03\",\n        \"\\x04\",\n        \"\\x05\",\n        \"\\x06\",\n        \"\\x07\",\n        \"\\x08\",\n        \"\\x0b\",\n        \"\\x0c\",\n        \"\\x0e\",\n        \"\\x0f\",\n        \"\\x10\",\n        \"\\x11\",\n        \"\\x12\",\n        \"\\x13\",\n        \"\\x14\",\n        \"\\x15\",\n        \"\\x16\",\n        \"\\x17\",\n        \"\\x18\",\n        \"\\x19\",\n        \"\\x1a\",\n        \"\\x1b\",\n        \"\\x1c\",\n        \"\\x1d\",\n        \"\\x1e\",\n        \"\\x1f\",\n    ];\n    private const CONTROL_CHARACTERS_VALUES = [\n        '_x0000_',\n        '_x0001_',\n        '_x0002_',\n        '_x0003_',\n        '_x0004_',\n        '_x0005_',\n        '_x0006_',\n        '_x0007_',\n        '_x0008_',\n        '_x000B_',\n        '_x000C_',\n        '_x000E_',\n        '_x000F_',\n        '_x0010_',\n        '_x0011_',\n        '_x0012_',\n        '_x0013_',\n        '_x0014_',\n        '_x0015_',\n        '_x0016_',\n        '_x0017_',\n        '_x0018_',\n        '_x0019_',\n        '_x001A_',\n        '_x001B_',\n        '_x001C_',\n        '_x001D_',\n        '_x001E_',\n        '_x001F_',\n    ];\n\n    /**\n     * SYLK Characters array.\n     */\n    private const SYLK_CHARACTERS = [\n        \"\\x1B 0\" => \"\\x00\",\n        \"\\x1B 1\" => \"\\x01\",\n        \"\\x1B 2\" => \"\\x02\",\n        \"\\x1B 3\" => \"\\x03\",\n        \"\\x1B 4\" => \"\\x04\",\n        \"\\x1B 5\" => \"\\x05\",\n        \"\\x1B 6\" => \"\\x06\",\n        \"\\x1B 7\" => \"\\x07\",\n        \"\\x1B 8\" => \"\\x08\",\n        \"\\x1B 9\" => \"\\x09\",\n        \"\\x1B :\" => \"\\x0a\",\n        \"\\x1B ;\" => \"\\x0b\",\n        \"\\x1B <\" => \"\\x0c\",\n        \"\\x1B =\" => \"\\x0d\",\n        \"\\x1B >\" => \"\\x0e\",\n        \"\\x1B ?\" => \"\\x0f\",\n        \"\\x1B!0\" => \"\\x10\",\n        \"\\x1B!1\" => \"\\x11\",\n        \"\\x1B!2\" => \"\\x12\",\n        \"\\x1B!3\" => \"\\x13\",\n        \"\\x1B!4\" => \"\\x14\",\n        \"\\x1B!5\" => \"\\x15\",\n        \"\\x1B!6\" => \"\\x16\",\n        \"\\x1B!7\" => \"\\x17\",\n        \"\\x1B!8\" => \"\\x18\",\n        \"\\x1B!9\" => \"\\x19\",\n        \"\\x1B!:\" => \"\\x1a\",\n        \"\\x1B!;\" => \"\\x1b\",\n        \"\\x1B!<\" => \"\\x1c\",\n        \"\\x1B!=\" => \"\\x1d\",\n        \"\\x1B!>\" => \"\\x1e\",\n        \"\\x1B!?\" => \"\\x1f\",\n        \"\\x1B'?\" => \"\\x7f\",\n        \"\\x1B(0\" => '€', // 128 in CP1252\n        \"\\x1B(2\" => '‚', // 130 in CP1252\n        \"\\x1B(3\" => 'ƒ', // 131 in CP1252\n        \"\\x1B(4\" => '„', // 132 in CP1252\n        \"\\x1B(5\" => '…', // 133 in CP1252\n        \"\\x1B(6\" => '†', // 134 in CP1252\n        \"\\x1B(7\" => '‡', // 135 in CP1252\n        \"\\x1B(8\" => 'ˆ', // 136 in CP1252\n        \"\\x1B(9\" => '‰', // 137 in CP1252\n        \"\\x1B(:\" => 'Š', // 138 in CP1252\n        \"\\x1B(;\" => '‹', // 139 in CP1252\n        \"\\x1BNj\" => 'Œ', // 140 in CP1252\n        \"\\x1B(>\" => 'Ž', // 142 in CP1252\n        \"\\x1B)1\" => '‘', // 145 in CP1252\n        \"\\x1B)2\" => '’', // 146 in CP1252\n        \"\\x1B)3\" => '“', // 147 in CP1252\n        \"\\x1B)4\" => '”', // 148 in CP1252\n        \"\\x1B)5\" => '•', // 149 in CP1252\n        \"\\x1B)6\" => '–', // 150 in CP1252\n        \"\\x1B)7\" => '—', // 151 in CP1252\n        \"\\x1B)8\" => '˜', // 152 in CP1252\n        \"\\x1B)9\" => '™', // 153 in CP1252\n        \"\\x1B):\" => 'š', // 154 in CP1252\n        \"\\x1B);\" => '›', // 155 in CP1252\n        \"\\x1BNz\" => 'œ', // 156 in CP1252\n        \"\\x1B)>\" => 'ž', // 158 in CP1252\n        \"\\x1B)?\" => 'Ÿ', // 159 in CP1252\n        \"\\x1B*0\" => ' ', // 160 in CP1252\n        \"\\x1BN!\" => '¡', // 161 in CP1252\n        \"\\x1BN\\\"\" => '¢', // 162 in CP1252\n        \"\\x1BN#\" => '£', // 163 in CP1252\n        \"\\x1BN(\" => '¤', // 164 in CP1252\n        \"\\x1BN%\" => '¥', // 165 in CP1252\n        \"\\x1B*6\" => '¦', // 166 in CP1252\n        \"\\x1BN'\" => '§', // 167 in CP1252\n        \"\\x1BNH \" => '¨', // 168 in CP1252\n        \"\\x1BNS\" => '©', // 169 in CP1252\n        \"\\x1BNc\" => 'ª', // 170 in CP1252\n        \"\\x1BN+\" => '«', // 171 in CP1252\n        \"\\x1B*<\" => '¬', // 172 in CP1252\n        \"\\x1B*=\" => '­', // 173 in CP1252\n        \"\\x1BNR\" => '®', // 174 in CP1252\n        \"\\x1B*?\" => '¯', // 175 in CP1252\n        \"\\x1BN0\" => '°', // 176 in CP1252\n        \"\\x1BN1\" => '±', // 177 in CP1252\n        \"\\x1BN2\" => '²', // 178 in CP1252\n        \"\\x1BN3\" => '³', // 179 in CP1252\n        \"\\x1BNB \" => '´', // 180 in CP1252\n        \"\\x1BN5\" => 'µ', // 181 in CP1252\n        \"\\x1BN6\" => '¶', // 182 in CP1252\n        \"\\x1BN7\" => '·', // 183 in CP1252\n        \"\\x1B+8\" => '¸', // 184 in CP1252\n        \"\\x1BNQ\" => '¹', // 185 in CP1252\n        \"\\x1BNk\" => 'º', // 186 in CP1252\n        \"\\x1BN;\" => '»', // 187 in CP1252\n        \"\\x1BN<\" => '¼', // 188 in CP1252\n        \"\\x1BN=\" => '½', // 189 in CP1252\n        \"\\x1BN>\" => '¾', // 190 in CP1252\n        \"\\x1BN?\" => '¿', // 191 in CP1252\n        \"\\x1BNAA\" => 'À', // 192 in CP1252\n        \"\\x1BNBA\" => 'Á', // 193 in CP1252\n        \"\\x1BNCA\" => 'Â', // 194 in CP1252\n        \"\\x1BNDA\" => 'Ã', // 195 in CP1252\n        \"\\x1BNHA\" => 'Ä', // 196 in CP1252\n        \"\\x1BNJA\" => 'Å', // 197 in CP1252\n        \"\\x1BNa\" => 'Æ', // 198 in CP1252\n        \"\\x1BNKC\" => 'Ç', // 199 in CP1252\n        \"\\x1BNAE\" => 'È', // 200 in CP1252\n        \"\\x1BNBE\" => 'É', // 201 in CP1252\n        \"\\x1BNCE\" => 'Ê', // 202 in CP1252\n        \"\\x1BNHE\" => 'Ë', // 203 in CP1252\n        \"\\x1BNAI\" => 'Ì', // 204 in CP1252\n        \"\\x1BNBI\" => 'Í', // 205 in CP1252\n        \"\\x1BNCI\" => 'Î', // 206 in CP1252\n        \"\\x1BNHI\" => 'Ï', // 207 in CP1252\n        \"\\x1BNb\" => 'Ð', // 208 in CP1252\n        \"\\x1BNDN\" => 'Ñ', // 209 in CP1252\n        \"\\x1BNAO\" => 'Ò', // 210 in CP1252\n        \"\\x1BNBO\" => 'Ó', // 211 in CP1252\n        \"\\x1BNCO\" => 'Ô', // 212 in CP1252\n        \"\\x1BNDO\" => 'Õ', // 213 in CP1252\n        \"\\x1BNHO\" => 'Ö', // 214 in CP1252\n        \"\\x1B-7\" => '×', // 215 in CP1252\n        \"\\x1BNi\" => 'Ø', // 216 in CP1252\n        \"\\x1BNAU\" => 'Ù', // 217 in CP1252\n        \"\\x1BNBU\" => 'Ú', // 218 in CP1252\n        \"\\x1BNCU\" => 'Û', // 219 in CP1252\n        \"\\x1BNHU\" => 'Ü', // 220 in CP1252\n        \"\\x1B-=\" => 'Ý', // 221 in CP1252\n        \"\\x1BNl\" => 'Þ', // 222 in CP1252\n        \"\\x1BN{\" => 'ß', // 223 in CP1252\n        \"\\x1BNAa\" => 'à', // 224 in CP1252\n        \"\\x1BNBa\" => 'á', // 225 in CP1252\n        \"\\x1BNCa\" => 'â', // 226 in CP1252\n        \"\\x1BNDa\" => 'ã', // 227 in CP1252\n        \"\\x1BNHa\" => 'ä', // 228 in CP1252\n        \"\\x1BNJa\" => 'å', // 229 in CP1252\n        \"\\x1BNq\" => 'æ', // 230 in CP1252\n        \"\\x1BNKc\" => 'ç', // 231 in CP1252\n        \"\\x1BNAe\" => 'è', // 232 in CP1252\n        \"\\x1BNBe\" => 'é', // 233 in CP1252\n        \"\\x1BNCe\" => 'ê', // 234 in CP1252\n        \"\\x1BNHe\" => 'ë', // 235 in CP1252\n        \"\\x1BNAi\" => 'ì', // 236 in CP1252\n        \"\\x1BNBi\" => 'í', // 237 in CP1252\n        \"\\x1BNCi\" => 'î', // 238 in CP1252\n        \"\\x1BNHi\" => 'ï', // 239 in CP1252\n        \"\\x1BNs\" => 'ð', // 240 in CP1252\n        \"\\x1BNDn\" => 'ñ', // 241 in CP1252\n        \"\\x1BNAo\" => 'ò', // 242 in CP1252\n        \"\\x1BNBo\" => 'ó', // 243 in CP1252\n        \"\\x1BNCo\" => 'ô', // 244 in CP1252\n        \"\\x1BNDo\" => 'õ', // 245 in CP1252\n        \"\\x1BNHo\" => 'ö', // 246 in CP1252\n        \"\\x1B/7\" => '÷', // 247 in CP1252\n        \"\\x1BNy\" => 'ø', // 248 in CP1252\n        \"\\x1BNAu\" => 'ù', // 249 in CP1252\n        \"\\x1BNBu\" => 'ú', // 250 in CP1252\n        \"\\x1BNCu\" => 'û', // 251 in CP1252\n        \"\\x1BNHu\" => 'ü', // 252 in CP1252\n        \"\\x1B/=\" => 'ý', // 253 in CP1252\n        \"\\x1BN|\" => 'þ', // 254 in CP1252\n        \"\\x1BNHy\" => 'ÿ', // 255 in CP1252\n    ];\n\n    /**\n     * Decimal separator.\n     */\n    protected static ?string $decimalSeparator = null;\n\n    /**\n     * Thousands separator.\n     */\n    protected static ?string $thousandsSeparator = null;\n\n    /**\n     * Currency code.\n     */\n    protected static ?string $currencyCode = null;\n\n    /**\n     * Is iconv extension available?\n     */\n    protected static ?bool $isIconvEnabled = null;\n\n    /**\n     * iconv options.\n     */\n    protected static string $iconvOptions = '//IGNORE//TRANSLIT';\n\n    /** @var string[] */\n    protected static array $iconvOptionsArray = ['//IGNORE//TRANSLIT', '//IGNORE'];\n\n    /** @internal */\n    protected static string $iconvName = 'iconv';\n\n    /** @internal */\n    protected static bool $iconvTest2 = false;\n\n    /** @internal */\n    protected static bool $iconvTest3 = false;\n\n    /**\n     * Get whether iconv extension is available.\n     */\n    public static function getIsIconvEnabled(): bool\n    {\n        if (isset(static::$isIconvEnabled)) {\n            return static::$isIconvEnabled;\n        }\n\n        // Assume no problems with iconv\n        static::$isIconvEnabled = true;\n\n        // Fail if iconv doesn't exist\n        if (!function_exists(static::$iconvName)) {\n            static::$isIconvEnabled = false;\n        } elseif (static::$iconvTest2 || !@iconv('UTF-8', 'UTF-16LE', 'x')) {\n            // Sometimes iconv is not working, and e.g. iconv('UTF-8', 'UTF-16LE', 'x') just returns false,\n            static::$isIconvEnabled = false;\n        } elseif (static::$iconvTest3 || (defined('PHP_OS') && @stristr(PHP_OS, 'AIX') && defined('ICONV_IMPL') && (@strcasecmp(ICONV_IMPL, 'unknown') == 0) && defined('ICONV_VERSION') && (@strcasecmp(ICONV_VERSION, 'unknown') == 0))) {\n            // CUSTOM: IBM AIX iconv() does not work\n            static::$isIconvEnabled = false;\n        }\n\n        // Deactivate iconv default options if they fail (as seen on IBM i-series)\n        if (static::$isIconvEnabled) {\n            static::$iconvOptions = '';\n            foreach (static::$iconvOptionsArray as $option) {\n                if (@iconv('UTF-8', 'UTF-16LE' . $option, 'x') !== false) {\n                    static::$iconvOptions = $option;\n\n                    break;\n                }\n            }\n        }\n\n        return static::$isIconvEnabled;\n    }\n\n    /**\n     * Convert from OpenXML escaped control character to PHP control character.\n     *\n     * Excel 2007 team:\n     * ----------------\n     * That's correct, control characters are stored directly in the shared-strings table.\n     * We do encode characters that cannot be represented in XML using the following escape sequence:\n     * _xHHHH_ where H represents a hexadecimal character in the character's value...\n     * So you could end up with something like _x0008_ in a string (either in a cell value (<v>)\n     * element or in the shared string <t> element.\n     *\n     * @param string $textValue Value to unescape\n     */\n    public static function controlCharacterOOXML2PHP(string $textValue): string\n    {\n        return Preg::replaceCallback('/_x[0-9A-F]{4}_(_xD[CDEF][0-9A-F]{2}_)?/', self::toOutChar(...), $textValue);\n    }\n\n    private static function toHexVal(string $char): int\n    {\n        if ($char >= '0' && $char <= '9') {\n            return ord($char) - ord('0');\n        }\n\n        return ord($char) - ord('A') + 10;\n    }\n\n    /** @param array<?string> $match */\n    private static function toOutChar(array $match): string\n    {\n        /** @var string */\n        $chars = $match[0];\n        $h = ((self::toHexVal($chars[2]) << 12)\n            | (self::toHexVal($chars[3]) << 8)\n            | (self::toHexVal($chars[4]) << 4)\n            | (self::toHexVal($chars[5])));\n        if (strlen($chars) === 7) { // no low surrogate\n            if ($chars[2] === 'D' && in_array($chars[3], ['8', '9', 'A', 'B', 'C', 'D', 'E', 'F'], true)) {\n                return '�';\n            }\n\n            return mb_chr($h, 'UTF-8');\n        }\n        if ($chars[2] === 'D' && in_array($chars[3], ['C', 'D', 'D', 'F'], true)) {\n            return '�'; // Excel interprets as one substitute, not 2\n        }\n        if ($chars[2] !== 'D' || !in_array($chars[3], ['8', '9', 'A', 'B'], true)) {\n            return mb_chr($h, 'UTF-8') . '�';\n        }\n        $l = ((self::toHexVal($chars[9]) << 12)\n            | (self::toHexVal($chars[10]) << 8)\n            | (self::toHexVal($chars[11]) << 4)\n            | (self::toHexVal($chars[12])));\n        $result = 0x10000 + ($h - 0xD800) * 0x400 + ($l - 0xDC00);\n\n        return mb_chr($result, 'UTF-8');\n    }\n\n    /**\n     * Convert from PHP control character to OpenXML escaped control character.\n     *\n     * Excel 2007 team:\n     * ----------------\n     * That's correct, control characters are stored directly in the shared-strings table.\n     * We do encode characters that cannot be represented in XML using the following escape sequence:\n     * _xHHHH_ where H represents a hexadecimal character in the character's value...\n     * So you could end up with something like _x0008_ in a string (either in a cell value (<v>)\n     * element or in the shared string <t> element.\n     *\n     * @param string $textValue Value to escape\n     */\n    public static function controlCharacterPHP2OOXML(string $textValue): string\n    {\n        $textValue = Preg::replace('/_(x[0-9A-F]{4}_)/', '_x005F_$1', $textValue);\n\n        return str_replace(self::CONTROL_CHARACTERS_KEYS, self::CONTROL_CHARACTERS_VALUES, $textValue);\n    }\n\n    /**\n     * Try to sanitize UTF8, replacing invalid sequences with Unicode substitution characters.\n     */\n    public static function sanitizeUTF8(string $textValue): string\n    {\n        $textValue = str_replace([\"\\xef\\xbf\\xbe\", \"\\xef\\xbf\\xbf\"], \"\\xef\\xbf\\xbd\", $textValue);\n        $subst = mb_substitute_character(); // default is question mark\n        mb_substitute_character(65533); // Unicode substitution character\n        $returnValue = (string) mb_convert_encoding($textValue, 'UTF-8', 'UTF-8');\n        mb_substitute_character($subst);\n\n        return $returnValue;\n    }\n\n    /**\n     * Check if a string contains UTF8 data.\n     */\n    public static function isUTF8(string $textValue): bool\n    {\n        return $textValue === self::sanitizeUTF8($textValue);\n    }\n\n    /**\n     * Formats a numeric value as a string for output in various output writers forcing\n     * point as decimal separator in case locale is other than English.\n     */\n    public static function formatNumber(float|int|string|null $numericValue): string\n    {\n        if (is_float($numericValue)) {\n            return str_replace(',', '.', (string) $numericValue);\n        }\n\n        return (string) $numericValue;\n    }\n\n    /**\n     * Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length)\n     * Writes the string using uncompressed notation, no rich text, no Asian phonetics\n     * If mbstring extension is not available, ASCII is assumed, and compressed notation is used\n     * although this will give wrong results for non-ASCII strings\n     * see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3.\n     *\n     * @param string $textValue UTF-8 encoded string\n     * @param array<int, array{strlen: int, fontidx: int}> $arrcRuns Details of rich text runs in $value\n     */\n    public static function UTF8toBIFF8UnicodeShort(string $textValue, array $arrcRuns = []): string\n    {\n        // character count\n        $ln = self::countCharacters($textValue, 'UTF-8');\n        // option flags\n        if (empty($arrcRuns)) {\n            $data = pack('CC', $ln, 0x0001);\n            // characters\n            $data .= self::convertEncoding($textValue, 'UTF-16LE', 'UTF-8');\n        } else {\n            $data = pack('vC', $ln, 0x09);\n            $data .= pack('v', count($arrcRuns));\n            // characters\n            $data .= self::convertEncoding($textValue, 'UTF-16LE', 'UTF-8');\n            foreach ($arrcRuns as $cRun) {\n                $data .= pack('v', $cRun['strlen']);\n                $data .= pack('v', $cRun['fontidx']);\n            }\n        }\n\n        return $data;\n    }\n\n    /**\n     * Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length)\n     * Writes the string using uncompressed notation, no rich text, no Asian phonetics\n     * If mbstring extension is not available, ASCII is assumed, and compressed notation is used\n     * although this will give wrong results for non-ASCII strings\n     * see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3.\n     *\n     * @param string $textValue UTF-8 encoded string\n     */\n    public static function UTF8toBIFF8UnicodeLong(string $textValue): string\n    {\n        // characters\n        $chars = self::convertEncoding($textValue, 'UTF-16LE', 'UTF-8');\n        $ln = (int) (strlen($chars) / 2);  // N.B. - strlen, not mb_strlen issue #642\n\n        return pack('vC', $ln, 0x0001) . $chars;\n    }\n\n    /**\n     * Convert string from one encoding to another.\n     *\n     * @param string $to Encoding to convert to, e.g. 'UTF-8'\n     * @param string $from Encoding to convert from, e.g. 'UTF-16LE'\n     */\n    public static function convertEncoding(string $textValue, string $to, string $from, ?string $options = null): string\n    {\n        if (static::getIsIconvEnabled()) {\n            $result = iconv($from, $to . ($options ?? static::$iconvOptions), $textValue);\n            if (false !== $result) {\n                return $result;\n            }\n        }\n\n        return (string) mb_convert_encoding($textValue, $to, $from);\n    }\n\n    /**\n     * Get character count.\n     *\n     * @param string $encoding Encoding\n     *\n     * @return int Character count\n     */\n    public static function countCharacters(string $textValue, string $encoding = 'UTF-8'): int\n    {\n        return mb_strlen($textValue, $encoding);\n    }\n\n    /**\n     * Get character count using mb_strwidth rather than mb_strlen.\n     *\n     * @param string $encoding Encoding\n     *\n     * @return int Character count\n     */\n    public static function countCharactersDbcs(string $textValue, string $encoding = 'UTF-8'): int\n    {\n        return mb_strwidth($textValue, $encoding);\n    }\n\n    /**\n     * Get a substring of a UTF-8 encoded string.\n     *\n     * @param string $textValue UTF-8 encoded string\n     * @param int $offset Start offset\n     * @param ?int $length Maximum number of characters in substring\n     */\n    public static function substring(string $textValue, int $offset, ?int $length = 0): string\n    {\n        return mb_substr($textValue, $offset, $length, 'UTF-8');\n    }\n\n    /**\n     * Convert a UTF-8 encoded string to upper case.\n     *\n     * @param string $textValue UTF-8 encoded string\n     */\n    public static function strToUpper(string $textValue): string\n    {\n        return mb_convert_case($textValue, MB_CASE_UPPER, 'UTF-8');\n    }\n\n    /**\n     * Convert a UTF-8 encoded string to lower case.\n     *\n     * @param string $textValue UTF-8 encoded string\n     */\n    public static function strToLower(string $textValue): string\n    {\n        return mb_convert_case($textValue, MB_CASE_LOWER, 'UTF-8');\n    }\n\n    /**\n     * Convert a UTF-8 encoded string to title/proper case\n     * (uppercase every first character in each word, lower case all other characters).\n     *\n     * @param string $textValue UTF-8 encoded string\n     */\n    public static function strToTitle(string $textValue): string\n    {\n        return mb_convert_case($textValue, MB_CASE_TITLE, 'UTF-8');\n    }\n\n    public static function mbIsUpper(string $character): bool\n    {\n        return mb_strtolower($character, 'UTF-8') !== $character;\n    }\n\n    /**\n     * Splits a UTF-8 string into an array of individual characters.\n     *\n     * @return string[]\n     */\n    public static function mbStrSplit(string $string): array\n    {\n        // Split at all position not after the start: ^\n        // and not before the end: $\n        $split = Preg::split('/(?<!^)(?!$)/u', $string);\n\n        return $split;\n    }\n\n    /**\n     * Reverse the case of a string, so that all uppercase characters become lowercase\n     * and all lowercase characters become uppercase.\n     *\n     * @param string $textValue UTF-8 encoded string\n     */\n    public static function strCaseReverse(string $textValue): string\n    {\n        $characters = self::mbStrSplit($textValue);\n        foreach ($characters as &$character) {\n            if (self::mbIsUpper($character)) {\n                $character = mb_strtolower($character, 'UTF-8');\n            } else {\n                $character = mb_strtoupper($character, 'UTF-8');\n            }\n        }\n\n        return implode('', $characters);\n    }\n\n    private static function useAlt(string $altValue, string $default, bool $trimAlt): string\n    {\n        return ($trimAlt ? trim($altValue) : $altValue) ?: $default;\n    }\n\n    private static function getLocaleValue(string $key, string $altKey, string $default, bool $trimAlt = false): string\n    {\n        /** @var string[] */\n        $localeconv = localeconv();\n        $rslt = $localeconv[$key];\n        // win-1252 implements Euro as 0x80 plus other symbols\n        // Not suitable for Composer\\Pcre\\Preg\n        if (preg_match('//u', $rslt) !== 1) {\n            $rslt = '';\n        }\n\n        return $rslt ?: self::useAlt($localeconv[$altKey], $default, $trimAlt);\n    }\n\n    /**\n     * Get the decimal separator. If it has not yet been set explicitly, try to obtain number\n     * formatting information from locale.\n     */\n    public static function getDecimalSeparator(): string\n    {\n        if (!isset(static::$decimalSeparator)) {\n            static::$decimalSeparator = self::getLocaleValue('decimal_point', 'mon_decimal_point', '.');\n        }\n\n        return static::$decimalSeparator;\n    }\n\n    /**\n     * Set the decimal separator. Only used by NumberFormat::toFormattedString()\n     * to format output by \\PhpOffice\\PhpSpreadsheet\\Writer\\Html and \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf.\n     *\n     * @param ?string $separator Character for decimal separator\n     */\n    public static function setDecimalSeparator(?string $separator): void\n    {\n        static::$decimalSeparator = $separator;\n    }\n\n    /**\n     * Get the thousands separator. If it has not yet been set explicitly, try to obtain number\n     * formatting information from locale.\n     */\n    public static function getThousandsSeparator(): string\n    {\n        if (!isset(static::$thousandsSeparator)) {\n            static::$thousandsSeparator = self::getLocaleValue('thousands_sep', 'mon_thousands_sep', ',');\n        }\n\n        return static::$thousandsSeparator;\n    }\n\n    /**\n     * Set the thousands separator. Only used by NumberFormat::toFormattedString()\n     * to format output by \\PhpOffice\\PhpSpreadsheet\\Writer\\Html and \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf.\n     *\n     * @param ?string $separator Character for thousands separator\n     */\n    public static function setThousandsSeparator(?string $separator): void\n    {\n        static::$thousandsSeparator = $separator;\n    }\n\n    /**\n     *    Get the currency code. If it has not yet been set explicitly, try to obtain the\n     *        symbol information from locale.\n     */\n    public static function getCurrencyCode(bool $trimAlt = false): string\n    {\n        if (!isset(static::$currencyCode)) {\n            static::$currencyCode = self::getLocaleValue('currency_symbol', 'int_curr_symbol', '$', $trimAlt);\n        }\n\n        return static::$currencyCode;\n    }\n\n    /**\n     * Set the currency code. Only used by NumberFormat::toFormattedString()\n     *        to format output by \\PhpOffice\\PhpSpreadsheet\\Writer\\Html and \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf.\n     *\n     * @param ?string $currencyCode Character for currency code\n     */\n    public static function setCurrencyCode(?string $currencyCode): void\n    {\n        static::$currencyCode = $currencyCode;\n    }\n\n    /**\n     * Convert SYLK encoded string to UTF-8.\n     *\n     * @param string $textValue SYLK encoded string\n     *\n     * @return string UTF-8 encoded string\n     */\n    public static function SYLKtoUTF8(string $textValue): string\n    {\n        // If there is no escape character in the string there is nothing to do\n        if (!str_contains($textValue, \"\\x1b\")) {\n            return $textValue;\n        }\n\n        foreach (self::SYLK_CHARACTERS as $k => $v) {\n            $textValue = str_replace($k, $v, $textValue);\n        }\n\n        return $textValue;\n    }\n\n    /**\n     * Retrieve any leading numeric part of a string, or return the full string if no leading numeric\n     * (handles basic integer or float, but not exponent or non decimal).\n     *\n     * @return float|string string or only the leading numeric part of the string\n     */\n    public static function testStringAsNumeric(string $textValue): float|string\n    {\n        if (is_numeric($textValue)) {\n            return $textValue;\n        }\n        $v = (float) $textValue;\n\n        return (is_numeric(substr($textValue, 0, strlen((string) $v)))) ? $v : $textValue;\n    }\n\n    public static function strlenAllowNull(?string $string): int\n    {\n        return strlen(\"$string\");\n    }\n\n    /**\n     * @param bool $convertBool If true, convert bool to locale-aware TRUE/FALSE rather than 1/null-string\n     * @param bool $lessFloatPrecision If true, floats will be converted to a more human-friendly but less computationally accurate value\n     */\n    public static function convertToString(mixed $value, bool $throw = true, string $default = '', bool $convertBool = false, bool $lessFloatPrecision = false): string\n    {\n        if ($convertBool && is_bool($value)) {\n            return $value ? Calculation::getTRUE() : Calculation::getFALSE();\n        }\n        if (is_float($value) && !$lessFloatPrecision) {\n            $string = (string) $value;\n            // look out for scientific notation\n            if (!Preg::isMatch('/[^-+0-9.]/', $string)) {\n                $minus = $value < 0 ? '-' : '';\n                $positive = abs($value);\n                $floor = floor($positive);\n                $oldFrac = (string) ($positive - $floor);\n                $frac = Preg::replace('/^0[.](\\d+)$/', '$1', $oldFrac);\n                if ($frac !== $oldFrac) {\n                    return \"$minus$floor.$frac\";\n                }\n            }\n\n            return $string;\n        }\n        if ($value === null || is_scalar($value) || $value instanceof Stringable) {\n            return (string) $value;\n        }\n\n        if ($throw) {\n            throw new SpreadsheetException('Unable to convert to string');\n        }\n\n        return $default;\n    }\n\n    /**\n     * Assist with POST items when samples are run in browser.\n     * Never run as part of unit tests, which are command line.\n     *\n     * @codeCoverageIgnore\n     */\n    public static function convertPostToString(string $index, string $default = ''): string\n    {\n        if (isset($_POST[$index])) {\n            return htmlentities(self::convertToString($_POST[$index], false, $default));\n        }\n\n        return $default;\n    }\n\n    /**\n     * Php introduced str_increment with Php8.3,\n     * but didn't issue deprecation notices till 8.5.\n     *\n     * @codeCoverageIgnore\n     */\n    public static function stringIncrement(string &$str): string\n    {\n        if (function_exists('str_increment')) {\n            $str = str_increment($str); // @phpstan-ignore-line\n        } else {\n            ++$str; // @phpstan-ignore-line\n        }\n\n        return $str; // @phpstan-ignore-line\n    }\n\n    /** @internal */\n    protected static string $testClass = IntlCalendar::class;\n\n    /**\n     * Set all of currencyCode, thousandsSeparator, decimalSeparator,\n     * and Calculation locale with a single call.\n     * The main point here is avoid the use of Php setlocale,\n     * which is not threadsafe. It uses the Intl extension instead,\n     * which is not a requirement for PhpSpreadsheet.\n     * Because of that, the function returns a bool which will\n     * be false if Intl is not available, or the supplied locale\n     * is not valid according to Intl.\n     */\n    public static function setLocale(?string $locale): bool\n    {\n        if ($locale === null) {\n            self::$currencyCode = null;\n            self::$thousandsSeparator = null;\n            self::$decimalSeparator = null;\n            Calculation::getInstance()->setLocale('en_us');\n\n            return true;\n        }\n        $localeCalc = $locale;\n        if (Preg::isMatch('/^([a-z][a-z])_([a-z][a-z])(?:[.]utf-8)?$/i', $locale, $matches)) {\n            $locale = strtolower($matches[1]) . '_' . strtoupper($matches[2]);\n            $localeCalc = strtolower($matches[1]) . '_' . strtolower($matches[2]);\n        }\n        if (!class_exists(static::$testClass)) {\n            return false;\n        }\n        // NumberFormatter constructor succeeds even with\n        // bad locale before Php8.4, so try to validate\n        // the locale beforehand.\n        $locales = IntlCalendar::getAvailableLocales();\n        if (!in_array($locale, $locales, true)) {\n            return false;\n        }\n        $formatter = new NumberFormatter(\n            $locale,\n            NumberFormatter::CURRENCY\n        );\n        $currency = $formatter->getSymbol(\n            NumberFormatter::CURRENCY_SYMBOL\n        );\n        $formatter = new NumberFormatter(\n            $locale,\n            NumberFormatter::DECIMAL\n        );\n        $thousands = $formatter->getSymbol(\n            NumberFormatter::GROUPING_SEPARATOR_SYMBOL\n        );\n        $decimal = $formatter->getSymbol(\n            NumberFormatter::DECIMAL_SEPARATOR_SYMBOL\n        );\n        self::$currencyCode = $currency;\n        self::$thousandsSeparator = $thousands;\n        self::$decimalSeparator = $decimal;\n        Calculation::getInstance()->setLocale($localeCalc);\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/TimeZone.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass TimeZone\n{\n    /**\n     * Default Timezone used for date/time conversions.\n     */\n    protected static string $timezone = 'UTC';\n\n    /**\n     * Validate a Timezone name.\n     *\n     * @param string $timezoneName Time zone (e.g. 'Europe/London')\n     *\n     * @return bool Success or failure\n     */\n    private static function validateTimeZone(string $timezoneName): bool\n    {\n        return in_array($timezoneName, DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC), true);\n    }\n\n    /**\n     * Set the Default Timezone used for date/time conversions.\n     *\n     * @param string $timezoneName Time zone (e.g. 'Europe/London')\n     *\n     * @return bool Success or failure\n     */\n    public static function setTimeZone(string $timezoneName): bool\n    {\n        if (self::validateTimeZone($timezoneName)) {\n            self::$timezone = $timezoneName;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Return the Default Timezone used for date/time conversions.\n     *\n     * @return string Timezone (e.g. 'Europe/London')\n     */\n    public static function getTimeZone(): string\n    {\n        return self::$timezone;\n    }\n\n    /**\n     *    Return the Timezone offset used for date/time conversions to/from UST\n     * This requires both the timezone and the calculated date/time to allow for local DST.\n     *\n     * @param ?string $timezoneName The timezone for finding the adjustment to UST\n     * @param float|int $timestamp PHP date/time value\n     *\n     * @return int Number of seconds for timezone adjustment\n     */\n    public static function getTimeZoneAdjustment(?string $timezoneName, $timestamp): int\n    {\n        $timezoneName = $timezoneName ?? self::$timezone;\n        $dtobj = Date::dateTimeFromTimestamp(\"$timestamp\");\n        if (!self::validateTimeZone($timezoneName)) {\n            throw new PhpSpreadsheetException(\"Invalid timezone $timezoneName\");\n        }\n        $dtobj->setTimeZone(new DateTimeZone($timezoneName));\n\n        return $dtobj->getOffset();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Trend/BestFit.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Trend;\n\nabstract class BestFit\n{\n    /**\n     * Indicator flag for a calculation error.\n     */\n    protected bool $error = false;\n\n    /**\n     * Algorithm type to use for best-fit.\n     */\n    protected string $bestFitType = 'undetermined';\n\n    /**\n     * Number of entries in the sets of x- and y-value arrays.\n     */\n    protected int $valueCount;\n\n    /**\n     * X-value dataseries of values.\n     *\n     * @var float[]\n     */\n    protected array $xValues = [];\n\n    /**\n     * Y-value dataseries of values.\n     *\n     * @var float[]\n     */\n    protected array $yValues = [];\n\n    /**\n     * Flag indicating whether values should be adjusted to Y=0.\n     */\n    protected bool $adjustToZero = false;\n\n    /**\n     * Y-value series of best-fit values.\n     *\n     * @var float[]\n     */\n    protected array $yBestFitValues = [];\n\n    protected float $goodnessOfFit = 1;\n\n    protected float $stdevOfResiduals = 0;\n\n    protected float $covariance = 0;\n\n    protected float $correlation = 0;\n\n    protected float $SSRegression = 0;\n\n    protected float $SSResiduals = 0;\n\n    protected float $DFResiduals = 0;\n\n    protected float $f = 0;\n\n    protected float $slope = 0;\n\n    protected float $slopeSE = 0;\n\n    protected float $intersect = 0;\n\n    protected float $intersectSE = 0;\n\n    protected float $xOffset = 0;\n\n    protected float $yOffset = 0;\n\n    public function getError(): bool\n    {\n        return $this->error;\n    }\n\n    public function getBestFitType(): string\n    {\n        return $this->bestFitType;\n    }\n\n    /**\n     * Return the Y-Value for a specified value of X.\n     *\n     * @param float $xValue X-Value\n     *\n     * @return float Y-Value\n     */\n    abstract public function getValueOfYForX(float $xValue): float;\n\n    /**\n     * Return the X-Value for a specified value of Y.\n     *\n     * @param float $yValue Y-Value\n     *\n     * @return float X-Value\n     */\n    abstract public function getValueOfXForY(float $yValue): float;\n\n    /**\n     * Return the original set of X-Values.\n     *\n     * @return float[] X-Values\n     */\n    public function getXValues(): array\n    {\n        return $this->xValues;\n    }\n\n    /**\n     * Return the original set of Y-Values.\n     *\n     * @return float[] Y-Values\n     */\n    public function getYValues(): array\n    {\n        return $this->yValues;\n    }\n\n    /**\n     * Return the Equation of the best-fit line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    abstract public function getEquation(int $dp = 0): string;\n\n    /**\n     * Return the Slope of the line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getSlope(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->slope, $dp);\n        }\n\n        return $this->slope;\n    }\n\n    /**\n     * Return the standard error of the Slope.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getSlopeSE(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->slopeSE, $dp);\n        }\n\n        return $this->slopeSE;\n    }\n\n    /**\n     * Return the Value of X where it intersects Y = 0.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getIntersect(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->intersect, $dp);\n        }\n\n        return $this->intersect;\n    }\n\n    /**\n     * Return the standard error of the Intersect.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getIntersectSE(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->intersectSE, $dp);\n        }\n\n        return $this->intersectSE;\n    }\n\n    /**\n     * Return the goodness of fit for this regression.\n     *\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getGoodnessOfFit(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->goodnessOfFit, $dp);\n        }\n\n        return $this->goodnessOfFit;\n    }\n\n    /**\n     * Return the goodness of fit for this regression.\n     *\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getGoodnessOfFitPercent(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->goodnessOfFit * 100, $dp);\n        }\n\n        return $this->goodnessOfFit * 100;\n    }\n\n    /**\n     * Return the standard deviation of the residuals for this regression.\n     *\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getStdevOfResiduals(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->stdevOfResiduals, $dp);\n        }\n\n        return $this->stdevOfResiduals;\n    }\n\n    /**\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getSSRegression(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->SSRegression, $dp);\n        }\n\n        return $this->SSRegression;\n    }\n\n    /**\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getSSResiduals(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->SSResiduals, $dp);\n        }\n\n        return $this->SSResiduals;\n    }\n\n    /**\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getDFResiduals(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->DFResiduals, $dp);\n        }\n\n        return $this->DFResiduals;\n    }\n\n    /**\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getF(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->f, $dp);\n        }\n\n        return $this->f;\n    }\n\n    /**\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getCovariance(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->covariance, $dp);\n        }\n\n        return $this->covariance;\n    }\n\n    /**\n     * @param int $dp Number of places of decimal precision to return\n     */\n    public function getCorrelation(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round($this->correlation, $dp);\n        }\n\n        return $this->correlation;\n    }\n\n    /**\n     * @return float[]\n     */\n    public function getYBestFitValues(): array\n    {\n        return $this->yBestFitValues;\n    }\n\n    protected function calculateGoodnessOfFit(float $sumX, float $sumY, float $sumX2, float $sumY2, float $sumXY, float $meanX, float $meanY, bool|int $const): void\n    {\n        $SSres = $SScov = $SStot = $SSsex = 0.0;\n        foreach ($this->xValues as $xKey => $xValue) {\n            $bestFitY = $this->yBestFitValues[$xKey] = $this->getValueOfYForX($xValue);\n\n            $SSres += ($this->yValues[$xKey] - $bestFitY) * ($this->yValues[$xKey] - $bestFitY);\n            if ($const === true) {\n                $SStot += ($this->yValues[$xKey] - $meanY) * ($this->yValues[$xKey] - $meanY);\n            } else {\n                $SStot += $this->yValues[$xKey] * $this->yValues[$xKey];\n            }\n            $SScov += ($this->xValues[$xKey] - $meanX) * ($this->yValues[$xKey] - $meanY);\n            if ($const === true) {\n                $SSsex += ($this->xValues[$xKey] - $meanX) * ($this->xValues[$xKey] - $meanX);\n            } else {\n                $SSsex += $this->xValues[$xKey] * $this->xValues[$xKey];\n            }\n        }\n\n        $this->SSResiduals = $SSres;\n        $this->DFResiduals = $this->valueCount - 1 - ($const === true ? 1 : 0);\n\n        if ($this->DFResiduals == 0.0) {\n            $this->stdevOfResiduals = 0.0;\n        } else {\n            $this->stdevOfResiduals = sqrt($SSres / $this->DFResiduals);\n        }\n\n        if ($SStot == 0.0 || $SSres == $SStot) {\n            $this->goodnessOfFit = 1;\n        } else {\n            $this->goodnessOfFit = 1 - ($SSres / $SStot);\n        }\n\n        $this->SSRegression = $this->goodnessOfFit * $SStot;\n        $this->covariance = $SScov / $this->valueCount;\n        $this->correlation = ($this->valueCount * $sumXY - $sumX * $sumY) / sqrt(($this->valueCount * $sumX2 - $sumX ** 2) * ($this->valueCount * $sumY2 - $sumY ** 2));\n        $this->slopeSE = $this->stdevOfResiduals / sqrt($SSsex);\n        $this->intersectSE = $this->stdevOfResiduals * sqrt(1 / ($this->valueCount - ($sumX * $sumX) / $sumX2));\n        if ($this->SSResiduals != 0.0) {\n            if ($this->DFResiduals == 0.0) {\n                $this->f = 0.0;\n            } else {\n                $this->f = $this->SSRegression / ($this->SSResiduals / $this->DFResiduals);\n            }\n        } else {\n            if ($this->DFResiduals == 0.0) {\n                $this->f = 0.0;\n            } else {\n                $this->f = $this->SSRegression / $this->DFResiduals;\n            }\n        }\n    }\n\n    /**\n     * @param array<float|int> $values\n     *\n     * @return float|int\n     */\n    private function sumSquares(array $values)\n    {\n        return array_sum(\n            array_map(\n                fn ($value): float|int => $value ** 2,\n                $values\n            )\n        );\n    }\n\n    /**\n     * @param float[] $yValues\n     * @param float[] $xValues\n     */\n    protected function leastSquareFit(array $yValues, array $xValues, bool $const): void\n    {\n        // calculate sums\n        $sumValuesX = array_sum($xValues);\n        $sumValuesY = array_sum($yValues);\n        $meanValueX = $sumValuesX / $this->valueCount;\n        $meanValueY = $sumValuesY / $this->valueCount;\n        $sumSquaresX = $this->sumSquares($xValues);\n        $sumSquaresY = $this->sumSquares($yValues);\n        $mBase = $mDivisor = 0.0;\n        $xy_sum = 0.0;\n        for ($i = 0; $i < $this->valueCount; ++$i) {\n            $xy_sum += $xValues[$i] * $yValues[$i];\n\n            if ($const === true) {\n                $mBase += ($xValues[$i] - $meanValueX) * ($yValues[$i] - $meanValueY);\n                $mDivisor += ($xValues[$i] - $meanValueX) * ($xValues[$i] - $meanValueX);\n            } else {\n                $mBase += $xValues[$i] * $yValues[$i];\n                $mDivisor += $xValues[$i] * $xValues[$i];\n            }\n        }\n\n        // calculate slope\n        $this->slope = $mBase / $mDivisor;\n\n        // calculate intersect\n        $this->intersect = ($const === true) ? $meanValueY - ($this->slope * $meanValueX) : 0.0;\n\n        $this->calculateGoodnessOfFit($sumValuesX, $sumValuesY, $sumSquaresX, $sumSquaresY, $xy_sum, $meanValueX, $meanValueY, $const);\n    }\n\n    /**\n     * Define the regression.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    public function __construct(array $yValues, array $xValues = [])\n    {\n        //    Calculate number of points\n        $yValueCount = count($yValues);\n        $xValueCount = count($xValues);\n\n        //    Define X Values if necessary\n        if ($xValueCount === 0) {\n            $xValues = range(1.0, $yValueCount);\n        } elseif ($yValueCount !== $xValueCount) {\n            //    Ensure both arrays of points are the same size\n            $this->error = true;\n        }\n\n        $this->valueCount = $yValueCount;\n        $this->xValues = $xValues;\n        $this->yValues = $yValues;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Trend;\n\nclass ExponentialBestFit extends BestFit\n{\n    /**\n     * Algorithm type to use for best-fit\n     * (Name of this Trend class).\n     */\n    protected string $bestFitType = 'exponential';\n\n    /**\n     * Return the Y-Value for a specified value of X.\n     *\n     * @param float $xValue X-Value\n     *\n     * @return float Y-Value\n     */\n    public function getValueOfYForX(float $xValue): float\n    {\n        return $this->getIntersect() * $this->getSlope() ** ($xValue - $this->xOffset);\n    }\n\n    /**\n     * Return the X-Value for a specified value of Y.\n     *\n     * @param float $yValue Y-Value\n     *\n     * @return float X-Value\n     */\n    public function getValueOfXForY(float $yValue): float\n    {\n        return log(($yValue + $this->yOffset) / $this->getIntersect()) / log($this->getSlope());\n    }\n\n    /**\n     * Return the Equation of the best-fit line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getEquation(int $dp = 0): string\n    {\n        $slope = $this->getSlope($dp);\n        $intersect = $this->getIntersect($dp);\n\n        return 'Y = ' . $intersect . ' * ' . $slope . '^X';\n    }\n\n    /**\n     * Return the Slope of the line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getSlope(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round(exp($this->slope), $dp);\n        }\n\n        return exp($this->slope);\n    }\n\n    /**\n     * Return the Value of X where it intersects Y = 0.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getIntersect(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round(exp($this->intersect), $dp);\n        }\n\n        return exp($this->intersect);\n    }\n\n    /**\n     * Execute the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    private function exponentialRegression(array $yValues, array $xValues, bool $const): void\n    {\n        $adjustedYValues = array_map(\n            fn ($value): float => ($value < 0.0) ? 0 - log(abs($value)) : log($value),\n            $yValues\n        );\n\n        $this->leastSquareFit($adjustedYValues, $xValues, $const);\n    }\n\n    /**\n     * Define the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    public function __construct(array $yValues, array $xValues = [], bool $const = true)\n    {\n        parent::__construct($yValues, $xValues);\n\n        if (!$this->error) {\n            $this->exponentialRegression($yValues, $xValues, (bool) $const);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Trend;\n\nclass LinearBestFit extends BestFit\n{\n    /**\n     * Algorithm type to use for best-fit\n     * (Name of this Trend class).\n     */\n    protected string $bestFitType = 'linear';\n\n    /**\n     * Return the Y-Value for a specified value of X.\n     *\n     * @param float $xValue X-Value\n     *\n     * @return float Y-Value\n     */\n    public function getValueOfYForX(float $xValue): float\n    {\n        return $this->getIntersect() + $this->getSlope() * $xValue;\n    }\n\n    /**\n     * Return the X-Value for a specified value of Y.\n     *\n     * @param float $yValue Y-Value\n     *\n     * @return float X-Value\n     */\n    public function getValueOfXForY(float $yValue): float\n    {\n        return ($yValue - $this->getIntersect()) / $this->getSlope();\n    }\n\n    /**\n     * Return the Equation of the best-fit line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getEquation(int $dp = 0): string\n    {\n        $slope = $this->getSlope($dp);\n        $intersect = $this->getIntersect($dp);\n\n        return 'Y = ' . $intersect . ' + ' . $slope . ' * X';\n    }\n\n    /**\n     * Execute the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    private function linearRegression(array $yValues, array $xValues, bool $const): void\n    {\n        $this->leastSquareFit($yValues, $xValues, $const);\n    }\n\n    /**\n     * Define the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    public function __construct(array $yValues, array $xValues = [], bool $const = true)\n    {\n        parent::__construct($yValues, $xValues);\n\n        if (!$this->error) {\n            $this->linearRegression($this->yValues, $this->xValues, (bool) $const);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Trend;\n\nclass LogarithmicBestFit extends BestFit\n{\n    /**\n     * Algorithm type to use for best-fit\n     * (Name of this Trend class).\n     */\n    protected string $bestFitType = 'logarithmic';\n\n    /**\n     * Return the Y-Value for a specified value of X.\n     *\n     * @param float $xValue X-Value\n     *\n     * @return float Y-Value\n     */\n    public function getValueOfYForX(float $xValue): float\n    {\n        return $this->getIntersect() + $this->getSlope() * log($xValue - $this->xOffset);\n    }\n\n    /**\n     * Return the X-Value for a specified value of Y.\n     *\n     * @param float $yValue Y-Value\n     *\n     * @return float X-Value\n     */\n    public function getValueOfXForY(float $yValue): float\n    {\n        return exp(($yValue - $this->getIntersect()) / $this->getSlope());\n    }\n\n    /**\n     * Return the Equation of the best-fit line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getEquation(int $dp = 0): string\n    {\n        $slope = $this->getSlope($dp);\n        $intersect = $this->getIntersect($dp);\n\n        return 'Y = ' . $slope . ' * log(' . $intersect . ' * X)';\n    }\n\n    /**\n     * Execute the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    private function logarithmicRegression(array $yValues, array $xValues, bool $const): void\n    {\n        $adjustedYValues = array_map(\n            fn ($value): float => ($value < 0.0) ? 0 - log(abs($value)) : log($value),\n            $yValues\n        );\n\n        $this->leastSquareFit($adjustedYValues, $xValues, $const);\n    }\n\n    /**\n     * Define the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    public function __construct(array $yValues, array $xValues = [], bool $const = true)\n    {\n        parent::__construct($yValues, $xValues);\n\n        if (!$this->error) {\n            $this->logarithmicRegression($yValues, $xValues, (bool) $const);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Trend;\n\nuse Matrix\\Matrix;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\n\n// Phpstan and Scrutinizer seem to have legitimate complaints.\n// $this->slope is specified where an array is expected in several places.\n// But it seems that it should always be float.\n// This code is probably not exercised at all in unit tests.\n// Private bool property $implemented is set to indicate\n//     whether this implementation is correct.\nclass PolynomialBestFit extends BestFit\n{\n    /**\n     * Algorithm type to use for best-fit\n     * (Name of this Trend class).\n     */\n    protected string $bestFitType = 'polynomial';\n\n    /**\n     * Polynomial order.\n     */\n    protected int $order = 0;\n\n    private bool $implemented = false;\n\n    /**\n     * Return the order of this polynomial.\n     */\n    public function getOrder(): int\n    {\n        return $this->order;\n    }\n\n    /**\n     * Return the Y-Value for a specified value of X.\n     *\n     * @param float $xValue X-Value\n     *\n     * @return float Y-Value\n     */\n    public function getValueOfYForX(float $xValue): float\n    {\n        $retVal = $this->getIntersect();\n        $slope = $this->getSlope();\n        // Phpstan and Scrutinizer are both correct - getSlope returns float, not array.\n        // @phpstan-ignore-next-line\n        foreach ($slope as $key => $value) {\n            /** @var float $value */\n            if ($value != 0.0) {\n                /** @var int $key */\n                $retVal += $value * $xValue ** ($key + 1);\n            }\n        }\n\n        return $retVal;\n    }\n\n    /**\n     * Return the X-Value for a specified value of Y.\n     *\n     * @param float $yValue Y-Value\n     *\n     * @return float X-Value\n     */\n    public function getValueOfXForY(float $yValue): float\n    {\n        return ($yValue - $this->getIntersect()) / $this->getSlope();\n    }\n\n    /**\n     * Return the Equation of the best-fit line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getEquation(int $dp = 0): string\n    {\n        $slope = $this->getSlope($dp);\n        $intersect = $this->getIntersect($dp);\n\n        $equation = 'Y = ' . $intersect;\n        // Phpstan and Scrutinizer are both correct - getSlope returns float, not array.\n        // @phpstan-ignore-next-line\n        foreach ($slope as $key => $value) {\n            /** @var float|int $value */\n            if ($value != 0.0) {\n                $equation .= ' + ' . $value . ' * X';\n                /** @var int $key */\n                if ($key > 0) {\n                    $equation .= '^' . ($key + 1);\n                }\n            }\n        }\n\n        return $equation;\n    }\n\n    /**\n     * Return the Slope of the line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getSlope(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            $coefficients = [];\n            //* @phpstan-ignore-next-line\n            foreach ($this->slope as $coefficient) {\n                /** @var float|int $coefficient */\n                $coefficients[] = round($coefficient, $dp);\n            }\n\n            // @phpstan-ignore-next-line\n            return $coefficients;\n        }\n\n        return $this->slope;\n    }\n\n    /** @return array<float|int> */\n    public function getCoefficients(int $dp = 0): array\n    {\n        // Phpstan and Scrutinizer are both correct - getSlope returns float, not array.\n        // @phpstan-ignore-next-line\n        return array_merge([$this->getIntersect($dp)], $this->getSlope($dp));\n    }\n\n    /**\n     * Execute the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param int $order Order of Polynomial for this regression\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    private function polynomialRegression(int $order, array $yValues, array $xValues): void\n    {\n        // calculate sums\n        $x_sum = array_sum($xValues);\n        $y_sum = array_sum($yValues);\n        $xx_sum = $xy_sum = $yy_sum = 0;\n        for ($i = 0; $i < $this->valueCount; ++$i) {\n            $xy_sum += $xValues[$i] * $yValues[$i];\n            $xx_sum += $xValues[$i] * $xValues[$i];\n            $yy_sum += $yValues[$i] * $yValues[$i];\n        }\n        /*\n         *    This routine uses logic from the PHP port of polyfit version 0.1\n         *    written by Michael Bommarito and Paul Meagher\n         *\n         *    The function fits a polynomial function of order $order through\n         *    a series of x-y data points using least squares.\n         *\n         */\n        $A = [];\n        $B = [];\n        for ($i = 0; $i < $this->valueCount; ++$i) {\n            for ($j = 0; $j <= $order; ++$j) {\n                $A[$i][$j] = $xValues[$i] ** $j;\n            }\n        }\n        for ($i = 0; $i < $this->valueCount; ++$i) {\n            $B[$i] = [$yValues[$i]];\n        }\n        $matrixA = new Matrix($A);\n        $matrixB = new Matrix($B);\n        $C = $matrixA->solve($matrixB);\n\n        $coefficients = [];\n        for ($i = 0; $i < $C->rows; ++$i) {\n            $r = $C->getValue($i + 1, 1); // row and column are origin-1\n            if (!is_numeric($r) || abs($r + 0) <= 10 ** (-9)) {\n                $r = 0;\n            } else {\n                $r += 0;\n            }\n            $coefficients[] = $r;\n        }\n\n        $this->intersect = (float) array_shift($coefficients);\n        // Phpstan is correct\n        //* @phpstan-ignore-next-line\n        $this->slope = $coefficients;\n\n        $this->calculateGoodnessOfFit($x_sum, $y_sum, $xx_sum, $yy_sum, $xy_sum, 0, 0, 0);\n        foreach ($this->xValues as $xKey => $xValue) {\n            $this->yBestFitValues[$xKey] = $this->getValueOfYForX($xValue);\n        }\n    }\n\n    /**\n     * Define the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param int $order Order of Polynomial for this regression\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    public function __construct(int $order, array $yValues, array $xValues = [])\n    {\n        if (!$this->implemented) {\n            throw new SpreadsheetException('Polynomial Best Fit not yet implemented');\n        }\n\n        parent::__construct($yValues, $xValues);\n\n        if (!$this->error) {\n            if ($order < $this->valueCount) {\n                $this->bestFitType .= '_' . $order;\n                $this->order = $order;\n                $this->polynomialRegression($order, $yValues, $xValues);\n                if (($this->getGoodnessOfFit() < 0.0) || ($this->getGoodnessOfFit() > 1.0)) {\n                    $this->error = true;\n                }\n            } else {\n                $this->error = true;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Trend;\n\nclass PowerBestFit extends BestFit\n{\n    /**\n     * Algorithm type to use for best-fit\n     * (Name of this Trend class).\n     */\n    protected string $bestFitType = 'power';\n\n    /**\n     * Return the Y-Value for a specified value of X.\n     *\n     * @param float $xValue X-Value\n     *\n     * @return float Y-Value\n     */\n    public function getValueOfYForX(float $xValue): float\n    {\n        return $this->getIntersect() * ($xValue - $this->xOffset) ** $this->getSlope();\n    }\n\n    /**\n     * Return the X-Value for a specified value of Y.\n     *\n     * @param float $yValue Y-Value\n     *\n     * @return float X-Value\n     */\n    public function getValueOfXForY(float $yValue): float\n    {\n        return (($yValue + $this->yOffset) / $this->getIntersect()) ** (1 / $this->getSlope());\n    }\n\n    /**\n     * Return the Equation of the best-fit line.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getEquation(int $dp = 0): string\n    {\n        $slope = $this->getSlope($dp);\n        $intersect = $this->getIntersect($dp);\n\n        return 'Y = ' . $intersect . ' * X^' . $slope;\n    }\n\n    /**\n     * Return the Value of X where it intersects Y = 0.\n     *\n     * @param int $dp Number of places of decimal precision to display\n     */\n    public function getIntersect(int $dp = 0): float\n    {\n        if ($dp != 0) {\n            return round(exp($this->intersect), $dp);\n        }\n\n        return exp($this->intersect);\n    }\n\n    /**\n     * Execute the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    private function powerRegression(array $yValues, array $xValues, bool $const): void\n    {\n        $adjustedYValues = array_map(\n            fn ($value): float => ($value < 0.0) ? 0 - log(abs($value)) : log($value),\n            $yValues\n        );\n        $adjustedXValues = array_map(\n            fn ($value): float => ($value < 0.0) ? 0 - log(abs($value)) : log($value),\n            $xValues\n        );\n\n        $this->leastSquareFit($adjustedYValues, $adjustedXValues, $const);\n    }\n\n    /**\n     * Define the regression and calculate the goodness of fit for a set of X and Y data values.\n     *\n     * @param float[] $yValues The set of Y-values for this regression\n     * @param float[] $xValues The set of X-values for this regression\n     */\n    public function __construct(array $yValues, array $xValues = [], bool $const = true)\n    {\n        parent::__construct($yValues, $xValues);\n\n        if (!$this->error) {\n            $this->powerRegression($yValues, $xValues, (bool) $const);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Trend/Trend.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared\\Trend;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\n\nclass Trend\n{\n    const TREND_LINEAR = 'Linear';\n    const TREND_LOGARITHMIC = 'Logarithmic';\n    const TREND_EXPONENTIAL = 'Exponential';\n    const TREND_POWER = 'Power';\n    const TREND_POLYNOMIAL_2 = 'Polynomial_2';\n    const TREND_POLYNOMIAL_3 = 'Polynomial_3';\n    const TREND_POLYNOMIAL_4 = 'Polynomial_4';\n    const TREND_POLYNOMIAL_5 = 'Polynomial_5';\n    const TREND_POLYNOMIAL_6 = 'Polynomial_6';\n    const TREND_BEST_FIT = 'Bestfit';\n    const TREND_BEST_FIT_NO_POLY = 'Bestfit_no_Polynomials';\n\n    /**\n     * Names of the best-fit Trend analysis methods.\n     */\n    private const TREND_TYPES = [\n        self::TREND_LINEAR,\n        self::TREND_LOGARITHMIC,\n        self::TREND_EXPONENTIAL,\n        self::TREND_POWER,\n    ];\n\n    /**\n     * Names of the best-fit Trend polynomial orders.\n     *\n     * @var string[]\n     */\n    private static array $trendTypePolynomialOrders = [\n        self::TREND_POLYNOMIAL_2,\n        self::TREND_POLYNOMIAL_3,\n        self::TREND_POLYNOMIAL_4,\n        self::TREND_POLYNOMIAL_5,\n        self::TREND_POLYNOMIAL_6,\n    ];\n\n    /**\n     * Cached results for each method when trying to identify which provides the best fit.\n     *\n     * @var BestFit[]\n     */\n    private static array $trendCache = [];\n\n    /**\n     * @param mixed[] $yValues\n     * @param mixed[] $xValues\n     */\n    public static function calculate(string $trendType = self::TREND_BEST_FIT, array $yValues = [], array $xValues = [], bool $const = true): BestFit\n    {\n        //    Calculate number of points in each dataset\n        /** @var float[] $xValues */\n        $nY = count($yValues);\n        /** @var float[] $xValues */\n        $nX = count($xValues);\n\n        //    Define X Values if necessary\n        if ($nX === 0) {\n            $xValues = range(1, $nY);\n        } elseif ($nY !== $nX) {\n            //    Ensure both arrays of points are the same size\n            throw new SpreadsheetException('Trend(): Number of elements in coordinate arrays do not match.');\n        }\n\n        $key = md5($trendType . $const . serialize($yValues) . serialize($xValues));\n        //    Determine which Trend method has been requested\n        switch ($trendType) {\n            //    Instantiate and return the class for the requested Trend method\n            case self::TREND_LINEAR:\n            case self::TREND_LOGARITHMIC:\n            case self::TREND_EXPONENTIAL:\n            case self::TREND_POWER:\n                if (!isset(self::$trendCache[$key])) {\n                    /** @var float[] $yValues */\n                    $className = '\\PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\\\' . $trendType . 'BestFit';\n                    /** @var float[] $xValues */\n                    self::$trendCache[$key] = new $className($yValues, $xValues, $const);\n                }\n\n                return self::$trendCache[$key];\n            case self::TREND_POLYNOMIAL_2:\n            case self::TREND_POLYNOMIAL_3:\n            case self::TREND_POLYNOMIAL_4:\n            case self::TREND_POLYNOMIAL_5:\n            case self::TREND_POLYNOMIAL_6:\n                if (!isset(self::$trendCache[$key])) {\n                    $order = (int) substr($trendType, -1);\n                    /** @var float[] $yValues */\n                    self::$trendCache[$key] = new PolynomialBestFit($order, $yValues, $xValues);\n                }\n\n                return self::$trendCache[$key];\n            case self::TREND_BEST_FIT:\n            case self::TREND_BEST_FIT_NO_POLY:\n                //    If the request is to determine the best fit regression, then we test each Trend line in turn\n                //    Start by generating an instance of each available Trend method\n                /** @var float[] $yValues */\n                $bestFit = [];\n                /** @var float[] $xValues */\n                $bestFitValue = [];\n                foreach (self::TREND_TYPES as $trendMethod) {\n                    $className = '\\PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\\\' . $trendMethod . 'BestFit';\n                    $bestFit[$trendMethod] = new $className($yValues, $xValues, $const);\n                    $bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit();\n                }\n                if ($trendType !== self::TREND_BEST_FIT_NO_POLY) {\n                    foreach (self::$trendTypePolynomialOrders as $trendMethod) {\n                        $order = (int) substr($trendMethod, -1);\n                        $bestFit[$trendMethod] = new PolynomialBestFit($order, $yValues, $xValues);\n                        if ($bestFit[$trendMethod]->getError()) {\n                            unset($bestFit[$trendMethod]);\n                        } else {\n                            $bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit();\n                        }\n                    }\n                }\n                //    Determine which of our Trend lines is the best fit, and then we return the instance of that Trend class\n                arsort($bestFitValue);\n                $bestFitType = key($bestFitValue);\n\n                return $bestFit[$bestFitType];\n            default:\n                throw new SpreadsheetException(\"Unknown trend type $trendType\");\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/XMLWriter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\n\nclass XMLWriter extends \\XMLWriter\n{\n    public static bool $debugEnabled = false;\n\n    /** Temporary storage method */\n    const STORAGE_MEMORY = 1;\n    const STORAGE_DISK = 2;\n\n    /**\n     * Temporary filename.\n     */\n    private string $tempFileName = '';\n\n    /**\n     * Create a new XMLWriter instance.\n     *\n     * @param int $temporaryStorage Temporary storage location\n     * @param ?string $temporaryStorageFolder Temporary storage folder\n     */\n    public function __construct(int $temporaryStorage = self::STORAGE_MEMORY, ?string $temporaryStorageFolder = null)\n    {\n        // Open temporary storage\n        if ($temporaryStorage == self::STORAGE_MEMORY) {\n            $this->openMemory();\n        } else {\n            // Create temporary filename\n            if ($temporaryStorageFolder === null) {\n                $temporaryStorageFolder = File::sysGetTempDir();\n            }\n            $this->tempFileName = (string) @tempnam($temporaryStorageFolder, 'xml');\n\n            // Open storage\n            if (empty($this->tempFileName) || $this->openUri($this->tempFileName) === false) {\n                // Fallback to memory...\n                $this->openMemory();\n                if ($this->tempFileName != '') {\n                    @unlink($this->tempFileName);\n                }\n                $this->tempFileName = '';\n            }\n        }\n\n        // Set default values\n        if (self::$debugEnabled) {\n            $this->setIndent(true);\n        }\n    }\n\n    /**\n     * Destructor.\n     */\n    public function __destruct()\n    {\n        // Unlink temporary files\n        // There is nothing reasonable to do if unlink fails.\n        if ($this->tempFileName != '') {\n            @unlink($this->tempFileName);\n        }\n    }\n\n    /** @param mixed[] $data */\n    public function __unserialize(array $data): void\n    {\n        $this->tempFileName = '';\n\n        throw new SpreadsheetException('Unserialize not permitted');\n    }\n\n    /**\n     * Get written data.\n     */\n    public function getData(): string\n    {\n        if ($this->tempFileName == '') {\n            return $this->outputMemory(true);\n        }\n        $this->flush();\n\n        return file_get_contents($this->tempFileName) ?: '';\n    }\n\n    /**\n     * Wrapper method for writeRaw.\n     *\n     * @param null|string|string[] $rawTextData\n     */\n    public function writeRawData($rawTextData): bool\n    {\n        if (is_array($rawTextData)) {\n            $rawTextData = implode(\"\\n\", $rawTextData);\n        }\n\n        return $this->text($rawTextData ?? '');\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Shared/Xls.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Xls\n{\n    /**\n     * Get the width of a column in pixels. We use the relationship y = ceil(7x) where\n     * x is the width in intrinsic Excel units (measuring width in number of normal characters)\n     * This holds for Arial 10.\n     *\n     * @param Worksheet $worksheet The sheet\n     * @param string $col The column\n     *\n     * @return int The width in pixels\n     */\n    public static function sizeCol(Worksheet $worksheet, string $col = 'A'): int\n    {\n        // default font of the workbook\n        $font = $worksheet->getParentOrThrow()->getDefaultStyle()->getFont();\n\n        $columnDimensions = $worksheet->getColumnDimensions();\n\n        // first find the true column width in pixels (uncollapsed and unhidden)\n        if (isset($columnDimensions[$col]) && $columnDimensions[$col]->getWidth() != -1) {\n            // then we have column dimension with explicit width\n            $columnDimension = $columnDimensions[$col];\n            $width = $columnDimension->getWidth();\n            $pixelWidth = Drawing::cellDimensionToPixels($width, $font);\n        } elseif ($worksheet->getDefaultColumnDimension()->getWidth() != -1) {\n            // then we have default column dimension with explicit width\n            $defaultColumnDimension = $worksheet->getDefaultColumnDimension();\n            $width = $defaultColumnDimension->getWidth();\n            $pixelWidth = Drawing::cellDimensionToPixels($width, $font);\n        } else {\n            // we don't even have any default column dimension. Width depends on default font\n            $pixelWidth = Font::getDefaultColumnWidthByFont($font, true);\n        }\n\n        // now find the effective column width in pixels\n        if (isset($columnDimensions[$col]) && !$columnDimensions[$col]->getVisible()) {\n            $effectivePixelWidth = 0;\n        } else {\n            $effectivePixelWidth = $pixelWidth;\n        }\n\n        return $effectivePixelWidth;\n    }\n\n    /**\n     * Convert the height of a cell from user's units to pixels. By interpolation\n     * the relationship is: y = 4/3x. If the height hasn't been set by the user we\n     * use the default value. If the row is hidden we use a value of zero.\n     *\n     * @param Worksheet $worksheet The sheet\n     * @param int $row The row index (1-based)\n     *\n     * @return int The width in pixels\n     */\n    public static function sizeRow(Worksheet $worksheet, int $row = 1): int\n    {\n        // default font of the workbook\n        $font = $worksheet->getParentOrThrow()->getDefaultStyle()->getFont();\n\n        $rowDimensions = $worksheet->getRowDimensions();\n\n        // first find the true row height in pixels (uncollapsed and unhidden)\n        if (isset($rowDimensions[$row]) && $rowDimensions[$row]->getRowHeight() != -1) {\n            // then we have a row dimension\n            $rowDimension = $rowDimensions[$row];\n            $rowHeight = $rowDimension->getRowHeight();\n            $pixelRowHeight = (int) ceil(4 * $rowHeight / 3); // here we assume Arial 10\n        } elseif ($worksheet->getDefaultRowDimension()->getRowHeight() != -1) {\n            // then we have a default row dimension with explicit height\n            $defaultRowDimension = $worksheet->getDefaultRowDimension();\n            $pixelRowHeight = $defaultRowDimension->getRowHeight(Dimension::UOM_PIXELS);\n        } else {\n            // we don't even have any default row dimension. Height depends on default font\n            $pointRowHeight = Font::getDefaultRowHeightByFont($font);\n            $pixelRowHeight = Font::fontSizeToPixels((int) $pointRowHeight);\n        }\n\n        // now find the effective row height in pixels\n        if (isset($rowDimensions[$row]) && !$rowDimensions[$row]->getVisible()) {\n            $effectivePixelRowHeight = 0;\n        } else {\n            $effectivePixelRowHeight = $pixelRowHeight;\n        }\n\n        return (int) $effectivePixelRowHeight;\n    }\n\n    /**\n     * Get the horizontal distance in pixels between two anchors\n     * The distanceX is found as sum of all the spanning columns widths minus correction for the two offsets.\n     *\n     * @param float|int $startOffsetX Offset within start cell measured in 1/1024 of the cell width\n     * @param float|int $endOffsetX Offset within end cell measured in 1/1024 of the cell width\n     *\n     * @return int Horizontal measured in pixels\n     */\n    public static function getDistanceX(Worksheet $worksheet, string $startColumn = 'A', float|int $startOffsetX = 0, string $endColumn = 'A', float|int $endOffsetX = 0): int\n    {\n        $distanceX = 0;\n\n        // add the widths of the spanning columns\n        $startColumnIndex = Coordinate::columnIndexFromString($startColumn);\n        $endColumnIndex = Coordinate::columnIndexFromString($endColumn);\n        for ($i = $startColumnIndex; $i <= $endColumnIndex; ++$i) {\n            $distanceX += self::sizeCol($worksheet, Coordinate::stringFromColumnIndex($i));\n        }\n\n        // correct for offsetX in startcell\n        $distanceX -= (int) floor(self::sizeCol($worksheet, $startColumn) * $startOffsetX / 1024);\n\n        // correct for offsetX in endcell\n        $distanceX -= (int) floor(self::sizeCol($worksheet, $endColumn) * (1 - $endOffsetX / 1024));\n\n        return $distanceX;\n    }\n\n    /**\n     * Get the vertical distance in pixels between two anchors\n     * The distanceY is found as sum of all the spanning rows minus two offsets.\n     *\n     * @param int $startRow (1-based)\n     * @param float|int $startOffsetY Offset within start cell measured in 1/256 of the cell height\n     * @param int $endRow (1-based)\n     * @param float|int $endOffsetY Offset within end cell measured in 1/256 of the cell height\n     *\n     * @return int Vertical distance measured in pixels\n     */\n    public static function getDistanceY(Worksheet $worksheet, int $startRow = 1, float|int $startOffsetY = 0, int $endRow = 1, float|int $endOffsetY = 0): int\n    {\n        $distanceY = 0;\n\n        // add the widths of the spanning rows\n        for ($row = $startRow; $row <= $endRow; ++$row) {\n            $distanceY += self::sizeRow($worksheet, $row);\n        }\n\n        // correct for offsetX in startcell\n        $distanceY -= (int) floor(self::sizeRow($worksheet, $startRow) * $startOffsetY / 256);\n\n        // correct for offsetX in endcell\n        $distanceY -= (int) floor(self::sizeRow($worksheet, $endRow) * (1 - $endOffsetY / 256));\n\n        return $distanceY;\n    }\n\n    /**\n     * Convert 1-cell anchor coordinates to 2-cell anchor coordinates\n     * This function is ported from PEAR Spreadsheet_Writer_Excel with small modifications.\n     *\n     * Calculate the vertices that define the position of the image as required by\n     * the OBJ record.\n     *\n     *         +------------+------------+\n     *         |     A      |      B     |\n     *   +-----+------------+------------+\n     *   |     |(x1,y1)     |            |\n     *   |  1  |(A1)._______|______      |\n     *   |     |    |              |     |\n     *   |     |    |              |     |\n     *   +-----+----|    BITMAP    |-----+\n     *   |     |    |              |     |\n     *   |  2  |    |______________.     |\n     *   |     |            |        (B2)|\n     *   |     |            |     (x2,y2)|\n     *   +---- +------------+------------+\n     *\n     * Example of a bitmap that covers some of the area from cell A1 to cell B2.\n     *\n     * Based on the width and height of the bitmap we need to calculate 8 vars:\n     *     $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2.\n     * The width and height of the cells are also variable and have to be taken into\n     * account.\n     * The values of $col_start and $row_start are passed in from the calling\n     * function. The values of $col_end and $row_end are calculated by subtracting\n     * the width and height of the bitmap from the width and height of the\n     * underlying cells.\n     * The vertices are expressed as a percentage of the underlying cell width as\n     * follows (rhs values are in pixels):\n     *\n     *       x1 = X / W *1024\n     *       y1 = Y / H *256\n     *       x2 = (X-1) / W *1024\n     *       y2 = (Y-1) / H *256\n     *\n     *       Where:  X is distance from the left side of the underlying cell\n     *               Y is distance from the top of the underlying cell\n     *               W is the width of the cell\n     *               H is the height of the cell\n     *\n     * @param string $coordinates E.g. 'A1'\n     * @param int $offsetX Horizontal offset in pixels\n     * @param int $offsetY Vertical offset in pixels\n     * @param int $width Width in pixels\n     * @param int $height Height in pixels\n     *\n     * @return ?array{startCoordinates: string, startOffsetX: float|int, startOffsetY: float|int, endCoordinates: string, endOffsetX: float|int, endOffsetY: float|int}\n     */\n    public static function oneAnchor2twoAnchor(Worksheet $worksheet, string $coordinates, int $offsetX, int $offsetY, int $width, int $height): ?array\n    {\n        [$col_start, $row] = Coordinate::indexesFromString($coordinates);\n        $row_start = $row - 1;\n\n        $x1 = $offsetX;\n        $y1 = $offsetY;\n\n        // Initialise end cell to the same as the start cell\n        $col_end = $col_start; // Col containing lower right corner of object\n        $row_end = $row_start; // Row containing bottom right corner of object\n\n        // Zero the specified offset if greater than the cell dimensions\n        if ($x1 >= self::sizeCol($worksheet, Coordinate::stringFromColumnIndex($col_start))) {\n            $x1 = 0;\n        }\n        if ($y1 >= self::sizeRow($worksheet, $row_start + 1)) {\n            $y1 = 0;\n        }\n\n        $width = $width + $x1 - 1;\n        $height = $height + $y1 - 1;\n\n        // Subtract the underlying cell widths to find the end cell of the image\n        while ($width >= self::sizeCol($worksheet, Coordinate::stringFromColumnIndex($col_end))) {\n            $width -= self::sizeCol($worksheet, Coordinate::stringFromColumnIndex($col_end));\n            ++$col_end;\n        }\n\n        // Subtract the underlying cell heights to find the end cell of the image\n        while ($height >= self::sizeRow($worksheet, $row_end + 1)) {\n            $height -= self::sizeRow($worksheet, $row_end + 1);\n            ++$row_end;\n        }\n\n        // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell\n        // with zero height or width.\n        if (\n            self::sizeCol($worksheet, Coordinate::stringFromColumnIndex($col_start)) == 0\n            || self::sizeCol($worksheet, Coordinate::stringFromColumnIndex($col_end)) == 0\n            || self::sizeRow($worksheet, $row_start + 1) == 0\n            || self::sizeRow($worksheet, $row_end + 1) == 0\n        ) {\n            return null;\n        }\n\n        // Convert the pixel values to the percentage value expected by Excel\n        $x1 = $x1 / self::sizeCol($worksheet, Coordinate::stringFromColumnIndex($col_start)) * 1024;\n        $y1 = $y1 / self::sizeRow($worksheet, $row_start + 1) * 256;\n        $x2 = ($width + 1) / self::sizeCol($worksheet, Coordinate::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object\n        $y2 = ($height + 1) / self::sizeRow($worksheet, $row_end + 1) * 256; // Distance to bottom of object\n\n        $startCoordinates = Coordinate::stringFromColumnIndex($col_start) . ($row_start + 1);\n        $endCoordinates = Coordinate::stringFromColumnIndex($col_end) . ($row_end + 1);\n\n        return [\n            'startCoordinates' => $startCoordinates,\n            'startOffsetX' => $x1,\n            'startOffsetY' => $y1,\n            'endCoordinates' => $endCoordinates,\n            'endOffsetX' => $x2,\n            'endOffsetY' => $y2,\n        ];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Spreadsheet.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nuse Composer\\Pcre\\Preg;\nuse JsonSerializable;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Document\\Security;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Font as SharedFont;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Iterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Spreadsheet implements JsonSerializable\n{\n    // Allowable values for workbook window visibility\n    const VISIBILITY_VISIBLE = 'visible';\n    const VISIBILITY_HIDDEN = 'hidden';\n    const VISIBILITY_VERY_HIDDEN = 'veryHidden';\n\n    private const DEFINED_NAME_IS_RANGE = false;\n    private const DEFINED_NAME_IS_FORMULA = true;\n\n    private const WORKBOOK_VIEW_VISIBILITY_VALUES = [\n        self::VISIBILITY_VISIBLE,\n        self::VISIBILITY_HIDDEN,\n        self::VISIBILITY_VERY_HIDDEN,\n    ];\n\n    protected int $excelCalendar = Date::CALENDAR_WINDOWS_1900;\n\n    /**\n     * Unique ID.\n     */\n    private string $uniqueID;\n\n    /**\n     * Document properties.\n     */\n    private Properties $properties;\n\n    /**\n     * Document security.\n     */\n    private Security $security;\n\n    /**\n     * Collection of Worksheet objects.\n     *\n     * @var Worksheet[]\n     */\n    private array $workSheetCollection;\n\n    /**\n     * Calculation Engine.\n     */\n    private Calculation $calculationEngine;\n\n    /**\n     * Active sheet index.\n     */\n    private int $activeSheetIndex;\n\n    /**\n     * Named ranges.\n     *\n     * @var DefinedName[]\n     */\n    private array $definedNames;\n\n    /**\n     * CellXf supervisor.\n     */\n    private Style $cellXfSupervisor;\n\n    /**\n     * CellXf collection.\n     *\n     * @var Style[]\n     */\n    private array $cellXfCollection = [];\n\n    /**\n     * CellStyleXf collection.\n     *\n     * @var Style[]\n     */\n    private array $cellStyleXfCollection = [];\n\n    /**\n     * hasMacros : this workbook have macros ?\n     */\n    private bool $hasMacros = false;\n\n    /**\n     * macrosCode : all macros code as binary data (the vbaProject.bin file, this include form, code,  etc.), null if no macro.\n     */\n    private ?string $macrosCode = null;\n\n    /**\n     * macrosCertificate : if macros are signed, contains binary data vbaProjectSignature.bin file, null if not signed.\n     */\n    private ?string $macrosCertificate = null;\n\n    /**\n     * ribbonXMLData : null if workbook isn't Excel 2007 or not contain a customized UI.\n     *\n     * @var null|array{target: string, data: string}\n     */\n    private ?array $ribbonXMLData = null;\n\n    /**\n     * ribbonBinObjects : null if workbook isn't Excel 2007 or not contain embedded objects (picture(s)) for Ribbon Elements\n     * ignored if $ribbonXMLData is null.\n     *\n     * @var null|mixed[]\n     */\n    private ?array $ribbonBinObjects = null;\n\n    /**\n     * List of unparsed loaded data for export to same format with better compatibility.\n     * It has to be minimized when the library start to support currently unparsed data.\n     *\n     * @var array<array<array<array<string>|string>>>\n     */\n    private array $unparsedLoadedData = [];\n\n    /**\n     * Controls visibility of the horizonal scroll bar in the application.\n     */\n    private bool $showHorizontalScroll = true;\n\n    /**\n     * Controls visibility of the horizonal scroll bar in the application.\n     */\n    private bool $showVerticalScroll = true;\n\n    /**\n     * Controls visibility of the sheet tabs in the application.\n     */\n    private bool $showSheetTabs = true;\n\n    /**\n     * Specifies a boolean value that indicates whether the workbook window\n     * is minimized.\n     */\n    private bool $minimized = false;\n\n    /**\n     * Specifies a boolean value that indicates whether to group dates\n     * when presenting the user with filtering options in the user\n     * interface.\n     */\n    private bool $autoFilterDateGrouping = true;\n\n    /**\n     * Specifies the index to the first sheet in the book view.\n     */\n    private int $firstSheetIndex = 0;\n\n    /**\n     * Specifies the visible status of the workbook.\n     */\n    private string $visibility = self::VISIBILITY_VISIBLE;\n\n    /**\n     * Specifies the ratio between the workbook tabs bar and the horizontal\n     * scroll bar.  TabRatio is assumed to be out of 1000 of the horizontal\n     * window width.\n     */\n    private int $tabRatio = 600;\n\n    private Theme $theme;\n\n    private ?IValueBinder $valueBinder = null;\n\n    /** @var array<string, int> */\n    private array $fontCharsets = [\n        'B Nazanin' => SharedFont::CHARSET_ANSI_ARABIC,\n    ];\n\n    /**\n     * @param int $charset uses any value from Shared\\Font,\n     *    but defaults to ARABIC because that is the only known\n     *    charset for which this declaration might be needed\n     */\n    public function addFontCharset(string $fontName, int $charset = SharedFont::CHARSET_ANSI_ARABIC): void\n    {\n        $this->fontCharsets[$fontName] = $charset;\n    }\n\n    public function getFontCharset(string $fontName): int\n    {\n        return $this->fontCharsets[$fontName] ?? -1;\n    }\n\n    /**\n     * Return all fontCharsets.\n     *\n     * @return array<string, int>\n     */\n    public function getFontCharsets(): array\n    {\n        return $this->fontCharsets;\n    }\n\n    public function getTheme(): Theme\n    {\n        return $this->theme;\n    }\n\n    /**\n     * The workbook has macros ?\n     */\n    public function hasMacros(): bool\n    {\n        return $this->hasMacros;\n    }\n\n    /**\n     * Define if a workbook has macros.\n     *\n     * @param bool $hasMacros true|false\n     */\n    public function setHasMacros(bool $hasMacros): void\n    {\n        $this->hasMacros = (bool) $hasMacros;\n    }\n\n    /**\n     * Set the macros code.\n     */\n    public function setMacrosCode(?string $macroCode): void\n    {\n        $this->macrosCode = $macroCode;\n        $this->setHasMacros($macroCode !== null);\n    }\n\n    /**\n     * Return the macros code.\n     */\n    public function getMacrosCode(): ?string\n    {\n        return $this->macrosCode;\n    }\n\n    /**\n     * Set the macros certificate.\n     */\n    public function setMacrosCertificate(?string $certificate): void\n    {\n        $this->macrosCertificate = $certificate;\n    }\n\n    /**\n     * Is the project signed ?\n     *\n     * @return bool true|false\n     */\n    public function hasMacrosCertificate(): bool\n    {\n        return $this->macrosCertificate !== null;\n    }\n\n    /**\n     * Return the macros certificate.\n     */\n    public function getMacrosCertificate(): ?string\n    {\n        return $this->macrosCertificate;\n    }\n\n    /**\n     * Remove all macros, certificate from spreadsheet.\n     */\n    public function discardMacros(): void\n    {\n        $this->hasMacros = false;\n        $this->macrosCode = null;\n        $this->macrosCertificate = null;\n    }\n\n    /**\n     * set ribbon XML data.\n     */\n    public function setRibbonXMLData(mixed $target, mixed $xmlData): void\n    {\n        if (is_string($target) && is_string($xmlData)) {\n            $this->ribbonXMLData = ['target' => $target, 'data' => $xmlData];\n        } else {\n            $this->ribbonXMLData = null;\n        }\n    }\n\n    /**\n     * retrieve ribbon XML Data.\n     *\n     * @return mixed[]\n     */\n    public function getRibbonXMLData(string $what = 'all'): null|array|string //we need some constants here...\n    {\n        $returnData = null;\n        $what = strtolower($what);\n        switch ($what) {\n            case 'all':\n                $returnData = $this->ribbonXMLData;\n\n                break;\n            case 'target':\n            case 'data':\n                if (is_array($this->ribbonXMLData)) {\n                    $returnData = $this->ribbonXMLData[$what];\n                }\n\n                break;\n        }\n\n        return $returnData;\n    }\n\n    /**\n     * store binaries ribbon objects (pictures).\n     */\n    public function setRibbonBinObjects(mixed $binObjectsNames, mixed $binObjectsData): void\n    {\n        if ($binObjectsNames !== null && $binObjectsData !== null) {\n            $this->ribbonBinObjects = ['names' => $binObjectsNames, 'data' => $binObjectsData];\n        } else {\n            $this->ribbonBinObjects = null;\n        }\n    }\n\n    /**\n     * List of unparsed loaded data for export to same format with better compatibility.\n     * It has to be minimized when the library start to support currently unparsed data.\n     *\n     * @internal\n     *\n     * @return mixed[]\n     */\n    public function getUnparsedLoadedData(): array\n    {\n        return $this->unparsedLoadedData;\n    }\n\n    /**\n     * List of unparsed loaded data for export to same format with better compatibility.\n     * It has to be minimized when the library start to support currently unparsed data.\n     *\n     * @internal\n     *\n     * @param array<array<array<array<string>|string>>> $unparsedLoadedData\n     */\n    public function setUnparsedLoadedData(array $unparsedLoadedData): void\n    {\n        $this->unparsedLoadedData = $unparsedLoadedData;\n    }\n\n    /**\n     * retrieve Binaries Ribbon Objects.\n     *\n     * @return mixed[]\n     */\n    public function getRibbonBinObjects(string $what = 'all'): ?array\n    {\n        $ReturnData = null;\n        $what = strtolower($what);\n        switch ($what) {\n            case 'all':\n                return $this->ribbonBinObjects;\n            case 'names':\n            case 'data':\n                if (is_array($this->ribbonBinObjects) && is_array($this->ribbonBinObjects[$what] ?? null)) {\n                    $ReturnData = $this->ribbonBinObjects[$what];\n                }\n\n                break;\n            case 'types':\n                if (\n                    is_array($this->ribbonBinObjects)\n                    && isset($this->ribbonBinObjects['data']) && is_array($this->ribbonBinObjects['data'])\n                ) {\n                    $tmpTypes = array_keys($this->ribbonBinObjects['data']);\n                    $ReturnData = array_unique(array_map(fn (string $path): string => pathinfo($path, PATHINFO_EXTENSION), $tmpTypes));\n                } else {\n                    $ReturnData = []; // the caller want an array... not null if empty\n                }\n\n                break;\n        }\n\n        return $ReturnData;\n    }\n\n    /**\n     * This workbook have a custom UI ?\n     */\n    public function hasRibbon(): bool\n    {\n        return $this->ribbonXMLData !== null;\n    }\n\n    /**\n     * This workbook have additional object for the ribbon ?\n     */\n    public function hasRibbonBinObjects(): bool\n    {\n        return $this->ribbonBinObjects !== null;\n    }\n\n    /**\n     * This workbook has in cell images.\n     */\n    public function hasInCellDrawings(): bool\n    {\n        $sheetCount = $this->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            if ($this->getSheet($i)->getInCellDrawingCollection()->count() > 0) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Check if a sheet with a specified code name already exists.\n     *\n     * @param string $codeName Name of the worksheet to check\n     */\n    public function sheetCodeNameExists(string $codeName): bool\n    {\n        return $this->getSheetByCodeName($codeName) !== null;\n    }\n\n    /**\n     * Get sheet by code name. Warning : sheet don't have always a code name !\n     *\n     * @param string $codeName Sheet name\n     */\n    public function getSheetByCodeName(string $codeName): ?Worksheet\n    {\n        $worksheetCount = count($this->workSheetCollection);\n        for ($i = 0; $i < $worksheetCount; ++$i) {\n            if ($this->workSheetCollection[$i]->getCodeName() == $codeName) {\n                return $this->workSheetCollection[$i];\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * Create a new PhpSpreadsheet with one Worksheet.\n     */\n    public function __construct()\n    {\n        $this->uniqueID = uniqid('', true);\n        $this->calculationEngine = new Calculation($this);\n        $this->theme = new Theme();\n\n        // Initialise worksheet collection and add one worksheet\n        $this->workSheetCollection = [];\n        $this->workSheetCollection[] = new Worksheet($this);\n        $this->activeSheetIndex = 0;\n\n        // Create document properties\n        $this->properties = new Properties();\n\n        // Create document security\n        $this->security = new Security();\n\n        // Set defined names\n        $this->definedNames = [];\n\n        // Create the cellXf supervisor\n        $this->cellXfSupervisor = new Style(true);\n        $this->cellXfSupervisor->bindParent($this);\n\n        // Create the default style\n        $this->addCellXf(new Style());\n        $this->addCellStyleXf(new Style());\n    }\n\n    /**\n     * Code to execute when this worksheet is unset().\n     */\n    public function __destruct()\n    {\n        $this->disconnectWorksheets();\n        unset($this->calculationEngine);\n        $this->cellXfCollection = [];\n        $this->cellStyleXfCollection = [];\n        $this->definedNames = [];\n    }\n\n    /**\n     * Disconnect all worksheets from this PhpSpreadsheet workbook object,\n     * typically so that the PhpSpreadsheet object can be unset.\n     */\n    public function disconnectWorksheets(): void\n    {\n        foreach ($this->workSheetCollection as $worksheet) {\n            $worksheet->disconnectCells();\n            unset($worksheet);\n        }\n        $this->workSheetCollection = [];\n    }\n\n    /**\n     * Return the calculation engine for this worksheet.\n     */\n    public function getCalculationEngine(): Calculation\n    {\n        return $this->calculationEngine;\n    }\n\n    /**\n     * Intended for use only via a destructor.\n     *\n     * @internal\n     */\n    public function getCalculationEngineOrNull(): ?Calculation\n    {\n        if (!isset($this->calculationEngine)) { //* @phpstan-ignore-line\n            return null;\n        }\n\n        return $this->calculationEngine;\n    }\n\n    /**\n     * Get properties.\n     */\n    public function getProperties(): Properties\n    {\n        return $this->properties;\n    }\n\n    /**\n     * Set properties.\n     */\n    public function setProperties(Properties $documentProperties): void\n    {\n        $this->properties = $documentProperties;\n    }\n\n    /**\n     * Get security.\n     */\n    public function getSecurity(): Security\n    {\n        return $this->security;\n    }\n\n    /**\n     * Set security.\n     */\n    public function setSecurity(Security $documentSecurity): void\n    {\n        $this->security = $documentSecurity;\n    }\n\n    /**\n     * Get active sheet.\n     */\n    public function getActiveSheet(): Worksheet\n    {\n        return $this->getSheet($this->activeSheetIndex);\n    }\n\n    /**\n     * Create sheet and add it to this workbook.\n     *\n     * @param null|int $sheetIndex Index where sheet should go (0,1,..., or null for last)\n     */\n    public function createSheet(?int $sheetIndex = null): Worksheet\n    {\n        $newSheet = new Worksheet($this);\n        $this->addSheet($newSheet, $sheetIndex, true);\n\n        return $newSheet;\n    }\n\n    /**\n     * Check if a sheet with a specified name already exists.\n     *\n     * @param string $worksheetName Name of the worksheet to check\n     */\n    public function sheetNameExists(string $worksheetName): bool\n    {\n        return $this->getSheetByName($worksheetName) !== null;\n    }\n\n    public function duplicateWorksheetByTitle(string $title): Worksheet\n    {\n        $original = $this->getSheetByNameOrThrow($title);\n        $index = $this->getIndex($original) + 1;\n        $clone = clone $original;\n\n        return $this->addSheet($clone, $index, true);\n    }\n\n    /**\n     * Add sheet.\n     *\n     * @param Worksheet $worksheet The worksheet to add\n     * @param null|int $sheetIndex Index where sheet should go (0,1,..., or null for last)\n     */\n    public function addSheet(Worksheet $worksheet, ?int $sheetIndex = null, bool $retitleIfNeeded = false): Worksheet\n    {\n        if ($retitleIfNeeded) {\n            $title = $worksheet->getTitle();\n            if ($this->sheetNameExists($title)) {\n                $i = 1;\n                $newTitle = \"$title $i\";\n                while ($this->sheetNameExists($newTitle)) {\n                    ++$i;\n                    $newTitle = \"$title $i\";\n                }\n                $worksheet->setTitle($newTitle);\n            }\n        }\n        if ($this->sheetNameExists($worksheet->getTitle())) {\n            throw new Exception(\n                \"Workbook already contains a worksheet named '{$worksheet->getTitle()}'. Rename this worksheet first.\"\n            );\n        }\n\n        if ($sheetIndex === null) {\n            if ($this->activeSheetIndex < 0) {\n                $this->activeSheetIndex = 0;\n            }\n            $this->workSheetCollection[] = $worksheet;\n        } else {\n            // Insert the sheet at the requested index\n            array_splice(\n                $this->workSheetCollection,\n                $sheetIndex,\n                0,\n                [$worksheet]\n            );\n\n            // Adjust active sheet index if necessary\n            if ($this->activeSheetIndex >= $sheetIndex) {\n                ++$this->activeSheetIndex;\n            }\n            if ($this->activeSheetIndex < 0) {\n                $this->activeSheetIndex = 0;\n            }\n        }\n\n        if ($worksheet->getParent() === null) {\n            $worksheet->rebindParent($this);\n        }\n\n        return $worksheet;\n    }\n\n    /**\n     * Remove sheet by index.\n     *\n     * @param int $sheetIndex Index position of the worksheet to remove\n     */\n    public function removeSheetByIndex(int $sheetIndex): void\n    {\n        $numSheets = count($this->workSheetCollection);\n        if ($sheetIndex > $numSheets - 1) {\n            throw new Exception(\n                \"You tried to remove a sheet by the out of bounds index: {$sheetIndex}. The actual number of sheets is {$numSheets}.\"\n            );\n        }\n        array_splice($this->workSheetCollection, $sheetIndex, 1);\n\n        // Adjust active sheet index if necessary\n        if (\n            ($this->activeSheetIndex >= $sheetIndex)\n            && ($this->activeSheetIndex > 0 || $numSheets <= 1)\n        ) {\n            --$this->activeSheetIndex;\n        }\n    }\n\n    /**\n     * Get sheet by index.\n     *\n     * @param int $sheetIndex Sheet index\n     */\n    public function getSheet(int $sheetIndex): Worksheet\n    {\n        if (!isset($this->workSheetCollection[$sheetIndex])) {\n            $numSheets = $this->getSheetCount();\n\n            throw new Exception(\n                \"Your requested sheet index: {$sheetIndex} is out of bounds. The actual number of sheets is {$numSheets}.\"\n            );\n        }\n\n        return $this->workSheetCollection[$sheetIndex];\n    }\n\n    /**\n     * Get all sheets.\n     *\n     * @return Worksheet[]\n     */\n    public function getAllSheets(): array\n    {\n        return $this->workSheetCollection;\n    }\n\n    /**\n     * Get sheet by name.\n     *\n     * @param string $worksheetName Sheet name\n     */\n    public function getSheetByName(string $worksheetName): ?Worksheet\n    {\n        $trimWorksheetName = StringHelper::strToUpper(trim($worksheetName, \"'\"));\n        foreach ($this->workSheetCollection as $worksheet) {\n            if (StringHelper::strToUpper($worksheet->getTitle()) === $trimWorksheetName) {\n                return $worksheet;\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * Get sheet by name, throwing exception if not found.\n     */\n    public function getSheetByNameOrThrow(string $worksheetName): Worksheet\n    {\n        $worksheet = $this->getSheetByName($worksheetName);\n        if ($worksheet === null) {\n            throw new Exception(\"Sheet $worksheetName does not exist.\");\n        }\n\n        return $worksheet;\n    }\n\n    /**\n     * Get index for sheet.\n     *\n     * @return int index\n     */\n    public function getIndex(Worksheet $worksheet, bool $noThrow = false): int\n    {\n        foreach ($this->workSheetCollection as $key => $value) {\n            if ($value === $worksheet) {\n                return $key;\n            }\n        }\n        if ($noThrow) {\n            return -1;\n        }\n\n        throw new Exception('Sheet does not exist.');\n    }\n\n    /**\n     * Set index for sheet by sheet name.\n     *\n     * @param string $worksheetName Sheet name to modify index for\n     * @param int $newIndexPosition New index for the sheet\n     *\n     * @return int New sheet index\n     */\n    public function setIndexByName(string $worksheetName, int $newIndexPosition): int\n    {\n        $oldIndex = $this->getIndex($this->getSheetByNameOrThrow($worksheetName));\n        $worksheet = array_splice(\n            $this->workSheetCollection,\n            $oldIndex,\n            1\n        );\n        array_splice(\n            $this->workSheetCollection,\n            $newIndexPosition,\n            0,\n            $worksheet\n        );\n\n        return $newIndexPosition;\n    }\n\n    /**\n     * Get sheet count.\n     */\n    public function getSheetCount(): int\n    {\n        return count($this->workSheetCollection);\n    }\n\n    /**\n     * Get active sheet index.\n     *\n     * @return int Active sheet index\n     */\n    public function getActiveSheetIndex(): int\n    {\n        return $this->activeSheetIndex;\n    }\n\n    /**\n     * Set active sheet index.\n     *\n     * @param int $worksheetIndex Active sheet index\n     */\n    public function setActiveSheetIndex(int $worksheetIndex): Worksheet\n    {\n        $numSheets = count($this->workSheetCollection);\n\n        if ($worksheetIndex > $numSheets - 1) {\n            throw new Exception(\n                \"You tried to set a sheet active by the out of bounds index: {$worksheetIndex}. The actual number of sheets is {$numSheets}.\"\n            );\n        }\n        $this->activeSheetIndex = $worksheetIndex;\n\n        return $this->getActiveSheet();\n    }\n\n    /**\n     * Set active sheet index by name.\n     *\n     * @param string $worksheetName Sheet title\n     */\n    public function setActiveSheetIndexByName(string $worksheetName): Worksheet\n    {\n        if (($worksheet = $this->getSheetByName($worksheetName)) instanceof Worksheet) {\n            $this->setActiveSheetIndex($this->getIndex($worksheet));\n\n            return $worksheet;\n        }\n\n        throw new Exception('Workbook does not contain sheet:' . $worksheetName);\n    }\n\n    /**\n     * Get sheet names.\n     *\n     * @return string[]\n     */\n    public function getSheetNames(): array\n    {\n        $returnValue = [];\n        $worksheetCount = $this->getSheetCount();\n        for ($i = 0; $i < $worksheetCount; ++$i) {\n            $returnValue[] = $this->getSheet($i)->getTitle();\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * Add external sheet.\n     *\n     * @param Worksheet $worksheet External sheet to add\n     * @param null|int $sheetIndex Index where sheet should go (0,1,..., or null for last)\n     */\n    public function addExternalSheet(Worksheet $worksheet, ?int $sheetIndex = null): Worksheet\n    {\n        if ($this->sheetNameExists($worksheet->getTitle())) {\n            throw new Exception(\"Workbook already contains a worksheet named '{$worksheet->getTitle()}'. Rename the external sheet first.\");\n        }\n\n        // count how many cellXfs there are in this workbook currently, we will need this below\n        $countCellXfs = count($this->cellXfCollection);\n\n        // copy all the shared cellXfs from the external workbook and append them to the current\n        foreach ($worksheet->getParentOrThrow()->getCellXfCollection() as $cellXf) {\n            $this->addCellXf(clone $cellXf);\n        }\n\n        // move sheet to this workbook\n        $worksheet->rebindParent($this);\n\n        // update the cellXfs\n        foreach ($worksheet->getCoordinates(false) as $coordinate) {\n            $cell = $worksheet->getCell($coordinate);\n            $cell->setXfIndex($cell->getXfIndex() + $countCellXfs);\n        }\n\n        // update the column dimensions Xfs\n        foreach ($worksheet->getColumnDimensions() as $columnDimension) {\n            $columnDimension->setXfIndex($columnDimension->getXfIndex() + $countCellXfs);\n        }\n\n        // update the row dimensions Xfs\n        foreach ($worksheet->getRowDimensions() as $rowDimension) {\n            $xfIndex = $rowDimension->getXfIndex();\n            if ($xfIndex !== null) {\n                $rowDimension->setXfIndex($xfIndex + $countCellXfs);\n            }\n        }\n\n        return $this->addSheet($worksheet, $sheetIndex);\n    }\n\n    /**\n     * Get an array of all Named Ranges.\n     *\n     * @return DefinedName[]\n     */\n    public function getNamedRanges(): array\n    {\n        return array_filter(\n            $this->definedNames,\n            fn (DefinedName $definedName): bool => $definedName->isFormula() === self::DEFINED_NAME_IS_RANGE\n        );\n    }\n\n    /**\n     * Get an array of all Named Formulae.\n     *\n     * @return DefinedName[]\n     */\n    public function getNamedFormulae(): array\n    {\n        return array_filter(\n            $this->definedNames,\n            fn (DefinedName $definedName): bool => $definedName->isFormula() === self::DEFINED_NAME_IS_FORMULA\n        );\n    }\n\n    /**\n     * Get an array of all Defined Names (both named ranges and named formulae).\n     *\n     * @return DefinedName[]\n     */\n    public function getDefinedNames(): array\n    {\n        return $this->definedNames;\n    }\n\n    /**\n     * Add a named range.\n     * If a named range with this name already exists, then this will replace the existing value.\n     */\n    public function addNamedRange(NamedRange $namedRange): void\n    {\n        $this->addDefinedName($namedRange);\n    }\n\n    /**\n     * Add a named formula.\n     * If a named formula with this name already exists, then this will replace the existing value.\n     */\n    public function addNamedFormula(NamedFormula $namedFormula): void\n    {\n        $this->addDefinedName($namedFormula);\n    }\n\n    /**\n     * Add a defined name (either a named range or a named formula).\n     * If a defined named with this name already exists, then this will replace the existing value.\n     */\n    public function addDefinedName(DefinedName $definedName): void\n    {\n        $upperCaseName = StringHelper::strToUpper($definedName->getName());\n        if ($definedName->getScope() == null) {\n            // global scope\n            $this->definedNames[$upperCaseName] = $definedName;\n        } else {\n            // local scope\n            $this->definedNames[$definedName->getScope()->getTitle() . '!' . $upperCaseName] = $definedName;\n        }\n    }\n\n    /**\n     * Get named range.\n     *\n     * @param null|Worksheet $worksheet Scope. Use null for global scope\n     */\n    public function getNamedRange(string $namedRange, ?Worksheet $worksheet = null): ?NamedRange\n    {\n        $returnValue = null;\n\n        if ($namedRange !== '') {\n            $namedRange = StringHelper::strToUpper($namedRange);\n            // first look for global named range\n            $returnValue = $this->getGlobalDefinedNameByType($namedRange, self::DEFINED_NAME_IS_RANGE);\n            // then look for local named range (has priority over global named range if both names exist)\n            $returnValue = $this->getLocalDefinedNameByType($namedRange, self::DEFINED_NAME_IS_RANGE, $worksheet) ?: $returnValue;\n        }\n\n        return $returnValue instanceof NamedRange ? $returnValue : null;\n    }\n\n    /**\n     * Get named formula.\n     *\n     * @param null|Worksheet $worksheet Scope. Use null for global scope\n     */\n    public function getNamedFormula(string $namedFormula, ?Worksheet $worksheet = null): ?NamedFormula\n    {\n        $returnValue = null;\n\n        if ($namedFormula !== '') {\n            $namedFormula = StringHelper::strToUpper($namedFormula);\n            // first look for global named formula\n            $returnValue = $this->getGlobalDefinedNameByType($namedFormula, self::DEFINED_NAME_IS_FORMULA);\n            // then look for local named formula (has priority over global named formula if both names exist)\n            $returnValue = $this->getLocalDefinedNameByType($namedFormula, self::DEFINED_NAME_IS_FORMULA, $worksheet) ?: $returnValue;\n        }\n\n        return $returnValue instanceof NamedFormula ? $returnValue : null;\n    }\n\n    private function getGlobalDefinedNameByType(string $name, bool $type): ?DefinedName\n    {\n        if (isset($this->definedNames[$name]) && $this->definedNames[$name]->isFormula() === $type) {\n            return $this->definedNames[$name];\n        }\n\n        return null;\n    }\n\n    private function getLocalDefinedNameByType(string $name, bool $type, ?Worksheet $worksheet = null): ?DefinedName\n    {\n        if (\n            ($worksheet !== null) && isset($this->definedNames[$worksheet->getTitle() . '!' . $name])\n            && $this->definedNames[$worksheet->getTitle() . '!' . $name]->isFormula() === $type\n        ) {\n            return $this->definedNames[$worksheet->getTitle() . '!' . $name];\n        }\n\n        return null;\n    }\n\n    /**\n     * Get named range.\n     *\n     * @param null|Worksheet $worksheet Scope. Use null for global scope\n     */\n    public function getDefinedName(string $definedName, ?Worksheet $worksheet = null): ?DefinedName\n    {\n        $returnValue = null;\n\n        if ($definedName !== '') {\n            $definedName = StringHelper::strToUpper($definedName);\n            // first look for global defined name\n            foreach ($this->definedNames as $dn) {\n                $upper = StringHelper::strToUpper($dn->getName());\n                if (\n                    !$dn->getLocalOnly()\n                    && $definedName === $upper\n                ) {\n                    $returnValue = $dn;\n\n                    break;\n                }\n            }\n\n            // then look for local defined name (has priority over global defined name if both names exist)\n            if ($worksheet !== null) {\n                $wsTitle = StringHelper::strToUpper($worksheet->getTitle());\n                $definedName = Preg::replace('/^.*!/', '', $definedName);\n                foreach ($this->definedNames as $dn) {\n                    $sheet = $dn->getScope() ?? $dn->getWorksheet();\n                    $upper = StringHelper::strToUpper($dn->getName());\n                    $upperTitle = StringHelper::strToUpper((string) $sheet?->getTitle());\n                    if (\n                        $dn->getLocalOnly()\n                        && $upper === $definedName\n                        && $upperTitle === $wsTitle\n                    ) {\n                        return $dn;\n                    }\n                }\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * Remove named range.\n     *\n     * @param null|Worksheet $worksheet scope: use null for global scope\n     *\n     * @return $this\n     */\n    public function removeNamedRange(string $namedRange, ?Worksheet $worksheet = null): self\n    {\n        if ($this->getNamedRange($namedRange, $worksheet) === null) {\n            return $this;\n        }\n\n        return $this->removeDefinedName($namedRange, $worksheet);\n    }\n\n    /**\n     * Remove named formula.\n     *\n     * @param null|Worksheet $worksheet scope: use null for global scope\n     *\n     * @return $this\n     */\n    public function removeNamedFormula(string $namedFormula, ?Worksheet $worksheet = null): self\n    {\n        if ($this->getNamedFormula($namedFormula, $worksheet) === null) {\n            return $this;\n        }\n\n        return $this->removeDefinedName($namedFormula, $worksheet);\n    }\n\n    /**\n     * Remove defined name.\n     *\n     * @param null|Worksheet $worksheet scope: use null for global scope\n     *\n     * @return $this\n     */\n    public function removeDefinedName(string $definedName, ?Worksheet $worksheet = null): self\n    {\n        $definedName = StringHelper::strToUpper($definedName);\n\n        if ($worksheet === null) {\n            if (isset($this->definedNames[$definedName])) {\n                unset($this->definedNames[$definedName]);\n            }\n        } else {\n            if (isset($this->definedNames[$worksheet->getTitle() . '!' . $definedName])) {\n                unset($this->definedNames[$worksheet->getTitle() . '!' . $definedName]);\n            } elseif (isset($this->definedNames[$definedName])) {\n                unset($this->definedNames[$definedName]);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get worksheet iterator.\n     */\n    public function getWorksheetIterator(): Iterator\n    {\n        return new Iterator($this);\n    }\n\n    /**\n     * Copy workbook (!= clone!).\n     */\n    public function copy(): self\n    {\n        return unserialize(serialize($this)); //* @phpstan-ignore-line\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $this->uniqueID = uniqid('', true);\n\n        $usedKeys = [];\n        // I don't know why new Style rather than clone.\n        $this->cellXfSupervisor = new Style(true);\n        //$this->cellXfSupervisor = clone $this->cellXfSupervisor;\n        $this->cellXfSupervisor->bindParent($this);\n        $usedKeys['cellXfSupervisor'] = true;\n\n        $oldCalc = $this->calculationEngine;\n        $this->calculationEngine = new Calculation($this);\n        $this->calculationEngine\n            ->setSuppressFormulaErrors(\n                $oldCalc->getSuppressFormulaErrors()\n            )\n            ->setCalculationCacheEnabled(\n                $oldCalc->getCalculationCacheEnabled()\n            )\n            ->setBranchPruningEnabled(\n                $oldCalc->getBranchPruningEnabled()\n            )\n            ->setInstanceArrayReturnType(\n                $oldCalc->getInstanceArrayReturnType()\n            );\n        $usedKeys['calculationEngine'] = true;\n\n        $currentCollection = $this->cellStyleXfCollection;\n        $this->cellStyleXfCollection = [];\n        foreach ($currentCollection as $item) {\n            $clone = $item->exportArray();\n            $style = (new Style())->applyFromArray($clone);\n            $this->addCellStyleXf($style);\n        }\n        $usedKeys['cellStyleXfCollection'] = true;\n\n        $currentCollection = $this->cellXfCollection;\n        $this->cellXfCollection = [];\n        foreach ($currentCollection as $item) {\n            $clone = $item->exportArray();\n            $style = (new Style())->applyFromArray($clone);\n            $this->addCellXf($style);\n        }\n        $usedKeys['cellXfCollection'] = true;\n\n        $currentCollection = $this->workSheetCollection;\n        $this->workSheetCollection = [];\n        foreach ($currentCollection as $item) {\n            $clone = clone $item;\n            $clone->setParent($this);\n            $this->workSheetCollection[] = $clone;\n        }\n        $usedKeys['workSheetCollection'] = true;\n\n        foreach (get_object_vars($this) as $key => $val) {\n            if (isset($usedKeys[$key])) {\n                continue;\n            }\n            switch ($key) {\n                // arrays of objects not covered above\n                case 'definedNames':\n                    /** @var DefinedName[] */\n                    $currentCollection = $val;\n                    $this->$key = [];\n                    foreach ($currentCollection as $item) {\n                        $clone = clone $item;\n                        $title = $clone->getWorksheet()?->getTitle();\n                        if ($title !== null) {\n                            $ws = $this->getSheetByName($title);\n                            $clone->setWorksheet($ws);\n                        }\n                        $title = $clone->getScope()?->getTitle();\n                        if ($title !== null) {\n                            $ws = $this->getSheetByName($title);\n                            $clone->setScope($ws);\n                        }\n                        $this->{$key}[] = $clone;\n                    }\n\n                    break;\n                default:\n                    if (is_object($val)) {\n                        $this->$key = clone $val;\n                    }\n            }\n        }\n    }\n\n    /**\n     * Get the workbook collection of cellXfs.\n     *\n     * @return Style[]\n     */\n    public function getCellXfCollection(): array\n    {\n        return $this->cellXfCollection;\n    }\n\n    /**\n     * Get cellXf by index.\n     */\n    public function getCellXfByIndex(int $cellStyleIndex): Style\n    {\n        return $this->cellXfCollection[$cellStyleIndex];\n    }\n\n    public function getCellXfByIndexOrNull(?int $cellStyleIndex): ?Style\n    {\n        return ($cellStyleIndex === null) ? null : ($this->cellXfCollection[$cellStyleIndex] ?? null);\n    }\n\n    /**\n     * Get cellXf by hash code.\n     *\n     * @return false|Style\n     */\n    public function getCellXfByHashCode(string $hashcode): bool|Style\n    {\n        foreach ($this->cellXfCollection as $cellXf) {\n            if ($cellXf->getHashCode() === $hashcode) {\n                return $cellXf;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Check if style exists in style collection.\n     */\n    public function cellXfExists(Style $cellStyleIndex): bool\n    {\n        return in_array($cellStyleIndex, $this->cellXfCollection, true);\n    }\n\n    /**\n     * Get default style.\n     */\n    public function getDefaultStyle(): Style\n    {\n        if (isset($this->cellXfCollection[0])) {\n            return $this->cellXfCollection[0];\n        }\n\n        throw new Exception('No default style found for this workbook');\n    }\n\n    /**\n     * Add a cellXf to the workbook.\n     */\n    public function addCellXf(Style $style): void\n    {\n        $this->cellXfCollection[] = $style;\n        $style->setIndex(count($this->cellXfCollection) - 1);\n    }\n\n    /**\n     * Remove cellXf by index. It is ensured that all cells get their xf index updated.\n     *\n     * @param int $cellStyleIndex Index to cellXf\n     */\n    public function removeCellXfByIndex(int $cellStyleIndex): void\n    {\n        if ($cellStyleIndex > count($this->cellXfCollection) - 1) {\n            throw new Exception('CellXf index is out of bounds.');\n        }\n\n        // first remove the cellXf\n        array_splice($this->cellXfCollection, $cellStyleIndex, 1);\n\n        // then update cellXf indexes for cells\n        foreach ($this->workSheetCollection as $worksheet) {\n            foreach ($worksheet->getCoordinates(false) as $coordinate) {\n                $cell = $worksheet->getCell($coordinate);\n                $xfIndex = $cell->getXfIndex();\n                if ($xfIndex > $cellStyleIndex) {\n                    // decrease xf index by 1\n                    $cell->setXfIndex($xfIndex - 1);\n                } elseif ($xfIndex == $cellStyleIndex) {\n                    // set to default xf index 0\n                    $cell->setXfIndex(0);\n                }\n            }\n        }\n    }\n\n    /**\n     * Get the cellXf supervisor.\n     */\n    public function getCellXfSupervisor(): Style\n    {\n        return $this->cellXfSupervisor;\n    }\n\n    /**\n     * Get the workbook collection of cellStyleXfs.\n     *\n     * @return Style[]\n     */\n    public function getCellStyleXfCollection(): array\n    {\n        return $this->cellStyleXfCollection;\n    }\n\n    /**\n     * Get cellStyleXf by index.\n     *\n     * @param int $cellStyleIndex Index to cellXf\n     */\n    public function getCellStyleXfByIndex(int $cellStyleIndex): Style\n    {\n        return $this->cellStyleXfCollection[$cellStyleIndex];\n    }\n\n    /**\n     * Get cellStyleXf by hash code.\n     *\n     * @return false|Style\n     */\n    public function getCellStyleXfByHashCode(string $hashcode): bool|Style\n    {\n        foreach ($this->cellStyleXfCollection as $cellStyleXf) {\n            if ($cellStyleXf->getHashCode() === $hashcode) {\n                return $cellStyleXf;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Add a cellStyleXf to the workbook.\n     */\n    public function addCellStyleXf(Style $style): void\n    {\n        $this->cellStyleXfCollection[] = $style;\n        $style->setIndex(count($this->cellStyleXfCollection) - 1);\n    }\n\n    /**\n     * Remove cellStyleXf by index.\n     *\n     * @param int $cellStyleIndex Index to cellXf\n     */\n    public function removeCellStyleXfByIndex(int $cellStyleIndex): void\n    {\n        if ($cellStyleIndex > count($this->cellStyleXfCollection) - 1) {\n            throw new Exception('CellStyleXf index is out of bounds.');\n        }\n        array_splice($this->cellStyleXfCollection, $cellStyleIndex, 1);\n    }\n\n    /**\n     * Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells\n     * and columns in the workbook.\n     */\n    public function garbageCollect(): void\n    {\n        // how many references are there to each cellXf ?\n        $countReferencesCellXf = [];\n        foreach ($this->cellXfCollection as $index => $cellXf) {\n            $countReferencesCellXf[$index] = 0;\n        }\n\n        foreach ($this->getWorksheetIterator() as $sheet) {\n            // from cells\n            foreach ($sheet->getCoordinates(false) as $coordinate) {\n                $cell = $sheet->getCell($coordinate);\n                ++$countReferencesCellXf[$cell->getXfIndex()];\n            }\n\n            // from row dimensions\n            foreach ($sheet->getRowDimensions() as $rowDimension) {\n                if ($rowDimension->getXfIndex() !== null) {\n                    ++$countReferencesCellXf[$rowDimension->getXfIndex()];\n                }\n            }\n\n            // from column dimensions\n            foreach ($sheet->getColumnDimensions() as $columnDimension) {\n                ++$countReferencesCellXf[$columnDimension->getXfIndex()];\n            }\n        }\n\n        // remove cellXfs without references and create mapping so we can update xfIndex\n        // for all cells and columns\n        $countNeededCellXfs = 0;\n        $map = [];\n        foreach ($this->cellXfCollection as $index => $cellXf) {\n            if ($countReferencesCellXf[$index] > 0 || $index == 0) { // we must never remove the first cellXf\n                ++$countNeededCellXfs;\n            } else {\n                unset($this->cellXfCollection[$index]);\n            }\n            $map[$index] = $countNeededCellXfs - 1;\n        }\n        $this->cellXfCollection = array_values($this->cellXfCollection);\n\n        // update the index for all cellXfs\n        foreach ($this->cellXfCollection as $i => $cellXf) {\n            $cellXf->setIndex($i);\n        }\n\n        // make sure there is always at least one cellXf (there should be)\n        if (empty($this->cellXfCollection)) {\n            $this->cellXfCollection[] = new Style();\n        }\n\n        // update the xfIndex for all cells, row dimensions, column dimensions\n        foreach ($this->getWorksheetIterator() as $sheet) {\n            // for all cells\n            foreach ($sheet->getCoordinates(false) as $coordinate) {\n                $cell = $sheet->getCell($coordinate);\n                $cell->setXfIndex($map[$cell->getXfIndex()]);\n            }\n\n            // for all row dimensions\n            foreach ($sheet->getRowDimensions() as $rowDimension) {\n                if ($rowDimension->getXfIndex() !== null) {\n                    $rowDimension->setXfIndex($map[$rowDimension->getXfIndex()]);\n                }\n            }\n\n            // for all column dimensions\n            foreach ($sheet->getColumnDimensions() as $columnDimension) {\n                $columnDimension->setXfIndex($map[$columnDimension->getXfIndex()]);\n            }\n\n            // also do garbage collection for all the sheets\n            $sheet->garbageCollect();\n        }\n    }\n\n    /**\n     * Return the unique ID value assigned to this spreadsheet workbook.\n     *\n     * @deprecated 5.2.0 Serves no useful purpose. No replacement.\n     *\n     * @codeCoverageIgnore\n     */\n    public function getID(): string\n    {\n        return $this->uniqueID;\n    }\n\n    /**\n     * Get the visibility of the horizonal scroll bar in the application.\n     *\n     * @return bool True if horizonal scroll bar is visible\n     */\n    public function getShowHorizontalScroll(): bool\n    {\n        return $this->showHorizontalScroll;\n    }\n\n    /**\n     * Set the visibility of the horizonal scroll bar in the application.\n     *\n     * @param bool $showHorizontalScroll True if horizonal scroll bar is visible\n     */\n    public function setShowHorizontalScroll(bool $showHorizontalScroll): void\n    {\n        $this->showHorizontalScroll = (bool) $showHorizontalScroll;\n    }\n\n    /**\n     * Get the visibility of the vertical scroll bar in the application.\n     *\n     * @return bool True if vertical scroll bar is visible\n     */\n    public function getShowVerticalScroll(): bool\n    {\n        return $this->showVerticalScroll;\n    }\n\n    /**\n     * Set the visibility of the vertical scroll bar in the application.\n     *\n     * @param bool $showVerticalScroll True if vertical scroll bar is visible\n     */\n    public function setShowVerticalScroll(bool $showVerticalScroll): void\n    {\n        $this->showVerticalScroll = (bool) $showVerticalScroll;\n    }\n\n    /**\n     * Get the visibility of the sheet tabs in the application.\n     *\n     * @return bool True if the sheet tabs are visible\n     */\n    public function getShowSheetTabs(): bool\n    {\n        return $this->showSheetTabs;\n    }\n\n    /**\n     * Set the visibility of the sheet tabs  in the application.\n     *\n     * @param bool $showSheetTabs True if sheet tabs are visible\n     */\n    public function setShowSheetTabs(bool $showSheetTabs): void\n    {\n        $this->showSheetTabs = (bool) $showSheetTabs;\n    }\n\n    /**\n     * Return whether the workbook window is minimized.\n     *\n     * @return bool true if workbook window is minimized\n     */\n    public function getMinimized(): bool\n    {\n        return $this->minimized;\n    }\n\n    /**\n     * Set whether the workbook window is minimized.\n     *\n     * @param bool $minimized true if workbook window is minimized\n     */\n    public function setMinimized(bool $minimized): void\n    {\n        $this->minimized = (bool) $minimized;\n    }\n\n    /**\n     * Return whether to group dates when presenting the user with\n     * filtering options in the user interface.\n     *\n     * @return bool true if workbook window is minimized\n     */\n    public function getAutoFilterDateGrouping(): bool\n    {\n        return $this->autoFilterDateGrouping;\n    }\n\n    /**\n     * Set whether to group dates when presenting the user with\n     * filtering options in the user interface.\n     *\n     * @param bool $autoFilterDateGrouping true if workbook window is minimized\n     */\n    public function setAutoFilterDateGrouping(bool $autoFilterDateGrouping): void\n    {\n        $this->autoFilterDateGrouping = (bool) $autoFilterDateGrouping;\n    }\n\n    /**\n     * Return the first sheet in the book view.\n     *\n     * @return int First sheet in book view\n     */\n    public function getFirstSheetIndex(): int\n    {\n        return $this->firstSheetIndex;\n    }\n\n    /**\n     * Set the first sheet in the book view.\n     *\n     * @param int $firstSheetIndex First sheet in book view\n     */\n    public function setFirstSheetIndex(int $firstSheetIndex): void\n    {\n        if ($firstSheetIndex >= 0) {\n            $this->firstSheetIndex = (int) $firstSheetIndex;\n        } else {\n            throw new Exception('First sheet index must be a positive integer.');\n        }\n    }\n\n    /**\n     * Return the visibility status of the workbook.\n     *\n     * This may be one of the following three values:\n     * - visibile\n     *\n     * @return string Visible status\n     */\n    public function getVisibility(): string\n    {\n        return $this->visibility;\n    }\n\n    /**\n     * Set the visibility status of the workbook.\n     *\n     * Valid values are:\n     *  - 'visible' (self::VISIBILITY_VISIBLE):\n     *       Workbook window is visible\n     *  - 'hidden' (self::VISIBILITY_HIDDEN):\n     *       Workbook window is hidden, but can be shown by the user\n     *       via the user interface\n     *  - 'veryHidden' (self::VISIBILITY_VERY_HIDDEN):\n     *       Workbook window is hidden and cannot be shown in the\n     *       user interface.\n     *\n     * @param null|string $visibility visibility status of the workbook\n     */\n    public function setVisibility(?string $visibility): void\n    {\n        if ($visibility === null) {\n            $visibility = self::VISIBILITY_VISIBLE;\n        }\n\n        if (in_array($visibility, self::WORKBOOK_VIEW_VISIBILITY_VALUES)) {\n            $this->visibility = $visibility;\n        } else {\n            throw new Exception('Invalid visibility value.');\n        }\n    }\n\n    /**\n     * Get the ratio between the workbook tabs bar and the horizontal scroll bar.\n     * TabRatio is assumed to be out of 1000 of the horizontal window width.\n     *\n     * @return int Ratio between the workbook tabs bar and the horizontal scroll bar\n     */\n    public function getTabRatio(): int\n    {\n        return $this->tabRatio;\n    }\n\n    /**\n     * Set the ratio between the workbook tabs bar and the horizontal scroll bar\n     * TabRatio is assumed to be out of 1000 of the horizontal window width.\n     *\n     * @param int $tabRatio Ratio between the tabs bar and the horizontal scroll bar\n     */\n    public function setTabRatio(int $tabRatio): void\n    {\n        if ($tabRatio >= 0 && $tabRatio <= 1000) {\n            $this->tabRatio = (int) $tabRatio;\n        } else {\n            throw new Exception('Tab ratio must be between 0 and 1000.');\n        }\n    }\n\n    public function reevaluateAutoFilters(bool $resetToMax): void\n    {\n        foreach ($this->workSheetCollection as $sheet) {\n            $filter = $sheet->getAutoFilter();\n            if (!empty($filter->getRange())) {\n                if ($resetToMax) {\n                    $filter->setRangeToMaxRow();\n                }\n                $filter->showHideRows();\n            }\n        }\n    }\n\n    /**\n     * @throws Exception\n     */\n    public function jsonSerialize(): mixed\n    {\n        throw new Exception('Spreadsheet objects cannot be json encoded');\n    }\n\n    public function resetThemeFonts(): void\n    {\n        $majorFontLatin = $this->theme->getMajorFontLatin();\n        $minorFontLatin = $this->theme->getMinorFontLatin();\n        foreach ($this->cellXfCollection as $cellStyleXf) {\n            $scheme = $cellStyleXf->getFont()->getScheme();\n            if ($scheme === 'major') {\n                $cellStyleXf->getFont()->setName($majorFontLatin)->setScheme($scheme);\n            } elseif ($scheme === 'minor') {\n                $cellStyleXf->getFont()->setName($minorFontLatin)->setScheme($scheme);\n            }\n        }\n        foreach ($this->cellStyleXfCollection as $cellStyleXf) {\n            $scheme = $cellStyleXf->getFont()->getScheme();\n            if ($scheme === 'major') {\n                $cellStyleXf->getFont()->setName($majorFontLatin)->setScheme($scheme);\n            } elseif ($scheme === 'minor') {\n                $cellStyleXf->getFont()->setName($minorFontLatin)->setScheme($scheme);\n            }\n        }\n    }\n\n    public function getTableByName(string $tableName): ?Table\n    {\n        $table = null;\n        foreach ($this->workSheetCollection as $sheet) {\n            $table = $sheet->getTableByName($tableName);\n            if ($table !== null) {\n                break;\n            }\n        }\n\n        return $table;\n    }\n\n    /**\n     * @return bool Success or failure\n     */\n    public function setExcelCalendar(int $baseYear): bool\n    {\n        if (($baseYear === Date::CALENDAR_WINDOWS_1900) || ($baseYear === Date::CALENDAR_MAC_1904)) {\n            $this->excelCalendar = $baseYear;\n\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * @return int Excel base date (1900 or 1904)\n     */\n    public function getExcelCalendar(): int\n    {\n        return $this->excelCalendar;\n    }\n\n    public function deleteLegacyDrawing(Worksheet $worksheet): void\n    {\n        unset($this->unparsedLoadedData['sheets'][$worksheet->getCodeName()]['legacyDrawing']);\n    }\n\n    public function getLegacyDrawing(Worksheet $worksheet): ?string\n    {\n        /** @var ?string */\n        $temp = $this->unparsedLoadedData['sheets'][$worksheet->getCodeName()]['legacyDrawing'] ?? null;\n\n        return $temp;\n    }\n\n    public function getValueBinder(): ?IValueBinder\n    {\n        return $this->valueBinder;\n    }\n\n    public function setValueBinder(?IValueBinder $valueBinder): self\n    {\n        $this->valueBinder = $valueBinder;\n\n        return $this;\n    }\n\n    /**\n     * All the PDF writers treat charts as if they occupy a single cell.\n     * This will be better most of the time.\n     * It is not needed for any other output type.\n     * It changes the contents of the spreadsheet, so you might\n     * be better off cloning the spreadsheet and then using\n     * this method on, and then writing, the clone.\n     */\n    public function mergeChartCellsForPdf(): void\n    {\n        foreach ($this->workSheetCollection as $worksheet) {\n            foreach ($worksheet->getChartCollection() as $chart) {\n                $br = $chart->getBottomRightCell();\n                $tl = $chart->getTopLeftCell();\n                if ($br !== '' && $br !== $tl) {\n                    if (!$worksheet->cellExists($br)) {\n                        $worksheet->getCell($br)->setValue(' ');\n                    }\n                    $worksheet->mergeCells(\"$tl:$br\");\n                }\n            }\n        }\n    }\n\n    /**\n     * All the PDF writers do better with drawings than charts.\n     * This will be better some of the time.\n     * It is not needed for any other output type.\n     * It changes the contents of the spreadsheet, so you might\n     * be better off cloning the spreadsheet and then using\n     * this method on, and then writing, the clone.\n     */\n    public function mergeDrawingCellsForPdf(): void\n    {\n        foreach ($this->workSheetCollection as $worksheet) {\n            foreach ($worksheet->getDrawingCollection() as $drawing) {\n                $br = $drawing->getCoordinates2();\n                $tl = $drawing->getCoordinates();\n                if ($br !== '' && $br !== $tl) {\n                    if (!$worksheet->cellExists($br)) {\n                        $worksheet->getCell($br)->setValue(' ');\n                    }\n                    $worksheet->mergeCells(\"$tl:$br\");\n                }\n            }\n        }\n    }\n\n    /**\n     * Excel will sometimes replace user's formatting choice\n     * with a built-in choice that it thinks is equivalent.\n     * Its choice is often not equivalent after all.\n     * Such treatment is astonishingly user-hostile.\n     * This function will undo such changes.\n     */\n    public function replaceBuiltinNumberFormat(int $builtinFormatIndex, string $formatCode): void\n    {\n        foreach ($this->cellXfCollection as $style) {\n            $numberFormat = $style->getNumberFormat();\n            if ($numberFormat->getBuiltInFormatCode() === $builtinFormatIndex) {\n                $numberFormat->setFormatCode($formatCode);\n            }\n        }\n    }\n\n    /**\n     * Change all 2-digit-year date styles to use 4-digit year;\n     * change all dd-mm-yyyy and mm-dd-yyyy styles to yyyy-mm-dd;\n     * dd-mmm-yyyy is unambiguous and left unchanged.\n     */\n    public function disambiguateDateStyles(): void\n    {\n        foreach ($this->cellXfCollection as $style) {\n            $numberFormat = $style->getNumberFormat();\n            $oldFormat = (string) $numberFormat->getFormatCode();\n            $newFormat = Preg::replace('/\\byy\\b/i', 'yyyy', $oldFormat);\n            $newFormat = Preg::replace(\n                '~\\bdd?(-|/|\"-\"|\"/\")'\n                    . 'mm?(-|/|\"-\"|\"/\")'\n                    . 'yyyy~',\n                'yyyy-mm-dd',\n                $newFormat\n            );\n            $newFormat = Preg::replace(\n                '~\\bmm?(-|/|\"-\"|\"/\")'\n                    . 'dd?(-|/|\"-\"|\"/\")'\n                    . 'yyyy~',\n                'yyyy-mm-dd',\n                $newFormat\n            );\n            if ($newFormat !== $oldFormat) {\n                $numberFormat->setFormatCode($newFormat);\n            }\n        }\n    }\n\n    public function returnArrayAsArray(): void\n    {\n        $this->calculationEngine->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n    }\n\n    public function returnArrayAsValue(): void\n    {\n        $this->calculationEngine->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n    }\n\n    /** @var string[] */\n    private $domainWhiteList = [];\n\n    /**\n     * Currently used only by WEBSERVICE function.\n     *\n     * @param string[] $domainWhiteList\n     */\n    public function setDomainWhiteList(array $domainWhiteList): self\n    {\n        $this->domainWhiteList = $domainWhiteList;\n\n        return $this;\n    }\n\n    /** @return string[] */\n    public function getDomainWhiteList(): array\n    {\n        return $this->domainWhiteList;\n    }\n\n    private bool $usesCheckBoxStyle = false;\n\n    public function getUsesCheckBoxStyle(): bool\n    {\n        return $this->usesCheckBoxStyle;\n    }\n\n    public function setUsesCheckBoxStyle(): bool\n    {\n        $this->usesCheckBoxStyle = false;\n        foreach ($this->getCellXfCollection() as $cellXf) {\n            if ($cellXf->getCheckBox()) {\n                $this->usesCheckBoxStyle = true;\n\n                break;\n            }\n        }\n\n        return $this->usesCheckBoxStyle;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Alignment.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass Alignment extends Supervisor\n{\n    // Horizontal alignment styles\n    const HORIZONTAL_GENERAL = 'general';\n    const HORIZONTAL_LEFT = 'left';\n    const HORIZONTAL_RIGHT = 'right';\n    const HORIZONTAL_CENTER = 'center';\n    const HORIZONTAL_CENTER_CONTINUOUS = 'centerContinuous';\n    const HORIZONTAL_JUSTIFY = 'justify';\n    const HORIZONTAL_FILL = 'fill';\n    const HORIZONTAL_DISTRIBUTED = 'distributed'; // Excel2007 only\n    private const HORIZONTAL_CENTER_CONTINUOUS_LC = 'centercontinuous';\n    // Mapping for horizontal alignment\n    const HORIZONTAL_ALIGNMENT_FOR_XLSX = [\n        self::HORIZONTAL_LEFT => self::HORIZONTAL_LEFT,\n        self::HORIZONTAL_RIGHT => self::HORIZONTAL_RIGHT,\n        self::HORIZONTAL_CENTER => self::HORIZONTAL_CENTER,\n        self::HORIZONTAL_CENTER_CONTINUOUS => self::HORIZONTAL_CENTER_CONTINUOUS,\n        self::HORIZONTAL_JUSTIFY => self::HORIZONTAL_JUSTIFY,\n        self::HORIZONTAL_FILL => self::HORIZONTAL_FILL,\n        self::HORIZONTAL_DISTRIBUTED => self::HORIZONTAL_DISTRIBUTED,\n    ];\n    // Mapping for horizontal alignment CSS\n    const HORIZONTAL_ALIGNMENT_FOR_HTML = [\n        self::HORIZONTAL_LEFT => self::HORIZONTAL_LEFT,\n        self::HORIZONTAL_RIGHT => self::HORIZONTAL_RIGHT,\n        self::HORIZONTAL_CENTER => self::HORIZONTAL_CENTER,\n        self::HORIZONTAL_CENTER_CONTINUOUS => self::HORIZONTAL_CENTER,\n        self::HORIZONTAL_JUSTIFY => self::HORIZONTAL_JUSTIFY,\n        //self::HORIZONTAL_FILL => self::HORIZONTAL_FILL, // no reasonable equivalent for fill\n        self::HORIZONTAL_DISTRIBUTED => self::HORIZONTAL_JUSTIFY,\n    ];\n\n    // Vertical alignment styles\n    const VERTICAL_BOTTOM = 'bottom';\n    const VERTICAL_TOP = 'top';\n    const VERTICAL_CENTER = 'center';\n    const VERTICAL_JUSTIFY = 'justify';\n    const VERTICAL_DISTRIBUTED = 'distributed'; // Excel2007 only\n    // Vertical alignment CSS\n    private const VERTICAL_BASELINE = 'baseline';\n    private const VERTICAL_MIDDLE = 'middle';\n    private const VERTICAL_SUB = 'sub';\n    private const VERTICAL_SUPER = 'super';\n    private const VERTICAL_TEXT_BOTTOM = 'text-bottom';\n    private const VERTICAL_TEXT_TOP = 'text-top';\n\n    // Mapping for vertical alignment\n    const VERTICAL_ALIGNMENT_FOR_XLSX = [\n        self::VERTICAL_BOTTOM => self::VERTICAL_BOTTOM,\n        self::VERTICAL_TOP => self::VERTICAL_TOP,\n        self::VERTICAL_CENTER => self::VERTICAL_CENTER,\n        self::VERTICAL_JUSTIFY => self::VERTICAL_JUSTIFY,\n        self::VERTICAL_DISTRIBUTED => self::VERTICAL_DISTRIBUTED,\n        // css settings that aren't in sync with Excel\n        self::VERTICAL_BASELINE => self::VERTICAL_BOTTOM,\n        self::VERTICAL_MIDDLE => self::VERTICAL_CENTER,\n        self::VERTICAL_SUB => self::VERTICAL_BOTTOM,\n        self::VERTICAL_SUPER => self::VERTICAL_TOP,\n        self::VERTICAL_TEXT_BOTTOM => self::VERTICAL_BOTTOM,\n        self::VERTICAL_TEXT_TOP => self::VERTICAL_TOP,\n    ];\n\n    // Mapping for vertical alignment for Html\n    const VERTICAL_ALIGNMENT_FOR_HTML = [\n        self::VERTICAL_BOTTOM => self::VERTICAL_BOTTOM,\n        self::VERTICAL_TOP => self::VERTICAL_TOP,\n        self::VERTICAL_CENTER => self::VERTICAL_MIDDLE,\n        self::VERTICAL_JUSTIFY => self::VERTICAL_MIDDLE,\n        self::VERTICAL_DISTRIBUTED => self::VERTICAL_MIDDLE,\n        // css settings that aren't in sync with Excel\n        self::VERTICAL_BASELINE => self::VERTICAL_BASELINE,\n        self::VERTICAL_MIDDLE => self::VERTICAL_MIDDLE,\n        self::VERTICAL_SUB => self::VERTICAL_SUB,\n        self::VERTICAL_SUPER => self::VERTICAL_SUPER,\n        self::VERTICAL_TEXT_BOTTOM => self::VERTICAL_TEXT_BOTTOM,\n        self::VERTICAL_TEXT_TOP => self::VERTICAL_TEXT_TOP,\n    ];\n\n    // Read order\n    const READORDER_CONTEXT = 0;\n    const READORDER_LTR = 1;\n    const READORDER_RTL = 2;\n\n    // Special value for Text Rotation\n    const TEXTROTATION_STACK_EXCEL = 255;\n    const TEXTROTATION_STACK_PHPSPREADSHEET = -165; // 90 - 255\n\n    public const INDENT_UNITS_TO_PIXELS = 9;\n\n    /**\n     * Horizontal alignment.\n     */\n    protected ?string $horizontal = self::HORIZONTAL_GENERAL;\n\n    /**\n     * Justify Last Line alignment.\n     */\n    protected ?bool $justifyLastLine = null;\n\n    /**\n     * Vertical alignment.\n     */\n    protected ?string $vertical = self::VERTICAL_BOTTOM;\n\n    /**\n     * Text rotation.\n     */\n    protected ?int $textRotation = 0;\n\n    /**\n     * Wrap text.\n     */\n    protected bool $wrapText = false;\n\n    /**\n     * Shrink to fit.\n     */\n    protected bool $shrinkToFit = false;\n\n    /**\n     * Indent - only possible with horizontal alignment left and right.\n     */\n    protected int $indent = 0;\n\n    /**\n     * Read order.\n     */\n    protected int $readOrder = 0;\n\n    /**\n     * Create a new Alignment.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                       Leave this value at default unless you understand exactly what\n     *                                          its ramifications are\n     * @param bool $isConditional Flag indicating if this is a conditional style or not\n     *                                       Leave this value at default unless you understand exactly what\n     *                                          its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false, bool $isConditional = false)\n    {\n        // Supervisor?\n        parent::__construct($isSupervisor);\n\n        if ($isConditional) {\n            $this->horizontal = null;\n            $this->vertical = null;\n            $this->textRotation = null;\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        return $parent->getSharedComponent()->getAlignment();\n    }\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return array{alignment: mixed[]}\n     */\n    public function getStyleArray(array $array): array\n    {\n        return ['alignment' => $array];\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray(\n     *        [\n     *            'horizontal'   => \\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::HORIZONTAL_CENTER,\n     *            'vertical'     => \\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::VERTICAL_CENTER,\n     *            'textRotation' => 0,\n     *            'wrapText'     => TRUE\n     *        ]\n     * );\n     * </code>\n     *\n     * @param mixed[] $styleArray Array containing style information\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray): static\n    {\n        if ($this->isSupervisor) {\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())\n                ->applyFromArray($this->getStyleArray($styleArray));\n        } else {\n            /** @var array{horizontal?: string, vertical?: string, justifyLastLine?: bool, textRotation?: int, wrapText?: bool, shrinkToFit?: bool, readOrder?: int, indent?: int} $styleArray */\n            if (isset($styleArray['horizontal'])) {\n                $this->setHorizontal($styleArray['horizontal']);\n            }\n            if (isset($styleArray['justifyLastLine'])) {\n                $this->setJustifyLastLine($styleArray['justifyLastLine']);\n            }\n            if (isset($styleArray['vertical'])) {\n                $this->setVertical($styleArray['vertical']);\n            }\n            if (isset($styleArray['textRotation'])) {\n                $this->setTextRotation($styleArray['textRotation']);\n            }\n            if (isset($styleArray['wrapText'])) {\n                $this->setWrapText($styleArray['wrapText']);\n            }\n            if (isset($styleArray['shrinkToFit'])) {\n                $this->setShrinkToFit($styleArray['shrinkToFit']);\n            }\n            if (isset($styleArray['indent'])) {\n                $this->setIndent($styleArray['indent']);\n            }\n            if (isset($styleArray['readOrder'])) {\n                $this->setReadOrder($styleArray['readOrder']);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Horizontal.\n     */\n    public function getHorizontal(): null|string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHorizontal();\n        }\n\n        return $this->horizontal;\n    }\n\n    /**\n     * Set Horizontal.\n     *\n     * @param string $horizontalAlignment see self::HORIZONTAL_*\n     *\n     * @return $this\n     */\n    public function setHorizontal(string $horizontalAlignment): static\n    {\n        $horizontalAlignment = strtolower($horizontalAlignment);\n        if ($horizontalAlignment === self::HORIZONTAL_CENTER_CONTINUOUS_LC) {\n            $horizontalAlignment = self::HORIZONTAL_CENTER_CONTINUOUS;\n        }\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['horizontal' => $horizontalAlignment]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->horizontal = $horizontalAlignment;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Justify Last Line.\n     */\n    public function getJustifyLastLine(): ?bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getJustifyLastLine();\n        }\n\n        return $this->justifyLastLine;\n    }\n\n    /**\n     * Set Justify Last Line.\n     *\n     * @return $this\n     */\n    public function setJustifyLastLine(bool $justifyLastLine): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['justifyLastLine' => $justifyLastLine]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->justifyLastLine = $justifyLastLine;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Vertical.\n     */\n    public function getVertical(): null|string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getVertical();\n        }\n\n        return $this->vertical;\n    }\n\n    /**\n     * Set Vertical.\n     *\n     * @param string $verticalAlignment see self::VERTICAL_*\n     *\n     * @return $this\n     */\n    public function setVertical(string $verticalAlignment): static\n    {\n        $verticalAlignment = strtolower($verticalAlignment);\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['vertical' => $verticalAlignment]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->vertical = $verticalAlignment;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get TextRotation.\n     */\n    public function getTextRotation(): null|int\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getTextRotation();\n        }\n\n        return $this->textRotation;\n    }\n\n    /**\n     * Set TextRotation.\n     *\n     * @return $this\n     */\n    public function setTextRotation(int $angleInDegrees): static\n    {\n        // Excel2007 value 255 => PhpSpreadsheet value -165\n        if ($angleInDegrees == self::TEXTROTATION_STACK_EXCEL) {\n            $angleInDegrees = self::TEXTROTATION_STACK_PHPSPREADSHEET;\n        }\n\n        // Set rotation\n        if (($angleInDegrees >= -90 && $angleInDegrees <= 90) || $angleInDegrees == self::TEXTROTATION_STACK_PHPSPREADSHEET) {\n            if ($this->isSupervisor) {\n                $styleArray = $this->getStyleArray(['textRotation' => $angleInDegrees]);\n                $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            } else {\n                $this->textRotation = $angleInDegrees;\n            }\n        } else {\n            throw new PhpSpreadsheetException(\"Text rotation $angleInDegrees should be a value between -90 and 90.\");\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Wrap Text.\n     */\n    public function getWrapText(): bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getWrapText();\n        }\n\n        return $this->wrapText;\n    }\n\n    /**\n     * Set Wrap Text.\n     *\n     * @return $this\n     */\n    public function setWrapText(bool $wrapped): static\n    {\n        if ($wrapped == '') {\n            $wrapped = false;\n        }\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['wrapText' => $wrapped]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->wrapText = $wrapped;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Shrink to fit.\n     */\n    public function getShrinkToFit(): bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getShrinkToFit();\n        }\n\n        return $this->shrinkToFit;\n    }\n\n    /**\n     * Set Shrink to fit.\n     *\n     * @return $this\n     */\n    public function setShrinkToFit(bool $shrink): static\n    {\n        if ($shrink == '') {\n            $shrink = false;\n        }\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['shrinkToFit' => $shrink]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->shrinkToFit = $shrink;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get indent.\n     */\n    public function getIndent(): int\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getIndent();\n        }\n\n        return $this->indent;\n    }\n\n    /**\n     * Set indent.\n     *\n     * @return $this\n     */\n    public function setIndent(int $indent): static\n    {\n        if ($indent > 0) {\n            if (\n                $this->getHorizontal() != self::HORIZONTAL_GENERAL\n                && $this->getHorizontal() != self::HORIZONTAL_LEFT\n                && $this->getHorizontal() != self::HORIZONTAL_RIGHT\n                && $this->getHorizontal() != self::HORIZONTAL_DISTRIBUTED\n            ) {\n                $indent = 0; // indent not supported\n            }\n        }\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['indent' => $indent]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->indent = $indent;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get read order.\n     */\n    public function getReadOrder(): int\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getReadOrder();\n        }\n\n        return $this->readOrder;\n    }\n\n    /**\n     * Set read order.\n     *\n     * @return $this\n     */\n    public function setReadOrder(int $readOrder): static\n    {\n        if ($readOrder < 0 || $readOrder > 2) {\n            $readOrder = 0;\n        }\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['readOrder' => $readOrder]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->readOrder = $readOrder;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHashCode();\n        }\n\n        return md5(\n            $this->horizontal\n            . (($this->justifyLastLine === null) ? 'null' : ($this->justifyLastLine ? 't' : 'f'))\n            . $this->vertical\n            . $this->textRotation\n            . ($this->wrapText ? 't' : 'f')\n            . ($this->shrinkToFit ? 't' : 'f')\n            . $this->indent\n            . $this->readOrder\n            . __CLASS__\n        );\n    }\n\n    /** @return mixed[] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'horizontal', $this->getHorizontal());\n        $this->exportArray2($exportedArray, 'justifyLastLine', $this->getJustifyLastLine());\n        $this->exportArray2($exportedArray, 'indent', $this->getIndent());\n        $this->exportArray2($exportedArray, 'readOrder', $this->getReadOrder());\n        $this->exportArray2($exportedArray, 'shrinkToFit', $this->getShrinkToFit());\n        $this->exportArray2($exportedArray, 'textRotation', $this->getTextRotation());\n        $this->exportArray2($exportedArray, 'vertical', $this->getVertical());\n        $this->exportArray2($exportedArray, 'wrapText', $this->getWrapText());\n\n        return $exportedArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Border.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass Border extends Supervisor\n{\n    // Border style\n    const BORDER_NONE = 'none';\n    const BORDER_DASHDOT = 'dashDot';\n    const BORDER_DASHDOTDOT = 'dashDotDot';\n    const BORDER_DASHED = 'dashed';\n    const BORDER_DOTTED = 'dotted';\n    const BORDER_DOUBLE = 'double';\n    const BORDER_HAIR = 'hair';\n    const BORDER_MEDIUM = 'medium';\n    const BORDER_MEDIUMDASHDOT = 'mediumDashDot';\n    const BORDER_MEDIUMDASHDOTDOT = 'mediumDashDotDot';\n    const BORDER_MEDIUMDASHED = 'mediumDashed';\n    const BORDER_SLANTDASHDOT = 'slantDashDot';\n    const BORDER_THICK = 'thick';\n    const BORDER_THIN = 'thin';\n    const BORDER_OMIT = 'omit'; // should be used only for Conditional\n\n    /**\n     * Border style.\n     */\n    protected string $borderStyle = self::BORDER_NONE;\n\n    /**\n     * Border color.\n     */\n    protected Color $color;\n\n    public ?int $colorIndex = null;\n\n    /**\n     * Create a new Border.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false, bool $isConditional = false)\n    {\n        // Supervisor?\n        parent::__construct($isSupervisor);\n\n        // Initialise values\n        $this->color = new Color(Color::COLOR_BLACK, $isSupervisor);\n\n        // bind parent if we are a supervisor\n        if ($isSupervisor) {\n            $this->color->bindParent($this, 'color');\n        }\n        if ($isConditional) {\n            $this->borderStyle = self::BORDER_OMIT;\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        /** @var Borders $sharedComponent */\n        $sharedComponent = $parent->getSharedComponent();\n\n        return match ($this->parentPropertyName) {\n            'bottom' => $sharedComponent->getBottom(),\n            'diagonal' => $sharedComponent->getDiagonal(),\n            'left' => $sharedComponent->getLeft(),\n            'right' => $sharedComponent->getRight(),\n            'top' => $sharedComponent->getTop(),\n            default => throw new PhpSpreadsheetException('Cannot get shared component for a pseudo-border.'),\n        };\n    }\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return mixed[]\n     */\n    public function getStyleArray(array $array): array\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        return $parent->getStyleArray([$this->parentPropertyName => $array]);\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->getTop()->applyFromArray(\n     *        [\n     *            'borderStyle' => Border::BORDER_DASHDOT,\n     *            'color' => [\n     *                'rgb' => '808080'\n     *            ]\n     *        ]\n     * );\n     * </code>\n     *\n     * @param mixed[] $styleArray Array containing style information\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray): static\n    {\n        if ($this->isSupervisor) {\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($styleArray));\n        } else {\n            /** @var array{borderStyle?: string, color?: array{rgb?: string, argb?: string}} $styleArray */\n            if (isset($styleArray['borderStyle'])) {\n                $this->setBorderStyle($styleArray['borderStyle']);\n            }\n            if (isset($styleArray['color'])) {\n                $this->getColor()\n                    ->applyFromArray($styleArray['color']);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Border style.\n     */\n    public function getBorderStyle(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getBorderStyle();\n        }\n\n        return $this->borderStyle;\n    }\n\n    /**\n     * Set Border style.\n     *\n     * @param bool|string $style When passing a boolean, FALSE equates Border::BORDER_NONE\n     *                                and TRUE to Border::BORDER_MEDIUM\n     *\n     * @return $this\n     */\n    public function setBorderStyle(bool|string $style): static\n    {\n        if (empty($style)) {\n            $style = self::BORDER_NONE;\n        } elseif (is_bool($style)) {\n            $style = self::BORDER_MEDIUM;\n        }\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['borderStyle' => $style]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->borderStyle = $style;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Border Color.\n     */\n    public function getColor(): Color\n    {\n        return $this->color;\n    }\n\n    /**\n     * Set Border Color.\n     *\n     * @return $this\n     */\n    public function setColor(Color $color): static\n    {\n        // make sure parameter is a real color and not a supervisor\n        $color = $color->getIsSupervisor() ? $color->getSharedComponent() : $color;\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getColor()->getStyleArray(['argb' => $color->getARGB()]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->color = $color;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHashCode();\n        }\n\n        return md5(\n            $this->borderStyle\n            . $this->color->getHashCode()\n            . __CLASS__\n        );\n    }\n\n    /** @return mixed[] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'borderStyle', $this->getBorderStyle());\n        $this->exportArray2($exportedArray, 'color', $this->getColor());\n\n        return $exportedArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Borders.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass Borders extends Supervisor\n{\n    // Diagonal directions\n    const DIAGONAL_NONE = 0;\n    const DIAGONAL_UP = 1;\n    const DIAGONAL_DOWN = 2;\n    const DIAGONAL_BOTH = 3;\n\n    /**\n     * Left.\n     */\n    protected Border $left;\n\n    /**\n     * Right.\n     */\n    protected Border $right;\n\n    /**\n     * Top.\n     */\n    protected Border $top;\n\n    /**\n     * Bottom.\n     */\n    protected Border $bottom;\n\n    /**\n     * Diagonal.\n     */\n    protected Border $diagonal;\n\n    /**\n     * DiagonalDirection.\n     */\n    protected int $diagonalDirection;\n\n    /**\n     * All borders pseudo-border. Only applies to supervisor.\n     */\n    protected Border $allBorders;\n\n    /**\n     * Outline pseudo-border. Only applies to supervisor.\n     */\n    protected Border $outline;\n\n    /**\n     * Inside pseudo-border. Only applies to supervisor.\n     */\n    protected Border $inside;\n\n    /**\n     * Vertical pseudo-border. Only applies to supervisor.\n     */\n    protected Border $vertical;\n\n    /**\n     * Horizontal pseudo-border. Only applies to supervisor.\n     */\n    protected Border $horizontal;\n\n    /**\n     * Create a new Borders.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false, bool $isConditional = false)\n    {\n        // Supervisor?\n        parent::__construct($isSupervisor);\n\n        // Initialise values\n        $this->left = new Border($isSupervisor, $isConditional);\n        $this->right = new Border($isSupervisor, $isConditional);\n        $this->top = new Border($isSupervisor, $isConditional);\n        $this->bottom = new Border($isSupervisor, $isConditional);\n        $this->diagonal = new Border($isSupervisor, $isConditional);\n        $this->diagonalDirection = self::DIAGONAL_NONE;\n\n        // Specially for supervisor\n        if ($isSupervisor) {\n            // Initialize pseudo-borders\n            $this->allBorders = new Border(true, $isConditional);\n            $this->outline = new Border(true, $isConditional);\n            $this->inside = new Border(true, $isConditional);\n            $this->vertical = new Border(true, $isConditional);\n            $this->horizontal = new Border(true, $isConditional);\n\n            // bind parent if we are a supervisor\n            $this->left->bindParent($this, 'left');\n            $this->right->bindParent($this, 'right');\n            $this->top->bindParent($this, 'top');\n            $this->bottom->bindParent($this, 'bottom');\n            $this->diagonal->bindParent($this, 'diagonal');\n            $this->allBorders->bindParent($this, 'allBorders');\n            $this->outline->bindParent($this, 'outline');\n            $this->inside->bindParent($this, 'inside');\n            $this->vertical->bindParent($this, 'vertical');\n            $this->horizontal->bindParent($this, 'horizontal');\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        return $parent->getSharedComponent()->getBorders();\n    }\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return array{borders: mixed[]}\n     */\n    public function getStyleArray(array $array): array\n    {\n        return ['borders' => $array];\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(\n     *         [\n     *             'bottom' => [\n     *                 'borderStyle' => Border::BORDER_DASHDOT,\n     *                 'color' => [\n     *                     'rgb' => '808080'\n     *                 ]\n     *             ],\n     *             'top' => [\n     *                 'borderStyle' => Border::BORDER_DASHDOT,\n     *                 'color' => [\n     *                     'rgb' => '808080'\n     *                 ]\n     *             ]\n     *         ]\n     * );\n     * </code>\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(\n     *         [\n     *             'allBorders' => [\n     *                 'borderStyle' => Border::BORDER_DASHDOT,\n     *                 'color' => [\n     *                     'rgb' => '808080'\n     *                 ]\n     *             ]\n     *         ]\n     * );\n     * </code>\n     *\n     * @param mixed[] $styleArray Array containing style information\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray): static\n    {\n        if ($this->isSupervisor) {\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($styleArray));\n        } else {\n            /** @var array{left?: float[], right?: float[], top?: float[], bottom?: float[], diagonal?: mixed[], diagonalDirection?: int, allBorders?: mixed[][]} $styleArray */\n            if (isset($styleArray['left'])) {\n                $this->getLeft()->applyFromArray($styleArray['left']);\n            }\n            if (isset($styleArray['right'])) {\n                $this->getRight()->applyFromArray($styleArray['right']);\n            }\n            if (isset($styleArray['top'])) {\n                $this->getTop()->applyFromArray($styleArray['top']);\n            }\n            if (isset($styleArray['bottom'])) {\n                $this->getBottom()->applyFromArray($styleArray['bottom']);\n            }\n            if (isset($styleArray['diagonal'])) {\n                $this->getDiagonal()->applyFromArray($styleArray['diagonal']);\n            }\n            if (isset($styleArray['diagonalDirection'])) {\n                $this->setDiagonalDirection($styleArray['diagonalDirection']);\n            }\n            if (isset($styleArray['allBorders'])) {\n                $this->getLeft()->applyFromArray($styleArray['allBorders']);\n                $this->getRight()->applyFromArray($styleArray['allBorders']);\n                $this->getTop()->applyFromArray($styleArray['allBorders']);\n                $this->getBottom()->applyFromArray($styleArray['allBorders']);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Left.\n     */\n    public function getLeft(): Border\n    {\n        return $this->left;\n    }\n\n    /**\n     * Get Right.\n     */\n    public function getRight(): Border\n    {\n        return $this->right;\n    }\n\n    /**\n     * Get Top.\n     */\n    public function getTop(): Border\n    {\n        return $this->top;\n    }\n\n    /**\n     * Get Bottom.\n     */\n    public function getBottom(): Border\n    {\n        return $this->bottom;\n    }\n\n    /**\n     * Get Diagonal.\n     */\n    public function getDiagonal(): Border\n    {\n        return $this->diagonal;\n    }\n\n    /**\n     * Get AllBorders (pseudo-border). Only applies to supervisor.\n     */\n    public function getAllBorders(): Border\n    {\n        if (!$this->isSupervisor) {\n            throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.');\n        }\n\n        return $this->allBorders;\n    }\n\n    /**\n     * Get Outline (pseudo-border). Only applies to supervisor.\n     */\n    public function getOutline(): Border\n    {\n        if (!$this->isSupervisor) {\n            throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.');\n        }\n\n        return $this->outline;\n    }\n\n    /**\n     * Get Inside (pseudo-border). Only applies to supervisor.\n     */\n    public function getInside(): Border\n    {\n        if (!$this->isSupervisor) {\n            throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.');\n        }\n\n        return $this->inside;\n    }\n\n    /**\n     * Get Vertical (pseudo-border). Only applies to supervisor.\n     */\n    public function getVertical(): Border\n    {\n        if (!$this->isSupervisor) {\n            throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.');\n        }\n\n        return $this->vertical;\n    }\n\n    /**\n     * Get Horizontal (pseudo-border). Only applies to supervisor.\n     */\n    public function getHorizontal(): Border\n    {\n        if (!$this->isSupervisor) {\n            throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.');\n        }\n\n        return $this->horizontal;\n    }\n\n    /**\n     * Get DiagonalDirection.\n     */\n    public function getDiagonalDirection(): int\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getDiagonalDirection();\n        }\n\n        return $this->diagonalDirection;\n    }\n\n    /**\n     * Set DiagonalDirection.\n     *\n     * @param int $direction see self::DIAGONAL_*\n     *\n     * @return $this\n     */\n    public function setDiagonalDirection(int $direction): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['diagonalDirection' => $direction]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->diagonalDirection = $direction;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHashcode();\n        }\n\n        return md5(\n            $this->getLeft()->getHashCode()\n            . $this->getRight()->getHashCode()\n            . $this->getTop()->getHashCode()\n            . $this->getBottom()->getHashCode()\n            . $this->getDiagonal()->getHashCode()\n            . $this->getDiagonalDirection()\n            . __CLASS__\n        );\n    }\n\n    /** @return mixed[][] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'bottom', $this->getBottom());\n        $this->exportArray2($exportedArray, 'diagonal', $this->getDiagonal());\n        $this->exportArray2($exportedArray, 'diagonalDirection', $this->getDiagonalDirection());\n        $this->exportArray2($exportedArray, 'left', $this->getLeft());\n        $this->exportArray2($exportedArray, 'right', $this->getRight());\n        $this->exportArray2($exportedArray, 'top', $this->getTop());\n        /** @var mixed[][] $exportedArray */\n\n        return $exportedArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Color.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Theme;\n\nclass Color extends Supervisor\n{\n    const NAMED_COLORS = [\n        'Black',\n        'White',\n        'Red',\n        'Green',\n        'Blue',\n        'Yellow',\n        'Magenta',\n        'Cyan',\n    ];\n\n    // Colors\n    const COLOR_BLACK = 'FF000000';\n    const COLOR_WHITE = 'FFFFFFFF';\n    const COLOR_RED = 'FFFF0000';\n    const COLOR_DARKRED = 'FF800000';\n    const COLOR_BLUE = 'FF0000FF';\n    const COLOR_DARKBLUE = 'FF000080';\n    const COLOR_GREEN = 'FF00FF00';\n    const COLOR_DARKGREEN = 'FF008000';\n    const COLOR_YELLOW = 'FFFFFF00';\n    const COLOR_DARKYELLOW = 'FF808000';\n    const COLOR_MAGENTA = 'FFFF00FF';\n    const COLOR_CYAN = 'FF00FFFF';\n\n    const NAMED_COLOR_TRANSLATIONS = [\n        'Black' => self::COLOR_BLACK,\n        'White' => self::COLOR_WHITE,\n        'Red' => self::COLOR_RED,\n        'Green' => self::COLOR_GREEN,\n        'Blue' => self::COLOR_BLUE,\n        'Yellow' => self::COLOR_YELLOW,\n        'Magenta' => self::COLOR_MAGENTA,\n        'Cyan' => self::COLOR_CYAN,\n    ];\n\n    const VALIDATE_ARGB_SIZE = 8;\n    const VALIDATE_RGB_SIZE = 6;\n    const VALIDATE_COLOR_6 = '/^[A-F0-9]{6}$/i';\n    const VALIDATE_COLOR_8 = '/^[A-F0-9]{8}$/i';\n\n    private const INDEXED_COLORS = [\n        1 => 'FF000000', //  System Colour #1 - Black\n        2 => 'FFFFFFFF', //  System Colour #2 - White\n        3 => 'FFFF0000', //  System Colour #3 - Red\n        4 => 'FF00FF00', //  System Colour #4 - Green\n        5 => 'FF0000FF', //  System Colour #5 - Blue\n        6 => 'FFFFFF00', //  System Colour #6 - Yellow\n        7 => 'FFFF00FF', //  System Colour #7- Magenta\n        8 => 'FF00FFFF', //  System Colour #8- Cyan\n        9 => 'FF800000', //  Standard Colour #9\n        10 => 'FF008000', //  Standard Colour #10\n        11 => 'FF000080', //  Standard Colour #11\n        12 => 'FF808000', //  Standard Colour #12\n        13 => 'FF800080', //  Standard Colour #13\n        14 => 'FF008080', //  Standard Colour #14\n        15 => 'FFC0C0C0', //  Standard Colour #15\n        16 => 'FF808080', //  Standard Colour #16\n        17 => 'FF9999FF', //  Chart Fill Colour #17\n        18 => 'FF993366', //  Chart Fill Colour #18\n        19 => 'FFFFFFCC', //  Chart Fill Colour #19\n        20 => 'FFCCFFFF', //  Chart Fill Colour #20\n        21 => 'FF660066', //  Chart Fill Colour #21\n        22 => 'FFFF8080', //  Chart Fill Colour #22\n        23 => 'FF0066CC', //  Chart Fill Colour #23\n        24 => 'FFCCCCFF', //  Chart Fill Colour #24\n        25 => 'FF000080', //  Chart Line Colour #25\n        26 => 'FFFF00FF', //  Chart Line Colour #26\n        27 => 'FFFFFF00', //  Chart Line Colour #27\n        28 => 'FF00FFFF', //  Chart Line Colour #28\n        29 => 'FF800080', //  Chart Line Colour #29\n        30 => 'FF800000', //  Chart Line Colour #30\n        31 => 'FF008080', //  Chart Line Colour #31\n        32 => 'FF0000FF', //  Chart Line Colour #32\n        33 => 'FF00CCFF', //  Standard Colour #33\n        34 => 'FFCCFFFF', //  Standard Colour #34\n        35 => 'FFCCFFCC', //  Standard Colour #35\n        36 => 'FFFFFF99', //  Standard Colour #36\n        37 => 'FF99CCFF', //  Standard Colour #37\n        38 => 'FFFF99CC', //  Standard Colour #38\n        39 => 'FFCC99FF', //  Standard Colour #39\n        40 => 'FFFFCC99', //  Standard Colour #40\n        41 => 'FF3366FF', //  Standard Colour #41\n        42 => 'FF33CCCC', //  Standard Colour #42\n        43 => 'FF99CC00', //  Standard Colour #43\n        44 => 'FFFFCC00', //  Standard Colour #44\n        45 => 'FFFF9900', //  Standard Colour #45\n        46 => 'FFFF6600', //  Standard Colour #46\n        47 => 'FF666699', //  Standard Colour #47\n        48 => 'FF969696', //  Standard Colour #48\n        49 => 'FF003366', //  Standard Colour #49\n        50 => 'FF339966', //  Standard Colour #50\n        51 => 'FF003300', //  Standard Colour #51\n        52 => 'FF333300', //  Standard Colour #52\n        53 => 'FF993300', //  Standard Colour #53\n        54 => 'FF993366', //  Standard Colour #54\n        55 => 'FF333399', //  Standard Colour #55\n        56 => 'FF333333', //  Standard Colour #56\n    ];\n\n    /**\n     * ARGB - Alpha RGB.\n     */\n    protected ?string $argb = null;\n\n    private bool $hasChanged = false;\n\n    private int $theme = -1;\n\n    /**\n     * Create a new Color.\n     *\n     * @param string $colorValue ARGB value for the colour, or named colour\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     * @param bool $isConditional Flag indicating if this is a conditional style or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     */\n    public function __construct(string $colorValue = self::COLOR_BLACK, bool $isSupervisor = false, bool $isConditional = false)\n    {\n        //    Supervisor?\n        parent::__construct($isSupervisor);\n\n        //    Initialise values\n        if (!$isConditional) {\n            $this->argb = $this->validateColor($colorValue) ?: self::COLOR_BLACK;\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n        /** @var Border|Fill $sharedComponent */\n        $sharedComponent = $parent->getSharedComponent();\n        if ($sharedComponent instanceof Fill) {\n            if ($this->parentPropertyName === 'endColor') {\n                return $sharedComponent->getEndColor();\n            }\n\n            return $sharedComponent->getStartColor();\n        }\n\n        return $sharedComponent->getColor();\n    }\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return mixed[]\n     */\n    public function getStyleArray(array $array): array\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        return $parent->getStyleArray([$this->parentPropertyName => $array]);\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getFont()->getColor()->applyFromArray(['rgb' => '808080']);\n     * </code>\n     *\n     * @param array{rgb?: string, argb?: string, theme?: int} $styleArray Array containing style information\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray): static\n    {\n        if ($this->isSupervisor) {\n            $this->getActiveSheet()\n                ->getStyle($this->getSelectedCells())\n                ->applyFromArray(\n                    $this->getStyleArray($styleArray)\n                );\n        } else {\n            if (isset($styleArray['rgb'])) {\n                $this->setRGB($styleArray['rgb']);\n            }\n            if (isset($styleArray['argb'])) {\n                $this->setARGB($styleArray['argb']);\n            }\n            if (isset($styleArray['theme'])) {\n                $this->setTheme($styleArray['theme']);\n            }\n        }\n\n        return $this;\n    }\n\n    private function validateColor(?string $colorValue): string\n    {\n        if ($colorValue === null || $colorValue === '') {\n            return self::COLOR_BLACK;\n        }\n        $named = ucfirst(strtolower($colorValue));\n        if (array_key_exists($named, self::NAMED_COLOR_TRANSLATIONS)) {\n            return self::NAMED_COLOR_TRANSLATIONS[$named];\n        }\n        if (preg_match(self::VALIDATE_COLOR_8, $colorValue) === 1) {\n            return $colorValue;\n        }\n        if (preg_match(self::VALIDATE_COLOR_6, $colorValue) === 1) {\n            return 'FF' . $colorValue;\n        }\n\n        return '';\n    }\n\n    /**\n     * Get ARGB.\n     */\n    public function getARGB(): ?string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getARGB();\n        }\n\n        return $this->argb;\n    }\n\n    /**\n     * Set ARGB.\n     *\n     * @param ?string $colorValue  ARGB value, or a named color\n     *\n     * @return $this\n     */\n    public function setARGB(?string $colorValue = self::COLOR_BLACK, bool $nullStringOkay = false): static\n    {\n        $this->hasChanged = true;\n        $this->setTheme(-1);\n        if (!$nullStringOkay || $colorValue !== '') {\n            $colorValue = $this->validateColor($colorValue);\n            if ($colorValue === '') {\n                return $this;\n            }\n        }\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['argb' => $colorValue]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->argb = $colorValue;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get RGB.\n     */\n    public function getRGB(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getRGB();\n        }\n\n        return substr($this->argb ?? '', 2);\n    }\n\n    /**\n     * Set RGB.\n     *\n     * @param ?string $colorValue RGB value, or a named color\n     *\n     * @return $this\n     */\n    public function setRGB(?string $colorValue = self::COLOR_BLACK): static\n    {\n        return $this->setARGB($colorValue);\n    }\n\n    /**\n     * Get a specified colour component of an RGB value.\n     *\n     * @param string $rgbValue The colour as an RGB value (e.g. FF00CCCC or CCDDEE\n     * @param int $offset Position within the RGB value to extract\n     * @param bool $hex Flag indicating whether the component should be returned as a hex or a\n     *                                    decimal value\n     *\n     * @return int|string The extracted colour component\n     */\n    private static function getColourComponent(string $rgbValue, int $offset, bool $hex = true): string|int\n    {\n        $colour = substr($rgbValue, $offset, 2) ?: '';\n        if (preg_match('/^[0-9a-f]{2}$/i', $colour) !== 1) {\n            $colour = '00';\n        }\n\n        return ($hex) ? $colour : (int) hexdec($colour);\n    }\n\n    /**\n     * Get the red colour component of an RGB value.\n     *\n     * @param string $rgbValue The colour as an RGB value (e.g. FF00CCCC or CCDDEE\n     * @param bool $hex Flag indicating whether the component should be returned as a hex or a\n     *                                    decimal value\n     *\n     * @return int|string The red colour component\n     */\n    public static function getRed(string $rgbValue, bool $hex = true)\n    {\n        return self::getColourComponent($rgbValue, strlen($rgbValue) - 6, $hex);\n    }\n\n    /**\n     * Get the green colour component of an RGB value.\n     *\n     * @param string $rgbValue The colour as an RGB value (e.g. FF00CCCC or CCDDEE\n     * @param bool $hex Flag indicating whether the component should be returned as a hex or a\n     *                                    decimal value\n     *\n     * @return int|string The green colour component\n     */\n    public static function getGreen(string $rgbValue, bool $hex = true)\n    {\n        return self::getColourComponent($rgbValue, strlen($rgbValue) - 4, $hex);\n    }\n\n    /**\n     * Get the blue colour component of an RGB value.\n     *\n     * @param string $rgbValue The colour as an RGB value (e.g. FF00CCCC or CCDDEE\n     * @param bool $hex Flag indicating whether the component should be returned as a hex or a\n     *                                    decimal value\n     *\n     * @return int|string The blue colour component\n     */\n    public static function getBlue(string $rgbValue, bool $hex = true)\n    {\n        return self::getColourComponent($rgbValue, strlen($rgbValue) - 2, $hex);\n    }\n\n    /**\n     * Adjust the brightness of a color.\n     *\n     * @param string $hexColourValue The colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE)\n     * @param float $adjustPercentage The percentage by which to adjust the colour as a float from -1 to 1\n     *\n     * @return string The adjusted colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE)\n     */\n    public static function changeBrightness(string $hexColourValue, float $adjustPercentage): string\n    {\n        $rgba = (strlen($hexColourValue) === 8);\n        $adjustPercentage = max(-1.0, min(1.0, $adjustPercentage));\n\n        /** @var int $red */\n        $red = self::getRed($hexColourValue, false);\n        /** @var int $green */\n        $green = self::getGreen($hexColourValue, false);\n        /** @var int $blue */\n        $blue = self::getBlue($hexColourValue, false);\n\n        return (($rgba) ? 'FF' : '') . RgbTint::rgbAndTintToRgb($red, $green, $blue, $adjustPercentage);\n    }\n\n    /**\n     * Get indexed color.\n     *\n     * @param int $colorIndex Index entry point into the colour array\n     * @param bool $background Flag to indicate whether default background or foreground colour\n     *                                            should be returned if the indexed colour doesn't exist\n     * @param null|string[] $palette\n     */\n    public static function indexedColor(int $colorIndex, bool $background = false, ?array $palette = null): self\n    {\n        // Clean parameter\n        $colorIndex = (int) $colorIndex;\n\n        if (empty($palette)) {\n            if (isset(self::INDEXED_COLORS[$colorIndex])) {\n                return new self(self::INDEXED_COLORS[$colorIndex]);\n            }\n        } else {\n            if (isset($palette[$colorIndex])) {\n                return new self($palette[$colorIndex]);\n            }\n        }\n\n        return ($background) ? new self(self::COLOR_WHITE) : new self(self::COLOR_BLACK);\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHashCode();\n        }\n\n        return md5(\n            $this->argb\n            . (string) $this->theme\n            . __CLASS__\n        );\n    }\n\n    /** @return mixed[] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'argb', $this->getARGB());\n        $this->exportArray2($exportedArray, 'theme', $this->getTheme());\n\n        return $exportedArray;\n    }\n\n    public function getHasChanged(): bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->hasChanged;\n        }\n\n        return $this->hasChanged;\n    }\n\n    public function getTheme(): int\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getTheme();\n        }\n\n        return $this->theme;\n    }\n\n    public function setTheme(int $theme): self\n    {\n        $this->hasChanged = true;\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['theme' => $theme]);\n            $this->getActiveSheet()\n                ->getStyle($this->getSelectedCells())\n                ->applyFromArray($styleArray);\n        } else {\n            $this->theme = $theme;\n        }\n\n        return $this;\n    }\n\n    public function setHyperlinkTheme(): self\n    {\n        $rgb = $this->getActiveSheet()\n            ->getParent()\n            ?->getTheme()\n            ->getThemeColors();\n        if (is_array($rgb) && array_key_exists('hlink', $rgb)) {\n            $this->setRGB($rgb['hlink']);\n        }\n\n        return $this->setTheme(Theme::HYPERLINK_THEME);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Conditional.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\IComparable;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalColorScale;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalDataBar;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalIconSet;\n\nclass Conditional implements IComparable\n{\n    // Condition types\n    const CONDITION_NONE = 'none';\n    const CONDITION_BEGINSWITH = 'beginsWith';\n    const CONDITION_CELLIS = 'cellIs';\n    const CONDITION_COLORSCALE = 'colorScale';\n    const CONDITION_CONTAINSBLANKS = 'containsBlanks';\n    const CONDITION_CONTAINSERRORS = 'containsErrors';\n    const CONDITION_CONTAINSTEXT = 'containsText';\n    const CONDITION_DATABAR = 'dataBar';\n    const CONDITION_ENDSWITH = 'endsWith';\n    const CONDITION_EXPRESSION = 'expression';\n    const CONDITION_NOTCONTAINSBLANKS = 'notContainsBlanks';\n    const CONDITION_NOTCONTAINSERRORS = 'notContainsErrors';\n    const CONDITION_NOTCONTAINSTEXT = 'notContainsText';\n    const CONDITION_TIMEPERIOD = 'timePeriod';\n    const CONDITION_DUPLICATES = 'duplicateValues';\n    const CONDITION_UNIQUE = 'uniqueValues';\n    const CONDITION_ICONSET = 'iconSet';\n\n    private const CONDITION_TYPES = [\n        self::CONDITION_BEGINSWITH,\n        self::CONDITION_CELLIS,\n        self::CONDITION_COLORSCALE,\n        self::CONDITION_CONTAINSBLANKS,\n        self::CONDITION_CONTAINSERRORS,\n        self::CONDITION_CONTAINSTEXT,\n        self::CONDITION_DATABAR,\n        self::CONDITION_DUPLICATES,\n        self::CONDITION_ENDSWITH,\n        self::CONDITION_EXPRESSION,\n        self::CONDITION_NONE,\n        self::CONDITION_NOTCONTAINSBLANKS,\n        self::CONDITION_NOTCONTAINSERRORS,\n        self::CONDITION_NOTCONTAINSTEXT,\n        self::CONDITION_TIMEPERIOD,\n        self::CONDITION_UNIQUE,\n        self::CONDITION_ICONSET,\n    ];\n\n    // Operator types\n    const OPERATOR_NONE = '';\n    const OPERATOR_BEGINSWITH = 'beginsWith';\n    const OPERATOR_ENDSWITH = 'endsWith';\n    const OPERATOR_EQUAL = 'equal';\n    const OPERATOR_GREATERTHAN = 'greaterThan';\n    const OPERATOR_GREATERTHANOREQUAL = 'greaterThanOrEqual';\n    const OPERATOR_LESSTHAN = 'lessThan';\n    const OPERATOR_LESSTHANOREQUAL = 'lessThanOrEqual';\n    const OPERATOR_NOTEQUAL = 'notEqual';\n    const OPERATOR_CONTAINSTEXT = 'containsText';\n    const OPERATOR_NOTCONTAINS = 'notContains';\n    const OPERATOR_BETWEEN = 'between';\n    const OPERATOR_NOTBETWEEN = 'notBetween';\n\n    const TIMEPERIOD_TODAY = 'today';\n    const TIMEPERIOD_YESTERDAY = 'yesterday';\n    const TIMEPERIOD_TOMORROW = 'tomorrow';\n    const TIMEPERIOD_LAST_7_DAYS = 'last7Days';\n    const TIMEPERIOD_LAST_WEEK = 'lastWeek';\n    const TIMEPERIOD_THIS_WEEK = 'thisWeek';\n    const TIMEPERIOD_NEXT_WEEK = 'nextWeek';\n    const TIMEPERIOD_LAST_MONTH = 'lastMonth';\n    const TIMEPERIOD_THIS_MONTH = 'thisMonth';\n    const TIMEPERIOD_NEXT_MONTH = 'nextMonth';\n\n    /**\n     * Condition type.\n     */\n    private string $conditionType = self::CONDITION_NONE;\n\n    /**\n     * Operator type.\n     */\n    private string $operatorType = self::OPERATOR_NONE;\n\n    /**\n     * Text.\n     */\n    private string $text = '';\n\n    /**\n     * Stop on this condition, if it matches.\n     */\n    private bool $stopIfTrue = false;\n\n    /**\n     * Condition.\n     *\n     * @var (bool|float|int|string)[]\n     */\n    private array $condition = [];\n\n    private ?ConditionalDataBar $dataBar = null;\n\n    private ?ConditionalColorScale $colorScale = null;\n\n    private ?ConditionalIconSet $iconSet = null;\n\n    private Style $style;\n\n    private bool $noFormatSet = false;\n\n    private int $priority = 0;\n\n    /**\n     * Create a new Conditional.\n     */\n    public function __construct()\n    {\n        // Initialise values\n        $this->style = new Style(false, true);\n    }\n\n    public function getPriority(): int\n    {\n        return $this->priority;\n    }\n\n    public function setPriority(int $priority): self\n    {\n        $this->priority = $priority;\n\n        return $this;\n    }\n\n    public function getNoFormatSet(): bool\n    {\n        return $this->noFormatSet;\n    }\n\n    public function setNoFormatSet(bool $noFormatSet): self\n    {\n        $this->noFormatSet = $noFormatSet;\n\n        return $this;\n    }\n\n    /**\n     * Get Condition type.\n     */\n    public function getConditionType(): string\n    {\n        return $this->conditionType;\n    }\n\n    /**\n     * Set Condition type.\n     *\n     * @param string $type Condition type, see self::CONDITION_*\n     *\n     * @return $this\n     */\n    public function setConditionType(string $type): static\n    {\n        $this->conditionType = $type;\n\n        return $this;\n    }\n\n    /**\n     * Get Operator type.\n     */\n    public function getOperatorType(): string\n    {\n        return $this->operatorType;\n    }\n\n    /**\n     * Set Operator type.\n     *\n     * @param string $type Conditional operator type, see self::OPERATOR_*\n     *\n     * @return $this\n     */\n    public function setOperatorType(string $type): static\n    {\n        $this->operatorType = $type;\n\n        return $this;\n    }\n\n    /**\n     * Get text.\n     */\n    public function getText(): string\n    {\n        return $this->text;\n    }\n\n    /**\n     * Set text.\n     *\n     * @return $this\n     */\n    public function setText(string $text): static\n    {\n        $this->text = $text;\n\n        return $this;\n    }\n\n    /**\n     * Get StopIfTrue.\n     */\n    public function getStopIfTrue(): bool\n    {\n        return $this->stopIfTrue;\n    }\n\n    /**\n     * Set StopIfTrue.\n     *\n     * @return $this\n     */\n    public function setStopIfTrue(bool $stopIfTrue): static\n    {\n        $this->stopIfTrue = $stopIfTrue;\n\n        return $this;\n    }\n\n    /**\n     * Get Conditions.\n     *\n     * @return (bool|float|int|string)[]\n     */\n    public function getConditions(): array\n    {\n        return $this->condition;\n    }\n\n    /**\n     * Set Conditions.\n     *\n     * @param bool|(bool|float|int|string)[]|float|int|string $conditions Condition\n     *\n     * @return $this\n     */\n    public function setConditions($conditions): static\n    {\n        if (!is_array($conditions)) {\n            $conditions = [$conditions];\n        }\n        $this->condition = $conditions;\n\n        return $this;\n    }\n\n    /**\n     * Add Condition.\n     *\n     * @param bool|float|int|string $condition Condition\n     *\n     * @return $this\n     */\n    public function addCondition($condition): static\n    {\n        $this->condition[] = $condition;\n\n        return $this;\n    }\n\n    /**\n     * Get Style.\n     */\n    public function getStyle(mixed $cellData = null): Style\n    {\n        if ($this->conditionType === self::CONDITION_COLORSCALE && $cellData !== null && $this->colorScale !== null && is_numeric($cellData)) {\n            $style = new Style(isConditional: true);\n            $style->getFill()->setFillType(Fill::FILL_SOLID);\n            $style->getFill()->getStartColor()->setARGB($this->colorScale->getColorForValue((float) $cellData));\n\n            return $style;\n        }\n\n        return $this->style;\n    }\n\n    /**\n     * Set Style.\n     *\n     * @return $this\n     */\n    public function setStyle(Style $style): static\n    {\n        $this->style = $style;\n\n        return $this;\n    }\n\n    public function getDataBar(): ?ConditionalDataBar\n    {\n        return $this->dataBar;\n    }\n\n    public function setDataBar(ConditionalDataBar $dataBar): static\n    {\n        $this->dataBar = $dataBar;\n\n        return $this;\n    }\n\n    public function getColorScale(): ?ConditionalColorScale\n    {\n        return $this->colorScale;\n    }\n\n    public function setColorScale(ConditionalColorScale $colorScale): static\n    {\n        $this->colorScale = $colorScale;\n\n        return $this;\n    }\n\n    public function getIconSet(): ?ConditionalIconSet\n    {\n        return $this->iconSet;\n    }\n\n    public function setIconSet(ConditionalIconSet $iconSet): static\n    {\n        $this->iconSet = $iconSet;\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->conditionType\n                . $this->operatorType\n                . implode(';', $this->condition)\n                . $this->style->getHashCode()\n                . __CLASS__\n        );\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                $this->$key = clone $value;\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n\n    /**\n     * Verify if param is valid condition type.\n     */\n    public static function isValidConditionType(string $type): bool\n    {\n        return in_array($type, self::CONDITION_TYPES);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass CellMatcher\n{\n    public const COMPARISON_OPERATORS = [\n        Conditional::OPERATOR_EQUAL => '=',\n        Conditional::OPERATOR_GREATERTHAN => '>',\n        Conditional::OPERATOR_GREATERTHANOREQUAL => '>=',\n        Conditional::OPERATOR_LESSTHAN => '<',\n        Conditional::OPERATOR_LESSTHANOREQUAL => '<=',\n        Conditional::OPERATOR_NOTEQUAL => '<>',\n    ];\n\n    public const COMPARISON_RANGE_OPERATORS = [\n        Conditional::OPERATOR_BETWEEN => 'IF(AND(A1>=%s,A1<=%s),TRUE,FALSE)',\n        Conditional::OPERATOR_NOTBETWEEN => 'IF(AND(A1>=%s,A1<=%s),FALSE,TRUE)',\n    ];\n\n    public const COMPARISON_DUPLICATES_OPERATORS = [\n        Conditional::CONDITION_DUPLICATES => \"COUNTIF('%s'!%s,%s)>1\",\n        Conditional::CONDITION_UNIQUE => \"COUNTIF('%s'!%s,%s)=1\",\n    ];\n\n    protected Cell $cell;\n\n    protected int $cellRow;\n\n    protected Worksheet $worksheet;\n\n    protected int $cellColumn;\n\n    protected string $conditionalRange;\n\n    protected string $referenceCell;\n\n    protected int $referenceRow;\n\n    protected int $referenceColumn;\n\n    protected Calculation $engine;\n\n    public function __construct(Cell $cell, string $conditionalRange)\n    {\n        $this->cell = $cell;\n        $this->worksheet = $cell->getWorksheet();\n        [$this->cellColumn, $this->cellRow] = Coordinate::indexesFromString($this->cell->getCoordinate());\n        $this->setReferenceCellForExpressions($conditionalRange);\n\n        $this->engine = Calculation::getInstance($this->worksheet->getParent());\n    }\n\n    protected function setReferenceCellForExpressions(string $conditionalRange): void\n    {\n        $conditionalRange = Coordinate::splitRange(str_replace('$', '', strtoupper($conditionalRange)));\n        [$this->referenceCell] = $conditionalRange[0];\n\n        [$this->referenceColumn, $this->referenceRow] = Coordinate::indexesFromString($this->referenceCell);\n\n        // Convert our conditional range to an absolute conditional range, so it can be used  \"pinned\" in formulae\n        $rangeSets = [];\n        foreach ($conditionalRange as $rangeSet) {\n            $absoluteRangeSet = array_map(\n                [Coordinate::class, 'absoluteCoordinate'],\n                $rangeSet\n            );\n            $rangeSets[] = implode(':', $absoluteRangeSet);\n        }\n        $this->conditionalRange = implode(',', $rangeSets);\n    }\n\n    public function evaluateConditional(Conditional $conditional): bool\n    {\n        // Some calculations may modify the stored cell; so reset it before every evaluation.\n        $cellColumn = Coordinate::stringFromColumnIndex($this->cellColumn);\n        $cellAddress = \"{$cellColumn}{$this->cellRow}\";\n        $this->cell = $this->worksheet->getCell($cellAddress);\n\n        return match ($conditional->getConditionType()) {\n            Conditional::CONDITION_CELLIS => $this->processOperatorComparison($conditional),\n            Conditional::CONDITION_DUPLICATES, Conditional::CONDITION_UNIQUE => $this->processDuplicatesComparison($conditional),\n            // Expression is NOT(ISERROR(SEARCH(\"<TEXT>\",<Cell Reference>)))\n            Conditional::CONDITION_CONTAINSTEXT,\n            // Expression is ISERROR(SEARCH(\"<TEXT>\",<Cell Reference>))\n            Conditional::CONDITION_NOTCONTAINSTEXT,\n            // Expression is LEFT(<Cell Reference>,LEN(\"<TEXT>\"))=\"<TEXT>\"\n            Conditional::CONDITION_BEGINSWITH,\n            // Expression is RIGHT(<Cell Reference>,LEN(\"<TEXT>\"))=\"<TEXT>\"\n            Conditional::CONDITION_ENDSWITH,\n            // Expression is LEN(TRIM(<Cell Reference>))=0\n            Conditional::CONDITION_CONTAINSBLANKS,\n            // Expression is LEN(TRIM(<Cell Reference>))>0\n            Conditional::CONDITION_NOTCONTAINSBLANKS,\n            // Expression is ISERROR(<Cell Reference>)\n            Conditional::CONDITION_CONTAINSERRORS,\n            // Expression is NOT(ISERROR(<Cell Reference>))\n            Conditional::CONDITION_NOTCONTAINSERRORS,\n            // Expression varies, depending on specified timePeriod value, e.g.\n            // Yesterday FLOOR(<Cell Reference>,1)=TODAY()-1\n            // Today FLOOR(<Cell Reference>,1)=TODAY()\n            // Tomorrow FLOOR(<Cell Reference>,1)=TODAY()+1\n            // Last 7 Days AND(TODAY()-FLOOR(<Cell Reference>,1)<=6,FLOOR(<Cell Reference>,1)<=TODAY())\n            Conditional::CONDITION_TIMEPERIOD,\n            Conditional::CONDITION_EXPRESSION => $this->processExpression($conditional),\n            Conditional::CONDITION_COLORSCALE => $this->processColorScale($conditional),\n            default => false,\n        };\n    }\n\n    protected function wrapValue(mixed $value): float|int|string\n    {\n        if (!is_numeric($value)) {\n            if (is_bool($value)) {\n                return $value ? 'TRUE' : 'FALSE';\n            } elseif ($value === null) {\n                return 'NULL';\n            }\n\n            return '\"' . StringHelper::convertToString($value) . '\"';\n        }\n\n        return $value;\n    }\n\n    protected function wrapCellValue(): float|int|string\n    {\n        $this->cell = $this->worksheet->getCell([$this->cellColumn, $this->cellRow]);\n\n        return $this->wrapValue($this->cell->getCalculatedValue());\n    }\n\n    /** @param string[] $matches */\n    protected function conditionCellAdjustment(array $matches): float|int|string\n    {\n        $column = $matches[6];\n        $row = $matches[7];\n        if (!str_contains($column, '$')) {\n            //            $column = Coordinate::stringFromColumnIndex($this->cellColumn);\n            $column = Coordinate::columnIndexFromString($column);\n            $column += $this->cellColumn - $this->referenceColumn;\n            $column = Coordinate::stringFromColumnIndex($column);\n        }\n\n        if (!str_contains($row, '$')) {\n            $row = (int) $row + $this->cellRow - $this->referenceRow;\n        }\n\n        if (!empty($matches[4])) {\n            $worksheet = $this->worksheet->getParentOrThrow()->getSheetByName(trim($matches[4], \"'\"));\n            if ($worksheet === null) {\n                return $this->wrapValue(null);\n            }\n\n            return $this->wrapValue(\n                $worksheet\n                    ->getCell(str_replace('$', '', \"{$column}{$row}\"))\n                    ->getCalculatedValue()\n            );\n        }\n\n        return $this->wrapValue(\n            $this->worksheet\n                ->getCell(str_replace('$', '', \"{$column}{$row}\"))\n                ->getCalculatedValue()\n        );\n    }\n\n    protected function cellConditionCheck(string $condition): string\n    {\n        $splitCondition = explode(Calculation::FORMULA_STRING_QUOTE, $condition);\n        $i = false;\n        foreach ($splitCondition as &$value) {\n            //    Only count/replace in alternating array entries (ie. not in quoted strings)\n            $i = $i === false;\n            if ($i) {\n                $value = (string) preg_replace_callback(\n                    '/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/i',\n                    [$this, 'conditionCellAdjustment'],\n                    $value\n                );\n            }\n        }\n        unset($value);\n\n        //    Then rebuild the condition string to return it\n        return implode(Calculation::FORMULA_STRING_QUOTE, $splitCondition);\n    }\n\n    /**\n     * @param mixed[] $conditions\n     *\n     * @return mixed[]\n     */\n    protected function adjustConditionsForCellReferences(array $conditions): array\n    {\n        return array_map(\n            [$this, 'cellConditionCheck'],\n            $conditions\n        );\n    }\n\n    protected function processOperatorComparison(Conditional $conditional): bool\n    {\n        if (array_key_exists($conditional->getOperatorType(), self::COMPARISON_RANGE_OPERATORS)) {\n            return $this->processRangeOperator($conditional);\n        }\n\n        $operator = self::COMPARISON_OPERATORS[$conditional->getOperatorType()];\n        $conditions = $this->adjustConditionsForCellReferences($conditional->getConditions());\n        /** @var float|int|string */\n        $temp1 = $this->wrapCellValue();\n        /** @var scalar */\n        $temp2 = array_pop($conditions);\n        $expression = sprintf('%s%s%s', (string) $temp1, $operator, (string) $temp2);\n\n        return $this->evaluateExpression($expression);\n    }\n\n    protected function processColorScale(Conditional $conditional): bool\n    {\n        if (is_numeric($this->wrapCellValue()) && $conditional->getColorScale()?->colorScaleReadyForUse()) {\n            return true;\n        }\n\n        return false;\n    }\n\n    protected function processRangeOperator(Conditional $conditional): bool\n    {\n        $conditions = $this->adjustConditionsForCellReferences($conditional->getConditions());\n        sort($conditions);\n        $expression = sprintf(\n            (string) preg_replace(\n                '/\\bA1\\b/i',\n                (string) $this->wrapCellValue(),\n                self::COMPARISON_RANGE_OPERATORS[$conditional->getOperatorType()]\n            ),\n            ...$conditions //* @phpstan-ignore-line\n        );\n\n        return $this->evaluateExpression($expression);\n    }\n\n    protected function processDuplicatesComparison(Conditional $conditional): bool\n    {\n        $worksheetName = $this->cell->getWorksheet()->getTitle();\n\n        $expression = sprintf(\n            self::COMPARISON_DUPLICATES_OPERATORS[$conditional->getConditionType()],\n            $worksheetName,\n            $this->conditionalRange,\n            $this->cellConditionCheck($this->cell->getCalculatedValueString())\n        );\n\n        return $this->evaluateExpression($expression);\n    }\n\n    protected function processExpression(Conditional $conditional): bool\n    {\n        $conditions = $this->adjustConditionsForCellReferences($conditional->getConditions());\n        /** @var string */\n        $expression = array_pop($conditions);\n        /** @var float|int|string */\n        $temp = $this->wrapCellValue();\n\n        $expression = (string) preg_replace(\n            '/\\b' . $this->referenceCell . '\\b/i',\n            (string) $temp,\n            $expression\n        );\n\n        return $this->evaluateExpression($expression);\n    }\n\n    protected function evaluateExpression(string $expression): bool\n    {\n        $expression = \"={$expression}\";\n\n        try {\n            $this->engine->flushInstance();\n            $result = (bool) $this->engine->calculateFormula($expression);\n        } catch (Exception) {\n            return false;\n        }\n\n        return $result;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/CellStyleAssessor.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nclass CellStyleAssessor\n{\n    protected CellMatcher $cellMatcher;\n\n    protected StyleMerger $styleMerger;\n\n    protected Cell $cell;\n\n    public function __construct(Cell $cell, string $conditionalRange)\n    {\n        $this->cell = $cell;\n        $this->cellMatcher = new CellMatcher($cell, $conditionalRange);\n        $this->styleMerger = new StyleMerger($cell->getStyle());\n    }\n\n    /**\n     * @param Conditional[] $conditionalStyles\n     */\n    public function matchConditions(array $conditionalStyles = []): Style\n    {\n        foreach ($conditionalStyles as $conditional) {\n            if ($this->cellMatcher->evaluateConditional($conditional) === true) {\n                // Merging the conditional style into the base style goes in here\n                $this->styleMerger->mergeStyle($conditional->getStyle($this->cell->getValue()));\n                if ($conditional->getStopIfTrue() === true) {\n                    break;\n                }\n            }\n        }\n\n        return $this->styleMerger->getStyle();\n    }\n\n    /**\n     * @param Conditional[] $conditionalStyles\n     */\n    public function matchConditionsReturnNullIfNoneMatched(array $conditionalStyles, string $cellData, bool $stopAtFirstMatch = false): ?Style\n    {\n        $matched = false;\n        $value = (float) $cellData;\n        foreach ($conditionalStyles as $conditional) {\n            if ($this->cellMatcher->evaluateConditional($conditional) === true) {\n                $matched = true;\n                // Merging the conditional style into the base style goes in here\n                $this->styleMerger->mergeStyle($conditional->getStyle($value));\n                if ($conditional->getStopIfTrue() === true || $stopAtFirstMatch) {\n                    break;\n                }\n            }\n        }\n        if ($matched) {\n            return $this->styleMerger->getStyle();\n        }\n\n        return null;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalColorScale.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Percentiles;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\n\nclass ConditionalColorScale\n{\n    private ?ConditionalFormatValueObject $minimumConditionalFormatValueObject = null;\n\n    private ?ConditionalFormatValueObject $midpointConditionalFormatValueObject = null;\n\n    private ?ConditionalFormatValueObject $maximumConditionalFormatValueObject = null;\n\n    private ?Color $minimumColor = null;\n\n    private ?Color $midpointColor = null;\n\n    private ?Color $maximumColor = null;\n\n    private ?string $sqref = null;\n\n    /** @var mixed[] */\n    private array $valueArray = [];\n\n    private float $minValue = 0;\n\n    private float $maxValue = 0;\n\n    private float $midValue = 0;\n\n    private ?\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet = null;\n\n    public function getMinimumConditionalFormatValueObject(): ?ConditionalFormatValueObject\n    {\n        return $this->minimumConditionalFormatValueObject;\n    }\n\n    public function setMinimumConditionalFormatValueObject(ConditionalFormatValueObject $minimumConditionalFormatValueObject): self\n    {\n        $this->minimumConditionalFormatValueObject = $minimumConditionalFormatValueObject;\n\n        return $this;\n    }\n\n    public function getMidpointConditionalFormatValueObject(): ?ConditionalFormatValueObject\n    {\n        return $this->midpointConditionalFormatValueObject;\n    }\n\n    public function setMidpointConditionalFormatValueObject(ConditionalFormatValueObject $midpointConditionalFormatValueObject): self\n    {\n        $this->midpointConditionalFormatValueObject = $midpointConditionalFormatValueObject;\n\n        return $this;\n    }\n\n    public function getMaximumConditionalFormatValueObject(): ?ConditionalFormatValueObject\n    {\n        return $this->maximumConditionalFormatValueObject;\n    }\n\n    public function setMaximumConditionalFormatValueObject(ConditionalFormatValueObject $maximumConditionalFormatValueObject): self\n    {\n        $this->maximumConditionalFormatValueObject = $maximumConditionalFormatValueObject;\n\n        return $this;\n    }\n\n    public function getMinimumColor(): ?Color\n    {\n        return $this->minimumColor;\n    }\n\n    public function setMinimumColor(Color $minimumColor): self\n    {\n        $this->minimumColor = $minimumColor;\n\n        return $this;\n    }\n\n    public function getMidpointColor(): ?Color\n    {\n        return $this->midpointColor;\n    }\n\n    public function setMidpointColor(Color $midpointColor): self\n    {\n        $this->midpointColor = $midpointColor;\n\n        return $this;\n    }\n\n    public function getMaximumColor(): ?Color\n    {\n        return $this->maximumColor;\n    }\n\n    public function setMaximumColor(Color $maximumColor): self\n    {\n        $this->maximumColor = $maximumColor;\n\n        return $this;\n    }\n\n    public function getSqRef(): ?string\n    {\n        return $this->sqref;\n    }\n\n    public function setSqRef(string $sqref, \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet): self\n    {\n        $this->sqref = $sqref;\n        $this->worksheet = $worksheet;\n\n        return $this;\n    }\n\n    public function setScaleArray(): self\n    {\n        if ($this->sqref !== null && $this->worksheet !== null) {\n            $values = $this->worksheet->rangesToArray($this->sqref, null, true, true, true);\n            $this->valueArray = [];\n            foreach ($values as $key => $value) {\n                /** @var array<float|int|string> $value */\n                foreach ($value as $k => $v) {\n                    $this->valueArray[] = (float) $v;\n                }\n            }\n            $this->prepareColorScale();\n        }\n\n        return $this;\n    }\n\n    public function getColorForValue(float $value): string\n    {\n        if ($this->minimumColor === null || $this->midpointColor === null || $this->maximumColor === null) {\n            return 'FF000000';\n        }\n        $minColor = $this->minimumColor->getARGB();\n        $midColor = $this->midpointColor->getARGB();\n        $maxColor = $this->maximumColor->getARGB();\n\n        if ($minColor === null || $midColor === null || $maxColor === null) {\n            return 'FF000000';\n        }\n\n        if ($value <= $this->minValue) {\n            return $minColor;\n        }\n        if ($value >= $this->maxValue) {\n            return $maxColor;\n        }\n        if ($value == $this->midValue) {\n            return $midColor;\n        }\n        if ($value < $this->midValue) {\n            $blend = ($value - $this->minValue) / ($this->midValue - $this->minValue);\n            $alpha1 = hexdec(substr($minColor, 0, 2));\n            $alpha2 = hexdec(substr($midColor, 0, 2));\n            $red1 = hexdec(substr($minColor, 2, 2));\n            $red2 = hexdec(substr($midColor, 2, 2));\n            $green1 = hexdec(substr($minColor, 4, 2));\n            $green2 = hexdec(substr($midColor, 4, 2));\n            $blue1 = hexdec(substr($minColor, 6, 2));\n            $blue2 = hexdec(substr($midColor, 6, 2));\n\n            return strtoupper(dechex((int) ($alpha2 * $blend + $alpha1 * (1 - $blend))) . '' . dechex((int) ($red2 * $blend + $red1 * (1 - $blend))) . '' . dechex((int) ($green2 * $blend + $green1 * (1 - $blend))) . '' . dechex((int) ($blue2 * $blend + $blue1 * (1 - $blend))));\n        }\n        $blend = ($value - $this->midValue) / ($this->maxValue - $this->midValue);\n        $alpha1 = hexdec(substr($midColor, 0, 2));\n        $alpha2 = hexdec(substr($maxColor, 0, 2));\n        $red1 = hexdec(substr($midColor, 2, 2));\n        $red2 = hexdec(substr($maxColor, 2, 2));\n        $green1 = hexdec(substr($midColor, 4, 2));\n        $green2 = hexdec(substr($maxColor, 4, 2));\n        $blue1 = hexdec(substr($midColor, 6, 2));\n        $blue2 = hexdec(substr($maxColor, 6, 2));\n\n        return strtoupper(dechex((int) ($alpha2 * $blend + $alpha1 * (1 - $blend))) . '' . dechex((int) ($red2 * $blend + $red1 * (1 - $blend))) . '' . dechex((int) ($green2 * $blend + $green1 * (1 - $blend))) . '' . dechex((int) ($blue2 * $blend + $blue1 * (1 - $blend))));\n    }\n\n    private function getLimitValue(string $type, float $value = 0, float $formula = 0): float\n    {\n        if (count($this->valueArray) === 0) {\n            return 0;\n        }\n        switch ($type) {\n            case 'min':\n                /** @var float|int */\n                $temp = min($this->valueArray);\n\n                return (float) $temp;\n            case 'max':\n                /** @var float|int */\n                $temp = max($this->valueArray);\n\n                return (float) $temp;\n            case 'percentile':\n                return (float) Percentiles::PERCENTILE($this->valueArray, (float) ($value / 100));\n            case 'formula':\n                return $formula;\n            case 'percent':\n                /** @var float|int */\n                $min = min($this->valueArray);\n                $min = (float) $min;\n                /** @var float|int */\n                $max = max($this->valueArray);\n                $max = (float) $max;\n\n                return $min + (float) ($value / 100) * ($max - $min);\n            default:\n                return 0;\n        }\n    }\n\n    /**\n     * Prepares color scale for execution, see the first if for variables that must be set beforehand.\n     */\n    public function prepareColorScale(): self\n    {\n        if ($this->minimumConditionalFormatValueObject !== null && $this->maximumConditionalFormatValueObject !== null && $this->minimumColor !== null && $this->maximumColor !== null) {\n            if ($this->midpointConditionalFormatValueObject !== null && $this->midpointConditionalFormatValueObject->getType() !== 'None') {\n                $this->minValue = $this->getLimitValue($this->minimumConditionalFormatValueObject->getType(), (float) $this->minimumConditionalFormatValueObject->getValue(), (float) $this->minimumConditionalFormatValueObject->getCellFormula());\n                $this->midValue = $this->getLimitValue($this->midpointConditionalFormatValueObject->getType(), (float) $this->midpointConditionalFormatValueObject->getValue(), (float) $this->midpointConditionalFormatValueObject->getCellFormula());\n                $this->maxValue = $this->getLimitValue($this->maximumConditionalFormatValueObject->getType(), (float) $this->maximumConditionalFormatValueObject->getValue(), (float) $this->maximumConditionalFormatValueObject->getCellFormula());\n            } else {\n                $this->minValue = $this->getLimitValue($this->minimumConditionalFormatValueObject->getType(), (float) $this->minimumConditionalFormatValueObject->getValue(), (float) $this->minimumConditionalFormatValueObject->getCellFormula());\n                $this->maxValue = $this->getLimitValue($this->maximumConditionalFormatValueObject->getType(), (float) $this->maximumConditionalFormatValueObject->getValue(), (float) $this->maximumConditionalFormatValueObject->getCellFormula());\n                $this->midValue = (float) ($this->minValue + $this->maxValue) / 2;\n                $blend = 0.5;\n\n                $minColor = $this->minimumColor->getARGB();\n                $maxColor = $this->maximumColor->getARGB();\n\n                if ($minColor !== null && $maxColor !== null) {\n                    $alpha1 = hexdec(substr($minColor, 0, 2));\n                    $alpha2 = hexdec(substr($maxColor, 0, 2));\n                    $red1 = hexdec(substr($minColor, 2, 2));\n                    $red2 = hexdec(substr($maxColor, 2, 2));\n                    $green1 = hexdec(substr($minColor, 4, 2));\n                    $green2 = hexdec(substr($maxColor, 4, 2));\n                    $blue1 = hexdec(substr($minColor, 6, 2));\n                    $blue2 = hexdec(substr($maxColor, 6, 2));\n                    $this->midpointColor = new Color(strtoupper(dechex((int) ($alpha2 * $blend + $alpha1 * (1 - $blend))) . '' . dechex((int) ($red2 * $blend + $red1 * (1 - $blend))) . '' . dechex((int) ($green2 * $blend + $green1 * (1 - $blend))) . '' . dechex((int) ($blue2 * $blend + $blue1 * (1 - $blend)))));\n                } else {\n                    $this->midpointColor = null;\n                }\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Checks that all needed color scale data is in place.\n     */\n    public function colorScaleReadyForUse(): bool\n    {\n        if ($this->minimumColor === null || $this->midpointColor === null || $this->maximumColor === null) {\n            return false;\n        }\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBar.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nclass ConditionalDataBar\n{\n    private ?bool $showValue = null;\n\n    private ?ConditionalFormatValueObject $minimumConditionalFormatValueObject = null;\n\n    private ?ConditionalFormatValueObject $maximumConditionalFormatValueObject = null;\n\n    private string $color = '';\n\n    private ?ConditionalFormattingRuleExtension $conditionalFormattingRuleExt = null;\n\n    public function getShowValue(): ?bool\n    {\n        return $this->showValue;\n    }\n\n    public function setShowValue(bool $showValue): self\n    {\n        $this->showValue = $showValue;\n\n        return $this;\n    }\n\n    public function getMinimumConditionalFormatValueObject(): ?ConditionalFormatValueObject\n    {\n        return $this->minimumConditionalFormatValueObject;\n    }\n\n    public function setMinimumConditionalFormatValueObject(ConditionalFormatValueObject $minimumConditionalFormatValueObject): self\n    {\n        $this->minimumConditionalFormatValueObject = $minimumConditionalFormatValueObject;\n\n        return $this;\n    }\n\n    public function getMaximumConditionalFormatValueObject(): ?ConditionalFormatValueObject\n    {\n        return $this->maximumConditionalFormatValueObject;\n    }\n\n    public function setMaximumConditionalFormatValueObject(ConditionalFormatValueObject $maximumConditionalFormatValueObject): self\n    {\n        $this->maximumConditionalFormatValueObject = $maximumConditionalFormatValueObject;\n\n        return $this;\n    }\n\n    public function getColor(): string\n    {\n        return $this->color;\n    }\n\n    public function setColor(string $color): self\n    {\n        $this->color = $color;\n\n        return $this;\n    }\n\n    public function getConditionalFormattingRuleExt(): ?ConditionalFormattingRuleExtension\n    {\n        return $this->conditionalFormattingRuleExt;\n    }\n\n    public function setConditionalFormattingRuleExt(ConditionalFormattingRuleExtension $conditionalFormattingRuleExt): self\n    {\n        $this->conditionalFormattingRuleExt = $conditionalFormattingRuleExt;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nclass ConditionalDataBarExtension\n{\n    /** <dataBar> attributes */\n    private int $minLength;\n\n    private int $maxLength;\n\n    private ?bool $border = null;\n\n    private ?bool $gradient = null;\n\n    private ?string $direction = null;\n\n    private ?bool $negativeBarBorderColorSameAsPositive = null;\n\n    private ?string $axisPosition = null;\n\n    // <dataBar> children\n\n    private ConditionalFormatValueObject $maximumConditionalFormatValueObject;\n\n    private ConditionalFormatValueObject $minimumConditionalFormatValueObject;\n\n    private ?string $borderColor = null;\n\n    private ?string $negativeFillColor = null;\n\n    private ?string $negativeBorderColor = null;\n\n    /** @var array{rgb: ?string, theme: ?string, tint: ?string} */\n    private array $axisColor = [\n        'rgb' => null,\n        'theme' => null,\n        'tint' => null,\n    ];\n\n    /** @return mixed[] */\n    public function getXmlAttributes(): array\n    {\n        $ret = [];\n        foreach (['minLength', 'maxLength', 'direction', 'axisPosition'] as $attrKey) {\n            if (null !== $this->{$attrKey}) {\n                $ret[$attrKey] = $this->{$attrKey};\n            }\n        }\n        foreach (['border', 'gradient', 'negativeBarBorderColorSameAsPositive'] as $attrKey) {\n            if (null !== $this->{$attrKey}) {\n                $ret[$attrKey] = $this->{$attrKey} ? '1' : '0';\n            }\n        }\n\n        return $ret;\n    }\n\n    /** @return mixed[] */\n    public function getXmlElements(): array\n    {\n        $ret = [];\n        $elms = ['borderColor', 'negativeFillColor', 'negativeBorderColor'];\n        foreach ($elms as $elmKey) {\n            if (null !== $this->{$elmKey}) {\n                $ret[$elmKey] = ['rgb' => $this->{$elmKey}];\n            }\n        }\n        foreach (array_filter($this->axisColor) as $attrKey => $axisColorAttr) {\n            if (!isset($ret['axisColor'])) {\n                $ret['axisColor'] = [];\n            }\n            $ret['axisColor'][$attrKey] = $axisColorAttr;\n        }\n\n        return $ret;\n    }\n\n    public function getMinLength(): int\n    {\n        return $this->minLength;\n    }\n\n    public function setMinLength(int $minLength): self\n    {\n        $this->minLength = $minLength;\n\n        return $this;\n    }\n\n    public function getMaxLength(): int\n    {\n        return $this->maxLength;\n    }\n\n    public function setMaxLength(int $maxLength): self\n    {\n        $this->maxLength = $maxLength;\n\n        return $this;\n    }\n\n    public function getBorder(): ?bool\n    {\n        return $this->border;\n    }\n\n    public function setBorder(bool $border): self\n    {\n        $this->border = $border;\n\n        return $this;\n    }\n\n    public function getGradient(): ?bool\n    {\n        return $this->gradient;\n    }\n\n    public function setGradient(bool $gradient): self\n    {\n        $this->gradient = $gradient;\n\n        return $this;\n    }\n\n    public function getDirection(): ?string\n    {\n        return $this->direction;\n    }\n\n    public function setDirection(string $direction): self\n    {\n        $this->direction = $direction;\n\n        return $this;\n    }\n\n    public function getNegativeBarBorderColorSameAsPositive(): ?bool\n    {\n        return $this->negativeBarBorderColorSameAsPositive;\n    }\n\n    public function setNegativeBarBorderColorSameAsPositive(bool $negativeBarBorderColorSameAsPositive): self\n    {\n        $this->negativeBarBorderColorSameAsPositive = $negativeBarBorderColorSameAsPositive;\n\n        return $this;\n    }\n\n    public function getAxisPosition(): ?string\n    {\n        return $this->axisPosition;\n    }\n\n    public function setAxisPosition(string $axisPosition): self\n    {\n        $this->axisPosition = $axisPosition;\n\n        return $this;\n    }\n\n    public function getMaximumConditionalFormatValueObject(): ConditionalFormatValueObject\n    {\n        return $this->maximumConditionalFormatValueObject;\n    }\n\n    public function setMaximumConditionalFormatValueObject(ConditionalFormatValueObject $maximumConditionalFormatValueObject): self\n    {\n        $this->maximumConditionalFormatValueObject = $maximumConditionalFormatValueObject;\n\n        return $this;\n    }\n\n    public function getMinimumConditionalFormatValueObject(): ConditionalFormatValueObject\n    {\n        return $this->minimumConditionalFormatValueObject;\n    }\n\n    public function setMinimumConditionalFormatValueObject(ConditionalFormatValueObject $minimumConditionalFormatValueObject): self\n    {\n        $this->minimumConditionalFormatValueObject = $minimumConditionalFormatValueObject;\n\n        return $this;\n    }\n\n    public function getBorderColor(): ?string\n    {\n        return $this->borderColor;\n    }\n\n    public function setBorderColor(string $borderColor): self\n    {\n        $this->borderColor = $borderColor;\n\n        return $this;\n    }\n\n    public function getNegativeFillColor(): ?string\n    {\n        return $this->negativeFillColor;\n    }\n\n    public function setNegativeFillColor(string $negativeFillColor): self\n    {\n        $this->negativeFillColor = $negativeFillColor;\n\n        return $this;\n    }\n\n    public function getNegativeBorderColor(): ?string\n    {\n        return $this->negativeBorderColor;\n    }\n\n    public function setNegativeBorderColor(string $negativeBorderColor): self\n    {\n        $this->negativeBorderColor = $negativeBorderColor;\n\n        return $this;\n    }\n\n    /** @return array{rgb: ?string, theme: ?string, tint: ?string} */\n    public function getAxisColor(): array\n    {\n        return $this->axisColor;\n    }\n\n    public function setAxisColor(?string $rgb, ?string $theme = null, ?string $tint = null): self\n    {\n        $this->axisColor = [\n            'rgb' => $rgb,\n            'theme' => $theme,\n            'tint' => $tint,\n        ];\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nclass ConditionalFormatValueObject\n{\n    private string $type;\n\n    private null|float|int|string $value;\n\n    private ?string $cellFormula;\n\n    /**\n     * For icon sets, determines whether this threshold value uses the greater\n     * than or equal to operator. False indicates 'greater than' is used instead\n     * of 'greater than or equal to'.\n     */\n    private ?bool $greaterThanOrEqual = null;\n\n    public function __construct(string $type, null|float|int|string $value = null, ?string $cellFormula = null)\n    {\n        $this->type = $type;\n        $this->value = $value;\n        $this->cellFormula = $cellFormula;\n    }\n\n    public function getType(): string\n    {\n        return $this->type;\n    }\n\n    public function setType(string $type): self\n    {\n        $this->type = $type;\n\n        return $this;\n    }\n\n    public function getValue(): null|float|int|string\n    {\n        return $this->value;\n    }\n\n    public function setValue(null|float|int|string $value): self\n    {\n        $this->value = $value;\n\n        return $this;\n    }\n\n    public function getCellFormula(): ?string\n    {\n        return $this->cellFormula;\n    }\n\n    public function setCellFormula(?string $cellFormula): self\n    {\n        $this->cellFormula = $cellFormula;\n\n        return $this;\n    }\n\n    public function getGreaterThanOrEqual(): ?bool\n    {\n        return $this->greaterThanOrEqual;\n    }\n\n    public function setGreaterThanOrEqual(?bool $greaterThanOrEqual): self\n    {\n        $this->greaterThanOrEqual = $greaterThanOrEqual;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse SimpleXMLElement;\n\nclass ConditionalFormattingRuleExtension\n{\n    const CONDITION_EXTENSION_DATABAR = 'dataBar';\n\n    private string $id;\n\n    /** @var string Conditional Formatting Rule */\n    private string $cfRule;\n\n    private ConditionalDataBarExtension $dataBar;\n\n    /** @var string Sequence of References */\n    private string $sqref = '';\n\n    /**\n     * ConditionalFormattingRuleExtension constructor.\n     */\n    public function __construct(?string $id = null, string $cfRule = self::CONDITION_EXTENSION_DATABAR)\n    {\n        if (null === $id) {\n            $this->id = '{' . $this->generateUuid() . '}';\n        } else {\n            $this->id = $id;\n        }\n        $this->cfRule = $cfRule;\n    }\n\n    private function generateUuid(): string\n    {\n        $chars = mb_str_split('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx', 1, 'UTF-8');\n\n        foreach ($chars as $i => $char) {\n            if ($char === 'x') {\n                $chars[$i] = dechex(random_int(0, 15));\n            } elseif ($char === 'y') {\n                $chars[$i] = dechex(random_int(8, 11));\n            }\n        }\n\n        return implode('', $chars);\n    }\n\n    /** @return mixed[] */\n    public static function parseExtLstXml(?SimpleXMLElement $extLstXml): array\n    {\n        $conditionalFormattingRuleExtensions = [];\n        $conditionalFormattingRuleExtensionXml = null;\n        if ($extLstXml instanceof SimpleXMLElement) {\n            foreach ((count($extLstXml) > 0 ? $extLstXml : [$extLstXml]) as $extLst) {\n                //this uri is conditionalFormattings\n                //https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/07d607af-5618-4ca2-b683-6a78dc0d9627\n                if (isset($extLst->ext['uri']) && (string) $extLst->ext['uri'] === '{78C0D931-6437-407d-A8EE-F0AAD7539E65}') {\n                    $conditionalFormattingRuleExtensionXml = $extLst->ext;\n                }\n            }\n\n            if ($conditionalFormattingRuleExtensionXml) {\n                $ns = $conditionalFormattingRuleExtensionXml->getNamespaces(true);\n                $extFormattingsXml = $conditionalFormattingRuleExtensionXml->children($ns['x14']);\n\n                foreach ($extFormattingsXml->children($ns['x14']) as $extFormattingXml) {\n                    $extCfRuleXml = $extFormattingXml->cfRule;\n                    $attributes = $extCfRuleXml->attributes();\n                    if (!$attributes || ((string) $attributes->type) !== Conditional::CONDITION_DATABAR) {\n                        continue;\n                    }\n\n                    $extFormattingRuleObj = new self((string) $attributes->id);\n                    $extFormattingRuleObj->setSqref((string) $extFormattingXml->children($ns['xm'])->sqref);\n                    $conditionalFormattingRuleExtensions[$extFormattingRuleObj->getId()] = $extFormattingRuleObj;\n\n                    $extDataBarObj = new ConditionalDataBarExtension();\n                    $extFormattingRuleObj->setDataBarExt($extDataBarObj);\n                    $dataBarXml = $extCfRuleXml->dataBar;\n                    self::parseExtDataBarAttributesFromXml($extDataBarObj, $dataBarXml);\n                    self::parseExtDataBarElementChildrenFromXml($extDataBarObj, $dataBarXml, $ns);\n                }\n            }\n        }\n\n        return $conditionalFormattingRuleExtensions;\n    }\n\n    private static function parseExtDataBarAttributesFromXml(\n        ConditionalDataBarExtension $extDataBarObj,\n        SimpleXMLElement $dataBarXml\n    ): void {\n        $dataBarAttribute = $dataBarXml->attributes();\n        if ($dataBarAttribute === null) {\n            return;\n        }\n        if ($dataBarAttribute->minLength) {\n            $extDataBarObj->setMinLength((int) $dataBarAttribute->minLength);\n        }\n        if ($dataBarAttribute->maxLength) {\n            $extDataBarObj->setMaxLength((int) $dataBarAttribute->maxLength);\n        }\n        if ($dataBarAttribute->border) {\n            $extDataBarObj->setBorder((bool) (string) $dataBarAttribute->border);\n        }\n        if ($dataBarAttribute->gradient) {\n            $extDataBarObj->setGradient((bool) (string) $dataBarAttribute->gradient);\n        }\n        if ($dataBarAttribute->direction) {\n            $extDataBarObj->setDirection((string) $dataBarAttribute->direction);\n        }\n        if ($dataBarAttribute->negativeBarBorderColorSameAsPositive) {\n            $extDataBarObj->setNegativeBarBorderColorSameAsPositive((bool) (string) $dataBarAttribute->negativeBarBorderColorSameAsPositive);\n        }\n        if ($dataBarAttribute->axisPosition) {\n            $extDataBarObj->setAxisPosition((string) $dataBarAttribute->axisPosition);\n        }\n    }\n\n    /** @param string[] $ns */\n    private static function parseExtDataBarElementChildrenFromXml(ConditionalDataBarExtension $extDataBarObj, SimpleXMLElement $dataBarXml, array $ns): void\n    {\n        if ($dataBarXml->borderColor) {\n            $attributes = $dataBarXml->borderColor->attributes();\n            if ($attributes !== null) {\n                $extDataBarObj->setBorderColor((string) $attributes['rgb']);\n            }\n        }\n        if ($dataBarXml->negativeFillColor) {\n            $attributes = $dataBarXml->negativeFillColor->attributes();\n            if ($attributes !== null) {\n                $extDataBarObj->setNegativeFillColor((string) $attributes['rgb']);\n            }\n        }\n        if ($dataBarXml->negativeBorderColor) {\n            $attributes = $dataBarXml->negativeBorderColor->attributes();\n            if ($attributes !== null) {\n                $extDataBarObj->setNegativeBorderColor((string) $attributes['rgb']);\n            }\n        }\n        if ($dataBarXml->axisColor) {\n            $axisColorAttr = $dataBarXml->axisColor->attributes();\n            if ($axisColorAttr !== null) {\n                $extDataBarObj->setAxisColor((string) $axisColorAttr['rgb'], (string) $axisColorAttr['theme'], (string) $axisColorAttr['tint']);\n            }\n        }\n        $cfvoIndex = 0;\n        foreach ($dataBarXml->cfvo as $cfvo) {\n            $f = (string) $cfvo->children($ns['xm'])->f;\n            $attributes = $cfvo->attributes();\n            if (!($attributes)) {\n                continue;\n            }\n\n            if ($cfvoIndex === 0) {\n                $extDataBarObj->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject((string) $attributes['type'], null, (empty($f) ? null : $f)));\n            }\n            if ($cfvoIndex === 1) {\n                $extDataBarObj->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject((string) $attributes['type'], null, (empty($f) ? null : $f)));\n            }\n            ++$cfvoIndex;\n        }\n    }\n\n    public function getId(): string\n    {\n        return $this->id;\n    }\n\n    public function setId(string $id): self\n    {\n        $this->id = $id;\n\n        return $this;\n    }\n\n    public function getCfRule(): string\n    {\n        return $this->cfRule;\n    }\n\n    public function setCfRule(string $cfRule): self\n    {\n        $this->cfRule = $cfRule;\n\n        return $this;\n    }\n\n    public function getDataBarExt(): ConditionalDataBarExtension\n    {\n        return $this->dataBar;\n    }\n\n    public function setDataBarExt(ConditionalDataBarExtension $dataBar): self\n    {\n        $this->dataBar = $dataBar;\n\n        return $this;\n    }\n\n    public function getSqref(): string\n    {\n        return $this->sqref;\n    }\n\n    public function setSqref(string $sqref): self\n    {\n        $this->sqref = $sqref;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalIconSet.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nclass ConditionalIconSet\n{\n    /** The icon set to display. */\n    private ?IconSetValues $iconSetType = null;\n\n    /**  If true, reverses the default order of the icons in this icon set. */\n    private ?bool $reverse = null;\n\n    /** Indicates whether to show the values of the cells on which this icon set is applied. */\n    private ?bool $showValue = null;\n\n    /**\n     * If true, indicates that the icon set is a custom icon set.\n     * If this value is \"true\", there MUST be the same number of cfIcon elements\n     * as cfvo elements.\n     * If this value is \"false\", there MUST be 0 cfIcon elements.\n     */\n    private ?bool $custom = null;\n\n    /** @var ConditionalFormatValueObject[] */\n    private array $cfvos = [];\n\n    public function getIconSetType(): ?IconSetValues\n    {\n        return $this->iconSetType;\n    }\n\n    public function setIconSetType(IconSetValues $type): self\n    {\n        $this->iconSetType = $type;\n\n        return $this;\n    }\n\n    public function getReverse(): ?bool\n    {\n        return $this->reverse;\n    }\n\n    public function setReverse(bool $reverse): self\n    {\n        $this->reverse = $reverse;\n\n        return $this;\n    }\n\n    public function getShowValue(): ?bool\n    {\n        return $this->showValue;\n    }\n\n    public function setShowValue(bool $showValue): self\n    {\n        $this->showValue = $showValue;\n\n        return $this;\n    }\n\n    public function getCustom(): ?bool\n    {\n        return $this->custom;\n    }\n\n    public function setCustom(bool $custom): self\n    {\n        $this->custom = $custom;\n\n        return $this;\n    }\n\n    /**\n     * Get the conditional format value objects.\n     *\n     * @return ConditionalFormatValueObject[]\n     */\n    public function getCfvos(): array\n    {\n        return $this->cfvos;\n    }\n\n    /**\n     * Set the conditional format value objects.\n     *\n     * @param ConditionalFormatValueObject[] $cfvos\n     */\n    public function setCfvos(array $cfvos): self\n    {\n        $this->cfvos = $cfvos;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/IconSetValues.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nenum IconSetValues: string\n{\n    case ThreeArrows = '3Arrows';\n    case ThreeArrowsGray = '3ArrowsGray';\n    case ThreeFlags = '3Flags';\n    case ThreeTrafficLights1 = '3TrafficLights1';\n    case ThreeTrafficLights2 = '3TrafficLights2';\n    case ThreeSigns = '3Signs';\n    case ThreeSymbols = '3Symbols';\n    case ThreeSymbols2 = '3Symbols2';\n    case FourArrows = '4Arrows';\n    case FourArrowsGray = '4ArrowsGray';\n    case FourRedToBlack = '4RedToBlack';\n    case FourRating = '4Rating';\n    case FourTrafficLights = '4TrafficLights';\n    case FiveArrows = '5Arrows';\n    case FiveArrowsGray = '5ArrowsGray';\n    case FiveRating = '5Rating';\n    case FiveQuarters = '5Quarters';\n    // The following icon sets are not implemented yet:\n    // case ThreeStars = \"3Stars\";\n    // case ThreeTriangles = \"3Triangles\";\n    // case FiveBoxes = \"5Boxes\";\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/MergedCellStyle.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass MergedCellStyle\n{\n    private bool $matched = false;\n\n    /**\n     * Indicate whether the last call to getMergedStyle found\n     * any conditional or table styles affecting the cell in question.\n     */\n    public function getMatched(): bool\n    {\n        return $this->matched;\n    }\n\n    /**\n     * Return a style that combines the base style for a cell\n     * with any conditional or table styles applicable to the cell.\n     *\n     * @param bool $tableFormats True/false to indicate whether\n     *        custom table styles should be considered.\n     *        Note that builtin table styles are not supported.\n     * @param bool $conditionals True/false to indicate whether\n     *        conditional styles should be considered.\n     */\n    public function getMergedStyle(Worksheet $worksheet, string $coordinate, bool $tableFormats = true, bool $conditionals = true, ?bool $builtInTableStyles = null): Style\n    {\n        $builtInTableStyles ??= $tableFormats;\n        $this->matched = false;\n        $styleMerger = new StyleMerger($worksheet->getStyle($coordinate));\n        if ($tableFormats) {\n            $this->assessTables($worksheet, $coordinate, $styleMerger);\n        }\n        if ($builtInTableStyles) {\n            $this->assessBuiltinTables($worksheet, $coordinate, $styleMerger);\n        }\n        if ($conditionals) {\n            $this->assessConditionals($worksheet, $coordinate, $styleMerger);\n        }\n\n        return $styleMerger->getStyle();\n    }\n\n    private function assessTables(Worksheet $worksheet, string $coordinate, StyleMerger $styleMerger): void\n    {\n        $tables = $worksheet->getTablesWithStylesForCell($worksheet->getCell($coordinate));\n        foreach ($tables as $ts) {\n            $dxfsTableStyle = $ts->getStyle()->getTableDxfsStyle();\n            if ($dxfsTableStyle !== null) {\n                $tableRow = $ts->getRowNumber($coordinate);\n                if ($tableRow === 0 && $dxfsTableStyle->getHeaderRowStyle() !== null) {\n                    $styleMerger->mergeStyle(\n                        $dxfsTableStyle->getHeaderRowStyle()\n                    );\n                    $this->matched = true;\n                } elseif ($tableRow % 2 === 1 && $dxfsTableStyle->getFirstRowStripeStyle() !== null) {\n                    $styleMerger->mergeStyle(\n                        $dxfsTableStyle->getFirstRowStripeStyle()\n                    );\n                    $this->matched = true;\n                } elseif ($tableRow % 2 === 0 && $dxfsTableStyle->getSecondRowStripeStyle() !== null) {\n                    $styleMerger->mergeStyle(\n                        $dxfsTableStyle->getSecondRowStripeStyle()\n                    );\n                    $this->matched = true;\n                }\n            }\n        }\n    }\n\n    private static ?Style $headerStyle = null;\n\n    private static ?Style $firstRowStyle = null;\n\n    private function assessBuiltinTables(Worksheet $worksheet, string $coordinate, StyleMerger $styleMerger): void\n    {\n        if (self::$headerStyle === null) {\n            self::$headerStyle = new Style();\n            self::$headerStyle->getFill()\n                ->setFillType(Fill::FILL_SOLID)\n                ->getEndColor()\n                ->setArgb('FF000000');\n            self::$headerStyle->getFill()->getStartColor()\n                ->setArgb('FF000000');\n            self::$headerStyle->getFont()\n                ->getColor()->setRgb('FFFFFF');\n        }\n        if (self::$firstRowStyle === null) {\n            self::$firstRowStyle = new Style();\n            self::$firstRowStyle->getFill()\n                ->setFillType(Fill::FILL_SOLID)\n                ->getEndColor()\n                ->setArgb('FFD9D9D9');\n            self::$firstRowStyle->getFill()->getStartColor()\n                ->setArgb('FFD9D9D9');\n        }\n        $tables = $worksheet->getTablesWithoutStylesForCell($worksheet->getCell($coordinate));\n        foreach ($tables as $table) {\n            $tableRow = $table->getRowNumber($coordinate);\n            if ($tableRow === 0 && $table->getShowHeaderRow()) {\n                $styleMerger->mergeStyle(self::$headerStyle);\n                $this->matched = true;\n            } elseif ($tableRow % 2 === 1) {\n                $styleMerger->mergeStyle(self::$firstRowStyle);\n                $this->matched = true;\n            }\n        }\n    }\n\n    private function assessConditionals(Worksheet $worksheet, string $coordinate, StyleMerger $styleMerger): void\n    {\n        if ($worksheet->getConditionalRange($coordinate) !== null) {\n            $assessor = new CellStyleAssessor($worksheet->getCell($coordinate), $worksheet->getConditionalRange($coordinate));\n        } else {\n            $assessor = new CellStyleAssessor($worksheet->getCell($coordinate), $coordinate);\n        }\n        $matchedStyle = $assessor\n            ->matchConditionsReturnNullIfNoneMatched(\n                $worksheet->getConditionalStyles($coordinate),\n                $worksheet->getCell($coordinate)\n                    ->getCalculatedValueString(),\n                true\n            );\n        if ($matchedStyle !== null) {\n            $this->matched = true;\n            $styleMerger->mergeStyle($matchedStyle);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/StyleMerger.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nclass StyleMerger\n{\n    protected Style $baseStyle;\n\n    public function __construct(Style $baseStyle)\n    {\n        // Setting to $baseStyle sometimes causes problems later on.\n        $array = $baseStyle->exportArray();\n        $this->baseStyle = new Style();\n        $this->baseStyle->applyFromArray($array);\n    }\n\n    public function getStyle(): Style\n    {\n        return $this->baseStyle;\n    }\n\n    public function mergeStyle(Style $style): void\n    {\n        if ($style->getNumberFormat()->getFormatCode() !== null) {\n            $this->baseStyle->getNumberFormat()->setFormatCode($style->getNumberFormat()->getFormatCode());\n        }\n        $this->mergeFontStyle($this->baseStyle->getFont(), $style->getFont());\n        $this->mergeFillStyle($this->baseStyle->getFill(), $style->getFill());\n        $this->mergeBordersStyle($this->baseStyle->getBorders(), $style->getBorders());\n    }\n\n    protected function mergeFontStyle(Font $baseFontStyle, Font $fontStyle): void\n    {\n        if ($fontStyle->getBold() !== null) {\n            $baseFontStyle->setBold($fontStyle->getBold());\n        }\n        if ($fontStyle->getItalic() !== null) {\n            $baseFontStyle->setItalic($fontStyle->getItalic());\n        }\n        if ($fontStyle->getStrikethrough() !== null) {\n            $baseFontStyle->setStrikethrough($fontStyle->getStrikethrough());\n        }\n        if ($fontStyle->getUnderline() !== null) {\n            $baseFontStyle->setUnderline($fontStyle->getUnderline());\n        }\n        if ($fontStyle->getColor()->getARGB() !== null) {\n            $baseFontStyle->setColor($fontStyle->getColor());\n        }\n    }\n\n    protected function mergeFillStyle(Fill $baseFillStyle, Fill $fillStyle): void\n    {\n        if ($fillStyle->getFillType() !== null) {\n            $baseFillStyle->setFillType($fillStyle->getFillType());\n        }\n        $baseFillStyle->setRotation($fillStyle->getRotation());\n        if ($fillStyle->getStartColor()->getARGB() !== null) {\n            $baseFillStyle->setStartColor($fillStyle->getStartColor());\n        }\n        if ($fillStyle->getEndColor()->getARGB() !== null) {\n            $baseFillStyle->setEndColor($fillStyle->getEndColor());\n        }\n    }\n\n    protected function mergeBordersStyle(Borders $baseBordersStyle, Borders $bordersStyle): void\n    {\n        $this->mergeBorderStyle($baseBordersStyle->getTop(), $bordersStyle->getTop());\n        $this->mergeBorderStyle($baseBordersStyle->getBottom(), $bordersStyle->getBottom());\n        $this->mergeBorderStyle($baseBordersStyle->getLeft(), $bordersStyle->getLeft());\n        $this->mergeBorderStyle($baseBordersStyle->getRight(), $bordersStyle->getRight());\n    }\n\n    protected function mergeBorderStyle(Border $baseBorderStyle, Border $borderStyle): void\n    {\n        if ($borderStyle->getBorderStyle() !== Border::BORDER_OMIT) {\n            $baseBorderStyle->setBorderStyle(\n                $borderStyle->getBorderStyle()\n            );\n        }\n        if ($borderStyle->getColor()->getARGB() !== null) {\n            $baseBorderStyle->setColor($borderStyle->getColor());\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Blanks.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\n/**\n * @method Blanks notBlank()\n * @method Blanks notEmpty()\n * @method Blanks isBlank()\n * @method Blanks isEmpty()\n */\nclass Blanks extends WizardAbstract implements WizardInterface\n{\n    protected const OPERATORS = [\n        'notBlank' => false,\n        'isBlank' => true,\n        'notEmpty' => false,\n        'empty' => true,\n    ];\n\n    protected const EXPRESSIONS = [\n        Wizard::NOT_BLANKS => 'LEN(TRIM(%s))>0',\n        Wizard::BLANKS => 'LEN(TRIM(%s))=0',\n    ];\n\n    protected bool $inverse;\n\n    public function __construct(string $cellRange, bool $inverse = false)\n    {\n        parent::__construct($cellRange);\n        $this->inverse = $inverse;\n    }\n\n    protected function inverse(bool $inverse): void\n    {\n        $this->inverse = $inverse;\n    }\n\n    protected function getExpression(): void\n    {\n        $this->expression = sprintf(\n            self::EXPRESSIONS[$this->inverse ? Wizard::BLANKS : Wizard::NOT_BLANKS],\n            $this->referenceCell\n        );\n    }\n\n    public function getConditional(): Conditional\n    {\n        $this->getExpression();\n\n        $conditional = new Conditional();\n        $conditional->setConditionType(\n            $this->inverse ? Conditional::CONDITION_CONTAINSBLANKS : Conditional::CONDITION_NOTCONTAINSBLANKS\n        );\n        $conditional->setConditions([$this->expression]);\n        $conditional->setStyle($this->getStyle());\n        $conditional->setStopIfTrue($this->getStopIfTrue());\n\n        return $conditional;\n    }\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface\n    {\n        if (\n            $conditional->getConditionType() !== Conditional::CONDITION_CONTAINSBLANKS\n            && $conditional->getConditionType() !== Conditional::CONDITION_NOTCONTAINSBLANKS\n        ) {\n            throw new Exception('Conditional is not a Blanks CF Rule conditional');\n        }\n\n        $wizard = new self($cellRange);\n        $wizard->style = $conditional->getStyle();\n        $wizard->stopIfTrue = $conditional->getStopIfTrue();\n        $wizard->inverse = $conditional->getConditionType() === Conditional::CONDITION_CONTAINSBLANKS;\n\n        return $wizard;\n    }\n\n    /**\n     * @param mixed[] $arguments\n     */\n    public function __call(string $methodName, array $arguments): self\n    {\n        if (!array_key_exists($methodName, self::OPERATORS)) {\n            throw new Exception('Invalid Operation for Blanks CF Rule Wizard');\n        }\n\n        $this->inverse(self::OPERATORS[$methodName]);\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\CellMatcher;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\n/**\n * @method CellValue equals($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method CellValue notEquals($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method CellValue greaterThan($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method CellValue greaterThanOrEqual($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method CellValue lessThan($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method CellValue lessThanOrEqual($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method CellValue between($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method CellValue notBetween($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method CellValue and($value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n */\nclass CellValue extends WizardAbstract implements WizardInterface\n{\n    protected const MAGIC_OPERATIONS = [\n        'equals' => Conditional::OPERATOR_EQUAL,\n        'notEquals' => Conditional::OPERATOR_NOTEQUAL,\n        'greaterThan' => Conditional::OPERATOR_GREATERTHAN,\n        'greaterThanOrEqual' => Conditional::OPERATOR_GREATERTHANOREQUAL,\n        'lessThan' => Conditional::OPERATOR_LESSTHAN,\n        'lessThanOrEqual' => Conditional::OPERATOR_LESSTHANOREQUAL,\n        'between' => Conditional::OPERATOR_BETWEEN,\n        'notBetween' => Conditional::OPERATOR_NOTBETWEEN,\n    ];\n\n    protected const SINGLE_OPERATORS = CellMatcher::COMPARISON_OPERATORS;\n\n    protected const RANGE_OPERATORS = CellMatcher::COMPARISON_RANGE_OPERATORS;\n\n    protected string $operator = Conditional::OPERATOR_EQUAL;\n\n    /** @var array<int|string> */\n    protected array $operand = [0];\n\n    /**\n     * @var string[]\n     */\n    protected array $operandValueType = [];\n\n    public function __construct(string $cellRange)\n    {\n        parent::__construct($cellRange);\n    }\n\n    protected function operator(string $operator): void\n    {\n        if ((!isset(self::SINGLE_OPERATORS[$operator])) && (!isset(self::RANGE_OPERATORS[$operator]))) {\n            throw new Exception('Invalid Operator for Cell Value CF Rule Wizard');\n        }\n\n        $this->operator = $operator;\n    }\n\n    protected function operand(int $index, mixed $operand, string $operandValueType = Wizard::VALUE_TYPE_LITERAL): void\n    {\n        if (is_string($operand)) {\n            $operand = $this->validateOperand($operand, $operandValueType);\n        }\n\n        $this->operand[$index] = $operand; //* @phpstan-ignore-line\n        $this->operandValueType[$index] = $operandValueType;\n    }\n\n    /** @param null|bool|float|int|string $value value to be wrapped */\n    protected function wrapValue(mixed $value, string $operandValueType): float|int|string\n    {\n        if (!is_numeric($value) && !is_bool($value) && null !== $value) {\n            if ($operandValueType === Wizard::VALUE_TYPE_LITERAL) {\n                return '\"' . str_replace('\"', '\"\"', $value) . '\"';\n            }\n\n            return $this->cellConditionCheck($value);\n        }\n\n        if (null === $value) {\n            $value = 'NULL';\n        } elseif (is_bool($value)) {\n            $value = $value ? 'TRUE' : 'FALSE';\n        }\n\n        return $value;\n    }\n\n    public function getConditional(): Conditional\n    {\n        if (!isset(self::RANGE_OPERATORS[$this->operator])) {\n            unset($this->operand[1], $this->operandValueType[1]);\n        }\n        $values = array_map([$this, 'wrapValue'], $this->operand, $this->operandValueType);\n\n        $conditional = new Conditional();\n        $conditional->setConditionType(Conditional::CONDITION_CELLIS);\n        $conditional->setOperatorType($this->operator);\n        $conditional->setConditions($values);\n        $conditional->setStyle($this->getStyle());\n        $conditional->setStopIfTrue($this->getStopIfTrue());\n\n        return $conditional;\n    }\n\n    protected static function unwrapString(string $condition): string\n    {\n        if ((str_starts_with($condition, '\"')) && (str_starts_with(strrev($condition), '\"'))) {\n            $condition = substr($condition, 1, -1);\n        }\n\n        return str_replace('\"\"', '\"', $condition);\n    }\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface\n    {\n        if ($conditional->getConditionType() !== Conditional::CONDITION_CELLIS) {\n            throw new Exception('Conditional is not a Cell Value CF Rule conditional');\n        }\n\n        $wizard = new self($cellRange);\n        $wizard->style = $conditional->getStyle();\n        $wizard->stopIfTrue = $conditional->getStopIfTrue();\n\n        $wizard->operator = $conditional->getOperatorType();\n        $conditions = $conditional->getConditions();\n        foreach ($conditions as $index => $condition) {\n            // Best-guess to try and identify if the text is a string literal, a cell reference or a formula?\n            $operandValueType = Wizard::VALUE_TYPE_LITERAL;\n            if (is_string($condition)) {\n                if (Calculation::keyInExcelConstants($condition)) {\n                    $condition = Calculation::getExcelConstants($condition);\n                } elseif (preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '$/i', $condition)) {\n                    $operandValueType = Wizard::VALUE_TYPE_CELL;\n                    $condition = self::reverseAdjustCellRef($condition, $cellRange);\n                } elseif (\n                    preg_match('/\\(\\)/', $condition)\n                    || preg_match('/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/i', $condition)\n                ) {\n                    $operandValueType = Wizard::VALUE_TYPE_FORMULA;\n                    $condition = self::reverseAdjustCellRef($condition, $cellRange);\n                } else {\n                    $condition = self::unwrapString($condition);\n                }\n            }\n            $wizard->operand($index, $condition, $operandValueType);\n        }\n\n        return $wizard;\n    }\n\n    /**\n     * @param mixed[] $arguments\n     */\n    public function __call(string $methodName, array $arguments): self\n    {\n        if (!isset(self::MAGIC_OPERATIONS[$methodName]) && $methodName !== 'and') {\n            throw new Exception('Invalid Operator for Cell Value CF Rule Wizard');\n        }\n\n        if ($methodName === 'and') {\n            if (!isset(self::RANGE_OPERATORS[$this->operator])) {\n                throw new Exception('AND Value is only appropriate for range operators');\n            }\n\n            $this->operand(1, ...$arguments);\n\n            return $this;\n        }\n\n        $this->operator(self::MAGIC_OPERATIONS[$methodName]);\n        //$this->operand(0, ...$arguments);\n        if (count($arguments) < 2) {\n            $this->operand(0, $arguments[0]);\n        } else {\n            /** @var string */\n            $arg1 = $arguments[1];\n            $this->operand(0, $arguments[0], $arg1);\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/DateValue.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\n\n/**\n * @method DateValue yesterday()\n * @method DateValue today()\n * @method DateValue tomorrow()\n * @method DateValue lastSevenDays()\n * @method DateValue lastWeek()\n * @method DateValue thisWeek()\n * @method DateValue nextWeek()\n * @method DateValue lastMonth()\n * @method DateValue thisMonth()\n * @method DateValue nextMonth()\n */\nclass DateValue extends WizardAbstract implements WizardInterface\n{\n    protected const MAGIC_OPERATIONS = [\n        'yesterday' => Conditional::TIMEPERIOD_YESTERDAY,\n        'today' => Conditional::TIMEPERIOD_TODAY,\n        'tomorrow' => Conditional::TIMEPERIOD_TOMORROW,\n        'lastSevenDays' => Conditional::TIMEPERIOD_LAST_7_DAYS,\n        'last7Days' => Conditional::TIMEPERIOD_LAST_7_DAYS,\n        'lastWeek' => Conditional::TIMEPERIOD_LAST_WEEK,\n        'thisWeek' => Conditional::TIMEPERIOD_THIS_WEEK,\n        'nextWeek' => Conditional::TIMEPERIOD_NEXT_WEEK,\n        'lastMonth' => Conditional::TIMEPERIOD_LAST_MONTH,\n        'thisMonth' => Conditional::TIMEPERIOD_THIS_MONTH,\n        'nextMonth' => Conditional::TIMEPERIOD_NEXT_MONTH,\n    ];\n\n    protected const EXPRESSIONS = [\n        Conditional::TIMEPERIOD_YESTERDAY => 'FLOOR(%s,1)=TODAY()-1',\n        Conditional::TIMEPERIOD_TODAY => 'FLOOR(%s,1)=TODAY()',\n        Conditional::TIMEPERIOD_TOMORROW => 'FLOOR(%s,1)=TODAY()+1',\n        Conditional::TIMEPERIOD_LAST_7_DAYS => 'AND(TODAY()-FLOOR(%s,1)<=6,FLOOR(%s,1)<=TODAY())',\n        Conditional::TIMEPERIOD_LAST_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(%s,0)<(WEEKDAY(TODAY())+7))',\n        Conditional::TIMEPERIOD_THIS_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(%s,0)-TODAY()<=7-WEEKDAY(TODAY()))',\n        Conditional::TIMEPERIOD_NEXT_WEEK => 'AND(ROUNDDOWN(%s,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(%s,0)-TODAY()<(15-WEEKDAY(TODAY())))',\n        Conditional::TIMEPERIOD_LAST_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0-1)),YEAR(%s)=YEAR(EDATE(TODAY(),0-1)))',\n        Conditional::TIMEPERIOD_THIS_MONTH => 'AND(MONTH(%s)=MONTH(TODAY()),YEAR(%s)=YEAR(TODAY()))',\n        Conditional::TIMEPERIOD_NEXT_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0+1)),YEAR(%s)=YEAR(EDATE(TODAY(),0+1)))',\n    ];\n\n    protected string $operator;\n\n    public function __construct(string $cellRange)\n    {\n        parent::__construct($cellRange);\n    }\n\n    protected function operator(string $operator): void\n    {\n        $this->operator = $operator;\n    }\n\n    protected function setExpression(): void\n    {\n        $referenceCount = substr_count(self::EXPRESSIONS[$this->operator], '%s');\n        $references = array_fill(0, $referenceCount, $this->referenceCell);\n        $this->expression = sprintf(self::EXPRESSIONS[$this->operator], ...$references);\n    }\n\n    public function getConditional(): Conditional\n    {\n        $this->setExpression();\n\n        $conditional = new Conditional();\n        $conditional->setConditionType(Conditional::CONDITION_TIMEPERIOD);\n        $conditional->setText($this->operator);\n        $conditional->setConditions([$this->expression]);\n        $conditional->setStyle($this->getStyle());\n        $conditional->setStopIfTrue($this->getStopIfTrue());\n\n        return $conditional;\n    }\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface\n    {\n        if ($conditional->getConditionType() !== Conditional::CONDITION_TIMEPERIOD) {\n            throw new Exception('Conditional is not a Date Value CF Rule conditional');\n        }\n\n        $wizard = new self($cellRange);\n        $wizard->style = $conditional->getStyle();\n        $wizard->stopIfTrue = $conditional->getStopIfTrue();\n        $wizard->operator = $conditional->getText();\n\n        return $wizard;\n    }\n\n    /**\n     * @param mixed[] $arguments\n     */\n    public function __call(string $methodName, array $arguments): self\n    {\n        if (!isset(self::MAGIC_OPERATIONS[$methodName])) {\n            throw new Exception('Invalid Operation for Date Value CF Rule Wizard');\n        }\n\n        $this->operator(self::MAGIC_OPERATIONS[$methodName]);\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Duplicates.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\n\n/**\n * @method Errors duplicates()\n * @method Errors unique()\n */\nclass Duplicates extends WizardAbstract implements WizardInterface\n{\n    protected const OPERATORS = [\n        'duplicates' => false,\n        'unique' => true,\n    ];\n\n    protected bool $inverse;\n\n    public function __construct(string $cellRange, bool $inverse = false)\n    {\n        parent::__construct($cellRange);\n        $this->inverse = $inverse;\n    }\n\n    protected function inverse(bool $inverse): void\n    {\n        $this->inverse = $inverse;\n    }\n\n    public function getConditional(): Conditional\n    {\n        $conditional = new Conditional();\n        $conditional->setConditionType(\n            $this->inverse ? Conditional::CONDITION_UNIQUE : Conditional::CONDITION_DUPLICATES\n        );\n        $conditional->setStyle($this->getStyle());\n        $conditional->setStopIfTrue($this->getStopIfTrue());\n\n        return $conditional;\n    }\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface\n    {\n        if (\n            $conditional->getConditionType() !== Conditional::CONDITION_DUPLICATES\n            && $conditional->getConditionType() !== Conditional::CONDITION_UNIQUE\n        ) {\n            throw new Exception('Conditional is not a Duplicates CF Rule conditional');\n        }\n\n        $wizard = new self($cellRange);\n        $wizard->style = $conditional->getStyle();\n        $wizard->stopIfTrue = $conditional->getStopIfTrue();\n        $wizard->inverse = $conditional->getConditionType() === Conditional::CONDITION_UNIQUE;\n\n        return $wizard;\n    }\n\n    /**\n     * @param mixed[] $arguments\n     */\n    public function __call(string $methodName, array $arguments): self\n    {\n        if (!array_key_exists($methodName, self::OPERATORS)) {\n            throw new Exception('Invalid Operation for Errors CF Rule Wizard');\n        }\n\n        $this->inverse(self::OPERATORS[$methodName]);\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Errors.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\n/**\n * @method Errors notError()\n * @method Errors isError()\n */\nclass Errors extends WizardAbstract implements WizardInterface\n{\n    protected const OPERATORS = [\n        'notError' => false,\n        'isError' => true,\n    ];\n\n    protected const EXPRESSIONS = [\n        Wizard::NOT_ERRORS => 'NOT(ISERROR(%s))',\n        Wizard::ERRORS => 'ISERROR(%s)',\n    ];\n\n    protected bool $inverse;\n\n    public function __construct(string $cellRange, bool $inverse = false)\n    {\n        parent::__construct($cellRange);\n        $this->inverse = $inverse;\n    }\n\n    protected function inverse(bool $inverse): void\n    {\n        $this->inverse = $inverse;\n    }\n\n    protected function getExpression(): void\n    {\n        $this->expression = sprintf(\n            self::EXPRESSIONS[$this->inverse ? Wizard::ERRORS : Wizard::NOT_ERRORS],\n            $this->referenceCell\n        );\n    }\n\n    public function getConditional(): Conditional\n    {\n        $this->getExpression();\n\n        $conditional = new Conditional();\n        $conditional->setConditionType(\n            $this->inverse ? Conditional::CONDITION_CONTAINSERRORS : Conditional::CONDITION_NOTCONTAINSERRORS\n        );\n        $conditional->setConditions([$this->expression]);\n        $conditional->setStyle($this->getStyle());\n        $conditional->setStopIfTrue($this->getStopIfTrue());\n\n        return $conditional;\n    }\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface\n    {\n        if (\n            $conditional->getConditionType() !== Conditional::CONDITION_CONTAINSERRORS\n            && $conditional->getConditionType() !== Conditional::CONDITION_NOTCONTAINSERRORS\n        ) {\n            throw new Exception('Conditional is not an Errors CF Rule conditional');\n        }\n\n        $wizard = new self($cellRange);\n        $wizard->style = $conditional->getStyle();\n        $wizard->stopIfTrue = $conditional->getStopIfTrue();\n        $wizard->inverse = $conditional->getConditionType() === Conditional::CONDITION_CONTAINSERRORS;\n\n        return $wizard;\n    }\n\n    /**\n     * @param mixed[] $arguments\n     */\n    public function __call(string $methodName, array $arguments): self\n    {\n        if (!array_key_exists($methodName, self::OPERATORS)) {\n            throw new Exception('Invalid Operation for Errors CF Rule Wizard');\n        }\n\n        $this->inverse(self::OPERATORS[$methodName]);\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Expression.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\n/**\n * @method Expression formula(string $expression)\n */\nclass Expression extends WizardAbstract implements WizardInterface\n{\n    protected string $expression;\n\n    public function __construct(string $cellRange)\n    {\n        parent::__construct($cellRange);\n    }\n\n    public function expression(string $expression): self\n    {\n        $expression = $this->validateOperand($expression, Wizard::VALUE_TYPE_FORMULA);\n        $this->expression = $expression;\n\n        return $this;\n    }\n\n    public function getConditional(): Conditional\n    {\n        /** @var string[] */\n        $expression = $this->adjustConditionsForCellReferences([$this->expression]);\n\n        $conditional = new Conditional();\n        $conditional->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $conditional->setConditions($expression);\n        $conditional->setStyle($this->getStyle());\n        $conditional->setStopIfTrue($this->getStopIfTrue());\n\n        return $conditional;\n    }\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface\n    {\n        if ($conditional->getConditionType() !== Conditional::CONDITION_EXPRESSION) {\n            throw new Exception('Conditional is not an Expression CF Rule conditional');\n        }\n\n        $wizard = new self($cellRange);\n        $wizard->style = $conditional->getStyle();\n        $wizard->stopIfTrue = $conditional->getStopIfTrue();\n        $wizard->expression = self::reverseAdjustCellRef((string) ($conditional->getConditions()[0]), $cellRange);\n\n        return $wizard;\n    }\n\n    /**\n     * @param string[] $arguments\n     */\n    public function __call(string $methodName, array $arguments): self\n    {\n        if ($methodName !== 'formula') {\n            throw new Exception('Invalid Operation for Expression CF Rule Wizard');\n        }\n\n        $this->expression(...$arguments);\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/TextValue.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\n/**\n * @method TextValue contains(string $value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method TextValue doesNotContain(string $value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method TextValue doesntContain(string $value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method TextValue beginsWith(string $value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method TextValue startsWith(string $value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n * @method TextValue endsWith(string $value, string $operandValueType = Wizard::VALUE_TYPE_LITERAL)\n */\nclass TextValue extends WizardAbstract implements WizardInterface\n{\n    protected const MAGIC_OPERATIONS = [\n        'contains' => Conditional::OPERATOR_CONTAINSTEXT,\n        'doesntContain' => Conditional::OPERATOR_NOTCONTAINS,\n        'doesNotContain' => Conditional::OPERATOR_NOTCONTAINS,\n        'beginsWith' => Conditional::OPERATOR_BEGINSWITH,\n        'startsWith' => Conditional::OPERATOR_BEGINSWITH,\n        'endsWith' => Conditional::OPERATOR_ENDSWITH,\n    ];\n\n    protected const OPERATORS = [\n        Conditional::OPERATOR_CONTAINSTEXT => Conditional::CONDITION_CONTAINSTEXT,\n        Conditional::OPERATOR_NOTCONTAINS => Conditional::CONDITION_NOTCONTAINSTEXT,\n        Conditional::OPERATOR_BEGINSWITH => Conditional::CONDITION_BEGINSWITH,\n        Conditional::OPERATOR_ENDSWITH => Conditional::CONDITION_ENDSWITH,\n    ];\n\n    protected const EXPRESSIONS = [\n        Conditional::OPERATOR_CONTAINSTEXT => 'NOT(ISERROR(SEARCH(%s,%s)))',\n        Conditional::OPERATOR_NOTCONTAINS => 'ISERROR(SEARCH(%s,%s))',\n        Conditional::OPERATOR_BEGINSWITH => 'LEFT(%s,LEN(%s))=%s',\n        Conditional::OPERATOR_ENDSWITH => 'RIGHT(%s,LEN(%s))=%s',\n    ];\n\n    protected string $operator;\n\n    protected string $operand;\n\n    protected string $operandValueType;\n\n    public function __construct(string $cellRange)\n    {\n        parent::__construct($cellRange);\n    }\n\n    protected function operator(string $operator): void\n    {\n        if (!isset(self::OPERATORS[$operator])) {\n            throw new Exception('Invalid Operator for Text Value CF Rule Wizard');\n        }\n\n        $this->operator = $operator;\n    }\n\n    protected function operand(string $operand, string $operandValueType = Wizard::VALUE_TYPE_LITERAL): void\n    {\n        $operand = $this->validateOperand($operand, $operandValueType);\n\n        $this->operand = $operand;\n        $this->operandValueType = $operandValueType;\n    }\n\n    protected function wrapValue(string $value): string\n    {\n        return '\"' . $value . '\"';\n    }\n\n    protected function setExpression(): void\n    {\n        $operand = $this->operandValueType === Wizard::VALUE_TYPE_LITERAL\n            ? $this->wrapValue(str_replace('\"', '\"\"', $this->operand))\n            : $this->cellConditionCheck($this->operand);\n\n        if (\n            $this->operator === Conditional::OPERATOR_CONTAINSTEXT\n            || $this->operator === Conditional::OPERATOR_NOTCONTAINS\n        ) {\n            $this->expression = sprintf(self::EXPRESSIONS[$this->operator], $operand, $this->referenceCell);\n        } else {\n            $this->expression = sprintf(self::EXPRESSIONS[$this->operator], $this->referenceCell, $operand, $operand);\n        }\n    }\n\n    public function getConditional(): Conditional\n    {\n        $this->setExpression();\n\n        $conditional = new Conditional();\n        $conditional->setConditionType(self::OPERATORS[$this->operator]);\n        $conditional->setOperatorType($this->operator);\n        $conditional->setText(\n            $this->operandValueType !== Wizard::VALUE_TYPE_LITERAL\n                ? $this->cellConditionCheck($this->operand)\n                : $this->operand\n        );\n        $conditional->setConditions([$this->expression]);\n        $conditional->setStyle($this->getStyle());\n        $conditional->setStopIfTrue($this->getStopIfTrue());\n\n        return $conditional;\n    }\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface\n    {\n        if (!in_array($conditional->getConditionType(), self::OPERATORS, true)) {\n            throw new Exception('Conditional is not a Text Value CF Rule conditional');\n        }\n\n        $wizard = new self($cellRange);\n        $wizard->operator = (string) array_search($conditional->getConditionType(), self::OPERATORS, true);\n        $wizard->style = $conditional->getStyle();\n        $wizard->stopIfTrue = $conditional->getStopIfTrue();\n\n        // Best-guess to try and identify if the text is a string literal, a cell reference or a formula?\n        $wizard->operandValueType = Wizard::VALUE_TYPE_LITERAL;\n        $condition = $conditional->getText();\n        if (preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '$/i', $condition)) {\n            $wizard->operandValueType = Wizard::VALUE_TYPE_CELL;\n            $condition = self::reverseAdjustCellRef($condition, $cellRange);\n        } elseif (\n            preg_match('/\\(\\)/', $condition)\n            || preg_match('/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/i', $condition)\n        ) {\n            $wizard->operandValueType = Wizard::VALUE_TYPE_FORMULA;\n        }\n        $wizard->operand = $condition;\n\n        return $wizard;\n    }\n\n    /**\n     * @param mixed[] $arguments\n     */\n    public function __call(string $methodName, array $arguments): self\n    {\n        if (!isset(self::MAGIC_OPERATIONS[$methodName])) {\n            throw new Exception('Invalid Operation for Text Value CF Rule Wizard');\n        }\n\n        $this->operator(self::MAGIC_OPERATIONS[$methodName]);\n        //$this->operand(...$arguments);\n        if (count($arguments) < 2) {\n            /** @var string */\n            $arg0 = $arguments[0];\n            $this->operand($arg0);\n        } else {\n            /** @var string */\n            $arg0 = $arguments[0];\n            /** @var string */\n            $arg1 = $arguments[1];\n            $this->operand($arg0, $arg1);\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nabstract class WizardAbstract\n{\n    protected ?Style $style = null;\n\n    protected string $expression;\n\n    protected string $cellRange;\n\n    protected string $referenceCell;\n\n    protected int $referenceRow;\n\n    protected bool $stopIfTrue = false;\n\n    protected int $referenceColumn;\n\n    public function __construct(string $cellRange)\n    {\n        $this->setCellRange($cellRange);\n    }\n\n    public function getCellRange(): string\n    {\n        return $this->cellRange;\n    }\n\n    public function setCellRange(string $cellRange): void\n    {\n        $this->cellRange = $cellRange;\n        $this->setReferenceCellForExpressions($cellRange);\n    }\n\n    protected function setReferenceCellForExpressions(string $conditionalRange): void\n    {\n        $conditionalRange = Coordinate::splitRange(str_replace('$', '', strtoupper($conditionalRange)));\n        [$this->referenceCell] = $conditionalRange[0];\n\n        [$this->referenceColumn, $this->referenceRow] = Coordinate::indexesFromString($this->referenceCell);\n    }\n\n    public function getStopIfTrue(): bool\n    {\n        return $this->stopIfTrue;\n    }\n\n    public function setStopIfTrue(bool $stopIfTrue): void\n    {\n        $this->stopIfTrue = $stopIfTrue;\n    }\n\n    public function getStyle(): Style\n    {\n        return $this->style ?? new Style(false, true);\n    }\n\n    public function setStyle(Style $style): void\n    {\n        $this->style = $style;\n    }\n\n    protected function validateOperand(string $operand, string $operandValueType = Wizard::VALUE_TYPE_LITERAL): string\n    {\n        if (\n            $operandValueType === Wizard::VALUE_TYPE_LITERAL\n            && str_starts_with($operand, '\"')\n            && str_ends_with($operand, '\"')\n        ) {\n            $operand = str_replace('\"\"', '\"', substr($operand, 1, -1));\n        } elseif ($operandValueType === Wizard::VALUE_TYPE_FORMULA && str_starts_with($operand, '=')) {\n            $operand = substr($operand, 1);\n        }\n\n        return $operand;\n    }\n\n    /** @param string[] $matches */\n    protected static function reverseCellAdjustment(array $matches, int $referenceColumn, int $referenceRow): string\n    {\n        $worksheet = $matches[1];\n        $column = $matches[6];\n        $row = $matches[7];\n\n        if (!str_contains($column, '$')) {\n            $column = Coordinate::columnIndexFromString($column);\n            $column -= $referenceColumn - 1;\n            $column = Coordinate::stringFromColumnIndex($column);\n        }\n\n        if (!str_contains($row, '$')) {\n            $row = (int) $row - ($referenceRow - 1);\n        }\n\n        return \"{$worksheet}{$column}{$row}\";\n    }\n\n    public static function reverseAdjustCellRef(string $condition, string $cellRange): string\n    {\n        $conditionalRange = Coordinate::splitRange(str_replace('$', '', strtoupper($cellRange)));\n        [$referenceCell] = $conditionalRange[0];\n        [$referenceColumnIndex, $referenceRow] = Coordinate::indexesFromString($referenceCell);\n\n        $splitCondition = explode(Calculation::FORMULA_STRING_QUOTE, $condition);\n        $i = false;\n        foreach ($splitCondition as &$value) {\n            //    Only count/replace in alternating array entries (ie. not in quoted strings)\n            $i = $i === false;\n            if ($i) {\n                $value = (string) preg_replace_callback(\n                    '/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/i',\n                    fn ($matches): string => self::reverseCellAdjustment($matches, $referenceColumnIndex, $referenceRow),\n                    $value\n                );\n            }\n        }\n        unset($value);\n\n        //    Then rebuild the condition string to return it\n        return implode(Calculation::FORMULA_STRING_QUOTE, $splitCondition);\n    }\n\n    /** @param string[] $matches */\n    protected function conditionCellAdjustment(array $matches): string\n    {\n        $worksheet = $matches[1];\n        $column = $matches[6];\n        $row = $matches[7];\n\n        if (!str_contains($column, '$')) {\n            $column = Coordinate::columnIndexFromString($column);\n            $column += $this->referenceColumn - 1;\n            $column = Coordinate::stringFromColumnIndex($column);\n        }\n\n        if (!str_contains($row, '$')) {\n            $row = (int) $row + ($this->referenceRow - 1);\n        }\n\n        return \"{$worksheet}{$column}{$row}\";\n    }\n\n    protected function cellConditionCheck(string $condition): string\n    {\n        $splitCondition = explode(Calculation::FORMULA_STRING_QUOTE, $condition);\n        $i = false;\n        foreach ($splitCondition as &$value) {\n            //    Only count/replace in alternating array entries (ie. not in quoted strings)\n            $i = $i === false;\n            if ($i) {\n                $value = (string) preg_replace_callback(\n                    '/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/i',\n                    [$this, 'conditionCellAdjustment'],\n                    $value\n                );\n            }\n        }\n        unset($value);\n\n        //    Then rebuild the condition string to return it\n        return implode(Calculation::FORMULA_STRING_QUOTE, $splitCondition);\n    }\n\n    /**\n     * @param mixed[] $conditions\n     *\n     * @return mixed[]\n     */\n    protected function adjustConditionsForCellReferences(array $conditions): array\n    {\n        return array_map(\n            [$this, 'cellConditionCheck'],\n            $conditions\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardInterface.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\ninterface WizardInterface\n{\n    public function getCellRange(): string;\n\n    public function setCellRange(string $cellRange): void;\n\n    public function getStyle(): Style;\n\n    public function setStyle(Style $style): void;\n\n    public function getStopIfTrue(): bool;\n\n    public function setStopIfTrue(bool $stopIfTrue): void;\n\n    public function getConditional(): Conditional;\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): self;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard\\WizardInterface;\n\nclass Wizard\n{\n    public const CELL_VALUE = 'cellValue';\n    public const TEXT_VALUE = 'textValue';\n    public const BLANKS = Conditional::CONDITION_CONTAINSBLANKS;\n    public const NOT_BLANKS = Conditional::CONDITION_NOTCONTAINSBLANKS;\n    public const ERRORS = Conditional::CONDITION_CONTAINSERRORS;\n    public const NOT_ERRORS = Conditional::CONDITION_NOTCONTAINSERRORS;\n    public const EXPRESSION = Conditional::CONDITION_EXPRESSION;\n    public const FORMULA = Conditional::CONDITION_EXPRESSION;\n    public const DATES_OCCURRING = 'DateValue';\n    public const DUPLICATES = Conditional::CONDITION_DUPLICATES;\n    public const UNIQUE = Conditional::CONDITION_UNIQUE;\n\n    public const VALUE_TYPE_LITERAL = 'value';\n    public const VALUE_TYPE_CELL = 'cell';\n    public const VALUE_TYPE_FORMULA = 'formula';\n\n    protected string $cellRange;\n\n    public function __construct(string $cellRange)\n    {\n        $this->cellRange = $cellRange;\n    }\n\n    public function newRule(string $ruleType): WizardInterface\n    {\n        return match ($ruleType) {\n            self::CELL_VALUE => new Wizard\\CellValue($this->cellRange),\n            self::TEXT_VALUE => new Wizard\\TextValue($this->cellRange),\n            self::BLANKS => new Wizard\\Blanks($this->cellRange, true),\n            self::NOT_BLANKS => new Wizard\\Blanks($this->cellRange, false),\n            self::ERRORS => new Wizard\\Errors($this->cellRange, true),\n            self::NOT_ERRORS => new Wizard\\Errors($this->cellRange, false),\n            self::EXPRESSION, self::FORMULA => new Wizard\\Expression($this->cellRange),\n            self::DATES_OCCURRING => new Wizard\\DateValue($this->cellRange),\n            self::DUPLICATES => new Wizard\\Duplicates($this->cellRange, false),\n            self::UNIQUE => new Wizard\\Duplicates($this->cellRange, true),\n            default => throw new Exception('No wizard exists for this CF rule type'),\n        };\n    }\n\n    public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface\n    {\n        $conditionalType = $conditional->getConditionType();\n\n        return match ($conditionalType) {\n            Conditional::CONDITION_CELLIS => Wizard\\CellValue::fromConditional($conditional, $cellRange),\n            Conditional::CONDITION_CONTAINSTEXT, Conditional::CONDITION_NOTCONTAINSTEXT, Conditional::CONDITION_BEGINSWITH, Conditional::CONDITION_ENDSWITH => Wizard\\TextValue::fromConditional($conditional, $cellRange),\n            Conditional::CONDITION_CONTAINSBLANKS, Conditional::CONDITION_NOTCONTAINSBLANKS => Wizard\\Blanks::fromConditional($conditional, $cellRange),\n            Conditional::CONDITION_CONTAINSERRORS, Conditional::CONDITION_NOTCONTAINSERRORS => Wizard\\Errors::fromConditional($conditional, $cellRange),\n            Conditional::CONDITION_TIMEPERIOD => Wizard\\DateValue::fromConditional($conditional, $cellRange),\n            Conditional::CONDITION_EXPRESSION => Wizard\\Expression::fromConditional($conditional, $cellRange),\n            Conditional::CONDITION_DUPLICATES, Conditional::CONDITION_UNIQUE => Wizard\\Duplicates::fromConditional($conditional, $cellRange),\n            default => throw new Exception('No wizard exists for this CF rule type'),\n        };\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Fill.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nclass Fill extends Supervisor\n{\n    // Fill types\n    const FILL_NONE = 'none';\n    const FILL_SOLID = 'solid';\n    const FILL_GRADIENT_LINEAR = 'linear';\n    const FILL_GRADIENT_PATH = 'path';\n    const FILL_PATTERN_DARKDOWN = 'darkDown';\n    const FILL_PATTERN_DARKGRAY = 'darkGray';\n    const FILL_PATTERN_DARKGRID = 'darkGrid';\n    const FILL_PATTERN_DARKHORIZONTAL = 'darkHorizontal';\n    const FILL_PATTERN_DARKTRELLIS = 'darkTrellis';\n    const FILL_PATTERN_DARKUP = 'darkUp';\n    const FILL_PATTERN_DARKVERTICAL = 'darkVertical';\n    const FILL_PATTERN_GRAY0625 = 'gray0625';\n    const FILL_PATTERN_GRAY125 = 'gray125';\n    const FILL_PATTERN_LIGHTDOWN = 'lightDown';\n    const FILL_PATTERN_LIGHTGRAY = 'lightGray';\n    const FILL_PATTERN_LIGHTGRID = 'lightGrid';\n    const FILL_PATTERN_LIGHTHORIZONTAL = 'lightHorizontal';\n    const FILL_PATTERN_LIGHTTRELLIS = 'lightTrellis';\n    const FILL_PATTERN_LIGHTUP = 'lightUp';\n    const FILL_PATTERN_LIGHTVERTICAL = 'lightVertical';\n    const FILL_PATTERN_MEDIUMGRAY = 'mediumGray';\n\n    public ?int $startcolorIndex = null;\n\n    public ?int $endcolorIndex = null;\n\n    /**\n     * Fill type.\n     */\n    protected ?string $fillType = self::FILL_NONE;\n\n    /**\n     * Rotation.\n     */\n    protected float $rotation = 0.0;\n\n    /**\n     * Start color.\n     */\n    protected Color $startColor;\n\n    /**\n     * End color.\n     */\n    protected Color $endColor;\n\n    private bool $colorChanged = false;\n\n    /**\n     * Create a new Fill.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     * @param bool $isConditional Flag indicating if this is a conditional style or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false, bool $isConditional = false)\n    {\n        // Supervisor?\n        parent::__construct($isSupervisor);\n\n        // Initialise values\n        if ($isConditional) {\n            $this->fillType = null;\n        }\n        $this->startColor = new Color(Color::COLOR_WHITE, $isSupervisor, $isConditional);\n        $this->endColor = new Color(Color::COLOR_BLACK, $isSupervisor, $isConditional);\n\n        // bind parent if we are a supervisor\n        if ($isSupervisor) {\n            $this->startColor->bindParent($this, 'startColor');\n            $this->endColor->bindParent($this, 'endColor');\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        return $parent->getSharedComponent()->getFill();\n    }\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return array{fill: mixed[]}\n     */\n    public function getStyleArray(array $array): array\n    {\n        return ['fill' => $array];\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getFill()->applyFromArray(\n     *     [\n     *         'fillType' => Fill::FILL_GRADIENT_LINEAR,\n     *         'rotation' => 0.0,\n     *         'startColor' => [\n     *             'rgb' => '000000'\n     *         ],\n     *         'endColor' => [\n     *             'argb' => 'FFFFFFFF'\n     *         ]\n     *     ]\n     * );\n     * </code>\n     *\n     * @param array{fillType?: string, rotation?: float, startColor?: array{rgb?: string, argb?: string}, endColor?: array{rgb?: string, argb?: string}, color?: array{rgb?: string, argb?: string}} $styleArray Array containing style information\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray): static\n    {\n        if ($this->isSupervisor) {\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($styleArray));\n        } else {\n            if (isset($styleArray['fillType'])) {\n                $this->setFillType($styleArray['fillType']);\n            }\n            if (isset($styleArray['rotation'])) {\n                $this->setRotation($styleArray['rotation']);\n            }\n            if (isset($styleArray['startColor'])) {\n                $this->getStartColor()\n                    ->applyFromArray($styleArray['startColor']);\n            }\n            if (isset($styleArray['endColor'])) {\n                $this->getEndColor()\n                    ->applyFromArray($styleArray['endColor']);\n            }\n            if (isset($styleArray['color'])) {\n                $this->getStartColor()\n                    ->applyFromArray($styleArray['color']);\n                $this->getEndColor()\n                    ->applyFromArray($styleArray['color']);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Fill Type.\n     */\n    public function getFillType(): ?string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getFillType();\n        }\n\n        return $this->fillType;\n    }\n\n    /**\n     * Set Fill Type.\n     *\n     * @param string $fillType Fill type, see self::FILL_*\n     *\n     * @return $this\n     */\n    public function setFillType(string $fillType): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['fillType' => $fillType]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->fillType = $fillType;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Rotation.\n     */\n    public function getRotation(): float\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getRotation();\n        }\n\n        return $this->rotation;\n    }\n\n    /**\n     * Set Rotation.\n     *\n     * @return $this\n     */\n    public function setRotation(float $angleInDegrees): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['rotation' => $angleInDegrees]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->rotation = $angleInDegrees;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Start Color.\n     */\n    public function getStartColor(): Color\n    {\n        return $this->startColor;\n    }\n\n    /**\n     * Set Start Color.\n     *\n     * @return $this\n     */\n    public function setStartColor(Color $color): static\n    {\n        $this->colorChanged = true;\n        // make sure parameter is a real color and not a supervisor\n        $color = $color->getIsSupervisor() ? $color->getSharedComponent() : $color;\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStartColor()->getStyleArray(['argb' => $color->getARGB()]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->startColor = $color;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get End Color.\n     */\n    public function getEndColor(): Color\n    {\n        return $this->endColor;\n    }\n\n    /**\n     * Set End Color.\n     *\n     * @return $this\n     */\n    public function setEndColor(Color $color): static\n    {\n        $this->colorChanged = true;\n        // make sure parameter is a real color and not a supervisor\n        $color = $color->getIsSupervisor() ? $color->getSharedComponent() : $color;\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getEndColor()->getStyleArray(['argb' => $color->getARGB()]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->endColor = $color;\n        }\n\n        return $this;\n    }\n\n    public function getColorsChanged(): bool\n    {\n        if ($this->isSupervisor) {\n            $changed = $this->getSharedComponent()->colorChanged;\n        } else {\n            $changed = $this->colorChanged;\n        }\n\n        return $changed || $this->startColor->getHasChanged() || $this->endColor->getHasChanged();\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHashCode();\n        }\n\n        // Note that we don't care about colours for fill type NONE, but could have duplicate NONEs with\n        //  different hashes if we don't explicitly prevent this\n        return md5(\n            $this->getFillType()\n            . $this->getRotation()\n            . ($this->getFillType() !== self::FILL_NONE ? $this->getStartColor()->getHashCode() : '')\n            . ($this->getFillType() !== self::FILL_NONE ? $this->getEndColor()->getHashCode() : '')\n            . ((string) $this->getColorsChanged())\n            . __CLASS__\n        );\n    }\n\n    /** @return mixed[] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'fillType', $this->getFillType());\n        $this->exportArray2($exportedArray, 'rotation', $this->getRotation());\n        if ($this->getColorsChanged()) {\n            $this->exportArray2($exportedArray, 'endColor', $this->getEndColor());\n            $this->exportArray2($exportedArray, 'startColor', $this->getStartColor());\n        }\n\n        return $exportedArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Font.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Theme;\n\nclass Font extends Supervisor\n{\n    // Underline types\n    const UNDERLINE_NONE = 'none';\n    const UNDERLINE_DOUBLE = 'double';\n    const UNDERLINE_DOUBLEACCOUNTING = 'doubleAccounting';\n    const UNDERLINE_SINGLE = 'single';\n    const UNDERLINE_SINGLEACCOUNTING = 'singleAccounting';\n\n    const CAP_ALL = 'all';\n    const CAP_SMALL = 'small';\n    const CAP_NONE = 'none';\n    private const VALID_CAPS = [self::CAP_ALL, self::CAP_SMALL, self::CAP_NONE];\n\n    protected ?string $cap = null;\n\n    public const DEFAULT_FONT_NAME = 'Calibri';\n\n    /**\n     * Font Name.\n     */\n    protected ?string $name = self::DEFAULT_FONT_NAME;\n\n    /**\n     * The following 7 are used only for chart titles, I think.\n     */\n    private string $latin = '';\n\n    private string $eastAsian = '';\n\n    private string $complexScript = '';\n\n    private int $baseLine = 0;\n\n    private string $strikeType = '';\n\n    private ?ChartColor $underlineColor = null;\n\n    private ?ChartColor $chartColor = null;\n    // end of chart title items\n\n    /**\n     * Font Size.\n     */\n    protected ?float $size = 11;\n\n    /**\n     * Bold.\n     */\n    protected ?bool $bold = false;\n\n    /**\n     * Italic.\n     */\n    protected ?bool $italic = false;\n\n    /**\n     * Superscript.\n     */\n    protected ?bool $superscript = false;\n\n    /**\n     * Subscript.\n     */\n    protected ?bool $subscript = false;\n\n    /**\n     * Underline.\n     */\n    protected ?string $underline = self::UNDERLINE_NONE;\n\n    /**\n     * Strikethrough.\n     */\n    protected ?bool $strikethrough = false;\n\n    /**\n     * Foreground color.\n     */\n    protected Color $color;\n\n    protected bool $autoColor = false;\n\n    public ?int $colorIndex = null;\n\n    protected string $scheme = '';\n\n    /**\n     * Create a new Font.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     * @param bool $isConditional Flag indicating if this is a conditional style or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false, bool $isConditional = false)\n    {\n        // Supervisor?\n        parent::__construct($isSupervisor);\n\n        // Initialise values\n        if ($isConditional) {\n            $this->name = null;\n            $this->size = null;\n            $this->bold = null;\n            $this->italic = null;\n            $this->superscript = null;\n            $this->subscript = null;\n            $this->underline = null;\n            $this->strikethrough = null;\n            $this->color = new Color(Color::COLOR_BLACK, $isSupervisor, $isConditional);\n        } else {\n            $this->color = new Color(Color::COLOR_BLACK, $isSupervisor);\n        }\n        // bind parent if we are a supervisor\n        if ($isSupervisor) {\n            $this->color->bindParent($this, 'color');\n        }\n    }\n\n    public function applyThemeFonts(Theme $theme): void\n    {\n        $this->setName($theme->getMinorFontLatin());\n        $this->setLatin($theme->getMinorFontLatin());\n        $this->setEastAsian($theme->getMinorFontEastAsian());\n        $this->setComplexScript($theme->getMinorFontComplexScript());\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        return $parent->getSharedComponent()->getFont();\n    }\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return array{font: mixed[]}\n     */\n    public function getStyleArray(array $array): array\n    {\n        return ['font' => $array];\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray(\n     *     [\n     *         'name' => 'Arial',\n     *         'bold' => TRUE,\n     *         'italic' => FALSE,\n     *         'underline' => \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_DOUBLE,\n     *         'strikethrough' => FALSE,\n     *         'color' => [\n     *             'rgb' => '808080'\n     *         ]\n     *     ]\n     * );\n     * </code>\n     *\n     * @param array{\n     *   autoColor?: bool,\n     *   bold?: bool,\n     *   cap?: string,\n     *   chartColor?: ChartColor,\n     *   color?: string[],\n     *   complexScript?: string,\n     *   eastAsian?: string,\n     *   italic?: bool,\n     *   latin?: string,\n     *   name?: string,\n     *   scheme?: string,\n     *   size?: null|float|int,\n     *   strikethrough?: bool,\n     *   superscript?: bool,\n     *   subscript?: bool,\n     *   underline?: bool|string,\n     * } $styleArray Array containing style information\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray): static\n    {\n        if ($this->isSupervisor) {\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($styleArray));\n        } else {\n            if (isset($styleArray['name'])) {\n                $this->setName($styleArray['name']);\n            }\n            if (isset($styleArray['latin'])) {\n                $this->setLatin($styleArray['latin']);\n            }\n            if (isset($styleArray['eastAsian'])) {\n                $this->setEastAsian($styleArray['eastAsian']);\n            }\n            if (isset($styleArray['complexScript'])) {\n                $this->setComplexScript(\n                    $styleArray['complexScript']\n                );\n            }\n            if (isset($styleArray['bold'])) {\n                $this->setBold($styleArray['bold']);\n            }\n            if (isset($styleArray['italic'])) {\n                $this->setItalic($styleArray['italic']);\n            }\n            if (isset($styleArray['superscript'])) {\n                $this->setSuperscript($styleArray['superscript']);\n            }\n            if (isset($styleArray['subscript'])) {\n                $this->setSubscript($styleArray['subscript']);\n            }\n            if (isset($styleArray['underline'])) {\n                $this->setUnderline($styleArray['underline']);\n            }\n            if (isset($styleArray['strikethrough'])) {\n                $this->setStrikethrough(\n                    $styleArray['strikethrough']\n                );\n            }\n            if (isset($styleArray['color'])) {\n                /** @var array{rgb?: string, argb?: string, theme?: int} */\n                $temp = $styleArray['color'];\n                $this->getColor()\n                    ->applyFromArray($temp);\n            }\n            if (isset($styleArray['size'])) {\n                $this->setSize($styleArray['size']);\n            }\n            if (isset($styleArray['chartColor'])) {\n                $this->chartColor = $styleArray['chartColor'];\n            }\n            if (isset($styleArray['scheme'])) {\n                $this->setScheme($styleArray['scheme']);\n            }\n            if (isset($styleArray['cap'])) {\n                $this->setCap($styleArray['cap']);\n            }\n            if (isset($styleArray['autoColor'])) {\n                $this->setAutoColor($styleArray['autoColor']);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Name.\n     */\n    public function getName(): ?string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getName();\n        }\n\n        return $this->name;\n    }\n\n    public function getLatin(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getLatin();\n        }\n\n        return $this->latin;\n    }\n\n    public function getEastAsian(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getEastAsian();\n        }\n\n        return $this->eastAsian;\n    }\n\n    public function getComplexScript(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getComplexScript();\n        }\n\n        return $this->complexScript;\n    }\n\n    /**\n     * Set Name and turn off Scheme.\n     */\n    public function setName(string $fontname): self\n    {\n        if ($fontname == '') {\n            $fontname = 'Calibri';\n        }\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['name' => $fontname]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->name = $fontname;\n        }\n\n        return $this->setScheme('');\n    }\n\n    public function setLatin(string $fontname): self\n    {\n        if ($fontname == '') {\n            $fontname = 'Calibri';\n        }\n        if (!$this->isSupervisor) {\n            $this->latin = $fontname;\n        } else {\n            // should never be true\n            // @codeCoverageIgnoreStart\n            $styleArray = $this->getStyleArray(['latin' => $fontname]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $this;\n    }\n\n    public function setEastAsian(string $fontname): self\n    {\n        if ($fontname == '') {\n            $fontname = 'Calibri';\n        }\n        if (!$this->isSupervisor) {\n            $this->eastAsian = $fontname;\n        } else {\n            // should never be true\n            // @codeCoverageIgnoreStart\n            $styleArray = $this->getStyleArray(['eastAsian' => $fontname]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $this;\n    }\n\n    public function setComplexScript(string $fontname): self\n    {\n        if ($fontname == '') {\n            $fontname = 'Calibri';\n        }\n        if (!$this->isSupervisor) {\n            $this->complexScript = $fontname;\n        } else {\n            // should never be true\n            // @codeCoverageIgnoreStart\n            $styleArray = $this->getStyleArray(['complexScript' => $fontname]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Size.\n     */\n    public function getSize(): ?float\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getSize();\n        }\n\n        return $this->size;\n    }\n\n    /**\n     * Set Size.\n     *\n     * @param mixed $sizeInPoints A float representing the value of a positive measurement in points (1/72 of an inch)\n     *\n     * @return $this\n     */\n    public function setSize(mixed $sizeInPoints, bool $nullOk = false): static\n    {\n        if (is_string($sizeInPoints) || is_int($sizeInPoints)) {\n            $sizeInPoints = (float) $sizeInPoints; // $pValue = 0 if given string is not numeric\n        }\n\n        // Size must be a positive floating point number\n        // ECMA-376-1:2016, part 1, chapter 18.4.11 sz (Font Size), p. 1536\n        if (!is_float($sizeInPoints) || !($sizeInPoints > 0)) {\n            if (!$nullOk || $sizeInPoints !== null) {\n                $sizeInPoints = 10.0;\n            }\n        }\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['size' => $sizeInPoints]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->size = $sizeInPoints;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Bold.\n     */\n    public function getBold(): ?bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getBold();\n        }\n\n        return $this->bold;\n    }\n\n    /**\n     * Set Bold.\n     *\n     * @return $this\n     */\n    public function setBold(bool $bold): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['bold' => $bold]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->bold = $bold;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Italic.\n     */\n    public function getItalic(): ?bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getItalic();\n        }\n\n        return $this->italic;\n    }\n\n    /**\n     * Set Italic.\n     *\n     * @return $this\n     */\n    public function setItalic(bool $italic): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['italic' => $italic]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->italic = $italic;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Superscript.\n     */\n    public function getSuperscript(): ?bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getSuperscript();\n        }\n\n        return $this->superscript;\n    }\n\n    /**\n     * Set Superscript.\n     *\n     * @return $this\n     */\n    public function setSuperscript(bool $superscript): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['superscript' => $superscript]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->superscript = $superscript;\n            if ($this->superscript) {\n                $this->subscript = false;\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Subscript.\n     */\n    public function getSubscript(): ?bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getSubscript();\n        }\n\n        return $this->subscript;\n    }\n\n    /**\n     * Set Subscript.\n     *\n     * @return $this\n     */\n    public function setSubscript(bool $subscript): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['subscript' => $subscript]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->subscript = $subscript;\n            if ($this->subscript) {\n                $this->superscript = false;\n            }\n        }\n\n        return $this;\n    }\n\n    public function getBaseLine(): int\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getBaseLine();\n        }\n\n        return $this->baseLine;\n    }\n\n    public function setBaseLine(int $baseLine): self\n    {\n        if (!$this->isSupervisor) {\n            $this->baseLine = $baseLine;\n        } else {\n            // should never be true\n            // @codeCoverageIgnoreStart\n            $styleArray = $this->getStyleArray(['baseLine' => $baseLine]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $this;\n    }\n\n    public function getStrikeType(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getStrikeType();\n        }\n\n        return $this->strikeType;\n    }\n\n    public function setStrikeType(string $strikeType): self\n    {\n        if (!$this->isSupervisor) {\n            $this->strikeType = $strikeType;\n        } else {\n            // should never be true\n            // @codeCoverageIgnoreStart\n            $styleArray = $this->getStyleArray(['strikeType' => $strikeType]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $this;\n    }\n\n    public function getUnderlineColor(): ?ChartColor\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getUnderlineColor();\n        }\n\n        return $this->underlineColor;\n    }\n\n    /** @param array{value: null|string, alpha: null|int|string, brightness?: null|int|string, type: null|string} $colorArray */\n    public function setUnderlineColor(array $colorArray): self\n    {\n        if (!$this->isSupervisor) {\n            $this->underlineColor = new ChartColor($colorArray);\n        } else {\n            // should never be true\n            // @codeCoverageIgnoreStart\n            $styleArray = $this->getStyleArray(['underlineColor' => $colorArray]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $this;\n    }\n\n    public function getChartColor(): ?ChartColor\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getChartColor();\n        }\n\n        return $this->chartColor;\n    }\n\n    /** @param array{value: null|string, alpha: null|int|string, brightness?: null|int|string, type: null|string} $colorArray */\n    public function setChartColor(array $colorArray): self\n    {\n        if (!$this->isSupervisor) {\n            $this->chartColor = new ChartColor($colorArray);\n        } else {\n            // should never be true\n            // @codeCoverageIgnoreStart\n            $styleArray = $this->getStyleArray(['chartColor' => $colorArray]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            // @codeCoverageIgnoreEnd\n        }\n\n        return $this;\n    }\n\n    public function setChartColorFromObject(?ChartColor $chartColor): self\n    {\n        $this->chartColor = $chartColor;\n\n        return $this;\n    }\n\n    /**\n     * Get Underline.\n     */\n    public function getUnderline(): ?string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getUnderline();\n        }\n\n        return $this->underline;\n    }\n\n    /**\n     * Set Underline.\n     *\n     * @param bool|string $underlineStyle \\PhpOffice\\PhpSpreadsheet\\Style\\Font underline type\n     *                                    If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE,\n     *                                        false equates to UNDERLINE_NONE\n     *\n     * @return $this\n     */\n    public function setUnderline($underlineStyle): static\n    {\n        if (is_bool($underlineStyle)) {\n            $underlineStyle = ($underlineStyle) ? self::UNDERLINE_SINGLE : self::UNDERLINE_NONE;\n        } elseif ($underlineStyle == '') {\n            $underlineStyle = self::UNDERLINE_NONE;\n        }\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['underline' => $underlineStyle]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->underline = $underlineStyle;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Strikethrough.\n     */\n    public function getStrikethrough(): ?bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getStrikethrough();\n        }\n\n        return $this->strikethrough;\n    }\n\n    /**\n     * Set Strikethrough.\n     *\n     * @return $this\n     */\n    public function setStrikethrough(bool $strikethru): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['strikethrough' => $strikethru]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->strikethrough = $strikethru;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Color.\n     */\n    public function getColor(): Color\n    {\n        return $this->color;\n    }\n\n    /**\n     * Set Color.\n     *\n     * @return $this\n     */\n    public function setColor(Color $color): static\n    {\n        // make sure parameter is a real color and not a supervisor\n        $color = $color->getIsSupervisor() ? $color->getSharedComponent() : $color;\n\n        if ($this->isSupervisor) {\n            $styleArray = $this->getColor()->getStyleArray(['argb' => $color->getARGB()]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->color = $color;\n        }\n\n        return $this;\n    }\n\n    private function hashChartColor(?ChartColor $underlineColor): string\n    {\n        if ($underlineColor === null) {\n            return '';\n        }\n\n        return\n            $underlineColor->getValue()\n            . $underlineColor->getType()\n            . (string) $underlineColor->getAlpha();\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHashCode();\n        }\n\n        return md5(\n            $this->name\n            . $this->size\n            . ($this->bold ? 't' : 'f')\n            . ($this->italic ? 't' : 'f')\n            . ($this->superscript ? 't' : 'f')\n            . ($this->subscript ? 't' : 'f')\n            . $this->underline\n            . ($this->strikethrough ? 't' : 'f')\n            . ($this->autoColor ? 't' : 'f')\n            . $this->color->getHashCode()\n            . $this->scheme\n            . implode(\n                '*',\n                [\n                    $this->latin,\n                    $this->eastAsian,\n                    $this->complexScript,\n                    $this->strikeType,\n                    $this->hashChartColor($this->chartColor),\n                    $this->hashChartColor($this->underlineColor),\n                    (string) $this->baseLine,\n                    (string) $this->cap,\n                ]\n            )\n            . __CLASS__\n        );\n    }\n\n    /** @return mixed[] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'baseLine', $this->getBaseLine());\n        $this->exportArray2($exportedArray, 'bold', $this->getBold());\n        $this->exportArray2($exportedArray, 'cap', $this->getCap());\n        $this->exportArray2($exportedArray, 'chartColor', $this->getChartColor());\n        $this->exportArray2($exportedArray, 'color', $this->getColor());\n        $this->exportArray2($exportedArray, 'complexScript', $this->getComplexScript());\n        $this->exportArray2($exportedArray, 'eastAsian', $this->getEastAsian());\n        $this->exportArray2($exportedArray, 'italic', $this->getItalic());\n        $this->exportArray2($exportedArray, 'latin', $this->getLatin());\n        $this->exportArray2($exportedArray, 'name', $this->getName());\n        $this->exportArray2($exportedArray, 'scheme', $this->getScheme());\n        $this->exportArray2($exportedArray, 'size', $this->getSize());\n        $this->exportArray2($exportedArray, 'strikethrough', $this->getStrikethrough());\n        $this->exportArray2($exportedArray, 'strikeType', $this->getStrikeType());\n        $this->exportArray2($exportedArray, 'subscript', $this->getSubscript());\n        $this->exportArray2($exportedArray, 'superscript', $this->getSuperscript());\n        $this->exportArray2($exportedArray, 'underline', $this->getUnderline());\n        $this->exportArray2($exportedArray, 'underlineColor', $this->getUnderlineColor());\n        $this->exportArray2($exportedArray, 'autoColor', $this->getAutoColor());\n\n        return $exportedArray;\n    }\n\n    public function getScheme(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getScheme();\n        }\n\n        return $this->scheme;\n    }\n\n    public function setScheme(string $scheme): self\n    {\n        if ($scheme === '' || $scheme === 'major' || $scheme === 'minor') {\n            if ($this->isSupervisor) {\n                $styleArray = $this->getStyleArray(['scheme' => $scheme]);\n                $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n            } else {\n                $this->scheme = $scheme;\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set capitalization attribute. If not one of the permitted\n     * values (all, small, or none), set it to null.\n     * This will be honored only for the font for chart titles.\n     * None is distinguished from null because null will inherit\n     * the current value, whereas 'none' will override it.\n     */\n    public function setCap(string $cap): self\n    {\n        $this->cap = in_array($cap, self::VALID_CAPS, true) ? $cap : null;\n\n        return $this;\n    }\n\n    public function getCap(): ?string\n    {\n        return $this->cap;\n    }\n\n    public function setHyperlinkTheme(): self\n    {\n        $this->color->setHyperlinkTheme();\n        $this->setUnderline(self::UNDERLINE_SINGLE);\n\n        return $this;\n    }\n\n    public function setAutoColor(bool $autoColor): self\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['autoColor' => $autoColor]);\n            $this->getActiveSheet()\n                ->getStyle($this->getSelectedCells())\n                ->applyFromArray($styleArray);\n        } else {\n            $this->autoColor = $autoColor;\n        }\n\n        return $this;\n    }\n\n    public function getAutoColor(): bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getAutoColor();\n        }\n\n        return $this->autoColor;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $this->color = clone $this->color;\n        $this->chartColor = ($this->chartColor === null) ? null : clone $this->chartColor;\n        $this->underlineColor = ($this->underlineColor === null) ? null : clone $this->underlineColor;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/BaseFormatter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nabstract class BaseFormatter\n{\n    protected static function stripQuotes(string $format): string\n    {\n        // Some non-number strings are quoted, so we'll get rid of the quotes, likewise any positional * symbols\n        return str_replace(['\"', '*'], '', $format);\n    }\n\n    protected static function adjustSeparators(string $value): string\n    {\n        $thousandsSeparator = StringHelper::getThousandsSeparator();\n        $decimalSeparator = StringHelper::getDecimalSeparator();\n        if ($thousandsSeparator !== ',' || $decimalSeparator !== '.') {\n            $value = str_replace(['.', ',', \"\\u{fffd}\"], [\"\\u{fffd}\", $thousandsSeparator, $decimalSeparator], $value);\n        }\n\n        return $value;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse Throwable;\n\nclass DateFormatter\n{\n    /**\n     * Search/replace values to convert Excel date/time format masks to PHP format masks.\n     */\n    private const DATE_FORMAT_REPLACEMENTS = [\n        // first remove escapes related to non-format characters\n        '\\\\' => '',\n        //    12-hour suffix\n        'am/pm' => 'A',\n        //    4-digit year\n        'e' => 'Y',\n        'yyyy' => 'Y',\n        //    2-digit year\n        'yy' => 'y',\n        //    first letter of month - no php equivalent\n        'mmmmm' => 'M',\n        //    full month name\n        'mmmm' => 'F',\n        //    short month name\n        'mmm' => 'M',\n        //    mm is minutes if time, but can also be month w/leading zero\n        //    so we try to identify times be the inclusion of a : separator in the mask\n        //    It isn't perfect, but the best way I know how\n        ':mm' => ':i',\n        'mm:' => 'i:',\n        //    full day of week name\n        'dddd' => 'l',\n        //    short day of week name\n        'ddd' => 'D',\n        //    days leading zero\n        'dd' => 'd',\n        //    days no leading zero\n        'd' => 'j',\n        //    fractional seconds - no php equivalent\n        '.s' => '',\n    ];\n\n    /**\n     * Search/replace values to convert Excel date/time format masks hours to PHP format masks (24 hr clock).\n     */\n    private const DATE_FORMAT_REPLACEMENTS24 = [\n        'hh' => 'H',\n        'h' => 'G',\n        //    month leading zero\n        'mm' => 'm',\n        //    month no leading zero\n        'm' => 'n',\n        //    seconds\n        'ss' => 's',\n    ];\n\n    /**\n     * Search/replace values to convert Excel date/time format masks hours to PHP format masks (12 hr clock).\n     */\n    private const DATE_FORMAT_REPLACEMENTS12 = [\n        'hh' => 'h',\n        'h' => 'g',\n        //    month leading zero\n        'mm' => 'm',\n        //    month no leading zero\n        'm' => 'n',\n        //    seconds\n        'ss' => 's',\n    ];\n\n    private const HOURS_IN_DAY = 24;\n    private const MINUTES_IN_DAY = 60 * self::HOURS_IN_DAY;\n    private const SECONDS_IN_DAY = 60 * self::MINUTES_IN_DAY;\n    private const INTERVAL_PRECISION = 10;\n    private const INTERVAL_LEADING_ZERO = [\n        '[hh]',\n        '[mm]',\n        '[ss]',\n    ];\n    private const INTERVAL_ROUND_PRECISION = [\n        // hours and minutes truncate\n        '[h]' => self::INTERVAL_PRECISION,\n        '[hh]' => self::INTERVAL_PRECISION,\n        '[m]' => self::INTERVAL_PRECISION,\n        '[mm]' => self::INTERVAL_PRECISION,\n        // seconds round\n        '[s]' => 0,\n        '[ss]' => 0,\n    ];\n    private const INTERVAL_MULTIPLIER = [\n        '[h]' => self::HOURS_IN_DAY,\n        '[hh]' => self::HOURS_IN_DAY,\n        '[m]' => self::MINUTES_IN_DAY,\n        '[mm]' => self::MINUTES_IN_DAY,\n        '[s]' => self::SECONDS_IN_DAY,\n        '[ss]' => self::SECONDS_IN_DAY,\n    ];\n\n    /** @param float|int|numeric-string $value */\n    private static function tryInterval(bool &$seekingBracket, string &$block, mixed $value, string $format): void\n    {\n        if ($seekingBracket) {\n            if (str_contains($block, $format)) {\n                $hours = (string) (int) round(\n                    self::INTERVAL_MULTIPLIER[$format] * $value,\n                    self::INTERVAL_ROUND_PRECISION[$format]\n                );\n                if (strlen($hours) === 1 && in_array($format, self::INTERVAL_LEADING_ZERO, true)) {\n                    $hours = \"0$hours\";\n                }\n                $block = str_replace($format, $hours, $block);\n                $seekingBracket = false;\n            }\n        }\n    }\n\n    /** @param float|int $value value to be formatted */\n    public static function format(mixed $value, string $format): string\n    {\n        if ($value < 0 && Preg::isMatch('/^\\[?[hms]/i', $format)) {\n            return '-' . self::format(-$value, $format);\n        }\n        // strip off first part containing e.g. [$-F800] or [$USD-409]\n        // general syntax: [$<Currency string>-<language info>]\n        // language info is in hexadecimal\n        // strip off chinese part like [DBNum1][$-804]\n        $format = Preg::replace('/^(\\[DBNum\\d\\])*(\\[\\$[^\\]]*\\])/i', '', $format);\n\n        // OpenOffice.org uses upper-case number formats, e.g. 'YYYY', convert to lower-case;\n        //    but we don't want to change any quoted strings\n        $format = Preg::replaceCallback('/(?:^|\")([^\"]*)(?:$|\")/', self::setLowerCaseCallback(...), $format);\n\n        // Only process the non-quoted blocks for date format characters\n\n        $blocks = explode('\"', $format);\n        foreach ($blocks as $key => &$block) {\n            if ($key % 2 == 0) {\n                $block = strtr($block, self::DATE_FORMAT_REPLACEMENTS);\n                if (!strpos($block, 'A')) {\n                    // 24-hour time format\n                    // when [h]:mm format, the [h] should replace to the hours of the value * 24\n                    $seekingBracket = true;\n                    self::tryInterval($seekingBracket, $block, $value, '[h]');\n                    self::tryInterval($seekingBracket, $block, $value, '[hh]');\n                    self::tryInterval($seekingBracket, $block, $value, '[mm]');\n                    self::tryInterval($seekingBracket, $block, $value, '[m]');\n                    self::tryInterval($seekingBracket, $block, $value, '[s]');\n                    self::tryInterval($seekingBracket, $block, $value, '[ss]');\n                    $block = strtr($block, self::DATE_FORMAT_REPLACEMENTS24);\n                } else {\n                    // 12-hour time format\n                    $block = strtr($block, self::DATE_FORMAT_REPLACEMENTS12);\n                }\n            }\n        }\n        $format = implode('\"', $blocks);\n\n        // escape any quoted characters so that DateTime format() will render them correctly\n        $format = Preg::replaceCallback('/\"(.*)\"/U', self::escapeQuotesCallback(...), $format);\n\n        try {\n            $dateObj = Date::excelToDateTimeObject($value);\n        } catch (Throwable) {\n            return StringHelper::convertToString($value);\n        }\n        // If the colon preceding minute had been quoted, as happens in\n        // Excel 2003 XML formats, m will not have been changed to i above.\n        // Change it now.\n        $format = Preg::replace('/\\\\\\:m/', ':i', $format);\n        $microseconds = (int) $dateObj->format('u');\n        if (str_contains($format, ':s.000')) {\n            $milliseconds = (int) round($microseconds / 1000.0);\n            if ($milliseconds === 1000) {\n                $milliseconds = 0;\n                $dateObj->modify('+1 second');\n            }\n            $dateObj->modify(\"-$microseconds microseconds\");\n            $format = str_replace(':s.000', ':s.' . sprintf('%03d', $milliseconds), $format);\n        } elseif (str_contains($format, ':s.00')) {\n            $centiseconds = (int) round($microseconds / 10000.0);\n            if ($centiseconds === 100) {\n                $centiseconds = 0;\n                $dateObj->modify('+1 second');\n            }\n            $dateObj->modify(\"-$microseconds microseconds\");\n            $format = str_replace(':s.00', ':s.' . sprintf('%02d', $centiseconds), $format);\n        } elseif (str_contains($format, ':s.0')) {\n            $deciseconds = (int) round($microseconds / 100000.0);\n            if ($deciseconds === 10) {\n                $deciseconds = 0;\n                $dateObj->modify('+1 second');\n            }\n            $dateObj->modify(\"-$microseconds microseconds\");\n            $format = str_replace(':s.0', ':s.' . sprintf('%1d', $deciseconds), $format);\n        } else { // no fractional second\n            if ($microseconds >= 500000) {\n                $dateObj->modify('+1 second');\n            }\n            $dateObj->modify(\"-$microseconds microseconds\");\n        }\n\n        return $dateObj->format($format);\n    }\n\n    /** @param array<?string> $matches */\n    private static function setLowercaseCallback(array $matches): string\n    {\n        /** @var string[] $matches */\n        return mb_strtolower($matches[0]);\n    }\n\n    /** @param array<?string> $matches */\n    private static function escapeQuotesCallback(array $matches): string\n    {\n        /** @var string[] $matches */\n        return '\\\\' . implode('\\\\', mb_str_split($matches[1], 1, 'UTF-8'));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Formatter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Color\\BIFF8;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nclass Formatter extends BaseFormatter\n{\n    /**\n     * Matches any @ symbol that isn't enclosed in quotes.\n     */\n    private const SYMBOL_AT = '/@(?=(?:[^\"]*\"[^\"]*\")*[^\"]*\\Z)/miu';\n    private const QUOTE_REPLACEMENT = \"\\u{fffe}\"; // invalid Unicode character\n\n    /**\n     * Matches any ; symbol that isn't enclosed in quotes, for a \"section\" split.\n     */\n    private const SECTION_SPLIT = '/;(?=(?:[^\"]*\"[^\"]*\")*[^\"]*\\Z)/miu';\n\n    private static function splitFormatComparison(\n        mixed $value,\n        ?string $condition,\n        mixed $comparisonValue,\n        string $defaultCondition,\n        mixed $defaultComparisonValue\n    ): bool {\n        if (!$condition) {\n            $condition = $defaultCondition;\n            $comparisonValue = $defaultComparisonValue;\n        }\n\n        return match ($condition) {\n            '>' => $value > $comparisonValue,\n            '<' => $value < $comparisonValue,\n            '<=' => $value <= $comparisonValue,\n            '<>' => $value != $comparisonValue,\n            '=' => $value == $comparisonValue,\n            default => $value >= $comparisonValue,\n        };\n    }\n\n    /**\n     * @param float|int|numeric-string $value value to be formatted\n     * @param string[] $sections\n     *\n     * @return mixed[]\n     */\n    private static function splitFormatForSectionSelection(array $sections, mixed $value): array\n    {\n        // Extract the relevant section depending on whether number is positive, negative, or zero?\n        // Text not supported yet.\n        // Here is how the sections apply to various values in Excel:\n        //   1 section:   [POSITIVE/NEGATIVE/ZERO/TEXT]\n        //   2 sections:  [POSITIVE/ZERO/TEXT] [NEGATIVE]\n        //   3 sections:  [POSITIVE/TEXT] [NEGATIVE] [ZERO]\n        //   4 sections:  [POSITIVE] [NEGATIVE] [ZERO] [TEXT]\n        $sectionCount = count($sections);\n        // Colour could be a named colour, or a numeric index entry in the colour-palette\n        $color_regex = '/\\[(' . implode('|', Color::NAMED_COLORS) . '|color\\s*(\\d+))\\]/mui';\n        $cond_regex = '/\\[(>|>=|<|<=|=|<>)([+-]?\\d+([.]\\d+)?)\\]/';\n        $colors = ['', '', '', '', ''];\n        $conditionOperations = ['', '', '', '', ''];\n        $conditionComparisonValues = [0, 0, 0, 0, 0];\n        for ($idx = 0; $idx < $sectionCount; ++$idx) {\n            if (preg_match($color_regex, $sections[$idx], $matches)) {\n                if (isset($matches[2])) {\n                    $colors[$idx] = '#' . BIFF8::lookup((int) $matches[2] + 7)['rgb'];\n                } else {\n                    $colors[$idx] = $matches[0];\n                }\n                $sections[$idx] = (string) preg_replace($color_regex, '', $sections[$idx]);\n            }\n            if (preg_match($cond_regex, $sections[$idx], $matches)) {\n                $conditionOperations[$idx] = $matches[1];\n                $conditionComparisonValues[$idx] = $matches[2];\n                $sections[$idx] = (string) preg_replace($cond_regex, '', $sections[$idx]);\n            }\n        }\n        $color = $colors[0];\n        $format = $sections[0];\n        $absval = $value;\n        switch ($sectionCount) {\n            case 2:\n                $absval = abs($value + 0);\n                if (!self::splitFormatComparison($value, $conditionOperations[0], $conditionComparisonValues[0], '>=', 0)) {\n                    $color = $colors[1];\n                    $format = $sections[1];\n                }\n\n                break;\n            case 3:\n            case 4:\n                $absval = abs($value + 0);\n                if (!self::splitFormatComparison($value, $conditionOperations[0], $conditionComparisonValues[0], '>', 0)) {\n                    if (self::splitFormatComparison($value, $conditionOperations[1], $conditionComparisonValues[1], '<', 0)) {\n                        $color = $colors[1];\n                        $format = $sections[1];\n                    } else {\n                        $color = $colors[2];\n                        $format = $sections[2];\n                    }\n                }\n\n                break;\n        }\n\n        return [$color, $format, $absval];\n    }\n\n    /**\n     * Convert a value in a pre-defined format to a PHP string.\n     *\n     * @param null|array<mixed>|bool|float|int|RichText|string $value Value to format\n     * @param string $format Format code: see = self::FORMAT_* for predefined values;\n     *                          or can be any valid MS Excel custom format string\n     * @param null|array<mixed>|callable $callBack Callback function for additional formatting of string\n     * @param bool $lessFloatPrecision If true, unstyled floats will be converted to a more human-friendly but less computationally accurate value\n     *\n     * @return string Formatted string\n     */\n    public static function toFormattedString($value, string $format, null|array|callable $callBack = null, bool $lessFloatPrecision = false): string\n    {\n        while (is_array($value)) {\n            $value = array_shift($value);\n        }\n        if (is_bool($value)) {\n            return $value ? Calculation::getTRUE() : Calculation::getFALSE();\n        }\n        // For now we do not treat strings in sections, although section 4 of a format code affects strings\n        // Process a single block format code containing @ for text substitution\n        $formatx = str_replace('\\\"', self::QUOTE_REPLACEMENT, $format);\n        if (preg_match(self::SECTION_SPLIT, $format) === 0 && preg_match(self::SYMBOL_AT, $formatx) === 1) {\n            if (!str_contains($format, '\"')) {\n                return str_replace('@', StringHelper::convertToString($value, lessFloatPrecision: $lessFloatPrecision), $format);\n            }\n            //escape any dollar signs on the string, so they are not replaced with an empty value\n            $value = str_replace(\n                ['$', '\"'],\n                ['\\$', self::QUOTE_REPLACEMENT],\n                StringHelper::convertToString($value, lessFloatPrecision: $lessFloatPrecision)\n            );\n\n            return str_replace(\n                ['\"', self::QUOTE_REPLACEMENT],\n                ['', '\"'],\n                preg_replace(self::SYMBOL_AT, $value, $formatx) ?? $value\n            );\n        }\n\n        // If we have a text value, return it \"as is\"\n        if (!is_numeric($value)) {\n            return StringHelper::convertToString($value, lessFloatPrecision: $lessFloatPrecision);\n        }\n\n        // For 'General' format code, we just pass the value although this is not entirely the way Excel does it,\n        // it seems to round numbers to a total of 10 digits.\n        if (($format === NumberFormat::FORMAT_GENERAL) || ($format === NumberFormat::FORMAT_TEXT)) {\n            if (is_float($value) && $lessFloatPrecision) {\n                return self::adjustSeparators((string) $value);\n            }\n\n            return self::adjustSeparators(\n                StringHelper::convertToString($value, lessFloatPrecision: $lessFloatPrecision)\n            );\n        }\n\n        // Ignore square-$-brackets prefix in format string, like \"[$-411]ge.m.d\", \"[$-010419]0%\", etc\n        $format = (string) preg_replace('/^\\[\\$-[^\\]]*\\]/', '', $format);\n\n        $format = (string) preg_replace_callback(\n            '/([\"])(?:(?=(\\\\\\?))\\2.)*?\\1/u',\n            fn (array $matches): string => str_replace('.', chr(0x00), $matches[0]),\n            $format\n        );\n\n        // Convert any other escaped characters to quoted strings, e.g. (\\T to \"T\")\n        $format = (string) preg_replace('/(\\\\\\(((.)(?!((AM\\/PM)|(A\\/P))))|([^ ])))(?=(?:[^\"]|\"[^\"]*\")*$)/ui', '\"${2}\"', $format);\n\n        // Get the sections, there can be up to four sections, separated with a semicolon (but only if not a quoted literal)\n        $sections = preg_split(self::SECTION_SPLIT, $format) ?: [];\n\n        [$colors, $format, $value] = self::splitFormatForSectionSelection($sections, $value);\n\n        // In Excel formats, \"_\" is used to add spacing,\n        //    The following character indicates the size of the spacing, which we can't do in HTML, so we just use a standard space\n        /** @var string */\n        $temp = $format;\n        $format = (string) preg_replace('/_.?/ui', ' ', $temp);\n\n        // Let's begin inspecting the format and converting the value to a formatted string\n        if (\n            //  Check for date/time characters (not inside quotes)\n            (preg_match('/(\\[\\$[A-Z]*-[0-9A-F]*\\])*[hmsdy](?=(?:[^\"]|\"[^\"]*\")*$)/miu', $format))\n            //  Look out for Currency formats Issue 4124\n            && !(preg_match('/\\[\\$[A-Z]{3}\\]/miu', $format))\n            // A date/time with a decimal time shouldn't have a digit placeholder before the decimal point\n            && (preg_match('/[0\\?#]\\.(?![^\\[]*\\])/miu', $format) === 0)\n        ) {\n            // datetime format\n            /** @var float|int */\n            $temp = $value;\n            $value = DateFormatter::format($temp, $format);\n        } else {\n            if (str_starts_with($format, '\"') && str_ends_with($format, '\"') && substr_count($format, '\"') === 2) {\n                $value = substr($format, 1, -1);\n            } elseif (preg_match('/[0#, ]%/', $format)) {\n                // % number format - avoid weird '-0' problem\n                /** @var float */\n                $temp = $value;\n                $value = PercentageFormatter::format(0 + (float) $temp, $format);\n            } else {\n                /** @var float|int|numeric-string */\n                $temp = $value;\n                $value = NumberFormatter::format($temp, $format);\n            }\n        }\n\n        // Additional formatting provided by callback function\n        if (is_callable($callBack)) {\n            $value = $callBack($value, $colors);\n        }\n        /** @var string $value */\n\n        return str_replace(chr(0x00), '.', $value);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/FractionFormatter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nclass FractionFormatter extends BaseFormatter\n{\n    /** @param null|bool|float|int|string $value  value to be formatted */\n    public static function format(mixed $value, string $format): string\n    {\n        $format = self::stripQuotes($format);\n        $value = (float) $value;\n        $absValue = abs($value);\n\n        $sign = ($value < 0.0) ? '-' : '';\n\n        $integerPart = floor($absValue);\n\n        $decimalPart = self::getDecimal((string) $absValue);\n        if ($decimalPart === '0') {\n            return \"{$sign}{$integerPart}\";\n        }\n        $decimalLength = strlen($decimalPart);\n        $decimalDivisor = 10 ** $decimalLength;\n\n        preg_match('/(#?.*\\?)\\/(\\?+|\\d+)/', $format, $matches);\n        $formatIntegerPart = $matches[1] ?? '0';\n\n        if (isset($matches[2]) && is_numeric($matches[2])) {\n            $fractionDivisor = 100 / (int) $matches[2];\n        } else {\n            /** @var float $fractionDivisor */\n            $fractionDivisor = MathTrig\\Gcd::evaluate((int) $decimalPart, $decimalDivisor);\n        }\n\n        $adjustedDecimalPart = (int) round((int) $decimalPart / $fractionDivisor, 0);\n        $adjustedDecimalDivisor = $decimalDivisor / $fractionDivisor;\n\n        if ((str_contains($formatIntegerPart, '0'))) {\n            return \"{$sign}{$integerPart} {$adjustedDecimalPart}/{$adjustedDecimalDivisor}\";\n        } elseif ((str_contains($formatIntegerPart, '#'))) {\n            if ($integerPart == 0) {\n                return \"{$sign}{$adjustedDecimalPart}/{$adjustedDecimalDivisor}\";\n            }\n\n            return \"{$sign}{$integerPart} {$adjustedDecimalPart}/{$adjustedDecimalDivisor}\";\n        } elseif ((str_starts_with($formatIntegerPart, '? ?'))) {\n            if ($integerPart == 0) {\n                $integerPart = '';\n            }\n\n            return \"{$sign}{$integerPart} {$adjustedDecimalPart}/{$adjustedDecimalDivisor}\";\n        }\n\n        $adjustedDecimalPart += $integerPart * $adjustedDecimalDivisor;\n\n        return \"{$sign}{$adjustedDecimalPart}/{$adjustedDecimalDivisor}\";\n    }\n\n    private static function getDecimal(string $value): string\n    {\n        $decimalPart = '0';\n        if (preg_match('/^\\d*[.](\\d*[1-9])0*$/', $value, $matches) === 1) {\n            $decimalPart = $matches[1];\n        }\n\n        return $decimalPart;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nclass NumberFormatter extends BaseFormatter\n{\n    private const NUMBER_REGEX = '/(0+)(\\.?)(0*)/';\n\n    /**\n     * @param string[] $numbers\n     * @param string[] $masks\n     *\n     * @return mixed[]\n     */\n    private static function mergeComplexNumberFormatMasks(array $numbers, array $masks): array\n    {\n        $decimalCount = strlen($numbers[1]);\n        $postDecimalMasks = [];\n\n        do {\n            $tempMask = array_pop($masks);\n            if ($tempMask !== null) {\n                $postDecimalMasks[] = $tempMask;\n                $decimalCount -= strlen($tempMask);\n            }\n        } while ($tempMask !== null && $decimalCount > 0);\n\n        return [\n            implode('.', $masks),\n            implode('.', array_reverse($postDecimalMasks)),\n        ];\n    }\n\n    private static function processComplexNumberFormatMask(mixed $number, string $mask): string\n    {\n        /** @var string $result */\n        $result = $number;\n        $maskingBlockCount = preg_match_all('/0+/', $mask, $maskingBlocks, PREG_OFFSET_CAPTURE);\n\n        if ($maskingBlockCount > 1) {\n            $maskingBlocks = array_reverse($maskingBlocks[0]);\n\n            $offset = 0;\n            foreach ($maskingBlocks as $block) {\n                $size = strlen($block[0]);\n                $divisor = 10 ** $size;\n                $offset = $block[1];\n\n                /** @var float $numberFloat */\n                $numberFloat = $number;\n                $blockValue = sprintf(\"%0{$size}d\", fmod($numberFloat, $divisor));\n                $number = floor($numberFloat / $divisor);\n                $mask = substr_replace($mask, $blockValue, $offset, $size);\n            }\n            /** @var string $numberString */\n            $numberString = $number;\n            if ($number > 0) {\n                $mask = substr_replace($mask, $numberString, $offset, 0);\n            }\n            $result = $mask;\n        }\n\n        return self::makeString($result);\n    }\n\n    private static function complexNumberFormatMask(mixed $number, string $mask, bool $splitOnPoint = true): string\n    {\n        /** @var float $numberFloat */\n        $numberFloat = $number;\n        if ($splitOnPoint) {\n            $masks = explode('.', $mask);\n            if (count($masks) <= 2) {\n                $decmask = $masks[1] ?? '';\n                $decpos = substr_count($decmask, '0');\n                $numberFloat = round($numberFloat, $decpos);\n            }\n        }\n        $sign = ($numberFloat < 0.0) ? '-' : '';\n        $number = self::f2s(abs($numberFloat));\n\n        if ($splitOnPoint && str_contains($mask, '.') && str_contains($number, '.')) {\n            $numbers = explode('.', $number);\n            $masks = explode('.', $mask);\n            if (count($masks) > 2) {\n                $masks = self::mergeComplexNumberFormatMasks($numbers, $masks);\n            }\n            /** @var string[] $masks */\n            $integerPart = self::complexNumberFormatMask($numbers[0], $masks[0], false);\n            $numlen = strlen($numbers[1]);\n            $msklen = strlen($masks[1]);\n            if ($numlen < $msklen) {\n                $numbers[1] .= str_repeat('0', $msklen - $numlen);\n            }\n            $decimalPart = strrev(self::complexNumberFormatMask(strrev($numbers[1]), strrev($masks[1]), false));\n            $decimalPart = substr($decimalPart, 0, $msklen);\n\n            return \"{$sign}{$integerPart}.{$decimalPart}\";\n        }\n\n        if (strlen($number) < strlen($mask)) {\n            $number = str_repeat('0', strlen($mask) - strlen($number)) . $number;\n        }\n        $result = self::processComplexNumberFormatMask($number, $mask);\n\n        return \"{$sign}{$result}\";\n    }\n\n    public static function f2s(float $f): string\n    {\n        return self::floatStringConvertScientific((string) $f);\n    }\n\n    public static function floatStringConvertScientific(string $s): string\n    {\n        // convert only normalized form of scientific notation:\n        //  optional sign, single digit 1-9,\n        //    decimal point and digits (allowed to be omitted),\n        //    E (e permitted), optional sign, one or more digits\n        if (preg_match('/^([+-])?([1-9])([.]([0-9]+))?[eE]([+-]?[0-9]+)$/', $s, $matches) === 1) {\n            $exponent = (int) $matches[5];\n            $sign = ($matches[1] === '-') ? '-' : '';\n            if ($exponent >= 0) {\n                $exponentPlus1 = $exponent + 1;\n                $out = $matches[2] . $matches[4];\n                $len = strlen($out);\n                if ($len < $exponentPlus1) {\n                    $out .= str_repeat('0', $exponentPlus1 - $len);\n                }\n                $out = substr($out, 0, $exponentPlus1) . ((strlen($out) === $exponentPlus1) ? '' : ('.' . substr($out, $exponentPlus1)));\n                $s = \"$sign$out\";\n            } else {\n                $s = $sign . '0.' . str_repeat('0', -$exponent - 1) . $matches[2] . $matches[4];\n            }\n        }\n\n        return $s;\n    }\n\n    /** @param string[] $matches */\n    private static function formatStraightNumericValue(mixed $value, string $format, array $matches, bool $useThousands): string\n    {\n        /** @var float $valueFloat */\n        $valueFloat = $value;\n        $left = $matches[1];\n        $dec = $matches[2];\n        $right = $matches[3];\n\n        // minimum width of formatted number (including dot)\n        $minWidth = strlen($left) + strlen($dec) + strlen($right);\n        if ($useThousands) {\n            $value = number_format(\n                $valueFloat,\n                strlen($right),\n                StringHelper::getDecimalSeparator(),\n                StringHelper::getThousandsSeparator()\n            );\n\n            return self::pregReplace(self::NUMBER_REGEX, $value, $format);\n        }\n\n        if (preg_match('/[0#]E[+-]0/i', $format)) {\n            //    Scientific format\n            $decimals = strlen($right);\n            $size = $decimals + 3;\n\n            return sprintf(\"%{$size}.{$decimals}E\", $valueFloat);\n        }\n        if (preg_match('/0([^\\d\\.]+)0/', $format) || substr_count($format, '.') > 1) {\n            if ($valueFloat == floor($valueFloat) && substr_count($format, '.') === 1) {\n                $value *= 10 ** strlen(explode('.', $format)[1]); //* @phpstan-ignore-line\n            }\n\n            $result = self::complexNumberFormatMask($value, $format);\n            if (str_contains($result, 'E')) {\n                // This is a hack and doesn't match Excel.\n                // It will, at least, be an accurate representation,\n                //  even if formatted incorrectly.\n                // This is needed for absolute values >=1E18.\n                $result = self::f2s($valueFloat);\n            }\n\n            return $result;\n        }\n\n        $sprintf_pattern = \"%0$minWidth.\" . strlen($right) . 'F';\n\n        /** @var float $valueFloat */\n        $valueFloat = $value;\n        $value = self::adjustSeparators(sprintf($sprintf_pattern, round($valueFloat, strlen($right))));\n\n        return self::pregReplace(self::NUMBER_REGEX, $value, $format);\n    }\n\n    /** @param float|int|numeric-string $value value to be formatted */\n    public static function format(mixed $value, string $format): string\n    {\n        // The \"_\" in this string has already been stripped out,\n        // so this test is never true. Furthermore, testing\n        // on Excel shows this format uses Euro symbol, not \"EUR\".\n        // if ($format === NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE) {\n        //     return 'EUR ' . sprintf('%1.2f', $value);\n        // }\n\n        $baseFormat = $format;\n\n        $useThousands = self::areThousandsRequired($format);\n        $scale = self::scaleThousandsMillions($format);\n\n        if (preg_match('/[#\\?0]?.*[#\\?0]\\/(\\?+|\\d+|#)/', $format)) {\n            // It's a dirty hack; but replace # and 0 digit placeholders with ?\n            $format = (string) preg_replace('/[#0]+\\//', '?/', $format);\n            $format = (string) preg_replace('/\\/[#0]+/', '/?', $format);\n            $value = FractionFormatter::format($value, $format);\n        } else {\n            // Handle the number itself\n            // scale number\n            $value = $value / $scale;\n            $paddingPlaceholder = (str_contains($format, '?'));\n\n            // Replace # or ? with 0\n            $format = self::pregReplace('/[\\#\\?](?=(?:[^\"]*\"[^\"]*\")*[^\"]*\\Z)/', '0', $format);\n            // Remove locale code [$-###] for an LCID\n            $format = self::pregReplace('/\\[\\$\\-.*\\]/', '', $format);\n\n            $n = '/\\[[^\\]]+\\]/';\n            $m = self::pregReplace($n, '', $format);\n\n            // Some non-number strings are quoted, so we'll get rid of the quotes, likewise any positional * symbols\n            $format = self::makeString(str_replace(['\"', '*'], '', $format));\n            if (preg_match(self::NUMBER_REGEX, $m, $matches)) {\n                // There are placeholders for digits, so inject digits from the value into the mask\n                $value = self::formatStraightNumericValue($value, $format, $matches, $useThousands);\n                if ($paddingPlaceholder === true) {\n                    $value = self::padValue($value, $baseFormat);\n                }\n            } elseif ($format !== NumberFormat::FORMAT_GENERAL) {\n                // Yes, I know that this is basically just a hack;\n                //      if there's no placeholders for digits, just return the format mask \"as is\"\n                $value = self::makeString(str_replace('?', '', $format));\n            }\n        }\n\n        if (preg_match('/\\[\\$(.*)\\]/u', $format, $m)) {\n            //  Currency or Accounting\n            $value = preg_replace('/-0+(( |\\xc2\\xa0))?\\[/', '- [', (string) $value) ?? $value;\n            $currencyCode = $m[1];\n            [$currencyCode] = explode('-', $currencyCode);\n            if ($currencyCode == '') {\n                $currencyCode = StringHelper::getCurrencyCode();\n            }\n            $value = self::pregReplace('/\\[\\$([^\\]]*)\\]/u', $currencyCode, (string) $value);\n        }\n\n        if (\n            (str_contains((string) $value, '0.'))\n            && ((str_contains($baseFormat, '#.')) || (str_contains($baseFormat, '?.')))\n        ) {\n            $value = preg_replace('/(\\b)0\\.|([^\\d])0\\./', '${2}.', (string) $value);\n        }\n\n        return (string) $value;\n    }\n\n    /** @param mixed[]|string $value */\n    private static function makeString(array|string $value): string\n    {\n        return is_array($value) ? '' : \"$value\";\n    }\n\n    private static function pregReplace(string $pattern, string $replacement, string $subject): string\n    {\n        return self::makeString(preg_replace($pattern, $replacement, $subject) ?? '');\n    }\n\n    public static function padValue(string $value, string $baseFormat): string\n    {\n        $preDecimal = $postDecimal = '';\n        $pregArray = preg_split('/\\.(?=(?:[^\"]*\"[^\"]*\")*[^\"]*\\Z)/miu', $baseFormat . '.?');\n        if (is_array($pregArray)) {\n            $preDecimal = $pregArray[0];\n            $postDecimal = $pregArray[1] ?? '';\n        }\n\n        $length = strlen($value);\n        if (str_contains($postDecimal, '?')) {\n            $value = str_pad(rtrim($value, '0. '), $length, ' ', STR_PAD_RIGHT);\n        }\n        if (str_contains($preDecimal, '?')) {\n            $value = str_pad(ltrim($value, '0, '), $length, ' ', STR_PAD_LEFT);\n        }\n\n        return $value;\n    }\n\n    /**\n     * Find out if we need thousands separator\n     * This is indicated by a comma enclosed by a digit placeholders: #, 0 or ?\n     */\n    public static function areThousandsRequired(string &$format): bool\n    {\n        $useThousands = (bool) preg_match('/([#\\?0]),([#\\?0])/', $format);\n        if ($useThousands) {\n            $format = self::pregReplace('/([#\\?0]),([#\\?0])/', '${1}${2}', $format);\n        }\n\n        return $useThousands;\n    }\n\n    /**\n     * Scale thousands, millions,...\n     * This is indicated by a number of commas after a digit placeholder: #, or 0.0,, or ?,.\n     */\n    public static function scaleThousandsMillions(string &$format): int\n    {\n        $scale = 1; // same as no scale\n        if (preg_match('/(#|0|\\?)(,+)/', $format, $matches)) {\n            $scale = 1000 ** strlen($matches[2]);\n            // strip the commas\n            $format = self::pregReplace('/([#\\?0]),+/', '${1}', $format);\n        }\n\n        return $scale;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/PercentageFormatter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\nclass PercentageFormatter extends BaseFormatter\n{\n    /** @param float|int $value */\n    public static function format($value, string $format): string\n    {\n        if ($format === NumberFormat::FORMAT_PERCENTAGE) {\n            return round((100 * $value), 0) . '%';\n        }\n\n        $value *= 100;\n        $format = self::stripQuotes($format);\n\n        [, $vDecimals] = explode('.', ((string) $value) . '.');\n        $vDecimalCount = strlen(rtrim($vDecimals, '0'));\n\n        $format = str_replace('%', '%%', $format);\n        $wholePartSize = strlen((string) floor(abs($value)));\n        $decimalPartSize = 0;\n        $placeHolders = '';\n        // Number of decimals\n        if (preg_match('/\\.([?0]+)/u', $format, $matches)) {\n            $decimalPartSize = strlen($matches[1]);\n            $vMinDecimalCount = strlen(rtrim($matches[1], '?'));\n            $decimalPartSize = min(max($vMinDecimalCount, $vDecimalCount), $decimalPartSize);\n            $placeHolders = str_repeat(' ', strlen($matches[1]) - $decimalPartSize);\n        }\n        // Number of digits to display before the decimal\n        if (preg_match('/([#0,]+)\\.?/u', $format, $matches)) {\n            $firstZero = ltrim($matches[1], '#,');\n            $wholePartSize = max($wholePartSize, strlen($firstZero));\n        }\n\n        $wholePartSize += $decimalPartSize + (int) ($decimalPartSize > 0);\n        $replacement = \"0{$wholePartSize}.{$decimalPartSize}\";\n        $mask = (string) preg_replace('/[#0,]+\\.?[?#0,]*/ui', \"%{$replacement}F{$placeHolders}\", $format);\n\n        /** @var float $valueFloat */\n        $valueFloat = $value;\n\n        return self::adjustSeparators(sprintf($mask, round($valueFloat, $decimalPartSize)));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\n\nclass Accounting extends CurrencyBase\n{\n    protected ?bool $overrideSpacing = true;\n\n    protected ?CurrencyNegative $overrideNegative = CurrencyNegative::parentheses;\n\n    /**\n     * @throws Exception if the Intl extension and ICU version don't support Accounting formats\n     */\n    protected function getLocaleFormat(): string\n    {\n        if (self::icuVersion() < 53.0) {\n            // @codeCoverageIgnoreStart\n            throw new Exception('The Intl extension does not support Accounting Formats without ICU 53');\n            // @codeCoverageIgnoreEnd\n        }\n\n        // Scrutinizer does not recognize CURRENCY_ACCOUNTING\n        $formatter = new Locale($this->fullLocale, NumberFormatter::CURRENCY_ACCOUNTING);\n        $mask = $formatter->format($this->stripLeadingRLM);\n        if ($this->decimals === 0) {\n            $mask = (string) preg_replace('/\\.0+/miu', '', $mask);\n        }\n\n        return str_replace('¤', $this->formatCurrencyCode(), $mask);\n    }\n\n    public static function icuVersion(): float\n    {\n        [$major, $minor] = explode('.', INTL_ICU_VERSION);\n\n        return (float) \"{$major}.{$minor}\";\n    }\n\n    private function formatCurrencyCode(): string\n    {\n        if ($this->locale === null) {\n            return $this->currencyCode . '*';\n        }\n\n        return \"[\\${$this->currencyCode}-{$this->locale}]\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Currency.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nclass Currency extends CurrencyBase\n{\n    protected ?bool $overrideSpacing = false;\n\n    protected ?CurrencyNegative $overrideNegative = null;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/CurrencyBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\n\nclass CurrencyBase extends Number\n{\n    public const LEADING_SYMBOL = true;\n\n    public const TRAILING_SYMBOL = false;\n\n    public const SYMBOL_WITH_SPACING = true;\n\n    public const SYMBOL_WITHOUT_SPACING = false;\n\n    protected string $currencyCode = '$';\n\n    protected bool $currencySymbolPosition = self::LEADING_SYMBOL;\n\n    protected bool $currencySymbolSpacing = self::SYMBOL_WITHOUT_SPACING;\n\n    protected const DEFAULT_STRIP_LEADING_RLM = false;\n\n    protected bool $stripLeadingRLM = self::DEFAULT_STRIP_LEADING_RLM;\n\n    public const DEFAULT_NEGATIVE = CurrencyNegative::minus;\n\n    protected CurrencyNegative $negative = CurrencyNegative::minus;\n\n    protected ?bool $overrideSpacing = null;\n\n    protected ?CurrencyNegative $overrideNegative = null;\n\n    // Not sure why original code uses nbsp\n    private string $spaceOrNbsp = ' '; // or \"\\u{a0}\"\n\n    /**\n     * @param string $currencyCode the currency symbol or code to display for this mask\n     * @param int $decimals number of decimal places to display, in the range 0-30\n     * @param bool $thousandsSeparator indicator whether the thousands separator should be used, or not\n     * @param bool $currencySymbolPosition indicates whether the currency symbol comes before or after the value\n     *              Possible values are Currency::LEADING_SYMBOL and Currency::TRAILING_SYMBOL\n     * @param bool $currencySymbolSpacing indicates whether there is spacing between the currency symbol and the value\n     *              Possible values are Currency::SYMBOL_WITH_SPACING and Currency::SYMBOL_WITHOUT_SPACING\n     *              However, Currency always uses WITHOUT and Accounting always uses WITH\n     * @param ?string $locale Set the locale for the currency format; or leave as the default null.\n     *          If provided, Locale values must be a valid formatted locale string (e.g. 'en-GB', 'fr', uz-Arab-AF).\n     *          Note that setting a locale will override any other settings defined in this class\n     *          other than the currency code; or decimals (unless the decimals value is set to 0).\n     * @param bool $stripLeadingRLM remove leading RLM added with\n     *          ICU 72.1+.\n     * @param CurrencyNegative $negative How to display negative numbers.\n     *                         Always use parentheses for Accounting.\n     *                         4 options for Currency.\n     *\n     * @throws Exception If a provided locale code is not a valid format\n     */\n    public function __construct(\n        string $currencyCode = '$',\n        int $decimals = 2,\n        bool $thousandsSeparator = true,\n        bool $currencySymbolPosition = self::LEADING_SYMBOL,\n        bool $currencySymbolSpacing = self::SYMBOL_WITHOUT_SPACING,\n        ?string $locale = null,\n        bool $stripLeadingRLM = self::DEFAULT_STRIP_LEADING_RLM,\n        CurrencyNegative $negative = CurrencyNegative::minus\n    ) {\n        $this->setCurrencyCode($currencyCode);\n        $this->setThousandsSeparator($thousandsSeparator);\n        $this->setDecimals($decimals);\n        $this->setCurrencySymbolPosition($currencySymbolPosition);\n        $this->setCurrencySymbolSpacing($currencySymbolSpacing);\n        $this->setLocale($locale);\n        $this->stripLeadingRLM = $stripLeadingRLM;\n        $this->negative = $negative;\n    }\n\n    public function setCurrencyCode(string $currencyCode): void\n    {\n        $this->currencyCode = $currencyCode;\n    }\n\n    public function setCurrencySymbolPosition(bool $currencySymbolPosition = self::LEADING_SYMBOL): void\n    {\n        $this->currencySymbolPosition = $currencySymbolPosition;\n    }\n\n    public function setCurrencySymbolSpacing(bool $currencySymbolSpacing = self::SYMBOL_WITHOUT_SPACING): void\n    {\n        $this->currencySymbolSpacing = $currencySymbolSpacing;\n    }\n\n    public function setStripLeadingRLM(bool $stripLeadingRLM): void\n    {\n        $this->stripLeadingRLM = $stripLeadingRLM;\n    }\n\n    public function setNegative(CurrencyNegative $negative): void\n    {\n        $this->negative = $negative;\n    }\n\n    protected function getLocaleFormat(): string\n    {\n        $formatter = new Locale($this->fullLocale, NumberFormatter::CURRENCY);\n        $mask = $formatter->format($this->stripLeadingRLM);\n        if ($this->decimals === 0) {\n            $mask = (string) preg_replace('/\\.0+/miu', '', $mask);\n        }\n\n        return str_replace('¤', $this->formatCurrencyCode(), $mask);\n    }\n\n    private function formatCurrencyCode(): string\n    {\n        if ($this->locale === null) {\n            return $this->currencyCode;\n        }\n\n        return \"[\\${$this->currencyCode}-{$this->locale}]\";\n    }\n\n    public function format(): string\n    {\n        if ($this->localeFormat !== null) {\n            return $this->localeFormat;\n        }\n        $symbolWithSpacing = $this->overrideSpacing ?? ($this->currencySymbolSpacing === self::SYMBOL_WITH_SPACING);\n        $negative = $this->overrideNegative ?? $this->negative;\n\n        // format if positive\n        $format = '_(';\n        if ($this->currencySymbolPosition === self::LEADING_SYMBOL) {\n            $format .= '\"' . $this->currencyCode . '\"';\n            if (preg_match('/^[A-Z]{3}$/i', $this->currencyCode) === 1) {\n                $format .= $this->spaceOrNbsp;\n            }\n            if (preg_match('/^[A-Z]{3}$/i', $this->currencyCode) === 1) {\n                $format .= $this->spaceOrNbsp;\n            }\n            if ($symbolWithSpacing) {\n                $format .= '*' . $this->spaceOrNbsp;\n            }\n        }\n        $format .= $this->thousandsSeparator ? '#,##0' : '0';\n        if ($this->decimals > 0) {\n            $format .= '.' . str_repeat('0', $this->decimals);\n        }\n        if ($this->currencySymbolPosition === self::TRAILING_SYMBOL) {\n            if ($symbolWithSpacing) {\n                $format .= $this->spaceOrNbsp;\n            } elseif (preg_match('/^[A-Z]{3}$/i', $this->currencyCode) === 1) {\n                $format .= $this->spaceOrNbsp;\n            }\n            $format .= '[$' . $this->currencyCode . ']';\n        }\n        $format .= '_)';\n\n        // format if negative\n        $format .= ';_(';\n        $format .= $negative->color();\n        $negativeStart = $negative->start();\n        if ($this->currencySymbolPosition === self::LEADING_SYMBOL) {\n            if ($negativeStart === '-' && !$symbolWithSpacing) {\n                $format .= $negativeStart;\n            }\n            $format .= '\"' . $this->currencyCode . '\"';\n            if (preg_match('/^[A-Z]{3}$/i', $this->currencyCode) === 1) {\n                $format .= $this->spaceOrNbsp;\n            }\n            if ($symbolWithSpacing) {\n                $format .= '*' . $this->spaceOrNbsp;\n            }\n            if ($negativeStart === '\\(' || ($symbolWithSpacing && $negativeStart === '-')) {\n                $format .= $negativeStart;\n            }\n        } else {\n            $format .= $negative->start();\n        }\n        $format .= $this->thousandsSeparator ? '#,##0' : '0';\n        if ($this->decimals > 0) {\n            $format .= '.' . str_repeat('0', $this->decimals);\n        }\n        $format .= $negative->end();\n        if ($this->currencySymbolPosition === self::TRAILING_SYMBOL) {\n            if ($symbolWithSpacing) {\n                // Do nothing - I can't figure out how to get\n                // everything to align if I put any kind of space here.\n                //$format .= \"\\u{2009}\";\n            } elseif (preg_match('/^[A-Z]{3}$/i', $this->currencyCode) === 1) {\n                $format .= $this->spaceOrNbsp;\n            }\n            $format .= '[$' . $this->currencyCode . ']';\n        }\n        if ($this->currencySymbolPosition === self::TRAILING_SYMBOL) {\n            $format .= '_)';\n        } elseif ($symbolWithSpacing && $negativeStart === '-') {\n            $format .= ' ';\n        }\n        // format if zero\n        $format .= ';_(';\n        if ($this->currencySymbolPosition === self::LEADING_SYMBOL) {\n            $format .= '\"' . $this->currencyCode . '\"';\n        }\n        if ($symbolWithSpacing) {\n            if ($this->currencySymbolPosition === self::LEADING_SYMBOL) {\n                $format .= '*' . $this->spaceOrNbsp;\n            }\n            $format .= '\"-\"';\n            if ($this->decimals > 0) {\n                $format .= str_repeat('?', $this->decimals);\n            }\n        } else {\n            if (preg_match('/^[A-Z]{3}$/i', $this->currencyCode) === 1) {\n                $format .= $this->spaceOrNbsp;\n            }\n            $format .= '0';\n            if ($this->decimals > 0) {\n                $format .= '.' . str_repeat('0', $this->decimals);\n            }\n        }\n        if ($this->currencySymbolPosition === self::TRAILING_SYMBOL) {\n            if ($symbolWithSpacing) {\n                $format .= $this->spaceOrNbsp;\n            }\n            $format .= '[$' . $this->currencyCode . ']';\n        }\n        $format .= '_)';\n        // format if text\n        $format .= ';_(@_)';\n\n        return $format;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/CurrencyNegative.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nenum CurrencyNegative\n{\n    case minus;\n    case redMinus;\n    case parentheses;\n    case redParentheses;\n\n    public function start(): string\n    {\n        return match ($this) {\n            self::minus, self::redMinus => '-',\n            self::parentheses, self::redParentheses => '\\(',\n        };\n    }\n\n    public function end(): string\n    {\n        return match ($this) {\n            self::minus, self::redMinus => '',\n            self::parentheses, self::redParentheses => '\\)',\n        };\n    }\n\n    public function color(): string\n    {\n        return match ($this) {\n            self::redParentheses, self::redMinus => '[Red]',\n            self::parentheses, self::minus => '',\n        };\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Date.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nclass Date extends DateTimeWizard\n{\n    /**\n     * Year (4 digits), e.g. 2023.\n     */\n    public const YEAR_FULL = 'yyyy';\n\n    /**\n     * Year (last 2 digits), e.g. 23.\n     */\n    public const YEAR_SHORT = 'yy';\n\n    public const MONTH_FIRST_LETTER = 'mmmmm';\n    /**\n     * Month name, long form, e.g. January.\n     */\n    public const MONTH_NAME_FULL = 'mmmm';\n    /**\n     * Month name, short form, e.g. Jan.\n     */\n    public const MONTH_NAME_SHORT = 'mmm';\n    /**\n     * Month number with a leading zero if required, e.g. 01.\n     */\n    public const MONTH_NUMBER_LONG = 'mm';\n\n    /**\n     * Month number without a leading zero, e.g. 1.\n     */\n    public const MONTH_NUMBER_SHORT = 'm';\n\n    /**\n     * Day of the week, full form, e.g. Tuesday.\n     */\n    public const WEEKDAY_NAME_LONG = 'dddd';\n\n    /**\n     * Day of the week, short form, e.g. Tue.\n     */\n    public const WEEKDAY_NAME_SHORT = 'ddd';\n\n    /**\n     * Day number with a leading zero, e.g. 03.\n     */\n    public const DAY_NUMBER_LONG = 'dd';\n\n    /**\n     * Day number without a leading zero, e.g. 3.\n     */\n    public const DAY_NUMBER_SHORT = 'd';\n\n    protected const DATE_BLOCKS = [\n        self::YEAR_FULL,\n        self::YEAR_SHORT,\n        self::MONTH_FIRST_LETTER,\n        self::MONTH_NAME_FULL,\n        self::MONTH_NAME_SHORT,\n        self::MONTH_NUMBER_LONG,\n        self::MONTH_NUMBER_SHORT,\n        self::WEEKDAY_NAME_LONG,\n        self::WEEKDAY_NAME_SHORT,\n        self::DAY_NUMBER_LONG,\n        self::DAY_NUMBER_SHORT,\n    ];\n\n    public const SEPARATOR_DASH = '-';\n    public const SEPARATOR_DOT = '.';\n    public const SEPARATOR_SLASH = '/';\n    public const SEPARATOR_SPACE_NONBREAKING = \"\\u{a0}\";\n    public const SEPARATOR_SPACE = ' ';\n\n    protected const DATE_DEFAULT = [\n        self::YEAR_FULL,\n        self::MONTH_NUMBER_LONG,\n        self::DAY_NUMBER_LONG,\n    ];\n\n    /**\n     * @var array<?string>\n     */\n    protected array $separators;\n\n    /**\n     * @var string[]\n     */\n    protected array $formatBlocks;\n\n    /**\n     * @param null|array<?string>|string $separators\n     *        If you want to use the same separator for all format blocks, then it can be passed as a string literal;\n     *           if you wish to use different separators, then they should be passed as an array.\n     *        If you want to use only a single format block, then pass a null as the separator argument\n     */\n    public function __construct($separators = self::SEPARATOR_DASH, string|null ...$formatBlocks)\n    {\n        $separators ??= self::SEPARATOR_DASH;\n        $formatBlocks = (count($formatBlocks) === 0) ? self::DATE_DEFAULT : $formatBlocks;\n\n        $this->separators = $this->padSeparatorArray(\n            is_array($separators) ? $separators : [$separators],\n            count($formatBlocks) - 1\n        );\n        $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks);\n    }\n\n    private function mapFormatBlocks(string $value): string\n    {\n        // Any date masking codes are returned as lower case values\n        if (in_array(mb_strtolower($value), self::DATE_BLOCKS, true)) {\n            return mb_strtolower($value);\n        }\n\n        // Wrap any string literals in quotes, so that they're clearly defined as string literals\n        return $this->wrapLiteral($value);\n    }\n\n    public function format(): string\n    {\n        return implode('', array_map([$this, 'intersperse'], $this->formatBlocks, $this->separators));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTime.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nclass DateTime extends DateTimeWizard\n{\n    /**\n     * @var array<?string>\n     */\n    protected array $separators;\n\n    /**\n     * @var array<DateTimeWizard|string>\n     */\n    protected array $formatBlocks;\n\n    /**\n     * @param null|string|string[] $separators\n     *          If you want to use only a single format block, then pass a null as the separator argument\n     * @param DateTimeWizard|string ...$formatBlocks\n     */\n    public function __construct($separators, ...$formatBlocks)\n    {\n        $this->separators = $this->padSeparatorArray(\n            is_array($separators) ? $separators : [$separators],\n            count($formatBlocks) - 1\n        );\n        $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks);\n    }\n\n    private function mapFormatBlocks(DateTimeWizard|string $value): string\n    {\n        // Any date masking codes are returned as lower case values\n        if ($value instanceof DateTimeWizard) {\n            return $value->__toString();\n        }\n\n        // Wrap any string literals in quotes, so that they're clearly defined as string literals\n        return $this->wrapLiteral($value);\n    }\n\n    public function format(): string\n    {\n        return implode('', array_map([$this, 'intersperse'], $this->formatBlocks, $this->separators));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTimeWizard.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nuse Stringable;\n\nabstract class DateTimeWizard implements Stringable, Wizard\n{\n    protected const NO_ESCAPING_NEEDED = \"$+-/():!^&'~{}<>= \";\n\n    /**\n     * @param array<?string> $separators\n     *\n     * @return array<?string>\n     */\n    protected function padSeparatorArray(array $separators, int $count): array\n    {\n        $lastSeparator = (string) array_pop($separators);\n\n        return $separators + array_fill(0, $count, $lastSeparator);\n    }\n\n    protected function escapeSingleCharacter(string $value): string\n    {\n        if (str_contains(self::NO_ESCAPING_NEEDED, $value)) {\n            return $value;\n        }\n\n        return \"\\\\{$value}\";\n    }\n\n    protected function wrapLiteral(string $value): string\n    {\n        if (mb_strlen($value, 'UTF-8') === 1) {\n            return $this->escapeSingleCharacter($value);\n        }\n\n        // Wrap any other string literals in quotes, so that they're clearly defined as string literals\n        return '\"' . str_replace('\"', '\"\"', $value) . '\"';\n    }\n\n    protected function intersperse(string $formatBlock, ?string $separator): string\n    {\n        return \"{$formatBlock}{$separator}\";\n    }\n\n    public function __toString(): string\n    {\n        return $this->format();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Duration.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nclass Duration extends DateTimeWizard\n{\n    public const DAYS_DURATION = 'd';\n\n    /**\n     * Hours as a duration (can exceed 24), e.g. 29.\n     */\n    public const HOURS_DURATION = '[h]';\n\n    /**\n     * Hours without a leading zero, e.g. 9.\n     */\n    public const HOURS_SHORT = 'h';\n\n    /**\n     * Hours with a leading zero, e.g. 09.\n     */\n    public const HOURS_LONG = 'hh';\n\n    /**\n     * Minutes as a duration (can exceed 60), e.g. 109.\n     */\n    public const MINUTES_DURATION = '[m]';\n\n    /**\n     * Minutes without a leading zero, e.g. 5.\n     */\n    public const MINUTES_SHORT = 'm';\n\n    /**\n     * Minutes with a leading zero, e.g. 05.\n     */\n    public const MINUTES_LONG = 'mm';\n\n    /**\n     * Seconds as a duration (can exceed 60), e.g. 129.\n     */\n    public const SECONDS_DURATION = '[s]';\n\n    /**\n     * Seconds without a leading zero, e.g. 2.\n     */\n    public const SECONDS_SHORT = 's';\n\n    /**\n     * Seconds with a leading zero, e.g. 02.\n     */\n    public const SECONDS_LONG = 'ss';\n\n    protected const DURATION_BLOCKS = [\n        self::DAYS_DURATION,\n        self::HOURS_DURATION,\n        self::HOURS_LONG,\n        self::HOURS_SHORT,\n        self::MINUTES_DURATION,\n        self::MINUTES_LONG,\n        self::MINUTES_SHORT,\n        self::SECONDS_DURATION,\n        self::SECONDS_LONG,\n        self::SECONDS_SHORT,\n    ];\n\n    protected const DURATION_MASKS = [\n        self::DAYS_DURATION => self::DAYS_DURATION,\n        self::HOURS_DURATION => self::HOURS_SHORT,\n        self::MINUTES_DURATION => self::MINUTES_LONG,\n        self::SECONDS_DURATION => self::SECONDS_LONG,\n    ];\n\n    protected const DURATION_DEFAULTS = [\n        self::HOURS_LONG => self::HOURS_DURATION,\n        self::HOURS_SHORT => self::HOURS_DURATION,\n        self::MINUTES_LONG => self::MINUTES_DURATION,\n        self::MINUTES_SHORT => self::MINUTES_DURATION,\n        self::SECONDS_LONG => self::SECONDS_DURATION,\n        self::SECONDS_SHORT => self::SECONDS_DURATION,\n    ];\n\n    public const SEPARATOR_COLON = ':';\n    public const SEPARATOR_SPACE_NONBREAKING = \"\\u{a0}\";\n    public const SEPARATOR_SPACE = ' ';\n\n    public const DURATION_DEFAULT = [\n        self::HOURS_DURATION,\n        self::MINUTES_LONG,\n        self::SECONDS_LONG,\n    ];\n\n    /**\n     * @var array<?string>\n     */\n    protected array $separators;\n\n    /**\n     * @var string[]\n     */\n    protected array $formatBlocks;\n\n    protected bool $durationIsSet = false;\n\n    /**\n     * @param null|string|string[] $separators\n     *        If you want to use the same separator for all format blocks, then it can be passed as a string literal;\n     *           if you wish to use different separators, then they should be passed as an array.\n     *        If you want to use only a single format block, then pass a null as the separator argument\n     */\n    public function __construct($separators = self::SEPARATOR_COLON, string ...$formatBlocks)\n    {\n        $separators ??= self::SEPARATOR_COLON;\n        $formatBlocks = (count($formatBlocks) === 0) ? self::DURATION_DEFAULT : $formatBlocks;\n\n        $this->separators = $this->padSeparatorArray(\n            is_array($separators) ? $separators : [$separators],\n            count($formatBlocks) - 1\n        );\n        $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks);\n\n        if ($this->durationIsSet === false) {\n            // We need at least one duration mask, so if none has been set we change the first mask element\n            //    to a duration.\n            $this->formatBlocks[0] = self::DURATION_DEFAULTS[mb_strtolower($this->formatBlocks[0])];\n        }\n    }\n\n    private function mapFormatBlocks(string $value): string\n    {\n        // Any duration masking codes are returned as lower case values\n        if (in_array(mb_strtolower($value), self::DURATION_BLOCKS, true)) {\n            if (array_key_exists(mb_strtolower($value), self::DURATION_MASKS)) {\n                if ($this->durationIsSet) {\n                    // We should only have a single duration mask, the first defined in the mask set,\n                    //    so convert any additional duration masks to standard time masks.\n                    $value = self::DURATION_MASKS[mb_strtolower($value)];\n                }\n                $this->durationIsSet = true;\n            }\n\n            return mb_strtolower($value);\n        }\n\n        // Wrap any string literals in quotes, so that they're clearly defined as string literals\n        return $this->wrapLiteral($value);\n    }\n\n    public function format(): string\n    {\n        return implode('', array_map([$this, 'intersperse'], $this->formatBlocks, $this->separators));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Locale.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\n\nfinal class Locale\n{\n    /**\n     * Language code: ISO-639 2 character, alpha.\n     * Optional script code: ISO-15924 4 alpha.\n     * Optional country code: ISO-3166-1, 2 character alpha.\n     * Separated by underscores or dashes.\n     */\n    public const STRUCTURE = '/^(?P<language>[a-z]{2})([-_](?P<script>[a-z]{4}))?([-_](?P<country>[a-z]{2}))?$/i';\n\n    private NumberFormatter $formatter;\n\n    public function __construct(?string $locale, int $style)\n    {\n        $formatterLocale = str_replace('-', '_', $locale ?? '');\n        $this->formatter = new NumberFormatter($formatterLocale, $style);\n        if ($this->formatter->getLocale() !== $formatterLocale) {\n            throw new Exception(\"Unable to read locale data for '{$locale}'\");\n        }\n    }\n\n    public function format(bool $stripRlm = true): string\n    {\n        $str = $this->formatter->getPattern();\n\n        return ($stripRlm && str_starts_with($str, \"\\xe2\\x80\\x8f\")) ? substr($str, 3) : $str;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Number.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\n\nclass Number extends NumberBase implements Wizard\n{\n    public const WITH_THOUSANDS_SEPARATOR = true;\n\n    public const WITHOUT_THOUSANDS_SEPARATOR = false;\n\n    protected bool $thousandsSeparator = true;\n\n    /**\n     * @param int $decimals number of decimal places to display, in the range 0-30\n     * @param bool $thousandsSeparator indicator whether the thousands separator should be used, or not\n     * @param ?string $locale Set the locale for the number format; or leave as the default null.\n     *          Locale has no effect for Number Format values, and is retained here only for compatibility\n     *              with the other Wizards.\n     *          If provided, Locale values must be a valid formatted locale string (e.g. 'en-GB', 'fr', uz-Arab-AF).\n     *\n     * @throws Exception If a provided locale code is not a valid format\n     */\n    public function __construct(\n        int $decimals = 2,\n        bool $thousandsSeparator = self::WITH_THOUSANDS_SEPARATOR,\n        ?string $locale = null\n    ) {\n        $this->setDecimals($decimals);\n        $this->setThousandsSeparator($thousandsSeparator);\n        $this->setLocale($locale);\n    }\n\n    public function setThousandsSeparator(bool $thousandsSeparator = self::WITH_THOUSANDS_SEPARATOR): void\n    {\n        $this->thousandsSeparator = $thousandsSeparator;\n    }\n\n    /**\n     * As MS Excel cannot easily handle Lakh, which is the only locale-specific Number format variant,\n     *       we don't use locale with Numbers.\n     */\n    protected function getLocaleFormat(): string\n    {\n        return $this->format();\n    }\n\n    public function format(): string\n    {\n        return sprintf(\n            '%s0%s',\n            $this->thousandsSeparator ? '#,##' : null,\n            $this->decimals > 0 ? '.' . str_repeat('0', $this->decimals) : null\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/NumberBase.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse Stringable;\n\nabstract class NumberBase implements Stringable\n{\n    protected const MAX_DECIMALS = 30;\n\n    protected int $decimals = 2;\n\n    protected ?string $locale = null;\n\n    protected ?string $fullLocale = null;\n\n    protected ?string $localeFormat = null;\n\n    public function setDecimals(int $decimals = 2): void\n    {\n        $this->decimals = ($decimals > self::MAX_DECIMALS) ? self::MAX_DECIMALS : max($decimals, 0);\n    }\n\n    /**\n     * Setting a locale will override any settings defined in this class.\n     *\n     * @throws Exception If the locale code is not a valid format\n     */\n    public function setLocale(?string $locale = null): void\n    {\n        if ($locale === null) {\n            $this->localeFormat = $this->locale = $this->fullLocale = null;\n\n            return;\n        }\n\n        $this->locale = $this->validateLocale($locale);\n\n        if (class_exists(NumberFormatter::class)) {\n            $this->localeFormat = $this->getLocaleFormat();\n        }\n    }\n\n    /**\n     * Stub: should be implemented as a concrete method in concrete wizards.\n     */\n    abstract protected function getLocaleFormat(): string;\n\n    /**\n     * @throws Exception If the locale code is not a valid format\n     */\n    private function validateLocale(string $locale): string\n    {\n        if (preg_match(Locale::STRUCTURE, $locale, $matches, PREG_UNMATCHED_AS_NULL) !== 1) {\n            throw new Exception(\"Invalid locale code '{$locale}'\");\n        }\n\n        ['language' => $language, 'script' => $script, 'country' => $country] = $matches;\n        // Set case and separator to match standardised locale case\n        $language = strtolower($language);\n        $script = ($script === null) ? null : ucfirst(strtolower($script));\n        $country = ($country === null) ? null : strtoupper($country);\n\n        $this->fullLocale = implode('-', array_filter([$language, $script, $country]));\n\n        return $country === null ? $language : \"{$language}-{$country}\";\n    }\n\n    public function format(): string\n    {\n        return NumberFormat::FORMAT_GENERAL;\n    }\n\n    public function __toString(): string\n    {\n        return $this->format();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Percentage.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\n\nclass Percentage extends NumberBase implements Wizard\n{\n    /**\n     * @param int $decimals number of decimal places to display, in the range 0-30\n     * @param ?string $locale Set the locale for the percentage format; or leave as the default null.\n     *          If provided, Locale values must be a valid formatted locale string (e.g. 'en-GB', 'fr', uz-Arab-AF).\n     *\n     * @throws Exception If a provided locale code is not a valid format\n     */\n    public function __construct(int $decimals = 2, ?string $locale = null)\n    {\n        $this->setDecimals($decimals);\n        $this->setLocale($locale);\n    }\n\n    protected function getLocaleFormat(): string\n    {\n        $formatter = new Locale($this->fullLocale, NumberFormatter::PERCENT);\n\n        return $this->decimals > 0\n            ? str_replace('0', '0.' . str_repeat('0', $this->decimals), $formatter->format())\n            : $formatter->format();\n    }\n\n    public function format(): string\n    {\n        if ($this->localeFormat !== null) {\n            return $this->localeFormat;\n        }\n\n        return sprintf('0%s%%', $this->decimals > 0 ? '.' . str_repeat('0', $this->decimals) : null);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Scientific.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\n\nclass Scientific extends NumberBase implements Wizard\n{\n    /**\n     * @param int $decimals number of decimal places to display, in the range 0-30\n     * @param ?string $locale Set the locale for the scientific format; or leave as the default null.\n     *          Locale has no effect for Scientific Format values, and is retained here for compatibility\n     *              with the other Wizards.\n     *          If provided, Locale values must be a valid formatted locale string (e.g. 'en-GB', 'fr', uz-Arab-AF).\n     *\n     * @throws Exception If a provided locale code is not a valid format\n     */\n    public function __construct(int $decimals = 2, ?string $locale = null)\n    {\n        $this->setDecimals($decimals);\n        $this->setLocale($locale);\n    }\n\n    protected function getLocaleFormat(): string\n    {\n        return $this->format();\n    }\n\n    public function format(): string\n    {\n        return sprintf('0%sE+00', $this->decimals > 0 ? '.' . str_repeat('0', $this->decimals) : null);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Time.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\nclass Time extends DateTimeWizard\n{\n    /**\n     * Hours without a leading zero, e.g. 9.\n     */\n    public const HOURS_SHORT = 'h';\n\n    /**\n     * Hours with a leading zero, e.g. 09.\n     */\n    public const HOURS_LONG = 'hh';\n\n    /**\n     * Minutes without a leading zero, e.g. 5.\n     */\n    public const MINUTES_SHORT = 'm';\n\n    /**\n     * Minutes with a leading zero, e.g. 05.\n     */\n    public const MINUTES_LONG = 'mm';\n\n    /**\n     * Seconds without a leading zero, e.g. 2.\n     */\n    public const SECONDS_SHORT = 's';\n\n    /**\n     * Seconds with a leading zero, e.g. 02.\n     */\n    public const SECONDS_LONG = 'ss';\n\n    public const MORNING_AFTERNOON = 'AM/PM';\n\n    protected const TIME_BLOCKS = [\n        self::HOURS_LONG,\n        self::HOURS_SHORT,\n        self::MINUTES_LONG,\n        self::MINUTES_SHORT,\n        self::SECONDS_LONG,\n        self::SECONDS_SHORT,\n        self::MORNING_AFTERNOON,\n    ];\n\n    public const SEPARATOR_COLON = ':';\n    public const SEPARATOR_SPACE_NONBREAKING = \"\\u{a0}\";\n    public const SEPARATOR_SPACE = ' ';\n\n    protected const TIME_DEFAULT = [\n        self::HOURS_LONG,\n        self::MINUTES_LONG,\n        self::SECONDS_LONG,\n    ];\n\n    /**\n     * @var array<?string>\n     */\n    protected array $separators;\n\n    /**\n     * @var string[]\n     */\n    protected array $formatBlocks;\n\n    /**\n     * @param null|string|string[] $separators\n     *        If you want to use the same separator for all format blocks, then it can be passed as a string literal;\n     *           if you wish to use different separators, then they should be passed as an array.\n     *        If you want to use only a single format block, then pass a null as the separator argument\n     */\n    public function __construct($separators = self::SEPARATOR_COLON, string ...$formatBlocks)\n    {\n        $separators ??= self::SEPARATOR_COLON;\n        $formatBlocks = (count($formatBlocks) === 0) ? self::TIME_DEFAULT : $formatBlocks;\n\n        $this->separators = $this->padSeparatorArray(\n            is_array($separators) ? $separators : [$separators],\n            count($formatBlocks) - 1\n        );\n        $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks);\n    }\n\n    private function mapFormatBlocks(string $value): string\n    {\n        // Any date masking codes are returned as lower case values\n        //     except for AM/PM, which is set to uppercase\n        if (in_array(mb_strtolower($value), self::TIME_BLOCKS, true)) {\n            return mb_strtolower($value);\n        } elseif (mb_strtoupper($value) === self::MORNING_AFTERNOON) {\n            return mb_strtoupper($value);\n        }\n\n        // Wrap any string literals in quotes, so that they're clearly defined as string literals\n        return $this->wrapLiteral($value);\n    }\n\n    public function format(): string\n    {\n        return implode('', array_map([$this, 'intersperse'], $this->formatBlocks, $this->separators));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat/Wizard/Wizard.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard;\n\ninterface Wizard\n{\n    public function format(): string;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/NumberFormat.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\n\nclass NumberFormat extends Supervisor\n{\n    // Pre-defined formats\n    const FORMAT_GENERAL = 'General';\n\n    const FORMAT_TEXT = '@';\n\n    const FORMAT_NUMBER = '0';\n    const FORMAT_NUMBER_0 = '0.0';\n    const FORMAT_NUMBER_00 = '0.00';\n    const FORMAT_NUMBER_COMMA_SEPARATED1 = '#,##0.00';\n    const FORMAT_NUMBER_COMMA_SEPARATED2 = '#,##0.00_-';\n\n    const FORMAT_PERCENTAGE = '0%';\n    const FORMAT_PERCENTAGE_0 = '0.0%';\n    const FORMAT_PERCENTAGE_00 = '0.00%';\n\n    const FORMAT_DATE_YYYYMMDD = 'yyyy-mm-dd';\n    const FORMAT_DATE_DDMMYYYY = 'dd/mm/yyyy';\n    const FORMAT_DATE_DMYSLASH = 'd\"/\"m\"/\"yy';\n    const FORMAT_DATE_DMYMINUS = 'd-m-yy';\n    const FORMAT_DATE_DMMINUS = 'd-m';\n    const FORMAT_DATE_MYMINUS = 'm-yy';\n    const FORMAT_DATE_XLSX14 = 'mm-dd-yy';\n    const FORMAT_DATE_XLSX14_ACTUAL = 'm/d/yyyy';\n    const FORMAT_DATE_XLSX15 = 'd-mmm-yy';\n    const FORMAT_DATE_XLSX15_YYYY = 'd-mmm-yyyy';\n    const FORMAT_DATE_XLSX16 = 'd-mmm';\n    const FORMAT_DATE_XLSX17 = 'mmm-yy';\n    const FORMAT_DATE_XLSX22 = 'm/d/yy h:mm';\n    const FORMAT_DATE_XLSX22_ACTUAL = 'm/d/yyyy h:mm';\n    const FORMAT_DATE_DATETIME = 'd/m/yy h:mm';\n    const FORMAT_DATE_DATETIME_BETTER = 'yyyy-mm-dd hh:mm';\n    const FORMAT_DATE_TIME1 = 'h:mm AM/PM';\n    const FORMAT_DATE_TIME2 = 'h:mm:ss AM/PM';\n    const FORMAT_DATE_TIME3 = 'h:mm';\n    const FORMAT_DATE_TIME4 = 'h:mm:ss';\n    const FORMAT_DATE_TIME5 = 'mm:ss';\n    const FORMAT_DATE_TIME6 = 'h:mm:ss';\n    const FORMAT_DATE_TIME7 = 'i:s.S';\n    const FORMAT_DATE_TIME8 = 'h:mm:ss;@';\n    const FORMAT_DATE_TIME_INTERVAL_HMS = '[hh]:mm:ss';\n    const FORMAT_DATE_YYYYMMDDSLASH = 'yyyy\"/\"mm\"/\"dd;@';\n    const FORMAT_DATE_LONG_DATE = 'dddd, mmmm d, yyyy';\n\n    const DATE_TIME_OR_DATETIME_ARRAY = [\n        self::FORMAT_DATE_YYYYMMDD,\n        self::FORMAT_DATE_DDMMYYYY,\n        self::FORMAT_DATE_DMYSLASH,\n        self::FORMAT_DATE_DMYMINUS,\n        self::FORMAT_DATE_DMMINUS,\n        self::FORMAT_DATE_MYMINUS,\n        self::FORMAT_DATE_XLSX14,\n        self::FORMAT_DATE_XLSX14_ACTUAL,\n        self::FORMAT_DATE_XLSX15,\n        self::FORMAT_DATE_XLSX16,\n        self::FORMAT_DATE_XLSX17,\n        self::FORMAT_DATE_XLSX22,\n        self::FORMAT_DATE_XLSX22_ACTUAL,\n        self::FORMAT_DATE_DATETIME,\n        self::FORMAT_DATE_DATETIME_BETTER,\n        self::FORMAT_DATE_TIME1,\n        self::FORMAT_DATE_TIME2,\n        self::FORMAT_DATE_TIME3,\n        self::FORMAT_DATE_TIME4,\n        self::FORMAT_DATE_TIME5,\n        self::FORMAT_DATE_TIME6,\n        self::FORMAT_DATE_TIME7,\n        self::FORMAT_DATE_TIME8,\n        self::FORMAT_DATE_TIME_INTERVAL_HMS,\n        self::FORMAT_DATE_YYYYMMDDSLASH,\n        self::FORMAT_DATE_LONG_DATE,\n    ];\n    const TIME_OR_DATETIME_ARRAY = [\n        self::FORMAT_DATE_XLSX22,\n        self::FORMAT_DATE_DATETIME,\n        self::FORMAT_DATE_DATETIME_BETTER,\n        self::FORMAT_DATE_TIME1,\n        self::FORMAT_DATE_TIME2,\n        self::FORMAT_DATE_TIME3,\n        self::FORMAT_DATE_TIME4,\n        self::FORMAT_DATE_TIME5,\n        self::FORMAT_DATE_TIME6,\n        self::FORMAT_DATE_TIME7,\n        self::FORMAT_DATE_TIME8,\n        self::FORMAT_DATE_TIME_INTERVAL_HMS,\n    ];\n\n    private const FORMAT_CURRENCY_AMOUNT_INTEGER = '#,##0_-';\n    private const FORMAT_CURRENCY_AMOUNT_FLOAT = '#,##0.00_-';\n    const FORMAT_CURRENCY_USD_INTEGER = '$' . self::FORMAT_CURRENCY_AMOUNT_INTEGER;\n    const FORMAT_CURRENCY_USD = '$' . self::FORMAT_CURRENCY_AMOUNT_FLOAT;\n    const FORMAT_CURRENCY_GBP_INTEGER = '£' . self::FORMAT_CURRENCY_AMOUNT_INTEGER;\n    const FORMAT_CURRENCY_GBP = '£' . self::FORMAT_CURRENCY_AMOUNT_FLOAT;\n    const FORMAT_CURRENCY_YEN_YUAN_INTEGER = '￥' . self::FORMAT_CURRENCY_AMOUNT_INTEGER;\n    const FORMAT_CURRENCY_YEN_YUAN = '￥' . self::FORMAT_CURRENCY_AMOUNT_FLOAT;\n    const FORMAT_CURRENCY_EUR_INTEGER = '#,##0_-[$€]';\n    const FORMAT_CURRENCY_EUR = '#,##0.00_-[$€]';\n    const FORMAT_ACCOUNTING_USD = '_(\"$\"* #,##0.00_);_(\"$\"* \\(#,##0.00\\);_(\"$\"* \"-\"??_);_(@_)';\n    const FORMAT_ACCOUNTING_EUR = '_(\"€\"* #,##0.00_);_(\"€\"* \\(#,##0.00\\);_(\"€\"* \"-\"??_);_(@_)';\n\n    const SHORT_DATE_INDEX = 14;\n    const DATE_TIME_INDEX = 22;\n    const FORMAT_SYSDATE_X = '[$-x-sysdate]';\n    const FORMAT_SYSDATE_F800 = '[$-F800]';\n    const FORMAT_SYSTIME_X = '[$-x-systime]';\n    const FORMAT_SYSTIME_F400 = '[$-F400]';\n\n    protected static string $shortDateFormat = self::FORMAT_DATE_XLSX14_ACTUAL;\n\n    protected static string $longDateFormat = self::FORMAT_DATE_LONG_DATE;\n\n    protected static string $dateTimeFormat = self::FORMAT_DATE_XLSX22_ACTUAL;\n\n    protected static string $timeFormat = self::FORMAT_DATE_TIME2;\n\n    /**\n     * Excel built-in number formats.\n     *\n     * @var string[]\n     */\n    protected static array $builtInFormats;\n\n    /**\n     * Excel built-in number formats (flipped, for faster lookups).\n     *\n     * @var int[]\n     */\n    protected static array $flippedBuiltInFormats;\n\n    /**\n     * Format Code.\n     */\n    protected ?string $formatCode = self::FORMAT_GENERAL;\n\n    /**\n     * Built-in format Code.\n     *\n     * @var false|int\n     */\n    protected $builtInFormatCode = 0;\n\n    /**\n     * Create a new NumberFormat.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     * @param bool $isConditional Flag indicating if this is a conditional style or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false, bool $isConditional = false)\n    {\n        // Supervisor?\n        parent::__construct($isSupervisor);\n\n        if ($isConditional) {\n            $this->formatCode = null;\n            $this->builtInFormatCode = false;\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        return $parent->getSharedComponent()->getNumberFormat();\n    }\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return array{numberFormat: mixed[]}\n     */\n    public function getStyleArray(array $array): array\n    {\n        return ['numberFormat' => $array];\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray(\n     *     [\n     *         'formatCode' => NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE\n     *     ]\n     * );\n     * </code>\n     *\n     * @param string[] $styleArray Array containing style information\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray): static\n    {\n        if ($this->isSupervisor) {\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($styleArray));\n        } else {\n            if (isset($styleArray['formatCode'])) {\n                $this->setFormatCode($styleArray['formatCode']);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Format Code.\n     */\n    public function getFormatCode(bool $extended = false): ?string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getFormatCode($extended);\n        }\n        $builtin = $this->getBuiltInFormatCode();\n        if (is_int($builtin)) {\n            if ($extended) {\n                if ($builtin === self::SHORT_DATE_INDEX) {\n                    return self::$shortDateFormat;\n                }\n                if ($builtin === self::DATE_TIME_INDEX) {\n                    return self::$dateTimeFormat;\n                }\n            }\n\n            return self::builtInFormatCode($builtin);\n        }\n\n        return $extended ? self::convertSystemFormats($this->formatCode) : $this->formatCode;\n    }\n\n    public static function convertSystemFormats(?string $formatCode): ?string\n    {\n        if (is_string($formatCode)) {\n            if (stripos($formatCode, self::FORMAT_SYSDATE_F800) !== false || stripos($formatCode, self::FORMAT_SYSDATE_X) !== false) {\n                return self::$longDateFormat;\n            }\n            if (stripos($formatCode, self::FORMAT_SYSTIME_F400) !== false || stripos($formatCode, self::FORMAT_SYSTIME_X) !== false) {\n                return self::$timeFormat;\n            }\n        }\n\n        return $formatCode;\n    }\n\n    /**\n     * Set Format Code.\n     *\n     * @param string $formatCode see self::FORMAT_*\n     *\n     * @return $this\n     */\n    public function setFormatCode(string $formatCode): static\n    {\n        if ($formatCode == '') {\n            $formatCode = self::FORMAT_GENERAL;\n        }\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['formatCode' => $formatCode]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->formatCode = $formatCode;\n            $this->builtInFormatCode = self::builtInFormatCodeIndex($formatCode);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Built-In Format Code.\n     *\n     * @return false|int\n     */\n    public function getBuiltInFormatCode()\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getBuiltInFormatCode();\n        }\n\n        return $this->builtInFormatCode;\n    }\n\n    /**\n     * Set Built-In Format Code.\n     *\n     * @param int $formatCodeIndex Id of the built-in format code to use\n     *\n     * @return $this\n     */\n    public function setBuiltInFormatCode(int $formatCodeIndex): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['formatCode' => self::builtInFormatCode($formatCodeIndex)]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->builtInFormatCode = $formatCodeIndex;\n            $this->formatCode = self::builtInFormatCode($formatCodeIndex);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Fill built-in format codes.\n     */\n    private static function fillBuiltInFormatCodes(): void\n    {\n        //  [MS-OI29500: Microsoft Office Implementation Information for ISO/IEC-29500 Standard Compliance]\n        //  18.8.30. numFmt (Number Format)\n        //\n        //  The ECMA standard defines built-in format IDs\n        //      14: \"mm-dd-yy\"\n        //      22: \"m/d/yy h:mm\"\n        //      37: \"#,##0 ;(#,##0)\"\n        //      38: \"#,##0 ;[Red](#,##0)\"\n        //      39: \"#,##0.00;(#,##0.00)\"\n        //      40: \"#,##0.00;[Red](#,##0.00)\"\n        //      47: \"mmss.0\"\n        //      KOR fmt 55: \"yyyy-mm-dd\"\n        //  Excel defines built-in format IDs\n        //      14: \"m/d/yyyy\"\n        //      22: \"m/d/yyyy h:mm\"\n        //      37: \"#,##0_);(#,##0)\"\n        //      38: \"#,##0_);[Red](#,##0)\"\n        //      39: \"#,##0.00_);(#,##0.00)\"\n        //      40: \"#,##0.00_);[Red](#,##0.00)\"\n        //      47: \"mm:ss.0\"\n        //      KOR fmt 55: \"yyyy/mm/dd\"\n\n        // Built-in format codes\n        if (empty(self::$builtInFormats)) {\n            self::$builtInFormats = [];\n\n            // General\n            self::$builtInFormats[0] = self::FORMAT_GENERAL;\n            self::$builtInFormats[1] = '0';\n            self::$builtInFormats[2] = '0.00';\n            self::$builtInFormats[3] = '#,##0';\n            self::$builtInFormats[4] = '#,##0.00';\n\n            self::$builtInFormats[9] = '0%';\n            self::$builtInFormats[10] = '0.00%';\n            self::$builtInFormats[11] = '0.00E+00';\n            self::$builtInFormats[12] = '# ?/?';\n            self::$builtInFormats[13] = '# ??/??';\n            self::$builtInFormats[14] = self::FORMAT_DATE_XLSX14_ACTUAL; // Despite ECMA 'mm-dd-yy';\n            self::$builtInFormats[15] = self::FORMAT_DATE_XLSX15;\n            self::$builtInFormats[16] = 'd-mmm';\n            self::$builtInFormats[17] = 'mmm-yy';\n            self::$builtInFormats[18] = 'h:mm AM/PM';\n            self::$builtInFormats[19] = 'h:mm:ss AM/PM';\n            self::$builtInFormats[20] = 'h:mm';\n            self::$builtInFormats[21] = 'h:mm:ss';\n            self::$builtInFormats[22] = self::FORMAT_DATE_XLSX22_ACTUAL; // Despite ECMA 'm/d/yy h:mm';\n\n            self::$builtInFormats[37] = '#,##0_);(#,##0)'; //  Despite ECMA '#,##0 ;(#,##0)';\n            self::$builtInFormats[38] = '#,##0_);[Red](#,##0)'; //  Despite ECMA '#,##0 ;[Red](#,##0)';\n            self::$builtInFormats[39] = '#,##0.00_);(#,##0.00)'; //  Despite ECMA '#,##0.00;(#,##0.00)';\n            self::$builtInFormats[40] = '#,##0.00_);[Red](#,##0.00)'; //  Despite ECMA '#,##0.00;[Red](#,##0.00)';\n\n            self::$builtInFormats[44] = '_(\"$\"* #,##0.00_);_(\"$\"* \\(#,##0.00\\);_(\"$\"* \"-\"??_);_(@_)';\n            self::$builtInFormats[45] = 'mm:ss';\n            self::$builtInFormats[46] = '[h]:mm:ss';\n            self::$builtInFormats[47] = 'mm:ss.0'; //  Despite ECMA 'mmss.0';\n            self::$builtInFormats[48] = '##0.0E+0';\n            self::$builtInFormats[49] = '@';\n\n            // CHT\n            self::$builtInFormats[27] = '[$-404]e/m/d';\n            self::$builtInFormats[30] = 'm/d/yy';\n            self::$builtInFormats[36] = '[$-404]e/m/d';\n            self::$builtInFormats[50] = '[$-404]e/m/d';\n            self::$builtInFormats[57] = '[$-404]e/m/d';\n\n            // THA\n            self::$builtInFormats[59] = 't0';\n            self::$builtInFormats[60] = 't0.00';\n            self::$builtInFormats[61] = 't#,##0';\n            self::$builtInFormats[62] = 't#,##0.00';\n            self::$builtInFormats[67] = 't0%';\n            self::$builtInFormats[68] = 't0.00%';\n            self::$builtInFormats[69] = 't# ?/?';\n            self::$builtInFormats[70] = 't# ??/??';\n\n            // JPN\n            self::$builtInFormats[28] = '[$-411]ggge\"年\"m\"月\"d\"日\"';\n            self::$builtInFormats[29] = '[$-411]ggge\"年\"m\"月\"d\"日\"';\n            self::$builtInFormats[31] = 'yyyy\"年\"m\"月\"d\"日\"';\n            self::$builtInFormats[32] = 'h\"時\"mm\"分\"';\n            self::$builtInFormats[33] = 'h\"時\"mm\"分\"ss\"秒\"';\n            self::$builtInFormats[34] = 'yyyy\"年\"m\"月\"';\n            self::$builtInFormats[35] = 'm\"月\"d\"日\"';\n            self::$builtInFormats[51] = '[$-411]ggge\"年\"m\"月\"d\"日\"';\n            self::$builtInFormats[52] = 'yyyy\"年\"m\"月\"';\n            self::$builtInFormats[53] = 'm\"月\"d\"日\"';\n            self::$builtInFormats[54] = '[$-411]ggge\"年\"m\"月\"d\"日\"';\n            self::$builtInFormats[55] = 'yyyy\"年\"m\"月\"';\n            self::$builtInFormats[56] = 'm\"月\"d\"日\"';\n            self::$builtInFormats[58] = '[$-411]ggge\"年\"m\"月\"d\"日\"';\n\n            // Flip array (for faster lookups)\n            self::$flippedBuiltInFormats = array_flip(self::$builtInFormats);\n        }\n    }\n\n    /**\n     * Get built-in format code.\n     */\n    public static function builtInFormatCode(int $index): string\n    {\n        // Clean parameter\n        $index = (int) $index;\n\n        // Ensure built-in format codes are available\n        self::fillBuiltInFormatCodes();\n\n        // Lookup format code\n        if (isset(self::$builtInFormats[$index])) {\n            return self::$builtInFormats[$index];\n        }\n\n        return '';\n    }\n\n    /**\n     * Get built-in format code index.\n     *\n     * @return false|int\n     */\n    public static function builtInFormatCodeIndex(string $formatCodeIndex)\n    {\n        // Ensure built-in format codes are available\n        self::fillBuiltInFormatCodes();\n\n        // Lookup format code\n        if (array_key_exists($formatCodeIndex, self::$flippedBuiltInFormats)) {\n            return self::$flippedBuiltInFormats[$formatCodeIndex];\n        }\n\n        return false;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHashCode();\n        }\n\n        return md5(\n            $this->formatCode\n            . $this->builtInFormatCode\n            . __CLASS__\n        );\n    }\n\n    /**\n     * Convert a value in a pre-defined format to a PHP string.\n     *\n     * @param null|bool|float|int|RichText|string $value Value to format\n     * @param string $format Format code: see = self::FORMAT_* for predefined values;\n     *                          or can be any valid MS Excel custom format string\n     * @param ?mixed[] $callBack Callback function for additional formatting of string\n     * @param bool $lessFloatPrecision If true, unstyled floats will be converted to a more human-friendly but less computationally accurate value\n     *\n     * @return string Formatted string\n     */\n    public static function toFormattedString(mixed $value, string $format, ?array $callBack = null, bool $lessFloatPrecision = false): string\n    {\n        return NumberFormat\\Formatter::toFormattedString($value, $format, $callBack, $lessFloatPrecision);\n    }\n\n    /** @return mixed[] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'formatCode', $this->getFormatCode());\n\n        return $exportedArray;\n    }\n\n    public static function getShortDateFormat(): string\n    {\n        return self::$shortDateFormat;\n    }\n\n    public static function setShortDateFormat(string $shortDateFormat): void\n    {\n        self::$shortDateFormat = $shortDateFormat;\n    }\n\n    public static function getLongDateFormat(): string\n    {\n        return self::$longDateFormat;\n    }\n\n    public static function setLongDateFormat(string $longDateFormat): void\n    {\n        self::$longDateFormat = $longDateFormat;\n    }\n\n    public static function getDateTimeFormat(): string\n    {\n        return self::$dateTimeFormat;\n    }\n\n    public static function setDateTimeFormat(string $dateTimeFormat): void\n    {\n        self::$dateTimeFormat = $dateTimeFormat;\n    }\n\n    public static function getTimeFormat(): string\n    {\n        return self::$timeFormat;\n    }\n\n    public static function setTimeFormat(string $timeFormat): void\n    {\n        self::$timeFormat = $timeFormat;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Protection.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nclass Protection extends Supervisor\n{\n    /** Protection styles */\n    const PROTECTION_INHERIT = 'inherit';\n    const PROTECTION_PROTECTED = 'protected';\n    const PROTECTION_UNPROTECTED = 'unprotected';\n\n    /**\n     * Locked.\n     */\n    protected ?string $locked = null;\n\n    /**\n     * Hidden.\n     */\n    protected ?string $hidden = null;\n\n    /**\n     * Create a new Protection.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     * @param bool $isConditional Flag indicating if this is a conditional style or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false, bool $isConditional = false)\n    {\n        // Supervisor?\n        parent::__construct($isSupervisor);\n\n        // Initialise values\n        if (!$isConditional) {\n            $this->locked = self::PROTECTION_INHERIT;\n            $this->hidden = self::PROTECTION_INHERIT;\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        /** @var Style $parent */\n        $parent = $this->parent;\n\n        return $parent->getSharedComponent()->getProtection();\n    }\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return array{protection: mixed[]}\n     */\n    public function getStyleArray(array $array): array\n    {\n        return ['protection' => $array];\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->getLocked()->applyFromArray(\n     *     [\n     *         'locked' => TRUE,\n     *         'hidden' => FALSE\n     *     ]\n     * );\n     * </code>\n     *\n     * @param array{locked?: string, hidden?: string} $styleArray Array containing style information\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray): static\n    {\n        if ($this->isSupervisor) {\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($styleArray));\n        } else {\n            if (isset($styleArray['locked'])) {\n                $this->setLocked($styleArray['locked']);\n            }\n            if (isset($styleArray['hidden'])) {\n                $this->setHidden($styleArray['hidden']);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get locked.\n     */\n    public function getLocked(): ?string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getLocked();\n        }\n\n        return $this->locked;\n    }\n\n    /**\n     * Set locked.\n     *\n     * @param string $lockType see self::PROTECTION_*\n     *\n     * @return $this\n     */\n    public function setLocked(string $lockType): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['locked' => $lockType]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->locked = $lockType;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get hidden.\n     */\n    public function getHidden(): ?string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHidden();\n        }\n\n        return $this->hidden;\n    }\n\n    /**\n     * Set hidden.\n     *\n     * @param string $hiddenType see self::PROTECTION_*\n     *\n     * @return $this\n     */\n    public function setHidden(string $hiddenType): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = $this->getStyleArray(['hidden' => $hiddenType]);\n            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);\n        } else {\n            $this->hidden = $hiddenType;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getHashCode();\n        }\n\n        return md5(\n            $this->locked\n            . $this->hidden\n            . __CLASS__\n        );\n    }\n\n    /** @return mixed[] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'locked', $this->getLocked());\n        $this->exportArray2($exportedArray, 'hidden', $this->getHidden());\n\n        return $exportedArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/RgbTint.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\n/**\n * Class to handle tint applied to color.\n * Code borrows heavily from some Python projects.\n *\n * @see https://docs.python.org/3/library/colorsys.html\n * @see https://gist.github.com/Mike-Honey/b36e651e9a7f1d2e1d60ce1c63b9b633\n */\nclass RgbTint\n{\n    private const ONE_THIRD = 1.0 / 3.0;\n    private const ONE_SIXTH = 1.0 / 6.0;\n    private const TWO_THIRD = 2.0 / 3.0;\n    private const RGBMAX = 255.0;\n    /**\n     * MS Excel's tint function expects that HLS is base 240.\n     *\n     * @see https://social.msdn.microsoft.com/Forums/en-US/e9d8c136-6d62-4098-9b1b-dac786149f43/excel-color-tint-algorithm-incorrect?forum=os_binaryfile#d3c2ac95-52e0-476b-86f1-e2a697f24969\n     */\n    private const HLSMAX = 240.0;\n\n    /**\n     * Convert red/green/blue to hue/luminance/saturation.\n     *\n     * @param float $red 0.0 through 1.0\n     * @param float $green 0.0 through 1.0\n     * @param float $blue 0.0 through 1.0\n     *\n     * @return float[]\n     */\n    private static function rgbToHls(float $red, float $green, float $blue): array\n    {\n        $maxc = max($red, $green, $blue);\n        $minc = min($red, $green, $blue);\n        $luminance = ($minc + $maxc) / 2.0;\n        if ($minc === $maxc) {\n            return [0.0, $luminance, 0.0];\n        }\n        $maxMinusMin = $maxc - $minc;\n        if ($luminance <= 0.5) {\n            $s = $maxMinusMin / ($maxc + $minc);\n        } else {\n            $s = $maxMinusMin / (2.0 - $maxc - $minc);\n        }\n        $rc = ($maxc - $red) / $maxMinusMin;\n        $gc = ($maxc - $green) / $maxMinusMin;\n        $bc = ($maxc - $blue) / $maxMinusMin;\n        if ($red === $maxc) {\n            $h = $bc - $gc;\n        } elseif ($green === $maxc) {\n            $h = 2.0 + $rc - $bc;\n        } else {\n            $h = 4.0 + $gc - $rc;\n        }\n        $h = self::positiveDecimalPart($h / 6.0);\n\n        return [$h, $luminance, $s];\n    }\n\n    /**\n     * Convert hue/luminance/saturation to red/green/blue.\n     *\n     * @param float $hue 0.0 through 1.0\n     * @param float $luminance 0.0 through 1.0\n     * @param float $saturation 0.0 through 1.0\n     *\n     * @return float[]\n     */\n    private static function hlsToRgb(float $hue, float $luminance, float $saturation): array\n    {\n        if ($saturation === 0.0) {\n            return [$luminance, $luminance, $luminance];\n        }\n        if ($luminance <= 0.5) {\n            $m2 = $luminance * (1.0 + $saturation);\n        } else {\n            $m2 = $luminance + $saturation - ($luminance * $saturation);\n        }\n        $m1 = 2.0 * $luminance - $m2;\n\n        return [\n            self::vFunction($m1, $m2, $hue + self::ONE_THIRD),\n            self::vFunction($m1, $m2, $hue),\n            self::vFunction($m1, $m2, $hue - self::ONE_THIRD),\n        ];\n    }\n\n    private static function vFunction(float $m1, float $m2, float $hue): float\n    {\n        $hue = self::positiveDecimalPart($hue);\n        if ($hue < self::ONE_SIXTH) {\n            return $m1 + ($m2 - $m1) * $hue * 6.0;\n        }\n        if ($hue < 0.5) {\n            return $m2;\n        }\n        if ($hue < self::TWO_THIRD) {\n            return $m1 + ($m2 - $m1) * (self::TWO_THIRD - $hue) * 6.0;\n        }\n\n        return $m1;\n    }\n\n    private static function positiveDecimalPart(float $hue): float\n    {\n        $hue = fmod($hue, 1.0);\n\n        return ($hue >= 0.0) ? $hue : (1.0 + $hue);\n    }\n\n    /**\n     * Convert red/green/blue to HLSMAX-based hue/luminance/saturation.\n     *\n     * @return int[]\n     */\n    private static function rgbToMsHls(int $red, int $green, int $blue): array\n    {\n        $red01 = $red / self::RGBMAX;\n        $green01 = $green / self::RGBMAX;\n        $blue01 = $blue / self::RGBMAX;\n        [$hue, $luminance, $saturation] = self::rgbToHls($red01, $green01, $blue01);\n\n        return [\n            (int) round($hue * self::HLSMAX),\n            (int) round($luminance * self::HLSMAX),\n            (int) round($saturation * self::HLSMAX),\n        ];\n    }\n\n    /**\n     * Converts HLSMAX based HLS values to rgb values in the range (0,1).\n     *\n     * @return float[]\n     */\n    private static function msHlsToRgb(int $hue, int $lightness, int $saturation): array\n    {\n        return self::hlsToRgb($hue / self::HLSMAX, $lightness / self::HLSMAX, $saturation / self::HLSMAX);\n    }\n\n    /**\n     * Tints HLSMAX based luminance.\n     *\n     * @see http://ciintelligence.blogspot.co.uk/2012/02/converting-excel-theme-color-and-tint.html\n     */\n    private static function tintLuminance(float $tint, float $luminance): int\n    {\n        if ($tint < 0) {\n            return (int) round($luminance * (1.0 + $tint));\n        }\n\n        return (int) round($luminance * (1.0 - $tint) + (self::HLSMAX - self::HLSMAX * (1.0 - $tint)));\n    }\n\n    /**\n     * Return result of tinting supplied rgb as 6 hex digits.\n     */\n    public static function rgbAndTintToRgb(int $red, int $green, int $blue, float $tint): string\n    {\n        [$hue, $luminance, $saturation] = self::rgbToMsHls($red, $green, $blue);\n        [$red, $green, $blue] = self::msHlsToRgb($hue, self::tintLuminance($tint, $luminance), $saturation);\n\n        return sprintf(\n            '%02X%02X%02X',\n            (int) round($red * self::RGBMAX),\n            (int) round($green * self::RGBMAX),\n            (int) round($blue * self::RGBMAX)\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Style.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Style extends Supervisor\n{\n    /**\n     * Font.\n     */\n    protected Font $font;\n\n    /**\n     * Fill.\n     */\n    protected Fill $fill;\n\n    /**\n     * Borders.\n     */\n    protected Borders $borders;\n\n    /**\n     * Alignment.\n     */\n    protected Alignment $alignment;\n\n    /**\n     * Number Format.\n     */\n    protected NumberFormat $numberFormat;\n\n    /**\n     * Protection.\n     */\n    protected Protection $protection;\n\n    /**\n     * Index of style in collection. Only used for real style.\n     */\n    protected int $index;\n\n    /**\n     * Use Quote Prefix when displaying in cell editor. Only used for real style.\n     */\n    protected bool $quotePrefix = false;\n\n    protected bool $checkBox = false;\n\n    /**\n     * Internal cache for styles\n     * Used when applying style on range of cells (column or row) and cleared when\n     * all cells in range is styled.\n     *\n     * PhpSpreadsheet will always minimize the amount of styles used. So cells with\n     * same styles will reference the same Style instance. To check if two styles\n     * are similar Style::getHashCode() is used. This call is expensive. To minimize\n     * the need to call this method we can cache the internal PHP object id of the\n     * Style in the range. Style::getHashCode() will then only be called when we\n     * encounter a unique style.\n     *\n     * @see Style::applyFromArray()\n     * @see Style::getHashCode()\n     *\n     * @var null|array<string, mixed[]>\n     */\n    private static ?array $cachedStyles = null;\n\n    /**\n     * Create a new Style.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *         Leave this value at default unless you understand exactly what\n     *    its ramifications are\n     * @param bool $isConditional Flag indicating if this is a conditional style or not\n     *       Leave this value at default unless you understand exactly what\n     *    its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false, bool $isConditional = false)\n    {\n        parent::__construct($isSupervisor);\n\n        // Initialise values\n        $this->font = new Font($isSupervisor, $isConditional);\n        $this->fill = new Fill($isSupervisor, $isConditional);\n        $this->borders = new Borders($isSupervisor, $isConditional);\n        $this->alignment = new Alignment($isSupervisor, $isConditional);\n        $this->numberFormat = new NumberFormat($isSupervisor, $isConditional);\n        $this->protection = new Protection($isSupervisor, $isConditional);\n\n        // bind parent if we are a supervisor\n        if ($isSupervisor) {\n            $this->font->bindParent($this);\n            $this->fill->bindParent($this);\n            $this->borders->bindParent($this);\n            $this->alignment->bindParent($this);\n            $this->numberFormat->bindParent($this);\n            $this->protection->bindParent($this);\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    public function getSharedComponent(): self\n    {\n        $activeSheet = $this->getActiveSheet();\n        $selectedCell = Functions::trimSheetFromCellReference($this->getActiveCell()); // e.g. 'A1'\n\n        if ($activeSheet->cellExists($selectedCell)) {\n            $xfIndex = $activeSheet->getCell($selectedCell)->getXfIndex();\n        } else {\n            $xfIndex = 0;\n        }\n\n        return $activeSheet->getParentOrThrow()->getCellXfByIndex($xfIndex);\n    }\n\n    /**\n     * Get parent. Only used for style supervisor.\n     */\n    public function getParent(): Spreadsheet\n    {\n        return $this->getActiveSheet()->getParentOrThrow();\n    }\n\n    private const REGEX_WHOLE_COLUMN = '/^[A-Z]+1:[A-Z]+'\n        . AddressRange::MAX_ROW\n        . '$/';\n    private const REGEX_WHOLE_ROW = '/^A\\d+:'\n        . AddressRange::MAX_COLUMN\n        . '\\d+$/';\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return array{quotePrefix: mixed[]}\n     */\n    public function getStyleArray(array $array): array\n    {\n        return ['quotePrefix' => $array];\n    }\n\n    /**\n     * Apply styles from array.\n     *\n     * <code>\n     * $spreadsheet->getActiveSheet()->getStyle('B2')->applyFromArray(\n     *     [\n     *         'font' => [\n     *             'name' => 'Arial',\n     *             'bold' => true,\n     *             'italic' => false,\n     *             'underline' => Font::UNDERLINE_DOUBLE,\n     *             'strikethrough' => false,\n     *             'color' => [\n     *                 'rgb' => '808080'\n     *             ]\n     *         ],\n     *         'borders' => [\n     *             'bottom' => [\n     *                 'borderStyle' => Border::BORDER_DASHDOT,\n     *                 'color' => [\n     *                     'rgb' => '808080'\n     *                 ]\n     *             ],\n     *             'top' => [\n     *                 'borderStyle' => Border::BORDER_DASHDOT,\n     *                 'color' => [\n     *                     'rgb' => '808080'\n     *                 ]\n     *             ]\n     *         ],\n     *         'alignment' => [\n     *             'horizontal' => Alignment::HORIZONTAL_CENTER,\n     *             'vertical' => Alignment::VERTICAL_CENTER,\n     *             'wrapText' => true,\n     *         ],\n     *         'quotePrefix'    => true\n     *     ]\n     * );\n     * </code>\n     *\n     * @param mixed[] $styleArray Array containing style information\n     * @param bool $advancedBorders advanced mode for setting borders\n     *\n     * @return $this\n     */\n    public function applyFromArray(array $styleArray, bool $advancedBorders = true): static\n    {\n        if ($this->isSupervisor) {\n            $pRange = $this->getSelectedCells();\n\n            // Uppercase coordinate and strip any Worksheet reference from the selected range\n            $pRange = strtoupper($pRange);\n            if (str_contains($pRange, '!')) {\n                $pRangeWorksheet = StringHelper::strToUpper(substr($pRange, 0, (int) strrpos($pRange, '!')));\n                $pRangeWorksheet = Worksheet::unApostrophizeTitle($pRangeWorksheet);\n                if ($pRangeWorksheet !== '' && StringHelper::strToUpper($this->getActiveSheet()->getTitle()) !== $pRangeWorksheet) {\n                    throw new Exception('Invalid Worksheet for specified Range');\n                }\n                $pRange = strtoupper(Functions::trimSheetFromCellReference($pRange));\n            }\n\n            // Is it a cell range or a single cell?\n            if (!str_contains($pRange, ':')) {\n                $rangeA = $pRange;\n                $rangeB = $pRange;\n            } else {\n                [$rangeA, $rangeB] = explode(':', $pRange);\n            }\n\n            // Calculate range outer borders\n            $rangeStart = Coordinate::coordinateFromString($rangeA);\n            $rangeEnd = Coordinate::coordinateFromString($rangeB);\n            $rangeStartIndexes = Coordinate::indexesFromString($rangeA);\n            $rangeEndIndexes = Coordinate::indexesFromString($rangeB);\n\n            $columnStart = $rangeStart[0];\n            $columnEnd = $rangeEnd[0];\n\n            // Make sure we can loop upwards on rows and columns\n            if ($rangeStartIndexes[0] > $rangeEndIndexes[0] && $rangeStartIndexes[1] > $rangeEndIndexes[1]) {\n                $tmp = $rangeStartIndexes;\n                $rangeStartIndexes = $rangeEndIndexes;\n                $rangeEndIndexes = $tmp;\n            }\n\n            // ADVANCED MODE:\n            if ($advancedBorders && isset($styleArray['borders'])) {\n                // 'allBorders' is a shorthand property for 'outline' and 'inside' and\n                //        it applies to components that have not been set explicitly\n                /** @var mixed[][] $styleArray */\n                if (isset($styleArray['borders']['allBorders'])) {\n                    foreach (['outline', 'inside'] as $component) {\n                        if (!isset($styleArray['borders'][$component])) {\n                            $styleArray['borders'][$component] = $styleArray['borders']['allBorders'];\n                        }\n                    }\n                    unset($styleArray['borders']['allBorders']); // not needed any more\n                }\n                // 'outline' is a shorthand property for 'top', 'right', 'bottom', 'left'\n                //        it applies to components that have not been set explicitly\n                if (isset($styleArray['borders']['outline'])) {\n                    foreach (['top', 'right', 'bottom', 'left'] as $component) {\n                        if (!isset($styleArray['borders'][$component])) {\n                            $styleArray['borders'][$component] = $styleArray['borders']['outline'];\n                        }\n                    }\n                    unset($styleArray['borders']['outline']); // not needed any more\n                }\n                // 'inside' is a shorthand property for 'vertical' and 'horizontal'\n                //        it applies to components that have not been set explicitly\n                if (isset($styleArray['borders']['inside'])) {\n                    foreach (['vertical', 'horizontal'] as $component) {\n                        if (!isset($styleArray['borders'][$component])) {\n                            $styleArray['borders'][$component] = $styleArray['borders']['inside'];\n                        }\n                    }\n                    unset($styleArray['borders']['inside']); // not needed any more\n                }\n                // width and height characteristics of selection, 1, 2, or 3 (for 3 or more)\n                $xMax = min($rangeEndIndexes[0] - $rangeStartIndexes[0] + 1, 3);\n                $yMax = min($rangeEndIndexes[1] - $rangeStartIndexes[1] + 1, 3);\n\n                // loop through up to 3 x 3 = 9 regions\n                for ($x = 1; $x <= $xMax; ++$x) {\n                    // start column index for region\n                    $colStart = ($x == 3)\n                        ? Coordinate::stringFromColumnIndex($rangeEndIndexes[0])\n                        : Coordinate::stringFromColumnIndex($rangeStartIndexes[0] + $x - 1);\n                    // end column index for region\n                    $colEnd = ($x == 1)\n                        ? Coordinate::stringFromColumnIndex($rangeStartIndexes[0])\n                        : Coordinate::stringFromColumnIndex($rangeEndIndexes[0] - $xMax + $x);\n\n                    for ($y = 1; $y <= $yMax; ++$y) {\n                        // which edges are touching the region\n                        $edges = [];\n                        if ($x == 1) {\n                            // are we at left edge\n                            $edges[] = 'left';\n                        }\n                        if ($x == $xMax) {\n                            // are we at right edge\n                            $edges[] = 'right';\n                        }\n                        if ($y == 1) {\n                            // are we at top edge?\n                            $edges[] = 'top';\n                        }\n                        if ($y == $yMax) {\n                            // are we at bottom edge?\n                            $edges[] = 'bottom';\n                        }\n\n                        // start row index for region\n                        $rowStart = ($y == 3)\n                            ? $rangeEndIndexes[1] : $rangeStartIndexes[1] + $y - 1;\n\n                        // end row index for region\n                        $rowEnd = ($y == 1)\n                            ? $rangeStartIndexes[1] : $rangeEndIndexes[1] - $yMax + $y;\n\n                        // build range for region\n                        $range = $colStart . $rowStart . ':' . $colEnd . $rowEnd;\n\n                        // retrieve relevant style array for region\n                        $regionStyles = $styleArray;\n                        unset($regionStyles['borders']['inside']);\n\n                        // what are the inner edges of the region when looking at the selection\n                        $innerEdges = array_diff(['top', 'right', 'bottom', 'left'], $edges);\n\n                        // inner edges that are not touching the region should take the 'inside' border properties if they have been set\n                        foreach ($innerEdges as $innerEdge) {\n                            switch ($innerEdge) {\n                                case 'top':\n                                case 'bottom':\n                                    /** @var mixed[][] $styleArray */\n                                    // should pick up 'horizontal' border property if set\n                                    if (isset($styleArray['borders']['horizontal'])) {\n                                        /** @var mixed[][] $regionStyles */\n                                        $regionStyles['borders'][$innerEdge]\n                                            = $styleArray['borders']['horizontal'];\n                                    } else {\n                                        /** @var mixed[][] $regionStyles */\n                                        unset($regionStyles['borders'][$innerEdge]);\n                                    }\n\n                                    break;\n                                case 'left':\n                                case 'right':\n                                    // should pick up 'vertical' border property if set\n                                    if (isset($styleArray['borders']['vertical'])) {\n                                        $regionStyles['borders'][$innerEdge] = $styleArray['borders']['vertical'];\n                                    } else {\n                                        unset($regionStyles['borders'][$innerEdge]);\n                                    }\n\n                                    break;\n                            }\n                        }\n\n                        // apply region style to region by calling applyFromArray() in simple mode\n                        $this->getActiveSheet()->getStyle($range)->applyFromArray($regionStyles, false);\n                    }\n                }\n\n                // restore initial cell selection range\n                $this->getActiveSheet()->getStyle($pRange);\n\n                return $this;\n            }\n\n            // SIMPLE MODE:\n            // Selection type, inspect\n            if (preg_match(self::REGEX_WHOLE_COLUMN, $pRange)) {\n                $selectionType = 'COLUMN';\n\n                // Enable caching of styles\n                self::$cachedStyles = ['hashByObjId' => [], 'styleByHash' => []];\n            } elseif (preg_match(self::REGEX_WHOLE_ROW, $pRange)) {\n                $selectionType = 'ROW';\n\n                // Enable caching of styles\n                self::$cachedStyles = ['hashByObjId' => [], 'styleByHash' => []];\n            } else {\n                $selectionType = 'CELL';\n            }\n\n            // First loop through columns, rows, or cells to find out which styles are affected by this operation\n            $oldXfIndexes = $this->getOldXfIndexes($selectionType, $rangeStartIndexes, $rangeEndIndexes, $columnStart, $columnEnd, $styleArray);\n\n            // clone each of the affected styles, apply the style array, and add the new styles to the workbook\n            $workbook = $this->getActiveSheet()->getParentOrThrow();\n            $newXfIndexes = [];\n            foreach ($oldXfIndexes as $oldXfIndex => $dummy) {\n                $style = $workbook->getCellXfByIndex($oldXfIndex);\n\n                // $cachedStyles is set when applying style for a range of cells, either column or row\n                if (self::$cachedStyles === null) {\n                    // Clone the old style and apply style-array\n                    $newStyle = clone $style;\n                    $newStyle->applyFromArray($styleArray);\n\n                    // Look for existing style we can use instead (reduce memory usage)\n                    $existingStyle = $workbook->getCellXfByHashCode($newStyle->getHashCode());\n                } else {\n                    // Style cache is stored by Style::getHashCode(). But calling this method is\n                    // expensive. So we cache the php obj id -> hash.\n                    $objId = spl_object_id($style);\n\n                    // Look for the original HashCode\n                    $styleHash = self::$cachedStyles['hashByObjId'][$objId] ?? null;\n                    if ($styleHash === null) {\n                        // This object_id is not cached, store the hashcode in case encounter again\n                        $styleHash = self::$cachedStyles['hashByObjId'][$objId] = $style->getHashCode();\n                    }\n\n                    // Find existing style by hash.\n                    /** @var string $styleHash */\n                    $existingStyle = self::$cachedStyles['styleByHash'][$styleHash] ?? null;\n\n                    if (!$existingStyle) {\n                        // The old style combined with the new style array is not cached, so we create it now\n                        $newStyle = clone $style;\n                        $newStyle->applyFromArray($styleArray);\n\n                        // Look for similar style in workbook to reduce memory usage\n                        $existingStyle = $workbook->getCellXfByHashCode($newStyle->getHashCode());\n\n                        // Cache the new style by original hashcode\n                        self::$cachedStyles['styleByHash'][$styleHash] = $existingStyle instanceof self ? $existingStyle : $newStyle;\n                    }\n                }\n\n                if ($existingStyle) {\n                    // there is already such cell Xf in our collection\n                    /** @var Style $existingStyle */\n                    $newXfIndexes[$oldXfIndex] = $existingStyle->getIndex();\n                } else {\n                    if (!isset($newStyle)) {\n                        // Handle bug in PHPStan, see https://github.com/phpstan/phpstan/issues/5805\n                        // $newStyle should always be defined.\n                        // This block might not be needed in the future\n                        // @codeCoverageIgnoreStart\n                        $newStyle = clone $style;\n                        $newStyle->applyFromArray($styleArray);\n                        // @codeCoverageIgnoreEnd\n                    }\n\n                    // we don't have such a cell Xf, need to add\n                    $workbook->addCellXf($newStyle);\n                    $newXfIndexes[$oldXfIndex] = $newStyle->getIndex();\n                }\n            }\n\n            // Loop through columns, rows, or cells again and update the XF index\n            switch ($selectionType) {\n                case 'COLUMN':\n                    for ($col = $rangeStartIndexes[0]; $col <= $rangeEndIndexes[0]; ++$col) {\n                        $columnDimension = $this->getActiveSheet()->getColumnDimensionByColumn($col);\n                        $oldXfIndex = $columnDimension->getXfIndex();\n                        /** @var int[] $newXfIndexes */\n                        $columnDimension->setXfIndex($newXfIndexes[$oldXfIndex]);\n                    }\n\n                    // Disable caching of styles\n                    self::$cachedStyles = null;\n\n                    break;\n                case 'ROW':\n                    for ($row = $rangeStartIndexes[1]; $row <= $rangeEndIndexes[1]; ++$row) {\n                        $rowDimension = $this->getActiveSheet()->getRowDimension($row);\n                        // row without explicit style should be formatted based on default style\n                        $oldXfIndex = $rowDimension->getXfIndex() ?? 0;\n                        /** @var int[] $newXfIndexes */\n                        $rowDimension->setXfIndex($newXfIndexes[$oldXfIndex]);\n                    }\n\n                    // Disable caching of styles\n                    self::$cachedStyles = null;\n\n                    break;\n                case 'CELL':\n                    for ($col = $rangeStartIndexes[0]; $col <= $rangeEndIndexes[0]; ++$col) {\n                        for ($row = $rangeStartIndexes[1]; $row <= $rangeEndIndexes[1]; ++$row) {\n                            $cell = $this->getActiveSheet()->getCell([$col, $row]);\n                            $oldXfIndex = $cell->getXfIndex();\n                            $cell->setXfIndex($newXfIndexes[$oldXfIndex]);\n                        }\n                    }\n\n                    break;\n            }\n        } else {\n            // not a supervisor, just apply the style array directly on style object\n            /** @var array{\n             * alignment?: mixed[],\n             * fill?: array{fillType?: string, rotation?: float, startColor?: array{rgb?: string, argb?: string}, endColor?: array{rgb?: string, argb?: string}, color?: array{rgb?: string, argb?: string}},\n             * font?: array{name?: string, latin?: string, eastAsian?: string, complexScript?: string, bold?: bool, italic?: bool, superscript?: bool, subscript?: bool, underline?: bool|string, strikethrough?: bool, color?: string[], size?: ?int, chartColor?: ChartColor, scheme?: string, cap?: string},\n             * borders?: mixed[][],\n             * numberFormat?: string[],\n             * protection?: array{locked?: string, hidden?: string},\n             * checkBox?: bool,\n             * quotePrefix?: bool} $styleArray */\n            if (isset($styleArray['checkBox'])) {\n                $this->checkBox = (bool) $styleArray['checkBox'];\n            }\n            if (isset($styleArray['fill'])) {\n                $this->getFill()\n                    ->applyFromArray($styleArray['fill']);\n            }\n            if (isset($styleArray['font'])) {\n                $this->getFont()\n                    ->applyFromArray($styleArray['font']);\n            }\n            if (isset($styleArray['borders'])) {\n                $this->getBorders()\n                    ->applyFromArray($styleArray['borders']);\n            }\n            if (isset($styleArray['alignment'])) {\n                $temp = $styleArray['alignment'];\n                $this->getAlignment()\n                    ->applyFromArray($temp);\n            }\n            if (isset($styleArray['numberFormat'])) {\n                $this->getNumberFormat()\n                    ->applyFromArray($styleArray['numberFormat']);\n            }\n            if (isset($styleArray['protection'])) {\n                $this->getProtection()\n                    ->applyFromArray($styleArray['protection']);\n            }\n            if (isset($styleArray['quotePrefix'])) {\n                $this->quotePrefix = $styleArray['quotePrefix'];\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * @param mixed[] $rangeStart\n     * @param mixed[] $rangeEnd\n     * @param mixed[] $styleArray\n     *\n     * @return mixed[]\n     */\n    private function getOldXfIndexes(string $selectionType, array $rangeStart, array $rangeEnd, string $columnStart, string $columnEnd, array $styleArray): array\n    {\n        $oldXfIndexes = [];\n        switch ($selectionType) {\n            case 'COLUMN':\n                for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n                    /** @var int $col */\n                    $oldXfIndexes[$this->getActiveSheet()->getColumnDimensionByColumn($col)->getXfIndex()] = true;\n                }\n                foreach ($this->getActiveSheet()->getColumnIterator($columnStart, $columnEnd) as $columnIterator) {\n                    $cellIterator = $columnIterator->getCellIterator();\n                    $cellIterator->setIterateOnlyExistingCells(true);\n                    foreach ($cellIterator as $columnCell) {\n                        $columnCell->getStyle()\n                            ->applyFromArray($styleArray);\n                    }\n                }\n\n                break;\n            case 'ROW':\n                for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n                    /** @var int $row */\n                    if ($this->getActiveSheet()->getRowDimension($row)->getXfIndex() === null) {\n                        $oldXfIndexes[0] = true; // row without explicit style should be formatted based on default style\n                    } else {\n                        $oldXfIndexes[$this->getActiveSheet()->getRowDimension($row)->getXfIndex()] = true;\n                    }\n                }\n                /** @var float|int */\n                $temp1 = $rangeStart[1];\n                /** @var float|int */\n                $temp2 = $rangeEnd[1];\n                foreach ($this->getActiveSheet()->getRowIterator((int) $temp1, (int) $temp2) as $rowIterator) {\n                    $cellIterator = $rowIterator->getCellIterator();\n                    $cellIterator->setIterateOnlyExistingCells(true);\n                    foreach ($cellIterator as $rowCell) {\n                        $rowCell->getStyle()\n                            ->applyFromArray($styleArray);\n                    }\n                }\n\n                break;\n            case 'CELL':\n                for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n                    /** @var int $col */\n                    for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n                        /** @var int $row */\n                        $oldXfIndexes[$this->getActiveSheet()->getCell([$col, $row])->getXfIndex()] = true;\n                    }\n                }\n\n                break;\n        }\n\n        return $oldXfIndexes;\n    }\n\n    /**\n     * Get Fill.\n     */\n    public function getFill(): Fill\n    {\n        return $this->fill;\n    }\n\n    /**\n     * Get Font.\n     */\n    public function getFont(): Font\n    {\n        return $this->font;\n    }\n\n    /**\n     * Set font.\n     *\n     * @return $this\n     */\n    public function setFont(Font $font): static\n    {\n        $this->font = $font;\n\n        return $this;\n    }\n\n    /**\n     * Get Borders.\n     */\n    public function getBorders(): Borders\n    {\n        return $this->borders;\n    }\n\n    /**\n     * Get Alignment.\n     */\n    public function getAlignment(): Alignment\n    {\n        return $this->alignment;\n    }\n\n    /**\n     * Get Number Format.\n     */\n    public function getNumberFormat(): NumberFormat\n    {\n        return $this->numberFormat;\n    }\n\n    /**\n     * Get Conditional Styles. Only used on supervisor.\n     *\n     * @return Conditional[]\n     */\n    public function getConditionalStyles(): array\n    {\n        return $this->getActiveSheet()->getConditionalStyles($this->getActiveCell());\n    }\n\n    /**\n     * Set Conditional Styles. Only used on supervisor.\n     *\n     * @param Conditional[] $conditionalStyleArray Array of conditional styles\n     *\n     * @return $this\n     */\n    public function setConditionalStyles(array $conditionalStyleArray): static\n    {\n        $this->getActiveSheet()->setConditionalStyles($this->getSelectedCells(), $conditionalStyleArray);\n\n        return $this;\n    }\n\n    /**\n     * Get Protection.\n     */\n    public function getProtection(): Protection\n    {\n        return $this->protection;\n    }\n\n    /**\n     * Get quote prefix.\n     */\n    public function getQuotePrefix(): bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getQuotePrefix();\n        }\n\n        return $this->quotePrefix;\n    }\n\n    /**\n     * Set quote prefix.\n     *\n     * @return $this\n     */\n    public function setQuotePrefix(bool $quotePrefix): static\n    {\n        if ($quotePrefix == '') {\n            $quotePrefix = false;\n        }\n        if ($this->isSupervisor) {\n            $styleArray = ['quotePrefix' => $quotePrefix];\n            $this->getActiveSheet()\n                ->getStyle($this->getSelectedCells())\n                ->applyFromArray($styleArray);\n        } else {\n            $this->quotePrefix = (bool) $quotePrefix;\n        }\n\n        return $this;\n    }\n\n    public function getCheckBox(): bool\n    {\n        if ($this->isSupervisor) {\n            return $this->getSharedComponent()->getCheckBox();\n        }\n\n        return $this->checkBox;\n    }\n\n    public function setCheckBox(bool $checkBox): static\n    {\n        if ($this->isSupervisor) {\n            $styleArray = ['checkBox' => $checkBox];\n            $this->getActiveSheet()\n                ->getStyle($this->getSelectedCells())\n                ->applyFromArray($styleArray);\n        } else {\n            $this->checkBox = $checkBox;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->fill->getHashCode()\n            . $this->font->getHashCode()\n            . $this->borders->getHashCode()\n            . $this->alignment->getHashCode()\n            . $this->numberFormat->getHashCode()\n            . $this->protection->getHashCode()\n            . ($this->quotePrefix ? 't' : 'f')\n            . ($this->checkBox ? 't' : 'f')\n            . __CLASS__\n        );\n    }\n\n    /**\n     * Get own index in style collection.\n     */\n    public function getIndex(): int\n    {\n        return $this->index;\n    }\n\n    /**\n     * Set own index in style collection.\n     */\n    public function setIndex(int $index): void\n    {\n        $this->index = $index;\n    }\n\n    /** @return mixed[] */\n    protected function exportArray1(): array\n    {\n        $exportedArray = [];\n        $this->exportArray2($exportedArray, 'alignment', $this->getAlignment());\n        $this->exportArray2($exportedArray, 'borders', $this->getBorders());\n        $this->exportArray2($exportedArray, 'fill', $this->getFill());\n        $this->exportArray2($exportedArray, 'font', $this->getFont());\n        $this->exportArray2($exportedArray, 'numberFormat', $this->getNumberFormat());\n        $this->exportArray2($exportedArray, 'protection', $this->getProtection());\n        $this->exportArray2($exportedArray, 'quotePrefix', $this->getQuotePrefix());\n\n        return $exportedArray;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Style/Supervisor.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\IComparable;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nabstract class Supervisor implements IComparable\n{\n    /**\n     * Supervisor?\n     */\n    protected bool $isSupervisor;\n\n    /**\n     * Parent. Only used for supervisor.\n     *\n     * @var Spreadsheet|Supervisor\n     */\n    protected $parent;\n\n    /**\n     * Parent property name.\n     */\n    protected ?string $parentPropertyName = null;\n\n    /**\n     * Create a new Supervisor.\n     *\n     * @param bool $isSupervisor Flag indicating if this is a supervisor or not\n     *                                    Leave this value at default unless you understand exactly what\n     *                                        its ramifications are\n     */\n    public function __construct(bool $isSupervisor = false)\n    {\n        // Supervisor?\n        $this->isSupervisor = $isSupervisor;\n    }\n\n    /**\n     * Bind parent. Only used for supervisor.\n     *\n     * @return $this\n     */\n    public function bindParent(Spreadsheet|self $parent, ?string $parentPropertyName = null)\n    {\n        $this->parent = $parent;\n        $this->parentPropertyName = $parentPropertyName;\n\n        return $this;\n    }\n\n    /**\n     * Is this a supervisor or a cell style component?\n     */\n    public function getIsSupervisor(): bool\n    {\n        return $this->isSupervisor;\n    }\n\n    /**\n     * Get the currently active sheet. Only used for supervisor.\n     */\n    public function getActiveSheet(): Worksheet\n    {\n        return $this->parent->getActiveSheet();\n    }\n\n    /**\n     * Get the currently active cell coordinate in currently active sheet.\n     * Only used for supervisor.\n     *\n     * @return string E.g. 'A1'\n     */\n    public function getSelectedCells(): string\n    {\n        return $this->getActiveSheet()->getSelectedCells();\n    }\n\n    /**\n     * Get the currently active cell coordinate in currently active sheet.\n     * Only used for supervisor.\n     *\n     * @return string E.g. 'A1'\n     */\n    public function getActiveCell(): string\n    {\n        return $this->getActiveSheet()->getActiveCell();\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if ((is_object($value)) && ($key != 'parent')) {\n                $this->$key = clone $value;\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n\n    /**\n     * Export style as array.\n     *\n     * Available to anything which extends this class:\n     * Alignment, Border, Borders, Color, Fill, Font,\n     * NumberFormat, Protection, and Style.\n     *\n     * @return mixed[]\n     */\n    final public function exportArray(): array\n    {\n        return $this->exportArray1();\n    }\n\n    /**\n     * Abstract method to be implemented in anything which\n     * extends this class.\n     *\n     * This method invokes exportArray2 with the names and values\n     * of all properties to be included in output array,\n     * returning that array to exportArray, then to caller.\n     *\n     * @return mixed[]\n     */\n    abstract protected function exportArray1(): array;\n\n    /**\n     * Populate array from exportArray1.\n     * This method is available to anything which extends this class.\n     * The parameter index is the key to be added to the array.\n     * The parameter objOrValue is either a primitive type,\n     * which is the value added to the array,\n     * or a Style object to be recursively added via exportArray.\n     *\n     * @param mixed[] $exportedArray\n     */\n    final protected function exportArray2(array &$exportedArray, string $index, mixed $objOrValue): void\n    {\n        if ($objOrValue instanceof self) {\n            $exportedArray[$index] = $objOrValue->exportArray();\n        } else {\n            $exportedArray[$index] = $objOrValue;\n        }\n    }\n\n    /**\n     * Get the shared style component for the currently active cell in currently active sheet.\n     * Only used for style supervisor.\n     */\n    abstract public function getSharedComponent(): mixed;\n\n    /**\n     * Build style array from subcomponents.\n     *\n     * @param mixed[] $array\n     *\n     * @return mixed[]\n     */\n    abstract public function getStyleArray(array $array): array;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Theme.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet;\n\nclass Theme\n{\n    private string $themeColorName = 'Office';\n\n    private string $themeFontName = 'Office';\n\n    public const HYPERLINK_THEME = 10;\n    public const COLOR_SCHEME_2013_2022_NAME = 'Office 2013-2022';\n    public const COLOR_SCHEME_2013_2022 = [\n        'dk1' => '000000',\n        'lt1' => 'FFFFFF',\n        'dk2' => '44546A',\n        'lt2' => 'E7E6E6',\n        'accent1' => '4472C4',\n        'accent2' => 'ED7D31',\n        'accent3' => 'A5A5A5',\n        'accent4' => 'FFC000',\n        'accent5' => '5B9BD5',\n        'accent6' => '70AD47',\n        'hlink' => '0563C1',\n        'folHlink' => '954F72',\n    ];\n    private const COLOR_SCHEME_2013_PLUS_NAME = 'Office 2013+';\n\n    public const COLOR_SCHEME_2007_2010_NAME = 'Office 2007-2010';\n    public const COLOR_SCHEME_2007_2010 = [\n        'dk1' => '000000',\n        'lt1' => 'FFFFFF',\n        'dk2' => '1F497D',\n        'lt2' => 'EEECE1',\n        'accent1' => '4F81BD',\n        'accent2' => 'C0504D',\n        'accent3' => '9BBB59',\n        'accent4' => '8064A2',\n        'accent5' => '4BACC6',\n        'accent6' => 'F79646',\n        'hlink' => '0000FF',\n        'folHlink' => '800080',\n    ];\n\n    public const COLOR_SCHEME_2023_PLUS_NAME = 'Office 2023+';\n    public const COLOR_SCHEME_2023_PLUS = [\n        'dk1' => '000000',\n        'lt1' => 'FFFFFF',\n        'dk2' => '0E2841',\n        'lt2' => 'E8E8E8',\n        'accent1' => '156082',\n        'accent2' => 'E97132',\n        'accent3' => '196B24',\n        'accent4' => '0F9ED5',\n        'accent5' => 'A02B93',\n        'accent6' => '4EA72E',\n        'hlink' => '467886',\n        'folHlink' => '96607D',\n    ];\n\n    /** @var string[] */\n    private array $themeColors = self::COLOR_SCHEME_2007_2010;\n\n    private string $majorFontLatin = 'Cambria';\n\n    private string $majorFontEastAsian = '';\n\n    private string $majorFontComplexScript = '';\n\n    private string $minorFontLatin = 'Calibri';\n\n    private string $minorFontEastAsian = '';\n\n    private string $minorFontComplexScript = '';\n\n    /**\n     * Map of Major (header) fonts to write.\n     *\n     * @var string[]\n     */\n    private array $majorFontSubstitutions = self::FONTS_TIMES_SUBSTITUTIONS;\n\n    /**\n     * Map of Minor (body) fonts to write.\n     *\n     * @var string[]\n     */\n    private array $minorFontSubstitutions = self::FONTS_ARIAL_SUBSTITUTIONS;\n\n    public const FONTS_TIMES_SUBSTITUTIONS = [\n        'Jpan' => 'ＭＳ Ｐゴシック',\n        'Hang' => '맑은 고딕',\n        'Hans' => '宋体',\n        'Hant' => '新細明體',\n        'Arab' => 'Times New Roman',\n        'Hebr' => 'Times New Roman',\n        'Thai' => 'Tahoma',\n        'Ethi' => 'Nyala',\n        'Beng' => 'Vrinda',\n        'Gujr' => 'Shruti',\n        'Khmr' => 'MoolBoran',\n        'Knda' => 'Tunga',\n        'Guru' => 'Raavi',\n        'Cans' => 'Euphemia',\n        'Cher' => 'Plantagenet Cherokee',\n        'Yiii' => 'Microsoft Yi Baiti',\n        'Tibt' => 'Microsoft Himalaya',\n        'Thaa' => 'MV Boli',\n        'Deva' => 'Mangal',\n        'Telu' => 'Gautami',\n        'Taml' => 'Latha',\n        'Syrc' => 'Estrangelo Edessa',\n        'Orya' => 'Kalinga',\n        'Mlym' => 'Kartika',\n        'Laoo' => 'DokChampa',\n        'Sinh' => 'Iskoola Pota',\n        'Mong' => 'Mongolian Baiti',\n        'Viet' => 'Times New Roman',\n        'Uigh' => 'Microsoft Uighur',\n        'Geor' => 'Sylfaen',\n    ];\n\n    public const FONTS_ARIAL_SUBSTITUTIONS = [\n        'Jpan' => 'ＭＳ Ｐゴシック',\n        'Hang' => '맑은 고딕',\n        'Hans' => '宋体',\n        'Hant' => '新細明體',\n        'Arab' => 'Arial',\n        'Hebr' => 'Arial',\n        'Thai' => 'Tahoma',\n        'Ethi' => 'Nyala',\n        'Beng' => 'Vrinda',\n        'Gujr' => 'Shruti',\n        'Khmr' => 'DaunPenh',\n        'Knda' => 'Tunga',\n        'Guru' => 'Raavi',\n        'Cans' => 'Euphemia',\n        'Cher' => 'Plantagenet Cherokee',\n        'Yiii' => 'Microsoft Yi Baiti',\n        'Tibt' => 'Microsoft Himalaya',\n        'Thaa' => 'MV Boli',\n        'Deva' => 'Mangal',\n        'Telu' => 'Gautami',\n        'Taml' => 'Latha',\n        'Syrc' => 'Estrangelo Edessa',\n        'Orya' => 'Kalinga',\n        'Mlym' => 'Kartika',\n        'Laoo' => 'DokChampa',\n        'Sinh' => 'Iskoola Pota',\n        'Mong' => 'Mongolian Baiti',\n        'Viet' => 'Arial',\n        'Uigh' => 'Microsoft Uighur',\n        'Geor' => 'Sylfaen',\n    ];\n\n    /** @return string[] */\n    public function getThemeColors(): array\n    {\n        return $this->themeColors;\n    }\n\n    public function setThemeColor(string $key, string $value): self\n    {\n        $this->themeColors[$key] = $value;\n\n        return $this;\n    }\n\n    public function getThemeColorName(): string\n    {\n        return $this->themeColorName;\n    }\n\n    /** @param null|string[] $themeColors */\n    public function setThemeColorName(string $name, ?array $themeColors = null, ?Spreadsheet $spreadsheet = null): self\n    {\n        if ($name === self::COLOR_SCHEME_2013_PLUS_NAME) {\n            // Ensure against this value being found in\n            // spreadsheets created while constant was public.\n            $name = self::COLOR_SCHEME_2013_2022_NAME;\n        }\n        $this->themeColorName = $name;\n        if ($name === self::COLOR_SCHEME_2007_2010_NAME) {\n            $themeColors = $themeColors ?? self::COLOR_SCHEME_2007_2010;\n            $this->majorFontLatin = 'Cambria';\n            $this->minorFontLatin = 'Calibri';\n        } elseif ($name === self::COLOR_SCHEME_2013_2022_NAME) {\n            $themeColors = $themeColors ?? self::COLOR_SCHEME_2013_2022;\n            $this->majorFontLatin = 'Calibri Light';\n            $this->minorFontLatin = 'Calibri';\n        } elseif ($name === self::COLOR_SCHEME_2023_PLUS_NAME) {\n            $themeColors = $themeColors ?? self::COLOR_SCHEME_2023_PLUS;\n            $this->majorFontLatin = 'Aptos Display';\n            $this->minorFontLatin = 'Aptos Narrow';\n        }\n        if ($themeColors !== null) {\n            $this->themeColors = $themeColors;\n        }\n        if ($spreadsheet !== null) {\n            $spreadsheet->getDefaultStyle()->getFont()\n                ->applyThemeFonts($this);\n        }\n\n        return $this;\n    }\n\n    public function getMajorFontLatin(): string\n    {\n        return $this->majorFontLatin;\n    }\n\n    public function getMajorFontEastAsian(): string\n    {\n        return $this->majorFontEastAsian;\n    }\n\n    public function getMajorFontComplexScript(): string\n    {\n        return $this->majorFontComplexScript;\n    }\n\n    /** @return string[] */\n    public function getMajorFontSubstitutions(): array\n    {\n        return $this->majorFontSubstitutions;\n    }\n\n    /** @param null|string[] $substitutions */\n    public function setMajorFontValues(?string $latin, ?string $eastAsian, ?string $complexScript, ?array $substitutions): self\n    {\n        if (!empty($latin)) {\n            $this->majorFontLatin = $latin;\n        }\n        if ($eastAsian !== null) {\n            $this->majorFontEastAsian = $eastAsian;\n        }\n        if ($complexScript !== null) {\n            $this->majorFontComplexScript = $complexScript;\n        }\n        if ($substitutions !== null) {\n            $this->majorFontSubstitutions = $substitutions;\n        }\n\n        return $this;\n    }\n\n    public function getMinorFontLatin(): string\n    {\n        return $this->minorFontLatin;\n    }\n\n    public function getMinorFontEastAsian(): string\n    {\n        return $this->minorFontEastAsian;\n    }\n\n    public function getMinorFontComplexScript(): string\n    {\n        return $this->minorFontComplexScript;\n    }\n\n    /** @return string[] */\n    public function getMinorFontSubstitutions(): array\n    {\n        return $this->minorFontSubstitutions;\n    }\n\n    /** @param null|string[] $substitutions */\n    public function setMinorFontValues(?string $latin, ?string $eastAsian, ?string $complexScript, ?array $substitutions): self\n    {\n        if (!empty($latin)) {\n            $this->minorFontLatin = $latin;\n        }\n        if ($eastAsian !== null) {\n            $this->minorFontEastAsian = $eastAsian;\n        }\n        if ($complexScript !== null) {\n            $this->minorFontComplexScript = $complexScript;\n        }\n        if ($substitutions !== null) {\n            $this->minorFontSubstitutions = $substitutions;\n        }\n\n        return $this;\n    }\n\n    public function getThemeFontName(): string\n    {\n        return $this->themeFontName;\n    }\n\n    public function setThemeFontName(?string $name): self\n    {\n        if (!empty($name)) {\n            $this->themeFontName = $name;\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\n\nclass Rule\n{\n    const AUTOFILTER_RULETYPE_FILTER = 'filter';\n    const AUTOFILTER_RULETYPE_DATEGROUP = 'dateGroupItem';\n    const AUTOFILTER_RULETYPE_CUSTOMFILTER = 'customFilter';\n    const AUTOFILTER_RULETYPE_DYNAMICFILTER = 'dynamicFilter';\n    const AUTOFILTER_RULETYPE_TOPTENFILTER = 'top10Filter';\n\n    private const RULE_TYPES = [\n        //    Currently we're not handling\n        //        colorFilter\n        //        extLst\n        //        iconFilter\n        self::AUTOFILTER_RULETYPE_FILTER,\n        self::AUTOFILTER_RULETYPE_DATEGROUP,\n        self::AUTOFILTER_RULETYPE_CUSTOMFILTER,\n        self::AUTOFILTER_RULETYPE_DYNAMICFILTER,\n        self::AUTOFILTER_RULETYPE_TOPTENFILTER,\n    ];\n\n    const AUTOFILTER_RULETYPE_DATEGROUP_YEAR = 'year';\n    const AUTOFILTER_RULETYPE_DATEGROUP_MONTH = 'month';\n    const AUTOFILTER_RULETYPE_DATEGROUP_DAY = 'day';\n    const AUTOFILTER_RULETYPE_DATEGROUP_HOUR = 'hour';\n    const AUTOFILTER_RULETYPE_DATEGROUP_MINUTE = 'minute';\n    const AUTOFILTER_RULETYPE_DATEGROUP_SECOND = 'second';\n\n    private const DATE_TIME_GROUPS = [\n        self::AUTOFILTER_RULETYPE_DATEGROUP_YEAR,\n        self::AUTOFILTER_RULETYPE_DATEGROUP_MONTH,\n        self::AUTOFILTER_RULETYPE_DATEGROUP_DAY,\n        self::AUTOFILTER_RULETYPE_DATEGROUP_HOUR,\n        self::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE,\n        self::AUTOFILTER_RULETYPE_DATEGROUP_SECOND,\n    ];\n\n    const AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY = 'yesterday';\n    const AUTOFILTER_RULETYPE_DYNAMIC_TODAY = 'today';\n    const AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW = 'tomorrow';\n    const AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE = 'yearToDate';\n    const AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR = 'thisYear';\n    const AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER = 'thisQuarter';\n    const AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH = 'thisMonth';\n    const AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK = 'thisWeek';\n    const AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR = 'lastYear';\n    const AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER = 'lastQuarter';\n    const AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH = 'lastMonth';\n    const AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK = 'lastWeek';\n    const AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR = 'nextYear';\n    const AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER = 'nextQuarter';\n    const AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH = 'nextMonth';\n    const AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK = 'nextWeek';\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1 = 'M1';\n    const AUTOFILTER_RULETYPE_DYNAMIC_JANUARY = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2 = 'M2';\n    const AUTOFILTER_RULETYPE_DYNAMIC_FEBRUARY = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3 = 'M3';\n    const AUTOFILTER_RULETYPE_DYNAMIC_MARCH = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4 = 'M4';\n    const AUTOFILTER_RULETYPE_DYNAMIC_APRIL = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5 = 'M5';\n    const AUTOFILTER_RULETYPE_DYNAMIC_MAY = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6 = 'M6';\n    const AUTOFILTER_RULETYPE_DYNAMIC_JUNE = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7 = 'M7';\n    const AUTOFILTER_RULETYPE_DYNAMIC_JULY = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8 = 'M8';\n    const AUTOFILTER_RULETYPE_DYNAMIC_AUGUST = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9 = 'M9';\n    const AUTOFILTER_RULETYPE_DYNAMIC_SEPTEMBER = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10 = 'M10';\n    const AUTOFILTER_RULETYPE_DYNAMIC_OCTOBER = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11 = 'M11';\n    const AUTOFILTER_RULETYPE_DYNAMIC_NOVEMBER = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11;\n    const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12 = 'M12';\n    const AUTOFILTER_RULETYPE_DYNAMIC_DECEMBER = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12;\n    const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1 = 'Q1';\n    const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2 = 'Q2';\n    const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3 = 'Q3';\n    const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4 = 'Q4';\n    const AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE = 'aboveAverage';\n    const AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE = 'belowAverage';\n\n    private const DYNAMIC_TYPES = [\n        self::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_TODAY,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE,\n        self::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE,\n    ];\n\n    // Filter rule operators for filter and customFilter types.\n    const AUTOFILTER_COLUMN_RULE_EQUAL = 'equal';\n    const AUTOFILTER_COLUMN_RULE_NOTEQUAL = 'notEqual';\n    const AUTOFILTER_COLUMN_RULE_GREATERTHAN = 'greaterThan';\n    const AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL = 'greaterThanOrEqual';\n    const AUTOFILTER_COLUMN_RULE_LESSTHAN = 'lessThan';\n    const AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL = 'lessThanOrEqual';\n\n    private const OPERATORS = [\n        self::AUTOFILTER_COLUMN_RULE_EQUAL,\n        self::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n        self::AUTOFILTER_COLUMN_RULE_GREATERTHAN,\n        self::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL,\n        self::AUTOFILTER_COLUMN_RULE_LESSTHAN,\n        self::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL,\n    ];\n\n    const AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE = 'byValue';\n    const AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT = 'byPercent';\n\n    private const TOP_TEN_VALUE = [\n        self::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE,\n        self::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT,\n    ];\n\n    const AUTOFILTER_COLUMN_RULE_TOPTEN_TOP = 'top';\n    const AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM = 'bottom';\n\n    private const TOP_TEN_TYPE = [\n        self::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP,\n        self::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM,\n    ];\n\n    //  Unimplemented Rule Operators (Numeric, Boolean etc)\n    //    const AUTOFILTER_COLUMN_RULE_BETWEEN = 'between';        //    greaterThanOrEqual 1 && lessThanOrEqual 2\n    // Rule Operators (Numeric Special) which are translated to standard numeric operators with calculated values\n    // Rule Operators (String) which are set as wild-carded values\n    //    const AUTOFILTER_COLUMN_RULE_BEGINSWITH            = 'beginsWith';            // A*\n    //    const AUTOFILTER_COLUMN_RULE_ENDSWITH            = 'endsWith';            // *Z\n    //    const AUTOFILTER_COLUMN_RULE_CONTAINS            = 'contains';            // *B*\n    //    const AUTOFILTER_COLUMN_RULE_DOESNTCONTAIN        = 'notEqual';            //    notEqual *B*\n    // Rule Operators (Date Special) which are translated to standard numeric operators with calculated values\n    //    const AUTOFILTER_COLUMN_RULE_BEFORE                = 'lessThan';\n    //    const AUTOFILTER_COLUMN_RULE_AFTER                = 'greaterThan';\n    /**\n     * Autofilter Column.\n     */\n    private ?Column $parent;\n\n    /**\n     * Autofilter Rule Type.\n     */\n    private string $ruleType = self::AUTOFILTER_RULETYPE_FILTER;\n\n    /**\n     * Autofilter Rule Value.\n     *\n     * @var int|int[]|string|string[]\n     */\n    private $value = '';\n\n    /**\n     * Autofilter Rule Operator.\n     */\n    private string $operator = self::AUTOFILTER_COLUMN_RULE_EQUAL;\n\n    /**\n     * DateTimeGrouping Group Value.\n     */\n    private string $grouping = '';\n\n    /**\n     * Create a new Rule.\n     */\n    public function __construct(?Column $parent = null)\n    {\n        $this->parent = $parent;\n    }\n\n    private function setEvaluatedFalse(): void\n    {\n        if ($this->parent !== null) {\n            $this->parent->setEvaluatedFalse();\n        }\n    }\n\n    /**\n     * Get AutoFilter Rule Type.\n     */\n    public function getRuleType(): string\n    {\n        return $this->ruleType;\n    }\n\n    /**\n     * Set AutoFilter Rule Type.\n     *\n     * @param string $ruleType see self::AUTOFILTER_RULETYPE_*\n     *\n     * @return $this\n     */\n    public function setRuleType(string $ruleType): static\n    {\n        $this->setEvaluatedFalse();\n        if (!in_array($ruleType, self::RULE_TYPES)) {\n            throw new PhpSpreadsheetException('Invalid rule type for column AutoFilter Rule.');\n        }\n\n        $this->ruleType = $ruleType;\n\n        return $this;\n    }\n\n    /**\n     * Get AutoFilter Rule Value.\n     *\n     * @return int|int[]|string|string[]\n     */\n    public function getValue()\n    {\n        return $this->value;\n    }\n\n    /**\n     * Set AutoFilter Rule Value.\n     *\n     * @param int|int[]|string|string[] $value\n     *\n     * @return $this\n     */\n    public function setValue($value): static\n    {\n        $this->setEvaluatedFalse();\n        if (is_array($value)) {\n            $grouping = -1;\n            foreach ($value as $key => $v) {\n                //    Validate array entries\n                if (!in_array($key, self::DATE_TIME_GROUPS)) {\n                    //    Remove any invalid entries from the value array\n                    unset($value[$key]);\n                } else {\n                    //    Work out what the dateTime grouping will be\n                    $grouping = max($grouping, array_search($key, self::DATE_TIME_GROUPS));\n                }\n            }\n            if (count($value) == 0) {\n                throw new PhpSpreadsheetException('Invalid rule value for column AutoFilter Rule.');\n            }\n            //    Set the dateTime grouping that we've anticipated\n            //    I have no idea what Phpstan is complaining about below\n            $this->setGrouping(self::DATE_TIME_GROUPS[$grouping]); // @phpstan-ignore-line\n        }\n        $this->value = $value;\n\n        return $this;\n    }\n\n    /**\n     * Get AutoFilter Rule Operator.\n     */\n    public function getOperator(): string\n    {\n        return $this->operator;\n    }\n\n    /**\n     * Set AutoFilter Rule Operator.\n     *\n     * @param string $operator see self::AUTOFILTER_COLUMN_RULE_*\n     *\n     * @return $this\n     */\n    public function setOperator(string $operator): static\n    {\n        $this->setEvaluatedFalse();\n        if (empty($operator)) {\n            $operator = self::AUTOFILTER_COLUMN_RULE_EQUAL;\n        }\n        if (\n            (!in_array($operator, self::OPERATORS))\n            && (!in_array($operator, self::TOP_TEN_VALUE))\n        ) {\n            throw new PhpSpreadsheetException('Invalid operator for column AutoFilter Rule.');\n        }\n        $this->operator = $operator;\n\n        return $this;\n    }\n\n    /**\n     * Get AutoFilter Rule Grouping.\n     */\n    public function getGrouping(): string\n    {\n        return $this->grouping;\n    }\n\n    /**\n     * Set AutoFilter Rule Grouping.\n     *\n     * @return $this\n     */\n    public function setGrouping(string $grouping): static\n    {\n        $this->setEvaluatedFalse();\n        if (\n            (!in_array($grouping, self::DATE_TIME_GROUPS))\n            && (!in_array($grouping, self::DYNAMIC_TYPES))\n            && (!in_array($grouping, self::TOP_TEN_TYPE))\n        ) {\n            throw new PhpSpreadsheetException('Invalid grouping for column AutoFilter Rule.');\n        }\n        $this->grouping = $grouping;\n\n        return $this;\n    }\n\n    /**\n     * Set AutoFilter Rule.\n     *\n     * @param string $operator see self::AUTOFILTER_COLUMN_RULE_*\n     * @param int|int[]|string|string[] $value\n     *\n     * @return $this\n     */\n    public function setRule(string $operator, $value, ?string $grouping = null): static\n    {\n        $this->setEvaluatedFalse();\n        $this->setOperator($operator);\n        $this->setValue($value);\n        //  Only set grouping if it's been passed in as a user-supplied argument,\n        //      otherwise we're calculating it when we setValue() and don't want to overwrite that\n        //      If the user supplies an argument for grouping, then on their own head be it\n        if ($grouping !== null) {\n            $this->setGrouping($grouping);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get this Rule's AutoFilter Column Parent.\n     */\n    public function getParent(): ?Column\n    {\n        return $this->parent;\n    }\n\n    /**\n     * Set this Rule's AutoFilter Column Parent.\n     *\n     * @return $this\n     */\n    public function setParent(?Column $parent = null): static\n    {\n        $this->setEvaluatedFalse();\n        $this->parent = $parent;\n\n        return $this;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                if ($key == 'parent') { // this is only object\n                    //    Detach from autofilter column parent\n                    $this->$key = null;\n                }\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\n\nclass Column\n{\n    const AUTOFILTER_FILTERTYPE_FILTER = 'filters';\n    const AUTOFILTER_FILTERTYPE_CUSTOMFILTER = 'customFilters';\n    //    Supports no more than 2 rules, with an And/Or join criteria\n    //        if more than 1 rule is defined\n    const AUTOFILTER_FILTERTYPE_DYNAMICFILTER = 'dynamicFilter';\n    //    Even though the filter rule is constant, the filtered data can vary\n    //        e.g. filtered by date = TODAY\n    const AUTOFILTER_FILTERTYPE_TOPTENFILTER = 'top10';\n\n    /**\n     * Types of autofilter rules.\n     *\n     * @var string[]\n     */\n    private static array $filterTypes = [\n        //    Currently we're not handling\n        //        colorFilter\n        //        extLst\n        //        iconFilter\n        self::AUTOFILTER_FILTERTYPE_FILTER,\n        self::AUTOFILTER_FILTERTYPE_CUSTOMFILTER,\n        self::AUTOFILTER_FILTERTYPE_DYNAMICFILTER,\n        self::AUTOFILTER_FILTERTYPE_TOPTENFILTER,\n    ];\n\n    // Multiple Rule Connections\n    const AUTOFILTER_COLUMN_JOIN_AND = 'and';\n    const AUTOFILTER_COLUMN_JOIN_OR = 'or';\n\n    /**\n     * Join options for autofilter rules.\n     *\n     * @var string[]\n     */\n    private static array $ruleJoins = [\n        self::AUTOFILTER_COLUMN_JOIN_AND,\n        self::AUTOFILTER_COLUMN_JOIN_OR,\n    ];\n\n    /**\n     * Autofilter.\n     */\n    private ?AutoFilter $parent;\n\n    /**\n     * Autofilter Column Index.\n     */\n    private string $columnIndex;\n\n    /**\n     * Autofilter Column Filter Type.\n     */\n    private string $filterType = self::AUTOFILTER_FILTERTYPE_FILTER;\n\n    /**\n     * Autofilter Multiple Rules And/Or.\n     */\n    private string $join = self::AUTOFILTER_COLUMN_JOIN_OR;\n\n    /**\n     * Autofilter Column Rules.\n     *\n     * @var Column\\Rule[]\n     */\n    private array $ruleset = [];\n\n    /**\n     * Autofilter Column Dynamic Attributes.\n     *\n     * @var (float|int|string)[]\n     */\n    private array $attributes = [];\n\n    /**\n     * Create a new Column.\n     *\n     * @param string $column Column (e.g. A)\n     * @param ?AutoFilter $parent Autofilter for this column\n     */\n    public function __construct(string $column, ?AutoFilter $parent = null)\n    {\n        $this->columnIndex = $column;\n        $this->parent = $parent;\n    }\n\n    public function setEvaluatedFalse(): void\n    {\n        if ($this->parent !== null) {\n            $this->parent->setEvaluated(false);\n        }\n    }\n\n    /**\n     * Get AutoFilter column index as string eg: 'A'.\n     */\n    public function getColumnIndex(): string\n    {\n        return $this->columnIndex;\n    }\n\n    /**\n     * Set AutoFilter column index as string eg: 'A'.\n     *\n     * @param string $column Column (e.g. A)\n     *\n     * @return $this\n     */\n    public function setColumnIndex(string $column): static\n    {\n        $this->setEvaluatedFalse();\n        // Uppercase coordinate\n        $column = strtoupper($column);\n        if ($this->parent !== null) {\n            $this->parent->testColumnInRange($column);\n        }\n\n        $this->columnIndex = $column;\n\n        return $this;\n    }\n\n    /**\n     * Get this Column's AutoFilter Parent.\n     */\n    public function getParent(): ?AutoFilter\n    {\n        return $this->parent;\n    }\n\n    /**\n     * Set this Column's AutoFilter Parent.\n     *\n     * @return $this\n     */\n    public function setParent(?AutoFilter $parent = null): static\n    {\n        $this->setEvaluatedFalse();\n        $this->parent = $parent;\n\n        return $this;\n    }\n\n    /**\n     * Get AutoFilter Type.\n     */\n    public function getFilterType(): string\n    {\n        return $this->filterType;\n    }\n\n    /**\n     * Set AutoFilter Type.\n     *\n     * @return $this\n     */\n    public function setFilterType(string $filterType): static\n    {\n        $this->setEvaluatedFalse();\n        if (!in_array($filterType, self::$filterTypes)) {\n            throw new PhpSpreadsheetException('Invalid filter type for column AutoFilter.');\n        }\n        if ($filterType === self::AUTOFILTER_FILTERTYPE_CUSTOMFILTER && count($this->ruleset) > 2) {\n            throw new PhpSpreadsheetException('No more than 2 rules are allowed in a Custom Filter');\n        }\n\n        $this->filterType = $filterType;\n\n        return $this;\n    }\n\n    /**\n     * Get AutoFilter Multiple Rules And/Or Join.\n     */\n    public function getJoin(): string\n    {\n        return $this->join;\n    }\n\n    /**\n     * Set AutoFilter Multiple Rules And/Or.\n     *\n     * @param string $join And/Or\n     *\n     * @return $this\n     */\n    public function setJoin(string $join): static\n    {\n        $this->setEvaluatedFalse();\n        // Lowercase And/Or\n        $join = strtolower($join);\n        if (!in_array($join, self::$ruleJoins)) {\n            throw new PhpSpreadsheetException('Invalid rule connection for column AutoFilter.');\n        }\n\n        $this->join = $join;\n\n        return $this;\n    }\n\n    /**\n     * Set AutoFilter Attributes.\n     *\n     * @param (float|int|string)[] $attributes\n     *\n     * @return $this\n     */\n    public function setAttributes(array $attributes): static\n    {\n        $this->setEvaluatedFalse();\n        $this->attributes = $attributes;\n\n        return $this;\n    }\n\n    /**\n     * Set An AutoFilter Attribute.\n     *\n     * @param string $name Attribute Name\n     * @param float|int|string $value Attribute Value\n     *\n     * @return $this\n     */\n    public function setAttribute(string $name, $value): static\n    {\n        $this->setEvaluatedFalse();\n        $this->attributes[$name] = $value;\n\n        return $this;\n    }\n\n    /**\n     * Get AutoFilter Column Attributes.\n     *\n     * @return (float|int|string)[]\n     */\n    public function getAttributes(): array\n    {\n        return $this->attributes;\n    }\n\n    /**\n     * Get specific AutoFilter Column Attribute.\n     *\n     * @param string $name Attribute Name\n     */\n    public function getAttribute(string $name): null|float|int|string\n    {\n        if (isset($this->attributes[$name])) {\n            return $this->attributes[$name];\n        }\n\n        return null;\n    }\n\n    public function ruleCount(): int\n    {\n        return count($this->ruleset);\n    }\n\n    /**\n     * Get all AutoFilter Column Rules.\n     *\n     * @return Column\\Rule[]\n     */\n    public function getRules(): array\n    {\n        return $this->ruleset;\n    }\n\n    /**\n     * Get a specified AutoFilter Column Rule.\n     *\n     * @param int $index Rule index in the ruleset array\n     */\n    public function getRule(int $index): Column\\Rule\n    {\n        if (!isset($this->ruleset[$index])) {\n            $this->ruleset[$index] = new Column\\Rule($this);\n        }\n\n        return $this->ruleset[$index];\n    }\n\n    /**\n     * Create a new AutoFilter Column Rule in the ruleset.\n     */\n    public function createRule(): Column\\Rule\n    {\n        $this->setEvaluatedFalse();\n        if ($this->filterType === self::AUTOFILTER_FILTERTYPE_CUSTOMFILTER && count($this->ruleset) >= 2) {\n            throw new PhpSpreadsheetException('No more than 2 rules are allowed in a Custom Filter');\n        }\n        $this->ruleset[] = new Column\\Rule($this);\n\n        return end($this->ruleset);\n    }\n\n    /**\n     * Add a new AutoFilter Column Rule to the ruleset.\n     *\n     * @return $this\n     */\n    public function addRule(Column\\Rule $rule): static\n    {\n        $this->setEvaluatedFalse();\n        $rule->setParent($this);\n        $this->ruleset[] = $rule;\n\n        return $this;\n    }\n\n    /**\n     * Delete a specified AutoFilter Column Rule\n     * If the number of rules is reduced to 1, then we reset And/Or logic to Or.\n     *\n     * @param int $index Rule index in the ruleset array\n     *\n     * @return $this\n     */\n    public function deleteRule(int $index): static\n    {\n        $this->setEvaluatedFalse();\n        if (isset($this->ruleset[$index])) {\n            unset($this->ruleset[$index]);\n            //    If we've just deleted down to a single rule, then reset And/Or joining to Or\n            if (count($this->ruleset) <= 1) {\n                $this->setJoin(self::AUTOFILTER_COLUMN_JOIN_OR);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Delete all AutoFilter Column Rules.\n     *\n     * @return $this\n     */\n    public function clearRules(): static\n    {\n        $this->setEvaluatedFalse();\n        $this->ruleset = [];\n        $this->setJoin(self::AUTOFILTER_COLUMN_JOIN_OR);\n\n        return $this;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        /** @var Column\\Rule[] $value */\n        foreach ($vars as $key => $value) {\n            if ($key === 'parent') {\n                // Detach from autofilter parent\n                $this->parent = null;\n            } elseif ($key === 'ruleset') {\n                // The columns array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\AutoFilter objects\n                $this->ruleset = [];\n                foreach ($value as $k => $v) {\n                    $cloned = clone $v;\n                    $cloned->setParent($this); // attach the new cloned Rule to this new cloned Autofilter Cloned object\n                    $this->ruleset[$k] = $cloned;\n                }\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/AutoFilter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse DateTime;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\WildcardMatch;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse Stringable;\nuse Throwable;\n\nclass AutoFilter implements Stringable\n{\n    /**\n     * Autofilter Worksheet.\n     */\n    private ?Worksheet $workSheet;\n\n    /**\n     * Autofilter Range.\n     */\n    private string $range;\n\n    /**\n     * Autofilter Column Ruleset.\n     *\n     * @var AutoFilter\\Column[]\n     */\n    private array $columns = [];\n\n    private bool $evaluated = false;\n\n    public function getEvaluated(): bool\n    {\n        return $this->evaluated;\n    }\n\n    public function setEvaluated(bool $value): void\n    {\n        $this->evaluated = $value;\n    }\n\n    /**\n     * Create a new AutoFilter.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $range\n     *            A simple string containing a Cell range like 'A1:E10' is permitted\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or an AddressRange object.\n     */\n    public function __construct(AddressRange|string|array $range = '', ?Worksheet $worksheet = null)\n    {\n        if ($range !== '') {\n            [, $range] = Worksheet::extractSheetTitle(Validations::validateCellRange($range), true);\n        }\n\n        $this->range = $range ?? '';\n        $this->workSheet = $worksheet;\n    }\n\n    public function __destruct()\n    {\n        $this->workSheet = null;\n    }\n\n    /**\n     * Get AutoFilter Parent Worksheet.\n     */\n    public function getParent(): null|Worksheet\n    {\n        return $this->workSheet;\n    }\n\n    /**\n     * Set AutoFilter Parent Worksheet.\n     *\n     * @return $this\n     */\n    public function setParent(?Worksheet $worksheet = null): static\n    {\n        $this->evaluated = false;\n        $this->workSheet = $worksheet;\n\n        return $this;\n    }\n\n    /**\n     * Get AutoFilter Range.\n     */\n    public function getRange(): string\n    {\n        return $this->range;\n    }\n\n    /**\n     * Set AutoFilter Cell Range.\n     *\n     * @param AddressRange<CellRange>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $range\n     *            A simple string containing a Cell range like 'A1:E10' or a Cell address like 'A1' is permitted\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or an AddressRange object.\n     */\n    public function setRange(AddressRange|string|array $range = ''): self\n    {\n        $this->evaluated = false;\n        // extract coordinate\n        if ($range !== '') {\n            [, $range] = Worksheet::extractSheetTitle(Validations::validateCellRange($range), true);\n        }\n\n        if (empty($range)) {\n            //    Discard all column rules\n            $this->columns = [];\n            $this->range = '';\n\n            return $this;\n        }\n\n        if (ctype_digit($range) || ctype_alpha($range)) {\n            throw new Exception(\"{$range} is an invalid range for AutoFilter\");\n        }\n\n        $this->range = $range;\n        //    Discard any column rules that are no longer valid within this range\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);\n        foreach ($this->columns as $key => $value) {\n            $colIndex = Coordinate::columnIndexFromString($key);\n            if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) {\n                unset($this->columns[$key]);\n            }\n        }\n\n        return $this;\n    }\n\n    public function setRangeToMaxRow(): self\n    {\n        $this->evaluated = false;\n        if ($this->workSheet !== null) {\n            $thisrange = $this->range;\n            $range = (string) preg_replace('/\\d+$/', (string) $this->workSheet->getHighestRow(), $thisrange);\n            if ($range !== $thisrange) {\n                $this->setRange($range);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get all AutoFilter Columns.\n     *\n     * @return AutoFilter\\Column[]\n     */\n    public function getColumns(): array\n    {\n        return $this->columns;\n    }\n\n    /**\n     * Validate that the specified column is in the AutoFilter range.\n     *\n     * @param string $column Column name (e.g. A)\n     *\n     * @return int The column offset within the autofilter range\n     */\n    public function testColumnInRange(string $column): int\n    {\n        if (empty($this->range)) {\n            throw new Exception('No autofilter range is defined.');\n        }\n\n        $columnIndex = Coordinate::columnIndexFromString($column);\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);\n        if (($rangeStart[0] > $columnIndex) || ($rangeEnd[0] < $columnIndex)) {\n            throw new Exception('Column is outside of current autofilter range.');\n        }\n\n        return $columnIndex - $rangeStart[0];\n    }\n\n    /**\n     * Get a specified AutoFilter Column Offset within the defined AutoFilter range.\n     *\n     * @param string $column Column name (e.g. A)\n     *\n     * @return int The offset of the specified column within the autofilter range\n     */\n    public function getColumnOffset(string $column): int\n    {\n        return $this->testColumnInRange($column);\n    }\n\n    /**\n     * Get a specified AutoFilter Column.\n     *\n     * @param string $column Column name (e.g. A)\n     */\n    public function getColumn(string $column): AutoFilter\\Column\n    {\n        $this->testColumnInRange($column);\n\n        if (!isset($this->columns[$column])) {\n            $this->columns[$column] = new AutoFilter\\Column($column, $this);\n        }\n\n        return $this->columns[$column];\n    }\n\n    /**\n     * Get a specified AutoFilter Column by its offset.\n     *\n     * @param int $columnOffset Column offset within range (starting from 0)\n     */\n    public function getColumnByOffset(int $columnOffset): AutoFilter\\Column\n    {\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);\n        $pColumn = Coordinate::stringFromColumnIndex($rangeStart[0] + $columnOffset);\n\n        return $this->getColumn($pColumn);\n    }\n\n    /**\n     * Set AutoFilter.\n     *\n     * @param AutoFilter\\Column|string $columnObjectOrString\n     *            A simple string containing a Column ID like 'A' is permitted\n     *\n     * @return $this\n     */\n    public function setColumn(AutoFilter\\Column|string $columnObjectOrString): static\n    {\n        $this->evaluated = false;\n        if ((is_string($columnObjectOrString)) && (!empty($columnObjectOrString))) {\n            $column = $columnObjectOrString;\n        } elseif ($columnObjectOrString instanceof AutoFilter\\Column) {\n            $column = $columnObjectOrString->getColumnIndex();\n        } else {\n            throw new Exception('Column is not within the autofilter range.');\n        }\n        $this->testColumnInRange($column);\n\n        if (is_string($columnObjectOrString)) {\n            $this->columns[$columnObjectOrString] = new AutoFilter\\Column($columnObjectOrString, $this);\n        } else {\n            $columnObjectOrString->setParent($this);\n            $this->columns[$column] = $columnObjectOrString;\n        }\n        ksort($this->columns);\n\n        return $this;\n    }\n\n    /**\n     * Clear a specified AutoFilter Column.\n     *\n     * @param string $column Column name (e.g. A)\n     *\n     * @return $this\n     */\n    public function clearColumn(string $column): static\n    {\n        $this->evaluated = false;\n        $this->testColumnInRange($column);\n\n        if (isset($this->columns[$column])) {\n            unset($this->columns[$column]);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Shift an AutoFilter Column Rule to a different column.\n     *\n     * Note: This method bypasses validation of the destination column to ensure it is within this AutoFilter range.\n     *        Nor does it verify whether any column rule already exists at $toColumn, but will simply override any existing value.\n     *        Use with caution.\n     *\n     * @param string $fromColumn Column name (e.g. A)\n     * @param string $toColumn Column name (e.g. B)\n     *\n     * @return $this\n     */\n    public function shiftColumn(string $fromColumn, string $toColumn): static\n    {\n        $this->evaluated = false;\n        $fromColumn = strtoupper($fromColumn);\n        $toColumn = strtoupper($toColumn);\n\n        if (isset($this->columns[$fromColumn])) {\n            $this->columns[$fromColumn]->setParent();\n            $this->columns[$fromColumn]->setColumnIndex($toColumn);\n            $this->columns[$toColumn] = $this->columns[$fromColumn];\n            $this->columns[$toColumn]->setParent($this);\n            unset($this->columns[$fromColumn]);\n\n            ksort($this->columns);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Test if cell value is in the defined set of values.\n     *\n     * @param array{blanks: bool, filterValues: array<string,array<string,string>>} $dataSet\n     */\n    protected static function filterTestInSimpleDataSet(mixed $cellValue, array $dataSet): bool\n    {\n        $dataSetValues = $dataSet['filterValues'];\n        $blanks = $dataSet['blanks'];\n        if (($cellValue === '') || ($cellValue === null)) {\n            return $blanks;\n        }\n\n        return in_array($cellValue, $dataSetValues);\n    }\n\n    /**\n     * Test if cell value is in the defined set of Excel date values.\n     *\n     * @param array{blanks: bool, filterValues: array<string,array<string,string>>} $dataSet\n     */\n    protected static function filterTestInDateGroupSet(mixed $cellValue, array $dataSet): bool\n    {\n        $dateSet = $dataSet['filterValues'];\n        $blanks = $dataSet['blanks'];\n        if (($cellValue === '') || ($cellValue === null)) {\n            return $blanks;\n        }\n        $timeZone = new DateTimeZone('UTC');\n\n        if (is_numeric($cellValue)) {\n            try {\n                $dateTime = Date::excelToDateTimeObject((float) $cellValue, $timeZone);\n            } catch (Throwable) {\n                return false;\n            }\n\n            $cellValue = (float) $cellValue;\n            if ($cellValue < 1) {\n                //    Just the time part\n                $dtVal = $dateTime->format('His');\n                $dateSet = $dateSet['time'];\n            } elseif ($cellValue == floor($cellValue)) {\n                //    Just the date part\n                $dtVal = $dateTime->format('Ymd');\n                $dateSet = $dateSet['date'];\n            } else {\n                //    date and time parts\n                $dtVal = $dateTime->format('YmdHis');\n                $dateSet = $dateSet['dateTime'];\n            }\n            foreach ($dateSet as $dateValue) {\n                //    Use of substr to extract value at the appropriate group level\n                if (str_starts_with($dtVal, $dateValue)) {\n                    return true;\n                }\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Test if cell value is within a set of values defined by a ruleset.\n     *\n     * @param mixed[][] $ruleSet\n     */\n    protected static function filterTestInCustomDataSet(mixed $cellValue, array $ruleSet): bool\n    {\n        $dataSet = $ruleSet['filterRules'];\n        $join = $ruleSet['join'];\n        $customRuleForBlanks = $ruleSet['customRuleForBlanks'] ?? false;\n\n        if (!$customRuleForBlanks) {\n            //    Blank cells are always ignored, so return a FALSE\n            if (($cellValue === '') || ($cellValue === null)) {\n                return false;\n            }\n        }\n        $returnVal = ($join == AutoFilter\\Column::AUTOFILTER_COLUMN_JOIN_AND);\n        foreach ($dataSet as $rule) {\n            /** @var string[] $rule */\n            $ruleValue = $rule['value'];\n            $ruleOperator = $rule['operator'];\n            /** @var string */\n            $cellValueString = $cellValue ?? '';\n            $retVal = false;\n\n            if (is_numeric($ruleValue)) {\n                //    Numeric values are tested using the appropriate operator\n                $numericTest = is_numeric($cellValue);\n                switch ($ruleOperator) {\n                    case Rule::AUTOFILTER_COLUMN_RULE_EQUAL:\n                        $retVal = $numericTest && ($cellValue == $ruleValue);\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL:\n                        $retVal = !$numericTest || ($cellValue != $ruleValue);\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN:\n                        $retVal = $numericTest && ($cellValue > $ruleValue);\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL:\n                        $retVal = $numericTest && ($cellValue >= $ruleValue);\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN:\n                        $retVal = $numericTest && ($cellValue < $ruleValue);\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL:\n                        $retVal = $numericTest && ($cellValue <= $ruleValue);\n\n                        break;\n                }\n            } elseif ($ruleValue == '') {\n                $retVal = match ($ruleOperator) {\n                    Rule::AUTOFILTER_COLUMN_RULE_EQUAL => ($cellValue === '') || ($cellValue === null),\n                    Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL => ($cellValue != ''),\n                    default => true,\n                };\n            } else {\n                //    String values are always tested for equality, factoring in for wildcards (hence a regexp test)\n                switch ($ruleOperator) {\n                    case Rule::AUTOFILTER_COLUMN_RULE_EQUAL:\n                        $retVal = (bool) preg_match('/^' . $ruleValue . '$/i', $cellValueString);\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL:\n                        $retVal = !((bool) preg_match('/^' . $ruleValue . '$/i', $cellValueString));\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN:\n                        $retVal = strcasecmp($cellValueString, $ruleValue) > 0;\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL:\n                        $retVal = strcasecmp($cellValueString, $ruleValue) >= 0;\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN:\n                        $retVal = strcasecmp($cellValueString, $ruleValue) < 0;\n\n                        break;\n                    case Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL:\n                        $retVal = strcasecmp($cellValueString, $ruleValue) <= 0;\n\n                        break;\n                }\n            }\n            //    If there are multiple conditions, then we need to test both using the appropriate join operator\n            switch ($join) {\n                case AutoFilter\\Column::AUTOFILTER_COLUMN_JOIN_OR:\n                    $returnVal = $returnVal || $retVal;\n                    //    Break as soon as we have a TRUE match for OR joins,\n                    //        to avoid unnecessary additional code execution\n                    if ($returnVal) {\n                        return $returnVal;\n                    }\n\n                    break;\n                case AutoFilter\\Column::AUTOFILTER_COLUMN_JOIN_AND:\n                    $returnVal = $returnVal && $retVal;\n\n                    break;\n            }\n        }\n\n        return $returnVal;\n    }\n\n    /**\n     * Test if cell date value is matches a set of values defined by a set of months.\n     *\n     * @param mixed[] $monthSet\n     */\n    protected static function filterTestInPeriodDateSet(mixed $cellValue, array $monthSet): bool\n    {\n        //    Blank cells are always ignored, so return a FALSE\n        if (($cellValue === '') || ($cellValue === null)) {\n            return false;\n        }\n\n        if (is_numeric($cellValue)) {\n            try {\n                $dateObject = Date::excelToDateTimeObject((float) $cellValue, new DateTimeZone('UTC'));\n            } catch (Throwable) {\n                return false;\n            }\n\n            $dateValue = (int) $dateObject->format('m');\n            if (in_array($dateValue, $monthSet)) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    private static function makeDateObject(int $year, int $month, int $day, int $hour = 0, int $minute = 0, int $second = 0): DateTime\n    {\n        $baseDate = new DateTime();\n        $baseDate->setDate($year, $month, $day);\n        $baseDate->setTime($hour, $minute, $second);\n\n        return $baseDate;\n    }\n\n    private const DATE_FUNCTIONS = [\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH => 'dynamicLastMonth',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER => 'dynamicLastQuarter',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK => 'dynamicLastWeek',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR => 'dynamicLastYear',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH => 'dynamicNextMonth',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER => 'dynamicNextQuarter',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK => 'dynamicNextWeek',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR => 'dynamicNextYear',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH => 'dynamicThisMonth',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER => 'dynamicThisQuarter',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK => 'dynamicThisWeek',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR => 'dynamicThisYear',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_TODAY => 'dynamicToday',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW => 'dynamicTomorrow',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE => 'dynamicYearToDate',\n        Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY => 'dynamicYesterday',\n    ];\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicLastMonth(): array\n    {\n        $maxval = new DateTime();\n        $year = (int) $maxval->format('Y');\n        $month = (int) $maxval->format('m');\n        $maxval->setDate($year, $month, 1);\n        $maxval->setTime(0, 0, 0);\n        $val = clone $maxval;\n        $val->modify('-1 month');\n\n        return [$val, $maxval];\n    }\n\n    private static function firstDayOfQuarter(): DateTime\n    {\n        $val = new DateTime();\n        $year = (int) $val->format('Y');\n        $month = (int) $val->format('m');\n        $month = 3 * intdiv($month - 1, 3) + 1;\n        $val->setDate($year, $month, 1);\n        $val->setTime(0, 0, 0);\n\n        return $val;\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicLastQuarter(): array\n    {\n        $maxval = self::firstDayOfQuarter();\n        $val = clone $maxval;\n        $val->modify('-3 months');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicLastWeek(): array\n    {\n        $val = new DateTime();\n        $val->setTime(0, 0, 0);\n        $dayOfWeek = (int) $val->format('w'); // Sunday is 0\n        $subtract = $dayOfWeek + 7; // revert to prior Sunday\n        $val->modify(\"-$subtract days\");\n        $maxval = clone $val;\n        $maxval->modify('+7 days');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicLastYear(): array\n    {\n        $val = new DateTime();\n        $year = (int) $val->format('Y');\n        $val = self::makeDateObject($year - 1, 1, 1);\n        $maxval = self::makeDateObject($year, 1, 1);\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicNextMonth(): array\n    {\n        $val = new DateTime();\n        $year = (int) $val->format('Y');\n        $month = (int) $val->format('m');\n        $val->setDate($year, $month, 1);\n        $val->setTime(0, 0, 0);\n        $val->modify('+1 month');\n        $maxval = clone $val;\n        $maxval->modify('+1 month');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicNextQuarter(): array\n    {\n        $val = self::firstDayOfQuarter();\n        $val->modify('+3 months');\n        $maxval = clone $val;\n        $maxval->modify('+3 months');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicNextWeek(): array\n    {\n        $val = new DateTime();\n        $val->setTime(0, 0, 0);\n        $dayOfWeek = (int) $val->format('w'); // Sunday is 0\n        $add = 7 - $dayOfWeek; // move to next Sunday\n        $val->modify(\"+$add days\");\n        $maxval = clone $val;\n        $maxval->modify('+7 days');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicNextYear(): array\n    {\n        $val = new DateTime();\n        $year = (int) $val->format('Y');\n        $val = self::makeDateObject($year + 1, 1, 1);\n        $maxval = self::makeDateObject($year + 2, 1, 1);\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicThisMonth(): array\n    {\n        $baseDate = new DateTime();\n        $baseDate->setTime(0, 0, 0);\n        $year = (int) $baseDate->format('Y');\n        $month = (int) $baseDate->format('m');\n        $val = self::makeDateObject($year, $month, 1);\n        $maxval = clone $val;\n        $maxval->modify('+1 month');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicThisQuarter(): array\n    {\n        $val = self::firstDayOfQuarter();\n        $maxval = clone $val;\n        $maxval->modify('+3 months');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicThisWeek(): array\n    {\n        $val = new DateTime();\n        $val->setTime(0, 0, 0);\n        $dayOfWeek = (int) $val->format('w'); // Sunday is 0\n        $subtract = $dayOfWeek; // revert to Sunday\n        $val->modify(\"-$subtract days\");\n        $maxval = clone $val;\n        $maxval->modify('+7 days');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicThisYear(): array\n    {\n        $val = new DateTime();\n        $year = (int) $val->format('Y');\n        $val = self::makeDateObject($year, 1, 1);\n        $maxval = self::makeDateObject($year + 1, 1, 1);\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicToday(): array\n    {\n        $val = new DateTime();\n        $val->setTime(0, 0, 0);\n        $maxval = clone $val;\n        $maxval->modify('+1 day');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicTomorrow(): array\n    {\n        $val = new DateTime();\n        $val->setTime(0, 0, 0);\n        $val->modify('+1 day');\n        $maxval = clone $val;\n        $maxval->modify('+1 day');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicYearToDate(): array\n    {\n        $maxval = new DateTime();\n        $maxval->setTime(0, 0, 0);\n        $val = self::makeDateObject((int) $maxval->format('Y'), 1, 1);\n        $maxval->modify('+1 day');\n\n        return [$val, $maxval];\n    }\n\n    /** @return array{DateTime, DateTime} */\n    private static function dynamicYesterday(): array\n    {\n        $maxval = new DateTime();\n        $maxval->setTime(0, 0, 0);\n        $val = clone $maxval;\n        $val->modify('-1 day');\n\n        return [$val, $maxval];\n    }\n\n    /**\n     * Convert a dynamic rule daterange to a custom filter range expression for ease of calculation.\n     *\n     * @return mixed[]\n     */\n    private function dynamicFilterDateRange(string $dynamicRuleType, AutoFilter\\Column &$filterColumn): array\n    {\n        $ruleValues = [];\n        $callBack = [__CLASS__, self::DATE_FUNCTIONS[$dynamicRuleType]]; // What if not found?\n        //    Calculate start/end dates for the required date range based on current date\n        //    Val is lowest permitted value.\n        //    Maxval is greater than highest permitted value\n        $val = $maxval = 0;\n        if (is_callable($callBack)) { //* @phpstan-ignore-line\n            [$val, $maxval] = $callBack();\n        }\n        $val = Date::dateTimeToExcel($val);\n        $maxval = Date::dateTimeToExcel($maxval);\n\n        //    Set the filter column rule attributes ready for writing\n        $filterColumn->setAttributes(['val' => $val, 'maxVal' => $maxval]);\n\n        //    Set the rules for identifying rows for hide/show\n        $ruleValues[] = ['operator' => Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 'value' => $val];\n        $ruleValues[] = ['operator' => Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN, 'value' => $maxval];\n\n        return ['method' => 'filterTestInCustomDataSet', 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\\Column::AUTOFILTER_COLUMN_JOIN_AND]];\n    }\n\n    /**\n     * Apply the AutoFilter rules to the AutoFilter Range.\n     */\n    private function calculateTopTenValue(string $columnID, int $startRow, int $endRow, ?string $ruleType, mixed $ruleValue): mixed\n    {\n        $range = $columnID . $startRow . ':' . $columnID . $endRow;\n        $retVal = null;\n        if ($this->workSheet !== null) {\n            $dataValues = Functions::flattenArray($this->workSheet->rangeToArray($range, null, true, false));\n            $dataValues = array_filter($dataValues);\n\n            if ($ruleType == Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) {\n                rsort($dataValues);\n            } else {\n                sort($dataValues);\n            }\n\n            if (is_numeric($ruleValue)) {\n                $ruleValue = (int) $ruleValue;\n            }\n            if ($ruleValue === null || is_int($ruleValue)) {\n                $slice = array_slice($dataValues, 0, $ruleValue);\n                $retVal = array_pop($slice);\n            }\n        }\n\n        return $retVal;\n    }\n\n    /**\n     * Apply the AutoFilter rules to the AutoFilter Range.\n     *\n     * @return $this\n     */\n    public function showHideRows(): static\n    {\n        if ($this->workSheet === null) {\n            return $this;\n        }\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);\n\n        //    The heading row should always be visible\n        $this->workSheet->getRowDimension($rangeStart[1])->setVisible(true);\n\n        $columnFilterTests = [];\n        foreach ($this->columns as $columnID => $filterColumn) {\n            $rules = $filterColumn->getRules();\n            switch ($filterColumn->getFilterType()) {\n                case AutoFilter\\Column::AUTOFILTER_FILTERTYPE_FILTER:\n                    $ruleType = null;\n                    $ruleValues = [];\n                    //    Build a list of the filter value selections\n                    foreach ($rules as $rule) {\n                        $ruleType = $rule->getRuleType();\n                        $ruleValues[] = $rule->getValue();\n                    }\n                    //    Test if we want to include blanks in our filter criteria\n                    $blanks = false;\n                    $ruleDataSet = array_filter($ruleValues);\n                    if (count($ruleValues) != count($ruleDataSet)) {\n                        $blanks = true;\n                    }\n                    if ($ruleType == Rule::AUTOFILTER_RULETYPE_FILTER) {\n                        //    Filter on absolute values\n                        $columnFilterTests[$columnID] = [\n                            'method' => 'filterTestInSimpleDataSet',\n                            'arguments' => ['filterValues' => $ruleDataSet, 'blanks' => $blanks],\n                        ];\n                    } elseif ($ruleType !== null) {\n                        //    Filter on date group values\n                        $arguments = [\n                            'date' => [],\n                            'time' => [],\n                            'dateTime' => [],\n                        ];\n                        foreach ($ruleDataSet as $ruleValue) {\n                            if (!is_array($ruleValue)) {\n                                continue;\n                            }\n                            $date = $time = '';\n                            if (\n                                (isset($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR]))\n                                && ($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR] !== '')\n                            ) {\n                                $date .= sprintf('%04d', $ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR]);\n                            }\n                            if (\n                                (isset($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH]))\n                                && ($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH] != '')\n                            ) {\n                                $date .= sprintf('%02d', $ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH]);\n                            }\n                            if (\n                                (isset($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY]))\n                                && ($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY] !== '')\n                            ) {\n                                $date .= sprintf('%02d', $ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY]);\n                            }\n                            if (\n                                (isset($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR]))\n                                && ($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR] !== '')\n                            ) {\n                                $time .= sprintf('%02d', $ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR]);\n                            }\n                            if (\n                                (isset($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE]))\n                                && ($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE] !== '')\n                            ) {\n                                $time .= sprintf('%02d', $ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE]);\n                            }\n                            if (\n                                (isset($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND]))\n                                && ($ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND] !== '')\n                            ) {\n                                $time .= sprintf('%02d', $ruleValue[Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND]);\n                            }\n                            $dateTime = $date . $time;\n                            $arguments['date'][] = $date;\n                            $arguments['time'][] = $time;\n                            $arguments['dateTime'][] = $dateTime;\n                        }\n                        //    Remove empty elements\n                        $arguments['date'] = array_filter($arguments['date']);\n                        $arguments['time'] = array_filter($arguments['time']);\n                        $arguments['dateTime'] = array_filter($arguments['dateTime']);\n                        $columnFilterTests[$columnID] = [\n                            'method' => 'filterTestInDateGroupSet',\n                            'arguments' => ['filterValues' => $arguments, 'blanks' => $blanks],\n                        ];\n                    }\n\n                    break;\n                case AutoFilter\\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER:\n                    $customRuleForBlanks = true;\n                    $ruleValues = [];\n                    //    Build a list of the filter value selections\n                    foreach ($rules as $rule) {\n                        $ruleValue = $rule->getValue();\n                        if (!is_array($ruleValue) && !is_numeric($ruleValue)) {\n                            //    Convert to a regexp allowing for regexp reserved characters, wildcards and escaped wildcards\n                            $ruleValue = WildcardMatch::wildcard($ruleValue);\n                            if (trim($ruleValue) == '') {\n                                $customRuleForBlanks = true;\n                                $ruleValue = trim($ruleValue);\n                            }\n                        }\n                        $ruleValues[] = ['operator' => $rule->getOperator(), 'value' => $ruleValue];\n                    }\n                    $join = $filterColumn->getJoin();\n                    $columnFilterTests[$columnID] = [\n                        'method' => 'filterTestInCustomDataSet',\n                        'arguments' => ['filterRules' => $ruleValues, 'join' => $join, 'customRuleForBlanks' => $customRuleForBlanks],\n                    ];\n\n                    break;\n                case AutoFilter\\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER:\n                    $ruleValues = [];\n                    foreach ($rules as $rule) {\n                        //    We should only ever have one Dynamic Filter Rule anyway\n                        $dynamicRuleType = $rule->getGrouping();\n                        if (\n                            ($dynamicRuleType == Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE)\n                            || ($dynamicRuleType == Rule::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE)\n                        ) {\n                            //    Number (Average) based\n                            //    Calculate the average\n                            $averageFormula = '=AVERAGE(' . $columnID . ($rangeStart[1] + 1) . ':' . $columnID . $rangeEnd[1] . ')';\n                            $average = Calculation::getInstance($this->workSheet->getParent())->calculateFormula($averageFormula, null, $this->workSheet->getCell('A1'));\n                            while (is_array($average)) {\n                                $average = array_pop($average);\n                            }\n                            //    Set above/below rule based on greaterThan or LessTan\n                            $operator = ($dynamicRuleType === Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE)\n                                ? Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN\n                                : Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN;\n                            $ruleValues[] = [\n                                'operator' => $operator,\n                                'value' => $average,\n                            ];\n                            $columnFilterTests[$columnID] = [\n                                'method' => 'filterTestInCustomDataSet',\n                                'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\\Column::AUTOFILTER_COLUMN_JOIN_OR],\n                            ];\n                        } else {\n                            //    Date based\n                            if ($dynamicRuleType[0] == 'M' || $dynamicRuleType[0] == 'Q') {\n                                $periodType = '';\n                                $period = 0;\n                                //    Month or Quarter\n                                sscanf($dynamicRuleType, '%[A-Z]%d', $periodType, $period);\n                                if ($periodType == 'M') {\n                                    $ruleValues = [$period];\n                                } else {\n                                    /** @var int $period */\n                                    --$period;\n                                    $periodEnd = (1 + $period) * 3;\n                                    $periodStart = 1 + $period * 3;\n                                    $ruleValues = range($periodStart, $periodEnd);\n                                }\n                                $columnFilterTests[$columnID] = [\n                                    'method' => 'filterTestInPeriodDateSet',\n                                    'arguments' => $ruleValues,\n                                ];\n                                $filterColumn->setAttributes([]);\n                            } else {\n                                //    Date Range\n                                $columnFilterTests[$columnID] = $this->dynamicFilterDateRange($dynamicRuleType, $filterColumn);\n\n                                break;\n                            }\n                        }\n                    }\n\n                    break;\n                case AutoFilter\\Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER:\n                    $ruleValues = [];\n                    $dataRowCount = $rangeEnd[1] - $rangeStart[1];\n                    $toptenRuleType = null;\n                    $ruleValue = 0;\n                    $ruleOperator = null;\n                    foreach ($rules as $rule) {\n                        //    We should only ever have one Dynamic Filter Rule anyway\n                        $toptenRuleType = $rule->getGrouping();\n                        $ruleValue = $rule->getValue();\n                        $ruleOperator = $rule->getOperator();\n                    }\n                    if (is_numeric($ruleValue) && $ruleOperator === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) {\n                        $ruleValue = (int) floor((float) $ruleValue * ($dataRowCount / 100));\n                    }\n                    if (!is_array($ruleValue) && $ruleValue < 1) {\n                        $ruleValue = 1;\n                    }\n                    if (!is_array($ruleValue) && $ruleValue > 500) {\n                        $ruleValue = 500;\n                    }\n\n                    /** @var float|int|string */\n                    $maxVal = $this->calculateTopTenValue($columnID, $rangeStart[1] + 1, (int) $rangeEnd[1], $toptenRuleType, $ruleValue);\n\n                    $operator = ($toptenRuleType == Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP)\n                        ? Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL\n                        : Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL;\n                    $ruleValues[] = ['operator' => $operator, 'value' => $maxVal];\n                    $columnFilterTests[$columnID] = [\n                        'method' => 'filterTestInCustomDataSet',\n                        'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\\Column::AUTOFILTER_COLUMN_JOIN_OR],\n                    ];\n                    $filterColumn->setAttributes(['maxVal' => $maxVal]);\n\n                    break;\n            }\n        }\n\n        $rangeEnd[1] = $this->autoExtendRange($rangeStart[1], $rangeEnd[1]);\n\n        //    Execute the column tests for each row in the autoFilter range to determine show/hide,\n        for ($row = $rangeStart[1] + 1; $row <= $rangeEnd[1]; ++$row) {\n            $result = true;\n            foreach ($columnFilterTests as $columnID => $columnFilterTest) {\n                $cellValue = $this->workSheet->getCell($columnID . $row)->getCalculatedValue();\n                //    Execute the filter test\n                /** @var callable */\n                $temp = [self::class, $columnFilterTest['method']];\n                /** @var bool */\n                $result // $result && // phpstan says $result is always true here\n                    = call_user_func_array($temp, [$cellValue, $columnFilterTest['arguments']]);\n                //    If filter test has resulted in FALSE, exit the loop straightaway rather than running any more tests\n                if (!$result) {\n                    break;\n                }\n            }\n            //    Set show/hide for the row based on the result of the autoFilter result\n            //    If the RowDimension object has not been allocated yet and the row should be visible,\n            //    then we can avoid any operation since the rows are visible by default (saves a lot of memory)\n            if ($result === false || $this->workSheet->rowDimensionExists((int) $row)) {\n                $this->workSheet\n                    ->getRowDimension((int) $row)\n                    ->setVisible($result)\n                    ->setVisibleAfterFilter($result);\n            }\n        }\n        $this->evaluated = true;\n\n        return $this;\n    }\n\n    /**\n     * Magic Range Auto-sizing.\n     * For a single row rangeSet, we follow MS Excel rules, and search for the first empty row to determine our range.\n     */\n    public function autoExtendRange(int $startRow, int $endRow): int\n    {\n        if ($startRow === $endRow && $this->workSheet !== null) {\n            try {\n                $rowIterator = $this->workSheet->getRowIterator($startRow + 1);\n            } catch (Exception) {\n                // If there are no rows below $startRow\n                return $startRow;\n            }\n            foreach ($rowIterator as $row) {\n                if ($row->isEmpty(CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL) === true) {\n                    return $row->getRowIndex() - 1;\n                }\n            }\n        }\n\n        return $endRow;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                if ($key === 'workSheet') {\n                    //    Detach from worksheet\n                    $this->{$key} = null;\n                } else {\n                    $this->{$key} = clone $value;\n                }\n            } elseif ((is_array($value)) && ($key == 'columns')) {\n                //    The columns array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\AutoFilter objects\n                $this->{$key} = [];\n                foreach ($value as $k => $v) {\n                    $this->{$key}[$k] = clone $v; //* @phpstan-ignore-line\n                    // attach the new cloned Column to this new cloned Autofilter object\n                    $this->{$key}[$k]->setParent($this); //* @phpstan-ignore-line\n                }\n            } else {\n                $this->{$key} = $value;\n            }\n        }\n    }\n\n    /**\n     * toString method replicates previous behavior by returning the range if object is\n     * referenced as a property of its parent.\n     */\n    public function __toString(): string\n    {\n        return (string) $this->range;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/AutoFit.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\n\nclass AutoFit\n{\n    protected Worksheet $worksheet;\n\n    public function __construct(Worksheet $worksheet)\n    {\n        $this->worksheet = $worksheet;\n    }\n\n    /** @return mixed[] */\n    public function getAutoFilterIndentRanges(): array\n    {\n        $autoFilterIndentRanges = [];\n        $autoFilterIndentRanges[] = $this->getAutoFilterIndentRange($this->worksheet->getAutoFilter());\n\n        foreach ($this->worksheet->getTableCollection() as $table) {\n            if ($table->getShowHeaderRow() === true && $table->getAllowFilter() === true) {\n                $autoFilter = $table->getAutoFilter();\n                $autoFilterIndentRanges[] = $this->getAutoFilterIndentRange($autoFilter);\n            }\n        }\n\n        return array_filter($autoFilterIndentRanges);\n    }\n\n    private function getAutoFilterIndentRange(AutoFilter $autoFilter): ?string\n    {\n        $autoFilterRange = $autoFilter->getRange();\n        $autoFilterIndentRange = null;\n\n        if (!empty($autoFilterRange)) {\n            $autoFilterRangeBoundaries = Coordinate::rangeBoundaries($autoFilterRange);\n            $autoFilterIndentRange = (string) new CellRange(\n                CellAddress::fromColumnAndRow($autoFilterRangeBoundaries[0][0], $autoFilterRangeBoundaries[0][1]),\n                CellAddress::fromColumnAndRow($autoFilterRangeBoundaries[1][0], $autoFilterRangeBoundaries[0][1])\n            );\n        }\n\n        return $autoFilterIndentRange;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/BaseDrawing.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\IComparable;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing\\Shadow;\nuse SimpleXMLElement;\n\nclass BaseDrawing implements IComparable\n{\n    const EDIT_AS_ABSOLUTE = 'absolute';\n    const EDIT_AS_ONECELL = 'oneCell';\n    const EDIT_AS_TWOCELL = 'twoCell';\n    private const VALID_EDIT_AS = [\n        self::EDIT_AS_ABSOLUTE,\n        self::EDIT_AS_ONECELL,\n        self::EDIT_AS_TWOCELL,\n    ];\n\n    /**\n     * The editAs attribute, used only with two cell anchor.\n     */\n    protected string $editAs = '';\n\n    /**\n     * Image counter.\n     */\n    private static int $imageCounter = 0;\n\n    /**\n     * Image index.\n     */\n    private int $imageIndex;\n\n    /**\n     * Name.\n     */\n    protected string $name = '';\n\n    /**\n     * Description.\n     */\n    protected string $description = '';\n\n    /**\n     * Worksheet.\n     */\n    protected ?Worksheet $worksheet = null;\n\n    /**\n     * Coordinates.\n     */\n    protected string $coordinates = 'A1';\n\n    /**\n     * Offset X.\n     */\n    protected int $offsetX = 0;\n\n    /**\n     * Offset Y.\n     */\n    protected int $offsetY = 0;\n\n    /**\n     * Coordinates2.\n     */\n    protected string $coordinates2 = '';\n\n    /**\n     * Offset X2.\n     */\n    protected int $offsetX2 = 0;\n\n    /**\n     * Offset Y2.\n     */\n    protected int $offsetY2 = 0;\n\n    /**\n     * Width.\n     */\n    protected int $width = 0;\n\n    /**\n     * Height.\n     */\n    protected int $height = 0;\n\n    /**\n     * Pixel width of image. See $width for the size the Drawing will be in the sheet.\n     */\n    protected int $imageWidth = 0;\n\n    /**\n     * Pixel width of image. See $height for the size the Drawing will be in the sheet.\n     */\n    protected int $imageHeight = 0;\n\n    /**\n     * Proportional resize.\n     */\n    protected bool $resizeProportional = true;\n\n    /**\n     * Rotation.\n     */\n    protected int $rotation = 0;\n\n    protected bool $flipVertical = false;\n\n    protected bool $flipHorizontal = false;\n\n    /**\n     * Shadow.\n     */\n    protected Shadow $shadow;\n\n    /**\n     * Image hyperlink.\n     */\n    private ?Hyperlink $hyperlink = null;\n\n    /**\n     * Image type.\n     */\n    protected int $type = IMAGETYPE_UNKNOWN;\n\n    /** @var null|SimpleXMLElement|string[] */\n    protected $srcRect = [];\n\n    /**\n     * Percentage multiplied by 100,000, e.g. 40% = 40,000.\n     * Opacity=x is the same as transparency=100000-x.\n     */\n    protected ?int $opacity = null;\n\n    protected bool $inCell = false;\n\n    protected int $index = 0;\n\n    /**\n     * Create a new BaseDrawing.\n     */\n    public function __construct()\n    {\n        // Initialise values\n        $this->setShadow();\n\n        // Set image index\n        ++self::$imageCounter;\n        $this->imageIndex = self::$imageCounter;\n    }\n\n    public function __destruct()\n    {\n        $this->worksheet = null;\n    }\n\n    public function getImageIndex(): int\n    {\n        return $this->imageIndex;\n    }\n\n    public function getName(): string\n    {\n        return $this->name;\n    }\n\n    public function setName(string $name): self\n    {\n        $this->name = $name;\n\n        return $this;\n    }\n\n    public function getDescription(): string\n    {\n        return $this->description;\n    }\n\n    public function setDescription(string $description): self\n    {\n        $this->description = $description;\n\n        return $this;\n    }\n\n    public function getWorksheet(): ?Worksheet\n    {\n        return $this->worksheet;\n    }\n\n    /**\n     * Set Worksheet.\n     *\n     * @param bool $overrideOld If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet?\n     */\n    public function setWorksheet(?Worksheet $worksheet = null, bool $overrideOld = false): self\n    {\n        if ($this->worksheet === null) {\n            // Add drawing to Worksheet\n            if ($worksheet !== null) {\n                $this->worksheet = $worksheet;\n                if (!($this instanceof Drawing && $this->getPath() === '')) {\n                    $this->worksheet->getCell($this->coordinates);\n                }\n                if ($this->inCell) {\n                    $this->worksheet->getInCellDrawingCollection()\n                        ->append($this);\n                } else {\n                    $this->worksheet->getDrawingCollection()\n                        ->append($this);\n                }\n            }\n        } else {\n            if ($overrideOld) {\n                // Remove drawing from old Worksheet\n                $collections = [\n                    $this->worksheet->getDrawingCollection(),\n                    $this->worksheet->getInCellDrawingCollection(),\n                ];\n\n                foreach ($collections as $collection) {\n                    foreach ($collection as $key => $drawing) {\n                        if ($drawing->getHashCode() === $this->getHashCode()) {\n                            $collection->offsetUnset($key);\n                            $this->worksheet = null;\n\n                            break 2; // break both loops\n                        }\n                    }\n                }\n\n                // Set new Worksheet\n                $this->setWorksheet($worksheet);\n            } else {\n                throw new PhpSpreadsheetException('A Worksheet has already been assigned. Drawings can only exist on one Worksheet.');\n            }\n        }\n\n        return $this;\n    }\n\n    public function getCoordinates(): string\n    {\n        return $this->coordinates;\n    }\n\n    public function setCoordinates(string $coordinates): self\n    {\n        $this->coordinates = $coordinates;\n        if ($this->worksheet !== null) {\n            if (!($this instanceof Drawing && $this->getPath() === '')) {\n                $this->worksheet->getCell($this->coordinates);\n            }\n        }\n\n        return $this;\n    }\n\n    public function getOffsetX(): int\n    {\n        return $this->offsetX;\n    }\n\n    public function setOffsetX(int $offsetX): self\n    {\n        $this->offsetX = $offsetX;\n\n        return $this;\n    }\n\n    public function getOffsetY(): int\n    {\n        return $this->offsetY;\n    }\n\n    public function setOffsetY(int $offsetY): self\n    {\n        $this->offsetY = $offsetY;\n\n        return $this;\n    }\n\n    public function getCoordinates2(): string\n    {\n        return $this->coordinates2;\n    }\n\n    public function setCoordinates2(string $coordinates2): self\n    {\n        $this->coordinates2 = $coordinates2;\n\n        return $this;\n    }\n\n    public function getOffsetX2(): int\n    {\n        return $this->offsetX2;\n    }\n\n    public function setOffsetX2(int $offsetX2): self\n    {\n        $this->offsetX2 = $offsetX2;\n\n        return $this;\n    }\n\n    public function getOffsetY2(): int\n    {\n        return $this->offsetY2;\n    }\n\n    public function setOffsetY2(int $offsetY2): self\n    {\n        $this->offsetY2 = $offsetY2;\n\n        return $this;\n    }\n\n    public function getWidth(): int\n    {\n        return $this->width;\n    }\n\n    public function setWidth(int $width): self\n    {\n        // Resize proportional?\n        if ($this->resizeProportional && $width != 0) {\n            $ratio = $this->height / ($this->width != 0 ? $this->width : 1);\n            $this->height = (int) round($ratio * $width);\n        }\n\n        // Set width\n        $this->width = $width;\n\n        return $this;\n    }\n\n    public function getHeight(): int\n    {\n        return $this->height;\n    }\n\n    public function setHeight(int $height): self\n    {\n        // Resize proportional?\n        if ($this->resizeProportional && $height != 0) {\n            $ratio = $this->width / ($this->height != 0 ? $this->height : 1);\n            $this->width = (int) round($ratio * $height);\n        }\n\n        // Set height\n        $this->height = $height;\n\n        return $this;\n    }\n\n    /**\n     * Set width and height with proportional resize.\n     *\n     * Example:\n     * <code>\n     * $objDrawing->setResizeProportional(true);\n     * $objDrawing->setWidthAndHeight(160,120);\n     * </code>\n     *\n     * @author Vincent@luo MSN:kele_100@hotmail.com\n     */\n    public function setWidthAndHeight(int $width, int $height): self\n    {\n        if ($this->width === 0 || $this->height === 0 || $width === 0 || $height === 0 || !$this->resizeProportional) {\n            $this->width = $width;\n            $this->height = $height;\n        } else {\n            $xratio = $width / $this->width;\n            $yratio = $height / $this->height;\n            if (($xratio * $this->height) < $height) {\n                $this->height = (int) ceil($xratio * $this->height);\n                $this->width = $width;\n            } else {\n                $this->width = (int) ceil($yratio * $this->width);\n                $this->height = $height;\n            }\n        }\n\n        return $this;\n    }\n\n    public function getResizeProportional(): bool\n    {\n        return $this->resizeProportional;\n    }\n\n    public function setResizeProportional(bool $resizeProportional): self\n    {\n        $this->resizeProportional = $resizeProportional;\n\n        return $this;\n    }\n\n    public function getRotation(): int\n    {\n        return $this->rotation;\n    }\n\n    public function setRotation(int $rotation): self\n    {\n        $this->rotation = $rotation;\n\n        return $this;\n    }\n\n    public function getShadow(): Shadow\n    {\n        return $this->shadow;\n    }\n\n    public function setShadow(?Shadow $shadow = null): self\n    {\n        $this->shadow = $shadow ?? new Shadow();\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->name\n            . $this->description\n            . (($this->worksheet === null) ? '' : (string) spl_object_id($this->worksheet))\n            . $this->coordinates\n            . $this->offsetX\n            . $this->offsetY\n            . $this->coordinates2\n            . $this->offsetX2\n            . $this->offsetY2\n            . $this->width\n            . $this->height\n            . $this->rotation\n            . $this->shadow->getHashCode()\n            . __CLASS__\n        );\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if ($key == 'worksheet') {\n                $this->worksheet = null;\n            } elseif (is_object($value)) {\n                $this->$key = clone $value;\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n\n    public function setHyperlink(?Hyperlink $hyperlink = null): void\n    {\n        $this->hyperlink = $hyperlink;\n    }\n\n    public function getHyperlink(): ?Hyperlink\n    {\n        return $this->hyperlink;\n    }\n\n    /**\n     * Set Fact Sizes and Type of Image.\n     */\n    protected function setSizesAndType(string $path): void\n    {\n        if ($this->imageWidth === 0 && $this->imageHeight === 0 && $this->type === IMAGETYPE_UNKNOWN) {\n            $imageData = getimagesize($path);\n\n            if (!empty($imageData)) {\n                $this->imageWidth = $imageData[0];\n                $this->imageHeight = $imageData[1];\n                $this->type = $imageData[2];\n            }\n        }\n        if ($this->width === 0 && $this->height === 0) {\n            $this->width = $this->imageWidth;\n            $this->height = $this->imageHeight;\n        }\n    }\n\n    /**\n     * Get Image Type.\n     */\n    public function getType(): int\n    {\n        return $this->type;\n    }\n\n    public function getImageWidth(): int\n    {\n        return $this->imageWidth;\n    }\n\n    public function getImageHeight(): int\n    {\n        return $this->imageHeight;\n    }\n\n    public function getEditAs(): string\n    {\n        return $this->editAs;\n    }\n\n    public function setEditAs(string $editAs): self\n    {\n        $this->editAs = $editAs;\n\n        return $this;\n    }\n\n    public function validEditAs(): bool\n    {\n        return in_array($this->editAs, self::VALID_EDIT_AS, true);\n    }\n\n    /**\n     * @return null|SimpleXMLElement|string[]\n     */\n    public function getSrcRect()\n    {\n        return $this->srcRect;\n    }\n\n    /**\n     * @param null|SimpleXMLElement|string[] $srcRect\n     */\n    public function setSrcRect($srcRect): self\n    {\n        $this->srcRect = $srcRect;\n\n        return $this;\n    }\n\n    public function setFlipHorizontal(bool $flipHorizontal): self\n    {\n        $this->flipHorizontal = $flipHorizontal;\n\n        return $this;\n    }\n\n    public function getFlipHorizontal(): bool\n    {\n        return $this->flipHorizontal;\n    }\n\n    public function setFlipVertical(bool $flipVertical): self\n    {\n        $this->flipVertical = $flipVertical;\n\n        return $this;\n    }\n\n    public function getFlipVertical(): bool\n    {\n        return $this->flipVertical;\n    }\n\n    public function setOpacity(?int $opacity): self\n    {\n        $this->opacity = $opacity;\n\n        return $this;\n    }\n\n    public function getOpacity(): ?int\n    {\n        return $this->opacity;\n    }\n\n    public function setInCell(bool $inCell): self\n    {\n        $this->inCell = $inCell;\n\n        return $this;\n    }\n\n    public function isInCell(): ?bool\n    {\n        return $this->inCell;\n    }\n\n    public function setIndex(int $index): self\n    {\n        $this->index = $index;\n\n        return $this;\n    }\n\n    public function getIndex(): int\n    {\n        return $this->index;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/CellIterator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse Iterator as NativeIterator;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Collection\\Cells;\n\n/**\n * @template TKey\n *\n * @implements NativeIterator<TKey, Cell>\n */\nabstract class CellIterator implements NativeIterator\n{\n    public const TREAT_NULL_VALUE_AS_EMPTY_CELL = 1;\n\n    public const TREAT_EMPTY_STRING_AS_EMPTY_CELL = 2;\n\n    public const IF_NOT_EXISTS_RETURN_NULL = false;\n\n    public const IF_NOT_EXISTS_CREATE_NEW = true;\n\n    /**\n     * Worksheet to iterate.\n     */\n    protected Worksheet $worksheet;\n\n    /**\n     * Cell Collection to iterate.\n     */\n    protected Cells $cellCollection;\n\n    /**\n     * Iterate only existing cells.\n     */\n    protected bool $onlyExistingCells = false;\n\n    /**\n     * If iterating all cells, and a cell doesn't exist, identifies whether a new cell should be created,\n     *    or if the iterator should return a null value.\n     */\n    protected bool $ifNotExists = self::IF_NOT_EXISTS_CREATE_NEW;\n\n    /**\n     * Destructor.\n     */\n    public function __destruct()\n    {\n        unset($this->worksheet, $this->cellCollection);\n    }\n\n    public function getIfNotExists(): bool\n    {\n        return $this->ifNotExists;\n    }\n\n    public function setIfNotExists(bool $ifNotExists = self::IF_NOT_EXISTS_CREATE_NEW): void\n    {\n        $this->ifNotExists = $ifNotExists;\n    }\n\n    /**\n     * Get loop only existing cells.\n     */\n    public function getIterateOnlyExistingCells(): bool\n    {\n        return $this->onlyExistingCells;\n    }\n\n    /**\n     * Validate start/end values for 'IterateOnlyExistingCells' mode, and adjust if necessary.\n     */\n    abstract protected function adjustForExistingOnlyRange(): void;\n\n    /**\n     * Set the iterator to loop only existing cells.\n     */\n    public function setIterateOnlyExistingCells(bool $value): void\n    {\n        $this->onlyExistingCells = (bool) $value;\n\n        $this->adjustForExistingOnlyRange();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Column.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nclass Column\n{\n    private Worksheet $worksheet;\n\n    /**\n     * Column index.\n     */\n    private string $columnIndex;\n\n    /**\n     * Create a new column.\n     */\n    public function __construct(Worksheet $worksheet, string $columnIndex = 'A')\n    {\n        // Set parent and column index\n        $this->worksheet = $worksheet;\n        $this->columnIndex = $columnIndex;\n    }\n\n    /**\n     * Destructor.\n     */\n    public function __destruct()\n    {\n        unset($this->worksheet);\n    }\n\n    /**\n     * Get column index as string eg: 'A'.\n     */\n    public function getColumnIndex(): string\n    {\n        return $this->columnIndex;\n    }\n\n    /**\n     * Get cell iterator.\n     *\n     * @param int $startRow The row number at which to start iterating\n     * @param ?int $endRow Optionally, the row number at which to stop iterating\n     */\n    public function getCellIterator(int $startRow = 1, ?int $endRow = null, bool $iterateOnlyExistingCells = false): ColumnCellIterator\n    {\n        return new ColumnCellIterator($this->worksheet, $this->columnIndex, $startRow, $endRow, $iterateOnlyExistingCells);\n    }\n\n    /**\n     * Get row iterator. Synonym for getCellIterator().\n     *\n     * @param int $startRow The row number at which to start iterating\n     * @param ?int $endRow Optionally, the row number at which to stop iterating\n     */\n    public function getRowIterator(int $startRow = 1, ?int $endRow = null, bool $iterateOnlyExistingCells = false): ColumnCellIterator\n    {\n        return $this->getCellIterator($startRow, $endRow, $iterateOnlyExistingCells);\n    }\n\n    /**\n     * Returns a boolean true if the column contains no cells. By default, this means that no cell records exist in the\n     *         collection for this column. false will be returned otherwise.\n     *     This rule can be modified by passing a $definitionOfEmptyFlags value:\n     *          1 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL If the only cells in the collection are null value\n     *                  cells, then the column will be considered empty.\n     *          2 - CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are empty\n     *                  string value cells, then the column will be considered empty.\n     *          3 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL\n     *                  If the only cells in the collection are null value or empty string value cells, then the column\n     *                  will be considered empty.\n     *\n     * @param int $definitionOfEmptyFlags\n     *              Possible Flag Values are:\n     *                  CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL\n     *                  CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL\n     * @param int $startRow The row number at which to start checking if cells are empty\n     * @param ?int $endRow Optionally, the row number at which to stop checking if cells are empty\n     */\n    public function isEmpty(int $definitionOfEmptyFlags = 0, int $startRow = 1, ?int $endRow = null): bool\n    {\n        $nullValueCellIsEmpty = (bool) ($definitionOfEmptyFlags & CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL);\n        $emptyStringCellIsEmpty = (bool) ($definitionOfEmptyFlags & CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL);\n\n        $cellIterator = $this->getCellIterator($startRow, $endRow);\n        $cellIterator->setIterateOnlyExistingCells(true);\n        foreach ($cellIterator as $cell) {\n            $value = $cell->getValue();\n            if ($value === null && $nullValueCellIsEmpty === true) {\n                continue;\n            }\n            if ($value === '' && $emptyStringCellIsEmpty === true) {\n                continue;\n            }\n\n            return false;\n        }\n\n        return true;\n    }\n\n    /**\n     * Returns bound worksheet.\n     */\n    public function getWorksheet(): Worksheet\n    {\n        return $this->worksheet;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\n/**\n * @extends CellIterator<int>\n */\nclass ColumnCellIterator extends CellIterator\n{\n    /**\n     * Current iterator position.\n     */\n    private int $currentRow;\n\n    /**\n     * Column index.\n     */\n    private int $columnIndex;\n\n    /**\n     * Start position.\n     */\n    private int $startRow = 1;\n\n    /**\n     * End position.\n     */\n    private int $endRow = 1;\n\n    /**\n     * Create a new row iterator.\n     *\n     * @param Worksheet $worksheet The worksheet to iterate over\n     * @param string $columnIndex The column that we want to iterate\n     * @param int $startRow The row number at which to start iterating\n     * @param ?int $endRow Optionally, the row number at which to stop iterating\n     */\n    public function __construct(Worksheet $worksheet, string $columnIndex = 'A', int $startRow = 1, ?int $endRow = null, bool $iterateOnlyExistingCells = false)\n    {\n        // Set subject\n        $this->worksheet = $worksheet;\n        $this->cellCollection = $worksheet->getCellCollection();\n        $this->columnIndex = Coordinate::columnIndexFromString($columnIndex);\n        $this->resetEnd($endRow);\n        $this->resetStart($startRow);\n        $this->setIterateOnlyExistingCells($iterateOnlyExistingCells);\n    }\n\n    /**\n     * (Re)Set the start row and the current row pointer.\n     *\n     * @param int $startRow The row number at which to start iterating\n     *\n     * @return $this\n     */\n    public function resetStart(int $startRow = 1): static\n    {\n        $this->startRow = $startRow;\n        $this->adjustForExistingOnlyRange();\n        $this->seek($startRow);\n\n        return $this;\n    }\n\n    /**\n     * (Re)Set the end row.\n     *\n     * @param ?int $endRow The row number at which to stop iterating\n     *\n     * @return $this\n     */\n    public function resetEnd(?int $endRow = null): static\n    {\n        $this->endRow = $endRow ?: $this->worksheet->getHighestRow();\n        $this->adjustForExistingOnlyRange();\n\n        return $this;\n    }\n\n    /**\n     * Set the row pointer to the selected row.\n     *\n     * @param int $row The row number to set the current pointer at\n     *\n     * @return $this\n     */\n    public function seek(int $row = 1): static\n    {\n        if (\n            $this->onlyExistingCells\n            && (!$this->cellCollection->has(Coordinate::stringFromColumnIndex($this->columnIndex) . $row))\n        ) {\n            throw new PhpSpreadsheetException('In \"IterateOnlyExistingCells\" mode and Cell does not exist');\n        }\n        if (($row < $this->startRow) || ($row > $this->endRow)) {\n            throw new PhpSpreadsheetException(\"Row $row is out of range ({$this->startRow} - {$this->endRow})\");\n        }\n        $this->currentRow = $row;\n\n        return $this;\n    }\n\n    /**\n     * Rewind the iterator to the starting row.\n     */\n    public function rewind(): void\n    {\n        $this->currentRow = $this->startRow;\n    }\n\n    /**\n     * Return the current cell in this worksheet column.\n     */\n    public function current(): ?Cell\n    {\n        $cellAddress = Coordinate::stringFromColumnIndex($this->columnIndex) . $this->currentRow;\n\n        return $this->cellCollection->has($cellAddress)\n            ? $this->cellCollection->get($cellAddress)\n            : (\n                $this->ifNotExists === self::IF_NOT_EXISTS_CREATE_NEW\n                ? $this->worksheet->createNewCell($cellAddress)\n                : null\n            );\n    }\n\n    /**\n     * Return the current iterator key.\n     */\n    public function key(): int\n    {\n        return $this->currentRow;\n    }\n\n    /**\n     * Set the iterator to its next value.\n     */\n    public function next(): void\n    {\n        $columnAddress = Coordinate::stringFromColumnIndex($this->columnIndex);\n        do {\n            ++$this->currentRow;\n        } while (\n            ($this->onlyExistingCells)\n            && ($this->currentRow <= $this->endRow)\n            && (!$this->cellCollection->has($columnAddress . $this->currentRow))\n        );\n    }\n\n    /**\n     * Set the iterator to its previous value.\n     */\n    public function prev(): void\n    {\n        $columnAddress = Coordinate::stringFromColumnIndex($this->columnIndex);\n        do {\n            --$this->currentRow;\n        } while (\n            ($this->onlyExistingCells)\n            && ($this->currentRow >= $this->startRow)\n            && (!$this->cellCollection->has($columnAddress . $this->currentRow))\n        );\n    }\n\n    /**\n     * Indicate if more rows exist in the worksheet range of rows that we're iterating.\n     */\n    public function valid(): bool\n    {\n        return $this->currentRow <= $this->endRow && $this->currentRow >= $this->startRow;\n    }\n\n    /**\n     * Validate start/end values for \"IterateOnlyExistingCells\" mode, and adjust if necessary.\n     */\n    protected function adjustForExistingOnlyRange(): void\n    {\n        if ($this->onlyExistingCells) {\n            $columnAddress = Coordinate::stringFromColumnIndex($this->columnIndex);\n            while (\n                (!$this->cellCollection->has($columnAddress . $this->startRow))\n                && ($this->startRow <= $this->endRow)\n            ) {\n                ++$this->startRow;\n            }\n            while (\n                (!$this->cellCollection->has($columnAddress . $this->endRow))\n                && ($this->endRow >= $this->startRow)\n            ) {\n                --$this->endRow;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/ColumnDimension.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension as CssDimension;\n\nclass ColumnDimension extends Dimension\n{\n    public const EXCEL_MAX_WIDTH = 255.0;\n\n    /**\n     * Column index.\n     */\n    private ?string $columnIndex;\n\n    /**\n     * Column width.\n     *\n     * When this is set to a negative value, the column width should be ignored by IWriter\n     */\n    private float $width = -1;\n\n    /**\n     * Auto size?\n     */\n    private bool $autoSize = false;\n\n    /**\n     * Create a new ColumnDimension.\n     *\n     * @param ?string $index Character column index\n     */\n    public function __construct(?string $index = 'A')\n    {\n        // Initialise values\n        $this->columnIndex = $index;\n\n        // set dimension as unformatted by default\n        parent::__construct(0);\n    }\n\n    /**\n     * Get column index as string eg: 'A'.\n     */\n    public function getColumnIndex(): ?string\n    {\n        return $this->columnIndex;\n    }\n\n    /**\n     * Set column index as string eg: 'A'.\n     */\n    public function setColumnIndex(string $index): self\n    {\n        $this->columnIndex = $index;\n\n        return $this;\n    }\n\n    /**\n     * Get column index as numeric.\n     */\n    public function getColumnNumeric(): int\n    {\n        return Coordinate::columnIndexFromString($this->columnIndex ?? '');\n    }\n\n    /**\n     * Set column index as numeric.\n     */\n    public function setColumnNumeric(int $index): self\n    {\n        $this->columnIndex = Coordinate::stringFromColumnIndex($index);\n\n        return $this;\n    }\n\n    /**\n     * Get Width.\n     *\n     * Each unit of column width is equal to the width of one character in the default font size. A value of -1\n     *      tells Excel to display this column in its default width.\n     * By default, this will be the return value; but this method also accepts an optional unit of measure argument\n     *    and will convert the returned value to the specified UoM..\n     */\n    public function getWidth(?string $unitOfMeasure = null): float\n    {\n        return ($unitOfMeasure === null || $this->width < 0)\n            ? $this->width\n            : (new CssDimension((string) $this->width))->toUnit($unitOfMeasure);\n    }\n\n    public function getWidthForOutput(bool $restrictMax): float\n    {\n        return ($restrictMax && $this->width > self::EXCEL_MAX_WIDTH) ? self::EXCEL_MAX_WIDTH : $this->width;\n    }\n\n    /**\n     * Set Width.\n     *\n     * Each unit of column width is equal to the width of one character in the default font size. A value of -1\n     *      tells Excel to display this column in its default width.\n     * By default, this will be the unit of measure for the passed value; but this method also accepts an\n     *    optional unit of measure argument, and will convert the value from the specified UoM using an\n     *    approximation method.\n     *\n     * @return $this\n     */\n    public function setWidth(float $width, ?string $unitOfMeasure = null): static\n    {\n        $this->width = ($unitOfMeasure === null || $width < 0)\n            ? $width\n            : (new CssDimension(\"{$width}{$unitOfMeasure}\"))->width();\n\n        return $this;\n    }\n\n    /**\n     * Get Auto Size.\n     */\n    public function getAutoSize(): bool\n    {\n        return $this->autoSize;\n    }\n\n    /**\n     * Set Auto Size.\n     *\n     * @return $this\n     */\n    public function setAutoSize(bool $autosizeEnabled): static\n    {\n        $this->autoSize = $autosizeEnabled;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/ColumnIterator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse Iterator as NativeIterator;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\n/**\n * @implements NativeIterator<string, Column>\n */\nclass ColumnIterator implements NativeIterator\n{\n    /**\n     * Worksheet to iterate.\n     */\n    private Worksheet $worksheet;\n\n    /**\n     * Current iterator position.\n     */\n    private int $currentColumnIndex = 1;\n\n    /**\n     * Start position.\n     */\n    private int $startColumnIndex = 1;\n\n    /**\n     * End position.\n     */\n    private int $endColumnIndex = 1;\n\n    /**\n     * Create a new column iterator.\n     *\n     * @param Worksheet $worksheet The worksheet to iterate over\n     * @param string $startColumn The column address at which to start iterating\n     * @param ?string $endColumn Optionally, the column address at which to stop iterating\n     */\n    public function __construct(Worksheet $worksheet, string $startColumn = 'A', ?string $endColumn = null)\n    {\n        // Set subject\n        $this->worksheet = $worksheet;\n        $this->resetEnd($endColumn);\n        $this->resetStart($startColumn);\n    }\n\n    /**\n     * Destructor.\n     */\n    public function __destruct()\n    {\n        unset($this->worksheet);\n    }\n\n    /**\n     * (Re)Set the start column and the current column pointer.\n     *\n     * @param string $startColumn The column address at which to start iterating\n     *\n     * @return $this\n     */\n    public function resetStart(string $startColumn = 'A'): static\n    {\n        $startColumnIndex = Coordinate::columnIndexFromString($startColumn);\n        if ($startColumnIndex > Coordinate::columnIndexFromString($this->worksheet->getHighestColumn())) {\n            throw new Exception(\n                \"Start column ({$startColumn}) is beyond highest column ({$this->worksheet->getHighestColumn()})\"\n            );\n        }\n\n        $this->startColumnIndex = $startColumnIndex;\n        if ($this->endColumnIndex < $this->startColumnIndex) {\n            $this->endColumnIndex = $this->startColumnIndex;\n        }\n        $this->seek($startColumn);\n\n        return $this;\n    }\n\n    /**\n     * (Re)Set the end column.\n     *\n     * @param ?string $endColumn The column address at which to stop iterating\n     *\n     * @return $this\n     */\n    public function resetEnd(?string $endColumn = null): static\n    {\n        $endColumn = $endColumn ?: $this->worksheet->getHighestColumn();\n        $this->endColumnIndex = Coordinate::columnIndexFromString($endColumn);\n\n        return $this;\n    }\n\n    /**\n     * Set the column pointer to the selected column.\n     *\n     * @param string $column The column address to set the current pointer at\n     *\n     * @return $this\n     */\n    public function seek(string $column = 'A'): static\n    {\n        $column = Coordinate::columnIndexFromString($column);\n        if (($column < $this->startColumnIndex) || ($column > $this->endColumnIndex)) {\n            throw new PhpSpreadsheetException(\n                \"Column $column is out of range ({$this->startColumnIndex} - {$this->endColumnIndex})\"\n            );\n        }\n        $this->currentColumnIndex = $column;\n\n        return $this;\n    }\n\n    /**\n     * Rewind the iterator to the starting column.\n     */\n    public function rewind(): void\n    {\n        $this->currentColumnIndex = $this->startColumnIndex;\n    }\n\n    /**\n     * Return the current column in this worksheet.\n     */\n    public function current(): Column\n    {\n        return new Column($this->worksheet, Coordinate::stringFromColumnIndex($this->currentColumnIndex));\n    }\n\n    /**\n     * Return the current iterator key.\n     */\n    public function key(): string\n    {\n        return Coordinate::stringFromColumnIndex($this->currentColumnIndex);\n    }\n\n    /**\n     * Set the iterator to its next value.\n     */\n    public function next(): void\n    {\n        ++$this->currentColumnIndex;\n    }\n\n    /**\n     * Set the iterator to its previous value.\n     */\n    public function prev(): void\n    {\n        --$this->currentColumnIndex;\n    }\n\n    /**\n     * Indicate if more columns exist in the worksheet range of columns that we're iterating.\n     */\n    public function valid(): bool\n    {\n        return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Dimension.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nabstract class Dimension\n{\n    /**\n     * Visible?\n     */\n    private bool $visible = true;\n\n    /**\n     * Outline level.\n     */\n    private int $outlineLevel = 0;\n\n    /**\n     * Collapsed.\n     */\n    private bool $collapsed = false;\n\n    /**\n     * Index to cellXf. Null value means row has no explicit cellXf format.\n     */\n    private ?int $xfIndex;\n\n    /**\n     * Create a new Dimension.\n     *\n     * @param ?int $initialValue Numeric row index\n     */\n    public function __construct(?int $initialValue = null)\n    {\n        // set dimension as unformatted by default\n        $this->xfIndex = $initialValue;\n    }\n\n    /**\n     * Get Visible.\n     */\n    public function getVisible(): bool\n    {\n        return $this->visible;\n    }\n\n    /**\n     * Set Visible.\n     *\n     * @return $this\n     */\n    public function setVisible(bool $visible)\n    {\n        $this->visible = $visible;\n\n        return $this;\n    }\n\n    /**\n     * Get Outline Level.\n     */\n    public function getOutlineLevel(): int\n    {\n        return $this->outlineLevel;\n    }\n\n    /**\n     * Set Outline Level.\n     * Value must be between 0 and 7.\n     *\n     * @return $this\n     */\n    public function setOutlineLevel(int $level)\n    {\n        if ($level < 0 || $level > 7) {\n            throw new PhpSpreadsheetException('Outline level must range between 0 and 7.');\n        }\n\n        $this->outlineLevel = $level;\n\n        return $this;\n    }\n\n    /**\n     * Get Collapsed.\n     */\n    public function getCollapsed(): bool\n    {\n        return $this->collapsed;\n    }\n\n    /**\n     * Set Collapsed.\n     *\n     * @return $this\n     */\n    public function setCollapsed(bool $collapsed)\n    {\n        $this->collapsed = $collapsed;\n\n        return $this;\n    }\n\n    /**\n     * Get index to cellXf.\n     */\n    public function getXfIndex(): ?int\n    {\n        return $this->xfIndex;\n    }\n\n    /**\n     * Set index to cellXf.\n     *\n     * @return $this\n     */\n    public function setXfIndex(int $XfIndex)\n    {\n        $this->xfIndex = $XfIndex;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\n\nuse PhpOffice\\PhpSpreadsheet\\IComparable;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\n\nclass Shadow implements IComparable\n{\n    // Shadow alignment\n    const SHADOW_BOTTOM = 'b';\n    const SHADOW_BOTTOM_LEFT = 'bl';\n    const SHADOW_BOTTOM_RIGHT = 'br';\n    const SHADOW_CENTER = 'ctr';\n    const SHADOW_LEFT = 'l';\n    const SHADOW_TOP = 't';\n    const SHADOW_TOP_LEFT = 'tl';\n    const SHADOW_TOP_RIGHT = 'tr';\n\n    /**\n     * Visible.\n     */\n    private bool $visible;\n\n    /**\n     * Blur radius.\n     *\n     * Defaults to 6\n     */\n    private int $blurRadius;\n\n    /**\n     * Shadow distance.\n     *\n     * Defaults to 2\n     */\n    private int $distance;\n\n    /**\n     * Shadow direction (in degrees).\n     */\n    private int $direction;\n\n    /**\n     * Shadow alignment.\n     */\n    private string $alignment;\n\n    /**\n     * Color.\n     */\n    private Color $color;\n\n    /**\n     * Alpha.\n     */\n    private int $alpha;\n\n    /**\n     * Create a new Shadow.\n     */\n    public function __construct()\n    {\n        // Initialise values\n        $this->visible = false;\n        $this->blurRadius = 6;\n        $this->distance = 2;\n        $this->direction = 0;\n        $this->alignment = self::SHADOW_BOTTOM_RIGHT;\n        $this->color = new Color(Color::COLOR_BLACK);\n        $this->alpha = 50;\n    }\n\n    /**\n     * Get Visible.\n     */\n    public function getVisible(): bool\n    {\n        return $this->visible;\n    }\n\n    /**\n     * Set Visible.\n     *\n     * @return $this\n     */\n    public function setVisible(bool $visible): static\n    {\n        $this->visible = $visible;\n\n        return $this;\n    }\n\n    /**\n     * Get Blur radius.\n     */\n    public function getBlurRadius(): int\n    {\n        return $this->blurRadius;\n    }\n\n    /**\n     * Set Blur radius.\n     *\n     * @return $this\n     */\n    public function setBlurRadius(int $blurRadius): static\n    {\n        $this->blurRadius = $blurRadius;\n\n        return $this;\n    }\n\n    /**\n     * Get Shadow distance.\n     */\n    public function getDistance(): int\n    {\n        return $this->distance;\n    }\n\n    /**\n     * Set Shadow distance.\n     *\n     * @return $this\n     */\n    public function setDistance(int $distance): static\n    {\n        $this->distance = $distance;\n\n        return $this;\n    }\n\n    /**\n     * Get Shadow direction (in degrees).\n     */\n    public function getDirection(): int\n    {\n        return $this->direction;\n    }\n\n    /**\n     * Set Shadow direction (in degrees).\n     *\n     * @return $this\n     */\n    public function setDirection(int $direction): static\n    {\n        $this->direction = $direction;\n\n        return $this;\n    }\n\n    /**\n     * Get Shadow alignment.\n     */\n    public function getAlignment(): string\n    {\n        return $this->alignment;\n    }\n\n    /**\n     * Set Shadow alignment.\n     *\n     * @return $this\n     */\n    public function setAlignment(string $alignment): static\n    {\n        $this->alignment = $alignment;\n\n        return $this;\n    }\n\n    /**\n     * Get Color.\n     */\n    public function getColor(): Color\n    {\n        return $this->color;\n    }\n\n    /**\n     * Set Color.\n     *\n     * @return $this\n     */\n    public function setColor(Color $color): static\n    {\n        $this->color = $color;\n\n        return $this;\n    }\n\n    /**\n     * Get Alpha.\n     */\n    public function getAlpha(): int\n    {\n        return $this->alpha;\n    }\n\n    /**\n     * Set Alpha.\n     *\n     * @return $this\n     */\n    public function setAlpha(int $alpha): static\n    {\n        $this->alpha = $alpha;\n\n        return $this;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            ($this->visible ? 't' : 'f')\n            . $this->blurRadius\n            . $this->distance\n            . $this->direction\n            . $this->alignment\n            . $this->color->getHashCode()\n            . $this->alpha\n            . __CLASS__\n        );\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                $this->$key = clone $value;\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Drawing.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse ZipArchive;\n\nclass Drawing extends BaseDrawing\n{\n    const IMAGE_TYPES_CONVERTION_MAP = [\n        IMAGETYPE_GIF => IMAGETYPE_PNG,\n        IMAGETYPE_JPEG => IMAGETYPE_JPEG,\n        IMAGETYPE_PNG => IMAGETYPE_PNG,\n        IMAGETYPE_BMP => IMAGETYPE_PNG,\n    ];\n\n    /**\n     * Path.\n     */\n    private string $path;\n\n    /**\n     * Whether or not we are dealing with a URL.\n     */\n    private bool $isUrl;\n\n    /**\n     * Create a new Drawing.\n     */\n    public function __construct()\n    {\n        // Initialise values\n        $this->path = '';\n        $this->isUrl = false;\n\n        // Initialize parent\n        parent::__construct();\n    }\n\n    /**\n     * Get Filename.\n     */\n    public function getFilename(): string\n    {\n        return basename($this->path);\n    }\n\n    /**\n     * Get indexed filename (using image index).\n     */\n    public function getIndexedFilename(): string\n    {\n        return md5($this->path) . '.' . $this->getExtension();\n    }\n\n    /**\n     * Get Extension.\n     */\n    public function getExtension(): string\n    {\n        $exploded = explode('.', basename($this->path));\n\n        return $exploded[count($exploded) - 1];\n    }\n\n    /**\n     * Get full filepath to store drawing in zip archive.\n     */\n    public function getMediaFilename(): string\n    {\n        if (!array_key_exists($this->type, self::IMAGE_TYPES_CONVERTION_MAP)) {\n            throw new PhpSpreadsheetException('Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        return sprintf('image%d%s', $this->getImageIndex(), $this->getImageFileExtensionForSave());\n    }\n\n    /**\n     * Get Path.\n     */\n    public function getPath(): string\n    {\n        return $this->path;\n    }\n\n    /**\n     * Set Path.\n     *\n     * @param string $path File path\n     * @param bool $verifyFile Verify file\n     * @param ?ZipArchive $zip Zip archive instance\n     * @param null|callable(string):bool $isWhitelisted\n     *\n     * @return $this\n     */\n    public function setPath(string $path, bool $verifyFile = true, ?ZipArchive $zip = null, bool $allowExternal = true, ?callable $isWhitelisted = null): static\n    {\n        $this->isUrl = false;\n        if (preg_match('~^data:image/[a-z]+;base64,~', $path) === 1) {\n            $this->path = $path;\n\n            return $this;\n        }\n\n        $this->path = '';\n        if ($zip instanceof ZipArchive) {\n            $zipPath = explode('#', $path)[1];\n            $locate = @$zip->locateName($zipPath);\n            if ($locate !== false) {\n                if ($this->isImage($path)) {\n                    $this->path = $path;\n                    $this->setSizesAndType($path);\n                }\n            }\n        // Check if a URL has been passed. https://stackoverflow.com/a/2058596/1252979\n        } elseif (filter_var($path, FILTER_VALIDATE_URL) || (preg_match('/^([\\w\\s\\x00-\\x1f]+):/u', $path) && !preg_match('/^([\\w]+):/u', $path))) {\n            if (!preg_match('/^(http|https|file|ftp|s3):/', $path)) {\n                throw new PhpSpreadsheetException('Invalid protocol for linked drawing');\n            }\n            if (!$allowExternal) {\n                return $this;\n            }\n            if ($isWhitelisted !== null && !$isWhitelisted($path)) {\n                return $this;\n            }\n            // Implicit that it is a URL, rather store info than running check above on value in other places.\n            $this->isUrl = true;\n            $ctx = null;\n            // https://github.com/php/php-src/issues/16023\n            // https://github.com/php/php-src/issues/17121\n            if (str_starts_with($path, 'https:') || str_starts_with($path, 'http:')) {\n                $ctxArray = [\n                    'http' => [\n                        'user_agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',\n                        'header' => [\n                            //'Connection: keep-alive', // unacceptable performance\n                            'Accept: image/*;q=0.9,*/*;q=0.8',\n                        ],\n                    ],\n                ];\n                if (str_starts_with($path, 'https:')) {\n                    $ctxArray['ssl'] = ['crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT];\n                }\n                $ctx = stream_context_create($ctxArray);\n            }\n            $imageContents = @file_get_contents($path, false, $ctx);\n            if ($imageContents !== false) {\n                $filePath = tempnam(sys_get_temp_dir(), 'Drawing');\n                if ($filePath) {\n                    $put = @file_put_contents($filePath, $imageContents);\n                    if ($put !== false) {\n                        if ($this->isImage($filePath)) {\n                            $this->path = $path;\n                            $this->setSizesAndType($filePath);\n                        }\n                        unlink($filePath);\n                    }\n                }\n            }\n        } else {\n            $exists = @file_exists($path);\n            if ($exists !== false && $this->isImage($path)) {\n                $this->path = $path;\n                $this->setSizesAndType($path);\n            }\n        }\n        if ($this->path === '' && $verifyFile) {\n            throw new PhpSpreadsheetException(\"File $path not found!\");\n        }\n\n        if ($this->worksheet !== null) {\n            if ($this->path !== '') {\n                $this->worksheet->getCell($this->coordinates);\n            }\n        }\n\n        return $this;\n    }\n\n    private function isImage(string $path): bool\n    {\n        $mime = (string) @mime_content_type($path);\n        $retVal = false;\n        if (str_starts_with($mime, 'image/')) {\n            $retVal = true;\n        } elseif ($mime === 'application/octet-stream') {\n            $extension = pathinfo($path, PATHINFO_EXTENSION);\n            $retVal = in_array($extension, ['bin', 'emf'], true);\n        }\n\n        return $retVal;\n    }\n\n    /**\n     * Get isURL.\n     */\n    public function getIsURL(): bool\n    {\n        return $this->isUrl;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->path\n            . parent::getHashCode()\n            . __CLASS__\n        );\n    }\n\n    /**\n     * Get Image Type for Save.\n     */\n    public function getImageTypeForSave(): int\n    {\n        if (!array_key_exists($this->type, self::IMAGE_TYPES_CONVERTION_MAP)) {\n            throw new PhpSpreadsheetException('Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        return self::IMAGE_TYPES_CONVERTION_MAP[$this->type];\n    }\n\n    /**\n     * Get Image file extension for Save.\n     */\n    public function getImageFileExtensionForSave(bool $includeDot = true): string\n    {\n        if (!array_key_exists($this->type, self::IMAGE_TYPES_CONVERTION_MAP)) {\n            throw new PhpSpreadsheetException('Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        $result = image_type_to_extension(self::IMAGE_TYPES_CONVERTION_MAP[$this->type], $includeDot);\n\n        return \"$result\";\n    }\n\n    /**\n     * Get Image mime type.\n     */\n    public function getImageMimeType(): string\n    {\n        if (!array_key_exists($this->type, self::IMAGE_TYPES_CONVERTION_MAP)) {\n            throw new PhpSpreadsheetException('Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        return image_type_to_mime_type(self::IMAGE_TYPES_CONVERTION_MAP[$this->type]);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/HeaderFooter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\n/**\n * <code>\n * Header/Footer Formatting Syntax taken from Office Open XML Part 4 - Markup Language Reference, page 1970:.\n *\n * There are a number of formatting codes that can be written inline with the actual header / footer text, which\n * affect the formatting in the header or footer.\n *\n * Example: This example shows the text \"Center Bold Header\" on the first line (center section), and the date on\n * the second line (center section).\n *         &CCenter &\"-,Bold\"Bold&\"-,Regular\"Header_x000A_&D\n *\n * General Rules:\n * There is no required order in which these codes must appear.\n *\n * The first occurrence of the following codes turns the formatting ON, the second occurrence turns it OFF again:\n * - strikethrough\n * - superscript\n * - subscript\n * Superscript and subscript cannot both be ON at same time. Whichever comes first wins and the other is ignored,\n * while the first is ON.\n * &L - code for \"left section\" (there are three header / footer locations, \"left\", \"center\", and \"right\"). When\n * two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the\n * order of appearance, and placed into the left section.\n * &P - code for \"current page #\"\n * &N - code for \"total pages\"\n * &font size - code for \"text font size\", where font size is a font size in points.\n * &K - code for \"text font color\"\n * RGB Color is specified as RRGGBB\n * Theme Color is specified as TTSNN where TT is the theme color Id, S is either \"+\" or \"-\" of the tint/shade\n * value, NN is the tint/shade value.\n * &S - code for \"text strikethrough\" on / off\n * &X - code for \"text super script\" on / off\n * &Y - code for \"text subscript\" on / off\n * &C - code for \"center section\". When two or more occurrences of this section marker exist, the contents\n * from all markers are concatenated, in the order of appearance, and placed into the center section.\n *\n * &D - code for \"date\"\n * &T - code for \"time\"\n * &G - code for \"picture as background\"\n * &U - code for \"text single underline\"\n * &E - code for \"double underline\"\n * &R - code for \"right section\". When two or more occurrences of this section marker exist, the contents\n * from all markers are concatenated, in the order of appearance, and placed into the right section.\n * &Z - code for \"this workbook's file path\"\n * &F - code for \"this workbook's file name\"\n * &A - code for \"sheet tab name\"\n * &+ - code for add to page #.\n * &- - code for subtract from page #.\n * &\"font name,font type\" - code for \"text font name\" and \"text font type\", where font name and font type\n * are strings specifying the name and type of the font, separated by a comma. When a hyphen appears in font\n * name, it means \"none specified\". Both of font name and font type can be localized values.\n * &\"-,Bold\" - code for \"bold font style\"\n * &B - also means \"bold font style\".\n * &\"-,Regular\" - code for \"regular font style\"\n * &\"-,Italic\" - code for \"italic font style\"\n * &I - also means \"italic font style\"\n * &\"-,Bold Italic\" code for \"bold italic font style\"\n * &O - code for \"outline style\"\n * &H - code for \"shadow style\"\n * </code>\n */\nclass HeaderFooter\n{\n    // Header/footer image location\n    const IMAGE_HEADER_LEFT = 'LH';\n    const IMAGE_HEADER_LEFT_ODD = 'LH';\n    const IMAGE_HEADER_LEFT_FIRST = 'LHFIRST';\n    const IMAGE_HEADER_LEFT_EVEN = 'LHEVEN';\n    const IMAGE_HEADER_CENTER = 'CH';\n    const IMAGE_HEADER_CENTER_ODD = 'CH';\n    const IMAGE_HEADER_CENTER_FIRST = 'CHFIRST';\n    const IMAGE_HEADER_CENTER_EVEN = 'CHEVEN';\n    const IMAGE_HEADER_RIGHT = 'RH';\n    const IMAGE_HEADER_RIGHT_ODD = 'RH';\n    const IMAGE_HEADER_RIGHT_FIRST = 'RHFIRST';\n    const IMAGE_HEADER_RIGHT_EVEN = 'RHEVEN';\n    const IMAGE_FOOTER_LEFT = 'LF';\n    const IMAGE_FOOTER_LEFT_ODD = 'LF';\n    const IMAGE_FOOTER_LEFT_FIRST = 'LFFIRST';\n    const IMAGE_FOOTER_LEFT_EVEN = 'LFEVEN';\n    const IMAGE_FOOTER_CENTER = 'CF';\n    const IMAGE_FOOTER_CENTER_ODD = 'CF';\n    const IMAGE_FOOTER_CENTER_FIRST = 'CFFIRST';\n    const IMAGE_FOOTER_CENTER_EVEN = 'CFEVEN';\n    const IMAGE_FOOTER_RIGHT = 'RF';\n    const IMAGE_FOOTER_RIGHT_ODD = 'RF';\n    const IMAGE_FOOTER_RIGHT_FIRST = 'RFFIRST';\n    const IMAGE_FOOTER_RIGHT_EVEN = 'RFEVEN';\n\n    /**\n     * OddHeader.\n     */\n    private string $oddHeader = '';\n\n    /**\n     * OddFooter.\n     */\n    private string $oddFooter = '';\n\n    /**\n     * EvenHeader.\n     */\n    private string $evenHeader = '';\n\n    /**\n     * EvenFooter.\n     */\n    private string $evenFooter = '';\n\n    /**\n     * FirstHeader.\n     */\n    private string $firstHeader = '';\n\n    /**\n     * FirstFooter.\n     */\n    private string $firstFooter = '';\n\n    /**\n     * Different header for Odd/Even, defaults to false.\n     */\n    private bool $differentOddEven = false;\n\n    /**\n     * Different header for first page, defaults to false.\n     */\n    private bool $differentFirst = false;\n\n    /**\n     * Scale with document, defaults to true.\n     */\n    private bool $scaleWithDocument = true;\n\n    /**\n     * Align with margins, defaults to true.\n     */\n    private bool $alignWithMargins = true;\n\n    /**\n     * Header/footer images.\n     *\n     * @var HeaderFooterDrawing[]\n     */\n    private array $headerFooterImages = [];\n\n    /**\n     * Create a new HeaderFooter.\n     */\n    public function __construct()\n    {\n    }\n\n    /**\n     * Get OddHeader.\n     */\n    public function getOddHeader(): string\n    {\n        return $this->oddHeader;\n    }\n\n    /**\n     * Set OddHeader.\n     *\n     * @return $this\n     */\n    public function setOddHeader(string $oddHeader): static\n    {\n        $this->oddHeader = $oddHeader;\n\n        return $this;\n    }\n\n    /**\n     * Get OddFooter.\n     */\n    public function getOddFooter(): string\n    {\n        return $this->oddFooter;\n    }\n\n    /**\n     * Set OddFooter.\n     *\n     * @return $this\n     */\n    public function setOddFooter(string $oddFooter): static\n    {\n        $this->oddFooter = $oddFooter;\n\n        return $this;\n    }\n\n    /**\n     * Get EvenHeader.\n     */\n    public function getEvenHeader(): string\n    {\n        return $this->evenHeader;\n    }\n\n    /**\n     * Set EvenHeader.\n     *\n     * @return $this\n     */\n    public function setEvenHeader(string $eventHeader): static\n    {\n        $this->evenHeader = $eventHeader;\n\n        return $this;\n    }\n\n    /**\n     * Get EvenFooter.\n     */\n    public function getEvenFooter(): string\n    {\n        return $this->evenFooter;\n    }\n\n    /**\n     * Set EvenFooter.\n     *\n     * @return $this\n     */\n    public function setEvenFooter(string $evenFooter): static\n    {\n        $this->evenFooter = $evenFooter;\n\n        return $this;\n    }\n\n    /**\n     * Get FirstHeader.\n     */\n    public function getFirstHeader(): string\n    {\n        return $this->firstHeader;\n    }\n\n    /**\n     * Set FirstHeader.\n     *\n     * @return $this\n     */\n    public function setFirstHeader(string $firstHeader): static\n    {\n        $this->firstHeader = $firstHeader;\n\n        return $this;\n    }\n\n    /**\n     * Get FirstFooter.\n     */\n    public function getFirstFooter(): string\n    {\n        return $this->firstFooter;\n    }\n\n    /**\n     * Set FirstFooter.\n     *\n     * @return $this\n     */\n    public function setFirstFooter(string $firstFooter): static\n    {\n        $this->firstFooter = $firstFooter;\n\n        return $this;\n    }\n\n    /**\n     * Get DifferentOddEven.\n     */\n    public function getDifferentOddEven(): bool\n    {\n        return $this->differentOddEven;\n    }\n\n    /**\n     * Set DifferentOddEven.\n     *\n     * @return $this\n     */\n    public function setDifferentOddEven(bool $differentOddEvent): static\n    {\n        $this->differentOddEven = $differentOddEvent;\n\n        return $this;\n    }\n\n    /**\n     * Get DifferentFirst.\n     */\n    public function getDifferentFirst(): bool\n    {\n        return $this->differentFirst;\n    }\n\n    /**\n     * Set DifferentFirst.\n     *\n     * @return $this\n     */\n    public function setDifferentFirst(bool $differentFirst): static\n    {\n        $this->differentFirst = $differentFirst;\n\n        return $this;\n    }\n\n    /**\n     * Get ScaleWithDocument.\n     */\n    public function getScaleWithDocument(): bool\n    {\n        return $this->scaleWithDocument;\n    }\n\n    /**\n     * Set ScaleWithDocument.\n     *\n     * @return $this\n     */\n    public function setScaleWithDocument(bool $scaleWithDocument): static\n    {\n        $this->scaleWithDocument = $scaleWithDocument;\n\n        return $this;\n    }\n\n    /**\n     * Get AlignWithMargins.\n     */\n    public function getAlignWithMargins(): bool\n    {\n        return $this->alignWithMargins;\n    }\n\n    /**\n     * Set AlignWithMargins.\n     *\n     * @return $this\n     */\n    public function setAlignWithMargins(bool $alignWithMargins): static\n    {\n        $this->alignWithMargins = $alignWithMargins;\n\n        return $this;\n    }\n\n    /**\n     * Add header/footer image.\n     *\n     * @return $this\n     */\n    public function addImage(HeaderFooterDrawing $image, string $location = self::IMAGE_HEADER_LEFT): static\n    {\n        $this->headerFooterImages[$location] = $image;\n\n        return $this;\n    }\n\n    /**\n     * Remove header/footer image.\n     *\n     * @return $this\n     */\n    public function removeImage(string $location = self::IMAGE_HEADER_LEFT): static\n    {\n        if (isset($this->headerFooterImages[$location])) {\n            unset($this->headerFooterImages[$location]);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set header/footer images.\n     *\n     * @param HeaderFooterDrawing[] $images\n     *\n     * @return $this\n     */\n    public function setImages(array $images): static\n    {\n        $this->headerFooterImages = $images;\n\n        return $this;\n    }\n\n    private const IMAGE_SORT_ORDER = [\n        self::IMAGE_HEADER_LEFT,\n        self::IMAGE_HEADER_LEFT_FIRST,\n        self::IMAGE_HEADER_LEFT_EVEN,\n        self::IMAGE_HEADER_CENTER,\n        self::IMAGE_HEADER_CENTER_FIRST,\n        self::IMAGE_HEADER_CENTER_EVEN,\n        self::IMAGE_HEADER_RIGHT,\n        self::IMAGE_HEADER_RIGHT_FIRST,\n        self::IMAGE_HEADER_RIGHT_EVEN,\n        self::IMAGE_FOOTER_LEFT,\n        self::IMAGE_FOOTER_LEFT_FIRST,\n        self::IMAGE_FOOTER_LEFT_EVEN,\n        self::IMAGE_FOOTER_CENTER,\n        self::IMAGE_FOOTER_CENTER_FIRST,\n        self::IMAGE_FOOTER_CENTER_EVEN,\n        self::IMAGE_FOOTER_RIGHT,\n        self::IMAGE_FOOTER_RIGHT_FIRST,\n        self::IMAGE_FOOTER_RIGHT_EVEN,\n    ];\n\n    /**\n     * Get header/footer images.\n     *\n     * @return HeaderFooterDrawing[]\n     */\n    public function getImages(): array\n    {\n        // Sort array - not sure why needed\n        $images = [];\n        foreach (self::IMAGE_SORT_ORDER as $key) {\n            if (isset($this->headerFooterImages[$key])) {\n                $images[$key] = $this->headerFooterImages[$key];\n            }\n        }\n        $this->headerFooterImages = $images;\n\n        return $this->headerFooterImages;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                $this->$key = clone $value;\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nclass HeaderFooterDrawing extends Drawing\n{\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->getPath()\n            . $this->name\n            . $this->offsetX\n            . $this->offsetY\n            . $this->width\n            . $this->height\n            . __CLASS__\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Iterator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\n/**\n * @implements \\Iterator<int, Worksheet>\n */\nclass Iterator implements \\Iterator\n{\n    /**\n     * Spreadsheet to iterate.\n     */\n    private Spreadsheet $subject;\n\n    /**\n     * Current iterator position.\n     */\n    private int $position = 0;\n\n    /**\n     * Create a new worksheet iterator.\n     */\n    public function __construct(Spreadsheet $subject)\n    {\n        // Set subject\n        $this->subject = $subject;\n    }\n\n    /**\n     * Rewind iterator.\n     */\n    public function rewind(): void\n    {\n        $this->position = 0;\n    }\n\n    /**\n     * Current Worksheet.\n     */\n    public function current(): Worksheet\n    {\n        return $this->subject->getSheet($this->position);\n    }\n\n    /**\n     * Current key.\n     */\n    public function key(): int\n    {\n        return $this->position;\n    }\n\n    /**\n     * Next value.\n     */\n    public function next(): void\n    {\n        ++$this->position;\n    }\n\n    /**\n     * Are there more Worksheet instances available?\n     */\n    public function valid(): bool\n    {\n        return $this->position < $this->subject->getSheetCount() && $this->position >= 0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/MemoryDrawing.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse GdImage;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\n\nclass MemoryDrawing extends BaseDrawing\n{\n    // Rendering functions\n    const RENDERING_DEFAULT = 'imagepng';\n    const RENDERING_PNG = 'imagepng';\n    const RENDERING_GIF = 'imagegif';\n    const RENDERING_JPEG = 'imagejpeg';\n\n    // MIME types\n    const MIMETYPE_DEFAULT = 'image/png';\n    const MIMETYPE_PNG = 'image/png';\n    const MIMETYPE_GIF = 'image/gif';\n    const MIMETYPE_JPEG = 'image/jpeg';\n\n    const SUPPORTED_MIME_TYPES = [\n        self::MIMETYPE_GIF,\n        self::MIMETYPE_JPEG,\n        self::MIMETYPE_PNG,\n    ];\n\n    /**\n     * Image resource.\n     */\n    private null|GdImage $imageResource = null;\n\n    /**\n     * Rendering function.\n     *\n     * @var callable-string\n     */\n    private string $renderingFunction;\n\n    /**\n     * Mime type.\n     */\n    private string $mimeType;\n\n    /**\n     * Unique name.\n     */\n    private string $uniqueName;\n\n    /**\n     * Create a new MemoryDrawing.\n     */\n    public function __construct()\n    {\n        // Initialise values\n        $this->renderingFunction = self::RENDERING_DEFAULT;\n        $this->mimeType = self::MIMETYPE_DEFAULT;\n        $this->uniqueName = md5(mt_rand(0, 9999) . time() . mt_rand(0, 9999));\n\n        // Initialize parent\n        parent::__construct();\n    }\n\n    public function __destruct()\n    {\n        $this->imageResource = null;\n        $this->worksheet = null;\n    }\n\n    public function __clone()\n    {\n        parent::__clone();\n        $this->cloneResource();\n    }\n\n    private function cloneResource(): void\n    {\n        if (!$this->imageResource) {\n            return;\n        }\n\n        $width = (int) imagesx($this->imageResource);\n        $height = (int) imagesy($this->imageResource);\n\n        if (imageistruecolor($this->imageResource)) {\n            $clone = imagecreatetruecolor($width, $height);\n            if (!$clone) {\n                throw new Exception('Could not clone image resource');\n            }\n\n            imagealphablending($clone, false);\n            imagesavealpha($clone, true);\n        } else {\n            $clone = imagecreate($width, $height);\n            if (!$clone) {\n                throw new Exception('Could not clone image resource');\n            }\n\n            // If the image has transparency...\n            $transparent = imagecolortransparent($this->imageResource);\n            if ($transparent >= 0) {\n                // Starting with Php8.0, next function throws rather than return false\n                $rgb = imagecolorsforindex($this->imageResource, $transparent);\n\n                imagesavealpha($clone, true);\n                $color = imagecolorallocatealpha($clone, $rgb['red'], $rgb['green'], $rgb['blue'], $rgb['alpha']);\n                if ($color === false) {\n                    throw new Exception('Could not get image alpha color');\n                }\n\n                imagefill($clone, 0, 0, $color);\n            }\n        }\n\n        //Create the Clone!!\n        imagecopy($clone, $this->imageResource, 0, 0, 0, 0, $width, $height);\n\n        $this->imageResource = $clone;\n    }\n\n    /**\n     * @param resource $imageStream Stream data to be converted to a Memory Drawing\n     *\n     * @throws Exception\n     */\n    public static function fromStream($imageStream): self\n    {\n        $streamValue = stream_get_contents($imageStream);\n\n        return self::fromString($streamValue);\n    }\n\n    /**\n     * @param string $imageString String data to be converted to a Memory Drawing\n     *\n     * @throws Exception\n     */\n    public static function fromString(string $imageString): self\n    {\n        $gdImage = @imagecreatefromstring($imageString);\n        if ($gdImage === false) {\n            throw new Exception('Value cannot be converted to an image');\n        }\n\n        $mimeType = self::identifyMimeType($imageString);\n        if (imageistruecolor($gdImage) || imagecolortransparent($gdImage) >= 0) {\n            imagesavealpha($gdImage, true);\n        }\n        $renderingFunction = self::identifyRenderingFunction($mimeType);\n\n        $drawing = new self();\n        $drawing->setImageResource($gdImage);\n        $drawing->setRenderingFunction($renderingFunction);\n        $drawing->setMimeType($mimeType);\n\n        return $drawing;\n    }\n\n    /** @return callable-string */\n    private static function identifyRenderingFunction(string $mimeType): string\n    {\n        return match ($mimeType) {\n            self::MIMETYPE_PNG => self::RENDERING_PNG,\n            self::MIMETYPE_JPEG => self::RENDERING_JPEG,\n            self::MIMETYPE_GIF => self::RENDERING_GIF,\n            default => self::RENDERING_DEFAULT,\n        };\n    }\n\n    /**\n     * @throws Exception\n     */\n    private static function identifyMimeType(string $imageString): string\n    {\n        $temporaryFileName = File::temporaryFilename();\n        file_put_contents($temporaryFileName, $imageString);\n\n        $mimeType = self::identifyMimeTypeUsingGd($temporaryFileName);\n        if ($mimeType !== null) {\n            unlink($temporaryFileName);\n\n            return $mimeType;\n        }\n\n        unlink($temporaryFileName);\n\n        return self::MIMETYPE_DEFAULT;\n    }\n\n    /** @internal */\n    protected static string $getImageSize = 'getImageSize';\n\n    private static function identifyMimeTypeUsingGd(string $temporaryFileName): ?string\n    {\n        if (function_exists(static::$getImageSize)) {\n            $imageSize = @getimagesize($temporaryFileName);\n            if (is_array($imageSize)) {\n                $mimeType = $imageSize['mime'];\n\n                return self::supportedMimeTypes($mimeType);\n            }\n        }\n\n        return null;\n    }\n\n    private static function supportedMimeTypes(?string $mimeType = null): ?string\n    {\n        if (in_array($mimeType, self::SUPPORTED_MIME_TYPES, true)) {\n            return $mimeType;\n        }\n\n        return null;\n    }\n\n    /**\n     * Get image resource.\n     */\n    public function getImageResource(): ?GdImage\n    {\n        return $this->imageResource;\n    }\n\n    /**\n     * Set image resource.\n     *\n     * @return $this\n     */\n    public function setImageResource(?GdImage $value): static\n    {\n        $this->imageResource = $value;\n\n        if ($this->imageResource !== null) {\n            // Get width/height\n            $this->width = (int) imagesx($this->imageResource);\n            $this->height = (int) imagesy($this->imageResource);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get rendering function.\n     *\n     * @return callable-string\n     */\n    public function getRenderingFunction(): string\n    {\n        return $this->renderingFunction;\n    }\n\n    /**\n     * Set rendering function.\n     *\n     * @param callable-string $value see self::RENDERING_*\n     *\n     * @return $this\n     */\n    public function setRenderingFunction(string $value): static\n    {\n        $this->renderingFunction = $value;\n\n        return $this;\n    }\n\n    /**\n     * Get mime type.\n     */\n    public function getMimeType(): string\n    {\n        return $this->mimeType;\n    }\n\n    /**\n     * Set mime type.\n     *\n     * @param string $value see self::MIMETYPE_*\n     *\n     * @return $this\n     */\n    public function setMimeType(string $value): static\n    {\n        $this->mimeType = $value;\n\n        return $this;\n    }\n\n    /**\n     * Get indexed filename (using image index).\n     */\n    public function getIndexedFilename(): string\n    {\n        $extension = strtolower($this->getMimeType());\n        $extension = explode('/', $extension);\n        $extension = $extension[1];\n\n        return $this->uniqueName . $this->getImageIndex() . '.' . $extension;\n    }\n\n    /**\n     * Get hash code.\n     *\n     * @return string Hash code\n     */\n    public function getHashCode(): string\n    {\n        return md5(\n            $this->renderingFunction\n            . $this->mimeType\n            . $this->uniqueName\n            . parent::getHashCode()\n            . __CLASS__\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/PageBreak.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\n\nclass PageBreak\n{\n    private int $breakType;\n\n    private string $coordinate;\n\n    private int $maxColOrRow;\n\n    /**\n     * @param array{0: int, 1: int}|CellAddress|string $coordinate\n     */\n    public function __construct(int $breakType, CellAddress|string|array $coordinate, int $maxColOrRow = -1)\n    {\n        $coordinate = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));\n        $this->breakType = $breakType;\n        $this->coordinate = $coordinate;\n        $this->maxColOrRow = $maxColOrRow;\n    }\n\n    public function getBreakType(): int\n    {\n        return $this->breakType;\n    }\n\n    public function getCoordinate(): string\n    {\n        return $this->coordinate;\n    }\n\n    public function getMaxColOrRow(): int\n    {\n        return $this->maxColOrRow;\n    }\n\n    public function getColumnInt(): int\n    {\n        return Coordinate::indexesFromString($this->coordinate)[0];\n    }\n\n    public function getRow(): int\n    {\n        return Coordinate::indexesFromString($this->coordinate)[1];\n    }\n\n    public function getColumnString(): string\n    {\n        return Coordinate::indexesFromString($this->coordinate)[2];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/PageMargins.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nclass PageMargins\n{\n    /**\n     * Left.\n     */\n    private float $left = 0.7;\n\n    /**\n     * Right.\n     */\n    private float $right = 0.7;\n\n    /**\n     * Top.\n     */\n    private float $top = 0.75;\n\n    /**\n     * Bottom.\n     */\n    private float $bottom = 0.75;\n\n    /**\n     * Header.\n     */\n    private float $header = 0.3;\n\n    /**\n     * Footer.\n     */\n    private float $footer = 0.3;\n\n    /**\n     * Create a new PageMargins.\n     */\n    public function __construct()\n    {\n    }\n\n    /**\n     * Get Left.\n     */\n    public function getLeft(): float\n    {\n        return $this->left;\n    }\n\n    /**\n     * Set Left.\n     *\n     * @return $this\n     */\n    public function setLeft(float $left): static\n    {\n        $this->left = $left;\n\n        return $this;\n    }\n\n    /**\n     * Get Right.\n     */\n    public function getRight(): float\n    {\n        return $this->right;\n    }\n\n    /**\n     * Set Right.\n     *\n     * @return $this\n     */\n    public function setRight(float $right): static\n    {\n        $this->right = $right;\n\n        return $this;\n    }\n\n    /**\n     * Get Top.\n     */\n    public function getTop(): float\n    {\n        return $this->top;\n    }\n\n    /**\n     * Set Top.\n     *\n     * @return $this\n     */\n    public function setTop(float $top): static\n    {\n        $this->top = $top;\n\n        return $this;\n    }\n\n    /**\n     * Get Bottom.\n     */\n    public function getBottom(): float\n    {\n        return $this->bottom;\n    }\n\n    /**\n     * Set Bottom.\n     *\n     * @return $this\n     */\n    public function setBottom(float $bottom): static\n    {\n        $this->bottom = $bottom;\n\n        return $this;\n    }\n\n    /**\n     * Get Header.\n     */\n    public function getHeader(): float\n    {\n        return $this->header;\n    }\n\n    /**\n     * Set Header.\n     *\n     * @return $this\n     */\n    public function setHeader(float $header): static\n    {\n        $this->header = $header;\n\n        return $this;\n    }\n\n    /**\n     * Get Footer.\n     */\n    public function getFooter(): float\n    {\n        return $this->footer;\n    }\n\n    /**\n     * Set Footer.\n     *\n     * @return $this\n     */\n    public function setFooter(float $footer): static\n    {\n        $this->footer = $footer;\n\n        return $this;\n    }\n\n    public static function fromCentimeters(float $value): float\n    {\n        return $value / 2.54;\n    }\n\n    public static function toCentimeters(float $value): float\n    {\n        return $value * 2.54;\n    }\n\n    public static function fromMillimeters(float $value): float\n    {\n        return $value / 25.4;\n    }\n\n    public static function toMillimeters(float $value): float\n    {\n        return $value * 25.4;\n    }\n\n    public static function fromPoints(float $value): float\n    {\n        return $value / 72;\n    }\n\n    public static function toPoints(float $value): float\n    {\n        return $value * 72;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/PageSetup.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\n/**\n * <code>\n * Paper size taken from Office Open XML Part 4 - Markup Language Reference, page 1988:.\n *\n * 1 = Letter paper (8.5 in. by 11 in.)\n * 2 = Letter small paper (8.5 in. by 11 in.)\n * 3 = Tabloid paper (11 in. by 17 in.)\n * 4 = Ledger paper (17 in. by 11 in.)\n * 5 = Legal paper (8.5 in. by 14 in.)\n * 6 = Statement paper (5.5 in. by 8.5 in.)\n * 7 = Executive paper (7.25 in. by 10.5 in.)\n * 8 = A3 paper (297 mm by 420 mm)\n * 9 = A4 paper (210 mm by 297 mm)\n * 10 = A4 small paper (210 mm by 297 mm)\n * 11 = A5 paper (148 mm by 210 mm)\n * 12 = B4 paper (250 mm by 353 mm)\n * 13 = B5 paper (176 mm by 250 mm)\n * 14 = Folio paper (8.5 in. by 13 in.)\n * 15 = Quarto paper (215 mm by 275 mm)\n * 16 = Standard paper (10 in. by 14 in.)\n * 17 = Standard paper (11 in. by 17 in.)\n * 18 = Note paper (8.5 in. by 11 in.)\n * 19 = #9 envelope (3.875 in. by 8.875 in.)\n * 20 = #10 envelope (4.125 in. by 9.5 in.)\n * 21 = #11 envelope (4.5 in. by 10.375 in.)\n * 22 = #12 envelope (4.75 in. by 11 in.)\n * 23 = #14 envelope (5 in. by 11.5 in.)\n * 24 = C paper (17 in. by 22 in.)\n * 25 = D paper (22 in. by 34 in.)\n * 26 = E paper (34 in. by 44 in.)\n * 27 = DL envelope (110 mm by 220 mm)\n * 28 = C5 envelope (162 mm by 229 mm)\n * 29 = C3 envelope (324 mm by 458 mm)\n * 30 = C4 envelope (229 mm by 324 mm)\n * 31 = C6 envelope (114 mm by 162 mm)\n * 32 = C65 envelope (114 mm by 229 mm)\n * 33 = B4 envelope (250 mm by 353 mm)\n * 34 = B5 envelope (176 mm by 250 mm)\n * 35 = B6 envelope (176 mm by 125 mm)\n * 36 = Italy envelope (110 mm by 230 mm)\n * 37 = Monarch envelope (3.875 in. by 7.5 in.).\n * 38 = 6 3/4 envelope (3.625 in. by 6.5 in.)\n * 39 = US standard fanfold (14.875 in. by 11 in.)\n * 40 = German standard fanfold (8.5 in. by 12 in.)\n * 41 = German legal fanfold (8.5 in. by 13 in.)\n * 42 = ISO B4 (250 mm by 353 mm)\n * 43 = Japanese double postcard (200 mm by 148 mm)\n * 44 = Standard paper (9 in. by 11 in.)\n * 45 = Standard paper (10 in. by 11 in.)\n * 46 = Standard paper (15 in. by 11 in.)\n * 47 = Invite envelope (220 mm by 220 mm)\n * 50 = Letter extra paper (9.275 in. by 12 in.)\n * 51 = Legal extra paper (9.275 in. by 15 in.)\n * 52 = Tabloid extra paper (11.69 in. by 18 in.)\n * 53 = A4 extra paper (236 mm by 322 mm)\n * 54 = Letter transverse paper (8.275 in. by 11 in.)\n * 55 = A4 transverse paper (210 mm by 297 mm)\n * 56 = Letter extra transverse paper (9.275 in. by 12 in.)\n * 57 = SuperA/SuperA/A4 paper (227 mm by 356 mm)\n * 58 = SuperB/SuperB/A3 paper (305 mm by 487 mm)\n * 59 = Letter plus paper (8.5 in. by 12.69 in.)\n * 60 = A4 plus paper (210 mm by 330 mm)\n * 61 = A5 transverse paper (148 mm by 210 mm)\n * 62 = JIS B5 transverse paper (182 mm by 257 mm)\n * 63 = A3 extra paper (322 mm by 445 mm)\n * 64 = A5 extra paper (174 mm by 235 mm)\n * 65 = ISO B5 extra paper (201 mm by 276 mm)\n * 66 = A2 paper (420 mm by 594 mm)\n * 67 = A3 transverse paper (297 mm by 420 mm)\n * 68 = A3 extra transverse paper (322 mm by 445 mm)\n * </code>\n */\nclass PageSetup\n{\n    // Paper size\n    const PAPERSIZE_LETTER = 1;\n    const PAPERSIZE_LETTER_SMALL = 2;\n    const PAPERSIZE_TABLOID = 3;\n    const PAPERSIZE_LEDGER = 4;\n    const PAPERSIZE_LEGAL = 5;\n    const PAPERSIZE_STATEMENT = 6;\n    const PAPERSIZE_EXECUTIVE = 7;\n    const PAPERSIZE_A3 = 8;\n    const PAPERSIZE_A4 = 9;\n    const PAPERSIZE_A4_SMALL = 10;\n    const PAPERSIZE_A5 = 11;\n    const PAPERSIZE_B4 = 12;\n    const PAPERSIZE_B5 = 13;\n    const PAPERSIZE_FOLIO = 14;\n    const PAPERSIZE_QUARTO = 15;\n    const PAPERSIZE_STANDARD_1 = 16;\n    const PAPERSIZE_STANDARD_2 = 17;\n    const PAPERSIZE_NOTE = 18;\n    const PAPERSIZE_NO9_ENVELOPE = 19;\n    const PAPERSIZE_NO10_ENVELOPE = 20;\n    const PAPERSIZE_NO11_ENVELOPE = 21;\n    const PAPERSIZE_NO12_ENVELOPE = 22;\n    const PAPERSIZE_NO14_ENVELOPE = 23;\n    const PAPERSIZE_C = 24;\n    const PAPERSIZE_D = 25;\n    const PAPERSIZE_E = 26;\n    const PAPERSIZE_DL_ENVELOPE = 27;\n    const PAPERSIZE_C5_ENVELOPE = 28;\n    const PAPERSIZE_C3_ENVELOPE = 29;\n    const PAPERSIZE_C4_ENVELOPE = 30;\n    const PAPERSIZE_C6_ENVELOPE = 31;\n    const PAPERSIZE_C65_ENVELOPE = 32;\n    const PAPERSIZE_B4_ENVELOPE = 33;\n    const PAPERSIZE_B5_ENVELOPE = 34;\n    const PAPERSIZE_B6_ENVELOPE = 35;\n    const PAPERSIZE_ITALY_ENVELOPE = 36;\n    const PAPERSIZE_MONARCH_ENVELOPE = 37;\n    const PAPERSIZE_6_3_4_ENVELOPE = 38;\n    const PAPERSIZE_US_STANDARD_FANFOLD = 39;\n    const PAPERSIZE_GERMAN_STANDARD_FANFOLD = 40;\n    const PAPERSIZE_GERMAN_LEGAL_FANFOLD = 41;\n    const PAPERSIZE_ISO_B4 = 42;\n    const PAPERSIZE_JAPANESE_DOUBLE_POSTCARD = 43;\n    const PAPERSIZE_STANDARD_PAPER_1 = 44;\n    const PAPERSIZE_STANDARD_PAPER_2 = 45;\n    const PAPERSIZE_STANDARD_PAPER_3 = 46;\n    const PAPERSIZE_INVITE_ENVELOPE = 47;\n    const PAPERSIZE_LETTER_EXTRA_PAPER = 48;\n    const PAPERSIZE_LEGAL_EXTRA_PAPER = 49;\n    const PAPERSIZE_TABLOID_EXTRA_PAPER = 50;\n    const PAPERSIZE_A4_EXTRA_PAPER = 51;\n    const PAPERSIZE_LETTER_TRANSVERSE_PAPER = 52;\n    const PAPERSIZE_A4_TRANSVERSE_PAPER = 53;\n    const PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER = 54;\n    const PAPERSIZE_SUPERA_SUPERA_A4_PAPER = 55;\n    const PAPERSIZE_SUPERB_SUPERB_A3_PAPER = 56;\n    const PAPERSIZE_LETTER_PLUS_PAPER = 57;\n    const PAPERSIZE_A4_PLUS_PAPER = 58;\n    const PAPERSIZE_A5_TRANSVERSE_PAPER = 59;\n    const PAPERSIZE_JIS_B5_TRANSVERSE_PAPER = 60;\n    const PAPERSIZE_A3_EXTRA_PAPER = 61;\n    const PAPERSIZE_A5_EXTRA_PAPER = 62;\n    const PAPERSIZE_ISO_B5_EXTRA_PAPER = 63;\n    const PAPERSIZE_A2_PAPER = 64;\n    const PAPERSIZE_A3_TRANSVERSE_PAPER = 65;\n    const PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER = 66;\n\n    // Page orientation\n    const ORIENTATION_DEFAULT = 'default';\n    const ORIENTATION_LANDSCAPE = 'landscape';\n    const ORIENTATION_PORTRAIT = 'portrait';\n\n    // Print Range Set Method\n    const SETPRINTRANGE_OVERWRITE = 'O';\n    const SETPRINTRANGE_INSERT = 'I';\n\n    const PAGEORDER_OVER_THEN_DOWN = 'overThenDown';\n    const PAGEORDER_DOWN_THEN_OVER = 'downThenOver';\n\n    /**\n     * Paper size default.\n     */\n    private static int $paperSizeDefault = self::PAPERSIZE_LETTER;\n\n    /**\n     * Paper size.\n     */\n    private ?int $paperSize = null;\n\n    /**\n     * Orientation default.\n     */\n    private static string $orientationDefault = self::ORIENTATION_DEFAULT;\n\n    /**\n     * Orientation.\n     */\n    private string $orientation;\n\n    /**\n     * Scale (Print Scale).\n     *\n     * Print scaling. Valid values range from 10 to 400\n     * This setting is overridden when fitToWidth and/or fitToHeight are in use\n     */\n    private ?int $scale = 100;\n\n    /**\n     * Fit To Page\n     * Whether scale or fitToWith / fitToHeight applies.\n     */\n    private bool $fitToPage = false;\n\n    /**\n     * Fit To Height\n     * Number of vertical pages to fit on.\n     */\n    private ?int $fitToHeight = 1;\n\n    /**\n     * Fit To Width\n     * Number of horizontal pages to fit on.\n     */\n    private ?int $fitToWidth = 1;\n\n    /**\n     * Columns to repeat at left.\n     *\n     * @var array{string, string} Containing start column and end column, empty array if option unset\n     */\n    private array $columnsToRepeatAtLeft = ['', ''];\n\n    /**\n     * Rows to repeat at top.\n     *\n     * @var int[] Containing start row number and end row number, empty array if option unset\n     */\n    private array $rowsToRepeatAtTop = [0, 0];\n\n    /**\n     * Center page horizontally.\n     */\n    private bool $horizontalCentered = false;\n\n    /**\n     * Center page vertically.\n     */\n    private bool $verticalCentered = false;\n\n    /**\n     * Print area.\n     */\n    private ?string $printArea = null;\n\n    /**\n     * First page number.\n     */\n    private ?int $firstPageNumber = null;\n\n    private string $pageOrder = self::PAGEORDER_DOWN_THEN_OVER;\n\n    /**\n     * Create a new PageSetup.\n     */\n    public function __construct()\n    {\n        $this->orientation = self::$orientationDefault;\n    }\n\n    /**\n     * Get Paper Size.\n     */\n    public function getPaperSize(): int\n    {\n        return $this->paperSize ?? self::$paperSizeDefault;\n    }\n\n    /**\n     * Set Paper Size.\n     *\n     * @param int $paperSize see self::PAPERSIZE_*\n     *\n     * @return $this\n     */\n    public function setPaperSize(int $paperSize): static\n    {\n        $this->paperSize = $paperSize;\n\n        return $this;\n    }\n\n    /**\n     * Get Paper Size default.\n     */\n    public static function getPaperSizeDefault(): int\n    {\n        return self::$paperSizeDefault;\n    }\n\n    /**\n     * Set Paper Size Default.\n     */\n    public static function setPaperSizeDefault(int $paperSize): void\n    {\n        self::$paperSizeDefault = $paperSize;\n    }\n\n    /**\n     * Get Orientation.\n     */\n    public function getOrientation(): string\n    {\n        return $this->orientation;\n    }\n\n    /**\n     * Set Orientation.\n     *\n     * @param string $orientation see self::ORIENTATION_*\n     *\n     * @return $this\n     */\n    public function setOrientation(string $orientation): static\n    {\n        if ($orientation === self::ORIENTATION_LANDSCAPE || $orientation === self::ORIENTATION_PORTRAIT || $orientation === self::ORIENTATION_DEFAULT) {\n            $this->orientation = $orientation;\n        }\n\n        return $this;\n    }\n\n    public static function getOrientationDefault(): string\n    {\n        return self::$orientationDefault;\n    }\n\n    public static function setOrientationDefault(string $orientation): void\n    {\n        if ($orientation === self::ORIENTATION_LANDSCAPE || $orientation === self::ORIENTATION_PORTRAIT || $orientation === self::ORIENTATION_DEFAULT) {\n            self::$orientationDefault = $orientation;\n        }\n    }\n\n    /**\n     * Get Scale.\n     */\n    public function getScale(): ?int\n    {\n        return $this->scale;\n    }\n\n    /**\n     * Set Scale.\n     * Print scaling. Valid values range from 10 to 400\n     * This setting is overridden when fitToWidth and/or fitToHeight are in use.\n     *\n     * @param bool $update Update fitToPage so scaling applies rather than fitToHeight / fitToWidth\n     *\n     * @return $this\n     */\n    public function setScale(?int $scale, bool $update = true): static\n    {\n        // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface,\n        // but it is apparently still able to handle any scale >= 0, where 0 results in 100\n        if ($scale === null || $scale >= 0) {\n            $this->scale = $scale;\n            if ($update) {\n                $this->fitToPage = false;\n            }\n        } else {\n            throw new PhpSpreadsheetException('Scale must not be negative');\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Fit To Page.\n     */\n    public function getFitToPage(): bool\n    {\n        return $this->fitToPage;\n    }\n\n    /**\n     * Set Fit To Page.\n     *\n     * @return $this\n     */\n    public function setFitToPage(bool $fitToPage): static\n    {\n        $this->fitToPage = $fitToPage;\n\n        return $this;\n    }\n\n    /**\n     * Get Fit To Height.\n     */\n    public function getFitToHeight(): ?int\n    {\n        return $this->fitToHeight;\n    }\n\n    /**\n     * Set Fit To Height.\n     *\n     * @param bool $update Update fitToPage so it applies rather than scaling\n     *\n     * @return $this\n     */\n    public function setFitToHeight(?int $fitToHeight, bool $update = true): static\n    {\n        $this->fitToHeight = $fitToHeight;\n        if ($update) {\n            $this->fitToPage = true;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Fit To Width.\n     */\n    public function getFitToWidth(): ?int\n    {\n        return $this->fitToWidth;\n    }\n\n    /**\n     * Set Fit To Width.\n     *\n     * @param bool $update Update fitToPage so it applies rather than scaling\n     *\n     * @return $this\n     */\n    public function setFitToWidth(?int $value, bool $update = true): static\n    {\n        $this->fitToWidth = $value;\n        if ($update) {\n            $this->fitToPage = true;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Is Columns to repeat at left set?\n     */\n    public function isColumnsToRepeatAtLeftSet(): bool\n    {\n        if (!empty($this->columnsToRepeatAtLeft)) {\n            if ($this->columnsToRepeatAtLeft[0] != '' && $this->columnsToRepeatAtLeft[1] != '') {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Get Columns to repeat at left.\n     *\n     * @return array{string, string} Containing start column and end column, empty array if option unset\n     */\n    public function getColumnsToRepeatAtLeft(): array\n    {\n        return $this->columnsToRepeatAtLeft;\n    }\n\n    /**\n     * Set Columns to repeat at left.\n     *\n     * @param array{string, string} $columnsToRepeatAtLeft Containing start column and end column, empty array if option unset\n     *\n     * @return $this\n     */\n    public function setColumnsToRepeatAtLeft(array $columnsToRepeatAtLeft): static\n    {\n        $this->columnsToRepeatAtLeft = $columnsToRepeatAtLeft;\n\n        return $this;\n    }\n\n    /**\n     * Set Columns to repeat at left by start and end.\n     *\n     * @param string $start eg: 'A'\n     * @param string $end eg: 'B'\n     *\n     * @return $this\n     */\n    public function setColumnsToRepeatAtLeftByStartAndEnd(string $start, string $end): static\n    {\n        $this->columnsToRepeatAtLeft = [$start, $end];\n\n        return $this;\n    }\n\n    /**\n     * Is Rows to repeat at top set?\n     */\n    public function isRowsToRepeatAtTopSet(): bool\n    {\n        if (!empty($this->rowsToRepeatAtTop)) {\n            if ($this->rowsToRepeatAtTop[0] != 0 && $this->rowsToRepeatAtTop[1] != 0) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Get Rows to repeat at top.\n     *\n     * @return int[] Containing start column and end column, empty array if option unset\n     */\n    public function getRowsToRepeatAtTop(): array\n    {\n        return $this->rowsToRepeatAtTop;\n    }\n\n    /**\n     * Set Rows to repeat at top.\n     *\n     * @param int[] $rowsToRepeatAtTop Containing start column and end column, empty array if option unset\n     *\n     * @return $this\n     */\n    public function setRowsToRepeatAtTop(array $rowsToRepeatAtTop): static\n    {\n        $this->rowsToRepeatAtTop = $rowsToRepeatAtTop;\n\n        return $this;\n    }\n\n    /**\n     * Set Rows to repeat at top by start and end.\n     *\n     * @param int $start eg: 1\n     * @param int $end eg: 1\n     *\n     * @return $this\n     */\n    public function setRowsToRepeatAtTopByStartAndEnd(int $start, int $end): static\n    {\n        $this->rowsToRepeatAtTop = [$start, $end];\n\n        return $this;\n    }\n\n    /**\n     * Get center page horizontally.\n     */\n    public function getHorizontalCentered(): bool\n    {\n        return $this->horizontalCentered;\n    }\n\n    /**\n     * Set center page horizontally.\n     *\n     * @return $this\n     */\n    public function setHorizontalCentered(bool $value): static\n    {\n        $this->horizontalCentered = $value;\n\n        return $this;\n    }\n\n    /**\n     * Get center page vertically.\n     */\n    public function getVerticalCentered(): bool\n    {\n        return $this->verticalCentered;\n    }\n\n    /**\n     * Set center page vertically.\n     *\n     * @return $this\n     */\n    public function setVerticalCentered(bool $value): static\n    {\n        $this->verticalCentered = $value;\n\n        return $this;\n    }\n\n    /**\n     * Get print area.\n     *\n     * @param int $index Identifier for a specific print area range if several ranges have been set\n     *                            Default behaviour, or an index value of 0, will return all ranges as a comma-separated string\n     *                            Otherwise, the specific range identified by the value of $index will be returned\n     *                            Print areas are numbered from 1\n     */\n    public function getPrintArea(int $index = 0): string\n    {\n        if ($index == 0) {\n            return (string) $this->printArea;\n        }\n        $printAreas = explode(',', (string) $this->printArea);\n        if (isset($printAreas[$index - 1])) {\n            return $printAreas[$index - 1];\n        }\n\n        throw new PhpSpreadsheetException('Requested Print Area does not exist');\n    }\n\n    /**\n     * Is print area set?\n     *\n     * @param int $index Identifier for a specific print area range if several ranges have been set\n     *                            Default behaviour, or an index value of 0, will identify whether any print range is set\n     *                            Otherwise, existence of the range identified by the value of $index will be returned\n     *                            Print areas are numbered from 1\n     */\n    public function isPrintAreaSet(int $index = 0): bool\n    {\n        if ($index == 0) {\n            return $this->printArea !== null;\n        }\n        $printAreas = explode(',', (string) $this->printArea);\n\n        return isset($printAreas[$index - 1]);\n    }\n\n    /**\n     * Clear a print area.\n     *\n     * @param int $index Identifier for a specific print area range if several ranges have been set\n     *                            Default behaviour, or an index value of 0, will clear all print ranges that are set\n     *                            Otherwise, the range identified by the value of $index will be removed from the series\n     *                            Print areas are numbered from 1\n     *\n     * @return $this\n     */\n    public function clearPrintArea(int $index = 0): static\n    {\n        if ($index == 0) {\n            $this->printArea = null;\n        } else {\n            $printAreas = explode(',', (string) $this->printArea);\n            if (isset($printAreas[$index - 1])) {\n                unset($printAreas[$index - 1]);\n                $this->printArea = implode(',', $printAreas);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20'.\n     *\n     * @param int $index Identifier for a specific print area range allowing several ranges to be set\n     *                            When the method is \"O\"verwrite, then a positive integer index will overwrite that indexed\n     *                                entry in the print areas list; a negative index value will identify which entry to\n     *                                overwrite working backward through the print area to the list, with the last entry as -1.\n     *                                Specifying an index value of 0, will overwrite <b>all</b> existing print ranges.\n     *                            When the method is \"I\"nsert, then a positive index will insert after that indexed entry in\n     *                                the print areas list, while a negative index will insert before the indexed entry.\n     *                                Specifying an index value of 0, will always append the new print range at the end of the\n     *                                list.\n     *                            Print areas are numbered from 1\n     * @param string $method Determines the method used when setting multiple print areas\n     *                            Default behaviour, or the \"O\" method, overwrites existing print area\n     *                            The \"I\" method, inserts the new print area before any specified index, or at the end of the list\n     *\n     * @return $this\n     */\n    public function setPrintArea(string $value, int $index = 0, string $method = self::SETPRINTRANGE_OVERWRITE): static\n    {\n        if (str_contains($value, '!')) {\n            throw new PhpSpreadsheetException('Cell coordinate must not specify a worksheet.');\n        } elseif (!str_contains($value, ':')) {\n            throw new PhpSpreadsheetException('Cell coordinate must be a range of cells.');\n        } elseif (str_contains($value, '$')) {\n            throw new PhpSpreadsheetException('Cell coordinate must not be absolute.');\n        }\n        $value = strtoupper($value);\n        if (!$this->printArea) {\n            $index = 0;\n        }\n\n        if ($method == self::SETPRINTRANGE_OVERWRITE) {\n            if ($index == 0) {\n                $this->printArea = $value;\n            } else {\n                $printAreas = explode(',', (string) $this->printArea);\n                if ($index < 0) {\n                    $index = count($printAreas) - abs($index) + 1;\n                }\n                if (($index <= 0) || ($index > count($printAreas))) {\n                    throw new PhpSpreadsheetException('Invalid index for setting print range.');\n                }\n                $printAreas[$index - 1] = $value;\n                $this->printArea = implode(',', $printAreas);\n            }\n        } elseif ($method == self::SETPRINTRANGE_INSERT) {\n            if ($index == 0) {\n                $this->printArea = $this->printArea ? ($this->printArea . ',' . $value) : $value;\n            } else {\n                $printAreas = explode(',', (string) $this->printArea);\n                if ($index < 0) {\n                    $index = (int) abs($index) - 1;\n                }\n                if ($index > count($printAreas)) {\n                    throw new PhpSpreadsheetException('Invalid index for setting print range.');\n                }\n                $printAreas = array_merge(array_slice($printAreas, 0, $index), [$value], array_slice($printAreas, $index));\n                $this->printArea = implode(',', $printAreas);\n            }\n        } else {\n            throw new PhpSpreadsheetException('Invalid method for setting print range.');\n        }\n\n        return $this;\n    }\n\n    /**\n     * Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas.\n     *\n     * @param int $index Identifier for a specific print area range allowing several ranges to be set\n     *                            A positive index will insert after that indexed entry in the print areas list, while a\n     *                                negative index will insert before the indexed entry.\n     *                                Specifying an index value of 0, will always append the new print range at the end of the\n     *                                list.\n     *                            Print areas are numbered from 1\n     *\n     * @return $this\n     */\n    public function addPrintArea(string $value, int $index = -1): static\n    {\n        return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT);\n    }\n\n    /**\n     * Set print area.\n     *\n     * @param int $column1 Column 1\n     * @param int $row1 Row 1\n     * @param int $column2 Column 2\n     * @param int $row2 Row 2\n     * @param int $index Identifier for a specific print area range allowing several ranges to be set\n     *                                When the method is \"O\"verwrite, then a positive integer index will overwrite that indexed\n     *                                    entry in the print areas list; a negative index value will identify which entry to\n     *                                    overwrite working backward through the print area to the list, with the last entry as -1.\n     *                                    Specifying an index value of 0, will overwrite <b>all</b> existing print ranges.\n     *                                When the method is \"I\"nsert, then a positive index will insert after that indexed entry in\n     *                                    the print areas list, while a negative index will insert before the indexed entry.\n     *                                    Specifying an index value of 0, will always append the new print range at the end of the\n     *                                    list.\n     *                                Print areas are numbered from 1\n     * @param string $method Determines the method used when setting multiple print areas\n     *                                Default behaviour, or the \"O\" method, overwrites existing print area\n     *                                The \"I\" method, inserts the new print area before any specified index, or at the end of the list\n     *\n     * @return $this\n     */\n    public function setPrintAreaByColumnAndRow(int $column1, int $row1, int $column2, int $row2, int $index = 0, string $method = self::SETPRINTRANGE_OVERWRITE): static\n    {\n        return $this->setPrintArea(\n            Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2,\n            $index,\n            $method\n        );\n    }\n\n    /**\n     * Add a new print area to the list of print areas.\n     *\n     * @param int $column1 Start Column for the print area\n     * @param int $row1 Start Row for the print area\n     * @param int $column2 End Column for the print area\n     * @param int $row2 End Row for the print area\n     * @param int $index Identifier for a specific print area range allowing several ranges to be set\n     *                                A positive index will insert after that indexed entry in the print areas list, while a\n     *                                    negative index will insert before the indexed entry.\n     *                                    Specifying an index value of 0, will always append the new print range at the end of the\n     *                                    list.\n     *                                Print areas are numbered from 1\n     *\n     * @return $this\n     */\n    public function addPrintAreaByColumnAndRow(int $column1, int $row1, int $column2, int $row2, int $index = -1): static\n    {\n        return $this->setPrintArea(\n            Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2,\n            $index,\n            self::SETPRINTRANGE_INSERT\n        );\n    }\n\n    /**\n     * Get first page number.\n     */\n    public function getFirstPageNumber(): ?int\n    {\n        return $this->firstPageNumber;\n    }\n\n    /**\n     * Set first page number.\n     *\n     * @return $this\n     */\n    public function setFirstPageNumber(?int $value): static\n    {\n        $this->firstPageNumber = $value;\n\n        return $this;\n    }\n\n    /**\n     * Reset first page number.\n     *\n     * @return $this\n     */\n    public function resetFirstPageNumber(): static\n    {\n        return $this->setFirstPageNumber(null);\n    }\n\n    public function getPageOrder(): string\n    {\n        return $this->pageOrder;\n    }\n\n    public function setPageOrder(?string $pageOrder): self\n    {\n        if ($pageOrder === null || $pageOrder === self::PAGEORDER_DOWN_THEN_OVER || $pageOrder === self::PAGEORDER_OVER_THEN_DOWN) {\n            $this->pageOrder = $pageOrder ?? self::PAGEORDER_DOWN_THEN_OVER;\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Pane.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nclass Pane\n{\n    private string $sqref;\n\n    private string $activeCell;\n\n    private string $position;\n\n    public function __construct(string $position, string $sqref = '', string $activeCell = '')\n    {\n        $this->sqref = $sqref;\n        $this->activeCell = $activeCell;\n        $this->position = $position;\n    }\n\n    public function getPosition(): string\n    {\n        return $this->position;\n    }\n\n    public function getSqref(): string\n    {\n        return $this->sqref;\n    }\n\n    public function setSqref(string $sqref): self\n    {\n        $this->sqref = $sqref;\n\n        return $this;\n    }\n\n    public function getActiveCell(): string\n    {\n        return $this->activeCell;\n    }\n\n    public function setActiveCell(string $activeCell): self\n    {\n        $this->activeCell = $activeCell;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/ProtectedRange.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\n\nclass ProtectedRange\n{\n    private string $name = '';\n\n    private string $password = '';\n\n    private string $sqref;\n\n    private string $securityDescriptor = '';\n\n    /**\n     * No setters aside from constructor.\n     */\n    public function __construct(string $sqref, string $password = '', string $name = '', string $securityDescriptor = '')\n    {\n        $this->sqref = $sqref;\n        $this->name = $name;\n        $this->password = $password;\n        $this->securityDescriptor = $securityDescriptor;\n    }\n\n    public function getSqref(): string\n    {\n        return $this->sqref;\n    }\n\n    public function getName(): string\n    {\n        return $this->name ?: ('p' . md5($this->sqref));\n    }\n\n    public function getPassword(): string\n    {\n        return $this->password;\n    }\n\n    public function getSecurityDescriptor(): string\n    {\n        return $this->securityDescriptor;\n    }\n\n    /**\n     * Split range into coordinate strings.\n     *\n     * @return array<array<string>> Array containing one or more arrays containing one or two coordinate strings\n     *                                e.g. ['B4','D9'] or [['B4','D9'], ['H2','O11']]\n     *                                        or ['B4']\n     */\n    public function allRanges(): array\n    {\n        return Coordinate::allRanges($this->sqref, false);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Protection.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\PasswordHasher;\n\nclass Protection\n{\n    const ALGORITHM_MD2 = 'MD2';\n    const ALGORITHM_MD4 = 'MD4';\n    const ALGORITHM_MD5 = 'MD5';\n    const ALGORITHM_SHA_1 = 'SHA-1';\n    const ALGORITHM_SHA_256 = 'SHA-256';\n    const ALGORITHM_SHA_384 = 'SHA-384';\n    const ALGORITHM_SHA_512 = 'SHA-512';\n    const ALGORITHM_RIPEMD_128 = 'RIPEMD-128';\n    const ALGORITHM_RIPEMD_160 = 'RIPEMD-160';\n    const ALGORITHM_WHIRLPOOL = 'WHIRLPOOL';\n\n    /**\n     * Autofilters are locked when sheet is protected, default true.\n     */\n    private ?bool $autoFilter = null;\n\n    /**\n     * Deleting columns is locked when sheet is protected, default true.\n     */\n    private ?bool $deleteColumns = null;\n\n    /**\n     * Deleting rows is locked when sheet is protected, default true.\n     */\n    private ?bool $deleteRows = null;\n\n    /**\n     * Formatting cells is locked when sheet is protected, default true.\n     */\n    private ?bool $formatCells = null;\n\n    /**\n     * Formatting columns is locked when sheet is protected, default true.\n     */\n    private ?bool $formatColumns = null;\n\n    /**\n     * Formatting rows is locked when sheet is protected, default true.\n     */\n    private ?bool $formatRows = null;\n\n    /**\n     * Inserting columns is locked when sheet is protected, default true.\n     */\n    private ?bool $insertColumns = null;\n\n    /**\n     * Inserting hyperlinks is locked when sheet is protected, default true.\n     */\n    private ?bool $insertHyperlinks = null;\n\n    /**\n     * Inserting rows is locked when sheet is protected, default true.\n     */\n    private ?bool $insertRows = null;\n\n    /**\n     * Objects are locked when sheet is protected, default false.\n     */\n    private ?bool $objects = null;\n\n    /**\n     * Pivot tables are locked when the sheet is protected, default true.\n     */\n    private ?bool $pivotTables = null;\n\n    /**\n     * Scenarios are locked when sheet is protected, default false.\n     */\n    private ?bool $scenarios = null;\n\n    /**\n     * Selection of locked cells is locked when sheet is protected, default false.\n     */\n    private ?bool $selectLockedCells = null;\n\n    /**\n     * Selection of unlocked cells is locked when sheet is protected, default false.\n     */\n    private ?bool $selectUnlockedCells = null;\n\n    /**\n     * Sheet is locked when sheet is protected, default false.\n     */\n    private ?bool $sheet = null;\n\n    /**\n     * Sorting is locked when sheet is protected, default true.\n     */\n    private ?bool $sort = null;\n\n    /**\n     * Hashed password.\n     */\n    private string $password = '';\n\n    /**\n     * Algorithm name.\n     */\n    private string $algorithm = '';\n\n    /**\n     * Salt value.\n     */\n    private string $salt = '';\n\n    /**\n     * Spin count.\n     */\n    private int $spinCount = 10000;\n\n    /**\n     * Create a new Protection.\n     */\n    public function __construct()\n    {\n    }\n\n    /**\n     * Is some sort of protection enabled?\n     */\n    public function isProtectionEnabled(): bool\n    {\n        return\n            $this->password !== ''\n            || isset($this->sheet)\n            || isset($this->objects)\n            || isset($this->scenarios)\n            || isset($this->formatCells)\n            || isset($this->formatColumns)\n            || isset($this->formatRows)\n            || isset($this->insertColumns)\n            || isset($this->insertRows)\n            || isset($this->insertHyperlinks)\n            || isset($this->deleteColumns)\n            || isset($this->deleteRows)\n            || isset($this->selectLockedCells)\n            || isset($this->sort)\n            || isset($this->autoFilter)\n            || isset($this->pivotTables)\n            || isset($this->selectUnlockedCells);\n    }\n\n    public function getSheet(): ?bool\n    {\n        return $this->sheet;\n    }\n\n    public function setSheet(?bool $sheet): self\n    {\n        $this->sheet = $sheet;\n\n        return $this;\n    }\n\n    public function getObjects(): ?bool\n    {\n        return $this->objects;\n    }\n\n    public function setObjects(?bool $objects): self\n    {\n        $this->objects = $objects;\n\n        return $this;\n    }\n\n    public function getScenarios(): ?bool\n    {\n        return $this->scenarios;\n    }\n\n    public function setScenarios(?bool $scenarios): self\n    {\n        $this->scenarios = $scenarios;\n\n        return $this;\n    }\n\n    public function getFormatCells(): ?bool\n    {\n        return $this->formatCells;\n    }\n\n    public function setFormatCells(?bool $formatCells): self\n    {\n        $this->formatCells = $formatCells;\n\n        return $this;\n    }\n\n    public function getFormatColumns(): ?bool\n    {\n        return $this->formatColumns;\n    }\n\n    public function setFormatColumns(?bool $formatColumns): self\n    {\n        $this->formatColumns = $formatColumns;\n\n        return $this;\n    }\n\n    public function getFormatRows(): ?bool\n    {\n        return $this->formatRows;\n    }\n\n    public function setFormatRows(?bool $formatRows): self\n    {\n        $this->formatRows = $formatRows;\n\n        return $this;\n    }\n\n    public function getInsertColumns(): ?bool\n    {\n        return $this->insertColumns;\n    }\n\n    public function setInsertColumns(?bool $insertColumns): self\n    {\n        $this->insertColumns = $insertColumns;\n\n        return $this;\n    }\n\n    public function getInsertRows(): ?bool\n    {\n        return $this->insertRows;\n    }\n\n    public function setInsertRows(?bool $insertRows): self\n    {\n        $this->insertRows = $insertRows;\n\n        return $this;\n    }\n\n    public function getInsertHyperlinks(): ?bool\n    {\n        return $this->insertHyperlinks;\n    }\n\n    public function setInsertHyperlinks(?bool $insertHyperLinks): self\n    {\n        $this->insertHyperlinks = $insertHyperLinks;\n\n        return $this;\n    }\n\n    public function getDeleteColumns(): ?bool\n    {\n        return $this->deleteColumns;\n    }\n\n    public function setDeleteColumns(?bool $deleteColumns): self\n    {\n        $this->deleteColumns = $deleteColumns;\n\n        return $this;\n    }\n\n    public function getDeleteRows(): ?bool\n    {\n        return $this->deleteRows;\n    }\n\n    public function setDeleteRows(?bool $deleteRows): self\n    {\n        $this->deleteRows = $deleteRows;\n\n        return $this;\n    }\n\n    public function getSelectLockedCells(): ?bool\n    {\n        return $this->selectLockedCells;\n    }\n\n    public function setSelectLockedCells(?bool $selectLockedCells): self\n    {\n        $this->selectLockedCells = $selectLockedCells;\n\n        return $this;\n    }\n\n    public function getSort(): ?bool\n    {\n        return $this->sort;\n    }\n\n    public function setSort(?bool $sort): self\n    {\n        $this->sort = $sort;\n\n        return $this;\n    }\n\n    public function getAutoFilter(): ?bool\n    {\n        return $this->autoFilter;\n    }\n\n    public function setAutoFilter(?bool $autoFilter): self\n    {\n        $this->autoFilter = $autoFilter;\n\n        return $this;\n    }\n\n    public function getPivotTables(): ?bool\n    {\n        return $this->pivotTables;\n    }\n\n    public function setPivotTables(?bool $pivotTables): self\n    {\n        $this->pivotTables = $pivotTables;\n\n        return $this;\n    }\n\n    public function getSelectUnlockedCells(): ?bool\n    {\n        return $this->selectUnlockedCells;\n    }\n\n    public function setSelectUnlockedCells(?bool $selectUnlockedCells): self\n    {\n        $this->selectUnlockedCells = $selectUnlockedCells;\n\n        return $this;\n    }\n\n    /**\n     * Get hashed password.\n     */\n    public function getPassword(): string\n    {\n        return $this->password;\n    }\n\n    /**\n     * Set Password.\n     *\n     * @param bool $alreadyHashed If the password has already been hashed, set this to true\n     *\n     * @return $this\n     */\n    public function setPassword(string $password, bool $alreadyHashed = false): static\n    {\n        if (!$alreadyHashed) {\n            $salt = $this->generateSalt();\n            $this->setSalt($salt);\n            $password = PasswordHasher::hashPassword($password, $this->getAlgorithm(), $this->getSalt(), $this->getSpinCount());\n        }\n\n        $this->password = $password;\n\n        return $this;\n    }\n\n    public function setHashValue(string $password): self\n    {\n        return $this->setPassword($password, true);\n    }\n\n    /**\n     * Create a pseudorandom string.\n     */\n    private function generateSalt(): string\n    {\n        return base64_encode(random_bytes(16));\n    }\n\n    /**\n     * Get algorithm name.\n     */\n    public function getAlgorithm(): string\n    {\n        return $this->algorithm;\n    }\n\n    /**\n     * Set algorithm name.\n     */\n    public function setAlgorithm(string $algorithm): self\n    {\n        return $this->setAlgorithmName($algorithm);\n    }\n\n    /**\n     * Set algorithm name.\n     */\n    public function setAlgorithmName(string $algorithm): self\n    {\n        $this->algorithm = $algorithm;\n\n        return $this;\n    }\n\n    public function getSalt(): string\n    {\n        return $this->salt;\n    }\n\n    public function setSalt(string $salt): self\n    {\n        return $this->setSaltValue($salt);\n    }\n\n    public function setSaltValue(string $salt): self\n    {\n        $this->salt = $salt;\n\n        return $this;\n    }\n\n    /**\n     * Get spin count.\n     */\n    public function getSpinCount(): int\n    {\n        return $this->spinCount;\n    }\n\n    /**\n     * Set spin count.\n     */\n    public function setSpinCount(int $spinCount): self\n    {\n        $this->spinCount = $spinCount;\n\n        return $this;\n    }\n\n    /**\n     * Verify that the given non-hashed password can \"unlock\" the protection.\n     */\n    public function verify(string $password): bool\n    {\n        if ($this->password === '') {\n            return true;\n        }\n\n        $hash = PasswordHasher::hashPassword($password, $this->getAlgorithm(), $this->getSalt(), $this->getSpinCount());\n\n        return $this->getPassword() === $hash;\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                $this->$key = clone $value;\n            } else {\n                $this->$key = $value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Row.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nclass Row\n{\n    private Worksheet $worksheet;\n\n    /**\n     * Row index.\n     */\n    private int $rowIndex;\n\n    /**\n     * Create a new row.\n     */\n    public function __construct(Worksheet $worksheet, int $rowIndex = 1)\n    {\n        // Set parent and row index\n        $this->worksheet = $worksheet;\n        $this->rowIndex = $rowIndex;\n    }\n\n    /**\n     * Destructor.\n     */\n    public function __destruct()\n    {\n        unset($this->worksheet);\n    }\n\n    /**\n     * Get row index.\n     */\n    public function getRowIndex(): int\n    {\n        return $this->rowIndex;\n    }\n\n    /**\n     * Get cell iterator.\n     *\n     * @param string $startColumn The column address at which to start iterating\n     * @param ?string $endColumn Optionally, the column address at which to stop iterating\n     */\n    public function getCellIterator(string $startColumn = 'A', ?string $endColumn = null, bool $iterateOnlyExistingCells = false): RowCellIterator\n    {\n        return new RowCellIterator($this->worksheet, $this->rowIndex, $startColumn, $endColumn, $iterateOnlyExistingCells);\n    }\n\n    /**\n     * Get column iterator. Synonym for getCellIterator().\n     *\n     * @param string $startColumn The column address at which to start iterating\n     * @param ?string $endColumn Optionally, the column address at which to stop iterating\n     */\n    public function getColumnIterator(string $startColumn = 'A', ?string $endColumn = null, bool $iterateOnlyExistingCells = false): RowCellIterator\n    {\n        return $this->getCellIterator($startColumn, $endColumn, $iterateOnlyExistingCells);\n    }\n\n    /**\n     * Returns a boolean true if the row contains no cells. By default, this means that no cell records exist in the\n     *         collection for this row. false will be returned otherwise.\n     *     This rule can be modified by passing a $definitionOfEmptyFlags value:\n     *          1 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL If the only cells in the collection are null value\n     *                  cells, then the row will be considered empty.\n     *          2 - CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are empty\n     *                  string value cells, then the row will be considered empty.\n     *          3 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL\n     *                  If the only cells in the collection are null value or empty string value cells, then the row\n     *                  will be considered empty.\n     *\n     * @param int $definitionOfEmptyFlags\n     *              Possible Flag Values are:\n     *                  CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL\n     *                  CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL\n     * @param string $startColumn The column address at which to start checking if cells are empty\n     * @param ?string $endColumn Optionally, the column address at which to stop checking if cells are empty\n     */\n    public function isEmpty(int $definitionOfEmptyFlags = 0, string $startColumn = 'A', ?string $endColumn = null): bool\n    {\n        $nullValueCellIsEmpty = (bool) ($definitionOfEmptyFlags & CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL);\n        $emptyStringCellIsEmpty = (bool) ($definitionOfEmptyFlags & CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL);\n\n        $cellIterator = $this->getCellIterator($startColumn, $endColumn);\n        $cellIterator->setIterateOnlyExistingCells(true);\n        foreach ($cellIterator as $cell) {\n            $value = $cell->getValue();\n            if ($value === null && $nullValueCellIsEmpty === true) {\n                continue;\n            }\n            if ($value === '' && $emptyStringCellIsEmpty === true) {\n                continue;\n            }\n\n            return false;\n        }\n\n        return true;\n    }\n\n    /**\n     * Returns bound worksheet.\n     */\n    public function getWorksheet(): Worksheet\n    {\n        return $this->worksheet;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/RowCellIterator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\n/**\n * @extends CellIterator<string>\n */\nclass RowCellIterator extends CellIterator\n{\n    /**\n     * Current iterator position.\n     */\n    private int $currentColumnIndex;\n\n    /**\n     * Row index.\n     */\n    private int $rowIndex;\n\n    /**\n     * Start position.\n     */\n    private int $startColumnIndex = 1;\n\n    /**\n     * End position.\n     */\n    private int $endColumnIndex = 1;\n\n    /**\n     * Create a new column iterator.\n     *\n     * @param Worksheet $worksheet The worksheet to iterate over\n     * @param int $rowIndex The row that we want to iterate\n     * @param string $startColumn The column address at which to start iterating\n     * @param ?string $endColumn Optionally, the column address at which to stop iterating\n     */\n    public function __construct(Worksheet $worksheet, int $rowIndex = 1, string $startColumn = 'A', ?string $endColumn = null, bool $iterateOnlyExistingCells = false)\n    {\n        // Set subject and row index\n        $this->worksheet = $worksheet;\n        $this->cellCollection = $worksheet->getCellCollection();\n        $this->rowIndex = $rowIndex;\n        $this->resetEnd($endColumn);\n        $this->resetStart($startColumn);\n        $this->setIterateOnlyExistingCells($iterateOnlyExistingCells);\n    }\n\n    /**\n     * (Re)Set the start column and the current column pointer.\n     *\n     * @param string $startColumn The column address at which to start iterating\n     *\n     * @return $this\n     */\n    public function resetStart(string $startColumn = 'A'): static\n    {\n        $this->startColumnIndex = Coordinate::columnIndexFromString($startColumn);\n        $this->adjustForExistingOnlyRange();\n        $this->seek(Coordinate::stringFromColumnIndex($this->startColumnIndex));\n\n        return $this;\n    }\n\n    /**\n     * (Re)Set the end column.\n     *\n     * @param ?string $endColumn The column address at which to stop iterating\n     *\n     * @return $this\n     */\n    public function resetEnd(?string $endColumn = null): static\n    {\n        $endColumn = $endColumn ?: $this->worksheet->getHighestColumn();\n        $this->endColumnIndex = Coordinate::columnIndexFromString($endColumn);\n        $this->adjustForExistingOnlyRange();\n\n        return $this;\n    }\n\n    /**\n     * Set the column pointer to the selected column.\n     *\n     * @param string $column The column address to set the current pointer at\n     *\n     * @return $this\n     */\n    public function seek(string $column = 'A'): static\n    {\n        $columnId = Coordinate::columnIndexFromString($column);\n        if ($this->onlyExistingCells && !($this->cellCollection->has($column . $this->rowIndex))) {\n            throw new PhpSpreadsheetException('In \"IterateOnlyExistingCells\" mode and Cell does not exist');\n        }\n        if (($columnId < $this->startColumnIndex) || ($columnId > $this->endColumnIndex)) {\n            throw new PhpSpreadsheetException(\"Column $column is out of range ({$this->startColumnIndex} - {$this->endColumnIndex})\");\n        }\n        $this->currentColumnIndex = $columnId;\n\n        return $this;\n    }\n\n    /**\n     * Rewind the iterator to the starting column.\n     */\n    public function rewind(): void\n    {\n        $this->currentColumnIndex = $this->startColumnIndex;\n    }\n\n    /**\n     * Return the current cell in this worksheet row.\n     */\n    public function current(): ?Cell\n    {\n        $cellAddress = Coordinate::stringFromColumnIndex($this->currentColumnIndex) . $this->rowIndex;\n\n        return $this->cellCollection->has($cellAddress)\n            ? $this->cellCollection->get($cellAddress)\n            : (\n                $this->ifNotExists === self::IF_NOT_EXISTS_CREATE_NEW\n                ? $this->worksheet->createNewCell($cellAddress)\n                : null\n            );\n    }\n\n    /**\n     * Return the current iterator key.\n     */\n    public function key(): string\n    {\n        return Coordinate::stringFromColumnIndex($this->currentColumnIndex);\n    }\n\n    /**\n     * Set the iterator to its next value.\n     */\n    public function next(): void\n    {\n        do {\n            ++$this->currentColumnIndex;\n        } while (($this->onlyExistingCells) && (!$this->cellCollection->has(Coordinate::stringFromColumnIndex($this->currentColumnIndex) . $this->rowIndex)) && ($this->currentColumnIndex <= $this->endColumnIndex));\n    }\n\n    /**\n     * Set the iterator to its previous value.\n     */\n    public function prev(): void\n    {\n        do {\n            --$this->currentColumnIndex;\n        } while (($this->onlyExistingCells) && (!$this->cellCollection->has(Coordinate::stringFromColumnIndex($this->currentColumnIndex) . $this->rowIndex)) && ($this->currentColumnIndex >= $this->startColumnIndex));\n    }\n\n    /**\n     * Indicate if more columns exist in the worksheet range of columns that we're iterating.\n     */\n    public function valid(): bool\n    {\n        return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;\n    }\n\n    /**\n     * Return the current iterator position.\n     */\n    public function getCurrentColumnIndex(): int\n    {\n        return $this->currentColumnIndex;\n    }\n\n    /**\n     * Validate start/end values for \"IterateOnlyExistingCells\" mode, and adjust if necessary.\n     */\n    protected function adjustForExistingOnlyRange(): void\n    {\n        if ($this->onlyExistingCells) {\n            while ((!$this->cellCollection->has(Coordinate::stringFromColumnIndex($this->startColumnIndex) . $this->rowIndex)) && ($this->startColumnIndex <= $this->endColumnIndex)) {\n                ++$this->startColumnIndex;\n            }\n            while ((!$this->cellCollection->has(Coordinate::stringFromColumnIndex($this->endColumnIndex) . $this->rowIndex)) && ($this->endColumnIndex >= $this->startColumnIndex)) {\n                --$this->endColumnIndex;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/RowDimension.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension as CssDimension;\n\nclass RowDimension extends Dimension\n{\n    private ?int $rowIndex;\n\n    /**\n     * Row height (in pt).\n     *\n     * When this is set to a negative value, the row height should be ignored by IWriter\n     */\n    private float $height = -1;\n\n    /**\n     * ZeroHeight for Row?\n     */\n    private bool $zeroHeight = false;\n\n    private bool $customFormat = false;\n\n    private bool $visibleAfterFilter = true;\n\n    public function setVisibleAfterFilter(bool $visibleAfterFilter): self\n    {\n        $this->visibleAfterFilter = $visibleAfterFilter;\n\n        return $this;\n    }\n\n    public function getVisibleAfterFilter(): bool\n    {\n        return $this->visibleAfterFilter;\n    }\n\n    /**\n     * @param ?int $index Numeric row index\n     */\n    public function __construct(?int $index = 0)\n    {\n        // Initialise values\n        $this->rowIndex = $index;\n\n        // set dimension as unformatted by default\n        parent::__construct(null);\n    }\n\n    public function getRowIndex(): ?int\n    {\n        return $this->rowIndex;\n    }\n\n    public function setRowIndex(int $index): static\n    {\n        $this->rowIndex = $index;\n\n        return $this;\n    }\n\n    /**\n     * Get Row Height.\n     * By default, this will be in points; but this method also accepts an optional unit of measure\n     *    argument, and will convert the value from points to the specified UoM.\n     *    A value of -1 tells Excel to display this column in its default height.\n     */\n    public function getRowHeight(?string $unitOfMeasure = null): float\n    {\n        return ($unitOfMeasure === null || $this->height < 0)\n            ? $this->height\n            : (new CssDimension($this->height . CssDimension::UOM_POINTS))->toUnit($unitOfMeasure);\n    }\n\n    /**\n     * Set Row Height.\n     *\n     * @param float $height in points. A value of -1 tells Excel to display this column in its default height.\n     * By default, this will be the passed argument value; but this method also accepts an optional unit of measure\n     *    argument, and will convert the passed argument value to points from the specified UoM\n     */\n    public function setRowHeight(float $height, ?string $unitOfMeasure = null): static\n    {\n        $this->height = ($unitOfMeasure === null || $height < 0)\n            ? $height\n            : (new CssDimension(\"{$height}{$unitOfMeasure}\"))->height();\n        $this->customFormat = false;\n\n        return $this;\n    }\n\n    public function getZeroHeight(): bool\n    {\n        return $this->zeroHeight;\n    }\n\n    public function setZeroHeight(bool $zeroHeight): static\n    {\n        $this->zeroHeight = $zeroHeight;\n\n        return $this;\n    }\n\n    public function getCustomFormat(): bool\n    {\n        return $this->customFormat;\n    }\n\n    public function setCustomFormat(bool $customFormat, ?float $height = -1): self\n    {\n        $this->customFormat = $customFormat;\n        if ($height !== null) {\n            $this->height = $height;\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/RowIterator.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse Iterator as NativeIterator;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\n/**\n * @implements NativeIterator<int, Row>\n */\nclass RowIterator implements NativeIterator\n{\n    /**\n     * Worksheet to iterate.\n     */\n    private Worksheet $subject;\n\n    /**\n     * Current iterator position.\n     */\n    private int $position = 1;\n\n    /**\n     * Start position.\n     */\n    private int $startRow = 1;\n\n    /**\n     * End position.\n     */\n    private int $endRow = 1;\n\n    /**\n     * Create a new row iterator.\n     *\n     * @param Worksheet $subject The worksheet to iterate over\n     * @param int $startRow The row number at which to start iterating\n     * @param ?int $endRow Optionally, the row number at which to stop iterating\n     */\n    public function __construct(Worksheet $subject, int $startRow = 1, ?int $endRow = null)\n    {\n        // Set subject\n        $this->subject = $subject;\n        $this->resetEnd($endRow);\n        $this->resetStart($startRow);\n    }\n\n    public function __destruct()\n    {\n        unset($this->subject);\n    }\n\n    /**\n     * (Re)Set the start row and the current row pointer.\n     *\n     * @param int $startRow The row number at which to start iterating\n     *\n     * @return $this\n     */\n    public function resetStart(int $startRow = 1): static\n    {\n        if ($startRow > $this->subject->getHighestRow()) {\n            throw new PhpSpreadsheetException(\n                \"Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})\"\n            );\n        }\n\n        $this->startRow = $startRow;\n        if ($this->endRow < $this->startRow) {\n            $this->endRow = $this->startRow;\n        }\n        $this->seek($startRow);\n\n        return $this;\n    }\n\n    /**\n     * (Re)Set the end row.\n     *\n     * @param ?int $endRow The row number at which to stop iterating\n     *\n     * @return $this\n     */\n    public function resetEnd(?int $endRow = null): static\n    {\n        $this->endRow = $endRow ?: $this->subject->getHighestRow();\n\n        return $this;\n    }\n\n    /**\n     * Set the row pointer to the selected row.\n     *\n     * @param int $row The row number to set the current pointer at\n     *\n     * @return $this\n     */\n    public function seek(int $row = 1): static\n    {\n        if (($row < $this->startRow) || ($row > $this->endRow)) {\n            throw new PhpSpreadsheetException(\"Row $row is out of range ({$this->startRow} - {$this->endRow})\");\n        }\n        $this->position = $row;\n\n        return $this;\n    }\n\n    /**\n     * Rewind the iterator to the starting row.\n     */\n    public function rewind(): void\n    {\n        $this->position = $this->startRow;\n    }\n\n    /**\n     * Return the current row in this worksheet.\n     */\n    public function current(): Row\n    {\n        return new Row($this->subject, $this->position);\n    }\n\n    /**\n     * Return the current iterator key.\n     */\n    public function key(): int\n    {\n        return $this->position;\n    }\n\n    /**\n     * Set the iterator to its next value.\n     */\n    public function next(): void\n    {\n        ++$this->position;\n    }\n\n    /**\n     * Set the iterator to its previous value.\n     */\n    public function prev(): void\n    {\n        --$this->position;\n    }\n\n    /**\n     * Indicate if more rows exist in the worksheet range of rows that we're iterating.\n     */\n    public function valid(): bool\n    {\n        return $this->position <= $this->endRow && $this->position >= $this->startRow;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/SheetView.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass SheetView\n{\n    // Sheet View types\n    const SHEETVIEW_NORMAL = 'normal';\n    const SHEETVIEW_PAGE_LAYOUT = 'pageLayout';\n    const SHEETVIEW_PAGE_BREAK_PREVIEW = 'pageBreakPreview';\n\n    private const SHEET_VIEW_TYPES = [\n        self::SHEETVIEW_NORMAL,\n        self::SHEETVIEW_PAGE_LAYOUT,\n        self::SHEETVIEW_PAGE_BREAK_PREVIEW,\n    ];\n\n    /**\n     * ZoomScale.\n     *\n     * Valid values range from 10 to 400.\n     */\n    private ?int $zoomScale = 100;\n\n    /**\n     * ZoomScaleNormal.\n     *\n     * Valid values range from 10 to 400.\n     */\n    private ?int $zoomScaleNormal = 100;\n\n    /**\n     * ZoomScalePageLayoutView.\n     *\n     * Valid values range from 10 to 400.\n     */\n    private int $zoomScalePageLayoutView = 100;\n\n    /**\n     * ZoomScaleSheetLayoutView.\n     *\n     * Valid values range from 10 to 400.\n     */\n    private int $zoomScaleSheetLayoutView = 100;\n\n    /**\n     * ShowZeros.\n     *\n     * If true, \"null\" values from a calculation will be shown as \"0\". This is the default Excel behaviour and can be changed\n     * with the advanced worksheet option \"Show a zero in cells that have zero value\"\n     */\n    private bool $showZeros = true;\n\n    /**\n     * View.\n     *\n     * Valid values range from 10 to 400.\n     */\n    private string $sheetviewType = self::SHEETVIEW_NORMAL;\n\n    /**\n     * Create a new SheetView.\n     */\n    public function __construct()\n    {\n    }\n\n    /**\n     * Get ZoomScale.\n     */\n    public function getZoomScale(): ?int\n    {\n        return $this->zoomScale;\n    }\n\n    /**\n     * Set ZoomScale.\n     * Valid values range from 10 to 400.\n     *\n     * @return $this\n     */\n    public function setZoomScale(?int $zoomScale): static\n    {\n        // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface,\n        // but it is apparently still able to handle any scale >= 1\n        if ($zoomScale === null || $zoomScale >= 1) {\n            $this->zoomScale = $zoomScale;\n        } else {\n            throw new PhpSpreadsheetException('Scale must be greater than or equal to 1.');\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get ZoomScaleNormal.\n     */\n    public function getZoomScaleNormal(): ?int\n    {\n        return $this->zoomScaleNormal;\n    }\n\n    /**\n     * Set ZoomScale.\n     * Valid values range from 10 to 400.\n     *\n     * @return $this\n     */\n    public function setZoomScaleNormal(?int $zoomScaleNormal): static\n    {\n        if ($zoomScaleNormal === null || $zoomScaleNormal >= 1) {\n            $this->zoomScaleNormal = $zoomScaleNormal;\n        } else {\n            throw new PhpSpreadsheetException('Scale must be greater than or equal to 1.');\n        }\n\n        return $this;\n    }\n\n    public function getZoomScalePageLayoutView(): int\n    {\n        return $this->zoomScalePageLayoutView;\n    }\n\n    public function setZoomScalePageLayoutView(int $zoomScalePageLayoutView): static\n    {\n        if ($zoomScalePageLayoutView >= 1) {\n            $this->zoomScalePageLayoutView = $zoomScalePageLayoutView;\n        } else {\n            throw new PhpSpreadsheetException('Scale must be greater than or equal to 1.');\n        }\n\n        return $this;\n    }\n\n    public function getZoomScaleSheetLayoutView(): int\n    {\n        return $this->zoomScaleSheetLayoutView;\n    }\n\n    public function setZoomScaleSheetLayoutView(int $zoomScaleSheetLayoutView): static\n    {\n        if ($zoomScaleSheetLayoutView >= 1) {\n            $this->zoomScaleSheetLayoutView = $zoomScaleSheetLayoutView;\n        } else {\n            throw new PhpSpreadsheetException('Scale must be greater than or equal to 1.');\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set ShowZeroes setting.\n     */\n    public function setShowZeros(bool $showZeros): void\n    {\n        $this->showZeros = $showZeros;\n    }\n\n    public function getShowZeros(): bool\n    {\n        return $this->showZeros;\n    }\n\n    /**\n     * Get View.\n     */\n    public function getView(): string\n    {\n        return $this->sheetviewType;\n    }\n\n    /**\n     * Set View.\n     *\n     * Valid values are\n     *        'normal'            self::SHEETVIEW_NORMAL\n     *        'pageLayout'        self::SHEETVIEW_PAGE_LAYOUT\n     *        'pageBreakPreview'  self::SHEETVIEW_PAGE_BREAK_PREVIEW\n     *\n     * @return $this\n     */\n    public function setView(?string $sheetViewType): static\n    {\n        // MS Excel 2007 allows setting the view to 'normal', 'pageLayout' or 'pageBreakPreview' via the user interface\n        if ($sheetViewType === null) {\n            $sheetViewType = self::SHEETVIEW_NORMAL;\n        }\n        if (in_array($sheetViewType, self::SHEET_VIEW_TYPES)) {\n            $this->sheetviewType = $sheetViewType;\n        } else {\n            throw new PhpSpreadsheetException('Invalid sheetview layout type.');\n        }\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Table/Column.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Column\n{\n    /**\n     * Table Column Index.\n     */\n    private string $columnIndex;\n\n    /**\n     * Show Filter Button.\n     */\n    private bool $showFilterButton = true;\n\n    /**\n     * Total Row Label.\n     */\n    private ?string $totalsRowLabel = null;\n\n    /**\n     * Total Row Function.\n     */\n    private ?string $totalsRowFunction = null;\n\n    /**\n     * Total Row Formula.\n     */\n    private ?string $totalsRowFormula = null;\n\n    /**\n     * Column Formula.\n     */\n    private ?string $columnFormula = null;\n\n    /**\n     * Table.\n     */\n    private ?Table $table;\n\n    /**\n     * Create a new Column.\n     *\n     * @param string $column Column (e.g. A)\n     * @param ?Table $table Table for this column\n     */\n    public function __construct(string $column, ?Table $table = null)\n    {\n        $this->columnIndex = $column;\n        $this->table = $table;\n    }\n\n    /**\n     * Get Table column index as string eg: 'A'.\n     */\n    public function getColumnIndex(): string\n    {\n        return $this->columnIndex;\n    }\n\n    /**\n     * Set Table column index as string eg: 'A'.\n     *\n     * @param string $column Column (e.g. A)\n     */\n    public function setColumnIndex(string $column): self\n    {\n        // Uppercase coordinate\n        $column = strtoupper($column);\n        if ($this->table !== null) {\n            $this->table->isColumnInRange($column);\n        }\n\n        $this->columnIndex = $column;\n\n        return $this;\n    }\n\n    /**\n     * Get show Filter Button.\n     */\n    public function getShowFilterButton(): bool\n    {\n        return $this->showFilterButton;\n    }\n\n    /**\n     * Set show Filter Button.\n     */\n    public function setShowFilterButton(bool $showFilterButton): self\n    {\n        $this->showFilterButton = $showFilterButton;\n\n        return $this;\n    }\n\n    /**\n     * Get total Row Label.\n     */\n    public function getTotalsRowLabel(): ?string\n    {\n        return $this->totalsRowLabel;\n    }\n\n    /**\n     * Set total Row Label.\n     */\n    public function setTotalsRowLabel(string $totalsRowLabel): self\n    {\n        $this->totalsRowLabel = $totalsRowLabel;\n\n        return $this;\n    }\n\n    /**\n     * Get total Row Function.\n     */\n    public function getTotalsRowFunction(): ?string\n    {\n        return $this->totalsRowFunction;\n    }\n\n    /**\n     * Set total Row Function.\n     */\n    public function setTotalsRowFunction(string $totalsRowFunction): self\n    {\n        $this->totalsRowFunction = $totalsRowFunction;\n\n        return $this;\n    }\n\n    /**\n     * Get total Row Formula.\n     */\n    public function getTotalsRowFormula(): ?string\n    {\n        return $this->totalsRowFormula;\n    }\n\n    /**\n     * Set total Row Formula.\n     */\n    public function setTotalsRowFormula(string $totalsRowFormula): self\n    {\n        $this->totalsRowFormula = $totalsRowFormula;\n\n        return $this;\n    }\n\n    /**\n     * Get column Formula.\n     */\n    public function getColumnFormula(): ?string\n    {\n        return $this->columnFormula;\n    }\n\n    /**\n     * Set column Formula.\n     */\n    public function setColumnFormula(string $columnFormula): self\n    {\n        $this->columnFormula = $columnFormula;\n\n        return $this;\n    }\n\n    /**\n     * Get this Column's Table.\n     */\n    public function getTable(): ?Table\n    {\n        return $this->table;\n    }\n\n    /**\n     * Set this Column's Table.\n     */\n    public function setTable(?Table $table = null): self\n    {\n        $this->table = $table;\n\n        return $this;\n    }\n\n    public static function updateStructuredReferences(?Worksheet $workSheet, ?string $oldTitle, ?string $newTitle): void\n    {\n        if ($workSheet === null || $oldTitle === null || $oldTitle === '' || $newTitle === null) {\n            return;\n        }\n\n        // Remember that table headings are case-insensitive\n        if (StringHelper::strToLower($oldTitle) !== StringHelper::strToLower($newTitle)) {\n            // We need to check all formula cells that might contain Structured References that refer\n            //    to this column, and update those formulae to reference the new column text\n            $spreadsheet = $workSheet->getParentOrThrow();\n            foreach ($spreadsheet->getWorksheetIterator() as $sheet) {\n                self::updateStructuredReferencesInCells($sheet, $oldTitle, $newTitle);\n            }\n            self::updateStructuredReferencesInNamedFormulae($spreadsheet, $oldTitle, $newTitle);\n        }\n    }\n\n    private static function updateStructuredReferencesInCells(Worksheet $worksheet, string $oldTitle, string $newTitle): void\n    {\n        $pattern = '/\\[(@?)' . preg_quote($oldTitle, '/') . '\\]/mui';\n\n        foreach ($worksheet->getCoordinates(false) as $coordinate) {\n            $cell = $worksheet->getCell($coordinate);\n            if ($cell->getDataType() === DataType::TYPE_FORMULA) {\n                $formula = $cell->getValueString();\n                if (preg_match($pattern, $formula) === 1) {\n                    $formula = preg_replace($pattern, \"[$1{$newTitle}]\", $formula);\n                    $cell->setValueExplicit($formula, DataType::TYPE_FORMULA);\n                }\n            }\n        }\n    }\n\n    private static function updateStructuredReferencesInNamedFormulae(Spreadsheet $spreadsheet, string $oldTitle, string $newTitle): void\n    {\n        $pattern = '/\\[(@?)' . preg_quote($oldTitle, '/') . '\\]/mui';\n\n        foreach ($spreadsheet->getNamedFormulae() as $namedFormula) {\n            $formula = $namedFormula->getValue();\n            if (preg_match($pattern, $formula) === 1) {\n                $formula = preg_replace($pattern, \"[$1{$newTitle}]\", $formula) ?? '';\n                $namedFormula->setValue($formula);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Table/TableDxfsStyle.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nclass TableDxfsStyle\n{\n    /**\n     * Header row dxfs index.\n     */\n    private ?int $headerRow = null;\n\n    /**\n     * First row stripe dxfs index.\n     */\n    private ?int $firstRowStripe = null;\n\n    /**\n     * second row stripe dxfs index.\n     */\n    private ?int $secondRowStripe = null;\n\n    /**\n     * Header row Style.\n     */\n    private ?Style $headerRowStyle = null;\n\n    /**\n     * First row stripe Style.\n     */\n    private ?Style $firstRowStripeStyle = null;\n\n    /**\n     * Second row stripe Style.\n     */\n    private ?Style $secondRowStripeStyle = null;\n\n    /**\n     * Name of the style.\n     */\n    private string $name;\n\n    /**\n     * Create a new Table Style.\n     *\n     * @param string $name The name\n     */\n    public function __construct(string $name)\n    {\n        $this->name = $name;\n    }\n\n    /**\n     * Get name.\n     */\n    public function getName(): string\n    {\n        return $this->name;\n    }\n\n    /**\n     * Set header row dxfs index.\n     */\n    public function setHeaderRow(int $row): self\n    {\n        $this->headerRow = $row;\n\n        return $this;\n    }\n\n    /**\n     * Get header row dxfs index.\n     */\n    public function getHeaderRow(): ?int\n    {\n        return $this->headerRow;\n    }\n\n    /**\n     * Set first row stripe dxfs index.\n     */\n    public function setFirstRowStripe(int $row): self\n    {\n        $this->firstRowStripe = $row;\n\n        return $this;\n    }\n\n    /**\n     * Get first row stripe dxfs index.\n     */\n    public function getFirstRowStripe(): ?int\n    {\n        return $this->firstRowStripe;\n    }\n\n    /**\n     * Set second row stripe dxfs index.\n     */\n    public function setSecondRowStripe(int $row): self\n    {\n        $this->secondRowStripe = $row;\n\n        return $this;\n    }\n\n    /**\n     * Get second row stripe dxfs index.\n     */\n    public function getSecondRowStripe(): ?int\n    {\n        return $this->secondRowStripe;\n    }\n\n    /**\n     * Set Header row Style.\n     */\n    public function setHeaderRowStyle(Style $style): self\n    {\n        $this->headerRowStyle = $style;\n\n        return $this;\n    }\n\n    /**\n     * Get Header row Style.\n     */\n    public function getHeaderRowStyle(): ?Style\n    {\n        return $this->headerRowStyle;\n    }\n\n    /**\n     * Set first row stripe Style.\n     */\n    public function setFirstRowStripeStyle(Style $style): self\n    {\n        $this->firstRowStripeStyle = $style;\n\n        return $this;\n    }\n\n    /**\n     * Get first row stripe Style.\n     */\n    public function getFirstRowStripeStyle(): ?Style\n    {\n        return $this->firstRowStripeStyle;\n    }\n\n    /**\n     * Set second row stripe Style.\n     */\n    public function setSecondRowStripeStyle(Style $style): self\n    {\n        $this->secondRowStripeStyle = $style;\n\n        return $this;\n    }\n\n    /**\n     * Get second row stripe Style.\n     */\n    public function getSecondRowStripeStyle(): ?Style\n    {\n        return $this->secondRowStripeStyle;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Table/TableStyle.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nclass TableStyle\n{\n    const TABLE_STYLE_NONE = '';\n    const TABLE_STYLE_LIGHT1 = 'TableStyleLight1';\n    const TABLE_STYLE_LIGHT2 = 'TableStyleLight2';\n    const TABLE_STYLE_LIGHT3 = 'TableStyleLight3';\n    const TABLE_STYLE_LIGHT4 = 'TableStyleLight4';\n    const TABLE_STYLE_LIGHT5 = 'TableStyleLight5';\n    const TABLE_STYLE_LIGHT6 = 'TableStyleLight6';\n    const TABLE_STYLE_LIGHT7 = 'TableStyleLight7';\n    const TABLE_STYLE_LIGHT8 = 'TableStyleLight8';\n    const TABLE_STYLE_LIGHT9 = 'TableStyleLight9';\n    const TABLE_STYLE_LIGHT10 = 'TableStyleLight10';\n    const TABLE_STYLE_LIGHT11 = 'TableStyleLight11';\n    const TABLE_STYLE_LIGHT12 = 'TableStyleLight12';\n    const TABLE_STYLE_LIGHT13 = 'TableStyleLight13';\n    const TABLE_STYLE_LIGHT14 = 'TableStyleLight14';\n    const TABLE_STYLE_LIGHT15 = 'TableStyleLight15';\n    const TABLE_STYLE_LIGHT16 = 'TableStyleLight16';\n    const TABLE_STYLE_LIGHT17 = 'TableStyleLight17';\n    const TABLE_STYLE_LIGHT18 = 'TableStyleLight18';\n    const TABLE_STYLE_LIGHT19 = 'TableStyleLight19';\n    const TABLE_STYLE_LIGHT20 = 'TableStyleLight20';\n    const TABLE_STYLE_LIGHT21 = 'TableStyleLight21';\n    const TABLE_STYLE_MEDIUM1 = 'TableStyleMedium1';\n    const TABLE_STYLE_MEDIUM2 = 'TableStyleMedium2';\n    const TABLE_STYLE_MEDIUM3 = 'TableStyleMedium3';\n    const TABLE_STYLE_MEDIUM4 = 'TableStyleMedium4';\n    const TABLE_STYLE_MEDIUM5 = 'TableStyleMedium5';\n    const TABLE_STYLE_MEDIUM6 = 'TableStyleMedium6';\n    const TABLE_STYLE_MEDIUM7 = 'TableStyleMedium7';\n    const TABLE_STYLE_MEDIUM8 = 'TableStyleMedium8';\n    const TABLE_STYLE_MEDIUM9 = 'TableStyleMedium9';\n    const TABLE_STYLE_MEDIUM10 = 'TableStyleMedium10';\n    const TABLE_STYLE_MEDIUM11 = 'TableStyleMedium11';\n    const TABLE_STYLE_MEDIUM12 = 'TableStyleMedium12';\n    const TABLE_STYLE_MEDIUM13 = 'TableStyleMedium13';\n    const TABLE_STYLE_MEDIUM14 = 'TableStyleMedium14';\n    const TABLE_STYLE_MEDIUM15 = 'TableStyleMedium15';\n    const TABLE_STYLE_MEDIUM16 = 'TableStyleMedium16';\n    const TABLE_STYLE_MEDIUM17 = 'TableStyleMedium17';\n    const TABLE_STYLE_MEDIUM18 = 'TableStyleMedium18';\n    const TABLE_STYLE_MEDIUM19 = 'TableStyleMedium19';\n    const TABLE_STYLE_MEDIUM20 = 'TableStyleMedium20';\n    const TABLE_STYLE_MEDIUM21 = 'TableStyleMedium21';\n    const TABLE_STYLE_MEDIUM22 = 'TableStyleMedium22';\n    const TABLE_STYLE_MEDIUM23 = 'TableStyleMedium23';\n    const TABLE_STYLE_MEDIUM24 = 'TableStyleMedium24';\n    const TABLE_STYLE_MEDIUM25 = 'TableStyleMedium25';\n    const TABLE_STYLE_MEDIUM26 = 'TableStyleMedium26';\n    const TABLE_STYLE_MEDIUM27 = 'TableStyleMedium27';\n    const TABLE_STYLE_MEDIUM28 = 'TableStyleMedium28';\n    const TABLE_STYLE_DARK1 = 'TableStyleDark1';\n    const TABLE_STYLE_DARK2 = 'TableStyleDark2';\n    const TABLE_STYLE_DARK3 = 'TableStyleDark3';\n    const TABLE_STYLE_DARK4 = 'TableStyleDark4';\n    const TABLE_STYLE_DARK5 = 'TableStyleDark5';\n    const TABLE_STYLE_DARK6 = 'TableStyleDark6';\n    const TABLE_STYLE_DARK7 = 'TableStyleDark7';\n    const TABLE_STYLE_DARK8 = 'TableStyleDark8';\n    const TABLE_STYLE_DARK9 = 'TableStyleDark9';\n    const TABLE_STYLE_DARK10 = 'TableStyleDark10';\n    const TABLE_STYLE_DARK11 = 'TableStyleDark11';\n\n    /**\n     * Theme.\n     */\n    private string $theme;\n\n    /**\n     * Show First Column.\n     */\n    private bool $showFirstColumn = false;\n\n    /**\n     * Show Last Column.\n     */\n    private bool $showLastColumn = false;\n\n    /**\n     * Show Row Stripes.\n     */\n    private bool $showRowStripes = false;\n\n    /**\n     * Show Column Stripes.\n     */\n    private bool $showColumnStripes = false;\n\n    /**\n     * TableDxfsStyle.\n     */\n    private ?TableDxfsStyle $tableStyle = null;\n\n    /**\n     * Table.\n     */\n    private ?Table $table = null;\n\n    /**\n     * Create a new Table Style.\n     *\n     * @param string $theme (e.g. TableStyle::TABLE_STYLE_MEDIUM2)\n     */\n    public function __construct(string $theme = self::TABLE_STYLE_MEDIUM2)\n    {\n        $this->theme = $theme;\n    }\n\n    /**\n     * Get theme.\n     */\n    public function getTheme(): string\n    {\n        return $this->theme;\n    }\n\n    /**\n     * Set theme.\n     */\n    public function setTheme(string $theme): self\n    {\n        $this->theme = $theme;\n\n        return $this;\n    }\n\n    /**\n     * Get show First Column.\n     */\n    public function getShowFirstColumn(): bool\n    {\n        return $this->showFirstColumn;\n    }\n\n    /**\n     * Set show First Column.\n     */\n    public function setShowFirstColumn(bool $showFirstColumn): self\n    {\n        $this->showFirstColumn = $showFirstColumn;\n\n        return $this;\n    }\n\n    /**\n     * Get show Last Column.\n     */\n    public function getShowLastColumn(): bool\n    {\n        return $this->showLastColumn;\n    }\n\n    /**\n     * Set show Last Column.\n     */\n    public function setShowLastColumn(bool $showLastColumn): self\n    {\n        $this->showLastColumn = $showLastColumn;\n\n        return $this;\n    }\n\n    /**\n     * Get show Row Stripes.\n     */\n    public function getShowRowStripes(): bool\n    {\n        return $this->showRowStripes;\n    }\n\n    /**\n     * Set show Row Stripes.\n     */\n    public function setShowRowStripes(bool $showRowStripes): self\n    {\n        $this->showRowStripes = $showRowStripes;\n\n        return $this;\n    }\n\n    /**\n     * Get show Column Stripes.\n     */\n    public function getShowColumnStripes(): bool\n    {\n        return $this->showColumnStripes;\n    }\n\n    /**\n     * Set show Column Stripes.\n     */\n    public function setShowColumnStripes(bool $showColumnStripes): self\n    {\n        $this->showColumnStripes = $showColumnStripes;\n\n        return $this;\n    }\n\n    /**\n     * Get this Style's Dxfs TableStyle.\n     */\n    public function getTableDxfsStyle(): ?TableDxfsStyle\n    {\n        return $this->tableStyle;\n    }\n\n    /**\n     * Set this Style's Dxfs TableStyle.\n     *\n     * @param Style[] $dxfs\n     */\n    public function setTableDxfsStyle(TableDxfsStyle $tableStyle, array $dxfs): self\n    {\n        $this->tableStyle = $tableStyle;\n\n        if ($this->tableStyle->getHeaderRow() !== null && isset($dxfs[$this->tableStyle->getHeaderRow()])) {\n            $this->tableStyle->setHeaderRowStyle($dxfs[$this->tableStyle->getHeaderRow()]);\n        }\n        if ($this->tableStyle->getFirstRowStripe() !== null && isset($dxfs[$this->tableStyle->getFirstRowStripe()])) {\n            $this->tableStyle->setFirstRowStripeStyle($dxfs[$this->tableStyle->getFirstRowStripe()]);\n        }\n        if ($this->tableStyle->getSecondRowStripe() !== null && isset($dxfs[$this->tableStyle->getSecondRowStripe()])) {\n            $this->tableStyle->setSecondRowStripeStyle($dxfs[$this->tableStyle->getSecondRowStripe()]);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get this Style's Table.\n     */\n    public function getTable(): ?Table\n    {\n        return $this->table;\n    }\n\n    /**\n     * Set this Style's Table.\n     */\n    public function setTable(?Table $table = null): self\n    {\n        $this->table = $table;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Table.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableStyle;\nuse Stringable;\n\nclass Table implements Stringable\n{\n    /**\n     * Table Name.\n     */\n    private string $name;\n\n    /**\n     * Show Header Row.\n     */\n    private bool $showHeaderRow = true;\n\n    /**\n     * Show Totals Row.\n     */\n    private bool $showTotalsRow = false;\n\n    /**\n     * Table Range.\n     */\n    private string $range = '';\n\n    /**\n     * Table Worksheet.\n     */\n    private ?Worksheet $workSheet = null;\n\n    /**\n     * Table allow filter.\n     */\n    private bool $allowFilter = true;\n\n    /**\n     * Table Column.\n     *\n     * @var Table\\Column[]\n     */\n    private array $columns = [];\n\n    /**\n     * Table Style.\n     */\n    private TableStyle $style;\n\n    /**\n     * Table AutoFilter.\n     */\n    private AutoFilter $autoFilter;\n\n    /**\n     * Create a new Table.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $range\n     *            A simple string containing a Cell range like 'A1:E10' is permitted\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or an AddressRange object.\n     * @param string $name (e.g. Table1)\n     */\n    public function __construct(AddressRange|string|array $range = '', string $name = '')\n    {\n        $this->style = new TableStyle();\n        $this->autoFilter = new AutoFilter($range);\n        $this->setRange($range);\n        $this->setName($name);\n    }\n\n    /**\n     * Code to execute when this table is unset().\n     */\n    public function __destruct()\n    {\n        $this->workSheet = null;\n    }\n\n    /**\n     * Get Table name.\n     */\n    public function getName(): string\n    {\n        return $this->name;\n    }\n\n    /**\n     * Set Table name.\n     *\n     * @throws PhpSpreadsheetException\n     */\n    public function setName(string $name): self\n    {\n        $name = trim($name);\n\n        if (!empty($name)) {\n            if (strlen($name) === 1 && in_array($name, ['C', 'c', 'R', 'r'])) {\n                throw new PhpSpreadsheetException('The table name is invalid');\n            }\n            if (StringHelper::countCharacters($name) > 255) {\n                throw new PhpSpreadsheetException('The table name cannot be longer than 255 characters');\n            }\n            // Check for A1 or R1C1 cell reference notation\n            if (\n                preg_match(Coordinate::A1_COORDINATE_REGEX, $name)\n                || preg_match('/^R\\[?\\-?[0-9]*\\]?C\\[?\\-?[0-9]*\\]?$/i', $name)\n            ) {\n                throw new PhpSpreadsheetException('The table name can\\'t be the same as a cell reference');\n            }\n            if (!preg_match('/^[\\p{L}_\\\\\\]/iu', $name)) {\n                throw new PhpSpreadsheetException('The table name must begin a name with a letter, an underscore character (_), or a backslash (\\)');\n            }\n            if (!preg_match('/^[\\p{L}_\\\\\\][\\p{L}\\p{M}0-9\\._]*$/iu', $name)) {\n                throw new PhpSpreadsheetException('The table name contains invalid characters');\n            }\n\n            $this->checkForDuplicateTableNames($name, $this->workSheet);\n            $this->updateStructuredReferences($name);\n        }\n\n        $this->name = $name;\n\n        return $this;\n    }\n\n    /**\n     * @throws PhpSpreadsheetException\n     */\n    private function checkForDuplicateTableNames(string $name, ?Worksheet $worksheet): void\n    {\n        // Remember that table names are case-insensitive\n        $tableName = StringHelper::strToLower($name);\n\n        if ($worksheet !== null && StringHelper::strToLower($this->name) !== $name) {\n            $spreadsheet = $worksheet->getParentOrThrow();\n\n            foreach ($spreadsheet->getWorksheetIterator() as $sheet) {\n                foreach ($sheet->getTableCollection() as $table) {\n                    if (StringHelper::strToLower($table->getName()) === $tableName && $table != $this) {\n                        throw new PhpSpreadsheetException(\"Spreadsheet already contains a table named '{$this->name}'\");\n                    }\n                }\n            }\n        }\n    }\n\n    private function updateStructuredReferences(string $name): void\n    {\n        if (!$this->workSheet || !$this->name) {\n            return;\n        }\n\n        // Remember that table names are case-insensitive\n        if (StringHelper::strToLower($this->name) !== StringHelper::strToLower($name)) {\n            // We need to check all formula cells that might contain fully-qualified Structured References\n            //    that refer to this table, and update those formulae to reference the new table name\n            $spreadsheet = $this->workSheet->getParentOrThrow();\n            foreach ($spreadsheet->getWorksheetIterator() as $sheet) {\n                $this->updateStructuredReferencesInCells($sheet, $name);\n            }\n            $this->updateStructuredReferencesInNamedFormulae($spreadsheet, $name);\n        }\n    }\n\n    private function updateStructuredReferencesInCells(Worksheet $worksheet, string $newName): void\n    {\n        $pattern = '/' . preg_quote($this->name, '/') . '\\[/mui';\n\n        foreach ($worksheet->getCoordinates(false) as $coordinate) {\n            $cell = $worksheet->getCell($coordinate);\n            if ($cell->getDataType() === DataType::TYPE_FORMULA) {\n                $formula = $cell->getValueString();\n                if (preg_match($pattern, $formula) === 1) {\n                    $formula = preg_replace($pattern, \"{$newName}[\", $formula);\n                    $cell->setValueExplicit($formula, DataType::TYPE_FORMULA);\n                }\n            }\n        }\n    }\n\n    private function updateStructuredReferencesInNamedFormulae(Spreadsheet $spreadsheet, string $newName): void\n    {\n        $pattern = '/' . preg_quote($this->name, '/') . '\\[/mui';\n\n        foreach ($spreadsheet->getNamedFormulae() as $namedFormula) {\n            $formula = $namedFormula->getValue();\n            if (preg_match($pattern, $formula) === 1) {\n                $formula = preg_replace($pattern, \"{$newName}[\", $formula) ?? '';\n                $namedFormula->setValue($formula);\n            }\n        }\n    }\n\n    /**\n     * Get show Header Row.\n     */\n    public function getShowHeaderRow(): bool\n    {\n        return $this->showHeaderRow;\n    }\n\n    /**\n     * Set show Header Row.\n     */\n    public function setShowHeaderRow(bool $showHeaderRow): self\n    {\n        $this->showHeaderRow = $showHeaderRow;\n\n        return $this;\n    }\n\n    /**\n     * Get show Totals Row.\n     */\n    public function getShowTotalsRow(): bool\n    {\n        return $this->showTotalsRow;\n    }\n\n    /**\n     * Set show Totals Row.\n     */\n    public function setShowTotalsRow(bool $showTotalsRow): self\n    {\n        $this->showTotalsRow = $showTotalsRow;\n\n        return $this;\n    }\n\n    /**\n     * Get allow filter.\n     * If false, autofiltering is disabled for the table, if true it is enabled.\n     */\n    public function getAllowFilter(): bool\n    {\n        return $this->allowFilter;\n    }\n\n    /**\n     * Set show Autofiltering.\n     * Disabling autofiltering has the same effect as hiding the filter button on all the columns in the table.\n     */\n    public function setAllowFilter(bool $allowFilter): self\n    {\n        $this->allowFilter = $allowFilter;\n\n        return $this;\n    }\n\n    /**\n     * Get Table Range.\n     */\n    public function getRange(): string\n    {\n        return $this->range;\n    }\n\n    /**\n     * Set Table Cell Range.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $range\n     *            A simple string containing a Cell range like 'A1:E10' is permitted\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or an AddressRange object.\n     */\n    public function setRange(AddressRange|string|array $range = ''): self\n    {\n        // extract coordinate\n        if ($range !== '') {\n            [, $range] = Worksheet::extractSheetTitle(Validations::validateCellRange($range), true);\n        }\n        if (empty($range)) {\n            //    Discard all column rules\n            $this->columns = [];\n            $this->range = '';\n\n            return $this;\n        }\n\n        if (!str_contains($range, ':')) {\n            throw new PhpSpreadsheetException('Table must be set on a range of cells.');\n        }\n\n        [$width, $height] = Coordinate::rangeDimension($range);\n        if ($width < 1 || $height < 1) {\n            throw new PhpSpreadsheetException('The table range must be at least 1 column and row');\n        }\n\n        $this->range = $range;\n        $this->autoFilter->setRange($range);\n\n        //    Discard any column rules that are no longer valid within this range\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);\n        foreach ($this->columns as $key => $value) {\n            $colIndex = Coordinate::columnIndexFromString($key);\n            if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) {\n                unset($this->columns[$key]);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set Table Cell Range to max row.\n     */\n    public function setRangeToMaxRow(): self\n    {\n        if ($this->workSheet !== null) {\n            $thisrange = $this->range;\n            $range = (string) preg_replace('/\\d+$/', (string) $this->workSheet->getHighestRow(), $thisrange);\n            if ($range !== $thisrange) {\n                $this->setRange($range);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get Table's Worksheet.\n     */\n    public function getWorksheet(): ?Worksheet\n    {\n        return $this->workSheet;\n    }\n\n    /**\n     * Set Table's Worksheet.\n     */\n    public function setWorksheet(?Worksheet $worksheet = null): self\n    {\n        if ($this->name !== '' && $worksheet !== null) {\n            $spreadsheet = $worksheet->getParentOrThrow();\n            $tableName = StringHelper::strToUpper($this->name);\n\n            foreach ($spreadsheet->getWorksheetIterator() as $sheet) {\n                foreach ($sheet->getTableCollection() as $table) {\n                    if (StringHelper::strToUpper($table->getName()) === $tableName) {\n                        throw new PhpSpreadsheetException(\"Workbook already contains a table named '{$this->name}'\");\n                    }\n                }\n            }\n        }\n\n        $this->workSheet = $worksheet;\n        $this->autoFilter->setParent($worksheet);\n\n        return $this;\n    }\n\n    /**\n     * Get all Table Columns.\n     *\n     * @return Table\\Column[]\n     */\n    public function getColumns(): array\n    {\n        return $this->columns;\n    }\n\n    /**\n     * Validate that the specified column is in the Table range.\n     *\n     * @param string $column Column name (e.g. A)\n     *\n     * @return int The column offset within the table range\n     */\n    public function isColumnInRange(string $column): int\n    {\n        if (empty($this->range)) {\n            throw new PhpSpreadsheetException('No table range is defined.');\n        }\n\n        $columnIndex = Coordinate::columnIndexFromString($column);\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);\n        if (($rangeStart[0] > $columnIndex) || ($rangeEnd[0] < $columnIndex)) {\n            throw new PhpSpreadsheetException('Column is outside of current table range.');\n        }\n\n        return $columnIndex - $rangeStart[0];\n    }\n\n    /**\n     * Get a specified Table Column Offset within the defined Table range.\n     *\n     * @param string $column Column name (e.g. A)\n     *\n     * @return int The offset of the specified column within the table range\n     */\n    public function getColumnOffset(string $column): int\n    {\n        return $this->isColumnInRange($column);\n    }\n\n    /**\n     * Get a specified Table Column.\n     *\n     * @param string $column Column name (e.g. A)\n     */\n    public function getColumn(string $column): Table\\Column\n    {\n        $this->isColumnInRange($column);\n\n        if (!isset($this->columns[$column])) {\n            $this->columns[$column] = new Table\\Column($column, $this);\n        }\n\n        return $this->columns[$column];\n    }\n\n    /**\n     * Get a specified Table Column by its offset.\n     *\n     * @param int $columnOffset Column offset within range (starting from 0)\n     */\n    public function getColumnByOffset(int $columnOffset): Table\\Column\n    {\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);\n        $pColumn = Coordinate::stringFromColumnIndex($rangeStart[0] + $columnOffset);\n\n        return $this->getColumn($pColumn);\n    }\n\n    /**\n     * Set Table.\n     *\n     * @param string|Table\\Column $columnObjectOrString\n     *            A simple string containing a Column ID like 'A' is permitted\n     */\n    public function setColumn(string|Table\\Column $columnObjectOrString): self\n    {\n        if ((is_string($columnObjectOrString)) && (!empty($columnObjectOrString))) {\n            $column = $columnObjectOrString;\n        } elseif ($columnObjectOrString instanceof Table\\Column) {\n            $column = $columnObjectOrString->getColumnIndex();\n        } else {\n            throw new PhpSpreadsheetException('Column is not within the table range.');\n        }\n        $this->isColumnInRange($column);\n\n        if (is_string($columnObjectOrString)) {\n            $this->columns[$columnObjectOrString] = new Table\\Column($columnObjectOrString, $this);\n        } else {\n            $columnObjectOrString->setTable($this);\n            $this->columns[$column] = $columnObjectOrString;\n        }\n        ksort($this->columns);\n\n        return $this;\n    }\n\n    /**\n     * Clear a specified Table Column.\n     *\n     * @param string $column Column name (e.g. A)\n     */\n    public function clearColumn(string $column): self\n    {\n        $this->isColumnInRange($column);\n\n        if (isset($this->columns[$column])) {\n            unset($this->columns[$column]);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Shift a Table Column Rule to a different column.\n     *\n     * Note: This method bypasses validation of the destination column to ensure it is within this Table range.\n     *        Nor does it verify whether any column rule already exists at $toColumn, but will simply override any existing value.\n     *        Use with caution.\n     *\n     * @param string $fromColumn Column name (e.g. A)\n     * @param string $toColumn Column name (e.g. B)\n     */\n    public function shiftColumn(string $fromColumn, string $toColumn): self\n    {\n        $fromColumn = strtoupper($fromColumn);\n        $toColumn = strtoupper($toColumn);\n\n        if (isset($this->columns[$fromColumn])) {\n            $this->columns[$fromColumn]->setTable();\n            $this->columns[$fromColumn]->setColumnIndex($toColumn);\n            $this->columns[$toColumn] = $this->columns[$fromColumn];\n            $this->columns[$toColumn]->setTable($this);\n            unset($this->columns[$fromColumn]);\n\n            ksort($this->columns);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get table Style.\n     */\n    public function getStyle(): TableStyle\n    {\n        return $this->style;\n    }\n\n    /**\n     * Set table Style.\n     */\n    public function setStyle(TableStyle $style): self\n    {\n        $this->style = $style;\n\n        return $this;\n    }\n\n    /**\n     * Get AutoFilter.\n     */\n    public function getAutoFilter(): AutoFilter\n    {\n        return $this->autoFilter;\n    }\n\n    /**\n     * Set AutoFilter.\n     */\n    public function setAutoFilter(AutoFilter $autoFilter): self\n    {\n        $this->autoFilter = $autoFilter;\n\n        return $this;\n    }\n\n    /**\n     * Get the row number on this table for given coordinates.\n     */\n    public function getRowNumber(string $coordinate): int\n    {\n        $range = $this->getRange();\n        $coords = Coordinate::splitRange($range);\n        $firstCell = Coordinate::coordinateFromString($coords[0][0]);\n        $thisCell = Coordinate::coordinateFromString($coordinate);\n\n        return (int) $thisCell[1] - (int) $firstCell[1];\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        $vars = get_object_vars($this);\n        foreach ($vars as $key => $value) {\n            if (is_object($value)) {\n                if ($key === 'workSheet') {\n                    //    Detach from worksheet\n                    $this->{$key} = null;\n                } else {\n                    $this->{$key} = clone $value;\n                }\n            } elseif ((is_array($value)) && ($key === 'columns')) {\n                //    The columns array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\Table objects\n                $this->{$key} = [];\n                foreach ($value as $k => $v) {\n                    /** @var Table\\Column $v */\n                    $this->{$key}[$k] = clone $v;\n                    // attach the new cloned Column to this new cloned Table object\n                    $this->{$key}[$k]->setTable($this);\n                }\n            } else {\n                $this->{$key} = $value;\n            }\n        }\n    }\n\n    /**\n     * toString method replicates previous behavior by returning the range if object is\n     * referenced as a property of its worksheet.\n     */\n    public function __toString(): string\n    {\n        return (string) $this->range;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Validations.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellRange;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\n\nclass Validations\n{\n    /**\n     * Validate a cell address.\n     *\n     * @param null|array{0: int, 1: int}|CellAddress|string $cellAddress Coordinate of the cell as a string, eg: 'C5';\n     *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     */\n    public static function validateCellAddress(null|CellAddress|string|array $cellAddress): string\n    {\n        if (is_string($cellAddress)) {\n            [$worksheet, $address] = Worksheet::extractSheetTitle($cellAddress, true);\n//            if (!empty($worksheet) && $worksheet !== $this->getTitle()) {\n//                throw new Exception('Reference is not for this worksheet');\n//            }\n\n            return empty($worksheet) ? strtoupper(\"$address\") : $worksheet . '!' . strtoupper(\"$address\");\n        }\n\n        if (is_array($cellAddress)) {\n            $cellAddress = CellAddress::fromColumnRowArray($cellAddress);\n        }\n\n        return (string) $cellAddress;\n    }\n\n    /**\n     * Validate a cell address or cell range.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $cellRange Coordinate of the cells as a string, eg: 'C5:F12';\n     *               or as an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 12]),\n     *               or as a CellAddress or AddressRange object.\n     */\n    public static function validateCellOrCellRange(AddressRange|CellAddress|int|string|array $cellRange): string\n    {\n        if (is_string($cellRange) || is_numeric($cellRange)) {\n            // Convert a single column reference like 'A' to 'A:A',\n            //    a single row reference like '1' to '1:1'\n            $cellRange = Preg::replace('/^([A-Z]+|\\d+)$/', '${1}:${1}', (string) $cellRange);\n        } elseif (is_object($cellRange) && $cellRange instanceof CellAddress) {\n            $cellRange = new CellRange($cellRange, $cellRange);\n        }\n\n        return self::validateCellRange($cellRange);\n    }\n\n    private const SETMAXROW = '${1}1:${2}' . AddressRange::MAX_ROW;\n    private const SETMAXCOL = 'A${1}:' . AddressRange::MAX_COLUMN . '${2}';\n\n    /**\n     * Convert Column ranges like 'A:C' to 'A1:C1048576'\n     *     or Row ranges like '1:3' to 'A1:XFD3'.\n     */\n    public static function convertWholeRowColumn(?string $addressRange): string\n    {\n        return Preg::replace(\n            ['/^([A-Z]+):([A-Z]+)$/i', '/^(\\d+):(\\d+)$/'],\n            [self::SETMAXROW, self::SETMAXCOL],\n            $addressRange ?? ''\n        );\n    }\n\n    /**\n     * Validate a cell range.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $cellRange Coordinate of the cells as a string, eg: 'C5:F12';\n     *               or as an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 12]),\n     *               or as an AddressRange object.\n     */\n    public static function validateCellRange(AddressRange|string|array $cellRange): string\n    {\n        if (is_string($cellRange)) {\n            [$worksheet, $addressRange] = Worksheet::extractSheetTitle($cellRange, true);\n\n            // Convert Column ranges like 'A:C' to 'A1:C1048576'\n            //      or Row ranges like '1:3' to 'A1:XFD3'\n            $addressRange = self::convertWholeRowColumn($addressRange);\n\n            return empty($worksheet) ? strtoupper($addressRange) : $worksheet . '!' . strtoupper($addressRange);\n        }\n\n        if (is_array($cellRange)) {\n            switch (count($cellRange)) {\n                case 4:\n                    $from = [$cellRange[0], $cellRange[1]];\n                    $to = [$cellRange[2], $cellRange[3]];\n\n                    break;\n                case 2:\n                    $from = [$cellRange[0], $cellRange[1]];\n                    $to = [$cellRange[0], $cellRange[1]];\n\n                    break;\n                default:\n                    throw new SpreadsheetException('CellRange array length must be 2 or 4');\n            }\n            $cellRange = new CellRange(CellAddress::fromColumnRowArray($from), CellAddress::fromColumnRowArray($to));\n        }\n\n        return (string) $cellRange;\n    }\n\n    public static function definedNameToCoordinate(string $coordinate, Worksheet $worksheet): string\n    {\n        // Uppercase coordinate\n        $coordinate = strtoupper($coordinate);\n        // Eliminate leading equal sign\n        $testCoordinate = Preg::replace('/^=/', '', $coordinate);\n        $defined = $worksheet->getParentOrThrow()->getDefinedName($testCoordinate, $worksheet);\n        if ($defined !== null) {\n            if ($defined->getWorksheet() === $worksheet && !$defined->isFormula()) {\n                $coordinate = Preg::replace('/^=/', '', $defined->getValue());\n            }\n        }\n\n        return $coordinate;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Worksheet/Worksheet.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Worksheet;\n\nuse ArrayObject;\nuse Composer\\Pcre\\Preg;\nuse Generator;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Collection\\Cells;\nuse PhpOffice\\PhpSpreadsheet\\Collection\\CellsFactory;\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\ReferenceHelper;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection as StyleProtection;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\nclass Worksheet\n{\n    // Break types\n    public const BREAK_NONE = 0;\n    public const BREAK_ROW = 1;\n    public const BREAK_COLUMN = 2;\n    // Maximum column for row break\n    public const BREAK_ROW_MAX_COLUMN = 16383;\n\n    // Sheet state\n    public const SHEETSTATE_VISIBLE = 'visible';\n    public const SHEETSTATE_HIDDEN = 'hidden';\n    public const SHEETSTATE_VERYHIDDEN = 'veryHidden';\n\n    public const MERGE_CELL_CONTENT_EMPTY = 'empty';\n    public const MERGE_CELL_CONTENT_HIDE = 'hide';\n    public const MERGE_CELL_CONTENT_MERGE = 'merge';\n\n    public const FUNCTION_LIKE_GROUPBY = '/\\b(groupby|_xleta)\\b/i'; // weird new syntax\n\n    protected const SHEET_NAME_REQUIRES_NO_QUOTES = '/^[_\\p{L}][_\\p{L}\\p{N}]*$/mui';\n\n    /**\n     * Maximum 31 characters allowed for sheet title.\n     *\n     * @var int\n     */\n    const SHEET_TITLE_MAXIMUM_LENGTH = 31;\n\n    /**\n     * Invalid characters in sheet title.\n     */\n    private const INVALID_CHARACTERS = ['*', ':', '/', '\\\\', '?', '[', ']'];\n\n    /**\n     * Parent spreadsheet.\n     */\n    private ?Spreadsheet $parent = null;\n\n    /**\n     * Collection of cells.\n     */\n    private Cells $cellCollection;\n\n    /**\n     * Collection of row dimensions.\n     *\n     * @var RowDimension[]\n     */\n    private array $rowDimensions = [];\n\n    /**\n     * Default row dimension.\n     */\n    private RowDimension $defaultRowDimension;\n\n    /**\n     * Collection of column dimensions.\n     *\n     * @var ColumnDimension[]\n     */\n    private array $columnDimensions = [];\n\n    /**\n     * Default column dimension.\n     */\n    private ColumnDimension $defaultColumnDimension;\n\n    /**\n     * Collection of drawings.\n     *\n     * @var ArrayObject<int, BaseDrawing>\n     */\n    private ArrayObject $drawingCollection;\n\n    /**\n     * Collection of drawings.\n     *\n     * @var ArrayObject<int, BaseDrawing>\n     */\n    private ArrayObject $inCellDrawingCollection;\n\n    /**\n     * Collection of Chart objects.\n     *\n     * @var ArrayObject<int, Chart>\n     */\n    private ArrayObject $chartCollection;\n\n    /**\n     * Collection of Table objects.\n     *\n     * @var ArrayObject<int, Table>\n     */\n    private ArrayObject $tableCollection;\n\n    /**\n     * Worksheet title.\n     */\n    private string $title = '';\n\n    /**\n     * Sheet state.\n     */\n    private string $sheetState;\n\n    /**\n     * Page setup.\n     */\n    private PageSetup $pageSetup;\n\n    /**\n     * Page margins.\n     */\n    private PageMargins $pageMargins;\n\n    /**\n     * Page header/footer.\n     */\n    private HeaderFooter $headerFooter;\n\n    /**\n     * Sheet view.\n     */\n    private SheetView $sheetView;\n\n    /**\n     * Protection.\n     */\n    private Protection $protection;\n\n    /**\n     * Conditional styles. Indexed by cell coordinate, e.g. 'A1'.\n     *\n     * @var Conditional[][]\n     */\n    private array $conditionalStylesCollection = [];\n\n    /**\n     * Collection of row breaks.\n     *\n     * @var PageBreak[]\n     */\n    private array $rowBreaks = [];\n\n    /**\n     * Collection of column breaks.\n     *\n     * @var PageBreak[]\n     */\n    private array $columnBreaks = [];\n\n    /**\n     * Collection of merged cell ranges.\n     *\n     * @var string[]\n     */\n    private array $mergeCells = [];\n\n    /**\n     * Collection of protected cell ranges.\n     *\n     * @var ProtectedRange[]\n     */\n    private array $protectedCells = [];\n\n    /**\n     * Autofilter Range and selection.\n     */\n    private AutoFilter $autoFilter;\n\n    /**\n     * Freeze pane.\n     */\n    private ?string $freezePane = null;\n\n    /**\n     * Default position of the right bottom pane.\n     */\n    private ?string $topLeftCell = null;\n\n    private string $paneTopLeftCell = '';\n\n    private string $activePane = '';\n\n    private int $xSplit = 0;\n\n    private int $ySplit = 0;\n\n    private string $paneState = '';\n\n    /**\n     * Properties of the 4 panes.\n     *\n     * @var (null|Pane)[]\n     */\n    private array $panes = [\n        'bottomRight' => null,\n        'bottomLeft' => null,\n        'topRight' => null,\n        'topLeft' => null,\n    ];\n\n    /**\n     * Show gridlines?\n     */\n    private bool $showGridlines = true;\n\n    /**\n     * Print gridlines?\n     */\n    private bool $printGridlines = false;\n\n    /**\n     * Show row and column headers?\n     */\n    private bool $showRowColHeaders = true;\n\n    /**\n     * Show summary below? (Row/Column outline).\n     */\n    private bool $showSummaryBelow = true;\n\n    /**\n     * Show summary right? (Row/Column outline).\n     */\n    private bool $showSummaryRight = true;\n\n    /**\n     * Collection of comments.\n     *\n     * @var Comment[]\n     */\n    private array $comments = [];\n\n    /**\n     * Active cell. (Only one!).\n     */\n    private string $activeCell = 'A1';\n\n    /**\n     * Selected cells.\n     */\n    private string $selectedCells = 'A1';\n\n    /**\n     * Cached highest column.\n     */\n    private int $cachedHighestColumn = 1;\n\n    /**\n     * Cached highest row.\n     */\n    private int $cachedHighestRow = 1;\n\n    /**\n     * Right-to-left?\n     */\n    private bool $rightToLeft = false;\n\n    /**\n     * Hyperlinks. Indexed by cell coordinate, e.g. 'A1'.\n     *\n     * @var Hyperlink[]\n     */\n    private array $hyperlinkCollection = [];\n\n    /**\n     * Data validation objects. Indexed by cell coordinate, e.g. 'A1'.\n     * Index can include ranges, and multiple cells/ranges.\n     *\n     * @var DataValidation[]\n     */\n    private array $dataValidationCollection = [];\n\n    /**\n     * Tab color.\n     */\n    private ?Color $tabColor = null;\n\n    /**\n     * CodeName.\n     */\n    private ?string $codeName = null;\n\n    /**\n     * Create a new worksheet.\n     */\n    public function __construct(?Spreadsheet $parent = null, string $title = 'Worksheet')\n    {\n        // Set parent and title\n        $this->parent = $parent;\n        $this->setTitle($title, false);\n        // setTitle can change $pTitle\n        $this->setCodeName($this->getTitle());\n        $this->setSheetState(self::SHEETSTATE_VISIBLE);\n\n        $this->cellCollection = CellsFactory::getInstance($this);\n        // Set page setup\n        $this->pageSetup = new PageSetup();\n        // Set page margins\n        $this->pageMargins = new PageMargins();\n        // Set page header/footer\n        $this->headerFooter = new HeaderFooter();\n        // Set sheet view\n        $this->sheetView = new SheetView();\n        // Drawing collection\n        $this->drawingCollection = new ArrayObject();\n        // In Cell Drawing collection\n        $this->inCellDrawingCollection = new ArrayObject();\n        // Chart collection\n        $this->chartCollection = new ArrayObject();\n        // Protection\n        $this->protection = new Protection();\n        // Default row dimension\n        $this->defaultRowDimension = new RowDimension(null);\n        // Default column dimension\n        $this->defaultColumnDimension = new ColumnDimension(null);\n        // AutoFilter\n        $this->autoFilter = new AutoFilter('', $this);\n        // Table collection\n        $this->tableCollection = new ArrayObject();\n    }\n\n    /**\n     * Disconnect all cells from this Worksheet object,\n     * typically so that the worksheet object can be unset.\n     */\n    public function disconnectCells(): void\n    {\n        if (isset($this->cellCollection)) { //* @phpstan-ignore-line\n            $this->cellCollection->unsetWorksheetCells();\n            unset($this->cellCollection);\n        }\n        //    detach ourself from the workbook, so that it can then delete this worksheet successfully\n        $this->parent = null;\n    }\n\n    /**\n     * Code to execute when this worksheet is unset().\n     */\n    public function __destruct()\n    {\n        Calculation::getInstanceOrNull($this->parent)\n            ?->clearCalculationCacheForWorksheet($this->title);\n\n        $this->disconnectCells();\n        unset($this->rowDimensions, $this->columnDimensions, $this->tableCollection, $this->drawingCollection, $this->inCellDrawingCollection, $this->chartCollection, $this->autoFilter);\n    }\n\n    /**\n     * Return the cell collection.\n     */\n    public function getCellCollection(): Cells\n    {\n        return $this->cellCollection;\n    }\n\n    /**\n     * Get array of invalid characters for sheet title.\n     *\n     * @return string[]\n     */\n    public static function getInvalidCharacters(): array\n    {\n        return self::INVALID_CHARACTERS;\n    }\n\n    /**\n     * Check sheet code name for valid Excel syntax.\n     *\n     * @param string $sheetCodeName The string to check\n     *\n     * @return string The valid string\n     */\n    private static function checkSheetCodeName(string $sheetCodeName): string\n    {\n        $charCount = StringHelper::countCharacters($sheetCodeName);\n        if ($charCount == 0) {\n            throw new Exception('Sheet code name cannot be empty.');\n        }\n        // Some of the printable ASCII characters are invalid:  * : / \\ ? [ ] and  first and last characters cannot be a \"'\"\n        if (\n            (str_replace(self::INVALID_CHARACTERS, '', $sheetCodeName) !== $sheetCodeName)\n            || (StringHelper::substring($sheetCodeName, -1, 1) == '\\'')\n            || (StringHelper::substring($sheetCodeName, 0, 1) == '\\'')\n        ) {\n            throw new Exception('Invalid character found in sheet code name');\n        }\n\n        // Enforce maximum characters allowed for sheet title\n        if ($charCount > self::SHEET_TITLE_MAXIMUM_LENGTH) {\n            throw new Exception('Maximum ' . self::SHEET_TITLE_MAXIMUM_LENGTH . ' characters allowed in sheet code name.');\n        }\n\n        return $sheetCodeName;\n    }\n\n    /**\n     * Check sheet title for valid Excel syntax.\n     *\n     * @param string $sheetTitle The string to check\n     *\n     * @return string The valid string\n     */\n    private static function checkSheetTitle(string $sheetTitle): string\n    {\n        // Some of the printable ASCII characters are invalid:  * : / \\ ? [ ]\n        if (str_replace(self::INVALID_CHARACTERS, '', $sheetTitle) !== $sheetTitle) {\n            throw new Exception('Invalid character found in sheet title');\n        }\n\n        // Enforce maximum characters allowed for sheet title\n        if (StringHelper::countCharacters($sheetTitle) > self::SHEET_TITLE_MAXIMUM_LENGTH) {\n            throw new Exception('Maximum ' . self::SHEET_TITLE_MAXIMUM_LENGTH . ' characters allowed in sheet title.');\n        }\n\n        return $sheetTitle;\n    }\n\n    /**\n     * Get a sorted list of all cell coordinates currently held in the collection by row and column.\n     *\n     * @param bool $sorted Also sort the cell collection?\n     *\n     * @return string[]\n     */\n    public function getCoordinates(bool $sorted = true): array\n    {\n        if (!isset($this->cellCollection)) { //* @phpstan-ignore-line\n            return [];\n        }\n\n        if ($sorted) {\n            return $this->cellCollection->getSortedCoordinates();\n        }\n\n        return $this->cellCollection->getCoordinates();\n    }\n\n    /**\n     * Get collection of row dimensions.\n     *\n     * @return RowDimension[]\n     */\n    public function getRowDimensions(): array\n    {\n        return $this->rowDimensions;\n    }\n\n    /**\n     * Get default row dimension.\n     */\n    public function getDefaultRowDimension(): RowDimension\n    {\n        return $this->defaultRowDimension;\n    }\n\n    /**\n     * Get collection of column dimensions.\n     *\n     * @return ColumnDimension[]\n     */\n    public function getColumnDimensions(): array\n    {\n        /** @var callable $callable */\n        $callable = [self::class, 'columnDimensionCompare'];\n        uasort($this->columnDimensions, $callable);\n\n        return $this->columnDimensions;\n    }\n\n    private static function columnDimensionCompare(ColumnDimension $a, ColumnDimension $b): int\n    {\n        return $a->getColumnNumeric() - $b->getColumnNumeric();\n    }\n\n    /**\n     * Get default column dimension.\n     */\n    public function getDefaultColumnDimension(): ColumnDimension\n    {\n        return $this->defaultColumnDimension;\n    }\n\n    /**\n     * Get collection of drawings.\n     *\n     * @return ArrayObject<int, BaseDrawing>\n     */\n    public function getDrawingCollection(): ArrayObject\n    {\n        return $this->drawingCollection;\n    }\n\n    /**\n     * Get collection of drawings.\n     *\n     * @return ArrayObject<int, BaseDrawing>\n     */\n    public function getInCellDrawingCollection(): ArrayObject\n    {\n        return $this->inCellDrawingCollection;\n    }\n\n    /**\n     * Get collection of charts.\n     *\n     * @return ArrayObject<int, Chart>\n     */\n    public function getChartCollection(): ArrayObject\n    {\n        return $this->chartCollection;\n    }\n\n    public function addChart(Chart $chart): Chart\n    {\n        $chart->setWorksheet($this);\n        $this->chartCollection[] = $chart;\n\n        return $chart;\n    }\n\n    /**\n     * Return the count of charts on this worksheet.\n     *\n     * @return int The number of charts\n     */\n    public function getChartCount(): int\n    {\n        return count($this->chartCollection);\n    }\n\n    /**\n     * Get a chart by its index position.\n     *\n     * @param ?string $index Chart index position\n     *\n     * @return Chart|false\n     */\n    public function getChartByIndex(?string $index)\n    {\n        $chartCount = count($this->chartCollection);\n        if ($chartCount == 0) {\n            return false;\n        }\n        if ($index === null) {\n            $index = --$chartCount;\n        }\n        if (!isset($this->chartCollection[$index])) {\n            return false;\n        }\n\n        return $this->chartCollection[$index];\n    }\n\n    /**\n     * Return an array of the names of charts on this worksheet.\n     *\n     * @return string[] The names of charts\n     */\n    public function getChartNames(): array\n    {\n        $chartNames = [];\n        foreach ($this->chartCollection as $chart) {\n            $chartNames[] = $chart->getName();\n        }\n\n        return $chartNames;\n    }\n\n    /**\n     * Get a chart by name.\n     *\n     * @param string $chartName Chart name\n     *\n     * @return Chart|false\n     */\n    public function getChartByName(string $chartName)\n    {\n        foreach ($this->chartCollection as $index => $chart) {\n            if ($chart->getName() == $chartName) {\n                return $chart;\n            }\n        }\n\n        return false;\n    }\n\n    public function getChartByNameOrThrow(string $chartName): Chart\n    {\n        $chart = $this->getChartByName($chartName);\n        if ($chart !== false) {\n            return $chart;\n        }\n\n        throw new Exception(\"Sheet does not have a chart named $chartName.\");\n    }\n\n    /**\n     * Refresh column dimensions.\n     *\n     * @return $this\n     */\n    public function refreshColumnDimensions(): static\n    {\n        $newColumnDimensions = [];\n        foreach ($this->getColumnDimensions() as $objColumnDimension) {\n            $newColumnDimensions[$objColumnDimension->getColumnIndex()] = $objColumnDimension;\n        }\n\n        $this->columnDimensions = $newColumnDimensions;\n\n        return $this;\n    }\n\n    /**\n     * Refresh row dimensions.\n     *\n     * @return $this\n     */\n    public function refreshRowDimensions(): static\n    {\n        $newRowDimensions = [];\n        foreach ($this->getRowDimensions() as $objRowDimension) {\n            $newRowDimensions[$objRowDimension->getRowIndex()] = $objRowDimension;\n        }\n\n        $this->rowDimensions = $newRowDimensions;\n\n        return $this;\n    }\n\n    /**\n     * Calculate worksheet dimension.\n     *\n     * @return string String containing the dimension of this worksheet\n     */\n    public function calculateWorksheetDimension(): string\n    {\n        // Return\n        return 'A1:' . $this->getHighestColumn() . $this->getHighestRow();\n    }\n\n    /**\n     * Calculate worksheet data dimension.\n     *\n     * @return string String containing the dimension of this worksheet that actually contain data\n     */\n    public function calculateWorksheetDataDimension(): string\n    {\n        // Return\n        return 'A1:' . $this->getHighestDataColumn() . $this->getHighestDataRow();\n    }\n\n    /**\n     * Calculate widths for auto-size columns.\n     *\n     * @return $this\n     */\n    public function calculateColumnWidths(): static\n    {\n        $activeSheet = $this->getParent()?->getActiveSheetIndex();\n        $selectedCells = $this->selectedCells;\n        // initialize $autoSizes array\n        $autoSizes = [];\n        foreach ($this->getColumnDimensions() as $colDimension) {\n            if ($colDimension->getAutoSize()) {\n                $autoSizes[$colDimension->getColumnIndex()] = -1;\n            }\n        }\n\n        // There is only something to do if there are some auto-size columns\n        if (!empty($autoSizes)) {\n            $holdActivePane = $this->activePane;\n            // build list of cells references that participate in a merge\n            $isMergeCell = [];\n            foreach ($this->getMergeCells() as $cells) {\n                foreach (Coordinate::extractAllCellReferencesInRange($cells) as $cellReference) {\n                    $isMergeCell[$cellReference] = true;\n                }\n            }\n\n            $autoFilterIndentRanges = (new AutoFit($this))->getAutoFilterIndentRanges();\n\n            // loop through all cells in the worksheet\n            foreach ($this->getCoordinates(false) as $coordinate) {\n                $cell = $this->getCellOrNull($coordinate);\n\n                if ($cell !== null && isset($autoSizes[$this->cellCollection->getCurrentColumn()])) {\n                    //Determine if cell is in merge range\n                    $isMerged = isset($isMergeCell[$this->cellCollection->getCurrentCoordinate()]);\n\n                    //By default merged cells should be ignored\n                    $isMergedButProceed = false;\n\n                    //The only exception is if it's a merge range value cell of a 'vertical' range (1 column wide)\n                    if ($isMerged && $cell->isMergeRangeValueCell()) {\n                        $range = (string) $cell->getMergeRange();\n                        $rangeBoundaries = Coordinate::rangeDimension($range);\n                        if ($rangeBoundaries[0] === 1) {\n                            $isMergedButProceed = true;\n                        }\n                    }\n\n                    // Determine width if cell is not part of a merge or does and is a value cell of 1-column wide range\n                    if (!$isMerged || $isMergedButProceed) {\n                        // Determine if we need to make an adjustment for the first row in an AutoFilter range that\n                        //    has a column filter dropdown\n                        $filterAdjustment = false;\n                        if (!empty($autoFilterIndentRanges)) {\n                            foreach ($autoFilterIndentRanges as $autoFilterFirstRowRange) {\n                                /** @var string $autoFilterFirstRowRange */\n                                if ($cell->isInRange($autoFilterFirstRowRange)) {\n                                    $filterAdjustment = true;\n\n                                    break;\n                                }\n                            }\n                        }\n\n                        $indentAdjustment = $cell->getStyle()->getAlignment()->getIndent();\n                        $indentAdjustment += (int) ($cell->getStyle()->getAlignment()->getHorizontal() === Alignment::HORIZONTAL_CENTER);\n\n                        // Calculated value\n                        // To formatted string\n                        $cellValue = NumberFormat::toFormattedString(\n                            $cell->getCalculatedValueString(),\n                            (string) $this->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex())\n                                ->getNumberFormat()->getFormatCode(true)\n                        );\n\n                        if ($cellValue !== '') {\n                            $autoSizes[$this->cellCollection->getCurrentColumn()] = max(\n                                $autoSizes[$this->cellCollection->getCurrentColumn()],\n                                round(\n                                    Shared\\Font::calculateColumnWidth(\n                                        $this->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex())->getFont(),\n                                        $cellValue,\n                                        (int) $this->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex())\n                                            ->getAlignment()->getTextRotation(),\n                                        $this->getParentOrThrow()->getDefaultStyle()->getFont(),\n                                        $filterAdjustment,\n                                        $indentAdjustment\n                                    ),\n                                    3\n                                )\n                            );\n                        }\n                    }\n                }\n            }\n\n            // adjust column widths\n            foreach ($autoSizes as $columnIndex => $width) {\n                if ($width == -1) {\n                    $width = $this->getDefaultColumnDimension()->getWidth();\n                }\n                $this->getColumnDimension($columnIndex)->setWidth($width);\n            }\n            $this->activePane = $holdActivePane;\n        }\n        if ($activeSheet !== null && $activeSheet >= 0) {\n            $this->getParent()?->setActiveSheetIndex($activeSheet);\n        }\n        $this->setSelectedCells($selectedCells);\n\n        return $this;\n    }\n\n    /**\n     * Get parent or null.\n     */\n    public function getParent(): ?Spreadsheet\n    {\n        return $this->parent;\n    }\n\n    /**\n     * Get parent, throw exception if null.\n     */\n    public function getParentOrThrow(): Spreadsheet\n    {\n        if ($this->parent !== null) {\n            return $this->parent;\n        }\n\n        throw new Exception('Sheet does not have a parent.');\n    }\n\n    /**\n     * Re-bind parent.\n     *\n     * @return $this\n     */\n    public function rebindParent(Spreadsheet $parent): static\n    {\n        if ($this->parent !== null) {\n            $definedNames = $this->parent->getDefinedNames();\n            foreach ($definedNames as $definedName) {\n                $parent->addDefinedName($definedName);\n            }\n\n            $this->parent->removeSheetByIndex(\n                $this->parent->getIndex($this)\n            );\n        }\n        $this->parent = $parent;\n\n        return $this;\n    }\n\n    public function setParent(Spreadsheet $parent): self\n    {\n        $this->parent = $parent;\n\n        return $this;\n    }\n\n    /**\n     * Get title.\n     */\n    public function getTitle(): string\n    {\n        return $this->title;\n    }\n\n    /**\n     * Set title.\n     *\n     * @param string $title String containing the dimension of this worksheet\n     * @param bool $updateFormulaCellReferences Flag indicating whether cell references in formulae should\n     *            be updated to reflect the new sheet name.\n     *          This should be left as the default true, unless you are\n     *          certain that no formula cells on any worksheet contain\n     *          references to this worksheet\n     * @param bool $validate False to skip validation of new title. WARNING: This should only be set\n     *                       at parse time (by Readers), where titles can be assumed to be valid.\n     *\n     * @return $this\n     */\n    public function setTitle(string $title, bool $updateFormulaCellReferences = true, bool $validate = true): static\n    {\n        // Is this a 'rename' or not?\n        if ($this->getTitle() == $title) {\n            return $this;\n        }\n\n        // Old title\n        $oldTitle = $this->getTitle();\n\n        if ($validate) {\n            // Syntax check\n            self::checkSheetTitle($title);\n\n            if ($this->parent && $this->parent->getIndex($this, true) >= 0) {\n                // Is there already such sheet name?\n                if ($this->parent->sheetNameExists($title)) {\n                    // Use name, but append with lowest possible integer\n\n                    if (StringHelper::countCharacters($title) > 29) {\n                        $title = StringHelper::substring($title, 0, 29);\n                    }\n                    $i = 1;\n                    while ($this->parent->sheetNameExists($title . ' ' . $i)) {\n                        ++$i;\n                        if ($i == 10) {\n                            if (StringHelper::countCharacters($title) > 28) {\n                                $title = StringHelper::substring($title, 0, 28);\n                            }\n                        } elseif ($i == 100) {\n                            if (StringHelper::countCharacters($title) > 27) {\n                                $title = StringHelper::substring($title, 0, 27);\n                            }\n                        }\n                    }\n\n                    $title .= \" $i\";\n                }\n            }\n        }\n\n        // Set title\n        $this->title = $title;\n\n        if ($this->parent && $this->parent->getIndex($this, true) >= 0) {\n            // New title\n            $newTitle = $this->getTitle();\n            $this->parent->getCalculationEngine()\n                ->renameCalculationCacheForWorksheet($oldTitle, $newTitle);\n            if ($updateFormulaCellReferences) {\n                ReferenceHelper::getInstance()->updateNamedFormulae($this->parent, $oldTitle, $newTitle);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get sheet state.\n     *\n     * @return string Sheet state (visible, hidden, veryHidden)\n     */\n    public function getSheetState(): string\n    {\n        return $this->sheetState;\n    }\n\n    /**\n     * Set sheet state.\n     *\n     * @param string $value Sheet state (visible, hidden, veryHidden)\n     *\n     * @return $this\n     */\n    public function setSheetState(string $value): static\n    {\n        $this->sheetState = $value;\n\n        return $this;\n    }\n\n    /**\n     * Get page setup.\n     */\n    public function getPageSetup(): PageSetup\n    {\n        return $this->pageSetup;\n    }\n\n    /**\n     * Set page setup.\n     *\n     * @return $this\n     */\n    public function setPageSetup(PageSetup $pageSetup): static\n    {\n        $this->pageSetup = $pageSetup;\n\n        return $this;\n    }\n\n    /**\n     * Get page margins.\n     */\n    public function getPageMargins(): PageMargins\n    {\n        return $this->pageMargins;\n    }\n\n    /**\n     * Set page margins.\n     *\n     * @return $this\n     */\n    public function setPageMargins(PageMargins $pageMargins): static\n    {\n        $this->pageMargins = $pageMargins;\n\n        return $this;\n    }\n\n    /**\n     * Get page header/footer.\n     */\n    public function getHeaderFooter(): HeaderFooter\n    {\n        return $this->headerFooter;\n    }\n\n    /**\n     * Set page header/footer.\n     *\n     * @return $this\n     */\n    public function setHeaderFooter(HeaderFooter $headerFooter): static\n    {\n        $this->headerFooter = $headerFooter;\n\n        return $this;\n    }\n\n    /**\n     * Get sheet view.\n     */\n    public function getSheetView(): SheetView\n    {\n        return $this->sheetView;\n    }\n\n    /**\n     * Set sheet view.\n     *\n     * @return $this\n     */\n    public function setSheetView(SheetView $sheetView): static\n    {\n        $this->sheetView = $sheetView;\n\n        return $this;\n    }\n\n    /**\n     * Get Protection.\n     */\n    public function getProtection(): Protection\n    {\n        return $this->protection;\n    }\n\n    /**\n     * Set Protection.\n     *\n     * @return $this\n     */\n    public function setProtection(Protection $protection): static\n    {\n        $this->protection = $protection;\n\n        return $this;\n    }\n\n    /**\n     * Get highest worksheet column.\n     *\n     * @param null|int|string $row Return the data highest column for the specified row,\n     *                                     or the highest column of any row if no row number is passed\n     *\n     * @return string Highest column name\n     */\n    public function getHighestColumn($row = null): string\n    {\n        if ($row === null) {\n            return Coordinate::stringFromColumnIndex($this->cachedHighestColumn);\n        }\n\n        return $this->getHighestDataColumn($row);\n    }\n\n    /**\n     * Get highest worksheet column that contains data.\n     *\n     * @param null|int|string $row Return the highest data column for the specified row,\n     *                                     or the highest data column of any row if no row number is passed\n     *\n     * @return string Highest column name that contains data\n     */\n    public function getHighestDataColumn($row = null): string\n    {\n        return $this->cellCollection->getHighestColumn($row);\n    }\n\n    /**\n     * Get highest worksheet row.\n     *\n     * @param null|string $column Return the highest data row for the specified column,\n     *                                     or the highest row of any column if no column letter is passed\n     *\n     * @return int Highest row number\n     */\n    public function getHighestRow(?string $column = null): int\n    {\n        if ($column === null) {\n            return $this->cachedHighestRow;\n        }\n\n        return $this->getHighestDataRow($column);\n    }\n\n    /**\n     * Get highest worksheet row that contains data.\n     *\n     * @param null|string $column Return the highest data row for the specified column,\n     *                                     or the highest data row of any column if no column letter is passed\n     *\n     * @return int Highest row number that contains data\n     */\n    public function getHighestDataRow(?string $column = null): int\n    {\n        return $this->cellCollection->getHighestRow($column);\n    }\n\n    /**\n     * Get highest worksheet column and highest row that have cell records.\n     *\n     * @return array{row: int, column: string} Highest column name and highest row number\n     */\n    public function getHighestRowAndColumn(): array\n    {\n        return $this->cellCollection->getHighestRowAndColumn();\n    }\n\n    /**\n     * Set a cell value.\n     *\n     * @param array{0: int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5';\n     *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     * @param mixed $value Value for the cell\n     * @param null|IValueBinder $binder Value Binder to override the currently set Value Binder\n     *\n     * @return $this\n     */\n    public function setCellValue(CellAddress|string|array $coordinate, mixed $value, ?IValueBinder $binder = null): static\n    {\n        $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));\n        $this->getCell($cellAddress)->setValue($value, $binder);\n\n        return $this;\n    }\n\n    /**\n     * Set a cell value.\n     *\n     * @param array{0: int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5';\n     *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     * @param mixed $value Value of the cell\n     * @param string $dataType Explicit data type, see DataType::TYPE_*\n     *        Note that PhpSpreadsheet does not validate that the value and datatype are consistent, in using this\n     *             method, then it is your responsibility as an end-user developer to validate that the value and\n     *             the datatype match.\n     *       If you do mismatch value and datatpe, then the value you enter may be changed to match the datatype\n     *          that you specify.\n     *\n     * @see DataType\n     *\n     * @return $this\n     */\n    public function setCellValueExplicit(CellAddress|string|array $coordinate, mixed $value, string $dataType): static\n    {\n        $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));\n        $this->getCell($cellAddress)->setValueExplicit($value, $dataType);\n\n        return $this;\n    }\n\n    /**\n     * Get cell at a specific coordinate.\n     *\n     * @param array{0: int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5';\n     *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     *\n     * @return Cell Cell that was found or created\n     *              WARNING: Because the cell collection can be cached to reduce memory, it only allows one\n     *              \"active\" cell at a time in memory. If you assign that cell to a variable, then select\n     *              another cell using getCell() or any of its variants, the newly selected cell becomes\n     *              the \"active\" cell, and any previous assignment becomes a disconnected reference because\n     *              the active cell has changed.\n     */\n    public function getCell(CellAddress|string|array $coordinate): Cell\n    {\n        $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));\n\n        // Shortcut for increased performance for the vast majority of simple cases\n        if ($this->cellCollection->has($cellAddress)) {\n            /** @var Cell $cell */\n            $cell = $this->cellCollection->get($cellAddress);\n\n            return $cell;\n        }\n\n        /** @var Worksheet $sheet */\n        [$sheet, $finalCoordinate] = $this->getWorksheetAndCoordinate($cellAddress);\n        $cell = $sheet->getCellCollection()->get($finalCoordinate);\n\n        return $cell ?? $sheet->createNewCell($finalCoordinate);\n    }\n\n    /**\n     * Get the correct Worksheet and coordinate from a coordinate that may\n     * contains reference to another sheet or a named range.\n     *\n     * @return array{0: Worksheet, 1: string}\n     */\n    private function getWorksheetAndCoordinate(string $coordinate): array\n    {\n        $sheet = null;\n        $finalCoordinate = null;\n\n        // Worksheet reference?\n        if (str_contains($coordinate, '!')) {\n            $worksheetReference = self::extractSheetTitle($coordinate, true, true);\n\n            $sheet = $this->getParentOrThrow()->getSheetByName($worksheetReference[0]);\n            $finalCoordinate = strtoupper($worksheetReference[1]);\n\n            if ($sheet === null) {\n                throw new Exception('Sheet not found for name: ' . $worksheetReference[0]);\n            }\n        } elseif (\n            !Preg::isMatch('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $coordinate)\n            && Preg::isMatch('/^' . Calculation::CALCULATION_REGEXP_DEFINEDNAME . '$/iu', $coordinate)\n        ) {\n            // Named range?\n            $namedRange = $this->validateNamedRange($coordinate, true);\n            if ($namedRange !== null) {\n                $sheet = $namedRange->getWorksheet();\n                if ($sheet === null) {\n                    throw new Exception('Sheet not found for named range: ' . $namedRange->getName());\n                }\n\n                /** @phpstan-ignore-next-line */\n                $cellCoordinate = ltrim(substr($namedRange->getValue(), strrpos($namedRange->getValue(), '!')), '!');\n                $finalCoordinate = str_replace('$', '', $cellCoordinate);\n            }\n        }\n\n        if ($sheet === null || $finalCoordinate === null) {\n            $sheet = $this;\n            $finalCoordinate = strtoupper($coordinate);\n        }\n\n        if (Coordinate::coordinateIsRange($finalCoordinate)) {\n            throw new Exception('Cell coordinate string can not be a range of cells.');\n        }\n        $finalCoordinate = str_replace('$', '', $finalCoordinate);\n\n        return [$sheet, $finalCoordinate];\n    }\n\n    /**\n     * Get an existing cell at a specific coordinate, or null.\n     *\n     * @param string $coordinate Coordinate of the cell, eg: 'A1'\n     *\n     * @return null|Cell Cell that was found or null\n     */\n    private function getCellOrNull(string $coordinate): ?Cell\n    {\n        // Check cell collection\n        if ($this->cellCollection->has($coordinate)) {\n            return $this->cellCollection->get($coordinate);\n        }\n\n        return null;\n    }\n\n    /**\n     * Create a new cell at the specified coordinate.\n     *\n     * @param string $coordinate Coordinate of the cell\n     *\n     * @return Cell Cell that was created\n     *              WARNING: Because the cell collection can be cached to reduce memory, it only allows one\n     *              \"active\" cell at a time in memory. If you assign that cell to a variable, then select\n     *              another cell using getCell() or any of its variants, the newly selected cell becomes\n     *              the \"active\" cell, and any previous assignment becomes a disconnected reference because\n     *              the active cell has changed.\n     */\n    public function createNewCell(string $coordinate): Cell\n    {\n        [$column, $row, $columnString] = Coordinate::indexesFromString($coordinate);\n        $cell = new Cell(null, DataType::TYPE_NULL, $this);\n        $this->cellCollection->add($coordinate, $cell);\n\n        // Coordinates\n        if ($column > $this->cachedHighestColumn) {\n            $this->cachedHighestColumn = $column;\n        }\n        if ($row > $this->cachedHighestRow) {\n            $this->cachedHighestRow = $row;\n        }\n\n        // Cell needs appropriate xfIndex from dimensions records\n        //    but don't create dimension records if they don't already exist\n        $rowDimension = $this->rowDimensions[$row] ?? null;\n        $columnDimension = $this->columnDimensions[$columnString] ?? null;\n\n        $xfSet = false;\n        if ($rowDimension !== null) {\n            $rowXf = (int) $rowDimension->getXfIndex();\n            if ($rowXf > 0) {\n                // then there is a row dimension with explicit style, assign it to the cell\n                $cell->setXfIndex($rowXf);\n                $xfSet = true;\n            }\n        }\n        if (!$xfSet && $columnDimension !== null) {\n            $colXf = (int) $columnDimension->getXfIndex();\n            if ($colXf > 0) {\n                // then there is a column dimension, assign it to the cell\n                $cell->setXfIndex($colXf);\n            }\n        }\n\n        return $cell;\n    }\n\n    /**\n     * Does the cell at a specific coordinate exist?\n     *\n     * @param array{0: int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5';\n     *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     */\n    public function cellExists(CellAddress|string|array $coordinate): bool\n    {\n        $cellAddress = Validations::validateCellAddress($coordinate);\n        [$sheet, $finalCoordinate] = $this->getWorksheetAndCoordinate($cellAddress);\n\n        return $sheet->getCellCollection()->has($finalCoordinate);\n    }\n\n    /**\n     * Get row dimension at a specific row.\n     *\n     * @param int $row Numeric index of the row\n     */\n    public function getRowDimension(int $row): RowDimension\n    {\n        // Get row dimension\n        if (!isset($this->rowDimensions[$row])) {\n            $this->rowDimensions[$row] = new RowDimension($row);\n\n            $this->cachedHighestRow = max($this->cachedHighestRow, $row);\n        }\n\n        return $this->rowDimensions[$row];\n    }\n\n    public function getRowStyle(int $row): ?Style\n    {\n        return $this->parent?->getCellXfByIndexOrNull(\n            ($this->rowDimensions[$row] ?? null)?->getXfIndex()\n        );\n    }\n\n    public function rowDimensionExists(int $row): bool\n    {\n        return isset($this->rowDimensions[$row]);\n    }\n\n    public function columnDimensionExists(string $column): bool\n    {\n        return isset($this->columnDimensions[$column]);\n    }\n\n    /**\n     * Get column dimension at a specific column.\n     *\n     * @param string $column String index of the column eg: 'A'\n     */\n    public function getColumnDimension(string $column): ColumnDimension\n    {\n        // Uppercase coordinate\n        $column = strtoupper($column);\n\n        // Fetch dimensions\n        if (!isset($this->columnDimensions[$column])) {\n            $this->columnDimensions[$column] = new ColumnDimension($column);\n\n            $columnIndex = Coordinate::columnIndexFromString($column);\n            if ($this->cachedHighestColumn < $columnIndex) {\n                $this->cachedHighestColumn = $columnIndex;\n            }\n        }\n\n        return $this->columnDimensions[$column];\n    }\n\n    /**\n     * Get column dimension at a specific column by using numeric cell coordinates.\n     *\n     * @param int $columnIndex Numeric column coordinate of the cell\n     */\n    public function getColumnDimensionByColumn(int $columnIndex): ColumnDimension\n    {\n        return $this->getColumnDimension(Coordinate::stringFromColumnIndex($columnIndex));\n    }\n\n    public function getColumnStyle(string $column): ?Style\n    {\n        return $this->parent?->getCellXfByIndexOrNull(\n            ($this->columnDimensions[$column] ?? null)?->getXfIndex()\n        );\n    }\n\n    /**\n     * Get style for cell.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $cellCoordinate\n     *              A simple string containing a cell address like 'A1' or a cell range like 'A1:E10'\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or a CellAddress or AddressRange object.\n     */\n    public function getStyle(AddressRange|CellAddress|int|string|array $cellCoordinate): Style\n    {\n        if (is_string($cellCoordinate)) {\n            $cellCoordinate = Validations::definedNameToCoordinate($cellCoordinate, $this);\n        }\n        $cellCoordinate = Validations::validateCellOrCellRange($cellCoordinate);\n        $cellCoordinate = str_replace('$', '', $cellCoordinate);\n\n        // set this sheet as active\n        $this->getParentOrThrow()->setActiveSheetIndex($this->getParentOrThrow()->getIndex($this));\n\n        // set cell coordinate as active\n        $this->setSelectedCells($cellCoordinate);\n\n        return $this->getParentOrThrow()->getCellXfSupervisor();\n    }\n\n    /**\n     * Get table styles set for the for given cell.\n     *\n     * @param Cell $cell\n     *              The Cell for which the tables are retrieved\n     *\n     * @return Table[]\n     */\n    public function getTablesWithStylesForCell(Cell $cell): array\n    {\n        $retVal = [];\n\n        foreach ($this->tableCollection as $table) {\n            $dxfsTableStyle = $table->getStyle()->getTableDxfsStyle();\n            if ($dxfsTableStyle !== null) {\n                if ($dxfsTableStyle->getHeaderRowStyle() !== null || $dxfsTableStyle->getFirstRowStripeStyle() !== null || $dxfsTableStyle->getSecondRowStripeStyle() !== null) {\n                    $range = $table->getRange();\n                    if ($cell->isInRange($range)) {\n                        $retVal[] = $table;\n                    }\n                }\n            }\n        }\n\n        return $retVal;\n    }\n\n    /**\n     * Get tables without styles set for the for given cell.\n     *\n     * @param Cell $cell\n     *              The Cell for which the tables are retrieved\n     *\n     * @return Table[]\n     */\n    public function getTablesWithoutStylesForCell(Cell $cell): array\n    {\n        $retVal = [];\n\n        foreach ($this->tableCollection as $table) {\n            $range = $table->getRange();\n            if ($cell->isInRange($range)) {\n                $dxfsTableStyle = $table->getStyle()->getTableDxfsStyle();\n                if ($dxfsTableStyle === null || ($dxfsTableStyle->getHeaderRowStyle() === null && $dxfsTableStyle->getFirstRowStripeStyle() === null && $dxfsTableStyle->getSecondRowStripeStyle() === null)) {\n                    $retVal[] = $table;\n                }\n            }\n        }\n\n        return $retVal;\n    }\n\n    /**\n     * Get conditional styles for a cell.\n     *\n     * @param string $coordinate eg: 'A1' or 'A1:A3'.\n     *          If a single cell is referenced, then the array of conditional styles will be returned if the cell is\n     *               included in a conditional style range.\n     *          If a range of cells is specified, then the styles will only be returned if the range matches the entire\n     *               range of the conditional.\n     * @param bool $firstOnly default true, return all matching\n     *          conditionals ordered by priority if false, first only if true\n     *\n     * @return Conditional[]\n     */\n    public function getConditionalStyles(string $coordinate, bool $firstOnly = true): array\n    {\n        $coordinate = strtoupper($coordinate);\n        if (Preg::isMatch('/[: ,]/', $coordinate)) {\n            return $this->conditionalStylesCollection[$coordinate] ?? [];\n        }\n\n        $conditionalStyles = [];\n        foreach ($this->conditionalStylesCollection as $keyStylesOrig => $conditionalRange) {\n            $keyStyles = Coordinate::resolveUnionAndIntersection($keyStylesOrig);\n            $keyParts = explode(',', $keyStyles);\n            foreach ($keyParts as $keyPart) {\n                if ($keyPart === $coordinate) {\n                    if ($firstOnly) {\n                        return $conditionalRange;\n                    }\n                    $conditionalStyles[$keyStylesOrig] = $conditionalRange;\n\n                    break;\n                } elseif (str_contains($keyPart, ':')) {\n                    if (Coordinate::coordinateIsInsideRange($keyPart, $coordinate)) {\n                        if ($firstOnly) {\n                            return $conditionalRange;\n                        }\n                        $conditionalStyles[$keyStylesOrig] = $conditionalRange;\n\n                        break;\n                    }\n                }\n            }\n        }\n        $outArray = [];\n        foreach ($conditionalStyles as $conditionalArray) {\n            foreach ($conditionalArray as $conditional) {\n                $outArray[] = $conditional;\n            }\n        }\n        usort($outArray, [self::class, 'comparePriority']);\n\n        return $outArray;\n    }\n\n    private static function comparePriority(Conditional $condA, Conditional $condB): int\n    {\n        $a = $condA->getPriority();\n        $b = $condB->getPriority();\n        if ($a === $b) {\n            return 0;\n        }\n        if ($a === 0) {\n            return 1;\n        }\n        if ($b === 0) {\n            return -1;\n        }\n\n        return ($a < $b) ? -1 : 1;\n    }\n\n    public function getConditionalRange(string $coordinate): ?string\n    {\n        $coordinate = strtoupper($coordinate);\n        $cell = $this->getCell($coordinate);\n        foreach (array_keys($this->conditionalStylesCollection) as $conditionalRange) {\n            $cellBlocks = explode(',', Coordinate::resolveUnionAndIntersection($conditionalRange));\n            foreach ($cellBlocks as $cellBlock) {\n                if ($cell->isInRange($cellBlock)) {\n                    return $conditionalRange;\n                }\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * Do conditional styles exist for this cell?\n     *\n     * @param string $coordinate eg: 'A1' or 'A1:A3'.\n     *          If a single cell is specified, then this method will return true if that cell is included in a\n     *               conditional style range.\n     *          If a range of cells is specified, then true will only be returned if the range matches the entire\n     *               range of the conditional.\n     */\n    public function conditionalStylesExists(string $coordinate): bool\n    {\n        return !empty($this->getConditionalStyles($coordinate));\n    }\n\n    /**\n     * Removes conditional styles for a cell.\n     *\n     * @param string $coordinate eg: 'A1'\n     *\n     * @return $this\n     */\n    public function removeConditionalStyles(string $coordinate): static\n    {\n        unset($this->conditionalStylesCollection[strtoupper($coordinate)]);\n\n        return $this;\n    }\n\n    /**\n     * Get collection of conditional styles.\n     *\n     * @return Conditional[][]\n     */\n    public function getConditionalStylesCollection(): array\n    {\n        return $this->conditionalStylesCollection;\n    }\n\n    /**\n     * Set conditional styles.\n     *\n     * @param string $coordinate eg: 'A1'\n     * @param Conditional[] $styles\n     *\n     * @return $this\n     */\n    public function setConditionalStyles(string $coordinate, array $styles): static\n    {\n        $this->conditionalStylesCollection[strtoupper($coordinate)] = $styles;\n\n        return $this;\n    }\n\n    /**\n     * Duplicate cell style to a range of cells.\n     *\n     * Please note that this will overwrite existing cell styles for cells in range!\n     *\n     * @param Style $style Cell style to duplicate\n     * @param string $range Range of cells (i.e. \"A1:B10\"), or just one cell (i.e. \"A1\")\n     *\n     * @return $this\n     */\n    public function duplicateStyle(Style $style, string $range): static\n    {\n        // Add the style to the workbook if necessary\n        $workbook = $this->getParentOrThrow();\n        if ($existingStyle = $workbook->getCellXfByHashCode($style->getHashCode())) {\n            // there is already such cell Xf in our collection\n            $xfIndex = $existingStyle->getIndex();\n        } else {\n            // we don't have such a cell Xf, need to add\n            $workbook->addCellXf($style);\n            $xfIndex = $style->getIndex();\n        }\n\n        // Calculate range outer borders\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($range . ':' . $range);\n\n        // Make sure we can loop upwards on rows and columns\n        if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) {\n            $tmp = $rangeStart;\n            $rangeStart = $rangeEnd;\n            $rangeEnd = $tmp;\n        }\n\n        // Loop through cells and apply styles\n        for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n            for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n                $this->getCell(Coordinate::stringFromColumnIndex($col) . $row)->setXfIndex($xfIndex);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Duplicate conditional style to a range of cells.\n     *\n     * Please note that this will overwrite existing cell styles for cells in range!\n     *\n     * @param Conditional[] $styles Cell style to duplicate\n     * @param string $range Range of cells (i.e. \"A1:B10\"), or just one cell (i.e. \"A1\")\n     *\n     * @return $this\n     */\n    public function duplicateConditionalStyle(array $styles, string $range = ''): static\n    {\n        foreach ($styles as $cellStyle) {\n            if (!($cellStyle instanceof Conditional)) { // @phpstan-ignore-line\n                throw new Exception('Style is not a conditional style');\n            }\n        }\n\n        // Calculate range outer borders\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($range . ':' . $range);\n\n        // Make sure we can loop upwards on rows and columns\n        if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) {\n            $tmp = $rangeStart;\n            $rangeStart = $rangeEnd;\n            $rangeEnd = $tmp;\n        }\n\n        // Loop through cells and apply styles\n        for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n            for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n                $this->setConditionalStyles(Coordinate::stringFromColumnIndex($col) . $row, $styles);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Set break on a cell.\n     *\n     * @param array{0: int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5';\n     *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     * @param int $break Break type (type of Worksheet::BREAK_*)\n     *\n     * @return $this\n     */\n    public function setBreak(CellAddress|string|array $coordinate, int $break, int $max = -1): static\n    {\n        $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));\n\n        if ($break === self::BREAK_NONE) {\n            unset($this->rowBreaks[$cellAddress], $this->columnBreaks[$cellAddress]);\n        } elseif ($break === self::BREAK_ROW) {\n            $this->rowBreaks[$cellAddress] = new PageBreak($break, $cellAddress, $max);\n        } elseif ($break === self::BREAK_COLUMN) {\n            $this->columnBreaks[$cellAddress] = new PageBreak($break, $cellAddress, $max);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get breaks.\n     *\n     * @return int[]\n     */\n    public function getBreaks(): array\n    {\n        $breaks = [];\n        /** @var callable $compareFunction */\n        $compareFunction = [self::class, 'compareRowBreaks'];\n        uksort($this->rowBreaks, $compareFunction);\n        foreach ($this->rowBreaks as $break) {\n            $breaks[$break->getCoordinate()] = self::BREAK_ROW;\n        }\n        /** @var callable $compareFunction */\n        $compareFunction = [self::class, 'compareColumnBreaks'];\n        uksort($this->columnBreaks, $compareFunction);\n        foreach ($this->columnBreaks as $break) {\n            $breaks[$break->getCoordinate()] = self::BREAK_COLUMN;\n        }\n\n        return $breaks;\n    }\n\n    /**\n     * Get row breaks.\n     *\n     * @return PageBreak[]\n     */\n    public function getRowBreaks(): array\n    {\n        /** @var callable $compareFunction */\n        $compareFunction = [self::class, 'compareRowBreaks'];\n        uksort($this->rowBreaks, $compareFunction);\n\n        return $this->rowBreaks;\n    }\n\n    protected static function compareRowBreaks(string $coordinate1, string $coordinate2): int\n    {\n        $row1 = Coordinate::indexesFromString($coordinate1)[1];\n        $row2 = Coordinate::indexesFromString($coordinate2)[1];\n\n        return $row1 - $row2;\n    }\n\n    protected static function compareColumnBreaks(string $coordinate1, string $coordinate2): int\n    {\n        $column1 = Coordinate::indexesFromString($coordinate1)[0];\n        $column2 = Coordinate::indexesFromString($coordinate2)[0];\n\n        return $column1 - $column2;\n    }\n\n    /**\n     * Get column breaks.\n     *\n     * @return PageBreak[]\n     */\n    public function getColumnBreaks(): array\n    {\n        /** @var callable $compareFunction */\n        $compareFunction = [self::class, 'compareColumnBreaks'];\n        uksort($this->columnBreaks, $compareFunction);\n\n        return $this->columnBreaks;\n    }\n\n    /**\n     * Set merge on a cell range.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $range A simple string containing a Cell range like 'A1:E10'\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or an AddressRange.\n     * @param string $behaviour How the merged cells should behave.\n     *               Possible values are:\n     *                   MERGE_CELL_CONTENT_EMPTY - Empty the content of the hidden cells\n     *                   MERGE_CELL_CONTENT_HIDE - Keep the content of the hidden cells\n     *                   MERGE_CELL_CONTENT_MERGE - Move the content of the hidden cells into the first cell\n     *\n     * @return $this\n     */\n    public function mergeCells(AddressRange|string|array $range, string $behaviour = self::MERGE_CELL_CONTENT_EMPTY): static\n    {\n        $range = Functions::trimSheetFromCellReference(Validations::validateCellRange($range));\n\n        if (!str_contains($range, ':')) {\n            $range .= \":{$range}\";\n        }\n\n        if (!Preg::isMatch('/^([A-Z]+)(\\d+):([A-Z]+)(\\d+)$/', $range, $matches)) {\n            throw new Exception('Merge must be on a valid range of cells.');\n        }\n\n        $this->mergeCells[$range] = $range;\n        $firstRow = (int) $matches[2];\n        $lastRow = (int) $matches[4];\n        $firstColumn = $matches[1];\n        $lastColumn = $matches[3];\n        $firstColumnIndex = Coordinate::columnIndexFromString($firstColumn);\n        $lastColumnIndex = Coordinate::columnIndexFromString($lastColumn);\n        $numberRows = $lastRow - $firstRow;\n        $numberColumns = $lastColumnIndex - $firstColumnIndex;\n\n        if ($numberRows === 1 && $numberColumns === 1) {\n            return $this;\n        }\n\n        // create upper left cell if it does not already exist\n        $upperLeft = \"{$firstColumn}{$firstRow}\";\n        if (!$this->cellExists($upperLeft)) {\n            $this->getCell($upperLeft)->setValueExplicit(null, DataType::TYPE_NULL);\n        }\n\n        if ($behaviour !== self::MERGE_CELL_CONTENT_HIDE) {\n            // Blank out the rest of the cells in the range (if they exist)\n            if ($numberRows > $numberColumns) {\n                $this->clearMergeCellsByColumn($firstColumn, $lastColumn, $firstRow, $lastRow, $upperLeft, $behaviour);\n            } else {\n                $this->clearMergeCellsByRow($firstColumn, $lastColumnIndex, $firstRow, $lastRow, $upperLeft, $behaviour);\n            }\n        }\n\n        return $this;\n    }\n\n    private function clearMergeCellsByColumn(string $firstColumn, string $lastColumn, int $firstRow, int $lastRow, string $upperLeft, string $behaviour): void\n    {\n        $leftCellValue = ($behaviour === self::MERGE_CELL_CONTENT_MERGE)\n            ? [$this->getCell($upperLeft)->getFormattedValue()]\n            : [];\n\n        foreach ($this->getColumnIterator($firstColumn, $lastColumn) as $column) {\n            $iterator = $column->getCellIterator($firstRow);\n            $iterator->setIterateOnlyExistingCells(true);\n            foreach ($iterator as $cell) {\n                $row = $cell->getRow();\n                if ($row > $lastRow) {\n                    break;\n                }\n                $leftCellValue = $this->mergeCellBehaviour($cell, $upperLeft, $behaviour, $leftCellValue);\n            }\n        }\n\n        if ($behaviour === self::MERGE_CELL_CONTENT_MERGE) {\n            $this->getCell($upperLeft)->setValueExplicit(implode(' ', $leftCellValue), DataType::TYPE_STRING);\n        }\n    }\n\n    private function clearMergeCellsByRow(string $firstColumn, int $lastColumnIndex, int $firstRow, int $lastRow, string $upperLeft, string $behaviour): void\n    {\n        $leftCellValue = ($behaviour === self::MERGE_CELL_CONTENT_MERGE)\n            ? [$this->getCell($upperLeft)->getFormattedValue()]\n            : [];\n\n        foreach ($this->getRowIterator($firstRow, $lastRow) as $row) {\n            $iterator = $row->getCellIterator($firstColumn);\n            $iterator->setIterateOnlyExistingCells(true);\n            foreach ($iterator as $cell) {\n                $column = $cell->getColumn();\n                $columnIndex = Coordinate::columnIndexFromString($column);\n                if ($columnIndex > $lastColumnIndex) {\n                    break;\n                }\n                $leftCellValue = $this->mergeCellBehaviour($cell, $upperLeft, $behaviour, $leftCellValue);\n            }\n        }\n\n        if ($behaviour === self::MERGE_CELL_CONTENT_MERGE) {\n            $this->getCell($upperLeft)->setValueExplicit(implode(' ', $leftCellValue), DataType::TYPE_STRING);\n        }\n    }\n\n    /**\n     * @param mixed[] $leftCellValue\n     *\n     * @return mixed[]\n     */\n    public function mergeCellBehaviour(Cell $cell, string $upperLeft, string $behaviour, array $leftCellValue): array\n    {\n        if ($cell->getCoordinate() !== $upperLeft) {\n            Calculation::getInstance($cell->getWorksheet()->getParentOrThrow())->flushInstance();\n            if ($behaviour === self::MERGE_CELL_CONTENT_MERGE) {\n                $cellValue = $cell->getFormattedValue();\n                if ($cellValue !== '') {\n                    $leftCellValue[] = $cellValue;\n                }\n            }\n            $cell->setValueExplicit(null, DataType::TYPE_NULL);\n        }\n\n        return $leftCellValue;\n    }\n\n    /**\n     * Remove merge on a cell range.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $range A simple string containing a Cell range like 'A1:E10'\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or an AddressRange.\n     *\n     * @return $this\n     */\n    public function unmergeCells(AddressRange|string|array $range): static\n    {\n        $range = Functions::trimSheetFromCellReference(Validations::validateCellRange($range));\n\n        if (str_contains($range, ':')) {\n            if (isset($this->mergeCells[$range])) {\n                unset($this->mergeCells[$range]);\n            } else {\n                throw new Exception('Cell range ' . $range . ' not known as merged.');\n            }\n        } else {\n            throw new Exception('Merge can only be removed from a range of cells.');\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get merge cells array.\n     *\n     * @return string[]\n     */\n    public function getMergeCells(): array\n    {\n        return $this->mergeCells;\n    }\n\n    /**\n     * Set merge cells array for the entire sheet. Use instead mergeCells() to merge\n     * a single cell range.\n     *\n     * @param string[] $mergeCells\n     *\n     * @return $this\n     */\n    public function setMergeCells(array $mergeCells): static\n    {\n        $this->mergeCells = $mergeCells;\n\n        return $this;\n    }\n\n    /**\n     * Set protection on a cell or cell range.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $range A simple string containing a Cell range like 'A1:E10'\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or a CellAddress or AddressRange object.\n     * @param string $password Password to unlock the protection\n     * @param bool $alreadyHashed If the password has already been hashed, set this to true\n     *\n     * @return $this\n     */\n    public function protectCells(AddressRange|CellAddress|int|string|array $range, string $password = '', bool $alreadyHashed = false, string $name = '', string $securityDescriptor = ''): static\n    {\n        $range = Functions::trimSheetFromCellReference(Validations::validateCellOrCellRange($range));\n\n        if (!$alreadyHashed && $password !== '') {\n            $password = Shared\\PasswordHasher::hashPassword($password);\n        }\n        $this->protectedCells[$range] = new ProtectedRange($range, $password, $name, $securityDescriptor);\n\n        return $this;\n    }\n\n    /**\n     * Remove protection on a cell or cell range.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $range A simple string containing a Cell range like 'A1:E10'\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or a CellAddress or AddressRange object.\n     *\n     * @return $this\n     */\n    public function unprotectCells(AddressRange|CellAddress|int|string|array $range): static\n    {\n        $range = Functions::trimSheetFromCellReference(Validations::validateCellOrCellRange($range));\n\n        if (isset($this->protectedCells[$range])) {\n            unset($this->protectedCells[$range]);\n        } else {\n            throw new Exception('Cell range ' . $range . ' not known as protected.');\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get protected cells.\n     *\n     * @return ProtectedRange[]\n     */\n    public function getProtectedCellRanges(): array\n    {\n        return $this->protectedCells;\n    }\n\n    /**\n     * Get Autofilter.\n     */\n    public function getAutoFilter(): AutoFilter\n    {\n        return $this->autoFilter;\n    }\n\n    /**\n     * Set AutoFilter.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|AutoFilter|string $autoFilterOrRange\n     *            A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or an AddressRange.\n     *\n     * @return $this\n     */\n    public function setAutoFilter(AddressRange|string|array|AutoFilter $autoFilterOrRange): static\n    {\n        if (is_object($autoFilterOrRange) && ($autoFilterOrRange instanceof AutoFilter)) {\n            $this->autoFilter = $autoFilterOrRange;\n        } else {\n            $cellRange = Functions::trimSheetFromCellReference(Validations::validateCellRange($autoFilterOrRange));\n\n            $this->autoFilter->setRange($cellRange);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Remove autofilter.\n     */\n    public function removeAutoFilter(): self\n    {\n        $this->autoFilter->setRange('');\n\n        return $this;\n    }\n\n    /**\n     * Get collection of Tables.\n     *\n     * @return ArrayObject<int, Table>\n     */\n    public function getTableCollection(): ArrayObject\n    {\n        return $this->tableCollection;\n    }\n\n    /**\n     * Add Table.\n     *\n     * @return $this\n     */\n    public function addTable(Table $table): self\n    {\n        $table->setWorksheet($this);\n        $this->tableCollection[] = $table;\n\n        return $this;\n    }\n\n    /**\n     * @return string[] array of Table names\n     */\n    public function getTableNames(): array\n    {\n        $tableNames = [];\n\n        foreach ($this->tableCollection as $table) {\n            /** @var Table $table */\n            $tableNames[] = $table->getName();\n        }\n\n        return $tableNames;\n    }\n\n    /**\n     * @param string $name the table name to search\n     *\n     * @return null|Table The table from the tables collection, or null if not found\n     */\n    public function getTableByName(string $name): ?Table\n    {\n        $tableIndex = $this->getTableIndexByName($name);\n\n        return ($tableIndex === null) ? null : $this->tableCollection[$tableIndex];\n    }\n\n    /**\n     * @param string $name the table name to search\n     *\n     * @return null|int The index of the located table in the tables collection, or null if not found\n     */\n    protected function getTableIndexByName(string $name): ?int\n    {\n        $name = StringHelper::strToUpper($name);\n        foreach ($this->tableCollection as $index => $table) {\n            /** @var Table $table */\n            if (StringHelper::strToUpper($table->getName()) === $name) {\n                return $index;\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * Remove Table by name.\n     *\n     * @param string $name Table name\n     *\n     * @return $this\n     */\n    public function removeTableByName(string $name): self\n    {\n        $tableIndex = $this->getTableIndexByName($name);\n\n        if ($tableIndex !== null) {\n            unset($this->tableCollection[$tableIndex]);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Remove collection of Tables.\n     */\n    public function removeTableCollection(): self\n    {\n        $this->tableCollection = new ArrayObject();\n\n        return $this;\n    }\n\n    /**\n     * Get Freeze Pane.\n     */\n    public function getFreezePane(): ?string\n    {\n        return $this->freezePane;\n    }\n\n    /**\n     * Freeze Pane.\n     *\n     * Examples:\n     *\n     *     - A2 will freeze the rows above cell A2 (i.e row 1)\n     *     - B1 will freeze the columns to the left of cell B1 (i.e column A)\n     *     - B2 will freeze the rows above and to the left of cell B2 (i.e row 1 and column A)\n     *\n     * @param null|array{0: int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5';\n     *            or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     *        Passing a null value for this argument will clear any existing freeze pane for this worksheet.\n     * @param null|array{0: int, 1: int}|CellAddress|string $topLeftCell default position of the right bottom pane\n     *            Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]),\n     *            or a CellAddress object.\n     *\n     * @return $this\n     */\n    public function freezePane(null|CellAddress|string|array $coordinate, null|CellAddress|string|array $topLeftCell = null, bool $frozenSplit = false): static\n    {\n        $this->panes = [\n            'bottomRight' => null,\n            'bottomLeft' => null,\n            'topRight' => null,\n            'topLeft' => null,\n        ];\n        $cellAddress = ($coordinate !== null)\n            ? Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate))\n            : null;\n        if ($cellAddress !== null && Coordinate::coordinateIsRange($cellAddress)) {\n            throw new Exception('Freeze pane can not be set on a range of cells.');\n        }\n        $topLeftCell = ($topLeftCell !== null)\n            ? Functions::trimSheetFromCellReference(Validations::validateCellAddress($topLeftCell))\n            : null;\n\n        if ($cellAddress !== null && $topLeftCell === null) {\n            $coordinate = Coordinate::coordinateFromString($cellAddress);\n            $topLeftCell = $coordinate[0] . $coordinate[1];\n        }\n\n        $topLeftCell = \"$topLeftCell\";\n        $this->paneTopLeftCell = $topLeftCell;\n\n        $this->freezePane = $cellAddress;\n        $this->topLeftCell = $topLeftCell;\n        if ($cellAddress === null) {\n            $this->paneState = '';\n            $this->xSplit = $this->ySplit = 0;\n            $this->activePane = '';\n        } else {\n            $coordinates = Coordinate::indexesFromString($cellAddress);\n            $this->xSplit = $coordinates[0] - 1;\n            $this->ySplit = $coordinates[1] - 1;\n            if ($this->xSplit > 0 || $this->ySplit > 0) {\n                $this->paneState = $frozenSplit ? self::PANE_FROZENSPLIT : self::PANE_FROZEN;\n                $this->setSelectedCellsActivePane();\n            } else {\n                $this->paneState = '';\n                $this->freezePane = null;\n                $this->activePane = '';\n            }\n        }\n\n        return $this;\n    }\n\n    public function setTopLeftCell(string $topLeftCell): self\n    {\n        $this->topLeftCell = $topLeftCell;\n\n        return $this;\n    }\n\n    /**\n     * Unfreeze Pane.\n     *\n     * @return $this\n     */\n    public function unfreezePane(): static\n    {\n        return $this->freezePane(null);\n    }\n\n    /**\n     * Get the default position of the right bottom pane.\n     */\n    public function getTopLeftCell(): ?string\n    {\n        return $this->topLeftCell;\n    }\n\n    public function getPaneTopLeftCell(): string\n    {\n        return $this->paneTopLeftCell;\n    }\n\n    public function setPaneTopLeftCell(string $paneTopLeftCell): self\n    {\n        $this->paneTopLeftCell = $paneTopLeftCell;\n\n        return $this;\n    }\n\n    public function usesPanes(): bool\n    {\n        return $this->xSplit > 0 || $this->ySplit > 0;\n    }\n\n    public function getPane(string $position): ?Pane\n    {\n        return $this->panes[$position] ?? null;\n    }\n\n    public function setPane(string $position, ?Pane $pane): self\n    {\n        if (array_key_exists($position, $this->panes)) {\n            $this->panes[$position] = $pane;\n        }\n\n        return $this;\n    }\n\n    /** @return (null|Pane)[] */\n    public function getPanes(): array\n    {\n        return $this->panes;\n    }\n\n    public function getActivePane(): string\n    {\n        return $this->activePane;\n    }\n\n    public function setActivePane(string $activePane): self\n    {\n        $this->activePane = array_key_exists($activePane, $this->panes) ? $activePane : '';\n\n        return $this;\n    }\n\n    public function getXSplit(): int\n    {\n        return $this->xSplit;\n    }\n\n    public function setXSplit(int $xSplit): self\n    {\n        $this->xSplit = $xSplit;\n        if (in_array($this->paneState, self::VALIDFROZENSTATE, true)) {\n            $this->freezePane([$this->xSplit + 1, $this->ySplit + 1], $this->topLeftCell, $this->paneState === self::PANE_FROZENSPLIT);\n        }\n\n        return $this;\n    }\n\n    public function getYSplit(): int\n    {\n        return $this->ySplit;\n    }\n\n    public function setYSplit(int $ySplit): self\n    {\n        $this->ySplit = $ySplit;\n        if (in_array($this->paneState, self::VALIDFROZENSTATE, true)) {\n            $this->freezePane([$this->xSplit + 1, $this->ySplit + 1], $this->topLeftCell, $this->paneState === self::PANE_FROZENSPLIT);\n        }\n\n        return $this;\n    }\n\n    public function getPaneState(): string\n    {\n        return $this->paneState;\n    }\n\n    public const PANE_FROZEN = 'frozen';\n    public const PANE_FROZENSPLIT = 'frozenSplit';\n    public const PANE_SPLIT = 'split';\n    private const VALIDPANESTATE = [self::PANE_FROZEN, self::PANE_SPLIT, self::PANE_FROZENSPLIT];\n    private const VALIDFROZENSTATE = [self::PANE_FROZEN, self::PANE_FROZENSPLIT];\n\n    public function setPaneState(string $paneState): self\n    {\n        $this->paneState = in_array($paneState, self::VALIDPANESTATE, true) ? $paneState : '';\n        if (in_array($this->paneState, self::VALIDFROZENSTATE, true)) {\n            $this->freezePane([$this->xSplit + 1, $this->ySplit + 1], $this->topLeftCell, $this->paneState === self::PANE_FROZENSPLIT);\n        } else {\n            $this->freezePane = null;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Insert a new row, updating all possible related data.\n     *\n     * @param int $before Insert before this row number\n     * @param int $numberOfRows Number of new rows to insert\n     *\n     * @return $this\n     */\n    public function insertNewRowBefore(int $before, int $numberOfRows = 1): static\n    {\n        if ($before >= 1) {\n            $objReferenceHelper = ReferenceHelper::getInstance();\n            $objReferenceHelper->insertNewBefore('A' . $before, 0, $numberOfRows, $this);\n        } else {\n            throw new Exception('Rows can only be inserted before at least row 1.');\n        }\n\n        return $this;\n    }\n\n    /**\n     * Insert a new column, updating all possible related data.\n     *\n     * @param string $before Insert before this column Name, eg: 'A'\n     * @param int $numberOfColumns Number of new columns to insert\n     *\n     * @return $this\n     */\n    public function insertNewColumnBefore(string $before, int $numberOfColumns = 1): static\n    {\n        if (!is_numeric($before)) {\n            $objReferenceHelper = ReferenceHelper::getInstance();\n            $objReferenceHelper->insertNewBefore($before . '1', $numberOfColumns, 0, $this);\n        } else {\n            throw new Exception('Column references should not be numeric.');\n        }\n\n        return $this;\n    }\n\n    /**\n     * Insert a new column, updating all possible related data.\n     *\n     * @param int $beforeColumnIndex Insert before this column ID (numeric column coordinate of the cell)\n     * @param int $numberOfColumns Number of new columns to insert\n     *\n     * @return $this\n     */\n    public function insertNewColumnBeforeByIndex(int $beforeColumnIndex, int $numberOfColumns = 1): static\n    {\n        if ($beforeColumnIndex >= 1) {\n            return $this->insertNewColumnBefore(Coordinate::stringFromColumnIndex($beforeColumnIndex), $numberOfColumns);\n        }\n\n        throw new Exception('Columns can only be inserted before at least column A (1).');\n    }\n\n    /**\n     * Delete a row, updating all possible related data.\n     *\n     * @param int $row Remove rows, starting with this row number\n     * @param int $numberOfRows Number of rows to remove\n     *\n     * @return $this\n     */\n    public function removeRow(int $row, int $numberOfRows = 1): static\n    {\n        if ($row < 1) {\n            throw new Exception('Rows to be deleted should at least start from row 1.');\n        }\n        $startRow = $row;\n        $endRow = $startRow + $numberOfRows - 1;\n        $removeKeys = [];\n        $addKeys = [];\n        foreach ($this->mergeCells as $key => $value) {\n            if (\n                Preg::isMatch(\n                    '/^([a-z]{1,3})(\\d+):([a-z]{1,3})(\\d+)/i',\n                    $key,\n                    $matches\n                )\n            ) {\n                $startMergeInt = (int) $matches[2];\n                $endMergeInt = (int) $matches[4];\n                if ($startMergeInt >= $startRow) {\n                    if ($startMergeInt <= $endRow) {\n                        $removeKeys[] = $key;\n                    }\n                } elseif ($endMergeInt >= $startRow) {\n                    if ($endMergeInt <= $endRow) {\n                        $temp = $endMergeInt - 1;\n                        $removeKeys[] = $key;\n                        if ($temp !== $startMergeInt) {\n                            $temp3 = $matches[1] . $matches[2] . ':' . $matches[3] . $temp;\n                            $addKeys[] = $temp3;\n                        }\n                    }\n                }\n            }\n        }\n        foreach ($removeKeys as $key) {\n            unset($this->mergeCells[$key]);\n        }\n        foreach ($addKeys as $key) {\n            $this->mergeCells[$key] = $key;\n        }\n\n        $holdRowDimensions = $this->removeRowDimensions($row, $numberOfRows);\n        $highestRow = $this->getHighestDataRow();\n        $removedRowsCounter = 0;\n\n        for ($r = 0; $r < $numberOfRows; ++$r) {\n            if ($row + $r <= $highestRow) {\n                $this->cellCollection->removeRow($row + $r);\n                ++$removedRowsCounter;\n            }\n        }\n\n        $objReferenceHelper = ReferenceHelper::getInstance();\n        $objReferenceHelper->insertNewBefore('A' . ($row + $numberOfRows), 0, -$numberOfRows, $this);\n        for ($r = 0; $r < $removedRowsCounter; ++$r) {\n            $this->cellCollection->removeRow($highestRow);\n            --$highestRow;\n        }\n\n        $this->rowDimensions = $holdRowDimensions;\n\n        return $this;\n    }\n\n    /** @return RowDimension[] */\n    private function removeRowDimensions(int $row, int $numberOfRows): array\n    {\n        $highRow = $row + $numberOfRows - 1;\n        $holdRowDimensions = [];\n        foreach ($this->rowDimensions as $rowDimension) {\n            $num = $rowDimension->getRowIndex();\n            if ($num < $row) {\n                $holdRowDimensions[$num] = $rowDimension;\n            } elseif ($num > $highRow) {\n                $num -= $numberOfRows;\n                $cloneDimension = clone $rowDimension;\n                $cloneDimension->setRowIndex($num);\n                $holdRowDimensions[$num] = $cloneDimension;\n            }\n        }\n\n        return $holdRowDimensions;\n    }\n\n    /**\n     * Remove a column, updating all possible related data.\n     *\n     * @param string $column Remove columns starting with this column name, eg: 'A'\n     * @param int $numberOfColumns Number of columns to remove\n     *\n     * @return $this\n     */\n    public function removeColumn(string $column, int $numberOfColumns = 1): static\n    {\n        if (is_numeric($column)) {\n            throw new Exception('Column references should not be numeric.');\n        }\n        $startColumnInt = Coordinate::columnIndexFromString($column);\n        $endColumnInt = $startColumnInt + $numberOfColumns - 1;\n        $removeKeys = [];\n        $addKeys = [];\n        foreach ($this->mergeCells as $key => $value) {\n            if (\n                Preg::isMatch(\n                    '/^([a-z]{1,3})(\\d+):([a-z]{1,3})(\\d+)/i',\n                    $key,\n                    $matches\n                )\n            ) {\n                $startMergeInt = Coordinate::columnIndexFromString($matches[1]);\n                $endMergeInt = Coordinate::columnIndexFromString($matches[3]);\n                if ($startMergeInt >= $startColumnInt) {\n                    if ($startMergeInt <= $endColumnInt) {\n                        $removeKeys[] = $key;\n                    }\n                } elseif ($endMergeInt >= $startColumnInt) {\n                    if ($endMergeInt <= $endColumnInt) {\n                        $temp = Coordinate::columnIndexFromString($matches[3]) - 1;\n                        $temp2 = Coordinate::stringFromColumnIndex($temp);\n                        $removeKeys[] = $key;\n                        if ($temp2 !== $matches[1]) {\n                            $temp3 = $matches[1] . $matches[2] . ':' . $temp2 . $matches[4];\n                            $addKeys[] = $temp3;\n                        }\n                    }\n                }\n            }\n        }\n        foreach ($removeKeys as $key) {\n            unset($this->mergeCells[$key]);\n        }\n        foreach ($addKeys as $key) {\n            $this->mergeCells[$key] = $key;\n        }\n\n        $highestColumn = $this->getHighestDataColumn();\n        $highestColumnIndex = Coordinate::columnIndexFromString($highestColumn);\n        $pColumnIndex = Coordinate::columnIndexFromString($column);\n\n        $holdColumnDimensions = $this->removeColumnDimensions($pColumnIndex, $numberOfColumns);\n\n        $column = Coordinate::stringFromColumnIndex($pColumnIndex + $numberOfColumns);\n        $objReferenceHelper = ReferenceHelper::getInstance();\n        $objReferenceHelper->insertNewBefore($column . '1', -$numberOfColumns, 0, $this);\n\n        $this->columnDimensions = $holdColumnDimensions;\n\n        if ($pColumnIndex > $highestColumnIndex) {\n            return $this;\n        }\n\n        $maxPossibleColumnsToBeRemoved = $highestColumnIndex - $pColumnIndex + 1;\n\n        for ($c = 0, $n = min($maxPossibleColumnsToBeRemoved, $numberOfColumns); $c < $n; ++$c) {\n            $this->cellCollection->removeColumn($highestColumn);\n            $highestColumn = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($highestColumn) - 1);\n        }\n\n        $this->garbageCollect();\n\n        return $this;\n    }\n\n    /** @return ColumnDimension[] */\n    private function removeColumnDimensions(int $pColumnIndex, int $numberOfColumns): array\n    {\n        $highCol = $pColumnIndex + $numberOfColumns - 1;\n        $holdColumnDimensions = [];\n        foreach ($this->columnDimensions as $columnDimension) {\n            $num = $columnDimension->getColumnNumeric();\n            if ($num < $pColumnIndex) {\n                $str = $columnDimension->getColumnIndex();\n                $holdColumnDimensions[$str] = $columnDimension;\n            } elseif ($num > $highCol) {\n                $cloneDimension = clone $columnDimension;\n                $cloneDimension->setColumnNumeric($num - $numberOfColumns);\n                $str = $cloneDimension->getColumnIndex();\n                $holdColumnDimensions[$str] = $cloneDimension;\n            }\n        }\n\n        return $holdColumnDimensions;\n    }\n\n    /**\n     * Remove a column, updating all possible related data.\n     *\n     * @param int $columnIndex Remove starting with this column Index (numeric column coordinate)\n     * @param int $numColumns Number of columns to remove\n     *\n     * @return $this\n     */\n    public function removeColumnByIndex(int $columnIndex, int $numColumns = 1): static\n    {\n        if ($columnIndex >= 1) {\n            return $this->removeColumn(Coordinate::stringFromColumnIndex($columnIndex), $numColumns);\n        }\n\n        throw new Exception('Columns to be deleted should at least start from column A (1)');\n    }\n\n    /**\n     * Show gridlines?\n     */\n    public function getShowGridlines(): bool\n    {\n        return $this->showGridlines;\n    }\n\n    /**\n     * Set show gridlines.\n     *\n     * @param bool $showGridLines Show gridlines (true/false)\n     *\n     * @return $this\n     */\n    public function setShowGridlines(bool $showGridLines): self\n    {\n        $this->showGridlines = $showGridLines;\n\n        return $this;\n    }\n\n    /**\n     * Print gridlines?\n     */\n    public function getPrintGridlines(): bool\n    {\n        return $this->printGridlines;\n    }\n\n    /**\n     * Set print gridlines.\n     *\n     * @param bool $printGridLines Print gridlines (true/false)\n     *\n     * @return $this\n     */\n    public function setPrintGridlines(bool $printGridLines): self\n    {\n        $this->printGridlines = $printGridLines;\n\n        return $this;\n    }\n\n    /**\n     * Show row and column headers?\n     */\n    public function getShowRowColHeaders(): bool\n    {\n        return $this->showRowColHeaders;\n    }\n\n    /**\n     * Set show row and column headers.\n     *\n     * @param bool $showRowColHeaders Show row and column headers (true/false)\n     *\n     * @return $this\n     */\n    public function setShowRowColHeaders(bool $showRowColHeaders): self\n    {\n        $this->showRowColHeaders = $showRowColHeaders;\n\n        return $this;\n    }\n\n    /**\n     * Show summary below? (Row/Column outlining).\n     */\n    public function getShowSummaryBelow(): bool\n    {\n        return $this->showSummaryBelow;\n    }\n\n    /**\n     * Set show summary below.\n     *\n     * @param bool $showSummaryBelow Show summary below (true/false)\n     *\n     * @return $this\n     */\n    public function setShowSummaryBelow(bool $showSummaryBelow): self\n    {\n        $this->showSummaryBelow = $showSummaryBelow;\n\n        return $this;\n    }\n\n    /**\n     * Show summary right? (Row/Column outlining).\n     */\n    public function getShowSummaryRight(): bool\n    {\n        return $this->showSummaryRight;\n    }\n\n    /**\n     * Set show summary right.\n     *\n     * @param bool $showSummaryRight Show summary right (true/false)\n     *\n     * @return $this\n     */\n    public function setShowSummaryRight(bool $showSummaryRight): self\n    {\n        $this->showSummaryRight = $showSummaryRight;\n\n        return $this;\n    }\n\n    /**\n     * Get comments.\n     *\n     * @return Comment[]\n     */\n    public function getComments(): array\n    {\n        return $this->comments;\n    }\n\n    /**\n     * Set comments array for the entire sheet.\n     *\n     * @param Comment[] $comments\n     *\n     * @return $this\n     */\n    public function setComments(array $comments): self\n    {\n        $this->comments = $comments;\n\n        return $this;\n    }\n\n    /**\n     * Remove comment from cell.\n     *\n     * @param array{0: int, 1: int}|CellAddress|string $cellCoordinate Coordinate of the cell as a string, eg: 'C5';\n     *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     *\n     * @return $this\n     */\n    public function removeComment(CellAddress|string|array $cellCoordinate): self\n    {\n        $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));\n\n        if (Coordinate::coordinateIsRange($cellAddress)) {\n            throw new Exception('Cell coordinate string can not be a range of cells.');\n        } elseif (str_contains($cellAddress, '$')) {\n            throw new Exception('Cell coordinate string must not be absolute.');\n        } elseif ($cellAddress == '') {\n            throw new Exception('Cell coordinate can not be zero-length string.');\n        }\n        // Check if we have a comment for this cell and delete it\n        if (isset($this->comments[$cellAddress])) {\n            unset($this->comments[$cellAddress]);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get comment for cell.\n     *\n     * @param array{0: int, 1: int}|CellAddress|string $cellCoordinate Coordinate of the cell as a string, eg: 'C5';\n     *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.\n     */\n    public function getComment(CellAddress|string|array $cellCoordinate, bool $attachNew = true): Comment\n    {\n        $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));\n\n        if (Coordinate::coordinateIsRange($cellAddress)) {\n            throw new Exception('Cell coordinate string can not be a range of cells.');\n        } elseif (str_contains($cellAddress, '$')) {\n            throw new Exception('Cell coordinate string must not be absolute.');\n        } elseif ($cellAddress == '') {\n            throw new Exception('Cell coordinate can not be zero-length string.');\n        }\n\n        // Check if we already have a comment for this cell.\n        if (isset($this->comments[$cellAddress])) {\n            return $this->comments[$cellAddress];\n        }\n\n        // If not, create a new comment.\n        $newComment = new Comment();\n        if ($attachNew) {\n            $this->comments[$cellAddress] = $newComment;\n        }\n\n        return $newComment;\n    }\n\n    /**\n     * Get active cell.\n     *\n     * @return string Example: 'A1'\n     */\n    public function getActiveCell(): string\n    {\n        return $this->activeCell;\n    }\n\n    /**\n     * Get selected cells.\n     */\n    public function getSelectedCells(): string\n    {\n        return $this->selectedCells;\n    }\n\n    /**\n     * Selected cell.\n     *\n     * @param string $coordinate Cell (i.e. A1)\n     *\n     * @return $this\n     */\n    public function setSelectedCell(string $coordinate): static\n    {\n        return $this->setSelectedCells($coordinate);\n    }\n\n    /**\n     * Select a range of cells.\n     *\n     * @param AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $coordinate A simple string containing a Cell range like 'A1:E10'\n     *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),\n     *              or a CellAddress or AddressRange object.\n     *\n     * @return $this\n     */\n    public function setSelectedCells(AddressRange|CellAddress|int|string|array $coordinate): static\n    {\n        if (is_string($coordinate)) {\n            $coordinate = Validations::definedNameToCoordinate($coordinate, $this);\n        }\n        $coordinate = Validations::validateCellOrCellRange($coordinate);\n\n        if (Coordinate::coordinateIsRange($coordinate)) {\n            [$first] = Coordinate::splitRange($coordinate);\n            $this->activeCell = $first[0];\n        } else {\n            $this->activeCell = $coordinate;\n        }\n        $this->selectedCells = $coordinate;\n        $this->setSelectedCellsActivePane();\n\n        return $this;\n    }\n\n    private function setSelectedCellsActivePane(): void\n    {\n        if (!empty($this->freezePane)) {\n            $coordinateC = Coordinate::indexesFromString($this->freezePane);\n            $coordinateT = Coordinate::indexesFromString($this->activeCell);\n            if ($coordinateC[0] === 1) {\n                $activePane = ($coordinateT[1] <= $coordinateC[1]) ? 'topLeft' : 'bottomLeft';\n            } elseif ($coordinateC[1] === 1) {\n                $activePane = ($coordinateT[0] <= $coordinateC[0]) ? 'topLeft' : 'topRight';\n            } elseif ($coordinateT[1] <= $coordinateC[1]) {\n                $activePane = ($coordinateT[0] <= $coordinateC[0]) ? 'topLeft' : 'topRight';\n            } else {\n                $activePane = ($coordinateT[0] <= $coordinateC[0]) ? 'bottomLeft' : 'bottomRight';\n            }\n            $this->setActivePane($activePane);\n            $this->panes[$activePane] = new Pane($activePane, $this->selectedCells, $this->activeCell);\n        }\n    }\n\n    /**\n     * Get right-to-left.\n     */\n    public function getRightToLeft(): bool\n    {\n        return $this->rightToLeft;\n    }\n\n    /**\n     * Set right-to-left.\n     *\n     * @param bool $value Right-to-left true/false\n     *\n     * @return $this\n     */\n    public function setRightToLeft(bool $value): static\n    {\n        $this->rightToLeft = $value;\n\n        return $this;\n    }\n\n    /**\n     * Fill worksheet from values in array.\n     *\n     * @param mixed[]|mixed[][] $source Source array\n     * @param mixed $nullValue Value in source array that stands for blank cell\n     * @param string $startCell Insert array starting from this cell address as the top left coordinate\n     * @param bool $strictNullComparison Apply strict comparison when testing for null values in the array\n     *\n     * @return $this\n     */\n    public function fromArray(array $source, mixed $nullValue = null, string $startCell = 'A1', bool $strictNullComparison = false): static\n    {\n        //    Convert a 1-D array to 2-D (for ease of looping)\n        if (!is_array(end($source))) {\n            $source = [$source];\n        }\n        /** @var mixed[][] $source */\n\n        // start coordinate\n        [$startColumn, $startRow] = Coordinate::coordinateFromString($startCell);\n        $startRow = (int) $startRow;\n\n        // Loop through $source\n        if ($strictNullComparison) {\n            foreach ($source as $rowData) {\n                /** @var string */\n                $currentColumn = $startColumn;\n                foreach ($rowData as $cellValue) {\n                    if ($cellValue !== $nullValue) {\n                        $this->getCell($currentColumn . $startRow)->setValue($cellValue);\n                    }\n                    StringHelper::stringIncrement($currentColumn);\n                }\n                ++$startRow;\n            }\n        } else {\n            foreach ($source as $rowData) {\n                $currentColumn = $startColumn;\n                foreach ($rowData as $cellValue) {\n                    if ($cellValue != $nullValue) {\n                        $this->getCell($currentColumn . $startRow)->setValue($cellValue);\n                    }\n                    StringHelper::stringIncrement($currentColumn);\n                }\n                ++$startRow;\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * @param bool $calculateFormulas Whether to calculate cell's value if it is a formula.\n     * @param null|bool|float|int|RichText|string $nullValue value to use when null\n     * @param bool $formatData Whether to format data according to cell's style.\n     * @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value\n     * @param bool $oldCalculatedValue If calculateFormulas is false and this is true, use oldCalculatedFormula instead.\n     *\n     * @throws Exception\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Calculation\\Exception\n     */\n    protected function cellToArray(Cell $cell, bool $calculateFormulas, bool $formatData, mixed $nullValue, bool $lessFloatPrecision = false, $oldCalculatedValue = false): mixed\n    {\n        $returnValue = $nullValue;\n\n        if ($cell->getValue() !== null) {\n            if ($cell->getValue() instanceof RichText) {\n                $returnValue = $cell->getValue()->getPlainText();\n            } elseif ($calculateFormulas) {\n                $returnValue = $cell->getCalculatedValue();\n            } elseif ($oldCalculatedValue && ($cell->getDataType() === DataType::TYPE_FORMULA)) {\n                $returnValue = $cell->getOldCalculatedValue() ?? $cell->getValue();\n            } else {\n                $returnValue = $cell->getValue();\n            }\n\n            if ($formatData) {\n                $style = $this->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex());\n                /** @var null|bool|float|int|RichText|string */\n                $returnValuex = $returnValue;\n                $returnValue = NumberFormat::toFormattedString(\n                    $returnValuex,\n                    $style->getNumberFormat()->getFormatCode() ?? NumberFormat::FORMAT_GENERAL,\n                    lessFloatPrecision: $lessFloatPrecision\n                );\n            }\n        }\n\n        return $returnValue;\n    }\n\n    /**\n     * Create array from a range of cells.\n     *\n     * @param null|bool|float|int|RichText|string $nullValue Value returned in the array entry if a cell doesn't exist\n     * @param bool $calculateFormulas Should formulas be calculated?\n     * @param bool $formatData Should formatting be applied to cell values?\n     * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero\n     *                             True - Return rows and columns indexed by their actual row and column IDs\n     * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.\n     *                            True - Don't return values for rows/columns that are defined as hidden.\n     * @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.\n     * @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value\n     * @param bool $oldCalculatedValue If calculateFormulas is false and this is true, use oldCalculatedFormula instead.\n     *\n     * @return mixed[][]\n     */\n    public function rangeToArray(\n        string $range,\n        mixed $nullValue = null,\n        bool $calculateFormulas = true,\n        bool $formatData = true,\n        bool $returnCellRef = false,\n        bool $ignoreHidden = false,\n        bool $reduceArrays = false,\n        bool $lessFloatPrecision = false,\n        bool $oldCalculatedValue = false,\n    ): array {\n        $returnValue = [];\n\n        // Loop through rows\n        foreach ($this->rangeToArrayYieldRows($range, $nullValue, $calculateFormulas, $formatData, $returnCellRef, $ignoreHidden, $reduceArrays, $lessFloatPrecision, $oldCalculatedValue) as $rowRef => $rowArray) {\n            /** @var int $rowRef */\n            $returnValue[$rowRef] = $rowArray;\n        }\n\n        // Return\n        return $returnValue;\n    }\n\n    /**\n     * Create array from a multiple ranges of cells. (such as A1:A3,A15,B17:C17).\n     *\n     * @param null|bool|float|int|RichText|string $nullValue Value returned in the array entry if a cell doesn't exist\n     * @param bool $calculateFormulas Should formulas be calculated?\n     * @param bool $formatData Should formatting be applied to cell values?\n     * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero\n     *                             True - Return rows and columns indexed by their actual row and column IDs\n     * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.\n     *                            True - Don't return values for rows/columns that are defined as hidden.\n     * @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.\n     * @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value\n     * @param bool $oldCalculatedValue If calculateFormulas is false and this is true, use oldCalculatedFormula instead.\n     *\n     * @return mixed[][]\n     */\n    public function rangesToArray(\n        string $ranges,\n        mixed $nullValue = null,\n        bool $calculateFormulas = true,\n        bool $formatData = true,\n        bool $returnCellRef = false,\n        bool $ignoreHidden = false,\n        bool $reduceArrays = false,\n        bool $lessFloatPrecision = false,\n        bool $oldCalculatedValue = false,\n    ): array {\n        $returnValue = [];\n\n        $parts = explode(',', $ranges);\n        foreach ($parts as $part) {\n            // Loop through rows\n            foreach ($this->rangeToArrayYieldRows($part, $nullValue, $calculateFormulas, $formatData, $returnCellRef, $ignoreHidden, $reduceArrays, $lessFloatPrecision, $oldCalculatedValue) as $rowRef => $rowArray) {\n                /** @var int $rowRef */\n                $returnValue[$rowRef] = $rowArray;\n            }\n        }\n\n        // Return\n        return $returnValue;\n    }\n\n    /**\n     * Create array from a range of cells, yielding each row in turn.\n     *\n     * @param null|bool|float|int|RichText|string $nullValue Value returned in the array entry if a cell doesn't exist\n     * @param bool $calculateFormulas Should formulas be calculated?\n     * @param bool $formatData Should formatting be applied to cell values?\n     * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero\n     *                             True - Return rows and columns indexed by their actual row and column IDs\n     * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.\n     *                            True - Don't return values for rows/columns that are defined as hidden.\n     * @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.\n     * @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value\n     * @param bool $oldCalculatedValue If calculateFormulas is false and this is true, use oldCalculatedFormula instead.\n     *\n     * @return Generator<array<mixed>>\n     */\n    public function rangeToArrayYieldRows(\n        string $range,\n        mixed $nullValue = null,\n        bool $calculateFormulas = true,\n        bool $formatData = true,\n        bool $returnCellRef = false,\n        bool $ignoreHidden = false,\n        bool $reduceArrays = false,\n        bool $lessFloatPrecision = false,\n        bool $oldCalculatedValue = false,\n    ) {\n        $range = Validations::validateCellOrCellRange($range);\n\n        //    Identify the range that we need to extract from the worksheet\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($range);\n        $minCol = Coordinate::stringFromColumnIndex($rangeStart[0]);\n        $minRow = $rangeStart[1];\n        $maxCol = Coordinate::stringFromColumnIndex($rangeEnd[0]);\n        $maxRow = $rangeEnd[1];\n        $minColInt = $rangeStart[0];\n        $maxColInt = $rangeEnd[0];\n\n        StringHelper::stringIncrement($maxCol);\n        /** @var array<string, bool> */\n        $hiddenColumns = [];\n        $nullRow = $this->buildNullRow($nullValue, $minCol, $maxCol, $returnCellRef, $ignoreHidden, $hiddenColumns);\n        $hideColumns = !empty($hiddenColumns);\n\n        $keys = $this->cellCollection->getSortedCoordinatesInt();\n        $keyIndex = 0;\n        $keysCount = count($keys);\n        // Loop through rows\n        for ($row = $minRow; $row <= $maxRow; ++$row) {\n            if (($ignoreHidden === true) && ($this->isRowVisible($row) === false)) {\n                continue;\n            }\n            $rowRef = $returnCellRef ? $row : ($row - $minRow);\n            $returnValue = $nullRow;\n\n            $index = ($row - 1) * AddressRange::MAX_COLUMN_INT + 1;\n            $indexPlus = $index + AddressRange::MAX_COLUMN_INT - 1;\n\n            // Binary search to quickly approach the correct index\n            $keyIndex = intdiv($keysCount, 2);\n            $boundLow = 0;\n            $boundHigh = $keysCount - 1;\n            while ($boundLow <= $boundHigh) {\n                $keyIndex = intdiv($boundLow + $boundHigh, 2);\n                if ($keys[$keyIndex] < $index) {\n                    $boundLow = $keyIndex + 1;\n                } elseif ($keys[$keyIndex] > $index) {\n                    $boundHigh = $keyIndex - 1;\n                } else {\n                    break;\n                }\n            }\n\n            // Realign to the proper index value\n            while ($keyIndex > 0 && $keys[$keyIndex] > $index) {\n                --$keyIndex;\n            }\n            while ($keyIndex < $keysCount && $keys[$keyIndex] < $index) {\n                ++$keyIndex;\n            }\n\n            while ($keyIndex < $keysCount && $keys[$keyIndex] <= $indexPlus) {\n                $key = $keys[$keyIndex];\n                $thisRow = intdiv($key - 1, AddressRange::MAX_COLUMN_INT) + 1;\n                $thisCol = ($key % AddressRange::MAX_COLUMN_INT) ?: AddressRange::MAX_COLUMN_INT;\n                if ($thisCol >= $minColInt && $thisCol <= $maxColInt) {\n                    $col = Coordinate::stringFromColumnIndex($thisCol);\n                    if ($hideColumns === false || !isset($hiddenColumns[$col])) {\n                        $columnRef = $returnCellRef ? $col : ($thisCol - $minColInt);\n                        $cell = $this->cellCollection->get(\"{$col}{$thisRow}\");\n                        if ($cell !== null) {\n                            $value = $this->cellToArray($cell, $calculateFormulas, $formatData, $nullValue, lessFloatPrecision: $lessFloatPrecision, oldCalculatedValue: $oldCalculatedValue);\n                            if ($reduceArrays) {\n                                while (is_array($value)) {\n                                    $value = array_shift($value);\n                                }\n                            }\n                            if ($value !== $nullValue) {\n                                $returnValue[$columnRef] = $value;\n                            }\n                        }\n                    }\n                }\n                ++$keyIndex;\n            }\n\n            yield $rowRef => $returnValue;\n        }\n    }\n\n    /**\n     * Prepare a row data filled with null values to deduplicate the memory areas for empty rows.\n     *\n     * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist\n     * @param string $minCol Start column of the range\n     * @param string $maxCol End column of the range\n     * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero\n     *                              True - Return rows and columns indexed by their actual row and column IDs\n     * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.\n     *                             True - Don't return values for rows/columns that are defined as hidden.\n     * @param array<string, bool> $hiddenColumns\n     *\n     * @return mixed[]\n     */\n    private function buildNullRow(\n        mixed $nullValue,\n        string $minCol,\n        string $maxCol,\n        bool $returnCellRef,\n        bool $ignoreHidden,\n        array &$hiddenColumns\n    ): array {\n        $nullRow = [];\n        $c = -1;\n        for ($col = $minCol; $col !== $maxCol; StringHelper::stringIncrement($col)) {\n            if ($ignoreHidden === true && $this->columnDimensionExists($col) && $this->getColumnDimension($col)->getVisible() === false) {\n                $hiddenColumns[$col] = true;\n            } else {\n                $columnRef = $returnCellRef ? $col : ++$c;\n                $nullRow[$columnRef] = $nullValue;\n            }\n        }\n\n        return $nullRow;\n    }\n\n    private function validateNamedRange(string $definedName, bool $returnNullIfInvalid = false): ?DefinedName\n    {\n        $namedRange = DefinedName::resolveName($definedName, $this);\n        if ($namedRange === null) {\n            if ($returnNullIfInvalid) {\n                return null;\n            }\n\n            throw new Exception('Named Range ' . $definedName . ' does not exist.');\n        }\n\n        if ($namedRange->isFormula()) {\n            if ($returnNullIfInvalid) {\n                return null;\n            }\n\n            throw new Exception('Defined Named ' . $definedName . ' is a formula, not a range or cell.');\n        }\n\n        if ($namedRange->getLocalOnly()) {\n            $worksheet = $namedRange->getWorksheet();\n            if ($worksheet === null || $this !== $worksheet) {\n                if ($returnNullIfInvalid) {\n                    return null;\n                }\n\n                throw new Exception(\n                    'Named range ' . $definedName . ' is not accessible from within sheet ' . $this->getTitle()\n                );\n            }\n        }\n\n        return $namedRange;\n    }\n\n    /**\n     * Create array from a range of cells.\n     *\n     * @param string $definedName The Named Range that should be returned\n     * @param null|bool|float|int|RichText|string $nullValue Value returned in the array entry if a cell doesn't exist\n     * @param bool $calculateFormulas Should formulas be calculated?\n     * @param bool $formatData Should formatting be applied to cell values?\n     * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero\n     *                             True - Return rows and columns indexed by their actual row and column IDs\n     * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.\n     *                            True - Don't return values for rows/columns that are defined as hidden.\n     * @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.\n     * @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value\n     * @param bool $oldCalculatedValue If calculateFormulas is false and this is true, use oldCalculatedFormula instead.\n     *\n     * @return mixed[][]\n     */\n    public function namedRangeToArray(\n        string $definedName,\n        mixed $nullValue = null,\n        bool $calculateFormulas = true,\n        bool $formatData = true,\n        bool $returnCellRef = false,\n        bool $ignoreHidden = false,\n        bool $reduceArrays = false,\n        bool $lessFloatPrecision = false,\n        bool $oldCalculatedValue = false,\n    ): array {\n        $retVal = [];\n        $namedRange = $this->validateNamedRange($definedName);\n        if ($namedRange !== null) {\n            $cellRange = ltrim(substr($namedRange->getValue(), (int) strrpos($namedRange->getValue(), '!')), '!');\n            $cellRange = str_replace('$', '', $cellRange);\n            $workSheet = $namedRange->getWorksheet();\n            if ($workSheet !== null) {\n                $retVal = $workSheet->rangeToArray($cellRange, $nullValue, $calculateFormulas, $formatData, $returnCellRef, $ignoreHidden, $reduceArrays, $lessFloatPrecision, $oldCalculatedValue);\n            }\n        }\n\n        return $retVal;\n    }\n\n    /**\n     * Create array from worksheet.\n     *\n     * @param null|bool|float|int|RichText|string $nullValue Value returned in the array entry if a cell doesn't exist\n     * @param bool $calculateFormulas Should formulas be calculated?\n     * @param bool $formatData Should formatting be applied to cell values?\n     * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero\n     *                             True - Return rows and columns indexed by their actual row and column IDs\n     * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.\n     *                            True - Don't return values for rows/columns that are defined as hidden.\n     * @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.\n     * @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value\n     * @param bool $oldCalculatedValue If calculateFormulas is false and this is true, use oldCalculatedFormula instead.\n     *\n     * @return mixed[][]\n     */\n    public function toArray(\n        mixed $nullValue = null,\n        bool $calculateFormulas = true,\n        bool $formatData = true,\n        bool $returnCellRef = false,\n        bool $ignoreHidden = false,\n        bool $reduceArrays = false,\n        bool $lessFloatPrecision = false,\n        bool $oldCalculatedValue = false,\n    ): array {\n        // Garbage collect...\n        $this->garbageCollect();\n        $this->calculateArrays($calculateFormulas);\n\n        //    Identify the range that we need to extract from the worksheet\n        $maxCol = $this->getHighestColumn();\n        $maxRow = $this->getHighestRow();\n\n        // Return\n        return $this->rangeToArray(\"A1:{$maxCol}{$maxRow}\", $nullValue, $calculateFormulas, $formatData, $returnCellRef, $ignoreHidden, $reduceArrays, $lessFloatPrecision, $oldCalculatedValue);\n    }\n\n    /**\n     * Get row iterator.\n     *\n     * @param int $startRow The row number at which to start iterating\n     * @param ?int $endRow The row number at which to stop iterating\n     */\n    public function getRowIterator(int $startRow = 1, ?int $endRow = null): RowIterator\n    {\n        return new RowIterator($this, $startRow, $endRow);\n    }\n\n    /**\n     * Get column iterator.\n     *\n     * @param string $startColumn The column address at which to start iterating\n     * @param ?string $endColumn The column address at which to stop iterating\n     */\n    public function getColumnIterator(string $startColumn = 'A', ?string $endColumn = null): ColumnIterator\n    {\n        return new ColumnIterator($this, $startColumn, $endColumn);\n    }\n\n    /**\n     * Run PhpSpreadsheet garbage collector.\n     *\n     * @return $this\n     */\n    public function garbageCollect(): static\n    {\n        // Flush cache\n        $this->cellCollection->get('A1');\n\n        // Lookup highest column and highest row if cells are cleaned\n        $colRow = $this->cellCollection->getHighestRowAndColumn();\n        $highestRow = $colRow['row'];\n        $highestColumn = Coordinate::columnIndexFromString($colRow['column']);\n\n        // Loop through column dimensions\n        foreach ($this->columnDimensions as $dimension) {\n            $highestColumn = max($highestColumn, Coordinate::columnIndexFromString($dimension->getColumnIndex()));\n        }\n\n        // Loop through row dimensions\n        foreach ($this->rowDimensions as $dimension) {\n            $highestRow = max($highestRow, $dimension->getRowIndex());\n        }\n\n        // Cache values\n        $this->cachedHighestColumn = max(1, $highestColumn);\n        /** @var int $highestRow */\n        $this->cachedHighestRow = $highestRow;\n\n        // Return\n        return $this;\n    }\n\n    /**\n     * @deprecated 5.2.0 Serves no useful purpose. No replacement.\n     *\n     * @codeCoverageIgnore\n     */\n    public function getHashInt(): int\n    {\n        return spl_object_id($this);\n    }\n\n    /**\n     * Extract worksheet title from range.\n     *\n     * Example: extractSheetTitle(\"testSheet!A1\") ==> 'A1'\n     * Example: extractSheetTitle(\"testSheet!A1:C3\") ==> 'A1:C3'\n     * Example: extractSheetTitle(\"'testSheet 1'!A1\", true) ==> ['testSheet 1', 'A1'];\n     * Example: extractSheetTitle(\"'testSheet 1'!A1:C3\", true) ==> ['testSheet 1', 'A1:C3'];\n     * Example: extractSheetTitle(\"A1\", true) ==> ['', 'A1'];\n     * Example: extractSheetTitle(\"A1:C3\", true) ==> ['', 'A1:C3']\n     *\n     * @param ?string $range Range to extract title from\n     * @param bool $returnRange Return range? (see example)\n     *\n     * @return ($range is non-empty-string ? ($returnRange is true ? array{0: string, 1: string} : string) : ($returnRange is true ? array{0: null, 1: null} : null))\n     */\n    public static function extractSheetTitle(?string $range, bool $returnRange = false, bool $unapostrophize = false): array|null|string\n    {\n        if (empty($range)) {\n            return $returnRange ? [null, null] : null;\n        }\n\n        // Sheet title included?\n        if (($sep = strrpos($range, '!')) === false) {\n            return $returnRange ? ['', $range] : '';\n        }\n\n        if ($returnRange) {\n            $title = substr($range, 0, $sep);\n            if ($unapostrophize) {\n                $title = self::unApostrophizeTitle($title);\n            }\n\n            return [$title, substr($range, $sep + 1)];\n        }\n\n        return substr($range, $sep + 1);\n    }\n\n    public static function unApostrophizeTitle(?string $title): string\n    {\n        $title ??= '';\n        if (str_starts_with($title, \"'\") && str_ends_with($title, \"'\")) {\n            $title = str_replace(\"''\", \"'\", substr($title, 1, -1));\n        }\n\n        return $title;\n    }\n\n    /**\n     * Get hyperlink.\n     *\n     * @param string $cellCoordinate Cell coordinate to get hyperlink for, eg: 'A1'\n     */\n    public function getHyperlink(string $cellCoordinate): Hyperlink\n    {\n        $this->getCell($cellCoordinate)->setHadHyperlink(true);\n        // return hyperlink if we already have one\n        if (isset($this->hyperlinkCollection[$cellCoordinate])) {\n            return $this->hyperlinkCollection[$cellCoordinate];\n        }\n\n        // else create hyperlink\n        $this->hyperlinkCollection[$cellCoordinate] = new Hyperlink();\n\n        return $this->hyperlinkCollection[$cellCoordinate];\n    }\n\n    /**\n     * Set hyperlink.\n     *\n     * @param string $cellCoordinate Cell coordinate to insert hyperlink, eg: 'A1'\n     *\n     * @return $this\n     */\n    public function setHyperlink(string $cellCoordinate, ?Hyperlink $hyperlink = null, bool $reset = true): static\n    {\n        if ($hyperlink === null) {\n            unset($this->hyperlinkCollection[$cellCoordinate]);\n            if ($reset) {\n                $this->getCell($cellCoordinate)\n                    ->setHadHyperlink(false);\n            }\n        } else {\n            $this->hyperlinkCollection[$cellCoordinate] = $hyperlink;\n            $this->getCell($cellCoordinate)->setHadHyperlink(true);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Hyperlink at a specific coordinate exists?\n     *\n     * @param string $coordinate eg: 'A1'\n     */\n    public function hyperlinkExists(string $coordinate): bool\n    {\n        return isset($this->hyperlinkCollection[$coordinate]);\n    }\n\n    /**\n     * Get collection of hyperlinks.\n     *\n     * @return Hyperlink[]\n     */\n    public function getHyperlinkCollection(): array\n    {\n        return $this->hyperlinkCollection;\n    }\n\n    /**\n     * Get data validation.\n     *\n     * @param string $cellCoordinate Cell coordinate to get data validation for, eg: 'A1'\n     */\n    public function getDataValidation(string $cellCoordinate): DataValidation\n    {\n        // return data validation if we already have one\n        if (isset($this->dataValidationCollection[$cellCoordinate])) {\n            return $this->dataValidationCollection[$cellCoordinate];\n        }\n\n        // or if cell is part of a data validation range\n        foreach ($this->dataValidationCollection as $key => $dataValidation) {\n            $keyParts = explode(' ', $key);\n            foreach ($keyParts as $keyPart) {\n                if ($keyPart === $cellCoordinate) {\n                    return $dataValidation;\n                }\n                if (str_contains($keyPart, ':')) {\n                    if (Coordinate::coordinateIsInsideRange($keyPart, $cellCoordinate)) {\n                        return $dataValidation;\n                    }\n                }\n            }\n        }\n\n        // else create data validation\n        $dataValidation = new DataValidation();\n        $dataValidation->setSqref($cellCoordinate);\n        $this->dataValidationCollection[$cellCoordinate] = $dataValidation;\n\n        return $dataValidation;\n    }\n\n    /**\n     * Set data validation.\n     *\n     * @param string $cellCoordinate Cell coordinate to insert data validation, eg: 'A1'\n     *\n     * @return $this\n     */\n    public function setDataValidation(string $cellCoordinate, ?DataValidation $dataValidation = null): static\n    {\n        if ($dataValidation === null) {\n            unset($this->dataValidationCollection[$cellCoordinate]);\n        } else {\n            $dataValidation->setSqref($cellCoordinate);\n            $this->dataValidationCollection[$cellCoordinate] = $dataValidation;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Data validation at a specific coordinate exists?\n     *\n     * @param string $coordinate eg: 'A1'\n     */\n    public function dataValidationExists(string $coordinate): bool\n    {\n        if (isset($this->dataValidationCollection[$coordinate])) {\n            return true;\n        }\n        foreach ($this->dataValidationCollection as $key => $dataValidation) {\n            $keyParts = explode(' ', $key);\n            foreach ($keyParts as $keyPart) {\n                if ($keyPart === $coordinate) {\n                    return true;\n                }\n                if (str_contains($keyPart, ':')) {\n                    if (Coordinate::coordinateIsInsideRange($keyPart, $coordinate)) {\n                        return true;\n                    }\n                }\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Get collection of data validations.\n     *\n     * @return DataValidation[]\n     */\n    public function getDataValidationCollection(): array\n    {\n        $collectionCells = [];\n        $collectionRanges = [];\n        foreach ($this->dataValidationCollection as $key => $dataValidation) {\n            if (Preg::isMatch('/[: ]/', $key)) {\n                $collectionRanges[$key] = $dataValidation;\n            } else {\n                $collectionCells[$key] = $dataValidation;\n            }\n        }\n\n        return array_merge($collectionCells, $collectionRanges);\n    }\n\n    /**\n     * Accepts a range, returning it as a range that falls within the current highest row and column of the worksheet.\n     *\n     * @return string Adjusted range value\n     */\n    public function shrinkRangeToFit(string $range): string\n    {\n        $maxCol = $this->getHighestColumn();\n        $maxRow = $this->getHighestRow();\n        $maxCol = Coordinate::columnIndexFromString($maxCol);\n\n        $rangeBlocks = explode(' ', $range);\n        foreach ($rangeBlocks as &$rangeSet) {\n            $rangeBoundaries = Coordinate::getRangeBoundaries($rangeSet);\n\n            if (Coordinate::columnIndexFromString($rangeBoundaries[0][0]) > $maxCol) {\n                $rangeBoundaries[0][0] = Coordinate::stringFromColumnIndex($maxCol);\n            }\n            if ($rangeBoundaries[0][1] > $maxRow) {\n                $rangeBoundaries[0][1] = $maxRow;\n            }\n            if (Coordinate::columnIndexFromString($rangeBoundaries[1][0]) > $maxCol) {\n                $rangeBoundaries[1][0] = Coordinate::stringFromColumnIndex($maxCol);\n            }\n            if ($rangeBoundaries[1][1] > $maxRow) {\n                $rangeBoundaries[1][1] = $maxRow;\n            }\n            $rangeSet = $rangeBoundaries[0][0] . $rangeBoundaries[0][1] . ':' . $rangeBoundaries[1][0] . $rangeBoundaries[1][1];\n        }\n        unset($rangeSet);\n\n        return implode(' ', $rangeBlocks);\n    }\n\n    /**\n     * Get tab color.\n     */\n    public function getTabColor(): Color\n    {\n        if ($this->tabColor === null) {\n            $this->tabColor = new Color();\n        }\n\n        return $this->tabColor;\n    }\n\n    /**\n     * Reset tab color.\n     *\n     * @return $this\n     */\n    public function resetTabColor(): static\n    {\n        $this->tabColor = null;\n\n        return $this;\n    }\n\n    /**\n     * Tab color set?\n     */\n    public function isTabColorSet(): bool\n    {\n        return $this->tabColor !== null;\n    }\n\n    /**\n     * Copy worksheet (!= clone!).\n     */\n    public function copy(): static\n    {\n        return clone $this;\n    }\n\n    /**\n     * Returns a boolean true if the specified row contains no cells. By default, this means that no cell records\n     *          exist in the collection for this row. false will be returned otherwise.\n     *     This rule can be modified by passing a $definitionOfEmptyFlags value:\n     *          1 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL If the only cells in the collection are null value\n     *                  cells, then the row will be considered empty.\n     *          2 - CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are empty\n     *                  string value cells, then the row will be considered empty.\n     *          3 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL\n     *                  If the only cells in the collection are null value or empty string value cells, then the row\n     *                  will be considered empty.\n     *\n     * @param int $definitionOfEmptyFlags\n     *              Possible Flag Values are:\n     *                  CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL\n     *                  CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL\n     */\n    public function isEmptyRow(int $rowId, int $definitionOfEmptyFlags = 0): bool\n    {\n        try {\n            $iterator = new RowIterator($this, $rowId, $rowId);\n            $iterator->seek($rowId);\n            $row = $iterator->current();\n        } catch (Exception) {\n            return true;\n        }\n\n        return $row->isEmpty($definitionOfEmptyFlags);\n    }\n\n    /**\n     * Returns a boolean true if the specified column contains no cells. By default, this means that no cell records\n     *          exist in the collection for this column. false will be returned otherwise.\n     *     This rule can be modified by passing a $definitionOfEmptyFlags value:\n     *          1 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL If the only cells in the collection are null value\n     *                  cells, then the column will be considered empty.\n     *          2 - CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are empty\n     *                  string value cells, then the column will be considered empty.\n     *          3 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL\n     *                  If the only cells in the collection are null value or empty string value cells, then the column\n     *                  will be considered empty.\n     *\n     * @param int $definitionOfEmptyFlags\n     *              Possible Flag Values are:\n     *                  CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL\n     *                  CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL\n     */\n    public function isEmptyColumn(string $columnId, int $definitionOfEmptyFlags = 0): bool\n    {\n        try {\n            $iterator = new ColumnIterator($this, $columnId, $columnId);\n            $iterator->seek($columnId);\n            $column = $iterator->current();\n        } catch (Exception) {\n            return true;\n        }\n\n        return $column->isEmpty($definitionOfEmptyFlags);\n    }\n\n    /**\n     * Implement PHP __clone to create a deep clone, not just a shallow copy.\n     */\n    public function __clone()\n    {\n        foreach (get_object_vars($this) as $key => $val) {\n            if ($key == 'parent') {\n                continue;\n            }\n\n            if (is_object($val) || (is_array($val))) {\n                if ($key === 'cellCollection') {\n                    $newCollection = $this->cellCollection->cloneCellCollection($this);\n                    $this->cellCollection = $newCollection;\n                } elseif ($key === 'drawingCollection') {\n                    $currentCollection = $this->drawingCollection;\n                    $this->drawingCollection = new ArrayObject();\n                    foreach ($currentCollection as $item) {\n                        $newDrawing = clone $item;\n                        $newDrawing->setWorksheet($this);\n                    }\n                } elseif ($key === 'inCellDrawingCollection') {\n                    $currentCollection = $this->inCellDrawingCollection;\n                    $this->inCellDrawingCollection = new ArrayObject();\n                    foreach ($currentCollection as $item) {\n                        $newDrawing = clone $item;\n                        $newDrawing->setWorksheet($this);\n                    }\n                } elseif ($key === 'tableCollection') {\n                    $currentCollection = $this->tableCollection;\n                    $this->tableCollection = new ArrayObject();\n                    foreach ($currentCollection as $item) {\n                        $newTable = clone $item;\n                        $newTable->setName($item->getName() . 'clone');\n                        $this->addTable($newTable);\n                    }\n                } elseif ($key === 'chartCollection') {\n                    $currentCollection = $this->chartCollection;\n                    $this->chartCollection = new ArrayObject();\n                    foreach ($currentCollection as $item) {\n                        $newChart = clone $item;\n                        $this->addChart($newChart);\n                    }\n                } elseif ($key === 'autoFilter') {\n                    $newAutoFilter = clone $this->autoFilter;\n                    $this->autoFilter = $newAutoFilter;\n                    $this->autoFilter->setParent($this);\n                } else {\n                    $this->{$key} = unserialize(serialize($val));\n                }\n            }\n        }\n    }\n\n    /**\n     * Define the code name of the sheet.\n     *\n     * @param string $codeName Same rule as Title minus space not allowed (but, like Excel, change\n     *                       silently space to underscore)\n     * @param bool $validate False to skip validation of new title. WARNING: This should only be set\n     *                       at parse time (by Readers), where titles can be assumed to be valid.\n     *\n     * @return $this\n     */\n    public function setCodeName(string $codeName, bool $validate = true): static\n    {\n        // Is this a 'rename' or not?\n        if ($this->getCodeName() == $codeName) {\n            return $this;\n        }\n\n        if ($validate) {\n            $codeName = str_replace(' ', '_', $codeName); //Excel does this automatically without flinching, we are doing the same\n\n            // Syntax check\n            // throw an exception if not valid\n            self::checkSheetCodeName($codeName);\n\n            // We use the same code that setTitle to find a valid codeName else not using a space (Excel don't like) but a '_'\n\n            if ($this->parent !== null) {\n                // Is there already such sheet name?\n                if ($this->parent->sheetCodeNameExists($codeName)) {\n                    // Use name, but append with lowest possible integer\n\n                    if (StringHelper::countCharacters($codeName) > 29) {\n                        $codeName = StringHelper::substring($codeName, 0, 29);\n                    }\n                    $i = 1;\n                    while ($this->getParentOrThrow()->sheetCodeNameExists($codeName . '_' . $i)) {\n                        ++$i;\n                        if ($i == 10) {\n                            if (StringHelper::countCharacters($codeName) > 28) {\n                                $codeName = StringHelper::substring($codeName, 0, 28);\n                            }\n                        } elseif ($i == 100) {\n                            if (StringHelper::countCharacters($codeName) > 27) {\n                                $codeName = StringHelper::substring($codeName, 0, 27);\n                            }\n                        }\n                    }\n\n                    $codeName .= '_' . $i; // ok, we have a valid name\n                }\n            }\n        }\n\n        $this->codeName = $codeName;\n\n        return $this;\n    }\n\n    /**\n     * Return the code name of the sheet.\n     */\n    public function getCodeName(): ?string\n    {\n        return $this->codeName;\n    }\n\n    /**\n     * Sheet has a code name ?\n     */\n    public function hasCodeName(): bool\n    {\n        return $this->codeName !== null;\n    }\n\n    public static function nameRequiresQuotes(string $sheetName): bool\n    {\n        return !Preg::isMatch(self::SHEET_NAME_REQUIRES_NO_QUOTES, $sheetName);\n    }\n\n    public function isRowVisible(int $row): bool\n    {\n        return !$this->rowDimensionExists($row) || $this->getRowDimension($row)->getVisible();\n    }\n\n    /**\n     * Same as Cell->isLocked, but without creating cell if it doesn't exist.\n     */\n    public function isCellLocked(string $coordinate): bool\n    {\n        if ($this->getProtection()->getsheet() !== true) {\n            return false;\n        }\n        if ($this->cellExists($coordinate)) {\n            return $this->getCell($coordinate)->isLocked();\n        }\n        $spreadsheet = $this->parent;\n        $xfIndex = $this->getXfIndex($coordinate);\n        if ($spreadsheet === null || $xfIndex === null) {\n            return true;\n        }\n\n        return $spreadsheet->getCellXfByIndex($xfIndex)->getProtection()->getLocked() !== StyleProtection::PROTECTION_UNPROTECTED;\n    }\n\n    /**\n     * Same as Cell->isHiddenOnFormulaBar, but without creating cell if it doesn't exist.\n     */\n    public function isCellHiddenOnFormulaBar(string $coordinate): bool\n    {\n        if ($this->cellExists($coordinate)) {\n            return $this->getCell($coordinate)->isHiddenOnFormulaBar();\n        }\n\n        // cell doesn't exist, therefore isn't a formula,\n        // therefore isn't hidden on formula bar.\n        return false;\n    }\n\n    private function getXfIndex(string $coordinate): ?int\n    {\n        [$column, $row] = Coordinate::coordinateFromString($coordinate);\n        $row = (int) $row;\n        $xfIndex = null;\n        if ($this->rowDimensionExists($row)) {\n            $xfIndex = $this->getRowDimension($row)->getXfIndex();\n        }\n        if ($xfIndex === null && $this->ColumnDimensionExists($column)) {\n            $xfIndex = $this->getColumnDimension($column)->getXfIndex();\n        }\n\n        return $xfIndex;\n    }\n\n    private string $backgroundImage = '';\n\n    private string $backgroundMime = '';\n\n    private string $backgroundExtension = '';\n\n    public function getBackgroundImage(): string\n    {\n        return $this->backgroundImage;\n    }\n\n    public function getBackgroundMime(): string\n    {\n        return $this->backgroundMime;\n    }\n\n    public function getBackgroundExtension(): string\n    {\n        return $this->backgroundExtension;\n    }\n\n    /**\n     * Set background image.\n     * Used on read/write for Xlsx.\n     * Used on write for Html.\n     *\n     * @param string $backgroundImage Image represented as a string, e.g. results of file_get_contents\n     */\n    public function setBackgroundImage(string $backgroundImage): self\n    {\n        $imageArray = getimagesizefromstring($backgroundImage) ?: ['mime' => ''];\n        $mime = $imageArray['mime'];\n        if ($mime !== '') {\n            $extension = explode('/', $mime);\n            $extension = $extension[1];\n            $this->backgroundImage = $backgroundImage;\n            $this->backgroundMime = $mime;\n            $this->backgroundExtension = $extension;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Copy cells, adjusting relative cell references in formulas.\n     * Acts similarly to Excel \"fill handle\" feature.\n     *\n     * @param string $fromCell Single source cell, e.g. C3\n     * @param string $toCells Single cell or cell range, e.g. C4 or C4:C10\n     * @param bool $copyStyle Copy styles as well as values, defaults to true\n     */\n    public function copyCells(string $fromCell, string $toCells, bool $copyStyle = true): void\n    {\n        $toArray = Coordinate::extractAllCellReferencesInRange($toCells);\n        $valueString = $this->getCell($fromCell)->getValueString();\n        /** @var mixed[][] */\n        $style = $this->getStyle($fromCell)->exportArray();\n        $fromIndexes = Coordinate::indexesFromString($fromCell);\n        $referenceHelper = ReferenceHelper::getInstance();\n        foreach ($toArray as $destination) {\n            if ($destination !== $fromCell) {\n                $toIndexes = Coordinate::indexesFromString($destination);\n                $this->getCell($destination)->setValue($referenceHelper->updateFormulaReferences($valueString, 'A1', $toIndexes[0] - $fromIndexes[0], $toIndexes[1] - $fromIndexes[1]));\n                if ($copyStyle) {\n                    $this->getCell($destination)->getStyle()->applyFromArray($style);\n                }\n            }\n        }\n    }\n\n    public function calculateArrays(bool $preCalculateFormulas = true): void\n    {\n        if ($preCalculateFormulas && Calculation::getInstance($this->parent)->getInstanceArrayReturnType() === Calculation::RETURN_ARRAY_AS_ARRAY) {\n            $keys = $this->cellCollection->getCoordinates();\n            foreach ($keys as $key) {\n                if ($this->getCell($key)->getDataType() === DataType::TYPE_FORMULA) {\n                    if (!Preg::isMatch(self::FUNCTION_LIKE_GROUPBY, $this->getCell($key)->getValueString())) {\n                        $this->getCell($key)->getCalculatedValue();\n                    }\n                }\n            }\n        }\n    }\n\n    public function isCellInSpillRange(string $coordinate): bool\n    {\n        if (Calculation::getInstance($this->parent)->getInstanceArrayReturnType() !== Calculation::RETURN_ARRAY_AS_ARRAY) {\n            return false;\n        }\n        $this->calculateArrays();\n        $keys = $this->cellCollection->getCoordinates();\n        foreach ($keys as $key) {\n            $attributes = $this->getCell($key)->getFormulaAttributes();\n            if (isset($attributes['ref'])) {\n                if (Coordinate::coordinateIsInsideRange($attributes['ref'], $coordinate)) {\n                    // false for first cell in range, true otherwise\n                    return $coordinate !== $key;\n                }\n            }\n        }\n\n        return false;\n    }\n\n    /** @param mixed[][] $styleArray */\n    public function applyStylesFromArray(string $coordinate, array $styleArray): bool\n    {\n        $spreadsheet = $this->parent;\n        if ($spreadsheet === null) {\n            return false;\n        }\n        $activeSheetIndex = $spreadsheet->getActiveSheetIndex();\n        $originalSelected = $this->selectedCells;\n        $this->getStyle($coordinate)->applyFromArray($styleArray);\n        $this->setSelectedCells($originalSelected);\n        if ($activeSheetIndex >= 0) {\n            $spreadsheet->setActiveSheetIndex($activeSheetIndex);\n        }\n\n        return true;\n    }\n\n    public function copyFormula(string $fromCell, string $toCell): void\n    {\n        $formula = $this->getCell($fromCell)->getValue();\n        $newFormula = $formula;\n        if (is_string($formula) && $this->getCell($fromCell)->getDataType() === DataType::TYPE_FORMULA) {\n            [$fromColInt, $fromRow] = Coordinate::indexesFromString($fromCell);\n            [$toColInt, $toRow] = Coordinate::indexesFromString($toCell);\n            $helper = ReferenceHelper::getInstance();\n            $newFormula = $helper->updateFormulaReferences(\n                $formula,\n                'A1',\n                $toColInt - $fromColInt,\n                $toRow - $fromRow\n            );\n        }\n        $this->setCellValue($toCell, $newFormula);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/BaseWriter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nabstract class BaseWriter implements IWriter\n{\n    /**\n     * Write charts that are defined in the workbook?\n     * Identifies whether the Writer should write definitions for any charts that exist in the PhpSpreadsheet object.\n     */\n    protected bool $includeCharts = false;\n\n    /**\n     * Pre-calculate formulas\n     * Forces PhpSpreadsheet to recalculate all formulae in a workbook when saving, so that the pre-calculated values are\n     * immediately available to MS Excel or other office spreadsheet viewer when opening the file.\n     */\n    protected bool $preCalculateFormulas = true;\n\n    /**\n     * Use disk caching where possible?\n     */\n    private bool $useDiskCaching = false;\n\n    /**\n     * Disk caching directory.\n     */\n    private string $diskCachingDirectory = './';\n\n    /**\n     * @var resource\n     */\n    protected $fileHandle;\n\n    private bool $shouldCloseFile;\n\n    public function getIncludeCharts(): bool\n    {\n        return $this->includeCharts;\n    }\n\n    public function setIncludeCharts(bool $includeCharts): self\n    {\n        $this->includeCharts = $includeCharts;\n\n        return $this;\n    }\n\n    public function getPreCalculateFormulas(): bool\n    {\n        return $this->preCalculateFormulas;\n    }\n\n    public function setPreCalculateFormulas(bool $precalculateFormulas): self\n    {\n        $this->preCalculateFormulas = $precalculateFormulas;\n\n        return $this;\n    }\n\n    public function getUseDiskCaching(): bool\n    {\n        return $this->useDiskCaching;\n    }\n\n    public function setUseDiskCaching(bool $useDiskCache, ?string $cacheDirectory = null): self\n    {\n        $this->useDiskCaching = $useDiskCache;\n\n        if ($cacheDirectory !== null) {\n            if (is_dir($cacheDirectory)) {\n                $this->diskCachingDirectory = $cacheDirectory;\n            } else {\n                throw new Exception(\"Directory does not exist: $cacheDirectory\");\n            }\n        }\n\n        return $this;\n    }\n\n    public function getDiskCachingDirectory(): string\n    {\n        return $this->diskCachingDirectory;\n    }\n\n    protected function processFlags(int $flags): void\n    {\n        if (((bool) ($flags & self::SAVE_WITH_CHARTS)) === true) {\n            $this->setIncludeCharts(true);\n        }\n        if (((bool) ($flags & self::DISABLE_PRECALCULATE_FORMULAE)) === true) {\n            $this->setPreCalculateFormulas(false);\n        }\n    }\n\n    /**\n     * Open file handle.\n     *\n     * @param resource|string $filename\n     */\n    public function openFileHandle($filename): void\n    {\n        if (!is_string($filename)) {\n            $this->fileHandle = $filename;\n            $this->shouldCloseFile = false;\n\n            return;\n        }\n\n        $mode = 'wb';\n        $scheme = parse_url($filename, PHP_URL_SCHEME);\n        if ($scheme === 's3') {\n            // @codeCoverageIgnoreStart\n            $mode = 'w';\n            // @codeCoverageIgnoreEnd\n        }\n        $fileHandle = $filename ? fopen($filename, $mode) : false;\n        if ($fileHandle === false) {\n            throw new Exception('Could not open file \"' . $filename . '\" for writing.');\n        }\n\n        $this->fileHandle = $fileHandle;\n        $this->shouldCloseFile = true;\n    }\n\n    protected function tryClose(): bool\n    {\n        return fclose($this->fileHandle);\n    }\n\n    /**\n     * Close file handle only if we opened it ourselves.\n     */\n    protected function maybeCloseFileHandle(): void\n    {\n        if ($this->shouldCloseFile) {\n            if (!$this->tryClose()) {\n                throw new Exception('Could not close file after writing.');\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Csv.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass Csv extends BaseWriter\n{\n    /**\n     * PhpSpreadsheet object.\n     */\n    private Spreadsheet $spreadsheet;\n\n    /**\n     * Delimiter.\n     */\n    private string $delimiter = ',';\n\n    /**\n     * Enclosure.\n     */\n    private string $enclosure = '\"';\n\n    /**\n     * Line ending.\n     */\n    private string $lineEnding = PHP_EOL;\n\n    /**\n     * Sheet index to write.\n     */\n    private int $sheetIndex = 0;\n\n    /**\n     * Whether to write a UTF8 BOM.\n     */\n    private bool $useBOM = false;\n\n    /**\n     * Whether to write a Separator line as the first line of the file\n     *     sep=x.\n     */\n    private bool $includeSeparatorLine = false;\n\n    /**\n     * Whether to write a fully Excel compatible CSV file.\n     */\n    private bool $excelCompatibility = false;\n\n    /**\n     * Output encoding.\n     */\n    private string $outputEncoding = '';\n\n    /**\n     * Whether number of columns should be allowed to vary\n     * between rows, or use a fixed range based on the max\n     * column overall.\n     */\n    private bool $variableColumns = false;\n\n    private bool $preferHyperlinkToLabel = false;\n\n    /**\n     * Create a new CSV.\n     */\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n    }\n\n    /**\n     * Save PhpSpreadsheet to file.\n     *\n     * @param resource|string $filename\n     */\n    public function save($filename, int $flags = 0): void\n    {\n        $this->processFlags($flags);\n\n        // Fetch sheet\n        $sheet = $this->spreadsheet->getSheet($this->sheetIndex);\n\n        $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog();\n        Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false);\n        $sheet->calculateArrays($this->preCalculateFormulas);\n\n        // Open file\n        $this->openFileHandle($filename);\n\n        if ($this->excelCompatibility) {\n            $this->setUseBOM(true); //  Enforce UTF-8 BOM Header\n            $this->setIncludeSeparatorLine(true); //  Set separator line\n            $this->setEnclosure('\"'); //  Set enclosure to \"\n            $this->setDelimiter(';'); //  Set delimiter to a semicolon\n            $this->setLineEnding(\"\\r\\n\");\n        }\n\n        if ($this->useBOM) {\n            // Write the UTF-8 BOM code if required\n            fwrite($this->fileHandle, \"\\xEF\\xBB\\xBF\");\n        }\n\n        if ($this->includeSeparatorLine) {\n            // Write the separator line if required\n            fwrite($this->fileHandle, 'sep=' . $this->getDelimiter() . $this->lineEnding);\n        }\n\n        //    Identify the range that we need to extract from the worksheet\n        $maxCol = $sheet->getHighestDataColumn();\n        $maxRow = $sheet->getHighestDataRow();\n\n        // Write rows to file\n        $row = 0;\n        foreach ($sheet->rangeToArrayYieldRows(\"A1:$maxCol$maxRow\", '', $this->preCalculateFormulas) as $cellsArray) {\n            ++$row;\n            if ($this->variableColumns) {\n                $column = $sheet->getHighestDataColumn($row);\n                if ($column === 'A' && !$sheet->cellExists(\"A$row\")) {\n                    $cellsArray = [];\n                } else {\n                    array_splice($cellsArray, Coordinate::columnIndexFromString($column));\n                }\n            }\n            if ($this->preferHyperlinkToLabel) {\n                foreach ($cellsArray as $key => $value) {\n                    $url = $sheet->getCell([$key + 1, $row])->getHyperlink()->getUrl();\n                    if ($url !== '') {\n                        $cellsArray[$key] = $url;\n                    }\n                }\n            }\n            /** @var string[] $cellsArray */\n            $this->writeLine($this->fileHandle, $cellsArray);\n        }\n\n        $this->maybeCloseFileHandle();\n        Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog);\n    }\n\n    public function getDelimiter(): string\n    {\n        return $this->delimiter;\n    }\n\n    public function setDelimiter(string $delimiter): self\n    {\n        $this->delimiter = $delimiter;\n\n        return $this;\n    }\n\n    public function getEnclosure(): string\n    {\n        return $this->enclosure;\n    }\n\n    public function setEnclosure(string $enclosure = '\"'): self\n    {\n        $this->enclosure = $enclosure;\n\n        return $this;\n    }\n\n    public function getLineEnding(): string\n    {\n        return $this->lineEnding;\n    }\n\n    public function setLineEnding(string $lineEnding): self\n    {\n        $this->lineEnding = $lineEnding;\n\n        return $this;\n    }\n\n    /**\n     * Get whether BOM should be used.\n     */\n    public function getUseBOM(): bool\n    {\n        return $this->useBOM;\n    }\n\n    /**\n     * Set whether BOM should be used, typically when non-ASCII characters are used.\n     */\n    public function setUseBOM(bool $useBOM): self\n    {\n        $this->useBOM = $useBOM;\n\n        return $this;\n    }\n\n    /**\n     * Get whether a separator line should be included.\n     */\n    public function getIncludeSeparatorLine(): bool\n    {\n        return $this->includeSeparatorLine;\n    }\n\n    /**\n     * Set whether a separator line should be included as the first line of the file.\n     */\n    public function setIncludeSeparatorLine(bool $includeSeparatorLine): self\n    {\n        $this->includeSeparatorLine = $includeSeparatorLine;\n\n        return $this;\n    }\n\n    /**\n     * Get whether the file should be saved with full Excel Compatibility.\n     */\n    public function getExcelCompatibility(): bool\n    {\n        return $this->excelCompatibility;\n    }\n\n    /**\n     * Set whether the file should be saved with full Excel Compatibility.\n     *\n     * @param bool $excelCompatibility Set the file to be written as a fully Excel compatible csv file\n     *                                Note that this overrides other settings such as useBOM, enclosure and delimiter\n     */\n    public function setExcelCompatibility(bool $excelCompatibility): self\n    {\n        $this->excelCompatibility = $excelCompatibility;\n\n        return $this;\n    }\n\n    public function getSheetIndex(): int\n    {\n        return $this->sheetIndex;\n    }\n\n    public function setSheetIndex(int $sheetIndex): self\n    {\n        $this->sheetIndex = $sheetIndex;\n\n        return $this;\n    }\n\n    public function getOutputEncoding(): string\n    {\n        return $this->outputEncoding;\n    }\n\n    public function setOutputEncoding(string $outputEncoding): self\n    {\n        $this->outputEncoding = $outputEncoding;\n\n        return $this;\n    }\n\n    private bool $enclosureRequired = true;\n\n    public function setEnclosureRequired(bool $value): self\n    {\n        $this->enclosureRequired = $value;\n\n        return $this;\n    }\n\n    public function getEnclosureRequired(): bool\n    {\n        return $this->enclosureRequired;\n    }\n\n    /**\n     * Write line to CSV file.\n     *\n     * @param resource $fileHandle PHP filehandle\n     * @param string[] $values Array containing values in a row\n     */\n    private function writeLine($fileHandle, array $values): void\n    {\n        // No leading delimiter\n        $delimiter = '';\n\n        // Build the line\n        $line = '';\n\n        foreach ($values as $element) {\n            if (Preg::isMatch('/^([+-])?(\\d+)[.](\\d+)/', $element, $matches)) {\n                // Excel will \"convert\" file with pop-up\n                // if there are more than 15 digits precision.\n                $whole = $matches[2];\n                if ($whole !== '0') {\n                    $wholeLen = strlen($whole);\n                    $frac = $matches[3];\n                    $maxFracLen = 15 - $wholeLen;\n                    if ($maxFracLen >= 0 && strlen($frac) > $maxFracLen) {\n                        $result = sprintf(\"%.{$maxFracLen}F\", $element);\n                        if (str_contains($result, '.')) {\n                            $element = Preg::replace('/[.]?0+$/', '', $result); // strip trailing zeros\n                        }\n                    }\n                }\n            }\n            // Add delimiter\n            $line .= $delimiter;\n            $delimiter = $this->delimiter;\n            // Escape enclosures\n            $enclosure = $this->enclosure;\n            if ($enclosure) {\n                // If enclosure is not required, use enclosure only if\n                // element contains newline, delimiter, or enclosure.\n                if (!$this->enclosureRequired && strpbrk($element, \"$delimiter$enclosure\\n\") === false) {\n                    $enclosure = '';\n                } else {\n                    $element = str_replace($enclosure, $enclosure . $enclosure, $element);\n                }\n            }\n            // Add enclosed string\n            $line .= $enclosure . $element . $enclosure;\n        }\n\n        // Add line ending\n        $line .= $this->lineEnding;\n\n        // Write to file\n        if ($this->outputEncoding != '') {\n            $line = (string) mb_convert_encoding($line, $this->outputEncoding);\n        }\n        fwrite($fileHandle, $line);\n    }\n\n    /**\n     * Get whether number of columns should be allowed to vary\n     * between rows, or use a fixed range based on the max\n     * column overall.\n     */\n    public function getVariableColumns(): bool\n    {\n        return $this->variableColumns;\n    }\n\n    /**\n     * Set whether number of columns should be allowed to vary\n     * between rows, or use a fixed range based on the max\n     * column overall.\n     */\n    public function setVariableColumns(bool $pValue): self\n    {\n        $this->variableColumns = $pValue;\n\n        return $this;\n    }\n\n    /**\n     * Get whether hyperlink or label should be output.\n     */\n    public function getPreferHyperlinkToLabel(): bool\n    {\n        return $this->preferHyperlinkToLabel;\n    }\n\n    /**\n     * Set whether hyperlink or label should be output.\n     */\n    public function setPreferHyperlinkToLabel(bool $preferHyperlinkToLabel): self\n    {\n        $this->preferHyperlinkToLabel = $preferHyperlinkToLabel;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Exception.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\n\nclass Exception extends PhpSpreadsheetException\n{\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Html.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\Run;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Drawing as SharedDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Font as SharedFont;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\MergedCellStyle;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Html extends BaseWriter\n{\n    private const DEFAULT_CELL_WIDTH_POINTS = 42;\n\n    private const DEFAULT_CELL_WIDTH_PIXELS = 56;\n\n    /**\n     * Migration aid to tell if html tags will be treated as plaintext in comments.\n     *     if (\n     *         defined(\n     *             \\PhpOffice\\PhpSpreadsheet\\Writer\\Html::class\n     *             . '::COMMENT_HTML_TAGS_PLAINTEXT'\n     *         )\n     *     ) {\n     *         new logic with styling in TextRun elements\n     *     } else {\n     *         old logic with styling via Html tags\n     *     }.\n     */\n    public const COMMENT_HTML_TAGS_PLAINTEXT = true;\n\n    private const BRX = '<br          />';\n\n    /**\n     * Spreadsheet object.\n     */\n    protected Spreadsheet $spreadsheet;\n\n    /**\n     * Sheet index to write.\n     */\n    private ?int $sheetIndex = 0;\n\n    /**\n     * Images root.\n     */\n    private string $imagesRoot = '';\n\n    /**\n     * embed images, or link to images.\n     */\n    protected bool $embedImages = false;\n\n    protected string $lineEnding = PHP_EOL;\n\n    public function getLineEnding(): string\n    {\n        return $this->lineEnding;\n    }\n\n    public function setLineEnding(string $lineEnding): self\n    {\n        if ($lineEnding != \"\\n\" && $lineEnding !== \"\\r\\n\") {\n            throw new Exception('Line ending must be \\n (Unix) or \\r\\n (Windows)');\n        }\n        $this->lineEnding = $lineEnding;\n\n        return $this;\n    }\n\n    protected bool $dataFormula = false;\n\n    public function setDataFormula(bool $dataFormula): self\n    {\n        $this->dataFormula = $dataFormula;\n\n        return $this;\n    }\n\n    /**\n     * Use inline CSS?\n     */\n    private bool $useInlineCss = false;\n\n    /**\n     * Array of CSS styles.\n     *\n     * @var string[][]\n     */\n    private ?array $cssStyles = null;\n\n    /**\n     * Array of column widths in points.\n     *\n     * @var array<array<float|int>>\n     */\n    private array $columnWidths;\n\n    /**\n     * Default font.\n     */\n    private Font $defaultFont;\n\n    /**\n     * Flag whether spans have been calculated.\n     */\n    private bool $spansAreCalculated = false;\n\n    /**\n     * Excel cells that should not be written as HTML cells.\n     *\n     * @var mixed[][][][]\n     */\n    private array $isSpannedCell = [];\n\n    /**\n     * Excel cells that are upper-left corner in a cell merge.\n     *\n     * @var int[][][][]\n     */\n    private array $isBaseCell = [];\n\n    /**\n     * Is the current writer creating PDF?\n     */\n    protected bool $isPdf = false;\n\n    /**\n     * Generate the Navigation block.\n     */\n    private bool $generateSheetNavigationBlock = true;\n\n    /**\n     * Callback for editing generated html.\n     *\n     * @var null|callable(string): string\n     */\n    private $editHtmlCallback;\n\n    /** @var BaseDrawing[] */\n    private $sheetDrawings;\n\n    /** @var Chart[] */\n    private $sheetCharts;\n\n    private bool $betterBoolean = true;\n\n    private string $getTrue = 'TRUE';\n\n    private string $getFalse = 'FALSE';\n\n    protected bool $rtlSheets = false;\n\n    protected bool $ltrSheets = false;\n\n    /**\n     * Table formats\n     * Enables table formats in writer, disabled here, must be enabled in writer via a setter.\n     */\n    protected bool $tableFormats = false;\n\n    /**\n     * Table formats for unstyled tables.\n     * Enables default style for builtin table formats.\n     * If null, it takes on the same value as $tableFormats.\n     */\n    protected ?bool $tableFormatsBuiltin = null;\n\n    /**\n     * Conditional Formatting\n     * Enables conditional formatting in writer, disabled here, must be enabled in writer via a setter.\n     */\n    protected bool $conditionalFormatting = false;\n\n    /**\n     * Create a new HTML.\n     */\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n        $this->defaultFont = $this->spreadsheet->getDefaultStyle()->getFont();\n        $calc = Calculation::getInstance($this->spreadsheet);\n        $this->getTrue = $calc->getTRUE();\n        $this->getFalse = $calc->getFALSE();\n    }\n\n    /**\n     * Save Spreadsheet to file.\n     *\n     * @param resource|string $filename\n     */\n    public function save($filename, int $flags = 0): void\n    {\n        $this->processFlags($flags);\n        // Open file\n        $this->openFileHandle($filename);\n        // Write html\n        fwrite($this->fileHandle, $this->generateHTMLAll());\n        // Close file\n        $this->maybeCloseFileHandle();\n    }\n\n    protected function checkRtlAndLtr(): void\n    {\n        $this->rtlSheets = false;\n        $this->ltrSheets = false;\n        if ($this->sheetIndex === null) {\n            foreach ($this->spreadsheet->getAllSheets() as $sheet) {\n                if ($sheet->getRightToLeft()) {\n                    $this->rtlSheets = true;\n                } else {\n                    $this->ltrSheets = true;\n                }\n            }\n        } else {\n            if ($this->spreadsheet->getSheet($this->sheetIndex)->getRightToLeft()) {\n                $this->rtlSheets = true;\n            }\n        }\n    }\n\n    /**\n     * Save Spreadsheet as html to variable.\n     */\n    public function generateHtmlAll(): string\n    {\n        $this->checkRtlAndLtr();\n        $sheets = $this->generateSheetPrep();\n        foreach ($sheets as $sheet) {\n            $sheet->calculateArrays($this->preCalculateFormulas);\n        }\n        // garbage collect\n        $this->spreadsheet->garbageCollect();\n\n        $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog();\n        Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false);\n\n        // Build CSS\n        $this->buildCSS(!$this->useInlineCss);\n\n        $html = '';\n\n        // Write headers\n        $html .= $this->generateHTMLHeader(!$this->useInlineCss);\n\n        // Write navigation (tabs)\n        if ((!$this->isPdf) && ($this->generateSheetNavigationBlock)) {\n            $html .= $this->generateNavigation();\n        }\n\n        // Write data\n        $html .= $this->generateSheetData();\n\n        // Write footer\n        $html .= $this->generateHTMLFooter();\n        if ($this instanceof Pdf\\Mpdf) {\n            $html = str_replace(self::BRX, '<br />', $html);\n        } else {\n            $html = str_replace(self::BRX, '<br />' . $this->lineEnding, $html);\n        }\n        $callback = $this->editHtmlCallback;\n        if ($callback) {\n            $html = $callback($html);\n        }\n\n        Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog);\n\n        return $html;\n    }\n\n    /**\n     * Set a callback to edit the entire HTML.\n     *\n     * The callback must accept the HTML as string as first parameter,\n     * and it must return the edited HTML as string.\n     */\n    public function setEditHtmlCallback(?callable $callback): void\n    {\n        $this->editHtmlCallback = $callback;\n    }\n\n    /**\n     * Map VAlign.\n     *\n     * @param string $vAlign Vertical alignment\n     */\n    private function mapVAlign(string $vAlign): string\n    {\n        return Alignment::VERTICAL_ALIGNMENT_FOR_HTML[$vAlign] ?? '';\n    }\n\n    /**\n     * Map HAlign.\n     *\n     * @param string $hAlign Horizontal alignment\n     */\n    private function mapHAlign(string $hAlign): string\n    {\n        return Alignment::HORIZONTAL_ALIGNMENT_FOR_HTML[$hAlign] ?? '';\n    }\n\n    const BORDER_NONE = 'none';\n    const BORDER_ARR = [\n        Border::BORDER_NONE => self::BORDER_NONE,\n        Border::BORDER_DASHDOT => '1px dashed',\n        Border::BORDER_DASHDOTDOT => '1px dotted',\n        Border::BORDER_DASHED => '1px dashed',\n        Border::BORDER_DOTTED => '1px dotted',\n        Border::BORDER_DOUBLE => '3px double',\n        Border::BORDER_HAIR => '1px solid',\n        Border::BORDER_MEDIUM => '2px solid',\n        Border::BORDER_MEDIUMDASHDOT => '2px dashed',\n        Border::BORDER_MEDIUMDASHDOTDOT => '2px dotted',\n        Border::BORDER_SLANTDASHDOT => '2px dashed',\n        Border::BORDER_THICK => '3px solid',\n    ];\n\n    /**\n     * Map border style.\n     *\n     * @param int|string $borderStyle Sheet index\n     */\n    private function mapBorderStyle($borderStyle): string\n    {\n        return self::BORDER_ARR[$borderStyle] ?? '1px solid';\n    }\n\n    /**\n     * Get sheet index.\n     */\n    public function getSheetIndex(): ?int\n    {\n        return $this->sheetIndex;\n    }\n\n    /**\n     * Set sheet index.\n     *\n     * @param int $sheetIndex Sheet index\n     *\n     * @return $this\n     */\n    public function setSheetIndex(int $sheetIndex): static\n    {\n        $this->sheetIndex = $sheetIndex;\n\n        return $this;\n    }\n\n    /**\n     * Get sheet index.\n     */\n    public function getGenerateSheetNavigationBlock(): bool\n    {\n        return $this->generateSheetNavigationBlock;\n    }\n\n    /**\n     * Set sheet index.\n     *\n     * @param bool $generateSheetNavigationBlock Flag indicating whether the sheet navigation block should be generated or not\n     *\n     * @return $this\n     */\n    public function setGenerateSheetNavigationBlock(bool $generateSheetNavigationBlock): static\n    {\n        $this->generateSheetNavigationBlock = (bool) $generateSheetNavigationBlock;\n\n        return $this;\n    }\n\n    /**\n     * Write all sheets (resets sheetIndex to NULL).\n     *\n     * @return $this\n     */\n    public function writeAllSheets(): static\n    {\n        $this->sheetIndex = null;\n\n        return $this;\n    }\n\n    private function generateMeta(?string $val, string $desc): string\n    {\n        return ($val || $val === '0')\n            ? ('      <meta name=\"' . $desc . '\" content=\"' . htmlspecialchars($val, Settings::htmlEntityFlags()) . '\" />' . $this->lineEnding)\n            : '';\n    }\n\n    /** @deprecated 5.4.0 No replacement. */\n    public const BODY_LINE = '  <body>' . PHP_EOL;\n\n    private const CUSTOM_TO_META = [\n        Properties::PROPERTY_TYPE_BOOLEAN => 'bool',\n        Properties::PROPERTY_TYPE_DATE => 'date',\n        Properties::PROPERTY_TYPE_FLOAT => 'float',\n        Properties::PROPERTY_TYPE_INTEGER => 'int',\n        Properties::PROPERTY_TYPE_STRING => 'string',\n    ];\n\n    /**\n     * Generate HTML header.\n     *\n     * @param bool $includeStyles Include styles?\n     */\n    public function generateHTMLHeader(bool $includeStyles = false): string\n    {\n        // Construct HTML\n        $properties = $this->spreadsheet->getProperties();\n        $html = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">' . $this->lineEnding;\n        $rtl = ($this->rtlSheets && !$this->ltrSheets) ? \" dir='rtl'\" : '';\n        $html .= '<html xmlns=\"http://www.w3.org/1999/xhtml\"' . $rtl . '>' . $this->lineEnding;\n        $html .= '  <head>' . $this->lineEnding;\n        $html .= '      <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />' . $this->lineEnding;\n        $html .= '      <meta name=\"generator\" content=\"PhpSpreadsheet, https://github.com/PHPOffice/PhpSpreadsheet\" />' . $this->lineEnding;\n        $title = $properties->getTitle();\n        if ($title === '') {\n            $title = $this->spreadsheet->getActiveSheet()->getTitle();\n        }\n        $html .= '      <title>' . htmlspecialchars($title, Settings::htmlEntityFlags()) . '</title>' . $this->lineEnding;\n        $html .= $this->generateMeta($properties->getCreator(), 'author');\n        $html .= $this->generateMeta($properties->getTitle(), 'title');\n        $html .= $this->generateMeta($properties->getDescription(), 'description');\n        $html .= $this->generateMeta($properties->getSubject(), 'subject');\n        $html .= $this->generateMeta($properties->getKeywords(), 'keywords');\n        $html .= $this->generateMeta($properties->getCategory(), 'category');\n        $html .= $this->generateMeta($properties->getCompany(), 'company');\n        $html .= $this->generateMeta($properties->getManager(), 'manager');\n        $html .= $this->generateMeta($properties->getLastModifiedBy(), 'lastModifiedBy');\n        $html .= $this->generateMeta($properties->getViewport(), 'viewport');\n        $date = Date::dateTimeFromTimestamp((string) $properties->getCreated());\n        $date->setTimeZone(Date::getDefaultOrLocalTimeZone());\n        $html .= $this->generateMeta($date->format(DATE_W3C), 'created');\n        $date = Date::dateTimeFromTimestamp((string) $properties->getModified());\n        $date->setTimeZone(Date::getDefaultOrLocalTimeZone());\n        $html .= $this->generateMeta($date->format(DATE_W3C), 'modified');\n\n        $customProperties = $properties->getCustomProperties();\n        foreach ($customProperties as $customProperty) {\n            $propertyValue = $properties->getCustomPropertyValue($customProperty);\n            $propertyType = $properties->getCustomPropertyType($customProperty);\n            $propertyQualifier = self::CUSTOM_TO_META[$propertyType] ?? null;\n            if ($propertyQualifier !== null) {\n                if ($propertyType === Properties::PROPERTY_TYPE_BOOLEAN) {\n                    $propertyValue = $propertyValue ? '1' : '0';\n                } elseif ($propertyType === Properties::PROPERTY_TYPE_DATE) {\n                    $date = Date::dateTimeFromTimestamp((string) $propertyValue);\n                    $date->setTimeZone(Date::getDefaultOrLocalTimeZone());\n                    $propertyValue = $date->format(DATE_W3C);\n                } else {\n                    $propertyValue = (string) $propertyValue;\n                }\n                $html .= $this->generateMeta($propertyValue, htmlspecialchars(\"custom.$propertyQualifier.$customProperty\"));\n            }\n        }\n\n        if (!empty($properties->getHyperlinkBase())) {\n            $html .= '      <base href=\"' . htmlspecialchars($properties->getHyperlinkBase()) . '\" />' . $this->lineEnding;\n        }\n\n        $html .= $includeStyles ? $this->generateStyles(true) : $this->generatePageDeclarations(true);\n\n        $html .= '  </head>' . $this->lineEnding;\n        $html .= '' . $this->lineEnding;\n        $html .= '  <body>' . $this->lineEnding;\n\n        return $html;\n    }\n\n    /** @return Worksheet[] */\n    private function generateSheetPrep(): array\n    {\n        // Fetch sheets\n        if ($this->sheetIndex === null) {\n            $sheets = $this->spreadsheet->getAllSheets();\n        } else {\n            $sheets = [$this->spreadsheet->getSheet($this->sheetIndex)];\n        }\n\n        return $sheets;\n    }\n\n    /** @return array{int, int, int} */\n    private function generateSheetStarts(Worksheet $sheet, int $rowMin): array\n    {\n        // calculate start of <tbody>, <thead>\n        $tbodyStart = $rowMin;\n        $theadStart = $theadEnd = 0; // default: no <thead>    no </thead>\n        if ($sheet->getPageSetup()->isRowsToRepeatAtTopSet()) {\n            $rowsToRepeatAtTop = $sheet->getPageSetup()->getRowsToRepeatAtTop();\n\n            // we can only support repeating rows that start at top row\n            if ($rowsToRepeatAtTop[0] == 1) {\n                $theadStart = $rowsToRepeatAtTop[0];\n                $theadEnd = $rowsToRepeatAtTop[1];\n                $tbodyStart = $rowsToRepeatAtTop[1] + 1;\n            }\n        }\n\n        return [$theadStart, $theadEnd, $tbodyStart];\n    }\n\n    /** @return array{string, string, string} */\n    private function generateSheetTags(int $row, int $theadStart, int $theadEnd, int $tbodyStart): array\n    {\n        // <thead> ?\n        $startTag = ($row == $theadStart) ? ('        <thead>' . $this->lineEnding) : '';\n        if (!$startTag) {\n            $startTag = ($row == $tbodyStart) ? ('        <tbody>' . $this->lineEnding) : '';\n        }\n        $endTag = ($row == $theadEnd) ? ('        </thead>' . $this->lineEnding) : '';\n        $cellType = ($row >= $tbodyStart) ? 'td' : 'th';\n\n        return [$cellType, $startTag, $endTag];\n    }\n\n    private int $printAreaLowRow = -1;\n\n    private int $printAreaHighRow = -1;\n\n    private int $printAreaLowCol = -1;\n\n    private int $printAreaHighCol = -1;\n\n    /**\n     * Generate sheet data.\n     */\n    public function generateSheetData(): string\n    {\n        // Ensure that Spans have been calculated?\n        $this->calculateSpans();\n        $sheets = $this->generateSheetPrep();\n\n        // Construct HTML\n        $html = '';\n\n        // Loop all sheets\n        $sheetId = 0;\n\n        $activeSheet = $this->spreadsheet->getActiveSheetIndex();\n\n        foreach ($sheets as $sheet) {\n            $this->printAreaLowRow = -1;\n            $this->printAreaHighRow = -1;\n            $this->printAreaLowCol = -1;\n            $this->printAreaHighCol = -1;\n            $printArea = $sheet->getPageSetup()->getPrintArea();\n            if (Preg::isMatch('/^([a-z]+)([0-9]+):([a-z]+)([0-9]+)$/i', $printArea, $matches)) {\n                $this->printAreaLowCol = Coordinate::columnIndexFromString($matches[1]);\n                $this->printAreaHighCol = Coordinate::columnIndexFromString($matches[3]);\n                $this->printAreaLowRow = (int) $matches[2];\n                $this->printAreaHighRow = (int) $matches[4];\n            }\n            // save active cells\n            $selectedCells = $sheet->getSelectedCells();\n            // Write table header\n            $html .= $this->generateTableHeader($sheet);\n            $this->sheetCharts = [];\n            $this->sheetDrawings = [];\n            $condStylesCollection = $sheet->getConditionalStylesCollection();\n            foreach ($condStylesCollection as $condStyles) {\n                foreach ($condStyles as $key => $cs) {\n                    if ($cs->getConditionType() === Conditional::CONDITION_COLORSCALE) {\n                        $cs->getColorScale()?->setScaleArray();\n                    }\n                }\n            }\n            // Get worksheet dimension\n            [$min, $max] = explode(':', $sheet->calculateWorksheetDataDimension());\n            [$minCol, $minRow, $minColString] = Coordinate::indexesFromString($min);\n            [$maxCol, $maxRow] = Coordinate::indexesFromString($max);\n            $this->extendRowsAndColumns($sheet, $maxCol, $maxRow);\n            $this->extendRowsAndColumnsForMerge($sheet, $maxCol, $maxRow);\n\n            [$theadStart, $theadEnd, $tbodyStart] = $this->generateSheetStarts($sheet, $minRow);\n            // Loop through cells\n            $row = $minRow - 1;\n            while ($row++ < $maxRow) {\n                [$cellType, $startTag, $endTag] = $this->generateSheetTags($row, $theadStart, $theadEnd, $tbodyStart);\n                $html .= StringHelper::convertToString($startTag);\n\n                // Write row if there are HTML table cells in it\n                if ($this->shouldGenerateRow($sheet, $row)) {\n                    // Start a new rowData\n                    $rowData = [];\n                    // Loop through columns\n                    $column = $minCol;\n                    $colStr = $minColString;\n                    while ($column <= $maxCol) {\n                        // Cell exists?\n                        $cellAddress = Coordinate::stringFromColumnIndex($column) . $row;\n                        if ($this->shouldGenerateColumn($sheet, $colStr)) {\n                            $rowData[$column] = ($sheet->getCellCollection()->has($cellAddress)) ? $cellAddress : '';\n                        }\n                        ++$column;\n                        /** @var string $colStr */\n                        StringHelper::stringIncrement($colStr);\n                    }\n                    $html .= $this->generateRow($sheet, $rowData, $row - 1, $cellType);\n                }\n\n                $html .= StringHelper::convertToString($endTag);\n            }\n            // Write table footer\n            $html .= $this->generateTableFooter();\n            // Writing PDF?\n            if ($this instanceof Pdf\\Tcpdf && $this->useInlineCss) {\n                if ($this->sheetIndex === null && $sheetId + 1 < $this->spreadsheet->getSheetCount()) {\n                    $html .= '<div style=\"page-break-before:always\" ></div>';\n                }\n            }\n\n            // Next sheet\n            ++$sheetId;\n            $sheet->setSelectedCells($selectedCells);\n        }\n        $this->spreadsheet->setActiveSheetIndex($activeSheet);\n\n        return $html;\n    }\n\n    /**\n     * Generate sheet tabs.\n     */\n    public function generateNavigation(): string\n    {\n        // Fetch sheets\n        $sheets = [];\n        if ($this->sheetIndex === null) {\n            $sheets = $this->spreadsheet->getAllSheets();\n        } else {\n            $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex);\n        }\n\n        // Construct HTML\n        $html = '';\n\n        // Only if there are more than 1 sheets\n        if (count($sheets) > 1) {\n            // Loop all sheets\n            $sheetId = 0;\n\n            $html .= '<ul class=\"navigation\">' . $this->lineEnding;\n\n            foreach ($sheets as $sheet) {\n                $html .= '  <li class=\"sheet' . $sheetId . '\"><a href=\"#sheet' . $sheetId . '\">' . htmlspecialchars($sheet->getTitle()) . '</a></li>' . $this->lineEnding;\n                ++$sheetId;\n            }\n\n            $html .= '</ul>' . $this->lineEnding;\n        }\n\n        return $html;\n    }\n\n    private function extendRowsAndColumns(Worksheet $worksheet, int &$colMax, int &$rowMax): void\n    {\n        if ($this->includeCharts) {\n            foreach ($worksheet->getChartCollection() as $chart) {\n                $chartCoordinates = $chart->getTopLeftPosition();\n                $this->sheetCharts[$chartCoordinates['cell']] = $chart;\n                $chartTL = Coordinate::indexesFromString($chartCoordinates['cell']);\n                if ($chartTL[1] > $rowMax) {\n                    $rowMax = $chartTL[1];\n                }\n                if ($chartTL[0] > $colMax) {\n                    $colMax = $chartTL[0];\n                }\n            }\n        }\n        foreach ($worksheet->getDrawingCollection() as $drawing) {\n            if ($drawing instanceof Drawing && $drawing->getPath() === '') {\n                continue;\n            }\n            $imageTL = Coordinate::indexesFromString($drawing->getCoordinates());\n            $this->sheetDrawings[$drawing->getCoordinates()] = $drawing;\n            if ($imageTL[1] > $rowMax) {\n                $rowMax = $imageTL[1];\n            }\n            if ($imageTL[0] > $colMax) {\n                $colMax = $imageTL[0];\n            }\n        }\n    }\n\n    /**\n     * Convert Windows file name to file protocol URL.\n     *\n     * @param string $filename file name on local system\n     */\n    public static function winFileToUrl(string $filename, bool $mpdf = false): string\n    {\n        // Windows filename\n        if (substr($filename, 1, 2) === ':\\\\') {\n            $protocol = $mpdf ? '' : 'file:///';\n            $filename = $protocol . str_replace('\\\\', '/', $filename);\n        }\n\n        return $filename;\n    }\n\n    /**\n     * Generate image tag in cell.\n     *\n     * @param string $coordinates Cell coordinates\n     */\n    private function writeImageInCell(string $coordinates): string\n    {\n        // Construct HTML\n        $html = '';\n\n        // Write images\n        $drawing = $this->sheetDrawings[$coordinates] ?? null;\n        if ($drawing !== null) {\n            $opacity = '';\n            $opacityValue = $drawing->getOpacity();\n            if ($opacityValue !== null) {\n                $opacityValue = $opacityValue / 100000;\n                if ($opacityValue >= 0.0 && $opacityValue <= 1.0) {\n                    $opacity = \"opacity:$opacityValue; \";\n                }\n            }\n            $filedesc = $drawing->getDescription();\n            $filedesc = $filedesc ? htmlspecialchars($filedesc, ENT_QUOTES) : 'Embedded image';\n            if ($drawing instanceof Drawing && $drawing->getPath() !== '') {\n                $filename = $drawing->getPath();\n\n                // Strip off eventual '.'\n                $filename = Preg::replace('/^[.]/', '', $filename);\n\n                // Prepend images root\n                $filename = $this->getImagesRoot() . $filename;\n\n                // Strip off eventual '.' if followed by non-/\n                $filename = Preg::replace('@^[.]([^/])@', '$1', $filename);\n\n                // Convert UTF8 data to PCDATA\n                $filename = htmlspecialchars($filename, Settings::htmlEntityFlags());\n\n                $html .= $this->lineEnding;\n                $imageData = self::winFileToUrl($filename, $this instanceof Pdf\\Mpdf);\n\n                if ($this->embedImages || str_starts_with($imageData, 'zip://')) {\n                    $imageData = 'data:,';\n                    $picture = @file_get_contents($filename);\n                    if ($picture !== false) {\n                        $mimeContentType = (string) @mime_content_type($filename);\n                        if (str_starts_with($mimeContentType, 'image/')) {\n                            // base64 encode the binary data\n                            $base64 = base64_encode($picture);\n                            $imageData = 'data:' . $mimeContentType . ';base64,' . $base64;\n                        }\n                    }\n                }\n\n                $html .= '<img style=\"' . $opacity . 'position: absolute; z-index: 1; left: '\n                    . $drawing->getOffsetX() . 'px; top: ' . $drawing->getOffsetY() . 'px; width: '\n                    . $drawing->getWidth() . 'px; height: ' . $drawing->getHeight() . 'px;\" src=\"'\n                    . $imageData . '\" alt=\"' . $filedesc . '\" />';\n            } elseif ($drawing instanceof MemoryDrawing) {\n                $imageResource = $drawing->getImageResource();\n                if ($imageResource) {\n                    ob_start(); //  Let's start output buffering.\n                    imagepng($imageResource); //  This will normally output the image, but because of ob_start(), it won't.\n                    $contents = (string) ob_get_contents(); //  Instead, output above is saved to $contents\n                    ob_end_clean(); //  End the output buffer.\n\n                    $dataUri = 'data:image/png;base64,' . base64_encode($contents);\n\n                    //  Because of the nature of tables, width is more important than height.\n                    //  max-width: 100% ensures that image doesn't overflow containing cell\n                    //    However, PR #3535 broke test\n                    //    25_In_memory_image, apparently because\n                    //    of the use of max-with. In addition,\n                    //    non-memory-drawings don't use max-width.\n                    //    Its use here is suspect and is being eliminated.\n                    //  width: X sets width of supplied image.\n                    //  As a result, images bigger than cell will be contained and images smaller will not get stretched\n                    $html .= '<img alt=\"' . $filedesc . '\" src=\"' . $dataUri . '\" style=\"' . $opacity . 'width:' . $drawing->getWidth() . 'px;left: '\n                        . $drawing->getOffsetX() . 'px; top: ' . $drawing->getOffsetY() . 'px;position: absolute; z-index: 1;\" />';\n                }\n            }\n        }\n\n        return $html;\n    }\n\n    /**\n     * Generate chart tag in cell.\n     * This code should be exercised by sample:\n     * Chart/32_Chart_read_write_PDF.php.\n     */\n    private function writeChartInCell(Worksheet $worksheet, string $coordinates): string\n    {\n        // Construct HTML\n        $html = '';\n\n        // Write charts\n        $chart = $this->sheetCharts[$coordinates] ?? null;\n        if ($chart !== null) {\n            $chartCoordinates = $chart->getTopLeftPosition();\n            $chartFileName = File::sysGetTempDir() . '/' . uniqid('', true) . '.png';\n            $renderedWidth = $chart->getRenderedWidth();\n            $renderedHeight = $chart->getRenderedHeight();\n            if ($renderedWidth === null || $renderedHeight === null) {\n                $this->adjustRendererPositions($chart, $worksheet);\n            }\n            $title = $chart->getTitle();\n            $caption = null;\n            $filedesc = '';\n            if ($title !== null) {\n                $calculatedTitle = $title->getCalculatedTitle($worksheet->getParent());\n                if ($calculatedTitle !== null) {\n                    $caption = $title->getCaption();\n                    $title->setCaption($calculatedTitle);\n                }\n                $filedesc = $title->getCaptionText($worksheet->getParent());\n            }\n            $renderSuccessful = $chart->render($chartFileName);\n            $chart->setRenderedWidth($renderedWidth);\n            $chart->setRenderedHeight($renderedHeight);\n            if (isset($title, $caption)) {\n                $title->setCaption($caption);\n            }\n            if (!$renderSuccessful) {\n                return '';\n            }\n\n            $html .= $this->lineEnding;\n            $imageDetails = getimagesize($chartFileName) ?: ['', '', 'mime' => ''];\n\n            $filedesc = $filedesc ? htmlspecialchars($filedesc, ENT_QUOTES) : 'Embedded chart';\n            $picture = file_get_contents($chartFileName);\n            unlink($chartFileName);\n            if ($picture !== false) {\n                $base64 = base64_encode($picture);\n                $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64;\n\n                $html .= '<img style=\"position: absolute; z-index: 1; left: ' . $chartCoordinates['xOffset'] . 'px; top: ' . $chartCoordinates['yOffset'] . 'px; width: ' . $imageDetails[0] . 'px; height: ' . $imageDetails[1] . 'px;\" src=\"' . $imageData . '\" alt=\"' . $filedesc . '\" />' . $this->lineEnding;\n            }\n        }\n\n        // Return\n        return $html;\n    }\n\n    private function adjustRendererPositions(Chart $chart, Worksheet $sheet): void\n    {\n        $topLeft = $chart->getTopLeftPosition();\n        $bottomRight = $chart->getBottomRightPosition();\n        $tlCell = $topLeft['cell'];\n        /** @var string */\n        $brCell = $bottomRight['cell'];\n        if ($tlCell !== '' && $brCell !== '') {\n            $tlCoordinate = Coordinate::indexesFromString($tlCell);\n            $brCoordinate = Coordinate::indexesFromString($brCell);\n            $totalHeight = 0.0;\n            $totalWidth = 0.0;\n            $defaultRowHeight = $sheet->getDefaultRowDimension()->getRowHeight();\n            $defaultRowHeight = SharedDrawing::pointsToPixels(($defaultRowHeight >= 0) ? $defaultRowHeight : SharedFont::getDefaultRowHeightByFont($this->defaultFont));\n            if ($tlCoordinate[1] <= $brCoordinate[1] && $tlCoordinate[0] <= $brCoordinate[0]) {\n                for ($row = $tlCoordinate[1]; $row <= $brCoordinate[1]; ++$row) {\n                    $height = $sheet->getRowDimension($row)->getRowHeight('pt');\n                    $totalHeight += ($height >= 0) ? $height : $defaultRowHeight;\n                }\n                $rightEdge = $brCoordinate[2];\n                StringHelper::stringIncrement($rightEdge);\n                for ($column = $tlCoordinate[2]; $column !== $rightEdge;) {\n                    $width = $sheet->getColumnDimension($column)->getWidth();\n                    $width = ($width < 0) ? self::DEFAULT_CELL_WIDTH_PIXELS : SharedDrawing::cellDimensionToPixels($sheet->getColumnDimension($column)->getWidth(), $this->defaultFont);\n                    $totalWidth += $width;\n                    StringHelper::stringIncrement($column);\n                }\n                $chart->setRenderedWidth($totalWidth);\n                $chart->setRenderedHeight($totalHeight);\n            }\n        }\n    }\n\n    /**\n     * Generate CSS styles.\n     *\n     * @param bool $generateSurroundingHTML Generate surrounding HTML tags? (&lt;style&gt; and &lt;/style&gt;)\n     */\n    public function generateStyles(bool $generateSurroundingHTML = true): string\n    {\n        // Build CSS\n        $css = $this->buildCSS($generateSurroundingHTML);\n\n        // Construct HTML\n        $html = '';\n\n        // Start styles\n        if ($generateSurroundingHTML) {\n            $html .= '    <style type=\"text/css\">' . $this->lineEnding;\n            $html .= (array_key_exists('html', $css)) ? ('      html { ' . $this->assembleCSS($css['html']) . ' }' . $this->lineEnding) : '';\n        }\n\n        // Write all other styles\n        foreach ($css as $styleName => $styleDefinition) {\n            if ($styleName != 'html') {\n                $html .= '      ' . $styleName . ' { ' . $this->assembleCSS($styleDefinition) . ' }' . $this->lineEnding;\n            }\n        }\n        $html .= $this->generatePageDeclarations(false);\n\n        // End styles\n        if ($generateSurroundingHTML) {\n            $html .= '    </style>' . $this->lineEnding;\n        }\n\n        // Return\n        return $html;\n    }\n\n    /** @param string[][] $css */\n    private function buildCssRowHeights(Worksheet $sheet, array &$css, int $sheetIndex): void\n    {\n        // Calculate row heights\n        foreach ($sheet->getRowDimensions() as $rowDimension) {\n            $row = $rowDimension->getRowIndex() - 1;\n\n            // table.sheetN tr.rowYYYYYY { }\n            $css['table.sheet' . $sheetIndex . ' tr.row' . $row] = [];\n\n            if ($rowDimension->getRowHeight() != -1) {\n                $pt_height = $rowDimension->getRowHeight();\n                $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['height'] = $pt_height . 'pt';\n            }\n            if ($rowDimension->getVisible() === false) {\n                $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['display'] = 'none';\n                $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['visibility'] = 'hidden';\n            }\n        }\n    }\n\n    /** @param string[][] $css */\n    private function buildCssPerSheet(Worksheet $sheet, array &$css): void\n    {\n        // Calculate hash code\n        $sheetIndex = $sheet->getParentOrThrow()->getIndex($sheet);\n        $setup = $sheet->getPageSetup();\n        if ($setup->getFitToPage() && $setup->getFitToHeight() === 1) {\n            $css[\"table.sheet$sheetIndex\"]['page-break-inside'] = 'avoid';\n            $css[\"table.sheet$sheetIndex\"]['break-inside'] = 'avoid';\n        }\n        $picture = $sheet->getBackgroundImage();\n        if ($picture !== '') {\n            $base64 = base64_encode($picture);\n            $css[\"table.sheet$sheetIndex\"]['background-image'] = 'url(data:' . $sheet->getBackgroundMime() . ';base64,' . $base64 . ')';\n        }\n\n        // Build styles\n        // Calculate column widths\n        $sheet->calculateColumnWidths();\n\n        // col elements, initialize\n        $highestColumnIndex = Coordinate::columnIndexFromString($sheet->getHighestColumn()) - 1;\n        $column = -1;\n        $colStr = 'A';\n        while ($column++ < $highestColumnIndex) {\n            $this->columnWidths[$sheetIndex][$column] = self::DEFAULT_CELL_WIDTH_POINTS; // approximation\n            if ($this->shouldGenerateColumn($sheet, $colStr)) {\n                $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = self::DEFAULT_CELL_WIDTH_POINTS . 'pt';\n            }\n            StringHelper::stringIncrement($colStr);\n        }\n\n        // col elements, loop through columnDimensions and set width\n        foreach ($sheet->getColumnDimensions() as $columnDimension) {\n            $column = Coordinate::columnIndexFromString($columnDimension->getColumnIndex()) - 1;\n            $width = SharedDrawing::cellDimensionToPixels($columnDimension->getWidth(), $this->defaultFont);\n            $width = SharedDrawing::pixelsToPoints($width);\n            if ($columnDimension->getVisible() === false) {\n                $css['table.sheet' . $sheetIndex . ' .column' . $column]['display'] = 'none';\n                // This would be better but Firefox has an 11-year-old bug.\n                // https://bugzilla.mozilla.org/show_bug.cgi?id=819045\n                //$css['table.sheet' . $sheetIndex . ' col.col' . $column]['visibility'] = 'collapse';\n            }\n            if ($width >= 0) {\n                $this->columnWidths[$sheetIndex][$column] = $width;\n                $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = $width . 'pt';\n            }\n        }\n\n        // Default row height\n        $rowDimension = $sheet->getDefaultRowDimension();\n\n        // table.sheetN tr { }\n        $css['table.sheet' . $sheetIndex . ' tr'] = [];\n\n        if ($rowDimension->getRowHeight() == -1) {\n            $pt_height = SharedFont::getDefaultRowHeightByFont($this->spreadsheet->getDefaultStyle()->getFont());\n        } else {\n            $pt_height = $rowDimension->getRowHeight();\n        }\n        $css['table.sheet' . $sheetIndex . ' tr']['height'] = $pt_height . 'pt';\n        if ($rowDimension->getVisible() === false) {\n            $css['table.sheet' . $sheetIndex . ' tr']['display'] = 'none';\n            $css['table.sheet' . $sheetIndex . ' tr']['visibility'] = 'hidden';\n        }\n\n        $this->buildCssRowHeights($sheet, $css, $sheetIndex);\n    }\n\n    /**\n     * Build CSS styles.\n     *\n     * @param bool $generateSurroundingHTML Generate surrounding HTML style? (html { })\n     *\n     * @return string[][]\n     */\n    public function buildCSS(bool $generateSurroundingHTML = true): array\n    {\n        // Cached?\n        if ($this->cssStyles !== null) {\n            return $this->cssStyles;\n        }\n\n        // Ensure that spans have been calculated\n        $this->calculateSpans();\n\n        // Construct CSS\n        /** @var string[][] */\n        $css = [];\n\n        // Start styles\n        if ($generateSurroundingHTML) {\n            // html { }\n            $css['html']['font-family'] = 'Calibri, Arial, Helvetica, sans-serif';\n            $css['html']['font-size'] = '11pt';\n            $css['html']['background-color'] = 'white';\n        }\n\n        // CSS for comments as found in LibreOffice\n        $css['a.comment-indicator:hover + div.comment'] = [\n            'background' => '#ffd',\n            'position' => 'absolute',\n            'display' => 'block',\n            'border' => '1px solid black',\n            'padding' => '0.5em',\n        ];\n\n        $css['a.comment-indicator'] = [\n            'background' => 'red',\n            'display' => 'inline-block',\n            'border' => '1px solid black',\n            'width' => '0.5em',\n            'height' => '0.5em',\n        ];\n\n        $css['div.comment']['display'] = 'none';\n\n        // table { }\n        $css['table']['border-collapse'] = 'collapse';\n\n        // .b {}\n        $css['.b']['text-align'] = 'center'; // BOOL\n\n        // .e {}\n        $css['.e']['text-align'] = 'center'; // ERROR\n\n        // .f {}\n        $css['.f']['text-align'] = 'right'; // FORMULA\n\n        // .inlineStr {}\n        $css['.inlineStr']['text-align'] = 'left'; // INLINE\n\n        // .n {}\n        $css['.n']['text-align'] = 'right'; // NUMERIC\n\n        // .s {}\n        $css['.s']['text-align'] = 'left'; // STRING\n\n        $css['.floatright']['float'] = 'right';\n        $css['.floatleft']['float'] = 'left';\n\n        // Calculate cell style hashes\n        foreach ($this->spreadsheet->getCellXfCollection() as $index => $style) {\n            $css['td.style' . $index . ', th.style' . $index] = $this->createCSSStyle($style);\n            //$css['th.style' . $index] = $this->createCSSStyle($style);\n        }\n\n        // Fetch sheets\n        $sheets = [];\n        if ($this->sheetIndex === null) {\n            $sheets = $this->spreadsheet->getAllSheets();\n        } else {\n            $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex);\n        }\n\n        // Build styles per sheet\n        foreach ($sheets as $sheet) {\n            $this->buildCssPerSheet($sheet, $css);\n        }\n\n        // Cache\n        if ($this->cssStyles === null) {\n            $this->cssStyles = $css;\n        }\n\n        // Return\n        return $css;\n    }\n\n    /**\n     * Create CSS style.\n     *\n     * @return string[]\n     */\n    private function createCSSStyle(Style $style, bool $conditional = false): array\n    {\n        // Create CSS\n        return array_merge(\n            $conditional ? [] : $this->createCSSStyleAlignment($style->getAlignment()),\n            $this->createCSSStyleBorders($style->getBorders()),\n            $this->createCSSStyleFont($style->getFont(), conditional: $conditional),\n            $this->createCSSStyleFill($style->getFill())\n        );\n    }\n\n    /**\n     * Create CSS style.\n     *\n     * @return string[]\n     */\n    private function createCSSStyleAlignment(Alignment $alignment): array\n    {\n        // Construct CSS\n        $css = [];\n\n        // Create CSS\n        $verticalAlign = $this->mapVAlign($alignment->getVertical() ?? '');\n        if ($verticalAlign) {\n            $css['vertical-align'] = $verticalAlign;\n        }\n        $textAlign = $this->mapHAlign($alignment->getHorizontal() ?? '');\n        if ($textAlign) {\n            $css['text-align'] = $textAlign;\n            if (in_array($textAlign, ['left', 'right'])) {\n                $css['padding-' . $textAlign] = (string) ($alignment->getIndent() * Alignment::INDENT_UNITS_TO_PIXELS) . 'px';\n            }\n        } else {\n            $indent = $alignment->getIndent();\n            if ($indent !== 0) {\n                $css['text-indent'] = (string) ($alignment->getIndent() * Alignment::INDENT_UNITS_TO_PIXELS) . 'px';\n            }\n        }\n        $rotation = $alignment->getTextRotation();\n        if ($rotation !== 0 && $rotation !== Alignment::TEXTROTATION_STACK_PHPSPREADSHEET) {\n            if ($this instanceof Pdf\\Mpdf) {\n                $css['text-rotate'] = \"$rotation\";\n            } else {\n                $css['transform'] = \"rotate({$rotation}deg)\";\n            }\n        }\n        $direction = $alignment->getReadOrder();\n        if ($direction === Alignment::READORDER_LTR) {\n            $css['direction'] = 'ltr';\n        } elseif ($direction === Alignment::READORDER_RTL) {\n            $css['direction'] = 'rtl';\n        }\n\n        return $css;\n    }\n\n    /**\n     * Create CSS style.\n     *\n     * @return string[]\n     */\n    private function createCSSStyleFont(Font $font, bool $useDefaults = false, bool $conditional = false): array\n    {\n        // Construct CSS\n        $css = [];\n\n        // Create CSS\n        if ($font->getBold()) {\n            $css['font-weight'] = 'bold';\n        } elseif ($useDefaults) {\n            $css['font-weight'] = 'normal';\n        }\n        if ($font->getUnderline() != Font::UNDERLINE_NONE && $font->getStrikethrough()) {\n            $css['text-decoration'] = 'underline line-through';\n        } elseif ($font->getUnderline() != Font::UNDERLINE_NONE) {\n            $css['text-decoration'] = 'underline';\n        } elseif ($font->getStrikethrough()) {\n            $css['text-decoration'] = 'line-through';\n        } elseif ($useDefaults) {\n            $css['text-decoration'] = 'normal';\n        }\n        if ($font->getItalic()) {\n            $css['font-style'] = 'italic';\n        } elseif ($useDefaults) {\n            $css['font-style'] = 'normal';\n        }\n\n        $css['color'] = '#' . $font->getColor()->getRGB();\n        if (!$conditional) {\n            $css['font-family'] = '\\'' . htmlspecialchars((string) $font->getName(), ENT_QUOTES) . '\\'';\n            $css['font-size'] = $font->getSize() . 'pt';\n        }\n\n        return $css;\n    }\n\n    /**\n     * @param string[] $css\n     */\n    private function styleBorder(array &$css, string $index, Border $border): void\n    {\n        $borderStyle = $border->getBorderStyle();\n        // Mpdf doesn't process !important, so omit unimportant border none\n        if ($borderStyle === Border::BORDER_NONE && $this instanceof Pdf\\Mpdf) {\n            return;\n        }\n        if ($borderStyle !== Border::BORDER_OMIT) {\n            $css[$index] = $this->createCSSStyleBorder($border);\n        }\n    }\n\n    /**\n     * Create CSS style.\n     *\n     * @param Borders $borders Borders\n     *\n     * @return string[]\n     */\n    private function createCSSStyleBorders(Borders $borders): array\n    {\n        // Construct CSS\n        $css = [];\n\n        // Create CSS\n        $this->styleBorder($css, 'border-bottom', $borders->getBottom());\n        $this->styleBorder($css, 'border-top', $borders->getTop());\n        $this->styleBorder($css, 'border-left', $borders->getLeft());\n        $this->styleBorder($css, 'border-right', $borders->getRight());\n\n        return $css;\n    }\n\n    /**\n     * Create CSS style.\n     *\n     * @param Border $border Border\n     */\n    private function createCSSStyleBorder(Border $border): string\n    {\n        //    Create CSS - add !important to non-none border styles for merged cells\n        $borderStyle = $this->mapBorderStyle($border->getBorderStyle());\n\n        return $borderStyle . ' #' . $border->getColor()->getRGB() . (($borderStyle === self::BORDER_NONE) ? '' : ' !important');\n    }\n\n    /**\n     * Create CSS style (Fill).\n     *\n     * @param Fill $fill Fill\n     *\n     * @return string[]\n     */\n    private function createCSSStyleFill(Fill $fill): array\n    {\n        // Construct HTML\n        $css = [];\n\n        // Create CSS\n        if ($fill->getFillType() !== Fill::FILL_NONE) {\n            if (\n                (in_array($fill->getFillType(), ['', Fill::FILL_SOLID], true) || !$fill->getEndColor()->getRGB())\n                && $fill->getStartColor()->getRGB()\n            ) {\n                $value = '#' . $fill->getStartColor()->getRGB();\n                $css['background-color'] = $value;\n            } elseif ($fill->getEndColor()->getRGB()) {\n                $value = '#' . $fill->getEndColor()->getRGB();\n                $css['background-color'] = $value;\n            }\n        }\n\n        return $css;\n    }\n\n    /**\n     * Generate HTML footer.\n     */\n    public function generateHTMLFooter(): string\n    {\n        // Construct HTML\n        $html = '';\n        $html .= '  </body>' . $this->lineEnding;\n        $html .= '</html>' . $this->lineEnding;\n\n        return $html;\n    }\n\n    private function getDir(Worksheet $worksheet): string\n    {\n        if ($worksheet->getRightToLeft()) {\n            return \" dir='rtl'\";\n        }\n        if ($this->rtlSheets) {\n            return \" dir='ltr'\";\n        }\n\n        return '';\n    }\n\n    private function getFloat(Worksheet $worksheet): string\n    {\n        $float = '';\n        if ($worksheet->getRightToLeft()) {\n            if ($this->ltrSheets) {\n                $float = ' floatright';\n            }\n        } else {\n            if ($this->rtlSheets) {\n                $float = ' floatleft';\n            }\n        }\n\n        return $float;\n    }\n\n    private function generateTableTagInline(Worksheet $worksheet, string $id): string\n    {\n        $style = isset($this->cssStyles['table'])\n            ? $this->assembleCSS($this->cssStyles['table']) : '';\n        $rtl = $this->getDir($worksheet);\n        $float = $this->getFloat($worksheet);\n        if (str_ends_with($float, 'right')) {\n            $style .= '; float:right';\n        } elseif (str_ends_with($float, 'left')) {\n            $style .= '; float:left';\n        }\n        $prntgrid = $worksheet->getPrintGridlines();\n        $viewgrid = $this->isPdf ? $prntgrid : $worksheet->getShowGridlines();\n        $printArea = $worksheet->getPageSetup()->getPrintArea();\n        $dataPrint = ($printArea === '') ? '' : (\" data-printarea='\" . htmlspecialchars($printArea) . \"'\");\n        if ($viewgrid && $prntgrid) {\n            $html = \"    <table$rtl$dataPrint $id style='$style' class='gridlines gridlinesp'>\" . $this->lineEnding;\n        } elseif ($viewgrid) {\n            $html = \"    <table$rtl$dataPrint $id style='$style' class='gridlines'>\" . $this->lineEnding;\n        } elseif ($prntgrid) {\n            $html = \"    <table$rtl$dataPrint $id style='$style' class='gridlinesp'>\" . $this->lineEnding;\n        } else {\n            $html = \"    <table$rtl$dataPrint $id style='$style'>\" . $this->lineEnding;\n        }\n\n        return $html;\n    }\n\n    private function generateTableTag(Worksheet $worksheet, string $id, string &$html, int $sheetIndex): void\n    {\n        if (!$this->useInlineCss) {\n            $rtl = $this->getDir($worksheet);\n            $printArea = $worksheet->getPageSetup()->getPrintArea();\n            $dataPrint = ($printArea === '') ? '' : (\" data-printarea='\" . htmlspecialchars($printArea) . \"'\");\n            $float = $this->getFloat($worksheet);\n            if ($this instanceof Pdf\\Dompdf) {\n                $gridlines = $worksheet->getPrintGridlines() ? ' gridlines' : '';\n                $gridlinesp = $worksheet->getPrintGridlines() ? ' gridlinesp' : '';\n            } else {\n                $gridlines = $worksheet->getShowGridlines() ? ' gridlines' : '';\n                $gridlinesp = $worksheet->getPrintGridlines() ? ' gridlinesp' : '';\n            }\n            $html .= \"    <table$rtl$dataPrint $id class='sheet$sheetIndex$gridlines$gridlinesp$float'>\" . $this->lineEnding;\n        } else {\n            $html .= $this->generateTableTagInline($worksheet, $id);\n        }\n    }\n\n    /**\n     * Generate table header.\n     *\n     * @param Worksheet $worksheet The worksheet for the table we are writing\n     * @param bool $showid whether or not to add id to table tag\n     */\n    private function generateTableHeader(Worksheet $worksheet, bool $showid = true): string\n    {\n        $sheetIndex = $worksheet->getParentOrThrow()->getIndex($worksheet);\n\n        // Construct HTML\n        $html = '';\n        $id = $showid ? \"id='sheet$sheetIndex'\" : '';\n        $clear = ($this->rtlSheets && $this->ltrSheets) ? '; clear:both' : '';\n\n        if ($showid) {\n            $html .= \"<div style='page: page$sheetIndex$clear'>\" . $this->lineEnding;\n        } else {\n            $html .= \"<div style='page: page$sheetIndex$clear' class='scrpgbrk'>\" . $this->lineEnding;\n        }\n\n        $this->generateTableTag($worksheet, $id, $html, $sheetIndex);\n\n        // Write <col> elements\n        $highestColumnIndex = Coordinate::columnIndexFromString($worksheet->getHighestColumn()) - 1;\n        $i = -1;\n        while ($i++ < $highestColumnIndex) {\n            if (!$this->useInlineCss) {\n                $html .= '        <col class=\"col' . $i . '\" />' . $this->lineEnding;\n            } else {\n                $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i])\n                    ? $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) : '';\n                $html .= '        <col style=\"' . $style . '\" />' . $this->lineEnding;\n            }\n        }\n\n        return $html;\n    }\n\n    /**\n     * Generate table footer.\n     */\n    private function generateTableFooter(): string\n    {\n        return '    </tbody></table>' . $this->lineEnding . '</div>' . $this->lineEnding;\n    }\n\n    /**\n     * Generate row start.\n     *\n     * @param int $sheetIndex Sheet index (0-based)\n     * @param int $row row number\n     */\n    private function generateRowStart(Worksheet $worksheet, int $sheetIndex, int $row): string\n    {\n        $html = '';\n        if (count($worksheet->getBreaks()) > 0) {\n            $breaks = $worksheet->getRowBreaks();\n\n            // check if a break is needed before this row\n            if (isset($breaks['A' . $row])) {\n                // close table: </table>\n                $html .= $this->generateTableFooter();\n                if ($this->isPdf && $this->useInlineCss) {\n                    $html .= '<div style=\"page-break-before:always\" />';\n                }\n\n                // open table again: <table> + <col> etc.\n                $html .= $this->generateTableHeader($worksheet, false);\n                $html .= '<tbody>' . $this->lineEnding;\n            }\n        }\n\n        // Write row start\n        if (!$this->useInlineCss) {\n            $html .= '          <tr class=\"row' . $row . '\">' . $this->lineEnding;\n        } else {\n            $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $row])\n                ? $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $row]) : '';\n\n            if ($style === '') {\n                $html .= '          <tr>' . $this->lineEnding;\n            } else {\n                $html .= '          <tr style=\"' . $style . '\">' . $this->lineEnding;\n            }\n        }\n\n        return $html;\n    }\n\n    /** @return array{null|''|Cell, array{}|string, non-empty-string} */\n    private function generateRowCellCss(Worksheet $worksheet, string $cellAddress, int $row, int $columnNumber): array\n    {\n        $cell = ($cellAddress > '') ? $worksheet->getCellCollection()->get($cellAddress) : '';\n        $coordinate = Coordinate::stringFromColumnIndex($columnNumber + 1) . ($row + 1);\n        if (!$this->useInlineCss) {\n            $cssClass = 'column' . $columnNumber;\n        } else {\n            $cssClass = [];\n        }\n\n        return [$cell, $cssClass, $coordinate];\n    }\n\n    private function generateRowCellDataValueRich(RichText $richText, ?Font $defaultFont = null): string\n    {\n        $cellData = '';\n        // Loop through rich text elements\n        $elements = $richText->getRichTextElements();\n        foreach ($elements as $element) {\n            // Rich text start?\n            $font = ($element instanceof Run) ? $element->getFont() : $defaultFont;\n            if ($element instanceof Run || $font !== null) {\n                $cellEnd = '';\n                if ($font !== null) {\n                    $cellData .= '<span style=\"' . $this->assembleCSS($this->createCSSStyleFont($font, true)) . '\">';\n\n                    if ($font->getSuperscript()) {\n                        $cellData .= '<sup>';\n                        $cellEnd = '</sup>';\n                    } elseif ($font->getSubscript()) {\n                        $cellData .= '<sub>';\n                        $cellEnd = '</sub>';\n                    }\n                } else {\n                    $cellData .= '<span>';\n                }\n\n                // Convert UTF8 data to PCDATA\n                $cellText = $element->getText();\n                $cellData .= htmlspecialchars($cellText, Settings::htmlEntityFlags());\n\n                $cellData .= $cellEnd;\n\n                $cellData .= '</span>';\n            } else {\n                // Convert UTF8 data to PCDATA\n                $cellText = $element->getText();\n                $cellData .= htmlspecialchars($cellText, Settings::htmlEntityFlags());\n            }\n        }\n\n        return self::nl2brx($cellData);\n    }\n\n    private function generateRowCellDataValue(Worksheet $worksheet, Cell $cell, string &$cellData): void\n    {\n        if ($cell->getValue() instanceof RichText) {\n            $cellData .= $this->generateRowCellDataValueRich($cell->getValue(), $cell->getStyle()->getFont());\n        } else {\n            if ($this->preCalculateFormulas) {\n                try {\n                    $origData = $cell->getCalculatedValue();\n                } catch (CalculationException) {\n                    $origData = '#ERROR'; // mark as error, rather than crash everything\n                }\n                if ($this->betterBoolean && is_bool($origData)) {\n                    if ($cell->getStyle()->getCheckbox()) {\n                        $origData2 = $origData ? '☑' : '☐';\n                    } else {\n                        $origData2 = $origData ? $this->getTrue : $this->getFalse;\n                    }\n                } else {\n                    try {\n                        $origData2 = $cell->getCalculatedValueString();\n                    } catch (CalculationException) {\n                        $origData2 = '#ERROR'; // mark as error, rather than crash everything\n                    }\n                }\n            } else {\n                $origData = $cell->getValue();\n                if ($this->betterBoolean && is_bool($origData)) {\n                    if ($cell->getStyle()->getCheckbox()) {\n                        $origData2 = $origData ? '☑' : '☐';\n                    } else {\n                        $origData2 = $origData ? $this->getTrue : $this->getFalse;\n                    }\n                } else {\n                    $origData2 = $cell->getValueString();\n                }\n            }\n            $formatCode = $worksheet->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode();\n\n            $cellData = NumberFormat::toFormattedString(\n                $origData2,\n                $formatCode ?? NumberFormat::FORMAT_GENERAL,\n                [$this, 'formatColor']\n            );\n\n            if ($cellData === $origData) {\n                $cellData = htmlspecialchars($cellData, Settings::htmlEntityFlags());\n            }\n            if ($worksheet->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSuperscript()) {\n                $cellData = '<sup>' . $cellData . '</sup>';\n            } elseif ($worksheet->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSubscript()) {\n                $cellData = '<sub>' . $cellData . '</sub>';\n            }\n        }\n    }\n\n    /** @param string|string[] $cssClass */\n    private function generateRowCellData(Worksheet $worksheet, null|Cell|string $cell, array|string &$cssClass): string\n    {\n        if ($cell instanceof Cell) {\n            $cellData = '';\n            // Don't know what this does, and no test cases.\n            //if ($cell->getParent() === null) {\n            //    $cell->attach($worksheet);\n            //}\n            // Value\n            $this->generateRowCellDataValue($worksheet, $cell, $cellData);\n\n            // Converts the cell content so that spaces occuring at beginning of each new line are replaced by &nbsp;\n            // Example: \"  Hello\\n to the world\" is converted to \"&nbsp;&nbsp;Hello\\n&nbsp;to the world\"\n            $cellData = Preg::replace('/(?m)(?:^|\\G) /', '&nbsp;', $cellData);\n\n            // convert newline \"\\n\" to '<br>'\n            $cellData = self::nl2brx($cellData);\n\n            // Extend CSS class?\n            $dataType = $cell->getDataType();\n            if ($this->betterBoolean && $this->preCalculateFormulas && $dataType === DataType::TYPE_FORMULA) {\n                try {\n                    $calculatedValue = $cell->getCalculatedValue();\n                    if (is_bool($calculatedValue)) {\n                        $dataType = DataType::TYPE_BOOL;\n                    } elseif (is_numeric($calculatedValue)) {\n                        $dataType = DataType::TYPE_NUMERIC;\n                    } elseif (is_string($calculatedValue)) {\n                        $dataType = DataType::TYPE_STRING;\n                    }\n                } catch (CalculationException $exception) {\n                    $calculatedValue = '#ERROR';\n                    $dataType = DataType::TYPE_ERROR;\n                }\n            }\n            if (!$this->useInlineCss && is_string($cssClass)) {\n                $cssClass .= ' style' . $cell->getXfIndex();\n                $cssClass .= ' ' . $dataType;\n            } elseif (is_array($cssClass)) {\n                $index = $cell->getXfIndex();\n                $styleIndex = 'td.style' . $index . ', th.style' . $index;\n                if (isset($this->cssStyles[$styleIndex])) {\n                    $cssClass = array_merge($cssClass, $this->cssStyles[$styleIndex]);\n                }\n\n                // General horizontal alignment: Actual horizontal alignment depends on dataType\n                $sharedStyle = $worksheet->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex());\n                if (\n                    $sharedStyle->getAlignment()->getHorizontal() == Alignment::HORIZONTAL_GENERAL\n                    && isset($this->cssStyles['.' . $cell->getDataType()]['text-align'])\n                ) {\n                    $cssClass['text-align'] = $this->cssStyles['.' . $dataType]['text-align'];\n                }\n            }\n        } else {\n            $cellData = \"$cell\";\n            // Use default borders for empty cell\n            if (is_string($cssClass)) {\n                $cssClass .= ' style0';\n            }\n        }\n        /*\n         * Browsers may remove an entirely empty row.\n         * An interesting option is to leave an empty cell empty using css.\n         * td:empty::after{content: \"\\00a0\";}\n         * This works well in modern browsers.\n         * Alas, none of our Pdf writers can handle it.\n         */\n\n        return (trim($cellData) === '') ? '&nbsp;' : $cellData;\n    }\n\n    private function generateRowIncludeCharts(Worksheet $worksheet, string $coordinate): string\n    {\n        return $this->includeCharts ? $this->writeChartInCell($worksheet, $coordinate) : '';\n    }\n\n    private function generateRowSpans(string $html, int $rowSpan, int $colSpan): string\n    {\n        $html .= ($colSpan > 1) ? (' colspan=\"' . $colSpan . '\"') : '';\n        $html .= ($rowSpan > 1) ? (' rowspan=\"' . $rowSpan . '\"') : '';\n\n        return $html;\n    }\n\n    /**\n     * @param string|string[] $cssClass\n     * @param Conditional[] $condStyles\n     */\n    private function generateRowWriteCell(\n        string &$html,\n        Worksheet $worksheet,\n        string $coordinate,\n        string $cellType,\n        string $cellData,\n        int $colSpan,\n        int $rowSpan,\n        array|string $cssClass,\n        int $colNum,\n        int $sheetIndex,\n        int $row,\n        array $condStyles = []\n    ): void {\n        // Image?\n        $htmlx = $this->writeImageInCell($coordinate);\n        // Chart?\n        $htmlx .= $this->generateRowIncludeCharts($worksheet, $coordinate);\n        // Column start\n        $html .= '            <' . $cellType;\n        if ($worksheet->getStyle($coordinate)->getCheckbox()) {\n            $html .= ' data-checkbox=\"1\"';\n        }\n        $dataType = $worksheet->getCell($coordinate)->getDataType();\n        if ($this->betterBoolean) {\n            if ($dataType === DataType::TYPE_BOOL) {\n                $html .= ' data-type=\"' . DataType::TYPE_BOOL . '\"';\n            } elseif ($dataType === DataType::TYPE_FORMULA && $this->preCalculateFormulas) {\n                try {\n                    $calculatedValue = $worksheet\n                        ->getCell($coordinate)\n                        ->getCalculatedValue();\n                    if (is_bool($calculatedValue)) {\n                        $html .= ' data-type=\"' . DataType::TYPE_BOOL . '\"';\n                    } elseif ($this->dataFormula && is_string($calculatedValue)) {\n                        $html .= ' data-type=\"' . DataType::TYPE_STRING . '\"';\n                    } elseif ($this->dataFormula && (is_int($calculatedValue) || is_float($calculatedValue))) {\n                        $html .= ' data-type=\"' . DataType::TYPE_NUMERIC . '\"';\n                    }\n                } catch (CalculationException) {\n                    $html .= ' data-type=\"' . DataType::TYPE_ERROR . '\"';\n                }\n            } elseif (is_numeric($cellData) && $worksheet->getCell($coordinate)->getDataType() === DataType::TYPE_STRING) {\n                $html .= ' data-type=\"' . DataType::TYPE_STRING . '\"';\n            }\n        }\n        if ($dataType === DataType::TYPE_FORMULA && $this->dataFormula) {\n            if ($this->preCalculateFormulas) {\n                $html .= ' data-formula=\"'\n                . htmlspecialchars(\n                    $worksheet->getCell($coordinate)\n                        ->getValueString()\n                )\n                . '\"';\n            }\n        }\n        $holdCss = '';\n        if (!$this->useInlineCss && !$this->isPdf && is_string($cssClass)) {\n            $html .= ' class=\"' . $cssClass . '\"';\n            if ($htmlx) {\n                $html .= \" style='position: relative;'\";\n            }\n        } else {\n            //** Necessary redundant code for the sake of \\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf **\n            // We must explicitly write the width of the <td> element because TCPDF\n            // does not recognize e.g. <col style=\"width:42pt\">\n            if ($this->useInlineCss) {\n                $xcssClass = is_array($cssClass) ? $cssClass : [];\n            } else {\n                if (is_string($cssClass)) {\n                    $html .= ' class=\"' . $cssClass . '\"';\n                }\n                $xcssClass = [];\n            }\n            $width = 0;\n            $i = $colNum - 1;\n            $e = $colNum + $colSpan - 1;\n            while ($i++ < $e) {\n                if (isset($this->columnWidths[$sheetIndex][$i])) {\n                    $width += $this->columnWidths[$sheetIndex][$i];\n                }\n            }\n            $xcssClass['width'] = (string) $width . 'pt';\n            // We must also explicitly write the height of the <td> element because TCPDF\n            // does not recognize e.g. <tr style=\"height:50pt\">\n            if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $row]['height'])) {\n                $height = $this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $row]['height'];\n                $xcssClass['height'] = $height;\n            }\n            //** end of redundant code **\n            if ($this->useInlineCss) {\n                foreach (['border-top', 'border-bottom', 'border-right', 'border-left'] as $borderType) {\n                    if (($xcssClass[$borderType] ?? '') === 'none #000000') {\n                        unset($xcssClass[$borderType]);\n                    }\n                }\n                $foundBorder = false;\n                if ($this instanceof Pdf\\Tcpdf && $worksheet->getPrintGridLines()) {\n                    foreach (['border-top', 'border-bottom', 'border-right', 'border-left'] as $borderType) {\n                        if (isset($xcssClass[$borderType])) {\n                            $foundBorder = true;\n                        }\n                    }\n                    if (!$foundBorder) {\n                        $xcssClass['border'] = '0.1px solid black';\n                    }\n                }\n            }\n\n            if ($htmlx) {\n                $xcssClass['position'] = 'relative';\n            }\n            /** @var string[] $xcssClass */\n            $holdCss = $this->assembleCSS($xcssClass);\n            if ($this->useInlineCss) {\n                $prntgrid = $worksheet->getPrintGridlines();\n                $viewgrid = $this->isPdf ? $prntgrid : $worksheet->getShowGridlines();\n                if ($viewgrid && $prntgrid) {\n                    $html .= ' class=\"gridlines gridlinesp\"';\n                } elseif ($viewgrid) {\n                    $html .= ' class=\"gridlines\"';\n                } elseif ($prntgrid) {\n                    $html .= ' class=\"gridlinesp\"';\n                }\n            }\n        }\n\n        $html = $this->generateRowSpans($html, $rowSpan, $colSpan);\n\n        $mergedCellStyle = new MergedCellStyle();\n        $mergedStyle = $mergedCellStyle->getMergedStyle(\n            $worksheet,\n            $coordinate,\n            $this->tableFormats,\n            $this->conditionalFormatting,\n            $this->tableFormatsBuiltin\n        );\n        if ($mergedCellStyle->getMatched()) {\n            $styles = $this->createCSSStyle($mergedStyle, true);\n            $html .= ' style=\"';\n            if ($holdCss !== '') {\n                $html .= \"$holdCss; \";\n                $holdCss = '';\n            }\n            foreach ($styles as $key => $value) {\n                if (!str_starts_with($key, 'border-') || $value !== 'none #000000') {\n                    $html .= $key . ':' . $value . ';';\n                }\n            }\n            $html .= '\"';\n        }\n        if ($holdCss !== '') {\n            $html .= ' style=\"' . $holdCss . '\"';\n        }\n\n        $html .= '>';\n        $html .= $htmlx;\n\n        $html .= $this->writeComment($worksheet, $coordinate);\n\n        // Cell data\n        $html .= $cellData;\n\n        // Column end\n        $html .= '</' . $cellType . '>' . $this->lineEnding;\n    }\n\n    /**\n     * Generate row.\n     *\n     * @param array<int, string> $values Array containing cells in a row\n     * @param int $row Row number (0-based)\n     * @param string $cellType eg: 'td'\n     */\n    private function generateRow(Worksheet $worksheet, array $values, int $row, string $cellType): string\n    {\n        // Sheet index\n        $sheetIndex = $worksheet->getParentOrThrow()->getIndex($worksheet);\n        $html = $this->generateRowStart($worksheet, $sheetIndex, $row);\n\n        // Write cells\n        $colNum = 0;\n        $tcpdfInited = false;\n        foreach ($values as $key => $cellAddress) {\n            if ($this instanceof Pdf\\Mpdf) {\n                $colNum = $key - 1;\n            } elseif ($this instanceof Pdf\\Tcpdf) {\n                // It appears that Tcpdf requires first cell in tr.\n                $colNum = $key - 1;\n                if (!$tcpdfInited && $key !== 1) {\n                    $tempspan = ($colNum > 1) ? \" colspan='$colNum'\" : '';\n                    $html .= \"<td$tempspan></td>\" . $this->lineEnding;\n                }\n                $tcpdfInited = true;\n            }\n            [$cell, $cssClass, $coordinate] = $this->generateRowCellCss($worksheet, $cellAddress, $row, $colNum);\n\n            // Cell Data\n            $cellData = $this->generateRowCellData($worksheet, $cell, $cssClass);\n\n            // Get an array of all styles\n            $condStyles = $worksheet->getStyle($coordinate)->getConditionalStyles();\n\n            // Hyperlink?\n            if ($worksheet->hyperlinkExists($coordinate) && !$worksheet->getHyperlink($coordinate)->isInternal()) {\n                $url = $worksheet->getHyperlink($coordinate)->getUrl();\n                $urlDecode1 = html_entity_decode($url, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');\n                $urlTrim = Preg::replace('/^\\s+/u', '', $urlDecode1);\n                $parseScheme = Preg::isMatch('/^([\\w\\s\\x00-\\x1f]+):/u', strtolower($urlTrim), $matches);\n                if ($parseScheme && !in_array($matches[1], ['http', 'https', 'file', 'ftp', 'mailto', 's3'], true)) {\n                    $cellData = htmlspecialchars($url, Settings::htmlEntityFlags());\n                    $cellData = self::replaceControlChars($cellData);\n                } else {\n                    $tooltip = $worksheet->getHyperlink($coordinate)->getTooltip();\n                    $tooltipOut = empty($tooltip) ? '' : (' title=\"' . htmlspecialchars($tooltip) . '\"');\n                    $cellData = '<a href=\"'\n                        . htmlspecialchars($url) . '\"'\n                        . $tooltipOut\n                        . '>' . $cellData . '</a>';\n                }\n            }\n\n            // Should the cell be written or is it swallowed by a rowspan or colspan?\n            $writeCell = !(isset($this->isSpannedCell[$worksheet->getParentOrThrow()->getIndex($worksheet)][$row + 1][$colNum])\n                && $this->isSpannedCell[$worksheet->getParentOrThrow()->getIndex($worksheet)][$row + 1][$colNum]);\n\n            // Colspan and Rowspan\n            $colSpan = 1;\n            $rowSpan = 1;\n            if (isset($this->isBaseCell[$worksheet->getParentOrThrow()->getIndex($worksheet)][$row + 1][$colNum])) {\n                /** @var array<string, int> */\n                $spans = $this->isBaseCell[$worksheet->getParentOrThrow()->getIndex($worksheet)][$row + 1][$colNum];\n                $rowSpan = $spans['rowspan'];\n                $colSpan = $spans['colspan'];\n\n                //    Also apply style from last cell in merge to fix borders -\n                //        relies on !important for non-none border declarations in createCSSStyleBorder\n                $endCellCoord = Coordinate::stringFromColumnIndex($colNum + $colSpan) . ($row + $rowSpan);\n                if (!$this->useInlineCss && is_string($cssClass)) {\n                    $cssClass .= ' style' . $worksheet->getCell($endCellCoord)->getXfIndex();\n                } else {\n                    $endBorders = $this->spreadsheet->getCellXfByIndex($worksheet->getCell($endCellCoord)->getXfIndex())->getBorders();\n                    $altBorders = $this->createCSSStyleBorders($endBorders);\n                    foreach ($altBorders as $altKey => $altValue) {\n                        if (str_contains($altValue, '!important')) {\n                            $cssClass[$altKey] = $altValue;\n                        }\n                    }\n                }\n            }\n\n            // Write\n            if ($writeCell) {\n                $this->generateRowWriteCell($html, $worksheet, $coordinate, $cellType, $cellData, $colSpan, $rowSpan, $cssClass, $colNum, $sheetIndex, $row, $condStyles);\n            }\n\n            // Next column\n            ++$colNum;\n        }\n        if ($this instanceof Pdf\\Tcpdf) {\n            if (str_ends_with($html, '<tr>' . $this->lineEnding)) {\n                $html .= '<td>&nbsp;</td>' . $this->lineEnding;\n            }\n        }\n\n        // Write row end\n        $html .= '          </tr>' . $this->lineEnding;\n\n        // Return\n        return $html;\n    }\n\n    private static function replaceControlChars(string $convert): string\n    {\n        return Preg::replaceCallback(\n            '/[\\x00-\\x1f]/',\n            fn (array $matches) => '&#' . ord($matches[0]) . ';',\n            $convert\n        );\n    }\n\n    /**\n     * Takes array where of CSS properties / values and converts to CSS string.\n     *\n     * @param string[] $values\n     */\n    private function assembleCSS(array $values = []): string\n    {\n        $pairs = [];\n        foreach ($values as $property => $value) {\n            $pairs[] = $property . ':' . $value;\n        }\n        $string = implode('; ', $pairs);\n\n        return $string;\n    }\n\n    /**\n     * Get images root.\n     */\n    public function getImagesRoot(): string\n    {\n        return $this->imagesRoot;\n    }\n\n    /**\n     * Set images root.\n     *\n     * @return $this\n     */\n    public function setImagesRoot(string $imagesRoot): static\n    {\n        $this->imagesRoot = $imagesRoot;\n\n        return $this;\n    }\n\n    /**\n     * Get embed images.\n     */\n    public function getEmbedImages(): bool\n    {\n        return $this->embedImages;\n    }\n\n    /**\n     * Set embed images.\n     *\n     * @return $this\n     */\n    public function setEmbedImages(bool $embedImages): static\n    {\n        $this->embedImages = $embedImages;\n\n        return $this;\n    }\n\n    /**\n     * Get use inline CSS?\n     */\n    public function getUseInlineCss(): bool\n    {\n        return $this->useInlineCss;\n    }\n\n    /**\n     * Set use inline CSS?\n     *\n     * @return $this\n     */\n    public function setUseInlineCss(bool $useInlineCss): static\n    {\n        $this->useInlineCss = $useInlineCss;\n\n        return $this;\n    }\n\n    public function getTableFormats(): bool\n    {\n        return $this->tableFormats;\n    }\n\n    public function setTableFormats(bool $tableFormats, ?bool $tableFormatsBuiltin = null): self\n    {\n        $this->tableFormats = $tableFormats;\n        $this->tableFormatsBuiltin = $tableFormatsBuiltin;\n\n        return $this;\n    }\n\n    public function getConditionalFormatting(): bool\n    {\n        return $this->conditionalFormatting;\n    }\n\n    public function setConditionalFormatting(bool $conditionalFormatting): self\n    {\n        $this->conditionalFormatting = $conditionalFormatting;\n\n        return $this;\n    }\n\n    /**\n     * Add color to formatted string as inline style.\n     *\n     * @param string $value Plain formatted value without color\n     * @param string $format Format code\n     */\n    public function formatColor(string $value, string $format): string\n    {\n        return self::formatColorStatic($value, $format);\n    }\n\n    /**\n     * Add color to formatted string as inline style.\n     *\n     * @param string $value Plain formatted value without color\n     * @param string $format Format code\n     */\n    public static function formatColorStatic(string $value, string $format): string\n    {\n        // Color information, e.g. [Red] is always at the beginning\n        $color = null; // initialize\n        $matches = [];\n\n        $color_regex = '/^\\[[a-zA-Z]+\\]/';\n        if (Preg::isMatch($color_regex, $format, $matches)) {\n            $color = str_replace(['[', ']'], '', $matches[0]);\n            $color = strtolower($color);\n        }\n\n        // convert to PCDATA\n        $result = htmlspecialchars($value, Settings::htmlEntityFlags());\n\n        // color span tag\n        if ($color !== null) {\n            $result = '<span style=\"color:' . $color . '\">' . $result . '</span>';\n        }\n\n        return $result;\n    }\n\n    /**\n     * Calculate information about HTML colspan and rowspan which is not always the same as Excel's.\n     */\n    private function calculateSpans(): void\n    {\n        if ($this->spansAreCalculated) {\n            return;\n        }\n        // Identify all cells that should be omitted in HTML due to cell merge.\n        // In HTML only the upper-left cell should be written and it should have\n        //   appropriate rowspan / colspan attribute\n        $sheetIndexes = $this->sheetIndex !== null\n            ? [$this->sheetIndex] : range(0, $this->spreadsheet->getSheetCount() - 1);\n\n        foreach ($sheetIndexes as $sheetIndex) {\n            $sheet = $this->spreadsheet->getSheet($sheetIndex);\n\n            $candidateSpannedRow = [];\n\n            // loop through all Excel merged cells\n            foreach ($sheet->getMergeCells() as $cells) {\n                [$cells] = Coordinate::splitRange($cells);\n                $first = $cells[0];\n                $last = $cells[1];\n\n                [$fc, $fr] = Coordinate::indexesFromString($first);\n                $fc = $fc - 1;\n\n                [$lc, $lr] = Coordinate::indexesFromString($last);\n                $lc = $lc - 1;\n\n                // loop through the individual cells in the individual merge\n                $r = $fr - 1;\n                while ($r++ < $lr) {\n                    // also, flag this row as a HTML row that is candidate to be omitted\n                    $candidateSpannedRow[$r] = $r;\n\n                    $c = $fc - 1;\n                    while ($c++ < $lc) {\n                        if (!($c == $fc && $r == $fr)) {\n                            // not the upper-left cell (should not be written in HTML)\n                            $this->isSpannedCell[$sheetIndex][$r][$c] = [\n                                'baseCell' => [$fr, $fc],\n                            ];\n                        } else {\n                            // upper-left is the base cell that should hold the colspan/rowspan attribute\n                            $this->isBaseCell[$sheetIndex][$r][$c] = [\n                                'xlrowspan' => $lr - $fr + 1, // Excel rowspan\n                                'rowspan' => $lr - $fr + 1, // HTML rowspan, value may change\n                                'xlcolspan' => $lc - $fc + 1, // Excel colspan\n                                'colspan' => $lc - $fc + 1, // HTML colspan, value may change\n                            ];\n                        }\n                    }\n                }\n            }\n        }\n\n        // We have calculated the spans\n        $this->spansAreCalculated = true;\n    }\n\n    /**\n     * Write a comment in the same format as LibreOffice.\n     *\n     * @see https://github.com/LibreOffice/core/blob/9fc9bf3240f8c62ad7859947ab8a033ac1fe93fa/sc/source/filter/html/htmlexp.cxx#L1073-L1092\n     */\n    private function writeComment(Worksheet $worksheet, string $coordinate): string\n    {\n        $result = '';\n        if (!$this->isPdf && isset($worksheet->getComments()[$coordinate])) {\n            $sanitizedString = $this->generateRowCellDataValueRich($worksheet->getComment($coordinate)->getText());\n            $dir = ($worksheet->getComment($coordinate)->getTextboxDirection() === Comment::TEXTBOX_DIRECTION_RTL) ? ' dir=\"rtl\"' : '';\n            $align = strtolower($worksheet->getComment($coordinate)->getAlignment());\n            $alignment = Alignment::HORIZONTAL_ALIGNMENT_FOR_HTML[$align] ?? '';\n            if ($alignment !== '') {\n                $alignment = \" style=\\\"text-align:$alignment\\\"\";\n            }\n            if ($sanitizedString !== '') {\n                $result .= '<a class=\"comment-indicator\"></a>';\n                $result .= \"<div class=\\\"comment\\\"$dir$alignment>\" . $sanitizedString . '</div>';\n                $result .= $this->lineEnding;\n            }\n        }\n\n        return $result;\n    }\n\n    public function getOrientation(): ?string\n    {\n        // Expect Pdf classes to override this method.\n        return $this->isPdf ? PageSetup::ORIENTATION_PORTRAIT : null;\n    }\n\n    /**\n     * Generate @page declarations.\n     */\n    private function generatePageDeclarations(bool $generateSurroundingHTML): string\n    {\n        // Ensure that Spans have been calculated?\n        $this->calculateSpans();\n\n        // Fetch sheets\n        $sheets = [];\n        if ($this->sheetIndex === null) {\n            $sheets = $this->spreadsheet->getAllSheets();\n        } else {\n            $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex);\n        }\n\n        // Construct HTML\n        $htmlPage = $generateSurroundingHTML ? ('<style type=\"text/css\">' . $this->lineEnding) : '';\n\n        // Loop all sheets\n        $sheetId = 0;\n        foreach ($sheets as $worksheet) {\n            $htmlPage .= \"@page page$sheetId { \";\n            $left = StringHelper::formatNumber($worksheet->getPageMargins()->getLeft()) . 'in; ';\n            $htmlPage .= 'margin-left: ' . $left;\n            $right = StringHelper::FormatNumber($worksheet->getPageMargins()->getRight()) . 'in; ';\n            $htmlPage .= 'margin-right: ' . $right;\n            $top = StringHelper::FormatNumber($worksheet->getPageMargins()->getTop()) . 'in; ';\n            $htmlPage .= 'margin-top: ' . $top;\n            $bottom = StringHelper::FormatNumber($worksheet->getPageMargins()->getBottom()) . 'in; ';\n            $htmlPage .= 'margin-bottom: ' . $bottom;\n            $orientation = $this->getOrientation() ?? $worksheet->getPageSetup()->getOrientation();\n            if ($orientation === PageSetup::ORIENTATION_LANDSCAPE) {\n                $htmlPage .= 'size: landscape; ';\n            } elseif ($orientation === PageSetup::ORIENTATION_PORTRAIT) {\n                $htmlPage .= 'size: portrait; ';\n            }\n            $htmlPage .= '}' . $this->lineEnding;\n            if (!$this->isPdf) {\n                $htmlPage .= $this->printAreaStyles($sheetId, $worksheet);\n            }\n            ++$sheetId;\n        }\n        $htmlPage .= implode($this->lineEnding, [\n            '.navigation {page-break-after: always;}',\n            '.scrpgbrk, div + div {page-break-before: always;}',\n            '@media screen {',\n            '  .gridlines td {border: 1px solid black;}',\n            '  .gridlines th {border: 1px solid black;}',\n            '  body>div {margin-top: 5px;}',\n            '  body>div:first-child {margin-top: 0;}',\n            '  .scrpgbrk {margin-top: 1px;}',\n            '}',\n            '@media print {',\n            '  .gridlinesp td {border: 1px solid black;}',\n            '  .gridlinesp th {border: 1px solid black;}',\n            '  .navigation {display: none;}',\n            '}',\n            '',\n        ]);\n        $htmlPage .= $generateSurroundingHTML ? ('</style>' . $this->lineEnding) : '';\n\n        return $htmlPage;\n    }\n\n    private function printAreaStyles(int $sheetId, Worksheet $worksheet): string\n    {\n        $retVal = '';\n        $printArea = $worksheet->getPageSetup()->getPrintArea();\n        if (Preg::isMatch('/^([a-z]+)([0-9]+):([a-z]+)([0-9]+)$/i', $printArea, $matches)) {\n            $lowCol = Coordinate::columnIndexFromString($matches[1]) - 1;\n            $highCol = Coordinate::columnIndexFromString($matches[3]) - 1;\n            $lowRow = (int) $matches[2] - 1;\n            $highRow = (int) $matches[4] - 1;\n            $retVal = '@media print {' . $this->lineEnding;\n            $highDataRow = $worksheet->getHighestDataRow();\n            for ($row = 0; $row < $highDataRow; ++$row) {\n                if ($row < $lowRow || $row > $highRow) {\n                    $retVal .= \"    table.sheet$sheetId tr.row$row td { display:none }\" . $this->lineEnding;\n                }\n            }\n            $highDataColumn = $worksheet->getHighestDataColumn();\n            $highDataCol = Coordinate::columnIndexFromString($highDataColumn);\n            for ($col = 0; $col < $highDataCol; ++$col) {\n                if ($col < $lowCol || $col > $highCol) {\n                    $retVal .= \"    table.sheet$sheetId td.column$col { display:none }\" . $this->lineEnding;\n                }\n            }\n            $retVal .= '}' . $this->lineEnding;\n        }\n\n        return $retVal;\n    }\n\n    private function shouldGenerateRow(Worksheet $sheet, int $row): bool\n    {\n        if ($this->isPdf) {\n            if ($this->printAreaLowRow >= 0) {\n                if ($row < $this->printAreaLowRow || $row > $this->printAreaHighRow) {\n                    return false;\n                }\n            }\n        }\n        if (!($this instanceof Pdf\\Mpdf || $this instanceof Pdf\\Tcpdf)) {\n            return true;\n        }\n\n        return $sheet->isRowVisible($row);\n    }\n\n    private function shouldGenerateColumn(Worksheet $sheet, string $colStr): bool\n    {\n        if ($this->isPdf) {\n            if ($this->printAreaLowCol >= 0) {\n                $col = Coordinate::columnIndexFromString($colStr);\n                if ($col < $this->printAreaLowCol || $col > $this->printAreaHighCol) {\n                    return false;\n                }\n            }\n        }\n        if (!($this instanceof Pdf\\Mpdf || $this instanceof Pdf\\Tcpdf)) {\n            return true;\n        }\n        if (!$sheet->columnDimensionExists($colStr)) {\n            return true;\n        }\n\n        return $sheet->getColumnDimension($colStr)->getVisible();\n    }\n\n    public function getBetterBoolean(): bool\n    {\n        return $this->betterBoolean;\n    }\n\n    public function setBetterBoolean(bool $betterBoolean): self\n    {\n        $this->betterBoolean = $betterBoolean;\n\n        return $this;\n    }\n\n    private static function nl2brx(string $string, bool $useXhtml = false): string\n    {\n        return str_replace(\n            [\"\\r\\n\", \"\\n\\r\", \"\\r\", \"\\n\"],\n            self::BRX,\n            $string\n        );\n    }\n\n    private function extendRowsAndColumnsForMerge(Worksheet $worksheet, int &$colMax, int &$rowMax): void\n    {\n        foreach ($worksheet->getMergeCells() as $cellRange) {\n            if (Preg::isMatch('/[a-z]{1,3}\\d+:([a-z]{1,3})(\\d+)/i', $cellRange, $matches)) {\n                $col = Coordinate::columnIndexFromString($matches[1]);\n                if ($colMax < $col) {\n                    $colMax = $col;\n                    $worksheet->getColumnDimension($matches[1]);\n                }\n                $row = (int) $matches[2];\n                if ($rowMax < $row) {\n                    $rowMax = $row;\n                    $worksheet->getRowDimension($row);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/IWriter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\ninterface IWriter\n{\n    public const SAVE_WITH_CHARTS = 1;\n\n    public const DISABLE_PRECALCULATE_FORMULAE = 2;\n\n    /**\n     * IWriter constructor.\n     *\n     * @param Spreadsheet $spreadsheet The spreadsheet that we want to save using this Writer\n     */\n    public function __construct(Spreadsheet $spreadsheet);\n\n    /**\n     * Write charts in workbook?\n     *        If this is true, then the Writer will write definitions for any charts that exist in the PhpSpreadsheet object.\n     *        If false (the default) it will ignore any charts defined in the PhpSpreadsheet object.\n     */\n    public function getIncludeCharts(): bool;\n\n    /**\n     * Set write charts in workbook\n     *        Set to true, to advise the Writer to include any charts that exist in the PhpSpreadsheet object.\n     *        Set to false (the default) to ignore charts.\n     *\n     * @return $this\n     */\n    public function setIncludeCharts(bool $includeCharts): self;\n\n    /**\n     * Get Pre-Calculate Formulas flag\n     *     If this is true (the default), then the writer will recalculate all formulae in a workbook when saving,\n     *        so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet\n     *        viewer when opening the file\n     *     If false, then formulae are not calculated on save. This is faster for saving in PhpSpreadsheet, but slower\n     *        when opening the resulting file in MS Excel, because Excel has to recalculate the formulae itself.\n     */\n    public function getPreCalculateFormulas(): bool;\n\n    /**\n     * Set Pre-Calculate Formulas\n     *        Set to true (the default) to advise the Writer to calculate all formulae on save\n     *        Set to false to prevent precalculation of formulae on save.\n     *\n     * @param bool $precalculateFormulas Pre-Calculate Formulas?\n     *\n     * @return $this\n     */\n    public function setPreCalculateFormulas(bool $precalculateFormulas): self;\n\n    /**\n     * Save PhpSpreadsheet to file.\n     *\n     * @param resource|string $filename Name of the file to save\n     * @param int $flags Flags that can change the behaviour of the Writer:\n     *            self::SAVE_WITH_CHARTS                Save any charts that are defined (if the Writer supports Charts)\n     *            self::DISABLE_PRECALCULATE_FORMULAE   Don't Precalculate formulae before saving the file\n     *\n     * @throws Exception\n     */\n    public function save($filename, int $flags = 0): void;\n\n    /**\n     * Get use disk caching where possible?\n     */\n    public function getUseDiskCaching(): bool;\n\n    /**\n     * Set use disk caching where possible?\n     *\n     * @param ?string $cacheDirectory Disk caching directory\n     *\n     * @return $this\n     */\n    public function setUseDiskCaching(bool $useDiskCache, ?string $cacheDirectory = null): self;\n\n    /**\n     * Get disk caching directory.\n     */\n    public function getDiskCachingDirectory(): string;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/AutoFilters.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass AutoFilters\n{\n    private XMLWriter $objWriter;\n\n    private Spreadsheet $spreadsheet;\n\n    public function __construct(XMLWriter $objWriter, Spreadsheet $spreadsheet)\n    {\n        $this->objWriter = $objWriter;\n        $this->spreadsheet = $spreadsheet;\n    }\n\n    public function write(): void\n    {\n        $wrapperWritten = false;\n        $sheetCount = $this->spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            $worksheet = $this->spreadsheet->getSheet($i);\n            $autofilter = $worksheet->getAutoFilter();\n            if (!empty($autofilter->getRange())) {\n                if ($wrapperWritten === false) {\n                    $this->objWriter->startElement('table:database-ranges');\n                    $wrapperWritten = true;\n                }\n                $this->objWriter->startElement('table:database-range');\n                $this->objWriter->writeAttribute('table:orientation', 'column');\n                $this->objWriter->writeAttribute('table:display-filter-buttons', 'true');\n                $this->objWriter->writeAttribute(\n                    'table:target-range-address',\n                    $this->formatRange($worksheet, $autofilter)\n                );\n                $this->objWriter->endElement();\n            }\n        }\n\n        if ($wrapperWritten === true) {\n            $this->objWriter->endElement();\n        }\n    }\n\n    protected function formatRange(Worksheet $worksheet, AutoFilter $autofilter): string\n    {\n        $title = $worksheet->getTitle();\n        $range = $autofilter->getRange();\n\n        return \"'{$title}'.{$range}\";\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\n\n/**\n * @author     Alexander Pervakov <frost-nzcr4@jagmort.com>\n */\nclass Comment\n{\n    public static function write(XMLWriter $objWriter, Cell $cell): void\n    {\n        $comments = $cell->getWorksheet()->getComments();\n        if (!isset($comments[$cell->getCoordinate()])) {\n            return;\n        }\n        $comment = $comments[$cell->getCoordinate()];\n\n        $objWriter->startElement('office:annotation');\n        $objWriter->writeAttribute('svg:width', $comment->getWidth());\n        $objWriter->writeAttribute('svg:height', $comment->getHeight());\n        $objWriter->writeAttribute('svg:x', $comment->getMarginLeft());\n        $objWriter->writeAttribute('svg:y', $comment->getMarginTop());\n        $objWriter->writeElement('dc:creator', $comment->getAuthor());\n\n        $objWriter->startElement('text:p');\n        $text = $comment->getText()->getPlainText();\n        $textElements = explode(\"\\n\", $text);\n        $newLineOwed = false;\n        foreach ($textElements as $textSegment) {\n            if ($newLineOwed) {\n                $objWriter->writeElement('text:line-break');\n            }\n            $newLineOwed = true;\n            if ($textSegment !== '') {\n                $objWriter->writeElement('text:span', $textSegment);\n            }\n        }\n        $objWriter->endElement(); // text:p\n\n        $objWriter->endElement();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Cell/Style.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style as CellStyle;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\ColumnDimension;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\RowDimension;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Style\n{\n    public const CELL_STYLE_PREFIX = 'ce';\n    public const COLUMN_STYLE_PREFIX = 'co';\n    public const ROW_STYLE_PREFIX = 'ro';\n    public const TABLE_STYLE_PREFIX = 'ta';\n    public const INDENT_TO_INCHES = 0.1043; // undocumented, used trial and error\n\n    private XMLWriter $writer;\n\n    /** @var array<string, callable> */\n    private array $additionalNumberFormats;\n\n    /** @param array<string, callable> $additionalNumberFormats */\n    public function __construct(XMLWriter $writer, array $additionalNumberFormats = [])\n    {\n        $this->writer = $writer;\n        $this->additionalNumberFormats = $additionalNumberFormats;\n    }\n\n    public function getWriter(): XMLWriter\n    {\n        return $this->writer;\n    }\n\n    private function mapHorizontalAlignment(?string $horizontalAlignment): string\n    {\n        return match ($horizontalAlignment) {\n            Alignment::HORIZONTAL_CENTER, Alignment::HORIZONTAL_CENTER_CONTINUOUS, Alignment::HORIZONTAL_DISTRIBUTED => 'center',\n            Alignment::HORIZONTAL_RIGHT => 'end',\n            Alignment::HORIZONTAL_FILL, Alignment::HORIZONTAL_JUSTIFY => 'justify',\n            Alignment::HORIZONTAL_GENERAL, '', null => '',\n            default => 'start',\n        };\n    }\n\n    private function mapVerticalAlignment(string $verticalAlignment): string\n    {\n        return match ($verticalAlignment) {\n            Alignment::VERTICAL_TOP => 'top',\n            Alignment::VERTICAL_CENTER => 'middle',\n            Alignment::VERTICAL_DISTRIBUTED, Alignment::VERTICAL_JUSTIFY => 'automatic',\n            default => 'bottom',\n        };\n    }\n\n    private function writeFillStyle(Fill $fill): void\n    {\n        switch ($fill->getFillType()) {\n            case Fill::FILL_SOLID:\n                $this->writer->writeAttribute(\n                    'fo:background-color',\n                    sprintf(\n                        '#%s',\n                        // no idea why strtolower, but it doesn't hurt\n                        strtolower($fill->getStartColor()->getRGB())\n                    )\n                );\n\n                break;\n            case Fill::FILL_NONE:\n                $this->writer->writeAttribute(\n                    'fo:background-color',\n                    'transparent'\n                );\n\n                break;\n            //case Fill::FILL_GRADIENT_LINEAR:\n            //case Fill::FILL_GRADIENT_PATH:\n            // TODO :: To be implemented\n            //break;\n            //default:\n        }\n    }\n\n    private function writeBordersStyle(Borders $borders): void\n    {\n        $this->writeBorderStyle('bottom', $borders->getBottom());\n        $this->writeBorderStyle('left', $borders->getLeft());\n        $this->writeBorderStyle('right', $borders->getRight());\n        $this->writeBorderStyle('top', $borders->getTop());\n        $diagonal = $borders->getDiagonalDirection();\n        if ($diagonal === Borders::DIAGONAL_DOWN || $diagonal === Borders::DIAGONAL_BOTH) {\n            $this->writeBorderStyle('style:diagonal-tl-br', $borders->getDiagonal());\n        }\n        if ($diagonal === Borders::DIAGONAL_UP || $diagonal === Borders::DIAGONAL_BOTH) {\n            $this->writeBorderStyle('style:diagonal-bl-tr', $borders->getDiagonal());\n        }\n    }\n\n    private function writeBorderStyle(string $direction, Border $border): void\n    {\n        if ($border->getBorderStyle() === Border::BORDER_NONE) {\n            return;\n        }\n\n        $attrName = str_starts_with($direction, 'style:') ? $direction : ('fo:border-' . $direction);\n        $this->writer->writeAttribute($attrName, sprintf(\n            '%s %s #%s',\n            $this->mapBorderWidth($border),\n            $this->mapBorderStyle($border),\n            $border->getColor()->getRGB(),\n        ));\n    }\n\n    private const MAP_BORDER_WIDTH = [\n        Border::BORDER_THIN => '0.75pt',\n        Border::BORDER_DASHED => '0.75pt',\n        Border::BORDER_DASHDOT => '0.75pt',\n        Border::BORDER_DASHDOTDOT => '0.75pt',\n        Border::BORDER_DOTTED => '0.75pt',\n        Border::BORDER_HAIR => '0.75pt',\n        // end of thin styles\n        Border::BORDER_MEDIUM => '1.75pt',\n        Border::BORDER_MEDIUMDASHED => '1.75pt',\n        Border::BORDER_MEDIUMDASHDOT => '1.75pt',\n        Border::BORDER_MEDIUMDASHDOTDOT => '1.75pt',\n        Border::BORDER_SLANTDASHDOT => '1.75pt',\n        // end of medium styles\n        Border::BORDER_DOUBLE => '2.5pt',\n        Border::BORDER_THICK => '2.5pt',\n    ];\n\n    private function mapBorderWidth(Border $border): string\n    {\n        return self::MAP_BORDER_WIDTH[$border->getBorderStyle()] ?? '1pt';\n    }\n\n    private const MAP_BORDER_STYLE = [\n        Border::BORDER_DOTTED => 'dotted',\n        Border::BORDER_DASHED => 'dashed',\n        Border::BORDER_MEDIUMDASHED => 'dashed',\n        Border::BORDER_DASHDOT => 'dash-dot',\n        Border::BORDER_MEDIUMDASHDOT => 'dash-dot',\n        Border::BORDER_DASHDOTDOT => 'dash-dot-dot',\n        Border::BORDER_MEDIUMDASHDOTDOT => 'dash-dot-dot',\n        Border::BORDER_SLANTDASHDOT => 'dashed',\n        Border::BORDER_DOUBLE => 'double',\n        Border::BORDER_NONE => 'none',\n        // HAIR, MEDIUM, THICK, THIN fall through to default solid\n    ];\n\n    private function mapBorderStyle(Border $border): string\n    {\n        return self::MAP_BORDER_STYLE[$border->getBorderStyle()] ?? 'solid';\n    }\n\n    // 2d array, 1st index is locked, 2nd is hidden\n    private const PROTECTION_MAP = [\n        Protection::PROTECTION_PROTECTED => [Protection::PROTECTION_PROTECTED => 'protected formula-hidden', Protection::PROTECTION_UNPROTECTED => 'protected'],\n        Protection::PROTECTION_UNPROTECTED => [Protection::PROTECTION_PROTECTED => 'formula-hidden', Protection::PROTECTION_UNPROTECTED => 'none'],\n    ];\n\n    /** @internal */\n    public function writeCellProperties(CellStyle $style): void\n    {\n        // Align\n        $hAlign = $style->getAlignment()->getHorizontal();\n        $hAlign = $this->mapHorizontalAlignment($hAlign);\n        $vAlign = $style->getAlignment()->getVertical();\n        $wrap = $style->getAlignment()->getWrapText();\n        $indent = $style->getAlignment()->getIndent();\n        $readOrder = $style->getAlignment()->getReadOrder();\n        $shrinkToFit = $style->getAlignment()->getShrinkToFit();\n        $textRotation = $style->getAlignment()->getTextRotation();\n\n        $this->writer->startElement('style:table-cell-properties');\n        if (!empty($vAlign) || $wrap) {\n            if (!empty($vAlign)) {\n                $vAlign = $this->mapVerticalAlignment($vAlign);\n                $this->writer->writeAttribute('style:vertical-align', $vAlign);\n            }\n            if ($wrap) {\n                $this->writer->writeAttribute('fo:wrap-option', 'wrap');\n            }\n        }\n        if ($textRotation !== null) {\n            if ($textRotation < 0) {\n                $textRotation += 360;\n            }\n            $this->writer->writeAttribute('style:rotation-angle', (string) $textRotation);\n        }\n        $this->writer->writeAttribute('style:rotation-align', 'none');\n        if ($shrinkToFit) {\n            $this->writer->writeAttribute('style:shrink-to-fit', 'true');\n        }\n\n        // Fill\n        $this->writeFillStyle($style->getFill());\n\n        // Border\n        $this->writeBordersStyle($style->getBorders());\n\n        // protection\n        $protection = self::PROTECTION_MAP[$style->getProtection()->getLocked()][$style->getProtection()->getHidden()] ?? '';\n        if ($protection !== '') {\n            $this->writer->writeAttribute('style:cell-protect', $protection);\n        }\n\n        $this->writer->endElement();\n\n        if ($hAlign !== '' || !empty($indent) || $readOrder === Alignment::READORDER_RTL || $readOrder === Alignment::READORDER_LTR) {\n            $this->writer\n                ->startElement('style:paragraph-properties');\n            if ($hAlign !== '') {\n                $this->writer->writeAttribute('fo:text-align', $hAlign);\n            }\n            if (!empty($indent)) {\n                $indentString = sprintf('%.4f', $indent * self::INDENT_TO_INCHES) . 'in';\n                $this->writer->writeAttribute('fo:margin-left', $indentString);\n            }\n            if ($readOrder === Alignment::READORDER_RTL) {\n                $this->writer->writeAttribute('style:writing-mode', 'rl-tb');\n            } elseif ($readOrder === Alignment::READORDER_LTR) {\n                $this->writer->writeAttribute('style:writing-mode', 'lr-tb');\n            }\n            $this->writer->endElement();\n        }\n    }\n\n    protected function mapUnderlineStyle(Font $font): string\n    {\n        return match ($font->getUnderline()) {\n            Font::UNDERLINE_DOUBLE, Font::UNDERLINE_DOUBLEACCOUNTING => 'double',\n            Font::UNDERLINE_SINGLE, Font::UNDERLINE_SINGLEACCOUNTING => 'single',\n            default => 'none',\n        };\n    }\n\n    /** @internal */\n    public function writeTextProperties(CellStyle $style): void\n    {\n        // Font\n        $this->writer->startElement('style:text-properties');\n\n        $font = $style->getFont();\n\n        if ($font->getBold()) {\n            $this->writer->writeAttribute('fo:font-weight', 'bold');\n            $this->writer->writeAttribute(\n                'style:font-weight-complex',\n                'bold'\n            );\n            $this->writer->writeAttribute(\n                'style:font-weight-asian',\n                'bold'\n            );\n        }\n\n        if ($font->getItalic()) {\n            $this->writer->writeAttribute('fo:font-style', 'italic');\n        }\n\n        if ($font->getAutoColor()) {\n            $this->writer\n                ->writeAttribute('style:use-window-font-color', 'true');\n        } else {\n            $this->writer->writeAttribute('fo:color', sprintf('#%s', $font->getColor()->getRGB()));\n        }\n\n        if ($family = $font->getName()) {\n            $this->writer->writeAttribute('fo:font-family', $family);\n        }\n\n        if ($size = $font->getSize()) {\n            $this->writer->writeAttribute('fo:font-size', ($size == (int) $size) ? sprintf('%dpt', $size) : sprintf('%.1Fpt', $size));\n        }\n\n        if ($font->getUnderline() && $font->getUnderline() !== Font::UNDERLINE_NONE) {\n            $this->writer\n                ->writeAttribute('style:text-underline-style', 'solid');\n            $this->writer\n                ->writeAttribute('style:text-underline-width', 'auto');\n            $this->writer\n                ->writeAttribute('style:text-underline-color', 'font-color');\n\n            $underline = $this->mapUnderlineStyle($font);\n            $this->writer\n                ->writeAttribute('style:text-underline-type', $underline);\n        }\n\n        if ($font->getStrikethrough()) {\n            $this->writer\n                ->writeAttribute('style:text-line-through-style', 'solid');\n            $this->writer\n                ->writeAttribute('style:text-line-through-type', 'single');\n        }\n\n        $this->writer->endElement(); // Close style:text-properties\n    }\n\n    protected function writeColumnProperties(ColumnDimension $columnDimension): void\n    {\n        $this->writer->startElement('style:table-column-properties');\n        $this->writer->writeAttribute(\n            'style:column-width',\n            round($columnDimension->getWidth(Dimension::UOM_CENTIMETERS), 3) . 'cm'\n        );\n        $this->writer->writeAttribute('fo:break-before', 'auto');\n\n        // End\n        $this->writer->endElement(); // Close style:table-column-properties\n    }\n\n    public function writeColumnStyles(ColumnDimension $columnDimension, int $sheetId): void\n    {\n        $this->writer->startElement('style:style');\n        $this->writer->writeAttribute('style:family', 'table-column');\n        $this->writer->writeAttribute(\n            'style:name',\n            sprintf('%s_%d_%d', self::COLUMN_STYLE_PREFIX, $sheetId, $columnDimension->getColumnNumeric())\n        );\n\n        $this->writeColumnProperties($columnDimension);\n\n        // End\n        $this->writer->endElement(); // Close style:style\n    }\n\n    protected function writeRowProperties(RowDimension $rowDimension): void\n    {\n        $this->writer->startElement('style:table-row-properties');\n        $this->writer->writeAttribute(\n            'style:row-height',\n            round($rowDimension->getRowHeight(Dimension::UOM_CENTIMETERS), 3) . 'cm'\n        );\n        $this->writer->writeAttribute('style:use-optimal-row-height', 'false');\n        $this->writer->writeAttribute('fo:break-before', 'auto');\n\n        // End\n        $this->writer->endElement(); // Close style:table-row-properties\n    }\n\n    public function writeRowStyles(RowDimension $rowDimension, int $sheetId): void\n    {\n        $this->writer->startElement('style:style');\n        $this->writer->writeAttribute('style:family', 'table-row');\n        $this->writer->writeAttribute(\n            'style:name',\n            sprintf('%s_%d_%d', self::ROW_STYLE_PREFIX, $sheetId, $rowDimension->getRowIndex())\n        );\n\n        $this->writeRowProperties($rowDimension);\n\n        // End\n        $this->writer->endElement(); // Close style:style\n    }\n\n    public function writeDefaultRowStyle(RowDimension $rowDimension, int $sheetId): void\n    {\n        $this->writer->startElement('style:style');\n        $this->writer->writeAttribute('style:family', 'table-row');\n        $this->writer->writeAttribute(\n            'style:name',\n            sprintf('%s%d', self::ROW_STYLE_PREFIX, $sheetId)\n        );\n\n        $this->writeRowProperties($rowDimension);\n\n        // End\n        $this->writer->endElement(); // Close style:style\n    }\n\n    public function writeTableStyle(Worksheet $worksheet, int $sheetId): void\n    {\n        $this->writer->startElement('style:style');\n        $this->writer->writeAttribute('style:family', 'table');\n        $this->writer->writeAttribute(\n            'style:name',\n            sprintf('%s%d', self::TABLE_STYLE_PREFIX, $sheetId)\n        );\n        $this->writer->writeAttribute('style:master-page-name', 'Default');\n\n        $this->writer->startElement('style:table-properties');\n\n        $this->writer->writeAttribute(\n            'table:display',\n            $worksheet->getSheetState() === Worksheet::SHEETSTATE_VISIBLE ? 'true' : 'false'\n        );\n\n        $this->writer->endElement(); // Close style:table-properties\n        $this->writer->endElement(); // Close style:style\n    }\n\n    private int $numFmtIndex = 199;\n\n    /** @var array<string, string> */\n    private array $numFmtIndexes = [];\n\n    private function writeNumFmt(string $numFmt): void\n    {\n        if (array_key_exists($numFmt, $this->numFmtIndexes)) {\n            return;\n        }\n        $method = $this->additionalNumberFormats[$numFmt] ?? self::NUMBER_FORMAT_METHODS[$numFmt] ?? null;\n        if ($method === null) {\n            return;\n        }\n        ++$this->numFmtIndex;\n        $name = 'N' . $this->numFmtIndex;\n        $this->numFmtIndexes[$numFmt] = $name;\n        $method($this, $name);\n    }\n\n    public function write(CellStyle $style): void\n    {\n        $numFmt = (string) $style->getNumberFormat()->getFormatCode();\n        $this->writeNumFmt($numFmt);\n        $this->writer->startElement('style:style');\n        $this->writer->writeAttribute('style:name', self::CELL_STYLE_PREFIX . $style->getIndex());\n        $this->writer->writeAttribute('style:family', 'table-cell');\n        $this->writer->writeAttribute('style:parent-style-name', 'Default');\n        if (array_key_exists($numFmt, $this->numFmtIndexes)) {\n            $this->writer->writeAttribute(\n                'style:data-style-name',\n                $this->numFmtIndexes[$numFmt]\n            );\n        }\n\n        // Alignment, fill colour, etc\n        $this->writeCellProperties($style);\n\n        // style:text-properties\n        $this->writeTextProperties($style);\n\n        // End\n        $this->writer->endElement(); // Close style:style\n    }\n\n    private const NUMBER_FORMAT_METHODS = [\n        NumberFormat::FORMAT_NUMBER => [self::class, 'formatNumber'],\n        NumberFormat::FORMAT_NUMBER_0 => [self::class, 'formatNumber0'],\n        NumberFormat::FORMAT_NUMBER_00 => [self::class, 'formatNumber00'],\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1 => [self::class, 'formatNumberCommaSeparated1'],\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2 => [self::class, 'formatNumberCommaSeparated2'],\n        NumberFormat::FORMAT_PERCENTAGE => [self::class, 'formatPercentage'],\n        NumberFormat::FORMAT_PERCENTAGE_0 => [self::class, 'formatPercentage0'],\n        NumberFormat::FORMAT_PERCENTAGE_00 => [self::class, 'formatPercentage00'],\n        NumberFormat::FORMAT_DATE_YYYYMMDD => [self::class, 'formatDateYyyymmdd'],\n        NumberFormat::FORMAT_DATE_DDMMYYYY => [self::class, 'formatDateDdmmyyyy'],\n        NumberFormat::FORMAT_DATE_DMYSLASH => [self::class, 'formatDateDmyslash'],\n        NumberFormat::FORMAT_DATE_DMYMINUS => [self::class, 'formatDateDmyminus'],\n        NumberFormat::FORMAT_DATE_DMMINUS => [self::class, 'formatDateDmminus'],\n        NumberFormat::FORMAT_DATE_MYMINUS => [self::class, 'formatDateMyminus'],\n        NumberFormat::FORMAT_DATE_XLSX14 => [self::class, 'formatDateXlsx14'],\n        NumberFormat::FORMAT_DATE_XLSX14_ACTUAL => [self::class, 'formatDateXlsx14Actual'],\n        NumberFormat::FORMAT_DATE_XLSX15 => [self::class, 'formatDateXlsx15'],\n        NumberFormat::FORMAT_DATE_XLSX15_YYYY => [self::class, 'formatDateXlsx15Yyyy'],\n        NumberFormat::FORMAT_DATE_XLSX16 => [self::class, 'formatDateXlsx16'],\n        NumberFormat::FORMAT_DATE_XLSX17 => [self::class, 'formatDateXlsx17'],\n        NumberFormat::FORMAT_DATE_XLSX22 => [self::class, 'formatDateXlsx22'],\n        NumberFormat::FORMAT_DATE_XLSX22_ACTUAL => [self::class, 'formatDateXlsx22Actual'],\n        NumberFormat::FORMAT_DATE_DATETIME => [self::class, 'formatDateDatetime'],\n        NumberFormat::FORMAT_DATE_DATETIME_BETTER => [self::class, 'formatDateDatetimeBetter'],\n        NumberFormat::FORMAT_DATE_TIME1 => [self::class, 'formatDateTime1'],\n        NumberFormat::FORMAT_DATE_TIME2 => [self::class, 'formatDateTime2'],\n        NumberFormat::FORMAT_DATE_TIME3 => [self::class, 'formatDateTime3'],\n        NumberFormat::FORMAT_DATE_TIME4 => [self::class, 'formatDateTime4'],\n        NumberFormat::FORMAT_DATE_TIME5 => [self::class, 'formatDateTime5'],\n        //NumberFormat::FORMAT_DATE_TIME6 => [self::class, 'formatDateTime6'], // FORMAT_DATE_TIME6 is identical to TIME4\n        NumberFormat::FORMAT_DATE_TIME7 => [self::class, 'formatDateTime7'], // constant is probably mis-coded\n        NumberFormat::FORMAT_DATE_TIME8 => [self::class, 'formatDateTime8'],\n        NumberFormat::FORMAT_DATE_TIME_INTERVAL_HMS => [self::class, 'formatDateTimeIntervalHms'],\n        NumberFormat::FORMAT_DATE_YYYYMMDDSLASH => [self::class, 'formatDateYyyymmddslash'],\n        NumberFormat::FORMAT_DATE_LONG_DATE => [self::class, 'formatDateLongDate'],\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER => [self::class, 'formatCurrencyUsdInteger'],\n        NumberFormat::FORMAT_CURRENCY_USD => [self::class, 'formatCurrencyUsd'],\n        NumberFormat::FORMAT_ACCOUNTING_USD => [self::class, 'formatCurrencyUsd'], // ACCOUNTING and CURRENCY are same in Ods\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER => [self::class, 'formatCurrencyEurInteger'],\n        NumberFormat::FORMAT_CURRENCY_EUR => [self::class, 'formatCurrencyEur'],\n        NumberFormat::FORMAT_ACCOUNTING_EUR => [self::class, 'formatCurrencyEur'], // ACCOUNTING and CURRENCY are same in Ods\n        NumberFormat::FORMAT_CURRENCY_GBP_INTEGER => [self::class, 'formatCurrencyGbpInteger'],\n        NumberFormat::FORMAT_CURRENCY_GBP => [self::class, 'formatCurrencyGbp'],\n        NumberFormat::FORMAT_CURRENCY_YEN_YUAN_INTEGER => [self::class, 'formatCurrencyYenYuanInteger'],\n        NumberFormat::FORMAT_CURRENCY_YEN_YUAN => [self::class, 'formatCurrencyYenYuan'],\n    ];\n\n    protected static function formatNumber(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:number-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->endElement(); // number:number-style\n    }\n\n    protected static function formatNumber0(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:number-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $obj->writer->writeAttribute('number:decimal-places', '1');\n        $obj->writer->writeAttribute('number:min-decimal-places', '1');\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->endElement(); // number:number-style\n    }\n\n    protected static function formatNumber00(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:number-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $obj->writer->writeAttribute('number:decimal-places', '2');\n        $obj->writer->writeAttribute('number:min-decimal-places', '2');\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->endElement(); // number:number-style\n    }\n\n    protected static function formatNumberCommaSeparated1(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:number-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $obj->writer->writeAttribute('number:decimal-places', '2');\n        $obj->writer->writeAttribute('number:min-decimal-places', '2');\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->writeAttribute('number:grouping', 'true');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->endElement(); // number:number-style\n    }\n\n    protected static function formatNumberCommaSeparated2(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:number-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $obj->writer->writeAttribute('number:decimal-places', '2');\n        $obj->writer->writeAttribute('number:min-decimal-places', '2');\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->writeAttribute('number:grouping', 'true');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->startElement('number:text');\n        //$obj->writer->writeAttribute('loext:blank-width-char', '-');\n        $obj->writer->text(' ');\n        $obj->writer->endElement(); // number:text\n        $obj->writer->endElement(); // number:number-style\n    }\n\n    protected static function formatPercentage(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:percentage-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $obj->writer->writeAttribute('number:decimal-places', '0');\n        $obj->writer->writeAttribute('number:min-decimal-places', '0');\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->writeElement('number:text', '%');\n        $obj->writer->endElement(); // number:percentage-style\n    }\n\n    protected static function formatPercentage0(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:percentage-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $obj->writer->writeAttribute('number:decimal-places', '1');\n        $obj->writer->writeAttribute('number:min-decimal-places', '1');\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->writeElement('number:text', '%');\n        $obj->writer->endElement(); // number:percentage-style\n    }\n\n    protected static function formatPercentage00(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:percentage-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $obj->writer->writeAttribute('number:decimal-places', '2');\n        $obj->writer->writeAttribute('number:min-decimal-places', '2');\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->writeElement('number:text', '%');\n        $obj->writer->endElement(); // number:percentage-style\n    }\n\n    protected static function formatDateYyyymmdd(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:year');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:day');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateDdmmyyyy(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:day');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:year');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateDmyslash(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:day');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->writeElement('number:month');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->writeElement('number:year');\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateDmyminus(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:day');\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->writeElement('number:month');\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->writeElement('number:year');\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateDmminus(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:day');\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->writeElement('number:month');\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateMyminus(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:month');\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->writeElement('number:year');\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateXlsx14(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:day');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->writeElement('number:year');\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateXlsx14Actual(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:month');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->writeElement('number:day');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->startElement('number:year');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateXlsx15(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:day');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:textual', 'true');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->writeElement('number:year');\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateXlsx15Yyyy(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:day');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:textual', 'true');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:year');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateXlsx16(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:day');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:textual', 'true');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateXlsx17(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:textual', 'true');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->writeElement('number:year');\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateXlsx22(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:month');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->writeElement('number:day');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->startElement('number:year');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->writeElement('number:text', ' ');\n        $obj->writer->writeElement('number:hours');\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateXlsx22Actual(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:month');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->writeElement('number:day');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->startElement('number:year');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->writeElement('number:text', ' ');\n        $obj->writer->writeElement('number:hours');\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateDatetime(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:day');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->writeElement('number:month');\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->startElement('number:year');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->writeElement('number:text', ' ');\n        $obj->writer->writeElement('number:hours');\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateDatetimeBetter(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:year');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', '-');\n        $obj->writer->startElement('number:day');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day\n        $obj->writer->writeElement('number:text', ' ');\n        $obj->writer->startElement('number:hours');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:hours\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatDateTime1(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:time-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:hours');\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->writeElement('number:text', ' ');\n        $obj->writer->writeElement('number:am-pm');\n        $obj->writer->endElement(); // number:time-style\n    }\n\n    protected static function formatDateTime2(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:time-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:hours');\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:seconds');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:seconds\n        $obj->writer->writeElement('number:text', ' ');\n        $obj->writer->writeElement('number:am-pm');\n        $obj->writer->endElement(); // number:time-style\n    }\n\n    protected static function formatDateTime3(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:time-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:hours');\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->endElement(); // number:time-style\n    }\n\n    protected static function formatDateTime4(self $obj, string $name): void\n    {\n        // TIME4 and TIME6 are identical\n        $obj->writer->startElement('number:time-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:hours');\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:seconds');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:seconds\n        $obj->writer->endElement(); // number:time-style\n    }\n\n    protected static function formatDateTime5(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:time-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:seconds');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:seconds\n        $obj->writer->endElement(); // number:time-style\n    }\n\n    protected static function formatDateTime7(self $obj, string $name): void\n    {\n        // constant is probably mis-coded\n        $obj->writer->startElement('number:time-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:seconds');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:seconds\n        $obj->writer->endElement(); // number:time-style\n    }\n\n    protected static function formatDateTime8(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:time-style');\n        $obj->writer->writeAttribute('style:name', $name . 'P0');\n        $obj->writer->writeElement('number:hours');\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:seconds');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:seconds\n        $obj->writer->endElement(); // number:time-style\n        $obj->writer->startElement('number:text-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:text-content');\n        $obj->writer->startElement('style:map');\n        $obj->writer->writeAttribute('style:condition', 'value()>=0');\n        $obj->writer->writeAttribute('style:apply-style-name', $name . 'P0');\n        $obj->writer->endElement(); // number:style-map\n        $obj->writer->endElement(); // number:text-style\n    }\n\n    protected static function formatDateTimeIntervalHms(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:time-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeAttribute(\n            'number:truncate-on-overflow',\n            'false'\n        );\n        $obj->writer->startElement('number:hours');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:hours\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:minutes');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:minutes\n        $obj->writer->writeElement('number:text', ':');\n        $obj->writer->startElement('number:seconds');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:seconds\n        $obj->writer->endElement(); // number:time-style\n    }\n\n    protected static function formatDateYyyymmddslash(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name . 'P0');\n        $obj->writer->startElement('number:year');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', '/');\n        $obj->writer->startElement('number:day');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day\n        $obj->writer->endElement(); // number:date-style\n        $obj->writer->startElement('number:text-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->writeElement('number:text-content');\n        $obj->writer->startElement('style:map');\n        $obj->writer->writeAttribute('style:condition', 'value()>=0');\n        $obj->writer->writeAttribute('style:apply-style-name', $name . 'P0');\n        $obj->writer->endElement(); // number:style-map\n        $obj->writer->endElement(); // number:text-style\n    }\n\n    protected static function formatDateLongDate(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:date-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:day-of-week');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:day-of-week\n        $obj->writer->writeElement('number:text', ', ');\n        $obj->writer->startElement('number:month');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->writeAttribute('number:textual', 'true');\n        $obj->writer->endElement(); // number:month\n        $obj->writer->writeElement('number:text', ' ');\n        $obj->writer->writeElement('number:day');\n        $obj->writer->writeElement('number:text', ', ');\n        $obj->writer->startElement('number:year');\n        $obj->writer->writeAttribute('number:style', 'long');\n        $obj->writer->endElement(); // number:year\n        $obj->writer->endElement(); // number:date-style\n    }\n\n    protected static function formatCurrencyUsdInteger(self $obj, string $name, string $symbol = '$'): void\n    {\n        $obj->writer->startElement('number:number-style'); // not currency-style\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->WriteElement('number:text', $symbol);\n        $obj->writer->startElement('number:number');\n        $decimals = '0';\n        $obj->writer->writeAttribute('number:decimal-places', $decimals);\n        $obj->writer->writeAttribute('number:min-decimal-places', $decimals);\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->writeAttribute('number:grouping', 'true');\n        $obj->writer->startElement('number:embedded-text');\n        $obj->writer->writeAttribute('number-position', '0');\n        $obj->writer->text(' ');\n        $obj->writer->endElement(); // number:embedded-text\n        $obj->writer->endElement(); // number:number\n        $obj->writer->endElement(); // number:number-style\n    }\n\n    protected static function formatCurrencyGbpInteger(self $obj, string $name): void\n    {\n        self::formatCurrencyUsdInteger($obj, $name, '£');\n    }\n\n    protected static function formatCurrencyYenYuanInteger(self $obj, string $name): void\n    {\n        self::formatCurrencyUsdInteger($obj, $name, '￥');\n    }\n\n    protected static function formatCurrencyUsd(self $obj, string $name, string $symbol = '$'): void\n    {\n        // Ods uses same format for Currency and Accounting\n        $obj->writer->startElement('number:number-style'); // NOT currency-style\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->WriteElement('number:text', $symbol);\n        $obj->writer->startElement('number:number');\n        $decimals = '2';\n        $obj->writer->writeAttribute('number:decimal-places', $decimals);\n        $obj->writer->writeAttribute('number:min-decimal-places', $decimals);\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->writeAttribute('number:grouping', 'true');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->writeElement('number:text', ' ');\n        $obj->writer->endElement(); // number:currency-style\n    }\n\n    protected static function formatCurrencyGbp(self $obj, string $name): void\n    {\n        self::formatCurrencyUsd($obj, $name, '£');\n    }\n\n    protected static function formatCurrencyYenYuan(self $obj, string $name): void\n    {\n        self::formatCurrencyUsd($obj, $name, '￥');\n    }\n\n    protected static function formatCurrencyEurInteger(self $obj, string $name): void\n    {\n        $obj->writer->startElement('number:currency-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $decimals = '0';\n        $obj->writer->writeAttribute('number:decimal-places', $decimals);\n        $obj->writer->writeAttribute('number:min-decimal-places', $decimals);\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->writeAttribute('number:grouping', 'true');\n        $obj->writer->startElement('number:embedded-text');\n        $obj->writer->writeAttribute('number:position', '0');\n        $obj->writer->endElement(); // number:embedded-text\n        $obj->writer->endElement(); // number:number\n        $obj->writer->startElement('number:text');\n        // $obj->writer->writeAttribute('loext:blank-width-char', '-');\n        $obj->writer->text(' ');\n        $obj->writer->endElement(); // number:text\n        $obj->writer->startElement('number:currency-symbol');\n        $obj->writer->writeAttribute('number:language', 'en');\n        $obj->writer->writeAttribute('number:country', 'us');\n        $obj->writer->text('€');\n        $obj->writer->endElement(); // number:currency-symbol\n\n        $obj->writer->endElement(); // number:currency-style\n    }\n\n    protected static function formatCurrencyEur(self $obj, string $name): void\n    {\n        // Ods uses same format for Currency and Accounting\n        $obj->writer->startElement('number:currency-style');\n        $obj->writer->writeAttribute('style:name', $name);\n        $obj->writer->startElement('number:number');\n        $decimals = '2';\n        $obj->writer->writeAttribute('number:decimal-places', $decimals);\n        $obj->writer->writeAttribute('number:min-decimal-places', $decimals);\n        $obj->writer->writeAttribute('number:min-integer-digits', '1');\n        $obj->writer->writeAttribute('number:grouping', 'true');\n        $obj->writer->endElement(); // number:number\n        $obj->writer->startElement('number:text');\n        // $obj->writer->writeAttribute('loext:blank-width-char', '-');\n        $obj->writer->text(' ');\n        $obj->writer->endElement(); // number:text\n        $obj->writer->startElement('number:currency-symbol');\n        $obj->writer->writeAttribute('number:language', 'en');\n        $obj->writer->writeAttribute('number:country', 'us');\n        $obj->writer->text('€');\n        $obj->writer->endElement(); // number:currency-symbol\n\n        $obj->writer->endElement(); // number:currency-style\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Content.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\RowCellIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Cell\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Cell\\Style;\n\n/**\n * @author     Alexander Pervakov <frost-nzcr4@jagmort.com>\n */\nclass Content extends WriterPart\n{\n    private Formula $formulaConvertor;\n\n    /**\n     * Set parent Ods writer.\n     */\n    public function __construct(Ods $writer)\n    {\n        parent::__construct($writer);\n\n        $this->formulaConvertor = new Formula($this->getParentWriter()->getSpreadsheet()->getDefinedNames());\n    }\n\n    /**\n     * Write content.xml to XML format.\n     *\n     * @return string XML Output\n     */\n    public function write(): string\n    {\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8');\n\n        // Content\n        $objWriter->startElement('office:document-content');\n        $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');\n        $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0');\n        $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0');\n        $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0');\n        $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0');\n        $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0');\n        $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n        $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/');\n        $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0');\n        $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0');\n        $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0');\n        $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0');\n        $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0');\n        $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0');\n        $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML');\n        $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0');\n        $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0');\n        $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');\n        $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer');\n        $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc');\n        $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events');\n        $objWriter->writeAttribute('xmlns:xforms', 'http://www.w3.org/2002/xforms');\n        $objWriter->writeAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema');\n        $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');\n        $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report');\n        $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2');\n        $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml');\n        $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#');\n        $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table');\n        $objWriter->writeAttribute('xmlns:field', 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0');\n        $objWriter->writeAttribute('xmlns:formx', 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0');\n        $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/');\n        $objWriter->writeAttribute('office:version', '1.2');\n\n        $objWriter->writeElement('office:scripts');\n        $objWriter->writeElement('office:font-face-decls');\n\n        // Styles XF\n        $objWriter->startElement('office:automatic-styles');\n        $this->writeXfStyles($objWriter, $this->getParentWriter()->getSpreadsheet());\n        $objWriter->endElement();\n\n        $objWriter->startElement('office:body');\n        $objWriter->startElement('office:spreadsheet');\n        $objWriter->writeElement('table:calculation-settings');\n\n        $this->writeSheets($objWriter);\n\n        (new AutoFilters($objWriter, $this->getParentWriter()->getSpreadsheet()))->write();\n        // Defined names (ranges and formulae)\n        (new NamedExpressions($objWriter, $this->getParentWriter()->getSpreadsheet(), $this->formulaConvertor))->write();\n\n        $objWriter->endElement();\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write sheets.\n     */\n    private function writeSheets(XMLWriter $objWriter): void\n    {\n        $spreadsheet = $this->getParentWriter()->getSpreadsheet();\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($sheetIndex = 0; $sheetIndex < $sheetCount; ++$sheetIndex) {\n            $spreadsheet->getSheet($sheetIndex)->calculateArrays($this->getParentWriter()->getPreCalculateFormulas());\n            $objWriter->startElement('table:table');\n            $objWriter->writeAttribute('table:name', $spreadsheet->getSheet($sheetIndex)->getTitle());\n            $objWriter->writeAttribute('table:style-name', Style::TABLE_STYLE_PREFIX . (string) ($sheetIndex + 1));\n            $objWriter->writeElement('office:forms');\n            $lastColumn = 0;\n            foreach ($spreadsheet->getSheet($sheetIndex)->getColumnDimensions() as $columnDimension) {\n                $thisColumn = $columnDimension->getColumnNumeric();\n                $emptyColumns = $thisColumn - $lastColumn - 1;\n                if ($emptyColumns > 0) {\n                    $objWriter->startElement('table:table-column');\n                    $objWriter->writeAttribute('table:number-columns-repeated', (string) $emptyColumns);\n                    $objWriter->endElement();\n                }\n                $lastColumn = $thisColumn;\n                $objWriter->startElement('table:table-column');\n                $objWriter->writeAttribute(\n                    'table:style-name',\n                    sprintf('%s_%d_%d', Style::COLUMN_STYLE_PREFIX, $sheetIndex, $columnDimension->getColumnNumeric())\n                );\n                $objWriter->endElement();\n            }\n            $this->writeRows($objWriter, $spreadsheet->getSheet($sheetIndex), $sheetIndex);\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write rows of the specified sheet.\n     */\n    private function writeRows(XMLWriter $objWriter, Worksheet $sheet, int $sheetIndex): void\n    {\n        $spanRow = 0;\n        $rows = $sheet->getRowIterator();\n        foreach ($rows as $row) {\n            $cellIterator = $row->getCellIterator(iterateOnlyExistingCells: true);\n            $cellIterator->rewind();\n            $rowStyleExists = $sheet->rowDimensionExists($row->getRowIndex()) && $sheet->getRowDimension($row->getRowIndex())->getRowHeight() > 0;\n            if ($cellIterator->valid() || $rowStyleExists) {\n                if ($spanRow) {\n                    $objWriter->startElement('table:table-row');\n                    $objWriter->writeAttribute(\n                        'table:number-rows-repeated',\n                        (string) $spanRow\n                    );\n                    $objWriter->endElement();\n                    $spanRow = 0;\n                }\n                $objWriter->startElement('table:table-row');\n                if ($rowStyleExists) {\n                    $objWriter->writeAttribute(\n                        'table:style-name',\n                        sprintf('%s_%d_%d', Style::ROW_STYLE_PREFIX, $sheetIndex, $row->getRowIndex())\n                    );\n                } elseif ($sheet->getDefaultRowDimension()->getRowHeight() > 0.0 && !$sheet->getRowDimension($row->getRowIndex())->getCustomFormat()) {\n                    $objWriter->writeAttribute(\n                        'table:style-name',\n                        sprintf('%s%d', Style::ROW_STYLE_PREFIX, $sheetIndex)\n                    );\n                }\n                $this->writeCells($objWriter, $cellIterator);\n                $objWriter->endElement();\n            } else {\n                ++$spanRow;\n            }\n        }\n    }\n\n    /**\n     * Write cells of the specified row.\n     */\n    private function writeCells(XMLWriter $objWriter, RowCellIterator $cells): void\n    {\n        $prevColumn = -1;\n        foreach ($cells as $cell) {\n            /** @var Cell $cell */\n            $column = Coordinate::columnIndexFromString($cell->getColumn()) - 1;\n            $attributes = $cell->getFormulaAttributes() ?? [];\n\n            $this->writeCellSpan($objWriter, $column, $prevColumn);\n            $objWriter->startElement('table:table-cell');\n            $this->writeCellMerge($objWriter, $cell);\n\n            // Style XF\n            $style = $cell->getXfIndex();\n            $objWriter->writeAttribute('table:style-name', Style::CELL_STYLE_PREFIX . $style);\n\n            switch ($cell->getDataType()) {\n                case DataType::TYPE_BOOL:\n                    $objWriter->writeAttribute('office:value-type', 'boolean');\n                    $objWriter->writeAttribute('office:boolean-value', $cell->getValue() ? 'true' : 'false');\n                    $objWriter->writeElement('text:p', Calculation::getInstance()->getLocaleBoolean($cell->getValue() ? 'TRUE' : 'FALSE'));\n\n                    break;\n                case DataType::TYPE_ERROR:\n                    $objWriter->writeAttribute('table:formula', 'of:=#NULL!');\n                    $objWriter->writeAttribute('office:value-type', 'string');\n                    $objWriter->writeAttribute('office:string-value', '');\n                    $objWriter->writeElement('text:p', '#NULL!');\n\n                    break;\n                case DataType::TYPE_FORMULA:\n                    $formulaValue = $cell->getValueString();\n                    $formulaValueCalc = $formulaValue;\n                    if ($this->getParentWriter()->getPreCalculateFormulas()) {\n                        try {\n                            $formulaValue = $cell->getCalculatedValueString();\n                            $formulaValueCalc = $cell->getCalculatedValue();\n                        } catch (CalculationException $e) {\n                            $formulaValue = $formulaValueCalc = ExcelError::CALC();\n                        }\n                    }\n                    if (isset($attributes['ref'])) {\n                        if (Preg::isMatch('/^([A-Z]{1,3})([0-9]{1,7})(:([A-Z]{1,3})([0-9]{1,7}))?$/', (string) $attributes['ref'], $matches)) {\n                            $matrixRowSpan = 1;\n                            $matrixColSpan = 1;\n                            if (isset($matches[3])) {\n                                $minRow = (int) $matches[2];\n                                $maxRow = (int) $matches[5];\n                                $matrixRowSpan = $maxRow - $minRow + 1;\n                                $minCol = Coordinate::columnIndexFromString($matches[1]);\n                                $maxCol = Coordinate::columnIndexFromString($matches[4]);\n                                $matrixColSpan = $maxCol - $minCol + 1;\n                            }\n                            $objWriter->writeAttribute('table:number-matrix-columns-spanned', \"$matrixColSpan\");\n                            $objWriter->writeAttribute('table:number-matrix-rows-spanned', \"$matrixRowSpan\");\n                        }\n                    }\n                    $objWriter->writeAttribute('table:formula', $this->formulaConvertor->convertFormula($cell->getValueString()));\n                    if (is_bool($formulaValueCalc)) {\n                        $objWriter->writeAttribute(\n                            'office:value-type',\n                            'boolean'\n                        );\n                        $objWriter->writeAttribute(\n                            'office:boolean-value',\n                            $formulaValueCalc ? 'true' : 'false'\n                        );\n                        $objWriter->writeElement('text:p', $formulaValueCalc ? 'TRUE' : 'FALSE');\n\n                        break;\n                    }\n                    if (!is_numeric($formulaValue)) {\n                        $objWriter->writeAttribute(\n                            'office:value-type',\n                            'string'\n                        );\n                        $objWriter->writeAttribute(\n                            'office:string-value',\n                            $formulaValue\n                        );\n                        $objWriter->writeElement('text:p', $formulaValue);\n\n                        break;\n                    }\n                    // no break\n                case DataType::TYPE_NUMERIC:\n                    $holdWorksheet = $cell->getWorksheet();\n                    $holdSelected = $holdWorksheet->getSelectedCells();\n                    $holdSpreadsheet = $holdWorksheet->getParent();\n                    $holdActiveSheetIndex = $holdSpreadsheet?->getActiveSheetIndex();\n                    $formatted = $cell->getFormattedValue();\n                    $type = 'float';\n                    $valueType = 'value';\n                    $value = $cell->getCalculatedValueString();\n                    $numFmt = $cell->getStyle()\n                        ->getNumberFormat()\n                        ->getFormatCode() ?? '';\n                    $holdWorksheet->setSelectedCells($holdSelected);\n                    if (isset($holdSpreadsheet, $holdActiveSheetIndex)) {\n                        $holdSpreadsheet->setActiveSheetIndex(\n                            $holdActiveSheetIndex\n                        );\n                    }\n                    if (Date::isDateTimeFormatCode($numFmt, true)) {\n                        $valueCalc = $cell->getCalculatedValueString();\n                        if (Preg::isMatch('/[HhSs]/', $numFmt) && !Preg::isMatch('/[YyDd]/', $numFmt)) {\n                            $minus = '';\n                            $type = 'time';\n                            $valueType = 'time-value';\n                            if (str_starts_with($valueCalc, '-')) {\n                                $minus = '-';\n                                $absVal = fmod(abs((float) $value), 1.0);\n                                $hms = (int) round(86400 * $absVal);\n                                $hours = intdiv($hms, 3600);\n                                $hms -= $hours * 3600;\n                                $minutes = intdiv($hms, 60);\n                                $seconds = $hms % 60;\n                                $value = sprintf('-PT%02dH%02dM%02dS', $hours, $minutes, $seconds);\n                                $formatted = sprintf('-%02d:%02d:%02d', $hours, $minutes, $seconds);\n                            } else {\n                                $hhmmss = NumberFormat::toFormattedString(\n                                    $value,\n                                    NumberFormat::FORMAT_DATE_TIME_INTERVAL_HMS\n                                );\n                                $daysAndHours = 24 * (int) $valueCalc + (int) substr($hhmmss, 0, 2);\n                                $value = \"PT$daysAndHours\"\n                                    . 'H'\n                                    . substr($hhmmss, 3, 2)\n                                    . 'M'\n                                    . substr($hhmmss, 6, 2)\n                                    . 'S';\n                            }\n                        } else {\n                            $type = 'date';\n                            $valueType = 'date-value';\n                            $value = NumberFormat::toFormattedString(\n                                $value,\n                                'yyyy-mm-dd\"T\"hh:mm:ss'\n                            );\n                        }\n                    } elseif (str_ends_with($numFmt, '%')) {\n                        $type = 'percentage';\n                    }\n                    if ($numFmt === NumberFormat::FORMAT_CURRENCY_EUR || $numFmt === NumberFormat::FORMAT_CURRENCY_EUR_INTEGER) {\n                        $objWriter->writeAttribute(\n                            'office:value-type',\n                            'currency'\n                        );\n                        $objWriter->writeAttribute(\n                            'office:currency',\n                            'EUR'\n                        );\n                        $objWriter->writeAttribute(\n                            'office:value',\n                            $value\n                        );\n                    } else {\n                        $objWriter->writeAttribute(\n                            'office:value-type',\n                            $type\n                        );\n                        $objWriter->writeAttribute(\n                            \"office:$valueType\",\n                            $value\n                        );\n                    }\n                    $objWriter->writeElement('text:p', $formatted);\n\n                    break;\n                case DataType::TYPE_INLINE:\n                    // break intentionally omitted\n                case DataType::TYPE_STRING:\n                    $objWriter->writeAttribute('office:value-type', 'string');\n                    $url = $cell->getHyperlink()->getUrl();\n                    if (empty($url)) {\n                        $objWriter->writeElement('text:p', $cell->getValueString());\n                    } else {\n                        $objWriter->startElement('text:p');\n                        $objWriter->startElement('text:a');\n                        $sheets = 'sheet://';\n                        $lensheets = strlen($sheets);\n                        if (substr($url, 0, $lensheets) === $sheets) {\n                            $url = '#' . substr($url, $lensheets);\n                        }\n                        $objWriter->writeAttribute('xlink:href', $url);\n                        $objWriter->writeAttribute('xlink:type', 'simple');\n                        $objWriter->text($cell->getValueString());\n                        $objWriter->endElement(); // text:a\n                        $objWriter->endElement(); // text:p\n                    }\n\n                    break;\n            }\n            Comment::write($objWriter, $cell);\n            $objWriter->endElement();\n            $prevColumn = $column;\n        }\n    }\n\n    /**\n     * Write span.\n     */\n    private function writeCellSpan(XMLWriter $objWriter, int $curColumn, int $prevColumn): void\n    {\n        $diff = $curColumn - $prevColumn - 1;\n        if (1 === $diff) {\n            $objWriter->writeElement('table:table-cell');\n        } elseif ($diff > 1) {\n            $objWriter->startElement('table:table-cell');\n            $objWriter->writeAttribute('table:number-columns-repeated', (string) $diff);\n            $objWriter->endElement();\n        }\n    }\n\n    /** @var array<string, callable> */\n    public array $additionalNumberFormats = [];\n\n    /**\n     * Write XF cell styles.\n     */\n    private function writeXfStyles(XMLWriter $writer, Spreadsheet $spreadsheet): void\n    {\n        $styleWriter = new Style($writer, $this->additionalNumberFormats);\n\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            $worksheet = $spreadsheet->getSheet($i);\n            $styleWriter->writeTableStyle($worksheet, $i + 1);\n\n            $worksheet->calculateColumnWidths();\n            foreach ($worksheet->getColumnDimensions() as $columnDimension) {\n                if ($columnDimension->getWidth() !== -1.0) {\n                    $styleWriter->writeColumnStyles($columnDimension, $i);\n                }\n            }\n        }\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            $worksheet = $spreadsheet->getSheet($i);\n            $default = $worksheet->getDefaultRowDimension();\n            if ($default->getRowHeight() > 0.0) {\n                $styleWriter->writeDefaultRowStyle($default, $i);\n            }\n            foreach ($worksheet->getRowDimensions() as $rowDimension) {\n                if ($rowDimension->getRowHeight() > 0.0) {\n                    $styleWriter->writeRowStyles($rowDimension, $i);\n                }\n            }\n        }\n\n        foreach ($spreadsheet->getCellXfCollection() as $style) {\n            $styleWriter->write($style);\n        }\n    }\n\n    /**\n     * Write attributes for merged cell.\n     */\n    private function writeCellMerge(XMLWriter $objWriter, Cell $cell): void\n    {\n        if (!$cell->isMergeRangeValueCell()) {\n            return;\n        }\n\n        $mergeRange = Coordinate::splitRange((string) $cell->getMergeRange());\n        [$startCell, $endCell] = $mergeRange[0];\n        $start = Coordinate::coordinateFromString($startCell);\n        $end = Coordinate::coordinateFromString($endCell);\n        $columnSpan = Coordinate::columnIndexFromString($end[0]) - Coordinate::columnIndexFromString($start[0]) + 1;\n        $rowSpan = ((int) $end[1]) - ((int) $start[1]) + 1;\n\n        $objWriter->writeAttribute('table:number-columns-spanned', (string) $columnSpan);\n        $objWriter->writeAttribute('table:number-rows-spanned', (string) $rowSpan);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Formula.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Formula\n{\n    /** @var string[] */\n    private array $definedNames = [];\n\n    /**\n     * @param DefinedName[] $definedNames\n     */\n    public function __construct(array $definedNames)\n    {\n        foreach ($definedNames as $definedName) {\n            $this->definedNames[] = $definedName->getName();\n        }\n    }\n\n    public function convertFormula(string $formula, string $worksheetName = ''): string\n    {\n        $formula = $this->convertCellReferences($formula, $worksheetName);\n        $formula = $this->convertDefinedNames($formula);\n        $formula = $this->convertFunctionNames($formula);\n\n        if (!str_starts_with($formula, '=')) {\n            $formula = '=' . $formula;\n        }\n\n        return 'of:' . $formula;\n    }\n\n    private function convertDefinedNames(string $formula): string\n    {\n        $splitCount = Preg::matchAllWithOffsets(\n            '/' . Calculation::CALCULATION_REGEXP_DEFINEDNAME . '/mui',\n            $formula,\n            $splitRanges\n        );\n\n        $lengths = array_map([StringHelper::class, 'strlenAllowNull'], array_column($splitRanges[0], 0));\n        $offsets = array_column($splitRanges[0], 1);\n        $values = array_column($splitRanges[0], 0);\n\n        while ($splitCount > 0) {\n            --$splitCount;\n            $length = $lengths[$splitCount];\n            $offset = $offsets[$splitCount];\n            $value = $values[$splitCount];\n\n            if (in_array($value, $this->definedNames, true)) {\n                $formula = substr($formula, 0, $offset) . '$$' . $value . substr($formula, $offset + $length);\n            }\n        }\n\n        return $formula;\n    }\n\n    private function convertCellReferences(string $formula, string $worksheetName): string\n    {\n        $splitCount = Preg::matchAllWithOffsets(\n            '/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/mui',\n            $formula,\n            $splitRanges\n        );\n\n        $lengths = array_map([StringHelper::class, 'strlenAllowNull'], array_column($splitRanges[0], 0));\n        $offsets = array_column($splitRanges[0], 1);\n\n        $worksheets = $splitRanges[2];\n        $columns = $splitRanges[6];\n        $rows = $splitRanges[7];\n\n        // Replace any commas in the formula with semicolons for Ods\n        // If by chance there are commas in worksheet names, then they will be \"fixed\" again in the loop\n        //    because we've already extracted worksheet names with our Preg::matchAllWithOffsets()\n        $formula = str_replace(',', ';', $formula);\n        while ($splitCount > 0) {\n            --$splitCount;\n            $length = $lengths[$splitCount];\n            $offset = $offsets[$splitCount];\n            $worksheet = $worksheets[$splitCount][0];\n            $column = $columns[$splitCount][0];\n            $row = $rows[$splitCount][0];\n\n            $newRange = '';\n            if (empty($worksheet)) {\n                if (($offset === 0) || ($formula[$offset - 1] !== ':')) {\n                    // We need a worksheet\n                    $worksheet = $worksheetName;\n                }\n            } else {\n                $worksheet = str_replace(\"''\", \"'\", trim($worksheet, \"'\"));\n            }\n            if (!empty($worksheet)) {\n                $newRange = \"['\" . str_replace(\"'\", \"''\", $worksheet) . \"'\";\n            } elseif (substr($formula, $offset - 1, 1) !== ':') {\n                $newRange = '[';\n            }\n            $newRange .= '.';\n\n            //if (!empty($column)) { // phpstan says always true\n            $newRange .= $column;\n            //}\n            if (!empty($row)) {\n                $newRange .= $row;\n            }\n            // close the wrapping [] unless this is the first part of a range\n            $newRange .= substr($formula, $offset + $length, 1) !== ':' ? ']' : '';\n\n            $formula = substr($formula, 0, $offset) . $newRange . substr($formula, $offset + $length);\n        }\n\n        return $formula;\n    }\n\n    private function convertFunctionNames(string $formula): string\n    {\n        return Preg::replace(\n            [\n                '/\\b((CEILING|FLOOR)'\n                    . '([.](MATH|PRECISE))?)\\s*[(]/ui',\n                '/\\b(CEILING|FLOOR)[.]XCL\\s*[(]/ui',\n                '/\\b(CEILING|FLOOR)[.]ODS\\s*[(]/ui',\n            ],\n            [\n                'COM.MICROSOFT.$1(',\n                'COM.MICROSOFT.$1(',\n                '$1(',\n            ],\n            $formula\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Meta.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass Meta extends WriterPart\n{\n    /**\n     * Write meta.xml to XML format.\n     *\n     * @return string XML Output\n     */\n    public function write(): string\n    {\n        $spreadsheet = $this->getParentWriter()->getSpreadsheet();\n\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8');\n\n        // Meta\n        $objWriter->startElement('office:document-meta');\n\n        $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');\n        $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n        $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/');\n        $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0');\n        $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');\n        $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#');\n        $objWriter->writeAttribute('office:version', '1.2');\n\n        $objWriter->startElement('office:meta');\n\n        $objWriter->writeElement('meta:initial-creator', $spreadsheet->getProperties()->getCreator());\n        $objWriter->writeElement('dc:creator', $spreadsheet->getProperties()->getCreator());\n        $created = $spreadsheet->getProperties()->getCreated();\n        $date = Date::dateTimeFromTimestamp(\"$created\");\n        $date->setTimeZone(Date::getDefaultOrLocalTimeZone());\n        $objWriter->writeElement('meta:creation-date', $date->format(DATE_W3C));\n        $created = $spreadsheet->getProperties()->getModified();\n        $date = Date::dateTimeFromTimestamp(\"$created\");\n        $date->setTimeZone(Date::getDefaultOrLocalTimeZone());\n        $objWriter->writeElement('dc:date', $date->format(DATE_W3C));\n        $objWriter->writeElement('dc:title', $spreadsheet->getProperties()->getTitle());\n        $objWriter->writeElement('dc:description', $spreadsheet->getProperties()->getDescription());\n        $objWriter->writeElement('dc:subject', $spreadsheet->getProperties()->getSubject());\n        $objWriter->writeElement('meta:keyword', $spreadsheet->getProperties()->getKeywords());\n        // Don't know if this changed over time, but the keywords are all\n        //  in a single declaration now.\n        //$keywords = explode(' ', $spreadsheet->getProperties()->getKeywords());\n        //foreach ($keywords as $keyword) {\n        //    $objWriter->writeElement('meta:keyword', $keyword);\n        //}\n\n        //<meta:document-statistic meta:table-count=\"XXX\" meta:cell-count=\"XXX\" meta:object-count=\"XXX\"/>\n        $objWriter->startElement('meta:user-defined');\n        $objWriter->writeAttribute('meta:name', 'Company');\n        $objWriter->writeRawData($spreadsheet->getProperties()->getCompany());\n        $objWriter->endElement();\n\n        $objWriter->startElement('meta:user-defined');\n        $objWriter->writeAttribute('meta:name', 'category');\n        $objWriter->writeRawData($spreadsheet->getProperties()->getCategory());\n        $objWriter->endElement();\n\n        self::writeDocPropsCustom($objWriter, $spreadsheet);\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    private static function writeDocPropsCustom(XMLWriter $objWriter, Spreadsheet $spreadsheet): void\n    {\n        $customPropertyList = $spreadsheet->getProperties()->getCustomProperties();\n        foreach ($customPropertyList as $customProperty) {\n            $propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty);\n            $propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty);\n\n            $objWriter->startElement('meta:user-defined');\n            $objWriter->writeAttribute('meta:name', $customProperty);\n\n            switch ($propertyType) {\n                case Properties::PROPERTY_TYPE_INTEGER:\n                case Properties::PROPERTY_TYPE_FLOAT:\n                    $objWriter->writeAttribute('meta:value-type', 'float');\n                    $objWriter->writeRawData((string) $propertyValue);\n\n                    break;\n                case Properties::PROPERTY_TYPE_BOOLEAN:\n                    $objWriter->writeAttribute('meta:value-type', 'boolean');\n                    $objWriter->writeRawData($propertyValue ? 'true' : 'false');\n\n                    break;\n                case Properties::PROPERTY_TYPE_DATE:\n                    $objWriter->writeAttribute('meta:value-type', 'date');\n                    $dtobj = Date::dateTimeFromTimestamp((string) ($propertyValue ?? 0));\n                    $objWriter->writeRawData($dtobj->format(DATE_W3C));\n\n                    break;\n                default:\n                    $objWriter->writeRawData((string) $propertyValue);\n\n                    break;\n            }\n\n            $objWriter->endElement();\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/MetaInf.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\n\nclass MetaInf extends WriterPart\n{\n    /**\n     * Write META-INF/manifest.xml to XML format.\n     *\n     * @return string XML Output\n     */\n    public function write(): string\n    {\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8');\n\n        // Manifest\n        $objWriter->startElement('manifest:manifest');\n        $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0');\n        $objWriter->writeAttribute('manifest:version', '1.2');\n\n        $objWriter->startElement('manifest:file-entry');\n        $objWriter->writeAttribute('manifest:full-path', '/');\n        $objWriter->writeAttribute('manifest:version', '1.2');\n        $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet');\n        $objWriter->endElement();\n        $objWriter->startElement('manifest:file-entry');\n        $objWriter->writeAttribute('manifest:full-path', 'meta.xml');\n        $objWriter->writeAttribute('manifest:media-type', 'text/xml');\n        $objWriter->endElement();\n        $objWriter->startElement('manifest:file-entry');\n        $objWriter->writeAttribute('manifest:full-path', 'settings.xml');\n        $objWriter->writeAttribute('manifest:media-type', 'text/xml');\n        $objWriter->endElement();\n        $objWriter->startElement('manifest:file-entry');\n        $objWriter->writeAttribute('manifest:full-path', 'content.xml');\n        $objWriter->writeAttribute('manifest:media-type', 'text/xml');\n        $objWriter->endElement();\n        $objWriter->startElement('manifest:file-entry');\n        $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png');\n        $objWriter->writeAttribute('manifest:media-type', 'image/png');\n        $objWriter->endElement();\n        $objWriter->startElement('manifest:file-entry');\n        $objWriter->writeAttribute('manifest:full-path', 'styles.xml');\n        $objWriter->writeAttribute('manifest:media-type', 'text/xml');\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Mimetype.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nclass Mimetype extends WriterPart\n{\n    /**\n     * Write mimetype to plain text format.\n     *\n     * @return string XML Output\n     */\n    public function write(): string\n    {\n        return 'application/vnd.oasis.opendocument.spreadsheet';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass NamedExpressions\n{\n    private XMLWriter $objWriter;\n\n    private Spreadsheet $spreadsheet;\n\n    private Formula $formulaConvertor;\n\n    public function __construct(XMLWriter $objWriter, Spreadsheet $spreadsheet, Formula $formulaConvertor)\n    {\n        $this->objWriter = $objWriter;\n        $this->spreadsheet = $spreadsheet;\n        $this->formulaConvertor = $formulaConvertor;\n    }\n\n    public function write(): string\n    {\n        $this->objWriter->startElement('table:named-expressions');\n        $this->writeExpressions();\n        $this->objWriter->endElement();\n\n        return '';\n    }\n\n    private function writeExpressions(): void\n    {\n        $definedNames = $this->spreadsheet->getDefinedNames();\n\n        foreach ($definedNames as $definedName) {\n            if ($definedName->isFormula()) {\n                $this->objWriter->startElement('table:named-expression');\n                $this->writeNamedFormula($definedName, $this->spreadsheet->getActiveSheet());\n            } else {\n                $this->objWriter->startElement('table:named-range');\n                $this->writeNamedRange($definedName);\n            }\n\n            $this->objWriter->endElement();\n        }\n    }\n\n    private function writeNamedFormula(DefinedName $definedName, Worksheet $defaultWorksheet): void\n    {\n        $title = ($definedName->getWorksheet() !== null) ? $definedName->getWorksheet()->getTitle() : $defaultWorksheet->getTitle();\n        $this->objWriter->writeAttribute('table:name', $definedName->getName());\n        $this->objWriter->writeAttribute(\n            'table:expression',\n            $this->formulaConvertor->convertFormula($definedName->getValue(), $title)\n        );\n        $this->objWriter->writeAttribute('table:base-cell-address', $this->convertAddress(\n            $definedName,\n            \"'\" . $title . \"'!\\$A\\$1\"\n        ));\n    }\n\n    private function writeNamedRange(DefinedName $definedName): void\n    {\n        $baseCell = '$A$1';\n        $ws = $definedName->getWorksheet();\n        if ($ws !== null) {\n            $baseCell = \"'\" . $ws->getTitle() . \"'!$baseCell\";\n        }\n        $this->objWriter->writeAttribute('table:name', $definedName->getName());\n        $this->objWriter->writeAttribute('table:base-cell-address', $this->convertAddress(\n            $definedName,\n            $baseCell\n        ));\n        $this->objWriter->writeAttribute('table:cell-range-address', $this->convertAddress($definedName, $definedName->getValue()));\n    }\n\n    private function convertAddress(DefinedName $definedName, string $address): string\n    {\n        $splitCount = Preg::matchAllWithOffsets(\n            '/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/mui',\n            $address,\n            $splitRanges\n        );\n\n        $lengths = array_map([StringHelper::class, 'strlenAllowNull'], array_column($splitRanges[0], 0));\n        $offsets = array_column($splitRanges[0], 1);\n\n        $worksheets = $splitRanges[2];\n        $columns = $splitRanges[6];\n        $rows = $splitRanges[7];\n\n        while ($splitCount > 0) {\n            --$splitCount;\n            $length = $lengths[$splitCount];\n            $offset = $offsets[$splitCount];\n            $worksheet = $worksheets[$splitCount][0];\n            $column = $columns[$splitCount][0];\n            $row = $rows[$splitCount][0];\n\n            $newRange = '';\n            if (empty($worksheet)) {\n                if (($offset === 0) || ($address[$offset - 1] !== ':')) {\n                    // We need a worksheet\n                    $ws = $definedName->getWorksheet();\n                    if ($ws !== null) {\n                        $worksheet = $ws->getTitle();\n                    }\n                }\n            } else {\n                $worksheet = str_replace(\"''\", \"'\", trim($worksheet, \"'\"));\n            }\n            if (!empty($worksheet)) {\n                $newRange = \"'\" . str_replace(\"'\", \"''\", $worksheet) . \"'.\";\n            }\n\n            //if (!empty($column)) { // phpstan says always true\n            $newRange .= $column;\n            //}\n            if (!empty($row)) {\n                $newRange .= $row;\n            }\n\n            $address = substr($address, 0, $offset) . $newRange . substr($address, $offset + $length);\n        }\n\n        if (str_starts_with($address, '=')) {\n            $address = substr($address, 1);\n        }\n\n        return $address;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Settings.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass Settings extends WriterPart\n{\n    /**\n     * Write settings.xml to XML format.\n     *\n     * @return string XML Output\n     */\n    public function write(): string\n    {\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8');\n\n        // Settings\n        $objWriter->startElement('office:document-settings');\n        $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');\n        $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n        $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0');\n        $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');\n        $objWriter->writeAttribute('office:version', '1.2');\n\n        $objWriter->startElement('office:settings');\n        $objWriter->startElement('config:config-item-set');\n        $objWriter->writeAttribute('config:name', 'ooo:view-settings');\n        $objWriter->startElement('config:config-item-map-indexed');\n        $objWriter->writeAttribute('config:name', 'Views');\n        $objWriter->startElement('config:config-item-map-entry');\n        $spreadsheet = $this->getParentWriter()->getSpreadsheet();\n\n        $objWriter->startElement('config:config-item');\n        $objWriter->writeAttribute('config:name', 'ViewId');\n        $objWriter->writeAttribute('config:type', 'string');\n        $objWriter->text('view1');\n        $objWriter->endElement(); // ViewId\n        $objWriter->startElement('config:config-item-map-named');\n\n        $this->writeAllWorksheetSettings($objWriter, $spreadsheet);\n\n        $wstitle = $spreadsheet->getActiveSheet()->getTitle();\n        $objWriter->startElement('config:config-item');\n        $objWriter->writeAttribute('config:name', 'ActiveTable');\n        $objWriter->writeAttribute('config:type', 'string');\n        $objWriter->text($wstitle);\n        $objWriter->endElement(); // config:config-item ActiveTable\n\n        $objWriter->endElement(); // config:config-item-map-entry\n        $objWriter->endElement(); // config:config-item-map-indexed Views\n        $objWriter->endElement(); // config:config-item-set ooo:view-settings\n        $objWriter->startElement('config:config-item-set');\n        $objWriter->writeAttribute('config:name', 'ooo:configuration-settings');\n        $objWriter->endElement(); // config:config-item-set ooo:configuration-settings\n        $objWriter->endElement(); // office:settings\n        $objWriter->endElement(); // office:document-settings\n\n        return $objWriter->getData();\n    }\n\n    private function writeAllWorksheetSettings(XMLWriter $objWriter, Spreadsheet $spreadsheet): void\n    {\n        $objWriter->writeAttribute('config:name', 'Tables');\n\n        foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n            $this->writeWorksheetSettings($objWriter, $worksheet);\n        }\n\n        $objWriter->endElement(); // config:config-item-map-entry Tables\n    }\n\n    private function writeWorksheetSettings(XMLWriter $objWriter, Worksheet $worksheet): void\n    {\n        $objWriter->startElement('config:config-item-map-entry');\n        $objWriter->writeAttribute('config:name', $worksheet->getTitle());\n\n        $this->writeSelectedCells($objWriter, $worksheet);\n        $this->writeFreezePane($objWriter, $worksheet);\n\n        $objWriter->endElement(); // config:config-item-map-entry Worksheet\n    }\n\n    private function writeSelectedCells(XMLWriter $objWriter, Worksheet $worksheet): void\n    {\n        $selected = $worksheet->getSelectedCells();\n        if (Preg::isMatch('/^([a-z]+)([0-9]+)/i', $selected, $matches)) {\n            $colSel = Coordinate::columnIndexFromString($matches[1]) - 1;\n            $rowSel = (int) $matches[2] - 1;\n            $objWriter->startElement('config:config-item');\n            $objWriter->writeAttribute('config:name', 'CursorPositionX');\n            $objWriter->writeAttribute('config:type', 'int');\n            $objWriter->text((string) $colSel);\n            $objWriter->endElement();\n            $objWriter->startElement('config:config-item');\n            $objWriter->writeAttribute('config:name', 'CursorPositionY');\n            $objWriter->writeAttribute('config:type', 'int');\n            $objWriter->text((string) $rowSel);\n            $objWriter->endElement();\n        }\n    }\n\n    private function writeSplitValue(XMLWriter $objWriter, string $splitMode, string $type, string $value): void\n    {\n        $objWriter->startElement('config:config-item');\n        $objWriter->writeAttribute('config:name', $splitMode);\n        $objWriter->writeAttribute('config:type', $type);\n        $objWriter->text($value);\n        $objWriter->endElement();\n    }\n\n    private function writeFreezePane(XMLWriter $objWriter, Worksheet $worksheet): void\n    {\n        $freezePane = CellAddress::fromCellAddress($worksheet->getFreezePane() ?? 'A1');\n        if ($freezePane->cellAddress() === 'A1') {\n            return;\n        }\n\n        $columnId = $freezePane->columnId();\n        $columnName = $freezePane->columnName();\n        $row = $freezePane->rowId();\n\n        $this->writeSplitValue($objWriter, 'HorizontalSplitMode', 'short', '2');\n        $this->writeSplitValue($objWriter, 'HorizontalSplitPosition', 'int', (string) ($columnId - 1));\n        $this->writeSplitValue($objWriter, 'PositionLeft', 'short', '0');\n        $this->writeSplitValue($objWriter, 'PositionRight', 'short', (string) ($columnId - 1));\n\n        for ($column = 'A'; $column !== $columnName; StringHelper::stringIncrement($column)) {\n            $worksheet->getColumnDimension($column)->setAutoSize(true);\n        }\n\n        $this->writeSplitValue($objWriter, 'VerticalSplitMode', 'short', '2');\n        $this->writeSplitValue($objWriter, 'VerticalSplitPosition', 'int', (string) ($row - 1));\n        $this->writeSplitValue($objWriter, 'PositionTop', 'short', '0');\n        $this->writeSplitValue($objWriter, 'PositionBottom', 'short', (string) ($row - 1));\n\n        $this->writeSplitValue($objWriter, 'ActiveSplitRange', 'short', '3');\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Styles.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\n\nclass Styles extends WriterPart\n{\n    /**\n     * Write styles.xml to XML format.\n     *\n     * @return string XML Output\n     */\n    public function write(): string\n    {\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8');\n\n        // Content\n        $objWriter->startElement('office:document-styles');\n        $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');\n        $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0');\n        $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0');\n        $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0');\n        $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0');\n        $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0');\n        $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n        $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/');\n        $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0');\n        $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0');\n        $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0');\n        $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0');\n        $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0');\n        $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0');\n        $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML');\n        $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0');\n        $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0');\n        $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');\n        $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer');\n        $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc');\n        $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events');\n        $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report');\n        $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2');\n        $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml');\n        $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#');\n        $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table');\n        $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/');\n        $objWriter->writeAttribute('office:version', '1.2');\n\n        $objWriter->writeElement('office:font-face-decls');\n        $objWriter->startElement('office:styles');\n        $defaultStyle = $this->getParentWriter()\n            ->getSpreadsheet()\n            ->getDefaultStyle();\n        $objWriter->startElement('style:default-style');\n        $objWriter->writeAttribute('style:family', 'table-cell');\n        $writer2 = new Cell\\Style($objWriter);\n        $writer2->writeTextProperties($defaultStyle);\n        $objWriter->endElement(); // style:default-style\n        $objWriter->startElement('style:style');\n        $objWriter->writeAttribute('style:name', 'Default');\n        $objWriter->writeAttribute('style:family', 'table-cell');\n        $writer2->writeCellProperties($defaultStyle);\n        $objWriter->endElement(); // style:style 'Default' table-cell\n        $objWriter->endElement(); // office:styles\n        $objWriter->startElement('office:automatic-styles');\n        $objWriter->startElement('style:page-layout');\n        $objWriter->writeAttribute('style:name', 'Mpm1');\n        $objWriter->endElement(); // style:page-layout\n        $objWriter->endElement(); // office:automatic-styles\n        $objWriter->startElement('office:master-styles');\n        $objWriter->startElement('style:master-page');\n        $objWriter->writeAttribute('style:name', 'Default');\n        $objWriter->writeAttribute('style:page-layout-name', 'Mpm1');\n        $objWriter->endElement(); //style:master-page\n        $objWriter->endElement(); //office:master-styles\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/Thumbnails.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nclass Thumbnails extends WriterPart\n{\n    /**\n     * Write Thumbnails/thumbnail.png to PNG format.\n     *\n     * @return string XML Output\n     */\n    public function write(): string\n    {\n        return '';\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods/WriterPart.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\n\nabstract class WriterPart\n{\n    /**\n     * Parent Ods object.\n     */\n    private Ods $parentWriter;\n\n    /**\n     * Get Ods writer.\n     */\n    public function getParentWriter(): Ods\n    {\n        return $this->parentWriter;\n    }\n\n    /**\n     * Set parent Ods writer.\n     */\n    public function __construct(Ods $writer)\n    {\n        $this->parentWriter = $writer;\n    }\n\n    abstract public function write(): string;\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Ods.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Content;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Meta;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\MetaInf;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Mimetype;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Styles;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Thumbnails;\nuse ZipStream\\Exception\\OverflowException;\nuse ZipStream\\ZipStream;\n\nclass Ods extends BaseWriter\n{\n    /**\n     * Private PhpSpreadsheet.\n     */\n    private Spreadsheet $spreadSheet;\n\n    private Content $writerPartContent;\n\n    private Meta $writerPartMeta;\n\n    private MetaInf $writerPartMetaInf;\n\n    private Mimetype $writerPartMimetype;\n\n    private Settings $writerPartSettings;\n\n    private Styles $writerPartStyles;\n\n    private Thumbnails $writerPartThumbnails;\n\n    /**\n     * Create a new Ods.\n     */\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->setSpreadsheet($spreadsheet);\n\n        $this->writerPartContent = new Content($this);\n        $this->writerPartMeta = new Meta($this);\n        $this->writerPartMetaInf = new MetaInf($this);\n        $this->writerPartMimetype = new Mimetype($this);\n        $this->writerPartSettings = new Settings($this);\n        $this->writerPartStyles = new Styles($this);\n        $this->writerPartThumbnails = new Thumbnails($this);\n    }\n\n    public function getWriterPartContent(): Content\n    {\n        return $this->writerPartContent;\n    }\n\n    public function getWriterPartMeta(): Meta\n    {\n        return $this->writerPartMeta;\n    }\n\n    public function getWriterPartMetaInf(): MetaInf\n    {\n        return $this->writerPartMetaInf;\n    }\n\n    public function getWriterPartMimetype(): Mimetype\n    {\n        return $this->writerPartMimetype;\n    }\n\n    public function getWriterPartSettings(): Settings\n    {\n        return $this->writerPartSettings;\n    }\n\n    public function getWriterPartStyles(): Styles\n    {\n        return $this->writerPartStyles;\n    }\n\n    public function getWriterPartThumbnails(): Thumbnails\n    {\n        return $this->writerPartThumbnails;\n    }\n\n    /** @param array<string, callable> $additionalNumberFormats */\n    public function useAdditionalNumberFormats(array $additionalNumberFormats): void\n    {\n        $this->writerPartContent->additionalNumberFormats = $additionalNumberFormats;\n    }\n\n    /**\n     * Save PhpSpreadsheet to file.\n     *\n     * @param resource|string $filename\n     */\n    public function save($filename, int $flags = 0): void\n    {\n        $this->processFlags($flags);\n\n        // garbage collect\n        $this->spreadSheet->garbageCollect();\n\n        $this->openFileHandle($filename);\n\n        $zip = $this->createZip();\n\n        $zip->addFile('META-INF/manifest.xml', $this->getWriterPartMetaInf()->write());\n        $zip->addFile('Thumbnails/thumbnail.png', $this->getWriterPartthumbnails()->write());\n        // Settings always need to be written before Content; Styles after Content\n        $zip->addFile('settings.xml', $this->getWriterPartsettings()->write());\n        $zip->addFile('content.xml', $this->getWriterPartcontent()->write());\n        $zip->addFile('meta.xml', $this->getWriterPartmeta()->write());\n        $zip->addFile('mimetype', $this->getWriterPartmimetype()->write());\n        $zip->addFile('styles.xml', $this->getWriterPartstyles()->write());\n\n        // Close file\n        try {\n            $zip->finish();\n        } catch (OverflowException) {\n            throw new WriterException('Could not close resource.');\n        }\n\n        $this->maybeCloseFileHandle();\n    }\n\n    /**\n     * Create zip object.\n     */\n    private function createZip(): ZipStream\n    {\n        // Try opening the ZIP file\n        if (!is_resource($this->fileHandle)) {\n            throw new WriterException('Could not open resource for writing.');\n        }\n\n        // Create new ZIP stream\n        return ZipStream0::newZipStream($this->fileHandle);\n    }\n\n    /**\n     * Get Spreadsheet object.\n     */\n    public function getSpreadsheet(): Spreadsheet\n    {\n        return $this->spreadSheet;\n    }\n\n    /**\n     * Set Spreadsheet object.\n     *\n     * @param Spreadsheet $spreadsheet PhpSpreadsheet object\n     *\n     * @return $this\n     */\n    public function setSpreadsheet(Spreadsheet $spreadsheet): static\n    {\n        $this->spreadSheet = $spreadsheet;\n\n        return $this;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Pdf/Dompdf.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Pdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf;\n\nclass Dompdf extends Pdf\n{\n    /**\n     * embed images, or link to images.\n     */\n    protected bool $embedImages = true;\n\n    /**\n     * Gets the implementation of external PDF library that should be used.\n     *\n     * @return \\Dompdf\\Dompdf implementation\n     */\n    protected function createExternalWriterInstance(): \\Dompdf\\Dompdf\n    {\n        return new \\Dompdf\\Dompdf();\n    }\n\n    /**\n     * Save Spreadsheet to file.\n     *\n     * @param string $filename Name of the file to save as\n     */\n    public function save($filename, int $flags = 0): void\n    {\n        $fileHandle = parent::prepareForSave($filename);\n\n        //  Check for paper size and page orientation\n        $setup = $this->spreadsheet->getSheet($this->getSheetIndex() ?? 0)->getPageSetup();\n        $orientation = $this->getOrientation() ?? $setup->getOrientation();\n        $orientation = ($orientation === PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';\n        $printPaperSize = $this->getPaperSize() ?? $setup->getPaperSize();\n        $paperSize = self::$paperSizes[$printPaperSize] ?? self::$paperSizes[PageSetup::getPaperSizeDefault()] ?? 'LETTER';\n        if (is_array($paperSize) && count($paperSize) === 2) {\n            $paperSize = [0.0, 0.0, $paperSize[0], $paperSize[1]];\n        }\n\n        $orientation = ($orientation == 'L') ? 'landscape' : 'portrait';\n\n        //  Create PDF\n        $pdf = $this->createExternalWriterInstance();\n        $pdf->setPaper($paperSize, $orientation);\n\n        $pdf->loadHtml($this->generateHTMLAll());\n        $pdf->render();\n        $this->callPageScript($pdf);\n\n        //  Write to file\n        fwrite($fileHandle, $pdf->output());\n\n        parent::restoreStateAfterSave();\n    }\n\n    protected function callPageScript(\\Dompdf\\Dompdf $pdf): void\n    {\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Pdf/Mpdf.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Pdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf;\n\nclass Mpdf extends Pdf\n{\n    public const SIMULATED_BODY_START = '<!-- simulated body start -->';\n    private const BODY_TAG = '<body>';\n\n    /**\n     * Gets the implementation of external PDF library that should be used.\n     *\n     * @param mixed[] $config Configuration array\n     *\n     * @return \\Mpdf\\Mpdf implementation\n     */\n    protected function createExternalWriterInstance(array $config): \\Mpdf\\Mpdf\n    {\n        return new \\Mpdf\\Mpdf($config);\n    }\n\n    /**\n     * Save Spreadsheet to file.\n     *\n     * @param string $filename Name of the file to save as\n     */\n    public function save($filename, int $flags = 0): void\n    {\n        $fileHandle = parent::prepareForSave($filename);\n\n        //  Check for paper size and page orientation\n        $setup = $this->spreadsheet->getSheet($this->getSheetIndex() ?? 0)->getPageSetup();\n        $orientation = $this->getOrientation() ?? $setup->getOrientation();\n        $orientation = ($orientation === PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';\n        $printPaperSize = $this->getPaperSize() ?? $setup->getPaperSize();\n        $paperSize = self::$paperSizes[$printPaperSize] ?? PageSetup::getPaperSizeDefault();\n\n        //  Create PDF\n        $config = ['tempDir' => $this->tempDir . '/mpdf'];\n        $pdf = $this->createExternalWriterInstance($config);\n        $ortmp = $orientation;\n        $pdf->_setPageSize($paperSize, $ortmp);\n        $pdf->DefOrientation = $orientation;\n        $pdf->AddPageByArray([\n            'orientation' => $orientation,\n            'margin-left' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getLeft()),\n            'margin-right' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getRight()),\n            'margin-top' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getTop()),\n            'margin-bottom' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getBottom()),\n        ]);\n\n        //  Document info\n        $pdf->SetTitle($this->spreadsheet->getProperties()->getTitle());\n        $pdf->SetAuthor($this->spreadsheet->getProperties()->getCreator());\n        $pdf->SetSubject($this->spreadsheet->getProperties()->getSubject());\n        $pdf->SetKeywords($this->spreadsheet->getProperties()->getKeywords());\n        $pdf->SetCreator($this->spreadsheet->getProperties()->getCreator());\n\n        $html = $this->generateHTMLAll();\n        $bodyLocation = strpos($html, self::SIMULATED_BODY_START);\n        if ($bodyLocation === false) {\n            $bodyLocation = strpos($html, self::BODY_TAG);\n            if ($bodyLocation !== false) {\n                $bodyLocation += strlen(self::BODY_TAG);\n            }\n        }\n        // Make sure first data presented to Mpdf includes body tag\n        //   (and any htmlpageheader/htmlpagefooter tags)\n        //   so that Mpdf doesn't parse it as content. Issue 2432.\n        if ($bodyLocation !== false) {\n            $pdf->WriteHTML(substr($html, 0, $bodyLocation));\n            $html = substr($html, $bodyLocation);\n        }\n        foreach (explode(\"\\n\", $html) as $line) {\n            $pdf->WriteHTML(\"$line\\n\");\n        }\n\n        //  Write to file\n        /** @var string */\n        $str = $pdf->Output('', 'S');\n        fwrite($fileHandle, $str);\n\n        parent::restoreStateAfterSave();\n    }\n\n    /**\n     * Convert inches to mm.\n     */\n    private function inchesToMm(float $inches): float\n    {\n        return $inches * 25.4;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Pdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf;\n\nclass Tcpdf extends Pdf\n{\n    protected bool $writeHeader = false;\n\n    protected bool $writeFooter = false;\n\n    /**\n     * Create a new PDF Writer instance.\n     *\n     * @param Spreadsheet $spreadsheet Spreadsheet object\n     */\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        parent::__construct($spreadsheet);\n        $this->setUseInlineCss(true);\n    }\n\n    /**\n     * Gets the implementation of external PDF library that should be used.\n     *\n     * @param string $orientation Page orientation\n     * @param string $unit Unit measure\n     * @param float[]|string $paperSize Paper size\n     *\n     * @return \\TCPDF implementation\n     */\n    protected function createExternalWriterInstance(string $orientation, string $unit, $paperSize): \\TCPDF\n    {\n        $this->defines();\n\n        return new \\TCPDF($orientation, $unit, $paperSize);\n    }\n\n    protected function defines(): void\n    {\n    }\n\n    /**\n     * Save Spreadsheet to file.\n     *\n     * @param string $filename Name of the file to save as\n     */\n    public function save($filename, int $flags = 0): void\n    {\n        $fileHandle = parent::prepareForSave($filename);\n\n        //  Default PDF paper size\n        $paperSize = 'LETTER'; //    Letter    (8.5 in. by 11 in.)\n\n        //  Check for paper size and page orientation\n        $setup = $this->spreadsheet->getSheet($this->getSheetIndex() ?? 0)->getPageSetup();\n        $orientation = $this->getOrientation() ?? $setup->getOrientation();\n        $orientation = ($orientation === PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';\n        $printPaperSize = $this->getPaperSize() ?? $setup->getPaperSize();\n        $paperSize = self::$paperSizes[$printPaperSize] ?? self::$paperSizes[PageSetup::getPaperSizeDefault()] ?? 'LETTER';\n        $printMargins = $this->spreadsheet->getSheet($this->getSheetIndex() ?? 0)->getPageMargins();\n\n        //  Create PDF\n        $pdf = $this->createExternalWriterInstance($orientation, 'pt', $paperSize);\n        $pdf->setFontSubsetting(false);\n        //    Set margins, converting inches to points (using 72 dpi)\n        $pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72);\n        $pdf->SetAutoPageBreak(true, $printMargins->getBottom() * 72);\n\n        $pdf->setPrintHeader($this->writeHeader);\n        $pdf->setPrintFooter($this->writeFooter);\n\n        $pdf->AddPage();\n\n        //  Set the appropriate font\n        $pdf->SetFont($this->getFont());\n        $this->checkRtlAndLtr();\n        if ($this->rtlSheets && !$this->ltrSheets) {\n            $pdf->setRTL(true);\n        }\n        $pdf->writeHTML($this->generateHTMLAll());\n\n        //  Document info\n        $pdf->SetTitle(\n            $this->spreadsheet->getProperties()->getTitle()\n        );\n        $pdf->SetAuthor(\n            $this->spreadsheet->getProperties()->getCreator()\n        );\n        $pdf->SetSubject(\n            $this->spreadsheet->getProperties()->getSubject()\n        );\n        $pdf->SetKeywords(\n            $this->spreadsheet->getProperties()->getKeywords()\n        );\n        $pdf->SetCreator(\n            $this->spreadsheet->getProperties()->getCreator()\n        );\n\n        //  Write to file\n        fwrite($fileHandle, $pdf->output('', 'S'));\n\n        parent::restoreStateAfterSave();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Pdf/TcpdfNoDie.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Pdf;\n\nclass TcpdfNoDie extends Tcpdf\n{\n    /**\n     * By default, Tcpdf will die sometimes rather than throwing exception.\n     * And this is controlled by a defined constant in the global namespace,\n     * not by an instance property. Ugh!\n     * Using this class instead of the class which it extends will probably\n     * be suitable for most users. But not for those who have customized\n     * their config file. Which is why this isn't the default, so that\n     * there is no breaking change for those users.\n     * Note that if both Tcpdf and TcpdfNoDie are used in the same process,\n     * the first one used \"wins\" the battle of the defines.\n     */\n    protected function defines(): void\n    {\n        if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {\n            define('K_TCPDF_EXTERNAL_CONFIG', true);\n        }\n        if (!defined('K_TCPDF_THROW_EXCEPTION_ERROR')) {\n            define('K_TCPDF_THROW_EXCEPTION_ERROR', true);\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Pdf.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\n\nabstract class Pdf extends Html\n{\n    /**\n     * Temporary storage directory.\n     */\n    protected string $tempDir;\n\n    /**\n     * Font.\n     */\n    protected string $font = 'freesans';\n\n    /**\n     * Orientation (Over-ride).\n     */\n    protected ?string $orientation = null;\n\n    /**\n     * Paper size (Over-ride).\n     */\n    protected ?int $paperSize = null;\n\n    /**\n     * Paper Sizes xRef List.\n     *\n     * @var array<int, float[]|string>\n     */\n    protected static array $paperSizes = [\n        PageSetup::PAPERSIZE_LETTER => 'LETTER', //    (8.5 in. by 11 in.)\n        PageSetup::PAPERSIZE_LETTER_SMALL => 'LETTER', //    (8.5 in. by 11 in.)\n        PageSetup::PAPERSIZE_TABLOID => [792.00, 1224.00], //    (11 in. by 17 in.)\n        PageSetup::PAPERSIZE_LEDGER => [1224.00, 792.00], //    (17 in. by 11 in.)\n        PageSetup::PAPERSIZE_LEGAL => 'LEGAL', //    (8.5 in. by 14 in.)\n        PageSetup::PAPERSIZE_STATEMENT => [396.00, 612.00], //    (5.5 in. by 8.5 in.)\n        PageSetup::PAPERSIZE_EXECUTIVE => 'EXECUTIVE', //    (7.25 in. by 10.5 in.)\n        PageSetup::PAPERSIZE_A3 => 'A3', //    (297 mm by 420 mm)\n        PageSetup::PAPERSIZE_A4 => 'A4', //    (210 mm by 297 mm)\n        PageSetup::PAPERSIZE_A4_SMALL => 'A4', //    (210 mm by 297 mm)\n        PageSetup::PAPERSIZE_A5 => 'A5', //    (148 mm by 210 mm)\n        PageSetup::PAPERSIZE_B4 => 'B4', //    (250 mm by 353 mm)\n        PageSetup::PAPERSIZE_B5 => 'B5', //    (176 mm by 250 mm)\n        PageSetup::PAPERSIZE_FOLIO => 'FOLIO', //    (8.5 in. by 13 in.)\n        PageSetup::PAPERSIZE_QUARTO => [609.45, 779.53], //    (215 mm by 275 mm)\n        PageSetup::PAPERSIZE_STANDARD_1 => [720.00, 1008.00], //    (10 in. by 14 in.)\n        PageSetup::PAPERSIZE_STANDARD_2 => [792.00, 1224.00], //    (11 in. by 17 in.)\n        PageSetup::PAPERSIZE_NOTE => 'LETTER', //    (8.5 in. by 11 in.)\n        PageSetup::PAPERSIZE_NO9_ENVELOPE => [279.00, 639.00], //    (3.875 in. by 8.875 in.)\n        PageSetup::PAPERSIZE_NO10_ENVELOPE => [297.00, 684.00], //    (4.125 in. by 9.5 in.)\n        PageSetup::PAPERSIZE_NO11_ENVELOPE => [324.00, 747.00], //    (4.5 in. by 10.375 in.)\n        PageSetup::PAPERSIZE_NO12_ENVELOPE => [342.00, 792.00], //    (4.75 in. by 11 in.)\n        PageSetup::PAPERSIZE_NO14_ENVELOPE => [360.00, 828.00], //    (5 in. by 11.5 in.)\n        PageSetup::PAPERSIZE_C => [1224.00, 1584.00], //    (17 in. by 22 in.)\n        PageSetup::PAPERSIZE_D => [1584.00, 2448.00], //    (22 in. by 34 in.)\n        PageSetup::PAPERSIZE_E => [2448.00, 3168.00], //    (34 in. by 44 in.)\n        PageSetup::PAPERSIZE_DL_ENVELOPE => [311.81, 623.62], //    (110 mm by 220 mm)\n        PageSetup::PAPERSIZE_C5_ENVELOPE => 'C5', //    (162 mm by 229 mm)\n        PageSetup::PAPERSIZE_C3_ENVELOPE => 'C3', //    (324 mm by 458 mm)\n        PageSetup::PAPERSIZE_C4_ENVELOPE => 'C4', //    (229 mm by 324 mm)\n        PageSetup::PAPERSIZE_C6_ENVELOPE => 'C6', //    (114 mm by 162 mm)\n        PageSetup::PAPERSIZE_C65_ENVELOPE => [323.15, 649.13], //    (114 mm by 229 mm)\n        PageSetup::PAPERSIZE_B4_ENVELOPE => 'B4', //    (250 mm by 353 mm)\n        PageSetup::PAPERSIZE_B5_ENVELOPE => 'B5', //    (176 mm by 250 mm)\n        PageSetup::PAPERSIZE_B6_ENVELOPE => [498.90, 354.33], //    (176 mm by 125 mm)\n        PageSetup::PAPERSIZE_ITALY_ENVELOPE => [311.81, 651.97], //    (110 mm by 230 mm)\n        PageSetup::PAPERSIZE_MONARCH_ENVELOPE => [279.00, 540.00], //    (3.875 in. by 7.5 in.)\n        PageSetup::PAPERSIZE_6_3_4_ENVELOPE => [261.00, 468.00], //    (3.625 in. by 6.5 in.)\n        PageSetup::PAPERSIZE_US_STANDARD_FANFOLD => [1071.00, 792.00], //    (14.875 in. by 11 in.)\n        PageSetup::PAPERSIZE_GERMAN_STANDARD_FANFOLD => [612.00, 864.00], //    (8.5 in. by 12 in.)\n        PageSetup::PAPERSIZE_GERMAN_LEGAL_FANFOLD => 'FOLIO', //    (8.5 in. by 13 in.)\n        PageSetup::PAPERSIZE_ISO_B4 => 'B4', //    (250 mm by 353 mm)\n        PageSetup::PAPERSIZE_JAPANESE_DOUBLE_POSTCARD => [566.93, 419.53], //    (200 mm by 148 mm)\n        PageSetup::PAPERSIZE_STANDARD_PAPER_1 => [648.00, 792.00], //    (9 in. by 11 in.)\n        PageSetup::PAPERSIZE_STANDARD_PAPER_2 => [720.00, 792.00], //    (10 in. by 11 in.)\n        PageSetup::PAPERSIZE_STANDARD_PAPER_3 => [1080.00, 792.00], //    (15 in. by 11 in.)\n        PageSetup::PAPERSIZE_INVITE_ENVELOPE => [623.62, 623.62], //    (220 mm by 220 mm)\n        PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER => [667.80, 864.00], //    (9.275 in. by 12 in.)\n        PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER => [667.80, 1080.00], //    (9.275 in. by 15 in.)\n        PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER => [841.68, 1296.00], //    (11.69 in. by 18 in.)\n        PageSetup::PAPERSIZE_A4_EXTRA_PAPER => [668.98, 912.76], //    (236 mm by 322 mm)\n        PageSetup::PAPERSIZE_LETTER_TRANSVERSE_PAPER => [595.80, 792.00], //    (8.275 in. by 11 in.)\n        PageSetup::PAPERSIZE_A4_TRANSVERSE_PAPER => 'A4', //    (210 mm by 297 mm)\n        PageSetup::PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER => [667.80, 864.00], //    (9.275 in. by 12 in.)\n        PageSetup::PAPERSIZE_SUPERA_SUPERA_A4_PAPER => [643.46, 1009.13], //    (227 mm by 356 mm)\n        PageSetup::PAPERSIZE_SUPERB_SUPERB_A3_PAPER => [864.57, 1380.47], //    (305 mm by 487 mm)\n        PageSetup::PAPERSIZE_LETTER_PLUS_PAPER => [612.00, 913.68], //    (8.5 in. by 12.69 in.)\n        PageSetup::PAPERSIZE_A4_PLUS_PAPER => [595.28, 935.43], //    (210 mm by 330 mm)\n        PageSetup::PAPERSIZE_A5_TRANSVERSE_PAPER => 'A5', //    (148 mm by 210 mm)\n        PageSetup::PAPERSIZE_JIS_B5_TRANSVERSE_PAPER => [515.91, 728.50], //    (182 mm by 257 mm)\n        PageSetup::PAPERSIZE_A3_EXTRA_PAPER => [912.76, 1261.42], //    (322 mm by 445 mm)\n        PageSetup::PAPERSIZE_A5_EXTRA_PAPER => [493.23, 666.14], //    (174 mm by 235 mm)\n        PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER => [569.76, 782.36], //    (201 mm by 276 mm)\n        PageSetup::PAPERSIZE_A2_PAPER => 'A2', //    (420 mm by 594 mm)\n        PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER => 'A3', //    (297 mm by 420 mm)\n        PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER => [912.76, 1261.42], //    (322 mm by 445 mm)\n    ];\n\n    /**\n     * Create a new PDF Writer instance.\n     *\n     * @param Spreadsheet $spreadsheet Spreadsheet object\n     */\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        parent::__construct($spreadsheet);\n        //$this->setUseInlineCss(true);\n        $this->tempDir = File::sysGetTempDir() . '/phpsppdf';\n        $this->isPdf = true;\n    }\n\n    /**\n     * Get Font.\n     */\n    public function getFont(): string\n    {\n        return $this->font;\n    }\n\n    /**\n     * Set font. Examples:\n     *      'arialunicid0-chinese-simplified'\n     *      'arialunicid0-chinese-traditional'\n     *      'arialunicid0-korean'\n     *      'arialunicid0-japanese'.\n     *\n     * @return $this\n     */\n    public function setFont(string $fontName)\n    {\n        $this->font = $fontName;\n\n        return $this;\n    }\n\n    /**\n     * Get Paper Size.\n     */\n    public function getPaperSize(): ?int\n    {\n        return $this->paperSize;\n    }\n\n    /**\n     * Set Paper Size.\n     *\n     * @param int $paperSize Paper size see PageSetup::PAPERSIZE_*\n     */\n    public function setPaperSize(int $paperSize): self\n    {\n        $this->paperSize = $paperSize;\n\n        return $this;\n    }\n\n    /**\n     * Get Orientation.\n     */\n    public function getOrientation(): ?string\n    {\n        return $this->orientation;\n    }\n\n    /**\n     * Set Orientation.\n     *\n     * @param string $orientation Page orientation see PageSetup::ORIENTATION_*\n     */\n    public function setOrientation(string $orientation): self\n    {\n        $this->orientation = $orientation;\n\n        return $this;\n    }\n\n    /**\n     * Get temporary storage directory.\n     */\n    public function getTempDir(): string\n    {\n        return $this->tempDir;\n    }\n\n    /**\n     * Set temporary storage directory.\n     *\n     * @param string $temporaryDirectory Temporary storage directory\n     */\n    public function setTempDir(string $temporaryDirectory): self\n    {\n        if (is_dir($temporaryDirectory)) {\n            $this->tempDir = $temporaryDirectory;\n        } else {\n            throw new WriterException(\"Directory does not exist: $temporaryDirectory\");\n        }\n\n        return $this;\n    }\n\n    /**\n     * Save Spreadsheet to PDF file, pre-save.\n     *\n     * @param resource|string $filename Name of the file to save as\n     *\n     * @return resource\n     */\n    protected function prepareForSave($filename)\n    {\n        //  Open file\n        $this->openFileHandle($filename);\n\n        return $this->fileHandle;\n    }\n\n    /**\n     * Save PhpSpreadsheet to PDF file, post-save.\n     */\n    protected function restoreStateAfterSave(): void\n    {\n        $this->maybeCloseFileHandle();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\n\n// Original file header of PEAR::Spreadsheet_Excel_Writer_BIFFwriter (used as the base for this class):\n// -----------------------------------------------------------------------------------------\n// *  Module written/ported by Xavier Noguer <xnoguer@rezebra.com>\n// *\n// *  The majority of this is _NOT_ my code.  I simply ported it from the\n// *  PERL Spreadsheet::WriteExcel module.\n// *\n// *  The author of the Spreadsheet::WriteExcel module is John McNamara\n// *  <jmcnamara@cpan.org>\n// *\n// *  I _DO_ maintain this code, and John McNamara has nothing to do with the\n// *  porting of this code to PHP.  Any questions directly related to this\n// *  class library should be directed to me.\n// *\n// *  License Information:\n// *\n// *    Spreadsheet_Excel_Writer:  A library for generating Excel Spreadsheets\n// *    Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com\n// *\n// *    This library is free software; you can redistribute it and/or\n// *    modify it under the terms of the GNU Lesser General Public\n// *    License as published by the Free Software Foundation; either\n// *    version 2.1 of the License, or (at your option) any later version.\n// *\n// *    This library is distributed in the hope that it will be useful,\n// *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n// *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// *    Lesser General Public License for more details.\n// *\n// *    You should have received a copy of the GNU Lesser General Public\n// *    License along with this library; if not, write to the Free Software\n// *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n// */\nclass BIFFwriter\n{\n    /**\n     * The byte order of this architecture. 0 => little endian, 1 => big endian.\n     */\n    private static ?int $byteOrder = null;\n\n    /**\n     * The string containing the data of the BIFF stream.\n     */\n    public ?string $_data;\n\n    /**\n     * The size of the data in bytes. Should be the same as strlen($this->_data).\n     */\n    public int $_datasize;\n\n    /**\n     * The maximum length for a BIFF record (excluding record header and length field). See addContinue().\n     *\n     * @see addContinue()\n     */\n    private int $limit = 8224;\n\n    /**\n     * Constructor.\n     */\n    public function __construct()\n    {\n        $this->_data = '';\n        $this->_datasize = 0;\n    }\n\n    /**\n     * Determine the byte order and store it as class data to avoid\n     * recalculating it for each call to new().\n     */\n    public static function getByteOrder(): int\n    {\n        if (!isset(self::$byteOrder)) {\n            // Check if \"pack\" gives the required IEEE 64bit float\n            $teststr = pack('d', 1.2345);\n            $number = pack('C8', 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F);\n            if ($number == $teststr) {\n                $byte_order = 0; // Little Endian\n            } elseif ($number == strrev($teststr)) {\n                $byte_order = 1; // Big Endian\n            } else {\n                // Give up. I'll fix this in a later version.\n                throw new WriterException('Required floating point format not supported on this platform.');\n            }\n            self::$byteOrder = $byte_order;\n        }\n\n        return self::$byteOrder;\n    }\n\n    /**\n     * General storage function.\n     *\n     * @param string $data binary data to append\n     */\n    protected function append(string $data): void\n    {\n        if (strlen($data) - 4 > $this->limit) {\n            $data = $this->addContinue($data);\n        }\n        $this->_data .= $data;\n        $this->_datasize += strlen($data);\n    }\n\n    /**\n     * General storage function like append, but returns string instead of modifying $this->_data.\n     *\n     * @param string $data binary data to write\n     */\n    public function writeData(string $data): string\n    {\n        if (strlen($data) - 4 > $this->limit) {\n            $data = $this->addContinue($data);\n        }\n        $this->_datasize += strlen($data);\n\n        return $data;\n    }\n\n    /**\n     * Writes Excel BOF record to indicate the beginning of a stream or\n     * sub-stream in the BIFF file.\n     *\n     * @param int $type type of BIFF file to write: 0x0005 Workbook,\n     *                       0x0010 Worksheet\n     */\n    protected function storeBof(int $type): void\n    {\n        $record = 0x0809; // Record identifier    (BIFF5-BIFF8)\n        $length = 0x0010;\n\n        // by inspection of real files, MS Office Excel 2007 writes the following\n        $unknown = pack('VV', 0x000100D1, 0x00000406);\n\n        $build = 0x0DBB; //    Excel 97\n        $year = 0x07CC; //    Excel 97\n\n        $version = 0x0600; //    BIFF8\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvv', $version, $type, $build, $year);\n        $this->append($header . $data . $unknown);\n    }\n\n    /**\n     * Writes Excel EOF record to indicate the end of a BIFF stream.\n     */\n    protected function storeEof(): void\n    {\n        $record = 0x000A; // Record identifier\n        $length = 0x0000; // Number of bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $this->append($header);\n    }\n\n    /**\n     * Writes Excel EOF record to indicate the end of a BIFF stream.\n     */\n    public function writeEof(): string\n    {\n        $record = 0x000A; // Record identifier\n        $length = 0x0000; // Number of bytes to follow\n        $header = pack('vv', $record, $length);\n\n        return $this->writeData($header);\n    }\n\n    /**\n     * Excel limits the size of BIFF records. In Excel 5 the limit is 2084 bytes. In\n     * Excel 97 the limit is 8228 bytes. Records that are longer than these limits\n     * must be split up into CONTINUE blocks.\n     *\n     * This function takes a long BIFF record and inserts CONTINUE records as\n     * necessary.\n     *\n     * @param string $data The original binary data to be written\n     *\n     * @return string A very convenient string of continue blocks\n     */\n    private function addContinue(string $data): string\n    {\n        $limit = $this->limit;\n        $record = 0x003C; // Record identifier\n\n        // The first 2080/8224 bytes remain intact. However, we have to change\n        // the length field of the record.\n        $tmp = substr($data, 0, 2) . pack('v', $limit) . substr($data, 4, $limit);\n\n        $header = pack('vv', $record, $limit); // Headers for continue records\n\n        // Retrieve chunks of 2080/8224 bytes +4 for the header.\n        $data_length = strlen($data);\n        for ($i = $limit + 4; $i < ($data_length - $limit); $i += $limit) {\n            $tmp .= $header;\n            $tmp .= substr($data, $i, $limit);\n        }\n\n        // Retrieve the last chunk of data\n        $header = pack('vv', $record, strlen($data) - $i);\n        $tmp .= $header;\n        $tmp .= substr($data, $i);\n\n        return $tmp;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/CellDataValidation.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\n\nclass CellDataValidation\n{\n    /**\n     * @var array<string, int>\n     */\n    protected static array $validationTypeMap = [\n        DataValidation::TYPE_NONE => 0x00,\n        DataValidation::TYPE_WHOLE => 0x01,\n        DataValidation::TYPE_DECIMAL => 0x02,\n        DataValidation::TYPE_LIST => 0x03,\n        DataValidation::TYPE_DATE => 0x04,\n        DataValidation::TYPE_TIME => 0x05,\n        DataValidation::TYPE_TEXTLENGTH => 0x06,\n        DataValidation::TYPE_CUSTOM => 0x07,\n    ];\n\n    /**\n     * @var array<string, int>\n     */\n    protected static array $errorStyleMap = [\n        DataValidation::STYLE_STOP => 0x00,\n        DataValidation::STYLE_WARNING => 0x01,\n        DataValidation::STYLE_INFORMATION => 0x02,\n    ];\n\n    /**\n     * @var array<string, int>\n     */\n    protected static array $operatorMap = [\n        DataValidation::OPERATOR_BETWEEN => 0x00,\n        DataValidation::OPERATOR_NOTBETWEEN => 0x01,\n        DataValidation::OPERATOR_EQUAL => 0x02,\n        DataValidation::OPERATOR_NOTEQUAL => 0x03,\n        DataValidation::OPERATOR_GREATERTHAN => 0x04,\n        DataValidation::OPERATOR_LESSTHAN => 0x05,\n        DataValidation::OPERATOR_GREATERTHANOREQUAL => 0x06,\n        DataValidation::OPERATOR_LESSTHANOREQUAL => 0x07,\n    ];\n\n    public static function type(DataValidation $dataValidation): int\n    {\n        $validationType = $dataValidation->getType();\n\n        return self::$validationTypeMap[$validationType] ?? self::$validationTypeMap[DataValidation::TYPE_NONE];\n    }\n\n    public static function errorStyle(DataValidation $dataValidation): int\n    {\n        $errorStyle = $dataValidation->getErrorStyle();\n\n        return self::$errorStyleMap[$errorStyle] ?? self::$errorStyleMap[DataValidation::STYLE_STOP];\n    }\n\n    public static function operator(DataValidation $dataValidation): int\n    {\n        $operator = $dataValidation->getOperator();\n\n        return self::$operatorMap[$operator] ?? self::$operatorMap[DataValidation::OPERATOR_BETWEEN];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/ConditionalHelper.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\n\nclass ConditionalHelper\n{\n    /**\n     * Formula parser.\n     */\n    protected Parser $parser;\n\n    protected mixed $condition;\n\n    protected string $cellRange;\n\n    protected ?string $tokens = null;\n\n    protected int $size;\n\n    public function __construct(Parser $parser)\n    {\n        $this->parser = $parser;\n    }\n\n    public function processCondition(mixed $condition, string $cellRange): void\n    {\n        $this->condition = $condition;\n        $this->cellRange = $cellRange;\n\n        if (is_int($condition) && $condition >= 0 && $condition <= 65535) {\n            $this->size = 3;\n            $this->tokens = pack('Cv', 0x1E, $condition);\n        } else {\n            try {\n                $formula = Wizard\\WizardAbstract::reverseAdjustCellRef(StringHelper::convertToString($condition), $cellRange);\n                $this->parser->parse($formula);\n                $this->tokens = $this->parser->toReversePolish();\n                $this->size = strlen($this->tokens ?? '');\n            } catch (PhpSpreadsheetException) {\n                // In the event of a parser error with a formula value, we set the expression to ptgInt + 0\n                $this->tokens = pack('Cv', 0x1E, 0);\n                $this->size = 3;\n            }\n        }\n    }\n\n    public function tokens(): ?string\n    {\n        return $this->tokens;\n    }\n\n    public function size(): int\n    {\n        return $this->size;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/ErrorCode.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nclass ErrorCode\n{\n    /**\n     * @var array<string, int>\n     */\n    protected static array $errorCodeMap = [\n        '#NULL!' => 0x00,\n        '#DIV/0!' => 0x07,\n        '#VALUE!' => 0x0F,\n        '#REF!' => 0x17,\n        '#NAME?' => 0x1D,\n        '#NUM!' => 0x24,\n        '#N/A' => 0x2A,\n    ];\n\n    public static function error(string $errorCode): int\n    {\n        return self::$errorCodeMap[$errorCode] ?? 0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Escher.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher as SharedEscher;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer\\SpContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE\\Blip;\n\nclass Escher\n{\n    /**\n     * The object we are writing.\n     */\n    private Blip|BSE|BstoreContainer|DgContainer|DggContainer|Escher|SpContainer|SpgrContainer|SharedEscher $object;\n\n    /**\n     * The written binary data.\n     */\n    private string $data;\n\n    /**\n     * Shape offsets. Positions in binary stream where a new shape record begins.\n     *\n     * @var int[]\n     */\n    private array $spOffsets;\n\n    /**\n     * Shape types.\n     *\n     * @var mixed[]\n     */\n    private array $spTypes;\n\n    /**\n     * Constructor.\n     */\n    public function __construct(Blip|BSE|BstoreContainer|DgContainer|DggContainer|self|SpContainer|SpgrContainer|SharedEscher $object)\n    {\n        $this->object = $object;\n    }\n\n    /**\n     * Process the object to be written.\n     */\n    public function close(): string\n    {\n        // initialize\n        $this->data = '';\n\n        switch ($this->object::class) {\n            case SharedEscher::class:\n                if ($dggContainer = $this->object->getDggContainer()) {\n                    $writer = new self($dggContainer);\n                    $this->data = $writer->close();\n                } elseif ($dgContainer = $this->object->getDgContainer()) {\n                    $writer = new self($dgContainer);\n                    $this->data = $writer->close();\n                    $this->spOffsets = $writer->getSpOffsets();\n                    $this->spTypes = $writer->getSpTypes();\n                }\n\n                break;\n            case DggContainer::class:\n                // this is a container record\n\n                // initialize\n                $innerData = '';\n\n                // write the dgg\n                $recVer = 0x0;\n                $recInstance = 0x0000;\n                $recType = 0xF006;\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                // dgg data\n                $dggData\n                    = pack(\n                        'VVVV',\n                        $this->object->getSpIdMax(), // maximum shape identifier increased by one\n                        $this->object->getCDgSaved() + 1, // number of file identifier clusters increased by one\n                        $this->object->getCSpSaved(),\n                        $this->object->getCDgSaved() // count total number of drawings saved\n                    );\n\n                // add file identifier clusters (one per drawing)\n                $IDCLs = $this->object->getIDCLs();\n\n                foreach ($IDCLs as $dgId => $maxReducedSpId) {\n                    /** @var int $maxReducedSpId */\n                    $dggData .= pack('VV', $dgId, $maxReducedSpId + 1);\n                }\n\n                $header = pack('vvV', $recVerInstance, $recType, strlen($dggData));\n                $innerData .= $header . $dggData;\n\n                // write the bstoreContainer\n                if ($bstoreContainer = $this->object->getBstoreContainer()) {\n                    $writer = new self($bstoreContainer);\n                    $innerData .= $writer->close();\n                }\n\n                // write the record\n                $recVer = 0xF;\n                $recInstance = 0x0000;\n                $recType = 0xF000;\n                $length = strlen($innerData);\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                $this->data = $header . $innerData;\n\n                break;\n            case BstoreContainer::class:\n                // this is a container record\n\n                // initialize\n                $innerData = '';\n\n                // treat the inner data\n                if ($BSECollection = $this->object->getBSECollection()) {\n                    foreach ($BSECollection as $BSE) {\n                        $writer = new self($BSE);\n                        $innerData .= $writer->close();\n                    }\n                }\n\n                // write the record\n                $recVer = 0xF;\n                $recInstance = count($this->object->getBSECollection());\n                $recType = 0xF001;\n                $length = strlen($innerData);\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                $this->data = $header . $innerData;\n\n                break;\n            case BSE::class:\n                // this is a semi-container record\n\n                // initialize\n                $innerData = '';\n\n                // here we treat the inner data\n                if ($blip = $this->object->getBlip()) {\n                    $writer = new self($blip);\n                    $innerData .= $writer->close();\n                }\n\n                // initialize\n                $data = '';\n\n                $btWin32 = $this->object->getBlipType();\n                $btMacOS = $this->object->getBlipType();\n                $data .= pack('CC', $btWin32, $btMacOS);\n\n                $rgbUid = pack('VVVV', 0, 0, 0, 0); // todo\n                $data .= $rgbUid;\n\n                $tag = 0;\n                $size = strlen($innerData);\n                $cRef = 1;\n                $foDelay = 0; //todo\n                $unused1 = 0x0;\n                $cbName = 0x0;\n                $unused2 = 0x0;\n                $unused3 = 0x0;\n                $data .= pack('vVVVCCCC', $tag, $size, $cRef, $foDelay, $unused1, $cbName, $unused2, $unused3);\n\n                $data .= $innerData;\n\n                // write the record\n                $recVer = 0x2;\n                $recInstance = $this->object->getBlipType();\n                $recType = 0xF007;\n                $length = strlen($data);\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                $this->data = $header;\n\n                $this->data .= $data;\n\n                break;\n            case Blip::class:\n                // this is an atom record\n\n                // write the record\n                switch ($this->object->getParent()->getBlipType()) {\n                    case BSE::BLIPTYPE_JPEG:\n                        // initialize\n                        $innerData = '';\n\n                        $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo\n                        $innerData .= $rgbUid1;\n\n                        $tag = 0xFF; // todo\n                        $innerData .= pack('C', $tag);\n\n                        $innerData .= $this->object->getData();\n\n                        $recVer = 0x0;\n                        $recInstance = 0x46A;\n                        $recType = 0xF01D;\n                        $length = strlen($innerData);\n\n                        $recVerInstance = $recVer;\n                        $recVerInstance |= $recInstance << 4;\n\n                        $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                        $this->data = $header;\n\n                        $this->data .= $innerData;\n\n                        break;\n                    case BSE::BLIPTYPE_PNG:\n                        // initialize\n                        $innerData = '';\n\n                        $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo\n                        $innerData .= $rgbUid1;\n\n                        $tag = 0xFF; // todo\n                        $innerData .= pack('C', $tag);\n\n                        $innerData .= $this->object->getData();\n\n                        $recVer = 0x0;\n                        $recInstance = 0x6E0;\n                        $recType = 0xF01E;\n                        $length = strlen($innerData);\n\n                        $recVerInstance = $recVer;\n                        $recVerInstance |= $recInstance << 4;\n\n                        $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                        $this->data = $header;\n\n                        $this->data .= $innerData;\n\n                        break;\n                }\n\n                break;\n            case DgContainer::class:\n                // this is a container record\n\n                // initialize\n                $innerData = '';\n\n                // write the dg\n                $recVer = 0x0;\n                $recInstance = $this->object->getDgId();\n                $recType = 0xF008;\n                $length = 8;\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                // number of shapes in this drawing (including group shape)\n                $countShapes = count($this->object->getSpgrContainerOrThrow()->getChildren());\n                $innerData .= $header . pack('VV', $countShapes, $this->object->getLastSpId());\n\n                // write the spgrContainer\n                if ($spgrContainer = $this->object->getSpgrContainer()) {\n                    $writer = new self($spgrContainer);\n                    $innerData .= $writer->close();\n\n                    // get the shape offsets relative to the spgrContainer record\n                    $spOffsets = $writer->getSpOffsets();\n                    $spTypes = $writer->getSpTypes();\n\n                    // save the shape offsets relative to dgContainer\n                    foreach ($spOffsets as &$spOffset) {\n                        $spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes)\n                    }\n\n                    $this->spOffsets = $spOffsets;\n                    $this->spTypes = $spTypes;\n                }\n\n                // write the record\n                $recVer = 0xF;\n                $recInstance = 0x0000;\n                $recType = 0xF002;\n                $length = strlen($innerData);\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                $this->data = $header . $innerData;\n\n                break;\n            case SpgrContainer::class:\n                // this is a container record\n\n                // initialize\n                $innerData = '';\n\n                // initialize spape offsets\n                $totalSize = 8;\n                $spOffsets = [];\n                $spTypes = [];\n\n                // treat the inner data\n                foreach ($this->object->getChildren() as $spContainer) {\n                    /** @var Blip|BSE|BstoreContainer|DgContainer|DggContainer|SharedEscher|SpContainer|SpgrContainer $spContainer */\n                    $writer = new self($spContainer);\n                    $spData = $writer->close();\n                    $innerData .= $spData;\n\n                    // save the shape offsets (where new shape records begin)\n                    $totalSize += strlen($spData);\n                    $spOffsets[] = $totalSize;\n\n                    $spTypes = array_merge($spTypes, $writer->getSpTypes());\n                }\n\n                // write the record\n                $recVer = 0xF;\n                $recInstance = 0x0000;\n                $recType = 0xF003;\n                $length = strlen($innerData);\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                $this->data = $header . $innerData;\n                $this->spOffsets = $spOffsets;\n                $this->spTypes = $spTypes;\n\n                break;\n            case SpContainer::class:\n                // initialize\n                $data = '';\n\n                // build the data\n\n                // write group shape record, if necessary?\n                if ($this->object->getSpgr()) {\n                    $recVer = 0x1;\n                    $recInstance = 0x0000;\n                    $recType = 0xF009;\n                    $length = 0x00000010;\n\n                    $recVerInstance = $recVer;\n                    $recVerInstance |= $recInstance << 4;\n\n                    $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                    $data .= $header . pack('VVVV', 0, 0, 0, 0);\n                }\n                $this->spTypes[] = ($this->object->getSpType());\n\n                // write the shape record\n                $recVer = 0x2;\n                $recInstance = $this->object->getSpType(); // shape type\n                $recType = 0xF00A;\n                $length = 0x00000008;\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                $data .= $header . pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00);\n\n                // the options\n                if ($this->object->getOPTCollection()) {\n                    $optData = '';\n\n                    $recVer = 0x3;\n                    $recInstance = count($this->object->getOPTCollection());\n                    $recType = 0xF00B;\n                    foreach ($this->object->getOPTCollection() as $property => $value) {\n                        $optData .= pack('vV', $property, $value);\n                    }\n                    $length = strlen($optData);\n\n                    $recVerInstance = $recVer;\n                    $recVerInstance |= $recInstance << 4;\n\n                    $header = pack('vvV', $recVerInstance, $recType, $length);\n                    $data .= $header . $optData;\n                }\n\n                // the client anchor\n                if ($this->object->getStartCoordinates()) {\n                    $recVer = 0x0;\n                    $recInstance = 0x0;\n                    $recType = 0xF010;\n\n                    // start coordinates\n                    [$column, $row] = Coordinate::indexesFromString($this->object->getStartCoordinates());\n                    $c1 = $column - 1;\n                    $r1 = $row - 1;\n\n                    // start offsetX\n                    $startOffsetX = $this->object->getStartOffsetX();\n\n                    // start offsetY\n                    $startOffsetY = $this->object->getStartOffsetY();\n\n                    // end coordinates\n                    [$column, $row] = Coordinate::indexesFromString($this->object->getEndCoordinates());\n                    $c2 = $column - 1;\n                    $r2 = $row - 1;\n\n                    // end offsetX\n                    $endOffsetX = $this->object->getEndOffsetX();\n\n                    // end offsetY\n                    $endOffsetY = $this->object->getEndOffsetY();\n\n                    $clientAnchorData = pack('vvvvvvvvv', $this->object->getSpFlag(), $c1, $startOffsetX, $r1, $startOffsetY, $c2, $endOffsetX, $r2, $endOffsetY);\n\n                    $length = strlen($clientAnchorData);\n\n                    $recVerInstance = $recVer;\n                    $recVerInstance |= $recInstance << 4;\n\n                    $header = pack('vvV', $recVerInstance, $recType, $length);\n                    $data .= $header . $clientAnchorData;\n                }\n\n                // the client data, just empty for now\n                if (!$this->object->getSpgr()) {\n                    $clientDataData = '';\n\n                    $recVer = 0x0;\n                    $recInstance = 0x0;\n                    $recType = 0xF011;\n\n                    $length = strlen($clientDataData);\n\n                    $recVerInstance = $recVer;\n                    $recVerInstance |= $recInstance << 4;\n\n                    $header = pack('vvV', $recVerInstance, $recType, $length);\n                    $data .= $header . $clientDataData;\n                }\n\n                // write the record\n                $recVer = 0xF;\n                $recInstance = 0x0000;\n                $recType = 0xF004;\n                $length = strlen($data);\n\n                $recVerInstance = $recVer;\n                $recVerInstance |= $recInstance << 4;\n\n                $header = pack('vvV', $recVerInstance, $recType, $length);\n\n                $this->data = $header . $data;\n\n                break;\n        }\n\n        return $this->data;\n    }\n\n    /**\n     * Gets the shape offsets.\n     *\n     * @return int[]\n     */\n    public function getSpOffsets(): array\n    {\n        return $this->spOffsets;\n    }\n\n    /**\n     * Gets the shape types.\n     *\n     * @return mixed[]\n     */\n    public function getSpTypes(): array\n    {\n        return $this->spTypes;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Font.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass Font\n{\n    /**\n     * Color index.\n     */\n    private int $colorIndex;\n\n    /**\n     * Font.\n     */\n    private \\PhpOffice\\PhpSpreadsheet\\Style\\Font $font;\n\n    /**\n     * Constructor.\n     */\n    public function __construct(\\PhpOffice\\PhpSpreadsheet\\Style\\Font $font)\n    {\n        $this->colorIndex = 0x7FFF;\n        $this->font = $font;\n    }\n\n    /**\n     * Set the color index.\n     */\n    public function setColorIndex(int $colorIndex): void\n    {\n        $this->colorIndex = $colorIndex;\n    }\n\n    private static int $notImplemented = 0;\n\n    /**\n     * Get font record data.\n     */\n    public function writeFont(): string\n    {\n        $font_outline = self::$notImplemented;\n        $font_shadow = self::$notImplemented;\n\n        $icv = $this->colorIndex; // Index to color palette\n        if ($this->font->getSuperscript()) {\n            $sss = 1;\n        } elseif ($this->font->getSubscript()) {\n            $sss = 2;\n        } else {\n            $sss = 0;\n        }\n        $bFamily = 0; // Font family\n        $bCharSet = \\PhpOffice\\PhpSpreadsheet\\Shared\\Font::getCharsetFromFontName((string) $this->font->getName()); // Character set\n\n        $record = 0x31; // Record identifier\n        $reserved = 0x00; // Reserved\n        $grbit = 0x00; // Font attributes\n        if ($this->font->getItalic()) {\n            $grbit |= 0x02;\n        }\n        if ($this->font->getStrikethrough()) {\n            $grbit |= 0x08;\n        }\n        if ($font_outline) {\n            $grbit |= 0x10;\n        }\n        if ($font_shadow) {\n            $grbit |= 0x20;\n        }\n\n        $data = pack(\n            'vvvvvCCCC',\n            // Fontsize (in twips)\n            $this->font->getSize() * 20,\n            $grbit,\n            // Colour\n            $icv,\n            // Font weight\n            self::mapBold($this->font->getBold()),\n            // Superscript/Subscript\n            $sss,\n            self::mapUnderline((string) $this->font->getUnderline()),\n            $bFamily,\n            $bCharSet,\n            $reserved\n        );\n        $data .= StringHelper::UTF8toBIFF8UnicodeShort((string) $this->font->getName());\n\n        $length = strlen($data);\n        $header = pack('vv', $record, $length);\n\n        return $header . $data;\n    }\n\n    /**\n     * Map to BIFF5-BIFF8 codes for bold.\n     */\n    private static function mapBold(?bool $bold): int\n    {\n        if ($bold === true) {\n            return 0x2BC; //  700 = Bold font weight\n        }\n\n        return 0x190; //  400 = Normal font weight\n    }\n\n    /**\n     * Map of BIFF2-BIFF8 codes for underline styles.\n     *\n     * @var int[]\n     */\n    private static array $mapUnderline = [\n        \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_NONE => 0x00,\n        \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_SINGLE => 0x01,\n        \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_DOUBLE => 0x02,\n        \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_SINGLEACCOUNTING => 0x21,\n        \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_DOUBLEACCOUNTING => 0x22,\n    ];\n\n    /**\n     * Map underline.\n     */\n    private static function mapUnderline(string $underline): int\n    {\n        if (isset(self::$mapUnderline[$underline])) {\n            return self::$mapUnderline[$underline];\n        }\n\n        return 0x00;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Parser.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet as PhpspreadsheetWorksheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\n\n// Original file header of PEAR::Spreadsheet_Excel_Writer_Parser (used as the base for this class):\n// -----------------------------------------------------------------------------------------\n// *  Class for parsing Excel formulas\n// *\n// *  License Information:\n// *\n// *    Spreadsheet_Excel_Writer:  A library for generating Excel Spreadsheets\n// *    Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com\n// *\n// *    This library is free software; you can redistribute it and/or\n// *    modify it under the terms of the GNU Lesser General Public\n// *    License as published by the Free Software Foundation; either\n// *    version 2.1 of the License, or (at your option) any later version.\n// *\n// *    This library is distributed in the hope that it will be useful,\n// *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n// *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// *    Lesser General Public License for more details.\n// *\n// *    You should have received a copy of the GNU Lesser General Public\n// *    License along with this library; if not, write to the Free Software\n// *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n// */\nclass Parser\n{\n    /**    Constants                */\n    // Sheet title in unquoted form\n    // Invalid sheet title characters cannot occur in the sheet title:\n    //         *:/\\?[]\n    // Moreover, there are valid sheet title characters that cannot occur in unquoted form (there may be more?)\n    // +-% '^&<>=,;#()\"{}\n    const REGEX_SHEET_TITLE_UNQUOTED = '[^\\*\\:\\/\\\\\\\\\\?\\[\\]\\+\\-\\% \\\\\\'\\^\\&\\<\\>\\=\\,\\;\\#\\(\\)\\\"\\{\\}]+';\n\n    // Sheet title in quoted form (without surrounding quotes)\n    // Invalid sheet title characters cannot occur in the sheet title:\n    // *:/\\?[]                    (usual invalid sheet title characters)\n    // Single quote is represented as a pair ''\n    // Former value for this constant led to \"catastrophic backtracking\",\n    //     unable to handle double apostrophes.\n    //     (*COMMIT) should prevent this.\n    const REGEX_SHEET_TITLE_QUOTED = \"([^*:/\\\\\\\\?\\\\[\\\\]']|'')+\";\n\n    const REGEX_CELL_TITLE_QUOTED = \"~^'\"\n        . self::REGEX_SHEET_TITLE_QUOTED\n        . '(:' . self::REGEX_SHEET_TITLE_QUOTED . ')?'\n        . \"'!(*COMMIT)\"\n        . '[$]?[A-Ia-i]?[A-Za-z][$]?(\\d+)'\n        . '$~u';\n\n    const REGEX_RANGE_TITLE_QUOTED = \"~^'\"\n        . self::REGEX_SHEET_TITLE_QUOTED\n        . '(:' . self::REGEX_SHEET_TITLE_QUOTED . ')?'\n        . \"'!(*COMMIT)\"\n        . '[$]?[A-Ia-i]?[A-Za-z][$]?(\\d+)'\n        . ':'\n        . '[$]?[A-Ia-i]?[A-Za-z][$]?(\\d+)'\n        . '$~u';\n\n    private const UTF8 = 'UTF-8';\n\n    /**\n     * The index of the character we are currently looking at.\n     */\n    public int $currentCharacter;\n\n    /**\n     * The token we are working on.\n     */\n    public string $currentToken;\n\n    /**\n     * The formula to parse.\n     */\n    private string $formula;\n\n    /**\n     * The character ahead of the current char.\n     */\n    public string $lookAhead;\n\n    /**\n     * The parse tree to be generated.\n     *\n     * @var mixed[]|string\n     */\n    public array|string $parseTree;\n\n    /**\n     * Array of external sheets.\n     *\n     * @var array<string, int>\n     */\n    private array $externalSheets;\n\n    /**\n     * Array of sheet references in the form of REF structures.\n     *\n     * @var array<int|string, int|string>\n     */\n    public array $references;\n\n    /**\n     * The Excel ptg indices.\n     *\n     * @var array<string, int>\n     */\n    private array $ptg = [\n        'ptgExp' => 0x01,\n        'ptgTbl' => 0x02,\n        'ptgAdd' => 0x03,\n        'ptgSub' => 0x04,\n        'ptgMul' => 0x05,\n        'ptgDiv' => 0x06,\n        'ptgPower' => 0x07,\n        'ptgConcat' => 0x08,\n        'ptgLT' => 0x09,\n        'ptgLE' => 0x0A,\n        'ptgEQ' => 0x0B,\n        'ptgGE' => 0x0C,\n        'ptgGT' => 0x0D,\n        'ptgNE' => 0x0E,\n        'ptgIsect' => 0x0F,\n        'ptgUnion' => 0x10,\n        'ptgRange' => 0x11,\n        'ptgUplus' => 0x12,\n        'ptgUminus' => 0x13,\n        'ptgPercent' => 0x14,\n        'ptgParen' => 0x15,\n        'ptgMissArg' => 0x16,\n        'ptgStr' => 0x17,\n        'ptgAttr' => 0x19,\n        'ptgSheet' => 0x1A,\n        'ptgEndSheet' => 0x1B,\n        'ptgErr' => 0x1C,\n        'ptgBool' => 0x1D,\n        'ptgInt' => 0x1E,\n        'ptgNum' => 0x1F,\n        'ptgArray' => 0x20,\n        'ptgFunc' => 0x21,\n        'ptgFuncVar' => 0x22,\n        'ptgName' => 0x23,\n        'ptgRef' => 0x24,\n        'ptgArea' => 0x25,\n        'ptgMemArea' => 0x26,\n        'ptgMemErr' => 0x27,\n        'ptgMemNoMem' => 0x28,\n        'ptgMemFunc' => 0x29,\n        'ptgRefErr' => 0x2A,\n        'ptgAreaErr' => 0x2B,\n        'ptgRefN' => 0x2C,\n        'ptgAreaN' => 0x2D,\n        'ptgMemAreaN' => 0x2E,\n        'ptgMemNoMemN' => 0x2F,\n        'ptgNameX' => 0x39,\n        'ptgRef3d' => 0x3A,\n        'ptgArea3d' => 0x3B,\n        'ptgRefErr3d' => 0x3C,\n        'ptgAreaErr3d' => 0x3D,\n        'ptgArrayV' => 0x40,\n        'ptgFuncV' => 0x41,\n        'ptgFuncVarV' => 0x42,\n        'ptgNameV' => 0x43,\n        'ptgRefV' => 0x44,\n        'ptgAreaV' => 0x45,\n        'ptgMemAreaV' => 0x46,\n        'ptgMemErrV' => 0x47,\n        'ptgMemNoMemV' => 0x48,\n        'ptgMemFuncV' => 0x49,\n        'ptgRefErrV' => 0x4A,\n        'ptgAreaErrV' => 0x4B,\n        'ptgRefNV' => 0x4C,\n        'ptgAreaNV' => 0x4D,\n        'ptgMemAreaNV' => 0x4E,\n        'ptgMemNoMemNV' => 0x4F,\n        'ptgFuncCEV' => 0x58,\n        'ptgNameXV' => 0x59,\n        'ptgRef3dV' => 0x5A,\n        'ptgArea3dV' => 0x5B,\n        'ptgRefErr3dV' => 0x5C,\n        'ptgAreaErr3dV' => 0x5D,\n        'ptgArrayA' => 0x60,\n        'ptgFuncA' => 0x61,\n        'ptgFuncVarA' => 0x62,\n        'ptgNameA' => 0x63,\n        'ptgRefA' => 0x64,\n        'ptgAreaA' => 0x65,\n        'ptgMemAreaA' => 0x66,\n        'ptgMemErrA' => 0x67,\n        'ptgMemNoMemA' => 0x68,\n        'ptgMemFuncA' => 0x69,\n        'ptgRefErrA' => 0x6A,\n        'ptgAreaErrA' => 0x6B,\n        'ptgRefNA' => 0x6C,\n        'ptgAreaNA' => 0x6D,\n        'ptgMemAreaNA' => 0x6E,\n        'ptgMemNoMemNA' => 0x6F,\n        'ptgFuncCEA' => 0x78,\n        'ptgNameXA' => 0x79,\n        'ptgRef3dA' => 0x7A,\n        'ptgArea3dA' => 0x7B,\n        'ptgRefErr3dA' => 0x7C,\n        'ptgAreaErr3dA' => 0x7D,\n    ];\n\n    /**\n     * Thanks to Michael Meeks and Gnumeric for the initial arg values.\n     *\n     * The following hash was generated by \"function_locale.pl\" in the distro.\n     * Refer to function_locale.pl for non-English function names.\n     *\n     * The array elements are as follows:\n     * ptg:   The Excel function ptg code.\n     * args:  The number of arguments that the function takes:\n     *           >=0 is a fixed number of arguments.\n     *           -1  is a variable  number of arguments.\n     * class: The reference, value or array class of the function args.\n     * vol:   The function is volatile.\n     *\n     * @var array<string, array{int, int, int, int}>\n     */\n    private array $functions = [\n        // function                  ptg  args  class  vol\n        'COUNT' => [0, -1, 0, 0],\n        'IF' => [1, -1, 1, 0],\n        'ISNA' => [2, 1, 1, 0],\n        'ISERROR' => [3, 1, 1, 0],\n        'SUM' => [4, -1, 0, 0],\n        'AVERAGE' => [5, -1, 0, 0],\n        'MIN' => [6, -1, 0, 0],\n        'MAX' => [7, -1, 0, 0],\n        'ROW' => [8, -1, 0, 0],\n        'COLUMN' => [9, -1, 0, 0],\n        'NA' => [10, 0, 0, 0],\n        'NPV' => [11, -1, 1, 0],\n        'STDEV' => [12, -1, 0, 0],\n        'DOLLAR' => [13, -1, 1, 0],\n        'FIXED' => [14, -1, 1, 0],\n        'SIN' => [15, 1, 1, 0],\n        'COS' => [16, 1, 1, 0],\n        'TAN' => [17, 1, 1, 0],\n        'ATAN' => [18, 1, 1, 0],\n        'PI' => [19, 0, 1, 0],\n        'SQRT' => [20, 1, 1, 0],\n        'EXP' => [21, 1, 1, 0],\n        'LN' => [22, 1, 1, 0],\n        'LOG10' => [23, 1, 1, 0],\n        'ABS' => [24, 1, 1, 0],\n        'INT' => [25, 1, 1, 0],\n        'SIGN' => [26, 1, 1, 0],\n        'ROUND' => [27, 2, 1, 0],\n        'LOOKUP' => [28, -1, 0, 0],\n        'INDEX' => [29, -1, 0, 1],\n        'REPT' => [30, 2, 1, 0],\n        'MID' => [31, 3, 1, 0],\n        'LEN' => [32, 1, 1, 0],\n        'VALUE' => [33, 1, 1, 0],\n        'TRUE' => [34, 0, 1, 0],\n        'FALSE' => [35, 0, 1, 0],\n        'AND' => [36, -1, 0, 0],\n        'OR' => [37, -1, 0, 0],\n        'NOT' => [38, 1, 1, 0],\n        'MOD' => [39, 2, 1, 0],\n        'DCOUNT' => [40, 3, 0, 0],\n        'DSUM' => [41, 3, 0, 0],\n        'DAVERAGE' => [42, 3, 0, 0],\n        'DMIN' => [43, 3, 0, 0],\n        'DMAX' => [44, 3, 0, 0],\n        'DSTDEV' => [45, 3, 0, 0],\n        'VAR' => [46, -1, 0, 0],\n        'DVAR' => [47, 3, 0, 0],\n        'TEXT' => [48, 2, 1, 0],\n        'LINEST' => [49, -1, 0, 0],\n        'TREND' => [50, -1, 0, 0],\n        'LOGEST' => [51, -1, 0, 0],\n        'GROWTH' => [52, -1, 0, 0],\n        'PV' => [56, -1, 1, 0],\n        'FV' => [57, -1, 1, 0],\n        'NPER' => [58, -1, 1, 0],\n        'PMT' => [59, -1, 1, 0],\n        'RATE' => [60, -1, 1, 0],\n        'MIRR' => [61, 3, 0, 0],\n        'IRR' => [62, -1, 0, 0],\n        'RAND' => [63, 0, 1, 1],\n        'MATCH' => [64, -1, 0, 0],\n        'DATE' => [65, 3, 1, 0],\n        'TIME' => [66, 3, 1, 0],\n        'DAY' => [67, 1, 1, 0],\n        'MONTH' => [68, 1, 1, 0],\n        'YEAR' => [69, 1, 1, 0],\n        'WEEKDAY' => [70, -1, 1, 0],\n        'HOUR' => [71, 1, 1, 0],\n        'MINUTE' => [72, 1, 1, 0],\n        'SECOND' => [73, 1, 1, 0],\n        'NOW' => [74, 0, 1, 1],\n        'AREAS' => [75, 1, 0, 1],\n        'ROWS' => [76, 1, 0, 1],\n        'COLUMNS' => [77, 1, 0, 1],\n        'OFFSET' => [78, -1, 0, 1],\n        'SEARCH' => [82, -1, 1, 0],\n        'TRANSPOSE' => [83, 1, 1, 0],\n        'TYPE' => [86, 1, 1, 0],\n        'ATAN2' => [97, 2, 1, 0],\n        'ASIN' => [98, 1, 1, 0],\n        'ACOS' => [99, 1, 1, 0],\n        'CHOOSE' => [100, -1, 1, 0],\n        'HLOOKUP' => [101, -1, 0, 0],\n        'VLOOKUP' => [102, -1, 0, 0],\n        'ISREF' => [105, 1, 0, 0],\n        'LOG' => [109, -1, 1, 0],\n        'CHAR' => [111, 1, 1, 0],\n        'LOWER' => [112, 1, 1, 0],\n        'UPPER' => [113, 1, 1, 0],\n        'PROPER' => [114, 1, 1, 0],\n        'LEFT' => [115, -1, 1, 0],\n        'RIGHT' => [116, -1, 1, 0],\n        'EXACT' => [117, 2, 1, 0],\n        'TRIM' => [118, 1, 1, 0],\n        'REPLACE' => [119, 4, 1, 0],\n        'SUBSTITUTE' => [120, -1, 1, 0],\n        'CODE' => [121, 1, 1, 0],\n        'FIND' => [124, -1, 1, 0],\n        'CELL' => [125, -1, 0, 1],\n        'ISERR' => [126, 1, 1, 0],\n        'ISTEXT' => [127, 1, 1, 0],\n        'ISNUMBER' => [128, 1, 1, 0],\n        'ISBLANK' => [129, 1, 1, 0],\n        'T' => [130, 1, 0, 0],\n        'N' => [131, 1, 0, 0],\n        'DATEVALUE' => [140, 1, 1, 0],\n        'TIMEVALUE' => [141, 1, 1, 0],\n        'SLN' => [142, 3, 1, 0],\n        'SYD' => [143, 4, 1, 0],\n        'DDB' => [144, -1, 1, 0],\n        'INDIRECT' => [148, -1, 1, 1],\n        'CALL' => [150, -1, 1, 0],\n        'CLEAN' => [162, 1, 1, 0],\n        'MDETERM' => [163, 1, 2, 0],\n        'MINVERSE' => [164, 1, 2, 0],\n        'MMULT' => [165, 2, 2, 0],\n        'IPMT' => [167, -1, 1, 0],\n        'PPMT' => [168, -1, 1, 0],\n        'COUNTA' => [169, -1, 0, 0],\n        'PRODUCT' => [183, -1, 0, 0],\n        'FACT' => [184, 1, 1, 0],\n        'DPRODUCT' => [189, 3, 0, 0],\n        'ISNONTEXT' => [190, 1, 1, 0],\n        'STDEVP' => [193, -1, 0, 0],\n        'VARP' => [194, -1, 0, 0],\n        'DSTDEVP' => [195, 3, 0, 0],\n        'DVARP' => [196, 3, 0, 0],\n        'TRUNC' => [197, -1, 1, 0],\n        'ISLOGICAL' => [198, 1, 1, 0],\n        'DCOUNTA' => [199, 3, 0, 0],\n        'USDOLLAR' => [204, -1, 1, 0],\n        'FINDB' => [205, -1, 1, 0],\n        'SEARCHB' => [206, -1, 1, 0],\n        'REPLACEB' => [207, 4, 1, 0],\n        'LEFTB' => [208, -1, 1, 0],\n        'RIGHTB' => [209, -1, 1, 0],\n        'MIDB' => [210, 3, 1, 0],\n        'LENB' => [211, 1, 1, 0],\n        'ROUNDUP' => [212, 2, 1, 0],\n        'ROUNDDOWN' => [213, 2, 1, 0],\n        'ASC' => [214, 1, 1, 0],\n        'DBCS' => [215, 1, 1, 0],\n        'RANK' => [216, -1, 0, 0],\n        'ADDRESS' => [219, -1, 1, 0],\n        'DAYS360' => [220, -1, 1, 0],\n        'TODAY' => [221, 0, 1, 1],\n        'VDB' => [222, -1, 1, 0],\n        'MEDIAN' => [227, -1, 0, 0],\n        'SUMPRODUCT' => [228, -1, 2, 0],\n        'SINH' => [229, 1, 1, 0],\n        'COSH' => [230, 1, 1, 0],\n        'TANH' => [231, 1, 1, 0],\n        'ASINH' => [232, 1, 1, 0],\n        'ACOSH' => [233, 1, 1, 0],\n        'ATANH' => [234, 1, 1, 0],\n        'DGET' => [235, 3, 0, 0],\n        'INFO' => [244, 1, 1, 1],\n        'DB' => [247, -1, 1, 0],\n        'FREQUENCY' => [252, 2, 0, 0],\n        'ERROR.TYPE' => [261, 1, 1, 0],\n        'REGISTER.ID' => [267, -1, 1, 0],\n        'AVEDEV' => [269, -1, 0, 0],\n        'BETADIST' => [270, -1, 1, 0],\n        'GAMMALN' => [271, 1, 1, 0],\n        'BETAINV' => [272, -1, 1, 0],\n        'BINOMDIST' => [273, 4, 1, 0],\n        'CHIDIST' => [274, 2, 1, 0],\n        'CHIINV' => [275, 2, 1, 0],\n        'COMBIN' => [276, 2, 1, 0],\n        'CONFIDENCE' => [277, 3, 1, 0],\n        'CRITBINOM' => [278, 3, 1, 0],\n        'EVEN' => [279, 1, 1, 0],\n        'EXPONDIST' => [280, 3, 1, 0],\n        'FDIST' => [281, 3, 1, 0],\n        'FINV' => [282, 3, 1, 0],\n        'FISHER' => [283, 1, 1, 0],\n        'FISHERINV' => [284, 1, 1, 0],\n        'FLOOR' => [285, 2, 1, 0],\n        'FLOOR.XCL' => [285, 2, 1, 0],\n        'GAMMADIST' => [286, 4, 1, 0],\n        'GAMMAINV' => [287, 3, 1, 0],\n        'CEILING' => [288, 2, 1, 0],\n        'CEILING.XCL' => [288, 2, 1, 0],\n        'HYPGEOMDIST' => [289, 4, 1, 0],\n        'LOGNORMDIST' => [290, 3, 1, 0],\n        'LOGINV' => [291, 3, 1, 0],\n        'NEGBINOMDIST' => [292, 3, 1, 0],\n        'NORMDIST' => [293, 4, 1, 0],\n        'NORMSDIST' => [294, 1, 1, 0],\n        'NORMINV' => [295, 3, 1, 0],\n        'NORMSINV' => [296, 1, 1, 0],\n        'STANDARDIZE' => [297, 3, 1, 0],\n        'ODD' => [298, 1, 1, 0],\n        'PERMUT' => [299, 2, 1, 0],\n        'POISSON' => [300, 3, 1, 0],\n        'TDIST' => [301, 3, 1, 0],\n        'WEIBULL' => [302, 4, 1, 0],\n        'SUMXMY2' => [303, 2, 2, 0],\n        'SUMX2MY2' => [304, 2, 2, 0],\n        'SUMX2PY2' => [305, 2, 2, 0],\n        'CHITEST' => [306, 2, 2, 0],\n        'CORREL' => [307, 2, 2, 0],\n        'COVAR' => [308, 2, 2, 0],\n        'FORECAST' => [309, 3, 2, 0],\n        'FTEST' => [310, 2, 2, 0],\n        'INTERCEPT' => [311, 2, 2, 0],\n        'PEARSON' => [312, 2, 2, 0],\n        'RSQ' => [313, 2, 2, 0],\n        'STEYX' => [314, 2, 2, 0],\n        'SLOPE' => [315, 2, 2, 0],\n        'TTEST' => [316, 4, 2, 0],\n        'PROB' => [317, -1, 2, 0],\n        'DEVSQ' => [318, -1, 0, 0],\n        'GEOMEAN' => [319, -1, 0, 0],\n        'HARMEAN' => [320, -1, 0, 0],\n        'SUMSQ' => [321, -1, 0, 0],\n        'KURT' => [322, -1, 0, 0],\n        'SKEW' => [323, -1, 0, 0],\n        'ZTEST' => [324, -1, 0, 0],\n        'LARGE' => [325, 2, 0, 0],\n        'SMALL' => [326, 2, 0, 0],\n        'QUARTILE' => [327, 2, 0, 0],\n        'PERCENTILE' => [328, 2, 0, 0],\n        'PERCENTRANK' => [329, -1, 0, 0],\n        'MODE' => [330, -1, 2, 0],\n        'TRIMMEAN' => [331, 2, 0, 0],\n        'TINV' => [332, 2, 1, 0],\n        'CONCATENATE' => [336, -1, 1, 0],\n        'POWER' => [337, 2, 1, 0],\n        'RADIANS' => [342, 1, 1, 0],\n        'DEGREES' => [343, 1, 1, 0],\n        'SUBTOTAL' => [344, -1, 0, 0],\n        'SUMIF' => [345, -1, 0, 0],\n        'COUNTIF' => [346, 2, 0, 0],\n        'COUNTBLANK' => [347, 1, 0, 0],\n        'ISPMT' => [350, 4, 1, 0],\n        'DATEDIF' => [351, 3, 1, 0],\n        'DATESTRING' => [352, 1, 1, 0],\n        'NUMBERSTRING' => [353, 2, 1, 0],\n        'ROMAN' => [354, -1, 1, 0],\n        'GETPIVOTDATA' => [358, -1, 0, 0],\n        'HYPERLINK' => [359, -1, 1, 0],\n        'PHONETIC' => [360, 1, 0, 0],\n        'AVERAGEA' => [361, -1, 0, 0],\n        'MAXA' => [362, -1, 0, 0],\n        'MINA' => [363, -1, 0, 0],\n        'STDEVPA' => [364, -1, 0, 0],\n        'VARPA' => [365, -1, 0, 0],\n        'STDEVA' => [366, -1, 0, 0],\n        'VARA' => [367, -1, 0, 0],\n        'BAHTTEXT' => [368, 1, 0, 0],\n    ];\n\n    private Spreadsheet $spreadsheet;\n\n    /**\n     * The class constructor.\n     */\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n\n        $this->currentCharacter = 0;\n        $this->currentToken = ''; // The token we are working on.\n        $this->formula = ''; // The formula to parse.\n        $this->lookAhead = ''; // The character ahead of the current char.\n        $this->parseTree = ''; // The parse tree to be generated.\n        $this->externalSheets = [];\n        $this->references = [];\n    }\n\n    /**\n     * Convert a token to the proper ptg value.\n     *\n     * @param string $token the token to convert\n     *\n     * @return string the converted token on success\n     */\n    private function convert(string $token): string\n    {\n        if (Preg::isMatch('/\"([^\"]|\"\"){0,255}\"/', $token)) {\n            return $this->convertString($token);\n        }\n        if (is_numeric($token)) {\n            return $this->convertNumber($token);\n        }\n        // match references like A1 or $A$1\n        if (Preg::isMatch('/^\\$?([A-Ia-i]?[A-Za-z])\\$?(\\d+)$/', $token)) {\n            return $this->convertRef2d($token);\n        }\n        // match external references like Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1\n        if (Preg::isMatch('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\\d+)$/u', $token)) {\n            return $this->convertRef3d($token);\n        }\n        // match external references like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1\n        if (self::matchCellSheetnameQuoted($token)) {\n            return $this->convertRef3d($token);\n        }\n        // match ranges like A1:B2 or $A$1:$B$2\n        if (Preg::isMatch('/^(\\$)?[A-Ia-i]?[A-Za-z](\\$)?(\\d+)\\:(\\$)?[A-Ia-i]?[A-Za-z](\\$)?(\\d+)$/', $token)) {\n            return $this->convertRange2d($token);\n        }\n        // match external ranges like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2\n        if (Preg::isMatch('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)\\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)$/u', $token)) {\n            return $this->convertRange3d($token);\n        }\n        // match external ranges like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2\n        if (self::matchRangeSheetnameQuoted($token)) {\n            return $this->convertRange3d($token);\n        }\n        // operators (including parentheses)\n        if (isset($this->ptg[$token])) {\n            return pack('C', $this->ptg[$token]);\n        }\n        // match error codes\n        if (Preg::isMatch('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) || $token == '#N/A') {\n            return $this->convertError($token);\n        }\n        if (Preg::isMatch('/^' . Calculation::CALCULATION_REGEXP_DEFINEDNAME . '$/mui', $token) && $this->spreadsheet->getDefinedName($token) !== null) {\n            return $this->convertDefinedName($token);\n        }\n        // commented so argument number can be processed correctly. See toReversePolish().\n        /*if (Preg::isMatch(\"/[A-Z0-9\\xc0-\\xdc\\.]+/\", $token))\n        {\n            return($this->convertFunction($token, $this->_func_args));\n        }*/\n        // if it's an argument, ignore the token (the argument remains)\n        if ($token == 'arg') {\n            return '';\n        }\n        if (Preg::isMatch('/^true$/i', $token)) {\n            return $this->convertBool(1);\n        }\n        if (Preg::isMatch('/^false$/i', $token)) {\n            return $this->convertBool(0);\n        }\n\n        // TODO: use real error codes\n        throw new WriterException(\"Unknown token $token\");\n    }\n\n    /**\n     * Convert a number token to ptgInt or ptgNum.\n     *\n     * @param float|int|string $num an integer or double for conversion to its ptg value\n     */\n    private function convertNumber(mixed $num): string\n    {\n        // Integer in the range 0..2**16-1\n        if ((Preg::isMatch('/^\\d+$/', (string) $num)) && ($num <= 65535)) {\n            return pack('Cv', $this->ptg['ptgInt'], $num);\n        }\n\n        // A float\n        if (BIFFwriter::getByteOrder()) { // if it's Big Endian\n            $num = strrev((string) $num);\n        }\n\n        return pack('Cd', $this->ptg['ptgNum'], $num);\n    }\n\n    private function convertBool(int $num): string\n    {\n        return pack('CC', $this->ptg['ptgBool'], $num);\n    }\n\n    /**\n     * Convert a string token to ptgStr.\n     *\n     * @param string $string a string for conversion to its ptg value\n     *\n     * @return string the converted token\n     */\n    private function convertString(string $string): string\n    {\n        // chop away beggining and ending quotes\n        $string = substr($string, 1, -1);\n        if (strlen($string) > 255) {\n            throw new WriterException('String is too long');\n        }\n\n        return pack('C', $this->ptg['ptgStr']) . StringHelper::UTF8toBIFF8UnicodeShort($string);\n    }\n\n    /**\n     * Convert a function to a ptgFunc or ptgFuncVarV depending on the number of\n     * args that it takes.\n     *\n     * @param string $token the name of the function for convertion to ptg value\n     * @param int $num_args the number of arguments the function receives\n     *\n     * @return string The packed ptg for the function\n     */\n    private function convertFunction(string $token, int $num_args): string\n    {\n        $args = $this->functions[$token][1];\n\n        // Fixed number of args eg. TIME($i, $j, $k).\n        if ($args >= 0) {\n            return pack('Cv', $this->ptg['ptgFuncV'], $this->functions[$token][0]);\n        }\n\n        // Variable number of args eg. SUM($i, $j, $k, ..).\n        return pack('CCv', $this->ptg['ptgFuncVarV'], $num_args, $this->functions[$token][0]);\n    }\n\n    /**\n     * Convert an Excel range such as A1:D4 to a ptgRefV.\n     *\n     * @param string $range An Excel range in the A1:A2\n     */\n    private function convertRange2d(string $range, int $class = 0): string\n    {\n        // TODO: possible class value 0,1,2 check Formula.pm\n        // Split the range into 2 cell refs\n        if (Preg::isMatch('/^(\\$)?([A-Ia-i]?[A-Za-z])(\\$)?(\\d+)\\:(\\$)?([A-Ia-i]?[A-Za-z])(\\$)?(\\d+)$/', $range)) {\n            [$cell1, $cell2] = explode(':', $range);\n        } else {\n            // TODO: use real error codes\n            throw new WriterException('Unknown range separator');\n        }\n        // Convert the cell references\n        [$row1, $col1] = $this->cellToPackedRowcol($cell1);\n        [$row2, $col2] = $this->cellToPackedRowcol($cell2);\n\n        // The ptg value depends on the class of the ptg.\n        if ($class == 0) {\n            $ptgArea = pack('C', $this->ptg['ptgArea']);\n        } elseif ($class == 1) {\n            $ptgArea = pack('C', $this->ptg['ptgAreaV']);\n        } elseif ($class == 2) {\n            $ptgArea = pack('C', $this->ptg['ptgAreaA']);\n        } else {\n            // TODO: use real error codes\n            throw new WriterException(\"Unknown class $class\");\n        }\n\n        return $ptgArea . $row1 . $row2 . $col1 . $col2;\n    }\n\n    /**\n     * Convert an Excel 3d range such as \"Sheet1!A1:D4\" or \"Sheet1:Sheet2!A1:D4\" to\n     * a ptgArea3d.\n     *\n     * @param string $token an Excel range in the Sheet1!A1:A2 format\n     *\n     * @return string the packed ptgArea3d token on success\n     */\n    private function convertRange3d(string $token): string\n    {\n        // Split the ref at the ! symbol\n        [$ext_ref, $range] = PhpspreadsheetWorksheet::extractSheetTitle($token, true, true);\n\n        // Convert the external reference part (different for BIFF8)\n        $ext_ref = $this->getRefIndex($ext_ref ?? '');\n\n        // Split the range into 2 cell refs\n        [$cell1, $cell2] = explode(':', $range ?? '');\n\n        // Convert the cell references\n        if (Preg::isMatch('/^(\\$)?[A-Ia-i]?[A-Za-z](\\$)?(\\d+)$/', $cell1)) {\n            [$row1, $col1] = $this->cellToPackedRowcol($cell1);\n            [$row2, $col2] = $this->cellToPackedRowcol($cell2);\n        } else { // It's a rows range (like 26:27)\n            [$row1, $col1, $row2, $col2] = $this->rangeToPackedRange($cell1 . ':' . $cell2);\n        }\n\n        // The ptg value depends on the class of the ptg.\n        $ptgArea = pack('C', $this->ptg['ptgArea3d']);\n\n        return $ptgArea . $ext_ref . $row1 . $row2 . $col1 . $col2;\n    }\n\n    /**\n     * Convert an Excel reference such as A1, $B2, C$3 or $D$4 to a ptgRefV.\n     *\n     * @param string $cell An Excel cell reference\n     *\n     * @return string The cell in packed() format with the corresponding ptg\n     */\n    private function convertRef2d(string $cell): string\n    {\n        // Convert the cell reference\n        $cell_array = $this->cellToPackedRowcol($cell);\n        [$row, $col] = $cell_array;\n\n        // The ptg value depends on the class of the ptg.\n        $ptgRef = pack('C', $this->ptg['ptgRefA']);\n\n        return $ptgRef . $row . $col;\n    }\n\n    /**\n     * Convert an Excel 3d reference such as \"Sheet1!A1\" or \"Sheet1:Sheet2!A1\" to a\n     * ptgRef3d.\n     *\n     * @param string $cell An Excel cell reference\n     *\n     * @return string the packed ptgRef3d token on success\n     */\n    private function convertRef3d(string $cell): string\n    {\n        // Split the ref at the ! symbol\n        [$ext_ref, $cell] = PhpspreadsheetWorksheet::extractSheetTitle($cell, true, true);\n\n        // Convert the external reference part (different for BIFF8)\n        $ext_ref = $this->getRefIndex($ext_ref ?? '');\n\n        // Convert the cell reference part\n        [$row, $col] = $this->cellToPackedRowcol($cell ?? '');\n\n        // The ptg value depends on the class of the ptg.\n        $ptgRef = pack('C', $this->ptg['ptgRef3dA']);\n\n        return $ptgRef . $ext_ref . $row . $col;\n    }\n\n    /**\n     * Convert an error code to a ptgErr.\n     *\n     * @param string $errorCode The error code for conversion to its ptg value\n     *\n     * @return string The error code ptgErr\n     */\n    private function convertError(string $errorCode): string\n    {\n        return match ($errorCode) {\n            '#NULL!' => pack('C', 0x00),\n            '#DIV/0!' => pack('C', 0x07),\n            '#VALUE!' => pack('C', 0x0F),\n            '#REF!' => pack('C', 0x17),\n            '#NAME?' => pack('C', 0x1D),\n            '#NUM!' => pack('C', 0x24),\n            '#N/A' => pack('C', 0x2A),\n            default => pack('C', 0xFF),\n        };\n    }\n\n    private bool $tryDefinedName = false;\n\n    private function convertDefinedName(string $name): string\n    {\n        if (strlen($name) > 255) {\n            throw new WriterException('Defined Name is too long');\n        }\n\n        if ($this->tryDefinedName) {\n            // @codeCoverageIgnoreStart\n            $nameReference = 1;\n            foreach ($this->spreadsheet->getDefinedNames() as $definedName) {\n                if ($name === $definedName->getName()) {\n                    break;\n                }\n                ++$nameReference;\n            }\n\n            $ptgRef = pack('Cvxx', $this->ptg['ptgName'], $nameReference);\n\n            return $ptgRef;\n            // @codeCoverageIgnoreEnd\n        }\n\n        throw new WriterException('Cannot yet write formulae with defined names to Xls');\n    }\n\n    /**\n     * Look up the REF index that corresponds to an external sheet name\n     * (or range). If it doesn't exist yet add it to the workbook's references\n     * array. It assumes all sheet names given must exist.\n     *\n     * @param string $ext_ref The name of the external reference\n     *\n     * @return string The reference index in packed() format on success\n     */\n    private function getRefIndex(string $ext_ref): string\n    {\n        $ext_ref = Preg::replace([\"/^'/\", \"/'$/\"], ['', ''], $ext_ref); // Remove leading and trailing ' if any.\n        $ext_ref = str_replace('\\'\\'', '\\'', $ext_ref); // Replace escaped '' with '\n\n        // Check if there is a sheet range eg., Sheet1:Sheet2.\n        if (Preg::isMatch('/:/', $ext_ref)) {\n            [$sheet_name1, $sheet_name2] = explode(':', $ext_ref);\n\n            $sheet1 = $this->getSheetIndex($sheet_name1);\n            if ($sheet1 == -1) {\n                throw new WriterException(\"Unknown sheet name $sheet_name1 in formula\");\n            }\n            $sheet2 = $this->getSheetIndex($sheet_name2);\n            if ($sheet2 == -1) {\n                throw new WriterException(\"Unknown sheet name $sheet_name2 in formula\");\n            }\n\n            // Reverse max and min sheet numbers if necessary\n            if ($sheet1 > $sheet2) {\n                [$sheet1, $sheet2] = [$sheet2, $sheet1];\n            }\n        } else { // Single sheet name only.\n            $sheet1 = $this->getSheetIndex($ext_ref);\n            if ($sheet1 == -1) {\n                throw new WriterException(\"Unknown sheet name $ext_ref in formula\");\n            }\n            $sheet2 = $sheet1;\n        }\n\n        // assume all references belong to this document\n        $supbook_index = 0x00;\n        $ref = pack('vvv', $supbook_index, $sheet1, $sheet2);\n        $totalreferences = count($this->references);\n        $index = -1;\n        for ($i = 0; $i < $totalreferences; ++$i) {\n            if ($ref == $this->references[$i]) {\n                $index = $i;\n\n                break;\n            }\n        }\n        // if REF was not found add it to references array\n        if ($index == -1) {\n            $this->references[$totalreferences] = $ref;\n            $index = $totalreferences;\n        }\n\n        return pack('v', $index);\n    }\n\n    /**\n     * Look up the index that corresponds to an external sheet name. The hash of\n     * sheet names is updated by the addworksheet() method of the\n     * \\PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Workbook class.\n     *\n     * @param string $sheet_name Sheet name\n     *\n     * @return int The sheet index, -1 if the sheet was not found\n     */\n    private function getSheetIndex(string $sheet_name): int\n    {\n        if (!isset($this->externalSheets[$sheet_name])) {\n            return -1;\n        }\n\n        return $this->externalSheets[$sheet_name];\n    }\n\n    /**\n     * This method is used to update the array of sheet names. It is\n     * called by the addWorksheet() method of the\n     * \\PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Workbook class.\n     *\n     * @param string $name The name of the worksheet being added\n     * @param int $index The index of the worksheet being added\n     *\n     * @see Workbook::addWorksheet\n     */\n    public function setExtSheet(string $name, int $index): void\n    {\n        $this->externalSheets[$name] = $index;\n    }\n\n    /**\n     * pack() row and column into the required 3 or 4 byte format.\n     *\n     * @param string $cell The Excel cell reference to be packed\n     *\n     * @return array{string, string} Array containing the row and column in packed() format\n     */\n    private function cellToPackedRowcol(string $cell): array\n    {\n        $cell = strtoupper($cell);\n        [$row, $col, $row_rel, $col_rel] = $this->cellToRowcol($cell);\n        if ($col >= AddressRange::MAX_COLUMN_INT_XLS) {\n            throw new WriterException(\"Column in: $cell greater than 255\");\n        }\n        if ($row >= AddressRange::MAX_ROW_XLS) {\n            throw new WriterException(\"Row in: $cell greater than 65536 \");\n        }\n\n        // Set the high bits to indicate if row or col are relative.\n        $col |= $col_rel << 14;\n        $col |= $row_rel << 15;\n        $col = pack('v', $col);\n\n        $row = pack('v', $row);\n\n        return [$row, $col];\n    }\n\n    /**\n     * pack() row range into the required 3 or 4 byte format.\n     * Just using maximum col/rows, which is probably not the correct solution.\n     *\n     * @param string $range The Excel range to be packed\n     *\n     * @return array{string, string, string, string} Array containing (row1,col1,row2,col2) in packed() format\n     */\n    private function rangeToPackedRange(string $range): array\n    {\n        if (!Preg::isMatch('/(\\$)?(\\d+)\\:(\\$)?(\\d+)/', $range, $match)) {\n            // @codeCoverageIgnoreStart\n            throw new WriterException('Regexp failure in rangeToPackedRange');\n            // @codeCoverageIgnoreEnd\n        }\n        // return absolute rows if there is a $ in the ref\n        $row1_rel = empty($match[1]) ? 1 : 0;\n        $row1 = $match[2];\n        $row2_rel = empty($match[3]) ? 1 : 0;\n        $row2 = $match[4];\n        // Convert 1-index to zero-index\n        --$row1;\n        --$row2;\n        // Trick poor inocent Excel\n        $col1 = 0;\n        $col2 = AddressRange::MAX_ROW_XLS - 1; // FIXME: maximum possible value for Excel 5 (change this!!!)\n\n        // FIXME: this changes for BIFF8\n        if (($row1 >= AddressRange::MAX_ROW_XLS) || ($row2 >= AddressRange::MAX_ROW_XLS)) {\n            throw new WriterException(\"Row in: $range greater than 65536 \");\n        }\n\n        // Set the high bits to indicate if rows are relative.\n        $col1 |= $row1_rel << 15;\n        $col2 |= $row2_rel << 15;\n        $col1 = pack('v', $col1);\n        $col2 = pack('v', $col2);\n\n        $row1 = pack('v', $row1);\n        $row2 = pack('v', $row2);\n\n        return [$row1, $col1, $row2, $col2];\n    }\n\n    /**\n     * Convert an Excel cell reference such as A1 or $B2 or C$3 or $D$4 to a zero\n     * indexed row and column number. Also returns two (0,1) values to indicate\n     * whether the row or column are relative references.\n     *\n     * @param string $cell the Excel cell reference in A1 format\n     *\n     * @return array{int, int, int, int}\n     */\n    private function cellToRowcol(string $cell): array\n    {\n        if (!Preg::isMatch('/(\\$)?([A-I]?[A-Z])(\\$)?(\\d+)/', $cell, $match)) {\n            // @codeCoverageIgnoreStart\n            throw new WriterException('Regexp failure in cellToRowcol');\n            // @codeCoverageIgnoreEnd\n        }\n        // return absolute column if there is a $ in the ref\n        $col_rel = empty($match[1]) ? 1 : 0;\n        $col_ref = $match[2];\n        $row_rel = empty($match[3]) ? 1 : 0;\n        $row = $match[4];\n\n        // Convert base26 column string to a number.\n        $expn = strlen($col_ref) - 1;\n        $col = 0;\n        $col_ref_length = strlen($col_ref);\n        for ($i = 0; $i < $col_ref_length; ++$i) {\n            $col += (ord($col_ref[$i]) - 64) * 26 ** $expn;\n            --$expn;\n        }\n\n        // Convert 1-index to zero-index\n        --$row;\n        --$col;\n\n        return [(int) $row, (int) $col, $row_rel, $col_rel];\n    }\n\n    /**\n     * Advance to the next valid token.\n     */\n    private function advance(): void\n    {\n        $token = '';\n        $i = $this->currentCharacter;\n        $formula = mb_str_split($this->formula, 1, self::UTF8);\n        $formula_length = count($formula);\n        // eat up white spaces\n        if ($i < $formula_length) {\n            while ($formula[$i] === ' ') {\n                ++$i;\n            }\n\n            if ($i < ($formula_length - 1)) {\n                $this->lookAhead = $formula[$i + 1];\n            }\n            $token = '';\n        }\n\n        while ($i < $formula_length) {\n            $token .= $formula[$i];\n\n            if ($i < ($formula_length - 1)) {\n                $this->lookAhead = $formula[$i + 1];\n            } else {\n                $this->lookAhead = '';\n            }\n\n            if ($this->match($token) !== '') {\n                $this->currentCharacter = $i + 1;\n                $this->currentToken = $token;\n\n                return;\n            }\n\n            if ($i < ($formula_length - 2)) {\n                $this->lookAhead = $formula[$i + 2];\n            } else { // if we run out of characters lookAhead becomes empty\n                $this->lookAhead = '';\n            }\n            ++$i;\n        }\n    }\n\n    /**\n     * Checks if it's a valid token.\n     *\n     * @param string $token the token to check\n     *\n     * @return string The checked token or empty string on failure\n     */\n    private function match(string $token): string\n    {\n        switch ($token) {\n            case '+':\n            case '-':\n            case '*':\n            case '/':\n            case '(':\n            case ')':\n            case ',':\n            case ';':\n            case '>=':\n            case '<=':\n            case '=':\n            case '<>':\n            case '^':\n            case '&':\n            case '%':\n                return $token;\n\n            case '>':\n                if ($this->lookAhead === '=') { // it's a GE token\n                    break;\n                }\n\n                return $token;\n\n            case '<':\n                // it's a LE or a NE token\n                if (($this->lookAhead === '=') || ($this->lookAhead === '>')) {\n                    break;\n                }\n\n                return $token;\n        }\n\n        // if it's a reference A1 or $A$1 or $A1 or A$1\n        if (\n            Preg::isMatch('/^\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/', $token)\n            && !Preg::isMatch('/\\d/', $this->lookAhead)\n            && ($this->lookAhead !== ':')\n            && ($this->lookAhead !== '.')\n            && ($this->lookAhead !== '!')\n        ) {\n            return $token;\n        }\n        // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1)\n        if (\n            Preg::isMatch('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u', $token)\n            && !Preg::isMatch('/\\d/', $this->lookAhead)\n            && ($this->lookAhead !== ':')\n            && ($this->lookAhead !== '.')\n        ) {\n            return $token;\n        }\n        // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1)\n        if (\n            self::matchCellSheetnameQuoted($token)\n            && !Preg::isMatch('/\\d/', $this->lookAhead)\n            && ($this->lookAhead !== ':') && ($this->lookAhead !== '.')\n        ) {\n            return $token;\n        }\n        // if it's a range A1:A2 or $A$1:$A$2\n        if (\n            Preg::isMatch(\n                '/^(\\$)?[A-Ia-i]?[A-Za-z](\\$)?\\d+:(\\$)?[A-Ia-i]?[A-Za-z](\\$)?\\d+$/',\n                $token\n            )\n            && !Preg::isMatch('/\\d/', $this->lookAhead)\n        ) {\n            return $token;\n        }\n        // If it's an external range like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2\n        if (\n            Preg::isMatch(\n                '/^'\n                . self::REGEX_SHEET_TITLE_UNQUOTED\n                . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED\n                . ')?\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u',\n                $token\n            )\n            && !Preg::isMatch('/\\d/', $this->lookAhead)\n        ) {\n            return $token;\n        }\n        // If it's an external range like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2\n        if (\n            self::matchRangeSheetnameQuoted($token)\n            && !Preg::isMatch('/\\d/', $this->lookAhead)\n        ) {\n            return $token;\n        }\n        // If it's a number (check that it's not a sheet name or range)\n        if (is_numeric($token) && (!is_numeric($token . $this->lookAhead) || ($this->lookAhead == '')) && ($this->lookAhead !== '!') && ($this->lookAhead !== ':')) {\n            return $token;\n        }\n        if (\n            Preg::isMatch('/\"([^\"]|\"\"){0,255}\"/', $token)\n            && $this->lookAhead !== '\"'\n            && (substr_count($token, '\"') % 2 == 0)\n        ) {\n            // If it's a string (of maximum 255 characters)\n            return $token;\n        }\n        // If it's an error code\n        if (\n            Preg::isMatch('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token)\n            || $token === '#N/A'\n        ) {\n            return $token;\n        }\n        // if it's a function call\n        if (\n            Preg::isMatch(\"/^[A-Z0-9\\xc0-\\xdc\\\\.]+$/i\", $token)\n            && ($this->lookAhead === '(')\n        ) {\n            return $token;\n        }\n        if (\n            Preg::isMatch(\n                '/^'\n                . Calculation::CALCULATION_REGEXP_DEFINEDNAME\n                . '$/miu',\n                $token\n            )\n            && $this->spreadsheet->getDefinedName($token) !== null\n        ) {\n            return $token;\n        }\n        if (\n            Preg::isMatch('/^true$/i', $token)\n            && ($this->lookAhead === ')' || $this->lookAhead === ',')\n        ) {\n            return $token;\n        }\n        if (\n            Preg::isMatch('/^false$/i', $token)\n            && ($this->lookAhead === ')' || $this->lookAhead === ',')\n        ) {\n            return $token;\n        }\n        if (str_ends_with($token, ')')) {\n            //    It's an argument of some description (e.g. a named range),\n            //        precise nature yet to be determined\n            return $token;\n        }\n\n        return '';\n    }\n\n    /**\n     * The parsing method. It parses a formula.\n     *\n     * @param string $formula the formula to parse, without the initial equal\n     *                        sign (=)\n     *\n     * @return bool true on success\n     */\n    public function parse(string $formula): bool\n    {\n        $this->currentCharacter = 0;\n        $this->formula = $formula;\n        $this->lookAhead = mb_substr($formula, 1, 1, self::UTF8);\n        $this->advance();\n        $this->parseTree = $this->condition();\n\n        return true;\n    }\n\n    /**\n     * It parses a condition. It assumes the following rule:\n     * Cond -> Expr [(\">\" | \"<\") Expr].\n     *\n     * @return mixed[] The parsed ptg'd tree on success\n     */\n    private function condition(): array\n    {\n        $result = $this->expression();\n        if ($this->currentToken == '<') {\n            $this->advance();\n            $result2 = $this->expression();\n            $result = $this->createTree('ptgLT', $result, $result2);\n        } elseif ($this->currentToken == '>') {\n            $this->advance();\n            $result2 = $this->expression();\n            $result = $this->createTree('ptgGT', $result, $result2);\n        } elseif ($this->currentToken == '<=') {\n            $this->advance();\n            $result2 = $this->expression();\n            $result = $this->createTree('ptgLE', $result, $result2);\n        } elseif ($this->currentToken == '>=') {\n            $this->advance();\n            $result2 = $this->expression();\n            $result = $this->createTree('ptgGE', $result, $result2);\n        } elseif ($this->currentToken == '=') {\n            $this->advance();\n            $result2 = $this->expression();\n            $result = $this->createTree('ptgEQ', $result, $result2);\n        } elseif ($this->currentToken == '<>') {\n            $this->advance();\n            $result2 = $this->expression();\n            $result = $this->createTree('ptgNE', $result, $result2);\n        }\n\n        return $result;\n    }\n\n    /**\n     * It parses an expression. It assumes the following rule:\n     * Expr -> Term [(\"+\" | \"-\") Term]\n     *      -> \"string\"\n     *      -> \"-\" Term : Negative value\n     *      -> \"+\" Term : Positive value\n     *      -> Error code.\n     *\n     * @return mixed[] The parsed ptg'd tree on success\n     */\n    private function expression(): array\n    {\n        // If it's a string return a string node\n        if (Preg::isMatch('/\"([^\"]|\"\"){0,255}\"/', $this->currentToken)) {\n            $tmp = str_replace('\"\"', '\"', $this->currentToken);\n            if (($tmp == '\"') || ($tmp == '')) {\n                //    Trap for \"\" that has been used for an empty string\n                $tmp = '\"\"';\n            }\n            $result = $this->createTree($tmp, '', '');\n            $this->advance();\n\n            return $result;\n        }\n        if (\n            Preg::isMatch('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $this->currentToken)\n            || $this->currentToken == '#N/A'\n        ) { // error code\n            $result = $this->createTree($this->currentToken, 'ptgErr', '');\n            $this->advance();\n\n            return $result;\n        }\n        if ($this->currentToken == '-') { // negative value\n            // catch \"-\" Term\n            $this->advance();\n            $result2 = $this->expression();\n\n            return $this->createTree('ptgUminus', $result2, '');\n        } elseif ($this->currentToken == '+') { // positive value\n            // catch \"+\" Term\n            $this->advance();\n            $result2 = $this->expression();\n\n            return $this->createTree('ptgUplus', $result2, '');\n        }\n        $result = $this->term();\n        while ($this->currentToken === '&') {\n            $this->advance();\n            $result2 = $this->expression();\n            $result = $this->createTree('ptgConcat', $result, $result2);\n        }\n        while (\n            ($this->currentToken == '+')\n            || ($this->currentToken == '-')\n            || ($this->currentToken == '^')\n        ) {\n            if ($this->currentToken == '+') {\n                $this->advance();\n                $result2 = $this->term();\n                $result = $this->createTree('ptgAdd', $result, $result2);\n            } elseif ($this->currentToken == '-') {\n                $this->advance();\n                $result2 = $this->term();\n                $result = $this->createTree('ptgSub', $result, $result2);\n            } else {\n                $this->advance();\n                $result2 = $this->term();\n                $result = $this->createTree('ptgPower', $result, $result2);\n            }\n        }\n\n        return $result;\n    }\n\n    /**\n     * This function just introduces a ptgParen element in the tree, so that Excel\n     * doesn't get confused when working with a parenthesized formula afterwards.\n     *\n     * @return mixed[] The parsed ptg'd tree\n     *\n     * @see fact()\n     */\n    private function parenthesizedExpression(): array\n    {\n        return $this->createTree('ptgParen', $this->expression(), '');\n    }\n\n    /**\n     * It parses a term. It assumes the following rule:\n     * Term -> Fact [(\"*\" | \"/\") Fact].\n     *\n     * @return mixed[] The parsed ptg'd tree on success\n     */\n    private function term(): array\n    {\n        $result = $this->fact();\n        while (\n            ($this->currentToken == '*')\n            || ($this->currentToken == '/')\n        ) {\n            if ($this->currentToken == '*') {\n                $this->advance();\n                $result2 = $this->fact();\n                $result = $this->createTree('ptgMul', $result, $result2);\n            } else {\n                $this->advance();\n                $result2 = $this->fact();\n                $result = $this->createTree('ptgDiv', $result, $result2);\n            }\n        }\n\n        return $result;\n    }\n\n    /**\n     * It parses a factor. It assumes the following rule:\n     * Fact -> ( Expr )\n     *       | CellRef\n     *       | CellRange\n     *       | Number\n     *       | Function.\n     *\n     * @return mixed[] The parsed ptg'd tree on success\n     */\n    private function fact(): array\n    {\n        $currentToken = $this->currentToken;\n        if ($currentToken === '(') {\n            $this->advance(); // eat the \"(\"\n            $result = $this->parenthesizedExpression();\n            if ($this->currentToken !== ')') {\n                throw new WriterException(\"')' token expected.\");\n            }\n            $this->advance(); // eat the \")\"\n\n            return $result;\n        }\n        // if it's a reference\n        if (Preg::isMatch('/^\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/', $this->currentToken)) {\n            $result = $this->createTree($this->currentToken, '', '');\n            $this->advance();\n\n            return $result;\n        }\n        if (\n            Preg::isMatch(\n                '/^'\n                . self::REGEX_SHEET_TITLE_UNQUOTED\n                . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED\n                . ')?\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u',\n                $this->currentToken\n            )\n        ) {\n            // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1)\n            $result = $this->createTree($this->currentToken, '', '');\n            $this->advance();\n\n            return $result;\n        }\n        if (self::matchCellSheetnameQuoted($this->currentToken)) {\n            // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1)\n            $result = $this->createTree($this->currentToken, '', '');\n            $this->advance();\n\n            return $result;\n        }\n        if (\n            Preg::isMatch(\n                '/^(\\$)?[A-Ia-i]?[A-Za-z](\\$)?\\d+:(\\$)?[A-Ia-i]?[A-Za-z](\\$)?\\d+$/',\n                $this->currentToken\n            )\n            || Preg::isMatch(\n                '/^(\\$)?[A-Ia-i]?[A-Za-z](\\$)?\\d+\\.\\.(\\$)?[A-Ia-i]?[A-Za-z](\\$)?\\d+$/',\n                $this->currentToken\n            )\n        ) {\n            // if it's a range A1:B2 or $A$1:$B$2\n            // must be an error?\n            $result = $this->createTree($this->currentToken, '', '');\n            $this->advance();\n\n            return $result;\n        }\n        if (\n            Preg::isMatch(\n                '/^'\n                . self::REGEX_SHEET_TITLE_UNQUOTED\n                . '(\\:'\n                . self::REGEX_SHEET_TITLE_UNQUOTED\n                . ')?\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u',\n                $this->currentToken\n            )\n        ) {\n            // If it's an external range (Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2)\n            // must be an error?\n            $result = $this->createTree($this->currentToken, '', '');\n            $this->advance();\n\n            return $result;\n        }\n        if (self::matchRangeSheetnameQuoted($this->currentToken)) {\n            // If it's an external range ('Sheet1'!A1:B2 or 'Sheet1'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1'!$A$1:$B$2)\n            // must be an error?\n            $result = $this->createTree($this->currentToken, '', '');\n            $this->advance();\n\n            return $result;\n        }\n        if (is_numeric($this->currentToken)) {\n            // If it's a number or a percent\n            if ($this->lookAhead === '%') {\n                $result = $this->createTree('ptgPercent', $this->currentToken, '');\n                $this->advance(); // Skip the percentage operator once we've pre-built that tree\n            } else {\n                $result = $this->createTree($this->currentToken, '', '');\n            }\n            $this->advance();\n\n            return $result;\n        }\n        if (\n            Preg::isMatch(\"/^[A-Z0-9\\xc0-\\xdc\\\\.]+$/i\", $this->currentToken)\n            && ($this->lookAhead === '(')\n        ) {\n            // if it's a function call\n            return $this->func();\n        }\n        if (\n            Preg::isMatch(\n                '/^'\n                . Calculation::CALCULATION_REGEXP_DEFINEDNAME\n                . '$/miu',\n                $this->currentToken\n            )\n            && $this->spreadsheet->getDefinedName($this->currentToken) !== null\n        ) {\n            $result = $this->createTree('ptgName', $this->currentToken, '');\n            $this->advance();\n\n            return $result;\n        }\n        if (Preg::isMatch('/^true|false$/i', $this->currentToken)) {\n            $result = $this->createTree($this->currentToken, '', '');\n            $this->advance();\n\n            return $result;\n        }\n\n        throw new WriterException('Syntax error: ' . $this->currentToken . ', lookahead: ' . $this->lookAhead . ', current char: ' . $this->currentCharacter);\n    }\n\n    /**\n     * It parses a function call. It assumes the following rule:\n     * Func -> ( Expr [,Expr]* ).\n     *\n     * @return mixed[] The parsed ptg'd tree on success\n     */\n    private function func(): array\n    {\n        $num_args = 0; // number of arguments received\n        $function = strtoupper($this->currentToken);\n        $result = ''; // initialize result\n        $this->advance();\n        $this->advance(); // eat the \"(\"\n        while ($this->currentToken !== ')') {\n            if ($num_args > 0) {\n                if ($this->currentToken === ',' || $this->currentToken === ';') {\n                    $this->advance(); // eat the \",\" or \";\"\n                } else {\n                    throw new WriterException(\"Syntax error: comma expected in function $function, arg #{$num_args}\");\n                }\n                $result2 = $this->condition();\n                $result = $this->createTree('arg', $result, $result2);\n            } else { // first argument\n                $result2 = $this->condition();\n                $result = $this->createTree('arg', '', $result2);\n            }\n            ++$num_args;\n        }\n        if (!isset($this->functions[$function])) {\n            throw new WriterException(\"Function $function() doesn't exist\");\n        }\n        $args = $this->functions[$function][1];\n        // If fixed number of args eg. TIME($i, $j, $k). Check that the number of args is valid.\n        if (($args >= 0) && ($args != $num_args)) {\n            throw new WriterException(\"Incorrect number of arguments in function $function() \");\n        }\n\n        $result = $this->createTree($function, $result, $num_args);\n        $this->advance(); // eat the \")\"\n\n        return $result;\n    }\n\n    /**\n     * Creates a tree. In fact an array which may have one or two arrays (sub-trees)\n     * as elements.\n     *\n     * @param mixed $value the value of this node\n     * @param mixed $left the left array (sub-tree) or a final node\n     * @param mixed $right the right array (sub-tree) or a final node\n     *\n     * @return mixed[] A tree\n     */\n    private function createTree(mixed $value, mixed $left, mixed $right): array\n    {\n        return ['value' => $value, 'left' => $left, 'right' => $right];\n    }\n\n    /**\n     * Builds a string containing the tree in reverse polish notation (What you\n     * would use in a HP calculator stack).\n     * The following tree:.\n     *\n     *    +\n     *   / \\\n     *  2   3\n     *\n     * produces: \"23+\"\n     *\n     * The following tree:\n     *\n     *    +\n     *   / \\\n     *  3   *\n     *     / \\\n     *    6   A1\n     *\n     * produces: \"36A1*+\"\n     *\n     * In fact all operands, functions, references, etc... are written as ptg's\n     *\n     * @param mixed[] $tree the optional tree to convert\n     *\n     * @return string The tree in reverse polish notation\n     */\n    public function toReversePolish(array $tree = []): string\n    {\n        $polish = ''; // the string we are going to return\n        if (empty($tree)) { // If it's the first call use parseTree\n            $tree = $this->parseTree;\n        }\n        if (!is_array($tree) || !isset($tree['left'], $tree['right'], $tree['value'])) {\n            throw new WriterException('Unexpected non-array');\n        }\n\n        if (is_array($tree['left'])) {\n            $converted_tree = $this->toReversePolish($tree['left']);\n            $polish .= $converted_tree;\n        } elseif ($tree['left'] != '') { // It's a final node\n            $converted_tree = $this->convert($tree['left']); //* @phpstan-ignore-line\n            $polish .= $converted_tree;\n        }\n        if (is_array($tree['right'])) {\n            $converted_tree = $this->toReversePolish($tree['right']);\n            $polish .= $converted_tree;\n        } elseif ($tree['right'] != '') { // It's a final node\n            $converted_tree = $this->convert(StringHelper::convertToString($tree['right']));\n            $polish .= $converted_tree;\n        }\n        // if it's a function convert it here (so we can set its arguments)\n        /** @var string */\n        $treeValueString = $tree['value'];\n        if (\n            Preg::isMatch(\"/^[A-Z0-9\\xc0-\\xdc\\\\.]+$/\", $treeValueString)\n            && !Preg::isMatch('/^([A-Ia-i]?[A-Za-z])(\\d+)$/', $treeValueString)\n            && !Preg::isMatch(\n                '/^[A-Ia-i]?[A-Za-z](\\d+)\\.\\.[A-Ia-i]?[A-Za-z](\\d+)$/',\n                $treeValueString\n            )\n            && !is_numeric($treeValueString)\n            && !isset($this->ptg[$treeValueString])\n        ) {\n            // left subtree for a function is always an array.\n            if ($tree['left'] != '') {\n                $left_tree = $this->toReversePolish($tree['left']); //* @phpstan-ignore-line\n            } else {\n                $left_tree = '';\n            }\n\n            // add its left subtree and return.\n            if ($left_tree !== '' || $tree['right'] !== '') {\n                /** @var string */\n                $treeValueString = $tree['value'];\n                /** @var int */\n                $treeRightInt = is_numeric($tree['right']) ? ((int) $tree['right']) : 0;\n\n                return $left_tree . $this->convertFunction($treeValueString, $treeRightInt);\n            }\n        }\n        /** @var string */\n        $treeValueString = $tree['value'];\n        $converted_tree = $this->convert($treeValueString);\n\n        return $polish . $converted_tree;\n    }\n\n    public static function matchCellSheetnameQuoted(string $token): bool\n    {\n        return Preg::isMatch(\n            self::REGEX_CELL_TITLE_QUOTED,\n            $token\n        );\n    }\n\n    public static function matchRangeSheetnameQuoted(string $token): bool\n    {\n        return Preg::isMatch(\n            self::REGEX_RANGE_TITLE_QUOTED,\n            $token\n        );\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Style/CellAlignment.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\n\nclass CellAlignment\n{\n    /**\n     * @var array<string, int>\n     */\n    private static array $horizontalMap = [\n        Alignment::HORIZONTAL_GENERAL => 0,\n        Alignment::HORIZONTAL_LEFT => 1,\n        Alignment::HORIZONTAL_RIGHT => 3,\n        Alignment::HORIZONTAL_CENTER => 2,\n        Alignment::HORIZONTAL_CENTER_CONTINUOUS => 6,\n        Alignment::HORIZONTAL_JUSTIFY => 5,\n    ];\n\n    /**\n     * @var array<string, int>\n     */\n    private static array $verticalMap = [\n        Alignment::VERTICAL_BOTTOM => 2,\n        Alignment::VERTICAL_TOP => 0,\n        Alignment::VERTICAL_CENTER => 1,\n        Alignment::VERTICAL_JUSTIFY => 3,\n    ];\n\n    public static function horizontal(Alignment $alignment): int\n    {\n        $horizontalAlignment = $alignment->getHorizontal();\n\n        if (is_string($horizontalAlignment) && array_key_exists($horizontalAlignment, self::$horizontalMap)) {\n            return self::$horizontalMap[$horizontalAlignment];\n        }\n\n        return self::$horizontalMap[Alignment::HORIZONTAL_GENERAL];\n    }\n\n    public static function wrap(Alignment $alignment): int\n    {\n        $wrap = $alignment->getWrapText();\n\n        return ($wrap === true) ? 1 : 0;\n    }\n\n    public static function vertical(Alignment $alignment): int\n    {\n        $verticalAlignment = $alignment->getVertical();\n\n        if (is_string($verticalAlignment) && array_key_exists($verticalAlignment, self::$verticalMap)) {\n            return self::$verticalMap[$verticalAlignment];\n        }\n\n        return self::$verticalMap[Alignment::VERTICAL_BOTTOM];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Style/CellBorder.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\n\nclass CellBorder\n{\n    /**\n     * @var array<string, int>\n     */\n    protected static array $styleMap = [\n        Border::BORDER_NONE => 0x00,\n        Border::BORDER_THIN => 0x01,\n        Border::BORDER_MEDIUM => 0x02,\n        Border::BORDER_DASHED => 0x03,\n        Border::BORDER_DOTTED => 0x04,\n        Border::BORDER_THICK => 0x05,\n        Border::BORDER_DOUBLE => 0x06,\n        Border::BORDER_HAIR => 0x07,\n        Border::BORDER_MEDIUMDASHED => 0x08,\n        Border::BORDER_DASHDOT => 0x09,\n        Border::BORDER_MEDIUMDASHDOT => 0x0A,\n        Border::BORDER_DASHDOTDOT => 0x0B,\n        Border::BORDER_MEDIUMDASHDOTDOT => 0x0C,\n        Border::BORDER_SLANTDASHDOT => 0x0D,\n        Border::BORDER_OMIT => 0x00,\n    ];\n\n    public static function style(Border $border): int\n    {\n        $borderStyle = $border->getBorderStyle();\n\n        if (array_key_exists($borderStyle, self::$styleMap)) {\n            return self::$styleMap[$borderStyle];\n        }\n\n        return self::$styleMap[Border::BORDER_NONE];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Style/CellFill.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\n\nclass CellFill\n{\n    /**\n     * @var array<string, int>\n     */\n    protected static array $fillStyleMap = [\n        Fill::FILL_NONE => 0x00,\n        Fill::FILL_SOLID => 0x01,\n        Fill::FILL_PATTERN_MEDIUMGRAY => 0x02,\n        Fill::FILL_PATTERN_DARKGRAY => 0x03,\n        Fill::FILL_PATTERN_LIGHTGRAY => 0x04,\n        Fill::FILL_PATTERN_DARKHORIZONTAL => 0x05,\n        Fill::FILL_PATTERN_DARKVERTICAL => 0x06,\n        Fill::FILL_PATTERN_DARKDOWN => 0x07,\n        Fill::FILL_PATTERN_DARKUP => 0x08,\n        Fill::FILL_PATTERN_DARKGRID => 0x09,\n        Fill::FILL_PATTERN_DARKTRELLIS => 0x0A,\n        Fill::FILL_PATTERN_LIGHTHORIZONTAL => 0x0B,\n        Fill::FILL_PATTERN_LIGHTVERTICAL => 0x0C,\n        Fill::FILL_PATTERN_LIGHTDOWN => 0x0D,\n        Fill::FILL_PATTERN_LIGHTUP => 0x0E,\n        Fill::FILL_PATTERN_LIGHTGRID => 0x0F,\n        Fill::FILL_PATTERN_LIGHTTRELLIS => 0x10,\n        Fill::FILL_PATTERN_GRAY125 => 0x11,\n        Fill::FILL_PATTERN_GRAY0625 => 0x12,\n        Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8\n        Fill::FILL_GRADIENT_PATH => 0x00,   // does not exist in BIFF8\n    ];\n\n    public static function style(Fill $fill): int\n    {\n        $fillStyle = $fill->getFillType();\n\n        if (is_string($fillStyle) && array_key_exists($fillStyle, self::$fillStyleMap)) {\n            return self::$fillStyleMap[$fillStyle];\n        }\n\n        return self::$fillStyleMap[Fill::FILL_NONE];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Workbook.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\n\n// Original file header of PEAR::Spreadsheet_Excel_Writer_Workbook (used as the base for this class):\n// -----------------------------------------------------------------------------------------\n// /*\n// *  Module written/ported by Xavier Noguer <xnoguer@rezebra.com>\n// *\n// *  The majority of this is _NOT_ my code.  I simply ported it from the\n// *  PERL Spreadsheet::WriteExcel module.\n// *\n// *  The author of the Spreadsheet::WriteExcel module is John McNamara\n// *  <jmcnamara@cpan.org>\n// *\n// *  I _DO_ maintain this code, and John McNamara has nothing to do with the\n// *  porting of this code to PHP.  Any questions directly related to this\n// *  class library should be directed to me.\n// *\n// *  License Information:\n// *\n// *    Spreadsheet_Excel_Writer:  A library for generating Excel Spreadsheets\n// *    Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com\n// *\n// *    This library is free software; you can redistribute it and/or\n// *    modify it under the terms of the GNU Lesser General Public\n// *    License as published by the Free Software Foundation; either\n// *    version 2.1 of the License, or (at your option) any later version.\n// *\n// *    This library is distributed in the hope that it will be useful,\n// *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n// *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// *    Lesser General Public License for more details.\n// *\n// *    You should have received a copy of the GNU Lesser General Public\n// *    License along with this library; if not, write to the Free Software\n// *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n// */\nclass Workbook extends BIFFwriter\n{\n    /**\n     * Formula parser.\n     */\n    private Parser $parser;\n\n    /*\n     * The BIFF file size for the workbook. Not currently used.\n     *\n     * @see calcSheetOffsets()\n     */\n    //private int $biffSize;\n\n    /**\n     * XF Writers.\n     *\n     * @var Xf[]\n     */\n    private array $xfWriters = [];\n\n    /**\n     * Array containing the colour palette.\n     *\n     * @var array<int, array{int, int, int, int}>\n     */\n    private array $palette;\n\n    /**\n     * The codepage indicates the text encoding used for strings.\n     */\n    private int $codepage;\n\n    /**\n     * The country code used for localization.\n     */\n    private int $countryCode;\n\n    /**\n     * Workbook.\n     */\n    private Spreadsheet $spreadsheet;\n\n    /**\n     * Fonts writers.\n     *\n     * @var Font[]\n     */\n    private array $fontWriters = [];\n\n    /**\n     * Added fonts. Maps from font's hash => index in workbook.\n     *\n     * @var int[]\n     */\n    private array $addedFonts = [];\n\n    /**\n     * Shared number formats.\n     *\n     * @var NumberFormat[]\n     */\n    private array $numberFormats = [];\n\n    /**\n     * Added number formats. Maps from numberFormat's hash => index in workbook.\n     *\n     * @var int[]\n     */\n    private array $addedNumberFormats = [];\n\n    /**\n     * Sizes of the binary worksheet streams.\n     *\n     * @var int[]\n     */\n    private array $worksheetSizes = [];\n\n    /**\n     * Offsets of the binary worksheet streams relative to the start of the global workbook stream.\n     *\n     * @var int[]\n     */\n    private array $worksheetOffsets = [];\n\n    /**\n     * Total number of shared strings in workbook.\n     */\n    private int $stringTotal;\n\n    /**\n     * Number of unique shared strings in workbook.\n     */\n    private int $stringUnique;\n\n    /**\n     * Array of unique shared strings in workbook.\n     *\n     * @var array<string, int>\n     */\n    private array $stringTable;\n\n    /**\n     * Color cache.\n     *\n     * @var int[]\n     */\n    private array $colors;\n\n    /**\n     * Escher object corresponding to MSODRAWINGGROUP.\n     */\n    private ?\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher $escher = null;\n\n    /**\n     * Class constructor.\n     *\n     * @param Spreadsheet $spreadsheet The Workbook\n     * @param int $str_total Total number of strings\n     * @param int $str_unique Total number of unique strings\n     * @param array<string, int> $str_table String Table\n     * @param int[] $colors Colour Table\n     * @param Parser $parser The formula parser created for the Workbook\n     */\n    public function __construct(Spreadsheet $spreadsheet, int &$str_total, int &$str_unique, array &$str_table, array &$colors, Parser $parser)\n    {\n        // It needs to call its parent's constructor explicitly\n        parent::__construct();\n\n        $this->parser = $parser;\n        //$this->biffSize = 0;\n        $this->palette = [];\n        $this->countryCode = -1;\n\n        $this->stringTotal = &$str_total;\n        $this->stringUnique = &$str_unique;\n        $this->stringTable = &$str_table;\n        $this->colors = &$colors;\n        $this->setPaletteXl97();\n\n        $this->spreadsheet = $spreadsheet;\n\n        $this->codepage = 0x04B0;\n\n        // Add empty sheets and Build color cache\n        $countSheets = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $countSheets; ++$i) {\n            $phpSheet = $spreadsheet->getSheet($i);\n\n            $this->parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser\n\n            $supbook_index = 0x00;\n            $ref = pack('vvv', $supbook_index, $i, $i);\n            $this->parser->references[] = $ref; // Register reference with parser\n\n            // Sheet tab colors?\n            if ($phpSheet->isTabColorSet()) {\n                $this->addColor($phpSheet->getTabColor()->getRGB());\n            }\n        }\n    }\n\n    /**\n     * Add a new XF writer.\n     *\n     * @param bool $isStyleXf Is it a style XF?\n     *\n     * @return int Index to XF record\n     */\n    public function addXfWriter(Style $style, bool $isStyleXf = false): int\n    {\n        $xfWriter = new Xf($style);\n        $xfWriter->setIsStyleXf($isStyleXf);\n\n        // Add the font if not already added\n        $fontIndex = $this->addFont($style->getFont());\n\n        // Assign the font index to the xf record\n        $xfWriter->setFontIndex($fontIndex);\n\n        // Background colors, best to treat these after the font so black will come after white in custom palette\n        if ($style->getFill()->getStartColor()->getRGB()) {\n            $xfWriter->setFgColor(\n                $this->addColor(\n                    $style->getFill()->getStartColor()->getRGB()\n                )\n            );\n        }\n        if ($style->getFill()->getEndColor()->getRGB()) {\n            $xfWriter->setBgColor(\n                $this->addColor(\n                    $style->getFill()->getEndColor()->getRGB()\n                )\n            );\n        }\n        $xfWriter->setBottomColor($this->addColor($style->getBorders()->getBottom()->getColor()->getRGB()));\n        $xfWriter->setTopColor($this->addColor($style->getBorders()->getTop()->getColor()->getRGB()));\n        $xfWriter->setRightColor($this->addColor($style->getBorders()->getRight()->getColor()->getRGB()));\n        $xfWriter->setLeftColor($this->addColor($style->getBorders()->getLeft()->getColor()->getRGB()));\n        $xfWriter->setDiagColor($this->addColor($style->getBorders()->getDiagonal()->getColor()->getRGB()));\n\n        // Add the number format if it is not a built-in one and not already added\n        if ($style->getNumberFormat()->getBuiltInFormatCode() === false) {\n            $numberFormatHashCode = $style->getNumberFormat()->getHashCode();\n\n            if (isset($this->addedNumberFormats[$numberFormatHashCode])) {\n                $numberFormatIndex = $this->addedNumberFormats[$numberFormatHashCode];\n            } else {\n                $numberFormatIndex = 164 + count($this->numberFormats);\n                $this->numberFormats[$numberFormatIndex] = $style->getNumberFormat();\n                $this->addedNumberFormats[$numberFormatHashCode] = $numberFormatIndex;\n            }\n        } else {\n            $numberFormatIndex = (int) $style->getNumberFormat()->getBuiltInFormatCode();\n        }\n\n        // Assign the number format index to xf record\n        $xfWriter->setNumberFormatIndex($numberFormatIndex);\n\n        $this->xfWriters[] = $xfWriter;\n\n        return count($this->xfWriters) - 1;\n    }\n\n    /**\n     * Add a font to added fonts.\n     *\n     * @return int Index to FONT record\n     */\n    public function addFont(\\PhpOffice\\PhpSpreadsheet\\Style\\Font $font): int\n    {\n        $fontHashCode = $font->getHashCode();\n        if (isset($this->addedFonts[$fontHashCode])) {\n            $fontIndex = $this->addedFonts[$fontHashCode];\n        } else {\n            $countFonts = count($this->fontWriters);\n            $fontIndex = ($countFonts < 4) ? $countFonts : $countFonts + 1;\n\n            $fontWriter = new Font($font);\n            $fontWriter->setColorIndex($this->addColor($font->getColor()->getRGB()));\n            $this->fontWriters[] = $fontWriter;\n\n            $this->addedFonts[$fontHashCode] = $fontIndex;\n        }\n\n        return $fontIndex;\n    }\n\n    /**\n     * Alter color palette adding a custom color.\n     *\n     * @param string $rgb E.g. 'FF00AA'\n     *\n     * @return int Color index\n     */\n    public function addColor(string $rgb, int $default = 0): int\n    {\n        if (!isset($this->colors[$rgb])) {\n            $color\n                = [\n                    (int) hexdec(substr($rgb, 0, 2)),\n                    (int) hexdec(substr($rgb, 2, 2)),\n                    (int) hexdec(substr($rgb, 4)),\n                    0,\n                ];\n            $colorIndex = array_search($color, $this->palette);\n            if ($colorIndex) {\n                $this->colors[$rgb] = $colorIndex;\n            } else {\n                if (count($this->colors) === 0) {\n                    $lastColor = 7;\n                } else {\n                    $lastColor = end($this->colors);\n                }\n                if ($lastColor < 57) {\n                    // then we add a custom color altering the palette\n                    $colorIndex = $lastColor + 1;\n                    $this->palette[$colorIndex] = $color;\n                    $this->colors[$rgb] = $colorIndex;\n                } else {\n                    // no room for more custom colors, just map to black\n                    $colorIndex = $default;\n                }\n            }\n        } else {\n            // fetch already added custom color\n            $colorIndex = $this->colors[$rgb];\n        }\n\n        return $colorIndex;\n    }\n\n    /**\n     * Sets the colour palette to the Excel 97+ default.\n     */\n    private function setPaletteXl97(): void\n    {\n        $this->palette = [\n            0x08 => [0x00, 0x00, 0x00, 0x00],\n            0x09 => [0xFF, 0xFF, 0xFF, 0x00],\n            0x0A => [0xFF, 0x00, 0x00, 0x00],\n            0x0B => [0x00, 0xFF, 0x00, 0x00],\n            0x0C => [0x00, 0x00, 0xFF, 0x00],\n            0x0D => [0xFF, 0xFF, 0x00, 0x00],\n            0x0E => [0xFF, 0x00, 0xFF, 0x00],\n            0x0F => [0x00, 0xFF, 0xFF, 0x00],\n            0x10 => [0x80, 0x00, 0x00, 0x00],\n            0x11 => [0x00, 0x80, 0x00, 0x00],\n            0x12 => [0x00, 0x00, 0x80, 0x00],\n            0x13 => [0x80, 0x80, 0x00, 0x00],\n            0x14 => [0x80, 0x00, 0x80, 0x00],\n            0x15 => [0x00, 0x80, 0x80, 0x00],\n            0x16 => [0xC0, 0xC0, 0xC0, 0x00],\n            0x17 => [0x80, 0x80, 0x80, 0x00],\n            0x18 => [0x99, 0x99, 0xFF, 0x00],\n            0x19 => [0x99, 0x33, 0x66, 0x00],\n            0x1A => [0xFF, 0xFF, 0xCC, 0x00],\n            0x1B => [0xCC, 0xFF, 0xFF, 0x00],\n            0x1C => [0x66, 0x00, 0x66, 0x00],\n            0x1D => [0xFF, 0x80, 0x80, 0x00],\n            0x1E => [0x00, 0x66, 0xCC, 0x00],\n            0x1F => [0xCC, 0xCC, 0xFF, 0x00],\n            0x20 => [0x00, 0x00, 0x80, 0x00],\n            0x21 => [0xFF, 0x00, 0xFF, 0x00],\n            0x22 => [0xFF, 0xFF, 0x00, 0x00],\n            0x23 => [0x00, 0xFF, 0xFF, 0x00],\n            0x24 => [0x80, 0x00, 0x80, 0x00],\n            0x25 => [0x80, 0x00, 0x00, 0x00],\n            0x26 => [0x00, 0x80, 0x80, 0x00],\n            0x27 => [0x00, 0x00, 0xFF, 0x00],\n            0x28 => [0x00, 0xCC, 0xFF, 0x00],\n            0x29 => [0xCC, 0xFF, 0xFF, 0x00],\n            0x2A => [0xCC, 0xFF, 0xCC, 0x00],\n            0x2B => [0xFF, 0xFF, 0x99, 0x00],\n            0x2C => [0x99, 0xCC, 0xFF, 0x00],\n            0x2D => [0xFF, 0x99, 0xCC, 0x00],\n            0x2E => [0xCC, 0x99, 0xFF, 0x00],\n            0x2F => [0xFF, 0xCC, 0x99, 0x00],\n            0x30 => [0x33, 0x66, 0xFF, 0x00],\n            0x31 => [0x33, 0xCC, 0xCC, 0x00],\n            0x32 => [0x99, 0xCC, 0x00, 0x00],\n            0x33 => [0xFF, 0xCC, 0x00, 0x00],\n            0x34 => [0xFF, 0x99, 0x00, 0x00],\n            0x35 => [0xFF, 0x66, 0x00, 0x00],\n            0x36 => [0x66, 0x66, 0x99, 0x00],\n            0x37 => [0x96, 0x96, 0x96, 0x00],\n            0x38 => [0x00, 0x33, 0x66, 0x00],\n            0x39 => [0x33, 0x99, 0x66, 0x00],\n            0x3A => [0x00, 0x33, 0x00, 0x00],\n            0x3B => [0x33, 0x33, 0x00, 0x00],\n            0x3C => [0x99, 0x33, 0x00, 0x00],\n            0x3D => [0x99, 0x33, 0x66, 0x00],\n            0x3E => [0x33, 0x33, 0x99, 0x00],\n            0x3F => [0x33, 0x33, 0x33, 0x00],\n        ];\n    }\n\n    /**\n     * Assemble worksheets into a workbook and send the BIFF data to an OLE\n     * storage.\n     *\n     * @param int[] $worksheetSizes The sizes in bytes of the binary worksheet streams\n     *\n     * @return string Binary data for workbook stream\n     */\n    public function writeWorkbook(array $worksheetSizes): string\n    {\n        $this->worksheetSizes = $worksheetSizes;\n\n        // Calculate the number of selected worksheet tabs and call the finalization\n        // methods for each worksheet\n        $total_worksheets = $this->spreadsheet->getSheetCount();\n\n        // Add part 1 of the Workbook globals, what goes before the SHEET records\n        $this->storeBof(0x0005);\n        $this->writeCodepage();\n        $this->writeWindow1();\n\n        $this->writeDateMode();\n        $this->writeAllFonts();\n        $this->writeAllNumberFormats();\n        $this->writeAllXfs();\n        $this->writeAllStyles();\n        $this->writePalette();\n\n        // Prepare part 3 of the workbook global stream, what goes after the SHEET records\n        $part3 = '';\n        if ($this->countryCode !== -1) {\n            $part3 .= $this->writeCountry();\n        }\n        $part3 .= $this->writeRecalcId();\n\n        $part3 .= $this->writeSupbookInternal();\n        /* TODO: store external SUPBOOK records and XCT and CRN records\n        in case of external references for BIFF8 */\n        $part3 .= $this->writeExternalsheetBiff8();\n        $part3 .= $this->writeAllDefinedNamesBiff8();\n        $part3 .= $this->writeMsoDrawingGroup();\n        $part3 .= $this->writeSharedStringsTable();\n\n        $part3 .= $this->writeEof();\n\n        // Add part 2 of the Workbook globals, the SHEET records\n        $this->calcSheetOffsets();\n        for ($i = 0; $i < $total_worksheets; ++$i) {\n            $this->writeBoundSheet($this->spreadsheet->getSheet($i), $this->worksheetOffsets[$i]);\n        }\n\n        // Add part 3 of the Workbook globals\n        $this->_data .= $part3;\n\n        return $this->_data;\n    }\n\n    /**\n     * Calculate offsets for Worksheet BOF records.\n     */\n    private function calcSheetOffsets(): void\n    {\n        $boundsheet_length = 10; // fixed length for a BOUNDSHEET record\n\n        // size of Workbook globals part 1 + 3\n        $offset = $this->_datasize;\n\n        // add size of Workbook globals part 2, the length of the SHEET records\n        $total_worksheets = count($this->spreadsheet->getAllSheets());\n        foreach ($this->spreadsheet->getWorksheetIterator() as $sheet) {\n            $offset += $boundsheet_length + strlen(StringHelper::UTF8toBIFF8UnicodeShort($sheet->getTitle()));\n        }\n\n        // add the sizes of each of the Sheet substreams, respectively\n        for ($i = 0; $i < $total_worksheets; ++$i) {\n            $this->worksheetOffsets[$i] = $offset;\n            $offset += $this->worksheetSizes[$i];\n        }\n        //$this->biffSize = $offset;\n    }\n\n    /**\n     * Store the Excel FONT records.\n     */\n    private function writeAllFonts(): void\n    {\n        foreach ($this->fontWriters as $fontWriter) {\n            $this->append($fontWriter->writeFont());\n        }\n    }\n\n    /**\n     * Store user defined numerical formats i.e. FORMAT records.\n     */\n    private function writeAllNumberFormats(): void\n    {\n        foreach ($this->numberFormats as $numberFormatIndex => $numberFormat) {\n            $this->writeNumberFormat((string) $numberFormat->getFormatCode(), $numberFormatIndex);\n        }\n    }\n\n    /**\n     * Write all XF records.\n     */\n    private function writeAllXfs(): void\n    {\n        foreach ($this->xfWriters as $xfWriter) {\n            $this->append($xfWriter->writeXf());\n        }\n    }\n\n    /**\n     * Write all STYLE records.\n     */\n    private function writeAllStyles(): void\n    {\n        $this->writeStyle();\n    }\n\n    private function parseDefinedNameValue(DefinedName $definedName): string\n    {\n        $definedRange = $definedName->getValue();\n        $splitCount = Preg::matchAllWithOffsets(\n            '/' . Calculation::CALCULATION_REGEXP_CELLREF . '/mui',\n            $definedRange,\n            $splitRanges\n        );\n\n        $lengths = array_map([StringHelper::class, 'strlenAllowNull'], array_column($splitRanges[0], 0));\n        $offsets = array_column($splitRanges[0], 1);\n\n        $worksheets = $splitRanges[2];\n        $columns = $splitRanges[6];\n        $rows = $splitRanges[7];\n\n        while ($splitCount > 0) {\n            --$splitCount;\n            $length = $lengths[$splitCount];\n            $offset = $offsets[$splitCount];\n            $worksheet = $worksheets[$splitCount][0];\n            $column = $columns[$splitCount][0];\n            $row = $rows[$splitCount][0];\n\n            $newRange = '';\n            if (empty($worksheet)) {\n                if (($offset === 0) || ($definedRange[$offset - 1] !== ':')) {\n                    // We should have a worksheet\n                    $worksheet = $definedName->getWorksheet()?->getTitle();\n                }\n            } else {\n                $worksheet = str_replace(\"''\", \"'\", trim($worksheet, \"'\"));\n            }\n            if (!empty($worksheet)) {\n                $newRange = \"'\" . str_replace(\"'\", \"''\", $worksheet) . \"'!\";\n            }\n\n            if (!empty($column)) {\n                $newRange .= \"\\${$column}\";\n            }\n            if (!empty($row)) {\n                $newRange .= \"\\${$row}\";\n            }\n\n            $definedRange = substr($definedRange, 0, $offset) . $newRange . substr($definedRange, $offset + $length);\n        }\n\n        return $definedRange;\n    }\n\n    /**\n     * Writes all the DEFINEDNAME records (BIFF8).\n     * So far this is only used for repeating rows/columns (print titles) and print areas.\n     */\n    private function writeAllDefinedNamesBiff8(): string\n    {\n        $chunk = '';\n\n        // Named ranges\n        $definedNames = $this->spreadsheet->getDefinedNames();\n        if (count($definedNames) > 0) {\n            // Loop named ranges\n            foreach ($definedNames as $definedName) {\n                $range = $this->parseDefinedNameValue($definedName);\n\n                // parse formula\n                try {\n                    $this->parser->parse($range);\n                    $formulaData = $this->parser->toReversePolish();\n\n                    // make sure tRef3d is of type tRef3dR (0x3A)\n                    if (isset($formulaData[0]) && ($formulaData[0] == \"\\x7A\" || $formulaData[0] == \"\\x5A\")) {\n                        $formulaData = \"\\x3A\" . substr($formulaData, 1);\n                    }\n\n                    if ($definedName->getLocalOnly()) {\n                        // local scope\n                        $scopeWs = $definedName->getScope();\n                        $scope = ($scopeWs === null) ? 0 : ($this->spreadsheet->getIndex($scopeWs) + 1);\n                    } else {\n                        // global scope\n                        $scope = 0;\n                    }\n                    $chunk .= $this->writeData($this->writeDefinedNameBiff8($definedName->getName(), $formulaData, $scope, false));\n                } catch (PhpSpreadsheetException) {\n                    // do nothing\n                }\n            }\n        }\n\n        // total number of sheets\n        $total_worksheets = $this->spreadsheet->getSheetCount();\n\n        // write the print titles (repeating rows, columns), if any\n        for ($i = 0; $i < $total_worksheets; ++$i) {\n            $sheetSetup = $this->spreadsheet->getSheet($i)->getPageSetup();\n            // simultaneous repeatColumns repeatRows\n            if ($sheetSetup->isColumnsToRepeatAtLeftSet() && $sheetSetup->isRowsToRepeatAtTopSet()) {\n                $repeat = $sheetSetup->getColumnsToRepeatAtLeft();\n                $colmin = Coordinate::columnIndexFromString($repeat[0]) - 1;\n                $colmax = Coordinate::columnIndexFromString($repeat[1]) - 1;\n\n                $repeat = $sheetSetup->getRowsToRepeatAtTop();\n                $rowmin = $repeat[0] - 1;\n                $rowmax = $repeat[1] - 1;\n\n                // construct formula data manually\n                $formulaData = pack('Cv', 0x29, 0x17); // tMemFunc\n                $formulaData .= pack('Cvvvvv', 0x3B, $i, 0, 65535, $colmin, $colmax); // tArea3d\n                $formulaData .= pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, 0, 255); // tArea3d\n                $formulaData .= pack('C', 0x10); // tList\n\n                // store the DEFINEDNAME record\n                $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true));\n            } elseif ($sheetSetup->isColumnsToRepeatAtLeftSet() || $sheetSetup->isRowsToRepeatAtTopSet()) {\n                // (exclusive) either repeatColumns or repeatRows.\n                // Columns to repeat\n                if ($sheetSetup->isColumnsToRepeatAtLeftSet()) {\n                    $repeat = $sheetSetup->getColumnsToRepeatAtLeft();\n                    $colmin = Coordinate::columnIndexFromString($repeat[0]) - 1;\n                    $colmax = Coordinate::columnIndexFromString($repeat[1]) - 1;\n                } else {\n                    $colmin = 0;\n                    $colmax = 255;\n                }\n                // Rows to repeat\n                if ($sheetSetup->isRowsToRepeatAtTopSet()) {\n                    $repeat = $sheetSetup->getRowsToRepeatAtTop();\n                    $rowmin = $repeat[0] - 1;\n                    $rowmax = $repeat[1] - 1;\n                } else {\n                    $rowmin = 0;\n                    $rowmax = 65535;\n                }\n\n                // construct formula data manually because parser does not recognize absolute 3d cell references\n                $formulaData = pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, $colmin, $colmax);\n\n                // store the DEFINEDNAME record\n                $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true));\n            }\n        }\n\n        // write the print areas, if any\n        for ($i = 0; $i < $total_worksheets; ++$i) {\n            $sheetSetup = $this->spreadsheet->getSheet($i)->getPageSetup();\n            if ($sheetSetup->isPrintAreaSet()) {\n                // Print area, e.g. A3:J6,H1:X20\n                $printArea = Coordinate::splitRange($sheetSetup->getPrintArea());\n                $countPrintArea = count($printArea);\n\n                $formulaData = '';\n                for ($j = 0; $j < $countPrintArea; ++$j) {\n                    $printAreaRect = $printArea[$j]; // e.g. A3:J6\n                    $printAreaRect[0] = Coordinate::indexesFromString($printAreaRect[0]);\n                    /** @var string */\n                    $printAreaRect1 = $printAreaRect[1];\n                    $printAreaRect[1] = Coordinate::indexesFromString($printAreaRect1);\n\n                    $print_rowmin = $printAreaRect[0][1] - 1;\n                    $print_rowmax = $printAreaRect[1][1] - 1;\n                    $print_colmin = $printAreaRect[0][0] - 1;\n                    $print_colmax = $printAreaRect[1][0] - 1;\n\n                    // construct formula data manually because parser does not recognize absolute 3d cell references\n                    $formulaData .= pack('Cvvvvv', 0x3B, $i, $print_rowmin, $print_rowmax, $print_colmin, $print_colmax);\n\n                    if ($j > 0) {\n                        $formulaData .= pack('C', 0x10); // list operator token ','\n                    }\n                }\n\n                // store the DEFINEDNAME record\n                $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x06), $formulaData, $i + 1, true));\n            }\n        }\n\n        // write autofilters, if any\n        for ($i = 0; $i < $total_worksheets; ++$i) {\n            $sheetAutoFilter = $this->spreadsheet->getSheet($i)->getAutoFilter();\n            $autoFilterRange = $sheetAutoFilter->getRange();\n            if (!empty($autoFilterRange)) {\n                $rangeBounds = Coordinate::rangeBoundaries($autoFilterRange);\n\n                //Autofilter built in name\n                $name = pack('C', 0x0D);\n\n                $chunk .= $this->writeData($this->writeShortNameBiff8($name, $i + 1, $rangeBounds, true));\n            }\n        }\n\n        return $chunk;\n    }\n\n    /**\n     * Write a DEFINEDNAME record for BIFF8 using explicit binary formula data.\n     *\n     * @param string $name The name in UTF-8\n     * @param string $formulaData The binary formula data\n     * @param int $sheetIndex 1-based sheet index the defined name applies to. 0 = global\n     * @param bool $isBuiltIn Built-in name?\n     *\n     * @return string Complete binary record data\n     */\n    private function writeDefinedNameBiff8(string $name, string $formulaData, int $sheetIndex = 0, bool $isBuiltIn = false): string\n    {\n        $record = 0x0018;\n\n        // option flags\n        $options = $isBuiltIn ? 0x20 : 0x00;\n\n        // length of the name, character count\n        $nlen = StringHelper::countCharacters($name);\n\n        // name with stripped length field\n        $name = substr(StringHelper::UTF8toBIFF8UnicodeLong($name), 2);\n\n        // size of the formula (in bytes)\n        $sz = strlen($formulaData);\n\n        // combine the parts\n        $data = pack('vCCvvvCCCC', $options, 0, $nlen, $sz, 0, $sheetIndex, 0, 0, 0, 0)\n            . $name . $formulaData;\n        $length = strlen($data);\n\n        $header = pack('vv', $record, $length);\n\n        return $header . $data;\n    }\n\n    /**\n     * Write a short NAME record.\n     *\n     * @param int $sheetIndex 1-based sheet index the defined name applies to. 0 = global\n     * @param int[][] $rangeBounds range boundaries\n     *\n     * @return string Complete binary record data\n     * */\n    private function writeShortNameBiff8(string $name, int $sheetIndex, array $rangeBounds, bool $isHidden = false): string\n    {\n        $record = 0x0018;\n\n        // option flags\n        $options = ($isHidden ? 0x21 : 0x00);\n\n        $extra = pack(\n            'Cvvvvv',\n            0x3B,\n            $sheetIndex - 1,\n            $rangeBounds[0][1] - 1,\n            $rangeBounds[1][1] - 1,\n            $rangeBounds[0][0] - 1,\n            $rangeBounds[1][0] - 1\n        );\n\n        // size of the formula (in bytes)\n        $sz = strlen($extra);\n\n        // combine the parts\n        $data = pack('vCCvvvCCCCC', $options, 0, 1, $sz, 0, $sheetIndex, 0, 0, 0, 0, 0)\n            . $name . $extra;\n        $length = strlen($data);\n\n        $header = pack('vv', $record, $length);\n\n        return $header . $data;\n    }\n\n    /**\n     * Stores the CODEPAGE biff record.\n     */\n    private function writeCodepage(): void\n    {\n        $record = 0x0042; // Record identifier\n        $length = 0x0002; // Number of bytes to follow\n        $cv = $this->codepage; // The code page\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $cv);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write Excel BIFF WINDOW1 record.\n     */\n    private function writeWindow1(): void\n    {\n        $record = 0x003D; // Record identifier\n        $length = 0x0012; // Number of bytes to follow\n\n        $xWn = 0x0000; // Horizontal position of window\n        $yWn = 0x0000; // Vertical position of window\n        $dxWn = 0x25BC; // Width of window\n        $dyWn = 0x1572; // Height of window\n\n        $grbit = 0x0038; // Option flags\n\n        // not supported by PhpSpreadsheet, so there is only one selected sheet, the active\n        $ctabsel = 1; // Number of workbook tabs selected\n\n        $wTabRatio = 0x0258; // Tab to scrollbar ratio\n\n        // not supported by PhpSpreadsheet, set to 0\n        $itabFirst = 0; // 1st displayed worksheet\n        $itabCur = $this->spreadsheet->getActiveSheetIndex(); // Active worksheet\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvvvvvvv', $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Writes Excel BIFF BOUNDSHEET record.\n     *\n     * @param int $offset Location of worksheet BOF\n     */\n    private function writeBoundSheet(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $sheet, int $offset): void\n    {\n        $sheetname = $sheet->getTitle();\n        $record = 0x0085; // Record identifier\n        $ss = match ($sheet->getSheetState()) {\n            \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::SHEETSTATE_VISIBLE => 0x00,\n            \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::SHEETSTATE_HIDDEN => 0x01,\n            \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::SHEETSTATE_VERYHIDDEN => 0x02,\n            default => 0x00,\n        };\n\n        // sheet type\n        $st = 0x00;\n\n        //$grbit = 0x0000; // Visibility and sheet type\n\n        $data = pack('VCC', $offset, $ss, $st);\n        $data .= StringHelper::UTF8toBIFF8UnicodeShort($sheetname);\n\n        $length = strlen($data);\n        $header = pack('vv', $record, $length);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write Internal SUPBOOK record.\n     */\n    private function writeSupbookInternal(): string\n    {\n        $record = 0x01AE; // Record identifier\n        $length = 0x0004; // Bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vv', $this->spreadsheet->getSheetCount(), 0x0401);\n\n        return $this->writeData($header . $data);\n    }\n\n    /**\n     * Writes the Excel BIFF EXTERNSHEET record. These references are used by\n     * formulas.\n     */\n    private function writeExternalsheetBiff8(): string\n    {\n        $totalReferences = count($this->parser->references);\n        $record = 0x0017; // Record identifier\n        $length = 2 + 6 * $totalReferences; // Number of bytes to follow\n\n        //$supbook_index = 0; // FIXME: only using internal SUPBOOK record\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $totalReferences);\n        for ($i = 0; $i < $totalReferences; ++$i) {\n            $data .= $this->parser->references[$i];\n        }\n\n        return $this->writeData($header . $data);\n    }\n\n    /**\n     * Write Excel BIFF STYLE records.\n     */\n    private function writeStyle(): void\n    {\n        $record = 0x0293; // Record identifier\n        $length = 0x0004; // Bytes to follow\n\n        $ixfe = 0x8000; // Index to cell style XF\n        $BuiltIn = 0x00; // Built-in style\n        $iLevel = 0xFF; // Outline style level\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vCC', $ixfe, $BuiltIn, $iLevel);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Writes Excel FORMAT record for non \"built-in\" numerical formats.\n     *\n     * @param string $format Custom format string\n     * @param int $ifmt Format index code\n     */\n    private function writeNumberFormat(string $format, int $ifmt): void\n    {\n        $record = 0x041E; // Record identifier\n\n        $numberFormatString = StringHelper::UTF8toBIFF8UnicodeLong($format);\n        $length = 2 + strlen($numberFormatString); // Number of bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $ifmt) . $numberFormatString;\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write DATEMODE record to indicate the date system in use (1904 or 1900).\n     */\n    private function writeDateMode(): void\n    {\n        $record = 0x0022; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $f1904 = ($this->spreadsheet->getExcelCalendar() === Date::CALENDAR_MAC_1904)\n            ? 1  // Flag for 1904 date system\n            : 0; // Flag for 1900 date system\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $f1904);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Stores the COUNTRY record for localization.\n     */\n    private function writeCountry(): string\n    {\n        $record = 0x008C; // Record identifier\n        $length = 4; // Number of bytes to follow\n\n        $header = pack('vv', $record, $length);\n        // using the same country code always for simplicity\n        $data = pack('vv', $this->countryCode, $this->countryCode);\n\n        return $this->writeData($header . $data);\n    }\n\n    /**\n     * Write the RECALCID record.\n     */\n    private function writeRecalcId(): string\n    {\n        $record = 0x01C1; // Record identifier\n        $length = 8; // Number of bytes to follow\n\n        $header = pack('vv', $record, $length);\n\n        // by inspection of real Excel files, MS Office Excel 2007 writes this\n        $data = pack('VV', 0x000001C1, 0x00001E667);\n\n        return $this->writeData($header . $data);\n    }\n\n    /**\n     * Stores the PALETTE biff record.\n     */\n    private function writePalette(): void\n    {\n        $aref = $this->palette;\n\n        $record = 0x0092; // Record identifier\n        $length = 2 + 4 * count($aref); // Number of bytes to follow\n        $ccv = count($aref); // Number of RGB values to follow\n        $data = ''; // The RGB data\n\n        // Pack the RGB data\n        foreach ($aref as $color) {\n            foreach ($color as $byte) {\n                $data .= pack('C', $byte);\n            }\n        }\n\n        $header = pack('vvv', $record, $length, $ccv);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Handling of the SST continue blocks is complicated by the need to include an\n     * additional continuation byte depending on whether the string is split between\n     * blocks or whether it starts at the beginning of the block. (There are also\n     * additional complications that will arise later when/if Rich Strings are\n     * supported).\n     *\n     * The Excel documentation says that the SST record should be followed by an\n     * EXTSST record. The EXTSST record is a hash table that is used to optimise\n     * access to SST. However, despite the documentation it doesn't seem to be\n     * required so we will ignore it.\n     *\n     * @return string Binary data\n     */\n    private function writeSharedStringsTable(): string\n    {\n        // maximum size of record data (excluding record header)\n        $continue_limit = 8224;\n\n        // initialize array of record data blocks\n        $recordDatas = [];\n\n        // start SST record data block with total number of strings, total number of unique strings\n        $recordData = pack('VV', $this->stringTotal, $this->stringUnique);\n\n        // loop through all (unique) strings in shared strings table\n        foreach (array_keys($this->stringTable) as $string) {\n            // here $string is a BIFF8 encoded string\n\n            // length = character count\n            $headerinfo = unpack('vlength/Cencoding', $string);\n\n            // currently, this is always 1 = uncompressed\n            $encoding = $headerinfo['encoding'] ?? 1;\n\n            // initialize finished writing current $string\n            $finished = false;\n\n            while ($finished === false) {\n                // normally, there will be only one cycle, but if string cannot immediately be written as is\n                // there will be need for more than one cylcle, if string longer than one record data block, there\n                // may be need for even more cycles\n\n                if (strlen($recordData) + strlen($string) <= $continue_limit) {\n                    // then we can write the string (or remainder of string) without any problems\n                    $recordData .= $string;\n\n                    if (strlen($recordData) + strlen($string) == $continue_limit) {\n                        // we close the record data block, and initialize a new one\n                        $recordDatas[] = $recordData;\n                        $recordData = '';\n                    }\n\n                    // we are finished writing this string\n                    $finished = true;\n                } else {\n                    // special treatment writing the string (or remainder of the string)\n                    // If the string is very long it may need to be written in more than one CONTINUE record.\n\n                    // check how many bytes more there is room for in the current record\n                    $space_remaining = $continue_limit - strlen($recordData);\n\n                    // minimum space needed\n                    // uncompressed: 2 byte string length length field + 1 byte option flags + 2 byte character\n                    // compressed:   2 byte string length length field + 1 byte option flags + 1 byte character\n                    $min_space_needed = ($encoding == 1) ? 5 : 4;\n\n                    // We have two cases\n                    // 1. space remaining is less than minimum space needed\n                    //        here we must waste the space remaining and move to next record data block\n                    // 2. space remaining is greater than or equal to minimum space needed\n                    //        here we write as much as we can in the current block, then move to next record data block\n\n                    if ($space_remaining < $min_space_needed) {\n                        // 1. space remaining is less than minimum space needed.\n                        // we close the block, store the block data\n                        $recordDatas[] = $recordData;\n\n                        // and start new record data block where we start writing the string\n                        $recordData = '';\n                    } else {\n                        // 2. space remaining is greater than or equal to minimum space needed.\n                        // initialize effective remaining space, for Unicode strings this may need to be reduced by 1, see below\n                        $effective_space_remaining = $space_remaining;\n\n                        // for uncompressed strings, sometimes effective space remaining is reduced by 1\n                        if ($encoding == 1 && (strlen($string) - $space_remaining) % 2 == 1) {\n                            --$effective_space_remaining;\n                        }\n\n                        // one block fininshed, store the block data\n                        $recordData .= substr($string, 0, $effective_space_remaining);\n\n                        $string = substr($string, $effective_space_remaining); // for next cycle in while loop\n                        $recordDatas[] = $recordData;\n\n                        // start new record data block with the repeated option flags\n                        $recordData = pack('C', $encoding);\n                    }\n                }\n            }\n        }\n\n        // Store the last record data block unless it is empty\n        // if there was no need for any continue records, this will be the for SST record data block itself\n        if ($recordData !== '') {\n            $recordDatas[] = $recordData;\n        }\n\n        // combine into one chunk with all the blocks SST, CONTINUE,...\n        $chunk = '';\n        foreach ($recordDatas as $i => $recordData) {\n            // first block should have the SST record header, remaining should have CONTINUE header\n            $record = ($i == 0) ? 0x00FC : 0x003C;\n\n            $header = pack('vv', $record, strlen($recordData));\n            $data = $header . $recordData;\n\n            $chunk .= $this->writeData($data);\n        }\n\n        return $chunk;\n    }\n\n    /**\n     * Writes the MSODRAWINGGROUP record if needed. Possibly split using CONTINUE records.\n     */\n    private function writeMsoDrawingGroup(): string\n    {\n        // write the Escher stream if necessary\n        if (isset($this->escher)) {\n            $writer = new Escher($this->escher);\n            $data = $writer->close();\n\n            $record = 0x00EB;\n            $length = strlen($data);\n            $header = pack('vv', $record, $length);\n\n            return $this->writeData($header . $data);\n        }\n\n        return '';\n    }\n\n    /**\n     * Get Escher object.\n     */\n    public function getEscher(): ?\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\n    {\n        return $this->escher;\n    }\n\n    /**\n     * Set Escher object.\n     */\n    public function setEscher(?\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher $escher): void\n    {\n        $this->escher = $escher;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Worksheet.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse Composer\\Pcre\\Preg;\nuse GdImage;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\Run;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\SheetView;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\n\n// Original file header of PEAR::Spreadsheet_Excel_Writer_Worksheet (used as the base for this class):\n// -----------------------------------------------------------------------------------------\n// /*\n// *  Module written/ported by Xavier Noguer <xnoguer@rezebra.com>\n// *\n// *  The majority of this is _NOT_ my code.  I simply ported it from the\n// *  PERL Spreadsheet::WriteExcel module.\n// *\n// *  The author of the Spreadsheet::WriteExcel module is John McNamara\n// *  <jmcnamara@cpan.org>\n// *\n// *  I _DO_ maintain this code, and John McNamara has nothing to do with the\n// *  porting of this code to PHP.  Any questions directly related to this\n// *  class library should be directed to me.\n// *\n// *  License Information:\n// *\n// *    Spreadsheet_Excel_Writer:  A library for generating Excel Spreadsheets\n// *    Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com\n// *\n// *    This library is free software; you can redistribute it and/or\n// *    modify it under the terms of the GNU Lesser General Public\n// *    License as published by the Free Software Foundation; either\n// *    version 2.1 of the License, or (at your option) any later version.\n// *\n// *    This library is distributed in the hope that it will be useful,\n// *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n// *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// *    Lesser General Public License for more details.\n// *\n// *    You should have received a copy of the GNU Lesser General Public\n// *    License along with this library; if not, write to the Free Software\n// *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n// */\nclass Worksheet extends BIFFwriter\n{\n    private static int $always0 = 0;\n\n    private static int $always1 = 1;\n\n    /**\n     * Formula parser.\n     */\n    private Parser $parser;\n\n    /**\n     * Array containing format information for columns.\n     *\n     * @var array<array{int, int, float, int, int, int}>\n     */\n    private array $columnInfo;\n\n    /**\n     * The active pane for the worksheet.\n     */\n    private int $activePane;\n\n    /**\n     * Whether to use outline.\n     */\n    private bool $outlineOn;\n\n    /**\n     * Auto outline styles.\n     */\n    private bool $outlineStyle;\n\n    /**\n     * Whether to have outline summary below.\n     * Not currently used.\n     */\n    private bool $outlineBelow; //* @phpstan-ignore-line\n\n    /**\n     * Whether to have outline summary at the right.\n     * Not currently used.\n     */\n    private bool $outlineRight; //* @phpstan-ignore-line\n\n    /**\n     * Reference to the total number of strings in the workbook.\n     */\n    private int $stringTotal;\n\n    /**\n     * Reference to the number of unique strings in the workbook.\n     */\n    private int $stringUnique;\n\n    /**\n     * Reference to the array containing all the unique strings in the workbook.\n     *\n     * @var array<string, int>\n     */\n    private array $stringTable;\n\n    /**\n     * Color cache.\n     *\n     * @var mixed[]\n     */\n    private array $colors;\n\n    /**\n     * Index of first used row (at least 0).\n     */\n    private int $firstRowIndex;\n\n    /**\n     * Index of last used row. (no used rows means -1).\n     */\n    private int $lastRowIndex;\n\n    /**\n     * Index of first used column (at least 0).\n     */\n    private int $firstColumnIndex;\n\n    /**\n     * Index of last used column (no used columns means -1).\n     */\n    private int $lastColumnIndex;\n\n    /**\n     * Sheet object.\n     */\n    public \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $phpSheet;\n\n    /**\n     * Escher object corresponding to MSODRAWING.\n     */\n    private ?\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher $escher = null;\n\n    /**\n     * Array of font hashes associated to FONT records index.\n     *\n     * @var array<int|string>\n     */\n    public array $fontHashIndex;\n\n    private bool $preCalculateFormulas;\n\n    private int $printHeaders;\n\n    private ?Workbook $writerWorkbook;\n\n    /**\n     * Constructor.\n     *\n     * @param int $str_total Total number of strings\n     * @param int $str_unique Total number of unique strings\n     * @param array<string, int> $str_table String Table\n     * @param mixed[] $colors Colour Table\n     * @param Parser $parser The formula parser created for the Workbook\n     * @param bool $preCalculateFormulas Flag indicating whether formulas should be calculated or just written\n     * @param \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $phpSheet The worksheet to write\n     */\n    public function __construct(int &$str_total, int &$str_unique, array &$str_table, array &$colors, Parser $parser, bool $preCalculateFormulas, \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $phpSheet, ?Workbook $writerWorkbook = null)\n    {\n        // It needs to call its parent's constructor explicitly\n        parent::__construct();\n\n        $this->preCalculateFormulas = $preCalculateFormulas;\n        $this->stringTotal = &$str_total;\n        $this->stringUnique = &$str_unique;\n        $this->stringTable = &$str_table;\n        $this->colors = &$colors;\n        $this->parser = $parser;\n\n        $this->phpSheet = $phpSheet;\n\n        $this->columnInfo = [];\n        $this->activePane = 3;\n\n        $this->printHeaders = 0;\n\n        $this->outlineStyle = false;\n        $this->outlineBelow = true;\n        $this->outlineRight = true;\n        $this->outlineOn = true;\n\n        $this->fontHashIndex = [];\n\n        // calculate values for DIMENSIONS record\n        $minR = 1;\n        $minC = 'A';\n\n        $maxR = $this->phpSheet->getHighestRow();\n        $maxC = $this->phpSheet->getHighestColumn();\n\n        // Determine lowest and highest column and row\n        // BIFF8 DIMENSIONS record requires 0-based indices for both rows and columns\n        // Row methods return 1-based values (Excel UI), so subtract 1 to convert to 0-based\n        $this->firstRowIndex = $minR - 1;\n        $this->lastRowIndex = ($maxR > AddressRange::MAX_ROW_XLS) ? (AddressRange::MAX_ROW_XLS - 1) : ($maxR - 1);\n\n        // Column methods return 1-based values (columnIndexFromString('A') = 1), so subtract 1\n        $this->firstColumnIndex = Coordinate::columnIndexFromString($minC) - 1;\n        $this->lastColumnIndex = min(255, Coordinate::columnIndexFromString($maxC) - 1);\n        $this->writerWorkbook = $writerWorkbook;\n    }\n\n    /**\n     * Add data to the beginning of the workbook (note the reverse order)\n     * and to the end of the workbook.\n     *\n     * @see Workbook::storeWorkbook\n     */\n    public function close(): void\n    {\n        $phpSheet = $this->phpSheet;\n\n        // Storing selected cells and active sheet because it changes while parsing cells with formulas.\n        $selectedCells = $this->phpSheet->getSelectedCells();\n        $activeSheetIndex = $this->phpSheet->getParentOrThrow()->getActiveSheetIndex();\n\n        // Write BOF record\n        $this->storeBof(0x0010);\n\n        // Write PRINTHEADERS\n        $this->writePrintHeaders();\n\n        // Write PRINTGRIDLINES\n        $this->writePrintGridlines();\n\n        // Write GRIDSET\n        $this->writeGridset();\n\n        // Calculate column widths\n        $phpSheet->calculateColumnWidths();\n\n        // Column dimensions\n        if (($defaultWidth = $phpSheet->getDefaultColumnDimension()->getWidth()) < 0) {\n            $defaultWidth = \\PhpOffice\\PhpSpreadsheet\\Shared\\Font::getDefaultColumnWidthByFont($phpSheet->getParentOrThrow()->getDefaultStyle()->getFont());\n        }\n\n        $columnDimensions = $phpSheet->getColumnDimensions();\n        // lastColumnIndex is now 0-based, so no need to subtract 1\n        $maxCol = $this->lastColumnIndex;\n        for ($i = 0; $i <= $maxCol; ++$i) {\n            $hidden = 0;\n            $level = 0;\n            $xfIndex = 15; // there are 15 cell style Xfs\n\n            $width = $defaultWidth;\n\n            $columnLetter = Coordinate::stringFromColumnIndex($i + 1);\n            if (isset($columnDimensions[$columnLetter])) {\n                $columnDimension = $columnDimensions[$columnLetter];\n                if ($columnDimension->getWidth() >= 0) {\n                    $width = $columnDimension->getWidthForOutput(true);\n                }\n                $hidden = $columnDimension->getVisible() ? 0 : 1;\n                $level = $columnDimension->getOutlineLevel();\n                $xfIndex = $columnDimension->getXfIndex() + 15; // there are 15 cell style Xfs\n            }\n\n            // Components of columnInfo:\n            // $firstcol first column on the range\n            // $lastcol  last column on the range\n            // $width    width to set\n            // $xfIndex  The optional cell style Xf index to apply to the columns\n            // $hidden   The optional hidden attribute\n            // $level    The optional outline level\n            $this->columnInfo[] = [$i, $i, $width, $xfIndex, $hidden, $level];\n        }\n\n        // Write GUTS\n        $this->writeGuts();\n\n        // Write DEFAULTROWHEIGHT\n        $this->writeDefaultRowHeight();\n        // Write WSBOOL\n        $this->writeWsbool();\n        // Write horizontal and vertical page breaks\n        $this->writeBreaks();\n        // Write page header\n        $this->writeHeader();\n        // Write page footer\n        $this->writeFooter();\n        // Write page horizontal centering\n        $this->writeHcenter();\n        // Write page vertical centering\n        $this->writeVcenter();\n        // Write left margin\n        $this->writeMarginLeft();\n        // Write right margin\n        $this->writeMarginRight();\n        // Write top margin\n        $this->writeMarginTop();\n        // Write bottom margin\n        $this->writeMarginBottom();\n        // Write page setup\n        $this->writeSetup();\n        // Write sheet protection\n        $this->writeProtect();\n        // Write SCENPROTECT\n        $this->writeScenProtect();\n        // Write OBJECTPROTECT\n        $this->writeObjectProtect();\n        // Write sheet password\n        $this->writePassword();\n        // Write DEFCOLWIDTH record\n        $this->writeDefcol();\n\n        // Write the COLINFO records if they exist\n        if (!empty($this->columnInfo)) {\n            $colcount = count($this->columnInfo);\n            for ($i = 0; $i < $colcount; ++$i) {\n                $this->writeColinfo($this->columnInfo[$i]);\n            }\n        }\n        $autoFilterRange = $phpSheet->getAutoFilter()->getRange();\n        if (!empty($autoFilterRange)) {\n            // Write AUTOFILTERINFO\n            $this->writeAutoFilterInfo();\n        }\n\n        // Write sheet dimensions\n        $this->writeDimensions();\n\n        // Row dimensions\n        foreach ($phpSheet->getRowDimensions() as $rowDimension) {\n            $xfIndex = $rowDimension->getXfIndex() + 15; // there are 15 cellXfs\n            $this->writeRow(\n                $rowDimension->getRowIndex() - 1,\n                (int) $rowDimension->getRowHeight(),\n                $xfIndex,\n                !$rowDimension->getVisible(),\n                $rowDimension->getOutlineLevel()\n            );\n        }\n\n        // Write Cells\n        foreach ($phpSheet->getCellCollection()->getSortedCoordinates() as $coordinate) {\n            /** @var Cell $cell */\n            $cell = $phpSheet->getCellCollection()->get($coordinate);\n            $row = $cell->getRow() - 1;\n            $column = Coordinate::columnIndexFromString($cell->getColumn()) - 1;\n\n            // Don't break Excel break the code!\n            if ($row > 65535 || $column > 255) {\n                throw new WriterException('Rows or columns overflow! Excel5 has limit to 65535 rows and 255 columns. Use XLSX instead.');\n            }\n\n            // Write cell value\n            $xfIndex = $cell->getXfIndex() + 15; // there are 15 cell style Xfs\n\n            $cVal = $cell->getValue();\n            if ($cVal instanceof RichText && (string) $cVal === '') {\n                $cVal = '';\n            }\n            if ($cVal instanceof RichText) {\n                $arrcRun = [];\n                $str_pos = 0;\n                $elements = $cVal->getRichTextElements();\n                foreach ($elements as $element) {\n                    // FONT Index\n                    $str_fontidx = 0;\n                    if ($element instanceof Run) {\n                        $getFont = $element->getFont();\n                        if ($getFont !== null) {\n                            $str_fontidx = $this->fontHashIndex[$getFont->getHashCode()];\n                        }\n                    } else {\n                        $styleArray = $this->phpSheet\n                            ->getParent()\n                            ?->getCellXfCollection();\n                        if ($styleArray !== null) {\n                            $font = $styleArray[$xfIndex - 15] ?? null;\n                            if ($font !== null) {\n                                $font = $font->getFont();\n                            }\n                            if ($font !== null) {\n                                $str_fontidx = $this->fontHashIndex[$font->getHashCode()];\n                            }\n                        }\n                    }\n                    $arrcRun[] = ['strlen' => $str_pos, 'fontidx' => $str_fontidx];\n                    // Position FROM\n                    $str_pos += StringHelper::countCharacters($element->getText(), 'UTF-8');\n                }\n                /** @var array<int, array{strlen: int, fontidx: int}> $arrcRun */\n                $this->writeRichTextString($row, $column, $cVal->getPlainText(), $xfIndex, $arrcRun);\n            } else {\n                switch ($cell->getDatatype()) {\n                    case DataType::TYPE_STRING:\n                    case DataType::TYPE_INLINE:\n                    case DataType::TYPE_NULL:\n                        if ($cVal === '' || $cVal === null) {\n                            $this->writeBlank($row, $column, $xfIndex);\n                        } else {\n                            $this->writeString($row, $column, $cell->getValueString(), $xfIndex);\n                        }\n\n                        break;\n                    case DataType::TYPE_NUMERIC:\n                        $this->writeNumber($row, $column, is_numeric($cVal) ? ($cVal + 0) : 0, $xfIndex);\n\n                        break;\n                    case DataType::TYPE_FORMULA:\n                        $calculatedValue = $this->preCalculateFormulas ? $cell->getCalculatedValue() : null;\n                        $calculatedValueString = $this->preCalculateFormulas ? $cell->getCalculatedValueString() : '';\n                        if (self::WRITE_FORMULA_EXCEPTION == $this->writeFormula($row, $column, $cell->getValueString(), $xfIndex, $calculatedValue)) {\n                            if ($calculatedValue === null) {\n                                $calculatedValue = $cell->getCalculatedValue();\n                            }\n                            $calctype = gettype($calculatedValue);\n                            match ($calctype) {\n                                'integer', 'double' => $this->writeNumber($row, $column, is_numeric($calculatedValue) ? ((float) $calculatedValue) : 0.0, $xfIndex),\n                                'string' => $this->writeString($row, $column, $calculatedValueString, $xfIndex),\n                                'boolean' => $this->writeBoolErr($row, $column, (int) $calculatedValueString, 0, $xfIndex),\n                                default => $this->writeString($row, $column, $cell->getValueString(), $xfIndex),\n                            };\n                        }\n\n                        break;\n                    case DataType::TYPE_BOOL:\n                        $this->writeBoolErr($row, $column, (int) $cell->getValueString(), 0, $xfIndex);\n\n                        break;\n                    case DataType::TYPE_ERROR:\n                        $this->writeBoolErr($row, $column, ErrorCode::error($cell->getValueString()), 1, $xfIndex);\n\n                        break;\n                }\n            }\n        }\n\n        // Append\n        $this->writeMsoDrawing();\n\n        // Restoring active sheet.\n        $this->phpSheet->getParentOrThrow()->setActiveSheetIndex($activeSheetIndex);\n\n        // Write WINDOW2 record\n        $this->writeWindow2();\n\n        // Write PLV record\n        $this->writePageLayoutView();\n\n        // Write ZOOM record\n        $this->writeZoom();\n        if ($phpSheet->getFreezePane()) {\n            $this->writePanes();\n        }\n\n        // Restoring selected cells.\n        $this->phpSheet->setSelectedCells($selectedCells);\n\n        // Write SELECTION record\n        $this->writeSelection();\n\n        // Write MergedCellsTable Record\n        $this->writeMergedCells();\n\n        // Hyperlinks\n        $phpParent = $phpSheet->getParent();\n        $hyperlinkbase = ($phpParent === null) ? '' : $phpParent->getProperties()->getHyperlinkBase();\n        foreach ($phpSheet->getHyperLinkCollection() as $coordinate => $hyperlink) {\n            [$column, $row] = Coordinate::indexesFromString($coordinate);\n\n            $url = $hyperlink->getUrl();\n            if ($url[0] === '#') {\n                $url = \"internal:$url\";\n            } elseif (str_starts_with($url, 'sheet://')) {\n                // internal to current workbook\n                $url = str_replace('sheet://', 'internal:', $url);\n            } elseif (Preg::isMatch('/^(http:|https:|ftp:|mailto:)/', $url)) {\n                // URL\n            } elseif (!empty($hyperlinkbase) && !Preg::isMatch('~^([A-Za-z]:)?[/\\\\\\]~', $url)) {\n                $url = \"$hyperlinkbase$url\";\n                if (!Preg::isMatch('/^(http:|https:|ftp:|mailto:)/', $url)) {\n                    $url = 'external:' . $url;\n                }\n            } else {\n                // external (local file)\n                $url = 'external:' . $url;\n            }\n\n            $this->writeUrl($row - 1, $column - 1, $url);\n        }\n\n        $this->writeDataValidity();\n        $this->writeSheetLayout();\n\n        // Write SHEETPROTECTION record\n        $this->writeSheetProtection();\n        $this->writeRangeProtection();\n\n        // Write Conditional Formatting Rules and Styles\n        $this->writeConditionalFormatting();\n\n        $this->storeEof();\n    }\n\n    /** @deprecated 5.6.0 Use AddressRange::MAX_COLUMN_INT_XLS */\n    public const MAX_XLS_COLUMN = AddressRange::MAX_COLUMN_INT_XLS;\n\n    /** @deprecated 5.6.0 Use AddressRange::MAX_COLUMN_XLS */\n    public const MAX_XLS_COLUMN_STRING = AddressRange::MAX_COLUMN_XLS;\n\n    /** @deprecated 5.6.0 Use AddressRange::MAX_ROW_XLS */\n    public const MAX_XLS_ROW = AddressRange::MAX_ROW_XLS;\n\n    private static function limitRange(string $exploded): string\n    {\n        $retVal = '';\n        $ranges = Coordinate::getRangeBoundaries($exploded);\n        $firstCol = Coordinate::columnIndexFromString($ranges[0][0]);\n        $firstRow = (int) $ranges[0][1];\n        if ($firstCol <= AddressRange::MAX_COLUMN_INT_XLS && $firstRow <= AddressRange::MAX_ROW_XLS) {\n            $retVal = $exploded;\n            if (str_contains($exploded, ':')) {\n                $lastCol = Coordinate::columnIndexFromString($ranges[1][0]);\n                $ranges[1][1] = min(AddressRange::MAX_ROW_XLS, (int) $ranges[1][1]);\n                if ($lastCol > AddressRange::MAX_COLUMN_INT_XLS) {\n                    $ranges[1][0] = AddressRange::MAX_COLUMN_XLS;\n                }\n                $retVal = \"{$ranges[0][0]}{$ranges[0][1]}:{$ranges[1][0]}{$ranges[1][1]}\";\n            }\n        }\n\n        return $retVal;\n    }\n\n    private function writeConditionalFormatting(): void\n    {\n        $conditionalFormulaHelper = new ConditionalHelper($this->parser);\n\n        $arrConditionalStyles = [];\n        foreach ($this->phpSheet->getConditionalStylesCollection() as $key => $value) {\n            $keyExplode = explode(',', Coordinate::resolveUnionAndIntersection($key));\n            foreach ($keyExplode as $exploded) {\n                $range = self::limitRange($exploded);\n                if ($range !== '') {\n                    $arrConditionalStyles[$range] = $value;\n                }\n            }\n        }\n        if (!empty($arrConditionalStyles)) {\n            // Write ConditionalFormattingTable records\n            foreach ($arrConditionalStyles as $cellCoordinate => $conditionalStyles) {\n                $cfHeaderWritten = false;\n                foreach ($conditionalStyles as $conditional) {\n                    /** @var Conditional $conditional */\n                    if (\n                        $conditional->getConditionType() === Conditional::CONDITION_EXPRESSION\n                        || $conditional->getConditionType() === Conditional::CONDITION_CELLIS\n                    ) {\n                        // Write CFHEADER record (only if there are Conditional Styles that we are able to write)\n                        if ($cfHeaderWritten === false) {\n                            $cfHeaderWritten = $this->writeCFHeader($cellCoordinate, $conditionalStyles);\n                        }\n                        if ($cfHeaderWritten === true) {\n                            // Write CFRULE record\n                            $this->writeCFRule($conditionalFormulaHelper, $conditional, $cellCoordinate);\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * Write a cell range address in BIFF8\n     * always fixed range\n     * See section 2.5.14 in OpenOffice.org's Documentation of the Microsoft Excel File Format.\n     *\n     * @param string $range E.g. 'A1' or 'A1:B6'\n     *\n     * @return string Binary data\n     */\n    private function writeBIFF8CellRangeAddressFixed(string $range): string\n    {\n        $explodes = explode(':', $range);\n\n        // extract first cell, e.g. 'A1'\n        $firstCell = $explodes[0];\n        if (ctype_alpha($firstCell)) {\n            $firstCell .= '1';\n        } elseif (ctype_digit($firstCell)) {\n            $firstCell = \"A$firstCell\";\n        }\n\n        // extract last cell, e.g. 'B6'\n        if (count($explodes) == 1) {\n            $lastCell = $firstCell;\n        } else {\n            $lastCell = $explodes[1];\n        }\n        if (ctype_alpha($lastCell)) {\n            $lastCell .= (string) AddressRange::MAX_ROW_XLS;\n        } elseif (ctype_digit($lastCell)) {\n            $lastCell = AddressRange::MAX_COLUMN_XLS . $lastCell;\n        }\n\n        $firstCellCoordinates = Coordinate::indexesFromString($firstCell); // e.g. [0, 1]\n        $lastCellCoordinates = Coordinate::indexesFromString($lastCell); // e.g. [1, 6]\n\n        return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, $firstCellCoordinates[0] - 1, $lastCellCoordinates[0] - 1);\n    }\n\n    /**\n     * Retrieves data from memory in one chunk, or from disk\n     * sized chunks.\n     *\n     * @return string The data\n     */\n    public function getData(): string\n    {\n        // Return data stored in memory\n        if (isset($this->_data)) {\n            $tmp = $this->_data;\n            $this->_data = null;\n\n            return $tmp;\n        }\n\n        // No data to return\n        return '';\n    }\n\n    /**\n     * Set the option to print the row and column headers on the printed page.\n     *\n     * @param int $print Whether to print the headers or not. Defaults to 1 (print).\n     */\n    public function printRowColHeaders(int $print = 1): void\n    {\n        $this->printHeaders = $print;\n    }\n\n    /**\n     * This method sets the properties for outlining and grouping. The defaults\n     * correspond to Excel's defaults.\n     */\n    public function setOutline(bool $visible = true, bool $symbols_below = true, bool $symbols_right = true, bool $auto_style = false): void\n    {\n        $this->outlineOn = $visible;\n        $this->outlineBelow = $symbols_below;\n        $this->outlineRight = $symbols_right;\n        $this->outlineStyle = $auto_style;\n    }\n\n    /**\n     * Write a double to the specified row and column (zero indexed).\n     * An integer can be written as a double. Excel will display an\n     * integer. $format is optional.\n     *\n     * Returns  0 : normal termination\n     *         -2 : row or column out of range\n     *\n     * @param int $row Zero indexed row\n     * @param int $col Zero indexed column\n     * @param float $num The number to write\n     * @param int $xfIndex The optional XF format\n     */\n    private function writeNumber(int $row, int $col, float $num, int $xfIndex): int\n    {\n        $record = 0x0203; // Record identifier\n        $length = 0x000E; // Number of bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvv', $row, $col, $xfIndex);\n        $xl_double = pack('d', $num);\n        if (self::getByteOrder()) { // if it's Big Endian\n            $xl_double = strrev($xl_double);\n        }\n\n        $this->append($header . $data . $xl_double);\n\n        return 0;\n    }\n\n    /**\n     * Write a LABELSST record or a LABEL record. Which one depends on BIFF version.\n     *\n     * @param int $row Row index (0-based)\n     * @param int $col Column index (0-based)\n     * @param string $str The string\n     * @param int $xfIndex Index to XF record\n     */\n    private function writeString(int $row, int $col, string $str, int $xfIndex): void\n    {\n        $this->writeLabelSst($row, $col, $str, $xfIndex);\n    }\n\n    /**\n     * Write a LABELSST record or a LABEL record. Which one depends on BIFF version\n     * It differs from writeString by the writing of rich text strings.\n     *\n     * @param int $row Row index (0-based)\n     * @param int $col Column index (0-based)\n     * @param string $str The string\n     * @param int $xfIndex The XF format index for the cell\n     * @param array<int, array{strlen: int, fontidx: int}> $arrcRun Index to Font record and characters beginning\n     */\n    private function writeRichTextString(int $row, int $col, string $str, int $xfIndex, array $arrcRun): void\n    {\n        $record = 0x00FD; // Record identifier\n        $length = 0x000A; // Bytes to follow\n        $str = StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun);\n\n        // check if string is already present\n        if (!isset($this->stringTable[$str])) {\n            $this->stringTable[$str] = $this->stringUnique++;\n        }\n        ++$this->stringTotal;\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write a string to the specified row and column (zero indexed).\n     * This is the BIFF8 version (no 255 chars limit).\n     * $format is optional.\n     *\n     * @param int $row Zero indexed row\n     * @param int $col Zero indexed column\n     * @param string $str The string to write\n     * @param int $xfIndex The XF format index for the cell\n     */\n    private function writeLabelSst(int $row, int $col, string $str, int $xfIndex): void\n    {\n        $record = 0x00FD; // Record identifier\n        $length = 0x000A; // Bytes to follow\n\n        $str = StringHelper::UTF8toBIFF8UnicodeLong($str);\n\n        // check if string is already present\n        if (!isset($this->stringTable[$str])) {\n            $this->stringTable[$str] = $this->stringUnique++;\n        }\n        ++$this->stringTotal;\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write a blank cell to the specified row and column (zero indexed).\n     * A blank cell is used to specify formatting without adding a string\n     * or a number.\n     *\n     * A blank cell without a format serves no purpose. Therefore, we don't write\n     * a BLANK record unless a format is specified.\n     *\n     * Returns  0 : normal termination (including no format)\n     *         -1 : insufficient number of arguments\n     *         -2 : row or column out of range\n     *\n     * @param int $row Zero indexed row\n     * @param int $col Zero indexed column\n     * @param int $xfIndex The XF format index\n     */\n    public function writeBlank(int $row, int $col, int $xfIndex): int\n    {\n        $record = 0x0201; // Record identifier\n        $length = 0x0006; // Number of bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvv', $row, $col, $xfIndex);\n        $this->append($header . $data);\n\n        return 0;\n    }\n\n    /**\n     * Write a boolean or an error type to the specified row and column (zero indexed).\n     *\n     * @param int $row Row index (0-based)\n     * @param int $col Column index (0-based)\n     * @param int $isError Error or Boolean?\n     */\n    private function writeBoolErr(int $row, int $col, int $value, int $isError, int $xfIndex): int\n    {\n        $record = 0x0205;\n        $length = 8;\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvCC', $row, $col, $xfIndex, $value, $isError);\n        $this->append($header . $data);\n\n        return 0;\n    }\n\n    const WRITE_FORMULA_NORMAL = 0;\n    const WRITE_FORMULA_ERRORS = -1;\n    const WRITE_FORMULA_RANGE = -2;\n    const WRITE_FORMULA_EXCEPTION = -3;\n\n    private static bool $allowThrow = false;\n\n    public static function setAllowThrow(bool $allowThrow): void\n    {\n        self::$allowThrow = $allowThrow;\n    }\n\n    public static function getAllowThrow(): bool\n    {\n        return self::$allowThrow;\n    }\n\n    /**\n     * Write a formula to the specified row and column (zero indexed).\n     * The textual representation of the formula is passed to the parser in\n     * Parser.php which returns a packed binary string.\n     *\n     * Returns  0 : WRITE_FORMULA_NORMAL  normal termination\n     *         -1 : WRITE_FORMULA_ERRORS formula errors (bad formula)\n     *         -2 : WRITE_FORMULA_RANGE  row or column out of range\n     *         -3 : WRITE_FORMULA_EXCEPTION parse raised exception, probably due to definedname\n     *\n     * @param int $row Zero indexed row\n     * @param int $col Zero indexed column\n     * @param string $formula The formula text string\n     * @param int $xfIndex The XF format index\n     * @param mixed $calculatedValue Calculated value\n     */\n    private function writeFormula(int $row, int $col, string $formula, int $xfIndex, mixed $calculatedValue): int\n    {\n        $record = 0x0006; // Record identifier\n        // Initialize possible additional value for STRING record that should be written after the FORMULA record?\n        $stringValue = null;\n\n        // calculated value\n        if (isset($calculatedValue)) {\n            // Since we can't yet get the data type of the calculated value,\n            // we use best effort to determine data type\n            if (is_bool($calculatedValue)) {\n                // Boolean value\n                $num = pack('CCCvCv', 0x01, 0x00, (int) $calculatedValue, 0x00, 0x00, 0xFFFF);\n            } elseif (is_int($calculatedValue) || is_float($calculatedValue)) {\n                // Numeric value\n                $num = pack('d', $calculatedValue);\n            } elseif (is_string($calculatedValue)) {\n                $errorCodes = DataType::getErrorCodes();\n                if (isset($errorCodes[$calculatedValue])) {\n                    // Error value\n                    $num = pack('CCCvCv', 0x02, 0x00, ErrorCode::error($calculatedValue), 0x00, 0x00, 0xFFFF);\n                } elseif ($calculatedValue === '') {\n                    // Empty string (and BIFF8)\n                    $num = pack('CCCvCv', 0x03, 0x00, 0x00, 0x00, 0x00, 0xFFFF);\n                } else {\n                    // Non-empty string value (or empty string BIFF5)\n                    $stringValue = $calculatedValue;\n                    $num = pack('CCCvCv', 0x00, 0x00, 0x00, 0x00, 0x00, 0xFFFF);\n                }\n            } else {\n                // We are really not supposed to reach here\n                $num = pack('d', 0x00);\n            }\n        } else {\n            $num = pack('d', 0x00);\n        }\n\n        $grbit = 0x03; // Option flags\n        $unknown = 0x0000; // Must be zero\n\n        // Strip the '=' or '@' sign at the beginning of the formula string\n        if ($formula[0] == '=') {\n            $formula = substr($formula, 1);\n        } else {\n            // Error handling\n            $this->writeString($row, $col, 'Unrecognised character for formula', 0);\n\n            return self::WRITE_FORMULA_ERRORS;\n        }\n\n        // Parse the formula using the parser in Parser.php\n        try {\n            $this->parser->parse($formula);\n            $formula = $this->parser->toReversePolish();\n\n            $formlen = strlen($formula); // Length of the binary string\n            $length = 0x16 + $formlen; // Length of the record data\n\n            $header = pack('vv', $record, $length);\n\n            $data = pack('vvv', $row, $col, $xfIndex)\n                . $num\n                . pack('vVv', $grbit, $unknown, $formlen);\n            $this->append($header . $data . $formula);\n\n            // Append also a STRING record if necessary\n            if ($stringValue !== null) {\n                $this->writeStringRecord($stringValue);\n            }\n\n            return self::WRITE_FORMULA_NORMAL;\n        } catch (PhpSpreadsheetException $e) {\n            if (self::$allowThrow) {\n                throw $e;\n            }\n\n            return self::WRITE_FORMULA_EXCEPTION;\n        }\n    }\n\n    /**\n     * Write a STRING record. This.\n     */\n    private function writeStringRecord(string $stringValue): void\n    {\n        $record = 0x0207; // Record identifier\n        $data = StringHelper::UTF8toBIFF8UnicodeLong($stringValue);\n\n        $length = strlen($data);\n        $header = pack('vv', $record, $length);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write a hyperlink.\n     * This is comprised of two elements: the visible label and\n     * the invisible link. The visible label is the same as the link unless an\n     * alternative string is specified. The label is written using the\n     * writeString() method. Therefore the 255 characters string limit applies.\n     * $string and $format are optional.\n     *\n     * The hyperlink can be to a http, ftp, mail, internal sheet (not yet), or external\n     * directory url.\n     *\n     * @param int $row Row\n     * @param int $col Column\n     * @param string $url URL string\n     */\n    private function writeUrl(int $row, int $col, string $url): void\n    {\n        // Add start row and col to arg list\n        $this->writeUrlRange($row, $col, $row, $col, $url);\n    }\n\n    /**\n     * This is the more general form of writeUrl(). It allows a hyperlink to be\n     * written to a range of cells. This function also decides the type of hyperlink\n     * to be written. These are either, Web (http, ftp, mailto), Internal\n     * (Sheet1!A1) or external ('c:\\temp\\foo.xls#Sheet1!A1').\n     *\n     * @param int $row1 Start row\n     * @param int $col1 Start column\n     * @param int $row2 End row\n     * @param int $col2 End column\n     * @param string $url URL string\n     *\n     * @see writeUrl()\n     */\n    private function writeUrlRange(int $row1, int $col1, int $row2, int $col2, string $url): void\n    {\n        // Check for internal/external sheet links or default to web link\n        if (Preg::isMatch('[^internal:]', $url)) {\n            $this->writeUrlInternal($row1, $col1, $row2, $col2, $url);\n        } elseif (Preg::isMatch('[^external:]', $url)) {\n            $this->writeUrlExternal($row1, $col1, $row2, $col2, $url);\n        } else {\n            $this->writeUrlWeb($row1, $col1, $row2, $col2, $url);\n        }\n    }\n\n    /**\n     * Used to write http, ftp and mailto hyperlinks.\n     * The link type ($options) is 0x03 is the same as absolute dir ref without\n     * sheet. However it is differentiated by the $unknown2 data stream.\n     *\n     * @param int $row1 Start row\n     * @param int $col1 Start column\n     * @param int $row2 End row\n     * @param int $col2 End column\n     * @param string $url URL string\n     *\n     * @see writeUrl()\n     */\n    public function writeUrlWeb(int $row1, int $col1, int $row2, int $col2, string $url): void\n    {\n        $record = 0x01B8; // Record identifier\n\n        // Pack the undocumented parts of the hyperlink stream\n        $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000');\n        $unknown2 = pack('H*', 'E0C9EA79F9BACE118C8200AA004BA90B');\n\n        // Pack the option flags\n        $options = pack('V', 0x03);\n\n        // Convert URL to a null terminated wchar string\n\n        $url = implode(\"\\0\", Preg::split(\"''\", $url, -1, PREG_SPLIT_NO_EMPTY));\n        $url = $url . \"\\0\\0\\0\";\n\n        // Pack the length of the URL\n        $url_len = pack('V', strlen($url));\n\n        // Calculate the data length\n        $length = 0x34 + strlen($url);\n\n        // Pack the header data\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvv', $row1, $row2, $col1, $col2);\n\n        // Write the packed data\n        $this->append($header . $data . $unknown1 . $options . $unknown2 . $url_len . $url);\n    }\n\n    /**\n     * Used to write internal reference hyperlinks such as \"Sheet1!A1\".\n     *\n     * @param int $row1 Start row\n     * @param int $col1 Start column\n     * @param int $row2 End row\n     * @param int $col2 End column\n     * @param string $url URL string\n     *\n     * @see writeUrl()\n     */\n    private function writeUrlInternal(int $row1, int $col1, int $row2, int $col2, string $url): void\n    {\n        $record = 0x01B8; // Record identifier\n\n        // Strip URL type\n        $url = Preg::replace('/^internal:/', '', $url);\n\n        // Pack the undocumented parts of the hyperlink stream\n        $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000');\n\n        // Pack the option flags\n        $options = pack('V', 0x08);\n\n        // Convert the URL type and to a null terminated wchar string\n        $url .= \"\\0\";\n\n        // character count\n        $url_len = StringHelper::countCharacters($url);\n        $url_len = pack('V', $url_len);\n\n        $url = StringHelper::convertEncoding($url, 'UTF-16LE', 'UTF-8');\n\n        // Calculate the data length\n        $length = 0x24 + strlen($url);\n\n        // Pack the header data\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvv', $row1, $row2, $col1, $col2);\n\n        // Write the packed data\n        $this->append($header . $data . $unknown1 . $options . $url_len . $url);\n    }\n\n    /**\n     * Write links to external directory names such as 'c:\\foo.xls',\n     * c:\\foo.xls#Sheet1!A1', '../../foo.xls'. and '../../foo.xls#Sheet1!A1'.\n     *\n     * Note: Excel writes some relative links with the $dir_long string. We ignore\n     * these cases for the sake of simpler code.\n     *\n     * @param int $row1 Start row\n     * @param int $col1 Start column\n     * @param int $row2 End row\n     * @param int $col2 End column\n     * @param string $url URL string\n     *\n     * @see writeUrl()\n     */\n    private function writeUrlExternal(int $row1, int $col1, int $row2, int $col2, string $url): void\n    {\n        // Network drives are different. We will handle them separately\n        // MS/Novell network drives and shares start with \\\\\n        if (Preg::isMatch('[^external:\\\\\\]', $url)) {\n            return;\n        }\n\n        $record = 0x01B8; // Record identifier\n\n        // Strip URL type and change Unix dir separator to Dos style (if needed)\n        //\n        $url = Preg::replace(['/^external:/', '/\\//'], ['', '\\\\'], $url);\n\n        // Determine if the link is relative or absolute:\n        //   relative if link contains no dir separator, \"somefile.xls\"\n        //   relative if link starts with up-dir, \"..\\..\\somefile.xls\"\n        //   otherwise, absolute\n\n        $absolute = 0x00; // relative path\n        if (Preg::isMatch('/^[A-Z]:/', $url)) {\n            $absolute = 0x02; // absolute path on Windows, e.g. C:\\...\n        }\n        $link_type = 0x01 | $absolute;\n\n        // Determine if the link contains a sheet reference and change some of the\n        // parameters accordingly.\n        // Split the dir name and sheet name (if it exists)\n        $dir_long = $url;\n        if (Preg::isMatch('/\\#/', $url)) {\n            $link_type |= 0x08;\n        }\n\n        // Pack the link type\n        $link_type = pack('V', $link_type);\n\n        // Calculate the up-level dir count e.g.. (..\\..\\..\\ == 3)\n        $up_count = Preg::isMatchAll('/\\.\\.\\\\\\/', $dir_long, $useless);\n        $up_count = pack('v', $up_count);\n\n        // Store the short dos dir name (null terminated)\n        $dir_short = Preg::replace('/\\.\\.\\\\\\/', '', $dir_long) . \"\\0\";\n\n        // Store the long dir name as a wchar string (non-null terminated)\n        //$dir_long = $dir_long . \"\\0\";\n\n        // Pack the lengths of the dir strings\n        $dir_short_len = pack('V', strlen($dir_short));\n        //$dir_long_len = pack('V', strlen($dir_long));\n        $stream_len = pack('V', 0); //strlen($dir_long) + 0x06);\n\n        // Pack the undocumented parts of the hyperlink stream\n        $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000');\n        $unknown2 = pack('H*', '0303000000000000C000000000000046');\n        $unknown3 = pack('H*', 'FFFFADDE000000000000000000000000000000000000000');\n        //$unknown4 = pack('v', 0x03);\n\n        // Pack the main data stream\n        $data = pack('vvvv', $row1, $row2, $col1, $col2)\n            . $unknown1\n            . $link_type\n            . $unknown2\n            . $up_count\n            . $dir_short_len\n            . $dir_short\n            . $unknown3\n            . $stream_len; /*.\n                          $dir_long_len .\n                          $unknown4     .\n                          $dir_long     .\n                          $sheet_len    .\n                          $sheet        ;*/\n\n        // Pack the header data\n        $length = strlen($data);\n        $header = pack('vv', $record, $length);\n\n        // Write the packed data\n        $this->append($header . $data);\n    }\n\n    /**\n     * This method is used to set the height and format for a row.\n     *\n     * @param int $row The row to set\n     * @param int $height Height we are giving to the row.\n     *                        Use null to set XF without setting height\n     * @param int $xfIndex The optional cell style Xf index to apply to the columns\n     * @param bool $hidden The optional hidden attribute\n     * @param int $level The optional outline level for row, in range [0,7]\n     */\n    private function writeRow(int $row, int $height, int $xfIndex, bool $hidden = false, int $level = 0): void\n    {\n        $record = 0x0208; // Record identifier\n        $length = 0x0010; // Number of bytes to follow\n\n        $colMic = 0x0000; // First defined column\n        $colMac = 0x0000; // Last defined column\n        $irwMac = 0x0000; // Used by Excel to optimise loading\n        $reserved = 0x0000; // Reserved\n        $grbit = 0x0000; // Option flags\n        $ixfe = $xfIndex;\n\n        if ($height < 0) {\n            $height = null;\n        }\n\n        // Use writeRow($row, null, $XF) to set XF format without setting height\n        if ($height !== null) {\n            $miyRw = $height * 20; // row height\n        } else {\n            $miyRw = 0xFF; // default row height is 256\n        }\n\n        // Set the options flags. fUnsynced is used to show that the font and row\n        // heights are not compatible. This is usually the case for WriteExcel.\n        // The collapsed flag 0x10 doesn't seem to be used to indicate that a row\n        // is collapsed. Instead it is used to indicate that the previous row is\n        // collapsed. The zero height flag, 0x20, is used to collapse a row.\n\n        $grbit |= $level;\n        if ($hidden === true) {\n            $grbit |= 0x0030;\n        }\n        if ($height !== null) {\n            $grbit |= 0x0040; // fUnsynced\n        }\n        if ($xfIndex !== 0xF) {\n            $grbit |= 0x0080;\n        }\n        $grbit |= 0x0100;\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvvvvvv', $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Writes Excel DIMENSIONS to define the area in which there is data.\n     */\n    private function writeDimensions(): void\n    {\n        $record = 0x0200; // Record identifier\n\n        $length = 0x000E;\n        $data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved\n\n        $header = pack('vv', $record, $length);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write BIFF record Window2.\n     */\n    private function writeWindow2(): void\n    {\n        $record = 0x023E; // Record identifier\n        $length = 0x0012;\n\n        $rwTop = 0x0000; // Top row visible in window\n        $colLeft = 0x0000; // Leftmost column visible in window\n\n        // The options flags that comprise $grbit\n        $fDspFmla = 0; // 0 - bit\n        $fDspGrid = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1\n        $fDspRwCol = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2\n        $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3\n        $fDspZeros = 1; // 4\n        $fDefaultHdr = 1; // 5\n        $fArabic = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6\n        $fDspGuts = $this->outlineOn; // 7\n        $fFrozenNoSplit = 0; // 0 - bit\n        // no support in PhpSpreadsheet for selected sheet, therefore sheet is only selected if it is the active sheet\n        $fSelected = ($this->phpSheet === $this->phpSheet->getParentOrThrow()->getActiveSheet()) ? 1 : 0;\n        $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW;\n\n        $grbit = $fDspFmla;\n        $grbit |= $fDspGrid << 1;\n        $grbit |= $fDspRwCol << 2;\n        $grbit |= $fFrozen << 3;\n        $grbit |= $fDspZeros << 4;\n        $grbit |= $fDefaultHdr << 5;\n        $grbit |= $fArabic << 6;\n        $grbit |= $fDspGuts << 7;\n        $grbit |= $fFrozenNoSplit << 8;\n        $grbit |= $fSelected << 9; // Selected sheets.\n        $grbit |= $fSelected << 10; // Active sheet.\n        $grbit |= $fPageBreakPreview << 11;\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvv', $grbit, $rwTop, $colLeft);\n\n        // FIXME !!!\n        $rgbHdr = 0x0040; // Row/column heading and gridline color index\n        $zoom_factor_page_break = ($fPageBreakPreview ? $this->phpSheet->getSheetView()->getZoomScale() : 0x0000);\n        $zoom_factor_normal = $this->phpSheet->getSheetView()->getZoomScaleNormal();\n\n        $data .= pack('vvvvV', $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write BIFF record DEFAULTROWHEIGHT.\n     */\n    private function writeDefaultRowHeight(): void\n    {\n        $defaultRowHeight = $this->phpSheet->getDefaultRowDimension()->getRowHeight();\n\n        if ($defaultRowHeight < 0) {\n            return;\n        }\n\n        // convert to twips\n        $defaultRowHeight = (int) 20 * $defaultRowHeight;\n\n        $record = 0x0225; // Record identifier\n        $length = 0x0004; // Number of bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vv', 1, $defaultRowHeight);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write BIFF record DEFCOLWIDTH if COLINFO records are in use.\n     */\n    private function writeDefcol(): void\n    {\n        $defaultColWidth = 8;\n\n        $record = 0x0055; // Record identifier\n        $length = 0x0002; // Number of bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $defaultColWidth);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write BIFF record COLINFO to define column widths.\n     *\n     * Note: The SDK says the record length is 0x0B but Excel writes a 0x0C\n     * length record.\n     *\n     * @param array{?int, ?int, ?float, ?int, ?int, ?int} $col_array This is the only parameter received and is composed of the following:\n     *                0 => First formatted column,\n     *                1 => Last formatted column,\n     *                2 => Col width (8.43 is Excel default),\n     *                3 => The optional XF format of the column,\n     *                4 => Option flags.\n     *                5 => Optional outline level\n     */\n    private function writeColinfo(array $col_array): void\n    {\n        $colFirst = $col_array[0] ?? null;\n        $colLast = $col_array[1] ?? null;\n        $coldx = $col_array[2] ?? 8.43;\n        $xfIndex = $col_array[3] ?? 15;\n        $grbit = $col_array[4] ?? 0;\n        $level = $col_array[5] ?? 0;\n\n        $record = 0x007D; // Record identifier\n        $length = 0x000C; // Number of bytes to follow\n\n        $coldx *= 256; // Convert to units of 1/256 of a char\n\n        $ixfe = $xfIndex;\n        $reserved = 0x0000; // Reserved\n\n        $level = max(0, min($level, 7));\n        $grbit |= $level << 8;\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvvvv', $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write BIFF record SELECTION.\n     */\n    private function writeSelection(): void\n    {\n        // look up the selected cell range\n        $selectedCells = Coordinate::splitRange($this->phpSheet->getSelectedCells());\n        $selectedCells = $selectedCells[0];\n        if (count($selectedCells) == 2) {\n            [$first, $last] = $selectedCells;\n        } else {\n            $first = $selectedCells[0];\n            $last = $selectedCells[0];\n        }\n\n        [$colFirst, $rwFirst] = Coordinate::coordinateFromString($first);\n        $colFirst = Coordinate::columnIndexFromString($colFirst) - 1; // base 0 column index\n        --$rwFirst; // base 0 row index\n\n        [$colLast, $rwLast] = Coordinate::coordinateFromString($last);\n        $colLast = Coordinate::columnIndexFromString($colLast) - 1; // base 0 column index\n        --$rwLast; // base 0 row index\n\n        // make sure we are not out of bounds\n        $colFirst = min($colFirst, 255);\n        $colLast = min($colLast, 255);\n\n        $rwFirst = min($rwFirst, 65535);\n        $rwLast = min($rwLast, 65535);\n\n        $record = 0x001D; // Record identifier\n        $length = 0x000F; // Number of bytes to follow\n\n        $pnn = $this->activePane; // Pane position\n        $rwAct = $rwFirst; // Active row\n        $colAct = $colFirst; // Active column\n        $irefAct = 0; // Active cell ref\n        $cref = 1; // Number of refs\n\n        // Swap last row/col for first row/col as necessary\n        if ($rwFirst > $rwLast) {\n            [$rwFirst, $rwLast] = [$rwLast, $rwFirst];\n        }\n\n        if ($colFirst > $colLast) {\n            [$colFirst, $colLast] = [$colLast, $colFirst];\n        }\n\n        $header = pack('vv', $record, $length);\n        $data = pack('CvvvvvvCC', $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Store the MERGEDCELLS records for all ranges of merged cells.\n     */\n    private function writeMergedCells(): void\n    {\n        $mergeCells = $this->phpSheet->getMergeCells();\n        $countMergeCells = count($mergeCells);\n\n        if ($countMergeCells == 0) {\n            return;\n        }\n\n        // maximum allowed number of merged cells per record\n        $maxCountMergeCellsPerRecord = 1027;\n\n        // record identifier\n        $record = 0x00E5;\n\n        // counter for total number of merged cells treated so far by the writer\n        $i = 0;\n\n        // counter for number of merged cells written in record currently being written\n        $j = 0;\n\n        // initialize record data\n        $recordData = '';\n\n        // loop through the merged cells\n        foreach ($mergeCells as $mergeCell) {\n            ++$i;\n            ++$j;\n\n            // extract the row and column indexes\n            $range = Coordinate::splitRange($mergeCell);\n            [$first, $last] = $range[0];\n            [$firstColumn, $firstRow] = Coordinate::indexesFromString($first);\n            [$lastColumn, $lastRow] = Coordinate::indexesFromString($last);\n\n            $recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, $firstColumn - 1, $lastColumn - 1);\n\n            // flush record if we have reached limit for number of merged cells, or reached final merged cell\n            if ($j == $maxCountMergeCellsPerRecord || $i == $countMergeCells) {\n                $recordData = pack('v', $j) . $recordData;\n                $length = strlen($recordData);\n                $header = pack('vv', $record, $length);\n                $this->append($header . $recordData);\n\n                // initialize for next record, if any\n                $recordData = '';\n                $j = 0;\n            }\n        }\n    }\n\n    /**\n     * Write SHEETLAYOUT record.\n     */\n    private function writeSheetLayout(): void\n    {\n        if (!$this->phpSheet->isTabColorSet()) {\n            return;\n        }\n\n        $recordData = pack(\n            'vvVVVvv',\n            0x0862,\n            0x0000, // unused\n            0x00000000, // unused\n            0x00000000, // unused\n            0x00000014, // size of record data\n            $this->colors[$this->phpSheet->getTabColor()->getRGB()], // color index\n            0x0000        // unused\n        );\n\n        $length = strlen($recordData);\n\n        $record = 0x0862; // Record identifier\n        $header = pack('vv', $record, $length);\n        $this->append($header . $recordData);\n    }\n\n    private static function protectionBitsDefaultFalse(?bool $value, int $shift): int\n    {\n        if ($value === false) {\n            return 1 << $shift;\n        }\n\n        return 0;\n    }\n\n    private static function protectionBitsDefaultTrue(?bool $value, int $shift): int\n    {\n        if ($value !== false) {\n            return 1 << $shift;\n        }\n\n        return 0;\n    }\n\n    /**\n     * Write SHEETPROTECTION.\n     */\n    private function writeSheetProtection(): void\n    {\n        // record identifier\n        $record = 0x0867;\n\n        // prepare options\n        $protection = $this->phpSheet->getProtection();\n        $options = self::protectionBitsDefaultTrue($protection->getObjects(), 0)\n            | self::protectionBitsDefaultTrue($protection->getScenarios(), 1)\n            | self::protectionBitsDefaultFalse($protection->getFormatCells(), 2)\n            | self::protectionBitsDefaultFalse($protection->getFormatColumns(), 3)\n            | self::protectionBitsDefaultFalse($protection->getFormatRows(), 4)\n            | self::protectionBitsDefaultFalse($protection->getInsertColumns(), 5)\n            | self::protectionBitsDefaultFalse($protection->getInsertRows(), 6)\n            | self::protectionBitsDefaultFalse($protection->getInsertHyperlinks(), 7)\n            | self::protectionBitsDefaultFalse($protection->getDeleteColumns(), 8)\n            | self::protectionBitsDefaultFalse($protection->getDeleteRows(), 9)\n            | self::protectionBitsDefaultTrue($protection->getSelectLockedCells(), 10)\n            | self::protectionBitsDefaultFalse($protection->getSort(), 11)\n            | self::protectionBitsDefaultFalse($protection->getAutoFilter(), 12)\n            | self::protectionBitsDefaultFalse($protection->getPivotTables(), 13)\n            | self::protectionBitsDefaultTrue($protection->getSelectUnlockedCells(), 14);\n\n        // record data\n        $recordData = pack(\n            'vVVCVVvv',\n            0x0867, // repeated record identifier\n            0x0000, // not used\n            0x0000, // not used\n            0x00, // not used\n            0x01000200, // unknown data\n            0xFFFFFFFF, // unknown data\n            $options, // options\n            0x0000 // not used\n        );\n\n        $length = strlen($recordData);\n        $header = pack('vv', $record, $length);\n\n        $this->append($header . $recordData);\n    }\n\n    /**\n     * Write BIFF record RANGEPROTECTION.\n     *\n     * Openoffice.org's Documentation of the Microsoft Excel File Format uses term RANGEPROTECTION for these records\n     * Microsoft Office Excel 97-2007 Binary File Format Specification uses term FEAT for these records\n     */\n    private function writeRangeProtection(): void\n    {\n        foreach ($this->phpSheet->getProtectedCellRanges() as $range => $protectedCells) {\n            $password = $protectedCells->getPassword();\n            // number of ranges, e.g. 'A1:B3 C20:D25'\n            $cellRanges = explode(' ', $range);\n            $cref = count($cellRanges);\n\n            $recordData = pack(\n                'vvVVvCVvVv',\n                0x0868,\n                0x00,\n                0x0000,\n                0x0000,\n                0x02,\n                0x0,\n                0x0000,\n                $cref,\n                0x0000,\n                0x00\n            );\n\n            foreach ($cellRanges as $cellRange) {\n                $recordData .= $this->writeBIFF8CellRangeAddressFixed($cellRange);\n            }\n\n            // the rgbFeat structure\n            $recordData .= pack(\n                'VV',\n                0x0000,\n                hexdec($password)\n            );\n\n            $recordData .= StringHelper::UTF8toBIFF8UnicodeLong('p' . md5($recordData));\n\n            $length = strlen($recordData);\n\n            $record = 0x0868; // Record identifier\n            $header = pack('vv', $record, $length);\n            $this->append($header . $recordData);\n        }\n    }\n\n    /**\n     * Writes the Excel BIFF PANE record.\n     * The panes can either be frozen or thawed (unfrozen).\n     * Frozen panes are specified in terms of an integer number of rows and columns.\n     * Thawed panes are specified in terms of Excel's units for rows and columns.\n     */\n    private function writePanes(): void\n    {\n        if (!$this->phpSheet->getFreezePane()) {\n            // thaw panes\n            return;\n        }\n\n        [$column, $row] = Coordinate::indexesFromString($this->phpSheet->getFreezePane());\n        $x = $column - 1;\n        $y = $row - 1;\n\n        [$leftMostColumn, $topRow] = Coordinate::indexesFromString($this->phpSheet->getTopLeftCell() ?? '');\n        //Coordinates are zero-based in xls files\n        $rwTop = $topRow - 1;\n        $colLeft = $leftMostColumn - 1;\n\n        $record = 0x0041; // Record identifier\n        $length = 0x000A; // Number of bytes to follow\n\n        // Determine which pane should be active. There is also the undocumented\n        // option to override this should it be necessary: may be removed later.\n        $pnnAct = 0;\n        if ($x != 0 && $y != 0) {\n            $pnnAct = 0; // Bottom right\n        }\n        if ($x != 0 && $y == 0) {\n            $pnnAct = 1; // Top right\n        }\n        if ($x == 0 && $y != 0) {\n            $pnnAct = 2; // Bottom left\n        }\n        if ($x == 0 && $y == 0) {\n            $pnnAct = 3; // Top left\n        }\n\n        $this->activePane = $pnnAct; // Used in writeSelection\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvvv', $x, $y, $rwTop, $colLeft, $pnnAct);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Store the page setup SETUP BIFF record.\n     */\n    private function writeSetup(): void\n    {\n        $record = 0x00A1; // Record identifier\n        $length = 0x0022; // Number of bytes to follow\n\n        $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size\n        $iScale = $this->phpSheet->getPageSetup()->getScale() ?: 100; // Print scaling factor\n\n        $iPageStart = 0x01; // Starting page number\n        $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide\n        $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high\n        $iRes = 0x0258; // Print resolution\n        $iVRes = 0x0258; // Vertical print resolution\n\n        $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin\n\n        $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin\n        $iCopies = 0x01; // Number of copies\n\n        // Order of printing pages\n        $fLeftToRight = $this->phpSheet->getPageSetup()->getPageOrder() === PageSetup::PAGEORDER_DOWN_THEN_OVER\n            ? 0x0 : 0x1;\n        // Page orientation\n        $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE)\n            ? 0x0 : 0x1;\n\n        $fNoPls = 0x0; // Setup not read from printer\n        $fNoColor = 0x0; // Print black and white\n        $fDraft = 0x0; // Print draft quality\n        $fNotes = 0x0; // Print notes\n        $fNoOrient = 0x0; // Orientation not set\n        $fUsePage = 0x0; // Use custom starting page\n\n        $grbit = $fLeftToRight;\n        $grbit |= $fLandscape << 1;\n        $grbit |= $fNoPls << 2;\n        $grbit |= $fNoColor << 3;\n        $grbit |= $fDraft << 4;\n        $grbit |= $fNotes << 5;\n        $grbit |= $fNoOrient << 6;\n        $grbit |= $fUsePage << 7;\n\n        $numHdr = pack('d', $numHdr);\n        $numFtr = pack('d', $numFtr);\n        if (self::getByteOrder()) { // if it's Big Endian\n            $numHdr = strrev($numHdr);\n            $numFtr = strrev($numFtr);\n        }\n\n        $header = pack('vv', $record, $length);\n        $data1 = pack('vvvvvvvv', $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes);\n        $data2 = $numHdr . $numFtr;\n        $data3 = pack('v', $iCopies);\n        $this->append($header . $data1 . $data2 . $data3);\n    }\n\n    /**\n     * Store the header caption BIFF record.\n     */\n    private function writeHeader(): void\n    {\n        $record = 0x0014; // Record identifier\n\n        /* removing for now\n        // need to fix character count (multibyte!)\n        if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) {\n            $str      = $this->phpSheet->getHeaderFooter()->getOddHeader();       // header string\n        } else {\n            $str = '';\n        }\n        */\n\n        $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());\n        $length = strlen($recordData);\n\n        $header = pack('vv', $record, $length);\n\n        $this->append($header . $recordData);\n    }\n\n    /**\n     * Store the footer caption BIFF record.\n     */\n    private function writeFooter(): void\n    {\n        $record = 0x0015; // Record identifier\n\n        /* removing for now\n        // need to fix character count (multibyte!)\n        if (strlen($this->phpSheet->getHeaderFooter()->getOddFooter()) <= 255) {\n            $str = $this->phpSheet->getHeaderFooter()->getOddFooter();\n        } else {\n            $str = '';\n        }\n        */\n\n        $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddFooter());\n        $length = strlen($recordData);\n\n        $header = pack('vv', $record, $length);\n\n        $this->append($header . $recordData);\n    }\n\n    /**\n     * Store the horizontal centering HCENTER BIFF record.\n     */\n    private function writeHcenter(): void\n    {\n        $record = 0x0083; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $fHCenter);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Store the vertical centering VCENTER BIFF record.\n     */\n    private function writeVcenter(): void\n    {\n        $record = 0x0084; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $fVCenter);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Store the LEFTMARGIN BIFF record.\n     */\n    private function writeMarginLeft(): void\n    {\n        $record = 0x0026; // Record identifier\n        $length = 0x0008; // Bytes to follow\n\n        $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches\n\n        $header = pack('vv', $record, $length);\n        $data = pack('d', $margin);\n        if (self::getByteOrder()) { // if it's Big Endian\n            $data = strrev($data);\n        }\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Store the RIGHTMARGIN BIFF record.\n     */\n    private function writeMarginRight(): void\n    {\n        $record = 0x0027; // Record identifier\n        $length = 0x0008; // Bytes to follow\n\n        $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches\n\n        $header = pack('vv', $record, $length);\n        $data = pack('d', $margin);\n        if (self::getByteOrder()) { // if it's Big Endian\n            $data = strrev($data);\n        }\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Store the TOPMARGIN BIFF record.\n     */\n    private function writeMarginTop(): void\n    {\n        $record = 0x0028; // Record identifier\n        $length = 0x0008; // Bytes to follow\n\n        $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches\n\n        $header = pack('vv', $record, $length);\n        $data = pack('d', $margin);\n        if (self::getByteOrder()) { // if it's Big Endian\n            $data = strrev($data);\n        }\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Store the BOTTOMMARGIN BIFF record.\n     */\n    private function writeMarginBottom(): void\n    {\n        $record = 0x0029; // Record identifier\n        $length = 0x0008; // Bytes to follow\n\n        $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches\n\n        $header = pack('vv', $record, $length);\n        $data = pack('d', $margin);\n        if (self::getByteOrder()) { // if it's Big Endian\n            $data = strrev($data);\n        }\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write the PRINTHEADERS BIFF record.\n     */\n    private function writePrintHeaders(): void\n    {\n        $record = 0x002A; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $fPrintRwCol = $this->printHeaders; // Boolean flag\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $fPrintRwCol);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the\n     * GRIDSET record.\n     */\n    private function writePrintGridlines(): void\n    {\n        $record = 0x002B; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $fPrintGrid);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write the GRIDSET BIFF record. Must be used in conjunction with the\n     * PRINTGRIDLINES record.\n     */\n    private function writeGridset(): void\n    {\n        $record = 0x0082; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $fGridSet = !$this->phpSheet->getPrintGridlines(); // Boolean flag\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $fGridSet);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write the AUTOFILTERINFO BIFF record. This is used to configure the number of autofilter select used in the sheet.\n     */\n    private function writeAutoFilterInfo(): void\n    {\n        $record = 0x009D; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $rangeBounds = Coordinate::rangeBoundaries($this->phpSheet->getAutoFilter()->getRange());\n        $iNumFilters = 1 + $rangeBounds[1][0] - $rangeBounds[0][0];\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $iNumFilters);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write the GUTS BIFF record. This is used to configure the gutter margins\n     * where Excel outline symbols are displayed. The visibility of the gutters is\n     * controlled by a flag in WSBOOL.\n     *\n     * @see writeWsbool()\n     */\n    private function writeGuts(): void\n    {\n        $record = 0x0080; // Record identifier\n        $length = 0x0008; // Bytes to follow\n\n        $dxRwGut = 0x0000; // Size of row gutter\n        $dxColGut = 0x0000; // Size of col gutter\n\n        // determine maximum row outline level\n        $maxRowOutlineLevel = 0;\n        foreach ($this->phpSheet->getRowDimensions() as $rowDimension) {\n            $maxRowOutlineLevel = max($maxRowOutlineLevel, $rowDimension->getOutlineLevel());\n        }\n\n        $col_level = 0;\n\n        // Calculate the maximum column outline level. The equivalent calculation\n        // for the row outline level is carried out in writeRow().\n        $colcount = count($this->columnInfo);\n        for ($i = 0; $i < $colcount; ++$i) {\n            $col_level = max($this->columnInfo[$i][5], $col_level);\n        }\n\n        // Set the limits for the outline levels (0 <= x <= 7).\n        $col_level = max(0, min($col_level, 7));\n\n        // The displayed level is one greater than the max outline levels\n        if ($maxRowOutlineLevel) {\n            ++$maxRowOutlineLevel;\n        }\n        if ($col_level) {\n            ++$col_level;\n        }\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvvv', $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction\n     * with the SETUP record.\n     */\n    private function writeWsbool(): void\n    {\n        $record = 0x0081; // Record identifier\n        $length = 0x0002; // Bytes to follow\n        $grbit = 0x0000;\n\n        // The only option that is of interest is the flag for fit to page. So we\n        // set all the options in one go.\n        //\n        // Set the option flags\n        $grbit |= 0x0001; // Auto page breaks visible\n        if ($this->outlineStyle) {\n            $grbit |= 0x0020; // Auto outline styles\n        }\n        if ($this->phpSheet->getShowSummaryBelow()) {\n            $grbit |= 0x0040; // Outline summary below\n        }\n        if ($this->phpSheet->getShowSummaryRight()) {\n            $grbit |= 0x0080; // Outline summary right\n        }\n        if ($this->phpSheet->getPageSetup()->getFitToPage()) {\n            $grbit |= 0x0100; // Page setup fit to page\n        }\n        if ($this->outlineOn) {\n            $grbit |= 0x0400; // Outline symbols displayed\n        }\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $grbit);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write the HORIZONTALPAGEBREAKS and VERTICALPAGEBREAKS BIFF records.\n     */\n    private function writeBreaks(): void\n    {\n        // initialize\n        $vbreaks = [];\n        $hbreaks = [];\n\n        foreach ($this->phpSheet->getRowBreaks() as $cell => $break) {\n            // Fetch coordinates\n            $coordinates = Coordinate::coordinateFromString($cell);\n            $hbreaks[] = $coordinates[1];\n        }\n        foreach ($this->phpSheet->getColumnBreaks() as $cell => $break) {\n            // Fetch coordinates\n            $coordinates = Coordinate::indexesFromString($cell);\n            $vbreaks[] = $coordinates[0] - 1;\n        }\n\n        //horizontal page breaks\n        if (!empty($hbreaks)) {\n            // Sort and filter array of page breaks\n            sort($hbreaks, SORT_NUMERIC);\n            if ($hbreaks[0] == 0) { // don't use first break if it's 0\n                array_shift($hbreaks);\n            }\n\n            $record = 0x001B; // Record identifier\n            $cbrk = count($hbreaks); // Number of page breaks\n            $length = 2 + 6 * $cbrk; // Bytes to follow\n\n            $header = pack('vv', $record, $length);\n            $data = pack('v', $cbrk);\n\n            // Append each page break\n            foreach ($hbreaks as $hbreak) {\n                $data .= pack('vvv', $hbreak, 0x0000, 0x00FF);\n            }\n\n            $this->append($header . $data);\n        }\n\n        // vertical page breaks\n        if (!empty($vbreaks)) {\n            // 1000 vertical pagebreaks appears to be an internal Excel 5 limit.\n            // It is slightly higher in Excel 97/200, approx. 1026\n            $vbreaks = array_slice($vbreaks, 0, 1000);\n\n            // Sort and filter array of page breaks\n            sort($vbreaks, SORT_NUMERIC);\n            if ($vbreaks[0] == 0) { // don't use first break if it's 0\n                array_shift($vbreaks);\n            }\n\n            $record = 0x001A; // Record identifier\n            $cbrk = count($vbreaks); // Number of page breaks\n            $length = 2 + 6 * $cbrk; // Bytes to follow\n\n            $header = pack('vv', $record, $length);\n            $data = pack('v', $cbrk);\n\n            // Append each page break\n            foreach ($vbreaks as $vbreak) {\n                $data .= pack('vvv', $vbreak, 0x0000, 0xFFFF);\n            }\n\n            $this->append($header . $data);\n        }\n    }\n\n    /**\n     * Set the Biff PROTECT record to indicate that the worksheet is protected.\n     */\n    private function writeProtect(): void\n    {\n        // Exit unless sheet protection has been specified\n        if ($this->phpSheet->getProtection()->getSheet() !== true) {\n            return;\n        }\n\n        $record = 0x0012; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $fLock = 1; // Worksheet is protected\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $fLock);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write SCENPROTECT.\n     */\n    private function writeScenProtect(): void\n    {\n        // Exit if sheet protection is not active\n        if ($this->phpSheet->getProtection()->getSheet() !== true) {\n            return;\n        }\n\n        // Exit if scenarios are not protected\n        if ($this->phpSheet->getProtection()->getScenarios() !== true) {\n            return;\n        }\n\n        $record = 0x00DD; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', 1);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write OBJECTPROTECT.\n     */\n    private function writeObjectProtect(): void\n    {\n        // Exit if sheet protection is not active\n        if ($this->phpSheet->getProtection()->getSheet() !== true) {\n            return;\n        }\n\n        // Exit if objects are not protected\n        if ($this->phpSheet->getProtection()->getObjects() !== true) {\n            return;\n        }\n\n        $record = 0x0063; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', 1);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write the worksheet PASSWORD record.\n     */\n    private function writePassword(): void\n    {\n        // Exit unless sheet protection and password have been specified\n        if ($this->phpSheet->getProtection()->getSheet() !== true || !$this->phpSheet->getProtection()->getPassword() || $this->phpSheet->getProtection()->getAlgorithm() !== '') {\n            return;\n        }\n\n        $record = 0x0013; // Record identifier\n        $length = 0x0002; // Bytes to follow\n\n        $wPassword = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password\n\n        $header = pack('vv', $record, $length);\n        $data = pack('v', $wPassword);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Insert a 24bit bitmap image in a worksheet.\n     *\n     * @deprecated 5.5.0 No replacement.\n     *\n     * @param int $row The row we are going to insert the bitmap into\n     * @param int $col The column we are going to insert the bitmap into\n     * @param GdImage|string $bitmap The bitmap filename or GD-image resource\n     * @param int $x the horizontal position (offset) of the image inside the cell\n     * @param int $y the vertical position (offset) of the image inside the cell\n     * @param float $scale_x The horizontal scale\n     * @param float $scale_y The vertical scale\n     *\n     * @codeCoverageIgnore\n     */\n    public function insertBitmap(int $row, int $col, GdImage|string $bitmap, int $x = 0, int $y = 0, float $scale_x = 1, float $scale_y = 1): void\n    {\n        $bitmap_array = $bitmap instanceof GdImage\n            ? $this->processBitmapGd($bitmap)\n            : $this->processBitmap($bitmap);\n        [$width, $height, $size, $data] = $bitmap_array;\n\n        // Scale the frame of the image.\n        $width *= $scale_x;\n        $height *= $scale_y;\n\n        // Calculate the vertices of the image and write the OBJ record\n        $this->positionImage($col, $row, $x, $y, (int) $width, (int) $height);\n\n        // Write the IMDATA record to store the bitmap data\n        $record = 0x007F;\n        $length = 8 + $size;\n        $cf = 0x09;\n        $env = 0x01;\n        $lcb = $size;\n\n        $header = pack('vvvvV', $record, $length, $cf, $env, $lcb);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Calculate the vertices that define the position of the image as required by\n     * the OBJ record.\n     *\n     *         +------------+------------+\n     *         |     A      |      B     |\n     *   +-----+------------+------------+\n     *   |     |(x1,y1)     |            |\n     *   |  1  |(A1)._______|______      |\n     *   |     |    |              |     |\n     *   |     |    |              |     |\n     *   +-----+----|    BITMAP    |-----+\n     *   |     |    |              |     |\n     *   |  2  |    |______________.     |\n     *   |     |            |        (B2)|\n     *   |     |            |     (x2,y2)|\n     *   +---- +------------+------------+\n     *\n     * Example of a bitmap that covers some of the area from cell A1 to cell B2.\n     *\n     * Based on the width and height of the bitmap we need to calculate 8 vars:\n     *     $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2.\n     * The width and height of the cells are also variable and have to be taken into\n     * account.\n     * The values of $col_start and $row_start are passed in from the calling\n     * function. The values of $col_end and $row_end are calculated by subtracting\n     * the width and height of the bitmap from the width and height of the\n     * underlying cells.\n     * The vertices are expressed as a percentage of the underlying cell width as\n     * follows (rhs values are in pixels):\n     *\n     *       x1 = X / W *1024\n     *       y1 = Y / H *256\n     *       x2 = (X-1) / W *1024\n     *       y2 = (Y-1) / H *256\n     *\n     *       Where:  X is distance from the left side of the underlying cell\n     *               Y is distance from the top of the underlying cell\n     *               W is the width of the cell\n     *               H is the height of the cell\n     * The SDK incorrectly states that the height should be expressed as a\n     *        percentage of 1024.\n     *\n     * @deprecated 5.5.0 No replacement.\n     *\n     * @param int $col_start Col containing upper left corner of object\n     * @param int $row_start Row containing top left corner of object\n     * @param int $x1 Distance to left side of object\n     * @param int $y1 Distance to top of object\n     * @param int $width Width of image frame\n     * @param int $height Height of image frame\n     *\n     * @codeCoverageIgnore\n     */\n    public function positionImage(int $col_start, int $row_start, int $x1, int $y1, int $width, int $height): void\n    {\n        // Initialise end cell to the same as the start cell\n        $col_end = $col_start; // Col containing lower right corner of object\n        $row_end = $row_start; // Row containing bottom right corner of object\n\n        // Zero the specified offset if greater than the cell dimensions\n        if ($x1 >= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1))) {\n            $x1 = 0;\n        }\n        if ($y1 >= Xls::sizeRow($this->phpSheet, $row_start + 1)) {\n            $y1 = 0;\n        }\n\n        $width = $width + $x1 - 1;\n        $height = $height + $y1 - 1;\n\n        // Subtract the underlying cell widths to find the end cell of the image\n        while ($width >= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1))) {\n            $width -= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1));\n            ++$col_end;\n        }\n\n        // Subtract the underlying cell heights to find the end cell of the image\n        while ($height >= Xls::sizeRow($this->phpSheet, $row_end + 1)) {\n            $height -= Xls::sizeRow($this->phpSheet, $row_end + 1);\n            ++$row_end;\n        }\n\n        // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell\n        // with zero eight or width.\n        //\n        if (Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1)) == 0) {\n            return;\n        }\n        if (Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)) == 0) {\n            return;\n        }\n        if (Xls::sizeRow($this->phpSheet, $row_start + 1) == 0) {\n            return;\n        }\n        if (Xls::sizeRow($this->phpSheet, $row_end + 1) == 0) {\n            return;\n        }\n\n        // Convert the pixel values to the percentage value expected by Excel\n        $x1 = $x1 / Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1)) * 1024;\n        $y1 = $y1 / Xls::sizeRow($this->phpSheet, $row_start + 1) * 256;\n        $x2 = $width / Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)) * 1024; // Distance to right side of object\n        $y2 = $height / Xls::sizeRow($this->phpSheet, $row_end + 1) * 256; // Distance to bottom of object\n\n        $this->writeObjPicture($col_start, $x1, $row_start, $y1, $col_end, $x2, $row_end, $y2);\n    }\n\n    /**\n     * Store the OBJ record that precedes an IMDATA record. This could be generalised\n     * to support other Excel objects.\n     *\n     * @deprecated 5.5.0 No replacement.\n     *\n     * @param int $colL Column containing upper left corner of object\n     * @param int $dxL Distance from left side of cell\n     * @param int $rwT Row containing top left corner of object\n     * @param float|int $dyT Distance from top of cell\n     * @param int $colR Column containing lower right corner of object\n     * @param int $dxR Distance from right of cell\n     * @param int $rwB Row containing bottom right corner of object\n     * @param int $dyB Distance from bottom of cell\n     *\n     * @codeCoverageIgnore\n     */\n    private function writeObjPicture(int $colL, int $dxL, int $rwT, int|float $dyT, int $colR, int $dxR, int $rwB, int $dyB): void\n    {\n        $record = 0x005D; // Record identifier\n        $length = 0x003C; // Bytes to follow\n\n        $cObj = 0x0001; // Count of objects in file (set to 1)\n        $OT = 0x0008; // Object type. 8 = Picture\n        $id = 0x0001; // Object ID\n        $grbit = 0x0614; // Option flags\n\n        $cbMacro = 0x0000; // Length of FMLA structure\n        $Reserved1 = 0x0000; // Reserved\n        $Reserved2 = 0x0000; // Reserved\n\n        $icvBack = 0x09; // Background colour\n        $icvFore = 0x09; // Foreground colour\n        $fls = 0x00; // Fill pattern\n        $fAuto = 0x00; // Automatic fill\n        $icv = 0x08; // Line colour\n        $lns = 0xFF; // Line style\n        $lnw = 0x01; // Line weight\n        $fAutoB = 0x00; // Automatic border\n        $frs = 0x0000; // Frame style\n        $cf = 0x0009; // Image format, 9 = bitmap\n        $Reserved3 = 0x0000; // Reserved\n        $cbPictFmla = 0x0000; // Length of FMLA structure\n        $Reserved4 = 0x0000; // Reserved\n        $grbit2 = 0x0001; // Option flags\n        $Reserved5 = 0x0000; // Reserved\n\n        $header = pack('vv', $record, $length);\n        $data = pack('V', $cObj);\n        $data .= pack('v', $OT);\n        $data .= pack('v', $id);\n        $data .= pack('v', $grbit);\n        $data .= pack('v', $colL);\n        $data .= pack('v', $dxL);\n        $data .= pack('v', $rwT);\n        $data .= pack('v', $dyT);\n        $data .= pack('v', $colR);\n        $data .= pack('v', $dxR);\n        $data .= pack('v', $rwB);\n        $data .= pack('v', $dyB);\n        $data .= pack('v', $cbMacro);\n        $data .= pack('V', $Reserved1);\n        $data .= pack('v', $Reserved2);\n        $data .= pack('C', $icvBack);\n        $data .= pack('C', $icvFore);\n        $data .= pack('C', $fls);\n        $data .= pack('C', $fAuto);\n        $data .= pack('C', $icv);\n        $data .= pack('C', $lns);\n        $data .= pack('C', $lnw);\n        $data .= pack('C', $fAutoB);\n        $data .= pack('v', $frs);\n        $data .= pack('V', $cf);\n        $data .= pack('v', $Reserved3);\n        $data .= pack('v', $cbPictFmla);\n        $data .= pack('v', $Reserved4);\n        $data .= pack('v', $grbit2);\n        $data .= pack('V', $Reserved5);\n\n        $this->append($header . $data);\n    }\n\n    /**\n     * Convert a GD-image into the internal format.\n     *\n     * @deprecated 5.5.0 No replacement.\n     *\n     * @param GdImage $image The image to process\n     *\n     * @return array{0: int, 1: int, 2: int, 3: string} Data and properties of the bitmap\n     *\n     * @codeCoverageIgnore\n     */\n    public function processBitmapGd(GdImage $image): array\n    {\n        $width = imagesx($image);\n        $height = imagesy($image);\n\n        $data = pack('Vvvvv', 0x000C, $width, $height, 0x01, 0x18);\n        for ($j = $height; --$j;) {\n            for ($i = 0; $i < $width; ++$i) {\n                $colorAt = imagecolorat($image, $i, $j);\n                if ($colorAt !== false) {\n                    $color = imagecolorsforindex($image, $colorAt);\n                    foreach (['red', 'green', 'blue'] as $key) {\n                        $color[$key] = $color[$key] + (int) round((255 - $color[$key]) * $color['alpha'] / 127);\n                    }\n                    $data .= chr($color['blue']) . chr($color['green']) . chr($color['red']);\n                }\n            }\n            if (3 * $width % 4) {\n                $data .= str_repeat(\"\\x00\", 4 - 3 * $width % 4);\n            }\n        }\n\n        return [$width, $height, strlen($data), $data];\n    }\n\n    /**\n     * Convert a 24 bit bitmap into the modified internal format used by Windows.\n     * This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the\n     * MSDN library.\n     *\n     * @deprecated 5.5.0 No replacement.\n     *\n     * @param string $bitmap The bitmap to process\n     *\n     * @return array{0: int, 1: int, 2: int, 3: string} Data and properties of the bitmap\n     *\n     * @codeCoverageIgnore\n     */\n    public function processBitmap(string $bitmap): array\n    {\n        // Open file.\n        $bmp_fd = @fopen($bitmap, 'rb');\n        if ($bmp_fd === false || 0 === (int) filesize($bitmap)) {\n            throw new WriterException(\"Couldn't import $bitmap\");\n        }\n\n        // Slurp the file into a string.\n        $data = (string) fread($bmp_fd, (int) filesize($bitmap));\n\n        // Check that the file is big enough to be a bitmap.\n        if (strlen($data) <= 0x36) {\n            throw new WriterException(\"$bitmap doesn't contain enough data.\\n\");\n        }\n\n        // The first 2 bytes are used to identify the bitmap.\n\n        $identity = unpack('A2ident', $data);\n        if ($identity === false || $identity['ident'] != 'BM') {\n            throw new WriterException(\"$bitmap doesn't appear to be a valid bitmap image.\\n\");\n        }\n\n        // Remove bitmap data: ID.\n        $data = substr($data, 2);\n\n        // Read and remove the bitmap size. This is more reliable than reading\n        // the data size at offset 0x22.\n        //\n        $size_array = unpack('Vsa', substr($data, 0, 4)) ?: [];\n        /** @var int */\n        $size = $size_array['sa'];\n        $data = substr($data, 4);\n        $size -= 0x36; // Subtract size of bitmap header.\n        $size += 0x0C; // Add size of BIFF header.\n\n        // Remove bitmap data: reserved, offset, header length.\n        $data = substr($data, 12);\n\n        // Read and remove the bitmap width and height. Verify the sizes.\n        $width_and_height = unpack('V2', substr($data, 0, 8)) ?: [];\n        /** @var int */\n        $width = $width_and_height[1];\n        /** @var int */\n        $height = $width_and_height[2];\n        $data = substr($data, 8);\n        if ($width > 0xFFFF) {\n            throw new WriterException(\"$bitmap: largest image width supported is 65k.\\n\");\n        }\n        if ($height > 0xFFFF) {\n            throw new WriterException(\"$bitmap: largest image height supported is 65k.\\n\");\n        }\n\n        // Read and remove the bitmap planes and bpp data. Verify them.\n        $planes_and_bitcount = unpack('v2', substr($data, 0, 4));\n        $data = substr($data, 4);\n        if ($planes_and_bitcount === false || $planes_and_bitcount[2] != 24) { // Bitcount\n            throw new WriterException(\"$bitmap isn't a 24bit true color bitmap.\\n\");\n        }\n        if ($planes_and_bitcount[1] != 1) {\n            throw new WriterException(\"$bitmap: only 1 plane supported in bitmap image.\\n\");\n        }\n\n        // Read and remove the bitmap compression. Verify compression.\n        $compression = unpack('Vcomp', substr($data, 0, 4));\n        $data = substr($data, 4);\n\n        if ($compression === false || $compression['comp'] != 0) {\n            throw new WriterException(\"$bitmap: compression not supported in bitmap image.\\n\");\n        }\n\n        // Remove bitmap data: data size, hres, vres, colours, imp. colours.\n        $data = substr($data, 20);\n\n        // Add the BITMAPCOREHEADER data\n        $header = pack('Vvvvv', 0x000C, $width, $height, 0x01, 0x18);\n        $data = $header . $data;\n\n        return [$width, $height, $size, $data];\n    }\n\n    /**\n     * Store the window zoom factor. This should be a reduced fraction but for\n     * simplicity we will store all fractions with a numerator of 100.\n     */\n    private function writeZoom(): void\n    {\n        // If scale is 100 we don't need to write a record\n        if ($this->phpSheet->getSheetView()->getZoomScale() == 100) {\n            return;\n        }\n\n        $record = 0x00A0; // Record identifier\n        $length = 0x0004; // Bytes to follow\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vv', $this->phpSheet->getSheetView()->getZoomScale(), 100);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Get Escher object.\n     */\n    public function getEscher(): ?\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\n    {\n        return $this->escher;\n    }\n\n    /**\n     * Set Escher object.\n     */\n    public function setEscher(?\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher $escher): void\n    {\n        $this->escher = $escher;\n    }\n\n    /**\n     * Write MSODRAWING record.\n     */\n    private function writeMsoDrawing(): void\n    {\n        // write the Escher stream if necessary\n        if (isset($this->escher)) {\n            $writer = new Escher($this->escher);\n            $data = $writer->close();\n            $spOffsets = $writer->getSpOffsets();\n            $spTypes = $writer->getSpTypes();\n            // write the neccesary MSODRAWING, OBJ records\n\n            // split the Escher stream\n            $spOffsets[0] = 0;\n            $nm = count($spOffsets) - 1; // number of shapes excluding first shape\n            for ($i = 1; $i <= $nm; ++$i) {\n                // MSODRAWING record\n                $record = 0x00EC; // Record identifier\n\n                // chunk of Escher stream for one shape\n                $dataChunk = substr($data, $spOffsets[$i - 1], $spOffsets[$i] - $spOffsets[$i - 1]);\n\n                $length = strlen($dataChunk);\n                $header = pack('vv', $record, $length);\n\n                $this->append($header . $dataChunk);\n\n                // OBJ record\n                $record = 0x005D; // record identifier\n                $objData = '';\n\n                // ftCmo\n                if ($spTypes[$i] == 0x00C9) {\n                    // Add ftCmo (common object data) subobject\n                    $objData\n                        .= pack(\n                            'vvvvvVVV',\n                            0x0015, // 0x0015 = ftCmo\n                            0x0012, // length of ftCmo data\n                            0x0014, // object type, 0x0014 = filter\n                            $i, // object id number, Excel seems to use 1-based index, local for the sheet\n                            0x2101, // option flags, 0x2001 is what OpenOffice.org uses\n                            0, // reserved\n                            0, // reserved\n                            0  // reserved\n                        );\n\n                    // Add ftSbs Scroll bar subobject\n                    $objData .= pack('vv', 0x00C, 0x0014);\n                    $objData .= pack('H*', '0000000000000000640001000A00000010000100');\n                    // Add ftLbsData (List box data) subobject\n                    $objData .= pack('vv', 0x0013, 0x1FEE);\n                    $objData .= pack('H*', '00000000010001030000020008005700');\n                } else {\n                    // Add ftCmo (common object data) subobject\n                    $objData\n                        .= pack(\n                            'vvvvvVVV',\n                            0x0015, // 0x0015 = ftCmo\n                            0x0012, // length of ftCmo data\n                            0x0008, // object type, 0x0008 = picture\n                            $i, // object id number, Excel seems to use 1-based index, local for the sheet\n                            0x6011, // option flags, 0x6011 is what OpenOffice.org uses\n                            0, // reserved\n                            0, // reserved\n                            0  // reserved\n                        );\n                }\n\n                // ftEnd\n                $objData\n                    .= pack(\n                        'vv',\n                        0x0000, // 0x0000 = ftEnd\n                        0x0000  // length of ftEnd data\n                    );\n\n                $length = strlen($objData);\n                $header = pack('vv', $record, $length);\n                $this->append($header . $objData);\n            }\n        }\n    }\n\n    /**\n     * Store the DATAVALIDATIONS and DATAVALIDATION records.\n     */\n    private function writeDataValidity(): void\n    {\n        // Datavalidation collection\n        $dataValidationCollection1 = $this->phpSheet->getDataValidationCollection();\n        $dataValidationCollection = [];\n        foreach ($dataValidationCollection1 as $key => $dataValidation) {\n            $keyParts = explode(' ', $key);\n            foreach ($keyParts as $keyPart) {\n                $dataValidationCollection[$keyPart] = $dataValidation;\n            }\n        }\n\n        // Write data validations?\n        if (!empty($dataValidationCollection)) {\n            // DATAVALIDATIONS record\n            $record = 0x01B2; // Record identifier\n            $length = 0x0012; // Bytes to follow\n\n            $grbit = 0x0000; // Prompt box at cell, no cached validity data at DV records\n            $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position\n            $verPos = 0x00000000; // Vertical position of prompt box, if fixed position\n            $objId = 0xFFFFFFFF; // Object identifier of drop down arrow object, or -1 if not visible\n\n            $header = pack('vv', $record, $length);\n            $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection));\n            $this->append($header . $data);\n\n            // DATAVALIDATION records\n            $record = 0x01BE; // Record identifier\n\n            foreach ($dataValidationCollection as $cellCoordinate => $dataValidation) {\n                // options\n                $options = 0x00000000;\n\n                // data type\n                $type = CellDataValidation::type($dataValidation);\n\n                $options |= $type << 0;\n\n                // error style\n                $errorStyle = CellDataValidation::errorStyle($dataValidation);\n\n                $options |= $errorStyle << 4;\n\n                // explicit formula?\n                if ($type == 0x03 && Preg::isMatch('/^\\\".*\\\"$/', $dataValidation->getFormula1())) {\n                    $options |= 0x01 << 7;\n                }\n\n                // empty cells allowed\n                $options |= $dataValidation->getAllowBlank() << 8;\n\n                // show drop down\n                $options |= (!$dataValidation->getShowDropDown()) << 9;\n\n                // show input message\n                $options |= $dataValidation->getShowInputMessage() << 18;\n\n                // show error message\n                $options |= $dataValidation->getShowErrorMessage() << 19;\n\n                // condition operator\n                $operator = CellDataValidation::operator($dataValidation);\n\n                $options |= $operator << 20;\n\n                $data = pack('V', $options);\n\n                // prompt title\n                $promptTitle = $dataValidation->getPromptTitle() !== ''\n                    ? $dataValidation->getPromptTitle() : chr(0);\n                $data .= StringHelper::UTF8toBIFF8UnicodeLong($promptTitle);\n\n                // error title\n                $errorTitle = $dataValidation->getErrorTitle() !== ''\n                    ? $dataValidation->getErrorTitle() : chr(0);\n                $data .= StringHelper::UTF8toBIFF8UnicodeLong($errorTitle);\n\n                // prompt text\n                $prompt = $dataValidation->getPrompt() !== ''\n                    ? $dataValidation->getPrompt() : chr(0);\n                $data .= StringHelper::UTF8toBIFF8UnicodeLong($prompt);\n\n                // error text\n                $error = $dataValidation->getError() !== ''\n                    ? $dataValidation->getError() : chr(0);\n                $data .= StringHelper::UTF8toBIFF8UnicodeLong($error);\n\n                // formula 1\n                try {\n                    $formula1 = $dataValidation->getFormula1();\n                    if ($type == 0x03) { // list type\n                        $formula1 = str_replace(',', chr(0), $formula1);\n                    }\n                    $this->parser->parse($formula1);\n                    $formula1 = $this->parser->toReversePolish();\n                    $sz1 = strlen($formula1);\n                } catch (PhpSpreadsheetException $e) {\n                    $sz1 = 0;\n                    $formula1 = '';\n                }\n                $data .= pack('vv', $sz1, 0x0000);\n                $data .= $formula1;\n\n                // formula 2\n                try {\n                    $formula2 = $dataValidation->getFormula2();\n                    if ($formula2 === '') {\n                        throw new WriterException('No formula2');\n                    }\n                    $this->parser->parse($formula2);\n                    $formula2 = $this->parser->toReversePolish();\n                    $sz2 = strlen($formula2);\n                } catch (PhpSpreadsheetException) {\n                    $sz2 = 0;\n                    $formula2 = '';\n                }\n                $data .= pack('vv', $sz2, 0x0000);\n                $data .= $formula2;\n\n                // cell range address list\n                $data .= pack('v', 0x0001);\n                $data .= $this->writeBIFF8CellRangeAddressFixed($cellCoordinate);\n\n                $length = strlen($data);\n                $header = pack('vv', $record, $length);\n\n                $this->append($header . $data);\n            }\n        }\n    }\n\n    /**\n     * Write PLV Record.\n     */\n    private function writePageLayoutView(): void\n    {\n        $record = 0x088B; // Record identifier\n        $length = 0x0010; // Bytes to follow\n\n        $rt = 0x088B; // 2\n        $grbitFrt = 0x0000; // 2\n        //$reserved = 0x0000000000000000; // 8\n        $wScalvePLV = $this->phpSheet->getSheetView()->getZoomScale(); // 2\n\n        // The options flags that comprise $grbit\n        if ($this->phpSheet->getSheetView()->getView() == SheetView::SHEETVIEW_PAGE_LAYOUT) {\n            $fPageLayoutView = 1;\n        } else {\n            $fPageLayoutView = 0;\n        }\n        $fRulerVisible = 0;\n        $fWhitespaceHidden = 0;\n\n        $grbit = $fPageLayoutView; // 2\n        $grbit |= $fRulerVisible << 1;\n        $grbit |= $fWhitespaceHidden << 3;\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vvVVvv', $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit);\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write CFRule Record.\n     *\n     * @see https://www.openoffice.org/sc/excelfileformat.pdf Search for CFHEADER followed by CFRULE\n     */\n    private function writeCFRule(\n        ConditionalHelper $conditionalFormulaHelper,\n        Conditional $conditional,\n        string $cellRange\n    ): void {\n        $record = 0x01B1; // Record identifier\n        $type = null; // Type of the CF\n        $operatorType = null; // Comparison operator\n\n        if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION) {\n            $type = 0x02;\n            $operatorType = 0x00;\n        } elseif ($conditional->getConditionType() == Conditional::CONDITION_CELLIS) {\n            $type = 0x01;\n\n            switch ($conditional->getOperatorType()) {\n                case Conditional::OPERATOR_NONE:\n                    $operatorType = 0x00;\n\n                    break;\n                case Conditional::OPERATOR_EQUAL:\n                    $operatorType = 0x03;\n\n                    break;\n                case Conditional::OPERATOR_GREATERTHAN:\n                    $operatorType = 0x05;\n\n                    break;\n                case Conditional::OPERATOR_GREATERTHANOREQUAL:\n                    $operatorType = 0x07;\n\n                    break;\n                case Conditional::OPERATOR_LESSTHAN:\n                    $operatorType = 0x06;\n\n                    break;\n                case Conditional::OPERATOR_LESSTHANOREQUAL:\n                    $operatorType = 0x08;\n\n                    break;\n                case Conditional::OPERATOR_NOTEQUAL:\n                    $operatorType = 0x04;\n\n                    break;\n                case Conditional::OPERATOR_BETWEEN:\n                    $operatorType = 0x01;\n\n                    break;\n                    // not OPERATOR_NOTBETWEEN 0x02\n            }\n        }\n\n        // $szValue1 : size of the formula data for first value or formula\n        // $szValue2 : size of the formula data for second value or formula\n        $arrConditions = $conditional->getConditions();\n        $numConditions = count($arrConditions);\n\n        $szValue1 = 0x0000;\n        $szValue2 = 0x0000;\n        $operand1 = null;\n        $operand2 = null;\n\n        if ($numConditions === 1) {\n            $conditionalFormulaHelper->processCondition($arrConditions[0], $cellRange);\n            $szValue1 = $conditionalFormulaHelper->size();\n            $operand1 = $conditionalFormulaHelper->tokens();\n        } elseif ($numConditions === 2 && ($conditional->getOperatorType() === Conditional::OPERATOR_BETWEEN)) {\n            $conditionalFormulaHelper->processCondition($arrConditions[0], $cellRange);\n            $szValue1 = $conditionalFormulaHelper->size();\n            $operand1 = $conditionalFormulaHelper->tokens();\n            $conditionalFormulaHelper->processCondition($arrConditions[1], $cellRange);\n            $szValue2 = $conditionalFormulaHelper->size();\n            $operand2 = $conditionalFormulaHelper->tokens();\n        }\n\n        // $flags : Option flags\n        // Alignment\n        /*$bAlignHz = ($conditional->getStyle()->getAlignment()->getHorizontal() === null ? 1 : 0);\n        $bAlignVt = ($conditional->getStyle()->getAlignment()->getVertical() === null ? 1 : 0);\n        $bAlignWrapTx = ($conditional->getStyle()->getAlignment()->getWrapText() === false ? 1 : 0);\n        $bTxRotation = ($conditional->getStyle()->getAlignment()->getTextRotation() === null ? 1 : 0);\n        $bIndent = ($conditional->getStyle()->getAlignment()->getIndent() === 0 ? 1 : 0);\n        $bShrinkToFit = ($conditional->getStyle()->getAlignment()->getShrinkToFit() === false ? 1 : 0);\n        if ($bAlignHz == 0 || $bAlignVt == 0 || $bAlignWrapTx == 0 || $bTxRotation == 0 || $bIndent == 0 || $bShrinkToFit == 0) {\n            $bFormatAlign = 1;\n        } else {\n            $bFormatAlign = 0;\n        }*/\n        // Protection\n        /*$bProtLocked = ($conditional->getStyle()->getProtection()->getLocked() === null ? 1 : 0);\n        $bProtHidden = ($conditional->getStyle()->getProtection()->getHidden() === null ? 1 : 0);\n        if ($bProtLocked == 0 || $bProtHidden == 0) {\n            $bFormatProt = 1;\n        } else {\n            $bFormatProt = 0;\n        }*/\n        // Border\n        $bBorderLeft = ($conditional->getStyle()->getBorders()->getLeft()->getBorderStyle() !== Border::BORDER_OMIT) ? 1 : 0;\n        $bBorderRight = ($conditional->getStyle()->getBorders()->getRight()->getBorderStyle() !== Border::BORDER_OMIT) ? 1 : 0;\n        $bBorderTop = ($conditional->getStyle()->getBorders()->getTop()->getBorderStyle() !== Border::BORDER_OMIT) ? 1 : 0;\n        $bBorderBottom = ($conditional->getStyle()->getBorders()->getBottom()->getBorderStyle() !== Border::BORDER_OMIT) ? 1 : 0;\n        //$diagonalDirection = $conditional->getStyle()->getBorders()->getDiagonalDirection();\n        // Excel does not support conditional diagonal border even for xlsx\n        $bBorderDiagTop = self::$always0; //$diagonalDirection === Borders::DIAGONAL_DOWN || $diagonalDirection === Borders::DIAGONAL_BOTH;\n        $bBorderDiagBottom = self::$always0; //$diagonalDirection === Borders::DIAGONAL_UP || $diagonalDirection === Borders::DIAGONAL_BOTH;\n\n        if ($bBorderLeft === 1 || $bBorderRight === 1 || $bBorderTop === 1 || $bBorderBottom === 1 || $bBorderDiagTop === 1 || $bBorderDiagBottom === 1) {\n            $bFormatBorder = 1;\n        } else {\n            $bFormatBorder = 0;\n        }\n        // Pattern\n        $bFillStyle = $conditional->getStyle()->getFill()->getFillType() ? 1 : 0;\n        $bFillColor = $conditional->getStyle()->getFill()->getStartColor()->getARGB() ? 1 : 0;\n        $bFillColorBg = $conditional->getStyle()->getFill()->getEndColor()->getARGB() ? 1 : 0;\n        if ($bFillStyle == 1 || $bFillColor == 1 || $bFillColorBg == 1) {\n            $bFormatFill = 1;\n        } else {\n            $bFormatFill = 0;\n        }\n        // Font\n        if (\n            $conditional->getStyle()->getFont()->getName() !== null\n            || $conditional->getStyle()->getFont()->getSize() !== null\n            || $conditional->getStyle()->getFont()->getBold() !== null\n            || $conditional->getStyle()->getFont()->getItalic() !== null\n            || $conditional->getStyle()->getFont()->getSuperscript() !== null\n            || $conditional->getStyle()->getFont()->getSubscript() !== null\n            || $conditional->getStyle()->getFont()->getUnderline() !== null\n            || $conditional->getStyle()->getFont()->getStrikethrough() !== null\n            || $conditional->getStyle()->getFont()->getColor()->getARGB() !== null\n        ) {\n            $bFormatFont = 1;\n        } else {\n            $bFormatFont = 0;\n        }\n        // Alignment\n        $flags = 0;\n        //$flags |= (1 == $bAlignHz ? 0x00000001 : 0);\n        //$flags |= (1 == $bAlignVt ? 0x00000002 : 0);\n        //$flags |= (1 == $bAlignWrapTx ? 0x00000004 : 0);\n        //$flags |= (1 == $bTxRotation ? 0x00000008 : 0);\n        // Justify last line flag\n        $flags |= (1 == self::$always1 ? 0x00000010 : 0);\n        //$flags |= (1 == $bIndent ? 0x00000020 : 0);\n        //$flags |= (1 == $bShrinkToFit ? 0x00000040 : 0);\n        // Default\n        $flags |= (1 == self::$always1 ? 0x00000080 : 0);\n        // Protection\n        //$flags |= (1 == $bProtLocked ? 0x00000100 : 0);\n        //$flags |= (1 == $bProtHidden ? 0x00000200 : 0);\n        // Border, note that flags are opposite of what you might expect\n        $flags |= (0 == $bBorderLeft ? 0x00000400 : 0);\n        $flags |= (0 == $bBorderRight ? 0x00000800 : 0);\n        $flags |= (0 == $bBorderTop ? 0x00001000 : 0);\n        $flags |= (0 == $bBorderBottom ? 0x00002000 : 0);\n        $flags |= (0 === $bBorderDiagTop ? 0x00004000 : 0); // Top left to Bottom right border\n        $flags |= (0 === $bBorderDiagBottom ? 0x00008000 : 0); // Bottom left to Top right border\n        // Pattern\n        $flags |= (1 == $bFillStyle ? 0x00010000 : 0);\n        $flags |= (1 == $bFillColor ? 0x00020000 : 0);\n        $flags |= (1 == $bFillColorBg ? 0x00040000 : 0);\n        $flags |= (1 == self::$always1 ? 0x00380000 : 0);\n        // Font\n        $flags |= (1 == $bFormatFont ? 0x04000000 : 0);\n        // Alignment:\n        //$flags |= (1 == $bFormatAlign ? 0x08000000 : 0);\n        // Border\n        $flags |= (1 == $bFormatBorder ? 0x10000000 : 0);\n        // Pattern\n        $flags |= (1 == $bFormatFill ? 0x20000000 : 0);\n        // Protection\n        //$flags |= (1 == $bFormatProt ? 0x40000000 : 0);\n        // Text direction\n        $flags |= (1 == self::$always0 ? 0x80000000 : 0);\n\n        $dataBlockFont = null;\n        //$dataBlockAlign = null;\n        $dataBlockBorder = null;\n        $dataBlockFill = null;\n\n        // Data Blocks\n        if ($bFormatFont == 1) {\n            // Font Name\n            if ($conditional->getStyle()->getFont()->getName() === null) {\n                $dataBlockFont = pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);\n                $dataBlockFont .= pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);\n            } else {\n                $dataBlockFont = StringHelper::UTF8toBIFF8UnicodeLong($conditional->getStyle()->getFont()->getName());\n            }\n            // Font Size\n            if ($conditional->getStyle()->getFont()->getSize() === null) {\n                $dataBlockFont .= pack('V', 20 * 11);\n            } else {\n                $dataBlockFont .= pack('V', 20 * $conditional->getStyle()->getFont()->getSize());\n            }\n            // Font Options\n            $italicStrike = 0;\n            if ($conditional->getStyle()->getFont()->getItalic() === true) {\n                $italicStrike |= 2;\n            }\n            if ($conditional->getStyle()->getFont()->getStrikethrough() === true) {\n                $italicStrike |= 0x80;\n            }\n            $dataBlockFont .= pack('V', $italicStrike);\n            // Font weight\n            if ($conditional->getStyle()->getFont()->getBold() === true) {\n                $dataBlockFont .= pack('v', 0x02BC);\n            } elseif ($conditional->getStyle()->getFont()->getBold() === null) {\n                $dataBlockFont .= pack('v', 0x0000);\n            } else {\n                $dataBlockFont .= pack('v', 0x0190);\n            }\n            // Escapement type\n            if ($conditional->getStyle()->getFont()->getSubscript() === true) {\n                $dataBlockFont .= pack('v', 0x02);\n                $fontEscapement = 0;\n            } elseif ($conditional->getStyle()->getFont()->getSuperscript() === true) {\n                $dataBlockFont .= pack('v', 0x01);\n                $fontEscapement = 0;\n            } else {\n                $dataBlockFont .= pack('v', 0x00);\n                $fontEscapement = 1;\n            }\n            // Underline type\n            switch ($conditional->getStyle()->getFont()->getUnderline()) {\n                case \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_NONE:\n                    $dataBlockFont .= pack('C', 0x00);\n                    $fontUnderline = 0;\n\n                    break;\n                case \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_DOUBLE:\n                    $dataBlockFont .= pack('C', 0x02);\n                    $fontUnderline = 0;\n\n                    break;\n                case \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_DOUBLEACCOUNTING:\n                    $dataBlockFont .= pack('C', 0x22);\n                    $fontUnderline = 0;\n\n                    break;\n                case \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_SINGLE:\n                    $dataBlockFont .= pack('C', 0x01);\n                    $fontUnderline = 0;\n\n                    break;\n                case \\PhpOffice\\PhpSpreadsheet\\Style\\Font::UNDERLINE_SINGLEACCOUNTING:\n                    $dataBlockFont .= pack('C', 0x21);\n                    $fontUnderline = 0;\n\n                    break;\n                default:\n                    $dataBlockFont .= pack('C', 0x00);\n                    $fontUnderline = 1;\n\n                    break;\n            }\n            // Not used (3)\n            $dataBlockFont .= pack('vC', 0x0000, 0x00);\n            // Font color index\n            $colorIdx = $this->workbookColorIndex($conditional->getStyle()->getFont()->getColor()->getRgb(), 0);\n            $dataBlockFont .= pack('V', $colorIdx);\n            // Not used (4)\n            $dataBlockFont .= pack('V', 0x00000000);\n            // Options flags for modified font attributes\n            $optionsFlags = 0;\n            $optionsFlags |= ($conditional->getStyle()->getFont()->getBold() === null && $conditional->getStyle()->getFont()->getItalic() === null) ? 2 : 0;\n            $optionsFlags |= (1 == self::$always1 ? 0x00000008 : 0);\n            $optionsFlags |= (1 == self::$always1 ? 0x00000010 : 0);\n            $optionsFlags |= (1 == self::$always0 ? 0x00000020 : 0);\n            $optionsFlags |= ($conditional->getStyle()->getFont()->getStrikethrough() === null) ? 0x80 : 0;\n            $dataBlockFont .= pack('V', $optionsFlags);\n            // Escapement type\n            $dataBlockFont .= pack('V', $fontEscapement);\n            // Underline type\n            $dataBlockFont .= pack('V', $fontUnderline);\n            // Always\n            $dataBlockFont .= pack('V', 0x00000000);\n            // Always\n            $dataBlockFont .= pack('V', 0x00000000);\n            // Not used (8)\n            $dataBlockFont .= pack('VV', 0x00000000, 0x00000000);\n            // Always\n            $dataBlockFont .= pack('v', 0x0001);\n        }\n        /*if ($bFormatAlign === 1) {\n            // Alignment and text break\n            $blockAlign = Style\\CellAlignment::horizontal($conditional->getStyle()->getAlignment());\n            $blockAlign |= Style\\CellAlignment::wrap($conditional->getStyle()->getAlignment()) << 3;\n            $blockAlign |= Style\\CellAlignment::vertical($conditional->getStyle()->getAlignment()) << 4;\n            $blockAlign |= 0 << 7;\n\n            // Text rotation angle\n            $blockRotation = $conditional->getStyle()->getAlignment()->getTextRotation();\n\n            // Indentation\n            $blockIndent = $conditional->getStyle()->getAlignment()->getIndent();\n            if ($conditional->getStyle()->getAlignment()->getShrinkToFit() === true) {\n                $blockIndent |= 1 << 4;\n            } else {\n                $blockIndent |= 0 << 4;\n            }\n            $blockIndent |= 0 << 6;\n\n            // Relative indentation\n            $blockIndentRelative = 255;\n\n            $dataBlockAlign = pack('CCvvv', $blockAlign, $blockRotation, $blockIndent, $blockIndentRelative, 0x0000);\n        }*/\n        if ($bFormatBorder === 1) {\n            $blockLineStyle = Style\\CellBorder::style($conditional->getStyle()->getBorders()->getLeft());\n            $blockLineStyle |= Style\\CellBorder::style($conditional->getStyle()->getBorders()->getRight()) << 4;\n            $blockLineStyle |= Style\\CellBorder::style($conditional->getStyle()->getBorders()->getTop()) << 8;\n            $blockLineStyle |= Style\\CellBorder::style($conditional->getStyle()->getBorders()->getBottom()) << 12;\n\n            if ($bBorderLeft !== 0) {\n                $colorIdx = $this->workbookColorIndex($conditional->getStyle()->getBorders()->getLeft()->getColor()->getRgb(), 0);\n                $blockLineStyle |= $colorIdx << 16;\n            }\n            if ($bBorderRight !== 0) {\n                $colorIdx = $this->workbookColorIndex($conditional->getStyle()->getBorders()->getRight()->getColor()->getRgb(), 0);\n                $blockLineStyle |= $colorIdx << 23;\n            }\n            $blockColor = 0;\n            if ($bBorderTop !== 0) {\n                $colorIdx = $this->workbookColorIndex($conditional->getStyle()->getBorders()->getTop()->getColor()->getRgb(), 0);\n                $blockColor |= $colorIdx;\n            }\n            if ($bBorderBottom !== 0) {\n                $colorIdx = $this->workbookColorIndex($conditional->getStyle()->getBorders()->getBottom()->getColor()->getRgb(), 0);\n                $blockColor |= $colorIdx << 7;\n            }\n            /* Excel does not support condtional diagonal borders even for xlsx\n            if ($bBorderDiagTop !== 0 || $bBorderDiagBottom !== 0) {\n                $colorIdx = $this->workbookColorIndex($conditional->getStyle()->getBorders()->getDiagonal()->getColor()->getRgb(), 0);\n                $blockColor |= $colorIdx << 14;\n                $blockColor |= Style\\CellBorder::style($conditional->getStyle()->getBorders()->getDiagonal()) << 21;\n                if ($bBorderDiagTop !== 0) {\n                    $blockLineStyle |= 1 << 30;\n                }\n                if ($bBorderDiagBottom !== 0) {\n                    $blockLineStyle |= 1 << 31;\n                }\n            }\n            */\n            $dataBlockBorder = pack('VV', $blockLineStyle, $blockColor);\n        }\n        if ($bFormatFill === 1) {\n            // Fill Pattern Style\n            $blockFillPatternStyle = Style\\CellFill::style($conditional->getStyle()->getFill());\n            // Background Color\n            $colorIdxBg = $this->workbookColorIndex($conditional->getStyle()->getFill()->getStartColor()->getRgb(), 0x41);\n            // Foreground Color\n            $colorIdxFg = $this->workbookColorIndex($conditional->getStyle()->getFill()->getEndColor()->getRgb(), 0x40);\n\n            $dataBlockFill = pack('v', $blockFillPatternStyle);\n            $dataBlockFill .= pack('v', $colorIdxFg | ($colorIdxBg << 7));\n        }\n\n        $data = pack('CCvvVv', $type, $operatorType, $szValue1, $szValue2, $flags, 0x0000);\n        if ($bFormatFont === 1) { // Block Formatting : OK\n            $data .= $dataBlockFont;\n        }\n        //if ($bFormatAlign === 1) {\n        //    $data .= $dataBlockAlign;\n        //}\n        if ($bFormatBorder === 1) {\n            $data .= $dataBlockBorder;\n        }\n        if ($bFormatFill === 1) { // Block Formatting : OK\n            $data .= $dataBlockFill;\n        }\n        //if ($bFormatProt == 1) {\n        //    $data .= $this->getDataBlockProtection($conditional);\n        //}\n        if ($operand1 !== null) {\n            $data .= $operand1;\n        }\n        if ($operand2 !== null) {\n            $data .= $operand2;\n        }\n        $header = pack('vv', $record, strlen($data));\n        $this->append($header . $data);\n    }\n\n    /**\n     * Write CFHeader record.\n     *\n     * @param Conditional[] $conditionalStyles\n     */\n    private function writeCFHeader(string $cellCoordinate, array $conditionalStyles): bool\n    {\n        $record = 0x01B0; // Record identifier\n        $length = 0x0016; // Bytes to follow\n\n        $numColumnMin = null;\n        $numColumnMax = null;\n        $numRowMin = null;\n        $numRowMax = null;\n\n        $arrConditional = [];\n        foreach ($conditionalStyles as $conditional) {\n            if (!in_array($conditional->getHashCode(), $arrConditional)) {\n                $arrConditional[] = $conditional->getHashCode();\n            }\n            // Cells\n            $rangeCoordinates = Coordinate::rangeBoundaries($cellCoordinate);\n            if ($numColumnMin === null || ($numColumnMin > $rangeCoordinates[0][0])) {\n                $numColumnMin = $rangeCoordinates[0][0];\n            }\n            if ($numColumnMax === null || ($numColumnMax < $rangeCoordinates[1][0])) {\n                $numColumnMax = $rangeCoordinates[1][0];\n            }\n            if ($numRowMin === null || ($numRowMin > $rangeCoordinates[0][1])) {\n                $numRowMin = (int) $rangeCoordinates[0][1];\n            }\n            if ($numRowMax === null || ($numRowMax < $rangeCoordinates[1][1])) {\n                $numRowMax = (int) $rangeCoordinates[1][1];\n            }\n        }\n\n        if (count($arrConditional) === 0) {\n            return false;\n        }\n\n        $needRedraw = 1;\n        $cellRange = pack('vvvv', $numRowMin - 1, $numRowMax - 1, $numColumnMin - 1, $numColumnMax - 1);\n\n        $header = pack('vv', $record, $length);\n        $data = pack('vv', count($arrConditional), $needRedraw);\n        $data .= $cellRange;\n        $data .= pack('v', 0x0001);\n        $data .= $cellRange;\n        $this->append($header . $data);\n\n        return true;\n    }\n\n    /*private function getDataBlockProtection(Conditional $conditional): int\n    {\n        $dataBlockProtection = 0;\n        if ($conditional->getStyle()->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED) {\n            $dataBlockProtection = 1;\n        }\n        if ($conditional->getStyle()->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED) {\n            $dataBlockProtection = 1 << 1;\n        }\n\n        return $dataBlockProtection;\n    }*/\n\n    private function workbookColorIndex(?string $rgb, int $default): int\n    {\n        return (empty($rgb) || $this->writerWorkbook === null) ? $default : $this->writerWorkbook->addColor($rgb, $default);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls/Xf.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Style\\CellAlignment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Style\\CellBorder;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Style\\CellFill;\n\n// Original file header of PEAR::Spreadsheet_Excel_Writer_Format (used as the base for this class):\n// -----------------------------------------------------------------------------------------\n// /*\n// *  Module written/ported by Xavier Noguer <xnoguer@rezebra.com>\n// *\n// *  The majority of this is _NOT_ my code.  I simply ported it from the\n// *  PERL Spreadsheet::WriteExcel module.\n// *\n// *  The author of the Spreadsheet::WriteExcel module is John McNamara\n// *  <jmcnamara@cpan.org>\n// *\n// *  I _DO_ maintain this code, and John McNamara has nothing to do with the\n// *  porting of this code to PHP.  Any questions directly related to this\n// *  class library should be directed to me.\n// *\n// *  License Information:\n// *\n// *    Spreadsheet_Excel_Writer:  A library for generating Excel Spreadsheets\n// *    Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com\n// *\n// *    This library is free software; you can redistribute it and/or\n// *    modify it under the terms of the GNU Lesser General Public\n// *    License as published by the Free Software Foundation; either\n// *    version 2.1 of the License, or (at your option) any later version.\n// *\n// *    This library is distributed in the hope that it will be useful,\n// *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n// *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// *    Lesser General Public License for more details.\n// *\n// *    You should have received a copy of the GNU Lesser General Public\n// *    License along with this library; if not, write to the Free Software\n// *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n// */\nclass Xf\n{\n    /**\n     * Style XF or a cell XF ?\n     */\n    private bool $isStyleXf;\n\n    /**\n     * Index to the FONT record. Index 4 does not exist.\n     */\n    private int $fontIndex;\n\n    /**\n     * An index (2 bytes) to a FORMAT record (number format).\n     */\n    private int $numberFormatIndex;\n\n    /**\n     * 1 bit, apparently not used.\n     */\n    private int $textJustLast;\n\n    /**\n     * The cell's foreground color.\n     */\n    private int $foregroundColor;\n\n    /**\n     * The cell's background color.\n     */\n    private int $backgroundColor;\n\n    /**\n     * Color of the bottom border of the cell.\n     */\n    private int $bottomBorderColor;\n\n    /**\n     * Color of the top border of the cell.\n     */\n    private int $topBorderColor;\n\n    /**\n     * Color of the left border of the cell.\n     */\n    private int $leftBorderColor;\n\n    /**\n     * Color of the right border of the cell.\n     */\n    private int $rightBorderColor;\n\n    //private $diag; // theoretically int, not yet implemented\n    private int $diagColor;\n\n    private Style $style;\n\n    /**\n     * Constructor.\n     *\n     * @param Style $style The XF format\n     */\n    public function __construct(Style $style)\n    {\n        $this->isStyleXf = false;\n        $this->fontIndex = 0;\n\n        $this->numberFormatIndex = 0;\n\n        $this->textJustLast = 0;\n\n        $this->foregroundColor = 0x40;\n        $this->backgroundColor = 0x41;\n\n        //$this->diag = 0;\n\n        $this->bottomBorderColor = 0x40;\n        $this->topBorderColor = 0x40;\n        $this->leftBorderColor = 0x40;\n        $this->rightBorderColor = 0x40;\n        $this->diagColor = 0x40;\n        $this->style = $style;\n    }\n\n    /**\n     * Generate an Excel BIFF XF record (style or cell).\n     *\n     * @return string The XF record\n     */\n    public function writeXf(): string\n    {\n        // Set the type of the XF record and some of the attributes.\n        if ($this->isStyleXf) {\n            $style = 0xFFF5;\n        } else {\n            $style = self::mapLocked($this->style->getProtection()->getLocked());\n            $style |= self::mapHidden($this->style->getProtection()->getHidden()) << 1;\n        }\n\n        // Flags to indicate if attributes have been set.\n        $atr_num = ($this->numberFormatIndex != 0) ? 1 : 0;\n        $atr_fnt = ($this->fontIndex != 0) ? 1 : 0;\n        $atr_alc = ((int) $this->style->getAlignment()->getWrapText()) ? 1 : 0;\n        $atr_bdr = (CellBorder::style($this->style->getBorders()->getBottom())\n            || CellBorder::style($this->style->getBorders()->getTop())\n            || CellBorder::style($this->style->getBorders()->getLeft())\n            || CellBorder::style($this->style->getBorders()->getRight())) ? 1 : 0;\n        $atr_pat = ($this->foregroundColor != 0x40) ? 1 : 0;\n        $atr_pat = ($this->backgroundColor != 0x41) ? 1 : $atr_pat;\n        $atr_pat = CellFill::style($this->style->getFill()) ? 1 : $atr_pat;\n        $atr_prot = self::mapLocked($this->style->getProtection()->getLocked())\n            | self::mapHidden($this->style->getProtection()->getHidden());\n\n        // Zero the default border colour if the border has not been set.\n        if (CellBorder::style($this->style->getBorders()->getBottom()) == 0) {\n            $this->bottomBorderColor = 0;\n        }\n        if (CellBorder::style($this->style->getBorders()->getTop()) == 0) {\n            $this->topBorderColor = 0;\n        }\n        if (CellBorder::style($this->style->getBorders()->getRight()) == 0) {\n            $this->rightBorderColor = 0;\n        }\n        if (CellBorder::style($this->style->getBorders()->getLeft()) == 0) {\n            $this->leftBorderColor = 0;\n        }\n        if (CellBorder::style($this->style->getBorders()->getDiagonal()) == 0) {\n            $this->diagColor = 0;\n        }\n\n        $record = 0x00E0; // Record identifier\n        $length = 0x0014; // Number of bytes to follow\n\n        $ifnt = $this->fontIndex; // Index to FONT record\n        $ifmt = $this->numberFormatIndex; // Index to FORMAT record\n\n        // Alignment\n        $align = CellAlignment::horizontal($this->style->getAlignment());\n        $align |= CellAlignment::wrap($this->style->getAlignment()) << 3;\n        $align |= CellAlignment::vertical($this->style->getAlignment()) << 4;\n        $align |= $this->textJustLast << 7;\n\n        $used_attrib = $atr_num << 2;\n        $used_attrib |= $atr_fnt << 3;\n        $used_attrib |= $atr_alc << 4;\n        $used_attrib |= $atr_bdr << 5;\n        $used_attrib |= $atr_pat << 6;\n        $used_attrib |= $atr_prot << 7;\n\n        $icv = $this->foregroundColor; // fg and bg pattern colors\n        $icv |= $this->backgroundColor << 7;\n\n        $border1 = CellBorder::style($this->style->getBorders()->getLeft()); // Border line style and color\n        $border1 |= CellBorder::style($this->style->getBorders()->getRight()) << 4;\n        $border1 |= CellBorder::style($this->style->getBorders()->getTop()) << 8;\n        $border1 |= CellBorder::style($this->style->getBorders()->getBottom()) << 12;\n        $border1 |= $this->leftBorderColor << 16;\n        $border1 |= $this->rightBorderColor << 23;\n\n        $diagonalDirection = $this->style->getBorders()->getDiagonalDirection();\n        $diag_tl_to_rb = $diagonalDirection == Borders::DIAGONAL_BOTH\n            || $diagonalDirection == Borders::DIAGONAL_DOWN;\n        $diag_tr_to_lb = $diagonalDirection == Borders::DIAGONAL_BOTH\n            || $diagonalDirection == Borders::DIAGONAL_UP;\n        $border1 |= $diag_tl_to_rb << 30;\n        $border1 |= $diag_tr_to_lb << 31;\n\n        $border2 = $this->topBorderColor; // Border color\n        $border2 |= $this->bottomBorderColor << 7;\n        $border2 |= $this->diagColor << 14;\n        $border2 |= CellBorder::style($this->style->getBorders()->getDiagonal()) << 21;\n        $border2 |= CellFill::style($this->style->getFill()) << 26;\n\n        $header = pack('vv', $record, $length);\n\n        //BIFF8 options: indentation, shrinkToFit and text direction\n        $biff8_options = $this->style->getAlignment()->getIndent() & 15;\n        $biff8_options |= (int) $this->style->getAlignment()->getShrinkToFit() << 4;\n        $biff8_options |= $this->style->getAlignment()->getReadOrder() << 6;\n\n        $data = pack('vvvC', $ifnt, $ifmt, $style, $align);\n        $data .= pack('CCC', self::mapTextRotation((int) $this->style->getAlignment()->getTextRotation()), $biff8_options, $used_attrib);\n        $data .= pack('VVv', $border1, $border2, $icv);\n\n        return $header . $data;\n    }\n\n    /**\n     * Is this a style XF ?\n     */\n    public function setIsStyleXf(bool $value): void\n    {\n        $this->isStyleXf = $value;\n    }\n\n    /**\n     * Sets the cell's bottom border color.\n     *\n     * @param int $colorIndex Color index\n     */\n    public function setBottomColor(int $colorIndex): void\n    {\n        $this->bottomBorderColor = $colorIndex;\n    }\n\n    /**\n     * Sets the cell's top border color.\n     *\n     * @param int $colorIndex Color index\n     */\n    public function setTopColor(int $colorIndex): void\n    {\n        $this->topBorderColor = $colorIndex;\n    }\n\n    /**\n     * Sets the cell's left border color.\n     *\n     * @param int $colorIndex Color index\n     */\n    public function setLeftColor(int $colorIndex): void\n    {\n        $this->leftBorderColor = $colorIndex;\n    }\n\n    /**\n     * Sets the cell's right border color.\n     *\n     * @param int $colorIndex Color index\n     */\n    public function setRightColor(int $colorIndex): void\n    {\n        $this->rightBorderColor = $colorIndex;\n    }\n\n    /**\n     * Sets the cell's diagonal border color.\n     *\n     * @param int $colorIndex Color index\n     */\n    public function setDiagColor(int $colorIndex): void\n    {\n        $this->diagColor = $colorIndex;\n    }\n\n    /**\n     * Sets the cell's foreground color.\n     *\n     * @param int $colorIndex Color index\n     */\n    public function setFgColor(int $colorIndex): void\n    {\n        $this->foregroundColor = $colorIndex;\n    }\n\n    /**\n     * Sets the cell's background color.\n     *\n     * @param int $colorIndex Color index\n     */\n    public function setBgColor(int $colorIndex): void\n    {\n        $this->backgroundColor = $colorIndex;\n    }\n\n    /**\n     * Sets the index to the number format record\n     * It can be date, time, currency, etc...\n     *\n     * @param int $numberFormatIndex Index to format record\n     */\n    public function setNumberFormatIndex(int $numberFormatIndex): void\n    {\n        $this->numberFormatIndex = $numberFormatIndex;\n    }\n\n    /**\n     * Set the font index.\n     *\n     * @param int $value Font index, note that value 4 does not exist\n     */\n    public function setFontIndex(int $value): void\n    {\n        $this->fontIndex = $value;\n    }\n\n    /**\n     * Map to BIFF8 codes for text rotation angle.\n     */\n    private static function mapTextRotation(int $textRotation): int\n    {\n        if ($textRotation >= 0) {\n            return $textRotation;\n        }\n        if ($textRotation == Alignment::TEXTROTATION_STACK_PHPSPREADSHEET) {\n            return Alignment::TEXTROTATION_STACK_EXCEL;\n        }\n\n        return 90 - $textRotation;\n    }\n\n    private const LOCK_ARRAY = [\n        Protection::PROTECTION_INHERIT => 1,\n        Protection::PROTECTION_PROTECTED => 1,\n        Protection::PROTECTION_UNPROTECTED => 0,\n    ];\n\n    /**\n     * Map locked values.\n     */\n    private static function mapLocked(?string $locked): int\n    {\n        return $locked !== null && array_key_exists($locked, self::LOCK_ARRAY) ? self::LOCK_ARRAY[$locked] : 1;\n    }\n\n    private const HIDDEN_ARRAY = [\n        Protection::PROTECTION_INHERIT => 0,\n        Protection::PROTECTION_PROTECTED => 1,\n        Protection::PROTECTION_UNPROTECTED => 0,\n    ];\n\n    /**\n     * Map hidden.\n     */\n    private static function mapHidden(?string $hidden): int\n    {\n        return $hidden !== null && array_key_exists($hidden, self::HIDDEN_ARRAY) ? self::HIDDEN_ARRAY[$hidden] : 0;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xls.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\Run;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer\\SpContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE\\Blip;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\PPS\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\PPS\\Root;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Parser;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Workbook;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Worksheet;\n\nclass Xls extends BaseWriter\n{\n    /**\n     * PhpSpreadsheet object.\n     */\n    private Spreadsheet $spreadsheet;\n\n    /**\n     * Total number of shared strings in workbook.\n     */\n    private int $strTotal = 0;\n\n    /**\n     * Number of unique shared strings in workbook.\n     */\n    private int $strUnique = 0;\n\n    /**\n     * Array of unique shared strings in workbook.\n     *\n     * @var array<string, int>\n     */\n    private array $strTable = [];\n\n    /**\n     * Color cache. Mapping between RGB value and color index.\n     *\n     * @var mixed[]\n     */\n    private array $colors;\n\n    /**\n     * Formula parser.\n     */\n    private Parser $parser;\n\n    /**\n     * Identifier clusters for drawings. Used in MSODRAWINGGROUP record.\n     *\n     * @var mixed[]\n     */\n    private array $IDCLs;\n\n    /**\n     * Basic OLE object summary information.\n     */\n    private string $summaryInformation;\n\n    /**\n     * Extended OLE object document summary information.\n     */\n    private string $documentSummaryInformation;\n\n    private Workbook $writerWorkbook;\n\n    /**\n     * @var Worksheet[]\n     */\n    private array $writerWorksheets;\n\n    /**\n     * Create a new Xls Writer.\n     *\n     * @param Spreadsheet $spreadsheet PhpSpreadsheet object\n     */\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        $this->spreadsheet = $spreadsheet;\n\n        $this->parser = new Parser($spreadsheet);\n    }\n\n    /**\n     * Save Spreadsheet to file.\n     *\n     * @param resource|string $filename\n     */\n    public function save($filename, int $flags = 0): void\n    {\n        $this->processFlags($flags);\n\n        // garbage collect\n        $this->spreadsheet->garbageCollect();\n\n        $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog();\n        Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false);\n        $saveDateReturnType = Functions::getReturnDateType();\n        Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);\n\n        // initialize colors array\n        $this->colors = [];\n\n        // Initialise workbook writer\n        $this->writerWorkbook = new Workbook($this->spreadsheet, $this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser);\n\n        // Initialise worksheet writers\n        $countSheets = $this->spreadsheet->getSheetCount();\n        for ($i = 0; $i < $countSheets; ++$i) {\n            $this->writerWorksheets[$i] = new Worksheet($this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser, $this->preCalculateFormulas, $this->spreadsheet->getSheet($i), $this->writerWorkbook);\n        }\n\n        // build Escher objects. Escher objects for worksheets need to be built before Escher object for workbook.\n        $this->buildWorksheetEschers();\n        $this->buildWorkbookEscher();\n\n        // add 15 identical cell style Xfs\n        // for now, we use the first cellXf instead of cellStyleXf\n        $cellXfCollection = $this->spreadsheet->getCellXfCollection();\n        for ($i = 0; $i < 15; ++$i) {\n            $this->writerWorkbook->addXfWriter($cellXfCollection[0], true);\n        }\n\n        // add all the cell Xfs\n        foreach ($this->spreadsheet->getCellXfCollection() as $style) {\n            $this->writerWorkbook->addXfWriter($style, false);\n        }\n\n        // add fonts from rich text elements\n        for ($i = 0; $i < $countSheets; ++$i) {\n            foreach ($this->writerWorksheets[$i]->phpSheet->getCellCollection()->getCoordinates() as $coordinate) {\n                /** @var Cell $cell */\n                $cell = $this->writerWorksheets[$i]->phpSheet->getCellCollection()->get($coordinate);\n                $cVal = $cell->getValue();\n                if ($cVal instanceof RichText && (string) $cVal === '') {\n                    $cVal = '';\n                }\n                if ($cVal instanceof RichText) {\n                    $active = $this->spreadsheet->getActiveSheetIndex();\n                    $sheet = $cell->getWorksheet();\n                    $selected = $sheet->getSelectedCells();\n                    $font = $cell->getStyle()->getFont();\n                    $this->writerWorksheets[$i]\n                        ->fontHashIndex[$font->getHashCode()] = $this->writerWorkbook->addFont($font);\n                    $sheet->setSelectedCells($selected);\n                    if ($active > -1) {\n                        $this->spreadsheet\n                            ->setActiveSheetIndex($active);\n                    }\n                    $elements = $cVal->getRichTextElements();\n                    foreach ($elements as $element) {\n                        if ($element instanceof Run) {\n                            $font = $element->getFont();\n                            if ($font !== null) {\n                                $this->writerWorksheets[$i]\n                                    ->fontHashIndex[\n                                        $font->getHashCode()\n                                    ] = $this->writerWorkbook->addFont($font);\n                            }\n                        }\n                    }\n                }\n            }\n        }\n\n        // initialize OLE file\n        $workbookStreamName = 'Workbook';\n        $OLE = new File(OLE::ascToUcs($workbookStreamName));\n\n        // Write the worksheet streams before the global workbook stream,\n        // because the byte sizes of these are needed in the global workbook stream\n        $worksheetSizes = [];\n        for ($i = 0; $i < $countSheets; ++$i) {\n            $this->writerWorksheets[$i]->close();\n            $worksheetSizes[] = $this->writerWorksheets[$i]->_datasize;\n        }\n\n        // add binary data for global workbook stream\n        $OLE->append($this->writerWorkbook->writeWorkbook($worksheetSizes));\n\n        // add binary data for sheet streams\n        for ($i = 0; $i < $countSheets; ++$i) {\n            $OLE->append($this->writerWorksheets[$i]->getData());\n        }\n\n        $this->documentSummaryInformation = $this->writeDocumentSummaryInformation();\n        // initialize OLE Document Summary Information\n        if (!empty($this->documentSummaryInformation)) {\n            $OLE_DocumentSummaryInformation = new File(OLE::ascToUcs(chr(5) . 'DocumentSummaryInformation'));\n            $OLE_DocumentSummaryInformation->append($this->documentSummaryInformation);\n        }\n\n        $this->summaryInformation = $this->writeSummaryInformation();\n        // initialize OLE Summary Information\n        if (!empty($this->summaryInformation)) {\n            $OLE_SummaryInformation = new File(OLE::ascToUcs(chr(5) . 'SummaryInformation'));\n            $OLE_SummaryInformation->append($this->summaryInformation);\n        }\n\n        // define OLE Parts\n        $arrRootData = [$OLE];\n        // initialize OLE Properties file\n        if (isset($OLE_SummaryInformation)) {\n            $arrRootData[] = $OLE_SummaryInformation;\n        }\n        // initialize OLE Extended Properties file\n        if (isset($OLE_DocumentSummaryInformation)) {\n            $arrRootData[] = $OLE_DocumentSummaryInformation;\n        }\n\n        $time = $this->spreadsheet->getProperties()->getModified();\n        $root = new Root($time, $time, $arrRootData);\n        // save the OLE file\n        $this->openFileHandle($filename);\n        $root->save($this->fileHandle);\n        $this->maybeCloseFileHandle();\n\n        Functions::setReturnDateType($saveDateReturnType);\n        Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog);\n    }\n\n    /**\n     * Build the Worksheet Escher objects.\n     */\n    private function buildWorksheetEschers(): void\n    {\n        // 1-based index to BstoreContainer\n        $blipIndex = 0;\n        $lastReducedSpId = 0;\n        $lastSpId = 0;\n\n        foreach ($this->spreadsheet->getAllsheets() as $sheet) {\n            // sheet index\n            $sheetIndex = $sheet->getParentOrThrow()->getIndex($sheet);\n\n            // check if there are any shapes for this sheet\n            $filterRange = $sheet->getAutoFilter()->getRange();\n            if (count($sheet->getDrawingCollection()) == 0 && empty($filterRange)) {\n                continue;\n            }\n\n            // create intermediate Escher object\n            $escher = new Escher();\n\n            // dgContainer\n            $dgContainer = new DgContainer();\n\n            // set the drawing index (we use sheet index + 1)\n            $dgId = $sheet->getParentOrThrow()->getIndex($sheet) + 1;\n            $dgContainer->setDgId($dgId);\n            $escher->setDgContainer($dgContainer);\n\n            // spgrContainer\n            $spgrContainer = new SpgrContainer();\n            $dgContainer->setSpgrContainer($spgrContainer);\n\n            // add one shape which is the group shape\n            $spContainer = new SpContainer();\n            $spContainer->setSpgr(true);\n            $spContainer->setSpType(0);\n            $spContainer->setSpId(($sheet->getParentOrThrow()->getIndex($sheet) + 1) << 10);\n            $spgrContainer->addChild($spContainer);\n\n            // add the shapes\n\n            $countShapes[$sheetIndex] = 0; // count number of shapes (minus group shape), in sheet\n\n            foreach ($sheet->getDrawingCollection() as $drawing) {\n                ++$blipIndex;\n\n                ++$countShapes[$sheetIndex];\n\n                // add the shape\n                $spContainer = new SpContainer();\n\n                // set the shape type\n                $spContainer->setSpType(0x004B);\n                // set the shape flag\n                $spContainer->setSpFlag(0x02);\n\n                // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index)\n                $reducedSpId = $countShapes[$sheetIndex];\n                $spId = $reducedSpId | ($sheet->getParentOrThrow()->getIndex($sheet) + 1) << 10;\n                $spContainer->setSpId($spId);\n\n                // keep track of last reducedSpId\n                $lastReducedSpId = $reducedSpId;\n\n                // keep track of last spId\n                $lastSpId = $spId;\n\n                // set the BLIP index\n                $spContainer->setOPT(0x4104, $blipIndex);\n\n                // set coordinates and offsets, client anchor\n                $coordinates = $drawing->getCoordinates();\n                $offsetX = $drawing->getOffsetX();\n                $offsetY = $drawing->getOffsetY();\n                $width = $drawing->getWidth();\n                $height = $drawing->getHeight();\n\n                $twoAnchor = \\PhpOffice\\PhpSpreadsheet\\Shared\\Xls::oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height);\n\n                if (is_array($twoAnchor)) {\n                    /** @var array{startCoordinates: string, startOffsetX: float|int, startOffsetY: float|int, endCoordinates: string, endOffsetX: float|int, endOffsetY: float|int} $twoAnchor */\n                    $spContainer->setStartCoordinates($twoAnchor['startCoordinates']);\n                    $spContainer->setStartOffsetX($twoAnchor['startOffsetX']);\n                    $spContainer->setStartOffsetY($twoAnchor['startOffsetY']);\n                    $spContainer->setEndCoordinates($twoAnchor['endCoordinates']);\n                    $spContainer->setEndOffsetX($twoAnchor['endOffsetX']);\n                    $spContainer->setEndOffsetY($twoAnchor['endOffsetY']);\n\n                    $spgrContainer->addChild($spContainer);\n                }\n            }\n\n            // AutoFilters\n            if (!empty($filterRange)) {\n                $rangeBounds = Coordinate::rangeBoundaries($filterRange);\n                $iNumColStart = $rangeBounds[0][0];\n                $iNumColEnd = $rangeBounds[1][0];\n\n                $iInc = $iNumColStart;\n                while ($iInc <= $iNumColEnd) {\n                    ++$countShapes[$sheetIndex];\n\n                    // create a Drawing Object for the dropdown\n                    $oDrawing = new BaseDrawing();\n                    // get the coordinates of drawing\n                    $cDrawing = Coordinate::stringFromColumnIndex($iInc) . $rangeBounds[0][1];\n                    $oDrawing->setCoordinates($cDrawing);\n                    $oDrawing->setWorksheet($sheet);\n\n                    // add the shape\n                    $spContainer = new SpContainer();\n                    // set the shape type\n                    $spContainer->setSpType(0x00C9);\n                    // set the shape flag\n                    $spContainer->setSpFlag(0x01);\n\n                    // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index)\n                    $reducedSpId = $countShapes[$sheetIndex];\n                    $spId = $reducedSpId | ($sheet->getParentOrThrow()->getIndex($sheet) + 1) << 10;\n                    $spContainer->setSpId($spId);\n\n                    // keep track of last reducedSpId\n                    $lastReducedSpId = $reducedSpId;\n\n                    // keep track of last spId\n                    $lastSpId = $spId;\n\n                    $spContainer->setOPT(0x007F, 0x01040104); // Protection -> fLockAgainstGrouping\n                    $spContainer->setOPT(0x00BF, 0x00080008); // Text -> fFitTextToShape\n                    $spContainer->setOPT(0x01BF, 0x00010000); // Fill Style -> fNoFillHitTest\n                    $spContainer->setOPT(0x01FF, 0x00080000); // Line Style -> fNoLineDrawDash\n                    $spContainer->setOPT(0x03BF, 0x000A0000); // Group Shape -> fPrint\n\n                    // set coordinates and offsets, client anchor\n                    $endCoordinates = Coordinate::stringFromColumnIndex($iInc);\n                    $endCoordinates .= $rangeBounds[0][1] + 1;\n\n                    $spContainer->setStartCoordinates($cDrawing);\n                    $spContainer->setStartOffsetX(0);\n                    $spContainer->setStartOffsetY(0);\n                    $spContainer->setEndCoordinates($endCoordinates);\n                    $spContainer->setEndOffsetX(0);\n                    $spContainer->setEndOffsetY(0);\n\n                    $spgrContainer->addChild($spContainer);\n                    ++$iInc;\n                }\n            }\n\n            // identifier clusters, used for workbook Escher object\n            $this->IDCLs[$dgId] = $lastReducedSpId;\n\n            // set last shape index\n            $dgContainer->setLastSpId($lastSpId);\n\n            // set the Escher object\n            $this->writerWorksheets[$sheetIndex]->setEscher($escher);\n        }\n    }\n\n    private function processMemoryDrawing(BstoreContainer &$bstoreContainer, MemoryDrawing $drawing, string $renderingFunctionx): void\n    {\n        switch ($renderingFunctionx) {\n            case MemoryDrawing::RENDERING_JPEG:\n                $blipType = BSE::BLIPTYPE_JPEG;\n                $renderingFunction = 'imagejpeg';\n\n                break;\n            default:\n                $blipType = BSE::BLIPTYPE_PNG;\n                $renderingFunction = 'imagepng';\n\n                break;\n        }\n\n        ob_start();\n        call_user_func($renderingFunction, $drawing->getImageResource()); // @phpstan-ignore-line\n        $blipData = ob_get_contents();\n        ob_end_clean();\n\n        $blip = new Blip();\n        $blip->setData(\"$blipData\");\n\n        $BSE = new BSE();\n        $BSE->setBlipType($blipType);\n        $BSE->setBlip($blip);\n\n        $bstoreContainer->addBSE($BSE);\n    }\n\n    private static int $two = 2; // phpstan silliness\n\n    private function processDrawing(BstoreContainer &$bstoreContainer, Drawing $drawing): void\n    {\n        $blipType = 0;\n        $blipData = '';\n        $filename = $drawing->getPath();\n\n        $imageSize = getimagesize($filename);\n        $imageFormat = empty($imageSize) ? 0 : ($imageSize[self::$two] ?? 0);\n\n        switch ($imageFormat) {\n            case 1: // GIF, not supported by BIFF8, we convert to PNG\n                $blipType = BSE::BLIPTYPE_PNG;\n                $newImage = @imagecreatefromgif($filename);\n                if ($newImage === false) {\n                    throw new Exception(\"Unable to create image from $filename\");\n                }\n                ob_start();\n                imagepng($newImage);\n                $blipData = ob_get_contents();\n                ob_end_clean();\n\n                break;\n            case 2: // JPEG\n                $blipType = BSE::BLIPTYPE_JPEG;\n                $blipData = file_get_contents($filename);\n\n                break;\n            case 3: // PNG\n                $blipType = BSE::BLIPTYPE_PNG;\n                $blipData = file_get_contents($filename);\n\n                break;\n            case 6: // Windows DIB (BMP), we convert to PNG\n                $blipType = BSE::BLIPTYPE_PNG;\n                $newImage = @imagecreatefrombmp($filename);\n                if ($newImage === false) {\n                    throw new Exception(\"Unable to create image from $filename\");\n                }\n                ob_start();\n                imagepng($newImage);\n                $blipData = ob_get_contents();\n                ob_end_clean();\n\n                break;\n        }\n        if ($blipData) {\n            $blip = new Blip();\n            $blip->setData($blipData);\n\n            $BSE = new BSE();\n            $BSE->setBlipType($blipType);\n            $BSE->setBlip($blip);\n\n            $bstoreContainer->addBSE($BSE);\n        }\n    }\n\n    private function processBaseDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing): void\n    {\n        if ($drawing instanceof Drawing && $drawing->getPath() !== '') {\n            $this->processDrawing($bstoreContainer, $drawing);\n        } elseif ($drawing instanceof MemoryDrawing) {\n            $this->processMemoryDrawing($bstoreContainer, $drawing, $drawing->getRenderingFunction());\n        }\n    }\n\n    private function checkForDrawings(): bool\n    {\n        // any drawings in this workbook?\n        $found = false;\n        foreach ($this->spreadsheet->getAllSheets() as $sheet) {\n            if (count($sheet->getDrawingCollection()) > 0) {\n                $found = true;\n\n                break;\n            }\n        }\n\n        return $found;\n    }\n\n    /**\n     * Build the Escher object corresponding to the MSODRAWINGGROUP record.\n     */\n    private function buildWorkbookEscher(): void\n    {\n        // nothing to do if there are no drawings\n        if (!$this->checkForDrawings()) {\n            return;\n        }\n\n        // if we reach here, then there are drawings in the workbook\n        $escher = new Escher();\n\n        // dggContainer\n        $dggContainer = new DggContainer();\n        $escher->setDggContainer($dggContainer);\n\n        // set IDCLs (identifier clusters)\n        $dggContainer->setIDCLs($this->IDCLs);\n\n        // this loop is for determining maximum shape identifier of all drawing\n        $spIdMax = 0;\n        $totalCountShapes = 0;\n        $countDrawings = 0;\n\n        foreach ($this->spreadsheet->getAllsheets() as $sheet) {\n            $sheetCountShapes = 0; // count number of shapes (minus group shape), in sheet\n\n            $addCount = 0;\n            foreach ($sheet->getDrawingCollection() as $drawing) {\n                $addCount = 1;\n                ++$sheetCountShapes;\n                ++$totalCountShapes;\n\n                $spId = $sheetCountShapes | ($this->spreadsheet->getIndex($sheet) + 1) << 10;\n                $spIdMax = max($spId, $spIdMax);\n            }\n            $countDrawings += $addCount;\n        }\n\n        $dggContainer->setSpIdMax($spIdMax + 1);\n        $dggContainer->setCDgSaved($countDrawings);\n        $dggContainer->setCSpSaved($totalCountShapes + $countDrawings); // total number of shapes incl. one group shapes per drawing\n\n        // bstoreContainer\n        $bstoreContainer = new BstoreContainer();\n        $dggContainer->setBstoreContainer($bstoreContainer);\n\n        // the BSE's (all the images)\n        foreach ($this->spreadsheet->getAllsheets() as $sheet) {\n            foreach ($sheet->getDrawingCollection() as $drawing) {\n                $this->processBaseDrawing($bstoreContainer, $drawing);\n            }\n        }\n\n        // Set the Escher object\n        $this->writerWorkbook->setEscher($escher);\n    }\n\n    /**\n     * Build the OLE Part for DocumentSummary Information.\n     */\n    private function writeDocumentSummaryInformation(): string\n    {\n        // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark)\n        $data = pack('v', 0xFFFE);\n        // offset: 2; size: 2;\n        $data .= pack('v', 0x0000);\n        // offset: 4; size: 2; OS version\n        $data .= pack('v', 0x0106);\n        // offset: 6; size: 2; OS indicator\n        $data .= pack('v', 0x0002);\n        // offset: 8; size: 16\n        $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00);\n        // offset: 24; size: 4; section count\n        $data .= pack('V', 0x0001);\n\n        // offset: 28; size: 16; first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae\n        $data .= pack('vvvvvvvv', 0xD502, 0xD5CD, 0x2E9C, 0x101B, 0x9793, 0x0008, 0x2C2B, 0xAEF9);\n        // offset: 44; size: 4; offset of the start\n        $data .= pack('V', 0x30);\n\n        // SECTION\n        $dataSection = [];\n        $dataSection_NumProps = 0;\n        $dataSection_Summary = '';\n        $dataSection_Content = '';\n\n        // GKPIDDSI_CODEPAGE: CodePage\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x01],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x02], // 2 byte signed integer\n            'data' => ['data' => 1252],\n        ];\n        ++$dataSection_NumProps;\n\n        // GKPIDDSI_CATEGORY : Category\n        $dataProp = $this->spreadsheet->getProperties()->getCategory();\n        if ($dataProp) {\n            $dataSection[] = [\n                'summary' => ['pack' => 'V', 'data' => 0x02],\n                'offset' => ['pack' => 'V'],\n                'type' => ['pack' => 'V', 'data' => 0x1E],\n                'data' => ['data' => $dataProp, 'length' => strlen($dataProp)],\n            ];\n            ++$dataSection_NumProps;\n        }\n        // GKPIDDSI_VERSION :Version of the application that wrote the property storage\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x17],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x03],\n            'data' => ['pack' => 'V', 'data' => 0x000C0000],\n        ];\n        ++$dataSection_NumProps;\n        // GKPIDDSI_SCALE : FALSE\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x0B],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x0B],\n            'data' => ['data' => false],\n        ];\n        ++$dataSection_NumProps;\n        // GKPIDDSI_LINKSDIRTY : True if any of the values for the linked properties have changed outside of the application\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x10],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x0B],\n            'data' => ['data' => false],\n        ];\n        ++$dataSection_NumProps;\n        // GKPIDDSI_SHAREDOC : FALSE\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x13],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x0B],\n            'data' => ['data' => false],\n        ];\n        ++$dataSection_NumProps;\n        // GKPIDDSI_HYPERLINKSCHANGED : True if any of the values for the _PID_LINKS (hyperlink text) have changed outside of the application\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x16],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x0B],\n            'data' => ['data' => false],\n        ];\n        ++$dataSection_NumProps;\n\n        // GKPIDDSI_DOCSPARTS\n        // MS-OSHARED p75 (2.3.3.2.2.1)\n        // Structure is VtVecUnalignedLpstrValue (2.3.3.1.9)\n        // cElements\n        $dataProp = pack('v', 0x0001);\n        $dataProp .= pack('v', 0x0000);\n        // array of UnalignedLpstr\n        // cch\n        $dataProp .= pack('v', 0x000A);\n        $dataProp .= pack('v', 0x0000);\n        // value\n        $dataProp .= 'Worksheet' . chr(0);\n\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x0D],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x101E],\n            'data' => ['data' => $dataProp, 'length' => strlen($dataProp)],\n        ];\n        ++$dataSection_NumProps;\n\n        // GKPIDDSI_HEADINGPAIR\n        // VtVecHeadingPairValue\n        // cElements\n        $dataProp = pack('v', 0x0002);\n        $dataProp .= pack('v', 0x0000);\n        // Array of vtHeadingPair\n        // vtUnalignedString - headingString\n        // stringType\n        $dataProp .= pack('v', 0x001E);\n        // padding\n        $dataProp .= pack('v', 0x0000);\n        // UnalignedLpstr\n        // cch\n        $dataProp .= pack('v', 0x0013);\n        $dataProp .= pack('v', 0x0000);\n        // value\n        $dataProp .= 'Feuilles de calcul';\n        // vtUnalignedString - headingParts\n        // wType : 0x0003 = 32-bit signed integer\n        $dataProp .= pack('v', 0x0300);\n        // padding\n        $dataProp .= pack('v', 0x0000);\n        // value\n        $dataProp .= pack('v', 0x0100);\n        $dataProp .= pack('v', 0x0000);\n        $dataProp .= pack('v', 0x0000);\n        $dataProp .= pack('v', 0x0000);\n\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x0C],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x100C],\n            'data' => ['data' => $dataProp, 'length' => strlen($dataProp)],\n        ];\n        ++$dataSection_NumProps;\n\n        //         4     Section Length\n        //        4     Property count\n        //        8 * $dataSection_NumProps (8 =  ID (4) + OffSet(4))\n        $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8;\n        foreach ($dataSection as $dataProp) {\n            // Summary\n            $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']);\n            // Offset\n            $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset);\n            // DataType\n            $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']);\n            // Data\n            if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer\n                $dataSection_Content .= pack('V', $dataProp['data']['data']);\n\n                $dataSection_Content_Offset += 4 + 4;\n            } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer\n                $dataSection_Content .= pack('V', $dataProp['data']['data']);\n\n                $dataSection_Content_Offset += 4 + 4;\n            } elseif ($dataProp['type']['data'] == 0x0B) { // Boolean\n                $dataSection_Content .= pack('V', (int) $dataProp['data']['data']);\n                $dataSection_Content_Offset += 4 + 4;\n            } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length\n                // Null-terminated string\n                $dataProp['data']['data'] .= chr(0);\n                ++$dataProp['data']['length'];\n                // Complete the string with null string for being a %4\n                $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4));\n                $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT);\n\n                $dataSection_Content .= pack('V', $dataProp['data']['length']);\n                $dataSection_Content .= $dataProp['data']['data'];\n\n                $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']);\n            } else {\n                $dataSection_Content .= $dataProp['data']['data'];\n\n                $dataSection_Content_Offset += 4 + $dataProp['data']['length'];\n            }\n        }\n        // Now $dataSection_Content_Offset contains the size of the content\n\n        // section header\n        // offset: $secOffset; size: 4; section length\n        //         + x  Size of the content (summary + content)\n        $data .= pack('V', $dataSection_Content_Offset);\n        // offset: $secOffset+4; size: 4; property count\n        $data .= pack('V', $dataSection_NumProps);\n        // Section Summary\n        $data .= $dataSection_Summary;\n        // Section Content\n        $data .= $dataSection_Content;\n\n        return $data;\n    }\n\n    /** @param array<int, array{summary: array{pack: string, data: mixed}, offset: array{pack: string}, type: array{pack: string, data: int}, data: array{data: mixed}}> $dataSection */\n    private function writeSummaryPropOle(float|int $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void\n    {\n        if ($dataProp) {\n            $dataSection[] = [\n                'summary' => ['pack' => 'V', 'data' => $sumdata],\n                'offset' => ['pack' => 'V'],\n                'type' => ['pack' => 'V', 'data' => $typdata], // null-terminated string prepended by dword string length\n                'data' => ['data' => OLE::localDateToOLE($dataProp)],\n            ];\n            ++$dataSection_NumProps;\n        }\n    }\n\n    /** @param array<int, array{summary: array{pack: string, data: mixed}, offset: array{pack: string}, type: array{pack: string, data: int}, data: array{data: mixed}}> $dataSection */\n    private function writeSummaryProp(string $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void\n    {\n        if ($dataProp) {\n            $dataSection[] = [\n                'summary' => ['pack' => 'V', 'data' => $sumdata],\n                'offset' => ['pack' => 'V'],\n                'type' => ['pack' => 'V', 'data' => $typdata], // null-terminated string prepended by dword string length\n                'data' => ['data' => $dataProp, 'length' => strlen($dataProp)],\n            ];\n            ++$dataSection_NumProps;\n        }\n    }\n\n    /**\n     * Build the OLE Part for Summary Information.\n     */\n    private function writeSummaryInformation(): string\n    {\n        // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark)\n        $data = pack('v', 0xFFFE);\n        // offset: 2; size: 2;\n        $data .= pack('v', 0x0000);\n        // offset: 4; size: 2; OS version\n        $data .= pack('v', 0x0106);\n        // offset: 6; size: 2; OS indicator\n        $data .= pack('v', 0x0002);\n        // offset: 8; size: 16\n        $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00);\n        // offset: 24; size: 4; section count\n        $data .= pack('V', 0x0001);\n\n        // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9\n        $data .= pack('vvvvvvvv', 0x85E0, 0xF29F, 0x4FF9, 0x1068, 0x91AB, 0x0008, 0x272B, 0xD9B3);\n        // offset: 44; size: 4; offset of the start\n        $data .= pack('V', 0x30);\n\n        // SECTION\n        $dataSection = [];\n        $dataSection_NumProps = 0;\n        $dataSection_Summary = '';\n        $dataSection_Content = '';\n\n        // CodePage : CP-1252\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x01],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x02], // 2 byte signed integer\n            'data' => ['data' => 1252],\n        ];\n        ++$dataSection_NumProps;\n\n        $props = $this->spreadsheet->getProperties();\n        $this->writeSummaryProp($props->getTitle(), $dataSection_NumProps, $dataSection, 0x02, 0x1E);\n        $this->writeSummaryProp($props->getSubject(), $dataSection_NumProps, $dataSection, 0x03, 0x1E);\n        $this->writeSummaryProp($props->getCreator(), $dataSection_NumProps, $dataSection, 0x04, 0x1E);\n        $this->writeSummaryProp($props->getKeywords(), $dataSection_NumProps, $dataSection, 0x05, 0x1E);\n        $this->writeSummaryProp($props->getDescription(), $dataSection_NumProps, $dataSection, 0x06, 0x1E);\n        $this->writeSummaryProp($props->getLastModifiedBy(), $dataSection_NumProps, $dataSection, 0x08, 0x1E);\n        $this->writeSummaryPropOle($props->getCreated(), $dataSection_NumProps, $dataSection, 0x0C, 0x40);\n        $this->writeSummaryPropOle($props->getModified(), $dataSection_NumProps, $dataSection, 0x0D, 0x40);\n\n        //    Security\n        $dataSection[] = [\n            'summary' => ['pack' => 'V', 'data' => 0x13],\n            'offset' => ['pack' => 'V'],\n            'type' => ['pack' => 'V', 'data' => 0x03], // 4 byte signed integer\n            'data' => ['data' => 0x00],\n        ];\n        ++$dataSection_NumProps;\n\n        //         4     Section Length\n        //        4     Property count\n        //        8 * $dataSection_NumProps (8 =  ID (4) + OffSet(4))\n        $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8;\n        foreach ($dataSection as $dataProp) {\n            /** @var array{data: array{data: string, length: int}, summary: array{pack: string, data: string}, offset: array{pack: string}, type: array{data: int, pack: string}} $dataProp */\n            // Summary\n            $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']);\n            // Offset\n            $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset);\n            // DataType\n            $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']);\n            // Data\n            if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer\n                $dataSection_Content .= pack('V', $dataProp['data']['data']);\n\n                $dataSection_Content_Offset += 4 + 4;\n            } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer\n                $dataSection_Content .= pack('V', $dataProp['data']['data']);\n\n                $dataSection_Content_Offset += 4 + 4;\n            } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length\n                // Null-terminated string\n                $dataProp['data']['data'] .= chr(0);\n                ++$dataProp['data']['length'];\n                // Complete the string with null string for being a %4\n                $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4));\n                $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT);\n\n                $dataSection_Content .= pack('V', $dataProp['data']['length']);\n                $dataSection_Content .= $dataProp['data']['data'];\n\n                $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']);\n            } elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)\n                $dataSection_Content .= $dataProp['data']['data'];\n\n                $dataSection_Content_Offset += 4 + 8;\n            }\n            // Data Type Not Used at the moment\n        }\n        // Now $dataSection_Content_Offset contains the size of the content\n\n        // section header\n        // offset: $secOffset; size: 4; section length\n        //         + x  Size of the content (summary + content)\n        $data .= pack('V', $dataSection_Content_Offset);\n        // offset: $secOffset+4; size: 4; property count\n        $data .= pack('V', $dataSection_NumProps);\n        // Section Summary\n        $data .= $dataSection_Summary;\n        // Section Content\n        $data .= $dataSection_Content;\n\n        return $data;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/AutoFilter.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet as ActualWorksheet;\n\nclass AutoFilter extends WriterPart\n{\n    /**\n     * Write AutoFilter.\n     */\n    public static function writeAutoFilter(XMLWriter $objWriter, ActualWorksheet $worksheet): void\n    {\n        $autoFilterRange = $worksheet->getAutoFilter()->getRange();\n        if (!empty($autoFilterRange)) {\n            // autoFilter\n            $objWriter->startElement('autoFilter');\n\n            // Strip any worksheet reference from the filter coordinates\n            $range = Coordinate::splitRange($autoFilterRange);\n            $range = $range[0];\n            //    Strip any worksheet ref\n            [, $range[0]] = ActualWorksheet::extractSheetTitle($range[0], true);\n            $range = implode(':', $range);\n\n            $objWriter->writeAttribute('ref', str_replace('$', '', $range));\n\n            $columns = $worksheet->getAutoFilter()->getColumns();\n            if (count($columns) > 0) {\n                foreach ($columns as $columnID => $column) {\n                    $colId = $worksheet->getAutoFilter()->getColumnOffset($columnID);\n                    self::writeAutoFilterColumn($objWriter, $column, $colId);\n                }\n            }\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write AutoFilter's filterColumn.\n     */\n    public static function writeAutoFilterColumn(XMLWriter $objWriter, Column $column, int $colId): void\n    {\n        $rules = $column->getRules();\n        if (count($rules) > 0) {\n            $objWriter->startElement('filterColumn');\n            $objWriter->writeAttribute('colId', \"$colId\");\n\n            $objWriter->startElement($column->getFilterType());\n            if ($column->getJoin() == Column::AUTOFILTER_COLUMN_JOIN_AND) {\n                $objWriter->writeAttribute('and', '1');\n            }\n\n            foreach ($rules as $rule) {\n                self::writeAutoFilterColumnRule($column, $rule, $objWriter);\n            }\n\n            $objWriter->endElement();\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write AutoFilter's filterColumn Rule.\n     */\n    private static function writeAutoFilterColumnRule(Column $column, Rule $rule, XMLWriter $objWriter): void\n    {\n        if (\n            ($column->getFilterType() === Column::AUTOFILTER_FILTERTYPE_FILTER)\n            && ($rule->getOperator() === Rule::AUTOFILTER_COLUMN_RULE_EQUAL)\n            && ($rule->getValue() === '')\n        ) {\n            //    Filter rule for Blanks\n            $objWriter->writeAttribute('blank', '1');\n        } elseif ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER) {\n            //    Dynamic Filter Rule\n            $objWriter->writeAttribute('type', $rule->getGrouping());\n            $val = $column->getAttribute('val');\n            if ($val !== null) {\n                $objWriter->writeAttribute('val', \"$val\");\n            }\n            $maxVal = $column->getAttribute('maxVal');\n            if ($maxVal !== null) {\n                $objWriter->writeAttribute('maxVal', \"$maxVal\");\n            }\n        } elseif ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_TOPTENFILTER) {\n            //    Top 10 Filter Rule\n            $ruleValue = $rule->getValue();\n            if (!is_array($ruleValue)) {\n                $objWriter->writeAttribute('val', \"$ruleValue\");\n            }\n            $objWriter->writeAttribute('percent', (($rule->getOperator() === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) ? '1' : '0'));\n            $objWriter->writeAttribute('top', (($rule->getGrouping() === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) ? '1' : '0'));\n        } else {\n            //    Filter, DateGroupItem or CustomFilter\n            $objWriter->startElement($rule->getRuleType());\n\n            if ($rule->getOperator() !== Rule::AUTOFILTER_COLUMN_RULE_EQUAL) {\n                $objWriter->writeAttribute('operator', $rule->getOperator());\n            }\n            if ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_DATEGROUP) {\n                // Date Group filters\n                $ruleValue = $rule->getValue();\n                if (is_array($ruleValue)) {\n                    foreach ($ruleValue as $key => $value) {\n                        $objWriter->writeAttribute($key, \"$value\");\n                    }\n                }\n                $objWriter->writeAttribute('dateTimeGrouping', $rule->getGrouping());\n            } else {\n                $ruleValue = $rule->getValue();\n                if (!is_array($ruleValue)) {\n                    $objWriter->writeAttribute('val', \"$ruleValue\");\n                }\n            }\n\n            $objWriter->endElement();\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Chart.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart as SpreadsheetChart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\TrendLine;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\n\nclass Chart extends WriterPart\n{\n    private int $seriesIndex;\n\n    /**\n     * Write charts to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeChart(SpreadsheetChart $chart, bool $calculateCellValues = true): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n        //    Ensure that data series values are up-to-date before we save\n        if ($calculateCellValues) {\n            $chart->refresh();\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // c:chartSpace\n        $objWriter->startElement('c:chartSpace');\n        $objWriter->writeAttribute('xmlns:c', Namespaces::CHART);\n        $objWriter->writeAttribute('xmlns:a', Namespaces::DRAWINGML);\n        $objWriter->writeAttribute('xmlns:r', Namespaces::SCHEMA_OFFICE_DOCUMENT);\n\n        $objWriter->startElement('c:date1904');\n        $objWriter->writeAttribute('val', '0');\n        $objWriter->endElement();\n        $objWriter->startElement('c:lang');\n        $objWriter->writeAttribute('val', 'en-GB');\n        $objWriter->endElement();\n        $objWriter->startElement('c:roundedCorners');\n        $objWriter->writeAttribute('val', $chart->getRoundedCorners() ? '1' : '0');\n        $objWriter->endElement();\n\n        $this->writeAlternateContent($objWriter);\n\n        $objWriter->startElement('c:chart');\n\n        $this->writeTitle($objWriter, $chart->getTitle());\n\n        $objWriter->startElement('c:autoTitleDeleted');\n        $objWriter->writeAttribute('val', (string) (int) $chart->getAutoTitleDeleted());\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:view3D');\n        $surface2D = false;\n        $plotArea = $chart->getPlotArea();\n        if ($plotArea !== null) {\n            $seriesArray = $plotArea->getPlotGroup();\n            foreach ($seriesArray as $series) {\n                if ($series->getPlotType() === DataSeries::TYPE_SURFACECHART) {\n                    $surface2D = true;\n\n                    break;\n                }\n            }\n        }\n        $this->writeView3D($objWriter, $chart->getRotX(), 'c:rotX', $surface2D, 90);\n        $this->writeView3D($objWriter, $chart->getRotY(), 'c:rotY', $surface2D);\n        $this->writeView3D($objWriter, $chart->getRAngAx(), 'c:rAngAx', $surface2D);\n        $this->writeView3D($objWriter, $chart->getPerspective(), 'c:perspective', $surface2D);\n        $objWriter->endElement(); // view3D\n\n        $this->writePlotArea($objWriter, $chart->getPlotArea(), $chart->getXAxisLabel(), $chart->getYAxisLabel(), $chart->getChartAxisX(), $chart->getChartAxisY());\n\n        $this->writeLegend($objWriter, $chart->getLegend());\n\n        $objWriter->startElement('c:plotVisOnly');\n        $objWriter->writeAttribute('val', (string) (int) $chart->getPlotVisibleOnly());\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:dispBlanksAs');\n        $objWriter->writeAttribute('val', $chart->getDisplayBlanksAs());\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:showDLblsOverMax');\n        $objWriter->writeAttribute('val', '0');\n        $objWriter->endElement();\n\n        $objWriter->endElement(); // c:chart\n\n        $objWriter->startElement('c:spPr');\n        if ($chart->getNoFill()) {\n            $objWriter->startElement('a:noFill');\n            $objWriter->endElement(); // a:noFill\n        }\n        $fillColor = $chart->getFillColor();\n        if ($fillColor->isUsable()) {\n            $this->writeColor($objWriter, $fillColor);\n        }\n        $borderLines = $chart->getBorderLines();\n        $this->writeLineStyles($objWriter, $borderLines, $chart->getNoBorder());\n        $this->writeEffects($objWriter, $borderLines);\n        $objWriter->endElement(); // c:spPr\n\n        $this->writePrintSettings($objWriter);\n\n        $objWriter->endElement(); // c:chartSpace\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    private function writeView3D(XMLWriter $objWriter, ?int $value, string $tag, bool $surface2D, int $default = 0): void\n    {\n        if ($value === null && $surface2D) {\n            $value = $default;\n        }\n        if ($value !== null) {\n            $objWriter->startElement($tag);\n            $objWriter->writeAttribute('val', \"$value\");\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write Chart Title.\n     */\n    private function writeTitle(XMLWriter $objWriter, ?Title $title = null): void\n    {\n        if ($title === null) {\n            return;\n        }\n        if ($this->writeCalculatedTitle($objWriter, $title)) {\n            return;\n        }\n\n        $objWriter->startElement('c:title');\n        $caption = $title->getCaption();\n        $objWriter->startElement('c:tx');\n        $objWriter->startElement('c:rich');\n\n        $objWriter->startElement('a:bodyPr');\n        $objWriter->endElement(); // a:bodyPr\n\n        $objWriter->startElement('a:lstStyle');\n        $objWriter->endElement(); // a:lstStyle\n\n        $objWriter->startElement('a:p');\n        $objWriter->startElement('a:pPr');\n        $objWriter->startElement('a:defRPr');\n        $objWriter->endElement(); // a:defRPr\n        $objWriter->endElement(); // a:pPr\n\n        if (is_array($caption)) {\n            $caption = $caption[0] ?? '';\n        }\n        $this->getParentWriter()->getWriterPartstringtable()->writeRichTextForCharts($objWriter, $caption, 'a');\n\n        $objWriter->endElement(); // a:p\n        $objWriter->endElement(); // c:rich\n        $objWriter->endElement(); // c:tx\n\n        $this->writeLayout($objWriter, $title->getLayout());\n\n        $objWriter->startElement('c:overlay');\n        $objWriter->writeAttribute('val', ($title->getOverlay()) ? '1' : '0');\n        $objWriter->endElement(); // c:overlay\n\n        $objWriter->endElement(); // c:title\n    }\n\n    /**\n     * Write Calculated Chart Title.\n     */\n    private function writeCalculatedTitle(XMLWriter $objWriter, Title $title): bool\n    {\n        $calc = $title->getCalculatedTitle($this->getParentWriter()->getSpreadsheet());\n        if (empty($calc)) {\n            return false;\n        }\n\n        $objWriter->startElement('c:title');\n        $objWriter->startElement('c:tx');\n        $objWriter->startElement('c:strRef');\n        $objWriter->writeElement('c:f', $title->getCellReference());\n        $objWriter->startElement('c:strCache');\n\n        $objWriter->startElement('c:ptCount');\n        $objWriter->writeAttribute('val', '1');\n        $objWriter->endElement(); // c:ptCount\n        $objWriter->startElement('c:pt');\n        $objWriter->writeAttribute('idx', '0');\n        $objWriter->writeElement('c:v', $calc);\n        $objWriter->endElement(); // c:pt\n\n        $objWriter->endElement(); // c:strCache\n        $objWriter->endElement(); // c:strRef\n        $objWriter->endElement(); // c:tx\n\n        $this->writeLayout($objWriter, $title->getLayout());\n\n        $objWriter->startElement('c:overlay');\n        $objWriter->writeAttribute('val', ($title->getOverlay()) ? '1' : '0');\n        $objWriter->endElement(); // c:overlay\n        // c:spPr\n\n        // c:txPr\n        $labelFont = $title->getFont();\n        if ($labelFont !== null) {\n            $objWriter->startElement('c:txPr');\n\n            $objWriter->startElement('a:bodyPr');\n            $objWriter->endElement(); // a:bodyPr\n            $objWriter->startElement('a:lstStyle');\n            $objWriter->endElement(); // a:lstStyle\n            $this->writeLabelFont($objWriter, $labelFont, null);\n\n            $objWriter->endElement(); // c:txPr\n        }\n\n        $objWriter->endElement(); // c:title\n\n        return true;\n    }\n\n    /**\n     * Write Chart Legend.\n     */\n    private function writeLegend(XMLWriter $objWriter, ?Legend $legend = null): void\n    {\n        if ($legend === null) {\n            return;\n        }\n\n        $objWriter->startElement('c:legend');\n\n        $objWriter->startElement('c:legendPos');\n        $objWriter->writeAttribute('val', $legend->getPosition());\n        $objWriter->endElement();\n\n        $this->writeLayout($objWriter, $legend->getLayout());\n\n        $objWriter->startElement('c:overlay');\n        $objWriter->writeAttribute('val', ($legend->getOverlay()) ? '1' : '0');\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:spPr');\n        $fillColor = $legend->getFillColor();\n        if ($fillColor->isUsable()) {\n            $this->writeColor($objWriter, $fillColor);\n        }\n        $borderLines = $legend->getBorderLines();\n        $this->writeLineStyles($objWriter, $borderLines);\n        $this->writeEffects($objWriter, $borderLines);\n        $objWriter->endElement(); // c:spPr\n\n        $legendText = $legend->getLegendText();\n        $objWriter->startElement('c:txPr');\n        $objWriter->startElement('a:bodyPr');\n        $objWriter->endElement();\n\n        $objWriter->startElement('a:lstStyle');\n        $objWriter->endElement();\n\n        $objWriter->startElement('a:p');\n        $objWriter->startElement('a:pPr');\n        $objWriter->writeAttribute('rtl', '0');\n\n        $objWriter->startElement('a:defRPr');\n        if ($legendText !== null) {\n            $this->writeColor($objWriter, $legendText->getFillColorObject());\n            $this->writeEffects($objWriter, $legendText);\n        }\n        $objWriter->endElement(); // a:defRpr\n        $objWriter->endElement(); // a:pPr\n\n        $objWriter->startElement('a:endParaRPr');\n        $objWriter->writeAttribute('lang', 'en-US');\n        $objWriter->endElement(); // a:endParaRPr\n\n        $objWriter->endElement(); // a:p\n        $objWriter->endElement(); // c:txPr\n\n        $objWriter->endElement(); // c:legend\n    }\n\n    /**\n     * Write Chart Plot Area.\n     */\n    private function writePlotArea(XMLWriter $objWriter, ?PlotArea $plotArea, ?Title $xAxisLabel = null, ?Title $yAxisLabel = null, ?Axis $xAxis = null, ?Axis $yAxis = null): void\n    {\n        if ($plotArea === null) {\n            return;\n        }\n\n        $id1 = $id2 = $id3 = '0';\n        $this->seriesIndex = 0;\n        $objWriter->startElement('c:plotArea');\n\n        $layout = $plotArea->getLayout();\n\n        $this->writeLayout($objWriter, $layout);\n\n        $chartTypes = self::getChartType($plotArea);\n        $catIsMultiLevelSeries = $valIsMultiLevelSeries = false;\n        $plotGroupingType = '';\n        $chartType = null;\n        foreach ($chartTypes as $chartType) {\n            $objWriter->startElement('c:' . $chartType);\n\n            $groupCount = $plotArea->getPlotGroupCount();\n            $plotGroup = null;\n            for ($i = 0; $i < $groupCount; ++$i) {\n                $plotGroup = $plotArea->getPlotGroupByIndex($i);\n                $groupType = $plotGroup->getPlotType();\n                if ($groupType == $chartType) {\n                    $plotStyle = $plotGroup->getPlotStyle();\n                    if (!empty($plotStyle) && $groupType === DataSeries::TYPE_RADARCHART) {\n                        $objWriter->startElement('c:radarStyle');\n                        $objWriter->writeAttribute('val', $plotStyle);\n                        $objWriter->endElement();\n                    } elseif (!empty($plotStyle) && $groupType === DataSeries::TYPE_SCATTERCHART) {\n                        $objWriter->startElement('c:scatterStyle');\n                        $objWriter->writeAttribute('val', $plotStyle);\n                        $objWriter->endElement();\n                    } elseif ($groupType === DataSeries::TYPE_SURFACECHART_3D || $groupType === DataSeries::TYPE_SURFACECHART) {\n                        $objWriter->startElement('c:wireframe');\n                        $objWriter->writeAttribute('val', $plotStyle ? '1' : '0');\n                        $objWriter->endElement();\n                    }\n\n                    $this->writePlotGroup($plotGroup, $chartType, $objWriter, $catIsMultiLevelSeries, $valIsMultiLevelSeries, $plotGroupingType);\n                }\n            }\n\n            $this->writeDataLabels($objWriter, $layout);\n\n            if ($chartType === DataSeries::TYPE_LINECHART && $plotGroup) {\n                //    Line only, Line3D can't be smoothed\n                $objWriter->startElement('c:smooth');\n                $objWriter->writeAttribute('val', (string) (int) $plotGroup->getSmoothLine());\n                $objWriter->endElement();\n            } elseif (($chartType === DataSeries::TYPE_BARCHART) || ($chartType === DataSeries::TYPE_BARCHART_3D)) {\n                $objWriter->startElement('c:gapWidth');\n                $objWriter->writeAttribute('val', '150');\n                $objWriter->endElement();\n\n                if ($plotGroupingType == 'percentStacked' || $plotGroupingType == 'stacked') {\n                    $objWriter->startElement('c:overlap');\n                    $objWriter->writeAttribute('val', '100');\n                    $objWriter->endElement();\n                }\n            } elseif ($chartType === DataSeries::TYPE_BUBBLECHART) {\n                $scale = ($plotGroup === null) ? '' : (string) $plotGroup->getPlotStyle();\n                if ($scale !== '') {\n                    $objWriter->startElement('c:bubbleScale');\n                    $objWriter->writeAttribute('val', $scale);\n                    $objWriter->endElement();\n                }\n\n                $objWriter->startElement('c:showNegBubbles');\n                $objWriter->writeAttribute('val', '0');\n                $objWriter->endElement();\n            } elseif ($chartType === DataSeries::TYPE_STOCKCHART) {\n                $objWriter->startElement('c:hiLowLines');\n                $objWriter->endElement();\n\n                $gapWidth = $plotArea->getGapWidth();\n                $upBars = $plotArea->getUseUpBars();\n                $downBars = $plotArea->getUseDownBars();\n                if ($gapWidth !== null || $upBars || $downBars) {\n                    $objWriter->startElement('c:upDownBars');\n                    if ($gapWidth !== null) {\n                        $objWriter->startElement('c:gapWidth');\n                        $objWriter->writeAttribute('val', \"$gapWidth\");\n                        $objWriter->endElement();\n                    }\n                    if ($upBars) {\n                        $objWriter->startElement('c:upBars');\n                        $objWriter->endElement();\n                    }\n                    if ($downBars) {\n                        $objWriter->startElement('c:downBars');\n                        $objWriter->endElement();\n                    }\n                    $objWriter->endElement(); // c:upDownBars\n                }\n            }\n\n            //    Generate 3 unique numbers to use for axId values\n            $id1 = '110438656';\n            $id2 = '110444544';\n            $id3 = '110365312'; // used in Surface Chart\n\n            if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) {\n                $objWriter->startElement('c:axId');\n                $objWriter->writeAttribute('val', $id1);\n                $objWriter->endElement();\n                $objWriter->startElement('c:axId');\n                $objWriter->writeAttribute('val', $id2);\n                $objWriter->endElement();\n                if ($chartType === DataSeries::TYPE_SURFACECHART_3D || $chartType === DataSeries::TYPE_SURFACECHART) {\n                    $objWriter->startElement('c:axId');\n                    $objWriter->writeAttribute('val', $id3);\n                    $objWriter->endElement();\n                }\n            } else {\n                $objWriter->startElement('c:firstSliceAng');\n                $objWriter->writeAttribute('val', '0');\n                $objWriter->endElement();\n\n                if ($chartType === DataSeries::TYPE_DONUTCHART) {\n                    $objWriter->startElement('c:holeSize');\n                    $objWriter->writeAttribute('val', '50');\n                    $objWriter->endElement();\n                }\n            }\n\n            $objWriter->endElement();\n        }\n\n        if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) {\n            if ($chartType === DataSeries::TYPE_BUBBLECHART) {\n                $this->writeValueAxis($objWriter, $xAxisLabel, $chartType, $id2, $id1, $catIsMultiLevelSeries, $xAxis ?? new Axis());\n            } else {\n                $this->writeCategoryAxis($objWriter, $xAxisLabel, $id1, $id2, $catIsMultiLevelSeries, $xAxis ?? new Axis());\n            }\n\n            $this->writeValueAxis($objWriter, $yAxisLabel, $chartType, $id1, $id2, $valIsMultiLevelSeries, $yAxis ?? new Axis());\n            if ($chartType === DataSeries::TYPE_SURFACECHART_3D || $chartType === DataSeries::TYPE_SURFACECHART) {\n                $this->writeSerAxis($objWriter, $id2, $id3);\n            }\n        }\n        $stops = $plotArea->getGradientFillStops();\n        if ($plotArea->getNoFill() || !empty($stops)) {\n            $objWriter->startElement('c:spPr');\n            if ($plotArea->getNoFill()) {\n                $objWriter->startElement('a:noFill');\n                $objWriter->endElement(); // a:noFill\n            }\n            if (!empty($stops)) {\n                $objWriter->startElement('a:gradFill');\n                $objWriter->startElement('a:gsLst');\n                foreach ($stops as $stop) {\n                    $objWriter->startElement('a:gs');\n                    $objWriter->writeAttribute('pos', (string) (Properties::PERCENTAGE_MULTIPLIER * (float) $stop[0]));\n                    $this->writeColor($objWriter, $stop[1], false);\n                    $objWriter->endElement(); // a:gs\n                }\n                $objWriter->endElement(); // a:gsLst\n                $angle = $plotArea->getGradientFillAngle();\n                if ($angle !== null) {\n                    $objWriter->startElement('a:lin');\n                    $objWriter->writeAttribute('ang', Properties::angleToXml($angle));\n                    $objWriter->endElement(); // a:lin\n                }\n                $objWriter->endElement(); // a:gradFill\n            }\n            $objWriter->endElement(); // c:spPr\n        }\n\n        $objWriter->endElement(); // c:plotArea\n    }\n\n    private function writeDataLabelsBool(XMLWriter $objWriter, string $name, ?bool $value): void\n    {\n        if ($value !== null) {\n            $objWriter->startElement(\"c:$name\");\n            $objWriter->writeAttribute('val', $value ? '1' : '0');\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write Data Labels.\n     */\n    private function writeDataLabels(XMLWriter $objWriter, ?Layout $chartLayout = null): void\n    {\n        if (!isset($chartLayout)) {\n            return;\n        }\n        $objWriter->startElement('c:dLbls');\n\n        $fillColor = $chartLayout->getLabelFillColor();\n        $borderColor = $chartLayout->getLabelBorderColor();\n        if ($fillColor && $fillColor->isUsable()) {\n            $objWriter->startElement('c:spPr');\n            $this->writeColor($objWriter, $fillColor);\n            if ($borderColor && $borderColor->isUsable()) {\n                $objWriter->startElement('a:ln');\n                $this->writeColor($objWriter, $borderColor);\n                $objWriter->endElement(); // a:ln\n            }\n            $objWriter->endElement(); // c:spPr\n        }\n        $labelFont = $chartLayout->getLabelFont();\n        if ($labelFont !== null) {\n            $objWriter->startElement('c:txPr');\n\n            $objWriter->startElement('a:bodyPr');\n            $objWriter->writeAttribute('wrap', 'square');\n            $objWriter->writeAttribute('lIns', '38100');\n            $objWriter->writeAttribute('tIns', '19050');\n            $objWriter->writeAttribute('rIns', '38100');\n            $objWriter->writeAttribute('bIns', '19050');\n            $objWriter->writeAttribute('anchor', 'ctr');\n            $objWriter->startElement('a:spAutoFit');\n            $objWriter->endElement(); // a:spAutoFit\n            $objWriter->endElement(); // a:bodyPr\n\n            $objWriter->startElement('a:lstStyle');\n            $objWriter->endElement(); // a:lstStyle\n            $this->writeLabelFont($objWriter, $labelFont, $chartLayout->getLabelEffects());\n\n            $objWriter->endElement(); // c:txPr\n        }\n\n        if ($chartLayout->getNumFmtCode() !== '') {\n            $objWriter->startElement('c:numFmt');\n            $objWriter->writeAttribute('formatCode', $chartLayout->getnumFmtCode());\n            $objWriter->writeAttribute('sourceLinked', (string) (int) $chartLayout->getnumFmtLinked());\n            $objWriter->endElement(); // c:numFmt\n        }\n        if ($chartLayout->getDLblPos() !== '') {\n            $objWriter->startElement('c:dLblPos');\n            $objWriter->writeAttribute('val', $chartLayout->getDLblPos());\n            $objWriter->endElement(); // c:dLblPos\n        }\n        $this->writeDataLabelsBool($objWriter, 'showLegendKey', $chartLayout->getShowLegendKey());\n        $this->writeDataLabelsBool($objWriter, 'showVal', $chartLayout->getShowVal());\n        $this->writeDataLabelsBool($objWriter, 'showCatName', $chartLayout->getShowCatName());\n        $this->writeDataLabelsBool($objWriter, 'showSerName', $chartLayout->getShowSerName());\n        $this->writeDataLabelsBool($objWriter, 'showPercent', $chartLayout->getShowPercent());\n        $this->writeDataLabelsBool($objWriter, 'showBubbleSize', $chartLayout->getShowBubbleSize());\n        $this->writeDataLabelsBool($objWriter, 'showLeaderLines', $chartLayout->getShowLeaderLines());\n\n        $objWriter->endElement(); // c:dLbls\n    }\n\n    /**\n     * Write Category Axis.\n     */\n    private function writeCategoryAxis(XMLWriter $objWriter, ?Title $xAxisLabel, string $id1, string $id2, bool $isMultiLevelSeries, Axis $yAxis): void\n    {\n        // N.B. writeCategoryAxis may be invoked with the last parameter($yAxis) using $xAxis for ScatterChart, etc\n        // In that case, xAxis may contain values like the yAxis, or it may be a date axis (LINECHART).\n        $axisType = $yAxis->getAxisType();\n        if ($axisType !== '') {\n            $objWriter->startElement(\"c:$axisType\");\n        } elseif ($yAxis->getAxisIsNumericFormat()) {\n            $objWriter->startElement('c:' . Axis::AXIS_TYPE_VALUE);\n        } else {\n            $objWriter->startElement('c:' . Axis::AXIS_TYPE_CATEGORY);\n        }\n        $majorGridlines = $yAxis->getMajorGridlines();\n        $minorGridlines = $yAxis->getMinorGridlines();\n\n        if ($id1 !== '0') {\n            $objWriter->startElement('c:axId');\n            $objWriter->writeAttribute('val', $id1);\n            $objWriter->endElement();\n        }\n\n        $objWriter->startElement('c:scaling');\n        if (is_numeric($yAxis->getAxisOptionsProperty('logBase'))) {\n            $logBase = $yAxis->getAxisOptionsProperty('logBase') + 0;\n            if ($logBase >= 2 && $logBase <= 1000) {\n                $objWriter->startElement('c:logBase');\n                $objWriter->writeAttribute('val', (string) $logBase);\n                $objWriter->endElement();\n            }\n        }\n        if ($yAxis->getAxisOptionsProperty('maximum') !== null) {\n            $objWriter->startElement('c:max');\n            $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('maximum'));\n            $objWriter->endElement();\n        }\n        if ($yAxis->getAxisOptionsProperty('minimum') !== null) {\n            $objWriter->startElement('c:min');\n            $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('minimum'));\n            $objWriter->endElement();\n        }\n        if (!empty($yAxis->getAxisOptionsProperty('orientation'))) {\n            $objWriter->startElement('c:orientation');\n            $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('orientation'));\n            $objWriter->endElement();\n        }\n        $objWriter->endElement(); // c:scaling\n\n        $objWriter->startElement('c:delete');\n        $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('hidden') ?? '0');\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:axPos');\n        $objWriter->writeAttribute('val', 'b');\n        $objWriter->endElement();\n\n        if ($majorGridlines !== null) {\n            $objWriter->startElement('c:majorGridlines');\n            $objWriter->startElement('c:spPr');\n            $this->writeLineStyles($objWriter, $majorGridlines);\n            $this->writeEffects($objWriter, $majorGridlines);\n            $objWriter->endElement(); //end spPr\n            $objWriter->endElement(); //end majorGridLines\n        }\n\n        if ($minorGridlines !== null && $minorGridlines->getObjectState()) {\n            $objWriter->startElement('c:minorGridlines');\n            $objWriter->startElement('c:spPr');\n            $this->writeLineStyles($objWriter, $minorGridlines);\n            $this->writeEffects($objWriter, $minorGridlines);\n            $objWriter->endElement(); //end spPr\n            $objWriter->endElement(); //end minorGridLines\n        }\n\n        if ($xAxisLabel !== null) {\n            $objWriter->startElement('c:title');\n            $caption = $xAxisLabel->getCaption();\n            $objWriter->startElement('c:tx');\n            $objWriter->startElement('c:rich');\n\n            $objWriter->startElement('a:bodyPr');\n            $objWriter->endElement(); // a:bodyPr\n\n            $objWriter->startElement('a:lstStyle');\n            $objWriter->endElement(); // a::lstStyle\n\n            $objWriter->startElement('a:p');\n\n            if (is_array($caption)) {\n                $caption = $caption[0];\n            }\n            $this->getParentWriter()->getWriterPartstringtable()->writeRichTextForCharts($objWriter, $caption, 'a');\n\n            $objWriter->endElement(); // a:p\n            $objWriter->endElement(); // c:rich\n            $objWriter->endElement(); // c:tx\n\n            $layout = $xAxisLabel->getLayout();\n            $this->writeLayout($objWriter, $layout);\n\n            $objWriter->startElement('c:overlay');\n            $objWriter->writeAttribute('val', '0');\n            $objWriter->endElement(); // c:overlay\n\n            $objWriter->endElement(); // c:title\n        }\n\n        $objWriter->startElement('c:numFmt');\n        $objWriter->writeAttribute('formatCode', $yAxis->getAxisNumberFormat());\n        $objWriter->writeAttribute('sourceLinked', $yAxis->getAxisNumberSourceLinked());\n        $objWriter->endElement();\n\n        if (!empty($yAxis->getAxisOptionsProperty('major_tick_mark'))) {\n            $objWriter->startElement('c:majorTickMark');\n            $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('major_tick_mark'));\n            $objWriter->endElement();\n        }\n\n        if (!empty($yAxis->getAxisOptionsProperty('minor_tick_mark'))) {\n            $objWriter->startElement('c:minorTickMark');\n            $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('minor_tick_mark'));\n            $objWriter->endElement();\n        }\n\n        if (!empty($yAxis->getAxisOptionsProperty('axis_labels'))) {\n            $objWriter->startElement('c:tickLblPos');\n            $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('axis_labels'));\n            $objWriter->endElement();\n        }\n\n        $textRotation = $yAxis->getAxisOptionsProperty('textRotation');\n        $axisText = $yAxis->getAxisText();\n\n        if ($axisText !== null || is_numeric($textRotation)) {\n            $objWriter->startElement('c:txPr');\n            $objWriter->startElement('a:bodyPr');\n            if (is_numeric($textRotation)) {\n                $objWriter->writeAttribute('rot', Properties::angleToXml((float) $textRotation));\n            }\n            $objWriter->endElement(); // a:bodyPr\n            $objWriter->startElement('a:lstStyle');\n            $objWriter->endElement(); // a:lstStyle\n            $this->writeLabelFont($objWriter, ($axisText === null) ? null : $axisText->getFont(), $axisText);\n            $objWriter->endElement(); // c:txPr\n        }\n\n        $objWriter->startElement('c:spPr');\n        $this->writeColor($objWriter, $yAxis->getFillColorObject());\n        $this->writeLineStyles($objWriter, $yAxis, $yAxis->getNoFill());\n        $this->writeEffects($objWriter, $yAxis);\n        $objWriter->endElement(); // spPr\n\n        if ($yAxis->getAxisOptionsProperty('major_unit') !== null) {\n            $objWriter->startElement('c:majorUnit');\n            $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('major_unit'));\n            $objWriter->endElement();\n        }\n\n        if ($yAxis->getAxisOptionsProperty('minor_unit') !== null) {\n            $objWriter->startElement('c:minorUnit');\n            $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('minor_unit'));\n            $objWriter->endElement();\n        }\n\n        if ($id2 !== '0') {\n            $objWriter->startElement('c:crossAx');\n            $objWriter->writeAttribute('val', $id2);\n            $objWriter->endElement();\n\n            if (!empty($yAxis->getAxisOptionsProperty('horizontal_crosses'))) {\n                $objWriter->startElement('c:crosses');\n                $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('horizontal_crosses'));\n                $objWriter->endElement();\n            }\n        }\n\n        $objWriter->startElement('c:auto');\n        // LineChart with dateAx wants '0'\n        $objWriter->writeAttribute('val', ($axisType === Axis::AXIS_TYPE_DATE) ? '0' : '1');\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:lblAlgn');\n        $objWriter->writeAttribute('val', 'ctr');\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:lblOffset');\n        $objWriter->writeAttribute('val', '100');\n        $objWriter->endElement();\n\n        if ($axisType === Axis::AXIS_TYPE_DATE) {\n            $property = 'baseTimeUnit';\n            $propertyVal = $yAxis->getAxisOptionsProperty($property);\n            if (!empty($propertyVal)) {\n                $objWriter->startElement(\"c:$property\");\n                $objWriter->writeAttribute('val', $propertyVal);\n                $objWriter->endElement();\n            }\n            $property = 'majorTimeUnit';\n            $propertyVal = $yAxis->getAxisOptionsProperty($property);\n            if (!empty($propertyVal)) {\n                $objWriter->startElement(\"c:$property\");\n                $objWriter->writeAttribute('val', $propertyVal);\n                $objWriter->endElement();\n            }\n            $property = 'minorTimeUnit';\n            $propertyVal = $yAxis->getAxisOptionsProperty($property);\n            if (!empty($propertyVal)) {\n                $objWriter->startElement(\"c:$property\");\n                $objWriter->writeAttribute('val', $propertyVal);\n                $objWriter->endElement();\n            }\n        }\n\n        if ($isMultiLevelSeries) {\n            $objWriter->startElement('c:noMultiLvlLbl');\n            $objWriter->writeAttribute('val', '0');\n            $objWriter->endElement();\n        }\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Value Axis.\n     *\n     * @param null|string $groupType Chart type\n     */\n    private function writeValueAxis(XMLWriter $objWriter, ?Title $yAxisLabel, ?string $groupType, string $id1, string $id2, bool $isMultiLevelSeries, Axis $xAxis): void\n    {\n        $objWriter->startElement('c:' . Axis::AXIS_TYPE_VALUE);\n        $majorGridlines = $xAxis->getMajorGridlines();\n        $minorGridlines = $xAxis->getMinorGridlines();\n\n        if ($id2 !== '0') {\n            $objWriter->startElement('c:axId');\n            $objWriter->writeAttribute('val', $id2);\n            $objWriter->endElement();\n        }\n\n        $objWriter->startElement('c:scaling');\n        if (is_numeric($xAxis->getAxisOptionsProperty('logBase'))) {\n            $logBase = $xAxis->getAxisOptionsProperty('logBase') + 0;\n            if ($logBase >= 2 && $logBase <= 1000) {\n                $objWriter->startElement('c:logBase');\n                $objWriter->writeAttribute('val', (string) $logBase);\n                $objWriter->endElement();\n            }\n        }\n\n        if ($xAxis->getAxisOptionsProperty('maximum') !== null) {\n            $objWriter->startElement('c:max');\n            $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('maximum'));\n            $objWriter->endElement();\n        }\n\n        if ($xAxis->getAxisOptionsProperty('minimum') !== null) {\n            $objWriter->startElement('c:min');\n            $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minimum'));\n            $objWriter->endElement();\n        }\n\n        if (!empty($xAxis->getAxisOptionsProperty('orientation'))) {\n            $objWriter->startElement('c:orientation');\n            $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation'));\n            $objWriter->endElement();\n        }\n\n        $objWriter->endElement(); // c:scaling\n\n        $objWriter->startElement('c:delete');\n        $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('hidden') ?? '0');\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:axPos');\n        $objWriter->writeAttribute('val', 'l');\n        $objWriter->endElement();\n\n        if ($majorGridlines !== null) {\n            $objWriter->startElement('c:majorGridlines');\n            $objWriter->startElement('c:spPr');\n            $this->writeLineStyles($objWriter, $majorGridlines);\n            $this->writeEffects($objWriter, $majorGridlines);\n            $objWriter->endElement(); //end spPr\n            $objWriter->endElement(); //end majorGridLines\n        }\n\n        if ($minorGridlines !== null && $minorGridlines->getObjectState()) {\n            $objWriter->startElement('c:minorGridlines');\n            $objWriter->startElement('c:spPr');\n            $this->writeLineStyles($objWriter, $minorGridlines);\n            $this->writeEffects($objWriter, $minorGridlines);\n            $objWriter->endElement(); //end spPr\n            $objWriter->endElement(); //end minorGridLines\n        }\n\n        if ($yAxisLabel !== null) {\n            $objWriter->startElement('c:title');\n            $caption = $yAxisLabel->getCaption();\n            $objWriter->startElement('c:tx');\n            $objWriter->startElement('c:rich');\n\n            $objWriter->startElement('a:bodyPr');\n            $objWriter->endElement(); // a:bodyPr\n\n            $objWriter->startElement('a:lstStyle');\n            $objWriter->endElement(); // a:lstStyle\n\n            $objWriter->startElement('a:p');\n\n            if (is_array($caption)) {\n                $caption = $caption[0];\n            }\n            $this->getParentWriter()\n                ->getWriterPartstringtable()\n                ->writeRichTextForCharts($objWriter, $caption, 'a');\n\n            $objWriter->endElement(); // a:p\n            $objWriter->endElement(); // c:rich\n            $objWriter->endElement(); // c:tx\n\n            if ($groupType !== DataSeries::TYPE_BUBBLECHART) {\n                $layout = $yAxisLabel->getLayout();\n                $this->writeLayout($objWriter, $layout);\n            }\n\n            $objWriter->startElement('c:overlay');\n            $objWriter->writeAttribute('val', '0');\n            $objWriter->endElement(); // c:overlay\n\n            $objWriter->endElement(); // c:title\n        }\n\n        $objWriter->startElement('c:numFmt');\n        $objWriter->writeAttribute('formatCode', $xAxis->getAxisNumberFormat());\n        $objWriter->writeAttribute('sourceLinked', $xAxis->getAxisNumberSourceLinked());\n        $objWriter->endElement();\n\n        if (!empty($xAxis->getAxisOptionsProperty('major_tick_mark'))) {\n            $objWriter->startElement('c:majorTickMark');\n            $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_tick_mark'));\n            $objWriter->endElement();\n        }\n\n        if (!empty($xAxis->getAxisOptionsProperty('minor_tick_mark'))) {\n            $objWriter->startElement('c:minorTickMark');\n            $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_tick_mark'));\n            $objWriter->endElement();\n        }\n\n        if (!empty($xAxis->getAxisOptionsProperty('axis_labels'))) {\n            $objWriter->startElement('c:tickLblPos');\n            $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('axis_labels'));\n            $objWriter->endElement();\n        }\n\n        $textRotation = $xAxis->getAxisOptionsProperty('textRotation');\n        $axisText = $xAxis->getAxisText();\n\n        if ($axisText !== null || is_numeric($textRotation)) {\n            $objWriter->startElement('c:txPr');\n            $objWriter->startElement('a:bodyPr');\n            if (is_numeric($textRotation)) {\n                $objWriter->writeAttribute('rot', Properties::angleToXml((float) $textRotation));\n            }\n            $objWriter->endElement(); // a:bodyPr\n            $objWriter->startElement('a:lstStyle');\n            $objWriter->endElement(); // a:lstStyle\n\n            $this->writeLabelFont($objWriter, ($axisText === null) ? null : $axisText->getFont(), $axisText);\n\n            $objWriter->endElement(); // c:txPr\n        }\n\n        $objWriter->startElement('c:spPr');\n        $this->writeColor($objWriter, $xAxis->getFillColorObject());\n        $this->writeLineStyles($objWriter, $xAxis, $xAxis->getNoFill());\n        $this->writeEffects($objWriter, $xAxis);\n        $objWriter->endElement(); //end spPr\n\n        if ($id1 !== '0') {\n            $objWriter->startElement('c:crossAx');\n            $objWriter->writeAttribute('val', $id1);\n            $objWriter->endElement();\n\n            if ($xAxis->getAxisOptionsProperty('horizontal_crosses_value') !== null) {\n                $objWriter->startElement('c:crossesAt');\n                $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses_value'));\n                $objWriter->endElement();\n            } else {\n                $crosses = $xAxis->getAxisOptionsProperty('horizontal_crosses');\n                if ($crosses) {\n                    $objWriter->startElement('c:crosses');\n                    $objWriter->writeAttribute('val', $crosses);\n                    $objWriter->endElement();\n                }\n            }\n\n            $crossBetween = $xAxis->getCrossBetween();\n            if ($crossBetween !== '') {\n                $objWriter->startElement('c:crossBetween');\n                $objWriter->writeAttribute('val', $crossBetween);\n                $objWriter->endElement();\n            }\n\n            if ($xAxis->getAxisType() === Axis::AXIS_TYPE_VALUE) {\n                $dispUnits = $xAxis->getAxisOptionsProperty('dispUnitsBuiltIn');\n                $dispUnits = ($dispUnits == Axis::TRILLION_INDEX) ? Axis::DISP_UNITS_TRILLIONS : (is_numeric($dispUnits) ? (Axis::DISP_UNITS_BUILTIN_INT[(int) $dispUnits] ?? '') : $dispUnits);\n                if (in_array($dispUnits, Axis::DISP_UNITS_BUILTIN_INT, true)) {\n                    $objWriter->startElement('c:dispUnits');\n                    $objWriter->startElement('c:builtInUnit');\n                    $objWriter->writeAttribute('val', $dispUnits);\n                    $objWriter->endElement(); // c:builtInUnit\n                    if ($xAxis->getDispUnitsTitle() !== null) {\n                        // TODO output title elements\n                        $objWriter->writeElement('c:dispUnitsLbl');\n                    }\n                    $objWriter->endElement(); // c:dispUnits\n                }\n            }\n\n            if ($xAxis->getAxisOptionsProperty('major_unit') !== null) {\n                $objWriter->startElement('c:majorUnit');\n                $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_unit'));\n                $objWriter->endElement();\n            }\n\n            if ($xAxis->getAxisOptionsProperty('minor_unit') !== null) {\n                $objWriter->startElement('c:minorUnit');\n                $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_unit'));\n                $objWriter->endElement();\n            }\n        }\n\n        if ($isMultiLevelSeries) {\n            if ($groupType !== DataSeries::TYPE_BUBBLECHART) {\n                $objWriter->startElement('c:noMultiLvlLbl');\n                $objWriter->writeAttribute('val', '0');\n                $objWriter->endElement();\n            }\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Ser Axis, for Surface chart.\n     */\n    private function writeSerAxis(XMLWriter $objWriter, string $id2, string $id3): void\n    {\n        $objWriter->startElement('c:serAx');\n\n        $objWriter->startElement('c:axId');\n        $objWriter->writeAttribute('val', $id3);\n        $objWriter->endElement(); // axId\n\n        $objWriter->startElement('c:scaling');\n        $objWriter->startElement('c:orientation');\n        $objWriter->writeAttribute('val', 'minMax');\n        $objWriter->endElement(); // orientation\n        $objWriter->endElement(); // scaling\n\n        $objWriter->startElement('c:delete');\n        $objWriter->writeAttribute('val', '0');\n        $objWriter->endElement(); // delete\n\n        $objWriter->startElement('c:axPos');\n        $objWriter->writeAttribute('val', 'b');\n        $objWriter->endElement(); // axPos\n\n        $objWriter->startElement('c:majorTickMark');\n        $objWriter->writeAttribute('val', 'out');\n        $objWriter->endElement(); // majorTickMark\n\n        $objWriter->startElement('c:minorTickMark');\n        $objWriter->writeAttribute('val', 'none');\n        $objWriter->endElement(); // minorTickMark\n\n        $objWriter->startElement('c:tickLblPos');\n        $objWriter->writeAttribute('val', 'nextTo');\n        $objWriter->endElement(); // tickLblPos\n\n        $objWriter->startElement('c:crossAx');\n        $objWriter->writeAttribute('val', $id2);\n        $objWriter->endElement(); // crossAx\n\n        $objWriter->startElement('c:crosses');\n        $objWriter->writeAttribute('val', 'autoZero');\n        $objWriter->endElement(); // crosses\n\n        $objWriter->endElement(); //serAx\n    }\n\n    /**\n     * Get the data series type(s) for a chart plot series.\n     *\n     * @return string[]\n     */\n    private static function getChartType(PlotArea $plotArea): array\n    {\n        $groupCount = $plotArea->getPlotGroupCount();\n\n        if ($groupCount == 1) {\n            $plotType = $plotArea->getPlotGroupByIndex(0)->getPlotType();\n            $chartType = ($plotType === null) ? [] : [$plotType];\n        } else {\n            $chartTypes = [];\n            for ($i = 0; $i < $groupCount; ++$i) {\n                $plotType = $plotArea->getPlotGroupByIndex($i)->getPlotType();\n                if ($plotType !== null) {\n                    $chartTypes[] = $plotType;\n                }\n            }\n            $chartType = array_unique($chartTypes);\n        }\n        if (count($chartType) == 0) {\n            throw new WriterException('Chart is not yet implemented');\n        }\n\n        return $chartType;\n    }\n\n    /**\n     * Method writing plot series values.\n     */\n    private function writePlotSeriesValuesElement(XMLWriter $objWriter, int $val, ?ChartColor $fillColor): void\n    {\n        if ($fillColor === null || !$fillColor->isUsable()) {\n            return;\n        }\n        $objWriter->startElement('c:dPt');\n\n        $objWriter->startElement('c:idx');\n        $objWriter->writeAttribute('val', \"$val\");\n        $objWriter->endElement(); // c:idx\n\n        $objWriter->startElement('c:spPr');\n        $this->writeColor($objWriter, $fillColor);\n        $objWriter->endElement(); // c:spPr\n\n        $objWriter->endElement(); // c:dPt\n    }\n\n    /**\n     * Write Plot Group (series of related plots).\n     *\n     * @param string $groupType Type of plot for dataseries\n     * @param bool $catIsMultiLevelSeries Is category a multi-series category\n     * @param bool $valIsMultiLevelSeries Is value set a multi-series set\n     * @param string $plotGroupingType Type of grouping for multi-series values\n     */\n    private function writePlotGroup(?DataSeries $plotGroup, string $groupType, XMLWriter $objWriter, bool &$catIsMultiLevelSeries, bool &$valIsMultiLevelSeries, string &$plotGroupingType): void\n    {\n        if ($plotGroup === null) {\n            return;\n        }\n\n        if (($groupType == DataSeries::TYPE_BARCHART) || ($groupType == DataSeries::TYPE_BARCHART_3D)) {\n            $objWriter->startElement('c:barDir');\n            $objWriter->writeAttribute('val', $plotGroup->getPlotDirection());\n            $objWriter->endElement();\n        }\n\n        $plotGroupingType = (string) $plotGroup->getPlotGrouping();\n        if ($plotGroupingType !== '' && $groupType !== DataSeries::TYPE_SURFACECHART && $groupType !== DataSeries::TYPE_SURFACECHART_3D) {\n            $objWriter->startElement('c:grouping');\n            $objWriter->writeAttribute('val', $plotGroupingType);\n            $objWriter->endElement();\n        }\n\n        //    Get these details before the loop, because we can use the count to check for varyColors\n        $plotSeriesOrder = $plotGroup->getPlotOrder();\n        $plotSeriesCount = count($plotSeriesOrder);\n\n        if (($groupType !== DataSeries::TYPE_RADARCHART) && ($groupType !== DataSeries::TYPE_STOCKCHART)) {\n            if ($groupType !== DataSeries::TYPE_LINECHART) {\n                if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART) || ($plotSeriesCount > 1)) {\n                    $objWriter->startElement('c:varyColors');\n                    $objWriter->writeAttribute('val', '1');\n                    $objWriter->endElement();\n                } else {\n                    $objWriter->startElement('c:varyColors');\n                    $objWriter->writeAttribute('val', '0');\n                    $objWriter->endElement();\n                }\n            }\n        }\n\n        $plotSeriesIdx = 0;\n        foreach ($plotSeriesOrder as $plotSeriesIdx => $plotSeriesRef) {\n            $objWriter->startElement('c:ser');\n\n            $objWriter->startElement('c:idx');\n            $adder = array_key_exists(0, $plotSeriesOrder) ? $this->seriesIndex : 0;\n            $objWriter->writeAttribute('val', (string) ($adder + $plotSeriesIdx));\n            $objWriter->endElement();\n\n            $objWriter->startElement('c:order');\n            $objWriter->writeAttribute('val', (string) ($adder + $plotSeriesRef));\n            $objWriter->endElement();\n\n            $plotLabel = $plotGroup->getPlotLabelByIndex($plotSeriesIdx);\n            $labelFill = null;\n            if ($plotLabel && $groupType === DataSeries::TYPE_LINECHART) {\n                $labelFill = $plotLabel->getFillColorObject();\n                $labelFill = ($labelFill instanceof ChartColor) ? $labelFill : null;\n            }\n\n            //    Values\n            $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesIdx);\n\n            if ($plotSeriesValues !== false && in_array($groupType, self::CUSTOM_COLOR_TYPES, true)) {\n                $fillColorValues = $plotSeriesValues->getFillColorObject();\n                if ($fillColorValues !== null && is_array($fillColorValues)) {\n                    foreach (($plotSeriesValues->getDataValues() ?? []) as $dataKey => $dataValue) {\n                        $this->writePlotSeriesValuesElement($objWriter, $dataKey, $fillColorValues[$dataKey] ?? null);\n                    }\n                }\n            }\n            if ($plotSeriesValues !== false && $plotSeriesValues->getLabelLayout()) {\n                $this->writeDataLabels($objWriter, $plotSeriesValues->getLabelLayout());\n            }\n\n            //    Labels\n            $plotSeriesLabel = $plotGroup->getPlotLabelByIndex($plotSeriesIdx);\n            if ($plotSeriesLabel && ($plotSeriesLabel->getPointCount() > 0)) {\n                $objWriter->startElement('c:tx');\n                $objWriter->startElement('c:strRef');\n                $this->writePlotSeriesLabel($plotSeriesLabel, $objWriter);\n                $objWriter->endElement();\n                $objWriter->endElement();\n            }\n\n            //    Formatting for the points\n            if (\n                $plotSeriesValues !== false\n            ) {\n                $objWriter->startElement('c:spPr');\n                if ($plotLabel && $groupType !== DataSeries::TYPE_LINECHART) {\n                    $fillColor = $plotLabel->getFillColorObject();\n                    if ($fillColor !== null && !is_array($fillColor) && $fillColor->isUsable()) {\n                        $this->writeColor($objWriter, $fillColor);\n                    }\n                }\n                $fillObject = $labelFill ?? $plotSeriesValues->getFillColorObject();\n                $callLineStyles = true;\n                if ($fillObject instanceof ChartColor && $fillObject->isUsable()) {\n                    if ($groupType === DataSeries::TYPE_LINECHART) {\n                        $objWriter->startElement('a:ln');\n                        $callLineStyles = false;\n                    }\n                    $this->writeColor($objWriter, $fillObject);\n                    if (!$callLineStyles) {\n                        $objWriter->endElement(); // a:ln\n                    }\n                }\n                $nofill = $groupType === DataSeries::TYPE_STOCKCHART || (($groupType === DataSeries::TYPE_SCATTERCHART || $groupType === DataSeries::TYPE_LINECHART) && !$plotSeriesValues->getScatterLines());\n                if ($callLineStyles) {\n                    $this->writeLineStyles($objWriter, $plotSeriesValues, $nofill);\n                    $this->writeEffects($objWriter, $plotSeriesValues);\n                }\n                $objWriter->endElement(); // c:spPr\n            }\n\n            if ($plotSeriesValues) {\n                $plotSeriesMarker = $plotSeriesValues->getPointMarker();\n                $markerFillColor = $plotSeriesValues->getMarkerFillColor();\n                $fillUsed = $markerFillColor->IsUsable();\n                $markerBorderColor = $plotSeriesValues->getMarkerBorderColor();\n                $borderUsed = $markerBorderColor->isUsable();\n                if ($plotSeriesMarker || $fillUsed || $borderUsed) {\n                    $objWriter->startElement('c:marker');\n                    $objWriter->startElement('c:symbol');\n                    if ($plotSeriesMarker) {\n                        $objWriter->writeAttribute('val', $plotSeriesMarker);\n                    }\n                    $objWriter->endElement();\n\n                    if ($plotSeriesMarker !== 'none') {\n                        $objWriter->startElement('c:size');\n                        $objWriter->writeAttribute('val', (string) $plotSeriesValues->getPointSize());\n                        $objWriter->endElement(); // c:size\n                        $objWriter->startElement('c:spPr');\n                        $this->writeColor($objWriter, $markerFillColor);\n                        if ($borderUsed) {\n                            $objWriter->startElement('a:ln');\n                            $this->writeColor($objWriter, $markerBorderColor);\n                            $objWriter->endElement(); // a:ln\n                        }\n                        $objWriter->endElement(); // spPr\n                    }\n\n                    $objWriter->endElement();\n                }\n            }\n\n            if (($groupType === DataSeries::TYPE_BARCHART) || ($groupType === DataSeries::TYPE_BARCHART_3D) || ($groupType === DataSeries::TYPE_BUBBLECHART)) {\n                $objWriter->startElement('c:invertIfNegative');\n                $objWriter->writeAttribute('val', '0');\n                $objWriter->endElement();\n            }\n            // Trendlines\n            if ($plotSeriesValues !== false) {\n                foreach ($plotSeriesValues->getTrendLines() as $trendLine) {\n                    $trendLineType = $trendLine->getTrendLineType();\n                    $order = $trendLine->getOrder();\n                    $period = $trendLine->getPeriod();\n                    $dispRSqr = $trendLine->getDispRSqr();\n                    $dispEq = $trendLine->getDispEq();\n                    $forward = $trendLine->getForward();\n                    $backward = $trendLine->getBackward();\n                    $intercept = $trendLine->getIntercept();\n                    $name = $trendLine->getName();\n                    $trendLineColor = $trendLine->getLineColor(); // ChartColor\n\n                    $objWriter->startElement('c:trendline'); // N.B. lowercase 'ell'\n                    if ($name !== '') {\n                        $objWriter->startElement('c:name');\n                        $objWriter->writeRawData($name);\n                        $objWriter->endElement(); // c:name\n                    }\n                    $objWriter->startElement('c:spPr');\n\n                    if (!$trendLineColor->isUsable()) {\n                        // use dataSeriesValues line color as a backup if $trendLineColor is null\n                        $dsvLineColor = $plotSeriesValues->getLineColor();\n                        if ($dsvLineColor->isUsable()) {\n                            $trendLine\n                                ->getLineColor()\n                                ->setColorProperties($dsvLineColor->getValue(), $dsvLineColor->getAlpha(), $dsvLineColor->getType());\n                        }\n                    } // otherwise, hope Excel does the right thing\n\n                    $this->writeLineStyles($objWriter, $trendLine, false); // suppress noFill\n\n                    $objWriter->endElement(); // spPr\n\n                    $objWriter->startElement('c:trendlineType'); // N.B lowercase 'ell'\n                    $objWriter->writeAttribute('val', $trendLineType);\n                    $objWriter->endElement(); // trendlineType\n                    if ($backward !== 0.0) {\n                        $objWriter->startElement('c:backward');\n                        $objWriter->writeAttribute('val', \"$backward\");\n                        $objWriter->endElement(); // c:backward\n                    }\n                    if ($forward !== 0.0) {\n                        $objWriter->startElement('c:forward');\n                        $objWriter->writeAttribute('val', \"$forward\");\n                        $objWriter->endElement(); // c:forward\n                    }\n                    if ($intercept !== 0.0) {\n                        $objWriter->startElement('c:intercept');\n                        $objWriter->writeAttribute('val', \"$intercept\");\n                        $objWriter->endElement(); // c:intercept\n                    }\n                    if ($trendLineType == TrendLine::TRENDLINE_POLYNOMIAL) {\n                        $objWriter->startElement('c:order');\n                        $objWriter->writeAttribute('val', \"$order\");\n                        $objWriter->endElement(); // order\n                    }\n                    if ($trendLineType == TrendLine::TRENDLINE_MOVING_AVG) {\n                        $objWriter->startElement('c:period');\n                        $objWriter->writeAttribute('val', \"$period\");\n                        $objWriter->endElement(); // period\n                    }\n                    $objWriter->startElement('c:dispRSqr');\n                    $objWriter->writeAttribute('val', $dispRSqr ? '1' : '0');\n                    $objWriter->endElement();\n                    $objWriter->startElement('c:dispEq');\n                    $objWriter->writeAttribute('val', $dispEq ? '1' : '0');\n                    $objWriter->endElement();\n                    if ($groupType === DataSeries::TYPE_SCATTERCHART || $groupType === DataSeries::TYPE_LINECHART) {\n                        $objWriter->startElement('c:trendlineLbl');\n                        $objWriter->startElement('c:numFmt');\n                        $objWriter->writeAttribute('formatCode', 'General');\n                        $objWriter->writeAttribute('sourceLinked', '0');\n                        $objWriter->endElement();  // numFmt\n                        $objWriter->endElement();  // trendlineLbl\n                    }\n\n                    $objWriter->endElement(); // trendline\n                }\n            }\n\n            //    Category Labels\n            $plotSeriesCategory = $plotGroup->getPlotCategoryByIndex($plotSeriesIdx);\n            if ($plotSeriesCategory && ($plotSeriesCategory->getPointCount() > 0)) {\n                $catIsMultiLevelSeries = $catIsMultiLevelSeries || $plotSeriesCategory->isMultiLevelSeries();\n\n                if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) {\n                    $plotStyle = $plotGroup->getPlotStyle();\n                    if (is_numeric($plotStyle)) {\n                        $objWriter->startElement('c:explosion');\n                        $objWriter->writeAttribute('val', $plotStyle);\n                        $objWriter->endElement();\n                    }\n                }\n\n                if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) {\n                    $objWriter->startElement('c:xVal');\n                } else {\n                    $objWriter->startElement('c:cat');\n                }\n\n                // xVals (Categories) are not always 'str'\n                // Test X-axis Label's Datatype to decide 'str' vs 'num'\n                $CategoryDatatype = $plotSeriesCategory->getDataType();\n                if ($CategoryDatatype == DataSeriesValues::DATASERIES_TYPE_NUMBER) {\n                    $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'num');\n                } else {\n                    $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str');\n                }\n                $objWriter->endElement();\n            }\n\n            //    Values\n            if ($plotSeriesValues) {\n                $valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries();\n\n                if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) {\n                    $objWriter->startElement('c:yVal');\n                } else {\n                    $objWriter->startElement('c:val');\n                }\n\n                $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num');\n                $objWriter->endElement();\n                if ($groupType === DataSeries::TYPE_SCATTERCHART && $plotGroup->getPlotStyle() === 'smoothMarker') {\n                    $objWriter->startElement('c:smooth');\n                    $objWriter->writeAttribute('val', $plotSeriesValues->getSmoothLine() ? '1' : '0');\n                    $objWriter->endElement();\n                }\n            }\n\n            if ($groupType === DataSeries::TYPE_BUBBLECHART) {\n                if (!empty($plotGroup->getPlotBubbleSizes()[$plotSeriesIdx])) {\n                    $objWriter->startElement('c:bubbleSize');\n                    $this->writePlotSeriesValues(\n                        $plotGroup->getPlotBubbleSizes()[$plotSeriesIdx],\n                        $objWriter,\n                        $groupType,\n                        'num'\n                    );\n                    $objWriter->endElement();\n                    if ($plotSeriesValues !== false) {\n                        $objWriter->startElement('c:bubble3D');\n                        $objWriter->writeAttribute('val', $plotSeriesValues->getBubble3D() ? '1' : '0');\n                        $objWriter->endElement();\n                    }\n                } elseif ($plotSeriesValues !== false) {\n                    $this->writeBubbles($plotSeriesValues, $objWriter);\n                }\n            }\n\n            $objWriter->endElement();\n        }\n\n        $this->seriesIndex += $plotSeriesIdx + 1;\n    }\n\n    /**\n     * Write Plot Series Label.\n     */\n    private function writePlotSeriesLabel(?DataSeriesValues $plotSeriesLabel, XMLWriter $objWriter): void\n    {\n        if ($plotSeriesLabel === null) {\n            return;\n        }\n\n        $objWriter->startElement('c:f');\n        $objWriter->writeRawData($plotSeriesLabel->getDataSource());\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:strCache');\n        $objWriter->startElement('c:ptCount');\n        $objWriter->writeAttribute('val', (string) $plotSeriesLabel->getPointCount());\n        $objWriter->endElement();\n\n        foreach (($plotSeriesLabel->getDataValues() ?? []) as $plotLabelKey => $plotLabelValue) {\n            /** @var string $plotLabelValue */\n            $objWriter->startElement('c:pt');\n            $objWriter->writeAttribute('idx', $plotLabelKey);\n\n            $objWriter->startElement('c:v');\n            $objWriter->writeRawData($plotLabelValue);\n            $objWriter->endElement();\n            $objWriter->endElement();\n        }\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Plot Series Values.\n     *\n     * @param string $groupType Type of plot for dataseries\n     * @param string $dataType Datatype of series values\n     */\n    private function writePlotSeriesValues(?DataSeriesValues $plotSeriesValues, XMLWriter $objWriter, string $groupType, string $dataType = 'str'): void\n    {\n        if ($plotSeriesValues === null) {\n            return;\n        }\n\n        if ($plotSeriesValues->isMultiLevelSeries()) {\n            $levelCount = $plotSeriesValues->multiLevelCount();\n\n            $objWriter->startElement('c:multiLvlStrRef');\n\n            $objWriter->startElement('c:f');\n            $objWriter->writeRawData($plotSeriesValues->getDataSource());\n            $objWriter->endElement();\n\n            $objWriter->startElement('c:multiLvlStrCache');\n\n            $objWriter->startElement('c:ptCount');\n            $objWriter->writeAttribute('val', (string) $plotSeriesValues->getPointCount());\n            $objWriter->endElement();\n\n            for ($level = 0; $level < $levelCount; ++$level) {\n                $objWriter->startElement('c:lvl');\n\n                foreach (($plotSeriesValues->getDataValues() ?? []) as $plotSeriesKey => $plotSeriesValue) {\n                    /** @var string[] $plotSeriesValue */\n                    if (isset($plotSeriesValue[$level])) {\n                        $objWriter->startElement('c:pt');\n                        $objWriter->writeAttribute('idx', $plotSeriesKey);\n\n                        $objWriter->startElement('c:v');\n                        $objWriter->writeRawData($plotSeriesValue[$level]);\n                        $objWriter->endElement();\n                        $objWriter->endElement();\n                    }\n                }\n\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n\n            $objWriter->endElement();\n        } else {\n            $objWriter->startElement('c:' . $dataType . 'Ref');\n\n            $objWriter->startElement('c:f');\n            $objWriter->writeRawData($plotSeriesValues->getDataSource());\n            $objWriter->endElement();\n\n            $count = $plotSeriesValues->getPointCount();\n            $source = $plotSeriesValues->getDataSource();\n            $values = $plotSeriesValues->getDataValues();\n            if ($count > 1 || ($count === 1 && is_array($values) && array_key_exists(0, $values) && \"=$source\" !== StringHelper::convertToString($values[0], false))) {\n                $objWriter->startElement('c:' . $dataType . 'Cache');\n\n                if (($groupType != DataSeries::TYPE_PIECHART) && ($groupType != DataSeries::TYPE_PIECHART_3D) && ($groupType != DataSeries::TYPE_DONUTCHART)) {\n                    if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) {\n                        $objWriter->startElement('c:formatCode');\n                        $objWriter->writeRawData($plotSeriesValues->getFormatCode());\n                        $objWriter->endElement();\n                    }\n                }\n\n                $objWriter->startElement('c:ptCount');\n                $objWriter->writeAttribute('val', (string) $plotSeriesValues->getPointCount());\n                $objWriter->endElement();\n\n                /** @var array<string, string> */\n                $dataValues = $plotSeriesValues->getDataValues();\n                if (!empty($dataValues)) {\n                    foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) {\n                        $objWriter->startElement('c:pt');\n                        $objWriter->writeAttribute('idx', $plotSeriesKey);\n\n                        $objWriter->startElement('c:v');\n                        $objWriter->writeRawData($plotSeriesValue);\n                        $objWriter->endElement();\n                        $objWriter->endElement();\n                    }\n                }\n\n                $objWriter->endElement(); // *Cache\n            }\n\n            $objWriter->endElement(); // *Ref\n        }\n    }\n\n    private const CUSTOM_COLOR_TYPES = [\n        DataSeries::TYPE_BARCHART,\n        DataSeries::TYPE_BARCHART_3D,\n        DataSeries::TYPE_PIECHART,\n        DataSeries::TYPE_PIECHART_3D,\n        DataSeries::TYPE_DONUTCHART,\n    ];\n\n    /**\n     * Write Bubble Chart Details.\n     */\n    private function writeBubbles(?DataSeriesValues $plotSeriesValues, XMLWriter $objWriter): void\n    {\n        if ($plotSeriesValues === null) {\n            return;\n        }\n\n        $objWriter->startElement('c:bubbleSize');\n        $objWriter->startElement('c:numLit');\n\n        $objWriter->startElement('c:formatCode');\n        $objWriter->writeRawData('General');\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:ptCount');\n        $objWriter->writeAttribute('val', (string) $plotSeriesValues->getPointCount());\n        $objWriter->endElement();\n\n        $dataValues = $plotSeriesValues->getDataValues();\n        if (!empty($dataValues)) {\n            foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) {\n                $objWriter->startElement('c:pt');\n                $objWriter->writeAttribute('idx', $plotSeriesKey);\n                $objWriter->startElement('c:v');\n                $objWriter->writeRawData('1');\n                $objWriter->endElement();\n                $objWriter->endElement();\n            }\n        }\n\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:bubble3D');\n        $objWriter->writeAttribute('val', $plotSeriesValues->getBubble3D() ? '1' : '0');\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Layout.\n     */\n    private function writeLayout(XMLWriter $objWriter, ?Layout $layout = null): void\n    {\n        $objWriter->startElement('c:layout');\n\n        if ($layout !== null) {\n            $objWriter->startElement('c:manualLayout');\n\n            $layoutTarget = $layout->getLayoutTarget();\n            if ($layoutTarget !== null) {\n                $objWriter->startElement('c:layoutTarget');\n                $objWriter->writeAttribute('val', $layoutTarget);\n                $objWriter->endElement();\n            }\n\n            $xMode = $layout->getXMode();\n            if ($xMode !== null) {\n                $objWriter->startElement('c:xMode');\n                $objWriter->writeAttribute('val', $xMode);\n                $objWriter->endElement();\n            }\n\n            $yMode = $layout->getYMode();\n            if ($yMode !== null) {\n                $objWriter->startElement('c:yMode');\n                $objWriter->writeAttribute('val', $yMode);\n                $objWriter->endElement();\n            }\n\n            $x = $layout->getXPosition();\n            if ($x !== null) {\n                $objWriter->startElement('c:x');\n                $objWriter->writeAttribute('val', \"$x\");\n                $objWriter->endElement();\n            }\n\n            $y = $layout->getYPosition();\n            if ($y !== null) {\n                $objWriter->startElement('c:y');\n                $objWriter->writeAttribute('val', \"$y\");\n                $objWriter->endElement();\n            }\n\n            $w = $layout->getWidth();\n            if ($w !== null) {\n                $objWriter->startElement('c:w');\n                $objWriter->writeAttribute('val', \"$w\");\n                $objWriter->endElement();\n            }\n\n            $h = $layout->getHeight();\n            if ($h !== null) {\n                $objWriter->startElement('c:h');\n                $objWriter->writeAttribute('val', \"$h\");\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Alternate Content block.\n     */\n    private function writeAlternateContent(XMLWriter $objWriter): void\n    {\n        $objWriter->startElement('mc:AlternateContent');\n        $objWriter->writeAttribute('xmlns:mc', Namespaces::COMPATIBILITY);\n\n        $objWriter->startElement('mc:Choice');\n        $objWriter->writeAttribute('Requires', 'c14');\n        $objWriter->writeAttribute('xmlns:c14', Namespaces::CHART_ALTERNATE);\n\n        $objWriter->startElement('c14:style');\n        $objWriter->writeAttribute('val', '102');\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        $objWriter->startElement('mc:Fallback');\n        $objWriter->startElement('c:style');\n        $objWriter->writeAttribute('val', '2');\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Printer Settings.\n     */\n    private function writePrintSettings(XMLWriter $objWriter): void\n    {\n        $objWriter->startElement('c:printSettings');\n\n        $objWriter->startElement('c:headerFooter');\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:pageMargins');\n        $objWriter->writeAttribute('footer', '0.3');\n        $objWriter->writeAttribute('header', '0.3');\n        $objWriter->writeAttribute('r', '0.7');\n        $objWriter->writeAttribute('l', '0.7');\n        $objWriter->writeAttribute('t', '0.75');\n        $objWriter->writeAttribute('b', '0.75');\n        $objWriter->endElement();\n\n        $objWriter->startElement('c:pageSetup');\n        $objWriter->writeAttribute('orientation', 'portrait');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    private function writeEffects(XMLWriter $objWriter, Properties $yAxis): void\n    {\n        if (\n            !empty($yAxis->getSoftEdgesSize())\n            || !empty($yAxis->getShadowProperty('effect'))\n            || !empty($yAxis->getGlowProperty('size'))\n        ) {\n            $objWriter->startElement('a:effectLst');\n            $this->writeGlow($objWriter, $yAxis);\n            $this->writeShadow($objWriter, $yAxis);\n            $this->writeSoftEdge($objWriter, $yAxis);\n            $objWriter->endElement(); // effectLst\n        }\n    }\n\n    private function writeShadow(XMLWriter $objWriter, Properties $xAxis): void\n    {\n        if (empty($xAxis->getShadowProperty('effect'))) {\n            return;\n        }\n        /** @var non-falsy-string $effect */\n        $effect = $xAxis->getShadowProperty('effect');\n        $objWriter->startElement(\"a:$effect\");\n\n        if (is_numeric($xAxis->getShadowProperty('blur'))) {\n            $objWriter->writeAttribute('blurRad', Properties::pointsToXml((float) $xAxis->getShadowProperty('blur')));\n        }\n        if (is_numeric($xAxis->getShadowProperty('distance'))) {\n            $objWriter->writeAttribute('dist', Properties::pointsToXml((float) $xAxis->getShadowProperty('distance')));\n        }\n        if (is_numeric($xAxis->getShadowProperty('direction'))) {\n            $objWriter->writeAttribute('dir', Properties::angleToXml((float) $xAxis->getShadowProperty('direction')));\n        }\n        $algn = $xAxis->getShadowProperty('algn');\n        if (is_string($algn) && $algn !== '') {\n            $objWriter->writeAttribute('algn', $algn);\n        }\n        foreach (['sx', 'sy'] as $sizeType) {\n            $sizeValue = $xAxis->getShadowProperty(['size', $sizeType]);\n            if (is_numeric($sizeValue)) {\n                $objWriter->writeAttribute($sizeType, Properties::tenthOfPercentToXml((float) $sizeValue));\n            }\n        }\n        foreach (['kx', 'ky'] as $sizeType) {\n            $sizeValue = $xAxis->getShadowProperty(['size', $sizeType]);\n            if (is_numeric($sizeValue)) {\n                $temp = (float) Properties::angleToXml((float) $sizeValue);\n                if (abs($temp) <= Properties::MAX_SKEW_ANGLE_XML) {\n                    // This corresponds to values between -90 amd +90 EXCLUSIVE.\n                    // 90 and anything higher is invalid.\n                    $objWriter->writeAttribute($sizeType, Properties::angleToXml((float) $sizeValue));\n                }\n            }\n        }\n        $rotWithShape = $xAxis->getShadowProperty('rotWithShape');\n        if (is_numeric($rotWithShape)) {\n            $objWriter->writeAttribute('rotWithShape', (string) (int) $rotWithShape);\n        }\n\n        $this->writeColor($objWriter, $xAxis->getShadowColorObject(), false);\n\n        $objWriter->endElement();\n    }\n\n    private function writeGlow(XMLWriter $objWriter, Properties $yAxis): void\n    {\n        $size = $yAxis->getGlowProperty('size');\n        if (empty($size)) {\n            return;\n        }\n        $objWriter->startElement('a:glow');\n        $objWriter->writeAttribute('rad', Properties::pointsToXml((float) $size));\n        $this->writeColor($objWriter, $yAxis->getGlowColorObject(), false);\n        $objWriter->endElement(); // glow\n    }\n\n    private function writeSoftEdge(XMLWriter $objWriter, Properties $yAxis): void\n    {\n        $softEdgeSize = $yAxis->getSoftEdgesSize();\n        if (empty($softEdgeSize)) {\n            return;\n        }\n        $objWriter->startElement('a:softEdge');\n        $objWriter->writeAttribute('rad', Properties::pointsToXml((float) $softEdgeSize));\n        $objWriter->endElement(); //end softEdge\n    }\n\n    private function writeLineStyles(XMLWriter $objWriter, Properties $gridlines, bool $noFill = false): void\n    {\n        $objWriter->startElement('a:ln');\n        $widthTemp = $gridlines->getLineStyleProperty('width');\n        if (is_numeric($widthTemp)) {\n            $objWriter->writeAttribute('w', Properties::pointsToXml((float) $widthTemp));\n        }\n        $this->writeNotEmpty($objWriter, 'cap', $gridlines->getLineStyleProperty('cap'));\n        $this->writeNotEmpty($objWriter, 'cmpd', $gridlines->getLineStyleProperty('compound'));\n        if ($noFill) {\n            $objWriter->startElement('a:noFill');\n            $objWriter->endElement();\n        } else {\n            $this->writeColor($objWriter, $gridlines->getLineColor());\n        }\n\n        $dash = $gridlines->getLineStyleProperty('dash');\n        if (!empty($dash)) {\n            $objWriter->startElement('a:prstDash');\n            $this->writeNotEmpty($objWriter, 'val', $dash);\n            $objWriter->endElement();\n        }\n\n        if ($gridlines->getLineStyleProperty('join') === 'miter') {\n            $objWriter->startElement('a:miter');\n            $objWriter->writeAttribute('lim', '800000');\n            $objWriter->endElement();\n        } elseif ($gridlines->getLineStyleProperty('join') === 'bevel') {\n            $objWriter->startElement('a:bevel');\n            $objWriter->endElement();\n        }\n\n        if ($gridlines->getLineStyleProperty(['arrow', 'head', 'type'])) {\n            $objWriter->startElement('a:headEnd');\n            $objWriter->writeAttribute('type', $gridlines->getLineStyleProperty(['arrow', 'head', 'type']));\n            $this->writeNotEmpty($objWriter, 'w', $gridlines->getLineStyleArrowWidth('head'));\n            $this->writeNotEmpty($objWriter, 'len', $gridlines->getLineStyleArrowLength('head'));\n            $objWriter->endElement();\n        }\n\n        if ($gridlines->getLineStyleProperty(['arrow', 'end', 'type'])) {\n            $objWriter->startElement('a:tailEnd');\n            $objWriter->writeAttribute('type', $gridlines->getLineStyleProperty(['arrow', 'end', 'type']));\n            $this->writeNotEmpty($objWriter, 'w', $gridlines->getLineStyleArrowWidth('end'));\n            $this->writeNotEmpty($objWriter, 'len', $gridlines->getLineStyleArrowLength('end'));\n            $objWriter->endElement();\n        }\n        $objWriter->endElement(); //end ln\n    }\n\n    private function writeNotEmpty(XMLWriter $objWriter, string $name, ?string $value): void\n    {\n        if ($value !== null && $value !== '') {\n            $objWriter->writeAttribute($name, $value);\n        }\n    }\n\n    private function writeColor(XMLWriter $objWriter, ChartColor $chartColor, bool $solidFill = true): void\n    {\n        $type = $chartColor->getType();\n        $value = $chartColor->getValue();\n        if (!empty($type) && !empty($value)) {\n            if ($solidFill) {\n                $objWriter->startElement('a:solidFill');\n            }\n            $objWriter->startElement(\"a:$type\");\n            $objWriter->writeAttribute('val', $value);\n            $alpha = $chartColor->getAlpha();\n            if (is_numeric($alpha)) {\n                $objWriter->startElement('a:alpha');\n                $objWriter->writeAttribute('val', ChartColor::alphaToXml((int) $alpha));\n                $objWriter->endElement(); // a:alpha\n            }\n            $brightness = $chartColor->getBrightness();\n            if (is_numeric($brightness)) {\n                $brightness = (int) $brightness;\n                $lumOff = 100 - $brightness;\n                $objWriter->startElement('a:lumMod');\n                $objWriter->writeAttribute('val', ChartColor::alphaToXml($brightness));\n                $objWriter->endElement(); // a:lumMod\n                $objWriter->startElement('a:lumOff');\n                $objWriter->writeAttribute('val', ChartColor::alphaToXml($lumOff));\n                $objWriter->endElement(); // a:lumOff\n            }\n            $objWriter->endElement(); //a:srgbClr/schemeClr/prstClr\n            if ($solidFill) {\n                $objWriter->endElement(); //a:solidFill\n            }\n        }\n    }\n\n    private function writeLabelFont(XMLWriter $objWriter, ?Font $labelFont, ?Properties $axisText): void\n    {\n        $objWriter->startElement('a:p');\n        $objWriter->startElement('a:pPr');\n        $objWriter->startElement('a:defRPr');\n        if ($labelFont !== null) {\n            $fontSize = $labelFont->getSize();\n            if (is_numeric($fontSize)) {\n                $fontSize *= (($fontSize < 100) ? 100 : 1);\n                $objWriter->writeAttribute('sz', (string) $fontSize);\n            }\n            if ($labelFont->getBold() === true) {\n                $objWriter->writeAttribute('b', '1');\n            }\n            if ($labelFont->getItalic() === true) {\n                $objWriter->writeAttribute('i', '1');\n            }\n            $cap = $labelFont->getCap();\n            if ($cap !== null) {\n                $objWriter->writeAttribute('cap', $cap);\n            }\n            $fontColor = $labelFont->getChartColor();\n            if ($fontColor !== null) {\n                $this->writeColor($objWriter, $fontColor);\n            }\n        }\n        if ($axisText !== null) {\n            $this->writeEffects($objWriter, $axisText);\n        }\n        if ($labelFont !== null) {\n            $defaultFont = ($labelFont->getName() !== Font::DEFAULT_FONT_NAME) ? $labelFont->getName() : '';\n            $fontName = $labelFont->getLatin() ?: $defaultFont;\n            if (!empty($fontName)) {\n                $objWriter->startElement('a:latin');\n                $objWriter->writeAttribute('typeface', $fontName);\n                $objWriter->endElement();\n            }\n            $fontName = $labelFont->getEastAsian() ?: $defaultFont;\n            if (!empty($fontName)) {\n                $objWriter->startElement('a:eastAsian');\n                $objWriter->writeAttribute('typeface', $fontName);\n                $objWriter->endElement();\n            }\n            $fontName = $labelFont->getComplexScript() ?: $defaultFont;\n            if (!empty($fontName)) {\n                $objWriter->startElement('a:complexScript');\n                $objWriter->writeAttribute('typeface', $fontName);\n                $objWriter->endElement();\n            }\n        }\n        $objWriter->endElement(); // a:defRPr\n        $objWriter->endElement(); // a:pPr\n        $objWriter->endElement(); // a:p\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Comments.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\n\nclass Comments extends WriterPart\n{\n    private const VALID_HORIZONTAL_ALIGNMENT = [\n        Alignment::HORIZONTAL_CENTER,\n        Alignment::HORIZONTAL_DISTRIBUTED,\n        Alignment::HORIZONTAL_JUSTIFY,\n        Alignment::HORIZONTAL_LEFT,\n        Alignment::HORIZONTAL_RIGHT,\n    ];\n\n    /**\n     * Write comments to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeComments(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Comments cache\n        $comments = $worksheet->getComments();\n\n        // Authors cache\n        $authors = [];\n        $authorId = 0;\n        foreach ($comments as $comment) {\n            if (!isset($authors[$comment->getAuthor()])) {\n                $authors[$comment->getAuthor()] = $authorId++;\n            }\n        }\n\n        // comments\n        $objWriter->startElement('comments');\n        $objWriter->writeAttribute('xmlns', Namespaces::MAIN);\n\n        // Loop through authors\n        $objWriter->startElement('authors');\n        foreach ($authors as $author => $index) {\n            $objWriter->writeElement('author', $author);\n        }\n        $objWriter->endElement();\n\n        // Loop through comments\n        $objWriter->startElement('commentList');\n        foreach ($comments as $key => $value) {\n            $this->writeComment($objWriter, $key, $value, $authors);\n        }\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write comment to XML format.\n     *\n     * @param string $cellReference Cell reference\n     * @param Comment $comment Comment\n     * @param array<string, int> $authors Array of authors\n     */\n    private function writeComment(XMLWriter $objWriter, string $cellReference, Comment $comment, array $authors): void\n    {\n        // comment\n        $objWriter->startElement('comment');\n        $objWriter->writeAttribute('ref', $cellReference);\n        $objWriter->writeAttribute('authorId', (string) $authors[$comment->getAuthor()]);\n\n        // text\n        $objWriter->startElement('text');\n        $this->getParentWriter()->getWriterPartstringtable()->writeRichText($objWriter, $comment->getText());\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write VML comments to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeVMLComments(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Comments cache\n        $comments = $worksheet->getComments();\n\n        // xml\n        $objWriter->startElement('xml');\n        $objWriter->writeAttribute('xmlns:v', Namespaces::URN_VML);\n        $objWriter->writeAttribute('xmlns:o', Namespaces::URN_MSOFFICE);\n        $objWriter->writeAttribute('xmlns:x', Namespaces::URN_EXCEL);\n\n        // o:shapelayout\n        $objWriter->startElement('o:shapelayout');\n        $objWriter->writeAttribute('v:ext', 'edit');\n\n        // o:idmap\n        $objWriter->startElement('o:idmap');\n        $objWriter->writeAttribute('v:ext', 'edit');\n        $objWriter->writeAttribute('data', '1');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // v:shapetype\n        $objWriter->startElement('v:shapetype');\n        $objWriter->writeAttribute('id', '_x0000_t202');\n        $objWriter->writeAttribute('coordsize', '21600,21600');\n        $objWriter->writeAttribute('o:spt', '202');\n        $objWriter->writeAttribute('path', 'm,l,21600r21600,l21600,xe');\n\n        // v:stroke\n        $objWriter->startElement('v:stroke');\n        $objWriter->writeAttribute('joinstyle', 'miter');\n        $objWriter->endElement();\n\n        // v:path\n        $objWriter->startElement('v:path');\n        $objWriter->writeAttribute('gradientshapeok', 't');\n        $objWriter->writeAttribute('o:connecttype', 'rect');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // Loop through comments\n        foreach ($comments as $key => $value) {\n            $this->writeVMLComment($objWriter, $key, $value);\n        }\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write VML comment to XML format.\n     *\n     * @param string $cellReference Cell reference, eg: 'A1'\n     * @param Comment $comment Comment\n     */\n    private function writeVMLComment(XMLWriter $objWriter, string $cellReference, Comment $comment): void\n    {\n        // Metadata\n        [$column, $row] = Coordinate::indexesFromString($cellReference);\n        $id = 1024 + $column + $row;\n        $id = substr(\"$id\", 0, 4);\n\n        // v:shape\n        $objWriter->startElement('v:shape');\n        $objWriter->writeAttribute('id', '_x0000_s' . $id);\n        $objWriter->writeAttribute('type', '#_x0000_t202');\n        $objWriter->writeAttribute('style', 'position:absolute;margin-left:' . $comment->getMarginLeft() . ';margin-top:' . $comment->getMarginTop() . ';width:' . $comment->getWidth() . ';height:' . $comment->getHeight() . ';z-index:1;visibility:' . ($comment->getVisible() ? 'visible' : 'hidden'));\n        $objWriter->writeAttribute('fillcolor', '#' . $comment->getFillColor()->getRGB());\n        $objWriter->writeAttribute('o:insetmode', 'auto');\n\n        // v:fill\n        $objWriter->startElement('v:fill');\n        $objWriter->writeAttribute('color2', '#' . $comment->getFillColor()->getRGB());\n        if ($comment->hasBackgroundImage()) {\n            $bgImage = $comment->getBackgroundImage();\n            $objWriter->writeAttribute('o:relid', 'rId' . $bgImage->getImageIndex());\n            $objWriter->writeAttribute('o:title', $bgImage->getName());\n            $objWriter->writeAttribute('type', 'frame');\n        }\n        $objWriter->endElement();\n\n        // v:shadow\n        $objWriter->startElement('v:shadow');\n        $objWriter->writeAttribute('on', 't');\n        $objWriter->writeAttribute('color', 'black');\n        $objWriter->writeAttribute('obscured', 't');\n        $objWriter->endElement();\n\n        // v:path\n        $objWriter->startElement('v:path');\n        $objWriter->writeAttribute('o:connecttype', 'none');\n        $objWriter->endElement();\n\n        // v:textbox\n        $textBoxArray = [Comment::TEXTBOX_DIRECTION_RTL => 'rtl', Comment::TEXTBOX_DIRECTION_LTR => 'ltr'];\n        $textboxRtl = $textBoxArray[strtolower($comment->getTextBoxDirection())] ?? 'auto';\n        $objWriter->startElement('v:textbox');\n        $objWriter->writeAttribute('style', \"mso-direction-alt:$textboxRtl\");\n\n        // div\n        $objWriter->startElement('div');\n        $objWriter->writeAttribute('style', ($textboxRtl === 'rtl' ? 'text-align:right;direction:rtl' : 'text-align:left'));\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // x:ClientData\n        $objWriter->startElement('x:ClientData');\n        $objWriter->writeAttribute('ObjectType', 'Note');\n\n        // x:MoveWithCells\n        $objWriter->writeElement('x:MoveWithCells', '');\n\n        // x:SizeWithCells\n        $objWriter->writeElement('x:SizeWithCells', '');\n\n        // x:AutoFill\n        $objWriter->writeElement('x:AutoFill', 'False');\n\n        // x:TextHAlign horizontal alignment of text\n        $alignment = strtolower($comment->getAlignment());\n        if (in_array($alignment, self::VALID_HORIZONTAL_ALIGNMENT, true)) {\n            $objWriter->writeElement('x:TextHAlign', ucfirst($alignment));\n        }\n\n        // x:Row\n        $objWriter->writeElement('x:Row', (string) ($row - 1));\n\n        // x:Column\n        $objWriter->writeElement('x:Column', (string) ($column - 1));\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing as WorksheetDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\n\nclass ContentTypes extends WriterPart\n{\n    /**\n     * Write content types to XML format.\n     *\n     * @param bool $includeCharts Flag indicating if we should include drawing details for charts\n     *\n     * @return string XML Output\n     */\n    public function writeContentTypes(Spreadsheet $spreadsheet, bool $includeCharts = false): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Types\n        $objWriter->startElement('Types');\n        $objWriter->writeAttribute('xmlns', Namespaces::CONTENT_TYPES);\n\n        // Theme\n        $this->writeOverrideContentType($objWriter, '/xl/theme/theme1.xml', 'application/vnd.openxmlformats-officedocument.theme+xml');\n\n        // Styles\n        $this->writeOverrideContentType($objWriter, '/xl/styles.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml');\n\n        // Rels\n        $this->writeDefaultContentType($objWriter, 'rels', 'application/vnd.openxmlformats-package.relationships+xml');\n\n        // XML\n        $this->writeDefaultContentType($objWriter, 'xml', 'application/xml');\n\n        // VML\n        $this->writeDefaultContentType($objWriter, 'vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing');\n\n        // Workbook\n        if ($spreadsheet->hasMacros()) { //Macros in workbook ?\n            // Yes : not standard content but \"macroEnabled\"\n            $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.ms-excel.sheet.macroEnabled.main+xml');\n            //... and define a new type for the VBA project\n            // Better use Override, because we can use 'bin' also for xl\\printerSettings\\printerSettings1.bin\n            $this->writeOverrideContentType($objWriter, '/xl/vbaProject.bin', 'application/vnd.ms-office.vbaProject');\n            if ($spreadsheet->hasMacrosCertificate()) {\n                // signed macros ?\n                // Yes : add needed information\n                $this->writeOverrideContentType($objWriter, '/xl/vbaProjectSignature.bin', 'application/vnd.ms-office.vbaProjectSignature');\n            }\n        } else {\n            // no macros in workbook, so standard type\n            $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml');\n        }\n\n        // DocProps\n        $this->writeOverrideContentType($objWriter, '/docProps/app.xml', 'application/vnd.openxmlformats-officedocument.extended-properties+xml');\n\n        $this->writeOverrideContentType($objWriter, '/docProps/core.xml', 'application/vnd.openxmlformats-package.core-properties+xml');\n\n        $customPropertyList = $spreadsheet->getProperties()->getCustomProperties();\n        if (!empty($customPropertyList)) {\n            $this->writeOverrideContentType($objWriter, '/docProps/custom.xml', 'application/vnd.openxmlformats-officedocument.custom-properties+xml');\n        }\n\n        // Worksheets\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            $this->writeOverrideContentType($objWriter, '/xl/worksheets/sheet' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml');\n        }\n\n        // Shared strings\n        $this->writeOverrideContentType($objWriter, '/xl/sharedStrings.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml');\n\n        // Table\n        $table = 1;\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            $tableCount = $spreadsheet->getSheet($i)->getTableCollection()->count();\n\n            for ($t = 1; $t <= $tableCount; ++$t) {\n                $this->writeOverrideContentType($objWriter, '/xl/tables/table' . $table++ . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml');\n            }\n        }\n\n        // Add worksheet relationship content types\n        /** @var mixed[][][][] */\n        $unparsedLoadedData = $spreadsheet->getUnparsedLoadedData();\n        $chart = 1;\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            $drawings = $spreadsheet->getSheet($i)->getDrawingCollection();\n            $drawingCount = count($drawings);\n            $chartCount = ($includeCharts) ? $spreadsheet->getSheet($i)->getChartCount() : 0;\n            $hasUnparsedDrawing = isset($unparsedLoadedData['sheets'][$spreadsheet->getSheet($i)->getCodeName()]['drawingOriginalIds']);\n\n            //    We need a drawing relationship for the worksheet if we have either drawings or charts\n            if (($drawingCount > 0) || ($chartCount > 0) || $hasUnparsedDrawing) {\n                $this->writeOverrideContentType($objWriter, '/xl/drawings/drawing' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.drawing+xml');\n            }\n\n            //    If we have charts, then we need a chart relationship for every individual chart\n            if ($chartCount > 0) {\n                for ($c = 0; $c < $chartCount; ++$c) {\n                    $this->writeOverrideContentType($objWriter, '/xl/charts/chart' . $chart++ . '.xml', 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml');\n                }\n            }\n        }\n\n        // Comments\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            if (count($spreadsheet->getSheet($i)->getComments()) > 0) {\n                $this->writeOverrideContentType($objWriter, '/xl/comments' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml');\n            }\n        }\n\n        // Add media content-types\n        $aMediaContentTypes = [];\n        $mediaCount = $this->getParentWriter()->getDrawingHashTable()->count();\n        for ($i = 0; $i < $mediaCount; ++$i) {\n            $extension = '';\n            $mimeType = '';\n\n            $drawing = $this->getParentWriter()->getDrawingHashTable()->getByIndex($i);\n            if ($drawing instanceof WorksheetDrawing && $drawing->getPath() !== '') {\n                $extension = strtolower($drawing->getExtension());\n                if ($drawing->getIsUrl()) {\n                    $mimeType = image_type_to_mime_type($drawing->getType());\n                } else {\n                    $mimeType = $this->getImageMimeType($drawing->getPath());\n                }\n            } elseif ($drawing instanceof MemoryDrawing) {\n                $extension = strtolower($drawing->getMimeType());\n                $extension = explode('/', $extension);\n                $extension = $extension[1];\n\n                $mimeType = $drawing->getMimeType();\n            }\n\n            if ($mimeType !== '' && !isset($aMediaContentTypes[$extension])) {\n                $aMediaContentTypes[$extension] = $mimeType;\n\n                $this->writeDefaultContentType($objWriter, $extension, $mimeType);\n            }\n        }\n\n        if ($spreadsheet->hasInCellDrawings()) {\n            $this->writeOverrideContentType($objWriter, '/xl/richData/richValueRel.xml', 'application/vnd.ms-excel.richvaluerel+xml');\n            $this->writeOverrideContentType($objWriter, '/xl/richData/rdrichvalue.xml', 'application/vnd.ms-excel.rdrichvalue+xml');\n            $this->writeOverrideContentType($objWriter, '/xl/richData/rdrichvaluestructure.xml', 'application/vnd.ms-excel.rdrichvaluestructure+xml');\n            $this->writeOverrideContentType($objWriter, '/xl/richData/rdRichValueTypes.xml', 'application/vnd.ms-excel.rdrichvaluetypes+xml');\n        }\n\n        // Add pass-through media content types\n        /** @var array<string, array<string, mixed>> $sheets */\n        $sheets = $unparsedLoadedData['sheets'] ?? [];\n        foreach ($sheets as $sheetData) {\n            if (($sheetData['drawingPassThroughEnabled'] ?? false) !== true) {\n                continue;\n            }\n            /** @var string[] $mediaFiles */\n            $mediaFiles = $sheetData['drawingMediaFiles'] ?? [];\n            foreach ($mediaFiles as $mediaPath) {\n                $extension = strtolower(pathinfo($mediaPath, PATHINFO_EXTENSION));\n                if ($extension !== '' && !isset($aMediaContentTypes[$extension])) {\n                    $mimeType = match ($extension) { // @phpstan-ignore match.unhandled\n                        'png' => 'image/png',\n                        'jpg', 'jpeg' => 'image/jpeg',\n                        'gif' => 'image/gif',\n                        'bmp' => 'image/bmp',\n                        'tif', 'tiff' => 'image/tiff',\n                        'svg' => 'image/svg+xml',\n                    };\n                    $aMediaContentTypes[$extension] = $mimeType;\n                    $this->writeDefaultContentType($objWriter, $extension, $mimeType);\n                }\n            }\n        }\n\n        if ($spreadsheet->hasRibbonBinObjects()) {\n            // Some additional objects in the ribbon ?\n            // we need to write \"Extension\" but not already write for media content\n            /** @var string[] */\n            $tabRibbonTypes = array_diff($spreadsheet->getRibbonBinObjects('types') ?? [], array_keys($aMediaContentTypes));\n            foreach ($tabRibbonTypes as $aRibbonType) {\n                $mimeType = 'image/.' . $aRibbonType; //we wrote $mimeType like customUI Editor\n                $this->writeDefaultContentType($objWriter, $aRibbonType, $mimeType);\n            }\n        }\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            if (count($spreadsheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) {\n                foreach ($spreadsheet->getSheet($i)->getHeaderFooter()->getImages() as $image) {\n                    if ($image->getPath() !== '' && !isset($aMediaContentTypes[strtolower($image->getExtension())])) {\n                        $aMediaContentTypes[strtolower($image->getExtension())] = $this->getImageMimeType($image->getPath());\n\n                        $this->writeDefaultContentType($objWriter, strtolower($image->getExtension()), $aMediaContentTypes[strtolower($image->getExtension())]);\n                    }\n                }\n            }\n\n            if (count($spreadsheet->getSheet($i)->getComments()) > 0) {\n                foreach ($spreadsheet->getSheet($i)->getComments() as $comment) {\n                    if (!$comment->hasBackgroundImage()) {\n                        continue;\n                    }\n\n                    $bgImage = $comment->getBackgroundImage();\n                    $bgImageExtentionKey = strtolower($bgImage->getImageFileExtensionForSave(false));\n\n                    if (!isset($aMediaContentTypes[$bgImageExtentionKey])) {\n                        $aMediaContentTypes[$bgImageExtentionKey] = $bgImage->getImageMimeType();\n\n                        $this->writeDefaultContentType($objWriter, $bgImageExtentionKey, $aMediaContentTypes[$bgImageExtentionKey]);\n                    }\n                }\n            }\n\n            $bgImage = $spreadsheet->getSheet($i)->getBackgroundImage();\n            $mimeType = $spreadsheet->getSheet($i)->getBackgroundMime();\n            $extension = $spreadsheet->getSheet($i)->getBackgroundExtension();\n            if ($bgImage !== '' && !isset($aMediaContentTypes[$extension])) {\n                $this->writeDefaultContentType($objWriter, $extension, $mimeType);\n            }\n        }\n\n        // unparsed defaults\n        if (isset($unparsedLoadedData['default_content_types'])) {\n            /** @var array<string, string> */\n            $unparsedDefault = $unparsedLoadedData['default_content_types'];\n            foreach ($unparsedDefault as $extName => $contentType) {\n                $this->writeDefaultContentType($objWriter, $extName, $contentType);\n            }\n        }\n\n        // unparsed overrides\n        if (isset($unparsedLoadedData['override_content_types'])) {\n            /** @var array<string, string> */\n            $unparsedOverride = $unparsedLoadedData['override_content_types'];\n            foreach ($unparsedOverride as $partName => $overrideType) {\n                $this->writeOverrideContentType($objWriter, $partName, $overrideType);\n            }\n        }\n\n        // Metadata needed for Dynamic Arrays\n        if ($this->getParentWriter()->useDynamicArrays() || $spreadsheet->hasInCellDrawings()) {\n            $this->writeOverrideContentType($objWriter, '/xl/metadata.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml');\n        }\n\n        if ($spreadsheet->getUsesCheckboxStyle()) {\n            $this->writeOverrideContentType($objWriter, '/xl/featurePropertyBag/featurePropertyBag.xml', 'application/vnd.ms-excel.featurepropertybag+xml');\n        }\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    private static int $three = 3; // phpstan silliness\n\n    /**\n     * Get image mime type.\n     *\n     * @param string $filename Filename\n     *\n     * @return string Mime Type\n     */\n    private function getImageMimeType(string $filename): string\n    {\n        if (File::fileExists($filename)) {\n            $image = getimagesize($filename);\n\n            return image_type_to_mime_type((is_array($image) && count($image) >= self::$three) ? $image[2] : 0);\n        }\n\n        throw new WriterException(\"File $filename does not exist\");\n    }\n\n    /**\n     * Write Default content type.\n     *\n     * @param string $partName Part name\n     * @param string $contentType Content type\n     */\n    private function writeDefaultContentType(XMLWriter $objWriter, string $partName, string $contentType): void\n    {\n        if ($partName != '' && $contentType != '') {\n            // Write content type\n            $objWriter->startElement('Default');\n            $objWriter->writeAttribute('Extension', $partName);\n            $objWriter->writeAttribute('ContentType', $contentType);\n            $objWriter->endElement();\n        } else {\n            throw new WriterException('Invalid parameters passed.');\n        }\n    }\n\n    /**\n     * Write Override content type.\n     *\n     * @param string $partName Part name\n     * @param string $contentType Content type\n     */\n    private function writeOverrideContentType(XMLWriter $objWriter, string $partName, string $contentType): void\n    {\n        if ($partName != '' && $contentType != '') {\n            // Write content type\n            $objWriter->startElement('Override');\n            $objWriter->writeAttribute('PartName', $partName);\n            $objWriter->writeAttribute('ContentType', $contentType);\n            $objWriter->endElement();\n        } else {\n            throw new WriterException('Invalid parameters passed.');\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse Composer\\Pcre\\Preg;\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet as ActualWorksheet;\n\nclass DefinedNames\n{\n    private XMLWriter $objWriter;\n\n    private Spreadsheet $spreadsheet;\n\n    public function __construct(XMLWriter $objWriter, Spreadsheet $spreadsheet)\n    {\n        $this->objWriter = $objWriter;\n        $this->spreadsheet = $spreadsheet;\n    }\n\n    public function write(): void\n    {\n        // Write defined names\n        $this->objWriter->startElement('definedNames');\n\n        // Named ranges\n        if (count($this->spreadsheet->getDefinedNames()) > 0) {\n            // Named ranges\n            $this->writeNamedRangesAndFormulae();\n        }\n\n        // Other defined names\n        $sheetCount = $this->spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            // NamedRange for autoFilter\n            $this->writeNamedRangeForAutofilter($this->spreadsheet->getSheet($i), $i);\n\n            // NamedRange for Print_Titles\n            $this->writeNamedRangeForPrintTitles($this->spreadsheet->getSheet($i), $i);\n\n            // NamedRange for Print_Area\n            $this->writeNamedRangeForPrintArea($this->spreadsheet->getSheet($i), $i);\n        }\n\n        $this->objWriter->endElement();\n    }\n\n    /**\n     * Write defined names.\n     */\n    private function writeNamedRangesAndFormulae(): void\n    {\n        // Loop named ranges\n        $definedNames = $this->spreadsheet->getDefinedNames();\n        foreach ($definedNames as $definedName) {\n            $this->writeDefinedName($definedName);\n        }\n    }\n\n    /**\n     * Write Defined Name for named range.\n     */\n    private function writeDefinedName(DefinedName $definedName): void\n    {\n        // definedName for named range\n        $local = -1;\n        if ($definedName->getLocalOnly() && $definedName->getScope() !== null) {\n            try {\n                $local = $definedName->getScope()->getParentOrThrow()->getIndex($definedName->getScope());\n            } catch (Exception) {\n                // See issue 2266 - deleting sheet which contains\n                //     defined names will cause Exception above.\n                return;\n            }\n        }\n        $this->objWriter->startElement('definedName');\n        $this->objWriter->writeAttribute('name', $definedName->getName());\n        if ($local >= 0) {\n            $this->objWriter->writeAttribute(\n                'localSheetId',\n                \"$local\"\n            );\n        }\n\n        $definedRange = $this->getDefinedRange($definedName);\n\n        $this->objWriter->writeRawData($definedRange);\n\n        $this->objWriter->endElement();\n    }\n\n    /**\n     * Write Defined Name for autoFilter.\n     */\n    private function writeNamedRangeForAutofilter(ActualWorksheet $worksheet, int $worksheetId = 0): void\n    {\n        // NamedRange for autoFilter\n        $autoFilterRange = $worksheet->getAutoFilter()->getRange();\n        if (!empty($autoFilterRange)) {\n            $this->objWriter->startElement('definedName');\n            $this->objWriter->writeAttribute('name', '_xlnm._FilterDatabase');\n            $this->objWriter->writeAttribute('localSheetId', \"$worksheetId\");\n            $this->objWriter->writeAttribute('hidden', '1');\n\n            // Create absolute coordinate and write as raw text\n            $range = Coordinate::splitRange($autoFilterRange);\n            $range = $range[0];\n            //    Strip any worksheet ref so we can make the cell ref absolute\n            [, $range[0]] = ActualWorksheet::extractSheetTitle($range[0], true);\n\n            $range[0] = Coordinate::absoluteCoordinate($range[0] ?? '');\n            if (count($range) > 1) {\n                $range[1] = Coordinate::absoluteCoordinate($range[1] ?? '');\n            }\n            $range = implode(':', $range);\n\n            $this->objWriter->writeRawData('\\'' . str_replace(\"'\", \"''\", $worksheet->getTitle()) . '\\'!' . $range);\n\n            $this->objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write Defined Name for PrintTitles.\n     */\n    private function writeNamedRangeForPrintTitles(ActualWorksheet $worksheet, int $worksheetId = 0): void\n    {\n        // NamedRange for PrintTitles\n        if ($worksheet->getPageSetup()->isColumnsToRepeatAtLeftSet() || $worksheet->getPageSetup()->isRowsToRepeatAtTopSet()) {\n            $this->objWriter->startElement('definedName');\n            $this->objWriter->writeAttribute('name', '_xlnm.Print_Titles');\n            $this->objWriter->writeAttribute('localSheetId', \"$worksheetId\");\n\n            // Setting string\n            $settingString = '';\n\n            // Columns to repeat\n            if ($worksheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) {\n                $repeat = $worksheet->getPageSetup()->getColumnsToRepeatAtLeft();\n\n                $settingString .= '\\'' . str_replace(\"'\", \"''\", $worksheet->getTitle()) . '\\'!$' . $repeat[0] . ':$' . $repeat[1];\n            }\n\n            // Rows to repeat\n            if ($worksheet->getPageSetup()->isRowsToRepeatAtTopSet()) {\n                if ($worksheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) {\n                    $settingString .= ',';\n                }\n\n                $repeat = $worksheet->getPageSetup()->getRowsToRepeatAtTop();\n\n                $settingString .= '\\'' . str_replace(\"'\", \"''\", $worksheet->getTitle()) . '\\'!$' . $repeat[0] . ':$' . $repeat[1];\n            }\n\n            $this->objWriter->writeRawData($settingString);\n\n            $this->objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write Defined Name for PrintTitles.\n     */\n    private function writeNamedRangeForPrintArea(ActualWorksheet $worksheet, int $worksheetId = 0): void\n    {\n        // NamedRange for PrintArea\n        if ($worksheet->getPageSetup()->isPrintAreaSet()) {\n            $this->objWriter->startElement('definedName');\n            $this->objWriter->writeAttribute('name', '_xlnm.Print_Area');\n            $this->objWriter->writeAttribute('localSheetId', \"$worksheetId\");\n\n            // Print area\n            $printArea = Coordinate::splitRange($worksheet->getPageSetup()->getPrintArea());\n\n            $chunks = [];\n            foreach ($printArea as $printAreaRect) {\n                $printAreaRect[0] = Coordinate::absoluteReference($printAreaRect[0]);\n                $printAreaRect[1] = Coordinate::absoluteReference($printAreaRect[1]);\n                $chunks[] = '\\'' . str_replace(\"'\", \"''\", $worksheet->getTitle()) . '\\'!' . implode(':', $printAreaRect);\n            }\n\n            $this->objWriter->writeRawData(implode(',', $chunks));\n\n            $this->objWriter->endElement();\n        }\n    }\n\n    private function getDefinedRange(DefinedName $definedName): string\n    {\n        $definedRange = $definedName->getValue();\n        $splitCount = Preg::matchAllWithOffsets(\n            '/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/mui',\n            $definedRange,\n            $splitRanges\n        );\n\n        $lengths = array_map([StringHelper::class, 'strlenAllowNull'], array_column($splitRanges[0], 0));\n        $offsets = array_column($splitRanges[0], 1);\n\n        $worksheets = $splitRanges[2];\n        $columns = $splitRanges[6];\n        $rows = $splitRanges[7];\n\n        while ($splitCount > 0) {\n            --$splitCount;\n            $length = $lengths[$splitCount];\n            $offset = $offsets[$splitCount];\n            $worksheet = $worksheets[$splitCount][0];\n            $column = $columns[$splitCount][0];\n            $row = $rows[$splitCount][0];\n\n            $newRange = '';\n            if (empty($worksheet)) {\n                if (($offset === 0) || ($definedRange[$offset - 1] !== ':')) {\n                    // We should have a worksheet\n                    $ws = $definedName->getWorksheet();\n                    $worksheet = ($ws === null) ? null : $ws->getTitle();\n                }\n            } else {\n                $worksheet = str_replace(\"''\", \"'\", trim($worksheet, \"'\"));\n            }\n\n            if (!empty($worksheet)) {\n                $newRange = \"'\" . str_replace(\"'\", \"''\", $worksheet) . \"'!\";\n            }\n            $newRange = \"{$newRange}{$column}{$row}\";\n\n            $definedRange = substr($definedRange, 0, $offset) . $newRange . substr($definedRange, $offset + $length);\n        }\n\n        if (str_starts_with($definedRange, '=')) {\n            $definedRange = substr($definedRange, 1);\n        }\n\n        return $definedRange;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/DocProps.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass DocProps extends WriterPart\n{\n    /**\n     * Write docProps/app.xml to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeDocPropsApp(Spreadsheet $spreadsheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Properties\n        $objWriter->startElement('Properties');\n        $objWriter->writeAttribute('xmlns', Namespaces::EXTENDED_PROPERTIES);\n        $objWriter->writeAttribute('xmlns:vt', Namespaces::PROPERTIES_VTYPES);\n\n        // Application\n        $objWriter->writeElement('Application', 'Microsoft Excel');\n\n        // DocSecurity\n        $objWriter->writeElement('DocSecurity', '0');\n\n        // ScaleCrop\n        $objWriter->writeElement('ScaleCrop', 'false');\n\n        // HeadingPairs\n        $objWriter->startElement('HeadingPairs');\n\n        // Vector\n        $objWriter->startElement('vt:vector');\n        $objWriter->writeAttribute('size', '2');\n        $objWriter->writeAttribute('baseType', 'variant');\n\n        // Variant\n        $objWriter->startElement('vt:variant');\n        $objWriter->writeElement('vt:lpstr', 'Worksheets');\n        $objWriter->endElement();\n\n        // Variant\n        $objWriter->startElement('vt:variant');\n        $objWriter->writeElement('vt:i4', (string) $spreadsheet->getSheetCount());\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // TitlesOfParts\n        $objWriter->startElement('TitlesOfParts');\n\n        // Vector\n        $objWriter->startElement('vt:vector');\n        $objWriter->writeAttribute('size', (string) $spreadsheet->getSheetCount());\n        $objWriter->writeAttribute('baseType', 'lpstr');\n\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            $objWriter->writeElement('vt:lpstr', $spreadsheet->getSheet($i)->getTitle());\n        }\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // Company\n        $objWriter->writeElement('Company', $spreadsheet->getProperties()->getCompany());\n\n        // Company\n        $objWriter->writeElement('Manager', $spreadsheet->getProperties()->getManager());\n\n        // LinksUpToDate\n        $objWriter->writeElement('LinksUpToDate', 'false');\n\n        // SharedDoc\n        $objWriter->writeElement('SharedDoc', 'false');\n\n        // HyperlinkBase\n        $objWriter->writeElement('HyperlinkBase', $spreadsheet->getProperties()->getHyperlinkBase());\n\n        // HyperlinksChanged\n        $objWriter->writeElement('HyperlinksChanged', 'false');\n\n        // AppVersion\n        $objWriter->writeElement('AppVersion', '12.0000');\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write docProps/core.xml to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeDocPropsCore(Spreadsheet $spreadsheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // cp:coreProperties\n        $objWriter->startElement('cp:coreProperties');\n        $objWriter->writeAttribute('xmlns:cp', Namespaces::CORE_PROPERTIES2);\n        $objWriter->writeAttribute('xmlns:dc', Namespaces::DC_ELEMENTS);\n        $objWriter->writeAttribute('xmlns:dcterms', Namespaces::DC_TERMS);\n        $objWriter->writeAttribute('xmlns:dcmitype', Namespaces::DC_DCMITYPE);\n        $objWriter->writeAttribute('xmlns:xsi', Namespaces::SCHEMA_INSTANCE);\n\n        // dc:creator\n        $objWriter->writeElement('dc:creator', $spreadsheet->getProperties()->getCreator());\n\n        // cp:lastModifiedBy\n        $objWriter->writeElement('cp:lastModifiedBy', $spreadsheet->getProperties()->getLastModifiedBy());\n\n        // dcterms:created\n        $objWriter->startElement('dcterms:created');\n        $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF');\n        $created = $spreadsheet->getProperties()->getCreated();\n        $date = Date::dateTimeFromTimestamp(\"$created\");\n        $objWriter->writeRawData($date->format(DATE_W3C));\n        $objWriter->endElement();\n\n        // dcterms:modified\n        $objWriter->startElement('dcterms:modified');\n        $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF');\n        $created = $spreadsheet->getProperties()->getModified();\n        $date = Date::dateTimeFromTimestamp(\"$created\");\n        $objWriter->writeRawData($date->format(DATE_W3C));\n        $objWriter->endElement();\n\n        // dc:title\n        $objWriter->writeElement('dc:title', $spreadsheet->getProperties()->getTitle());\n\n        // dc:description\n        $objWriter->writeElement('dc:description', $spreadsheet->getProperties()->getDescription());\n\n        // dc:subject\n        $objWriter->writeElement('dc:subject', $spreadsheet->getProperties()->getSubject());\n\n        // cp:keywords\n        $objWriter->writeElement('cp:keywords', $spreadsheet->getProperties()->getKeywords());\n\n        // cp:category\n        $objWriter->writeElement('cp:category', $spreadsheet->getProperties()->getCategory());\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write docProps/custom.xml to XML format.\n     *\n     * @return null|string XML Output\n     */\n    public function writeDocPropsCustom(Spreadsheet $spreadsheet): ?string\n    {\n        $customPropertyList = $spreadsheet->getProperties()->getCustomProperties();\n        if (empty($customPropertyList)) {\n            return null;\n        }\n\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // cp:coreProperties\n        $objWriter->startElement('Properties');\n        $objWriter->writeAttribute('xmlns', Namespaces::CUSTOM_PROPERTIES);\n        $objWriter->writeAttribute('xmlns:vt', Namespaces::PROPERTIES_VTYPES);\n\n        foreach ($customPropertyList as $key => $customProperty) {\n            $propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty);\n            $propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty);\n\n            $objWriter->startElement('property');\n            $objWriter->writeAttribute('fmtid', '{D5CDD505-2E9C-101B-9397-08002B2CF9AE}');\n            $objWriter->writeAttribute('pid', (string) ($key + 2));\n            $objWriter->writeAttribute('name', $customProperty);\n\n            switch ($propertyType) {\n                case Properties::PROPERTY_TYPE_INTEGER:\n                    $objWriter->writeElement('vt:i4', (string) $propertyValue);\n\n                    break;\n                case Properties::PROPERTY_TYPE_FLOAT:\n                    $objWriter->writeElement('vt:r8', sprintf('%F', $propertyValue));\n\n                    break;\n                case Properties::PROPERTY_TYPE_BOOLEAN:\n                    $objWriter->writeElement('vt:bool', ($propertyValue) ? 'true' : 'false');\n\n                    break;\n                case Properties::PROPERTY_TYPE_DATE:\n                    $objWriter->startElement('vt:filetime');\n                    $date = Date::dateTimeFromTimestamp(\"$propertyValue\");\n                    $objWriter->writeRawData($date->format(DATE_W3C));\n                    $objWriter->endElement();\n\n                    break;\n                default:\n                    $objWriter->writeElement('vt:lpwstr', (string) $propertyValue);\n\n                    break;\n            }\n\n            $objWriter->endElement();\n        }\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Drawing.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Drawing as SharedDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooterDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\n\nclass Drawing extends WriterPart\n{\n    /**\n     * Write drawings to XML format.\n     *\n     * @param bool $includeCharts Flag indicating if we should include drawing details for charts\n     *\n     * @return string XML Output\n     */\n    public function writeDrawings(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet, bool $includeCharts = false): string\n    {\n        // Try to use pass-through drawing XML if available\n        if ($passThroughXml = $this->getPassThroughDrawingXml($worksheet)) {\n            return $passThroughXml;\n        }\n\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // xdr:wsDr\n        $objWriter->startElement('xdr:wsDr');\n        $objWriter->writeAttribute('xmlns:xdr', Namespaces::SPREADSHEET_DRAWING);\n        $objWriter->writeAttribute('xmlns:a', Namespaces::DRAWINGML);\n\n        // Loop through images and write drawings\n        $i = 1;\n        $iterator = $worksheet->getDrawingCollection()->getIterator();\n        while ($iterator->valid()) {\n            /** @var BaseDrawing $pDrawing */\n            $pDrawing = $iterator->current();\n            $pRelationId = $i;\n            $hlinkClickId = $pDrawing->getHyperlink() === null ? null : ++$i;\n\n            $this->writeDrawing($objWriter, $pDrawing, $pRelationId, $hlinkClickId);\n\n            $iterator->next();\n            ++$i;\n        }\n\n        if ($includeCharts) {\n            $chartCount = $worksheet->getChartCount();\n            // Loop through charts and write the chart position\n            if ($chartCount > 0) {\n                for ($c = 0; $c < $chartCount; ++$c) {\n                    $chart = $worksheet->getChartByIndex((string) $c);\n                    if ($chart !== false) {\n                        $this->writeChart($objWriter, $chart, $c + $i);\n                    }\n                }\n            }\n        }\n\n        // unparsed AlternateContent\n        /** @var string[][][][] */\n        $unparsedLoadedData = $worksheet->getParentOrThrow()->getUnparsedLoadedData();\n        if (isset($unparsedLoadedData['sheets'][$worksheet->getCodeName()]['drawingAlternateContents'])) {\n            foreach ($unparsedLoadedData['sheets'][$worksheet->getCodeName()]['drawingAlternateContents'] as $drawingAlternateContent) {\n                $objWriter->writeRaw($drawingAlternateContent);\n            }\n        }\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write drawings to XML format.\n     */\n    public function writeChart(XMLWriter $objWriter, \\PhpOffice\\PhpSpreadsheet\\Chart\\Chart $chart, int $relationId = -1): void\n    {\n        $tl = $chart->getTopLeftPosition();\n        $tlColRow = Coordinate::indexesFromString($tl['cell']);\n        $br = $chart->getBottomRightPosition();\n\n        $isTwoCellAnchor = $br['cell'] !== '';\n        if ($isTwoCellAnchor) {\n            $brColRow = Coordinate::indexesFromString($br['cell']);\n\n            $objWriter->startElement('xdr:twoCellAnchor');\n\n            $objWriter->startElement('xdr:from');\n            $objWriter->writeElement('xdr:col', (string) ($tlColRow[0] - 1));\n            $objWriter->writeElement('xdr:colOff', self::stringEmu($tl['xOffset']));\n            $objWriter->writeElement('xdr:row', (string) ($tlColRow[1] - 1));\n            $objWriter->writeElement('xdr:rowOff', self::stringEmu($tl['yOffset']));\n            $objWriter->endElement();\n            $objWriter->startElement('xdr:to');\n            $objWriter->writeElement('xdr:col', (string) ($brColRow[0] - 1));\n            $objWriter->writeElement('xdr:colOff', self::stringEmu($br['xOffset']));\n            $objWriter->writeElement('xdr:row', (string) ($brColRow[1] - 1));\n            $objWriter->writeElement('xdr:rowOff', self::stringEmu($br['yOffset']));\n            $objWriter->endElement();\n        } elseif ($chart->getOneCellAnchor()) {\n            $objWriter->startElement('xdr:oneCellAnchor');\n\n            $objWriter->startElement('xdr:from');\n            $objWriter->writeElement('xdr:col', (string) ($tlColRow[0] - 1));\n            $objWriter->writeElement('xdr:colOff', self::stringEmu($tl['xOffset']));\n            $objWriter->writeElement('xdr:row', (string) ($tlColRow[1] - 1));\n            $objWriter->writeElement('xdr:rowOff', self::stringEmu($tl['yOffset']));\n            $objWriter->endElement();\n            $objWriter->startElement('xdr:ext');\n            $objWriter->writeAttribute('cx', self::stringEmu($br['xOffset']));\n            $objWriter->writeAttribute('cy', self::stringEmu($br['yOffset']));\n            $objWriter->endElement();\n        } else {\n            $objWriter->startElement('xdr:absoluteAnchor');\n            $objWriter->startElement('xdr:pos');\n            $objWriter->writeAttribute('x', '0');\n            $objWriter->writeAttribute('y', '0');\n            $objWriter->endElement();\n            $objWriter->startElement('xdr:ext');\n            $objWriter->writeAttribute('cx', self::stringEmu($br['xOffset']));\n            $objWriter->writeAttribute('cy', self::stringEmu($br['yOffset']));\n            $objWriter->endElement();\n        }\n\n        $objWriter->startElement('xdr:graphicFrame');\n        $objWriter->writeAttribute('macro', '');\n        $objWriter->startElement('xdr:nvGraphicFramePr');\n        $objWriter->startElement('xdr:cNvPr');\n        $objWriter->writeAttribute('name', 'Chart ' . $relationId);\n        $objWriter->writeAttribute('id', (string) (1025 * $relationId));\n        $objWriter->endElement();\n        $objWriter->startElement('xdr:cNvGraphicFramePr');\n        $objWriter->startElement('a:graphicFrameLocks');\n        $objWriter->endElement();\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        $objWriter->startElement('xdr:xfrm');\n        $objWriter->startElement('a:off');\n        $objWriter->writeAttribute('x', '0');\n        $objWriter->writeAttribute('y', '0');\n        $objWriter->endElement();\n        $objWriter->startElement('a:ext');\n        $objWriter->writeAttribute('cx', '0');\n        $objWriter->writeAttribute('cy', '0');\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        $objWriter->startElement('a:graphic');\n        $objWriter->startElement('a:graphicData');\n        $objWriter->writeAttribute('uri', Namespaces::CHART);\n        $objWriter->startElement('c:chart');\n        $objWriter->writeAttribute('xmlns:c', Namespaces::CHART);\n        $objWriter->writeAttribute('xmlns:r', Namespaces::SCHEMA_OFFICE_DOCUMENT);\n        $objWriter->writeAttribute('r:id', 'rId' . $relationId);\n        $objWriter->endElement();\n        $objWriter->endElement();\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        $objWriter->startElement('xdr:clientData');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write drawings to XML format.\n     */\n    public function writeDrawing(XMLWriter $objWriter, BaseDrawing $drawing, int $relationId = -1, ?int $hlinkClickId = null): void\n    {\n        if ($relationId >= 0) {\n            $isTwoCellAnchor = $drawing->getCoordinates2() !== '';\n            if ($isTwoCellAnchor) {\n                // xdr:twoCellAnchor\n                $objWriter->startElement('xdr:twoCellAnchor');\n                if ($drawing->validEditAs()) {\n                    $objWriter->writeAttribute('editAs', $drawing->getEditAs());\n                }\n                // Image location\n                $aCoordinates = Coordinate::indexesFromString($drawing->getCoordinates());\n                $aCoordinates2 = Coordinate::indexesFromString($drawing->getCoordinates2());\n\n                // xdr:from\n                $objWriter->startElement('xdr:from');\n                $objWriter->writeElement('xdr:col', (string) ($aCoordinates[0] - 1));\n                $objWriter->writeElement('xdr:colOff', self::stringEmu($drawing->getOffsetX()));\n                $objWriter->writeElement('xdr:row', (string) ($aCoordinates[1] - 1));\n                $objWriter->writeElement('xdr:rowOff', self::stringEmu($drawing->getOffsetY()));\n                $objWriter->endElement();\n\n                // xdr:to\n                $objWriter->startElement('xdr:to');\n                $objWriter->writeElement('xdr:col', (string) ($aCoordinates2[0] - 1));\n                $objWriter->writeElement('xdr:colOff', self::stringEmu($drawing->getOffsetX2()));\n                $objWriter->writeElement('xdr:row', (string) ($aCoordinates2[1] - 1));\n                $objWriter->writeElement('xdr:rowOff', self::stringEmu($drawing->getOffsetY2()));\n                $objWriter->endElement();\n            } else {\n                // xdr:oneCellAnchor\n                $objWriter->startElement('xdr:oneCellAnchor');\n                // Image location\n                $aCoordinates = Coordinate::indexesFromString($drawing->getCoordinates());\n\n                // xdr:from\n                $objWriter->startElement('xdr:from');\n                $objWriter->writeElement('xdr:col', (string) ($aCoordinates[0] - 1));\n                $objWriter->writeElement('xdr:colOff', self::stringEmu($drawing->getOffsetX()));\n                $objWriter->writeElement('xdr:row', (string) ($aCoordinates[1] - 1));\n                $objWriter->writeElement('xdr:rowOff', self::stringEmu($drawing->getOffsetY()));\n                $objWriter->endElement();\n\n                // xdr:ext\n                $objWriter->startElement('xdr:ext');\n                $objWriter->writeAttribute('cx', self::stringEmu($drawing->getWidth()));\n                $objWriter->writeAttribute('cy', self::stringEmu($drawing->getHeight()));\n                $objWriter->endElement();\n            }\n\n            // xdr:pic\n            $objWriter->startElement('xdr:pic');\n\n            // xdr:nvPicPr\n            $objWriter->startElement('xdr:nvPicPr');\n\n            // xdr:cNvPr\n            $objWriter->startElement('xdr:cNvPr');\n            $objWriter->writeAttribute('id', (string) $relationId);\n            $objWriter->writeAttribute('name', $drawing->getName());\n            $objWriter->writeAttribute('descr', $drawing->getDescription());\n\n            //a:hlinkClick\n            $this->writeHyperLinkDrawing($objWriter, $hlinkClickId);\n\n            $objWriter->endElement();\n\n            // xdr:cNvPicPr\n            $objWriter->startElement('xdr:cNvPicPr');\n\n            // a:picLocks\n            $objWriter->startElement('a:picLocks');\n            $objWriter->writeAttribute('noChangeAspect', '1');\n            $objWriter->endElement();\n\n            $objWriter->endElement();\n\n            $objWriter->endElement();\n\n            // xdr:blipFill\n            $objWriter->startElement('xdr:blipFill');\n\n            // a:blip\n            $objWriter->startElement('a:blip');\n            $objWriter->writeAttribute('xmlns:r', Namespaces::SCHEMA_OFFICE_DOCUMENT);\n            $objWriter->writeAttribute('r:embed', 'rId' . $relationId);\n            $temp = $drawing->getOpacity();\n            if (is_int($temp) && $temp >= 0 && $temp <= 100000) {\n                $objWriter->startElement('a:alphaModFix');\n                $objWriter->writeAttribute('amt', \"$temp\");\n                $objWriter->endElement(); // a:alphaModFix\n            }\n            $objWriter->endElement(); // a:blip\n\n            $srcRect = $drawing->getSrcRect();\n            if (!empty($srcRect)) {\n                $objWriter->startElement('a:srcRect');\n                foreach ($srcRect as $key => $value) {\n                    $objWriter->writeAttribute($key, (string) $value);\n                }\n                $objWriter->endElement(); // a:srcRect\n                $objWriter->startElement('a:stretch');\n                $objWriter->endElement(); // a:stretch\n            } else {\n                // a:stretch\n                $objWriter->startElement('a:stretch');\n                $objWriter->writeElement('a:fillRect', null);\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n\n            // xdr:spPr\n            $objWriter->startElement('xdr:spPr');\n\n            // a:xfrm\n            $objWriter->startElement('a:xfrm');\n            $objWriter->writeAttribute('rot', (string) SharedDrawing::degreesToAngle($drawing->getRotation()));\n            self::writeAttributeIf($objWriter, $drawing->getFlipVertical(), 'flipV', '1');\n            self::writeAttributeIf($objWriter, $drawing->getFlipHorizontal(), 'flipH', '1');\n            if ($isTwoCellAnchor) {\n                $objWriter->startElement('a:ext');\n                $objWriter->writeAttribute('cx', self::stringEmu($drawing->getWidth()));\n                $objWriter->writeAttribute('cy', self::stringEmu($drawing->getHeight()));\n                $objWriter->endElement();\n            }\n            $objWriter->endElement();\n\n            // a:prstGeom\n            $objWriter->startElement('a:prstGeom');\n            $objWriter->writeAttribute('prst', 'rect');\n\n            // a:avLst\n            $objWriter->writeElement('a:avLst', null);\n\n            $objWriter->endElement();\n\n            if ($drawing->getShadow()->getVisible()) {\n                // a:effectLst\n                $objWriter->startElement('a:effectLst');\n\n                // a:outerShdw\n                $objWriter->startElement('a:outerShdw');\n                $objWriter->writeAttribute('blurRad', self::stringEmu($drawing->getShadow()->getBlurRadius()));\n                $objWriter->writeAttribute('dist', self::stringEmu($drawing->getShadow()->getDistance()));\n                $objWriter->writeAttribute('dir', (string) SharedDrawing::degreesToAngle($drawing->getShadow()->getDirection()));\n                $objWriter->writeAttribute('algn', $drawing->getShadow()->getAlignment());\n                $objWriter->writeAttribute('rotWithShape', '0');\n\n                // a:srgbClr\n                $objWriter->startElement('a:srgbClr');\n                $objWriter->writeAttribute('val', $drawing->getShadow()->getColor()->getRGB());\n\n                // a:alpha\n                $objWriter->startElement('a:alpha');\n                $objWriter->writeAttribute('val', (string) ($drawing->getShadow()->getAlpha() * 1000));\n                $objWriter->endElement();\n\n                $objWriter->endElement();\n\n                $objWriter->endElement();\n\n                $objWriter->endElement();\n            }\n            $objWriter->endElement();\n\n            $objWriter->endElement();\n\n            // xdr:clientData\n            $objWriter->writeElement('xdr:clientData', null);\n\n            $objWriter->endElement();\n        } else {\n            throw new WriterException('Invalid parameters passed.');\n        }\n    }\n\n    /**\n     * Write VML header/footer images to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeVMLHeaderFooterImages(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Header/footer images\n        $images = $worksheet->getHeaderFooter()->getImages();\n\n        // xml\n        $objWriter->startElement('xml');\n        $objWriter->writeAttribute('xmlns:v', Namespaces::URN_VML);\n        $objWriter->writeAttribute('xmlns:o', Namespaces::URN_MSOFFICE);\n        $objWriter->writeAttribute('xmlns:x', Namespaces::URN_EXCEL);\n\n        // o:shapelayout\n        $objWriter->startElement('o:shapelayout');\n        $objWriter->writeAttribute('v:ext', 'edit');\n\n        // o:idmap\n        $objWriter->startElement('o:idmap');\n        $objWriter->writeAttribute('v:ext', 'edit');\n        $objWriter->writeAttribute('data', '1');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // v:shapetype\n        $objWriter->startElement('v:shapetype');\n        $objWriter->writeAttribute('id', '_x0000_t75');\n        $objWriter->writeAttribute('coordsize', '21600,21600');\n        $objWriter->writeAttribute('o:spt', '75');\n        $objWriter->writeAttribute('o:preferrelative', 't');\n        $objWriter->writeAttribute('path', 'm@4@5l@4@11@9@11@9@5xe');\n        $objWriter->writeAttribute('filled', 'f');\n        $objWriter->writeAttribute('stroked', 'f');\n\n        // v:stroke\n        $objWriter->startElement('v:stroke');\n        $objWriter->writeAttribute('joinstyle', 'miter');\n        $objWriter->endElement();\n\n        // v:formulas\n        $objWriter->startElement('v:formulas');\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'if lineDrawn pixelLineWidth 0');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'sum @0 1 0');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'sum 0 0 @1');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'prod @2 1 2');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelWidth');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelHeight');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'sum @0 0 1');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'prod @6 1 2');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelWidth');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'sum @8 21600 0');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelHeight');\n        $objWriter->endElement();\n\n        // v:f\n        $objWriter->startElement('v:f');\n        $objWriter->writeAttribute('eqn', 'sum @10 21600 0');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // v:path\n        $objWriter->startElement('v:path');\n        $objWriter->writeAttribute('o:extrusionok', 'f');\n        $objWriter->writeAttribute('gradientshapeok', 't');\n        $objWriter->writeAttribute('o:connecttype', 'rect');\n        $objWriter->endElement();\n\n        // o:lock\n        $objWriter->startElement('o:lock');\n        $objWriter->writeAttribute('v:ext', 'edit');\n        $objWriter->writeAttribute('aspectratio', 't');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // Loop through images\n        foreach ($images as $key => $value) {\n            $this->writeVMLHeaderFooterImage($objWriter, $key, $value);\n        }\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write VML comment to XML format.\n     *\n     * @param string $reference Reference\n     */\n    private function writeVMLHeaderFooterImage(XMLWriter $objWriter, string $reference, HeaderFooterDrawing $image): void\n    {\n        // Calculate object id\n        if (!Preg::isMatch('{(\\d+)}', md5($reference), $m)) {\n            // @codeCoverageIgnoreStart\n            throw new WriterException('Regexp failure in writeVMLHeaderFooterImage');\n            // @codeCoverageIgnoreEnd\n        }\n        $id = 1500 + ((int) substr($m[1], 0, 2) * 1);\n\n        // Calculate offset\n        $width = $image->getWidth();\n        $height = $image->getHeight();\n        $marginLeft = $image->getOffsetX();\n        $marginTop = $image->getOffsetY();\n\n        // v:shape\n        $objWriter->startElement('v:shape');\n        $objWriter->writeAttribute('id', $reference);\n        $objWriter->writeAttribute('o:spid', '_x0000_s' . $id);\n        $objWriter->writeAttribute('type', '#_x0000_t75');\n        $objWriter->writeAttribute('style', \"position:absolute;margin-left:{$marginLeft}px;margin-top:{$marginTop}px;width:{$width}px;height:{$height}px;z-index:1\");\n\n        // v:imagedata\n        $objWriter->startElement('v:imagedata');\n        $objWriter->writeAttribute('o:relid', 'rId' . $reference);\n        $objWriter->writeAttribute('o:title', $image->getName());\n        $objWriter->endElement();\n\n        // o:lock\n        $objWriter->startElement('o:lock');\n        $objWriter->writeAttribute('v:ext', 'edit');\n        $objWriter->writeAttribute('textRotation', 't');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Get an array of all drawings.\n     *\n     * @return BaseDrawing[] All drawings in PhpSpreadsheet\n     */\n    public function allDrawings(Spreadsheet $spreadsheet): array\n    {\n        // Get an array of all drawings\n        $aDrawings = [];\n\n        // Loop through PhpSpreadsheet\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            // Loop through images and add to array\n            $iterator = $spreadsheet->getSheet($i)->getDrawingCollection()->getIterator();\n            while ($iterator->valid()) {\n                $aDrawings[] = $iterator->current();\n\n                $iterator->next();\n            }\n            $iterator = $spreadsheet->getSheet($i)->getInCellDrawingCollection()->getIterator();\n            while ($iterator->valid()) {\n                $aDrawings[] = $iterator->current();\n\n                $iterator->next();\n            }\n        }\n\n        return $aDrawings;\n    }\n\n    private function writeHyperLinkDrawing(XMLWriter $objWriter, ?int $hlinkClickId): void\n    {\n        if ($hlinkClickId === null) {\n            return;\n        }\n\n        $objWriter->startElement('a:hlinkClick');\n        $objWriter->writeAttribute('xmlns:r', Namespaces::SCHEMA_OFFICE_DOCUMENT);\n        $objWriter->writeAttribute('r:id', 'rId' . $hlinkClickId);\n        $objWriter->endElement();\n    }\n\n    private static function stringEmu(int $pixelValue): string\n    {\n        return (string) SharedDrawing::pixelsToEMU($pixelValue);\n    }\n\n    private static function writeAttributeIf(XMLWriter $objWriter, ?bool $condition, string $attr, string $val): void\n    {\n        if ($condition) {\n            $objWriter->writeAttribute($attr, $val);\n        }\n    }\n\n    /**\n     * Get pass-through drawing XML if available.\n     *\n     * Returns the original drawing XML stored during load (when Reader pass-through was enabled).\n     * This preserves unsupported drawing elements (shapes, textboxes) that PhpSpreadsheet cannot parse.\n     *\n     * @return ?string The pass-through XML, or null if not available or should not be used\n     */\n    private function getPassThroughDrawingXml(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet): ?string\n    {\n        /** @var array<string, array<string, mixed>> $sheets */\n        $sheets = $worksheet->getParentOrThrow()->getUnparsedLoadedData()['sheets'] ?? [];\n        $sheetData = $sheets[$worksheet->getCodeName()] ?? [];\n        // Only use pass-through XML if the Reader flag was explicitly enabled\n        /** @var string[] $drawings */\n        $drawings = $sheetData['Drawings'] ?? [];\n        if (($sheetData['drawingPassThroughEnabled'] ?? false) !== true || $drawings === []) {\n            return null;\n        }\n\n        return reset($drawings) ?: null;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/FeaturePropertyBag.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass FeaturePropertyBag extends WriterPart\n{\n    public function writeFeaturePropertyBag(Spreadsheet $spreadsheet): string\n    {\n        if (!$spreadsheet->getUsesCheckBoxStyle()) {\n            return '';\n        }\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Types\n        $objWriter->startElement('FeaturePropertyBags');\n        $objWriter->writeAttribute('xmlns', Namespaces::FEATURE_PROPERTY_BAG);\n\n        $objWriter->startElement('bag');\n        $objWriter->writeAttribute('type', 'Checkbox');\n        $objWriter->endElement(); // bag type=Checkbox\n\n        $objWriter->startElement('bag');\n        $objWriter->writeAttribute('type', 'XFControls');\n        $objWriter->startElement('bagId');\n        $objWriter->writeAttribute('k', 'CellControl');\n        $objWriter->text('0');\n        $objWriter->endElement(); // bagid\n        $objWriter->endElement(); // bag type=XFControls\n\n        $objWriter->startElement('bag');\n        $objWriter->writeAttribute('type', 'XFComplement');\n        $objWriter->startElement('bagId');\n        $objWriter->writeAttribute('k', 'XFControls');\n        $objWriter->text('1');\n        $objWriter->endElement(); // bagid\n        $objWriter->endElement(); // bag type=XFComplement\n\n        $objWriter->startElement('bag');\n        $objWriter->writeAttribute('type', 'XFComplements');\n        $objWriter->writeAttribute('extRef', 'XFComplementsMapperExtRef');\n        $objWriter->startElement('a');\n        $objWriter->writeAttribute('k', 'MappedFeaturePropertyBags');\n        $objWriter->startElement('bagId');\n        $objWriter->text('2');\n        $objWriter->endElement(); // bagid\n        $objWriter->endElement(); // a\n        $objWriter->endElement(); // bag type=XFComplements\n\n        $objWriter->endElement(); // FeaturePropertyBags\n\n        return $objWriter->getData();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/FunctionPrefix.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FunctionPrefix\n{\n    const XLFNREGEXP = '/(?:_xlfn\\.)?((?:_xlws\\.)?\\b('\n        // functions added with Excel 2010\n        . 'beta[.]dist'\n        . '|beta[.]inv'\n        . '|binom[.]dist'\n        . '|binom[.]inv'\n        . '|ceiling[.]precise'\n        . '|chisq[.]dist'\n        . '|chisq[.]dist[.]rt'\n        . '|chisq[.]inv'\n        . '|chisq[.]inv[.]rt'\n        . '|chisq[.]test'\n        . '|confidence[.]norm'\n        . '|confidence[.]t'\n        . '|covariance[.]p'\n        . '|covariance[.]s'\n        . '|erf[.]precise'\n        . '|erfc[.]precise'\n        . '|expon[.]dist'\n        . '|f[.]dist'\n        . '|f[.]dist[.]rt'\n        . '|f[.]inv'\n        . '|f[.]inv[.]rt'\n        . '|f[.]test'\n        . '|floor[.]precise'\n        . '|gamma[.]dist'\n        . '|gamma[.]inv'\n        . '|gammaln[.]precise'\n        . '|lognorm[.]dist'\n        . '|lognorm[.]inv'\n        . '|mode[.]mult'\n        . '|mode[.]sngl'\n        . '|negbinom[.]dist'\n        . '|networkdays[.]intl'\n        . '|norm[.]dist'\n        . '|norm[.]inv'\n        . '|norm[.]s[.]dist'\n        . '|norm[.]s[.]inv'\n        . '|percentile[.]exc'\n        . '|percentile[.]inc'\n        . '|percentrank[.]exc'\n        . '|percentrank[.]inc'\n        . '|poisson[.]dist'\n        . '|quartile[.]exc'\n        . '|quartile[.]inc'\n        . '|rank[.]avg'\n        . '|rank[.]eq'\n        . '|stdev[.]p'\n        . '|stdev[.]s'\n        . '|t[.]dist'\n        . '|t[.]dist[.]2t'\n        . '|t[.]dist[.]rt'\n        . '|t[.]inv'\n        . '|t[.]inv[.]2t'\n        . '|t[.]test'\n        . '|var[.]p'\n        . '|var[.]s'\n        . '|weibull[.]dist'\n        . '|z[.]test'\n        // probably added with Excel 2010 but not properly documented\n        . '|base'\n        // functions added with Excel 2013\n        . '|acot'\n        . '|acoth'\n        . '|arabic'\n        . '|averageifs'\n        . '|binom[.]dist[.]range'\n        . '|bitand'\n        . '|bitlshift'\n        . '|bitor'\n        . '|bitrshift'\n        . '|bitxor'\n        . '|ceiling[.]math'\n        . '|combina'\n        . '|cot'\n        . '|coth'\n        . '|csc'\n        . '|csch'\n        . '|days'\n        . '|dbcs'\n        . '|decimal'\n        . '|encodeurl'\n        . '|filterxml'\n        . '|floor[.]math'\n        . '|formulatext'\n        . '|gamma'\n        . '|gauss'\n        . '|ifna'\n        . '|imcosh'\n        . '|imcot'\n        . '|imcsc'\n        . '|imcsch'\n        . '|imsec'\n        . '|imsech'\n        . '|imsinh'\n        . '|imtan'\n        . '|isformula'\n        . '|iso[.]ceiling'\n        . '|isoweeknum'\n        . '|munit'\n        . '|numbervalue'\n        . '|pduration'\n        . '|permutationa'\n        . '|phi'\n        . '|rri'\n        . '|sec'\n        . '|sech'\n        . '|sheet'\n        . '|sheets'\n        . '|skew[.]p'\n        . '|unichar'\n        . '|unicode'\n        . '|webservice'\n        . '|xor'\n        // functions added with Excel 2016\n        . '|forecast[.]et2'\n        . '|forecast[.]ets[.]confint'\n        . '|forecast[.]ets[.]seasonality'\n        . '|forecast[.]ets[.]stat'\n        . '|forecast[.]linear'\n        . '|switch'\n        // functions added with Excel 2019\n        . '|concat'\n        . '|ifs'\n        . '|maxifs'\n        . '|minifs'\n        . '|textjoin'\n        // functions added with Excel 365\n        . '|anchorarray'\n        . '|arraytotext'\n        . '|bycol'\n        . '|byrow'\n        . '|call'\n        . '|choosecols'\n        . '|chooserows'\n        . '|drop'\n        . '|expand'\n        . '|filter'\n        . '|groupby'\n        . '|hstack'\n        . '|isomitted'\n        . '|lambda'\n        . '|let'\n        . '|makearray'\n        . '|map'\n        . '|randarray'\n        . '|reduce'\n        . '|register[.]id'\n        . '|scan'\n        . '|sequence'\n        . '|single'\n        . '|sort'\n        . '|sortby'\n        . '|take'\n        . '|textafter'\n        . '|textbefore'\n        . '|textjoin'\n        . '|textsplit'\n        . '|tocol'\n        . '|torow'\n        . '|unique'\n        . '|valuetotext'\n        . '|vstack'\n        . '|wrapcols'\n        . '|wraprows'\n        . '|xlookup'\n        . '|xmatch'\n        . '))\\s*\\(/Umui';\n\n    const XLWSREGEXP = '/(?<!_xlws\\.)('\n        // functions added with Excel 365\n        . 'filter'\n        . '|sort'\n        . ')\\s*\\(/mui';\n\n    /**\n     * Prefix function name in string with _xlfn. where required.\n     */\n    protected static function addXlfnPrefix(string $functionString): string\n    {\n        return Preg::replace(self::XLFNREGEXP, '_xlfn.$1(', $functionString);\n    }\n\n    /**\n     * Prefix function name in string with _xlws. where required.\n     */\n    protected static function addXlwsPrefix(string $functionString): string\n    {\n        return Preg::replace(self::XLWSREGEXP, '_xlws.$1(', $functionString);\n    }\n\n    /**\n     * Prefix function name in string with _xlfn. where required.\n     */\n    public static function addFunctionPrefix(string $functionString): string\n    {\n        $functionString = Preg::replaceCallback(\n            Calculation::CALCULATION_REGEXP_CELLREF_SPILL,\n            fn (array $matches) => 'ANCHORARRAY(' . substr((string) $matches[0], 0, -1) . ')',\n            $functionString\n        );\n\n        return self::addXlwsPrefix(self::addXlfnPrefix($functionString));\n    }\n\n    /**\n     * Prefix function name in string with _xlfn. where required.\n     * Leading character, expected to be equals sign, is stripped.\n     */\n    public static function addFunctionPrefixStripEquals(string $functionString): string\n    {\n        $functionString = Preg::replace(\n            [\n                '/\\b(CEILING|FLOOR)[.]ODS\\s*[(]/',\n                '/\\b(CEILING|FLOOR)[.]XCL\\s*[(]/',\n            ],\n            [\n                '$1.MATH(',\n                '$1(',\n            ],\n            $functionString\n        );\n\n        return self::addFunctionPrefix(substr($functionString, 1));\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Metadata.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\n\nclass Metadata extends WriterPart\n{\n    /**\n     * Write content types to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeMetadata(int $richDataCount = 0): string\n    {\n        if (!$this->getParentWriter()->useDynamicArrays() && $richDataCount === 0) {\n            return '';\n        }\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Types\n        $objWriter->startElement('metadata');\n        $objWriter->writeAttribute('xmlns', Namespaces::MAIN);\n        $objWriter->writeAttribute('xmlns:xlrd', Namespaces::DYNAMIC_ARRAY_RICHDATA);\n\n        if (!$this->getParentWriter()->useDynamicArrays()) {\n            $objWriter->startElement('metadataTypes');\n            $objWriter->writeAttribute('count', '1');\n            $this->writeMetadataType($objWriter, 'XLRICHVALUE', false);\n            $objWriter->endElement(); // metadataTypes\n\n            $this->writeFutureMetadataXLRICHVALUE($objWriter, $richDataCount);\n            $this->writeValueMetadata($objWriter, $richDataCount);\n        } else {\n            $objWriter->writeAttribute('xmlns:xda', Namespaces::DYNAMIC_ARRAY);\n            $objWriter->startElement('metadataTypes');\n            $objWriter->writeAttribute('count', '2');\n            $this->writeMetadataType($objWriter, 'XLDAPR');\n            $this->writeMetadataType($objWriter, 'XLRICHVALUE', false);\n            $objWriter->endElement(); // metadataTypes\n\n            $this->writeFutureMetadataXLDAPR($objWriter, 1);\n            $this->writeFutureMetadataXLRICHVALUE($objWriter, $richDataCount ?: 1);\n            $this->writeCellMetadata($objWriter, 1);\n            $this->writeValueMetadata($objWriter, ($richDataCount === 0) ? 1 : $richDataCount, 2);\n        }\n\n        $objWriter->endElement(); // metadata\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    private function writeMetadataType(XMLWriter $objWriter, string $name, bool $cellMeta = true): void\n    {\n        $objWriter->startElement('metadataType');\n        $objWriter->writeAttribute('name', $name);\n        $objWriter->writeAttribute('minSupportedVersion', '120000');\n        $objWriter->writeAttribute('copy', '1');\n        $objWriter->writeAttribute('pasteAll', '1');\n        $objWriter->writeAttribute('pasteValues', '1');\n        $objWriter->writeAttribute('merge', '1');\n        $objWriter->writeAttribute('splitFirst', '1');\n        $objWriter->writeAttribute('rowColShift', '1');\n        $objWriter->writeAttribute('clearFormats', '1');\n        $objWriter->writeAttribute('clearComments', '1');\n        $objWriter->writeAttribute('assign', '1');\n        $objWriter->writeAttribute('coerce', '1');\n\n        if ($cellMeta) {\n            $objWriter->writeAttribute('cellMeta', '1');\n        }\n        $objWriter->endElement();\n    }\n\n    private function writeFutureMetadataXLDAPR(XMLWriter $objWriter, int $count = 1): void\n    {\n        $objWriter->startElement('futureMetadata');\n        $objWriter->writeAttribute('name', 'XLDAPR');\n        $objWriter->writeAttribute('count', (string) $count);\n\n        for ($index = 0; $index < $count; ++$index) {\n            $objWriter->startElement('bk');\n            $objWriter->startElement('extLst');\n            $objWriter->startElement('ext');\n            $objWriter->writeAttribute('uri', '{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}');\n            $objWriter->startElement('xda:dynamicArrayProperties');\n            $objWriter->writeAttribute('fDynamic', '1');\n            $objWriter->writeAttribute('fCollapsed', '0');\n            $objWriter->endElement(); // xda:dynamicArrayProperties\n            $objWriter->endElement(); // ext\n            $objWriter->endElement(); // extLst\n            $objWriter->endElement(); // bk\n        }\n        $objWriter->endElement(); // futureMetadata XLDAPR\n    }\n\n    private function writeFutureMetadataXLRICHVALUE(XMLWriter $objWriter, int $count): void\n    {\n        $objWriter->startElement('futureMetadata');\n        $objWriter->writeAttribute('name', 'XLRICHVALUE');\n        $objWriter->writeAttribute('count', (string) $count);\n\n        for ($index = 0; $index < $count; ++$index) {\n            $objWriter->startElement('bk');\n            $objWriter->startElement('extLst');\n            $objWriter->startElement('ext');\n            $objWriter->writeAttribute('uri', '{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}');\n            $objWriter->startElement('xlrd:rvb');\n            $objWriter->writeAttribute('i', (string) $index);\n            $objWriter->endElement(); // xlrd:rvb\n            $objWriter->endElement(); // ext\n            $objWriter->endElement(); // extLst\n            $objWriter->endElement(); // bk\n        }\n        $objWriter->endElement(); // futureMetadata XLRICHVALUE\n    }\n\n    private function writeCellMetadata(XMLWriter $objWriter, int $count = 1, int $t = 1): void\n    {\n        $objWriter->startElement('cellMetadata');\n        $objWriter->writeAttribute('count', (string) $count);\n\n        for ($index = 0; $index < $count; ++$index) {\n            $objWriter->startElement('bk');\n            $objWriter->startElement('rc');\n            $objWriter->writeAttribute('t', (string) $t);\n            $objWriter->writeAttribute('v', (string) $index);\n            $objWriter->endElement(); // rc\n            $objWriter->endElement(); // bk\n        }\n        $objWriter->endElement(); // cellMetadata\n    }\n\n    private function writeValueMetadata(XMLWriter $objWriter, int $count = 1, int $t = 1): void\n    {\n        $objWriter->startElement('valueMetadata');\n        $objWriter->writeAttribute('count', (string) $count);\n\n        for ($index = 0; $index < $count; ++$index) {\n            $objWriter->startElement('bk');\n            $objWriter->startElement('rc');\n            $objWriter->writeAttribute('t', (string) $t);\n            $objWriter->writeAttribute('v', (string) $index);\n            $objWriter->endElement(); // rc\n            $objWriter->endElement(); // bk\n        }\n        $objWriter->endElement(); // valueMetadata\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Rels.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\n\nclass Rels extends WriterPart\n{\n    /**\n     * Write relationships to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeRelationships(Spreadsheet $spreadsheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Relationships\n        $objWriter->startElement('Relationships');\n        $objWriter->writeAttribute('xmlns', Namespaces::RELATIONSHIPS);\n\n        $customPropertyList = $spreadsheet->getProperties()->getCustomProperties();\n        if (!empty($customPropertyList)) {\n            // Relationship docProps/app.xml\n            $this->writeRelationship(\n                $objWriter,\n                4,\n                Namespaces::RELATIONSHIPS_CUSTOM_PROPERTIES,\n                'docProps/custom.xml'\n            );\n        }\n\n        // Relationship docProps/app.xml\n        $this->writeRelationship(\n            $objWriter,\n            3,\n            Namespaces::RELATIONSHIPS_EXTENDED_PROPERTIES,\n            'docProps/app.xml'\n        );\n\n        // Relationship docProps/core.xml\n        $this->writeRelationship(\n            $objWriter,\n            2,\n            Namespaces::CORE_PROPERTIES,\n            'docProps/core.xml'\n        );\n\n        // Relationship xl/workbook.xml\n        $this->writeRelationship(\n            $objWriter,\n            1,\n            Namespaces::OFFICE_DOCUMENT,\n            'xl/workbook.xml'\n        );\n        // a custom UI in workbook ?\n        $target = $spreadsheet->getRibbonXMLData('target');\n        if ($spreadsheet->hasRibbon()) {\n            $this->writeRelationShip(\n                $objWriter,\n                5,\n                Namespaces::EXTENSIBILITY,\n                is_string($target) ? $target : ''\n            );\n        }\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write workbook relationships to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeWorkbookRelationships(Spreadsheet $spreadsheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Relationships\n        $objWriter->startElement('Relationships');\n        $objWriter->writeAttribute('xmlns', Namespaces::RELATIONSHIPS);\n\n        // Relationship styles.xml\n        $this->writeRelationship(\n            $objWriter,\n            1,\n            Namespaces::STYLES,\n            'styles.xml'\n        );\n\n        // Relationship theme/theme1.xml\n        $this->writeRelationship(\n            $objWriter,\n            2,\n            Namespaces::THEME2,\n            'theme/theme1.xml'\n        );\n\n        // Relationship sharedStrings.xml\n        $this->writeRelationship(\n            $objWriter,\n            3,\n            Namespaces::SHARED_STRINGS,\n            'sharedStrings.xml'\n        );\n\n        // Relationships with sheets\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            $this->writeRelationship(\n                $objWriter,\n                ($i + 1 + 3),\n                Namespaces::WORKSHEET,\n                'worksheets/sheet' . ($i + 1) . '.xml'\n            );\n        }\n        // Relationships for vbaProject if needed\n        // id : just after the last sheet\n        if ($spreadsheet->hasMacros()) {\n            $this->writeRelationShip(\n                $objWriter,\n                ($i + 1 + 3),\n                Namespaces::VBA,\n                'vbaProject.bin'\n            );\n            ++$i; //increment i if needed for another relation\n        }\n\n        // Metadata needed for Dynamic Arrays\n        if ($this->getParentWriter()->useDynamicArrays() || $spreadsheet->hasInCellDrawings()) {\n            $this->writeRelationShip(\n                $objWriter,\n                ($i + 1 + 3),\n                Namespaces::RELATIONSHIPS_METADATA,\n                'metadata.xml'\n            );\n            ++$i; //increment i if needed for another relation\n        }\n\n        if ($spreadsheet->getActiveSheet()->getInCellDrawingCollection()->count() > 0) {\n            $i = ($i + 1 + 3);\n            $this->writeRelationship($objWriter, $i, Namespaces::RELATIONSHIPS_RICH_VALUE, 'richData/rdrichvalue.xml');\n            $this->writeRelationship($objWriter, ++$i, Namespaces::RELATIONSHIPS_RICH_VALUE_STRUCTURE, 'richData/rdrichvaluestructure.xml');\n            $this->writeRelationship($objWriter, ++$i, Namespaces::RELATIONSHIPS_RICH_VALUE_TYPES, 'richData/rdRichValueTypes.xml');\n            $this->writeRelationship($objWriter, ++$i, Namespaces::RELATIONSHIPS_RICH_VALUE_REL, 'richData/richValueRel.xml');\n        }\n\n        if ($spreadsheet->getUsesCheckBoxStyle()) {\n            $this->writeRelationship($objWriter, 'Fpb', Namespaces::RELATIONSHIPS_FEATURE_PROPERTY_BAG, 'featurePropertyBag/featurePropertyBag.xml');\n        }\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write worksheet relationships to XML format.\n     *\n     * Numbering is as follows:\n     *     rId1                 - Drawings\n     *  rId_hyperlink_x     - Hyperlinks\n     *\n     * @param bool $includeCharts Flag indicating if we should write charts\n     * @param int $tableRef Table ID\n     * @param string[] $zipContent\n     *\n     * @return string XML Output\n     */\n    public function writeWorksheetRelationships(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet, int $worksheetId = 1, bool $includeCharts = false, int $tableRef = 1, array &$zipContent = []): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Relationships\n        $objWriter->startElement('Relationships');\n        $objWriter->writeAttribute('xmlns', Namespaces::RELATIONSHIPS);\n\n        // Write drawing relationships?\n        $drawingOriginalIds = [];\n        /** @var string[][][][] */\n        $unparsedLoadedData = $worksheet->getParentOrThrow()->getUnparsedLoadedData();\n        if (isset($unparsedLoadedData['sheets'][$worksheet->getCodeName()]['drawingOriginalIds'])) {\n            $drawingOriginalIds = $unparsedLoadedData['sheets'][$worksheet->getCodeName()]['drawingOriginalIds'];\n        }\n\n        if ($includeCharts) {\n            $charts = $worksheet->getChartCollection();\n        } else {\n            $charts = [];\n        }\n\n        if (($worksheet->getDrawingCollection()->count() > 0) || (count($charts) > 0) || $drawingOriginalIds) {\n            $rId = 1;\n\n            // Use original $relPath to get original $rId.\n            // Take first. In future can be overwritten.\n            // (! synchronize with \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Worksheet::writeDrawings)\n            reset($drawingOriginalIds);\n            $relPath = key($drawingOriginalIds);\n            if (isset($relPath, $drawingOriginalIds[$relPath])) {\n                $rId = (int) (substr($drawingOriginalIds[$relPath], 3));\n            }\n\n            // Generate new $relPath to write drawing relationship\n            $relPath = '../drawings/drawing' . $worksheetId . '.xml';\n            $this->writeRelationship(\n                $objWriter,\n                $rId,\n                Namespaces::RELATIONSHIPS_DRAWING,\n                $relPath\n            );\n        }\n\n        $backgroundImage = $worksheet->getBackgroundImage();\n        if ($backgroundImage !== '') {\n            $rId = 'Bg';\n            $uniqueName = md5(mt_rand(0, 9999) . time() . mt_rand(0, 9999));\n            $relPath = \"../media/$uniqueName.\" . $worksheet->getBackgroundExtension();\n            $this->writeRelationship(\n                $objWriter,\n                $rId,\n                Namespaces::IMAGE,\n                $relPath\n            );\n            $zipContent[\"xl/media/$uniqueName.\" . $worksheet->getBackgroundExtension()] = $backgroundImage;\n        }\n\n        // Write hyperlink relationships?\n        $i = 1;\n        foreach ($worksheet->getHyperlinkCollection() as $hyperlink) {\n            if (!$hyperlink->isInternal()) {\n                $this->writeRelationship(\n                    $objWriter,\n                    '_hyperlink_' . $i,\n                    Namespaces::HYPERLINK,\n                    $hyperlink->getUrl(),\n                    'External'\n                );\n\n                ++$i;\n            }\n        }\n\n        // Write comments relationship?\n        $i = 1;\n        if (count($worksheet->getComments()) > 0 || isset($unparsedLoadedData['sheets'][$worksheet->getCodeName()]['legacyDrawing'])) {\n            $this->writeRelationship(\n                $objWriter,\n                '_comments_vml' . $i,\n                Namespaces::VML,\n                '../drawings/vmlDrawing' . $worksheetId . '.vml'\n            );\n        }\n\n        if (count($worksheet->getComments()) > 0) {\n            $this->writeRelationship(\n                $objWriter,\n                '_comments' . $i,\n                Namespaces::COMMENTS,\n                '../comments' . $worksheetId . '.xml'\n            );\n        }\n\n        // Write Table\n        $tableCount = $worksheet->getTableCollection()->count();\n        for ($i = 1; $i <= $tableCount; ++$i) {\n            $this->writeRelationship(\n                $objWriter,\n                '_table_' . $i,\n                Namespaces::RELATIONSHIPS_TABLE,\n                '../tables/table' . $tableRef++ . '.xml'\n            );\n        }\n\n        // Write header/footer relationship?\n        $i = 1;\n        if (count($worksheet->getHeaderFooter()->getImages()) > 0) {\n            $this->writeRelationship(\n                $objWriter,\n                '_headerfooter_vml' . $i,\n                Namespaces::VML,\n                '../drawings/vmlDrawingHF' . $worksheetId . '.vml'\n            );\n        }\n\n        $this->writeUnparsedRelationship($worksheet, $objWriter, 'ctrlProps', Namespaces::RELATIONSHIPS_CTRLPROP);\n        $this->writeUnparsedRelationship($worksheet, $objWriter, 'vmlDrawings', Namespaces::VML);\n        $this->writeUnparsedRelationship($worksheet, $objWriter, 'printerSettings', Namespaces::RELATIONSHIPS_PRINTER_SETTINGS);\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    private function writeUnparsedRelationship(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet, XMLWriter $objWriter, string $relationship, string $type): void\n    {\n        /** @var mixed[][][][] */\n        $unparsedLoadedData = $worksheet->getParentOrThrow()->getUnparsedLoadedData();\n        if (!isset($unparsedLoadedData['sheets'][$worksheet->getCodeName()][$relationship])) {\n            return;\n        }\n\n        foreach ($unparsedLoadedData['sheets'][$worksheet->getCodeName()][$relationship] as $rId => $value) {\n            if (!str_starts_with($rId, '_headerfooter_vml')) {\n                /** @var string[] $value */\n                $this->writeRelationship(\n                    $objWriter,\n                    $rId,\n                    $type,\n                    $value['relFilePath']\n                );\n            }\n        }\n    }\n\n    /**\n     * Write drawing relationships to XML format.\n     *\n     * @param int $chartRef Chart ID\n     * @param bool $includeCharts Flag indicating if we should write charts\n     *\n     * @return string XML Output\n     */\n    public function writeDrawingRelationships(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet, int &$chartRef, bool $includeCharts = false): string\n    {\n        // Check if we should use pass-through relationships\n        $passThroughRels = $this->getPassThroughDrawingRelationships($worksheet);\n        if ($passThroughRels !== null) {\n            return $passThroughRels;\n        }\n\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Relationships\n        $objWriter->startElement('Relationships');\n        $objWriter->writeAttribute('xmlns', Namespaces::RELATIONSHIPS);\n\n        // Loop through images and write relationships\n        $i = 1;\n        $iterator = $worksheet->getDrawingCollection()->getIterator();\n        while ($iterator->valid()) {\n            $drawing = $iterator->current();\n            if (\n                $drawing instanceof \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing\n                || $drawing instanceof MemoryDrawing\n            ) {\n                // Write relationship for image drawing\n                $this->writeRelationship(\n                    $objWriter,\n                    $i,\n                    Namespaces::IMAGE,\n                    '../media/' . $drawing->getIndexedFilename()\n                );\n\n                $i = $this->writeDrawingHyperLink($objWriter, $drawing, $i);\n            }\n\n            $iterator->next();\n            ++$i;\n        }\n\n        if ($includeCharts) {\n            // Loop through charts and write relationships\n            $chartCount = $worksheet->getChartCount();\n            if ($chartCount > 0) {\n                for ($c = 0; $c < $chartCount; ++$c) {\n                    $this->writeRelationship(\n                        $objWriter,\n                        $i++,\n                        Namespaces::RELATIONSHIPS_CHART,\n                        '../charts/chart' . ++$chartRef . '.xml'\n                    );\n                }\n            }\n        }\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write header/footer drawing relationships to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeHeaderFooterDrawingRelationships(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Relationships\n        $objWriter->startElement('Relationships');\n        $objWriter->writeAttribute('xmlns', Namespaces::RELATIONSHIPS);\n\n        // Loop through images and write relationships\n        foreach ($worksheet->getHeaderFooter()->getImages() as $key => $value) {\n            // Write relationship for image drawing\n            $this->writeRelationship(\n                $objWriter,\n                $key,\n                Namespaces::IMAGE,\n                '../media/' . $value->getIndexedFilename()\n            );\n        }\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    public function writeVMLDrawingRelationships(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Relationships\n        $objWriter->startElement('Relationships');\n        $objWriter->writeAttribute('xmlns', Namespaces::RELATIONSHIPS);\n\n        // Loop through images and write relationships\n        foreach ($worksheet->getComments() as $comment) {\n            if (!$comment->hasBackgroundImage()) {\n                continue;\n            }\n\n            $bgImage = $comment->getBackgroundImage();\n            $this->writeRelationship(\n                $objWriter,\n                $bgImage->getImageIndex(),\n                Namespaces::IMAGE,\n                '../media/' . $bgImage->getMediaFilename()\n            );\n        }\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write Override content type.\n     *\n     * @param int|string $id Relationship ID. rId will be prepended!\n     * @param string $type Relationship type\n     * @param string $target Relationship target\n     * @param string $targetMode Relationship target mode\n     */\n    private function writeRelationship(XMLWriter $objWriter, $id, string $type, string $target, string $targetMode = ''): void\n    {\n        if ($type != '' && $target != '') {\n            // Write relationship\n            $objWriter->startElement('Relationship');\n            $objWriter->writeAttribute('Id', 'rId' . $id);\n            $objWriter->writeAttribute('Type', $type);\n            $objWriter->writeAttribute('Target', $target);\n\n            if ($targetMode != '') {\n                $objWriter->writeAttribute('TargetMode', $targetMode);\n            }\n\n            $objWriter->endElement();\n        } else {\n            throw new WriterException('Invalid parameters passed.');\n        }\n    }\n\n    private function writeDrawingHyperLink(XMLWriter $objWriter, BaseDrawing $drawing, int $i): int\n    {\n        if ($drawing->getHyperlink() === null) {\n            return $i;\n        }\n\n        ++$i;\n        $this->writeRelationship(\n            $objWriter,\n            $i,\n            Namespaces::HYPERLINK,\n            Preg::replace('~^sheet://~', '#', $drawing->getHyperlink()->getUrl()),\n            $drawing->getHyperlink()->getTypeHyperlink()\n        );\n\n        return $i;\n    }\n\n    /**\n     * Get pass-through drawing relationships XML if available.\n     *\n     * Note: When pass-through is used, the original relationships are returned as-is.\n     * This means any drawings (images, charts, shapes) added programmatically after\n     * loading will not be included in the relationships. This is a known limitation\n     * when combining pass-through with drawing modifications.\n     */\n    private function getPassThroughDrawingRelationships(\\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet $worksheet): ?string\n    {\n        /** @var array<string, array<string, mixed>> $sheets */\n        $sheets = $worksheet->getParentOrThrow()->getUnparsedLoadedData()['sheets'] ?? [];\n        $sheetData = $sheets[$worksheet->getCodeName()] ?? [];\n        if (($sheetData['drawingPassThroughEnabled'] ?? false) !== true || !is_string($sheetData['drawingRelationships'] ?? null)) {\n            return null;\n        }\n\n        return $sheetData['drawingRelationships'];\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass RelsRibbon extends WriterPart\n{\n    /**\n     * Write relationships for additional objects of custom UI (ribbon).\n     *\n     * @return string XML Output\n     */\n    public function writeRibbonRelationships(Spreadsheet $spreadsheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Relationships\n        $objWriter->startElement('Relationships');\n        $objWriter->writeAttribute('xmlns', Namespaces::RELATIONSHIPS);\n        $localRels = $spreadsheet->getRibbonBinObjects('names');\n        if (is_array($localRels)) {\n            foreach ($localRels as $aId => $aTarget) {\n                $objWriter->startElement('Relationship');\n                $objWriter->writeAttribute('Id', $aId);\n                $objWriter->writeAttribute('Type', Namespaces::IMAGE);\n                /** @var string $aTarget */\n                $objWriter->writeAttribute('Target', $aTarget);\n                $objWriter->endElement();\n            }\n        }\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\n\nclass RelsVBA extends WriterPart\n{\n    /**\n     * Write relationships for a signed VBA Project.\n     *\n     * @return string XML Output\n     */\n    public function writeVBARelationships(): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Relationships\n        $objWriter->startElement('Relationships');\n        $objWriter->writeAttribute('xmlns', Namespaces::RELATIONSHIPS);\n        $objWriter->startElement('Relationship');\n        $objWriter->writeAttribute('Id', 'rId1');\n        $objWriter->writeAttribute('Type', Namespaces::VBA_SIGNATURE);\n        $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin');\n        $objWriter->endElement();\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\n\nclass RichDataDrawing\n{\n    /** @var Drawing[] */\n    private array $drawings = [];\n\n    /**\n     * Generate all Rich Data XML files.\n     *\n     * @return array<string,string> [path => XML content]\n     */\n    public function generateFiles(Spreadsheet $spreadsheet): array\n    {\n        $worksheetCount = $spreadsheet->getSheetCount();\n\n        $index = 0;\n        for ($i = 0; $i < $worksheetCount; ++$i) {\n            $worksheet = $spreadsheet->getSheet($i);\n            $iterator = $worksheet->getInCellDrawingCollection()->getIterator();\n            while ($iterator->valid()) {\n                /** @var Drawing $pDrawing */\n                $pDrawing = $iterator->current();\n                $indexedFilename = $pDrawing->getIndexedFilename();\n                if (!isset($this->drawings[$indexedFilename])) {\n                    $pDrawing->setIndex(++$index);\n                    $this->drawings[$indexedFilename] = $pDrawing;\n                } else {\n                    $pDrawing->setIndex($this->drawings[$indexedFilename]->getIndex());\n                }\n                $iterator->next();\n            }\n        }\n\n        return (count($this->drawings) === 0) ? [] : [\n            'xl/richData/rdrichvalue.xml' => $this->writeRdrichvalueXML(),\n            'xl/richData/rdrichvaluestructure.xml' => $this->writeRdrichvaluestructureXML(),\n            'xl/richData/rdRichValueTypes.xml' => $this->writeRdRichValueTypesXML(),\n            'xl/richData/richValueRel.xml' => $this->writeRichValueRelXML(),\n            'xl/richData/_rels/richValueRel.xml.rels' => $this->writeRichValueRelRelsXML(),\n        ];\n    }\n\n    /**\n     * @return Drawing[]\n     */\n    public function getDrawings(): array\n    {\n        return $this->drawings;\n    }\n\n    private function writeRdrichvalueXML(): string\n    {\n        $xml = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        $xml->startDocument('1.0', 'UTF-8', 'yes');\n        $xml->startElement('rvData');\n        $xml->writeAttribute('xmlns', 'http://schemas.microsoft.com/office/spreadsheetml/2017/richdata');\n        $xml->writeAttribute('count', (string) count($this->drawings));\n\n        $index = 0;\n        foreach ($this->drawings as $drawing) {\n            $xml->startElement('rv');\n            $xml->writeAttribute('s', '0');\n            $xml->writeElement('v', (string) $index++);\n            $xml->writeElement('v', '5');\n            $xml->endElement(); // rv\n        }\n\n        $xml->endElement(); // rvData\n\n        return $xml->getData();\n    }\n\n    private function writeRdrichvaluestructureXML(): string\n    {\n        $xml = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        $xml->startDocument('1.0', 'UTF-8', 'yes');\n        $xml->startElement('rvStructures');\n        $xml->writeAttribute('xmlns', 'http://schemas.microsoft.com/office/spreadsheetml/2017/richdata');\n        $xml->writeAttribute('count', '1');\n\n        $xml->startElement('s');\n        $xml->writeAttribute('t', '_localImage');\n\n        $xml->startElement('k');\n        $xml->writeAttribute('n', '_rvRel:LocalImageIdentifier');\n        $xml->writeAttribute('t', 'i');\n        $xml->endElement();\n\n        $xml->startElement('k');\n        $xml->writeAttribute('n', 'CalcOrigin');\n        $xml->writeAttribute('t', 'i');\n        $xml->endElement();\n\n        $xml->endElement(); // s\n\n        $xml->endElement(); // rvStructures\n\n        return $xml->getData();\n    }\n\n    private function writeRdRichValueTypesXML(): string\n    {\n        $xml = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        $xml->startDocument('1.0', 'UTF-8', 'yes');\n        $xml->startElement('rvTypesInfo');\n        $xml->writeAttribute('xmlns', 'http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2');\n        $xml->writeAttribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006');\n        $xml->writeAttribute('mc:Ignorable', 'x');\n        $xml->writeAttribute('xmlns:x', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main');\n\n        $xml->startElement('global');\n        $xml->startElement('keyFlags');\n\n        $keys = [\n            '_Self', '_DisplayString', '_Flags', '_Format',\n            '_SubLabel', '_Attribution', '_Icon', '_Display',\n            '_CanonicalPropertyNames', '_ClassificationId',\n        ];\n\n        foreach ($keys as $key) {\n            $xml->startElement('key');\n            $xml->writeAttribute('name', $key);\n\n            $xml->startElement('flag');\n            $xml->writeAttribute('name', 'ExcludeFromCalcComparison');\n            $xml->writeAttribute('value', '1');\n            if ($key === '_Self') {\n                $xml->startElement('flag');\n                $xml->writeAttribute('name', 'ExcludeFromFile');\n                $xml->writeAttribute('value', '1');\n                $xml->endElement();\n            }\n            $xml->endElement(); // flag\n            $xml->endElement(); // key\n        }\n\n        $xml->endElement(); // keyFlags\n        $xml->endElement(); // global\n        $xml->endElement(); // rvTypesInfo\n\n        return $xml->getData();\n    }\n\n    private function writeRichValueRelXML(): string\n    {\n        $xml = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        $xml->startDocument('1.0', 'UTF-8', 'yes');\n        $xml->startElement('richValueRels');\n        $xml->writeAttribute('xmlns', 'http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel');\n        $xml->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships');\n\n        $index = 0;\n        foreach ($this->drawings as $drawing) {\n            $xml->startElement('rel');\n            $xml->writeAttribute('r:id', 'rId' . ++$index);\n            $xml->endElement();\n        }\n\n        $xml->endElement(); // richValueRels\n\n        return $xml->getData();\n    }\n\n    private function writeRichValueRelRelsXML(): string\n    {\n        $xml = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        $xml->startDocument('1.0', 'UTF-8', 'yes');\n        $xml->startElement('Relationships');\n        $xml->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');\n\n        $index = 0;\n        foreach ($this->drawings as $drawing) {\n            $xml->startElement('Relationship');\n            $xml->writeAttribute('Id', 'rId' . ++$index);\n            $xml->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image');\n            $xml->writeAttribute('Target', '../media/' . $drawing->getIndexedFilename());\n            $xml->endElement();\n        }\n\n        $xml->endElement(); // Relationships\n\n        return $xml->getData();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/StringTable.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\Run;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet as ActualWorksheet;\n\nclass StringTable extends WriterPart\n{\n    /**\n     * Create worksheet stringtable.\n     *\n     * @param string[] $existingTable Existing table to eventually merge with\n     *\n     * @return string[] String table for worksheet\n     */\n    public function createStringTable(ActualWorksheet $worksheet, ?array $existingTable = null): array\n    {\n        // Create string lookup table\n        /** @var string[] */\n        $aStringTable = $existingTable ?? [];\n\n        // Fill index array\n        $aFlippedStringTable = $this->flipStringTable($aStringTable);\n\n        // Loop through cells\n        foreach ($worksheet->getCellCollection()->getCoordinates() as $coordinate) {\n            /** @var Cell $cell */\n            $cell = $worksheet->getCellCollection()->get($coordinate);\n            /** @var null|int|RichText|string */\n            $cellValue = $cell->getValue();\n            if (\n                !is_object($cellValue)\n                && ($cellValue !== null)\n                && $cellValue !== ''\n                && ($cell->getDataType() == DataType::TYPE_STRING || $cell->getDataType() == DataType::TYPE_STRING2 || $cell->getDataType() == DataType::TYPE_NULL)\n                && !isset($aFlippedStringTable[$cellValue])\n            ) {\n                $aStringTable[] = $cellValue;\n                $aFlippedStringTable[$cellValue] = true;\n            } elseif (\n                $cellValue instanceof RichText\n                && !isset($aFlippedStringTable[$cellValue->getHashCode()])\n            ) {\n                $aStringTable[] = $cellValue;\n                $aFlippedStringTable[$cellValue->getHashCode()] = true;\n            }\n        }\n        /** @var string[] $aStringTable */\n\n        return $aStringTable;\n    }\n\n    /**\n     * Write string table to XML format.\n     *\n     * @param (RichText|string)[] $stringTable\n     *\n     * @return string XML Output\n     */\n    public function writeStringTable(array $stringTable): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // String table\n        $objWriter->startElement('sst');\n        $objWriter->writeAttribute('xmlns', Namespaces::MAIN);\n        $objWriter->writeAttribute('uniqueCount', (string) count($stringTable));\n\n        // Loop through string table\n        foreach ($stringTable as $textElement) {\n            $objWriter->startElement('si');\n\n            if (!($textElement instanceof RichText)) {\n                $textToWrite = StringHelper::controlCharacterPHP2OOXML($textElement);\n                $objWriter->startElement('t');\n                if ($textToWrite !== trim($textToWrite)) {\n                    $objWriter->writeAttribute('xml:space', 'preserve');\n                }\n                $objWriter->writeRawData($textToWrite);\n                $objWriter->endElement();\n            } else {\n                $this->writeRichText($objWriter, $textElement);\n            }\n\n            $objWriter->endElement();\n        }\n\n        $objWriter->endElement();\n\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write Rich Text.\n     *\n     * @param ?string $prefix Optional Namespace prefix\n     */\n    public function writeRichText(XMLWriter $objWriter, RichText $richText, ?string $prefix = null, ?Font $defaultFont = null): void\n    {\n        if ($prefix !== null) {\n            $prefix .= ':';\n        }\n\n        // Loop through rich text elements\n        $elements = $richText->getRichTextElements();\n        foreach ($elements as $element) {\n            // r\n            $objWriter->startElement($prefix . 'r');\n            $font = ($element instanceof Run) ? $element->getFont() : $defaultFont;\n\n            // rPr\n            if ($font !== null) {\n                // rPr\n                $objWriter->startElement($prefix . 'rPr');\n\n                // rFont\n                if ($font->getName() !== null) {\n                    $objWriter->startElement($prefix . 'rFont');\n                    $objWriter->writeAttribute('val', $font->getName());\n                    $objWriter->endElement();\n                }\n\n                // Bold\n                $objWriter->startElement($prefix . 'b');\n                $objWriter->writeAttribute('val', ($font->getBold() ? 'true' : 'false'));\n                $objWriter->endElement();\n\n                // Italic\n                $objWriter->startElement($prefix . 'i');\n                $objWriter->writeAttribute('val', ($font->getItalic() ? 'true' : 'false'));\n                $objWriter->endElement();\n\n                // Superscript / subscript\n                if ($font->getSuperscript() || $font->getSubscript()) {\n                    $objWriter->startElement($prefix . 'vertAlign');\n                    if ($font->getSuperscript()) {\n                        $objWriter->writeAttribute('val', 'superscript');\n                    } elseif ($font->getSubscript()) {\n                        $objWriter->writeAttribute('val', 'subscript');\n                    }\n                    $objWriter->endElement();\n                }\n\n                // Strikethrough\n                $objWriter->startElement($prefix . 'strike');\n                $objWriter->writeAttribute('val', ($font->getStrikethrough() ? 'true' : 'false'));\n                $objWriter->endElement();\n\n                // Color\n                if ($font->getColor()->getARGB() !== null) {\n                    $objWriter->startElement($prefix . 'color');\n                    $objWriter->writeAttribute('rgb', $font->getColor()->getARGB());\n                    $objWriter->endElement();\n                }\n\n                // Size\n                if ($font->getSize() !== null) {\n                    $objWriter->startElement($prefix . 'sz');\n                    $objWriter->writeAttribute('val', (string) $font->getSize());\n                    $objWriter->endElement();\n                }\n\n                // Underline\n                if ($font->getUnderline() !== null) {\n                    $objWriter->startElement($prefix . 'u');\n                    $objWriter->writeAttribute('val', $font->getUnderline());\n                    $objWriter->endElement();\n                }\n\n                $objWriter->endElement();\n            }\n\n            // t\n            $objWriter->startElement($prefix . 't');\n            $objWriter->writeAttribute('xml:space', 'preserve');\n            $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText()));\n            $objWriter->endElement();\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write Rich Text.\n     *\n     * @param RichText|string $richText text string or Rich text\n     * @param string $prefix Optional Namespace prefix\n     */\n    public function writeRichTextForCharts(XMLWriter $objWriter, $richText = null, string $prefix = ''): void\n    {\n        if (!($richText instanceof RichText)) {\n            $textRun = $richText;\n            $richText = new RichText();\n            $run = $richText->createTextRun($textRun ?? '');\n            $run->setFont(null);\n        }\n\n        if ($prefix !== '') {\n            $prefix .= ':';\n        }\n\n        // Loop through rich text elements\n        $elements = $richText->getRichTextElements();\n        foreach ($elements as $element) {\n            // r\n            $objWriter->startElement($prefix . 'r');\n            if ($element->getFont() !== null) {\n                // rPr\n                $objWriter->startElement($prefix . 'rPr');\n                $fontSize = $element->getFont()->getSize();\n                if (is_numeric($fontSize)) {\n                    $fontSize *= (($fontSize < 100) ? 100 : 1);\n                    $objWriter->writeAttribute('sz', (string) $fontSize);\n                }\n\n                // Bold\n                $objWriter->writeAttribute('b', ($element->getFont()->getBold() ? '1' : '0'));\n                // Italic\n                $objWriter->writeAttribute('i', ($element->getFont()->getItalic() ? '1' : '0'));\n                // Underline\n                $underlineType = $element->getFont()->getUnderline();\n                switch ($underlineType) {\n                    case 'single':\n                        $underlineType = 'sng';\n\n                        break;\n                    case 'double':\n                        $underlineType = 'dbl';\n\n                        break;\n                }\n                if ($underlineType !== null) {\n                    $objWriter->writeAttribute('u', $underlineType);\n                }\n                // Strikethrough\n                $objWriter->writeAttribute('strike', ($element->getFont()->getStriketype() ?: 'noStrike'));\n                // Superscript/subscript\n                if ($element->getFont()->getBaseLine()) {\n                    $objWriter->writeAttribute('baseline', (string) $element->getFont()->getBaseLine());\n                }\n\n                // Color\n                $this->writeChartTextColor($objWriter, $element->getFont()->getChartColor(), $prefix);\n\n                // Underscore Color\n                $this->writeChartTextColor($objWriter, $element->getFont()->getUnderlineColor(), $prefix, 'uFill');\n\n                // fontName\n                if ($element->getFont()->getLatin()) {\n                    $objWriter->startElement($prefix . 'latin');\n                    $objWriter->writeAttribute('typeface', $element->getFont()->getLatin());\n                    $objWriter->endElement();\n                }\n                if ($element->getFont()->getEastAsian()) {\n                    $objWriter->startElement($prefix . 'ea');\n                    $objWriter->writeAttribute('typeface', $element->getFont()->getEastAsian());\n                    $objWriter->endElement();\n                }\n                if ($element->getFont()->getComplexScript()) {\n                    $objWriter->startElement($prefix . 'cs');\n                    $objWriter->writeAttribute('typeface', $element->getFont()->getComplexScript());\n                    $objWriter->endElement();\n                }\n\n                $objWriter->endElement();\n            }\n\n            // t\n            $objWriter->startElement($prefix . 't');\n            $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText()));\n            $objWriter->endElement();\n\n            $objWriter->endElement();\n        }\n    }\n\n    private function writeChartTextColor(XMLWriter $objWriter, ?ChartColor $underlineColor, string $prefix, ?string $openTag = ''): void\n    {\n        if ($underlineColor !== null) {\n            $type = $underlineColor->getType();\n            $value = $underlineColor->getValue();\n            if (!empty($type) && !empty($value)) {\n                if ($openTag !== '') {\n                    $objWriter->startElement($prefix . $openTag);\n                }\n                $objWriter->startElement($prefix . 'solidFill');\n                $objWriter->startElement($prefix . $type);\n                $objWriter->writeAttribute('val', $value);\n                $alpha = $underlineColor->getAlpha();\n                if (is_numeric($alpha)) {\n                    $objWriter->startElement($prefix . 'alpha');\n                    $objWriter->writeAttribute('val', ChartColor::alphaToXml((int) $alpha));\n                    $objWriter->endElement();\n                }\n                $objWriter->endElement(); // srgbClr/schemeClr/prstClr\n                $objWriter->endElement(); // solidFill\n                if ($openTag !== '') {\n                    $objWriter->endElement(); // uFill\n                }\n            }\n        }\n    }\n\n    /**\n     * Flip string table (for index searching).\n     *\n     * @param array<RichText|string> $stringTable Stringtable\n     *\n     * @return array<RichText|string>\n     */\n    public function flipStringTable(array $stringTable): array\n    {\n        // Return value\n        $returnValue = [];\n\n        // Loop through stringtable and add flipped items to $returnValue\n        foreach ($stringTable as $key => $value) {\n            if (!$value instanceof RichText) {\n                $returnValue[$value] = $key;\n            } elseif ($value instanceof RichText) {\n                $returnValue[$value->getHashCode()] = $key;\n            }\n        }\n\n        return $returnValue;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Style.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\n\nclass Style extends WriterPart\n{\n    /**\n     * Write styles to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeStyles(Spreadsheet $spreadsheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // styleSheet\n        $objWriter->startElement('styleSheet');\n        $objWriter->writeAttribute('xmlns', Namespaces::MAIN);\n\n        // numFmts\n        $objWriter->startElement('numFmts');\n        $objWriter->writeAttribute('count', (string) $this->getParentWriter()->getNumFmtHashTable()->count());\n\n        // numFmt\n        for ($i = 0; $i < $this->getParentWriter()->getNumFmtHashTable()->count(); ++$i) {\n            $this->writeNumFmt($objWriter, $this->getParentWriter()->getNumFmtHashTable()->getByIndex($i), $i);\n        }\n\n        $objWriter->endElement();\n\n        // fonts\n        $objWriter->startElement('fonts');\n        $objWriter->writeAttribute('count', (string) $this->getParentWriter()->getFontHashTable()->count());\n\n        // font\n        for ($i = 0; $i < $this->getParentWriter()->getFontHashTable()->count(); ++$i) {\n            $thisfont = $this->getParentWriter()->getFontHashTable()->getByIndex($i);\n            if ($thisfont !== null) {\n                $this->writeFont($objWriter, $thisfont, $spreadsheet);\n            }\n        }\n\n        $objWriter->endElement();\n\n        // fills\n        $objWriter->startElement('fills');\n        $objWriter->writeAttribute('count', (string) $this->getParentWriter()->getFillHashTable()->count());\n\n        // fill\n        for ($i = 0; $i < $this->getParentWriter()->getFillHashTable()->count(); ++$i) {\n            $thisfill = $this->getParentWriter()->getFillHashTable()->getByIndex($i);\n            if ($thisfill !== null) {\n                $this->writeFill($objWriter, $thisfill);\n            }\n        }\n\n        $objWriter->endElement();\n\n        // borders\n        $objWriter->startElement('borders');\n        $objWriter->writeAttribute('count', (string) $this->getParentWriter()->getBordersHashTable()->count());\n\n        // border\n        for ($i = 0; $i < $this->getParentWriter()->getBordersHashTable()->count(); ++$i) {\n            $thisborder = $this->getParentWriter()->getBordersHashTable()->getByIndex($i);\n            if ($thisborder !== null) {\n                $this->writeBorder($objWriter, $thisborder);\n            }\n        }\n\n        $objWriter->endElement();\n\n        // cellStyleXfs\n        $objWriter->startElement('cellStyleXfs');\n        $objWriter->writeAttribute('count', '1');\n\n        // xf\n        $objWriter->startElement('xf');\n        $objWriter->writeAttribute('numFmtId', '0');\n        $objWriter->writeAttribute('fontId', '0');\n        $objWriter->writeAttribute('fillId', '0');\n        $objWriter->writeAttribute('borderId', '0');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // cellXfs\n        $objWriter->startElement('cellXfs');\n        $objWriter->writeAttribute('count', (string) count($spreadsheet->getCellXfCollection()));\n\n        // xf\n        $alignment = new Alignment();\n        $defaultAlignHash = $alignment->getHashCode();\n        if ($defaultAlignHash !== $spreadsheet->getDefaultStyle()->getAlignment()->getHashCode()) {\n            $defaultAlignHash = '';\n        }\n        foreach ($spreadsheet->getCellXfCollection() as $cellXf) {\n            $this->writeCellStyleXf($objWriter, $cellXf, $spreadsheet, $defaultAlignHash);\n        }\n\n        $objWriter->endElement();\n\n        // cellStyles\n        $objWriter->startElement('cellStyles');\n        $objWriter->writeAttribute('count', '1');\n\n        // cellStyle\n        $objWriter->startElement('cellStyle');\n        $objWriter->writeAttribute('name', 'Normal');\n        $objWriter->writeAttribute('xfId', '0');\n        $objWriter->writeAttribute('builtinId', '0');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // dxfs\n        $objWriter->startElement('dxfs');\n        $objWriter->writeAttribute('count', (string) $this->getParentWriter()->getStylesConditionalHashTable()->count());\n\n        // dxf\n        for ($i = 0; $i < $this->getParentWriter()->getStylesConditionalHashTable()->count(); ++$i) {\n            /** @var ?Conditional */\n            $thisstyle = $this->getParentWriter()->getStylesConditionalHashTable()->getByIndex($i);\n            if ($thisstyle !== null) {\n                $this->writeCellStyleDxf($objWriter, $thisstyle->getStyle(), $spreadsheet);\n            }\n        }\n\n        $objWriter->endElement();\n\n        // tableStyles\n        $objWriter->startElement('tableStyles');\n        $objWriter->writeAttribute('defaultTableStyle', 'TableStyleMedium9');\n        $objWriter->writeAttribute('defaultPivotStyle', 'PivotTableStyle1');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write Fill.\n     */\n    private function writeFill(XMLWriter $objWriter, Fill $fill): void\n    {\n        // Check if this is a pattern type or gradient type\n        if (\n            $fill->getFillType() === Fill::FILL_GRADIENT_LINEAR\n            || $fill->getFillType() === Fill::FILL_GRADIENT_PATH\n        ) {\n            // Gradient fill\n            $this->writeGradientFill($objWriter, $fill);\n        } elseif ($fill->getFillType() !== null) {\n            // Pattern fill\n            $this->writePatternFill($objWriter, $fill);\n        }\n    }\n\n    /**\n     * Write Gradient Fill.\n     */\n    private function writeGradientFill(XMLWriter $objWriter, Fill $fill): void\n    {\n        // fill\n        $objWriter->startElement('fill');\n\n        // gradientFill\n        $objWriter->startElement('gradientFill');\n        $objWriter->writeAttribute('type', (string) $fill->getFillType());\n        $objWriter->writeAttribute('degree', (string) $fill->getRotation());\n\n        // stop\n        $objWriter->startElement('stop');\n        $objWriter->writeAttribute('position', '0');\n\n        // color\n        if (!empty($fill->getStartColor()->getARGB())) {\n            $objWriter->startElement('color');\n            $objWriter->writeAttribute('rgb', $fill->getStartColor()->getARGB());\n            $objWriter->endElement();\n        }\n\n        $objWriter->endElement();\n\n        // stop\n        $objWriter->startElement('stop');\n        $objWriter->writeAttribute('position', '1');\n\n        // color\n        if (!empty($fill->getEndColor()->getARGB())) {\n            $objWriter->startElement('color');\n            $objWriter->writeAttribute('rgb', $fill->getEndColor()->getARGB());\n            $objWriter->endElement();\n        }\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    private static function writePatternColors(Fill $fill): bool\n    {\n        if ($fill->getFillType() === Fill::FILL_NONE) {\n            return false;\n        }\n\n        return $fill->getFillType() === Fill::FILL_SOLID || $fill->getColorsChanged();\n    }\n\n    /**\n     * Write Pattern Fill.\n     */\n    private function writePatternFill(XMLWriter $objWriter, Fill $fill): void\n    {\n        // fill\n        $objWriter->startElement('fill');\n\n        // patternFill\n        $objWriter->startElement('patternFill');\n        if ($fill->getFillType()) {\n            $objWriter->writeAttribute('patternType', (string) $fill->getFillType());\n        }\n\n        if (self::writePatternColors($fill)) {\n            // fgColor\n            if ($fill->getStartColor()->getARGB()) {\n                if (!$fill->getEndColor()->getARGB() && $fill->getFillType() === Fill::FILL_SOLID) {\n                    $objWriter->startElement('bgColor');\n                    $objWriter->writeAttribute('rgb', $fill->getStartColor()->getARGB());\n                } else {\n                    $objWriter->startElement('fgColor');\n                    $objWriter->writeAttribute('rgb', $fill->getStartColor()->getARGB());\n                }\n                $objWriter->endElement();\n            }\n            // bgColor\n            if ($fill->getEndColor()->getARGB()) {\n                $objWriter->startElement('bgColor');\n                $objWriter->writeAttribute('rgb', $fill->getEndColor()->getARGB());\n                $objWriter->endElement();\n            }\n        }\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * @param-out true $fontStarted\n     */\n    private function startFont(XMLWriter $objWriter, bool &$fontStarted): void\n    {\n        if (!$fontStarted) {\n            $fontStarted = true;\n            $objWriter->startElement('font');\n        }\n    }\n\n    /**\n     * Write Font.\n     */\n    private function writeFont(XMLWriter $objWriter, Font $font, Spreadsheet $spreadsheet): void\n    {\n        $fontStarted = false;\n        // font\n        //    Weird! The order of these elements actually makes a difference when opening Xlsx\n        //        files in Excel2003 with the compatibility pack. It's not documented behaviour,\n        //        and makes for a real WTF!\n\n        // Bold. We explicitly write this element also when false (like MS Office Excel 2007 does\n        // for conditional formatting). Otherwise it will apparently not be picked up in conditional\n        // formatting style dialog\n        if ($font->getBold() !== null) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('b');\n            $objWriter->writeAttribute('val', $font->getBold() ? '1' : '0');\n            $objWriter->endElement();\n        }\n\n        // Italic\n        if ($font->getItalic() !== null) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('i');\n            $objWriter->writeAttribute('val', $font->getItalic() ? '1' : '0');\n            $objWriter->endElement();\n        }\n\n        // Strikethrough\n        if ($font->getStrikethrough() !== null) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('strike');\n            $objWriter->writeAttribute('val', $font->getStrikethrough() ? '1' : '0');\n            $objWriter->endElement();\n        }\n\n        // Underline\n        if ($font->getUnderline() !== null) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('u');\n            $objWriter->writeAttribute('val', $font->getUnderline());\n            $objWriter->endElement();\n        }\n\n        // Superscript / subscript\n        if ($font->getSuperscript() === true || $font->getSubscript() === true) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('vertAlign');\n            if ($font->getSuperscript() === true) {\n                $objWriter->writeAttribute('val', 'superscript');\n            } elseif ($font->getSubscript() === true) {\n                $objWriter->writeAttribute('val', 'subscript');\n            }\n            $objWriter->endElement();\n        }\n\n        // Size\n        if ($font->getSize() !== null) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('sz');\n            $objWriter->writeAttribute('val', StringHelper::formatNumber($font->getSize()));\n            $objWriter->endElement();\n        }\n\n        // Foreground color\n        if ($font->getAutoColor()) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('auto');\n            $objWriter->writeAttribute('val', '1');\n            $objWriter->endElement();\n        } elseif ($font->getColor()->getTheme() >= 0) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('color');\n            $objWriter->writeAttribute('theme', (string) $font->getColor()->getTheme());\n            $objWriter->endElement();\n        } elseif ($font->getColor()->getARGB() !== null) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('color');\n            $objWriter->writeAttribute('rgb', $font->getColor()->getARGB());\n            $objWriter->endElement();\n        }\n\n        // Name\n        if ($font->getName() !== null) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('name');\n            $objWriter->writeAttribute('val', $font->getName());\n            $objWriter->endElement();\n            $charset = $spreadsheet->getFontCharset($font->getName());\n            if ($charset >= 0 && $charset <= 255) {\n                $objWriter->startElement('charset');\n                $objWriter->writeAttribute('val', \"$charset\");\n                $objWriter->endElement();\n            }\n        }\n\n        if (!empty($font->getScheme())) {\n            $this->startFont($objWriter, $fontStarted);\n            $objWriter->startElement('scheme');\n            $objWriter->writeAttribute('val', $font->getScheme());\n            $objWriter->endElement();\n        }\n\n        if ($fontStarted) {\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write Border.\n     */\n    private function writeBorder(XMLWriter $objWriter, Borders $borders): void\n    {\n        // Write border\n        $objWriter->startElement('border');\n        // Diagonal?\n        switch ($borders->getDiagonalDirection()) {\n            case Borders::DIAGONAL_UP:\n                $objWriter->writeAttribute('diagonalUp', 'true');\n                $objWriter->writeAttribute('diagonalDown', 'false');\n\n                break;\n            case Borders::DIAGONAL_DOWN:\n                $objWriter->writeAttribute('diagonalUp', 'false');\n                $objWriter->writeAttribute('diagonalDown', 'true');\n\n                break;\n            case Borders::DIAGONAL_BOTH:\n                $objWriter->writeAttribute('diagonalUp', 'true');\n                $objWriter->writeAttribute('diagonalDown', 'true');\n\n                break;\n        }\n\n        // BorderPr\n        $this->writeBorderPr($objWriter, 'left', $borders->getLeft());\n        $this->writeBorderPr($objWriter, 'right', $borders->getRight());\n        $this->writeBorderPr($objWriter, 'top', $borders->getTop());\n        $this->writeBorderPr($objWriter, 'bottom', $borders->getBottom());\n        $this->writeBorderPr($objWriter, 'diagonal', $borders->getDiagonal());\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Cell Style Xf.\n     */\n    private function writeCellStyleXf(XMLWriter $objWriter, \\PhpOffice\\PhpSpreadsheet\\Style\\Style $style, Spreadsheet $spreadsheet, string $defaultAlignHash): void\n    {\n        // xf\n        $objWriter->startElement('xf');\n        $objWriter->writeAttribute('xfId', '0');\n        $objWriter->writeAttribute('fontId', (string) (int) $this->getParentWriter()->getFontHashTable()->getIndexForHashCode($style->getFont()->getHashCode()));\n        if ($style->getQuotePrefix()) {\n            $objWriter->writeAttribute('quotePrefix', '1');\n        }\n\n        if ($style->getNumberFormat()->getBuiltInFormatCode() === false) {\n            $objWriter->writeAttribute('numFmtId', (string) (int) ($this->getParentWriter()->getNumFmtHashTable()->getIndexForHashCode($style->getNumberFormat()->getHashCode()) + 164));\n        } else {\n            $objWriter->writeAttribute('numFmtId', (string) (int) $style->getNumberFormat()->getBuiltInFormatCode());\n        }\n\n        $objWriter->writeAttribute('fillId', (string) (int) $this->getParentWriter()->getFillHashTable()->getIndexForHashCode($style->getFill()->getHashCode()));\n        $objWriter->writeAttribute('borderId', (string) (int) $this->getParentWriter()->getBordersHashTable()->getIndexForHashCode($style->getBorders()->getHashCode()));\n\n        // Apply styles?\n        $objWriter->writeAttribute('applyFont', ($spreadsheet->getDefaultStyle()->getFont()->getHashCode() != $style->getFont()->getHashCode()) ? '1' : '0');\n        $objWriter->writeAttribute('applyNumberFormat', ($spreadsheet->getDefaultStyle()->getNumberFormat()->getHashCode() != $style->getNumberFormat()->getHashCode()) ? '1' : '0');\n        $objWriter->writeAttribute('applyFill', ($spreadsheet->getDefaultStyle()->getFill()->getHashCode() != $style->getFill()->getHashCode()) ? '1' : '0');\n        $objWriter->writeAttribute('applyBorder', ($spreadsheet->getDefaultStyle()->getBorders()->getHashCode() != $style->getBorders()->getHashCode()) ? '1' : '0');\n        if ($defaultAlignHash !== '' && $defaultAlignHash === $style->getAlignment()->getHashCode()) {\n            $applyAlignment = '0';\n        } else {\n            $applyAlignment = '1';\n        }\n        $objWriter->writeAttribute('applyAlignment', $applyAlignment);\n        if ($style->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $style->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) {\n            $objWriter->writeAttribute('applyProtection', 'true');\n        }\n\n        // alignment\n        if ($applyAlignment === '1') {\n            $objWriter->startElement('alignment');\n            $vertical = Alignment::VERTICAL_ALIGNMENT_FOR_XLSX[$style->getAlignment()->getVertical()] ?? '';\n            $horizontal = Alignment::HORIZONTAL_ALIGNMENT_FOR_XLSX[$style->getAlignment()->getHorizontal()] ?? '';\n            if ($horizontal !== '') {\n                $objWriter->writeAttribute('horizontal', $horizontal);\n            }\n            if ($vertical !== '') {\n                $objWriter->writeAttribute('vertical', $vertical);\n            }\n            $justifyLastLine = $style->getAlignment()->getJustifyLastLine();\n            if (is_bool($justifyLastLine)) {\n                $objWriter->writeAttribute('justifyLastLine', (string) (int) $justifyLastLine);\n            }\n\n            if ($style->getAlignment()->getTextRotation() >= 0) {\n                $textRotation = $style->getAlignment()->getTextRotation();\n            } else {\n                $textRotation = 90 - $style->getAlignment()->getTextRotation();\n            }\n            $objWriter->writeAttribute('textRotation', (string) $textRotation);\n\n            $objWriter->writeAttribute('wrapText', ($style->getAlignment()->getWrapText() ? 'true' : 'false'));\n            $objWriter->writeAttribute('shrinkToFit', ($style->getAlignment()->getShrinkToFit() ? 'true' : 'false'));\n\n            if ($style->getAlignment()->getIndent() > 0) {\n                $objWriter->writeAttribute('indent', (string) $style->getAlignment()->getIndent());\n            }\n            if ($style->getAlignment()->getReadOrder() > 0) {\n                $objWriter->writeAttribute('readingOrder', (string) $style->getAlignment()->getReadOrder());\n            }\n            $objWriter->endElement();\n        }\n\n        // protection\n        if ($style->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $style->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) {\n            $objWriter->startElement('protection');\n            if ($style->getProtection()->getLocked() != Protection::PROTECTION_INHERIT) {\n                $objWriter->writeAttribute('locked', ($style->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED ? 'true' : 'false'));\n            }\n            if ($style->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) {\n                $objWriter->writeAttribute('hidden', ($style->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED ? 'true' : 'false'));\n            }\n            $objWriter->endElement();\n        }\n\n        if ($style->getCheckBox()) {\n            $objWriter->startElement('extLst');\n            $objWriter->startElement('ext');\n            $objWriter->writeAttribute('uri', Namespaces::STYLE_CHECKBOX_URI);\n            $objWriter->writeAttribute('xmlns:xfpb', Namespaces::FEATURE_PROPERTY_BAG);\n            $objWriter->startElement('xfpb:xfComplement');\n            $objWriter->writeAttribute('i', '0');\n            $objWriter->endElement(); //xfpb:xfComplement\n            $objWriter->endElement(); //ext\n            $objWriter->endElement(); //extLst\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Cell Style Dxf.\n     */\n    private function writeCellStyleDxf(XMLWriter $objWriter, \\PhpOffice\\PhpSpreadsheet\\Style\\Style $style, Spreadsheet $spreadsheet): void\n    {\n        // dxf\n        $objWriter->startElement('dxf');\n\n        // font\n        $this->writeFont($objWriter, $style->getFont(), $spreadsheet);\n\n        // numFmt\n        $this->writeNumFmt($objWriter, $style->getNumberFormat());\n\n        // fill\n        $this->writeFill($objWriter, $style->getFill());\n\n        // border\n        $this->writeBorder($objWriter, $style->getBorders());\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write BorderPr.\n     *\n     * @param string $name Element name\n     */\n    private function writeBorderPr(XMLWriter $objWriter, string $name, Border $border): void\n    {\n        // Write BorderPr\n        if ($border->getBorderStyle() === Border::BORDER_OMIT) {\n            return;\n        }\n        $objWriter->startElement($name);\n        if ($border->getBorderStyle() !== Border::BORDER_NONE) {\n            $objWriter->writeAttribute('style', $border->getBorderStyle());\n\n            // color\n            if ($border->getColor()->getARGB() !== null) {\n                $objWriter->startElement('color');\n                $objWriter->writeAttribute('rgb', $border->getColor()->getARGB());\n                $objWriter->endElement();\n            }\n        }\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write NumberFormat.\n     *\n     * @param int $id Number Format identifier\n     */\n    private function writeNumFmt(XMLWriter $objWriter, ?NumberFormat $numberFormat, int $id = 0): void\n    {\n        // Translate formatcode\n        $formatCode = ($numberFormat === null) ? null : $numberFormat->getFormatCode();\n\n        // numFmt\n        if ($formatCode !== null) {\n            $objWriter->startElement('numFmt');\n            $objWriter->writeAttribute('numFmtId', (string) ($id + 164));\n            $objWriter->writeAttribute('formatCode', $formatCode);\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Get an array of all styles.\n     *\n     * @return \\PhpOffice\\PhpSpreadsheet\\Style\\Style[] All styles in PhpSpreadsheet\n     */\n    public function allStyles(Spreadsheet $spreadsheet): array\n    {\n        return $spreadsheet->getCellXfCollection();\n    }\n\n    /**\n     * Get an array of all conditional styles.\n     *\n     * @return Conditional[] All conditional styles in PhpSpreadsheet\n     */\n    public function allConditionalStyles(Spreadsheet $spreadsheet): array\n    {\n        // Get an array of all styles\n        $aStyles = [];\n\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            foreach ($spreadsheet->getSheet($i)->getConditionalStylesCollection() as $conditionalStyles) {\n                foreach ($conditionalStyles as $conditionalStyle) {\n                    $aStyles[] = $conditionalStyle;\n                }\n            }\n        }\n\n        return $aStyles;\n    }\n\n    /**\n     * Get an array of all fills.\n     *\n     * @return Fill[] All fills in PhpSpreadsheet\n     */\n    public function allFills(Spreadsheet $spreadsheet): array\n    {\n        // Get an array of unique fills\n        $aFills = [];\n\n        // Two first fills are predefined\n        $fill0 = new Fill();\n        $fill0->setFillType(Fill::FILL_NONE);\n        $aFills[] = $fill0;\n\n        $fill1 = new Fill();\n        $fill1->setFillType(Fill::FILL_PATTERN_GRAY125);\n        $aFills[] = $fill1;\n        // The remaining fills\n        $aStyles = $this->allStyles($spreadsheet);\n        foreach ($aStyles as $style) {\n            if (!isset($aFills[$style->getFill()->getHashCode()])) {\n                $aFills[$style->getFill()->getHashCode()] = $style->getFill();\n            }\n        }\n\n        return $aFills;\n    }\n\n    /**\n     * Get an array of all fonts.\n     *\n     * @return Font[] All fonts in PhpSpreadsheet\n     */\n    public function allFonts(Spreadsheet $spreadsheet): array\n    {\n        // Get an array of unique fonts\n        $aFonts = [];\n        $aStyles = $this->allStyles($spreadsheet);\n\n        foreach ($aStyles as $style) {\n            if (!isset($aFonts[$style->getFont()->getHashCode()])) {\n                $aFonts[$style->getFont()->getHashCode()] = $style->getFont();\n            }\n        }\n\n        return $aFonts;\n    }\n\n    /**\n     * Get an array of all borders.\n     *\n     * @return Borders[] All borders in PhpSpreadsheet\n     */\n    public function allBorders(Spreadsheet $spreadsheet): array\n    {\n        // Get an array of unique borders\n        $aBorders = [];\n        $aStyles = $this->allStyles($spreadsheet);\n\n        foreach ($aStyles as $style) {\n            if (!isset($aBorders[$style->getBorders()->getHashCode()])) {\n                $aBorders[$style->getBorders()->getHashCode()] = $style->getBorders();\n            }\n        }\n\n        return $aBorders;\n    }\n\n    /**\n     * Get an array of all number formats.\n     *\n     * @return NumberFormat[] All number formats in PhpSpreadsheet\n     */\n    public function allNumberFormats(Spreadsheet $spreadsheet): array\n    {\n        // Get an array of unique number formats\n        $aNumFmts = [];\n        $aStyles = $this->allStyles($spreadsheet);\n\n        foreach ($aStyles as $style) {\n            if ($style->getNumberFormat()->getBuiltInFormatCode() === false && !isset($aNumFmts[$style->getNumberFormat()->getHashCode()])) {\n                $aNumFmts[$style->getNumberFormat()->getHashCode()] = $style->getNumberFormat();\n            }\n        }\n\n        return $aNumFmts;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Table.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table as WorksheetTable;\n\nclass Table extends WriterPart\n{\n    /**\n     * Write Table to XML format.\n     *\n     * @param int $tableRef Table ID\n     *\n     * @return string XML Output\n     */\n    public function writeTable(WorksheetTable $table, int $tableRef): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Table\n        $name = 'Table' . $tableRef;\n        $range = $table->getRange();\n\n        $objWriter->startElement('table');\n        $objWriter->writeAttribute('xmlns', Namespaces::MAIN);\n        $objWriter->writeAttribute('id', (string) $tableRef);\n        $objWriter->writeAttribute('name', $name);\n        $objWriter->writeAttribute('displayName', $table->getName() ?: $name);\n        $objWriter->writeAttribute('ref', $range);\n        $objWriter->writeAttribute('headerRowCount', $table->getShowHeaderRow() ? '1' : '0');\n        $objWriter->writeAttribute('totalsRowCount', $table->getShowTotalsRow() ? '1' : '0');\n\n        // Table Boundaries\n        [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($table->getRange());\n\n        // Table Auto Filter\n        if ($table->getShowHeaderRow() && $table->getAllowFilter() === true) {\n            $objWriter->startElement('autoFilter');\n            $objWriter->writeAttribute('ref', $range);\n            foreach (range($rangeStart[0], $rangeEnd[0]) as $offset => $columnIndex) {\n                $column = $table->getColumnByOffset($offset);\n\n                if (!$column->getShowFilterButton()) {\n                    $objWriter->startElement('filterColumn');\n                    $objWriter->writeAttribute('colId', (string) $offset);\n                    $objWriter->writeAttribute('hiddenButton', '1');\n                    $objWriter->endElement();\n                } else {\n                    $column = $table->getAutoFilter()->getColumnByOffset($offset);\n                    AutoFilter::writeAutoFilterColumn($objWriter, $column, $offset);\n                }\n            }\n            $objWriter->endElement(); // autoFilter\n        }\n\n        // Table Columns\n        $objWriter->startElement('tableColumns');\n        $objWriter->writeAttribute('count', (string) ($rangeEnd[0] - $rangeStart[0] + 1));\n        foreach (range($rangeStart[0], $rangeEnd[0]) as $offset => $columnIndex) {\n            $worksheet = $table->getWorksheet();\n            if (!$worksheet) {\n                continue;\n            }\n\n            $column = $table->getColumnByOffset($offset);\n            $cell = $worksheet->getCell([$columnIndex, $rangeStart[1]]);\n\n            $objWriter->startElement('tableColumn');\n            $objWriter->writeAttribute('id', (string) ($offset + 1));\n            $objWriter->writeAttribute('name', $table->getShowHeaderRow() ? $cell->getValueString() : ('Column' . ($offset + 1)));\n\n            if ($table->getShowTotalsRow()) {\n                if ($column->getTotalsRowLabel()) {\n                    $objWriter->writeAttribute('totalsRowLabel', $column->getTotalsRowLabel());\n                }\n                if ($column->getTotalsRowFunction()) {\n                    $objWriter->writeAttribute('totalsRowFunction', $column->getTotalsRowFunction());\n                }\n            }\n            if ($column->getColumnFormula()) {\n                $objWriter->writeElement('calculatedColumnFormula', $column->getColumnFormula());\n            }\n\n            $objWriter->endElement();\n        }\n        $objWriter->endElement();\n\n        // Table Styles\n        $objWriter->startElement('tableStyleInfo');\n        $objWriter->writeAttribute('name', $table->getStyle()->getTheme());\n        $objWriter->writeAttribute('showFirstColumn', $table->getStyle()->getShowFirstColumn() ? '1' : '0');\n        $objWriter->writeAttribute('showLastColumn', $table->getStyle()->getShowLastColumn() ? '1' : '0');\n        $objWriter->writeAttribute('showRowStripes', $table->getStyle()->getShowRowStripes() ? '1' : '0');\n        $objWriter->writeAttribute('showColumnStripes', $table->getStyle()->getShowColumnStripes() ? '1' : '0');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Theme.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Theme as SpreadsheetTheme;\n\nclass Theme extends WriterPart\n{\n    /**\n     * Write theme to XML format.\n     *\n     * @return string XML Output\n     */\n    public function writeTheme(Spreadsheet $spreadsheet): string\n    {\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n        $theme = $spreadsheet->getTheme();\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // a:theme\n        $objWriter->startElement('a:theme');\n        $objWriter->writeAttribute('xmlns:a', Namespaces::DRAWINGML);\n        $objWriter->writeAttribute('name', 'Office Theme');\n\n        // a:themeElements\n        $objWriter->startElement('a:themeElements');\n\n        // a:clrScheme\n        $objWriter->startElement('a:clrScheme');\n        $objWriter->writeAttribute('name', $theme->getThemeColorName());\n\n        $this->writeColourScheme($objWriter, $theme);\n\n        $objWriter->endElement();\n\n        // a:fontScheme\n        $objWriter->startElement('a:fontScheme');\n        $objWriter->writeAttribute('name', $theme->getThemeFontName());\n\n        // a:majorFont\n        $objWriter->startElement('a:majorFont');\n        $this->writeFonts(\n            $objWriter,\n            $theme->getMajorFontLatin(),\n            $theme->getMajorFontEastAsian(),\n            $theme->getMajorFontComplexScript(),\n            $theme->getMajorFontSubstitutions()\n        );\n        $objWriter->endElement(); // a:majorFont\n\n        // a:minorFont\n        $objWriter->startElement('a:minorFont');\n        $this->writeFonts(\n            $objWriter,\n            $theme->getMinorFontLatin(),\n            $theme->getMinorFontEastAsian(),\n            $theme->getMinorFontComplexScript(),\n            $theme->getMinorFontSubstitutions()\n        );\n        $objWriter->endElement(); // a:minorFont\n\n        $objWriter->endElement(); // a:fontScheme\n\n        // a:fmtScheme\n        $objWriter->startElement('a:fmtScheme');\n        $objWriter->writeAttribute('name', 'Office');\n\n        // a:fillStyleLst\n        $objWriter->startElement('a:fillStyleLst');\n\n        // a:solidFill\n        $objWriter->startElement('a:solidFill');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gradFill\n        $objWriter->startElement('a:gradFill');\n        $objWriter->writeAttribute('rotWithShape', '1');\n\n        // a:gsLst\n        $objWriter->startElement('a:gsLst');\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '0');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:tint\n        $objWriter->startElement('a:tint');\n        $objWriter->writeAttribute('val', '50000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '300000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '35000');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:tint\n        $objWriter->startElement('a:tint');\n        $objWriter->writeAttribute('val', '37000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '300000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '100000');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:tint\n        $objWriter->startElement('a:tint');\n        $objWriter->writeAttribute('val', '15000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '350000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:lin\n        $objWriter->startElement('a:lin');\n        $objWriter->writeAttribute('ang', '16200000');\n        $objWriter->writeAttribute('scaled', '1');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gradFill\n        $objWriter->startElement('a:gradFill');\n        $objWriter->writeAttribute('rotWithShape', '1');\n\n        // a:gsLst\n        $objWriter->startElement('a:gsLst');\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '0');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:shade\n        $objWriter->startElement('a:shade');\n        $objWriter->writeAttribute('val', '51000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '130000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '80000');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:shade\n        $objWriter->startElement('a:shade');\n        $objWriter->writeAttribute('val', '93000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '130000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '100000');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:shade\n        $objWriter->startElement('a:shade');\n        $objWriter->writeAttribute('val', '94000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '135000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:lin\n        $objWriter->startElement('a:lin');\n        $objWriter->writeAttribute('ang', '16200000');\n        $objWriter->writeAttribute('scaled', '0');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:lnStyleLst\n        $objWriter->startElement('a:lnStyleLst');\n\n        // a:ln\n        $objWriter->startElement('a:ln');\n        $objWriter->writeAttribute('w', '9525');\n        $objWriter->writeAttribute('cap', 'flat');\n        $objWriter->writeAttribute('cmpd', 'sng');\n        $objWriter->writeAttribute('algn', 'ctr');\n\n        // a:solidFill\n        $objWriter->startElement('a:solidFill');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:shade\n        $objWriter->startElement('a:shade');\n        $objWriter->writeAttribute('val', '95000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '105000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:prstDash\n        $objWriter->startElement('a:prstDash');\n        $objWriter->writeAttribute('val', 'solid');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:ln\n        $objWriter->startElement('a:ln');\n        $objWriter->writeAttribute('w', '25400');\n        $objWriter->writeAttribute('cap', 'flat');\n        $objWriter->writeAttribute('cmpd', 'sng');\n        $objWriter->writeAttribute('algn', 'ctr');\n\n        // a:solidFill\n        $objWriter->startElement('a:solidFill');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:prstDash\n        $objWriter->startElement('a:prstDash');\n        $objWriter->writeAttribute('val', 'solid');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:ln\n        $objWriter->startElement('a:ln');\n        $objWriter->writeAttribute('w', '38100');\n        $objWriter->writeAttribute('cap', 'flat');\n        $objWriter->writeAttribute('cmpd', 'sng');\n        $objWriter->writeAttribute('algn', 'ctr');\n\n        // a:solidFill\n        $objWriter->startElement('a:solidFill');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:prstDash\n        $objWriter->startElement('a:prstDash');\n        $objWriter->writeAttribute('val', 'solid');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:effectStyleLst\n        $objWriter->startElement('a:effectStyleLst');\n\n        // a:effectStyle\n        $objWriter->startElement('a:effectStyle');\n\n        // a:effectLst\n        $objWriter->startElement('a:effectLst');\n\n        // a:outerShdw\n        $objWriter->startElement('a:outerShdw');\n        $objWriter->writeAttribute('blurRad', '40000');\n        $objWriter->writeAttribute('dist', '20000');\n        $objWriter->writeAttribute('dir', '5400000');\n        $objWriter->writeAttribute('rotWithShape', '0');\n\n        // a:srgbClr\n        $objWriter->startElement('a:srgbClr');\n        $objWriter->writeAttribute('val', '000000');\n\n        // a:alpha\n        $objWriter->startElement('a:alpha');\n        $objWriter->writeAttribute('val', '38000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:effectStyle\n        $objWriter->startElement('a:effectStyle');\n\n        // a:effectLst\n        $objWriter->startElement('a:effectLst');\n\n        // a:outerShdw\n        $objWriter->startElement('a:outerShdw');\n        $objWriter->writeAttribute('blurRad', '40000');\n        $objWriter->writeAttribute('dist', '23000');\n        $objWriter->writeAttribute('dir', '5400000');\n        $objWriter->writeAttribute('rotWithShape', '0');\n\n        // a:srgbClr\n        $objWriter->startElement('a:srgbClr');\n        $objWriter->writeAttribute('val', '000000');\n\n        // a:alpha\n        $objWriter->startElement('a:alpha');\n        $objWriter->writeAttribute('val', '35000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:effectStyle\n        $objWriter->startElement('a:effectStyle');\n\n        // a:effectLst\n        $objWriter->startElement('a:effectLst');\n\n        // a:outerShdw\n        $objWriter->startElement('a:outerShdw');\n        $objWriter->writeAttribute('blurRad', '40000');\n        $objWriter->writeAttribute('dist', '23000');\n        $objWriter->writeAttribute('dir', '5400000');\n        $objWriter->writeAttribute('rotWithShape', '0');\n\n        // a:srgbClr\n        $objWriter->startElement('a:srgbClr');\n        $objWriter->writeAttribute('val', '000000');\n\n        // a:alpha\n        $objWriter->startElement('a:alpha');\n        $objWriter->writeAttribute('val', '35000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:scene3d\n        $objWriter->startElement('a:scene3d');\n\n        // a:camera\n        $objWriter->startElement('a:camera');\n        $objWriter->writeAttribute('prst', 'orthographicFront');\n\n        // a:rot\n        $objWriter->startElement('a:rot');\n        $objWriter->writeAttribute('lat', '0');\n        $objWriter->writeAttribute('lon', '0');\n        $objWriter->writeAttribute('rev', '0');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:lightRig\n        $objWriter->startElement('a:lightRig');\n        $objWriter->writeAttribute('rig', 'threePt');\n        $objWriter->writeAttribute('dir', 't');\n\n        // a:rot\n        $objWriter->startElement('a:rot');\n        $objWriter->writeAttribute('lat', '0');\n        $objWriter->writeAttribute('lon', '0');\n        $objWriter->writeAttribute('rev', '1200000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:sp3d\n        $objWriter->startElement('a:sp3d');\n\n        // a:bevelT\n        $objWriter->startElement('a:bevelT');\n        $objWriter->writeAttribute('w', '63500');\n        $objWriter->writeAttribute('h', '25400');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:bgFillStyleLst\n        $objWriter->startElement('a:bgFillStyleLst');\n\n        // a:solidFill\n        $objWriter->startElement('a:solidFill');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gradFill\n        $objWriter->startElement('a:gradFill');\n        $objWriter->writeAttribute('rotWithShape', '1');\n\n        // a:gsLst\n        $objWriter->startElement('a:gsLst');\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '0');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:tint\n        $objWriter->startElement('a:tint');\n        $objWriter->writeAttribute('val', '40000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '350000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '40000');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:tint\n        $objWriter->startElement('a:tint');\n        $objWriter->writeAttribute('val', '45000');\n        $objWriter->endElement();\n\n        // a:shade\n        $objWriter->startElement('a:shade');\n        $objWriter->writeAttribute('val', '99000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '350000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '100000');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:shade\n        $objWriter->startElement('a:shade');\n        $objWriter->writeAttribute('val', '20000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '255000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:path\n        $objWriter->startElement('a:path');\n        $objWriter->writeAttribute('path', 'circle');\n\n        // a:fillToRect\n        $objWriter->startElement('a:fillToRect');\n        $objWriter->writeAttribute('l', '50000');\n        $objWriter->writeAttribute('t', '-80000');\n        $objWriter->writeAttribute('r', '50000');\n        $objWriter->writeAttribute('b', '180000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gradFill\n        $objWriter->startElement('a:gradFill');\n        $objWriter->writeAttribute('rotWithShape', '1');\n\n        // a:gsLst\n        $objWriter->startElement('a:gsLst');\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '0');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:tint\n        $objWriter->startElement('a:tint');\n        $objWriter->writeAttribute('val', '80000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '300000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:gs\n        $objWriter->startElement('a:gs');\n        $objWriter->writeAttribute('pos', '100000');\n\n        // a:schemeClr\n        $objWriter->startElement('a:schemeClr');\n        $objWriter->writeAttribute('val', 'phClr');\n\n        // a:shade\n        $objWriter->startElement('a:shade');\n        $objWriter->writeAttribute('val', '30000');\n        $objWriter->endElement();\n\n        // a:satMod\n        $objWriter->startElement('a:satMod');\n        $objWriter->writeAttribute('val', '200000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:path\n        $objWriter->startElement('a:path');\n        $objWriter->writeAttribute('path', 'circle');\n\n        // a:fillToRect\n        $objWriter->startElement('a:fillToRect');\n        $objWriter->writeAttribute('l', '50000');\n        $objWriter->writeAttribute('t', '50000');\n        $objWriter->writeAttribute('r', '50000');\n        $objWriter->writeAttribute('b', '50000');\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n\n        // a:objectDefaults\n        $objWriter->writeElement('a:objectDefaults', null);\n\n        // a:extraClrSchemeLst\n        $objWriter->writeElement('a:extraClrSchemeLst', null);\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write fonts to XML format.\n     *\n     * @param string[] $fontSet\n     */\n    private function writeFonts(XMLWriter $objWriter, string $latinFont, string $eastAsianFont, string $complexScriptFont, array $fontSet): void\n    {\n        // a:latin\n        $objWriter->startElement('a:latin');\n        $objWriter->writeAttribute('typeface', $latinFont);\n        $objWriter->endElement();\n\n        // a:ea\n        $objWriter->startElement('a:ea');\n        $objWriter->writeAttribute('typeface', $eastAsianFont);\n        $objWriter->endElement();\n\n        // a:cs\n        $objWriter->startElement('a:cs');\n        $objWriter->writeAttribute('typeface', $complexScriptFont);\n        $objWriter->endElement();\n\n        foreach ($fontSet as $fontScript => $typeface) {\n            $objWriter->startElement('a:font');\n            $objWriter->writeAttribute('script', $fontScript);\n            $objWriter->writeAttribute('typeface', $typeface);\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write colour scheme to XML format.\n     */\n    private function writeColourScheme(XMLWriter $objWriter, SpreadsheetTheme $theme): void\n    {\n        $themeArray = $theme->getThemeColors();\n        // a:dk1\n        $objWriter->startElement('a:dk1');\n        $objWriter->startElement('a:sysClr');\n        $objWriter->writeAttribute('val', 'windowText');\n        $objWriter->writeAttribute('lastClr', $themeArray['dk1'] ?? '000000');\n        $objWriter->endElement(); // a:sysClr\n        $objWriter->endElement(); // a:dk1\n\n        // a:lt1\n        $objWriter->startElement('a:lt1');\n        $objWriter->startElement('a:sysClr');\n        $objWriter->writeAttribute('val', 'window');\n        $objWriter->writeAttribute('lastClr', $themeArray['lt1'] ?? 'FFFFFF');\n        $objWriter->endElement(); // a:sysClr\n        $objWriter->endElement(); // a:lt1\n\n        foreach ($themeArray as $colourName => $colourValue) {\n            if ($colourName !== 'dk1' && $colourName !== 'lt1') {\n                $objWriter->startElement('a:' . $colourName);\n                $objWriter->startElement('a:srgbClr');\n                $objWriter->writeAttribute('val', $colourValue);\n                $objWriter->endElement(); // a:srgbClr\n                $objWriter->endElement(); // a:$colourName\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Workbook.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\DefinedNames as DefinedNamesWriter;\n\nclass Workbook extends WriterPart\n{\n    /**\n     * Write workbook to XML format.\n     *\n     * @param bool $preCalculateFormulas If true, formulas will be calculated before writing\n     * @param ?bool $forceFullCalc If null, !$preCalculateFormulas\n     *\n     * @return string XML Output\n     */\n    public function writeWorkbook(Spreadsheet $spreadsheet, bool $preCalculateFormulas = false, ?bool $forceFullCalc = null): string\n    {\n        // Create XML writer\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // workbook\n        $objWriter->startElement('workbook');\n        $objWriter->writeAttribute('xmlns', Namespaces::MAIN);\n        $objWriter->writeAttribute('xmlns:r', Namespaces::SCHEMA_OFFICE_DOCUMENT);\n\n        // fileVersion\n        $this->writeFileVersion($objWriter);\n\n        // workbookPr\n        $this->writeWorkbookPr($objWriter, $spreadsheet);\n\n        // workbookProtection\n        $this->writeWorkbookProtection($objWriter, $spreadsheet);\n\n        // bookViews\n        if ($this->getParentWriter()->getOffice2003Compatibility() === false) {\n            $this->writeBookViews($objWriter, $spreadsheet);\n        }\n\n        // sheets\n        $this->writeSheets($objWriter, $spreadsheet);\n\n        // definedNames\n        (new DefinedNamesWriter($objWriter, $spreadsheet))->write();\n\n        // calcPr\n        $this->writeCalcPr($objWriter, $preCalculateFormulas, $forceFullCalc);\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    /**\n     * Write file version.\n     */\n    private function writeFileVersion(XMLWriter $objWriter): void\n    {\n        $objWriter->startElement('fileVersion');\n        $objWriter->writeAttribute('appName', 'xl');\n        $objWriter->writeAttribute('lastEdited', '4');\n        $objWriter->writeAttribute('lowestEdited', '4');\n        $objWriter->writeAttribute('rupBuild', '4505');\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write WorkbookPr.\n     */\n    private function writeWorkbookPr(XMLWriter $objWriter, Spreadsheet $spreadsheet): void\n    {\n        $objWriter->startElement('workbookPr');\n\n        if ($spreadsheet->getExcelCalendar() === Date::CALENDAR_MAC_1904) {\n            $objWriter->writeAttribute('date1904', '1');\n        }\n\n        $objWriter->writeAttribute('codeName', 'ThisWorkbook');\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write BookViews.\n     */\n    private function writeBookViews(XMLWriter $objWriter, Spreadsheet $spreadsheet): void\n    {\n        // bookViews\n        $objWriter->startElement('bookViews');\n\n        // workbookView\n        $objWriter->startElement('workbookView');\n\n        $objWriter->writeAttribute('activeTab', (string) $spreadsheet->getActiveSheetIndex());\n        $objWriter->writeAttribute('autoFilterDateGrouping', ($spreadsheet->getAutoFilterDateGrouping() ? 'true' : 'false'));\n        $objWriter->writeAttribute('firstSheet', (string) $spreadsheet->getFirstSheetIndex());\n        $objWriter->writeAttribute('minimized', ($spreadsheet->getMinimized() ? 'true' : 'false'));\n        $objWriter->writeAttribute('showHorizontalScroll', ($spreadsheet->getShowHorizontalScroll() ? 'true' : 'false'));\n        $objWriter->writeAttribute('showSheetTabs', ($spreadsheet->getShowSheetTabs() ? 'true' : 'false'));\n        $objWriter->writeAttribute('showVerticalScroll', ($spreadsheet->getShowVerticalScroll() ? 'true' : 'false'));\n        $objWriter->writeAttribute('tabRatio', (string) $spreadsheet->getTabRatio());\n        $objWriter->writeAttribute('visibility', $spreadsheet->getVisibility());\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write WorkbookProtection.\n     */\n    private function writeWorkbookProtection(XMLWriter $objWriter, Spreadsheet $spreadsheet): void\n    {\n        $security = $spreadsheet->getSecurity();\n        if ($security->isSecurityEnabled()) {\n            $objWriter->startElement('workbookProtection');\n            $objWriter->writeAttribute('lockRevision', ($security->getLockRevision() ? 'true' : 'false'));\n            $objWriter->writeAttribute('lockStructure', ($security->getLockStructure() ? 'true' : 'false'));\n            $objWriter->writeAttribute('lockWindows', ($security->getLockWindows() ? 'true' : 'false'));\n\n            if ($security->getRevisionsPassword() !== '') {\n                $objWriter->writeAttribute('revisionsPassword', $security->getRevisionsPassword());\n            } else {\n                $hashValue = $security->getRevisionsHashValue();\n                if ($hashValue !== '') {\n                    $objWriter->writeAttribute('revisionsAlgorithmName', $security->getRevisionsAlgorithmName());\n                    $objWriter->writeAttribute('revisionsHashValue', $hashValue);\n                    $objWriter->writeAttribute('revisionsSaltValue', $security->getRevisionsSaltValue());\n                    $objWriter->writeAttribute('revisionsSpinCount', (string) $security->getRevisionsSpinCount());\n                }\n            }\n\n            if ($security->getWorkbookPassword() !== '') {\n                $objWriter->writeAttribute('workbookPassword', $security->getWorkbookPassword());\n            } else {\n                $hashValue = $security->getWorkbookHashValue();\n                if ($hashValue !== '') {\n                    $objWriter->writeAttribute('workbookAlgorithmName', $security->getWorkbookAlgorithmName());\n                    $objWriter->writeAttribute('workbookHashValue', $hashValue);\n                    $objWriter->writeAttribute('workbookSaltValue', $security->getWorkbookSaltValue());\n                    $objWriter->writeAttribute('workbookSpinCount', (string) $security->getWorkbookSpinCount());\n                }\n            }\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write calcPr.\n     *\n     * @param bool $preCalculateFormulas If true, formulas will be calculated before writing\n     */\n    private function writeCalcPr(XMLWriter $objWriter, bool $preCalculateFormulas, ?bool $forceFullCalc): void\n    {\n        $objWriter->startElement('calcPr');\n\n        //    Set the calcid to a higher value than Excel itself will use, otherwise Excel will always recalc\n        //  If MS Excel does do a recalc, then users opening a file in MS Excel will be prompted to save on exit\n        //     because the file has changed\n        $objWriter->writeAttribute('calcId', '999999');\n        $objWriter->writeAttribute('calcMode', 'auto');\n        //    fullCalcOnLoad isn't needed if we will calculate before writing\n        $objWriter->writeAttribute('calcCompleted', ($preCalculateFormulas) ? '1' : '0');\n        $objWriter->writeAttribute('fullCalcOnLoad', ($preCalculateFormulas) ? '0' : '1');\n        if ($forceFullCalc === null) {\n            $objWriter->writeAttribute('forceFullCalc', $preCalculateFormulas ? '0' : '1');\n        } else {\n            $objWriter->writeAttribute('forceFullCalc', $forceFullCalc ? '1' : '0');\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write sheets.\n     */\n    private function writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet): void\n    {\n        // Write sheets\n        $objWriter->startElement('sheets');\n        $sheetCount = $spreadsheet->getSheetCount();\n        for ($i = 0; $i < $sheetCount; ++$i) {\n            // sheet\n            $this->writeSheet(\n                $objWriter,\n                $spreadsheet->getSheet($i)->getTitle(),\n                ($i + 1),\n                ($i + 1 + 3),\n                $spreadsheet->getSheet($i)->getSheetState()\n            );\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write sheet.\n     *\n     * @param string $worksheetName Sheet name\n     * @param int $worksheetId Sheet id\n     * @param int $relId Relationship ID\n     * @param string $sheetState Sheet state (visible, hidden, veryHidden)\n     */\n    private function writeSheet(XMLWriter $objWriter, string $worksheetName, int $worksheetId = 1, int $relId = 1, string $sheetState = 'visible'): void\n    {\n        if ($worksheetName != '') {\n            // Write sheet\n            $objWriter->startElement('sheet');\n            $objWriter->writeAttribute('name', $worksheetName);\n            $objWriter->writeAttribute('sheetId', (string) $worksheetId);\n            if ($sheetState !== 'visible' && $sheetState != '') {\n                $objWriter->writeAttribute('state', $sheetState);\n            }\n            $objWriter->writeAttribute('r:id', 'rId' . $relId);\n            $objWriter->endElement();\n        } else {\n            throw new WriterException('Invalid parameters passed.');\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse Composer\\Pcre\\Preg;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Namespaces;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalColorScale;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalDataBar;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalFormattingRuleExtension;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalIconSet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\RowDimension;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\SheetView;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet as PhpspreadsheetWorksheet;\n\nclass Worksheet extends WriterPart\n{\n    private string $numberStoredAsText = '';\n\n    private string $formula = '';\n\n    private string $formulaRange = '';\n\n    private string $twoDigitTextYear = '';\n\n    private string $evalError = '';\n\n    private bool $explicitStyle0;\n\n    private bool $useDynamicArrays = false;\n\n    private bool $restrictMaxColumnWidth = false;\n\n    /**\n     * Write worksheet to XML format.\n     *\n     * @param string[] $stringTable\n     * @param bool $includeCharts Flag indicating if we should write charts\n     *\n     * @return string XML Output\n     */\n    public function writeWorksheet(PhpspreadsheetWorksheet $worksheet, array $stringTable = [], bool $includeCharts = false): string\n    {\n        $this->useDynamicArrays = $this->getParentWriter()->useDynamicArrays();\n        $this->explicitStyle0 = $this->getParentWriter()->getExplicitStyle0();\n        $worksheet->calculateArrays($this->getParentWriter()->getPreCalculateFormulas());\n        $this->numberStoredAsText = '';\n        $this->formula = '';\n        $this->formulaRange = '';\n        $this->twoDigitTextYear = '';\n        $this->evalError = '';\n        // Create XML writer\n        $objWriter = null;\n        if ($this->getParentWriter()->getUseDiskCaching()) {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n        } else {\n            $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);\n        }\n        $this->restrictMaxColumnWidth = $this->getParentWriter()->getRestrictMaxColumnWidth();\n\n        // XML header\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n\n        // Worksheet\n        $objWriter->startElement('worksheet');\n        $objWriter->writeAttribute('xmlns', Namespaces::MAIN);\n        $objWriter->writeAttribute('xmlns:r', Namespaces::SCHEMA_OFFICE_DOCUMENT);\n\n        $objWriter->writeAttribute('xmlns:xdr', Namespaces::SPREADSHEET_DRAWING);\n        $objWriter->writeAttribute('xmlns:x14', Namespaces::DATA_VALIDATIONS1);\n        $objWriter->writeAttribute('xmlns:xm', Namespaces::DATA_VALIDATIONS2);\n        $objWriter->writeAttribute('xmlns:mc', Namespaces::COMPATIBILITY);\n        $objWriter->writeAttribute('mc:Ignorable', 'x14ac');\n        $objWriter->writeAttribute('xmlns:x14ac', Namespaces::SPREADSHEETML_AC);\n\n        // sheetPr\n        $this->writeSheetPr($objWriter, $worksheet);\n\n        // Dimension\n        $this->writeDimension($objWriter, $worksheet);\n\n        // sheetViews\n        $this->writeSheetViews($objWriter, $worksheet);\n\n        // sheetFormatPr\n        $this->writeSheetFormatPr($objWriter, $worksheet);\n\n        // cols\n        $this->writeCols($objWriter, $worksheet);\n\n        // sheetData\n        $this->writeSheetData($objWriter, $worksheet, $stringTable);\n\n        // sheetProtection\n        $this->writeSheetProtection($objWriter, $worksheet);\n\n        // protectedRanges\n        $this->writeProtectedRanges($objWriter, $worksheet);\n\n        // autoFilter\n        $this->writeAutoFilter($objWriter, $worksheet);\n\n        // mergeCells\n        $this->writeMergeCells($objWriter, $worksheet);\n\n        // conditionalFormatting\n        $this->writeConditionalFormatting($objWriter, $worksheet);\n\n        // dataValidations\n        $this->writeDataValidations($objWriter, $worksheet);\n\n        // hyperlinks\n        $this->writeHyperlinks($objWriter, $worksheet);\n\n        // Print options\n        $this->writePrintOptions($objWriter, $worksheet);\n\n        // Page margins\n        $this->writePageMargins($objWriter, $worksheet);\n\n        // Page setup\n        $this->writePageSetup($objWriter, $worksheet);\n\n        // Header / footer\n        $this->writeHeaderFooter($objWriter, $worksheet);\n\n        // Breaks\n        $this->writeBreaks($objWriter, $worksheet);\n\n        // IgnoredErrors\n        $this->writeIgnoredErrors($objWriter);\n\n        // Drawings and/or Charts\n        $this->writeDrawings($objWriter, $worksheet, $includeCharts);\n\n        // LegacyDrawing\n        $this->writeLegacyDrawing($objWriter, $worksheet);\n\n        // LegacyDrawingHF\n        $this->writeLegacyDrawingHF($objWriter, $worksheet);\n\n        // AlternateContent\n        $this->writeAlternateContent($objWriter, $worksheet);\n\n        // BackgroundImage must come after ignored, before table\n        $this->writeBackgroundImage($objWriter, $worksheet);\n\n        // Table\n        $this->writeTable($objWriter, $worksheet);\n\n        // ConditionalFormattingRuleExtensionList\n        // (Must be inserted last. Not insert last, an Excel parse error will occur)\n        $this->writeExtLst($objWriter, $worksheet);\n\n        $objWriter->endElement();\n\n        // Return\n        return $objWriter->getData();\n    }\n\n    private function writeIgnoredError(XMLWriter $objWriter, bool &$started, string $attr, string $cells): void\n    {\n        if ($cells !== '') {\n            if (!$started) {\n                $objWriter->startElement('ignoredErrors');\n                $started = true;\n            }\n            $objWriter->startElement('ignoredError');\n            $objWriter->writeAttribute('sqref', substr($cells, 1));\n            $objWriter->writeAttribute($attr, '1');\n            $objWriter->endElement();\n        }\n    }\n\n    private function writeIgnoredErrors(XMLWriter $objWriter): void\n    {\n        $started = false;\n        $this->writeIgnoredError($objWriter, $started, 'numberStoredAsText', $this->numberStoredAsText);\n        $this->writeIgnoredError($objWriter, $started, 'formula', $this->formula);\n        $this->writeIgnoredError($objWriter, $started, 'formulaRange', $this->formulaRange);\n        $this->writeIgnoredError($objWriter, $started, 'twoDigitTextYear', $this->twoDigitTextYear);\n        $this->writeIgnoredError($objWriter, $started, 'evalError', $this->evalError);\n        if ($started) {\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write SheetPr.\n     */\n    private function writeSheetPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // sheetPr\n        $objWriter->startElement('sheetPr');\n        if ($worksheet->getParentOrThrow()->hasMacros()) {\n            //if the workbook have macros, we need to have codeName for the sheet\n            if (!$worksheet->hasCodeName()) {\n                $worksheet->setCodeName($worksheet->getTitle());\n            }\n            self::writeAttributeNotNull($objWriter, 'codeName', $worksheet->getCodeName());\n        }\n        $autoFilterRange = $worksheet->getAutoFilter()->getRange();\n        if (!empty($autoFilterRange)) {\n            $objWriter->writeAttribute('filterMode', '1');\n            if (!$worksheet->getAutoFilter()->getEvaluated()) {\n                $worksheet->getAutoFilter()->showHideRows();\n            }\n        }\n        $tables = $worksheet->getTableCollection();\n        if (count($tables)) {\n            foreach ($tables as $table) {\n                if (!$table->getAutoFilter()->getEvaluated()) {\n                    $table->getAutoFilter()->showHideRows();\n                }\n            }\n        }\n\n        // tabColor\n        if ($worksheet->isTabColorSet()) {\n            $objWriter->startElement('tabColor');\n            $objWriter->writeAttribute('rgb', $worksheet->getTabColor()->getARGB() ?? '');\n            $objWriter->endElement();\n        }\n\n        // outlinePr\n        $objWriter->startElement('outlinePr');\n        $objWriter->writeAttribute('summaryBelow', ($worksheet->getShowSummaryBelow() ? '1' : '0'));\n        $objWriter->writeAttribute('summaryRight', ($worksheet->getShowSummaryRight() ? '1' : '0'));\n        $objWriter->endElement();\n\n        // pageSetUpPr\n        if ($worksheet->getPageSetup()->getFitToPage()) {\n            $objWriter->startElement('pageSetUpPr');\n            $objWriter->writeAttribute('fitToPage', '1');\n            $objWriter->endElement();\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Dimension.\n     */\n    private function writeDimension(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // dimension\n        $objWriter->startElement('dimension');\n        $objWriter->writeAttribute('ref', $worksheet->calculateWorksheetDimension());\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write SheetViews.\n     */\n    private function writeSheetViews(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // sheetViews\n        $objWriter->startElement('sheetViews');\n\n        // Sheet selected?\n        $sheetSelected = false;\n        if ($this->getParentWriter()->getSpreadsheet()->getIndex($worksheet) == $this->getParentWriter()->getSpreadsheet()->getActiveSheetIndex()) {\n            $sheetSelected = true;\n        }\n\n        // sheetView\n        $objWriter->startElement('sheetView');\n        $objWriter->writeAttribute('tabSelected', $sheetSelected ? '1' : '0');\n        $objWriter->writeAttribute('workbookViewId', '0');\n\n        // Zoom scales\n        $zoomScale = $worksheet->getSheetView()->getZoomScale();\n        if ($zoomScale !== 100 && $zoomScale !== null) {\n            $objWriter->writeAttribute('zoomScale', (string) $zoomScale);\n        }\n        $zoomScale = $worksheet->getSheetView()->getZoomScaleNormal();\n        if ($zoomScale !== 100 && $zoomScale !== null) {\n            $objWriter->writeAttribute('zoomScaleNormal', (string) $zoomScale);\n        }\n        $zoomScale = $worksheet->getSheetView()->getZoomScalePageLayoutView();\n        if ($zoomScale !== 100) {\n            $objWriter->writeAttribute('zoomScalePageLayoutView', (string) $zoomScale);\n        }\n        $zoomScale = $worksheet->getSheetView()->getZoomScaleSheetLayoutView();\n        if ($zoomScale !== 100) {\n            $objWriter->writeAttribute('zoomScaleSheetLayoutView', (string) $zoomScale);\n        }\n\n        // Show zeros (Excel also writes this attribute only if set to false)\n        if ($worksheet->getSheetView()->getShowZeros() === false) {\n            $objWriter->writeAttribute('showZeros', '0');\n        }\n\n        // View Layout Type\n        if ($worksheet->getSheetView()->getView() !== SheetView::SHEETVIEW_NORMAL) {\n            $objWriter->writeAttribute('view', $worksheet->getSheetView()->getView());\n        }\n\n        // Gridlines\n        if ($worksheet->getShowGridlines()) {\n            $objWriter->writeAttribute('showGridLines', 'true');\n        } else {\n            $objWriter->writeAttribute('showGridLines', 'false');\n        }\n\n        // Row and column headers\n        if ($worksheet->getShowRowColHeaders()) {\n            $objWriter->writeAttribute('showRowColHeaders', '1');\n        } else {\n            $objWriter->writeAttribute('showRowColHeaders', '0');\n        }\n\n        // Right-to-left\n        if ($worksheet->getRightToLeft()) {\n            $objWriter->writeAttribute('rightToLeft', 'true');\n        }\n\n        $topLeftCell = $worksheet->getTopLeftCell();\n        if (!empty($topLeftCell) && $worksheet->getPaneState() !== PhpspreadsheetWorksheet::PANE_FROZEN && $worksheet->getPaneState() !== PhpspreadsheetWorksheet::PANE_FROZENSPLIT) {\n            $objWriter->writeAttribute('topLeftCell', $topLeftCell);\n        }\n        $activeCell = $worksheet->getActiveCell();\n        $sqref = $worksheet->getSelectedCells();\n\n        // Pane\n        if ($worksheet->usesPanes()) {\n            $objWriter->startElement('pane');\n            $xSplit = $worksheet->getXSplit();\n            $ySplit = $worksheet->getYSplit();\n            $pane = $worksheet->getActivePane();\n            $paneTopLeftCell = $worksheet->getPaneTopLeftCell();\n            $paneState = $worksheet->getPaneState();\n            $normalFreeze = '';\n            if ($paneState === PhpspreadsheetWorksheet::PANE_FROZEN) {\n                if ($ySplit > 0) {\n                    $normalFreeze = ($xSplit <= 0) ? 'bottomLeft' : 'bottomRight';\n                } else {\n                    $normalFreeze = 'topRight';\n                }\n            }\n            if ($xSplit > 0) {\n                $objWriter->writeAttribute('xSplit', \"$xSplit\");\n            }\n            if ($ySplit > 0) {\n                $objWriter->writeAttribute('ySplit', \"$ySplit\");\n            }\n            if ($normalFreeze !== '') {\n                $objWriter->writeAttribute('activePane', $normalFreeze);\n            } elseif ($pane !== '') {\n                $objWriter->writeAttribute('activePane', $pane);\n            }\n            if ($paneState !== '') {\n                $objWriter->writeAttribute('state', $paneState);\n            }\n            if ($paneTopLeftCell !== '') {\n                $objWriter->writeAttribute('topLeftCell', $paneTopLeftCell);\n            }\n            $objWriter->endElement(); // pane\n\n            if ($normalFreeze !== '') {\n                $objWriter->startElement('selection');\n                $objWriter->writeAttribute('pane', $normalFreeze);\n                if ($activeCell !== '') {\n                    $objWriter->writeAttribute('activeCell', $activeCell);\n                }\n                if ($sqref !== '') {\n                    $objWriter->writeAttribute('sqref', $sqref);\n                }\n                $objWriter->endElement(); // selection\n                $sqref = $activeCell = '';\n            } else {\n                foreach ($worksheet->getPanes() as $panex) {\n                    if ($panex !== null) {\n                        $sqref = $activeCell = '';\n                        $objWriter->startElement('selection');\n                        $objWriter->writeAttribute('pane', $panex->getPosition());\n                        $activeCellPane = $panex->getActiveCell();\n                        if ($activeCellPane !== '') {\n                            $objWriter->writeAttribute('activeCell', $activeCellPane);\n                        }\n                        $sqrefPane = $panex->getSqref();\n                        if ($sqrefPane !== '') {\n                            $objWriter->writeAttribute('sqref', $sqrefPane);\n                        }\n                        $objWriter->endElement(); // selection\n                    }\n                }\n            }\n        }\n\n        // Selection\n        // Only need to write selection element if we have a split pane\n        // We cheat a little by over-riding the active cell selection, setting it to the split cell\n        if (!empty($sqref) || !empty($activeCell)) {\n            $objWriter->startElement('selection');\n            if (!empty($activeCell)) {\n                $objWriter->writeAttribute('activeCell', $activeCell);\n            }\n            if (!empty($sqref)) {\n                $objWriter->writeAttribute('sqref', $sqref);\n            }\n            $objWriter->endElement(); // selection\n        }\n\n        $objWriter->endElement();\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write SheetFormatPr.\n     */\n    private function writeSheetFormatPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // sheetFormatPr\n        $objWriter->startElement('sheetFormatPr');\n\n        // Default row height\n        if ($worksheet->getDefaultRowDimension()->getRowHeight() >= 0) {\n            $objWriter->writeAttribute('customHeight', 'true');\n            $objWriter->writeAttribute('defaultRowHeight', StringHelper::formatNumber($worksheet->getDefaultRowDimension()->getRowHeight()));\n        } else {\n            $objWriter->writeAttribute('defaultRowHeight', '14.4');\n        }\n\n        // Set Zero Height row\n        if ($worksheet->getDefaultRowDimension()->getZeroHeight()) {\n            $objWriter->writeAttribute('zeroHeight', '1');\n        }\n\n        // Default column width\n        if ($worksheet->getDefaultColumnDimension()->getWidth() >= 0) {\n            $objWriter->writeAttribute('defaultColWidth', StringHelper::formatNumber($worksheet->getDefaultColumnDimension()->getWidthForOutput($this->restrictMaxColumnWidth)));\n        }\n\n        // Outline level - row\n        $outlineLevelRow = 0;\n        foreach ($worksheet->getRowDimensions() as $dimension) {\n            if ($dimension->getOutlineLevel() > $outlineLevelRow) {\n                $outlineLevelRow = $dimension->getOutlineLevel();\n            }\n        }\n        $objWriter->writeAttribute('outlineLevelRow', (string) (int) $outlineLevelRow);\n\n        // Outline level - column\n        $outlineLevelCol = 0;\n        foreach ($worksheet->getColumnDimensions() as $dimension) {\n            if ($dimension->getOutlineLevel() > $outlineLevelCol) {\n                $outlineLevelCol = $dimension->getOutlineLevel();\n            }\n        }\n        $objWriter->writeAttribute('outlineLevelCol', (string) (int) $outlineLevelCol);\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Cols.\n     */\n    private function writeCols(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // cols\n        if (count($worksheet->getColumnDimensions()) > 0) {\n            $objWriter->startElement('cols');\n\n            $worksheet->calculateColumnWidths();\n\n            // Loop through column dimensions\n            foreach ($worksheet->getColumnDimensions() as $colDimension) {\n                // col\n                $objWriter->startElement('col');\n                $objWriter->writeAttribute('min', (string) Coordinate::columnIndexFromString($colDimension->getColumnIndex()));\n                $objWriter->writeAttribute('max', (string) Coordinate::columnIndexFromString($colDimension->getColumnIndex()));\n\n                if ($colDimension->getWidth() < 0) {\n                    // No width set, apply default of 10\n                    $objWriter->writeAttribute('width', '9.10');\n                } else {\n                    // Width set\n                    $objWriter->writeAttribute('width', StringHelper::formatNumber($colDimension->getWidthForOutput($this->restrictMaxColumnWidth)));\n                }\n\n                // Column visibility\n                if ($colDimension->getVisible() === false) {\n                    $objWriter->writeAttribute('hidden', 'true');\n                }\n\n                // Auto size?\n                if ($colDimension->getAutoSize()) {\n                    $objWriter->writeAttribute('bestFit', 'true');\n                }\n\n                // Custom width?\n                if ($colDimension->getWidth() != $worksheet->getDefaultColumnDimension()->getWidth()) {\n                    $objWriter->writeAttribute('customWidth', 'true');\n                }\n\n                // Collapsed\n                if ($colDimension->getCollapsed() === true) {\n                    $objWriter->writeAttribute('collapsed', 'true');\n                }\n\n                // Outline level\n                if ($colDimension->getOutlineLevel() > 0) {\n                    $objWriter->writeAttribute('outlineLevel', (string) $colDimension->getOutlineLevel());\n                }\n\n                // Style\n                $objWriter->writeAttribute('style', (string) $colDimension->getXfIndex());\n\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write SheetProtection.\n     */\n    private function writeSheetProtection(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        $protection = $worksheet->getProtection();\n        if (!$protection->isProtectionEnabled()) {\n            return;\n        }\n        // sheetProtection\n        $objWriter->startElement('sheetProtection');\n\n        if ($protection->getAlgorithm()) {\n            $objWriter->writeAttribute('algorithmName', $protection->getAlgorithm());\n            $objWriter->writeAttribute('hashValue', $protection->getPassword());\n            $objWriter->writeAttribute('saltValue', $protection->getSalt());\n            $objWriter->writeAttribute('spinCount', (string) $protection->getSpinCount());\n        } elseif ($protection->getPassword() !== '') {\n            $objWriter->writeAttribute('password', $protection->getPassword());\n        }\n\n        self::writeProtectionAttribute($objWriter, 'sheet', $protection->getSheet());\n        self::writeProtectionAttribute($objWriter, 'objects', $protection->getObjects());\n        self::writeProtectionAttribute($objWriter, 'scenarios', $protection->getScenarios());\n        self::writeProtectionAttribute($objWriter, 'formatCells', $protection->getFormatCells());\n        self::writeProtectionAttribute($objWriter, 'formatColumns', $protection->getFormatColumns());\n        self::writeProtectionAttribute($objWriter, 'formatRows', $protection->getFormatRows());\n        self::writeProtectionAttribute($objWriter, 'insertColumns', $protection->getInsertColumns());\n        self::writeProtectionAttribute($objWriter, 'insertRows', $protection->getInsertRows());\n        self::writeProtectionAttribute($objWriter, 'insertHyperlinks', $protection->getInsertHyperlinks());\n        self::writeProtectionAttribute($objWriter, 'deleteColumns', $protection->getDeleteColumns());\n        self::writeProtectionAttribute($objWriter, 'deleteRows', $protection->getDeleteRows());\n        self::writeProtectionAttribute($objWriter, 'sort', $protection->getSort());\n        self::writeProtectionAttribute($objWriter, 'autoFilter', $protection->getAutoFilter());\n        self::writeProtectionAttribute($objWriter, 'pivotTables', $protection->getPivotTables());\n        self::writeProtectionAttribute($objWriter, 'selectLockedCells', $protection->getSelectLockedCells());\n        self::writeProtectionAttribute($objWriter, 'selectUnlockedCells', $protection->getSelectUnlockedCells());\n        $objWriter->endElement();\n    }\n\n    private static function writeProtectionAttribute(XMLWriter $objWriter, string $name, ?bool $value): void\n    {\n        if ($value === true) {\n            $objWriter->writeAttribute($name, '1');\n        } elseif ($value === false) {\n            $objWriter->writeAttribute($name, '0');\n        }\n    }\n\n    private static function writeAttributeIf(XMLWriter $objWriter, ?bool $condition, string $attr, string $val): void\n    {\n        if ($condition) {\n            $objWriter->writeAttribute($attr, $val);\n        }\n    }\n\n    private static function writeAttributeNotNull(XMLWriter $objWriter, string $attr, ?string $val): void\n    {\n        if ($val !== null) {\n            $objWriter->writeAttribute($attr, $val);\n        }\n    }\n\n    private static function writeElementIf(XMLWriter $objWriter, bool $condition, string $attr, string $val): void\n    {\n        if ($condition) {\n            $objWriter->writeElement($attr, $val);\n        }\n    }\n\n    private static function writeOtherCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate): void\n    {\n        $conditions = $conditional->getConditions();\n        if (\n            $conditional->getConditionType() == Conditional::CONDITION_CELLIS\n            || $conditional->getConditionType() == Conditional::CONDITION_EXPRESSION\n            || !empty($conditions)\n        ) {\n            foreach ($conditions as $formula) {\n                // Formula\n                if (is_bool($formula)) {\n                    $formula = $formula ? 'TRUE' : 'FALSE';\n                }\n                $objWriter->writeElement('formula', FunctionPrefix::addFunctionPrefix(\"$formula\"));\n            }\n        } else {\n            if ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSBLANKS) {\n                // formula copied from ms xlsx xml source file\n                $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))=0');\n            } elseif ($conditional->getConditionType() == Conditional::CONDITION_NOTCONTAINSBLANKS) {\n                // formula copied from ms xlsx xml source file\n                $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))>0');\n            } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSERRORS) {\n                // formula copied from ms xlsx xml source file\n                $objWriter->writeElement('formula', 'ISERROR(' . $cellCoordinate . ')');\n            } elseif ($conditional->getConditionType() == Conditional::CONDITION_NOTCONTAINSERRORS) {\n                // formula copied from ms xlsx xml source file\n                $objWriter->writeElement('formula', 'NOT(ISERROR(' . $cellCoordinate . '))');\n            }\n        }\n    }\n\n    private static function writeTimePeriodCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate): void\n    {\n        $txt = $conditional->getText();\n        if (!empty($txt)) {\n            $objWriter->writeAttribute('timePeriod', $txt);\n            if (empty($conditional->getConditions())) {\n                if ($conditional->getOperatorType() == Conditional::TIMEPERIOD_TODAY) {\n                    $objWriter->writeElement('formula', 'FLOOR(' . $cellCoordinate . ')=TODAY()');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_TOMORROW) {\n                    $objWriter->writeElement('formula', 'FLOOR(' . $cellCoordinate . ')=TODAY()+1');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_YESTERDAY) {\n                    $objWriter->writeElement('formula', 'FLOOR(' . $cellCoordinate . ')=TODAY()-1');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_LAST_7_DAYS) {\n                    $objWriter->writeElement('formula', 'AND(TODAY()-FLOOR(' . $cellCoordinate . ',1)<=6,FLOOR(' . $cellCoordinate . ',1)<=TODAY())');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_LAST_WEEK) {\n                    $objWriter->writeElement('formula', 'AND(TODAY()-ROUNDDOWN(' . $cellCoordinate . ',0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(' . $cellCoordinate . ',0)<(WEEKDAY(TODAY())+7))');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_THIS_WEEK) {\n                    $objWriter->writeElement('formula', 'AND(TODAY()-ROUNDDOWN(' . $cellCoordinate . ',0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(' . $cellCoordinate . ',0)-TODAY()<=7-WEEKDAY(TODAY()))');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_NEXT_WEEK) {\n                    $objWriter->writeElement('formula', 'AND(ROUNDDOWN(' . $cellCoordinate . ',0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(' . $cellCoordinate . ',0)-TODAY()<(15-WEEKDAY(TODAY())))');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_LAST_MONTH) {\n                    $objWriter->writeElement('formula', 'AND(MONTH(' . $cellCoordinate . ')=MONTH(EDATE(TODAY(),0-1)),YEAR(' . $cellCoordinate . ')=YEAR(EDATE(TODAY(),0-1)))');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_THIS_MONTH) {\n                    $objWriter->writeElement('formula', 'AND(MONTH(' . $cellCoordinate . ')=MONTH(TODAY()),YEAR(' . $cellCoordinate . ')=YEAR(TODAY()))');\n                } elseif ($conditional->getOperatorType() == Conditional::TIMEPERIOD_NEXT_MONTH) {\n                    $objWriter->writeElement('formula', 'AND(MONTH(' . $cellCoordinate . ')=MONTH(EDATE(TODAY(),0+1)),YEAR(' . $cellCoordinate . ')=YEAR(EDATE(TODAY(),0+1)))');\n                }\n            } else {\n                $objWriter->writeElement('formula', (string) ($conditional->getConditions()[0]));\n            }\n        }\n    }\n\n    private static function writeTextCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate): void\n    {\n        $txt = $conditional->getText();\n        if (!empty($txt)) {\n            $objWriter->writeAttribute('text', $txt);\n            if (empty($conditional->getConditions())) {\n                if ($conditional->getOperatorType() == Conditional::OPERATOR_CONTAINSTEXT) {\n                    $objWriter->writeElement('formula', 'NOT(ISERROR(SEARCH(\"' . $txt . '\",' . $cellCoordinate . ')))');\n                } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_BEGINSWITH) {\n                    $objWriter->writeElement('formula', 'LEFT(' . $cellCoordinate . ',LEN(\"' . $txt . '\"))=\"' . $txt . '\"');\n                } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_ENDSWITH) {\n                    $objWriter->writeElement('formula', 'RIGHT(' . $cellCoordinate . ',LEN(\"' . $txt . '\"))=\"' . $txt . '\"');\n                } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_NOTCONTAINS) {\n                    $objWriter->writeElement('formula', 'ISERROR(SEARCH(\"' . $txt . '\",' . $cellCoordinate . '))');\n                }\n            } else {\n                $objWriter->writeElement('formula', (string) ($conditional->getConditions()[0]));\n            }\n        }\n    }\n\n    private static function writeExtConditionalFormattingElements(XMLWriter $objWriter, ConditionalFormattingRuleExtension $ruleExtension): void\n    {\n        $prefix = 'x14';\n        $objWriter->startElementNs($prefix, 'conditionalFormatting', null);\n\n        $objWriter->startElementNs($prefix, 'cfRule', null);\n        $objWriter->writeAttribute('type', $ruleExtension->getCfRule());\n        $objWriter->writeAttribute('id', $ruleExtension->getId());\n        $objWriter->startElementNs($prefix, 'dataBar', null);\n        $dataBar = $ruleExtension->getDataBarExt();\n        foreach ($dataBar->getXmlAttributes() as $attrKey => $val) {\n            /** @var string $val */\n            $objWriter->writeAttribute($attrKey, $val);\n        }\n        $minCfvo = $dataBar->getMinimumConditionalFormatValueObject();\n        // Phpstan is wrong about the next statement.\n        if ($minCfvo !== null) { // @phpstan-ignore-line\n            $objWriter->startElementNs($prefix, 'cfvo', null);\n            $objWriter->writeAttribute('type', $minCfvo->getType());\n            if ($minCfvo->getCellFormula()) {\n                $objWriter->writeElement('xm:f', $minCfvo->getCellFormula());\n            }\n            $objWriter->endElement(); //end cfvo\n        }\n\n        $maxCfvo = $dataBar->getMaximumConditionalFormatValueObject();\n        // Phpstan is wrong about the next statement.\n        if ($maxCfvo !== null) { // @phpstan-ignore-line\n            $objWriter->startElementNs($prefix, 'cfvo', null);\n            $objWriter->writeAttribute('type', $maxCfvo->getType());\n            if ($maxCfvo->getCellFormula()) {\n                $objWriter->writeElement('xm:f', $maxCfvo->getCellFormula());\n            }\n            $objWriter->endElement(); //end cfvo\n        }\n\n        foreach ($dataBar->getXmlElements() as $elmKey => $elmAttr) {\n            /** @var string[] $elmAttr */\n            $objWriter->startElementNs($prefix, $elmKey, null);\n            foreach ($elmAttr as $attrKey => $attrVal) {\n                $objWriter->writeAttribute($attrKey, $attrVal);\n            }\n            $objWriter->endElement(); //end elmKey\n        }\n        $objWriter->endElement(); //end dataBar\n        $objWriter->endElement(); //end cfRule\n        $objWriter->writeElement('xm:sqref', $ruleExtension->getSqref());\n        $objWriter->endElement(); //end conditionalFormatting\n    }\n\n    private static function writeDataBarElements(XMLWriter $objWriter, ?ConditionalDataBar $dataBar): void\n    {\n        if ($dataBar) {\n            $objWriter->startElement('dataBar');\n            self::writeAttributeIf($objWriter, null !== $dataBar->getShowValue(), 'showValue', $dataBar->getShowValue() ? '1' : '0');\n\n            $minCfvo = $dataBar->getMinimumConditionalFormatValueObject();\n            if ($minCfvo) {\n                $objWriter->startElement('cfvo');\n                $objWriter->writeAttribute('type', $minCfvo->getType());\n                self::writeAttributeIf($objWriter, $minCfvo->getValue() !== null, 'val', (string) $minCfvo->getValue());\n                $objWriter->endElement();\n            }\n            $maxCfvo = $dataBar->getMaximumConditionalFormatValueObject();\n            if ($maxCfvo) {\n                $objWriter->startElement('cfvo');\n                $objWriter->writeAttribute('type', $maxCfvo->getType());\n                self::writeAttributeIf($objWriter, $maxCfvo->getValue() !== null, 'val', (string) $maxCfvo->getValue());\n                $objWriter->endElement();\n            }\n            if ($dataBar->getColor()) {\n                $objWriter->startElement('color');\n                $objWriter->writeAttribute('rgb', $dataBar->getColor());\n                $objWriter->endElement();\n            }\n            $objWriter->endElement(); // end dataBar\n\n            if ($dataBar->getConditionalFormattingRuleExt()) {\n                $objWriter->startElement('extLst');\n                $extension = $dataBar->getConditionalFormattingRuleExt();\n                $objWriter->startElement('ext');\n                $objWriter->writeAttribute('uri', '{B025F937-C7B1-47D3-B67F-A62EFF666E3E}');\n                $objWriter->startElementNs('x14', 'id', null);\n                $objWriter->text($extension->getId());\n                $objWriter->endElement();\n                $objWriter->endElement();\n                $objWriter->endElement(); //end extLst\n            }\n        }\n    }\n\n    private static function writeColorScaleElements(XMLWriter $objWriter, ?ConditionalColorScale $colorScale): void\n    {\n        if ($colorScale) {\n            $objWriter->startElement('colorScale');\n\n            $minCfvo = $colorScale->getMinimumConditionalFormatValueObject();\n            $minArgb = $colorScale->getMinimumColor()?->getARGB();\n            $useMin = $minCfvo !== null || $minArgb !== null;\n            if ($useMin) {\n                $objWriter->startElement('cfvo');\n                $type = 'min';\n                $value = null;\n                if ($minCfvo !== null) {\n                    $typex = $minCfvo->getType();\n                    if ($typex === 'formula') {\n                        $value = $minCfvo->getCellFormula();\n                        if ($value !== null) {\n                            $type = $typex;\n                        }\n                    } else {\n                        $type = $typex;\n                        $defaults = ['number' => '0', 'percent' => '0', 'percentile' => '10'];\n                        $value = $minCfvo->getValue() ?? $defaults[$type] ?? null;\n                    }\n                }\n                $objWriter->writeAttribute('type', $type);\n                self::writeAttributeIf($objWriter, $value !== null, 'val', (string) $value);\n                $objWriter->endElement();\n            }\n            $midCfvo = $colorScale->getMidpointConditionalFormatValueObject();\n            $midArgb = $colorScale->getMidpointColor()?->getARGB();\n            $useMid = $midCfvo !== null || $midArgb !== null;\n            if ($useMid) {\n                $objWriter->startElement('cfvo');\n                $type = 'percentile';\n                $value = '50';\n                if ($midCfvo !== null) {\n                    $type = $midCfvo->getType();\n                    if ($type === 'formula') {\n                        $value = $midCfvo->getCellFormula();\n                        if ($value === null) {\n                            $type = 'percentile';\n                            $value = '50';\n                        }\n                    } else {\n                        $defaults = ['number' => '0', 'percent' => '50', 'percentile' => '50'];\n                        $value = $midCfvo->getValue() ?? $defaults[$type] ?? null;\n                    }\n                }\n                $objWriter->writeAttribute('type', $type);\n                self::writeAttributeIf($objWriter, $value !== null, 'val', (string) $value);\n                $objWriter->endElement();\n            }\n            $maxCfvo = $colorScale->getMaximumConditionalFormatValueObject();\n            $maxArgb = $colorScale->getMaximumColor()?->getARGB();\n            $useMax = $maxCfvo !== null || $maxArgb !== null;\n            if ($useMax) {\n                $objWriter->startElement('cfvo');\n                $type = 'max';\n                $value = null;\n                if ($maxCfvo !== null) {\n                    $typex = $maxCfvo->getType();\n                    if ($typex === 'formula') {\n                        $value = $maxCfvo->getCellFormula();\n                        if ($value !== null) {\n                            $type = $typex;\n                        }\n                    } else {\n                        $type = $typex;\n                        $defaults = ['number' => '0', 'percent' => '100', 'percentile' => '90'];\n                        $value = $maxCfvo->getValue() ?? $defaults[$type] ?? null;\n                    }\n                }\n                $objWriter->writeAttribute('type', $type);\n                self::writeAttributeIf($objWriter, $value !== null, 'val', (string) $value);\n                $objWriter->endElement();\n            }\n            if ($useMin) {\n                $objWriter->startElement('color');\n                self::writeAttributeIf($objWriter, $minArgb !== null, 'rgb', \"$minArgb\");\n                $objWriter->endElement();\n            }\n            if ($useMid) {\n                $objWriter->startElement('color');\n                self::writeAttributeIf($objWriter, $midArgb !== null, 'rgb', \"$midArgb\");\n                $objWriter->endElement();\n            }\n            if ($useMax) {\n                $objWriter->startElement('color');\n                self::writeAttributeIf($objWriter, $maxArgb !== null, 'rgb', \"$maxArgb\");\n                $objWriter->endElement();\n            }\n            $objWriter->endElement(); // end colorScale\n        }\n    }\n\n    private function writeIconSetElements(XMLWriter $objWriter, ?ConditionalIconSet $iconSet): void\n    {\n        if ($iconSet === null) {\n            return;\n        }\n\n        $objWriter->startElement('iconSet');\n        if ($iconSet->getIconSetType() !== null) {\n            $objWriter->writeAttribute('iconSet', $iconSet->getIconSetType()->value);\n        }\n        foreach (\n            [\n                'reverse' => $iconSet->getReverse(),\n                'showValue' => $iconSet->getShowValue(),\n                'custom' => $iconSet->getCustom(),\n            ] as $attr => $value\n        ) {\n            self::writeAttributeIf($objWriter, $value !== null, $attr, $value ? '1' : '0');\n        }\n\n        foreach ($iconSet->getCfvos() as $cfvo) {\n            $objWriter->startElement('cfvo');\n            $objWriter->writeAttribute('type', $cfvo->getType());\n            self::writeAttributeIf(\n                $objWriter,\n                $cfvo->getValue() !== null,\n                'val',\n                (string) $cfvo->getValue(),\n            );\n            self::writeAttributeIf(\n                $objWriter,\n                $cfvo->getGreaterThanOrEqual() !== null,\n                'gte',\n                $cfvo->getGreaterThanOrEqual() ? '1' : '0',\n            );\n            $objWriter->endElement(); // end cfvo\n        }\n\n        $objWriter->endElement(); // end iconSet\n    }\n\n    /**\n     * Write ConditionalFormatting.\n     */\n    private function writeConditionalFormatting(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // Conditional id\n        $id = 0;\n        foreach ($worksheet->getConditionalStylesCollection() as $conditionalStyles) {\n            foreach ($conditionalStyles as $conditional) {\n                $id = max($id, $conditional->getPriority());\n            }\n        }\n\n        // Loop through styles in the current worksheet\n        foreach ($worksheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) {\n            $objWriter->startElement('conditionalFormatting');\n            // N.B. In Excel UI, intersection is space and union is comma.\n            // But in Xml, intersection is comma and union is space.\n            // Anyhow, I don't think Excel handles intersection correctly when reading.\n            $outCoordinate = Coordinate::resolveUnionAndIntersection(str_replace('$', '', $cellCoordinate), ' ');\n            $objWriter->writeAttribute('sqref', $outCoordinate);\n\n            foreach ($conditionalStyles as $conditional) {\n                // WHY was this again?\n                // if ($this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode()) == '') {\n                //    continue;\n                // }\n                // cfRule\n                $objWriter->startElement('cfRule');\n                $objWriter->writeAttribute('type', $conditional->getConditionType());\n                self::writeAttributeIf(\n                    $objWriter,\n                    ($conditional->getConditionType() !== Conditional::CONDITION_COLORSCALE\n                        && $conditional->getConditionType() !== Conditional::CONDITION_DATABAR\n                        && $conditional->getConditionType() !== Conditional::CONDITION_ICONSET\n                        && $conditional->getNoFormatSet() === false),\n                    'dxfId',\n                    (string) $this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode())\n                );\n                $priority = $conditional->getPriority() ?: ++$id;\n                $objWriter->writeAttribute('priority', (string) $priority);\n\n                self::writeAttributeif(\n                    $objWriter,\n                    (\n                        $conditional->getConditionType() === Conditional::CONDITION_CELLIS\n                        || $conditional->getConditionType() === Conditional::CONDITION_CONTAINSTEXT\n                        || $conditional->getConditionType() === Conditional::CONDITION_NOTCONTAINSTEXT\n                        || $conditional->getConditionType() === Conditional::CONDITION_BEGINSWITH\n                        || $conditional->getConditionType() === Conditional::CONDITION_ENDSWITH\n                    ) && $conditional->getOperatorType() !== Conditional::OPERATOR_NONE,\n                    'operator',\n                    $conditional->getOperatorType()\n                );\n\n                self::writeAttributeIf($objWriter, $conditional->getStopIfTrue(), 'stopIfTrue', '1');\n\n                $cellRange = Coordinate::splitRange(str_replace('$', '', strtoupper($cellCoordinate)));\n                [$topLeftCell] = $cellRange[0];\n\n                if (\n                    $conditional->getConditionType() === Conditional::CONDITION_CONTAINSTEXT\n                    || $conditional->getConditionType() === Conditional::CONDITION_NOTCONTAINSTEXT\n                    || $conditional->getConditionType() === Conditional::CONDITION_BEGINSWITH\n                    || $conditional->getConditionType() === Conditional::CONDITION_ENDSWITH\n                ) {\n                    self::writeTextCondElements($objWriter, $conditional, $topLeftCell);\n                } elseif ($conditional->getConditionType() === Conditional::CONDITION_TIMEPERIOD) {\n                    self::writeTimePeriodCondElements($objWriter, $conditional, $topLeftCell);\n                } elseif ($conditional->getConditionType() === Conditional::CONDITION_COLORSCALE) {\n                    self::writeColorScaleElements($objWriter, $conditional->getColorScale());\n                } elseif ($conditional->getConditionType() === Conditional::CONDITION_ICONSET) {\n                    self::writeIconSetElements($objWriter, $conditional->getIconSet());\n                } else {\n                    self::writeOtherCondElements($objWriter, $conditional, $topLeftCell);\n                }\n\n                //<dataBar>\n                self::writeDataBarElements($objWriter, $conditional->getDataBar());\n\n                $objWriter->endElement(); //end cfRule\n            }\n\n            $objWriter->endElement(); //end conditionalFormatting\n        }\n    }\n\n    /**\n     * Write DataValidations.\n     */\n    private function writeDataValidations(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // Datavalidation collection\n        $dataValidationCollection = $worksheet->getDataValidationCollection();\n\n        // Write data validations?\n        if (!empty($dataValidationCollection)) {\n            $objWriter->startElement('dataValidations');\n            $objWriter->writeAttribute('count', (string) count($dataValidationCollection));\n\n            foreach ($dataValidationCollection as $coordinate => $dv) {\n                $objWriter->startElement('dataValidation');\n\n                if ($dv->getType() != '') {\n                    $objWriter->writeAttribute('type', $dv->getType());\n                }\n\n                if ($dv->getErrorStyle() != '') {\n                    $objWriter->writeAttribute('errorStyle', $dv->getErrorStyle());\n                }\n\n                if ($dv->getOperator() != '') {\n                    $objWriter->writeAttribute('operator', $dv->getOperator());\n                }\n\n                $objWriter->writeAttribute('allowBlank', ($dv->getAllowBlank() ? '1' : '0'));\n                $objWriter->writeAttribute('showDropDown', (!$dv->getShowDropDown() ? '1' : '0'));\n                $objWriter->writeAttribute('showInputMessage', ($dv->getShowInputMessage() ? '1' : '0'));\n                $objWriter->writeAttribute('showErrorMessage', ($dv->getShowErrorMessage() ? '1' : '0'));\n\n                if ($dv->getErrorTitle() !== '') {\n                    $objWriter->writeAttribute('errorTitle', $dv->getErrorTitle());\n                }\n                if ($dv->getError() !== '') {\n                    $objWriter->writeAttribute('error', $dv->getError());\n                }\n                if ($dv->getPromptTitle() !== '') {\n                    $objWriter->writeAttribute('promptTitle', $dv->getPromptTitle());\n                }\n                if ($dv->getPrompt() !== '') {\n                    $objWriter->writeAttribute('prompt', $dv->getPrompt());\n                }\n\n                $objWriter->writeAttribute('sqref', $dv->getSqref() ?? $coordinate);\n\n                if ($dv->getFormula1() !== '') {\n                    $objWriter->writeElement('formula1', FunctionPrefix::addFunctionPrefix($dv->getFormula1()));\n                }\n                if ($dv->getFormula2() !== '') {\n                    $objWriter->writeElement('formula2', FunctionPrefix::addFunctionPrefix($dv->getFormula2()));\n                }\n\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write Hyperlinks.\n     */\n    private function writeHyperlinks(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // Hyperlink collection\n        $hyperlinkCollection = $worksheet->getHyperlinkCollection();\n\n        // Relation ID\n        $relationId = 1;\n\n        // Write hyperlinks?\n        if (!empty($hyperlinkCollection)) {\n            $objWriter->startElement('hyperlinks');\n\n            foreach ($hyperlinkCollection as $coordinate => $hyperlink) {\n                $objWriter->startElement('hyperlink');\n\n                $objWriter->writeAttribute('ref', $coordinate);\n                if (!$hyperlink->isInternal()) {\n                    $objWriter->writeAttribute('r:id', 'rId_hyperlink_' . $relationId);\n                    ++$relationId;\n                } else {\n                    $objWriter->writeAttribute('location', str_replace('sheet://', '', $hyperlink->getUrl()));\n                }\n\n                if ($hyperlink->getTooltip() !== '') {\n                    $objWriter->writeAttribute('tooltip', $hyperlink->getTooltip());\n                }\n                if ($hyperlink->getDisplay() !== '') {\n                    $objWriter->writeAttribute('display', $hyperlink->getDisplay());\n                } elseif ($hyperlink->getTooltip() !== '') {\n                    // Probably shouldn't do this,\n                    // but avoids a breaking change.\n                    // This was introduced in PR 904 in 2019.\n                    $objWriter->writeAttribute('display', $hyperlink->getTooltip());\n                }\n\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write ProtectedRanges.\n     */\n    private function writeProtectedRanges(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        if (count($worksheet->getProtectedCellRanges()) > 0) {\n            // protectedRanges\n            $objWriter->startElement('protectedRanges');\n\n            // Loop protectedRanges\n            foreach ($worksheet->getProtectedCellRanges() as $protectedCell => $protectedRange) {\n                // protectedRange\n                $objWriter->startElement('protectedRange');\n                $objWriter->writeAttribute('name', $protectedRange->getName());\n                $objWriter->writeAttribute('sqref', $protectedCell);\n                $passwordHash = $protectedRange->getPassword();\n                $this->writeAttributeIf($objWriter, $passwordHash !== '', 'password', $passwordHash);\n                $securityDescriptor = $protectedRange->getSecurityDescriptor();\n                $this->writeAttributeIf($objWriter, $securityDescriptor !== '', 'securityDescriptor', $securityDescriptor);\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write MergeCells.\n     */\n    private function writeMergeCells(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        if (count($worksheet->getMergeCells()) > 0) {\n            // mergeCells\n            $objWriter->startElement('mergeCells');\n\n            // Loop mergeCells\n            foreach ($worksheet->getMergeCells() as $mergeCell) {\n                // mergeCell\n                $objWriter->startElement('mergeCell');\n                $objWriter->writeAttribute('ref', $mergeCell);\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write PrintOptions.\n     */\n    private function writePrintOptions(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // printOptions\n        $objWriter->startElement('printOptions');\n\n        $objWriter->writeAttribute('gridLines', ($worksheet->getPrintGridlines() ? 'true' : 'false'));\n        $objWriter->writeAttribute('gridLinesSet', 'true');\n\n        if ($worksheet->getPageSetup()->getHorizontalCentered()) {\n            $objWriter->writeAttribute('horizontalCentered', 'true');\n        }\n\n        if ($worksheet->getPageSetup()->getVerticalCentered()) {\n            $objWriter->writeAttribute('verticalCentered', 'true');\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write PageMargins.\n     */\n    private function writePageMargins(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // pageMargins\n        $objWriter->startElement('pageMargins');\n        $objWriter->writeAttribute('left', StringHelper::formatNumber($worksheet->getPageMargins()->getLeft()));\n        $objWriter->writeAttribute('right', StringHelper::formatNumber($worksheet->getPageMargins()->getRight()));\n        $objWriter->writeAttribute('top', StringHelper::formatNumber($worksheet->getPageMargins()->getTop()));\n        $objWriter->writeAttribute('bottom', StringHelper::formatNumber($worksheet->getPageMargins()->getBottom()));\n        $objWriter->writeAttribute('header', StringHelper::formatNumber($worksheet->getPageMargins()->getHeader()));\n        $objWriter->writeAttribute('footer', StringHelper::formatNumber($worksheet->getPageMargins()->getFooter()));\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write AutoFilter.\n     */\n    private function writeAutoFilter(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        AutoFilter::writeAutoFilter($objWriter, $worksheet);\n    }\n\n    /**\n     * Write Table.\n     */\n    private function writeTable(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        $tableCount = $worksheet->getTableCollection()->count();\n        if ($tableCount === 0) {\n            return;\n        }\n\n        $objWriter->startElement('tableParts');\n        $objWriter->writeAttribute('count', (string) $tableCount);\n\n        for ($t = 1; $t <= $tableCount; ++$t) {\n            $objWriter->startElement('tablePart');\n            $objWriter->writeAttribute('r:id', 'rId_table_' . $t);\n            $objWriter->endElement();\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Background Image.\n     */\n    private function writeBackgroundImage(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        if ($worksheet->getBackgroundImage() !== '') {\n            $objWriter->startElement('picture');\n            $objWriter->writeAttribute('r:id', 'rIdBg');\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write PageSetup.\n     */\n    private function writePageSetup(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // pageSetup\n        $objWriter->startElement('pageSetup');\n        $objWriter->writeAttribute('paperSize', (string) $worksheet->getPageSetup()->getPaperSize());\n        $objWriter->writeAttribute('orientation', $worksheet->getPageSetup()->getOrientation());\n\n        if ($worksheet->getPageSetup()->getScale() !== null) {\n            $objWriter->writeAttribute('scale', (string) $worksheet->getPageSetup()->getScale());\n        }\n        if ($worksheet->getPageSetup()->getFitToHeight() !== null) {\n            $objWriter->writeAttribute('fitToHeight', (string) $worksheet->getPageSetup()->getFitToHeight());\n        } else {\n            $objWriter->writeAttribute('fitToHeight', '0');\n        }\n        if ($worksheet->getPageSetup()->getFitToWidth() !== null) {\n            $objWriter->writeAttribute('fitToWidth', (string) $worksheet->getPageSetup()->getFitToWidth());\n        } else {\n            $objWriter->writeAttribute('fitToWidth', '0');\n        }\n        if (!empty($worksheet->getPageSetup()->getFirstPageNumber())) {\n            $objWriter->writeAttribute('firstPageNumber', (string) $worksheet->getPageSetup()->getFirstPageNumber());\n            $objWriter->writeAttribute('useFirstPageNumber', '1');\n        }\n        $objWriter->writeAttribute('pageOrder', $worksheet->getPageSetup()->getPageOrder());\n\n        /** @var string[][][] */\n        $getUnparsedLoadedData = $worksheet->getParentOrThrow()->getUnparsedLoadedData();\n        if (isset($getUnparsedLoadedData['sheets'][$worksheet->getCodeName()]['pageSetupRelId'])) {\n            $objWriter->writeAttribute('r:id', $getUnparsedLoadedData['sheets'][$worksheet->getCodeName()]['pageSetupRelId']);\n        }\n\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write Header / Footer.\n     */\n    private function writeHeaderFooter(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // headerFooter\n        $headerFooter = $worksheet->getHeaderFooter();\n        $oddHeader = $headerFooter->getOddHeader();\n        $oddFooter = $headerFooter->getOddFooter();\n        $evenHeader = $headerFooter->getEvenHeader();\n        $evenFooter = $headerFooter->getEvenFooter();\n        $firstHeader = $headerFooter->getFirstHeader();\n        $firstFooter = $headerFooter->getFirstFooter();\n        if (\"$oddHeader$oddFooter$evenHeader$evenFooter$firstHeader$firstFooter\" === '') {\n            return;\n        }\n\n        $objWriter->startElement('headerFooter');\n        $objWriter->writeAttribute('differentOddEven', ($worksheet->getHeaderFooter()->getDifferentOddEven() ? 'true' : 'false'));\n        $objWriter->writeAttribute('differentFirst', ($worksheet->getHeaderFooter()->getDifferentFirst() ? 'true' : 'false'));\n        $objWriter->writeAttribute('scaleWithDoc', ($worksheet->getHeaderFooter()->getScaleWithDocument() ? 'true' : 'false'));\n        $objWriter->writeAttribute('alignWithMargins', ($worksheet->getHeaderFooter()->getAlignWithMargins() ? 'true' : 'false'));\n\n        self::writeElementIf($objWriter, $oddHeader !== '', 'oddHeader', $oddHeader);\n        self::writeElementIf($objWriter, $oddFooter !== '', 'oddFooter', $oddFooter);\n        self::writeElementIf($objWriter, $evenHeader !== '', 'evenHeader', $evenHeader);\n        self::writeElementIf($objWriter, $evenFooter !== '', 'evenFooter', $evenFooter);\n        self::writeElementIf($objWriter, $firstHeader !== '', 'firstHeader', $firstHeader);\n        self::writeElementIf($objWriter, $firstFooter !== '', 'firstFooter', $firstFooter);\n\n        $objWriter->endElement(); // headerFooter\n    }\n\n    /**\n     * Write Breaks.\n     */\n    private function writeBreaks(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // Get row and column breaks\n        $aRowBreaks = [];\n        $aColumnBreaks = [];\n        foreach ($worksheet->getRowBreaks() as $cell => $break) {\n            $aRowBreaks[$cell] = $break;\n        }\n        foreach ($worksheet->getColumnBreaks() as $cell => $break) {\n            $aColumnBreaks[$cell] = $break;\n        }\n\n        // rowBreaks\n        if (!empty($aRowBreaks)) {\n            $objWriter->startElement('rowBreaks');\n            $objWriter->writeAttribute('count', (string) count($aRowBreaks));\n            $objWriter->writeAttribute('manualBreakCount', (string) count($aRowBreaks));\n\n            foreach ($aRowBreaks as $cell => $break) {\n                $coords = Coordinate::coordinateFromString($cell);\n\n                $objWriter->startElement('brk');\n                $objWriter->writeAttribute('id', $coords[1]);\n                $objWriter->writeAttribute('man', '1');\n                $rowBreakMax = $break->getMaxColOrRow();\n                if ($rowBreakMax >= 0) {\n                    $objWriter->writeAttribute('max', \"$rowBreakMax\");\n                } elseif ($worksheet->getPageSetup()->getPrintArea() !== '') {\n                    $maxCol = Coordinate::columnIndexFromString($worksheet->getHighestColumn());\n                    $objWriter->writeAttribute('max', \"$maxCol\");\n                }\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n        }\n\n        // Second, write column breaks\n        if (!empty($aColumnBreaks)) {\n            $objWriter->startElement('colBreaks');\n            $objWriter->writeAttribute('count', (string) count($aColumnBreaks));\n            $objWriter->writeAttribute('manualBreakCount', (string) count($aColumnBreaks));\n\n            foreach ($aColumnBreaks as $cell => $break) {\n                $coords = Coordinate::indexesFromString($cell);\n\n                $objWriter->startElement('brk');\n                $objWriter->writeAttribute('id', (string) ((int) $coords[0] - 1));\n                $objWriter->writeAttribute('man', '1');\n                $colBreakMax = $break->getMaxColOrRow();\n                if ($colBreakMax >= 0) {\n                    $objWriter->writeAttribute('max', \"$colBreakMax\");\n                } elseif ($worksheet->getPageSetup()->getPrintArea() !== '') {\n                    $maxRow = $worksheet->getHighestRow();\n                    $objWriter->writeAttribute('max', \"$maxRow\");\n                }\n                $objWriter->endElement();\n            }\n\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write SheetData.\n     *\n     * @param string[] $stringTable String table\n     */\n    private function writeSheetData(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet, array $stringTable): void\n    {\n        // Flipped stringtable, for faster index searching\n        $aFlippedStringTable = $this->getParentWriter()->getWriterPartstringtable()->flipStringTable($stringTable);\n\n        // sheetData\n        $objWriter->startElement('sheetData');\n\n        // Get column count\n        $colCount = Coordinate::columnIndexFromString($worksheet->getHighestColumn());\n\n        // Highest row number\n        $highestRow = $worksheet->getHighestRow();\n\n        // Loop through cells building a comma-separated list of the columns in each row\n        // This is a trade-off between the memory usage that is required for a full array of columns,\n        //      and execution speed\n        /** @var array<int, string> $cellsByRow */\n        $cellsByRow = [];\n        foreach ($worksheet->getCoordinates() as $coordinate) {\n            [$column, $row] = Coordinate::coordinateFromString($coordinate);\n            if (!isset($cellsByRow[$row])) {\n                $pCell = $worksheet->getCell(\"$column$row\");\n                $xfi = $pCell->getXfIndex();\n                $cellValue = $pCell->getValue();\n                $writeValue = $cellValue !== '' && $cellValue !== null;\n                if (!empty($xfi) || $writeValue) {\n                    $cellsByRow[$row] = \"{$column},\";\n                }\n            } else {\n                $cellsByRow[$row] .= \"{$column},\";\n            }\n        }\n\n        $customHeightNeeded = false;\n        if ($worksheet->getDefaultRowDimension()->getRowHeight() >= 0) {\n            foreach ($worksheet->getRowDimensions() as $rowDimension) {\n                if ($rowDimension->getCustomFormat()) {\n                    $customHeightNeeded = true;\n\n                    break;\n                }\n            }\n        }\n        $currentRow = 0;\n        $emptyDimension = new RowDimension();\n        while ($currentRow++ < $highestRow) {\n            $isRowSet = isset($cellsByRow[$currentRow]);\n            if ($isRowSet || $worksheet->rowDimensionExists($currentRow)) {\n                // Get row dimension\n                $rowDimension = $worksheet->rowDimensionExists($currentRow) ? $worksheet->getRowDimension($currentRow) : $emptyDimension;\n\n                // Write current row?\n                $writeCurrentRow = $isRowSet || $rowDimension->getRowHeight() >= 0 || $rowDimension->getVisible() === false || $rowDimension->getCollapsed() === true || $rowDimension->getOutlineLevel() > 0 || $rowDimension->getXfIndex() !== null;\n\n                if ($writeCurrentRow) {\n                    // Start a new row\n                    $customFormatWritten = false;\n                    $objWriter->startElement('row');\n                    $objWriter->writeAttribute('r', \"$currentRow\");\n                    $objWriter->writeAttribute('spans', '1:' . $colCount);\n\n                    // Row dimensions\n                    if ($rowDimension->getRowHeight() >= 0) {\n                        $objWriter->writeAttribute('customHeight', '1');\n                        $objWriter->writeAttribute('ht', StringHelper::formatNumber($rowDimension->getRowHeight()));\n                    } elseif ($rowDimension->getCustomFormat()) {\n                        $objWriter->writeAttribute('customFormat', '1');\n                        $customFormatWritten = true;\n                        $objWriter->writeAttribute('ht', StringHelper::formatNumber($rowDimension->getRowHeight()));\n                    } elseif ($customHeightNeeded) {\n                        $objWriter->writeAttribute('customHeight', '1');\n                    }\n\n                    // Row visibility\n                    if (!$rowDimension->getVisible() === true) {\n                        $objWriter->writeAttribute('hidden', 'true');\n                    }\n\n                    // Collapsed\n                    if ($rowDimension->getCollapsed() === true) {\n                        $objWriter->writeAttribute('collapsed', 'true');\n                    }\n\n                    // Outline level\n                    if ($rowDimension->getOutlineLevel() > 0) {\n                        $objWriter->writeAttribute('outlineLevel', (string) $rowDimension->getOutlineLevel());\n                    }\n\n                    // Style\n                    if ($rowDimension->getXfIndex() !== null) {\n                        $objWriter->writeAttribute('s', (string) $rowDimension->getXfIndex());\n                        if (!$customFormatWritten) {\n                            $objWriter->writeAttribute('customFormat', '1');\n                        }\n                    }\n\n                    // Write cells\n                    if (isset($cellsByRow[$currentRow])) {\n                        // We have a comma-separated list of column names (with a trailing entry); split to an array\n                        $columnsInRow = explode(',', $cellsByRow[$currentRow]);\n                        array_pop($columnsInRow);\n                        foreach ($columnsInRow as $column) {\n                            // Write cell\n                            $coord = \"$column$currentRow\";\n                            if ($worksheet->getCell($coord)->getIgnoredErrors()->getNumberStoredAsText()) {\n                                $this->numberStoredAsText .= \" $coord\";\n                            }\n                            if ($worksheet->getCell($coord)->getIgnoredErrors()->getFormula()) {\n                                $this->formula .= \" $coord\";\n                            }\n                            if ($worksheet->getCell($coord)->getIgnoredErrors()->getFormulaRange()) {\n                                $this->formulaRange .= \" $coord\";\n                            }\n                            if ($worksheet->getCell($coord)->getIgnoredErrors()->getTwoDigitTextYear()) {\n                                $this->twoDigitTextYear .= \" $coord\";\n                            }\n                            if ($worksheet->getCell($coord)->getIgnoredErrors()->getEvalError()) {\n                                $this->evalError .= \" $coord\";\n                            }\n                            $this->writeCell($objWriter, $worksheet, $coord, $aFlippedStringTable);\n                        }\n                    }\n\n                    // End row\n                    $objWriter->endElement();\n                }\n            }\n        }\n\n        $objWriter->endElement();\n    }\n\n    private function writeCellInlineStr(XMLWriter $objWriter, string $mappedType, RichText|string $cellValue, ?Font $font): void\n    {\n        $objWriter->writeAttribute('t', $mappedType);\n        if (!$cellValue instanceof RichText) {\n            $objWriter->startElement('is');\n            $objWriter->startElement('t');\n            $textToWrite = StringHelper::controlCharacterPHP2OOXML(\n                $cellValue\n            );\n            if ($textToWrite !== trim($textToWrite)) {\n                $objWriter->writeAttribute('xml:space', 'preserve');\n            }\n            $objWriter->writeRawData($textToWrite);\n            $objWriter->endElement(); // t\n            $objWriter->endElement(); // is\n        } else {\n            $objWriter->startElement('is');\n            $this->getParentWriter()\n                ->getWriterPartstringtable()\n                ->writeRichText($objWriter, $cellValue, null, $font);\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * @param string[] $flippedStringTable\n     */\n    private function writeCellString(XMLWriter $objWriter, string $mappedType, RichText|string $cellValue, array $flippedStringTable): void\n    {\n        $objWriter->writeAttribute('t', $mappedType);\n        if (!$cellValue instanceof RichText) {\n            self::writeElementIf($objWriter, isset($flippedStringTable[$cellValue]), 'v', $flippedStringTable[$cellValue] ?? '');\n        } else {\n            $objWriter->writeElement('v', $flippedStringTable[$cellValue->getHashCode()]);\n        }\n    }\n\n    private function writeCellNumeric(XMLWriter $objWriter, float|int $cellValue): void\n    {\n        $result = StringHelper::convertToString($cellValue);\n        if (is_float($cellValue) && !str_contains($result, '.')) {\n            $result .= '.0';\n        }\n        $objWriter->writeElement('v', $result);\n    }\n\n    private function writeCellBoolean(XMLWriter $objWriter, string $mappedType, bool $cellValue): void\n    {\n        $objWriter->writeAttribute('t', $mappedType);\n        $objWriter->writeElement('v', $cellValue ? '1' : '0');\n    }\n\n    private function writeCellError(XMLWriter $objWriter, string $mappedType, string $cellValue, string $formulaerr = '#NULL!'): void\n    {\n        $objWriter->writeAttribute('t', $mappedType);\n        $cellIsFormula = str_starts_with($cellValue, '=');\n        self::writeElementIf($objWriter, $cellIsFormula, 'f', FunctionPrefix::addFunctionPrefixStripEquals($cellValue));\n        $objWriter->writeElement('v', $cellIsFormula ? $formulaerr : $cellValue);\n    }\n\n    private function writeCellDrawing(XMLWriter $objWriter, int $index): void\n    {\n        $objWriter->writeAttribute('t', 'e');\n        $objWriter->writeAttribute('vm', (string) $index);\n        $objWriter->writeElement('v', '#VALUE!');\n    }\n\n    private function writeCellFormula(XMLWriter $objWriter, string $cellValue, Cell $cell): void\n    {\n        $attributes = $cell->getFormulaAttributes() ?? [];\n        $coordinate = $cell->getCoordinate();\n        $calculatedValue = $this->getParentWriter()->getPreCalculateFormulas() ? $cell->getCalculatedValue() : $cellValue;\n        if ($calculatedValue === ExcelError::SPILL()) {\n            $objWriter->writeAttribute('t', 'e');\n            //$objWriter->writeAttribute('cm', '1'); // already added\n            $objWriter->writeAttribute('vm', '1');\n            $objWriter->startElement('f');\n            $objWriter->writeAttribute('t', 'array');\n            $objWriter->writeAttribute('aca', '1');\n            $objWriter->writeAttribute('ref', $coordinate);\n            $objWriter->writeAttribute('ca', '1');\n            $objWriter->text(FunctionPrefix::addFunctionPrefixStripEquals($cellValue));\n            $objWriter->endElement(); // f\n            $objWriter->writeElement('v', ExcelError::VALUE()); // note #VALUE! in xml even though error is #SPILL!\n\n            return;\n        }\n        $calculatedValueString = $this->getParentWriter()->getPreCalculateFormulas() ? $cell->getCalculatedValueString() : $cellValue;\n        $result = $calculatedValue;\n        while (is_array($result)) {\n            $result = array_shift($result);\n        }\n        if (is_string($result)) {\n            if (ErrorValue::isError($result)) {\n                $this->writeCellError($objWriter, 'e', $cellValue, $result);\n\n                return;\n            }\n            $objWriter->writeAttribute('t', 'str');\n            $result = $calculatedValueString = StringHelper::controlCharacterPHP2OOXML($result);\n            if (is_string($calculatedValue)) {\n                $calculatedValue = $calculatedValueString;\n            }\n        } elseif (is_bool($result)) {\n            $objWriter->writeAttribute('t', 'b');\n            if (is_bool($calculatedValue)) {\n                $calculatedValue = $result;\n            }\n            $result = (int) $result;\n            $calculatedValueString = (string) $result;\n        }\n\n        if (isset($attributes['ref'])) {\n            $ref = $this->parseRef($coordinate, $attributes['ref']);\n            if ($ref === \"$coordinate:$coordinate\") {\n                $ref = $coordinate;\n            }\n        } else {\n            $ref = $coordinate;\n        }\n        if (is_array($calculatedValue)) {\n            $attributes['t'] = 'array';\n        }\n        if (($attributes['t'] ?? null) === 'array') {\n            $objWriter->startElement('f');\n            $objWriter->writeAttribute('t', 'array');\n            $objWriter->writeAttribute('ref', $ref);\n            $objWriter->writeAttribute('aca', '1');\n            $objWriter->writeAttribute('ca', '1');\n            $objWriter->text(FunctionPrefix::addFunctionPrefixStripEquals($cellValue));\n            $objWriter->endElement();\n            if (\n                is_scalar($result)\n                && $this->getParentWriter()->getOffice2003Compatibility() === false\n                && $this->getParentWriter()->getPreCalculateFormulas()\n            ) {\n                $objWriter->writeElement('v', (string) $result);\n            }\n        } else {\n            $objWriter->writeElement('f', FunctionPrefix::addFunctionPrefixStripEquals($cellValue));\n            self::writeElementIf(\n                $objWriter,\n                $this->getParentWriter()->getOffice2003Compatibility() === false\n                    && $this->getParentWriter()->getPreCalculateFormulas()\n                    && $calculatedValue !== null,\n                'v',\n                (!is_array($calculatedValue) && !str_starts_with($calculatedValueString, '#'))\n                    ? StringHelper::formatNumber($calculatedValueString) : '0'\n            );\n        }\n    }\n\n    private function parseRef(string $coordinate, string $ref): string\n    {\n        if (!Preg::isMatch('/^([A-Z]{1,3})([0-9]{1,7})(:([A-Z]{1,3})([0-9]{1,7}))?$/', $ref, $matches)) {\n            return $ref;\n        }\n        if (!isset($matches[3])) { // single cell, not range\n            return $coordinate;\n        }\n        $minRow = (int) $matches[2];\n        $maxRow = (int) $matches[5];\n        $rows = $maxRow - $minRow + 1;\n        $minCol = Coordinate::columnIndexFromString($matches[1]);\n        $maxCol = Coordinate::columnIndexFromString($matches[4]);\n        $cols = $maxCol - $minCol + 1;\n        $firstCellArray = Coordinate::indexesFromString($coordinate);\n        $lastRow = $firstCellArray[1] + $rows - 1;\n        $lastColumn = $firstCellArray[0] + $cols - 1;\n        $lastColumnString = Coordinate::stringFromColumnIndex($lastColumn);\n\n        return \"$coordinate:$lastColumnString$lastRow\";\n    }\n\n    /**\n     * Write Cell.\n     *\n     * @param string $cellAddress Cell Address\n     * @param string[] $flippedStringTable String table (flipped), for faster index searching\n     */\n    private function writeCell(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet, string $cellAddress, array $flippedStringTable): void\n    {\n        // Cell\n        $pCell = $worksheet->getCell($cellAddress);\n        $xfi = $pCell->getXfIndex();\n        $cellValue = $pCell->getValue();\n        $cellValueString = $pCell->getValueString();\n        $writeValue = $cellValue !== '' && $cellValue !== null;\n        if (empty($xfi) && !$writeValue) {\n            return;\n        }\n        $styleArray = $this->getParentWriter()\n            ->getSpreadsheet()\n            ->getCellXfCollection();\n        $font = $styleArray[$xfi] ?? null;\n        if ($font !== null) {\n            $font = $font->getFont();\n        }\n        $objWriter->startElement('c');\n        $objWriter->writeAttribute('r', $cellAddress);\n        $mappedType = $pCell->getDataType();\n        if ($mappedType === DataType::TYPE_FORMULA) {\n            if ($this->useDynamicArrays) {\n                if (preg_match(PhpspreadsheetWorksheet::FUNCTION_LIKE_GROUPBY, $cellValueString) === 1) {\n                    $tempCalc = [];\n                } else {\n                    $tempCalc = $pCell->getCalculatedValue();\n                }\n                if (is_array($tempCalc)) {\n                    $objWriter->writeAttribute('cm', '1');\n                }\n            }\n        }\n\n        // Sheet styles\n        if ($xfi) {\n            $objWriter->writeAttribute('s', \"$xfi\");\n        } elseif ($this->explicitStyle0) {\n            $objWriter->writeAttribute('s', '0');\n        }\n\n        // If cell value is supplied, write cell value\n        if ($writeValue) {\n            // Write data depending on its type\n            switch (strtolower($mappedType)) {\n                case 'inlinestr':    // Inline string\n                    /** @var RichText|string */\n                    $richText = $cellValue;\n                    $this->writeCellInlineStr($objWriter, $mappedType, $richText, $font);\n\n                    break;\n                case 's':            // String\n                    $this->writeCellString($objWriter, $mappedType, ($cellValue instanceof RichText) ? $cellValue : $cellValueString, $flippedStringTable);\n\n                    break;\n                case 'f':            // Formula\n                    $this->writeCellFormula($objWriter, $cellValueString, $pCell);\n\n                    break;\n                case 'n':            // Numeric\n                    $cellValueNumeric = is_numeric($cellValue) ? ($cellValue + 0) : 0;\n                    $this->writeCellNumeric($objWriter, $cellValueNumeric);\n\n                    break;\n                case 'b':            // Boolean\n                    $this->writeCellBoolean($objWriter, $mappedType, (bool) $cellValue);\n\n                    break;\n                case 'drawingcell':  // DrawingInCell\n                    if ($cellValue instanceof BaseDrawing) {\n                        $index = $cellValue->getIndex();\n                        $this->writeCellDrawing($objWriter, $index);\n                    }\n\n                    break;\n                case 'e':            // Error\n                    $this->writeCellError($objWriter, $mappedType, $cellValueString);\n            }\n        }\n\n        $objWriter->endElement(); // c\n    }\n\n    /**\n     * Write Drawings.\n     *\n     * @param bool $includeCharts Flag indicating if we should include drawing details for charts\n     */\n    private function writeDrawings(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet, bool $includeCharts = false): void\n    {\n        /** @var mixed[][][][] */\n        $unparsedLoadedData = $worksheet->getParentOrThrow()->getUnparsedLoadedData();\n        $hasUnparsedDrawing = isset($unparsedLoadedData['sheets'][$worksheet->getCodeName()]['drawingOriginalIds']);\n        $chartCount = ($includeCharts) ? $worksheet->getChartCollection()->count() : 0;\n        if ($chartCount == 0 && $worksheet->getDrawingCollection()->count() == 0 && !$hasUnparsedDrawing) {\n            return;\n        }\n\n        // If sheet contains drawings, add the relationships\n        $objWriter->startElement('drawing');\n\n        $rId = 'rId1';\n        if (isset($unparsedLoadedData['sheets'][$worksheet->getCodeName()]['drawingOriginalIds'])) {\n            $drawingOriginalIds = $unparsedLoadedData['sheets'][$worksheet->getCodeName()]['drawingOriginalIds'];\n            // take first. In future can be overriten\n            // (! synchronize with \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Rels::writeWorksheetRelationships)\n            $rId = reset($drawingOriginalIds);\n        }\n\n        /** @var string $rId */\n        $objWriter->writeAttribute('r:id', $rId);\n        $objWriter->endElement();\n    }\n\n    /**\n     * Write LegacyDrawing.\n     */\n    private function writeLegacyDrawing(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // If sheet contains comments, add the relationships\n        /** @var mixed[][][][] */\n        $unparsedLoadedData = $worksheet->getParentOrThrow()->getUnparsedLoadedData();\n        if (count($worksheet->getComments()) > 0 || isset($unparsedLoadedData['sheets'][$worksheet->getCodeName()]['legacyDrawing'])) {\n            $objWriter->startElement('legacyDrawing');\n            $objWriter->writeAttribute('r:id', 'rId_comments_vml1');\n            $objWriter->endElement();\n        }\n    }\n\n    /**\n     * Write LegacyDrawingHF.\n     */\n    private function writeLegacyDrawingHF(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        // If sheet contains images, add the relationships\n        if (count($worksheet->getHeaderFooter()->getImages()) > 0) {\n            $objWriter->startElement('legacyDrawingHF');\n            $objWriter->writeAttribute('r:id', 'rId_headerfooter_vml1');\n            $objWriter->endElement();\n        }\n    }\n\n    private function writeAlternateContent(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        /** @var string[][][] */\n        $unparsedSheet = $worksheet->getParentOrThrow()->getUnparsedLoadedData()['sheets'] ?? [];\n        $unparsedSheet = $unparsedSheet[$worksheet->getCodeName()] ?? [];\n        $unparsedSheet = $unparsedSheet['AlternateContents'] ?? [];\n\n        foreach ($unparsedSheet as $alternateContent) {\n            $objWriter->writeRaw($alternateContent);\n        }\n    }\n\n    /**\n     * write <ExtLst>\n     * only implementation conditionalFormattings.\n     *\n     * @url https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/07d607af-5618-4ca2-b683-6a78dc0d9627\n     */\n    private function writeExtLst(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet): void\n    {\n        $conditionalFormattingRuleExtList = [];\n        foreach ($worksheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) {\n            /** @var Conditional $conditional */\n            foreach ($conditionalStyles as $conditional) {\n                $dataBar = $conditional->getDataBar();\n                if ($dataBar && $dataBar->getConditionalFormattingRuleExt()) {\n                    $conditionalFormattingRuleExtList[] = $dataBar->getConditionalFormattingRuleExt();\n                }\n            }\n        }\n\n        if (count($conditionalFormattingRuleExtList) > 0) {\n            $conditionalFormattingRuleExtNsPrefix = 'x14';\n            $objWriter->startElement('extLst');\n            $objWriter->startElement('ext');\n            $objWriter->writeAttribute('uri', '{78C0D931-6437-407d-A8EE-F0AAD7539E65}');\n            $objWriter->startElementNs($conditionalFormattingRuleExtNsPrefix, 'conditionalFormattings', null);\n            foreach ($conditionalFormattingRuleExtList as $extension) {\n                self::writeExtConditionalFormattingElements($objWriter, $extension);\n            }\n            $objWriter->endElement(); //end conditionalFormattings\n            $objWriter->endElement(); //end ext\n            $objWriter->endElement(); //end extLst\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\n\nabstract class WriterPart\n{\n    /**\n     * Parent Xlsx object.\n     */\n    private Xlsx $parentWriter;\n\n    /**\n     * Get parent Xlsx object.\n     */\n    public function getParentWriter(): Xlsx\n    {\n        return $this->parentWriter;\n    }\n\n    /**\n     * Set parent Xlsx object.\n     */\n    public function __construct(Xlsx $writer)\n    {\n        $this->parentWriter = $writer;\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/Xlsx.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\HashTable;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing as WorksheetDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Comments;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\ContentTypes;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\DocProps;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Rels;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\RelsRibbon;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\RelsVBA;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\RichDataDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\StringTable;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Theme;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Workbook;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Worksheet;\nuse ZipArchive;\nuse ZipStream\\Exception\\OverflowException;\nuse ZipStream\\ZipStream;\n\nclass Xlsx extends BaseWriter\n{\n    /**\n     * Office2003 compatibility.\n     */\n    private bool $office2003compatibility = false;\n\n    /**\n     * Private Spreadsheet.\n     */\n    private Spreadsheet $spreadSheet;\n\n    /**\n     * Private string table.\n     *\n     * @var string[]\n     */\n    private array $stringTable = [];\n\n    /**\n     * Private unique Conditional HashTable.\n     *\n     * @var HashTable<Conditional>\n     */\n    private HashTable $stylesConditionalHashTable;\n\n    /**\n     * Private unique Style HashTable.\n     *\n     * @var HashTable<\\PhpOffice\\PhpSpreadsheet\\Style\\Style>\n     */\n    private HashTable $styleHashTable;\n\n    /**\n     * Private unique Fill HashTable.\n     *\n     * @var HashTable<Fill>\n     */\n    private HashTable $fillHashTable;\n\n    /**\n     * Private unique \\PhpOffice\\PhpSpreadsheet\\Style\\Font HashTable.\n     *\n     * @var HashTable<Font>\n     */\n    private HashTable $fontHashTable;\n\n    /**\n     * Private unique Borders HashTable.\n     *\n     * @var HashTable<Borders>\n     */\n    private HashTable $bordersHashTable;\n\n    /**\n     * Private unique NumberFormat HashTable.\n     *\n     * @var HashTable<NumberFormat>\n     */\n    private HashTable $numFmtHashTable;\n\n    /**\n     * Private unique \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\BaseDrawing HashTable.\n     *\n     * @var HashTable<BaseDrawing>\n     */\n    private HashTable $drawingHashTable;\n\n    /**\n     * Private handle for zip stream.\n     */\n    private ZipStream $zip;\n\n    private Chart $writerPartChart;\n\n    private Comments $writerPartComments;\n\n    private ContentTypes $writerPartContentTypes;\n\n    private DocProps $writerPartDocProps;\n\n    private Drawing $writerPartDrawing;\n\n    private Rels $writerPartRels;\n\n    private RelsRibbon $writerPartRelsRibbon;\n\n    private RelsVBA $writerPartRelsVBA;\n\n    private StringTable $writerPartStringTable;\n\n    private Style $writerPartStyle;\n\n    private Theme $writerPartTheme;\n\n    private Table $writerPartTable;\n\n    private Workbook $writerPartWorkbook;\n\n    private Worksheet $writerPartWorksheet;\n\n    private bool $explicitStyle0 = false;\n\n    private bool $useCSEArrays = false;\n\n    private bool $useDynamicArray = false;\n\n    public const DEFAULT_FORCE_FULL_CALC = false;\n\n    // Default changed from null in PhpSpreadsheet 4.0.0.\n    private ?bool $forceFullCalc = self::DEFAULT_FORCE_FULL_CALC;\n\n    protected bool $restrictMaxColumnWidth = false;\n\n    /**\n     * Create a new Xlsx Writer.\n     */\n    public function __construct(Spreadsheet $spreadsheet)\n    {\n        // Assign PhpSpreadsheet\n        $this->setSpreadsheet($spreadsheet);\n        $spreadsheet->setUsesCheckboxStyle();\n\n        $this->writerPartChart = new Chart($this);\n        $this->writerPartComments = new Comments($this);\n        $this->writerPartContentTypes = new ContentTypes($this);\n        $this->writerPartDocProps = new DocProps($this);\n        $this->writerPartDrawing = new Drawing($this);\n        $this->writerPartRels = new Rels($this);\n        $this->writerPartRelsRibbon = new RelsRibbon($this);\n        $this->writerPartRelsVBA = new RelsVBA($this);\n        $this->writerPartStringTable = new StringTable($this);\n        $this->writerPartStyle = new Style($this);\n        $this->writerPartTheme = new Theme($this);\n        $this->writerPartTable = new Table($this);\n        $this->writerPartWorkbook = new Workbook($this);\n        $this->writerPartWorksheet = new Worksheet($this);\n\n        // Set HashTable variables\n        $this->bordersHashTable = new HashTable();\n        $this->drawingHashTable = new HashTable();\n        $this->fillHashTable = new HashTable();\n        $this->fontHashTable = new HashTable();\n        $this->numFmtHashTable = new HashTable();\n        $this->styleHashTable = new HashTable();\n        $this->stylesConditionalHashTable = new HashTable();\n        $this->determineUseDynamicArrays();\n    }\n\n    public function getWriterPartChart(): Chart\n    {\n        return $this->writerPartChart;\n    }\n\n    public function getWriterPartComments(): Comments\n    {\n        return $this->writerPartComments;\n    }\n\n    public function getWriterPartContentTypes(): ContentTypes\n    {\n        return $this->writerPartContentTypes;\n    }\n\n    public function getWriterPartDocProps(): DocProps\n    {\n        return $this->writerPartDocProps;\n    }\n\n    public function getWriterPartDrawing(): Drawing\n    {\n        return $this->writerPartDrawing;\n    }\n\n    public function getWriterPartRels(): Rels\n    {\n        return $this->writerPartRels;\n    }\n\n    public function getWriterPartRelsRibbon(): RelsRibbon\n    {\n        return $this->writerPartRelsRibbon;\n    }\n\n    public function getWriterPartRelsVBA(): RelsVBA\n    {\n        return $this->writerPartRelsVBA;\n    }\n\n    public function getWriterPartStringTable(): StringTable\n    {\n        return $this->writerPartStringTable;\n    }\n\n    public function getWriterPartStyle(): Style\n    {\n        return $this->writerPartStyle;\n    }\n\n    public function getWriterPartTheme(): Theme\n    {\n        return $this->writerPartTheme;\n    }\n\n    public function getWriterPartTable(): Table\n    {\n        return $this->writerPartTable;\n    }\n\n    public function getWriterPartWorkbook(): Workbook\n    {\n        return $this->writerPartWorkbook;\n    }\n\n    public function getWriterPartWorksheet(): Worksheet\n    {\n        return $this->writerPartWorksheet;\n    }\n\n    public function createStyleDictionaries(): void\n    {\n        $this->styleHashTable->addFromSource(\n            $this->getWriterPartStyle()->allStyles(\n                $this->spreadSheet\n            )\n        );\n        $this->stylesConditionalHashTable->addFromSource(\n            $this->getWriterPartStyle()->allConditionalStyles(\n                $this->spreadSheet\n            )\n        );\n        $this->fillHashTable->addFromSource(\n            $this->getWriterPartStyle()->allFills(\n                $this->spreadSheet\n            )\n        );\n        $this->fontHashTable->addFromSource(\n            $this->getWriterPartStyle()->allFonts(\n                $this->spreadSheet\n            )\n        );\n        $this->bordersHashTable->addFromSource(\n            $this->getWriterPartStyle()->allBorders(\n                $this->spreadSheet\n            )\n        );\n        $this->numFmtHashTable->addFromSource(\n            $this->getWriterPartStyle()->allNumberFormats(\n                $this->spreadSheet\n            )\n        );\n    }\n\n    /**\n     * @return (RichText|string)[] $stringTable\n     */\n    public function createStringTable(): array\n    {\n        $this->stringTable = [];\n        for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) {\n            $this->stringTable = $this->getWriterPartStringTable()->createStringTable($this->spreadSheet->getSheet($i), $this->stringTable);\n        }\n\n        return $this->stringTable;\n    }\n\n    /**\n     * Save PhpSpreadsheet to file.\n     *\n     * @param resource|string $filename\n     */\n    public function save($filename, int $flags = 0): void\n    {\n        $this->processFlags($flags);\n        $this->determineUseDynamicArrays();\n\n        // garbage collect\n        $this->pathNames = [];\n        $this->spreadSheet->garbageCollect();\n\n        $saveDebugLog = Calculation::getInstance($this->spreadSheet)->getDebugLog()->getWriteDebugLog();\n        Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog(false);\n        $saveDateReturnType = Functions::getReturnDateType();\n        Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);\n\n        // Create string lookup table\n        $this->createStringTable();\n\n        // Create styles dictionaries\n        $this->createStyleDictionaries();\n\n        // Create drawing dictionary\n        $this->drawingHashTable->addFromSource($this->getWriterPartDrawing()->allDrawings($this->spreadSheet));\n\n        /** @var string[] */\n        $zipContent = [];\n        $richDataCount = 0;\n\n        if ($this->spreadSheet->hasInCellDrawings()) {\n            $richDataDrawing = new RichDataDrawing();\n            $richDataFiles = $richDataDrawing->generateFiles($this->spreadSheet);\n            $richDataCount = count($richDataDrawing->getDrawings());\n\n            // Add all Rich Data files to ZIP\n            foreach ($richDataFiles as $path => $content) {\n                $zipContent[$path] = $content;\n            }\n        }\n\n        // Add [Content_Types].xml to ZIP file\n        $zipContent['[Content_Types].xml'] = $this->getWriterPartContentTypes()->writeContentTypes($this->spreadSheet, $this->includeCharts);\n        $metadataData = (new Xlsx\\Metadata($this))->writeMetadata($richDataCount);\n        if ($metadataData !== '') {\n            $zipContent['xl/metadata.xml'] = $metadataData;\n        }\n        $propertyBagData = (new Xlsx\\FeaturePropertyBag($this))->writeFeaturePropertyBag($this->spreadSheet);\n        if ($propertyBagData !== '') {\n            $zipContent['xl/featurePropertyBag/featurePropertyBag.xml'] = $propertyBagData;\n        }\n\n        //if hasMacros, add the vbaProject.bin file, Certificate file(if exists)\n        if ($this->spreadSheet->hasMacros()) {\n            $macrosCode = $this->spreadSheet->getMacrosCode();\n            if ($macrosCode !== null) {\n                // we have the code ?\n                $zipContent['xl/vbaProject.bin'] = $macrosCode; //allways in 'xl', allways named vbaProject.bin\n                if ($this->spreadSheet->hasMacrosCertificate()) {\n                    //signed macros ?\n                    // Yes : add the certificate file and the related rels file\n                    $zipContent['xl/vbaProjectSignature.bin'] = $this->spreadSheet->getMacrosCertificate();\n                    $zipContent['xl/_rels/vbaProject.bin.rels'] = $this->getWriterPartRelsVBA()->writeVBARelationships();\n                }\n            }\n        }\n        //a custom UI in this workbook ? add it (\"base\" xml and additional objects (pictures) and rels)\n        if ($this->spreadSheet->hasRibbon()) {\n            $tmpRibbonTarget = $this->spreadSheet->getRibbonXMLData('target');\n            $tmpRibbonTarget = is_string($tmpRibbonTarget) ? $tmpRibbonTarget : '';\n            $zipContent[$tmpRibbonTarget] = $this->spreadSheet->getRibbonXMLData('data');\n            if ($this->spreadSheet->hasRibbonBinObjects()) {\n                $tmpRootPath = dirname($tmpRibbonTarget) . '/';\n                $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data'); //the files to write\n                if (is_array($ribbonBinObjects)) {\n                    foreach ($ribbonBinObjects as $aPath => $aContent) {\n                        $zipContent[$tmpRootPath . $aPath] = $aContent;\n                    }\n                }\n                //the rels for files\n                $zipContent[$tmpRootPath . '_rels/' . basename($tmpRibbonTarget) . '.rels'] = $this->getWriterPartRelsRibbon()->writeRibbonRelationships($this->spreadSheet);\n            }\n        }\n\n        // Add relationships to ZIP file\n        $zipContent['_rels/.rels'] = $this->getWriterPartRels()->writeRelationships($this->spreadSheet);\n        $zipContent['xl/_rels/workbook.xml.rels'] = $this->getWriterPartRels()->writeWorkbookRelationships($this->spreadSheet);\n\n        // Add document properties to ZIP file\n        $zipContent['docProps/app.xml'] = $this->getWriterPartDocProps()->writeDocPropsApp($this->spreadSheet);\n        $zipContent['docProps/core.xml'] = $this->getWriterPartDocProps()->writeDocPropsCore($this->spreadSheet);\n        $customPropertiesPart = $this->getWriterPartDocProps()->writeDocPropsCustom($this->spreadSheet);\n        if ($customPropertiesPart !== null) {\n            $zipContent['docProps/custom.xml'] = $customPropertiesPart;\n        }\n\n        // Add theme to ZIP file\n        $zipContent['xl/theme/theme1.xml'] = $this->getWriterPartTheme()->writeTheme($this->spreadSheet);\n\n        // Add string table to ZIP file\n        $zipContent['xl/sharedStrings.xml'] = $this->getWriterPartStringTable()->writeStringTable($this->stringTable);\n\n        // Add styles to ZIP file\n        $zipContent['xl/styles.xml'] = $this->getWriterPartStyle()->writeStyles($this->spreadSheet);\n\n        // Add workbook to ZIP file\n        $zipContent['xl/workbook.xml'] = $this->getWriterPartWorkbook()->writeWorkbook($this->spreadSheet, $this->preCalculateFormulas, $this->forceFullCalc);\n\n        $chartCount = 0;\n        // Add worksheets\n        for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) {\n            $zipContent['xl/worksheets/sheet' . ($i + 1) . '.xml'] = $this->getWriterPartWorksheet()->writeWorksheet($this->spreadSheet->getSheet($i), $this->stringTable, $this->includeCharts);\n            if ($this->includeCharts) {\n                $charts = $this->spreadSheet->getSheet($i)->getChartCollection();\n                if (count($charts) > 0) {\n                    foreach ($charts as $chart) {\n                        $zipContent['xl/charts/chart' . ($chartCount + 1) . '.xml'] = $this->getWriterPartChart()->writeChart($chart, $this->preCalculateFormulas);\n                        ++$chartCount;\n                    }\n                }\n            }\n        }\n\n        $chartRef1 = 0;\n        $tableRef1 = 1;\n        // Add worksheet relationships (drawings, ...)\n        for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) {\n            // Add relationships\n            /** @var string[] $zipContent */\n            $zipContent['xl/worksheets/_rels/sheet' . ($i + 1) . '.xml.rels'] = $this->getWriterPartRels()->writeWorksheetRelationships($this->spreadSheet->getSheet($i), ($i + 1), $this->includeCharts, $tableRef1, $zipContent);\n\n            // Add unparsedLoadedData\n            $sheetCodeName = $this->spreadSheet->getSheet($i)->getCodeName();\n            /** @var mixed[][][] */\n            $unparsedLoadedData = $this->spreadSheet->getUnparsedLoadedData();\n            /** @var mixed[][] */\n            $unparsedSheet = $unparsedLoadedData['sheets'][$sheetCodeName] ?? [];\n            foreach (($unparsedSheet['ctrlProps'] ?? []) as $ctrlProp) {\n                /** @var string[] $ctrlProp */\n                $zipContent[$ctrlProp['filePath']] = $ctrlProp['content'];\n            }\n            foreach (($unparsedSheet['printerSettings'] ?? []) as $ctrlProp) {\n                /** @var string[] $ctrlProp */\n                $zipContent[$ctrlProp['filePath']] = $ctrlProp['content'];\n            }\n\n            $drawings = $this->spreadSheet->getSheet($i)->getDrawingCollection();\n            $drawingCount = count($drawings);\n            if ($this->includeCharts) {\n                $chartCount = $this->spreadSheet->getSheet($i)->getChartCount();\n            }\n\n            // Add drawing and image relationship parts\n            /** @var bool $hasPassThroughDrawing */\n            $hasPassThroughDrawing = $unparsedSheet['drawingPassThroughEnabled'] ?? false;\n            if (($drawingCount > 0) || ($chartCount > 0) || $hasPassThroughDrawing) {\n                // Drawing relationships\n                $zipContent['xl/drawings/_rels/drawing' . ($i + 1) . '.xml.rels'] = $this->getWriterPartRels()->writeDrawingRelationships($this->spreadSheet->getSheet($i), $chartRef1, $this->includeCharts);\n\n                // Drawings\n                $zipContent['xl/drawings/drawing' . ($i + 1) . '.xml'] = $this->getWriterPartDrawing()->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts);\n            } elseif (isset($unparsedSheet['drawingAlternateContents'])) {\n                // Drawings\n                $zipContent['xl/drawings/drawing' . ($i + 1) . '.xml'] = $this->getWriterPartDrawing()->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts);\n            }\n\n            // Add unparsed drawings\n            if (isset($unparsedSheet['Drawings']) && !isset($zipContent['xl/drawings/drawing' . ($i + 1) . '.xml'])) {\n                foreach ($unparsedSheet['Drawings'] as $relId => $drawingXml) {\n                    $drawingFile = array_search($relId, $unparsedSheet['drawingOriginalIds']);\n                    if ($drawingFile !== false) {\n                        //$drawingFile = ltrim($drawingFile, '.');\n                        //$zipContent['xl' . $drawingFile] = $drawingXml;\n                        $zipContent['xl/drawings/drawing' . ($i + 1) . '.xml'] = $drawingXml;\n                    }\n                }\n            }\n            if (isset($unparsedSheet['drawingOriginalIds']) && !isset($zipContent['xl/drawings/drawing' . ($i + 1) . '.xml'])) {\n                $zipContent['xl/drawings/drawing' . ($i + 1) . '.xml'] = '<xml></xml>';\n            }\n\n            // Add comment relationship parts\n            /** @var mixed[][] */\n            $legacyTemp = $unparsedLoadedData['sheets'] ?? [];\n            $legacyTemp = $legacyTemp[$this->spreadSheet->getSheet($i)->getCodeName()] ?? [];\n            $legacy = $legacyTemp['legacyDrawing'] ?? null;\n            if (count($this->spreadSheet->getSheet($i)->getComments()) > 0 || $legacy !== null) {\n                // VML Comments relationships\n                $zipContent['xl/drawings/_rels/vmlDrawing' . ($i + 1) . '.vml.rels'] = $this->getWriterPartRels()->writeVMLDrawingRelationships($this->spreadSheet->getSheet($i));\n\n                // VML Comments\n                $zipContent['xl/drawings/vmlDrawing' . ($i + 1) . '.vml'] = $legacy ?? $this->getWriterPartComments()->writeVMLComments($this->spreadSheet->getSheet($i));\n            }\n\n            // Comments\n            if (count($this->spreadSheet->getSheet($i)->getComments()) > 0) {\n                $zipContent['xl/comments' . ($i + 1) . '.xml'] = $this->getWriterPartComments()->writeComments($this->spreadSheet->getSheet($i));\n\n                // Media\n                foreach ($this->spreadSheet->getSheet($i)->getComments() as $comment) {\n                    if ($comment->hasBackgroundImage()) {\n                        $image = $comment->getBackgroundImage();\n                        $zipContent['xl/media/' . $image->getMediaFilename()] = $this->processDrawing($image);\n                    }\n                }\n            }\n\n            // Add unparsed relationship parts\n            if (isset($unparsedSheet['vmlDrawings'])) {\n                foreach ($unparsedSheet['vmlDrawings'] as $vmlDrawing) {\n                    /** @var string[] $vmlDrawing */\n                    if (!isset($zipContent[$vmlDrawing['filePath']])) {\n                        $zipContent[$vmlDrawing['filePath']] = $vmlDrawing['content'];\n                    }\n                }\n            }\n\n            // Add header/footer relationship parts\n            if (count($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) {\n                // VML Drawings\n                $zipContent['xl/drawings/vmlDrawingHF' . ($i + 1) . '.vml'] = $this->getWriterPartDrawing()->writeVMLHeaderFooterImages($this->spreadSheet->getSheet($i));\n\n                // VML Drawing relationships\n                $zipContent['xl/drawings/_rels/vmlDrawingHF' . ($i + 1) . '.vml.rels'] = $this->getWriterPartRels()->writeHeaderFooterDrawingRelationships($this->spreadSheet->getSheet($i));\n\n                // Media\n                foreach ($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages() as $image) {\n                    if ($image->getPath() !== '') {\n                        $zipContent['xl/media/' . $image->getIndexedFilename()] = file_get_contents($image->getPath());\n                    }\n                }\n            }\n\n            // Add Table parts\n            $tables = $this->spreadSheet->getSheet($i)->getTableCollection();\n            foreach ($tables as $table) {\n                $zipContent['xl/tables/table' . $tableRef1 . '.xml'] = $this->getWriterPartTable()->writeTable($table, $tableRef1++);\n            }\n        }\n\n        // Add media\n        for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) {\n            if ($this->getDrawingHashTable()->getByIndex($i) instanceof WorksheetDrawing) {\n                $imageContents = null;\n                $imagePath = $this->getDrawingHashTable()->getByIndex($i)->getPath();\n                if ($imagePath === '') {\n                    continue;\n                }\n                if (str_contains($imagePath, 'zip://')) {\n                    $imagePath = substr($imagePath, 6);\n                    $imagePathSplitted = explode('#', $imagePath);\n\n                    $imageZip = new ZipArchive();\n                    $imageZip->open($imagePathSplitted[0]);\n                    $imageContents = $imageZip->getFromName($imagePathSplitted[1]);\n                    $imageZip->close();\n                    unset($imageZip);\n                } else {\n                    $imageContents = file_get_contents($imagePath);\n                }\n\n                $zipContent['xl/media/' . $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()] = $imageContents;\n            } elseif ($this->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) {\n                ob_start();\n                $callable = $this->getDrawingHashTable()->getByIndex($i)->getRenderingFunction();\n                call_user_func(\n                    $callable,\n                    $this->getDrawingHashTable()->getByIndex($i)->getImageResource()\n                );\n                $imageContents = ob_get_contents();\n                ob_end_clean();\n\n                $zipContent['xl/media/' . $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()] = $imageContents;\n            }\n        }\n\n        // Add pass-through media files (original media that may not be in the drawing collection)\n        $this->addPassThroughMediaFiles($zipContent); // @phpstan-ignore argument.type\n\n        Functions::setReturnDateType($saveDateReturnType);\n        Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog($saveDebugLog);\n\n        $this->openFileHandle($filename);\n\n        $this->zip = ZipStream0::newZipStream($this->fileHandle);\n\n        /** @var string[] $zipContent */\n        $this->addZipFiles($zipContent);\n\n        // Close file\n        try {\n            $this->zip->finish();\n        } catch (OverflowException) {\n            throw new WriterException('Could not close resource.');\n        }\n\n        $this->maybeCloseFileHandle();\n    }\n\n    /**\n     * Get Spreadsheet object.\n     */\n    public function getSpreadsheet(): Spreadsheet\n    {\n        return $this->spreadSheet;\n    }\n\n    /**\n     * Set Spreadsheet object.\n     *\n     * @param Spreadsheet $spreadsheet PhpSpreadsheet object\n     *\n     * @return $this\n     */\n    public function setSpreadsheet(Spreadsheet $spreadsheet): static\n    {\n        $this->spreadSheet = $spreadsheet;\n\n        return $this;\n    }\n\n    /**\n     * Get string table.\n     *\n     * @return string[]\n     */\n    public function getStringTable(): array\n    {\n        return $this->stringTable;\n    }\n\n    /**\n     * Get Style HashTable.\n     *\n     * @return HashTable<\\PhpOffice\\PhpSpreadsheet\\Style\\Style>\n     */\n    public function getStyleHashTable(): HashTable\n    {\n        return $this->styleHashTable;\n    }\n\n    /**\n     * Get Conditional HashTable.\n     *\n     * @return HashTable<Conditional>\n     */\n    public function getStylesConditionalHashTable(): HashTable\n    {\n        return $this->stylesConditionalHashTable;\n    }\n\n    /**\n     * Get Fill HashTable.\n     *\n     * @return HashTable<Fill>\n     */\n    public function getFillHashTable(): HashTable\n    {\n        return $this->fillHashTable;\n    }\n\n    /**\n     * Get \\PhpOffice\\PhpSpreadsheet\\Style\\Font HashTable.\n     *\n     * @return HashTable<Font>\n     */\n    public function getFontHashTable(): HashTable\n    {\n        return $this->fontHashTable;\n    }\n\n    /**\n     * Get Borders HashTable.\n     *\n     * @return HashTable<Borders>\n     */\n    public function getBordersHashTable(): HashTable\n    {\n        return $this->bordersHashTable;\n    }\n\n    /**\n     * Get NumberFormat HashTable.\n     *\n     * @return HashTable<NumberFormat>\n     */\n    public function getNumFmtHashTable(): HashTable\n    {\n        return $this->numFmtHashTable;\n    }\n\n    /**\n     * Get \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\BaseDrawing HashTable.\n     *\n     * @return HashTable<BaseDrawing>\n     */\n    public function getDrawingHashTable(): HashTable\n    {\n        return $this->drawingHashTable;\n    }\n\n    /**\n     * Get Office2003 compatibility.\n     */\n    public function getOffice2003Compatibility(): bool\n    {\n        return $this->office2003compatibility;\n    }\n\n    /**\n     * Set Office2003 compatibility.\n     *\n     * @param bool $office2003compatibility Office2003 compatibility?\n     *\n     * @return $this\n     */\n    public function setOffice2003Compatibility(bool $office2003compatibility): static\n    {\n        $this->office2003compatibility = $office2003compatibility;\n\n        return $this;\n    }\n\n    /** @var string[] */\n    private array $pathNames = [];\n\n    private function addZipFile(string $path, string $content): void\n    {\n        if (!in_array($path, $this->pathNames)) {\n            $this->pathNames[] = $path;\n            $this->zip->addFile($path, $content);\n        }\n    }\n\n    /** @param string[] $zipContent */\n    private function addZipFiles(array $zipContent): void\n    {\n        foreach ($zipContent as $path => $content) {\n            $this->addZipFile($path, $content);\n        }\n    }\n\n    private function processDrawing(WorksheetDrawing $drawing): string|null|false\n    {\n        $data = null;\n        $filename = $drawing->getPath();\n        if ($filename === '') {\n            return null;\n        }\n        $imageData = getimagesize($filename);\n\n        if (!empty($imageData)) {\n            switch ($imageData[2]) {\n                case 1: // GIF, not supported by BIFF8, we convert to PNG\n                    $image = imagecreatefromgif($filename);\n                    if ($image !== false) {\n                        ob_start();\n                        imagepng($image);\n                        $data = ob_get_contents();\n                        ob_end_clean();\n                    }\n\n                    break;\n\n                case 2: // JPEG\n                    $data = file_get_contents($filename);\n\n                    break;\n\n                case 3: // PNG\n                    $data = file_get_contents($filename);\n\n                    break;\n\n                case 6: // Windows DIB (BMP), we convert to PNG\n                    $image = imagecreatefrombmp($filename);\n                    if ($image !== false) {\n                        ob_start();\n                        imagepng($image);\n                        $data = ob_get_contents();\n                        ob_end_clean();\n                    }\n\n                    break;\n            }\n        }\n\n        return $data;\n    }\n\n    public function getExplicitStyle0(): bool\n    {\n        return $this->explicitStyle0;\n    }\n\n    /**\n     * This may be useful if non-default Alignment is part of default style\n     * and you think you might want to open the spreadsheet\n     * with LibreOffice or Gnumeric.\n     */\n    public function setExplicitStyle0(bool $explicitStyle0): self\n    {\n        $this->explicitStyle0 = $explicitStyle0;\n\n        return $this;\n    }\n\n    public function setUseCSEArrays(?bool $useCSEArrays): void\n    {\n        if ($useCSEArrays !== null) {\n            $this->useCSEArrays = $useCSEArrays;\n        }\n        $this->determineUseDynamicArrays();\n    }\n\n    public function useDynamicArrays(): bool\n    {\n        return $this->useDynamicArray;\n    }\n\n    private function determineUseDynamicArrays(): void\n    {\n        $this->useDynamicArray = $this->preCalculateFormulas && Calculation::getInstance($this->spreadSheet)->getInstanceArrayReturnType() === Calculation::RETURN_ARRAY_AS_ARRAY && !$this->useCSEArrays;\n    }\n\n    /**\n     * If this is set when a spreadsheet is opened,\n     * values may not be automatically re-calculated,\n     * and a button will be available to force re-calculation.\n     * This may apply to all spreadsheets open at that time.\n     * If null, this will be set to the opposite of $preCalculateFormulas.\n     * It is likely that false is the desired setting, although\n     * cases have been reported where true is required (issue #456).\n     * Nevertheless, default is set to false in PhpSpreadsheet 4.0.0.\n     */\n    public function setForceFullCalc(?bool $forceFullCalc): self\n    {\n        $this->forceFullCalc = $forceFullCalc;\n\n        return $this;\n    }\n\n    /**\n     * Excel has a nominal width limint of 255 for a column.\n     * Surprisingly, Xlsx can read and write larger values,\n     * and the file will appear as desired,\n     * but the User Interface does not allow you to set the width beyond 255,\n     * either directly or though auto-fit width.\n     * Xls sets its own value when the width is beyond 255.\n     * This method gets whether PhpSpreadsheet should restrict the\n     * column widths which it writes to the Excel limit, for formats\n     * which allow it to exceed 255.\n     */\n    public function setRestrictMaxColumnWidth(bool $restrictMaxColumnWidth): self\n    {\n        $this->restrictMaxColumnWidth = $restrictMaxColumnWidth;\n\n        return $this;\n    }\n\n    public function getRestrictMaxColumnWidth(): bool\n    {\n        return $this->restrictMaxColumnWidth;\n    }\n\n    /**\n     * Add pass-through media files from original spreadsheet.\n     * This copies media files that are referenced in pass-through drawing XML\n     * but may not be in the drawing collection (e.g., unsupported formats like SVG).\n     *\n     * @param string[] $zipContent\n     */\n    private function addPassThroughMediaFiles(array &$zipContent): void\n    {\n        /** @var array<string, array<string, mixed>> $sheets */\n        $sheets = $this->spreadSheet->getUnparsedLoadedData()['sheets'] ?? [];\n        foreach ($sheets as $sheetData) {\n            /** @var string[] $mediaFiles */\n            $mediaFiles = $sheetData['drawingMediaFiles'] ?? [];\n            /** @var ?string $sourceFile */\n            $sourceFile = $sheetData['drawingSourceFile'] ?? null;\n            if (($sheetData['drawingPassThroughEnabled'] ?? false) !== true || $mediaFiles === [] || !is_string($sourceFile) || !file_exists($sourceFile)) {\n                continue;\n            }\n\n            $sourceZip = new ZipArchive();\n            if ($sourceZip->open($sourceFile) !== true) {\n                continue; // @codeCoverageIgnore\n            }\n\n            foreach ($mediaFiles as $mediaPath) {\n                $zipPath = 'xl/media/' . basename($mediaPath);\n                if (!isset($zipContent[$zipPath])) {\n                    $mediaContent = $sourceZip->getFromName($mediaPath);\n                    if ($mediaContent !== false) {\n                        $zipContent[$zipPath] = $mediaContent;\n                    }\n                }\n            }\n\n            $sourceZip->close();\n        }\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/ZipStream0.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse ZipStream\\Option\\Archive;\nuse ZipStream\\ZipStream;\n\nclass ZipStream0\n{\n    /**\n     * @param resource $fileHandle\n     */\n    public static function newZipStream($fileHandle): ZipStream\n    {\n        return class_exists(Archive::class) ? ZipStream2::newZipStream($fileHandle) : ZipStream3::newZipStream($fileHandle);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/ZipStream2.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse ZipStream\\Option\\Archive;\nuse ZipStream\\ZipStream;\n\n/**\n * Either ZipStream2 or ZipStream3, but not both, may be used.\n * For code coverage testing, it will always be ZipStream3.\n *\n * @codeCoverageIgnore\n */\nclass ZipStream2\n{\n    /**\n     * @param resource $fileHandle\n     */\n    public static function newZipStream($fileHandle): ZipStream\n    {\n        $options = new Archive();\n        $options->setEnableZip64(false);\n        $options->setOutputStream($fileHandle);\n\n        return new ZipStream(null, $options);\n    }\n}\n"
  },
  {
    "path": "src/PhpSpreadsheet/Writer/ZipStream3.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheet\\Writer;\n\nuse ZipStream\\ZipStream;\n\nclass ZipStream3\n{\n    /**\n     * @param resource $fileHandle\n     */\n    public static function newZipStream($fileHandle): ZipStream\n    {\n        return new ZipStream(\n            enableZip64: false,\n            outputStream: $fileHandle,\n            sendHttpHeaders: false,\n            defaultEnableZeroHeader: false,\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/A1LocaleGeneratorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheetInfra\\LocaleGenerator;\nuse PHPUnit\\Framework\\TestCase;\n\nclass A1LocaleGeneratorTest extends TestCase\n{\n    public function testLocaleGenerator(): void\n    {\n        $directory = realpath(__DIR__ . '/../../src/PhpSpreadsheet/Calculation/locale/') ?: '';\n        self::assertNotEquals('', $directory);\n        $phpSpreadsheetFunctions = Calculation::getFunctions();\n\n        $localeGenerator = new LocaleGenerator(\n            $directory . DIRECTORY_SEPARATOR,\n            'Translations.xlsx',\n            $phpSpreadsheetFunctions\n        );\n        $localeGenerator->generateLocales();\n\n        $testLocales = [\n            'bg',\n            'cs',\n            'da',\n            'de',\n            'en',\n            'es',\n            'fi',\n            'fr',\n            'hu',\n            'it',\n            'nb',\n            'nl',\n            'pl',\n            'pt',\n            'ru',\n            'sv',\n            'tr',\n        ];\n\n        $count = count(glob($directory . DIRECTORY_SEPARATOR . '*') ?: []) - 1; // exclude Translations.xlsx\n        self::assertCount($count, $testLocales);\n        $testLocales[] = 'pt_br';\n        $testLocales[] = 'en_uk';\n        $noconfig = ['en'];\n        $nofunctions = ['en', 'en_uk'];\n        foreach ($testLocales as $originalLocale) {\n            $locale = str_replace('_', DIRECTORY_SEPARATOR, $originalLocale);\n            $path = $directory . DIRECTORY_SEPARATOR . $locale;\n            if (in_array($originalLocale, $noconfig, true)) {\n                self::assertFileDoesNotExist($path . DIRECTORY_SEPARATOR . 'config');\n            } else {\n                self::assertFileExists($path . DIRECTORY_SEPARATOR . 'config');\n            }\n            if (in_array($originalLocale, $nofunctions, true)) {\n                self::assertFileDoesNotExist($path . DIRECTORY_SEPARATOR . 'functions');\n            } else {\n                self::assertFileExists($path . DIRECTORY_SEPARATOR . 'functions');\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/ArrayFormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFormulaTest extends TestCase\n{\n    #[DataProvider('providerArrayFormulae')]\n    public function testArrayFormula(string $formula, mixed $expectedResult): void\n    {\n        $result = Calculation::getInstance()->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerArrayFormulae(): array\n    {\n        return [\n            [\n                '=MAX(ABS({-3, 4, -2; 6, -3, -12}))',\n                12,\n            ],\n            'unary operator applied to function' => [\n                '=MAX(-ABS({-3, 4, -2; 6, -3, -12}))',\n                -2,\n            ],\n            [\n                '=SUM(SEQUENCE(3,3,0,1))',\n                36,\n            ],\n            [\n                '=IFERROR({5/2, 5/0}, MAX(ABS({-2,4,-6})))',\n                [[2.5, 6]],\n            ],\n            [\n                '=MAX(IFERROR({5/2, 5/0}, 2.1))',\n                2.5,\n            ],\n            [\n                '=IF(FALSE,{1,2,3},{4,5,6})',\n                [[4, 5, 6]],\n            ],\n            [\n                '=IFS(FALSE, {1,2,3}, TRUE, {4,5,6})',\n                [[4, 5, 6]],\n            ],\n            'some invalid values' => [\n                '=ABS({1,-2,\"X3\"; \"B4\",5,6})',\n                [[1, 2, '#VALUE!'], ['#VALUE!', 5, 6]],\n            ],\n            'some invalid values with unary minus' => [\n                '=-({1,-2,\"X3\"; \"B4\",5,6})',\n                [[-1, 2, '#VALUE!'], ['#VALUE!', -5, -6]],\n            ],\n        ];\n    }\n\n    public function testArrayFormulaUsingCells(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A4')->setValue(-3);\n        $sheet->getCell('B4')->setValue(4);\n        $sheet->getCell('C4')->setValue(-2);\n        $sheet->getCell('A5')->setValue(6);\n        $sheet->getCell('B5')->setValue(-3);\n        $sheet->getCell('C5')->setValue(-12);\n        $sheet->getCell('E4')->setValue('=MAX(-ABS(A4:C5))');\n        self::assertSame(-2, $sheet->getCell('E4')->getCalculatedValue());\n        $sheet->getCell('C4')->setValue('XYZ');\n        $sheet->getCell('F4')->setValue('=MAX(-ABS(A4:C5))');\n        self::assertSame('#VALUE!', $sheet->getCell('F4')->getCalculatedValue());\n        $sheet->getCell('G4')->setValue('=-C4:E4');\n        self::assertSame('#VALUE!', $sheet->getCell('G4')->getCalculatedValue());\n        $sheet->getCell('H4')->setValue('=-A4:B4');\n        self::assertSame(3, $sheet->getCell('H4')->getCalculatedValue());\n        $sheet->getCell('I4')->setValue('=25%');\n        self::assertEqualsWithDelta(0.25, $sheet->getCell('I4')->getCalculatedValue(), 1.0E-8);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/ArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayTest extends TestCase\n{\n    private string $originalArrayReturnType;\n\n    protected function setUp(): void\n    {\n        $this->originalArrayReturnType = Calculation::getArrayReturnType();\n    }\n\n    protected function tearDown(): void\n    {\n        Calculation::setArrayReturnType($this->originalArrayReturnType);\n    }\n\n    private function setupMatrix(Worksheet $sheet): void\n    {\n        $sheet->setCellValue('A1', 2.0);\n        $sheet->setCellValue('A2', 0.0);\n        $sheet->setCellValue('B1', 0.0);\n        $sheet->setCellValue('B2', 1.0);\n    }\n\n    public function testMultiDimensionalArrayIsFlattened(): void\n    {\n        $array = [\n            0 => [\n                0 => [\n                    32 => [\n                        'B' => 'PHP',\n                    ],\n                ],\n            ],\n            1 => [\n                0 => [\n                    32 => [\n                        'C' => 'Spreadsheet',\n                    ],\n                ],\n            ],\n        ];\n\n        $values = Functions::flattenArray($array);\n\n        self::assertCount(2, $values);\n        self::assertSame('PHP', $values[0]);\n        self::assertSame('Spreadsheet', $values[1]);\n    }\n\n    public function testSetArrayReturnTypeWithValidValue(): void\n    {\n        self::assertTrue(Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY));\n        self::assertSame(Calculation::RETURN_ARRAY_AS_ARRAY, Calculation::getArrayReturnType());\n    }\n\n    public function testSetArrayReturnTypeWithInvalidValue(): void\n    {\n        $originalType = Calculation::getArrayReturnType();\n        self::assertFalse(Calculation::setArrayReturnType('xxx'));\n        self::assertSame($originalType, Calculation::getArrayReturnType());\n    }\n\n    public function testInstanceArrayReturnTypeInheritsFromStatic(): void\n    {\n        Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $calculation = new Calculation();\n        self::assertSame(Calculation::RETURN_ARRAY_AS_ARRAY, $calculation->getInstanceArrayReturnType());\n    }\n\n    public function testInstanceArrayReturnTypeCanBeOverridden(): void\n    {\n        Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $calculation = new Calculation();\n        self::assertTrue($calculation->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ERROR));\n        self::assertSame(Calculation::RETURN_ARRAY_AS_ARRAY, Calculation::getArrayReturnType());\n        self::assertSame(Calculation::RETURN_ARRAY_AS_ERROR, $calculation->getInstanceArrayReturnType());\n    }\n\n    public function testSetInstanceArrayReturnTypeWithInvalidValue(): void\n    {\n        $calculation = new Calculation();\n        self::assertFalse($calculation->setInstanceArrayReturnType('xxx'));\n    }\n\n    public function testReturnTypeAsError(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $this->setupMatrix($sheet);\n        $sheet->setCellValue('D1', '=MINVERSE(A1:B2)');\n\n        $calculation->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ERROR);\n        self::assertSame('#VALUE!', $sheet->getCell('D1')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReturnTypeAsValue(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $this->setupMatrix($sheet);\n        $sheet->setCellValue('D1', '=MINVERSE(A1:B2)');\n\n        $calculation->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE);\n        self::assertSame(0.5, $sheet->getCell('D1')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReturnTypeAsArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $this->setupMatrix($sheet);\n        $sheet->setCellValue('D1', '=MINVERSE(A1:B2)');\n\n        $calculation->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        self::assertSame([[0.5, 0.0], [0.0, 1.0]], $sheet->getCell('D1')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/AssociativityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AssociativityTest extends TestCase\n{\n    #[DataProvider('providerAssociativity')]\n    public function testAssociativity(mixed $expectedResult, string $formula): void\n    {\n        $result = Calculation::getInstance()->calculateFormula($formula);\n        if (is_float($expectedResult)) {\n            self::assertEqualsWithDelta($expectedResult, $result, 1E-8);\n        } else {\n            self::assertSame($expectedResult, $result);\n        }\n    }\n\n    public static function providerAssociativity(): array\n    {\n        return [\n            'Excel exponentiation is left-associative unlike Php and pure math' => [4096, '=4^2^3'],\n            'multiplication' => [24, '=4*2*3'],\n            'division' => [1, '=8/4/2'],\n            'addition' => [9, '=4+2+3'],\n            'subtraction' => [-1, '=4-2-3'],\n            'concatenation' => ['abc', '=\"a\"&\"b\"&\"c\"'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/BinaryComparisonTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\BinaryComparison;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BinaryComparisonTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBinaryComparison')]\n    public function testBinaryComparisonOperation(\n        mixed $operand1,\n        mixed $operand2,\n        string $operator,\n        bool $expectedResultExcel,\n        bool $expectedResultOpenOffice\n    ): void {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n        $resultExcel = BinaryComparison::compare($operand1, $operand2, $operator);\n        self::assertEquals($expectedResultExcel, $resultExcel, 'should be Excel compatible');\n\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n        $resultOpenOffice = BinaryComparison::compare($operand1, $operand2, $operator);\n        self::assertEquals($expectedResultOpenOffice, $resultOpenOffice, 'should be OpenOffice compatible');\n    }\n\n    public static function providerBinaryComparison(): array\n    {\n        return require 'tests/data/Calculation/BinaryComparisonOperations.php';\n    }\n\n    public function testInvalidOperator(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Unsupported binary comparison operator');\n        BinaryComparison::compare(1, 2, '!=');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CalculationCoverageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\ExceptionHandler;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CalculationCoverageTest extends TestCase\n{\n    public function testClone(): void\n    {\n        $this->expectException(CalcException::class);\n        $this->expectExceptionMessage('Cloning the calculation engine is not allowed!');\n        $calc = Calculation::getInstance();\n        $clone = clone $calc;\n        $clone->flushInstance();\n    }\n\n    public function testBadInstanceArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $calc = Calculation::getInstance($spreadsheet);\n        $type = $calc->getInstanceArrayReturnType();\n        self::assertFalse($calc->setInstanceArrayReturnType('bad'));\n        self::assertSame($type, $calc->getInstanceArrayReturnType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCalculate(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $calc = Calculation::getInstance($spreadsheet);\n        $sheet->getCell('A1')->setValue('=2+3');\n        $result = $calc->calculate($sheet->getCell('A1'));\n        self::assertSame(5, $result);\n        self::assertSame('', Calculation::boolToString(null));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCalculateBad(): void\n    {\n        $this->expectException(CalcException::class);\n        $this->expectExceptionMessage('Formula Error');\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $calc = Calculation::getInstance($spreadsheet);\n        $sheet->getCell('A1')->setValue('=SUM(');\n        $result = $calc->calculate($sheet->getCell('A1'));\n        self::assertSame(5, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testParse(): void\n    {\n        $calc = Calculation::getInstance();\n        self::assertSame([], $calc->parseFormula('2+3'), 'no leading =');\n        self::assertSame([], $calc->parseFormula('='), 'leading = but no other text');\n    }\n\n    public function testExtractNamedRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $calc = Calculation::getInstance($spreadsheet);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('mysheet');\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('B1', 2);\n        $sheet->setCellValue('A2', 3);\n        $sheet->setCellValue('B2', 4);\n        $spreadsheet->addNamedRange(\n            new NamedRange('Whatever', $sheet, '$A$1:$B$2')\n        );\n        $range = 'Whatever';\n        $result = $calc->extractNamedRange($range, $sheet);\n        self::assertSame('$A$1:$B$2', $range);\n        self::assertSame([1 => ['A' => 1, 'B' => 2], 2 => ['A' => 3, 'B' => 4]], $result);\n        $range = 'mysheet!Whatever';\n        $result = $calc->extractNamedRange($range, $sheet);\n        self::assertSame('$A$1:$B$2', $range);\n        self::assertSame([1 => ['A' => 1, 'B' => 2], 2 => ['A' => 3, 'B' => 4]], $result);\n\n        $range = 'mysheet!Whateverx';\n        $result = $calc->extractNamedRange($range, $sheet);\n        self::assertSame('Whateverx', $range);\n        self::assertSame('#REF!', $result);\n\n        $range = 'Why';\n        $result = $calc->extractNamedRange($range, $sheet);\n        self::assertSame('Why', $range);\n        self::assertSame('#REF!', $result);\n\n        $spreadsheet->addNamedRange(\n            new NamedRange('OneCell', $sheet, '$A$1')\n        );\n        $range = 'OneCell';\n        $result = $calc->extractNamedRange($range, $sheet);\n        self::assertSame('$A$1', $range);\n        self::assertSame([1 => ['A' => 1]], $result);\n\n        $spreadsheet->addNamedRange(\n            new NamedRange('NoSuchCell', $sheet, '$Z$1')\n        );\n        $range = 'NoSuchCell';\n        $result = $calc->extractNamedRange($range, $sheet);\n        self::assertSame('$Z$1', $range);\n        self::assertSame([1 => ['Z' => null]], $result);\n\n        $spreadsheet->addNamedRange(\n            new NamedRange('SomeCells', $sheet, '$B$1:$C$2')\n        );\n        $range = 'SomeCells';\n        $result = $calc->extractNamedRange($range, $sheet);\n        self::assertSame('$B$1:$C$2', $range);\n        self::assertSame([1 => ['B' => 2, 'C' => null], 2 => ['B' => 4, 'C' => null]], $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBlockCmd(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $formula = \"=cmd|'/C calc'!A0\";\n        $sheet->setCellValueExplicit('A1', $formula, DataType::TYPE_FORMULA);\n        self::assertSame(\n            '#REF!',\n            $sheet->getCell('A1')->getCalculatedValue(),\n            'cmd, blocked by default in Excel, forced error result in Calculation Engine'\n        );\n        $sheet->setCellValue('A2', $formula);\n        self::assertSame(\n            $formula,\n            $sheet->getCell('A2')->getCalculatedValue(),\n            'cmd, blocked by default in Excel, treated as string not formula by DefaultValueBinder'\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    protected static int $winMinPhpToSkip = 80300;\n\n    protected static int $winMaxPhpToSkip = 80499;\n\n    protected static string $winIndicator = 'WIN';\n\n    public function testExceptionHandler(): void\n    {\n        if (\n            strtoupper(substr(PHP_OS, 0, 3)) === self::$winIndicator\n            && PHP_VERSION_ID >= self::$winMinPhpToSkip\n            && PHP_VERSION_ID <= self::$winMaxPhpToSkip\n        ) {\n            self::markTestSkipped('Mysterious problem on Windows with Php8.3/4 only');\n        }\n        $this->expectException(CalcException::class);\n        $this->expectExceptionMessage('hello');\n        $handler = new ExceptionHandler();\n        trigger_error('hello');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CalculationErrorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CalculationErrorTest extends TestCase\n{\n    public function testCalculationExceptionSuppressed(): void\n    {\n        $calculation = Calculation::getInstance();\n        self::assertFalse($calculation->getSuppressFormulaErrors());\n        $calculation->setSuppressFormulaErrors(true);\n        $result = $calculation->calculateFormula('=SUM(');\n        $calculation->setSuppressFormulaErrors(false);\n        self::assertFalse($result);\n    }\n\n    public function testCalculationException(): void\n    {\n        $calculation = Calculation::getInstance();\n        self::assertFalse($calculation->getSuppressFormulaErrors());\n        $this->expectException(CalcException::class);\n        $this->expectExceptionMessage(\"Formula Error: Expecting ')'\");\n        $result = $calculation->calculateFormula('=SUM(');\n        self::assertFalse($result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CalculationFunctionListTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CalculationFunctionListTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    /** @param array<mixed>|string $functionCall */\n    #[DataProvider('providerGetFunctions')]\n    public function testGetFunctions(array|string $functionCall): void\n    {\n        self::assertIsCallable($functionCall);\n    }\n\n    public static function providerGetFunctions(): array\n    {\n        $returnFunctions = [];\n        $functionList = Calculation::getInstance()->getFunctions();\n        foreach ($functionList as $functionName => $functionArray) {\n            $returnFunctions[$functionName]['functionCall'] = $functionArray['functionCall'];\n        }\n\n        return $returnFunctions;\n    }\n\n    public function testIsImplemented(): void\n    {\n        $calculation = Calculation::getInstance();\n        self::assertFalse($calculation->isImplemented('non-existing-function'));\n        self::assertFalse($calculation->isImplemented('AREAS'));\n        self::assertTrue($calculation->isImplemented('coUNt'));\n        self::assertTrue($calculation->isImplemented('abs'));\n    }\n\n    public function testUnknownFunction(): void\n    {\n        $workbook = new Spreadsheet();\n        $sheet = $workbook->getActiveSheet();\n        $sheet->setCellValue('A1', '=gzorg()');\n        $sheet->setCellValue('A2', '=mode.gzorg(1)');\n        $sheet->setCellValue('A3', '=gzorg(1,2)');\n        $sheet->setCellValue('A4', '=3+IF(gzorg(),1,2)');\n        self::assertEquals('#NAME?', $sheet->getCell('A1')->getCalculatedValue());\n        self::assertEquals('#NAME?', $sheet->getCell('A2')->getCalculatedValue());\n        self::assertEquals('#NAME?', $sheet->getCell('A3')->getCalculatedValue());\n        self::assertEquals('#NAME?', $sheet->getCell('A4')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CalculationLoggingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CalculationLoggingTest extends TestCase\n{\n    public function testFormulaWithLogging(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray(\n            [\n                [1, 2, 3],\n                [4, 5, 6],\n                [7, 8, 9],\n            ]\n        );\n\n        $debugLog = Calculation::getInstance($spreadsheet)->getDebugLog();\n        $debugLog->setWriteDebugLog(true);\n\n        $cell = $sheet->getCell('E5');\n        $cell->setValue('=ROUND(SQRT(SUM(A1:C3)), 1)');\n        self::assertEquals(6.7, $cell->getCalculatedValue());\n\n        $log = $debugLog->getLog();\n        $entries = count($log);\n        self::assertGreaterThan(0, $entries);\n\n        $finalEntry = array_pop($log);\n        self::assertStringContainsString('Evaluation Result', $finalEntry);\n    }\n\n    public function testFormulaWithMultipleCellLogging(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray(\n            [\n                [1, 2, 3],\n                [4, 5, 6],\n                [7, 8, 9],\n            ]\n        );\n\n        $debugLog = Calculation::getInstance($spreadsheet)->getDebugLog();\n        $debugLog->setWriteDebugLog(true);\n\n        $cell = $sheet->getCell('E1');\n        $cell->setValue('=SUM(A1:C3)');\n\n        $cell = $sheet->getCell('E3');\n        $cell->setValue('=SQRT(E1)');\n\n        $cell = $sheet->getCell('E5');\n        $cell->setValue('=ROUND(E3, 1)');\n        self::assertEquals(6.7, $cell->getCalculatedValue());\n\n        $log = $debugLog->getLog();\n\n        $entries = count($log);\n        self::assertGreaterThan(0, $entries);\n\n        $finalEntry = array_pop($log);\n        self::assertStringContainsString('Evaluation Result', $finalEntry);\n\n        $e1Log = array_filter($log, fn ($entry): bool => str_contains($entry, 'E1'));\n        $e1Entries = count($e1Log);\n        self::assertGreaterThan(0, $e1Entries);\n\n        $e1FinalEntry = array_pop($e1Log);\n        self::assertStringContainsString('Evaluation Result', $e1FinalEntry);\n\n        $e3Log = array_filter($log, fn ($entry): bool => str_contains($entry, 'E1'));\n        $e3Entries = count($e3Log);\n        self::assertGreaterThan(0, $e3Entries);\n\n        $e3FinalEntry = array_pop($e3Log);\n        self::assertStringContainsString('Evaluation Result', $e3FinalEntry);\n    }\n\n    public function testFlushLog(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray(\n            [\n                [1, 2, 3],\n                [4, 5, 6],\n                [7, 8, 9],\n            ]\n        );\n\n        $debugLog = Calculation::getInstance($spreadsheet)->getDebugLog();\n        $debugLog->setWriteDebugLog(true);\n\n        $cell = $sheet->getCell('E5');\n        $cell->setValue('=(1+-2)*3/4');\n        self::assertEquals(-0.75, $cell->getCalculatedValue());\n\n        $log = $debugLog->getLog();\n        $entries = count($log);\n        self::assertGreaterThan(0, $entries);\n\n        $debugLog->clearLog();\n\n        $log = $debugLog->getLog();\n        self::assertSame([], $log);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CalculationSettingsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CalculationSettingsTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    private string $locale;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        $calculation = Calculation::getInstance();\n        $this->locale = $calculation->getLocale();\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        $calculation = Calculation::getInstance();\n        $calculation->setLocale($this->locale);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCanLoadAllSupportedLocales')]\n    public function testCanLoadAllSupportedLocales(string $locale): void\n    {\n        $calculation = Calculation::getInstance();\n        self::assertTrue($calculation->setLocale($locale));\n    }\n\n    public function testInvalidLocaleReturnsFalse(): void\n    {\n        $calculation = Calculation::getInstance();\n        self::assertFalse($calculation->setLocale('xx'));\n    }\n\n    public static function providerCanLoadAllSupportedLocales(): array\n    {\n        return [\n            ['bg'],\n            ['cs'],\n            ['da'],\n            ['de'],\n            ['en_us'],\n            ['es'],\n            ['fi'],\n            ['fr'],\n            ['hu'],\n            ['it'],\n            ['nl'],\n            ['nb'],\n            ['pl'],\n            ['pt'],\n            ['pt_br'],\n            ['ru'],\n            ['sv'],\n            ['tr'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CalculationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\CalculationParserOnly;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CalculationTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    #[DataProvider('providerBinaryComparisonOperation')]\n    public function testBinaryComparisonOperation(string $formula, mixed $expectedResultExcel, mixed $expectedResultOpenOffice): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n        $resultExcel = Calculation::getInstance()->calculateFormula($formula);\n        self::assertEquals($expectedResultExcel, $resultExcel, 'should be Excel compatible');\n\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n        $resultOpenOffice = Calculation::getInstance()->calculateFormula($formula);\n        self::assertEquals($expectedResultOpenOffice, $resultOpenOffice, 'should be OpenOffice compatible');\n    }\n\n    public static function providerBinaryComparisonOperation(): array\n    {\n        return require 'tests/data/CalculationBinaryComparisonOperation.php';\n    }\n\n    public function testDoesHandleXlfnFunctions(): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $tree = $calculation->parseFormula('=_xlfn.ISFORMULA(A1)');\n        self::assertIsArray($tree);\n        self::assertCount(3, $tree);\n        /** @var mixed[] */\n        $function = $tree[2];\n        self::assertEquals('Function', $function['type']);\n\n        $tree = $calculation->parseFormula('=_xlfn.STDEV.S(A1:B2)');\n        self::assertIsArray($tree);\n        self::assertCount(5, $tree);\n        /** @var mixed[] */\n        $function = $tree[4];\n        self::assertEquals('Function', $function['type']);\n    }\n\n    public function testFormulaWithOptionalArgumentsAndRequiredCellReferenceShouldPassNullForMissingArguments(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray(\n            [\n                [1, 2, 3],\n                [4, 5, 6],\n                [7, 8, 9],\n            ]\n        );\n\n        $cell = $sheet->getCell('E5');\n        $cell->setValue('=OFFSET(D3, -1, -2, 1, 1)');\n        self::assertEquals(5, $cell->getCalculatedValue(), 'with all arguments');\n\n        $cell = $sheet->getCell('F6');\n        $cell->setValue('=OFFSET(D3, -1, -2)');\n        self::assertEquals(5, $cell->getCalculatedValue(), 'missing arguments should be filled with null');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellSetAsQuotedText(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $cell = $workSheet->getCell('A1');\n\n        $cell->setValue(\"=cmd|'/C calc'!A0\");\n        $cell->getStyle()->setQuotePrefix(true);\n\n        self::assertEquals(\"=cmd|'/C calc'!A0\", $cell->getCalculatedValue());\n\n        $cell2 = $workSheet->getCell('A2');\n        $cell2->setValueExplicit('ABC', DataType::TYPE_FORMULA);\n        self::assertEquals('ABC', $cell2->getCalculatedValue());\n\n        $cell3 = $workSheet->getCell('A3');\n        $cell3->setValueExplicit('=', DataType::TYPE_FORMULA);\n        self::assertEquals('', $cell3->getCalculatedValue());\n\n        $cell4 = $workSheet->getCell('A4');\n\n        try {\n            $cell4->setValueExplicit((object) null, DataType::TYPE_FORMULA);\n            self::fail('setValueExplicit formula with unstringable object should have thrown exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unable to convert to string', $e->getMessage());\n        }\n\n        $cell5 = $workSheet->getCell('A5');\n        $cell5->setValueExplicit(null, DataType::TYPE_FORMULA);\n        self::assertEquals('', $cell5->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellWithDdeExpresion(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $cell = $workSheet->getCell('A1');\n\n        $cell->setValue(\"=cmd|'/C calc'!A0\");\n\n        self::assertEquals(\"=cmd|'/C calc'!A0\", $cell->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFormulaReferencingWorksheetWithEscapedApostrophe(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $workSheet->setTitle(\"Catégorie d'absence\");\n\n        $workSheet->setCellValue('A1', 'HELLO');\n        $workSheet->setCellValue('B1', ' ');\n        $workSheet->setCellValue('C1', 'WORLD');\n        $workSheet->setCellValue(\n            'A2',\n            \"=CONCAT('Catégorie d''absence'!A1, 'Catégorie d''absence'!B1, 'Catégorie d''absence'!C1)\"\n        );\n\n        $cellValue = $workSheet->getCell('A2')->getCalculatedValue();\n        self::assertSame('HELLO WORLD', $cellValue);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFormulaReferencingWorksheetWithUnescapedApostrophe(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $workSheet->setTitle(\"Catégorie d'absence\");\n\n        $workSheet->setCellValue('A1', 'HELLO');\n        $workSheet->setCellValue('B1', ' ');\n        $workSheet->setCellValue('C1', 'WORLD');\n        $workSheet->setCellValue(\n            'A2',\n            \"=CONCAT('Catégorie d'absence'!A1, 'Catégorie d'absence'!B1, 'Catégorie d'absence'!C1)\"\n        );\n\n        $cellValue = $workSheet->getCell('A2')->getCalculatedValue();\n        self::assertSame('HELLO WORLD', $cellValue);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellWithFormulaTwoIndirect(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $cell1 = $workSheet->getCell('A1');\n        $cell1->setValue('2');\n        $cell2 = $workSheet->getCell('B1');\n        $cell2->setValue('3');\n        $cell2 = $workSheet->getCell('C1');\n        $cell2->setValue('4');\n        $cell3 = $workSheet->getCell('D1');\n        $cell3->setValue('=SUM(INDIRECT(\"A\"&ROW()),INDIRECT(\"B\"&ROW()),INDIRECT(\"C\"&ROW()))');\n\n        self::assertEquals('9', $cell3->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellWithStringNumeric(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $cell1 = $workSheet->getCell('A1');\n        $cell1->setValue('+2.5');\n        $cell2 = $workSheet->getCell('B1');\n        $cell2->setValue('=100*A1');\n\n        self::assertSame(250.0, $cell2->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellWithStringFraction(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $cell1 = $workSheet->getCell('A1');\n        $cell1->setValue('3/4');\n        $cell2 = $workSheet->getCell('B1');\n        $cell2->setValue('=100*A1');\n\n        self::assertSame(75.0, $cell2->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellWithStringPercentage(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $cell1 = $workSheet->getCell('A1');\n        $cell1->setValue('2%');\n        $cell2 = $workSheet->getCell('B1');\n        $cell2->setValue('=100*A1');\n\n        self::assertSame(2.0, $cell2->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellWithStringCurrency(): void\n    {\n        $currencyCode = StringHelper::getCurrencyCode();\n\n        $spreadsheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $cell1 = $workSheet->getCell('A1');\n        $cell1->setValue($currencyCode . '2');\n        $cell2 = $workSheet->getCell('B1');\n        $cell2->setValue('=100*A1');\n\n        self::assertSame(200.0, $cell2->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBranchPruningFormulaParsingSimpleCase(): void\n    {\n        $calculation = Calculation::getInstance();\n        $calculation->flushInstance(); // resets the ids\n\n        // Very simple formula\n        $formula = '=IF(A1=\"please +\",B1)';\n        $tokens = $calculation->parseFormula($formula);\n        self::assertIsArray($tokens);\n\n        $foundEqualAssociatedToStoreKey = false;\n        $foundConditionalOnB1 = false;\n        foreach ($tokens as $token) {\n            /** @var mixed[] $token */\n            $isBinaryOperator = $token['type'] == 'Binary Operator';\n            $isEqual = $token['value'] == '=';\n            $correctStoreKey = ($token['storeKey'] ?? '') == 'storeKey-0';\n            $correctOnlyIf = ($token['onlyIf'] ?? '') == 'storeKey-0';\n            $isB1Reference = ($token['reference'] ?? '') == 'B1';\n\n            $foundEqualAssociatedToStoreKey = $foundEqualAssociatedToStoreKey\n                || ($isBinaryOperator && $isEqual && $correctStoreKey);\n\n            $foundConditionalOnB1 = $foundConditionalOnB1\n                || ($isB1Reference && $correctOnlyIf);\n        }\n        self::assertTrue($foundEqualAssociatedToStoreKey);\n        self::assertTrue($foundConditionalOnB1);\n    }\n\n    public function testBranchPruningFormulaParsingMultipleIfsCase(): void\n    {\n        $calculation = Calculation::getInstance();\n        $calculation->flushInstance(); // resets the ids\n\n        //\n        // Internal operation\n        $formula = '=IF(A1=\"please +\",SUM(B1:B3))+IF(A2=\"please *\",PRODUCT(C1:C3), C1)';\n        $tokens = $calculation->parseFormula($formula);\n        self::assertIsArray($tokens);\n\n        $plusGotTagged = false;\n        $productFunctionCorrectlyTagged = false;\n        foreach ($tokens as $token) {\n            /** @var mixed[] $token */\n            $isBinaryOperator = $token['type'] == 'Binary Operator';\n            $isPlus = $token['value'] == '+';\n            $anyStoreKey = isset($token['storeKey']);\n            $anyOnlyIf = isset($token['onlyIf']);\n            $anyOnlyIfNot = isset($token['onlyIfNot']);\n            $plusGotTagged = $plusGotTagged\n                || ($isBinaryOperator && $isPlus\n                    && ($anyStoreKey || $anyOnlyIfNot || $anyOnlyIf));\n\n            $isFunction = $token['type'] == 'Function';\n            $isProductFunction = $token['value'] == 'PRODUCT(';\n            $correctOnlyIf = ($token['onlyIf'] ?? '') == 'storeKey-1';\n            $productFunctionCorrectlyTagged = $productFunctionCorrectlyTagged || ($isFunction && $isProductFunction && $correctOnlyIf);\n        }\n        self::assertFalse($plusGotTagged, 'chaining IF( should not affect the external operators');\n        self::assertTrue($productFunctionCorrectlyTagged, 'function nested inside if should be tagged to be processed only if parent branching requires it');\n    }\n\n    public function testBranchPruningFormulaParingNestedIfCase(): void\n    {\n        $calculation = Calculation::getInstance();\n        $calculation->flushInstance(); // resets the ids\n\n        $formula = '=IF(A1=\"please +\",SUM(B1:B3),1+IF(NOT(A2=\"please *\"),C2-C1,PRODUCT(C1:C3)))';\n        $tokens = $calculation->parseFormula($formula);\n        self::assertIsArray($tokens);\n\n        $plusCorrectlyTagged = false;\n        $productFunctionCorrectlyTagged = false;\n        $notFunctionCorrectlyTagged = false;\n        $findOneOperandCountTagged = false;\n        foreach ($tokens as $token) {\n            /** @var mixed[] $token */\n            $value = $token['value'];\n            $isPlus = $value == '+';\n            $isProductFunction = $value == 'PRODUCT(';\n            $isNotFunction = $value == 'NOT(';\n            $isIfOperand = $token['type'] == 'Operand Count for Function IF()';\n            $isOnlyIfNotDepth1 = (array_key_exists('onlyIfNot', $token) ? $token['onlyIfNot'] : null) == 'storeKey-1';\n            $isStoreKeyDepth1 = (array_key_exists('storeKey', $token) ? $token['storeKey'] : null) == 'storeKey-1';\n            $isOnlyIfNotDepth0 = (array_key_exists('onlyIfNot', $token) ? $token['onlyIfNot'] : null) == 'storeKey-0';\n\n            $plusCorrectlyTagged = $plusCorrectlyTagged || ($isPlus && $isOnlyIfNotDepth0);\n            $notFunctionCorrectlyTagged = $notFunctionCorrectlyTagged || ($isNotFunction && $isOnlyIfNotDepth0 && $isStoreKeyDepth1);\n            $productFunctionCorrectlyTagged = $productFunctionCorrectlyTagged || ($isProductFunction && $isOnlyIfNotDepth1 && !$isStoreKeyDepth1 && !$isOnlyIfNotDepth0);\n            $findOneOperandCountTagged = $findOneOperandCountTagged || ($isIfOperand && $isOnlyIfNotDepth0);\n        }\n        self::assertTrue($plusCorrectlyTagged);\n        self::assertTrue($productFunctionCorrectlyTagged);\n        self::assertTrue($notFunctionCorrectlyTagged);\n    }\n\n    public function testBranchPruningFormulaParsingNoArgumentFunctionCase(): void\n    {\n        $calculation = Calculation::getInstance();\n        $calculation->flushInstance(); // resets the ids\n\n        $formula = '=IF(AND(TRUE(),A1=\"please +\"),2,3)';\n        // this used to raise a parser error, we keep it even though we don't\n        // test the output\n        $calculation->parseFormula($formula);\n        self::assertSame(1, $calculation->cyclicFormulaCount);\n    }\n\n    public function testBranchPruningFormulaParsingInequalitiesConditionsCase(): void\n    {\n        $calculation = Calculation::getInstance();\n        $calculation->flushInstance(); // resets the ids\n\n        $formula = '=IF(A1=\"flag\",IF(A2<10, 0) + IF(A3<10000, 0))';\n        $tokens = $calculation->parseFormula($formula);\n        self::assertIsArray($tokens);\n\n        $properlyTaggedPlus = false;\n        foreach ($tokens as $token) {\n            /** @var mixed[] $token */\n            $isPlus = $token['value'] === '+';\n            $hasOnlyIf = !empty($token['onlyIf']);\n\n            $properlyTaggedPlus = $properlyTaggedPlus\n                || ($isPlus && $hasOnlyIf);\n        }\n        self::assertTrue($properlyTaggedPlus);\n    }\n\n    /**\n     * @param mixed[] $dataArray\n     * @param string $cellCoordinates where to put the formula\n     * @param string[] $shouldBeSetInCacheCells coordinates of cells that must\n     *  be set in cache\n     * @param string[] $shouldNotBeSetInCacheCells coordinates of cells that must\n     *  not be set in cache because of pruning\n     */\n    #[DataProvider('dataProviderBranchPruningFullExecution')]\n    public function testFullExecutionDataPruning(\n        mixed $expectedResult,\n        array $dataArray,\n        string $formula,\n        string $cellCoordinates,\n        array $shouldBeSetInCacheCells = [],\n        array $shouldNotBeSetInCacheCells = []\n    ): void {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray($dataArray);\n        $cell = $sheet->getCell($cellCoordinates);\n        $calculation = Calculation::getInstance($cell->getWorksheet()->getParent());\n\n        $cell->setValue($formula);\n        $calculated = $cell->getCalculatedValue();\n        self::assertEquals($expectedResult, $calculated);\n\n        // this mostly to ensure that at least some cells are cached\n        foreach ($shouldBeSetInCacheCells as $setCell) {\n            unset($inCache);\n            $calculation->getValueFromCache('Worksheet!' . $setCell, $inCache);\n            self::assertNotEmpty($inCache);\n        }\n\n        foreach ($shouldNotBeSetInCacheCells as $notSetCell) {\n            unset($inCache);\n            $calculation->getValueFromCache('Worksheet!' . $notSetCell, $inCache);\n            self::assertEmpty($inCache);\n        }\n\n        $calculation->disableBranchPruning();\n        $calculated = $cell->getCalculatedValue();\n        self::assertEquals($expectedResult, $calculated);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function dataProviderBranchPruningFullExecution(): array\n    {\n        return require 'tests/data/Calculation/Calculation.php';\n    }\n\n    public function testBranchPruningFlag(): void\n    {\n        $calc1 = Calculation::getInstance();\n        $calc2 = CalculationParserOnly::getParserInstance();\n        self::assertNotSame($calc1, $calc2);\n        $calc1a = Calculation::getInstance();\n        $calc2a = CalculationParserOnly::getParserInstance();\n        self::assertSame($calc1, $calc1a);\n        self::assertSame($calc2, $calc2a);\n\n        self::assertFalse($calc2->getBranchPruningEnabled());\n        $calc2->enableBranchPruning();\n        self::assertFalse($calc2->getBranchPruningEnabled(), 'no change for ParserOnly');\n        $calc2->disableBranchPruning();\n        self::assertFalse($calc2->getBranchPruningEnabled());\n\n        self::assertTrue($calc1->getBranchPruningEnabled(), 'parserOnly did not affect Calculation singleton');\n        $calc1->disableBranchPruning();\n        self::assertFalse($calc1->getBranchPruningEnabled());\n        $calc1->enableBranchPruning();\n        self::assertTrue($calc1->getBranchPruningEnabled());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CustomFunction.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\Helpers;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass CustomFunction\n{\n    public static function fourthPower(mixed $number): float|int|string\n    {\n        try {\n            $number = Helpers::validateNumericNullBool($number);\n        } catch (CalcException $e) {\n            return $e->getMessage();\n        }\n\n        return $number ** 4;\n    }\n\n    /**\n     * ASC.\n     * Converts full-width (double-byte) characters to half-width (single-byte) characters.\n     * There are many difficulties with implementing this into PhpSpreadsheet.\n     */\n    public static function ASC(mixed $stringValue): string\n    {\n        /*if (is_array($stringValue)) {\n            return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $stringValue);\n        }*/\n        $stringValue = StringHelper::convertToString($stringValue, convertBool: true);\n        if (function_exists('mb_convert_kana')) {\n            return mb_convert_kana($stringValue, 'a', 'UTF-8');\n        }\n        // Fallback if mb_convert_kana is not available.\n        // PhpSpreadsheet heavily relies on mbstring, so this is more of a theoretical fallback.\n        // A comprehensive manual conversion is extensive.\n\n        return $stringValue;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CustomFunctionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CustomFunctionTest extends TestCase\n{\n    public static function testCustomFunction(): void\n    {\n        $calculation = Calculation::getInstance();\n        $key = 'FOURTHPOWER';\n        $value = [\n            'category' => 'custom',\n            'functionCall' => [CustomFunction::class, 'fourthPower'],\n            'argumentCount' => '1',\n        ];\n        self::assertTrue(Calculation::addFunction($key, $value));\n        self::assertFalse(Calculation::addFunction('sqrt', $value));\n        self::assertSame(16, $calculation->calculateFormula('=FOURTHPOWER(2)'));\n        self::assertSame('#VALUE!', $calculation->calculateFormula('=FOURTHPOWER(\"X\")'));\n        self::assertSame('#NAME?', $calculation->calculateFormula('=FOURTHPOWE(\"X\")'));\n        self::assertFalse(Calculation::removeFunction('SQRT'));\n        self::assertSame(2.0, $calculation->calculateFormula('=SQRT(4)'));\n        self::assertFalse(Calculation::removeFunction('sqrt'));\n        self::assertSame(4.0, $calculation->calculateFormula('=sqrt(16)'));\n        self::assertTrue(Calculation::removeFunction($key));\n        self::assertSame('#NAME?', $calculation->calculateFormula('=FOURTHPOWER(3)'));\n        self::assertFalse(Calculation::removeFunction('WHATEVER'));\n        $key = 'NATIVECOS';\n        $value = [\n            'category' => 'custom',\n            'functionCall' => 'cos',\n            'argumentCount' => '1',\n        ];\n        self::assertTrue(Calculation::addFunction($key, $value));\n        self::assertSame(1.0, $calculation->calculateFormula('=NATIVECOS(0)'));\n        self::assertTrue(Calculation::removeFunction($key));\n        $key = 'PI';\n        $value = [\n            'category' => 'custom',\n            'functionCall' => 'pi',\n            'argumentCount' => '0',\n        ];\n        self::assertFalse(Calculation::addFunction($key, $value));\n    }\n\n    public static function testReplaceDummyFunction(): void\n    {\n        $functions = Calculation::getFunctions();\n        $key = 'ASC';\n        $oldValue = $functions[$key] ?? null;\n        self::assertIsArray($oldValue);\n        $calculation = Calculation::getInstance();\n        $value = $oldValue;\n        $value['functionCall'] = [CustomFunction::class, 'ASC'];\n        self::assertTrue(Calculation::addFunction($key, $value));\n        self::assertSame('ABC', $calculation->calculateFormula('=ASC(\"ＡＢＣ\")'));\n        self::assertTrue(Calculation::removeFunction('ASC'));\n        self::assertTrue(Calculation::addFunction($key, $oldValue));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/CyclicTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CyclicTest extends TestCase\n{\n    public function testCyclicReference(): void\n    {\n        // Issue 3169\n        $spreadsheet = new Spreadsheet();\n\n        $table_data = [\n            ['abc', 'def', 'ghi'],\n            ['1', '4', '=B3+A3'],\n            ['=SUM(A2:C2)', '2', '=A2+B2'],\n        ];\n        // Don't allow cyclic references.\n        Calculation::getInstance($spreadsheet)->cyclicFormulaCount = 0;\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray($table_data, '');\n\n        try {\n            $result = $worksheet->getCell('C2')->getCalculatedValue();\n        } catch (CalcException $e) {\n            $result = $e->getMessage();\n        }\n        self::assertSame(\n            'Worksheet!C2 -> Worksheet!A3 -> Worksheet!C2 -> Cyclic Reference in Formula',\n            $result\n        );\n\n        try {\n            $result = $worksheet->getCell('A3')->getCalculatedValue();\n        } catch (CalcException $e) {\n            $result = $e->getMessage();\n        }\n        self::assertSame(\n            'Worksheet!A3 -> Worksheet!C2 -> Worksheet!A3 -> Cyclic Reference in Formula',\n            $result\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/DefinedNameConfusedForCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefinedNameConfusedForCellTest extends TestCase\n{\n    public function testDefinedName(): void\n    {\n        $obj = new Spreadsheet();\n        $sheet0 = $obj->setActiveSheetIndex(0);\n        $sheet0->setCellValue('A1', 2);\n        $obj->addNamedRange(new NamedRange('A1A', $sheet0, '$A$1'));\n        $sheet0->setCellValue('B1', '=2*A1A');\n        $writer = IOFactory::createWriter($obj, 'Xlsx');\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        unlink($filename);\n        self::assertSame(4, $obj->getActiveSheet()->getCell('B1')->getCalculatedValue());\n        $obj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/DefinedNameWithQuotePrefixedCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefinedNameWithQuotePrefixedCellTest extends TestCase\n{\n    public function testDefinedNameIsAlwaysEvaluated(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Sheet1');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Sheet2');\n        $sheet2->getCell('A1')->setValue('July 2019');\n        $sheet2->getStyle('A1')\n            ->setQuotePrefix(true);\n        $sheet2->getCell('A2')->setValue(3);\n        $spreadsheet->addNamedRange(new NamedRange('FM', $sheet2, '$A$2'));\n        $sheet1->getCell('A1')->setValue('=(A2+FM)');\n        $sheet1->getCell('A2')->setValue(38.42);\n\n        self::assertSame(41.42, $sheet1->getCell('A1')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/DefinedNamesCalculationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefinedNamesCalculationTest extends TestCase\n{\n    #[DataProvider('namedRangeCalculationProvider1')]\n    public function testNamedRangeCalculations1(string $cellAddress, float $expectedValue): void\n    {\n        $inputFileType = 'Xlsx';\n        $inputFileName = __DIR__ . '/../../data/Calculation/DefinedNames/NamedRanges.xlsx';\n\n        $reader = IOFactory::createReader($inputFileType);\n        $spreadsheet = $reader->load($inputFileName);\n\n        $calculatedCellValue = $spreadsheet->getActiveSheet()->getCell($cellAddress)->getCalculatedValue();\n        self::assertSame($expectedValue, $calculatedCellValue, \"Failed calculation for cell {$cellAddress}\");\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNamedRangeCalculationsIfError(): void\n    {\n        $inputFileType = 'Xlsx';\n        $inputFileName = __DIR__ . '/../../data/Calculation/DefinedNames/NamedRanges.xlsx';\n\n        $reader = IOFactory::createReader($inputFileType);\n        $spreadsheet = $reader->load($inputFileName);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('E1')\n            ->setValue('=IFERROR(CHARGE_RATE, 999)');\n        $sheet->getCell('F1')\n            ->setValue('=IFERROR(CHARGE_RATX, 999)');\n        self::assertSame(7.5, $sheet->getCell('E1')->getCalculatedValue());\n        self::assertSame(999, $sheet->getCell('F1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('namedRangeCalculationProvider2')]\n    public function testNamedRangeCalculationsWithAdjustedRateValue(string $cellAddress, float $expectedValue): void\n    {\n        $inputFileType = 'Xlsx';\n        $inputFileName = __DIR__ . '/../../data/Calculation/DefinedNames/NamedRanges.xlsx';\n\n        $reader = IOFactory::createReader($inputFileType);\n        $spreadsheet = $reader->load($inputFileName);\n\n        $spreadsheet->getActiveSheet()->getCell('B1')->setValue(12.5);\n\n        $calculatedCellValue = $spreadsheet->getActiveSheet()->getCell($cellAddress)->getCalculatedValue();\n        self::assertSame($expectedValue, $calculatedCellValue, \"Failed calculation for cell {$cellAddress}\");\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('namedRangeCalculationProvider1')]\n    public function testNamedFormulaCalculations1(string $cellAddress, float $expectedValue): void\n    {\n        $inputFileType = 'Xlsx';\n        $inputFileName = __DIR__ . '/../../data/Calculation/DefinedNames/NamedFormulae.xlsx';\n\n        $reader = IOFactory::createReader($inputFileType);\n        $spreadsheet = $reader->load($inputFileName);\n\n        $calculatedCellValue = $spreadsheet->getActiveSheet()->getCell($cellAddress)->getCalculatedValue();\n        self::assertSame($expectedValue, $calculatedCellValue, \"Failed calculation for cell {$cellAddress}\");\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('namedRangeCalculationProvider2')]\n    public function testNamedFormulaeCalculationsWithAdjustedRateValue(string $cellAddress, float $expectedValue): void\n    {\n        $inputFileType = 'Xlsx';\n        $inputFileName = __DIR__ . '/../../data/Calculation/DefinedNames/NamedFormulae.xlsx';\n\n        $reader = IOFactory::createReader($inputFileType);\n        $spreadsheet = $reader->load($inputFileName);\n\n        $spreadsheet->getActiveSheet()->getCell('B1')->setValue(12.5);\n\n        $calculatedCellValue = $spreadsheet->getActiveSheet()->getCell($cellAddress)->getCalculatedValue();\n        self::assertSame($expectedValue, $calculatedCellValue, \"Failed calculation for cell {$cellAddress}\");\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function namedRangeCalculationProvider1(): array\n    {\n        return [\n            ['C4', 56.25],\n            ['C5', 54.375],\n            ['C6', 48.75],\n            ['C7', 52.5],\n            ['C8', 41.25],\n            ['B10', 33.75],\n            ['C10', 253.125],\n        ];\n    }\n\n    public static function namedRangeCalculationProvider2(): array\n    {\n        return [\n            ['C4', 93.75],\n            ['C5', 90.625],\n            ['C6', 81.25],\n            ['C7', 87.5],\n            ['C8', 68.75],\n            ['C10', 421.875],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Discussion1950Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Discussion1950Test extends TestCase\n{\n    public function testMultipleUnions(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2],\n            [3, 4],\n        ]);\n        $sheet->setCellValue('A5', '=SUM((A1,A2),(B1,B2))');\n        self::assertSame(10, $sheet->getCell('A5')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnexpectedUnion(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1],\n            [-1],\n            [2],\n            [1],\n            ['=RANK(A1,(A2,A3,A4))'],\n        ]);\n        self::assertSame(2, $sheet->getCell('A5')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberSlashTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\FormattedNumber;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FormattedNumberSlashTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setDecimalSeparator(null);\n        StringHelper::setThousandsSeparator(null);\n    }\n\n    #[DataProvider('providerNumbers')]\n    public function testNumber(mixed $expected, string $value, string $thousandsSeparator = ',', string $decimalSeparator = '.'): void\n    {\n        StringHelper::setThousandsSeparator($thousandsSeparator);\n        StringHelper::setDecimalSeparator($decimalSeparator);\n        $result = FormattedNumber::convertToNumberIfFormatted($value);\n        self::assertTrue($result);\n        self::assertSame($expected, $value);\n    }\n\n    public static function providerNumbers(): array\n    {\n        return [\n            'normal' => [1234.5, '1,234.5'],\n            'slash as thousands separator' => [-1234.5, '- 1/234.5', '/', '.'],\n            'slash as decimal separator' => [-1234.5, '- 1,234/5', ',', '/'],\n        ];\n    }\n\n    #[DataProvider('providerPercentages')]\n    public function testPercentage(string $expected, string $value, string $thousandsSeparator = ',', string $decimalSeparator = '.'): void\n    {\n        $originalValue = $value;\n        StringHelper::setThousandsSeparator($thousandsSeparator);\n        StringHelper::setDecimalSeparator($decimalSeparator);\n        $result = FormattedNumber::convertToNumberIfPercent($value);\n        self::assertTrue($result);\n        self::assertSame($expected, (string) $value);\n        self::assertNotEquals($value, $originalValue);\n    }\n\n    public static function providerPercentages(): array\n    {\n        return [\n            'normal' => ['21.5034', '2,150.34%'],\n            'slash as thousands separator' => ['21.5034', '2/150.34%', '/', '.'],\n            'slash as decimal separator' => ['21.5034', '2,150/34%', ',', '/'],\n        ];\n    }\n\n    #[DataProvider('providerCurrencies')]\n    public function testCurrencies(string $expected, string $value, string $thousandsSeparator = ',', string $decimalSeparator = '.', ?string $currencyCode = null): void\n    {\n        $originalValue = $value;\n        StringHelper::setThousandsSeparator($thousandsSeparator);\n        StringHelper::setDecimalSeparator($decimalSeparator);\n        if ($currencyCode !== null) {\n            StringHelper::setCurrencyCode($currencyCode);\n        }\n        $result = FormattedNumber::convertToNumberIfCurrency($value);\n        self::assertTrue($result);\n        self::assertSame($expected, (string) $value);\n        self::assertNotEquals($value, $originalValue);\n    }\n\n    public static function providerCurrencies(): array\n    {\n        return [\n            'switched delimiters' => ['2134.56', '$2.134,56', '.', ','],\n            'normal' => ['2134.56', '$2,134.56'],\n            'slash as thousands separator' => ['2134.56', '$2/134.56', '/', '.'],\n            'slash as decimal separator' => ['2134.56', '$2,134/56', ',', '/'],\n            'slash as currency code' => ['2134.56', '/2,134.56', ',', '.', '/'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\FormattedNumber;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FormattedNumberTest extends TestCase\n{\n    #[DataProvider('providerNumbers')]\n    public function testNumber(mixed $expected, string $value): void\n    {\n        FormattedNumber::convertToNumberIfFormatted($value);\n        self::assertSame($expected, $value);\n    }\n\n    public static function providerNumbers(): array\n    {\n        return [\n            [-12.5, '-12.5'],\n            [-125.0, '-1.25e2'],\n            [0.125, '12.5%'],\n            [1234.5, '1,234.5'],\n            [-1234.5, '- 1,234.5'],\n            [1234.5, '+ 1,234.5'],\n        ];\n    }\n\n    #[DataProvider('providerFractions')]\n    public function testFraction(string $expected, string $value): void\n    {\n        $originalValue = $value;\n        $result = FormattedNumber::convertToNumberIfFraction($value);\n        if ($result === false) {\n            self::assertSame($expected, $originalValue);\n            self::assertSame($expected, $value);\n        } else {\n            self::assertSame($expected, (string) $value);\n            self::assertNotEquals($value, $originalValue);\n        }\n    }\n\n    public static function providerFractions(): array\n    {\n        return [\n            'non-fraction' => ['1', '1'],\n            'common fraction' => ['1.5', '1 1/2'],\n            'fraction between -1 and 0' => ['-0.5', '-1/2'],\n            'fraction between -1 and 0 with space' => ['-0.5', ' - 1/2'],\n            'fraction between 0 and 1' => ['0.75', '3/4 '],\n            'fraction between 0 and 1 with space' => ['0.75', ' 3/4'],\n            'improper fraction' => ['1.75', '7/4'],\n        ];\n    }\n\n    #[DataProvider('providerPercentages')]\n    public function testPercentage(string $expected, string $value): void\n    {\n        $originalValue = $value;\n        $result = FormattedNumber::convertToNumberIfPercent($value);\n        if ($result === false) {\n            self::assertSame($expected, $originalValue);\n            self::assertSame($expected, $value);\n        } else {\n            self::assertSame($expected, (string) $value);\n            self::assertNotEquals($value, $originalValue);\n        }\n    }\n\n    public static function providerPercentages(): array\n    {\n        return [\n            'non-percentage' => ['10', '10'],\n            'single digit percentage' => ['0.02', '2%'],\n            'two digit percentage' => ['0.13', '13%'],\n            'negative single digit percentage' => ['-0.07', '-7%'],\n            'negative two digit percentage' => ['-0.75', '-75%'],\n            'large percentage' => ['98.45', '9845%'],\n            'small percentage' => ['0.0005', '0.05%'],\n            'percentage with decimals' => ['0.025', '2.5%'],\n            'trailing percent with space' => ['0.02', '2 %'],\n            'trailing percent with leading and trailing space' => ['0.02', ' 2 % '],\n            'leading percent with decimals' => ['0.025', ' % 2.5'],\n            'Percentage with thousands separator' => ['12.345', ' % 1,234.5'],\n\n            //These should all fail\n            'percent only' => ['%', '%'],\n            'nonsense percent' => ['2%2', '2%2'],\n            'negative leading percent' => ['-0.02', '-%2'],\n\n            //Percent position permutations\n            'permutation_1' => ['0.02', '2%'],\n            'permutation_2' => ['0.02', ' 2%'],\n            'permutation_3' => ['0.02', '2% '],\n            'permutation_4' => ['0.02', ' 2 % '],\n            'permutation_5' => ['0.0275', '2.75% '],\n            'permutation_6' => ['0.0275', ' 2.75% '],\n            'permutation_7' => ['0.0275', ' 2.75 % '],\n            'permutation_8' => [' 2 . 75 %', ' 2 . 75 %'],\n            'permutation_9' => [' 2.7 5 % ', ' 2.7 5 % '],\n            'permutation_10' => ['-0.02', '-2%'],\n            'permutation_11' => ['-0.02', ' -2% '],\n            'permutation_12' => ['-0.02', '- 2% '],\n            'permutation_13' => ['-0.02', '-2 % '],\n            'permutation_14' => ['-0.0275', '-2.75% '],\n            'permutation_15' => ['-0.0275', ' -2.75% '],\n            'permutation_16' => ['-0.0275', '-2.75 % '],\n            'permutation_17' => ['-0.0275', ' - 2.75 % '],\n            'permutation_18' => ['0.02', '2%'],\n            'permutation_19' => ['0.02', '% 2 '],\n            'permutation_20' => ['0.02', ' %2 '],\n            'permutation_21' => ['0.02', ' % 2 '],\n            'permutation_22' => ['0.0275', '%2.75 '],\n            'permutation_23' => ['0.0275', ' %2.75 '],\n            'permutation_24' => ['0.0275', ' % 2.75 '],\n            'permutation_25' => [' %2 . 75 ', ' %2 . 75 '],\n            'permutation_26' => [' %2.7 5  ', ' %2.7 5  '],\n            'permutation_27' => [' % 2 . 75 ', ' % 2 . 75 '],\n            'permutation_28' => [' % 2.7 5  ', ' % 2.7 5  '],\n            'permutation_29' => ['-0.0275', '-%2.75 '],\n            'permutation_30' => ['-0.0275', ' - %2.75 '],\n            'permutation_31' => ['-0.0275', '- % 2.75 '],\n            'permutation_32' => ['-0.0275', ' - % 2.75 '],\n            'permutation_33' => ['0.02', '2%'],\n            'permutation_34' => ['0.02', '2 %'],\n            'permutation_35' => ['0.02', ' 2%'],\n            'permutation_36' => ['0.02', ' 2 % '],\n            'permutation_37' => ['0.0275', '2.75%'],\n            'permutation_38' => ['0.0275', ' 2.75 % '],\n            'permutation_39' => ['2 . 75 % ', '2 . 75 % '],\n            'permutation_40' => ['-0.0275', '-2.75% '],\n            'permutation_41' => ['-0.0275', '- 2.75% '],\n            'permutation_42' => ['-0.0275', ' - 2.75% '],\n            'permutation_43' => ['-0.0275', ' -2.75 % '],\n            'permutation_44' => ['-2. 75 % ', '-2. 75 % '],\n            'permutation_45' => ['%', '%'],\n            'permutation_46' => ['0.02', '%2 '],\n            'permutation_47' => ['0.02', '% 2 '],\n            'permutation_48' => ['0.02', ' %2 '],\n            'permutation_49' => ['0.02', '% 2 '],\n            'permutation_50' => ['0.02', ' % 2 '],\n            'permutation_51' => ['0.02', ' 2 % '],\n            'permutation_52' => ['-0.02', '-2%'],\n            'permutation_53' => ['-0.02', '- %2'],\n            'permutation_54' => ['-0.02', ' -%2 '],\n            'permutation_55' => ['2%2', '2%2'],\n            'permutation_56' => [' 2% %', ' 2% %'],\n            'permutation_57' => [' % 2 -', ' % 2 -'],\n            'permutation_58' => ['-0.02', '%-2'],\n            'permutation_59' => ['-0.02', ' % - 2'],\n            'permutation_60' => ['-0.0275', '%-2.75 '],\n            'permutation_61' => ['-0.0275', ' % - 2.75 '],\n            'permutation_62' => ['-0.0275', ' % - 2.75 '],\n            'permutation_63' => ['-0.0275', ' % - 2.75 '],\n            'permutation_64' => ['0.0275', ' % + 2.75 '],\n            'permutation_65' => ['0.0275', ' % + 2.75 '],\n            'permutation_66' => ['0.0275', ' % + 2.75 '],\n            'permutation_67' => ['0.02', '+2%'],\n            'permutation_68' => ['0.02', ' +2% '],\n            'permutation_69' => ['0.02', '+ 2% '],\n            'permutation_70' => ['0.02', '+2 % '],\n            'permutation_71' => ['0.0275', '+2.75% '],\n            'permutation_72' => ['0.0275', ' +2.75% '],\n            'permutation_73' => ['0.0275', '+2.75 % '],\n            'permutation_74' => ['0.0275', ' + 2.75 % '],\n            'permutation_75' => ['-2.5E-6', '-2.5E-4%'],\n            'permutation_76' => ['200', '2E4%'],\n            'permutation_77' => ['-2.5E-8', '-%2.50E-06'],\n            'permutation_78' => [' - % 2.50 E -06 ', ' - % 2.50 E -06 '],\n            'permutation_79' => ['-2.5E-8', ' - % 2.50E-06 '],\n            'permutation_80' => ['-2.5E-8', ' - % 2.50E- 06 '],\n            'permutation_81' => [' - % 2.50E - 06 ', ' - % 2.50E - 06 '],\n            'permutation_82' => ['-2.5E-6', '-2.5e-4%'],\n            'permutation_83' => ['200', '2e4%'],\n            'permutation_84' => ['-2.5E-8', '-%2.50e-06'],\n            'permutation_85' => [' - % 2.50 e -06 ', ' - % 2.50 e -06 '],\n            'permutation_86' => ['-2.5E-8', ' - % 2.50e-06 '],\n            'permutation_87' => ['-2.5E-8', ' - % 2.50e- 06 '],\n            'permutation_88' => [' - % 2.50e - 06 ', ' - % 2.50e - 06 '],\n        ];\n    }\n\n    #[DataProvider('providerCurrencies')]\n    public function testCurrencies(string $expected, string $value): void\n    {\n        $originalValue = $value;\n        $result = FormattedNumber::convertToNumberIfCurrency($value);\n        if ($result === false) {\n            self::assertSame($expected, $originalValue);\n            self::assertSame($expected, $value);\n        } else {\n            self::assertSame($expected, (string) $value);\n            self::assertNotEquals($value, $originalValue);\n        }\n    }\n\n    public static function providerCurrencies(): array\n    {\n        $currencyCode = StringHelper::getCurrencyCode();\n\n        return [\n            'basic_prefix_currency' => ['2.75', \"{$currencyCode}2.75\"],\n            'basic_postfix_currency' => ['2.75', \"2.75{$currencyCode}\"],\n\n            'basic_prefix_currency_with_spaces' => ['2.75', \"{$currencyCode} 2.75\"],\n            'basic_postfix_currency_with_spaces' => ['2.75', \"2.75 {$currencyCode}\"],\n\n            'negative_basic_prefix_currency' => ['-2.75', \"-{$currencyCode}2.75\"],\n            'negative_basic_postfix_currency' => ['-2.75', \"-2.75{$currencyCode}\"],\n\n            'negative_basic_prefix_currency_with_spaces' => ['-2.75', \"-{$currencyCode} 2.75\"],\n            'negative_basic_postfix_currency_with_spaces' => ['-2.75', \"-2.75 {$currencyCode}\"],\n\n            'positive_signed_prefix_currency_with_spaces' => ['2.75', \"+{$currencyCode} 2.75\"],\n            'positive_signed_prefix_currency_with_spaces-2' => ['2.75', \"{$currencyCode} +2.75\"],\n            'positive_signed_postfix_currency_with_spaces' => ['2.75', \"+2.75 {$currencyCode}\"],\n\n            'basic_prefix_scientific_currency' => ['2000000', \"{$currencyCode}2E6\"],\n            'basic_postfix_scientific_currency' => ['2000000', \"2E6{$currencyCode}\"],\n\n            'basic_prefix_scientific_currency_with_spaces' => ['2000000', \"{$currencyCode} 2E6\"],\n            'basic_postfix_scientific_currency_with_spaces' => ['2000000', \"2E6 {$currencyCode}\"],\n\n            'high_value_currency_with_thousands_separator' => ['2750000', \"+{$currencyCode} 2,750,000\"],\n\n            'explicit dollar' => ['2.75', '$2.75'],\n            'explicit euro' => ['2.75', '2.75€'],\n            'explicit pound sterling' => ['2.75', '£2.75'],\n            'explicit yen' => ['275', '¥275'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RangeTest extends TestCase\n{\n    private ?Spreadsheet $spreadSheet = null;\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()\n            ->fromArray(array_chunk(range(1, 240), 6), null, 'A1', true);\n\n        return $spreadsheet;\n    }\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadSheet !== null) {\n            $this->spreadSheet->disconnectWorksheets();\n            $this->spreadSheet = null;\n        }\n    }\n\n    #[DataProvider('providerRangeEvaluation')]\n    public function testRangeEvaluation(string $formula, int|string $expectedResult): void\n    {\n        $this->spreadSheet = $this->getSpreadsheet();\n        $workSheet = $this->spreadSheet->getActiveSheet();\n        $workSheet->setCellValue('H1', $formula);\n\n        $actualRresult = $workSheet->getCell('H1')->getCalculatedValue();\n        self::assertSame($expectedResult, $actualRresult);\n    }\n\n    public static function providerRangeEvaluation(): array\n    {\n        return [\n            'Sum with Simple Range' => ['=SUM(A1:C3)', 72],\n            'Count with Simple Range' => ['=COUNT(A1:C3)', 9],\n            'Sum with UNION #1' => ['=SUM(A1:B3,A1:C2)', 75],\n            'Count with UNION #1' => ['=COUNT(A1:B3,A1:C2)', 12],\n            'Sum with INTERSECTION #1' => ['=SUM(A1:B3 A1:C2)', 18],\n            'Count with INTERSECTION #1' => ['=COUNT(A1:B3 A1:C2)', 4],\n            'Sum with UNION #2' => ['=SUM(A1:A3,C1:C3)', 48],\n            'Count with UNION #2' => ['=COUNT(A1:A3,C1:C3)', 6],\n            'Sum with INTERSECTION #2 - No Intersect' => ['=SUM(A1:A3 C1:C3)', ExcelError::null()],\n            'Count with INTERSECTION #2 - No Intersect' => ['=COUNT(A1:A3 C1:C3)', 0],\n            'Sum with UNION #3' => ['=SUM(A1:B2,B2:C3)', 64],\n            'Count with UNION #3' => ['=COUNT(A1:B2,B2:C3)', 8],\n            'Sum with INTERSECTION #3 - Single Cell' => ['=SUM(A1:B2 B2:C3)', 8],\n            'Count with INTERSECTION #3 - Single Cell' => ['=COUNT(A1:B2 B2:C3)', 1],\n            'Sum with Triple UNION' => ['=SUM(A1:C1,A3:C3,B1:C3)', 99],\n            'Count with Triple UNION' => ['=COUNT(A1:C1,A3:C3,B1:C3)', 12],\n            'Sum with UNION and INTERSECTION' => ['=SUM(A1:C1,A3:C3 B1:C3)', 35],\n            'Count with UNION and INTERSECTION' => ['=COUNT(A1:C1,A3:C3 B1:C3)', 5],\n            'Sum with UNION with Worksheet Reference' => ['=SUM(Worksheet!A1:B3,Worksheet!A1:C2)', 75],\n            'Sum with UNION with full Worksheet Reference' => ['=SUM(Worksheet!A1:Worksheet!B3,Worksheet!A1:Worksheet!C2)', 75],\n            'Sum with Chained UNION #1' => ['=SUM(A3:B1:C2)', 72],\n            'Count with Chained UNION #1' => ['=COUNT(A3:B1:C2)', 9],\n            'Sum with Chained UNION #2' => ['=SUM(A5:C10:C20:F1)', 7260],\n            'Count with Chained UNION#2' => ['=COUNT(A5:C10:C20:F1)', 120],\n        ];\n    }\n\n    public function test3dRangeParsing(): void\n    {\n        // This test shows that parsing throws exception.\n        // Next test shows that formula is still treated as a formula\n        //     despite the parse failure.\n        $this->expectExceptionMessage('3D Range references are not yet supported');\n        $calculation = new Calculation();\n        $calculation->disableBranchPruning();\n        $calculation->parseFormula('=SUM(Worksheet!A1:Worksheet2!B3');\n    }\n\n    public function test3dRangeEvaluation(): void\n    {\n        $this->spreadSheet = $this->getSpreadsheet();\n        $workSheet = $this->spreadSheet->getActiveSheet();\n        $workSheet->setCellValue('E1', '=SUM(Worksheet!A1:Worksheet2!B3)');\n\n        $this->expectExceptionMessage('3D Range references are not yet supported');\n        $workSheet->getCell('E1')->getCalculatedValue();\n    }\n\n    /** @param string[] $ranges */\n    #[DataProvider('providerNamedRangeEvaluation')]\n    public function testNamedRangeEvaluation(array $ranges, string $formula, int $expectedResult): void\n    {\n        $this->spreadSheet = $this->getSpreadsheet();\n        $workSheet = $this->spreadSheet->getActiveSheet();\n        foreach ($ranges as $id => $range) {\n            $this->spreadSheet->addNamedRange(new NamedRange('GROUP' . ++$id, $workSheet, $range));\n        }\n\n        $workSheet->setCellValue('H1', $formula);\n\n        $sumRresult = $workSheet->getCell('H1')->getCalculatedValue();\n        self::assertSame($expectedResult, $sumRresult);\n    }\n\n    public static function providerNamedRangeEvaluation(): array\n    {\n        return [\n            [['$A$1:$B$3', '$A$1:$C$2'], '=SUM(GROUP1,GROUP2)', 75],\n            [['$A$1:$B$3', '$A$1:$C$2'], '=COUNT(GROUP1,GROUP2)', 12],\n            [['$A$1:$B$3', '$A$1:$C$2'], '=SUM(GROUP1 GROUP2)', 18],\n            [['$A$1:$B$3', '$A$1:$C$2'], '=COUNT(GROUP1 GROUP2)', 4],\n            [['$A$1:$B$2', '$B$2:$C$3'], '=SUM(GROUP1,GROUP2)', 64],\n            [['$A$1:$B$2', '$B$2:$C$3'], '=COUNT(GROUP1,GROUP2)', 8],\n            [['$A$1:$B$2', '$B$2:$C$3'], '=SUM(GROUP1 GROUP2)', 8],\n            [['$A$1:$B$2', '$B$2:$C$3'], '=COUNT(GROUP1 GROUP2)', 1],\n            [['$A$5', '$C$10:$C$20', '$F$1'], '=SUM(GROUP1:GROUP2:GROUP3)', 7260],\n            [['$A$5:$A$7', '$C$20', '$F$1'], '=SUM(GROUP1:GROUP2:GROUP3)', 7260],\n            [['$A$5:$A$7', '$C$10:$C$20', '$F$1'], '=SUM(GROUP1:GROUP2:GROUP3)', 7260],\n            [['Worksheet!$A$1:$B$2', 'Worksheet!$B$2:$C$3'], '=SUM(GROUP1,GROUP2)', 64],\n            [['Worksheet!$A$1:Worksheet!$B$2', 'Worksheet!$B$2:Worksheet!$C$3'], '=SUM(GROUP1,GROUP2)', 64],\n        ];\n    }\n\n    /**\n     * @param string[] $names\n     * @param string[] $ranges\n     */\n    #[DataProvider('providerUTF8NamedRangeEvaluation')]\n    public function testUTF8NamedRangeEvaluation(array $names, array $ranges, string $formula, int $expectedResult): void\n    {\n        $this->spreadSheet = $this->getSpreadsheet();\n        $workSheet = $this->spreadSheet->getActiveSheet();\n        foreach ($names as $index => $name) {\n            $range = $ranges[$index];\n            $this->spreadSheet->addNamedRange(new NamedRange($name, $workSheet, $range));\n        }\n        $workSheet->setCellValue('E1', $formula);\n\n        $sumRresult = $workSheet->getCell('E1')->getCalculatedValue();\n        self::assertSame($expectedResult, $sumRresult);\n    }\n\n    public static function providerUTF8NamedRangeEvaluation(): array\n    {\n        return [\n            [['Γειά', 'σου', 'Κόσμε'], ['$A$1', '$B$1:$B$2', '$C$1:$C$3'], '=SUM(Γειά,σου,Κόσμε)', 38],\n            [['Γειά', 'σου', 'Κόσμε'], ['$A$1', '$B$1:$B$2', '$C$1:$C$3'], '=COUNT(Γειά,σου,Κόσμε)', 6],\n            [['Здравствуй', 'мир'], ['$A$1:$A$3', '$C$1:$C$3'], '=SUM(Здравствуй,мир)', 48],\n        ];\n    }\n\n    #[DataProvider('providerCompositeNamedRangeEvaluation')]\n    public function testCompositeNamedRangeEvaluation(string $composite, int $expectedSum, int $expectedCount): void\n    {\n        $this->spreadSheet = $this->getSpreadsheet();\n\n        $workSheet = $this->spreadSheet->getActiveSheet();\n        $this->spreadSheet->addNamedRange(new NamedRange('COMPOSITE', $workSheet, $composite));\n\n        $workSheet->setCellValue('E1', '=SUM(COMPOSITE)');\n        $workSheet->setCellValue('E2', '=COUNT(COMPOSITE)');\n\n        $actualSum = $workSheet->getCell('E1')->getCalculatedValue();\n        self::assertSame($expectedSum, $actualSum);\n        $actualCount = $workSheet->getCell('E2')->getCalculatedValue();\n        self::assertSame($expectedCount, $actualCount);\n    }\n\n    public static function providerCompositeNamedRangeEvaluation(): array\n    {\n        return [\n            'Union with overlap' => [\n                '$A$1:$C$1,$A$3:$C$3,$B$1:$C$3',\n                99,\n                12,\n            ],\n            'Union and Intersection' => [\n                '$A$1:$C$1,$A$3:$C$3 $B$1:$C$3',\n                35,\n                5,\n            ],\n        ];\n    }\n\n    public function testIntersectCellFormula(): void\n    {\n        $this->spreadSheet = $this->getSpreadsheet();\n\n        $sheet = $this->spreadSheet->getActiveSheet();\n        $array = [\n            [null, 'Planets', 'Lives', 'Babies'],\n            ['Batman', 5, 10, 4],\n            ['Superman', 4, 56, 34],\n            ['Spiderman', 23, 45, 67],\n            ['Hulk', 12, 34, 58],\n            ['Steve', 10, 34, 78],\n        ];\n        $sheet->fromArray($array, null, 'A3', true);\n        $this->spreadSheet->addNamedRange(new NamedRange('Hulk', $sheet, '$B$7:$D$7'));\n        $this->spreadSheet->addNamedRange(new NamedRange('Planets', $sheet, '$B$4:$B$8'));\n        $this->spreadSheet->addNamedRange(new NamedRange('Intersect', $sheet, '$A$6:$D$6 $C$4:$C$8'));\n        $this->spreadSheet->addNamedRange(new NamedRange('SupHulk', $sheet, '$B$5:$D$5,$B$7:$D$7'));\n\n        $sheet->setCellValue('F1', '=Intersect');\n        $sheet->setCellValue('F2', '=SUM(SupHulk)');\n        $sheet->setCellValue('F3', '=Planets Hulk');\n        $sheet->setCellValue('F4', '=B4:D4 B4:C5');\n\n        $this->spreadSheet->returnArrayAsArray();\n        self::assertSame(45, $sheet->getCell('F1')->getCalculatedValue());\n        self::assertSame(198, $sheet->getCell('F2')->getCalculatedValue());\n        self::assertSame(12, $sheet->getCell('F3')->getCalculatedValue());\n        self::assertSame([[5, 10]], $sheet->getCell('F4')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceSlashTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\Operands\\StructuredReference;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StructuredReferenceSlashTest extends TestCase\n{\n    protected ?Spreadsheet $spreadSheet;\n\n    protected const COLUMN_FORMULA = '=[@Sales Amount]*[@[% Commission]]';\n\n    // Note that column headings may contain a non-breaking space, while the formula may not;\n    // these still need to match.\n    // As compared to StructuredReferenceTest, the last column\n    //   \"Commission/Amount\" contains a slash. See PR #3513.\n    protected const TABLE_DATA = [\n        [\"Sales\\u{a0}Person\", 'Region', \"Sales\\u{a0}Amount\", \"%\\u{a0}Commission\", 'Commission/Amount'],\n        ['Joe', 'North', 260, '10%', self::COLUMN_FORMULA],\n        ['Robert', 'South', 660, '15%', self::COLUMN_FORMULA],\n        ['Michelle', 'East', 940, '15%', self::COLUMN_FORMULA],\n        ['Erich', 'West', 410, '12%', self::COLUMN_FORMULA],\n        ['Dafna', 'North', 800, '15%', self::COLUMN_FORMULA],\n        ['Rob', 'South', 900, '15%', self::COLUMN_FORMULA],\n        ['Total'],\n    ];\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        $spreadsheet = $this->spreadSheet = new Spreadsheet();\n        $workSheet = $spreadsheet->getActiveSheet();\n        $workSheet->fromArray(self::TABLE_DATA, null, 'A1');\n\n        $table = new Table('A1:E8', 'DeptSales');\n        $table->setShowTotalsRow(true);\n        $table->getColumn('A')->setTotalsRowLabel('Total');\n        $workSheet->addTable($table);\n\n        return $spreadsheet;\n    }\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadSheet !== null) {\n            $this->spreadSheet->disconnectWorksheets();\n            $this->spreadSheet = null;\n        }\n\n        parent::tearDown();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('structuredReferenceProviderColumnData')]\n    public function testStructuredReferenceColumns(string $expectedCellRange, string $structuredReference): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $structuredReferenceObject = new StructuredReference($structuredReference);\n        $cellRange = $structuredReferenceObject->parse($spreadsheet->getActiveSheet()->getCell('E5'));\n        self::assertSame($expectedCellRange, $cellRange);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('structuredReferenceProviderRowData')]\n    public function testStructuredReferenceRows(string $expectedCellRange, string $structuredReference): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $structuredReferenceObject = new StructuredReference($structuredReference);\n        $cellRange = $structuredReferenceObject->parse($spreadsheet->getActiveSheet()->getCell('E5'));\n        self::assertSame($expectedCellRange, $cellRange);\n    }\n\n    public static function structuredReferenceProviderColumnData(): array\n    {\n        return [\n            // Full table, with no column specified,  means data only, not headers or totals\n            'Full table Unqualified' => ['A2:E7', '[]'],\n            'Full table Qualified' => ['A2:E7', 'DeptSales[]'],\n            // No item identifier, but with a column identifier, means data and header for the column, but no totals\n            'Column with no Item Identifier #1' => ['A2:A7', 'DeptSales[[Sales Person]]'],\n            'Column with no Item Identifier #2' => ['B2:B7', 'DeptSales[Region]'],\n            // Item identifier with no column specified\n            'Item Identifier only #1' => ['A1:E1', 'DeptSales[#Headers]'],\n            'Item Identifier only #2' => ['A1:E1', 'DeptSales[[#Headers]]'],\n            'Item Identifier only #3' => ['A8:E8', 'DeptSales[#Totals]'],\n            'Item Identifier only #4' => ['A2:E7', 'DeptSales[#Data]'],\n            // Item identifiers and column identifiers\n            'Full column' => ['C1:C8', 'DeptSales[[#All],[Sales Amount]]'],\n            'Column Header' => ['D1', 'DeptSales[[#Headers],[% Commission]]'],\n            'Column Total' => ['B8', 'DeptSales[[#Totals],[Region]]'],\n            'Column Range All' => ['C1:D8', 'DeptSales[[#All],[Sales Amount]:[% Commission]]'],\n            'Column Range Data' => ['D2:E7', 'DeptSales[[#Data],[% Commission]:[Commission/Amount]]'],\n            'Column Range Headers' => ['B1:E1', 'DeptSales[[#Headers],[Region]:[Commission/Amount]]'],\n            'Column Range Totals' => ['C8:E8', 'DeptSales[[#Totals],[Sales Amount]:[Commission/Amount]]'],\n            'Column Range Headers and Data' => ['D1:D7', 'DeptSales[[#Headers],[#Data],[% Commission]]'],\n            'Column Range No Item Identifier' => ['A2:B7', 'DeptSales[[Sales Person]:[Region]]'],\n            //            ['C2:C7,E2:E7', 'DeptSales[Sales Amount],DeptSales[Commission Amount]'],\n            //            ['B2:C7', 'DeptSales[[Sales Person]:[Sales Amount]] DeptSales[[Region]:[% Commission]]'],\n        ];\n    }\n\n    public static function structuredReferenceProviderRowData(): array\n    {\n        return [\n            ['E5', 'DeptSales[[#This Row], [Commission/Amount]]'],\n            ['E5', 'DeptSales[@Commission/Amount]'],\n            ['E5', 'DeptSales[@[Commission/Amount]]'],\n            ['C5:D5', 'DeptSales[@[Sales Amount]:[% Commission]]'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Engine;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\Operands\\StructuredReference;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StructuredReferenceTest extends TestCase\n{\n    protected Spreadsheet $spreadSheet;\n\n    protected const COLUMN_FORMULA = '=[@Sales Amount]*[@[% Commission]]';\n\n    // Note that column headings may contain a non-breaking space, while the formula may not;\n    // these still need to match.\n    protected const TABLE_DATA = [\n        [\"Sales\\u{a0}Person\", 'Region', \"Sales\\u{a0}Amount\", \"%\\u{a0}Commission\", \"Commission\\u{a0}Amount\"],\n        ['Joe', 'North', 260, '10%', self::COLUMN_FORMULA],\n        ['Robert', 'South', 660, '15%', self::COLUMN_FORMULA],\n        ['Michelle', 'East', 940, '15%', self::COLUMN_FORMULA],\n        ['Erich', 'West', 410, '12%', self::COLUMN_FORMULA],\n        ['Dafna', 'North', 800, '15%', self::COLUMN_FORMULA],\n        ['Rob', 'South', 900, '15%', self::COLUMN_FORMULA],\n        ['Total'],\n    ];\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->spreadSheet = new Spreadsheet();\n        $workSheet = $this->spreadSheet->getActiveSheet();\n        $workSheet->fromArray(self::TABLE_DATA, null, 'A1');\n\n        $table = new Table('A1:E8', 'DeptSales');\n        $table->setShowTotalsRow(true);\n        $table->getColumn('A')->setTotalsRowLabel('Total');\n        $workSheet->addTable($table);\n    }\n\n    protected function tearDown(): void\n    {\n        $this->spreadSheet->disconnectWorksheets();\n\n        parent::tearDown();\n    }\n\n    public function testStructuredReferenceInvalidTable(): void\n    {\n        $cell = $this->spreadSheet->getActiveSheet()->getCell('H5');\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Table SalesResults for Structured Reference cannot be located');\n        $structuredReferenceObject = new StructuredReference('SalesResults[@[% Commission]]');\n        $structuredReferenceObject->parse($cell);\n    }\n\n    public function testStructuredReferenceInvalidCellForTable(): void\n    {\n        $cell = $this->spreadSheet->getActiveSheet()->getCell('H99');\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Table for Structured Reference cannot be identified');\n        $structuredReferenceObject = new StructuredReference('[@[% Commission]]');\n        $structuredReferenceObject->parse($cell);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('structuredReferenceProviderColumnData')]\n    public function testStructuredReferenceColumns(string $expectedCellRange, string $structuredReference): void\n    {\n        $cell = $this->spreadSheet->getActiveSheet()->getCell('E5');\n\n        $structuredReferenceObject = new StructuredReference($structuredReference);\n        $cellRange = $structuredReferenceObject->parse($cell);\n        self::assertSame($expectedCellRange, $cellRange);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('structuredReferenceProviderRowData')]\n    public function testStructuredReferenceRows(string $expectedCellRange, string $structuredReference): void\n    {\n        $cell = $this->spreadSheet->getActiveSheet()->getCell('E5');\n\n        $structuredReferenceObject = new StructuredReference($structuredReference);\n        $cellRange = $structuredReferenceObject->parse($cell);\n        self::assertSame($expectedCellRange, $cellRange);\n    }\n\n    public function testInvalidStructuredReferenceRow(): void\n    {\n        $cell = $this->spreadSheet->getActiveSheet()->getCell('E5');\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionCode(1);\n        $this->expectExceptionMessage('Invalid Structured Reference');\n        $this->expectExceptionCode(Exception::CALCULATION_ENGINE_PUSH_TO_STACK);\n        $structuredReferenceObject = new StructuredReference('DeptSales[@[Sales]:[%age Commission]]');\n        $structuredReferenceObject->parse($cell);\n    }\n\n    public function testStructuredReferenceHeadersHidden(): void\n    {\n        $cell = $this->spreadSheet->getActiveSheet()->getCell('K1');\n        $table = $this->spreadSheet->getActiveSheet()->getTableByName('DeptSales');\n        /** @var Table $table */\n        $structuredReferenceObject = new StructuredReference('DeptSales[[#Headers],[% Commission]]');\n        $cellRange = $structuredReferenceObject->parse($cell);\n        self::assertSame('D1', $cellRange);\n\n        $table->setShowHeaderRow(false);\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Table Headers are Hidden, and should not be Referenced');\n        $this->expectExceptionCode(Exception::CALCULATION_ENGINE_PUSH_TO_STACK);\n        $structuredReferenceObject = new StructuredReference('DeptSales[[#Headers],[% Commission]]');\n        $structuredReferenceObject->parse($cell);\n    }\n\n    public static function structuredReferenceProviderColumnData(): array\n    {\n        return [\n            // Full table, with no column specified,  means data only, not headers or totals\n            'Full table Unqualified' => ['A2:E7', '[]'],\n            'Full table Qualified' => ['A2:E7', 'DeptSales[]'],\n            // No item identifier, but with a column identifier, means data and header for the column, but no totals\n            'Column with no Item Identifier #1' => ['A2:A7', 'DeptSales[[Sales Person]]'],\n            'Column with no Item Identifier #2' => ['B2:B7', 'DeptSales[Region]'],\n            // Item identifier with no column specified\n            'Item Identifier only #1' => ['A1:E1', 'DeptSales[#Headers]'],\n            'Item Identifier only #2' => ['A1:E1', 'DeptSales[[#Headers]]'],\n            'Item Identifier only #3' => ['A8:E8', 'DeptSales[#Totals]'],\n            'Item Identifier only #4' => ['A2:E7', 'DeptSales[#Data]'],\n            // Item identifiers and column identifiers\n            'Full column' => ['C1:C8', 'DeptSales[[#All],[Sales Amount]]'],\n            'Column Header' => ['D1', 'DeptSales[[#Headers],[% Commission]]'],\n            'Column Total' => ['B8', 'DeptSales[[#Totals],[Region]]'],\n            'Column Range All' => ['C1:D8', 'DeptSales[[#All],[Sales Amount]:[% Commission]]'],\n            'Column Range Data' => ['D2:E7', 'DeptSales[[#Data],[% Commission]:[Commission Amount]]'],\n            'Column Range Headers' => ['B1:E1', 'DeptSales[[#Headers],[Region]:[Commission Amount]]'],\n            'Column Range Totals' => ['C8:E8', 'DeptSales[[#Totals],[Sales Amount]:[Commission Amount]]'],\n            'Column Range Headers and Data' => ['D1:D7', 'DeptSales[[#Headers],[#Data],[% Commission]]'],\n            'Column Range No Item Identifier' => ['A2:B7', 'DeptSales[[Sales Person]:[Region]]'],\n            //            ['C2:C7,E2:E7', 'DeptSales[Sales Amount],DeptSales[Commission Amount]'],\n            //            ['B2:C7', 'DeptSales[[Sales Person]:[Sales Amount]] DeptSales[[Region]:[% Commission]]'],\n        ];\n    }\n\n    public static function structuredReferenceProviderRowData(): array\n    {\n        return [\n            ['E5', 'DeptSales[[#This Row], [Commission Amount]]'],\n            ['E5', 'DeptSales[@Commission Amount]'],\n            ['E5', 'DeptSales[@[Commission Amount]]'],\n            ['C5:D5', 'DeptSales[@[Sales Amount]:[% Commission]]'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/FormulaAsStringTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FormulaAsStringTest extends TestCase\n{\n    #[DataProvider('providerFunctionsAsString')]\n    public function testFunctionsAsString(mixed $expectedResult, string $formula): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n        $workSheet = $spreadsheet->getActiveSheet();\n        $workSheet->setCellValue('A1', 10);\n        $workSheet->setCellValue('A2', 20);\n        $workSheet->setCellValue('A3', 30);\n        $workSheet->setCellValue('A4', 40);\n        $spreadsheet->addNamedRange(new \\PhpOffice\\PhpSpreadsheet\\NamedRange('namedCell', $workSheet, '$A$4'));\n        $workSheet->setCellValue('B1', 'uPPER');\n        $workSheet->setCellValue('B2', '=TRUE()');\n        $workSheet->setCellValue('B3', '=FALSE()');\n\n        $ws2 = $spreadsheet->createSheet();\n        $ws2->setCellValue('A1', 100);\n        $ws2->setCellValue('A2', 200);\n        $ws2->setTitle('Sheet2');\n        $spreadsheet->addNamedRange(new \\PhpOffice\\PhpSpreadsheet\\NamedRange('A2B', $ws2, '$A$2'));\n\n        $spreadsheet->setActiveSheetIndex(0);\n        $cell2 = $workSheet->getCell('D1');\n        $cell2->setValue($formula);\n        $result = $cell2->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerFunctionsAsString(): array\n    {\n        return require 'tests/data/Calculation/FunctionsAsString.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/FormulaParserTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\FormulaParser;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FormulaParserTest extends TestCase\n{\n    public function testNullFormula(): void\n    {\n        $this->expectException(CalcException::class);\n        $this->expectExceptionMessage('Invalid parameter passed: formula');\n        new FormulaParser(null);\n    }\n\n    public function testInvalidTokenId(): void\n    {\n        $this->expectException(CalcException::class);\n        $this->expectExceptionMessage('Token with id 1 does not exist.');\n        $result = new FormulaParser('=2');\n        $result->getToken(1);\n    }\n\n    public function testNoFormula(): void\n    {\n        $result = new FormulaParser('');\n        self::assertSame(0, $result->getTokenCount());\n    }\n\n    /** @param mixed[][] $expectedResult */\n    #[DataProvider('providerFormulaParser')]\n    public function testFormulaParser(string $formula, array $expectedResult): void\n    {\n        $formula = \"=$formula\";\n        $result = new FormulaParser($formula);\n        self::assertSame($formula, $result->getFormula());\n        self::assertSame(count($expectedResult), $result->getTokenCount());\n        $tokens = $result->getTokens();\n        $token0 = $result->getToken(0);\n        self::assertSame($tokens[0], $token0);\n        $idx = -1;\n        foreach ($expectedResult as $resultArray) {\n            ++$idx;\n            self::assertSame($resultArray[0], $tokens[$idx]->getValue());\n            self::assertSame($resultArray[1], $tokens[$idx]->getTokenType());\n            self::assertSame($resultArray[2], $tokens[$idx]->getTokenSubType());\n        }\n    }\n\n    public static function providerFormulaParser(): array\n    {\n        return [\n            ['5%*(2+(-3))+A3',\n                [\n                    ['5', 'Operand', 'Number'],\n                    ['%', 'OperatorPostfix', 'Nothing'],\n                    ['*', 'OperatorInfix', 'Math'],\n                    ['', 'Subexpression', 'Start'],\n                    ['2', 'Operand', 'Number'],\n                    ['+', 'OperatorInfix', 'Math'],\n                    ['', 'Subexpression', 'Start'],\n                    ['-', 'OperatorPrefix', 'Nothing'],\n                    ['3', 'Operand', 'Number'],\n                    ['', 'Subexpression', 'Stop'],\n                    ['', 'Subexpression', 'Stop'],\n                    ['+', 'OperatorInfix', 'Math'],\n                    ['A3', 'Operand', 'Range'],\n                ],\n            ],\n            ['\"hello\"  & \"goodbye\"',\n                [\n                    ['hello', 'Operand', 'Text'],\n                    ['&', 'OperatorInfix', 'Concatenation'],\n                    ['goodbye', 'Operand', 'Text'],\n                ],\n            ],\n            ['+1.23E5',\n                [\n                    ['1.23E5', 'Operand', 'Number'],\n                ],\n            ],\n            ['#DIV/0!',\n                [\n                    ['#DIV/0!', 'Operand', 'Error'],\n                ],\n            ],\n            ['\"HE\"\"LLO\"',\n                [\n                    ['HE\"LLO', 'Operand', 'Text'],\n                ],\n            ],\n            ['MINVERSE({3,1;4,2})',\n                [\n                    ['MINVERSE', 'Function', 'Start'],\n                    ['ARRAY', 'Function', 'Start'],\n                    ['ARRAYROW', 'Function', 'Start'],\n                    ['3', 'Operand', 'Number'],\n                    [',', 'OperatorInfix', 'Union'],\n                    ['1', 'Operand', 'Number'],\n                    ['', 'Function', 'Stop'],\n                    [',', 'Argument', 'Nothing'],\n                    ['ARRAYROW', 'Function', 'Start'],\n                    ['4', 'Operand', 'Number'],\n                    [',', 'OperatorInfix', 'Union'],\n                    ['2', 'Operand', 'Number'],\n                    ['', 'Function', 'Stop'],\n                    ['', 'Function', 'Stop'],\n                    ['', 'Function', 'Stop'],\n                ],\n            ],\n            ['[1,1]*5',\n                [\n                    ['[1,1]', 'Operand', 'Range'],\n                    ['*', 'OperatorInfix', 'Math'],\n                    ['5', 'Operand', 'Number'],\n                ],\n            ],\n            ['IF(A1>=0,2,3)',\n                [\n                    ['IF', 'Function', 'Start'],\n                    ['A1', 'Operand', 'Range'],\n                    ['>=', 'OperatorInfix', 'Logical'],\n                    ['0', 'Operand', 'Number'],\n                    [',', 'OperatorInfix', 'Union'],\n                    ['2', 'Operand', 'Number'],\n                    [',', 'OperatorInfix', 'Union'],\n                    ['3', 'Operand', 'Number'],\n                    ['', 'Function', 'Stop'],\n                ],\n            ],\n            [\"'Worksheet'!A1:A3\",\n                [\n                    ['Worksheet!A1:A3', 'Operand', 'Range'],\n                ],\n            ],\n            [\"'Worksh''eet'!A1:A3\",\n                [\n                    ['Worksh\\'eet!A1:A3', 'Operand', 'Range'],\n                ],\n            ],\n            ['true',\n                [\n                    ['true', 'Operand', 'Logical'],\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DAverageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DAverage;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DAverageTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDAverage')]\n    public function testDirectCallToDAverage(int|float|string $expectedResult, array $database, string|int|null $field, array $criteria): void\n    {\n        $result = DAverage::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDAverage')]\n    public function testDAverageAsWorksheetFormula(int|float|string $expectedResult, array $database, string|int|null $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DAVERAGE', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDAverage(): array\n    {\n        return [\n            [\n                12,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree', 'Height'],\n                    ['=Apple', '>10'],\n                ],\n            ],\n            [\n                268333.333333333333,\n                self::database2(),\n                'Sales',\n                [\n                    ['Quarter', 'Sales Rep.'],\n                    ['>1', 'Tina'],\n                ],\n            ],\n            [\n                372500,\n                self::database2(),\n                'Sales',\n                [\n                    ['Quarter', 'Area'],\n                    ['1', 'South'],\n                ],\n            ],\n            'numeric column, in this case referring to age' => [\n                13,\n                self::database1(),\n                3,\n                self::database1(),\n            ],\n            'null field' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n            'field unknown column' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                'xyz',\n                self::database1(),\n            ],\n            'multiple criteria, omit equal sign' => [\n                10.5,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree', 'Height'],\n                    ['=Apple', '>10'],\n                    ['Pear'],\n                ],\n            ],\n            'multiple criteria for same field' => [\n                10,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree', 'Height', 'Age', 'Height'],\n                    ['=Apple', '>10', null, '<16'],\n                ],\n            ],\n            /* Excel seems to return #NAME? when column number\n               is too high or too low. This makes so little sense\n               to me that I'm not going to bother coding that up,\n               content to return #VALUE! as an invalid name would */\n            'field column number too high' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                99,\n                self::database1(),\n            ],\n            'field column number too low' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                0,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DCountA;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DCountATest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDCountA')]\n    public function testDirectCallToDCountA(int|string $expectedResult, array $database, string $field, array $criteria): void\n    {\n        $result = DCountA::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDCountA')]\n    public function testDCountAAsWorksheetFormula(int|string $expectedResult, array $database, string $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DCOUNTA', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDCountA(): array\n    {\n        return [\n            [\n                1,\n                self::database1(),\n                'Profit',\n                [\n                    ['Tree', 'Height', 'Height'],\n                    ['=Apple', '>10', '<16'],\n                ],\n            ],\n            [\n                2,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['Science', 'Male'],\n                ],\n            ],\n            [\n                1,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['Math', 'Female'],\n                ],\n            ],\n            [\n                3,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Score'],\n                    ['English', '>60%'],\n                ],\n            ],\n            'invalid field name' => [\n                ExcelError::VALUE(),\n                self::database3(),\n                'Scorex',\n                [\n                    ['Subject', 'Score'],\n                    ['English', '>60%'],\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DCount;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DCountTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDCount')]\n    public function testDirectCallToDCount(int|string $expectedResult, array $database, string|int|null $field, array $criteria): void\n    {\n        $result = DCount::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDCount')]\n    public function testDCountAsWorksheetFormula(int|string $expectedResult, array $database, string|int|null $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DCOUNT', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /** @return array<array{mixed, mixed}> */\n    private static function database4(): array\n    {\n        return [\n            ['Status', 'Value'],\n            [false, 1],\n            [true, 2],\n            [true, 4],\n            [false, 8],\n            [true, 16],\n            [false, 32],\n            [false, 64],\n            [false, 128],\n        ];\n    }\n\n    public static function providerDCount(): array\n    {\n        return [\n            [\n                1,\n                self::database1(),\n                'Age',\n                [\n                    ['Tree', 'Height', 'Height'],\n                    ['=Apple', '>10', '<16'],\n                ],\n            ],\n            [\n                1,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['Science', 'Male'],\n                ],\n            ],\n            [\n                1,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['Math', 'Female'],\n                ],\n            ],\n            [\n                3,\n                self::database4(),\n                'Value',\n                [\n                    ['Status'],\n                    [true],\n                ],\n            ],\n            [\n                5,\n                self::database4(),\n                'Value',\n                [\n                    ['Status'],\n                    ['<>true'],\n                ],\n            ],\n            'field column number okay' => [\n                0,\n                self::database1(),\n                1,\n                self::database1(),\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database3(),\n                null,\n                [\n                    ['Subject', 'Score'],\n                    ['English', '>63%'],\n                ],\n            ],\n            /* Excel seems to return #NAME? when column number\n               is too high or too low. This makes so little sense\n               to me that I'm not going to bother coding that up,\n               content to return #VALUE! as an invalid name would */\n            'field column number too high' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                99,\n                self::database1(),\n            ],\n            'field column number too low' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                0,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DGetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DGet;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DGetTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDGet')]\n    public function testDirectCallToDGet(string|int $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $result = DGet::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDGet')]\n    public function testDGetAsWorksheetFormula(string|int $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DGET', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDGet(): array\n    {\n        return [\n            [\n                ExcelError::NAN(),\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree'],\n                    ['=Apple'],\n                    ['=Pear'],\n                ],\n            ],\n            [\n                10,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree', 'Height', 'Height'],\n                    ['=Apple', '>10', '<16'],\n                    ['=Pear', '>12', null],\n                ],\n            ],\n            [\n                188000,\n                self::database2(),\n                'Sales',\n                [\n                    ['Sales Rep.', 'Quarter'],\n                    ['Tina', 4],\n                ],\n            ],\n            [\n                ExcelError::NAN(),\n                self::database2(),\n                'Sales',\n                [\n                    ['Area', 'Quarter'],\n                    ['South', 4],\n                ],\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMaxTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DMax;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DMaxTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDMax')]\n    public function testDirectCallToDMax(int|string $expectedResult, array $database, string|null|int $field, array $criteria): void\n    {\n        $result = DMax::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDMax')]\n    public function testDMaxAsWorksheetFormula(int|string $expectedResult, array $database, string|null|int $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DMAX', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDMax(): array\n    {\n        return [\n            [\n                96,\n                self::database1(),\n                'Profit',\n                [\n                    ['Tree', 'Height', 'Height'],\n                    ['=Apple', '>10', '<16'],\n                    ['=Pear', null, null],\n                ],\n            ],\n            [\n                340000,\n                self::database2(),\n                'Sales',\n                [\n                    ['Quarter', 'Area'],\n                    [2, 'North'],\n                ],\n            ],\n            [\n                460000,\n                self::database2(),\n                'Sales',\n                [\n                    ['Sales Rep.', 'Quarter'],\n                    ['Carol', '>1'],\n                ],\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n            'field column number okay' => [\n                18,\n                self::database1(),\n                2,\n                self::database1(),\n            ],\n            /* Excel seems to return #NAME? when column number\n               is too high or too low. This makes so little sense\n               to me that I'm not going to bother coding that up,\n               content to return #VALUE! as an invalid name would */\n            'field column number too high' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                99,\n                self::database1(),\n            ],\n            'field column number too low' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                0,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DMin;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DMinTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDMin')]\n    public function testDirectCallToDMin(int|float|string $expectedResult, array $database, string|null|int $field, array $criteria): void\n    {\n        $result = DMin::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDMin')]\n    public function testDMinAsWorksheetFormula(int|float|string $expectedResult, array $database, string|null|int $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DMIN', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDMin(): array\n    {\n        return [\n            [\n                75,\n                self::database1(),\n                'Profit',\n                [\n                    ['Tree', 'Height', 'Height'],\n                    ['=Apple', '>10', '<16'],\n                    ['=Pear', '>12', null],\n                ],\n            ],\n            [\n                0.48,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Age'],\n                    ['Science', '>8'],\n                ],\n            ],\n            [\n                0.55,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['Math', 'Male'],\n                ],\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n            'field column number okay' => [\n                8,\n                self::database1(),\n                2,\n                self::database1(),\n            ],\n            /* Excel seems to return #NAME? when column number\n               is too high or too low. This makes so little sense\n               to me that I'm not going to bother coding that up,\n               content to return #VALUE! as an invalid name would */\n            'field column number too high' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                99,\n                self::database1(),\n            ],\n            'field column number too low' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                0,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DProductTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DProduct;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers as DateTimeHelper;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DProductTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDProduct')]\n    public function testDirectCallToDProduct(float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $result = DProduct::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDProduct')]\n    public function testDProductAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DPRODUCT', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /** @return array<array{mixed, mixed, mixed, mixed}> */\n    private static function database5(): array\n    {\n        return [\n            ['Name', 'Date', 'Test', 'Score'],\n            ['Gary', DateTimeHelper::getDateValue('01-Jan-2017'), 'Test1', 4],\n            ['Gary', DateTimeHelper::getDateValue('01-Jan-2017'), 'Test2', 4],\n            ['Gary', DateTimeHelper::getDateValue('01-Jan-2017'), 'Test3', 3],\n            ['Gary', DateTimeHelper::getDateValue('05-Jan-2017'), 'Test1', 3],\n            ['Gary', DateTimeHelper::getDateValue('05-Jan-2017'), 'Test2', 4],\n            ['Gary', DateTimeHelper::getDateValue('05-Jan-2017'), 'Test3', 3],\n            ['Kev', DateTimeHelper::getDateValue('02-Jan-2017'), 'Test1', 2],\n            ['Kev', DateTimeHelper::getDateValue('02-Jan-2017'), 'Test2', 3],\n            ['Kev', DateTimeHelper::getDateValue('02-Jan-2017'), 'Test3', 5],\n            ['Kev', DateTimeHelper::getDateValue('05-Jan-2017'), 'Test1', 3],\n            ['Kev', DateTimeHelper::getDateValue('05-Jan-2017'), 'Test2', 2],\n            ['Kev', DateTimeHelper::getDateValue('05-Jan-2017'), 'Test3', 5],\n        ];\n    }\n\n    public static function providerDProduct(): array\n    {\n        return [\n            [\n                800.0,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree', 'Height', 'Height'],\n                    ['=Apple', '>10', '<16'],\n                    ['=Pear', null, null],\n                ],\n            ],\n            [\n                36.0,\n                self::database5(),\n                'Score',\n                [\n                    ['Name', 'Date'],\n                    ['Gary', '05-Jan-2017'],\n                ],\n            ],\n            [\n                8.0,\n                self::database5(),\n                'Score',\n                [\n                    ['Test', 'Date'],\n                    ['Test1', '<05-Jan-2017'],\n                ],\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevPTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DStDevP;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DStDevPTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDStDevP')]\n    public function testDirectCallToDStDevP(float|int|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $result = DStDevP::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDStDevP')]\n    public function testDStDevPAsWorksheetFormula(float|int|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DSTDEVP', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDStDevP(): array\n    {\n        return [\n            [\n                2.653299832284,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree'],\n                    ['=Apple'],\n                    ['=Pear'],\n                ],\n            ],\n            [\n                0.085244745684,\n                self::database3FilledIn(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['English', 'Male'],\n                ],\n            ],\n            [\n                0.160623784042,\n                self::database3FilledIn(),\n                'Score',\n                [\n                    ['Subject', 'Age'],\n                    ['Math', '>8'],\n                ],\n            ],\n            [\n                0.01,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['English', 'Male'],\n                ],\n            ],\n            [\n                0,\n                self::database3(),\n                'Score',\n                [\n                    ['Subject', 'Age'],\n                    ['Math', '>8'],\n                ],\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DStDev;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DStDevTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDStDev')]\n    public function testDirectCallToDStDev(float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $result = DStDev::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDStDev')]\n    public function testDStDevAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DSTDEV', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDStDev(): array\n    {\n        return [\n            [\n                2.966479394838,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree'],\n                    ['=Apple'],\n                    ['=Pear'],\n                ],\n            ],\n            [\n                0.104403065089,\n                self::database3FilledIn(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['English', 'Male'],\n                ],\n            ],\n            [\n                0.196723155729,\n                self::database3FilledIn(),\n                'Score',\n                [\n                    ['Subject', 'Age'],\n                    ['Math', '>8'],\n                ],\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DSumTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DSum;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DSumTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDSum')]\n    public function testDirectCallToDSum(int|float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $result = DSum::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDSum')]\n    public function testDSumAsWorksheetFormula(int|float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DSUM', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDSum(): array\n    {\n        return [\n            [\n                225,\n                self::database1(),\n                'Profit',\n                [\n                    ['Tree'],\n                    ['=Apple'],\n                ],\n            ],\n            [\n                247.8,\n                self::database1(),\n                'Profit',\n                [\n                    ['Tree', 'Height', 'Height'],\n                    ['=Apple', '>10', '<16'],\n                    ['=Pear', null, null],\n                ],\n            ],\n            [\n                1210000,\n                self::database2(),\n                'Sales',\n                [\n                    ['Quarter', 'Area'],\n                    ['>2', 'North'],\n                ],\n            ],\n            [\n                710000,\n                self::database2(),\n                'Sales',\n                [\n                    ['Quarter', 'Sales Rep.'],\n                    ['3', 'C*'],\n                ],\n            ],\n            [\n                705000,\n                self::database2(),\n                'Sales',\n                [\n                    ['Quarter', 'Sales Rep.'],\n                    ['3', '<>C*'],\n                ],\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarPTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DVarP;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DVarPTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDVarP')]\n    public function testDirectCallToDVarP(float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $result = DVarP::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDVarP')]\n    public function testDVarPAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DVARP', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDVarP(): array\n    {\n        return [\n            [\n                7.04,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree'],\n                    ['=Apple'],\n                    ['=Pear'],\n                ],\n            ],\n            [\n                0.025622222222,\n                self::database3FilledIn(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['Math', 'Male'],\n                ],\n            ],\n            [\n                0.011622222222,\n                self::database3FilledIn(),\n                'Score',\n                [\n                    ['Subject', 'Age'],\n                    ['Science', '>8'],\n                ],\n            ],\n            'Omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Database\\DVar;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DVarTest extends SetupTeardownDatabases\n{\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDVar')]\n    public function testDirectCallToDVar(float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $result = DVar::evaluate($database, $field, $criteria);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    #[DataProvider('providerDVar')]\n    public function testDVarAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void\n    {\n        $this->prepareWorksheetWithFormula('DVAR', $database, $field, $criteria);\n\n        $result = $this->getSheet()->getCell(self::RESULT_CELL)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDVar(): array\n    {\n        return [\n            [\n                8.8,\n                self::database1(),\n                'Yield',\n                [\n                    ['Tree'],\n                    ['=Apple'],\n                    ['=Pear'],\n                ],\n            ],\n            [\n                0.038433333333,\n                self::database3FilledIn(),\n                'Score',\n                [\n                    ['Subject', 'Gender'],\n                    ['Math', 'Male'],\n                ],\n            ],\n            [\n                0.017433333333,\n                self::database3FilledIn(),\n                'Score',\n                [\n                    ['Subject', 'Age'],\n                    ['Science', '>8'],\n                ],\n            ],\n            'omitted field name' => [\n                ExcelError::VALUE(),\n                self::database1(),\n                null,\n                self::database1(),\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Database/SetupTeardownDatabases.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Database;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SetupTeardownDatabases extends TestCase\n{\n    protected const RESULT_CELL = 'Z1';\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected function setUp(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n    }\n\n    protected function tearDown(): void\n    {\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n    }\n\n    /** @return mixed[][] */\n    protected static function database1(): array\n    {\n        return [\n            ['Tree', 'Height', 'Age', 'Yield', 'Profit'],\n            ['Apple', 18, 20, 14, 105],\n            ['Pear', 12, 12, 10, 96],\n            ['Cherry', 13, 14, 9, 105],\n            ['Apple', 14, 15, 10, 75],\n            ['Pear', 9, 8, 8, 76.8],\n            ['Apple', 8, 9, 6, 45],\n        ];\n    }\n\n    /** @return mixed[][] */\n    protected static function database2(): array\n    {\n        return [\n            ['Quarter', 'Area', 'Sales Rep.', 'Sales'],\n            [1, 'North', 'Jeff', 223000],\n            [1, 'North', 'Chris', 125000],\n            [1, 'South', 'Carol', 456000],\n            [1, 'South', 'Tina', 289000],\n            [2, 'North', 'Jeff', 322000],\n            [2, 'North', 'Chris', 340000],\n            [2, 'South', 'Carol', 198000],\n            [2, 'South', 'Tina', 222000],\n            [3, 'North', 'Jeff', 310000],\n            [3, 'North', 'Chris', 250000],\n            [3, 'South', 'Carol', 460000],\n            [3, 'South', 'Tina', 395000],\n            [4, 'North', 'Jeff', 261000],\n            [4, 'North', 'Chris', 389000],\n            [4, 'South', 'Carol', 305000],\n            [4, 'South', 'Tina', 188000],\n        ];\n    }\n\n    /** @return mixed[][] */\n    protected static function database3(): array\n    {\n        return [\n            ['Name', 'Gender', 'Age', 'Subject', 'Score'],\n            ['Amy', 'Female', 8, 'Math', 0.63],\n            ['Amy', 'Female', 8, 'English', 0.78],\n            ['Amy', 'Female', 8, 'Science', 0.39],\n            ['Bill', 'Male', 8, 'Math', 0.55],\n            ['Bill', 'Male', 8, 'English', 0.71],\n            ['Bill', 'Male', 8, 'Science', 'awaiting'],\n            ['Sue', 'Female', 9, 'Math', null],\n            ['Sue', 'Female', 9, 'English', 0.52],\n            ['Sue', 'Female', 9, 'Science', 0.48],\n            ['Tom', 'Male', 9, 'Math', 0.78],\n            ['Tom', 'Male', 9, 'English', 0.69],\n            ['Tom', 'Male', 9, 'Science', 0.65],\n        ];\n    }\n\n    /** @return mixed[][] */\n    protected static function database3FilledIn(): array\n    {\n        // same as database3 except two omitted scores are filled in\n        return [\n            ['Name', 'Gender', 'Age', 'Subject', 'Score'],\n            ['Amy', 'Female', 10, 'Math', 0.63],\n            ['Amy', 'Female', 10, 'English', 0.78],\n            ['Amy', 'Female', 10, 'Science', 0.39],\n            ['Bill', 'Male', 8, 'Math', 0.55],\n            ['Bill', 'Male', 8, 'English', 0.71],\n            ['Bill', 'Male', 8, 'Science', 0.51],\n            ['Sam', 'Male', 9, 'Math', 0.39],\n            ['Sam', 'Male', 9, 'English', 0.52],\n            ['Sam', 'Male', 9, 'Science', 0.48],\n            ['Tom', 'Male', 9, 'Math', 0.78],\n            ['Tom', 'Male', 9, 'English', 0.69],\n            ['Tom', 'Male', 9, 'Science', 0.65],\n        ];\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n\n    /**\n     * @param mixed[] $database\n     * @param mixed[][] $criteria\n     */\n    public function prepareWorksheetWithFormula(string $functionName, array $database, null|int|string $field, array $criteria): void\n    {\n        $sheet = $this->getSheet();\n        $maxCol = '';\n        $startCol = 'A';\n        $maxRow = 0;\n        $startRow = 1;\n        $row = $startRow;\n        foreach ($database as $dataRow) {\n            /** @var mixed[] $dataRow */\n            $col = $startCol;\n            foreach ($dataRow as $dataCell) {\n                $sheet->getCell(\"$col$row\")->setValue($dataCell);\n                $maxCol = max($col, $maxCol);\n                StringHelper::stringIncrement($col);\n            }\n            $maxRow = $row;\n            ++$row;\n        }\n        $databaseCells = \"$startCol$startRow:$maxCol$maxRow\";\n        $maxCol = '';\n        $startCol = 'P';\n        $maxRow = 0;\n        $startRow = 1;\n        $row = $startRow;\n        foreach ($criteria as $dataRow) {\n            /** @var mixed[] $dataRow */\n            $col = $startCol;\n            foreach ($dataRow as $dataCell) {\n                if ($dataCell !== null) {\n                    $sheet->getCell(\"$col$row\")->setValueExplicit($dataCell, DataType::TYPE_STRING);\n                }\n                $maxCol = max($col, $maxCol);\n                StringHelper::stringIncrement($col);\n            }\n            $maxRow = $row;\n            ++$row;\n        }\n        $criteriaCells = \"$startCol$startRow:$maxCol$maxRow\";\n        $sheet->getCell('N1')->setValue($field);\n        $sheet->getCell(self::RESULT_CELL)->setValue(\"=$functionName($databaseCells, N1, $criteriaCells)\");\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTime;\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Days;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Difference;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateDifTest extends TestCase\n{\n    /** @param array<mixed>|int|string $expectedResult */\n    #[DataProvider('providerDATEDIF')]\n    public function testDirectCallToDATEDIF(array|int|string $expectedResult, string ...$args): void\n    {\n        $result = Difference::interval(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDATEDIF')]\n    public function testDATEDIFAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DATEDIF({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDATEDIF')]\n    public function testDATEDIFInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DATEDIF({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDATEDIF(): array\n    {\n        return require 'tests/data/Calculation/DateTime/DATEDIF.php';\n    }\n\n    #[DataProvider('providerUnhappyDATEDIF')]\n    public function testDATEDIFUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DATEDIF({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyDATEDIF(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DATEDIF() function', '2023-03-1'],\n        ];\n    }\n\n    public function testDateObject(): void\n    {\n        $obj1 = new DateTime('2000-3-31');\n        $obj2 = new DateTimeImmutable('2000-2-29');\n        self::assertSame(31, Days::between($obj1, $obj2));\n    }\n\n    /** @param array<mixed> $expectedResult */\n    #[DataProvider('providerDateDifArray')]\n    public function testDateDifArray(array $expectedResult, string $startDate, string $endDate, ?string $methods): void\n    {\n        $calculation = Calculation::getInstance();\n\n        if ($methods === null) {\n            $formula = \"=DATEDIF({$startDate}, {$endDate})\";\n        } else {\n            $formula = \"=DATEDIF({$startDate}, {$endDate}, {$methods})\";\n        }\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDateDifArray(): array\n    {\n        return [\n            'row vector #1' => [[[364, 202, '#NUM!']], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}', '\"2022-12-31\"', null],\n            'row vector #2' => [[['#NUM!', '#NUM!', 203]], '\"2022-12-31\"', '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}', null],\n            'column vector #1' => [[[364], [362], [359]], '{\"2022-01-01\"; \"2022-01-03\"; \"2022-01-06\"}', '\"2022-12-31\"', null],\n            'matrix #1' => [[[365, 266], [139, 1]], '{\"2022-01-01\", \"2022-04-10\"; \"2022-08-15\", \"2022-12-31\"}', '\"2023-01-01\"', null],\n            'column vector with methods' => [[[364, 11], [242, 7], [173, 5]], '{\"2022-01-01\"; \"2022-05-03\"; \"2022-07-11\"}', '\"2022-12-31\"', '{\"D\", \"M\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateTest extends TestCase\n{\n    private int $excelCalendar;\n\n    private string $returnDateType;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->excelCalendar = SharedDate::getExcelCalendar();\n        $this->returnDateType = Functions::getReturnDateType();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        SharedDate::setExcelCalendar($this->excelCalendar);\n        Functions::setReturnDateType($this->returnDateType);\n    }\n\n    #[DataProvider('providerDATE')]\n    public function testDirectCallToDATE(float|string $expectedResult, int|string $year, null|bool|float|int|string $month, float|int|string $day): void\n    {\n        $result = Date::fromYMD($year, $month, $day);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDATE')]\n    public function testDATEAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DATE({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDATE')]\n    public function testDATEInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DATE({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDATE(): array\n    {\n        return require 'tests/data/Calculation/DateTime/DATE.php';\n    }\n\n    #[DataProvider('providerUnhappyDATE')]\n    public function testDATEUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DATE({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyDATE(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DATE() function', 2023, 3],\n        ];\n    }\n\n    public function testDATEtoUnixTimestamp(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_UNIX_TIMESTAMP);\n\n        $result = Date::fromYMD(2012, 1, 31); // 32-bit safe\n        self::assertEquals(1327968000, $result);\n    }\n\n    public function testDATEtoDateTimeObject(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_PHP_OBJECT);\n\n        $result = Date::fromYMD(2012, 1, 31);\n        //    Must return an object...\n        //    ... of the correct type\n        self::assertInstanceOf(DateTimeInterface::class, $result);\n        //    ... with the correct value\n        self::assertEquals($result->format('d-M-Y'), '31-Jan-2012');\n    }\n\n    public function testDATEWith1904Calendar(): void\n    {\n        SharedDate::setExcelCalendar(SharedDate::CALENDAR_MAC_1904);\n\n        $result = Date::fromYMD(1918, 11, 11);\n        self::assertEquals($result, 5428);\n\n        $result = Date::fromYMD(1901, 1, 31);\n        self::assertEquals($result, ExcelError::NAN());\n    }\n\n    /** @param array<mixed> $expectedResult */\n    #[DataProvider('providerDateArray')]\n    public function testDateArray(array $expectedResult, string $year, string $month, string $day): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DATE({$year}, {$month}, {$day})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerDateArray(): array\n    {\n        return [\n            'row vector year' => [[[44197, 44562, 44927]], '{2021,2022,2023}', '1', '1'],\n            'column vector year' => [[[44197], [44562], [44927]], '{2021;2022;2023}', '1', '1'],\n            'matrix year' => [[[43831.00, 44197], [44562, 44927]], '{2020,2021;2022,2023}', '1', '1'],\n            'row vector month' => [[[44562, 44652, 44743, 44835]], '2022', '{1, 4, 7, 10}', '1'],\n            'column vector month' => [[[44562], [44652], [44743], [44835]], '2022', '{1; 4; 7; 10}', '1'],\n            'matrix month' => [[[44562, 44652], [44743, 44835]], '2022', '{1, 4; 7, 10}', '1'],\n            'row vector day' => [[[44561, 44562]], '2022', '1', '{0,1}'],\n            'column vector day' => [[[44561], [44562]], '2022', '1', '{0;1}'],\n            'vectors year and month' => [\n                [\n                    [44197, 44287, 44378, 44470],\n                    [44562, 44652, 44743, 44835],\n                    [44927, 45017, 45108, 45200],\n                ],\n                '{2021;2022;2023}',\n                '{1, 4, 7, 10}',\n                '1',\n            ],\n            'vectors year and day' => [\n                [\n                    [44196, 44197],\n                    [44561, 44562],\n                    [44926, 44927],\n                ],\n                '{2021;2022;2023}',\n                '1',\n                '{0,1}',\n            ],\n            'vectors month and day' => [\n                [\n                    [44561, 44562],\n                    [44651, 44652],\n                    [44742, 44743],\n                    [44834, 44835],\n                ],\n                '2022',\n                '{1; 4; 7; 10}',\n                '{0,1}',\n            ],\n            'matrices year and month' => [\n                [\n                    [43831, 44287],\n                    [44743, 45200],\n                ],\n                '{2020, 2021; 2022, 2023}',\n                '{1, 4; 7, 10}',\n                '1',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerDateArrayException')]\n    public function testDateArrayException(string $year, string $month, string $day): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage('Formulae with more than two array arguments are not supported');\n\n        $formula = \"=DATE({$year}, {$month}, {$day})\";\n        $calculation->calculateFormula($formula);\n    }\n\n    public static function providerDateArrayException(): array\n    {\n        return [\n            'matrix arguments with 3 array values' => [\n                '{2020, 2021; 2022, 2023}',\n                '{1, 4; 7, 10}',\n                '{0,1}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTimeImmutable;\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateValueTest extends TestCase\n{\n    private int $excelCalendar;\n\n    private string $returnDateType;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->excelCalendar = SharedDate::getExcelCalendar();\n        $this->returnDateType = Functions::getReturnDateType();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        SharedDate::setExcelCalendar($this->excelCalendar);\n        Functions::setReturnDateType($this->returnDateType);\n    }\n\n    private function expectationIsTemplate(mixed $expectedResult): bool\n    {\n        return is_string($expectedResult) && str_starts_with($expectedResult, 'Y-');\n    }\n\n    private function parseTemplatedExpectation(float|int|string $expectedResult): string\n    {\n        /** @var float */\n        $x = DateValue::fromString(\n            (new DateTimeImmutable(\n                str_replace('Y', (new DateTimeImmutable('now'))->format('Y'), (string) $expectedResult)\n            ))->format('Y-m-d')\n        );\n\n        return (string) $x;\n    }\n\n    #[DataProvider('providerDATEVALUE')]\n    public function testDirectCallToDATEVALUE(int|string $expectedResult, bool|int|string $value): void\n    {\n        if ($this->expectationIsTemplate($expectedResult)) {\n            $expectedResult = $this->parseTemplatedExpectation((string) $expectedResult);\n        }\n\n        $result = DateValue::fromString($value);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);\n    }\n\n    #[DataProvider('providerDATEVALUE')]\n    public function testDATEVALUEAsFormula(float|int|string $expectedResult, mixed ...$args): void\n    {\n        if ($this->expectationIsTemplate($expectedResult)) {\n            $expectedResult = $this->parseTemplatedExpectation($expectedResult);\n        }\n\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DATEVALUE({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);\n    }\n\n    #[DataProvider('providerDATEVALUE')]\n    public function testDATEVALUEInWorksheet(float|int|string $expectedResult, mixed ...$args): void\n    {\n        if ($this->expectationIsTemplate($expectedResult)) {\n            $expectedResult = $this->parseTemplatedExpectation($expectedResult);\n        }\n\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DATEVALUE({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDATEVALUE(): array\n    {\n        return require 'tests/data/Calculation/DateTime/DATEVALUE.php';\n    }\n\n    public function testRefArgNull(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=DATEVALUE(B1)');\n        self::assertSame('#VALUE!', $sheet->getCell('A1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('providerUnhappyDATEVALUE')]\n    public function testDATEVALUEUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DATEVALUE({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyDATEVALUE(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DATEVALUE() function'],\n        ];\n    }\n\n    public function testDATEVALUEtoUnixTimestamp(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_UNIX_TIMESTAMP);\n\n        $result = DateValue::fromString('2012-1-31');\n        self::assertEquals(1327968000, $result);\n        self::assertEqualsWithDelta(1327968000, $result, 1E-8);\n    }\n\n    public function testDATEVALUEtoDateTimeObject(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_PHP_DATETIME_OBJECT);\n\n        $result = DateValue::fromString('2012-1-31');\n        //    Must return an object...\n        //    ... of the correct type\n        self::assertInstanceOf(DateTimeInterface::class, $result);\n        //    ... with the correct value\n        self::assertEquals($result->format('d-M-Y'), '31-Jan-2012');\n    }\n\n    public function testDATEVALUEWith1904Calendar(): void\n    {\n        SharedDate::setExcelCalendar(SharedDate::CALENDAR_MAC_1904);\n\n        self::assertEquals(5428, DateValue::fromString('1918-11-11'));\n        self::assertEquals(0, DateValue::fromString('1904-01-01'));\n        self::assertEquals('#VALUE!', DateValue::fromString('1903-12-31'));\n        self::assertEquals('#VALUE!', DateValue::fromString('1900-02-29'));\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDateValueArray')]\n    public function testDateValueArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DATEVALUE({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerDateValueArray(): array\n    {\n        return [\n            'row vector' => [[[44562, 44724, 45129]], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}'],\n            'column vector' => [[[44562], [44564], [44567]], '{\"2022-01-01\"; \"2022-01-03\"; \"2022-01-06\"}'],\n            'matrix' => [[[44562, 44571], [44788, 44926]], '{\"2022-01-01\", \"2022-01-10\"; \"2022-08-15\", \"2022-12-31\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DayTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    #[DataProvider('providerDAY')]\n    public function testDirectCallToDAY(mixed $expectedResultExcel, mixed ...$args): void\n    {\n        $result = DateParts::day(...$args);\n        self::assertSame($expectedResultExcel, $result);\n    }\n\n    #[DataProvider('providerDAY')]\n    public function testDAYAsFormula(mixed $expectedResultExcel, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DAY({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResultExcel, $result);\n    }\n\n    #[DataProvider('providerDAY')]\n    public function testDAYInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DAY({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDAY(): array\n    {\n        return require 'tests/data/Calculation/DateTime/DAY.php';\n    }\n\n    #[DataProvider('providerDAYOpenOffice')]\n    public function testDirectCallToDAYOpenOffice(mixed $expectedResultOpenOffice, mixed ...$args): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n\n        $result = DateParts::day(...$args);\n        self::assertSame($expectedResultOpenOffice, $result);\n    }\n\n    #[DataProvider('providerDAYOpenOffice')]\n    public function testDAYAsFormulaOpenOffice(mixed $expectedResultOpenOffice, mixed ...$args): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DAY({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResultOpenOffice, $result);\n    }\n\n    public static function providerDAYOpenOffice(): array\n    {\n        return require 'tests/data/Calculation/DateTime/DAYOpenOffice.php';\n    }\n\n    #[DataProvider('providerUnhappyDAY')]\n    public function testDAYUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DAY({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyDAY(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DAY() function'],\n        ];\n    }\n\n    public function testDirectCallToDAYWithNull(): void\n    {\n        $result = DateParts::day(null);\n        self::assertSame(0, $result);\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDayArray')]\n    public function testDayArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DAY({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerDayArray(): array\n    {\n        return [\n            'row vector' => [[[1, 12, 22]], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}'],\n            'column vector' => [[[1], [3], [6]], '{\"2022-01-01\"; \"2022-01-03\"; \"2022-01-06\"}'],\n            'matrix' => [[[1, 10], [15, 31]], '{\"2022-01-01\", \"2022-01-10\"; \"2022-08-15\", \"2022-12-31\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTime;\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Days;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Days360;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Days360Test extends TestCase\n{\n    #[DataProvider('providerDAYS360')]\n    public function testDirectCallToDAYS360(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Days360::between(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDAYS360')]\n    public function testDAYS360AsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DAYS360({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDAYS360')]\n    public function testDAYS360InWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DAYS360({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDAYS360(): array\n    {\n        return require 'tests/data/Calculation/DateTime/DAYS360.php';\n    }\n\n    #[DataProvider('providerUnhappyDAYS360')]\n    public function testDAYS360UnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DAYS360({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyDAYS360(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DAYS360() function'],\n        ];\n    }\n\n    public function testDateObject(): void\n    {\n        $obj1 = new DateTime('2000-3-31');\n        $obj2 = new DateTimeImmutable('2000-2-29');\n        self::assertSame(31, Days::between($obj1, $obj2));\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDays360Array')]\n    public function testDays360Array(array $expectedResult, string $startDate, string $endDate, ?string $methods): void\n    {\n        $calculation = Calculation::getInstance();\n\n        if ($methods === null) {\n            $formula = \"=DAYS360({$startDate}, {$endDate})\";\n        } else {\n            $formula = \"=DAYS360({$startDate}, {$endDate}, {$methods})\";\n        }\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerDays360Array(): array\n    {\n        return [\n            'row vector #1' => [[[360, 199, -201]], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}', '\"2022-12-31\"', null],\n            'column vector #1' => [[[360], [358], [355]], '{\"2022-01-01\"; \"2022-01-03\"; \"2022-01-06\"}', '\"2022-12-31\"', null],\n            'matrix #1' => [[[0, -9], [-224, -360]], '{\"2022-01-01\", \"2022-01-10\"; \"2022-08-15\", \"2022-12-31\"}', '\"2021-12-31\"', null],\n            'column vector with methods' => [[[360, 359], [358, 357], [355, 354]], '{\"2022-01-01\"; \"2022-01-03\"; \"2022-01-06\"}', '\"2022-12-31\"', '{FALSE, TRUE}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTime;\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Days;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DaysTest extends TestCase\n{\n    #[DataProvider('providerDAYS')]\n    public function testDirectCallToDAYS(int|string $expectedResult, int|string $date1, int|string $date2): void\n    {\n        $result = Days::between($date1, $date2);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDAYS')]\n    public function testDAYSAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DAYS({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDAYS')]\n    public function testDAYSInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DAYS({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDAYS(): array\n    {\n        return require 'tests/data/Calculation/DateTime/DAYS.php';\n    }\n\n    #[DataProvider('providerUnhappyDAYS')]\n    public function testDAYSUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DAYS({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyDAYS(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DAYS() function', '2023-04-01'],\n        ];\n    }\n\n    public function testDateObject(): void\n    {\n        $obj1 = new DateTime('2000-3-31');\n        $obj2 = new DateTimeImmutable('2000-2-29');\n        self::assertSame(31, Days::between($obj1, $obj2));\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDaysArray')]\n    public function testDaysArray(array $expectedResult, string $startDate, string $endDate): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DAYS({$startDate}, {$endDate})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerDaysArray(): array\n    {\n        return [\n            'row vector #1' => [[[-364, -202, 203]], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}', '\"2022-12-31\"'],\n            'column vector #1' => [[[-364], [-362], [-359]], '{\"2022-01-01\"; \"2022-01-03\"; \"2022-01-06\"}', '\"2022-12-31\"'],\n            'matrix #1' => [[[1, 10], [227, 365]], '{\"2022-01-01\", \"2022-01-10\"; \"2022-08-15\", \"2022-12-31\"}', '\"2021-12-31\"'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Month;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass EDateTest extends TestCase\n{\n    private string $returnDateType;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->returnDateType = Functions::getReturnDateType();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        Functions::setReturnDateType($this->returnDateType);\n    }\n\n    #[DataProvider('providerEDATE')]\n    public function testDirectCallToEDATE(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Month::adjust(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerEDATE')]\n    public function testEDATEAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=EDATE({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerEDATE')]\n    public function testEDATEInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=EDATE({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerEDATE(): array\n    {\n        return require 'tests/data/Calculation/DateTime/EDATE.php';\n    }\n\n    #[DataProvider('providerUnhappyEDATE')]\n    public function testEDATEUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=EDATE({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyEDATE(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for EDATE() function', null],\n            ['Formula Error: Wrong number of arguments for EDATE() function', 22669],\n        ];\n    }\n\n    public function testEDATEtoUnixTimestamp(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_UNIX_TIMESTAMP);\n\n        $result = Month::adjust('2012-1-26', -1);\n        self::assertEquals(1324857600, $result);\n        self::assertEqualsWithDelta(1324857600, $result, 1E-8);\n    }\n\n    public function testEDATEtoDateTimeObject(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_PHP_DATETIME_OBJECT);\n\n        $result = Month::adjust('2012-1-26', -1);\n        //    Must return an object...\n        //    ... of the correct type\n        self::assertInstanceOf(DateTimeInterface::class, $result);\n        //    ... with the correct value\n        self::assertEquals($result->format('d-M-Y'), '26-Dec-2011');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerEDateArray')]\n    public function testEDateArray(array $expectedResult, string $dateValues, string $methods): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=EDATE({$dateValues}, {$methods})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerEDateArray(): array\n    {\n        return [\n            'row vector #1' => [[[44593, 44632, 45337]], '{\"2022-01-01\", \"2022-02-12\", \"2024-01-15\"}', '1'],\n            'column vector #1' => [[[44593], [44632], [45337]], '{\"2022-01-01\"; \"2022-02-12\"; \"2024-01-15\"}', '1'],\n            'matrix #1' => [[[44593, 44632], [44652, 45343]], '{\"2022-01-01\", \"2022-02-12\"; \"2022-03-01\", \"2024-01-21\"}', '1'],\n            'row vector #2' => [[[44573, 44604, 44632]], '\"2022-02-12\"', '{-1, 0, 1}'],\n            'column vector #2' => [[[44573], [44604], [44632]], '\"2022-02-12\"', '{-1; 0; 1}'],\n            'matrix #2' => [[[44573, 44604], [44632, 45334]], '\"2022-02-12\"', '{-1, 0; 1, 24}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Month;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass EoMonthTest extends TestCase\n{\n    private string $returnDateType;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->returnDateType = Functions::getReturnDateType();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        Functions::setReturnDateType($this->returnDateType);\n    }\n\n    #[DataProvider('providerEOMONTH')]\n    public function testDirectCallToEOMONTH(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Month::lastDay(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerEOMONTH')]\n    public function testEOMONTHAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=EOMONTH({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerEOMONTH')]\n    public function testEOMONTHInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=EOMONTH({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerEOMONTH(): array\n    {\n        return require 'tests/data/Calculation/DateTime/EOMONTH.php';\n    }\n\n    #[DataProvider('providerUnhappyEOMONTH')]\n    public function testEOMONTHUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=EOMONTH({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyEOMONTH(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for EOMONTH() function'],\n            ['Formula Error: Wrong number of arguments for EOMONTH() function', 22669],\n        ];\n    }\n\n    public function testEOMONTHtoUnixTimestamp(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_UNIX_TIMESTAMP);\n\n        $result = Month::lastDay('2012-1-26', -1);\n        self::assertEquals(1325289600, $result);\n    }\n\n    public function testEOMONTHtoDateTimeObject(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_PHP_DATETIME_OBJECT);\n\n        $result = Month::lastDay('2012-1-26', -1);\n        //    Must return an object...\n        //    ... of the correct type\n        self::assertInstanceOf(DateTimeInterface::class, $result);\n        //    ... with the correct value\n        self::assertSame($result->format('d-M-Y'), '31-Dec-2011');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerEoMonthArray')]\n    public function testEoMonthArray(array $expectedResult, string $dateValues, string $methods): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=EOMONTH({$dateValues}, {$methods})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerEoMonthArray(): array\n    {\n        return [\n            'row vector #1' => [[[44620, 44651, 45351]], '{\"2022-01-01\", \"2022-02-12\", \"2024-01-15\"}', '1'],\n            'column vector #1' => [[[44620], [44651], [45351]], '{\"2022-01-01\"; \"2022-02-12\"; \"2024-01-15\"}', '1'],\n            'matrix #1' => [[[44620, 44651], [44681, 45351]], '{\"2022-01-01\", \"2022-02-12\"; \"2022-03-01\", \"2024-01-21\"}', '1'],\n            'row vector #2' => [[[44592, 44620, 44651]], '\"2022-02-12\"', '{-1, 0, 1}'],\n            'column vector #2' => [[[44592], [44620], [44651]], '\"2022-02-12\"', '{-1; 0; 1}'],\n            'matrix #2' => [[[44592, 44620], [44651, 45351]], '\"2022-02-12\"', '{-1, 0; 1, 24}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HelpersTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Helpers;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HelpersTest extends TestCase\n{\n    public function testGetDateValueBadObject(): void\n    {\n        $this->expectException(CalcExp::class);\n        $this->expectExceptionMessage('#VALUE!');\n        Helpers::getDateValue($this);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HourTest extends TestCase\n{\n    #[DataProvider('providerHOUR')]\n    public function testDirectCallToHOUR(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = TimeParts::hour(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerHOUR')]\n    public function testHOURAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=HOUR({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerHOUR')]\n    public function testHOURInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=HOUR({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerHOUR(): array\n    {\n        return require 'tests/data/Calculation/DateTime/HOUR.php';\n    }\n\n    #[DataProvider('providerUnhappyHOUR')]\n    public function testHOURUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=HOUR({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyHOUR(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for HOUR() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerHourArray')]\n    public function testHourArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=HOUR({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerHourArray(): array\n    {\n        return [\n            'row vector' => [[[1, 13, 19]], '{\"2022-02-09 01:02:03\", \"2022-02-09 13:14:15\", \"2022-02-09 19:20:21\"}'],\n            'column vector' => [[[1], [13], [19]], '{\"2022-02-09 01:02:03\"; \"2022-02-09 13:14:15\"; \"2022-02-09 19:20:21\"}'],\n            'matrix' => [[[1, 13], [19, 23]], '{\"2022-02-09 01:02:03\", \"2022-02-09 13:14:15\"; \"2022-02-09 19:20:21\", \"1999-12-31 23:59:59\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsoWeekNumTest extends TestCase\n{\n    private int $excelCalendar;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->excelCalendar = SharedDate::getExcelCalendar();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        SharedDate::setExcelCalendar($this->excelCalendar);\n    }\n\n    #[DataProvider('providerISOWEEKNUM')]\n    public function testDirectCallToISOWEEKNUM(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Week::isoWeekNumber(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerISOWEEKNUM')]\n    public function testISOWEEKNUMAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=ISOWEEKNUM({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerISOWEEKNUM')]\n    public function testISOWEEKNUMInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=ISOWEEKNUM({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerISOWEEKNUM(): array\n    {\n        return require 'tests/data/Calculation/DateTime/ISOWEEKNUM.php';\n    }\n\n    #[DataProvider('providerUnhappyISOWEEKNUM')]\n    public function testISOWEEKNUMUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=ISOWEEKNUM({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyISOWEEKNUM(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for ISOWEEKNUM() function', 2023, 3],\n        ];\n    }\n\n    #[DataProvider('providerISOWEEKNUM1904')]\n    public function testISOWEEKNUMWith1904Calendar(mixed $expectedResult, mixed ...$args): void\n    {\n        SharedDate::setExcelCalendar(SharedDate::CALENDAR_MAC_1904);\n\n        $result = Week::isoWeekNumber(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerISOWEEKNUM1904(): array\n    {\n        return require 'tests/data/Calculation/DateTime/ISOWEEKNUM1904.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerIsoWeekNumArray')]\n    public function testIsoWeekNumArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISOWEEKNUM({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerIsoWeekNumArray(): array\n    {\n        return [\n            'row vector' => [[[52, 23, 29]], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}'],\n            'column vector' => [[[52], [13], [26]], '{\"2023-01-01\"; \"2023-04-01\"; \"2023-07-01\"}'],\n            'matrix' => [[[53, 52], [52, 52]], '{\"2021-01-01\", \"2021-12-31\"; \"2023-01-01\", \"2023-12-31\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MinuteTest extends TestCase\n{\n    #[DataProvider('providerMINUTE')]\n    public function testDirectCallToMINUTE(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = TimeParts::MINUTE(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerMINUTE')]\n    public function testMINUTEAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=MINUTE({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerMINUTE')]\n    public function testMINUTEInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=MINUTE({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerMINUTE(): array\n    {\n        return require 'tests/data/Calculation/DateTime/MINUTE.php';\n    }\n\n    #[DataProvider('providerUnhappyMINUTE')]\n    public function testMINUTEUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=MINUTE({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyMINUTE(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for MINUTE() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerMinuteArray')]\n    public function testMinuteArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=MINUTE({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerMinuteArray(): array\n    {\n        return [\n            'row vector' => [[[2, 14, 20]], '{\"2022-02-09 01:02:03\", \"2022-02-09 13:14:15\", \"2022-02-09 19:20:21\"}'],\n            'column vector' => [[[2], [14], [20]], '{\"2022-02-09 01:02:03\"; \"2022-02-09 13:14:15\"; \"2022-02-09 19:20:21\"}'],\n            'matrix' => [[[2, 14], [20, 59]], '{\"2022-02-09 01:02:03\", \"2022-02-09 13:14:15\"; \"2022-02-09 19:20:21\", \"1999-12-31 23:59:59\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MonthTest extends TestCase\n{\n    #[DataProvider('providerMONTH')]\n    public function testDirectCallToMONTH(mixed $expectedResultExcel, mixed ...$args): void\n    {\n        $result = DateParts::month(...$args);\n        self::assertSame($expectedResultExcel, $result);\n    }\n\n    #[DataProvider('providerMONTH')]\n    public function testMONTHAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=MONTH({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerMONTH')]\n    public function testMONTHInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=MONTH({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerMONTH(): array\n    {\n        return require 'tests/data/Calculation/DateTime/MONTH.php';\n    }\n\n    #[DataProvider('providerUnhappyMONTH')]\n    public function testMONTHUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=MONTH({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyMONTH(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for MONTH() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerMonthArray')]\n    public function testMonthArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=MONTH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerMonthArray(): array\n    {\n        return [\n            'row vector' => [[[1, 6, 1]], '{\"2022-01-01\", \"2022-06-01\", \"2023-01-01\"}'],\n            'column vector' => [[[1], [3], [6]], '{\"2022-01-01\"; \"2022-03-01\"; \"2022-06-01\"}'],\n            'matrix' => [[[1, 4], [8, 12]], '{\"2022-01-01\", \"2022-04-01\"; \"2022-08-01\", \"2022-12-01\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\NetworkDays;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NetworkDaysTest extends TestCase\n{\n    #[DataProvider('providerNETWORKDAYS')]\n    public function testDirectCallToNETWORKDAYS(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = NetworkDays::count(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerNETWORKDAYS')]\n    public function testNETWORKDAYSAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=NETWORKDAYS({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerNETWORKDAYS')]\n    public function testNETWORKDAYSInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=NETWORKDAYS({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerNETWORKDAYS(): array\n    {\n        return require 'tests/data/Calculation/DateTime/NETWORKDAYS.php';\n    }\n\n    #[DataProvider('providerUnhappyNETWORKDAYS')]\n    public function testNETWORKDAYSUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=NETWORKDAYS({$argumentCells})\";\n\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Calculation\\Exception::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyNETWORKDAYS(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for NETWORKDAYS() function'],\n            ['Formula Error: Wrong number of arguments for NETWORKDAYS() function', '2001-01-01'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerNetWorkDaysArray')]\n    public function testNetWorkDaysArray(array $expectedResult, string $startDate, string $endDays, ?string $holidays): void\n    {\n        $calculation = Calculation::getInstance();\n\n        if ($holidays === null) {\n            $formula = \"=NETWORKDAYS({$startDate}, {$endDays})\";\n        } else {\n            $formula = \"=NETWORKDAYS({$startDate}, {$endDays}, {$holidays})\";\n        }\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerNetWorkDaysArray(): array\n    {\n        return [\n            'row vector #1' => [[[234, 233, 232]], '{\"2022-02-01\", \"2022-02-02\", \"2022-02-03\"}', '\"2022-12-25\"', null],\n            'column vector #1' => [[[234], [233], [232]], '{\"2022-02-01\"; \"2022-02-02\"; \"2022-02-03\"}', '\"2022-12-25\"', null],\n            'matrix #1' => [[[234, 233], [232, 231]], '{\"2022-02-01\", \"2022-02-02\"; \"2022-02-03\", \"2022-02-04\"}', '\"2022-12-25\"', null],\n            'row vector #2' => [[[234, -27]], '\"2022-02-01\"', '{\"2022-12-25\", \"2021-12-25\"}', null],\n            'column vector #2' => [[[234], [-27]], '\"2022-02-01\"', '{\"2022-12-25\"; \"2021-12-25\"}', null],\n            'row vector with Holiday' => [[[233, -27]], '\"2022-02-01\"', '{\"2022-12-25\", \"2021-12-25\"}', '{\"2022-02-02\"}'],\n            'row vector with Holidays' => [[[232, -27]], '\"2022-02-01\"', '{\"2022-12-25\", \"2021-12-25\"}', '{\"2022-02-02\", \"2022-02-03\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Current;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NowTest extends TestCase\n{\n    private function assertions(DateTimeImmutable $dtStart, mixed $result): void\n    {\n        self::assertEquals($dtStart->format('Y'), DateParts::year($result));\n        self::assertEquals($dtStart->format('m'), DateParts::month($result));\n        self::assertEquals($dtStart->format('d'), DateParts::day($result));\n        self::assertEquals($dtStart->format('H'), TimeParts::hour($result));\n        self::assertEquals($dtStart->format('i'), TimeParts::minute($result));\n        self::assertEquals($dtStart->format('s'), TimeParts::second($result));\n    }\n\n    public function testDirectCallToNow(): void\n    {\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same second.\n        do {\n            $dtStart = new DateTimeImmutable();\n            $startSecond = $dtStart->format('s');\n            $result = Current::now();\n            $endSecond = (new DateTimeImmutable('now'))->format('s');\n        } while ($startSecond !== $endSecond);\n\n        $this->assertions($dtStart, $result);\n    }\n\n    public function testNowAsFormula(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=NOW()';\n\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same second.\n        do {\n            $dtStart = new DateTimeImmutable();\n            $startSecond = $dtStart->format('s');\n            $result = $calculation->calculateFormula($formula);\n            $endSecond = (new DateTimeImmutable('now'))->format('s');\n        } while ($startSecond !== $endSecond);\n\n        $this->assertions($dtStart, $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SecondTest extends TestCase\n{\n    #[DataProvider('providerSECOND')]\n    public function testDirectCallToSECOND(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = TimeParts::second(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerSECOND')]\n    public function testSECONDAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=SECOND({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerSECOND')]\n    public function testSECONDInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=SECOND({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerSECOND(): array\n    {\n        return require 'tests/data/Calculation/DateTime/SECOND.php';\n    }\n\n    #[DataProvider('providerUnhappySECOND')]\n    public function testSECONDUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=SECOND({$argumentCells})\";\n\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Calculation\\Exception::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappySECOND(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for SECOND() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerSecondArray')]\n    public function testSecondArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SECOND({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerSecondArray(): array\n    {\n        return [\n            'row vector' => [[[3, 15, 21]], '{\"2022-02-09 01:02:03\", \"2022-02-09 13:14:15\", \"2022-02-09 19:20:21\"}'],\n            'column vector' => [[[3], [15], [21]], '{\"2022-02-09 01:02:03\"; \"2022-02-09 13:14:15\"; \"2022-02-09 19:20:21\"}'],\n            'matrix' => [[[3, 15], [21, 59]], '{\"2022-02-09 01:02:03\", \"2022-02-09 13:14:15\"; \"2022-02-09 19:20:21\", \"1999-12-31 23:59:59\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Time;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TimeTest extends TestCase\n{\n    private int $excelCalendar;\n\n    private string $returnDateType;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->excelCalendar = SharedDate::getExcelCalendar();\n        $this->returnDateType = Functions::getReturnDateType();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        SharedDate::setExcelCalendar($this->excelCalendar);\n        Functions::setReturnDateType($this->returnDateType);\n    }\n\n    #[DataProvider('providerTIME')]\n    public function testDirectCallToTIME(float|string $expectedResult, int|string $hour, bool|int $minute, int $second): void\n    {\n        $result = Time::fromHMS($hour, $minute, $second);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    #[DataProvider('providerTIME')]\n    public function testTIMEAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=TIME({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerTIME(): array\n    {\n        return require 'tests/data/Calculation/DateTime/TIME.php';\n    }\n\n    #[DataProvider('providerUnhappyTIME')]\n    public function testTIMEUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=TIME({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyTIME(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for TIME() function', 2023, 3],\n        ];\n    }\n\n    public function testTIMEtoUnixTimestamp(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_UNIX_TIMESTAMP);\n\n        $result = Time::fromHMS(7, 30, 20);\n        self::assertEqualsWithDelta(27020, $result, 1E-12);\n    }\n\n    public function testTIMEtoDateTimeObject(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_PHP_DATETIME_OBJECT);\n\n        $result = Time::fromHMS(7, 30, 20);\n        //    Must return an object...\n        //    ... of the correct type\n        self::assertInstanceOf(DateTimeInterface::class, $result);\n        //    ... with the correct value\n        self::assertEquals($result->format('H:i:s'), '07:30:20');\n    }\n\n    public function testTIMEWith1904Calendar(): void\n    {\n        SharedDate::setExcelCalendar(SharedDate::CALENDAR_MAC_1904);\n\n        $result = Time::fromHMS(0, 0, 0);\n        self::assertEquals(0, $result);\n    }\n\n    public function testTIME1900(): void\n    {\n        $result = Time::fromHMS(0, 0, 0);\n        self::assertEquals(0, $result);\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerTimeArray')]\n    public function testTimeArray(array $expectedResult, string $hour, string $minute, string $second): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TIME({$hour}, {$minute}, {$second})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerTimeArray(): array\n    {\n        return [\n            'row vector hour' => [[[0.250706018518519, 0.50070601851852, 0.75070601851852]], '{6,12,18}', '1', '1'],\n            'column vector hour' => [[[0.250706018518519], [0.50070601851852], [0.75070601851852]], '{6;12;18}', '1', '1'],\n            'matrix hour' => [[[0.250706018518519, 0.50070601851852], [0.75070601851852, 0.95903935185185]], '{6,12;18,23}', '1', '1'],\n            'row vector minute' => [[[0.96667824074074, 0.97501157407407, 0.98334490740741, 0.99931712962963]], '23', '{12, 24, 36, 59}', '1'],\n            'column vector minute' => [[[0.96734953703704], [0.97568287037037], [0.98401620370370], [0.99998842592593]], '23', '{12; 24; 36; 59}', '59'],\n            'matrix minute' => [[[0.50833333333333, 0.51666666666667], [0.52083333333333, 0.5]], '12', '{12, 24; 30, 0}', '0'],\n            'row vector second' => [[[0.50069444444444, 0.50137731481481]], '12', '1', '{0,59}'],\n            'column vector second' => [[[0.99930555555556], [0.99998842592593]], '23', '59', '{0;59}'],\n            'vectors hour and minute' => [\n                [\n                    [0.87570601851852, 0.88473379629630, 0.89376157407407, 0.90626157407407],\n                    [0.91737268518519, 0.92640046296296, 0.93542824074074, 0.94792824074074],\n                    [0.95903935185185, 0.96806712962963, 0.97709490740741, 0.98959490740741],\n                ],\n                '{21;22;23}',\n                '{1, 14, 27, 45}',\n                '1',\n            ],\n            'vectors hour and second' => [\n                [\n                    [0.126041666666667, 0.126215277777778],\n                    [0.334375, 0.33454861111111],\n                    [0.584375, 0.58454861111111],\n                ],\n                '{3;8;14}',\n                '1',\n                '{30,45}',\n            ],\n            'vectors minute and second' => [\n                [\n                    [0.75833333333333, 0.75834490740741],\n                    [0.76041666666667, 0.76042824074074],\n                    [0.77083333333333, 0.77084490740741],\n                    [0.75, 0.750011574074074],\n                ],\n                '18',\n                '{12; 15; 30; 0}',\n                '{0,1}',\n            ],\n            'matrices hour and minute' => [\n                [\n                    [0.25070601851852, 0.50278935185185],\n                    [0.75487268518519, 0.96528935185185],\n                ],\n                '{6, 12; 18, 23}',\n                '{1, 4; 7, 10}',\n                '1',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerTimeArrayException')]\n    public function testTimeArrayException(string $hour, string $minute, string $second): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Formulae with more than two array arguments are not supported');\n\n        $formula = \"=TIME({$hour}, {$minute}, {$second})\";\n        $calculation->calculateFormula($formula);\n    }\n\n    public static function providerTimeArrayException(): array\n    {\n        return [\n            'matrix arguments with 3 array values' => [\n                '{6, 12; 16, 23}',\n                '{1, 4; 7, 10}',\n                '{0,1}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTimeInterface;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeValue;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TimeValueTest extends TestCase\n{\n    private string $returnDateType;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->returnDateType = Functions::getReturnDateType();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        Functions::setReturnDateType($this->returnDateType);\n    }\n\n    #[DataProvider('providerTIMEVALUE')]\n    public function testDirectCallToTIMEVALUE(int|float|string $expectedResult, bool|int|string $value): void\n    {\n        $result = TimeValue::fromString($value);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);\n    }\n\n    #[DataProvider('providerTIMEVALUE')]\n    public function testTIMEVALUEAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=TIMEVALUE({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);\n    }\n\n    #[DataProvider('providerTIMEVALUE')]\n    public function testTIMEVALUEInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=TIMEVALUE({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerTIMEVALUE(): array\n    {\n        return require 'tests/data/Calculation/DateTime/TIMEVALUE.php';\n    }\n\n    public function testRefArgNull(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=TIMEVALUE(B1)');\n        self::assertSame('#VALUE!', $sheet->getCell('A1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testTIMEVALUEtoUnixTimestamp(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_UNIX_TIMESTAMP);\n\n        $result = TimeValue::fromString('7:30:20');\n        self::assertEquals(23420, $result);\n        self::assertEqualsWithDelta(23420, $result, 1.0e-8);\n    }\n\n    public function testTIMEVALUEtoDateTimeObject(): void\n    {\n        Functions::setReturnDateType(Functions::RETURNDATE_PHP_DATETIME_OBJECT);\n\n        $result = TimeValue::fromString('7:30:20');\n        //    Must return an object...\n        //    ... of the correct type\n        self::assertInstanceOf(DateTimeInterface::class, $result);\n        //    ... with the correct value\n        self::assertEquals($result->format('H:i:s'), '07:30:20');\n    }\n\n    #[DataProvider('providerUnhappyTIMEVALUE')]\n    public function testTIMEVALUEUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=TIMEVALUE({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyTIMEVALUE(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for TIMEVALUE() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerTimeValueArray')]\n    public function testTimeValueArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TIMEVALUE({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerTimeValueArray(): array\n    {\n        return [\n            'row vector' => [[[0.04309027777777, 0.5515625, 0.80579861111111]], '{\"2022-02-09 01:02:03\", \"2022-02-09 13:14:15\", \"2022-02-09 19:20:21\"}'],\n            'column vector' => [[[0.04309027777777], [0.5515625], [0.80579861111111]], '{\"2022-02-09 01:02:03\"; \"2022-02-09 13:14:15\"; \"2022-02-09 19:20:21\"}'],\n            'matrix' => [[[0.04309027777777, 0.5515625], [0.80579861111111, 0.99998842592592]], '{\"2022-02-09 01:02:03\", \"2022-02-09 13:14:15\"; \"2022-02-09 19:20:21\", \"1999-12-31 23:59:59\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TodayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Current;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\TimeParts;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TodayTest extends TestCase\n{\n    private function assertions(DateTimeImmutable $dtStart, mixed $result): void\n    {\n        self::assertEquals($dtStart->format('Y'), DateParts::year($result));\n        self::assertEquals($dtStart->format('m'), DateParts::month($result));\n        self::assertEquals($dtStart->format('d'), DateParts::day($result));\n        self::assertEquals(0, TimeParts::hour($result));\n        self::assertEquals(0, TimeParts::minute($result));\n        self::assertEquals(0, TimeParts::second($result));\n    }\n\n    public function testDirectCallToToday(): void\n    {\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same second.\n        do {\n            $dtStart = new DateTimeImmutable();\n            $startSecond = $dtStart->format('s');\n            $result = Current::today();\n            $endSecond = (new DateTimeImmutable('now'))->format('s');\n        } while ($startSecond !== $endSecond);\n\n        $this->assertions($dtStart, $result);\n    }\n\n    public function testTodayAsFormula(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=TODAY()';\n\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same second.\n        do {\n            $dtStart = new DateTimeImmutable();\n            $startSecond = $dtStart->format('s');\n            $result = $calculation->calculateFormula($formula);\n            $endSecond = (new DateTimeImmutable('now'))->format('s');\n        } while ($startSecond !== $endSecond);\n\n        $this->assertions($dtStart, $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WeekDayTest extends TestCase\n{\n    private int $excelCalendar;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->excelCalendar = SharedDate::getExcelCalendar();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        SharedDate::setExcelCalendar($this->excelCalendar);\n    }\n\n    #[DataProvider('providerWEEKDAY')]\n    public function testDirectCallToWEEKDAY(int|string $expectedResult, bool|int|string $dateValue, null|int|string $style = null): void\n    {\n        $result = ($style === null) ? Week::day($dateValue) : Week::day($dateValue, $style);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerWEEKDAY')]\n    public function testWEEKDAYAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=WEEKDAY({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerWEEKDAY')]\n    public function testWEEKDAYInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=WEEKDAY({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerWEEKDAY(): array\n    {\n        return require 'tests/data/Calculation/DateTime/WEEKDAY.php';\n    }\n\n    #[DataProvider('providerUnhappyWEEKDAY')]\n    public function testWEEKDAYUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=WEEKDAY({$argumentCells})\";\n\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Calculation\\Exception::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyWEEKDAY(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for WEEKDAY() function'],\n        ];\n    }\n\n    public function testWEEKDAYWith1904Calendar(): void\n    {\n        SharedDate::setExcelCalendar(SharedDate::CALENDAR_MAC_1904);\n\n        self::assertEquals(7, Week::day('1904-01-02'));\n        self::assertEquals(6, Week::day('1904-01-01'));\n        self::assertEquals(6, Week::day(null));\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerWeekDayArray')]\n    public function testWeekDayArray(array $expectedResult, string $dateValues, string $styles): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=WEEKDAY({$dateValues}, {$styles})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerWeekDayArray(): array\n    {\n        return [\n            'row vector #1' => [[[7, 1, 7]], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}', '1'],\n            'column vector #1' => [[[1], [7], [7]], '{\"2023-01-01\"; \"2023-04-01\"; \"2023-07-01\"}', '1'],\n            'matrix #1' => [[[6, 6], [1, 1]], '{\"2021-01-01\", \"2021-12-31\"; \"2023-01-01\", \"2023-12-31\"}', '1'],\n            'row vector #2' => [[[7, 6]], '\"2022-01-01\"', '{1, 2}'],\n            'column vector #2' => [[[1], [7]], '\"2023-01-01\"', '{1; 2}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\Week;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date as SharedDate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WeekNumTest extends TestCase\n{\n    private int $excelCalendar;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->excelCalendar = SharedDate::getExcelCalendar();\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n\n        SharedDate::setExcelCalendar($this->excelCalendar);\n    }\n\n    #[DataProvider('providerWEEKNUM')]\n    public function testDirectCallToWEEKNUM(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Week::number(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerWEEKNUM')]\n    public function testWEEKNUMAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=WEEKNUM({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerWEEKNUM')]\n    public function testWEEKNUMInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=WEEKNUM({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerWEEKNUM(): array\n    {\n        return require 'tests/data/Calculation/DateTime/WEEKNUM.php';\n    }\n\n    #[DataProvider('providerUnhappyWEEKNUM')]\n    public function testWEEKNUMUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=WEEKNUM({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyWEEKNUM(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for WEEKNUM() function'],\n        ];\n    }\n\n    #[DataProvider('providerWEEKNUM1904')]\n    public function testWEEKNUMWith1904Calendar(mixed $expectedResult, mixed ...$args): void\n    {\n        SharedDate::setExcelCalendar(SharedDate::CALENDAR_MAC_1904);\n\n        $result = Week::number(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerWEEKNUM1904(): array\n    {\n        return require 'tests/data/Calculation/DateTime/WEEKNUM1904.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerWeekNumArray')]\n    public function testWeekNumArray(array $expectedResult, string $dateValues, string $methods): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=WEEKNUM({$dateValues}, {$methods})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerWeekNumArray(): array\n    {\n        return [\n            'row vector #1' => [[[1, 25, 29]], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}', '1'],\n            'column vector #1' => [[[1], [13], [26]], '{\"2023-01-01\"; \"2023-04-01\"; \"2023-07-01\"}', '1'],\n            'matrix #1' => [[[1, 53], [1, 53]], '{\"2021-01-01\", \"2021-12-31\"; \"2023-01-01\", \"2023-12-31\"}', '1'],\n            'row vector #2' => [[[25, 24]], '\"2022-06-12\"', '{1, 2}'],\n            'column vector #2' => [[[13], [14]], '\"2023-04-01\"', '{1; 2}'],\n            'matrix #2' => [[[53, 53], [53, 52]], '\"2021-12-31\"', '{1, 2; 16, 21}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\WorkDay;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WorkDayTest extends TestCase\n{\n    #[DataProvider('providerWORKDAY')]\n    public function testDirectCallToWORKDAY(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = WorkDay::date(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerWORKDAY')]\n    public function testWORKDAYAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=WORKDAY({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerWORKDAY')]\n    public function testWORKDAYInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=WORKDAY({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerWORKDAY(): array\n    {\n        return require 'tests/data/Calculation/DateTime/WORKDAY.php';\n    }\n\n    #[DataProvider('providerUnhappyWORKDAY')]\n    public function testWORKDAYUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=WORKDAY({$argumentCells})\";\n\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Calculation\\Exception::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyWORKDAY(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for WORKDAY() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerWorkDayArray')]\n    public function testWorkDayArray(array $expectedResult, string $startDate, string $endDays, ?string $holidays): void\n    {\n        $calculation = Calculation::getInstance();\n\n        if ($holidays === null) {\n            $formula = \"=WORKDAY({$startDate}, {$endDays})\";\n        } else {\n            $formula = \"=WORKDAY({$startDate}, {$endDays}, {$holidays})\";\n        }\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerWorkDayArray(): array\n    {\n        return [\n            'row vector #1' => [[[44595, 44596, 44599]], '{\"2022-02-01\", \"2022-02-02\", \"2022-02-03\"}', '2', null],\n            'column vector #1' => [[[44595], [44596], [44599]], '{\"2022-02-01\"; \"2022-02-02\"; \"2022-02-03\"}', '2', null],\n            'matrix #1' => [[[44595, 44596], [44599, 44600]], '{\"2022-02-01\", \"2022-02-02\"; \"2022-02-03\", \"2022-02-04\"}', '2', null],\n            'row vector #2' => [[[44595, 44596]], '\"2022-02-01\"', '{2, 3}', null],\n            'column vector #2' => [[[44595], [44596]], '\"2022-02-01\"', '{2; 3}', null],\n            'row vector with Holiday' => [[[44596, 44599]], '\"2022-02-01\"', '{2, 3}', '{\"2022-02-02\"}'],\n            'row vector with Holidays' => [[[44599, 44600]], '\"2022-02-01\"', '{2, 3}', '{\"2022-02-02\", \"2022-02-03\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\YearFrac;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass YearFracTest extends TestCase\n{\n    #[DataProvider('providerYEARFRAC')]\n    public function testDirectCallToYEARFRAC(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = YearFrac::fraction(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n    }\n\n    #[DataProvider('providerYEARFRAC')]\n    public function testYEARFRACAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=YEARFRAC({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n    }\n\n    #[DataProvider('providerYEARFRAC')]\n    public function testYEARFRACInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=YEARFRAC({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerYEARFRAC(): array\n    {\n        return require 'tests/data/Calculation/DateTime/YEARFRAC.php';\n    }\n\n    #[DataProvider('providerUnhappyYEARFRAC')]\n    public function testYEARFRACUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=YEARFRAC({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyYEARFRAC(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for YEARFRAC() function'],\n            ['Formula Error: Wrong number of arguments for YEARFRAC() function', '2023-03-09'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerYearFracArray')]\n    public function testYearFracArray(array $expectedResult, string $startDate, string $endDate, ?string $methods): void\n    {\n        $calculation = Calculation::getInstance();\n\n        if ($methods === null) {\n            $formula = \"=YEARFRAC({$startDate}, {$endDate})\";\n        } else {\n            $formula = \"=YEARFRAC({$startDate}, {$endDate}, {$methods})\";\n        }\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerYearFracArray(): array\n    {\n        return [\n            'row vector #1' => [[[1.0, 0.55277777777778, 0.56111111111111]], '{\"2022-01-01\", \"2022-06-12\", \"2023-07-22\"}', '\"2022-12-31\"', null],\n            'column vector #1' => [[[1.0], [0.99444444444445], [0.98611111111111]], '{\"2022-01-01\"; \"2022-01-03\"; \"2022-01-06\"}', '\"2022-12-31\"', null],\n            'matrix #1' => [[[0.002777777777778, 0.027777777777778], [0.625, 1.0]], '{\"2022-01-01\", \"2022-01-10\"; \"2022-08-15\", \"2022-12-31\"}', '\"2021-12-31\"', null],\n            'column vector with methods' => [[[0.99726027397260, 0.99722222222222], [0.99178082191781, 0.99166666666667], [0.98356164383562, 0.98333333333333]], '{\"2022-01-01\"; \"2022-01-03\"; \"2022-01-06\"}', '\"2022-12-31\"', '{1, 4}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\DateTime;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\DateTimeExcel\\DateParts;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass YearTest extends TestCase\n{\n    #[DataProvider('providerYEAR')]\n    public function testDirectCallToYEAR(mixed $expectedResultExcel, mixed ...$args): void\n    {\n        $result = DateParts::year(...$args);\n        self::assertSame($expectedResultExcel, $result);\n    }\n\n    #[DataProvider('providerYEAR')]\n    public function testYEARAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=YEAR({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerYEAR')]\n    public function testYEARInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=YEAR({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerYEAR(): array\n    {\n        return require 'tests/data/Calculation/DateTime/YEAR.php';\n    }\n\n    #[DataProvider('providerUnhappyYEAR')]\n    public function testYEARUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=YEAR({$argumentCells})\";\n\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Calculation\\Exception::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyYEAR(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for YEAR() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerYearArray')]\n    public function testYearArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=YEAR({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerYearArray(): array\n    {\n        return [\n            'row vector' => [[[2021, 2022, 2023]], '{\"2021-01-01\", \"2022-01-01\", \"2023-01-01\"}'],\n            'column vector' => [[[2021], [2022], [2023]], '{\"2021-01-01\"; \"2022-01-01\"; \"2023-01-01\"}'],\n            'matrix' => [[[2021, 2022], [2023, 1999]], '{\"2021-01-01\", \"2022-01-01\"; \"2023-01-01\", \"1999-12-31\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/AllSetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AllSetupTeardown extends TestCase\n{\n    private string $compatibilityMode;\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected static function setExcel(): void\n    {\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_EXCEL\n        );\n    }\n\n    protected static function setOpenOffice(): void\n    {\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n    }\n\n    protected static function setGnumeric(): void\n    {\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_GNUMERIC\n        );\n    }\n\n    protected function mightHaveException(mixed $expectedResult): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(CalcException::class);\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselITest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselI;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BesselITest extends TestCase\n{\n    const BESSEL_PRECISION = 1E-9;\n\n    #[DataProvider('providerBESSELI')]\n    public function testDirectCallToBESSELI(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = BesselI::besselI(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    #[DataProvider('providerBESSELI')]\n    public function testBESSELIAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BESSELI({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    #[DataProvider('providerBESSELI')]\n    public function testBESSELIInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BESSELI({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerBESSELI(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BESSELI.php';\n    }\n\n    #[DataProvider('providerUnhappyBESSELI')]\n    public function testBESSELIUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BESSELI({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyBESSELI(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BESSELI() function'],\n            ['Formula Error: Wrong number of arguments for BESSELI() function', 2023],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBesselIArray')]\n    public function testBesselIArray(array $expectedResult, string $value, string $ord): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BESSELI({$value}, {$ord})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    public static function providerBesselIArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [1.393725572000487, 1.0634833439946074, 1.0, 1.0156861326120836, 3.2898391723912908],\n                    [-0.7146779363262508, -0.25789430328903556, 0.0, 0.12597910862299733, 2.516716242025361],\n                    [0.20259567978255663, 0.031906148375295325, 0.0, 0.007853269593280343, 1.276466158815611],\n                ],\n                '{-1.2, -0.5, 0.0, 0.25, 2.5}',\n                '{0; 1; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselJTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselJ;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BesselJTest extends TestCase\n{\n    const BESSEL_PRECISION = 1E-8;\n\n    #[DataProvider('providerBESSELJ')]\n    public function testDirectCallToBESSELJ(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = BesselJ::besselJ(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    #[DataProvider('providerBESSELJ')]\n    public function testBESSELJAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BESSELJ({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    #[DataProvider('providerBESSELJ')]\n    public function testBESSELJInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BESSELJ({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerBESSELJ(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BESSELJ.php';\n    }\n\n    #[DataProvider('providerUnhappyBESSELJ')]\n    public function testBESSELJUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BESSELJ({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyBESSELJ(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BESSELJ() function'],\n            ['Formula Error: Wrong number of arguments for BESSELJ() function', 2023],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBesselJArray')]\n    public function testBesselJArray(array $expectedResult, string $value, string $ord): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BESSELJ({$value}, {$ord})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBesselJArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [0.6711327417644983, 0.9384698074235406, 1.00000000283141, 0.9844359313618615, -0.04838377582675685],\n                    [-0.4982890574931824, -0.24226845767957006, 0.0, 0.12402597733693042, 0.49709410250442176],\n                    [0.15934901834766313, 0.03060402345868265, 0.0, 0.007771889285962677, 0.44605905783029426],\n                ],\n                '{-1.2, -0.5, 0.0, 0.25, 2.5}',\n                '{0; 1; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselKTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselK;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BesselKTest extends TestCase\n{\n    const BESSEL_PRECISION = 1E-12;\n\n    #[DataProvider('providerBESSELK')]\n    public function testDirectCallToBESSELK(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = BesselK::besselK(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    #[DataProvider('providerBESSELK')]\n    public function testBESSELKAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BESSELK({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    #[DataProvider('providerBESSELK')]\n    public function testBESSELKInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BESSELK({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerBESSELK(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BESSELK.php';\n    }\n\n    #[DataProvider('providerUnhappyBESSELK')]\n    public function testBESSELKUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BESSELK({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyBESSELK(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BESSELK() function'],\n            ['Formula Error: Wrong number of arguments for BESSELK() function', 2023],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBesselKArray')]\n    public function testBesselKArray(array $expectedResult, string $value, string $ord): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BESSELK({$value}, {$ord})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBesselKArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [4.721244734980139, 1.5415067364690132, 0.9244190350213235, 0.2976030874538336, 0.06234755419101918],\n                    [99.97389411857176, 3.747025980669556, 1.6564411280110791, 0.4021240820149834, 0.07389081565026694],\n                    [19999.500068449335, 31.517714581825462, 7.5501835470656395, 0.9410016186778072, 0.12146020671123273],\n                ],\n                '{0.01, 0.25, 0.5, 1.25, 2.5}',\n                '{0; 1; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselYTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BesselY;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BesselYTest extends TestCase\n{\n    const BESSEL_PRECISION = 1E-12;\n\n    #[DataProvider('providerBESSELY')]\n    public function testDirectCallToBESSELY(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = BesselY::besselY(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    #[DataProvider('providerBESSELY')]\n    public function testBESSELYAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BESSELY({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n    }\n\n    #[DataProvider('providerBESSELY')]\n    public function testBESSELYInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BESSELY({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerBESSELY(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BESSELY.php';\n    }\n\n    #[DataProvider('providerUnhappyBESSELY')]\n    public function testBESSELYUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BESSELY({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyBESSELY(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BESSELY() function'],\n            ['Formula Error: Wrong number of arguments for BESSELY() function', 2023],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBesselYArray')]\n    public function testBesselYArray(array $expectedResult, string $value, string $ord): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BESSELY({$value}, {$ord})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBesselYArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [-3.005455650891885, -0.9315730314941618, -0.44451873376270784, 0.25821685699105446, 0.4980703584466886],\n                    [-63.67859624529592, -2.7041052277866418, -1.4714723918672943, -0.5843640364184131, 0.14591813750831284],\n                    [-12732.713793408293, -20.701268790798974, -5.441370833706469, -1.1931993152605154, -0.3813358484400383],\n                ],\n                '{0.01, 0.25, 0.5, 1.25, 2.5}',\n                '{0; 1; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2DecTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Bin2DecTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    #[DataProvider('providerBIN2DEC')]\n    public function testDirectCallToBIN2DEC(float|int|string $expectedResult, bool|int|string $arg1): void\n    {\n        $result = ConvertBinary::toDecimal($arg1);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBIN2DEC')]\n    public function testBIN2DECAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BIN2DEC({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBIN2DEC')]\n    public function testBIN2DECInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BIN2DEC({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerBIN2DEC(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BIN2DEC.php';\n    }\n\n    #[DataProvider('providerUnhappyBIN2DEC')]\n    public function testBIN2DECUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BIN2DEC({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyBIN2DEC(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BIN2DEC() function'],\n        ];\n    }\n\n    #[DataProvider('providerBIN2DECOds')]\n    public function testBIN2DECOds(float|int|string $expectedResult, bool $arg1): void\n    {\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n\n        $result = ConvertBinary::toDecimal($arg1);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBIN2DECOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BIN2DECOpenOffice.php';\n    }\n\n    public function testBIN2DECFractional(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=BIN2DEC(101.1)';\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_GNUMERIC\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(5, $result, 'Gnumeric');\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_EXCEL\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBin2DecArray')]\n    public function testBin2DecArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BIN2DEC({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBin2DecArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [[4, 7, 63, 153, 204, 341]],\n                '{\"100\", \"111\", \"111111\", \"10011001\", \"11001100\", \"101010101\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2HexTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Bin2HexTest extends AllSetupTeardown\n{\n    #[DataProvider('providerBIN2HEX')]\n    public function testDirectCallToBIN2HEX(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertBinary::toHex($value) : ConvertBinary::toHex($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBIN2HEX')]\n    public function testBIN2HEXAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BIN2HEX({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBIN2HEX')]\n    public function testBIN2HEXInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BIN2HEX({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBIN2HEX(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BIN2HEX.php';\n    }\n\n    #[DataProvider('providerUnhappyBIN2HEX')]\n    public function testBIN2HEXUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BIN2HEX({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyBIN2HEX(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BIN2HEX() function'],\n        ];\n    }\n\n    #[DataProvider('providerBIN2HEXOds')]\n    public function testBIN2HEXOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $this->setOpenOffice();\n        $result = ($digits === null) ? ConvertBinary::toHex($value) : ConvertBinary::toHex($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBIN2HEXOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BIN2HEXOpenOffice.php';\n    }\n\n    public function testBIN2HEXFractional(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=BIN2HEX(101.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('5', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBin2HexArray')]\n    public function testBin2HexArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BIN2HEX({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBin2HexArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['4', '7', '3F', '99', 'CC', '155']],\n                '{\"100\", \"111\", \"111111\", \"10011001\", \"11001100\", \"101010101\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2OctTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBinary;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Bin2OctTest extends AllSetupTeardown\n{\n    #[DataProvider('providerBIN2OCT')]\n    public function testDirectCallToBIN2OCT(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertBinary::toOctal($value) : ConvertBinary::toOctal($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBIN2OCT')]\n    public function testBIN2OCTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BIN2OCT({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBIN2OCT')]\n    public function testBIN2OCTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BIN2OCT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBIN2OCT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BIN2OCT.php';\n    }\n\n    #[DataProvider('providerUnhappyBIN2OCT')]\n    public function testBIN2OCTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BIN2OCT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyBIN2OCT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BIN2OCT() function'],\n        ];\n    }\n\n    #[DataProvider('providerBIN2OCTOds')]\n    public function testBIN2OCTOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $this->setOpenOffice();\n\n        $result = ($digits === null) ? ConvertBinary::toOctal($value) : ConvertBinary::toOctal($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBIN2OCTOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BIN2OCTOpenOffice.php';\n    }\n\n    public function testBIN2OCTFractional(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=BIN2OCT(101.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('5', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBin2OctArray')]\n    public function testBin2OctArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BIN2OCT({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBin2OctArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['4', '7', '77', '231', '314', '525']],\n                '{\"100\", \"111\", \"111111\", \"10011001\", \"11001100\", \"101010101\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitAndTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass BitAndTest extends AllSetupTeardown\n{\n    #[DataProvider('providerBITAND')]\n    public function testDirectCallToBITAND(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void\n    {\n        $result = BitWise::BITAND($arg1, $arg2);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITAND')]\n    public function testBITANDAsFormula(float|int|string $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BITAND({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITAND')]\n    public function testBITANDInWorksheet(float|int|string $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITAND({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBITAND(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BITAND.php';\n    }\n\n    #[DataProvider('providerUnhappyBITAND')]\n    public function testBITANDUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITAND({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyBITAND(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BITAND() function'],\n            ['Formula Error: Wrong number of arguments for BITAND() function', 1234],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBitAndArray')]\n    public function testBitAndArray(array $expectedResult, string $number1, string $number2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BITAND({$number1}, {$number2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBitAndArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [3, 0, 1],\n                    [4, 0, 0],\n                    [5, 0, 1],\n                ],\n                '{7, 8, 9}',\n                '{3; 4; 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitLShiftTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass BitLShiftTest extends AllSetupTeardown\n{\n    #[DataProvider('providerBITLSHIFT')]\n    public function testDirectCallToBITLSHIFT(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void\n    {\n        $result = BitWise::BITLSHIFT($arg1, $arg2);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITLSHIFT')]\n    public function testBITLSHIFTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BITLSHIFT({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITLSHIFT')]\n    public function testBITLSHIFTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITLSHIFT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBITLSHIFT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BITLSHIFT.php';\n    }\n\n    #[DataProvider('providerUnhappyBITLSHIFT')]\n    public function testBITLSHIFTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITLSHIFT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyBITLSHIFT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BITLSHIFT() function'],\n            ['Formula Error: Wrong number of arguments for BITLSHIFT() function', 1234],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBitLShiftArray')]\n    public function testBitLShiftArray(array $expectedResult, string $number, string $bits): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BITLSHIFT({$number}, {$bits})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBitLShiftArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [14, 28, 56, 112, 224],\n                    [16, 32, 64, 128, 256],\n                    [18, 36, 72, 144, 288],\n                ],\n                '{7; 8; 9}',\n                '{1, 2, 3, 4, 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitOrTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass BitOrTest extends AllSetupTeardown\n{\n    #[DataProvider('providerBITOR')]\n    public function testDirectCallToBITOR(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void\n    {\n        $result = BitWise::BITOR($arg1, $arg2);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITOR')]\n    public function testBITORAsFormula(float|int|string $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BITOR({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITOR')]\n    public function testBITORInWorksheet(float|int|string $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITOR({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBITOR(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BITOR.php';\n    }\n\n    #[DataProvider('providerUnhappyBITOR')]\n    public function testBITORUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITOR({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyBITOR(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BITOR() function'],\n            ['Formula Error: Wrong number of arguments for BITOR() function', 1234],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBitOrArray')]\n    public function testBitOrArray(array $expectedResult, string $number1, string $number2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BITOR({$number1}, {$number2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBitOrArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [7, 11, 11],\n                    [7, 12, 13],\n                    [7, 13, 13],\n                ],\n                '{7, 8, 9}',\n                '{3; 4; 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitRShiftTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass BitRShiftTest extends AllSetupTeardown\n{\n    #[DataProvider('providerBITRSHIFT')]\n    public function testDirectCallToBITRSHIFT(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void\n    {\n        $result = BitWise::BITRSHIFT($arg1, $arg2);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITRSHIFT')]\n    public function testBITRSHIFTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BITRSHIFT({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITRSHIFT')]\n    public function testBITRSHIFTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITRSHIFT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBITRSHIFT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BITRSHIFT.php';\n    }\n\n    #[DataProvider('providerUnhappyBITRSHIFT')]\n    public function testBITRSHIFTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITRSHIFT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyBITRSHIFT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BITRSHIFT() function'],\n            ['Formula Error: Wrong number of arguments for BITRSHIFT() function', 1234],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBitRShiftArray')]\n    public function testBitRShiftArray(array $expectedResult, string $number, string $bits): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BITRSHIFT({$number}, {$bits})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBitRShiftArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [31, 15, 7, 3, 1],\n                    [32, 16, 8, 4, 2],\n                    [37, 18, 9, 4, 2],\n                ],\n                '{63; 64; 75}',\n                '{1, 2, 3, 4, 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitXorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\BitWise;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass BitXorTest extends AllSetupTeardown\n{\n    #[DataProvider('providerBITXOR')]\n    public function testDirectCallToBITXOR(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void\n    {\n        $result = BitWise::BITXOR($arg1, $arg2);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITXOR')]\n    public function testBITXORAsFormula(float|int|string $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=BITXOR({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerBITXOR')]\n    public function testBITXORInWorksheet(float|int|string $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITXOR({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerBITXOR(): array\n    {\n        return require 'tests/data/Calculation/Engineering/BITXOR.php';\n    }\n\n    #[DataProvider('providerUnhappyBITXOR')]\n    public function testBITXORUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=BITXOR({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyBITXOR(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for BITXOR() function'],\n            ['Formula Error: Wrong number of arguments for BITXOR() function', 1234],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerBitXorArray')]\n    public function testBitXorArray(array $expectedResult, string $number1, string $number2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BITXOR({$number1}, {$number2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBitXorArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [4, 11, 10],\n                    [3, 12, 13],\n                    [2, 13, 12],\n                ],\n                '{7, 8, 9}',\n                '{3; 4; 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ComplexTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ComplexTest extends TestCase\n{\n    #[DataProvider('providerCOMPLEX')]\n    public function testDirectCallToCOMPLEX(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Complex::complex(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerCOMPLEX')]\n    public function testCOMPLEXAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=COMPLEX({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerCOMPLEX')]\n    public function testCOMPLEXInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=COMPLEX({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerCOMPLEX(): array\n    {\n        return require 'tests/data/Calculation/Engineering/COMPLEX.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerComplexArray')]\n    public function testComplexArray(array $expectedResult, string $real, string $imaginary): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=COMPLEX({$real}, {$imaginary})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerComplexArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-2.5-2.5i', '-1-2.5i', '-2.5i', '1-2.5i', '2.5-2.5i'],\n                    ['-2.5-i', '-1-i', '-i', '1-i', '2.5-i'],\n                    ['-2.5', '-1', '0.0', '1', '2.5'],\n                    ['-2.5+i', '-1+i', 'i', '1+i', '2.5+i'],\n                    ['-2.5+2.5i', '-1+2.5i', '2.5i', '1+2.5i', '2.5+2.5i'],\n                ],\n                '{-2.5, -1, 0, 1, 2.5}',\n                '{-2.5; -1; 0; 1; 2.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ConvertUoMTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertUOM;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ConvertUoMTest extends AllSetupTeardown\n{\n    const UOM_PRECISION = 1E-12;\n\n    public function testGetConversionGroups(): void\n    {\n        $result = ConvertUOM::getConversionCategories();\n        self::assertContains('Weight and Mass', $result);\n    }\n\n    public function testGetConversionGroupUnits(): void\n    {\n        $result = ConvertUOM::getConversionCategoryUnits();\n        self::assertArrayHasKey('Speed', $result);\n        self::assertContains('mph', $result['Speed']);\n    }\n\n    public function testGetConversionGroupUnitDetails(): void\n    {\n        $result = ConvertUOM::getConversionCategoryUnitDetails();\n        self::assertArrayHasKey('Information', $result);\n        self::assertContains(['unit' => 'byte', 'description' => 'Byte'], $result['Information']);\n    }\n\n    public function testGetConversionMultipliers(): void\n    {\n        $result = ConvertUOM::getConversionMultipliers();\n        self::assertArrayHasKey('k', $result);\n        self::assertSame(['multiplier' => 1000.0, 'name' => 'kilo'], $result['k']);\n    }\n\n    public function testGetBinaryConversionMultipliers(): void\n    {\n        $result = ConvertUOM::getBinaryConversionMultipliers();\n        self::assertArrayHasKey('ki', $result);\n        self::assertSame(['multiplier' => 1024, 'name' => 'kibi'], $result['ki']);\n    }\n\n    #[DataProvider('providerCONVERTUOM')]\n    public function testDirectCallToCONVERTUOM(float|int|string $expectedResult, float|int|string $value, string $from, string $to): void\n    {\n        $result = ConvertUOM::convert($value, $from, $to);\n        self::assertEqualsWithDelta($expectedResult, $result, self::UOM_PRECISION);\n    }\n\n    #[DataProvider('providerCONVERTUOM')]\n    public function testCONVERTUOMAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=CONVERT({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::UOM_PRECISION);\n    }\n\n    #[DataProvider('providerCONVERTUOM')]\n    public function testCONVERTUOMInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=CONVERT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::UOM_PRECISION);\n    }\n\n    /** @return mixed[] */\n    public static function providerCONVERTUOM(): array\n    {\n        /** @var mixed[] */\n        $return = require 'tests/data/Calculation/Engineering/CONVERTUOM.php';\n\n        return $return;\n    }\n\n    #[DataProvider('providerUnhappyCONVERTUOM')]\n    public function testCONVERTUOMUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=CONVERT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyCONVERTUOM(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for CONVERT() function'],\n            ['Formula Error: Wrong number of arguments for CONVERT() function', 12.34],\n            ['Formula Error: Wrong number of arguments for CONVERT() function', 12.34, 'kg'],\n        ];\n    }\n\n    /** @param float[][] $expectedResult */\n    #[DataProvider('providerConvertUoMArray')]\n    public function testConvertUoMArray(array $expectedResult, string $value, string $fromUoM, string $toUoM): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CONVERT({$value}, {$fromUoM}, {$toUoM})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::UOM_PRECISION);\n    }\n\n    /** @return mixed[] */\n    public static function providerConvertUoMArray(): array\n    {\n        return [\n            'Weight/Mass' => [\n                [\n                    [71.42857142857142, 0.15747304441777],\n                    [453.5923699999991, 1.0],\n                ],\n                '1000',\n                '{\"lbm\", \"g\"}',\n                '{\"stone\"; \"kg\"}',\n            ],\n            'Distance' => [\n                [\n                    [2025371.8285214372, 1093.6132983377101],\n                    [1851.9999999999984, 1.0],\n                ],\n                '1000',\n                '{\"Nmi\", \"m\"}',\n                '{\"yd\"; \"km\"}',\n            ],\n            'Volume' => [\n                [\n                    [2.976190476190475, 0.00628981077043211],\n                    [473.1764729999994, 1.0],\n                ],\n                '1000',\n                '{\"pt\", \"ml\"}',\n                '{\"barrel\"; \"l\"}',\n            ],\n            'Area' => [\n                [\n                    [999.9960000040016, 0.247104393046628],\n                    [404.6856422400005, 0.1],\n                ],\n                '1000',\n                '{\"uk_acre\", \"m2\"}',\n                '{\"us_acre\"; \"ha\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2BinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Dec2BinTest extends AllSetupTeardown\n{\n    #[DataProvider('providerDEC2BIN')]\n    public function testDirectCallToDEC2BIN(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertDecimal::toBinary($value) : ConvertDecimal::toBinary($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDEC2BIN')]\n    public function testDEC2BINAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DEC2BIN({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDEC2BIN')]\n    public function testDEC2BINInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DEC2BIN({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDEC2BIN(): array\n    {\n        return require 'tests/data/Calculation/Engineering/DEC2BIN.php';\n    }\n\n    #[DataProvider('providerUnhappyDEC2BIN')]\n    public function testDEC2BINUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DEC2BIN({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyDEC2BIN(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DEC2BIN() function'],\n        ];\n    }\n\n    #[DataProvider('providerDEC2BINOds')]\n    public function testDEC2BINOds(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void\n    {\n        $this->setOpenOffice();\n\n        $result = ($digits === null) ? ConvertDecimal::toBinary($value) : ConvertDecimal::toBinary($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDEC2BINOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/DEC2BINOpenOffice.php';\n    }\n\n    public function testDEC2BINFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=DEC2BIN(5.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('101', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('101', $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('101', $result, 'Excel');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDec2BinArray')]\n    public function testDec2BinArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DEC2BIN({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerDec2BinArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['100', '111', '111111', '10011001', '11001100', '101010101']],\n                '{4, 7, 63, 153, 204, 341}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2HexTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Dec2HexTest extends AllSetupTeardown\n{\n    #[DataProvider('providerDEC2HEX')]\n    public function testDirectCallToDEC2HEX(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertDecimal::toHex($value) : ConvertDecimal::toHex($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDEC2HEX')]\n    public function testDEC2HEXAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DEC2HEX({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDEC2HEX')]\n    public function testDEC2HEXInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DEC2HEX({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDEC2HEX(): array\n    {\n        return require 'tests/data/Calculation/Engineering/DEC2HEX.php';\n    }\n\n    #[DataProvider('providerUnhappyDEC2HEX')]\n    public function testDEC2HEXUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DEC2HEX({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyDEC2HEX(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DEC2HEX() function'],\n        ];\n    }\n\n    #[DataProvider('providerDEC2HEXOds')]\n    public function testDEC2HEXOds(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void\n    {\n        $this->setOpenOffice();\n\n        $result = ($digits === null) ? ConvertDecimal::toHex($value) : ConvertDecimal::toHex($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDEC2HEXOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/DEC2HEXOpenOffice.php';\n    }\n\n    public function testDEC2HEXFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=DEC2HEX(17.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('11', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('11', $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('11', $result, 'Excel');\n    }\n\n    public function test32bitHex(): void\n    {\n        self::assertEquals('A2DE246000', ConvertDecimal::hex32bit(-400000000000, 'DE246000', true));\n        self::assertEquals('7FFFFFFFFF', ConvertDecimal::hex32bit(549755813887, 'FFFFFFFF', true));\n        self::assertEquals('FFFFFFFFFF', ConvertDecimal::hex32bit(-1, 'FFFFFFFF', true));\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDec2HexArray')]\n    public function testDec2HexArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DEC2HEX({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerDec2HexArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['4', '7', '3F', '99', 'CC', '155']],\n                '{4, 7, 63, 153, 204, 341}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2OctTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertDecimal;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Dec2OctTest extends AllSetupTeardown\n{\n    #[DataProvider('providerDEC2OCT')]\n    public function testDirectCallToDEC2OCT(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertDecimal::toOctal($value) : ConvertDecimal::toOctal($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDEC2OCT')]\n    public function testDEC2OCTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DEC2OCT({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDEC2OCT')]\n    public function testDEC2OCTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DEC2OCT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDEC2OCT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/DEC2OCT.php';\n    }\n\n    #[DataProvider('providerUnhappyDEC2OCT')]\n    public function testDEC2OCTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DEC2OCT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyDEC2OCT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DEC2OCT() function'],\n        ];\n    }\n\n    #[DataProvider('providerDEC2OCTOds')]\n    public function testDEC2OCTOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $this->setOpenOffice();\n\n        $result = ($digits === null) ? ConvertDecimal::toOctal($value) : ConvertDecimal::toOctal($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDEC2OCTOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/DEC2OCTOpenOffice.php';\n    }\n\n    public function testDEC2OCTFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=DEC2OCT(17.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('21', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('21', $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('21', $result, 'Excel');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDec2OctArray')]\n    public function testDec2OctArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DEC2OCT({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerDec2OctArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['4', '7', '77', '231', '314', '525']],\n                '{4, 7, 63, 153, 204, 341}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/DeltaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Compare;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DeltaTest extends AllSetupTeardown\n{\n    #[DataProvider('providerDELTA')]\n    public function testDirectCallToDELTA(mixed $expectedResult, bool|float|int|string $arg1, null|bool|float|int|string $arg2 = null): void\n    {\n        $result = ($arg2 === null) ? Compare::delta($arg1) : Compare::delta($arg1, $arg2);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDELTA')]\n    public function testDELTAAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=DELTA({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerDELTA')]\n    public function testDELTAInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DELTA({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDELTA(): array\n    {\n        return require 'tests/data/Calculation/Engineering/DELTA.php';\n    }\n\n    #[DataProvider('providerUnhappyDELTA')]\n    public function testDELTAUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=DELTA({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyDELTA(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for DELTA() function'],\n        ];\n    }\n\n    #[DataProvider('providerDeltaArray')]\n    public function testDeltaArray(array $expectedResult, string $a, string $b): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DELTA({$a}, {$b})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerDeltaArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [1, 0, 0, 0, 0],\n                    [0, 1, 0, 0, 0],\n                    [0, 0, 1, 0, 0],\n                    [0, 0, 0, 1, 0],\n                    [0, 0, 0, 0, 1],\n                ],\n                '{-1.2, -0.5, 0.0, 0.25, 2.5}',\n                '{-1.2; -0.5; 0.0; 0.25; 2.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfCTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ErfC;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ErfCTest extends AllSetupTeardown\n{\n    const ERF_PRECISION = 1E-14;\n\n    #[DataProvider('providerERFC')]\n    public function testDirectCallToERFC(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = ErfC::ERFC(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    #[DataProvider('providerERFC')]\n    public function testERFCAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=ERFC({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    #[DataProvider('providerERFC')]\n    public function testERFCInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=ERFC({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    public static function providerERFC(): array\n    {\n        return require 'tests/data/Calculation/Engineering/ERFC.php';\n    }\n\n    #[DataProvider('providerUnhappyERFC')]\n    public function testERFCUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=ERFC({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyERFC(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for ERFC() function'],\n        ];\n    }\n\n    #[DataProvider('providerErfCArray')]\n    public function testErfCArray(array $expectedResult, string $lower): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ERFC({$lower})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    public static function providerErfCArray(): array\n    {\n        return [\n            'row vector' => [\n                [\n                    [1.9103139782296354, 1.5204998778130465, 1.0, 0.7236736098317631, 0.0004069520174449588],\n                ],\n                '{-1.2, -0.5, 0.0, 0.25, 2.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfPreciseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Erf;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ErfPreciseTest extends AllSetupTeardown\n{\n    const ERF_PRECISION = 1E-14;\n\n    #[DataProvider('providerERFPRECISE')]\n    public function testDirectCallToERFPRECISE(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Erf::ERFPRECISE(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    #[DataProvider('providerERFPRECISE')]\n    public function testERFPRECISEAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=ERF.PRECISE({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    #[DataProvider('providerERFPRECISE')]\n    public function testERFPRECISEInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=ERF.PRECISE({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    public static function providerERFPRECISE(): array\n    {\n        return require 'tests/data/Calculation/Engineering/ERFPRECISE.php';\n    }\n\n    #[DataProvider('providerErfPreciseArray')]\n    public function testErfPreciseArray(array $expectedResult, string $limit): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ERF.PRECISE({$limit})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    public static function providerErfPreciseArray(): array\n    {\n        return [\n            'row vector' => [\n                [\n                    [-0.9103139782296353, -0.5204998778130465, 0.0, 0.2763263901682369, 0.999593047982555],\n                ],\n                '{-1.2, -0.5, 0.0, 0.25, 2.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Erf;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ErfTest extends AllSetupTeardown\n{\n    const ERF_PRECISION = 1E-14;\n\n    #[DataProvider('providerERF')]\n    public function testDirectCallToERF(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Erf::erf(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    #[DataProvider('providerERF')]\n    public function testERFAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=ERF({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    #[DataProvider('providerERF')]\n    public function testERFInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=ERF({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    public static function providerERF(): array\n    {\n        return require 'tests/data/Calculation/Engineering/ERF.php';\n    }\n\n    #[DataProvider('providerUnhappyERF')]\n    public function testERFUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=ERF({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyERF(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for ERF() function'],\n        ];\n    }\n\n    #[DataProvider('providerErfArray')]\n    public function testErfArray(array $expectedResult, string $lower, string $upper = 'NULL'): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ERF({$lower}, {$upper})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);\n    }\n\n    public static function providerErfArray(): array\n    {\n        return [\n            'row vector' => [\n                [\n                    [-0.9103139782296353, -0.5204998778130465, 0.0, 0.2763263901682369, 0.999593047982555],\n                ],\n                '{-1.2, -0.5, 0.0, 0.25, 2.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/GeStepTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Compare;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass GeStepTest extends AllSetupTeardown\n{\n    #[DataProvider('providerGESTEP')]\n    public function testDirectCallToGESTEP(int|string $expectedResult, bool|float|int|string $arg1, null|bool|float|int|string $arg2 = null): void\n    {\n        $result = ($arg2 === null) ? Compare::geStep($arg1) : Compare::geStep($arg1, $arg2);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerGESTEP')]\n    public function testGESTEPAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=GESTEP({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerGESTEP')]\n    public function testGESTEPInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=GESTEP({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerGESTEP(): array\n    {\n        return require 'tests/data/Calculation/Engineering/GESTEP.php';\n    }\n\n    #[DataProvider('providerUnhappyGESTEP')]\n    public function testGESTEPUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=GESTEP({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyGESTEP(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for GESTEP() function'],\n        ];\n    }\n\n    #[DataProvider('providerGeStepArray')]\n    public function testGeStepArray(array $expectedResult, string $a, string $b): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=GESTEP({$a}, {$b})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerGeStepArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [1, 1, 1, 1, 1],\n                    [0, 1, 1, 1, 1],\n                    [0, 1, 1, 1, 0],\n                    [0, 1, 0, 1, 0],\n                    [0, 1, 0, 0, 0],\n                ],\n                '{-1.2, 2.5, 0.0, 0.25, -0.5}',\n                '{-1.2; -0.5; 0.0; 0.25; 2.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2BinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Hex2BinTest extends AllSetupTeardown\n{\n    #[DataProvider('providerHEX2BIN')]\n    public function testDirectCallToHEX2BIN(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertHex::toBinary($value) : ConvertHex::toBinary($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerHEX2BIN')]\n    public function testHEX2BINAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=HEX2BIN({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerHEX2BIN')]\n    public function testHEX2BINInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=HEX2BIN({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerHEX2BIN(): array\n    {\n        return require 'tests/data/Calculation/Engineering/HEX2BIN.php';\n    }\n\n    #[DataProvider('providerUnhappyHEX2BIN')]\n    public function testHEX2BINUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=HEX2BIN({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyHEX2BIN(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for HEX2BIN() function'],\n        ];\n    }\n\n    #[DataProvider('providerHEX2BINOds')]\n    public function testHEX2BINOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $this->setOpenOffice();\n\n        $result = ($digits === null) ? ConvertHex::toBinary($value) : ConvertHex::toBinary($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerHEX2BINOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/HEX2BINOpenOffice.php';\n    }\n\n    public function testHEX2BINFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=HEX2BIN(10.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('10000', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    #[DataProvider('providerHex2BinArray')]\n    public function testHex2BinArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=HEX2BIN({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerHex2BinArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['100', '111', '111111', '10011001', '11001100', '101010101']],\n                '{\"4\", \"7\", \"3F\", \"99\", \"CC\", \"155\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2DecTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Hex2DecTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    #[DataProvider('providerHEX2DEC')]\n    public function testDirectCallToHEX2DEC(mixed $expectedResult, bool|float|int|string $value): void\n    {\n        $result = ConvertHex::toDecimal($value);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerHEX2DEC')]\n    public function testHEX2DECAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=HEX2DEC({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerHEX2DEC')]\n    public function testHEX2DECInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=HEX2DEC({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerHEX2DEC(): array\n    {\n        return require 'tests/data/Calculation/Engineering/HEX2DEC.php';\n    }\n\n    #[DataProvider('providerUnhappyHEX2DEC')]\n    public function testHEX2DECUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=HEX2DEC({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyHEX2DEC(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for HEX2DEC() function'],\n        ];\n    }\n\n    #[DataProvider('providerHEX2DECOds')]\n    public function testHEX2DECOds(mixed $expectedResult, bool|float|int|string $value): void\n    {\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n\n        $result = ConvertHex::toDecimal($value);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerHEX2DECOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/HEX2DECOpenOffice.php';\n    }\n\n    public function testHEX2DECFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=HEX2DEC(10.1)';\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_GNUMERIC\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(16, $result, 'Gnumeric');\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_EXCEL\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    #[DataProvider('providerHex2DecArray')]\n    public function testHex2DecArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=HEX2DEC({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerHex2DecArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [[4, 7, 63, 153, 204, 341]],\n                '{\"4\", \"7\", \"3F\", \"99\", \"CC\", \"155\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2OctTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertHex;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Hex2OctTest extends AllSetupTeardown\n{\n    #[DataProvider('providerHEX2OCT')]\n    public function testDirectCallToHEX2OCT(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertHex::toOctal($value) : ConvertHex::toOctal($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerHEX2OCT')]\n    public function testHEX2OCTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=HEX2OCT({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerHEX2OCT')]\n    public function testHEX2OCTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=HEX2OCT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerHEX2OCT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/HEX2OCT.php';\n    }\n\n    #[DataProvider('providerUnhappyHEX2OCT')]\n    public function testHEX2OCTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=HEX2OCT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyHEX2OCT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for HEX2OCT() function'],\n        ];\n    }\n\n    #[DataProvider('providerHEX2OCTOds')]\n    public function testHEX2OCTOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $this->setOpenOffice();\n\n        $result = ($digits === null) ? ConvertHex::toOctal($value) : ConvertHex::toOctal($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerHEX2OCTOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/HEX2OCTOpenOffice.php';\n    }\n\n    public function testHEX2OCTFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=HEX2OCT(10.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('20', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    #[DataProvider('providerHex2OctArray')]\n    public function testHex2OctArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=HEX2OCT({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerHex2OctArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['4', '7', '77', '231', '314', '525']],\n                '{\"4\", \"7\", \"3F\", \"99\", \"CC\", \"155\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImAbsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImAbsTest extends AllSetupTeardown\n{\n    const COMPLEX_PRECISION = 1E-12;\n\n    #[DataProvider('providerIMABS')]\n    public function testDirectCallToIMABS(float|int|string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMABS($arg);\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    #[DataProvider('providerIMABS')]\n    public function testIMABSAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMABS({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    #[DataProvider('providerIMABS')]\n    public function testIMABSInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMABS({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    public static function providerIMABS(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMABS.php';\n    }\n\n    #[DataProvider('providerUnhappyIMABS')]\n    public function testIMABSUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMABS({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyIMABS(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMABS() function'],\n        ];\n    }\n\n    #[DataProvider('providerImAbsArray')]\n    public function testImAbsArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMABS({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImAbsArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [2.692582403567252, 2.5, 2.692582403567252],\n                    [1.4142135623730951, 1.0, 1.4142135623730951],\n                    [1.4142135623730951, 1.0, 1.4142135623730951],\n                    [2.692582403567252, 2.5, 2.692582403567252],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImArgumentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImArgumentTest extends AllSetupTeardown\n{\n    const COMPLEX_PRECISION = 1E-12;\n\n    #[DataProvider('providerIMARGUMENT')]\n    public function testDirectCallToIMARGUMENT(float|int|string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMARGUMENT($arg);\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    #[DataProvider('providerIMARGUMENT')]\n    public function testIMARGUMENTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMARGUMENT({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    #[DataProvider('providerIMARGUMENT')]\n    public function testIMARGUMENTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMARGUMENT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    public static function providerIMARGUMENT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMARGUMENT.php';\n    }\n\n    #[DataProvider('providerUnhappyIMARGUMENT')]\n    public function testIMARGUMENTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMARGUMENT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyIMARGUMENT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMARGUMENT() function'],\n        ];\n    }\n\n    public static function providerImArgumentArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [-1.9513027039072615, -1.5707963267948966, -1.1902899496825317],\n                    [-2.356194490192345, -1.5707963267948966, -0.7853981633974483],\n                    [2.356194490192345, 1.5707963267948966, 0.7853981633974483],\n                    [1.9513027039072615, 1.5707963267948966, 1.1902899496825317],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImConjugateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImConjugateTest extends ComplexAssert\n{\n    #[DataProvider('providerIMCONJUGATE')]\n    public function testDirectCallToIMCONJUGATE(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMCONJUGATE($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCONJUGATE')]\n    public function testIMCONJUGATEAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMCONJUGATE({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCONJUGATE')]\n    public function testIMCONJUGATEInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCONJUGATE({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMCONJUGATE(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMCONJUGATE.php';\n    }\n\n    #[DataProvider('providerUnhappyIMCONJUGATE')]\n    public function testIMCONJUGATEUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCONJUGATE({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMCONJUGATE(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMCONJUGATE() function'],\n        ];\n    }\n\n    #[DataProvider('providerImConjugateArray')]\n    public function testImConjugateArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMCONJUGATE({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImConjugateArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-1+2.5i', '2.5i', '1+2.5i'],\n                    ['-1+i', 'i', '1+i'],\n                    ['-1-i', '-i', '1-i'],\n                    ['-1-2.5i', '-2.5i', '1-2.5i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCosTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImCosTest extends ComplexAssert\n{\n    #[DataProvider('providerIMCOS')]\n    public function testDirectCallToIMCOS(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMCOS($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCOS')]\n    public function testIMCOSAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMCOS({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCOS')]\n    public function testIMCOSInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCOS({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMCOS(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMCOS.php';\n    }\n\n    #[DataProvider('providerUnhappyIMCOS')]\n    public function testIMCOSUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCOS({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMCOS(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMCOS() function'],\n        ];\n    }\n\n    #[DataProvider('providerImCosArray')]\n    public function testImCosArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMCOS({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImCosArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['3.3132901461132-5.0910715229497i', 6.1322894796637, '3.3132901461132+5.0910715229497i'],\n                    ['0.83373002513115-0.98889770576287i', 1.5430806348152, '0.83373002513115+0.98889770576287i'],\n                    ['0.83373002513115+0.98889770576287i', 1.5430806348152, '0.83373002513115-0.98889770576287i'],\n                    ['3.3132901461132+5.0910715229497i', 6.1322894796637, '3.3132901461132-5.0910715229497i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCoshTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImCoshTest extends ComplexAssert\n{\n    #[DataProvider('providerIMCOSH')]\n    public function testDirectCallToIMCOSH(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMCOSH($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCOSH')]\n    public function testIMCOSHAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMCOSH({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCOSH')]\n    public function testIMCOSHInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCOSH({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMCOSH(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMCOSH.php';\n    }\n\n    #[DataProvider('providerUnhappyIMCOSH')]\n    public function testIMCOSHUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCOSH({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMCOSH(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMCOSH() function'],\n        ];\n    }\n\n    #[DataProvider('providerImCoshArray')]\n    public function testImCoshArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMCOSH({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImCoshArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-1.2362291988563+0.70332517811353i', -0.80114361554693, '-1.2362291988563-0.70332517811353i'],\n                    ['0.83373002513115+0.98889770576287i', 0.54030230586814, '0.83373002513115-0.98889770576287i'],\n                    ['0.83373002513115-0.98889770576287i', 0.54030230586814, '0.83373002513115+0.98889770576287i'],\n                    ['-1.2362291988563-0.70332517811353i', -0.80114361554693, '-1.2362291988563+0.70332517811353i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCotTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImCotTest extends ComplexAssert\n{\n    #[DataProvider('providerIMCOT')]\n    public function testDirectCallToIMCOT(float|string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMCOT($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCOT')]\n    public function testIMCOTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMCOT({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCOT')]\n    public function testIMCOTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCOT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMCOT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMCOT.php';\n    }\n\n    #[DataProvider('providerUnhappyIMCOT')]\n    public function testIMCOTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCOT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMCOT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMCOT() function'],\n        ];\n    }\n\n    #[DataProvider('providerImCotArray')]\n    public function testImCotArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMCOT({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImCotArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-0.012184711291981+0.99433328540776i', '1.0135673098126i', '0.012184711291981+0.99433328540776i'],\n                    ['-0.2176215618544+0.86801414289593i', '1.3130352854993i', '0.2176215618544+0.86801414289593i'],\n                    ['-0.2176215618544-0.86801414289593i', '-1.3130352854993i', '0.2176215618544-0.86801414289593i'],\n                    ['-0.012184711291981-0.99433328540776i', '-1.0135673098126i', '0.012184711291981-0.99433328540776i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCscTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImCscTest extends ComplexAssert\n{\n    #[DataProvider('providerIMCSC')]\n    public function testDirectCallToIMCSC(float|string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMCSC($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCSC')]\n    public function testIMCSCAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMCSC({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCSC')]\n    public function testIMCSCInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCSC({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMCSC(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMCSC.php';\n    }\n\n    #[DataProvider('providerUnhappyIMCSC')]\n    public function testIMCSCUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCSC({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMCSC(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMCSC() function'],\n        ];\n    }\n\n    /** @param string[][] $expectedResult */\n    #[DataProvider('providerImCscArray')]\n    public function testImCscArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMCSC({$complex})\";\n        /** @var array<string, array<string, string>> */\n        $result = $calculation->calculateFormula($formula);\n        // Avoid testing for excess precision\n        foreach ($expectedResult as &$array) {\n            foreach ($array as &$string) {\n                $string = preg_replace('/(\\d{8})\\d+/', '$1', $string);\n            }\n        }\n        foreach ($result as &$array2) {\n            foreach ($array2 as &$string2) {\n                $string2 = preg_replace('/(\\d{8})\\d+/', '$1', $string2);\n            }\n        }\n\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImCscArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-0.13829327777622+0.087608481088326i', '0.1652836698551i', '0.13829327777622+0.087608481088326i'],\n                    ['-0.62151801717043+0.30393100162843i', '0.85091812823932i', '0.62151801717043+0.30393100162843i'],\n                    ['-0.62151801717043-0.30393100162843i', '-0.85091812823932i', '0.62151801717043-0.30393100162843i'],\n                    ['-0.13829327777622-0.087608481088326i', '-0.1652836698551i', '0.13829327777622-0.087608481088326i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCschTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImCschTest extends ComplexAssert\n{\n    #[DataProvider('providerIMCSCH')]\n    public function testDirectCallToIMCSCH(float|string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMCSCH($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCSCH')]\n    public function testIMCSCHAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMCSCH({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMCSCH')]\n    public function testIMCSCHInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCSCH({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMCSCH(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMCSCH.php';\n    }\n\n    #[DataProvider('providerUnhappyIMCSCH')]\n    public function testIMCSCHUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMCSCH({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMCSCH(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMCSCH() function'],\n        ];\n    }\n\n    #[DataProvider('providerImCschArray')]\n    public function testImCschArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMCSCH({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImCschArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['0.54132290619+0.53096557762117i', '1.6709215455587i', '-0.54132290619+0.53096557762117i'],\n                    ['-0.30393100162843+0.62151801717043i', '1.1883951057781i', '0.30393100162843+0.62151801717043i'],\n                    ['-0.30393100162843-0.62151801717043i', '-1.1883951057781i', '0.30393100162843-0.62151801717043i'],\n                    ['0.54132290619-0.53096557762117i', '-1.6709215455587i', '-0.54132290619-0.53096557762117i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImDivTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImDivTest extends ComplexAssert\n{\n    #[DataProvider('providerIMDIV')]\n    public function testDirectCallToIMDIV(string $expectedResult, string $dividend, string $divisor): void\n    {\n        $result = ComplexOperations::IMDIV($dividend, $divisor);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMDIV')]\n    public function testIMDIVAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMDIV({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMDIV')]\n    public function testIMDIVInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMDIV({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMDIV(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMDIV.php';\n    }\n\n    #[DataProvider('providerUnhappyIMDIV')]\n    public function testIMDIVUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMDIV({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMDIV(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMDIV() function'],\n            ['Formula Error: Wrong number of arguments for IMDIV() function', '1.23+4.56i'],\n        ];\n    }\n\n    #[DataProvider('providerImDivArray')]\n    public function testImDivArray(array $expectedResult, string $dividend, string $divisor): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMDIV({$dividend}, {$divisor})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImDivArray(): array\n    {\n        return [\n            'matrix' => [\n                [\n                    ['-0.36206896551724+0.3448275862069i', '-1.25i', '-0.375-0.875i'],\n                    ['-0.10344827586207+0.24137931034483i', '-0.5i', '-0.5i'],\n                    ['0.24137931034483+0.10344827586207i', '0.5i', '0.5'],\n                    ['0.5', '1.25i', '0.875+0.375i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n                '{\"-2+5i\", 2, \"2+2i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImExpTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImExpTest extends ComplexAssert\n{\n    protected float $complexPrecision = (PHP_INT_SIZE > 4) ? 1E-12 : 1E-9;\n\n    #[DataProvider('providerIMEXP')]\n    public function testDirectCallToIMEXP(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMEXP($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMEXP')]\n    public function testIMEXPAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMEXP({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMEXP')]\n    public function testIMEXPInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMEXP({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMEXP(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMEXP.php';\n    }\n\n    #[DataProvider('providerUnhappyIMEXP')]\n    public function testIMEXPUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMEXP({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMEXP(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMEXP() function'],\n        ];\n    }\n\n    #[DataProvider('providerImExpArray')]\n    public function testImExpArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMEXP({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImExpArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-0.29472426558547-0.22016559792964i', '-0.80114361554693-0.59847214410396i', '-2.1777341321272-1.6268159541567i'],\n                    ['0.19876611034641-0.30955987565311i', '0.54030230586814-0.8414709848079i', '1.4686939399159-2.2873552871788i'],\n                    ['0.19876611034641+0.30955987565311i', '0.54030230586814+0.8414709848079i', '1.4686939399159+2.2873552871788i'],\n                    ['-0.29472426558547+0.22016559792964i', '-0.80114361554693+0.59847214410396i', '-2.1777341321272+1.6268159541567i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImLnTest extends ComplexAssert\n{\n    #[DataProvider('providerIMLN')]\n    public function testDirectCallToIMLN(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMLN($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMLN')]\n    public function testIMLNAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMLN({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMLN')]\n    public function testIMLNInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMLN({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMLN(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMLN.php';\n    }\n\n    #[DataProvider('providerUnhappyIMLN')]\n    public function testIMLNUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMLN({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMLN(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMLN() function'],\n        ];\n    }\n\n    #[DataProvider('providerImLnArray')]\n    public function testImLnArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMLN({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImLnArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['0.99050073443329-1.9513027039073i', '0.91629073187416-1.5707963267949i', '0.99050073443329-1.1902899496825i'],\n                    ['0.34657359027997-2.3561944901923i', '-1.5707963267949i', '0.34657359027997-0.78539816339745i'],\n                    ['0.34657359027997+2.3561944901923i', '1.5707963267949i', '0.34657359027997+0.78539816339745i'],\n                    ['0.99050073443329+1.9513027039073i', '0.91629073187416+1.5707963267949i', '0.99050073443329+1.1902899496825i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog10Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImLog10Test extends ComplexAssert\n{\n    #[DataProvider('providerIMLOG10')]\n    public function testDirectCallToIMLOG10(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMLOG10($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMLOG10')]\n    public function testIMLOG10AsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMLOG10({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMLOG10')]\n    public function testIMLOG10InWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMLOG10({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMLOG10(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMLOG10.php';\n    }\n\n    #[DataProvider('providerUnhappyIMLOG10')]\n    public function testIMLOG10UnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMLOG10({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMLOG10(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMLOG10() function'],\n        ];\n    }\n\n    #[DataProvider('providerImLog10Array')]\n    public function testImLog10Array(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMLOG10({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImLog10Array(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['0.4301690032855-0.84743999682982i', '0.39794000867204-0.68218817692092i', '0.4301690032855-0.51693635701202i'],\n                    ['0.15051499783199-1.0232822653814i', '-0.68218817692092i', '0.15051499783199-0.34109408846046i'],\n                    ['0.15051499783199+1.0232822653814i', '0.68218817692092i', '0.15051499783199+0.34109408846046i'],\n                    ['0.4301690032855+0.84743999682982i', '0.39794000867204+0.68218817692092i', '0.4301690032855+0.51693635701202i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImLog2Test extends ComplexAssert\n{\n    protected float $complexPrecision = 1E-8;\n\n    #[DataProvider('providerIMLOG2')]\n    public function testDirectCallToIMLOG2(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMLOG2($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMLOG2')]\n    public function testIMLOG2AsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMLOG2({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMLOG2')]\n    public function testIMLOG2InWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMLOG2({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMLOG2(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMLOG2.php';\n    }\n\n    #[DataProvider('providerUnhappyIMLOG2')]\n    public function testIMLOG2UnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMLOG2({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMLOG2(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMLOG2() function'],\n        ];\n    }\n\n    #[DataProvider('providerImLog2Array')]\n    public function testImLog2Array(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMLOG2({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImLog2Array(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['1.4289904975638-2.8151347342002i', '1.3219280948874-2.2661800709136i', '1.4289904975638-1.717225407627i'],\n                    ['0.5-3.3992701063704i', '-2.2661800709136i', '0.5-1.1330900354568i'],\n                    ['0.5+3.3992701063704i', '2.2661800709136i', '0.5+1.1330900354568i'],\n                    ['1.4289904975638+2.8151347342002i', '1.3219280948874+2.2661800709136i', '1.4289904975638+1.717225407627i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImPowerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImPowerTest extends ComplexAssert\n{\n    #[DataProvider('providerIMPOWER')]\n    public function testDirectCallToIMPOWER(float|int|string $expectedResult, string $arg1, float|int|string $arg2): void\n    {\n        $result = ComplexFunctions::IMPOWER($arg1, $arg2);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMPOWER')]\n    public function testIMPOWERAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMPOWER({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMPOWER')]\n    public function testIMPOWERInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMPOWER({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMPOWER(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMPOWER.php';\n    }\n\n    #[DataProvider('providerUnhappyIMPOWER')]\n    public function testIMPOWERUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMPOWER({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMPOWER(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMPOWER() function'],\n        ];\n    }\n\n    #[DataProvider('providerImPowerArray')]\n    public function testImPowerArray(array $expectedResult, string $complex, string $real): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMPOWER({$complex}, {$real})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImPowerArray(): array\n    {\n        return [\n            'matrix' => [\n                [\n                    ['-5.25+5i', '-2.8702659355016E-15+15.625i', '2.5625+52.5i'],\n                    ['-3.6739403974421E-16+2i', '-1.836970198721E-16+i', '-4-4.8985871965894E-16i'],\n                    ['-3.6739403974421E-16-2i', '-1.836970198721E-16-i', '-4+4.8985871965894E-16i'],\n                    ['-5.25-5i', '-2.8702659355016E-15-15.625i', '2.5625-52.5i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n                '{2, 3, 4}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImProductTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImProductTest extends ComplexAssert\n{\n    /**\n     * @param string ...$args variadic arguments\n     */\n    #[DataProvider('providerIMPRODUCT')]\n    public function testDirectCallToIMPRODUCT(mixed $expectedResult, ...$args): void\n    {\n        $result = ComplexOperations::IMPRODUCT(...$args);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMPRODUCT')]\n    public function testIMPRODUCTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMPRODUCT({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMPRODUCT')]\n    public function testIMPRODUCTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMPRODUCT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMPRODUCT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMPRODUCT.php';\n    }\n\n    #[DataProvider('providerUnhappyIMPRODUCT')]\n    public function testIMPRODUCTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMPRODUCT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMPRODUCT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMPRODUCT() function'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImRealTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImRealTest extends AllSetupTeardown\n{\n    const COMPLEX_PRECISION = 1E-12;\n\n    #[DataProvider('providerIMREAL')]\n    public function testDirectCallToIMREAL(float|int|string $expectedResult, float|int|string $arg): void\n    {\n        $result = Complex::IMREAL((string) $arg);\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    #[DataProvider('providerIMREAL')]\n    public function testIMREALAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMREAL({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    #[DataProvider('providerIMREAL')]\n    public function testIMREALInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMREAL({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    public static function providerIMREAL(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMREAL.php';\n    }\n\n    #[DataProvider('providerUnhappyIMREAL')]\n    public function testIMREALUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMREAL({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyIMREAL(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMREAL() function'],\n        ];\n    }\n\n    #[DataProvider('providerImRealArray')]\n    public function testImRealArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMREAL({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImRealArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [-1.0, 0.0, 1.0],\n                    [-1.0, 0.0, 1.0],\n                    [-1.0, 0.0, 1.0],\n                    [-1.0, 0.0, 1.0],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSecTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImSecTest extends ComplexAssert\n{\n    #[DataProvider('providerIMSEC')]\n    public function testDirectCallToIMSEC(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMSEC($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSEC')]\n    public function testIMSECAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMSEC({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSEC')]\n    public function testIMSECInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSEC({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMSEC(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMSEC.php';\n    }\n\n    #[DataProvider('providerUnhappyIMSEC')]\n    public function testIMSECUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSEC({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMSEC(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMSEC() function'],\n        ];\n    }\n\n    #[DataProvider('providerImSecArray')]\n    public function testImSecArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMSEC({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImSecArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['0.089798602872122+0.13798100670997i', '0.16307123192998', '0.089798602872122-0.13798100670997i'],\n                    ['0.49833703055519+0.59108384172105i', '0.64805427366389', '0.49833703055519-0.59108384172105i'],\n                    ['0.49833703055519-0.59108384172105i', '0.64805427366389', '0.49833703055519+0.59108384172105i'],\n                    ['0.089798602872122-0.13798100670997i', '0.16307123192998', '0.089798602872122+0.13798100670997i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSechTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImSechTest extends ComplexAssert\n{\n    #[DataProvider('providerIMSECH')]\n    public function testDirectCallToIMSECH(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMSECH($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSECH')]\n    public function testIMSECHAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMSECH({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSECH')]\n    public function testIMSECHInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSECH({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMSECH(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMSECH.php';\n    }\n\n    #[DataProvider('providerUnhappyIMSECH')]\n    public function testIMSECHUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSECH({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMSECH(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMSECH() function'],\n        ];\n    }\n\n    #[DataProvider('providerImSecHArray')]\n    public function testImSecHArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMSECH({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImSecHArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-0.61110856415523-0.3476766607105i', '-1.2482156514688', '-0.61110856415523+0.3476766607105i'],\n                    ['0.49833703055519-0.59108384172105i', '1.8508157176809', '0.49833703055519+0.59108384172105i'],\n                    ['0.49833703055519+0.59108384172105i', '1.8508157176809', '0.49833703055519-0.59108384172105i'],\n                    ['-0.61110856415523+0.3476766607105i', '-1.2482156514688', '-0.61110856415523-0.3476766607105i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImSinTest extends ComplexAssert\n{\n    #[DataProvider('providerIMSIN')]\n    public function testDirectCallToIMSIN(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMSIN($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSIN')]\n    public function testIMSINAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMSIN({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSIN')]\n    public function testIMSINInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSIN({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMSIN(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMSIN.php';\n    }\n\n    #[DataProvider('providerUnhappyIMSIN')]\n    public function testIMSINUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSIN({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMSIN(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMSIN() function'],\n        ];\n    }\n\n    #[DataProvider('providerImSinArray')]\n    public function testImSinArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMSIN({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImSinArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-5.1601436675797-3.2689394320795i', '-6.0502044810398i', '5.1601436675797-3.2689394320795i'],\n                    ['-1.298457581416-0.63496391478474i', '-1.1752011936438i', '1.298457581416-0.63496391478474i'],\n                    ['-1.298457581416+0.63496391478474i', '1.1752011936438i', '1.298457581416+0.63496391478474i'],\n                    ['-5.1601436675797+3.2689394320795i', '6.0502044810398i', '5.1601436675797+3.2689394320795i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinhTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImSinhTest extends ComplexAssert\n{\n    #[DataProvider('providerIMSINH')]\n    public function testDirectCallToIMSINH(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMSINH($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSINH')]\n    public function testIMSINHAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMSINH({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSINH')]\n    public function testIMSINHInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSINH({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMSINH(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMSINH.php';\n    }\n\n    #[DataProvider('providerUnhappyIMSINH')]\n    public function testIMSINHUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSINH({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMSINH(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMSINH() function'],\n        ];\n    }\n\n    #[DataProvider('providerImSinHArray')]\n    public function testImSinHArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMSINH({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImSinHArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['0.94150493327087-0.92349077604317i', '-0.59847214410396i', '-0.94150493327087-0.92349077604317i'],\n                    ['-0.63496391478474-1.298457581416i', '-0.8414709848079i', '0.63496391478474-1.298457581416i'],\n                    ['-0.63496391478474+1.298457581416i', '0.8414709848079i', '0.63496391478474+1.298457581416i'],\n                    ['0.94150493327087+0.92349077604317i', '0.59847214410396i', '-0.94150493327087+0.92349077604317i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSqrtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImSqrtTest extends ComplexAssert\n{\n    #[DataProvider('providerIMSQRT')]\n    public function testDirectCallToIMSQRT(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMSQRT($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSQRT')]\n    public function testIMSQRTAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMSQRT({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSQRT')]\n    public function testIMSQRTInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSQRT({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMSQRT(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMSQRT.php';\n    }\n\n    #[DataProvider('providerUnhappyIMSQRT')]\n    public function testIMSQRTUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSQRT({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMSQRT(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMSQRT() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerImSqrtArray')]\n    public function testImSqrtArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMSQRT({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImSqrtArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['0.9199408686343-1.3587829855366i', '1.1180339887499-1.1180339887499i', '1.3587829855366-0.9199408686343i'],\n                    ['0.45508986056223-1.0986841134678i', '0.70710678118655-0.70710678118655i', '1.0986841134678-0.45508986056223i'],\n                    ['0.45508986056223+1.0986841134678i', '0.70710678118655+0.70710678118655i', '1.0986841134678+0.45508986056223i'],\n                    ['0.9199408686343+1.3587829855366i', '1.1180339887499+1.1180339887499i', '1.3587829855366+0.9199408686343i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSubTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImSubTest extends ComplexAssert\n{\n    #[DataProvider('providerIMSUB')]\n    public function testDirectCallToIMSUB(string $expectedResult, string $arg1, string $arg2): void\n    {\n        $result = ComplexOperations::IMSUB($arg1, $arg2);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSUB')]\n    public function testIMSUBAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMSUB({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSUB')]\n    public function testIMSUBInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSUB({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMSUB(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMSUB.php';\n    }\n\n    #[DataProvider('providerUnhappyIMSUB')]\n    public function testIMSUBUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSUB({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMSUB(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMSUB() function'],\n            ['Formula Error: Wrong number of arguments for IMSUB() function', '1.23+4.56i'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerImSubArray')]\n    public function testImSubArray(array $expectedResult, string $subidend, string $subisor): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMSUB({$subidend}, {$subisor})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImSubArray(): array\n    {\n        return [\n            'matrix' => [\n                [\n                    ['1-7.5i', '-2-2.5i', '-1-4.5i'],\n                    ['1-6i', '-2-i', '-1-3i'],\n                    ['1-4i', '-2+i', '-1-i'],\n                    ['1-2.5i', '-2+2.5i', '-1+0.5i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n                '{\"-2+5i\", 2, \"2+2i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSumTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexOperations;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImSumTest extends ComplexAssert\n{\n    /**\n     * @param string ...$args variadic arguments\n     */\n    #[DataProvider('providerIMSUM')]\n    public function testDirectCallToIMSUM(mixed $expectedResult, ...$args): void\n    {\n        $result = ComplexOperations::IMSUM(...$args);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSUM')]\n    public function testIMSUMAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMSUM({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMSUM')]\n    public function testIMSUMInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSUM({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMSUM(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMSUM.php';\n    }\n\n    #[DataProvider('providerUnhappyIMSUM')]\n    public function testIMSUMUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMSUM({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMSUM(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMSUM() function'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImTanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ComplexFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PhpOffice\\PhpSpreadsheetTests\\Custom\\ComplexAssert;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImTanTest extends ComplexAssert\n{\n    #[DataProvider('providerIMTAN')]\n    public function testDirectCallToIMTAN(string $expectedResult, string $arg): void\n    {\n        $result = ComplexFunctions::IMTAN($arg);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMTAN')]\n    public function testIMTANAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMTAN({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        $this->assertComplexEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerIMTAN')]\n    public function testIMTANInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMTAN({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        $this->assertComplexEquals($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIMTAN(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMTAN.php';\n    }\n\n    #[DataProvider('providerUnhappyIMTAN')]\n    public function testIMTANUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMTAN({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyIMTAN(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMTAN() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerImTanArray')]\n    public function testImTanArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMTAN({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImTanArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    ['-0.012322138255828-1.0055480118951i', '-0.98661429815143i', '0.012322138255828-1.0055480118951i'],\n                    ['-0.27175258531951-1.0839233273387i', '-0.76159415595576i', '0.27175258531951-1.0839233273387i'],\n                    ['-0.27175258531951+1.0839233273387i', '0.76159415595576i', '0.27175258531951+1.0839233273387i'],\n                    ['-0.012322138255828+1.0055480118951i', '0.98661429815143i', '0.012322138255828+1.0055480118951i'],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImaginaryTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\Complex;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ImaginaryTest extends AllSetupTeardown\n{\n    const COMPLEX_PRECISION = 1E-12;\n\n    #[DataProvider('providerIMAGINARY')]\n    public function testDirectCallToIMAGINARY(float|int|string $expectedResult, float|int|string $arg): void\n    {\n        $result = Complex::IMAGINARY((string) $arg);\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    #[DataProvider('providerIMAGINARY')]\n    public function testIMAGINARYAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=IMAGINARY({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    #[DataProvider('providerIMAGINARY')]\n    public function testIMAGINARYInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMAGINARY({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);\n    }\n\n    public static function providerIMAGINARY(): array\n    {\n        return require 'tests/data/Calculation/Engineering/IMAGINARY.php';\n    }\n\n    #[DataProvider('providerUnhappyIMAGINARY')]\n    public function testIMAGINARYUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=IMAGINARY({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyIMAGINARY(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for IMAGINARY() function'],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerImaginaryArray')]\n    public function testImaginaryArray(array $expectedResult, string $complex): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IMAGINARY({$complex})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerImaginaryArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [\n                    [-2.5, -2.5, -2.5],\n                    [-1.0, -1.0, -1.0],\n                    [1.0, 1.0, 1.0],\n                    [2.5, 2.5, 2.5],\n                ],\n                '{\"-1-2.5i\", \"-2.5i\", \"1-2.5i\"; \"-1-i\", \"-i\", \"1-i\"; \"-1+i\", \"i\", \"1+1\"; \"-1+2.5i\", \"+2.5i\", \"1+2.5i\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2BinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Oct2BinTest extends AllSetupTeardown\n{\n    #[DataProvider('providerOCT2BIN')]\n    public function testDirectCallToOCT2BIN(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertOctal::toBinary($value) : ConvertOctal::toBinary($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerOCT2BIN')]\n    public function testOCT2BINAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=OCT2BIN({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerOCT2BIN')]\n    public function testOCT2BINInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=OCT2BIN({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerOCT2BIN(): array\n    {\n        return require 'tests/data/Calculation/Engineering/OCT2BIN.php';\n    }\n\n    #[DataProvider('providerUnhappyOCT2BIN')]\n    public function testOCT2BINUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=OCT2BIN({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyOCT2BIN(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for OCT2BIN() function'],\n        ];\n    }\n\n    #[DataProvider('providerOCT2BINOds')]\n    public function testOCT2BINOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $this->setOpenOffice();\n\n        $result = ($digits === null) ? ConvertOctal::toBinary($value) : ConvertOctal::toBinary($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerOCT2BINOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/OCT2BINOpenOffice.php';\n    }\n\n    public function testOCT2BINFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=OCT2BIN(10.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('1000', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerOct2BinArray')]\n    public function testOct2BinArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=OCT2BIN({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerOct2BinArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['100', '111', '111111', '10011001', '11001100', '101010101']],\n                '{\"4\", \"7\", \"77\", \"231\", \"314\", \"525\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2DecTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Oct2DecTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    #[DataProvider('providerOCT2DEC')]\n    public function testDirectCallToOCT2DEC(mixed $expectedResult, bool|string $value): void\n    {\n        $result = ConvertOctal::toDecimal($value);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerOCT2DEC')]\n    public function testOCT2DECAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=OCT2DEC({$arguments})\";\n\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerOCT2DEC')]\n    public function testOCT2DECInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=OCT2DEC({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerOCT2DEC(): array\n    {\n        return require 'tests/data/Calculation/Engineering/OCT2DEC.php';\n    }\n\n    #[DataProvider('providerUnhappyOCT2DEC')]\n    public function testOCT2DECUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=OCT2DEC({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerUnhappyOCT2DEC(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for OCT2DEC() function'],\n        ];\n    }\n\n    #[DataProvider('providerOCT2DECOds')]\n    public function testOCT2DECOds(mixed $expectedResult, bool|string $value): void\n    {\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n\n        $result = ConvertOctal::toDecimal($value);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerOCT2DECOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/OCT2DECOpenOffice.php';\n    }\n\n    public function testOCT2DECFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=OCT2DEC(10.1)';\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_GNUMERIC\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(8, $result, 'Gnumeric');\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_EXCEL\n        );\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerOct2DecArray')]\n    public function testOct2DecArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=OCT2DEC({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerOct2DecArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [[4, 7, 63, 153, 204, 341]],\n                '{\"4\", \"7\", \"77\", \"231\", \"314\", \"525\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2HexTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Engineering;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertOctal;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\FormulaArguments;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Oct2HexTest extends AllSetupTeardown\n{\n    #[DataProvider('providerOCT2HEX')]\n    public function testDirectCallToOCT2HEX(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $result = ($digits === null) ? ConvertOctal::toHex($value) : ConvertOctal::toHex($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerOCT2HEX')]\n    public function testOCT2HEXAsFormula(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $calculation = Calculation::getInstance();\n        $formula = \"=OCT2HEX({$arguments})\";\n\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerOCT2HEX')]\n    public function testOCT2HEXInWorksheet(mixed $expectedResult, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=OCT2HEX({$argumentCells})\";\n\n        $result = $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerOCT2HEX(): array\n    {\n        return require 'tests/data/Calculation/Engineering/OCT2HEX.php';\n    }\n\n    #[DataProvider('providerUnhappyOCT2HEX')]\n    public function testOCT2HEXUnhappyPath(string $expectedException, mixed ...$args): void\n    {\n        $arguments = new FormulaArguments(...$args);\n\n        $worksheet = $this->getSheet();\n        $argumentCells = $arguments->populateWorksheet($worksheet);\n        $formula = \"=OCT2HEX({$argumentCells})\";\n\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage($expectedException);\n        $worksheet->setCellValue('A1', $formula)\n            ->getCell('A1')\n            ->getCalculatedValue();\n    }\n\n    public static function providerUnhappyOCT2HEX(): array\n    {\n        return [\n            ['Formula Error: Wrong number of arguments for OCT2HEX() function'],\n        ];\n    }\n\n    #[DataProvider('providerOCT2HEXOds')]\n    public function testOCT2HEXOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void\n    {\n        $this->setOpenOffice();\n\n        $result = ($digits === null) ? ConvertOctal::toHex($value) : ConvertOctal::toHex($value, $digits);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerOCT2HEXOds(): array\n    {\n        return require 'tests/data/Calculation/Engineering/OCT2HEXOpenOffice.php';\n    }\n\n    public function testOCT2HEXFrac(): void\n    {\n        $calculation = Calculation::getInstance();\n        $formula = '=OCT2HEX(20.1)';\n\n        $this->setGnumeric();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame('10', $result, 'Gnumeric');\n\n        $this->setOpenOffice();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'OpenOffice');\n\n        $this->setExcel();\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame(ExcelError::NAN(), $result, 'Excel');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerOct2HexArray')]\n    public function testOct2HexArray(array $expectedResult, string $value): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=OCT2HEX({$value})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerOct2HexArray(): array\n    {\n        return [\n            'row/column vector' => [\n                [['4', '7', '3F', '99', 'CC', '155']],\n                '{\"4\", \"7\", \"77\", \"231\", \"314\", \"525\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintMTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass AccrintMTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerACCRINTM')]\n    public function testACCRINTM(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('ACCRINTM', $expectedResult, $args);\n    }\n\n    public static function providerACCRINTM(): array\n    {\n        return require 'tests/data/Calculation/Financial/ACCRINTM.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass AccrintTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerACCRINT')]\n    public function testACCRINT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('ACCRINT', $expectedResult, $args);\n    }\n\n    public static function providerACCRINT(): array\n    {\n        return require 'tests/data/Calculation/Financial/ACCRINT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AllSetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AllSetupTeardown extends TestCase\n{\n    private string $compatibilityMode;\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected static function setOpenOffice(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n    }\n\n    protected static function setGnumeric(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_GNUMERIC);\n    }\n\n    protected function mightHaveException(mixed $expectedResult): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(CalcException::class);\n        }\n    }\n\n    protected function setCell(string $cell, mixed $value): void\n    {\n        if ($value !== null) {\n            if (is_string($value) && is_numeric($value)) {\n                $this->getSheet()->getCell($cell)->setValueExplicit($value, DataType::TYPE_STRING);\n            } else {\n                $this->getSheet()->getCell($cell)->setValue($value);\n            }\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n\n    /**\n     * Adjust result if it is close enough to expected by ratio\n     *     rather than offset.\n     */\n    protected function adjustResult(mixed &$result, mixed $expectedResult): void\n    {\n        if (is_numeric($result) && is_numeric($expectedResult)) {\n            if ($expectedResult != 0) {\n                $frac = $result / $expectedResult;\n                if ($frac > 0.999999 && $frac < 1.000001) {\n                    $result = $expectedResult;\n                }\n            }\n        }\n    }\n\n    /** @param mixed[] $args */\n    public function runTestCase(string $functionName, mixed $expectedResult, array $args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = \"=$functionName(\";\n        $row = 0;\n        $col = 'A';\n        $comma = '';\n        foreach ($args as $arg) {\n            ++$row;\n            $cell = \"$col$row\";\n            $this->setCell($cell, $arg);\n            $formula .= \"$comma$cell\";\n            $comma = ',';\n        }\n        $formula .= ')';\n        $sheet->getCell('B1')->setValue($formula);\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-7);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorDegRcTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass AmorDegRcTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAMORDEGRC')]\n    public function testAMORDEGRC(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('AMORDEGRC', $expectedResult, $args);\n    }\n\n    public static function providerAMORDEGRC(): array\n    {\n        return require 'tests/data/Calculation/Financial/AMORDEGRC.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorLincTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass AmorLincTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAMORLINC')]\n    public function testAMORLINC(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('AMORLINC', $expectedResult, $args);\n    }\n\n    public static function providerAMORLINC(): array\n    {\n        return require 'tests/data/Calculation/Financial/AMORLINC.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDayBsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass CoupDayBsTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUPDAYBS')]\n    public function testCOUPDAYBS(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('COUPDAYBS', $expectedResult, $args);\n    }\n\n    public static function providerCOUPDAYBS(): array\n    {\n        return require 'tests/data/Calculation/Financial/COUPDAYBS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysNcTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass CoupDaysNcTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUPDAYSNC')]\n    public function testCOUPDAYSNC(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('COUPDAYSNC', $expectedResult, $args);\n    }\n\n    public static function providerCOUPDAYSNC(): array\n    {\n        return require 'tests/data/Calculation/Financial/COUPDAYSNC.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass CoupDaysTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUPDAYS')]\n    public function testCOUPDAYS(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('COUPDAYS', $expectedResult, $args);\n    }\n\n    public static function providerCOUPDAYS(): array\n    {\n        return require 'tests/data/Calculation/Financial/COUPDAYS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNcdTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass CoupNcdTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUPNCD')]\n    public function testCOUPNCD(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('COUPNCD', $expectedResult, $args);\n    }\n\n    public static function providerCOUPNCD(): array\n    {\n        return require 'tests/data/Calculation/Financial/COUPNCD.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNumTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass CoupNumTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUPNUM')]\n    public function testCOUPNUM(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('COUPNUM', $expectedResult, $args);\n    }\n\n    public static function providerCOUPNUM(): array\n    {\n        return require 'tests/data/Calculation/Financial/COUPNUM.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupPcdTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass CoupPcdTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUPPCD')]\n    public function testCOUPPCD(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('COUPPCD', $expectedResult, $args);\n    }\n\n    public static function providerCOUPPCD(): array\n    {\n        return require 'tests/data/Calculation/Financial/COUPPCD.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumIpmtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass CumIpmtTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCUMIPMT')]\n    public function testCUMIPMT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('CUMIPMT', $expectedResult, $args);\n    }\n\n    public static function providerCUMIPMT(): array\n    {\n        return require 'tests/data/Calculation/Financial/CUMIPMT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumPrincTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass CumPrincTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCUMPRINC')]\n    public function testCUMPRINC(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('CUMPRINC', $expectedResult, $args);\n    }\n\n    public static function providerCUMPRINC(): array\n    {\n        return require 'tests/data/Calculation/Financial/CUMPRINC.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DbTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass DbTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDB')]\n    public function testDB(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('DB', $expectedResult, $args);\n    }\n\n    public static function providerDB(): array\n    {\n        return require 'tests/data/Calculation/Financial/DB.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DdbTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass DdbTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDDB')]\n    public function testDDB(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('DDB', $expectedResult, $args);\n    }\n\n    public static function providerDDB(): array\n    {\n        return require 'tests/data/Calculation/Financial/DDB.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DiscTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass DiscTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDISC')]\n    public function testDISC(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('DISC', $expectedResult, $args);\n    }\n\n    public static function providerDISC(): array\n    {\n        return require 'tests/data/Calculation/Financial/DISC.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarDeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DollarDeTest extends AllSetupTeardown\n{\n    #[DataProvider('providerDOLLARDE')]\n    public function testDOLLARDE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('DOLLARDE', $expectedResult, $args);\n    }\n\n    public static function providerDOLLARDE(): array\n    {\n        return require 'tests/data/Calculation/Financial/DOLLARDE.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDollarDeArray')]\n    public function testDollarDeArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DollarDe({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDollarDeArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[1.125, 2.0625, -12.625, 3.5]],\n                '{1.02, 2.01, -12.1, 1.4}',\n                '16',\n            ],\n            'first argument column vector' => [\n                [[1.0625], [2.03125], [-12.3125], [2.25]],\n                '{1.02; 2.01; -12.1; 1.4}',\n                '32',\n            ],\n            'first argument matrix' => [\n                [[1.05, 2.25], [-12.5, 2.0]],\n                '{1.02, 2.1; -12.2, 1.4}',\n                '4',\n            ],\n            'second argument row vector' => [\n                [[4.25, 3.625, 6.125, 4.5625]],\n                '3.5',\n                '{4, 8, 16, 32}',\n            ],\n            'second argument column vector' => [\n                [[5.5], [4.25], [3.625], [6.125]],\n                '3.5',\n                '{2; 4; 8; 16}',\n            ],\n            'second argument matrix' => [\n                [[-4.875, -3.9375], [-9.25, -7.6875]],\n                '-3.75',\n                '{4, 8; 12, 16}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarFrTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass DollarFrTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDOLLARFR')]\n    public function testDOLLARFR(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('DOLLARFR', $expectedResult, $args);\n    }\n\n    public static function providerDOLLARFR(): array\n    {\n        return require 'tests/data/Calculation/Financial/DOLLARFR.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/EffectTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass EffectTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerEFFECT')]\n    public function testEFFECT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('EFFECT', $expectedResult, $args);\n    }\n\n    public static function providerEFFECT(): array\n    {\n        return require 'tests/data/Calculation/Financial/EFFECT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvScheduleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass FvScheduleTest extends AllSetupTeardown\n{\n    /** @param null|mixed[] $schedule */\n    #[DataProvider('providerFVSCHEDULE')]\n    public function testFVSCHEDULE(mixed $expectedResult, mixed $principal = null, ?array $schedule = null): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = '=FVSCHEDULE(';\n        if ($principal !== null) {\n            $this->setCell('A1', $principal);\n            $formula .= 'A1';\n            if (!empty($schedule)) {\n                $row = 0;\n                foreach ($schedule as $value) {\n                    ++$row;\n                    $this->setCell(\"B$row\", $value);\n                }\n                $formula .= \",B1:B$row\";\n            }\n        }\n        $formula .= ')';\n        $sheet->getCell('D1')->setValue($formula);\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        $this->adjustResult($result, $expectedResult);\n\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0E-8);\n    }\n\n    public static function providerFVSCHEDULE(): array\n    {\n        return require 'tests/data/Calculation/Financial/FVSCHEDULE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass FvTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerFV')]\n    public function testFV(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('FV', $expectedResult, $args);\n    }\n\n    public static function providerFV(): array\n    {\n        return require 'tests/data/Calculation/Financial/FV.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/HelpersTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Helpers;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HelpersTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDaysPerYear')]\n    public function testDaysPerYear(mixed $expectedResult, int $year, int|string $basis): void\n    {\n        $result = Helpers::daysPerYear($year, $basis);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDaysPerYear(): array\n    {\n        return require 'tests/data/Calculation/Financial/DaysPerYear.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IPmtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass IPmtTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerIPMT')]\n    public function testIPMT(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('IPMT', $expectedResult, $args);\n    }\n\n    public static function providerIPMT(): array\n    {\n        return require 'tests/data/Calculation/Financial/IPMT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IntRateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass IntRateTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerINTRATE')]\n    public function testINTRATE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('INTRATE', $expectedResult, $args);\n    }\n\n    public static function providerINTRATE(): array\n    {\n        return require 'tests/data/Calculation/Financial/INTRATE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IrrTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass IrrTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerIRR')]\n    public function testIRR(mixed $expectedResult, mixed $values = null, mixed $guess = null): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = '=IRR(';\n        if ($values !== null) {\n            if (is_array($values)) {\n                $row = 0;\n                foreach ($values as $value) {\n                    if (is_array($value)) {\n                        foreach ($value as $arrayValue) {\n                            ++$row;\n                            $sheet->getCell(\"A$row\")->setValue($arrayValue);\n                        }\n                    } else {\n                        ++$row;\n                        $sheet->getCell(\"A$row\")->setValue($value);\n                    }\n                }\n                $formula .= \"A1:A$row\";\n            } else {\n                $sheet->getCell('A1')->setValue($values);\n                $formula .= 'A1';\n            }\n        }\n        if ($guess !== null) {\n            $formula .= ',' . StringHelper::convertToString($guess);\n        }\n        $formula .= ')';\n        $sheet->getCell('D1')->setValue($formula);\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        $this->adjustResult($result, $expectedResult);\n\n        self::assertEqualsWithDelta($expectedResult, $result, 0.1E-8);\n    }\n\n    public static function providerIRR(): array\n    {\n        return require 'tests/data/Calculation/Financial/IRR.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IsPmtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass IsPmtTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerISPMT')]\n    public function testISPMT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('ISPMT', $expectedResult, $args);\n    }\n\n    public static function providerISPMT(): array\n    {\n        return require 'tests/data/Calculation/Financial/ISPMT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/MirrTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass MirrTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMIRR')]\n    public function testMIRR(mixed $expectedResult, mixed $values, mixed $financeRate = null, mixed $reinvestRate = null): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = '=MIRR(';\n        if ($values !== null) {\n            if (is_array($values)) {\n                $values = Functions::flattenArray($values);\n                $row = 0;\n                foreach ($values as $value) {\n                    ++$row;\n                    $this->setCell(\"A$row\", $value);\n                }\n                $formula .= \"A1:A$row\";\n            } else {\n                $this->setCell('A1', $values);\n                $formula .= 'A1';\n            }\n            if ($financeRate !== null) {\n                $this->setCell('B1', $financeRate);\n                $formula .= ',B1';\n                if ($reinvestRate !== null) {\n                    $this->setCell('B2', $reinvestRate);\n                    $formula .= ',B2';\n                }\n            }\n        }\n        $formula .= ')';\n        $sheet->getCell('D1')->setValue($formula);\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0E-8);\n    }\n\n    public static function providerMIRR(): array\n    {\n        return require 'tests/data/Calculation/Financial/MIRR.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NPerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass NPerTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerNPER')]\n    public function testNPER(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('NPER', $expectedResult, $args);\n    }\n\n    public static function providerNPER(): array\n    {\n        return require 'tests/data/Calculation/Financial/NPER.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NominalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass NominalTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNOMINAL')]\n    public function testNOMINAL(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('NOMINAL', $expectedResult, $args);\n    }\n\n    public static function providerNOMINAL(): array\n    {\n        return require 'tests/data/Calculation/Financial/NOMINAL.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NpvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass NpvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNPV')]\n    public function testNPV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('NPV', $expectedResult, $args);\n    }\n\n    public static function providerNPV(): array\n    {\n        return require 'tests/data/Calculation/Financial/NPV.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PDurationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass PDurationTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerPDURATION')]\n    public function testPDURATION(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('PDURATION', $expectedResult, $args);\n    }\n\n    public static function providerPDURATION(): array\n    {\n        return require 'tests/data/Calculation/Financial/PDURATION.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PmtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass PmtTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerPMT')]\n    public function testPMT(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('PMT', $expectedResult, $args);\n    }\n\n    public static function providerPMT(): array\n    {\n        return require 'tests/data/Calculation/Financial/PMT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PpmtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass PpmtTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerPPMT')]\n    public function testPPMT(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('PPMT', $expectedResult, $args);\n    }\n\n    public static function providerPPMT(): array\n    {\n        return require 'tests/data/Calculation/Financial/PPMT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceDiscTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass PriceDiscTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerPRICEDISC')]\n    public function testPRICEDISC(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('PRICEDISC', $expectedResult, $args);\n    }\n\n    public static function providerPRICEDISC(): array\n    {\n        return require 'tests/data/Calculation/Financial/PRICEDISC.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceMatTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass PriceMatTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPRICEMAT')]\n    public function testPRICEMAT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('PRICEMAT', $expectedResult, $args);\n    }\n\n    public static function providerPRICEMAT(): array\n    {\n        return require 'tests/data/Calculation/Financial/PRICEMAT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass PriceTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPRICE')]\n    public function testPRICE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('PRICE', $expectedResult, $args);\n    }\n\n    public static function providerPRICE(): array\n    {\n        return require 'tests/data/Calculation/Financial/PRICE.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPRICE3')]\n    public function testPRICE3(mixed $expectedResult, mixed ...$args): void\n    {\n        // These results (PRICE function with basis codes 2 and 3)\n        // agree with published algorithm, LibreOffice, and Gnumeric.\n        // They do not agree with Excel.\n        $this->runTestCase('PRICE', $expectedResult, $args);\n    }\n\n    public static function providerPRICE3(): array\n    {\n        return require 'tests/data/Calculation/Financial/PRICE3.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass PvTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerPV')]\n    public function testPV(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('PV', $expectedResult, $args);\n    }\n\n    public static function providerPV(): array\n    {\n        return require 'tests/data/Calculation/Financial/PV.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass RateTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRATE')]\n    public function testRATE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('RATE', $expectedResult, $args);\n    }\n\n    public static function providerRATE(): array\n    {\n        return require 'tests/data/Calculation/Financial/RATE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/ReceivedTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass ReceivedTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRECEIVED')]\n    public function testRECEIVED(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('RECEIVED', $expectedResult, $args);\n    }\n\n    public static function providerRECEIVED(): array\n    {\n        return require 'tests/data/Calculation/Financial/RECEIVED.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RriTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass RriTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerRRI')]\n    public function testRRI(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('RRI', $expectedResult, $args);\n    }\n\n    public static function providerRRI(): array\n    {\n        return require 'tests/data/Calculation/Financial/RRI.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SlnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SlnTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerSLN')]\n    public function testSLN(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('SLN', $expectedResult, $args);\n    }\n\n    public static function providerSLN(): array\n    {\n        return require 'tests/data/Calculation/Financial/SLN.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SydTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SydTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerSYD')]\n    public function testSYD(mixed $expectedResult, array $args): void\n    {\n        $this->runTestCase('SYD', $expectedResult, $args);\n    }\n\n    public static function providerSYD(): array\n    {\n        return require 'tests/data/Calculation/Financial/SYD.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillEqTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass TBillEqTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTBILLEQ')]\n    public function testTBILLEQ(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('TBILLEQ', $expectedResult, $args);\n    }\n\n    public static function providerTBILLEQ(): array\n    {\n        return require 'tests/data/Calculation/Financial/TBILLEQ.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillPriceTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass TBillPriceTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTBILLPRICE')]\n    public function testTBILLPRICE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('TBILLPRICE', $expectedResult, $args);\n    }\n\n    public static function providerTBILLPRICE(): array\n    {\n        return require 'tests/data/Calculation/Financial/TBILLPRICE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillYieldTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass TBillYieldTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTBILLYIELD')]\n    public function testTBILLYIELD(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('TBILLYIELD', $expectedResult, $args);\n    }\n\n    public static function providerTBILLYIELD(): array\n    {\n        return require 'tests/data/Calculation/Financial/TBILLYIELD.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/UsDollarTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass UsDollarTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerUSDOLLAR')]\n    public function testUSDOLLAR(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('USDOLLAR', $expectedResult, $args);\n    }\n\n    public static function providerUSDOLLAR(): array\n    {\n        return require 'tests/data/Calculation/Financial/USDOLLAR.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XNpvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass XNpvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerXNPV')]\n    public function testXNPV(mixed $expectedResult, mixed $rate = null, mixed $values = null, mixed $dates = null): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = '=XNPV(';\n        if ($rate !== null) {\n            $this->setCell('C1', $rate);\n            $formula .= 'C1,';\n            if ($values !== null) {\n                if (is_array($values)) {\n                    $row = 0;\n                    foreach ($values as $value) {\n                        ++$row;\n                        $sheet->getCell(\"A$row\")->setValue($value);\n                    }\n                    $formula .= \"A1:A$row\";\n                } else {\n                    $sheet->getCell('A1')->setValue($values);\n                    $formula .= 'A1';\n                }\n                if ($dates !== null) {\n                    if (is_array($dates)) {\n                        $row = 0;\n                        foreach ($dates as $date) {\n                            ++$row;\n                            $sheet->getCell(\"B$row\")->setValue($date);\n                        }\n                        $formula .= \",B1:B$row\";\n                    } else {\n                        $sheet->getCell('B1')->setValue($dates);\n                        $formula .= ',B1';\n                    }\n                }\n            }\n        }\n        $formula .= ')';\n        $sheet->getCell('D1')->setValue($formula);\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        if (is_numeric($result) && is_numeric($expectedResult)) {\n            if ($expectedResult != 0) {\n                $frac = $result / $expectedResult;\n                if ($frac > 0.999999 && $frac < 1.000001) {\n                    $result = $expectedResult;\n                }\n            } elseif (abs((float) $result) < 1E-4) {\n                $result = 0;\n            }\n        }\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerXNPV(): array\n    {\n        return require 'tests/data/Calculation/Financial/XNPV.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XirrTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass XirrTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerXIRR')]\n    public function testXIRR(mixed $expectedResult, mixed $values = null, mixed $dates = null, mixed $guess = null): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = '=XIRR(';\n        if ($values !== null) {\n            if (is_array($values)) {\n                $row = 0;\n                foreach ($values as $value) {\n                    ++$row;\n                    $sheet->getCell(\"A$row\")->setValue($value);\n                }\n                $formula .= \"A1:A$row\";\n            } else {\n                $sheet->getCell('A1')->setValue($values);\n                $formula .= 'A1';\n            }\n            if ($dates !== null) {\n                if (is_array($dates)) {\n                    $row = 0;\n                    foreach ($dates as $date) {\n                        ++$row;\n                        $sheet->getCell(\"B$row\")->setValue($date);\n                    }\n                    $formula .= \",B1:B$row\";\n                } else {\n                    $sheet->getCell('B1')->setValue($dates);\n                    $formula .= ',B1';\n                }\n                if ($guess !== null) {\n                    if ($guess !== 'C1') {\n                        $sheet->getCell('C1')->setValue($guess);\n                    }\n                    $formula .= ', C1';\n                }\n            }\n        }\n        $formula .= ')';\n        $sheet->getCell('D1')->setValue($formula);\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        $this->adjustResult($result, $expectedResult);\n\n        self::assertEqualsWithDelta($expectedResult, $result, 0.1E-7);\n    }\n\n    public static function providerXIRR(): array\n    {\n        return require 'tests/data/Calculation/Financial/XIRR.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldDiscTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass YieldDiscTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerYIELDDISC')]\n    public function testYIELDDISC(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('YIELDDISC', $expectedResult, $args);\n    }\n\n    public static function providerYIELDDISC(): array\n    {\n        return require 'tests/data/Calculation/Financial/YIELDDISC.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldMatTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Financial;\n\nclass YieldMatTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerYIELDMAT')]\n    public function testYIELDMAT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('YIELDMAT', $expectedResult, $args);\n    }\n\n    public static function providerYIELDMAT(): array\n    {\n        return require 'tests/data/Calculation/Financial/YIELDMAT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/FormulaArguments.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse Stringable;\n\nclass FormulaArguments implements Stringable\n{\n    /**\n     * @var mixed[]\n     */\n    protected array $args;\n\n    public function __construct(mixed ...$args)\n    {\n        $this->args = $args;\n    }\n\n    public function populateWorksheet(Worksheet $worksheet): string\n    {\n        $cells = [];\n        $cellAddress = new CellAddress('A2');\n        foreach ($this->args as $value) {\n            if (is_array($value)) {\n                // We need to set a matrix in the worksheet\n                $worksheet->fromArray($value, null, (string) $cellAddress, true);\n                $from = (string) $cellAddress;\n                $columns = is_array($value[0]) ? count($value[0]) : count($value);\n                $rows = is_array($value[0]) ? count($value) : 1;\n                $to = $cellAddress->nextColumn($columns)->nextRow($rows);\n                $cells[] = \"{$from}:{$to}\";\n                $columnIncrement = $columns;\n            } else {\n                $worksheet->setCellValue($cellAddress, $value);\n                $cells[] = (string) $cellAddress;\n                $columnIncrement = 1;\n            }\n            $cellAddress = $cellAddress->nextColumn($columnIncrement);\n        }\n\n        return implode(',', $cells);\n    }\n\n    /** @param mixed[] $value */\n    private function matrixRows(array $value): string\n    {\n        $columns = [];\n        foreach ($value as $column) {\n            $columns[] = $this->stringify($column);\n        }\n\n        return implode(',', $columns);\n    }\n\n    /** @param mixed[] $value */\n    private function makeMatrix(array $value): string\n    {\n        $matrix = [];\n        foreach ($value as $row) {\n            if (is_array($row)) {\n                $matrix[] = $this->matrixRows($row);\n            } else {\n                $matrix[] = $this->stringify($row);\n            }\n        }\n\n        return implode(';', $matrix);\n    }\n\n    private function stringify(mixed $value): string\n    {\n        if (is_array($value)) {\n            return '{' . $this->makeMatrix($value) . '}';\n        } elseif (null === $value) {\n            return '';\n        } elseif (is_string($value)) {\n            return '\"' . str_replace('\"', '\"\"', $value) . '\"';\n        } elseif (is_bool($value)) {\n            return $value ? 'TRUE' : 'FALSE';\n        }\n\n        if (is_scalar($value) || $value instanceof Stringable) {\n            return (string) $value;\n        }\n\n        throw new Exception('Cannot convert object to string');\n    }\n\n    public function __toString(): string\n    {\n        $args = array_map(\n            self::stringify(...),\n            $this->args\n        );\n\n        return implode(',', $args);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/Div0Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Div0Test extends TestCase\n{\n    public function testDIV0(): void\n    {\n        $result = ExcelError::DIV0();\n        self::assertEquals('#DIV/0!', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ErrorTypeTest extends TestCase\n{\n    public function testErrorTypeNoArgument(): void\n    {\n        $result = ExcelError::type();\n        self::assertSame(ExcelError::NA(), $result);\n    }\n\n    #[DataProvider('providerErrorType')]\n    public function testErrorType(int|string $expectedResult, mixed $value): void\n    {\n        $result = ExcelError::type($value);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerErrorType(): array\n    {\n        return require 'tests/data/Calculation/Information/ERROR_TYPE.php';\n    }\n\n    #[DataProvider('providerErrorTypeArray')]\n    public function testErrorTypeArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ERROR.TYPE({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerErrorTypeArray(): array\n    {\n        return [\n            'vector' => [\n                [[2, 4, 7, ExcelError::NA(), ExcelError::NA(), ExcelError::NA(), 5]],\n                '{5/0, \"#REF!\", \"#N/A\", 1.2, TRUE, \"PHP\", \"#NAME?\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/InfoTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass InfoTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerINFO')]\n    public function testINFO(mixed $expectedResult, string $typeText): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue('=INFO(\"' . $typeText . '\")');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n\n        self::assertSame($expectedResult, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerINFO(): array\n    {\n        return require 'tests/data/Calculation/Information/INFO.php';\n    }\n\n    public function testINFONumfileWithThreeSheets(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->createSheet();\n        $spreadsheet->createSheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue('=INFO(\"numfile\")');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n\n        self::assertSame(3, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsBlankTest extends TestCase\n{\n    public function testIsBlankNoArgument(): void\n    {\n        $result = Value::isBlank();\n        self::assertTrue($result);\n    }\n\n    #[DataProvider('providerIsBlank')]\n    public function testIsBlank(bool $expectedResult, mixed $value): void\n    {\n        $result = Value::isBlank($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsBlank(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_BLANK.php';\n    }\n\n    #[DataProvider('providerIsBlankArray')]\n    public function testIsBlankArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISBLANK({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsBlankArray(): array\n    {\n        return [\n            'vector' => [\n                [[false, true, false]],\n                '{12, NULL, \"\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsErrTest extends TestCase\n{\n    public function testIsErrNoArgument(): void\n    {\n        $result = ErrorValue::isErr();\n        self::assertFalse($result);\n    }\n\n    #[DataProvider('providerIsErr')]\n    public function testIsErr(bool $expectedResult, mixed $value): void\n    {\n        $result = ErrorValue::isErr($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsErr(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_ERR.php';\n    }\n\n    #[DataProvider('providerIsErrArray')]\n    public function testIsErrArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISERR({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsErrArray(): array\n    {\n        return [\n            'vector' => [\n                [[true, true, false, false, false, false]],\n                '{5/0, \"#REF!\", \"#N/A\", 1.2, TRUE, \"PHP\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsErrorTest extends TestCase\n{\n    public function testIsErrorNoArgument(): void\n    {\n        $result = ErrorValue::isError();\n        self::assertFalse($result);\n    }\n\n    #[DataProvider('providerIsError')]\n    public function testIsError(bool $expectedResult, mixed $value): void\n    {\n        $result = ErrorValue::isError($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsError(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_ERROR.php';\n    }\n\n    #[DataProvider('providerIsErrorArray')]\n    public function testIsErrorArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISERROR({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsErrorArray(): array\n    {\n        return [\n            'vector' => [\n                [[true, true, true, false, false, false, false]],\n                '{5/0, \"#REF!\", \"#N/A\", 1.2, TRUE, \"PHP\", null}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsEvenTest extends TestCase\n{\n    public function testIsEvenNoArgument(): void\n    {\n        $result = Value::isEven();\n        self::assertSame(ExcelError::NAME(), $result);\n    }\n\n    #[DataProvider('providerIsEven')]\n    public function testIsEven(bool|string $expectedResult, mixed $value): void\n    {\n        $result = Value::isEven($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsEven(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_EVEN.php';\n    }\n\n    #[DataProvider('providerIsEvenArray')]\n    public function testIsEvenArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISEVEN({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsEvenArray(): array\n    {\n        return [\n            'vector' => [\n                [[true, false, true, false, true]],\n                '{-2, -1, 0, 1, 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsFormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange as NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsFormulaTest extends TestCase\n{\n    public function testIsFormula(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('SheetOne'); // no space in sheet title\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Sheet Two'); // space in sheet title\n        $values = [\n            [null, false],\n            [-1, false],\n            [0, false],\n            [1, false],\n            ['', false],\n            [false, false],\n            [true, false],\n            ['=-1', true],\n            ['=\"ABC\"', true],\n            ['=SUM(1,2,3)', true],\n        ];\n        $row = 0;\n        foreach ($values as $valArray) {\n            ++$row;\n            if ($valArray[0] !== null) {\n                $sheet1->getCell(\"A$row\")->setValue($valArray[0]);\n            }\n            $sheet1->getCell(\"B$row\")->setValue(\"=ISFORMULA(A$row)\");\n            self::assertSame($valArray[1], $sheet1->getCell(\"B$row\")->getCalculatedValue(), \"sheet1 error in B$row\");\n        }\n        $row = 0;\n        foreach ($values as $valArray) {\n            ++$row;\n            if ($valArray[0] !== null) {\n                $sheet2->getCell(\"A$row\")->setValue($valArray[0]);\n            }\n            $sheet2->getCell(\"B$row\")->setValue(\"=ISFORMULA(A$row)\");\n            self::assertSame($valArray[1], $sheet2->getCell(\"B$row\")->getCalculatedValue(), \"sheet2 error in B$row\");\n        }\n        $sheet1->getCell('C1')->setValue(0);\n        $sheet1->getCell('C2')->setValue('=0');\n        $sheet2->getCell('C3')->setValue(0);\n        $sheet2->getCell('C4')->setValue('=0');\n        $sheet1->getCell('D1')->setValue('=ISFORMULA(SheetOne!C1)');\n        $sheet1->getCell('D2')->setValue('=ISFORMULA(SheetOne!C2)');\n        $sheet1->getCell('E1')->setValue('=ISFORMULA(\\'SheetOne\\'!C1)');\n        $sheet1->getCell('E2')->setValue('=ISFORMULA(\\'SheetOne\\'!C2)');\n        $sheet1->getCell('F1')->setValue('=ISFORMULA(\\'Sheet Two\\'!C3)');\n        $sheet1->getCell('F2')->setValue('=ISFORMULA(\\'Sheet Two\\'!C4)');\n        self::assertFalse($sheet1->getCell('D1')->getCalculatedValue());\n        self::assertTrue($sheet1->getCell('D2')->getCalculatedValue());\n        self::assertFalse($sheet1->getCell('E1')->getCalculatedValue());\n        self::assertTrue($sheet1->getCell('E2')->getCalculatedValue());\n        self::assertFalse($sheet1->getCell('F1')->getCalculatedValue());\n        self::assertTrue($sheet1->getCell('F2')->getCalculatedValue());\n\n        $spreadsheet->addNamedRange(new NamedRange('range1f', $sheet1, '$C$1'));\n        $spreadsheet->addNamedRange(new NamedRange('range1t', $sheet1, '$C$2'));\n        $spreadsheet->addNamedRange(new NamedRange('range2f', $sheet2, '$C$3'));\n        $spreadsheet->addNamedRange(new NamedRange('range2t', $sheet2, '$C$4'));\n        $spreadsheet->addNamedRange(new NamedRange('range2ft', $sheet2, '$C$3:$C$4'));\n        $sheet1->getCell('G1')->setValue('=ISFORMULA(ABCDEFG)');\n        $sheet1->getCell('G3')->setValue('=ISFORMULA(range1f)');\n        $sheet1->getCell('G4')->setValue('=ISFORMULA(range1t)');\n        $sheet1->getCell('G5')->setValue('=ISFORMULA(range2f)');\n        $sheet1->getCell('G6')->setValue('=ISFORMULA(range2t)');\n        $sheet1->getCell('G7')->setValue('=ISFORMULA(range2ft)');\n        self::assertTrue(\n            $sheet1->getCell('G1')->getCalculatedValue()\n        );\n        self::assertFalse($sheet1->getCell('G3')->getCalculatedValue());\n        self::assertTrue($sheet1->getCell('G4')->getCalculatedValue());\n        self::assertFalse($sheet1->getCell('G5')->getCalculatedValue());\n        self::assertTrue($sheet1->getCell('G6')->getCalculatedValue());\n        self::assertFalse($sheet1->getCell('G7')->getCalculatedValue());\n\n        $sheet1->getCell('H1')->setValue('=ISFORMULA(C1:C2)');\n        $sheet1->getCell('H3')->setValue('=ISFORMULA(C2:C3)');\n        self::assertFalse($sheet1->getCell('H1')->getCalculatedValue());\n        self::assertTrue($sheet1->getCell('H3')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIsFormulaArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=5/2');\n        $sheet->getCell('A2')->setValueExplicit('=5/2', DataType::TYPE_STRING);\n        $sheet->getCell('A3')->setValue('=5/0');\n        $sheet->getCell('A4')->setValue(2.5);\n        $sheet->getCell('A5')->setValue('=NA()');\n        $sheet->getCell('A6')->setValue(true);\n        $sheet->getCell('A7')->setValue('=5/0');\n        $sheet->getCell('A7')->getStyle()->setQuotePrefix(true);\n\n        $calculation = Calculation::getInstance($spreadsheet);\n\n        $formula = '=ISFORMULA(A1:A7)';\n        $result = $calculation->calculateFormula($formula, 'C1', $sheet->getCell('C1'));\n        self::assertSame([true, false, true, false, true, false, false], $result);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsLogicalTest extends TestCase\n{\n    public function testIsLogicalNoArgument(): void\n    {\n        $result = Value::isLogical();\n        self::assertFalse($result);\n    }\n\n    #[DataProvider('providerIsLogical')]\n    public function testIsLogical(bool $expectedResult, mixed $value): void\n    {\n        $result = Value::isLogical($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsLogical(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_LOGICAL.php';\n    }\n\n    #[DataProvider('providerIsLogicalArray')]\n    public function testIsLogicalArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISLOGICAL({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsLogicalArray(): array\n    {\n        return [\n            'vector' => [\n                [[true, false, false, false, true, false]],\n                '{true, -1, null, 1, false, \"FALSE\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ErrorValue;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsNaTest extends TestCase\n{\n    public function testIsNaNoArgument(): void\n    {\n        $result = ErrorValue::isNa();\n        self::assertFalse($result);\n    }\n\n    #[DataProvider('providerIsNa')]\n    public function testIsNa(bool $expectedResult, mixed $value): void\n    {\n        $result = ErrorValue::isNa($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsNa(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_NA.php';\n    }\n\n    #[DataProvider('providerIsNaArray')]\n    public function testIsNaArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISNA({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsNaArray(): array\n    {\n        return [\n            'vector' => [\n                [[false, false, true, false, false, false]],\n                '{5/0, \"#REF!\", \"#N/A\", 1.2, TRUE, \"PHP\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsNonTextTest extends TestCase\n{\n    public function testIsNonTextNoArgument(): void\n    {\n        $result = Value::isNonText();\n        self::assertTrue($result);\n    }\n\n    #[DataProvider('providerIsNonText')]\n    public function testIsNonText(bool $expectedResult, mixed $value): void\n    {\n        $result = Value::isNonText($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsNonText(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_NONTEXT.php';\n    }\n\n    #[DataProvider('providerIsNonTextArray')]\n    public function testIsNonTextArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISNONTEXT({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsNonTextArray(): array\n    {\n        return [\n            'vector' => [\n                [[true, false, false, true, true]],\n                '{-2, \"PHP\", \"123.456\", false, 2.34}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsNumberTest extends TestCase\n{\n    public function testIsNumberNoArgument(): void\n    {\n        $result = Value::isNumber();\n        self::assertFalse($result);\n    }\n\n    #[DataProvider('providerIsNumber')]\n    public function testIsNumber(bool $expectedResult, mixed $value): void\n    {\n        $result = Value::isNumber($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsNumber(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_NUMBER.php';\n    }\n\n    #[DataProvider('providerIsNumberArray')]\n    public function testIsNumberArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISNUMBER({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsNumberArray(): array\n    {\n        return [\n            'vector' => [\n                [[true, false, false, false, true]],\n                '{-2, \"PHP\", \"123.456\", false, 2.34}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsOddTest extends TestCase\n{\n    public function testIsOddNoArgument(): void\n    {\n        $result = Value::isOdd();\n        self::assertSame(ExcelError::NAME(), $result);\n    }\n\n    #[DataProvider('providerIsOdd')]\n    public function testIsOdd(bool|string $expectedResult, mixed $value): void\n    {\n        $result = Value::isOdd($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsOdd(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_ODD.php';\n    }\n\n    #[DataProvider('providerIsOddArray')]\n    public function testIsOddArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISODD({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsOddArray(): array\n    {\n        return [\n            'vector' => [\n                [[false, true, false, true, false]],\n                '{-2, -1, 0, 1, 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsRefTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef\\AllSetupTeardown;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass IsRefTest extends AllSetupTeardown\n{\n    #[DataProvider('providerIsRef')]\n    public function testIsRef(mixed $expected, string $ref): void\n    {\n        if ($expected === 'incomplete') {\n            self::markTestIncomplete('Calculation is too complicated');\n        }\n        $sheet = $this->getSheet();\n\n        $sheet->getParentOrThrow()->addDefinedName(new NamedRange('NAMED_RANGE', $sheet, 'C1'));\n        $sheet->getCell('A1')->setValue(\"=ISREF($ref)\");\n        self::assertSame($expected, $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public static function providerIsRef(): array\n    {\n        return [\n            'cell reference' => [true, 'B1'],\n            'invalid cell reference' => [false, 'ZZZ1'],\n            'last valid column' => [true, 'XFD1'],\n            'beyond last valid column' => [false, 'XFE1'],\n            'last valid row' => [true, 'A1048576'],\n            'beyond last valid row' => [false, 'A1048577'],\n            'cell range' => [true, 'B1:B2'],\n            'complex cell range' => [true, 'B1:D4 C1:C5'],\n            'text string' => [false, '\"PHP\"'],\n            'math expression' => [false, 'B1*B2'],\n            'unquoted sheet name' => [true, 'Worksheet2!B1'],\n            'quoted sheet name' => [true, \"'Worksheet2'!B1:B2\"],\n            'quoted sheet name with apostrophe' => [true, \"'Work''sheet2'!B1:B2\"],\n            'named range' => [true, 'NAMED_RANGE'],\n            'unknown named range' => [false, 'xNAMED_RANGE'],\n            'indirect to a cell reference' => [true, 'INDIRECT(\"A1\")'],\n            'indirect to a worksheet/cell reference' => [true, 'INDIRECT(\"\\'Worksheet\\'!A1\")'],\n            'indirect to invalid worksheet/cell reference' => [false, 'INDIRECT(\"\\'Invalid Worksheet\\'!A1\")'],\n            'returned cell reference' => ['incomplete', 'CHOOSE(2, A1, B1, C1)'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsTextTest extends TestCase\n{\n    public function testIsTextNoArgument(): void\n    {\n        $result = Value::isText();\n        self::assertFalse($result);\n    }\n\n    #[DataProvider('providerIsText')]\n    public function testIsText(bool $expectedResult, mixed $value): void\n    {\n        $result = Value::isText($value);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsText(): array\n    {\n        return require 'tests/data/Calculation/Information/IS_TEXT.php';\n    }\n\n    #[DataProvider('providerIsTextArray')]\n    public function testIsTextArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ISTEXT({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIsTextArray(): array\n    {\n        return [\n            'vector' => [\n                [[false, true, true, false, false]],\n                '{-2, \"PHP\", \"123.456\", false, 2.34}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/NTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NTest extends TestCase\n{\n    public function testNNoArgument(): void\n    {\n        $result = Value::asNumber();\n        self::assertSame(0, $result);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerN')]\n    public function testN(mixed $expectedResult, mixed $value): void\n    {\n        $result = Value::asNumber($value);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerN(): array\n    {\n        return require 'tests/data/Calculation/Information/N.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/NaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NaTest extends TestCase\n{\n    public function testNA(): void\n    {\n        $result = ExcelError::NA();\n        self::assertEquals('#N/A', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/NameTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NameTest extends TestCase\n{\n    public function testNAME(): void\n    {\n        $result = ExcelError::NAME();\n        self::assertEquals('#NAME?', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/NanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NanTest extends TestCase\n{\n    public function testNAN(): void\n    {\n        $result = ExcelError::NAN();\n        self::assertEquals('#NUM!', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/NullTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NullTest extends TestCase\n{\n    public function testNULL(): void\n    {\n        $result = ExcelError::null();\n        self::assertEquals('#NULL!', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/RefTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RefTest extends TestCase\n{\n    public function testREF(): void\n    {\n        $result = ExcelError::REF();\n        self::assertEquals('#REF!', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/TypeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TypeTest extends TestCase\n{\n    public function testTypeNoArgument(): void\n    {\n        $result = Value::type();\n        self::assertSame(1, $result);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTYPE')]\n    public function testTYPE(int $expectedResult, mixed $value): void\n    {\n        $result = Value::type($value);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTYPE(): array\n    {\n        return require 'tests/data/Calculation/Information/TYPE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Information/ValueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Information;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ValueTest extends TestCase\n{\n    public function testVALUE(): void\n    {\n        $result = ExcelError::VALUE();\n        self::assertEquals('#VALUE!', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AllSetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AllSetupTeardown extends TestCase\n{\n    private string $compatibilityMode;\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected static function setOpenOffice(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n    }\n\n    protected static function setGnumeric(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_GNUMERIC);\n    }\n\n    protected function mightHaveException(mixed $expectedResult): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(CalcException::class);\n        }\n    }\n\n    protected function setCell(string $cell, mixed $value): void\n    {\n        if ($value !== null) {\n            if (is_string($value) && is_numeric($value)) {\n                $this->getSheet()->getCell($cell)->setValueExplicit($value, DataType::TYPE_STRING);\n            } else {\n                $this->getSheet()->getCell($cell)->setValue($value);\n            }\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n\n    protected function runTestCase(string $functionName, mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = \"=$functionName(\";\n        $comma = '';\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            $cellId = \"A$row\";\n            $formula .= \"$comma$cellId\";\n            $comma = ',';\n            $this->setCell($cellId, $arg);\n        }\n        $formula .= ')';\n        $this->setCell('B1', $formula);\n        self::assertSame($expectedResult, $sheet->getCell('B1')->getCalculatedValue());\n    }\n\n    protected function setArrayAsValue(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AndTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AndTest extends AllSetupTeardown\n{\n    #[DataProvider('providerAND')]\n    public function testAND(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setArrayAsValue();\n        $this->runTestCase('AND', $expectedResult, ...$args);\n    }\n\n    public static function providerAND(): array\n    {\n        return require 'tests/data/Calculation/Logical/AND.php';\n    }\n\n    #[DataProvider('providerANDLiteral')]\n    public function testANDLiteral(bool|string $expectedResult, float|int|string $formula): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue(\"=AND($formula)\");\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public static function providerANDLiteral(): array\n    {\n        return require 'tests/data/Calculation/Logical/ANDLiteral.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/FalseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nclass FalseTest extends AllSetupTeardown\n{\n    public function testFALSE(): void\n    {\n        $this->runTestCase('FALSE', false);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass IfErrorTest extends AllSetupTeardown\n{\n    #[DataProvider('providerIFERROR')]\n    public function testIFERROR(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('IFERROR', $expectedResult, ...$args);\n    }\n\n    public static function providerIFERROR(): array\n    {\n        return require 'tests/data/Calculation/Logical/IFERROR.php';\n    }\n\n    #[DataProvider('providerIfErrorArray')]\n    public function testIfErrorArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IFERROR({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIfErrorArray(): array\n    {\n        return [\n            'vector' => [\n                [[2.5, 6]],\n                '{5/2, 5/0}',\n                'MAX(ABS({-2,4,-6}))',\n            ],\n            'return value' => [\n                [[2.5, [[2, 3, 4]]]],\n                '{5/2, 5/0}',\n                '{2,3,4}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass IfNaTest extends AllSetupTeardown\n{\n    #[DataProvider('providerIFNA')]\n    public function testIFNA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('IFNA', $expectedResult, ...$args);\n    }\n\n    public static function providerIFNA(): array\n    {\n        return require 'tests/data/Calculation/Logical/IFNA.php';\n    }\n\n    #[DataProvider('providerIfNaArray')]\n    public function testIfNaArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IFNA({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIfNaArray(): array\n    {\n        return [\n            'vector' => [\n                [[2.5, '#DIV/0!', 6]],\n                '{5/2, 5/0, \"#N/A\"}',\n                'MAX(ABS({-2,4,-6}))',\n            ],\n            'return value' => [\n                [[2.5, '#DIV/0!', [[2, 3, 4]]]],\n                '{5/2, 5/0, \"#N/A\"}',\n                '{2,3,4}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nclass IfTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerIF')]\n    public function testIF(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('IF', $expectedResult, ...$args);\n    }\n\n    public static function providerIF(): array\n    {\n        return require 'tests/data/Calculation/Logical/IF.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass IfsTest extends AllSetupTeardown\n{\n    #[DataProvider('providerIFS')]\n    public function testIFS(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('IFS', $expectedResult, ...$args);\n    }\n\n    public static function providerIFS(): array\n    {\n        return require 'tests/data/Calculation/Logical/IFS.php';\n    }\n\n    #[DataProvider('providerIfsArray')]\n    public function testIfsArray(array $expectedResult, string $bool1, string $argument1, string $bool2, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=IFS($bool1, {\" . \"$argument1}, $bool2, {\" . \"$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIfsArray(): array\n    {\n        return [\n            'array return first item' => [\n                [[1, 2, 3]],\n                'true',\n                '1, 2, 3',\n                'true',\n                '4, 5, 6',\n            ],\n            'array return second item' => [\n                [[4, 5, 6]],\n                'false',\n                '1, 2, 3',\n                'true',\n                '4, 5, 6',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass NotTest extends AllSetupTeardown\n{\n    #[DataProvider('providerNOT')]\n    public function testNOT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('NOT', $expectedResult, ...$args);\n    }\n\n    public static function providerNOT(): array\n    {\n        return require 'tests/data/Calculation/Logical/NOT.php';\n    }\n\n    #[DataProvider('providerNotArray')]\n    public function testNotArray(array $expectedResult, string $argument1): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=NOT({$argument1})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerNotArray(): array\n    {\n        return [\n            'vector' => [\n                [[false, true, true, false]],\n                '{TRUE, FALSE, FALSE, TRUE}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/OrTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nclass OrTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOR')]\n    public function testOR(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('OR', $expectedResult, ...$args);\n    }\n\n    public static function providerOR(): array\n    {\n        return require 'tests/data/Calculation/Logical/OR.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerORLiteral')]\n    public function testORLiteral(bool|string $expectedResult, float|int|string $formula): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue(\"=OR($formula)\");\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public static function providerORLiteral(): array\n    {\n        return require 'tests/data/Calculation/Logical/ORLiteral.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SwitchTest extends AllSetupTeardown\n{\n    #[DataProvider('providerSwitch')]\n    public function testSWITCH(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCase('SWITCH', $expectedResult, ...$args);\n    }\n\n    public static function providerSwitch(): array\n    {\n        return require 'tests/data/Calculation/Logical/SWITCH.php';\n    }\n\n    #[DataProvider('providerSwitchArray')]\n    public function testIfsArray(array $expectedResult, int $expression, int $value1, string $result1, int $value2, string $result2, string $default): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SWITCH($expression, $value1, {\" . \"$result1}, $value2, {\" . \"$result2}, {\" . \"$default})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSwitchArray(): array\n    {\n        return [\n            'Array return' => [\n                [[4, 5, 6]],\n                2,\n                1,\n                '1, 2, 3',\n                2,\n                '4, 5, 6',\n                '7, 8, 9',\n            ],\n            'Array return default' => [\n                [[7, 8, 9]],\n                3,\n                1,\n                '1, 2, 3',\n                2,\n                '4, 5, 6',\n                '7, 8, 9',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/TrueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nclass TrueTest extends AllSetupTeardown\n{\n    public function testTRUE(): void\n    {\n        $this->runTestCase('TRUE', true);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Logical/XorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Logical;\n\nclass XorTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerXOR')]\n    public function testXOR(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setArrayAsValue();\n        $this->runTestCase('XOR', $expectedResult, ...$args);\n    }\n\n    public static function providerXOR(): array\n    {\n        return require 'tests/data/Calculation/Logical/XOR.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerXORLiteral')]\n    public function testXORLiteral(mixed $expectedResult, float|string $formula): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue(\"=XOR($formula)\");\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public static function providerXORLiteral(): array\n    {\n        return require 'tests/data/Calculation/Logical/XORLiteral.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressInternationalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\n\nclass AddressInternationalTest extends AllSetupTeardown\n{\n    private string $locale;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n        $this->locale = Settings::getLocale();\n    }\n\n    protected function tearDown(): void\n    {\n        Settings::setLocale($this->locale);\n        // CompatibilityMode is restored in parent\n        parent::tearDown();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerInternational')]\n    public function testR1C1International(string $locale, string $r, string $c): void\n    {\n        if ($locale !== '') {\n            Settings::setLocale($locale);\n        }\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=LEFT(ADDRESS(1,1,1,0),1)');\n        $sheet->getCell('A2')->setValue('=MID(ADDRESS(1,1,1,0),3,1)');\n        self::assertSame($r, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame($c, $sheet->getCell('A2')->getCalculatedValue());\n    }\n\n    public static function providerInternational(): array\n    {\n        return [\n            'Default' => ['', 'R', 'C'],\n            'English' => ['en', 'R', 'C'],\n            'French' => ['fr', 'L', 'C'],\n            'German' => ['de', 'Z', 'S'],\n            'Made-up' => ['xx', 'R', 'C'],\n            'Spanish' => ['es', 'F', 'C'],\n            'Bulgarian' => ['bg', 'R', 'C'],\n            'Czech' => ['cs', 'R', 'C'], // maybe should be R/S\n            'Polish' => ['pl', 'R', 'C'], // maybe should be W/K\n            'Turkish' => ['tr', 'R', 'C'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCompatibility')]\n    public function testCompatibilityInternational(string $compatibilityMode, string $r, string $c): void\n    {\n        Functions::setCompatibilityMode($compatibilityMode);\n        Settings::setLocale('de');\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=LEFT(ADDRESS(1,1,1,0),1)');\n        $sheet->getCell('A2')->setValue('=MID(ADDRESS(1,1,1,0),3,1)');\n        self::assertSame($r, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame($c, $sheet->getCell('A2')->getCalculatedValue());\n    }\n\n    public static function providerCompatibility(): array\n    {\n        return [\n            [Functions::COMPATIBILITY_EXCEL, 'Z', 'S'],\n            [Functions::COMPATIBILITY_OPENOFFICE, 'R', 'C'],\n            [Functions::COMPATIBILITY_GNUMERIC, 'R', 'C'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AddressTest extends TestCase\n{\n    #[DataProvider('providerADDRESS')]\n    public function testADDRESS(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = LookupRef\\Address::cell(...$args);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerADDRESS(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/ADDRESS.php';\n    }\n\n    #[DataProvider('providerAddressArray')]\n    public function testAddressArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ADDRESS({$argument1}, {$argument2}, 4)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerAddressArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [['A1', 'B1', 'C1'], ['A2', 'B2', 'C2'], ['A3', 'B3', 'C3']],\n                '{1; 2; 3}',\n                '{1, 2, 3}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AllSetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AllSetupTeardown extends TestCase\n{\n    protected string $compatibilityMode;\n\n    protected string $arrayReturnType;\n\n    protected ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        $this->arrayReturnType = Calculation::getArrayReturnType();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        Calculation::setArrayReturnType($this->arrayReturnType);\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected static function setOpenOffice(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n    }\n\n    protected static function setGnumeric(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_GNUMERIC);\n    }\n\n    protected function mightHaveException(mixed $expectedResult): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(CalcException::class);\n        }\n    }\n\n    protected function setCell(string $cell, mixed $value): void\n    {\n        if ($value !== null) {\n            if (is_string($value) && is_numeric($value)) {\n                $this->getSheet()->getCell($cell)->setValueExplicit($value, DataType::TYPE_STRING);\n            } else {\n                $this->getSheet()->getCell($cell)->setValue($value);\n            }\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n\n    protected function setArrayAsValue(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n    }\n\n    protected function setArrayAsArray(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseColsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ChooseColsTest extends AllSetupTeardown\n{\n    #[DataProvider('providerChooseCols')]\n    public function testChooseCols(mixed $expectedResult, string $formula): void\n    {\n        Calculation::setArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->fromArray(\n            [\n                ['a', 'b', 'c'],\n                ['d', 'e', 'f'],\n                ['g', 'h', 'i'],\n                ['j', 'k', 'l'],\n                ['m', 'n', 'o'],\n                ['p', 'q', 'r'],\n                ['s', 't', 'u'],\n                ['v', 'w', 'x'],\n                ['y', 'z', '#'],\n            ],\n            null,\n            'B3',\n            true\n        );\n        $this->getSpreadsheet()->addNamedRange(\n            new NamedRange(\n                'definedname',\n                $sheet,\n                '$B$3:$D$11'\n            )\n        );\n\n        $sheet->setCellValue('F3', $formula);\n        $result = $sheet->getCell('F3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerChooseCols(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/CHOOSECOLS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseRowsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ChooseRowsTest extends AllSetupTeardown\n{\n    #[DataProvider('providerChooseRows')]\n    public function testChooseRows(mixed $expectedResult, string $formula): void\n    {\n        Calculation::setArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->fromArray(\n            [\n                ['a', 'b', 'c'],\n                ['d', 'e', 'f'],\n                ['g', 'h', 'i'],\n                ['j', 'k', 'l'],\n                ['m', 'n', 'o'],\n                ['p', 'q', 'r'],\n                ['s', 't', 'u'],\n                ['v', 'w', 'x'],\n                ['y', 'z', '#'],\n            ],\n            null,\n            'B3',\n            true\n        );\n        $this->getSpreadsheet()->addNamedRange(\n            new NamedRange(\n                'definedname',\n                $sheet,\n                '$B$3:$D$11'\n            )\n        );\n\n        $sheet->setCellValue('F3', $formula);\n        $result = $sheet->getCell('F3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerChooseRows(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/CHOOSEROWS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ChooseTest extends TestCase\n{\n    #[DataProvider('providerCHOOSE')]\n    public function testCHOOSE(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = LookupRef\\Selection::choose(...$args);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCHOOSE(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/CHOOSE.php';\n    }\n\n    /** @param mixed[] $selections */\n    #[DataProvider('providerChooseArray')]\n    public function testChooseArray(array $expectedResult, string $values, array $selections): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $selections = implode(',', $selections);\n        $formula = \"=CHOOSE({$values}, {$selections})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerChooseArray(): array\n    {\n        return [\n            'row vector' => [\n                [['Orange', 'Blue', 'Yellow']],\n                '{2, 5, 3}',\n                ['\"Red\"', '\"Orange\"', '\"Yellow\"', '\"Green\"', '\"Blue\"'],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnOnSpreadsheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ColumnOnSpreadsheetTest extends AllSetupTeardown\n{\n    #[DataProvider('providerCOLUMNonSpreadsheet')]\n    public function testColumnOnSpreadsheet(mixed $expectedResult, string $cellReference = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrangex', $sheet, '$E$2:$E$6'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrangey', $sheet, '$F$2:$H$2'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrange3', $sheet, '$F$4:$H$4'));\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('localname', $sheet1, '$F$6:$H$6', true));\n\n        if ($cellReference === 'omitted') {\n            $sheet->getCell('B3')->setValue('=COLUMN()');\n        } else {\n            $sheet->getCell('B3')->setValue(\"=COLUMN($cellReference)\");\n        }\n\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerCOLUMNonSpreadsheet(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/COLUMNonSpreadsheet.php';\n    }\n\n    public function testCOLUMNLocalDefinedName(): void\n    {\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('newnr', $sheet1, '$F$5:$H$5', true)); // defined locally, only usable on sheet1\n\n        $sheet1->getCell('B3')->setValue('=COLUMN(newnr)');\n        $result = $sheet1->getCell('B3')->getCalculatedValue();\n        self::assertSame(6, $result);\n\n        $sheet->getCell('B3')->setValue('=COLUMN(newnr)');\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame('#NAME?', $result);\n    }\n\n    public function testCOLUMNSheetWithApostrophe(): void\n    {\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle(\"apo'strophe\");\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('newnr', $sheet1, '$F$5:$H$5', true)); // defined locally, only usable on sheet1\n\n        $sheet1->getCell('B3')->setValue('=COLUMN(newnr)');\n        $result = $sheet1->getCell('B3')->getCalculatedValue();\n        self::assertSame(6, $result);\n\n        $sheet->getCell('B3')->setValue('=COLUMN(newnr)');\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame('#NAME?', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ColumnTest extends AllSetupTeardown\n{\n    /** @param null|mixed[]|string $cellReference */\n    #[DataProvider('providerCOLUMN')]\n    public function testCOLUMN(mixed $expectedResult, null|array|string $cellReference = null): void\n    {\n        $result = LookupRef\\RowColumnInformation::COLUMN($cellReference);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerCOLUMN(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/COLUMN.php';\n    }\n\n    public function testCOLUMNwithNull(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('D1')->setValue('=COLUMN()');\n        self::assertSame(4, $sheet->getCell('D1')->getCalculatedValue());\n        $sheet->getCell('D2')->setValue('=COLUMN(C13)');\n        self::assertSame(3, $sheet->getCell('D2')->getCalculatedValue());\n        // Sheetnames don't have to exist\n        $sheet->getCell('D3')->setValue('=COLUMN(Sheet17!E15)');\n        self::assertSame(5, $sheet->getCell('D3')->getCalculatedValue());\n        $sheet->getCell('D4')->setValue(\"=COLUMN('Worksheet #5'!X500)\");\n        self::assertSame(24, $sheet->getCell('D4')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsOnSpreadsheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\n\nclass ColumnsOnSpreadsheetTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOLUMNSonSpreadsheet')]\n    public function testColumnsOnSpreadsheet(mixed $expectedResult, string $cellReference = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setTitle('ThisSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrangex', $sheet, '$E$2:$E$6'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrangey', $sheet, '$F$2:$H$2'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrange3', $sheet, '$F$4:$H$4'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrange5', $sheet, '$F$5:$I$5', true));\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('localname', $sheet1, '$F$6:$H$6', true));\n\n        if ($cellReference === 'omitted') {\n            $sheet->getCell('B3')->setValue('=COLUMNS()');\n        } else {\n            $sheet->getCell('B3')->setValue(\"=COLUMNS($cellReference)\");\n        }\n\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerCOLUMNSonSpreadsheet(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/COLUMNSonSpreadsheet.php';\n    }\n\n    public function testCOLUMNSLocalDefinedName(): void\n    {\n        $sheet = $this->getSheet();\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('newnr', $sheet1, '$F$5:$H$5', true)); // defined locally, only usable on sheet1\n\n        $sheet1->getCell('B3')->setValue('=COLUMNS(newnr)');\n        $result = $sheet1->getCell('B3')->getCalculatedValue();\n        self::assertSame(3, $result);\n\n        $sheet->getCell('B3')->setValue('=COLUMNS(newnr)');\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame('#NAME?', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnsTest extends TestCase\n{\n    /** @param null|mixed[]|string $arg */\n    #[DataProvider('providerCOLUMNS')]\n    public function testCOLUMNS(mixed $expectedResult, null|array|string $arg): void\n    {\n        $result = LookupRef\\RowColumnInformation::COLUMNS($arg);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCOLUMNS(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/COLUMNS.php';\n    }\n\n    #[DataProvider('providerColumnsArray')]\n    public function testColumnsArray(int $expectedResult, string $argument): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=COLUMNS({$argument})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerColumnsArray(): array\n    {\n        return [\n            [\n                3,\n                '{1,2,3;4,5,6}',\n            ],\n            [\n                5,\n                '{1,2,3,4,5}',\n            ],\n            [\n                1,\n                '{1;2;3;4;5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/DropTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DropTest extends AllSetupTeardown\n{\n    #[DataProvider('providerDrop')]\n    public function testDrop(mixed $expectedResult, string $formula): void\n    {\n        Calculation::setArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->fromArray(\n            [\n                ['a', 'b', 'c'],\n                ['d', 'e', 'f'],\n                ['g', 'h', 'i'],\n                ['j', 'k', 'l'],\n                ['m', 'n', 'o'],\n                ['p', 'q', 'r'],\n                ['s', 't', 'u'],\n                ['v', 'w', 'x'],\n                ['y', 'z', '#'],\n            ],\n            null,\n            'B3',\n            true\n        );\n        $this->getSpreadsheet()->addNamedRange(\n            new NamedRange(\n                'definedname',\n                $sheet,\n                '$B$3:$D$11'\n            )\n        );\n\n        $sheet->setCellValue('F3', $formula);\n        $result = $sheet->getCell('F3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDrop(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/DROP.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ExpandTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ExpandTest extends AllSetupTeardown\n{\n    #[DataProvider('providerExpand')]\n    public function testExpand(mixed $expectedResult, string $formula): void\n    {\n        Calculation::setArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->fromArray(\n            [\n                ['a', 'b', 'c'],\n                ['d', 'e', 'f'],\n            ],\n            null,\n            'B3',\n            true\n        );\n        $this->getSpreadsheet()->addNamedRange(\n            new NamedRange(\n                'definedname',\n                $sheet,\n                '$B$3:$D$11'\n            )\n        );\n\n        $sheet->setCellValue('F3', $formula);\n        $result = $sheet->getCell('F3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerExpand(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/EXPAND.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/FilterOnSpreadsheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FilterOnSpreadsheetTest extends TestCase\n{\n    public function testFilterByRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $criteria = [[true], [false], [false], [false], [true], [false], [false], [false], [false], [false], [false], [true], [false], [false], [false], [true]];\n        $sheet->fromArray($criteria, null, 'A1', true);\n        $sheet->fromArray($this->sampleDataForRow(), null, 'C1', true);\n        $sheet->getCell('H1')->setValue('=FILTER(C1:F16, A1:A16)');\n        $expectedResult = [\n            ['East', 'Tom', 'Apple', 6830],\n            ['East', 'Fritz', 'Apple', 4394],\n            ['South', 'Sal', 'Apple', 1310],\n            ['South', 'Hector', 'Apple', 8144],\n        ];\n        $result = $sheet->getCell('H1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFilterByColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $criteria = [[false, false, true, false, true, false, false, false, true, true]];\n        $sheet->fromArray($criteria, null, 'A1', true);\n        $sheet->fromArray($this->sampleDataForColumn(), null, 'A3', true);\n        $sheet->getCell('A8')->setValue('=FILTER(A3:J5, A1:J1)');\n        $expectedResult = [\n            ['Betty', 'Charlotte', 'Oliver', 'Zoe'],\n            ['B', 'B', 'B', 'B'],\n            [1, 2, 4, 8],\n        ];\n        $result = $sheet->getCell('A8')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFilterInvalidMatchArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray($this->sampleDataForColumn(), null, 'A3', true);\n        $sheet->getCell('A12')->setValue('=FILTER(A3:J5, \"INVALID\")');\n        $expectedResult = ExcelError::VALUE();\n        $result = $sheet->getCell('A12')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFilterInvalidLookupArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $criteria = [[false, false, true, false, true, false, false, false, true, true]];\n        $sheet->fromArray($criteria, null, 'A1', true);\n        $sheet->fromArray($this->sampleDataForColumn(), null, 'A3', true);\n        $sheet->getCell('A14')->setValue('=FILTER(\"invalid\", A1:J1)');\n        $expectedResult = ExcelError::VALUE();\n        $result = $sheet->getCell('A14')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFilterEmpty(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $criteria = [[false, false, true, false, true, false, false, false, true, true]];\n        $sheet->fromArray($criteria, null, 'A1', true);\n        $sheet->fromArray($this->sampleDataForColumn(), null, 'A3', true);\n        $sheet->getCell('A16')->setValue('=FILTER(A3:B5, A1:B1)');\n        $expectedResult = ExcelError::CALC();\n        $result = $sheet->getCell('A16')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<array{string, string, string, int}> */\n    protected function sampleDataForRow(): array\n    {\n        return [\n            ['East', 'Tom', 'Apple', 6830],\n            ['West', 'Fred', 'Grape', 5619],\n            ['North', 'Amy', 'Pear', 4565],\n            ['South', 'Sal', 'Banana', 5323],\n            ['East', 'Fritz', 'Apple', 4394],\n            ['West', 'Sravan', 'Grape', 7195],\n            ['North', 'Xi', 'Pear', 5231],\n            ['South', 'Hector', 'Banana', 2427],\n            ['East', 'Tom', 'Banana', 4213],\n            ['West', 'Fred', 'Pear', 3239],\n            ['North', 'Amy', 'Grape', 6420],\n            ['South', 'Sal', 'Apple', 1310],\n            ['East', 'Fritz', 'Banana', 6274],\n            ['West', 'Sravan', 'Pear', 4894],\n            ['North', 'Xi', 'Grape', 7580],\n            ['South', 'Hector', 'Apple', 8144],\n        ];\n    }\n\n    /** @return array<array<int|string>> */\n    protected function sampleDataForColumn(): array\n    {\n        return [\n            ['Aiden', 'Andrew', 'Betty', 'Caden', 'Charlotte', 'Emma', 'Isabella', 'Mason', 'Oliver', 'Zoe'],\n            ['A', 'C', 'B', 'A', 'B', 'C', 'A', 'A', 'B', 'B'],\n            [0, 4, 1, 2, 2, 0, 2, 4, 4, 8],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/FilterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Filter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FilterTest extends TestCase\n{\n    public function testFilterByRow(): void\n    {\n        $criteria = [[true], [false], [false], [false], [true], [false], [false], [false], [false], [false], [false], [true], [false], [false], [false], [true]];\n        $expectedResult = [\n            ['East', 'Tom', 'Apple', 6830],\n            ['East', 'Fritz', 'Apple', 4394],\n            ['South', 'Sal', 'Apple', 1310],\n            ['South', 'Hector', 'Apple', 8144],\n        ];\n        $result = Filter::filter($this->sampleDataForRow(), $criteria);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public function testFilterByColumn(): void\n    {\n        $criteria = [[false, false, true, false, true, false, false, false, true, true]];\n        $expectedResult = [\n            ['Betty', 'Charlotte', 'Oliver', 'Zoe'],\n            ['B', 'B', 'B', 'B'],\n            [1, 2, 4, 8],\n        ];\n        $result = Filter::filter($this->sampleDataForColumn(), $criteria);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public function testFilterException(): void\n    {\n        $criteria = 'INVALID';\n        $result = Filter::filter($this->sampleDataForColumn(), $criteria);\n        self::assertSame(ExcelError::VALUE(), $result);\n    }\n\n    public function testFilterEmpty(): void\n    {\n        $criteria = [[false], [false], [false]];\n        $expectedResult = ExcelError::CALC();\n        $result = Filter::filter([[1], [2], [3]], $criteria);\n        self::assertSame($expectedResult, $result);\n\n        $expectedResult = 'Invalid Data';\n        $result = Filter::filter([[1], [2], [3]], $criteria, $expectedResult);\n        self::assertSame($expectedResult, $result);\n    }\n\n    /** @return array<array{string, string, string, int}> */\n    protected function sampleDataForRow(): array\n    {\n        return [\n            ['East', 'Tom', 'Apple', 6830],\n            ['West', 'Fred', 'Grape', 5619],\n            ['North', 'Amy', 'Pear', 4565],\n            ['South', 'Sal', 'Banana', 5323],\n            ['East', 'Fritz', 'Apple', 4394],\n            ['West', 'Sravan', 'Grape', 7195],\n            ['North', 'Xi', 'Pear', 5231],\n            ['South', 'Hector', 'Banana', 2427],\n            ['East', 'Tom', 'Banana', 4213],\n            ['West', 'Fred', 'Pear', 3239],\n            ['North', 'Amy', 'Grape', 6420],\n            ['South', 'Sal', 'Apple', 1310],\n            ['East', 'Fritz', 'Banana', 6274],\n            ['West', 'Sravan', 'Pear', 4894],\n            ['North', 'Xi', 'Grape', 7580],\n            ['South', 'Hector', 'Apple', 8144],\n        ];\n    }\n\n    /** @return array<array<int|string>> */\n    protected function sampleDataForColumn(): array\n    {\n        return [\n            ['Aiden', 'Andrew', 'Betty', 'Caden', 'Charlotte', 'Emma', 'Isabella', 'Mason', 'Oliver', 'Zoe'],\n            ['A', 'C', 'B', 'A', 'B', 'C', 'A', 'A', 'B', 'B'],\n            [0, 4, 1, 2, 2, 0, 2, 4, 4, 8],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/FormulaTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Formula;\n\n/**\n * Class FormulaTextTest.\n */\nclass FormulaTextTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormulaText')]\n    public function testFormulaText(string $expectedResult, mixed $value): void\n    {\n        $sheet = $this->getSheet();\n        $reference = 'A1';\n        if ($value !== null) {\n            $sheet->getCell($reference)->setValue($value);\n        }\n        $sheet->getCell('D1')->setValue(\"=FORMULATEXT($reference)\");\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerFormulaText(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/FORMULATEXT.php';\n    }\n\n    public function testNoCell(): void\n    {\n        self::assertSame('#REF!', Formula::text('B5'));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass HLookupTest extends AllSetupTeardown\n{\n    /** @param mixed[] $values */\n    #[DataProvider('providerHLOOKUP')]\n    public function testHLOOKUP(mixed $expectedResult, mixed $lookup, array $values, mixed $rowIndex, ?bool $rangeLookup = null): void\n    {\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $maxRow = 0;\n        $maxCol = 0;\n        $maxColLetter = 'A';\n        $row = 0;\n        foreach ($values as $rowValues) {\n            ++$row;\n            ++$maxRow;\n            $col = 0;\n            if (!is_array($rowValues)) {\n                $rowValues = [$rowValues];\n            }\n            foreach ($rowValues as $cellValue) {\n                ++$col;\n                $colLetter = Coordinate::stringFromColumnIndex($col);\n                if ($col > $maxCol) {\n                    $maxCol = $col;\n                    $maxColLetter = $colLetter;\n                }\n                if ($cellValue !== null) {\n                    $sheet->getCell(\"$colLetter$row\")->setValue($cellValue);\n                }\n            }\n        }\n\n        $boolArg = self::parseRangeLookup($rangeLookup);\n        $sheet->getCell('ZZ8')->setValue($lookup);\n        if (is_array($rowIndex)) {\n            $sheet->fromArray($rowIndex, null, 'ZZ10', true);\n            $indexarg = 'ZZ10:ZZ' . (string) (9 + count($rowIndex));\n        } else {\n            $sheet->getCell('ZZ10')->setValue($rowIndex);\n            $indexarg = 'ZZ10';\n        }\n        $sheet->getCell('ZZ1')->setValue(\"=HLOOKUP(ZZ8, A1:$maxColLetter$maxRow, $indexarg$boolArg)\");\n        self::assertEquals($expectedResult, $sheet->getCell('ZZ1')->getCalculatedValue());\n    }\n\n    private static function parseRangeLookup(?bool $rangeLookup): string\n    {\n        if ($rangeLookup === null) {\n            return '';\n        }\n\n        return $rangeLookup ? ', true' : ', false';\n    }\n\n    public static function providerHLOOKUP(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/HLOOKUP.php';\n    }\n\n    #[DataProvider('providerHLookupNamedRange')]\n    public function testHLookupNamedRange(string $expectedResult, string $cellAddress): void\n    {\n        $lookupData = [\n            ['Rating', 1, 2, 3, 4],\n            ['Level', 'Poor', 'Average', 'Good', 'Excellent'],\n        ];\n        $formData = [\n            ['Category', 'Rating', 'Level'],\n            ['Service', 2, '=HLOOKUP(C5,Lookup_Table,2,FALSE)'],\n            ['Quality', 3, '=HLOOKUP(C6,Lookup_Table,2,FALSE)'],\n            ['Value', 4, '=HLOOKUP(C7,Lookup_Table,2,FALSE)'],\n            ['Cleanliness', 3, '=HLOOKUP(C8,Lookup_Table,2,FALSE)'],\n        ];\n\n        $worksheet = $this->getSheet();\n        $worksheet->fromArray($lookupData, null, 'F4');\n        $worksheet->fromArray($formData, null, 'B4');\n\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('Lookup_Table', $worksheet, '=$G$4:$J$5'));\n\n        $result = $worksheet->getCell($cellAddress)->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerHLookupNamedRange(): array\n    {\n        return [\n            ['Average', 'D5'],\n            ['Good', 'D6'],\n            ['Excellent', 'D7'],\n            ['Good', 'D8'],\n        ];\n    }\n\n    #[DataProvider('providerHLookupArray')]\n    public function testHLookupArray(array $expectedResult, string $values, string $database, string $index): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=HLOOKUP({$values}, {$database}, {$index}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerHLookupArray(): array\n    {\n        return [\n            'row vector #1' => [\n                [[4, 9]],\n                '{\"Axles\", \"Bolts\"}',\n                '{\"Axles\", \"Bearings\", \"Bolts\"; 4, 4, 9; 5, 7, 10; 6, 8, 11}',\n                '2',\n            ],\n            'row vector #2' => [\n                [[5, 7]],\n                '{\"Axles\", \"Bearings\"}',\n                '{\"Axles\", \"Bearings\", \"Bolts\"; 4, 4, 9; 5, 7, 10; 6, 8, 11}',\n                '3',\n            ],\n            'row/column vectors' => [\n                [[4, 9], [5, 10]],\n                '{\"Axles\", \"Bolts\"}',\n                '{\"Axles\", \"Bearings\", \"Bolts\"; 4, 4, 9; 5, 7, 10; 6, 8, 11}',\n                '{2; 3}',\n            ],\n            'issue 3561' => [\n                [[8, 9, 8]],\n                '6',\n                '{1,6,11;2,7,12;3,8,13;4,9,14;5,10,15}',\n                '{3,4,3}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HStackTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\n/**\n * Many of these tests are derived from\n * https://exceljet.net/functions/hstack-function.\n */\nclass HStackTest extends AllSetupTeardown\n{\n    public static function testHstack1(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $b4tof14 = [\n            ['A', null, 'B', null, 'C'],\n            [12, null, 7, null, 12],\n            [9, null, 13, null, 10],\n            [10, null, 5, null, 11],\n            [11, null, 13, null, 6],\n            [8, null, 12, null, 7],\n            [12, null, 11, null, 15],\n            [9, null, 10, null, 6],\n            [10, null, 15, null, 5],\n            [11, null, 9, null, 14],\n            [6, null, 13, null, 11],\n        ];\n        $sheet->fromArray($b4tof14, null, 'B4', true);\n        $sheet->setCellValue('H4', '=HSTACK(B4:B14,D4:D14,F4:F14)');\n        $expected = [\n            ['A', 'B', 'C'],\n            [12, 7, 12],\n            [9, 13, 10],\n            [10, 5, 11],\n            [11, 13, 6],\n            [8, 12, 7],\n            [12, 11, 15],\n            [9, 10, 6],\n            [10, 15, 5],\n            [11, 9, 14],\n            [6, 13, 11],\n        ];\n        self::assertSame($expected, $sheet->getCell('H4')->getCalculatedValue());\n\n        $sheet->setCellValue('K4', '=HSTACK(B4:B14,D4:D12,F4:F14)');\n        $expected = [\n            ['A', 'B', 'C'],\n            [12, 7, 12],\n            [9, 13, 10],\n            [10, 5, 11],\n            [11, 13, 6],\n            [8, 12, 7],\n            [12, 11, 15],\n            [9, 10, 6],\n            [10, 15, 5],\n            [11, '#N/A', 14],\n            [6, '#N/A', 11],\n        ];\n        self::assertSame($expected, $sheet->getCell('K4')->getCalculatedValue(), 'one short column');\n\n        $sheet->setCellValue('R4', '=IFERROR(HSTACK(B4:B14,D4:D12,F4:F14),\"\")');\n        $expected = [\n            ['A', 'B', 'C'],\n            [12, 7, 12],\n            [9, 13, 10],\n            [10, 5, 11],\n            [11, 13, 6],\n            [8, 12, 7],\n            [12, 11, 15],\n            [9, 10, 6],\n            [10, 15, 5],\n            [11, '', 14],\n            [6, '', 11],\n        ];\n        self::assertSame($expected, $sheet->getCell('R4')->getCalculatedValue(), 'one short column with null string instead of N/A');\n\n        $sheet->setCellValue('N4', '=HSTACK(B5,H6:J6)');\n        $expected = [\n            [12, 9, 13, 10],\n        ];\n        self::assertSame($expected, $sheet->getCell('N4')->getCalculatedValue(), 'one single-cell arg');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\n\nclass HyperlinkTest extends AllSetupTeardown\n{\n    private bool $issue2464 = false;\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerHYPERLINK')]\n    public function testHYPERLINK(mixed $expectedResult, ?string $linkUrl, ?string $description): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = '=HYPERLINK(';\n        if ($linkUrl !== null) {\n            $formula .= '\"' . $linkUrl . '\"';\n            if ($description !== null) {\n                $formula .= ',\"' . $description . '\"';\n            }\n        }\n        $formula .= ')';\n        $sheet->getCell('A1')->setValue($formula);\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n\n        if (!is_array($expectedResult)) {\n            self::assertSame($expectedResult, $result);\n        } else {\n            self::assertSame($expectedResult[1], $result);\n            $hyperlink = $sheet->getCell('A1')->getHyperlink();\n            self::assertSame($expectedResult[0], $hyperlink->getUrl());\n            self::assertSame($expectedResult[1], $hyperlink->getTooltip());\n        }\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerHYPERLINK')]\n    public function testHYPERLINKcellRef(mixed $expectedResult, ?string $linkUrl, ?string $description): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = '=HYPERLINK(';\n        if ($linkUrl !== null) {\n            $sheet->getCell('A2')->setValue($linkUrl);\n            $formula .= 'A2';\n            if ($description !== null) {\n                $sheet->getCell('A3')->setValue($description);\n                $formula .= ',A3';\n            }\n        }\n        $formula .= ')';\n        $sheet->getCell('A1')->setValue($formula);\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n\n        if (!is_array($expectedResult)) {\n            self::assertSame($expectedResult, $result);\n        } else {\n            self::assertSame($expectedResult[1], $result);\n            if (!$this->issue2464) {\n                $hyperlink = $sheet->getCell('A1')->getHyperlink();\n                self::assertSame($expectedResult[0], $hyperlink->getUrl());\n                self::assertSame($expectedResult[1], $hyperlink->getTooltip());\n            }\n        }\n    }\n\n    public function testLen(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=LEN(HYPERLINK(\"http://www.example.com\",\"Example\"))');\n        $value = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertSame(7, $value);\n        if ($this->issue2464) {\n            self::markTestIncomplete('testLen and testHYPERLINKcellRef incomplete due to issue 2464');\n        } else {\n            $hyperlink = $sheet->getCell('A1')->getHyperlink();\n            self::assertSame('http://www.example.com', $hyperlink->getUrl());\n            self::assertSame('Example', $hyperlink->getTooltip());\n        }\n    }\n\n    public static function providerHYPERLINK(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/HYPERLINK.php';\n    }\n\n    public function testHYPERLINKwithoutCell(): void\n    {\n        $result = LookupRef\\Hyperlink::set('https://phpspreadsheet.readthedocs.io/en/latest/', 'Read the Docs');\n        self::assertSame(ExcelError::REF(), $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexOnSpreadsheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass IndexOnSpreadsheetTest extends AllSetupTeardown\n{\n    /** @param mixed[] $matrix */\n    #[DataProvider('providerINDEXonSpreadsheet')]\n    public function testIndexOnSpreadsheet(mixed $expectedResult, array $matrix, null|int|string $rowNum = null, null|int|string $colNum = null): void\n    {\n        $this->mightHaveException($expectedResult);\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $sheet->fromArray($matrix);\n        $maxRow = $sheet->getHighestRow();\n        $maxColumn = $sheet->getHighestColumn();\n        $formulaArray = \"A1:$maxColumn$maxRow\";\n        if ($rowNum === null) {\n            $formula = \"=INDEX($formulaArray)\";\n        } elseif ($colNum === null) {\n            $formula = \"=INDEX($formulaArray, $rowNum)\";\n        } else {\n            $formula = \"=INDEX($formulaArray, $rowNum, $colNum)\";\n        }\n        $sheet->getCell('ZZ98')->setValue('x');\n        $sheet->getCell('ZZ99')->setValue($formula);\n        $result = $sheet->getCell('ZZ99')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerINDEXonSpreadsheet(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/INDEXonSpreadsheet.php';\n    }\n\n    #[DataProvider('providerIndexLiteralArrays')]\n    public function testLiteralArrays(mixed $expectedResult, string $indexArgs): void\n    {\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $sheet->getCell('A10')->setValue(10);\n        $sheet->getCell('B10')->setValue(11);\n        $sheet->getCell('C10')->setValue(12);\n        $sheet->getCell('D10')->setValue(13);\n        $sheet->getCell('X10')->setValue(10);\n        $sheet->getCell('X11')->setValue(11);\n        $sheet->getCell('X12')->setValue(12);\n        $sheet->getCell('X13')->setValue(13);\n        $sheet->getCell('A1')->setValue(\"=INDEX($indexArgs)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIndexLiteralArrays(): array\n    {\n        return [\n            'issue 64' => ['Fourth', '{\"First\",\"Second\",\"Third\",\"Fourth\",\"Fifth\",\"Sixth\",\"Seventh\"}, 4'],\n            'issue 64 selecting first \"row\"' => ['First', '{\"First\",\"Second\",\"Third\",\"Fourth\",\"Fifth\",\"Sixth\",\"Seventh\"}, 1'],\n            'array result condensed to single value' => [40, '{10,11;20,21;30,31;40,41;50,51;60,61},4'],\n            'both row and column' => [41, '{10,11;20,21;30,31;40,41;50,51;60,61},4,2'],\n            '1*1 array' => ['first', '{\"first\"},1'],\n            'array expressed in rows' => [20, '{10;20;30;40},2'],\n            'spreadsheet single row' => [11, 'A10:D10,2'],\n            'spreadsheet single column' => [13, 'X10:X13,4'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Matrix;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IndexTest extends TestCase\n{\n    #[DataProvider('providerINDEX')]\n    public function testINDEX(mixed $expectedResult, mixed $matrix, mixed $rowNum = null, mixed $colNum = null): void\n    {\n        if ($rowNum === null) {\n            $result = Matrix::index($matrix);\n        } elseif ($colNum === null) {\n            $result = Matrix::index($matrix, $rowNum);\n        } else {\n            $result = Matrix::index($matrix, $rowNum, $colNum);\n        }\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerINDEX(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/INDEX.php';\n    }\n\n    #[DataProvider('providerIndexArray')]\n    public function testIndexArray(array $expectedResult, string $matrix, string $rows, string $columns): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=INDEX({$matrix}, {$rows}, {$columns})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIndexArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [[2, 3], [5, 6]],\n                '{1, 2, 3; 4, 5, 6; 7, 8, 9}',\n                '{1; 2}',\n                '{2, 3}',\n            ],\n            'return row' => [\n                [1 => [4, 5, 6]],\n                '{1, 2, 3; 4, 5, 6; 7, 8, 9}',\n                '2',\n                '0',\n            ],\n            'return column' => [\n                [[2], [5], [8]],\n                '{1, 2, 3; 4, 5, 6; 7, 8, 9}',\n                '0',\n                '2',\n            ],\n        ];\n    }\n\n    public function testPropagateDiv0(): void\n    {\n        // issue 3396 error was always being treated as #VALUE!\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(0);\n        $sheet->getCell('A3')->setValue(1);\n        $sheet->getCell('B3')->setValue(1);\n        $sheet->getCell('C3')->setValue('=1/A1');\n        $sheet->getCell('D3')->setValue('=1/A1');\n        $sheet->getCell('E3')->setValue('xyz');\n        $sheet->getCell('A4')->setValue(false);\n        $sheet->getCell('B4')->setValue(true);\n        $sheet->getCell('C4')->setValue(true);\n        $sheet->getCell('D4')->setValue(false);\n        $sheet->getCell('E4')->setValue(false);\n        $sheet->getCell('A6')->setValue('=INDEX(A3:E3/A4:E4,1,1)');\n        $sheet->getCell('B6')->setValue('=INDEX(A3:E3/A4:E4,1,2)');\n        $sheet->getCell('C6')->setValue('=INDEX(A3:E3/A4:E4,1,3)');\n        $sheet->getCell('D6')->setValue('=INDEX(A3:E3/A4:E4,1,4)');\n        $sheet->getCell('E6')->setValue('=INDEX(A3:E3/A4:E4,1,5)');\n\n        self::assertSame('#DIV/0!', $sheet->getCell('A6')->getCalculatedValue());\n        self::assertSame(1, $sheet->getCell('B6')->getCalculatedValue());\n        self::assertSame('#DIV/0!', $sheet->getCell('C6')->getCalculatedValue());\n        self::assertSame('#DIV/0!', $sheet->getCell('D6')->getCalculatedValue());\n        self::assertSame('#VALUE!', $sheet->getCell('E6')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectInternationalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\n\nclass IndirectInternationalTest extends AllSetupTeardown\n{\n    private string $locale;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n        $this->locale = Settings::getLocale();\n    }\n\n    protected function tearDown(): void\n    {\n        Settings::setLocale($this->locale);\n        // CompatibilityMode is restored in parent\n        parent::tearDown();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerInternational')]\n    public function testR1C1International(string $locale): void\n    {\n        Settings::setLocale($locale);\n        $sameAsEnglish = ['en', 'xx', 'ru', 'tr', 'cs', 'pl'];\n        $sheet = $this->getSheet();\n        $sheet->getCell('C1')->setValue('text');\n        $sheet->getCell('A2')->setValue('en');\n        $sheet->getCell('B2')->setValue('=INDIRECT(\"R1C3\", false)');\n        $sheet->getCell('A3')->setValue('fr');\n        $sheet->getCell('B3')->setValue('=INDIRECT(\"L1C3\", false)');\n        $sheet->getCell('A4')->setValue('de');\n        $sheet->getCell('B4')->setValue('=INDIRECT(\"Z1S3\", false)');\n        $sheet->getCell('A5')->setValue('es');\n        $sheet->getCell('B5')->setValue('=INDIRECT(\"F1C3\", false)');\n        $sheet->getCell('A6')->setValue('xx');\n        $sheet->getCell('B6')->setValue('=INDIRECT(\"R1C3\", false)');\n        $sheet->getCell('A7')->setValue('ru');\n        $sheet->getCell('B7')->setValue('=INDIRECT(\"R1C3\", false)');\n        $sheet->getCell('A8')->setValue('cs');\n        $sheet->getCell('B8')->setValue('=INDIRECT(\"R1C3\", false)');\n        $sheet->getCell('A9')->setValue('tr');\n        $sheet->getCell('B9')->setValue('=INDIRECT(\"R1C3\", false)');\n        $sheet->getCell('A10')->setValue('pl');\n        $sheet->getCell('B10')->setValue('=INDIRECT(\"R1C3\", false)');\n        $maxRow = $sheet->getHighestRow();\n        for ($row = 2; $row <= $maxRow; ++$row) {\n            /** @var null|bool|float|int|string */\n            $rowLocale = $sheet->getCell(\"A$row\")->getValue();\n            if (in_array($rowLocale, $sameAsEnglish, true) && in_array($locale, $sameAsEnglish, true)) {\n                $expectedResult = 'text';\n            } else {\n                $expectedResult = ($locale === $sheet->getCell(\"A$row\")->getValue()) ? 'text' : '#REF!';\n            }\n            self::assertSame($expectedResult, $sheet->getCell(\"B$row\")->getCalculatedValue(), \"Locale $locale error in cell B$row $rowLocale\");\n        }\n    }\n\n    public static function providerInternational(): array\n    {\n        return [\n            'English' => ['en'],\n            'French' => ['fr'],\n            'German' => ['de'],\n            'Made-up' => ['xx'],\n            'Spanish' => ['es'],\n            'Russian' => ['ru'],\n            'Czech' => ['cs'],\n            'Polish' => ['pl'],\n            'Turkish' => ['tr'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRelativeInternational')]\n    public function testRelativeInternational(string $locale, string $cell, string $relative): void\n    {\n        Settings::setLocale($locale);\n        $sheet = $this->getSheet();\n        $sheet->getCell('C3')->setValue('text');\n        $sheet->getCell($cell)->setValue(\"=INDIRECT(\\\"$relative\\\", false)\");\n        self::assertSame('text', $sheet->getCell($cell)->getCalculatedValue());\n    }\n\n    public static function providerRelativeInternational(): array\n    {\n        return [\n            'English A3' => ['en', 'A3', 'R[]C[+2]'],\n            'French B4' => ['fr', 'B4', 'L[-1]C[+1]'],\n            'German C5' => ['de', 'C5', 'Z[-2]S[]'],\n            'Spanish E1' => ['es', 'E1', 'F[+2]C[-2]'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCompatibility')]\n    public function testCompatibilityInternational(string $compatibilityMode): void\n    {\n        Functions::setCompatibilityMode($compatibilityMode);\n        if ($compatibilityMode === Functions::COMPATIBILITY_EXCEL) {\n            $expected1 = '#REF!';\n            $expected2 = 'text';\n        } else {\n            $expected2 = '#REF!';\n            $expected1 = 'text';\n        }\n        Settings::setLocale('fr');\n        $sheet = $this->getSheet();\n        $sheet->getCell('C3')->setValue('text');\n        $sheet->getCell('A1')->setValue('=INDIRECT(\"R3C3\", false)');\n        $sheet->getCell('A2')->setValue('=INDIRECT(\"L3C3\", false)');\n        self::assertSame($expected1, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame($expected2, $sheet->getCell('A2')->getCalculatedValue());\n    }\n\n    public static function providerCompatibility(): array\n    {\n        return [\n            [Functions::COMPATIBILITY_EXCEL],\n            [Functions::COMPATIBILITY_OPENOFFICE],\n            [Functions::COMPATIBILITY_GNUMERIC],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectMissingCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nclass IndirectMissingCellTest extends AllSetupTeardown\n{\n    public function testIssue4330(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue(5); // used in INDIRECT\n        $sheet->getCell('A2')->setValue(1);\n\n        $sheet->getCell('B1')->setValue(2);\n        $sheet->getCell('B2')->setValue(4);\n        $sheet->getCell('B3')->setValue(6);\n        $sheet->getCell('B4')->setValue(8);\n        $sheet->getCell('B5')->setValue(10);\n        $sheet->getCell('B6')->setValue(12);\n        $sheet->getCell('C1')->setValue('=SUM(B1:INDIRECT(\"B\"&A1))');\n        self::assertSame(\n            30,\n            $sheet->getCell('C1')->getCalculatedValue(),\n            'end cell initialized'\n        );\n\n        $sheet->getCell('D1')->setValue(30);\n        $sheet->getCell('D2')->setValue(60);\n        $sheet->getCell('D3')->setValue(90);\n        $sheet->getCell('D4')->setValue(120);\n        $sheet->getCell('E1')->setValue('=SUM(D1:INDIRECT(\"D\"&A1))');\n        self::assertSame(\n            300,\n            $sheet->getCell('E1')->getCalculatedValue(),\n            'end cell not initialized'\n        );\n\n        //$sheet->getCell('F1')->setValue(30);\n        //$sheet->getCell('F2')->setValue(60);\n        $sheet->getCell('F3')->setValue(90);\n        $sheet->getCell('F4')->setValue(120);\n        $sheet->getCell('G1')->setValue(\n            '=SUM(INDIRECT(\"F\"&A2&\":F\"&A1))'\n        );\n        self::assertSame(\n            210,\n            $sheet->getCell('G1')->getCalculatedValue(),\n            'range with uninitialized cells as INDIRECT argument'\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as ReaderXlsx;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass IndirectTest extends AllSetupTeardown\n{\n    #[DataProvider('providerINDIRECT')]\n    public function testINDIRECT(mixed $expectedResult, mixed $cellReference = 'omitted', mixed $a1 = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue(100);\n        $sheet->getCell('A2')->setValue(200);\n        $sheet->getCell('A3')->setValue(300);\n        $sheet->getCell('A4')->setValue(400);\n        $sheet->getCell('A5')->setValue(500);\n        $sheet->setTitle('ThisSheet');\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->getCell('A1')->setValue(10);\n        $sheet1->getCell('A2')->setValue(20);\n        $sheet1->getCell('A3')->setValue(30);\n        $sheet1->getCell('A4')->setValue(40);\n        $sheet1->getCell('A5')->setValue(50);\n        $sheet1->getCell('B1')->setValue(1);\n        $sheet1->getCell('B2')->setValue(2);\n        $sheet1->getCell('B3')->setValue(3);\n        $sheet1->getCell('B4')->setValue(4);\n        $sheet1->getCell('B5')->setValue(5);\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('newnr', $sheet1, '$A$2:$A$4'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('localname', $sheet1, '$B$2:$B$4', true));\n\n        $this->setCell('B1', $cellReference);\n        $this->setCell('B2', $a1);\n        if ($cellReference === 'omitted') {\n            $sheet->getCell('B3')->setValue('=SUM(INDIRECT())');\n        } elseif ($a1 === 'omitted') {\n            $sheet->getCell('B3')->setValue('=SUM(INDIRECT(B1))');\n        } else {\n            $sheet->getCell('B3')->setValue('=SUM(INDIRECT(B1, B2))');\n        }\n\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerINDIRECT(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/INDIRECT.php';\n    }\n\n    public function testINDIRECTEurUsd(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('EUR');\n        $sheet->getCell('A2')->setValue('USD');\n        $sheet->getCell('B1')->setValue(360);\n        $sheet->getCell('B2')->setValue(300);\n\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('EUR', $sheet, '$B$1'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('USD', $sheet, '$B$2'));\n\n        $this->setCell('E1', '=INDIRECT(\"USD\")');\n\n        $result = $sheet->getCell('E1')->getCalculatedValue();\n        self::assertSame(300, $result);\n    }\n\n    public function testINDIRECTLeadingEquals(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('EUR');\n        $sheet->getCell('A2')->setValue('USD');\n        $sheet->getCell('B1')->setValue(360);\n        $sheet->getCell('B2')->setValue(300);\n\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('EUR', $sheet, '=$B$1'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('USD', $sheet, '=$B$2'));\n\n        $this->setCell('E1', '=INDIRECT(\"USD\")');\n\n        $result = $sheet->getCell('E1')->getCalculatedValue();\n        self::assertSame(300, $result);\n    }\n\n    public function testIndirectFile1(): void\n    {\n        $reader = new ReaderXlsx();\n        $file = 'tests/data/Calculation/LookupRef/IndirectDefinedName.xlsx';\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $result = $sheet->getCell('A5')->getCalculatedValue();\n        self::assertSame(80, $result);\n        $value = $sheet->getCell('A5')->getValue();\n        self::assertSame('=INDIRECT(\"CURRENCY_EUR\")', $value);\n    }\n\n    public function testIndirectFile2(): void\n    {\n        $reader = new ReaderXlsx();\n        $file = 'tests/data/Calculation/LookupRef/IndirectFormulaSelection.xlsx';\n        $spreadsheet = $this->spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $result = $sheet->getCell('A5')->getCalculatedValue();\n        self::assertSame(100, $result);\n        $value = $sheet->getCell('A5')->getValue();\n        self::assertSame('=CURRENCY_SELECTOR', $value);\n        $formula = $spreadsheet->getNamedFormula('CURRENCY_SELECTOR');\n        if ($formula === null) {\n            self::fail('Expected named formula was not defined');\n        } else {\n            self::assertSame('INDIRECT(\"CURRENCY_\"&Sheet1!$D$1)', $formula->getFormula());\n        }\n    }\n\n    public function testDeprecatedCall(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('A2');\n        $sheet->getCell('A2')->setValue('This is it');\n        $result = \\PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Indirect::INDIRECT('A2', true, $sheet->getCell('A1'));\n        $result = \\PhpOffice\\PhpSpreadsheet\\Calculation\\Functions::flattenSingleValue($result);\n        self::assertSame('This is it', $result);\n    }\n\n    #[DataProvider('providerRelative')]\n    public function testR1C1Relative(string|int|null $expectedResult, string $address): void\n    {\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $sheet->fromArray([\n            ['a1', 'b1', 'c1'],\n            ['a2', 'b2', 'c2'],\n            ['a3', 'b3', 'c3'],\n            ['a4', 'b4', 'c4'],\n        ]);\n        $sheet->getCell('B2')->setValue('=INDIRECT(\"' . $address . '\", false)');\n        self::assertSame($expectedResult, $sheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public static function providerRelative(): array\n    {\n        return [\n            'same row with bracket next column' => ['c2', 'R[]C[+1]'],\n            'same row without bracket next column' => ['c2', 'RC[+1]'],\n            'same row without bracket next column no plus sign' => ['c2', 'RC[1]'],\n            'same row previous column' => ['a2', 'RC[-1]'],\n            'previous row previous column' => ['a1', 'R[-1]C[-1]'],\n            'previous row same column with bracket' => ['b1', 'R[-1]C[]'],\n            'previous row same column without bracket' => ['b1', 'R[-1]C'],\n            'previous row next column' => ['c1', 'R[-1]C[+1]'],\n            'next row no plus sign previous column' => ['a3', 'R[1]C[-1]'],\n            'next row previous column' => ['a3', 'R[+1]C[-1]'],\n            'next row same column' => ['b3', 'R[+1]C'],\n            'next row next column' => ['c3', 'R[+1]C[+1]'],\n            'two rows down same column' => ['b4', 'R[+2]C'],\n            'invalid row' => ['#REF!', 'R[-2]C'],\n            'invalid column' => ['#REF!', 'RC[-2]'],\n            'circular reference' => [0, 'RC'], // matches Excel's treatment\n            'absolute row absolute column' => ['c2', 'R2C3'],\n            'absolute row relative column' => ['a2', 'R2C[-1]'],\n            'relative row absolute column lowercase' => ['a2', 'rc1'],\n            'uninitialized cell' => [0, 'RC[+2]'], // Excel result is 0, PhpSpreadsheet was null\n        ];\n    }\n\n    private static bool $definedFormulaWorking = false;\n\n    public function testAboveCell(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet->addNamedFormula(\n            new NamedFormula('SumAbove', $spreadsheet->getActiveSheet(), '=SUM(INDIRECT(ADDRESS(1,COLUMN())):INDIRECT(ADDRESS(ROW()-1,COLUMN())))')\n        );\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue(100);\n        $sheet->getCell('A2')->setValue(200);\n        $sheet->getCell('A3')->setValue(300);\n        $sheet->getCell('A4')->setValue(400);\n        $sheet->getCell('A5')->setValue(500);\n        $sheet->getCell('A6')->setValue('=SUM(A$1:INDIRECT(ADDRESS(ROW()-1,COLUMN())))');\n        self::AssertSame(1500, $sheet->getCell('A6')->getCalculatedValue());\n        if (self::$definedFormulaWorking) {\n            $sheet->getCell('B1')->setValue(10);\n            $sheet->getCell('B2')->setValue(20);\n            $sheet->getCell('B3')->setValue(30);\n            $sheet->getCell('B4')->setValue(40);\n            $sheet->getCell('B5')->setValue('=SumAbove');\n            self::AssertSame(100, $sheet->getCell('B5')->getCalculatedValue());\n        } else {\n            self::markTestIncomplete('PhpSpreadsheet does not handle this correctly');\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass LookupTest extends TestCase\n{\n    #[DataProvider('providerLOOKUP')]\n    public function testLOOKUP(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = LookupRef\\Lookup::lookup(...$args);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLOOKUP(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/LOOKUP.php';\n    }\n\n    #[DataProvider('providerLookupArray')]\n    public function testLookupArray(array $expectedResult, string $values, string $lookup, string $return): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LOOKUP({$values}, {$lookup}, {$return})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerLookupArray(): array\n    {\n        return [\n            'row vector' => [\n                [['Orange', 'Green', 'Red']],\n                '{4.19, 5.77, 4.14}',\n                '{4.14; 4.19; 5.17; 5.77; 6.39}',\n                '{\"Red\"; \"Orange\"; \"Yellow\"; \"Green\"; \"Blue\"}',\n            ],\n        ];\n    }\n\n    public function testBoolsAsInt(): void\n    {\n        // issue 3396 not handling math operation for bool in array\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A59')->setValue('start');\n        $sheet->getCell('B59')->setValue('end');\n        $sheet->getCell('C59')->setValue('percent');\n        $sheet->getCell('A60')->setValue('=DATEVALUE(\"1950-01-01\")');\n        $sheet->getCell('B60')->setValue('=DATEVALUE(\"2016-06-03\")');\n        $sheet->getCell('C60')->setValue(0.05);\n        $sheet->getCell('A61')->setValue('=DATEVALUE(\"2016-06-04\")');\n        $sheet->getCell('B61')->setValue('=DATEVALUE(\"2021-01-05\")');\n        $sheet->getCell('C61')->setValue(0.08);\n        $sheet->getCell('A62')->setValue('=DATEVALUE(\"2021-01-16\")');\n        $sheet->getCell('B62')->setValue('=DATEVALUE(\"2022-04-08\")');\n        $sheet->getCell('C62')->setValue(0.03);\n        $sheet->getCell('A63')->setValue('=DATEVALUE(\"2022-04-09\")');\n        $sheet->getCell('B63')->setValue('=DATEVALUE(\"2500-12-31\")');\n        $sheet->getCell('C63')->setValue(0.04);\n\n        $sheet->getCell('D5')->setValue(5);\n        $sheet->getCell('E5')->setValue('=DATEVALUE(\"2023-01-01\")');\n        $sheet->getCell('D7')->setValue('=IF(E5<>\"\",LOOKUP(2,1/($A$60:$A$63<=E5)/($B$60:$B$63>=E5),$C$60:$C$63)*D5,\"\")');\n\n        self::assertSame(0.2, $sheet->getCell('D7')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass MatchTest extends AllSetupTeardown\n{\n    /** @param mixed[] $array */\n    #[DataProvider('providerMATCH')]\n    public function testMATCH(mixed $expectedResult, mixed $input, array $array, null|float|int|string $type = null): void\n    {\n        if (is_array($expectedResult)) {\n            $expectedResult = $expectedResult[0];\n        }\n        if ($expectedResult === 'incomplete') {\n            self::markTestIncomplete('Undefined behavior with different results in Excel and PhpSpreadsheet');\n        }\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $maxRow = count($array);\n        $formulaArray = '';\n        for ($row = 1; $row <= $maxRow; ++$row) {\n            $this->setCell(\"A$row\", $array[$row - 1]);\n            $formulaArray = \"A1:A$row\";\n        }\n        $this->setCell('B1', $input);\n        if ($type === null) {\n            $formula = \"=MATCH(B1,$formulaArray)\";\n        } else {\n            $formula = \"=MATCH(B1, $formulaArray, $type)\";\n        }\n        $sheet->getCell('D1')->setValue($formula);\n\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    /** @param mixed[] $array */\n    #[DataProvider('providerMATCH')]\n    public function testMATCHLibre(mixed $expectedResult, mixed $input, array $array, null|float|int|string $type = null): void\n    {\n        $this->setOpenOffice();\n        if (is_array($expectedResult)) {\n            $expectedResult = $expectedResult[1];\n        }\n        if ($expectedResult === 'incomplete') {\n            self::markTestIncomplete('Undefined behavior with different results in Excel and PhpSpreadsheet');\n        }\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $maxRow = count($array);\n        $formulaArray = '';\n        for ($row = 1; $row <= $maxRow; ++$row) {\n            $this->setCell(\"A$row\", $array[$row - 1]);\n            $formulaArray = \"A1:A$row\";\n        }\n        $this->setCell('B1', $input);\n        if ($type === null) {\n            $formula = \"=MATCH(B1,$formulaArray)\";\n        } else {\n            $formula = \"=MATCH(B1, $formulaArray, $type)\";\n        }\n        $sheet->getCell('D1')->setValue($formula);\n\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerMATCH(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/MATCH.php';\n    }\n\n    #[DataProvider('providerMatchArray')]\n    public function testMatchArray(array $expectedResult, string $values, string $selections): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=MATCH({$values}, {$selections}, 0)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerMatchArray(): array\n    {\n        return [\n            'row vector' => [\n                [[2, 5, 3]],\n                '{\"Orange\", \"Blue\", \"Yellow\"}',\n                '{\"Red\", \"Orange\", \"Yellow\", \"Green\", \"Blue\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatrixHelperFunctionsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Matrix;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MatrixHelperFunctionsTest extends TestCase\n{\n    /** @param mixed[] $array */\n    #[DataProvider('columnVectorProvider')]\n    public function testIsColumnVector(bool $expectedResult, array $array): void\n    {\n        $result = Matrix::isColumnVector($array);\n        self::assertSame($expectedResult, $result);\n    }\n\n    /** @param mixed[] $array */\n    #[DataProvider('rowVectorProvider')]\n    public function testIsRowVector(bool $expectedResult, array $array): void\n    {\n        $result = Matrix::isRowVector($array);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function columnVectorProvider(): array\n    {\n        return [\n            [\n                true,\n                [\n                    [1], [2], [3],\n                ],\n            ],\n            [\n                false,\n                [1, 2, 3],\n            ],\n            [\n                false,\n                [\n                    [1, 2, 3],\n                    [4, 5, 6],\n                ],\n            ],\n        ];\n    }\n\n    public static function rowVectorProvider(): array\n    {\n        return [\n            [\n                false,\n                [\n                    [1], [2], [3],\n                ],\n            ],\n            [\n                true,\n                [1, 2, 3],\n            ],\n            [\n                true,\n                [[1, 2, 3]],\n            ],\n            [\n                false,\n                [\n                    [1, 2, 3],\n                    [4, 5, 6],\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/OffsetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass OffsetTest extends AllSetupTeardown\n{\n    #[DataProvider('providerOFFSET')]\n    public function testOFFSET(mixed $expectedResult, null|string $cellReference = null): void\n    {\n        $result = LookupRef\\Offset::OFFSET($cellReference);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerOFFSET(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/OFFSET.php';\n    }\n\n    public function testOffsetSpreadsheet(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('B6')->setValue(4);\n        $sheet->getCell('B7')->setValue(8);\n        $sheet->getCell('B8')->setValue(3);\n        $sheet->getCell('D6')->setValue(10);\n        $sheet->getCell('D7')->setValue(3);\n        $sheet->getCell('D8')->setValue(6);\n\n        $sheet->getCell('A1')->setValue('=OFFSET(D3,3,-2,1,1)');\n        self::assertSame(4, $sheet->getCell('A1')->getCalculatedValue());\n        $sheet->getCell('A2')->setValue('=SUM(OFFSET(D3:F5,3,-2, 3, 3))');\n        self::assertSame(34, $sheet->getCell('A2')->getCalculatedValue());\n        $sheet->getCell('A3')->setValue('=OFFSET(D3, -3, -3)');\n        self::assertSame('#REF!', $sheet->getCell('A3')->getCalculatedValue());\n\n        $sheet->getCell('C1')->setValue(5);\n        $sheet->getCell('A4')->setValue('=OFFSET(C1, 0, 0, 0, 0)');\n        self::assertSame('#REF!', $sheet->getCell('A4')->getCalculatedValue());\n        $sheet->getCell('A5')->setValue('=OFFSET(C1, 0, 0)');\n        self::assertSame(5, $sheet->getCell('A5')->getCalculatedValue());\n    }\n\n    public function testOffsetNamedRange(): void\n    {\n        $workSheet = $this->getSheet();\n        $workSheet->setCellValue('A1', 1);\n        $workSheet->setCellValue('A2', 2);\n\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('demo', $workSheet, '=$A$1'));\n\n        $workSheet->setCellValue('B1', '=demo');\n        $workSheet->setCellValue('B2', '=OFFSET(demo, 1, 0)');\n\n        self::assertSame(2, $workSheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public function testOffsetNamedRangeApostropheSheet(): void\n    {\n        $workSheet = $this->getSheet();\n        $workSheet->setTitle(\"apo'strophe\");\n        $workSheet->setCellValue('A1', 1);\n        $workSheet->setCellValue('A2', 2);\n\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('demo', $workSheet, '=$A$1'));\n\n        $workSheet->setCellValue('B1', '=demo');\n        $workSheet->setCellValue('B2', '=OFFSET(demo, 1, 0)');\n\n        self::assertSame(2, $workSheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public function testOffsetMultiCellNamedRange(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('D13', 'Hello');\n        $this->getSpreadsheet()\n            ->addNamedRange(new NamedRange('CELLAREA', $sheet, '$B$6:$F$22'));\n        $sheet->setCellValue('D1', '=OFFSET(CELLAREA,7,2,1,1)');\n        self::assertSame('Hello', $sheet->getCell('D1')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowOnSpreadsheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass RowOnSpreadsheetTest extends AllSetupTeardown\n{\n    #[DataProvider('providerROWonSpreadsheet')]\n    public function testRowOnSpreadsheet(mixed $expectedResult, string $cellReference = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $sheet->setTitle('ThisSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrangex', $sheet, '$E$2:$E$6'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrangey', $sheet, '$F$2:$H$2'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrange3', $sheet, '$F$4:$H$4'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrange5', $sheet, '$F$5:$H$5', true));\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('localname', $sheet1, '$F$6:$H$6', true));\n\n        if ($cellReference === 'omitted') {\n            $sheet->getCell('B3')->setValue('=ROW()');\n        } else {\n            $sheet->getCell('B3')->setValue(\"=ROW($cellReference)\");\n        }\n\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerROWOnSpreadsheet(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/ROWonSpreadsheet.php';\n    }\n\n    public function testINDIRECTLocalDefinedName(): void\n    {\n        $sheet = $this->getSheet();\n        $this->setArrayAsValue();\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('newnr', $sheet1, '$F$5:$H$5', true)); // defined locally, only usable on sheet1\n\n        $sheet1->getCell('B3')->setValue('=ROW(newnr)');\n        $result = $sheet1->getCell('B3')->getCalculatedValue();\n        self::assertSame(5, $result);\n\n        $sheet->getCell('B3')->setValue('=ROW(newnr)');\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame('#NAME?', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass RowTest extends AllSetupTeardown\n{\n    /** @param null|mixed[][]|string $cellReference */\n    #[DataProvider('providerROW')]\n    public function testROW(mixed $expectedResult, null|array|string $cellReference = null): void\n    {\n        $result = LookupRef\\RowColumnInformation::ROW($cellReference);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerROW(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/ROW.php';\n    }\n\n    public function testROWwithNull(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('C4')->setValue('=ROW()');\n        self::assertSame(4, $sheet->getCell('C4')->getCalculatedValue());\n        $sheet->getCell('D2')->setValue('=ROW(C13)');\n        self::assertSame(13, $sheet->getCell('D2')->getCalculatedValue());\n        // Sheetnames don't have to exist\n        $sheet->getCell('D3')->setValue('=ROW(Sheet17!E15)');\n        self::assertSame(15, $sheet->getCell('D3')->getCalculatedValue());\n        $sheet->getCell('D4')->setValue(\"=ROW('Worksheet #5'!X500)\");\n        self::assertSame(500, $sheet->getCell('D4')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsOnSpreadsheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\n\nclass RowsOnSpreadsheetTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerROWSonSpreadsheet')]\n    public function testRowsOnSpreadsheet(mixed $expectedResult, string $cellReference = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setTitle('ThisSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrangex', $sheet, '$E$2:$E$6'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrangey', $sheet, '$F$2:$H$2'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrange3', $sheet, '$F$4:$H$4'));\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('namedrange5', $sheet, '$F$5:$H$5', true));\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('localname', $sheet1, '$F$6:$H$6', true));\n\n        if ($cellReference === 'omitted') {\n            $sheet->getCell('B3')->setValue('=ROWS()');\n        } else {\n            $sheet->getCell('B3')->setValue(\"=ROWS($cellReference)\");\n        }\n\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerROWSOnSpreadsheet(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/ROWSonSpreadsheet.php';\n    }\n\n    public function testRowsLocalDefinedName(): void\n    {\n        $sheet = $this->getSheet();\n\n        $sheet1 = $this->getSpreadsheet()->createSheet();\n        $sheet1->setTitle('OtherSheet');\n        $this->getSpreadsheet()->addNamedRange(new NamedRange('newnr', $sheet1, '$F$5:$H$10', true)); // defined locally, only usable on sheet1\n\n        $sheet1->getCell('B3')->setValue('=ROWS(newnr)');\n        $result = $sheet1->getCell('B3')->getCalculatedValue();\n        self::assertSame(6, $result);\n\n        $sheet->getCell('B3')->setValue('=ROWS(newnr)');\n        $result = $sheet->getCell('B3')->getCalculatedValue();\n        self::assertSame('#NAME?', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowsTest extends TestCase\n{\n    /** @param null|mixed[]|string $arg */\n    #[DataProvider('providerROWS')]\n    public function testROWS(mixed $expectedResult, null|array|string $arg): void\n    {\n        $result = LookupRef\\RowColumnInformation::ROWS($arg);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerROWS(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/ROWS.php';\n    }\n\n    #[DataProvider('providerRowsArray')]\n    public function testRowsArray(int $expectedResult, string $argument): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ROWS({$argument})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerRowsArray(): array\n    {\n        return [\n            [\n                2,\n                '{1,2,3;4,5,6}',\n            ],\n            [\n                1,\n                '{1,2,3,4,5}',\n            ],\n            [\n                5,\n                '{1;2;3;4;5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortBetterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Sort;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SortBetterTest extends TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    private int $maxRow;\n\n    private string $maxCol;\n\n    private string $range;\n\n    protected function tearDown(): void\n    {\n        $this->spreadsheet->disconnectWorksheets();\n        unset($this->spreadsheet);\n    }\n\n    /** @param mixed[] $values */\n    public function getSheet(array $values): Worksheet\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $this->spreadsheet->returnArrayAsArray();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->fromArray($values);\n        $this->maxRow = $sheet->getHighestDataRow();\n        $this->maxCol = $sheet->getHighestDataColumn();\n        $this->range = \"A1:{$this->maxCol}{$this->maxRow}\";\n\n        return $sheet;\n    }\n\n    public function testSortOnScalar(): void\n    {\n        $value = 'NON-ARRAY';\n        $sheet = $this->getSheet([$value]);\n        $sheet->getCell('Z1')->setValue('=SORT(A1, 1, -1)');\n        $sheet->getCell('Z2')->setValue('=SORT(A1:A1, 1, -1)');\n        $sheet->getCell('Z3')->setValue('=SORT(A1, \"A\", -1)');\n\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame([[$value]], $result);\n        $result = $sheet->getCell('Z2')->getCalculatedValue();\n        self::assertSame([[$value]], $result);\n        $result = $sheet->getCell('Z3')->getCalculatedValue();\n        self::assertSame(ExcelError::VALUE(), $result);\n    }\n\n    #[DataProvider('providerSortWithScalarArgumentErrorReturns')]\n    public function testSortWithScalarArgumentErrorReturns(int|string $sortIndex, int|string $sortOrder = 1): void\n    {\n        $value = [[1, 2], [3, 4], [5, 6]];\n        $sheet = $this->getSheet($value);\n        $formula = \"=SORT({$this->range}, $sortIndex, $sortOrder)\";\n        $sheet->getCell('Z1')->setValue($formula);\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame(ExcelError::VALUE(), $result);\n    }\n\n    public static function providerSortWithScalarArgumentErrorReturns(): array\n    {\n        return [\n            'Negative sortIndex' => [-1, -1],\n            'Non-numeric sortIndex' => ['\"A\"', -1],\n            'Zero sortIndex' => [0, -1],\n            'Too high sortIndex' => [3, -1],\n            'Non-numeric sortOrder' => [1, '\"A\"'],\n            'Invalid negative sortOrder' => [1, -2],\n            'Zero sortOrder' => [1, 0],\n            'Invalid positive sortOrder' => [1, 2],\n            'Too many sortOrders (scalar and array)' => [1, '{-1, 1}'],\n            'Too many sortOrders (both array)' => ['{1, 2}', '{1, 2, 3}'],\n            'Zero positive sortIndex in vector' => ['{0, 1}'],\n            'Too high sortIndex in vector' => ['{1, 3}'],\n            'Invalid sortOrder in vector' => ['{1, 2}', '{1, -2}'],\n        ];\n    }\n\n    /**\n     * @param mixed[] $expectedResult\n     * @param mixed[] $matrix\n     */\n    #[DataProvider('providerSortByRow')]\n    public function testSortByRow(array $expectedResult, array $matrix, int $sortIndex, int $sortOrder = Sort::ORDER_ASCENDING): void\n    {\n        $sheet = $this->getSheet($matrix);\n        $formula = \"=SORT({$this->range}, $sortIndex, $sortOrder)\";\n        $sheet->getCell('Z1')->setValue($formula);\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    /** @return mixed[] */\n    public static function providerSortByRow(): array\n    {\n        return [\n            [\n                [[142], [378], [404], [445], [483], [622], [650], [691], [783], [961]],\n                self::sampleDataForRow(),\n                1,\n            ],\n            [\n                [[961], [783], [691], [650], [622], [483], [445], [404], [378], [142]],\n                self::sampleDataForRow(),\n                1,\n                Sort::ORDER_DESCENDING,\n            ],\n            [\n                [['Peaches', 25], ['Cherries', 29], ['Grapes', 31], ['Lemons', 34], ['Oranges', 36], ['Apples', 38], ['Pears', 40]],\n                [['Apples', 38], ['Cherries', 29], ['Grapes', 31], ['Lemons', 34], ['Oranges', 36], ['Peaches', 25], ['Pears', 40]],\n                2,\n            ],\n        ];\n    }\n\n    /**\n     * @param mixed[] $expectedResult\n     * @param mixed[] $matrix\n     */\n    #[DataProvider('providerSortByRowMultiLevel')]\n    public function testSortByRowMultiLevel(array $expectedResult, array $matrix, string $sortIndex, int $sortOrder = Sort::ORDER_ASCENDING): void\n    {\n        $sheet = $this->getSheet($matrix);\n        $formula = \"=SORT({$this->range}, $sortIndex, $sortOrder)\";\n        $sheet->getCell('Z1')->setValue($formula);\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSortByRowMultiLevel(): array\n    {\n        return [\n            [\n                [\n                    ['East', 'Grapes', 31],\n                    ['East', 'Lemons', 36],\n                    ['North', 'Cherries', 29],\n                    ['North', 'Grapes', 27],\n                    ['North', 'Peaches', 25],\n                    ['South', 'Apples', 38],\n                    ['South', 'Cherries', 28],\n                    ['South', 'Oranges', 36],\n                    ['South', 'Pears', 40],\n                    ['West', 'Apples', 30],\n                    ['West', 'Lemons', 34],\n                    ['West', 'Oranges', 25],\n                ],\n                self::sampleDataForMultiRow(),\n                '{1, 2}',\n            ],\n            [\n                [\n                    ['East', 'Grapes', 31],\n                    ['East', 'Lemons', 36],\n                    ['North', 'Peaches', 25],\n                    ['North', 'Grapes', 27],\n                    ['North', 'Cherries', 29],\n                    ['South', 'Cherries', 28],\n                    ['South', 'Oranges', 36],\n                    ['South', 'Apples', 38],\n                    ['South', 'Pears', 40],\n                    ['West', 'Oranges', 25],\n                    ['West', 'Apples', 30],\n                    ['West', 'Lemons', 34],\n                ],\n                self::sampleDataForMultiRow(),\n                '{1, 3}',\n            ],\n            [\n                [\n                    ['West', 'Apples', 30],\n                    ['South', 'Apples', 38],\n                    ['South', 'Cherries', 28],\n                    ['North', 'Cherries', 29],\n                    ['North', 'Grapes', 27],\n                    ['East', 'Grapes', 31],\n                    ['West', 'Lemons', 34],\n                    ['East', 'Lemons', 36],\n                    ['West', 'Oranges', 25],\n                    ['South', 'Oranges', 36],\n                    ['North', 'Peaches', 25],\n                    ['South', 'Pears', 40],\n                ],\n                self::sampleDataForMultiRow(),\n                '{2, 3}',\n            ],\n        ];\n    }\n\n    /**\n     * @param mixed[] $expectedResult\n     * @param mixed[] $matrix\n     */\n    #[DataProvider('providerSortByColumn')]\n    public function testSortByColumn(array $expectedResult, array $matrix, int $sortIndex, int $sortOrder): void\n    {\n        $sheet = $this->getSheet($matrix);\n        $formula = \"=SORT({$this->range}, $sortIndex, $sortOrder, TRUE)\";\n        $sheet->getCell('Z1')->setValue($formula);\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSortByColumn(): array\n    {\n        return [\n            [\n                [[142, 378, 404, 445, 483, 622, 650, 691, 783, 961]],\n                self::sampleDataForColumn(),\n                1,\n                Sort::ORDER_ASCENDING,\n            ],\n            [\n                [[961, 783, 691, 650, 622, 483, 445, 404, 378, 142]],\n                self::sampleDataForColumn(),\n                1,\n                Sort::ORDER_DESCENDING,\n            ],\n        ];\n    }\n\n    /** @return array<int[]> */\n    public static function sampleDataForRow(): array\n    {\n        return [\n            [622], [961], [691], [445], [378], [483], [650], [783], [142], [404],\n        ];\n    }\n\n    /** @return array<array{string, string, int}> */\n    public static function sampleDataForMultiRow(): array\n    {\n        return [\n            ['South', 'Pears', 40],\n            ['South', 'Apples', 38],\n            ['South', 'Oranges', 36],\n            ['East', 'Lemons', 36],\n            ['West', 'Lemons', 34],\n            ['East', 'Grapes', 31],\n            ['West', 'Apples', 30],\n            ['North', 'Cherries', 29],\n            ['South', 'Cherries', 28],\n            ['North', 'Grapes', 27],\n            ['North', 'Peaches', 25],\n            ['West', 'Oranges', 25],\n        ];\n    }\n\n    /** @return array<int[]> */\n    public static function sampleDataForColumn(): array\n    {\n        return [\n            [622, 961, 691, 445, 378, 483, 650, 783, 142, 404],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortByBetterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Sort;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SortByBetterTest extends TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    private int $maxRow;\n\n    private string $maxCol;\n\n    private string $range;\n\n    protected function tearDown(): void\n    {\n        $this->spreadsheet->disconnectWorksheets();\n        unset($this->spreadsheet);\n    }\n\n    /** @param mixed[] $values */\n    public function getSheet(array $values): Worksheet\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $this->spreadsheet->returnArrayAsArray();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->fromArray($values);\n        $this->maxRow = $sheet->getHighestDataRow();\n        $this->maxCol = $sheet->getHighestDataColumn();\n        $this->range = \"A1:{$this->maxCol}{$this->maxRow}\";\n\n        return $sheet;\n    }\n\n    public function testSortOnScalar(): void\n    {\n        $value = 'NON-ARRAY';\n        $byArray = 'ARRAY';\n        $sheet = $this->getSheet([$value, $byArray]);\n        $sheet->getCell('Z1')->setValue('=SORTBY(A1, B1:B1, 1)');\n        $sheet->getCell('Z2')->setValue('=SORTBY(A1, B1, 1)');\n        $sheet->getCell('Z3')->setValue('=SORTBY(A1, B1, \"A\")');\n\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame([[$value]], $result);\n        $result = $sheet->getCell('Z2')->getCalculatedValue();\n        self::assertSame([[$value]], $result);\n        $result = $sheet->getCell('Z3')->getCalculatedValue();\n        self::assertSame(ExcelError::VALUE(), $result);\n    }\n\n    #[DataProvider('providerSortWithScalarArgumentErrorReturns')]\n    public function testSortByWithArgumentErrorReturns(string $byArray, int|string $sortOrder = 1): void\n    {\n        $value = [[1, 2], [3, 4], [5, 6]];\n        $sheet = $this->getSheet($value);\n        $formula = \"=SORTBY({$this->range}, $byArray, $sortOrder)\";\n        $sheet->getCell('Z1')->setValue($formula);\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame(ExcelError::VALUE(), $result);\n    }\n\n    public static function providerSortWithScalarArgumentErrorReturns(): array\n    {\n        return [\n            'Non-array sortIndex' => ['A', 1],\n            'Mismatched sortIndex count' => ['{1, 2, 3, 4}', 1],\n            'Non-numeric sortOrder' => ['{1, 2, 3}', '\"A\"'],\n            'Invalid negative sortOrder' => ['{1, 2, 3}', -2],\n            'Zero sortOrder' => ['{1, 2, 3}', 0],\n            'Invalid positive sortOrder' => ['{1, 2, 3}', 2],\n        ];\n    }\n\n    /**\n     * @param mixed[] $matrix\n     */\n    #[DataProvider('providerSortByRow')]\n    public function testSortByRow(array $expectedResult, array $matrix, string $byArray, ?int $sortOrder = null, ?string $byArray2 = null, ?int $sortOrder2 = null): void\n    {\n        $sheet = $this->getSheet($matrix);\n        $sheet->fromArray([['B'], ['D'], ['A'], ['C'], ['H'], ['G'], ['F'], ['E']], null, 'G1', true);\n        $sheet->fromArray([[true], [false], [true], [false], [true], [false], [true], [false]], null, 'H1', true);\n        $formula = \"=SORTBY({$this->range}, $byArray\";\n        if ($sortOrder !== null) {\n            $formula .= \", $sortOrder\";\n            if ($byArray2 !== null) {\n                $formula .= \", $byArray2\";\n                if ($sortOrder2 !== null) {\n                    $formula .= \", $sortOrder2\";\n                }\n            }\n        }\n        $formula .= ')';\n        $sheet->getCell('Z1')->setValue($formula);\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSortByRow(): array\n    {\n        return [\n            'Simple sort by age' => [\n                [\n                    ['Fritz', 19],\n                    ['Xi', 19],\n                    ['Amy', 22],\n                    ['Srivan', 39],\n                    ['Tom', 52],\n                    ['Fred', 65],\n                    ['Hector', 66],\n                    ['Sal', 73],\n                ],\n                self::sampleDataForSimpleSort(),\n                'B1:B8',\n                1,\n            ],\n            'Simple sort by name' => [\n                [\n                    ['Amy', 22],\n                    ['Fred', 65],\n                    ['Fritz', 19],\n                    ['Hector', 66],\n                    ['Sal', 73],\n                    ['Srivan', 39],\n                    ['Tom', 52],\n                    ['Xi', 19],\n                ],\n                self::sampleDataForSimpleSort(),\n                'A1:A8',\n            ],\n            'More realistic example of when to use SORTBY vs SORT' => [\n                [\n                    ['Amy', 22],\n                    ['Tom', 52],\n                    ['Sal', 73],\n                    ['Fred', 65],\n                    ['Hector', 66],\n                    ['Xi', 19],\n                    ['Srivan', 39],\n                    ['Fritz', 19],\n                ],\n                self::sampleDataForSimpleSort(),\n                'G1:G8',\n            ],\n            'Boolean sort indexes' => [\n                [\n                    ['Fred', 65],\n                    ['Sal', 73],\n                    ['Srivan', 39],\n                    ['Hector', 66],\n                    ['Tom', 52],\n                    ['Amy', 22],\n                    ['Fritz', 19],\n                    ['Xi', 19],\n                ],\n                self::sampleDataForSimpleSort(),\n                'H1:H8',\n            ],\n            'Simple sort by name descending' => [\n                [\n                    ['Xi', 19],\n                    ['Tom', 52],\n                    ['Srivan', 39],\n                    ['Sal', 73],\n                    ['Hector', 66],\n                    ['Fritz', 19],\n                    ['Fred', 65],\n                    ['Amy', 22],\n                ],\n                self::sampleDataForSimpleSort(),\n                'A1:A8',\n                -1,\n            ],\n            'Row vector (using Dritz instead of Fritz)' => [\n                [\n                    ['Amy', 22],\n                    ['Fritz', 19],\n                    ['Fred', 65],\n                    ['Hector', 66],\n                    ['Sal', 73],\n                    ['Srivan', 39],\n                    ['Tom', 52],\n                    ['Xi', 19],\n                ],\n                self::sampleDataForSimpleSort(),\n                '{\"Tom\";\"Fred\";\"Amy\";\"Sal\";\"Dritz\";\"Srivan\";\"Xi\";\"Hector\"}',\n            ],\n            'Sort by region asc, name asc' => [\n                [\n                    ['East', 'Fritz', 19],\n                    ['East', 'Tom', 52],\n                    ['North', 'Amy', 22],\n                    ['North', 'Xi', 19],\n                    ['South', 'Hector', 66],\n                    ['South', 'Sal', 73],\n                    ['West', 'Fred', 65],\n                    ['West', 'Srivan', 39],\n                ],\n                self::sampleDataForMultiSort(),\n                'A1:A8',\n                Sort::ORDER_ASCENDING,\n                'B1:B8',\n            ],\n            'Sort by region asc, age desc' => [\n                [\n                    ['East', 'Tom', 52],\n                    ['East', 'Fritz', 19],\n                    ['North', 'Amy', 22],\n                    ['North', 'Xi', 19],\n                    ['South', 'Sal', 73],\n                    ['South', 'Hector', 66],\n                    ['West', 'Fred', 65],\n                    ['West', 'Srivan', 39],\n                ],\n                self::sampleDataForMultiSort(),\n                'A1:A8',\n                Sort::ORDER_ASCENDING,\n                'C1:C8',\n                Sort::ORDER_DESCENDING,\n            ],\n        ];\n    }\n\n    /** @return array<array{string, int}> */\n    private static function sampleDataForSimpleSort(): array\n    {\n        return [\n            ['Tom', 52],\n            ['Fred', 65],\n            ['Amy', 22],\n            ['Sal', 73],\n            ['Fritz', 19],\n            ['Srivan', 39],\n            ['Xi', 19],\n            ['Hector', 66],\n        ];\n    }\n\n    /** @return array<array{string, string, int}> */\n    private static function sampleDataForMultiSort(): array\n    {\n        return [\n            ['North', 'Amy', 22],\n            ['West', 'Fred', 65],\n            ['East', 'Fritz', 19],\n            ['South', 'Hector', 66],\n            ['South', 'Sal', 73],\n            ['West', 'Srivan', 39],\n            ['East', 'Tom', 52],\n            ['North', 'Xi', 19],\n        ];\n    }\n\n    public function testSortByColumn(): void\n    {\n        $matrix = [\n            ['Tom', 'Fred', 'Amy', 'Sal', 'Fritz', 'Srivan', 'Xi', 'Hector'],\n            [52, 65, 22, 73, 19, 39, 19, 66],\n        ];\n        $sheet = $this->getSheet($matrix);\n        $formula = \"=SORTBY({$this->range}, A1:H1)\";\n        $expectedResult = [\n            ['Amy', 'Fred', 'Fritz', 'Hector', 'Sal', 'Srivan', 'Tom', 'Xi'],\n            [22, 65, 19, 66, 73, 39, 52, 19],\n        ];\n        $sheet->getCell('Z1')->setValue($formula);\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortByTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Sort;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SortByTest extends TestCase\n{\n    public function testSortOnScalar(): void\n    {\n        $value = 'NON-ARRAY';\n\n        $result = Sort::sortBy($value, [[$value]]);\n        self::assertSame([[$value]], $result);\n    }\n\n    #[DataProvider('providerSortWithScalarArgumentErrorReturns')]\n    public function testSortByWithArgumentErrorReturns(mixed $sortIndex, mixed $sortOrder = 1): void\n    {\n        $value = [[1, 2], [3, 4], [5, 6]];\n\n        $result = Sort::sortBy($value, $sortIndex, $sortOrder);\n        self::assertSame(ExcelError::VALUE(), $result);\n    }\n\n    public static function providerSortWithScalarArgumentErrorReturns(): array\n    {\n        return [\n            'Non-array sortIndex' => ['A', 1],\n            'Mismatched sortIndex count' => [[1, 2, 3, 4], 1],\n            'Non-numeric sortOrder' => [[1, 2, 3], 'A'],\n            'Invalid negative sortOrder' => [[1, 2, 3], -2],\n            'Zero sortOrder' => [[1, 2, 3], 0],\n            'Invalid positive sortOrder' => [[1, 2, 3], 2],\n        ];\n    }\n\n    /** @param mixed[] $matrix */\n    #[DataProvider('providerSortByRow')]\n    public function testSortByRow(array $expectedResult, array $matrix, mixed ...$args): void\n    {\n        $result = Sort::sortBy($matrix, ...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSortByRow(): array\n    {\n        return [\n            'Simple sort by age' => [\n                [\n                    ['Fritz', 19],\n                    ['Xi', 19],\n                    ['Amy', 22],\n                    ['Srivan', 39],\n                    ['Tom', 52],\n                    ['Fred', 65],\n                    ['Hector', 66],\n                    ['Sal', 73],\n                ],\n                self::sampleDataForSimpleSort(),\n                array_column(self::sampleDataForSimpleSort(), 1),\n            ],\n            'Simple sort by name' => [\n                [\n                    ['Amy', 22],\n                    ['Fred', 65],\n                    ['Fritz', 19],\n                    ['Hector', 66],\n                    ['Sal', 73],\n                    ['Srivan', 39],\n                    ['Tom', 52],\n                    ['Xi', 19],\n                ],\n                self::sampleDataForSimpleSort(),\n                array_column(self::sampleDataForSimpleSort(), 0),\n            ],\n            'Row vector' => [\n                [\n                    ['Amy', 22],\n                    ['Fred', 65],\n                    ['Fritz', 19],\n                    ['Hector', 66],\n                    ['Sal', 73],\n                    ['Srivan', 39],\n                    ['Tom', 52],\n                    ['Xi', 19],\n                ],\n                self::sampleDataForSimpleSort(),\n                ['Tom', 'Fred', 'Amy', 'Sal', 'Fritz', 'Srivan', 'Xi', 'Hector'],\n            ],\n            'Column vector' => [\n                [\n                    ['Amy', 22],\n                    ['Fred', 65],\n                    ['Fritz', 19],\n                    ['Hector', 66],\n                    ['Sal', 73],\n                    ['Srivan', 39],\n                    ['Tom', 52],\n                    ['Xi', 19],\n                ],\n                self::sampleDataForSimpleSort(),\n                [['Tom'], ['Fred'], ['Amy'], ['Sal'], ['Fritz'], ['Srivan'], ['Xi'], ['Hector']],\n            ],\n            'Sort by region asc, name asc' => [\n                [\n                    ['East', 'Fritz', 19],\n                    ['East', 'Tom', 52],\n                    ['North', 'Amy', 22],\n                    ['North', 'Xi', 19],\n                    ['South', 'Hector', 66],\n                    ['South', 'Sal', 73],\n                    ['West', 'Fred', 65],\n                    ['West', 'Srivan', 39],\n                ],\n                self::sampleDataForMultiSort(),\n                array_column(self::sampleDataForMultiSort(), 0),\n                Sort::ORDER_ASCENDING,\n                array_column(self::sampleDataForMultiSort(), 1),\n            ],\n            'Sort by region asc, age desc' => [\n                [\n                    ['East', 'Tom', 52],\n                    ['East', 'Fritz', 19],\n                    ['North', 'Amy', 22],\n                    ['North', 'Xi', 19],\n                    ['South', 'Sal', 73],\n                    ['South', 'Hector', 66],\n                    ['West', 'Fred', 65],\n                    ['West', 'Srivan', 39],\n                ],\n                self::sampleDataForMultiSort(),\n                array_column(self::sampleDataForMultiSort(), 0),\n                Sort::ORDER_ASCENDING,\n                array_column(self::sampleDataForMultiSort(), 2),\n                Sort::ORDER_DESCENDING,\n            ],\n        ];\n    }\n\n    /** @return array<array{string, int}> */\n    private static function sampleDataForSimpleSort(): array\n    {\n        return [\n            ['Tom', 52],\n            ['Fred', 65],\n            ['Amy', 22],\n            ['Sal', 73],\n            ['Fritz', 19],\n            ['Srivan', 39],\n            ['Xi', 19],\n            ['Hector', 66],\n        ];\n    }\n\n    /** @return array<array{string, string, int}> */\n    private static function sampleDataForMultiSort(): array\n    {\n        return [\n            ['North', 'Amy', 22],\n            ['West', 'Fred', 65],\n            ['East', 'Fritz', 19],\n            ['South', 'Hector', 66],\n            ['South', 'Sal', 73],\n            ['West', 'Srivan', 39],\n            ['East', 'Tom', 52],\n            ['North', 'Xi', 19],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\Sort;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SortTest extends TestCase\n{\n    public function testSortOnScalar(): void\n    {\n        $value = 'NON-ARRAY';\n\n        $result = Sort::sort($value, 1, -1);\n        self::assertSame([[$value]], $result);\n    }\n\n    #[DataProvider('providerSortWithScalarArgumentErrorReturns')]\n    public function testSortWithScalarArgumentErrorReturns(mixed $sortIndex, mixed $sortOrder = 1): void\n    {\n        $value = [[1, 2], [3, 4], [5, 6]];\n\n        $result = Sort::sort($value, $sortIndex, $sortOrder);\n        self::assertSame(ExcelError::VALUE(), $result);\n    }\n\n    public static function providerSortWithScalarArgumentErrorReturns(): array\n    {\n        return [\n            'Negative sortIndex' => [-1, -1],\n            'Non-numeric sortIndex' => ['A', -1],\n            'Zero sortIndex' => [0, -1],\n            'Too high sortIndex' => [3, -1],\n            'Non-numeric sortOrder' => [1, 'A'],\n            'Invalid negative sortOrder' => [1, -2],\n            'Zero sortOrder' => [1, 0],\n            'Invalid positive sortOrder' => [1, 2],\n            'Too many sortOrders (scalar and array)' => [1, [-1, 1]],\n            'Too many sortOrders (both array)' => [[1, 2], [1, 2, 3]],\n            'Zero positive sortIndex in vector' => [[0, 1]],\n            'Too high sortIndex in vector' => [[1, 3]],\n            'Invalid sortOrder in vector' => [[1, 2], [1, -2]],\n        ];\n    }\n\n    /** @param mixed[] $matrix */\n    #[DataProvider('providerSortByRow')]\n    public function testSortByRow(array $expectedResult, array $matrix, int $sortIndex, int $sortOrder = Sort::ORDER_ASCENDING): void\n    {\n        $result = Sort::sort($matrix, $sortIndex, $sortOrder);\n        self::assertSame($expectedResult, $result);\n    }\n\n    /** @return mixed[] */\n    public static function providerSortByRow(): array\n    {\n        return [\n            [\n                [[142], [378], [404], [445], [483], [622], [650], [691], [783], [961]],\n                self::sampleDataForRow(),\n                1,\n            ],\n            [\n                [[961], [783], [691], [650], [622], [483], [445], [404], [378], [142]],\n                self::sampleDataForRow(),\n                1,\n                Sort::ORDER_DESCENDING,\n            ],\n            [\n                [['Peaches', 25], ['Cherries', 29], ['Grapes', 31], ['Lemons', 34], ['Oranges', 36], ['Apples', 38], ['Pears', 40]],\n                [['Apples', 38], ['Cherries', 29], ['Grapes', 31], ['Lemons', 34], ['Oranges', 36], ['Peaches', 25], ['Pears', 40]],\n                2,\n            ],\n        ];\n    }\n\n    /**\n     * @param mixed[] $matrix\n     * @param mixed[] $sortIndex\n     */\n    #[DataProvider('providerSortByRowMultiLevel')]\n    public function testSortByRowMultiLevel(array $expectedResult, array $matrix, array $sortIndex, int $sortOrder = Sort::ORDER_ASCENDING): void\n    {\n        $result = Sort::sort($matrix, $sortIndex, $sortOrder);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSortByRowMultiLevel(): array\n    {\n        return [\n            [\n                [\n                    ['East', 'Grapes', 31],\n                    ['East', 'Lemons', 36],\n                    ['North', 'Cherries', 29],\n                    ['North', 'Grapes', 27],\n                    ['North', 'Peaches', 25],\n                    ['South', 'Apples', 38],\n                    ['South', 'Cherries', 28],\n                    ['South', 'Oranges', 36],\n                    ['South', 'Pears', 40],\n                    ['West', 'Apples', 30],\n                    ['West', 'Lemons', 34],\n                    ['West', 'Oranges', 25],\n                ],\n                self::sampleDataForMultiRow(),\n                [1, 2],\n            ],\n            [\n                [\n                    ['East', 'Grapes', 31],\n                    ['East', 'Lemons', 36],\n                    ['North', 'Peaches', 25],\n                    ['North', 'Grapes', 27],\n                    ['North', 'Cherries', 29],\n                    ['South', 'Cherries', 28],\n                    ['South', 'Oranges', 36],\n                    ['South', 'Apples', 38],\n                    ['South', 'Pears', 40],\n                    ['West', 'Oranges', 25],\n                    ['West', 'Apples', 30],\n                    ['West', 'Lemons', 34],\n                ],\n                self::sampleDataForMultiRow(),\n                [1, 3],\n            ],\n            [\n                [\n                    ['West', 'Apples', 30],\n                    ['South', 'Apples', 38],\n                    ['South', 'Cherries', 28],\n                    ['North', 'Cherries', 29],\n                    ['North', 'Grapes', 27],\n                    ['East', 'Grapes', 31],\n                    ['West', 'Lemons', 34],\n                    ['East', 'Lemons', 36],\n                    ['West', 'Oranges', 25],\n                    ['South', 'Oranges', 36],\n                    ['North', 'Peaches', 25],\n                    ['South', 'Pears', 40],\n                ],\n                self::sampleDataForMultiRow(),\n                [2, 3],\n            ],\n        ];\n    }\n\n    /** @param mixed[] $matrix */\n    #[DataProvider('providerSortByColumn')]\n    public function testSortByColumn(array $expectedResult, array $matrix, int $sortIndex, int $sortOrder): void\n    {\n        $result = Sort::sort($matrix, $sortIndex, $sortOrder, true);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSortByColumn(): array\n    {\n        return [\n            [\n                [[142, 378, 404, 445, 483, 622, 650, 691, 783, 961]],\n                self::sampleDataForColumn(),\n                1,\n                Sort::ORDER_ASCENDING,\n            ],\n            [\n                [[961, 783, 691, 650, 622, 483, 445, 404, 378, 142]],\n                self::sampleDataForColumn(),\n                1,\n                Sort::ORDER_DESCENDING,\n            ],\n        ];\n    }\n\n    /** @return array<int[]> */\n    public static function sampleDataForRow(): array\n    {\n        return [\n            [622], [961], [691], [445], [378], [483], [650], [783], [142], [404],\n        ];\n    }\n\n    /** @return array<array{string, string, int}> */\n    public static function sampleDataForMultiRow(): array\n    {\n        return [\n            ['South', 'Pears', 40],\n            ['South', 'Apples', 38],\n            ['South', 'Oranges', 36],\n            ['East', 'Lemons', 36],\n            ['West', 'Lemons', 34],\n            ['East', 'Grapes', 31],\n            ['West', 'Apples', 30],\n            ['North', 'Cherries', 29],\n            ['South', 'Cherries', 28],\n            ['North', 'Grapes', 27],\n            ['North', 'Peaches', 25],\n            ['West', 'Oranges', 25],\n        ];\n    }\n\n    /** @return array<int[]> */\n    public static function sampleDataForColumn(): array\n    {\n        return [\n            [622, 961, 691, 445, 378, 483, 650, 783, 142, 404],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TakeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TakeTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTake')]\n    public function testTake(mixed $expectedResult, string $formula): void\n    {\n        Calculation::setArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->fromArray(\n            [\n                ['a', 'b', 'c'],\n                ['d', 'e', 'f'],\n                ['g', 'h', 'i'],\n                ['j', 'k', 'l'],\n                ['m', 'n', 'o'],\n                ['p', 'q', 'r'],\n                ['s', 't', 'u'],\n                ['v', 'w', 'x'],\n                ['y', 'z', '#'],\n            ],\n            null,\n            'B3',\n            true\n        );\n        $this->getSpreadsheet()->addNamedRange(\n            new NamedRange(\n                'definedname',\n                $sheet,\n                '$B$3:$D$11'\n            )\n        );\n\n        $sheet->setCellValue('F3', $formula);\n        $result = $sheet->getCell('F3')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTake(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/TAKE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TocolTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TocolTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTocol')]\n    public function testTorow(mixed $expectedResult, mixed $ignore = 'omitted', mixed $byColumn = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $this->setArrayAsArray();\n        if (is_string($ignore) && $ignore !== 'omitted') {\n            $ignore = '\"' . $ignore . '\"';\n        }\n        if (is_string($byColumn) && $byColumn !== 'omitted') {\n            $byColumn = '\"' . $byColumn . '\"';\n        }\n        $ignore = StringHelper::convertToString($ignore);\n        $byColumn = StringHelper::convertToString($byColumn, convertBool: true);\n        if ($ignore === 'omitted') {\n            $formula = '=TOCOL(A1:D3)';\n        } elseif ($byColumn === 'omitted') {\n            $formula = \"=TOCOL(A1:D3,$ignore)\";\n        } else {\n            $formula = \"=TOCOL(A1:D3,$ignore,$byColumn)\";\n        }\n\n        $data = [\n            ['a-one', 'b-one', 'c-one', 'd-one'],\n            [null, 'b-two', 'c-two', '=2/0'],\n            [' ', 'b-three', 'c-three', 'd-three'],\n        ];\n        $sheet->fromArray($data, null, 'A1', true);\n        $sheet->setCellValue('A5', $formula);\n        $result = $sheet->getCell('A5')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTocol(): array\n    {\n        return [\n            'defaults' => [[['a-one'], ['b-one'], ['c-one'], ['d-one'], [0], ['b-two'], ['c-two'], ['#DIV/0!'], [' '], ['b-three'], ['c-three'], ['d-three']]],\n            'ignore=0' => [[['a-one'], ['b-one'], ['c-one'], ['d-one'], [0], ['b-two'], ['c-two'], ['#DIV/0!'], [' '], ['b-three'], ['c-three'], ['d-three']], 0],\n            'ignore=1 supplied as 1.1' => [[['a-one'], ['b-one'], ['c-one'], ['d-one'], ['b-two'], ['c-two'], ['#DIV/0!'], [' '], ['b-three'], ['c-three'], ['d-three']], 1.1],\n            'ignore=2' => [[['a-one'], ['b-one'], ['c-one'], ['d-one'], [0], ['b-two'], ['c-two'], [' '], ['b-three'], ['c-three'], ['d-three']], 2],\n            'ignore=3' => [[['a-one'], ['b-one'], ['c-one'], ['d-one'], ['b-two'], ['c-two'], [' '], ['b-three'], ['c-three'], ['d-three']], 3],\n            'ignore=4 invalid' => ['#VALUE!', 4],\n            'ignore=string invalid' => ['#VALUE!', 'x'],\n            'by column' => [[['a-one'], [0], [' '], ['b-one'], ['b-two'], ['b-three'], ['c-one'], ['c-two'], ['c-three'], ['d-one'], ['#DIV/0!'], ['d-three']], 0, true],\n            'by column using float rather than bool, ignore=2' => [[['a-one'], [0], [' '], ['b-one'], ['b-two'], ['b-three'], ['c-one'], ['c-two'], ['c-three'], ['d-one'], ['d-three']], 2, 29.7],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TorowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TorowTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTorow')]\n    public function testTorow(mixed $expectedResult, mixed $ignore = 'omitted', mixed $byColumn = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $this->setArrayAsArray();\n        if (is_string($ignore) && $ignore !== 'omitted') {\n            $ignore = '\"' . $ignore . '\"';\n        }\n        if (is_string($byColumn) && $byColumn !== 'omitted') {\n            $byColumn = '\"' . $byColumn . '\"';\n        }\n        $ignore = StringHelper::convertToString($ignore);\n        $byColumn = StringHelper::convertToString($byColumn, convertBool: true);\n        if ($ignore === 'omitted') {\n            $formula = '=TOROW(A1:D3)';\n        } elseif ($byColumn === 'omitted') {\n            $formula = \"=TOROW(A1:D3,$ignore)\";\n        } else {\n            $formula = \"=TOROW(A1:D3,$ignore,$byColumn)\";\n        }\n\n        $data = [\n            ['a-one', 'b-one', 'c-one', 'd-one'],\n            [null, 'b-two', 'c-two', '=2/0'],\n            [' ', 'b-three', 'c-three', 'd-three'],\n        ];\n        $sheet->fromArray($data, null, 'A1', true);\n        $sheet->setCellValue('A5', $formula);\n        $result = $sheet->getCell('A5')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTorow(): array\n    {\n        return [\n            'defaults' => [['a-one', 'b-one', 'c-one', 'd-one', 0, 'b-two', 'c-two', '#DIV/0!', ' ', 'b-three', 'c-three', 'd-three']],\n            'ignore=0' => [['a-one', 'b-one', 'c-one', 'd-one', 0, 'b-two', 'c-two', '#DIV/0!', ' ', 'b-three', 'c-three', 'd-three'], 0],\n            'ignore=1 supplied as 1.1' => [['a-one', 'b-one', 'c-one', 'd-one', 'b-two', 'c-two', '#DIV/0!', ' ', 'b-three', 'c-three', 'd-three'], 1.1],\n            'ignore=2' => [['a-one', 'b-one', 'c-one', 'd-one', 0, 'b-two', 'c-two', ' ', 'b-three', 'c-three', 'd-three'], 2],\n            'ignore=3' => [['a-one', 'b-one', 'c-one', 'd-one', 'b-two', 'c-two', ' ', 'b-three', 'c-three', 'd-three'], 3],\n            'ignore=-1 invalid' => ['#VALUE!', -1],\n            'ignore=string invalid' => ['#VALUE!', 'x'],\n            'by column' => [['a-one', 0, ' ', 'b-one', 'b-two', 'b-three', 'c-one', 'c-two', 'c-three', 'd-one', '#DIV/0!', 'd-three'], 0, true],\n            'by column using int rather than bool, ignore=1' => [['a-one', ' ', 'b-one', 'b-two', 'b-three', 'c-one', 'c-two', 'c-three', 'd-one', '#DIV/0!', 'd-three'], 1, -15],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TransposeOnSpreadsheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TransposeOnSpreadsheetTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTRANSPOSE')]\n    public function testTRANSPOSE(mixed $expectedResult, mixed $matrix): void\n    {\n        $sheet = $this->getSheet();\n        $this->setArrayAsArray();\n        if (!is_array($matrix)) {\n            $matrix = [$matrix];\n        }\n        $sheet->fromArray($matrix, null, 'A1', true);\n        $highColumn = $sheet->getHighestDataColumn();\n        $highRow = $sheet->getHighestDataRow();\n        $newHighColumn = $highColumn;\n        StringHelper::stringIncrement($newHighColumn);\n        $sheet->getCell(\"{$newHighColumn}1\")\n            ->setValue(\"=TRANSPOSE(A1:$highColumn$highRow)\");\n        self::assertSame($expectedResult, $sheet->getCell(\"{$newHighColumn}1\")->getCalculatedValue());\n    }\n\n    public static function providerTRANSPOSE(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/TRANSPOSE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TransposeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TransposeTest extends TestCase\n{\n    protected function setUp(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTRANSPOSE')]\n    public function testTRANSPOSE(mixed $expectedResult, mixed $matrix): void\n    {\n        $result = LookupRef\\Matrix::transpose($matrix);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerTRANSPOSE(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/TRANSPOSE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/UniqueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass UniqueTest extends TestCase\n{\n    /** @param mixed[] $lookupRef */\n    #[DataProvider('uniqueTestProvider')]\n    public function testUnique(array $expectedResult, array $lookupRef, bool $byColumn = false, bool $exactlyOnce = false): void\n    {\n        $result = LookupRef\\Unique::unique($lookupRef, $byColumn, $exactlyOnce);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public function testUniqueException(): void\n    {\n        $rowLookupData = [\n            ['Andrew', 'Brown'],\n            ['Betty', 'Johnson'],\n            ['Betty', 'Johnson'],\n            ['Andrew', 'Brown'],\n            ['David', 'White'],\n            ['Andrew', 'Brown'],\n            ['David', 'White'],\n        ];\n\n        $columnLookupData = [\n            ['PHP', 'Rocks', 'php', 'rocks'],\n        ];\n\n        $result = LookupRef\\Unique::unique($rowLookupData, false, true);\n        self::assertSame(ExcelError::CALC(), $result);\n\n        $result = LookupRef\\Unique::unique($columnLookupData, true, true);\n        self::assertSame(ExcelError::CALC(), $result);\n    }\n\n    public function testUniqueWithScalar(): void\n    {\n        $lookupData = 123;\n\n        $result = LookupRef\\Unique::unique($lookupData);\n        self::assertSame($lookupData, $result);\n    }\n\n    public static function uniqueTestProvider(): array\n    {\n        return [\n            [\n                [['Red'], ['Green'], ['Blue'], ['Orange']],\n                [\n                    ['Red'],\n                    ['Green'],\n                    ['Green'],\n                    ['Blue'],\n                    ['Blue'],\n                    ['Orange'],\n                    ['Green'],\n                    ['Blue'],\n                    ['Red'],\n                ],\n            ],\n            [\n                [['Red'], ['Green'], ['Blue'], ['Orange']],\n                [\n                    ['Red'],\n                    ['Green'],\n                    ['GrEEn'],\n                    ['Blue'],\n                    ['BLUE'],\n                    ['Orange'],\n                    ['GReeN'],\n                    ['blue'],\n                    ['RED'],\n                ],\n            ],\n            [\n                ['Orange'],\n                [\n                    ['Red'],\n                    ['Green'],\n                    ['Green'],\n                    ['Blue'],\n                    ['Blue'],\n                    ['Orange'],\n                    ['Green'],\n                    ['Blue'],\n                    ['Red'],\n                ],\n                false,\n                true,\n            ],\n            [\n                ['Andrew', 'Betty', 'Robert', 'David'],\n                [['Andrew', 'Betty', 'Robert', 'Andrew', 'Betty', 'Robert', 'David', 'Andrew']],\n                true,\n            ],\n            [\n                ['David'],\n                [['Andrew', 'Betty', 'Robert', 'Andrew', 'Betty', 'Robert', 'David', 'Andrew']],\n                true,\n                true,\n            ],\n            [\n                [1, 1, 2, 2, 3],\n                [[1, 1, 2, 2, 3]],\n            ],\n            [\n                [1, 2, 3],\n                [[1, 1, 2, 2, 3]],\n                true,\n            ],\n            [\n                [\n                    [1, 1, 2, 3],\n                    [1, 2, 2, 3],\n                ],\n                [\n                    [1, 1, 2, 2, 3],\n                    [1, 2, 2, 2, 3],\n                ],\n                true,\n            ],\n            [\n                [\n                    ['Andrew', 'Brown'],\n                    ['Betty', 'Johnson'],\n                    ['David', 'White'],\n                ],\n                [\n                    ['Andrew', 'Brown'],\n                    ['Betty', 'Johnson'],\n                    ['Betty', 'Johnson'],\n                    ['Andrew', 'Brown'],\n                    ['David', 'White'],\n                    ['Andrew', 'Brown'],\n                    ['David', 'White'],\n                ],\n            ],\n            [\n                [[1.2], [2.1], [2.2], [3], ['3'], [8.7]],\n                [\n                    [1.2],\n                    [1.2],\n                    [2.1],\n                    [2.2],\n                    [3.0],\n                    [3],\n                    ['3'],\n                    [8.7],\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass VLookupTest extends AllSetupTeardown\n{\n    #[DataProvider('providerVLOOKUP')]\n    public function testVLOOKUP(mixed $expectedResult, mixed $value, mixed $table, mixed $index, ?bool $lookup = null): void\n    {\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        if (is_array($table)) {\n            $sheet->fromArray($table);\n            $dimension = $sheet->calculateWorksheetDimension();\n        } else {\n            $sheet->getCell('A1')->setValue($table);\n            $dimension = 'A1';\n        }\n        if ($lookup === null) {\n            $lastarg = '';\n        } else {\n            $lastarg = $lookup ? ',TRUE' : ',FALSE';\n        }\n        $sheet->getCell('Z98')->setValue($value);\n        if (is_array($index)) {\n            $sheet->fromArray($index, null, 'Z100', true);\n            $indexarg = 'Z100:Z' . (string) (99 + count($index));\n        } else {\n            $sheet->getCell('Z100')->setValue($index);\n            $indexarg = 'Z100';\n        }\n\n        $sheet->getCell('Z99')->setValue(\"=VLOOKUP(Z98,$dimension,$indexarg$lastarg)\");\n        $result = $sheet->getCell('Z99')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerVLOOKUP(): array\n    {\n        return require 'tests/data/Calculation/LookupRef/VLOOKUP.php';\n    }\n\n    #[DataProvider('providerVLookupArray')]\n    public function testVLookupArray(array $expectedResult, string $values, string $database, string $index): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=VLOOKUP({$values}, {$database}, {$index}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerVLookupArray(): array\n    {\n        return [\n            'row vector' => [\n                [[4.19, 5.77, 4.14]],\n                '{\"Orange\", \"Green\", \"Red\"}',\n                '{\"Red\", 4.14; \"Orange\", 4.19; \"Yellow\", 5.17; \"Green\", 5.77; \"Blue\", 6.39}',\n                '2',\n            ],\n            'issue 3561' => [\n                [[7, 8, 7]],\n                '6',\n                '{1,2,3,4,5;6,7,8,9,10;11,12,13,14,15}',\n                '{2,3,2}',\n            ],\n        ];\n    }\n\n    public function testIssue1402(): void\n    {\n        $worksheet = $this->getSheet();\n\n        $worksheet->setCellValueExplicit('A1', 1, DataType::TYPE_STRING);\n        $worksheet->setCellValue('B1', 'Text Nr 1');\n        $worksheet->setCellValue('A2', 2);\n        $worksheet->setCellValue('B2', 'Numeric result');\n        $worksheet->setCellValueExplicit('A3', 2, DataType::TYPE_STRING);\n        $worksheet->setCellValue('B3', 'Text Nr 2');\n        $worksheet->setCellValueExplicit('A4', 2, DataType::TYPE_STRING);\n        $worksheet->setCellValue('B4', '=VLOOKUP(A4,$A$1:$B$3,2,0)');\n        self::assertSame('Text Nr 2', $worksheet->getCell('B4')->getCalculatedValue());\n        $worksheet->setCellValue('A5', 2);\n        $worksheet->setCellValue('B5', '=VLOOKUP(A5,$A$1:$B$3,2,0)');\n        self::assertSame('Numeric result', $worksheet->getCell('B5')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VStackTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\LookupRef;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\n/**\n * Many of these tests are derived from\n * https://exceljet.net/functions/vstack-function.\n */\nclass VStackTest extends AllSetupTeardown\n{\n    public static function testVstack1(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B2', 'Array1');\n        $sheet->setCellValue('B3', 'Red');\n        $sheet->setCellValue('B4', 'Blue');\n        $sheet->setCellValue('B5', 'Green');\n        $sheet->setCellValue('B7', 'Array2');\n        $sheet->setCellValue('B8', 'Green');\n        $sheet->setCellValue('B9', 'Red');\n        $sheet->setCellValue('D2', 'Result');\n        $sheet->setCellValue('D3', '=VSTACK(B3:B5,B8:B9)');\n        $expected = [\n            ['Red'],\n            ['Blue'],\n            ['Green'],\n            ['Green'],\n            ['Red'],\n        ];\n        self::assertSame($expected, $sheet->getCell('D3')->getCalculatedValue());\n\n        $sheet->setCellValue('F2', '=VSTACK(B2,B8:B9)');\n        $expected = [\n            ['Array1'],\n            ['Green'],\n            ['Red'],\n        ];\n        self::assertSame($expected, $sheet->getCell('F2')->getCalculatedValue(), 'one single-cell argument');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testVstack2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B3', 'Red');\n        $sheet->setCellValue('B4', 'Blue');\n        $sheet->setCellValue('B5', 'Green');\n        $sheet->setCellValue('B6', 'Blue');\n        $sheet->setCellValue('B7', 'Red');\n        $sheet->setCellValue('C3', 12);\n        $sheet->setCellValue('C4', 9);\n        $sheet->setCellValue('C5', 10);\n        $sheet->setCellValue('C5', 10);\n        $sheet->setCellValue('C6', 11);\n        $sheet->setCellValue('C7', 8);\n        $sheet->setCellValue('E3', '=VSTACK({\"Color\",\"Qty\"},B3:C7)');\n        $expected = [\n            ['Color', 'Qty'],\n            ['Red', 12],\n            ['Blue', 9],\n            ['Green', 10],\n            ['Blue', 11],\n            ['Red', 8],\n        ];\n        self::assertSame($expected, $sheet->getCell('E3')->getCalculatedValue());\n        $sheet->setCellValue('A1', 'Purple');\n        $sheet->setCellValue('A2', 'Orange');\n        $sheet->setCellValue('H3', '=VSTACK({\"Color\",\"Qty\"},A1:A2,B3:C7)');\n        $expected = [\n            ['Color', 'Qty'],\n            ['Purple', '#N/A'],\n            ['Orange', '#N/A'],\n            ['Red', 12],\n            ['Blue', 9],\n            ['Green', 10],\n            ['Blue', 11],\n            ['Red', 8],\n        ];\n        self::assertSame($expected, $sheet->getCell('H3')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Excel has a problem here.\n     * If it reads VSTACK(Table1, Table2) without square\n     * brackets after Table1/2, it calculates the result as #NAME?.\n     * You can then just edit the formula without making\n     * any changes, and it will calculate it correctly,\n     * but it will add in the brackets when saving.\n     * This seems pretty buggy to me.\n     * PhpSpreadsheet will handle the formula with or without\n     * the brackets, but you should specify them to avoid\n     * problems with Excel.\n     */\n    public static function testTables(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [\n            ['Date', 'Color', 'Qty'],\n            [Date::stringToExcel('2021-04-03'), 'Red', 12],\n            [Date::stringToExcel('2021-04-07'), 'Blue', 9],\n            [Date::stringToExcel('2021-04-11'), 'Green', 10],\n            [Date::stringToExcel('2021-04-15'), 'Blue', 11],\n            [Date::stringToExcel('2021-04-20'), 'Red', 8],\n        ];\n        $sheet->fromArray($data, null, 'B4', true);\n        $table = new Table('B4:D9', 'Table1');\n        $sheet->addTable($table);\n\n        $data = [\n            ['Date', 'Color', 'Qty'],\n            [Date::stringToExcel('2021-05-05'), 'Red', 12],\n            [Date::stringToExcel('2021-05-12'), 'Blue', 9],\n            [Date::stringToExcel('2021-05-18'), 'Green', 10],\n            [Date::stringToExcel('2021-05-21'), 'Blue', 11],\n            [Date::stringToExcel('2021-05-28'), 'Green', 6],\n        ];\n        $sheet->fromArray($data, null, 'B11', true);\n        $table = new Table('B11:D16', 'Table2');\n        $sheet->addTable($table);\n\n        $sheet->setCellValue('G4', 'Date');\n        $sheet->setCellValue('H4', 'Color');\n        $sheet->setCellValue('I4', 'Qty');\n        $sheet->setCellValue('G5', '=VSTACK(Table1[],Table2[])');\n        $sheet->getCell('G5')->getCalculatedValue();\n\n        $sheet->getStyle('B4:B16')\n            ->getNumberFormat()\n            ->setFormatCode('d-mmm');\n        $sheet->getStyle('G5:G14')\n            ->getNumberFormat()\n            ->setFormatCode('d-mmm');\n        $expected = [\n            ['3-Apr', 'Red', '12'],\n            ['7-Apr', 'Blue', '9'],\n            ['11-Apr', 'Green', '10'],\n            ['15-Apr', 'Blue', '11'],\n            ['20-Apr', 'Red', '8'],\n            ['5-May', 'Red', '12'],\n            ['12-May', 'Blue', '9'],\n            ['18-May', 'Green', '10'],\n            ['21-May', 'Blue', '11'],\n            ['28-May', 'Green', '6'],\n        ];\n        $actual = $sheet->rangeToArray('G5:I14', null, true, true);\n        self::assertSame($expected, $actual);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AbsTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAbs')]\n    public function testAbs(mixed $expectedResult, mixed $number = 'omitted'): void\n    {\n        $sheet = $this->getSheet();\n        $this->mightHaveException($expectedResult);\n        $this->setCell('A1', $number);\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=ABS()');\n        } else {\n            $sheet->getCell('B1')->setValue('=ABS(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerAbs(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ABS.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAbsArray')]\n    public function testAbsoluteArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ABS({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAbsArray(): array\n    {\n        return [\n            'row vector' => [[[1, 0, 1]], '{-1, 0, 1}'],\n            'column vector' => [[[1], [0], [1]], '{-1; 0; 1}'],\n            'matrix' => [[[1, 0], [1, 1.4]], '{-1, 0; 1, -1.4}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AcosTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAcos')]\n    public function testAcos(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A2')->setValue(0.5);\n        $sheet->getCell('A1')->setValue(\"=ACOS($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerAcos(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ACOS.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAcosArray')]\n    public function testAcosArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ACOS({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAcosArray(): array\n    {\n        return [\n            'row vector' => [[[0.0, 1.04719755119660, 3.14159265358979]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.0], [1.04719755119660], [3.14159265358979]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.0, 1.04719755119660], [1.57079632679490, 3.14159265358979]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AcoshTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAcosh')]\n    public function testAcosh(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A2')->setValue('1.5');\n        $sheet->getCell('A1')->setValue(\"=ACOSH($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerAcosh(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ACOSH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAcoshArray')]\n    public function testAcoshArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ACOSH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAcoshArray(): array\n    {\n        return [\n            'row vector' => [[[0.0, 1.31695789692482, 1.76274717403909]], '{1, 2, 3}'],\n            'column vector' => [[[0.0], [1.31695789692482], [1.76274717403909]], '{1; 2; 3}'],\n            'matrix' => [[[0.0, 1.31695789692482], [1.76274717403909, 2.06343706889556]], '{1, 2; 3, 4}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AcotTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerACOT')]\n    public function testACOT(float|int|string $expectedResult, float|int|string $number): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5);\n        $sheet->getCell('A1')->setValue(\"=ACOT($number)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerACOT(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ACOT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAcotArray')]\n    public function testAcotArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ACOT({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAcotArray(): array\n    {\n        return [\n            'row vector' => [[[0.78539816339745, 1.10714871779409, 2.35619449019234]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.78539816339745], [1.10714871779409], [2.35619449019234]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.78539816339745, 1.10714871779409], [1.57079632679490, 2.35619449019234]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AcothTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerACOTH')]\n    public function testACOTH(float|int|string $expectedResult, float|int|string $number): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -10);\n        $sheet->getCell('A1')->setValue(\"=ACOTH($number)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerACOTH(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ACOTH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAcothArray')]\n    public function testAcothArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ACOTH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAcothArray(): array\n    {\n        return [\n            'row vector' => [[[-0.20273255405408, 0.54930614433406, 0.13413199329734]], '{-5, 2, 7.5}'],\n            'column vector' => [[[-0.20273255405408], [0.54930614433406], [0.13413199329734]], '{-5; 2; 7.5}'],\n            'matrix' => [[[-0.20273255405408, 0.54930614433406], ['#NUM!', 0.13413199329734]], '{-5, 2; 0, 7.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AllSetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AllSetupTeardown extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected static function setOpenOffice(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n    }\n\n    protected static function setGnumeric(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_GNUMERIC);\n    }\n\n    protected function mightHaveException(mixed $expectedResult): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(CalcException::class);\n        }\n    }\n\n    protected function setCell(string $cell, mixed $value): void\n    {\n        if ($value !== null) {\n            if (is_string($value) && is_numeric($value)) {\n                $this->getSheet()->getCell($cell)->setValueExplicit($value, DataType::TYPE_STRING);\n            } else {\n                $this->getSheet()->getCell($cell)->setValue($value);\n            }\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n\n    protected function setArrayAsValue(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ArabicTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerARABIC')]\n    public function testARABIC(mixed $expectedResult, string $romanNumeral): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue($romanNumeral);\n        $sheet->getCell('B1')->setValue('=ARABIC(A1)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerARABIC(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ARABIC.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerArabicArray')]\n    public function testArabicArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ARABIC({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerArabicArray(): array\n    {\n        return [\n            'row vector' => [[[49, 2022, 499]], '{\"XLIX\", \"MMXXII\", \"VDIV\"}'],\n            'column vector' => [[[49], [2022], [499]], '{\"XLIX\"; \"MMXXII\"; \"VDIV\"}'],\n            'matrix' => [[[49, 2022], [-499, 499]], '{\"XLIX\", \"MMXXII\"; \"-ID\", \"VDIV\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AsinTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAsin')]\n    public function testAsin(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A2')->setValue(0.5);\n        $sheet->getCell('A1')->setValue(\"=ASIN($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerAsin(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ASIN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAsinArray')]\n    public function testAsinArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ASIN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAsinArray(): array\n    {\n        return [\n            'row vector' => [[[1.57079632679490, 0.52359877559830, -1.57079632679490]], '{1, 0.5, -1}'],\n            'column vector' => [[[1.57079632679490], [0.52359877559830], [-1.57079632679490]], '{1; 0.5; -1}'],\n            'matrix' => [[[1.57079632679490, 0.52359877559830], [0.0, -1.57079632679490]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AsinhTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAsinh')]\n    public function testAsinh(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A2')->setValue(0.5);\n        $sheet->getCell('A1')->setValue(\"=ASINH($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerAsinh(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ASINH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAsinhArray')]\n    public function testAsinhArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ASINH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAsinhArray(): array\n    {\n        return [\n            'row vector' => [[[0.88137358701954, 0.48121182505960, -0.88137358701954]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.88137358701954], [0.48121182505960], [-0.88137358701954]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.88137358701954, 0.48121182505960], [0.0, -0.88137358701954]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass Atan2Test extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerATAN2')]\n    public function testATAN2(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A2')->setValue(5);\n        $sheet->getCell('A3')->setValue(6);\n        $sheet->getCell('A1')->setValue(\"=ATAN2($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerATAN2(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ATAN2.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAtan2Array')]\n    public function testAtan2Array(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ATAN2({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAtan2Array(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[1.81577498992176, 1.17600520709514]],\n                '{-0.75, 1.25}',\n                '3',\n            ],\n            'first argument column vector' => [\n                [[1.17600520709514], [0.98279372324733]],\n                '{1.25; 2}',\n                '3',\n            ],\n            'first argument matrix' => [\n                [[2.03444393579570, 1.48765509490646], [1.57079632679490, 1.24904577239825]],\n                '{-1.5, 0.25; 0, 1}',\n                '3',\n            ],\n            'second argument row vector' => [\n                [[-0.24497866312686, 0.39479111969976]],\n                '3',\n                '{-0.75, 1.25}',\n            ],\n            'second argument column vector' => [\n                [[0.39479111969976], [0.58800260354757]],\n                '3',\n                '{1.25; 2}',\n            ],\n            'second argument matrix' => [\n                [[-0.46364760900081, 0.08314123188844], [0.0, 0.32175055439664]],\n                '3',\n                '{-1.5, 0.25; 0, 1}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [-2.21429743558818, 2.81984209919315, 2.55359005004223, 1.92956699706547],\n                    [-1.69515132134166, 2.03444393579570, 1.81577498992176, 1.63321513679085],\n                    [-1.01219701145133, 0.38050637711237, 0.67474094222355, 1.26791145841993],\n                    [-0.51914611424652, 0.14189705460416, 0.27829965900511, 0.85196632717327],\n                ],\n                '{-1.5; -0.25; 1.25; 3.5}',\n                '{-2, 0.5, 1, 4}',\n            ],\n            'Two row vectors' => [\n                [[-2.21429743558818, 2.03444393579570, 0.67474094222355, 0.85196632717327]],\n                '{-1.5, -0.25, 1.25, 3.5}',\n                '{-2, 0.5, 1, 4}',\n            ],\n            'Two column vectors' => [\n                [[-2.21429743558818], [2.03444393579570], [0.67474094222355], [0.85196632717327]],\n                '{-1.5; -0.25; 1.25; 3.5}',\n                '{-2; 0.5; 1; 4}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AtanTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAtan')]\n    public function testAtan(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A2')->setValue(5);\n        $sheet->getCell('A1')->setValue(\"=ATAN($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerAtan(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ATAN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAtanArray')]\n    public function testAtanArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ATAN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAtanArray(): array\n    {\n        return [\n            'row vector' => [[[0.78539816339745, 0.46364760900081, -0.78539816339745]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.78539816339745], [0.46364760900081], [-0.78539816339745]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.78539816339745, 0.46364760900081], [0.0, -0.78539816339745]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass AtanhTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAtanh')]\n    public function testAtanh(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A2')->setValue(0.8);\n        $sheet->getCell('A1')->setValue(\"=ATANH($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerAtanh(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ATANH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAtanhArray')]\n    public function testAtanhArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ATANH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerAtanhArray(): array\n    {\n        return [\n            'row vector' => [[[1.83178082306482, 0.54930614433406, -1.83178082306482]], '{0.95, 0.5, -0.95}'],\n            'column vector' => [[[1.83178082306482], [0.54930614433406], [-1.83178082306482]], '{0.95; 0.5; -0.95}'],\n            'matrix' => [[[1.83178082306482, 0.54930614433406], [0.0, -1.83178082306482]], '{0.95, 0.5; 0, -0.95}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass BaseTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBASE')]\n    public function testBASE(mixed $expectedResult, mixed $arg1 = 'omitted', mixed $arg2 = 'omitted', mixed $arg3 = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($arg1 !== null) {\n            $sheet->getCell('A1')->setValue($arg1);\n        }\n        if ($arg2 !== null) {\n            $sheet->getCell('A2')->setValue($arg2);\n        }\n        if ($arg3 !== null) {\n            $sheet->getCell('A3')->setValue($arg3);\n        }\n        if ($arg1 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=BASE()');\n        } elseif ($arg2 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=BASE(A1)');\n        } elseif ($arg3 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=BASE(A1, A2)');\n        } else {\n            $sheet->getCell('B1')->setValue('=BASE(A1, A2, A3)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBASE(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/BASE.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBaseArray')]\n    public function testBaseArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BASE({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBaseArray(): array\n    {\n        return [\n            'matrix' => [[['1111111', '177'], ['127', '7F']], '127', '{2, 8; 10, 16}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CeilingMathTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCEILINGMATH')]\n    public function testCEILINGMATH(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=CEILING.MATH($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerCEILINGMATH(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/CEILINGMATH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCeilingArray')]\n    public function testCeilingArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CEILING.MATH({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCeilingArray(): array\n    {\n        return [\n            'matrix' => [[[3.15, 3.142], [3.1416, 3.141594]], '3.1415926536', '{0.01, 0.002; 0.00005, 0.000002}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CeilingPreciseTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFLOORPRECISE')]\n    public function testCEILINGPRECISE(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=CEILING.PRECISE($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerFLOORPRECISE(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/CEILINGPRECISE.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCeilingArray')]\n    public function testCeilingArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CEILING.PRECISE({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCeilingArray(): array\n    {\n        return [\n            'matrix' => [[[3.15, 3.142], [3.1416, 3.141594]], '3.1415926536', '{0.01, 0.002; 0.00005, 0.000002}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass CeilingTest extends AllSetupTeardown\n{\n    #[DataProvider('providerCEILING')]\n    public function testCEILING(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=CEILING($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerCEILING(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/CEILING.php';\n    }\n\n    public function testCEILINGGnumericClashingSigns(): void\n    {\n        self::setGnumeric();\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=CEILING(17,8)');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta(24, $result, 1E-12);\n        $sheet->getCell('A2')->setValue('=CEILING(-17,-8)');\n        $result = $sheet->getCell('A2')->getCalculatedValue();\n        self::assertEqualsWithDelta(-24, $result, 1E-12);\n        $sheet->getCell('A3')->setValue('=CEILING(17,-8)');\n        $result = $sheet->getCell('A3')->getCalculatedValue();\n        self::assertSame('#NUM!', $result);\n        $sheet->getCell('A4')->setValue('=CEILING(-17,8)');\n        $result = $sheet->getCell('A4')->getCalculatedValue();\n        self::assertSame('#NUM!', $result);\n    }\n\n    public function testCEILINGGnumeric1Arg(): void\n    {\n        self::setGnumeric();\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=CEILING(5.1)');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta(6, $result, 1E-12);\n    }\n\n    public function testCELINGOpenOffice1Arg(): void\n    {\n        self::setOpenOffice();\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=CEILING(5.1)');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta(6, $result, 1E-12);\n    }\n\n    public function testCEILINGExcel1Arg(): void\n    {\n        $this->mightHaveException('exception');\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=CEILING(5.1)');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta(6, $result, 1E-12);\n    }\n\n    #[DataProvider('providerCeilingArray')]\n    public function testCeilingArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CEILING({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCeilingArray(): array\n    {\n        return [\n            'matrix' => [[[3.15, 3.142], [3.1416, 3.141594]], '3.1415926536', '{0.01, 0.002; 0.00005, 0.000002}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CombinATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOMBINA')]\n    public function testCOMBINA(mixed $expectedResult, mixed $numObjs, mixed $numInSet): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($numObjs !== null) {\n            $sheet->getCell('A1')->setValue($numObjs);\n        }\n        if ($numInSet !== null) {\n            $sheet->getCell('A2')->setValue($numInSet);\n        }\n        $sheet->getCell('B1')->setValue('=COMBINA(A1,A2)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCOMBINA(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/COMBINA.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCombinAArray')]\n    public function testCombinAArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=COMBINA({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCombinAArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[120, 35]],\n                '{8, 5}',\n                '3',\n            ],\n            'first argument column vector' => [\n                [[120], [35]],\n                '{8; 5}',\n                '3',\n            ],\n            'first argument matrix' => [\n                [[120, 35], [10, 84]],\n                '{8, 5; 3, 7}',\n                '3',\n            ],\n            'second argument row vector' => [\n                [[455, 18564]],\n                '13',\n                '{3, 6}',\n            ],\n            'second argument column vector' => [\n                [[455], [18564]],\n                '13',\n                '{3; 6}',\n            ],\n            'second argument matrix' => [\n                [[455, 18564], [1820, 125970]],\n                '13',\n                '{3, 6; 4, 8}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [4368, 1365, 364, 78],\n                    [2002, 715, 220, 55],\n                    [792, 330, 120, 36],\n                    [252, 126, 56, 21],\n                ],\n                '{12; 10; 8; 6}',\n                '{5, 4, 3, 2}',\n            ],\n            'Two row vectors' => [\n                [[4368, 715, 120, 21]],\n                '{12, 10, 8, 6}',\n                '{5, 4, 3, 2}',\n            ],\n            'Two column vectors' => [\n                [[4368], [715], [120], [21]],\n                '{12; 10; 8; 6}',\n                '{5; 4; 3; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CombinTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOMBIN')]\n    public function testCOMBIN(mixed $expectedResult, mixed $numObjs, mixed $numInSet): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($numObjs !== null) {\n            $sheet->getCell('A1')->setValue($numObjs);\n        }\n        if ($numInSet !== null) {\n            $sheet->getCell('A2')->setValue($numInSet);\n        }\n        $sheet->getCell('B1')->setValue('=COMBIN(A1,A2)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCOMBIN(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/COMBIN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCombinArray')]\n    public function testCombinArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=COMBIN({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCombinArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[56, 10]],\n                '{8, 5}',\n                '3',\n            ],\n            'first argument column vector' => [\n                [[56], [10]],\n                '{8; 5}',\n                '3',\n            ],\n            'first argument matrix' => [\n                [[56, 10], [1, 35]],\n                '{8, 5; 3, 7}',\n                '3',\n            ],\n            'second argument row vector' => [\n                [[286, 1716]],\n                '13',\n                '{3, 6}',\n            ],\n            'second argument column vector' => [\n                [[286], [1716]],\n                '13',\n                '{3; 6}',\n            ],\n            'second argument matrix' => [\n                [[286, 1716], [715, 1287]],\n                '13',\n                '{3, 6; 4, 8}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [792, 495, 220, 66],\n                    [252, 210, 120, 45],\n                    [56, 70, 56, 28],\n                    [6, 15, 20, 15],\n                ],\n                '{12; 10; 8; 6}',\n                '{5, 4, 3, 2}',\n            ],\n            'Two row vectors' => [\n                [[792, 210, 56, 15]],\n                '{12, 10, 8, 6}',\n                '{5, 4, 3, 2}',\n            ],\n            'Two column vectors' => [\n                [[792], [210], [56], [15]],\n                '{12; 10; 8; 6}',\n                '{5; 4; 3; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CosTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCos')]\n    public function testCos(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 2);\n        $sheet->getCell('A1')->setValue(\"=COS($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerCos(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/COS.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCosArray')]\n    public function testCosArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=COS({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCosArray(): array\n    {\n        return [\n            'row vector' => [[[0.54030230586814, 0.87758256189037, 0.54030230586814]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.54030230586814], [0.87758256189037], [0.54030230586814]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.54030230586814, 0.87758256189037], [1.0, 0.54030230586814]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CoshTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCosh')]\n    public function testCosh(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 2);\n        $sheet->getCell('A1')->setValue(\"=COSH($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerCosh(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/COSH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCoshArray')]\n    public function testCoshArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=COSH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCoshArray(): array\n    {\n        return [\n            'row vector' => [[[1.54308063481524, 1.12762596520638, 1.54308063481524]], '{1, 0.5, -1}'],\n            'column vector' => [[[1.54308063481524], [1.12762596520638], [1.54308063481524]], '{1; 0.5; -1}'],\n            'matrix' => [[[1.54308063481524, 1.12762596520638], [1.0, 1.54308063481524]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CotTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOT')]\n    public function testCOT(float|int|string $expectedResult, float|int|string $angle): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=COT($angle)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerCOT(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/COT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCotArray')]\n    public function testCotArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=COT({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCotArray(): array\n    {\n        return [\n            'row vector' => [[[0.64209261593433, 1.83048772171245, -0.64209261593433]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.64209261593433], [1.83048772171245], [-0.64209261593433]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.64209261593433, 1.83048772171245], ['#DIV/0!', -0.64209261593433]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CothTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOTH')]\n    public function testCOTH(float|int|string $expectedResult, float|int|string $angle): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=COTH($angle)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerCOTH(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/COTH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCothArray')]\n    public function testCothArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=COTH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCothArray(): array\n    {\n        return [\n            'row vector' => [[[1.31303528549933, 2.16395341373865, -1.31303528549933]], '{1, 0.5, -1}'],\n            'column vector' => [[[1.31303528549933], [2.16395341373865], [-1.31303528549933]], '{1; 0.5; -1}'],\n            'matrix' => [[[1.31303528549933, 2.16395341373865], ['#DIV/0!', -1.31303528549933]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CscTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCSC')]\n    public function testCSC(float|int|string $expectedResult, float|int|string $angle): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=CSC($angle)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerCSC(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/CSC.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCscArray')]\n    public function testCscArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CSC({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCscArray(): array\n    {\n        return [\n            'row vector' => [[[1.18839510577812, 2.08582964293349, -1.18839510577812]], '{1, 0.5, -1}'],\n            'column vector' => [[[1.18839510577812], [2.08582964293349], [-1.18839510577812]], '{1; 0.5; -1}'],\n            'matrix' => [[[1.18839510577812, 2.08582964293349], ['#DIV/0!', -1.18839510577812]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass CschTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCSCH')]\n    public function testCSCH(float|int|string $expectedResult, float|int|string $angle): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=CSCH($angle)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerCSCH(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/CSCH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCschArray')]\n    public function testCschArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CSCH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerCschArray(): array\n    {\n        return [\n            'row vector' => [[[0.85091812823932, 1.91903475133494, -0.85091812823932]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.85091812823932], [1.91903475133494], [-0.85091812823932]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.85091812823932, 1.91903475133494], ['#DIV/0!', -0.85091812823932]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass DegreesTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDEGREES')]\n    public function testDegrees(mixed $expectedResult, mixed $number = 'omitted'): void\n    {\n        $sheet = $this->getSheet();\n        $this->mightHaveException($expectedResult);\n        $this->setCell('A1', $number);\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=DEGREES()');\n        } else {\n            $sheet->getCell('B1')->setValue('=DEGREES(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-8);\n    }\n\n    public static function providerDegrees(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/DEGREES.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDegreesArray')]\n    public function testDegreesArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DEGREES({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerDegreesArray(): array\n    {\n        return [\n            'row vector' => [[[143.23944878270600, 7.16197243913529, -183.34649444186300]], '{2.5, 0.125, -3.2}'],\n            'column vector' => [[[143.23944878270600], [7.16197243913529], [-183.34649444186300]], '{2.5; 0.125; -3.2}'],\n            'matrix' => [[[143.23944878270600, 7.16197243913529], [429.71834634811700, -183.34649444186300]], '{2.5, 0.125; 7.5, -3.2}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass EvenTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerEVEN')]\n    public function testEVEN(int|string $expectedResult, float|int|string $value): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue(\"=EVEN($value)\");\n        $sheet->getCell('A2')->setValue(3.7);\n        self::assertEquals($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public static function providerEVEN(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/EVEN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerEvenArray')]\n    public function testEvenArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=EVEN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerEvenArray(): array\n    {\n        return [\n            'row vector' => [[[-4, 2, 4]], '{-3, 1, 4}'],\n            'column vector' => [[[-4], [2], [4]], '{-3; 1; 4}'],\n            'matrix' => [[[-4, 2], [4, 2]], '{-3, 1; 4, 1.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ExpTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerEXP')]\n    public function testEXP(mixed $expectedResult, mixed $number = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($number !== null) {\n            $sheet->getCell('A1')->setValue($number);\n        }\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=EXP()');\n        } else {\n            $sheet->getCell('B1')->setValue('=EXP(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerEXP(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/EXP.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerExpArray')]\n    public function testExpArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=EXP({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerExpArray(): array\n    {\n        return [\n            'row vector' => [[[1.0, 2.718281828459045, 12.182493960703473]], '{0, 1, 2.5}'],\n            'column vector' => [[[1.0], [2.718281828459045], [12.182493960703473]], '{0; 1; 2.5}'],\n            'matrix' => [[[1.0, 2.718281828459045], [12.182493960703473, 0.0820849986239]], '{0, 1; 2.5, -2.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FactDoubleTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFACTDOUBLE')]\n    public function testFACTDOUBLE(mixed $expectedResult, mixed $value): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue($value);\n        $sheet->getCell('B1')->setValue('=FACTDOUBLE(A1)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerFACTDOUBLE(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/FACTDOUBLE.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFactDoubleArray')]\n    public function testFactDoubleArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FACTDOUBLE({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerFactDoubleArray(): array\n    {\n        return [\n            'row vector' => [[['#NUM!', 48, 945]], '{-2, 6, 9}'],\n            'column vector' => [[['#NUM!'], [48], [945]], '{-2; 6; 9}'],\n            'matrix' => [[['#NUM!', 48], [945, 3]], '{-2, 6; 9, 3.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FactTest extends AllSetupTeardown\n{\n    const FACT_PRECISION = 1E-12;\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFACT')]\n    public function testFACT(mixed $expectedResult, mixed $arg1): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($arg1 !== null) {\n            $sheet->getCell('A1')->setValue($arg1);\n        }\n        if ($arg1 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=FACT()');\n        } else {\n            $sheet->getCell('B1')->setValue('=FACT(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerFACT(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/FACT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFACTGnumeric')]\n    public function testFACTGnumeric(mixed $expectedResult, mixed $arg1): void\n    {\n        $this->mightHaveException($expectedResult);\n        self::setGnumeric();\n        $sheet = $this->getSheet();\n        if ($arg1 !== null) {\n            $sheet->getCell('A1')->setValue($arg1);\n        }\n        if ($arg1 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=FACT()');\n        } else {\n            $sheet->getCell('B1')->setValue('=FACT(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::FACT_PRECISION);\n    }\n\n    public static function providerFACTGnumeric(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/FACTGNUMERIC.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFactArray')]\n    public function testFactArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FACT({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::FACT_PRECISION);\n    }\n\n    public static function providerFactArray(): array\n    {\n        return [\n            'row vector' => [[['#NUM!', 120, 362880]], '{-2, 5, 9}'],\n            'column vector' => [[['#NUM!'], [120], [362880]], '{-2; 5; 9}'],\n            'matrix' => [[['#NUM!', 120], [362880, 6]], '{-2, 5; 9, 3.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FloorMathTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFLOORMATH')]\n    public function testFLOORMATH(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=FLOOR.MATH($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerFLOORMATH(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/FLOORMATH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFloorArray')]\n    public function testFloorArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FLOOR.MATH({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerFloorArray(): array\n    {\n        return [\n            'matrix' => [[[3.14, 3.14], [3.14155, 3.141592]], '3.1415926536', '{0.01, 0.002; 0.00005, 0.000002}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FloorPreciseTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFLOORPRECISE')]\n    public function testFLOORPRECISE(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=FLOOR.PRECISE($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerFLOORPRECISE(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/FLOORPRECISE.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFloorArray')]\n    public function testFloorArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FLOOR.PRECISE({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerFloorArray(): array\n    {\n        return [\n            'matrix' => [[[3.14, 3.14], [3.14155, 3.141592]], '3.1415926536', '{0.01, 0.002; 0.00005, 0.000002}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass FloorTest extends AllSetupTeardown\n{\n    #[DataProvider('providerFLOOR')]\n    public function testFLOOR(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=FLOOR($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerFLOOR(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/FLOOR.php';\n    }\n\n    public function testFLOORGnumericClashingSigns(): void\n    {\n        self::setGnumeric();\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=FLOOR(17,8)');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta(16, $result, 1E-12);\n        $sheet->getCell('A2')->setValue('=FLOOR(-17,-8)');\n        $result = $sheet->getCell('A2')->getCalculatedValue();\n        self::assertEqualsWithDelta(-16, $result, 1E-12);\n        $sheet->getCell('A3')->setValue('=FLOOR(17,-8)');\n        $result = $sheet->getCell('A3')->getCalculatedValue();\n        self::assertSame('#NUM!', $result);\n        $sheet->getCell('A4')->setValue('=FLOOR(-17,8)');\n        $result = $sheet->getCell('A4')->getCalculatedValue();\n        self::assertSame('#NUM!', $result);\n    }\n\n    public function testFLOORGnumeric1Arg(): void\n    {\n        self::setGnumeric();\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=FLOOR(5.1)');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta(5, $result, 1E-12);\n    }\n\n    public function testFLOOROpenOffice1Arg(): void\n    {\n        self::setOpenOffice();\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=FLOOR(5.1)');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta(5, $result, 1E-12);\n    }\n\n    public function testFLOORExcel1Arg(): void\n    {\n        $this->mightHaveException('exception');\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=FLOOR(5.1)');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta(5, $result, 1E-12);\n    }\n\n    #[DataProvider('providerFloorArray')]\n    public function testFloorArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FLOOR({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerFloorArray(): array\n    {\n        return [\n            'matrix' => [[[3.14, 3.14], [3.14155, 3.141592]], '3.1415926536', '{0.01, 0.002; 0.00005, 0.000002}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/GcdTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nclass GcdTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGCD')]\n    public function testGCD(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            if ($arg !== null) {\n                $sheet->getCell(\"A$row\")->setValue($arg);\n            }\n        }\n        if ($row < 1) {\n            $sheet->getCell('B1')->setValue('=GCD()');\n        } else {\n            $sheet->getCell('B1')->setValue(\"=GCD(A1:A$row)\");\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerGCD(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/GCD.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass IntTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerINT')]\n    public function testINT(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=INT($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerINT(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/INT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerIntArray')]\n    public function testIntArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=INT({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerIntArray(): array\n    {\n        return [\n            'row vector' => [[[-2, 0, 0]], '{-1.5, 0, 0.3}'],\n            'column vector' => [[[-2], [0], [0]], '{-1.5; 0; 0.3}'],\n            'matrix' => [[[-2, 0], [0, 12]], '{-1.5, 0; 0.3, 12.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LcmTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nclass LcmTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLCM')]\n    public function testLCM(mixed $expectedResult, mixed ...$args): void\n    {\n        $sheet = $this->getSheet();\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            $sheet->getCell(\"A$row\")->setValue($arg);\n        }\n        $sheet->getCell('B1')->setValue(\"=LCM(A1:A$row)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerLCM(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/LCM.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass LnTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLN')]\n    public function testLN(mixed $expectedResult, mixed $number = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($number !== null) {\n            $sheet->getCell('A1')->setValue($number);\n        }\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=LN()');\n        } else {\n            $sheet->getCell('B1')->setValue('=LN(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerLN(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/LN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLnArray')]\n    public function testLnArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerLnArray(): array\n    {\n        return [\n            'row vector' => [[[-2.07944154167984, 0.85228540189824, 2.525728644308256]], '{0.125, 2.345, 12.5}'],\n            'column vector' => [[[-2.07944154167984], [0.85228540189824], [2.525728644308256]], '{0.125; 2.345; 12.5}'],\n            'matrix' => [[[-2.07944154167984, 0.85228540189824], [0.0, 2.525728644308256]], '{0.125, 2.345; 1.0, 12.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass Log10Test extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLOG10')]\n    public function testLOG10(mixed $expectedResult, mixed $number = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($number !== null) {\n            $sheet->getCell('A1')->setValue($number);\n        }\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=LOG10()');\n        } else {\n            $sheet->getCell('B1')->setValue('=LOG10(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerLOG10(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/LOG10.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLog10Array')]\n    public function testLog10Array(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LOG10({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerLog10Array(): array\n    {\n        return [\n            'row vector' => [[[-0.90308998699194, 0.3701428470511, 1.09691001300806]], '{0.125, 2.345, 12.5}'],\n            'column vector' => [[[-0.90308998699194], [0.3701428470511], [1.09691001300806]], '{0.125; 2.345; 12.5}'],\n            'matrix' => [[[-0.90308998699194, 0.3701428470511], [0.0, 1.09691001300806]], '{0.125, 2.345; 1.0, 12.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass LogTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLOG')]\n    public function testLOG(mixed $expectedResult, mixed $number = 'omitted', mixed $base = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($number !== null) {\n            $sheet->getCell('A1')->setValue($number);\n        }\n        if ($base !== null) {\n            $sheet->getCell('A2')->setValue($base);\n        }\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=LOG()');\n        } elseif ($base === 'omitted') {\n            $sheet->getCell('B1')->setValue('=LOG(A1)');\n        } else {\n            $sheet->getCell('B1')->setValue('=LOG(A1,A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerLOG(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/LOG.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLogArray')]\n    public function testLogArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LOG({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerLogArray(): array\n    {\n        return [\n            'matrix' => [\n                [\n                    [-0.90308998699194, 0.3701428470511, 0.0, 1.09691001300806],\n                    [-2.07944154167984, 0.85228540189824, 0.0, 2.525728644308256],\n                ],\n                '{0.125, 2.345, 1.0, 12.5}',\n                '{10; 2.718281828459045}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MInverseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass MInverseTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerMINVERSE')]\n    public function testMINVERSE(mixed $expectedResult, array $args): void\n    {\n        $result = MathTrig\\MatrixFunctions::inverse($args);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-8);\n    }\n\n    public static function providerMINVERSE(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/MINVERSE.php';\n    }\n\n    public function testOnSpreadsheet(): void\n    {\n        // very limited ability to test this in the absence of dynamic arrays\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=MINVERSE({1,2,3})'); // not square\n        self::assertSame('#VALUE!', $sheet->getCell('A1')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MMultTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass MMultTest extends AllSetupTeardown\n{\n    #[DataProvider('providerMMULT')]\n    public function testMMULT(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = MathTrig\\MatrixFunctions::multiply(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-8);\n    }\n\n    public static function providerMMULT(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/MMULT.php';\n    }\n\n    public function testOnSpreadsheet(): void\n    {\n        // very limited ability to test this in the absence of dynamic arrays\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=MMULT({1,2,3}, {1,2,3})'); // incompatible dimensions\n        self::assertSame('#VALUE!', $sheet->getCell('A1')->getCalculatedValue());\n\n        $sheet->getCell('A11')->setValue('=MMULT({1, 2, 3, 4}, {5; 6; 7; 8})');\n        self::assertEquals(70, $sheet->getCell('A11')->getCalculatedValue());\n        $sheet->getCell('A2')->setValue(1);\n        $sheet->getCell('B2')->setValue(2);\n        $sheet->getCell('C2')->setValue(3);\n        $sheet->getCell('D2')->setValue(4);\n        $sheet->getCell('D3')->setValue(5);\n        $sheet->getCell('D4')->setValue(6);\n        $sheet->getCell('A12')->setValue('=MMULT(A2:C2,D2:D4)');\n        self::assertEquals(32, $sheet->getCell('A12')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass MRoundTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMROUND')]\n    public function testMROUND(float|int|string $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=MROUND($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerMROUND(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/MROUND.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMRoundArray')]\n    public function testMRoundArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=MROUND({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerMRoundArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[0.15, 1.375, 931.675, 3.15]],\n                '{0.14527, 1.3725, 931.6829, 3.14159265}',\n                '0.025',\n            ],\n            'first argument column vector' => [\n                [[0.15], [1.375], [931.675], [3.15]],\n                '{0.14527; 1.3725; 931.6829; 3.14159265}',\n                '0.025',\n            ],\n            'first argument matrix' => [\n                [[0.15, 1.375], [931.675, 3.15]],\n                '{0.14527, 1.3725; 931.6829, 3.14159265}',\n                '0.025',\n            ],\n            'second argument row vector' => [\n                [[123.125, 123.125, 123.1, 123.2, 125]],\n                '123.12345',\n                '{0.005, 0.025, 0.1, 0.2, 5}',\n            ],\n            'second argument column vector' => [\n                [[123.125], [123.125], [123.1], [123.2], [125]],\n                '123.12345',\n                '{0.005; 0.025; 0.1; 0.2; 5}',\n            ],\n            'second argument matrix' => [\n                [[123.125, 123.125], [123.2, 125.0]],\n                '123.12345',\n                '{0.005, 0.025; 0.2, 5}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [0.145, 0.15, 0.2, 0.0],\n                    [1.375, 1.375, 1.4, 0.0],\n                    [931.685, 931.675, 931.6, 930.0],\n                    [3.14, 3.15, 3.2, 5.0],\n                ],\n                '{0.14527; 1.37250; 931.68290; 3.14159265}',\n                '{0.005, 0.025, 0.2, 5}',\n            ],\n            'Two row vectors' => [\n                [[0.145, 1.375, 931.6, 5.0]],\n                '{0.14527, 1.3725, 931.6, 3.14159265}',\n                '{0.005, 0.025, 0.2, 5}',\n            ],\n            'Two column vectors' => [\n                [[0.145], [1.375], [931.6], [5.0]],\n                '{0.14527; 1.37250; 931.6; 5}',\n                '{0.005; 0.025; 0.2; 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MUnitTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions;\n\nclass MUnitTest extends AllSetupTeardown\n{\n    const MU_PRECISION = 1.0E-12;\n\n    public function testMUNIT(): void\n    {\n        $identity = MatrixFunctions::identity(3);\n        self::assertEquals([[1, 0, 0], [0, 1, 0], [0, 0, 1]], $identity);\n        $startArray = [[1, 2, 2], [4, 5, 6], [7, 8, 9]];\n        $resultArray = MatrixFunctions::multiply($startArray, $identity);\n        self::assertEquals($startArray, $resultArray);\n        $inverseArray = MatrixFunctions::inverse($startArray);\n        $resultArray = MatrixFunctions::multiply($startArray, $inverseArray);\n        self::assertEqualsWithDelta($identity, $resultArray, self::MU_PRECISION);\n        self::assertEquals('#VALUE!', MatrixFunctions::identity(0));\n        self::assertEquals('#VALUE!', MatrixFunctions::identity(-1));\n        self::assertEquals('#VALUE!', MatrixFunctions::identity('X'));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MdeTermTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass MdeTermTest extends AllSetupTeardown\n{\n    /** @param array<mixed>|float|int|string $matrix */\n    #[DataProvider('providerMDETERM')]\n    public function testMDETERM2(float|int|string $expectedResult, array|int|float|string $matrix): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if (is_array($matrix)) {\n            $sheet->fromArray($matrix, null, 'A1', true);\n            $maxCol = $sheet->getHighestColumn();\n            $maxRow = $sheet->getHighestRow();\n            $sheet->getCell('Z1')->setValue(\"=MDETERM(A1:$maxCol$maxRow)\");\n        } else {\n            $sheet->getCell('Z1')->setValue(\"=MDETERM($matrix)\");\n        }\n        $result = $sheet->getCell('Z1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerMDETERM(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/MDETERM.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ModTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMOD')]\n    public function testMOD(mixed $expectedResult, mixed $dividend = 'omitted', mixed $divisor = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($dividend !== null) {\n            $sheet->getCell('A1')->setValue($dividend);\n        }\n        if ($divisor !== null) {\n            $sheet->getCell('A2')->setValue($divisor);\n        }\n        if ($dividend === 'omitted') {\n            $sheet->getCell('B1')->setValue('=MOD()');\n        } elseif ($divisor === 'omitted') {\n            $sheet->getCell('B1')->setValue('=MOD(A1)');\n        } else {\n            $sheet->getCell('B1')->setValue('=MOD(A1,A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerMOD(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/MOD.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerModArray')]\n    public function testModArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=MOD({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerModArray(): array\n    {\n        return [\n            'matrix' => [[[4, 3, 2], [1, 0, 4], [3, 2, 1]], '{9, 8, 7; 6, 5, 4; 3, 2, 1}', '5'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MultinomialTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nclass MultinomialTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMULTINOMIAL')]\n    public function testMULTINOMIAL(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $row = 0;\n        $excelArg = '';\n        foreach ($args as $arg) {\n            ++$row;\n            $excelArg = \"A1:A$row\";\n            if ($arg !== null) {\n                $sheet->getCell(\"A$row\")->setValue($arg);\n            }\n        }\n        $sheet->getCell('B1')->setValue(\"=MULTINOMIAL($excelArg)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerMULTINOMIAL(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/MULTINOMIAL.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass OddTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerODD')]\n    public function testODD(int|string $expectedResult, float|int|string $value): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue(\"=ODD($value)\");\n        $sheet->getCell('A2')->setValue(3.7);\n        self::assertEquals($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public static function providerODD(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ODD.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOddArray')]\n    public function testOddArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ODD({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerOddArray(): array\n    {\n        return [\n            'row vector' => [[[-3, 1, 5]], '{-3, 1, 4}'],\n            'column vector' => [[[-3], [1], [5]], '{-3; 1; 4}'],\n            'matrix' => [[[-3, 1], [5, 3]], '{-3, 1; 4, 1.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nclass PiTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPI')]\n    public function testPI(mixed $expectedResult, mixed $number = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($number !== null) {\n            $sheet->getCell('A1')->setValue($number);\n        }\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=PI()');\n        } else {\n            $sheet->getCell('B1')->setValue('=PI(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerPI(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/PI.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass PowerTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPOWER')]\n    public function testPOWER(mixed $expectedResult, mixed $base = 'omitted', mixed $exponent = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($base !== null) {\n            $sheet->getCell('A1')->setValue($base);\n        }\n        if ($exponent !== null) {\n            $sheet->getCell('A2')->setValue($exponent);\n        }\n        if ($base === 'omitted') {\n            $sheet->getCell('B1')->setValue('=POWER()');\n        } elseif ($exponent === 'omitted') {\n            $sheet->getCell('B1')->setValue('=POWER(A1)');\n        } else {\n            $sheet->getCell('B1')->setValue('=POWER(A1,A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerPOWER(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/POWER.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPowerArray')]\n    public function testPowerArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=POWER({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerPowerArray(): array\n    {\n        return [\n            'matrix' => [[[729, 512, 343], [216, 125, 64], [27, 8, 1]], '{9, 8, 7; 6, 5, 4; 3, 2, 1}', '3'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ProductTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nclass ProductTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPRODUCT')]\n    public function testPRODUCT(mixed $expectedResult, mixed ...$args): void\n    {\n        $sheet = $this->getSheet();\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            $sheet->getCell(\"A$row\")->setValue($arg);\n        }\n        $sheet->getCell('B1')->setValue(\"=PRODUCT(A1:A$row)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerPRODUCT(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/PRODUCT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass QuotientTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerQUOTIENT')]\n    public function testQUOTIENT(mixed $expectedResult, mixed $arg1 = 'omitted', mixed $arg2 = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($arg1 !== null) {\n            $sheet->getCell('A1')->setValue($arg1);\n        }\n        if ($arg2 !== null) {\n            $sheet->getCell('A2')->setValue($arg2);\n        }\n        if ($arg1 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=QUOTIENT()');\n        } elseif ($arg2 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=QUOTIENT(A1)');\n        } else {\n            $sheet->getCell('B1')->setValue('=QUOTIENT(A1, A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerQUOTIENT(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/QUOTIENT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerQuotientArray')]\n    public function testQuotientArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=QUOTIENT({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerQuotientArray(): array\n    {\n        return [\n            'matrix' => [[[3, 3, 2], [2, 2, 1], [1, 0, 0]], '{9, 8, 7; 6, 5, 4; 3, 2, 1}', '2.5'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass RadiansTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRADIANS')]\n    public function testRADIANS(mixed $expectedResult, mixed $number = 'omitted'): void\n    {\n        $sheet = $this->getSheet();\n        $this->mightHaveException($expectedResult);\n        $this->setCell('A1', $number);\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=RADIANS()');\n        } else {\n            $sheet->getCell('B1')->setValue('=RADIANS(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerRADIANS(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/RADIANS.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRadiansArray')]\n    public function testRadiansArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=RADIANS({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerRadiansArray(): array\n    {\n        return [\n            'row vector' => [[[1.48352986419518, 3.92699081698724, -0.26179938779915]], '{85, 225, -15}'],\n            'column vector' => [[[1.48352986419518], [3.92699081698724], [-0.26179938779915]], '{85; 225; -15}'],\n            'matrix' => [[[1.48352986419518, 3.92699081698724], [7.85398163397448, -0.26179938779915]], '{85, 225; 450, -15}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig;\n\nclass RandArrayTest extends AllSetupTeardown\n{\n    public function testRANDARRAYInteger(): void\n    {\n        $rows = 3;\n        $cols = 2;\n        $min = -5;\n        $max = 5;\n\n        $result = MathTrig\\Random::randArray($rows, $cols, $min, $max, true);\n        self::assertIsArray($result);\n        self::assertCount($rows, $result);\n        self::assertIsArray($result[0]);\n        self::assertCount($cols, $result[0]);\n\n        $values = Functions::flattenArray($result);\n        array_walk(\n            $values,\n            function (mixed $value) use ($min, $max): void {\n                self::assertIsInt($value);\n                self::assertTrue($value >= $min && $value <= $max);\n            }\n        );\n    }\n\n    public function testRANDARRAYFloat(): void\n    {\n        $rows = 3;\n        $cols = 2;\n        $min = -2;\n        $max = 2;\n\n        $result = MathTrig\\Random::randArray($rows, $cols, $min, $max, false);\n        self::assertIsArray($result);\n        self::assertCount($rows, $result);\n        self::assertIsArray($result[0]);\n        self::assertCount($cols, $result[0]);\n\n        $values = Functions::flattenArray($result);\n        array_walk(\n            $values,\n            function (mixed $value) use ($min, $max): void {\n                self::assertIsFloat($value);\n                self::assertTrue($value >= $min && $value <= $max);\n            }\n        );\n    }\n\n    public function testRANDARRAYExceptions(): void\n    {\n        $rows = 'THREE';\n        $cols = 2;\n        $min = 2;\n        $max = -2;\n\n        $result = MathTrig\\Random::randArray($rows, $cols, $min, $max, false);\n        self::assertSame(ExcelError::VALUE(), $result);\n\n        $rows = 3;\n        $cols = 2;\n        $min = 2;\n        $max = -2;\n\n        $result = MathTrig\\Random::randArray($rows, $cols, $min, $max, false);\n        self::assertSame(ExcelError::VALUE(), $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass RandBetweenTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRANDBETWEEN')]\n    public function testRANDBETWEEN(int|string $expectedResult, null|bool|int|string $min = 'omitted', null|bool|int|string $max = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $lower = (int) $min;\n        $upper = (int) $max;\n        if ($min !== null) {\n            $sheet->getCell('A1')->setValue($min);\n        }\n        if ($max !== null) {\n            $sheet->getCell('A2')->setValue($max);\n        }\n        if ($min === 'omitted') {\n            $sheet->getCell('B1')->setValue('=RANDBETWEEN()');\n        } elseif ($max === 'omitted') {\n            $sheet->getCell('B1')->setValue('=RANDBETWEEN(A1)');\n        } else {\n            $sheet->getCell('B1')->setValue('=RANDBETWEEN(A1,A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        if (is_numeric($expectedResult)) {\n            self::assertGreaterThanOrEqual($lower, $result);\n            self::assertLessThanOrEqual($upper, $result);\n        } else {\n            self::assertSame($expectedResult, $result);\n        }\n    }\n\n    public static function providerRANDBETWEEN(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/RANDBETWEEN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRandBetweenArray')]\n    public function testRandBetweenArray(\n        int $expectedRows,\n        int $expectedColumns,\n        string $argument1,\n        string $argument2\n    ): void {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=RandBetween({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertIsArray($result);\n        self::assertCount($expectedRows, $result);\n        self::assertIsArray($result[0]);\n        self::assertCount($expectedColumns, $result[0]);\n    }\n\n    public static function providerRandBetweenArray(): array\n    {\n        return [\n            'row/column vectors' => [2, 2, '{1, 10}', '{10; 100}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nclass RandTest extends AllSetupTeardown\n{\n    public function testRand(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('B1')->setValue('=RAND()');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertGreaterThanOrEqual(0, $result);\n        self::assertLessThanOrEqual(1, $result);\n    }\n\n    public function testRandException(): void\n    {\n        $this->mightHaveException('exception');\n        $sheet = $this->getSheet();\n        $sheet->getCell('B1')->setValue('=RAND(A1)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals(0, $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass RomanTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerROMAN')]\n    public function testROMAN(string $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A3', 49);\n        $sheet->getCell('A1')->setValue(\"=ROMAN($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerROMAN(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ROMAN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRomanArray')]\n    public function testRomanArray(array $expectedResult, string $values, string $styles): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ROMAN({$values}, {$styles})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerRomanArray(): array\n    {\n        return [\n            'row vector' => [[['XLIX', 'MMXXII', 'CDXCIX']], '{49, 2022, 499}', '0'],\n            'column vector' => [[['XLIX'], ['MMXXII'], ['CDXCIX']], '{49; 2022; 499}', '0'],\n            'matrix' => [[['XLIX', 'MMXXII'], ['LXIV', 'CDXCIX']], '{49, 2022; 64, 499}', '0'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass RoundDownTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRoundDown')]\n    public function testRoundDown(float|int|string $expectedResult, float|int|string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=ROUNDDOWN($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerRoundDown(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ROUNDDOWN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRoundDownArray')]\n    public function testRoundDownArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ROUNDDOWN({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerRoundDownArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[0.145, 1.372, -931.682, 3.141]],\n                '{0.14527, 1.3725, -931.6829, 3.14159265}',\n                '3',\n            ],\n            'first argument column vector' => [\n                [[0.145], [1.372], [-931.682], [3.141]],\n                '{0.14527; 1.3725; -931.6829; 3.14159265}',\n                '3',\n            ],\n            'first argument matrix' => [\n                [[0.145, 1.372], [-931.682, 3.141]],\n                '{0.14527, 1.3725; -931.6829, 3.14159265}',\n                '3',\n            ],\n            'second argument row vector' => [\n                [[0.1, 0.14, 0.145, 0.1452, 0.14527]],\n                '0.14527',\n                '{1, 2, 3, 4, 5}',\n            ],\n            'second argument column vector' => [\n                [[0.1], [0.14], [0.145], [0.1452], [0.14527]],\n                '0.14527',\n                '{1; 2; 3; 4; 5}',\n            ],\n            'second argument matrix' => [\n                [[0.1, 0.14], [0.145, 0.1452]],\n                '0.14527',\n                '{1, 2; 3, 4}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [0.1, 0.14, 0.145, 0.1452],\n                    [1.3, 1.37, 1.372, 1.3725],\n                    [-931.6, -931.68, -931.682, -931.6829],\n                    [3.1, 3.14, 3.141, 3.1415],\n                ],\n                '{0.14527; 1.37250; -931.68290; 3.14159265}',\n                '{1, 2, 3, 4}',\n            ],\n            'Two row vectors' => [\n                [[0.1, 1.37, -931.682, 3.1415]],\n                '{0.14527, 1.37250, -931.68290, 3.14159265}',\n                '{1, 2, 3, 4}',\n            ],\n            'Two column vectors' => [\n                [[0.1], [1.37], [-931.682], [3.1415]],\n                '{0.14527; 1.37250; -931.68290; 3.14159265}',\n                '{1; 2; 3; 4}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass RoundTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRound')]\n    public function testRound(float|int|string $expectedResult, float|int|string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=ROUND($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerRound(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ROUND.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRoundArray')]\n    public function testRoundArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ROUND({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerRoundArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[0.145, 1.373, -931.683, 3.142]],\n                '{0.14527, 1.3725, -931.6829, 3.14159265}',\n                '3',\n            ],\n            'first argument column vector' => [\n                [[0.145], [1.373], [-931.683], [3.142]],\n                '{0.14527; 1.3725; -931.6829; 3.14159265}',\n                '3',\n            ],\n            'first argument matrix' => [\n                [[0.145, 1.373], [-931.683, 3.142]],\n                '{0.14527, 1.3725; -931.6829, 3.14159265}',\n                '3',\n            ],\n            'second argument row vector' => [\n                [[0.1, 0.12, 0.123, 0.1235, 0.12345]],\n                '0.12345',\n                '{1, 2, 3, 4, 5}',\n            ],\n            'second argument column vector' => [\n                [[0.1], [0.12], [0.123], [0.1235], [0.12345]],\n                '0.12345',\n                '{1; 2; 3; 4; 5}',\n            ],\n            'second argument matrix' => [\n                [[0.1, 0.12], [0.123, 0.1235]],\n                '0.12345',\n                '{1, 2; 3, 4}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [0.1, 0.15, 0.145, 0.1453],\n                    [1.4, 1.37, 1.373, 1.3725],\n                    [-931.7, -931.68, -931.683, -931.6829],\n                    [3.1, 3.14, 3.142, 3.1416],\n                ],\n                '{0.14527; 1.37250; -931.68290; 3.14159265}',\n                '{1, 2, 3, 4}',\n            ],\n            'Two row vectors' => [\n                [[0.1, 1.37, -931.683, 3.1416]],\n                '{0.14527, 1.37250, -931.68290, 3.14159265}',\n                '{1, 2, 3, 4}',\n            ],\n            'Two different size row vectors' => [\n                [[0.1, 1.37]],\n                '{0.14527, 1.37250, -931.68290, 3.14159265}',\n                '{1, 2}',\n            ],\n            'Two column vectors' => [\n                [[0.1], [1.37], [-931.683], [3.1416]],\n                '{0.14527; 1.37250; -931.68290; 3.14159265}',\n                '{1; 2; 3; 4}',\n            ],\n            'Two matching square matrices' => [\n                [\n                    [10000, 46000, 78900],\n                    [23460, 56789, 89012.3],\n                    [34567.89, 67890.123, 90123.4568],\n                ],\n                '{12345.67890, 45678.90123, 78901.23456; 23456.78901, 56789.01234, 89012.34567; 34567.89012, 67890.12345, 90123.45678}',\n                '{-4, -3, -2; -1, 0, 1; 2, 3, 4}',\n            ],\n            'Two paired 2x3 matrices' => [\n                [\n                    [10000, 46000, 78900],\n                    [23460, 56789, 89012.3],\n                ],\n                '{12345.67890, 45678.90123, 78901.23456; 23456.78901, 56789.01234, 89012.34567}',\n                '{-4, -3, -2; -1, 0, 1}',\n            ],\n            'Two paired 3x2 matrices' => [\n                [\n                    [10000, 46000],\n                    [23460, 56789],\n                    [34567.89, 67890.123],\n                ],\n                '{12345.67890, 45678.90123; 23456.78901, 56789.01234; 34567.89012, 67890.12345}',\n                '{-4, -3; -1, 0; 2, 3}',\n            ],\n            'Two mismatched matrices (2x3 and 2x2)' => [\n                [\n                    [10000, 46000],\n                    [23460, 56789],\n                ],\n                '{12345.67890, 45678.90123, 78901.23456; 23456.78901, 56789.01234, 89012.34567}',\n                '{-4, -3; -1, 0}',\n            ],\n            'Two mismatched matrices (3x2 and 2x1 vector)' => [\n                [\n                    [10000, 50000],\n                    [23460, 56790],\n                ],\n                '{12345.67890, 45678.90123; 23456.78901, 56789.01234; 34567.89012, 67890.12345}',\n                '{-4; -1}',\n            ],\n            'Two mismatched matrices (3x1 vector and 2x2)' => [\n                [\n                    [10000, 12000],\n                    [23460, 23457],\n                ],\n                '{12345.67890; 23456.78901; 34567.89012}',\n                '{-4, -3; -1, 0}',\n            ],\n            'Two mismatched matrices (1x3 vector and 2x2)' => [\n                [\n                    [10000, 46000],\n                    [12350, 45679],\n                ],\n                '{12345.67890, 45678.90123, 78901.23456}',\n                '{-4, -3; -1, 0}',\n            ],\n            'Larger mismatched matrices (5x1 vector and 3x3)' => [\n                [\n                    [3.1, 6.28, 9.425],\n                    [12.6, 15.71, 18.85],\n                    [22, 25.13, 28.274],\n                ],\n                '{3.14159265, 6.2831853, 9.424777959; 12.5663706, 15.70796325, 18.8495559; 21.99114855, 25.1327412, 28.27433385}',\n                '{1, 2, 3, 4, 5}',\n            ],\n            'Two different sized column vectors' => [\n                [[0.1], [1.37]],\n                '{0.14527; 1.37250}',\n                '{1; 2; 3; 4}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass RoundUpTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRoundUp')]\n    public function testRoundUp(float|int|string $expectedResult, float|int|string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=ROUNDUP($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerRoundUp(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/ROUNDUP.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRoundUpArray')]\n    public function testRoundUpArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ROUNDUP({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerRoundUpArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[0.146, 1.373, -931.683, 3.142]],\n                '{0.14527, 1.3725, -931.6829, 3.14159265}',\n                '3',\n            ],\n            'first argument column vector' => [\n                [[0.146], [1.373], [-931.683], [3.142]],\n                '{0.14527; 1.3725; -931.6829; 3.14159265}',\n                '3',\n            ],\n            'first argument matrix' => [\n                [[0.146, 1.373], [-931.683, 3.142]],\n                '{0.14527, 1.3725; -931.6829, 3.14159265}',\n                '3',\n            ],\n            'second argument row vector' => [\n                [[0.2, 0.15, 0.146, 0.1453, 0.14527]],\n                '0.14527',\n                '{1, 2, 3, 4, 5}',\n            ],\n            'second argument column vector' => [\n                [[0.2], [0.15], [0.146], [0.1453], [0.14527]],\n                '0.14527',\n                '{1; 2; 3; 4; 5}',\n            ],\n            'second argument matrix' => [\n                [[0.2, 0.15], [0.146, 0.1453]],\n                '0.14527',\n                '{1, 2; 3, 4}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [0.2, 0.15, 0.146, 0.1453],\n                    [1.4, 1.38, 1.373, 1.3725],\n                    [-931.7, -931.69, -931.683, -931.6829],\n                    [3.2, 3.15, 3.142, 3.1416],\n                ],\n                '{0.14527; 1.37250; -931.68290; 3.14159265}',\n                '{1, 2, 3, 4}',\n            ],\n            'Two row vectors' => [\n                [[0.2, 1.38, -931.683, 3.1416]],\n                '{0.14527, 1.37250, -931.68290, 3.14159265}',\n                '{1, 2, 3, 4}',\n            ],\n            'Two column vectors' => [\n                [[0.2], [1.38], [-931.683], [3.1416]],\n                '{0.14527; 1.37250; -931.68290; 3.14159265}',\n                '{1; 2; 3; 4}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass SecTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSEC')]\n    public function testSEC(float|int|string $expectedResult, float|int|string $angle): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=SEC($angle)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerSEC(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SEC.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSecArray')]\n    public function testSecArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SEC({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerSecArray(): array\n    {\n        return [\n            'row vector' => [[[1.85081571768093, 1.13949392732455, 1.85081571768093]], '{1, 0.5, -1}'],\n            'column vector' => [[[1.85081571768093], [1.13949392732455], [1.85081571768093]], '{1; 0.5; -1}'],\n            'matrix' => [[[1.85081571768093, 1.13949392732455], [1.0, 1.85081571768093]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass SechTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSECH')]\n    public function testSECH(float|int|string $expectedResult, float|int|string $angle): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=SECH($angle)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-9);\n    }\n\n    public static function providerSECH(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SECH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSechArray')]\n    public function testSechArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SECH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerSechArray(): array\n    {\n        return [\n            'row vector' => [[[0.64805427366389, 0.88681888397007, 0.64805427366389]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.64805427366389], [0.88681888397007], [0.64805427366389]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.64805427366389, 0.88681888397007], [1.0, 0.64805427366389]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SequenceTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\MathTrig\\MatrixFunctions;\n\nclass SequenceTest extends AllSetupTeardown\n{\n    /**\n     * @param mixed[] $arguments\n     * @param mixed[]|string $expectedResult\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSEQUENCE')]\n    public function testSEQUENCE(array $arguments, array|string $expectedResult): void\n    {\n        if (count($arguments) === 0) {\n            $result = MatrixFunctions::sequence();\n        } elseif (count($arguments) === 1) {\n            $result = MatrixFunctions::sequence($arguments[0]);\n        } elseif (count($arguments) === 2) {\n            $result = MatrixFunctions::sequence($arguments[0], $arguments[1]);\n        } elseif (count($arguments) === 3) {\n            $result = MatrixFunctions::sequence($arguments[0], $arguments[1], $arguments[2]);\n        } else {\n            $result = MatrixFunctions::sequence($arguments[0], $arguments[1], $arguments[2], $arguments[3]);\n        }\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerSEQUENCE(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SEQUENCE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass SeriesSumTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSERIESSUM')]\n    public function testSERIESSUM(mixed $expectedResult, mixed $arg1, mixed $arg2, mixed $arg3, mixed ...$args): void\n    {\n        $sheet = $this->getSheet();\n        if ($arg1 !== null) {\n            $sheet->getCell('C1')->setValue($arg1);\n        }\n        if ($arg2 !== null) {\n            $sheet->getCell('C2')->setValue($arg2);\n        }\n        if ($arg3 !== null) {\n            $sheet->getCell('C3')->setValue($arg3);\n        }\n        $row = 0;\n        $aArgs = Functions::flattenArray($args);\n        foreach ($aArgs as $arg) {\n            ++$row;\n            if ($arg !== null) {\n                $sheet->getCell(\"A$row\")->setValue($arg);\n            }\n        }\n        $sheet->getCell('B1')->setValue(\"=SERIESSUM(C1, C2, C3, A1:A$row)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSERIESSUM(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SERIESSUM.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSeriesSumArray')]\n    public function testSeriesSumArray(array $expectedResult, string $x, string $n, string $m, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SERIESSUM({$x}, {$n}, {$m}, {$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerSeriesSumArray(): array\n    {\n        return [\n            'row vector #1' => [[[3780, 756]], '5', '{1, 0}', '1', '{1, 1, 0, 1, 1}'],\n            'column vector #1' => [[[54], [3780]], '{2; 5}', '1', '1', '{1, 1, 0, 1, 1}'],\n            'matrix #1' => [[[54, 27], [3780, 756]], '{2; 5}', '{1, 0}', '1', '{1, 1, 0, 1, 1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass SignTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSIGN')]\n    public function testSIGN(float|int|string $expectedResult, float|int|string $value): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 0);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->getCell('A1')->setValue(\"=SIGN($value)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerSIGN(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SIGN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSignArray')]\n    public function testSignArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SIGN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerSignArray(): array\n    {\n        return [\n            'row vector' => [[[-1, 0, 1]], '{-1.5, 0, 0.3}'],\n            'column vector' => [[[-1], [0], [1]], '{-1.5; 0; 0.3}'],\n            'matrix' => [[[-1, 0], [1, 1]], '{-1.5, 0; 0.3, 12.5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass SinTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSin')]\n    public function testSin(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 2);\n        $sheet->getCell('A1')->setValue(\"=SIN($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerSin(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SIN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSinArray')]\n    public function testSinArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SIN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerSinArray(): array\n    {\n        return [\n            'row vector' => [[[0.84147098480790, 0.47942553860420, -0.84147098480790]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.84147098480790], [0.47942553860420], [-0.84147098480790]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.84147098480790, 0.47942553860420], [0.0, -0.84147098480790]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass SinhTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCosh')]\n    public function testSinh(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 2);\n        $sheet->getCell('A1')->setValue(\"=SINH($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerCosh(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SINH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSinhArray')]\n    public function testSinhArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SINH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerSinhArray(): array\n    {\n        return [\n            'row vector' => [[[1.17520119364380, 0.52109530549375, -1.17520119364380]], '{1, 0.5, -1}'],\n            'column vector' => [[[1.17520119364380], [0.52109530549375], [-1.17520119364380]], '{1; 0.5; -1}'],\n            'matrix' => [[[1.17520119364380, 0.52109530549375], [0.0, -1.17520119364380]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass SqrtPiTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSQRTPI')]\n    public function testSQRTPI(mixed $expectedResult, mixed $number): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($number !== null) {\n            $sheet->getCell('A1')->setValue($number);\n        }\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=SQRTPI()');\n        } else {\n            $sheet->getCell('B1')->setValue('=SQRTPI(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSQRTPI(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SQRTPI.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSqrtPiArray')]\n    public function testSqrtPiArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SQRTPI({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerSqrtPiArray(): array\n    {\n        return [\n            'row vector' => [[[5.317361552716, 6.2665706865775, 8.6832150546992]], '{9, 12.5, 24}'],\n            'column vector' => [[[5.3173615527166], [6.2665706865775], [8.6832150546992]], '{9; 12.5; 24}'],\n            'matrix' => [[[5.3173615527166, 6.2665706865775], [8.6832150546992, 14.1796308072441]], '{9, 12.5; 24, 64}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass SqrtTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSQRT')]\n    public function testSQRT(mixed $expectedResult, mixed $number = 'omitted'): void\n    {\n        $sheet = $this->getSheet();\n        $this->mightHaveException($expectedResult);\n        $this->setCell('A1', $number);\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=SQRT()');\n        } else {\n            $sheet->getCell('B1')->setValue('=SQRT(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerSqrt(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SQRT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSqrtArray')]\n    public function testSqrtArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SQRT({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerSqrtArray(): array\n    {\n        return [\n            'row vector' => [[[3, 3.5355339059327378, 4.898979485566356]], '{9, 12.5, 24}'],\n            'column vector' => [[[3], [3.5355339059327378], [4.898979485566356]], '{9; 12.5; 24}'],\n            'matrix' => [[[3, 3.5355339059327378], [4.898979485566356, 8]], '{9, 12.5; 24, 64}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SubTotalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SubTotalTest extends AllSetupTeardown\n{\n    #[DataProvider('providerSUBTOTAL')]\n    public function testSubtotal(float|int|string $expectedResult, float|int|string $type): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->fromArray([[0], [1], [1], [2], [3], [5], [8], [13], [21], [34], [55], [89]], null, 'A1', true);\n        $maxCol = $sheet->getHighestColumn();\n        $maxRow = $sheet->getHighestRow();\n        $sheet->getCell('D2')->setValue(\"=SUBTOTAL($type, A1:$maxCol$maxRow)\");\n        $result = $sheet->getCell('D2')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUBTOTAL(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUBTOTAL.php';\n    }\n\n    #[DataProvider('providerSUBTOTAL')]\n    public function testSubtotalColumnHidden(float|int|string $expectedResult, float|int|string $type): void\n    {\n        // Hidden columns don't affect calculation, only hidden rows\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->fromArray([0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89], null, 'A1', true);\n        $maxCol = $sheet->getHighestColumn();\n        $maxRow = $sheet->getHighestRow();\n        $hiddenColumns = [\n            'A' => false,\n            'B' => true,\n            'C' => false,\n            'D' => true,\n            'E' => false,\n            'F' => false,\n            'G' => false,\n            'H' => true,\n            'I' => false,\n            'J' => true,\n            'K' => true,\n            'L' => false,\n        ];\n        foreach ($hiddenColumns as $col => $hidden) {\n            $columnDimension = $sheet->getColumnDimension($col);\n            $columnDimension->setVisible($hidden);\n        }\n        $sheet->getCell('D2')->setValue(\"=SUBTOTAL($type, A1:$maxCol$maxRow)\");\n        $result = $sheet->getCell('D2')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    #[DataProvider('providerSUBTOTALHIDDEN')]\n    public function testSubtotalRowHidden(mixed $expectedResult, int $type): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->fromArray([[0], [1], [1], [2], [3], [5], [8], [13], [21], [34], [55], [89]], null, 'A1', true);\n        $maxCol = $sheet->getHighestColumn();\n        $maxRow = $sheet->getHighestRow();\n        $visibleRows = [\n            '1' => false,\n            '2' => true,\n            '3' => false,\n            '4' => true,\n            '5' => false,\n            '6' => false,\n            '7' => false,\n            '8' => true,\n            '9' => false,\n            '10' => true,\n            '11' => true,\n            '12' => false,\n        ];\n        foreach ($visibleRows as $row => $visible) {\n            $rowDimension = $sheet->getRowDimension((int) $row);\n            $rowDimension->setVisible($visible);\n        }\n        $sheet->getCell('D2')->setValue(\"=SUBTOTAL($type, A1:$maxCol$maxRow)\");\n        $result = $sheet->getCell('D2')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUBTOTALHIDDEN(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUBTOTALHIDDEN.php';\n    }\n\n    public function testSubtotalNested(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(\n            [\n                [123],\n                [234],\n                ['=SUBTOTAL(1,A1:A2)'],\n                ['=ROMAN(SUBTOTAL(1, A1:A2))'],\n                ['This is text containing \"=\" and \"SUBTOTAL(\"'],\n                ['=AGGREGATE(1, 0, A1:A2)'],\n                ['=SUM(2, 3)'],\n            ],\n            null,\n            'A1',\n            true\n        );\n        $maxCol = $sheet->getHighestColumn();\n        $maxRow = $sheet->getHighestRow();\n        $sheet->getCell('H1')->setValue(\"=SUBTOTAL(9, A1:$maxCol$maxRow)\");\n        self::assertEquals(362, $sheet->getCell('H1')->getCalculatedValue());\n    }\n\n    public function testRefError(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=SUBTOTAL(9, #REF!)');\n        self::assertEquals('#REF!', $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public function testSecondaryRefError(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=SUBTOTAL(9, B1:B9,#REF!,C1:C9)');\n        self::assertEquals('#REF!', $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public function testNonStringSingleCellRefError(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=SUBTOTAL(9, 1, C1, Sheet99!A11)');\n        self::assertEquals('#REF!', $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public function testNonStringCellRangeRefError(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=SUBTOTAL(9, Sheet99!A1)');\n        self::assertEquals('#REF!', $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public function testTypesOfHidden(): void\n    {\n        $worksheet = $this->getSheet();\n        $worksheet->SetCellValue('A1', 'Status');\n        $worksheet->SetCellValue('B1', 'Amount');\n        $worksheet->SetCellValue('A2', 'Active');\n        $worksheet->SetCellValue('B2', 500);\n        $worksheet->SetCellValue('A3', 'Snoozed');\n        $worksheet->SetCellValue('B3', 700);\n        $worksheet->SetCellValue('A4', 'Active');\n        $worksheet->SetCellValue('B4', 300);\n\n        $worksheet->setAutoFilter('A1:B4');\n        $autoFilter = $worksheet->getAutoFilter();\n        $autoFilter->getColumn('A')\n            ->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)\n            ->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                'Active'\n            );\n        $autoFilter->showHideRows(); // row 3 is filtered\n        $worksheet->getRowDimension(4)->setVisible(false); // row 4 is hidden but not filtered\n\n        $worksheet->SetCellValue('D14', '=SUM(B2:B4)');\n        self::assertSame(\n            1500,\n            $worksheet->getCell('D14')->getCalculatedValue(),\n            'all 3 rows are considered'\n        );\n        $worksheet->SetCellValue('D15', '=SUBTOTAL(109,B2:B4)');\n        self::assertSame(\n            500,\n            $worksheet->getCell('D15')->getCalculatedValue(),\n            'excude row 3 (filtered) and row 4 (hidden)'\n        );\n        $worksheet->SetCellValue('D16', '=SUBTOTAL(9,B2:B4)');\n        self::assertSame(\n            800,\n            $worksheet->getCell('D16')->getCalculatedValue(),\n            'exclude row 3 (filtered) but include row 4 (hidden)'\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SumIfTest extends AllSetupTeardown\n{\n    /**\n     * @param mixed[] $array1\n     * @param null|mixed[] $array2\n     */\n    #[DataProvider('providerSUMIF')]\n    public function testSUMIF2(mixed $expectedResult, array $array1, mixed $condition, ?array $array2 = null): void\n    {\n        $this->mightHaveException($expectedResult);\n        if ($expectedResult === 'incomplete') {\n            self::markTestIncomplete('Raises formula error - researching solution');\n        }\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $sheet->fromArray($array1, null, 'A1', true);\n        $maxARow = count($array1);\n        $firstArg = \"A1:A$maxARow\";\n        $this->setCell('B1', $condition);\n        $secondArg = 'B1';\n        if (empty($array2)) {\n            $sheet->getCell('D1')->setValue(\"=SUMIF($firstArg, $secondArg)\");\n        } else {\n            $sheet->fromArray($array2, null, 'C1', true);\n            $maxCRow = count($array2);\n            $thirdArg = \"C1:C$maxCRow\";\n            $sheet->getCell('D1')->setValue(\"=SUMIF($firstArg, $secondArg, $thirdArg)\");\n        }\n        $result = $sheet->getCell('D1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUMIF(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMIF.php';\n    }\n\n    public function testOutliers(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=SUMIF(5,\"<32\")');\n\n        try {\n            $sheet->getCell('A1')->getCalculatedValue();\n            self::fail('Should receive exception for non-array arg');\n        } catch (CalcException $e) {\n            self::assertStringContainsString('Must specify range of cells', $e->getMessage());\n        }\n\n        $sheet->getCell('A4')->setValue('=SUMIF(#REF!,\"<32\")');\n        self::assertSame('#REF!', $sheet->getCell('A4')->getCalculatedValue());\n        $sheet->getCell('A5')->setValue('=SUMIF(D1:D4, 1, #REF!)');\n        self::assertSame('#REF!', $sheet->getCell('A5')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\n\nclass SumIfsTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSUMIFS')]\n    public function testSUMIFS(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Statistical\\Conditional::SUMIFS(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUMIFS(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMIFS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumProduct2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\n\nclass SumProduct2Test extends AllSetupTeardown\n{\n    public function testSUMPRODUCT(): void\n    {\n        $file = 'tests/data/Reader/XLSX/issue.3909b.xlsx';\n        $reader = new XlsxReader();\n        $this->spreadsheet = $reader->load($file);\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        self::assertSame('=SUMPRODUCT(((calNames=I3)*(calTiers=$K$2))*calHours)', $sheet->getCell('K3')->getValue());\n        self::assertSame(40, $sheet->getCell('K3')->getCalculatedValue());\n        self::assertSame(4, $sheet->getCell('L3')->getCalculatedValue());\n        self::assertSame(40, $sheet->getCell('M3')->getCalculatedValue());\n        self::assertSame(4, $sheet->getCell('N3')->getCalculatedValue());\n        self::assertSame(40, $sheet->getCell('K4')->getCalculatedValue());\n        self::assertSame(0, $sheet->getCell('L4')->getCalculatedValue());\n        self::assertSame(40, $sheet->getCell('M4')->getCalculatedValue());\n        self::assertSame(0, $sheet->getCell('N4')->getCalculatedValue());\n        self::assertSame(24, $sheet->getCell('K5')->getCalculatedValue());\n        self::assertSame(0, $sheet->getCell('L5')->getCalculatedValue());\n        self::assertSame(24, $sheet->getCell('M5')->getCalculatedValue());\n        self::assertSame(0, $sheet->getCell('N5')->getCalculatedValue());\n        self::assertSame('=SUMPRODUCT(calHours*((calNames=I3)*(calTiers=$K$2)))', $sheet->getCell('I14')->getValue());\n        self::assertSame(40, $sheet->getCell('I14')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumProductTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass SumProductTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSUMPRODUCT')]\n    public function testSUMPRODUCT(mixed $expectedResult, mixed ...$args): void\n    {\n        $sheet = $this->getSheet();\n        $row = 0;\n        $arrayArg = '';\n        foreach ($args as $arr) {\n            $arr2 = Functions::flattenArray($arr);\n            $startRow = 0;\n            foreach ($arr2 as $arr3) {\n                ++$row;\n                if (!$startRow) {\n                    $startRow = $row;\n                }\n                $sheet->getCell(\"A$row\")->setValue($arr3);\n            }\n            $arrayArg .= \"A$startRow:A$row,\";\n        }\n        $arrayArg = substr($arrayArg, 0, -1); // strip trailing comma\n        $sheet->getCell('B1')->setValue(\"=SUMPRODUCT($arrayArg)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUMPRODUCT(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMPRODUCT.php';\n    }\n\n    public function testBoolsAsInt(): void\n    {\n        // issue 3389 not handling unary minus with boolean value\n        $sheet = $this->getSheet();\n        $sheet->fromArray(\n            [\n                ['Range 1', 'Range 2', null, 'Blue matches', 'Red matches'],\n                [0, 'Red', null, '=SUMPRODUCT(--(B3:B10=1), --(C3:C10=\"BLUE\"))', '=SUMPRODUCT(--(B3:B10=1), --(C3:C10=\"RED\"))'],\n                [1, 'Blue'],\n                [0, 'Blue'],\n                [1, 'Red'],\n                [1, 'Blue'],\n                [0, 'Blue'],\n                [1, 'Red'],\n                [1, 'Blue'],\n            ],\n            null, // null value\n            'B2', // start cell\n            true // strict null comparison\n        );\n        self::assertSame(3, $sheet->getCell('E3')->getCalculatedValue());\n        self::assertSame(2, $sheet->getCell('F3')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumSqTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nclass SumSqTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSUMSQ')]\n    public function testSUMSQ(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $maxRow = 0;\n        $funcArg = '';\n        $sheet = $this->getSheet();\n        foreach ($args as $arg) {\n            ++$maxRow;\n            $funcArg = \"A1:A$maxRow\";\n            if ($arg !== null) {\n                $sheet->getCell(\"A$maxRow\")->setValue($arg);\n            }\n        }\n        $sheet->getCell('B1')->setValue(\"=SUMSQ($funcArg)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUMSQ(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMSQ.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SumTest extends AllSetupTeardown\n{\n    #[DataProvider('providerSUM')]\n    public function testSUM(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setArrayAsValue();\n        $sheet = $this->getSheet();\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            $sheet->getCell(\"A$row\")->setValue($arg);\n        }\n        $sheet->getCell('B1')->setValue(\"=SUM(A1:A$row)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUM(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUM.php';\n    }\n\n    #[DataProvider('providerSUMLiterals')]\n    public function testSUMLiterals(mixed $expectedResult, string $args): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('B1')->setValue(\"=SUM($args)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUMLiterals(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMLITERALS.php';\n    }\n\n    #[DataProvider('providerSUMWITHINDEXMATCH')]\n    public function testSumWithIndexMatch(mixed $expectedResult, string $formula): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $this->setArrayAsValue();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Formula');\n        $sheet1->fromArray(\n            [\n                ['Number', 'Formula'],\n                [83, $formula],\n            ]\n        );\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Lookup');\n        $sheet2->fromArray(\n            [\n                ['Lookup', 'Match'],\n                [83, 16],\n            ]\n        );\n        self::assertSame($expectedResult, $sheet1->getCell('B2')->getCalculatedValue());\n    }\n\n    public static function providerSUMWITHINDEXMATCH(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMWITHINDEXMATCH.php';\n    }\n\n    public function testSumWithIndexMatchMoved(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Formula');\n        $sheet1->getCell('G5')->setValue('Number');\n        $sheet1->getCell('H5')->setValue('Formula');\n        $sheet1->getCell('G6')->setValue(83);\n        $sheet1->getCell('H6')->setValue('=SUM(4 * INDEX(Lookup!D4:D6, MATCH(G6, Lookup!C4:C6, 0)))');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Lookup');\n        $sheet2->getCell('C3')->setValue('Lookup');\n        $sheet2->getCell('D3')->setValue('Match');\n        $sheet2->getCell('C4')->setValue(82);\n        $sheet2->getCell('D4')->setValue(15);\n        $sheet2->getCell('C5')->setValue(83);\n        $sheet2->getCell('D5')->setValue(16);\n        $sheet2->getCell('C6')->setValue(84);\n        $sheet2->getCell('D6')->setValue(17);\n        self::assertSame(64, $sheet1->getCell('H6')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2MY2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SumX2MY2Test extends AllSetupTeardown\n{\n    /**\n     * @param mixed[] $matrixData1\n     * @param mixed[] $matrixData2\n     */\n    #[DataProvider('providerSUMX2MY2')]\n    public function testSUMX2MY2(mixed $expectedResult, array $matrixData1, array $matrixData2): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $maxRow = 0;\n        $funcArg1 = '';\n        foreach (Functions::flattenArray($matrixData1) as $arg) {\n            ++$maxRow;\n            $funcArg1 = \"A1:A$maxRow\";\n            $this->setCell(\"A$maxRow\", $arg);\n        }\n        $maxRow = 0;\n        $funcArg2 = '';\n        foreach (Functions::flattenArray($matrixData2) as $arg) {\n            ++$maxRow;\n            $funcArg2 = \"C1:C$maxRow\";\n            $this->setCell(\"C$maxRow\", $arg);\n        }\n        $sheet->getCell('B1')->setValue(\"=SUMX2MY2($funcArg1, $funcArg2)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUMX2MY2(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMX2MY2.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2PY2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SumX2PY2Test extends AllSetupTeardown\n{\n    /**\n     * @param mixed[] $matrixData1\n     * @param mixed[] $matrixData2\n     */\n    #[DataProvider('providerSUMX2PY2')]\n    public function testSUMX2PY2(mixed $expectedResult, array $matrixData1, array $matrixData2): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $maxRow = 0;\n        $funcArg1 = '';\n        foreach (Functions::flattenArray($matrixData1) as $arg) {\n            ++$maxRow;\n            $funcArg1 = \"A1:A$maxRow\";\n            $this->setCell(\"A$maxRow\", $arg);\n        }\n        $maxRow = 0;\n        $funcArg2 = '';\n        foreach (Functions::flattenArray($matrixData2) as $arg) {\n            ++$maxRow;\n            $funcArg2 = \"C1:C$maxRow\";\n            $this->setCell(\"C$maxRow\", $arg);\n        }\n        $sheet->getCell('B1')->setValue(\"=SUMX2PY2($funcArg1, $funcArg2)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUMX2PY2(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMX2PY2.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumXMY2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SumXMY2Test extends AllSetupTeardown\n{\n    /**\n     * @param mixed[] $matrixData1\n     * @param mixed[] $matrixData2\n     */\n    #[DataProvider('providerSUMXMY2')]\n    public function testSUMXMY2(mixed $expectedResult, array $matrixData1, array $matrixData2): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $maxRow = 0;\n        $funcArg1 = '';\n        foreach (Functions::flattenArray($matrixData1) as $arg) {\n            ++$maxRow;\n            $funcArg1 = \"A1:A$maxRow\";\n            $this->setCell(\"A$maxRow\", $arg);\n        }\n        $maxRow = 0;\n        $funcArg2 = '';\n        foreach (Functions::flattenArray($matrixData2) as $arg) {\n            ++$maxRow;\n            $funcArg2 = \"C1:C$maxRow\";\n            $this->setCell(\"C$maxRow\", $arg);\n        }\n        $sheet->getCell('B1')->setValue(\"=SUMXMY2($funcArg1, $funcArg2)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerSUMXMY2(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/SUMXMY2.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass TanTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTan')]\n    public function testTan(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1);\n        $sheet->getCell('A1')->setValue(\"=TAN($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerTan(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/TAN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTanArray')]\n    public function testTanArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TAN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerTanArray(): array\n    {\n        return [\n            'row vector' => [[[1.55740772465490, 0.54630248984379, -1.55740772465490]], '{1, 0.5, -1}'],\n            'column vector' => [[[1.55740772465490], [0.54630248984379], [-1.55740772465490]], '{1; 0.5; -1}'],\n            'matrix' => [[[1.55740772465490, 0.54630248984379], [0.0, -1.55740772465490]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass TanhTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTanh')]\n    public function testTanh(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1);\n        $sheet->getCell('A1')->setValue(\"=TANH($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-6);\n    }\n\n    public static function providerTanh(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/TANH.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTanhArray')]\n    public function testTanhArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TANH({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerTanhArray(): array\n    {\n        return [\n            'row vector' => [[[0.76159415595577, 0.46211715726001, -0.76159415595577]], '{1, 0.5, -1}'],\n            'column vector' => [[[0.76159415595577], [0.46211715726001], [-0.76159415595577]], '{1; 0.5; -1}'],\n            'matrix' => [[[0.76159415595577, 0.46211715726001], [0.0, -0.76159415595577]], '{1, 0.5; 0, -1}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\MathTrig;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass TruncTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTRUNC')]\n    public function testTRUNC(mixed $expectedResult, string $formula): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $sheet->setCellValue('A2', 1.3);\n        $sheet->setCellValue('A3', 2.7);\n        $sheet->setCellValue('A4', -3.8);\n        $sheet->setCellValue('A5', -5.2);\n        $sheet->getCell('A1')->setValue(\"=TRUNC($formula)\");\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerTRUNC(): array\n    {\n        return require 'tests/data/Calculation/MathTrig/TRUNC.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTruncArray')]\n    public function testTruncArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TRUNC({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerTruncArray(): array\n    {\n        return [\n            'matrix' => [[[3.14, 3.141], [3.14159, 3.14159265]], '3.1415926536', '{2, 3; 5, 8}'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTooMuchPrecision')]\n    public function testTooMuchPrecision(mixed $expectedResult, float|int|string $value, int $digits = 1): void\n    {\n        // This test is pretty screwy. Possibly shouldn't even attempt it.\n        // At any rate, these results seem to indicate that PHP\n        // maximum precision is PHP_FLOAT_DIG - 1 digits, not PHP_FLOAT_DIG.\n        // If that changes, at least one of these tests will have to change.\n        $sheet = $this->getSheet();\n        $sheet->getCell('E1')->setValue($value);\n        $sheet->getCell('E2')->setValue(\"=TRUNC(E1,$digits)\");\n        /** @var float|string */\n        $result = $sheet->getCell('E2')->getCalculatedValue();\n        self::assertSame($expectedResult, (string) $result);\n    }\n\n    public static function providerTooMuchPrecision(): array\n    {\n        $max64Plus1 = 9223372036854775808;\n        $stringMax = (string) $max64Plus1;\n\n        return [\n            '2 digits less than PHP_FLOAT_DIG' => ['1' . str_repeat('0', PHP_FLOAT_DIG - 4) . '1.2', 10.0 ** (PHP_FLOAT_DIG - 3) + 1.2, 1],\n            '1 digit less than PHP_FLOAT_DIG' => ['1' . str_repeat('0', PHP_FLOAT_DIG - 3) . '1', 10.0 ** (PHP_FLOAT_DIG - 2) + 1.2, 1],\n            'PHP_FLOAT_DIG' => ['1.0E+' . (PHP_FLOAT_DIG - 1), 10.0 ** (PHP_FLOAT_DIG - 1) + 1.2, 1],\n            '1 digit more than PHP_FLOAT_DIG' => ['1.0E+' . PHP_FLOAT_DIG, 10.0 ** PHP_FLOAT_DIG + 1.2, 1],\n            '32bit exceed int max' => ['3123456780', 3123456789, -1],\n            '64bit exceed int max neg decimals' => [$stringMax, $max64Plus1, -1],\n            '64bit exceed int max pos decimals' => [$stringMax, $max64Plus1, 1],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AllSetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\nuse Stringable;\n\nclass AllSetupTeardown extends TestCase\n{\n    private string $compatibilityMode;\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected string $returnArrayAs;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        $this->returnArrayAs = '';\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected static function setOpenOffice(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n    }\n\n    protected static function setGnumeric(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_GNUMERIC);\n    }\n\n    protected function mightHaveException(mixed $expectedResult): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(CalcException::class);\n        }\n    }\n\n    protected function setCell(string $cell, mixed $value): void\n    {\n        if ($value !== null) {\n            if (is_string($value) && is_numeric($value)) {\n                $this->getSheet()->getCell($cell)->setValueExplicit($value, DataType::TYPE_STRING);\n            } else {\n                $this->getSheet()->getCell($cell)->setValue($value);\n            }\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n\n    /**\n     * Excel handles text/logical/empty cells differently when\n     * passed directly as arguments as opposed to cell references or arrays.\n     * This function will test both approaches.\n     */\n    protected function runTestCases(string $functionName, mixed $expectedResult, mixed ...$args): void\n    {\n        if (is_array($expectedResult)) {\n            $this->runTestCaseReference($functionName, $expectedResult[0], ...$args);\n            $this->runTestCaseDirect($functionName, $expectedResult[1], ...$args);\n        } else {\n            $this->runTestCaseReference($functionName, $expectedResult, ...$args);\n            $this->runTestCaseDirect($functionName, $expectedResult, ...$args);\n        }\n    }\n\n    /**\n     * Excel handles text/logical/empty cells differently when\n     * passed directly as arguments as opposed to cell references or arrays.\n     * This functions tests passing as arrays.\n     */\n    protected function runTestCaseReference(string $functionName, mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($this->returnArrayAs !== '') {\n            $calculation = Calculation::getInstance($this->spreadsheet);\n            $calculation->setInstanceArrayReturnType(\n                $this->returnArrayAs\n            );\n        }\n        $formula = \"=$functionName(\";\n        $comma = '';\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            if (is_array($arg)) {\n                $arrayArg = '{';\n                $arrayComma = '';\n                foreach ($arg as $arrayItem) {\n                    $arrayArg .= $arrayComma;\n                    if ($arrayItem !== null && !is_scalar($arrayItem) && !($arrayItem instanceof Stringable)) {\n                        self::fail('non-stringable item');\n                    }\n                    $arrayArg .= $this->convertToString($arrayItem);\n                    $arrayComma = ';';\n                }\n                $arrayArg .= '}';\n                $formula .= \"$comma$arrayArg\";\n                $comma = ',';\n            } else {\n                $cellId = \"A$row\";\n                $formula .= \"$comma$cellId\";\n                $comma = ',';\n                $this->setCell($cellId, $arg);\n            }\n        }\n        $formula .= ')';\n        $this->setCell('B1', $formula);\n        self::assertEqualsWithDelta($expectedResult, $sheet->getCell('B1')->getCalculatedValue(), 1.0e-8, 'arguments supplied as references');\n    }\n\n    /**\n     * Excel handles text/logical/empty cells differently when\n     * passed directly as arguments as opposed to cell references or arrays.\n     * This functions tests passing as direct arguments.\n     */\n    protected function runTestCaseDirect(string $functionName, mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = \"=$functionName(\";\n        $comma = '';\n        foreach ($args as $arg) {\n            if (is_array($arg)) {\n                foreach ($arg as $arrayItem) {\n                    $formula .= $comma;\n                    $comma = ',';\n                    if ($arrayItem !== null && !is_scalar($arrayItem) && !($arrayItem instanceof Stringable)) {\n                        self::fail('non-stringable item');\n                    }\n                    $formula .= $this->convertToString($arrayItem);\n                }\n            } else {\n                $formula .= $comma;\n                $comma = ',';\n                /** @var string */\n                $argx = $arg;\n                $formula .= $this->convertToString($argx);\n            }\n        }\n        $formula .= ')';\n        $this->setCell('B2', $formula);\n        self::assertEqualsWithDelta($expectedResult, $sheet->getCell('B2')->getCalculatedValue(), 1.0e-8, 'arguments supplied directly');\n    }\n\n    /**\n     * Excel seems to reject bracket notation for literal arrays\n     * for some functions.\n     */\n    protected function runTestCaseNoBracket(string $functionName, mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $formula = \"=$functionName(\";\n        $comma = '';\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            if (is_array($arg)) {\n                $col = 'A';\n                $arrayRange = '';\n                foreach ($arg as $arrayItem) {\n                    $cellId = \"$col$row\";\n                    $arrayRange = \"A$row:$cellId\";\n                    $this->setCell($cellId, $arrayItem);\n                    StringHelper::stringIncrement($col);\n                }\n                $formula .= \"$comma$arrayRange\";\n                $comma = ',';\n            } else {\n                $cellId = \"A$row\";\n                $formula .= \"$comma$cellId\";\n                $comma = ',';\n                if (is_string($arg) && str_starts_with($arg, '=')) {\n                    $sheet->getCell($cellId)->setValueExplicit($arg, DataType::TYPE_STRING);\n                } else {\n                    $this->setCell($cellId, $arg);\n                }\n            }\n        }\n        $formula .= ')';\n        $this->setCell('Z99', $formula);\n        self::assertEqualsWithDelta($expectedResult, $sheet->getCell('Z99')->getCalculatedValue(), 1.0e-8, 'arguments supplied as ranges');\n    }\n\n    private function convertToString(null|bool|float|int|string|Stringable $arg): string\n    {\n        if (is_string($arg)) {\n            return '\"' . $arg . '\"';\n        }\n        if (is_bool($arg)) {\n            return $arg ? 'TRUE' : 'FALSE';\n        }\n\n        return (string) $arg;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AveDevTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass AveDevTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAVEDEV')]\n    public function testAVEDEV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('AVEDEV', $expectedResult, ...$args);\n    }\n\n    public static function providerAVEDEV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/AVEDEV.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass AverageATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAVERAGEA')]\n    public function testAVERAGEA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('AVERAGEA', $expectedResult, ...$args);\n    }\n\n    public static function providerAVERAGEA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/AVERAGEA.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIf2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AverageIf2Test extends TestCase\n{\n    public function testAVERAGEIF(): void\n    {\n        $table = [\n            ['n', 1],\n            ['', 2],\n            ['y', 3],\n            ['', 4],\n            ['n', 5],\n            ['n', 6],\n            ['n', 7],\n            ['', 8],\n            [null, 9],\n        ];\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray($table, null, 'A1', true);\n        $sheet->getCell('C1')->setValue('=AVERAGEIF(A:A,\"\",B:B)');\n        $sheet->getCell('C2')->setValue('=AVERAGEIF(A:A,,B:B)');\n        $sheet->getCell('C3')->setValue('=AVERAGEIF(A:A,\"n\",B:B)');\n        $sheet->getCell('C4')->setValue('=AVERAGEIF(A:A,\"y\",B:B)');\n        $sheet->getCell('C5')->setValue('=AVERAGEIF(A:A,\"x\",B:B)');\n\n        self::assertEqualsWithDelta(5.75, $sheet->getCell('C1')->getCalculatedValue(), 1E-12);\n        self::assertEquals('#DIV/0!', $sheet->getCell('C2')->getCalculatedValue());\n        self::assertEqualsWithDelta(4.75, $sheet->getCell('C3')->getCalculatedValue(), 1E-12);\n        self::assertEqualsWithDelta(3, $sheet->getCell('C4')->getCalculatedValue(), 1E-12);\n        self::assertEquals('#DIV/0!', $sheet->getCell('C5')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AverageIfTest extends AllSetupTeardown\n{\n    #[DataProvider('providerAVERAGEIF')]\n    public function testAVERAGEIF(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('AVERAGEIF', $expectedResult, ...$args);\n    }\n\n    public static function providerAVERAGEIF(): array\n    {\n        return require 'tests/data/Calculation/Statistical/AVERAGEIF.php';\n    }\n\n    public function testOutliers(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('C1')->setValue(5);\n        $sheet->getCell('A1')->setValue('=AVERAGEIF(5,\"<32\")');\n\n        try {\n            $sheet->getCell('A1')->getCalculatedValue();\n            self::fail('Should receive exception for non-array arg');\n        } catch (CalcException $e) {\n            self::assertStringContainsString('Must specify range of cells', $e->getMessage());\n        }\n        $sheet->getCell('A2')->setValue('=AVERAGEIF({5},\"<32\")');\n\n        try {\n            $sheet->getCell('A2')->getCalculatedValue();\n            self::fail('Should receive exception for literal array arg');\n        } catch (CalcException $e) {\n            self::assertStringContainsString('Must specify range of cells', $e->getMessage());\n        }\n        $sheet->getCell('A3')->setValue('=AVERAGEIF(C1:C1,\"<32\")');\n        self::assertSame(5, $sheet->getCell('A3')->getCalculatedValue(), 'first arg is single cell');\n\n        $sheet->getCell('A4')->setValue('=AVERAGEIF(#REF!,1)');\n        self::assertSame('#REF!', $sheet->getCell('A4')->getCalculatedValue());\n\n        $sheet->getCell('A5')->setValue('=AVERAGEIF(D1:D4, 1, #REF!)');\n        self::assertSame('#REF!', $sheet->getCell('A5')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\n\nclass AverageIfsTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAVERAGEIFS')]\n    public function testAVERAGEIFS(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('AVERAGEIFS', $expectedResult, ...$args);\n    }\n\n    public static function providerAVERAGEIFS(): array\n    {\n        return require 'tests/data/Calculation/Statistical/AVERAGEIFS.php';\n    }\n\n    // For example, A1=75, A2=94, A3=86:\n    // =AVERAGEIFS(A1:A3,A1:A3,\">80\") gives an answer, but\n    // =AVERAGEIFS({75;94;86},{75;94;86},\">80\") does not.\n    public function testOutliers(): void\n    {\n        $sheet = $this->getSheet();\n        $this->setCell('A1', 75);\n        $this->setCell('A2', 94);\n        $this->setCell('A3', 86);\n        $sheet->getCell('C1')->setValue('=AVERAGEIFS(A1:A3,A1:A3,\">80\")');\n        self::assertSame(90, $sheet->getCell('C1')->getCalculatedValue(), 'first and second args are range');\n        $sheet->getCell('C2')->setValue('=AVERAGEIFS({75;94;86},A1:A3,\">80\")');\n\n        try {\n            $sheet->getCell('C2')->getCalculatedValue();\n            self::fail('Should receive exception for literal array arg');\n        } catch (CalcException $e) {\n            self::assertStringContainsString('Must specify range of cells', $e->getMessage(), 'first arg is array literal');\n        }\n        $sheet->getCell('C3')->setValue('=AVERAGEIFS(A1:A3,{75;94;86},\">80\")');\n\n        try {\n            $sheet->getCell('C3')->getCalculatedValue();\n            self::fail('Should receive exception for literal array arg');\n        } catch (CalcException $e) {\n            self::assertStringContainsString('Must specify range of cells', $e->getMessage(), 'second arg is array literal');\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass AverageTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerAVERAGE')]\n    public function testAVERAGE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('AVERAGE', $expectedResult, ...$args);\n    }\n\n    public static function providerAVERAGE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/AVERAGE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass BetaDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBETADIST')]\n    public function testBETADIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('BETADIST', $expectedResult, ...$args);\n    }\n\n    public static function providerBETADIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/BETADIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBetaDistArray')]\n    public function testBetaDistArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BETADIST({$argument1}, {$argument2}, {$argument3})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBetaDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [[0.25846539810299873, 0.05696312425682317], [0.3698138247709718, 0.10449584381010533]],\n                '0.25',\n                '{5, 7.5}',\n                '{10; 12}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass BetaInvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBETAINV')]\n    public function testBETAINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('BETAINV', $expectedResult, ...$args);\n    }\n\n    public static function providerBETAINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/BETAINV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBetaInvArray')]\n    public function testBetaInvArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BETAINV({$argument1}, {$argument2}, {$argument3})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBetaInvArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [[0.24709953547, 0.346789605377], [0.215382947588, 0.307844847105]],\n                '0.25',\n                '{5, 7.5}',\n                '{10; 12}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass BinomDistRangeTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBINOMDISTRANGE')]\n    public function testBINOMDISTRANGE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('BINOM.DIST.RANGE', $expectedResult, ...$args);\n    }\n\n    public static function providerBINOMDISTRANGE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/BINOMDISTRANGE.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBinomDistRangeArray')]\n    public function testBinomDistRangeArray(\n        array $expectedResult,\n        string $trials,\n        string $probabilities,\n        string $successes\n    ): void {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BINOM.DIST.RANGE({$trials}, {$probabilities}, {$successes})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBinomDistRangeArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [[0.17303466796875, 0.01153564453125], [0.258103609085083, 0.1032414436340332]],\n                '{7; 12}',\n                '0.25',\n                '{3, 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass BinomDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBINOMDIST')]\n    public function testBINOMDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('BINOMDIST', $expectedResult, ...$args);\n    }\n\n    public static function providerBINOMDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/BINOMDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBinomDistArray')]\n    public function testBinomDistArray(\n        array $expectedResult,\n        string $values,\n        string $trials,\n        string $probabilities\n    ): void {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BINOMDIST({$values}, {$trials}, {$probabilities}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBinomDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [[0.17303466796875, 0.01153564453125], [0.258103609085083, 0.1032414436340332]],\n                '{3, 5}',\n                '{7; 12}',\n                '0.25',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass BinomInvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBINOMINV')]\n    public function testBINOMINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('BINOM.INV', $expectedResult, ...$args);\n    }\n\n    public static function providerBINOMINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/BINOMINV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBinomInvArray')]\n    public function testBinomInvArray(\n        array $expectedResult,\n        string $trials,\n        string $probabilities,\n        string $alphas\n    ): void {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=BINOM.INV({$trials}, {$probabilities}, {$alphas})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerBinomInvArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [[32, 53], [25, 44]],\n                '100',\n                '{0.3, 0.5}',\n                '{0.7; 0.12}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ChiDistLeftTailTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCHIDIST')]\n    public function testCHIDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('CHISQ.DIST', $expectedResult, ...$args);\n    }\n\n    public static function providerCHIDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/CHIDISTLeftTail.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerChiDistLeftTailArray')]\n    public function testChiDistLeftTailArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CHISQ.DIST({$values}, {$degrees}, false)\";\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerChiDistLeftTailArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.0925081978822616, 0.12204152134938745, 0.0881791375107928],\n                    [0.007059977723446427, 0.03340047144527138, 0.07814672592526599],\n                ],\n                '{3, 5, 8}',\n                '{7; 12}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ChiDistRightTailTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCHIDIST')]\n    public function testCHIDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('CHISQ.DIST.RT', $expectedResult, ...$args);\n    }\n\n    public static function providerCHIDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/CHIDISTRightTail.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerChiDistRightTailArray')]\n    public function testChiDistRightTailArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CHISQ.DIST.RT({$values}, {$degrees})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerChiDistRightTailArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.8850022316431506, 0.6599632296942824, 0.33259390259930777],\n                    [0.9955440192247521, 0.9579789618046938, 0.7851303870304048],\n                ],\n                '{3, 5, 8}',\n                '{7; 12}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ChiInvLeftTailTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCHIINV')]\n    public function testCHIINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('CHISQ.INV', $expectedResult, ...$args);\n    }\n\n    public static function providerCHIINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/CHIINVLeftTail.php';\n    }\n\n    public function invVersusDistTest(): void\n    {\n        $expectedResult = 4.671330448981;\n        $probability = 0.3;\n        $degrees = 7;\n        $calculation = Calculation::getInstance();\n        $formula = \"=CHISQ.INV($probability, $degrees)\";\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);\n        $formula = \"=CHISQ.DIST($result, $degrees)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($probability, $result, 1.0e-8);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerChiInvLeftTailArray')]\n    public function testChiInvLeftTailArray(array $expectedResult, string $probabilities, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CHISQ.INV({$probabilities}, {$degrees})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerChiInvLeftTailArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [5.0816470296362795, 6.345811195521517, 1.508898337422818],\n                    [9.61151737996991, 11.34032237742413, 4.0773397083341045],\n                ],\n                '{0.35, 0.5, 0.018}',\n                '{7; 12}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ChiInvRightTailTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCHIINV')]\n    public function testCHIINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('CHISQ.INV.RT', $expectedResult, ...$args);\n    }\n\n    public static function providerCHIINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/CHIINVRightTail.php';\n    }\n\n    public function invVersusDistTest(): void\n    {\n        $expectedResult = 8.383430828608;\n        $probability = 0.3;\n        $degrees = 7;\n        $calculation = Calculation::getInstance();\n        $formula = \"=CHISQ.INV.RT($probability, $degrees)\";\n        /** @var float|int|string */\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);\n        $formula = \"=CHISQ.DIST.RT($result, $degrees)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($probability, $result, 1.0e-8);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerChiInvRightTailArray')]\n    public function testChiInvRightTailArray(array $expectedResult, string $probabilities, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CHISQ.INV.RT({$probabilities}, {$degrees})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerChiInvRightTailArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [7.8061229155968075, 6.345811195521517, 100.0],\n                    [13.266097125199911, 11.34032237742413, 24.388802783239434],\n                ],\n                '{0.35, 0.5, 0.018}',\n                '{7; 12}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiTestTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\n// TODO Convert to Spreadsheet context.\nclass ChiTestTest extends TestCase\n{\n    /**\n     * @param float[] $actual\n     * @param float[] $expected\n     */\n    #[DataProvider('providerCHITEST')]\n    public function testCHITEST(mixed $expectedResult, array $actual, array $expected): void\n    {\n        $result = Statistical\\Distributions\\ChiSquared::test($actual, $expected);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerCHITEST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/CHITEST.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ConfidenceTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCONFIDENCE')]\n    public function testCONFIDENCE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('CONFIDENCE', $expectedResult, ...$args);\n    }\n\n    public static function providerCONFIDENCE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/CONFIDENCE.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerConfidenceArray')]\n    public function testConfidenceArray(array $expectedResult, string $alpha, string $stdDev, string $size): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CONFIDENCE({$alpha}, {$stdDev}, {$size})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerConfidenceArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.33261691811208144, 0.6929519127335031, 1.3859038254670062],\n                    [0.2351956783344234, 0.48999099653004874, 0.9799819930600975],\n                ],\n                '0.05',\n                '{1.2, 2.5, 5}',\n                '{50; 100}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CorrelTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCORREL')]\n    public function testCORREL(mixed $expectedResult, mixed $xargs, mixed $yargs): void\n    {\n        $result = Statistical\\Trends::CORREL($xargs, $yargs);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerCORREL(): array\n    {\n        return require 'tests/data/Calculation/Statistical/CORREL.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass CountATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUNTA')]\n    public function testCOUNTA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('COUNTA', $expectedResult, ...$args);\n    }\n\n    public static function providerCOUNTA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/COUNTA.php';\n    }\n\n    public function testNull(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '=COUNTA(B1,B2,B3,B4)');\n        $sheet->setCellValue('A2', '=COUNTA(B1,,B3,B4)');\n        $sheet->setCellValue('A3', '=COUNTA(B1,B2,B3,B4)');\n        self::assertSame(0, $sheet->getCell('A1')->getCalculatedValue(), 'empty cells not counted');\n        self::assertSame(1, $sheet->getCell('A2')->getCalculatedValue(), 'null argument is counted');\n        self::assertSame(0, $sheet->getCell('A3')->getCalculatedValue(), 'empty cells still not counted');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountBlankTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\n\nclass CountBlankTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUNTBLANK')]\n    public function testCOUNTBLANK(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('COUNTBLANK', $expectedResult, ...$args);\n    }\n\n    public static function providerCOUNTBLANK(): array\n    {\n        return require 'tests/data/Calculation/Statistical/COUNTBLANK.php';\n    }\n\n    public function testOutliers(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('C1')->setValue(1);\n        $sheet->getCell('C2')->setValue(2);\n        $sheet->getCell('C4')->setValue(4);\n        $sheet->getCell('A1')->setValue('=COUNTBLANK(5)');\n\n        try {\n            $sheet->getCell('A1')->getCalculatedValue();\n            self::fail('Should receive exception for non-array arg');\n        } catch (CalcException $e) {\n            self::assertStringContainsString('Must specify range of cells', $e->getMessage());\n        }\n        $sheet->getCell('A2')->setValue('=COUNTBLANK({1;2;4})');\n\n        try {\n            $sheet->getCell('A1')->getCalculatedValue();\n            self::fail('Should receive exception for inline array arg');\n        } catch (CalcException $e) {\n            self::assertStringContainsString('Must specify range of cells', $e->getMessage());\n        }\n        $sheet->getCell('A3')->setValue('=COUNTBLANK(C1:C1)');\n        self::assertSame(0, $sheet->getCell('A3')->getCalculatedValue(), 'arg is single non-blank cell');\n        $sheet->getCell('A4')->setValue('=COUNTBLANK(D2:D2)');\n        self::assertSame(1, $sheet->getCell('A4')->getCalculatedValue(), 'arg is single null cell');\n        $sheet->getCell('A5')->setValue('=COUNTBLANK(D3:D4)');\n        self::assertSame(2, $sheet->getCell('A5')->getCalculatedValue(), 'arg is two cells both null');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass CountIfTest extends AllSetupTeardown\n{\n    #[DataProvider('providerCOUNTIF')]\n    public function testCOUNTIF(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('COUNTIF', $expectedResult, ...$args);\n    }\n\n    public function testMultipleRows(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray([\n            ['apples', 'oranges', 'peaches', 'apples'],\n            ['bananas', 'mangoes', 'grapes', 'cherries'],\n        ]);\n        $sheet->getCell('Z99')->setValue('=COUNTIF(A1:D2,\"*p*e*\")');\n        self::assertSame(4, $sheet->getCell('Z99')->getCalculatedValue());\n    }\n\n    public static function providerCOUNTIF(): array\n    {\n        return require 'tests/data/Calculation/Statistical/COUNTIF.php';\n    }\n\n    public function testOutliers(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=COUNTIF(5,\"<32\")');\n\n        try {\n            $sheet->getCell('A1')->getCalculatedValue();\n            self::fail('Should receive exception for non-array arg');\n        } catch (CalcException $e) {\n            self::assertStringContainsString('Must specify range of cells', $e->getMessage());\n        }\n\n        $sheet->getCell('A4')->setValue('=COUNTIF(#REF!,1)');\n        self::assertSame('#REF!', $sheet->getCell('A4')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\n// TODO There are some commented out cases which don't return correct value\nclass CountIfsTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOUNTIFS')]\n    public function testCOUNTIFS(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('COUNTIFS', $expectedResult, ...$args);\n    }\n\n    public static function providerCOUNTIFS(): array\n    {\n        return require 'tests/data/Calculation/Statistical/COUNTIFS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass CountTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBasicCOUNT')]\n    public function testBasicCOUNT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('COUNT', $expectedResult, ...$args);\n    }\n\n    public static function providerBasicCOUNT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/BasicCOUNT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerExcelCOUNT')]\n    public function testExcelCOUNT(mixed $expectedResult, mixed ...$args): void\n    {\n        if (is_array($args[0])) {\n            $this->runTestCaseNoBracket('COUNT', $expectedResult, ...$args);\n        } else {\n            $this->runTestCaseDirect('COUNT', $expectedResult, ...$args);\n        }\n    }\n\n    public static function providerExcelCOUNT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/ExcelCOUNT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOpenOfficeCOUNT')]\n    public function testOpenOfficeCOUNT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        if (is_array($args[0])) {\n            $this->runTestCaseNoBracket('COUNT', $expectedResult, ...$args);\n        } else {\n            $this->runTestCaseDirect('COUNT', $expectedResult, ...$args);\n        }\n    }\n\n    public static function providerOpenOfficeCOUNT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/OpenOfficeCOUNT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGnumericCOUNT')]\n    public function testGnumericCOUNT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setGnumeric();\n        $this->runTestCaseNoBracket('COUNT', $expectedResult, ...$args);\n    }\n\n    public static function providerGnumericCOUNT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/GnumericCOUNT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CovarTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass CovarTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCOVAR')]\n    public function testCOVAR(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('COVAR', $expectedResult, ...$args);\n    }\n\n    public static function providerCOVAR(): array\n    {\n        return require 'tests/data/Calculation/Statistical/COVAR.php';\n    }\n\n    public function testMultipleRows(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray([\n            [1, 2],\n            [3, 4],\n            [5, 6],\n            [7, 8],\n        ]);\n        $sheet->getCell('Z99')->setValue('=COVAR(A1:B2,A3:B4)');\n        self::assertSame(1.25, $sheet->getCell('Z99')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/DevSqTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass DevSqTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDEVSQ')]\n    public function testDEVSQ(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('DEVSQ', $expectedResult, ...$args);\n    }\n\n    public static function providerDEVSQ(): array\n    {\n        return require 'tests/data/Calculation/Statistical/DEVSQ.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ExponDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerEXPONDIST')]\n    public function testEXPONDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('EXPONDIST', $expectedResult, ...$args);\n    }\n\n    public static function providerEXPONDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/EXPONDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerExponDistArray')]\n    public function testExponDistArray(array $expectedResult, string $values, string $lambdas): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=EXPONDIST({$values}, {$lambdas}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerExponDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [1.646434908282079, 0.6693904804452895, 0.2721538598682374],\n                    [1.353352832366127, 0.06737946999085467, 0.003354626279025118],\n                ],\n                '{0.2, 0.5, 0.8}',\n                '{3; 10}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFDIST')]\n    public function testFDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('F.DIST', $expectedResult, ...$args);\n    }\n\n    public static function providerFDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/FDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFDistArray')]\n    public function testFDistArray(array $expectedResult, string $values, string $u, string $v): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=F.DIST({$values}, {$u}, {$v}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerFDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.005510833927217306, 0.005917159763313607, 0.006191501336451844],\n                    [0.0033829117335328167, 0.00291545189504373, 0.0024239018640028246],\n                    [0.0027880880388152654, 0.002128148956848886, 0.0015205263468794615],\n                ],\n                '12',\n                '{1, 2, 5}',\n                '{2; 4; 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FisherInvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFISHERINV')]\n    public function testFISHERINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('FISHERINV', $expectedResult, ...$args);\n    }\n\n    public static function providerFISHERINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/FISHERINV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFisherArray')]\n    public function testFisherArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FISHERINV({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerFisherArray(): array\n    {\n        return [\n            'row vector' => [\n                [[-0.7162978701990245, 0.197375320224904, 0.6351489523872873, 0.9051482536448664]],\n                '{-0.9, 0.2, 0.75, 1.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass FisherTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFISHER')]\n    public function testFISHER(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('FISHER', $expectedResult, ...$args);\n    }\n\n    public static function providerFISHER(): array\n    {\n        return require 'tests/data/Calculation/Statistical/FISHER.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFisherArray')]\n    public function testFisherArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FISHER({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerFisherArray(): array\n    {\n        return [\n            'row vector' => [\n                [[-1.4722194895832204, 0.2027325540540821, 0.9729550745276566]],\n                '{-0.9, 0.2, 0.75}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\nuse PHPUnit\\Framework\\TestCase;\n\n// TODO Spreadsheet context.\n// Note that null in reference is treated differently than null in array.\nclass ForecastTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFORECAST')]\n    public function testFORECAST(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = Statistical\\Trends::FORECAST(...$args);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n    }\n\n    public static function providerFORECAST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/FORECAST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerForecastArray')]\n    public function testForecastArray(array $expectedResult, string $testValues, string $yValues, string $xValues): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FORECAST({$testValues}, {$yValues}, {$xValues})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerForecastArray(): array\n    {\n        return [\n            'row vector' => [[[-11.047619047619047, 22.95238095238095, 42.38095238095237]], '{-2, 5, 9}', '{3, 7, 15, 20, 22, 27}', '{1, 2, 3, 4, 5, 6}'],\n            'column vector' => [[[-11.047619047619047], [22.95238095238095], [42.38095238095237]], '{-2; 5; 9}', '{3, 7, 15, 20, 22, 27}', '{1, 2, 3, 4, 5, 6}'],\n            'matrix' => [[[-11.047619047619047, 22.95238095238095], [42.38095238095237, 15.66666666666666]], '{-2, 5; 9, 3.5}', '{3, 7, 15, 20, 22, 27}', '{1, 2, 3, 4, 5, 6}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass GammaDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGAMMADIST')]\n    public function testGAMMADIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('GAMMA.DIST', $expectedResult, ...$args);\n    }\n\n    public static function providerGAMMADIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/GAMMADIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGammaDistArray')]\n    public function testGammaDistArray(array $expectedResult, string $values, string $alpha, string $beta): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=GAMMA.DIST({$values}, {$alpha}, {$beta}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerGammaDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.0012393760883331792, 0.007436256529999079, 0.0669263087699917],\n                    [0.012446767091965986, 0.03734030127589798, 0.04200783893538521],\n                    [0.018143590657882503, 0.043544617578918025, 0.02508169972545678],\n                ],\n                '12',\n                '{1, 2, 5}',\n                '{2; 4; 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass GammaInvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGAMMAINV')]\n    public function testGAMMAINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('GAMMA.INV', $expectedResult, ...$args);\n    }\n\n    public static function providerGAMMAINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/GAMMAINV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGammaInvArray')]\n    public function testGammaInvArray(array $expectedResult, string $values, string $alpha, string $beta): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=GAMMA.INV({$values}, {$alpha}, {$beta})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerGammaInvArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [2.772588722239782, 5.38526905777939, 12.548861396889375],\n                    [5.545177444479563, 10.77053811555878, 25.09772279377875],\n                    [6.931471805599453, 13.463172644448473, 31.372153492223436],\n                ],\n                '0.75',\n                '{1, 2, 5}',\n                '{2; 4; 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass GammaLnTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGAMMALN')]\n    public function testGAMMALN(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('GAMMALN', $expectedResult, ...$args);\n    }\n\n    public static function providerGAMMALN(): array\n    {\n        return require 'tests/data/Calculation/Statistical/GAMMALN.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGammaLnArray')]\n    public function testGammaLnArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=GAMMALN({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerGammaLnArray(): array\n    {\n        return [\n            'matrix' => [\n                [['#NUM!', 1.5240638224308496], [0.20328095143131059, 2.8813232759012433]],\n                '{-1.5, 0.2; 0.75, 4.8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass GammaTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGAMMA')]\n    public function testGAMMA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('GAMMA', $expectedResult, ...$args);\n    }\n\n    public static function providerGAMMA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/GAMMA.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGammaArray')]\n    public function testGammaArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=GAMMA({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerGammaArray(): array\n    {\n        return [\n            'matrix' => [\n                [[2.363271800901467, 4.590843711999102], [1.2254167024651963, 17.837861981813575]],\n                '{-1.5, 0.2; 0.75, 4.8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass GaussTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGAUSS')]\n    public function testGAUSS(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('GAUSS', $expectedResult, ...$args);\n    }\n\n    public static function providerGAUSS(): array\n    {\n        return require 'tests/data/Calculation/Statistical/GAUSS.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGaussArray')]\n    public function testGaussArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=GAUSS({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerGaussArray(): array\n    {\n        return [\n            'matrix' => [\n                [\n                    [-0.4331927987311418, -0.28814460141660325, 0.07925970943910299],\n                    [0.27337264762313174, 0.39435022633314465, 0.5],\n                ],\n                '{-1.5, -0.8, 0.2; 0.75, 1.25, 12.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GeoMeanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass GeoMeanTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGEOMEAN')]\n    public function testGEOMEAN(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('GEOMEAN', $expectedResult, ...$args);\n    }\n\n    public static function providerGEOMEAN(): array\n    {\n        return require 'tests/data/Calculation/Statistical/GEOMEAN.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GrowthTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\n// TODO Run test in spreadsheet context\nclass GrowthTest extends TestCase\n{\n    /**\n     * @param mixed[] $yValues\n     * @param mixed[] $xValues\n     * @param null|mixed[] $newValues\n     */\n    #[DataProvider('providerGROWTH')]\n    public function testGROWTH(mixed $expectedResult, array $yValues, array $xValues, ?array $newValues = null, ?bool $const = null): void\n    {\n        if ($newValues === null) {\n            $result = Statistical\\Trends::GROWTH($yValues, $xValues);\n        } elseif ($const === null) {\n            $result = Statistical\\Trends::GROWTH($yValues, $xValues, $newValues);\n        } else {\n            $result = Statistical\\Trends::GROWTH($yValues, $xValues, $newValues, $const);\n        }\n\n        self::assertEqualsWithDelta($expectedResult, $result[0], 1E-12);\n    }\n\n    public static function providerGROWTH(): array\n    {\n        return require 'tests/data/Calculation/Statistical/GROWTH.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HarMeanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass HarMeanTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerHARMEAN')]\n    public function testHARMEAN(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('HARMEAN', $expectedResult, ...$args);\n    }\n\n    public static function providerHARMEAN(): array\n    {\n        return require 'tests/data/Calculation/Statistical/HARMEAN.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass HypGeomDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerHYPGEOMDIST')]\n    public function testHYPGEOMDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('HYPGEOMDIST', $expectedResult, ...$args);\n    }\n\n    public static function providerHYPGEOMDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/HYPGEOMDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerHypGeomDistArray')]\n    public function testHypGeomDistArray(\n        array $expectedResult,\n        string $sampleSuccesses,\n        string $sampleNumber,\n        string $populationSuccesses,\n        string $populationNumber\n    ): void {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=HYPGEOMDIST({$sampleSuccesses}, {$sampleNumber}, {$populationSuccesses}, {$populationNumber})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerHypGeomDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.03230668326324188, 0.11602444697599835, 2.7420710766783583E-5],\n                    [0.00015615400269340616, 0.1000501002971324, 0.02508542192762165],\n                    [7.763976978296478E-9, 0.0013573140575961775, 0.17007598410538344],\n                ],\n                '{5, 11, 18}',\n                '32',\n                '{28; 42; 57}',\n                '100',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/InterceptTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass InterceptTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerINTERCEPT')]\n    public function testINTERCEPT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('INTERCEPT', $expectedResult, ...$args);\n    }\n\n    public static function providerINTERCEPT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/INTERCEPT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass KurtTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerKURT')]\n    public function testKURT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('KURT', $expectedResult, ...$args);\n    }\n\n    public static function providerKURT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/KURT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LargeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass LargeTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLARGE')]\n    public function testLARGE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('LARGE', $expectedResult, ...$args);\n    }\n\n    public static function providerLARGE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/LARGE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LinEstTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\n// TODO run test in spreadsheet context\nclass LinEstTest extends TestCase\n{\n    /**\n     * @param mixed[] $yValues\n     * @param mixed[] $xValues\n     */\n    #[DataProvider('providerLINEST')]\n    public function testLINEST(array $expectedResult, array $yValues, array $xValues, mixed $const, mixed $stats): void\n    {\n        $result = Statistical\\Trends::LINEST($yValues, $xValues, $const, $stats);\n        self::assertIsArray($result);\n\n        $elements = count($expectedResult);\n        for ($element = 0; $element < $elements; ++$element) {\n            self::assertEqualsWithDelta($expectedResult[$element], $result[$element], 1E-12);\n        }\n    }\n\n    public static function providerLINEST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/LINEST.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogEstTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\n// TODO run test in spreadsheet context\nclass LogEstTest extends TestCase\n{\n    /**\n     * @param mixed[] $yValues\n     * @param mixed[] $xValues\n     */\n    #[DataProvider('providerLOGEST')]\n    public function testLOGEST(array $expectedResult, array $yValues, array $xValues, mixed $const, mixed $stats): void\n    {\n        $result = Statistical\\Trends::LOGEST($yValues, $xValues, $const, $stats);\n        self::assertIsArray($result);\n\n        $elements = count($expectedResult);\n        for ($element = 0; $element < $elements; ++$element) {\n            self::assertEqualsWithDelta($expectedResult[$element], $result[$element], 1E-12);\n        }\n    }\n\n    public static function providerLOGEST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/LOGEST.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass LogInvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLOGINV')]\n    public function testLOGINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('LOGINV', $expectedResult, ...$args);\n    }\n\n    public static function providerLOGINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/LOGINV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLogInvArray')]\n    public function testLogInvArray(array $expectedResult, string $probabilities, string $mean, string $stdDev): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LOGINV({$probabilities}, {$mean}, {$stdDev})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerLogInvArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [[54.598150033144236, 403.4287934927351]],\n                '0.5',\n                '{4, 6}',\n                '7',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass LogNormDist2Test extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLOGNORMDIST2')]\n    public function testLOGNORMDIST2(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('LOGNORM.DIST', $expectedResult, ...$args);\n    }\n\n    public static function providerLOGNORMDIST2(): array\n    {\n        return require 'tests/data/Calculation/Statistical/LOGNORMDIST2.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLogNormDist2Array')]\n    public function testLogNormDist2Array(array $expectedResult, string $values, string $mean, string $stdDev): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LOGNORM.DIST({$values}, {$mean}, {$stdDev}, true)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerLogNormDist2Array(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.20185593420695913, 0.34805905738890675, 0.47717995703671096],\n                    [0.06641711479920787, 0.24102205723753728, 0.45897407661978173],\n                    [8.579368431449463E-5, 0.03941233670471267, 0.398378394299419],\n                ],\n                '12',\n                '{10, 6, 3}',\n                '{9; 5; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass LogNormDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLOGNORMDIST')]\n    public function testLOGNORMDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('LOGNORMDIST', $expectedResult, ...$args);\n    }\n\n    public static function providerLOGNORMDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/LOGNORMDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerLogNormDistArray')]\n    public function testLogNormDistArray(array $expectedResult, string $values, string $mean, string $stdDev): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LOGNORMDIST({$values}, {$mean}, {$stdDev})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerLogNormDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.20185593420695913, 0.34805905738890675, 0.47717995703671096],\n                    [0.06641711479920787, 0.24102205723753728, 0.45897407661978173],\n                    [8.579368431449463E-5, 0.03941233670471267, 0.398378394299419],\n                ],\n                '12',\n                '{10, 6, 3}',\n                '{9; 5; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass MaxATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMAXA')]\n    public function testMAXA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('MAXA', $expectedResult, ...$args);\n    }\n\n    public static function providerMAXA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/MAXA.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxIfsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass MaxIfsTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMAXIFS')]\n    public function testMAXIFS(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('MAXIFS', $expectedResult, ...$args);\n    }\n\n    public static function providerMAXIFS(): array\n    {\n        return require 'tests/data/Calculation/Statistical/MAXIFS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass MaxTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMAX')]\n    public function testMAX(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('MAX', $expectedResult, ...$args);\n    }\n\n    public static function providerMAX(): array\n    {\n        return require 'tests/data/Calculation/Statistical/MAX.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MedianTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass MedianTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMEDIAN')]\n    public function testMEDIAN(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('MEDIAN', $expectedResult, ...$args);\n    }\n\n    public static function providerMEDIAN(): array\n    {\n        return require 'tests/data/Calculation/Statistical/MEDIAN.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass MinATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMINA')]\n    public function testMINA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('MINA', $expectedResult, ...$args);\n    }\n\n    public static function providerMINA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/MINA.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinIfsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass MinIfsTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMINIFS')]\n    public function testMINIFS(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('MINIFS', $expectedResult, ...$args);\n    }\n\n    public static function providerMINIFS(): array\n    {\n        return require 'tests/data/Calculation/Statistical/MINIFS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass MinTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMIN')]\n    public function testMIN(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('MIN', $expectedResult, ...$args);\n    }\n\n    public static function providerMIN(): array\n    {\n        return require 'tests/data/Calculation/Statistical/MIN.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ModeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ModeTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMODE')]\n    public function testMODE(mixed $expectedResult, string $str): void\n    {\n        $workbook = new Spreadsheet();\n        $sheet = $workbook->getActiveSheet();\n\n        $row = 1;\n        $sheet->setCellValue(\"B$row\", \"=MODE($str)\");\n        $sheet->setCellValue(\"C$row\", \"=MODE.SNGL($str)\");\n        self::assertEquals($expectedResult, $sheet->getCell(\"B$row\")->getCalculatedValue());\n        self::assertEquals($expectedResult, $sheet->getCell(\"C$row\")->getCalculatedValue());\n    }\n\n    public static function providerMODE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/MODE.php';\n    }\n\n    public function testMODENoArgs(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Calculation\\Exception::class);\n\n        $workbook = new Spreadsheet();\n        $sheet = $workbook->getActiveSheet();\n\n        $sheet->setCellValue('B1', '=MODE()');\n        self::assertEquals('#N/A', $sheet->getCell('B1')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass NegBinomDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNEGBINOMDIST')]\n    public function testNEGBINOMDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('NEGBINOMDIST', $expectedResult, ...$args);\n    }\n\n    public static function providerNEGBINOMDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/NEGBINOMDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNegBinomDistArray')]\n    public function testNegBinomDistArray(\n        array $expectedResult,\n        string $failures,\n        string $successes,\n        string $probabilities\n    ): void {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=NEGBINOMDIST({$failures}, {$successes}, {$probabilities})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerNegBinomDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [[0.07508468627929688, 0.04301726818084717], [0.04503981303423643, 0.05629976629279554]],\n                '{7; 12}',\n                '{3, 5}',\n                '0.25',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass NormDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNORMDIST')]\n    public function testNORMDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('NORMDIST', $expectedResult, ...$args);\n    }\n\n    public static function providerNORMDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/NORMDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNormDistArray')]\n    public function testNormDistArray(array $expectedResult, string $values, string $mean, string $stdDev): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=NORMDIST({$values}, {$mean}, {$stdDev}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerNormDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.04324582990797181, 0.03549422283581691, 0.026885636057682592],\n                    [0.07365402806066465, 0.038837210996642585, 0.015790031660178828],\n                    [0.12098536225957167, 0.0022159242059690033, 7.991870553452737E-6],\n                ],\n                '12',\n                '{10, 6, 3}',\n                '{9; 5; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass NormInvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNORMINV')]\n    public function testNORMINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('NORMINV', $expectedResult, ...$args);\n    }\n\n    public static function providerNORMINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/NORMINV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNormInvArray')]\n    public function testNormInvArray(array $expectedResult, string $probabilities, string $mean, string $stdDev): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=NORMINV({$probabilities}, {$mean}, {$stdDev})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerNormInvArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [2.651020499553155, 4.651020499553155],\n                    [1.9765307493297324, 3.9765307493297324],\n                    [-0.7214282515639576, 1.2785717484360424],\n                ],\n                '0.25',\n                '{4, 6}',\n                '{2; 3; 7}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass NormSDist2Test extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNORMSDIST2')]\n    public function testNORMSDIST2(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('NORM.S.DIST', $expectedResult, ...$args);\n    }\n\n    public static function providerNORMSDIST2(): array\n    {\n        return require 'tests/data/Calculation/Statistical/NORMSDIST2.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNormSDist2Array')]\n    public function testNormSDist2Array(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=NORM.S.DIST({$values}, true)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerNormSDist2Array(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.3085375387259869, 0.7733726476231317],\n                    [0.99865010196837, 1.0],\n                ],\n                '{-0.5, 0.75; 3, 12.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass NormSDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNORMSDIST')]\n    public function testNORMSDIST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('NORMSDIST', $expectedResult, ...$args);\n    }\n\n    public static function providerNORMSDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/NORMSDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNormSDistArray')]\n    public function testNormSDistArray(array $expectedResult, string $values): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=NORMSDIST({$values})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerNormSDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.3085375387259869, 0.7733726476231317],\n                    [0.99865010196837, 1.0],\n                ],\n                '{-0.5, 0.75; 3, 12.5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass NormSInvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNORMSINV')]\n    public function testNORMSINV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('NORMSINV', $expectedResult, ...$args);\n    }\n\n    public static function providerNORMSINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/NORMSINV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNormSInvArray')]\n    public function testNormSInvArray(array $expectedResult, string $probabilities): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=NORMSINV({$probabilities})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerNormSInvArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    ['#NUM!', -1.959963986120195],\n                    [-0.3853204662702544, 0.6744897502234225],\n                ],\n                '{-0.75, 0.025; 0.35, 0.75}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentRankTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass PercentRankTest extends AllSetupTeardown\n{\n    /**\n     * @param mixed[] $valueSet\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPERCENTRANK')]\n    public function testPERCENTRANK(mixed $expectedResult, mixed $valueSet, mixed $value, mixed $digits = null): void\n    {\n        if ($digits === null) {\n            $this->runTestCaseReference('PERCENTRANK', $expectedResult, $valueSet, $value);\n        } else {\n            $this->runTestCaseReference('PERCENTRANK', $expectedResult, $valueSet, $value, $digits);\n        }\n    }\n\n    public static function providerPERCENTRANK(): array\n    {\n        return require 'tests/data/Calculation/Statistical/PERCENTRANK.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentileTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass PercentileTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPERCENTILE')]\n    public function testPERCENTILE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('PERCENTILE', $expectedResult, ...$args);\n    }\n\n    public static function providerPERCENTILE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/PERCENTILE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass PermutTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPERMUT')]\n    public function testPERMUT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('PERMUT', $expectedResult, ...$args);\n    }\n\n    public static function providerPERMUT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/PERMUT.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPermutArray')]\n    public function testPermutArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=PERMUT({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerPermutArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[336, 60]],\n                '{8, 5}',\n                '3',\n            ],\n            'first argument column vector' => [\n                [[336], [60]],\n                '{8; 5}',\n                '3',\n            ],\n            'first argument matrix' => [\n                [[336, 60], [6, 210]],\n                '{8, 5; 3, 7}',\n                '3',\n            ],\n            'second argument row vector' => [\n                [[1716, 1235520]],\n                '13',\n                '{3, 6}',\n            ],\n            'second argument column vector' => [\n                [[1716], [1235520]],\n                '13',\n                '{3; 6}',\n            ],\n            'second argument matrix' => [\n                [[1716, 1235520], [17160, 51891840]],\n                '13',\n                '{3, 6; 4, 8}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [95040, 11880, 1320, 132],\n                    [30240, 5040, 720, 90],\n                    [6720, 1680, 336, 56],\n                    [720, 360, 120, 30],\n                ],\n                '{12; 10; 8; 6}',\n                '{5, 4, 3, 2}',\n            ],\n            'Two row vectors' => [\n                [[95040, 5040, 336, 30]],\n                '{12, 10, 8, 6}',\n                '{5, 4, 3, 2}',\n            ],\n            'Two column vectors' => [\n                [[95040], [5040], [336], [30]],\n                '{12; 10; 8; 6}',\n                '{5; 4; 3; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass PermutationATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPERMUT')]\n    public function testPERMUT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('PERMUTATIONA', $expectedResult, ...$args);\n    }\n\n    public static function providerPERMUT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/PERMUTATIONA.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPermutationAArray')]\n    public function testPermutationAArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=PERMUTATIONA({$argument1},{$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerPermutationAArray(): array\n    {\n        return [\n            'first argument row vector' => [\n                [[512, 125]],\n                '{8, 5}',\n                '3',\n            ],\n            'first argument column vector' => [\n                [[512], [125]],\n                '{8; 5}',\n                '3',\n            ],\n            'first argument matrix' => [\n                [[512, 125], [27, 343]],\n                '{8, 5; 3, 7}',\n                '3',\n            ],\n            'second argument row vector' => [\n                [[2197, 4826809]],\n                '13',\n                '{3, 6}',\n            ],\n            'second argument column vector' => [\n                [[2197], [4826809]],\n                '13',\n                '{3; 6}',\n            ],\n            'second argument matrix' => [\n                [[2197, 4826809], [28561, 815730721]],\n                '13',\n                '{3, 6; 4, 8}',\n            ],\n            'A row and a column vector' => [\n                [\n                    [248832, 20736, 1728, 144],\n                    [100000, 10000, 1000, 100],\n                    [32768, 4096, 512, 64],\n                    [7776, 1296, 216, 36],\n                ],\n                '{12; 10; 8; 6}',\n                '{5, 4, 3, 2}',\n            ],\n            'Two row vectors' => [\n                [[248832, 10000, 512, 36]],\n                '{12, 10, 8, 6}',\n                '{5, 4, 3, 2}',\n            ],\n            'Two column vectors' => [\n                [[248832], [10000], [512], [36]],\n                '{12; 10; 8; 6}',\n                '{5; 4; 3; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass PoissonTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPOISSON')]\n    public function testPOISSON(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('POISSON', $expectedResult, ...$args);\n    }\n\n    public static function providerPOISSON(): array\n    {\n        return require 'tests/data/Calculation/Statistical/POISSON.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPoissonArray')]\n    public function testPoissonArray(array $expectedResult, string $values, string $mean): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=POISSON({$values}, {$mean}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerPoissonArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.4749316557209494, 0.41547307344655265, 0.028388126533408903],\n                    [0.3081373033023279, 0.3299417281086086, 0.0867439330307142],\n                    [0.14758417287196898, 0.19139299302082188, 0.1804470443154836],\n                ],\n                '{0.125, 0.5, 3}',\n                '{0.7; 1.2; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/QuartileTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass QuartileTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerQUARTILE')]\n    public function testQUARTILE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('QUARTILE', $expectedResult, ...$args);\n    }\n\n    public static function providerQUARTILE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/QUARTILE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RankTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass RankTest extends AllSetupTeardown\n{\n    /**\n     * @param mixed[] $valueSet\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRANK')]\n    public function testRANK(mixed $expectedResult, mixed $value, array $valueSet, mixed $order = null): void\n    {\n        if ($order === null) {\n            $this->runTestCaseReference('RANK', $expectedResult, $value, $valueSet);\n        } else {\n            $this->runTestCaseReference('RANK', $expectedResult, $value, $valueSet, $order);\n        }\n    }\n\n    public static function providerRANK(): array\n    {\n        return require 'tests/data/Calculation/Statistical/RANK.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RsqTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass RsqTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRSQ')]\n    public function testRSQ(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('RSQ', $expectedResult, ...$args);\n    }\n\n    public static function providerRSQ(): array\n    {\n        return require 'tests/data/Calculation/Statistical/RSQ.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SkewTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SkewTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerSKEW')]\n    public function testSKEW(mixed $expectedResult, array $args): void\n    {\n        $this->returnArrayAs = Calculation::RETURN_ARRAY_AS_VALUE;\n        $this->runTestCaseReference('SKEW', $expectedResult, ...$args);\n    }\n\n    public static function providerSKEW(): array\n    {\n        return require 'tests/data/Calculation/Statistical/SKEW.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SlopeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass SlopeTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSLOPE')]\n    public function testSLOPE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseNoBracket('SLOPE', $expectedResult, ...$args);\n    }\n\n    public static function providerSLOPE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/SLOPE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SmallTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass SmallTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSMALL')]\n    public function testSMALL(mixed $expectedResult, mixed $values, mixed $position): void\n    {\n        $this->runTestCaseReference('SMALL', $expectedResult, $values, $position);\n    }\n\n    public static function providerSMALL(): array\n    {\n        return require 'tests/data/Calculation/Statistical/SMALL.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass StDevATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSTDEVA')]\n    public function testSTDEVA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('STDEVA', $expectedResult, ...$args);\n    }\n\n    public static function providerSTDEVA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STDEVA.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOdsSTDEVA')]\n    public function testOdsSTDEVA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        $this->runTestCaseReference('STDEVA', $expectedResult, ...$args);\n    }\n\n    public static function providerOdsSTDEVA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STDEVA_ODS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass StDevPATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSTDEVPA')]\n    public function testSTDEVPA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('STDEVPA', $expectedResult, ...$args);\n    }\n\n    public static function providerSTDEVPA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STDEVPA.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOdsSTDEVPA')]\n    public function testOdsSTDEVPA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        $this->runTestCaseReference('STDEVPA', $expectedResult, ...$args);\n    }\n\n    public static function providerOdsSTDEVPA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STDEVPA_ODS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass StDevPTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSTDEVP')]\n    public function testSTDEVP(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('STDEVP', $expectedResult, ...$args);\n    }\n\n    public static function providerSTDEVP(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STDEVP.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOdsSTDEVP')]\n    public function testOdsSTDEVP(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        $this->runTestCaseReference('STDEVP', $expectedResult, ...$args);\n    }\n\n    public static function providerOdsSTDEVP(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STDEVP_ODS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass StDevTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSTDEV')]\n    public function testSTDEV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('STDEV', $expectedResult, ...$args);\n    }\n\n    public static function providerSTDEV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STDEV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOdsSTDEV')]\n    public function testOdsSTDEV(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        $this->runTestCaseReference('STDEV', $expectedResult, ...$args);\n    }\n\n    public static function providerOdsSTDEV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STDEV_ODS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass StandardizeTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSTANDARDIZE')]\n    public function testSTANDARDIZE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('STANDARDIZE', $expectedResult, ...$args);\n    }\n\n    public static function providerSTANDARDIZE(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STANDARDIZE.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerStandardizeArray')]\n    public function testStandardizeArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=STANDARDIZE({$argument1}, {$argument2}, {$argument3})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerStandardizeArray(): array\n    {\n        return [\n            'row vector' => [[[-1.6666666666666667, -4.6666666666666667, -7.333333333333333, -10, -11.333333333333334]], '{12.5, 8, 4, 0, -2}', '15', '1.5'],\n            'column vector' => [[[0.25], [0.0], [-1.0]], '{5.5; 5; 3}', '5.0', '2.0'],\n            'matrix' => [[[0.25, -1.0], [-1.75, -2.75]], '{5.5, 3; 1.5, -0.5}', '5.0', '2.0'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SteyxTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SteyxTest extends AllSetupTeardown\n{\n    /**\n     * @param mixed[] $xargs\n     * @param mixed[] $yargs\n     */\n    #[DataProvider('providerSTEYX')]\n    public function testSTEYX(mixed $expectedResult, array $xargs, array $yargs): void\n    {\n        //$result = Statistical\\Trends::STEYX($xargs, $yargs);\n        //self::assertEqualsWithDelta($expectedResult, $result, 1E-12);\n        $this->runTestCaseReference('STEYX', $expectedResult, $xargs, $yargs);\n    }\n\n    public static function providerSTEYX(): array\n    {\n        return require 'tests/data/Calculation/Statistical/STEYX.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDist2TTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TDist2TTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTDIST2T')]\n    public function testTDIST2T(mixed $expectedResult, mixed $value, mixed $degrees): void\n    {\n        $this->runTestCaseReference('T.DIST.2T', $expectedResult, $value, $degrees);\n    }\n\n    public static function providerTDIST2T(): array\n    {\n        return require 'tests/data/Calculation/Statistical/TDIST2T.php';\n    }\n\n    #[DataProvider('providerTDistArray')]\n    public function testTDist2TArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=T.DIST.2T({$values}, {$degrees})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n    }\n\n    public static function providerTDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.295167, 0.13932596855884327, 0.08051623795726259],\n                ],\n                '2',\n                '{1.5, 3.5, 8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistRTTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TDistRTTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTDISTRT')]\n    public function testTDISTRT(mixed $expectedResult, mixed $value, mixed $degrees): void\n    {\n        $this->runTestCaseReference('T.DIST.RT', $expectedResult, $value, $degrees);\n    }\n\n    public static function providerTDISTRT(): array\n    {\n        return require 'tests/data/Calculation/Statistical/TDISTRT.php';\n    }\n\n    #[DataProvider('providerTDistRTArray')]\n    public function testTDistRTArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=T.DIST.RT({$values}, {$degrees})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n    }\n\n    public static function providerTDistRTArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.147584, 0.06966298427942164, 0.040258118978631297],\n                ],\n                '2',\n                '{1.5, 3.5, 8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass TDistTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTDIST')]\n    public function testTDIST(mixed $expectedResult, mixed $value, mixed $degrees, mixed $tails): void\n    {\n        $this->runTestCaseReference('TDIST', $expectedResult, $value, $degrees, $tails);\n    }\n\n    public static function providerTDIST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/TDIST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTDistArray')]\n    public function testTDistArray(array $expectedResult, string $values, string $degrees, string $tails): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TDIST({$values}, {$degrees}, {$tails})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n    }\n\n    public static function providerTDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.147584, 0.06966298427942164, 0.040258118978631297],\n                    [0.295167, 0.13932596855884327, 0.08051623795726259],\n                ],\n                '2',\n                '{1.5, 3.5, 8}',\n                '{1; 2}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDotInvDot2TTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\n// Note that TINV and T.INV.2T should return same results,\n// so this member just borrows the TINV data.\nclass TDotInvDot2TTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTINV')]\n    public function testTdotINV(mixed $expectedResult, mixed $probability, mixed $degrees): void\n    {\n        $this->runTestCaseReference('T.INV.2T', $expectedResult, $probability, $degrees);\n    }\n\n    public static function providerTINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/TINV.php';\n    }\n\n    #[DataProvider('providerTInvArray')]\n    public function testTInvArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=T.INV.2T({$values}, {$degrees})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-9);\n    }\n\n    public static function providerTInvArray(): array\n    {\n        return [\n            'row vector' => [\n                [\n                    [0.612800788, 0.5023133547575189, 0.4713169827948964],\n                ],\n                '0.65',\n                '{1.5, 3.5, 8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDotInvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TDotInvTest extends AllSetupTeardown\n{\n    /**\n     * @var false|string\n     */\n    private $currentLocale;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n        $this->currentLocale = setlocale(LC_ALL, '0');\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n        if (is_string($this->currentLocale)) {\n            setlocale(LC_ALL, $this->currentLocale);\n        }\n    }\n\n    #[DataProvider('providerTdotINV')]\n    public function testTdotINV(mixed $expectedResult, mixed $probability, mixed $degrees): void\n    {\n        $this->runTestCaseReference('T.INV', $expectedResult, $probability, $degrees);\n    }\n\n    #[DataProvider('providerTdotINV')]\n    public function testTdotINVLocale(mixed $expectedResult, mixed $probability, mixed $degrees): void\n    {\n        if (!setlocale(LC_ALL, 'fr_FR.UTF-8', 'fra_fra.utf8')) {\n            self::markTestSkipped('Unable to set locale for testing.');\n        }\n        $this->runTestCaseReference('T.INV', $expectedResult, $probability, $degrees);\n    }\n\n    public static function providerTdotINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/TdotINV.php';\n    }\n\n    #[DataProvider('providerTInvArray')]\n    public function testTInvArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=T.INV({$values}, {$degrees})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n    }\n\n    public static function providerTInvArray(): array\n    {\n        return [\n            'row vector' => [\n                [\n                    [0.509525, 0.424202, 0.399469],\n                ],\n                '0.65',\n                '{1.5, 3.5, 8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TdotDistFalseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TdotDistFalseTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTdotDistFalse')]\n    public function testTdotDistFalse(mixed $expectedResult, mixed $value, mixed $degrees): void\n    {\n        $this->runTestCaseReference('T.DIST', $expectedResult, $value, $degrees, false);\n    }\n\n    public static function providerTdotDistFalse(): array\n    {\n        return require 'tests/data/Calculation/Statistical/tDotDistFalse.php';\n    }\n\n    #[DataProvider('providerTdotDistArray')]\n    public function testTdotDistArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=T.DIST({$values}, {$degrees}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n    }\n\n    public static function providerTdotDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.063662, 0.0675096606638932, 0.06236808463468194],\n                ],\n                '2',\n                '{1.5, 3.5, 8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TdotDistTrueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TdotDistTrueTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTdotDistTrue')]\n    public function testTdotDistTrue(mixed $expectedResult, mixed $value, mixed $degrees): void\n    {\n        $this->runTestCaseReference('T.DIST', $expectedResult, $value, $degrees, true);\n    }\n\n    public static function providerTdotDistTrue(): array\n    {\n        return require 'tests/data/Calculation/Statistical/tDotDistTrue.php';\n    }\n\n    #[DataProvider('providerTdotDistArray')]\n    public function testTdotDistArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=T.DIST({$values}, {$degrees}, true)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);\n    }\n\n    public static function providerTdotDistArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.852416, 0.930337, 0.959742],\n                ],\n                '2',\n                '{1.5, 3.5, 8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass TinvTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTINV')]\n    public function testTINV(mixed $expectedResult, mixed $probability, mixed $degrees): void\n    {\n        $this->runTestCaseReference('TINV', $expectedResult, $probability, $degrees);\n    }\n\n    public static function providerTINV(): array\n    {\n        return require 'tests/data/Calculation/Statistical/TINV.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTInvArray')]\n    public function testTInvArray(array $expectedResult, string $values, string $degrees): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TINV({$values}, {$degrees})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-9);\n    }\n\n    public static function providerTInvArray(): array\n    {\n        return [\n            'row vector' => [\n                [\n                    [0.612800788, 0.5023133547575189, 0.4713169827948964],\n                ],\n                '0.65',\n                '{1.5, 3.5, 8}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrendTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\n// TODO Run test in spreadsheet context.\nclass TrendTest extends TestCase\n{\n    /**\n     * @param mixed[] $yValues\n     * @param mixed[] $xValues\n     * @param null|mixed[] $newValues\n     */\n    #[DataProvider('providerGROWTH')]\n    public function testTREND(mixed $expectedResult, array $yValues, array $xValues, ?array $newValues = null, ?bool $const = null): void\n    {\n        if ($newValues === null) {\n            $result = Statistical\\Trends::TREND($yValues, $xValues);\n        } elseif ($const === null) {\n            $result = Statistical\\Trends::TREND($yValues, $xValues, $newValues);\n        } else {\n            $result = Statistical\\Trends::TREND($yValues, $xValues, $newValues, $const);\n        }\n\n        self::assertEqualsWithDelta($expectedResult, $result[0], 1E-12);\n    }\n\n    public static function providerGROWTH(): array\n    {\n        return require 'tests/data/Calculation/Statistical/TREND.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrimMeanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TrimMeanTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerTRIMMEAN')]\n    public function testTRIMMEAN(mixed $expectedResult, array $args, mixed $percentage): void\n    {\n        $this->runTestCaseReference('TRIMMEAN', $expectedResult, $args, $percentage);\n    }\n\n    public static function providerTRIMMEAN(): array\n    {\n        return require 'tests/data/Calculation/Statistical/TRIMMEAN.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass VarATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerVARA')]\n    public function testVARA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('VARA', $expectedResult, ...$args);\n    }\n\n    public static function providerVARA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/VARA.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOdsVARA')]\n    public function testOdsVARA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        $this->runTestCases('VARA', $expectedResult, ...$args);\n    }\n\n    public static function providerOdsVARA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/VARA_ODS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPATest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass VarPATest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerVARPA')]\n    public function testVARPA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('VARPA', $expectedResult, ...$args);\n    }\n\n    public static function providerVARPA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/VARPA.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOdsVARPA')]\n    public function testOdsVARPA(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        $this->runTestCases('VARPA', $expectedResult, ...$args);\n    }\n\n    public static function providerOdsVARPA(): array\n    {\n        return require 'tests/data/Calculation/Statistical/VARPA_ODS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass VarPTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerVARP')]\n    public function testVARP(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('VARP', $expectedResult, ...$args);\n    }\n\n    public static function providerVARP(): array\n    {\n        return require 'tests/data/Calculation/Statistical/VARP.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOdsVARP')]\n    public function testOdsVARP(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        $this->runTestCases('VARP', $expectedResult, ...$args);\n    }\n\n    public static function providerOdsVARP(): array\n    {\n        return require 'tests/data/Calculation/Statistical/VARP_ODS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nclass VarTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerVAR')]\n    public function testVAR(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('VAR', $expectedResult, ...$args);\n    }\n\n    public static function providerVAR(): array\n    {\n        return require 'tests/data/Calculation/Statistical/VAR.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOdsVAR')]\n    public function testOdsVAR(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->setOpenOffice();\n        $this->runTestCases('VAR', $expectedResult, ...$args);\n    }\n\n    public static function providerOdsVAR(): array\n    {\n        return require 'tests/data/Calculation/Statistical/VAR_ODS.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass WeibullTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerWEIBULL')]\n    public function testWEIBULL(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCases('WEIBULL', $expectedResult, ...$args);\n    }\n\n    public static function providerWEIBULL(): array\n    {\n        return require 'tests/data/Calculation/Statistical/WEIBULL.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerWeibullArray')]\n    public function testWeibullArray(array $expectedResult, string $values, string $alpha, string $beta): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=WEIBULL({$values}, {$alpha}, {$beta}, false)\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerWeibullArray(): array\n    {\n        return [\n            'row/column vectors' => [\n                [\n                    [0.18393972058572117, 0.36787944117144233, 0.9196986029286058],\n                    [0.15163266492815836, 0.19470019576785122, 0.07572134644346439],\n                    [0.13406400920712788, 0.1363430062345938, 0.0253391936076857],\n                ],\n                '2',\n                '{1, 2, 5}',\n                '{2; 4; 5}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Statistical;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\n\nclass ZTestTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerZTEST')]\n    public function testZTEST(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->runTestCaseReference('ZTEST', $expectedResult, ...$args);\n    }\n\n    public static function providerZTEST(): array\n    {\n        return require 'tests/data/Calculation/Statistical/ZTEST.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerZTestArray')]\n    public function testZTestArray(array $expectedResult, string $dataSet, string $m0): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=ZTEST({$dataSet}, {$m0})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerZTestArray(): array\n    {\n        return [\n            'row vector' => [\n                [\n                    [0.09057419685136381, 0.4516213175273426, 0.8630433891295299],\n                ],\n                '{3, 6, 7, 8, 6, 5, 4, 2, 1, 9}',\n                '{4, 5, 6}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/AllSetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AllSetupTeardown extends TestCase\n{\n    private string $compatibilityMode;\n\n    private string $locale;\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected function setUp(): void\n    {\n        $this->locale = Settings::getLocale();\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        Settings::setLocale($this->locale);\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected static function setOpenOffice(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n    }\n\n    protected static function setGnumeric(): void\n    {\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_GNUMERIC);\n    }\n\n    protected function mightHaveException(mixed $expectedResult): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(CalcException::class);\n        }\n    }\n\n    protected function setCell(string $cell, mixed $value): void\n    {\n        if ($value !== null) {\n            if (is_string($value) && is_numeric($value)) {\n                $this->getSheet()->getCell($cell)->setValueExplicit($value, DataType::TYPE_STRING);\n            } else {\n                $this->getSheet()->getCell($cell)->setValue($value);\n            }\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ArrayToTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ArrayToTextTest extends AllSetupTeardown\n{\n    /** @param mixed[] $testData */\n    #[DataProvider('providerARRAYTOTEXT')]\n    public function testArrayToText(string $expectedResult, array $testData, int $mode): void\n    {\n        $worksheet = $this->getSheet();\n        $worksheet->fromArray($testData, null, 'A1', true);\n        $worksheet->getCell('H1')->setValue(\"=ARRAYTOTEXT(A1:C5, {$mode})\");\n\n        $result = $worksheet->getCell('H1')->getCalculatedValue();\n        $b1SimpleCast = '12345.6789';\n        $b1AccurateCast = StringHelper::convertToString(12345.6789);\n        $expectedResult = str_replace($b1SimpleCast, $b1AccurateCast, $expectedResult);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerARRAYTOTEXT(): array\n    {\n        return require 'tests/data/Calculation/TextData/ARRAYTOTEXT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/BahtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BahtTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBAHTTEXT')]\n    public function testBAHTTEXT(mixed $expectedResult, bool|string|float|int $number): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        if (is_bool($number)) {\n            $formulaValue = $number ? 'TRUE' : 'FALSE';\n        } elseif (is_string($number)) {\n            $formulaValue = '\"' . $number . '\"';\n        } else {\n            $formulaValue = (string) $number;\n        }\n\n        $sheet->getCell('A1')->setValue('=BAHTTEXT(' . $formulaValue . ')');\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n\n        self::assertSame($expectedResult, $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerBAHTTEXT(): array\n    {\n        return require 'tests/data/Calculation/TextData/BAHTTEXT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharNonPrintableTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass CharNonPrintableTest extends AbstractFunctional\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerType')]\n    public function testNotPrintable(string $type): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B1')->setValue('=CHAR(2)');\n        $sheet->getCell('C1')->setValue('=CHAR(127)');\n        $hello = \"hello\\nthere\";\n        $sheet->getCell('D2')->setValue($hello);\n        $sheet->getCell('D1')->setValue('=D2');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        $result = $reloadedSpreadsheet->getActiveSheet()->getCell('B1')->getCalculatedValue();\n        self::assertEquals(\"\\x02\", $result);\n        $result = $reloadedSpreadsheet->getActiveSheet()->getCell('C1')->getCalculatedValue();\n        self::assertEquals(\"\\x7f\", $result);\n        $result = $reloadedSpreadsheet->getActiveSheet()->getCell('D1')->getCalculatedValue();\n        self::assertEquals($hello, $result);\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerType(): array\n    {\n        return [\n            ['Xlsx'],\n            ['Xls'],\n            //['Ods'], // no support yet in Reader or Writer\n            // without csv suffix, Reader/Csv decides type via mime_get_type,\n            //   and control character makes it guess application/octet-stream,\n            //   so Reader/Csv decides it can't read it.\n            //['Csv'],\n            // DOMDocument.loadHTML() rejects '&#2;' even though legal html.\n            //['Html'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert as CC;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass CharTest extends AllSetupTeardown\n{\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n        CC::setWindowsCharacterSet();\n    }\n\n    #[DataProvider('providerCHAR')]\n    public function testCHAR(mixed $expectedResult, mixed $character = 'omitted'): void\n    {\n        // If expected is array, 1st is for CHAR, 2nd for UNICHAR,\n        // 3rd is for Mac CHAR if different from Windows.\n        if (is_array($expectedResult)) {\n            $expectedResult = $expectedResult[0];\n        }\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($character === 'omitted') {\n            $sheet->getCell('B1')->setValue('=CHAR()');\n        } else {\n            $this->setCell('A1', $character);\n            $sheet->getCell('B1')->setValue('=CHAR(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerCHAR')]\n    public function testMacCHAR(mixed $expectedResult, mixed $character = 'omitted'): void\n    {\n        CC::setMacCharacterSet();\n        // If expected is array, 1st is for CHAR, 2nd for UNICHAR,\n        // 3rd is for Mac CHAR if different from Windows.\n        if (is_array($expectedResult)) {\n            $expectedResult = $expectedResult[2] ?? $expectedResult[0];\n        }\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($character === 'omitted') {\n            $sheet->getCell('B1')->setValue('=CHAR()');\n        } else {\n            $this->setCell('A1', $character);\n            $sheet->getCell('B1')->setValue('=CHAR(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCHAR(): array\n    {\n        return require 'tests/data/Calculation/TextData/CHAR.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerCharArray')]\n    public function testCharArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CHAR({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerCharArray(): array\n    {\n        return [\n            'row vector' => [[['P', 'H', 'P']], '{80, 72, 80}'],\n            'column vector' => [[['P'], ['H'], ['P']], '{80; 72; 80}'],\n            'matrix' => [[['Y', 'o'], ['l', 'o']], '{89, 111; 108, 111}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass CleanTest extends AllSetupTeardown\n{\n    #[DataProvider('providerCLEAN')]\n    public function testCLEAN(mixed $expectedResult, mixed $value = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($value === 'omitted') {\n            $sheet->getCell('B1')->setValue('=CLEAN()');\n        } else {\n            $this->setCell('A1', $value);\n            $sheet->getCell('B1')->setValue('=CLEAN(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCLEAN(): array\n    {\n        return require 'tests/data/Calculation/TextData/CLEAN.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerCleanArray')]\n    public function testCleanArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CLEAN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerCleanArray(): array\n    {\n        return [\n            'row vector' => [[['PHP', 'MS Excel', 'Open/Libre Office']], '{\"P\u0007H\u0007P\", \"\u0005MS\u0005 \u0005Excel\u0005\", \"Open\u0006/\u0006Libre Office\"}'],\n            'column vector' => [[['PHP'], ['MS Excel'], ['Open/Libre Office']], '{\"P\u0007H\u0007P\"; \"\u0005\u0005MS Excel\"; \"Open\u0006/\u0006Libre Office\"}'],\n            'matrix' => [[['PHP', 'MS Excel'], ['PhpSpreadsheet', 'Open/Libre Office']], '{\"P\u0007H\u0007P\", \"\u0005MS Excel\"; \"Php\u0005Spreadsheet\", \"Open\u0006/\u0006Libre Office\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\CharacterConvert as CC;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass CodeTest extends AllSetupTeardown\n{\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n        CC::setWindowsCharacterSet();\n    }\n\n    #[DataProvider('providerCODE')]\n    public function testCODE(mixed $expectedResult, mixed $character = 'omitted'): void\n    {\n        // If expected is array, 1st is for CODE, 2nd for UNICODE,\n        // 3rd is for Mac CODE if different from Windows.\n        if (is_array($expectedResult)) {\n            $expectedResult = $expectedResult[0];\n        }\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($character === 'omitted') {\n            $sheet->getCell('B1')->setValue('=CODE()');\n        } else {\n            $this->setCell('A1', $character);\n            $sheet->getCell('B1')->setValue('=CODE(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('providerCODE')]\n    public function testMacCODE(mixed $expectedResult, mixed $character = 'omitted'): void\n    {\n        CC::setMacCharacterSet();\n        // If expected is array, 1st is for CODE, 2nd for UNICODE,\n        // 3rd is for Mac CODE if different from Windows.\n        if (is_array($expectedResult)) {\n            $expectedResult = $expectedResult[2] ?? $expectedResult[0];\n        }\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($character === 'omitted') {\n            $sheet->getCell('B1')->setValue('=CODE()');\n        } else {\n            $this->setCell('A1', $character);\n            $sheet->getCell('B1')->setValue('=CODE(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCODE(): array\n    {\n        return require 'tests/data/Calculation/TextData/CODE.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerCodeArray')]\n    public function testCodeArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=CODE({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerCodeArray(): array\n    {\n        return [\n            'row vector' => [[[80, 72, 80]], '{\"P\", \"H\", \"P\"}'],\n            'column vector' => [[[80], [72], [80]], '{\"P\"; \"H\"; \"P\"}'],\n            'matrix' => [[[89, 111], [108, 111]], '{\"Y\", \"o\"; \"l\", \"o\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass ConcatTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCONCAT')]\n    public function testCONCAT(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $finalArg = '';\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            $this->setCell(\"A$row\", $arg);\n            $finalArg = \"A1:A$row\";\n        }\n        $this->setCell('B1', \"=CONCAT($finalArg)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCONCAT(): array\n    {\n        return require 'tests/data/Calculation/TextData/CONCAT.php';\n    }\n\n    public function testConcatWithIndexMatch(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Formula');\n        $sheet1->fromArray(\n            [\n                ['Number', 'Formula'],\n                [52101293, '=CONCAT(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)))'],\n            ]\n        );\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Lookup');\n        $sheet2->fromArray(\n            [\n                ['Lookup', 'Match'],\n                [52101293, 'PHP'],\n            ]\n        );\n        self::assertSame('PHP', $sheet1->getCell('B2')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateGnumericTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass ConcatenateGnumericTest extends AllSetupTeardown\n{\n    /**\n     * Gnumeric, unlike Excel or LibreOffice, implements CONCATENATE like CONCAT.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCONCAT')]\n    public function testCONCATENATE(mixed $expectedResult, mixed ...$args): void\n    {\n        self::setGnumeric();\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $finalArg = '';\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            $this->setCell(\"A$row\", $arg);\n            $finalArg = \"A1:A$row\";\n        }\n        $this->setCell('B1', \"=CONCATENATE($finalArg)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCONCAT(): array\n    {\n        return require 'tests/data/Calculation/TextData/CONCAT.php';\n    }\n\n    public function testConcatWithIndexMatch(): void\n    {\n        self::setGnumeric();\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Formula');\n        $sheet1->fromArray(\n            [\n                ['Number', 'Formula'],\n                [52101293, '=CONCATENATE(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)))'],\n            ]\n        );\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Lookup');\n        $sheet2->fromArray(\n            [\n                ['Lookup', 'Match'],\n                [52101293, 'PHP'],\n            ]\n        );\n        self::assertSame('PHP', $sheet1->getCell('B2')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\n\nclass ConcatenateRangeTest extends AllSetupTeardown\n{\n    public function testIssue4061(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('a');\n        $sheet->getCell('A2')->setValue('b');\n        $sheet->getCell('A3')->setValue('c');\n        $sheet->getCell('C1')->setValue('1');\n        $sheet->getCell('C2')->setValue('2');\n        $sheet->getCell('C3')->setValue('3');\n        $sheet->getCell('B1')->setValue('=CONCATENATE(A1:A3, \"-\", C1:C3)');\n        Calculation::getInstance($this->getSpreadsheet())\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_VALUE\n            );\n        self::assertSame('a-1', $sheet->getCell('B1')->getCalculatedValue());\n        $sheet->getCell('X1')->setValue('=A1:A3&\"-\"&C1:C3');\n        self::assertSame('a-1', $sheet->getCell('X1')->getCalculatedValue());\n        $sheet->getCell('D1')->setValue('=CONCAT(A1:A3, \"-\", C1:C3)');\n        self::assertSame('abc-123', $sheet->getCell('D1')->getCalculatedValue());\n        Calculation::getInstance($this->getSpreadsheet())\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet->getCell('E1')->setValue('=CONCATENATE(A1:A3, \"-\", C1:C3)');\n        self::assertSame([['a-1'], ['b-2'], ['c-3']], $sheet->getCell('E1')->getCalculatedValue());\n        $sheet->getCell('Y1')->setValue('=A1:A3&\"-\"&C1:C3');\n        self::assertSame([['a-1'], ['b-2'], ['c-3']], $sheet->getCell('Y1')->getCalculatedValue());\n        $sheet->getCell('F1')->setValue('=CONCAT(A1:A3, \"-\", C1:C3)');\n        self::assertSame('abc-123', $sheet->getCell('F1')->getCalculatedValue());\n    }\n\n    public function testIssue4061Value(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('a');\n        $sheet->getCell('A2')->setValue('b');\n        $sheet->getCell('A3')->setValue('c');\n        $sheet->getCell('C1')->setValue('1');\n        $sheet->getCell('C2')->setValue('2');\n        $sheet->getCell('C3')->setValue('3');\n        $sheet->getCell('B1')->setValue('=CONCATENATE(A:A, \"-\", C:C)');\n        $sheet->getCell('B2')->setValue('=CONCATENATE(A:A, \"-\", C:C)');\n        $sheet->getCell('B3')->setValue('=CONCATENATE(A:A, \"-\", C:C)');\n        Calculation::getInstance($this->getSpreadsheet())\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_VALUE\n            );\n        self::assertSame('a-1', $sheet->getCell('B1')->getCalculatedValue());\n        self::assertSame('b-2', $sheet->getCell('B2')->getCalculatedValue());\n        self::assertSame('c-3', $sheet->getCell('B3')->getCalculatedValue());\n        $sheet->getCell('F1')\n            ->setValue('=CONCATENATE(\"X\", C2:C3, \"Y\")');\n        self::assertSame('#VALUE!', $sheet->getCell('F1')->getCalculatedValue(), 'row does not match range');\n    }\n\n    public function testConvertCellRangeEdgeCases(): void\n    {\n        $array1 = [\n            1 => ['A' => 'a', 'B' => 'd'],\n            'B' => ['A' => 'b', 'B' => 'e'],\n            3 => ['A' => 'c', 'B' => 'f'],\n        ];\n        self::assertSame('', Functions::convertArrayToCellRange($array1));\n        $array2 = [\n            1 => ['A' => 'a', 'B' => 'd'],\n            2 => ['A' => 'b', 6 => 'e'],\n            3 => ['A' => 'c', 'B' => 'f'],\n        ];\n        self::assertSame('', Functions::convertArrayToCellRange($array2));\n        $array3 = [\n            1 => ['A' => 'a', 'B' => 'd'],\n            2 => ['A' => 'b', 'B' => 'e'],\n            3 => ['A' => 'c', 'B' => 'f'],\n        ];\n        self::assertSame('A1:B3', Functions::convertArrayToCellRange($array3));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ConcatenateTest extends AllSetupTeardown\n{\n    #[DataProvider('providerCONCATENATE')]\n    public function testCONCATENATE(mixed $expectedResult, mixed ...$args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $finalArg = '';\n        $comma = '';\n        foreach ($args as $arg) {\n            $finalArg .= $comma;\n            $comma = ',';\n            if (is_bool($arg)) {\n                $finalArg .= $arg ? 'true' : 'false';\n            } elseif ($arg === 'A2') {\n                $finalArg .= 'A2';\n                $sheet->getCell('A2')->setValue('=2/0');\n            } elseif ($arg === 'A3') {\n                $finalArg .= 'A3';\n                $sheet->getCell('A3')->setValue(str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5));\n            } else {\n                self::assertTrue($arg === null || is_scalar($arg));\n                $finalArg .= '\"' . (string) $arg . '\"';\n            }\n        }\n        $this->setCell('B1', \"=CONCATENATE($finalArg)\");\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testResultTooLong(): void\n    {\n        $sheet = $this->getSheet();\n        $string = str_repeat('x23456', 1000);\n        $sheet->getCell('A1')->setValue(\n            '=CONCATENATE('\n            . 'REPT(\"X\", 30000)'\n            . ',REPT(\"X\", 10000)'\n            . ')'\n        );\n        self::assertSame('#CALC!', $sheet->getCell('A1')->getCalculatedValue());\n    }\n\n    public static function providerCONCATENATE(): array\n    {\n        return require 'tests/data/Calculation/TextData/CONCATENATE.php';\n    }\n\n    public function testConcatenateWithIndexMatch(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Formula');\n        $sheet1->fromArray(\n            [\n                ['Number', 'Formula'],\n                [52101293, '=CONCATENATE(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)))'],\n            ]\n        );\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Lookup');\n        $sheet2->fromArray(\n            [\n                ['Lookup', 'Match'],\n                [52101293, 'PHP'],\n            ]\n        );\n        self::assertSame('PHP', $sheet1->getCell('B2')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass DollarTest extends AllSetupTeardown\n{\n    #[DataProvider('providerDOLLAR')]\n    public function testDOLLAR(mixed $expectedResult, mixed $amount = 'omitted', mixed $decimals = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($amount === 'omitted') {\n            $sheet->getCell('B1')->setValue('=DOLLAR()');\n        } elseif ($decimals === 'omitted') {\n            $this->setCell('A1', $amount);\n            $sheet->getCell('B1')->setValue('=DOLLAR(A1)');\n        } else {\n            $this->setCell('A1', $amount);\n            $this->setCell('A2', $decimals);\n            $sheet->getCell('B1')->setValue('=DOLLAR(A1, A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerDOLLAR(): array\n    {\n        return require 'tests/data/Calculation/TextData/DOLLAR.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerDollarArray')]\n    public function testDollarArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=DOLLAR({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerDollarArray(): array\n    {\n        return [\n            'row vector #1' => [[['-$123.32', '$123.46', '$12,345.68']], '{-123.321, 123.456, 12345.6789}', '2'],\n            'column vector #1' => [[['-$123.32'], ['$123.46'], ['$12,345.68']], '{-123.321; 123.456; 12345.6789}', '2'],\n            'matrix #1' => [[['-$123.46', '$12,345.68'], ['-$123.456', '$12,345.679']], '{-123.456, 12345.6789}', '{2; 3}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ErrorPropagationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nclass ErrorPropagationTest extends AllSetupTeardown\n{\n    public function testErrorPropagation(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('=ABS(\"X\")');\n        self::assertSame('#VALUE!', $sheet->getCell('A1')->getCalculatedValue());\n        $sheet->getCell('A2')->setValue('=SQRT(-1)');\n        self::assertSame('#NUM!', $sheet->getCell('A2')->getCalculatedValue());\n        $sheet->getCell('A3')->setValue('=3/0');\n        self::assertSame('#DIV/0!', $sheet->getCell('A3')->getCalculatedValue());\n        $sheet->getCell('A4')->setValue('=XXXX()');\n        self::assertSame('#NAME?', $sheet->getCell('A4')->getCalculatedValue());\n        $sheet->getCell('A5')->setValue('=ABS(\"X\")');\n        self::assertSame('#VALUE!', $sheet->getCell('A5')->getCalculatedValue());\n\n        $sheet->getCell('B1')->setValue('=UPPER(A1)');\n        self::assertSame('#VALUE!', $sheet->getCell('A1')->getCalculatedValue());\n        $sheet->getCell('B2')->setValue('=LOWER(A2)');\n        self::assertSame('#NUM!', $sheet->getCell('A2')->getCalculatedValue());\n        $sheet->getCell('B3')->setValue('=PROPER(A3)');\n        self::assertSame('#DIV/0!', $sheet->getCell('A3')->getCalculatedValue());\n\n        $sheet->getCell('C2')->setValue('=CHAR(A2)');\n        self::assertSame('#NUM!', $sheet->getCell('C2')->getCalculatedValue());\n        $sheet->getCell('C3')->setValue('=CODE(A3)');\n        self::assertSame('#DIV/0!', $sheet->getCell('C3')->getCalculatedValue());\n\n        $sheet->getCell('D1')->setValue('=CONCATENATE(A1,A1)');\n        self::assertSame('#VALUE!', $sheet->getCell('D1')->getCalculatedValue());\n        $sheet->getCell('D2')->setValue('=TEXTJOIN(\",\",TRUE,A2,A3)');\n        self::assertSame('#NUM!', $sheet->getCell('D2')->getCalculatedValue());\n        $sheet->getCell('D3')->setValue('=REPT(A3,3)');\n        self::assertSame('#DIV/0!', $sheet->getCell('D3')->getCalculatedValue());\n        $sheet->getCell('D4')->setValue('=CONCAT(A4,A4)');\n        self::assertSame('#NAME?', $sheet->getCell('D4')->getCalculatedValue());\n        $sheet->getCell('D5')->setValue('=\"X\"&A4');\n        self::assertSame('#NAME?', $sheet->getCell('D5')->getCalculatedValue());\n        $sheet->getCell('D6')->setValue('=A2&\"X\"');\n        self::assertSame('#NUM!', $sheet->getCell('D6')->getCalculatedValue());\n\n        $sheet->getCell('E1')->setValue('=LEFT(A1)');\n        self::assertSame('#VALUE!', $sheet->getCell('E1')->getCalculatedValue());\n        $sheet->getCell('E2')->setValue('=RIGHT(A2)');\n        self::assertSame('#NUM!', $sheet->getCell('E2')->getCalculatedValue());\n        $sheet->getCell('E3')->setValue('=MID(A3,2,2)');\n        self::assertSame('#DIV/0!', $sheet->getCell('E3')->getCalculatedValue());\n        $sheet->getCell('E4')->setValue('=TEXTBEFORE(A4,\"M\")');\n        self::assertSame('#NAME?', $sheet->getCell('E4')->getCalculatedValue());\n        $sheet->getCell('E5')->setValue('=TEXTAFTER(A5,\"U\")');\n        self::assertSame('#VALUE!', $sheet->getCell('E5')->getCalculatedValue());\n\n        $sheet->getCell('F1')->setValue('=VALUETOTEXT(A1)');\n        self::assertSame('#VALUE!', $sheet->getCell('F1')->getCalculatedValue());\n        $sheet->getCell('F2')->setValue('=DOLLAR(A2)');\n        self::assertSame('#NUM!', $sheet->getCell('F2')->getCalculatedValue());\n        $sheet->getCell('F3')->setValue('=FIXED(A3)');\n        self::assertSame('#DIV/0!', $sheet->getCell('E3')->getCalculatedValue());\n        $sheet->getCell('F4')->setValue('=TEXT(A4,\"M\")');\n        self::assertSame('#NAME?', $sheet->getCell('F4')->getCalculatedValue());\n        $sheet->getCell('F5')->setValue('=VALUE(A2)');\n        self::assertSame('#NUM!', $sheet->getCell('F5')->getCalculatedValue());\n        $sheet->getCell('F6')->setValue('=NUMBERVALUE(A3)');\n        self::assertSame('#DIV/0!', $sheet->getCell('F6')->getCalculatedValue());\n\n        $sheet->getCell('G1')->setValue('=REPLACE(\"oldtext\",2,2,A1)');\n        self::assertSame('#VALUE!', $sheet->getCell('G1')->getCalculatedValue());\n        $sheet->getCell('G2')->setValue('=SUBSTITUTE(A2,\"U\",\"V\")');\n        self::assertSame('#NUM!', $sheet->getCell('G2')->getCalculatedValue());\n\n        $sheet->getCell('H1')->setValue('=FIND(A1, \"U\")');\n        self::assertSame('#VALUE!', $sheet->getCell('H1')->getCalculatedValue());\n        $sheet->getCell('H2')->setValue('=SEARCH(A2,\"U\")');\n        self::assertSame('#NUM!', $sheet->getCell('H2')->getCalculatedValue());\n\n        $sheet->getCell('I1')->setValue('=LEN(A1)');\n        self::assertSame('#VALUE!', $sheet->getCell('I1')->getCalculatedValue());\n        $sheet->getCell('I2')->setValue('=EXACT(A2,A2)');\n        self::assertSame('#NUM!', $sheet->getCell('I2')->getCalculatedValue());\n        $sheet->getCell('I3')->setValue('=T(A3)');\n        self::assertSame('#DIV/0!', $sheet->getCell('I3')->getCalculatedValue());\n        $sheet->getCell('I4')->setValue('=TEXTSPLIT(A4,\"M\")');\n        self::assertSame('#NAME?', $sheet->getCell('I4')->getCalculatedValue());\n\n        $sheet->getCell('J1')->setValue('=TRIM(A1)');\n        self::assertSame('#VALUE!', $sheet->getCell('J1')->getCalculatedValue());\n        $sheet->getCell('J2')->setValue('=CLEAN(A2)');\n        self::assertSame('#NUM!', $sheet->getCell('J2')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ExactTest extends AllSetupTeardown\n{\n    #[DataProvider('providerEXACT')]\n    public function testEXACT(mixed $expectedResult, mixed $string1 = 'omitted', mixed $string2 = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($string1 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=EXACT()');\n        } elseif ($string2 === 'omitted') {\n            $this->setCell('A1', $string1);\n            $sheet->getCell('B1')->setValue('=EXACT(A1)');\n        } else {\n            $this->setCell('A1', $string1);\n            $this->setCell('A2', $string2);\n            $sheet->getCell('B1')->setValue('=EXACT(A1, A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerEXACT(): array\n    {\n        return require 'tests/data/Calculation/TextData/EXACT.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerExactArray')]\n    public function testExactArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=EXACT({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerExactArray(): array\n    {\n        return [\n            'row vector #1' => [[[true, false, false]], '{\"PHP\", \"php\", \"PHP8\"}', '\"PHP\"'],\n            'column vector #1' => [[[false], [true], [false]], '{\"php\"; \"PHP\"; \"PHP8\"}', '\"PHP\"'],\n            'matrix #1' => [[[false, true], [false, true]], '{\"TRUE\", \"FALSE\"; TRUE, FALSE}', '\"FALSE\"'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass FindTest extends AllSetupTeardown\n{\n    #[DataProvider('providerFIND')]\n    public function testFIND(mixed $expectedResult, mixed $string1 = 'omitted', mixed $string2 = 'omitted', mixed $start = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($string1 === 'omitted') {\n            $sheet->getCell('B1')->setValue('=FIND()');\n        } elseif ($string2 === 'omitted') {\n            $this->setCell('A1', $string1);\n            $sheet->getCell('B1')->setValue('=FIND(A1)');\n        } elseif ($start === 'omitted') {\n            $this->setCell('A1', $string1);\n            $this->setCell('A2', $string2);\n            $sheet->getCell('B1')->setValue('=FIND(A1, A2)');\n        } else {\n            $this->setCell('A1', $string1);\n            $this->setCell('A2', $string2);\n            $this->setCell('A3', $start);\n            $sheet->getCell('B1')->setValue('=FIND(A1, A2, A3)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerFIND(): array\n    {\n        return require 'tests/data/Calculation/TextData/FIND.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerFindArray')]\n    public function testFindArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FIND({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerFindArray(): array\n    {\n        return [\n            'row vector #1' => [[[3, 4, '#VALUE!']], '\"l\"', '{\"Hello\", \"World\", \"PhpSpreadsheet\"}'],\n            'column vector #1' => [[[3], [4], ['#VALUE!']], '\"l\"', '{\"Hello\"; \"World\"; \"PhpSpreadsheet\"}'],\n            'matrix #1' => [[[3, 4], ['#VALUE!', 5]], '\"l\"', '{\"Hello\", \"World\"; \"PhpSpreadsheet\", \"Excel\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass FixedTest extends AllSetupTeardown\n{\n    #[DataProvider('providerFIXED')]\n    public function testFIXED(mixed $expectedResult, mixed $number = 'omitted', mixed $decimals = 'omitted', mixed $noCommas = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=FIXED()');\n        } elseif ($decimals === 'omitted') {\n            $this->setCell('A1', $number);\n            $sheet->getCell('B1')->setValue('=FIXED(A1)');\n        } elseif ($noCommas === 'omitted') {\n            $this->setCell('A1', $number);\n            $this->setCell('A2', $decimals);\n            $sheet->getCell('B1')->setValue('=FIXED(A1, A2)');\n        } else {\n            $this->setCell('A1', $number);\n            $this->setCell('A2', $decimals);\n            $this->setCell('A3', $noCommas);\n            $sheet->getCell('B1')->setValue('=FIXED(A1, A2, A3)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerFIXED(): array\n    {\n        return require 'tests/data/Calculation/TextData/FIXED.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerFixedArray')]\n    public function testFixedArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=FIXED({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerFixedArray(): array\n    {\n        return [\n            'row vector #1' => [[['-123.32', '123.46', '12,345.68']], '{-123.321, 123.456, 12345.6789}', '2'],\n            'column vector #1' => [[['-123.32'], ['123.46'], ['12,345.68']], '{-123.321; 123.456; 12345.6789}', '2'],\n            'matrix #1' => [[['-123.46', '12,345.68'], ['-123.456', '12,345.679']], '{-123.456, 12345.6789}', '{2; 3}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass LeftTest extends AllSetupTeardown\n{\n    /**\n     * @param mixed $str string from which to extract\n     * @param mixed $cnt number of characters to extract\n     */\n    #[DataProvider('providerLEFT')]\n    public function testLEFT(mixed $expectedResult, mixed $str = 'omitted', mixed $cnt = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($str === 'omitted') {\n            $sheet->getCell('B1')->setValue('=LEFT()');\n        } elseif ($cnt === 'omitted') {\n            $this->setCell('A1', $str);\n            $sheet->getCell('B1')->setValue('=LEFT(A1)');\n        } else {\n            $this->setCell('A1', $str);\n            $this->setCell('A2', $cnt);\n            $sheet->getCell('B1')->setValue('=LEFT(A1, A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLEFT(): array\n    {\n        return require 'tests/data/Calculation/TextData/LEFT.php';\n    }\n\n    #[DataProvider('providerLocaleLEFT')]\n    public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value, mixed $characters): void\n    {\n        $newLocale = Settings::setLocale($locale);\n        if ($newLocale === false) {\n            self::markTestSkipped('Unable to set locale for locale-specific test');\n        }\n\n        $sheet = $this->getSheet();\n        $this->setCell('A1', $value);\n        $this->setCell('A2', $characters);\n        $sheet->getCell('B1')->setValue('=LEFT(A1, A2)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLocaleLEFT(): array\n    {\n        return [\n            ['VR', 'fr_FR', true, 2],\n            ['WA', 'nl_NL', true, 2],\n            ['TO', 'fi', true, 2],\n            ['ИСТ', 'bg', true, 3],\n            ['FA', 'fr_FR', false, 2],\n            ['ON', 'nl_NL', false, 2],\n            ['EPÄT', 'fi', false, 4],\n            ['ЛОЖ', 'bg', false, 3],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeLEFTTrue')]\n    public function testCalculationTypeTrue(string $type, string $resultB1, string $resultB2): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A1', true);\n        $this->setCell('A2', 'Hello');\n        $this->setCell('B1', '=LEFT(A1, 1)');\n        $this->setCell('B2', '=LEFT(A2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeLEFTTrue(): array\n    {\n        return [\n            'Excel LEFT(true, 1) AND LEFT(\"hello\", true)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                'T',\n                'H',\n            ],\n            'Gnumeric LEFT(true, 1) AND LEFT(\"hello\", true)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                'T',\n                'H',\n            ],\n            'OpenOffice LEFT(true, 1) AND LEFT(\"hello\", true)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '1',\n                '#VALUE!',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeLEFTFalse')]\n    public function testCalculationTypeFalse(string $type, string $resultB1, string $resultB2): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A1', false);\n        $this->setCell('A2', 'Hello');\n        $this->setCell('B1', '=LEFT(A1, 1)');\n        $this->setCell('B2', '=LEFT(A2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeLEFTFalse(): array\n    {\n        return [\n            'Excel LEFT(false, 1) AND LEFT(\"hello\", false)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                'F',\n                '',\n            ],\n            'Gnumeric LEFT(false, 1) AND LEFT(\"hello\", false)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                'F',\n                '',\n            ],\n            'OpenOffice LEFT(false, 1) AND LEFT(\"hello\", false)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '0',\n                '#VALUE!',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeLEFTNull')]\n    public function testCalculationTypeNull(string $type, string $resultB1, string $resultB2): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A2', 'Hello');\n        $this->setCell('B1', '=LEFT(A1, 1)');\n        $this->setCell('B2', '=LEFT(A2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeLEFTNull(): array\n    {\n        return [\n            'Excel LEFT(null, 1) AND LEFT(\"hello\", null)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                '',\n                '',\n            ],\n            'Gnumeric LEFT(null, 1) AND LEFT(\"hello\", null)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                '',\n                'H',\n            ],\n            'OpenOffice LEFT(null, 1) AND LEFT(\"hello\", null)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '',\n                '',\n            ],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerLeftArray')]\n    public function testLeftArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LEFT({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerLeftArray(): array\n    {\n        return [\n            'row vector #1' => [[['Hel', 'Wor', 'Php']], '{\"Hello\", \"World\", \"PhpSpreadsheet\"}', '3'],\n            'column vector #1' => [[['Hel'], ['Wor'], ['Php']], '{\"Hello\"; \"World\"; \"PhpSpreadsheet\"}', '3'],\n            'matrix #1' => [[['Hel', 'Wor'], ['Php', 'Exc']], '{\"Hello\", \"World\"; \"PhpSpreadsheet\", \"Excel\"}', '3'],\n            'column vector #2' => [[['Php'], ['PhpSp']], '\"PhpSpreadsheet\"', '{3; 5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass LenTest extends AllSetupTeardown\n{\n    #[DataProvider('providerLEN')]\n    public function testLEN(mixed $expectedResult, mixed $str = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($str === 'omitted') {\n            $sheet->getCell('B1')->setValue('=LEN()');\n        } else {\n            $this->setCell('A1', $str);\n            $sheet->getCell('B1')->setValue('=LEN(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLEN(): array\n    {\n        return require 'tests/data/Calculation/TextData/LEN.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerLenArray')]\n    public function testLenArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LEN({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerLenArray(): array\n    {\n        return [\n            'row vector' => [[[3, 11, 14]], '{\"PHP\", \"Hello World\", \"PhpSpreadsheet\"}'],\n            'column vector' => [[[3], [11], [14]], '{\"PHP\"; \"Hello World\"; \"PhpSpreadsheet\"}'],\n            'matrix' => [[[3, 9], [11, 14]], '{\"PHP\", \"ElePHPant\"; \"Hello World\", \"PhpSpreadsheet\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass LowerTest extends AllSetupTeardown\n{\n    #[DataProvider('providerLOWER')]\n    public function testLOWER(mixed $expectedResult, mixed $str = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($str === 'omitted') {\n            $sheet->getCell('B1')->setValue('=LOWER()');\n        } else {\n            $this->setCell('A1', $str);\n            $sheet->getCell('B1')->setValue('=LOWER(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLOWER(): array\n    {\n        return require 'tests/data/Calculation/TextData/LOWER.php';\n    }\n\n    #[DataProvider('providerLocaleLOWER')]\n    public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value): void\n    {\n        $newLocale = Settings::setLocale($locale);\n        if ($newLocale === false) {\n            self::markTestSkipped('Unable to set locale for locale-specific test');\n        }\n        $sheet = $this->getSheet();\n        $this->setCell('A1', $value);\n        $sheet->getCell('B1')->setValue('=LOWER(A1)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLocaleLOWER(): array\n    {\n        return [\n            ['vrai', 'fr_FR', true],\n            ['waar', 'nl_NL', true],\n            ['tosi', 'fi', true],\n            ['истина', 'bg', true],\n            ['faux', 'fr_FR', false],\n            ['onwaar', 'nl_NL', false],\n            ['epätosi', 'fi', false],\n            ['ложь', 'bg', false],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerLowerArray')]\n    public function testLowerArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=LOWER({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerLowerArray(): array\n    {\n        return [\n            'row vector' => [[[\"let's\", 'all change', 'case']], '{\"lEt\\'S\", \"aLl chAngE\", \"cAsE\"}'],\n            'column vector' => [[[\"let's\"], ['all change'], ['case']], '{\"lEt\\'S\"; \"aLl chAngE\"; \"cAsE\"}'],\n            'matrix' => [[['build all', 'your workbooks'], ['with', 'phpspreadsheet']], '{\"bUIld aLL\", \"yOUr WOrkBOOks\"; \"wiTH\", \"PhpSpreadsheet\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass MidTest extends AllSetupTeardown\n{\n    /**\n     * @param mixed $str string from which to extract\n     * @param mixed $start position at which to start\n     * @param mixed $cnt number of characters to extract\n     */\n    #[DataProvider('providerMID')]\n    public function testMID(mixed $expectedResult, mixed $str = 'omitted', mixed $start = 'omitted', mixed $cnt = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($str === 'omitted') {\n            $sheet->getCell('B1')->setValue('=MID()');\n        } elseif ($start === 'omitted') {\n            $this->setCell('A1', $str);\n            $sheet->getCell('B1')->setValue('=MID(A1)');\n        } elseif ($cnt === 'omitted') {\n            $this->setCell('A1', $str);\n            $this->setCell('A2', $start);\n            $sheet->getCell('B1')->setValue('=MID(A1, A2)');\n        } else {\n            $this->setCell('A1', $str);\n            $this->setCell('A2', $start);\n            $this->setCell('A3', $cnt);\n            $sheet->getCell('B1')->setValue('=MID(A1, A2, A3)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerMID(): array\n    {\n        return require 'tests/data/Calculation/TextData/MID.php';\n    }\n\n    #[DataProvider('providerLocaleMID')]\n    public function testMiddleWithLocaleBoolean(string $expectedResult, string $locale, mixed $value, mixed $offset, mixed $characters): void\n    {\n        $newLocale = Settings::setLocale($locale);\n        if ($newLocale === false) {\n            self::markTestSkipped('Unable to set locale for locale-specific test');\n        }\n\n        $sheet = $this->getSheet();\n        $this->setCell('A1', $value);\n        $this->setCell('A2', $offset);\n        $this->setCell('A3', $characters);\n        $sheet->getCell('B1')->setValue('=MID(A1, A2, A3)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLocaleMID(): array\n    {\n        return [\n            ['RA', 'fr_FR', true, 2, 2],\n            ['AA', 'nl_NL', true, 2, 2],\n            ['OS', 'fi', true, 2, 2],\n            ['СТИН', 'bg', true, 2, 4],\n            ['AU', 'fr_FR', false, 2, 2],\n            ['NWA', 'nl_NL', false, 2, 3],\n            ['PÄTO', 'fi', false, 2, 4],\n            ['ОЖ', 'bg', false, 2, 2],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeMIDTrue')]\n    public function testCalculationTypeTrue(string $type, string $resultB1, string $resultB2, string $resultB3): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A1', true);\n        $this->setCell('A2', 'hello');\n        $this->setCell('B1', '=MID(A1, 3, 1)');\n        $this->setCell('B2', '=MID(A2, A1, 1)');\n        $this->setCell('B3', '=MID(A2, 2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n        self::assertEquals($resultB3, $sheet->getCell('B3')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeMIDTrue(): array\n    {\n        return [\n            'Excel MID(true,3,1), MID(\"hello\",true, 1), MID(\"hello\", 2, true)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                'U',\n                'h',\n                'e',\n            ],\n            'Gnumeric MID(true,3,1), MID(\"hello\",true, 1), MID(\"hello\", 2, true)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                'U',\n                'h',\n                'e',\n            ],\n            'OpenOffice MID(true,3,1), MID(\"hello\",true, 1), MID(\"hello\", 2, true)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '',\n                '#VALUE!',\n                '#VALUE!',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeMIDFalse')]\n    public function testCalculationTypeFalse(string $type, string $resultB1, string $resultB2, string $resultB3): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A1', false);\n        $this->setCell('A2', 'Hello');\n        $this->setCell('B1', '=MID(A1, 3, 1)');\n        $this->setCell('B2', '=MID(A2, A1, 1)');\n        $this->setCell('B3', '=MID(A2, 2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n        self::assertEquals($resultB3, $sheet->getCell('B3')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeMIDFalse(): array\n    {\n        return [\n            'Excel MID(false,3,1), MID(\"hello\", false, 1), MID(\"hello\", 2, false)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                'L',\n                '#VALUE!',\n                '',\n            ],\n            'Gnumeric MID(false,3,1), MID(\"hello\", false, 1), MID(\"hello\", 2, false)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                'L',\n                '#VALUE!',\n                '',\n            ],\n            'OpenOffice MID(false,3,1), MID(\"hello\", false, 1), MID(\"hello\", 2, false)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '',\n                '#VALUE!',\n                '#VALUE!',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeMIDNull')]\n    public function testCalculationTypeNull(string $type, string $resultB1, string $resultB2, string $resultB3): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A2', 'Hello');\n        $this->setCell('B1', '=MID(A1, 3, 1)');\n        $this->setCell('B2', '=MID(A2, A1, 1)');\n        $this->setCell('B3', '=MID(A2, 2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n        self::assertEquals($resultB3, $sheet->getCell('B3')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeMIDNull(): array\n    {\n        return [\n            'Excel MID(null,3,1), MID(\"hello\", null, 1), MID(\"hello\", 2, null)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                '',\n                '#VALUE!',\n                '',\n            ],\n            'Gnumeric MID(null,3,1), MID(\"hello\", null, 1), MID(\"hello\", 2, null)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                '',\n                '#VALUE!',\n                '',\n            ],\n            'OpenOffice MID(null,3,1), MID(\"hello\", null, 1), MID(\"hello\", 2, null)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '',\n                '#VALUE!',\n                '',\n            ],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerMidArray')]\n    public function testMidArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=MID({$argument1}, {$argument2}, {$argument3})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerMidArray(): array\n    {\n        return [\n            'row vector #1' => [[['lo Wor', 'Spread']], '{\"Hello World\", \"PhpSpreadsheet\"}', '4', '6'],\n            'column vector #1' => [[[' Wor'], ['read']], '{\"Hello World\"; \"PhpSpreadsheet\"}', '6', '4'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass NumberValueTest extends AllSetupTeardown\n{\n    const NV_PRECISION = 1.0E-8;\n\n    #[DataProvider('providerNUMBERVALUE')]\n    public function testNUMBERVALUE(mixed $expectedResult, mixed $number = 'omitted', mixed $decimal = 'omitted', mixed $group = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($number === 'omitted') {\n            $sheet->getCell('B1')->setValue('=NUMBERVALUE()');\n        } elseif ($decimal === 'omitted') {\n            $this->setCell('A1', $number);\n            $sheet->getCell('B1')->setValue('=NUMBERVALUE(A1)');\n        } elseif ($group === 'omitted') {\n            $this->setCell('A1', $number);\n            $this->setCell('A2', $decimal);\n            $sheet->getCell('B1')->setValue('=NUMBERVALUE(A1, A2)');\n        } else {\n            $this->setCell('A1', $number);\n            $this->setCell('A2', $decimal);\n            $this->setCell('A3', $group);\n            $sheet->getCell('B1')->setValue('=NUMBERVALUE(A1, A2, A3)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, self::NV_PRECISION);\n    }\n\n    public static function providerNUMBERVALUE(): array\n    {\n        return require 'tests/data/Calculation/TextData/NUMBERVALUE.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerNumberValueArray')]\n    public function testNumberValueArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=NumberValue({$argument1}, {$argument2}, {$argument3})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, self::NV_PRECISION);\n    }\n\n    public static function providerNumberValueArray(): array\n    {\n        return [\n            'row vector #1' => [[[-123.321, 123.456, 12345.6789]], '{\"-123,321\", \"123,456\", \"12 345,6789\"}', '\",\"', '\" \"'],\n            'column vector #1' => [[[-123.321], [123.456], [12345.6789]], '{\"-123,321\"; \"123,456\"; \"12 345,6789\"}', '\",\"', '\" \"'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/OpenOfficeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nclass OpenOfficeTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerOpenOffice')]\n    public function testOpenOffice(mixed $expectedResult, string $formula): void\n    {\n        $this->setOpenOffice();\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $this->setCell('A1', $formula);\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerOpenOffice(): array\n    {\n        return require 'tests/data/Calculation/TextData/OpenOffice.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ProperTest extends AllSetupTeardown\n{\n    #[DataProvider('providerPROPER')]\n    public function testPROPER(mixed $expectedResult, mixed $str = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($str === 'omitted') {\n            $sheet->getCell('B1')->setValue('=PROPER()');\n        } else {\n            $this->setCell('A1', $str);\n            $sheet->getCell('B1')->setValue('=PROPER(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerPROPER(): array\n    {\n        return require 'tests/data/Calculation/TextData/PROPER.php';\n    }\n\n    #[DataProvider('providerLocaleLOWER')]\n    public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value): void\n    {\n        $newLocale = Settings::setLocale($locale);\n        if ($newLocale === false) {\n            self::markTestSkipped('Unable to set locale for locale-specific test');\n        }\n        $sheet = $this->getSheet();\n        $this->setCell('A1', $value);\n        $sheet->getCell('B1')->setValue('=PROPER(A1)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLocaleLOWER(): array\n    {\n        return [\n            ['Vrai', 'fr_FR', true],\n            ['Waar', 'nl_NL', true],\n            ['Tosi', 'fi', true],\n            ['Истина', 'bg', true],\n            ['Faux', 'fr_FR', false],\n            ['Onwaar', 'nl_NL', false],\n            ['Epätosi', 'fi', false],\n            ['Ложь', 'bg', false],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerProperArray')]\n    public function testProperArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=PROPER({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerProperArray(): array\n    {\n        return [\n            'row vector' => [[[\"Let's\", 'All Change', 'Case']], '{\"lEt\\'S\", \"aLl chAngE\", \"cAsE\"}'],\n            'column vector' => [[[\"Let's\"], ['All Change'], ['Case']], '{\"lEt\\'S\"; \"aLl chAngE\"; \"cAsE\"}'],\n            'matrix' => [[['Build All', 'Your Workbooks'], ['With', 'Phpspreadsheet']], '{\"bUIld aLL\", \"yOUr WOrkBOOks\"; \"wiTH\", \"PhpSpreadsheet\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ReplaceTest extends AllSetupTeardown\n{\n    #[DataProvider('providerREPLACE')]\n    public function testREPLACE(mixed $expectedResult, mixed $oldText = 'omitted', mixed $start = 'omitted', mixed $count = 'omitted', mixed $newText = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($oldText === 'omitted') {\n            $sheet->getCell('B1')->setValue('=REPLACE()');\n        } elseif ($start === 'omitted') {\n            $this->setCell('A1', $oldText);\n            $sheet->getCell('B1')->setValue('=REPLACE(A1)');\n        } elseif ($count === 'omitted') {\n            $this->setCell('A1', $oldText);\n            $this->setCell('A2', $start);\n            $sheet->getCell('B1')->setValue('=REPLACE(A1, A2)');\n        } elseif ($newText === 'omitted') {\n            $this->setCell('A1', $oldText);\n            $this->setCell('A2', $start);\n            $this->setCell('A3', $count);\n            $sheet->getCell('B1')->setValue('=REPLACE(A1, A2, A3)');\n        } else {\n            $this->setCell('A1', $oldText);\n            $this->setCell('A2', $start);\n            $this->setCell('A3', $count);\n            $this->setCell('A4', $newText);\n            $sheet->getCell('B1')->setValue('=REPLACE(A1, A2, A3, A4)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerREPLACE(): array\n    {\n        return require 'tests/data/Calculation/TextData/REPLACE.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerReplaceArray')]\n    public function testReplaceArray(\n        array $expectedResult,\n        string $oldText,\n        string $start,\n        string $chars,\n        string $newText\n    ): void {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=REPLACE({$oldText}, {$start}, {$chars}, {$newText})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerReplaceArray(): array\n    {\n        return [\n            'row vector' => [[['Elephpant', 'ElePHPant']], '\"Elephant\"', '4', '2', '{\"php\", \"PHP\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ReptTest extends AllSetupTeardown\n{\n    #[DataProvider('providerREPT')]\n    public function testReptThroughEngine(mixed $expectedResult, mixed $val = 'omitted', mixed $rpt = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($val === 'omitted') {\n            $sheet->getCell('B1')->setValue('=REPT()');\n        } elseif ($rpt === 'omitted') {\n            $this->setCell('A1', $val);\n            $sheet->getCell('B1')->setValue('=REPT(A1)');\n        } else {\n            $this->setCell('A1', $val);\n            $this->setCell('A2', $rpt);\n            $sheet->getCell('B1')->setValue('=REPT(A1, A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerREPT(): array\n    {\n        return require 'tests/data/Calculation/TextData/REPT.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerReptArray')]\n    public function testReptArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=REPT({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerReptArray(): array\n    {\n        return [\n            'row vector #1' => [[['PHPPHPPHP', 'HAHAHA', 'HOHOHO']], '{\"PHP\", \"HA\", \"HO\"}', '3'],\n            'column vector #1' => [[['PHPPHPPHP'], ['HAHAHA'], ['HOHOHO']], '{\"PHP\"; \"HA\"; \"HO\"}', '3'],\n            'matrix #1' => [[['PHPPHP', '❤️🐘💚❤️🐘💚'], ['HAHA', 'HOHO']], '{\"PHP\", \"❤️🐘💚\"; \"HA\", \"HO\"}', '2'],\n            'row vector #2' => [[[' PHP  PHP  PHP ', ' PHP  PHP ']], '\" PHP \"', '{3, 2}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass RightTest extends AllSetupTeardown\n{\n    /**\n     * @param mixed $str string from which to extract\n     * @param mixed $cnt number of characters to extract\n     */\n    #[DataProvider('providerRIGHT')]\n    public function testRIGHT(mixed $expectedResult, mixed $str = 'omitted', mixed $cnt = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($str === 'omitted') {\n            $sheet->getCell('B1')->setValue('=RIGHT()');\n        } elseif ($cnt === 'omitted') {\n            $this->setCell('A1', $str);\n            $sheet->getCell('B1')->setValue('=RIGHT(A1)');\n        } else {\n            $this->setCell('A1', $str);\n            $this->setCell('A2', $cnt);\n            $sheet->getCell('B1')->setValue('=RIGHT(A1, A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerRIGHT(): array\n    {\n        return require 'tests/data/Calculation/TextData/RIGHT.php';\n    }\n\n    #[DataProvider('providerLocaleRIGHT')]\n    public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value, mixed $characters): void\n    {\n        $newLocale = Settings::setLocale($locale);\n        if ($newLocale === false) {\n            self::markTestSkipped('Unable to set locale for locale-specific test');\n        }\n\n        $sheet = $this->getSheet();\n        $this->setCell('A1', $value);\n        $this->setCell('A2', $characters);\n        $sheet->getCell('B1')->setValue('=RIGHT(A1, A2)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLocaleRIGHT(): array\n    {\n        return [\n            ['RAI', 'fr_FR', true, 3],\n            ['AAR', 'nl_NL', true, 3],\n            ['OSI', 'fi', true, 3],\n            ['ИНА', 'bg', true, 3],\n            ['UX', 'fr_FR', false, 2],\n            ['WAAR', 'nl_NL', false, 4],\n            ['ÄTOSI', 'fi', false, 5],\n            ['ЖЬ', 'bg', false, 2],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeRIGHTTrue')]\n    public function testCalculationTypeTrue(string $type, string $resultB1, string $resultB2): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A1', true);\n        $this->setCell('A2', 'Hello');\n        $this->setCell('B1', '=RIGHT(A1, 1)');\n        $this->setCell('B2', '=RIGHT(A2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeRIGHTTrue(): array\n    {\n        return [\n            'Excel RIGHT(true, 1) AND RIGHT(\"hello\", true)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                'E',\n                'o',\n            ],\n            'Gnumeric RIGHT(true, 1) AND RIGHT(\"hello\", true)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                'E',\n                'o',\n            ],\n            'OpenOffice RIGHT(true, 1) AND RIGHT(\"hello\", true)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '1',\n                '#VALUE!',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeRIGHTFalse')]\n    public function testCalculationTypeFalse(string $type, string $resultB1, string $resultB2): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A1', false);\n        $this->setCell('A2', 'Hello');\n        $this->setCell('B1', '=RIGHT(A1, 1)');\n        $this->setCell('B2', '=RIGHT(A2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeRIGHTFalse(): array\n    {\n        return [\n            'Excel RIGHT(false, 1) AND RIGHT(\"hello\", false)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                'E',\n                '',\n            ],\n            'Gnumeric RIGHT(false, 1) AND RIGHT(\"hello\", false)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                'E',\n                '',\n            ],\n            'OpenOffice RIGHT(false, 1) AND RIGHT(\"hello\", false)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '0',\n                '#VALUE!',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerCalculationTypeRIGHTNull')]\n    public function testCalculationTypeNull(string $type, string $resultB1, string $resultB2): void\n    {\n        Functions::setCompatibilityMode($type);\n        $sheet = $this->getSheet();\n        $this->setCell('A2', 'Hello');\n        $this->setCell('B1', '=RIGHT(A1, 1)');\n        $this->setCell('B2', '=RIGHT(A2, A1)');\n        self::assertEquals($resultB1, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertEquals($resultB2, $sheet->getCell('B2')->getCalculatedValue());\n    }\n\n    public static function providerCalculationTypeRIGHTNull(): array\n    {\n        return [\n            'Excel RIGHT(null, 1) AND RIGHT(\"hello\", null)' => [\n                Functions::COMPATIBILITY_EXCEL,\n                '',\n                '',\n            ],\n            'Gnumeric RIGHT(null, 1) AND RIGHT(\"hello\", null)' => [\n                Functions::COMPATIBILITY_GNUMERIC,\n                '',\n                'o',\n            ],\n            'OpenOffice RIGHT(null, 1) AND RIGHT(\"hello\", null)' => [\n                Functions::COMPATIBILITY_OPENOFFICE,\n                '',\n                '',\n            ],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerRightArray')]\n    public function testRightArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=RIGHT({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerRightArray(): array\n    {\n        return [\n            'row vector #1' => [[['llo', 'rld', 'eet']], '{\"Hello\", \"World\", \"PhpSpreadsheet\"}', '3'],\n            'column vector #1' => [[['llo'], ['rld'], ['eet']], '{\"Hello\"; \"World\"; \"PhpSpreadsheet\"}', '3'],\n            'matrix #1' => [[['llo', 'rld'], ['eet', 'cel']], '{\"Hello\", \"World\"; \"PhpSpreadsheet\", \"Excel\"}', '3'],\n            'column vector #2' => [[['eet'], ['sheet']], '\"PhpSpreadsheet\"', '{3; 5}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SearchTest extends AllSetupTeardown\n{\n    #[DataProvider('providerSEARCH')]\n    public function testSEARCH(mixed $expectedResult, mixed $findText = 'omitted', mixed $withinText = 'omitted', mixed $start = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($findText === 'omitted') {\n            $sheet->getCell('B1')->setValue('=SEARCH()');\n        } elseif ($withinText === 'omitted') {\n            $this->setCell('A1', $findText);\n            $sheet->getCell('B1')->setValue('=SEARCH(A1)');\n        } elseif ($start === 'omitted') {\n            $this->setCell('A1', $findText);\n            $this->setCell('A2', $withinText);\n            $sheet->getCell('B1')->setValue('=SEARCH(A1, A2)');\n        } else {\n            $this->setCell('A1', $findText);\n            $this->setCell('A2', $withinText);\n            $this->setCell('A3', $start);\n            $sheet->getCell('B1')->setValue('=SEARCH(A1, A2, A3)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerSEARCH(): array\n    {\n        return require 'tests/data/Calculation/TextData/SEARCH.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerSearchArray')]\n    public function testSearchArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SEARCH({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSearchArray(): array\n    {\n        return [\n            'row vector #1' => [[[3, 4, '#VALUE!']], '\"L\"', '{\"Hello\", \"World\", \"PhpSpreadsheet\"}'],\n            'column vector #1' => [[[3], [4], ['#VALUE!']], '\"L\"', '{\"Hello\"; \"World\"; \"PhpSpreadsheet\"}'],\n            'matrix #1' => [[[3, 4], ['#VALUE!', 5]], '\"L\"', '{\"Hello\", \"World\"; \"PhpSpreadsheet\", \"Excel\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SubstituteTest extends AllSetupTeardown\n{\n    #[DataProvider('providerSUBSTITUTE')]\n    public function testSUBSTITUTE(mixed $expectedResult, mixed $text = 'omitted', mixed $oldText = 'omitted', mixed $newText = 'omitted', mixed $instance = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($text === 'omitted') {\n            $sheet->getCell('B1')->setValue('=SUBSTITUTE()');\n        } elseif ($oldText === 'omitted') {\n            $this->setCell('A1', $text);\n            $sheet->getCell('B1')->setValue('=SUBSTITUTE(A1)');\n        } elseif ($newText === 'omitted') {\n            $this->setCell('A1', $text);\n            $this->setCell('A2', $oldText);\n            $sheet->getCell('B1')->setValue('=SUBSTITUTE(A1, A2)');\n        } elseif ($instance === 'omitted') {\n            $this->setCell('A1', $text);\n            $this->setCell('A2', $oldText);\n            $this->setCell('A3', $newText);\n            $sheet->getCell('B1')->setValue('=SUBSTITUTE(A1, A2, A3)');\n        } else {\n            $this->setCell('A1', $text);\n            $this->setCell('A2', $oldText);\n            $this->setCell('A3', $newText);\n            $this->setCell('A4', $instance);\n            $sheet->getCell('B1')->setValue('=SUBSTITUTE(A1, A2, A3, A4)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerSUBSTITUTE(): array\n    {\n        return require 'tests/data/Calculation/TextData/SUBSTITUTE.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerSubstituteArray')]\n    public function testSubstituteArray(array $expectedResult, string $oldText, string $fromText, string $toText): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=SUBSTITUTE({$oldText}, {$fromText}, {$toText})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerSubstituteArray(): array\n    {\n        return [\n            'row vector' => [[['ElePHPant', 'EleFFant']], '\"Elephant\"', '\"ph\"', '{\"PHP\", \"FF\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TTest extends AllSetupTeardown\n{\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerT')]\n    public function testT(mixed $expectedResult, mixed $value = 'no arguments'): void\n    {\n        $this->mightHaveException($expectedResult);\n        if ($value === 'no arguments') {\n            $this->setCell('H1', '=T()');\n        } else {\n            $this->setCell('A1', $value);\n            $this->setCell('H1', '=T(A1)');\n        }\n        $result = $this->getSheet()->getCell('H1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerT(): array\n    {\n        return require 'tests/data/Calculation/TextData/T.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerTArray')]\n    public function testTArray(array $expectedResult, string $argument): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=T({$argument})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTArray(): array\n    {\n        return [\n            'row vector #1' => [[['PHP', '', 'PHP8']], '{\"PHP\", 99, \"PHP8\"}'],\n            'column vector #1' => [[[''], ['PHP'], ['']], '{12; \"PHP\"; 1.2}'],\n            'matrix #1' => [[['TRUE', 'FALSE'], ['', '']], '{\"TRUE\", \"FALSE\"; TRUE, FALSE}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextAfterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TextAfterTest extends AllSetupTeardown\n{\n    /** @param array{0: string, 1: mixed[]|string, 2?: string, 3?: string, 4?: string} $arguments */\n    #[DataProvider('providerTEXTAFTER')]\n    public function testTextAfter(string $expectedResult, array $arguments): void\n    {\n        $text = $arguments[0];\n        $delimiter = $arguments[1];\n\n        $args = (is_array($delimiter)) ? 'A1, {A2,A3}' : 'A1, A2';\n        $args .= (isset($arguments[2])) ? \", {$arguments[2]}\" : ',';\n        $args .= (isset($arguments[3])) ? \", {$arguments[3]}\" : ',';\n        $args .= (isset($arguments[4])) ? \", {$arguments[4]}\" : ',';\n\n        $worksheet = $this->getSheet();\n        $worksheet->getCell('A1')->setValue($text);\n        $worksheet->getCell('A2')->setValue((is_array($delimiter)) ? $delimiter[0] : $delimiter);\n        if (is_array($delimiter)) {\n            $worksheet->getCell('A3')->setValue($delimiter[1]);\n        }\n        $worksheet->getCell('B1')->setValue(\"=TEXTAFTER({$args})\");\n\n        $result = $worksheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerTEXTAFTER(): array\n    {\n        return require 'tests/data/Calculation/TextData/TEXTAFTER.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextBeforeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TextBeforeTest extends AllSetupTeardown\n{\n    /** @param array{0: string, 1: mixed[]|string, 2?: string, 3?: string, 4?: string} $arguments */\n    #[DataProvider('providerTEXTBEFORE')]\n    public function testTextBefore(string $expectedResult, array $arguments): void\n    {\n        $text = $arguments[0];\n        $delimiter = $arguments[1];\n\n        $args = (is_array($delimiter)) ? 'A1, {A2,A3}' : 'A1, A2';\n        $args .= (isset($arguments[2])) ? \", {$arguments[2]}\" : ',';\n        $args .= (isset($arguments[3])) ? \", {$arguments[3]}\" : ',';\n        $args .= (isset($arguments[4])) ? \", {$arguments[4]}\" : ',';\n\n        $worksheet = $this->getSheet();\n        $worksheet->getCell('A1')->setValue($text);\n        $worksheet->getCell('A2')->setValue((is_array($delimiter)) ? $delimiter[0] : $delimiter);\n        if (is_array($delimiter)) {\n            $worksheet->getCell('A3')->setValue($delimiter[1]);\n        }\n        $worksheet->getCell('B1')->setValue(\"=TEXTBEFORE({$args})\");\n\n        $result = $worksheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerTEXTBEFORE(): array\n    {\n        return require 'tests/data/Calculation/TextData/TEXTBEFORE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TextJoinTest extends AllSetupTeardown\n{\n    /** @param mixed[] $args */\n    #[DataProvider('providerTEXTJOIN')]\n    public function testTEXTJOIN(mixed $expectedResult, array $args): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        $b1Formula = '=TEXTJOIN(';\n        $comma = '';\n        $row = 0;\n        foreach ($args as $arg) {\n            ++$row;\n            $this->setCell(\"A$row\", $arg);\n            $b1Formula .= $comma . \"A$row\";\n            $comma = ',';\n        }\n        $b1Formula .= ')';\n        $this->setCell('B1', $b1Formula);\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerTEXTJOIN(): array\n    {\n        return require 'tests/data/Calculation/TextData/TEXTJOIN.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerTextjoinArray')]\n    public function testTextjoinArray(array $expectedResult, string $delimiter, string $blanks, string $texts): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TEXTJOIN({$delimiter}, {$blanks}, {$texts})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTextjoinArray(): array\n    {\n        return [\n            'row vector #1' => [[['AB,CD,EF', 'AB;CD;EF']], '{\",\", \";\"}', 'FALSE', '\"AB\", \"CD\", \"EF\"'],\n            'column vector #1' => [[['AB--CD--EF'], ['AB|CD|EF']], '{\"--\"; \"|\"}', 'FALSE', '\"AB\", \"CD\", \"EF\"'],\n            'matrix #1' => [[['AB,CD,EF', 'AB;CD;EF'], ['AB-CD-EF', 'AB|CD|EF']], '{\",\", \";\"; \"-\", \"|\"}', 'FALSE', '\"AB\", \"CD\", \"EF\"'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TextSplitTest extends AllSetupTeardown\n{\n    /** @param mixed[] $argument */\n    private function setDelimiterArgument(array $argument, string $column): string\n    {\n        return '{' . $column . implode(',' . $column, range(1, count($argument))) . '}';\n    }\n\n    private function setDelimiterValues(Worksheet $worksheet, string $column, mixed $argument): void\n    {\n        if (is_array($argument)) {\n            foreach ($argument as $index => $value) {\n                ++$index;\n                $worksheet->getCell(\"{$column}{$index}\")->setValue($value);\n            }\n        } else {\n            $worksheet->getCell(\"{$column}1\")->setValue($argument);\n        }\n    }\n\n    /**\n     * @param mixed[] $expectedResult\n     * @param array{0: string, 1: mixed[]|string, 2: mixed[]|string, 3?: string, 4?: string, 5?: string} $arguments\n     */\n    #[DataProvider('providerTEXTSPLIT')]\n    public function testTextSplit(array $expectedResult, array $arguments): void\n    {\n        Calculation::getInstance($this->getSpreadsheet())->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $text = $arguments[0];\n        $columnDelimiter = $arguments[1];\n        $rowDelimiter = $arguments[2];\n\n        $args = 'A1';\n        $args .= (is_array($columnDelimiter)) ? ', ' . $this->setDelimiterArgument($columnDelimiter, 'B') : ', B1';\n        $args .= (is_array($rowDelimiter)) ? ', ' . $this->setDelimiterArgument($rowDelimiter, 'C') : ', C1';\n        $args .= (isset($arguments[3])) ? \", {$arguments[3]}\" : ',';\n        $args .= (isset($arguments[4])) ? \", {$arguments[4]}\" : ',';\n        $args .= (isset($arguments[5])) ? \", {$arguments[5]}\" : ',';\n\n        $worksheet = $this->getSheet();\n        $worksheet->getCell('A1')->setValue($text);\n        $this->setDelimiterValues($worksheet, 'B', $columnDelimiter);\n        if (!empty($rowDelimiter)) {\n            $this->setDelimiterValues($worksheet, 'C', $rowDelimiter);\n        }\n        $worksheet->getCell('H1')->setValue(\"=TEXTSPLIT({$args})\");\n\n        $result = Calculation::getInstance($this->getSpreadsheet())->calculateCellValue($worksheet->getCell('H1'));\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTEXTSPLIT(): array\n    {\n        return require 'tests/data/Calculation/TextData/TEXTSPLIT.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TextTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTEXT')]\n    public function testTEXT(mixed $expectedResult, mixed $value = 'omitted', mixed $format = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($value === 'omitted') {\n            $sheet->getCell('B1')->setValue('=TEXT()');\n        } elseif ($format === 'omitted') {\n            $this->setCell('A1', $value);\n            $sheet->getCell('B1')->setValue('=TEXT(A1)');\n        } else {\n            $this->setCell('A1', $value);\n            $this->setCell('A2', $format);\n            $sheet->getCell('B1')->setValue('=TEXT(A1, A2)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerTEXT(): array\n    {\n        return require 'tests/data/Calculation/TextData/TEXT.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerTextArray')]\n    public function testTextArray(array $expectedResult, string $argument1, string $argument2): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TEXT({$argument1}, {$argument2})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTextArray(): array\n    {\n        return [\n            'row vector' => [[['123.75%', '1 19/80']], '1.2375', '{\"0.00%\", \"0 ??/???\"}'],\n            'matrix vector' => [\n                [\n                    ['$ -1,234.57', '(1,234.57)'],\n                    ['$ 9,876.54', '9,876.54'],\n                ],\n                '{-1234.5678; 9876.5432}',\n                '{\"$ #,##0.00\", \"#,##0.00;(#,##0.00)\"}',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TrimTest extends AllSetupTeardown\n{\n    #[DataProvider('providerTRIM')]\n    public function testTRIM(mixed $expectedResult, mixed $character = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($character === 'omitted') {\n            $sheet->getCell('B1')->setValue('=TRIM()');\n        } else {\n            $this->setCell('A1', $character);\n            $sheet->getCell('B1')->setValue('=TRIM(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerTRIM(): array\n    {\n        return require 'tests/data/Calculation/TextData/TRIM.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerTrimArray')]\n    public function testTrimArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=TRIM({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerTrimArray(): array\n    {\n        return [\n            'row vector' => [[['PHP', 'MS Excel', 'Open/Libre Office']], '{\"  PHP \", \" MS   Excel \", \" Open/Libre   Office \"}'],\n            'column vector' => [[['PHP'], ['MS Excel'], ['Open/Libre Office']], '{\"  PHP \"; \" MS   Excel \"; \" Open/Libre   Office \"}'],\n            'matrix' => [[['PHP', 'MS Excel'], ['PhpSpreadsheet', 'Open/Libre Office']], '{\"  PHP \", \" MS   Excel \"; \" PhpSpreadsheet  \", \" Open/Libre   Office \"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UnicharTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass UnicharTest extends AllSetupTeardown\n{\n    #[DataProvider('providerCHAR')]\n    public function testCHAR(mixed $expectedResult, mixed $character = 'omitted'): void\n    {\n        // If expected is array, 1st is for CHAR, 2nd for UNICHAR,\n        // 3rd is for Mac CHAR if different from Windows.\n        if (is_array($expectedResult)) {\n            $expectedResult = $expectedResult[1];\n        }\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($character === 'omitted') {\n            $sheet->getCell('B1')->setValue('=UNICHAR()');\n        } else {\n            $this->setCell('A1', $character);\n            $sheet->getCell('B1')->setValue('=UNICHAR(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCHAR(): array\n    {\n        return require 'tests/data/Calculation/TextData/CHAR.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerCharArray')]\n    public function testCharArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=UNICHAR({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerCharArray(): array\n    {\n        return [\n            'row vector' => [[['P', 'H', 'P']], '{80, 72, 80}'],\n            'column vector' => [[['P'], ['H'], ['P']], '{80; 72; 80}'],\n            'matrix' => [[['Y', 'o'], ['l', 'o']], '{89, 111; 108, 111}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UnicodeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass UnicodeTest extends AllSetupTeardown\n{\n    #[DataProvider('providerCODE')]\n    public function testCODE(mixed $expectedResult, mixed $character = 'omitted'): void\n    {\n        // If expected is array, 1st is for CODE, 2nd for UNICODE,\n        // 3rd is for Mac CODE if different from Windows.\n        if (is_array($expectedResult)) {\n            $expectedResult = $expectedResult[1];\n        }\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($character === 'omitted') {\n            $sheet->getCell('B1')->setValue('=UNICODE()');\n        } else {\n            $this->setCell('A1', $character);\n            $sheet->getCell('B1')->setValue('=UNICODE(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCODE(): array\n    {\n        return require 'tests/data/Calculation/TextData/CODE.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerCodeArray')]\n    public function testCodeArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=UNICODE({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerCodeArray(): array\n    {\n        return [\n            'row vector' => [[[80, 72, 80]], '{\"P\", \"H\", \"P\"}'],\n            'column vector' => [[[80], [72], [80]], '{\"P\"; \"H\"; \"P\"}'],\n            'matrix' => [[[89, 111], [108, 111]], '{\"Y\", \"o\"; \"l\", \"o\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass UpperTest extends AllSetupTeardown\n{\n    #[DataProvider('providerUPPER')]\n    public function testUPPER(mixed $expectedResult, mixed $str = 'omitted'): void\n    {\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($str === 'omitted') {\n            $sheet->getCell('B1')->setValue('=UPPER()');\n        } else {\n            $this->setCell('A1', $str);\n            $sheet->getCell('B1')->setValue('=UPPER(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerUPPER(): array\n    {\n        return require 'tests/data/Calculation/TextData/UPPER.php';\n    }\n\n    #[DataProvider('providerLocaleLOWER')]\n    public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value): void\n    {\n        $newLocale = Settings::setLocale($locale);\n        if ($newLocale === false) {\n            self::markTestSkipped('Unable to set locale for locale-specific test');\n        }\n        $sheet = $this->getSheet();\n        $this->setCell('A1', $value);\n        $sheet->getCell('B1')->setValue('=UPPER(A1)');\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerLocaleLOWER(): array\n    {\n        return [\n            ['VRAI', 'fr_FR', true],\n            ['WAAR', 'nl_NL', true],\n            ['TOSI', 'fi', true],\n            ['ИСТИНА', 'bg', true],\n            ['FAUX', 'fr_FR', false],\n            ['ONWAAR', 'nl_NL', false],\n            ['EPÄTOSI', 'fi', false],\n            ['ЛОЖЬ', 'bg', false],\n        ];\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerUpperArray')]\n    public function testUpperArray(array $expectedResult, string $array): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=UPPER({$array})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerUpperArray(): array\n    {\n        return [\n            'row vector' => [[[\"LET'S\", 'ALL CHANGE', 'CASE']], '{\"lEt\\'S\", \"aLl chAngE\", \"cAsE\"}'],\n            'column vector' => [[[\"LET'S\"], ['ALL CHANGE'], ['CASE']], '{\"lEt\\'S\"; \"aLl chAngE\"; \"cAsE\"}'],\n            'matrix' => [[['BUILD ALL', 'YOUR WORKBOOKS'], ['WITH', 'PHPSPREADSHEET']], '{\"bUIld aLL\", \"yOUr WOrkBOOks\"; \"wiTH\", \"PhpSpreadsheet\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ValueTest extends AllSetupTeardown\n{\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setDecimalSeparator(null);\n        StringHelper::setThousandsSeparator(null);\n    }\n\n    #[DataProvider('providerVALUE')]\n    public function testVALUE(mixed $expectedResult, mixed $value = 'omitted'): void\n    {\n        StringHelper::setDecimalSeparator('.');\n        StringHelper::setThousandsSeparator(' ');\n        StringHelper::setCurrencyCode('$');\n\n        $this->mightHaveException($expectedResult);\n        $sheet = $this->getSheet();\n        if ($value === 'omitted') {\n            $sheet->getCell('B1')->setValue('=VALUE()');\n        } else {\n            $this->setCell('A1', $value);\n            $sheet->getCell('B1')->setValue('=VALUE(A1)');\n        }\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-8);\n    }\n\n    public static function providerVALUE(): array\n    {\n        return require 'tests/data/Calculation/TextData/VALUE.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerValueArray')]\n    public function testValueArray(array $expectedResult, string $argument): void\n    {\n        $calculation = Calculation::getInstance();\n\n        $formula = \"=VALUE({$argument})\";\n        $result = $calculation->calculateFormula($formula);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);\n    }\n\n    public static function providerValueArray(): array\n    {\n        return [\n            'row vector' => [[[44604, -1234.567]], '{\"12-Feb-2022\", \"$ -1,234.567\"}'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueToTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\TextData;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\TextData\\Format;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\n\nclass ValueToTextTest extends AllSetupTeardown\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerVALUE')]\n    public function testVALUETOTEXT(mixed $expectedResult, mixed $value, int|string $format): void\n    {\n        $sheet = $this->getSheet();\n        $this->setCell('A1', $value);\n        $sheet->getCell('B1')->setValue(\"=VALUETOTEXT(A1, {$format})\");\n\n        $result = $sheet->getCell('B1')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerVALUE(): array\n    {\n        return require 'tests/data/Calculation/TextData/VALUETOTEXT.php';\n    }\n\n    // In Spreadsheet context, never see cell value as RichText.\n    //    It will use calculatedValue, which is a string.\n    // Add an additional test for that condition.\n    public function testRichText(): void\n    {\n        $richText1 = new RichText();\n        $richText1->createTextRun('Hello');\n        $richText1->createText(' World');\n        self::assertSame('Hello World', Format::valueToText($richText1, 0));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Web/UrlEncodeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Web;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Web\\Service;\nuse PHPUnit\\Framework\\TestCase;\n\nclass UrlEncodeTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerURLENCODE')]\n    public function testURLENCODE(string $expectedResult, mixed $text): void\n    {\n        $result = Service::urlEncode($text);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerURLENCODE(): array\n    {\n        return require 'tests/data/Calculation/Web/URLENCODE.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation\\Functions\\Web;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Web\\Service;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WebServiceTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private const WHITELIST = [\n        'www.example.com',\n        'www.google.com',\n        'www.invalid.com',\n    ];\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    #[DataProvider('providerWEBSERVICE')]\n    public function testWEBSERVICE(string $expectedResult, string $url): void\n    {\n        if (str_starts_with($url, 'https') && getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $this->spreadsheet = new Spreadsheet();\n        $this->spreadsheet->setDomainWhiteList(self::WHITELIST);\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getCell('Z1')->setValue('http://www.example.com');\n        $sheet->getCell('Z2')->setValue(2);\n        if (str_starts_with($url, 'Z')) {\n            $sheet->getCell('A1')->setValue(\"=WEBSERVICE($url)\");\n        } else {\n            $sheet->getCell('A1')->setValue(\"=WEBSERVICE(\\\"$url\\\")\");\n        }\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertStringContainsString($expectedResult, $result);\n    }\n\n    public static function providerWEBSERVICE(): array\n    {\n        return require 'tests/data/Calculation/Web/WEBSERVICE.php';\n    }\n\n    public function testOldCalculated(): void\n    {\n        $reader = new XlsxReader();\n        $this->spreadsheet = $reader->load('tests/data/Reader/XLSX/fakewebservice.xlsx');\n        $this->spreadsheet->setDomainWhiteList(self::WHITELIST);\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $a1Formula = $sheet->getCell('A1')->getValue();\n        self::assertSame(\n            '=WEBSERVICE(\"http://www.phonydomain.com\")', // not in whitelist\n            $a1Formula\n        );\n        self::assertSame(\n            'phony result',\n            $sheet->getCell('A1')->getCalculatedValue(),\n            'result should be oldCalculatedValue'\n        );\n        $sheet->getCell('A2')->setValue($a1Formula);\n        self::assertNull(\n            $sheet->getCell('A2')->getCalculatedValue(),\n            'no oldCalculatedValue to fall back on'\n        );\n        $sheet->getCell('A3')->setValue($a1Formula);\n        $sheet->getCell('A3')->setCalculatedValue('random string');\n        self::assertSame(\n            'random string',\n            $sheet->getCell('A3')->getCalculatedValue(),\n            'oldCalculatedValue explicitly set above'\n        );\n        self::assertNull(\n            Service::webService('http://www.example.com'),\n            'no Spreadsheet so no whitelist'\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Value;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FunctionsTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    private string $returnDate;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        $this->returnDate = Functions::getReturnDateType();\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n        Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        Functions::setReturnDateType($this->returnDate);\n    }\n\n    public function testCompatibilityMode(): void\n    {\n        $result = Functions::setCompatibilityMode(Functions::COMPATIBILITY_GNUMERIC);\n        // Test for a true response for success\n        self::assertTrue($result);\n        // Test that mode has been changed\n        self::assertEquals(Functions::COMPATIBILITY_GNUMERIC, Functions::getCompatibilityMode());\n    }\n\n    public function testInvalidCompatibilityMode(): void\n    {\n        $result = Functions::setCompatibilityMode('INVALIDMODE');\n        // Test for a false response for failure\n        self::assertFalse($result);\n        // Test that mode has not been changed\n        self::assertEquals(Functions::COMPATIBILITY_EXCEL, Functions::getCompatibilityMode());\n    }\n\n    public function testReturnDateType(): void\n    {\n        $result = Functions::setReturnDateType(Functions::RETURNDATE_PHP_OBJECT);\n        // Test for a true response for success\n        self::assertTrue($result);\n        // Test that mode has been changed\n        self::assertEquals(Functions::RETURNDATE_PHP_OBJECT, Functions::getReturnDateType());\n    }\n\n    public function testInvalidReturnDateType(): void\n    {\n        $result = Functions::setReturnDateType('INVALIDTYPE');\n        // Test for a false response for failure\n        self::assertFalse($result);\n        // Test that mode has not been changed\n        self::assertEquals(Functions::RETURNDATE_EXCEL, Functions::getReturnDateType());\n    }\n\n    public function testDUMMY(): void\n    {\n        $result = Functions::DUMMY();\n        self::assertEquals('#Not Yet Implemented', $result);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerIfCondition')]\n    public function testIfCondition(string $expectedResult, string $args): void\n    {\n        $result = Functions::ifCondition($args);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIfCondition(): array\n    {\n        return require 'tests/data/Calculation/Functions/IF_CONDITION.php';\n    }\n\n    public function testDeprecatedIsFormula(): void\n    {\n        $result = Value::isFormula('=\"STRING\"');\n        self::assertEquals(ExcelError::REF(), $result);\n    }\n\n    public function testScalar(): void\n    {\n        $value = 'scalar';\n        $result = Functions::scalar([[$value]]);\n        self::assertSame($value, $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/InternalFunctionsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Internal\\ExcelArrayPseudoFunctions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass InternalFunctionsTest extends TestCase\n{\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('anchorArrayDataProvider')]\n    public function testAnchorArrayFormula(string $reference, string $range, array $expectedResult): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->returnArrayAsArray();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('SheetOne'); // no space in sheet title\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Sheet Two'); // space in sheet title\n\n        $sheet1->setCellValue('C3', '=SEQUENCE(3,3,-4)');\n        $sheet2->setCellValue('C3', '=SEQUENCE(3,3, 9, -1)');\n        $sheet1->calculateArrays();\n        $sheet2->calculateArrays();\n        $sheet1->setCellValue('A8', \"=ANCHORARRAY({$reference})\");\n\n        $result1 = $sheet1->getCell('A8')->getCalculatedValue();\n        self::assertSame($expectedResult, $result1);\n        $attributes1 = $sheet1->getCell('A8')->getFormulaAttributes();\n        self::assertSame(['t' => 'array', 'ref' => $range], $attributes1);\n        $result = ExcelArrayPseudoFunctions::anchorArray($reference, $sheet1->getCell('A10'));\n        self::assertSame($expectedResult, $result, 'direct call agrees with evaluation on spreadsheet');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function anchorArrayDataProvider(): array\n    {\n        return [\n            [\n                'C3',\n                'A8:C10',\n                [[-4, -3, -2], [-1, 0, 1], [2, 3, 4]],\n            ],\n            [\n                \"'Sheet Two'!C3\",\n                'A8:C10',\n                [[9, 8, 7], [6, 5, 4], [3, 2, 1]],\n            ],\n        ];\n    }\n\n    #[DataProvider('singleDataProvider')]\n    public function testSingleArrayFormula(string $reference, mixed $expectedResult): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->returnArrayAsArray();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('SheetOne'); // no space in sheet title\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Sheet Two'); // space in sheet title\n\n        $sheet1->setCellValue('C3', '=SEQUENCE(3,3,-4)');\n        $sheet2->setCellValue('C3', '=SEQUENCE(3,3, 9, -1)');\n\n        $sheet1->setCellValue('A8', \"=SINGLE({$reference})\");\n        $sheet1->setCellValue('G3', 'three');\n        $sheet1->setCellValue('G4', 'four');\n        $sheet1->setCellValue('G5', 'five');\n        $sheet1->setCellValue('G7', 'seven');\n        $sheet1->setCellValue('G8', 'eight');\n        $sheet1->setCellValue('G9', 'nine');\n\n        $sheet1->calculateArrays();\n        $sheet2->calculateArrays();\n\n        $result1 = $sheet1->getCell('A8')->getCalculatedValue();\n        self::assertSame($expectedResult, $result1);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function singleDataProvider(): array\n    {\n        return [\n            'array cell on same sheet' => [\n                'C3',\n                -4,\n            ],\n            'array cell on different sheet' => [\n                \"'Sheet Two'!C3\",\n                9,\n            ],\n            'range which includes current row' => [\n                'G7:G9',\n                'eight',\n            ],\n            'range which does not include current row' => [\n                'G3:G5',\n                '#VALUE!',\n            ],\n            'range which includes current row but spans columns' => [\n                'F7:G9',\n                '#VALUE!',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Issue4451Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass Issue4451Test extends TestCase\n{\n    public static function testReflectExtend1(): void\n    {\n        // Sample matrices to test with\n        $matrix1 = [[1], [3]];\n        $matrix2 = [[5], [8], [11]];\n\n        // Use reflection to make the protected method accessible\n        $calculation = new Calculation();\n        $reflectionMethod = new ReflectionMethod(Calculation::class, 'resizeMatricesExtend');\n\n        // Call the method using reflection\n        $reflectionMethod->invokeArgs($calculation, [&$matrix1, &$matrix2, count($matrix1), 1, count($matrix2), 1]);\n\n        self::assertSame([[1], [3], [null]], $matrix1); //* @phpstan-ignore-line\n    }\n\n    public static function testReflectExtend2(): void\n    {\n        // Sample matrices to test with\n        $matrix1 = [[1], [3]];\n        $matrix2 = [[5, 6], [8, 9], [11, 12]];\n\n        // Use reflection to make the protected method accessible\n        $calculation = new Calculation();\n        $reflectionMethod = new ReflectionMethod(Calculation::class, 'resizeMatricesExtend');\n\n        // Call the method using reflection\n        $reflectionMethod->invokeArgs($calculation, [&$matrix1, &$matrix2, count($matrix1), 1, count($matrix2), 2]);\n\n        self::assertSame([[1, 1], [3, 3], [null, null]], $matrix1); //* @phpstan-ignore-line\n    }\n\n    public static function testReflectShrink1(): void\n    {\n        // Sample matrices to test with\n        $matrix1 = [[10, 20], [30, 40]];\n        $matrix2 = [[50, 60, 70], [80, 90, 100], [110, 120, 130]];\n\n        // Use reflection to make the protected method accessible\n        $calculation = new Calculation();\n        $reflectionMethod = new ReflectionMethod(Calculation::class, 'resizeMatricesShrink');\n\n        // Call the method using reflection\n        $reflectionMethod->invokeArgs($calculation, [&$matrix1, &$matrix2, count($matrix1), count($matrix1), count($matrix2), count($matrix2)]);\n\n        self::assertSame([[10, 20], [30, 40]], $matrix1); //* @phpstan-ignore-line\n        self::assertSame([[50, 60], [80, 90]], $matrix2); //* @phpstan-ignore-line\n    }\n\n    public static function testReflectShrink2(): void\n    {\n        // Sample matrices to test with\n        $matrix2 = [[10, 20], [30, 40]];\n        $matrix1 = [[50, 60, 70], [80, 90, 100], [110, 120, 130]];\n\n        // Use reflection to make the protected method accessible\n        $calculation = new Calculation();\n        $reflectionMethod = new ReflectionMethod(Calculation::class, 'resizeMatricesShrink');\n\n        // Call the method using reflection\n        $reflectionMethod->invokeArgs($calculation, [&$matrix1, &$matrix2, count($matrix1), count($matrix1), count($matrix2), count($matrix2)]);\n\n        self::assertSame([[10, 20], [30, 40]], $matrix2); //* @phpstan-ignore-line\n        self::assertSame([[50, 60], [80, 90]], $matrix1); //* @phpstan-ignore-line\n    }\n\n    /**\n     * These 2 tests are contrived. They prove that method\n     * works as desired, but Excel will actually return\n     * a CALC error, a result I don't know how to duplicate.\n     */\n    public static function testExtendFirstColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Products');\n        $calculationEngine = Calculation::getInstance($spreadsheet);\n        $calculationEngine->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n\n        $sheet->getCell('D5')->setValue(5);\n        $sheet->getCell('E5')->setValue(20);\n        $sheet->fromArray(\n            [\n                [5, 20, 'Apples'],\n                [10, 20, 'Bananas'],\n                [5, 20, 'Cherries'],\n                [5, 40, 'Grapes'],\n                [25, 50, 'Peaches'],\n                [30, 60, 'Pears'],\n                [35, 70, 'Papayas'],\n                [40, 80, 'Mangos'],\n                [null, 20, 'Unknown'],\n            ],\n            null,\n            'K1',\n            true\n        );\n        $kRows = $sheet->getHighestDataRow('K');\n        self::assertSame(8, $kRows);\n        $lRows = $sheet->getHighestDataRow('L');\n        self::assertSame(9, $lRows);\n        $mRows = $sheet->getHighestDataRow('M');\n        self::assertSame(9, $mRows);\n        $sheet->getCell('A1')\n            ->setValue(\n                \"=FILTER(Products!M1:M$mRows,\"\n                    . \"(Products!K1:K$kRows=D5)\"\n                    . \"*(Products!L1:L$lRows=E5))\"\n            );\n\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertSame([['Apples'], ['Cherries']], $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testExtendSecondColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Products');\n        $calculationEngine = Calculation::getInstance($spreadsheet);\n        $calculationEngine->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n\n        $sheet->getCell('D5')->setValue(5);\n        $sheet->getCell('E5')->setValue(20);\n        $sheet->fromArray(\n            [\n                [5, 20, 'Apples'],\n                [10, 20, 'Bananas'],\n                [5, 20, 'Cherries'],\n                [5, 40, 'Grapes'],\n                [25, 50, 'Peaches'],\n                [30, 60, 'Pears'],\n                [35, 70, 'Papayas'],\n                [40, 80, 'Mangos'],\n                [null, 20, 'Unknown'],\n            ],\n            null,\n            'K1',\n            true\n        );\n        $kRows = $sheet->getHighestDataRow('K');\n        self::assertSame(8, $kRows);\n        //$lRows = $sheet->getHighestDataRow('L');\n        //self::assertSame(9, $lRows);\n        $lRows = 2;\n        $mRows = $sheet->getHighestDataRow('M');\n        self::assertSame(9, $mRows);\n        $sheet->getCell('A1')\n            ->setValue(\n                \"=FILTER(Products!M1:M$mRows,\"\n                    . \"(Products!K1:K$kRows=D5)\"\n                    . \"*(Products!L1:L$lRows=E5))\"\n            );\n\n        $result = $sheet->getCell('A1')->getCalculatedValue();\n        self::assertSame([['Apples']], $result);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Issue4656Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4656Test extends TestCase\n{\n    public function testIssue4656(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B1', 2);\n        $sheet->setCellValue('C1', 1);\n        $sheet->setCellValue('D1', 3);\n        $sheet->setCellValue('E1', 2);\n        $sheet->setCellValue('A1', '=RANK(B1,(C1,E1))');\n        $sheet->setCellValue('A2', '=RANK(B1,C1:E1)');\n        self::assertSame(1, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame(2, $sheet->getCell('A2')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIssue4656Original(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B1', 1);\n        $sheet->setCellValue('C1', 1);\n        $sheet->setCellValue('D1', 2);\n        $sheet->setCellValue('A1', '=RANK(B1,(C1,D1))');\n        self::assertSame(2, $sheet->getCell('A1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testCellRanges(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [10, 100, 1000],\n            [20, 200, 2000],\n            [30, 300, 3000],\n            [40, 400, 4000],\n            [50, 500, 5000],\n        ]);\n        $spreadsheet->addNamedRange(new NamedRange('ColumnA', $sheet, '$A$1:$A$5'));\n        $spreadsheet->addNamedRange(new NamedRange('Rows3And4', $sheet, '$A$3:$C$4'));\n\n        $sheet->setCellValue('F1', '=SUM((A1:A3, A5), (B1:B2, B4:B5), C3)');\n        self::assertSame(4310, $sheet->getCell('F1')->getCalculatedValue());\n        $sheet->setCellValue('F2', '=LARGE((A1:A5, C1:C5), 6)');\n        self::assertSame(50, $sheet->getCell('F2')->getCalculatedValue());\n\n        // test some intersections while we're at it\n        $sheet->setCellValue('F3', '=LARGE((A1:A5 A3:C4), 2)');\n        self::assertSame(30, $sheet->getCell('F3')->getCalculatedValue());\n        $sheet->setCellValue('F4', '=LARGE((ColumnA Rows3And4), 1)');\n        self::assertSame(40, $sheet->getCell('F4')->getCalculatedValue());\n        $sheet->setCellValue('F5', '=LARGE((ColumnA Rows3And4), 3)');\n        self::assertSame('#NUM!', $sheet->getCell('F5')->getCalculatedValue(), 'only 2 cells in intersection so cannot compute 3rd largest');\n\n        // back to unions\n        $sheet->setCellValue('G3', '=LARGE((A1:A5,A3:C4), 2)');\n        self::assertSame(3000, $sheet->getCell('G3')->getCalculatedValue());\n        $sheet->setCellValue('G4', '=LARGE((ColumnA,Rows3And4), 1)');\n        self::assertSame(4000, $sheet->getCell('G4')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/Issue606Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue606Test extends TestCase\n{\n    public function testIssue606(): void\n    {\n        $spreadSheet = new Spreadsheet();\n        $sheet = $spreadSheet->getActiveSheet();\n        // some dummy data\n        $sheet->getCell('A4')->setValue(2);\n        $sheet->getCell('A5')->setValue(2);\n        $sheet->getCell('A6')->setValue(3);\n\n        $sheet->getCell('A1')->setValue('=FREQUENCY(A4:A6,A4:A6)');\n        $sheet->getCell('A1')->setCalculatedValue(123);\n        self::assertSame(\n            123,\n            $sheet->getCell('A1')->getCalculatedValue(),\n            'unimplemented function uses old calculated value'\n        );\n\n        $sheet->getCell('A2')\n            ->setValue('=SUM(FREQUENCY(A4:A6,A4:A6))');\n        $sheet->getCell('A2')->setCalculatedValue(124);\n        self::assertSame(\n            124,\n            $sheet->getCell('A2')->getCalculatedValue(),\n            'unimplemented propagates so use old calculated value'\n        );\n\n        $sheet->getCell('A3')->setValue(\n            '=SUM(IF(FREQUENCY(IF(SUBTOTAL(3, OFFSET(A4:A6,ROW(A4:A6)-ROW(A4),0,1)), MATCH(A4:A6,A4:A6,0)), ROW(A4:A6)-ROW(A4)+1)>0,1))'\n        );\n        $sheet->getCell('A3')->setCalculatedValue(125);\n        self::assertSame(\n            125,\n            $sheet->getCell('A3')->getCalculatedValue(),\n            'unimplemented propagates to comparison then IF so use old calculated value'\n        );\n\n        $sheet->getCell('D1')->setValue(3);\n        $sheet->getCell('D2')->setValue(0);\n        $sheet->getCell('E1')->setCalculatedValue(126);\n        $sheet->getCell('E1')\n            ->setValue('=IF(0 > D1/D2, 0, 1)');\n        self::assertSame(\n            '#DIV/0!',\n            $sheet->getCell('E1')->getCalculatedValue(),\n            'DIV0 propagates to comparison then IF, no need for old calculated value'\n        );\n\n        $sheet->getCell('D5')\n            ->setValue('=MAX(1, FREQUENCY(1,2), 2)');\n        $sheet->getCell('D6')\n            ->setValue('=MAXA(1, FREQUENCY(1,2), 2)');\n        $sheet->getCell('D7')\n            ->setValue('=MIN(1, FREQUENCY(1,2), 2)');\n        $sheet->getCell('D8')\n            ->setValue('=MINA(1, FREQUENCY(1,2), 2)');\n        self::assertNull($sheet->getCell('D5')->getCalculatedValue());\n        self::assertNull($sheet->getCell('D6')->getCalculatedValue());\n        self::assertNull($sheet->getCell('D7')->getCalculatedValue());\n        self::assertNull($sheet->getCell('D8')->getCalculatedValue());\n\n        $sheet->getCell('F1')->setValue(1);\n        $sheet->getCell('F2')->setValue(3);\n        $sheet->getCell('F3')->setValue(2);\n        $sheet->getCell('F5')->setValue('=SORT(F1:F3, SQRT(-1))');\n        self::assertSame('#NUM!', $sheet->getCell('F5')->getCalculatedValue());\n        $sheet->getCell('F7')->setValue('=SORT(F1:F3, FREQUENCY(1, 2))');\n        self::assertNull($sheet->getCell('F7')->getCalculatedValue());\n\n        $sheet->getCell('H1')->setValue('=ROWS(FREQUENCY(1,2))');\n        $sheet->getCell('H2')->setValue('=COLUMNS(FREQUENCY(1,2))');\n        self::assertNull($sheet->getCell('H1')->getCalculatedValue());\n        self::assertNull($sheet->getCell('H2')->getCalculatedValue());\n\n        $spreadSheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/MergedCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MergedCellTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerWorksheetFormulaeColumns')]\n    public function testMergedCellColumns(string $formula, mixed $expectedResult): void\n    {\n        $spreadSheet = new Spreadsheet();\n\n        $dataSheet = $spreadSheet->getActiveSheet();\n        $dataSheet->setCellValue('A5', 3.3);\n        $dataSheet->setCellValue('A3', 3.3);\n        $dataSheet->setCellValue('A2', 2.2);\n        $dataSheet->setCellValue('A1', 1.1);\n        $dataSheet->setCellValue('B2', 2.2);\n        $dataSheet->setCellValue('B1', 1.1);\n        $dataSheet->setCellValue('C2', 4.4);\n        $dataSheet->setCellValue('C1', 3.3);\n        $dataSheet->mergeCells('A2:A4');\n        $dataSheet->mergeCells('B:B');\n        $worksheet = $spreadSheet->getActiveSheet();\n\n        $worksheet->setCellValue('A7', $formula);\n\n        $result = $worksheet->getCell('A7')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n        $spreadSheet->disconnectWorksheets();\n    }\n\n    public static function providerWorksheetFormulaeColumns(): array\n    {\n        return [\n            ['=SUM(A1:A5)', 6.6],\n            ['=COUNT(A1:A5)', 3],\n            ['=COUNTA(A1:A5)', 3],\n            ['=SUM(A3:A4)', 0],\n            ['=A2+A3+A4', 2.2],\n            ['=A2/A3', ExcelError::DIV0()],\n            ['=SUM(B1:C2)', 8.8],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerWorksheetFormulaeRows')]\n    public function testMergedCellRows(string $formula, mixed $expectedResult): void\n    {\n        $spreadSheet = new Spreadsheet();\n\n        $dataSheet = $spreadSheet->getActiveSheet();\n        $dataSheet->setCellValue('A1', 1.1);\n        $dataSheet->setCellValue('B1', 2.2);\n        $dataSheet->setCellValue('C1', 3.3);\n        $dataSheet->setCellValue('E1', 3.3);\n        $dataSheet->setCellValue('A2', 1.1);\n        $dataSheet->setCellValue('B2', 2.2);\n        $dataSheet->setCellValue('A3', 3.3);\n        $dataSheet->setCellValue('B3', 4.4);\n        $dataSheet->mergeCells('B1:D1');\n        $dataSheet->mergeCells('A2:B2');\n        $worksheet = $spreadSheet->getActiveSheet();\n\n        $worksheet->setCellValue('A7', $formula);\n\n        $result = $worksheet->getCell('A7')->getCalculatedValue();\n        self::assertSame($expectedResult, $result);\n        $spreadSheet->disconnectWorksheets();\n    }\n\n    public static function providerWorksheetFormulaeRows(): array\n    {\n        return [\n            ['=SUM(A1:E1)', 6.6],\n            ['=COUNT(A1:E1)', 3],\n            ['=COUNTA(A1:E1)', 3],\n            ['=SUM(C1:D1)', 0],\n            ['=B1+C1+D1', 2.2],\n            ['=B1/C1', ExcelError::DIV0()],\n            ['=SUM(A2:B3)', 8.8],\n        ];\n    }\n\n    private function setBadRange(Worksheet $sheet, string $range): void\n    {\n        try {\n            $sheet->mergeCells($range);\n            self::fail(\"Expected invalid merge range $range\");\n        } catch (SpreadException $e) {\n            self::assertSame('Merge must be on a valid range of cells.', $e->getMessage());\n        }\n    }\n\n    public function testMergedBadRange(): void\n    {\n        $spreadSheet = new Spreadsheet();\n\n        $dataSheet = $spreadSheet->getActiveSheet();\n        // TODO - Reinstate full validation and disallow single cell merging for version 2.0\n//        $this->setBadRange($dataSheet, 'B1');\n        $this->setBadRange($dataSheet, 'Invalid');\n        $this->setBadRange($dataSheet, '1');\n        $this->setBadRange($dataSheet, 'C');\n        $this->setBadRange($dataSheet, 'B1:C');\n        $this->setBadRange($dataSheet, 'B:C2');\n\n        $spreadSheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/MissingArgumentsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcExp;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MissingArgumentsTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMissingArguments')]\n    public function testMissingArguments(mixed $expected, string $formula): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($formula);\n        $sheet->getCell('B1')->setValue(1);\n\n        try {\n            self::assertSame($expected, $sheet->getCell('A1')->getCalculatedValue());\n        } catch (CalcExp $e) {\n            self::assertSame('exception', $expected);\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerMissingArguments(): array\n    {\n        return [\n            'argument missing at end' => [0, '=min(3,2,)'],\n            'argument missing at beginning' => [0, '=mina(,3,2)'],\n            'argument missing in middle' => [0, '=min(3,,2)'],\n            'missing argument is not result' => [-2, '=min(3,-2,)'],\n            'max with missing argument' => [0, '=max(-3,-2,)'],\n            'maxa with missing argument' => [0, '=maxa(-3,-2,)'],\n            'max with null cell' => [-2, '=max(-3,-2,Z1)'],\n            'min with null cell' => [2, '=min(3,2,Z1)'],\n            'product ignores null argument' => [6.0, '=product(3,2,)'],\n            'embedded function' => [5, '=sum(3,2,min(3,2,))'],\n            'unaffected embedded function' => [8, '=sum(3,2,max(3,2,))'],\n            'if true missing at end' => [0, '=if(b1=1,min(3,2,),product(3,2,))'],\n            'if false missing at end' => [6.0, '=if(b1=2,min(3,2,),product(3,2,))'],\n            'if true missing in middle' => [0, '=if(b1=1,min(3,,2),product(3,,2))'],\n            'if false missing in middle' => [6.0, '=if(b1=2,min(3,,2),product(3,,2))'],\n            'if true missing at beginning' => [0, '=if(b1=1,min(,3,2),product(,3,2))'],\n            'if false missing at beginning' => [6.0, '=if(b1=2,min(,3,2),product(,3,2))'],\n            'if true nothing missing' => [2, '=if(b1=1,min(3,2),product(3,2))'],\n            'if false nothing missing' => [6.0, '=if(b1=2,min(3,2),product(3,2))'],\n            'if true empty arg' => [0, '=if(b1=1,)'],\n            'if true omitted args' => ['exception', '=if(b1=1)'],\n            'if true missing arg' => [0, '=if(b1=1,,6)'],\n            'if false missing arg' => [0, '=if(b1=2,6,)'],\n            'if false omitted arg' => [false, '=if(b1=2,6)'],\n            'multiple ifs and omissions' => [0, '=IF(0<9,,IF(0=0,,1))'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/NullEqualsZeroTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NullEqualsZeroTest extends TestCase\n{\n    public function testNullEqualsZero(): void\n    {\n        // Confirm that NULL<>0 returns false\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            ['Item', 'QTY', 'RATE', 'RATE', 'Total'],\n            ['Bricks', 1000, 'Each', 0.55, '=IF(B2<>0,B2*D2,\"INCL.\")'],\n            ['Cement', null, null, null, '=IF(B3<>0,B3*D3,\"INCL.\")'],\n            ['Labour', 10, 'Hour', 45.00, '=IF(B4<>0,B4*D4,\"INCL.\")'],\n        ]);\n        $sheet->setCellValue('A6', 'Total');\n        $sheet->setCellValue('E6', '=SUM(E1:E5)');\n        self::assertEquals(550.00, $sheet->getCell('E2')->getCalculatedValue());\n        self::assertSame('INCL.', $sheet->getCell('E3')->getCalculatedValue());\n        self::assertEquals(450.00, $sheet->getCell('E4')->getCalculatedValue());\n        self::assertEquals(1000.00, $sheet->getCell('E6')->getCalculatedValue());\n\n        $sheet->setCellValue('Z1', '=Z2=0');\n        self::assertTrue($sheet->getCell('Z1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\Operands\\StructuredReference;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ParseFormulaTest extends TestCase\n{\n    /** @param mixed[] $expectedStack */\n    #[DataProvider('providerBinaryOperations')]\n    public function testParseOperations(array $expectedStack, string $formula): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->addNamedRange(new NamedRange('GROUP1', $spreadsheet->getActiveSheet(), 'B2:D4'));\n        $spreadsheet->addNamedRange(new NamedRange('GROUP2', $spreadsheet->getActiveSheet(), 'D4:F6'));\n\n        $parser = Calculation::getInstance($spreadsheet);\n        $stack = $parser->parseFormula($formula);\n        self::assertEquals($expectedStack, $stack);\n    }\n\n    public static function providerBinaryOperations(): array\n    {\n        return [\n            'Unary negative with Value' => [\n                [\n                    ['type' => 'Value', 'value' => 3, 'reference' => null],\n                    ['type' => 'Unary Operator', 'value' => '~', 'reference' => null],\n                ],\n                '=-3',\n            ],\n            'Unary negative percentage with Value' => [\n                [\n                    ['type' => 'Value', 'value' => 3, 'reference' => null],\n                    ['type' => 'Unary Operator', 'value' => '%', 'reference' => null],\n                    ['type' => 'Unary Operator', 'value' => '~', 'reference' => null],\n                ],\n                '=-3%',\n            ],\n            'Binary minus with Values' => [\n                [\n                    ['type' => 'Value', 'value' => 3, 'reference' => null],\n                    ['type' => 'Value', 'value' => 4, 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '-', 'reference' => null],\n                ],\n                '=3-4',\n            ],\n            'Unary negative with Cell Reference' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => 'A1', 'reference' => 'A1'],\n                    ['type' => 'Unary Operator', 'value' => '~', 'reference' => null],\n                ],\n                '=-A1',\n            ],\n            'Unary negative with FQ Cell Reference' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => \"'Sheet 1'!A1\", 'reference' => \"'Sheet 1'!A1\"],\n                    ['type' => 'Unary Operator', 'value' => '~', 'reference' => null],\n                ],\n                \"=-'Sheet 1'!A1\",\n            ],\n            'Unary negative percentage with Cell Reference' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => 'A1', 'reference' => 'A1'],\n                    ['type' => 'Unary Operator', 'value' => '%', 'reference' => null],\n                    ['type' => 'Unary Operator', 'value' => '~', 'reference' => null],\n                ],\n                '=-A1%',\n            ],\n            'Unary negative with Defined Name' => [\n                [\n                    ['type' => 'Defined Name', 'value' => 'DEFINED_NAME', 'reference' => 'DEFINED_NAME'],\n                    ['type' => 'Unary Operator', 'value' => '~', 'reference' => null],\n                ],\n                '=-DEFINED_NAME',\n            ],\n            'Unary negative percentage with Defined Name' => [\n                [\n                    ['type' => 'Defined Name', 'value' => 'DEFINED_NAME', 'reference' => 'DEFINED_NAME'],\n                    ['type' => 'Unary Operator', 'value' => '%', 'reference' => null],\n                    ['type' => 'Unary Operator', 'value' => '~', 'reference' => null],\n                ],\n                '=-DEFINED_NAME%',\n            ],\n            'Integer Numbers with Operator' => [\n                [\n                    ['type' => 'Value', 'value' => 2, 'reference' => null],\n                    ['type' => 'Value', 'value' => 3, 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '*', 'reference' => null],\n                ],\n                '=2*3',\n            ],\n            'Float Numbers with Operator' => [\n                [\n                    ['type' => 'Value', 'value' => 2.5, 'reference' => null],\n                    ['type' => 'Value', 'value' => 3.5, 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '*', 'reference' => null],\n                ],\n                '=2.5*3.5',\n            ],\n            'Strings with Operator' => [\n                [\n                    ['type' => 'Value', 'value' => '\"HELLO\"', 'reference' => null],\n                    ['type' => 'Value', 'value' => '\"WORLD\"', 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '&', 'reference' => null],\n                ],\n                '=\"HELLO\"&\"WORLD\"',\n            ],\n            'Error' => [\n                [\n                    ['type' => 'Value', 'value' => '#DIV0!', 'reference' => null],\n                ],\n                '=#DIV0!',\n            ],\n            'Cell Range' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => 'A1', 'reference' => 'A1'],\n                    ['type' => 'Cell Reference', 'value' => 'C3', 'reference' => 'C3'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                ],\n                '=A1:C3',\n            ],\n            'Chained Cell Range' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => 'A1', 'reference' => 'A1'],\n                    ['type' => 'Cell Reference', 'value' => 'C3', 'reference' => 'C3'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Cell Reference', 'value' => 'E5', 'reference' => 'E5'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                ],\n                '=A1:C3:E5',\n            ],\n            'Cell Range Intersection' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => 'A1', 'reference' => 'A1'],\n                    ['type' => 'Cell Reference', 'value' => 'C3', 'reference' => 'C3'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Cell Reference', 'value' => 'B2', 'reference' => 'B2'],\n                    ['type' => 'Cell Reference', 'value' => 'D4', 'reference' => 'D4'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '∩', 'reference' => null],\n                ],\n                '=A1:C3 B2:D4',\n            ],\n            'Row Range' => [\n                [\n                    ['type' => 'Row Reference', 'value' => 'A2', 'reference' => 'A2'],\n                    ['type' => 'Row Reference', 'value' => 'XFD3', 'reference' => 'XFD3'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                ],\n                '=2:3',\n            ],\n            'Column Range' => [\n                [\n                    ['type' => 'Column Reference', 'value' => 'B1', 'reference' => 'B1'],\n                    ['type' => 'Column Reference', 'value' => 'C1048576', 'reference' => 'C1048576'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                ],\n                '=B:C',\n            ],\n            'Combined Cell Reference and Column Range' => [\n                [\n                    ['type' => 'Column Reference', 'value' => \"'sheet1'!A1\", 'reference' => \"'sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'sheet1'!A1048576\", 'reference' => \"'sheet1'!A1048576\"],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Operand Count for Function MIN()', 'value' => 1, 'reference' => null],\n                    ['type' => 'Function', 'value' => 'MIN(', 'reference' => null],\n                    ['type' => 'Cell Reference', 'value' => \"'sheet1'!A1\", 'reference' => \"'sheet1'!A1\"],\n                    ['type' => 'Binary Operator', 'value' => '+', 'reference' => null],\n                ],\n                \"=MIN('sheet1'!A:A) + 'sheet1'!A1\",\n            ],\n            'Combined Cell Reference and Column Range Unquoted Sheet' => [\n                [\n                    ['type' => 'Column Reference', 'value' => 'sheet1!A1', 'reference' => 'sheet1!A1'],\n                    ['type' => 'Column Reference', 'value' => 'sheet1!A1048576', 'reference' => 'sheet1!A1048576'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Operand Count for Function MIN()', 'value' => 1, 'reference' => null],\n                    ['type' => 'Function', 'value' => 'MIN(', 'reference' => null],\n                    ['type' => 'Cell Reference', 'value' => 'sheet1!A1', 'reference' => 'sheet1!A1'],\n                    ['type' => 'Binary Operator', 'value' => '+', 'reference' => null],\n                ],\n                '=MIN(sheet1!A:A) + sheet1!A1',\n            ],\n            'Combined Cell Reference and Column Range with quote' => [\n                [\n                    ['type' => 'Column Reference', 'value' => \"'Mark's sheet1'!A1\", 'reference' => \"'Mark's sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'Mark's sheet1'!A1048576\", 'reference' => \"'Mark's sheet1'!A1048576\"],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Operand Count for Function MIN()', 'value' => 1, 'reference' => null],\n                    ['type' => 'Function', 'value' => 'MIN(', 'reference' => null],\n                    ['type' => 'Cell Reference', 'value' => \"'Mark's sheet1'!A1\", 'reference' => \"'Mark's sheet1'!A1\"],\n                    ['type' => 'Binary Operator', 'value' => '+', 'reference' => null],\n                ],\n                \"=MIN('Mark''s sheet1'!A:A) + 'Mark''s sheet1'!A1\",\n            ],\n            'Combined Cell Reference and Column Range with unescaped quote' => [\n                [\n                    ['type' => 'Column Reference', 'value' => \"'Mark's sheet1'!A1\", 'reference' => \"'Mark's sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'Mark's sheet1'!A1048576\", 'reference' => \"'Mark's sheet1'!A1048576\"],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Operand Count for Function MIN()', 'value' => 1, 'reference' => null],\n                    ['type' => 'Function', 'value' => 'MIN(', 'reference' => null],\n                    ['type' => 'Cell Reference', 'value' => \"'Mark's sheet1'!A1\", 'reference' => \"'Mark's sheet1'!A1\"],\n                    ['type' => 'Binary Operator', 'value' => '+', 'reference' => null],\n                ],\n                \"=MIN('Mark's sheet1'!A:A) + 'Mark's sheet1'!A1\",\n            ],\n            'Combined Column Range and Cell Reference' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => \"'sheet1'!A1\", 'reference' => \"'sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'sheet1'!A1\", 'reference' => \"'sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'sheet1'!A1048576\", 'reference' => \"'sheet1'!A1048576\"],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Operand Count for Function MIN()', 'value' => 1, 'reference' => null],\n                    ['type' => 'Function', 'value' => 'MIN(', 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '+', 'reference' => null],\n                ],\n                \"='sheet1'!A1 + MIN('sheet1'!A:A)\",\n            ],\n            'Combined Column Range and Cell Reference with quote' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => \"'Mark's sheet1'!A1\", 'reference' => \"'Mark's sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'Mark's sheet1'!A1\", 'reference' => \"'Mark's sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'Mark's sheet1'!A1048576\", 'reference' => \"'Mark's sheet1'!A1048576\"],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Operand Count for Function MIN()', 'value' => 1, 'reference' => null],\n                    ['type' => 'Function', 'value' => 'MIN(', 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '+', 'reference' => null],\n                ],\n                \"='Mark''s sheet1'!A1 + MIN('Mark''s sheet1'!A:A)\",\n            ],\n            'Combined Column Range and Cell Reference with unescaped quote' => [\n                [\n                    ['type' => 'Cell Reference', 'value' => \"'Mark's sheet1'!A1\", 'reference' => \"'Mark's sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'Mark's sheet1'!A1\", 'reference' => \"'Mark's sheet1'!A1\"],\n                    ['type' => 'Column Reference', 'value' => \"'Mark's sheet1'!A1048576\", 'reference' => \"'Mark's sheet1'!A1048576\"],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Operand Count for Function MIN()', 'value' => 1, 'reference' => null],\n                    ['type' => 'Function', 'value' => 'MIN(', 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '+', 'reference' => null],\n                ],\n                \"='Mark's sheet1'!A1 + MIN('Mark's sheet1'!A:A)\",\n            ],\n            'Range with Defined Names' => [\n                [\n                    ['type' => 'Defined Name', 'value' => 'GROUP1', 'reference' => 'GROUP1'],\n                    ['type' => 'Defined Name', 'value' => 'D4', 'reference' => 'GROUP2'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                    ['type' => 'Defined Name', 'value' => 'F6', 'reference' => 'GROUP2'],\n                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n                ],\n                '=GROUP1:GROUP2',\n            ],\n            'Named Range with Binary Operator' => [\n                [\n                    ['type' => 'Defined Name', 'value' => 'DEFINED_NAME_1', 'reference' => 'DEFINED_NAME_1'],\n                    ['type' => 'Defined Name', 'value' => 'DEFINED_NAME_2', 'reference' => 'DEFINED_NAME_2'],\n                    ['type' => 'Binary Operator', 'value' => '/', 'reference' => null],\n                ],\n                '=DEFINED_NAME_1/DEFINED_NAME_2',\n            ],\n            'Named Range Intersection' => [\n                [\n                    ['type' => 'Defined Name', 'value' => 'DEFINED_NAME_1', 'reference' => 'DEFINED_NAME_1'],\n                    ['type' => 'Defined Name', 'value' => 'DEFINED_NAME_2', 'reference' => 'DEFINED_NAME_2'],\n                    ['type' => 'Binary Operator', 'value' => '∩', 'reference' => null],\n                ],\n                '=DEFINED_NAME_1 DEFINED_NAME_2',\n            ],\n            'Fully Qualified Structured Reference' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('DeptSales[@Commission Amount]'), 'reference' => null],\n                ],\n                '=DeptSales[@Commission Amount]',\n            ],\n            'Fully Qualified Nested Structured Reference' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('DeptSales[[#Totals],[Sales Amount]]'), 'reference' => null],\n                ],\n                '=DeptSales[[#Totals],[Sales Amount]]',\n            ],\n            'Complex Range Fully Qualified Nested Structured Reference' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('Sales_Data[[#This Row],[Q1]:[Q4]]'), 'reference' => null],\n                ],\n                '=Sales_Data[[#This Row],[Q1]:[Q4]]',\n            ],\n            'Complex Range Fully Qualified Nested Structured Reference 2' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('DeptSales[[#Headers],[Region]:[Commission Amount]]'), 'reference' => null],\n                ],\n                '=DeptSales[[#Headers],[Region]:[Commission Amount]]',\n            ],\n            'Multi-RowGroup Fully Qualified Nested Structured Reference' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('DeptSales[[#Headers],[#Data],[% Commission]]'), 'reference' => null],\n                ],\n                '=DeptSales[[#Headers],[#Data],[% Commission]]',\n            ],\n            'Unqualified Structured Reference' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('[@Quantity]'), 'reference' => null],\n                ],\n                '=[@Quantity]',\n            ],\n            'Unqualified Nested Structured Reference' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('[@[Unit Price]]'), 'reference' => null],\n                ],\n                '=[@[Unit Price]]',\n            ],\n            'Fully Qualified Full Table Structured Reference' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('DeptSales[]'), 'reference' => null],\n                ],\n                '=DeptSales[]',\n            ],\n            'Unqualified Full Table Structured Reference' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('[]'), 'reference' => null],\n                ],\n                '=[]',\n            ],\n            'Structured Reference Arithmetic' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('[@Quantity]'), 'reference' => null],\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('[@[Unit Price]]'), 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '*', 'reference' => null],\n                ],\n                '=[@Quantity]*[@[Unit Price]]',\n            ],\n            'Structured Reference Intersection' => [\n                [\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('DeptSales[[Sales Person]:[Sales Amount]]'), 'reference' => null],\n                    ['type' => 'Structured Reference', 'value' => new StructuredReference('DeptSales[[Region]:[% Commission]]'), 'reference' => null],\n                    ['type' => 'Binary Operator', 'value' => '∩', 'reference' => null],\n                ],\n                '=DeptSales[[Sales Person]:[Sales Amount]] DeptSales[[Region]:[% Commission]]',\n            ],\n            //            'Cell Range Union' => [\n            //                [\n            //                    ['type' => 'Cell Reference', 'value' => 'A1', 'reference' => 'A1'],\n            //                    ['type' => 'Cell Reference', 'value' => 'C3', 'reference' => 'C3'],\n            //                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n            //                    ['type' => 'Cell Reference', 'value' => 'B2', 'reference' => 'B2'],\n            //                    ['type' => 'Cell Reference', 'value' => 'D4', 'reference' => 'D4'],\n            //                    ['type' => 'Binary Operator', 'value' => ':', 'reference' => null],\n            //                    ['type' => 'Binary Operator', 'value' => '∪', 'reference' => null],\n            //                ],\n            //                '=A1:C3,B2:D4',\n            //            ],\n            //            'Named Range Union' => [\n            //                [\n            //                    ['type' => 'Defined Name', 'value' => 'DEFINED_NAME_1', 'reference' => 'DEFINED_NAME_1'],\n            //                    ['type' => 'Defined Name', 'value' => 'DEFINED_NAME_2', 'reference' => 'DEFINED_NAME_2'],\n            //                    ['type' => 'Binary Operator', 'value' => '∪', 'reference' => null],\n            //                ],\n            //                '=DEFINED_NAME_1,DEFINED_NAME_2',\n            //            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/RefErrorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RefErrorTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRefError')]\n    public function testRefError(mixed $expected, string $formula): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Sheet1');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Sheet2');\n        $sheet2->getCell('A1')->setValue(5);\n        $sheet1->getCell('A1')->setValue(9);\n        $sheet1->getCell('A2')->setValue(2);\n        $sheet1->getCell('A3')->setValue(4);\n        $sheet1->getCell('A4')->setValue(6);\n        $sheet1->getCell('A5')->setValue(7);\n        $sheet1->getRowDimension(5)->setVisible(false);\n        $sheet1->getCell('B1')->setValue('=1/0');\n        $sheet1->getCell('C1')->setValue('=Sheet99!A1');\n        $sheet1->getCell('C2')->setValue('=Sheet2!A1');\n        $sheet1->getCell('C3')->setValue('=Sheet2!A2');\n        $sheet1->getCell('H1')->setValue($formula);\n        self::assertSame($expected, $sheet1->getCell('H1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerRefError(): array\n    {\n        return [\n            'Subtotal9 Ok' => [12, '=SUBTOTAL(A1,A2:A4)'],\n            'Subtotal9 REF' => ['#REF!', '=SUBTOTAL(A1,A2:A4,C1)'],\n            'Subtotal9 with literal and cells' => [111, '=SUBTOTAL(A1,A2:A4,99)'],\n            'Subtotal9 with literal no rows hidden' => [111, '=SUBTOTAL(109,A2:A4,99)'],\n            'Subtotal9 with literal ignoring hidden row' => [111, '=SUBTOTAL(109,A2:A5,99)'],\n            'Subtotal9 with literal using hidden row' => [118, '=SUBTOTAL(9,A2:A5,99)'],\n            'Subtotal9 with Null same sheet' => [12, '=SUBTOTAL(A1,A2:A4,A99)'],\n            'Subtotal9 with Null Different sheet' => [12, '=SUBTOTAL(A1,A2:A4,C3)'],\n            'Subtotal9 with NonNull Different sheet' => [17, '=SUBTOTAL(A1,A2:A4,C2)'],\n            'Product DIV0' => ['#DIV/0!', '=PRODUCT(2, 3, B1)'],\n            'Sqrt REF' => ['#REF!', '=SQRT(C1)'],\n            'Sum NUM' => ['#NUM!', '=SUM(SQRT(-1), A2:A4)'],\n            'Sum with literal and cells' => [111, '=SUM(A2:A4, 99)'],\n            'Sum REF' => ['#REF!', '=SUM(A2:A4, C1)'],\n            'Tan DIV0' => ['#DIV/0!', '=TAN(B1)'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowColumnReferenceTest extends TestCase\n{\n    protected Spreadsheet $spreadSheet;\n\n    protected function setUp(): void\n    {\n        $this->spreadSheet = new Spreadsheet();\n\n        $dataSheet = new Worksheet($this->spreadSheet, 'data sheet');\n        $this->spreadSheet->addSheet($dataSheet, 0);\n        $dataSheet->setCellValue('B1', 1.1);\n        $dataSheet->setCellValue('B2', 2.2);\n        $dataSheet->setCellValue('B3', 4.4);\n        $dataSheet->setCellValue('C3', 8.8);\n        $dataSheet->setCellValue('D3', 16.16);\n\n        $calcSheet = new Worksheet($this->spreadSheet, 'summary sheet');\n        $this->spreadSheet->addSheet($calcSheet, 1);\n        $calcSheet->setCellValue('B1', 2.2);\n        $calcSheet->setCellValue('B2', 4.4);\n        $calcSheet->setCellValue('B3', 8.8);\n        $calcSheet->setCellValue('C3', 16.16);\n        $calcSheet->setCellValue('D3', 32.32);\n\n        $this->spreadSheet->setActiveSheetIndexByName('summary sheet');\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCurrentWorksheetFormulae')]\n    public function testCurrentWorksheet(string $formula, float $expectedResult): void\n    {\n        $worksheet = $this->spreadSheet->getActiveSheet();\n\n        $worksheet->setCellValue('A1', $formula);\n\n        $result = $worksheet->getCell('A1')->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public static function providerCurrentWorksheetFormulae(): array\n    {\n        return [\n            'relative range in active worksheet' => ['=SUM(B1:B3)', 15.4],\n            'range with absolute columns in active worksheet' => ['=SUM($B1:$B3)', 15.4],\n            'range with absolute rows in active worksheet' => ['=SUM(B$1:B$3)', 15.4],\n            'range with absolute columns and rows in active worksheet' => ['=SUM($B$1:$B$3)', 15.4],\n            'another relative range in active worksheet' => ['=SUM(B3:D3)', 57.28],\n            'relative column range in active worksheet' => ['=SUM(B:B)', 15.4],\n            'absolute column range in active worksheet' => ['=SUM($B:$B)', 15.4],\n            'relative row range in active worksheet' => ['=SUM(3:3)', 57.28],\n            'absolute row range in active worksheet' => ['=SUM($3:$3)', 57.28],\n            'relative range in specified active worksheet' => ['=SUM(\\'summary sheet\\'!B1:B3)', 15.4],\n            'range with absolute columns in specified active worksheet' => ['=SUM(\\'summary sheet\\'!$B1:$B3)', 15.4],\n            'range with absolute rows in specified active worksheet' => ['=SUM(\\'summary sheet\\'!B$1:B$3)', 15.4],\n            'range with absolute columns and rows in specified active worksheet' => ['=SUM(\\'summary sheet\\'!$B$1:$B$3)', 15.4],\n            'another relative range in specified active worksheet' => ['=SUM(\\'summary sheet\\'!B3:D3)', 57.28],\n            'relative column range in specified active worksheet' => ['=SUM(\\'summary sheet\\'!B:B)', 15.4],\n            'absolute column range in specified active worksheet' => ['=SUM(\\'summary sheet\\'!$B:$B)', 15.4],\n            'relative row range in specified active worksheet' => ['=SUM(\\'summary sheet\\'!3:3)', 57.28],\n            'absolute row range in specified active worksheet' => ['=SUM(\\'summary sheet\\'!$3:$3)', 57.28],\n            'relative range in specified other worksheet' => ['=SUM(\\'data sheet\\'!B1:B3)', 7.7],\n            'range with absolute columns in specified other worksheet' => ['=SUM(\\'data sheet\\'!$B1:$B3)', 7.7],\n            'range with absolute rows in specified other worksheet' => ['=SUM(\\'data sheet\\'!B$1:B$3)', 7.7],\n            'range with absolute columns and rows in specified other worksheet' => ['=SUM(\\'data sheet\\'!$B$1:$B$3)', 7.7],\n            'another relative range in specified other worksheet' => ['=SUM(\\'data sheet\\'!B3:D3)', 29.36],\n            'relative column range in specified other worksheet' => ['=SUM(\\'data sheet\\'!B:B)', 7.7],\n            'absolute column range in specified other worksheet' => ['=SUM(\\'data sheet\\'!$B:$B)', 7.7],\n            'relative row range in specified other worksheet' => ['=SUM(\\'data sheet\\'!3:3)', 29.36],\n            'absolute row range in specified other worksheet' => ['=SUM(\\'data sheet\\'!$3:$3)', 29.36],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/StringLengthTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StringLengthTest extends TestCase\n{\n    public function testStringLength(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        // Note use Armenian character below to make sure chars, not bytes\n        $longstring = str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5);\n        $sheet->getCell('C1')->setValue($longstring);\n        self::assertSame($longstring, $sheet->getCell('C1')->getValue());\n        $sheet->getCell('C2')->setValue($longstring . 'abcdef');\n        self::assertSame($longstring . 'abcde', $sheet->getCell('C2')->getValue());\n        $sheet->getCell('C3')->setValue('abcdef');\n        $sheet->getCell('C4')->setValue('=C1 & C3');\n        self::assertSame($longstring . 'abcde', $sheet->getCell('C4')->getCalculatedValue(), 'truncate cell concat with cell');\n        $sheet->getCell('C5')->setValue('=C1 & \"A\"');\n        self::assertSame($longstring . 'A', $sheet->getCell('C5')->getCalculatedValue(), 'okay cell concat with literal');\n        $sheet->getCell('C6')->setValue('=C1 & \"ABCDEF\"');\n        self::assertSame($longstring . 'ABCDE', $sheet->getCell('C6')->getCalculatedValue(), 'truncate cell concat with literal');\n        $sheet->getCell('C7')->setValue('=\"ABCDEF\" & C1');\n        self::assertSame('ABCDEF' . str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 6), $sheet->getCell('C7')->getCalculatedValue(), 'truncate literal concat with cell');\n        $sheet->getCell('C8')->setValue('=\"ABCDE\" & C1');\n        self::assertSame('ABCDE' . $longstring, $sheet->getCell('C8')->getCalculatedValue(), 'okay literal concat with cell');\n        $sheet->getCell('C9')->setValue('=false & true & 3');\n        self::assertSame('FALSETRUE3', $sheet->getCell('C9')->getCalculatedValue());\n        $sheet->getCell('D8')->setValue('abcde');\n        $sheet->getCell('D9')->setValue('=D8 & \"*\" & D8');\n        self::assertSame('abcde*abcde', $sheet->getCell('D9')->getCalculatedValue());\n        $sheet->getCell('E8')->setValue('\"abcde\"');\n        $sheet->getCell('E9')->setValue('=E8 & \"*\" & E8');\n        self::assertSame('\"abcde\"*\"abcde\"', $sheet->getCell('E9')->getCalculatedValue());\n        $sheet->getCell('F8')->setValue('\"abcde\"');\n        $sheet->getCell('F9')->setValue('=F8 & \"*\" & \"abcde\"');\n        self::assertSame('\"abcde\"*abcde', $sheet->getCell('F9')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/StructuredReferenceFormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StructuredReferenceFormulaTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('structuredReferenceProvider')]\n    public function testStructuredReferences(float $expectedValue, string $cellAddress): void\n    {\n        $inputFileType = 'Xlsx';\n        $inputFileName = __DIR__ . '/../../data/Calculation/TableFormulae.xlsx';\n\n        $reader = IOFactory::createReader($inputFileType);\n        $spreadsheet = $reader->load($inputFileName);\n\n        $calculatedCellValue = $spreadsheet->getActiveSheet()->getCell($cellAddress)->getCalculatedValue();\n        self::assertEqualsWithDelta($expectedValue, $calculatedCellValue, 1.0e-14, \"Failed calculation for cell {$cellAddress}\");\n    }\n\n    public function testStructuredReferenceHiddenHeaders(): void\n    {\n        $inputFileType = 'Xlsx';\n        $inputFileName = __DIR__ . '/../../data/Calculation/TableFormulae.xlsx';\n\n        $reader = IOFactory::createReader($inputFileType);\n        $spreadsheet = $reader->load($inputFileName);\n        /** @var Table $table */\n        $table = $spreadsheet->getActiveSheet()->getTableByName('DeptSales');\n\n        $cellAddress = 'G8';\n        $spreadsheet->getActiveSheet()->getCell($cellAddress)->setValue('=DeptSales[[#Headers][Region]]');\n        $result = $spreadsheet->getActiveSheet()->getCell($cellAddress)->getCalculatedValue();\n        self::assertSame('Region', $result);\n\n        $spreadsheet->getCalculationEngine()->flushInstance();\n        $table->setShowHeaderRow(false);\n\n        $result = $spreadsheet->getActiveSheet()->getCell($cellAddress)->getCalculatedValue();\n        self::assertSame(ExcelError::REF(), $result);\n    }\n\n    public function testStructuredReferenceInvalidColumn(): void\n    {\n        $inputFileType = 'Xlsx';\n        $inputFileName = __DIR__ . '/../../data/Calculation/TableFormulae.xlsx';\n\n        $reader = IOFactory::createReader($inputFileType);\n        $spreadsheet = $reader->load($inputFileName);\n\n        $cellAddress = 'E2';\n        $spreadsheet->getActiveSheet()->getCell($cellAddress)->setValue('=[@Sales Amount]*[@[%age Commission]]');\n\n        $result = $spreadsheet->getActiveSheet()->getCell($cellAddress)->getCalculatedValue();\n        self::assertSame(ExcelError::REF(), $result);\n    }\n\n    public static function structuredReferenceProvider(): array\n    {\n        return [\n            [26.0, 'E2'],\n            [99.0, 'E3'],\n            [141.0, 'E4'],\n            [49.2, 'E5'],\n            [120.0, 'E6'],\n            [135.0, 'E7'],\n            [570.2, 'E8'],\n            [3970.0, 'C8'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/TranslationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TranslationTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    private string $returnDate;\n\n    private string $locale;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        $this->returnDate = Functions::getReturnDateType();\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);\n        Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);\n        $this->locale = Settings::getLocale();\n    }\n\n    protected function tearDown(): void\n    {\n        Functions::setCompatibilityMode($this->compatibilityMode);\n        Functions::setReturnDateType($this->returnDate);\n        Settings::setLocale($this->locale);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTranslations')]\n    public function testTranslation(string $expectedResult, string $locale, string $formula): void\n    {\n        $validLocale = Settings::setLocale($locale);\n        if (!$validLocale) {\n            self::markTestSkipped(\"Unable to set locale to {$locale}\");\n        }\n\n        $translatedFormula = Calculation::getInstance()->translateFormulaToLocale($formula);\n        self::assertSame($expectedResult, $translatedFormula);\n\n        $restoredFormula = Calculation::getInstance()->translateFormulaToEnglish($translatedFormula);\n        self::assertSame(preg_replace(Calculation::CALCULATION_REGEXP_STRIP_XLFN_XLWS, '', $formula), $restoredFormula);\n    }\n\n    public static function providerTranslations(): array\n    {\n        return require 'tests/data/Calculation/Translations.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Calculation/XlfnFunctionsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Calculation;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\n\nclass XlfnFunctionsTest extends \\PHPUnit\\Framework\\TestCase\n{\n    public function testXlfn(): void\n    {\n        $formulas = [\n            // null indicates function not implemented in Calculation engine\n            ['2010', 'A1', '=MODE.SNGL({5.6,4,4,3,2,4})', '=MODE.SNGL({5.6,4,4,3,2,4})', 4],\n            ['2010', 'A2', '=MODE.SNGL({\"x\",\"y\"})', '=MODE.SNGL({\"x\",\"y\"})', '#N/A'],\n            ['2013', 'A1', '=ISOWEEKNUM(\"2019-12-19\")', '=ISOWEEKNUM(\"2019-12-19\")', 51],\n            ['2013', 'A2', '=SHEET(\"2019\")', '=SHEET(\"2019\")', null],\n            ['2013', 'A3', '2019-01-04', '2019-01-04', null],\n            ['2013', 'A4', '2019-07-04', '2019-07-04', null],\n            ['2013', 'A5', '2019-12-04', '2019-12-04', null],\n            ['2013', 'B3', 1, 1, null],\n            ['2013', 'B4', 2, 2, null],\n            ['2013', 'B5', -3, -3, null],\n            // multiple xlfn functions interleaved with non-xlfn\n            ['2013', 'C3', '=ISOWEEKNUM(A3)+WEEKNUM(A4)+ISOWEEKNUM(A5)', '=ISOWEEKNUM(A3)+WEEKNUM(A4)+ISOWEEKNUM(A5)', 77],\n            ['2016', 'A1', '=SWITCH(WEEKDAY(\"2019-12-22\",1),1,\"Sunday\",2,\"Monday\",\"No Match\")', '=SWITCH(WEEKDAY(\"2019-12-22\",1),1,\"Sunday\",2,\"Monday\",\"No Match\")', 'Sunday'],\n            ['2016', 'B1', '=SWITCH(WEEKDAY(\"2019-12-20\",1),1,\"Sunday\",2,\"Monday\",\"No Match\")', '=SWITCH(WEEKDAY(\"2019-12-20\",1),1,\"Sunday\",2,\"Monday\",\"No Match\")', 'No Match'],\n            ['2019', 'A1', '=CONCAT(\"The\",\" \",\"sun\",\" \",\"will\",\" \",\"come\",\" \",\"up\",\" \",\"tomorrow.\")', '=CONCAT(\"The\",\" \",\"sun\",\" \",\"will\",\" \",\"come\",\" \",\"up\",\" \",\"tomorrow.\")', 'The sun will come up tomorrow.'],\n            ['365', 'A1', '=SORT({7;1;5})', '=SORT({7;1;5})', 1],\n        ];\n        $workbook = new Spreadsheet();\n        $calculation = Calculation::getInstance($workbook);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n        $sheet = $workbook->getActiveSheet();\n        $sheet->setTitle('2010');\n        $sheet = $workbook->createSheet();\n        $sheet->setTitle('2013');\n        $sheet = $workbook->createSheet();\n        $sheet->setTitle('2016');\n        $sheet = $workbook->createSheet();\n        $sheet->setTitle('2019');\n        $sheet = $workbook->createSheet();\n        $sheet->setTitle('365');\n\n        foreach ($formulas as $values) {\n            $sheet = $workbook->setActiveSheetIndexByName($values[0]);\n            $sheet->setCellValue($values[1], $values[2]);\n        }\n\n        $sheet = $workbook->setActiveSheetIndexByName('2013');\n        $sheet->getStyle('A3:A5')->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n        $sheet->getColumnDimension('A')->setAutoSize(true);\n        $condition0 = new Conditional();\n        $condition0->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition0->addCondition('ABS(B3)<2');\n        $condition0->getStyle()->getFill()->setFillType(Fill::FILL_SOLID);\n        $condition0->getStyle()->getFill()->getStartColor()->setARGB(Color::COLOR_RED);\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition1->addCondition('ABS(B3)>2');\n        $condition1->getStyle()->getFill()->setFillType(Fill::FILL_SOLID);\n        $condition1->getStyle()->getFill()->getStartColor()->setARGB(Color::COLOR_GREEN);\n        $cond = [$condition0, $condition1];\n        $sheet->getStyle('B3:B5')->setConditionalStyles($cond);\n        $condition0 = new Conditional();\n        $condition0->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition0->addCondition('ISOWEEKNUM(A3)<10');\n        $condition0->getStyle()->getFill()->setFillType(Fill::FILL_SOLID);\n        $condition0->getStyle()->getFill()->getStartColor()->setARGB(Color::COLOR_RED);\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition1->addCondition('ISOWEEKNUM(A3)>40');\n        $condition1->getStyle()->getFill()->setFillType(Fill::FILL_SOLID);\n        $condition1->getStyle()->getFill()->getStartColor()->setARGB(Color::COLOR_GREEN);\n        $cond = [$condition0, $condition1];\n        $sheet->getStyle('A3:A5')->setConditionalStyles($cond);\n        $sheet->setSelectedCell('B1');\n\n        $writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($workbook, 'Xlsx');\n        $oufil = File::temporaryFilename();\n        $writer->save($oufil);\n\n        $file = \"zip://$oufil#xl/worksheets/sheet1.xml\";\n        $contents = (string) file_get_contents($file);\n        self::assertStringContainsString('<c r=\"A1\"><f>_xlfn.MODE.SNGL({5.6,4,4,3,2,4})</f><v>4</v></c>', $contents);\n        self::assertStringContainsString('<c r=\"A2\" t=\"e\"><f>_xlfn.MODE.SNGL({&quot;x&quot;,&quot;y&quot;})</f><v>#N/A</v></c>', $contents);\n\n        $file = \"zip://$oufil#xl/worksheets/sheet2.xml\";\n        $contents = (string) file_get_contents($file);\n        self::assertStringContainsString('<c r=\"A1\"><f>_xlfn.ISOWEEKNUM(&quot;2019-12-19&quot;)</f><v>51</v></c>', $contents);\n        self::assertStringContainsString('<c r=\"A2\"><f>_xlfn.SHEET(&quot;2019&quot;)</f></c>', $contents);\n        self::assertStringContainsString('<c r=\"C3\"><f>_xlfn.ISOWEEKNUM(A3)+WEEKNUM(A4)+_xlfn.ISOWEEKNUM(A5)</f><v>77</v></c>', $contents);\n        self::assertStringContainsString('<conditionalFormatting sqref=\"B3:B5\"><cfRule type=\"expression\" dxfId=\"0\" priority=\"1\"><formula>ABS(B3)&lt;2</formula></cfRule><cfRule type=\"expression\" dxfId=\"1\" priority=\"2\"><formula>ABS(B3)&gt;2</formula></cfRule></conditionalFormatting>', $contents);\n        self::assertStringContainsString('<conditionalFormatting sqref=\"A3:A5\"><cfRule type=\"expression\" dxfId=\"2\" priority=\"3\"><formula>_xlfn.ISOWEEKNUM(A3)&lt;10</formula></cfRule><cfRule type=\"expression\" dxfId=\"3\" priority=\"4\"><formula>_xlfn.ISOWEEKNUM(A3)&gt;40</formula></cfRule></conditionalFormatting>', $contents);\n\n        $file = \"zip://$oufil#xl/worksheets/sheet3.xml\";\n        $contents = (string) file_get_contents($file);\n        self::assertStringContainsString('<c r=\"A1\" t=\"str\"><f>_xlfn.SWITCH(WEEKDAY(&quot;2019-12-22&quot;,1),1,&quot;Sunday&quot;,2,&quot;Monday&quot;,&quot;No Match&quot;)</f><v>Sunday</v></c>', $contents);\n        self::assertStringContainsString('<c r=\"B1\" t=\"str\"><f>_xlfn.SWITCH(WEEKDAY(&quot;2019-12-20&quot;,1),1,&quot;Sunday&quot;,2,&quot;Monday&quot;,&quot;No Match&quot;)</f><v>No Match</v></c>', $contents);\n\n        $file = \"zip://$oufil#xl/worksheets/sheet4.xml\";\n        $contents = (string) file_get_contents($file);\n        self::assertStringContainsString('<c r=\"A1\" t=\"str\"><f>_xlfn.CONCAT(&quot;The&quot;,&quot; &quot;,&quot;sun&quot;,&quot; &quot;,&quot;will&quot;,&quot; &quot;,&quot;come&quot;,&quot; &quot;,&quot;up&quot;,&quot; &quot;,&quot;tomorrow.&quot;)</f><v>The sun will come up tomorrow.</v></c>', $contents);\n\n        $file = \"zip://$oufil#xl/worksheets/sheet5.xml\";\n        $contents = (string) file_get_contents($file);\n        self::assertStringContainsString('<c r=\"A1\"><f>_xlfn._xlws.SORT({7;1;5})</f><v>1</v></c>', $contents);\n\n        $reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader('Xlsx');\n        $rdobj = $reader->load($oufil);\n        unlink($oufil);\n        $calculation = Calculation::getInstance($rdobj);\n        $calculation->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_VALUE\n        );\n        foreach ($formulas as $values) {\n            $sheet = $rdobj->setActiveSheetIndexByName($values[0]);\n            self::assertEquals($values[3], $sheet->getCell($values[1])->getValue());\n            if ($values[4] !== null) {\n                self::assertEquals($values[4], $sheet->getCell($values[1])->getCalculatedValue());\n            }\n        }\n        $sheet = $rdobj->setActiveSheetIndexByName('2013');\n        $cond = $sheet->getConditionalStyles('A3:A5');\n        self::assertEquals('ISOWEEKNUM(A3)<10', $cond[0]->getConditions()[0]);\n        self::assertEquals('ISOWEEKNUM(A3)>40', $cond[1]->getConditions()[0]);\n        $cond = $sheet->getConditionalStyles('B3:B5');\n        self::assertEquals('ABS(B3)<2', $cond[0]->getConditions()[0]);\n        self::assertEquals('ABS(B3)>2', $cond[1]->getConditions()[0]);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/AddressHelperTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressHelper;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AddressHelperTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerR1C1ConversionToA1Absolute')]\n    public function testR1C1ConversionToA1Absolute(string $expectedValue, string $address): void\n    {\n        $actualValue = AddressHelper::convertToA1($address);\n\n        self::assertSame($expectedValue, $actualValue);\n    }\n\n    public static function providerR1C1ConversionToA1Absolute(): array\n    {\n        return require 'tests/data/Cell/R1C1ConversionToA1Absolute.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerR1C1ConversionToA1Relative')]\n    public function testR1C1ConversionToA1Relative(\n        string $expectedValue,\n        string $address,\n        ?int $row = null,\n        ?int $column = null\n    ): void {\n        if ($row === null) {\n            if ($column === null) {\n                $actualValue = AddressHelper::convertToA1($address);\n            } else {\n                $actualValue = AddressHelper::convertToA1($address, $column);\n            }\n        } elseif ($column === null) {\n            $actualValue = AddressHelper::convertToA1($address, $row);\n        } else {\n            $actualValue = AddressHelper::convertToA1($address, $row, $column);\n        }\n\n        self::assertSame($expectedValue, $actualValue);\n    }\n\n    public static function providerR1C1ConversionToA1Relative(): array\n    {\n        return require 'tests/data/Cell/R1C1ConversionToA1Relative.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerR1C1ConversionToA1Exception')]\n    public function testR1C1ConversionToA1Exception(string $address): void\n    {\n        $this->expectException(Exception::class);\n\n        AddressHelper::convertToA1($address);\n    }\n\n    public static function providerR1C1ConversionToA1Exception(): array\n    {\n        return require 'tests/data/Cell/R1C1ConversionToA1Exception.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerA1ConversionToR1C1Absolute')]\n    public function testA1ConversionToR1C1Absolute(string $expectedValue, string $address): void\n    {\n        $actualValue = AddressHelper::convertToR1C1($address);\n\n        self::assertSame($expectedValue, $actualValue);\n    }\n\n    public static function providerA1ConversionToR1C1Absolute(): array\n    {\n        return require 'tests/data/Cell/A1ConversionToR1C1Absolute.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerA1ConversionToR1C1Relative')]\n    public function testA1ConversionToR1C1Relative(string $expectedValue, string $address, ?int $row = null, ?int $column = null): void\n    {\n        $actualValue = AddressHelper::convertToR1C1($address, $row, $column);\n\n        self::assertSame($expectedValue, $actualValue);\n    }\n\n    public static function providerA1ConversionToR1C1Relative(): array\n    {\n        return require 'tests/data/Cell/A1ConversionToR1C1Relative.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerA1ConversionToR1C1Exception')]\n    public function testA1ConversionToR1C1Exception(string $address): void\n    {\n        $this->expectException(Exception::class);\n\n        AddressHelper::convertToR1C1($address);\n    }\n\n    public static function providerA1ConversionToR1C1Exception(): array\n    {\n        return require 'tests/data/Cell/A1ConversionToR1C1Exception.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerConvertFormulaToA1FromSpreadsheetXml')]\n    public function testConvertFormulaToA1SpreadsheetXml(string $expectedValue, string $formula): void\n    {\n        $actualValue = AddressHelper::convertFormulaToA1($formula);\n\n        self::assertSame($expectedValue, $actualValue);\n    }\n\n    public static function providerConvertFormulaToA1FromSpreadsheetXml(): array\n    {\n        return require 'tests/data/Cell/ConvertFormulaToA1FromSpreadsheetXml.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerConvertFormulaToA1FromR1C1Absolute')]\n    public function testConvertFormulaToA1R1C1Absolute(string $expectedValue, string $formula): void\n    {\n        $actualValue = AddressHelper::convertFormulaToA1($formula);\n\n        self::assertSame($expectedValue, $actualValue);\n    }\n\n    public static function providerConvertFormulaToA1FromR1C1Absolute(): array\n    {\n        return require 'tests/data/Cell/ConvertFormulaToA1FromR1C1Absolute.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerConvertFormulaToA1FromR1C1Relative')]\n    public function testConvertFormulaToA1FromR1C1Relative(string $expectedValue, string $formula, int $row, int $column): void\n    {\n        $actualValue = AddressHelper::convertFormulaToA1($formula, $row, $column);\n\n        self::assertSame($expectedValue, $actualValue);\n    }\n\n    public static function providerConvertFormulaToA1FromR1C1Relative(): array\n    {\n        return require 'tests/data/Cell/ConvertFormulaToA1FromR1C1Relative.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/AddressRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Parser;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionClass;\nuse ReflectionMethod;\n\nclass AddressRangeTest extends TestCase\n{\n    /** @param class-string $className */\n    #[DataProvider('providerMaxRowsAndColumns')]\n    public function testConstants(mixed $expectedValue, string $className, string $constantName): void\n    {\n        $reflectionClass = new ReflectionClass($className);\n        $result = $reflectionClass->getConstant($constantName);\n        self::assertSame($expectedValue, $result);\n    }\n\n    /** return array<array{mixed, class-string, string}> */\n    public static function providerMaxRowsAndColumns(): array\n    {\n        return [\n            [1048576, AddressRange::class, 'MAX_ROW'],\n            ['XFD', AddressRange::class, 'MAX_COLUMN'],\n            [16384, AddressRange::class, 'MAX_COLUMN_INT'],\n            [16384, AddressRange::class, 'MAX_ROW_XLS_OLD'],\n            [65536, AddressRange::class, 'MAX_ROW_XLS'],\n            ['IV', AddressRange::class, 'MAX_COLUMN_XLS'],\n            [256, AddressRange::class, 'MAX_COLUMN_INT_XLS'],\n            ['/^[A-Z]+1:[A-Z]+1048576$/', Style::class, 'REGEX_WHOLE_COLUMN'],\n            ['/^A\\d+:XFD\\d+$/', Style::class, 'REGEX_WHOLE_ROW'],\n            ['/^([A-Z]+1\\:[A-Z]+)(16384|65536)$/', Xls::class, 'REGEX_WHOLE_COLUMN'],\n            ['${1}1048576', Xls::class, 'REGEX_WHOLE_COLUMN_REPLACE'],\n            ['/^(A\\d+\\:)IV(\\d+)$/', Xls::class, 'REGEX_WHOLE_ROW'],\n            ['${1}XFD${2}', Xls::class, 'REGEX_WHOLE_ROW_REPLACE'],\n        ];\n    }\n\n    #[DataProvider('providerAddressLimits')]\n    public function testWriterXlsParser(bool $expected, string $cellAddress): void\n    {\n        $reflectionMethod = new ReflectionMethod(Parser::class, 'cellToPackedRowCol');\n        $spreadsheet = new Spreadsheet();\n        $reflectionClass = new Parser($spreadsheet);\n\n        try {\n            $reflectionMethod->invokeArgs($reflectionClass, [$cellAddress]);\n            $result = true;\n        } catch (WriterException) {\n            $result = false;\n        }\n\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame($expected, $result);\n    }\n\n    /** return array<array{bool, string}> */\n    public static function providerAddressLimits(): array\n    {\n        return [\n            'last possible row' => [true, 'A65536'],\n            'beyond last possible row' => [false, 'A65537'],\n            'last possible column' => [true, 'IV1'],\n            'beyond last possible column' => [false, 'IW1'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AdvancedValueBinderTest extends TestCase\n{\n    const AVB_PRECISION = 1.0E-8;\n\n    private string $originalLocale;\n\n    private IValueBinder $valueBinder;\n\n    protected function setUp(): void\n    {\n        $this->originalLocale = Settings::getLocale();\n\n        $this->valueBinder = Cell::getValueBinder();\n        Cell::setValueBinder(new AdvancedValueBinder());\n    }\n\n    protected function tearDown(): void\n    {\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setDecimalSeparator(null);\n        StringHelper::setThousandsSeparator(null);\n        Settings::setLocale($this->originalLocale);\n        Cell::setValueBinder($this->valueBinder);\n    }\n\n    public function testNullValue(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue(null);\n        self::assertNull($sheet->getCell('A1')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBoolean(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue(true);\n        self::assertTrue($sheet->getCell('A1')->getValue());\n\n        $sheet->getCell('A2')->setValue(false);\n        self::assertFalse($sheet->getCell('A2')->getValue());\n\n        $sheet->getCell('A3')->setValue('true');\n        self::assertTrue($sheet->getCell('A3')->getValue());\n\n        $sheet->getCell('A4')->setValue('false');\n        self::assertFalse($sheet->getCell('A4')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBooleanLocale(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        Settings::setLocale('nl_NL');\n\n        $sheet->getCell('A1')->setValue('Waar');\n        self::assertTrue($sheet->getCell('A1')->getValue());\n\n        $sheet->getCell('A2')->setValue('OnWaar');\n        self::assertFalse($sheet->getCell('A2')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('currencyProvider')]\n    public function testCurrency(string $value, float $valueBinded, string $thousandsSeparator, string $decimalSeparator, string $currencyCode): void\n    {\n        StringHelper::setCurrencyCode($currencyCode);\n        StringHelper::setDecimalSeparator($decimalSeparator);\n        StringHelper::setThousandsSeparator($thousandsSeparator);\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue($value);\n        self::assertEquals($valueBinded, $sheet->getCell('A1')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function currencyProvider(): array\n    {\n        return [\n            ['$10.11', 10.11, ',', '.', '$'],\n            ['$1,010.12', 1010.12, ',', '.', '$'],\n            ['$20,20', 20.2, '.', ',', '$'],\n            ['$2.020,20', 2020.2, '.', ',', '$'],\n            ['€2.020,20', 2020.2, '.', ',', '€'],\n            ['€ 2.020,20', 2020.2, '.', ',', '€'],\n            ['€2,020.22', 2020.22, ',', '.', '€'],\n            ['$10.11', 10.11, ',', '.', '€'],\n            ['€2,020.20', 2020.2, ',', '.', '$'],\n            'slash as group separator' => ['€2/020.20', 2020.2, '/', '.', '$'],\n            'slash as decimal separator' => ['€2,020/20', 2020.2, ',', '/', '$'],\n            ['-2,020.20€', -2020.2, ',', '.', '$'],\n            ['- 2,020.20 € ', -2020.2, ',', '.', '$'],\n        ];\n    }\n\n    #[DataProvider('fractionProvider')]\n    public function testFractions(mixed $value, mixed $valueBinded): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue($value);\n        self::assertEquals($valueBinded, $sheet->getCell('A1')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function fractionProvider(): array\n    {\n        return [\n            ['1/5', 0.2],\n            ['-1/5', -0.2],\n            ['- 1/5', -0.2],\n            ['12/5', 2.4],\n            ['2/100', 0.02],\n            ['15/12', 1.25],\n            ['20/100', 0.2],\n            ['1 3/5', 1.6],\n            ['-1 3/5', -1.6],\n            ['1 4/20', 1.2],\n            ['1 16/20', 1.8],\n            ['12 20/100', 12.2],\n            ['-1 4/20', -1.2],\n            ['407 / ', '407 / '],\n            ['407 /', '407 /'],\n            ['407 3/', '407 3/'],\n            ['-407 /4', -101.75],\n            [' /', ' /'],\n            [' / ', ' / '],\n        ];\n    }\n\n    #[DataProvider('percentageProvider')]\n    public function testPercentages(mixed $value, mixed $valueBinded): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue($value);\n        self::assertEquals($valueBinded, $sheet->getCell('A1')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function percentageProvider(): array\n    {\n        return [\n            ['10%', 0.1],\n            ['-12%', -0.12],\n            ['120%', 1.2],\n            ['12.5%', 0.125],\n            ['-12.5%', -0.125],\n            ['12,345%', 123.45],\n            ['12,345.67%', 123.4567],\n        ];\n    }\n\n    #[DataProvider('timeProvider')]\n    public function testTimes(mixed $value, mixed $valueBinded): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue($value);\n        self::assertEqualsWithDelta($valueBinded, $sheet->getCell('A1')->getValue(), self::AVB_PRECISION);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function timeProvider(): array\n    {\n        return [\n            ['1:20', 0.05555555556],\n            ['09:17', 0.386805555556],\n            ['15:00', 0.625],\n            ['17:12:35', 0.71707175926],\n            ['23:58:20', 0.99884259259],\n        ];\n    }\n\n    #[DataProvider('stringProvider')]\n    public function testStringWrapping(string $value): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue($value);\n        self::assertEquals($value, $sheet->getCell('A1')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function stringProvider(): array\n    {\n        return [\n            ['Hello World'],\n            [\"Hello\\nWorld\"],\n        ];\n    }\n\n    #[DataProvider('formulaProvider')]\n    public function testFormula(string $value, string $dataType): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getCell('A1')->setValue($value);\n        self::assertSame($dataType, $sheet->getCell('A1')->getDataType());\n        if ($dataType === DataType::TYPE_FORMULA) {\n            self::assertFalse($sheet->getStyle('A1')->getQuotePrefix());\n        } else {\n            self::assertTrue($sheet->getStyle('A1')->getQuotePrefix());\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function formulaProvider(): array\n    {\n        return [\n            'normal formula' => ['=SUM(A1:C3)', DataType::TYPE_FORMULA],\n            'issue 1310' => ['======', DataType::TYPE_STRING],\n        ];\n    }\n\n    #[DataProvider('nativeProvider')]\n    public function testNative(mixed $value, mixed $expected = null): void\n    {\n        $expected ??= $value;\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($value);\n        self::assertSame($expected, $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function nativeProvider(): array\n    {\n        return [\n            'int' => [2],\n            'float' => [3.0],\n            'numeric string' => ['15', 15],\n            'scientific notation' => ['2.5E1', 25.0],\n            'issue4766 large exponent' => ['4E433'],\n            'issue4766 large negative exponent' => ['4E-433', 0.0],\n            'boolean' => [false],\n            'string' => ['xyz'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/CellAddressTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellAddressTest extends TestCase\n{\n    #[DataProvider('providerCreateFromCellAddress')]\n    public function testCreateFromCellAddress(\n        string $cellAddress,\n        string $expectedColumnName,\n        int $expectedColumnId,\n        int $expectedRowId\n    ): void {\n        $cellAddressObject = CellAddress::fromCellAddress($cellAddress);\n\n        self::assertSame($cellAddress, (string) $cellAddressObject);\n        self::assertSame($cellAddress, $cellAddressObject->cellAddress());\n        self::assertSame($expectedRowId, $cellAddressObject->rowId());\n        self::assertSame($expectedColumnId, $cellAddressObject->columnId());\n        self::assertSame($expectedColumnName, $cellAddressObject->columnName());\n    }\n\n    public static function providerCreateFromCellAddress(): array\n    {\n        return [\n            ['A1', 'A', 1, 1],\n            ['C5', 'C', 3, 5],\n            ['IV256', 'IV', 256, 256],\n        ];\n    }\n\n    #[DataProvider('providerCreateFromCellAddressException')]\n    public function testCreateFromCellAddressException(string $cellAddress): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\n            $cellAddress === ''\n                ? 'Cell coordinate can not be zero-length string'\n                : \"Invalid cell coordinate {$cellAddress}\"\n        );\n\n        CellAddress::fromCellAddress($cellAddress);\n    }\n\n    public static function providerCreateFromCellAddressException(): array\n    {\n        return [\n            ['INVALID'],\n            [''],\n            ['IV'],\n            ['12'],\n        ];\n    }\n\n    #[DataProvider('providerCreateFromColumnAndRow')]\n    public function testCreateFromColumnAndRow(\n        int $columnId,\n        int $rowId,\n        string $expectedCellAddress,\n        string $expectedColumnName\n    ): void {\n        $cellAddressObject = CellAddress::fromColumnAndRow($columnId, $rowId);\n\n        self::assertSame($expectedCellAddress, (string) $cellAddressObject);\n        self::assertSame($expectedCellAddress, $cellAddressObject->cellAddress());\n        self::assertSame($rowId, $cellAddressObject->rowId());\n        self::assertSame($columnId, $cellAddressObject->columnId());\n        self::assertSame($expectedColumnName, $cellAddressObject->columnName());\n    }\n\n    #[DataProvider('providerCreateFromColumnRowException')]\n    public function testCreateFromColumnRowException(int|string $columnId, int|string $rowId): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Row and Column Ids must be positive integer values');\n\n        CellAddress::fromColumnAndRow($columnId, $rowId);\n    }\n\n    public static function providerCreateFromColumnAndRow(): array\n    {\n        return [\n            [1, 1, 'A1', 'A'],\n            [3, 5, 'C5', 'C'],\n            [256, 256, 'IV256', 'IV'],\n        ];\n    }\n\n    #[DataProvider('providerCreateFromColumnRowArray')]\n    public function testCreateFromColumnRowArray(\n        int $columnId,\n        int $rowId,\n        string $expectedCellAddress,\n        string $expectedColumnName\n    ): void {\n        $columnRowArray = [$columnId, $rowId];\n        $cellAddressObject = CellAddress::fromColumnRowArray($columnRowArray);\n\n        self::assertSame($expectedCellAddress, (string) $cellAddressObject);\n        self::assertSame($expectedCellAddress, $cellAddressObject->cellAddress());\n        self::assertSame($rowId, $cellAddressObject->rowId());\n        self::assertSame($columnId, $cellAddressObject->columnId());\n        self::assertSame($expectedColumnName, $cellAddressObject->columnName());\n    }\n\n    public static function providerCreateFromColumnRowArray(): array\n    {\n        return [\n            [1, 1, 'A1', 'A'],\n            [3, 5, 'C5', 'C'],\n            [256, 256, 'IV256', 'IV'],\n        ];\n    }\n\n    #[DataProvider('providerCreateFromColumnRowException')]\n    public function testCreateFromColumnRowArrayException(mixed $columnId, mixed $rowId): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Row and Column Ids must be positive integer values');\n\n        $columnRowArray = [$columnId, $rowId];\n        // Phpstan is right to complain about next line, but we need to test it anyhow\n        CellAddress::fromColumnRowArray($columnRowArray); //* @phpstan-ignore-line\n    }\n\n    public static function providerCreateFromColumnRowException(): array\n    {\n        return [\n            [-1, 1],\n            [3, 'A'],\n        ];\n    }\n\n    #[DataProvider('providerCreateFromCellAddressWithWorksheet')]\n    public function testCreateFromCellAddressWithWorksheet(\n        string $cellAddress,\n        string $expectedCellAddress,\n        string $expectedColumnName,\n        int $expectedColumnId,\n        int $expectedRowId\n    ): void {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setTitle(\"Mark's Worksheet\");\n\n        $cellAddressObject = CellAddress::fromCellAddress($cellAddress, $worksheet);\n\n        self::assertSame($expectedCellAddress, (string) $cellAddressObject);\n        self::assertSame($cellAddress, $cellAddressObject->cellAddress());\n        self::assertSame($expectedRowId, $cellAddressObject->rowId());\n        self::assertSame($expectedColumnId, $cellAddressObject->columnId());\n        self::assertSame($expectedColumnName, $cellAddressObject->columnName());\n    }\n\n    public static function providerCreateFromCellAddressWithWorksheet(): array\n    {\n        return [\n            ['A1', \"'Mark''s Worksheet'!A1\", 'A', 1, 1],\n            ['C5', \"'Mark''s Worksheet'!C5\", 'C', 3, 5],\n            ['IV256', \"'Mark''s Worksheet'!IV256\", 'IV', 256, 256],\n        ];\n    }\n\n    public function testNextRow(): void\n    {\n        $cellAddress = CellAddress::fromCellAddress('C5');\n        // default single row\n        $cellAddressC6 = $cellAddress->nextRow();\n        self::assertSame('C6', (string) $cellAddressC6);\n        // multiple rows\n        $cellAddressC9 = $cellAddress->nextRow(4);\n        self::assertSame('C9', (string) $cellAddressC9);\n        // negative rows\n        $cellAddressC3 = $cellAddress->nextRow(-2);\n        self::assertSame('C3', (string) $cellAddressC3);\n        // negative beyond the minimum\n        $cellAddressC1 = $cellAddress->nextRow(-10);\n        self::assertSame('C1', (string) $cellAddressC1);\n\n        // Check that the original object is still unchanged\n        self::assertSame('C5', (string) $cellAddress);\n    }\n\n    public function testPreviousRow(): void\n    {\n        $cellAddress = CellAddress::fromCellAddress('C5');\n        // default single row\n        $cellAddressC4 = $cellAddress->previousRow();\n        self::assertSame('C4', (string) $cellAddressC4);\n    }\n\n    public function testNextColumn(): void\n    {\n        $cellAddress = CellAddress::fromCellAddress('C5');\n        // default single row\n        $cellAddressD5 = $cellAddress->nextColumn();\n        self::assertSame('D5', (string) $cellAddressD5);\n        // multiple rows\n        $cellAddressG5 = $cellAddress->nextColumn(4);\n        self::assertSame('G5', (string) $cellAddressG5);\n        // negative rows\n        $cellAddressB5 = $cellAddress->nextColumn(-1);\n        self::assertSame('B5', (string) $cellAddressB5);\n        // negative beyond the minimum\n        $cellAddressA5 = $cellAddress->nextColumn(-10);\n        self::assertSame('A5', (string) $cellAddressA5);\n\n        // Check that the original object is still unchanged\n        self::assertSame('C5', (string) $cellAddress);\n    }\n\n    public function testPreviousColumn(): void\n    {\n        $cellAddress = CellAddress::fromCellAddress('C5');\n        // default single row\n        $cellAddressC4 = $cellAddress->previousColumn();\n        self::assertSame('B5', (string) $cellAddressC4);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/CellArrayFormulaTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellArrayFormulaTest extends TestCase\n{\n    private bool $skipUpdateInSpillageRange = true;\n\n    public function testSetValueArrayFormulaNoSpillage(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValue('=MAX(ABS({5, -3; 1, -12}))');\n\n        self::assertSame(12, $cell->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetValueArrayFormulaWithSpillage(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValue('=SEQUENCE(3, 3, 1, 1)');\n\n        self::assertSame([[1, 2, 3], [4, 5, 6], [7, 8, 9]], $cell->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetValueInSpillageRangeCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue('=SEQUENCE(3, 3, 1, 1)');\n\n        $cellAddress = 'C3';\n        $sheet->getCell($cellAddress)->setValue('x');\n\n        self::assertSame('#SPILL!', $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('x', $sheet->getCell('C3')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUpdateValueInSpillageRangeCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=SEQUENCE(3, 3, 1, 1)');\n        $sheet->getCell('A1')->getCalculatedValue();\n        $attributes = $sheet->getCell('A1')->getFormulaAttributes();\n        if (!isset($attributes, $attributes['ref'])) {\n            self::fail('No formula attributes for cell A1');\n        }\n        $cellRange = $attributes['ref'];\n        $cellAddress = 'C3';\n        self::assertTrue($sheet->getCell($cellAddress)->isInRange($cellRange));\n        if ($this->skipUpdateInSpillageRange) {\n            $spreadsheet->disconnectWorksheets();\n            self::markTestIncomplete('Preventing update in spill range not yet implemented');\n        }\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Cell {$cellAddress} is within the spillage range of a formula, and cannot be changed\");\n        $sheet->getCell($cellAddress)->setValue('PHP');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUpdateArrayFormulaForSpillageRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=SEQUENCE(3, 3, 1, 1)');\n        $sheet->getCell('A1')->getCalculatedValue();\n        self::assertSame([[1, 2, 3], [4, 5, 6], [7, 8, 9]], $sheet->toArray(formatData: false, reduceArrays: true));\n\n        $sheet->getCell('A1')->setValue('=SEQUENCE(2, 2, 4, -1)');\n        $calculation->clearCalculationCache();\n        $sheet->getCell('A1')->getCalculatedValue();\n        self::assertSame([[4, 3, null], [2, 1, null], [null, null, null]], $sheet->toArray(formatData: false, reduceArrays: true));\n\n        $cellAddress = 'C3';\n        $sheet->getCell($cellAddress)->setValue('PHP');\n        self::assertSame('PHP', $sheet->getCell($cellAddress)->getValue(), 'change cell formerly in spill range');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/CellDetachTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellDetachTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMethodName')]\n    public function testDetach(string $method): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('is not bound to a worksheet');\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->detach();\n        if (method_exists(Cell::class, $method)) {\n            $sheet->getCell('A1')->$method();\n        } else {\n            self::fail(\"Cell method $method does not exist\");\n        }\n    }\n\n    public static function providerMethodName(): array\n    {\n        return [\n            ['updateInCollection'],\n            ['getColumn'],\n            ['getRow'],\n            ['hasDataValidation'],\n            ['getDataValidation'],\n            ['hasHyperlink'],\n            ['getHyperlink'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMethodNameSet')]\n    public function testDetachSet(string $method): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('is not bound to a worksheet');\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->detach();\n        if (method_exists(Cell::class, $method)) {\n            $sheet->getCell('A1')->$method(null);\n        } else {\n            self::fail(\"Cell method $method does not exist\");\n        }\n    }\n\n    public static function providerMethodNameSet(): array\n    {\n        return [\n            ['setDataValidation'],\n            ['setHyperlink'],\n            ['setValue'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/CellFormulaTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellFormulaTest extends TestCase\n{\n    public function testSetFormulaExplicit(): void\n    {\n        $formula = '=A2+B2';\n\n        $spreadsheet = new Spreadsheet();\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValueExplicit($formula, DataType::TYPE_FORMULA);\n\n        self::assertSame($formula, $cell->getValue());\n        self::assertTrue($cell->isFormula());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetFormulaDeterminedByBinder(): void\n    {\n        $formula = '=A2+B2';\n\n        $spreadsheet = new Spreadsheet();\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValue($formula);\n\n        self::assertSame($formula, $cell->getValue());\n        self::assertTrue($cell->isFormula());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetFormulaInvalidValue(): void\n    {\n        $formula = (object) true;\n\n        $spreadsheet = new Spreadsheet();\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n\n        try {\n            $cell->setValueExplicit($formula, DataType::TYPE_FORMULA);\n            self::fail('setValueExplicit should have thrown exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unable to convert to string', $e->getMessage());\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetArrayFormulaExplicitNoArray(): void\n    {\n        $formula = '=SUM(B2:B6*C2:C6)';\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                [1, 6],\n                [2, 7],\n                [3, 8],\n                [4, 9],\n                [5, 10],\n            ],\n            null,\n            'B2'\n        );\n        $sheet->getCell('A1')->setValueExplicit($formula, DataType::TYPE_FORMULA);\n\n        self::assertSame($formula, $sheet->getCell('A1')->getValue());\n        self::assertTrue($sheet->getCell('A1')->isFormula());\n        self::assertSame(130, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertEmpty($sheet->getCell('A1')->getFormulaAttributes());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetArrayFormulaExplicitWithRange(): void\n    {\n        $formula = '=SEQUENCE(3,3,-10,2.5)';\n\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValueExplicit($formula, DataType::TYPE_FORMULA);\n\n        self::assertSame($formula, $cell->getValue());\n        self::assertTrue($cell->isFormula());\n        $expected = [\n            [-10.0, -7.5, -5.0],\n            [-2.5, 0.0, 2.5],\n            [5.0, 7.5, 10.0],\n        ];\n        self::assertSame($expected, $cell->getCalculatedValue());\n        self::assertSame(['t' => 'array', 'ref' => 'A1:C3'], $cell->getFormulaAttributes());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/CellRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellRange;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellRangeTest extends TestCase\n{\n    public function testCreateCellRange(): void\n    {\n        $from = CellAddress::fromCellAddress('B5');\n        $to = CellAddress::fromCellAddress('E2');\n        $cellRange = new CellRange($from, $to);\n        self::assertSame('B2:E5', (string) $cellRange);\n    }\n\n    public function testCreateCellRangeWithWorksheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setTitle(\"Mark's Worksheet\");\n\n        $from = CellAddress::fromCellAddress('B5', $worksheet);\n        $to = CellAddress::fromCellAddress('E2');\n        $cellRange = new CellRange($from, $to);\n        self::assertSame(\"'Mark''s Worksheet'!B2:E5\", (string) $cellRange);\n    }\n\n    public function testCreateCellRangeWithWorksheets(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setTitle(\"Mark's Worksheet\");\n\n        $from = CellAddress::fromCellAddress('B5', $worksheet);\n        $to = CellAddress::fromCellAddress('E2', $worksheet);\n        $cellRange = new CellRange($from, $to);\n        self::assertSame(\"'Mark''s Worksheet'!B2:E5\", (string) $cellRange);\n    }\n\n    public function testSingleCellRange(): void\n    {\n        $from = CellAddress::fromCellAddress('C3');\n        $to = CellAddress::fromCellAddress('C3');\n        $cellRange = new CellRange($from, $to);\n        self::assertSame('C3', (string) $cellRange);\n    }\n\n    public function testSingleCellRangeWithWorksheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setTitle(\"Mark's Worksheet\");\n\n        $from = CellAddress::fromCellAddress('C3', $worksheet);\n        $to = CellAddress::fromCellAddress('C3');\n        $cellRange = new CellRange($from, $to);\n        self::assertSame(\"'Mark''s Worksheet'!C3\", (string) $cellRange);\n    }\n\n    public function testRangeFrom(): void\n    {\n        $from = CellAddress::fromCellAddress('B5');\n        $to = CellAddress::fromCellAddress('E2');\n        $cellRange = new CellRange($from, $to);\n        self::assertSame('B2', (string) $cellRange->from());\n    }\n\n    public function testRangeTo(): void\n    {\n        $from = CellAddress::fromCellAddress('B5');\n        $to = CellAddress::fromCellAddress('E2');\n        $cellRange = new CellRange($from, $to);\n        self::assertSame('E5', (string) $cellRange->to());\n    }\n\n    public function testCreateCellRangeWithMismatchedWorksheets(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setTitle(\"Mark's Worksheet\");\n        $secondWorksheet = new Worksheet($spreadsheet, 'A Second Worksheet');\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('3d Cell Ranges are not supported');\n\n        $from = CellAddress::fromCellAddress('B5', $worksheet);\n        $to = CellAddress::fromCellAddress('E2', $secondWorksheet);\n        new CellRange($from, $to);\n    }\n\n    public function testCreateCellRangeWithMismatchedSpreadsheets(): void\n    {\n        $spreadsheet1 = new Spreadsheet();\n        $worksheet1 = $spreadsheet1->getActiveSheet();\n        $worksheet1->setTitle(\"Mark's Worksheet\");\n        $spreadsheet2 = new Spreadsheet();\n        $worksheet2 = $spreadsheet2->getActiveSheet();\n        $worksheet2->setTitle(\"Mark's Worksheet\");\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Worksheets must be in the same spreadsheet');\n\n        $from = CellAddress::fromCellAddress('B5', $worksheet1);\n        $to = CellAddress::fromCellAddress('E2', $worksheet2);\n        new CellRange($from, $to);\n    }\n\n    public function testShiftRangeTo(): void\n    {\n        $from = CellAddress::fromCellAddress('B5');\n        $to = CellAddress::fromCellAddress('E2');\n        $cellRange = new CellRange($from, $to);\n        self::assertSame('B2:E5', (string) $cellRange);\n\n        $cellRange->to()\n            ->nextColumn(2)\n            ->nextRow(2);\n\n        self::assertSame('B2', (string) $cellRange->from());\n        self::assertSame('G7', (string) $cellRange->to());\n        self::assertSame('B2:G7', (string) $cellRange);\n\n        $cellRange->to()\n            ->previousColumn()\n            ->previousRow();\n\n        self::assertSame('B2', (string) $cellRange->from());\n        self::assertSame('F6', (string) $cellRange->to());\n        self::assertSame('B2:F6', (string) $cellRange);\n    }\n\n    public function testShiftRangeFrom(): void\n    {\n        $from = CellAddress::fromCellAddress('B5');\n        $to = CellAddress::fromCellAddress('E2');\n        $cellRange = new CellRange($from, $to);\n        self::assertSame('B2:E5', (string) $cellRange);\n\n        $cellRange->from()\n            ->nextColumn(5)\n            ->nextRow(5);\n\n        self::assertSame('E5', (string) $cellRange->from());\n        self::assertSame('G7', (string) $cellRange->to());\n        self::assertSame('E5:G7', (string) $cellRange);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/CellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AdvancedValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function setUp(): void\n    {\n        Cell::setValueBinder(new DefaultValueBinder());\n    }\n\n    protected function tearDown(): void\n    {\n        Cell::setValueBinder(new DefaultValueBinder());\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    private function createSolidFillStyle(string $color): Style\n    {\n        $style = new Style(false, true);\n        $style->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()->setARGB($color);\n\n        return $style;\n    }\n\n    public function testSetValueBinderOverride(): void\n    {\n        $value = '12.5%';\n        $spreadsheet = new Spreadsheet();\n\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValue($value); // Using the Default Value Binder\n\n        self::assertSame('12.5%', $cell->getValue());\n        self::assertSame('General', $cell->getStyle()->getNumberFormat()->getFormatCode());\n\n        $cell = $spreadsheet->getActiveSheet()->getCell('A2');\n        $cell->setValue($value, new AdvancedValueBinder()); // Overriding the Default Value Binder\n\n        self::assertSame(0.125, $cell->getValue());\n        self::assertSame('0.00%', $cell->getStyle()->getNumberFormat()->getFormatCode());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetValueBinderOverride2(): void\n    {\n        $value = '12.5%';\n        $spreadsheet = new Spreadsheet();\n        Cell::setValueBinder(new AdvancedValueBinder());\n\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValue($value); // Using the Advanced Value Binder\n\n        self::assertSame(0.125, $cell->getValue());\n        self::assertSame('0.00%', $cell->getStyle()->getNumberFormat()->getFormatCode());\n\n        $cell = $spreadsheet->getActiveSheet()->getCell('A2');\n        $cell->setValue($value, new StringValueBinder()); // Overriding the Advanced Value Binder\n\n        self::assertSame('12.5%', $cell->getValue());\n        self::assertSame('General', $cell->getStyle()->getNumberFormat()->getFormatCode());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('providerSetValueExplicit')]\n    public function testSetValueExplicit(mixed $expected, mixed $value, string $dataType): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $cell = $spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValueExplicit($value, $dataType);\n\n        self::assertSame($expected, $cell->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerSetValueExplicit(): array\n    {\n        return require 'tests/data/Cell/SetValueExplicit.php';\n    }\n\n    public function testInvalidIsoDateSetValueExplicit(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $cell = $this->spreadsheet->getActiveSheet()->getCell('A1');\n\n        $dateValue = '2022-02-29'; // Invalid leap year\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Invalid string {$dateValue} supplied for datatype Date\");\n        $cell->setValueExplicit($dateValue, DataType::TYPE_ISO_DATE);\n    }\n\n    #[DataProvider('providerSetValueExplicitException')]\n    public function testSetValueExplicitException(mixed $value, string $dataType, string $message): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage($message);\n\n        $this->spreadsheet = new Spreadsheet();\n        $cell = $this->spreadsheet->getActiveSheet()->getCell('A1');\n        $cell->setValueExplicit($value, $dataType);\n    }\n\n    public static function providerSetValueExplicitException(): array\n    {\n        return require 'tests/data/Cell/SetValueExplicitException.php';\n    }\n\n    public function testNoChangeToActiveSheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Sheet 1');\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setTitle('Sheet 3');\n        $sheet1->setCellValue('C1', 123);\n        $sheet1->setCellValue('D1', 124);\n        $sheet3->setCellValue('A1', \"='Sheet 1'!C1+'Sheet 1'!D1\");\n        $sheet1->setCellValue('A1', \"='Sheet 3'!A1\");\n        $spreadsheet->setActiveSheetIndex(0);\n        self::assertSame(0, $spreadsheet->getActiveSheetIndex());\n        $value = $spreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue();\n        self::assertSame(0, $spreadsheet->getActiveSheetIndex());\n        self::assertSame(247, $value);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDestroyWorksheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        self::assertSame($sheet, $cell->getWorksheet());\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Worksheet no longer exists');\n        $spreadsheet->disconnectWorksheets();\n        $cell->getWorksheet();\n    }\n\n    public function testDestroyCell1(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        self::assertSame('A1', $cell->getCoordinate());\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Coordinate no longer exists');\n        $spreadsheet->disconnectWorksheets();\n        $cell->getCoordinate();\n    }\n\n    public function testDestroyCell2(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        self::assertSame('A1', $cell->getCoordinate());\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Coordinate no longer exists');\n        $parent = $cell->getParent();\n        self::assertNotNull($parent, 'Parent should not be null');\n        $parent->delete('A1');\n        $cell->getCoordinate();\n    }\n\n    public function testAppliedStyleWithRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', -1);\n        $sheet->setCellValue('A2', 0);\n        $sheet->setCellValue('A3', 1);\n\n        $cellRange = 'A1:A3';\n        $sheet->getStyle($cellRange)->getFont()->setBold(true);\n\n        $yellowStyle = $this->createSolidFillStyle(Color::COLOR_YELLOW);\n        $greenStyle = $this->createSolidFillStyle(Color::COLOR_GREEN);\n        $redStyle = $this->createSolidFillStyle(Color::COLOR_RED);\n\n        $wizardFactory = new Wizard($cellRange);\n        /** @var Wizard\\CellValue $cellWizard */\n        $cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n        $conditionalStyles = [];\n        $cellWizard->equals(0)->setStyle($yellowStyle);\n        $conditionalStyles[] = $cellWizard->getConditional();\n\n        $cellWizard->greaterThan(0)->setStyle($greenStyle);\n        $conditionalStyles[] = $cellWizard->getConditional();\n\n        $cellWizard->lessThan(0)->setStyle($redStyle);\n        $conditionalStyles[] = $cellWizard->getConditional();\n\n        $sheet->getStyle($cellWizard->getCellRange())\n            ->setConditionalStyles($conditionalStyles);\n\n        $style = $sheet->getCell('A1')->getAppliedStyle();\n        self::assertTrue($style->getFont()->getBold());\n        self::assertSame($redStyle->getFill()->getFillType(), $style->getFill()->getFillType());\n        self::assertSame($redStyle->getFill()->getStartColor()->getARGB(), $style->getFill()->getStartColor()->getARGB());\n\n        $style = $sheet->getCell('A2')->getAppliedStyle();\n        self::assertTrue($style->getFont()->getBold());\n        self::assertSame($yellowStyle->getFill()->getFillType(), $style->getFill()->getFillType());\n        self::assertSame(\n            $yellowStyle->getFill()->getStartColor()->getARGB(),\n            $style->getFill()->getStartColor()->getARGB()\n        );\n\n        $style = $sheet->getCell('A3')->getAppliedStyle();\n        self::assertTrue($style->getFont()->getBold());\n        self::assertSame($greenStyle->getFill()->getFillType(), $style->getFill()->getFillType());\n        self::assertSame(\n            $greenStyle->getFill()->getStartColor()->getARGB(),\n            $style->getFill()->getStartColor()->getARGB()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('appliedStylingProvider')]\n    public function testAppliedStyleSingleCell(string $cellAddress, string $fillStyle, ?string $fillColor): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', -1);\n        $sheet->setCellValue('A2', 0);\n        $sheet->setCellValue('B1', 0);\n        $sheet->setCellValue('C1', 1);\n        $sheet->setCellValue('C2', -1);\n\n        $cellRange = 'A1:C2';\n        $sheet->getStyle($cellRange)->getFont()->setBold(true);\n\n        $yellowStyle = $this->createSolidFillStyle(Color::COLOR_YELLOW);\n        $redStyle = $this->createSolidFillStyle(Color::COLOR_RED);\n\n        $conditionalCellRange = 'A1:C1';\n        $conditionalStyles = [];\n        $wizardFactory = new Wizard($conditionalCellRange);\n        /** @var Wizard\\CellValue $cellWizard */\n        $cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n        $cellWizard->equals(0)->setStyle($yellowStyle);\n        $conditionalStyles[] = $cellWizard->getConditional();\n\n        $cellWizard->lessThan(0)->setStyle($redStyle);\n        $conditionalStyles[] = $cellWizard->getConditional();\n\n        $sheet->getStyle($cellWizard->getCellRange())\n            ->setConditionalStyles($conditionalStyles);\n\n        $style = $sheet->getCell($cellAddress)->getAppliedStyle();\n\n        self::assertTrue($style->getFont()->getBold());\n        self::assertSame($fillStyle, $style->getFill()->getFillType());\n        if ($fillStyle === Fill::FILL_SOLID) {\n            self::assertSame($fillColor, $style->getFill()->getStartColor()->getARGB());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function appliedStylingProvider(): array\n    {\n        return [\n            'A1 - Conditional with Match' => ['A1', Fill::FILL_SOLID, Color::COLOR_RED],\n            'A2 - No Conditionals' => ['A2', Fill::FILL_NONE, null],\n            'B1 - Conditional with Match' => ['B1', Fill::FILL_SOLID, Color::COLOR_YELLOW],\n            'C1 - Conditionals, but No Match' => ['C1', Fill::FILL_NONE, null],\n            'C2 - No Conditionals' => ['C2', Fill::FILL_NONE, null],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/ColumnRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\ColumnRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnRangeTest extends TestCase\n{\n    public function testCreateColumnRange(): void\n    {\n        $columnRange = new ColumnRange('C', 'E');\n        self::assertSame('C', $columnRange->from());\n        self::assertSame('E', $columnRange->to());\n        self::assertSame(3, $columnRange->fromIndex());\n        self::assertSame(5, $columnRange->toIndex());\n        self::assertSame('C:E', (string) $columnRange);\n        self::assertSame(3, $columnRange->columnCount());\n        self::assertSame('C1:E1048576', (string) $columnRange->toCellRange());\n    }\n\n    public function testCreateSingleColumnRange(): void\n    {\n        $columnRange = new ColumnRange('E');\n        self::assertSame('E', $columnRange->from());\n        self::assertSame('E', $columnRange->to());\n        self::assertSame('E:E', (string) $columnRange);\n        self::assertSame(1, $columnRange->columnCount());\n        self::assertSame('E1:E1048576', (string) $columnRange->toCellRange());\n    }\n\n    public function testCreateColumnRangeWithWorksheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setTitle(\"Mark's Worksheet\");\n\n        $columnRange = new ColumnRange('C', 'E', $worksheet);\n        self::assertSame('C', $columnRange->from());\n        self::assertSame('E', $columnRange->to());\n        self::assertSame(\"'Mark''s Worksheet'!C:E\", (string) $columnRange);\n        self::assertSame(\"'Mark''s Worksheet'!C1:E1048576\", (string) $columnRange->toCellRange());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCreateColumnRangeFromArray(): void\n    {\n        $columnRange = ColumnRange::fromArray(['C', 'E']);\n        self::assertSame('C', $columnRange->from());\n        self::assertSame('E', $columnRange->to());\n        self::assertSame('C:E', (string) $columnRange);\n        self::assertSame(3, $columnRange->columnCount());\n        self::assertSame('C1:E1048576', (string) $columnRange->toCellRange());\n    }\n\n    public function testCreateColumnRangeFromIndexes(): void\n    {\n        $columnRange = ColumnRange::fromColumnIndexes(3, 5);\n        self::assertSame('C', $columnRange->from());\n        self::assertSame('E', $columnRange->to());\n        self::assertSame('C:E', (string) $columnRange);\n        self::assertSame(3, $columnRange->columnCount());\n        self::assertSame('C1:E1048576', (string) $columnRange->toCellRange());\n    }\n\n    public function testColumnRangeNext(): void\n    {\n        $columnRange = new ColumnRange('C', 'E');\n        $columnRangeNext = $columnRange->shiftDown(3);\n\n        self::assertSame('F', $columnRangeNext->from());\n        self::assertSame('H', $columnRangeNext->to());\n\n        // Check that original Column Range isn't changed\n        self::assertSame('C:E', (string) $columnRange);\n    }\n\n    public function testColumnRangePrevious(): void\n    {\n        $columnRange = new ColumnRange('C', 'E');\n        $columnRangeNext = $columnRange->shiftUp();\n\n        self::assertSame('B', $columnRangeNext->from());\n        self::assertSame('D', $columnRangeNext->to());\n\n        // Check that original Column Range isn't changed\n        self::assertSame('C:E', (string) $columnRange);\n    }\n\n    public function testIssue4309(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $columnRange = new ColumnRange('A', 'A');\n        $columnStyle = $sheet->getStyle($columnRange);\n        $columnStyle->applyFromArray([\n            'font' => ['bold' => true],\n        ]);\n        $columnXf = $sheet->getColumnDimension('A')->getXfIndex();\n        self::assertNotNull($columnXf);\n        self::assertTrue(\n            $spreadsheet->getCellXfByIndex($columnXf)\n                ->getFont()->getBold()\n        );\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/ConvertSpecialArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass ConvertSpecialArrayTest extends TestCase\n{\n    /**\n     * @param mixed[] $expected\n     * @param mixed[] $inArray\n     */\n    #[DataProvider('providerSpecialArrays')]\n    public function testConvertSpecialArray(array $expected, array $inArray): void\n    {\n        $reflectionMethod = new ReflectionMethod(Cell::class, 'convertSpecialArray');\n        $result = $reflectionMethod->invokeArgs(null, [$inArray]);\n        self::assertSame($expected, $result);\n    }\n\n    public static function providerSpecialArrays(): array\n    {\n        return [\n            'expected form row index to array indexed by column' => [\n                [\n                    [1, 2],\n                    [3, 4],\n                ],\n                [\n                    1 => ['A' => 1, 'B' => 2],\n                    2 => ['A' => 3, 'B' => 4],\n                ],\n            ],\n            'standard array unchanged' => [\n                [\n                    1 => [1, 2],\n                    2 => [3, 4],\n                ],\n                [\n                    1 => [1, 2],\n                    2 => [3, 4],\n                ],\n            ],\n            'uses index 0 so unchanged' => [\n                [\n                    ['A' => 1, 'B' => 2],\n                    ['A' => 3, 'B' => 4],\n                ],\n                [\n                    ['A' => 1, 'B' => 2],\n                    ['A' => 3, 'B' => 4],\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/CoordinateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse TypeError;\n\nclass CoordinateTest extends TestCase\n{\n    #[DataProvider('providerColumnString')]\n    public function testColumnIndexFromString(mixed $expectedResult, string $string): void\n    {\n        $columnIndex = Coordinate::columnIndexFromString($string);\n        self::assertEquals($expectedResult, $columnIndex);\n\n        $stringBack = Coordinate::stringFromColumnIndex($columnIndex);\n        self::assertEquals($stringBack, $string, 'should be able to get the original input with opposite method');\n    }\n\n    public static function providerColumnString(): array\n    {\n        return require 'tests/data/ColumnString.php';\n    }\n\n    public function testColumnIndexFromStringTooLong(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Column string index can not be beyond XFD');\n\n        Coordinate::columnIndexFromString('ABCD');\n    }\n\n    public function testColumnIndexFromStringTooShort(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Column string index can not be empty');\n\n        Coordinate::columnIndexFromString('');\n    }\n\n    #[DataProvider('providerColumnIndex')]\n    public function testStringFromColumnIndex(mixed $expectedResult, int $columnIndex): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(Exception::class);\n            $this->expectExceptionMessage('Invalid column index');\n        }\n        $string = Coordinate::stringFromColumnIndex($columnIndex);\n        self::assertEquals($expectedResult, $string);\n\n        $columnIndexBack = Coordinate::columnIndexFromString($string);\n        self::assertEquals($columnIndexBack, $columnIndex, 'should be able to get the original input with opposite method');\n    }\n\n    public static function providerColumnIndex(): array\n    {\n        return require 'tests/data/ColumnIndex.php';\n    }\n\n    #[DataProvider('providerCoordinates')]\n    public function testCoordinateFromString(mixed $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::coordinateFromString($rangeSet);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCoordinates(): array\n    {\n        return require 'tests/data/CellCoordinates.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerIndexesFromString')]\n    public function testIndexesFromString(array $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::indexesFromString($rangeSet);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerIndexesFromString(): array\n    {\n        return require 'tests/data/Cell/IndexesFromString.php';\n    }\n\n    public function testCoordinateFromStringWithRangeAddress(): void\n    {\n        $cellAddress = 'A1:AI2012';\n\n        try {\n            Coordinate::coordinateFromString($cellAddress);\n        } catch (\\Exception $e) {\n            self::assertInstanceOf(Exception::class, $e);\n            self::assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n\n    public function testCoordinateFromStringWithEmptyAddress(): void\n    {\n        $cellAddress = '';\n\n        try {\n            Coordinate::coordinateFromString($cellAddress);\n        } catch (\\Exception $e) {\n            self::assertInstanceOf(Exception::class, $e);\n            self::assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string');\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n\n    public function testCoordinateFromStringWithInvalidAddress(): void\n    {\n        $cellAddress = 'AI';\n\n        try {\n            Coordinate::coordinateFromString($cellAddress);\n        } catch (\\Exception $e) {\n            self::assertInstanceOf(Exception::class, $e);\n            self::assertEquals($e->getMessage(), 'Invalid cell coordinate ' . $cellAddress);\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n\n    #[DataProvider('providerAbsoluteCoordinates')]\n    public function testAbsoluteCoordinateFromString(string $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::absoluteCoordinate($rangeSet);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerAbsoluteCoordinates(): array\n    {\n        return require 'tests/data/CellAbsoluteCoordinate.php';\n    }\n\n    public function testAbsoluteCoordinateFromStringWithRangeAddress(): void\n    {\n        $cellAddress = 'A1:AI2012';\n\n        try {\n            Coordinate::absoluteCoordinate($cellAddress);\n        } catch (\\Exception $e) {\n            self::assertInstanceOf(Exception::class, $e);\n            self::assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n\n    #[DataProvider('providerAbsoluteReferences')]\n    public function testAbsoluteReferenceFromString(mixed $expectedResult, int|string $rangeSet): void\n    {\n        $result = Coordinate::absoluteReference((string) $rangeSet);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerAbsoluteReferences(): array\n    {\n        return require 'tests/data/CellAbsoluteReference.php';\n    }\n\n    public function testAbsoluteReferenceFromStringWithRangeAddress(): void\n    {\n        $cellAddress = 'A1:AI2012';\n\n        try {\n            Coordinate::absoluteReference($cellAddress);\n        } catch (\\Exception $e) {\n            self::assertInstanceOf(Exception::class, $e);\n            self::assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerSplitRange')]\n    public function testSplitRange(array $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::splitRange($rangeSet);\n        foreach ($result as $key => $split) {\n            if (!is_array($expectedResult[$key])) {\n                self::assertEquals($expectedResult[$key], $split[0]);\n            } else {\n                self::assertEquals($expectedResult[$key], $split);\n            }\n        }\n    }\n\n    public static function providerSplitRange(): array\n    {\n        return require 'tests/data/CellSplitRange.php';\n    }\n\n    /** @param mixed[] $rangeSets */\n    #[DataProvider('providerBuildRange')]\n    public function testBuildRange(mixed $expectedResult, array $rangeSets): void\n    {\n        $result = Coordinate::buildRange($rangeSets);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerBuildRange(): array\n    {\n        return require 'tests/data/CellBuildRange.php';\n    }\n\n    public function testBuildRangeInvalid(): void\n    {\n        $this->expectException(TypeError::class);\n\n        $cellRange = null;\n        // @phpstan-ignore-next-line\n        Coordinate::buildRange($cellRange);\n    }\n\n    public function testBuildRangeInvalid2(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Range does not contain any information');\n\n        $cellRange = [];\n        Coordinate::buildRange($cellRange);\n    }\n\n    #[DataProvider('providerRangeBoundaries')]\n    public function testRangeBoundaries(mixed $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::rangeBoundaries($rangeSet);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerRangeBoundaries(): array\n    {\n        return require 'tests/data/CellRangeBoundaries.php';\n    }\n\n    #[DataProvider('providerRangeDimension')]\n    public function testRangeDimension(mixed $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::rangeDimension($rangeSet);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerRangeDimension(): array\n    {\n        return require 'tests/data/CellRangeDimension.php';\n    }\n\n    #[DataProvider('providerGetRangeBoundaries')]\n    public function testGetRangeBoundaries(mixed $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::getRangeBoundaries($rangeSet);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerGetRangeBoundaries(): array\n    {\n        return require 'tests/data/CellGetRangeBoundaries.php';\n    }\n\n    #[DataProvider('providerCoordinateIsInsideRange')]\n    public static function testCoordinateIsInsideRange(bool $expectedResult, string $range, string $coordinate): void\n    {\n        $result = Coordinate::coordinateIsInsideRange($range, $coordinate);\n        self::assertEquals($result, $expectedResult);\n    }\n\n    public static function providerCoordinateIsInsideRange(): array\n    {\n        return require 'tests/data/Cell/CoordinateIsInsideRange.php';\n    }\n\n    #[DataProvider('providerCoordinateIsInsideRangeException')]\n    public static function testCoordinateIsInsideRangeException(string $expectedResult, string $range, string $coordinate): void\n    {\n        try {\n            Coordinate::coordinateIsInsideRange($range, $coordinate);\n        } catch (\\Exception $e) {\n            self::assertInstanceOf(Exception::class, $e);\n            self::assertEquals($e->getMessage(), $expectedResult);\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n\n    public static function providerCoordinateIsInsideRangeException(): array\n    {\n        return require 'tests/data/Cell/CoordinateIsInsideRangeException.php';\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerExtractAllCellReferencesInRange')]\n    public function testExtractAllCellReferencesInRange(array $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::extractAllCellReferencesInRange($rangeSet);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerExtractAllCellReferencesInRange(): array\n    {\n        return require 'tests/data/CellExtractAllCellReferencesInRange.php';\n    }\n\n    #[DataProvider('providerInvalidRange')]\n    public function testExtractAllCellReferencesInRangeInvalidRange(string $range): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Invalid range: \"' . $range . '\"');\n\n        Coordinate::extractAllCellReferencesInRange($range);\n    }\n\n    public static function providerInvalidRange(): array\n    {\n        return [['Z1:A1'], ['A4:A1'], ['B1:A1'], ['AA1:Z1']];\n    }\n\n    /** @param array<string, mixed> $rangeSets */\n    #[DataProvider('providerMergeRangesInCollection')]\n    public function testMergeRangesInCollection(mixed $expectedResult, array $rangeSets): void\n    {\n        $result = Coordinate::mergeRangesInCollection($rangeSets);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerMergeRangesInCollection(): array\n    {\n        return require 'tests/data/CellMergeRangesInCollection.php';\n    }\n\n    #[DataProvider('providerCoordinateIsRange')]\n    public function testCoordinateIsRange(mixed $expectedResult, string $rangeSet): void\n    {\n        $result = Coordinate::coordinateIsRange($rangeSet);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerCoordinateIsRange(): array\n    {\n        return require 'tests/data/CoordinateIsRange.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/DataType2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataType2Test extends TestCase\n{\n    public function testSetDataType(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(28.1);\n        self::assertSame(28.1, $sheet->getCell('A1')->getValue());\n        self::assertSame('28.1', (string) $sheet->getCell('A1'));\n        $sheet->getCell('A1')->setDataType(DataType::TYPE_STRING);\n        self::assertSame('28.1', $sheet->getCell('A1')->getValue());\n        $sheet->getCell('A1')->setDataType(DataType::TYPE_NUMERIC);\n        self::assertSame(28.1, $sheet->getCell('A1')->getValue());\n        $sheet->getCell('A1')->setDataType(DataType::TYPE_STRING2);\n        self::assertSame('28.1', $sheet->getCell('A1')->getValue());\n        $sheet->getCell('A1')->setDataType(DataType::TYPE_INLINE);\n        self::assertSame('28.1', $sheet->getCell('A1')->getValue());\n        $sheet->getCell('A1')->setDataType(DataType::TYPE_BOOL);\n        self::assertTrue($sheet->getCell('A1')->getValue());\n        $sheet->getCell('A1')->setDataType(DataType::TYPE_NUMERIC);\n        self::assertSame(1, $sheet->getCell('A1')->getValue());\n\n        $sheet->getCell('A2')->setValue('X');\n\n        try {\n            $sheet->getCell('A2')->setDataType(DataType::TYPE_NUMERIC);\n        } catch (PhpSpreadsheetException $e) {\n            self::assertSame('Invalid numeric value for datatype Numeric', $e->getMessage());\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/DataTypeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataTypeTest extends TestCase\n{\n    public function testGetErrorCodes(): void\n    {\n        $result = DataType::getErrorCodes();\n        self::assertGreaterThan(0, count($result));\n        self::assertArrayHasKey('#NULL!', $result);\n    }\n\n    public function testCheckString(): void\n    {\n        $richText = new RichText();\n        $result1 = DataType::checkString($richText);\n        self::assertSame($richText, $result1);\n\n        $stringLimit = 32767;\n        $randString = $this->randr($stringLimit + 10);\n        $result2 = DataType::checkString($randString);\n        self::assertIsString($result2);\n        self::assertSame($stringLimit, strlen($result2));\n\n        $dirtyString = \"bla bla\\r\\n bla\\r test\\n\";\n        $expected = \"bla bla\\n bla\\n test\\n\";\n        $result3 = DataType::checkString($dirtyString);\n        self::assertSame($expected, $result3);\n    }\n\n    private function randr(int $length = 8): string\n    {\n        $string = '';\n        for ($i = 0; $i < $length; ++$i) {\n            $x = mt_rand(0, 2);\n            switch ($x) {\n                case 0:\n                    $string .= chr(mt_rand(97, 122));\n\n                    break;\n                case 1:\n                    $string .= chr(mt_rand(65, 90));\n\n                    break;\n                case 2:\n                    $string .= chr(mt_rand(48, 57));\n\n                    break;\n            }\n        }\n\n        return $string;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/DataValidationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataValidationTest extends TestCase\n{\n    public function testNoValidation(): void\n    {\n        $dataValidation = new DataValidation();\n        self::assertSame('090624f04837265d79323c4a1b7e89d1', $dataValidation->getHashCode());\n        $dataValidation->setType(DataValidation::TYPE_CUSTOM);\n\n        self::assertSame('778f6c9e0ffcd5eaa7d8e1432d67f919', $dataValidation->getHashCode());\n        self::assertSame('778f6c9e0ffcd5eaa7d8e1432d67f919', $dataValidation->getHashCode(), 'getHashCode() should not have side effect');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/DataValidator2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DataValidator2Test extends AbstractFunctional\n{\n    public function testList(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load('tests/data/Reader/XLSX/issue.1432b.xlsx');\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('H1', $sheet->getTopLeftCell());\n        self::assertSame('K3', $sheet->getSelectedCells());\n\n        $testCell = $sheet->getCell('K3');\n        $validation = $testCell->getDataValidation();\n        self::assertSame(DataValidation::TYPE_LIST, $validation->getType());\n\n        $testCell = $sheet->getCell('R2');\n        $validation = $testCell->getDataValidation();\n        self::assertSame(DataValidation::TYPE_LIST, $validation->getType());\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n\n        $cell = 'K3';\n        $testCell = $sheet->getCell($cell);\n        $validation = $testCell->getDataValidation();\n        self::assertSame(DataValidation::TYPE_LIST, $validation->getType());\n        $testCell->setValue('Y');\n        self::assertTrue($testCell->hasValidValue(), 'K3 other sheet has valid value');\n        $testCell = $sheet->getCell($cell);\n        $testCell->setValue('X');\n        self::assertFalse($testCell->hasValidValue(), 'K3 other sheet has invalid value');\n\n        $cell = 'J2';\n        $testCell = $sheet->getCell($cell);\n        $validation = $testCell->getDataValidation();\n        self::assertSame(DataValidation::TYPE_LIST, $validation->getType());\n        $testCell = $sheet->getCell($cell);\n        $testCell->setValue('GBP');\n        self::assertTrue($testCell->hasValidValue(), 'J2 other sheet has valid value');\n        $testCell = $sheet->getCell($cell);\n        $testCell->setValue('XYZ');\n        self::assertFalse($testCell->hasValidValue(), 'J2 other sheet has invalid value');\n\n        $cell = 'R2';\n        $testCell = $sheet->getCell($cell);\n        $validation = $testCell->getDataValidation();\n        self::assertSame(DataValidation::TYPE_LIST, $validation->getType());\n        $testCell->setValue('ListItem2');\n        self::assertTrue($testCell->hasValidValue(), 'R2 same sheet has valid value');\n        $testCell = $sheet->getCell($cell);\n        $testCell->setValue('ListItem99');\n        self::assertFalse($testCell->hasValidValue(), 'R2 same sheet has invalid value');\n\n        $styles = $sheet->getConditionalStyles('I1:I1048576');\n        self::assertCount(1, $styles);\n        $style = $styles[0];\n        self::assertSame(Conditional::CONDITION_CELLIS, $style->getConditionType());\n        self::assertSame(Conditional::OPERATOR_BETWEEN, $style->getOperatorType());\n        $conditions = $style->getConditions();\n        self::assertSame('10', $conditions[0]);\n        self::assertSame('20', $conditions[1]);\n        self::assertSame('FF70AD47', $style->getStyle()->getFill()->getEndColor()->getARGB());\n\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/DataValidator3Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataValidator3Test extends TestCase\n{\n    public function testArrayFunctionAsList(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(3);\n        $sheet->getCell('A3')->setValue(5);\n        $sheet->getCell('A4')->setValue(7);\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n\n        $sheet->getCell('G1')->setValue('=UNIQUE(A1:A4)');\n        $validation = $sheet->getCell('H4')->getDataValidation();\n        $validation->setType(DataValidation::TYPE_LIST)\n            ->setFormula1('ANCHORARRAY(G1)');\n        $sheet->getCell('H4')->setValue(2);\n        self::assertFalse($sheet->getCell('H4')->hasValidValue());\n        $sheet->getCell('H4')->setValue(3);\n        self::assertTrue($sheet->getCell('H4')->hasValidValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/DataValidatorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataValidatorTest extends TestCase\n{\n    public function testNoValidation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $testCell = $sheet->getCell('A1');\n\n        self::assertTrue($testCell->hasValidValue(), 'a cell without any validation data is always valid');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnsupportedType(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $testCell = $sheet->getCell('A1');\n\n        $validation = $testCell->getDataValidation();\n        $validation->setType(DataValidation::TYPE_CUSTOM);\n        $validation->setAllowBlank(true);\n\n        self::assertFalse($testCell->hasValidValue(), 'cannot assert that value is valid when the validation type is not supported');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testList(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $testCell = $sheet->getCell('A1');\n\n        $validation = $testCell->getDataValidation();\n        $validation->setType(DataValidation::TYPE_LIST);\n\n        // blank value\n        $testCell->setValue('');\n        $validation->setAllowBlank(true);\n        self::assertTrue($testCell->hasValidValue(), 'cell can be empty');\n        $validation->setAllowBlank(false);\n        self::assertFalse($testCell->hasValidValue(), 'cell can not be empty');\n\n        // inline list\n        $validation->setFormula1('\"yes,no\"');\n        $testCell->setValue('foo');\n        self::assertFalse($testCell->hasValidValue(), \"cell value ('foo') is not allowed\");\n        $testCell->setValue('yes');\n        self::assertTrue($testCell->hasValidValue(), \"cell value ('yes') has to be allowed\");\n\n        // list from cells\n        $sheet->getCell('B1')->setValue(5);\n        $sheet->getCell('B2')->setValue(6);\n        $sheet->getCell('B3')->setValue(7);\n        $testCell = $sheet->getCell('A1'); // redefine $testCell, because it has broken coordinates after using other cells\n        $validation->setFormula1('$B$1:$B$3');\n        $testCell->setValue('10');\n        self::assertFalse($testCell->hasValidValue(), \"cell value ('10') is not allowed\");\n        $testCell = $sheet->getCell('A1'); // redefine $testCell, because it has broken coordinates after using other cells\n        $testCell->setValue('5');\n        self::assertTrue($testCell->hasValidValue(), \"cell value ('5') has to be allowed\");\n\n        $testCell = $sheet->getCell('A1'); // redefine $testCell, because it has broken coordinates after using other cells\n        $validation->setFormula1('broken : cell : coordinates');\n\n        self::assertFalse($testCell->hasValidValue(), 'invalid formula should not throw exceptions');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInvalidNumeric(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $validation = $sheet->getCell('A1')->getDataValidation();\n        $validation->setType(DataValidation::TYPE_WHOLE)\n            ->setOperator(DataValidation::OPERATOR_EQUAL)\n            ->setFormula1('broken : cell : coordinates');\n        $sheet->getCell('A1')->setValue(0);\n        self::assertFalse($sheet->getCell('A1')->hasValidValue(), 'invalid formula should return false');\n        $validation->setOperator('invalid operator')\n            ->setFormula1('0');\n        self::assertFalse($sheet->getCell('A1')->hasValidValue(), 'invalid operator should return false');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefinedNameAsList(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(3);\n        $sheet->getCell('A3')->setValue(5);\n        $sheet->getCell('A4')->setValue(7);\n        $spreadsheet->addNamedRange(new NamedRange('listvalues', $sheet, '$A$1:$A$4'));\n\n        $validation = $sheet->getCell('D4')->getDataValidation();\n        $validation->setType(DataValidation::TYPE_LIST)\n            ->setFormula1('listvalues');\n        $sheet->getCell('D4')->setValue(2);\n        self::assertFalse($sheet->getCell('D4')->hasValidValue());\n        $sheet->getCell('D4')->setValue(3);\n        self::assertTrue($sheet->getCell('D4')->hasValidValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse DateTime;\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse Stringable;\n\n/**\n * Tests for DefaultValueBinder::dataTypeForValue().\n */\nclass DefaultValueBinderTest extends TestCase\n{\n    /**\n     * Test data type detection for various value types.\n     */\n    #[DataProvider('binderProvider')]\n    public function testBindValue(mixed $value, string $expectedDataType, mixed $expectedValue = null): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $binder = new DefaultValueBinder();\n        self::assertTrue($binder->bindValue($cell, $value));\n        $result = $cell->getDataType();\n        self::assertSame($expectedDataType, $result);\n        self::assertSame($expectedValue ?? $value, $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * @return array<string, array{0: mixed, 1:string, 2?: mixed}>\n     */\n    public static function binderProvider(): array\n    {\n        $richText = new RichText();\n        $richText->createTextRun('Hello World');\n        $stringableFormula = new class () implements Stringable {\n            public function __toString(): string\n            {\n                return '=SUM(A1:A10)';\n            }\n        };\n\n        return [\n            // Null\n            'null' => [null, DataType::TYPE_NULL],\n\n            // Booleans\n            'true' => [true, DataType::TYPE_BOOL],\n            'false' => [false, DataType::TYPE_BOOL],\n            'bool-like string' => ['false', DataType::TYPE_STRING],\n\n            // Integers\n            'integer zero' => [0, DataType::TYPE_NUMERIC],\n            'positive integer' => [42, DataType::TYPE_NUMERIC],\n            'negative integer' => [-100, DataType::TYPE_NUMERIC],\n            'trailing newline ignored, probably an error' => [\"123456\\n\", DataType::TYPE_NUMERIC, 123456],\n            'trailing space' => ['123456 ', DataType::TYPE_STRING],\n\n            // Very large integers treated as string to prevent precision loss\n            'large positive' => [1_000_000_000_000_000, DataType::TYPE_STRING, '1000000000000000'],\n            'large negative' => [-1_000_000_000_000_000, DataType::TYPE_STRING, '-1000000000000000'],\n\n            // Floats\n            'float' => [3.14159, DataType::TYPE_NUMERIC],\n            'negative float' => [-2.5, DataType::TYPE_NUMERIC],\n            'float zero' => [0.0, DataType::TYPE_NUMERIC],\n\n            // Strings\n            'empty string' => ['', DataType::TYPE_STRING],\n            'simple text' => ['Hello World', DataType::TYPE_STRING],\n            'text with numbers' => ['ABC123', DataType::TYPE_STRING],\n            'leading zero number' => ['007', DataType::TYPE_STRING],\n\n            // Numeric strings\n            'numeric string integer' => ['123', DataType::TYPE_NUMERIC, 123],\n            'numeric string float' => ['123.25', DataType::TYPE_NUMERIC, 123.25],\n            'scientific notation 1' => ['1.5e10', DataType::TYPE_NUMERIC, 1.5E10],\n            'issue 4766 very large positive exponent' => ['4E433', DataType::TYPE_STRING],\n            'issue 4766 scientific large negative exponent' => ['6E-444', DataType::TYPE_NUMERIC, 0.0],\n            'issue 4766 small exponent no decimal point numeric' => ['4E4', DataType::TYPE_NUMERIC, 4E4],\n            'negative numeric string' => ['-42.5', DataType::TYPE_NUMERIC, -42.5],\n\n            // Valid formulas\n            'formula simple' => ['=1+1', DataType::TYPE_FORMULA],\n            'formula sum' => ['=SUM(A1:A10)', DataType::TYPE_FORMULA],\n            'formula cell ref' => ['=A1', DataType::TYPE_FORMULA],\n            'formula if' => ['=IF(A1>0,1,0)', DataType::TYPE_FORMULA],\n            'formula vlookup' => ['=VLOOKUP(A1,B1:C10,2,FALSE)', DataType::TYPE_FORMULA],\n\n            // Invalid formulas (treated as strings)\n            'equals only' => ['=', DataType::TYPE_STRING],\n            'equals with space' => ['= ', DataType::TYPE_STRING],\n            'Issue 1310 Multiple = at start' => ['======', DataType::TYPE_STRING],\n            'Issue 1310 Variant 1' => ['= =====', DataType::TYPE_STRING],\n            'Issue 1310 Variant 2' => ['=2*3=', DataType::TYPE_STRING],\n\n            // Error codes\n            'error NULL' => ['#NULL!', DataType::TYPE_ERROR],\n            'error DIV0' => ['#DIV/0!', DataType::TYPE_ERROR],\n            'error VALUE' => ['#VALUE!', DataType::TYPE_ERROR],\n            'error REF' => ['#REF!', DataType::TYPE_ERROR],\n            'error NAME' => ['#NAME?', DataType::TYPE_ERROR],\n            'error NUM' => ['#NUM!', DataType::TYPE_ERROR],\n            'error NA' => ['#N/A', DataType::TYPE_ERROR],\n\n            // DateTime strings should be treated as string\n            'datetime format' => ['2024-01-15 10:30:00', DataType::TYPE_STRING],\n            'date only' => ['2024-01-15', DataType::TYPE_STRING],\n            'time only' => ['10:30:00', DataType::TYPE_STRING],\n\n            // DateTime objects should be treated as string\n            'DateTime' => [new DateTime('Jan 1, 2000'), DataType::TYPE_STRING, '2000-01-01 00:00:00'],\n            'DateTimeImmutable' => [new DateTimeImmutable('Jan 2, 2000'), DataType::TYPE_STRING, '2000-01-02 00:00:00'],\n\n            // Stringable object\n            'Stringable object' => [new StringableObject(), DataType::TYPE_STRING, 'abc'],\n            'Stringable formula' => [$stringableFormula, DataType::TYPE_FORMULA, '=SUM(A1:A10)'],\n\n            // Rich Text should return inline\n            'Rich Text' => [$richText, DataType::TYPE_INLINE],\n        ];\n    }\n\n    public function testNonStringableBindValue(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        try {\n            $sheet->getCell('A1')->setValue($this);\n            self::fail('Did not receive expected Exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unable to bind unstringable', $e->getMessage());\n        }\n\n        try {\n            $sheet->getCell('A3')->setValue(fopen(__FILE__, 'rb'));\n            self::fail('Did not receive expected Exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unable to bind unstringable', $e->getMessage());\n        }\n\n        try {\n            $sheet->getCell('A3')->setValue([]);\n            self::fail('Did not receive expected Exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unable to bind unstringable', $e->getMessage());\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCanOverrideStaticMethodWithoutOverridingBindValue(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $binder = new ValueBinderWithOverriddenDataTypeForValue();\n\n        self::assertFalse($binder::$called);\n        $binder->bindValue($cell, 123);\n        self::assertTrue($binder::$called);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDataTypeForValueExceptions(): void\n    {\n        try {\n            self::assertSame('s', DefaultValueBinder::dataTypeForValue(new SpreadsheetException()));\n        } catch (SpreadsheetException $e) {\n            self::fail('Should not have failed for stringable');\n        }\n\n        try {\n            DefaultValueBinder::dataTypeForValue([]);\n            self::fail('Should have failed for array');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('unusable type array', $e->getMessage());\n        }\n\n        try {\n            DefaultValueBinder::dataTypeForValue(new DateTime());\n            self::fail('Should have failed for DateTime');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('unusable type DateTime', $e->getMessage());\n        }\n    }\n\n    /**\n     * Test that calling dataTypeForValue multiple times with formulas\n     * works correctly (verifies singleton reuse doesn't cause issues).\n     */\n    public function testMultipleFormulaCallsWorkCorrectly(): void\n    {\n        $result1 = DefaultValueBinder::dataTypeForValue('=SUM(A1:A10)');\n        $result2 = DefaultValueBinder::dataTypeForValue('=AVERAGE(B1:B10)');\n        $result3 = DefaultValueBinder::dataTypeForValue('=1+2+3');\n\n        self::assertSame(DataType::TYPE_FORMULA, $result1);\n        self::assertSame(DataType::TYPE_FORMULA, $result2);\n        self::assertSame(DataType::TYPE_FORMULA, $result3);\n    }\n\n    /**\n     * Test mixed calls to ensure state is properly preserved.\n     */\n    public function testMixedCallsPreserveCorrectBehavior(): void\n    {\n        self::assertSame(DataType::TYPE_FORMULA, DefaultValueBinder::dataTypeForValue('=A1'));\n        self::assertSame(DataType::TYPE_STRING, DefaultValueBinder::dataTypeForValue('Hello'));\n        self::assertSame(DataType::TYPE_FORMULA, DefaultValueBinder::dataTypeForValue('=B2'));\n        self::assertSame(DataType::TYPE_NUMERIC, DefaultValueBinder::dataTypeForValue(42));\n        self::assertSame(DataType::TYPE_FORMULA, DefaultValueBinder::dataTypeForValue('=C3*D4'));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/Hyperlink2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Hyperlink2Test extends TestCase\n{\n    public function testTwoLiterals(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $basicUrl = 'example.net';\n        $actualUrl = \"https://www.$basicUrl\";\n        $toolTip = \"Link to $basicUrl\";\n        $sheet->setCellValue('A1', $actualUrl);\n        $sheet->setCellValue('B1', $toolTip);\n        $sheet->setCellValue('C1', \"=HYPERLINK(\\\"$actualUrl\\\", \\\"$toolTip\\\")\");\n        $result = $sheet->getCell('C1')->getCalculatedValue();\n        self::assertSame($toolTip, $sheet->getCell('C1')->getCalculatedValue());\n        $hyperlink = $sheet->getCell('C1')->getHyperlink();\n        self::assertSame($actualUrl, $hyperlink->getUrl());\n        self::assertSame($toolTip, $hyperlink->getTooltip());\n        // No hyperlink should be created for A1 or B1 - issue 3889\n        $hyperlink = $sheet->getCell('A1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n        $hyperlink = $sheet->getCell('B1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellAndLiteral(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $basicUrl = 'example.org';\n        $actualUrl = \"https://www.$basicUrl\";\n        $toolTip = \"Link to $basicUrl\";\n        $sheet->setCellValue('A1', $actualUrl);\n        $sheet->setCellValue('B1', $toolTip);\n        $sheet->setCellValue('C1', \"=HYPERLINK(A1, \\\"$toolTip\\\")\");\n        $result = $sheet->getCell('C1')->getCalculatedValue();\n        self::assertSame($toolTip, $sheet->getCell('C1')->getCalculatedValue());\n        $hyperlink = $sheet->getCell('C1')->getHyperlink();\n        self::assertSame($actualUrl, $hyperlink->getUrl());\n        self::assertSame($toolTip, $hyperlink->getTooltip());\n        // No hyperlink should be created for A1 or B1 - issue 3889\n        $hyperlink = $sheet->getCell('A1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n        $hyperlink = $sheet->getCell('B1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLiteralAndCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $basicUrl = 'example.edu';\n        $actualUrl = \"https://www.$basicUrl\";\n        $toolTip = \"Link to $basicUrl\";\n        $sheet->setCellValue('A1', $actualUrl);\n        $sheet->setCellValue('B1', $toolTip);\n        $sheet->setCellValue('C1', \"=HYPERLINK(\\\"$actualUrl\\\", B1)\");\n        $result = $sheet->getCell('C1')->getCalculatedValue();\n        self::assertSame($toolTip, $sheet->getCell('C1')->getCalculatedValue());\n        $hyperlink = $sheet->getCell('C1')->getHyperlink();\n        self::assertSame($actualUrl, $hyperlink->getUrl());\n        self::assertSame($toolTip, $hyperlink->getTooltip());\n        // No hyperlink should be created for A1 or B1 - issue 3889\n        $hyperlink = $sheet->getCell('A1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n        $hyperlink = $sheet->getCell('B1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testTwoCells(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $basicUrl = 'example.com';\n        $actualUrl = \"https://www.$basicUrl\";\n        $toolTip = \"Link to $basicUrl\";\n        $sheet->setCellValue('A1', $actualUrl);\n        $sheet->setCellValue('B1', $toolTip);\n        $sheet->setCellValue('C1', '=HYPERLINK(A1, B1)');\n        $result = $sheet->getCell('C1')->getCalculatedValue();\n        self::assertSame($toolTip, $sheet->getCell('C1')->getCalculatedValue());\n        $hyperlink = $sheet->getCell('C1')->getHyperlink();\n        self::assertSame($actualUrl, $hyperlink->getUrl());\n        self::assertSame($toolTip, $hyperlink->getTooltip());\n        // No hyperlink should be created for A1 or B1 - issue 3889\n        $hyperlink = $sheet->getCell('A1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n        $hyperlink = $sheet->getCell('B1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testResetOnSet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $basicUrl = 'example.com';\n        $actualUrl = \"https://www.$basicUrl\";\n        $toolTip = \"Link to $basicUrl\";\n        $sheet->setCellValue('A1', $actualUrl);\n        $sheet->setCellValue('B1', $toolTip);\n        $sheet->setCellValue('C1', '=HYPERLINK(A1, B1)');\n        $result = $sheet->getCell('C1')->getCalculatedValue();\n        self::assertSame($toolTip, $sheet->getCell('C1')->getCalculatedValue());\n        $hyperlink = $sheet->getCell('C1')->getHyperlink();\n        self::assertSame($actualUrl, $hyperlink->getUrl());\n        self::assertSame($toolTip, $hyperlink->getTooltip());\n\n        $sheet->setCellValue('C1', 123);\n        $hyperlink = $sheet->getCell('C1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n    }\n\n    public function testResetOnSetExplicit(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $basicUrl = 'example.com';\n        $actualUrl = \"https://www.$basicUrl\";\n        $toolTip = \"Link to $basicUrl\";\n        $sheet->setCellValue('A1', $actualUrl);\n        $sheet->setCellValue('B1', $toolTip);\n        $sheet->setCellValue('C1', '=HYPERLINK(A1, B1)');\n        $result = $sheet->getCell('C1')->getCalculatedValue();\n        self::assertSame($toolTip, $sheet->getCell('C1')->getCalculatedValue());\n        $hyperlink = $sheet->getCell('C1')->getHyperlink();\n        self::assertSame($actualUrl, $hyperlink->getUrl());\n        self::assertSame($toolTip, $hyperlink->getTooltip());\n\n        $sheet->setCellValueExplicit('C1', '123', DataType::TYPE_STRING);\n        $hyperlink = $sheet->getCell('C1')->getHyperlink();\n        self::assertSame('', $hyperlink->getUrl());\n        self::assertSame('', $hyperlink->getTooltip());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/HyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HyperlinkTest extends TestCase\n{\n    public function testGetUrl(): void\n    {\n        $urlValue = 'https://www.example.com';\n\n        $testInstance = new Hyperlink($urlValue);\n\n        $result = $testInstance->getUrl();\n        self::assertEquals($urlValue, $result);\n    }\n\n    public function testSetUrl(): void\n    {\n        $initialUrlValue = 'https://www.example.com';\n        $newUrlValue = 'http://github.com/PHPOffice/PhpSpreadsheet';\n\n        $testInstance = new Hyperlink($initialUrlValue);\n        $testInstance->setUrl($newUrlValue);\n\n        $result = $testInstance->getUrl();\n        self::assertEquals($newUrlValue, $result);\n    }\n\n    public function testGetTooltip(): void\n    {\n        $tooltipValue = 'PhpSpreadsheet Web Site';\n\n        $testInstance = new Hyperlink('', $tooltipValue);\n\n        $result = $testInstance->getTooltip();\n        self::assertEquals($tooltipValue, $result);\n    }\n\n    public function testSetTooltip(): void\n    {\n        $initialTooltipValue = 'PhpSpreadsheet Web Site';\n        $newTooltipValue = 'PhpSpreadsheet Repository on Github';\n\n        $testInstance = new Hyperlink('', $initialTooltipValue);\n        $testInstance->setTooltip($newTooltipValue);\n\n        $result = $testInstance->getTooltip();\n        self::assertEquals($newTooltipValue, $result);\n    }\n\n    public function testIsInternal(): void\n    {\n        $initialUrlValue = 'https://www.example.com';\n        $newUrlValue = 'sheet://Worksheet1!A1';\n\n        $testInstance = new Hyperlink($initialUrlValue);\n        $result = $testInstance->isInternal();\n        self::assertFalse($result);\n\n        $testInstance->setUrl($newUrlValue);\n        $result = $testInstance->isInternal();\n        self::assertTrue($result);\n    }\n\n    public function testGetHashCode(): void\n    {\n        $url1 = 'https://www.example.com';\n        $tooltip1 = 'PhpSpreadsheet Web Site';\n        $url2 = 'https://www.example.com';\n        $tooltip2 = 'PhpSpreadsheet Web Site';\n        $url3 = 'https://www.example.com';\n        $tooltip3 = 'PhpSpreadsheet Web Site '; // note extra space\n\n        $hy1 = new Hyperlink($url1, $tooltip1);\n        $hy2 = new Hyperlink($url2, $tooltip2);\n        $hy3 = new Hyperlink($url3, $tooltip3);\n        self::assertNotSame($hy1, $hy2);\n        self::assertSame($hy1->getHashCode(), $hy2->getHashCode());\n        self::assertNotEquals($hy1->getHashCode(), $hy3->getHashCode());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/RowRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\RowRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowRangeTest extends TestCase\n{\n    public function testCreateRowRange(): void\n    {\n        $rowRange = new RowRange(3, 5);\n        self::assertSame(3, $rowRange->from());\n        self::assertSame(5, $rowRange->to());\n        self::assertSame('3:5', (string) $rowRange);\n        self::assertSame(3, $rowRange->rowCount());\n        self::assertSame('A3:XFD5', (string) $rowRange->toCellRange());\n    }\n\n    public function testCreateSingleRowRange(): void\n    {\n        $rowRange = new RowRange(3);\n        self::assertSame(3, $rowRange->from());\n        self::assertSame(3, $rowRange->to());\n        self::assertSame('3:3', (string) $rowRange);\n        self::assertSame(1, $rowRange->rowCount());\n    }\n\n    public function testCreateRowRangeWithWorksheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setTitle(\"Mark's Worksheet\");\n\n        $rowRange = new RowRange(3, 5, $worksheet);\n        self::assertSame(3, $rowRange->from());\n        self::assertSame(5, $rowRange->to());\n        self::assertSame(\"'Mark''s Worksheet'!3:5\", (string) $rowRange);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCreateRowRangeFromArray(): void\n    {\n        $rowRange = RowRange::fromArray([3, 5]);\n        self::assertSame(3, $rowRange->from());\n        self::assertSame(5, $rowRange->to());\n        self::assertSame('3:5', (string) $rowRange);\n        self::assertSame(3, $rowRange->rowCount());\n        self::assertSame('A3:XFD5', (string) $rowRange->toCellRange());\n    }\n\n    public function testRowRangeNext(): void\n    {\n        $rowRange = new RowRange(3, 5);\n        $rowRangeNext = $rowRange->shiftRight(3);\n\n        self::assertSame(6, $rowRangeNext->from());\n        self::assertSame(8, $rowRangeNext->to());\n\n        // Check that original Row Range isn't changed\n        self::assertSame('3:5', (string) $rowRange);\n    }\n\n    public function testRowRangePrevious(): void\n    {\n        $rowRange = new RowRange(3, 5);\n        $rowRangeNext = $rowRange->shiftLeft();\n\n        self::assertSame(2, $rowRangeNext->from());\n        self::assertSame(4, $rowRangeNext->to());\n\n        // Check that original Row Range isn't changed\n        self::assertSame('3:5', (string) $rowRange);\n    }\n\n    public function testIssue4309(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $rowRange = new RowRange(1, 1);\n        $rowStyle = $sheet->getStyle($rowRange);\n        $rowStyle->applyFromArray([\n            'font' => ['name' => 'Arial'],\n        ]);\n        $rowXf = $sheet->getRowDimension(1)->getXfIndex();\n        self::assertNotNull($rowXf);\n        self::assertSame('Arial', $spreadsheet->getCellXfByIndex($rowXf)->getFont()->getName());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/SetValueExplicitCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse ArgumentCountError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass SetValueExplicitCellTest extends TestCase\n{\n    protected string $method = 'setValueExplicit';\n\n    protected int $requiredParameters = 1;\n\n    public function testRequired(): void\n    {\n        $reflectionMethod = new ReflectionMethod(Cell::class, $this->method);\n        $requiredParameters = $reflectionMethod->getNumberOfRequiredParameters();\n        self::assertSame($this->requiredParameters, $requiredParameters);\n    }\n\n    public static function setValueExplicitTypeArgumentProvider(): array\n    {\n        return require 'tests/data/Cell/SetValueExplicitTypeArguments.php';\n    }\n\n    #[DataProvider('setValueExplicitTypeArgumentProvider')]\n    public function testSetValueExplicitTypeArgumentHandling(\n        mixed $value,\n        ?string $dataType,\n        mixed $expectedValue,\n        string $expectedDataType\n    ): void {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $coordinate = 'A1';\n        $cell = $worksheet->getCell($coordinate);\n\n        try {\n            if ($dataType !== null) {\n                $cell->{$this->method}($value, $dataType);\n            } else {\n                $cell->{$this->method}($value);\n                self::assertSame(1, $this->requiredParameters);\n            }\n            self::assertSame($expectedValue, $cell->getValue());\n            self::assertSame($expectedDataType, $cell->getDataType());\n        } catch (ArgumentCountError) {\n            self::assertSame(2, $this->requiredParameters);\n            self::assertNull($dataType);\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetValueExplicitImage(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        try {\n            $sheet->getCell('A1')->setValueExplicit(1, DataType::TYPE_DRAWING_IN_CELL);\n            self::fail('Should have thrown exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('not a drawing', $e->getMessage());\n        }\n\n        $objDrawing = new Drawing();\n        $directory = 'tests/data/Writer/XLSX';\n        $objDrawing->setPath($directory . '/blue_square.png');\n        $sheet->getCell('C2')->setValueExplicit($objDrawing, DataType::TYPE_DRAWING_IN_CELL);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/StringValueBinder2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StringValueBinder2Test extends TestCase\n{\n    private IValueBinder $valueBinder;\n\n    protected function setUp(): void\n    {\n        $this->valueBinder = Cell::getValueBinder();\n    }\n\n    protected function tearDown(): void\n    {\n        Cell::setValueBinder($this->valueBinder);\n    }\n\n    public function testStringValueBinderIgnoredErrorsDefault(): void\n    {\n        $valueBinder = new StringValueBinder();\n        Cell::setValueBinder($valueBinder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $richText = new RichText();\n        $richText->createTextRun('6');\n        $richText2 = new RichText();\n        $richText2->createTextRun('a');\n        $sheet->fromArray([\n            [1, 'x', 3.2],\n            ['y', -5, 'z'],\n            [new DateTime(), $richText, $richText2],\n            [new StringableObject('a'), new StringableObject(2), 'z'],\n        ]);\n        $ignoredCells = [];\n        foreach ($sheet->getRowIterator() as $row) {\n            foreach ($row->getCellIterator() as $cell) {\n                $coordinate = $cell->getCoordinate();\n                $dataType = $cell->getDataType();\n                if ($dataType !== DataType::TYPE_INLINE) {\n                    self::assertSame(DataType::TYPE_STRING, $dataType, \"not string for cell $coordinate\");\n                }\n                if ($cell->getIgnoredErrors()->getNumberStoredAsText()) {\n                    $ignoredCells[] = $coordinate;\n                }\n            }\n        }\n        self::assertSame([], $ignoredCells);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStringValueBinderIgnoredErrorsTrue(): void\n    {\n        $valueBinder = new StringValueBinder();\n        $valueBinder->setSetIgnoredErrors(true);\n        Cell::setValueBinder($valueBinder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $richText = new RichText();\n        $richText->createTextRun('6');\n        $richText2 = new RichText();\n        $richText2->createTextRun('a');\n        $sheet->fromArray([\n            [1, 'x', 3.2],\n            ['y', -5, 'z'],\n            [new DateTime(), $richText, $richText2],\n            [new StringableObject('a'), new StringableObject(2), 'z'],\n        ]);\n        $ignoredCells = [];\n        foreach ($sheet->getRowIterator() as $row) {\n            foreach ($row->getCellIterator() as $cell) {\n                $coordinate = $cell->getCoordinate();\n                $dataType = $cell->getDataType();\n                if ($dataType !== DataType::TYPE_INLINE) {\n                    self::assertSame(DataType::TYPE_STRING, $dataType, \"not string for cell $coordinate\");\n                }\n                if ($cell->getIgnoredErrors()->getNumberStoredAsText()) {\n                    $ignoredCells[] = $coordinate;\n                }\n            }\n        }\n        self::assertSame(['A1', 'C1', 'B2', 'B3', 'B4'], $ignoredCells);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStringValueBinderPreserveNumeric(): void\n    {\n        $valueBinder = new StringValueBinder();\n        $valueBinder->setNumericConversion(false);\n        $valueBinder->setSetIgnoredErrors(true);\n        Cell::setValueBinder($valueBinder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $richText = new RichText();\n        $richText->createTextRun('6');\n        $richText2 = new RichText();\n        $richText2->createTextRun('a');\n        $sheet->fromArray([\n            [1, 'x', 3.2],\n            ['y', -5, 'z'],\n            [new DateTime(), $richText, $richText2],\n            [new StringableObject('a'), new StringableObject(2), 'z'],\n        ]);\n        $ignoredCells = [];\n        foreach ($sheet->getRowIterator() as $row) {\n            foreach ($row->getCellIterator() as $cell) {\n                $coordinate = $cell->getCoordinate();\n                $expected = (is_int($cell->getValue()) || is_float($cell->getValue())) ? DataType::TYPE_NUMERIC : (($cell->getValue() instanceof RichText) ? DataType::TYPE_INLINE : DataType::TYPE_STRING);\n                self::assertSame($expected, $cell->getDataType(), \"wrong type for cell $coordinate\");\n                if ($cell->getIgnoredErrors()->getNumberStoredAsText()) {\n                    $ignoredCells[] = $coordinate;\n                }\n            }\n        }\n        self::assertSame(['B3', 'B4'], $ignoredCells);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/StringValueBinderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse DateTime;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StringValueBinderTest extends TestCase\n{\n    private \\PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder $valueBinder;\n\n    protected function setUp(): void\n    {\n        $this->valueBinder = Cell::getValueBinder();\n    }\n\n    protected function tearDown(): void\n    {\n        Cell::setValueBinder($this->valueBinder);\n    }\n\n    #[DataProvider('providerDataValuesDefault')]\n    public function testStringValueBinderDefaultBehaviour(\n        mixed $value,\n        mixed $expectedValue,\n        string $expectedDataType\n    ): void {\n        Cell::setValueBinder(new StringValueBinder());\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue($value);\n        self::assertSame($expectedValue, $cell->getValue());\n        self::assertSame($expectedDataType, $cell->getDataType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDataValuesDefault(): array\n    {\n        return [\n            [null, '', DataType::TYPE_STRING],\n            [true, '1', DataType::TYPE_STRING],\n            [false, '', DataType::TYPE_STRING],\n            ['', '', DataType::TYPE_STRING],\n            ['123', '123', DataType::TYPE_STRING],\n            ['123.456', '123.456', DataType::TYPE_STRING],\n            ['0.123', '0.123', DataType::TYPE_STRING],\n            ['.123', '.123', DataType::TYPE_STRING],\n            ['-0.123', '-0.123', DataType::TYPE_STRING],\n            ['-.123', '-.123', DataType::TYPE_STRING],\n            ['1.23e-4', '1.23e-4', DataType::TYPE_STRING],\n            ['ABC', 'ABC', DataType::TYPE_STRING],\n            ['=SUM(A1:C3)', '=SUM(A1:C3)', DataType::TYPE_STRING],\n            [123, '123', DataType::TYPE_STRING],\n            [123.456, '123.456', DataType::TYPE_STRING],\n            [0.123, '0.123', DataType::TYPE_STRING],\n            [.123, '0.123', DataType::TYPE_STRING],\n            [-0.123, '-0.123', DataType::TYPE_STRING],\n            [-.123, '-0.123', DataType::TYPE_STRING],\n            [1.23e-4, '0.000123', DataType::TYPE_STRING],\n            [1.23e-24, '1.23E-24', DataType::TYPE_STRING],\n            [new DateTime('2021-06-01 00:00:00', new DateTimeZone('UTC')), '2021-06-01 00:00:00', DataType::TYPE_STRING],\n        ];\n    }\n\n    public function testNonStringableBindValue(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        Cell::setValueBinder(new StringValueBinder());\n\n        try {\n            $sheet->getCell('A1')->setValue($this);\n            self::fail('Did not receive expected Exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unable to bind unstringable', $e->getMessage());\n        }\n        $sheet->getCell('A2')->setValue(new StringableObject());\n        self::assertSame('abc', $sheet->getCell('A2')->getValue());\n\n        try {\n            $sheet->getCell('A3')->setValue([1, 2, 3]);\n            self::fail('Did not receive expected Exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unable to bind unstringable', $e->getMessage());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('providerDataValuesSuppressNullConversion')]\n    public function testStringValueBinderSuppressNullConversion(\n        mixed $value,\n        mixed $expectedValue,\n        string $expectedDataType\n    ): void {\n        $binder = new StringValueBinder();\n        $binder->setNullConversion(false);\n        Cell::setValueBinder($binder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue($value);\n        self::assertSame($expectedValue, $cell->getValue());\n        self::assertSame($expectedDataType, $cell->getDataType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDataValuesSuppressNullConversion(): array\n    {\n        return [\n            [null, null, DataType::TYPE_NULL],\n            [true, '1', DataType::TYPE_STRING],\n            [123, '123', DataType::TYPE_STRING],\n        ];\n    }\n\n    #[DataProvider('providerDataValuesSuppressBooleanConversion')]\n    public function testStringValueBinderSuppressBooleanConversion(\n        mixed $value,\n        mixed $expectedValue,\n        string $expectedDataType\n    ): void {\n        $binder = new StringValueBinder();\n        $binder->setBooleanConversion(false);\n        Cell::setValueBinder($binder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue($value);\n        self::assertSame($expectedValue, $cell->getValue());\n        self::assertSame($expectedDataType, $cell->getDataType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDataValuesSuppressBooleanConversion(): array\n    {\n        return [\n            [true, true, DataType::TYPE_BOOL],\n            [false, false, DataType::TYPE_BOOL],\n            [null, '', DataType::TYPE_STRING],\n            [123, '123', DataType::TYPE_STRING],\n        ];\n    }\n\n    #[DataProvider('providerDataValuesSuppressNumericConversion')]\n    public function testStringValueBinderSuppressNumericConversion(\n        mixed $value,\n        mixed $expectedValue,\n        string $expectedDataType\n    ): void {\n        $binder = new StringValueBinder();\n        $binder->setNumericConversion(false);\n        Cell::setValueBinder($binder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue($value);\n        self::assertSame($expectedValue, $cell->getValue());\n        self::assertSame($expectedDataType, $cell->getDataType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDataValuesSuppressNumericConversion(): array\n    {\n        return [\n            [123, 123, DataType::TYPE_NUMERIC],\n            [123.456, 123.456, DataType::TYPE_NUMERIC],\n            [0.123, 0.123, DataType::TYPE_NUMERIC],\n            [.123, 0.123, DataType::TYPE_NUMERIC],\n            [-0.123, -0.123, DataType::TYPE_NUMERIC],\n            [-.123, -0.123, DataType::TYPE_NUMERIC],\n            [1.23e-4, 0.000123, DataType::TYPE_NUMERIC],\n            [1.23e-24, 1.23E-24, DataType::TYPE_NUMERIC],\n            [true, '1', DataType::TYPE_STRING],\n            [false, '', DataType::TYPE_STRING],\n            [null, '', DataType::TYPE_STRING],\n            'Issue 4766 very large positive exponent scientific notation ignored' => ['4E433', '4E433', DataType::TYPE_STRING],\n            'Issue 4766 very large negative exponent scientific notation ignored' => ['4E-433', '4E-433', DataType::TYPE_STRING],\n            'Issue 4766 small exponent scientific ignored' => ['4E4', '4E4', DataType::TYPE_STRING],\n        ];\n    }\n\n    #[DataProvider('providerDataValuesSuppressFormulaConversion')]\n    public function testStringValueBinderSuppressFormulaConversion(\n        mixed $value,\n        mixed $expectedValue,\n        string $expectedDataType\n    ): void {\n        $binder = new StringValueBinder();\n        $binder->setFormulaConversion(false);\n        Cell::setValueBinder($binder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue($value);\n        self::assertSame($expectedValue, $cell->getValue());\n        self::assertSame($expectedDataType, $cell->getDataType());\n        if ($expectedDataType === DataType::TYPE_FORMULA) {\n            self::assertFalse($sheet->getStyle('A1')->getQuotePrefix());\n        } else {\n            self::assertTrue($sheet->getStyle('A1')->getQuotePrefix());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDataValuesSuppressFormulaConversion(): array\n    {\n        return [\n            'normal formula' => ['=SUM(A1:C3)', '=SUM(A1:C3)', DataType::TYPE_FORMULA],\n            'issue 1310' => ['======', '======', DataType::TYPE_STRING],\n        ];\n    }\n\n    #[DataProvider('providerDataValuesSuppressAllConversion')]\n    public function testStringValueBinderSuppressAllConversion(\n        mixed $value,\n        mixed $expectedValue,\n        string $expectedDataType\n    ): void {\n        $binder = new StringValueBinder();\n        $binder->setConversionForAllValueTypes(false);\n        Cell::setValueBinder($binder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue($value);\n        self::assertSame($expectedValue, $cell->getValue());\n        self::assertSame($expectedDataType, $cell->getDataType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerDataValuesSuppressAllConversion(): array\n    {\n        return [\n            [null, null, DataType::TYPE_NULL],\n            [true, true, DataType::TYPE_BOOL],\n            [false, false, DataType::TYPE_BOOL],\n            ['', '', DataType::TYPE_STRING],\n            ['123', '123', DataType::TYPE_STRING],\n            ['123.456', '123.456', DataType::TYPE_STRING],\n            ['0.123', '0.123', DataType::TYPE_STRING],\n            ['.123', '.123', DataType::TYPE_STRING],\n            ['-0.123', '-0.123', DataType::TYPE_STRING],\n            ['-.123', '-.123', DataType::TYPE_STRING],\n            ['1.23e-4', '1.23e-4', DataType::TYPE_STRING],\n            ['ABC', 'ABC', DataType::TYPE_STRING],\n            ['=SUM(A1:C3)', '=SUM(A1:C3)', DataType::TYPE_FORMULA],\n            [123, 123, DataType::TYPE_NUMERIC],\n            [123.456, 123.456, DataType::TYPE_NUMERIC],\n            [0.123, 0.123, DataType::TYPE_NUMERIC],\n            [.123, 0.123, DataType::TYPE_NUMERIC],\n            [-0.123, -0.123, DataType::TYPE_NUMERIC],\n            [-.123, -0.123, DataType::TYPE_NUMERIC],\n            [1.23e-4, 0.000123, DataType::TYPE_NUMERIC],\n            [1.23e-24, 1.23E-24, DataType::TYPE_NUMERIC],\n        ];\n    }\n\n    public function testStringValueBinderForRichTextObject(): void\n    {\n        $objRichText = new RichText();\n        $objRichText->createText('Hello World');\n\n        $binder = new StringValueBinder();\n        $binder->setConversionForAllValueTypes(false);\n        Cell::setValueBinder($binder);\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue($objRichText);\n        self::assertSame('inlineStr', $cell->getDataType());\n        self::assertSame('Hello World', $cell->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/StringableObject.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nclass StringableObject\n{\n    private int|string $value;\n\n    public function __construct(int|string $value = 'abc')\n    {\n        $this->value = $value;\n    }\n\n    public function __toString(): string\n    {\n        return (string) $this->value;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Cell/ValueBinderWithOverriddenDataTypeForValue.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Cell;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder;\n\nclass ValueBinderWithOverriddenDataTypeForValue extends DefaultValueBinder\n{\n    public static bool $called = false;\n\n    public static function dataTypeForValue(mixed $value): string\n    {\n        self::$called = true;\n\n        return parent::dataTypeForValue($value);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/CellReferenceHelperTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\CellReferenceHelper;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellReferenceHelperTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellReferenceHelperInsertColumnsProvider')]\n    public function testCellReferenceHelperInsertColumns(string $expectedResult, string $cellAddress): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', 2, 0);\n        $result = $cellReferenceHelper->updateCellReference($cellAddress);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function cellReferenceHelperInsertColumnsProvider(): array\n    {\n        return [\n            ['A1', 'A1'],\n            ['D5', 'D5'],\n            ['G5', 'E5'],\n            'issue3363 Y5' => ['Y5', 'W5'],\n            'issue3363 Z5' => ['Z5', 'X5'],\n            ['AA5', 'Y5'],\n            ['AB5', 'Z5'],\n            ['XFC5', 'XFA5'],\n            ['XFD5', 'XFB5'],\n            ['XFD5', 'XFC5'],\n            ['XFD5', 'XFD5'],\n            ['$E5', '$E5'],\n            'issue3363 $Z5' => ['$Z5', '$Z5'],\n            ['$XFA5', '$XFA5'],\n            ['$XFB5', '$XFB5'],\n            ['$XFC5', '$XFC5'],\n            ['$XFD5', '$XFD5'],\n            ['G$5', 'E$5'],\n            'issue3363 Y$5' => ['Y$5', 'W$5'],\n            ['XFC$5', 'XFA$5'],\n            ['XFD$5', 'XFB$5'],\n            ['XFD$5', 'XFC$5'],\n            ['XFD$5', 'XFD$5'],\n            ['I5', 'G5'],\n            ['$G$5', '$G$5'],\n            'issue3363 $Z$5' => ['$Z$5', '$Z$5'],\n            ['$XFA$5', '$XFA$5'],\n            ['$XFB$5', '$XFB$5'],\n            ['$XFC$5', '$XFC$5'],\n            ['$XFD$5', '$XFD$5'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellReferenceHelperDeleteColumnsProvider')]\n    public function testCellReferenceHelperDeleteColumns(string $expectedResult, string $cellAddress): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', -2, 0);\n        $result = $cellReferenceHelper->updateCellReference($cellAddress);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public function testCantUseRange(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Only single cell references');\n        $cellReferenceHelper = new CellReferenceHelper('E5', 2, 0);\n        $cellReferenceHelper->updateCellReference('A1:A6');\n    }\n\n    public static function cellReferenceHelperDeleteColumnsProvider(): array\n    {\n        return [\n            ['A1', 'A1'],\n            ['D5', 'D5'],\n            ['C5', 'E5'],\n            'issue3363 Y5' => ['Y5', 'AA5'],\n            'issue3363 Z5' => ['Z5', 'AB5'],\n            ['$E5', '$E5'],\n            'issue3363 $Y5' => ['$Y5', '$Y5'],\n            ['C$5', 'E$5'],\n            'issue3363 Z$5' => ['Z$5', 'AB$5'],\n            ['E5', 'G5'],\n            ['$G$5', '$G$5'],\n            'issue3363 $Z$5' => ['$Z$5', '$Z$5'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellReferenceHelperInsertRowsProvider')]\n    public function testCellReferenceHelperInsertRows(string $expectedResult, string $cellAddress): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', 0, 2);\n        $result = $cellReferenceHelper->updateCellReference($cellAddress);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function cellReferenceHelperInsertRowsProvider(): array\n    {\n        return [\n            ['A1', 'A1'],\n            ['E4', 'E4'],\n            ['E7', 'E5'],\n            ['E1048575', 'E1048573'],\n            ['E1048576', 'E1048574'],\n            ['E1048576', 'E1048575'],\n            ['E1048576', 'E1048576'],\n            'issue3363 Y5' => ['Y7', 'Y5'],\n            'issue3363 Z5' => ['Z7', 'Z5'],\n            ['E$5', 'E$5'],\n            'issue3363 Y$5' => ['Y$5', 'Y$5'],\n            ['$E7', '$E5'],\n            'issue3363 $Z5' => ['$Z7', '$Z5'],\n            ['E11', 'E9'],\n            ['$E$9', '$E$9'],\n            'issue3363 $Z$5' => ['$Z$5', '$Z$5'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellReferenceHelperDeleteRowsProvider')]\n    public function testCellReferenceHelperDeleteRows(string $expectedResult, string $cellAddress): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', 0, -2);\n        $result = $cellReferenceHelper->updateCellReference($cellAddress);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function cellReferenceHelperDeleteRowsProvider(): array\n    {\n        return [\n            ['A1', 'A1'],\n            ['E4', 'E4'],\n            ['E3', 'E5'],\n            'issue3363 Y5' => ['Y3', 'Y5'],\n            'issue3363 Z5' => ['Z3', 'Z5'],\n            ['E$5', 'E$5'],\n            'issue3363 Y$5' => ['Y$5', 'Y$5'],\n            ['$E3', '$E5'],\n            'issue3363 $Z5' => ['$Z3', '$Z5'],\n            ['E7', 'E9'],\n            ['$E$9', '$E$9'],\n            'issue3363 $Z$5' => ['$Z$5', '$Z$5'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellReferenceHelperInsertColumnsAbsoluteProvider')]\n    public function testCellReferenceHelperInsertColumnsAbsolute(string $expectedResult, string $cellAddress): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', 2, 0);\n        $result = $cellReferenceHelper->updateCellReference($cellAddress, true);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function cellReferenceHelperInsertColumnsAbsoluteProvider(): array\n    {\n        return [\n            ['A1', 'A1'],\n            ['D5', 'D5'],\n            ['G5', 'E5'],\n            'issue3363 Y5' => ['Y5', 'W5'],\n            'issue3363 Z5' => ['Z5', 'X5'],\n            ['$G5', '$E5'],\n            'issue3363 $Y5' => ['$Y5', '$W5'],\n            ['G$5', 'E$5'],\n            'issue3363 Y$5' => ['Y$5', 'W$5'],\n            ['I5', 'G5'],\n            ['$I$5', '$G$5'],\n            'issue3363 $Y$5' => ['$Y$5', '$W$5'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellReferenceHelperDeleteColumnsAbsoluteProvider')]\n    public function testCellReferenceHelperDeleteColumnsAbsolute(string $expectedResult, string $cellAddress): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', -2, 0);\n        $result = $cellReferenceHelper->updateCellReference($cellAddress, true);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function cellReferenceHelperDeleteColumnsAbsoluteProvider(): array\n    {\n        return [\n            ['A1', 'A1'],\n            ['D5', 'D5'],\n            ['C5', 'E5'],\n            'issue3363 Y5' => ['Y5', 'AA5'],\n            'issue3363 Z5' => ['Z5', 'AB5'],\n            ['$C5', '$E5'],\n            'issue3363 $Y5' => ['$Y5', '$AA5'],\n            ['C$5', 'E$5'],\n            'issue3363 Z$5' => ['Z$5', 'AB$5'],\n            ['E5', 'G5'],\n            ['$E$5', '$G$5'],\n            'issue3363 $Z$5' => ['$Z$5', '$AB$5'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellReferenceHelperInsertRowsAbsoluteProvider')]\n    public function testCellReferenceHelperInsertRowsAbsolute(string $expectedResult, string $cellAddress): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', 0, 2);\n        $result = $cellReferenceHelper->updateCellReference($cellAddress, true);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function cellReferenceHelperInsertRowsAbsoluteProvider(): array\n    {\n        return [\n            ['A1', 'A1'],\n            ['E4', 'E4'],\n            ['E7', 'E5'],\n            'issue3363 Y5' => ['Y7', 'Y5'],\n            'issue3363 Z5' => ['Z7', 'Z5'],\n            ['E$7', 'E$5'],\n            'issue3363 Y$5' => ['Y$7', 'Y$5'],\n            ['$E7', '$E5'],\n            'issue3363 $Y5' => ['$Y7', '$Y5'],\n            ['E11', 'E9'],\n            ['$E$11', '$E$9'],\n            'issue3363 $Z$5' => ['$Z$7', '$Z$5'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellReferenceHelperDeleteRowsAbsoluteProvider')]\n    public function testCellReferenceHelperDeleteRowsAbsolute(string $expectedResult, string $cellAddress): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', 0, -2);\n        $result = $cellReferenceHelper->updateCellReference($cellAddress, true);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function cellReferenceHelperDeleteRowsAbsoluteProvider(): array\n    {\n        return [\n            ['A1', 'A1'],\n            ['E4', 'E4'],\n            ['E3', 'E5'],\n            'issue3363 Y5' => ['Y3', 'Y5'],\n            'issue3363 Z5' => ['Z3', 'Z5'],\n            ['E$3', 'E$5'],\n            'issue3363 Y$5' => ['Y$3', 'Y$5'],\n            ['$E3', '$E5'],\n            'issue3363 $Z5' => ['$Z3', '$Z5'],\n            ['E7', 'E9'],\n            ['$E$7', '$E$9'],\n            'issue3363 $Z$5' => ['$Z$3', '$Z$5'],\n        ];\n    }\n\n    public function testCellReferenceHelperDeleteColumnAltogether(): void\n    {\n        $cellReferenceHelper = new CellReferenceHelper('E5', -4, 0);\n        self::assertTrue($cellReferenceHelper->cellAddressInDeleteRange('A5'));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/AxisGlowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass AxisGlowTest extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testGlowY(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_AREACHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n        $yAxis = $chart->getChartAxisY();\n        $xAxis = $chart->getChartAxisX();\n        $yGlowSize = 10.0;\n        $yAxis->setGlowProperties($yGlowSize, 'FFFF00', 30, ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $expectedGlowColor = [\n            'type' => 'srgbClr',\n            'value' => 'FFFF00',\n            'alpha' => 30,\n        ];\n        $softEdgesY = 2.5;\n        $yAxis->setSoftEdges($softEdgesY);\n        $softEdgesX = 5;\n        $xAxis->setSoftEdges($softEdgesX);\n        self::assertEquals($yGlowSize, $yAxis->getGlowProperty('size'));\n        self::assertEquals($expectedGlowColor, $yAxis->getGlowProperty('color'));\n        self::assertSame($expectedGlowColor['value'], $yAxis->getGlowProperty(['color', 'value']));\n        self::assertEquals($softEdgesY, $yAxis->getSoftEdgesSize());\n        self::assertEquals($softEdgesX, $xAxis->getSoftEdgesSize());\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis2 = $chart2->getChartAxisY();\n        self::assertEquals($yGlowSize, $yAxis2->getGlowProperty('size'));\n        self::assertEquals($expectedGlowColor, $yAxis2->getGlowProperty('color'));\n        self::assertEquals($softEdgesY, $yAxis2->getSoftEdgesSize());\n        $xAxis2 = $chart2->getChartAxisX();\n        self::assertNull($xAxis2->getGlowProperty('size'));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testGlowX(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_AREACHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n        $yAxis = $chart->getChartAxisX(); // deliberate\n        $yGlowSize = 20.0;\n        $yAxis->setGlowProperties($yGlowSize, 'accent1', 20, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n        $expectedGlowColor = [\n            'type' => 'schemeClr',\n            'value' => 'accent1',\n            'alpha' => 20,\n        ];\n        self::assertEquals($yGlowSize, $yAxis->getGlowProperty('size'));\n        self::assertEquals($expectedGlowColor, $yAxis->getGlowProperty('color'));\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis2 = $chart2->getChartAxisX(); // deliberate\n        self::assertEquals($yGlowSize, $yAxis2->getGlowProperty('size'));\n        self::assertEquals($expectedGlowColor, $yAxis2->getGlowProperty('color'));\n        $xAxis2 = $chart2->getChartAxisY(); // deliberate\n        self::assertNull($xAxis2->getGlowProperty('size'));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/AxisPropertiesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass AxisPropertiesTest extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testAxisProperties(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_LINECHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n        $xAxis = new Axis();\n        $xAxis->setFillParameters('FF0000', null, 'srgbClr');\n        self::assertSame('FF0000', $xAxis->getFillProperty('value'));\n        self::assertSame('', $xAxis->getFillProperty('alpha'));\n        self::assertSame('srgbClr', $xAxis->getFillProperty('type'));\n\n        $xAxis->setAxisOptionsProperties(\n            Properties::AXIS_LABELS_HIGH, // axisLabels,\n            null, // $horizontalCrossesValue,\n            Properties::HORIZONTAL_CROSSES_MAXIMUM, //horizontalCrosses\n            Properties::ORIENTATION_REVERSED, //axisOrientation\n            Properties::TICK_MARK_INSIDE, //majorTmt\n            Properties::TICK_MARK_OUTSIDE, //minorTmt\n            '8', //minimum\n            '68', //maximum\n            '20', //majorUnit\n            '5', //minorUnit\n            '6', //textRotation\n            '0', //hidden\n        );\n        self::assertSame(Properties::AXIS_LABELS_HIGH, $xAxis->getAxisOptionsProperty('axis_labels'));\n        self::assertNull($xAxis->getAxisOptionsProperty('horizontal_crosses_value'));\n        self::assertSame(Properties::HORIZONTAL_CROSSES_MAXIMUM, $xAxis->getAxisOptionsProperty('horizontal_crosses'));\n        self::assertSame(Properties::ORIENTATION_REVERSED, $xAxis->getAxisOptionsProperty('orientation'));\n        self::assertSame(Properties::TICK_MARK_INSIDE, $xAxis->getAxisOptionsProperty('major_tick_mark'));\n        self::assertSame(Properties::TICK_MARK_OUTSIDE, $xAxis->getAxisOptionsProperty('minor_tick_mark'));\n        self::assertSame('8', $xAxis->getAxisOptionsProperty('minimum'));\n        self::assertSame('68', $xAxis->getAxisOptionsProperty('maximum'));\n        self::assertSame('20', $xAxis->getAxisOptionsProperty('major_unit'));\n        self::assertSame('5', $xAxis->getAxisOptionsProperty('minor_unit'));\n        self::assertSame('6', $xAxis->getAxisOptionsProperty('textRotation'));\n        self::assertSame('0', $xAxis->getAxisOptionsProperty('hidden'));\n\n        $yAxis = new Axis();\n        $yAxis->setFillParameters('accent1', 30, 'schemeClr');\n        self::assertSame('accent1', $yAxis->getFillProperty('value'));\n        self::assertSame('30', $yAxis->getFillProperty('alpha'));\n        self::assertSame('schemeClr', $yAxis->getFillProperty('type'));\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel,  // yAxisLabel\n            $xAxis, // xAxis\n            $yAxis, // yAxis\n            null, //majorGridlines,\n            null // minorGridlines\n        );\n        $xAxis2 = $chart->getChartAxisX();\n        self::assertSame('FF0000', $xAxis2->getFillProperty('value'));\n        self::assertSame('', $xAxis2->getFillProperty('alpha'));\n        self::assertSame('srgbClr', $xAxis2->getFillProperty('type'));\n\n        self::assertSame(Properties::AXIS_LABELS_HIGH, $xAxis2->getAxisOptionsProperty('axis_labels'));\n        self::assertNull($xAxis2->getAxisOptionsProperty('horizontal_crosses_value'));\n        self::assertSame(Properties::HORIZONTAL_CROSSES_MAXIMUM, $xAxis2->getAxisOptionsProperty('horizontal_crosses'));\n        self::assertSame(Properties::ORIENTATION_REVERSED, $xAxis2->getAxisOptionsProperty('orientation'));\n        self::assertSame(Properties::TICK_MARK_INSIDE, $xAxis2->getAxisOptionsProperty('major_tick_mark'));\n        self::assertSame(Properties::TICK_MARK_OUTSIDE, $xAxis2->getAxisOptionsProperty('minor_tick_mark'));\n        self::assertSame('8', $xAxis2->getAxisOptionsProperty('minimum'));\n        self::assertSame('68', $xAxis2->getAxisOptionsProperty('maximum'));\n        self::assertSame('20', $xAxis2->getAxisOptionsProperty('major_unit'));\n        self::assertSame('5', $xAxis2->getAxisOptionsProperty('minor_unit'));\n        self::assertSame('6', $xAxis2->getAxisOptionsProperty('textRotation'));\n        self::assertSame('0', $xAxis2->getAxisOptionsProperty('hidden'));\n\n        $yAxis2 = $chart->getChartAxisY();\n        self::assertSame('accent1', $yAxis2->getFillProperty('value'));\n        self::assertSame('30', $yAxis2->getFillProperty('alpha'));\n        self::assertSame('schemeClr', $yAxis2->getFillProperty('type'));\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $xAxis3 = $chart2->getChartAxisX();\n        self::assertSame('FF0000', $xAxis3->getFillProperty('value'));\n        self::assertSame('', $xAxis3->getFillProperty('alpha'));\n        self::assertSame('srgbClr', $xAxis3->getFillProperty('type'));\n\n        self::assertSame(Properties::AXIS_LABELS_HIGH, $xAxis3->getAxisOptionsProperty('axis_labels'));\n        self::assertSame(Properties::TICK_MARK_INSIDE, $xAxis3->getAxisOptionsProperty('major_tick_mark'));\n        self::assertSame(Properties::TICK_MARK_OUTSIDE, $xAxis3->getAxisOptionsProperty('minor_tick_mark'));\n        self::assertNull($xAxis3->getAxisOptionsProperty('horizontal_crosses_value'));\n        self::assertSame(Properties::HORIZONTAL_CROSSES_MAXIMUM, $xAxis3->getAxisOptionsProperty('horizontal_crosses'));\n        self::assertSame(Properties::ORIENTATION_REVERSED, $xAxis3->getAxisOptionsProperty('orientation'));\n        self::assertSame('8', $xAxis3->getAxisOptionsProperty('minimum'));\n        self::assertSame('68', $xAxis3->getAxisOptionsProperty('maximum'));\n        self::assertSame('20', $xAxis3->getAxisOptionsProperty('major_unit'));\n        self::assertSame('5', $xAxis3->getAxisOptionsProperty('minor_unit'));\n        self::assertSame('6', $xAxis3->getAxisOptionsProperty('textRotation'));\n        self::assertSame('0', $xAxis3->getAxisOptionsProperty('hidden'));\n\n        $yAxis3 = $chart2->getChartAxisY();\n        self::assertSame('accent1', $yAxis3->getFillProperty('value'));\n        self::assertSame('30', $yAxis3->getFillProperty('alpha'));\n        self::assertSame('schemeClr', $yAxis3->getFillProperty('type'));\n\n        $xAxis3->setAxisOrientation(Properties::ORIENTATION_NORMAL);\n        self::assertSame(Properties::ORIENTATION_NORMAL, $xAxis3->getAxisOptionsProperty('orientation'));\n        $xAxis3->setAxisOptionsProperties(\n            Properties::AXIS_LABELS_HIGH, // axisLabels,\n            '5' // $horizontalCrossesValue,\n        );\n        self::assertSame('5', $xAxis3->getAxisOptionsProperty('horizontal_crosses_value'));\n\n        $yAxis3->setLineColorProperties('0000FF', null, 'srgbClr');\n        self::assertSame('0000FF', $yAxis3->getLineColorProperty('value'));\n        self::assertNull($yAxis3->getLineColorProperty('alpha'));\n        self::assertSame('srgbClr', $yAxis3->getLineColorProperty('type'));\n        $yAxis3->setAxisNumberProperties(Properties::FORMAT_CODE_GENERAL);\n        self::assertFalse($yAxis3->getAxisIsNumericFormat());\n        $yAxis3->setAxisNumberProperties(Properties::FORMAT_CODE_NUMBER);\n        self::assertTrue($yAxis3->getAxisIsNumericFormat());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/AxisShadowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass AxisShadowTest extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testGlowY(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_AREACHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n        $yAxis = $chart->getChartAxisY();\n        $expectedY = [\n            'effect' => 'outerShdw',\n            'algn' => 'tl',\n            'blur' => 5,\n            'direction' => 45,\n            'distance' => 3,\n            'rotWithShape' => 0,\n            'color' => [\n                'type' => ChartColor::EXCEL_COLOR_TYPE_STANDARD,\n                'value' => 'black',\n                'alpha' => 40,\n            ],\n        ];\n        foreach ($expectedY as $key => $value) {\n            $yAxis->setShadowProperty($key, $value);\n        }\n        foreach ($expectedY as $key => $value) {\n            self::assertEquals($value, $yAxis->getShadowProperty($key), $key);\n        }\n        $xAxis = $chart->getChartAxisX();\n        $expectedX = [\n            'effect' => 'outerShdw',\n            'algn' => 'bl',\n            'blur' => 6,\n            'direction' => 315,\n            'distance' => 3,\n            'rotWithShape' => 0,\n            'size' => [\n                'sx' => null,\n                'sy' => 1.50,\n                'kx' => -84,\n                'ky' => null,\n            ],\n            'color' => [\n                'type' => ChartColor::EXCEL_COLOR_TYPE_RGB,\n                'value' => 'FF0000',\n                'alpha' => 20,\n            ],\n        ];\n        foreach ($expectedX as $key => $value) {\n            $xAxis->setShadowProperty($key, $value);\n        }\n        foreach ($expectedX as $key => $value) {\n            self::assertEquals($value, $xAxis->getShadowProperty($key), $key);\n        }\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis2 = $chart2->getChartAxisY();\n        foreach ($expectedY as $key => $value) {\n            self::assertEquals($value, $yAxis2->getShadowProperty($key), $key);\n        }\n        $xAxis2 = $chart2->getChartAxisX();\n        foreach ($expectedX as $key => $value) {\n            self::assertEquals($value, $xAxis2->getShadowProperty($key), $key);\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/BarChartCustomColorsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\n// based on 33_Chart_create_bar_custom_colors.php\n\nclass BarChartCustomColorsTest extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testBarchartColor(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n        // Custom colors for dataSeries (gray, blue, red, orange)\n        $colors = [\n            'cccccc',\n            '*accent1', // use schemeClr, was '00abb8',\n            '/green', // use prstClr, was 'b8292f',\n            'eb8500',\n        ];\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels1 = [\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_STRING,\n                'Worksheet!$C$1',\n                null,\n                1\n            ), // 2011\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues1 = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        //     Custom Colors\n        $dataSeriesValues1Element = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4);\n        $dataSeriesValues1Element->setFillColor($colors);\n        $dataSeriesValues1 = [$dataSeriesValues1Element];\n\n        // Build the dataseries\n        $series1 = new DataSeries(\n            DataSeries::TYPE_PIECHART, // plotType\n            null, // plotGrouping (Pie charts don't have any grouping)\n            range(0, count($dataSeriesValues1) - 1), // plotOrder\n            $dataSeriesLabels1, // plotLabel\n            $xAxisTickValues1, // plotCategory\n            $dataSeriesValues1          // plotValues\n        );\n\n        // Set up a layout object for the Pie chart\n        $layout1 = new Layout();\n        $layout1->setShowVal(true);\n        $layout1->setShowPercent(true);\n\n        // Set the series in the plot area\n        $plotArea1 = new PlotArea($layout1, [$series1]);\n        // Set the chart legend\n        $legend1 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n        $title1 = new Title('Test Pie Chart');\n\n        // Create the chart\n        $chart1 = new Chart(\n            'chart1', // name\n            $title1, // title\n            $legend1, // legend\n            $plotArea1, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            null  // no Y-Axis for Pie Chart\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart1->setTopLeftPosition('A7');\n        $chart1->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart1);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $plotArea2 = $chart2->getPlotArea();\n        self::assertNotNull($plotArea2);\n        $dataSeries2 = $plotArea2->getPlotGroup();\n        self::assertCount(1, $dataSeries2);\n        $plotValues = $dataSeries2[0]->getPlotValues();\n        self::assertCount(1, $plotValues);\n        $fillColors = $plotValues[0]->getFillColor();\n        self::assertSame($colors, $fillColors);\n\n        $writer = new XlsxWriter($reloadedSpreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart2);\n        self::assertSame(1, substr_count($data, '<a:srgbClr val=\"cccccc\"/>'));\n        self::assertSame(1, substr_count($data, '<a:schemeClr val=\"accent1\"/>'));\n        self::assertSame(1, substr_count($data, '<a:prstClr val=\"green\"/>'));\n        self::assertSame(1, substr_count($data, '<a:srgbClr val=\"eb8500\"/>'));\n        self::assertSame(4, substr_count($data, '<c:dPt>'));\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ChartBorderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ChartBorderTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n    }\n\n    public function testChartBorder(): void\n    {\n        $file = self::DIRECTORY . '32readwriteLineChart5.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertSame('ffffff', $chart->getFillColor()->getValue());\n        self::assertSame('srgbClr', $chart->getFillColor()->getType());\n        self::assertSame('d9d9d9', $chart->getBorderLines()->getLineColorProperty('value'));\n        self::assertSame('srgbClr', $chart->getBorderLines()->getLineColorProperty('type'));\n        self::assertEqualsWithDelta(9360 / Properties::POINTS_WIDTH_MULTIPLIER, $chart->getBorderLines()->getLineStyleProperty('width'), 1.0E-8);\n        self::assertTrue($chart->getChartAxisY()->getNoFill());\n        self::assertFalse($chart->getChartAxisX()->getNoFill());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ChartCloneTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ChartCloneTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function testCloneSheet(): void\n    {\n        $file = self::DIRECTORY . '32readwriteLineChart5.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $oldSheet = $spreadsheet->getActiveSheet();\n\n        $sheet = clone $oldSheet;\n        $sheet->setTitle('test2');\n        $spreadsheet->addsheet($sheet);\n\n        $oldCharts = $oldSheet->getChartCollection();\n        self::assertCount(1, $oldCharts);\n        $oldChart = $oldCharts[0];\n        self::assertNotNull($oldChart);\n\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertNotSame($oldChart, $chart);\n\n        self::assertSame('ffffff', $chart->getFillColor()->getValue());\n        self::assertSame('srgbClr', $chart->getFillColor()->getType());\n        self::assertSame('d9d9d9', $chart->getBorderLines()->getLineColorProperty('value'));\n        self::assertSame('srgbClr', $chart->getBorderLines()->getLineColorProperty('type'));\n        self::assertEqualsWithDelta(9360 / Properties::POINTS_WIDTH_MULTIPLIER, $chart->getBorderLines()->getLineStyleProperty('width'), 1.0E-8);\n        self::assertTrue($chart->getChartAxisY()->getNoFill());\n        self::assertFalse($chart->getChartAxisX()->getNoFill());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCloneSheetWithLegendAndTitle(): void\n    {\n        $file = self::DIRECTORY . '32readwriteChartWithImages1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $oldSheet = $spreadsheet->getActiveSheet();\n\n        $sheet = clone $oldSheet;\n        $sheet->setTitle('test2');\n        $spreadsheet->addsheet($sheet);\n\n        $oldCharts = $oldSheet->getChartCollection();\n        self::assertCount(1, $oldCharts);\n        $oldChart = $oldCharts[0];\n        self::assertNotNull($oldChart);\n\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertNotSame($oldChart, $chart);\n\n        self::assertNotNull($chart->getLegend());\n        self::assertNotSame($chart->getLegend(), $oldChart->getLegend());\n        self::assertNotNull($chart->getTitle());\n        self::assertNotSame($chart->getTitle(), $oldChart->getTitle());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCloneSheetWithBubbleSizes(): void\n    {\n        $file = self::DIRECTORY . '32readwriteBubbleChart2.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $oldSheet = $spreadsheet->getActiveSheet();\n\n        $sheet = clone $oldSheet;\n        $sheet->setTitle('test2');\n        $spreadsheet->addsheet($sheet);\n\n        $oldCharts = $oldSheet->getChartCollection();\n        self::assertCount(1, $oldCharts);\n        $oldChart = $oldCharts[0];\n        self::assertNotNull($oldChart);\n\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertNotSame($oldChart, $chart);\n\n        $oldGroup = $oldChart->getPlotArea()?->getPlotGroup();\n        self::assertNotNull($oldGroup);\n        self::assertCount(1, $oldGroup);\n        $oldSizes = $oldGroup[0]->getPlotBubbleSizes();\n        self::assertCount(2, $oldSizes);\n\n        $plotGroup = $chart->getPlotArea()?->getPlotGroup();\n        self::assertNotNull($plotGroup);\n        self::assertCount(1, $plotGroup);\n        $bubbleSizes = $plotGroup[0]->getPlotBubbleSizes();\n        self::assertCount(2, $bubbleSizes);\n        self::assertNotSame($bubbleSizes, $oldSizes);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCloneSheetWithTrendLines(): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChartTrendlines1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $oldSheet = $spreadsheet->getActiveSheet();\n\n        $sheet = clone $oldSheet;\n        $sheet->setTitle('test2');\n        $spreadsheet->addsheet($sheet);\n\n        $oldCharts = $oldSheet->getChartCollection();\n        self::assertCount(2, $oldCharts);\n        $oldChart = $oldCharts[1];\n        self::assertNotNull($oldChart);\n\n        $charts = $sheet->getChartCollection();\n        self::assertCount(2, $charts);\n        $chart = $charts[1];\n        self::assertNotNull($chart);\n        self::assertNotSame($oldChart, $chart);\n\n        $oldGroup = $chart->getPlotArea()?->getPlotGroup();\n        self::assertNotNull($oldGroup);\n        self::assertCount(1, $oldGroup);\n        $oldLabels = $oldGroup[0]->getPlotLabels();\n        self::assertCount(1, $oldLabels);\n        self::assertCount(3, $oldLabels[0]->getTrendLines());\n\n        $plotGroup = $chart->getPlotArea()?->getPlotGroup();\n        self::assertNotNull($plotGroup);\n        self::assertCount(1, $plotGroup);\n        $plotLabels = $plotGroup[0]->getPlotLabels();\n        self::assertCount(1, $plotLabels);\n        self::assertCount(3, $plotLabels[0]->getTrendLines());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCloneFillColorArray(): void\n    {\n        // code borrowed from BarChartCustomColorsTest\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n        // Custom colors for dataSeries (gray, blue, red, orange)\n        $colors = [\n            'cccccc',\n            '*accent1', // use schemeClr, was '00abb8',\n            '/green', // use prstClr, was 'b8292f',\n            'eb8500',\n        ];\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels1 = [\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_STRING,\n                'Worksheet!$C$1',\n                null,\n                1\n            ), // 2011\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues1 = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        //     Custom Colors\n        $dataSeriesValues1Element = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4);\n        $dataSeriesValues1Element->setFillColor($colors);\n        $dataSeriesValues1 = [$dataSeriesValues1Element];\n\n        // Build the dataseries\n        $series1 = new DataSeries(\n            DataSeries::TYPE_PIECHART, // plotType\n            null, // plotGrouping (Pie charts don't have any grouping)\n            range(0, count($dataSeriesValues1) - 1), // plotOrder\n            $dataSeriesLabels1, // plotLabel\n            $xAxisTickValues1, // plotCategory\n            $dataSeriesValues1          // plotValues\n        );\n\n        // Set up a layout object for the Pie chart\n        $layout1 = new Layout();\n        $layout1->setShowVal(true);\n        $layout1->setShowPercent(true);\n\n        // Set the series in the plot area\n        $plotArea1 = new PlotArea($layout1, [$series1]);\n        // Set the chart legend\n        $legend1 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n        $title1 = new Title('Test Pie Chart');\n\n        // Create the chart\n        $chart1 = new Chart(\n            'chart1', // name\n            $title1, // title\n            $legend1, // legend\n            $plotArea1, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            null  // no Y-Axis for Pie Chart\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart1->setTopLeftPosition('A7');\n        $chart1->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart1);\n\n        $sheet = clone $worksheet;\n        $sheet->setTitle('test2');\n        $spreadsheet->addsheet($sheet);\n\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        self::assertSame('Test Pie Chart', $chart2->getTitle()?->getCaption());\n        $plotArea2 = $chart2->getPlotArea();\n        self::assertNotNull($plotArea2);\n        $dataSeries2 = $plotArea2->getPlotGroup();\n        self::assertCount(1, $dataSeries2);\n        $plotValues = $dataSeries2[0]->getPlotValues();\n        self::assertCount(1, $plotValues);\n        $fillColors = $plotValues[0]->getFillColor();\n        self::assertSame($colors, $fillColors);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ChartMethodTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ChartMethodTest extends TestCase\n{\n    public function testMethodVsConstructor(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_LINECHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        $title = new Title('Method vs Constructor test');\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n        $xAxis = new Axis();\n        $yAxis = new Axis();\n        $xAxisLabel = new Title('X-Axis label');\n        $yAxisLabel = new Title('Y-Axis label');\n        $chart1 = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            $xAxisLabel, // xAxisLabel\n            $yAxisLabel, // yAxisLabel\n            $xAxis, // xAxis\n            $yAxis // yAxis\n        );\n        $chart2 = new Chart('xyz');\n        $chart2\n            ->setName('chart1')\n            ->setLegend($legend)\n            ->setPlotArea($plotArea)\n            ->setPlotVisibleOnly(true)\n            ->setDisplayBlanksAs(DataSeries::EMPTY_AS_GAP)\n            ->setChartAxisX($xAxis)\n            ->setChartAxisY($yAxis)\n            ->setXAxisLabel($xAxisLabel)\n            ->setYAxisLabel($yAxisLabel)\n            ->setTitle($title);\n        self::assertEquals($chart1, $chart2);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testPositions(): void\n    {\n        $chart = new Chart('chart1');\n        $chart->setTopLeftPosition('B3', 2, 4);\n        self::assertSame('B3', $chart->getTopLeftCell());\n        self::assertEquals(['X' => 2, 'Y' => 4], $chart->getTopLeftOffset());\n        self::assertEquals(2, $chart->getTopLeftXOffset());\n        self::assertEquals(4, $chart->getTopLeftYOffset());\n        $chart->setTopLeftCell('B5');\n        self::assertSame('B5', $chart->getTopLeftCell());\n        self::assertEquals(2, $chart->getTopLeftXOffset());\n        self::assertEquals(4, $chart->getTopLeftYOffset());\n        $chart->setTopLeftOffset(6, 8);\n        self::assertSame('B5', $chart->getTopLeftCell());\n        self::assertEquals(6, $chart->getTopLeftXOffset());\n        self::assertEquals(8, $chart->getTopLeftYOffset());\n\n        $chart->setbottomRightPosition('H9', 3, 5);\n        self::assertSame('H9', $chart->getBottomRightCell());\n        self::assertEquals(['X' => 3, 'Y' => 5], $chart->getBottomRightOffset());\n        self::assertEquals(3, $chart->getBottomRightXOffset());\n        self::assertEquals(5, $chart->getBottomRightYOffset());\n        $chart->setbottomRightCell('H11');\n        self::assertSame('H11', $chart->getBottomRightCell());\n        self::assertEquals(3, $chart->getBottomRightXOffset());\n        self::assertEquals(5, $chart->getBottomRightYOffset());\n        $chart->setbottomRightOffset(7, 9);\n        self::assertSame('H11', $chart->getBottomRightCell());\n        self::assertEquals(7, $chart->getBottomRightXOffset());\n        self::assertEquals(9, $chart->getBottomRightYOffset());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Charts32CatAxValAxTest extends TestCase\n{\n    // These tests can only be performed by examining xml.\n    // They are based on sample 33_Chart_Create_Scatter2.\n\n    private string $outputFileName = '';\n\n    private const FORMAT_CODE_DATE_ISO8601_SLASH = 'yyyy/mm/dd'; // not automatically treated as numeric\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFileName !== '') {\n            unlink($this->outputFileName);\n            $this->outputFileName = '';\n        }\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCatAxValAx')]\n    public function test1CatAx1ValAx(?bool $numeric): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        // changed data to simulate a trend chart - Xaxis are dates; Yaxis are 3 meausurements from each date\n        $worksheet->fromArray(\n            [\n                ['', 'metric1', 'metric2', 'metric3'],\n                ['=DATEVALUE(\"2021-01-01\")', 12.1, 15.1, 21.1],\n                ['=DATEVALUE(\"2021-01-04\")', 56.2, 73.2, 86.2],\n                ['=DATEVALUE(\"2021-01-07\")', 52.2, 61.2, 69.2],\n                ['=DATEVALUE(\"2021-01-10\")', 30.2, 32.2, 0.2],\n            ]\n        );\n        $worksheet->getStyle('A2:A5')->getNumberFormat()->setFormatCode(self::FORMAT_CODE_DATE_ISO8601_SLASH);\n        $worksheet->getColumnDimension('A')->setAutoSize(true);\n        $worksheet->setSelectedCells('A1');\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // was 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // was 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // was 2012\n        ];\n        // Set the X-Axis Labels\n        // changed from STRING to NUMBER\n        // added 2 additional x-axis values associated with each of the 3 metrics\n        // added FORMATE_CODE_NUMBER\n        $xAxisTickValues = [\n            //new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        // added FORMAT_CODE_NUMBER\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', Properties::FORMAT_CODE_NUMBER, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', Properties::FORMAT_CODE_NUMBER, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', Properties::FORMAT_CODE_NUMBER, 4),\n        ];\n        // Added so that Xaxis shows dates instead of Excel-equivalent-year1900-numbers\n        $xAxis = new Axis();\n        //$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE );\n        if (is_bool($numeric)) {\n            $xAxis->setAxisNumberProperties(self::FORMAT_CODE_DATE_ISO8601_SLASH, $numeric);\n        } else {\n            $xAxis->setAxisNumberProperties(self::FORMAT_CODE_DATE_ISO8601_SLASH);\n        }\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_SCATTERCHART, // plotType\n            null, // plotGrouping (Scatter charts don't have any grouping)\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues, // plotValues\n            null, // plotDirection\n            false, // smooth line\n            //DataSeries::STYLE_LINEMARKER  // plotStyle\n            DataSeries::STYLE_MARKER  // plotStyle\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test Scatter Trend Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel,  // yAxisLabel\n            // added xAxis for correct date display\n            $xAxis, // xAxis\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('P20');\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $this->outputFileName = File::temporaryFilename();\n        $writer->save($this->outputFileName);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFileName;\n        $file .= '#xl/charts/chart1.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected tags\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } elseif ($numeric === true) {\n            self::assertSame(0, substr_count($data, '<c:catAx'));\n            self::assertSame(2, substr_count($data, '<c:valAx'));\n        } else {\n            self::assertSame(1, substr_count($data, '<c:catAx'));\n            self::assertSame(1, substr_count($data, '<c:valAx'));\n        }\n    }\n\n    public static function providerCatAxValAx(): array\n    {\n        return [\n            [true],\n            [false],\n            [null],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Charts32ColoredAxisLabelTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\Run;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Charts32ColoredAxisLabelTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testStock5(): void\n    {\n        $file = self::DIRECTORY . '32readwriteStockChart5.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Charts', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n\n        $xAxisLabel = $chart->getXAxisLabel();\n        self::assertNotNull($xAxisLabel);\n        $captionArray = $xAxisLabel->getCaption();\n        self::assertIsArray($captionArray);\n        self::assertCount(1, $captionArray);\n        $caption = $captionArray[0];\n        self::assertInstanceOf(RichText::class, $caption);\n        self::assertSame('X-Axis Title in Green', $caption->getPlainText());\n        $elements = $caption->getRichTextElements();\n        self::assertCount(1, $elements);\n        $run = $elements[0];\n        self::assertInstanceOf(Run::class, $run);\n        $font = $run->getFont();\n        self::assertInstanceOf(Font::class, $font);\n        $chartColor = $font->getChartColor();\n        self::assertNotNull($chartColor);\n        self::assertSame('00B050', $chartColor->getValue());\n        self::assertSame('srgbClr', $chartColor->getType());\n\n        $yAxisLabel = $chart->getYAxisLabel();\n        self::assertNotNull($yAxisLabel);\n        $captionArray = $yAxisLabel->getCaption();\n        self::assertIsArray($captionArray);\n        self::assertCount(1, $captionArray);\n        $caption = $captionArray[0];\n        self::assertInstanceOf(RichText::class, $caption);\n        self::assertSame('Y-Axis Title in Red', $caption->getPlainText());\n        $elements = $caption->getRichTextElements();\n        self::assertCount(1, $elements);\n        $run = $elements[0];\n        self::assertInstanceOf(Run::class, $run);\n        $font = $run->getFont();\n        self::assertInstanceOf(Font::class, $font);\n        $chartColor = $font->getChartColor();\n        self::assertNotNull($chartColor);\n        self::assertSame('FF0000', $chartColor->getValue());\n        self::assertSame('srgbClr', $chartColor->getType());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Charts32DsvGlowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Charts32DsvGlowTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testLine4(): void\n    {\n        $file = self::DIRECTORY . '32readwriteLineChart4.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $dataSeriesArray = $plotArea->getPlotGroup();\n        self::assertCount(1, $dataSeriesArray);\n        $dataSeries = $dataSeriesArray[0];\n        $dataSeriesValuesArray = $dataSeries->getPlotValues();\n        self::assertCount(3, $dataSeriesValuesArray);\n        $dataSeriesValues = $dataSeriesValuesArray[1];\n        self::assertEquals(5, $dataSeriesValues->getGlowSize());\n        self::assertSame('schemeClr', $dataSeriesValues->getGlowProperty(['color', 'type']));\n        self::assertSame('accent2', $dataSeriesValues->getGlowProperty(['color', 'value']));\n        self::assertSame(60, $dataSeriesValues->getGlowProperty(['color', 'alpha']));\n\n        $yAxis = $chart->getChartAxisY();\n        $majorGridlines = $yAxis->getMajorGridlines();\n        self::assertNotNull($majorGridlines);\n        self::assertSame('triangle', $majorGridlines->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertSame('triangle', $majorGridlines->getLineStyleProperty(['arrow', 'end', 'type']));\n        $minorGridlines = $yAxis->getMinorGridlines();\n        self::assertNotNull($minorGridlines);\n        self::assertSame('sysDot', $minorGridlines->getLineStyleProperty('dash'));\n        self::assertSame('FFC000', $minorGridlines->getLineColor()->getValue());\n\n        $xAxis = $chart->getChartAxisX();\n        $majorGridlines = $xAxis->getMajorGridlines();\n        $minorGridlines = $xAxis->getMinorGridlines();\n        self::assertNotNull($majorGridlines);\n        self::assertSame('7030A0', $majorGridlines->getLineColor()->getValue());\n        self::assertNotNull($minorGridlines);\n        self::assertFalse($minorGridlines->getLineColor()->isUsable());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Charts32DsvLabelsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Charts32DsvLabelsTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testBar4(): void\n    {\n        $file = self::DIRECTORY . '32readwriteBarChart4.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $dataSeriesArray = $plotArea->getPlotGroup();\n        self::assertCount(1, $dataSeriesArray);\n        $dataSeries = $dataSeriesArray[0];\n        $dataSeriesValuesArray = $dataSeries->getPlotValues();\n        self::assertCount(1, $dataSeriesValuesArray);\n        $dataSeriesValues = $dataSeriesValuesArray[0];\n        $layout = $dataSeriesValues->getLabelLayout();\n        self::assertNotNull($layout);\n        self::assertTrue($layout->getShowVal());\n        $fillColor = $layout->getLabelFillColor();\n        self::assertNotNull($fillColor);\n        self::assertSame('schemeClr', $fillColor->getType());\n        self::assertSame('accent1', $fillColor->getValue());\n        $borderColor = $layout->getLabelBorderColor();\n        self::assertNotNull($borderColor);\n        self::assertSame('srgbClr', $borderColor->getType());\n        self::assertSame('FFC000', $borderColor->getValue());\n        $fontColor = $layout->getLabelFontColor();\n        self::assertNotNull($fontColor);\n        self::assertSame('srgbClr', $fontColor->getType());\n        self::assertSame('FFFF00', $fontColor->getValue());\n        self::assertEquals(\n            [15, 73, 61, 32],\n            $dataSeriesValues->getDataValues()\n        );\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Charts32ScatterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\Run;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Charts32ScatterTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testScatter1(): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChart1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Charts', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $title = $chart->getTitle();\n        self::assertNotNull($title);\n        $captionArray = $title->getCaption();\n        self::assertIsArray($captionArray);\n        self::assertCount(1, $captionArray);\n        $caption = $captionArray[0];\n        self::assertInstanceOf(RichText::class, $caption);\n        self::assertSame('Scatter - No Join and Markers', $caption->getPlainText());\n        $elements = $caption->getRichTextElements();\n        self::assertCount(1, $elements);\n        $run = $elements[0];\n        self::assertInstanceOf(Run::class, $run);\n        $font = $run->getFont();\n        self::assertInstanceOf(Font::class, $font);\n        self::assertSame('Calibri', $font->getLatin());\n        self::assertEquals(12, $font->getSize());\n        self::assertTrue($font->getBold());\n        self::assertFalse($font->getItalic());\n        self::assertFalse($font->getSuperscript());\n        self::assertFalse($font->getSubscript());\n        self::assertFalse($font->getStrikethrough());\n        self::assertSame('none', $font->getUnderline());\n        $chartColor = $font->getChartColor();\n        self::assertNotNull($chartColor);\n        self::assertSame('000000', $chartColor->getValue());\n        self::assertSame('srgbClr', $chartColor->getType());\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $plotSeries = $plotArea->getPlotGroup();\n        self::assertCount(1, $plotSeries);\n        $dataSeries = $plotSeries[0];\n        $plotValues = $dataSeries->getPlotValues();\n        self::assertCount(3, $plotValues);\n        $values = $plotValues[0];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n        $values = $plotValues[1];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n        $values = $plotValues[2];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(7, $values->getPointSize());\n        // Had been testing for Fill Color, but we actually\n        //  meant to test for marker color, which is now distinct.\n        self::assertSame('FFFF00', $values->getMarkerFillColor()->getValue());\n        self::assertSame('srgbClr', $values->getMarkerFillColor()->getType());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testScatter6(): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChart6.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Charts', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $title = $chart->getTitle();\n        self::assertNotNull($title);\n        $captionArray = $title->getCaption();\n        self::assertIsArray($captionArray);\n        self::assertCount(1, $captionArray);\n        $caption = $captionArray[0];\n        self::assertInstanceOf(RichText::class, $caption);\n        self::assertSame('Scatter - Rich Text Title No Join and Markers', $caption->getPlainText());\n        $elements = $caption->getRichTextElements();\n        self::assertCount(3, $elements);\n\n        $run = $elements[0];\n        self::assertInstanceOf(Run::class, $run);\n        $font = $run->getFont();\n        self::assertInstanceOf(Font::class, $font);\n        self::assertSame('Calibri', $font->getLatin());\n        self::assertEquals(12, $font->getSize());\n        self::assertTrue($font->getBold());\n        self::assertFalse($font->getItalic());\n        self::assertFalse($font->getSuperscript());\n        self::assertFalse($font->getSubscript());\n        self::assertFalse($font->getStrikethrough());\n        self::assertSame('none', $font->getUnderline());\n        $chartColor = $font->getChartColor();\n        self::assertNotNull($chartColor);\n        self::assertSame('000000', $chartColor->getValue());\n        self::assertSame('srgbClr', $chartColor->getType());\n\n        $run = $elements[1];\n        self::assertInstanceOf(Run::class, $run);\n        $font = $run->getFont();\n        self::assertInstanceOf(Font::class, $font);\n        self::assertSame('Courier New', $font->getLatin());\n        self::assertEquals(10, $font->getSize());\n        self::assertFalse($font->getBold());\n        self::assertFalse($font->getItalic());\n        self::assertFalse($font->getSuperscript());\n        self::assertFalse($font->getSubscript());\n        self::assertFalse($font->getStrikethrough());\n        self::assertSame('single', $font->getUnderline());\n        $chartColor = $font->getChartColor();\n        self::assertNotNull($chartColor);\n        self::assertSame('00B0F0', $chartColor->getValue());\n        self::assertSame('srgbClr', $chartColor->getType());\n\n        $run = $elements[2];\n        self::assertInstanceOf(Run::class, $run);\n        $font = $run->getFont();\n        self::assertInstanceOf(Font::class, $font);\n        self::assertSame('Calibri', $font->getLatin());\n        self::assertEquals(12, $font->getSize());\n        self::assertTrue($font->getBold());\n        self::assertFalse($font->getItalic());\n        self::assertFalse($font->getSuperscript());\n        self::assertFalse($font->getSubscript());\n        self::assertFalse($font->getStrikethrough());\n        self::assertSame('none', $font->getUnderline());\n        $chartColor = $font->getChartColor();\n        self::assertNotNull($chartColor);\n        self::assertSame('000000', $chartColor->getValue());\n        self::assertSame('srgbClr', $chartColor->getType());\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $plotSeries = $plotArea->getPlotGroup();\n        self::assertCount(1, $plotSeries);\n        $dataSeries = $plotSeries[0];\n        $plotValues = $dataSeries->getPlotValues();\n        self::assertCount(3, $plotValues);\n        $values = $plotValues[0];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n        $values = $plotValues[1];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n        $values = $plotValues[2];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(7, $values->getPointSize());\n        // Had been testing for Fill Color, but we actually\n        //  meant to test for marker color, which is now distinct.\n        self::assertSame('FFFF00', $values->getMarkerFillColor()->getValue());\n        self::assertSame('srgbClr', $values->getMarkerFillColor()->getType());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testScatter3(): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChart3.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Charts', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $title = $chart->getTitle();\n        self::assertNotNull($title);\n        $captionArray = $title->getCaption();\n        self::assertIsArray($captionArray);\n        self::assertCount(1, $captionArray);\n        $caption = $captionArray[0];\n        self::assertInstanceOf(RichText::class, $caption);\n        self::assertSame('Scatter - Join Straight Lines and Markers', $caption->getPlainText());\n        $elements = $caption->getRichTextElements();\n        self::assertCount(1, $elements);\n        $run = $elements[0];\n        self::assertInstanceOf(Run::class, $run);\n        $font = $run->getFont();\n        self::assertInstanceOf(Font::class, $font);\n        self::assertSame('Calibri', $font->getLatin());\n        self::assertEquals(12, $font->getSize());\n        self::assertTrue($font->getBold());\n        self::assertFalse($font->getItalic());\n        self::assertFalse($font->getSuperscript());\n        self::assertFalse($font->getSubscript());\n        self::assertFalse($font->getStrikethrough());\n        self::assertSame('none', $font->getUnderline());\n        $chartColor = $font->getChartColor();\n        self::assertNotNull($chartColor);\n        self::assertSame('000000', $chartColor->getValue());\n        self::assertSame('srgbClr', $chartColor->getType());\n        self::assertSame(50, $chartColor->getAlpha());\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $plotSeries = $plotArea->getPlotGroup();\n        self::assertCount(1, $plotSeries);\n        $dataSeries = $plotSeries[0];\n        $plotValues = $dataSeries->getPlotValues();\n        self::assertCount(3, $plotValues);\n        $values = $plotValues[0];\n        self::assertTrue($values->getScatterLines());\n        // the default value of 1 point is no longer written out\n        //   when not explicitly specified.\n        self::assertNull($values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n        $values = $plotValues[1];\n        self::assertTrue($values->getScatterLines());\n        self::assertNull($values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n        $values = $plotValues[2];\n        self::assertTrue($values->getScatterLines());\n        self::assertNull($values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testScatter7(): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChart7.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Charts', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $title = $chart->getTitle();\n        self::assertNotNull($title);\n        $captionArray = $title->getCaption();\n        self::assertIsArray($captionArray);\n        self::assertCount(1, $captionArray);\n        $caption = $captionArray[0];\n        self::assertInstanceOf(RichText::class, $caption);\n        self::assertSame('Latin/EA/CS Title ABCאבגDEFァ', $caption->getPlainText());\n        $elements = $caption->getRichTextElements();\n        self::assertGreaterThan(0, count($elements));\n        foreach ($elements as $run) {\n            self::assertInstanceOf(Run::class, $run);\n            $font = $run->getFont();\n            self::assertInstanceOf(Font::class, $font);\n            self::assertSame('Times New Roman', $font->getLatin());\n            self::assertSame('Malgun Gothic', $font->getEastAsian());\n            self::assertSame('Courier New', $font->getComplexScript());\n            self::assertEquals(12, $font->getSize());\n            self::assertTrue($font->getBold());\n            self::assertFalse($font->getItalic());\n            self::assertFalse($font->getSuperscript());\n            self::assertFalse($font->getSubscript());\n            self::assertFalse($font->getStrikethrough());\n            self::assertSame('none', $font->getUnderline());\n            $chartColor = $font->getChartColor();\n            self::assertNotNull($chartColor);\n            self::assertSame('000000', $chartColor->getValue());\n            self::assertSame('srgbClr', $chartColor->getType());\n        }\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $plotSeries = $plotArea->getPlotGroup();\n        self::assertCount(1, $plotSeries);\n        $dataSeries = $plotSeries[0];\n        $plotValues = $dataSeries->getPlotValues();\n        self::assertCount(3, $plotValues);\n        $values = $plotValues[0];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n        $values = $plotValues[1];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(3, $values->getPointSize());\n        self::assertSame('', $values->getFillColor());\n        $values = $plotValues[2];\n        self::assertFalse($values->getScatterLines());\n        self::assertSame(28575 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n        self::assertSame(7, $values->getPointSize());\n        // Had been testing for Fill Color, but we actually\n        //  meant to test for marker color, which is now distinct.\n        self::assertSame('FFFF00', $values->getMarkerFillColor()->getValue());\n        self::assertSame('srgbClr', $values->getMarkerFillColor()->getType());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testScatter8(): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChart8.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Worksheet', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n\n        $xAxis = $chart->getChartAxisX();\n        self::assertEquals(45, $xAxis->getAxisOptionsProperty('textRotation'));\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $plotSeries = $plotArea->getPlotGroup();\n        self::assertCount(1, $plotSeries);\n        $dataSeries = $plotSeries[0];\n        $plotValues = $dataSeries->getPlotValues();\n        self::assertCount(3, $plotValues);\n        $values = $plotValues[0];\n        self::assertSame(31750 / Properties::POINTS_WIDTH_MULTIPLIER, $values->getLineWidth());\n\n        self::assertSame('sq', $values->getLineStyleProperty('cap'));\n        self::assertSame('tri', $values->getLineStyleProperty('compound'));\n        self::assertSame('sysDash', $values->getLineStyleProperty('dash'));\n        self::assertSame('miter', $values->getLineStyleProperty('join'));\n        self::assertSame('arrow', $values->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertSame('med', $values->getLineStyleProperty(['arrow', 'head', 'w']));\n        self::assertSame('sm', $values->getLineStyleProperty(['arrow', 'head', 'len']));\n        self::assertSame('triangle', $values->getLineStyleProperty(['arrow', 'end', 'type']));\n        self::assertSame('med', $values->getLineStyleProperty(['arrow', 'end', 'w']));\n        self::assertSame('lg', $values->getLineStyleProperty(['arrow', 'end', 'len']));\n        self::assertSame('accent1', $values->getLineColorProperty('value'));\n        self::assertSame('schemeClr', $values->getLineColorProperty('type'));\n        self::assertSame(40, $values->getLineColorProperty('alpha'));\n        self::assertSame('', $values->getFillColor());\n\n        self::assertSame(7, $values->getPointSize());\n        self::assertSame('diamond', $values->getPointMarker());\n        self::assertSame('0070C0', $values->getMarkerFillColor()->getValue());\n        self::assertSame('srgbClr', $values->getMarkerFillColor()->getType());\n        self::assertSame('002060', $values->getMarkerBorderColor()->getValue());\n        self::assertSame('srgbClr', $values->getMarkerBorderColor()->getType());\n\n        $values = $plotValues[1];\n        self::assertSame(7, $values->getPointSize());\n        self::assertSame('square', $values->getPointMarker());\n        self::assertSame('accent6', $values->getMarkerFillColor()->getValue());\n        self::assertSame('schemeClr', $values->getMarkerFillColor()->getType());\n        self::assertSame(3, $values->getMarkerFillColor()->getAlpha());\n        self::assertSame('0FF000', $values->getMarkerBorderColor()->getValue());\n        self::assertSame('srgbClr', $values->getMarkerBorderColor()->getType());\n        self::assertNull($values->getMarkerBorderColor()->getAlpha());\n\n        $values = $plotValues[2];\n        self::assertSame(7, $values->getPointSize());\n        self::assertSame('triangle', $values->getPointMarker());\n        self::assertSame('FFFF00', $values->getMarkerFillColor()->getValue());\n        self::assertSame('srgbClr', $values->getMarkerFillColor()->getType());\n        self::assertNull($values->getMarkerFillColor()->getAlpha());\n        self::assertSame('accent4', $values->getMarkerBorderColor()->getValue());\n        self::assertSame('schemeClr', $values->getMarkerBorderColor()->getType());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testScatter9(): void\n    {\n        // gradient testing\n        $file = self::DIRECTORY . '32readwriteScatterChart9.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Worksheet', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertFalse($chart->getNoFill());\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        self::assertFalse($plotArea->getNoFill());\n        self::assertEquals(315.0, $plotArea->getGradientFillAngle());\n        $stops = $plotArea->getGradientFillStops();\n        self::assertCount(3, $stops);\n        self::assertEquals(0.43808, $stops[0][0]);\n        self::assertEquals(0, $stops[1][0]);\n        self::assertEquals(0.91, $stops[2][0]);\n        $color = $stops[0][1];\n        self::assertSame('srgbClr', $color->getType());\n        self::assertSame('CDDBEC', $color->getValue());\n        self::assertNull($color->getAlpha());\n        self::assertSame(20, $color->getBrightness());\n        $color = $stops[1][1];\n        self::assertSame('srgbClr', $color->getType());\n        self::assertSame('FFC000', $color->getValue());\n        self::assertNull($color->getAlpha());\n        self::assertNull($color->getBrightness());\n        $color = $stops[2][1];\n        self::assertSame('srgbClr', $color->getType());\n        self::assertSame('00B050', $color->getValue());\n        self::assertNull($color->getAlpha());\n        self::assertSame(4, $color->getBrightness());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testScatter10(): void\n    {\n        // nofill for Chart and PlotArea, hidden Axis\n        $file = self::DIRECTORY . '32readwriteScatterChart10.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Worksheet', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertTrue($chart->getNoFill());\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        self::assertTrue($plotArea->getNoFill());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Charts32XmlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Charts32XmlTest extends TestCase\n{\n    // These tests can only be performed by examining xml.\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerScatterCharts')]\n    public function testBezierCount(int $expectedCount, string $inputFile): void\n    {\n        $file = self::DIRECTORY . $inputFile;\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertSame(1, substr_count($data, '<c:scatterStyle val='));\n        self::assertSame($expectedCount ? 1 : 0, substr_count($data, '<c:scatterStyle val=\"smoothMarker\"/>'));\n        self::assertSame($expectedCount, substr_count($data, '<c:smooth val=\"1\"/>'));\n    }\n\n    public static function providerScatterCharts(): array\n    {\n        return [\n            'no line' => [0, '32readwriteScatterChart1.xlsx'],\n            'smooth line (Bezier)' => [3, '32readwriteScatterChart2.xlsx'],\n            'straight line' => [0, '32readwriteScatterChart3.xlsx'],\n        ];\n    }\n\n    public function testAreaPercentageNoCat(): void\n    {\n        $file = self::DIRECTORY . '32readwriteAreaPercentageChart1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n        $spreadsheet->disconnectWorksheets();\n\n        // confirm that file contains expected tags\n        self::assertSame(0, substr_count($data, '<c:cat>'));\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCatAxValAx')]\n    public function testCatAxValAx(?bool $numeric): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChart1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $xAxis = $chart->getChartAxisX();\n        $yAxis = $chart->getChartAxisY();\n        self::assertSame(Properties::FORMAT_CODE_GENERAL, $xAxis->getAxisNumberFormat());\n        if (is_bool($numeric)) {\n            $xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_GENERAL, true);\n        }\n        self::assertSame('valAx', $yAxis->getAxisType());\n        self::assertSame('valAx', $xAxis->getAxisType());\n        self::assertSame(Properties::FORMAT_CODE_GENERAL, $yAxis->getAxisNumberFormat());\n        $xAxis->setAxisType('');\n        $yAxis->setAxisType('');\n        if (is_bool($numeric)) {\n            $xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_GENERAL, $numeric);\n            $yAxis->setAxisNumberProperties(Properties::FORMAT_CODE_GENERAL, $numeric);\n        }\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n        $spreadsheet->disconnectWorksheets();\n\n        if ($numeric === true) {\n            self::assertSame(0, substr_count($data, '<c:catAx>'));\n            self::assertSame(2, substr_count($data, '<c:valAx>'));\n        } else {\n            self::assertSame(1, substr_count($data, '<c:catAx>'));\n            self::assertSame(1, substr_count($data, '<c:valAx>'));\n        }\n    }\n\n    public static function providerCatAxValAx(): array\n    {\n        return [\n            [true],\n            [false],\n            [null],\n        ];\n    }\n\n    public function testCatAxValAxFromRead(): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChart1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $xAxis = $chart->getChartAxisX();\n        $yAxis = $chart->getChartAxisY();\n        self::assertSame(Properties::FORMAT_CODE_GENERAL, $xAxis->getAxisNumberFormat());\n        self::assertSame('valAx', $yAxis->getAxisType());\n        self::assertSame('valAx', $xAxis->getAxisType());\n        self::assertSame(Properties::FORMAT_CODE_GENERAL, $yAxis->getAxisNumberFormat());\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertSame(0, substr_count($data, '<c:catAx>'));\n        self::assertSame(2, substr_count($data, '<c:valAx>'));\n    }\n\n    public function testAreaPrstClr(): void\n    {\n        $file = self::DIRECTORY . '32readwriteAreaChart4.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertSame(\n            1,\n            substr_count(\n                $data,\n                '</c:tx><c:spPr><a:solidFill><a:prstClr val=\"red\"/>'\n            )\n        );\n    }\n\n    public function testDateAx(): void\n    {\n        $file = self::DIRECTORY . '32readwriteLineDateAxisChart1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(2, $charts);\n        $chart = $charts[1];\n        self::assertNotNull($chart);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertSame(\n            1,\n            substr_count(\n                $data,\n                '<c:baseTimeUnit val=\"days\"/><c:majorTimeUnit val=\"months\"/><c:minorTimeUnit val=\"months\"/>'\n            )\n        );\n        self::assertSame(\n            1,\n            substr_count(\n                $data,\n                '<c:dateAx>'\n            )\n        );\n        self::assertSame(\n            1,\n            substr_count(\n                $data,\n                '<c:valAx>'\n            )\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ChartsByNameTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ChartsByNameTest extends TestCase\n{\n    public function testChartByName(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Only Sheet');\n        $sheet->fromArray(\n            [\n                ['Some Title'],\n                [],\n                [null, null, 'Data'],\n                [null, 'L1', 1.3],\n                [null, 'L2', 1.3],\n                [null, 'L3', 2.3],\n                [null, 'L4', 1.6],\n                [null, 'L5', 1.5],\n                [null, 'L6', 1.4],\n                [null, 'L7', 2.2],\n                [null, 'L8', 1.8],\n                [null, 'L9', 1.1],\n                [null, 'L10', 1.8],\n                [null, 'L11', 1.6],\n                [null, 'L12', 2.7],\n                [null, 'L13', 2.2],\n                [null, 'L14', 1.3],\n            ]\n        );\n\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, '\\'Only Sheet\\'!$B$4', null, 1), // 2010\n        ];\n        // Set the X-Axis Labels\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, '\\'Only Sheet\\'!$B$4:$B$17'),\n        ];\n        // Set the Data values for each data series we want to plot\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, '\\'Only Sheet\\'!$C$4:$C$17'),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_BARCHART, // plotType\n            DataSeries::GROUPING_STANDARD, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues, // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n\n        // Create the chart\n        $chart = new Chart(\n            name: 'namedchart1',\n            plotArea: $plotArea,\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('G7');\n        $chart->setBottomRightPosition('N21');\n        // Add the chart to the worksheet\n        $sheet->addChart($chart);\n        $sheet->setSelectedCells('D1');\n        self::assertSame($chart, $sheet->getChartByName('namedchart1'));\n        self::assertSame($chart, $sheet->getChartByNameOrThrow('namedchart1'));\n        self::assertFalse($sheet->getChartByName('namedchart2'));\n\n        try {\n            $sheet->getChartByNameOrThrow('namedchart2');\n            $exceptionRaised = false;\n        } catch (SpreadsheetException $e) {\n            self::assertSame('Sheet does not have a chart named namedchart2.', $e->getMessage());\n            $exceptionRaised = true;\n        }\n\n        self::assertTrue($exceptionRaised);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ChartsDynamicTitleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ChartsDynamicTitleTest extends AbstractFunctional\n{\n    protected function tearDown(): void\n    {\n        Settings::unsetChartRenderer();\n    }\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testDynamicTitle(): void\n    {\n        // based on samples/templates/issue.3797.2007.xlsx\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Only Sheet');\n        $sheet->fromArray(\n            [\n                ['Some Title'],\n                [],\n                [null, null, 'Data'],\n                [null, 'L1', 1.3],\n                [null, 'L2', 1.3],\n                [null, 'L3', 2.3],\n                [null, 'L4', 1.6],\n                [null, 'L5', 1.5],\n                [null, 'L6', 1.4],\n                [null, 'L7', 2.2],\n                [null, 'L8', 1.8],\n                [null, 'L9', 1.1],\n                [null, 'L10', 1.8],\n                [null, 'L11', 1.6],\n                [null, 'L12', 2.7],\n                [null, 'L13', 2.2],\n                [null, 'L14', 1.3],\n            ]\n        );\n\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, '\\'Only Sheet\\'!$B$4', null, 1), // 2010\n        ];\n        // Set the X-Axis Labels\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, '\\'Only Sheet\\'!$B$4:$B$17'),\n        ];\n        // Set the Data values for each data series we want to plot\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, '\\'Only Sheet\\'!$C$4:$C$17'),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_BARCHART, // plotType\n            DataSeries::GROUPING_STANDARD, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues, // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        $title = new Title();\n        $title->setCellReference('\\'Only Sheet\\'!$A$1');\n        $font = new Font();\n        $font->setCap(Font::CAP_ALL);\n        $title->setFont($font);\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            null, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            null,  // yAxisLabel\n            null, // xAxis\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('G7');\n        $chart->setBottomRightPosition('N21');\n        // Add the chart to the worksheet\n        $sheet->addChart($chart);\n        $sheet->setSelectedCells('D1');\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $rsheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $original = $chart2->getTitle()?->getCalculatedTitle($reloadedSpreadsheet);\n        self::assertSame('Some Title', $original);\n        $rsheet->getCell('A1')->setValue('Changed Title');\n        self::assertNotNull($chart2->getTitle());\n        self::assertSame('Changed Title', $chart2->getTitle()->getCalculatedTitle($reloadedSpreadsheet));\n        self::assertSame(Font::CAP_ALL, $chart2->getTitle()->getFont()?->getCap());\n\n        $writer = new Html($reloadedSpreadsheet);\n        Settings::setChartRenderer(\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\MtJpGraphRenderer::class);\n        $writer->setIncludeCharts(true);\n        $content = $writer->generateHtmlAll();\n        self::assertStringContainsString('alt=\"Changed Title\"', $content);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ChartsOpenpyxlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ChartsOpenpyxlTest extends TestCase\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function testBubble2(): void\n    {\n        $file = self::DIRECTORY . '32readwriteBubbleChart2.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n\n        self::assertSame('Sheet', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertEmpty($chart->getTitle());\n        self::assertTrue($chart->getOneCellAnchor());\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $plotSeries = $plotArea->getPlotGroup();\n        self::assertCount(1, $plotSeries);\n        $dataSeries = $plotSeries[0];\n        $labels = $dataSeries->getPlotLabels();\n        self::assertCount(2, $labels);\n        self::assertSame(['2013'], $labels[0]->getDataValues());\n        self::assertSame(['2014'], $labels[1]->getDataValues());\n\n        $plotCategories = $dataSeries->getPlotCategories();\n        self::assertCount(2, $plotCategories);\n        $categories = $plotCategories[0];\n        self::assertSame('Number', $categories->getDataType());\n        self::assertSame('\\'Sheet\\'!$A$2:$A$5', $categories->getDataSource());\n        self::assertFalse($categories->getBubble3D());\n        $categories = $plotCategories[1];\n        self::assertCount(2, $plotCategories);\n        self::assertSame('Number', $categories->getDataType());\n        self::assertSame('\\'Sheet\\'!$A$7:$A$10', $categories->getDataSource());\n        self::assertFalse($categories->getBubble3D());\n\n        $plotValues = $dataSeries->getPlotValues();\n        self::assertCount(2, $plotValues);\n        $values = $plotValues[0];\n        self::assertSame('Number', $values->getDataType());\n        self::assertSame('\\'Sheet\\'!$B$2:$B$5', $values->getDataSource());\n        self::assertFalse($values->getBubble3D());\n        $values = $plotValues[1];\n        self::assertCount(2, $plotValues);\n        self::assertSame('Number', $values->getDataType());\n        self::assertSame('\\'Sheet\\'!$B$7:$B$10', $values->getDataSource());\n        self::assertFalse($values->getBubble3D());\n\n        $plotValues = $dataSeries->getPlotBubbleSizes();\n        self::assertCount(2, $plotValues);\n        $values = $plotValues[0];\n        self::assertSame('Number', $values->getDataType());\n        self::assertSame('\\'Sheet\\'!$C$2:$C$5', $values->getDataSource());\n        self::assertFalse($values->getBubble3D());\n        $values = $plotValues[1];\n        self::assertCount(2, $plotValues);\n        self::assertSame('Number', $values->getDataType());\n        self::assertSame('\\'Sheet\\'!$C$7:$C$10', $values->getDataSource());\n        self::assertFalse($values->getBubble3D());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testXml(): void\n    {\n        $infile = self::DIRECTORY . '32readwriteBubbleChart2.xlsx';\n        $file = 'zip://';\n        $file .= $infile;\n        $file .= '#xl/charts/chart1.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected tags\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertSame(0, substr_count($data, 'c:'), 'unusual choice of prefix');\n            self::assertSame(0, substr_count($data, 'bubbleScale'));\n            self::assertSame(1, substr_count($data, '<tx><v>2013</v></tx>'), 'v tag for 2013');\n            self::assertSame(1, substr_count($data, '<tx><v>2014</v></tx>'), 'v tag for 2014');\n            self::assertSame(0, substr_count($data, 'numCache'), 'no cached values');\n        }\n        $file = 'zip://';\n        $file .= $infile;\n        $file .= '#xl/drawings/_rels/drawing1.xml.rels';\n        $data = file_get_contents($file);\n        // confirm that file contains expected tags\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertSame(1, substr_count($data, 'Target=\"/xl/charts/chart1.xml\"'), 'Unusual absolute address in drawing rels file');\n        }\n        $file = 'zip://';\n        $file .= $infile;\n        $file .= '#xl/worksheets/_rels/sheet1.xml.rels';\n        $data = file_get_contents($file);\n        // confirm that file contains expected tags\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertSame(1, substr_count($data, 'Target=\"/xl/drawings/drawing1.xml\"'), 'Unusual absolute address in worksheet rels file');\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ChartsTitleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ChartsTitleTest extends TestCase\n{\n    private static function getTitleText(?Title $title): string\n    {\n        return ($title === null) ? '' : $title->getCaptionText();\n    }\n\n    public function testChartTitles(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/excelChartsTest.xlsx';\n        $reader = IOFactory::createReader('Xlsx')->setIncludeCharts(true);\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $charts = $worksheet->getChartCollection();\n        self::assertEquals(5, $worksheet->getChartCount());\n        self::assertCount(5, $charts);\n\n        // No title or axis labels\n        $chart1 = $charts[0];\n        self::assertNotNull($chart1);\n        $title = self::getTitleText($chart1->getTitle());\n        self::assertEmpty($title);\n        self::assertEmpty(self::getTitleText($chart1->getXAxisLabel()));\n        self::assertEmpty(self::getTitleText($chart1->getYAxisLabel()));\n\n        // Title, no axis labels\n        $chart2 = $charts[1];\n        self::assertNotNull($chart2);\n\n        self::assertEquals('Chart with Title and no Axis Labels', self::getTitleText($chart2->getTitle()));\n        self::assertEmpty(self::getTitleText($chart2->getXAxisLabel()));\n        self::assertEmpty(self::getTitleText($chart2->getYAxisLabel()));\n\n        // No title, only horizontal axis label\n        $chart3 = $charts[2];\n        self::assertNotNull($chart3);\n        self::assertEmpty(self::getTitleText($chart3->getTitle()));\n        self::assertEquals('Horizontal Axis Title Only', self::getTitleText($chart3->getXAxisLabel()));\n        self::assertEmpty(self::getTitleText($chart3->getYAxisLabel()));\n\n        // No title, only vertical axis label\n        $chart4 = $charts[3];\n        self::assertNotNull($chart4);\n        self::assertEmpty(self::getTitleText($chart4->getTitle()));\n        self::assertEquals('Vertical Axis Title Only', self::getTitleText($chart4->getYAxisLabel()));\n        self::assertEmpty(self::getTitleText($chart4->getXAxisLabel()));\n\n        // Title and both axis labels\n        $chart5 = $charts[4];\n        self::assertNotNull($chart5);\n        self::assertEquals('Complete Annotations', self::getTitleText($chart5->getTitle()));\n        self::assertEquals('Horizontal Axis Title', self::getTitleText($chart5->getXAxisLabel()));\n        self::assertEquals('Vertical Axis Title', self::getTitleText($chart5->getYAxisLabel()));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ColorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColorTest extends TestCase\n{\n    public function testDefaultTypes(): void\n    {\n        $color = new ChartColor('800000');\n        self::assertSame('srgbClr', $color->getType());\n        self::assertSame('800000', $color->getValue());\n        $color->setColorProperties('*accent1');\n        self::assertSame('schemeClr', $color->getType());\n        self::assertSame('accent1', $color->getValue());\n        $color->setColorProperties('/red');\n        self::assertSame('prstClr', $color->getType());\n        self::assertSame('red', $color->getValue());\n    }\n\n    public function testDataSeriesValues(): void\n    {\n        $dsv = new DataSeriesValues();\n        $dsv->setFillColor([new ChartColor(), new ChartColor()]);\n        self::assertSame(['', ''], $dsv->getFillColor());\n        $dsv->setFillColor('cccccc');\n        self::assertSame('cccccc', $dsv->getFillColor());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/DataSeriesColorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis as ChartAxis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\AxisText;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DataSeriesColorTest extends AbstractFunctional\n{\n    // based on 33_Char_create_scatter2\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testDataSeriesValues(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        // changed data to simulate a trend chart - Xaxis are dates; Yaxis are 3 measurements from each date\n        $worksheet->fromArray(\n            [\n                ['', 'metric1', 'metric2', 'metric3'],\n                ['=DATEVALUE(\"2021-01-01\")', 12.1, 15.1, 21.1],\n                ['=DATEVALUE(\"2021-01-04\")', 56.2, 73.2, 86.2],\n                ['=DATEVALUE(\"2021-01-07\")', 52.2, 61.2, 69.2],\n                ['=DATEVALUE(\"2021-01-10\")', 30.2, 32.2, 0.2],\n            ]\n        );\n        $worksheet->getStyle('A2:A5')->getNumberFormat()->setFormatCode(Properties::FORMAT_CODE_DATE_ISO8601);\n        $worksheet->getColumnDimension('A')->setAutoSize(true);\n        $worksheet->setSelectedCells('A1');\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // was 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // was 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // was 2012\n        ];\n        // Set the X-Axis Labels\n        // changed from STRING to NUMBER\n        // added 2 additional x-axis values associated with each of the 3 metrics\n        // added FORMATE_CODE_NUMBER\n        $xAxisTickValues = [\n            //new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$5', Properties::FORMAT_CODE_DATE, 4),\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        // added FORMAT_CODE_NUMBER\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', Properties::FORMAT_CODE_NUMBER, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', Properties::FORMAT_CODE_NUMBER, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', Properties::FORMAT_CODE_NUMBER, 4),\n        ];\n\n        // series 1\n        // marker details\n        $dataSeriesValues[0]\n            ->setPointMarker('diamond')\n            ->setPointSize(5)\n            ->getMarkerFillColor()\n            ->setColorProperties('0070C0', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $dataSeriesValues[0]\n            ->getMarkerBorderColor()\n            ->setColorProperties('002060', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n\n        // line details - smooth line, connected\n        $dataSeriesValues[0]\n            ->setScatterLines(true)\n            ->setSmoothLine(true)\n            ->setLineColorProperties('accent1', 40, ChartColor::EXCEL_COLOR_TYPE_SCHEME); // value, alpha, type\n        $dataSeriesValues[0]->setLineStyleProperties(\n            2.5, // width in points\n            Properties::LINE_STYLE_COMPOUND_TRIPLE, // compound\n            Properties::LINE_STYLE_DASH_SQUARE_DOT, // dash\n            Properties::LINE_STYLE_CAP_SQUARE, // cap\n            Properties::LINE_STYLE_JOIN_MITER, // join\n            Properties::LINE_STYLE_ARROW_TYPE_OPEN, // head type\n            Properties::LINE_STYLE_ARROW_SIZE_4, // head size preset index\n            Properties::LINE_STYLE_ARROW_TYPE_ARROW, // end type\n            Properties::LINE_STYLE_ARROW_SIZE_6 // end size preset index\n        );\n\n        // series 2 - straight line - no special effects, connected, straight line\n        $dataSeriesValues[1] // square fill\n            ->setPointMarker('square')\n            ->setPointSize(6)\n            ->getMarkerBorderColor()\n            ->setColorProperties('accent6', 3, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n        $dataSeriesValues[1] // square border\n            ->getMarkerFillColor()\n            ->setColorProperties('0FFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $dataSeriesValues[1]\n            ->setScatterLines(true)\n            ->setSmoothLine(false)\n            ->setLineColorProperties('FF0000', 80, ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $dataSeriesValues[1]->setLineWidth(2.0);\n\n        // series 3 - markers, no line\n        $dataSeriesValues[2] // triangle fill\n            //->setPointMarker('triangle') // let Excel choose shape\n            ->setPointSize(7)\n            ->getMarkerFillColor()\n            ->setColorProperties('FFFF00', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $dataSeriesValues[2] // triangle border\n            ->getMarkerBorderColor()\n            ->setColorProperties('accent4', null, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n        $dataSeriesValues[2]->setScatterLines(false); // points not connected\n\n        // Added so that Xaxis shows dates instead of Excel-equivalent-year1900-numbers\n        $xAxis = new ChartAxis();\n        //$xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE );\n        $xAxis->setAxisNumberProperties(Properties::FORMAT_CODE_DATE_ISO8601, true);\n        //$xAxis->setAxisOption('textRotation', '45');\n        $xAxisText = new AxisText();\n        $xAxisText->setRotation(45)->getFillColorObject()->setValue('00FF00')->setType(ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $xAxis->setAxisText($xAxisText);\n\n        $yAxis = new ChartAxis();\n        $yAxis->setLineStyleProperties(\n            2.5, // width in points\n            Properties::LINE_STYLE_COMPOUND_SIMPLE,\n            Properties::LINE_STYLE_DASH_DASH_DOT,\n            Properties::LINE_STYLE_CAP_FLAT,\n            Properties::LINE_STYLE_JOIN_BEVEL\n        );\n        $yAxis->setLineColorProperties('ffc000', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $yAxisText = new AxisText();\n        $yAxisText->setGlowProperties(20.0, 'accent1', 20, ChartColor::EXCEL_COLOR_TYPE_SCHEME);\n        $yAxis->setAxisText($yAxisText);\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_SCATTERCHART, // plotType\n            null, // plotGrouping (Scatter charts don't have any grouping)\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues, // plotValues\n            null, // plotDirection\n            false, // smooth line\n            DataSeries::STYLE_SMOOTHMARKER  // plotStyle\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test Scatter Trend Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel, // yAxisLabel\n            // added xAxis for correct date display\n            $xAxis, // xAxis\n            $yAxis, // yAxis\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('P20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $xAxisText = $chart2->getChartAxisX()->getAxisText();\n        $yAxisText = $chart2->getChartAxisY()->getAxisText();\n        if ($xAxisText === null || $yAxisText === null) {\n            self::fail('Unexpected null x-axis or y-axis');\n        } else {\n            self::assertSame(45, $xAxisText->getRotation());\n            self::assertSame('00FF00', $xAxisText->getFillColorObject()->getValue());\n            self::assertSame(ChartColor::EXCEL_COLOR_TYPE_RGB, $xAxisText->getFillColorObject()->getType());\n            self::assertSame(20.0, $yAxisText->getGlowProperty('size'));\n            self::assertSame(['value' => 'accent1', 'type' => 'schemeClr', 'alpha' => 20], $yAxisText->getGlowProperty('color'));\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/DataSeriesValues2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DataSeriesValues2Test extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testDataSeriesValues(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            null, // plotType\n            null, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n        self::assertEmpty($series->getPlotType());\n        self::assertEmpty($series->getPlotGrouping());\n        self::assertFalse($series->getSmoothLine());\n        $series->setPlotType(DataSeries::TYPE_AREACHART);\n        $series->setPlotGrouping(DataSeries::GROUPING_PERCENT_STACKED);\n        $series->setSmoothLine(true);\n        self::assertSame(DataSeries::TYPE_AREACHART, $series->getPlotType());\n        self::assertSame(DataSeries::GROUPING_PERCENT_STACKED, $series->getPlotGrouping());\n        self::assertTrue($series->getSmoothLine());\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        self::assertSame(1, $plotArea->getPlotGroupCount());\n        $plotValues = $plotArea->getPlotGroup()[0]->getPlotValues();\n        self::assertCount(3, $plotValues);\n        self::assertSame([], $plotValues[1]->getDataValues());\n        self::assertNull($plotValues[1]->getDataValue());\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $plotArea2 = $chart2->getPlotArea();\n        self::assertNotNull($plotArea2);\n        $plotGroup2 = $plotArea2->getPlotGroup()[0];\n        $plotValues2 = $plotGroup2->getPlotValues();\n        self::assertCount(3, $plotValues2);\n        self::assertSame([15.0, 73.0, 61.0, 32.0], $plotValues2[1]->getDataValues());\n        self::assertSame([15.0, 73.0, 61.0, 32.0], $plotValues2[1]->getDataValue());\n        $labels2 = $plotGroup2->getPlotLabels();\n        self::assertCount(3, $labels2);\n        self::assertEquals(2010, $labels2[0]->getDataValue());\n        $dataSeries = $plotArea2->getPlotGroup()[0];\n        self::assertFalse($dataSeries->getPlotValuesByIndex(99));\n        self::assertNotFalse($dataSeries->getPlotValuesByIndex(0));\n        self::assertEquals([12, 56, 52, 30], $dataSeries->getPlotValuesByIndex(0)->getDataValues());\n        self::assertSame(DataSeries::TYPE_AREACHART, $dataSeries->getPlotType());\n        self::assertSame(DataSeries::GROUPING_PERCENT_STACKED, $dataSeries->getPlotGrouping());\n        // SmoothLine written out for DataSeries only for LineChart.\n        // Original test was wrong - used $chart rather than $chart2\n        //   to retrieve data which was read in.\n        //self::assertTrue($dataSeries->getSmoothLine());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testSomeProperties(): void\n    {\n        $dataSeriesValues = new DataSeriesValues();\n        self::assertNull($dataSeriesValues->getDataSource());\n        self::assertEmpty($dataSeriesValues->getPointMarker());\n        self::assertSame(3, $dataSeriesValues->getPointSize());\n        $dataSeriesValues->setDataSource('Worksheet!$B$1')\n            ->setPointMarker('square')\n            ->setPointSize(6);\n        self::assertSame('Worksheet!$B$1', $dataSeriesValues->getDataSource());\n        self::assertSame('square', $dataSeriesValues->getPointMarker());\n        self::assertSame(6, $dataSeriesValues->getPointSize());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataSeriesValuesTest extends TestCase\n{\n    public function testSetDataType(): void\n    {\n        $dataTypeValues = [\n            'Number',\n            'String',\n        ];\n\n        $testInstance = new DataSeriesValues();\n\n        foreach ($dataTypeValues as $dataTypeValue) {\n            $result = $testInstance->setDataType($dataTypeValue);\n            self::assertSame($dataTypeValue, $result->getDataType());\n        }\n    }\n\n    public function testSetInvalidDataTypeThrowsException(): void\n    {\n        $testInstance = new DataSeriesValues();\n\n        try {\n            $testInstance->setDataType('BOOLEAN');\n        } catch (Exception $e) {\n            self::assertEquals($e->getMessage(), 'Invalid datatype for chart data series values');\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n\n    public function testGetDataType(): void\n    {\n        $dataTypeValue = 'String';\n\n        $testInstance = new DataSeriesValues();\n        $testInstance->setDataType($dataTypeValue);\n\n        $result = $testInstance->getDataType();\n        self::assertEquals($dataTypeValue, $result);\n    }\n\n    public function testGetLineWidth(): void\n    {\n        $testInstance = new DataSeriesValues();\n        // default has changed to null from 1 point (12700)\n        self::assertNull($testInstance->getLineWidth(), 'should have default');\n\n        $testInstance->setLineWidth(40000 / Properties::POINTS_WIDTH_MULTIPLIER);\n        self::assertEquals(40000 / Properties::POINTS_WIDTH_MULTIPLIER, $testInstance->getLineWidth());\n\n        $testInstance->setLineWidth(1);\n        self::assertEquals(12700 / Properties::POINTS_WIDTH_MULTIPLIER, $testInstance->getLineWidth(), 'should enforce minimum width');\n    }\n\n    public function testFillColorCorrectInput(): void\n    {\n        $testInstance = new DataSeriesValues();\n\n        self::assertEquals($testInstance, $testInstance->setFillColor('00abb8'));\n        self::assertEquals($testInstance, $testInstance->setFillColor(['00abb8', 'b8292f']));\n    }\n\n    public function testFillColorInvalidInput(): void\n    {\n        $testInstance = new DataSeriesValues();\n        $this->expectException(\\Exception::class);\n        $this->expectExceptionMessage('Invalid hex color for chart series');\n\n        $testInstance->setFillColor('WRONG COLOR');\n    }\n\n    public function testFillColorInvalidInputInArray(): void\n    {\n        $testInstance = new DataSeriesValues();\n        $this->expectException(\\Exception::class);\n        $this->expectExceptionMessage('Invalid hex color for chart series (color: \"WRONG COLOR\")');\n\n        $testInstance->setFillColor(['b8292f', 'WRONG COLOR']);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/DisplayBlanksAsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DisplayBlanksAsTest extends TestCase\n{\n    public function testDisplayBlanksAs(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_AREACHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        $plotArea = new PlotArea(null, [$series]);\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        $chart1 = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n        self::assertSame(DataSeries::EMPTY_AS_GAP, $chart1->getDisplayBlanksAs());\n        $chart1->setDisplayBlanksAs(DataSeries::EMPTY_AS_ZERO);\n        self::assertSame(DataSeries::EMPTY_AS_ZERO, $chart1->getDisplayBlanksAs());\n        $chart1->setDisplayBlanksAs('0');\n        self::assertSame(DataSeries::EMPTY_AS_GAP, $chart1->getDisplayBlanksAs(), 'invalid setting converted to default');\n\n        $chart2 = new Chart(\n            'chart2', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_SPAN, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n        self::assertSame(DataSeries::EMPTY_AS_SPAN, $chart2->getDisplayBlanksAs());\n\n        $chart3 = new Chart(\n            'chart3', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            '0', // displayBlanksAs, PHPExcel default\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n        self::assertSame(DataSeries::EMPTY_AS_GAP, $chart3->getDisplayBlanksAs(), 'invalid setting converted to default');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/GridlinesLineStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\GridLines;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass GridlinesLineStyleTest extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testLineStyles(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_LINECHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n        $majorGridlines = new GridLines();\n        $width = 2;\n        $compound = Properties::LINE_STYLE_COMPOUND_THICKTHIN;\n        $dash = Properties::LINE_STYLE_DASH_ROUND_DOT;\n        $cap = Properties::LINE_STYLE_CAP_ROUND;\n        $join = Properties::LINE_STYLE_JOIN_MITER;\n        $headArrowType = Properties::LINE_STYLE_ARROW_TYPE_DIAMOND;\n        $headArrowSize = Properties::LINE_STYLE_ARROW_SIZE_2;\n        $endArrowType = Properties::LINE_STYLE_ARROW_TYPE_OVAL;\n        $endArrowSize = Properties::LINE_STYLE_ARROW_SIZE_3;\n        $majorGridlines->setLineStyleProperties(\n            $width,\n            $compound,\n            $dash,\n            $cap,\n            $join,\n            $headArrowType,\n            $headArrowSize,\n            $endArrowType,\n            $endArrowSize\n        );\n        $minorGridlines = new GridLines();\n        $minorGridlines->setLineColorProperties('00FF00', 30, 'srgbClr');\n\n        self::assertEquals($width, $majorGridlines->getLineStyleProperty('width'));\n        self::assertEquals($compound, $majorGridlines->getLineStyleProperty('compound'));\n        self::assertEquals($dash, $majorGridlines->getLineStyleProperty('dash'));\n        self::assertEquals($cap, $majorGridlines->getLineStyleProperty('cap'));\n        self::assertEquals($join, $majorGridlines->getLineStyleProperty('join'));\n        self::assertEquals($headArrowType, $majorGridlines->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals($headArrowSize, $majorGridlines->getLineStyleProperty(['arrow', 'head', 'size']));\n        self::assertEquals($endArrowType, $majorGridlines->getLineStyleProperty(['arrow', 'end', 'type']));\n        self::assertEquals($endArrowSize, $majorGridlines->getLineStyleProperty(['arrow', 'end', 'size']));\n        self::assertEquals('sm', $majorGridlines->getLineStyleProperty(['arrow', 'head', 'w']));\n        self::assertEquals('med', $majorGridlines->getLineStyleProperty(['arrow', 'head', 'len']));\n        self::assertEquals('sm', $majorGridlines->getLineStyleProperty(['arrow', 'end', 'w']));\n        self::assertEquals('lg', $majorGridlines->getLineStyleProperty(['arrow', 'end', 'len']));\n        self::assertEquals('sm', $majorGridlines->getLineStyleArrowWidth('end'));\n        self::assertEquals('lg', $majorGridlines->getLineStyleArrowLength('end'));\n        self::assertEquals('lg', $majorGridlines->getLineStyleArrowParameters('end', 'len'));\n\n        self::assertSame('00FF00', $minorGridlines->getLineColorProperty('value'));\n        self::assertSame(30, $minorGridlines->getLineColorProperty('alpha'));\n        self::assertSame('srgbClr', $minorGridlines->getLineColorProperty('type'));\n\n        // Create the chart\n        $yAxis = new Axis();\n        $yAxis->setMajorGridlines($majorGridlines);\n        $yAxis->setMinorGridlines($minorGridlines);\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel,  // yAxisLabel\n            null, // xAxis\n            $yAxis // yAxis\n        );\n        $yAxis2 = $chart->getChartAxisY();\n        $majorGridlines2 = $yAxis2->getMajorGridlines();\n        self::assertNotNull($majorGridlines2);\n        self::assertEquals($width, $majorGridlines2->getLineStyleProperty('width'));\n        self::assertEquals($compound, $majorGridlines2->getLineStyleProperty('compound'));\n        self::assertEquals($dash, $majorGridlines2->getLineStyleProperty('dash'));\n        self::assertEquals($cap, $majorGridlines2->getLineStyleProperty('cap'));\n        self::assertEquals($join, $majorGridlines2->getLineStyleProperty('join'));\n        self::assertEquals($headArrowType, $majorGridlines2->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals($headArrowSize, $majorGridlines2->getLineStyleProperty(['arrow', 'head', 'size']));\n        self::assertEquals($endArrowType, $majorGridlines2->getLineStyleProperty(['arrow', 'end', 'type']));\n        self::assertEquals($endArrowSize, $majorGridlines2->getLineStyleProperty(['arrow', 'end', 'size']));\n        self::assertEquals('sm', $majorGridlines2->getLineStyleProperty(['arrow', 'head', 'w']));\n        self::assertEquals('med', $majorGridlines2->getLineStyleProperty(['arrow', 'head', 'len']));\n        self::assertEquals('sm', $majorGridlines2->getLineStyleProperty(['arrow', 'end', 'w']));\n        self::assertEquals('lg', $majorGridlines2->getLineStyleProperty(['arrow', 'end', 'len']));\n\n        $minorGridlines2 = $yAxis2->getMinorGridlines();\n        self::assertNotNull($minorGridlines2);\n        self::assertSame('00FF00', $minorGridlines2->getLineColorProperty('value'));\n        self::assertSame(30, $minorGridlines2->getLineColorProperty('alpha'));\n        self::assertSame('srgbClr', $minorGridlines2->getLineColorProperty('type'));\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        self::assertSame('A7', $chart2->getTopLeftCell());\n        self::assertSame('H20', $chart2->getBottomRightCell());\n        self::assertSame($sheet, $chart2->getWorksheet());\n        $yAxis3 = $chart2->getChartAxisY();\n        $majorGridlines3 = $yAxis3->getMajorGridlines();\n        self::assertNotNull($majorGridlines3);\n        self::assertEquals($width, $majorGridlines3->getLineStyleProperty('width'));\n        self::assertEquals($compound, $majorGridlines3->getLineStyleProperty('compound'));\n        self::assertEquals($dash, $majorGridlines3->getLineStyleProperty('dash'));\n        self::assertEquals($cap, $majorGridlines3->getLineStyleProperty('cap'));\n        self::assertEquals($join, $majorGridlines3->getLineStyleProperty('join'));\n        self::assertEquals($headArrowType, $majorGridlines3->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals($endArrowType, $majorGridlines3->getLineStyleProperty(['arrow', 'end', 'type']));\n        self::assertEquals('sm', $majorGridlines3->getLineStyleProperty(['arrow', 'head', 'w']));\n        self::assertEquals('med', $majorGridlines3->getLineStyleProperty(['arrow', 'head', 'len']));\n        self::assertEquals('sm', $majorGridlines3->getLineStyleProperty(['arrow', 'end', 'w']));\n        self::assertEquals('lg', $majorGridlines3->getLineStyleProperty(['arrow', 'end', 'len']));\n\n        $minorGridlines3 = $yAxis3->getMinorGridlines();\n        self::assertNotNull($minorGridlines3);\n        self::assertSame('00FF00', $minorGridlines3->getLineColorProperty('value'));\n        self::assertSame(30, $minorGridlines3->getLineColorProperty('alpha'));\n        self::assertSame('srgbClr', $minorGridlines3->getLineColorProperty('type'));\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testLineStylesDeprecated(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_LINECHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n        $majorGridlines = new GridLines();\n        $width = 2;\n        $compound = Properties::LINE_STYLE_COMPOUND_THICKTHIN;\n        $dash = Properties::LINE_STYLE_DASH_ROUND_DOT;\n        $cap = Properties::LINE_STYLE_CAP_ROUND;\n        $join = Properties::LINE_STYLE_JOIN_MITER;\n        $headArrowType = Properties::LINE_STYLE_ARROW_TYPE_DIAMOND;\n        $headArrowSize = Properties::LINE_STYLE_ARROW_SIZE_2;\n        $endArrowType = Properties::LINE_STYLE_ARROW_TYPE_OVAL;\n        $endArrowSize = Properties::LINE_STYLE_ARROW_SIZE_3;\n        $majorGridlines->setLineStyleProperties(\n            $width,\n            $compound,\n            $dash,\n            $cap,\n            $join,\n            $headArrowType,\n            $headArrowSize,\n            $endArrowType,\n            $endArrowSize\n        );\n        $minorGridlines = new GridLines();\n        $minorGridlines->setLineColorProperties('00FF00', 30, 'srgbClr');\n\n        self::assertEquals($width, $majorGridlines->getLineStyleProperty('width'));\n        self::assertEquals($compound, $majorGridlines->getLineStyleProperty('compound'));\n        self::assertEquals($dash, $majorGridlines->getLineStyleProperty('dash'));\n        self::assertEquals($cap, $majorGridlines->getLineStyleProperty('cap'));\n        self::assertEquals($join, $majorGridlines->getLineStyleProperty('join'));\n        self::assertEquals($headArrowType, $majorGridlines->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals($headArrowSize, $majorGridlines->getLineStyleProperty(['arrow', 'head', 'size']));\n        self::assertEquals($endArrowType, $majorGridlines->getLineStyleProperty(['arrow', 'end', 'type']));\n        self::assertEquals($endArrowSize, $majorGridlines->getLineStyleProperty(['arrow', 'end', 'size']));\n        self::assertEquals('sm', $majorGridlines->getLineStyleProperty(['arrow', 'head', 'w']));\n        self::assertEquals('med', $majorGridlines->getLineStyleProperty(['arrow', 'head', 'len']));\n        self::assertEquals('sm', $majorGridlines->getLineStyleProperty(['arrow', 'end', 'w']));\n        self::assertEquals('lg', $majorGridlines->getLineStyleProperty(['arrow', 'end', 'len']));\n        self::assertEquals('sm', $majorGridlines->getLineStyleArrowWidth('end'));\n        self::assertEquals('lg', $majorGridlines->getLineStyleArrowLength('end'));\n        self::assertEquals('lg', $majorGridlines->getLineStyleArrowParameters('end', 'len'));\n\n        self::assertSame('00FF00', $minorGridlines->getLineColorProperty('value'));\n        self::assertSame(30, $minorGridlines->getLineColorProperty('alpha'));\n        self::assertSame('srgbClr', $minorGridlines->getLineColorProperty('type'));\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel,  // yAxisLabel\n            null, // xAxis\n            null, // yAxis\n            $majorGridlines,\n            $minorGridlines // minorGridlines\n        );\n        $majorGridlines2 = $chart->getChartAxisY()->getMajorGridlines();\n        self::assertNotNull($majorGridlines2);\n        self::assertEquals($width, $majorGridlines2->getLineStyleProperty('width'));\n        self::assertEquals($compound, $majorGridlines2->getLineStyleProperty('compound'));\n        self::assertEquals($dash, $majorGridlines2->getLineStyleProperty('dash'));\n        self::assertEquals($cap, $majorGridlines2->getLineStyleProperty('cap'));\n        self::assertEquals($join, $majorGridlines2->getLineStyleProperty('join'));\n        self::assertEquals($headArrowType, $majorGridlines2->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals($headArrowSize, $majorGridlines2->getLineStyleProperty(['arrow', 'head', 'size']));\n        self::assertEquals($endArrowType, $majorGridlines2->getLineStyleProperty(['arrow', 'end', 'type']));\n        self::assertEquals($endArrowSize, $majorGridlines2->getLineStyleProperty(['arrow', 'end', 'size']));\n        self::assertEquals('sm', $majorGridlines2->getLineStyleProperty(['arrow', 'head', 'w']));\n        self::assertEquals('med', $majorGridlines2->getLineStyleProperty(['arrow', 'head', 'len']));\n        self::assertEquals('sm', $majorGridlines2->getLineStyleProperty(['arrow', 'end', 'w']));\n        self::assertEquals('lg', $majorGridlines2->getLineStyleProperty(['arrow', 'end', 'len']));\n\n        $minorGridlines2 = $chart->getChartAxisY()->getMinorGridlines();\n        self::assertNotNull($minorGridlines2);\n        self::assertSame('00FF00', $minorGridlines2->getLineColorProperty('value'));\n        self::assertSame(30, $minorGridlines2->getLineColorProperty('alpha'));\n        self::assertSame('srgbClr', $minorGridlines2->getLineColorProperty('type'));\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $majorGridlines3 = $chart2->getChartAxisY()->getMajorGridlines();\n        self::assertNotNull($majorGridlines3);\n        self::assertEquals($width, $majorGridlines3->getLineStyleProperty('width'));\n        self::assertEquals($compound, $majorGridlines3->getLineStyleProperty('compound'));\n        self::assertEquals($dash, $majorGridlines3->getLineStyleProperty('dash'));\n        self::assertEquals($cap, $majorGridlines3->getLineStyleProperty('cap'));\n        self::assertEquals($join, $majorGridlines3->getLineStyleProperty('join'));\n        self::assertEquals($headArrowType, $majorGridlines3->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals($endArrowType, $majorGridlines3->getLineStyleProperty(['arrow', 'end', 'type']));\n        self::assertEquals('sm', $majorGridlines3->getLineStyleProperty(['arrow', 'head', 'w']));\n        self::assertEquals('med', $majorGridlines3->getLineStyleProperty(['arrow', 'head', 'len']));\n        self::assertEquals('sm', $majorGridlines3->getLineStyleProperty(['arrow', 'end', 'w']));\n        self::assertEquals('lg', $majorGridlines3->getLineStyleProperty(['arrow', 'end', 'len']));\n\n        $minorGridlines3 = $chart2->getChartAxisY()->getMinorGridlines();\n        self::assertNotNull($minorGridlines3);\n        self::assertSame('00FF00', $minorGridlines3->getLineColorProperty('value'));\n        self::assertSame(30, $minorGridlines3->getLineColorProperty('alpha'));\n        self::assertSame('srgbClr', $minorGridlines3->getLineColorProperty('type'));\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/GridlinesShadowGlowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\GridLines;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass GridlinesShadowGlowTest extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testGlowY(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_LINECHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n        $yAxis = new Axis();\n        $majorGridlines = new GridLines();\n        $yAxis->setMajorGridlines($majorGridlines);\n        $majorGlowSize = 10.0;\n        $majorGridlines->setGlowProperties($majorGlowSize, 'FFFF00', 30, ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $softEdgeSize = 2.5;\n        $majorGridlines->setSoftEdges($softEdgeSize);\n        $expectedGlowColor = [\n            'type' => 'srgbClr',\n            'value' => 'FFFF00',\n            'alpha' => 30,\n        ];\n        self::assertEquals($majorGlowSize, $majorGridlines->getGlowProperty('size'));\n        self::assertEquals($majorGlowSize, $majorGridlines->getGlowSize());\n        self::assertEquals($expectedGlowColor['value'], $majorGridlines->getGlowColor('value'));\n        self::assertEquals($expectedGlowColor, $majorGridlines->getGlowProperty('color'));\n        self::assertEquals($softEdgeSize, $majorGridlines->getSoftEdgesSize());\n\n        $minorGridlines = new GridLines();\n        $yAxis->setMinorGridlines($minorGridlines);\n        $expectedShadow = [\n            'effect' => 'outerShdw',\n            'algn' => 'tl',\n            'blur' => 4,\n            'direction' => 45,\n            'distance' => 3,\n            'rotWithShape' => 0,\n            'color' => [\n                'type' => ChartColor::EXCEL_COLOR_TYPE_STANDARD,\n                'value' => 'black',\n                'alpha' => 40,\n            ],\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            $minorGridlines->setShadowProperty($key, $value);\n        }\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($value, $minorGridlines->getShadowProperty($key), $key);\n        }\n        $testShadow2 = $minorGridlines->getShadowArray();\n        self::assertNull($testShadow2['presets']);\n        self::assertEquals(['sx' => null, 'sy' => null, 'kx' => null, 'ky' => null], $testShadow2['size']);\n        unset($testShadow2['presets'], $testShadow2['size']);\n        self::assertEquals($expectedShadow, $testShadow2);\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel,  // yAxisLabel\n            null, // xAxis\n            $yAxis // yAxis\n        );\n        $yAxis2 = $chart->getChartAxisY();\n        $majorGridlines2 = $yAxis2->getMajorGridlines();\n        self::assertNotNull($majorGridlines2);\n        self::assertEquals($majorGlowSize, $majorGridlines2->getGlowProperty('size'));\n        self::assertEquals($expectedGlowColor, $majorGridlines2->getGlowProperty('color'));\n        self::assertEquals($softEdgeSize, $majorGridlines2->getSoftEdgesSize());\n        $minorGridlines2 = $yAxis2->getMinorGridlines();\n        self::assertNotNull($minorGridlines2);\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($value, $minorGridlines2->getShadowProperty($key), $key);\n        }\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis3 = $chart2->getChartAxisY();\n        $majorGridlines3 = $yAxis3->getMajorGridlines();\n        self::assertNotNull($majorGridlines3);\n        self::assertEquals($majorGlowSize, $majorGridlines3->getGlowProperty('size'));\n        self::assertEquals($expectedGlowColor, $majorGridlines3->getGlowProperty('color'));\n        self::assertEquals($softEdgeSize, $majorGridlines3->getSoftEdgesSize());\n        $minorGridlines3 = $yAxis3->getMinorGridlines();\n        self::assertNotNull($minorGridlines3);\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($value, $minorGridlines3->getShadowProperty($key), $key);\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue2077Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2077Test extends TestCase\n{\n    public function testPercentLabels(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', '2010', '2011', '2012'],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 60],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        $dataSeriesLabels1 = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2012\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2013\n        ];\n\n        // Set the X-Axis Labels\n        $xAxisTickValues1 = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n\n        // Set the Data values for each data series we want to plot\n        // TODO  I think the third parameter can be set，but I didn't succeed\n        $dataSeriesValues1 = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', NumberFormat::FORMAT_NUMBER_00, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', NumberFormat::FORMAT_PERCENTAGE_00, 4),\n        ];\n\n        // Build the dataseries\n        $series1 = [\n            new DataSeries(\n                DataSeries::TYPE_PIECHART, // plotType\n                null, // plotGrouping (Pie charts don't have any grouping)\n                range(0, count($dataSeriesValues1) - 1), // plotOrder\n                $dataSeriesLabels1, // plotLabel\n                $xAxisTickValues1, // plotCategory\n                $dataSeriesValues1 // plotValues\n            ),\n        ];\n\n        // Set up a layout object for the Pie chart\n        $layout1 = new Layout();\n        $layout1->setShowVal(true);\n        // Set the layout to show percentage with 2 decimal points\n        $layout1->setShowPercent(true);\n        $layout1->setNumFmtCode(NumberFormat::FORMAT_PERCENTAGE_00);\n\n        // Set the series in the plot area\n        $plotArea1 = new PlotArea($layout1, $series1);\n\n        // Set the chart legend\n        $legend1 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n        $title1 = new Title('Test Pie Chart');\n\n        $yAxisLabel = new Title('Value ($k)');\n        // Create the chart\n        $chart1 = new Chart(\n            'chart1', // name\n            $title1, // title\n            $legend1, // legend\n            $plotArea1, // plotArea\n            true, // plotVisibleOnly\n            'gap', // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart1->setTopLeftPosition('A7');\n        $chart1->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart1);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart1);\n        self::assertStringContainsString('<c:dLbls><c:numFmt formatCode=\"0.00%\" sourceLinked=\"0\"/><c:showVal val=\"1\"/><c:showPercent val=\"1\"/></c:dLbls>', $data);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue2506Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue2506Test extends AbstractFunctional\n{\n    private const DIRECTORY = 'tests' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'Reader' . DIRECTORY_SEPARATOR . 'XLSX' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testDataSeriesValues(): void\n    {\n        $reader = new XlsxReader();\n        $this->readCharts($reader);\n        $spreadsheet = $reader->load(self::DIRECTORY . 'issue.2506.xlsx');\n        $worksheet = $spreadsheet->getActiveSheet();\n        $charts = $worksheet->getChartCollection();\n        self::assertCount(4, $charts);\n        $originalChart1 = $charts[0];\n        self::assertNotNull($originalChart1);\n        $originalPlotArea1 = $originalChart1->getPlotArea();\n        self::assertNotNull($originalPlotArea1);\n        $originalPlotSeries1 = $originalPlotArea1->getPlotGroup();\n        self::assertCount(1, $originalPlotSeries1);\n        self::assertSame('0', $originalPlotSeries1[0]->getPlotStyle());\n        $originalChart2 = $charts[1];\n        self::assertNotNull($originalChart2);\n        $originalPlotArea2 = $originalChart2->getPlotArea();\n        self::assertNotNull($originalPlotArea2);\n        $originalPlotSeries2 = $originalPlotArea2->getPlotGroup();\n        self::assertCount(1, $originalPlotSeries2);\n        self::assertSame('5', $originalPlotSeries2[0]->getPlotStyle());\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(4, $charts2);\n        $chart1 = $charts[0];\n        self::assertNotNull($chart1);\n        $plotArea1 = $chart1->getPlotArea();\n        self::assertNotNull($plotArea1);\n        $plotSeries1 = $plotArea1->getPlotGroup();\n        self::assertCount(1, $plotSeries1);\n        self::assertSame('0', $plotSeries1[0]->getPlotStyle());\n        $chart2 = $charts[1];\n        self::assertNotNull($chart2);\n        $plotArea2 = $chart2->getPlotArea();\n        self::assertNotNull($plotArea2);\n        $plotSeries2 = $plotArea2->getPlotGroup();\n        self::assertCount(1, $plotSeries2);\n        self::assertSame('5', $plotSeries2[0]->getPlotStyle());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue2931Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2931Test extends TestCase\n{\n    public function testSurface(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, null, null, 1, ['5-6']),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, null, null, 1, ['6-7']),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, null, null, 1, ['7-8']),\n        ];\n\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, null, null, 9, [1, 2, 3, 4, 5, 6, 7, 8, 9]),\n        ];\n\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, null, null, 9, [6, 6, 6, 6, 6, 6, 5.9, 6, 6]),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, null, null, 9, [6, 6, 6, 6.5, 7, 7, 7, 7, 7]),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, null, null, 9, [6, 6, 6, 7, 8, 8, 8, 8, 7.9]),\n        ];\n\n        $series = new DataSeries(\n            DataSeries::TYPE_SURFACECHART,\n            DataSeries::GROUPING_STANDARD, // grouping should not be written for surface chart\n            range(0, count($dataSeriesValues) - 1),\n            $dataSeriesLabels,\n            $xAxisTickValues,\n            $dataSeriesValues,\n            null, // plotDirection\n            false, // smooth line\n            DataSeries::STYLE_LINEMARKER  // plotStyle\n        );\n\n        $plotArea = new PlotArea(null, [$series]);\n        $legend = new ChartLegend(ChartLegend::POSITION_BOTTOM, null, false);\n\n        $title = new Title('График распредления температур в пределах кр');\n\n        $chart = new Chart(\n            'chart2',\n            $title,\n            $legend,\n            $plotArea,\n            true,\n            DataSeries::EMPTY_AS_GAP,\n        );\n\n        $chart->setTopLeftPosition('$A$1');\n        $chart->setBottomRightPosition('$P$20');\n\n        $sheet->addChart($chart);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n\n        // rotX etc. should be generated for surfaceChart 2D\n        //    even when unspecified.\n        $expectedXml2D = [\n            '<c:view3D><c:rotX val=\"90\"/><c:rotY val=\"0\"/><c:rAngAx val=\"0\"/><c:perspective val=\"0\"/></c:view3D>',\n        ];\n        $expectedXml3D = [\n            '<c:view3D/>',\n        ];\n        $expectedXmlNoX = [\n            'c:grouping',\n        ];\n\n        // confirm that file contains expected tags\n        foreach ($expectedXml2D as $expected) {\n            self::assertSame(1, substr_count($data, $expected), $expected);\n        }\n        foreach ($expectedXmlNoX as $expected) {\n            self::assertSame(0, substr_count($data, $expected), $expected);\n        }\n\n        $series->setPlotType(DataSeries::TYPE_SURFACECHART_3D);\n        $plotArea = new PlotArea(null, [$series]);\n        $chart->setPlotArea($plotArea);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n        // confirm that file contains expected tags\n        foreach ($expectedXml3D as $expected) {\n            self::assertSame(1, substr_count($data, $expected), $expected);\n        }\n        foreach ($expectedXmlNoX as $expected) {\n            self::assertSame(0, substr_count($data, $expected), $expected);\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue2965Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2965Test extends TestCase\n{\n    private const DIRECTORY = 'tests' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'Reader' . DIRECTORY_SEPARATOR . 'XLSX' . DIRECTORY_SEPARATOR;\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::DIRECTORY . 'issue.2965.xlsx';\n        $file .= '#xl/charts/chart1.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c:title><c:tx><c:strRef><c:f>Sheet1!$A$1</c:f><c:strCache><c:ptCount val=\"1\"/><c:pt idx=\"0\"><c:v>NewTitle</c:v></c:pt></c:strCache></c:strRef></c:tx>', $data);\n        }\n    }\n\n    public function testChartTitleFormula(): void\n    {\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load(self::DIRECTORY . 'issue.2965.xlsx');\n        $worksheet = $spreadsheet->getActiveSheet();\n        $charts = $worksheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $originalChart1 = $charts[0];\n        self::assertNotNull($originalChart1);\n        $originalTitle1 = $originalChart1->getTitle();\n        self::assertNotNull($originalTitle1);\n        self::assertSame('NewTitle', $originalTitle1->getCaptionText());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue316Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue316Test extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setPreCalculateFormulas(true)\n            ->setIncludeCharts(true);\n    }\n\n    public function testUnionFormula(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray([\n            ['', 2010, 2011, 2012],\n            ['Q1', 12, 15, 21],\n            ['Q2', 56, 73, 86],\n            ['Q3', 52, 61, 69],\n            ['Q4', 30, 32, 0],\n        ]);\n\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //    2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), //    2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), //    2012\n        ];\n\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), //    Q1 to Q4\n        ];\n\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, '(Worksheet!$B$2,Worksheet!$B$5)', null, 4), // cell union created problem on write\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        //    Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_BARCHART, // plotType\n            DataSeries::GROUPING_CLUSTERED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues        // plotValues\n        );\n\n        $plotArea = new PlotArea(null, [$series]);\n        $legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n        $title = new Title('Test Bar Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        //    Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        $worksheet->addChart($chart);\n\n        $reloadedSpreadsheet = $this->writeAndReload(\n            $spreadsheet,\n            'Xlsx',\n            $this->readCharts(...),\n            $this->writeCharts(...)\n        );\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        self::assertSame(\n            '(Worksheet!$B$2,Worksheet!$B$5)',\n            $chart2->getPlotArea()\n                ?->getPlotGroupByIndex(0)\n                ->getPlotValues()[0]\n                ->getDataSource()\n        );\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue3397Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3397Test extends TestCase\n{\n    public function testPreliminaries(): void\n    {\n        //  Issue 3397, writing srgbClr for label fill in wrong place\n        $spreadsheet = new Spreadsheet();\n        $dataSheet = $spreadsheet->getActiveSheet();\n        $dataSheet->setTitle('Summary_report');\n        $label1 = 'Before 10 a.m.';\n        $label2 = 'Between 10 a.m. and 2 p.m.';\n        $label3 = 'After 2 p.m.';\n        $dataSheet->getCell('D8')->setValue($label1);\n        $dataSheet->getCell('D9')->setValue($label2);\n        $dataSheet->getCell('D10')->setValue($label3);\n\n        $dataSheet->getCell('E7')->setValue(100);\n        $dataSheet->getCell('E8')->setValue(101);\n        $dataSheet->getCell('E9')->setValue(102);\n        $dataSheet->getCell('E10')->setValue(103);\n        $dataSheet->getCell('F7')->setValue(200);\n        $dataSheet->getCell('F8')->setValue(201);\n        $dataSheet->getCell('F9')->setValue(202);\n        $dataSheet->getCell('F10')->setValue(203);\n        $dataSheet->getCell('G7')->setValue(300);\n        $dataSheet->getCell('G8')->setValue(301);\n        $dataSheet->getCell('G9')->setValue(302);\n        $dataSheet->getCell('G10')->setValue(303);\n        $dataSheet->getCell('H7')->setValue(400);\n        $dataSheet->getCell('H8')->setValue(401);\n        $dataSheet->getCell('H9')->setValue(402);\n        $dataSheet->getCell('H10')->setValue(403);\n        $dataSheet->getCell('I7')->setValue(500);\n        $dataSheet->getCell('I8')->setValue(501);\n        $dataSheet->getCell('I9')->setValue(502);\n        $dataSheet->getCell('I10')->setValue(503);\n        $dataSheet->getCell('J7')->setValue(600);\n        $dataSheet->getCell('J8')->setValue(601);\n        $dataSheet->getCell('J9')->setValue(602);\n        $dataSheet->getCell('J10')->setValue(603);\n\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setTitle('Chart');\n\n        $col = 'J';\n        $colNumber = 7;\n\n        $dataSeriesLabels = [\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_STRING, // label is string\n                'Summary_report!$D$8', // data source\n                null, // format code\n                1, // point count\n                null, // label values come from data source\n                null, // marker\n                'ff0000' // rgb fill color\n            ),\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_STRING, // label is string\n                'Summary_report!$D$9', // data source\n                null, // format code\n                1, // point count\n                null, // label values come from data source\n                null, // marker\n                '70ad47' // rgb fill color\n            ),\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_STRING, // label is string\n                'Summary_report!$D$10', // data source\n                null, // format code\n                1, // point count\n                null, // label values come from data source\n                null, // marker\n                'ffff00' // rgb fill color\n            ),\n        ];\n\n        $xAxisTickValues = [\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_STRING,\n                'Summary_report!$E$7:$' . $col . '$7',\n                null,\n                $colNumber\n            ),\n        ];\n        $dataSeriesValues = [\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_NUMBER,\n                'Summary_report!$E$8:$' . $col . '$8',\n                null,\n                $colNumber\n            ),\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_NUMBER,\n                'Summary_report!$E$9:$' . $col . '$9',\n                null,\n                $colNumber\n            ),\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_NUMBER,\n                'Summary_report!$E$10:$' . $col . '$10',\n                null,\n                $colNumber\n            ),\n        ];\n        $series = new DataSeries(\n            DataSeries::TYPE_BARCHART, // plotType\n            DataSeries::GROUPING_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues        // plotValues\n        );\n        $layout1 = new Layout();\n        $layout1->setShowVal(true);\n        $plotArea = new PlotArea($layout1, [$series]);\n\n        $legend = new Legend(Legend::POSITION_BOTTOM, null, false);\n        $title = new Title('Submission Report');\n        $yAxisLabel = new Title('Count');\n        $xAxisLabel = new Title('period');\n        $yaxis = new Axis();\n        $yaxis->setAxisOptionsProperties('low');\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            'gap', // displayBlanksAs\n            $xAxisLabel, // xAxisLabel\n            $yAxisLabel, // yAxisLabel\n            null,\n            $yaxis\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $sheet->addChart($chart);\n\n        $writer = new Xlsx($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $outputFilename = File::temporaryFilename();\n        $writer->save($outputFilename);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $outputFilename;\n        $file .= '#xl/charts/chart1.xml';\n        $data = file_get_contents($file);\n        unlink($outputFilename);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c:tx><c:strRef><c:f>Summary_report!$D$8</c:f><c:strCache><c:ptCount val=\"1\"/><c:pt idx=\"0\"><c:v>Before 10 a.m.</c:v></c:pt></c:strCache></c:strRef></c:tx><c:spPr><a:solidFill><a:srgbClr val=\"ff0000\"/></a:solidFill><a:ln/></c:spPr>', $data);\n            self::assertStringContainsString('<c:tx><c:strRef><c:f>Summary_report!$D$9</c:f><c:strCache><c:ptCount val=\"1\"/><c:pt idx=\"0\"><c:v>Between 10 a.m. and 2 p.m.</c:v></c:pt></c:strCache></c:strRef></c:tx><c:spPr><a:solidFill><a:srgbClr val=\"70ad47\"/></a:solidFill><a:ln/></c:spPr>', $data);\n            self::assertStringContainsString('<c:tx><c:strRef><c:f>Summary_report!$D$10</c:f><c:strCache><c:ptCount val=\"1\"/><c:pt idx=\"0\"><c:v>After 2 p.m.</c:v></c:pt></c:strCache></c:strRef></c:tx><c:spPr><a:solidFill><a:srgbClr val=\"ffff00\"/></a:solidFill><a:ln/></c:spPr>', $data);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue3833Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue3833Test extends AbstractFunctional\n{\n    // based on 33_Char_create_scatter2\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testDisplayUnits1(): void\n    {\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load('tests/data/Reader/XLSX/issue.3833.units.xlsx');\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('charts');\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis = $chart2->getChartAxisY();\n        $dispUnits = $yAxis->getAxisOptionsProperty('dispUnitsBuiltIn');\n        self::assertSame('tenThousands', $dispUnits);\n        $logBase = $yAxis->getAxisOptionsProperty('logBase');\n        self::assertNull($logBase);\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testDisplayUnits2(): void\n    {\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load('tests/data/Reader/XLSX/issue.3833.units.xlsx');\n        $sheet1 = $spreadsheet->getSheetByNameOrThrow('charts');\n        $charts1 = $sheet1->getChartCollection();\n        self::assertCount(1, $charts1);\n        $chart1 = $charts1[0];\n        self::assertNotNull($chart1);\n        $yAxis1 = $chart1->getChartAxisY();\n        $yAxis1->setAxisOption('dispUnitsBuiltIn', 1000);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('charts');\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis = $chart2->getChartAxisY();\n        $dispUnits = $yAxis->getAxisOptionsProperty('dispUnitsBuiltIn');\n        self::assertSame('thousands', $dispUnits);\n        $logBase = $yAxis->getAxisOptionsProperty('logBase');\n        self::assertNull($logBase);\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testDisplayUnits3(): void\n    {\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load('tests/data/Reader/XLSX/issue.3833.units.xlsx');\n        $sheet1 = $spreadsheet->getSheetByNameOrThrow('charts');\n        $charts1 = $sheet1->getChartCollection();\n        self::assertCount(1, $charts1);\n        $chart1 = $charts1[0];\n        self::assertNotNull($chart1);\n        $yAxis1 = $chart1->getChartAxisY();\n        $yAxis1->setDispUnitsTitle(null);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('charts');\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis = $chart2->getChartAxisY();\n        self::assertNull($yAxis->getDispUnitsTitle());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testLogBase(): void\n    {\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load('tests/data/Reader/XLSX/issue.3833.logarithm.xlsx');\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('charts');\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis = $chart2->getChartAxisY();\n        $logBase = $yAxis->getAxisOptionsProperty('logBase');\n        self::assertSame('10', $logBase);\n        $dispUnits = $yAxis->getAxisOptionsProperty('dispUnitsBuiltIn');\n        self::assertNull($dispUnits);\n        $yAxis->setAxisOption('dispUnitsBuiltIn', 1000000000000);\n        $dispUnits = $yAxis->getAxisOptionsProperty('dispUnitsBuiltIn');\n        // same logic as in Writer/Xlsx/Chart for 32-bit safety\n        $dispUnits = ($dispUnits == Axis::TRILLION_INDEX) ? Axis::DISP_UNITS_TRILLIONS : (is_numeric($dispUnits) ? (Axis::DISP_UNITS_BUILTIN_INT[(int) $dispUnits] ?? '') : $dispUnits);\n        self::assertSame('trillions', $dispUnits);\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue4201Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4201Test extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testLabelFont(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        // Sample data for pie chart\n        $data = [\n            ['Category', 'Value'],\n            ['Category A', 40],\n            ['Category B', 30],\n            ['Category C', 20],\n            ['Category D', 10],\n        ];\n        $worksheet->fromArray($data, null, 'A1');\n        $worksheet->getColumnDimension('A')->setAutoSize(true);\n\n        // Create data series for the pie chart\n        $categories = [new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4)];\n        $values = [new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4)];\n\n        // Set layout for data labels\n        $font = new Font();\n        $font->setName('Times New Roman');\n        $font->setSize(8);\n        $layout = new Layout();\n        $layout->setShowVal(true); // Display values\n        $layout->setShowCatName(true); // Display category names\n        $layout->setLabelFont($font);\n\n        $series = new DataSeries(\n            DataSeries::TYPE_PIECHART, // Chart type: Pie chart\n            null,\n            range(0, count($values) - 1),\n            [],\n            $categories,\n            $values\n        );\n\n        $plotArea = new PlotArea($layout, [$series]);\n        $chart = new Chart('Pie Chart', null, null, $plotArea);\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart2 = $charts[0];\n        self::assertNotNull($chart2);\n        $plotArea2 = $chart2->getPlotArea();\n        self::assertNotNull($plotArea2);\n        $layout2 = $plotArea2->getLayout();\n        self::assertNotNull($layout2);\n        $font2 = $layout2->getLabelFont();\n        self::assertNotNull($font2);\n        self::assertSame('Times New Roman', $font2->getLatin());\n        self::assertSame(8.0, $font2->getSize());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue562Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue562Test extends AbstractFunctional\n{\n    // based on 33_Char_create_area\n    // test for chart borders\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNoBorder')]\n    public function testNoBorder(?bool $noBorder, bool $expectedResult): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_AREACHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        $plotArea = new PlotArea(null, [$series]);\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        if ($noBorder !== null) {\n            $chart->setNoBorder($noBorder);\n        }\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        self::assertSame($expectedResult, $chart2->getNoBorder());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerNoBorder(): array\n    {\n        return [\n            [true, true],\n            [false, false],\n            [null, false],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/Issue589Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse DOMDocument;\nuse DOMNode;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as Writer;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass Issue589Test extends TestCase\n{\n    /**\n     * Build a testable chart in a spreadsheet and set fill color for series.\n     *\n     * @param string|string[] $color HEX color or array with HEX colors\n     */\n    private function buildChartSpreadsheet(string|array $color): Spreadsheet\n    {\n        // Problem occurs when setting plot line color\n        // The output chart xml file is missing the a:ln tag\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                [2010],\n                [12],\n                [56],\n            ]\n        );\n\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$1', null, 1),\n        ];\n        $dataSeriesLabels[0]->setFillColor($color);\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$2:$A$3', null, 2),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_LINECHART,\n            DataSeries::GROUPING_STACKED,\n            range(0, count($dataSeriesValues) - 1),\n            $dataSeriesLabels,\n            [],\n            $dataSeriesValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1',\n            null,\n            null,\n            $plotArea\n        );\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        return $spreadsheet;\n    }\n\n    public function testBadDirectory(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Directory does not exist');\n        $spreadsheet = new Spreadsheet();\n        $writer = new Writer($spreadsheet);\n        $writer->setUseDiskCaching(true, __FILE__);\n    }\n\n    public function testLineChartFill(): void\n    {\n        $outputFilename = File::temporaryFilename();\n        $spreadsheet = $this->buildChartSpreadsheet('98B954');\n        $writer = new Writer($spreadsheet);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $writer->save($outputFilename, Writer::SAVE_WITH_CHARTS);\n        self::assertTrue($writer->getIncludeCharts());\n\n        $zip = new ZipArchive();\n        $zip->open($outputFilename);\n        $resultChart1Raw = $zip->getFromName('xl/charts/chart1.xml');\n        $zip->close();\n        unlink($outputFilename);\n\n        $dom = new DOMDocument();\n        if ($resultChart1Raw === false) {\n            self::fail('Unable to open the chart file');\n        } else {\n            $loaded = $dom->loadXML($resultChart1Raw);\n            if (!$loaded) {\n                self::fail('Unable to load the chart xml');\n            } else {\n                $series = $dom->getElementsByTagName('ser');\n                $firstSeries = $series->item(0);\n                if ($firstSeries === null) {\n                    self::fail('The chart XML does not contain a \\'ser\\' tag!');\n                } else {\n                    $spPrList = $firstSeries->getElementsByTagName('spPr');\n\n                    // expect to see only one element with name 'c:spPr'\n                    self::assertCount(1, $spPrList);\n\n                    /** @var DOMNode $node */\n                    $node = $spPrList->item(0); // Get the spPr element\n                    $actualXml = $dom->saveXML($node);\n                    if ($actualXml === false) {\n                        self::fail('Failure saving the spPr element as xml string!');\n                    } else {\n                        self::assertSame('<c:spPr><a:ln><a:solidFill><a:srgbClr val=\"98B954\"/></a:solidFill></a:ln></c:spPr>', $actualXml);\n                    }\n                }\n            }\n        }\n    }\n\n    public function testLineChartFillIgnoresColorArray(): void\n    {\n        $outputFilename = File::temporaryFilename();\n        $spreadsheet = $this->buildChartSpreadsheet(['98B954']);\n        $writer = new Writer($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writer->save($outputFilename);\n\n        $zip = new ZipArchive();\n        $zip->open($outputFilename);\n        $resultChart1Raw = $zip->getFromName('xl/charts/chart1.xml');\n        $zip->close();\n        unlink($outputFilename);\n\n        $dom = new DOMDocument();\n        if ($resultChart1Raw === false) {\n            self::fail('Unable to open the chart file');\n        } else {\n            $loaded = $dom->loadXML($resultChart1Raw);\n            if (!$loaded) {\n                self::fail('Unable to load the chart xml');\n            } else {\n                $series = $dom->getElementsByTagName('ser');\n                $firstSeries = $series->item(0);\n                if ($firstSeries === null) {\n                    self::fail('The chart XML does not contain a \\'ser\\' tag!');\n                } else {\n                    $spPrList = $firstSeries->getElementsByTagName('spPr');\n\n                    // expect to see only one element with name 'c:spPr'\n                    self::assertCount(1, $spPrList);\n\n                    /** @var DOMNode $node */\n                    $node = $spPrList->item(0); // Get the spPr element\n                    $actualXml = $dom->saveXML($node);\n                    if ($actualXml === false) {\n                        self::fail('Failure saving the spPr element as xml string!');\n                    } else {\n                        self::assertSame('<c:spPr><a:ln/></c:spPr>', $actualXml);\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/LayoutEffectsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass LayoutEffectsTest extends AbstractFunctional\n{\n    private const FILENAME = 'samples/templates/32readwriteLineChart6.xlsx';\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testLegend(): void\n    {\n        $reader = new XlsxReader();\n        $this->readCharts($reader);\n        $spreadsheet = $reader->load(self::FILENAME);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $yAxis = $chart2->getChartAxisY();\n        $yAxisText = $yAxis->getAxisText();\n        self::assertNotNull($yAxisText);\n        self::assertSame(['value' => 'accent4', 'type' => 'schemeClr', 'alpha' => 60], $yAxisText->getGlowProperty('color'));\n        $plotArea2 = $chart2->getPlotArea();\n        self::assertNotNull($plotArea2);\n        $plotGroup2 = $plotArea2->getPlotGroup()[0];\n        $plotIndex2 = $plotGroup2->getPlotLabelByIndex(0);\n        if ($plotIndex2 === false) {\n            self::fail('Unexpected false for getPlotLabelByIndex');\n        } else {\n            $layout2 = $plotIndex2->getLabelLayout();\n            self::assertNotNull($layout2);\n            $effects2 = $layout2->getLabelEffects();\n            self::assertNotNull($effects2);\n            $shadows2 = $effects2->getShadowArray();\n            self::assertSame('outerShdw', $shadows2['effect']);\n            self::assertSame(['value' => 'FF0000', 'type' => 'srgbClr', 'alpha' => 70], $shadows2['color']);\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/LayoutTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PHPUnit\\Framework\\TestCase;\n\nclass LayoutTest extends TestCase\n{\n    public function testSetLayoutTarget(): void\n    {\n        $LayoutTargetValue = 'String';\n\n        $testInstance = new Layout();\n\n        $result = $testInstance->setLayoutTarget($LayoutTargetValue);\n        self::assertSame('String', $result->getLayoutTarget());\n    }\n\n    public function testGetLayoutTarget(): void\n    {\n        $LayoutTargetValue = 'String';\n\n        $testInstance = new Layout();\n        $testInstance->setLayoutTarget($LayoutTargetValue);\n\n        $result = $testInstance->getLayoutTarget();\n        self::assertEquals($LayoutTargetValue, $result);\n    }\n\n    public function testConstructorVsMethods(): void\n    {\n        $fillColor = new ChartColor('FF0000', 20, 'srgbClr');\n        $borderColor = new ChartColor('accent1', 20, 'schemeClr');\n        $fontColor = new ChartColor('red', 20, 'prstClr');\n        $array = [\n            'xMode' => 'factor',\n            'yMode' => 'edge',\n            'x' => 1.0,\n            'y' => 2.0,\n            'w' => 3.0,\n            'h' => 4.0,\n            'showVal' => true,\n            'dLblPos' => 't',\n            'numFmtCode' => '0.00%',\n            'numFmtLinked' => true,\n            'labelFillColor' => $fillColor,\n            'labelBorderColor' => $borderColor,\n            'labelFontColor' => $fontColor,\n        ];\n        $layout1 = new Layout($array);\n        $layout2 = new Layout();\n        $layout2\n            ->setXMode('factor')\n            ->setYMode('edge')\n            ->setXposition(1.0)\n            ->setYposition(2.0)\n            ->setWidth(3.0)\n            ->setHeight(4.0)\n            ->setShowVal(true)\n            ->setDLblPos('t')\n            ->setNumFmtCode('0.00%')\n            ->setNumFmtLinked(true)\n            ->setLabelFillColor($fillColor)\n            ->setLabelBorderColor($borderColor)\n            ->setLabelFontColor($fontColor);\n        self::assertEquals($layout1, $layout2);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/LegendColorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\AxisText;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass LegendColorTest extends AbstractFunctional\n{\n    // based on 33_Chart_create_stock\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testLegend(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['Counts', 'Max', 'Min', 'Min Threshold', 'Max Threshold'],\n                [10, 10, 5, 0, 50],\n                [30, 20, 10, 0, 50],\n                [20, 30, 15, 0, 50],\n                [40, 10, 0, 0, 50],\n                [100, 40, 5, 0, 50],\n            ],\n            null,\n            'A1',\n            true\n        );\n        $worksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_NUMBER_00);\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / Open\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), //Min / Close\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), //Min Threshold / Min\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$E$1', null, 1), //Max Threshold / Max\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$6', null, 5), // Counts\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$6', null, 5),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$6', null, 5),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$6', null, 5),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$E$2:$E$6', null, 5),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_STOCKCHART, // plotType\n            null, // plotGrouping - if we set this to not null, then xlsx throws error\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues       // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n        $legend->getBorderLines()->setLineColorProperties('ffc000', null, ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $legend->getFillColor()->setColorProperties('cccccc');\n        $legendText = new AxisText();\n        $legendText->getFillColorObject()->setValue('008080')->setType(ChartColor::EXCEL_COLOR_TYPE_RGB);\n        $legendText->setShadowProperties(1);\n        $legend->setLegendText($legendText);\n\n        $title = new Title('Test Stock Chart');\n        $xAxisLabel = new Title('Counts');\n        $yAxisLabel = new Title('Values');\n\n        // Create the chart\n        $chart = new Chart(\n            'stock-chart', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            $xAxisLabel, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n        $worksheet->setSelectedCells('G2');\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $legend2 = $chart2->getLegend();\n        if ($legend2 === null) {\n            self::fail('Unexpected null legend');\n        } else {\n            self::assertSame('ffc000', $legend2->getBorderLines()->getLineColorProperty('value'));\n            self::assertSame('cccccc', $legend2->getFillColor()->getValue());\n            $legendText2 = $legend2->getLegendText();\n            if ($legendText2 === null) {\n                self::fail('Unexpected null legendText');\n            } else {\n                self::assertSame('008080', $legendText2->getFillColorObject()->getValue());\n                self::assertSame('outerShdw', $legendText2->getShadowProperty('effect'));\n                self::assertSame(4.0, (float) $legendText2->getShadowProperty('blur'));\n                self::assertSame(45.0, (float) $legendText2->getShadowProperty('direction'));\n            }\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/LegendTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass LegendTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testLegendWithOverlay(): void\n    {\n        $file = self::DIRECTORY . 'chart-with-and-without-overlays.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheetName = 'With Overlay';\n        $sheet = $spreadsheet->getSheetByName($sheetName);\n        self::assertNotNull($sheet);\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByName($sheetName);\n        self::assertNotNull($sheet);\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $legend = $chart->getLegend();\n        self::assertNotNull($legend);\n        self::assertTrue($legend->getOverlay());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testLegendWithoutOverlay(): void\n    {\n        $file = self::DIRECTORY . 'chart-with-and-without-overlays.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheetName = 'Without Overlay';\n        $sheet = $spreadsheet->getSheetByName($sheetName);\n        self::assertNotNull($sheet);\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByName($sheetName);\n        self::assertNotNull($sheet);\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $legend = $chart->getLegend();\n        self::assertNotNull($legend);\n        self::assertFalse($legend->getOverlay());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetPosition(): void\n    {\n        $positionValues = [\n            Legend::POSITION_RIGHT,\n            Legend::POSITION_LEFT,\n            Legend::POSITION_TOP,\n            Legend::POSITION_BOTTOM,\n            Legend::POSITION_TOPRIGHT,\n        ];\n\n        $testInstance = new Legend();\n\n        foreach ($positionValues as $positionValue) {\n            $result = $testInstance->setPosition($positionValue);\n            self::assertTrue($result);\n        }\n    }\n\n    public function testSetInvalidPositionReturnsFalse(): void\n    {\n        $testInstance = new Legend();\n\n        $result = $testInstance->setPosition('BottomLeft');\n        self::assertFalse($result);\n        //    Ensure that value is unchanged\n        $result = $testInstance->getPosition();\n        self::assertEquals(Legend::POSITION_RIGHT, $result);\n    }\n\n    public function testGetPosition(): void\n    {\n        $PositionValue = Legend::POSITION_BOTTOM;\n\n        $testInstance = new Legend();\n        $testInstance->setPosition($PositionValue);\n\n        $result = $testInstance->getPosition();\n        self::assertEquals($PositionValue, $result);\n    }\n\n    public function testSetPositionXL(): void\n    {\n        $positionValues = [\n            Legend::XL_LEGEND_POSITION_BOTTOM,\n            Legend::XL_LEGEND_POSITION_CORNER,\n            Legend::XL_LEGEND_POSITION_CUSTOM,\n            Legend::XL_LEGEND_POSITION_LEFT,\n            Legend::XL_LEGEND_POSITION_RIGHT,\n            Legend::XL_LEGEND_POSITION_TOP,\n        ];\n\n        $testInstance = new Legend();\n\n        foreach ($positionValues as $positionValue) {\n            $result = $testInstance->setPositionXL($positionValue);\n            self::assertTrue($result);\n        }\n    }\n\n    public function testSetInvalidXLPositionReturnsFalse(): void\n    {\n        $testInstance = new Legend();\n\n        $result = $testInstance->setPositionXL(999);\n        self::assertFalse($result);\n        //    Ensure that value is unchanged\n        $result = $testInstance->getPositionXL();\n        self::assertEquals(Legend::XL_LEGEND_POSITION_RIGHT, $result);\n    }\n\n    public function testGetPositionXL(): void\n    {\n        $PositionValue = Legend::XL_LEGEND_POSITION_CORNER;\n\n        $testInstance = new Legend();\n        $testInstance->setPositionXL($PositionValue);\n\n        $result = $testInstance->getPositionXL();\n        self::assertEquals($PositionValue, $result);\n    }\n\n    public function testSetOverlay(): void\n    {\n        $overlayValues = [\n            true,\n            false,\n        ];\n\n        $testInstance = new Legend();\n\n        foreach ($overlayValues as $overlayValue) {\n            $testInstance->setOverlay($overlayValue);\n            self::assertSame($overlayValue, $testInstance->getOverlay());\n        }\n    }\n\n    public function testGetOverlay(): void\n    {\n        $OverlayValue = true;\n\n        $testInstance = new Legend();\n        $testInstance->setOverlay($OverlayValue);\n\n        $result = $testInstance->getOverlay();\n        self::assertEquals($OverlayValue, $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/LineStylesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\GridLines;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PHPUnit\\Framework\\TestCase;\n\nclass LineStylesTest extends TestCase\n{\n    public function testLineStyles(): void\n    {\n        $gridlines1 = new GridLines();\n        $originalLineStyle = $gridlines1->getLineStyleArray();\n        $gridlines1->setLineStyleProperties(\n            3, // lineWidth\n            Properties::LINE_STYLE_COMPOUND_DOUBLE, // compoundType\n            '', // dashType\n            Properties::LINE_STYLE_CAP_SQUARE, // capType\n            '', // jointType\n            '', // headArrowType\n            0, // headArrowSize\n            '', // endArrowType\n            0, // endArrowSize\n            'lg', // headArrowWidth\n            'med', // headArrowLength\n            '', // endArrowWidth\n            '' // endArrowLength\n        );\n        $gridlines2 = new GridLines();\n        $lineStyleProperties = [\n            'width' => 3,\n            'compound' => Properties::LINE_STYLE_COMPOUND_DOUBLE,\n            'cap' => Properties::LINE_STYLE_CAP_SQUARE,\n            'arrow' => ['head' => ['w' => 'lg', 'len' => 'med']],\n        ];\n        $gridlines2->setLineStyleArray($lineStyleProperties);\n        self::assertSame($gridlines1->getLineStyleArray(), $gridlines2->getLineStyleArray());\n        $gridlines2->setLineStyleArray(); // resets line styles\n        self::assertSame($originalLineStyle, $gridlines2->getLineStyleArray());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/MultiplierTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MultiplierTest extends TestCase\n{\n    public function testMultiplier(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_AREACHART, // plotType\n            DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues          // plotValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_TOPRIGHT, null, false);\n\n        $title = new Title('Test %age-Stacked Area Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel  // yAxisLabel\n        );\n        $xAxis = $chart->getChartAxisX();\n        $expectedX = [\n            'effect' => 'outerShdw',\n            'algn' => 'bl',\n            'blur' => 6,\n            'direction' => 315,\n            'distance' => 3,\n            'rotWithShape' => 0,\n            'size' => [\n                'sx' => null,\n                'sy' => 2.54,\n                'kx' => -45,\n                'ky' => 90,\n            ],\n            'color' => [\n                'type' => ChartColor::EXCEL_COLOR_TYPE_RGB,\n                'value' => 'FF0000',\n                'alpha' => 20,\n            ],\n        ];\n        $expectedXmlX = [\n            '<a:outerShdw ',\n            ' algn=\"bl\"',\n            ' blurRad=\"76200\"',\n            ' dir=\"18900000\"',\n            ' dist=\"38100\"',\n            ' rotWithShape=\"0\"',\n            ' sy=\"254000\"',\n            ' kx=\"-2700000\"',\n            '<a:srgbClr val=\"FF0000\">',\n            '<a:alpha val=\"80000\"/>',\n        ];\n        $expectedXmlNoX = [\n            ' sx=',\n            ' ky=',\n        ];\n        foreach ($expectedX as $key => $value) {\n            $xAxis->setShadowProperty($key, $value);\n        }\n        // Set the position where the chart should appear in the worksheet\n        $chart->setTopLeftPosition('A7');\n        $chart->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart);\n\n        // confirm that file contains expected tags\n        foreach ($expectedXmlX as $expected) {\n            self::assertSame(1, substr_count($data, $expected), $expected);\n        }\n        self::assertSame(0, substr_count($data, 'ky'), 'ky value too high');\n        foreach ($expectedXmlNoX as $expected) {\n            self::assertSame(0, substr_count($data, $expected), $expected);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/PR3163Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\n// based on chartSpreadsheet.php\n// Testing XLSX-Export of y-Axis line styles\n\nclass PR3163Test extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testYAxisLineStyle(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            DataSeries::TYPE_BARCHART, // plotType\n            DataSeries::GROUPING_CLUSTERED, // plotGrouping\n            range(0, count($dataSeriesValues) - 1), // plotOrder\n            $dataSeriesLabels, // plotLabel\n            $xAxisTickValues, // plotCategory\n            $dataSeriesValues        // plotValues\n        );\n        // Set additional dataseries parameters\n        //     Make it a horizontal bar rather than a vertical column graph\n        $series->setPlotDirection(DataSeries::DIRECTION_BAR);\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n        // Set the chart legend\n        $legend = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n        $title = new Title('Test Bar Chart');\n        $yAxisLabel = new Title('Value ($k)');\n\n        // Create x- and y-axis\n        $xAxis = new Axis();\n        $xAxis->setLineColorProperties('FF0000');\n\n        $yAxis = new Axis();\n        $yAxis->setLineColorProperties('00FF00');\n\n        // Create the chart\n        $chart1 = new Chart(\n            'chart1', // name\n            $title, // title\n            $legend, // legend\n            $plotArea, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            $yAxisLabel,  // yAxisLabel\n            $xAxis,  // xAxis\n            $yAxis   // yAxis\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart1->setTopLeftPosition('A7');\n        $chart1->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart1);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n\n        $xAxis2 = $chart2->getChartAxisX();\n        $lineColorX2 = $xAxis2->getLineColorProperty('value');\n        self::assertSame($lineColorX2, 'FF0000');\n\n        $yAxis2 = $chart2->getChartAxisY();\n        $lineColorY2 = $yAxis2->getLineColorProperty('value');\n        self::assertSame($lineColorY2, '00FF00');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/PieFillTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Layout;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Legend as ChartLegend;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass PieFillTest extends AbstractFunctional\n{\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testPieFill(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(\n            [\n                ['', 2010, 2011, 2012],\n                ['Q1', 12, 15, 21],\n                ['Q2', 56, 73, 86],\n                ['Q3', 52, 61, 69],\n                ['Q4', 30, 32, 0],\n            ]\n        );\n        // Custom colors for dataSeries (gray, blue, red, orange)\n        $colors = [\n            'cccccc',\n            '*accent1', // use schemeClr, was '00abb8',\n            '/green', // use prstClr, was 'b8292f',\n            'eb8500',\n        ];\n\n        // Set the Labels for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $dataSeriesLabels1 = [\n            new DataSeriesValues(\n                DataSeriesValues::DATASERIES_TYPE_STRING,\n                'Worksheet!$C$1',\n                null,\n                1\n            ), // 2011\n        ];\n        // Set the X-Axis Labels\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        $xAxisTickValues1 = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4\n        ];\n        // Set the Data values for each data series we want to plot\n        //     Datatype\n        //     Cell reference for data\n        //     Format Code\n        //     Number of datapoints in series\n        //     Data values\n        //     Data Marker\n        //     Custom Colors\n        $dataSeriesValues1Element = new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4);\n        $dataSeriesValues1Element->setFillColor($colors);\n        $dataSeriesValues1 = [$dataSeriesValues1Element];\n\n        // Build the dataseries\n        $series1 = new DataSeries(\n            DataSeries::TYPE_PIECHART, // plotType\n            null, // plotGrouping (Pie charts don't have any grouping)\n            range(0, count($dataSeriesValues1) - 1), // plotOrder\n            $dataSeriesLabels1, // plotLabel\n            $xAxisTickValues1, // plotCategory\n            $dataSeriesValues1          // plotValues\n        );\n\n        // Set up a layout object for the Pie chart\n        $layout1 = new Layout();\n        $layout1->setShowVal(true);\n        $layout1->setShowPercent(true);\n\n        // Set the series in the plot area\n        $plotArea1 = new PlotArea($layout1, [$series1]);\n        // Set the chart legend\n        $legend1 = new ChartLegend(ChartLegend::POSITION_RIGHT, null, false);\n\n        $title1 = new Title('Test Pie Chart');\n\n        // Create the chart\n        $chart1 = new Chart(\n            'chart1', // name\n            $title1, // title\n            $legend1, // legend\n            $plotArea1, // plotArea\n            true, // plotVisibleOnly\n            DataSeries::EMPTY_AS_GAP, // displayBlanksAs\n            null, // xAxisLabel\n            null  // no Y-Axis for Pie Chart\n        );\n\n        // Set the position where the chart should appear in the worksheet\n        $chart1->setTopLeftPosition('A7');\n        $chart1->setBottomRightPosition('H20');\n\n        // Add the chart to the worksheet\n        $worksheet->addChart($chart1);\n\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts2 = $sheet->getChartCollection();\n        self::assertCount(1, $charts2);\n        $chart2 = $charts2[0];\n        self::assertNotNull($chart2);\n        $plotArea2 = $chart2->getPlotArea();\n        self::assertNotNull($plotArea2);\n        $dataSeries2 = $plotArea2->getPlotGroup();\n        self::assertCount(1, $dataSeries2);\n        $plotValues = $dataSeries2[0]->getPlotValues();\n        self::assertCount(1, $plotValues);\n        $fillColors = $plotValues[0]->getFillColor();\n        self::assertSame($colors, $fillColors);\n\n        $writer = new XlsxWriter($reloadedSpreadsheet);\n        $writer->setIncludeCharts(true);\n        $writerChart = new XlsxWriter\\Chart($writer);\n        $data = $writerChart->writeChart($chart2);\n        self::assertSame(1, substr_count($data, '<a:srgbClr val=\"cccccc\"/>'));\n        self::assertSame(1, substr_count($data, '<a:schemeClr val=\"accent1\"/>'));\n        self::assertSame(1, substr_count($data, '<a:prstClr val=\"green\"/>'));\n        self::assertSame(1, substr_count($data, '<a:srgbClr val=\"eb8500\"/>'));\n        self::assertSame(4, substr_count($data, '<c:dPt>'));\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/PlotAreaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeriesValues;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Exception as ChartException;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\PlotArea;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PlotAreaTest extends TestCase\n{\n    public function testPlotArea(): void\n    {\n        $dataSeriesValues = [\n            new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, null, null, 4, [1, 2, 3, 4]),\n        ];\n\n        // Build the dataseries\n        $series = new DataSeries(\n            plotType: DataSeries::TYPE_AREACHART,\n            plotGrouping: DataSeries::GROUPING_PERCENT_STACKED,\n            plotOrder: range(0, count($dataSeriesValues) - 1),\n            plotValues: $dataSeriesValues\n        );\n\n        // Set the series in the plot area\n        $plotArea = new PlotArea(null, [$series]);\n\n        // Create the chart\n        $chart = new Chart(\n            'chart1', // name\n            plotArea: $plotArea,\n        );\n        self::assertNotNull($chart->getPlotArea());\n    }\n\n    public function testNoPlotArea(): void\n    {\n        $chart = new Chart('chart1');\n        $this->expectException(ChartException::class);\n        $this->expectExceptionMessage('Chart has no PlotArea');\n        $chart->getPlotAreaOrThrow();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/RenderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Chart;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RenderTest extends TestCase\n{\n    public function testNoRenderer(): void\n    {\n        $chart = new Chart('Chart1');\n        self::assertFalse($chart->render());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/RoundedCornersTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass RoundedCornersTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testRounded(): void\n    {\n        $file = self::DIRECTORY . '32readwriteAreaChart1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Data', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertTrue($chart->getRoundedCorners());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testNotRounded(): void\n    {\n        $file = self::DIRECTORY . '32readwriteAreaChart2.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Data', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        self::assertFalse($chart->getRoundedCorners());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/ShadowPresetsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Axis;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\GridLines;\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Properties;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ShadowPresetsTest extends TestCase\n{\n    public function testGridlineShadowPresets(): void\n    {\n        $gridlines = new GridLines();\n        $gridlines->setShadowProperties(17);\n        $expectedShadow = [\n            'effect' => 'innerShdw',\n            'distance' => 4,\n            'direction' => 270,\n            'blur' => 5,\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($gridlines->getShadowProperty($key), $value, $key);\n        }\n    }\n\n    public function testGridlineShadowPresetsWithArray(): void\n    {\n        $gridlines = new GridLines();\n        $gridlines->setShadowProperties(20);\n        $expectedShadow = [\n            'effect' => 'outerShdw',\n            'blur' => 6,\n            'direction' => 315,\n            'size' => [\n                'sx' => null,\n                'sy' => 0.23,\n                'kx' => -20,\n                'ky' => null,\n            ],\n            'algn' => 'bl',\n            'rotWithShape' => '0',\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($gridlines->getShadowProperty($key), $value, $key);\n        }\n    }\n\n    public function testAxisShadowPresets(): void\n    {\n        $axis = new Axis();\n        $axis->setShadowProperties(9);\n        $expectedShadow = [\n            'effect' => 'outerShdw',\n            'blur' => 4,\n            'distance' => 3,\n            'direction' => 225,\n            'algn' => 'br',\n            'rotWithShape' => '0',\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($axis->getShadowProperty($key), $value, $key);\n        }\n    }\n\n    public function testAxisShadowPresetsWithChanges(): void\n    {\n        $axis = new Axis();\n        $axis->setShadowProperties(\n            9, // preset\n            'FF0000', // colorValue\n            'srgbClr', // colorType\n            20, // alpha\n            6, // blur\n            30, // direction\n            4, // distance\n        );\n        $expectedShadow = [\n            'effect' => 'outerShdw',\n            'blur' => 6,\n            'distance' => 4,\n            'direction' => 30,\n            'algn' => 'br',\n            'rotWithShape' => '0',\n            'color' => [\n                'value' => 'FF0000',\n                'type' => 'srgbClr',\n                'alpha' => 20,\n            ],\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($axis->getShadowProperty($key), $value, $key);\n        }\n    }\n\n    public function testGridlinesShadowPresetsWithChanges(): void\n    {\n        $gridline = new GridLines();\n        $gridline->setShadowProperties(\n            9, // preset\n            'FF0000', // colorValue\n            'srgbClr', // colorType\n            20, // alpha\n            6, // blur\n            30, // direction\n            4, // distance\n        );\n        $expectedShadow = [\n            'effect' => 'outerShdw',\n            'blur' => 6,\n            'distance' => 4,\n            'direction' => 30,\n            'algn' => 'br',\n            'rotWithShape' => '0',\n            'color' => [\n                'value' => 'FF0000',\n                'type' => 'srgbClr',\n                'alpha' => 20,\n            ],\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($gridline->getShadowProperty($key), $value, $key);\n        }\n    }\n\n    public function testPreset0(): void\n    {\n        $axis = new Axis();\n        $axis->setShadowProperties(0);\n        $expectedShadow = [\n            'presets' => Properties::SHADOW_PRESETS_NOSHADOW,\n            'effect' => null,\n            'color' => [\n                'type' => ChartColor::EXCEL_COLOR_TYPE_STANDARD,\n                'value' => 'black',\n                'alpha' => 40,\n            ],\n            'size' => [\n                'sx' => null,\n                'sy' => null,\n                'kx' => null,\n                'ky' => null,\n            ],\n            'blur' => null,\n            'direction' => null,\n            'distance' => null,\n            'algn' => null,\n            'rotWithShape' => null,\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($value, $axis->getShadowProperty($key), $key);\n        }\n    }\n\n    public function testOutOfRangePresets(): void\n    {\n        $axis = new Axis();\n        $axis->setShadowProperties(99);\n        $expectedShadow = [\n            'presets' => Properties::SHADOW_PRESETS_NOSHADOW,\n            'effect' => null,\n            'color' => [\n                'type' => ChartColor::EXCEL_COLOR_TYPE_STANDARD,\n                'value' => 'black',\n                'alpha' => 40,\n            ],\n            'size' => [\n                'sx' => null,\n                'sy' => null,\n                'kx' => null,\n                'ky' => null,\n            ],\n            'blur' => null,\n            'direction' => null,\n            'distance' => null,\n            'algn' => null,\n            'rotWithShape' => null,\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($value, $axis->getShadowProperty($key), $key);\n        }\n    }\n\n    public function testOutOfRangeGridlines(): void\n    {\n        $gridline = new GridLines();\n        $gridline->setShadowProperties(99);\n        $expectedShadow = [\n            'presets' => Properties::SHADOW_PRESETS_NOSHADOW,\n            'effect' => null,\n            'color' => [\n                'type' => ChartColor::EXCEL_COLOR_TYPE_STANDARD,\n                'value' => 'black',\n                'alpha' => 40,\n            ],\n            'size' => [\n                'sx' => null,\n                'sy' => null,\n                'kx' => null,\n                'ky' => null,\n            ],\n            'blur' => null,\n            'direction' => null,\n            'distance' => null,\n            'algn' => null,\n            'rotWithShape' => null,\n        ];\n        foreach ($expectedShadow as $key => $value) {\n            self::assertEquals($value, $gridline->getShadowProperty($key), $key);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/TitleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\Title;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass TitleTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testTitleHasCenteredOverlay(): void\n    {\n        $file = self::DIRECTORY . 'chart-with-and-without-overlays.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheetName = 'With Overlay';\n        $sheet = $spreadsheet->getSheetByName($sheetName);\n        self::assertNotNull($sheet);\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByName($sheetName);\n        self::assertNotNull($sheet);\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $title = $chart->getTitle();\n        self::assertNotNull($title);\n        self::assertTrue($title->getOverlay());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testTitleIsAboveChart(): void\n    {\n        $file = self::DIRECTORY . 'chart-with-and-without-overlays.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheetName = 'Without Overlay';\n        $sheet = $spreadsheet->getSheetByName($sheetName);\n        self::assertNotNull($sheet);\n        self::assertSame(1, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByName($sheetName);\n        self::assertNotNull($sheet);\n        $charts = $sheet->getChartCollection();\n        self::assertCount(1, $charts);\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $title = $chart->getTitle();\n        self::assertNotNull($title);\n        self::assertFalse($title->getOverlay());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testString(): void\n    {\n        $title = new Title('hello');\n        self::assertSame('hello', $title->getCaption());\n        self::assertSame('hello', $title->getCaptionText());\n    }\n\n    public function testStringArray(): void\n    {\n        $title = new Title();\n        $title->setCaption(['Hello', ', ', 'world.']);\n        self::assertSame('Hello, world.', $title->getCaptionText());\n    }\n\n    public function testRichText(): void\n    {\n        $title = new Title();\n        $richText = new RichText();\n        $part = $richText->createTextRun('Hello');\n        $font = $part->getFont();\n        if ($font === null) {\n            self::fail('Unable to retrieve font');\n        } else {\n            $font->setBold(true);\n            $title->setCaption($richText);\n            self::assertSame('Hello', $title->getCaptionText());\n        }\n    }\n\n    public function testMixedArray(): void\n    {\n        $title = new Title();\n        $richText1 = new RichText();\n        $part1 = $richText1->createTextRun('Hello');\n        $font1 = $part1->getFont();\n        $richText2 = new RichText();\n        $part2 = $richText2->createTextRun('world');\n        $font2 = $part2->getFont();\n        if ($font1 === null || $font2 === null) {\n            self::fail('Unable to retrieve font');\n        } else {\n            $font1->setBold(true);\n            $font2->setItalic(true);\n            $title->setCaption([$richText1, ', ', $richText2, '.']);\n            self::assertSame('Hello, world.', $title->getCaptionText());\n        }\n    }\n\n    public function testSetOverlay(): void\n    {\n        $overlayValues = [\n            true,\n            false,\n        ];\n\n        $testInstance = new Title();\n\n        foreach ($overlayValues as $overlayValue) {\n            $testInstance->setOverlay($overlayValue);\n            self::assertSame($overlayValue, $testInstance->getOverlay());\n        }\n    }\n\n    public function testGetOverlay(): void\n    {\n        $overlayValue = true;\n\n        $testInstance = new Title();\n        $testInstance->setOverlay($overlayValue);\n\n        $result = $testInstance->getOverlay();\n        self::assertEquals($overlayValue, $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Chart/TrendLineTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Chart;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass TrendLineTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testTrendLine(): void\n    {\n        $file = self::DIRECTORY . '32readwriteScatterChartTrendlines1.xlsx';\n        $reader = new XlsxReader();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertSame(2, $sheet->getChartCount());\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheet(1);\n        self::assertSame('Scatter Chart', $sheet->getTitle());\n        $charts = $sheet->getChartCollection();\n        self::assertCount(2, $charts);\n\n        $chart = $charts[0];\n        self::assertNotNull($chart);\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $plotSeriesArray = $plotArea->getPlotGroup();\n        self::assertCount(1, $plotSeriesArray);\n        $plotSeries = $plotSeriesArray[0];\n        $valuesArray = $plotSeries->getPlotValues();\n        self::assertCount(3, $valuesArray);\n        self::assertEmpty($valuesArray[0]->getTrendLines());\n        self::assertEmpty($valuesArray[1]->getTrendLines());\n        self::assertEmpty($valuesArray[2]->getTrendLines());\n\n        $chart = $charts[1];\n        self::assertNotNull($chart);\n        $plotArea = $chart->getPlotArea();\n        self::assertNotNull($plotArea);\n        $plotSeriesArray = $plotArea->getPlotGroup();\n        self::assertCount(1, $plotSeriesArray);\n        $plotSeries = $plotSeriesArray[0];\n        $valuesArray = $plotSeries->getPlotValues();\n        self::assertCount(1, $valuesArray);\n        $trendLines = $valuesArray[0]->getTrendLines();\n        self::assertCount(3, $trendLines);\n\n        $trendLine = $trendLines[0];\n        self::assertSame('linear', $trendLine->getTrendLineType());\n        self::assertFalse($trendLine->getDispRSqr());\n        self::assertFalse($trendLine->getDispEq());\n        $lineColor = $trendLine->getLineColor();\n        self::assertSame('accent4', $lineColor->getValue());\n        self::assertSame('stealth', $trendLine->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals(0.5, $trendLine->getLineStyleProperty('width'));\n        self::assertSame('', $trendLine->getName());\n        self::assertSame(0.0, $trendLine->getBackward());\n        self::assertSame(0.0, $trendLine->getForward());\n        self::assertSame(0.0, $trendLine->getIntercept());\n\n        $trendLine = $trendLines[1];\n        self::assertSame('poly', $trendLine->getTrendLineType());\n        self::assertTrue($trendLine->getDispRSqr());\n        self::assertTrue($trendLine->getDispEq());\n        $lineColor = $trendLine->getLineColor();\n        self::assertSame('accent3', $lineColor->getValue());\n        self::assertNull($trendLine->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals(1.25, $trendLine->getLineStyleProperty('width'));\n        self::assertSame('metric3 polynomial', $trendLine->getName());\n        self::assertSame(20.0, $trendLine->getBackward());\n        self::assertSame(28.0, $trendLine->getForward());\n        self::assertSame(14400.5, $trendLine->getIntercept());\n\n        $trendLine = $trendLines[2];\n        self::assertSame('movingAvg', $trendLine->getTrendLineType());\n        self::assertTrue($trendLine->getDispRSqr());\n        self::assertFalse($trendLine->getDispEq());\n        $lineColor = $trendLine->getLineColor();\n        self::assertSame('accent2', $lineColor->getValue());\n        self::assertNull($trendLine->getLineStyleProperty(['arrow', 'head', 'type']));\n        self::assertEquals(1.5, $trendLine->getLineStyleProperty('width'));\n        self::assertSame('', $trendLine->getName());\n        self::assertSame(0.0, $trendLine->getBackward());\n        self::assertSame(0.0, $trendLine->getForward());\n        self::assertSame(0.0, $trendLine->getIntercept());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Collection/Cells2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Collection;\n\nuse PhpOffice\\PhpSpreadsheet\\Collection\\Cells;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Cells2Test extends TestCase\n{\n    public function testThrowsWhenCellCannotBeStoredInClonedCache(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Exception::class);\n        $this->expectExceptionMessage('Failed to copy cells in cache');\n\n        $cache = new SimpleCache3xxx();\n\n        $worksheet = new Worksheet();\n        $collection = new Cells($worksheet, $cache);\n\n        $collection->add('A1', $worksheet->getCell('A1'));\n        $collection->add('A2', $worksheet->getCell('A2'));\n        $collection->cloneCellCollection($worksheet);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Collection/CellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Collection;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Collection\\Cells;\nuse PhpOffice\\PhpSpreadsheet\\Collection\\Memory;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellsTest extends TestCase\n{\n    public function testCollectionCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $collection = $sheet->getCellCollection();\n\n        // Assert empty state\n        self::assertEquals([], $collection->getCoordinates(), 'cell list should be empty');\n        self::assertEquals([], $collection->getSortedCoordinates(), 'sorted cell list should be empty');\n        $getB2 = $collection->get('B2');\n        self::assertNull($getB2, 'getting non-existing cell must return null');\n        self::assertFalse($collection->has('B2'), 'non-existing cell should be non-existent');\n\n        // Add one cell\n        $cell1 = $sheet->getCell('B2');\n        self::assertSame($cell1, $collection->add('B2', $cell1), 'adding a cell should return the cell');\n\n        // Assert cell presence\n        self::assertEquals(['B2'], $collection->getCoordinates(), 'cell list should contains the B2 cell');\n        self::assertEquals(['B2'], $collection->getSortedCoordinates(), 'sorted cell list contains the B2 cell');\n        self::assertSame($cell1, $collection->get('B2'), 'should get exact same object');\n        self::assertTrue($collection->has('B2'), 'B2 cell should exists');\n\n        // Add a second cell\n        $cell2 = $sheet->getCell('A1');\n        self::assertSame($cell2, $collection->add('A1', $cell2), 'adding a second cell should return the cell');\n        self::assertEquals(['B2', 'A1'], $collection->getCoordinates(), 'cell list should contains the second cell');\n        // Note that sorts orders the collection itself, so these cells will aread be ordered for the subsequent asserions\n        self::assertEquals(['A1', 'B2'], $collection->getSortedCoordinates(), 'sorted cell list contains the second cell');\n\n        // Add a third cell\n        $cell3 = $sheet->getCell('AA1');\n        self::assertSame($cell3, $collection->add('AA1', $cell3), 'adding a third cell should return the cell');\n        self::assertEquals(['A1', 'B2', 'AA1'], $collection->getCoordinates(), 'cell list should contains the third cell');\n        // Note that sorts orders the collection itself, so these cells will aread be ordered for the subsequent asserions\n        self::assertEquals(['A1', 'AA1', 'B2'], $collection->getSortedCoordinates(), 'sorted cell list contains the third cell');\n\n        // Add a fourth cell\n        $cell4 = $sheet->getCell('Z1');\n        self::assertSame($cell4, $collection->add('Z1', $cell4), 'adding a fourth cell should return the cell');\n        self::assertEquals(['A1', 'AA1', 'B2', 'Z1'], $collection->getCoordinates(), 'cell list should contains the fourth cell');\n        // Note that sorts orders the collection itself, so these cells will aread be ordered for the subsequent asserions\n        self::assertEquals(['A1', 'Z1', 'AA1', 'B2'], $collection->getSortedCoordinates(), 'sorted cell list contains the fourth cell');\n\n        // Assert collection copy\n        $sheet2 = $spreadsheet->createSheet();\n        $collection2 = $collection->cloneCellCollection($sheet2);\n        self::assertTrue($collection2->has('A1'));\n        $copiedCell2 = $collection2->get('A1');\n        self::assertNotNull($copiedCell2);\n        self::assertNotSame($cell2, $copiedCell2, 'copied cell should not be the same object any more');\n        self::assertSame($collection2, $copiedCell2->getParent(), 'copied cell should be owned by the copied collection');\n        self::assertSame('A1', $copiedCell2->getCoordinate(), 'copied cell should keep attributes');\n\n        // Assert deletion\n        $collection->delete('B2');\n        self::assertFalse($collection->has('B2'), 'cell should have been deleted');\n        self::assertEquals(['A1', 'Z1', 'AA1'], $collection->getCoordinates(), 'cell list should still contains the A1,Z1 and A11 cells');\n\n        // Assert update\n        $cell2 = $sheet->getCell('A1');\n        self::assertSame($sheet->getCellCollection(), $collection);\n        self::assertSame($cell2, $collection->update($cell2), 'should update existing cell');\n\n        $cell3 = $sheet->getCell('C3');\n        self::assertSame($cell3, $collection->update($cell3), 'should silently add non-existing C3 cell');\n        self::assertEquals(['A1', 'Z1', 'AA1', 'C3'], $collection->getCoordinates(), 'cell list should contains the C3 cell');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCacheLastCell(): void\n    {\n        $workbook = new Spreadsheet();\n        $cells = ['A1', 'A2'];\n        $sheet = $workbook->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 2);\n        self::assertEquals($cells, $sheet->getCoordinates(), 'list should include last added cell');\n        $workbook->disconnectWorksheets();\n    }\n\n    public function testCanGetCellAfterAnotherIsDeleted(): void\n    {\n        $workbook = new Spreadsheet();\n        $sheet = $workbook->getActiveSheet();\n        $collection = $sheet->getCellCollection();\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 1);\n        $collection->delete('A1');\n        $sheet->setCellValue('A3', 1);\n        self::assertNotNull($collection->get('A2'), 'should be able to get back the cell even when another cell was deleted while this one was the current one');\n        $workbook->disconnectWorksheets();\n    }\n\n    public function testThrowsWhenCellCannotBeRetrievedFromCache(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Exception::class);\n\n        $collection = $this->getMockBuilder(Cells::class)\n            ->setConstructorArgs([\n                new Worksheet(),\n                Settings::useSimpleCacheVersion3() ? new Memory\\SimpleCache3() : new Memory\\SimpleCache1(),\n            ])\n            ->onlyMethods(['has'])\n            ->getMock();\n\n        $collection->method('has')\n            ->willReturn(true);\n\n        $collection->get('A2');\n    }\n\n    public function testThrowsWhenCellCannotBeStoredInCache(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Exception::class);\n\n        $cache = $this->createMock(\n            Settings::useSimpleCacheVersion3() ? Memory\\SimpleCache3::class : Memory\\SimpleCache1::class\n        );\n        $cell = $this->createMock(Cell::class);\n        $cache->method('set')\n            ->willReturn(false);\n\n        $collection = new Cells(new Worksheet(), $cache);\n\n        $collection->add('A1', $cell);\n        $collection->add('A2', $cell);\n    }\n\n    public function testGetHighestColumn(): void\n    {\n        $workbook = new Spreadsheet();\n        $sheet = $workbook->getActiveSheet();\n        $collection = $sheet->getCellCollection();\n\n        // check for empty sheet\n        self::assertEquals('A', $collection->getHighestColumn());\n        self::assertEquals('A', $collection->getHighestColumn(1));\n\n        // set a value and check again\n        $sheet->getCell('C4')->setValue(1);\n        self::assertEquals('C', $collection->getHighestColumn());\n        self::assertEquals('A', $collection->getHighestColumn(1));\n        self::assertEquals('C', $collection->getHighestColumn(4));\n        $workbook->disconnectWorksheets();\n    }\n\n    public function testGetHighestColumnBad(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Exception::class);\n        $this->expectExceptionMessage('Row number must be a positive integer');\n        $workbook = new Spreadsheet();\n        $sheet = $workbook->getActiveSheet();\n        $collection = $sheet->getCellCollection();\n\n        // check for empty sheet\n        self::assertEquals('A', $collection->getHighestColumn());\n        $collection->getHighestColumn(0);\n        $workbook->disconnectWorksheets();\n    }\n\n    public function testRemoveRowBad(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Exception::class);\n        $this->expectExceptionMessage('Row number must be a positive integer');\n        $workbook = new Spreadsheet();\n        $sheet = $workbook->getActiveSheet();\n        $collection = $sheet->getCellCollection();\n        $collection->removeRow(0);\n        $workbook->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Collection/SimpleCache3xxx.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Collection;\n\nuse DateInterval;\nuse PhpOffice\\PhpSpreadsheet\\Collection\\Memory\\SimpleCache3;\n\nclass SimpleCache3xxx extends SimpleCache3\n{\n    public static int $useCount = 0;\n\n    public function set(string $key, mixed $value, null|int|DateInterval $ttl = null): bool\n    {\n        ++self::$useCount;\n        if (self::$useCount >= 4) {\n            return false;\n        }\n\n        return parent::set($key, $value, $ttl);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/CommentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\TextElement;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CommentTest extends TestCase\n{\n    public function testCreateComment(): void\n    {\n        $comment = new Comment();\n        self::assertEquals('Author', $comment->getAuthor());\n        self::assertEquals('96pt', $comment->getWidth());\n        self::assertEquals('59.25pt', $comment->getMarginLeft());\n        self::assertEquals('1.5pt', $comment->getMarginTop());\n        self::assertEquals('55.5pt', $comment->getHeight());\n        self::assertEquals('FFFFFFE1', $comment->getFillColor()->getARGB());\n        self::assertEquals(Alignment::HORIZONTAL_GENERAL, $comment->getAlignment());\n        self::assertFalse($comment->getVisible());\n    }\n\n    public function testSetAuthor(): void\n    {\n        $comment = new Comment();\n        $comment->setAuthor('Mark Baker');\n        self::assertEquals('Mark Baker', $comment->getAuthor());\n    }\n\n    public function testSetMarginLeft(): void\n    {\n        $comment = new Comment();\n        $comment->setMarginLeft('20pt');\n        self::assertEquals('20pt', $comment->getMarginLeft());\n    }\n\n    public function testSetMarginTop(): void\n    {\n        $comment = new Comment();\n        $comment->setMarginTop('2.5pt');\n        self::assertEquals('2.5pt', $comment->getMarginTop());\n    }\n\n    public function testSetWidth(): void\n    {\n        $comment = new Comment();\n        $comment->setWidth('120pt');\n        self::assertEquals('120pt', $comment->getWidth());\n    }\n\n    public function testSetHeight(): void\n    {\n        $comment = new Comment();\n        $comment->setHeight('60px');\n        self::assertEquals('60px', $comment->getHeight());\n    }\n\n    public function testSetFillColor(): void\n    {\n        $comment = new Comment();\n        $comment->setFillColor(new Color('RED'));\n        self::assertEquals(Color::COLOR_RED, $comment->getFillColor()->getARGB());\n    }\n\n    public function testSetAlignment(): void\n    {\n        $comment = new Comment();\n        $comment->setAlignment(Alignment::HORIZONTAL_CENTER);\n        self::assertEquals(Alignment::HORIZONTAL_CENTER, $comment->getAlignment());\n    }\n\n    public function testSetText(): void\n    {\n        $comment = new Comment();\n        $test = new RichText();\n        $test->addText(new TextElement('This is a test comment'));\n        $comment->setText($test);\n        self::assertEquals('This is a test comment', (string) $comment);\n    }\n\n    public function testRemoveComment(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getComment('A2')->getText()->createText('Comment to delete');\n        $comments1 = $sheet->getComments();\n        self::assertArrayHasKey('A2', $comments1);\n        $sheet->removeComment('A2');\n        self::assertEmpty($sheet->getComments());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Custom/ComplexAssert.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Custom;\n\nuse Complex\\Complex;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ComplexAssert extends TestCase\n{\n    protected float $complexPrecision = 1E-12;\n\n    private function adjustDelta(float $expected, float $actual, float $delta): float\n    {\n        $adjustedDelta = $delta;\n\n        if (abs($actual) > 10 && abs($expected) > 10) {\n            $variance = floor(log10(abs($expected)));\n            $adjustedDelta *= 10 ** $variance;\n        }\n\n        return $adjustedDelta > 1.0 ? 1.0 : $adjustedDelta;\n    }\n\n    public function assertComplexEquals(mixed $expected, mixed $actual, ?float $delta = null): bool\n    {\n        if ($expected === INF) {\n            self::assertSame('INF', $actual);\n\n            return true;\n        }\n        if (is_string($expected) && $expected[0] === '#') {\n            self::assertSame(\n                $expected,\n                $actual,\n                'Mismatched Error'\n            );\n\n            return true;\n        }\n\n        if ($delta === null) {\n            $delta = $this->complexPrecision;\n        }\n        $expectedComplex = new Complex($expected);\n        $actualComplex = new Complex($actual);\n\n        $comparand1 = $expectedComplex->getReal();\n        $comparand2 = $actualComplex->getReal();\n        $adjustedDelta = $this->adjustDelta($comparand1, $comparand2, $delta);\n        self::assertEqualsWithDelta(\n            $comparand1,\n            $comparand2,\n            $adjustedDelta,\n            'Mismatched Real part'\n        );\n\n        $comparand1 = $expectedComplex->getImaginary();\n        $comparand2 = $actualComplex->getImaginary();\n        $adjustedDelta = $this->adjustDelta($comparand1, $comparand2, $delta);\n        self::assertEqualsWithDelta(\n            $comparand1,\n            $comparand2,\n            $adjustedDelta,\n            'Mismatched Imaginary part'\n        );\n\n        self::assertSame(\n            $expectedComplex->getSuffix(),\n            $actualComplex->getSuffix(),\n            'Mismatched Suffix'\n        );\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/CustomReader.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\n\n// Used in IOFactoryRegister tests\nclass CustomReader extends XlsxReader\n{\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/CustomWriter.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\n\n// Used in IOFactoryRegister tests\nclass CustomWriter extends HtmlWriter\n{\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/DefinedNameFormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefinedNameFormulaTest extends TestCase\n{\n    #[DataProvider('providerRangeOrFormula')]\n    public function testRangeOrFormula(string $value, bool $expectedResult): void\n    {\n        $actualResult = DefinedName::testIfFormula($value);\n        self::assertSame($expectedResult, $actualResult);\n    }\n\n    public function testAddDefinedNames(): void\n    {\n        $spreadSheet = new Spreadsheet();\n        $workSheet = $spreadSheet->getActiveSheet();\n\n        $definedNamesForTest = $this->providerRangeOrFormula();\n        foreach ($definedNamesForTest as $key => $definedNameData) {\n            /** @var array{string, bool} $definedNameData */\n            [$value] = $definedNameData;\n            $name = str_replace([' ', '-'], '_', $key);\n            $spreadSheet\n                ->addDefinedName(\n                    DefinedName::createInstance($name, $workSheet, $value)\n                );\n        }\n\n        $allDefinedNames = $spreadSheet->getDefinedNames();\n        self::assertCount(count($definedNamesForTest), $allDefinedNames);\n    }\n\n    public function testGetNamedRanges(): void\n    {\n        $spreadSheet = new Spreadsheet();\n        $workSheet = $spreadSheet->getActiveSheet();\n\n        $rangeOrFormula = [];\n        $definedNamesForTest = $this->providerRangeOrFormula();\n        foreach ($definedNamesForTest as $key => $definedNameData) {\n            /** @var array{string, bool} $definedNameData */\n            [$value, $isFormula] = $definedNameData;\n            $rangeOrFormula[] = !$isFormula;\n            $name = str_replace([' ', '-'], '_', $key);\n            $spreadSheet->addDefinedName(DefinedName::createInstance($name, $workSheet, $value));\n        }\n\n        $allNamedRanges = $spreadSheet->getNamedRanges();\n        self::assertCount(count(array_filter($rangeOrFormula)), $allNamedRanges);\n    }\n\n    public function testGetScopedNamedRange(): void\n    {\n        $rangeName = 'NAMED_RANGE';\n        $globalRangeValue = 'A1';\n        $localRangeValue = 'A2';\n\n        $spreadSheet = new Spreadsheet();\n        $workSheet = $spreadSheet->getActiveSheet();\n\n        $spreadSheet->addDefinedName(DefinedName::createInstance($rangeName, $workSheet, $globalRangeValue));\n        $spreadSheet->addDefinedName(DefinedName::createInstance($rangeName, $workSheet, $localRangeValue, true));\n\n        $localScopedRange = $spreadSheet->getNamedRange($rangeName, $workSheet);\n        self::assertNotNull($localScopedRange);\n        self::assertSame($localRangeValue, $localScopedRange->getValue());\n    }\n\n    public function testGetGlobalNamedRange(): void\n    {\n        $rangeName = 'NAMED_RANGE';\n        $globalRangeValue = 'A1';\n        $localRangeValue = 'A2';\n\n        $spreadSheet = new Spreadsheet();\n        $workSheet1 = $spreadSheet->getActiveSheet();\n        $spreadSheet->createSheet(1);\n        $workSheet2 = $spreadSheet->getSheet(1);\n\n        $spreadSheet->addDefinedName(DefinedName::createInstance($rangeName, $workSheet1, $globalRangeValue));\n        $spreadSheet->addDefinedName(DefinedName::createInstance($rangeName, $workSheet1, $localRangeValue, true));\n\n        $localScopedRange = $spreadSheet->getNamedRange($rangeName, $workSheet2);\n        self::assertNotNull($localScopedRange);\n        self::assertSame($globalRangeValue, $localScopedRange->getValue());\n    }\n\n    public function testGetNamedFormulae(): void\n    {\n        $spreadSheet = new Spreadsheet();\n        $workSheet = $spreadSheet->getActiveSheet();\n\n        $rangeOrFormula = [];\n        $definedNamesForTest = $this->providerRangeOrFormula();\n        foreach ($definedNamesForTest as $key => $definedNameData) {\n            /** @var array{string, bool} $definedNameData */\n            [$value, $isFormula] = $definedNameData;\n            $rangeOrFormula[] = $isFormula;\n            $name = str_replace([' ', '-'], '_', $key);\n            $spreadSheet->addDefinedName(DefinedName::createInstance($name, $workSheet, $value));\n        }\n\n        $allNamedFormulae = $spreadSheet->getNamedFormulae();\n        self::assertCount(count(array_filter($rangeOrFormula)), $allNamedFormulae);\n    }\n\n    public function testGetScopedNamedFormula(): void\n    {\n        $formulaName = 'GERMAN_VAT_RATE';\n        $globalFormulaValue = '=19.0%';\n        $localFormulaValue = '=16.0%';\n\n        $spreadSheet = new Spreadsheet();\n        $workSheet = $spreadSheet->getActiveSheet();\n\n        $spreadSheet->addDefinedName(DefinedName::createInstance($formulaName, $workSheet, $globalFormulaValue));\n        $spreadSheet->addDefinedName(DefinedName::createInstance($formulaName, $workSheet, $localFormulaValue, true));\n\n        $localScopedFormula = $spreadSheet->getNamedFormula($formulaName, $workSheet);\n        self::assertNotNull($localScopedFormula);\n        self::assertSame($localFormulaValue, $localScopedFormula->getValue());\n    }\n\n    public function testGetGlobalNamedFormula(): void\n    {\n        $formulaName = 'GERMAN_VAT_RATE';\n        $globalFormulaValue = '=19.0%';\n        $localFormulaValue = '=16.0%';\n\n        $spreadSheet = new Spreadsheet();\n        $workSheet1 = $spreadSheet->getActiveSheet();\n        $spreadSheet->createSheet(1);\n        $workSheet2 = $spreadSheet->getSheet(1);\n\n        $spreadSheet->addDefinedName(DefinedName::createInstance($formulaName, $workSheet1, $globalFormulaValue));\n        $spreadSheet->addDefinedName(DefinedName::createInstance($formulaName, $workSheet1, $localFormulaValue, true));\n\n        $localScopedFormula = $spreadSheet->getNamedFormula($formulaName, $workSheet2);\n        self::assertNotNull($localScopedFormula);\n        self::assertSame($globalFormulaValue, $localScopedFormula->getValue());\n    }\n\n    public static function providerRangeOrFormula(): array\n    {\n        return [\n            'simple range' => ['A1', false],\n            'simple absolute range' => ['$A$1', false],\n            'simple integer value' => ['42', true],\n            'simple float value' => ['12.5', true],\n            'simple string value' => ['\"HELLO WORLD\"', true],\n            'range with a worksheet name' => ['Sheet2!$A$1', false],\n            'range with a quoted worksheet name' => [\"'Work Sheet #2'!\\$A\\$1:\\$E\\$1\", false],\n            'range with a quoted worksheet name containing quotes' => [\"'Mark''s WorkSheet'!\\$A\\$1:\\$E\\$1\", false],\n            'range with a utf-8 worksheet name' => ['Γειά!$A$1', false],\n            'range with a quoted utf-8 worksheet name' => [\"'Γειά σου Κόσμε'!\\$A\\$1\", false],\n            'range with a quoted worksheet name with quotes in a formula' => [\"'Mark''s WorkSheet'!\\$A\\$1+5\", true],\n            'range with a quoted worksheet name in a formula' => [\"5*'Work Sheet #2'!\\$A\\$1\", true],\n            'multiple ranges with quoted worksheet names with quotes in a formula' => [\"'Mark''s WorkSheet'!\\$A\\$1+'Mark''s WorkSheet'!\\$B\\$2\", true],\n            'named range in a formula' => ['NAMED_RANGE_VALUE+12', true],\n            'named range and range' => ['NAMED_RANGE_VALUE_1,Sheet2!$A$1', false],\n            'range with quoted utf-8 worksheet name and a named range' => [\"NAMED_RANGE_VALUE_1,'Γειά σου Κόσμε'!\\$A\\$1\", false],\n            'composite named range' => ['NAMED_RANGE_VALUE_1,NAMED_RANGE_VALUE_2 NAMED_RANGE_VALUE_3', false],\n            'named ranges in a formula' => ['NAMED_RANGE_VALUE_1/NAMED_RANGE_VALUE_2', true],\n            'utf-8 named range' => ['Γειά', false],\n            'utf-8 named range in a formula' => ['2*Γειά', true],\n            'utf-8 named ranges' => ['Γειά,σου Κόσμε', false],\n            'utf-8 named ranges in a formula' => ['Здравствуй+мир', true],\n        ];\n    }\n\n    public function testEmptyNamedFormula(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Exception::class);\n        $spreadSheet = new Spreadsheet();\n        $workSheet1 = $spreadSheet->getActiveSheet();\n        new NamedFormula('namedformula', $workSheet1);\n    }\n\n    public function testChangeFormula(): void\n    {\n        $spreadSheet = new Spreadsheet();\n        $workSheet1 = $spreadSheet->getActiveSheet();\n        $namedFormula = new NamedFormula('namedformula', $workSheet1, '=1');\n        self::assertEquals('=1', $namedFormula->getFormula());\n        $namedFormula->setFormula('=2');\n        self::assertEquals('=2', $namedFormula->getFormula());\n        $namedFormula->setFormula('');\n        self::assertEquals('=2', $namedFormula->getFormula());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/DefinedNameTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefinedNameTest extends TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n        $this->spreadsheet = new Spreadsheet();\n\n        $this->spreadsheet->getActiveSheet()\n            ->setTitle('Sheet #1');\n\n        $worksheet2 = new Worksheet();\n        $worksheet2->setTitle('Sheet #2');\n        $this->spreadsheet->addSheet($worksheet2);\n\n        $this->spreadsheet->setActiveSheetIndex(0);\n    }\n\n    public function testAddDefinedName(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n\n        self::assertCount(1, $this->spreadsheet->getDefinedNames());\n    }\n\n    public function testAddDuplicateDefinedName(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('FOO', $this->spreadsheet->getActiveSheet(), '=B1')\n        );\n\n        self::assertCount(1, $this->spreadsheet->getDefinedNames());\n        $definedName = $this->spreadsheet->getDefinedName('foo', $this->spreadsheet->getActiveSheet());\n        self::assertNotNull($definedName);\n        self::assertSame('=B1', $definedName->getValue());\n    }\n\n    public function testAddScopedDefinedNameWithSameName(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=B1', true)\n        );\n\n        self::assertCount(2, $this->spreadsheet->getDefinedNames());\n        $definedName1 = $this->spreadsheet->getDefinedName('foo', $this->spreadsheet->getActiveSheet());\n        self::assertNotNull($definedName1);\n        self::assertSame('=A1', $definedName1->getValue());\n\n        $definedName2 = $this->spreadsheet->getDefinedName('foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n        self::assertNotNull($definedName2);\n        self::assertSame('=B1', $definedName2->getValue());\n    }\n\n    public function testRemoveDefinedName(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('Bar', $this->spreadsheet->getActiveSheet(), '=B1')\n        );\n\n        $this->spreadsheet->removeDefinedName('Foo', $this->spreadsheet->getActiveSheet());\n\n        self::assertCount(1, $this->spreadsheet->getDefinedNames());\n    }\n\n    public function testRemoveGlobalDefinedName(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('Any', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        self::assertCount(1, $this->spreadsheet->getDefinedNames());\n\n        $this->spreadsheet->removeDefinedName('Any');\n        self::assertCount(0, $this->spreadsheet->getDefinedNames());\n        $this->spreadsheet->removeDefinedName('Other');\n    }\n\n    public function testRemoveGlobalDefinedNameWhenDuplicateNames(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=B1', true)\n        );\n\n        $this->spreadsheet->removeDefinedName('Foo', $this->spreadsheet->getActiveSheet());\n\n        self::assertCount(1, $this->spreadsheet->getDefinedNames());\n        $definedName = $this->spreadsheet->getDefinedName('foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n        self::assertNotNull($definedName);\n        self::assertSame('=B1', $definedName->getValue());\n    }\n\n    public function testRemoveScopedDefinedNameWhenDuplicateNames(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=B1', true)\n        );\n\n        $this->spreadsheet->removeDefinedName('Foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n\n        self::assertCount(1, $this->spreadsheet->getDefinedNames());\n        $definedName = $this->spreadsheet->getDefinedName('foo');\n        self::assertNotNull($definedName);\n        self::assertSame('=A1', $definedName->getValue());\n    }\n\n    public function testDefinedNameNoWorksheetNoScope(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Exception::class);\n        new NamedRange('xyz');\n    }\n\n    public function testSetAndGetRange(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            DefinedName::createInstance('xyz', $this->spreadsheet->getActiveSheet(), 'A1')\n        );\n\n        $namedRange = $this->spreadsheet->getDefinedName('XYZ');\n        self::assertInstanceOf(NamedRange::class, $namedRange);\n        self::assertEquals('A1', $namedRange->getRange());\n        self::assertEquals('A1', $namedRange->getValue());\n        $namedRange->setRange('A2');\n        self::assertEquals('A2', $namedRange->getValue());\n    }\n\n    public function testChangeWorksheet(): void\n    {\n        $sheet1 = $this->spreadsheet->getSheetByNameOrThrow('Sheet #1');\n        $sheet2 = $this->spreadsheet->getSheetByNameOrThrow('Sheet #2');\n\n        $sheet1->getCell('A1')->setValue(1);\n        $sheet2->getCell('A1')->setValue(2);\n        $namedRange = new NamedRange('xyz', $sheet2, '$A$1');\n        $namedRange->setWorksheet($sheet1);\n        $this->spreadsheet->addNamedRange($namedRange);\n        $sheet1->getCell('B2')->setValue('=XYZ');\n        self::assertEquals(1, $sheet1->getCell('B2')->getCalculatedValue());\n        $sheet2->getCell('B2')->setValue('=XYZ');\n        self::assertEquals(1, $sheet2->getCell('B2')->getCalculatedValue());\n    }\n\n    public function testLocalOnly(): void\n    {\n        $sheet1 = $this->spreadsheet->getSheetByNameOrThrow('Sheet #1');\n        $sheet2 = $this->spreadsheet->getSheetByNameOrThrow('Sheet #2');\n\n        $sheet1->getCell('A1')->setValue(1);\n        $sheet2->getCell('A1')->setValue(2);\n        $namedRange = new NamedRange('abc', $sheet2, '$A$1');\n        $namedRange->setWorksheet($sheet1)->setLocalOnly(true);\n        $this->spreadsheet->addNamedRange($namedRange);\n        $sheet1->getCell('C2')->setValue('=ABC');\n        self::assertEquals(1, $sheet1->getCell('C2')->getCalculatedValue());\n        $sheet2->getCell('C2')->setValue('=ABC');\n        self::assertEquals('#NAME?', $sheet2->getCell('C2')->getCalculatedValue());\n    }\n\n    public function testScope(): void\n    {\n        $sheet1 = $this->spreadsheet->getSheetByNameOrThrow('Sheet #1');\n        $sheet2 = $this->spreadsheet->getSheetByNameOrThrow('Sheet #2');\n\n        $sheet1->getCell('A1')->setValue(1);\n        $sheet2->getCell('A1')->setValue(2);\n        $namedRange = new NamedRange('abc', $sheet2, '$A$1');\n        $namedRange->setScope($sheet1);\n        $this->spreadsheet->addNamedRange($namedRange);\n        $sheet1->getCell('C2')->setValue('=ABC');\n        self::assertEquals(2, $sheet1->getCell('C2')->getCalculatedValue());\n        $sheet2->getCell('C2')->setValue('=ABC');\n        self::assertEquals('#NAME?', $sheet2->getCell('C2')->getCalculatedValue());\n    }\n\n    public function testClone(): void\n    {\n        $sheet1 = $this->spreadsheet->getSheetByNameOrThrow('Sheet #1');\n        $sheet2 = $this->spreadsheet->getSheetByNameOrThrow('Sheet #2');\n\n        $sheet1->getCell('A1')->setValue(1);\n        $sheet2->getCell('A1')->setValue(2);\n        $namedRange = new NamedRange('abc', $sheet2, '$A$1');\n        $namedRangeClone = clone $namedRange;\n        $ss1 = $namedRange->getWorksheet();\n        $ss2 = $namedRangeClone->getWorksheet();\n        self::assertNotNull($ss1);\n        self::assertNotNull($ss2);\n        self::assertNotSame($ss1, $ss2);\n        self::assertEquals($ss1->getTitle(), $ss2->getTitle());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Document/EpochTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Document;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass EpochTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Ods', '1921-03-17 11:30:00Z'],\n            ['Ods', '2021-03-17 11:30:00Z'],\n            ['Ods', '2041-03-17 11:30:00Z'],\n            ['Xls', '1921-03-17 11:30:00Z'],\n            ['Xls', '2021-03-17 11:30:00Z'],\n            ['Xls', '2041-03-17 11:30:00Z'],\n            ['Xlsx', '1921-03-17 11:30:00Z'],\n            ['Xlsx', '2021-03-17 11:30:00Z'],\n            ['Xlsx', '2041-03-17 11:30:00Z'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testSetCreated(string $format, string $timestamp): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $spreadsheet->getProperties()->setCreated($timestamp);\n        $timestamp2 = preg_replace('/1-/', '2-', $timestamp);\n        self::AssertNotEquals($timestamp, $timestamp2);\n        $spreadsheet->getProperties()->setModified($timestamp2);\n        $timestamp3 = preg_replace('/1-/', '3-', $timestamp);\n        self::AssertNotEquals($timestamp, $timestamp3);\n        self::AssertNotEquals($timestamp2, $timestamp3);\n        $spreadsheet->getProperties()->setCustomProperty('cprop', $timestamp3, 'd');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $created = $reloadedSpreadsheet->getProperties()->getCreated();\n        $dt1 = DateTime::createFromFormat('U', \"$created\");\n        $modified = $reloadedSpreadsheet->getProperties()->getModified();\n        $dt2 = DateTime::createFromFormat('U', \"$modified\");\n        if ($dt1 === false || $dt2 === false) {\n            self::fail('Invalid timestamp for created or modified');\n        } else {\n            self::assertSame($timestamp, $dt1->format('Y-m-d H:i:s') . 'Z');\n            self::assertSame($timestamp2, $dt2->format('Y-m-d H:i:s') . 'Z');\n        }\n        if ($format === 'Xlsx' || $format === 'Ods') {\n            // No custom property support in Xls\n            $cprop = $reloadedSpreadsheet->getProperties()->getCustomPropertyValue('cprop');\n            if (!is_numeric($cprop)) {\n                self::fail('Cannot find custom property');\n            } else {\n                $dt3 = DateTime::createFromFormat('U', \"$cprop\");\n                if ($dt3 === false) {\n                    self::fail('Invalid timestamp for custom property');\n                } else {\n                    self::assertSame($timestamp3, $dt3->format('Y-m-d H:i:s') . 'Z');\n                }\n            }\n        }\n    }\n\n    public static function providerFormats2(): array\n    {\n        return [\n            ['Ods'],\n            ['Xls'],\n            ['Xlsx'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats2')]\n    public function testConsistentTimeStamp(string $format): void\n    {\n        $pgmstart = (float) (new DateTime())->format('U');\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $pgmend = (float) (new DateTime())->format('U');\n        self::assertLessThanOrEqual($pgmend, $pgmstart);\n        $created = $reloadedSpreadsheet->getProperties()->getCreated();\n        $modified = $reloadedSpreadsheet->getProperties()->getModified();\n        self::assertLessThanOrEqual($pgmend, $created);\n        self::assertLessThanOrEqual($pgmend, $modified);\n        self::assertLessThanOrEqual($created, $pgmstart);\n        self::assertLessThanOrEqual($modified, $pgmstart);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Document/PropertiesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Document;\n\nuse DateTime;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PropertiesTest extends TestCase\n{\n    private Properties $properties;\n\n    private float $startTime;\n\n    protected function setUp(): void\n    {\n        do {\n            // loop to avoid rare situation where timestamp changes\n            $this->startTime = (float) (new DateTime())->format('U');\n            $this->properties = new Properties();\n            $endTime = (float) (new DateTime())->format('U');\n        } while ($this->startTime !== $endTime);\n    }\n\n    public function testNewInstance(): void\n    {\n        self::assertSame('Unknown Creator', $this->properties->getCreator());\n        self::assertSame('Unknown Creator', $this->properties->getLastModifiedBy());\n        self::assertSame('Untitled Spreadsheet', $this->properties->getTitle());\n        self::assertSame('', $this->properties->getCompany());\n        self::assertEquals($this->startTime, $this->properties->getCreated());\n        self::assertEquals($this->startTime, $this->properties->getModified());\n    }\n\n    public function testSetCreator(): void\n    {\n        $creator = 'Mark Baker';\n\n        $this->properties->setCreator($creator);\n        self::assertSame($creator, $this->properties->getCreator());\n    }\n\n    #[DataProvider('providerCreationTime')]\n    public function testSetCreated(null|int $expectedCreationTime, null|int|string $created): void\n    {\n        if ($expectedCreationTime === null) {\n            do {\n                // loop to avoid rare situation where timestamp changes\n                $expectedCreationTime = (float) (new DateTime())->format('U');\n                $this->properties->setCreated($created);\n                $endTime = (float) (new DateTime())->format('U');\n            } while ($expectedCreationTime !== $endTime);\n        } else {\n            $this->properties->setCreated($created);\n        }\n        self::assertEquals($expectedCreationTime, $this->properties->getCreated());\n    }\n\n    public static function providerCreationTime(): array\n    {\n        return [\n            [null, null],\n            [1615980600, 1615980600],\n            [1615980600, '1615980600'],\n            [1615980600, '2021-03-17 11:30:00Z'],\n        ];\n    }\n\n    public function testSetModifier(): void\n    {\n        $creator = 'Mark Baker';\n\n        $this->properties->setLastModifiedBy($creator);\n        self::assertSame($creator, $this->properties->getLastModifiedBy());\n    }\n\n    #[DataProvider('providerModifiedTime')]\n    public function testSetModified(mixed $expectedModifiedTime, null|int|string $modified): void\n    {\n        if ($expectedModifiedTime === null) {\n            do {\n                // loop to avoid rare situation where timestamp changes\n                $expectedModifiedTime = (float) (new DateTime())->format('U');\n                $this->properties->setModified($modified);\n                $endTime = (float) (new DateTime())->format('U');\n            } while ($expectedModifiedTime !== $endTime);\n        } else {\n            $this->properties->setModified($modified);\n        }\n        self::assertEquals($expectedModifiedTime, $this->properties->getModified());\n    }\n\n    public static function providerModifiedTime(): array\n    {\n        return [\n            [null, null],\n            [1615980600, 1615980600],\n            [1615980600, '1615980600'],\n            [1615980600, '2021-03-17 11:30:00Z'],\n        ];\n    }\n\n    public function testSetTitle(): void\n    {\n        $title = 'My spreadsheet title test';\n\n        $this->properties->setTitle($title);\n        self::assertSame($title, $this->properties->getTitle());\n    }\n\n    public function testSetDescription(): void\n    {\n        $description = 'A test for spreadsheet description';\n\n        $this->properties->setDescription($description);\n        self::assertSame($description, $this->properties->getDescription());\n    }\n\n    public function testSetSubject(): void\n    {\n        $subject = 'Test spreadsheet';\n\n        $this->properties->setSubject($subject);\n        self::assertSame($subject, $this->properties->getSubject());\n    }\n\n    public function testSetKeywords(): void\n    {\n        $keywords = 'Test PHPSpreadsheet Spreadsheet Excel LibreOffice Gnumeric OpenSpreadsheetML OASIS';\n\n        $this->properties->setKeywords($keywords);\n        self::assertSame($keywords, $this->properties->getKeywords());\n    }\n\n    public function testSetCategory(): void\n    {\n        $category = 'Testing';\n\n        $this->properties->setCategory($category);\n        self::assertSame($category, $this->properties->getCategory());\n    }\n\n    public function testSetCompany(): void\n    {\n        $company = 'PHPOffice Suite';\n\n        $this->properties->setCompany($company);\n        self::assertSame($company, $this->properties->getCompany());\n    }\n\n    public function testSetManager(): void\n    {\n        $manager = 'Mark Baker';\n\n        $this->properties->setManager($manager);\n        self::assertSame($manager, $this->properties->getManager());\n    }\n\n    #[DataProvider('providerCustomProperties')]\n    public function testSetCustomProperties(mixed $expectedType, mixed $expectedValue, string $propertyName, null|bool|float|int|string $propertyValue, ?string $propertyType = null): void\n    {\n        if ($propertyType === null) {\n            $this->properties->setCustomProperty($propertyName, $propertyValue);\n        } else {\n            $this->properties->setCustomProperty($propertyName, $propertyValue, $propertyType);\n        }\n        self::assertTrue($this->properties->isCustomPropertySet($propertyName));\n        self::assertSame($expectedType, $this->properties->getCustomPropertyType($propertyName));\n        /** @var float|int|string */\n        $result = $this->properties->getCustomPropertyValue($propertyName);\n        if ($expectedType === Properties::PROPERTY_TYPE_DATE) {\n            $result = Date::formattedDateTimeFromTimestamp(\"$result\", 'Y-m-d', new DateTimeZone('UTC'));\n        }\n        self::assertSame($expectedValue, $result);\n    }\n\n    public static function providerCustomProperties(): array\n    {\n        return [\n            [Properties::PROPERTY_TYPE_STRING, null, 'Editor', null],\n            [Properties::PROPERTY_TYPE_STRING, 'Mark Baker', 'Editor', 'Mark Baker'],\n            [Properties::PROPERTY_TYPE_FLOAT, 1.17, 'Version', 1.17],\n            [Properties::PROPERTY_TYPE_INTEGER, 2, 'Revision', 2],\n            [Properties::PROPERTY_TYPE_BOOLEAN, true, 'Tested', true],\n            [Properties::PROPERTY_TYPE_DATE, '2021-03-17', 'Test Date', '2021-03-17T00:00:00Z', Properties::PROPERTY_TYPE_DATE],\n        ];\n    }\n\n    public function testGetUnknownCustomProperties(): void\n    {\n        $propertyName = 'I DONT EXIST';\n\n        self::assertFalse($this->properties->isCustomPropertySet($propertyName));\n        self::assertNull($this->properties->getCustomPropertyValue($propertyName));\n        self::assertNull($this->properties->getCustomPropertyType($propertyName));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Document/SecurityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Document;\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Security;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\PasswordHasher;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Protection;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass SecurityTest extends AbstractFunctional\n{\n    public function testSecurity(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue('Hello');\n        $security = $spreadsheet->getSecurity();\n        $security->setLockRevision(true);\n        $revisionsPassword = 'revpasswd';\n        $security->setRevisionsPassword($revisionsPassword);\n        $hashedRevisionsPassword = $security->getRevisionsPassword();\n        self::assertNotEquals($revisionsPassword, $hashedRevisionsPassword);\n        $security->setLockWindows(true);\n        $security->setLockStructure(true);\n        $workbookPassword = 'wbpasswd';\n        $security->setWorkbookPassword($workbookPassword);\n        $hashedWorkbookPassword = $security->getWorkbookPassword();\n        self::assertNotEquals($workbookPassword, $hashedWorkbookPassword);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $reloadedSecurity = $reloadedSpreadsheet->getSecurity();\n        self::assertTrue($reloadedSecurity->getLockRevision());\n        self::assertTrue($reloadedSecurity->getLockWindows());\n        self::assertTrue($reloadedSecurity->getLockStructure());\n        self::assertSame($hashedWorkbookPassword, $reloadedSecurity->getWorkbookPassword());\n        self::assertSame($hashedRevisionsPassword, $reloadedSecurity->getRevisionsPassword());\n\n        $reloadedSecurity->setRevisionsPassword($hashedWorkbookPassword, true);\n        self::assertSame($hashedWorkbookPassword, $reloadedSecurity->getRevisionsPassword());\n        $reloadedSecurity->setWorkbookPassword($hashedRevisionsPassword, true);\n        self::assertSame($hashedRevisionsPassword, $reloadedSecurity->getWorkbookPassword());\n    }\n\n    public function testHashRatherThanPassword(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue('Hello');\n        $security = $spreadsheet->getSecurity();\n        $password = '12345';\n        $algorithm = Protection::ALGORITHM_SHA_512;\n        $salt = 'KX7zweex4Ay6KVZu9JU6Gw==';\n        $spinCount = 100_000;\n        $hash = PasswordHasher::hashPassword($password, $algorithm, $salt, $spinCount);\n        $security->setLockStructure(true)\n            ->setWorkbookAlgorithmName($algorithm)\n            ->setWorkbookSaltValue($salt, false)\n            ->setWorkbookSpinCount($spinCount)\n            ->setWorkbookPassword($password);\n        self::assertSame('', $security->getWorkbookPassword());\n        self::assertSame($hash, $security->getWorkbookHashValue());\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSecurity = $reloadedSpreadsheet->getSecurity();\n        self::assertTrue($reloadedSecurity->getLockStructure());\n        self::assertSame('', $reloadedSecurity->getWorkbookPassword());\n        self::assertSame($hash, $reloadedSecurity->getWorkbookHashValue());\n        self::assertSame($algorithm, $reloadedSecurity->getWorkbookAlgorithmName());\n        self::assertSame($salt, $reloadedSecurity->getWorkbookSaltValue());\n        self::assertSame($spinCount, $reloadedSecurity->getWorkbookSpinCount());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testRevisionsHashRatherThanPassword(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue('Hello');\n        $security = $spreadsheet->getSecurity();\n        $password = '54321';\n        $algorithm = Protection::ALGORITHM_SHA_512;\n        $salt = 'ddXHG3GsaI5PnaiaVnFGkw==';\n        $spinCount = 100_000;\n        $hash = PasswordHasher::hashPassword($password, $algorithm, $salt, $spinCount);\n        $security->setLockRevision(true)\n            ->setRevisionsAlgorithmName($algorithm)\n            ->setRevisionsSaltValue($salt, false)\n            ->setRevisionsSpinCount($spinCount)\n            ->setRevisionsPassword($password);\n        self::assertSame('', $security->getRevisionsPassword());\n        self::assertSame($hash, $security->getRevisionsHashValue());\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSecurity = $reloadedSpreadsheet->getSecurity();\n        self::assertTrue($reloadedSecurity->getLockRevision());\n        self::assertSame('', $reloadedSecurity->getRevisionsPassword());\n        self::assertSame($hash, $reloadedSecurity->getRevisionsHashValue());\n        self::assertSame($algorithm, $reloadedSecurity->getRevisionsAlgorithmName());\n        self::assertSame($salt, $reloadedSecurity->getRevisionsSaltValue());\n        self::assertSame($spinCount, $reloadedSecurity->getRevisionsSpinCount());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerLocks(): array\n    {\n        return [\n            [false, false, false],\n            [false, false, true],\n            [false, true, false],\n            [false, true, true],\n            [true, false, false],\n            [true, false, true],\n            [true, true, false],\n            [true, true, true],\n        ];\n    }\n\n    #[DataProvider('providerLocks')]\n    public function testLocks(bool $revision, bool $windows, bool $structure): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue('Hello');\n        $security = $spreadsheet->getSecurity();\n        $security->setLockRevision($revision);\n        $security->setLockWindows($windows);\n        $security->setLockStructure($structure);\n        $enabled = $security->isSecurityEnabled();\n        self::assertSame($enabled, $revision || $windows || $structure);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $reloadedSecurity = $reloadedSpreadsheet->getSecurity();\n        self::assertSame($revision, $reloadedSecurity->getLockRevision());\n        self::assertSame($windows, $reloadedSecurity->getLockWindows());\n        self::assertSame($structure, $reloadedSecurity->getLockStructure());\n    }\n\n    public function testBadAlgorithm(): void\n    {\n        $security = new Security();\n        $password = '12345';\n        $algorithm = 'SHA-513';\n        $salt = 'KX7zweex4Ay6KVZu9JU6Gw==';\n        $spinCount = 100_000;\n\n        try {\n            $hash = PasswordHasher::hashPassword($password, $algorithm, $salt, $spinCount);\n            self::fail('hashPassword should have thrown exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unsupported password algorithm', $e->getMessage());\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/DocumentGeneratorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Category as Cat;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations;\nuse PhpOffice\\PhpSpreadsheetInfra\\DocumentGenerator;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse UnexpectedValueException;\n\nclass DocumentGeneratorTest extends TestCase\n{\n    private static bool $succeededByName = false;\n\n    private static bool $succeededByCategory = false;\n\n    /** @param array<string, array{category: string, functionCall: array<string>|string, argumentCount: string, passCellReference?: bool, passByReference?: array<bool>, custom?: bool}> $phpSpreadsheetFunctions */\n    #[DataProvider('providerGenerateFunctionListByName')]\n    public function testGenerateFunctionListByName(array $phpSpreadsheetFunctions, string $expected): void\n    {\n        self::assertEquals($expected, DocumentGenerator::generateFunctionListByName($phpSpreadsheetFunctions));\n        self::$succeededByName = true;\n    }\n\n    /** @param array<string, array{category: string, functionCall: array<string>|string, argumentCount: string, passCellReference?: bool, passByReference?: array<bool>, custom?: bool}> $phpSpreadsheetFunctions */\n    #[DataProvider('providerGenerateFunctionListByCategory')]\n    public function testGenerateFunctionListByCategory(array $phpSpreadsheetFunctions, string $expected): void\n    {\n        self::assertEquals($expected, DocumentGenerator::generateFunctionListByCategory($phpSpreadsheetFunctions));\n        self::$succeededByCategory = true;\n    }\n\n    public static function providerGenerateFunctionListByName(): array\n    {\n        return [\n            [\n                [\n                    'ABS' => ['category' => Cat::CATEGORY_MATH_AND_TRIG, 'functionCall' => 'abs', 'argumentCount' => '1'],\n                    'AND' => ['category' => Cat::CATEGORY_LOGICAL, 'functionCall' => [Operations::class, 'logicalAnd'], 'argumentCount' => '2'],\n                    'IFS' => ['category' => Cat::CATEGORY_LOGICAL, 'functionCall' => [Functions::class, 'DUMMY'], 'argumentCount' => '3'],\n                ],\n                <<<'EXPECTED'\n                    # Function list by name\n\n                    A more compact list can be found [here](./function-list-by-name-compact.md)\n\n\n                    ## A\n\n                    Excel Function           | Category                       | PhpSpreadsheet Function\n                    -------------------------|--------------------------------|--------------------------------------\n                    ABS                      | CATEGORY_MATH_AND_TRIG         | abs\n                    AND                      | CATEGORY_LOGICAL               | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::logicalAnd\n\n                    ## I\n\n                    Excel Function           | Category                       | PhpSpreadsheet Function\n                    -------------------------|--------------------------------|--------------------------------------\n                    IFS                      | CATEGORY_LOGICAL               | **Not yet Implemented**\n\n                    EXPECTED\n\n            ],\n        ];\n    }\n\n    public static function providerGenerateFunctionListByCategory(): array\n    {\n        return [\n            [\n                [\n                    'ABS' => ['category' => Cat::CATEGORY_MATH_AND_TRIG, 'functionCall' => 'abs', 'argumentCount' => '1'],\n                    'AND' => ['category' => Cat::CATEGORY_LOGICAL, 'functionCall' => [Operations::class, 'logicalAnd'], 'argumentCount' => '2'],\n                    'IFS' => ['category' => Cat::CATEGORY_LOGICAL, 'functionCall' => [Functions::class, 'DUMMY'], 'argumentCount' => '3'],\n                ],\n                <<<'EXPECTED'\n                    # Function list by category\n\n                    ## CATEGORY_CUBE\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_DATABASE\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_DATE_AND_TIME\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_ENGINEERING\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_FINANCIAL\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_INFORMATION\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_LOGICAL\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n                    AND                      | \\PhpOffice\\PhpSpreadsheet\\Calculation\\Logical\\Operations::logicalAnd\n                    IFS                      | **Not yet Implemented**\n\n                    ## CATEGORY_LOOKUP_AND_REFERENCE\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_MATH_AND_TRIG\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n                    ABS                      | abs\n\n                    ## CATEGORY_STATISTICAL\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_TEXT_AND_DATA\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_WEB\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_UNCATEGORISED\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    ## CATEGORY_MICROSOFT_INTERNAL\n\n                    Excel Function           | PhpSpreadsheet Function\n                    -------------------------|--------------------------------------\n\n                    EXPECTED\n\n            ],\n        ];\n    }\n\n    public function testGenerateFunctionBadArray(): void\n    {\n        $this->expectException(UnexpectedValueException::class);\n        $phpSpreadsheetFunctions = [\n            'ABS' => ['category' => Cat::CATEGORY_MATH_AND_TRIG, 'functionCall' => 1],\n        ];\n        // Phpstan is right to complain about next line,\n        // but we still need to make sure it is handled correctly at run time.\n        DocumentGenerator::generateFunctionListByName(\n            $phpSpreadsheetFunctions //* @phpstan-ignore-line\n        );\n    }\n\n    public function testGenerateDocuments(): void\n    {\n        if (!self::$succeededByName || !self::$succeededByCategory) {\n            self::markTestSkipped('Not run because prior test failed');\n        }\n        $directory = 'docs/references/';\n        $phpSpreadsheetFunctions = Calculation::getFunctions();\n        ksort($phpSpreadsheetFunctions);\n\n        self::assertNotFalse(file_put_contents(\n            $directory . 'function-list-by-category.md',\n            DocumentGenerator::generateFunctionListByCategory(\n                $phpSpreadsheetFunctions\n            )\n        ));\n        self::assertNotFalse(file_put_contents(\n            $directory . 'function-list-by-name.md',\n            DocumentGenerator::generateFunctionListByName(\n                $phpSpreadsheetFunctions\n            )\n        ));\n        self::assertNotFalse(file_put_contents(\n            $directory . 'function-list-by-name-compact.md',\n            DocumentGenerator::generateFunctionListByName(\n                $phpSpreadsheetFunctions,\n                true\n            )\n        ));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Features/AutoFilter/Xlsx/BasicLoadTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Features\\AutoFilter\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BasicLoadTest extends TestCase\n{\n    public function testLoadAutoFilter(): void\n    {\n        $filename = 'tests/data/Features/AutoFilter/Xlsx/AutoFilter_Basic.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        self::assertSame('A1:D57', $worksheet->getAutoFilter()->getRange());\n        self::assertSame(2, $worksheet->getAutoFilter()->getColumn('C')->ruleCount());\n        self::assertSame(\n            Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n            $worksheet->getAutoFilter()->getColumn('C')->getRules()[0]->getOperator()\n        );\n        self::assertSame('UK', $worksheet->getAutoFilter()->getColumn('C')->getRules()[0]->getValue());\n        self::assertSame(\n            Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n            $worksheet->getAutoFilter()->getColumn('C')->getRules()[1]->getOperator()\n        );\n        self::assertSame('United States', $worksheet->getAutoFilter()->getColumn('C')->getRules()[1]->getValue());\n        self::assertSame(2, $worksheet->getAutoFilter()->getColumn('D')->ruleCount());\n        self::assertSame(\n            Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN,\n            $worksheet->getAutoFilter()->getColumn('D')->getRules()[0]->getOperator()\n        );\n        self::assertSame('650', $worksheet->getAutoFilter()->getColumn('D')->getRules()[0]->getValue());\n        self::assertSame(\n            Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN,\n            $worksheet->getAutoFilter()->getColumn('D')->getRules()[1]->getOperator()\n        );\n        self::assertSame('800', $worksheet->getAutoFilter()->getColumn('D')->getRules()[1]->getValue());\n    }\n\n    public function testLoadOffice365AutoFilter(): void\n    {\n        $filename = 'tests/data/Features/AutoFilter/Xlsx/AutoFilter_Basic_Office365.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $tables = $worksheet->getTableCollection();\n        self::assertCount(1, $tables);\n\n        $table = $tables->offsetGet(0);\n        self::assertInstanceOf(Table::class, $table);\n\n        self::assertSame('A1:D57', $table->getAutoFilter()->getRange());\n        self::assertSame(2, $table->getAutoFilter()->getColumn('C')->ruleCount());\n        self::assertSame(\n            Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n            $table->getAutoFilter()->getColumn('C')->getRules()[0]->getOperator()\n        );\n        self::assertSame('UK', $table->getAutoFilter()->getColumn('C')->getRules()[0]->getValue());\n        self::assertSame(\n            Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n            $table->getAutoFilter()->getColumn('C')->getRules()[1]->getOperator()\n        );\n        self::assertSame('United States', $table->getAutoFilter()->getColumn('C')->getRules()[1]->getValue());\n        self::assertSame(2, $table->getAutoFilter()->getColumn('D')->ruleCount());\n        self::assertSame(\n            Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN,\n            $table->getAutoFilter()->getColumn('D')->getRules()[0]->getOperator()\n        );\n        self::assertSame('650', $table->getAutoFilter()->getColumn('D')->getRules()[0]->getValue());\n        self::assertSame(\n            Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN,\n            $table->getAutoFilter()->getColumn('D')->getRules()[1]->getOperator()\n        );\n        self::assertSame('800', $table->getAutoFilter()->getColumn('D')->getRules()[1]->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/FloatImprecisionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FloatImprecisionTest extends TestCase\n{\n    #[DataProvider('providerFloats')]\n    public function testCompareFloats(float $float1, float $float2): void\n    {\n        self::assertSame($float1, $float2);\n    }\n\n    public static function providerFloats(): array\n    {\n        return [\n            [12345.6789, 12345.67890000000079],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/AbstractFunctional.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * Base class for functional test to write and reload file on disk across different formats.\n */\nabstract class AbstractFunctional extends TestCase\n{\n    /**\n     * Write spreadsheet to disk, reload and return it.\n     */\n    protected function writeAndReload(Spreadsheet $spreadsheet, string $format, ?callable $readerCustomizer = null, ?callable $writerCustomizer = null): Spreadsheet\n    {\n        $filename = File::temporaryFilename();\n\n        try {\n            $writer = IOFactory::createWriter($spreadsheet, $format);\n            if ($writerCustomizer) {\n                $writerCustomizer($writer);\n            }\n            $writer->save($filename);\n\n            $reader = IOFactory::createReader($format);\n            if ($readerCustomizer) {\n                $readerCustomizer($reader);\n            }\n            $reloadedSpreadsheet = $reader->load($filename);\n        } finally {\n            @unlink($filename);\n        }\n\n        return $reloadedSpreadsheet;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ActiveSheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\n\nclass ActiveSheetTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Xls'],\n        ];\n    }\n\n    /**\n     * Test load file with correct active sheet.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testActiveSheet(string $format): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $spreadsheet->setActiveSheetIndex(0)\n            ->setTitle('Test1')\n            ->setCellValue('D1', 1)\n            ->setCellValue('D2', 2)\n            ->setCellValue('D3', 3)\n            ->setCellValue('D4', 4)\n            ->setCellValue('D5', '=SUM(D1:D4)')\n            ->setSelectedCell('B2');\n\n        $spreadsheet->createSheet(1);\n\n        $spreadsheet->setActiveSheetIndex(1)\n            ->setTitle('Test2')\n            ->setCellValue('D1', 4)\n            ->setCellValue('E1', 3)\n            ->setCellValue('F1', 2)\n            ->setCellValue('G1', 1)\n            ->setCellValue('H1', '=SUM(D1:G4)')\n            ->setSelectedCells('A1:B2');\n\n        $spreadsheet->createSheet(2);\n\n        $spreadsheet->setActiveSheetIndex(2)\n            ->setCellValue('F1', 2)\n            ->getCell('F1')\n            ->getStyle()\n            ->getProtection()\n            ->setHidden(Protection::PROTECTION_PROTECTED);\n        $spreadsheet->setActiveSheetIndex(2)\n            ->setTitle('Test3')\n            ->setCellValue('A1', 4)\n            ->setCellValue('B1', 3)\n            ->setCellValue('C1', 2)\n            ->setCellValue('D1', 1)\n            ->setCellValue('E1', '=SUM(A1:D4)')\n            ->setSelectedCells('A1:D1');\n\n        $spreadsheet->setActiveSheetIndex(1);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n\n        // Original object.\n        self::assertSame(1, $spreadsheet->getActiveSheetIndex());\n\n        // Saved and reloaded file.\n        self::assertSame(1, $reloadedSpreadsheet->getActiveSheetIndex());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ArrayFunctionsCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFunctionsCellTest extends TestCase\n{\n    public function testArrayAndNonArrayOutput(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                [1.0, 0.0, 1.0],\n                [0.0, 2.0, 0.0],\n                [0.0, 0.0, 1.0],\n            ],\n            strictNullComparison: true\n        );\n        $sheet->setCellValue('E1', '=MINVERSE(A1:C3)');\n        $sheet->setCellValue('I1', '=E1#');\n        $sheet->setCellValue('M1', '=MMULT(E1#,I1#)');\n        $sheet->setCellValue('E6', '=SUM(E1)');\n        $sheet->setCellValue('E7', '=SUM(SINGLE(E1))');\n        $sheet->setCellValue('E8', '=SUM(E1#)');\n        $sheet->setCellValue('I6', '=E1+I1');\n        $sheet->setCellValue('J6', '=E1#+I1#');\n\n        $expectedE1 = [\n            [1.0, 0.0, -1.0],\n            [0.0, 0.5, 0.0],\n            [0.0, 0.0, 1.0],\n        ];\n        self::assertSame($expectedE1, $sheet->getCell('E1')->getCalculatedValue(), 'MINVERSE function');\n        self::assertSame($expectedE1, $sheet->getCell('I1')->getCalculatedValue(), 'Assignment with spill operator');\n\n        $expectedM1 = [\n            [1.0, 0.0, -2.0],\n            [0.0, 0.25, 0.0],\n            [0.0, 0.0, 1.0],\n        ];\n        self::assertSame($expectedM1, $sheet->getCell('M1')->getCalculatedValue(), 'MMULT with 2 spill operators');\n\n        self::assertSame(1.0, $sheet->getCell('E6')->getCalculatedValue(), 'SUM referring to anchor cell');\n        self::assertSame(1.0, $sheet->getCell('E7')->getCalculatedValue(), 'SUM referring to anchor cell wrapped in Single');\n        self::assertSame(1.5, $sheet->getCell('E8')->getCalculatedValue(), 'SUM referring to anchor cell with Spill Operator');\n\n        self::assertSame(2.0, $sheet->getCell('I6')->getCalculatedValue(), 'addition operator for 2 anchor cells');\n        $expectedJ6 = [\n            [2.0, 0.0, -2.0],\n            [0.0, 1.0, 0.0],\n            [0.0, 0.0, 2.0],\n        ];\n        self::assertSame($expectedJ6, $sheet->getCell('J6')->getCalculatedValue(), 'addition operator for 2 anchor cells with Spill operators');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ArrayFunctionsSpillTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFunctionsSpillTest extends TestCase\n{\n    public function testArrayOutput(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        $calculation->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B5', 'OCCUPIED');\n\n        $columnArray = [[1], [2], [2], [2], [3], [3], [3], [3], [4], [4], [4], [5]];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('B1', '=UNIQUE(A1:A12)');\n        $expected = [['#SPILL!'], [null], [null], [null], ['OCCUPIED']];\n        self::assertSame($expected, $sheet->rangeToArray('B1:B5', calculateFormulas: true, formatData: false, reduceArrays: true), 'spill with B5 unchanged');\n        self::assertFalse($sheet->isCellInSpillRange('B1'));\n        self::assertFalse($sheet->isCellInSpillRange('B2'));\n        self::assertFalse($sheet->isCellInSpillRange('B3'));\n        self::assertFalse($sheet->isCellInSpillRange('B4'));\n        self::assertFalse($sheet->isCellInSpillRange('B5'));\n        self::assertFalse($sheet->isCellInSpillRange('Z9'));\n        $calculation->clearCalculationCache();\n\n        $columnArray = [[1], [2], [2], [2], [3], [3], [3], [3], [4], [4], [4], [4]];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('B1', '=UNIQUE(A1:A12)');\n        $expected = [[1], [2], [3], [4], ['OCCUPIED']];\n        self::assertSame($expected, $sheet->rangeToArray('B1:B5', calculateFormulas: true, formatData: false, reduceArrays: true), 'fill B1:B4 with B5 unchanged');\n        self::assertFalse($sheet->isCellInSpillRange('B1'));\n        self::assertTrue($sheet->isCellInSpillRange('B2'));\n        self::assertTrue($sheet->isCellInSpillRange('B3'));\n        self::assertTrue($sheet->isCellInSpillRange('B4'));\n        self::assertFalse($sheet->isCellInSpillRange('B5'));\n        self::assertFalse($sheet->isCellInSpillRange('Z9'));\n        $calculation->clearCalculationCache();\n\n        $columnArray = [[1], [3], [3], [3], [3], [3], [3], [3], [3], [3], [3], [3]];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('B1', '=UNIQUE(A1:A12)');\n        $expected = [[1], [3], [null], [null], ['OCCUPIED']];\n        self::assertSame($expected, $sheet->rangeToArray('B1:B5', calculateFormulas: true, formatData: false, reduceArrays: true), 'fill B1:B2(changed from prior) set B3:B4 to null B5 unchanged');\n        self::assertFalse($sheet->isCellInSpillRange('B1'));\n        self::assertTrue($sheet->isCellInSpillRange('B2'));\n        self::assertFalse($sheet->isCellInSpillRange('B3'));\n        self::assertFalse($sheet->isCellInSpillRange('B4'));\n        self::assertFalse($sheet->isCellInSpillRange('B5'));\n        self::assertFalse($sheet->isCellInSpillRange('Z9'));\n        $calculation->clearCalculationCache();\n\n        $columnArray = [[1], [2], [3], [3], [3], [3], [3], [3], [3], [3], [3], [3]];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('B1', '=UNIQUE(A1:A12)');\n        $expected = [[1], [2], [3], [null], ['OCCUPIED']];\n        self::assertSame($expected, $sheet->rangeToArray('B1:B5', calculateFormulas: true, formatData: false, reduceArrays: true), 'fill B1:B3(B2 changed from prior) set B4 to null B5 unchanged');\n        $calculation->clearCalculationCache();\n\n        $columnArray = [[1], [2], [2], [2], [3], [3], [3], [3], [4], [4], [4], [5]];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('B1', '=UNIQUE(A1:A12)');\n        $expected = [['#SPILL!'], [null], [null], [null], ['OCCUPIED']];\n        self::assertSame($expected, $sheet->rangeToArray('B1:B5', calculateFormulas: true, formatData: false, reduceArrays: true), 'spill clears B2:B4 with B5 unchanged');\n        $calculation->clearCalculationCache();\n\n        $sheet->setCellValue('Z1', '=SORT({7;5;1})');\n        $sheet->getCell('Z1')->getCalculatedValue(); // populates Z1-Z3\n        self::assertTrue($sheet->isCellInSpillRange('Z2'));\n        self::assertTrue($sheet->isCellInSpillRange('Z3'));\n        self::assertFalse($sheet->isCellInSpillRange('Z4'));\n        self::assertFalse($sheet->isCellInSpillRange('Z1'));\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNonArrayOutput(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_VALUE\n            );\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B5', 'OCCUPIED');\n\n        $columnArray = [[1], [2], [2], [2], [3], [3], [3], [3], [4], [4], [4], [4]];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('B1', '=UNIQUE(A1:A12)');\n        $expected = [[1], [null], [null], [null], ['OCCUPIED']];\n        self::assertSame($expected, $sheet->rangeToArray('B1:B5', calculateFormulas: true, formatData: false, reduceArrays: true), 'only fill B1');\n        self::assertFalse($sheet->isCellInSpillRange('B1'));\n        self::assertFalse($sheet->isCellInSpillRange('B2'));\n        self::assertFalse($sheet->isCellInSpillRange('B3'));\n        self::assertFalse($sheet->isCellInSpillRange('B4'));\n        self::assertFalse($sheet->isCellInSpillRange('B5'));\n        self::assertFalse($sheet->isCellInSpillRange('Z9'));\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSpillOperator(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            ['Product', 'Quantity', 'Price', 'Cost'],\n            ['Apple', 20, 0.75],\n            ['Kiwi', 8, 0.80],\n            ['Lemon', 12, 0.70],\n            ['Mango', 5, 1.75],\n            ['Pineapple', 2, 2.00],\n            ['Total'],\n        ]);\n        $sheet->getCell('D2')->setValue('=B2:B6*C2:C6');\n        $sheet->getCell('D7')->setValue('=SUM(D2#)');\n        $sheet->getStyle('A1:D1')->getFont()->setBold(true);\n        $sheet->getStyle('C2:D6')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD);\n        self::assertEqualsWithDelta(\n            [\n                ['Cost'],\n                [15.0],\n                [6.4],\n                [8.4],\n                [8.75],\n                [4.0],\n                [42.55],\n            ],\n            $sheet->rangeToArray('D1:D7', calculateFormulas: true, formatData: false, reduceArrays: true),\n            1.0e-10\n        );\n        $sheet->getCell('G2')->setValue('=B2#');\n        self::assertSame('#REF!', $sheet->getCell('G2')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ColumnWidthTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ColumnWidthTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Xlsx'],\n        ];\n    }\n\n    #[DataProvider('providerFormats')]\n    public function testReadColumnWidth(string $format): void\n    {\n        // create new sheet with column width\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'Hello World !');\n        $sheet->getColumnDimension('A')->setWidth(20);\n        $this->assertColumn($spreadsheet);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $this->assertColumn($reloadedSpreadsheet);\n    }\n\n    private function assertColumn(Spreadsheet $spreadsheet): void\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $columnDimensions = $sheet->getColumnDimensions();\n\n        self::assertArrayHasKey('A', $columnDimensions);\n        $column = array_shift($columnDimensions);\n        self::assertEquals(20, $column->getWidth());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/CommentsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\n\nclass CommentsTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Html'],\n            ['Xlsx'],\n            ['Ods'],\n        ];\n    }\n\n    /**\n     * Test load file with comment in sheet to load proper\n     * count of comments in correct coords.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testComments(string $format): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $spreadsheet->getActiveSheet()->getCell('E10')->setValue('Comment');\n        $spreadsheet->getActiveSheet()\n            ->getComment('E10')\n            ->getText()\n            ->createText('Comment to test');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n\n        $sheet = $reloadedSpreadsheet->getSheet(0);\n        $commentsLoaded = $sheet->getComments();\n        self::assertCount(1, $commentsLoaded);\n\n        $commentCoordinate = key($commentsLoaded);\n        self::assertSame('E10', $commentCoordinate);\n        self::assertSame('Comment', $sheet->getCell('E10')->getValue());\n        $comment = $commentsLoaded[$commentCoordinate];\n        self::assertSame('Comment to test', (string) $comment);\n        $commentClone = clone $comment;\n        self::assertEquals($comment, $commentClone);\n        self::assertNotSame($comment, $commentClone);\n        if ($format === 'Xlsx') {\n            self::assertSame('bc7bcec8f676a333dae65c945cf8dace', $comment->getHashCode(), 'changed due to addition of theme to fillColor');\n            self::assertSame(Alignment::HORIZONTAL_GENERAL, $comment->getAlignment());\n            $comment->setAlignment(Alignment::HORIZONTAL_RIGHT);\n            self::assertSame(Alignment::HORIZONTAL_RIGHT, $comment->getAlignment());\n        }\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ConditionalStopIfTrueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass ConditionalStopIfTrueTest extends AbstractFunctional\n{\n    const COLOR_GREEN = 'FF99FF66';\n    const COLOR_RED = 'FFFF5050';\n\n    public static function providerFormats(): array\n    {\n        return [\n            ['Xlsx'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testConditionalStopIfTrue(string $format): void\n    {\n        $pCoordinate = 'A1:A3';\n\n        // if blank cell -> no styling\n        $condition0 = new \\PhpOffice\\PhpSpreadsheet\\Style\\Conditional();\n        $condition0->setConditionType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::CONDITION_EXPRESSION);\n        $condition0->addCondition('LEN(TRIM(A1))=0');\n        $condition0->setStopIfTrue(true); // ! stop here\n\n        // if value below 0.6 (matches also blank cells!) -> red background\n        $condition1 = new \\PhpOffice\\PhpSpreadsheet\\Style\\Conditional();\n        $condition1->setConditionType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::OPERATOR_LESSTHAN);\n        $condition1->addCondition(0.6);\n        $condition1->getStyle()->getFill()\n            ->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID)\n            ->getStartColor()->setARGB(self::COLOR_RED);\n\n        // if value above 0.6 -> green background\n        $condition2 = new \\PhpOffice\\PhpSpreadsheet\\Style\\Conditional();\n        $condition2->setConditionType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::CONDITION_CELLIS);\n        $condition2->setOperatorType(\\PhpOffice\\PhpSpreadsheet\\Style\\Conditional::OPERATOR_GREATERTHAN);\n        $condition2->addCondition(0.6);\n        $condition2->getStyle()->getFill()\n            ->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID)\n            ->getStartColor()->setARGB(self::COLOR_GREEN);\n\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue(0.7);\n        $spreadsheet->getActiveSheet()->getCell('A2')->setValue('');\n        $spreadsheet->getActiveSheet()->getCell('A3')->setValue(0.4);\n\n        // put all three conditions in sheet\n        $conditionalStyles = [];\n        array_push($conditionalStyles, $condition0);\n        array_push($conditionalStyles, $condition1);\n        array_push($conditionalStyles, $condition2);\n        $spreadsheet->getActiveSheet()->setConditionalStyles($pCoordinate, $conditionalStyles);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n\n        // see if we successfully written \"StopIfTrue\"\n        $newConditionalStyles = $reloadedSpreadsheet->getActiveSheet()->getConditionalStyles($pCoordinate);\n        self::assertTrue($newConditionalStyles[0]->getStopIfTrue(), 'StopIfTrue should be set (=true) on first condition');\n        self::assertFalse($newConditionalStyles[1]->getStopIfTrue(), 'StopIfTrue should not be set (=false) on second condition');\n        self::assertFalse($newConditionalStyles[2]->getStopIfTrue(), 'StopIfTrue should not be set (=false) on third condition');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ConditionalTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\n\nclass ConditionalTextTest extends AbstractFunctional\n{\n    const COLOR_GREEN = 'FF99FF66';\n    const COLOR_RED = 'FFFF5050';\n    const COLOR_BLUE = 'FF5050FF';\n    const COLOR_YELLOW = 'FFFFFF50';\n\n    public function testConditionalText(): void\n    {\n        $format = 'Xlsx';\n        $spreadsheet = new Spreadsheet();\n\n        $conditionalStyles = [];\n        // if text contains 'anywhere' - red background\n        $condition0 = new Conditional();\n        $condition0->setConditionType(Conditional::CONDITION_CONTAINSTEXT);\n        $condition0->setOperatorType(Conditional::CONDITION_CONTAINSTEXT);\n        $condition0->setText('anywhere');\n        $condition0->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getEndColor()->setARGB(self::COLOR_RED);\n        array_push($conditionalStyles, $condition0);\n\n        // if text contains 'Left' on left - green background\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CONTAINSTEXT);\n        $condition1->setOperatorType(Conditional::OPERATOR_BEGINSWITH);\n        $condition1->setText('Left');\n        $condition1->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getEndColor()->setARGB(self::COLOR_GREEN);\n        array_push($conditionalStyles, $condition1);\n\n        // if text contains 'right' on right - blue background\n        $condition2 = new Conditional();\n        $condition2->setConditionType(Conditional::CONDITION_CONTAINSTEXT);\n        $condition2->setOperatorType(Conditional::OPERATOR_ENDSWITH);\n        $condition2->setText('right');\n        $condition2->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getEndColor()->setARGB(self::COLOR_BLUE);\n        array_push($conditionalStyles, $condition2);\n\n        // if text contains no spaces - yellow background\n        $condition3 = new Conditional();\n        $condition3->setConditionType(Conditional::CONDITION_CONTAINSTEXT);\n        $condition3->setOperatorType(Conditional::OPERATOR_NOTCONTAINS);\n        $condition3->setText(' ');\n        $condition3->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getEndColor()->setARGB(self::COLOR_YELLOW);\n        array_push($conditionalStyles, $condition3);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B1', 'This should match anywhere, right?');\n        $sheet->setCellValue('B2', 'This should match nowhere, right?');\n        $sheet->setCellValue('B3', 'Left match');\n        $sheet->setCellValue('B4', 'Match on right');\n        $sheet->setCellValue('B5', 'nospaces');\n        $xpCoordinate = 'B1:B5';\n\n        $spreadsheet->getActiveSheet()->setConditionalStyles($xpCoordinate, $conditionalStyles);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n\n        // see if we successfully written conditional text elements\n        $newConditionalStyles = $reloadedSpreadsheet->getActiveSheet()->getConditionalStyles($xpCoordinate);\n        $cnt = count($conditionalStyles);\n        for ($i = 0; $i < $cnt; ++$i) {\n            self::assertEquals(\n                $conditionalStyles[$i]->getConditionType(),\n                $newConditionalStyles[$i]->getConditionType(),\n                \"Failure on condition type $i\"\n            );\n            self::assertEquals(\n                $conditionalStyles[$i]->getOperatorType(),\n                $newConditionalStyles[$i]->getOperatorType(),\n                \"Failure on operator type $i\"\n            );\n            self::assertEquals(\n                $conditionalStyles[$i]->getText(),\n                $newConditionalStyles[$i]->getText(),\n                \"Failure on text $i\"\n            );\n            $filCond = $conditionalStyles[$i]->getStyle()->getFill();\n            $newCond = $newConditionalStyles[$i]->getStyle()->getFill();\n            self::assertEquals(\n                $filCond->getFillType(),\n                $newCond->getFillType(),\n                \"Failure on fill type $i\"\n            );\n            self::assertEquals(\n                $filCond->getEndColor()->getARGB(),\n                $newCond->getEndColor()->getARGB(),\n                \"Failure on end color $i\"\n            );\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\n\nclass DrawingImageHyperlinkTest extends AbstractFunctional\n{\n    public function testDrawingImageHyperlinkTest(): void\n    {\n        $gdImage = @imagecreatetruecolor(120, 20);\n        $textColor = ($gdImage === false) ? false : imagecolorallocate($gdImage, 255, 255, 255);\n        if ($gdImage === false || $textColor === false) {\n            self::fail('imagecreatetruecolor or imagecolorallocate failed');\n        } else {\n            $baseUrl = 'https://github.com/PHPOffice/PhpSpreadsheet';\n            $spreadsheet = new Spreadsheet();\n\n            $aSheet = $spreadsheet->getActiveSheet();\n            imagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor);\n\n            $drawing = new MemoryDrawing();\n            $drawing->setName('In-Memory image 1');\n            $drawing->setDescription('In-Memory image 1');\n            $drawing->setCoordinates('A1');\n            $drawing->setImageResource($gdImage);\n            $drawing->setRenderingFunction(\n                MemoryDrawing::RENDERING_JPEG\n            );\n            $drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT);\n            $drawing->setHeight(36);\n            $hyperLink = new Hyperlink($baseUrl, 'test image');\n            $drawing->setHyperlink($hyperLink);\n            $drawing->setWorksheet($aSheet);\n\n            $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n            $spreadsheet->disconnectWorksheets();\n\n            foreach ($reloadedSpreadsheet->getActiveSheet()->getDrawingCollection() as $pDrawing) {\n                $getHyperlink = $pDrawing->getHyperlink();\n                if ($getHyperlink === null) {\n                    self::fail('getHyperlink returned null');\n                } else {\n                    self::assertEquals('https://github.com/PHPOffice/PhpSpreadsheet', $getHyperlink->getUrl(), 'functional test drawing hyperlink');\n                }\n            }\n            $reloadedSpreadsheet->disconnectWorksheets();\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/EnclosureTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass EnclosureTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Html'],\n            ['Xls'],\n            ['Xlsx'],\n            ['Ods'],\n            ['Csv'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testEnclosure(string $format): void\n    {\n        $value = '<img alt=\"\" src=\"http://example.com/image.jpg\" />';\n\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue($value);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n\n        $actual = $reloadedSpreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue();\n        self::assertSame($value, $actual, 'should be able to write and read strings with multiples quotes');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Pane;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\n\nclass FreezePaneTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Xls'],\n            ['Xlsx'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testFreezePane(string $format): void\n    {\n        $cellSplit = 'B4';\n        $topLeftCell = 'E7';\n\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->freezePane($cellSplit, $topLeftCell);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $spreadsheet->disconnectWorksheets();\n\n        // Read written file\n        $reloadedActive = $reloadedSpreadsheet->getActiveSheet();\n        $actualCellSplit = $reloadedActive->getFreezePane();\n        $actualTopLeftCell = $reloadedActive->getTopLeftCell();\n\n        self::assertSame($cellSplit, $actualCellSplit, 'should be able to set freeze pane');\n        self::assertSame($topLeftCell, $actualTopLeftCell, 'should be able to set the top left cell');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testFreezePaneWithInvalidSelectedCells(string $format): void\n    {\n        $cellSplit = 'A7';\n        $topLeftCell = 'A24';\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $worksheet->freezePane('A7', 'A24');\n        $worksheet->setSelectedCells('F5');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $spreadsheet->disconnectWorksheets();\n\n        // Read written file\n        $reloadedActive = $reloadedSpreadsheet->getActiveSheet();\n        $actualCellSplit = $reloadedActive->getFreezePane();\n        $actualTopLeftCell = $reloadedActive->getTopLeftCell();\n\n        self::assertSame($cellSplit, $actualCellSplit, 'should be able to set freeze pane');\n        self::assertSame($topLeftCell, $actualTopLeftCell, 'should be able to set the top left cell');\n        self::assertSame('F5', $reloadedActive->getSelectedCells());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testFreezePaneUserSelectedCell(string $format): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setCellValue('A1', 'Header1');\n        $worksheet->setCellValue('B1', 'Header2');\n        $worksheet->setCellValue('C1', 'Header3');\n        $worksheet->setCellValue('A2', 'Data1');\n        $worksheet->setCellValue('B2', 'Data2');\n        $worksheet->setCellValue('C2', 'Data3');\n        $worksheet->setCellValue('A3', 'Data4');\n        $worksheet->setCellValue('B3', 'Data5');\n        $worksheet->setCellValue('C3', 'Data6');\n        $worksheet->freezePane('A2');\n        $worksheet->setSelectedCells('C3');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $spreadsheet->disconnectWorksheets();\n        // Read written file\n        $reloadedActive = $reloadedSpreadsheet->getActiveSheet();\n\n        self::assertSame('C3', $reloadedActive->getSelectedCells());\n        self::assertSame('A2', $reloadedActive->getFreezePane());\n        if ($format === 'Xlsx') {\n            $writer = new XlsxWriter($reloadedSpreadsheet);\n            $writerSheet = new XlsxWriter\\Worksheet($writer);\n            $data = $writerSheet->writeWorksheet($reloadedActive);\n            $expectedString = '<pane ySplit=\"1\" activePane=\"bottomLeft\" state=\"frozen\" topLeftCell=\"A2\"/><selection pane=\"bottomLeft\" activeCell=\"C3\" sqref=\"C3\"/>';\n            self::assertStringContainsString($expectedString, $data);\n\n            $reloadedActive->freezePane('C1');\n            $reloadedActive->setSelectedCells('A2');\n            $writer = new XlsxWriter($reloadedSpreadsheet);\n            $writerSheet = new XlsxWriter\\Worksheet($writer);\n            $data = $writerSheet->writeWorksheet($reloadedActive);\n            $expectedString = '<pane xSplit=\"2\" activePane=\"topRight\" state=\"frozen\" topLeftCell=\"C1\"/><selection pane=\"topRight\" activeCell=\"A2\" sqref=\"A2\"/>';\n            self::assertStringContainsString($expectedString, $data);\n        }\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testNoFreezePaneUserSelectedCell(string $format): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setCellValue('A1', 'Header1');\n        $worksheet->setCellValue('B1', 'Header2');\n        $worksheet->setCellValue('C1', 'Header3');\n        $worksheet->setCellValue('A2', 'Data1');\n        $worksheet->setCellValue('B2', 'Data2');\n        $worksheet->setCellValue('C2', 'Data3');\n        $worksheet->setCellValue('A3', 'Data4');\n        $worksheet->setCellValue('B3', 'Data5');\n        $worksheet->setCellValue('C3', 'Data6');\n        //$worksheet->freezePane('A2');\n        $worksheet->setSelectedCells('C3');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $spreadsheet->disconnectWorksheets();\n        // Read written file\n        $reloadedActive = $reloadedSpreadsheet->getActiveSheet();\n\n        $expected = 'C3';\n        self::assertSame($expected, $reloadedActive->getSelectedCells());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testFreezePaneWithSelectedCells(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $cellSplit = 'C4';\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->freezePane($cellSplit);\n        $sheet->setSelectedCells('A2');\n        self::assertSame('topLeft', $sheet->getActivePane());\n        $sheet->setSelectedCells('D3');\n        self::assertSame('topRight', $sheet->getActivePane());\n        $sheet->setSelectedCells('B5');\n        self::assertSame('bottomLeft', $sheet->getActivePane());\n        $sheet->setSelectedCells('F7');\n        self::assertSame('bottomRight', $sheet->getActivePane());\n        $expected = [\n            'topLeft' => new Pane('topLeft', 'A2', 'A2'),\n            'topRight' => new Pane('topRight', 'D3', 'D3'),\n            'bottomLeft' => new Pane('bottomLeft', 'B5', 'B5'),\n            'bottomRight' => new Pane('bottomRight', 'F7', 'F7'),\n        ];\n        self::assertEquals($expected, $sheet->getPanes());\n        self::assertSame('F7', $sheet->getSelectedCells());\n\n        $sheet = $spreadsheet->createSheet();\n        $cellSplit = 'A2';\n        $sheet->freezePane($cellSplit);\n        $sheet->setSelectedCells('B1');\n        self::assertSame('topLeft', $sheet->getActivePane());\n        $sheet->setSelectedCells('C7');\n        self::assertSame('bottomLeft', $sheet->getActivePane());\n        $expected = [\n            'topLeft' => new Pane('topLeft', 'B1', 'B1'),\n            'topRight' => null,\n            'bottomLeft' => new Pane('bottomLeft', 'C7', 'C7'),\n            'bottomRight' => null,\n        ];\n        self::assertEquals($expected, $sheet->getPanes());\n        self::assertSame('C7', $sheet->getSelectedCells());\n\n        $sheet = $spreadsheet->createSheet();\n        $cellSplit = 'D1';\n        $sheet->freezePane($cellSplit);\n        $sheet->setSelectedCells('B1');\n        self::assertSame('topLeft', $sheet->getActivePane());\n        $sheet->setSelectedCells('G3');\n        self::assertSame('topRight', $sheet->getActivePane());\n        $expected = [\n            'topRight' => new Pane('topRight', 'G3', 'G3'),\n            'bottomRight' => null,\n            'topLeft' => new Pane('topLeft', 'B1', 'B1'),\n            'bottomLeft' => null,\n        ];\n        self::assertEquals($expected, $sheet->getPanes());\n        self::assertSame('G3', $sheet->getSelectedCells());\n\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setSelectedCells('D7');\n        self::assertEmpty($sheet->getActivePane());\n        $expected = [\n            'topRight' => null,\n            'bottomRight' => null,\n            'topLeft' => null,\n            'bottomLeft' => null,\n        ];\n        self::assertEquals($expected, $sheet->getPanes());\n        self::assertSame('D7', $sheet->getSelectedCells());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFreezePaneViaPaneState(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $cellSplit = ['C4', 2, 3];\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setXSplit($cellSplit[1])\n            ->setYSplit($cellSplit[2])\n            ->setPaneState(Worksheet::PANE_SPLIT);\n        self::assertNull($sheet->getFreezePane());\n\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setXSplit($cellSplit[1])\n            ->setYSplit($cellSplit[2])\n            ->setPaneState(Worksheet::PANE_FROZEN);\n        self::assertSame($cellSplit[0], $sheet->getFreezePane());\n        $sheet->setSelectedCells('A2');\n        self::assertSame('topLeft', $sheet->getActivePane());\n        $sheet->setSelectedCells('D3');\n        self::assertSame('topRight', $sheet->getActivePane());\n        $sheet->setSelectedCells('B5');\n        self::assertSame('bottomLeft', $sheet->getActivePane());\n        $sheet->setSelectedCells('F7');\n        self::assertSame('bottomRight', $sheet->getActivePane());\n        $expected = [\n            'topLeft' => new Pane('topLeft', 'A2', 'A2'),\n            'topRight' => new Pane('topRight', 'D3', 'D3'),\n            'bottomLeft' => new Pane('bottomLeft', 'B5', 'B5'),\n            'bottomRight' => new Pane('bottomRight', 'F7', 'F7'),\n        ];\n        self::assertEquals($expected, $sheet->getPanes());\n        self::assertSame('F7', $sheet->getSelectedCells());\n\n        $cellSplit = ['B4', 1, 3];\n        $sheet->setXSplit($cellSplit[1]);\n        self::assertSame($cellSplit[0], $sheet->getFreezePane());\n        self::assertSame('F7', $sheet->getSelectedCells());\n        $expected = [\n            'topLeft' => null,\n            'topRight' => null,\n            'bottomLeft' => null,\n            'bottomRight' => new Pane('bottomRight', 'F7', 'F7'),\n        ];\n        self::assertEquals($expected, $sheet->getPanes());\n\n        $cellSplit = ['B8', 1, 7];\n        $sheet->setYSplit($cellSplit[2]);\n        self::assertSame($cellSplit[0], $sheet->getFreezePane());\n        self::assertSame('F7', $sheet->getSelectedCells());\n        $expected = [\n            'topLeft' => null,\n            'bottomRight' => null,\n            'bottomLeft' => null,\n            'topRight' => new Pane('topRight', 'F7', 'F7'),\n        ];\n        self::assertEquals($expected, $sheet->getPanes());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testAutoWidthDoesNotCorruptActivePane(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                [1, 2, 3, 4],\n                [5, 6, 7, 8],\n                [9, 10, 11, 12],\n            ]\n        );\n        $sheet->freezePane('A2');\n        $sheet->setSelectedCell('B1');\n        $paneBefore = $sheet->getActivePane();\n        self::assertSame('topLeft', $paneBefore);\n        $sheet->getColumnDimension('A')->setAutoSize(true);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n        $sheet->getColumnDimension('C')->setAutoSize(true);\n        $sheet->getColumnDimension('D')->setAutoSize(true);\n        $sheet->calculateColumnWidths();\n        $paneAfter = $sheet->getActivePane();\n        self::assertSame('topLeft', $paneAfter);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/MergedCellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass MergedCellsTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Html'],\n            ['Xls'],\n            ['Xlsx'],\n            ['Ods'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testMergedCells(string $format): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->setActiveSheetIndex(0);\n        $spreadsheet->getActiveSheet()->setCellValue('A1', '1');\n        $spreadsheet->getActiveSheet()->setCellValue('B1', '2');\n        $spreadsheet->getActiveSheet()->setCellValue('A2', '33');\n        $spreadsheet->getActiveSheet()->mergeCells('A2:B2');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n\n        $actual = 0;\n        foreach ($reloadedSpreadsheet->getWorksheetIterator() as $worksheet) {\n            $actual += count($worksheet->getMergeCells());\n        }\n\n        self::assertSame(1, $actual, \"Format $format failed, could not read 1 merged cell\");\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/PrintAreaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass PrintAreaTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Xls'],\n            ['Xlsx'],\n        ];\n    }\n\n    #[DataProvider('providerFormats')]\n    public function testPageSetup(string $format): void\n    {\n        // Create new workbook with 6 sheets and different print areas\n        $spreadsheet = new Spreadsheet();\n        $worksheet1 = $spreadsheet->getActiveSheet()->setTitle('Sheet 1');\n        $worksheet1->getPageSetup()->setPrintArea('A1:B1');\n\n        for ($i = 2; $i < 4; ++$i) {\n            $sheet = $spreadsheet->createSheet()->setTitle(\"Sheet $i\");\n            $sheet->getPageSetup()->setPrintArea(\"A$i:B$i\");\n        }\n\n        $worksheet4 = $spreadsheet->createSheet()->setTitle('Sheet 4');\n        $worksheet4->getPageSetup()->setPrintArea('A4:B4,D1:E4');\n        $worksheet5 = $spreadsheet->createSheet()->setTitle('Sheet 5');\n        $worksheet5->getPageSetup()->addPrintAreaByColumnAndRow(1, 1, 10, 10, 1);\n        $worksheet6 = $spreadsheet->createSheet()->setTitle('Sheet 6');\n        $worksheet6->getPageSetup()->addPrintAreaByColumnAndRow(1, 1, 10, 10, 1);\n        $worksheet6->getPageSetup()->addPrintAreaByColumnAndRow(12, 1, 12, 10, 1);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format, function (BaseReader $reader): void {\n            $reader->setLoadSheetsOnly(['Sheet 1', 'Sheet 3', 'Sheet 4', 'Sheet 5', 'Sheet 6']);\n        });\n        $spreadsheet->disconnectWorksheets();\n\n        $actual1 = self::getPrintArea($reloadedSpreadsheet, 'Sheet 1');\n        $actual3 = self::getPrintArea($reloadedSpreadsheet, 'Sheet 3');\n        $actual4 = self::getPrintArea($reloadedSpreadsheet, 'Sheet 4');\n        $actual5 = self::getPrintArea($reloadedSpreadsheet, 'Sheet 5');\n        $actual6 = self::getPrintArea($reloadedSpreadsheet, 'Sheet 6');\n        self::assertSame('A1:B1', $actual1, 'should be able to write and read normal page setup');\n        self::assertSame('A3:B3', $actual3, 'should be able to write and read page setup even when skipping sheets');\n        self::assertSame('A4:B4,D1:E4', $actual4, 'should be able to write and read page setup with multiple print areas');\n        self::assertSame('A1:J10', $actual5, 'add by column and row');\n        self::assertSame('A1:J10,L1:L10', $actual6, 'multiple add by column and row');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    private static function getPrintArea(Spreadsheet $spreadsheet, string $name): string\n    {\n        $sheet = $spreadsheet->getSheetByNameOrThrow($name);\n\n        return $sheet->getPageSetup()->getPrintArea();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ReadBlankCellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass ReadBlankCellsTest extends AbstractFunctional\n{\n    public static function providerSheetFormat(): array\n    {\n        return [\n            ['Xlsx', false],\n            ['Xls', true],\n            ['Ods', true],\n            ['Csv', false],\n            ['Html', false],\n        ];\n    }\n\n    /**\n     * Test load file with explicitly empty cells.\n     */\n    public function testLoadReadEmptyCells(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/blankcell.xlsx';\n        $reader = new Xlsx();\n        $reloadedSpreadsheet = $reader->load($filename);\n        self::assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('B2'));\n        self::assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2'));\n        self::assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3'));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load file ignoring empty cells.\n     */\n    public function testLoadDontReadEmptyCells(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/blankcell.xlsx';\n        $reader = new Xlsx();\n        $reader->setReadEmptyCells(false);\n        $reloadedSpreadsheet = $reader->load($filename);\n        self::assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('B2'));\n        self::assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2'));\n        self::assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3'));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load file ignoring empty cells.\n     */\n    public function testLoadDontReadEmptyCellsFlag(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/blankcell.xlsx';\n        $reader = new Xlsx();\n        $reloadedSpreadsheet = $reader->load($filename, Xlsx::IGNORE_EMPTY_CELLS);\n        self::assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('B2'));\n        self::assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2'));\n        self::assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3'));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test generate file with some empty cells.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSheetFormat')]\n    public function testLoadAndSaveReadEmpty(string $format, bool $expected): void\n    {\n        $filename = 'tests/data/Reader/XLSX/blankcell.xlsx';\n        $reader = new Xlsx();\n        //$reader->setReadEmptyCells(false);\n        $spreadsheet = $reader->load($filename);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame($expected, $reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('B2'));\n        if ($expected) {\n            self::assertContains($reloadedSpreadsheet->getActiveSheet()->getCell('B2')->getValue(), ['', null]);\n        }\n        self::assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2'));\n        self::assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3'));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test generate file with some empty cells.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSheetFormat')]\n    public function testLoadAndSaveDontReadEmpty(string $format, mixed $expected): void\n    {\n        if (!is_bool($expected)) {\n            self::fail('unexpected unused arg');\n        }\n        $filename = 'tests/data/Reader/XLSX/blankcell.xlsx';\n        $reader = new Xlsx();\n        $reader->setReadEmptyCells(false);\n        $spreadsheet = $reader->load($filename);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('B2'));\n        self::assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2'));\n        self::assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3'));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ReadFilterFilter.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\nclass ReadFilterFilter implements IReadFilter\n{\n    /**\n     * @param string $column Column address (as a string value like \"A\", or \"IV\")\n     * @param int $row Row number\n     * @param string $worksheetName Optional worksheet name\n     *\n     * @see IReadFilter::readCell()\n     */\n    public function readCell(string $column, int $row, string $worksheetName = ''): bool\n    {\n        // define filter range\n        $rowMin = 2;\n        $rowMax = 6;\n        $columnMin = 'B';\n        $columnMax = 'D';\n\n        $r = $row;\n        if ($r > $rowMax || $r < $rowMin) {\n            return false;\n        }\n\n        $col = sprintf('%04s', $column);\n        if (\n            $col > sprintf('%04s', $columnMax)\n            || $col < sprintf('%04s', $columnMin)\n        ) {\n            return false;\n        }\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/ReadFilterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ReadFilterTest extends AbstractFunctional\n{\n    public static function providerCellsValues(): array\n    {\n        $cellValues = [\n            // one argument as a multidimensional array\n            [1, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [2, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [3, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [4, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [5, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [6, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [7, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [8, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [9, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n            [10, 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],\n        ];\n\n        return [\n            ['Xlsx', $cellValues],\n            ['Ods', $cellValues],\n        ];\n    }\n\n    /**\n     * Test load Xlsx file with many empty cells with no filter used.\n     *\n     * @param mixed[] $arrayData\n     */\n    #[DataProvider('providerCellsValues')]\n    public function testXlsxLoadWithoutReadFilter(string $format, array $arrayData): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $spreadsheet->getActiveSheet()->fromArray($arrayData, null, 'A1');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $sheet = $reloadedSpreadsheet->getSheet(0);\n        // test highest column (very specific num of columns because of some 3rd party software)\n        self::assertSame('J', $sheet->getHighestColumn());\n\n        // test highest row (very specific num of rows because of some 3rd party software)\n        self::assertEquals(10, $sheet->getHighestRow());\n\n        // test top left coordinate\n        $sortedCoordinates = $sheet->getCellCollection()->getSortedCoordinates();\n        $coordinateTopLeft = reset($sortedCoordinates);\n        self::assertSame('A1', $coordinateTopLeft);\n    }\n\n    /**\n     * Test load Xlsx file with many empty cells (and big max row number) with readfilter.\n     *\n     * @param mixed[] $arrayData\n     */\n    #[DataProvider('providerCellsValues')]\n    public function testXlsxLoadWithReadFilter(string $format, array $arrayData): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->fromArray($arrayData, null, 'A1');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format, function (IReader $reader): void {\n            // apply filter\n            $reader->setReadFilter(new ReadFilterFilter());\n        });\n        $sheet = $reloadedSpreadsheet->getSheet(0);\n        // test highest column (very specific num of columns because of some 3rd party software)\n        self::assertSame('D', $sheet->getHighestColumn());\n\n        // test highest row (very specific num of rows because of some 3rd party software)\n        self::assertEquals(6, $sheet->getHighestRow());\n\n        // test top left coordinate\n        $sortedCoordinates = $sheet->getCellCollection()->getSortedCoordinates();\n        $coordinateTopLeft = reset($sortedCoordinates);\n        self::assertSame('B2', $coordinateTopLeft);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/SelectedCellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass SelectedCellsTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Xls'],\n        ];\n    }\n\n    /**\n     * Test load file with correct selected cells.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testSelectedCells(string $format): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $spreadsheet->setActiveSheetIndex(0)\n            ->setTitle('Test1')\n            ->setCellValue('D1', 1)\n            ->setCellValue('D2', 2)\n            ->setCellValue('D3', 3)\n            ->setCellValue('D4', 4)\n            ->setCellValue('D5', '=SUM(D1:D4)')\n            ->setSelectedCell('B2');\n\n        $spreadsheet->createSheet(1);\n\n        $spreadsheet->setActiveSheetIndex(1)\n            ->setTitle('Test2')\n            ->setCellValue('D1', 4)\n            ->setCellValue('E1', 3)\n            ->setCellValue('F1', 2)\n            ->setCellValue('G1', 1)\n            ->setCellValue('H1', '=SUM(D1:G4)')\n            ->setSelectedCells('A1:B2');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n\n        // Original object.\n        self::assertSame('B2', $spreadsheet->setActiveSheetIndex(0)->getSelectedCells());\n        self::assertSame('A1:B2', $spreadsheet->setActiveSheetIndex(1)->getSelectedCells());\n\n        // Saved and reloaded file.\n        self::assertSame('B2', $reloadedSpreadsheet->setActiveSheetIndex(0)->getSelectedCells());\n        self::assertSame('A1:B2', $reloadedSpreadsheet->setActiveSheetIndex(1)->getSelectedCells());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/StreamTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StreamTest extends TestCase\n{\n    public static function providerFormats(): array\n    {\n        $providerFormats = [\n            ['Xls'],\n            ['Xlsx'],\n            ['Ods'],\n            ['Csv'],\n            ['Html'],\n            ['Mpdf'],\n            ['Dompdf'],\n            ['Tcpdf'],\n        ];\n\n        return $providerFormats;\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testAllWritersCanWriteToStream(string $format): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->setCellValue('A1', 'foo');\n        $writer = IOFactory::createWriter($spreadsheet, $format);\n\n        $stream = fopen('php://memory', 'wb+');\n        $stat = ($stream === false) ? false : fstat($stream);\n        if ($stream === false || $stat === false) {\n            self::fail('fopen or fstat failed');\n        } else {\n            self::assertSame(0, $stat['size']);\n\n            $writer->save($stream);\n\n            self::assertIsResource($stream, 'should not close the stream for further usage out of PhpSpreadsheet');\n            $stat = fstat($stream);\n            if ($stat === false) {\n                self::fail('fstat failed');\n            } else {\n                self::assertGreaterThan(0, $stat['size'], 'something should have been written to the stream');\n            }\n            self::assertGreaterThan(0, ftell($stream), 'should not be rewinded, because not all streams support it');\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/TypeAttributePreservationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\Info;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as ReaderOds;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Slk as ReaderSlk;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls as ReaderXls;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as ReaderXlsx;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml as ReaderXml;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as WriterXlsx;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TypeAttributePreservationTest extends AbstractFunctional\n{\n    protected function setUp(): void\n    {\n        Info::$infoSupported = false;\n    }\n\n    protected function tearDown(): void\n    {\n        Info::$infoSupported = true;\n    }\n\n    public static function providerFormulae(): array\n    {\n        $formats = ['Xlsx'];\n        /** @var mixed[][] */\n        $data = require 'tests/data/Functional/TypeAttributePreservation/Formula.php';\n\n        $result = [];\n        foreach ($formats as $f) {\n            foreach ($data as $d) {\n                $result[] = [$f, $d];\n            }\n        }\n\n        return $result;\n    }\n\n    /**\n     * Ensure saved spreadsheets maintain the correct data type.\n     *\n     * @param mixed[] $values\n     */\n    #[DataProvider('providerFormulae')]\n    public function testFormulae(string $format, array $values): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray($values);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $reloadedSheet = $reloadedSpreadsheet->getActiveSheet();\n\n        $expected = $sheet->getCell('A1')->getCalculatedValue();\n\n        if ($sheet->getCell('A1')->getDataType() === 'f') {\n            $actual = $reloadedSheet->getCell('A1')->getOldCalculatedValue();\n        } else {\n            $actual = $reloadedSheet->getCell('A1')->getValue();\n        }\n\n        self::assertSame($expected, $actual);\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function customizeWriter(WriterXlsx $writer): void\n    {\n        $writer->setPreCalculateFormulas(false);\n    }\n\n    /**\n     * Ensure saved spreadsheets maintain the correct data type.\n     *\n     * @param mixed[] $values\n     */\n    #[DataProvider('providerFormulae')]\n    public function testFormulaeNoPrecalc(string $format, array $values): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray($values);\n\n        /** @var callable */\n        $writerCustomizer = [self::class, 'customizeWriter'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format, null, $writerCustomizer);\n        $reloadedSheet = $reloadedSpreadsheet->getActiveSheet();\n\n        $expected = $sheet->getCell('A1')->getCalculatedValue();\n\n        if ($sheet->getCell('A1')->getDataType() === 'f') {\n            $actual = $reloadedSheet->getCell('A1')->getOldCalculatedValue();\n            self::assertNull($actual);\n        } else {\n            $actual = $reloadedSheet->getCell('A1')->getValue();\n            self::assertSame($expected, $actual);\n        }\n\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnimplementedFunctionXlsx(): void\n    {\n        $file = 'tests/data/Reader/XLSX/issue.3658.xlsx';\n        $reader = new ReaderXlsx();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $unimplemented = '=INFO(\"SYSTEM\")';\n        self::assertSame(124, $sheet->getCell('A2')->getOldCalculatedValue());\n        self::assertSame('00123', $sheet->getCell('A3')->getOldCalculatedValue());\n        self::assertSame($unimplemented, $sheet->getCell('A4')->getValue());\n        self::assertSame('pcdos', $sheet->getCell('A4')->getCalculatedValue(), 'use oldCalculatedValue from read for unimplemented function');\n        $sheet->getCell('D10')->setValue($unimplemented);\n        self::assertNull($sheet->getCell('D10')->getCalculatedValue(), 'return null for unimplemented function when old value unassigned');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnimplementedFunctionXls(): void\n    {\n        $file = 'tests/data/Reader/XLS/issue.3658.xls';\n        $reader = new ReaderXls();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $unimplemented = '=INFO(\"SYSTEM\")';\n        self::assertSame(124, $sheet->getCell('A2')->getOldCalculatedValue());\n        self::assertSame('00123', $sheet->getCell('A3')->getOldCalculatedValue());\n        self::assertSame($unimplemented, $sheet->getCell('A4')->getValue());\n        self::assertSame('pcdos', $sheet->getCell('A4')->getCalculatedValue(), 'use oldCalculatedValue from read for unimplemented function');\n        $sheet->getCell('D10')->setValue($unimplemented);\n        self::assertNull($sheet->getCell('D10')->getCalculatedValue(), 'return null for unimplemented function when old value unassigned');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnimplementedFunctionXml(): void\n    {\n        $file = 'tests/data/Reader/Xml/issue.3658.xml';\n        $reader = new ReaderXml();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $unimplemented = '=INFO(\"SYSTEM\")';\n        self::assertSame(124, $sheet->getCell('A2')->getOldCalculatedValue());\n        self::assertSame('00123', $sheet->getCell('A3')->getOldCalculatedValue());\n        self::assertSame($unimplemented, $sheet->getCell('A4')->getValue());\n        self::assertSame('pcdos', $sheet->getCell('A4')->getCalculatedValue(), 'use oldCalculatedValue from read for unimplemented function');\n        $sheet->getCell('D10')->setValue($unimplemented);\n        self::assertNull($sheet->getCell('D10')->getCalculatedValue(), 'return null for unimplemented function when old value unassigned');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnimplementedFunctionOds(): void\n    {\n        $file = 'tests/data/Reader/Ods/issue.3658.ods';\n        $reader = new ReaderOds();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $unimplemented = '=INFO(\"SYSTEM\")';\n        self::assertSame(124, $sheet->getCell('A2')->getOldCalculatedValue());\n        self::assertSame('00123', $sheet->getCell('A3')->getOldCalculatedValue());\n        self::assertSame($unimplemented, $sheet->getCell('A4')->getValue());\n        self::assertSame('WNT', $sheet->getCell('A4')->getCalculatedValue(), 'use oldCalculatedValue from read for unimplemented function');\n        $sheet->getCell('D10')->setValue($unimplemented);\n        self::assertNull($sheet->getCell('D10')->getCalculatedValue(), 'return null for unimplemented function when old value unassigned');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnimplementedFunctionSlk(): void\n    {\n        $file = 'tests/data/Reader/Slk/issue.3658.slk';\n        $reader = new ReaderSlk();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $unimplemented = '=INFO(\"SYSTEM\")';\n        self::assertSame(124, $sheet->getCell('A2')->getOldCalculatedValue());\n        self::assertSame('00123', $sheet->getCell('A3')->getOldCalculatedValue());\n        self::assertSame($unimplemented, $sheet->getCell('A4')->getValue());\n        self::assertSame('pcdos', $sheet->getCell('A4')->getCalculatedValue(), 'use oldCalculatedValue from read for unimplemented function');\n        $sheet->getCell('D10')->setValue($unimplemented);\n        self::assertNull($sheet->getCell('D10')->getCalculatedValue(), 'return null for unimplemented function when old value unassigned');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Functional/WorkbookViewAttributesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass WorkbookViewAttributesTest extends AbstractFunctional\n{\n    public static function providerFormats(): array\n    {\n        return [\n            ['Xlsx'],\n        ];\n    }\n\n    /**\n     * Test that workbook bookview attributes such as 'showSheetTabs',\n     * (the attribute controlling worksheet tabs visibility,)\n     * are preserved when xlsx documents are read and written.\n     *\n     * @see https://github.com/PHPOffice/PhpSpreadsheet/issues/523\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testPreserveWorkbookViewAttributes(string $format): void\n    {\n        // Create a dummy workbook with two worksheets\n        $workbook = new Spreadsheet();\n        $worksheet1 = $workbook->getActiveSheet();\n        $worksheet1->setTitle('Tweedledee');\n        $worksheet1->setCellValue('A1', 1);\n        $worksheet2 = $workbook->createSheet();\n        $worksheet2->setTitle('Tweeldedum');\n        $worksheet2->setCellValue('A1', 2);\n\n        // Check that the bookview attributes return default values\n        self::assertTrue($workbook->getShowHorizontalScroll());\n        self::assertTrue($workbook->getShowVerticalScroll());\n        self::assertTrue($workbook->getShowSheetTabs());\n        self::assertTrue($workbook->getAutoFilterDateGrouping());\n        self::assertFalse($workbook->getMinimized());\n        self::assertSame(0, $workbook->getFirstSheetIndex());\n        self::assertSame(600, $workbook->getTabRatio());\n        self::assertSame(Spreadsheet::VISIBILITY_VISIBLE, $workbook->getVisibility());\n\n        // Set the bookview attributes to non-default values\n        $workbook->setShowHorizontalScroll(false);\n        $workbook->setShowVerticalScroll(false);\n        $workbook->setShowSheetTabs(false);\n        $workbook->setAutoFilterDateGrouping(false);\n        $workbook->setMinimized(true);\n        $workbook->setFirstSheetIndex(1);\n        $workbook->setTabRatio(700);\n        $workbook->setVisibility(Spreadsheet::VISIBILITY_HIDDEN);\n\n        // Check that bookview attributes were set properly\n        self::assertFalse($workbook->getShowHorizontalScroll());\n        self::assertFalse($workbook->getShowVerticalScroll());\n        self::assertFalse($workbook->getShowSheetTabs());\n        self::assertFalse($workbook->getAutoFilterDateGrouping());\n        self::assertTrue($workbook->getMinimized());\n        self::assertSame(1, $workbook->getFirstSheetIndex());\n        self::assertSame(700, $workbook->getTabRatio());\n        self::assertSame(Spreadsheet::VISIBILITY_HIDDEN, $workbook->getVisibility());\n\n        $workbook2 = $this->writeAndReload($workbook, $format);\n\n        // Check that the read spreadsheet has the right bookview attributes\n        self::assertFalse($workbook2->getShowHorizontalScroll());\n        self::assertFalse($workbook2->getShowVerticalScroll());\n        self::assertFalse($workbook2->getShowSheetTabs());\n        self::assertFalse($workbook2->getAutoFilterDateGrouping());\n        self::assertTrue($workbook2->getMinimized());\n        self::assertSame(1, $workbook2->getFirstSheetIndex());\n        self::assertSame(700, $workbook2->getTabRatio());\n        self::assertSame(Spreadsheet::VISIBILITY_HIDDEN, $workbook2->getVisibility());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/HashTableTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Comment; // need Comparable object\nuse PhpOffice\\PhpSpreadsheet\\HashTable;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HashTableTest extends TestCase\n{\n    /** @return array{Comment, Comment} */\n    public static function createArray(): array\n    {\n        $comment1 = new Comment();\n        $comment1->setAuthor('Author1');\n        $comment2 = new Comment();\n        $comment2->setAuthor('Author2');\n\n        return [$comment1, $comment2];\n    }\n\n    public static function getAuthor(mixed $comment): string\n    {\n        return ($comment instanceof Comment) ? $comment->getAuthor() : '';\n    }\n\n    public function testAddRemoveClear(): void\n    {\n        $array1 = self::createArray();\n        $hash1 = new HashTable($array1);\n        self::assertSame(2, $hash1->count());\n        $comment3 = new Comment();\n        $comment3->setAuthor('Author3');\n        $hash1->add($comment3);\n        $comment4 = new Comment();\n        $comment4->setAuthor('Author4');\n        $hash1->add($comment4);\n        $comment5 = new Comment();\n        $comment5->setAuthor('Author5');\n        // don't add comment5\n        self::assertSame(4, $hash1->count());\n        self::assertNull($hash1->getByIndex(10));\n        $comment = $hash1->getByIndex(2);\n        self::assertSame('Author3', self::getAuthor($comment));\n        $hash1->remove($comment3);\n        self::assertSame(3, $hash1->count());\n        $comment = $hash1->getByIndex(2);\n        self::assertSame('Author4', self::getAuthor($comment));\n        $hash1->remove($comment5);\n        self::assertSame(3, $hash1->count(), 'Remove non-hash member');\n        $comment = $hash1->getByIndex(2);\n        self::assertSame('Author4', self::getAuthor($comment));\n        self::assertNull($hash1->getByHashCode('xyz'));\n        $hash1->clear();\n        self::AssertSame(0, $hash1->count());\n    }\n\n    public function testToArray(): void\n    {\n        $array1 = self::createArray();\n        $count1 = count($array1);\n        $hash1 = new HashTable($array1);\n        $array2 = $hash1->toArray();\n        self::assertCount($count1, $array2);\n        $idx = 0;\n        foreach ($array2 as $key => $value) {\n            self::assertEquals($array1[$idx], $value, \"Item $idx\");\n            self::assertSame($idx, $hash1->getIndexForHashCode($key));\n            ++$idx;\n        }\n    }\n\n    public function testClone(): void\n    {\n        $array1 = self::createArray();\n        $hash1 = new HashTable($array1);\n        $hash2 = new HashTable();\n        self::assertSame(0, $hash2->count());\n        $hash2->addFromSource();\n        self::assertSame(0, $hash2->count());\n        $hash2->addFromSource($array1);\n        self::assertSame(2, $hash2->count());\n        self::assertEquals($hash1, $hash2, 'Add in constructor same as addFromSource');\n        $hash3 = clone $hash1;\n        self::assertEquals($hash1, $hash3, 'Clone equal to original');\n        self::assertSame($hash1->getByIndex(0), $hash2->getByIndex(0));\n        self::assertEquals($hash1->getByIndex(0), $hash3->getByIndex(0));\n        self::assertNotSame($hash1->getByIndex(0), $hash3->getByIndex(0));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Helper/DimensionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Helper;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Size;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DimensionTest extends TestCase\n{\n    #[DataProvider('providerCellWidth')]\n    public function testCreateDimension(float $expectedResult, string $dimension): void\n    {\n        $result = (new Dimension($dimension))->width();\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[DataProvider('providerConvertUoM')]\n    public function testConvertDimension(float $expectedResult, string $dimension, string $unitOfMeasure): void\n    {\n        $result = (new Dimension($dimension))->toUnit($unitOfMeasure);\n        self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);\n    }\n\n    public function testSizeAndUnit(): void\n    {\n        $size = new Size('10px');\n        self::assertTrue($size->valid());\n        self::assertSame('10', $size->size());\n        self::assertSame('px', $size->unit());\n        $size = new Size('9.3');\n        self::assertTrue($size->valid());\n        self::assertSame('9.3', $size->size());\n        self::assertSame('pt', $size->unit());\n        $size = new Size('8whatever');\n        self::assertFalse($size->valid());\n    }\n\n    public function testConvertDimensionInvalidUoM(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('pikachu is not a vaid unit of measure');\n        (new Dimension('999'))->toUnit('pikachu');\n    }\n\n    public static function providerCellWidth(): array\n    {\n        return [\n            [12.0, '12'],\n            [2.2852, '12pt'],\n            [4.5703, '24 pt'],\n            [5.1416, '36px'],\n            [5.7129, '2.5pc'],\n            [13.7109, '2.54cm'],\n            [13.7109, '25.4mm'],\n            [13.7109, '1in'],\n            [4.27, '50%'],\n            [3.7471, '3.2em'],\n            [2.3419, '2ch'],\n            [4.6838, '4ex'],\n            [14.0515, '12rem'],\n        ];\n    }\n\n    public static function providerConvertUoM(): array\n    {\n        return [\n            [60, '8.54', Dimension::UOM_PIXELS],\n            [100, '100px', Dimension::UOM_PIXELS],\n            [150, '200px', Dimension::UOM_POINTS],\n            [45, '8.54', Dimension::UOM_POINTS],\n            [12.5, '200px', Dimension::UOM_PICA],\n            [3.75, '8.54', Dimension::UOM_PICA],\n            [3.125, '300px', Dimension::UOM_INCHES],\n            [0.625, '8.54', Dimension::UOM_INCHES],\n            [7.9375, '300px', Dimension::UOM_CENTIMETERS],\n            [1.5875, '8.54', Dimension::UOM_CENTIMETERS],\n            [79.375, '300px', Dimension::UOM_MILLIMETERS],\n            [15.875, '8.54', Dimension::UOM_MILLIMETERS],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Helper/HandlerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Helper;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Handler;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HandlerTest extends TestCase\n{\n    public function testSuppressed(): void\n    {\n        self::assertTrue(Handler::suppressed());\n    }\n\n    public function testDeprecated(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessageMatches('/Invalid characters/');\n\n        Handler::deprecated();\n    }\n\n    public function testNotice(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessageMatches('/Timezone/');\n\n        Handler::notice('invalidtz');\n    }\n\n    public function testWarning(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessageMatches('/ailed to open stream/');\n\n        Handler::warning();\n    }\n\n    public function testUserDeprecated(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessageMatches('/hello/');\n\n        Handler::userDeprecated();\n    }\n\n    public function testUserNotice(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessageMatches('/userNotice/');\n\n        Handler::userNotice();\n    }\n\n    public function testUserWarning(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessageMatches('/userWarning/');\n\n        Handler::userWarning();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Helper/HtmlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Helper;\n\nuse DOMElement;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerUtf8EncodingSupport')]\n    public function testUtf8EncodingSupport(string $expected, string $input): void\n    {\n        $html = new Html();\n        $actual = $html->toRichTextObject($input);\n\n        self::assertSame($expected, $actual->getPlainText());\n    }\n\n    public static function providerUtf8EncodingSupport(): array\n    {\n        return [\n            ['foo', 'foo'],\n            ['können', 'können'],\n            ['русский', 'русский'],\n            [\"foo\\nbar\", '<p>foo</p><p>bar</p>'],\n            'issue2810' => ['0', '0'],\n            [\"Hello\\nItem 1Item 2Goodbye\", 'Hello<ul><li>Item 1</li><li>Item 2</li></ul>Goodbye'],\n        ];\n    }\n\n    public function testLiTag(): void\n    {\n        $html = new Html();\n        $htmlBreakTag = $html->breakTag(...);\n        $html->addStartTagCallback('li', function (DOMElement $tag, Html $object): void {\n            $object->stringData .= \"\\u{00A0}\\u{2022} \\u{00A0}\";\n        });\n        $html->addEndTagCallback('li', $htmlBreakTag);\n        $input = 'Hello<ul><li>Item 1</li><li>Item 2</li></ul>Goodbye';\n        $expected = \"Hello\\n\\u{00A0}\\u{2022} \\u{00A0}Item 1\\n\\u{00A0}\\u{2022} \\u{00A0}Item 2\\nGoodbye\";\n        $actual = $html->toRichTextObject($input);\n\n        self::assertSame($expected, $actual->getPlainText());\n    }\n\n    public function testSTag(): void\n    {\n        $html = new Html();\n        $input = 'Hello <s>test</s>world';\n        $richText = $html->toRichTextObject($input);\n        $elements = $richText->getRichTextElements();\n\n        self::assertSame(count($elements), 3);\n\n        self::assertSame($elements[0]->getText(), 'Hello ');\n        self::assertNotNull($elements[0]->getFont());\n        self::assertFalse($elements[0]->getFont()->getStrikethrough());\n\n        self::assertSame($elements[1]->getText(), 'test');\n        self::assertNotNull($elements[1]->getFont());\n        self::assertTrue($elements[1]->getFont()->getStrikethrough());\n\n        self::assertSame($elements[2]->getText(), 'world');\n        self::assertNotNull($elements[2]->getFont());\n        self::assertFalse($elements[2]->getFont()->getStrikethrough());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Helper/SampleCoverageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Helper;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PHPUnit\\Framework\\TestCase;\nuse RuntimeException;\n\n#[\\PHPUnit\\Framework\\Attributes\\CoversClass(Sample::class)]\nclass SampleCoverageTest extends TestCase\n{\n    public function testSample(): void\n    {\n        $helper = new Sample();\n        $samples = $helper->getSamples();\n        self::assertArrayHasKey('Basic', $samples);\n        $basic = $samples['Basic'];\n        self::assertArrayHasKey('02 Types', $basic);\n        self::assertSame('Basic/02_Types.php', $basic['02 Types']);\n        self::assertSame('phpunit', $helper->getPageTitle());\n        self::assertSame('<h1>phpunit</h1>', $helper->getPageHeading());\n    }\n\n    public function testDirectoryFail(): void\n    {\n        $this->expectException(RuntimeException::class);\n\n        $helper = $this->getMockBuilder(Sample::class)\n            ->onlyMethods(['isDirOrMkdir'])\n            ->getMock();\n        $helper->expects(self::once())\n            ->method('isDirOrMkdir')\n            ->willReturn(false);\n        $helper->getFilename('a.xlsx');\n    }\n\n    public function testTitles(): void\n    {\n        $helper = new Sample();\n        ob_start();\n        $helper->titles('Category', 'FunctionName');\n        $output = (string) ob_get_clean();\n        $output = str_replace(\"\\r\", '', $output);\n        self::assertStringContainsString(\"Function: FunctionName()\\n\", $output);\n        ob_start();\n        $helper->titles('Category', 'FunctionName', 'Description');\n        $output = (string) ob_get_clean();\n        $output = str_replace(\"\\r\", '', $output);\n        self::assertStringContainsString(\"Function: FunctionName() - Description.\\n\", $output);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Helper/SampleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Helper;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PHPUnit\\Framework\\Attributes;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SampleTest extends TestCase\n{\n    private static bool $alwaysTrue = true;\n\n    #[Attributes\\RunInSeparateProcess]\n    #[Attributes\\PreserveGlobalState(false)]\n    #[Attributes\\DataProvider('providerSample')]\n    public function testSample(string $sample): void\n    {\n        ob_start();\n        require $sample;\n        ob_end_clean();\n\n        self::assertTrue(self::$alwaysTrue);\n    }\n\n    public static function providerSample(): array\n    {\n        $skipped = [\n        ];\n\n        // Unfortunately some tests are too long to run with code-coverage\n        // analysis on GitHub Actions, so we need to exclude them\n        /** @var string[] */\n        global $argv;\n        if (in_array('--coverage-clover', $argv)) {\n            $tooLongToBeCovered = [\n                'Basic/06_Largescale.php',\n            ];\n            $skipped = array_merge($skipped, $tooLongToBeCovered);\n        }\n\n        $helper = new Sample();\n        $result = [];\n        foreach ($helper->getSamples() as $samples) {\n            foreach ($samples as $sample) {\n                if (!in_array($sample, $skipped)) {\n                    $file = 'samples/' . $sample;\n                    $result[$sample] = [$file];\n                }\n            }\n        }\n\n        return $result;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Helper/TextGridExtended.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Helper;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\TextGrid;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\TextGridRightAlign;\n\nclass TextGridExtended extends TextGrid\n{\n    protected function rightAlign(string $displayCell, mixed $cell = null): bool\n    {\n        // regexp is imperfect, but good enough for test purposes\n        return is_int($cell) || is_float($cell) || ($this->numbersRight === TextGridRightAlign::numeric && preg_match('/^[-+$,.0-9]+$/', $displayCell));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Helper/TextGridTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Helper;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\TextGrid;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\TextGridRightAlign;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TextGridTest extends TestCase\n{\n    /** @param mixed[] $expected */\n    #[DataProvider('providerTextGrid')]\n    public function testTextGrid(\n        bool $cli,\n        bool $rowDividers,\n        bool $rowHeaders,\n        bool $columnHeaders,\n        array $expected\n    ): void {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [6, '=TEXT(A1,\"yyyy-mm-dd hh:mm\")', null, 0.572917],\n            ['=\"6\"', '=TEXT(A2,\"yyyy-mm-dd hh:mm\")', null, '1<>2'],\n            ['xyz', '=TEXT(A3,\"yyyy-mm-dd hh:mm\")'],\n        ], strictNullComparison: true);\n        /** @var mixed[][] */\n        $temp = $sheet->toArray(null, true, true, true);\n        $textGrid = new TextGrid(\n            $temp,\n            $cli,\n            rowDividers: $rowDividers,\n            rowHeaders: $rowHeaders,\n            columnHeaders: $columnHeaders\n        );\n        $result = $textGrid->render();\n        // Note that, for cli, string will end with PHP_EOL,\n        //    so explode will add an extra null-string element\n        //    to its array output.\n        $lines = explode(PHP_EOL, $result);\n        self::assertSame($expected, $lines);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerTextGrid(): array\n    {\n        return [\n            'cli default values' => [\n                true, false, true, true,\n                [\n                    '    +-----+------------------+---+----------+',\n                    '    | A   | B                | C | D        |',\n                    '+---+-----+------------------+---+----------+',\n                    '| 1 | 6   | 1900-01-06 00:00 |   | 0.572917 |',\n                    '| 2 | 6   | 1900-01-06 00:00 |   | 1<>2     |',\n                    '| 3 | xyz | xyz              |   |          |',\n                    '+---+-----+------------------+---+----------+',\n                    '',\n                ],\n            ],\n            'html default values' => [\n                false, false, true, true,\n                [\n                    '<pre>',\n                    '    +-----+------------------+---+----------+',\n                    '    | A   | B                | C | D        |',\n                    '+---+-----+------------------+---+----------+',\n                    '| 1 | 6   | 1900-01-06 00:00 |   | 0.572917 |',\n                    '| 2 | 6   | 1900-01-06 00:00 |   | 1&lt;&gt;2     |',\n                    '| 3 | xyz | xyz              |   |          |',\n                    '+---+-----+------------------+---+----------+',\n                    '</pre>',\n                ],\n            ],\n            'cli rowDividers' => [\n                true, true, true, true,\n                [\n                    '    +-----+------------------+---+----------+',\n                    '    | A   | B                | C | D        |',\n                    '+---+-----+------------------+---+----------+',\n                    '| 1 | 6   | 1900-01-06 00:00 |   | 0.572917 |',\n                    '+---+-----+------------------+---+----------+',\n                    '| 2 | 6   | 1900-01-06 00:00 |   | 1<>2     |',\n                    '+---+-----+------------------+---+----------+',\n                    '| 3 | xyz | xyz              |   |          |',\n                    '+---+-----+------------------+---+----------+',\n                    '',\n                ],\n            ],\n            'cli no columnHeaders' => [\n                true, false, true, false,\n                [\n                    '+---+-----+------------------+--+----------+',\n                    '| 1 | 6   | 1900-01-06 00:00 |  | 0.572917 |',\n                    '| 2 | 6   | 1900-01-06 00:00 |  | 1<>2     |',\n                    '| 3 | xyz | xyz              |  |          |',\n                    '+---+-----+------------------+--+----------+',\n                    '',\n                ],\n            ],\n            'cli no row headers' => [\n                true, false, false, true,\n                [\n                    '+-----+------------------+---+----------+',\n                    '| A   | B                | C | D        |',\n                    '+-----+------------------+---+----------+',\n                    '| 6   | 1900-01-06 00:00 |   | 0.572917 |',\n                    '| 6   | 1900-01-06 00:00 |   | 1<>2     |',\n                    '| xyz | xyz              |   |          |',\n                    '+-----+------------------+---+----------+',\n                    '',\n                ],\n            ],\n            'cli row dividers, no row nor column headers' => [\n                true, true, false, false,\n                [\n                    '+-----+------------------+--+----------+',\n                    '| 6   | 1900-01-06 00:00 |  | 0.572917 |',\n                    '+-----+------------------+--+----------+',\n                    '| 6   | 1900-01-06 00:00 |  | 1<>2     |',\n                    '+-----+------------------+--+----------+',\n                    '| xyz | xyz              |  |          |',\n                    '+-----+------------------+--+----------+',\n                    '',\n                ],\n            ],\n        ];\n    }\n\n    public function testBool(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [0, 1],\n            [true, false],\n            [true, true],\n        ], strictNullComparison: true);\n        /** @var mixed[][] */\n        $temp = $sheet->toArray(null, true, false, true);\n        $textGrid = new TextGrid(\n            $temp,\n            true,\n            rowDividers: false,\n            rowHeaders: false,\n            columnHeaders: false,\n        );\n        $expected = [\n            '+------+-------+',\n            '| 0    | 1     |',\n            '| TRUE | FALSE |',\n            '| TRUE | TRUE  |',\n            '+------+-------+',\n            '',\n        ];\n        $result = $textGrid->render();\n        $lines = explode(PHP_EOL, $result);\n        self::assertSame($expected, $lines);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNumbersDefault(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [0, 1, 'string1'],\n            [18, 13.25, 'string2'],\n            [100, 2.5, 'string12'],\n        ], strictNullComparison: true);\n        $sheet->getStyle('B1:B3')->getNumberFormat()\n            ->setFormatCode('0.00');\n        /** @var mixed[][] */\n        $temp = $sheet->toArray(null, true, true, true);\n        $textGrid = new TextGrid(\n            $temp,\n            true,\n            rowDividers: false,\n            rowHeaders: false,\n            columnHeaders: false,\n        );\n        $expected = [\n            '+-----+-------+----------+',\n            '| 0   | 1.00  | string1  |',\n            '| 18  | 13.25 | string2  |',\n            '| 100 | 2.50  | string12 |',\n            '+-----+-------+----------+',\n            '',\n        ];\n        $result = $textGrid->render();\n        $lines = explode(PHP_EOL, $result);\n        self::assertSame($expected, $lines);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNumbersRight(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [0, 1, '$1,234.56'],\n            [18, 13.25, 'string2'],\n            [100, 2.5, 'string123456'],\n        ], strictNullComparison: true);\n        $sheet->getStyle('B1:B3')->getNumberFormat()\n            ->setFormatCode('0.00');\n        /** @var mixed[][] */\n        $temp = $sheet->toArray(null, true, true, true);\n        $textGrid = new TextGrid(\n            $temp,\n            true,\n            rowDividers: false,\n            rowHeaders: false,\n            columnHeaders: false,\n            numbersRight: TextGridRightAlign::numeric,\n        );\n        $expected = [\n            '+-----+-------+--------------+',\n            '|   0 |  1.00 | $1,234.56    |',\n            '|  18 | 13.25 | string2      |',\n            '| 100 |  2.50 | string123456 |',\n            '+-----+-------+--------------+',\n            '',\n        ];\n        $result = $textGrid->render();\n        $lines = explode(PHP_EOL, $result);\n        self::assertSame($expected, $lines);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testExtendedNumbersRight(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [0, 1, '$1,234.56'],\n            [18, 13.25, 'string2'],\n            [100, 2.5, 'string123456'],\n        ], strictNullComparison: true);\n        $sheet->getStyle('B1:B3')->getNumberFormat()\n            ->setFormatCode('0.00');\n        /** @var mixed[][] */\n        $temp = $sheet->toArray(null, true, true, true);\n        $textGrid = new TextGridExtended(\n            $temp,\n            true,\n            rowDividers: false,\n            rowHeaders: false,\n            columnHeaders: false,\n        );\n        $textGrid->setNumbersRight(TextGridRightAlign::numeric);\n        $expected = [\n            '+-----+-------+--------------+',\n            '|   0 |  1.00 |    $1,234.56 |',\n            '|  18 | 13.25 | string2      |',\n            '| 100 |  2.50 | string123456 |',\n            '+-----+-------+--------------+',\n            '',\n        ];\n        $result = $textGrid->render();\n        $lines = explode(PHP_EOL, $result);\n        self::assertSame($expected, $lines);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/IOFactoryRegisterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IOFactoryRegisterTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        IOFactory::restoreDefaultReadersAndWriters();\n    }\n\n    public function testRegisterWriter(): void\n    {\n        IOFactory::registerWriter('Pdf', Writer\\Pdf\\Mpdf::class);\n        $spreadsheet = new Spreadsheet();\n        $actual = IOFactory::createWriter($spreadsheet, 'Pdf');\n        self::assertInstanceOf(Writer\\Pdf\\Mpdf::class, $actual);\n    }\n\n    public function testRegisterReader(): void\n    {\n        IOFactory::registerReader('Custom', Reader\\Html::class);\n        $actual = IOFactory::createReader('Custom');\n        self::assertInstanceOf(Reader\\Html::class, $actual);\n    }\n\n    public function testRegisterInvalidWriter(): void\n    {\n        $this->expectException(Writer\\Exception::class);\n        $this->expectExceptionMessage('writers must implement');\n        IOFactory::registerWriter('foo', 'bar'); // @phpstan-ignore-line\n    }\n\n    public function testRegisterInvalidReader(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('readers must implement');\n        IOFactory::registerReader('foo', 'bar'); // @phpstan-ignore-line\n    }\n\n    public static function testRegisterCustomReader(): void\n    {\n        IOFactory::registerReader(IOFactory::READER_XLSX, CustomReader::class);\n        $inputFileName = 'tests/data/Reader/XLSX/1900_Calendar.xlsx';\n        $loadSpreadsheet = IOFactory::load($inputFileName);\n        $sheet = $loadSpreadsheet->getActiveSheet();\n        self::assertSame('2022-01-01', $sheet->getCell('A1')->getFormattedValue());\n        $loadSpreadsheet->disconnectWorksheets();\n\n        $reader = new CustomReader();\n        $newSpreadsheet = $reader->load($inputFileName);\n        $newSheet = $newSpreadsheet->getActiveSheet();\n        self::assertSame('2022-01-01', $newSheet->getCell('A1')->getFormattedValue());\n        $newSpreadsheet->disconnectWorksheets();\n\n        $inputFileType = IOFactory::identify($inputFileName, null, true);\n        $objReader = IOFactory::createReader($inputFileType);\n        self::assertInstanceOf(CustomReader::class, $objReader);\n        $objSpreadsheet = $objReader->load($inputFileName);\n        $objSheet = $objSpreadsheet->getActiveSheet();\n        self::assertSame('2022-01-01', $objSheet->getCell('A1')->getFormattedValue());\n        $objSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function testRegisterCustomWriter(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $writer = new CustomWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<td class=\"column0 style0 n\">1</td>', $html);\n        IOFactory::registerWriter(IOFactory::WRITER_HTML, CustomWriter::class);\n        $objWriter = IOFactory::createWriter($spreadsheet, CustomWriter::class);\n        self::assertInstanceOf(CustomWriter::class, $objWriter);\n        $html2 = $objWriter->generateHtmlAll();\n        self::assertStringContainsString('<td class=\"column0 style0 n\">1</td>', $html2);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/IOFactoryTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IOFactoryTest extends TestCase\n{\n    #[DataProvider('providerCreateWriter')]\n    public function testCreateWriter(string $name, string $expected): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $actual = IOFactory::createWriter($spreadsheet, $name);\n        self::assertSame($expected, $actual::class);\n    }\n\n    public static function providerCreateWriter(): array\n    {\n        return [\n            ['Xls', Writer\\Xls::class],\n            ['Xlsx', Writer\\Xlsx::class],\n            ['Ods', Writer\\Ods::class],\n            ['Csv', Writer\\Csv::class],\n            ['Html', Writer\\Html::class],\n            ['Mpdf', Writer\\Pdf\\Mpdf::class],\n            ['Tcpdf', Writer\\Pdf\\Tcpdf::class],\n            ['Dompdf', Writer\\Pdf\\Dompdf::class],\n        ];\n    }\n\n    public function testRegisterWriter(): void\n    {\n        IOFactory::registerWriter('Pdf', Writer\\Pdf\\Mpdf::class);\n        $spreadsheet = new Spreadsheet();\n        $actual = IOFactory::createWriter($spreadsheet, 'Pdf');\n        self::assertInstanceOf(Writer\\Pdf\\Mpdf::class, $actual);\n    }\n\n    #[DataProvider('providerCreateReader')]\n    public function testCreateReader(string $name, string $expected): void\n    {\n        $actual = IOFactory::createReader($name);\n        self::assertSame($expected, $actual::class);\n    }\n\n    public static function providerCreateReader(): array\n    {\n        return [\n            ['Xls', Reader\\Xls::class],\n            ['Xlsx', Reader\\Xlsx::class],\n            ['Xml', Reader\\Xml::class],\n            ['Ods', Reader\\Ods::class],\n            ['Gnumeric', Reader\\Gnumeric::class],\n            ['Csv', Reader\\Csv::class],\n            ['Slk', Reader\\Slk::class],\n            ['Html', Reader\\Html::class],\n        ];\n    }\n\n    public function testRegisterReader(): void\n    {\n        IOFactory::registerReader('Custom', Reader\\Html::class);\n        $actual = IOFactory::createReader('Custom');\n        self::assertInstanceOf(Reader\\Html::class, $actual);\n    }\n\n    #[DataProvider('providerIdentify')]\n    public function testIdentifyCreateLoad(string $file, string $expectedName, string $expectedClass): void\n    {\n        $actual = IOFactory::identify($file);\n        self::assertSame($expectedName, $actual);\n        $actual = IOFactory::createReaderForFile($file);\n        self::assertSame($expectedClass, $actual::class);\n        IOFactory::load($file);\n    }\n\n    public static function providerIdentify(): array\n    {\n        return [\n            ['samples/templates/26template.xlsx', 'Xlsx', Reader\\Xlsx::class],\n            ['samples/templates/GnumericTest.gnumeric', 'Gnumeric', Reader\\Gnumeric::class],\n            ['tests/data/Reader/Gnumeric/PageSetup.gnumeric.unzipped.xml', 'Gnumeric', Reader\\Gnumeric::class],\n            ['samples/templates/old.gnumeric', 'Gnumeric', Reader\\Gnumeric::class],\n            ['samples/templates/30template.xls', 'Xls', Reader\\Xls::class],\n            ['samples/templates/OOCalcTest.ods', 'Ods', Reader\\Ods::class],\n            ['samples/templates/SylkTest.slk', 'Slk', Reader\\Slk::class],\n            ['samples/templates/excel2003.xml', 'Xml', Reader\\Xml::class],\n            // Following not readable by Excel.\n            //['samples/templates/Excel2003XMLTest.xml', 'Xml', Reader\\Xml::class],\n            ['samples/templates/46readHtml.html', 'Html', Reader\\Html::class],\n            ['tests/data/Reader/CSV/encoding.utf8bom.csv', 'Csv', Reader\\Csv::class],\n            ['tests/data/Reader/HTML/charset.UTF-16.lebom.html', 'Html', Reader\\Html::class],\n            ['tests/data/Reader/HTML/charset.UTF-8.bom.html', 'Html', Reader\\Html::class],\n        ];\n    }\n\n    public function testIdentifyInvalid(): void\n    {\n        $file = __DIR__ . '/../data/Reader/NotASpreadsheetFile.doc';\n\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Unable to identify a reader for this file');\n        IOFactory::identify($file);\n    }\n\n    public function testCreateInvalid(): void\n    {\n        $file = __DIR__ . '/../data/Reader/NotASpreadsheetFile.doc';\n\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Unable to identify a reader for this file');\n        IOFactory::createReaderForFile($file);\n    }\n\n    public function testLoadInvalid(): void\n    {\n        $file = __DIR__ . '/../data/Reader/NotASpreadsheetFile.doc';\n\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Unable to identify a reader for this file');\n        IOFactory::load($file);\n    }\n\n    public function testFormatAsExpected(): void\n    {\n        $fileName = 'samples/templates/30template.xls';\n\n        $actual = IOFactory::identify($fileName, [IOFactory::READER_XLS]);\n        self::assertSame('Xls', $actual);\n    }\n\n    public function testFormatNotAsExpectedThrowsException(): void\n    {\n        $fileName = 'samples/templates/30template.xls';\n\n        $this->expectException(ReaderException::class);\n        IOFactory::identify($fileName, [IOFactory::READER_ODS]);\n    }\n\n    public function testIdentifyNonExistingFileThrowException(): void\n    {\n        $this->expectException(ReaderException::class);\n\n        IOFactory::identify('/non/existing/file');\n    }\n\n    public function testIdentifyExistingDirectoryThrowExceptions(): void\n    {\n        $this->expectException(ReaderException::class);\n\n        IOFactory::identify('.');\n    }\n\n    public function testCreateInvalidWriter(): void\n    {\n        $this->expectException(Writer\\Exception::class);\n        $spreadsheet = new Spreadsheet();\n        IOFactory::createWriter($spreadsheet, 'bad');\n    }\n\n    public function testCreateInvalidReader(): void\n    {\n        $this->expectException(ReaderException::class);\n        IOFactory::createReader('bad');\n    }\n\n    public function testCreateReaderUnknownExtension(): void\n    {\n        $filename = 'samples/Reader2/sampleData/example1.tsv';\n        $reader = IOFactory::createReaderForFile($filename);\n        self::assertEquals('PhpOffice\\PhpSpreadsheet\\Reader\\Csv', $reader::class);\n    }\n\n    public function testCreateReaderCsvExtension(): void\n    {\n        $filename = 'samples/Reader2/sampleData/example1.csv';\n        $reader = IOFactory::createReaderForFile($filename);\n        self::assertEquals('PhpOffice\\PhpSpreadsheet\\Reader\\Csv', $reader::class);\n    }\n\n    public function testCreateReaderNoExtension(): void\n    {\n        $filename = 'samples/Reader/sampleData/example1xls';\n        $reader = IOFactory::createReaderForFile($filename);\n        self::assertEquals('PhpOffice\\PhpSpreadsheet\\Reader\\Xls', $reader::class);\n    }\n\n    public function testCreateReaderNotSpreadsheet(): void\n    {\n        $this->expectException(ReaderException::class);\n        $filename = __FILE__;\n        IOFactory::createReaderForFile($filename);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Issue1449Test.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue1449Test extends TestCase\n{\n    protected bool $skipTests = true;\n\n    public function testDeleteColumns(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet1->setTitle('Sheet1');\n        $sheet2->setTitle('Sheet2');\n        $sheet1->fromArray(\n            [\n                [3, 1, 2, 33, 1, 10, 20, 30, 40],\n                [4, 2, 3, 23, 2, 10, 20, 30, 40],\n                [5, 3, 4, 1, 3, 10, 20, 30, 40],\n                [6, 4, 6, 4, 3, 10, 20, 30, 40],\n                [7, 6, 6, 2, 2, 10, 20, 30, 40],\n            ],\n            null,\n            'C1',\n            true\n        );\n        $sheet1->getCell('A1')->setValue('=SUM(C4:F7)');\n        $sheet2->getCell('A1')->setValue('=SUM(Sheet1!C3:G5)');\n        $sheet1->removeColumn('F', 4);\n        self::assertSame('=SUM(C4:E7)', $sheet1->getCell('A1')->getValue());\n        if (!$this->skipTests) {\n            // References on another sheet not working yet.\n            self::assertSame('=Sheet1!SUM(C3:E5)', $sheet2->getCell('A1')->getValue());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteRows(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet1->setTitle('Sheet1');\n        $sheet2->setTitle('Sheet2');\n        $sheet1->fromArray(\n            [\n                [3, 1, 2, 33, 1, 10, 20, 30, 40],\n                [4, 2, 3, 23, 2, 10, 20, 30, 40],\n                [5, 3, 4, 1, 3, 10, 20, 30, 40],\n                [6, 4, 6, 4, 3, 10, 20, 30, 40],\n                [7, 6, 6, 2, 2, 10, 20, 30, 40],\n            ],\n            null,\n            'C1',\n            true\n        );\n        $sheet1->getCell('A1')->setValue('=SUM(C4:F7)');\n        $sheet2->getCell('A1')->setValue('=SUM(Sheet1!C3:G5)');\n        $sheet1->removeRow(4, 2);\n        self::assertSame('=SUM(C4:F5)', $sheet1->getCell('A1')->getValue());\n        if (!$this->skipTests) {\n            // References on another sheet not working yet.\n            self::assertSame('=Sheet1!SUM(C3:G3)', $sheet2->getCell('A1')->getValue());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Issue4521Test.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4521Test extends TestCase\n{\n    private string $outfile = '';\n\n    protected int $weirdMimetypeMajor = 8;\n\n    protected int $weirdMimetypeMinor1 = 1;\n\n    protected int $weirdMimetypeMinor2 = 2;\n\n    protected function tearDown(): void\n    {\n        if ($this->outfile !== '') {\n            unlink($this->outfile);\n            $this->outfile = '';\n        }\n    }\n\n    public function testEmptyFile(): void\n    {\n        $this->outfile = File::temporaryFilename();\n        file_put_contents($this->outfile, '');\n        $spreadsheet = IOFactory::load($this->outfile);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('A', $sheet->getHighestColumn());\n        self::assertSame(1, $sheet->getHighestRow());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCrlfFile(): void\n    {\n        if (PHP_MAJOR_VERSION === $this->weirdMimetypeMajor) {\n            if (\n                PHP_MINOR_VERSION === $this->weirdMimetypeMinor1\n                || PHP_MINOR_VERSION === $this->weirdMimetypeMinor2\n            ) {\n                self::markTestSkipped('Php mimetype bug with this release');\n            }\n        }\n        $this->outfile = File::temporaryFilename();\n        file_put_contents($this->outfile, \"\\r\\n\");\n        $spreadsheet = IOFactory::load($this->outfile);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('A', $sheet->getHighestColumn());\n        self::assertSame(1, $sheet->getHighestRow());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/NamedFormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NamedFormulaTest extends TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n        $this->spreadsheet = new Spreadsheet();\n\n        $this->spreadsheet->getActiveSheet()\n            ->setTitle('Sheet #1');\n\n        $worksheet2 = new Worksheet();\n        $worksheet2->setTitle('Sheet #2');\n        $this->spreadsheet->addSheet($worksheet2);\n\n        $this->spreadsheet->setActiveSheetIndex(0);\n    }\n\n    public function testAddNamedRange(): void\n    {\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('Foo', $this->spreadsheet->getActiveSheet(), '=19%')\n        );\n\n        self::assertCount(1, $this->spreadsheet->getDefinedNames());\n        self::assertCount(1, $this->spreadsheet->getNamedFormulae());\n        self::assertCount(0, $this->spreadsheet->getNamedRanges());\n    }\n\n    public function testAddDuplicateNamedRange(): void\n    {\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('Foo', $this->spreadsheet->getActiveSheet(), '=19%')\n        );\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('FOO', $this->spreadsheet->getActiveSheet(), '=16%')\n        );\n\n        self::assertCount(1, $this->spreadsheet->getNamedFormulae());\n        $formula = $this->spreadsheet->getNamedFormula('foo', $this->spreadsheet->getActiveSheet());\n        self::assertNotNull($formula);\n        self::assertSame(\n            '=16%',\n            $formula->getValue()\n        );\n    }\n\n    public function testAddScopedNamedFormulaWithSameName(): void\n    {\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('Foo', $this->spreadsheet->getActiveSheet(), '=19%')\n        );\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=16%', true)\n        );\n\n        self::assertCount(2, $this->spreadsheet->getNamedFormulae());\n        $formula = $this->spreadsheet->getNamedFormula('foo', $this->spreadsheet->getActiveSheet());\n        self::assertNotNull($formula);\n        self::assertSame(\n            '=19%',\n            $formula->getValue()\n        );\n        $formula = $this->spreadsheet->getNamedFormula('foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n        self::assertNotNull($formula);\n        self::assertSame(\n            '=16%',\n            $formula->getValue()\n        );\n    }\n\n    public function testRemoveNamedFormula(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            new NamedFormula('Foo', $this->spreadsheet->getActiveSheet(), '=16%')\n        );\n        $this->spreadsheet->addDefinedName(\n            new NamedFormula('Bar', $this->spreadsheet->getActiveSheet(), '=19%')\n        );\n\n        $this->spreadsheet->removeNamedFormula('Foo', $this->spreadsheet->getActiveSheet());\n\n        self::assertCount(1, $this->spreadsheet->getNamedFormulae());\n    }\n\n    public function testRemoveGlobalNamedFormulaWhenDuplicateNames(): void\n    {\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('Foo', $this->spreadsheet->getActiveSheet(), '=19%')\n        );\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=16%', true)\n        );\n\n        $this->spreadsheet->removeNamedFormula('Foo', $this->spreadsheet->getActiveSheet());\n\n        self::assertCount(1, $this->spreadsheet->getNamedFormulae());\n        $formula = $this->spreadsheet->getNamedFormula('foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n        self::assertNotNull($formula);\n        self::assertSame(\n            '=16%',\n            $formula->getValue()\n        );\n    }\n\n    public function testRemoveScopedNamedFormulaWhenDuplicateNames(): void\n    {\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('Foo', $this->spreadsheet->getActiveSheet(), '=19%')\n        );\n        $this->spreadsheet->addNamedFormula(\n            new NamedFormula('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=16%', true)\n        );\n\n        $this->spreadsheet->removeNamedFormula('Foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n\n        self::assertCount(1, $this->spreadsheet->getNamedFormulae());\n        $formula = $this->spreadsheet->getNamedFormula('foo');\n        self::assertNotNull($formula);\n        self::assertSame(\n            '=19%',\n            $formula->getValue()\n        );\n    }\n\n    public function testRemoveNonExistentNamedFormula(): void\n    {\n        self::assertCount(0, $this->spreadsheet->getNamedFormulae());\n        $this->spreadsheet->removeNamedFormula('Any');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/NamedRange2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Exception as Except;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NamedRange2Test extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function setUp(): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n\n        $worksheet1 = $spreadsheet->getActiveSheet();\n        $worksheet1->setTitle('SheetOne');\n        $spreadsheet->addNamedRange(\n            new NamedRange('FirstRel', $worksheet1, '=A1')\n        );\n        $spreadsheet->addNamedRange(\n            new NamedRange('FirstAbs', $worksheet1, '=$B$1')\n        );\n        $spreadsheet->addNamedRange(\n            new NamedRange('FirstRelMult', $worksheet1, '=C1:D2')\n        );\n        $spreadsheet->addNamedRange(\n            new NamedRange('FirstAbsMult', $worksheet1, '$E$3:$F$4')\n        );\n\n        $worksheet2 = $spreadsheet->createSheet();\n        $worksheet2->setTitle('SheetTwo');\n        $spreadsheet->addNamedRange(\n            new NamedRange('SecondRel', $worksheet2, '=A1')\n        );\n        $spreadsheet->addNamedRange(\n            new NamedRange('SecondAbs', $worksheet2, '=$B$1')\n        );\n        $spreadsheet->addNamedRange(\n            new NamedRange('SecondRelMult', $worksheet2, '=C1:D2')\n        );\n        $spreadsheet->addNamedRange(\n            new NamedRange('SecondAbsMult', $worksheet2, '$E$3:$F$4')\n        );\n\n        $spreadsheet->addDefinedName(DefinedName::createInstance('FirstFormula', $worksheet1, '=TODAY()-1'));\n        $spreadsheet->addDefinedName(DefinedName::createInstance('SecondFormula', $worksheet2, '=TODAY()-2'));\n\n        $this->spreadsheet->setActiveSheetIndex(0);\n    }\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    private function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    public function testNamedRangeSetStyle(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getSheet(0);\n        $sheet->getStyle('FirstRel')->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n        self::assertSame('yyyy-mm-dd', $sheet->getStyle('A1')->getNumberFormat()->getFormatCode());\n        $sheet->getStyle('FirstAbs')->getFont()->setName('Georgia');\n        self::assertSame('Georgia', $sheet->getStyle('B1')->getFont()->getName());\n        $sheet->getStyle('FirstRelMult')->getFont()->setItalic(true);\n        self::assertTrue($sheet->getStyle('D2')->getFont()->getItalic());\n        $sheet->getStyle('FirstAbsMult')->getFill()->setFillType('gray125');\n        self::assertSame('gray125', $sheet->getStyle('F4')->getFill()->getFillType());\n        self::assertSame('none', $sheet->getStyle('A1')->getFill()->getFillType());\n        $sheet = $spreadsheet->getSheet(1);\n        $sheet->getStyle('SecondAbsMult')->getFill()->setFillType('lightDown');\n        self::assertSame('lightDown', $sheet->getStyle('E3')->getFill()->getFillType());\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRangeOrFormula')]\n    public function testNamedRangeSetStyleBad(string $exceptionMessage, string $name): void\n    {\n        $this->expectException(Except::class);\n        $this->expectExceptionMessage($exceptionMessage);\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getSheet(0);\n        $sheet->getStyle($name)->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n        self::assertSame('yyyy-mm-dd', $sheet->getStyle('A1')->getNumberFormat()->getFormatCode());\n    }\n\n    public static function providerRangeOrFormula(): array\n    {\n        return [\n            'wrong sheet rel' => ['Invalid cell coordinate', 'SecondRel'],\n            'wrong sheet abs' => ['Invalid cell coordinate', 'SecondAbs'],\n            'wrong sheet relmult' => ['Invalid cell coordinate', 'SecondRelMult'],\n            'wrong sheet absmult' => ['Invalid cell coordinate', 'SecondAbsMult'],\n            'wrong sheet formula' => ['Invalid cell coordinate', 'SecondFormula'],\n            'right sheet formula' => ['Invalid cell coordinate', 'FirstFormula'],\n            'non-existent name' => ['Invalid cell coordinate', 'NonExistentName'],\n            'other sheet name' => ['Invalid Worksheet', 'SheetTwo!G7'],\n            'non-existent sheet name' => ['Invalid Worksheet', 'SheetAbc!G7'],\n            'unnamed formula' => ['Invalid cell coordinate', '=2+3'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/NamedRange3Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NamedRange3Test extends TestCase\n{\n    public function testSheetNamePlusDefinedName(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('sheet1');\n        $sheet1->setCellValue('B1', 100);\n        $sheet1->setCellValue('B2', 200);\n        $sheet1->setCellValue('B3', 300);\n        $sheet1->setCellValue('B4', 400);\n        $sheet1->setCellValue('B5', 500);\n\n        $sheet2 = $spreadsheet->createsheet();\n        $sheet2->setTitle('sheet2');\n        $sheet2->setCellValue('A1', 10);\n        $sheet2->setCellValue('A2', 20);\n        $sheet2->setCellValue('A3', 30);\n        $sheet2->setCellValue('A4', 40);\n        $sheet2->setCellValue('A5', 50);\n\n        $spreadsheet->addNamedRange(\n            new NamedRange('somecells', $sheet2, '$A$1:$A$5', true)\n        );\n        $spreadsheet->addNamedRange(\n            new NamedRange('cellsonsheet1', $sheet1, '$B$1:$B$5')\n        );\n\n        $sheet1->getCell('G1')->setValue('=SUM(cellsonsheet1)');\n        self::assertSame(1500, $sheet1->getCell('G1')->getCalculatedValue());\n        $sheet1->getCell('G2')->setValue('=SUM(sheet2!somecells)');\n        self::assertSame(150, $sheet1->getCell('G2')->getCalculatedValue());\n        $sheet1->getCell('G3')->setValue('=SUM(somecells)');\n        self::assertSame('#NAME?', $sheet1->getCell('G3')->getCalculatedValue());\n        $sheet1->getCell('G4')->setValue('=SUM(sheet2!cellsonsheet1)');\n        self::assertSame(1500, $sheet1->getCell('G4')->getCalculatedValue());\n        $sheet1->getCell('G5')->setValue('=SUM(sheet2xxx!cellsonsheet1)');\n        self::assertSame('#NAME?', $sheet1->getCell('G5')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/NamedRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NamedRangeTest extends TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n        $this->spreadsheet = new Spreadsheet();\n\n        $this->spreadsheet->getActiveSheet()\n            ->setTitle('Sheet #1');\n\n        $worksheet2 = new Worksheet();\n        $worksheet2->setTitle('Sheet #2');\n        $this->spreadsheet->addSheet($worksheet2);\n\n        $this->spreadsheet->setActiveSheetIndex(0);\n    }\n\n    public function testAddNamedRange(): void\n    {\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n\n        self::assertCount(1, $this->spreadsheet->getDefinedNames());\n        self::assertCount(1, $this->spreadsheet->getNamedRanges());\n        self::assertCount(0, $this->spreadsheet->getNamedFormulae());\n    }\n\n    public function testAddDuplicateNamedRange(): void\n    {\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('FOO', $this->spreadsheet->getActiveSheet(), '=B1')\n        );\n\n        self::assertCount(1, $this->spreadsheet->getNamedRanges());\n        $range = $this->spreadsheet->getNamedRange('foo', $this->spreadsheet->getActiveSheet());\n        self::assertNotNull($range);\n        self::assertSame(\n            '=B1',\n            $range->getValue()\n        );\n    }\n\n    public function testAddScopedNamedRangeWithSameName(): void\n    {\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=B1', true)\n        );\n\n        self::assertCount(2, $this->spreadsheet->getNamedRanges());\n        $range = $this->spreadsheet->getNamedRange('foo', $this->spreadsheet->getActiveSheet());\n        self::assertNotNull($range);\n        self::assertSame(\n            '=A1',\n            $range->getValue()\n        );\n        $range = $this->spreadsheet->getNamedRange('foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n        self::assertNotNull($range);\n        self::assertSame(\n            '=B1',\n            $range->getValue()\n        );\n    }\n\n    public function testRemoveNamedRange(): void\n    {\n        $this->spreadsheet->addDefinedName(\n            new NamedRange('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addDefinedName(\n            new NamedRange('Bar', $this->spreadsheet->getActiveSheet(), '=B1')\n        );\n\n        $this->spreadsheet->removeNamedRange('Foo', $this->spreadsheet->getActiveSheet());\n\n        self::assertCount(1, $this->spreadsheet->getNamedRanges());\n    }\n\n    public function testRemoveGlobalNamedRangeWhenDuplicateNames(): void\n    {\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=B1', true)\n        );\n\n        $this->spreadsheet->removeNamedRange('Foo', $this->spreadsheet->getActiveSheet());\n\n        self::assertCount(1, $this->spreadsheet->getNamedRanges());\n        $sheet = $this->spreadsheet->getNamedRange('foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n        self::assertNotNull($sheet);\n        self::assertSame(\n            '=B1',\n            $sheet->getValue()\n        );\n    }\n\n    public function testRemoveScopedNamedRangeWhenDuplicateNames(): void\n    {\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('Foo', $this->spreadsheet->getActiveSheet(), '=A1')\n        );\n        $this->spreadsheet->addNamedRange(\n            new NamedRange('FOO', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'), '=B1', true)\n        );\n\n        $this->spreadsheet->removeNamedRange('Foo', $this->spreadsheet->getSheetByNameOrThrow('Sheet #2'));\n\n        self::assertCount(1, $this->spreadsheet->getNamedRanges());\n        $range = $this->spreadsheet->getNamedRange('foo');\n        self::AssertNotNull($range);\n        self::assertSame(\n            '=A1',\n            $range->getValue()\n        );\n    }\n\n    public function testRemoveNonExistentNamedRange(): void\n    {\n        self::assertCount(0, $this->spreadsheet->getNamedRanges());\n        $this->spreadsheet->removeNamedRange('Any');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/BaseNoLoad.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader;\n\nclass BaseNoLoad extends BaseReader\n{\n    public function canRead(string $filename): bool\n    {\n        return $filename !== '';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/BaseNoLoadTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BaseNoLoadTest extends TestCase\n{\n    public function testBaseNoLoad(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Reader classes must implement their own loadSpreadsheetFromFile() method');\n        $reader = new BaseNoLoad();\n        $reader->load('unknown.file');\n    }\n\n    public function testBaseNoLoadInfo(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Reader classes must implement their own listWorksheetInfo() method');\n        $reader = new BaseNoLoad();\n        $reader->listWorksheetInfo('unknown.file');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/CreateBlankSheetIfNoneReadTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CreateBlankSheetIfNoneReadTest extends TestCase\n{\n    #[DataProvider('providerIdentify')]\n    public function testExceptionIfNoSheet(string $file, string $expectedName, string $expectedClass): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('out of bounds index: 0');\n        $actual = IOFactory::identify($file);\n        self::assertSame($expectedName, $actual);\n        $reader = IOFactory::createReaderForFile($file);\n        self::assertSame($expectedClass, $reader::class);\n        $sheetlist = ['Unknown sheetname'];\n        $reader->setLoadSheetsOnly($sheetlist);\n        $reader->load($file);\n    }\n\n    #[DataProvider('providerIdentify')]\n    public function testCreateSheetIfNoSheet(string $file, string $expectedName, string $expectedClass): void\n    {\n        $actual = IOFactory::identify($file);\n        self::assertSame($expectedName, $actual);\n        $reader = IOFactory::createReaderForFile($file);\n        self::assertSame($expectedClass, $reader::class);\n        $reader->setCreateBlankSheetIfNoneRead(true);\n        $sheetlist = ['Unknown sheetname'];\n        $reader->setLoadSheetsOnly($sheetlist);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Worksheet', $sheet->getTitle());\n        self::assertCount(1, $spreadsheet->getAllSheets());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIdentify(): array\n    {\n        return [\n            ['samples/templates/26template.xlsx', 'Xlsx', Reader\\Xlsx::class],\n            ['samples/templates/GnumericTest.gnumeric', 'Gnumeric', Reader\\Gnumeric::class],\n            ['samples/templates/30template.xls', 'Xls', Reader\\Xls::class],\n            ['samples/templates/OOCalcTest.ods', 'Ods', Reader\\Ods::class],\n            ['samples/templates/excel2003.xml', 'Xml', Reader\\Xml::class],\n        ];\n    }\n\n    public function testUsingFlage(): void\n    {\n        $file = 'samples/templates/26template.xlsx';\n        $reader = IOFactory::createReaderForFile($file);\n        $sheetlist = ['Unknown sheetname'];\n        $reader->setLoadSheetsOnly($sheetlist);\n        $spreadsheet = $reader->load($file, Reader\\BaseReader::CREATE_BLANK_SHEET_IF_NONE_READ);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Worksheet', $sheet->getTitle());\n        self::assertCount(1, $spreadsheet->getAllSheets());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/BinderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BinderTest extends TestCase\n{\n    public function testLoadFromString(): void\n    {\n        $data = <<<EOF\n            1,2,3\n            4,5,6\n            EOF;\n        $reader1 = new Csv();\n        $spreadsheet1 = $reader1->loadSpreadsheetFromString($data);\n        $sheet1 = $spreadsheet1->getActiveSheet();\n        $sheet1->getCell('A3')->setValueExplicit(7, DataType::TYPE_STRING);\n        $sheet1->getCell('B3')->setValueExplicit(8, DataType::TYPE_NUMERIC);\n        $sheet1->setCellValue('C3', 9);\n        $sheet1->fromArray([10, 11, 12], null, 'A4');\n        $expected1 = [\n            [1, 2, 3],\n            [4, 5, 6],\n            ['7', 8, 9],\n            [10, 11, 12],\n        ];\n        self::AssertSame($expected1, $sheet1->toArray(null, false, false));\n\n        $reader2 = new Csv();\n        $reader2->setValueBinder(new StringValueBinder());\n        self::assertInstanceOf(StringValueBinder::class, $reader2->getValueBinder());\n        $spreadsheet2 = $reader2->loadSpreadsheetFromString($data);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $sheet2->getCell('A3')->setValueExplicit(7, DataType::TYPE_STRING);\n        $sheet2->getCell('B3')->setValueExplicit(8, DataType::TYPE_NUMERIC);\n        $sheet2->setCellValue('C3', 9);\n        $sheet2->fromArray([10, 11, 12], null, 'A4');\n        $expected2 = [\n            ['1', '2', '3'],\n            ['4', '5', '6'],\n            ['7', 8, '9'],\n            ['10', '11', '12'],\n        ];\n        self::AssertSame($expected2, $sheet2->toArray(null, false, false));\n\n        $spreadsheet1->disconnectWorksheets();\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvCallbackTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvCallbackTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        Csv::setConstructorCallback(null);\n    }\n\n    public function callbackDoNothing(mixed $obj): void\n    {\n        self::assertInstanceOf(Csv::class, $obj);\n    }\n\n    public function testCallbackDoNothing(): void\n    {\n        Csv::setConstructorCallback([$this, 'callbackDoNothing']);\n        $filename = 'tests/data/Reader/CSV/encoding.iso88591.csv';\n        $reader = new Csv();\n        $reader->setInputEncoding(Csv::GUESS_ENCODING);\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Å', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function callbackSetFallbackEncoding(Csv $reader): void\n    {\n        $reader->setFallbackEncoding('ISO-8859-2');\n        $reader->setInputEncoding(Csv::GUESS_ENCODING);\n        $reader->setSheetNameIsFileName(true);\n        $reader->setEscapeCharacter('');\n    }\n\n    public function testFallbackEncodingDefltIso2(): void\n    {\n        Csv::setConstructorCallback([$this, 'callbackSetFallbackEncoding']);\n        $filename = 'tests/data/Reader/CSV/premiere.win1252.csv';\n        $reader = new Csv();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('premičre', $sheet->getCell('A1')->getValue());\n        self::assertEquals('sixičme', $sheet->getCell('C2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIOFactory(): void\n    {\n        Csv::setConstructorCallback([$this, 'callbackSetFallbackEncoding']);\n        $filename = 'tests/data/Reader/CSV/premiere.win1252.csv';\n        $spreadsheet = IOFactory::load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('premičre', $sheet->getCell('A1')->getValue());\n        self::assertEquals('sixičme', $sheet->getCell('C2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNonFallbackEncoding(): void\n    {\n        Csv::setConstructorCallback([$this, 'callbackSetFallbackEncoding']);\n        $filename = 'tests/data/Reader/CSV/premiere.utf16be.csv';\n        $reader = new Csv();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('première', $sheet->getCell('A1')->getValue());\n        self::assertEquals('sixième', $sheet->getCell('C2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefaultEscape(): void\n    {\n        self::assertNull(Csv::getConstructorCallback());\n        $filename = 'tests/data/Reader/CSV/escape.csv';\n        $spreadsheet = IOFactory::load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        // this is not how Excel views the file\n        self::assertEquals('a\\\"hello', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBetterEscape(): void\n    {\n        Csv::setConstructorCallback([$this, 'callbackSetFallbackEncoding']);\n        $filename = 'tests/data/Reader/CSV/escape.csv';\n        $spreadsheet = IOFactory::load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        // this is how Excel views the file\n        self::assertEquals('a\\\"hello;hello;hello;\\\"', $sheet->getCell('A1')->getValue());\n        self::assertSame('escape', $sheet->getTitle(), 'callback set sheet title to use file name rather than default');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousFilter.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\n/**  Define a Read Filter class implementing IReadFilter  */\nclass CsvContiguousFilter implements IReadFilter\n{\n    private int $startRow = 0;\n\n    private int $endRow = 0;\n\n    private int $filterType = 0;\n\n    /**\n     * Set the list of rows that we want to read.\n     */\n    public function setRows(int $startRow, int $chunkSize): void\n    {\n        $this->startRow = $startRow;\n        $this->endRow = $startRow + $chunkSize;\n    }\n\n    public function setFilterType(int $type): void\n    {\n        $this->filterType = $type;\n    }\n\n    public function filter1(int $row): bool\n    {\n        //  Include rows 1-10, followed by 100-110, etc.\n        return $row % 100 <= 10;\n    }\n\n    public function filter0(int $row): bool\n    {\n        //  Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow\n        if (($row == 1) || ($row >= $this->startRow && $row < $this->endRow)) {\n            return true;\n        }\n\n        return false;\n    }\n\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        if ($this->filterType == 1) {\n            return $this->filter1($row);\n        }\n\n        return $this->filter0($row);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvContiguousTest extends TestCase\n{\n    private string $inputFileName = 'samples/Reader2/sampleData/example2.csv';\n\n    public function testContiguous(): void\n    {\n        // Create a new Reader of the type defined in $inputFileType\n        $reader = new Csv();\n\n        // Define how many rows we want to read for each \"chunk\"\n        $chunkSize = 100;\n        // Create a new Instance of our Read Filter\n        $chunkFilter = new CsvContiguousFilter();\n\n        // Tell the Reader that we want to use the Read Filter that we've Instantiated\n        // and that we want to store it in contiguous rows/columns\n        self::assertFalse($reader->getContiguous());\n        $reader->setReadFilter($chunkFilter);\n        $reader->setContiguous(true);\n\n        // Instantiate a new PhpSpreadsheet object manually\n        $spreadsheet = new Spreadsheet();\n\n        // Set a sheet index\n        $sheet = 0;\n        // Loop to read our worksheet in \"chunk size\" blocks\n        /**  $startRow is set to 2 initially because we always read the headings in row #1  * */\n        for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {\n            // Tell the Read Filter, the limits on which rows we want to read this iteration\n            $chunkFilter->setRows($startRow, $chunkSize);\n\n            // Increment the worksheet index pointer for the Reader\n            $reader->setSheetIndex($sheet);\n            // Load only the rows that match our filter into a new worksheet in the PhpSpreadsheet Object\n            $reader->loadIntoExisting($this->inputFileName, $spreadsheet);\n            // Set the worksheet title (to reference the \"sheet\" of data that we've loaded)\n            // and increment the sheet index as well\n            $spreadsheet->getActiveSheet()->setTitle('Country Data #' . (++$sheet));\n        }\n\n        self::assertSame('Kabul', self::getCellValue($spreadsheet, 'Country Data #1', 'A2'));\n        self::assertSame('Lesotho', self::getCellValue($spreadsheet, 'Country Data #2', 'B4'));\n        self::assertSame('-20.1', self::getCellValue($spreadsheet, 'Country Data #3', 'C6'));\n    }\n\n    private static function getCellValue(Spreadsheet $spreadsheet, string $sheetName, string $cellAddress): string\n    {\n        $sheet = $spreadsheet->getSheetByNameOrThrow($sheetName);\n        $result = '';\n        $value = $sheet->getCell($cellAddress)->getValue();\n        if (is_scalar($value) || (is_object($value) && method_exists($value, '__toString'))) {\n            $result = (string) $value;\n        }\n\n        return $result;\n    }\n\n    public function testContiguous2(): void\n    {\n        // Create a new Reader of the type defined in $inputFileType\n        $reader = new Csv();\n\n        // Create a new Instance of our Read Filter\n        $chunkFilter = new CsvContiguousFilter();\n        $chunkFilter->setFilterType(1);\n\n        // Tell the Reader that we want to use the Read Filter that we've Instantiated\n        // and that we want to store it in contiguous rows/columns\n        $reader->setReadFilter($chunkFilter);\n        $reader->setContiguous(true);\n\n        // Instantiate a new PhpSpreadsheet object manually\n        $spreadsheet = new Spreadsheet();\n\n        // Loop to read our worksheet in \"chunk size\" blocks\n        $reader->loadIntoExisting($this->inputFileName, $spreadsheet);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Kabul', $sheet->getCell('A2')->getValue());\n        self::assertEquals('Kuwait', $sheet->getCell('B11')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvEncodingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvEncodingTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerEncodings')]\n    public function testEncodings(string $filename, string $encoding): void\n    {\n        $reader = new Csv();\n        $reader->setInputEncoding($encoding);\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Å', $sheet->getCell('A1')->getValue());\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerEncodings')]\n    public function testWorkSheetInfo(string $filename, string $encoding): void\n    {\n        $reader = new Csv();\n        $reader->setInputEncoding($encoding);\n        $info = $reader->listWorksheetInfo($filename);\n        self::assertCount(1, $info);\n        self::assertSame('Worksheet', $info[0]['worksheetName']);\n        self::assertSame('B', $info[0]['lastColumnLetter']);\n        self::assertSame(1, $info[0]['lastColumnIndex']);\n        self::assertSame(2, $info[0]['totalRows']);\n        self::assertSame(2, $info[0]['totalColumns']);\n        self::assertSame(['Worksheet'], $reader->listWorksheetNames($filename));\n    }\n\n    public static function providerEncodings(): array\n    {\n        return [\n            ['tests/data/Reader/CSV/encoding.iso88591.csv', 'ISO-8859-1'],\n            ['tests/data/Reader/CSV/encoding.utf8.csv', 'UTF-8'],\n            ['tests/data/Reader/CSV/encoding.utf8bom.csv', 'UTF-8'],\n            ['tests/data/Reader/CSV/encoding.utf16be.csv', 'UTF-16BE'],\n            ['tests/data/Reader/CSV/encoding.utf16le.csv', 'UTF-16LE'],\n            ['tests/data/Reader/CSV/encoding.utf32be.csv', 'UTF-32BE'],\n            ['tests/data/Reader/CSV/encoding.utf32le.csv', 'UTF-32LE'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGuessEncoding')]\n    public function testGuessEncoding(string $filename): void\n    {\n        $reader = new Csv();\n        $reader->setInputEncoding(Csv::guessEncoding($filename));\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('première', $sheet->getCell('A1')->getValue());\n        self::assertEquals('sixième', $sheet->getCell('C2')->getValue());\n    }\n\n    public function testSurrogate(): void\n    {\n        // Surrogates should occur only in UTF-16, and should\n        //   be properly converted to UTF8 when read.\n        // FFFE/FFFF are illegal, and should be converted to\n        //   substitution character when read.\n        // Excel does not handle any of the cells in row 3 well.\n        // LibreOffice handles A3 fine, and discards B3/C3,\n        //   which is a reasonable action.\n        $filename = 'tests/data/Reader/CSV/premiere.utf16le.csv';\n        $reader = new Csv();\n        $reader->setInputEncoding(Csv::guessEncoding($filename));\n        $names = $reader->listWorksheetNames($filename);\n        // Following ignored, just make sure it's executable.\n        $reader->setLoadSheetsOnly([$names[0]]);\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('𐐀', $sheet->getCell('A3')->getValue());\n        self::assertEquals('�', $sheet->getCell('B3')->getValue());\n        self::assertEquals('�', $sheet->getCell('C3')->getValue());\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerGuessEncoding')]\n    public function testFallbackEncoding(string $filename): void\n    {\n        $reader = new Csv();\n        $reader->setInputEncoding(Csv::GUESS_ENCODING);\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('première', $sheet->getCell('A1')->getValue());\n        self::assertEquals('sixième', $sheet->getCell('C2')->getValue());\n    }\n\n    public static function providerGuessEncoding(): array\n    {\n        return [\n            ['tests/data/Reader/CSV/premiere.utf8.csv'],\n            ['tests/data/Reader/CSV/premiere.utf8bom.csv'],\n            ['tests/data/Reader/CSV/premiere.utf16be.csv'],\n            ['tests/data/Reader/CSV/premiere.utf16bebom.csv'],\n            ['tests/data/Reader/CSV/premiere.utf16le.csv'],\n            ['tests/data/Reader/CSV/premiere.utf16lebom.csv'],\n            ['tests/data/Reader/CSV/premiere.utf32be.csv'],\n            ['tests/data/Reader/CSV/premiere.utf32bebom.csv'],\n            ['tests/data/Reader/CSV/premiere.utf32le.csv'],\n            ['tests/data/Reader/CSV/premiere.utf32lebom.csv'],\n            ['tests/data/Reader/CSV/premiere.win1252.csv'],\n        ];\n    }\n\n    public function testGuessEncodingDefltIso2(): void\n    {\n        $filename = 'tests/data/Reader/CSV/premiere.win1252.csv';\n        $reader = new Csv();\n        $reader->setInputEncoding(Csv::guessEncoding($filename, 'ISO-8859-2'));\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('premičre', $sheet->getCell('A1')->getValue());\n        self::assertEquals('sixičme', $sheet->getCell('C2')->getValue());\n    }\n\n    public function testFallbackEncodingDefltIso2(): void\n    {\n        $filename = 'tests/data/Reader/CSV/premiere.win1252.csv';\n        $reader = new Csv();\n        self::assertSame('CP1252', $reader->getFallbackEncoding());\n        $reader->setInputEncoding(Csv::GUESS_ENCODING);\n        $reader->setFallbackEncoding('ISO-8859-2');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('premičre', $sheet->getCell('A1')->getValue());\n        self::assertEquals('sixičme', $sheet->getCell('C2')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvIssue2232Test extends TestCase\n{\n    private IValueBinder $valueBinder;\n\n    private string $locale;\n\n    protected function setUp(): void\n    {\n        $this->valueBinder = Cell::getValueBinder();\n        $this->locale = Settings::getLocale();\n    }\n\n    protected function tearDown(): void\n    {\n        Cell::setValueBinder($this->valueBinder);\n        Settings::setLocale($this->locale);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerIssue2232')]\n    public function testBooleanConversions(bool $useStringBinder, ?bool $preserveBoolString, bool|string $b2Value, bool|string $b3Value): void\n    {\n        if ($useStringBinder) {\n            $binder = new StringValueBinder();\n            if (is_bool($preserveBoolString)) {\n                $binder->setBooleanConversion($preserveBoolString);\n            }\n            Cell::setValueBinder($binder);\n        }\n        $reader = new Csv();\n        $filename = 'tests/data/Reader/CSV/issue.2232.csv';\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($b2Value, $sheet->getCell('B2')->getValue());\n        self::assertSame($b3Value, $sheet->getCell('B3')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIssue2232(): array\n    {\n        return [\n            [false, false, false, true],\n            [false, null, false, true],\n            [false, true, false, true],\n            [true, false, false, true],\n            [true, null, 'FaLSe', 'tRUE'],\n            [true, true, 'FaLSe', 'tRUE'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerIssue2232locale')]\n    public function testBooleanConversionsLocaleAware(bool $useStringBinder, ?bool $preserveBoolString, mixed $b2Value, mixed $b3Value, mixed $b4Value, mixed $b5Value): void\n    {\n        if ($useStringBinder) {\n            $binder = new StringValueBinder();\n            if (is_bool($preserveBoolString)) {\n                $binder->setBooleanConversion($preserveBoolString);\n            }\n            Cell::setValueBinder($binder);\n        }\n\n        Settings::setLocale('fr');\n\n        $reader = new Csv();\n        $filename = 'tests/data/Reader/CSV/issue.2232.csv';\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($b2Value, $sheet->getCell('B2')->getValue());\n        self::assertSame($b3Value, $sheet->getCell('B3')->getValue());\n        self::assertSame($b4Value, $sheet->getCell('B4')->getValue());\n        self::assertSame($b5Value, $sheet->getCell('B5')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerIssue2232locale(): array\n    {\n        return [\n            'string binder preserve boolean string' => [true, true, 'FaLSe', 'tRUE', 'Faux', 'Vrai'],\n            'string binder convert boolean string' => [true, false, false, true, false, true],\n            'default binder' => [false, null, false, true, false, true],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2840Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvIssue2840Test extends TestCase\n{\n    public function testNullStringIgnore(): void\n    {\n        $reader = new Csv();\n        self::assertFalse($reader->getPreserveNullString());\n        $inputData = <<<EOF\n            john,,doe,,\n            mary,,jane,,\n            EOF;\n        $expected = [\n            ['john', null, 'doe'],\n            ['mary', null, 'jane'],\n        ];\n        $spreadsheet = $reader->loadSpreadsheetFromString($inputData);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($expected, $sheet->toArray());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNullStringLoad(): void\n    {\n        $reader = new Csv();\n        $reader->setPreserveNullString(true);\n        $inputData = <<<EOF\n            john,,doe,,\n            mary,,jane,,\n            EOF;\n        $expected = [\n            ['john', '', 'doe', '', ''],\n            ['mary', '', 'jane', '', ''],\n        ];\n        $spreadsheet = $reader->loadSpreadsheetFromString($inputData);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($expected, $sheet->toArray());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvLineEndingTest extends TestCase\n{\n    private string $tempFile = '';\n\n    private static bool $alwaysFalse = false;\n\n    protected function tearDown(): void\n    {\n        if ($this->tempFile !== '') {\n            unlink($this->tempFile);\n            $this->tempFile = '';\n        }\n    }\n\n    #[DataProvider('providerEndings')]\n    #[DataProvider('providerEndings2')]\n    public function testEndings(string $ending, int $version = PHP_VERSION_ID): void\n    {\n        if ($ending === \"\\r\" && $version >= 90000) {\n            self::markTestSkipped('Mac line endings not supported for Php9+');\n        }\n        $this->tempFile = $filename = File::temporaryFilename();\n        $data = ['123', '456', '789'];\n        file_put_contents($filename, implode($ending, $data));\n        $reader = new Csv();\n        if (Csv::DEFAULT_TEST_AUTODETECT === self::$alwaysFalse) {\n            $reader->setTestAutoDetect(true);\n        }\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals($data[0], $sheet->getCell('A1')->getValue());\n        self::assertEquals($data[1], $sheet->getCell('A2')->getValue());\n        self::assertEquals($data[2], $sheet->getCell('A3')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('providerEndings')]\n    public function testEndingsNoDetect(string $ending): void\n    {\n        $this->tempFile = $filename = File::temporaryFilename();\n        $data = ['123', '456', '789'];\n        file_put_contents($filename, implode($ending, $data));\n        $reader = new Csv();\n        self::assertSame(self::$alwaysFalse, Csv::DEFAULT_TEST_AUTODETECT);\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        if ($ending === \"\\r\") {\n            // Can't handle Mac line endings without autoDetect\n            self::assertEquals(implode(\"\\n\", $data), $sheet->getCell('A1')->getValue());\n            self::assertNull($sheet->getCell('A2')->getValue());\n            self::assertNull($sheet->getCell('A3')->getValue());\n        } else {\n            self::assertEquals($data[0], $sheet->getCell('A1')->getValue());\n            self::assertEquals($data[1], $sheet->getCell('A2')->getValue());\n            self::assertEquals($data[2], $sheet->getCell('A3')->getValue());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerEndings(): array\n    {\n        return [\n            'Unix endings' => [\"\\n\"],\n            'Mac endings' => [\"\\r\"],\n            'Windows endings' => [\"\\r\\n\"],\n        ];\n    }\n\n    public static function providerEndings2(): array\n    {\n        return [\n            'Mac endings Php9+' => [\"\\r\", 90000],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvLoadFromStringTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvLoadFromStringTest extends TestCase\n{\n    public function testLoadFromString(): void\n    {\n        $data = <<<EOF\n            1,2,3\n            4,2+3,6\n            \"7 , 8\", 9, 10\n            11,\"12\n            13\",14\n            EOF;\n        $reader = new Csv();\n        $spreadsheet = $reader->loadSpreadsheetFromString($data);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::AssertSame('2+3', $sheet->getCell('B2')->getValue());\n        self::AssertSame('7 , 8', $sheet->getCell('A3')->getValue());\n        self::AssertSame(\"12\\n13\", $sheet->getCell('B4')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvNumberFormatLocaleTest extends TestCase\n{\n    private bool $localeAdjusted;\n\n    /**\n     * @var false|string\n     */\n    private $currentLocale;\n\n    protected string $filename;\n\n    protected Csv $csvReader;\n\n    protected function setUp(): void\n    {\n        $this->currentLocale = setlocale(LC_ALL, '0');\n\n        if (!setlocale(LC_ALL, 'de_DE.UTF-8', 'deu_deu.utf8')) {\n            $this->localeAdjusted = false;\n\n            return;\n        }\n\n        $this->localeAdjusted = true;\n\n        $this->filename = 'tests/data/Reader/CSV/NumberFormatTest.de.csv';\n        $this->csvReader = new Csv();\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setThousandsSeparator(null);\n        StringHelper::setDecimalSeparator(null);\n    }\n\n    protected function tearDown(): void\n    {\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setThousandsSeparator(null);\n        StringHelper::setDecimalSeparator(null);\n        if ($this->localeAdjusted && is_string($this->currentLocale)) {\n            setlocale(LC_ALL, $this->currentLocale);\n        }\n    }\n\n    #[DataProvider('providerNumberFormatNoConversionTest')]\n    public function testNumberFormatNoConversion(mixed $expectedValue, string $expectedFormat, string $cellAddress): void\n    {\n        if (!$this->localeAdjusted) {\n            self::markTestSkipped('Unable to set locale for testing.');\n        }\n        $localeconv = localeconv();\n        self::assertSame(',', $localeconv['decimal_point'], 'unexpected change to German decimal separator');\n        self::assertSame('.', $localeconv['thousands_sep'], 'unexpected change to German thousands separator');\n\n        $spreadsheet = $this->csvReader->load($this->filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $cell = $worksheet->getCell($cellAddress);\n\n        self::assertSame($expectedValue, $cell->getValue(), 'Expected value check');\n        self::assertSame($expectedFormat, $cell->getFormattedValue(), 'Format mask check');\n    }\n\n    public static function providerNumberFormatNoConversionTest(): array\n    {\n        return [\n            [\n                -123,\n                '-123',\n                'A1',\n            ],\n            [\n                '12.345,67',\n                '12.345,67',\n                'C1',\n            ],\n            [\n                '-1.234,567',\n                '-1.234,567',\n                'A3',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerNumberValueConversionTest')]\n    public function testNumberValueConversion(mixed $expectedValue, string $cellAddress): void\n    {\n        if (!$this->localeAdjusted) {\n            self::markTestSkipped('Unable to set locale for testing.');\n        }\n        $localeconv = localeconv();\n        self::assertSame(',', $localeconv['decimal_point'], 'unexpected change to German decimal separator');\n        self::assertSame('.', $localeconv['thousands_sep'], 'unexpected change to German thousands separator');\n\n        $this->csvReader->castFormattedNumberToNumeric(true);\n        $spreadsheet = $this->csvReader->load($this->filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $cell = $worksheet->getCell($cellAddress);\n\n        self::assertSame(DataType::TYPE_NUMERIC, $cell->getDataType(), 'Datatype check');\n        self::assertSame($expectedValue, $cell->getValue(), 'Expected value check');\n    }\n\n    public static function providerNumberValueConversionTest(): array\n    {\n        return [\n            'A1' => [\n                -123,\n                'A1',\n            ],\n            'B1' => [\n                1234,\n                'B1',\n            ],\n            'C1' => [\n                12345.67,\n                'C1',\n            ],\n            'A2' => [\n                123.4567,\n                'A2',\n            ],\n            'B2' => [\n                123.456789012,\n                'B2',\n            ],\n            'A3' => [\n                -1234.567,\n                'A3',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvNumberFormatTest extends TestCase\n{\n    protected string $filename;\n\n    protected Csv $csvReader;\n\n    protected function setUp(): void\n    {\n        $this->filename = 'tests/data/Reader/CSV/NumberFormatTest.csv';\n        $this->csvReader = new Csv();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNumberFormatNoConversionTest')]\n    public function testNumberFormatNoConversion(int|string $expectedValue, string $expectedFormat, string $cellAddress): void\n    {\n        $spreadsheet = $this->csvReader->load($this->filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $cell = $worksheet->getCell($cellAddress);\n\n        self::assertSame($expectedValue, $cell->getValue(), 'Expected value check');\n        self::assertSame($expectedFormat, $cell->getFormattedValue(), 'Format mask check');\n    }\n\n    public static function providerNumberFormatNoConversionTest(): array\n    {\n        return [\n            [\n                -123,\n                '-123',\n                'A1',\n            ],\n            [\n                '12,345.67',\n                '12,345.67',\n                'C1',\n            ],\n            [\n                '-1,234.567',\n                '-1,234.567',\n                'A3',\n            ],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNumberValueConversionTest')]\n    public function testNumberValueConversion(mixed $expectedValue, string $cellAddress): void\n    {\n        $this->csvReader->castFormattedNumberToNumeric(true);\n        $spreadsheet = $this->csvReader->load($this->filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $cell = $worksheet->getCell($cellAddress);\n\n        self::assertSame(DataType::TYPE_NUMERIC, $cell->getDataType(), 'Datatype check');\n        self::assertSame($expectedValue, $cell->getValue(), 'Expected value check');\n    }\n\n    public static function providerNumberValueConversionTest(): array\n    {\n        return [\n            'A1' => [\n                -123,\n                'A1',\n            ],\n            'B1' => [\n                1234,\n                'B1',\n            ],\n            'C1' => [\n                12345.67,\n                'C1',\n            ],\n            'A2' => [\n                123.4567,\n                'A2',\n            ],\n            'B2' => [\n                123.456789012,\n                'B2',\n            ],\n            'A3' => [\n                -1234.567,\n                'A3',\n            ],\n            'B3' => [\n                1234.567,\n                'B3',\n            ],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerNumberFormatConversionTest')]\n    public function testNumberFormatConversion(mixed $expectedValue, string $expectedFormat, string $cellAddress): void\n    {\n        $this->csvReader->castFormattedNumberToNumeric(true, true);\n        $spreadsheet = $this->csvReader->load($this->filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $cell = $worksheet->getCell($cellAddress);\n\n        self::assertSame(DataType::TYPE_NUMERIC, $cell->getDataType(), 'Datatype check');\n        self::assertSame($expectedValue, $cell->getValue(), 'Expected value check');\n        self::assertSame($expectedFormat, $cell->getFormattedValue(), 'Format mask check');\n    }\n\n    public static function providerNumberFormatConversionTest(): array\n    {\n        return [\n            'A1' => [\n                -123,\n                '-123',\n                'A1',\n            ],\n            'B1' => [\n                1234,\n                '1,234',\n                'B1',\n            ],\n            'C1' => [\n                12345.67,\n                '12,345.67',\n                'C1',\n            ],\n            'A2' => [\n                123.4567,\n                '123.4567',\n                'A2',\n            ],\n            'B2' => [\n                123.456789012,\n                '123.456789',\n                'B2',\n            ],\n            'A3' => [\n                -1234.567,\n                '-1,234.567',\n                'A3',\n            ],\n            'B3' => [\n                1234.567,\n                '1234.567',\n                'B3',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CsvTest extends TestCase\n{\n    #[DataProvider('providerDelimiterDetection')]\n    public function testDelimiterDetection(string $filename, string $expectedDelimiter, string $cell, string|float|int|null $expectedValue): void\n    {\n        $reader = new Csv();\n        $delim1 = $reader->getDelimiter();\n        self::assertNull($delim1);\n\n        $spreadsheet = $reader->load($filename);\n\n        self::assertSame($expectedDelimiter, $reader->getDelimiter(), 'should be able to infer the delimiter');\n\n        $actual = $spreadsheet->getActiveSheet()->getCell($cell)->getValue();\n        self::assertSame($expectedValue, $actual, 'should be able to retrieve correct value');\n    }\n\n    public static function providerDelimiterDetection(): array\n    {\n        return [\n            [\n                'tests/data/Reader/CSV/enclosure.csv',\n                ',',\n                'C4',\n                'username2',\n            ],\n            [\n                'tests/data/Reader/CSV/semicolon_separated.csv',\n                ';',\n                'C2',\n                '25,5',\n            ],\n            [\n                'tests/data/Reader/CSV/line_break_in_enclosure.csv',\n                ',',\n                'A3',\n                'Test',\n            ],\n            [\n                'tests/data/Reader/CSV/line_break_in_enclosure_with_escaped_quotes.csv',\n                ',',\n                'A3',\n                'Test',\n            ],\n            [\n                'tests/data/Reader/HTML/csv_with_angle_bracket.csv',\n                ',',\n                'B1',\n                'Number of items with weight <= 50kg',\n            ],\n            [\n                'samples/Reader2/sampleData/example1.csv',\n                ',',\n                'I4',\n                '100%',\n            ],\n            [\n                'samples/Reader2/sampleData/example2.csv',\n                ',',\n                'D8',\n                -58.373161,\n            ],\n            [\n                'tests/data/Reader/CSV/empty.csv',\n                ',',\n                'A1',\n                null,\n            ],\n            [\n                'tests/data/Reader/CSV/no_delimiter.csv',\n                ',',\n                'A1',\n                'SingleLine',\n            ],\n        ];\n    }\n\n    #[DataProvider('providerCanLoad')]\n    public function testCanLoad(bool $expected, string $filename): void\n    {\n        $reader = new Csv();\n        self::assertSame($expected, $reader->canRead($filename));\n    }\n\n    public static function providerCanLoad(): array\n    {\n        return [\n            [false, 'tests/data/Reader/Ods/data.ods'],\n            [false, 'samples/templates/excel2003.xml'],\n            [true, 'tests/data/Reader/CSV/enclosure.csv'],\n            [true, 'tests/data/Reader/CSV/semicolon_separated.csv'],\n            [true, 'tests/data/Reader/CSV/contains_html.csv'],\n            [true, 'tests/data/Reader/CSV/csv_without_extension'],\n            [true, 'tests/data/Reader/HTML/csv_with_angle_bracket.csv'],\n            [true, 'tests/data/Reader/CSV/empty.csv'],\n            [true, 'samples/Reader2/sampleData/example1.csv'],\n            [true, 'samples/Reader2/sampleData/example2.csv'],\n        ];\n    }\n\n    #[DataProvider('providerVersion')]\n    public function testEscapeCharacters(int $version): void\n    {\n        if ($version >= 90000) {\n            $this->expectException(ReaderException::class);\n            $this->expectExceptionMessage('Escape character must be null string');\n        }\n        $reader = new Csv();\n        if ($version === PHP_VERSION_ID) {\n            $reader->setEscapeCharacter('\"');\n        } else {\n            $reader->setEscapeCharacter('\"', $version);\n        }\n        $worksheet = $reader->load('tests/data/Reader/CSV/backslash.csv')\n            ->getActiveSheet();\n\n        $expected = [\n            ['field 1', 'field 2\\\\'],\n            ['field 3\\\\', 'field 4'],\n        ];\n\n        self::assertSame('\"', $reader->getEscapeCharacter());\n        self::assertSame($expected, $worksheet->toArray());\n    }\n\n    public static function providerVersion(): array\n    {\n        return [\n            [PHP_VERSION_ID],\n            [90000],\n        ];\n    }\n\n    public function testInvalidWorkSheetInfo(): void\n    {\n        $this->expectException(ReaderException::class);\n        $reader = new Csv();\n        $reader->listWorksheetInfo('');\n    }\n\n    public function testUtf16LineBreak(): void\n    {\n        $reader = new Csv();\n        $reader->setInputEncoding('UTF-16BE');\n        $spreadsheet = $reader->load('tests/data/Reader/CSV/utf16be.line_break_in_enclosure.csv');\n        $sheet = $spreadsheet->getActiveSheet();\n        $expected = <<<EOF\n            This is a test\n            with line breaks\n            that breaks the\n            delimiters\n            EOF;\n        self::assertEquals($expected, $sheet->getCell('B3')->getValue());\n    }\n\n    public function testLineBreakEscape(): void\n    {\n        $reader = new Csv();\n        $spreadsheet = $reader->load('tests/data/Reader/CSV/line_break_in_enclosure_with_escaped_quotes.csv');\n        $sheet = $spreadsheet->getActiveSheet();\n        $expected = <<<EOF\n            This is a \"test csv file\"\n            with both \"line breaks\"\n            and \"escaped\n            quotes\" that breaks\n            the delimiters\n            EOF;\n        self::assertEquals($expected, $sheet->getCell('B3')->getValue());\n    }\n\n    public function testUtf32LineBreakEscape(): void\n    {\n        $reader = new Csv();\n        $reader->setInputEncoding('UTF-32LE');\n        $spreadsheet = $reader->load('tests/data/Reader/CSV/line_break_escaped_32le.csv');\n        $sheet = $spreadsheet->getActiveSheet();\n        $expected = <<<EOF\n            This is a \"test csv file\"\n            with both \"line breaks\"\n            and \"escaped\n            quotes\" that breaks\n            the delimiters\n            EOF;\n        self::assertEquals($expected, $sheet->getCell('B3')->getValue());\n    }\n\n    public function testSeparatorLine(): void\n    {\n        $reader = new Csv();\n        $reader->setSheetIndex(3);\n        $spreadsheet = $reader->load('tests/data/Reader/CSV/sep.csv');\n        self::assertEquals(';', $reader->getDelimiter());\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals(3, $reader->getSheetIndex());\n        self::assertEquals(3, $spreadsheet->getActiveSheetIndex());\n        self::assertEquals('A', $sheet->getCell('A1')->getValue());\n        self::assertEquals(1, $sheet->getCell('B1')->getValue());\n        self::assertEquals(2, $sheet->getCell('A2')->getValue());\n        self::assertEquals(3, $sheet->getCell('B2')->getValue());\n    }\n\n    public function testDefaultSettings(): void\n    {\n        $reader = new Csv();\n        self::assertEquals('UTF-8', $reader->getInputEncoding());\n        self::assertEquals('\"', $reader->getEnclosure());\n        $reader->setEnclosure('\\'');\n        self::assertEquals('\\'', $reader->getEnclosure());\n        $reader->setEnclosure('');\n        self::assertEquals('\"', $reader->getEnclosure());\n        // following tests from BaseReader\n        self::assertTrue($reader->getReadEmptyCells());\n        self::assertFalse($reader->getIncludeCharts());\n        self::assertNull($reader->getLoadSheetsOnly());\n    }\n\n    public function testReadEmptyFileName(): void\n    {\n        $this->expectException(ReaderException::class);\n        $reader = new Csv();\n        $filename = '';\n        $reader->load($filename);\n    }\n\n    public function testReadNonexistentFileName(): void\n    {\n        $this->expectException(ReaderException::class);\n        $reader = new Csv();\n        $reader->load('tests/data/Reader/CSV/encoding.utf8.csvxxx');\n    }\n\n    #[DataProvider('providerEscapes')]\n    public function testInferSeparator(string $escape, string $delimiter, int $version = PHP_VERSION_ID): void\n    {\n        if ($version >= 90000 && $escape !== '') {\n            $this->expectException(ReaderException::class);\n            $this->expectExceptionMessage('Escape character must be null string');\n        }\n        $reader = new Csv();\n        if ($version === PHP_VERSION_ID) {\n            $reader->setEscapeCharacter($escape);\n        } else {\n            $reader->setEscapeCharacter($escape, $version);\n        }\n        $filename = 'tests/data/Reader/CSV/escape.csv';\n        $reader->listWorksheetInfo($filename);\n        self::assertEquals($delimiter, $reader->getDelimiter());\n    }\n\n    public static function providerEscapes(): array\n    {\n        return [\n            ['\\\\', ';'],\n            [\"\\x0\", ','],\n            ['', ','],\n            ['\\\\', ';', 90000],\n        ];\n    }\n\n    public function testSetDelimiterNull(): void\n    {\n        $reader = new Csv();\n        $reader->setDelimiter(',');\n        self::assertSame(',', $reader->getDelimiter());\n        $reader->setDelimiter(null);\n        self::assertNull($reader->getDelimiter());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/NotHtmlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv as CsvReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NotHtmlTest extends TestCase\n{\n    private string $tempFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->tempFile !== '') {\n            unlink($this->tempFile);\n            $this->tempFile = '';\n        }\n    }\n\n    public function testHtmlCantRead(): void\n    {\n        // This test has a file which IOFactory will identify as Csv.\n        // So file can be read using either Csv Reader or IOFactory.\n        $this->tempFile = $filename = File::temporaryFilename();\n        $cells = [\n            ['1', '<a href=\"http://example.com\">example</a>', '3'],\n            ['4', '5', '6'],\n        ];\n        $handle = fopen($filename, 'wb');\n        self::assertNotFalse($handle);\n        foreach ($cells as $row) {\n            fwrite($handle, \"{$row[0]},{$row[1]},{$row[2]}\\n\");\n        }\n        fclose($handle);\n        // Php8.3- identify file as text/html.\n        // Php8.4+ identify file as text/csv, and this type of change\n        //    has been known to be retrofitted to prior versions.\n        $mime = mime_content_type($filename);\n        if ($mime !== 'text/csv') {\n            self::assertSame('text/html', $mime);\n        }\n        self::assertSame('Csv', IOFactory::identify($filename));\n        $reader = new CsvReader();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($cells, $sheet->toArray());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testHtmlCanRead(): void\n    {\n        // This test has a file which IOFactory will identify as Html.\n        // So file has to be read using Csv Reader, not IOFactory.\n        $this->tempFile = $filename = File::temporaryFilename();\n        $cells = [\n            ['<a href=\"http://example.com\">example</a>', '<div>hello', '3'],\n            ['4', '5', '</div>'],\n        ];\n        $handle = fopen($filename, 'wb');\n        self::assertNotFalse($handle);\n        foreach ($cells as $row) {\n            fwrite($handle, \"{$row[0]},{$row[1]},{$row[2]}\\n\");\n        }\n        fclose($handle);\n        // Php8.3- identify file as text/html.\n        // Php8.4+ identify file as text/csv, and this type of change\n        //    has been known to be retrofitted to prior versions.\n        $mime = mime_content_type($filename);\n        if ($mime !== 'text/csv') {\n            self::assertSame('text/html', $mime);\n        }\n        self::assertSame('Html', IOFactory::identify($filename));\n        $reader = new CsvReader();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($cells, $sheet->toArray());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Csv/Php9Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Php9Test extends TestCase\n{\n    #[DataProvider('providerVersion')]\n    public function testAffectedByPhp9(int $version): void\n    {\n        if ($version >= 90000) {\n            $this->expectException(ReaderException::class);\n            $this->expectExceptionMessage('Php7.4 or Php8');\n        }\n        $dir = 'tests/data/Reader/CSV';\n        $files = glob(\"$dir/*\");\n        self::assertNotFalse($files);\n        $affected = [];\n        foreach ($files as $file) {\n            $base = basename($file);\n            $encoding = 'UTF-8';\n            if (str_contains($base, 'utf') && !str_contains($base, 'bom')) {\n                $encoding = 'guess';\n            }\n            $result = Csv::affectedByPhp9($file, $encoding, version: $version);\n            if ($result) {\n                $affected[] = $base;\n            }\n        }\n        $expected = ['backslash.csv', 'escape.csv', 'linend.mac.csv'];\n        self::assertSame($expected, $affected);\n    }\n\n    public static function providerVersion(): array\n    {\n        return [\n            [PHP_VERSION_ID],\n            [90000],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormula2Test.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFormula2Test extends TestCase\n{\n    /** @param mixed[] $expectedValue */\n    #[DataProvider('arrayFormulaReaderProvider')]\n    public function testArrayFormulaReader(\n        string $cellAddress,\n        string $expectedRange,\n        string $expectedFormula,\n        array $expectedValue\n    ): void {\n        $filename = 'tests/data/Reader/Gnumeric/ArrayFormulaTest2.gnumeric';\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $cell = $worksheet->getCell($cellAddress);\n        self::assertSame(DataType::TYPE_FORMULA, $cell->getDataType());\n        self::assertSame(['t' => 'array', 'ref' => $expectedRange], $cell->getFormulaAttributes());\n        self::assertSame($expectedFormula, strtoupper($cell->getValueString()));\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $worksheet->calculateArrays();\n        $cell = $worksheet->getCell($cellAddress);\n        self::assertSame($expectedValue, $cell->getCalculatedValue());\n        self::assertSame($expectedValue, $worksheet->rangeToArray($expectedRange, formatData: false, reduceArrays: true));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function arrayFormulaReaderProvider(): array\n    {\n        return [\n            [\n                'D1',\n                'D1:E2',\n                '=MMULT(A1:B2,A4:B5)',\n                [[21, 26], [37, 46]],\n            ],\n            [\n                'G1',\n                'G1:J1',\n                '=SIN({-1,0,1,2})',\n                [[-0.8414709848078965, 0.0, 0.8414709848078965, 0.9092974268256817]],\n            ],\n            [\n                'D4',\n                'D4:E5',\n                '=MMULT(A7:B8,A10:B11)',\n                [[55, 64], [79, 92]],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormulaTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFormulaTest extends TestCase\n{\n    /** @param float|mixed[] $expectedValue */\n    #[DataProvider('arrayFormulaReaderProvider')]\n    public function testArrayFormulaReader(\n        string $cellAddress,\n        string $expectedRange,\n        string $expectedFormula,\n        array|float $expectedValue\n    ): void {\n        $filename = 'tests/data/Reader/Gnumeric/ArrayFormulaTest.gnumeric';\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $cell = $worksheet->getCell($cellAddress);\n        self::assertSame(DataType::TYPE_FORMULA, $cell->getDataType());\n        if (is_array($expectedValue)) {\n            self::assertSame(['t' => 'array', 'ref' => $expectedRange], $cell->getFormulaAttributes());\n        } else {\n            self::assertEmpty($cell->getFormulaAttributes());\n        }\n        self::assertSame($expectedFormula, strtoupper($cell->getValueString()));\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $worksheet->calculateArrays();\n        $cell = $worksheet->getCell($cellAddress);\n        self::assertSame($expectedValue, $cell->getCalculatedValue());\n        if (is_array($expectedValue)) {\n            self::assertSame($expectedValue, $worksheet->rangeToArray($expectedRange, formatData: false, reduceArrays: true));\n        } else {\n            self::assertSame([[$expectedValue]], $worksheet->rangeToArray($expectedRange, formatData: false, reduceArrays: true));\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function arrayFormulaReaderProvider(): array\n    {\n        return [\n            [\n                'D1',\n                'D1:E2',\n                '=A1:B1*A1:A2',\n                [[4, 6], [8, 12]],\n            ],\n            [\n                'G1',\n                'G1:J1',\n                '=SIN({-1,0,1,2})',\n                [[-0.8414709848078965, 0.0, 0.8414709848078965, 0.9092974268256817]],\n            ],\n            [\n                'G3',\n                'G3:G3',\n                '=MAX(SIN({-1,0,1,2}))',\n                0.9092974268256817,\n            ],\n            [\n                'D4',\n                'D4:E5',\n                '=A4:B4*A4:A5',\n                [[9, 12], [15, 20]],\n            ],\n            [\n                'D7',\n                'D7:E8',\n                '=A7:B7*A7:A8',\n                [[16, 20], [24, 30]],\n            ],\n            [\n                'D10',\n                'D10:E11',\n                '=A10:B10*A10:A11',\n                [[25, 30], [35, 42]],\n            ],\n            [\n                'D13',\n                'D13:E14',\n                '=A13:B13*A13:A14',\n                [[36, 42], [48, 56]],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/AutoFilterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AutoFilterTest extends TestCase\n{\n    public function testAutoFilterRange(): void\n    {\n        $filename = 'tests/data/Reader/Gnumeric/Autofilter_Basic.gnumeric';\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $autoFilterRange = $worksheet->getAutoFilter()->getRange();\n\n        self::assertSame('A1:D57', $autoFilterRange);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/DefinedNameTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefinedNameTest extends TestCase\n{\n    public static function fileProvider(): array\n    {\n        return [\n            ['tests/data/Reader/Gnumeric/apostrophe3a.gnumeric', 'Sheet1'],\n            ['tests/data/Reader/Gnumeric/apostrophe3b.gnumeric', 'Apo\\'strophe'],\n        ];\n    }\n\n    #[DataProvider('fileProvider')]\n    public function testDefinedName(string $filename, string $sheetName): void\n    {\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($sheetName, $sheet->getTitle());\n        self::assertSame('=sheet1first', $sheet->getCell('C1')->getValue());\n        self::assertSame(1, $sheet->getCell('C1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/GnumericFilter.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\n/**  Define a Read Filter class implementing IReadFilter  */\nclass GnumericFilter implements IReadFilter\n{\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        return $row !== 4;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/GnumericInfoTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PHPUnit\\Framework\\TestCase;\n\nclass GnumericInfoTest extends TestCase\n{\n    public function testListNames(): void\n    {\n        $filename = 'samples/templates/GnumericTest.gnumeric';\n        $reader = new Gnumeric();\n        $names = $reader->listWorksheetNames($filename);\n        self::assertCount(2, $names);\n        self::assertEquals('Sample Data', $names[0]);\n        self::assertEquals('Report Data', $names[1]);\n    }\n\n    public function testListInfo(): void\n    {\n        $filename = 'samples/templates/GnumericTest.gnumeric';\n        $reader = new Gnumeric();\n        $info = $reader->listWorksheetInfo($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Sample Data',\n                'lastColumnLetter' => 'N',\n                'lastColumnIndex' => 13,\n                'totalRows' => 31,\n                'totalColumns' => 14,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Report Data',\n                'lastColumnLetter' => 'K',\n                'lastColumnIndex' => 10,\n                'totalRows' => 65535,\n                'totalColumns' => 11,\n                'sheetState' => 'visible',\n            ],\n        ];\n        self::assertEquals($expected, $info);\n    }\n\n    public function testListNamesNotGumeric(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('invalid Gnumeric file');\n        $filename = 'samples/templates/excel2003.xml';\n        $reader = new Gnumeric();\n        $reader->listWorksheetNames($filename);\n    }\n\n    public function testListInfoNotXml(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('invalid Gnumeric file');\n        $filename = __FILE__;\n        $reader = new Gnumeric();\n        $reader->listWorksheetInfo($filename);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/GnumericLoadTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PHPUnit\\Framework\\TestCase;\n\nclass GnumericLoadTest extends TestCase\n{\n    public function testLoad(): void\n    {\n        $filename = 'samples/templates/GnumericTest.gnumeric';\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        self::assertEquals(2, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals('Report Data', $sheet->getTitle());\n        self::assertEquals('BCD', $sheet->getCell('A4')->getValue());\n        $props = $spreadsheet->getProperties();\n        self::assertEquals('Mark Baker', $props->getCreator());\n        $creationDate = $props->getCreated();\n        $result = Date::formattedDateTimeFromTimestamp(\"$creationDate\", 'Y-m-d\\TH:i:s\\Z', new DateTimeZone('UTC'));\n        self::assertEquals('2010-09-02T20:48:39Z', $result);\n        $creationDate = $props->getModified();\n        $result = Date::formattedDateTimeFromTimestamp(\"$creationDate\", 'Y-m-d\\TH:i:s\\Z', new DateTimeZone('UTC'));\n        self::assertEquals('2020-06-05T05:15:21Z', $result);\n\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('Sample Data', $sheet->getTitle());\n        self::assertEquals('Test String 1', $sheet->getCell('A1')->getValue());\n        self::assertEquals('FFFF0000', $sheet->getCell('A1')->getStyle()->getFont()->getColor()->getARGB());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('A3')->getStyle()->getFont()->getUnderline());\n        self::assertEquals('Test with (\") in string', $sheet->getCell('A4')->getValue());\n\n        self::assertEquals(22269, $sheet->getCell('A10')->getValue());\n        self::assertEquals('dd/mm/yyyy', $sheet->getCell('A10')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('19/12/1960', $sheet->getCell('A10')->getFormattedValue());\n        self::assertEquals(1.5, $sheet->getCell('A11')->getValue());\n        self::assertEquals('# ?0/??0', $sheet->getCell('A11')->getStyle()->getNumberFormat()->getFormatCode());\n        // Same pattern, same value, different display in Gnumeric vs Excel\n        //self::assertEquals('1 1/2', $sheet->getCell('A11')->getFormattedValue());\n\n        self::assertEquals('=B1+C1', $sheet->getCell('H1')->getValue());\n        self::assertEquals('=E2&F2', $sheet->getCell('J2')->getValue());\n        self::assertEquals('=sum(C1:C4)', $sheet->getCell('I5')->getValue());\n\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getItalic());\n\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('E3')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('E4')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E4')->getStyle()->getFont()->getUnderline());\n\n        self::assertTrue($sheet->getCell('F1')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F1')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F1')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F4')->getStyle()->getFont()->getUnderline());\n\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getCell('C10')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getCell('C12')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getCell('C14')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getCell('C16')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THICK, $sheet->getCell('C18')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Color::COLOR_RED, $sheet->getCell('C18')->getStyle()->getBorders()->getTop()->getColor()->getARGB());\n        self::assertEquals(Border::BORDER_THICK, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Color::COLOR_YELLOW, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getColor()->getARGB());\n        self::assertEquals(Border::BORDER_THICK, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C18')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C18')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n\n        self::assertEquals(Fill::FILL_PATTERN_DARKHORIZONTAL, $sheet->getCell('K19')->getStyle()->getFill()->getFillType());\n        self::assertEquals('FF00CCFF', $sheet->getCell('K19')->getStyle()->getFill()->getEndColor()->getARGB());\n        self::assertEquals(Color::COLOR_BLUE, $sheet->getCell('K19')->getStyle()->getFill()->getStartColor()->getARGB());\n        self::assertEquals(Fill::FILL_PATTERN_GRAY0625, $sheet->getCell('L19')->getStyle()->getFill()->getFillType());\n        self::assertEquals(Color::COLOR_RED, $sheet->getCell('L19')->getStyle()->getFill()->getEndColor()->getARGB());\n        self::assertEquals(Color::COLOR_YELLOW, $sheet->getCell('L19')->getStyle()->getFill()->getStartColor()->getARGB());\n        self::assertEquals(Fill::FILL_SOLID, $sheet->getCell('K3')->getStyle()->getFill()->getFillType());\n        self::assertEquals(Color::COLOR_RED, $sheet->getCell('K3')->getStyle()->getFill()->getStartColor()->getARGB());\n\n        self::assertEquals(45, $sheet->getCell('E22')->getStyle()->getAlignment()->getTextRotation());\n        self::assertEquals(-90, $sheet->getCell('G22')->getStyle()->getAlignment()->getTextRotation());\n        self::assertEquals(Border::BORDER_DOUBLE, $sheet->getCell('N13')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertEquals(Borders::DIAGONAL_BOTH, $sheet->getCell('E18')->getStyle()->getBorders()->getDiagonalDirection());\n        self::assertEquals(Borders::DIAGONAL_DOWN, $sheet->getCell('I18')->getStyle()->getBorders()->getDiagonalDirection());\n        self::assertEquals(Borders::DIAGONAL_UP, $sheet->getCell('J18')->getStyle()->getBorders()->getDiagonalDirection());\n        self::assertEquals(Font::UNDERLINE_DOUBLE, $sheet->getCell('A24')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('B23')->getStyle()->getFont()->getSubScript());\n        self::assertTrue($sheet->getCell('B24')->getStyle()->getFont()->getSuperScript());\n        $rowDimension = $sheet->getRowDimension(30);\n        self::assertFalse($rowDimension->getVisible());\n\n        self::assertSame('B24', $sheet->getSelectedCells());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadFilter(): void\n    {\n        $filename = 'samples/templates/GnumericTest.gnumeric';\n        $reader = new Gnumeric();\n        $filter = new GnumericFilter();\n        $reader->setReadFilter($filter);\n        $spreadsheet = $reader->load($filename);\n        self::assertEquals(2, $spreadsheet->getSheetCount());\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals('Report Data', $sheet->getTitle());\n        self::assertEquals('', $sheet->getCell('A4')->getValue());\n        $props = $spreadsheet->getProperties();\n        self::assertEquals('Mark Baker', $props->getCreator());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadOld(): void\n    {\n        $filename = 'samples/templates/old.gnumeric';\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        $props = $spreadsheet->getProperties();\n        self::assertEquals('David Gilbert', $props->getCreator());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadSelectedSheets(): void\n    {\n        $filename = 'samples/templates/GnumericTest.gnumeric';\n        $reader = new Gnumeric();\n        $reader->setLoadSheetsOnly(['Unknown Sheet', 'Report Data']);\n        $spreadsheet = $reader->load($filename);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('Report Data', $sheet->getTitle());\n        self::assertEquals('Third Heading', $sheet->getCell('C2')->getValue());\n\n        self::assertSame('A1', $sheet->getSelectedCells());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadNoSelectedSheets(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('You tried to set a sheet active by the out of bounds index');\n        $filename = 'samples/templates/GnumericTest.gnumeric';\n        $reader = new Gnumeric();\n        $reader->setLoadSheetsOnly(['Unknown Sheet', 'xReport Data']);\n        $reader->load($filename);\n    }\n\n    public function testLoadNotGnumeric(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('invalid Gnumeric file');\n        $filename = 'samples/templates/excel2003.xml';\n        $reader = new Gnumeric();\n        $reader->load($filename);\n    }\n\n    public function testLoadNotXml(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('invalid Gnumeric file');\n        $filename = __FILE__;\n        $reader = new Gnumeric();\n        $reader->load($filename);\n    }\n\n    public function testDoctype(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('prevent XXE');\n        $filename = 'tests/data/Reader/Gnumeric/xmlwithdoctype.gnumeric';\n        $reader = new Gnumeric();\n        $reader->load($filename);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/GnumericStylesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass GnumericStylesTest extends TestCase\n{\n    #[DataProvider('providerBorderStyle')]\n    public function testBorderStyle(string $style, string $expectedResult): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var string[] */\n        $borders = $styles['borderStyle'];\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testBorderStyleCoverage(): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var mixed[] */\n        $expected = $styles['borderStyle'];\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        $tests = $this->providerBorderStyle();\n        foreach ($tests as $test) {\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"Borderstyle $key not tested\");\n        }\n    }\n\n    #[DataProvider('providerfillType')]\n    public function testFillType(string $style, string $expectedResult): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var string[] */\n        $borders = $styles['fillType'];\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testFillTypeCoverage(): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var mixed[] */\n        $expected = $styles['fillType'];\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        $tests = $this->providerfillType();\n        foreach ($tests as $test) {\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"fillType $key not tested\");\n        }\n    }\n\n    #[DataProvider('providerHorizontal')]\n    public function testHorizontal(string $style, string $expectedResult): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var string[] */\n        $borders = $styles['horizontal'];\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testHorizontalCoverage(): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var mixed[] */\n        $expected = $styles['horizontal'];\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        $tests = $this->providerHorizontal();\n        foreach ($tests as $test) {\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"horizontal $key not tested\");\n        }\n    }\n\n    #[DataProvider('providerunderline')]\n    public function testUnderline(string $style, string $expectedResult): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var string[] */\n        $borders = $styles['underline'];\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testUnderlineCoverage(): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var mixed[] */\n        $expected = $styles['underline'];\n        /** @var int[] $covered */\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        $tests = $this->providerUnderline();\n        foreach ($tests as $test) {\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"underline $key not tested\");\n        }\n    }\n\n    #[DataProvider('providerVertical')]\n    public function testVertical(string $style, string $expectedResult): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var mixed[] */\n        $borders = $styles['vertical'];\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testVerticalCoverage(): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var mixed[] */\n        $expected = $styles['vertical'];\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        /** @var int[][] */\n        $tests = $this->providerVertical();\n        foreach ($tests as $test) {\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"vertical $key not tested\");\n        }\n    }\n\n    #[DataProvider('providerDataType')]\n    public function testDataType(string $style, string $expectedResult): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var string[] */\n        $borders = $styles['dataType'];\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testDataTypeCoverage(): void\n    {\n        $styles = Gnumeric::gnumericMappings();\n        /** @var mixed[] */\n        $expected = $styles['dataType'];\n        self::assertArrayNotHasKey('70', $expected);\n        self::assertArrayNotHasKey('80', $expected);\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        /** @var int[][] */\n        $tests = $this->providerDataType();\n        foreach ($tests as $test) {\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"dataType $key not tested\");\n        }\n    }\n\n    /** @return array<int, array{0: string, 1:string}> */\n    public static function providerBorderStyle(): array\n    {\n        return [\n            ['0', Border::BORDER_NONE],\n            ['1', Border::BORDER_THIN],\n            ['2', Border::BORDER_MEDIUM],\n            ['3', Border::BORDER_SLANTDASHDOT],\n            ['4', Border::BORDER_DASHED],\n            ['5', Border::BORDER_THICK],\n            ['6', Border::BORDER_DOUBLE],\n            ['7', Border::BORDER_DOTTED],\n            ['8', Border::BORDER_MEDIUMDASHED],\n            ['9', Border::BORDER_DASHDOT],\n            ['10', Border::BORDER_MEDIUMDASHDOT],\n            ['11', Border::BORDER_DASHDOTDOT],\n            ['12', Border::BORDER_MEDIUMDASHDOTDOT],\n            ['13', Border::BORDER_MEDIUMDASHDOTDOT],\n        ];\n    }\n\n    /** @return array<int, array{0: string, 1:string}> */\n    public static function providerFillType(): array\n    {\n        return [\n            ['1', Fill::FILL_SOLID],\n            ['2', Fill::FILL_PATTERN_DARKGRAY],\n            ['3', Fill::FILL_PATTERN_MEDIUMGRAY],\n            ['4', Fill::FILL_PATTERN_LIGHTGRAY],\n            ['5', Fill::FILL_PATTERN_GRAY125],\n            ['6', Fill::FILL_PATTERN_GRAY0625],\n            ['7', Fill::FILL_PATTERN_DARKHORIZONTAL],\n            ['8', Fill::FILL_PATTERN_DARKVERTICAL],\n            ['9', Fill::FILL_PATTERN_DARKDOWN],\n            ['10', Fill::FILL_PATTERN_DARKUP],\n            ['11', Fill::FILL_PATTERN_DARKGRID],\n            ['12', Fill::FILL_PATTERN_DARKTRELLIS],\n            ['13', Fill::FILL_PATTERN_LIGHTHORIZONTAL],\n            ['14', Fill::FILL_PATTERN_LIGHTVERTICAL],\n            ['15', Fill::FILL_PATTERN_LIGHTUP],\n            ['16', Fill::FILL_PATTERN_LIGHTDOWN],\n            ['17', Fill::FILL_PATTERN_LIGHTGRID],\n            ['18', Fill::FILL_PATTERN_LIGHTTRELLIS],\n        ];\n    }\n\n    /** @return array<int, array{0: string, 1:string}> */\n    public static function providerHorizontal(): array\n    {\n        return [\n            ['1', Alignment::HORIZONTAL_GENERAL],\n            ['2', Alignment::HORIZONTAL_LEFT],\n            ['4', Alignment::HORIZONTAL_RIGHT],\n            ['8', Alignment::HORIZONTAL_CENTER],\n            ['16', Alignment::HORIZONTAL_CENTER_CONTINUOUS],\n            ['32', Alignment::HORIZONTAL_JUSTIFY],\n            ['64', Alignment::HORIZONTAL_CENTER_CONTINUOUS],\n        ];\n    }\n\n    /** @return array<int, array{0: string, 1:string}> */\n    public static function providerUnderline(): array\n    {\n        return [\n            ['1', Font::UNDERLINE_SINGLE],\n            ['2', Font::UNDERLINE_DOUBLE],\n            ['3', Font::UNDERLINE_SINGLEACCOUNTING],\n            ['4', Font::UNDERLINE_DOUBLEACCOUNTING],\n        ];\n    }\n\n    public static function providerVertical(): array\n    {\n        return [\n            ['1', Alignment::VERTICAL_TOP],\n            ['2', Alignment::VERTICAL_BOTTOM],\n            ['4', Alignment::VERTICAL_CENTER],\n            ['8', Alignment::VERTICAL_JUSTIFY],\n        ];\n    }\n\n    public static function providerDataType(): array\n    {\n        return [\n            ['10', DataType::TYPE_NULL],\n            ['20', DataType::TYPE_BOOL],\n            ['30', DataType::TYPE_NUMERIC], // Integer doesn't exist in Excel\n            ['40', DataType::TYPE_NUMERIC], // Float\n            ['50', DataType::TYPE_ERROR],\n            ['60', DataType::TYPE_STRING],\n            //'70':        //    Cell Range\n            //'80':        //    Array\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/HiddenWorksheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HiddenWorksheetTest extends TestCase\n{\n    public function testPageSetup(): void\n    {\n        $filename = 'tests/data/Reader/Gnumeric/HiddenSheet.gnumeric';\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->worksheetAssertions();\n        $sheetCount = 0;\n\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            ++$sheetCount;\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $actualResult = $worksheet->getSheetState();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed asserting sheet state {$expectedResult} for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<string, string[]> */\n    private function worksheetAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'sheetState' => Worksheet::SHEETSTATE_VISIBLE,\n            ],\n            'Sheet2' => [\n                'sheetState' => Worksheet::SHEETSTATE_HIDDEN,\n            ],\n        ];\n    }\n\n    public function testListWorksheetInfo(): void\n    {\n        $filename = 'tests/data/Reader/Gnumeric/HiddenSheet.gnumeric';\n        $reader = new Gnumeric();\n        $expected = [\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Sheet2',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'hidden',\n            ],\n        ];\n        self::assertSame($expected, $reader->listWorksheetInfo($filename));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Gnumeric;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Gnumeric;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageSetupTest extends TestCase\n{\n    private const MARGIN_PRECISION = 0.001;\n\n    public static function fileProvider(): array\n    {\n        return [\n            ['tests/data/Reader/Gnumeric/PageSetup.gnumeric'],\n            ['tests/data/Reader/Gnumeric/PageSetup.gnumeric.unzipped.xml'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('fileProvider')]\n    public function testPageSetup(string $filename): void\n    {\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->pageSetupAssertions();\n        $sheetCount = 0;\n\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            ++$sheetCount;\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageSetup()->$testMethodName();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('fileProvider')]\n    public function testPageMargins(string $filename): void\n    {\n        $reader = new Gnumeric();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->pageMarginAssertions();\n        $sheetCount = 0;\n\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            ++$sheetCount;\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageMargins()->$testMethodName();\n                self::assertEqualsWithDelta(\n                    $expectedResult,\n                    $actualResult,\n                    self::MARGIN_PRECISION,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test} margin\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<string, mixed[]> */\n    private function pageSetupAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 75,\n                'horizontalCentered' => true,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet2' => [\n                'orientation' => PageSetup::ORIENTATION_LANDSCAPE,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_OVER_THEN_DOWN,\n            ],\n            'Sheet3' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 90,\n                'horizontalCentered' => true,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet4' => [\n                // Default Settings\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n        ];\n    }\n\n    /** @return array<string, float[]> */\n    private function pageMarginAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                // Here the values are in inches\n                'top' => 0.315,\n                'header' => 0.630,\n                'left' => 0.512,\n                'right' => 0.512,\n                'bottom' => 0.315,\n                'footer' => 0.433,\n            ],\n            'Sheet2' => [\n                // Here the values are in inches\n                'top' => 0.315,\n                'header' => 0.433,\n                'left' => 0.709,\n                'right' => 0.709,\n                'bottom' => 0.315,\n                'footer' => 0.433,\n            ],\n            'Sheet3' => [\n                // Here the values are in inches\n                'top' => 0.512,\n                'header' => 0.433,\n                'left' => 0.709,\n                'right' => 0.709,\n                'bottom' => 0.512,\n                'footer' => 0.433,\n            ],\n            'Sheet4' => [\n                // Default Settings (in inches)\n                'top' => 0.3,\n                'header' => 0.45,\n                'left' => 0.7,\n                'right' => 0.7,\n                'bottom' => 0.3,\n                'footer' => 0.45,\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/BinderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BinderTest extends TestCase\n{\n    public function testLoadFromString(): void\n    {\n        $data = <<<EOF\n            <table>\n            <tbody>\n            <tr><td>1</td><td>2</td><td>3</td></tr>\n            <tr><td>4</td><td>5</td><td>6</td></tr>\n            </tbody>\n            </table>\n            EOF;\n        $reader1 = new Html();\n        $spreadsheet1 = $reader1->loadFromString($data);\n        $sheet1 = $spreadsheet1->getActiveSheet();\n        $sheet1->getCell('A3')->setValueExplicit(7, DataType::TYPE_STRING);\n        $sheet1->getCell('B3')->setValueExplicit(8, DataType::TYPE_NUMERIC);\n        $sheet1->setCellValue('C3', 9);\n        $sheet1->fromArray([10, 11, 12], null, 'A4');\n        $expected1 = [\n            [1, 2, 3],\n            [4, 5, 6],\n            ['7', 8, 9],\n            [10, 11, 12],\n        ];\n        self::AssertSame($expected1, $sheet1->toArray(null, false, false));\n\n        $reader2 = new Html();\n        $reader2->setValueBinder(new StringValueBinder());\n        $spreadsheet2 = $reader2->loadFromString($data);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $sheet2->getCell('A3')->setValueExplicit(7, DataType::TYPE_STRING);\n        $sheet2->getCell('B3')->setValueExplicit(8, DataType::TYPE_NUMERIC);\n        $sheet2->setCellValue('C3', 9);\n        $sheet2->fromArray([10, 11, 12], null, 'A4');\n        $expected2 = [\n            ['1', '2', '3'],\n            ['4', '5', '6'],\n            ['7', 8, '9'],\n            ['10', '11', '12'],\n        ];\n        self::AssertSame($expected2, $sheet2->toArray(null, false, false));\n\n        $spreadsheet1->disconnectWorksheets();\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/DataFormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html as HtmlReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DataFormulaTest extends AbstractFunctional\n{\n    public function testDataFormula(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', true);\n        $sheet->setCellValue('A2', false);\n        $sheet->setCellValue('A3', false); // no checkbox\n        $sheet->getStyle('A1')->setCheckBox(true);\n        $sheet->getStyle('A2')->setCheckBox(true);\n        $sheet->setCellValue('B1', '=AND(TRUE,TRUE)');\n        $sheet->setCellValue('B2', '=AND(TRUE,FALSE)');\n        $sheet->setCellValue('B3', '=AND(FALSE,TRUE)'); // no checkbox\n        $sheet->getStyle('B1')->setCheckBox(true);\n        $sheet->getStyle('B2')->setCheckBox(true);\n        $sheet->setCellValue('C1', '=\"A\"&\"B\"&\"C\"');\n        $sheet->setCellValue('C2', 5);\n        $sheet->setCellValue('C3', '=3+2');\n\n        $writer = new HtmlWriter($spreadsheet);\n        $this->writeDataFormula($writer);\n        $content = $writer->generateHtmlAll();\n        $expected = '<td data-checkbox=\"1\" data-type=\"b\" class=\"column0 style1 b\">☑</td>';\n        self::assertStringContainsString($expected, $content, 'bool non-formula');\n        $expected = '<td data-checkbox=\"1\" data-type=\"b\" data-formula=\"=AND(TRUE,TRUE)\" class=\"column1 style1 b\">☑</td>';\n        self::assertStringContainsString($expected, $content, 'bool formula');\n        $expected = '<td data-type=\"s\" data-formula=\"=&quot;A&quot;&amp;&quot;B&quot;&amp;&quot;C&quot;\" class=\"column2 style0 s\">ABC</td>';\n        self::assertStringContainsString($expected, $content, 'string formula requiring escaped characters');\n        $expected = '<td class=\"column2 style0 n\">5</td>';\n        self::assertStringContainsString($expected, $content, 'numeric non-formula');\n        $expected = '<td data-type=\"n\" data-formula=\"=3+2\" class=\"column2 style0 n\">5</td>';\n        self::assertStringContainsString($expected, $content, 'numeric formula');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Html', null, $this->writeDataFormula(...));\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertTrue($rsheet->getCell('A1')->getValue());\n        self::assertFalse($rsheet->getCell('A2')->getValue());\n        self::assertFalse($rsheet->getCell('A3')->getValue());\n        self::assertTrue($rsheet->getStyle('A1')->getCheckBox());\n        self::assertTrue($rsheet->getStyle('A2')->getCheckBox());\n        self::assertFalse($rsheet->getStyle('A3')->getCheckBox());\n\n        self::assertSame('=AND(TRUE,TRUE)', $rsheet->getCell('B1')->getValue());\n        self::assertTrue(\n            $rsheet->getCell('B1')->getOldCalculatedValue()\n        );\n        self::assertTrue(\n            $rsheet->getCell('B1')->getCalculatedValue()\n        );\n        self::assertTrue($rsheet->getStyle('B1')->getCheckBox());\n\n        self::assertSame('=AND(TRUE,FALSE)', $rsheet->getCell('B2')->getValue());\n        self::assertFalse(\n            $rsheet->getCell('B2')->getOldCalculatedValue()\n        );\n        self::assertFalse(\n            $rsheet->getCell('B2')->getCalculatedValue()\n        );\n        self::assertTrue($rsheet->getStyle('B2')->getCheckBox());\n\n        self::assertSame('=AND(FALSE,TRUE)', $rsheet->getCell('B3')->getValue());\n        self::assertFalse(\n            $rsheet->getCell('B3')->getOldCalculatedValue()\n        );\n        self::assertFalse(\n            $rsheet->getCell('B3')->getCalculatedValue()\n        );\n        self::assertFalse($rsheet->getStyle('B3')->getCheckBox());\n\n        self::assertSame('=\"A\"&\"B\"&\"C\"', $rsheet->getCell('C1')->getValue());\n        self::assertSame(\n            'ABC',\n            $rsheet->getCell('C1')->getOldCalculatedValue()\n        );\n        self::assertSame(\n            'ABC',\n            $rsheet->getCell('C1')->getCalculatedValue()\n        );\n\n        self::assertSame(5, $rsheet->getCell('C2')->getValue());\n        self::assertNull(\n            $rsheet->getCell('C2')->getOldCalculatedValue()\n        );\n        self::assertSame(\n            5,\n            $rsheet->getCell('C2')->getCalculatedValue()\n        );\n\n        self::assertSame('=3+2', $rsheet->getCell('C3')->getValue());\n        self::assertSame(\n            5,\n            $rsheet->getCell('C3')->getOldCalculatedValue()\n        );\n        self::assertSame(\n            5,\n            $rsheet->getCell('C3')->getCalculatedValue()\n        );\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    private function writeDataFormula(HtmlWriter $writer): void\n    {\n        $writer->setDataFormula(true);\n    }\n\n    public function testNoPreCalculate(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', true);\n        $sheet->setCellValue('A2', false);\n        $sheet->setCellValue('A3', false); // no checkbox\n        $sheet->getStyle('A1')->setCheckBox(true);\n        $sheet->getStyle('A2')->setCheckBox(true);\n        $sheet->setCellValue('B1', '=AND(TRUE,TRUE)');\n        $sheet->setCellValue('B2', '=AND(TRUE,FALSE)');\n        $sheet->setCellValue('B3', '=AND(FALSE,TRUE)'); // no checkbox\n        $sheet->getStyle('B1')->setCheckBox(true);\n        $sheet->getStyle('B2')->setCheckBox(true);\n        $sheet->setCellValue('C1', '=\"A\"&\"B\"&\"C\"');\n        $sheet->setCellValue('C2', 5);\n        $sheet->setCellValue('C3', '=3+2');\n\n        $writer = new HtmlWriter($spreadsheet);\n        $this->writeDataFormula($writer);\n        $writer->setPreCalculateFormulas(false);\n        $content = $writer->generateHtmlAll();\n        $expected = '<td data-checkbox=\"1\" data-type=\"b\" class=\"column0 style1 b\">☑</td>';\n        self::assertStringContainsString($expected, $content, 'bool non-formula');\n        $expected = '<td data-checkbox=\"1\" class=\"column1 style1 f\">=AND(TRUE,TRUE)</td>';\n        self::assertStringContainsString($expected, $content, 'bool formula');\n        $expected = '<td class=\"column2 style0 f\">=&quot;A&quot;&amp;&quot;B&quot;&amp;&quot;C&quot;</td>';\n        self::assertStringContainsString($expected, $content, 'string formula requiring escaped characters');\n\n        $spreadsheet->disconnectWorksheets();\n        $reader = new HtmlReader();\n        $reloadedSpreadsheet = $reader->loadFromString($content);\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertTrue($rsheet->getStyle('B1')->getCheckBox());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/DirectionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html as HtmlReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DirectionTest extends TestCase\n{\n    public function testRtl(): void\n    {\n        $inlines = [\n            \"<table border='0' cellpadding='0' cellspacing='0' dir='rtl' id='sheet0' class='sheet0 gridlines'>\",\n            '<tbody>',\n            '<tr class=\"row0\">',\n            '<td class=\"column0 style0 s\">a1</td>',\n            '<td class=\"column1 style0 s\">b1</td>',\n            '<td class=\"column2 style0 s\">c1</td>',\n            '</tr>',\n            '<tr class=\"row1\">',\n            '<td class=\"column0 style0 s\">a2</td>',\n            '<td class=\"column1 style0 s\">b2</td>',\n            '<td class=\"column2 style0 s\">c2</td>',\n            '</tr>',\n            '</tbody></table>',\n        ];\n        $html = implode(\"\\n\", $inlines);\n        $reader = new HtmlReader();\n        $spreadsheet = $reader->loadFromString($html);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertTrue($sheet->getRightToLeft());\n        self::assertSame('a1', $sheet->getCell('A1')->getValue());\n        self::assertSame('c2', $sheet->getCell('C2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLtr(): void\n    {\n        $inlines = [\n            \"<table border='0' cellpadding='0' cellspacing='0' dir='ltr' id='sheet0' class='sheet0 gridlines'>\",\n            '<tbody>',\n            '<tr class=\"row0\">',\n            '<td class=\"column0 style0 s\">a1</td>',\n            '<td class=\"column1 style0 s\">b1</td>',\n            '<td class=\"column2 style0 s\">c1</td>',\n            '</tr>',\n            '<tr class=\"row1\">',\n            '<td class=\"column0 style0 s\">a2</td>',\n            '<td class=\"column1 style0 s\">b2</td>',\n            '<td class=\"column2 style0 s\">c2</td>',\n            '</tr>',\n            '</tbody></table>',\n        ];\n        $html = implode(\"\\n\", $inlines);\n        $reader = new HtmlReader();\n        $spreadsheet = $reader->loadFromString($html);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertFalse($sheet->getRightToLeft());\n        self::assertSame('a1', $sheet->getCell('A1')->getValue());\n        self::assertSame('c2', $sheet->getCell('C2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefault(): void\n    {\n        $inlines = [\n            \"<table border='0' cellpadding='0' cellspacing='0' id='sheet0' class='sheet0 gridlines'>\",\n            '<tbody>',\n            '<tr class=\"row0\">',\n            '<td class=\"column0 style0 s\">a1</td>',\n            '<td class=\"column1 style0 s\">b1</td>',\n            '<td class=\"column2 style0 s\">c1</td>',\n            '</tr>',\n            '<tr class=\"row1\">',\n            '<td class=\"column0 style0 s\">a2</td>',\n            '<td class=\"column1 style0 s\">b2</td>',\n            '<td class=\"column2 style0 s\">c2</td>',\n            '</tr>',\n            '</tbody></table>',\n        ];\n        $html = implode(\"\\n\", $inlines);\n        $reader = new HtmlReader();\n        $spreadsheet = $reader->loadFromString($html);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertFalse($sheet->getRightToLeft());\n        self::assertSame('a1', $sheet->getCell('A1')->getValue());\n        self::assertSame('c2', $sheet->getCell('C2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlBorderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlBorderTest extends TestCase\n{\n    public function testCanApplyInlineBordersStyles(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td style=\"border: 1px solid #333333;\">Thin border</td>\n                        <td style=\"border-bottom: 1px dashed #333333;\">Border bottom</td>\n                        <td style=\"border-top: 1px solid #333333;\">Border top</td>\n                        <td style=\"border-left: 1px solid green;\">Border left</td>\n                        <td style=\"border-right: 1px solid #333333;\">Border right</td>\n                        <td style=\"border: none\"></td>\n                        <td style=\"border: dashed;\"></td>\n                        <td style=\"border: dotted #333333;\"></td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $style = $firstSheet->getCell('A1')->getStyle();\n        $borders = $style->getBorders();\n\n        /** @var Border $border */\n        foreach ([$borders->getTop(), $borders->getBottom(), $borders->getLeft(), $borders->getRight()] as $border) {\n            self::assertEquals('333333', $border->getColor()->getRGB());\n            self::assertEquals(Border::BORDER_THIN, $border->getBorderStyle());\n        }\n\n        $style = $firstSheet->getCell('B1')->getStyle();\n        $border = $style->getBorders()->getBottom();\n        self::assertEquals('333333', $border->getColor()->getRGB());\n        self::assertEquals(Border::BORDER_DASHED, $border->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $style->getBorders()->getTop()->getBorderStyle());\n\n        $style = $firstSheet->getCell('C1')->getStyle();\n        $border = $style->getBorders()->getTop();\n        self::assertEquals('333333', $border->getColor()->getRGB());\n        self::assertEquals(Border::BORDER_THIN, $border->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $style->getBorders()->getBottom()->getBorderStyle());\n\n        $style = $firstSheet->getCell('D1')->getStyle();\n        $border = $style->getBorders()->getLeft();\n        self::assertEquals('00ff00', $border->getColor()->getRGB());\n        self::assertEquals(Border::BORDER_THIN, $border->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $style->getBorders()->getBottom()->getBorderStyle());\n\n        $style = $firstSheet->getCell('E1')->getStyle();\n        $border = $style->getBorders()->getRight();\n        self::assertEquals('333333', $border->getColor()->getRGB());\n        self::assertEquals(Border::BORDER_THIN, $border->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $style->getBorders()->getBottom()->getBorderStyle());\n\n        $style = $firstSheet->getCell('F1')->getStyle();\n        $borders = $style->getBorders();\n        foreach ([$borders->getTop(), $borders->getBottom(), $borders->getLeft(), $borders->getRight()] as $border) {\n            self::assertEquals(Border::BORDER_NONE, $border->getBorderStyle());\n        }\n\n        $style = $firstSheet->getCell('G1')->getStyle();\n        $borders = $style->getBorders();\n        $border = $borders->getRight();\n        self::assertEquals(Border::BORDER_DASHED, $border->getBorderStyle());\n\n        $style = $firstSheet->getCell('H1')->getStyle();\n        $borders = $style->getBorders();\n        $border = $borders->getRight();\n        self::assertEquals(Border::BORDER_DOTTED, $border->getBorderStyle());\n        self::assertEquals('333333', $border->getColor()->getRGB());\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBorderStyle')]\n    public function testBorderStyle(string $style, string $expectedResult): void\n    {\n        $borders = Html::getBorderMappings();\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testBorderStyleCoverage(): void\n    {\n        $expected = Html::getBorderMappings();\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        $tests = $this->providerBorderStyle();\n        foreach ($tests as $test) {\n            /** @var array<int, int|string> $test */\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"Borderstyle $key not tested\");\n        }\n    }\n\n    public static function providerBorderStyle(): array\n    {\n        return [\n            ['dash-dot', Border::BORDER_DASHDOT],\n            ['dash-dot-dot', Border::BORDER_DASHDOTDOT],\n            ['dashed', Border::BORDER_DASHED],\n            ['dotted', Border::BORDER_DOTTED],\n            ['double', Border::BORDER_DOUBLE],\n            ['hair', Border::BORDER_HAIR],\n            ['medium', Border::BORDER_MEDIUM],\n            ['medium-dashed', Border::BORDER_MEDIUMDASHED],\n            ['medium-dash-dot', Border::BORDER_MEDIUMDASHDOT],\n            ['medium-dash-dot-dot', Border::BORDER_MEDIUMDASHDOTDOT],\n            ['none', Border::BORDER_NONE],\n            ['slant-dash-dot', Border::BORDER_SLANTDASHDOT],\n            ['solid', Border::BORDER_THIN],\n            ['thick', Border::BORDER_THICK],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlCharsetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlCharsetTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCharset')]\n    public function testCharset(string $filename, string $expectedResult): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(ReaderException::class);\n            $this->expectExceptionMessage('Failed to load');\n        }\n        $directory = 'tests/data/Reader/HTML';\n        $reader = new Html();\n        $spreadsheet = $reader->load(\"$directory/$filename\");\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerCharset(): array\n    {\n        return [\n            ['charset.ISO-8859-1.html', 'À1'],\n            ['charset.ISO-8859-1.html4.html', 'À1'],\n            ['charset.ISO-8859-2.html', 'Ŕ1'],\n            ['charset.nocharset.html', 'À1'],\n            ['charset.UTF-8.html', 'À1'],\n            ['charset.UTF-8.bom.html', 'À1'],\n            ['charset.UTF-16.bebom.html', 'À1'],\n            ['charset.UTF-16.lebom.html', 'À1'],\n            ['charset.gb18030.html', '电视机'],\n            ['charset.unknown.html', 'exception'],\n            ['xhtml4.entity.xhtml', 'exception'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlExtend.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\n\nclass HtmlExtend extends \\PhpOffice\\PhpSpreadsheet\\Reader\\Html\n{\n    protected static string $deliberate = 'deliberate';\n\n    protected static function replaceNonAsciiIfNeeded(string $convert): ?string\n    {\n        if (self::$deliberate !== '') {\n            throw new ReaderException(self::$deliberate);\n        }\n\n        return parent::replaceNonAsciiIfNeeded($convert);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlHelper.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass HtmlHelper\n{\n    public static function createHtml(string $html): string\n    {\n        $filename = File::temporaryFilename();\n        file_put_contents($filename, $html);\n\n        return $filename;\n    }\n\n    public static function loadHtmlIntoSpreadsheet(string $filename, bool $unlink = false, ?bool $allowExternalImages = null): Spreadsheet\n    {\n        $html = new Html();\n        if ($allowExternalImages !== null) {\n            $html->setAllowExternalImages($allowExternalImages);\n        }\n        $spreadsheet = $html->load($filename);\n        if ($unlink) {\n            unlink($filename);\n        }\n\n        return $spreadsheet;\n    }\n\n    public static function loadHtmlStringIntoSpreadsheet(string $content, ?bool $allowExternalImages = null): Spreadsheet\n    {\n        $html = new Html();\n        if ($allowExternalImages !== null) {\n            $html->setAllowExternalImages($allowExternalImages);\n        }\n        $spreadsheet = $html->loadFromString($content);\n\n        return $spreadsheet;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlImage2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html as HtmlReader;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlImage2Test extends TestCase\n{\n    public function testDefault(): void\n    {\n        $reader = new HtmlReader();\n        self::assertFalse($reader->getAllowExternalImages());\n    }\n\n    public function testCanInsertImageGoodProtocolAllowedNoWhitelist(): void\n    {\n        if (getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $imagePath1 = 'https://phpspreadsheet.readthedocs.io/en/'\n            . 'latest/topics/images/01-03-filter-icon-1.png';\n        $imagePath2 = 'https://phpspreadsheet.readthedocs.io/en/'\n            . 'latest/topics/images/01-02-autofilter.png';\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath1 . '\" alt=\"test image1 voilà\"></td>\n                    </tr>\n                    <tr>\n                        <td><img src=\"' . $imagePath2 . '\" alt=\"test image2 voilà\"></td>\n                    </tr>\n                </table>';\n        $reader = new HtmlReader();\n        $reader->setAllowExternalImages(true);\n        $spreadsheet = $reader->loadFromString($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $drawings = $firstSheet->getDrawingCollection();\n        self::assertCount(2, $drawings);\n        $drawing1 = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing1);\n        self::assertSame($imagePath1, $drawing1->getPath());\n        self::assertSame('A1', $drawing1->getCoordinates());\n        $drawing2 = $drawings[1];\n        self::assertInstanceOf(Drawing::class, $drawing2);\n        self::assertSame($imagePath2, $drawing2->getPath());\n        self::assertSame('A2', $drawing2->getCoordinates());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function suppliedWhiteList(string $path): bool\n    {\n        return str_ends_with($path, 'autofilter.png');\n    }\n\n    public function testCanInsertImageGoodProtocolAllowedWhitelist(): void\n    {\n        if (getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $imagePath1 = 'https://phpspreadsheet.readthedocs.io/en/'\n            . 'latest/topics/images/01-03-filter-icon-1.png';\n        $imagePath2 = 'https://phpspreadsheet.readthedocs.io/en/'\n            . 'latest/topics/images/01-02-autofilter.png';\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath1 . '\" alt=\"test image1 voilà\"></td>\n                    </tr>\n                    <tr>\n                        <td><img src=\"' . $imagePath2 . '\" alt=\"test image2 voilà\"></td>\n                    </tr>\n                </table>';\n        $reader = new HtmlReader();\n        $reader->setAllowExternalImages(true)\n            ->setIsWhitelisted($this->suppliedWhiteList(...));\n        $spreadsheet = $reader->loadFromString($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $drawings = $firstSheet->getDrawingCollection();\n        self::assertCount(1, $drawings, 'one drawing whitelisted, one not');\n        $drawing2 = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing2);\n        self::assertSame($imagePath2, $drawing2->getPath());\n        self::assertSame('A2', $drawing2->getCoordinates());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCanInsertImageGoodProtocolNotAllowed(): void\n    {\n        $imagePath = 'https://phpspreadsheet.readthedocs.io/en/stable/topics/images/01-03-filter-icon-1.png';\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath . '\" alt=\"test image voilà\"></td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html, false);\n        $firstSheet = $spreadsheet->getSheet(0);\n        self::assertCount(0, $firstSheet->getDrawingCollection());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCantInsertImageNotFoundAllowed(): void\n    {\n        if (getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $imagePath = 'https://phpspreadsheet.readthedocs.io/en/latest/topics/images/xxx01-03-filter-icon-1.png';\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath . '\" alt=\"test image voilà\"></td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html, true);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $drawingCollection = $firstSheet->getDrawingCollection();\n        self::assertCount(0, $drawingCollection);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCantInsertImageNotFoundNotAllowed(): void\n    {\n        $imagePath = 'https://phpspreadsheet.readthedocs.io/en/latest/topics/images/xxx01-03-filter-icon-1.png';\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath . '\" alt=\"test image voilà\"></td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html, false);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $drawingCollection = $firstSheet->getDrawingCollection();\n        self::assertCount(0, $drawingCollection);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('providerBadProtocol')]\n    public function testCannotInsertImageBadProtocol(string $imagePath): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Invalid protocol for linked drawing');\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath . '\" alt=\"test image voilà\"></td>\n                    </tr>\n                </table>';\n        HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n    }\n\n    public static function providerBadProtocol(): array\n    {\n        return [\n            'unknown protocol' => ['httpx://example.com/image.png'],\n            'embedded whitespace' => ['ht tp://example.com/image.png'],\n            'control character' => [\"\\x14http://example.com/image.png\"],\n            'mailto' => ['mailto:xyz@example.com'],\n            'mailto whitespace' => ['mail to:xyz@example.com'],\n            'phar' => ['phar://example.com/image.phar'],\n            'phar control' => [\"\\x14phar://example.com/image.phar\"],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlImageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlImageTest extends TestCase\n{\n    public function testCanInsertImage(): void\n    {\n        $imagePath = realpath(__DIR__ . '/../../../data/Reader/HTML/image.jpg');\n\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath . '\" alt=\"test image voilà\"></td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        /** @var Drawing $drawing */\n        $drawing = $firstSheet->getDrawingCollection()[0];\n        self::assertEquals($imagePath, $drawing->getPath());\n        self::assertEquals('A1', $drawing->getCoordinates());\n        self::assertEquals('test image voilà', $drawing->getName());\n        self::assertEquals('100', $drawing->getWidth());\n        self::assertEquals('100', $drawing->getHeight());\n    }\n\n    public function testCanInsertImageWidth(): void\n    {\n        $imagePath = realpath(__DIR__ . '/../../../data/Reader/HTML/image.jpg');\n\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath . '\" alt=\"test image\" width=\"50\"></td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        /** @var Drawing $drawing */\n        $drawing = $firstSheet->getDrawingCollection()[0];\n        self::assertEquals('50', $drawing->getWidth());\n        self::assertEquals('50', $drawing->getHeight());\n    }\n\n    public function testCanInsertImageHeight(): void\n    {\n        $imagePath = realpath(__DIR__ . '/../../../data/Reader/HTML/image.jpg');\n\n        $html = '<table>\n                    <tr>\n                        <td><img src=\"' . $imagePath . '\" height=\"75\"></td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        /** @var Drawing $drawing */\n        $drawing = $firstSheet->getDrawingCollection()[0];\n        self::assertEquals('', $drawing->getName());\n        self::assertEquals('75', $drawing->getWidth());\n        self::assertEquals('75', $drawing->getHeight());\n    }\n\n    public function testImageWithourSrc(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td><img></td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        self::assertCount(0, $firstSheet->getDrawingCollection());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlLibxmlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * Dom loadHtml usually succeeds even with invalid Html,\n * although it will generate warning messages.\n * This member demonstrates a method less intrusive than\n * set_error_handler to detect if there has been a problem.\n */\nclass HtmlLibxmlTest extends TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    protected function tearDown(): void\n    {\n        $this->spreadsheet->disconnectWorksheets();\n        unset($this->spreadsheet);\n    }\n\n    public function testLoadInvalidString(): void\n    {\n        $libxml = libxml_use_internal_errors();\n        $html = '<table<>';\n        $reader = new Html();\n        $reader->setSuppressLoadWarnings(true);\n        $this->spreadsheet = $reader->loadFromString($html);\n        self::assertNotEmpty($reader->getLibxmlMessages());\n        self::assertSame($libxml, libxml_use_internal_errors());\n    }\n\n    public function testLoadValidString(): void\n    {\n        $libxml = libxml_use_internal_errors();\n        $html = '<table>';\n        $reader = new Html();\n        $reader->setSuppressLoadWarnings(true);\n        $this->spreadsheet = $reader->loadFromString($html);\n        self::assertEmpty($reader->getLibxmlMessages());\n        self::assertSame($libxml, libxml_use_internal_errors());\n    }\n\n    public function testLoadValidStringNoSuppress(): void\n    {\n        $libxml = libxml_use_internal_errors();\n        $html = '<table>';\n        $reader = new Html();\n        $this->spreadsheet = $reader->loadFromString($html);\n        self::assertEmpty($reader->getLibxmlMessages());\n        self::assertSame($libxml, libxml_use_internal_errors());\n    }\n\n    public function testLoadValidFile(): void\n    {\n        $libxml = libxml_use_internal_errors();\n        $reader = new Html();\n        $reader->setSuppressLoadWarnings(true);\n        $file = 'tests/data/Reader/HTML/charset.ISO-8859-1.html4.html';\n        $this->spreadsheet = $reader->load($file);\n        self::assertEmpty($reader->getLibxmlMessages());\n        self::assertSame($libxml, libxml_use_internal_errors());\n    }\n\n    public function testLoadInvalidFile(): void\n    {\n        $libxml = libxml_use_internal_errors();\n        $reader = new Html();\n        $reader->setSuppressLoadWarnings(true);\n        $file = 'tests/data/Reader/HTML/badhtml.html';\n        $this->spreadsheet = $reader->load($file);\n        self::assertNotEmpty($reader->getLibxmlMessages());\n        self::assertSame($libxml, libxml_use_internal_errors());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlLoadStringTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlLoadStringTest extends TestCase\n{\n    public function testCanLoadFromString(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td>Hello World</td>\n                    </tr>\n                    <tr>\n                        <td>Hello<br />World</td>\n                    </tr>\n                    <tr>\n                        <td>Hello<br>World</td>\n                    </tr>\n                </table>';\n        $spreadsheet = (new Html())->loadFromString($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $cellStyle = $firstSheet->getStyle('A1');\n        self::assertFalse($cellStyle->getAlignment()->getWrapText());\n\n        $cellStyle = $firstSheet->getStyle('A2');\n        self::assertTrue($cellStyle->getAlignment()->getWrapText());\n        $cellValue = $firstSheet->getCell('A2')->getValue();\n        self::assertStringContainsString(\"\\n\", $cellValue);\n\n        $cellStyle = $firstSheet->getStyle('A3');\n        self::assertTrue($cellStyle->getAlignment()->getWrapText());\n        $cellValue = $firstSheet->getCell('A3')->getValue();\n        self::assertStringContainsString(\"\\n\", $cellValue);\n    }\n\n    // testLoadInvalidString moved to HtmlPhpUnit10Test\n\n    public function testCanLoadFromStringIntoExistingSpreadsheet(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td>Hello World</td>\n                    </tr>\n                    <tr>\n                        <td>Hello<br />World</td>\n                    </tr>\n                    <tr>\n                        <td>Hello<br>World</td>\n                    </tr>\n                </table>';\n        $reader = new Html();\n        $spreadsheet = $reader->loadFromString($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $cellStyle = $firstSheet->getStyle('A1');\n        self::assertFalse($cellStyle->getAlignment()->getWrapText());\n\n        $cellStyle = $firstSheet->getStyle('A2');\n        self::assertTrue($cellStyle->getAlignment()->getWrapText());\n        $cellValue = $firstSheet->getCell('A2')->getValue();\n        self::assertStringContainsString(\"\\n\", $cellValue);\n\n        $cellStyle = $firstSheet->getStyle('A3');\n        self::assertTrue($cellStyle->getAlignment()->getWrapText());\n        $cellValue = $firstSheet->getCell('A3')->getValue();\n        self::assertStringContainsString(\"\\n\", $cellValue);\n\n        $reader->setSheetIndex(1);\n        $html = '<table>\n                    <tr>\n                        <td>Goodbye World</td>\n                    </tr>\n                </table>';\n\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n        $spreadsheet = $reader->loadFromString($html, $spreadsheet);\n        self::assertEquals(2, $spreadsheet->getSheetCount());\n    }\n\n    public function testCanLoadDuplicateTitle(): void\n    {\n        $html = <<<'EOF'\n            <html>\n            <head>\n            <title>Sheet</title>\n            </head>\n            <body>\n            <table><tr><td>1</td></tr></table>\n            </body>\n            </html>\n            EOF;\n        $reader = new Html();\n        $spreadsheet = $reader->loadFromString($html);\n        $reader->setSheetIndex(1);\n        $reader->loadFromString($html, $spreadsheet);\n        $reader->setSheetIndex(2);\n        $reader->loadFromString($html, $spreadsheet);\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals(1, $sheet->getCell('A1')->getValue());\n        self::assertEquals('Sheet', $sheet->getTitle());\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals(1, $sheet->getCell('A1')->getValue());\n        self::assertEquals('Sheet 1', $sheet->getTitle());\n        $sheet = $spreadsheet->getSheet(2);\n        self::assertEquals(1, $sheet->getCell('A1')->getValue());\n        self::assertEquals('Sheet 2', $sheet->getTitle());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlPhpunit10Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * There were problems running this test in HtmlTest with PhpUnit 10.\n * This replacement seem to work.\n */\nclass HtmlPhpunit10Test extends TestCase\n{\n    private static string $errorString;\n\n    protected function setUp(): void\n    {\n        self::$errorString = '';\n        set_error_handler([self::class, 'errorHandler']);\n    }\n\n    protected function tearDown(): void\n    {\n        restore_error_handler();\n    }\n\n    public static function errorHandler(int $errno, string $errstr): bool\n    {\n        if ($errno === E_WARNING) {\n            self::$errorString = $errstr;\n\n            return true; // stop error handling\n        }\n\n        return false; // continue error handling\n    }\n\n    public function testBadHtml(): void\n    {\n        $filename = 'tests/data/Reader/HTML/badhtml.html';\n        $reader = new Html();\n        self::assertTrue($reader->canRead($filename));\n        $reader->load($filename);\n        self::assertStringContainsString('DOMDocument::loadHTML', self::$errorString);\n    }\n\n    public function testLoadInvalidString(): void\n    {\n        $html = '<table<>';\n        (new Html())->loadFromString($html);\n        self::assertStringContainsString('DOMDocument::loadHTML', self::$errorString);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlTagsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlTagsTest extends TestCase\n{\n    public function testTags(): void\n    {\n        $reader = new Html();\n        $html1 = <<<EOF\n            <table><tbody>\n            <tr><td>1</td><td>2</td><td>3</td></tr>\n            <tr><td><a href='www.google.com'>hyperlink</a></td><td>5<hr></td><td>6</td></tr>\n            <tr><td>7</td><td>8</td><td>9</td></tr>\n            <tr><td>10</td><td>11</td><td>12</td></tr>\n            </tbody></table>\n            <hr>\n            <table><tbody>\n            <tr><td>1</td><td><i>2</i></td><td>3</td></tr>\n            <tr height='20'><td>4</td><td>5</td><td>6</td></tr>\n            <tr><td>7</td><td>8</td><td>9</td></tr>\n            <tr><td><ul><li>A</li><li>B</li><li>C</li></ul></td><td>11</td><td>12</td></tr>\n            </tbody></table>\n            <ul><li>D</li><li>E</li><li>F</li></ul>\n            <br>\n            <table><tbody>\n            <tr><td>M</td>\n            <td>\n              <table><tbody>\n              <tr><td>N</td><td>O</td></tr>\n              <tr><td>P</td><td>Q</td></tr>\n              </tbody></table>\n            </td>\n            <td>R</td>\n            </tr>\n            <tr><td>S</td><td>T</td><td>U</td></tr>\n            </tbody></table>\n            EOF;\n        $robj = $reader->loadFromString($html1);\n        $sheet = $robj->getActiveSheet();\n\n        self::assertEquals('www.google.com', $sheet->getCell('A2')->getHyperlink()->getUrl());\n        self::assertEquals('hyperlink', $sheet->getCell('A2')->getValue());\n        self::assertEquals(-1, $sheet->getRowDimension(11)->getRowHeight());\n        self::assertEquals(20, $sheet->getRowDimension(12)->getRowHeight());\n        self::assertEquals(5, $sheet->getCell('B2')->getValue());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('B3')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(6, $sheet->getCell('C4')->getValue());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('A9')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertEquals(2, $sheet->getCell('B11')->getValue());\n        self::assertTrue($sheet->getCell('B11')->getStyle()->getFont()->getItalic());\n\n        // list within table\n        self::assertEquals(\"A\\nB\\nC\", $sheet->getCell('A14')->getValue());\n        self::assertTrue($sheet->getCell('A14')->getStyle()->getAlignment()->getWrapText());\n        // list outside of table\n        self::assertEquals('D', $sheet->getCell('A17')->getValue());\n        self::assertEquals('E', $sheet->getCell('A18')->getValue());\n        self::assertEquals('F', $sheet->getCell('A19')->getValue());\n\n        // embedded table\n        self::assertEquals('M', $sheet->getCell('A21')->getValue());\n        self::assertEquals('N', $sheet->getCell('B20')->getValue());\n        self::assertEquals('O', $sheet->getCell('C20')->getValue());\n        self::assertEquals('P', $sheet->getCell('B21')->getValue());\n        self::assertEquals('Q', $sheet->getCell('C21')->getValue());\n        self::assertEquals('R', $sheet->getCell('C23')->getValue());\n        self::assertEquals('S', $sheet->getCell('A24')->getValue());\n    }\n\n    public static function testTagsRowColSpans(): void\n    {\n        $reader = new Html();\n        $html1 = <<<EOF\n            <table>\n              <tr>\n                <th>Month</th>\n                <th>Savings</th>\n                <th>Expenses</th>\n              </tr>\n              <tr>\n                <td>January</td>\n                <td>$100</td>\n                <td rowspan=\"2\">$50</td>\n              </tr>\n              <tr>\n                <td>February</td>\n                <td>$80</td>\n              </tr>\n              <tr>\n              <td rowspan=\"2\" colspan=\"2\" bgcolor=\"#00FFFF\">Away in March</td>\n              <td>$30</td>\n              </tr>\n              <tr>\n              <td>$40</td>\n              </tr>\n            </table>\n            EOF;\n        $robj = $reader->loadFromString($html1);\n        $sheet = $robj->getActiveSheet();\n\n        self::assertEquals(['C2:C3' => 'C2:C3', 'A4:B5' => 'A4:B5'], $sheet->getMergeCells());\n        self::assertEquals('Away in March', $sheet->getCell('A4')->getValue());\n        self::assertEquals('00FFFF', $sheet->getCell('A4')->getStyle()->getFill()->getEndColor()->getRGB());\n    }\n\n    public static function testDoublyEmbeddedTable(): void\n    {\n        $reader = new Html();\n        $html1 = <<<EOF\n            <table><tbody>\n            <tr><td>1</td><td>2</td><td>3</td></tr>\n            <tr><td>4</td><td>5</td><td>6</td></tr>\n            <tr><td>7</td><td>8</td><td>9</td></tr>\n            <tr><td></td><td></td><td></td></tr>\n            <tr><td></td><td></td><td></td></tr>\n            <tr><td></td><td></td><td></td></tr>\n            <tr><td>M</td>\n            <td>\n              <table><tbody>\n              <tr><td>N</td>\n                <td>\n                  <table><tbody>\n                  <tr><td>10</td><td>11</td></tr>\n                  <tr><td>12</td><td>13</td></tr>\n                  </tbody></table>\n                </td>\n              <td>Y</td>\n              </tr>\n              <tr><td>P</td><td>Q</td><td>X</td></tr>\n              </tbody></table>\n            </td>\n            <td>R</td>\n            </tr>\n            <tr><td>S</td><td>T</td><td>U</td></tr>\n            </tbody></table>\n            EOF;\n        $robj = $reader->loadFromString($html1);\n        $sheet = $robj->getActiveSheet();\n\n        self::assertEquals('1', $sheet->getCell('A1')->getValue());\n        self::assertEquals('2', $sheet->getCell('B1')->getValue());\n        self::assertEquals('3', $sheet->getCell('C1')->getValue());\n        self::assertEquals('4', $sheet->getCell('A2')->getValue());\n        self::assertEquals('5', $sheet->getCell('B2')->getValue());\n        self::assertEquals('6', $sheet->getCell('C2')->getValue());\n        self::assertEquals('7', $sheet->getCell('A3')->getValue());\n        self::assertEquals('8', $sheet->getCell('B3')->getValue());\n        self::assertEquals('9', $sheet->getCell('C3')->getValue());\n        self::assertEquals('10', $sheet->getCell('C5')->getValue());\n        self::assertEquals('11', $sheet->getCell('D5')->getValue());\n        self::assertEquals('12', $sheet->getCell('C6')->getValue());\n        self::assertEquals('13', $sheet->getCell('D6')->getValue());\n        self::assertEquals('N', $sheet->getCell('B6')->getValue());\n        self::assertEquals('M', $sheet->getCell('A7')->getValue());\n        self::assertEquals('Y', $sheet->getCell('E7')->getValue());\n        self::assertEquals('P', $sheet->getCell('B8')->getValue());\n        self::assertEquals('Q', $sheet->getCell('C8')->getValue());\n        self::assertEquals('X', $sheet->getCell('D8')->getValue());\n        self::assertEquals('R', $sheet->getCell('C10')->getValue());\n        self::assertEquals('S', $sheet->getCell('A11')->getValue());\n        self::assertEquals('T', $sheet->getCell('B11')->getValue());\n        self::assertEquals('U', $sheet->getCell('C11')->getValue());\n    }\n\n    public static function testTagsOutsideTable(): void\n    {\n        $reader = new Html();\n        $html1 = <<<EOF\n            <h1>Here comes a list</h1>\n            <ol>\n            <li>Item 1</li>\n            <li>Item 2</li>\n            <li>Item 3</li>\n            <li>Item 4</li>\n            </ol>\n            And here's another\n            <ul>\n            <li>Item A</li>\n            <li>Item B</li>\n            </ul>\n            <ol>\n            Content before list\n            <li>Item I</li>\n            <li>Item II</li>\n            <li>This <i>is</i> <span style='color: #ff0000;'>rich</span> text</li>\n            </ol>\n\n            EOF;\n        $robj = $reader->loadFromString($html1);\n        $sheet = $robj->getActiveSheet();\n\n        self::assertTrue($sheet->getCell('A1')->getStyle()->getFont()->getBold());\n        self::assertEquals('Here comes a list', $sheet->getCell('A1')->getValue());\n        self::assertEquals('Item 1', $sheet->getCell('A3')->getValue());\n        self::assertEquals('Item 2', $sheet->getCell('A4')->getValue());\n        self::assertEquals('Item 3', $sheet->getCell('A5')->getValue());\n        self::assertEquals('Item 4', $sheet->getCell('A6')->getValue());\n        self::assertEquals('And here\\'s another', $sheet->getCell('A7')->getValue());\n        self::assertEquals('Item A', $sheet->getCell('A9')->getValue());\n        self::assertEquals('Item B', $sheet->getCell('A10')->getValue());\n        self::assertEquals('Content before list', $sheet->getCell('A11')->getValue());\n        self::assertEquals('Item I', $sheet->getCell('A12')->getValue());\n        self::assertEquals('Item II', $sheet->getCell('A13')->getValue());\n        // TODO Rich Text not yet supported\n    }\n\n    public static function testHyperlinksWithRowspan(): void\n    {\n        $reader = new Html();\n        $html1 = <<<EOF\n            <table>\n            \t<tr>\n            \t\t<td rowspan=\"3\">Title</td>\n            \t\t<td><a href=\"https://google.com\">Link 1</a></td>\n            \t</tr>\n            \t<tr>\n            \t\t<td><a href=\"https://google.com\">Link 2</a></td>\n            \t</tr>\n            \t<tr>\n            \t\t<td><a href=\"https://google.com\">Link 3</a></td>\n            \t</tr>\n            </table>\n            EOF;\n        $robj = $reader->loadFromString($html1);\n        $sheet = $robj->getActiveSheet();\n        self::assertEquals('https://google.com', $sheet->getCell('B1')->getHyperlink()->getUrl());\n        self::assertEquals('https://google.com', $sheet->getCell('B2')->getHyperlink()->getUrl());\n        self::assertEquals('https://google.com', $sheet->getCell('B3')->getHyperlink()->getUrl());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlTest extends TestCase\n{\n    public function testCsvWithAngleBracket(): void\n    {\n        $filename = 'tests/data/Reader/HTML/csv_with_angle_bracket.csv';\n        $reader = new Html();\n        self::assertFalse($reader->canRead($filename));\n    }\n\n    // testBadHtml moved to HtmlPhpunit10Test\n\n    public function testNonHtml(): void\n    {\n        $filename = __FILE__;\n        $reader = new Html();\n        self::assertFalse($reader->canRead($filename));\n\n        $this->expectException(ReaderException::class);\n        $reader->load($filename);\n    }\n\n    public function testInvalidFilename(): void\n    {\n        $reader = new Html();\n        self::assertEquals(0, $reader->getSheetIndex());\n        self::assertFalse($reader->canRead(''));\n    }\n\n    public static function providerCanReadVerySmallFile(): array\n    {\n        $padding = str_repeat('a', 2048);\n\n        return [\n            [true, ' <html> ' . $padding . ' </html> '],\n            [true, ' <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"> <html>' . $padding . '</html>'],\n            [true, '<html></html>'],\n            [false, ''],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCanReadVerySmallFile')]\n    public function testCanReadVerySmallFile(bool $expected, string $content): void\n    {\n        $filename = HtmlHelper::createHtml($content);\n        $reader = new Html();\n        $actual = $reader->canRead($filename);\n\n        self::assertSame($expected, $actual);\n\n        unlink($filename);\n    }\n\n    public function testBackgroundColorInRanding(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td style=\"background-color: #0000FF;color: #FFFFFF\">Blue background</td>\n                        <td style=\"background-color: unknown1;color: unknown2\">Unknown fore/background</td>\n                        <td style=\"background-color: antiquewhite2;color: aliceblue\">Unknown fore/background</td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $style = $firstSheet->getCell('A1')->getStyle();\n        self::assertEquals('FFFFFF', $style->getFont()->getColor()->getRGB());\n        self::assertEquals('0000FF', $style->getFill()->getStartColor()->getRGB());\n        self::assertEquals('0000FF', $style->getFill()->getEndColor()->getRGB());\n        $style = $firstSheet->getCell('B1')->getStyle();\n        self::assertEquals('000000', $style->getFont()->getColor()->getRGB());\n        self::assertEquals('000000', $style->getFill()->getEndColor()->getRGB());\n        self::assertEquals('FFFFFF', $style->getFill()->getstartColor()->getRGB());\n        $style = $firstSheet->getCell('C1')->getStyle();\n        self::assertEquals('f0f8ff', $style->getFont()->getColor()->getRGB());\n        self::assertEquals('eedfcc', $style->getFill()->getEndColor()->getRGB());\n        self::assertEquals('eedfcc', $style->getFill()->getstartColor()->getRGB());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCanApplyInlineFontStyles(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td style=\"font-size: 16px;\">16px</td>\n                        <td style=\"font-family: \\'Times New Roman\\'\">Times New Roman</td>\n                        <td style=\"font-weight: bold;\">Bold</td>\n                        <td style=\"font-style: italic;\">Italic</td>\n                        <td style=\"text-decoration: underline;\">Underline</td>\n                        <td style=\"text-decoration: line-through;\">Line through</td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $style = $firstSheet->getCell('A1')->getStyle();\n        self::assertEquals(16, $style->getFont()->getSize());\n\n        $style = $firstSheet->getCell('B1')->getStyle();\n        self::assertEquals('Times New Roman', $style->getFont()->getName());\n\n        $style = $firstSheet->getCell('C1')->getStyle();\n        self::assertTrue($style->getFont()->getBold());\n\n        $style = $firstSheet->getCell('D1')->getStyle();\n        self::assertTrue($style->getFont()->getItalic());\n\n        $style = $firstSheet->getCell('E1')->getStyle();\n        self::assertEquals(Font::UNDERLINE_SINGLE, $style->getFont()->getUnderline());\n\n        $style = $firstSheet->getCell('F1')->getStyle();\n        self::assertTrue($style->getFont()->getStrikethrough());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCanApplyInlineWidth(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td width=\"50\">50px</td>\n                        <td style=\"width: 100px;\">100px</td>\n                        <td width=\"50px\">50px</td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $dimension = $firstSheet->getColumnDimension('A');\n        self::assertEquals(50, $dimension->getWidth());\n\n        $dimension = $firstSheet->getColumnDimension('B');\n        self::assertEquals(100, $dimension->getWidth('px'));\n\n        $dimension = $firstSheet->getColumnDimension('C');\n        self::assertEquals(50, $dimension->getWidth('px'));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCanApplyInlineHeight(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td height=\"50\">1</td>\n                    </tr>\n                    <tr>\n                        <td style=\"height: 100px;\">2</td>\n                    </tr>\n                    <tr>\n                        <td height=\"50px\">1</td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $dimension = $firstSheet->getRowDimension(1);\n        self::assertEquals(50, $dimension->getRowHeight());\n\n        $dimension = $firstSheet->getRowDimension(2);\n        self::assertEquals(100, $dimension->getRowHeight('px'));\n\n        $dimension = $firstSheet->getRowDimension(3);\n        self::assertEquals(50, $dimension->getRowHeight('px'));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCanApplyAlignment(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td align=\"center\">Center align</td>\n                        <td valign=\"center\">Center valign</td>\n                        <td style=\"text-align: center;\">Center align</td>\n                        <td style=\"vertical-align: center;\">Center valign</td>\n                        <td style=\"text-indent: 9px;\">Text indent</td>\n                        <td style=\"word-wrap: break-word;\">Wraptext</td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $style = $firstSheet->getCell('A1')->getStyle();\n        self::assertEquals(Alignment::HORIZONTAL_CENTER, $style->getAlignment()->getHorizontal());\n\n        $style = $firstSheet->getCell('B1')->getStyle();\n        self::assertEquals(Alignment::VERTICAL_CENTER, $style->getAlignment()->getVertical());\n\n        $style = $firstSheet->getCell('C1')->getStyle();\n        self::assertEquals(Alignment::HORIZONTAL_CENTER, $style->getAlignment()->getHorizontal());\n\n        $style = $firstSheet->getCell('D1')->getStyle();\n        self::assertEquals(Alignment::VERTICAL_CENTER, $style->getAlignment()->getVertical());\n\n        $style = $firstSheet->getCell('E1')->getStyle();\n        self::assertEquals(1, $style->getAlignment()->getIndent());\n\n        $style = $firstSheet->getCell('F1')->getStyle();\n        self::assertTrue($style->getAlignment()->getWrapText());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCanApplyInlineDataFormat(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td data-format=\"mmm-yy\">2019-02-02 12:34:00</td>\n                        <td data-format=\"#.000\">3</td>\n                        <td data-format=\"#.000\">x</td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $sheet = $spreadsheet->getSheet(0);\n\n        self::assertEquals('mmm-yy', $sheet->getStyle('A1')->getNumberFormat()->getFormatCode());\n        self::assertEquals('2019-02-02 12:34:00', $sheet->getCell('A1')->getFormattedValue(), 'field is string not number so not formatted');\n        self::assertEquals('#.000', $sheet->getStyle('B1')->getNumberFormat()->getFormatCode());\n        self::assertEquals('3.000', $sheet->getCell('B1')->getFormattedValue(), 'format applied to numeric value');\n        self::assertEquals('#.000', $sheet->getStyle('C1')->getNumberFormat()->getFormatCode());\n        self::assertEquals('x', $sheet->getCell('C1')->getFormattedValue(), 'format not applied to non-numeric value');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCanApplyCellWrapping(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td>Hello World</td>\n                    </tr>\n                    <tr>\n                        <td>Hello<br />World</td>\n                    </tr>\n                    <tr>\n                        <td>Hello<br>World</td>\n                    </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $cellStyle = $firstSheet->getStyle('A1');\n        self::assertFalse($cellStyle->getAlignment()->getWrapText());\n\n        $cellStyle = $firstSheet->getStyle('A2');\n        self::assertTrue($cellStyle->getAlignment()->getWrapText());\n        $cellValue = $firstSheet->getCell('A2')->getValue();\n        self::assertStringContainsString(\"\\n\", $cellValue);\n\n        $cellStyle = $firstSheet->getStyle('A3');\n        self::assertTrue($cellStyle->getAlignment()->getWrapText());\n        $cellValue = $firstSheet->getCell('A3')->getValue();\n        self::assertStringContainsString(\"\\n\", $cellValue);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRowspanInRendering(): void\n    {\n        $filename = 'tests/data/Reader/HTML/rowspan.html';\n        $reader = new Html();\n        $spreadsheet = $reader->load($filename);\n\n        $actual = $spreadsheet->getActiveSheet()->getMergeCells();\n        self::assertSame(['A2:C2' => 'A2:C2'], $actual);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testTextIndentUseRowspan(): void\n    {\n        $html = '<table>\n                  <tr>\n                    <td>1</td>\n                    <td rowspan=\"2\" style=\"vertical-align: center;\">Center Align</td>\n                    <td>Row</td>\n                  </tr>\n                  <tr>\n                    <td>2</td>\n                    <td style=\"text-indent:9px\">Text Indent</td>\n                  </tr>\n                </table>';\n        $spreadsheet = HtmlHelper::loadHtmlStringIntoSpreadsheet($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $style = $firstSheet->getCell('C2')->getStyle();\n        self::assertEquals(1, $style->getAlignment()->getIndent());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBorderWithRowspanAndColspan(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td style=\"border: 1px solid black;\">NOT SPANNED</td>\n                        <td rowspan=\"2\" colspan=\"2\" style=\"border: 1px solid black;\">SPANNED</td>\n                    </tr>\n                    <tr>\n                        <td style=\"border: 1px solid black;\">NOT SPANNED</td>\n                    </tr>\n                </table>';\n\n        $reader = new Html();\n        $spreadsheet = $reader->loadFromString($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $style = $firstSheet->getStyle('B1:C2');\n\n        $borders = $style->getBorders();\n\n        $totalBorders = [\n            $borders->getTop(),\n            $borders->getLeft(),\n            $borders->getBottom(),\n            $borders->getRight(),\n        ];\n\n        foreach ($totalBorders as $border) {\n            self::assertEquals(Border::BORDER_THIN, $border->getBorderStyle());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBorderWithColspan(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td style=\"border: 1px solid black;\">NOT SPANNED</td>\n                        <td colspan=\"2\" style=\"border: 1px solid black;\">SPANNED</td>\n                    </tr>\n                    <tr>\n                        <td style=\"border: 1px solid black;\">NOT SPANNED</td>\n                    </tr>\n                </table>';\n\n        $reader = new Html();\n        $spreadsheet = $reader->loadFromString($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n        $style = $firstSheet->getStyle('B1:B2');\n\n        $borders = $style->getBorders();\n\n        $totalBorders = [\n            $borders->getTop(),\n            $borders->getLeft(),\n            $borders->getBottom(),\n            $borders->getRight(),\n        ];\n\n        foreach ($totalBorders as $border) {\n            self::assertEquals(Border::BORDER_THIN, $border->getBorderStyle());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDataType(): void\n    {\n        $html = '<table>\n                    <tr>\n                        <td data-type=\"b\">1</td>\n                        <td data-type=\"s\">12345678987654</td>\n                        <!-- in some cases, you may want to treat the string with beginning equal sign as a string rather than a formula -->\n                        <td data-type=\"s\">=B1</td>\n                        <td data-type=\"d\">2022-02-21 10:20:30</td>\n                        <td data-type=\"null\">null</td>\n                        <td data-type=\"b\">0</td>\n                        <td data-type=\"invalid-datatype\">text with invalid datatype</td>\n                    </tr>\n                </table>';\n\n        $reader = new Html();\n        $spreadsheet = $reader->loadFromString($html);\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        // check boolean data type and true\n        self::assertEquals(DataType::TYPE_BOOL, $firstSheet->getCell('A1')->getDataType());\n        self::assertIsBool($firstSheet->getCell('A1')->getValue());\n        self::assertTrue($firstSheet->getCell('A1')->getValue());\n\n        // check string data type\n        self::assertEquals(DataType::TYPE_STRING, $firstSheet->getCell('B1')->getDataType());\n        self::assertIsString($firstSheet->getCell('B1')->getValue());\n\n        // check string with beginning equal sign (=B1) and string datatype,is not formula\n        self::assertEquals(DataType::TYPE_STRING, $firstSheet->getCell('C1')->getDataType());\n        self::assertEquals('=B1', $firstSheet->getCell('C1')->getValue());\n        self::assertTrue($firstSheet->getCell('C1')->getStyle()->getQuotePrefix());\n\n        //check iso date\n        self::assertEqualsWithDelta($firstSheet->getCell('D1')->getValue(), 44613.43090277778, 1.0e-12);\n\n        //null\n        self::assertEquals($firstSheet->getCell('E1')->getValue(), null);\n\n        // check boolean data type and true\n        self::assertEquals(DataType::TYPE_BOOL, $firstSheet->getCell('F1')->getDataType());\n        self::assertIsBool($firstSheet->getCell('F1')->getValue());\n        self::assertFalse($firstSheet->getCell('F1')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/Issue1107Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html as HtmlReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue1107Test extends TestCase\n{\n    private string $outfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outfile !== '') {\n            unlink($this->outfile);\n            $this->outfile = '';\n        }\n    }\n\n    public function testIssue1107(): void\n    {\n        // failure due to cached file size\n        $outstr = str_repeat('a', 1023) . \"\\n\";\n        $allout = str_repeat($outstr, 10);\n        $this->outfile = $outfile = File::temporaryFilename();\n        file_put_contents($outfile, $allout);\n        self::assertSame(10240, filesize($outfile));\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->save($outfile);\n        $spreadsheet->disconnectWorksheets();\n        $reader = new HtmlReader();\n        $spreadsheet2 = $reader->load($outfile);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertSame(1, $sheet2->getCell('A1')->getValue());\n\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/Issue1284Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue1284Test extends AbstractFunctional\n{\n    public function testIssue1284(): void\n    {\n        $ideographicSpace = \"\\u{3000}\";\n        $nbsp = \"\\u{a0}\";\n        $spreadsheetOld = new Spreadsheet();\n        $osheet = $spreadsheetOld->getActiveSheet();\n        $osheet->getCell('A1')->setValue('# item 1');\n        $osheet->getCell('A2')->setValue(\"$ideographicSpace# item 2\");\n        $osheet->getCell('A3')->setValue(\"$ideographicSpace$ideographicSpace# item 3\");\n        $osheet->getCell('A4')->setValue(\"$nbsp#  item\\t4\");\n        $osheet->getCell('A5')->setValue(\"$nbsp$nbsp# item    5\");\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Html');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('# item 1', $sheet->getCell('A1')->getValue(), 'nothing changed');\n        self::assertSame(\"$ideographicSpace# item 2\", $sheet->getCell('A2')->getValue(), 'nothing changed including 1 ideographic space');\n        self::assertSame(\"$ideographicSpace$ideographicSpace# item 3\", $sheet->getCell('A3')->getValue(), 'nothing changed including 2 ideographic spaces');\n        self::assertSame(\"$nbsp# item 4\", $sheet->getCell('A4')->getValue(), 'nbsp unchanged, 2 spaces reduced to 1, tab changed to space');\n        self::assertSame(\"$nbsp$nbsp# item 5\", $sheet->getCell('A5')->getValue(), 'many spaces reduced to 1');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/Issue2029Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2029Test extends TestCase\n{\n    public function testIssue2029(): void\n    {\n        $content = <<<'EOF'\n            <!DOCTYPE html>\n            <html>\n            <head>\n                <meta charset='utf-8'>\n                <title>Declaracion en Linea</title>\n            </head>\n            <body>\n              <table>\n                <tr>\n                  <td>\n                    <table>\n                        <tr>\n                          <td>\n                            <table>\n                            <tbody>\n                            <tr>\n                              <td>CUIT:</td>\n                              <td><label id=\"lblCUIT\" class=\"text-left\">30-53914190-9</label></td>\n                            </tr>\n                            <tr>\n                              <td>Per&iacute;odo</td>\n                              <td><label id=\"lblPeriodo\" class=\"text-left\">02 2021</label></td>\n                            </tr>\n                            <tr>\n                              <td>Secuencia:</td>\n                              <td><label id=\"lblSecuencia\" class=\"text-left\">0 - Original</label></td>\n                            </tr>\n                            <tr>\n                              <td>Contribuyente:</td>\n                              <td><label id=\"lblContribuyente\">SIND DE TRABAJADORES DE IND DE LA ALIMENTACION</label></td>\n                              <td><label id=\"lblFechaHoy\"></label></td>\n                            </tr>\n                            </tbody>\n                            </table>\n                          </td>\n                        </tr>\n                    </table>\n                  </td>\n                </tr>\n              </table>\n              <table border=\"1px\">\n                <tr>\n                  <th class=\"text-center\">\n                      CUIL\n                  </th>\n                  <th class=\"text-center\">\n                      Apellido y Nombre\n                  </th>\n                  <th class=\"text-center\">\n                      Obra Social\n                  </th>\n                  <th class=\"text-center\">\n                    Corresponde Reducci&oacute;n?\n                  </th>\n                </tr>\n\n                <tr>\n                    <td class=\"text-center\">\n                      12345678901\n                    </td>\n                    <td class=\"text-center\">\n                      EMILIANO ZAPATA SALAZAR\n                    </td>\n                    <td class=\"text-center\">\n                      101208\n                    </td>\n                    <td class=\"text-center\">\n                      Yes\n                    </td>\n                </tr>\n\n                <tr>\n                    <td class=\"text-center\">\n                      23456789012\n                    </td>\n                    <td class=\"text-center\">\n                      FRANCISCO PANCHO VILLA\n                    </td>\n                    <td class=\"text-center\">\n                      101208\n                    </td>\n                    <td class=\"text-center\">\n                      No\n                    </td>\n                </tr>\n              </table>\n            </body>\n            </html>\n\n            EOF;\n        $reader = new Html();\n        $spreadsheet = $reader->loadFromString($content);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('CUIT:', $sheet->getCell('A1')->getValue());\n        self::assertSame('30-53914190-9', $sheet->getCell('B1')->getValue());\n        self::assertSame('Contribuyente:', $sheet->getCell('A4')->getValue());\n        self::assertSame('Apellido y Nombre', $sheet->getCell('B9')->getValue());\n        self::assertEquals('101208', $sheet->getCell('C10')->getValue());\n        self::assertEquals('Yes', $sheet->getCell('D10')->getValue());\n        self::assertEquals('23456789012', $sheet->getCell('A11')->getValue());\n        self::assertEquals('No', $sheet->getCell('D11')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/Issue2810Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2810Test extends TestCase\n{\n    // Reader has been converting falsey values to null\n    public function testIssue2810(): void\n    {\n        $content = <<<'EOF'\n            <!DOCTYPE html>\n            <html>\n            <head>\n                <meta charset='utf-8'>\n                <title>Declaracion en Linea</title>\n            </head>\n            <body>\n              <table>\n                <tr>\n                  <td>1</td>\n                  <td>0</td>\n                  <td>2</td>\n                </tr>\n              </table>\n            </body>\n            </html>\n\n            EOF;\n        $reader = new Html();\n        $spreadsheet = $reader->loadFromString($content);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getCell('A1')->getValue());\n        self::assertSame(0, $sheet->getCell('B1')->getValue());\n        self::assertSame(2, $sheet->getCell('C1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/Issue2942Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2942Test extends TestCase\n{\n    public function testLoadFromString(): void\n    {\n        $content = '<table><tbody><tr><td>éàâèî</td></tr></tbody></table>';\n        $reader = new Html();\n        $spreadsheet = $reader->loadFromString($content);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('éàâèî', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadFromFile(): void\n    {\n        $file = 'tests/data/Reader/HTML/utf8chars.html';\n        $reader = new Html();\n        $spreadsheet = $reader->loadSpreadsheetFromFile($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Test Utf-8 characters voilà', $sheet->getTitle());\n        self::assertSame('éàâèî', $sheet->getCell('A1')->getValue());\n        self::assertSame('αβγδε', $sheet->getCell('B1')->getValue());\n        self::assertSame('𐐁𐐂𐐃 & だけち', $sheet->getCell('A2')->getValue());\n        self::assertSame('אבגדה', $sheet->getCell('B2')->getValue());\n        self::assertSame('𪔀𪔁𪔂', $sheet->getCell('C2')->getValue());\n        self::assertSame('᠐᠑᠒', $sheet->getCell('A3')->getValue());\n        self::assertSame('അആ', $sheet->getCell('B3')->getValue());\n        self::assertSame('กขฃ', $sheet->getCell('C3')->getValue());\n        self::assertSame('✀✐✠', $sheet->getCell('D3')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadFromStringExtendFailure(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Failed to load content ');\n        $content = '<table><tbody><tr><td>éàâèî</td></tr></tbody></table>';\n        $reader = new HtmlExtend();\n        $reader->loadFromString($content);\n    }\n\n    public function testInfo(): void\n    {\n        $file = 'tests/data/Reader/HTML/utf8chars.charset.html';\n        $reader = new Html();\n        $info = $reader->listWorksheetInfo($file);\n        self::assertCount(1, $info);\n        $info0 = $info[0];\n        self::assertSame('Test Utf-8 characters voilà', $info0['worksheetName']);\n        self::assertSame('D', $info0['lastColumnLetter']);\n        self::assertSame(3, $info0['lastColumnIndex']);\n        self::assertSame(7, $info0['totalRows']);\n        self::assertSame(4, $info0['totalColumns']);\n        $names = $reader->listWorksheetNames($file);\n        self::assertCount(1, $names);\n        self::assertSame('Test Utf-8 characters voilà', $names[0]);\n\n        // Following ignored, just make sure it's executable.\n        $reader->setLoadSheetsOnly([$names[0]]);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('✀✐✠', $sheet->getCell('D3')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/OpacityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass OpacityTest extends TestCase\n{\n    public function testOpacity(): void\n    {\n        $filename = 'tests/data/Reader/HTML/html.opacity.3.html';\n        $reader = new Html();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        self::assertNotNull($drawings[0]);\n        self::assertSame(60000, $drawings[0]->getOpacity());\n        self::assertSame(192, $drawings[0]->getHeight());\n        self::assertSame(192, $drawings[0]->getWidth());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/StyleCheckBoxTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass StyleCheckBoxTest extends AbstractFunctional\n{\n    public function testStyleCheckBox(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheetOld = $spreadsheetOld->getActiveSheet();\n        $sheetOld->setCellValue('A1', true);\n        $sheetOld->setCellValue('A2', false);\n        $sheetOld->setCellValue('A3', false); // no checkbox\n        $sheetOld->getStyle('A1')->setCheckBox(true);\n        $sheetOld->getStyle('A2')->setCheckBox(true);\n\n        $sheetOld->setCellValue('B1', '=AND(TRUE,TRUE)');\n        $sheetOld->setCellValue('B2', '=AND(FALSE,TRUE)');\n        $sheetOld->setCellValue('B3', '=AND(TRUE,FALSE)'); // no checkbox\n        $sheetOld->getStyle('B1')->setCheckBox(true);\n        $sheetOld->getStyle('B2')->setCheckBox(true);\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Html');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertTrue($sheet->getCell('A1')->getValue());\n        self::assertFalse($sheet->getCell('A2')->getValue());\n        self::assertFalse($sheet->getCell('A3')->getValue());\n        self::assertTrue($sheet->getStyle('A1')->getCheckBox());\n        self::assertTrue($sheet->getStyle('A2')->getCheckBox());\n        self::assertFalse($sheet->getStyle('A3')->getCheckBox());\n\n        self::assertTrue($sheet->getCell('B1')->getValue());\n        self::assertFalse($sheet->getCell('B2')->getValue());\n        self::assertFalse($sheet->getCell('B3')->getValue());\n        self::assertTrue($sheet->getStyle('B1')->getCheckBox());\n        self::assertTrue($sheet->getStyle('B2')->getCheckBox());\n        self::assertFalse($sheet->getStyle('B3')->getCheckBox());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function writeNoPreCalc(HtmlWriter $writer): void\n    {\n        $writer->setPreCalculateFormulas(false);\n    }\n\n    public function testStyleCheckBoxNoPreCalculate(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheetOld = $spreadsheetOld->getActiveSheet();\n        $sheetOld->setCellValue('A1', true);\n        $sheetOld->setCellValue('A2', false);\n        $sheetOld->setCellValue('A3', false); // no checkbox\n        $sheetOld->getStyle('A1')->setCheckBox(true);\n        $sheetOld->getStyle('A2')->setCheckBox(true);\n\n        $sheetOld->setCellValue('B1', '=AND(TRUE,TRUE)');\n        $sheetOld->setCellValue('B2', '=AND(FALSE,TRUE)');\n        $sheetOld->setCellValue('B3', '=AND(TRUE,FALSE)'); // no checkbox\n        $sheetOld->getStyle('B1')->setCheckBox(true);\n        $sheetOld->getStyle('B2')->setCheckBox(true);\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Html', null, $this->writeNoPreCalc(...));\n        $spreadsheetOld->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertTrue($sheet->getCell('A1')->getValue());\n        self::assertFalse($sheet->getCell('A2')->getValue());\n        self::assertFalse($sheet->getCell('A3')->getValue());\n        self::assertTrue($sheet->getStyle('A1')->getCheckBox());\n        self::assertTrue($sheet->getStyle('A2')->getCheckBox());\n        self::assertFalse($sheet->getStyle('A3')->getCheckBox());\n\n        self::assertSame('=AND(TRUE,TRUE)', $sheet->getCell('B1')->getValue());\n        self::assertSame('=AND(FALSE,TRUE)', $sheet->getCell('B2')->getValue());\n        self::assertSame('=AND(TRUE,FALSE)', $sheet->getCell('B3')->getValue());\n        self::assertTrue($sheet->getStyle('B1')->getCheckBox());\n        self::assertTrue($sheet->getStyle('B2')->getCheckBox());\n        self::assertFalse($sheet->getStyle('B3')->getCheckBox());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Html/ViewportTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ViewportTest extends AbstractFunctional\n{\n    public function testViewport(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $spreadsheetOld->getProperties()->setViewport(Properties::SUGGESTED_VIEWPORT);\n        $osheet = $spreadsheetOld->getActiveSheet();\n        $osheet->getCell('A1')->setValue(1);\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Html');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getCell('A1')->getValue());\n        self::assertSame('width=device-width, initial-scale=1', $spreadsheet->getProperties()->getViewport());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNoViewport(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        //$spreadsheetOld->getProperties()->setViewport(SUGGESTED_VIEWPORT);\n        $osheet = $spreadsheetOld->getActiveSheet();\n        $osheet->getCell('A1')->setValue(1);\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Html');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getCell('A1')->getValue());\n        self::assertSame('', $spreadsheet->getProperties()->getViewport());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/AlignmentStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass AlignmentStyleTest extends AbstractFunctional\n{\n    public function testReadAlignmentStyles(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheet = $spreadsheetOld->getActiveSheet();\n        $spreadsheetOld->getDefaultStyle()\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setRgb('ffff00');\n        $sheet->getCell('A1')->setValue('noStyle');\n        $sheet->getCell('A2')->setValue('left');\n        $sheet->getStyle('A2')->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_LEFT);\n        $sheet->getCell('A3')->setValue('right');\n        $sheet->getStyle('A3')->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n        $sheet->getCell('A4')->setValue('center');\n        $sheet->getStyle('A4')->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $sheet->getCell('A5')->setValue('just ify');\n        $sheet->getStyle('A5')->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_JUSTIFY);\n        $sheet->getCell('A6')->setValue('verttop');\n        $sheet->getStyle('A6')->getAlignment()\n            ->setVertical(Alignment::VERTICAL_TOP);\n        $sheet->getCell('A7')->setValue('vertcen');\n        $sheet->getStyle('A7')->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $sheet->getCell('A8')->setValue('vertcen');\n        $sheet->getStyle('A8')->getAlignment()\n            ->setWrapText(true);\n        $sheet->getCell('A9')->setValue('shrinkshrinkshrink');\n        $sheet->getStyle('A9')->getAlignment()\n            ->setShrinkToFit(true);\n        $sheet->getCell('A10')->setValue('leftindent');\n        $sheet->getStyle('A10')->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_LEFT)\n            ->setIndent(1);\n        $sheet->getCell('A11')->setValue('readorder1');\n        $sheet->getStyle('A11')->getAlignment()\n            ->setReadOrder(Alignment::READORDER_RTL);\n        $sheet->getCell('A12')->setValue('readorder2');\n        $sheet->getStyle('A12')->getAlignment()\n            ->setReadOrder(Alignment::READORDER_LTR);\n        $sheet->getCell('A13')->setValue('vertjust');\n        $sheet->getStyle('A13')->getAlignment()\n            ->setVertical(Alignment::VERTICAL_JUSTIFY);\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $newSheet = $spreadsheet->getActiveSheet();\n        self::assertSame(Fill::FILL_SOLID, $spreadsheet->getDefaultStyle()->getFill()->getFillType());\n        self::assertSame('ffff00', $spreadsheet->getDefaultStyle()->getFill()->getStartColor()->getRgb());\n        self::assertSame(\n            Alignment::HORIZONTAL_GENERAL,\n            $newSheet->getStyle('A1')->getAlignment()\n                ->getHorizontal()\n        );\n        self::assertSame(\n            Alignment::HORIZONTAL_LEFT,\n            $newSheet->getStyle('A2')->getAlignment()\n                ->getHorizontal()\n        );\n        self::assertSame(\n            Alignment::HORIZONTAL_RIGHT,\n            $newSheet->getStyle('A3')->getAlignment()\n                ->getHorizontal()\n        );\n        self::assertSame(\n            Alignment::HORIZONTAL_CENTER,\n            $newSheet->getStyle('A4')->getAlignment()\n                ->getHorizontal()\n        );\n        self::assertSame(\n            Alignment::HORIZONTAL_FILL,\n            $newSheet->getStyle('A5')->getAlignment()\n                ->getHorizontal(),\n            'Ods Reader treats justify and fill the same'\n        );\n        self::assertSame(\n            Alignment::VERTICAL_TOP,\n            $newSheet->getStyle('A6')->getAlignment()\n                ->getVertical()\n        );\n        self::assertSame(\n            Alignment::VERTICAL_CENTER,\n            $newSheet->getStyle('A7')->getAlignment()\n                ->getVertical()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A8')->getAlignment()\n                ->getWrapText()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A9')->getAlignment()\n                ->getShrinkToFit()\n        );\n        self::assertSame(\n            Alignment::HORIZONTAL_LEFT,\n            $newSheet->getStyle('A10')->getAlignment()\n                ->getHorizontal()\n        );\n        self::assertSame(\n            1,\n            $newSheet->getStyle('A10')->getAlignment()\n                ->getIndent()\n        );\n        self::assertSame(\n            Alignment::READORDER_RTL,\n            $newSheet->getStyle('A11')->getAlignment()\n                ->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_LTR,\n            $newSheet->getStyle('A12')->getAlignment()\n                ->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::VERTICAL_JUSTIFY,\n            $newSheet->getStyle('A13')->getAlignment()\n                ->getVertical()\n        );\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/ArrayFormulaTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFormulaTest extends TestCase\n{\n    /** @param float|mixed[] $expectedValue */\n    #[DataProvider('arrayFormulaReaderProvider')]\n    public function testArrayFormulaReader(\n        string $cellAddress,\n        string $expectedRange,\n        string $expectedFormula,\n        array|float $expectedValue\n    ): void {\n        $filename = 'tests/data/Reader/Ods/ArrayFormulaTest.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $cell = $worksheet->getCell($cellAddress);\n        self::assertSame(DataType::TYPE_FORMULA, $cell->getDataType());\n        self::assertSame(['t' => 'array', 'ref' => $expectedRange], $cell->getFormulaAttributes());\n        self::assertSame($expectedFormula, strtoupper($cell->getValueString()));\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $worksheet->calculateArrays();\n        $cell = $worksheet->getCell($cellAddress);\n        self::assertSame($expectedValue, $cell->getCalculatedValue());\n        if (is_array($expectedValue)) {\n            if ($expectedRange === \"$cellAddress:$cellAddress\") {\n                self::assertSame([$expectedValue], $worksheet->rangeToArray($expectedRange, formatData: false, reduceArrays: true));\n            } else {\n                self::assertSame($expectedValue, $worksheet->rangeToArray($expectedRange, formatData: false, reduceArrays: true));\n            }\n        } else {\n            self::assertSame([[$expectedValue]], $worksheet->rangeToArray($expectedRange, formatData: false, reduceArrays: true));\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function arrayFormulaReaderProvider(): array\n    {\n        return [\n            [\n                'B2',\n                'B2:C3',\n                '={2,3}*{4;5}',\n                [[8, 12], [10, 15]],\n            ],\n            [\n                'E1',\n                'E1:H1',\n                '=SIN({-1,0,1,2})',\n                [[-0.8414709848078965, 0.0, 0.8414709848078965, 0.9092974268256817]],\n            ],\n            [\n                'E3',\n                'E3:E3',\n                '=MAX(SIN({-1,0,1,2}))',\n                [0.9092974268256817],\n            ],\n            [\n                'D5',\n                'D5:E6',\n                '=A5:B5*A5:A6',\n                [[4, 6], [8, 12]],\n            ],\n            [\n                'D8',\n                'D8:E9',\n                '=A8:B8*A8:A9',\n                [[9, 12], [15, 20]],\n            ],\n            [\n                'D11',\n                'D11:E12',\n                '=A11:B11*A11:A12',\n                [[16, 20], [24, 30]],\n            ],\n            [\n                'D14',\n                'D14:E15',\n                '=A14:B14*A14:A15',\n                [[25, 30], [35, 42]],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/ArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ArrayTest extends AbstractFunctional\n{\n    public function testSaveAndLoadHyperlinks(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        Calculation::getInstance($spreadsheetOld)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheetOld->getActiveSheet();\n        $sheet->getCell('A1')->setValue('a');\n        $sheet->getCell('A2')->setValue('b');\n        $sheet->getCell('A3')->setValue('c');\n        $sheet->getCell('C1')->setValue(1);\n        $sheet->getCell('C2')->setValue(2);\n        $sheet->getCell('C3')->setValue(3);\n        $sheet->getCell('B1')->setValue('=CONCATENATE(A1:A3,\"-\",C1:C3)');\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $newSheet = $spreadsheet->getActiveSheet();\n        self::assertSame(['t' => 'array', 'ref' => 'B1:B3'], $newSheet->getCell('B1')->getFormulaAttributes());\n        self::assertSame('a-1', $newSheet->getCell('B1')->getOldCalculatedValue());\n        self::assertSame('b-2', $newSheet->getCell('B2')->getValue());\n        self::assertSame('c-3', $newSheet->getCell('B3')->getValue());\n        self::assertSame('=CONCATENATE(A1:A3,\"-\",C1:C3)', $newSheet->getCell('B1')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/AutoFilterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AutoFilterTest extends TestCase\n{\n    public function testAutoFilterRange(): void\n    {\n        $filename = 'tests/data/Reader/Ods/AutoFilter.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $autoFilterRange = $worksheet->getAutoFilter()->getRange();\n\n        self::assertSame('A1:C9', $autoFilterRange);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/BooleanDataTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods as OdsWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BooleanDataTest extends TestCase\n{\n    private string $tempfile = '';\n\n    private string $locale;\n\n    protected function setUp(): void\n    {\n        $calculation = Calculation::getInstance();\n        $this->locale = $calculation->getLocale();\n    }\n\n    protected function tearDown(): void\n    {\n        $calculation = Calculation::getInstance();\n        $calculation->setLocale($this->locale);\n        if ($this->tempfile !== '') {\n            unlink($this->tempfile);\n            $this->tempfile = '';\n        }\n    }\n\n    public function testBooleanData(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheetOld = $spreadsheetOld->getActiveSheet();\n        $sheetOld->getCell('A1')->setValue(true);\n        $sheetOld->getCell('A2')->setValue(false);\n        $writer = new OdsWriter($spreadsheetOld);\n        $this->tempfile = File::temporaryFileName();\n        $writer->save($this->tempfile);\n        $spreadsheetOld->disconnectWorksheets();\n        $reader = new OdsReader();\n        $spreadsheet = $reader->load($this->tempfile);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertTrue($sheet->getCell('A1')->getValue());\n        self::assertFalse($sheet->getCell('A2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n        $zipFile = 'zip://' . $this->tempfile . '#content.xml';\n        $contents = (string) file_get_contents($zipFile);\n        self::assertStringContainsString('<text:p>TRUE</text:p>', $contents);\n        self::assertStringContainsString('<text:p>FALSE</text:p>', $contents);\n    }\n\n    public function testBooleanDataGerman(): void\n    {\n        $calculation = Calculation::getInstance();\n        $calculation->setLocale('de');\n        $spreadsheetOld = new Spreadsheet();\n        $sheetOld = $spreadsheetOld->getActiveSheet();\n        $sheetOld->getCell('A1')->setValue(true);\n        $sheetOld->getCell('A2')->setValue(false);\n        $writer = new OdsWriter($spreadsheetOld);\n        $this->tempfile = File::temporaryFileName();\n        $writer->save($this->tempfile);\n        $spreadsheetOld->disconnectWorksheets();\n        $reader = new OdsReader();\n        $spreadsheet = $reader->load($this->tempfile);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertTrue($sheet->getCell('A1')->getValue());\n        self::assertFalse($sheet->getCell('A2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n        $zipFile = 'zip://' . $this->tempfile . '#content.xml';\n        $contents = (string) file_get_contents($zipFile);\n        self::assertStringContainsString('<text:p>WAHR</text:p>', $contents);\n        self::assertStringContainsString('<text:p>FALSCH</text:p>', $contents);\n        self::assertStringNotContainsString('<text:p>TRUE</text:p>', $contents);\n        self::assertStringNotContainsString('<text:p>FALSE</text:p>', $contents);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/BorderStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass BorderStyleTest extends AbstractFunctional\n{\n    public function testReadAlignmentStyles(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheet = $spreadsheetOld->getActiveSheet();\n        $sheet->getCell('A1')->setValue('noStyle');\n        $sheet->getCell('A2')->setValue('left');\n        $sheet->getStyle('A2')->getBorders()\n            ->getLeft()\n            ->setBorderStyle(Border::BORDER_THICK);\n        $sheet->getCell('A3')->setValue('right');\n        $sheet->getStyle('A3')->getBorders()\n            ->getRight()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->getColor()->setRgb('00ff00');\n        $sheet->getCell('A4')->setValue('top/bottom');\n        $sheet->getStyle('A4')->getBorders()\n            ->getTop()\n            ->setBorderStyle(Border::BORDER_DASHDOT)\n            ->getColor()->setRgb('ff0000');\n        $sheet->getStyle('A4')->getBorders()\n            ->getBottom()\n            ->setBorderStyle(Border::BORDER_MEDIUMDASHDOT)\n            ->getColor()->setRgb('0000ff');\n        $sheet->getCell('A5')->setValue('diagUp');\n        $sheet->getStyle('A5')->getBorders()\n            ->setDiagonalDirection(Borders::DIAGONAL_UP)\n            ->getDiagonal()\n            ->setBorderStyle(Border::BORDER_DASHED)\n            ->getColor()->setRgb('555555');\n        $sheet->getCell('A6')->setValue('diagDown');\n        $sheet->getStyle('A6')->getBorders()\n            ->setDiagonalDirection(Borders::DIAGONAL_DOWN)\n            ->getDiagonal()\n            ->setBorderStyle(Border::BORDER_DOTTED)\n            ->getColor()->setRgb('666666');\n        $sheet->getCell('A7')->setValue('diagBoth');\n        $sheet->getStyle('A7')->getBorders()\n            ->setDiagonalDirection(Borders::DIAGONAL_BOTH)\n            ->getDiagonal()\n            ->setBorderStyle(Border::BORDER_DOUBLE)\n            ->getColor()->setRgb('777777');\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $newSheet = $spreadsheet->getActiveSheet();\n        self::assertSame(Border::BORDER_NONE, $newSheet->getStyle('A1')->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $newSheet->getStyle('A1')->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $newSheet->getStyle('A1')->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $newSheet->getStyle('A1')->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $newSheet->getStyle('A1')->getBorders()->getTop()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $newSheet->getStyle('A2')->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THICK, $newSheet->getStyle('A2')->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame('000000', $newSheet->getStyle('A2')->getBorders()->getLeft()->getColor()->getRgb());\n\n        self::assertSame(Border::BORDER_THIN, $newSheet->getStyle('A3')->getBorders()->getRight()->getBorderStyle());\n        self::assertSame('00ff00', $newSheet->getStyle('A3')->getBorders()->getRight()->getColor()->getRgb());\n\n        self::assertSame(Border::BORDER_DASHDOT, $newSheet->getStyle('A4')->getBorders()->getTop()->getBorderStyle());\n        self::assertSame('ff0000', $newSheet->getStyle('A4')->getBorders()->getTop()->getColor()->getRgb());\n        self::assertSame(Border::BORDER_MEDIUMDASHDOT, $newSheet->getStyle('A4')->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame('0000ff', $newSheet->getStyle('A4')->getBorders()->getBottom()->getColor()->getRgb());\n\n        self::assertSame(Border::BORDER_DASHED, $newSheet->getStyle('A5')->getBorders()->getDiagonal()->getBorderStyle());\n        self::assertSame('555555', $newSheet->getStyle('A5')->getBorders()->getDiagonal()->getColor()->getRgb());\n        self::assertSame(Borders::DIAGONAL_UP, $newSheet->getStyle('A5')->getBorders()->getDiagonalDirection());\n\n        self::assertSame(Border::BORDER_DOTTED, $newSheet->getStyle('A6')->getBorders()->getDiagonal()->getBorderStyle());\n        self::assertSame('666666', $newSheet->getStyle('A6')->getBorders()->getDiagonal()->getColor()->getRgb());\n        self::assertSame(Borders::DIAGONAL_DOWN, $newSheet->getStyle('A6')->getBorders()->getDiagonalDirection());\n\n        self::assertSame(Border::BORDER_DOUBLE, $newSheet->getStyle('A7')->getBorders()->getDiagonal()->getBorderStyle());\n        self::assertSame('777777', $newSheet->getStyle('A7')->getBorders()->getDiagonal()->getColor()->getRgb());\n        self::assertSame(Borders::DIAGONAL_BOTH, $newSheet->getStyle('A7')->getBorders()->getDiagonalDirection());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/CeilingFloorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass CeilingFloorTest extends AbstractFunctional\n{\n    private const INFILE = 'tests/data/Reader/Ods/issue.407.ods';\n\n    private const EXPECTED_ODS = [\n        'A1' => '=FLOOR(2.5,1)',\n        'A2' => '=FLOOR.MATH(2.5,1)',\n        'A3' => '=FLOOR.PRECISE(2.5,1)',\n        'A4' => '=FLOOR.ODS(2.5,1,0)',\n        'C1' => '=CEILING(2.5,1)',\n        'C2' => '=CEILING.MATH(2.5,1)',\n        'C3' => '=CEILING.PRECISE(2.5,1)',\n        'C4' => '=CEILING.ODS(2.5,1)',\n        'E1' => '=FLOOR.ODS(37, -1, 0)',\n        'F1' => '=CEILING.ODS(-37.2,1,0)',\n    ];\n\n    private const EXPECTED_XLSX = [\n        'A1' => '=FLOOR(2.5,1)',\n        'A2' => '=FLOOR.MATH(2.5,1)',\n        'A3' => '=FLOOR.PRECISE(2.5,1)',\n        'A4' => '=FLOOR.MATH(2.5,1,0)', // note different from ODS\n        'C1' => '=CEILING(2.5,1)',\n        'C2' => '=CEILING.MATH(2.5,1)',\n        'C3' => '=CEILING.PRECISE(2.5,1)',\n        'C4' => '=CEILING.MATH(2.5,1)', // different from ODS\n        'E1' => '=FLOOR.MATH(37, -1, 0)', // different from ODS\n        'F1' => '=CEILING.MATH(-37.2,1,0)', // different from ODS\n    ];\n\n    public function testReadAndWriteOds(): void\n    {\n        $reader = new OdsReader();\n        $spreadsheetOld = $reader->load(self::INFILE);\n        $oldSheet = $spreadsheetOld->getActiveSheet();\n        foreach (self::EXPECTED_ODS as $key => $value) {\n            self::assertSame(\n                $value,\n                $oldSheet->getCell($key)->getValue(),\n                \"Error in cell $key\"\n            );\n        }\n        self::assertSame('#NUM!', $oldSheet->getCell('E1')->getCalculatedValue());\n        self::assertSame('#NUM!', $oldSheet->getCell('F1')->getCalculatedValue());\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n        $sheet = $spreadsheet->getActiveSheet();\n        foreach (self::EXPECTED_ODS as $key => $value) {\n            self::assertSame(\n                $value,\n                $sheet->getCell($key)->getValue(),\n                \"Error in cell $key\"\n            );\n        }\n        self::assertSame('#NUM!', $sheet->getCell('E1')->getCalculatedValue());\n        self::assertSame('#NUM!', $sheet->getCell('F1')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadAndWriteXlsx(): void\n    {\n        $reader = new OdsReader();\n        $spreadsheetOld = $reader->load(self::INFILE);\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Xlsx');\n        $spreadsheetOld->disconnectWorksheets();\n        $sheet = $spreadsheet->getActiveSheet();\n        foreach (self::EXPECTED_XLSX as $key => $value) {\n            self::assertSame(\n                $value,\n                $sheet->getCell($key)->getValue(),\n                \"Error in cell $key\"\n            );\n        }\n        self::assertSame(37.0, $sheet->getCell('E1')->getCalculatedValue()); // different from ODS\n        self::assertSame(-37.0, $sheet->getCell('F1')->getCalculatedValue()); // different from ODS\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWriteXcl(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=CEILING.XCL(17.8,8)');\n        $sheet->getCell('B1')->setValue('=FLOOR.XCL(17.8,8)');\n\n        $spreadsheetOds = $this->writeAndReload($spreadsheet, 'Ods');\n        $sheetOds = $spreadsheetOds->getActiveSheet();\n        self::assertSame('=CEILING(17.8,8)', $sheetOds->getCell('A1')->getValue());\n        self::assertSame('=FLOOR(17.8,8)', $sheetOds->getCell('B1')->getValue());\n        $spreadsheetOds->disconnectWorksheets();\n\n        $spreadsheetXlsx = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $sheetXlsx = $spreadsheetXlsx->getActiveSheet();\n        self::assertSame('=CEILING(17.8,8)', $sheetXlsx->getCell('A1')->getValue());\n        self::assertSame('=FLOOR(17.8,8)', $sheetXlsx->getCell('B1')->getValue());\n        $spreadsheetXlsx->disconnectWorksheets();\n\n        $spreadsheetXls = $this->writeAndReload($spreadsheet, 'Xls');\n        $sheetXls = $spreadsheetXls->getActiveSheet();\n        self::assertSame('=CEILING(17.8,8)', $sheetXls->getCell('A1')->getValue());\n        self::assertSame('=FLOOR(17.8,8)', $sheetXls->getCell('B1')->getValue());\n        $spreadsheetXls->disconnectWorksheets();\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/ColGroupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * @TODO There is some fuzziness in the conversions to and from column widths\n */\nclass ColGroupTest extends TestCase\n{\n    private const ODS_COLGROUP_FILE = 'tests/data/Reader/Ods/colgroup.ods';\n    private const ODS_COLHEADER_FILE = 'tests/data/Reader/Ods/colheader.ods';\n\n    public function testColGroup(): void\n    {\n        $reader = new OdsReader();\n        $reader->setReadEmptyCells(false);\n        $spreadsheet = $reader->load(self::ODS_COLGROUP_FILE);\n        self::assertSame('Arial', $spreadsheet->getDefaultStyle()->getFont()->getName());\n        $sheet = $spreadsheet->getActiveSheet();\n        $expected = [\n            'A' => 2.778,\n            'B' => 2.99,\n            'C' => 2.91,\n            'D' => 2.858,\n            'E' => 1.746,\n            'F' => 1.746,\n            'G' => 1.746,\n            'H' => 1.746,\n        ];\n        foreach ($expected as $col => $width) {\n            self::assertEqualsWithDelta(\n                $width,\n                $sheet->getColumnDimension($col)\n                    ->getWidth(Dimension::UOM_CENTIMETERS),\n                1.0E-3,\n                \"mismatch for column $col\"\n            );\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testColHeader(): void\n    {\n        $reader = new OdsReader();\n        $reader->setReadEmptyCells(false);\n        $spreadsheet = $reader->load(self::ODS_COLHEADER_FILE);\n        self::assertSame('Liberation Sans', $spreadsheet->getDefaultStyle()->getFont()->getName());\n        $sheet = $spreadsheet->getActiveSheet();\n        $expected = [\n            'A' => 2.858,\n        ];\n        foreach ($expected as $col => $width) {\n            self::assertEqualsWithDelta(\n                $width,\n                $sheet->getColumnDimension($col)\n                    ->getWidth(Dimension::UOM_CENTIMETERS),\n                1.0E-3,\n                \"mismatch for column $col\"\n            );\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/CurrencyTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CurrencyTest extends TestCase\n{\n    private const ODS_CURRENCY_FILE = 'tests/data/Reader/Ods/currency4.ods';\n\n    public function testCurrencies(): void\n    {\n        $reader = new Ods();\n        $spreadsheet = $reader->load(self::ODS_CURRENCY_FILE);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('$1.23 ', $sheet->getCell('A1')->getFormattedValue(), 'stored as Canada dollars');\n        self::assertSame('£2.23 ', $sheet->getCell('A2')->getFormattedValue(), 'stored as Great Britain pounds');\n        self::assertSame('￥3 ', $sheet->getCell('A3')->getFormattedValue(), 'stored as Japanese yen with fraction which is descarded');\n        self::assertSame('￥4.23 ', $sheet->getCell('A4')->getFormattedValue(), 'stored as Chinese yuan');\n        self::assertSame('$6.23 ', $sheet->getCell('A5')->getFormattedValue(), 'stored as US dollars');\n        self::assertSame('7.23 €', $sheet->getCell('A6')->getFormattedValue(), 'stored as euros with a locale of France');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/DefinedNamesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefinedNamesTest extends TestCase\n{\n    public function testDefinedNamesValue(): void\n    {\n        $filename = 'tests/data/Reader/Ods/DefinedNames.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $spreadsheet->returnArrayAsValue();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $firstDefinedNameValue = $worksheet->getCell('First')->getValue();\n        $secondDefinedNameValue = $worksheet->getCell('Second')->getValue();\n        $calculatedFormulaValue = $worksheet->getCell('B2')->getCalculatedValue();\n\n        self::assertSame(3, $firstDefinedNameValue);\n        self::assertSame(4, $secondDefinedNameValue);\n        self::assertSame(12, $calculatedFormulaValue);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefinedNamesApostropheValue(): void\n    {\n        $filename = 'tests/data/Reader/Ods/DefinedNames.apostrophe.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $spreadsheet->returnArrayAsValue();\n        $worksheet = $spreadsheet->getActiveSheet();\n        self::assertSame(\"apo'strophe\", $worksheet->getTitle());\n\n        $firstDefinedNameValue = $worksheet->getCell('First')->getValue();\n        $secondDefinedNameValue = $worksheet->getCell('Second')->getValue();\n        $calculatedFormulaValue = $worksheet->getCell('B2')->getCalculatedValue();\n\n        self::assertSame(3, $firstDefinedNameValue);\n        self::assertSame(4, $secondDefinedNameValue);\n        self::assertSame(12, $calculatedFormulaValue);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefinedNamesArray(): void\n    {\n        $filename = 'tests/data/Reader/Ods/DefinedNames.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $spreadsheet->returnArrayAsArray();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $firstDefinedNameValue = $worksheet->getCell('First')->getValue();\n        $secondDefinedNameValue = $worksheet->getCell('Second')->getValue();\n        $calculatedFormulaValue = $worksheet->getCell('B2')->getCalculatedValue();\n\n        self::assertSame(3, $firstDefinedNameValue);\n        self::assertSame(4, $secondDefinedNameValue);\n        self::assertSame([12], $calculatedFormulaValue);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/EmptyFileTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\n\nclass EmptyFileTest extends TestCase\n{\n    private string $tempfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->tempfile !== '') {\n            unlink($this->tempfile);\n            $this->tempfile = '';\n        }\n    }\n\n    public function testEmptyFileLoad(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $this->tempfile = $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        $reader = new Ods();\n        $reader->load($temp);\n    }\n\n    public function testEmptyFileNames(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $this->tempfile = $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        $reader = new Ods();\n        $reader->listWorksheetNames($temp);\n    }\n\n    public function testEmptyInfo(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $this->tempfile = $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        $reader = new Ods();\n        $reader->listWorksheetInfo($temp);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/FontStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass FontStyleTest extends AbstractFunctional\n{\n    public function testReadFontStyles(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheet = $spreadsheetOld->getActiveSheet();\n        $spreadsheetOld->getDefaultStyle()\n            ->getFont()\n            ->setName('Liberation Sans')\n            ->setSize(10);\n        $sheet->getCell('A1')->setValue(13);\n        $sheet->getCell('A2')->setValue(27);\n        $sheet->getStyle('A2')->getFont()\n            ->setBold(true)\n            ->setItalic(true);\n        $sheet->getCell('A3')->setValue(-14);\n        $sheet->getStyle('A3')->getFont()\n            ->setBold(true);\n        $sheet->getCell('A4')->setValue(0);\n        $sheet->getStyle('A4')->getFont()\n            ->setItalic(true);\n        $sheet->getCell('A5')->setValue(100);\n        $sheet->getStyle('A5')->getFont()\n            ->setBold(true)\n            ->getColor()->setRgb('FF0000');\n        $sheet->getCell('A6')->setValue(200);\n        $sheet->getStyle('A6')->getFont()\n            ->setUnderline('single');\n        $sheet->getCell('A7')->setValue(300);\n        $sheet->getStyle('A7')->getFont()\n            ->setStrikethrough(true);\n        $sheet->getCell('A8')->setValue(400);\n        $sheet->getStyle('A8')->getFont()\n            ->setAutoColor(true);\n        $sheet->getCell('A9')->setValue(500);\n        $sheet->getStyle('A9')->getFont()\n            ->setItalic(true);\n        $sheet->getStyle('A9')->getFill()\n            ->setFillType('solid')\n            ->getStartColor()->setRgb('FF00FF');\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $newSheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Liberation Sans', $spreadsheet->getDefaultStyle()->getFont()->getName());\n        self::assertSame(10.0, $spreadsheet->getDefaultStyle()->getFont()->getSize());\n        self::assertSame('Liberation Sans', $newSheet->getStyle('A1')->getFont()->getName());\n        self::assertFalse(\n            $newSheet->getStyle('A1')->getFont()->getBold()\n        );\n        self::assertFalse(\n            $newSheet->getStyle('A1')->getFont()->getItalic()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A2')->getFont()->getBold()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A2')->getFont()->getItalic()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A3')->getFont()->getBold()\n        );\n        self::assertFalse(\n            $newSheet->getStyle('A3')->getFont()->getItalic()\n        );\n        self::assertFalse(\n            $newSheet->getStyle('A4')->getFont()->getBold()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A4')->getFont()->getItalic()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A5')->getFont()->getBold()\n        );\n        self::assertFalse(\n            $newSheet->getStyle('A5')->getFont()->getItalic()\n        );\n        self::assertSame(\n            'FF0000',\n            $newSheet->getStyle('A5')->getFont()\n                ->getColor()\n                ->getRgb()\n        );\n        self::assertSame('single', $newSheet->getStyle('A6')->getFont()->getUnderline());\n        self::assertTrue(\n            $newSheet->getStyle('A7')->getFont()->getStrikethrough()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A8')->getFont()->getAutoColor()\n        );\n        self::assertSame(\n            'solid',\n            $newSheet->getStyle('A9')->getFill()->getFillType()\n        );\n        self::assertSame(\n            'ff00ff',\n            $newSheet->getStyle('A9')->getFill()\n                ->getStartColor()\n                ->getRgb()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testNoExplicitDefaultStyle(): void\n    {\n        $reader = new OdsReader();\n        $infile = 'tests/data/Reader/Ods/odsstyles5.ods';\n        $spreadsheet = $reader->load($infile);\n        self::assertSame('Times New Roman', $spreadsheet->getDefaultStyle()->getFont()->getName());\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Times New Roman', $sheet->getStyle('A1')->getFont()->getName());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testDataOnly(): void\n    {\n        $reader = new OdsReader();\n        $reader->setReadDataOnly(true);\n        $infile = 'tests/data/Reader/Ods/odsstyles5.ods';\n        $spreadsheet = $reader->load($infile);\n        self::assertSame('Calibri', $spreadsheet->getDefaultStyle()->getFont()->getName(), 'ignore spreadsheet style, use PhpSpreadsheet default');\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(-1.0, $sheet->getColumnDimension('A')->getWidth());\n        self::assertSame('Calibri', $sheet->getStyle('A1')->getFont()->getName());\n        self::assertSame(13, $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/FormulaTranslatorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods\\FormulaTranslator;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FormulaTranslatorTest extends TestCase\n{\n    #[DataProvider('addressesProvider')]\n    public function testAddresses(string $result, string $address): void\n    {\n        self::assertSame($result, FormulaTranslator::convertToExcelAddressValue($address));\n    }\n\n    public static function addressesProvider(): array\n    {\n        return [\n            'range period in sheet name' => [\"'sheet1.bug'!a1:a5\", \"'sheet1.bug'.a1:'sheet1.bug'.a5\"],\n            'range special chars and period in sheet name' => [\"'#sheet1.x'!a1:a5\", \"'#sheet1.x'.a1:'#sheet1.x'.a5\"],\n            'cell period in sheet name' => [\"'sheet1.bug'!b9\", \"'sheet1.bug'.b9\"],\n            'range unquoted sheet name' => ['sheet1!b9:c12', 'sheet1.b9:sheet1.c12'],\n            'range unquoted sheet name with $' => ['sheet1!$b9:c$12', 'sheet1.$b9:sheet1.c$12'],\n            'range quoted sheet name with $' => [\"'sheet1'!\\$b9:c\\$12\", '\\'sheet1\\'.$b9:\\'sheet1\\'.c$12'],\n            'cell unquoted sheet name' => ['sheet1!B$9', 'sheet1.B$9'],\n            'range no sheet name all dollars' => ['$B$9:$C$12', '$B$9:$C$12'],\n            'range no sheet name some dollars' => ['B$9:$C12', 'B$9:$C12'],\n            'range no sheet name no dollars' => ['B9:C12', 'B9:C12'],\n        ];\n    }\n\n    #[DataProvider('formulaProvider')]\n    public function testFormulas(string $result, string $formula): void\n    {\n        self::assertSame($result, FormulaTranslator::convertToExcelFormulaValue($formula));\n    }\n\n    public static function formulaProvider(): array\n    {\n        return [\n            'ranges no sheet name' => [\n                'SUM(A5:A7,B$5:$B7)',\n                'SUM([.A5:.A7];[.B$5:.$B7])',\n            ],\n            'ranges sheet name with period' => [\n                'SUM(\\'test.bug\\'!A5:A7,\\'test.bug\\'!B5:B7)',\n                'SUM([\\'test.bug\\'.A5:.A7];[\\'test.bug\\'.B5:.B7])',\n            ],\n            'ranges unquoted sheet name' => [\n                'SUM(testbug!A5:A7,testbug!B5:B7)',\n                'SUM([testbug.A5:.A7];[testbug.B5:.B7])',\n            ],\n            'ranges quoted sheet name without period' => [\n                'SUM(\\'testbug\\'!A5:A7,\\'testbug\\'!B5:B7)',\n                'SUM([\\'testbug\\'.A5:.A7];[\\'testbug\\'.B5:.B7])',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/HiddenMergeCellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HiddenMergeCellsTest extends TestCase\n{\n    private const FILENAME = 'tests/data/Reader/Ods/HiddenMergeCellsTest.ods';\n\n    public function testHiddenMergeCells(): void\n    {\n        $reader = new Ods();\n        $spreadsheet = $reader->load(self::FILENAME);\n        $c2InMergeRange = $spreadsheet->getActiveSheet()->getCell('C2')->isInMergeRange();\n        self::assertTrue($c2InMergeRange);\n        $a2InMergeRange = $spreadsheet->getActiveSheet()->getCell('A2')->isInMergeRange();\n        self::assertTrue($a2InMergeRange);\n        $a2MergeRangeValue = $spreadsheet->getActiveSheet()->getCell('A2')->isMergeRangeValueCell();\n        self::assertTrue($a2MergeRangeValue);\n\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2');\n        self::assertSame([['12', '4', '3']], $cellArray);\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2', null, true, false);\n        self::assertSame([[12, 4, 3]], $cellArray);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnmergeHiddenMergeCells(): void\n    {\n        $reader = new Ods();\n        $spreadsheet = $reader->load(self::FILENAME);\n        $spreadsheet->getActiveSheet()->unmergeCells('A2:C2');\n\n        $c2InMergeRange = $spreadsheet->getActiveSheet()->getCell('C2')->isInMergeRange();\n        self::assertFalse($c2InMergeRange);\n        $a2InMergeRange = $spreadsheet->getActiveSheet()->getCell('A2')->isInMergeRange();\n        self::assertFalse($a2InMergeRange);\n\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2', null, false, false, false);\n        self::assertSame([[12, '=6-B1', '=A2/B2']], $cellArray);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/HiddenWorksheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HiddenWorksheetTest extends TestCase\n{\n    public function testPageSetup(): void\n    {\n        $filename = 'tests/data/Reader/Ods/HiddenSheet2.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->worksheetAssertions();\n\n        $sheetCount = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            ++$sheetCount;\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $actualResult = $worksheet->getSheetState();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed asserting sheet state {$expectedResult} for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<string, array<string, string>> */\n    private function worksheetAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'sheetState' => Worksheet::SHEETSTATE_VISIBLE,\n            ],\n            'Sheet2' => [\n                'sheetState' => Worksheet::SHEETSTATE_HIDDEN,\n            ],\n        ];\n    }\n\n    public function testListWorksheetInfo(): void\n    {\n        $filename = 'tests/data/Reader/Ods/HiddenSheet2.ods';\n        $reader = new Ods();\n        $expected = [\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Sheet2',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'hidden',\n            ],\n        ];\n        self::assertSame($expected, $reader->listWorksheetInfo($filename));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/HyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass HyperlinkTest extends AbstractFunctional\n{\n    public function testSaveAndLoadHyperlinks(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $spreadsheetOld->getProperties()->setCompany('g</meta:user-defined>zorg');\n        $spreadsheetOld->getProperties()->setCategory('h</meta:user-defined>zorg');\n        $sheet = $spreadsheetOld->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Hello World');\n        $sheet->getCell('A2')->setValue('http://example.org');\n        $sheet->getCell('A2')->getHyperlink()->setUrl('http://example.org/');\n        $sheet->getCell('A3')->setValue('pa<ge1');\n        $sheet->getCell('A3')->getHyperlink()->setUrl('http://example.org/page1.html');\n        $sheet2 = $spreadsheetOld->createSheet();\n        $sheet2->setTitle('TargetSheet');\n        $sheet2->setCellValue('B4', 'TargetCell');\n        $sheet2->setCellValue('B3', 'not target');\n        $sheet->getCell('A4')->setValue('go to Target');\n        $sheet->getCell('A4')->getHyperlink()->setUrl('sheet://TargetSheet!B4');\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $newSheet = $spreadsheet->getActiveSheet();\n        self::assertSame('g</meta:user-defined>zorg', $spreadsheet->getProperties()->getCompany());\n        self::assertSame('h</meta:user-defined>zorg', $spreadsheet->getProperties()->getCategory());\n        self::assertSame('http://example.org', $newSheet->getCell('A2')->getValue());\n        self::assertSame('http://example.org/', $newSheet->getCell('A2')->getHyperlink()->getUrl());\n        self::assertSame('pa<ge1', $newSheet->getCell('A3')->getValue());\n        self::assertSame('http://example.org/page1.html', $newSheet->getCell('A3')->getHyperlink()->getUrl());\n        self::assertSame('go to Target', $newSheet->getCell('A4')->getValue());\n        self::assertSame('sheet://TargetSheet!B4', $newSheet->getCell('A4')->getHyperlink()->getUrl());\n\n        // Verify that http links are unchanged,\n        //   but internal sheet link has changed.\n        $writer = new Ods($spreadsheet);\n        $content = $writer->getWriterPartContent()->write();\n        self::assertStringContainsString('xlink:href=\"http://example.org/\"', $content);\n        self::assertStringContainsString('xlink:href=\"http://example.org/page1.html\"', $content);\n        self::assertStringContainsString('xlink:href=\"#TargetSheet!B4\"', $content);\n        self::assertStringNotContainsString('sheet:', $content);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/InvalidFileTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass InvalidFileTest extends TestCase\n{\n    public function testInvalidFileLoad(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = __FILE__;\n        $reader = new Ods();\n        $reader->load($temp);\n    }\n\n    public function testInvalidFileNames(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = __FILE__;\n        $reader = new Ods();\n        $reader->listWorksheetNames($temp);\n    }\n\n    public function testInvalidInfo(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = __FILE__;\n        $reader = new Ods();\n        $reader->listWorksheetInfo($temp);\n    }\n\n    public function testXlsxFileLoad(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = 'samples/templates/26template.xlsx';\n        $reader = new Ods();\n        $reader->load($temp);\n    }\n\n    public function testXlsxFileNames(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = 'samples/templates/26template.xlsx';\n        $reader = new Ods();\n        $reader->listWorksheetNames($temp);\n    }\n\n    public function testXlsxInfo(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = 'samples/templates/26template.xlsx';\n        $reader = new Ods();\n        $reader->listWorksheetInfo($temp);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/Issue2810Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2810Test extends TestCase\n{\n    public function testIssue2810(): void\n    {\n        // Active sheet with title of '0' wasn't found\n        $filename = 'tests/data/Reader/Ods/issue.2810.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Active', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/Issue3721Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3721Test extends TestCase\n{\n    public function xtestIssue2810ReadEmpty(): void\n    {\n        // Problems with getHighestDataColumn\n        $filename = 'tests/data/Reader/Ods/issue.3721.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('sheet with data');\n        $origHigh = $sheet->getHighestDataColumn();\n        self::assertSame('C', $origHigh);\n        $cells = [];\n        foreach ($sheet->getRowIterator() as $row) {\n            foreach ($row->getCellIterator(iterateOnlyExistingCells: true) as $cell) {\n                $cells[] = $cell->getCoordinate();\n            }\n        }\n        self::assertSame(['A1', 'B1', 'C1', 'A2', 'B2', 'C2'], $cells);\n        self::assertSame('C', $sheet->getHighestDataColumn());\n        self::assertSame('BL', $sheet->getHighestColumn());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIssue2810NoReadEmpty(): void\n    {\n        // Problems with getHighestDataColumn\n        $filename = 'tests/data/Reader/Ods/issue.3721.ods';\n        $reader = new Ods();\n        $reader->setReadEmptyCells(false);\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('sheet with data');\n        $origHigh = $sheet->getHighestDataColumn();\n        self::assertSame('C', $origHigh);\n        $cells = [];\n        foreach ($sheet->getRowIterator() as $row) {\n            foreach ($row->getCellIterator(iterateOnlyExistingCells: true) as $cell) {\n                $cells[] = $cell->getCoordinate();\n            }\n        }\n        self::assertSame(['A1', 'B1', 'C1', 'A2', 'B2', 'C2'], $cells);\n        self::assertSame('C', $sheet->getHighestDataColumn());\n        self::assertSame('C', $sheet->getHighestColumn());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/Issue4099Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4099Test extends TestCase\n{\n    private string $file = 'tests/data/Reader/Ods/issue.4099.ods';\n\n    public function testNoHeaderFooterStyle(): void\n    {\n        // header-style and footer-style are missing in styles.xml\n        $zipFile = 'zip://' . $this->file . '#styles.xml';\n        $contents = (string) file_get_contents($zipFile);\n        self::assertStringContainsString('page-layout ', $contents);\n        self::assertStringNotContainsString('header-style', $contents);\n        self::assertStringNotContainsString('footer-style', $contents);\n        $reader = new OdsReader();\n        $spreadsheet = $reader->load($this->file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('FirstCell', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/Issue4435Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4435Test extends TestCase\n{\n    private string $file = 'tests/data/Reader/Ods/issue.4435b.ods';\n\n    public function testNoHeaderFooterStyle(): void\n    {\n        // had been throwing exception when cell didn't have value-type\n        $zipFile = 'zip://' . $this->file . '#content.xml';\n        $contents = (string) file_get_contents($zipFile);\n        self::assertStringContainsString(\n            '<table:table-cell table:style-name=\"ce1\">' . \"\\n\"\n            . '<text:p/>' . \"\\n\"\n            . '</table:table-cell>',\n            $contents\n        );\n        $reader = new OdsReader();\n        $spreadsheet = $reader->load($this->file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertNull($sheet->getCell('B1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/Issue804Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue804Test extends TestCase\n{\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= 'tests/data/Reader/Ods/issue.804.ods';\n        $file .= '#content.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<table:table-row>\n          <table:table-cell office:value-type=\"string\" table:number-rows-spanned=\"1\" table:style-name=\"heading\">\n            <text:p>Name</text:p>', $data);\n        }\n    }\n\n    public function testIssue2810(): void\n    {\n        // Whitespace between Xml nodes\n        $filename = 'tests/data/Reader/Ods/issue.804.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Straße', $sheet->getCell('G1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/MergeRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MergeRangeTest extends TestCase\n{\n    public function testAutoFilterRange(): void\n    {\n        $filename = 'tests/data/Reader/Ods/MergeRangeTest.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $mergeRanges = $worksheet->getMergeCells();\n        self::assertArrayHasKey('B2:C3', $mergeRanges);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/MultiLineCommentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass MultiLineCommentTest extends AbstractFunctional\n{\n    public function testMultipleParagraphs(): void\n    {\n        $filename = 'tests/data/Reader/Ods/issue.4081.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(\"First line.\\n\\nSecond line.\", $sheet->getComment('A1')->getText()->getPlainText());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testOneParagraphMultipleSpans(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheetOld = $spreadsheetOld->getActiveSheet();\n        $sheetOld->getCell('A1')->setValue('Hello');\n        $text = $sheetOld->getComment('A1')->getText();\n        $text->createText('First');\n        $text->createText(' line.');\n        $text->createText(\"\\n\");\n        $text->createText(\"\\n\");\n        $text->createText(\"Second line.\\nThird line.\");\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(\"First line.\\n\\nSecond line.\\nThird line.\", $sheet->getComment('A1')->getText()->getPlainText());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/NestedTableRowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NestedTableRowTest extends TestCase\n{\n    public function testTableHeaderRows(): void\n    {\n        $infile = 'tests/data/Reader/Ods/issue.4528.ods';\n        $reader = new OdsReader();\n        $reader->setReadDataOnly(true)->setReadEmptyCells(false);\n        $spreadsheet = $reader->load($infile);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Atterissage', $sheet->getCell('AS1')->getValue());\n        self::assertNull($sheet->getCell('AS2')->getValue());\n        self::assertSame('jour', $sheet->getCell('AS3')->getValue());\n        self::assertSame('=SUM(Y3:INDIRECT(CONCATENATE(\"Y\",$C$3)))', $sheet->getCell('AS4')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testTableRowGroup(): void\n    {\n        $infile = 'tests/data/Reader/Ods/issue.2507.ods';\n        $reader = new OdsReader();\n        $reader->setReadDataOnly(true)->setReadEmptyCells(false);\n        $spreadsheet = $reader->load($infile);\n        $sheet = $spreadsheet->getActiveSheet();\n        $values = $sheet->rangeToArray('B3:C7', null, false, false);\n        $expected = [\n            ['Номенклатура', \"Складское наличие,\\nКол-во\"], // before table-row-group\n            ['Квадрат 140х140мм ст.5ХНМ (т)', 0.225], // within table-row-group\n            ['Квадрат 200х200мм ст.3 (т)', 1.700],\n            ['Квадрат 210х210мм ст.65Г (т)', 0.280],\n            ['Квадрат 250х250мм ст.45 (т)', 0.133],\n        ];\n        self::assertSame($expected, $values);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/NumberFormatCallbackTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods as OdsWriter;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Cell\\Style;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NumberFormatCallbackTest extends TestCase\n{\n    private string $tempfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->tempfile !== '') {\n            unlink($this->tempfile);\n            $this->tempfile = '';\n        }\n    }\n\n    public function testCallbacks(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheet = $spreadsheetOld->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1.23);\n        $sheet->getCell('A2')->setValue(2.34);\n        $sheet->getStyle('A2')->getNumberFormat()\n            ->setFormatCode('¤#,##0.000');\n        $sheet->getCell('A3')->setValue(3.45);\n        $sheet->getStyle('A3')->getNumberFormat()\n            ->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD);\n        $this->tempfile = File::temporaryFileName();\n        $writer = new OdsWriter($spreadsheetOld);\n        $writer->useAdditionalNumberFormats([\n            '¤#,##0.000' => $this->genericCurrencyWrite(...),\n        ]);\n        $writer->save($this->tempfile);\n        $spreadsheetOld->disconnectWorksheets();\n        $reader = new OdsReader();\n        $reader->setFormatCallback($this->genericCurrencyRead(...));\n        $spreadsheet = $reader->load($this->tempfile);\n        $newSheet = $spreadsheet->getActiveSheet();\n        self::assertSame('1.23', $newSheet->getCell('A1')->getFormattedValue());\n        self::assertSame('¤2.340', $newSheet->getCell('A2')->getFormattedValue(), 'needs writer and reader callbacks');\n        self::assertSame('$3.45 ', $newSheet->getCell('A3')->getFormattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function genericCurrencyWrite(Style $obj, string $name): void\n    {\n        $writer = $obj->getWriter();\n        $writer->startElement('number:currency-style');\n        $writer->writeAttribute('style:name', $name);\n        $writer->writeElement('number:text', '¤');\n        $writer->startElement('number:number');\n        $writer->writeAttribute('number:decimal-places', '3');\n        $writer->writeAttribute('number:min-decimal-places', '3');\n        $writer->writeAttribute('number:min-integer-digits', '1');\n        $writer->endElement(); // number:number\n        $writer->endElement(); // number:currency-style\n    }\n\n    private function genericCurrencyRead(string $type, string $text): string\n    {\n        $retVal = '';\n        if ($type === 'float' && mb_substr($text, 0, 1) === '¤') {\n            $retVal = '¤#,##0.000';\n        }\n\n        return $retVal;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/OdsInfoTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass OdsInfoTest extends TestCase\n{\n    public function testReadFileProperties(): void\n    {\n        $filename = 'tests/data/Reader/Ods/data.ods';\n\n        // Load into this instance\n        $reader = new Ods();\n\n        // Test \"listWorksheetNames\" method\n\n        self::assertSame([\n            'Sheet1',\n            'Second Sheet',\n        ], $reader->listWorksheetNames($filename));\n    }\n\n    public function testNoMimeType(): void\n    {\n        $filename = 'tests/data/Reader/Ods/nomimetype.ods';\n\n        // Load into this instance\n        $reader = new Ods();\n\n        self::assertTrue($reader->canRead($filename));\n    }\n\n    public function testReadBadFileProperties(): void\n    {\n        $this->expectException(ReaderException::class);\n\n        // Load into this instance\n        $reader = new Ods();\n\n        // Test \"listWorksheetNames\" method\n\n        self::assertSame([\n            'Sheet1',\n            'Second Sheet',\n        ], $reader->listWorksheetNames(__FILE__));\n    }\n\n    public function testReadFileInfo(): void\n    {\n        $filename = 'tests/data/Reader/Ods/data.ods';\n        $reader = new Ods();\n        $wsinfo = $reader->listWorkSheetInfo($filename);\n        self::assertSame([\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'C',\n                'lastColumnIndex' => 2,\n                'totalRows' => 12,\n                'totalColumns' => 3,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Second Sheet',\n                'lastColumnLetter' => 'B',\n                'lastColumnIndex' => 1,\n                'totalRows' => 2,\n                'totalColumns' => 2,\n                'sheetState' => 'visible',\n            ],\n        ], $wsinfo);\n    }\n\n    public function testReadBadFileInfo(): void\n    {\n        $this->expectException(ReaderException::class);\n        $filename = __FILE__;\n        $reader = new Ods();\n        $wsinfo = $reader->listWorkSheetInfo($filename);\n    }\n\n    public function testReadFileInfoWithEmpties(): void\n    {\n        $filename = 'tests/data/Reader/Ods/RepeatedCells.ods';\n        $reader = new Ods();\n        $wsinfo = $reader->listWorkSheetInfo($filename);\n        self::assertSame([\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'K',\n                'lastColumnIndex' => 10,\n                'totalRows' => 1,\n                'totalColumns' => 11,\n                'sheetState' => 'visible',\n            ],\n        ], $wsinfo);\n    }\n\n    public function testOneMoreWorksheetInfo(): void\n    {\n        $filename = 'tests/data/Reader/Ods/issue.4528.ods';\n        $reader = new Ods();\n        $wsinfo = $reader->listWorkSheetInfo($filename);\n        self::assertSame([\n            [\n                'worksheetName' => 'Francais',\n                'lastColumnLetter' => 'AZ',\n                'lastColumnIndex' => 51,\n                'totalRows' => 811,\n                'totalColumns' => 52,\n                'sheetState' => 'visible',\n            ],\n        ], $wsinfo);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/OdsPropertiesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass OdsPropertiesTest extends AbstractFunctional\n{\n    private string $timeZone;\n\n    protected function setUp(): void\n    {\n        $this->timeZone = date_default_timezone_get();\n        date_default_timezone_set('UTC');\n    }\n\n    protected function tearDown(): void\n    {\n        date_default_timezone_set($this->timeZone);\n    }\n\n    public function testLoadOdsWorkbookProperties(): void\n    {\n        $customPropertySet = [\n            'Owner' => ['type' => Properties::PROPERTY_TYPE_STRING, 'value' => 'PHPOffice'],\n            'Tested' => ['type' => Properties::PROPERTY_TYPE_BOOLEAN, 'value' => true],\n            'Counter' => ['type' => Properties::PROPERTY_TYPE_FLOAT, 'value' => 10.0],\n            'TestDate' => ['type' => Properties::PROPERTY_TYPE_DATE, 'value' => '2019-06-30'],\n            'HereAndNow' => ['type' => Properties::PROPERTY_TYPE_DATE, 'value' => '2019-06-30'],\n        ];\n\n        $filename = 'tests/data/Reader/Ods/propertyTest.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n\n        $properties = $spreadsheet->getProperties();\n        // Core Properties\n//        self::assertSame('Mark Baker', $properties->getCreator());\n        self::assertSame('Property Test File', $properties->getTitle());\n        self::assertSame('Testing for Properties', $properties->getSubject());\n        self::assertSame('TEST ODS PHPSpreadsheet', $properties->getKeywords());\n\n        // Extended Properties\n//        self::assertSame('PHPOffice', $properties->getCompany());\n//        self::assertSame('The Big Boss', $properties->getManager());\n\n        // Custom Properties\n        $customProperties = $properties->getCustomProperties();\n        $customProperties = array_flip($customProperties);\n        self::assertArrayHasKey('TestDate', $customProperties);\n\n        foreach ($customPropertySet as $propertyName => $testData) {\n            self::assertTrue($properties->isCustomPropertySet($propertyName));\n            self::assertSame($testData['type'], $properties->getCustomPropertyType($propertyName));\n            /** @var float|int|string */\n            $result = $properties->getCustomPropertyValue($propertyName);\n            if ($properties->getCustomPropertyType($propertyName) == Properties::PROPERTY_TYPE_DATE) {\n                $result = Date::formattedDateTimeFromTimestamp(\"$result\", 'Y-m-d');\n            }\n            self::assertSame($testData['value'], $result);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReloadOdsWorkbookProperties(): void\n    {\n        $customPropertySet = [\n            'Owner' => ['type' => Properties::PROPERTY_TYPE_STRING, 'value' => 'PHPOffice'],\n            'Tested' => ['type' => Properties::PROPERTY_TYPE_BOOLEAN, 'value' => true],\n            'Counter' => ['type' => Properties::PROPERTY_TYPE_FLOAT, 'value' => 10.0],\n            'TestDate' => ['type' => Properties::PROPERTY_TYPE_DATE, 'value' => '2019-06-30'],\n            'HereAndNow' => ['type' => Properties::PROPERTY_TYPE_DATE, 'value' => '2019-06-30'],\n        ];\n\n        $filename = 'tests/data/Reader/Ods/propertyTest.ods';\n        $reader = new Ods();\n        $spreadsheetOld = $reader->load($filename);\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $properties = $spreadsheet->getProperties();\n        // Core Properties\n//        self::assertSame('Mark Baker', $properties->getCreator());\n        self::assertSame('Property Test File', $properties->getTitle());\n        self::assertSame('Testing for Properties', $properties->getSubject());\n        self::assertSame('TEST ODS PHPSpreadsheet', $properties->getKeywords());\n\n        // Extended Properties\n//        self::assertSame('PHPOffice', $properties->getCompany());\n//        self::assertSame('The Big Boss', $properties->getManager());\n\n        // Custom Properties\n        $customProperties = $properties->getCustomProperties();\n        $customProperties = array_flip($customProperties);\n        self::assertArrayHasKey('TestDate', $customProperties);\n\n        foreach ($customPropertySet as $propertyName => $testData) {\n            self::assertTrue($properties->isCustomPropertySet($propertyName));\n            self::assertSame($testData['type'], $properties->getCustomPropertyType($propertyName));\n            /** @var float|int|string */\n            $result = $properties->getCustomPropertyValue($propertyName);\n            if ($properties->getCustomPropertyType($propertyName) == Properties::PROPERTY_TYPE_DATE) {\n                $result = Date::formattedDateTimeFromTimestamp(\"$result\", 'Y-m-d');\n            }\n            self::assertSame($testData['value'], $result);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/OdsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PHPUnit\\Framework\\TestCase;\n\nclass OdsTest extends TestCase\n{\n    private const ODS_TEST_FILE = 'samples/templates/OOCalcTest.ods';\n\n    private const ODS_DATA_FILE = 'tests/data/Reader/Ods/data.ods';\n\n    private string $timeZone;\n\n    protected function setUp(): void\n    {\n        $this->timeZone = date_default_timezone_get();\n        date_default_timezone_set('UTC');\n    }\n\n    protected function tearDown(): void\n    {\n        date_default_timezone_set($this->timeZone);\n    }\n\n    private function loadOdsTestFile(): Spreadsheet\n    {\n        $reader = new Ods();\n\n        return $reader->loadIntoExisting(self::ODS_TEST_FILE, new Spreadsheet());\n    }\n\n    protected function loadDataFile(): Spreadsheet\n    {\n        $reader = new Ods();\n\n        return $reader->load(self::ODS_DATA_FILE);\n    }\n\n    public function testLoadWorksheets(): void\n    {\n        $spreadsheet = $this->loadDataFile();\n        self::assertEquals(2, $spreadsheet->getSheetCount());\n        self::assertEquals('Sheet1', $spreadsheet->getSheet(0)->getTitle());\n        self::assertEquals('Second Sheet', $spreadsheet->getSheet(1)->getTitle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadOneWorksheet(): void\n    {\n        $reader = new Ods();\n        //$reader->setLoadSheetsOnly(['Sheet1']);\n        $names = $reader->listWorksheetNames(self::ODS_DATA_FILE);\n        $reader->setLoadSheetsOnly([$names[0]]);\n        $spreadsheet = $reader->load(self::ODS_DATA_FILE);\n\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        self::assertEquals('Sheet1', $spreadsheet->getSheet(0)->getTitle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadOneWorksheetNotActive(): void\n    {\n        $reader = new Ods();\n        $reader->setLoadSheetsOnly(['Second Sheet']);\n        $spreadsheet = $reader->load(self::ODS_DATA_FILE);\n\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        self::assertEquals('Second Sheet', $spreadsheet->getSheet(0)->getTitle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadNoSelectedWorksheet(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('You tried to set a sheet active by the out of bounds index');\n        $reader = new Ods();\n        $reader->setLoadSheetsOnly(['xSecond Sheet']);\n        $reader->load(self::ODS_DATA_FILE);\n    }\n\n    public function testLoadBadFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $reader = new Ods();\n        $reader->load(__FILE__);\n    }\n\n    public function testLoadCorruptFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $filename = 'tests/data/Reader/Ods/corruptMeta.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n\n        self::assertEquals(2, $spreadsheet->getSheetCount());\n\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $secondSheet = $spreadsheet->getSheet(1);\n        self::assertNotSame($firstSheet, $secondSheet);\n    }\n\n    public function testReadValueAndComments(): void\n    {\n        $spreadsheet = $this->loadOdsTestFile();\n\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        // 5 rows added to test file with this PR\n        self::assertEquals(34, $firstSheet->getHighestDataRow());\n        self::assertEquals('N', $firstSheet->getHighestDataColumn());\n\n        // Simple cell value\n        self::assertEquals('Test String 1', $firstSheet->getCell('A1')->getValue());\n\n        // Merged cell\n        self::assertEquals('BOX', $firstSheet->getCell('B18')->getValue());\n\n        // Comments/Annotations\n        self::assertEquals(\n            'Test for a simple colour-formatted string',\n            $firstSheet->getComment('A1')->getText()->getPlainText()\n        );\n\n        // Data types\n        self::assertEquals(DataType::TYPE_STRING, $firstSheet->getCell('A1')->getDataType());\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('B1')->getDataType()); // Int\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('B6')->getDataType()); // Float\n        self::assertEquals(1.23, $firstSheet->getCell('B6')->getValue());\n        self::assertEquals(0, $firstSheet->getCell('G10')->getValue());\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A10')->getDataType()); // Date\n        self::assertEquals('19-Dec-60', $firstSheet->getCell('A10')->getFormattedValue());\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A13')->getDataType()); // Time\n        self::assertEquals('2:30:00', $firstSheet->getCell('A13')->getFormattedValue());\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A15')->getDataType()); // Date + Time\n        self::assertEquals('19-Dec-60 1:30:00', $firstSheet->getCell('A15')->getFormattedValue());\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A11')->getDataType()); // Fraction\n\n        self::assertEquals(DataType::TYPE_BOOL, $firstSheet->getCell('D6')->getDataType());\n        self::assertTrue($firstSheet->getCell('D6')->getValue());\n\n        self::assertEquals(DataType::TYPE_FORMULA, $firstSheet->getCell('C6')->getDataType()); // Formula\n        self::assertEquals('=TRUE()', $firstSheet->getCell('C6')->getValue()); // Formula\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadPercentageAndCurrency(): void\n    {\n        // Percentage, Currency\n\n        $spreadsheet = $this->loadDataFile();\n\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A1')->getDataType()); // Percentage (10%)\n        self::assertEquals(0.1, $firstSheet->getCell('A1')->getValue());\n        self::assertSame('10%', $firstSheet->getCell('A1')->getFormattedValue());\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A2')->getDataType()); // Percentage (10%)\n        self::assertEquals(0.1, $firstSheet->getCell('A2')->getValue());\n        self::assertSame('10.00%', $firstSheet->getCell('A2')->getFormattedValue());\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A2')->getDataType()); // Percentage (10.00%)\n        self::assertEquals(0.1, $firstSheet->getCell('A2')->getValue());\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A4')->getDataType()); // Currency (€10.00)\n        self::assertSame(10.00, $firstSheet->getCell('A4')->getValue());\n        self::assertSame('10.00 €', $firstSheet->getCell('A4')->getFormattedValue());\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('B4')->getDataType()); // Currency ($10)\n        self::assertSame(10.00, $firstSheet->getCell('B4')->getValue());\n        self::assertSame('$10 ', $firstSheet->getCell('B4')->getFormattedValue());\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('C4')->getDataType()); // Currency (€10.12)\n        self::assertEquals(10.12, $firstSheet->getCell('C4')->getValue());\n        self::assertSame('10.12 €', $firstSheet->getCell('C4')->getFormattedValue());\n\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A5')->getDataType()); // Currency ($20)\n        self::assertSame(20.00, $firstSheet->getCell('A5')->getValue());\n        self::assertSame('$20 ', $firstSheet->getCell('A5')->getFormattedValue());\n        self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('C5')->getDataType()); // Currency ($20.34)\n        self::assertEquals(20.34, $firstSheet->getCell('C5')->getValue());\n        self::assertSame('$20.34 ', $firstSheet->getCell('C5')->getFormattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadColors(): void\n    {\n        $spreadsheet = $this->loadOdsTestFile();\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        // Background color\n\n        $style = $firstSheet->getCell('K3')->getStyle();\n\n        self::assertEquals('solid', $style->getFill()->getFillType());\n        self::assertEquals('FFff0000', $style->getFill()->getStartColor()->getARGB());\n        self::assertEquals('FF000000', $style->getFill()->getEndColor()->getARGB());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadRichText(): void\n    {\n        $spreadsheet = $this->loadOdsTestFile();\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        self::assertEquals(\n            \"I don't know if OOCalc supports Rich Text in the same way as Excel, \"\n            . 'And this row should be autofit height with text wrap',\n            $firstSheet->getCell('A28')->getValue()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadCellsWithRepeatedSpaces(): void\n    {\n        $spreadsheet = $this->loadDataFile();\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        self::assertEquals('This has    4 spaces before and 2 after  ', $firstSheet->getCell('A8')->getValue());\n        self::assertEquals('This only one after ', $firstSheet->getCell('A9')->getValue());\n        self::assertEquals('Test with DIFFERENT styles     and multiple spaces:  ', $firstSheet->getCell('A10')->getValue());\n        self::assertEquals(\"test with new \\nLines\", $firstSheet->getCell('A11')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadHyperlinks(): void\n    {\n        $spreadsheet = $this->loadOdsTestFile();\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        $hyperlink = $firstSheet->getCell('A29');\n\n        self::assertEquals(DataType::TYPE_STRING, $hyperlink->getDataType());\n        self::assertEquals('PhpSpreadsheet', $hyperlink->getValue());\n        self::assertEquals('https://github.com/PHPOffice/phpspreadsheet', $hyperlink->getHyperlink()->getUrl());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    // Below some test for features not implemented yet\n\n    public function testReadBoldItalicUnderline(): void\n    {\n        $spreadsheet = $this->loadOdsTestFile();\n        $firstSheet = $spreadsheet->getSheet(0);\n\n        // Font styles\n\n        $style = $firstSheet->getCell('A1')->getStyle();\n        self::assertEquals('FFff0000', $style->getFont()->getColor()->getARGB());\n        self::assertEquals(11, $style->getFont()->getSize());\n        self::assertEquals(Font::UNDERLINE_NONE, $style->getFont()->getUnderline());\n\n        $style = $firstSheet->getCell('A3')->getStyle();\n        self::assertEquals(Font::UNDERLINE_SINGLE, $style->getFont()->getUnderline());\n        $style = $firstSheet->getCell('A7')->getStyle();\n        self::assertEquals(Font::UNDERLINE_DOUBLE, $style->getFont()->getUnderline());\n        self::assertFalse($style->getFont()->getStrikethrough());\n        $style = $firstSheet->getStyle('A8');\n        self::assertTrue($style->getFont()->getStrikethrough());\n\n        $style = $firstSheet->getCell('E1')->getStyle();\n        self::assertTrue($style->getFont()->getBold());\n        self::assertTrue($style->getFont()->getItalic());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/OldCalculatedTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass OldCalculatedTest extends AbstractFunctional\n{\n    #[DataProvider('oldCalcProvider')]\n    public function testOldCalc(\n        mixed $expected,\n        string $formula,\n        string $style = '',\n    ): void {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', $formula);\n        if ($style !== '') {\n            $sheet->getStyle('A1')->getNumberFormat()\n                ->setFormatCode($style);\n        }\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Ods');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $oldCalc = $rsheet->getCell('A1')->getOldCalculatedValue();\n        if (is_float($expected) && is_float($oldCalc)) {\n            self::assertEqualsWithDelta($expected, $oldCalc, 1E-8);\n        } else {\n            self::assertSame($expected, $oldCalc);\n        }\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function oldCalcProvider(): array\n    {\n        return [\n            'calculation error' => ['#CALC!', '=SUM()'], // moved from Writer\\Ods\\BadFormulaTest\n            'date' => [43861.0, '=DATE(2020, 1, 31)', 'yyyy-mm-dd'],\n            'time' => [0.6392361111111111, '=TIME(15,20,30)', 'hh:mm:ss'],\n            'currency' => [1.25, '=0.5+0.75', '$0.00'],\n            'percent' => [0.75, '=0.5+0.25', '0.00%'],\n            'integer' => [3, '=1+2'],\n            'float' => [3.5, '=1+2.5'],\n            'bool' => [true, '=TRUE()'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/PageSetupBug1772Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageSetupBug1772Test extends TestCase\n{\n    private const MARGIN_PRECISION = 0.00000001;\n\n    public function testPageSetup(): void\n    {\n        $filename = 'tests/data/Reader/Ods/bug1772.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->pageSetupAssertions();\n\n        $sheetCount = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            ++$sheetCount;\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageSetup()->$testMethodName();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testPageMargins(): void\n    {\n        $filename = 'tests/data/Reader/Ods/bug1772.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->pageMarginAssertions();\n\n        $sheetCount = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            ++$sheetCount;\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageMargins()->$testMethodName();\n                self::assertEqualsWithDelta(\n                    $expectedResult,\n                    $actualResult,\n                    self::MARGIN_PRECISION,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test} margin\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<string, array<string, mixed>> */\n    private function pageSetupAssertions(): array\n    {\n        return [\n            'Employee update template' => [\n                'orientation' => PageSetup::ORIENTATION_DEFAULT,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n        ];\n    }\n\n    /** @return array<string, array<string, float>> */\n    private function pageMarginAssertions(): array\n    {\n        return [\n            'Employee update template' => [\n                // Here the values are in cm\n                'top' => 0.0,\n                'header' => 0.2953,\n                'left' => 0.0,\n                'right' => 0.0,\n                'bottom' => 0.0,\n                'footer' => 0.2953,\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/PageSetupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageSetupTest extends TestCase\n{\n    private const MARGIN_PRECISION = 0.00000001;\n\n    private const MARGIN_UNIT_CONVERSION = 2.54; // Inches to cm\n\n    public function testPageSetup(): void\n    {\n        $filename = 'tests/data/Reader/Ods/PageSetup.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->pageSetupAssertions();\n\n        $sheetCount = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            ++$sheetCount;\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageSetup()->$testMethodName();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testPageMargins(): void\n    {\n        $filename = 'tests/data/Reader/Ods/PageSetup.ods';\n        $reader = new Ods();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->pageMarginAssertions();\n\n        $sheetCount = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            ++$sheetCount;\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageMargins()->$testMethodName();\n                self::assertEqualsWithDelta(\n                    $expectedResult,\n                    $actualResult,\n                    self::MARGIN_PRECISION,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test} margin\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<string, array<string, mixed>> */\n    private function pageSetupAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 75,\n                'horizontalCentered' => true,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet2' => [\n                'orientation' => PageSetup::ORIENTATION_LANDSCAPE,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_OVER_THEN_DOWN,\n            ],\n            'Sheet3' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 90,\n                'horizontalCentered' => true,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet4' => [\n                // Default Settings\n                'orientation' => PageSetup::ORIENTATION_DEFAULT,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n        ];\n    }\n\n    /** @return array<string, array<string, float>> */\n    private function pageMarginAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                // Here the values are in cm\n                'top' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 1.6 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 1.1 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet2' => [\n                // Here the values are in cm\n                'top' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 1.1 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 1.1 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet3' => [\n                // Here the values are in cm\n                'top' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 1.1 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 1.1 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet4' => [\n                // Default Settings (already in inches)\n                'top' => 0.3,\n                'header' => 0.45,\n                'left' => 0.7,\n                'right' => 0.7,\n                'bottom' => 0.3,\n                'footer' => 0.45,\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/ProtectionStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ProtectionStyleTest extends AbstractFunctional\n{\n    public function testReadProtectionStyles(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheet = $spreadsheetOld->getActiveSheet();\n        $sheet->getCell('A1')->setValue('no-no');\n        $sheet->getCell('A2')->setValue('no-yes');\n        $sheet->getCell('A3')->setValue('yes-no');\n        $sheet->getCell('A4')->setValue('yes-yes');\n        $sheet->getCell('A5')->setValue('default');\n\n        $sheet->getStyle('A1')->getProtection()\n            ->setLocked(Protection::PROTECTION_UNPROTECTED)\n            ->setHidden(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getStyle('A2')->getProtection()\n            ->setLocked(Protection::PROTECTION_UNPROTECTED)\n            ->setHidden(Protection::PROTECTION_PROTECTED);\n        $sheet->getStyle('A3')->getProtection()\n            ->setLocked(Protection::PROTECTION_PROTECTED)\n            ->setHidden(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getStyle('A4')->getProtection()\n            ->setLocked(Protection::PROTECTION_PROTECTED)\n            ->setHidden(Protection::PROTECTION_PROTECTED);\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $newSheet = $spreadsheet->getActiveSheet();\n        self::assertSame(Protection::PROTECTION_UNPROTECTED, $newSheet->getStyle('A1')->getProtection()->getLocked());\n        self::assertSame(Protection::PROTECTION_UNPROTECTED, $newSheet->getStyle('A1')->getProtection()->getHidden());\n        self::assertSame(Protection::PROTECTION_UNPROTECTED, $newSheet->getStyle('A2')->getProtection()->getLocked());\n        self::assertSame(Protection::PROTECTION_PROTECTED, $newSheet->getStyle('A2')->getProtection()->getHidden());\n        self::assertSame(Protection::PROTECTION_PROTECTED, $newSheet->getStyle('A3')->getProtection()->getLocked());\n        self::assertSame(Protection::PROTECTION_UNPROTECTED, $newSheet->getStyle('A3')->getProtection()->getHidden());\n        self::assertSame(Protection::PROTECTION_PROTECTED, $newSheet->getStyle('A4')->getProtection()->getLocked());\n        self::assertSame(Protection::PROTECTION_PROTECTED, $newSheet->getStyle('A4')->getProtection()->getHidden());\n        self::assertSame(Protection::PROTECTION_INHERIT, $newSheet->getStyle('A5')->getProtection()->getLocked());\n        self::assertSame(Protection::PROTECTION_INHERIT, $newSheet->getStyle('A5')->getProtection()->getHidden());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/RepeatEmptyCellsAndRowsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass RepeatEmptyCellsAndRowsTest extends AbstractFunctional\n{\n    public function testSaveAndLoadHyperlinks(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $oldSheet = $spreadsheetOld->getActiveSheet();\n        $oldSheet->setCellValue('C1', 'xx');\n        $oldSheet->setCellValue('G1', 'aa');\n        $oldSheet->setCellValue('BB1', 'bb');\n        $oldSheet->setCellValue('A6', 'aaa');\n        $oldSheet->setCellValue('B7', 'bbb');\n        $oldSheet->getRowDimension(10)->setRowHeight(12);\n        $oldSheet->setCellValue('A12', 'this is A12');\n        $style = $oldSheet->getStyle('B14:D14');\n        $style->getFont()->setBold(true);\n        $oldSheet->getCell('E15')->setValue('X');\n        $oldSheet->mergeCells('E15:G16');\n        $oldSheet->getCell('J15')->setValue('j15');\n        $oldSheet->getCell('J16')->setValue('j16');\n        $oldSheet->getCell('A19')->setValue('lastrow');\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Ods');\n        $spreadsheetOld->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('xx', $sheet->getCell('C1')->getValue());\n        self::assertSame('aa', $sheet->getCell('G1')->getValue());\n        self::assertSame('bb', $sheet->getCell('BB1')->getValue());\n        self::assertSame('aaa', $sheet->getCell('A6')->getValue());\n        self::assertSame('bbb', $sheet->getCell('B7')->getValue());\n        self::assertSame('this is A12', $sheet->getCell('A12')->getValue());\n        // Read styles, including row height, not yet implemented for ODS\n        self::assertSame('j15', $sheet->getCell('J15')->getValue());\n        self::assertSame('j16', $sheet->getCell('J16')->getValue());\n        self::assertSame(['E15:G16' => 'E15:G16'], $sheet->getMergeCells());\n        self::assertSame('lastrow', $sheet->getCell('A19')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Ods/RepeatedColumnsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RepeatedColumnsTest extends TestCase\n{\n    public function testDefinedNames(): void\n    {\n        $reader = new Ods();\n        $reader->setReadFilter(\n            new class () implements IReadFilter {\n                public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n                {\n                    return in_array($columnAddress, ['A', 'C', 'E', 'G', 'J', 'K'], true);\n                }\n            }\n        );\n        $spreadsheet = $reader->load('tests/data/Reader/Ods/RepeatedCells.ods');\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        self::assertEquals('TestA', $worksheet->getCell('A1')->getValue());\n        self::assertNull($worksheet->getCell('C1')->getValue());\n        self::assertEquals('TestE', $worksheet->getCell('E1')->getValue());\n        self::assertEquals('TestG', $worksheet->getCell('G1')->getValue());\n        self::assertEquals('A', $worksheet->getCell('J1')->getValue());\n        self::assertEquals('TestK', $worksheet->getCell('K1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test that read filter correctly handles cells with number-columns-repeated\n     * containing data, where some repeated columns pass the filter and others don't.\n     *\n     * @see https://github.com/PHPOffice/PhpSpreadsheet/issues/4802\n     */\n    public function testReadFilterWithRepeatedDataCells(): void\n    {\n        // The ODS file has: A=TestA, B-D=empty(repeated=3), E=TestE, F=empty,\n        // G=TestG, H-J=SameValue(repeated=3), K=TestK\n        $reader = new Ods();\n        $reader->setReadFilter(\n            new class () implements IReadFilter {\n                public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n                {\n                    return in_array($columnAddress, ['I', 'K'], true);\n                }\n            }\n        );\n        $spreadsheet = $reader->load('tests/data/Reader/Ods/RepeatedDataCells.ods');\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        // I1 is part of a repeated cell group (H-J) with value \"SameValue\"\n        // The filter should correctly read I1 even though H (first in group) is not in the filter\n        self::assertEquals('SameValue', $worksheet->getCell('I1')->getValue());\n        self::assertEquals('TestK', $worksheet->getCell('K1')->getValue());\n\n        // Columns not in filter should not have data\n        self::assertNull($worksheet->getCell('A1')->getValue());\n        self::assertNull($worksheet->getCell('H1')->getValue());\n        self::assertNull($worksheet->getCell('J1')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Security;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Security\\XmlScanner;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\nuse XMLReader;\n\nclass XmlScannerTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerValidXML')]\n    public function testValidXML(string $filename, string $expectedResult): void\n    {\n        $reader = XmlScanner::getInstance(new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xml());\n        $result = $reader->scanFile($filename);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerValidXML(): array\n    {\n        $tests = [];\n        $glob = glob('tests/data/Reader/Xml/XEETestValid*.xml');\n        self::assertNotFalse($glob);\n        foreach ($glob as $file) {\n            $filename = realpath($file);\n            $expectedResult = (string) file_get_contents($file);\n            if (preg_match('/UTF-16(LE|BE)?/', $file, $matches) == 1) {\n                $expectedResult = (string) mb_convert_encoding($expectedResult, 'UTF-8', $matches[0]);\n                $expectedResult = preg_replace('/encoding\\s*=\\s*[\\'\"]UTF-\\d+(LE|BE)?[\\'\"]/', '', $expectedResult) ?? $expectedResult;\n            }\n            $tests[basename($file)] = [(string) $filename, $expectedResult];\n        }\n\n        return $tests;\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerInvalidXML')]\n    public function testInvalidXML(string $filename): void\n    {\n        $this->expectException(ReaderException::class);\n\n        $reader = XmlScanner::getInstance(new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xml());\n        $expectedResult = 'FAILURE: Should throw an Exception rather than return a value';\n        $result = $reader->scanFile($filename);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerInvalidXML(): array\n    {\n        $tests = [];\n        $glob = glob('tests/data/Reader/Xml/XEETestInvalidUTF*.xml');\n        self::assertNotFalse($glob);\n        foreach ($glob as $file) {\n            $filename = realpath($file);\n            $tests[basename($file)] = [(string) $filename];\n        }\n\n        return $tests;\n    }\n\n    public function testGetSecurityScannerForXmlBasedReader(): void\n    {\n        $fileReader = new Xlsx();\n        $scanner = $fileReader->getSecurityScanner();\n\n        //    Must return an object...\n        //    ... of the correct type\n        self::assertInstanceOf(XmlScanner::class, $scanner);\n    }\n\n    public function testGetSecurityScannerForNonXmlBasedReader(): void\n    {\n        $fileReader = new Xls();\n        $scanner = $fileReader->getSecurityScanner();\n        //    Must return a null...\n        self::assertNull($scanner);\n    }\n\n    public function testGetSecurityScannerForNonXmlBasedReader2(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Security scanner is unexpectedly null');\n        $fileReader = new Xls();\n        $fileReader->getSecurityScannerOrThrow();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerValidXMLForCallback')]\n    public function testSecurityScanWithCallback(string $filename, string $expectedResult): void\n    {\n        $fileReader = new Xlsx();\n        $scanner = $fileReader->getSecurityScannerOrThrow();\n        $scanner->setAdditionalCallback('strrev');\n        $xml = $scanner->scanFile($filename);\n\n        self::assertEquals(strrev($expectedResult), $xml);\n    }\n\n    public static function providerValidXMLForCallback(): array\n    {\n        $tests = [];\n        $glob = glob('tests/data/Reader/Xml/SecurityScannerWithCallback*.xml');\n        self::assertNotFalse($glob);\n        foreach ($glob as $file) {\n            $tests[basename($file)] = [(string) realpath($file), (string) file_get_contents($file)];\n        }\n\n        return $tests;\n    }\n\n    public function testLibxmlDisableEntityLoaderIsRestoredWithoutShutdown(): void\n    {\n        $reader = new Xlsx();\n        unset($reader);\n\n        $reader = new XMLReader();\n        $opened = $reader->open('tests/data/Reader/Xml/SecurityScannerWithCallbackExample.xml');\n        self::assertTrue($opened);\n    }\n\n    public function testEncodingAllowsMixedCase(): void\n    {\n        $scanner = new XmlScanner();\n        $output = $scanner->scan($input = '<?xml version=\"1.0\" encoding=\"utf-8\"?><foo>bar</foo>');\n        self::assertSame($input, $output);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerInvalidXlsx')]\n    public function testInvalidXlsx(string $filename, string $message): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage($message);\n        $reader = new Xlsx();\n        $reader->load(\"tests/data/Reader/XLSX/$filename\");\n    }\n\n    public static function providerInvalidXlsx(): array\n    {\n        return [\n            ['utf7white.dontuse', 'UTF-7 encoding not permitted'],\n            ['utf7quoteorder.dontuse', 'UTF-7 encoding not permitted'],\n            ['utf8and16.dontuse', 'Double encoding not permitted'],\n            ['utf8and16.entity.dontuse', 'Detected use of ENTITY'],\n            ['utf8entity.dontuse', 'Detected use of ENTITY'],\n            ['utf16entity.dontuse', 'Detected use of ENTITY'],\n            ['ebcdic.dontuse', 'EBCDIC encoding not permitted'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerValidUtf16')]\n    public function testValidUtf16(string $filename): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(\"tests/data/Reader/XLSX/$filename\");\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerValidUtf16(): array\n    {\n        return [\n            ['utf16be.xlsx'],\n            ['utf16be.bom.xlsx'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Slk/BinderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Slk;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\StringValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Slk;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BinderTest extends TestCase\n{\n    public function testBinder(): void\n    {\n        $infile = 'tests/data/Reader/Slk/issue.2276.slk';\n        $reader = new Slk();\n        $spreadsheet = $reader->load($infile);\n        $sheet = $spreadsheet->getActiveSheet();\n        $expected1 = [[1, 2], [3, '']];\n        self::assertSame($expected1, $sheet->toArray(null, false, false));\n        $reader2 = new Slk();\n        $reader2->setValueBinder(new StringValueBinder());\n        $spreadsheet2 = $reader2->load($infile);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $expected2 = [['1', '2'], ['3', '']];\n        self::assertSame($expected2, $sheet2->toArray(null, false, false));\n        $spreadsheet->disconnectWorksheets();\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Slk/SlkCommentsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Slk;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Slk;\n\nclass SlkCommentsTest extends \\PHPUnit\\Framework\\TestCase\n{\n    public function testComments(): void\n    {\n        $testbook = 'tests/data/Reader/Slk/issue.2276.slk';\n        $reader = new Slk();\n        $spreadsheet = $reader->load($testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        $comments = $sheet->getComments();\n        self::assertCount(2, $comments);\n        self::assertArrayHasKey('A1', $comments);\n        self::assertArrayHasKey('B2', $comments);\n        self::assertSame(\"Zeratul:\\nEn Taro Adun!\", $sheet->getComment('A1')->getText()->getPlainText());\n        self::assertSame(\"Arthas:\\nFrostmourne Hungers.\", $sheet->getComment('B2')->getText()->getPlainText());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Slk/SlkSharedFormulasTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Slk;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Slk;\n\nclass SlkSharedFormulasTest extends \\PHPUnit\\Framework\\TestCase\n{\n    public function testComments(): void\n    {\n        $testbook = 'tests/data/Reader/Slk/issue.2267c.slk';\n        $reader = new Slk();\n        $spreadsheet = $reader->load($testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        $range = 'A1:' . $sheet->getHighestDataColumn() . $sheet->getHighestDataRow();\n        $values = $sheet->RangeToArray($range, null, false, false, false, false); // just get values, don't calculate\n        $expected = [\n            [1, 10, 100, 101, 102],\n            ['=A1+1', '=B1+1', '=C1+1', '=D1+1', '=E1+1'],\n            ['=A2+1', '=B2+1', '=C2+1', '=D2+1', '=E2+1'],\n            ['=A3+1', '=B3+1', '=C3+1', '=D3+1', '=E3+1'],\n            ['=A4+1', '=B4+1', '=C4+1', '=D4+1', '=E4+1'],\n        ];\n        self::assertSame($expected, $values);\n        $calcValues = $sheet->RangeToArray($range, null, true, false, false, false); // get calculated values\n        $expectedCalc = [\n            [1, 10, 100, 101, 102],\n            [2, 11, 101, 102, 103],\n            [3, 12, 102, 103, 104],\n            [4, 13, 103, 104, 105],\n            [5, 14, 104, 105, 106],\n        ];\n        self::assertSame($expectedCalc, $calcValues);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Slk/SlkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Slk;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Slk;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass SlkTest extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = __DIR__ . '/../../../../samples/templates/SylkTest.slk';\n\n    private string $filename = '';\n\n    protected function teardown(): void\n    {\n        if ($this->filename !== '') {\n            unlink($this->filename);\n            $this->filename = '';\n        }\n    }\n\n    public function testInfo(): void\n    {\n        $reader = new Slk();\n        $workSheetInfo = $reader->listWorkSheetInfo(self::$testbook);\n        self::assertCount(1, $workSheetInfo);\n        $info0 = $workSheetInfo[0];\n        self::assertSame('SylkTest', $info0['worksheetName']);\n        self::assertSame('J', $info0['lastColumnLetter']);\n        self::assertSame(9, $info0['lastColumnIndex']);\n        self::assertSame(18, $info0['totalRows']);\n        self::assertSame(10, $info0['totalColumns']);\n        self::assertSame(['SylkTest'], $reader->listWorksheetNames(self::$testbook));\n    }\n\n    public function testBadFileName(): void\n    {\n        $this->expectException(ReaderException::class);\n        $reader = new Slk();\n        self::assertNull($reader->setLoadSheetsOnly(null)->getLoadSheetsOnly());\n        $reader->listWorkSheetInfo(self::$testbook . 'xxx');\n    }\n\n    public function testBadFileName2(): void\n    {\n        $reader = new Slk();\n        self::assertFalse($reader->canRead(self::$testbook . 'xxx'));\n    }\n\n    public function testNotSylkFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $reader = new Slk();\n        $reader->listWorkSheetInfo(__FILE__);\n    }\n\n    public function testLoadSlk(): void\n    {\n        $reader = new Slk();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('SylkTest', $sheet->getTitle());\n\n        self::assertEquals('FFFF0000', $sheet->getCell('A1')->getStyle()->getFont()->getColor()->getARGB());\n        self::assertEquals(Fill::FILL_PATTERN_GRAY125, $sheet->getCell('A2')->getStyle()->getFill()->getFillType());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('A4')->getStyle()->getFont()->getUnderline());\n        self::assertEquals('Test with (;) in string', $sheet->getCell('A4')->getValue());\n\n        self::assertEquals(22269, $sheet->getCell('A10')->getValue());\n        self::assertEquals('dd/mm/yyyy', $sheet->getCell('A10')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('19/12/1960', $sheet->getCell('A10')->getFormattedValue());\n        self::assertEquals(1.5, $sheet->getCell('A11')->getValue());\n        self::assertEquals('# ?/?', $sheet->getCell('A11')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('1 1/2', $sheet->getCell('A11')->getFormattedValue());\n\n        self::assertEquals('=B1+C1', $sheet->getCell('H1')->getValue());\n        self::assertEquals('=E2&F2', $sheet->getCell('J2')->getValue());\n        self::assertEquals('=SUM(C1:C4)', $sheet->getCell('I5')->getValue());\n        self::assertEquals('=MEDIAN(B6:B8)', $sheet->getCell('B9')->getValue());\n\n        self::assertEquals(11, $sheet->getCell('E1')->getStyle()->getFont()->getSize());\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('E1')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('E3')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('E4')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E4')->getStyle()->getFont()->getUnderline());\n\n        self::assertTrue($sheet->getCell('F1')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F1')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('F1')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F4')->getStyle()->getFont()->getUnderline());\n\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C10')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C12')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C14')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C16')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        // Have not yet figured out how C6/C7 are centred\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSheetIndex(): void\n    {\n        $reader = new Slk();\n        $sheetIndex = 2;\n        $reader->setSheetIndex($sheetIndex);\n        self::assertEquals($sheetIndex, $reader->getSheetIndex());\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->setActiveSheetIndex($sheetIndex);\n        self::assertEquals('SylkTest', $sheet->getTitle());\n\n        self::assertEquals('FFFF0000', $sheet->getCell('A1')->getStyle()->getFont()->getColor()->getARGB());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLongName(): void\n    {\n        $contents = file_get_contents(self::$testbook);\n        $this->filename = File::sysGetTempDir()\n            . '/123456789a123456789b123456789c12345.slk';\n        file_put_contents($this->filename, $contents);\n        $reader = new Slk();\n        $names = $reader->listWorksheetNames($this->filename);\n        // Following ignored, just make sure it's executable.\n        $reader->setLoadSheetsOnly([$names[0]]);\n        $spreadsheet = $reader->load($this->filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('123456789a123456789b123456789c1', $sheet->getTitle());\n        self::assertEquals('FFFF0000', $sheet->getCell('A1')->getStyle()->getFont()->getColor()->getARGB());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Utility/File.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Utility;\n\nclass File\n{\n    // https://stackoverflow.com/questions/16511021/convert-mime-type-to-file-extension-php\n    public static function mime2ext(string $mime): string\n    {\n        $mime_map = [\n            'video/3gpp2' => '3g2',\n            'video/3gp' => '3gp',\n            'video/3gpp' => '3gp',\n            'application/x-compressed' => '7zip',\n            'audio/x-acc' => 'aac',\n            'audio/ac3' => 'ac3',\n            'application/postscript' => 'ai',\n            'audio/x-aiff' => 'aif',\n            'audio/aiff' => 'aif',\n            'audio/x-au' => 'au',\n            'video/x-msvideo' => 'avi',\n            'video/msvideo' => 'avi',\n            'video/avi' => 'avi',\n            'application/x-troff-msvideo' => 'avi',\n            'application/macbinary' => 'bin',\n            'application/mac-binary' => 'bin',\n            'application/x-binary' => 'bin',\n            'application/x-macbinary' => 'bin',\n            'image/bmp' => 'bmp',\n            'image/x-bmp' => 'bmp',\n            'image/x-bitmap' => 'bmp',\n            'image/x-xbitmap' => 'bmp',\n            'image/x-win-bitmap' => 'bmp',\n            'image/x-windows-bmp' => 'bmp',\n            'image/ms-bmp' => 'bmp',\n            'image/x-ms-bmp' => 'bmp',\n            'application/bmp' => 'bmp',\n            'application/x-bmp' => 'bmp',\n            'application/x-win-bitmap' => 'bmp',\n            'application/cdr' => 'cdr',\n            'application/coreldraw' => 'cdr',\n            'application/x-cdr' => 'cdr',\n            'application/x-coreldraw' => 'cdr',\n            'image/cdr' => 'cdr',\n            'image/x-cdr' => 'cdr',\n            'zz-application/zz-winassoc-cdr' => 'cdr',\n            'application/mac-compactpro' => 'cpt',\n            'application/pkix-crl' => 'crl',\n            'application/pkcs-crl' => 'crl',\n            'application/x-x509-ca-cert' => 'crt',\n            'application/pkix-cert' => 'crt',\n            'text/css' => 'css',\n            'text/x-comma-separated-values' => 'csv',\n            'text/comma-separated-values' => 'csv',\n            'application/vnd.msexcel' => 'csv',\n            'application/x-director' => 'dcr',\n            'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx',\n            'application/x-dvi' => 'dvi',\n            'message/rfc822' => 'eml',\n            'application/x-msdownload' => 'exe',\n            'video/x-f4v' => 'f4v',\n            'audio/x-flac' => 'flac',\n            'video/x-flv' => 'flv',\n            'image/gif' => 'gif',\n            'application/gpg-keys' => 'gpg',\n            'application/x-gtar' => 'gtar',\n            'application/x-gzip' => 'gzip',\n            'application/mac-binhex40' => 'hqx',\n            'application/mac-binhex' => 'hqx',\n            'application/x-binhex40' => 'hqx',\n            'application/x-mac-binhex40' => 'hqx',\n            'text/html' => 'html',\n            'image/x-icon' => 'ico',\n            'image/x-ico' => 'ico',\n            'image/vnd.microsoft.icon' => 'ico',\n            'text/calendar' => 'ics',\n            'application/java-archive' => 'jar',\n            'application/x-java-application' => 'jar',\n            'application/x-jar' => 'jar',\n            'image/jp2' => 'jp2',\n            'video/mj2' => 'jp2',\n            'image/jpx' => 'jp2',\n            'image/jpm' => 'jp2',\n            'image/jpeg' => 'jpeg',\n            'image/pjpeg' => 'jpeg',\n            'application/x-javascript' => 'js',\n            'application/json' => 'json',\n            'text/json' => 'json',\n            'application/vnd.google-earth.kml+xml' => 'kml',\n            'application/vnd.google-earth.kmz' => 'kmz',\n            'text/x-log' => 'log',\n            'audio/x-m4a' => 'm4a',\n            'audio/mp4' => 'm4a',\n            'application/vnd.mpegurl' => 'm4u',\n            'audio/midi' => 'mid',\n            'application/vnd.mif' => 'mif',\n            'video/quicktime' => 'mov',\n            'video/x-sgi-movie' => 'movie',\n            'audio/mpeg' => 'mp3',\n            'audio/mpg' => 'mp3',\n            'audio/mpeg3' => 'mp3',\n            'audio/mp3' => 'mp3',\n            'video/mp4' => 'mp4',\n            'video/mpeg' => 'mpeg',\n            'application/oda' => 'oda',\n            'audio/ogg' => 'ogg',\n            'video/ogg' => 'ogg',\n            'application/ogg' => 'ogg',\n            'font/otf' => 'otf',\n            'application/x-pkcs10' => 'p10',\n            'application/pkcs10' => 'p10',\n            'application/x-pkcs12' => 'p12',\n            'application/x-pkcs7-signature' => 'p7a',\n            'application/pkcs7-mime' => 'p7c',\n            'application/x-pkcs7-mime' => 'p7c',\n            'application/x-pkcs7-certreqresp' => 'p7r',\n            'application/pkcs7-signature' => 'p7s',\n            'application/pdf' => 'pdf',\n            'application/octet-stream' => 'pdf',\n            'application/x-x509-user-cert' => 'pem',\n            'application/x-pem-file' => 'pem',\n            'application/pgp' => 'pgp',\n            'application/x-httpd-php' => 'php',\n            'application/php' => 'php',\n            'application/x-php' => 'php',\n            'text/php' => 'php',\n            'text/x-php' => 'php',\n            'application/x-httpd-php-source' => 'php',\n            'image/png' => 'png',\n            'image/x-png' => 'png',\n            'application/powerpoint' => 'ppt',\n            'application/vnd.ms-powerpoint' => 'ppt',\n            'application/vnd.ms-office' => 'ppt',\n            'application/msword' => 'doc',\n            'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',\n            'application/x-photoshop' => 'psd',\n            'image/vnd.adobe.photoshop' => 'psd',\n            'audio/x-realaudio' => 'ra',\n            'audio/x-pn-realaudio' => 'ram',\n            'application/x-rar' => 'rar',\n            'application/rar' => 'rar',\n            'application/x-rar-compressed' => 'rar',\n            'audio/x-pn-realaudio-plugin' => 'rpm',\n            'application/x-pkcs7' => 'rsa',\n            'text/rtf' => 'rtf',\n            'text/richtext' => 'rtx',\n            'video/vnd.rn-realvideo' => 'rv',\n            'application/x-stuffit' => 'sit',\n            'application/smil' => 'smil',\n            'text/srt' => 'srt',\n            'image/svg+xml' => 'svg',\n            'application/x-shockwave-flash' => 'swf',\n            'application/x-tar' => 'tar',\n            'application/x-gzip-compressed' => 'tgz',\n            'image/tiff' => 'tiff',\n            'font/ttf' => 'ttf',\n            'text/plain' => 'txt',\n            'text/x-vcard' => 'vcf',\n            'application/videolan' => 'vlc',\n            'text/vtt' => 'vtt',\n            'audio/x-wav' => 'wav',\n            'audio/wave' => 'wav',\n            'audio/wav' => 'wav',\n            'application/wbxml' => 'wbxml',\n            'video/webm' => 'webm',\n            'image/webp' => 'webp',\n            'audio/x-ms-wma' => 'wma',\n            'application/wmlc' => 'wmlc',\n            'video/x-ms-wmv' => 'wmv',\n            'video/x-ms-asf' => 'wmv',\n            'font/woff' => 'woff',\n            'font/woff2' => 'woff2',\n            'application/xhtml+xml' => 'xhtml',\n            'application/excel' => 'xl',\n            'application/msexcel' => 'xls',\n            'application/x-msexcel' => 'xls',\n            'application/x-ms-excel' => 'xls',\n            'application/x-excel' => 'xls',\n            'application/x-dos_ms_excel' => 'xls',\n            'application/xls' => 'xls',\n            'application/x-xls' => 'xls',\n            'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx',\n            'application/vnd.ms-excel' => 'xlsx',\n            'application/xml' => 'xml',\n            'text/xml' => 'xml',\n            'text/xsl' => 'xsl',\n            'application/xspf+xml' => 'xspf',\n            'application/x-compress' => 'z',\n            'application/x-zip' => 'zip',\n            'application/zip' => 'zip',\n            'application/x-zip-compressed' => 'zip',\n            'application/s-compressed' => 'zip',\n            'multipart/x-zip' => 'zip',\n            'text/x-scriptzsh' => 'zsh',\n        ];\n\n        return $mime_map[$mime] ?? '';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/Biff8CoverTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Biff8CoverTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n    }\n\n    public function testBiff8Coverage(): void\n    {\n        $filename = 'tests/data/Reader/XLS/biff8cover.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('=SUM({1;2;3;4;5})', $sheet->getCell('A1')->getValue());\n        self::assertSame(15, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame(\n            '=VLOOKUP(\"hello\",'\n            . '{\"what\",1;\"why\",TRUE;\"hello\",\"there\";\"when\",FALSE}'\n            . ',2,FALSE)',\n            $sheet->getCell('C1')->getValue()\n        );\n        self::assertSame('there', $sheet->getCell('C1')->getCalculatedValue());\n        self::assertSame(2, $sheet->getCell('A3')->getValue());\n        self::assertTrue(\n            $sheet->getStyle('A3')->getFont()->getSuperscript()\n        );\n        self::assertSame('n', $sheet->getCell('B3')->getValue());\n        self::assertTrue(\n            $sheet->getStyle('B3')->getFont()->getSubscript()\n        );\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/ColorMapTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Color\\BIFF5;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Color\\BIFF8;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\Color\\BuiltIn;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColorMapTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('colorMapProvider')]\n    public function testColorMap(int $index, string $expectedBiff5, string $expectedBiff8, string $expectedBuiltin): void\n    {\n        self::assertSame($expectedBiff5, BIFF5::lookup($index)['rgb']);\n        self::assertSame($expectedBiff8, BIFF8::lookup($index)['rgb']);\n        self::assertSame($expectedBuiltin, BuiltIn::lookup($index)['rgb']);\n    }\n\n    public static function colorMapProvider(): array\n    {\n        return [\n            'default builtin' => [0x00, '000000', '000000', '000000'],\n            'non-default builtin' => [0x02, '000000', '000000', 'FF0000'],\n            'system window text color' => [0x40, '000000', '000000', '000000'],\n            'system window background color' => [0x41, '000000', '000000', 'FFFFFF'],\n            'same biff5/8' => [0x09, 'FFFFFF', 'FFFFFF', '000000'],\n            'different biff5/8' => [0x29, '69FFFF', 'CCFFFF', '000000'],\n\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/ColourTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ColourTest extends AbstractFunctional\n{\n    private \\PhpOffice\\PhpSpreadsheet\\Spreadsheet $spreadsheet;\n\n    protected function setup(): void\n    {\n        $filename = 'tests/data/Reader/XLS/Colours.xls';\n        $reader = new Xls();\n        $this->spreadsheet = $reader->load($filename);\n    }\n\n    public function testColours(): void\n    {\n        $colours = [];\n\n        $worksheet = $this->spreadsheet->getActiveSheet();\n        for ($row = 1; $row <= 7; ++$row) {\n            for ($column = 'A'; $column !== 'J'; StringHelper::stringIncrement($column)) {\n                $cellAddress = \"{$column}{$row}\";\n                $colours[$cellAddress] = $worksheet->getStyle($cellAddress)->getFill()->getStartColor()->getRGB();\n            }\n        }\n\n        $newSpreadsheet = $this->writeAndReload($this->spreadsheet, 'Xls');\n        $newWorksheet = $newSpreadsheet->getActiveSheet();\n        foreach ($colours as $cellAddress => $expectedColourValue) {\n            $actualColourValue = $newWorksheet->getStyle($cellAddress)->getFill()->getStartColor()->getRGB();\n            self::assertSame($expectedColourValue, $actualColourValue);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/ConditionalBorderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalBorderTest extends AbstractFunctional\n{\n    public function testFormulas(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(9);\n        $sheet->getCell('A3')->setValue(5);\n        $sheet->getCell('A4')->setValue(2);\n        $sheet->getCell('A5')->setValue(8);\n\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $condition1->addCondition(5);\n        $condition1->getStyle()->getBorders()->getRight()\n            ->setBorderStyle(Border::BORDER_THICK)\n            ->getColor()\n            ->setArgb('FFFF0000');\n        $condition1->getStyle()->getBorders()->getBottom()\n            ->setBorderStyle(Border::BORDER_DASHED)\n            ->getColor()\n            ->setArgb('FFF08000');\n\n        $condition2 = new Conditional();\n        $condition2->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition2->setOperatorType(Conditional::OPERATOR_GREATERTHAN);\n        $condition2->addCondition(5);\n        $condition2->getStyle()->getBorders()->getRight()\n            ->setBorderStyle(Border::BORDER_THICK)\n            ->getColor()\n            ->setArgb('FF0000FF');\n        $condition2->getStyle()->getBorders()->getBottom()\n            ->setBorderStyle(Border::BORDER_DASHED)\n            ->getColor()\n            ->setArgb('FF0080FF');\n\n        $conditionalStyles = [$condition1, $condition2];\n        $sheet->getStyle('A1:A5')->setConditionalStyles($conditionalStyles);\n\n        $sheet->getCell('C6')->setValue(1);\n        $sheet->getCell('C7')->setValue(9);\n        $sheet->getCell('C8')->setValue(5);\n        $sheet->getCell('C9')->setValue(2);\n        $sheet->getCell('C10')->setValue(8);\n\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $condition1->addCondition(5);\n        $condition1->getStyle()->getBorders()->getLeft()\n            ->setBorderStyle(Border::BORDER_THICK)\n            ->getColor()\n            ->setArgb('FFFF0000');\n        $condition1->getStyle()->getBorders()->getTop()\n            ->setBorderStyle(Border::BORDER_DASHED)\n            ->getColor()\n            ->setArgb('FFF08000');\n\n        $condition2 = new Conditional();\n        $condition2->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition2->setOperatorType(Conditional::OPERATOR_GREATERTHAN);\n        $condition2->addCondition(5);\n        $condition2->getStyle()->getBorders()->getLeft()\n            ->setBorderStyle(Border::BORDER_THICK)\n            ->getColor()\n            ->setArgb('FF0000FF');\n        $condition2->getStyle()->getBorders()->getTop()\n            ->setBorderStyle(Border::BORDER_DASHED)\n            ->getColor()\n            ->setArgb('FF0080FF');\n\n        $conditionalStyles = [$condition1, $condition2];\n        $sheet->getStyle('C6:C10')->setConditionalStyles($conditionalStyles);\n\n        $newSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $newSpreadsheet->getActiveSheet();\n        $conditionals = $sheet->getConditionalStylesCollection();\n        self::assertCount(2, $conditionals);\n\n        $cond1 = $conditionals['A1:A5'];\n        self::assertCount(2, $cond1);\n\n        $borders = $cond1[0]->getStyle()->getBorders();\n        self::assertSame(Border::BORDER_OMIT, $borders->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_THICK, $borders->getRight()->getBorderStyle());\n        self::assertSame('FFFF0000', $borders->getRight()->getColor()->getARGB());\n        self::assertSame(Border::BORDER_OMIT, $borders->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_DASHED, $borders->getBottom()->getBorderStyle());\n        self::assertSame('FFF08000', $borders->getBottom()->getColor()->getARGB());\n\n        $borders = $cond1[1]->getStyle()->getBorders();\n        self::assertSame(Border::BORDER_OMIT, $borders->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_THICK, $borders->getRight()->getBorderStyle());\n        self::assertSame('FF0000FF', $borders->getRight()->getColor()->getARGB());\n        self::assertSame(Border::BORDER_OMIT, $borders->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_DASHED, $borders->getBottom()->getBorderStyle());\n        self::assertSame('FF0080FF', $borders->getBottom()->getColor()->getARGB());\n\n        $cond1 = $conditionals['C6:C10'];\n        self::assertCount(2, $cond1);\n\n        $borders = $cond1[0]->getStyle()->getBorders();\n        self::assertSame(Border::BORDER_THICK, $borders->getLeft()->getBorderStyle());\n        self::assertSame('FFFF0000', $borders->getLeft()->getColor()->getARGB());\n        self::assertSame(Border::BORDER_OMIT, $borders->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_DASHED, $borders->getTop()->getBorderStyle());\n        self::assertSame('FFF08000', $borders->getTop()->getColor()->getARGB());\n        self::assertSame(Border::BORDER_OMIT, $borders->getBottom()->getBorderStyle());\n\n        $borders = $cond1[1]->getStyle()->getBorders();\n        self::assertSame(Border::BORDER_THICK, $borders->getLeft()->getBorderStyle());\n        self::assertSame('FF0000FF', $borders->getLeft()->getColor()->getARGB());\n        self::assertSame(Border::BORDER_OMIT, $borders->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_DASHED, $borders->getTop()->getBorderStyle());\n        self::assertSame('FF0080FF', $borders->getTop()->getColor()->getARGB());\n        self::assertSame(Border::BORDER_OMIT, $borders->getBottom()->getBorderStyle());\n\n        $newSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingBasicTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalFormattingBasicTest extends TestCase\n{\n    /** @param mixed[][] $expectedRules */\n    #[DataProvider('conditionalFormattingProvider')]\n    public function testReadConditionalFormatting(string $expectedRange, array $expectedRules): void\n    {\n        $filename = 'tests/data/Reader/XLS/CF_Basic_Comparisons.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $hasConditionalStyles = $sheet->conditionalStylesExists($expectedRange);\n        self::assertTrue($hasConditionalStyles);\n\n        $conditionalStyles = $sheet->getConditionalStyles($expectedRange);\n\n        foreach ($conditionalStyles as $index => $conditionalStyle) {\n            self::assertSame($expectedRules[$index]['type'], $conditionalStyle->getConditionType());\n            self::assertSame($expectedRules[$index]['operator'], $conditionalStyle->getOperatorType());\n            self::assertSame($expectedRules[$index]['conditions'], $conditionalStyle->getConditions());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function conditionalFormattingProvider(): array\n    {\n        return [\n            [\n                'A2:E5',\n                [\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_EQUAL,\n                        'conditions' => [\n                            0,\n                        ],\n                    ],\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_GREATERTHAN,\n                        'conditions' => [\n                            0,\n                        ],\n                    ],\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_LESSTHAN,\n                        'conditions' => [\n                            0,\n                        ],\n                    ],\n                ],\n            ],\n            [\n                'A10:E13',\n                [\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_EQUAL,\n                        'conditions' => [\n                            '$H$9',\n                        ],\n                    ],\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_GREATERTHAN,\n                        'conditions' => [\n                            '$H$9',\n                        ],\n                    ],\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_LESSTHAN,\n                        'conditions' => [\n                            '$H$9',\n                        ],\n                    ],\n                ],\n            ],\n            [\n                'A18:A20',\n                [\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_BETWEEN,\n                        'conditions' => [\n                            '$B1',\n                            '$C1',\n                        ],\n                    ],\n                ],\n            ],\n            [\n                'A24:E27',\n                [\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_BETWEEN,\n                        'conditions' => [\n                            'AVERAGE($A$24:$E$27)-STDEV($A$24:$E$27)',\n                            'AVERAGE($A$24:$E$27)+STDEV($A$24:$E$27)',\n                        ],\n                    ],\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_GREATERTHAN,\n                        'conditions' => [\n                            'AVERAGE($A$24:$E$27)+STDEV($A$24:$E$27)',\n                        ],\n                    ],\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_LESSTHAN,\n                        'conditions' => [\n                            'AVERAGE($A$24:$E$27)-STDEV($A$24:$E$27)',\n                        ],\n                    ],\n                ],\n            ],\n            [\n                'A31:A33',\n                [\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_EQUAL,\n                        'conditions' => [\n                            '\"LOVE\"',\n                        ],\n                    ],\n                    [\n                        'type' => Conditional::CONDITION_CELLIS,\n                        'operator' => Conditional::OPERATOR_EQUAL,\n                        'conditions' => [\n                            '\"PHP\"',\n                        ],\n                    ],\n                ],\n            ],\n        ];\n    }\n\n    public function testReadConditionalFormattingStyles(): void\n    {\n        $filename = 'tests/data/Reader/XLS/CF_Basic_Comparisons.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $expectedRange = 'A2:E5';\n        $hasConditionalStyles = $sheet->conditionalStylesExists($expectedRange);\n        self::assertTrue($hasConditionalStyles);\n\n        $conditionalStyles = $sheet->getConditionalStyles($expectedRange);\n        self::assertCount(3, $conditionalStyles);\n\n        $style = $conditionalStyles[0]->getStyle();\n        $font = $style->getFont();\n        self::assertSame('FF0000FF', $font->getColor()->getArgb());\n        self::assertNull($font->getItalic());\n        self::assertNull($font->getStrikethrough());\n        // Fill not handled correctly - forget for now\n        $borders = $style->getBorders();\n        self::assertSame(Border::BORDER_OMIT, $borders->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getBottom()->getBorderStyle());\n        self::assertNull($style->getNumberFormat()->getFormatCode());\n\n        $style = $conditionalStyles[1]->getStyle();\n        $font = $style->getFont();\n        self::assertSame('FF800000', $font->getColor()->getArgb());\n        self::assertNull($font->getItalic());\n        self::assertNull($font->getStrikethrough());\n        // Fill not handled correctly - forget for now\n        $borders = $style->getBorders();\n        self::assertSame(Border::BORDER_OMIT, $borders->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getBottom()->getBorderStyle());\n        self::assertNull($style->getNumberFormat()->getFormatCode());\n\n        $style = $conditionalStyles[2]->getStyle();\n        $font = $style->getFont();\n        self::assertSame('FF00FF00', $font->getColor()->getArgb());\n        self::assertNull($font->getItalic());\n        self::assertNull($font->getStrikethrough());\n        // Fill not handled correctly - forget for now\n        $borders = $style->getBorders();\n        self::assertSame(Border::BORDER_OMIT, $borders->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_OMIT, $borders->getBottom()->getBorderStyle());\n        self::assertNull($style->getNumberFormat()->getFormatCode());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingExpressionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalFormattingExpressionTest extends TestCase\n{\n    /** @param mixed[][] $expectedRule */\n    #[DataProvider('conditionalFormattingProvider')]\n    public function testReadConditionalFormatting(string $expectedRange, array $expectedRule): void\n    {\n        $filename = 'tests/data/Reader/XLS/CF_Expression_Comparisons.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $hasConditionalStyles = $sheet->conditionalStylesExists($expectedRange);\n        self::assertTrue($hasConditionalStyles);\n\n        $conditionalStyles = $sheet->getConditionalStyles($expectedRange);\n\n        foreach ($conditionalStyles as $index => $conditionalStyle) {\n            self::assertSame($expectedRule[$index]['type'], $conditionalStyle->getConditionType());\n            self::assertSame($expectedRule[$index]['operator'], $conditionalStyle->getOperatorType());\n            self::assertSame($expectedRule[$index]['conditions'], $conditionalStyle->getConditions());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function conditionalFormattingProvider(): array\n    {\n        return [\n            [\n                'A3:D8',\n                [\n                    [\n                        'type' => Conditional::CONDITION_EXPRESSION,\n                        'operator' => Conditional::OPERATOR_NONE,\n                        'conditions' => [\n                            '$C1=\"USA\"',\n                        ],\n                    ],\n                ],\n            ],\n            [\n                'A13:D18',\n                [\n                    [\n                        'type' => Conditional::CONDITION_EXPRESSION,\n                        'operator' => Conditional::OPERATOR_NONE,\n                        'conditions' => [\n                            'AND($C1=\"USA\",$D1=\"Q4\")',\n                        ],\n                    ],\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/ConditionalItalicTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalItalicTest extends AbstractFunctional\n{\n    public function testFormulas(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(9);\n        $sheet->getCell('A3')->setValue(5);\n        $sheet->getCell('A4')->setValue(2);\n        $sheet->getCell('A5')->setValue(8);\n\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $condition1->addCondition(5);\n        $condition1->getStyle()->getFont()->setItalic(true);\n\n        $condition2 = new Conditional();\n        $condition2->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition2->setOperatorType(Conditional::OPERATOR_GREATERTHAN);\n        $condition2->addCondition(5);\n        $condition2->getStyle()->getFont()->setStrikeThrough(true)->setBold(true);\n\n        $conditionalStyles = [$condition1, $condition2];\n        $sheet->getStyle('A1:A5')->setConditionalStyles($conditionalStyles);\n\n        $newSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $newSpreadsheet->getActiveSheet();\n        $conditionals = $sheet->getConditionalStylesCollection();\n        self::assertCount(1, $conditionals);\n\n        $cond1 = $conditionals['A1:A5'];\n        self::assertCount(2, $cond1);\n\n        $font = $cond1[0]->getStyle()->getFont();\n        self::assertTrue($font->getItalic());\n        self::assertNull($font->getBold());\n        self::assertNull($font->getStrikethrough());\n\n        $font = $cond1[1]->getStyle()->getFont();\n        self::assertNull($font->getItalic());\n        self::assertTrue($font->getBold());\n        self::assertTrue($font->getStrikethrough());\n\n        $newSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/DataValidationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataValidationTest extends TestCase\n{\n    /** @param mixed[] $expectedRule */\n    #[DataProvider('dataValidationProvider')]\n    public function testDataValidation(string $expectedRange, array $expectedRule): void\n    {\n        $filename = 'tests/data/Reader/XLS/DataValidation.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $hasDataValidation = $sheet->dataValidationExists($expectedRange);\n        self::assertTrue($hasDataValidation);\n\n        $dataValidation = $sheet->getDataValidation($expectedRange);\n        self::assertSame($expectedRule['type'], $dataValidation->getType());\n        self::assertSame($expectedRule['operator'], $dataValidation->getOperator());\n        self::assertSame($expectedRule['formula'], $dataValidation->getFormula1());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function dataValidationProvider(): array\n    {\n        return [\n            [\n                'B2',\n                [\n                    'type' => DataValidation::TYPE_WHOLE,\n                    'operator' => DataValidation::OPERATOR_GREATERTHANOREQUAL,\n                    'formula' => '18',\n                ],\n            ],\n            [\n                'B3',\n                [\n                    'type' => DataValidation::TYPE_LIST,\n                    'operator' => DataValidation::OPERATOR_BETWEEN,\n                    'formula' => '\"Blocked,Pending,Approved\"',\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/DateReaderTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateReaderTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n    }\n\n    public function testReadExcel1900Spreadsheet(): void\n    {\n        $filename = 'tests/data/Reader/XLS/1900_Calendar.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n\n        self::assertSame(Date::CALENDAR_WINDOWS_1900, $spreadsheet->getExcelCalendar());\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        self::assertSame(44562, $worksheet->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet->getCell('A1')->getFormattedValue());\n        self::assertSame(44926, $worksheet->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet->getCell('A2')->getFormattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadExcel1904Spreadsheet(): void\n    {\n        $filename = 'tests/data/Reader/XLS/1904_Calendar.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n\n        self::assertSame(Date::CALENDAR_MAC_1904, $spreadsheet->getExcelCalendar());\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        self::assertSame(43100, $worksheet->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet->getCell('A1')->getFormattedValue());\n        self::assertSame(43464, $worksheet->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet->getCell('A2')->getFormattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNewDateInLoadedExcel1900Spreadsheet(): void\n    {\n        $filename = 'tests/data/Reader/XLS/1900_Calendar.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell('A4')->setValue('=DATE(2023,1,1)');\n        self::assertEquals(44927, $worksheet->getCell('A4')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNewDateInLoadedExcel1904Spreadsheet(): void\n    {\n        $filename = 'tests/data/Reader/XLS/1904_Calendar.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell('A4')->setValue('=DATE(2023,1,1)');\n        self::assertEquals(43465, $worksheet->getCell('A4')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSwitchCalendars(): void\n    {\n        $filename1904 = 'tests/data/Reader/XLS/1904_Calendar.xls';\n        $reader1904 = new Xls();\n        $spreadsheet1904 = $reader1904->load($filename1904);\n        $worksheet1904 = $spreadsheet1904->getActiveSheet();\n        $date1 = Date::convertIsoDate('2022-01-01');\n        self::assertSame(43100.0, $date1);\n\n        $filename1900 = 'tests/data/Reader/XLS/1900_Calendar.xls';\n        $reader1900 = new Xls();\n        $spreadsheet1900 = $reader1900->load($filename1900);\n        $worksheet1900 = $spreadsheet1900->getActiveSheet();\n        $date2 = Date::convertIsoDate('2022-01-01');\n        self::assertSame(44562.0, $date2);\n\n        self::assertSame(44562, $worksheet1900->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet1900->getCell('A1')->getFormattedValue());\n        self::assertSame(44926, $worksheet1900->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet1900->getCell('A2')->getFormattedValue());\n        self::assertSame(44561, $worksheet1900->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet1900->getCell('B1')->getFormattedValue());\n        self::assertSame(44927, $worksheet1900->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet1900->getCell('B2')->getFormattedValue());\n\n        self::assertSame(43100, $worksheet1904->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet1904->getCell('A1')->getFormattedValue());\n        self::assertSame(43464, $worksheet1904->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet1904->getCell('A2')->getFormattedValue());\n        self::assertSame(43099, $worksheet1904->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet1904->getCell('B1')->getFormattedValue());\n        self::assertSame(43465, $worksheet1904->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet1904->getCell('B2')->getFormattedValue());\n\n        // Check that accessing date values from one spreadsheet doesn't break accessing correct values from another\n        self::assertSame(44561, $worksheet1900->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet1900->getCell('B1')->getFormattedValue());\n        self::assertSame(44927, $worksheet1900->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet1900->getCell('B2')->getFormattedValue());\n        self::assertSame(44562, $worksheet1900->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet1900->getCell('A1')->getFormattedValue());\n        self::assertSame(44926, $worksheet1900->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet1900->getCell('A2')->getFormattedValue());\n\n        self::assertSame(43099, $worksheet1904->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet1904->getCell('B1')->getFormattedValue());\n        self::assertSame(43465, $worksheet1904->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet1904->getCell('B2')->getFormattedValue());\n        self::assertSame(43100, $worksheet1904->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet1904->getCell('A1')->getFormattedValue());\n        self::assertSame(43464, $worksheet1904->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet1904->getCell('A2')->getFormattedValue());\n        $spreadsheet1900->disconnectWorksheets();\n        $spreadsheet1904->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/DefinedNameTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefinedNameTest extends TestCase\n{\n    public function testAbsoluteNamedRanges(): void\n    {\n        // Named Ranges were being converted from absolute to relative\n        $filename = 'tests/data/Reader/XLS/DefinedNameTest.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame($sheet->getCell('A7')->getCalculatedValue(), $sheet->getCell('B7')->getCalculatedValue());\n        self::assertSame($sheet->getCell('A8')->getCalculatedValue(), $sheet->getCell('B8')->getCalculatedValue());\n        self::assertSame($sheet->getCell('A9')->getCalculatedValue(), $sheet->getCell('B9')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/ErrorCodeMapTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\ErrorCode;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ErrorCodeMapTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('errorCodeMapProvider')]\n    public function testErrorCode(bool|string $expected, int $index): void\n    {\n        self::assertSame($expected, ErrorCode::lookup($index));\n    }\n\n    public static function errorCodeMapProvider(): array\n    {\n        return [\n            [false, 0x01],\n            ['#NULL!', 0x00],\n            ['#DIV/0!', 0x07],\n            ['#VALUE!', 0x0F],\n            ['#REF!', 0x17],\n            ['#NAME?', 0x1D],\n            ['#NUM!', 0x24],\n            ['#N/A', 0x2A],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/FormulasTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls as WriterXls;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass FormulasTest extends AbstractFunctional\n{\n    public function testFormulas(): void\n    {\n        // This file was created with Excel 365.\n        $filename = 'tests/data/Reader/XLS/formulas.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $originalArray = $sheet->toArray(null, false, false, false);\n\n        $newSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $newWorksheet = $newSpreadsheet->getActiveSheet();\n        $newArray = $newWorksheet->toArray(null, false, false, false);\n        self::assertEquals($originalArray, $newArray);\n        $newSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testDatabaseFormulas(): void\n    {\n        // This file was created with Excel 2003.\n        $filename = 'tests/data/Reader/XLS/formulas.database.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $originalArray = $sheet->toArray(null, false, false, false);\n\n        $newSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $newWorksheet = $newSpreadsheet->getActiveSheet();\n        $newArray = $newWorksheet->toArray(null, false, false, false);\n        self::assertEquals($originalArray, $newArray);\n        $newSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testOtherFormulas(): void\n    {\n        // This file was created with Excel 2003.\n        $filename = 'tests/data/Reader/XLS/formulas.other.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $originalArray = $sheet->toArray(null, false, false, false);\n\n        $newSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $newWorksheet = $newSpreadsheet->getActiveSheet();\n        $newArray = $newWorksheet->toArray(null, false, false, false);\n        self::assertSame($originalArray, $newArray);\n        $newSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function customizeWriter(WriterXls $writer): void\n    {\n        $writer->setPreCalculateFormulas(false);\n    }\n\n    public function testCaveatEmptor(): void\n    {\n        // This test confirms only that the 5 problematic functions\n        //   in it are parsed correctly.\n        // When these are written to an Xls spreadsheet:\n        //   Excel is buggy regarding their support; only BAHTTEXT\n        //     will work as expected.\n        //   LibreOffice handles them without problem.\n        //   So does Gnumeric, except it doesn't implement BAHTTEXT.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $originalArray = [\n            [1],\n            [2],\n            ['=INDEX(TRANSPOSE(A1:A2),1,2)'],\n            ['=BAHTTEXT(2)'],\n            ['=CELL(\"ADDRESS\",A3)'],\n            ['=OFFSET(A3,-2,0)'],\n            ['=GETPIVOTDATA(\"Sales\",A3)'],\n        ];\n        $sheet->fromArray($originalArray);\n\n        /** @var callable */\n        $writerCustomizer = [self::class, 'customizeWriter'];\n        $newSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls', null, $writerCustomizer);\n        $spreadsheet->disconnectWorksheets();\n        $newWorksheet = $newSpreadsheet->getActiveSheet();\n        $newArray = $newWorksheet->toArray(null, false, false, false);\n        self::assertSame($originalArray, $newArray);\n        $newSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/HiddenMergeCellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HiddenMergeCellsTest extends TestCase\n{\n    private const FILENAME = 'tests/data/Reader/XLS/HiddenMergeCellsTest.xls';\n\n    public function testHiddenMergeCells(): void\n    {\n        $reader = new Xls();\n        $spreadsheet = $reader->load(self::FILENAME);\n        $c2InMergeRange = $spreadsheet->getActiveSheet()->getCell('C2')->isInMergeRange();\n        self::assertTrue($c2InMergeRange);\n        $a2InMergeRange = $spreadsheet->getActiveSheet()->getCell('A2')->isInMergeRange();\n        self::assertTrue($a2InMergeRange);\n        $a2MergeRangeValue = $spreadsheet->getActiveSheet()->getCell('A2')->isMergeRangeValueCell();\n        self::assertTrue($a2MergeRangeValue);\n\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2');\n        self::assertSame([['12', '4', '3']], $cellArray);\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2', null, true, false);\n        self::assertSame([[12, 4, 3]], $cellArray);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnmergeHiddenMergeCells(): void\n    {\n        $reader = new Xls();\n        $spreadsheet = $reader->load(self::FILENAME);\n        $spreadsheet->getActiveSheet()->unmergeCells('A2:C2');\n\n        $c2InMergeRange = $spreadsheet->getActiveSheet()->getCell('C2')->isInMergeRange();\n        self::assertFalse($c2InMergeRange);\n        $a2InMergeRange = $spreadsheet->getActiveSheet()->getCell('A2')->isInMergeRange();\n        self::assertFalse($a2InMergeRange);\n\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2', null, false, false, false);\n        self::assertSame([[12, '=6-B1', '=A2/B2']], $cellArray);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/HiddenWorksheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HiddenWorksheetTest extends TestCase\n{\n    public function testPageSetup(): void\n    {\n        $filename = 'tests/data/Reader/XLS/HiddenSheet.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->worksheetAssertions();\n\n        $sheetCount = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            ++$sheetCount;\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet' . $worksheet->getTitle());\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $actualResult = $worksheet->getSheetState();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed asserting sheet state {$expectedResult} for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return string[][] */\n    private function worksheetAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'sheetState' => Worksheet::SHEETSTATE_VISIBLE,\n            ],\n            'Sheet2' => [\n                'sheetState' => Worksheet::SHEETSTATE_HIDDEN,\n            ],\n        ];\n    }\n\n    public function testListWorksheetInfo(): void\n    {\n        $filename = 'tests/data/Reader/XLS/visibility.xls';\n        $reader = new Xls();\n        $expected = [\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Sheet2',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'hidden',\n            ],\n            [\n                'worksheetName' => 'Sheet3',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Sheet4',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 2,\n                'totalColumns' => 1,\n                'sheetState' => 'veryHidden',\n            ],\n        ];\n        self::assertSame($expected, $reader->listWorksheetInfo($filename));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/InfoNamesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\CodePage;\nuse PHPUnit\\Framework\\TestCase;\n\nclass InfoNamesTest extends TestCase\n{\n    public function testWorksheetNamesBiff5(): void\n    {\n        $filename = 'samples/templates/30templatebiff5.xls';\n        $reader = new Xls();\n        $names = $reader->listWorksheetNames($filename);\n        $expected = ['Invoice', 'Terms and conditions'];\n        self::assertSame($expected, $names);\n    }\n\n    public function testWorksheetInfoBiff5(): void\n    {\n        $filename = 'samples/templates/30templatebiff5.xls';\n        $reader = new Xls();\n        $info = $reader->listWorksheetInfo($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Invoice',\n                'lastColumnLetter' => 'E',\n                'lastColumnIndex' => 4,\n                'totalRows' => 19,\n                'totalColumns' => 5,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Terms and conditions',\n                'lastColumnLetter' => 'B',\n                'lastColumnIndex' => 1,\n                'totalRows' => 3,\n                'totalColumns' => 2,\n                'sheetState' => 'visible',\n            ],\n        ];\n        self::assertSame($expected, $info);\n        self::assertSame(Xls::XLS_BIFF7, $reader->getVersion());\n        self::assertSame('CP1252', $reader->getCodepage());\n    }\n\n    public function testWorksheetNamesBiff8(): void\n    {\n        $filename = 'samples/templates/31docproperties.xls';\n        $reader = new Xls();\n        $names = $reader->listWorksheetNames($filename);\n        $expected = ['Worksheet'];\n        self::assertSame($expected, $names);\n    }\n\n    public function testWorksheetInfoBiff8(): void\n    {\n        $filename = 'samples/templates/31docproperties.xls';\n        $reader = new Xls();\n        $info = $reader->listWorksheetInfo($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Worksheet',\n                'lastColumnLetter' => 'B',\n                'lastColumnIndex' => 1,\n                'totalRows' => 1,\n                'totalColumns' => 2,\n                'sheetState' => 'visible',\n            ],\n        ];\n        self::assertSame($expected, $info);\n        self::assertSame(Xls::XLS_BIFF8, $reader->getVersion());\n        self::assertSame('UTF-16LE', $reader->getCodepage());\n    }\n\n    /**\n     * Test load Xls file with MACCENTRALEUROPE encoding, which is implemented\n     * as MAC-CENTRALEUROPE on some systems. Issue #549.\n     */\n    private const MAC_CE = ['MACCENTRALEUROPE', 'MAC-CENTRALEUROPE'];\n\n    private const MAC_FILE5 = 'tests/data/Reader/XLS/maccentraleurope.biff5.xls';\n    private const MAC_FILE8 = 'tests/data/Reader/XLS/maccentraleurope.xls';\n\n    public function testWorksheetNamesBiff5Mac(): void\n    {\n        $codePages = CodePage::getEncodings();\n        self::assertSame(self::MAC_CE, $codePages[10029]);\n        $reader = new Xls();\n        $names = $reader->listWorksheetNames(self::MAC_FILE5);\n        $expected = ['Ärkusz1'];\n        self::assertSame($expected, $names);\n    }\n\n    public function testWorksheetInfoBiff5Mac(): void\n    {\n        $codePages = CodePage::getEncodings();\n        // prior test has replaced array with single string\n        self::assertContains($codePages[10029], self::MAC_CE);\n        $reader = new Xls();\n        $info = $reader->listWorksheetInfo(self::MAC_FILE5);\n        $expected = [\n            [\n                'worksheetName' => 'Ärkusz1',\n                'lastColumnLetter' => 'P',\n                'lastColumnIndex' => 15,\n                'totalRows' => 3,\n                'totalColumns' => 16,\n                'sheetState' => 'visible',\n            ],\n        ];\n        self::assertSame($expected, $info);\n        self::assertSame(Xls::XLS_BIFF7, $reader->getVersion());\n        self::assertContains($reader->getCodepage(), self::MAC_CE);\n    }\n\n    public function testWorksheetNamesBiff5Special(): void\n    {\n        // Sadly, no unit test was added for PR #1484,\n        // so we have to invent a fake one now.\n        $reader = new XlsSpecialCodePage();\n        $reader->setCodePage('CP855'); // use Cyrillic rather than MACCENTRAL\n        $names = $reader->listWorksheetNames(self::MAC_FILE5);\n        $expected = ['ђrkusz1']; // first character interpreted as Cyrillic\n        self::assertSame($expected, $names);\n    }\n\n    public function testBadCodePage(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Unknown codepage');\n        $reader = new Xls();\n        $reader->setCodePage('XXXCP855');\n    }\n\n    public function testLoadMacCentralEuropeBiff5(): void\n    {\n        $reader = new Xls();\n        $spreadsheet = $reader->load(self::MAC_FILE5);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Ärkusz1', $sheet->getTitle());\n        self::assertSame('Ładowność', $sheet->getCell('I1')->getValue());\n        self::assertSame(Xls::XLS_BIFF7, $reader->getVersion());\n        self::assertContains($reader->getCodepage(), self::MAC_CE);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadMacCentralEuropeBiff8(): void\n    {\n        // Document is UTF-16LE as a whole,\n        //    but some strings are stored as MACCENTRALEUROPE\n        $reader = new Xls();\n        $spreadsheet = $reader->load(self::MAC_FILE8);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Arkusz1', $sheet->getTitle());\n        self::assertSame('Ładowność', $sheet->getCell('I1')->getValue());\n        self::assertSame(Xls::XLS_BIFF8, $reader->getVersion());\n        self::assertSame('UTF-16LE', $reader->getCodepage());\n        $properties = $spreadsheet->getProperties();\n        // the following is stored as MACCENTRALEUROPE, not UTF-16LE\n        self::assertSame('Użytkownik Microsoft Office', $properties->getLastModifiedBy());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDimensions(): void\n    {\n        $filename = 'tests/data/Reader/XLS/pr.4687.excel.xls';\n        $reader = new Xls();\n        $info = $reader->listWorksheetInfo($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'D',\n                'lastColumnIndex' => 3,\n                'totalRows' => 2,\n                'totalColumns' => 4,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Sheet2',\n                'lastColumnLetter' => 'B',\n                'lastColumnIndex' => 1,\n                'totalRows' => 4,\n                'totalColumns' => 2,\n                'sheetState' => 'visible',\n            ],\n        ];\n        self::assertSame($expected, $info);\n        $info = $reader->listWorksheetDimensions($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Sheet1',\n                'dimensionsMinR' => 0,\n                'dimensionsMaxR' => 2,\n                'dimensionsMinC' => 0,\n                'dimensionsMaxC' => 4,\n                'lastColumnLetter' => 'D',\n            ],\n            [\n                'worksheetName' => 'Sheet2',\n                'dimensionsMinR' => 0,\n                'dimensionsMaxR' => 4,\n                'dimensionsMinC' => 0,\n                'dimensionsMaxC' => 2,\n                'lastColumnLetter' => 'B',\n            ],\n        ];\n        self::assertSame($expected, $info);\n    }\n\n    public function testChartSheetIgnored(): void\n    {\n        $filename = 'tests/data/Reader/XLS/chartsheet.xls';\n        $reader = new Xls();\n        $info = $reader->listWorksheetInfo($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Data',\n                'lastColumnLetter' => 'M',\n                'lastColumnIndex' => 12,\n                'totalRows' => 7,\n                'totalColumns' => 13,\n                'sheetState' => 'visible',\n            ],\n        ];\n        self::assertSame($expected, $info);\n        $info = $reader->listWorksheetDimensions($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Data',\n                'dimensionsMinR' => 0,\n                'dimensionsMaxR' => 7,\n                'dimensionsMinC' => 0,\n                'dimensionsMaxC' => 13,\n                'lastColumnLetter' => 'M',\n            ],\n        ];\n        self::assertSame($expected, $info);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/IsOddTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IsOddTest extends TestCase\n{\n    public function testIsOdd(): void\n    {\n        // Excel Xls treats ISODD and ISEVEN as 'Add-in functions'\n        // PhpSpreadsheet does not currently handle writing them.\n        // It should, however, read them correctly.\n        $filename = 'tests/data/Reader/XLS/isodd.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('=ISODD(5)', $sheet->getCell('A1')->getValue());\n        self::assertTrue($sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('=ISEVEN(5)', $sheet->getCell('B1')->getValue());\n        self::assertFalse($sheet->getCell('B1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/Issue2463Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2463Test extends TestCase\n{\n    public function testNoUnknownIndexNotice(): void\n    {\n        // Unknown index notice when loading\n        $filename = 'tests/data/Reader/XLS/issue.2463.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('bol.com bestellingen', $sheet->getTitle());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/Issue3202Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls as XlsReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3202Test extends TestCase\n{\n    public function testSelectedCellWithConditionals(): void\n    {\n        // Unknown index notice when loading\n        $filename = 'tests/data/Reader/XLS/issue.3202.xls';\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('A2', $sheet->getSelectedCells());\n\n        $collection = $sheet->getConditionalStylesCollection();\n        self::assertCount(1, $collection);\n        $conditionalArray = $collection['A1:A5'];\n        self::assertCount(3, $conditionalArray);\n\n        $conditions = $conditionalArray[0]->getConditions();\n        self::assertCount(1, $conditions);\n        self::assertSame('$A1=3', $conditions[0]);\n        self::assertTrue($conditionalArray[0]->getNoFormatSet());\n        self::assertTrue($conditionalArray[0]->getStopIfTrue());\n\n        $conditions = $conditionalArray[1]->getConditions();\n        self::assertCount(1, $conditions);\n        self::assertSame('$A1>5', $conditions[0]);\n        self::assertFalse($conditionalArray[1]->getNoFormatSet());\n        self::assertTrue($conditionalArray[1]->getStopIfTrue());\n\n        $conditions = $conditionalArray[2]->getConditions();\n        self::assertCount(1, $conditions);\n        self::assertSame('$A1>1', $conditions[0]);\n        self::assertFalse($conditionalArray[2]->getNoFormatSet());\n        self::assertTrue($conditionalArray[2]->getStopIfTrue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/Issue4356Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4356Test extends AbstractFunctional\n{\n    public function testIssue4356(): void\n    {\n        // Reader couldn't handle sheet title with apostrophe for defined name.\n        // Issue was reported against Xlsx - see how Xls does.\n        $nameDefined = 'CELLNAME';\n        $originalSpreadsheet = new Spreadsheet();\n        $originalSheet = $originalSpreadsheet->getActiveSheet();\n        $originalSheet->setTitle(\"Goodn't sheet name\");\n        $originalSpreadsheet->addNamedRange(\n            new NamedRange($nameDefined, $originalSheet, '$A$1')\n        );\n        $originalSheet->setCellValue('A1', 'This is a named cell.');\n        $originalSheet->getStyle($nameDefined)\n            ->getFont()\n            ->setItalic(true);\n        $spreadsheet = $this->writeAndReload($originalSpreadsheet, 'Xls');\n        $originalSpreadsheet->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('C1', \"=$nameDefined\");\n        self::assertSame('This is a named cell.', $sheet->getCell('C1')->getCalculatedValue());\n        $namedRange2 = $spreadsheet->getNamedRange($nameDefined);\n        self::assertNotNull($namedRange2);\n        $sheetx = $namedRange2->getWorksheet();\n        self::assertNotNull($sheetx);\n        $style = $sheetx->getStyle($nameDefined);\n        self::assertTrue($style->getFont()->getItalic());\n        $style->getFont()->setItalic(false);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/LoadSheetsOnlyTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass LoadSheetsOnlyTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private static string $testbook = 'tests/data/Reader/XLS/HiddenSheet.xls';\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testLoadSheet1Only(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xls();\n        //$reader->setLoadSheetsOnly(['Sheet1']);\n        $names = $reader->listWorksheetNames($filename);\n        $reader->setLoadSheetsOnly([$names[0]]);\n        $spreadsheet = $this->spreadsheet = $reader->load($filename);\n        self::assertSame(1, $spreadsheet->getSheetCount());\n        self::assertSame('Sheet1', $spreadsheet->getActiveSheet()->getTitle());\n    }\n\n    public function testLoadSheet2Only(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xls();\n        $reader->setLoadSheetsOnly(['Sheet2']);\n        $spreadsheet = $this->spreadsheet = $reader->load($filename);\n        self::assertSame(1, $spreadsheet->getSheetCount());\n        self::assertSame('Sheet2', $spreadsheet->getActiveSheet()->getTitle());\n    }\n\n    public function testLoadNoSheet(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('You tried to set a sheet active by the out of bounds index');\n        $filename = self::$testbook;\n        $reader = new Xls();\n        $reader->setLoadSheetsOnly(['Sheet3']);\n        $reader->load($filename);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/Md5Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\MD5;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Md5Test extends TestCase\n{\n    public function testMd5(): void\n    {\n        $md5 = new MD5();\n        $md5->add('123456789a123456789b123456789c123456789d123456789e123456789f1234');\n        $context = $md5->getContext();\n        self::assertSame('0761293f016b925b0bca11b34f1ed613', bin2hex($context));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/NonExistentFileTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NonExistentFileTest extends TestCase\n{\n    public function testNonExistentFile(): void\n    {\n        $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        unlink($temp);\n        $reader = new Xls();\n        self::assertFalse($reader->canRead($temp));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/NumberFormatGeneralTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass NumberFormatGeneralTest extends AbstractFunctional\n{\n    public function testGeneral(): void\n    {\n        $filename = 'tests/data/Reader/XLS/issue2239.xls';\n        $contents = file_get_contents($filename) ?: '';\n        self::assertStringContainsString('GENERAL', $contents);\n\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Blad1');\n        $array = $sheet->toArray();\n        self::assertSame('€ 2.95', $array[1][3]);\n        self::assertSame(2.95, $sheet->getCell('D2')->getValue());\n        self::assertSame(2.95, $sheet->getCell('D2')->getCalculatedValue());\n        self::assertSame('€ 2.95', $sheet->getCell('D2')->getFormattedValue());\n        self::assertSame('21', $array[1][4]);\n        self::assertSame(21, $sheet->getCell('E2')->getValue());\n        self::assertSame(21, $sheet->getCell('E2')->getCalculatedValue());\n        self::assertSame('21', $sheet->getCell('E2')->getFormattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/PageBreakTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass PageBreakTest extends AbstractFunctional\n{\n    public function testPageBreak(): void\n    {\n        $filename = 'samples/templates/50_xlsverticalbreak.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $pageSetup = $sheet->getPageSetup();\n        self::assertSame(PageSetup::PAGEORDER_DOWN_THEN_OVER, $pageSetup->getPageOrder());\n        $breaks = $sheet->getBreaks();\n        self::assertCount(2, $breaks);\n        self::assertSame(Worksheet::BREAK_ROW, $breaks['A5']);\n        self::assertSame(Worksheet::BREAK_COLUMN, $breaks['H1']);\n        $newSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n\n        $newSheet = $newSpreadsheet->getActiveSheet();\n        $newPageSetup = $newSheet->getPageSetup();\n        self::assertSame(PageSetup::PAGEORDER_DOWN_THEN_OVER, $newPageSetup->getPageOrder());\n        $newBreaks = $newSheet->getBreaks();\n        self::assertCount(2, $newBreaks);\n        self::assertSame(Worksheet::BREAK_ROW, $newBreaks['A5']);\n        self::assertSame(Worksheet::BREAK_COLUMN, $newBreaks['H1']);\n        $newSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/PageSetupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass PageSetupTest extends AbstractFunctional\n{\n    private const MARGIN_PRECISION = 0.00000001;\n\n    private const MARGIN_UNIT_CONVERSION = 2.54; // Inches to cm\n\n    public function testPageSetup(): void\n    {\n        $filename = 'tests/data/Reader/XLS/PageSetup.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->pageSetupAssertions();\n\n        $sheetCount = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            ++$sheetCount;\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageSetup()->$testMethodName();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testPageMargins(): void\n    {\n        $filename = 'tests/data/Reader/XLS/PageSetup.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->pageMarginAssertions();\n\n        $sheetCount = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            ++$sheetCount;\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageMargins()->$testMethodName();\n                self::assertEqualsWithDelta(\n                    $expectedResult,\n                    $actualResult,\n                    self::MARGIN_PRECISION,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test} margin\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<array{orientation: string, scale: int, horizontalCentered: bool, verticalCentered: bool, pageOrder: string}> */\n    private function pageSetupAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 75,\n                'horizontalCentered' => true,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet2' => [\n                'orientation' => PageSetup::ORIENTATION_LANDSCAPE,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_OVER_THEN_DOWN,\n            ],\n            'Sheet3' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 90,\n                'horizontalCentered' => true,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet4' => [\n                // Default Settings\n                'orientation' => PageSetup::ORIENTATION_DEFAULT,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n        ];\n    }\n\n    /** @return array<array{top: float, header: float, left: float, right: float, bottom: float, footer: float}> */\n    private function pageMarginAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet2' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet3' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet4' => [\n                // Default Settings (already in inches for comparison)\n                'top' => 0.75,\n                'header' => 0.3,\n                'left' => 0.7,\n                'right' => 0.7,\n                'bottom' => 0.75,\n                'footer' => 0.3,\n            ],\n        ];\n    }\n\n    public function testRepeats2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Sheet1');\n        $setup = $sheet1->getPageSetup();\n        $setup->setRowsToRepeatAtTop([1, 1]);\n        $data = 0;\n        for ($row = 2; $row < 100; ++$row) {\n            $colStr = 'A';\n            $sheet1->setCellValue(\"A$row\", 'LEFT');\n            for ($col = 1; $col < 100; ++$col) {\n                StringHelper::stringIncrement($colStr);\n                if ($row === 2) {\n                    $sheet1->setCellValue(\"{$colStr}1\", 'TOP');\n                }\n                ++$data;\n                $sheet1->setCellValue(\"$colStr$row\", $data);\n            }\n        }\n        $cells = $sheet1->toArray();\n\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Sheet2');\n        $setup = $sheet2->getPageSetup();\n        $setup->setColumnsToRepeatAtLeft(['A', 'A']);\n        $sheet2->fromArray($cells);\n\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setTitle('Sheet3');\n        $setup = $sheet3->getPageSetup();\n        $setup->setRowsToRepeatAtTop([1, 1]);\n        $setup->setColumnsToRepeatAtLeft(['A', 'A']);\n        $sheet3->fromArray($cells);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet1 = $reloadedSpreadsheet->getSheetByNameOrThrow('Sheet1');\n        $rsetup1 = $rsheet1->getPageSetup();\n        self::assertSame([1, 1], $rsetup1->getRowsToRepeatAtTop());\n        self::assertSame(['', ''], $rsetup1->getColumnsToRepeatAtLeft());\n\n        $rsheet2 = $reloadedSpreadsheet->getSheetByNameOrThrow('Sheet2');\n        $rsetup2 = $rsheet2->getPageSetup();\n        self::assertSame([0, 0], $rsetup2->getRowsToRepeatAtTop());\n        self::assertSame(['A', 'A'], $rsetup2->getColumnsToRepeatAtLeft());\n\n        $rsheet3 = $reloadedSpreadsheet->getSheetByNameOrThrow('Sheet3');\n        $rsetup3 = $rsheet3->getPageSetup();\n        self::assertSame([1, 1], $rsetup3->getRowsToRepeatAtTop());\n        self::assertSame(['A', 'A'], $rsetup3->getColumnsToRepeatAtLeft());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/PasswordTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls as XlsReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PasswordTest extends TestCase\n{\n    public function testDefaultPassword(): void\n    {\n        $filename = 'tests/data/Reader/XLS/pwtest.xls';\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('x', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWrongPassword(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Decryption password incorrect');\n        $filename = 'tests/data/Reader/XLS/pwtest2.xls';\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('test2', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCorrectPassword(): void\n    {\n        $filename = 'tests/data/Reader/XLS/pwtest2.xls';\n        $reader = new XlsReader();\n        $reader->setEncryptionPassword('pwtest2');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('test2', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnsupportedEncryption(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Unsupported encryption algorithm');\n        $filename = 'tests/data/Reader/XLS/pwtest3.xls';\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('test2', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/Pr607Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls as XlsReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Pr607Test extends TestCase\n{\n    /**\n     * Test file with cell range expressed in unexpected manner.\n     */\n    public static function testSumData(): void\n    {\n        $filename = 'tests/data/Reader/XLS/pr607.sum_data.xls';\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($filename);\n\n        $tests = [\n            'Test' => [\n                'A1' => 1,\n                'A2' => 2,\n                'A3' => 3,\n                'A4' => 4,\n                'A5' => 5,\n                'A6' => 6,\n                'A7' => 7,\n                'A8' => 8,\n                'A9' => 9,\n                'A10' => 10,\n\n                'B1' => 3,\n                'B2' => 4,\n                'B3' => 5,\n                'B4' => 6,\n                'B5' => 7,\n                'B6' => 8,\n                'B7' => 9,\n                'B8' => 10,\n                'B9' => 11,\n                'B10' => 12,\n\n                'C1' => 4,\n                'C2' => 6,\n                'C3' => 8,\n                'C4' => 10,\n                'C5' => 12,\n                'C6' => 14,\n                'C7' => 16,\n                'C8' => 18,\n                'C9' => 20,\n                'C10' => 22,\n            ],\n        ];\n\n        foreach ($tests as $sheetName => $testsForSheet) {\n            $sheet = $spreadsheet->getSheetByName($sheetName);\n            self::assertNotNull($sheet);\n\n            foreach ($testsForSheet as $cellCoordinate => $result) {\n                $calculatedValue = $sheet->getCell($cellCoordinate)->getCalculatedValue();\n                self::assertSame($result, $calculatedValue, \"cell $cellCoordinate\");\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/Rc4Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls\\RC4;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Rc4Test extends TestCase\n{\n    public function testRc4(): void\n    {\n        // following result confirmed at:\n        // https://cryptii.com/pipes/rc4-encryption\n        $key = \"\\x63\\x72\\x79\\x70\\x74\\x69\\x69\";\n        $string = 'The quick brown fox jumps over the lazy dog.';\n        $rc4 = new RC4($key);\n        $result = bin2hex($rc4->RC4($string));\n        $expectedResult = '2ac2fecdd8fbb84638e3a4820eb205cc8e29c28b9d5d6b2ef974f311964971c90e8b9ca16467ef2dc6fc3520';\n        self::assertSame($expectedResult, $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/RichTextSizeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass RichTextSizeTest extends AbstractFunctional\n{\n    public function testRichTextRunSize(): void\n    {\n        $filename = 'tests/data/Reader/XLS/RichTextFontSize.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('橱柜门板');\n        $text = $sheet->getCell('L15')->getValue();\n        self::assertInstanceOf(RichText::class, $text);\n        $elements = $text->getRichTextElements();\n        self::assertEquals(10, $elements[2]->getFont()?->getSize());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/SheetProtectionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass SheetProtectionTest extends AbstractFunctional\n{\n    public function testSheetProtection(): void\n    {\n        $originalSpreadsheet = new Spreadsheet();\n        $oldSheet = $originalSpreadsheet->getActiveSheet();\n        $oldProtection = $oldSheet->getProtection();\n        $oldProtection->setPassword('PhpSpreadsheet');\n        // setSheet should be true in order to enable protection!\n        $oldProtection->setSheet(true);\n        // The following are set to false, i.e. user is allowed to\n        //    sort, insert rows, or format cells without unprotecting sheet.\n        $oldProtection->setSort(false);\n        $oldProtection->setInsertRows(false);\n        $oldProtection->setFormatCells(false);\n        $oldProtection->setFormatCells(false);\n        // Defaults below are true\n        $oldProtection->setSelectLockedCells(true);\n        $oldProtection->setSelectUnlockedCells(false);\n        $oldProtection->setScenarios(false);\n        $oldProtection->setObjects(true);\n        $spreadsheet = $this->writeAndReload($originalSpreadsheet, 'Xls');\n        $originalSpreadsheet->disconnectWorksheets();\n        $newSheet = $spreadsheet->getActiveSheet();\n        $protection = $newSheet->getProtection();\n        self::assertTrue($protection->verify('PhpSpreadsheet'));\n        self::assertTrue($protection->getSheet());\n        self::assertFalse($protection->getSort());\n        self::assertFalse($protection->getInsertRows());\n        self::assertFalse($protection->getFormatCells());\n        self::assertNotFalse($protection->getInsertColumns());\n        self::assertTrue($protection->getSelectLockedCells());\n        self::assertFalse($protection->getSelectUnlockedCells());\n        self::assertTrue($protection->getObjects());\n        self::assertFalse($protection->getScenarios());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/WholeRowAndColumnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WholeRowAndColumnTest extends TestCase\n{\n    /**\n     * Test that selection uses PhpSpreadsheet limits, not Xls limits.\n     */\n    public function testSelectedRows(): void\n    {\n        $filename = 'tests/data/Reader/XLS/WholeRowAndColumn.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet1 = $spreadsheet->getSheetByName('Sheet1');\n        self::assertNotNull($sheet1);\n        self::assertSame('B1:B1048576', $sheet1->getSelectedCells());\n        $sheet2 = $spreadsheet->getSheetByName('Sheet2');\n        self::assertNotNull($sheet2);\n        self::assertSame('A2:XFD2', $sheet2->getSelectedCells());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/XlsBugPr3734Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XlsBugPr3734Test extends TestCase\n{\n    /**\n     * Test XLS file including data with missing fonts?\n     */\n    public function testXlsFileWithNoFontIndex(): void\n    {\n        $fileName = 'tests/data/Reader/XLS/bug-pr-3734.xls';\n        $spreadsheet = IOFactory::load($fileName);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Calibri', $sheet->getStyle('A1')->getFont()->getName());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/XlsSpecialCodePage.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\CodePage;\n\nclass XlsSpecialCodePage extends \\PhpOffice\\PhpSpreadsheet\\Reader\\Xls\n{\n    protected function readCodepage(): void\n    {\n        $length = self::getUInt2d($this->data, $this->pos + 2);\n        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n        // move stream pointer to next record\n        $this->pos += 4 + $length;\n\n        // offset: 0; size: 2; code page identifier\n        $codepage = self::getUInt2d($recordData, 0);\n\n        if ($this->codepage === '') {\n            $this->codepage = CodePage::numberToName($codepage);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xls/XlsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass XlsTest extends AbstractFunctional\n{\n    /**\n     * Test load Xls file.\n     */\n    public function testLoadXlsSample(): void\n    {\n        $filename = 'tests/data/Reader/XLS/sample.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        self::assertEquals('Title', $spreadsheet->getSheet(0)->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load Xls file with invalid xfIndex.\n     */\n    public function testLoadXlsBug1505(): void\n    {\n        $filename = 'tests/data/Reader/XLS/bug1505.xls';\n        $reader = new Xls();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $col = $sheet->getHighestColumn();\n        $row = $sheet->getHighestRow();\n\n        $newspreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $newsheet = $newspreadsheet->getActiveSheet();\n        $newcol = $newsheet->getHighestColumn();\n        $newrow = $newsheet->getHighestRow();\n\n        self::assertEquals($spreadsheet->getSheetCount(), $newspreadsheet->getSheetCount());\n        self::assertEquals($sheet->getTitle(), $newsheet->getTitle());\n        self::assertEquals($sheet->getColumnDimensions(), $newsheet->getColumnDimensions());\n        self::assertEquals($col, $newcol);\n        self::assertEquals($row, $newrow);\n        self::assertEquals($sheet->getCell('A1')->getFormattedValue(), $newsheet->getCell('A1')->getFormattedValue());\n        self::assertEquals($sheet->getCell(\"$col$row\")->getFormattedValue(), $newsheet->getCell(\"$col$row\")->getFormattedValue());\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load Xls file with invalid length in SST map.\n     */\n    public function testLoadXlsBug1592(): void\n    {\n        $filename = 'tests/data/Reader/XLS/bug1592.xls';\n        $reader = new Xls();\n        // When no fix applied, spreadsheet is not loaded\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $col = $sheet->getHighestColumn();\n        $row = $sheet->getHighestRow();\n\n        $newspreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $newsheet = $newspreadsheet->getActiveSheet();\n        $newcol = $newsheet->getHighestColumn();\n        $newrow = $newsheet->getHighestRow();\n\n        self::assertEquals($spreadsheet->getSheetCount(), $newspreadsheet->getSheetCount());\n        self::assertEquals($sheet->getTitle(), $newsheet->getTitle());\n        self::assertEquals($sheet->getColumnDimensions(), $newsheet->getColumnDimensions());\n        self::assertEquals($col, $newcol);\n        self::assertEquals($row, $newrow);\n\n        $rowIterator = $sheet->getRowIterator();\n\n        foreach ($rowIterator as $row) {\n            foreach ($row->getCellIterator() as $cellx) {\n                /** @var Cell */\n                $cell = $cellx;\n                $valOld = $cell->getFormattedValue();\n                $valNew = $newsheet->getCell($cell->getCoordinate())->getFormattedValue();\n                self::assertEquals($valOld, $valNew);\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadXlsBug1114(): void\n    {\n        $filename = 'tests/data/Reader/XLS/bug1114.xls';\n        $spreadsheet = IOFactory::load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1148140800.0, $sheet->getCell('B2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/AbsolutePathTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AbsolutePathTest extends TestCase\n{\n    public static function testPr1869(): void\n    {\n        $xlsxFile = 'tests/data/Reader/XLSX/pr1769e.xlsx';\n        $reader = new Xlsx();\n        $result = $reader->listWorksheetInfo($xlsxFile);\n\n        self::assertEquals(3, $result[0]['totalRows']);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/AlignmentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass AlignmentTest extends AbstractFunctional\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Spreadsheet $reloadedSpreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->reloadedSpreadsheet !== null) {\n            $this->reloadedSpreadsheet->disconnectWorksheets();\n            $this->reloadedSpreadsheet = null;\n        }\n    }\n\n    public function testJustifyLastLine(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'ABC');\n        $sheet->setCellValue('A2', 'DEF');\n        $sheet->setCellValue('A3', 'GHI');\n        $sheet->getStyle('A1')\n            ->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_DISTRIBUTED)\n            ->setJustifyLastLine(true);\n        $sheet->getStyle('A2')\n            ->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_DISTRIBUTED)\n            ->setJustifyLastLine(false);\n        $sheet->getStyle('A3')\n            ->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_DISTRIBUTED);\n        $this->reloadedSpreadsheet = $this->writeAndReload($this->spreadsheet, 'Xlsx');\n        $rsheet = $this->reloadedSpreadsheet->getActiveSheet();\n        self::assertTrue(\n            $rsheet->getStyle('A1')\n                ->getAlignment()\n                ->getJustifyLastLine()\n        );\n        self::assertFalse(\n            $rsheet->getStyle('A2')\n                ->getAlignment()\n                ->getJustifyLastLine()\n        );\n        self::assertNull(\n            $rsheet->getStyle('A3')\n                ->getAlignment()\n                ->getJustifyLastLine()\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ApostropheTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ApostropheTest extends AbstractFunctional\n{\n    public function testApostropheInSheetName(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('sheet1');\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(2);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('A4')->setValue(4);\n        $spreadsheet->addNamedRange(new NamedRange('sheet14cells', $sheet, '$A$1:$A$4'));\n        $sheet->getCell('C1')\n            ->setValue('=sheet14cells*sheet14cells');\n        $sheet->getCell('E1')->setValue('=ANCHORARRAY(sheet1!C1)');\n        $sheet->getCell('G1')->setValue('=SINGLE(sheet1!C1:C4)');\n\n        $sheet1 = $spreadsheet->createSheet();\n        $sheet1->setTitle(\"Apo'strophe\");\n        $sheet1->getCell('A1')->setValue(2);\n        $sheet1->getCell('A2')->setValue(3);\n        $sheet1->getCell('A3')->setValue(4);\n        $sheet1->getCell('A4')->setValue(5);\n        $spreadsheet->addNamedRange(new NamedRange('sheet24cells', $sheet1, '$A$1:$A$4'));\n        $sheet1->getCell('C1')\n            ->setValue('=sheet24cells*sheet24cells');\n        $sheet1->getCell('E1')->setValue(\"=ANCHORARRAY('Apo''strophe'!C1)\");\n        $sheet1->getCell('G1')->setValue(\"=SINGLE('Apo''strophe'!C1:C4)\");\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        Calculation::getInstance($reloadedSpreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $rsheet = $reloadedSpreadsheet->getSheet(0);\n        // make sure results aren't from cache\n        $rsheet->getCell('E1')->setCalculatedValue(-1);\n        $rsheet->getCell('G1')->setCalculatedValue(-1);\n        self::assertSame([[1], [4], [9], [16]], $rsheet->getCell('C1')->getCalculatedValue());\n        self::assertSame([[1], [4], [9], [16]], $rsheet->getCell('E1')->getCalculatedValue());\n        self::assertSame(1, $rsheet->getCell('G1')->getCalculatedValue());\n\n        $rsheet1 = $reloadedSpreadsheet->getSheet(1);\n        // make sure results aren't from cache\n        $rsheet1->getCell('E1')->setCalculatedValue(-1);\n        $rsheet1->getCell('G1')->setCalculatedValue(-1);\n        self::assertSame([[4], [9], [16], [25]], $rsheet1->getCell('C1')->getCalculatedValue());\n        self::assertSame([[4], [9], [16], [25]], $rsheet1->getCell('E1')->getCalculatedValue());\n        self::assertSame(4, $rsheet1->getCell('G1')->getCalculatedValue());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilter2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AutoFilter2Test extends TestCase\n{\n    private const TESTBOOK = 'tests/data/Reader/XLSX/autofilter2.xlsx';\n\n    /** @return int[] */\n    public function getVisibleSheet(?Worksheet $sheet, int $maxRow): array\n    {\n        $actualVisible = [];\n        if ($sheet !== null) {\n            for ($row = 2; $row <= $maxRow; ++$row) {\n                if ($sheet->getRowDimension($row)->getVisible()) {\n                    $actualVisible[] = $row;\n                }\n            }\n        }\n\n        return $actualVisible;\n    }\n\n    public function testReadDateRange(): void\n    {\n        $spreadsheet = IOFactory::load(self::TESTBOOK);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('daterange');\n        $filter = $sheet->getAutoFilter();\n        $maxRow = 30;\n        self::assertSame(\"A1:A$maxRow\", $filter->getRange());\n        $columns = $filter->getColumns();\n        self::assertCount(1, $columns);\n        $column = $columns['A'] ?? null;\n        self::assertNotNull($column);\n        $ruleset = $column->getRules();\n        self::assertCount(1, $ruleset);\n        $rule = $ruleset[0];\n        self::assertSame(Rule::AUTOFILTER_RULETYPE_DATEGROUP, $rule->getRuleType());\n        $value = $rule->getValue();\n        self::assertIsArray($value);\n        self::assertCount(6, $value);\n        self::assertSame('2002', $value['year']);\n        self::assertSame('', $value['month']);\n        self::assertSame('', $value['day']);\n        self::assertSame('', $value['hour']);\n        self::assertSame('', $value['minute']);\n        self::assertSame('', $value['second']);\n        self::assertSame(\n            [25, 26, 27, 28, 29, 30],\n            $this->getVisibleSheet($sheet, $maxRow)\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadTopTen(): void\n    {\n        $spreadsheet = IOFactory::load(self::TESTBOOK);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('top10');\n        $filter = $sheet->getAutoFilter();\n        $maxRow = 65;\n        self::assertSame(\"A1:A$maxRow\", $filter->getRange());\n        $columns = $filter->getColumns();\n        self::assertCount(1, $columns);\n        $column = $columns['A'] ?? null;\n        self::assertNotNull($column);\n        $ruleset = $column->getRules();\n        self::assertCount(1, $ruleset);\n        $rule = $ruleset[0];\n        self::assertSame(Rule::AUTOFILTER_RULETYPE_TOPTENFILTER, $rule->getRuleType());\n        $value = $rule->getValue();\n        self::assertSame('10', $value);\n        self::assertSame(\n            [56, 57, 58, 59, 60, 61, 62, 63, 64, 65],\n            $this->getVisibleSheet($sheet, $maxRow)\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadDynamic(): void\n    {\n        $spreadsheet = IOFactory::load(self::TESTBOOK);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('dynamic');\n        $filter = $sheet->getAutoFilter();\n        $maxRow = 30;\n        self::assertSame(\"A1:A$maxRow\", $filter->getRange());\n        $columns = $filter->getColumns();\n        self::assertCount(1, $columns);\n        $column = $columns['A'] ?? null;\n        self::assertNotNull($column);\n        $ruleset = $column->getRules();\n        self::assertCount(1, $ruleset);\n        $rule = $ruleset[0];\n        self::assertSame(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER, $rule->getRuleType());\n        self::assertSame('M4', $rule->getGrouping());\n        self::assertSame(\n            [5, 17, 28],\n            $this->getVisibleSheet($sheet, $maxRow)\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterEvaluateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass AutoFilterEvaluateTest extends AbstractFunctional\n{\n    /** @return int[] */\n    private function getVisibleSheet(Worksheet $sheet): array\n    {\n        $actualVisible = [];\n        for ($row = 2; $row <= $sheet->getHighestRow(); ++$row) {\n            if ($sheet->getRowDimension($row)->getVisible()) {\n                $actualVisible[] = $row;\n            }\n        }\n\n        return $actualVisible;\n    }\n\n    private function initializeSpreadsheet(): Spreadsheet\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Filtered');\n        for ($row = 2; $row <= 15; ++$row) {\n            $sheet->getCell(\"A$row\")->setValue($row % 5);\n        }\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange('A1:A15');\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 1);\n        $columnFilter->createRule()->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 3);\n        $sheet->getCell('A16')->setValue(2); // outside of range\n\n        return $spreadsheet;\n    }\n\n    public function testAutoFilterUnevaluated(): void\n    {\n        $spreadsheet = $this->initializeSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        //$sheet->getAutoFilter->showHideRows();\n        $sheet->getRowDimension(6)->setVisible(false);\n        //$columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        // Because showHideRows isn't executed beforehand, it will be executed\n        //   at write time, causing row 6 to be visible.\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getSheet(0);\n        self::assertSame([3, 6, 8, 11, 13, 16], $this->getVisibleSheet($rsheet));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testAutoFilterEvaluated(): void\n    {\n        $spreadsheet = $this->initializeSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getAutoFilter()->showHideRows();\n        $sheet->getRowDimension(6)->setVisible(false);\n        //$columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        // Because showHideRows is executed beforehand, it won't be executed\n        //   at write time, so row 6 will remain hidden.\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getSheet(0);\n        self::assertSame([3, 8, 11, 13, 16], $this->getVisibleSheet($rsheet));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testAutoFilterReevaluated(): void\n    {\n        $spreadsheet = $this->initializeSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getAutoFilter()->showHideRows();\n        $sheet->getRowDimension(6)->setVisible(false);\n        $sheet->getAutoFilter()->getColumn('A')->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        // Because filter is changed after showHideRows, it will be reevaluated\n        //   at write time, so row 6 will be visible.\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getSheet(0);\n        self::assertSame([3, 6, 8, 11, 13, 16], $this->getVisibleSheet($rsheet));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testAutoFilterSetRangeMax(): void\n    {\n        $spreadsheet = $this->initializeSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Filtered');\n        $sheet->getAutoFilter()->setRangeToMaxRow();\n        $sheet->getAutoFilter()->showHideRows();\n        $sheet->getRowDimension(6)->setVisible(false);\n        $sheet->getAutoFilter()->getColumn('A')->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        // Because filter is changed after showHideRows, it will be reevaluated\n        //   at write time, so row 6 will be visible.\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getSheet(0);\n        self::assertSame([3, 6, 8, 11, 13], $this->getVisibleSheet($rsheet));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testAutoFilterSpreadsheetReevaluate(): void\n    {\n        $spreadsheet = $this->initializeSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Filtered');\n        $sheet->getAutoFilter()->showHideRows();\n        $sheet->getRowDimension(6)->setVisible(false);\n        $spreadsheet->reevaluateAutoFilters(false);\n        // Because filter is changed after showHideRows, it will be reevaluated\n        //   at write time, so row 6 will be visible.\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getSheet(0);\n        self::assertSame([3, 6, 8, 11, 13, 16], $this->getVisibleSheet($rsheet));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testAutoFilterSpreadsheetReevaluateResetMax(): void\n    {\n        $spreadsheet = $this->initializeSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Filtered');\n        $sheet->getAutoFilter()->showHideRows();\n        $sheet->getRowDimension(6)->setVisible(false);\n        $spreadsheet->reevaluateAutoFilters(true);\n        // Because filter is changed after showHideRows, it will be reevaluated\n        //   at write time, so row 6 will be visible.\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getSheet(0);\n        self::assertSame([3, 6, 8, 11, 13], $this->getVisibleSheet($rsheet));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter as WorksheetAutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\nuse SimpleXMLElement;\n\nclass AutoFilterTest extends TestCase\n{\n    private function getXMLInstance(string $ref): SimpleXMLElement\n    {\n        return new SimpleXMLElement(\n            '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'\n            . '<root>'\n                . '<autoFilter ref=\"' . $ref . '\"></autoFilter>'\n            . '</root>'\n        );\n    }\n\n    public static function loadDataProvider(): array\n    {\n        return [\n            ['$B3$E8', 0, 'B3E8'],\n            ['$B3:$E8', 1, 'B3:E8'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('loadDataProvider')]\n    public function testLoad(string $ref, int $expectedReadAutoFilterCalled, string $expectedRef): void\n    {\n        $worksheetAutoFilter = $this->getMockBuilder(WorksheetAutoFilter::class)\n            ->disableOriginalConstructor()\n            ->getMock();\n        $worksheetAutoFilter->expects(self::exactly($expectedReadAutoFilterCalled ? 1 : 0))\n            ->method('setRange')\n            ->with($expectedRef);\n\n        $worksheet = $this->getMockBuilder(Worksheet::class)\n            ->disableOriginalConstructor()\n            ->getMock();\n        $worksheet->expects(self::exactly($expectedReadAutoFilterCalled ? 1 : 0))\n            ->method('getAutoFilter')\n            ->willReturn($worksheetAutoFilter);\n\n        $autoFilter = new AutoFilter($worksheet, $this->getXMLInstance($ref));\n\n        $autoFilter->load();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ChartSheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ChartSheetTest extends TestCase\n{\n    public function testLoadChartSheetWithCharts(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/ChartSheet.xlsx';\n        $reader = new Xlsx();\n        $reader->setIncludeCharts(true);\n        $spreadsheet = $reader->load($filename);\n\n        self::assertCount(2, $spreadsheet->getAllSheets());\n        $chartSheet = $spreadsheet->getSheetByNameOrThrow('Chart1');\n        self::assertSame(1, $chartSheet->getChartCount());\n    }\n\n    public function testLoadChartSheetWithoutCharts(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/ChartSheet.xlsx';\n        $reader = new Xlsx();\n        $reader->setIncludeCharts(false);\n        $spreadsheet = $reader->load($filename);\n\n        self::assertCount(1, $spreadsheet->getAllSheets());\n        self::assertNull($spreadsheet->getSheetByName('Chart1'));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ColorTabTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColorTabTest extends TestCase\n{\n    public function testIssue2316(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/colortabs.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        // theme color\n        self::assertSame('FF548135', $spreadsheet->getSheet(0)->getTabColor()->getArgb());\n        // rgb color\n        self::assertSame('FFFFC000', $spreadsheet->getSheet(1)->getTabColor()->getArgb());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/CommentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CommentTest extends TestCase\n{\n    public function testIssue2316(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.2316.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $comment = $sheet->getComment('A1');\n        $commentString = (string) $comment;\n        self::assertStringContainsString('編號長度限制：', $commentString);\n        self::assertSame('jill.chen', $comment->getAuthor());\n        $comment = $sheet->getComment('E1');\n        $commentString = (string) $comment;\n        self::assertStringContainsString('若為宅配物流僅能選「純配送」', $commentString);\n        self::assertSame('Anderson Chen 陳宗棠', $comment->getAuthor());\n    }\n\n    public function testIssue3654(): void\n    {\n        // Reader was ignoring comments.\n        $filename = 'tests/data/Reader/XLSX/issue.3654.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $expectedComments = [\n            'X4', 'AD4', 'AN4',\n            'X5', 'AD5', 'AN5',\n            'AN6', // X6 and AD6 are uncommented on original\n            'X7', 'AD7', 'AN7',\n            'X8', 'AD8', 'AN8',\n            'X9', 'AD9', 'AN9',\n            'X10', 'AD10', 'AN10',\n            'X11', 'AD11', 'AN11',\n            'X12', 'AD12', 'AN12',\n        ];\n        self::assertEquals($expectedComments, array_keys($sheet->getComments()));\n        self::assertStringContainsString('.png', $sheet->getComment('X4')->getBackgroundImage()->getPath());\n        self::assertStringContainsString('.jpeg', $sheet->getComment('AN12')->getBackgroundImage()->getPath());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIssue3654c(): void\n    {\n        // Reader was ignoring comments.\n        $filename = 'tests/data/Reader/XLSX/issue.3654c.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $comments = $sheet->getComments();\n        self::assertCount(326, $comments);\n        self::assertStringContainsString('.png', $sheet->getComment('X4')->getBackgroundImage()->getPath());\n        self::assertStringContainsString('.jpeg', $sheet->getComment('AN12')->getBackgroundImage()->getPath());\n\n        // Spreadsheet generated by Flexcel. Make sure we managed\n        // to locate printerSettings since it used an unexpected link.\n        /** @var mixed[][][][][] */\n        $unparsedLoadedData = $spreadsheet->getUnparsedLoadedData();\n        /** @var string */\n        $pageSetupRel = $unparsedLoadedData['sheets']['Worksheet']['pageSetupRelId'] ?? '';\n        self::assertSame('flId1ps', $pageSetupRel);\n        $pageSetupPath = $unparsedLoadedData['sheets']['Worksheet']['printerSettings'][substr($pageSetupRel, 3)]['filePath'] ?? '';\n        self::assertSame('xl/printerSettings/printerSettings1.bin', $pageSetupPath);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/CondNumFmtTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CondNumFmtTest extends TestCase\n{\n    public function testLoadCondNumFmt(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/condfmtnum.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        // NumberFormat explicitly set in following conditional style\n        $conditionalStyle = $worksheet->getConditionalStyles('A1:A3');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_EXPRESSION, $conditionalRule->getConditionType());\n        self::assertEquals('MONTH(A1)=10', $conditions[0]);\n        $numfmt = $conditionalRule->getStyle()->getNumberFormat()->getFormatCode();\n        self::assertEquals('yyyy/mm/dd', $numfmt);\n        // NumberFormat not set in following conditional style\n        $conditionalStyle = $worksheet->getConditionalStyles('B1');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_EXPRESSION, $conditionalRule->getConditionType());\n        self::assertEquals('AND(B1>=2000,B1<3000)', $conditions[0]);\n        $numfmt = $conditionalRule->getStyle()->getNumberFormat()->getFormatCode();\n        self::assertEquals('', $numfmt);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalBorderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalBorderTest extends TestCase\n{\n    public function testReadAndWriteConditionalBorder(): void\n    {\n        $testfile = 'tests/data/Reader/XLSX/issue.3370.xlsx';\n        $file = 'zip://';\n        $file .= $testfile;\n        $file .= '#xl/styles.xml';\n        $data = file_get_contents($file);\n        $expected = '<dxfs count=\"1\"><dxf><border><left/><right/><vertical/><horizontal/></border></dxf></dxfs>';\n        self::assertStringContainsString($expected, $data);\n\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($testfile);\n        $outfile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($outfile);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $outfile;\n        $file .= '#xl/styles.xml';\n        $data = file_get_contents($file);\n        unlink($outfile);\n\n        $expected = '<dxfs count=\"1\"><dxf><border><left/><right/></border></dxf></dxfs>';\n        self::assertStringContainsString($expected, $data);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalColorScaleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalColorScaleTest extends AbstractFunctional\n{\n    public function testColorScale(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/colorscale.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $worksheet = $reloadedSpreadsheet->getActiveSheet();\n        $styles = $worksheet->getConditionalStyles('A1:A10');\n        self::assertCount(1, $styles);\n        $colorScale = $styles[0]->getColorScale();\n        self::assertNotNull($colorScale);\n        self::assertNotNull($colorScale->getMinimumConditionalFormatValueObject());\n        self::assertNotNull($colorScale->getMidpointConditionalFormatValueObject());\n        self::assertSame('50', $colorScale->getMidpointConditionalFormatValueObject()->getValue());\n        self::assertNotNull($colorScale->getMaximumConditionalFormatValueObject());\n        self::assertSame('FFF8696B', $colorScale->getMinimumColor()?->getARGB());\n        self::assertSame('FFFFEB84', $colorScale->getMidpointColor()?->getARGB());\n        self::assertSame('FF63BE7B', $colorScale->getMaximumColor()?->getARGB());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalFormattingDataBarXlsxTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalDataBar;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalFormatValueObject;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalFormattingDataBarXlsxTest extends TestCase\n{\n    public function testLoadXlsxConditionalFormattingDataBar(): void\n    {\n        // Make sure Conditionals are read correctly from existing file\n        $filename = 'tests/data/Reader/XLSX/conditionalFormattingDataBarTest.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $this->pattern1Assertion($worksheet);\n        $this->pattern2Assertion($worksheet);\n        $this->pattern3Assertion($worksheet);\n        $this->pattern4Assertion($worksheet);\n    }\n\n    public function testReloadXlsxConditionalFormattingDataBar(): void\n    {\n        // Make sure conditionals from existing file are maintained across save\n        $filename = 'tests/data/Reader/XLSX/conditionalFormattingDataBarTest.xlsx';\n        $outfile = File::temporaryFilename();\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadshee1 = $reader->load($filename);\n        $writer = IOFactory::createWriter($spreadshee1, 'Xlsx');\n        $writer->save($outfile);\n        $spreadsheet = $reader->load($outfile);\n        unlink($outfile);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $this->pattern1Assertion($worksheet);\n        $this->pattern2Assertion($worksheet);\n        $this->pattern3Assertion($worksheet);\n        $this->pattern4Assertion($worksheet);\n    }\n\n    public function testNewXlsxConditionalFormattingDataBar(): void\n    {\n        // Make sure blanks/non-blanks added by PhpSpreadsheet are handled correctly\n        $outfile = File::temporaryFilename();\n        $spreadshee1 = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n        $sheet = $spreadshee1->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 2);\n        $sheet->setCellValue('A3', 3);\n        $sheet->setCellValue('A4', 4);\n        $sheet->setCellValue('A5', 5);\n        $cond1 = new Conditional();\n        $cond1->setConditionType(Conditional::CONDITION_DATABAR);\n        $cond1->setDataBar(new ConditionalDataBar());\n        $dataBar = $cond1->getDataBar();\n        self::assertNotNull($dataBar);\n        $dataBar\n            ->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject('min'))\n            ->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject('max'))\n            ->setColor(Color::COLOR_GREEN);\n        $cond = [$cond1];\n        $sheet->getStyle('A1:A5')->setConditionalStyles($cond);\n        $writer = IOFactory::createWriter($spreadshee1, 'Xlsx');\n        $writer->save($outfile);\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($outfile);\n        unlink($outfile);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $conditionalStyle = $worksheet->getConditionalStyles('A1:A5');\n        self::assertNotEmpty($conditionalStyle);\n        /** @var Conditional $conditionalRule */\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_DATABAR, $conditionalRule->getConditionType());\n        self::assertNotEmpty($conditionalRule->getDataBar());\n\n        $dataBar = $conditionalRule->getDataBar();\n        self::assertNotNull($dataBar->getMinimumConditionalFormatValueObject());\n        self::assertNotNull($dataBar->getMaximumConditionalFormatValueObject());\n        self::assertEquals('min', $dataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('max', $dataBar->getMaximumConditionalFormatValueObject()->getType());\n        self::assertEquals(Color::COLOR_GREEN, $dataBar->getColor());\n    }\n\n    private function pattern1Assertion(Worksheet $worksheet): void\n    {\n        self::assertEquals(\n            \"Type: Automatic, Automatic\\nDirection: Automatic\\nFills: Gradient\\nAxis Position: Automatic\",\n            $worksheet->getCell('A2')->getValue()\n        );\n\n        $conditionalStyle = $worksheet->getConditionalStyles('A3:A23');\n        self::assertNotEmpty($conditionalStyle);\n        /** @var Conditional $conditionalRule */\n        $conditionalRule = $conditionalStyle[0];\n        $dataBar = $conditionalRule->getDataBar();\n\n        self::assertNotEmpty($dataBar);\n        self::assertEquals(Conditional::CONDITION_DATABAR, $conditionalRule->getConditionType());\n        self::assertNotNull($dataBar->getMinimumConditionalFormatValueObject());\n        self::assertNotNull($dataBar->getMaximumConditionalFormatValueObject());\n        self::assertEquals('min', $dataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('max', $dataBar->getMaximumConditionalFormatValueObject()->getType());\n\n        self::assertEquals('FF638EC6', $dataBar->getColor());\n        self::assertNotEmpty($dataBar->getConditionalFormattingRuleExt());\n        //ext\n        $rule1ext = $dataBar->getConditionalFormattingRuleExt();\n        self::assertEquals('{72C64AE0-5CD9-164F-83D1-AB720F263E79}', $rule1ext->getId());\n        self::assertEquals('dataBar', $rule1ext->getCfRule());\n        self::assertEquals('A3:A23', $rule1ext->getSqref());\n        $extDataBar = $rule1ext->getDataBarExt();\n        self::assertNotEmpty($extDataBar);\n        $pattern1 = [\n            'minLength' => 0,\n            'maxLength' => 100,\n            'border' => true,\n            'gradient' => null,\n            'direction' => null,\n            'axisPosition' => null,\n            'negativeBarBorderColorSameAsPositive' => false,\n            'borderColor' => 'FF638EC6',\n            'negativeFillColor' => 'FFFF0000',\n            'negativeBorderColor' => 'FFFF0000',\n        ];\n        foreach ($pattern1 as $key => $value) {\n            $funcName = 'get' . ucwords($key);\n            self::assertEquals($value, $extDataBar->$funcName(), __METHOD__ . '::' . $funcName . ' function patten');\n        }\n\n        self::assertNotEmpty($extDataBar->getMinimumConditionalFormatValueObject());\n        self::assertNotEmpty($extDataBar->getMaximumConditionalFormatValueObject());\n        self::assertEquals('autoMin', $extDataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('autoMax', $extDataBar->getMaximumConditionalFormatValueObject()->getType());\n\n        self::assertEquals('FF000000', $extDataBar->getAxisColor()['rgb']);\n    }\n\n    private function pattern2Assertion(Worksheet $worksheet): void\n    {\n        self::assertEquals(\n            \"Type: Number, Number\\nValue: -5, 5\\nDirection: Automatic\\nFills: Solid\\nAxis Position: Automatic\",\n            $worksheet->getCell('B2')->getValue()\n        );\n\n        $conditionalStyle = $worksheet->getConditionalStyles('B3:B23');\n        self::assertNotEmpty($conditionalStyle);\n        /** @var Conditional $conditionalRule */\n        $conditionalRule = $conditionalStyle[0];\n        $dataBar = $conditionalRule->getDataBar();\n\n        self::assertNotEmpty($dataBar);\n        self::assertEquals(Conditional::CONDITION_DATABAR, $conditionalRule->getConditionType());\n        self::assertNotNull($dataBar->getMinimumConditionalFormatValueObject());\n        self::assertNotNull($dataBar->getMaximumConditionalFormatValueObject());\n        self::assertEquals('num', $dataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('num', $dataBar->getMaximumConditionalFormatValueObject()->getType());\n        self::assertEquals('-5', $dataBar->getMinimumConditionalFormatValueObject()->getValue());\n        self::assertEquals('5', $dataBar->getMaximumConditionalFormatValueObject()->getValue());\n        self::assertEquals('FF63C384', $dataBar->getColor());\n        self::assertNotEmpty($dataBar->getConditionalFormattingRuleExt());\n        //ext\n        $rule1ext = $dataBar->getConditionalFormattingRuleExt();\n        self::assertEquals('{98904F60-57F0-DF47-B480-691B20D325E3}', $rule1ext->getId());\n        self::assertEquals('dataBar', $rule1ext->getCfRule());\n        self::assertEquals('B3:B23', $rule1ext->getSqref());\n        $extDataBar = $rule1ext->getDataBarExt();\n        self::assertNotEmpty($extDataBar);\n        $pattern1 = [\n            'minLength' => 0,\n            'maxLength' => 100,\n            'border' => null,\n            'gradient' => false,\n            'direction' => null,\n            'axisPosition' => null,\n            'negativeBarBorderColorSameAsPositive' => null,\n            'borderColor' => null,\n            'negativeFillColor' => 'FFFF0000',\n            'negativeBorderColor' => null,\n        ];\n        foreach ($pattern1 as $key => $value) {\n            $funcName = 'get' . ucwords($key);\n            self::assertEquals($value, $extDataBar->$funcName(), $funcName . ' function patten');\n        }\n\n        self::assertNotEmpty($extDataBar->getMinimumConditionalFormatValueObject());\n        self::assertNotEmpty($extDataBar->getMaximumConditionalFormatValueObject());\n        self::assertEquals('num', $extDataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('num', $extDataBar->getMaximumConditionalFormatValueObject()->getType());\n        self::assertEquals('-5', $extDataBar->getMinimumConditionalFormatValueObject()->getCellFormula());\n        self::assertEquals('5', $extDataBar->getMaximumConditionalFormatValueObject()->getCellFormula());\n\n        self::assertEquals('FF000000', $extDataBar->getAxisColor()['rgb']);\n    }\n\n    private function pattern3Assertion(Worksheet $worksheet): void\n    {\n        self::assertEquals(\n            \"Type: Automatic, Automatic\\nDirection: rightToLeft\\nFills: Solid\\nAxis Position: None\",\n            $worksheet->getCell('C2')->getValue()\n        );\n\n        $conditionalStyle = $worksheet->getConditionalStyles('C3:C23');\n        self::assertNotEmpty($conditionalStyle);\n        /** @var Conditional $conditionalRule */\n        $conditionalRule = $conditionalStyle[0];\n        $dataBar = $conditionalRule->getDataBar();\n\n        self::assertNotEmpty($dataBar);\n        self::assertEquals(Conditional::CONDITION_DATABAR, $conditionalRule->getConditionType());\n        self::assertNotNull($dataBar->getMinimumConditionalFormatValueObject());\n        self::assertNotNull($dataBar->getMaximumConditionalFormatValueObject());\n        self::assertEquals('min', $dataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('max', $dataBar->getMaximumConditionalFormatValueObject()->getType());\n        self::assertEmpty($dataBar->getMinimumConditionalFormatValueObject()->getValue());\n        self::assertEmpty($dataBar->getMaximumConditionalFormatValueObject()->getValue());\n        self::assertEquals('FFFF555A', $dataBar->getColor());\n        self::assertNotEmpty($dataBar->getConditionalFormattingRuleExt());\n\n        //ext\n        $rule1ext = $dataBar->getConditionalFormattingRuleExt();\n        self::assertEquals('{453C04BA-7ABD-8548-8A17-D9CFD2BDABE9}', $rule1ext->getId());\n        self::assertEquals('dataBar', $rule1ext->getCfRule());\n        self::assertEquals('C3:C23', $rule1ext->getSqref());\n        $extDataBar = $rule1ext->getDataBarExt();\n        self::assertNotEmpty($extDataBar);\n        $pattern1 = [\n            'minLength' => 0,\n            'maxLength' => 100,\n            'border' => null,\n            'gradient' => false,\n            'direction' => 'rightToLeft',\n            'axisPosition' => 'none',\n            'negativeBarBorderColorSameAsPositive' => null,\n            'borderColor' => null,\n            'negativeFillColor' => 'FFFF0000',\n            'negativeBorderColor' => null,\n        ];\n        foreach ($pattern1 as $key => $value) {\n            $funcName = 'get' . ucwords($key);\n            self::assertEquals($value, $extDataBar->$funcName(), $funcName . ' function patten');\n        }\n\n        self::assertNotEmpty($extDataBar->getMinimumConditionalFormatValueObject());\n        self::assertNotEmpty($extDataBar->getMaximumConditionalFormatValueObject());\n        self::assertEquals('autoMin', $extDataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('autoMax', $extDataBar->getMaximumConditionalFormatValueObject()->getType());\n        self::assertEmpty($extDataBar->getMinimumConditionalFormatValueObject()->getCellFormula());\n        self::assertEmpty($extDataBar->getMaximumConditionalFormatValueObject()->getCellFormula());\n\n        self::assertEmpty($extDataBar->getAxisColor()['rgb']);\n    }\n\n    private function pattern4Assertion(Worksheet $worksheet): void\n    {\n        self::assertEquals(\n            \"type: formula, formula\\nValue: =2+3, =10+10\\nDirection: leftToRight\\nShowDataBarOnly\\nFills: Solid\\nBorder: Solid\\nAxis Position: Midpoint\",\n            $worksheet->getCell('D2')->getValue()\n        );\n\n        $conditionalStyle = $worksheet->getConditionalStyles('D3:D23');\n        self::assertNotEmpty($conditionalStyle);\n        /** @var Conditional $conditionalRule */\n        $conditionalRule = $conditionalStyle[0];\n        $dataBar = $conditionalRule->getDataBar();\n\n        self::assertNotEmpty($dataBar);\n        self::assertEquals(Conditional::CONDITION_DATABAR, $conditionalRule->getConditionType());\n\n        self::assertTrue($dataBar->getShowValue());\n        self::assertNotNull($dataBar->getMinimumConditionalFormatValueObject());\n        self::assertNotNull($dataBar->getMaximumConditionalFormatValueObject());\n        self::assertEquals('formula', $dataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('formula', $dataBar->getMaximumConditionalFormatValueObject()->getType());\n        self::assertEquals('3+2', $dataBar->getMinimumConditionalFormatValueObject()->getValue());\n        self::assertEquals('10+10', $dataBar->getMaximumConditionalFormatValueObject()->getValue());\n        self::assertEquals('FFFF555A', $dataBar->getColor());\n        self::assertNotEmpty($dataBar->getConditionalFormattingRuleExt());\n\n        //ext\n        $rule1ext = $dataBar->getConditionalFormattingRuleExt();\n        self::assertEquals('{6C1E066A-E240-3D4A-98F8-8CC218B0DFD2}', $rule1ext->getId());\n        self::assertEquals('dataBar', $rule1ext->getCfRule());\n        self::assertEquals('D3:D23', $rule1ext->getSqref());\n        $extDataBar = $rule1ext->getDataBarExt();\n        self::assertNotEmpty($extDataBar);\n        $pattern1 = [\n            'minLength' => 0,\n            'maxLength' => 100,\n            'border' => true,\n            'gradient' => false,\n            'direction' => 'leftToRight',\n            'axisPosition' => 'middle',\n            'negativeBarBorderColorSameAsPositive' => null,\n            'borderColor' => 'FF000000',\n            'negativeFillColor' => 'FFFF0000',\n            'negativeBorderColor' => null,\n        ];\n        foreach ($pattern1 as $key => $value) {\n            $funcName = 'get' . ucwords($key);\n            self::assertEquals($value, $extDataBar->$funcName(), $funcName . ' function patten');\n        }\n\n        self::assertNotEmpty($extDataBar->getMaximumConditionalFormatValueObject());\n        self::assertNotEmpty($extDataBar->getMinimumConditionalFormatValueObject());\n        self::assertEquals('formula', $extDataBar->getMinimumConditionalFormatValueObject()->getType());\n        self::assertEquals('formula', $extDataBar->getMaximumConditionalFormatValueObject()->getType());\n        self::assertEquals('3+2', $extDataBar->getMinimumConditionalFormatValueObject()->getCellFormula());\n        self::assertEquals('10+10', $extDataBar->getMaximumConditionalFormatValueObject()->getCellFormula());\n\n        self::assertEquals('FF000000', $extDataBar->getAxisColor()['rgb']);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalIconSetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\IconSetValues;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalIconSetTest extends AbstractFunctional\n{\n    public function testIconSet(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/conditionalFormattingIconSet.xlsx';\n        $reader = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $worksheet = $reloadedSpreadsheet->getActiveSheet();\n\n        $columnIndex = 'A';\n        foreach (IconSetValues::cases() as $iconSetValue) {\n            // styles\n            $styles = $worksheet->getConditionalStyles(\"{$columnIndex}2:{$columnIndex}11\");\n            self::assertCount(1, $styles);\n\n            // icon set\n            $iconSet = $styles[0]->getIconSet();\n            self::assertNotNull($iconSet);\n            self::assertSame($iconSetValue, $iconSet->getIconSetType() ?? IconSetValues::ThreeTrafficLights1);\n\n            StringHelper::stringIncrement($columnIndex);\n        }\n\n        // icon set attributes\n        $columnIndex = 'A';\n        foreach (\n            [\n                ['reverse' => false, 'showValue' => false],\n                ['reverse' => true, 'showValue' => false],\n                ['reverse' => false, 'showValue' => true],\n            ] as $expected\n        ) {\n            $styles = $worksheet->getConditionalStyles(\"{$columnIndex}2:{$columnIndex}11\");\n            $iconSet = $styles[0]->getIconSet();\n            self::assertNotNull($iconSet);\n            self::assertSame($expected['reverse'], $iconSet->getReverse() ?? false);\n            self::assertSame($expected['showValue'], $iconSet->getShowValue() ?? true);\n            self::assertFalse($iconSet->getCustom() ?? false);\n\n            StringHelper::stringIncrement($columnIndex);\n        }\n\n        // cfvos\n        $columnIndex = 'A';\n        foreach (\n            [\n                [['percent', '0', true], ['percent', '33', false], ['percent', '67', true]],\n                [['percent', '0', true], ['num', '3', false], ['num', '7', true]],\n                [['percent', '0', true], ['formula', '10/3', false], ['formula', '10/2', true]],\n                [['percent', '0', true], ['percentile', '33', false], ['percentile', '67', true]],\n            ] as $expected\n        ) {\n            $styles = $worksheet->getConditionalStyles(\"{$columnIndex}2:{$columnIndex}11\");\n            $iconSet = $styles[0]->getIconSet();\n            self::assertNotNull($iconSet);\n            $cfvos = $iconSet->getCfvos();\n            self::assertCount(count($expected), $cfvos);\n            foreach ($expected as $i => [$type, $value, $gte]) {\n                $cfvo = $cfvos[$i];\n                self::assertSame($type, $cfvo->getType());\n                self::assertSame($value, $cfvo->getValue());\n                self::assertSame($gte, $cfvo->getGreaterThanOrEqual() ?? true);\n                self::assertNull($cfvo->getCellFormula());\n            }\n\n            StringHelper::stringIncrement($columnIndex);\n        }\n\n        // unsupported icon sets\n        for ($columnIndex = 'R'; $columnIndex <= 'U'; StringHelper::stringIncrement($columnIndex)) {\n            $styles = $worksheet->getConditionalStyles(\"{$columnIndex}2:{$columnIndex}11\");\n            $iconSet = $styles[0]->getIconSet();\n            self::assertNull($iconSet);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalNoFormatSetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalNoFormatSetTest extends TestCase\n{\n    public function testNoFormatTest(): void\n    {\n        $testfile = 'tests/data/Reader/XLSX/issue.3202.xlsx';\n        $file = 'zip://';\n        $file .= $testfile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        $expected = '<conditionalFormatting sqref=\"A1:A5\">'\n            . '<cfRule type=\"expression\" dxfId=\"1\" priority=\"2\" stopIfTrue=\"1\">'\n            . '<formula>$A1&gt;5</formula>'\n            . '</cfRule>'\n            . '<cfRule type=\"expression\" dxfId=\"0\" priority=\"3\">'\n            . '<formula>$A1&gt;1</formula>'\n            . '</cfRule>'\n            . '<cfRule type=\"expression\" priority=\"1\" stopIfTrue=\"1\">'\n            . '<formula>$A1=3</formula>'\n            . '</cfRule>'\n            . '</conditionalFormatting>';\n        self::assertStringContainsString($expected, $data);\n\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($testfile);\n        $sheet = $spreadsheet->getactiveSheet();\n\n        $collection = $sheet->getConditionalStylesCollection();\n        self::assertCount(1, $collection);\n        $conditionalArray = $collection['A1:A5'];\n        self::assertCount(3, $conditionalArray);\n\n        $conditions = $conditionalArray[0]->getConditions();\n        self::assertCount(1, $conditions);\n        self::assertSame('$A1=3', $conditions[0]);\n        self::assertTrue($conditionalArray[0]->getNoFormatSet());\n        self::assertTrue($conditionalArray[0]->getStopIfTrue());\n\n        $conditions = $conditionalArray[1]->getConditions();\n        self::assertCount(1, $conditions);\n        self::assertSame('$A1>5', $conditions[0]);\n        self::assertFalse($conditionalArray[1]->getNoFormatSet());\n        self::assertTrue($conditionalArray[1]->getStopIfTrue());\n\n        $conditions = $conditionalArray[2]->getConditions();\n        self::assertCount(1, $conditions);\n        self::assertSame('$A1>1', $conditions[0]);\n        self::assertFalse($conditionalArray[2]->getNoFormatSet());\n        self::assertFalse($conditionalArray[2]->getStopIfTrue());\n\n        $outfile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($outfile);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $outfile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        unlink($outfile);\n\n        $expected = '<conditionalFormatting sqref=\"A1:A5\">'\n            . '<cfRule type=\"expression\" priority=\"1\" stopIfTrue=\"1\">'\n            . '<formula>$A1=3</formula>'\n            . '</cfRule>'\n            . '<cfRule type=\"expression\" dxfId=\"1\" priority=\"2\" stopIfTrue=\"1\">'\n            . '<formula>$A1&gt;5</formula>'\n            . '</cfRule>'\n            . '<cfRule type=\"expression\" dxfId=\"2\" priority=\"3\">'\n            . '<formula>$A1&gt;1</formula>'\n            . '</cfRule>'\n            . '</conditionalFormatting>';\n        self::assertStringContainsString($expected, $data);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalPriority2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalPriority2Test extends AbstractFunctional\n{\n    public function testConditionalPriority(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.4318.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $rules = $sheet->getConditionalStyles('E5', false);\n        self::assertCount(4, $rules);\n        self::assertSame(2, $rules[0]->getPriority());\n        self::assertSame(['$B$2<2'], $rules[0]->getConditions());\n        self::assertSame(3, $rules[1]->getPriority());\n        self::assertSame(['$B$2=\"\"'], $rules[1]->getConditions());\n        self::assertSame(4, $rules[2]->getPriority());\n        self::assertSame(['$B$2=3'], $rules[2]->getConditions());\n        self::assertSame(5, $rules[3]->getPriority());\n        self::assertSame(['$B$2=2'], $rules[3]->getConditions());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalPriorityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalPriorityTest extends AbstractFunctional\n{\n    public function testConditionalPriority(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.4312c.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $worksheet = $reloadedSpreadsheet->getActiveSheet();\n        $priorities = [];\n        foreach ($worksheet->getConditionalStylesCollection() as $conditionalStyles) {\n            foreach ($conditionalStyles as $conditional) {\n                $priorities[] = $conditional->getPriority();\n            }\n        }\n        $expected = [27, 2, 3, 4, 1, 22, 14, 5, 6, 7, 20];\n        self::assertSame($expected, $priorities);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testZeroPriority(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 1, 1, 1],\n            [2, 2, 2, 2],\n            [3, 3, 3, 3],\n            [4, 4, 4, 4],\n            [5, 5, 5, 5],\n        ]);\n\n        $range = 'A1:A5';\n        $styles = [];\n        $new = new Conditional();\n        $new->setConditionType(Conditional::CONDITION_CELLIS)\n            ->setOperatorType(Conditional::OPERATOR_EQUAL)\n            ->setPriority(30)\n            ->setConditions(['3'])\n            ->getStyle()\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setArgb('FFC00000');\n        $styles[] = $new;\n        $sheet->setConditionalStyles($range, $styles);\n\n        $range = 'B1:B5';\n        $styles = [];\n        $new = new Conditional();\n        $new->setConditionType(Conditional::CONDITION_EXPRESSION)\n            ->setConditions('=MOD(A1,2)=0')\n            ->getStyle()\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setArgb('FF00B0F0');\n        $styles[] = $new;\n        $new = new Conditional();\n        $new->setConditionType(Conditional::CONDITION_CELLIS)\n            ->setOperatorType(Conditional::OPERATOR_EQUAL)\n            ->setPriority(40)\n            ->setConditions(['4'])\n            ->getStyle()\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setArgb('FFFFC000');\n        $styles[] = $new;\n        $sheet->setConditionalStyles($range, $styles);\n\n        $range = 'C1:C5';\n        $styles = [];\n        $new = new Conditional();\n        $new->setConditionType(Conditional::CONDITION_CELLIS)\n            ->setOperatorType(Conditional::OPERATOR_EQUAL)\n            ->setPriority(20)\n            ->setConditions(['2'])\n            ->getStyle()\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setArgb('FFFFFF00');\n        $styles[] = $new;\n        $new = new Conditional();\n        $new->setConditionType(Conditional::CONDITION_CELLIS)\n            ->setOperatorType(Conditional::OPERATOR_EQUAL)\n            ->setConditions(['5'])\n            ->getStyle()\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setArgb('FF008080');\n        $styles[] = $new;\n        $sheet->setConditionalStyles($range, $styles);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $worksheet = $reloadedSpreadsheet->getActiveSheet();\n        $priorities = [];\n        foreach ($worksheet->getConditionalStylesCollection() as $conditionalStyles) {\n            foreach ($conditionalStyles as $conditional) {\n                $priorities[] = $conditional->getPriority();\n            }\n        }\n        // B1:B5 is written in order 41, 40, but Reader sorts them\n        $expected = [30, 40, 41, 20, 42];\n        self::assertSame($expected, $priorities);\n        $styles = $worksheet->getConditionalStyles('B1:B5');\n        self::assertSame(Conditional::CONDITION_CELLIS, $styles[0]->getConditionType());\n        self::assertSame(40, $styles[0]->getPriority());\n        self::assertSame(Conditional::CONDITION_EXPRESSION, $styles[1]->getConditionType());\n        self::assertSame(41, $styles[1]->getPriority());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalTest extends AbstractFunctional\n{\n    public function testLoadingConditionalDoesntLoseSelectedCell(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/ConditionalFormat_Ranges.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        self::assertSame('A1', $worksheet->getActiveCell());\n        self::assertSame('A1', $worksheet->getSelectedCells());\n    }\n\n    /**\n     * Test check if conditional style with type 'notContainsText' works on xlsx.\n     */\n    public function testConditionalNotContainsText(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/conditionalFormatting3Test.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $styles = $worksheet->getConditionalStyles('A1:A5');\n\n        self::assertCount(1, $styles);\n\n        /** @var Conditional $notContainsTextStyle */\n        $notContainsTextStyle = $styles[0];\n        self::assertEquals('A', $notContainsTextStyle->getText());\n        self::assertEquals(Conditional::CONDITION_NOTCONTAINSTEXT, $notContainsTextStyle->getConditionType());\n        self::assertEquals(Conditional::OPERATOR_NOTCONTAINS, $notContainsTextStyle->getOperatorType());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/CoverageGapsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass CoverageGapsTest extends AbstractFunctional\n{\n    public function testCoverageGaps(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet\n            ->getStyle('A1')\n            ->getBorders()\n            ->setDiagonalDirection(Borders::DIAGONAL_BOTH)\n            ->getDiagonal()\n            ->setBorderStyle(Border::BORDER_DASHDOTDOT);\n        $sheet\n            ->getStyle('A2')\n            ->getProtection()\n            ->setLocked(Protection::PROTECTION_PROTECTED);\n        $sheet\n            ->getStyle('A3')\n            ->getAlignment()\n            ->setTextRotation(Alignment::TEXTROTATION_STACK_EXCEL);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(Borders::DIAGONAL_BOTH, $rsheet->getStyle('A1')->getBorders()->getDiagonalDirection());\n        self::assertSame(Border::BORDER_DASHDOTDOT, $rsheet->getStyle('A1')->getBorders()->getDiagonal()->getBorderStyle());\n        self::assertSame(Protection::PROTECTION_PROTECTED, $rsheet->getStyle('A2')->getProtection()->getLocked());\n        self::assertSame(Alignment::TEXTROTATION_STACK_PHPSPREADSHEET, $rsheet->getStyle('A3')->getAlignment()->getTextRotation());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/DataValidationBooleanValueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataValidationBooleanValueTest extends TestCase\n{\n    public static function testPr2225TrueFalse(): void\n    {\n        //This file is created with LibreOffice\n        $xlsxFile = 'tests/data/Reader/XLSX/pr2225-datavalidation-truefalse.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($xlsxFile);\n\n        $a1 = $spreadsheet->getActiveSheet()->getDataValidation('A1');\n        $a2 = $spreadsheet->getActiveSheet()->getDataValidation('A2');\n\n        //<dataValidation allowBlank=\"false\" showDropDown=\"false\" showErrorMessage=\"true\" showInputMessage=\"true\" sqref=\"A1\" type=\"list\">\n        //<dataValidation allowBlank=\"true\" showDropDown=\"true\" showErrorMessage=\"false\" showInputMessage=\"false\" sqref=\"A2\" type=\"list\">\n\n        self::assertFalse($a1->getAllowBlank(), 'A1 validation does not allow blanks, flag should be false');\n        self::assertTrue($a1->getShowDropDown(), 'A1 is set to show the drop down in Excel, which is false in the file');\n        self::assertTrue($a1->getShowErrorMessage(), 'A1 Shows error message, flag should be true');\n        self::assertTrue($a1->getShowInputMessage(), 'A1 Shows input message, flag should be true');\n\n        self::assertTrue($a2->getAllowBlank(), 'A2 validation allows blanks, flag should be true');\n        self::assertFalse($a2->getShowDropDown(), 'A2 is set to not show the drop down in Excel, which is true in the file');\n        self::assertFalse($a2->getShowErrorMessage(), 'A2 does not show error message, flag should be false');\n        self::assertFalse($a2->getShowInputMessage(), 'A2 does not show input message, flag should be false');\n    }\n\n    //This file was created with Google Sheets export to XLSX\n    public static function testPr2225OneZero(): void\n    {\n        $xlsxFile = 'tests/data/Reader/XLSX/pr2225-datavalidation-onezero.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($xlsxFile);\n\n        $a1 = $spreadsheet->getActiveSheet()->getDataValidation('A1');\n        $a2 = $spreadsheet->getActiveSheet()->getDataValidation('A2');\n\n        //<dataValidation allowBlank=\"1\" showErrorMessage=\"1\" showInputMessage=\"1\" sqref=\"A1\" type=\"list\">\n        //<dataValidation allowBlank=\"1\" showDropDown=\"0\" sqref=\"A2\" type=\"list\">\n\n        self::assertTrue($a1->getAllowBlank(), 'A1 validation allows blanks, flag should be true');\n        self::assertTrue($a1->getShowDropDown(), 'A1 is set to show the drop down in Excel, which is false in the file');\n        self::assertTrue($a1->getShowErrorMessage(), 'A1 Shows error message, flag should be true');\n        self::assertTrue($a1->getShowInputMessage(), 'A1 Shows input message, flag should be true');\n\n        self::assertTrue($a2->getAllowBlank(), 'A2 validation allows blanks, flag should be true');\n        self::assertFalse($a2->getShowDropDown(), 'A2 is set to not show the drop down in Excel, which is true in the file');\n        self::assertFalse($a2->getShowErrorMessage(), 'A2 does not show error message, flag should be false');\n        self::assertFalse($a2->getShowInputMessage(), 'A2 does not show input message, flag should be false');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/DataValidationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DataValidationTest extends TestCase\n{\n    public function testLoadXlsxDataValidation(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/dataValidationTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        self::assertTrue($worksheet->getCell('B3')->hasDataValidation());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test for load drop down lists of another sheet.\n     * Pull #2150, issue #2149. Also issue #2677.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerExternalSheet')]\n    public function testDataValidationOfAnotherSheet(string $expectedB14, string $filename): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        // same sheet\n        $validationCell = $worksheet->getCell('B5');\n        self::assertTrue($validationCell->hasDataValidation());\n        self::assertSame(DataValidation::TYPE_LIST, $validationCell->getDataValidation()->getType());\n        self::assertSame('$A$5:$A$7', $validationCell->getDataValidation()->getFormula1());\n\n        // another sheet\n        $validationCell = $worksheet->getCell('B14');\n        self::assertTrue($validationCell->hasDataValidation());\n        self::assertSame(DataValidation::TYPE_LIST, $validationCell->getDataValidation()->getType());\n        self::assertSame($expectedB14, $validationCell->getDataValidation()->getFormula1());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerExternalSheet(): array\n    {\n        return [\n            'standard spreadsheet' => ['Feuil2!$A$3:$A$5', 'tests/data/Reader/XLSX/dataValidation2Test.xlsx'],\n            'alternate namespace prefix' => ['Feuil2!$A$3:$A$5', 'tests/data/Reader/XLSX/issue.2677.namespace.xlsx'],\n            'missing formula' => ['', 'tests/data/Reader/XLSX/issue.2677.removeformula1.xlsx'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/DateReaderTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateReaderTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n    }\n\n    public function testReadExcel1900Spreadsheet(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/1900_Calendar.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        self::assertSame(Date::CALENDAR_WINDOWS_1900, $spreadsheet->getExcelCalendar());\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        self::assertSame(44562, $worksheet->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet->getCell('A1')->getFormattedValue());\n        self::assertSame(44926, $worksheet->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet->getCell('A2')->getFormattedValue());\n        self::assertSame(44561, $worksheet->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet->getCell('B1')->getFormattedValue());\n        self::assertSame(44927, $worksheet->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet->getCell('B2')->getFormattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadExcel1904Spreadsheet(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/1904_Calendar.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        self::assertSame(Date::CALENDAR_MAC_1904, $spreadsheet->getExcelCalendar());\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        self::assertSame(43100, $worksheet->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet->getCell('A1')->getFormattedValue());\n        self::assertSame(43464, $worksheet->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet->getCell('A2')->getFormattedValue());\n        self::assertSame(43099, $worksheet->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet->getCell('B1')->getFormattedValue());\n        self::assertSame(43465, $worksheet->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet->getCell('B2')->getFormattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNewDateInLoadedExcel1900Spreadsheet(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/1900_Calendar.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell('A4')->setValue('=DATE(2023,1,1)');\n        self::assertEquals(44927, $worksheet->getCell('A4')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNewDateInLoadedExcel1904Spreadsheet(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/1904_Calendar.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell('A4')->setValue('=DATE(2023,1,1)');\n        self::assertEquals(43465, $worksheet->getCell('A4')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSwitchCalendars(): void\n    {\n        $filename1904 = 'tests/data/Reader/XLSX/1904_Calendar.xlsx';\n        $reader1904 = new Xlsx();\n        $spreadsheet1904 = $reader1904->load($filename1904);\n        $worksheet1904 = $spreadsheet1904->getActiveSheet();\n        $date1 = Date::convertIsoDate('2022-01-01');\n        self::assertSame(43100.0, $date1);\n\n        $filename1900 = 'tests/data/Reader/XLSX/1900_Calendar.xlsx';\n        $reader1900 = new Xlsx();\n        $spreadsheet1900 = $reader1900->load($filename1900);\n        $worksheet1900 = $spreadsheet1900->getActiveSheet();\n        $date2 = Date::convertIsoDate('2022-01-01');\n        self::assertSame(44562.0, $date2);\n\n        self::assertSame(44562, $worksheet1900->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet1900->getCell('A1')->getFormattedValue());\n        self::assertSame(44926, $worksheet1900->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet1900->getCell('A2')->getFormattedValue());\n        self::assertSame(44561, $worksheet1900->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet1900->getCell('B1')->getFormattedValue());\n        self::assertSame(44927, $worksheet1900->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet1900->getCell('B2')->getFormattedValue());\n\n        self::assertSame(43100, $worksheet1904->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet1904->getCell('A1')->getFormattedValue());\n        self::assertSame(43464, $worksheet1904->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet1904->getCell('A2')->getFormattedValue());\n        self::assertSame(43099, $worksheet1904->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet1904->getCell('B1')->getFormattedValue());\n        self::assertSame(43465, $worksheet1904->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet1904->getCell('B2')->getFormattedValue());\n\n        // Check that accessing date values from one spreadsheet doesn't break accessing correct values from another\n        self::assertSame(44561, $worksheet1900->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet1900->getCell('B1')->getFormattedValue());\n        self::assertSame(44927, $worksheet1900->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet1900->getCell('B2')->getFormattedValue());\n        self::assertSame(44562, $worksheet1900->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet1900->getCell('A1')->getFormattedValue());\n        self::assertSame(44926, $worksheet1900->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet1900->getCell('A2')->getFormattedValue());\n\n        self::assertSame(43099, $worksheet1904->getCell('B1')->getCalculatedValue());\n        self::assertSame('2021-12-31', $worksheet1904->getCell('B1')->getFormattedValue());\n        self::assertSame(43465, $worksheet1904->getCell('B2')->getCalculatedValue());\n        self::assertSame('2023-01-01', $worksheet1904->getCell('B2')->getFormattedValue());\n        self::assertSame(43100, $worksheet1904->getCell('A1')->getValue());\n        self::assertSame('2022-01-01', $worksheet1904->getCell('A1')->getFormattedValue());\n        self::assertSame(43464, $worksheet1904->getCell('A2')->getValue());\n        self::assertSame('2022-12-31', $worksheet1904->getCell('A2')->getFormattedValue());\n        $spreadsheet1900->disconnectWorksheets();\n        $spreadsheet1904->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/DefaultFillTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefaultFillTest extends TestCase\n{\n    public function testDefaultFill(): void\n    {\n        // default fill pattern doesn't specify filltype\n        $filename = 'tests/data/Reader/XLSX/pr1769g.py.xlsx';\n        $file = 'zip://';\n        $file .= $filename;\n        $file .= '#xl/styles.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected empty xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<patternFill/>', $data);\n        }\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('none', $sheet->getCell('A1')->getStyle()->getFill()->getFillType());\n        self::assertSame('none', $sheet->getCell('D4')->getStyle()->getFill()->getFillType());\n        self::assertSame('none', $sheet->getCell('J16')->getStyle()->getFill()->getFillType());\n        self::assertSame('solid', $sheet->getCell('C2')->getStyle()->getFill()->getFillType());\n    }\n\n    public function testDefaultConditionalFill(): void\n    {\n        // default fill pattern for a conditional style where the filltype is not defined\n        $filename = 'tests/data/Reader/XLSX/pr2050cf-fill.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n\n        $style = $spreadsheet->getActiveSheet()->getConditionalStyles('A1')[0]->getStyle();\n        self::assertSame('', $style->getFill()->getFillType());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/DefaultFontTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefaultFontTest extends TestCase\n{\n    public function testDefaultConditionalFont(): void\n    {\n        // default fill pattern for a conditional style where the filltype is not defined\n        $filename = 'tests/data/Reader/XLSX/pr2050cf-fill.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n\n        $style = $spreadsheet->getActiveSheet()->getConditionalStyles('A1')[0]->getStyle();\n        self::assertSame('9C0006', $style->getFont()->getColor()->getRGB());\n        self::assertNull($style->getFont()->getName());\n        self::assertNull($style->getFont()->getSize());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/DirectorySeparatorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DirectorySeparatorTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDirectorySeparator')]\n    public function testDirectorySeparatorIdentify(string $fileName): void\n    {\n        $filename = \"tests/data/Reader/XLSX/{$fileName}\";\n        $reader = IOFactory::identify($filename);\n\n        self::assertSame('Xlsx', $reader);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDirectorySeparator')]\n    public function testDirectorySeparatorWorksheetNames(string $fileName): void\n    {\n        $filename = \"tests/data/Reader/XLSX/{$fileName}\";\n        $reader = new Xlsx();\n        $sheetList = $reader->listWorksheetNames($filename);\n\n        self::assertCount(1, $sheetList);\n        self::assertSame('Sheet', $sheetList[0]);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDirectorySeparator')]\n    public function testDirectorySeparatorWorksheetInfo(string $fileName): void\n    {\n        $filename = \"tests/data/Reader/XLSX/{$fileName}\";\n        $reader = new Xlsx();\n        $sheetData = $reader->listWorksheetInfo($filename);\n\n        self::assertCount(1, $sheetData);\n        self::assertSame('Sheet', $sheetData[0]['worksheetName']);\n        self::assertSame(3, (int) $sheetData[0]['totalRows']);\n        self::assertSame(21, (int) $sheetData[0]['totalColumns']);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDirectorySeparator')]\n    public function testDirectorySeparatorLoad(string $fileName): void\n    {\n        $filename = \"tests/data/Reader/XLSX/{$fileName}\";\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $cellValue = $spreadsheet->getActiveSheet()->getCell('A1')->getValue();\n\n        self::assertSame('Key ID', $cellValue);\n    }\n\n    public static function providerDirectorySeparator(): array\n    {\n        return [\n            ['Zip-Linux-Directory-Separator.xlsx'],\n            ['Zip-Windows-Directory-Separator.xlsx'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/DrawingInCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DrawingInCellTest extends TestCase\n{\n    public function testPictureInCell(): void\n    {\n        $file = 'tests/data/Reader/XLSX/drawing_in_cell.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($file);\n\n        $sheet = $spreadsheet->getSheet(0);\n        $drawings = $sheet->getInCellDrawingCollection();\n        self::assertCount(2, $drawings);\n\n        if ($drawings[0] === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertSame(IMAGETYPE_PNG, $drawings[0]->getType());\n            self::assertSame('B2', $drawings[0]->getCoordinates());\n            self::assertSame(0, $drawings[0]->getOffsetX());\n            self::assertSame(0, $drawings[0]->getOffsetY());\n            self::assertSame(296, $drawings[0]->getWidth());\n            self::assertSame(154, $drawings[0]->getHeight());\n            self::assertSame(296, $drawings[0]->getImageWidth());\n            self::assertSame(154, $drawings[0]->getImageHeight());\n        }\n\n        self::assertSame($drawings[0], $sheet->getCell('B2')->getValue());\n\n        $sheet = $spreadsheet->getSheet(1);\n        $drawings = $sheet->getInCellDrawingCollection();\n        self::assertCount(1, $drawings);\n\n        if ($drawings[0] === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertSame(IMAGETYPE_PNG, $drawings[0]->getType());\n            self::assertSame('D7', $drawings[0]->getCoordinates());\n            self::assertSame(0, $drawings[0]->getOffsetX());\n            self::assertSame(0, $drawings[0]->getOffsetY());\n            self::assertSame(413, $drawings[0]->getWidth());\n            self::assertSame(218, $drawings[0]->getHeight());\n            self::assertSame(413, $drawings[0]->getImageWidth());\n            self::assertSame(218, $drawings[0]->getImageHeight());\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/DrawingOneCellAnchorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DrawingOneCellAnchorTest extends TestCase\n{\n    public function testGetDrawing(): void\n    {\n        $filename = __DIR__ . '/../../../data/Reader/XLSX/drawingOneCellAnchor.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $collection = $worksheet->getDrawingCollection();\n        self::assertCount(1, $collection);\n\n        /** @var BaseDrawing $drawing */\n        $drawing = $collection[0];\n        self::assertEquals('A2', $drawing->getCoordinates());\n        self::assertEquals(10, $drawing->getOffsetX());\n        self::assertEquals(10, $drawing->getOffsetY());\n        self::assertEquals(150, $drawing->getHeight());\n        self::assertEquals(150, $drawing->getWidth());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/EmptyFileTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\n\nclass EmptyFileTest extends TestCase\n{\n    private string $tempfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->tempfile !== '') {\n            unlink($this->tempfile);\n            $this->tempfile = '';\n        }\n    }\n\n    public function testEmptyFileLoad(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $this->tempfile = $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        $reader = new Xlsx();\n        $reader->load($temp);\n    }\n\n    public function testEmptyFileNames(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $this->tempfile = $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        $reader = new Xlsx();\n        $reader->listWorksheetNames($temp);\n    }\n\n    public function testEmptyInfo(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $this->tempfile = $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        $reader = new Xlsx();\n        $reader->listWorksheetInfo($temp);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ExplicitDateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\n\nclass ExplicitDateTest extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/explicitdate.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            // confirm that file contains type \"d\" cells\n            self::assertStringContainsString('<c r=\"A3\" s=\"1\" t=\"d\"><v>2021-12-31T23:44:51.894</v></c>', $data);\n            self::assertStringContainsString('<c r=\"B3\" s=\"2\" t=\"d\"><v>2021-12-31</v></c>', $data);\n            self::assertStringContainsString('<c r=\"C3\" s=\"3\" t=\"d\"><v>23:44:51.894</v></c>', $data);\n        }\n    }\n\n    public static function testExplicitDate(): void\n    {\n        $spreadsheet = IOFactory::load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        // DateTime\n        $value = $sheet->getCell('A3')->getValue();\n        $formatted = $sheet->getCell('A3')->getFormattedValue();\n        self::assertEqualsWithDelta(44561.98948, $value, 0.00001);\n        self::assertSame('2021-12-31 23:44:52', $formatted);\n        // Date only\n        $value = $sheet->getCell('B3')->getValue();\n        $formatted = $sheet->getCell('B3')->getFormattedValue();\n        self::assertEquals(44561, $value);\n        self::assertSame('2021-12-31', $formatted);\n        // Time only\n        $value = $sheet->getCell('C3')->getValue();\n        $formatted = $sheet->getCell('C3')->getFormattedValue();\n        self::assertEqualsWithDelta(0.98948, $value, 0.00001);\n        self::assertSame('23:44:52', $formatted);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/GridlinesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass GridlinesTest extends AbstractFunctional\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('loadDataProvider')]\n    public function testGridlines(bool $display, bool $print): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('deliberatelyblank');\n        $sheet1->setShowGridlines($display);\n        $sheet1->setPrintGridlines($print);\n        $sheet1->fromArray(\n            [\n                [1, 2, 3],\n                [4, 5, 6],\n                [7, 8, 9],\n            ]\n        );\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet1 = $reloadedSpreadsheet->getSheet(0);\n        $rsheet2 = $reloadedSpreadsheet->getSheet(1);\n        self::assertSame($display, $rsheet1->getShowGridlines());\n        self::assertSame($print, $rsheet1->getPrintGridlines());\n        self::assertTrue($rsheet2->getShowGridlines());\n        self::assertFalse($rsheet2->getPrintGridlines());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function loadDataProvider(): array\n    {\n        return [\n            [true, true],\n            [true, false],\n            [false, true],\n            [false, false],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/GroupByLimitedTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass GroupByLimitedTest extends AbstractFunctional\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/excel-groupby-one.xlsx';\n\n    public function testRowBreaks(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(['t' => 'array', 'ref' => 'E3:F7'], $reloadedSheet->getCell('E3')->getFormulaAttributes());\n        $expected = [\n            ['Design', '$505,000 '],\n            ['Development', '$346,000 '],\n            ['Marketing', '$491,000 '],\n            ['Research', '$573,000 '],\n            ['Total', '$1,915,000 '],\n            [null, null],\n        ];\n        self::assertSame($expected, $reloadedSheet->rangeToArray('E3:F8'));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/HiddenMergeCellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HiddenMergeCellsTest extends TestCase\n{\n    private const FILENAME = 'tests/data/Reader/XLSX/HiddenMergeCellsTest.xlsx';\n\n    public function testHiddenMergeCells(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::FILENAME);\n        $c2InMergeRange = $spreadsheet->getActiveSheet()->getCell('C2')->isInMergeRange();\n        self::assertTrue($c2InMergeRange);\n        $a2InMergeRange = $spreadsheet->getActiveSheet()->getCell('A2')->isInMergeRange();\n        self::assertTrue($a2InMergeRange);\n        $a2MergeRangeValue = $spreadsheet->getActiveSheet()->getCell('A2')->isMergeRangeValueCell();\n        self::assertTrue($a2MergeRangeValue);\n\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2');\n        self::assertSame([['12', '4', '3']], $cellArray);\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2', null, true, false);\n        self::assertSame([[12, 4, 3]], $cellArray);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnmergeHiddenMergeCells(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::FILENAME);\n        $spreadsheet->getActiveSheet()->unmergeCells('A2:C2');\n\n        $c2InMergeRange = $spreadsheet->getActiveSheet()->getCell('C2')->isInMergeRange();\n        self::assertFalse($c2InMergeRange);\n        $a2InMergeRange = $spreadsheet->getActiveSheet()->getCell('A2')->isInMergeRange();\n        self::assertFalse($a2InMergeRange);\n\n        $cellArray = $spreadsheet->getActiveSheet()->rangeToArray('A2:C2', null, false, false, false);\n        self::assertSame([[12, '=6-B1', '=A2/B2']], $cellArray);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/HiddenWorksheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HiddenWorksheetTest extends TestCase\n{\n    public function testPageSetup(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/HiddenSheet.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        $assertions = $this->worksheetAssertions();\n\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                continue;\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $actualResult = $worksheet->getSheetState();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed asserting sheet state {$expectedResult} for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<array{sheetState: string}> */\n    private function worksheetAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'sheetState' => Worksheet::SHEETSTATE_VISIBLE,\n            ],\n            'Sheet2' => [\n                'sheetState' => Worksheet::SHEETSTATE_HIDDEN,\n            ],\n        ];\n    }\n\n    public function testListWorksheetInfo(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/visibility.xlsx';\n        $reader = new Xlsx();\n        $expected = [\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Sheet2',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'hidden',\n            ],\n            [\n                'worksheetName' => 'Sheet3',\n                'lastColumnLetter' => 'A',\n                'lastColumnIndex' => 0,\n                'totalRows' => 1,\n                'totalColumns' => 1,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Sheet4',\n                'lastColumnLetter' => 'B',\n                'lastColumnIndex' => 1,\n                'totalRows' => 1,\n                'totalColumns' => 2,\n                'sheetState' => 'veryHidden',\n            ],\n        ];\n        self::assertSame($expected, $reader->listWorksheetInfo($filename));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/HyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass HyperlinkTest extends AbstractFunctional\n{\n    public function testReadAndWriteHyperlinks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('Sheet One');\n        $sheet1->getCell('A1')->setValue(100);\n        $sheet1->getCell('B1')->setValue('this is b1');\n        $spreadsheet->addNamedRange(new NamedRange('namedb1', $sheet1, '$B$1'));\n        $sheet1->setCellValue('A2', 'link to same sheet');\n        $sheet1->getCell('A2')->getHyperlink()\n            ->setUrl(\"sheet://'Sheet One'!A1\");\n        $sheet1->getStyle('A2')->getFont()->setHyperlinkTheme();\n        $sheet1->setCellValue('A3', 'link to defined name');\n        $sheet1->getCell('A3')->getHyperlink()\n            ->setUrl('sheet://namedb1');\n        $sheet1->getStyle('A3')->getFont()->setHyperlinkTheme();\n\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Sheet Two');\n        $sheet2->setCellValue('A2', 'link to other sheet');\n        $sheet2->getCell('A2')->getHyperlink()\n            ->setUrl(\"sheet://'Sheet One'!A1\");\n        $sheet2->getStyle('A2')->getFont()->setHyperlinkTheme();\n        $sheet2->setCellValue('A3', 'external link');\n        $sheet2->getCell('A3')->getHyperlink()\n            ->setUrl('https://www.example.com');\n        $sheet2->getStyle('A3')->getFont()->setHyperlinkTheme();\n        $sheet2->setCellValue('A4', 'external link with anchor');\n        $sheet2->getCell('A4')->getHyperlink()\n            ->setUrl('https://www.example.com#anchor');\n        $sheet2->getCell('A4')->getHyperlink()->setTooltip('go to anchor tag on example.com');\n        $sheet2->getStyle('A4')->getFont()->setHyperlinkTheme();\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet1 = $reloadedSpreadsheet->getSheet(0);\n        self::assertSame('link to same sheet', $rsheet1->getCell('A2')->getValue());\n        self::assertSame(\"sheet://'Sheet One'!A1\", $rsheet1->getCell('A2')->getHyperlink()->getUrl());\n\n        self::assertSame('link to defined name', $rsheet1->getCell('A3')->getValue());\n        self::assertSame('sheet://namedb1', $rsheet1->getCell('A3')->getHyperlink()->getUrl());\n\n        $rsheet2 = $reloadedSpreadsheet->getSheet(1);\n        self::assertSame('link to other sheet', $rsheet2->getCell('A2')->getValue());\n        self::assertSame(\"sheet://'Sheet One'!A1\", $rsheet2->getCell('A2')->getHyperlink()->getUrl());\n         self::assertSame(\n             'FF0000FF',\n             $rsheet2\n                 ->getStyle('A2')\n                 ->getFont()->getColor()->getARGB(),\n             'argb is set in addition to theme'\n         );\n\n        self::assertSame('external link', $rsheet2->getCell('A3')->getValue());\n        self::assertSame('https://www.example.com', $rsheet2->getCell('A3')->getHyperlink()->getUrl());\n\n        self::assertSame('https://www.example.com#anchor', $rsheet2->getCell('A4')->getHyperlink()->getUrl());\n        self::assertSame('external link with anchor', $rsheet2->getCell('A4')->getValue());\n        self::assertSame('go to anchor tag on example.com', $rsheet2->getCell('A4')->getHyperlink()->getToolTip());\n\n        $testCells = [\n            [0, 'A2'],\n            [0, 'A3'],\n            [0, 'A2'],\n            [1, 'A3'],\n            [1, 'A4'],\n        ];\n        foreach ($testCells as $sheetAndCell) {\n            [$sheetIndex, $cell] = $sheetAndCell;\n            $rsheet = $reloadedSpreadsheet->getSheet($sheetIndex);\n            self::assertSame(\n                10,\n                $rsheet->getStyle($cell)\n                    ->getFont()->getColor()->getTheme(),\n                \"theme sheet $sheetIndex cell $cell\"\n            );\n            self::assertSame(\n                'single',\n                $rsheet->getStyle('A2')->getFont()->getUnderline(),\n                \"underline sheet $sheetIndex cell $cell\"\n            );\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testDisplay(): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('A1 text');\n        $hy1 = $sheet->getCell('A1')->getHyperlink();\n        $hy1->setUrl('http://www.example.com');\n        $hy1->setTooltip('Go to example.com');\n\n        $sheet->getCell('A2')->setValue('A2 text');\n        $hy2 = $sheet->getCell('A2')->getHyperlink();\n        $hy2->setUrl('http://www.example.org');\n        $hy2->setTooltip('Go to example.org');\n        $hy2->setDisplay('A2 display');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n\n        self::assertSame('A1 text', $rsheet->getCell('A1')->getValue());\n        $rhy1 = $rsheet->getCell('A1')->getHyperlink();\n        self::assertSame('http://www.example.com', $rhy1->getUrl());\n        self::assertSame('Go to example.com', $rhy1->getTooltip());\n        self::assertSame('Go to example.com', $rhy1->getDisplay(), 'display is set to tooltip if unset');\n\n        self::assertSame('A2 text', $rsheet->getCell('A2')->getValue());\n        $rhy2 = $rsheet->getCell('A2')->getHyperlink();\n        self::assertSame('http://www.example.org', $rhy2->getUrl());\n        self::assertSame('Go to example.org', $rhy2->getTooltip());\n        self::assertSame('A2 display', $rhy2->getDisplay(), 'display is explicitly set');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/IgnoredErrorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass IgnoredErrorTest extends AbstractFunctional\n{\n    private const FILENAME = 'tests/data/Reader/XLSX/ignoreerror.xlsx';\n\n    public function testIgnoredError(): void\n    {\n        $reader = new Xlsx();\n        $originalSpreadsheet = $reader->load(self::FILENAME);\n        $spreadsheet = $this->writeAndReload($originalSpreadsheet, 'Xlsx');\n        $originalSpreadsheet->disconnectWorksheets();\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertFalse($sheet->getCell('A1')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertTrue($sheet->getCell('A2')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertFalse($sheet->getCell('A3')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertTrue($sheet->getCell('A4')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertFalse($sheet->getCell('H2')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertTrue($sheet->getCell('H3')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertFalse($sheet->getCell('I2')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertTrue($sheet->getCell('I3')->getIgnoredErrors()->getNumberStoredAsText());\n\n        self::assertFalse($sheet->getCell('H3')->getIgnoredErrors()->getFormula());\n        self::assertFalse($sheet->getCell('D2')->getIgnoredErrors()->getFormula());\n        self::assertTrue($sheet->getCell('D3')->getIgnoredErrors()->getFormula());\n\n        self::assertFalse($sheet->getCell('A11')->getIgnoredErrors()->getTwoDigitTextYear());\n        self::assertTrue($sheet->getCell('A12')->getIgnoredErrors()->getTwoDigitTextYear());\n\n        self::assertFalse($sheet->getCell('C12')->getIgnoredErrors()->getEvalError());\n        self::assertTrue($sheet->getCell('C11')->getIgnoredErrors()->getEvalError());\n        self::assertFalse($sheet->getCell('E14')->getIgnoredErrors()->getFormulaRange());\n        self::assertTrue($sheet->getCell('F14')->getIgnoredErrors()->getFormulaRange());\n\n        $sheetLast = $spreadsheet->getSheetByNameOrThrow('Last');\n        self::assertFalse($sheetLast->getCell('D2')->getIgnoredErrors()->getFormula());\n        self::assertFalse($sheetLast->getCell('D3')->getIgnoredErrors()->getFormula(), 'prior sheet ignoredErrors shouldn\\'t bleed');\n        self::assertFalse($sheetLast->getCell('A1')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertFalse($sheetLast->getCell('A2')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertTrue($sheetLast->getCell('A3')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertFalse($sheetLast->getCell('A4')->getIgnoredErrors()->getNumberStoredAsText(), 'prior sheet numberStoredAsText shouldn\\'t bleed');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetIgnoredError(): void\n    {\n        $originalSpreadsheet = new Spreadsheet();\n        $originalSheet = $originalSpreadsheet->getActiveSheet();\n        $originalSheet->getCell('A1')->setValueExplicit('0', DataType::TYPE_STRING);\n        $originalSheet->getCell('A2')->setValueExplicit('1', DataType::TYPE_STRING);\n        $originalSheet->getStyle('A1:A2')->setQuotePrefix(true);\n        $originalSheet->getCell('A2')->getIgnoredErrors()->setNumberStoredAsText(true);\n        $spreadsheet = $this->writeAndReload($originalSpreadsheet, 'Xlsx');\n        $originalSpreadsheet->disconnectWorksheets();\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('0', $sheet->getCell('A1')->getValue());\n        self::assertSame('1', $sheet->getCell('A2')->getValue());\n        self::assertFalse($sheet->getCell('A1')->getIgnoredErrors()->getNumberStoredAsText());\n        self::assertTrue($sheet->getCell('A2')->getIgnoredErrors()->getNumberStoredAsText());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/InvalidFileTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass InvalidFileTest extends TestCase\n{\n    public function testInvalidFileLoad(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = __FILE__;\n        $reader = new Xlsx();\n        $reader->load($temp);\n    }\n\n    public function testInvalidFileNames(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = __FILE__;\n        $reader = new Xlsx();\n        $reader->listWorksheetNames($temp);\n    }\n\n    public function testInvalidInfo(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = __FILE__;\n        $reader = new Xlsx();\n        $reader->listWorksheetInfo($temp);\n    }\n\n    public function testOdsFileLoad(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = 'samples/templates/OOCalcTest.ods';\n        $reader = new Xlsx();\n        $reader->load($temp);\n    }\n\n    public function testOdsFileNames(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = 'samples/templates/OOCalcTest.ods';\n        $reader = new Xlsx();\n        $reader->listWorksheetNames($temp);\n    }\n\n    public function testOdsInfo(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        $temp = 'samples/templates/OOCalcTest.ods';\n        $reader = new Xlsx();\n        $reader->listWorksheetInfo($temp);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue1482Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue1482Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.1482.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/sheet.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<x:drawing r:id=\"rId1\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" />', $data);\n        }\n    }\n\n    public function testLoadXlsx(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(0);\n        $expectedColWidths = [\n            0.95,\n            7.45,\n            0.6,\n            4.4,\n            5.91,\n            3.92,\n            7.71,\n            2.12,\n            2.56,\n            6.94,\n            9.6,\n            1.82,\n            3.01,\n            8.63,\n            10.37,\n            2.09,\n        ];\n        $columnDimensions = $sheet->getColumnDimensions();\n        $actualColWidths = [];\n        foreach ($columnDimensions as $columnDimension) {\n            $actualColWidths[] = $columnDimension->getWidth();\n        }\n        self::assertSame($expectedColWidths, $actualColWidths);\n        $expectedRowHeights = [\n            14.0,\n            7.0,\n            14.0,\n            80.0,\n            234.0,\n            63.0,\n            13.0,\n            19.0,\n            18.0,\n            18.0,\n            18.0,\n            18.0,\n            18.0,\n            18.0,\n            18.0,\n            18.0,\n        ];\n        $rowHeights = $sheet->getRowDimensions();\n        $actualRowHeights = [];\n        foreach ($rowHeights as $rowDimension) {\n            $actualRowHeights[] = $rowDimension->getRowHeight();\n        }\n        self::assertSame($expectedRowHeights, $actualRowHeights);\n        $expectedMergeCells = [\n            'B1:E1',\n            'F1:G1',\n            'J1:L1',\n            'M1:N1',\n            'B3:E3',\n            'F3:G3',\n            'B5:O5',\n            'A7:C7',\n            'D7:M7',\n            'A8:B8',\n            'C8:D8',\n            'E8:F8',\n            'G8:H8',\n            'I8:J8',\n            'L8:P8',\n            'A9:B9',\n            'C9:D9',\n            'E9:F9',\n            'G9:H9',\n            'I9:J9',\n            'L9:P9',\n            'A10:B10',\n            'C10:D10',\n            'E10:F10',\n            'G10:H10',\n            'I10:J10',\n            'L10:P10',\n            'A11:B11',\n            'C11:D11',\n            'E11:F11',\n            'G11:H11',\n            'I11:J11',\n            'L11:P11',\n            'A12:B12',\n            'C12:D12',\n            'E12:F12',\n            'G12:H12',\n            'I12:J12',\n            'L12:P12',\n            'A13:B13',\n            'C13:D13',\n            'E13:F13',\n            'G13:H13',\n            'I13:J13',\n            'L13:P13',\n            'A14:B14',\n            'C14:D14',\n            'E14:F14',\n            'G14:H14',\n            'I14:J14',\n            'L14:P14',\n            'A15:B15',\n            'C15:D15',\n            'E15:F15',\n            'G15:H15',\n            'I15:J15',\n            'L15:P15',\n            'A16:B16',\n            'C16:D16',\n            'E16:F16',\n            'G16:H16',\n            'I16:J16',\n            'L16:P16',\n        ];\n        self::assertSame($expectedMergeCells, array_keys($sheet->getMergeCells()));\n\n        $drawingCollection = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawingCollection);\n        $drawing = $drawingCollection[0];\n        if ($drawing === null) {\n            self::fail('Unexpected null instead of drawing');\n        } else {\n            self::assertSame('B5', $drawing->getCoordinates());\n            self::assertSame('', $drawing->getCoordinates2());\n            self::assertFalse($drawing->getResizeProportional());\n            self::assertSame(600, $drawing->getWidth());\n            self::assertSame(312, $drawing->getHeight());\n        }\n        // no name, no description, no type\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue1637Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue1637Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.1637.xlsx';\n\n    public function testXludf(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(\n            '=IFERROR(__xludf.DUMMYFUNCTION(\"flatten(A1:A5, B1:B5)\"),1.0)',\n            $sheet->getCell('C1')->getValue()\n        );\n        self::assertSame(1.0, $sheet->getCell('C1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2301Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\n\nclass Issue2301Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2301.xlsx';\n\n    public static function testReadRichText(): void\n    {\n        $spreadsheet = IOFactory::load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        $value = $sheet->getCell('B45')->getValue();\n        self::assertInstanceOf(RichText::class, $value);\n        $richtext = $value->getRichTextElements();\n        $font = $richtext[1]->getFont();\n        self::assertNotNull($font);\n        self::assertSame('Arial CE', $font->getName());\n        self::assertSame(9.0, $font->getSize());\n        self::assertSame('protected', $sheet->getCell('BT10')->getStyle()->getProtection()->getHidden());\n        $spreadsheet->disconnectWorksheets();\n        unset($spreadsheet);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2331Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2331Test extends TestCase\n{\n    public function testIssue2331(): void\n    {\n        // Leading space instead of 0 in month and/or day of timestamp.\n        $filename = 'tests/data/Reader/XLSX/issue.2331c.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $properties = $spreadsheet->getProperties();\n        $created = (string) $properties->getCreated();\n        $modified = (string) $properties->getModified();\n\n        self::assertEquals('2021-08-02', Date::formattedDateTimeFromTimestamp($created, 'Y-m-d', new DateTimeZone('UTC')));\n        self::assertEquals('2021-09-03', Date::formattedDateTimeFromTimestamp($modified, 'Y-m-d', new DateTimeZone('UTC')));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2362Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass Issue2362Test extends TestCase\n{\n    public function testPreliminaries(): void\n    {\n        // ZipArchive says file is 'inconsistent',\n        // but Excel has no problem with it.\n        $filename = 'tests/data/Reader/XLSX/issue.2362.xlsx';\n        $zip = new ZipArchive();\n        $res = $zip->open($filename, ZipArchive::CHECKCONS);\n        self::assertSame(ZipArchive::ER_INCONS, $res);\n    }\n\n    public function testIssue2362(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.2362.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $value = $sheet->getCell('A1')->getValue();\n        if ($value instanceof RichText) {\n            self::assertSame('Дата', (string) $value);\n        } else {\n            self::fail('A1 is not RichText');\n        }\n        $value = $sheet->getCell('D21')->getValue();\n        if ($value instanceof RichText) {\n            self::assertSame('391800, Рязанская область, г. Скопин, ул. Ленина, д. 40', (string) $value);\n        } else {\n            self::fail('D21 is not RichText');\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2387Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2387Test extends TestCase\n{\n    public function testIssue2387(): void\n    {\n        // Theme was not being handled.\n        $filename = 'tests/data/Reader/XLSX/issue.2387.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        // Font color being tested uses theme color with tint.\n        // Excel shows final color as 305496.\n        $expectedColor = '305496';\n        $calculatedColor = $sheet->getCell('B2')->getStyle()->getFont()->getColor()->getRgb();\n        self::assertSame($expectedColor, RgbTintTest::compareColors($calculatedColor, $expectedColor));\n        self::assertSame(Fill::FILL_NONE, $sheet->getCell('B2')->getStyle()->getFill()->getFillType());\n        self::assertSame('FFFFFF', $sheet->getCell('C2')->getStyle()->getFont()->getColor()->getRgb());\n        self::assertSame('000000', $sheet->getCell('C2')->getStyle()->getFill()->getStartColor()->getRgb());\n        self::assertSame(Fill::FILL_SOLID, $sheet->getCell('C2')->getStyle()->getFill()->getFillType());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2450Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2450Test extends TestCase\n{\n    public function testIssue2450(): void\n    {\n        // Style specified as GENERAL rather than General.\n        $filename = 'tests/data/Reader/XLSX/issue.2450.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $birthYears = [\n            'C2' => $sheet->getCell('C2')->getFormattedValue(),\n            'C3' => $sheet->getCell('C3')->getFormattedValue(),\n            'C4' => $sheet->getCell('C4')->getFormattedValue(),\n        ];\n        self::assertSame(\n            [\n                'C2' => '1932',\n                'C3' => '1964',\n                'C4' => '1988',\n            ],\n            $birthYears\n        );\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2488Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2488Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2488.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c r=\"E1\" t=\"n\" />', $data);\n            self::assertStringContainsString('<c r=\"E2\" t=\"s\" />', $data);\n            self::assertStringContainsString('<c r=\"D3\" t=\"b\" />', $data);\n        }\n    }\n\n    public function testIssue2488(): void\n    {\n        // Cell explicitly typed as numeric but without value.\n        $filename = self::$testbook;\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        // E1 and D3 are numeric/boolean without value.\n        // So is E2, but I don't see a practical difference\n        //    between null string and null in that case.\n        $expected = [\n            ['1', '2', '3', '0', null, '-1', '-2', '-3'],\n            ['a', 'b', 'c', 'xxx', '', 'd', 'e', 'f'],\n            ['FALSE', 'FALSE', 'FALSE', null, 'TRUE', 'TRUE', 'TRUE', 'TRUE'],\n        ];\n        self::assertSame($expected, $sheet->toArray());\n        $expected = [\n            ['1', '2', '3', '0', '', '-1', '-2', '-3'],\n            ['a', 'b', 'c', 'xxx', '', 'd', 'e', 'f'],\n            ['FALSE', 'FALSE', 'FALSE', '', 'TRUE', 'TRUE', 'TRUE', 'TRUE'],\n        ];\n        self::assertSame($expected, $sheet->toArray(''));\n        $expected = [\n            [1, 2, 3, 0, null, -1, -2, -3],\n            ['a', 'b', 'c', 'xxx', '', 'd', 'e', 'f'],\n            [false, false, false, null, true, true, true, true],\n        ];\n        self::assertSame($expected, $sheet->toArray(null, true, false));\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2490Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2490Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2490.xlsx';\n\n    private static string $testbook3093 = 'tests/data/Reader/XLSX/issue.3093.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/styles.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected color index tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<colors><indexedColors><rgbColor rgb=\"00000000\"/>', $data);\n            self::assertSame(64, substr_count($data, '<rgbColor'));\n        }\n    }\n\n    public function testIssue2490(): void\n    {\n        // Spreadsheet with its own color palette.\n        $filename = self::$testbook;\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('00FFFFFF', $sheet->getCell('A3')->getStyle()->getFill()->getStartColor()->getArgb());\n        self::assertSame('00F0FBFF', $sheet->getCell('A1')->getStyle()->getFill()->getStartColor()->getArgb());\n        self::assertSame('00F0F0F0', $sheet->getCell('B1')->getStyle()->getFill()->getStartColor()->getArgb());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testPreliminaries3093(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook3093;\n        $file .= '#xl/styles.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected color index tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<colors><indexedColors><rgbColor rgb=\"ff000000\"/>', $data);\n            self::assertSame(15, substr_count($data, '<rgbColor'));\n        }\n    }\n\n    public function testIssue3093(): void\n    {\n        // Same as above, except with fewer than 64 entries.\n        // (And with colors in lowercase hex and alpha set to ff.)\n        $filename = self::$testbook3093;\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('ffc0c0c0', $sheet->getCell('B2')->getStyle()->getFill()->getStartColor()->getArgb());\n        self::assertSame('ffffff00', $sheet->getCell('D2')->getStyle()->getFill()->getStartColor()->getArgb());\n        self::assertSame('ffdfa7a6', $sheet->getCell('F2')->getStyle()->getFill()->getStartColor()->getArgb());\n        self::assertSame('ff7ba0cd', $sheet->getCell('H2')->getStyle()->getFill()->getStartColor()->getArgb());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2494Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2494Test extends TestCase\n{\n    public function testIssue2494(): void\n    {\n        // Fill style incorrect.\n        $filename = 'tests/data/Reader/XLSX/issue.2494.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertTrue($sheet->getCell('C3')->getStyle()->getFont()->getBold());\n        self::assertSame('FFBFBFBF', $sheet->getCell('D8')->getStyle()->getFill()->getStartColor()->getArgb());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2501Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2501Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2501.b.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected merge ranges\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<mergeCells count=\"3\"><mergeCell ref=\"A:A\"/><mergeCell ref=\"B:D\"/><mergeCell ref=\"E2:E4\"/></mergeCells>', $data);\n        }\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/sheet2.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected merged ranges\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<mergeCells count=\"3\"><mergeCell ref=\"1:1\"/><mergeCell ref=\"2:4\"/><mergeCell ref=\"B5:D5\"/></mergeCells>', $data);\n        }\n    }\n\n    public function testIssue2501(): void\n    {\n        // Merged cell range specified as 1:1\"\n        $filename = self::$testbook;\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Columns');\n        $expected = [\n            'A1:A1048576',\n            'B1:D1048576',\n            'E2:E4',\n        ];\n        self::assertSame($expected, array_values($sheet->getMergeCells()));\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Rows');\n        $expected = [\n            'A1:XFD1',\n            'A2:XFD4',\n            'B5:D5',\n        ];\n        self::assertSame($expected, array_values($sheet->getMergeCells()));\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2516Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2516Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2516b.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#docProps/thumbnail.wmf';\n        $data = file_get_contents($file);\n\n        // confirm that file exists\n        self::assertNotFalse($data, 'thumbnail.wmf not exists');\n\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#_rels/.rels';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file .rels');\n        } else {\n            self::assertStringContainsString('Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail\" Target=\"docProps/thumbnail.wmf\"', $data);\n        }\n    }\n\n    public function testIssue2516a(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $names = $reader->listWorksheetNames($filename);\n        $expected = ['Sheet1'];\n        self::assertSame($expected, $names);\n    }\n\n    public function testIssue2516b(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $infos = $reader->listWorksheetInfo($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'B',\n                'lastColumnIndex' => 1,\n                'totalRows' => 6,\n                'totalColumns' => 2,\n                'sheetState' => 'visible',\n            ],\n        ];\n        self::assertSame($expected, $infos);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2542Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2542Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2542.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        // Rich text without 'sz' tag\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/sharedStrings.xml';\n        $data = file_get_contents($file);\n\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file sharedStrings.xml');\n        } else {\n            self::assertStringContainsString('<si><r><rPr><rFont val=\"Arial\"/><b/><color theme=\"1\"/></rPr><t xml:space=\"preserve\">Factor group\n</t></r><r><rPr><rFont val=\"Arial\"/><b val=\"0\"/><color theme=\"1\"/></rPr><t>(for Rental items only)</t></r></si>', $data);\n        }\n    }\n\n    public function testIssue2542(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $value = $sheet->getCell('P1')->getValue();\n        if ($value instanceof RichText) {\n            self::assertSame(\"Factor group\\n(for Rental items only)\", $value->getPlainText());\n        } else {\n            self::fail('Cell P1 is not RichText');\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2581Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2581Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2581.xlsx';\n\n    public function testIssue2581(): void\n    {\n        // CELL function (unimplemented) embedded in another function\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('=CONCATENATE(\"Prefix \",MID(CELL(\"filename\"),FIND(\"]\",CELL(\"filename\"))+1,255), \" Suffix\")', $sheet->getCell('B1')->getValue());\n        self::assertSame('Prefix SomeName Suffix', $sheet->getCell('B1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2778Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2778Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2778.xlsx';\n\n    public function testIssue2778(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(6, $sheet->getCell('D1')->getCalculatedValue());\n        self::assertSame(63, $sheet->getCell('F1')->getCalculatedValue());\n        self::assertSame(10, $sheet->getCell('C10')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2885Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2885Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.2885.xlsx';\n\n    public function testIssue2885(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('[$-809]0%', $sheet->getStyle('A1')->getNumberFormat()->getFormatCode());\n\n        $finishColumns = $sheet->getHighestColumn();\n        $rowsCount = $sheet->getHighestRow();\n        $rows = $sheet->rangeToArray(\"A1:{$finishColumns}{$rowsCount}\");\n        self::assertSame('8%', $rows[0][0]);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3126Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3126Test extends TestCase\n{\n    public function testReloadXlsxWorkbookProperties(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.3126.xlsx';\n        $reader = new XlsxReader();\n        $generation1 = $reader->load($filename);\n        $gen1sheet = $generation1->getActiveSheet();\n        $gen1hf = $gen1sheet->getHeaderFooter();\n        $gen1Images = $gen1hf->getImages();\n        self::assertCount(1, $gen1Images);\n        $gen1hfName = array_key_exists('LF', $gen1Images) ? $gen1Images['LF']->getName() : '';\n        self::assertSame('fleche-verte-up-right', $gen1hfName);\n        /** @var mixed[][][][][] */\n        $unparsedLoadedData = $generation1->getUnparsedLoadedData();\n        /** @var string */\n        $pageSetupRel = $unparsedLoadedData['sheets']['Worksheet']['pageSetupRelId'] ?? '';\n        self::assertSame('rId1ps', $pageSetupRel);\n        $pageSetupPath = $unparsedLoadedData['sheets']['Worksheet']['printerSettings'][substr($pageSetupRel, 3)]['filePath'] ?? '';\n        self::assertSame('xl/printerSettings/printerSettings1.bin', $pageSetupPath);\n\n        $generation2Name = File::temporaryFilename();\n        $writer = new XlsxWriter($generation1);\n        $writer->save($generation2Name);\n        $generation1->disconnectWorksheets();\n        $reader2 = new XlsxReader();\n        $generation2 = $reader2->load($generation2Name);\n        $gen2sheet = $generation2->getActiveSheet();\n        $gen2hf = $gen2sheet->getHeaderFooter();\n        $gen2Images = $gen2hf->getImages();\n        self::assertCount(1, $gen2Images);\n        $gen2hfName = array_key_exists('LF', $gen2Images) ? $gen2Images['LF']->getName() : '';\n        self::assertSame('fleche-verte-up-right', $gen2hfName);\n        /** @var mixed[][][][][] */\n        $unparsedLoadedData = $generation2->getUnparsedLoadedData();\n        /** @var string */\n        $pageSetupRel = $unparsedLoadedData['sheets']['Worksheet']['pageSetupRelId'] ?? '';\n        self::assertSame('rId1ps', $pageSetupRel);\n        $pageSetupPath = $unparsedLoadedData['sheets']['Worksheet']['printerSettings'][substr($pageSetupRel, 3)]['filePath'] ?? '';\n        self::assertSame('xl/printerSettings/printerSettings1.bin', $pageSetupPath);\n\n        $generation3Name = File::temporaryFilename();\n        $writer = new XlsxWriter($generation2);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $writer->save($generation3Name);\n        $generation2->disconnectWorksheets();\n        $reader3 = new XlsxReader();\n        $generation3 = $reader3->load($generation3Name);\n        $gen3sheet = $generation3->getActiveSheet();\n        $gen3hf = $gen3sheet->getHeaderFooter();\n        $gen3Images = $gen3hf->getImages();\n        self::assertCount(1, $gen3Images);\n        $gen3hfName = array_key_exists('LF', $gen3Images) ? $gen3Images['LF']->getName() : '';\n        self::assertSame('fleche-verte-up-right', $gen3hfName);\n        /** @var mixed[][][][][] */\n        $unparsedLoadedData = $generation3->getUnparsedLoadedData();\n        /** @var string */\n        $pageSetupRel = $unparsedLoadedData['sheets']['Worksheet']['pageSetupRelId'] ?? '';\n        self::assertSame('rId1ps', $pageSetupRel);\n        $pageSetupPath = $unparsedLoadedData['sheets']['Worksheet']['printerSettings'][substr($pageSetupRel, 3)]['filePath'] ?? '';\n        self::assertSame('xl/printerSettings/printerSettings1.bin', $pageSetupPath);\n\n        unlink($generation2Name);\n        unlink($generation3Name);\n        $generation3->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3145Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3145Test extends TestCase\n{\n    public function testIssue3145(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.3145.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n\n        self::assertEquals('Headline A', $sheet->getCell('A1')->getValue());\n        self::assertEquals('Configdential B', $sheet->getCell('A2')->getValue());\n        self::assertSame('OFFSET(INDIRECT(SUBSTITUTE($A2,\" \",\"\")),0,0,COUNTA(INDIRECT(SUBSTITUTE($A2,\" \",\"\")&\"Col\")),1)', $sheet->getCell('B2')->getDataValidation()->getFormula1());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3277Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3277Test extends TestCase\n{\n    public function testIssue3227(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.3277.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n\n        $array = $spreadsheet->getActiveSheet()->toArray();\n\n        self::assertSame('data', $array[0][0]);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3435Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue3435Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3435.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/styles.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            $expected = <<<EOF\n                <xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>\n                <xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\" quotePrefix=\"1\"/>\n                <xf numFmtId=\"0\" fontId=\"1\" fillId=\"2\" borderId=\"1\" xfId=\"0\" quotePrefix=\"0\" applyFont=\"1\" applyFill=\"1\" applyBorder=\"1\"/>\n                EOF;\n            self::assertStringContainsString($expected, $data);\n        }\n    }\n\n    public function testQuotePrefix(): void\n    {\n        // Parsing of quotePrefix=\"0\" was incorrect, now corrected.\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertTrue($sheet->getStyle('A1')->getQuotePrefix());\n        self::assertFalse($sheet->getStyle('A2')->getQuotePrefix());\n        self::assertFalse($sheet->getStyle('A3')->getQuotePrefix());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3464Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\n\nclass Issue3464Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3464.xlsx';\n\n    public function testReadFontColor(): void\n    {\n        $inputFileType = IOFactory::identify(self::$testbook);\n        $objReader = IOFactory::createReader($inputFileType);\n        $objReader->setReadEmptyCells(false);\n\n        $spreadsheet = $objReader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        $rickText = $sheet->getCell([1, 1])->getValue();\n        self::assertInstanceOf(RichText::class, $rickText);\n\n        $elements = $rickText->getRichTextElements();\n        self::assertCount(2, $elements);\n\n        self::assertEquals(\"产品介绍\\n\", $elements[0]->getText());\n        $font = $elements[0]->getFont();\n        self::assertNotNull($font);\n        self::assertEquals('7f7f7f', $font->getColor()->getRGB());\n\n        self::assertEquals('(这是一行示例数据，在导入时需要删除该行)', $elements[1]->getText());\n        $font = $elements[1]->getFont();\n        self::assertNotNull($font);\n        self::assertEquals('ff2600', $font->getColor()->getRGB());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3495Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue3495Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3495d.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file2 = $file;\n        $file .= '#xl/styles.xml';\n        $file2 .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            // default style plus one other style\n            self::assertStringContainsString(\n                '<cellXfs count=\"2\">'\n                . '<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>'\n                . '<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\" quotePrefix=\"1\"/>',\n                $data\n            );\n        }\n        $data = file_get_contents($file2);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            // cells B1, C1, D1 all nominally use quotePrefix s=\"1\"\n            self::assertStringContainsString('<c r=\"B1\" s=\"1\">', $data);\n            self::assertStringContainsString('<c r=\"C1\" s=\"1\" t=\"s\">', $data);\n            self::assertStringContainsString('<c r=\"D1\" s=\"1\" t=\"s\">', $data);\n        }\n    }\n\n    public function testFormulaDespiteQuotePrefix(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('=2+3', $sheet->getCell('B1')->getValue());\n        self::assertSame('=1+2', $sheet->getCell('C1')->getValue());\n        self::assertSame('3', $sheet->getCell('D1')->getValue());\n        self::assertSame(5, $sheet->getCell('B1')->getCalculatedValue());\n        self::assertSame('=1+2', $sheet->getCell('C1')->getCalculatedValue());\n        self::assertSame('3', $sheet->getCell('D1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3534Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\n\nclass Issue3534Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3534.xlsx';\n\n    public function testReadColumnStyles(): void\n    {\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n\n        self::assertSame(['B4', 'C4'], $sheet->getCellCollection()->getCoordinates(), 'explicitly defined despite no value because differ from row style');\n        self::assertSame(1, $sheet->getColumnDimension('A')->getXfIndex());\n        self::assertNull($sheet->getRowDimension(1)->getXfIndex());\n\n        $sheet->getCell('A1')->setValue('a1');\n        self::assertSame(['B4', 'C4', 'A1'], $sheet->getCellCollection()->getCoordinates());\n        self::assertSame(1, $sheet->getCell('A1')->getXfIndex(), 'no row style so apply column style');\n\n        $sheet->getCell('A4')->setValue('a4');\n        $sheet->getCell('C1')->setValue('c1');\n        self::assertSame('ED7D31', $sheet->getStyle('A1')->getFill()->getStartColor()->getRgb(), 'no row style so apply column style');\n        self::assertSame('FFC000', $sheet->getStyle('A4')->getFill()->getStartColor()->getRgb(), 'style for row is applied');\n        self::assertSame('9DC3E6', $sheet->getStyle('C1')->getFill()->getStartColor()->getRgb(), 'no row style so apply column style');\n        self::assertSame('9DC3E6', $sheet->getStyle('C4')->getFill()->getStartColor()->getRgb(), 'style was already set in xml');\n        self::assertSame(Fill::FILL_NONE, $sheet->getStyle('B4')->getFill()->getFillType(), 'style implicitly default in xml');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3552Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue3552Test extends AbstractFunctional\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3552.xlsx';\n\n    public function testRowBreaks(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(['A92', 'A184', 'A276', 'A368', 'A417', 'A511', 'A554'], array_keys($sheet->getRowBreaks()));\n        $sheet->insertNewRowBefore(397, 1);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(['A92', 'A184', 'A276', 'A368', 'A418', 'A512', 'A555'], array_keys($reloadedSheet->getRowBreaks()));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testColumnBreaks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setBreak('Z1', Worksheet::BREAK_COLUMN);\n        $sheet->setBreak('H1', Worksheet::BREAK_COLUMN);\n        $sheet->setBreak('P1', Worksheet::BREAK_COLUMN);\n        self::assertSame(['H1', 'P1', 'Z1'], array_keys($sheet->getColumnBreaks()));\n        $sheet->insertNewColumnBefore('N', 2);\n        self::assertSame(['H1', 'R1', 'AB1'], array_keys($sheet->getColumnBreaks()));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3553Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue3553Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3553.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#_rels/.rels';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<Relationship Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"/xl/workbook.xml\" Id=\"rId2\" />', $data, 'Unexpected leading slash in Target attribute');\n        }\n    }\n\n    public function testIssue3553(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('https://microsoft.com/', $sheet->getCell('B2')->getHyperlink()->getUrl());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3613Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue3613Test extends AbstractFunctional\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3613.xlsx';\n\n    // Partial fix only. We will no longer throw exception on save.\n    // But calculation for cell value is 0, which is incorrect.\n    public function testIssue3613(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('=ROUND(MAX((O4-P4)*{0.03;0.1;0.2;0.25;0.3;0.35;0.45}-{0;2520;16920;31920;52920;85920;181920},0)-Q4,2)', $sheet->getCell('N4')->getValue());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3665Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue3665Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3665.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/tables/table1.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read table file');\n        } else {\n            self::assertStringContainsString('<x:table id=\"5\" name=\"Table5\" displayName=\"Table5\" ref=\"A3:M4\" tableType=\"xml\" totalsRowShown=\"0\" xmlns:x=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">', $data);\n            self::assertStringContainsString('<x:autoFilter ref=\"A3:M4\" />', $data);\n        }\n\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/_rels/sheet1.xml.rels';\n        $data = file_get_contents($file);\n        // confirm absolute path as reference\n        if ($data === false) {\n            self::fail('Unable to read rels file');\n        } else {\n            self::assertStringContainsString('Target=\"/xl/comments1.xml\"', $data);\n        }\n    }\n\n    public function testTable(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        $tables = $sheet->getTableCollection();\n        self::assertCount(1, $tables);\n        $table = $tables->offsetGet(0);\n        if ($table === null) {\n            self::fail('Unexpected failure obtaining table');\n        } else {\n            self::assertEquals('Table5', $table->getName());\n            self::assertEquals('A3:M4', $table->getRange());\n            self::assertTrue($table->getAllowFilter());\n            self::assertSame('A3:M4', $table->getAutoFilter()->getRange());\n        }\n        $comment = $sheet->getComment('A3');\n        self::assertSame('Code20', (string) $comment);\n        $comment = $sheet->getComment('B3');\n        self::assertSame('Text100', (string) $comment);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3679ImgTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse SimpleXMLElement;\n\nclass Issue3679ImgTest extends AbstractFunctional\n{\n    public function testCroppedPicture(): void\n    {\n        $file = 'tests/data/Reader/XLSX/issue.3679.img.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($file);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        if ($drawings[0] === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            /** @var SimpleXMLElement */\n            $srcRect = $drawings[0]->getSrcRect();\n            self::assertSame('448', (string) ($srcRect['r'] ?? ''));\n            self::assertSame('65769', (string) ($srcRect['b'] ?? ''));\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3720Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\n\nclass Issue3720Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3720.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/_rels/workbook.xml.rels';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<ns3:Relationships ', $data);\n        }\n    }\n\n    public function testInfo(): void\n    {\n        $reader = new Xlsx();\n        $workSheetInfo = $reader->listWorkSheetInfo(self::$testbook);\n        $info1 = $workSheetInfo[1];\n        self::assertEquals('Welcome', $info1['worksheetName']);\n        self::assertEquals('H', $info1['lastColumnLetter']);\n        self::assertEquals(7, $info1['lastColumnIndex']);\n        self::assertEquals(49, $info1['totalRows']);\n        self::assertEquals(8, $info1['totalColumns']);\n    }\n\n    public function testSheetNames(): void\n    {\n        $reader = new Xlsx();\n        $worksheetNames = $reader->listWorksheetNames(self::$testbook);\n        $expected = [\n            'Data',\n            'Welcome',\n            'Sheet 1',\n            'Sheet 2',\n            'Sheet 3',\n            'Sheet 4',\n            'Sheet 5',\n            'Sheet 6',\n            'Sheet 7',\n            'Sheet 8',\n            'Sheet 9',\n            'Sheet 10',\n        ];\n        self::assertEquals($expected, $worksheetNames);\n    }\n\n    public function testLoadXlsx(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheets = $spreadsheet->getAllSheets();\n        self::assertCount(12, $sheets);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Sheet 1');\n        $sheetProtection = $sheet->getProtection();\n        self::assertTrue($sheetProtection->getSheet());\n        self::assertSame(' FILL IN WHITE CELLS ONLY', $sheet->getCell('B3')->getValue());\n        // inherit because cell style is inherit.\n        // effectively protected because sheet is locked.\n        self::assertTrue($sheet->cellExists('A12'));\n        self::assertSame(Protection::PROTECTION_INHERIT, $sheet->getStyle('A12')->getProtection()->getLocked());\n        self::assertTrue($sheet->getCell('A12')->isLocked());\n        // unprotected because column is unprotected (no cell or row dimension style)\n        self::assertFalse($sheet->cellExists('B12'));\n        self::assertFalse($sheet->rowDimensionExists(12));\n        self::assertTrue($sheet->columnDimensionExists('B'));\n        $dxf = $sheet->getColumnDimension('B')->getXfIndex();\n        if ($dxf === null) {\n            self::fail('Unexpected null column xfIndex');\n        } else {\n            self::assertSame(Protection::PROTECTION_UNPROTECTED, $spreadsheet->getCellXfByIndex($dxf)->getProtection()->getLocked());\n        }\n        self::assertFalse($sheet->getCell('B12')->isLocked());\n        // inherit because cell doesn't exist, no row dimension, no column dimension.\n        // effectively protected because sheet is locked.\n        self::assertFalse($sheet->cellExists('W8'));\n        self::assertFalse($sheet->rowDimensionExists(8));\n        self::assertFalse($sheet->columnDimensionExists('W'));\n        self::assertTrue($sheet->getCell('W8')->isLocked());\n        // inherit because cell doesn't exist, row dimension exists without style, no column dimension.\n        // effectively protected because sheet is locked.\n        self::assertFalse($sheet->cellExists('X11'));\n        self::assertTrue($sheet->rowDimensionExists(11));\n        $dxf = $sheet->getRowDimension(11)->getXfIndex();\n        self::assertNull($dxf);\n        self::assertFalse($sheet->columnDimensionExists('X'));\n        self::assertTrue($sheet->getCell('X11')->isLocked());\n\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Welcome');\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $draw0 = $drawings[0] ?? new Drawing();\n        self::assertSame('Picture 1', $draw0->getName());\n        self::assertSame('C3', $draw0->getCoordinates());\n        self::assertSame('C10', $draw0->getCoordinates2());\n        self::assertSame('oneCell', $draw0->getEditAs());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3730Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue3730Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3730.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl\\_rels\\workbook.xml.rels'; // no idea why backslash\n        $data = file_get_contents($file);\n        // confirm that file contains expected absolute reference\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('Target=\"/xl/sharedStrings.xml\"', $data);\n            self::assertStringContainsString('Target=\"/xl/styles.xml\"', $data);\n            self::assertStringContainsString('Target=\"/xl/worksheets/sheet0.xml\"', $data);\n        }\n    }\n\n    public function testInfo(): void\n    {\n        $reader = new Xlsx();\n        $workSheetInfo = $reader->listWorkSheetInfo(self::$testbook);\n        $info1 = $workSheetInfo[0];\n        self::assertEquals('promedia postlogs wk 2-12', $info1['worksheetName']);\n        self::assertEquals('O', $info1['lastColumnLetter']);\n        self::assertEquals(14, $info1['lastColumnIndex']);\n        self::assertEquals(99, $info1['totalRows']);\n        self::assertEquals(15, $info1['totalColumns']);\n    }\n\n    public function testSheetNames(): void\n    {\n        $reader = new Xlsx();\n        $worksheetNames = $reader->listWorksheetNames(self::$testbook);\n        $expected = [\n            'promedia postlogs wk 2-12',\n        ];\n        self::assertEquals($expected, $worksheetNames);\n    }\n\n    public function testLoadXlsx(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheets = $spreadsheet->getAllSheets();\n        self::assertCount(1, $sheets);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('promedia postlogs wk 2-12');\n        self::assertSame('ProMedia Group - DR', $sheet->getCell('G7')->getValue());\n        self::assertSame('Arial', $sheet->getStyle('G7')->getFont()->getName());\n        self::assertEquals(8, $sheet->getStyle('G7')->getFont()->getSize());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3767Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue3767Test extends AbstractFunctional\n{\n    // some weirdness with this file, including the fact that it has a\n    // title ('Chart Title') which I cannot find anywhere in the xml.\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3767.xlsx';\n\n    private string $tempfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->tempfile !== '') {\n            unlink($this->tempfile);\n            $this->tempfile = '';\n        }\n    }\n\n    public function readCharts(XlsxReader $reader): void\n    {\n        $reader->setIncludeCharts(true);\n    }\n\n    public function writeCharts(XlsxWriter $writer): void\n    {\n        $writer->setIncludeCharts(true);\n    }\n\n    public function testReadWithoutCharts(): void\n    {\n        $reader = new XlsxReader();\n        //$this->readCharts($reader); // Commented out - don't want to read charts.\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        $charts = $sheet->getChartCollection();\n        self::assertCount(0, $charts);\n        $this->tempfile = File::temporaryFileName();\n        $writer = new XlsxWriter($spreadsheet);\n        $this->writeCharts($writer);\n        $writer->save($this->tempfile);\n        $spreadsheet->disconnectWorksheets();\n        $file = 'zip://';\n        $file .= $this->tempfile;\n        $file .= '#xl/worksheets/_rels/sheet1.xml.rels';\n        $data = (string) file_get_contents($file);\n        // PhpSpreadsheet still generates this target even though charts aren't included\n        self::assertStringContainsString('Target=\"../drawings/drawing1.xml\"', $data);\n        $file = 'zip://';\n        $file .= $this->tempfile;\n        $file .= '#xl/drawings/drawing1.xml';\n        $data = file_get_contents($file);\n        self::assertSame('<xml></xml>', $data); // fake file because rels needs it\n    }\n\n    public function testReadWithCharts(): void\n    {\n        $reader = new XlsxReader();\n        $this->readCharts($reader);\n        $spreadsheet = $reader->load(self::$testbook);\n        $xsheet = $spreadsheet->getActiveSheet();\n        $xcharts = $xsheet->getChartCollection();\n        self::assertCount(1, $xcharts);\n        /** @var callable */\n        $callableReader = [$this, 'readCharts'];\n        /** @var callable */\n        $callableWriter = [$this, 'writeCharts'];\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', $callableReader, $callableWriter);\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $charts = $xsheet->getChartCollection();\n        self::assertCount(1, $charts);\n        // In Excel, a default title ('Chart Title') is shown.\n        // I can't find that anywhere in the Xml.\n        self::assertSame('', $charts[0]?->getTitle()?->getCaptionText());\n        // Just test anything on the chart.\n        self::assertSame($sheet->getCell('B2')->getValue(), $charts[0]->getPlotArea()?->getPlotGroup()[0]?->getPlotValues()[0]?->getDataValues()[0] ?? null);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3770Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue3770Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3770.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/_rels/workbook.xml.rels';\n        $data = file_get_contents($file);\n        // rels file points to non-existent theme file\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('Target=\"theme/theme1.xml\"', $data);\n            self::assertStringContainsString('Target=\"worksheets/sheet1.xml\"', $data);\n        }\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/theme/theme1.xml';\n        $data = @file_get_contents($file);\n        self::assertFalse($data);\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n    }\n\n    public function testLoadable(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        // Assert anything to confirm read succeeded\n        self::assertSame('Универсальный передаточный документ', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3807Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue3807Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3807.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/_rels/workbook.xml.rels';\n        $data = file_get_contents($file);\n        // rels file points to non-existent theme file\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('Target=\"theme/theme1.xml/../../../../../../../../1.txt\"', $data);\n        }\n    }\n\n    public function testLoadable(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        // Assert anything to confirm read succeeded\n        self::assertSame(1, $sheet->getCell('B1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3863Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidator;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass Issue3863Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3863.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            // Only 1 Data Validation and it does not specify operator\n            self::assertStringContainsString('<dataValidations count=\"1\"><dataValidation type=\"whole\" allowBlank=\"1\" showInputMessage=\"1\" showErrorMessage=\"1\" sqref=\"A1\" xr:uid=\"{D0F98CC5-7234-4ADF-BD42-F33321DCD3CA}\"><formula1>5</formula1><formula2>10</formula2></dataValidation></dataValidations>', $data);\n        }\n    }\n\n    public function testValidData(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('between', $sheet->getCell('A1')->getDataValidation()->getOperator());\n        $validator = new DataValidator();\n        self::assertTrue($validator->isValid($sheet->getCell('A1')));\n        $sheet->getCell('A1')->setValue(3);\n        self::assertFalse($validator->isValid($sheet->getCell('A1')));\n        $sheet->getCell('A1')->setValue(7);\n        self::assertTrue($validator->isValid($sheet->getCell('A1')));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3982Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3982Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.3982.xlsx';\n\n    /**\n     * This routine comes nowhere close to out-of-memory (uses 45MB).\n     * Yet it goes out of memory in PhpUnit 10 (uses 2GB!).\n     * Works fine in PhpUnit9-.\n     * We can mitigate the problem by changing entirely-null rows\n     * to empty rows in rangeToArrayYieldRows. (uses 455MB).\n     * That's a breaking change, but might be worth considering.\n     *\n     * Aha! I have narrowed the problem to self::assertCount,\n     * which has a ready substitution. I will report the problem\n     * to Phpunit if I can come up with a simpler example.\n     */\n    public function testLoadAllRows(): void\n    {\n        $spreadsheet = IOFactory::load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        $data = $sheet->toArray(null, true, false, true);\n        $count = count($data);\n        self::assertSame(1_048_576, $count);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIgnoreCellsWithNoRows(): void\n    {\n        $spreadsheet = IOFactory::load(self::$testbook, IReader::IGNORE_ROWS_WITH_NO_CELLS);\n        $sheet = $spreadsheet->getActiveSheet();\n        $data = $sheet->toArray(null, true, false, true);\n        self::assertSame([1, 2, 3, 4, 5, 6], array_keys($data));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefaultSetting(): void\n    {\n        $reader = new XlsxReader();\n        self::assertFalse($reader->getIgnoreRowsWithNoCells());\n        self::assertFalse($reader->getReadDataOnly());\n        self::assertFalse($reader->getIncludeCharts());\n        self::assertTrue($reader->getReadEmptyCells());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4039Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4039Test extends AbstractFunctional\n{\n    private static string $testbook = 'tests/data/Style/ConditionalFormatting/CellMatcher.xlsx';\n\n    public function testUnionRange(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('cellIs Expression');\n        $expected = [\n            'A12:D17,A20', // split range\n            'A22:D27',\n            'A2:E6',\n        ];\n        self::assertSame($expected, array_keys($sheet->getConditionalStylesCollection()));\n        self::assertSame($expected[0], $sheet->getConditionalRange('A20'));\n        self::assertSame($expected[0], $sheet->getConditionalRange('C15'));\n        self::assertNull($sheet->getConditionalRange('A19'));\n        self::assertSame($expected[1], $sheet->getConditionalRange('D25'));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIntersectionRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2, 3, 4, 5],\n            [2, 3, 4, 5, 6],\n            [3, 4, 5, 6, 7],\n        ]);\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_BETWEEN);\n        $condition1->setConditions([2, 3]);\n        $condition1->getStyle()->getFont()\n            ->setBold(true);\n        $conditionalStyles = [$condition1];\n        // Writer will change this range to equivalent 'B1,B2,B3'\n        $sheet->setConditionalStyles('A1:C3 B1:B3', $conditionalStyles);\n        $robj = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        $conditionals = $sheet0->getConditionalStylesCollection();\n        self::assertSame(['B1,B2,B3'], array_keys($conditionals));\n        $cond1 = $conditionals['B1,B2,B3'][0];\n        self::assertSame(Conditional::CONDITION_CELLIS, $cond1->getConditionType());\n        self::assertSame(Conditional::OPERATOR_BETWEEN, $cond1->getOperatorType());\n        self::assertSame(['2', '3'], $cond1->getConditions());\n        $font1 = $cond1->getStyle()->getFont();\n        self::assertTrue($font1->getBold());\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4049Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4049Test extends AbstractFunctional\n{\n    public function testColorScale(): void\n    {\n        $xlsxFile = 'tests/data/Reader/XLSX/issue.4049.xlsx';\n        $reader = new Xlsx();\n        $oldSpreadsheet = $reader->load($xlsxFile);\n        $spreadsheet = $this->writeAndReload($oldSpreadsheet, 'Xlsx');\n        $oldSpreadsheet->disconnectWorksheets();\n        $sheet = $spreadsheet->getActiveSheet();\n        $conditionals = $sheet->getConditionalStylesCollection();\n        self::assertCount(1, $conditionals);\n        self::assertSame('E9:E14', array_keys($conditionals)[0]);\n        $cond1 = $conditionals['E9:E14'];\n        self::assertCount(1, $cond1);\n        self::assertSame('colorScale', $cond1[0]->getConditionType());\n        $colorScale = $cond1[0]->getColorScale();\n        self::assertNotNull($colorScale);\n        $min = $colorScale->getMinimumConditionalFormatValueObject();\n        self::assertNotNull($min);\n        self::assertSame('formula', $min->getType());\n        self::assertSame('25', $min->getCellFormula());\n\n        self::assertNull($colorScale->getMidpointConditionalFormatValueObject());\n\n        $max = $colorScale->getMaximumConditionalFormatValueObject();\n        self::assertNotNull($max);\n        self::assertSame('max', $max->getType());\n        self::assertNull($max->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4063Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4063Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.4063.xlsx';\n\n    public function testSharedStringsWithEmptyString(): void\n    {\n        $spreadsheet = IOFactory::load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        $data = $sheet->toArray(null, true, true, true);\n        $nbsp = \"\\u{00a0}\";\n        self::assertSame(['A' => '226', 'B' => '', 'C' => $nbsp], $data[17]);\n        self::assertSame(['A' => '38873', 'B' => 'gg', 'C' => ' '], $data[22]);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4248Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4248Test extends TestCase\n{\n    private string $outfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outfile !== '') {\n            unlink($this->outfile);\n            $this->outfile = '';\n        }\n    }\n\n    public function testStyles(): void\n    {\n        $file = 'tests/data/Reader/XLSX/issue.4248.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $this->outfile = File::temporaryFilename();\n        $writer->save($this->outfile);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outfile;\n        $file .= '#xl/styles.xml';\n        $data = file_get_contents($file) ?: '';\n        $expected = '<fill>'\n            . '<patternFill patternType=\"darkDown\"/>'\n            . '</fill>';\n        self::assertStringContainsString($expected, $data, 'neither fgColor nor bgColor');\n        $expected = '<fill>'\n            . '<patternFill patternType=\"darkDown\">'\n            . '<bgColor rgb=\"FFBDD7EE\"/>'\n            . '</patternFill></fill>';\n        self::assertStringContainsString($expected, $data, 'bgColor but no fgColor');\n        $expected = '<dxfs count=\"15\">'\n            . '<dxf>' // dxfId 1 - fill color for Oui\n            . '<fill>'\n            . '<patternFill><bgColor rgb=\"FF00B050\"/></patternFill>'\n            . '</fill>'\n            . '<border/>'\n            . '</dxf>'\n            . '<dxf>' // dxfId 2 - fill color for Non\n            . '<font><color rgb=\"FF9C0006\"/></font>'\n            . '<fill>'\n            . '<patternFill><bgColor rgb=\"FFFFC7CE\"/></patternFill>'\n            . '</fill>'\n            . '<border/>'\n            . '</dxf>';\n        self::assertStringContainsString($expected, $data, 'conditional fill styles');\n\n        $file = 'zip://';\n        $file .= $this->outfile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file) ?: '';\n        $expected = '<conditionalFormatting sqref=\"C16:C38 E17:H18 I17:J37 D18 J23:J38 E38 I38\">'\n            . '<cfRule type=\"containsText\" dxfId=\"0\" priority=\"15\" operator=\"containsText\" text=\"Oui\">'\n            . '<formula>NOT(ISERROR(SEARCH(&quot;Oui&quot;,C16)))</formula>'\n            . '</cfRule>'\n            . '</conditionalFormatting>';\n        self::assertStringContainsString($expected, $data, 'first condition for D18');\n        $expected = '<conditionalFormatting sqref=\"C16:C38 I17:J37 E17:H18 D18 J23:J38 E38 I38\">'\n            . '<cfRule type=\"containsText\" dxfId=\"1\" priority=\"14\" operator=\"containsText\" text=\"Non\">'\n            . '<formula>NOT(ISERROR(SEARCH(&quot;Non&quot;,C16)))</formula>'\n            . '</cfRule>'\n            . '</conditionalFormatting>';\n        self::assertStringContainsString($expected, $data, 'second condition for D18');\n    }\n\n    public function testHtml(): void\n    {\n        $file = 'tests/data/Reader/XLSX/issue.4248.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $writer = new HtmlWriter($spreadsheet);\n\n        $file = 'zip://';\n        $file .= $this->outfile;\n        $file .= '#xl/styles.xml';\n        $data = str_replace([\"\\r\", \"\\n\"], '', $writer->generateHtmlAll());\n        $expected = '          <tr class=\"row17\">' // Cell D18\n            . '            <td class=\"column0 style0\">&nbsp;</td>'\n            . '            <td class=\"column1 style28 null\">&nbsp;</td>'\n            . '            <td class=\"column2 style35 s\">Eligible </td>'\n            . '            <td class=\"column3 style70 s\">Non</td>';\n        self::assertStringContainsString($expected, $data, 'Cell D18 style');\n        $expected = '      td.style70, th.style70 { vertical-align:middle; text-align:center; border-bottom:1px solid #000000 !important; border-top:2px solid #000000 !important; border-left:2px solid #000000 !important; border-right:1px solid #000000 !important; font-weight:bold; color:#000000; font-family:\\'Calibri\\'; font-size:16pt; background-color:#BDD7EE }';\n        self::assertStringContainsString($expected, $data, 'background color');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4356Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4356Test extends AbstractFunctional\n{\n    public function testIssue4356(): void\n    {\n        // Reader couldn't handle sheet title with apostrophe for defined name\n        $nameDefined = 'CELLNAME';\n        $originalSpreadsheet = new Spreadsheet();\n        $originalSheet = $originalSpreadsheet->getActiveSheet();\n        $originalSheet->setTitle(\"Goodn't sheet name\");\n        $originalSpreadsheet->addNamedRange(\n            new NamedRange($nameDefined, $originalSheet, '$A$1')\n        );\n        $originalSheet->setCellValue('A1', 'This is a named cell.');\n        $originalSheet->getStyle($nameDefined)\n            ->getFont()\n            ->setItalic(true);\n        $spreadsheet = $this->writeAndReload($originalSpreadsheet, 'Xlsx');\n        $originalSpreadsheet->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('C1', \"=$nameDefined\");\n        self::assertSame('This is a named cell.', $sheet->getCell('C1')->getCalculatedValue());\n        $namedRange2 = $spreadsheet->getNamedRange($nameDefined);\n        self::assertNotNull($namedRange2);\n        $sheetx = $namedRange2->getWorksheet();\n        self::assertNotNull($sheetx);\n        $style = $sheetx->getStyle($nameDefined);\n        self::assertTrue($style->getFont()->getItalic());\n        $style->getFont()->setItalic(false);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4375Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4375Test extends TestCase\n{\n    private static string $file = 'tests/data/Reader/XLSX/issue.4375.small.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$file;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file) ?: '';\n        $expected = '<ignoredErrors><ignoredError sqref=\"A2:B5 B1:F1\" numberStoredAsText=\"1\"/></ignoredErrors>';\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public function testDataOnly(): void\n    {\n        $file = self::$file;\n        $reader = new XlsxReader();\n        $reader->setReadDataOnly(true);\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('0', $sheet->getCell('A2')->getValue());\n        self::assertFalse(\n            $sheet->getCell('A2')\n                ->getIgnoredErrors()\n                ->getNumberStoredAsText()\n        );\n        self::assertFalse($sheet->cellExists('A3'));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNormalRead(): void\n    {\n        $file = self::$file;\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('0', $sheet->getCell('A2')->getValue());\n        self::assertTrue(\n            $sheet->getCell('A2')\n                ->getIgnoredErrors()\n                ->getNumberStoredAsText()\n        );\n        self::assertFalse($sheet->cellExists('A3'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4415Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4415Test extends TestCase\n{\n    private static string $file = 'tests/data/Reader/XLSX/issue.4415.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$file;\n        $file .= '#xl/drawings/drawing1.xml';\n        $data = file_get_contents($file) ?: '';\n        $expected = '<a:alpha val=\"72600\"/>';\n        self::assertStringContainsString($expected, $data);\n        $expected = '<a:alpha val=\"90100\"/>';\n        self::assertStringContainsString($expected, $data);\n        self::assertSame(2, substr_count($data, '<a:alpha '), 'number of drawings with alpha');\n        self::assertSame(2, substr_count($data, '<xdr:oneCellAnchor>'), 'first 2 drawings');\n        self::assertSame(1, substr_count($data, '<xdr:twoCellAnchor>'), 'third drawings');\n    }\n\n    public function testFractionalAlpha(): void\n    {\n        $file = self::$file;\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(3, $drawings);\n        self::assertNotNull($drawings[0]);\n        self::assertNotNull($drawings[1]);\n        self::assertNotNull($drawings[2]);\n        self::assertSame(50, $drawings[0]->getShadow()->getAlpha());\n        self::assertSame(72, $drawings[1]->getShadow()->getAlpha());\n        self::assertSame('', $drawings[1]->getCoordinates2(), 'one cell anchor');\n        self::assertSame(90, $drawings[2]->getShadow()->getAlpha());\n        self::assertNotEquals('', $drawings[2]->getCoordinates2(), 'two cell anchor');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4416Filter.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\nclass Issue4416Filter implements IReadFilter\n{\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        $allowedColumns = ['A', 'B', 'C', 'D'];\n        $allowedRows = range(1, 5);\n\n        return in_array($columnAddress, $allowedColumns, true) && in_array($row, $allowedRows, true);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4416Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4416Test extends TestCase\n{\n    private static string $file = 'tests/data/Reader/XLSX/issue.4416.smallauto.xlsx';\n\n    public function testNoFilter(): void\n    {\n        $file = self::$file;\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEqualsWithDelta(\n            16.5430,\n            $sheet->getColumnDimension('A')->getWidth(),\n            1E-4\n        );\n        self::assertEqualsWithDelta(\n            6.0,\n            $sheet->getColumnDimension('B')->getWidth(),\n            1E-4\n        );\n        self::assertEqualsWithDelta(\n            11.3633,\n            $sheet->getColumnDimension('C')->getWidth(),\n            1E-4\n        );\n        self::assertEqualsWithDelta(\n            41.0898,\n            $sheet->getColumnDimension('D')->getWidth(),\n            1E-4\n        );\n        self::assertEqualsWithDelta(\n            28.5,\n            $sheet->getRowDimension(6)->getRowHeight(),\n            1E-4\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWithFilter(): void\n    {\n        $file = self::$file;\n        $reader = new XlsxReader();\n        $reader->setReadFilter(new Issue4416Filter());\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEqualsWithDelta(\n            16.5430,\n            $sheet->getColumnDimension('A')->getWidth(),\n            1E-4\n        );\n        self::assertEqualsWithDelta(\n            6.0,\n            $sheet->getColumnDimension('B')->getWidth(),\n            1E-4\n        );\n        self::assertEqualsWithDelta(\n            11.3633,\n            $sheet->getColumnDimension('C')->getWidth(),\n            1E-4\n        );\n        self::assertEqualsWithDelta(\n            41.0898,\n            $sheet->getColumnDimension('D')->getWidth(),\n            1E-4\n        );\n        self::assertEquals(\n            -1,\n            $sheet->getRowDimension(6)->getRowHeight(),\n            'row has been filtered away'\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4477Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass Issue4477Test extends TestCase\n{\n    private string $tempfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->tempfile !== '') {\n            unlink($this->tempfile);\n            $this->tempfile = '';\n        }\n    }\n\n    public function testDataonlyNoPrinter(): void\n    {\n        // Need to ignore printer settings when Read Dataonly\n        $infile = 'tests/data/Reader/XLSX/issue.4477.disclaimer.xlsx';\n        $zip = new ZipArchive();\n        if ($zip->open($infile) !== true) {\n            self::fail(\"failed to open $infile\");\n        }\n        $num = $zip->numFiles;\n        $foundPrinter = $foundWorksheet = false;\n        for ($i = 0; $i < $num; ++$i) {\n            $filename = (string) $zip->getNameIndex($i);\n            if (str_contains($filename, 'printer')) {\n                $foundPrinter = true;\n            } elseif ($filename === 'xl/worksheets/sheet1.xml') {\n                $foundWorksheet = true;\n            }\n        }\n        $zip->close();\n        self::assertTrue($foundPrinter);\n        self::assertTrue($foundWorksheet);\n\n        $reader = new XlsxReader();\n        $reader->setReadDataOnly(true);\n        $spreadsheet = $reader->load($infile);\n        $writer = new XlsxWriter($spreadsheet);\n        $this->tempfile = File::temporaryFileName();\n        $writer->save($this->tempfile);\n        $spreadsheet->disconnectWorksheets();\n\n        $zip = new ZipArchive();\n        if ($zip->open($this->tempfile) !== true) {\n            self::fail(\"failed to open {$infile}\");\n        }\n        $num = $zip->numFiles;\n        $foundPrinter = $foundWorksheet = false;\n        for ($i = 0; $i < $num; ++$i) {\n            $filename = (string) $zip->getNameIndex($i);\n            if (str_contains($filename, 'printer')) {\n                $foundPrinter = true;\n            } elseif ($filename === 'xl/worksheets/sheet1.xml') {\n                $foundWorksheet = true;\n            }\n        }\n        $zip->close();\n        self::assertFalse($foundPrinter);\n        self::assertTrue($foundWorksheet);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4505Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4505Test extends TestCase\n{\n    private static string $file = 'tests/data/Reader/XLSX/issue.4505.namespace.xlsx';\n\n    public function testVmlProcessingWithXAndONamespaces(): void\n    {\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load(self::$file);\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $comments = $sheet->getComments();\n        self::assertArrayHasKey('A1', $comments);\n        self::assertSame('right', $comments['A1']->getAlignment());\n        self::assertSame(\"Some User:\\nHello\", (string) $comments['A1']->getText());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testVmlFileContainsRequiredNamespaces(): void\n    {\n        $file = 'zip://' . self::$file . '#xl/drawings/vmlDrawing1.vml';\n        $data = (string) file_get_contents($file);\n\n        self::assertStringContainsString('<ns1:shape ', $data); // usually v:shape\n        self::assertStringContainsString('<ns3:shapelayout ns1:ext=\"edit\">', $data); // usually o:shapelayout v:ext\n        self::assertStringContainsString('<ns2:ClientData ObjectType=\"Note\">', $data); // usually x:ClientData\n        self::assertStringContainsString('ns3:insetmode', $data); // usually o:insetmode\n        self::assertStringContainsString(\n            '<ns2:TextHAlign>Right</ns2:TextHAlign>', // usually x:TextHAlign\n            $data\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4629Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4629Test extends TestCase\n{\n    public function testExternalAndInternalCondionalStyles(): void\n    {\n        $infile = 'tests/data/Reader/XLSX/issue.4629.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($infile);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('top');\n        $conditionals = $sheet->getStyle('A1:A20')->getConditionalStyles();\n        self::assertCount(3, $conditionals);\n\n        $conditional = $conditionals[0];\n        self::assertSame('expression', $conditional->getConditionType());\n        self::assertFalse($conditional->getStopIfTrue());\n        self::assertSame(['$A1<>$B1'], $conditional->getConditions());\n        self::assertSame(2, $conditional->getPriority());\n\n        $conditional = $conditionals[1];\n        self::assertSame('expression', $conditional->getConditionType());\n        self::assertFalse($conditional->getStopIfTrue());\n        self::assertSame(['AND($A1=\"cheese\", $C1=\"yogurt\")'], $conditional->getConditions());\n        self::assertSame(3, $conditional->getPriority());\n\n        $conditional = $conditionals[2]; // defined within <ext>\n        self::assertSame('expression', $conditional->getConditionType());\n        self::assertTrue($conditional->getStopIfTrue());\n        self::assertSame(['A1<>bottom!A1'], $conditional->getConditions());\n        self::assertSame(1, $conditional->getPriority());\n        self::assertSame('FF9C5700', $conditional->getStyle()->getFont()->getColor()->getArgb());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4800Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4800Test extends TestCase\n{\n    private static string $filename = 'tests/data/Reader/XLSX/issue.4800.xlsx';\n\n    public function testHeaderFooterImageDimensions(): void\n    {\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load(self::$filename);\n\n        foreach ($spreadsheet->getAllSheets() as $sheet) {\n            $images = $sheet->getHeaderFooter()->getImages();\n            self::assertCount(1, $images);\n\n            $image = reset($images);\n            self::assertSame(100, $image->getWidth());\n            self::assertSame(100, $image->getHeight());\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Issue731Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue731Test extends AbstractFunctional\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue.731.xlsx';\n\n    public function testRotateAndFlipImages(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSheet = $reloadedSpreadsheet->getActiveSheet();\n        $expected = [\n            [0, false, false],\n            [90, false, false],\n            [270, false, false],\n            [0, false, true],\n            [0, true, false],\n            [20, false, false],\n            [20, false, true],\n            [0, true, true],\n        ];\n        $actual = [];\n        foreach ($reloadedSheet->getDrawingCollection() as $drawing) {\n            $actual[] = [$drawing->getRotation(), $drawing->getFlipHorizontal(), $drawing->getFlipVertical()];\n        }\n        self::assertSame($expected, $actual);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/LoadSheetsOnlyTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass LoadSheetsOnlyTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private static string $testbook = 'tests/data/Reader/XLSX/HiddenSheet.xlsx';\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testLoadSheet1Only(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        //$reader->setLoadSheetsOnly(['Sheet1']);\n        $names = $reader->listWorksheetNames($filename);\n        $reader->setLoadSheetsOnly([$names[0]]);\n        $spreadsheet = $this->spreadsheet = $reader->load($filename);\n        self::assertSame(1, $spreadsheet->getSheetCount());\n        self::assertSame('Sheet1', $spreadsheet->getActiveSheet()->getTitle());\n    }\n\n    public function testLoadSheet2Only(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $reader->setLoadSheetsOnly(['Sheet2']);\n        $spreadsheet = $this->spreadsheet = $reader->load($filename);\n        self::assertSame(1, $spreadsheet->getSheetCount());\n        self::assertSame('Sheet2', $spreadsheet->getActiveSheet()->getTitle());\n    }\n\n    public function testLoadNoSheet(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('You tried to set a sheet active by the out of bounds index');\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $reader->setLoadSheetsOnly(['Sheet3']);\n        $reader->load($filename);\n    }\n\n    public function testLoadMultipleSheets(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/threesheets.xlsx';\n        $reader = new Xlsx();\n        $reader->setLoadSheetsOnly(['Sheet3', 'Sheet1']);\n        $spreadsheet = $this->spreadsheet = $reader->load($filename);\n        self::assertSame(2, $spreadsheet->getSheetCount());\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Sheet1');\n        self::assertSame('First', $sheet->getCell('A1')->getValue());\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Sheet3');\n        self::assertSame('Third', $sheet->getCell('A1')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/MySpreadsheet.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass MySpreadsheet extends Spreadsheet\n{\n    public function calcSquare(string $cellAddress): float|int|string\n    {\n        $value = $this->getActiveSheet()\n            ->getCell($cellAddress)\n            ->getValue();\n        if (is_numeric($value)) {\n            return $value * $value;\n        }\n\n        return '#VALUE!';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/MyXlsxReader.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\n\nclass MyXlsxReader extends XlsxReader\n{\n    protected function newSpreadsheet(): Spreadsheet\n    {\n        return new MySpreadsheet();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/MyXlsxTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass MyXlsxTest extends TestCase\n{\n    public function testCustomSpreadsheetCustomLoader(): void\n    {\n        $reader = new MyXlsxReader();\n        $infile = 'tests/data/Reader/XLSX/colorscale.xlsx';\n        /** @var MySpreadsheet */\n        $mySpreadsheet = $reader->load($infile);\n        self::assertSame(64, $mySpreadsheet->calcSquare('A3'));\n        $mySpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/NamedRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NamedRangeTest extends TestCase\n{\n    public static function testBug1686b(): void\n    {\n        $xlsxFile = 'tests/data/Reader/XLSX/bug1686b.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($xlsxFile);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals(2.1, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertEquals('#REF!', $sheet->getCell('A2')->getCalculatedValue());\n        self::assertEquals('#REF!', $sheet->getCell('A3')->getCalculatedValue());\n        self::assertEquals('#NAME?', $sheet->getCell('A4')->getCalculatedValue());\n        self::assertEquals('#REF!', $sheet->getCell('A5')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceIssue2109bTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass NamespaceIssue2109bTest extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/issue2109b.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/workbook.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<x:workbook ', $data);\n        }\n    }\n\n    public function testInfo(): void\n    {\n        $reader = new Xlsx();\n        $workSheetInfo = $reader->listWorkSheetInfo(self::$testbook);\n        $info0 = $workSheetInfo[0];\n        self::assertEquals('Sheet1', $info0['worksheetName']);\n        self::assertEquals('AF', $info0['lastColumnLetter']);\n        self::assertEquals(31, $info0['lastColumnIndex']);\n        self::assertEquals(4, $info0['totalRows']);\n        self::assertEquals(32, $info0['totalColumns']);\n    }\n\n    public function testSheetNames(): void\n    {\n        $reader = new Xlsx();\n        $worksheetNames = $reader->listWorksheetNames(self::$testbook);\n        self::assertEquals(['Sheet1'], $worksheetNames);\n    }\n\n    public function testActive(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Sheet1', $sheet->getTitle());\n        self::assertNull($sheet->getFreezePane());\n        self::assertNull($sheet->getTopLeftCell());\n        self::assertSame('A1', $sheet->getSelectedCells());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private static function getCellValue(Worksheet $sheet, string $cell): string\n    {\n        $result = $sheet->getCell($cell)->getValue();\n        if (is_scalar($result) || (is_object($result) && method_exists($result, '__toString'))) {\n            return (string) $result;\n        }\n\n        return '';\n    }\n\n    public function testLoadXlsx(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('Sheet1', $sheet->getTitle());\n        $expectedArray = [\n            'A1' => 'Channel Name = Cartoon Network RSE',\n            'B2' => 'Event ID',\n            'C3' => '2021-05-17 03:00',\n            'F4' => 'The Internet',\n            'AF3' => '902476',\n            'AF4' => '902477',\n            'J2' => 'Episode Synopsis',\n            'J3' => 'Gumball and Darwin\\'s reputation is challenged and they really couldn\\'t care less...',\n            'J4' => 'Gumball accidentally uploads a video of himself and wants it gone.',\n        ];\n        foreach ($expectedArray as $key => $value) {\n            self::assertSame($value, self::getCellValue($sheet, $key), \"error in cell $key\");\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceNonStdTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass NamespaceNonStdTest extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/namespacenonstd.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/workbook.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            if (!str_contains(__FILE__, 'NonStd')) {\n                self::assertStringNotContainsString('nonstd', self::$testbook);\n                self::assertStringContainsString('<workbook ', $data);\n            } else {\n                self::assertStringContainsString('nonstd', self::$testbook);\n                self::assertStringContainsString('<x:workbook ', $data);\n            }\n        }\n    }\n\n    public function testInfo(): void\n    {\n        $reader = new Xlsx();\n        $workSheetInfo = $reader->listWorkSheetInfo(self::$testbook);\n        $info0 = $workSheetInfo[0];\n        self::assertEquals('SylkTest', $info0['worksheetName']);\n        self::assertEquals('J', $info0['lastColumnLetter']);\n        self::assertEquals(9, $info0['lastColumnIndex']);\n        self::assertEquals(18, $info0['totalRows']);\n        self::assertEquals(10, $info0['totalColumns']);\n    }\n\n    public function testSheetNames(): void\n    {\n        $reader = new Xlsx();\n        $worksheetNames = $reader->listWorksheetNames(self::$testbook);\n        self::assertEquals(['SylkTest', 'Second'], $worksheetNames);\n    }\n\n    public function testActive(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Second', $sheet->getTitle());\n        self::assertSame('A2', $sheet->getFreezePane());\n        self::assertSame('A2', $sheet->getTopLeftCell());\n        self::assertSame('B3', $sheet->getSelectedCells());\n        $sheet = $spreadsheet->getSheetByNameOrThrow('SylkTest');\n        self::assertNull($sheet->getFreezePane());\n        self::assertNull($sheet->getTopLeftCell());\n    }\n\n    public function testLoadXlsx(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('SylkTest', $sheet->getTitle());\n        //if (strpos(__FILE__, 'NonStd') !== false) {\n        //    self::markTestIncomplete('Not yet ready');\n        //}\n\n        self::assertEquals('FFFF0000', $sheet->getCell('A1')->getStyle()->getFont()->getColor()->getARGB());\n        self::assertEquals(Fill::FILL_PATTERN_GRAY125, $sheet->getCell('A2')->getStyle()->getFill()->getFillType());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('A4')->getStyle()->getFont()->getUnderline());\n        self::assertEquals('Test with (;) in string', $sheet->getCell('A4')->getValue());\n\n        self::assertEquals(22269, $sheet->getCell('A10')->getValue());\n        self::assertEquals('dd/mm/yyyy', $sheet->getCell('A10')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('19/12/1960', $sheet->getCell('A10')->getFormattedValue());\n        self::assertEquals(1.5, $sheet->getCell('A11')->getValue());\n        self::assertEquals('# ?/?', $sheet->getCell('A11')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('1 1/2', $sheet->getCell('A11')->getFormattedValue());\n\n        self::assertEquals('=B1+C1', $sheet->getCell('H1')->getValue());\n        self::assertEquals('=E2&F2', $sheet->getCell('J2')->getValue());\n        self::assertEquals('=SUM(C1:C4)', $sheet->getCell('I5')->getValue());\n        self::assertEquals('=MEDIAN(B6:B8)', $sheet->getCell('B9')->getValue());\n\n        self::assertEquals(11, $sheet->getCell('E1')->getStyle()->getFont()->getSize());\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('E1')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('E3')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('E4')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E4')->getStyle()->getFont()->getUnderline());\n\n        self::assertTrue($sheet->getCell('F1')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F1')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('F1')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F4')->getStyle()->getFont()->getUnderline());\n\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C10')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C12')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C14')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C16')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n    }\n\n    public function testLoadXlsxSheet2Contents(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals('Second', $sheet->getTitle());\n        self::assertSame('Hyperlink', $sheet->getCell('B2')->getValue());\n        $hyper = $sheet->getCell('B2')->getHyperlink();\n        self::assertSame('http://www.example.com/', $hyper->getUrl());\n        self::assertSame('Comment', $sheet->getCell('B3')->getValue());\n        $comment = $sheet->getComment('B3');\n        // Created as \"threaded comment\" with Excel 365, not quite as expected.\n        self::assertStringContainsString('This is a comment', (string) $comment);\n    }\n\n    public function testLoadXlsxSheet2Styles(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals('Second', $sheet->getTitle());\n        //if (strpos(__FILE__, 'NonStd') !== false) {\n        //    self::markTestIncomplete('Not yet ready');\n        //}\n        self::assertEquals('center', $sheet->getCell('A2')->getStyle()->getAlignment()->getHorizontal());\n        self::assertSame('inherit', $sheet->getCell('A2')->getStyle()->getProtection()->getLocked());\n        self::assertEquals('top', $sheet->getCell('A3')->getStyle()->getAlignment()->getVertical());\n        self::assertSame('unprotected', $sheet->getCell('A3')->getStyle()->getProtection()->getLocked());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceOpenpyxl35Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass NamespaceOpenpyxl35Test extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/namespaces.openpyxl35.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/workbook.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<s:workbook ', $data);\n        }\n    }\n\n    public function testInfo(): void\n    {\n        $reader = new Xlsx();\n        $workSheetInfo = $reader->listWorkSheetInfo(self::$testbook);\n        $info0 = $workSheetInfo[0];\n        self::assertEquals('Shofar 5781', $info0['worksheetName']);\n        self::assertEquals('D', $info0['lastColumnLetter']);\n        self::assertEquals(3, $info0['lastColumnIndex']);\n        self::assertEquals(30, $info0['totalRows']);\n        self::assertEquals(4, $info0['totalColumns']);\n    }\n\n    public function testSheetNames(): void\n    {\n        $reader = new Xlsx();\n        $worksheetNames = $reader->listWorksheetNames(self::$testbook);\n        self::assertEquals(['Shofar 5781', 'Shofar 5782', 'Shofar 5783'], $worksheetNames);\n    }\n\n    public function testActive(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Shofar 5781', $sheet->getTitle());\n        self::assertSame('A2', $sheet->getFreezePane());\n        self::assertSame('A2', $sheet->getTopLeftCell());\n        self::assertSame('D2', $sheet->getSelectedCells());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private static function getCellValue(Worksheet $sheet, string $cell): string\n    {\n        $result = $sheet->getCell($cell)->getValue();\n        if (is_scalar($result) || (is_object($result) && method_exists($result, '__toString'))) {\n            return (string) $result;\n        }\n\n        return '';\n    }\n\n    public function testLoadXlsx(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('Shofar 5781', $sheet->getTitle());\n        $expectedArray = [\n            'Shofar 5781' => [\n                'A1' => 'Weekday',\n                'B6' => 'August 13',\n                'A14' => 'Saturday',\n                'C14' => 'Elul 13',\n                'D30' => 'N/A',\n                'B30' => 'September 6',\n            ],\n            'Shofar 5782' => [\n                'C1' => 'Jewish Date',\n                'B6' => 'September 1',\n                'A14' => 'Friday',\n                'C14' => 'Elul 13',\n                'D28' => '',\n                'B30' => 'September 25',\n            ],\n            'Shofar 5783' => [\n                'B1' => 'Civil Date',\n                'B6' => 'August 22',\n                'A14' => 'Wednesday',\n                'C14' => 'Elul 13',\n                'D30' => 'N/A',\n                'B30' => 'September 15',\n            ],\n        ];\n        foreach ($expectedArray as $sheetName => $array1) {\n            $sheet = $spreadsheet->getSheetByNameOrThrow($sheetName);\n            foreach ($array1 as $key => $value) {\n                self::assertSame($value, self::getCellValue($sheet, $key), \"error in sheet $sheetName cell $key\");\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/NamespacePurlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\n\nclass NamespacePurlTest extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/namespacepurl.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/workbook.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('http://purl.oclc.org/ooxml/', $data);\n        }\n    }\n\n    public function testPurlNamespace(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $actual = $reader->canRead($filename);\n        self::assertTrue($actual);\n\n        $sheets = $reader->listWorksheetNames($filename);\n        self::assertEquals(['ml_out'], $sheets);\n\n        $actual = $reader->listWorksheetInfo($filename);\n        $expected = [\n            [\n                'worksheetName' => 'ml_out',\n                'lastColumnLetter' => 'R',\n                'lastColumnIndex' => 17,\n                'totalRows' => 76,\n                'totalColumns' => 18,\n                'sheetState' => 'visible',\n            ],\n        ];\n\n        self::assertEquals($expected, $actual);\n    }\n\n    public function testPurlLoad(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('ml_out', $sheet->getTitle());\n        self::assertSame('Item', $sheet->getCell('A1')->getValue());\n        self::assertEquals(97.91, $sheet->getCell('G3')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceStdTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\n\nclass NamespaceStdTest extends \\PHPUnit\\Framework\\TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/namespacestd.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/workbook.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            if (!str_contains(__FILE__, 'NonStd')) {\n                self::assertStringNotContainsString('nonstd', self::$testbook);\n                self::assertStringContainsString('<workbook ', $data);\n            } else {\n                self::assertStringContainsString('nonstd', self::$testbook);\n                self::assertStringContainsString('<x:workbook ', $data);\n            }\n        }\n    }\n\n    public function testInfo(): void\n    {\n        $reader = new Xlsx();\n        $workSheetInfo = $reader->listWorkSheetInfo(self::$testbook);\n        $info0 = $workSheetInfo[0];\n        self::assertEquals('SylkTest', $info0['worksheetName']);\n        self::assertEquals('J', $info0['lastColumnLetter']);\n        self::assertEquals(9, $info0['lastColumnIndex']);\n        self::assertEquals(18, $info0['totalRows']);\n        self::assertEquals(10, $info0['totalColumns']);\n    }\n\n    public function testSheetNames(): void\n    {\n        $reader = new Xlsx();\n        $worksheetNames = $reader->listWorksheetNames(self::$testbook);\n        self::assertEquals(['SylkTest', 'Second'], $worksheetNames);\n    }\n\n    public function testActive(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Second', $sheet->getTitle());\n        self::assertSame('A2', $sheet->getFreezePane());\n        self::assertSame('A2', $sheet->getTopLeftCell());\n        self::assertSame('B3', $sheet->getSelectedCells());\n        $sheet = $spreadsheet->getSheetByNameOrThrow('SylkTest');\n        self::assertNull($sheet->getFreezePane());\n        self::assertNull($sheet->getTopLeftCell());\n    }\n\n    public function testLoadXlsx(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('SylkTest', $sheet->getTitle());\n        if (str_contains(__FILE__, 'NonStd')) {\n            self::markTestIncomplete('Not yet ready');\n        }\n\n        self::assertEquals('FFFF0000', $sheet->getCell('A1')->getStyle()->getFont()->getColor()->getARGB());\n        self::assertEquals(Fill::FILL_PATTERN_GRAY125, $sheet->getCell('A2')->getStyle()->getFill()->getFillType());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('A4')->getStyle()->getFont()->getUnderline());\n        self::assertEquals('Test with (;) in string', $sheet->getCell('A4')->getValue());\n\n        self::assertEquals(22269, $sheet->getCell('A10')->getValue());\n        self::assertEquals('dd/mm/yyyy', $sheet->getCell('A10')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('19/12/1960', $sheet->getCell('A10')->getFormattedValue());\n        self::assertEquals(1.5, $sheet->getCell('A11')->getValue());\n        self::assertEquals('# ?/?', $sheet->getCell('A11')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('1 1/2', $sheet->getCell('A11')->getFormattedValue());\n\n        self::assertEquals('=B1+C1', $sheet->getCell('H1')->getValue());\n        self::assertEquals('=E2&F2', $sheet->getCell('J2')->getValue());\n        self::assertEquals('=SUM(C1:C4)', $sheet->getCell('I5')->getValue());\n        self::assertEquals('=MEDIAN(B6:B8)', $sheet->getCell('B9')->getValue());\n\n        self::assertEquals(11, $sheet->getCell('E1')->getStyle()->getFont()->getSize());\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('E1')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('E3')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('E4')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E4')->getStyle()->getFont()->getUnderline());\n\n        self::assertTrue($sheet->getCell('F1')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F1')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('F1')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F4')->getStyle()->getFont()->getUnderline());\n\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C10')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C12')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C14')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C16')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THIN, $sheet->getCell('C18')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n    }\n\n    public function testLoadXlsxSheet2Contents(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals('Second', $sheet->getTitle());\n        self::assertSame('Hyperlink', $sheet->getCell('B2')->getValue());\n        $hyper = $sheet->getCell('B2')->getHyperlink();\n        self::assertSame('http://www.example.com/', $hyper->getUrl());\n        self::assertSame('Comment', $sheet->getCell('B3')->getValue());\n        $comment = $sheet->getComment('B3');\n        // Created as \"threaded comment\" with Excel 365, not quite as expected.\n        self::assertStringContainsString('This is a comment', (string) $comment);\n    }\n\n    public function testLoadXlsxSheet2Styles(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals('Second', $sheet->getTitle());\n        if (str_contains(__FILE__, 'NonStd')) {\n            self::markTestIncomplete('Not yet ready');\n        }\n        self::assertEquals('center', $sheet->getCell('A2')->getStyle()->getAlignment()->getHorizontal());\n        self::assertSame('inherit', $sheet->getCell('A2')->getStyle()->getProtection()->getLocked());\n        self::assertEquals('top', $sheet->getCell('A3')->getStyle()->getAlignment()->getVertical());\n        self::assertSame('unprotected', $sheet->getCell('A3')->getStyle()->getProtection()->getLocked());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/NumericCellTypeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as Reader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as Writer;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NumericCellTypeTest extends TestCase\n{\n    private IValueBinder $oldBinder;\n\n    private string $filename = '';\n\n    protected function setUp(): void\n    {\n        $this->oldBinder = Cell::getValueBinder();\n\n        $binder = new class () implements IValueBinder {\n            public function bindValue(Cell $cell, mixed $value): bool\n            {\n                if (is_float($value) || is_int($value)) {\n                    $type = DataType::TYPE_NUMERIC;\n                } elseif (is_string($value)) {\n                    $type = DataType::TYPE_STRING;\n                } else {\n                    return false;\n                }\n\n                $cell->setValueExplicit($value, $type);\n\n                return true;\n            }\n        };\n\n        Cell::setValueBinder($binder);\n    }\n\n    protected function tearDown(): void\n    {\n        Cell::setValueBinder($this->oldBinder);\n        if ($this->filename !== '') {\n            unlink($this->filename);\n            $this->filename = '';\n        }\n    }\n\n    public function testCellShouldHaveNumericTypeAttribute(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $array = [\n            ['1.0'],\n            [1.0],\n            ['-1.0'],\n            [-1.0],\n            ['0'],\n            [0],\n            ['0.0'],\n            [0.0],\n            ['1e1'],\n            [1e1],\n        ];\n        $sheet->fromArray($array, null, 'A1', true);\n\n        $this->filename = File::temporaryFilename();\n        $writer = new Writer($spreadsheet);\n        $writer->save($this->filename);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new Reader();\n        $spreadsheet2 = $reader->load($this->filename);\n\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertSame($array, $sheet2->toArray(null, false, false));\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/OctothorpeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass OctothorpeTest extends TestCase\n{\n    public function testOctothorpeInName(): void\n    {\n        // Permit # in file name.\n        $filename = 'tests/data/Reader/XLSX/octo#thorpe.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('xyz', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/OddColumnReadFilter.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\n/**\n * Show only cells from odd columns.\n */\nclass OddColumnReadFilter implements IReadFilter\n{\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        return (\\ord(\\substr($columnAddress, -1, 1)) % 2) === 1;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/OutlineTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass OutlineTest extends TestCase\n{\n    public function testOutline(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/outline.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(0, $sheet->getRowDimension(1)->getOutlineLevel());\n        self::assertSame(2, $sheet->getRowDimension(2)->getOutlineLevel());\n        self::assertFalse($sheet->getRowDimension(2)->getCollapsed());\n        self::assertTrue($sheet->getRowDimension(2)->getVisible());\n        self::assertSame('=SUBTOTAL(9,B2:B4)', $sheet->getCell('B5')->getValue());\n        self::assertSame(2, $sheet->getRowDimension(6)->getOutlineLevel());\n        self::assertFalse($sheet->getRowDimension(6)->getCollapsed());\n        self::assertFalse($sheet->getRowDimension(6)->getVisible());\n        self::assertSame(1, $sheet->getRowDimension(8)->getOutlineLevel());\n        self::assertTrue($sheet->getRowDimension(8)->getCollapsed());\n        self::assertTrue($sheet->getRowDimension(8)->getVisible());\n        $fake = new XlsxReader\\ColumnAndRowAttributes($sheet, null);\n        self::assertFalse($fake->load());\n        $writer = new XlsxWriter($spreadsheet);\n        $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString('<row r=\"7\" spans=\"1:2\" hidden=\"true\" outlineLevel=\"2\">', $data);\n        self::assertStringContainsString('<row r=\"8\" spans=\"1:2\" collapsed=\"true\" outlineLevel=\"1\">', $data);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/PageSetup2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageSetup2Test extends TestCase\n{\n    private const TESTBOOK = 'tests/data/Reader/XLSX/autofilter2.xlsx';\n\n    public function testHeaderFooter(): void\n    {\n        $spreadsheet = IOFactory::load(self::TESTBOOK);\n        $sheets = 0;\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            ++$sheets;\n            $hf = $worksheet->getHeaderFooter();\n            self::assertTrue($hf->getDifferentOddEven());\n            self::assertTrue($hf->getDifferentFirst());\n        }\n        self::assertSame(4, $sheets);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testColumnBreak(): void\n    {\n        $spreadsheet = IOFactory::load(self::TESTBOOK);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('colbreak');\n        $breaks = $sheet->getBreaks();\n        self::assertCount(1, $breaks);\n        $break = $breaks['D1'] ?? null;\n        self::assertNotNull($break);\n        self::assertSame($break, Worksheet::BREAK_COLUMN);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/PageSetupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageSetupTest extends TestCase\n{\n    private const MARGIN_PRECISION = 0.00000001;\n\n    private const MARGIN_UNIT_CONVERSION = 2.54; // Inches to cm\n\n    private const FILENAME = 'tests/data/Reader/XLSX/PageSetup.xlsx';\n\n    public function testPageSetup(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::FILENAME);\n        $assertions = $this->pageSetupAssertions();\n\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                continue;\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageSetup()->$testMethodName();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testPageMargins(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::FILENAME);\n        $assertions = $this->pageMarginAssertions();\n\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                continue;\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageMargins()->$testMethodName();\n                self::assertEqualsWithDelta(\n                    $expectedResult,\n                    $actualResult,\n                    self::MARGIN_PRECISION,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test} margin\"\n                );\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<array{orientation: string, scale: int, horizontalCentered: bool, verticalCentered: bool, pageOrder: string}> */\n    private function pageSetupAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 75,\n                'horizontalCentered' => true,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet2' => [\n                'orientation' => PageSetup::ORIENTATION_LANDSCAPE,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_OVER_THEN_DOWN,\n            ],\n            'Sheet3' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 90,\n                'horizontalCentered' => true,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet4' => [\n                // Default Settings\n                'orientation' => PageSetup::ORIENTATION_DEFAULT,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n        ];\n    }\n\n    /** @return array<array{top: float, header: float, left: float, right: float, bottom: float, footer: float}> */\n    private function pageMarginAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet2' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet3' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet4' => [\n                // Default Settings (already in inches for comparison)\n                'top' => 0.75,\n                'header' => 0.3,\n                'left' => 0.7,\n                'right' => 0.7,\n                'bottom' => 0.75,\n                'footer' => 0.3,\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/PropertiesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Document\\Properties;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass PropertiesTest extends AbstractFunctional\n{\n    public function testLoadXlsxWorkbookProperties(): void\n    {\n        $customPropertySet = [\n            'Publisher' => ['type' => Properties::PROPERTY_TYPE_STRING, 'value' => 'PHPOffice Suite'],\n            'Tested' => ['type' => Properties::PROPERTY_TYPE_BOOLEAN, 'value' => true],\n            'Counter' => ['type' => Properties::PROPERTY_TYPE_INTEGER, 'value' => 15],\n            'Rate' => ['type' => Properties::PROPERTY_TYPE_FLOAT, 'value' => 1.15],\n            'Refactor Date' => ['type' => Properties::PROPERTY_TYPE_DATE, 'value' => '2019-06-10'],\n        ];\n\n        $filename = 'tests/data/Reader/XLSX/propertyTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $properties = $spreadsheet->getProperties();\n        // Core Properties\n        self::assertSame('Mark Baker', $properties->getCreator());\n        self::assertSame('Unit Testing', $properties->getTitle());\n        self::assertSame('Property Test', $properties->getSubject());\n\n        // Extended Properties\n        self::assertSame('PHPOffice', $properties->getCompany());\n        self::assertSame('The Big Boss', $properties->getManager());\n\n        // Custom Properties\n        $customProperties = $properties->getCustomProperties();\n        $customProperties = array_flip($customProperties);\n        self::assertArrayHasKey('Publisher', $customProperties);\n\n        foreach ($customPropertySet as $propertyName => $testData) {\n            self::assertTrue($properties->isCustomPropertySet($propertyName));\n            self::assertSame($testData['type'], $properties->getCustomPropertyType($propertyName));\n            /** @var float|int */\n            $result = $properties->getCustomPropertyValue($propertyName);\n            if ($properties->getCustomPropertyType($propertyName) == Properties::PROPERTY_TYPE_DATE) {\n                $result = Date::formattedDateTimeFromTimestamp(\"$result\", 'Y-m-d', new DateTimeZone('UTC'));\n            }\n            self::assertSame($testData['value'], $result);\n        }\n    }\n\n    public function testReloadXlsxWorkbookProperties(): void\n    {\n        $customPropertySet = [\n            'Publisher' => ['type' => Properties::PROPERTY_TYPE_STRING, 'value' => 'PHPOffice Suite'],\n            'Tested' => ['type' => Properties::PROPERTY_TYPE_BOOLEAN, 'value' => true],\n            'Counter' => ['type' => Properties::PROPERTY_TYPE_INTEGER, 'value' => 15],\n            'Rate' => ['type' => Properties::PROPERTY_TYPE_FLOAT, 'value' => 1.15],\n            'Refactor Date' => ['type' => Properties::PROPERTY_TYPE_DATE, 'value' => '2019-06-10'],\n        ];\n\n        $filename = 'tests/data/Reader/XLSX/propertyTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheetOld = $reader->load($filename);\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Xlsx');\n\n        $properties = $spreadsheet->getProperties();\n        // Core Properties\n        self::assertSame('Mark Baker', $properties->getCreator());\n        self::assertSame('Unit Testing', $properties->getTitle());\n        self::assertSame('Property Test', $properties->getSubject());\n\n        // Extended Properties\n        self::assertSame('PHPOffice', $properties->getCompany());\n        self::assertSame('The Big Boss', $properties->getManager());\n\n        // Custom Properties\n        $customProperties = $properties->getCustomProperties();\n        $customProperties = array_flip($customProperties);\n        self::assertArrayHasKey('Publisher', $customProperties);\n\n        foreach ($customPropertySet as $propertyName => $testData) {\n            self::assertTrue($properties->isCustomPropertySet($propertyName));\n            self::assertSame($testData['type'], $properties->getCustomPropertyType($propertyName));\n            /** @var float|int */\n            $result = $properties->getCustomPropertyValue($propertyName);\n            if ($properties->getCustomPropertyType($propertyName) == Properties::PROPERTY_TYPE_DATE) {\n                $result = Date::formattedDateTimeFromTimestamp(\"$result\", 'Y-m-d', new DateTimeZone('UTC'));\n            }\n            self::assertSame($testData['value'], $result);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/ReadDynamTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ReadDynamTest extends AbstractFunctional\n{\n    public function writeCse(XlsxWriter $writer): void\n    {\n        $writer->setUseCSEArrays(true);\n    }\n\n    public function testCse(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheetOld = $spreadsheetOld->getActiveSheet();\n        $calcOld = Calculation::getInstance($spreadsheetOld);\n        $calcOld->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n        $sheetOld->fromArray(\n            [1, 2, 2, 4, 3, 2, 1, 3, 3, 3, 5],\n            null,\n            'A14',\n            true\n        );\n        $sheetOld->setCellValue('A15', '=UNIQUE(A14:K14, TRUE)');\n        /** @var callable */\n        $callableWriter = [$this, 'writeCse'];\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Xlsx', null, $callableWriter);\n        $spreadsheetOld->disconnectWorksheets();\n        $calc = Calculation::getInstance($spreadsheet);\n        self::assertSame(\n            Calculation::RETURN_ARRAY_AS_VALUE,\n            $calc->getInstanceArrayReturnType()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDynam(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheetOld = $spreadsheetOld->getActiveSheet();\n        $calcOld = Calculation::getInstance($spreadsheetOld);\n        $calcOld->setInstanceArrayReturnType(\n            Calculation::RETURN_ARRAY_AS_ARRAY\n        );\n        $sheetOld->fromArray(\n            [1, 2, 2, 4, 3, 2, 1, 3, 3, 3, 5],\n            null,\n            'A14',\n            true\n        );\n        $sheetOld->setCellValue('A15', '=UNIQUE(A14:K14, TRUE)');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheetOld, 'Xlsx');\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Xlsx');\n        $spreadsheetOld->disconnectWorksheets();\n        $calc = Calculation::getInstance($spreadsheet);\n        self::assertSame(\n            Calculation::RETURN_ARRAY_AS_ARRAY,\n            $calc->getInstanceArrayReturnType()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/RgbTintTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RgbTintTest extends TestCase\n{\n    public static function compareColors(string $style, string $text): string\n    {\n        $styleRed = hexdec(substr($style, 0, 2));\n        $styleGreen = hexdec(substr($style, 2, 2));\n        $styleBlue = hexdec(substr($style, 4, 2));\n        $textRed = hexdec(substr($text, 0, 2));\n        $textGreen = hexdec(substr($text, 2, 2));\n        $textBlue = hexdec(substr($text, 4, 2));\n        $maxDiff = 3;\n        if (abs($styleRed - $textRed) > $maxDiff) {\n            return $style;\n        }\n        if (abs($styleGreen - $textGreen) > $maxDiff) {\n            return $style;\n        }\n        if (abs($styleBlue - $textBlue) > $maxDiff) {\n            return $style;\n        }\n\n        return $text;\n    }\n\n    public function testRgbTint(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/RgbTint.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $row = 0;\n        while (true) {\n            ++$row;\n            $text = (string) $sheet->getCell(\"B$row\");\n            if ($text === '') {\n                break;\n            }\n            $style = $sheet->getStyle(\"A$row\")->getFill()->getStartColor()->getRgb();\n            self::assertSame($text, self::compareColors($style, $text), \"row $row\");\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/RibbonTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass RibbonTest extends AbstractFunctional\n{\n    /**\n     * Test read/rewrite spreadsheet with ribbon data.\n     */\n    public function testRibbon(): void\n    {\n        // The following file is downloaded, with the author's\n        // permission, from:\n        // https://www.rondebruin.nl/win/s2/win003.htm\n        // It is renamed, including changing its extension to zip.\n        $filename = 'tests/data/Reader/XLSX/ribbon.donotopen.zip';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        self::assertTrue($spreadsheet->hasRibbon());\n        $target = $spreadsheet->getRibbonXMLData('target');\n        self::assertSame('customUI/customUI.xml', $target);\n        $data = $spreadsheet->getRibbonXMLData('data');\n        self::assertIsString($data);\n        self::assertSame(1522, strlen($data));\n        $vbaCode = (string) $spreadsheet->getMacrosCode();\n        self::assertSame(13312, strlen($vbaCode));\n        self::assertNull($spreadsheet->getRibbonBinObjects());\n        foreach (['names', 'data', 'xxxxx'] as $type) {\n            self::assertNull($spreadsheet->getRibbonBinObjects($type), \"Expecting null when type is $type\");\n        }\n        self::assertEmpty($spreadsheet->getRibbonBinObjects('types'));\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertTrue($reloadedSpreadsheet->hasRibbon());\n        $ribbonData = $reloadedSpreadsheet->getRibbonXmlData();\n        self::assertIsArray($ribbonData);\n        self::assertSame($target, $ribbonData['target'] ?? '');\n        self::assertSame($data, $ribbonData['data'] ?? '');\n        self::assertSame($vbaCode, $reloadedSpreadsheet->getMacrosCode());\n        self::assertNull($reloadedSpreadsheet->getRibbonBinObjects());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Same as above but discard macros.\n     */\n    public function testDiscardMacros(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/ribbon.donotopen.zip';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        self::assertTrue($spreadsheet->hasRibbon());\n        $target = $spreadsheet->getRibbonXMLData('target');\n        self::assertSame('customUI/customUI.xml', $target);\n        $data = $spreadsheet->getRibbonXMLData('data');\n        self::assertIsString($data);\n        self::assertSame(1522, strlen($data));\n        $vbaCode = (string) $spreadsheet->getMacrosCode();\n        self::assertSame(13312, strlen($vbaCode));\n        $spreadsheet->discardMacros();\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertTrue($reloadedSpreadsheet->hasRibbon());\n        $ribbonData = $reloadedSpreadsheet->getRibbonXmlData();\n        self::assertIsArray($ribbonData);\n        self::assertSame($target, $ribbonData['target'] ?? '');\n        self::assertSame($data, $ribbonData['data'] ?? '');\n        self::assertNull($reloadedSpreadsheet->getMacrosCode());\n        self::assertNull($reloadedSpreadsheet->getRibbonBinObjects());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/RichTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass RichTextTest extends AbstractFunctional\n{\n    public function testRichTextColors(): void\n    {\n        $spreadsheetOld = new Spreadsheet();\n        $sheet = $spreadsheetOld->getActiveSheet();\n        $richText = new RichText();\n        $part1 = $richText->createTextRun('Red');\n        $font1 = $part1->getFont();\n        if ($font1 !== null) {\n            $font1->setName('Courier New');\n            $font1->getColor()->setArgb('FFFF0000');\n        }\n        $part2 = $richText->createTextRun('Blue');\n        $font2 = $part2->getFont();\n        if ($font2 !== null) {\n            $font2->setName('Times New Roman');\n            $font2->setItalic(true);\n            $font2->getColor()->setArgb('FF0000FF');\n        }\n        $sheet->setCellValue('A1', $richText);\n\n        $spreadsheet = $this->writeAndReload($spreadsheetOld, 'Xlsx');\n        $spreadsheetOld->disconnectWorksheets();\n        $rsheet = $spreadsheet->getActiveSheet();\n        $value = $rsheet->getCell('A1')->getValue();\n        if ($value instanceof RichText) {\n            $elements = $value->getRichTextElements();\n            self::assertCount(2, $elements);\n            $font1a = $elements[0]->getFont();\n            $font2a = $elements[1]->getFont();\n            self::assertNotNull($font1a);\n            self::assertNotNull($font2a);\n            self::assertSame('Courier New', $font1a->getName());\n            self::assertSame('FFFF0000', $font1a->getColor()->getArgb());\n            self::assertFalse($font1a->getItalic());\n            self::assertSame('Times New Roman', $font2a->getName());\n            self::assertSame('FF0000FF', $font2a->getColor()->getArgb());\n            self::assertTrue($font2a->getItalic());\n        } else {\n            self::fail('Did not see expected RichText');\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/RowBreakTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowBreakTest extends TestCase\n{\n    public function testReadAndWriteRowBreak(): void\n    {\n        $file = 'tests/data/Reader/XLSX/issue.3143a.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getActiveSheet();\n        $writer = new XlsxWriter($spreadsheet);\n        $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        $expected = '<rowBreaks count=\"1\" manualBreakCount=\"1\"><brk id=\"25\" man=\"1\" max=\"11\"/></rowBreaks>';\n        self::assertStringContainsString($expected, $data);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWriteRowBreakInPrintAreaWithMax(): void\n    {\n        // This test specifies max for setBreak and appears correct.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        for ($row = 1; $row < 60; ++$row) {\n            for ($column = 'A'; $column !== 'L'; StringHelper::stringIncrement($column)) {\n                $cell = $column . $row;\n                $sheet->getCell($cell)->setValue($cell);\n            }\n        }\n        $sheet->getPageSetup()->setPrintArea('B2:J55');\n        $sheet->setBreak('A25', Worksheet::BREAK_ROW, Worksheet::BREAK_ROW_MAX_COLUMN);\n        $writer = new XlsxWriter($spreadsheet);\n        $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        $expected = '<rowBreaks count=\"1\" manualBreakCount=\"1\"><brk id=\"25\" man=\"1\" max=\"16383\"/></rowBreaks>';\n        self::assertStringContainsString($expected, $data);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWriteRowBreakInPrintAreaWithoutMax(): void\n    {\n        // This test does not specify max for setBreak,\n        // and appears incorrect. Probable Excel bug.\n        // See issue #1275, which now has a fix.\n        // And I agree that the fix probably indicates an Excel bug.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        for ($row = 1; $row < 60; ++$row) {\n            for ($column = 'A'; $column !== 'L'; StringHelper::stringIncrement($column)) {\n                $cell = $column . $row;\n                $sheet->getCell($cell)->setValue($cell);\n            }\n        }\n        $sheet->getPageSetup()->setPrintArea('B2:J55');\n        $sheet->setBreak('A25', Worksheet::BREAK_ROW);\n        $writer = new XlsxWriter($spreadsheet);\n        $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        $expected = '<rowBreaks count=\"1\" manualBreakCount=\"1\"><brk id=\"25\" man=\"1\" max=\"11\"/></rowBreaks>';\n        self::assertStringContainsString($expected, $data);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/SharedFormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SharedFormulaTest extends TestCase\n{\n    private static string $testbook = 'samples/templates/32readwriteAreaChart1.xlsx';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::$testbook;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains shared formula\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c r=\"D6\"><f t=\"shared\" ca=\"1\" si=\"0\"/>', $data);\n            self::assertStringContainsString('<c r=\"E6\"><f t=\"shared\" ca=\"1\" si=\"0\"/>', $data);\n        }\n    }\n\n    public function testLoadSheetsXlsxChart(): void\n    {\n        $filename = self::$testbook;\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename, IReader::LOAD_WITH_CHARTS);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('=(RANDBETWEEN(-50,250)+100)*10', $sheet->getCell('D6')->getValue());\n        self::assertSame('=(RANDBETWEEN(-50,250)+100)*10', $sheet->getCell('E6')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/SharedFormulaeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SharedFormulaeTest extends TestCase\n{\n    public function testSharedFormulae(): void\n    {\n        // Boolean functions were not handled correctly.\n        $filename = 'tests/data/Reader/XLSX/sharedformulae.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $expected = [\n            [1, '=A1+1', '=A1>3', '=\"x\"&A1'],\n            [2, '=A2+1', '=A2>3', '=\"x\"&A2'],\n            [3, '=A3+1', '=A3>3', '=\"x\"&A3'],\n            [4, '=A4+1', '=A4>3', '=\"x\"&A4'],\n            [5, '=A5+1', '=A5>3', '=\"x\"&A5'],\n        ];\n        self::assertSame($expected, $sheet->toArray(null, false, false));\n        $expected = [\n            [1, 2, false, 'x1'],\n            [2, 3, false, 'x2'],\n            [3, 4, false, 'x3'],\n            [4, 5, true, 'x4'],\n            [5, 6, true, 'x5'],\n        ];\n        self::assertSame($expected, $sheet->toArray(null, true, false));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/SheetProtectionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass SheetProtectionTest extends AbstractFunctional\n{\n    private const FILENAME = 'tests/data/Reader/XLSX/sheetprotect.xlsx';\n\n    public function testSheetProtection(): void\n    {\n        $reader = new Xlsx();\n        $originalSpreadsheet = $reader->load(self::FILENAME);\n        $spreadsheet = $this->writeAndReload($originalSpreadsheet, 'Xlsx');\n        $originalSpreadsheet->disconnectWorksheets();\n        $assertions = $this->pageSetupAssertions();\n\n        foreach ($spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                continue;\n            }\n\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getProtection()->$testMethodName();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        $protection0 = $spreadsheet->getSheet(0)->getProtection();\n        self::assertTrue($protection0->verify('password'));\n        self::assertFalse($protection0->verify('passwordx'));\n        $protection1 = $spreadsheet->getSheet(1)->getProtection();\n        self::assertTrue($protection1->verify('anything'), 'no password so anything works');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<array{sheet: ?bool, autoFilter: ?bool, formatCells: ?bool, formatColumns: ?bool, formatRows: ?bool, insertColumns: ?bool, insertHyperlinks: ?bool, insertRows: ?bool, deleteColumns: ?bool, deleteRows: ?bool, objects: ?bool, pivotTables: ?bool, scenarios: ?bool, selectLockedCells: ?bool, selectUnlockedCells: ?bool, sort: ?bool, algorithm: string, spinCount: int}> */\n    private function pageSetupAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'sheet' => true,\n                'autoFilter' => null,\n                'formatCells' => null,\n                'formatColumns' => null,\n                'formatRows' => false,\n                'insertColumns' => null,\n                'insertHyperlinks' => null,\n                'insertRows' => null,\n                'deleteColumns' => false,\n                'deleteRows' => null,\n                'objects' => true,\n                'pivotTables' => null,\n                'scenarios' => null,\n                'selectLockedCells' => null,\n                'selectUnlockedCells' => null,\n                'sort' => false,\n                'algorithm' => 'SHA-512',\n                'spinCount' => 100000,\n            ],\n            'Sheet2' => [\n                'sheet' => true,\n                'autoFilter' => null,\n                'formatCells' => false,\n                'formatColumns' => false,\n                'formatRows' => false,\n                'insertColumns' => false,\n                'insertHyperlinks' => null,\n                'insertRows' => null,\n                'deleteColumns' => null,\n                'deleteRows' => null,\n                'objects' => true,\n                'pivotTables' => null,\n                'scenarios' => true,\n                'selectLockedCells' => null,\n                'selectUnlockedCells' => null,\n                'sort' => null,\n                'algorithm' => '',\n                'spinCount' => 10000,\n            ],\n            'Sheet3' => [\n                'sheet' => true,\n                'autoFilter' => null,\n                'formatCells' => null,\n                'formatColumns' => null,\n                'formatRows' => null,\n                'insertColumns' => null,\n                'insertHyperlinks' => false,\n                'insertRows' => null,\n                'deleteColumns' => null,\n                'deleteRows' => null,\n                'objects' => null,\n                'pivotTables' => null,\n                'scenarios' => true,\n                'selectLockedCells' => true,\n                'selectUnlockedCells' => true,\n                'sort' => null,\n                'algorithm' => '',\n                'spinCount' => 10000,\n            ],\n            'Sheet4' => [\n                'sheet' => null,\n                'autoFilter' => null,\n                'formatCells' => null,\n                'formatColumns' => null,\n                'formatRows' => null,\n                'insertColumns' => null,\n                'insertHyperlinks' => null,\n                'insertRows' => null,\n                'deleteColumns' => null,\n                'deleteRows' => null,\n                'objects' => null,\n                'pivotTables' => null,\n                'scenarios' => null,\n                'selectLockedCells' => null,\n                'selectUnlockedCells' => null,\n                'sort' => null,\n                'algorithm' => '',\n                'spinCount' => 10000,\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/SheetsXlsxChartTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\DataSeries;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SheetsXlsxChartTest extends TestCase\n{\n    public function testLoadSheetsXlsxChart(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/sheetsChartsTest.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename, IReader::LOAD_WITH_CHARTS);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $charts = $worksheet->getChartCollection();\n        self::assertEquals(2, $worksheet->getChartCount());\n        self::assertCount(2, $charts);\n\n        $chart1 = $charts[0];\n        self::assertNotNull($chart1);\n        $pa1 = $chart1->getPlotArea();\n        self::assertNotNull($pa1);\n        self::assertEquals(2, $pa1->getPlotSeriesCount());\n\n        $pg1 = $pa1->getPlotGroup()[0];\n\n        self::assertEquals(DataSeries::TYPE_LINECHART, $pg1->getPlotType());\n        self::assertCount(2, $pg1->getPlotLabels());\n        self::assertCount(2, $pg1->getPlotValues());\n        self::assertCount(2, $pg1->getPlotCategories());\n\n        $chart2 = $charts[1];\n        self::assertNotNull($chart2);\n        $pa1 = $chart2->getPlotArea();\n        self::assertNotNull($pa1);\n        self::assertEquals(2, $pa1->getPlotSeriesCount());\n\n        $pg1 = $pa1->getPlotGroupByIndex(0);\n        //Before a refresh, data values are empty\n        foreach ($pg1->getPlotValues() as $dv) {\n            self::assertEmpty($dv->getPointCount());\n        }\n        $pg1->refresh($worksheet);\n        foreach ($pg1->getPlotValues() as $dv) {\n            self::assertEquals(9, $dv->getPointCount());\n        }\n        self::assertEquals(DataSeries::TYPE_SCATTERCHART, $pg1->getPlotType());\n        self::assertCount(2, $pg1->getPlotLabels());\n        self::assertCount(2, $pg1->getPlotValues());\n        self::assertCount(2, $pg1->getPlotCategories());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/SplitsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass SplitsTest extends AbstractFunctional\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/splits.xlsx';\n\n    public function testSplits(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load(self::$testbook);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('Freeze');\n        self::assertSame('E7', $sheet->getFreezePane());\n        self::assertSame('frozen', $sheet->getPaneState());\n        self::assertSame('L7', $sheet->getPaneTopLeftCell());\n        self::assertSame('L7', $sheet->getTopLeftCell());\n        self::assertSame('L7', $sheet->getSelectedCells());\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('SplitVertical');\n        self::assertNull($sheet->getFreezePane());\n        self::assertSame('G1', $sheet->getTopLeftCell());\n        self::assertSame('E1', $sheet->getPaneTopLeftCell());\n        self::assertSame('E1', $sheet->getSelectedCells());\n        self::assertNotEquals(0, $sheet->getXSplit());\n        self::assertEquals(0, $sheet->getYSplit());\n        self::assertNotNull($sheet->getPane('topRight'));\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('SplitHorizontal');\n        self::assertNull($sheet->getFreezePane());\n        self::assertSame('A3', $sheet->getTopLeftCell());\n        self::assertSame('A6', $sheet->getPaneTopLeftCell());\n        self::assertSame('A7', $sheet->getSelectedCells());\n        self::assertEquals(0, $sheet->getXSplit());\n        self::assertNotEquals(0, $sheet->getYSplit());\n        self::assertNotNull($sheet->getPane('bottomLeft'));\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('SplitBoth');\n        self::assertNull($sheet->getFreezePane());\n        self::assertSame('H3', $sheet->getTopLeftCell());\n        self::assertSame('E19', $sheet->getPaneTopLeftCell());\n        self::assertSame('E20', $sheet->getSelectedCells());\n        self::assertNotEquals(0, $sheet->getXSplit());\n        self::assertNotEquals(0, $sheet->getYSplit());\n        self::assertNotNull($sheet->getPane('bottomLeft'));\n        self::assertNotNull($sheet->getPane('bottomRight'));\n        self::assertNotNull($sheet->getPane('topRight'));\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('NoFreezeNorSplit');\n        self::assertNull($sheet->getFreezePane());\n        self::assertSame('D3', $sheet->getTopLeftCell());\n        self::assertSame('', $sheet->getPaneTopLeftCell());\n        self::assertSame('D5', $sheet->getSelectedCells());\n        self::assertNull($sheet->getPane('bottomLeft'));\n        self::assertNull($sheet->getPane('bottomRight'));\n        self::assertNull($sheet->getPane('topRight'));\n\n        $sheet = $reloadedSpreadsheet->getSheetByNameOrThrow('FrozenSplit');\n        self::assertSame('B4', $sheet->getFreezePane());\n        self::assertSame('frozenSplit', $sheet->getPaneState());\n        self::assertSame('B4', $sheet->getPaneTopLeftCell());\n        self::assertSame('B4', $sheet->getTopLeftCell());\n        self::assertSame('B4', $sheet->getSelectedCells());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/TableTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableStyle;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TableTest extends TestCase\n{\n    public function testLoadTable(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/tableTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $tables = $worksheet->getTableCollection();\n        self::assertCount(1, $tables);\n\n        $table = $tables->offsetGet(0);\n        self::assertInstanceOf(Table::class, $table);\n        self::assertEquals('SalesData', $table->getName());\n        self::assertEquals('A1:G16', $table->getRange());\n        self::assertTrue($table->getShowHeaderRow(), 'ShowHeaderRow');\n        self::assertTrue($table->getShowTotalsRow(), 'ShowTotalsRow');\n        self::assertTrue($table->getAllowFilter(), 'Allow Filter');\n\n        self::assertEquals('Total', $table->getColumn('B')->getTotalsRowLabel());\n        self::assertEquals('sum', $table->getColumn('G')->getTotalsRowFunction());\n        self::assertEquals('SUM(SalesData[[#This Row],[Q1]:[Q4]])', $table->getColumn('G')->getColumnFormula());\n\n        $tableStyle = $table->getStyle();\n        self::assertEquals(TableStyle::TABLE_STYLE_MEDIUM4, $tableStyle->getTheme());\n        self::assertTrue($tableStyle->getShowRowStripes(), 'ShowRowStripes');\n        self::assertFalse($tableStyle->getShowColumnStripes(), 'ShowColumnStripes');\n        self::assertFalse($tableStyle->getShowFirstColumn(), 'ShowFirstColumn');\n        self::assertTrue($tableStyle->getShowLastColumn(), 'ShowLastColumn');\n    }\n\n    public function testLoadTableNoFilter(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/TableWithoutFilter.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $tables = $worksheet->getTableCollection();\n        self::assertCount(1, $tables);\n\n        $table = $tables->offsetGet(0);\n        self::assertInstanceOf(Table::class, $table);\n        self::assertFalse($table->getAllowFilter(), 'Allow Filter');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/URLImageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheetTests\\Reader\\Utility\\File;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass URLImageTest extends TestCase\n{\n    public function testDefault(): void\n    {\n        $reader = new XlsxReader();\n        self::assertFalse($reader->getAllowExternalImages());\n    }\n\n    public function testURLImageSourceAllowed(): void\n    {\n        if (getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $filename = realpath('tests/data/Reader/XLSX/urlImage.xlsx');\n        self::assertNotFalse($filename);\n        $reader = IOFactory::createReader('Xlsx');\n        $reader->setAllowExternalImages(true);\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $collection = $worksheet->getDrawingCollection();\n        self::assertCount(1, $collection);\n\n        foreach ($collection as $drawing) {\n            self::assertInstanceOf(Drawing::class, $drawing);\n            // Check if the source is a URL or a file path\n            self::assertTrue($drawing->getIsURL());\n            self::assertSame(\n                'https://phpspreadsheet.readthedocs.io/en/latest'\n                . '/topics/images/01-03-filter-icon-1.png',\n                $drawing->getPath()\n            );\n            self::assertSame(IMAGETYPE_PNG, $drawing->getType());\n            self::assertSame(84, $drawing->getWidth());\n            self::assertSame(44, $drawing->getHeight());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testURLImageSourceAllowedFlag(): void\n    {\n        if (getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $filename = realpath('tests/data/Reader/XLSX/urlImage.xlsx');\n        self::assertNotFalse($filename);\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename, XlsxReader::ALLOW_EXTERNAL_IMAGES);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $collection = $worksheet->getDrawingCollection();\n        self::assertCount(1, $collection);\n\n        foreach ($collection as $drawing) {\n            self::assertInstanceOf(Drawing::class, $drawing);\n            // Check if the source is a URL or a file path\n            self::assertTrue($drawing->getIsURL());\n            self::assertSame(\n                'https://phpspreadsheet.readthedocs.io/en/latest'\n                    . '/topics/images/01-03-filter-icon-1.png',\n                $drawing->getPath()\n            );\n            self::assertSame(IMAGETYPE_PNG, $drawing->getType());\n            self::assertSame(84, $drawing->getWidth());\n            self::assertSame(44, $drawing->getHeight());\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function suppliedWhiteList(string $path): bool\n    {\n        return str_ends_with($path, 'autofilter.png');\n    }\n\n    public static function externalImagesWhitelistProvider(): array\n    {\n        return [\n            'twoCellAnchor' => ['tests/data/Reader/XLSX/urlImage2.xlsx', 'A1', 'D7'],\n            'oneCellAnchor' => ['tests/data/Reader/XLSX/urlImage2.onecell.xlsx', 'A1', ''],\n        ];\n    }\n\n    #[DataProvider('externalImagesWhitelistProvider')]\n    public function testExternalImagesWhitelist(string $path, string $coordinates, string $coordinates2): void\n    {\n        if (getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $filename = realpath($path);\n        self::assertNotFalse($filename);\n        $reader = new XlsxReader();\n        $reader->setAllowExternalImages(true)\n            ->setIsWhitelisted($this->suppliedWhiteList(...));\n        $spreadsheet = $reader->load($filename);\n        $sheet1 = $spreadsheet->getSheetByNameOrThrow('Sheet1');\n        $drawings1 = $sheet1->getDrawingCollection();\n        self::assertCount(0, $drawings1);\n        $sheet2 = $spreadsheet->getSheetByNameOrThrow('Sheet2');\n        $drawings2 = $sheet2->getDrawingCollection();\n        self::assertCount(1, $drawings2);\n        $drawing = $drawings2[0];\n        self::assertInstanceOf(Drawing::class, $drawing);\n        self::assertSame(\n            'https://phpspreadsheet.readthedocs.io/en/latest'\n                . '/topics/images/01-02-autofilter.png',\n            $drawing->getPath()\n        );\n        self::assertSame($coordinates, $drawing->getCoordinates());\n        self::assertSame($coordinates2, $drawing->getCoordinates2());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testExternalImagesNoWhitelist(): void\n    {\n        if (getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $filename = realpath('tests/data/Reader/XLSX/urlImage2.xlsx');\n        self::assertNotFalse($filename);\n        $reader = new XlsxReader();\n        $reader->setAllowExternalImages(true);\n        $spreadsheet = $reader->load($filename);\n        $sheet1 = $spreadsheet->getSheetByNameOrThrow('Sheet1');\n        $drawings1 = $sheet1->getDrawingCollection();\n        self::assertCount(1, $drawings1);\n        $drawing1 = $drawings1[0];\n        self::assertInstanceOf(Drawing::class, $drawing1);\n        self::assertSame(\n            'https://phpspreadsheet.readthedocs.io/en/latest'\n                . '/topics/images/01-03-filter-icon-1.png',\n            $drawing1->getPath()\n        );\n        $sheet2 = $spreadsheet->getSheetByNameOrThrow('Sheet2');\n        $drawings2 = $sheet2->getDrawingCollection();\n        self::assertCount(2, $drawings2);\n        $drawing2a = $drawings2[0];\n        self::assertInstanceOf(Drawing::class, $drawing2a);\n        self::assertSame(\n            'https://phpspreadsheet.readthedocs.io/en/latest'\n                . '/topics/images/01-02-autofilter.png',\n            $drawing2a->getPath()\n        );\n        $drawing2b = $drawings2[1];\n        self::assertInstanceOf(Drawing::class, $drawing2b);\n        self::assertSame(\n            'https://phpspreadsheet.readthedocs.io/en/latest'\n                . '/topics/images/01-03-filter-icon-1.png',\n            $drawing2b->getPath()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testURLImageSourceNotAllowed(): void\n    {\n        $filename = realpath('tests/data/Reader/XLSX/urlImage.xlsx');\n        self::assertNotFalse($filename);\n        $reader = IOFactory::createReader('Xlsx');\n        $reader->setAllowExternalImages(false);\n        self::assertFalse($reader->getAllowExternalImages());\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $collection = $worksheet->getDrawingCollection();\n        self::assertCount(0, $collection);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testURLImageSourceNotFoundAllowed(): void\n    {\n        if (getenv('SKIP_URL_IMAGE_TEST') === '1') {\n            self::markTestSkipped('Skipped due to setting of environment variable');\n        }\n        $filename = realpath('tests/data/Reader/XLSX/urlImage.notfound.xlsx');\n        self::assertNotFalse($filename);\n        $reader = IOFactory::createReader('Xlsx');\n        $reader->setAllowExternalImages(true);\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $collection = $worksheet->getDrawingCollection();\n        self::assertCount(0, $collection);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testURLImageSourceNotFoundNotAllowed(): void\n    {\n        $filename = realpath('tests/data/Reader/XLSX/urlImage.notfound.xlsx');\n        self::assertNotFalse($filename);\n        $reader = IOFactory::createReader('Xlsx');\n        $reader->setAllowExternalImages(false);\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $collection = $worksheet->getDrawingCollection();\n        self::assertCount(0, $collection);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testURLImageSourceNotFoundNotAllowedFlag(): void\n    {\n        $filename = realpath('tests/data/Reader/XLSX/urlImage.notfound.xlsx');\n        self::assertNotFalse($filename);\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename, XlsxReader::DONT_ALLOW_EXTERNAL_IMAGES);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $collection = $worksheet->getDrawingCollection();\n        self::assertCount(0, $collection);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testURLImageSourceBadProtocol(): void\n    {\n        $filename = realpath('tests/data/Reader/XLSX/urlImage.bad.dontuse');\n        self::assertNotFalse($filename);\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Invalid protocol for linked drawing');\n        $reader = IOFactory::createReader('Xlsx');\n        $reader->load($filename);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/UnderscoreTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass UnderscoreTest extends AbstractFunctional\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Spreadsheet $reloadedSpreadsheet = null;\n\n    private const TEST_FILE = 'tests/data/Reader/XLSX/issue.4724.xlsx';\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->reloadedSpreadsheet !== null) {\n            $this->reloadedSpreadsheet->disconnectWorksheets();\n            $this->reloadedSpreadsheet = null;\n        }\n    }\n\n    #[DataProvider('underscoreProvider')]\n    public function testUnderscore(string $value): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', $value);\n        $this->reloadedSpreadsheet = $this->writeAndReload($this->spreadsheet, 'Xlsx');\n        $rsheet = $this->reloadedSpreadsheet->getActiveSheet();\n        self::assertSame($value, $rsheet->getCell('A1')->getValue());\n    }\n\n    #[DataProvider('underscoreProvider')]\n    public function testUnderscoreInline(string $value): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setCellValueExplicit('A1', $value, DataType::TYPE_INLINE);\n        $this->reloadedSpreadsheet = $this->writeAndReload($this->spreadsheet, 'Xlsx');\n        $rsheet = $this->reloadedSpreadsheet->getActiveSheet();\n        self::assertSame($value, $rsheet->getCell('A1')->getValueString());\n    }\n\n    public static function underscoreProvider(): array\n    {\n        return [\n            ['A_x0030_'],\n            ['A_x0030_B'],\n            ['A_B'],\n        ];\n    }\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::TEST_FILE;\n        $file .= '#xl/sharedStrings.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('count=\"8\"', $data);\n            self::assertStringContainsString(\n                \"<t>line_x000D_\\nwith_x000D_\\nbreaks</t>\",\n                $data\n            );\n            self::assertStringContainsString('<t>A_x005F_x0030_B</t>', $data);\n            self::assertStringContainsString(\n                '<t>ABC_x0031__x0032__x0033_DEF</t>',\n                $data\n            );\n            self::assertStringContainsString('<t>_xC1EF_</t>', $data);\n            self::assertStringContainsString('<t>_xD801__xDC05_</t>', $data);\n            self::assertStringContainsString('<t>_xD801__x0038_</t>', $data);\n            self::assertStringContainsString('<t>_x0039__xDC05_</t>', $data);\n            self::assertStringContainsString('<t>_xDF39__xDC05_</t>', $data);\n        }\n    }\n\n    public function testX000dPreserved(): void\n    {\n        $reader = new XlsxReader();\n        $binder = new DefaultValueBinder();\n        $binder->setPreserveCr(true);\n        $reader->setValueBinder($binder);\n        $infile = self::TEST_FILE;\n        $this->spreadsheet = $reader->load($infile);\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $expected = \"line\\r\\nwith\\r\\nbreaks\";\n        self::assertSame($expected, $sheet->getCell('A1')->getValue());\n        $expected = 'A_x0030_B';\n        self::assertSame($expected, $sheet->getCell('A2')->getValue());\n        $expected = 'ABC123DEF';\n        self::assertSame($expected, $sheet->getCell('A3')->getValue());\n        $expected = '쇯';\n        self::assertSame($expected, $sheet->getCell('A4')->getValue());\n        $expected = '𐐅';\n        self::assertSame($expected, $sheet->getCell('A5')->getValue(), 'outside BMP');\n        $expected = '�8';\n        self::assertSame($expected, $sheet->getCell('A6')->getValue(), 'high surrogate without low');\n        $expected = '9�';\n        self::assertSame($expected, $sheet->getCell('A7')->getValue(), 'low surrogate without high');\n        $expected = '�';\n        self::assertSame($expected, $sheet->getCell('A8')->getValue(), '2 low surrogates');\n    }\n\n    public function testX000dNotPreserved(): void\n    {\n        $reader = new XlsxReader();\n        $infile = self::TEST_FILE;\n        $this->spreadsheet = $reader->load($infile);\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $expected = \"line\\nwith\\nbreaks\";\n        self::assertSame($expected, $sheet->getCell('A1')->getValue());\n        $expected = 'A_x0030_B';\n        self::assertSame($expected, $sheet->getCell('A2')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/VerticalAlignTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PHPUnit\\Framework\\TestCase;\n\nclass VerticalAlignTest extends TestCase\n{\n    public function testVerticalAlignStyle(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/verticalAlignTest.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $sheet = $reader->load($filename)->getActiveSheet();\n\n        self::assertTrue($sheet->getCell('A1')->getStyle()->getFont()->getSuperscript());\n        self::assertFalse($sheet->getCell('A1')->getStyle()->getFont()->getSubscript());\n\n        self::assertTrue($sheet->getCell('B1')->getStyle()->getFont()->getSubscript());\n        self::assertFalse($sheet->getCell('B1')->getStyle()->getFont()->getSuperscript());\n\n        self::assertFalse($sheet->getCell('C1')->getStyle()->getFont()->getSubscript());\n        self::assertFalse($sheet->getCell('C1')->getStyle()->getFont()->getSuperscript());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/VmlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass VmlTest extends TestCase\n{\n    private string $outfile1 = '';\n\n    private string $outfile2 = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outfile1 !== '') {\n            unlink($this->outfile1);\n            $this->outfile1 = '';\n        }\n        if ($this->outfile2 !== '') {\n            unlink($this->outfile2);\n            $this->outfile2 = '';\n        }\n    }\n\n    public function testAddComments(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getComment('A1')->getText()->createText('top left cell');\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $this->outfile1 = File::temporaryFileName();\n        $writer->save($this->outfile1);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $file = 'zip://' . $this->outfile1 . '#xl/worksheets/sheet1.xml';\n        $sheetContents = file_get_contents($file) ?: '';\n        self::assertStringContainsString('<legacyDrawing ', $sheetContents);\n        $file = 'zip://' . $this->outfile1 . '#xl/drawings/vmlDrawing1.vml';\n        $vmlContents = file_get_contents($file) ?: '';\n        $count = substr_count($vmlContents, '<v:shape ');\n        self::assertSame(1, $count);\n        $count = substr_count($vmlContents, '<x:ClientData ObjectType=\"Note\">');\n        self::assertSame(1, $count);\n\n        $spreadsheet2 = $reader->load($this->outfile1);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertSame('top left cell', $sheet2->getComment('A1')->getText()->getPlainText());\n        self::assertNull($spreadsheet2->getLegacyDrawing($sheet2));\n        $sheet2->getComment('H1')->getText()->createText('Show me');\n        $sheet2->getComment('H2')->getText()->createText('Hide me');\n        $sheet2->getComment('H1')->setVisible(true);\n        $writer = new XlsxWriter($spreadsheet2);\n        $this->outfile2 = File::temporaryFileName();\n        $writer->save($this->outfile2);\n        $spreadsheet2->disconnectWorksheets();\n\n        $file = 'zip://' . $this->outfile2 . '#xl/worksheets/sheet1.xml';\n        $sheetContents = file_get_contents($file) ?: '';\n        self::assertStringContainsString('<legacyDrawing ', $sheetContents);\n        $file = 'zip://' . $this->outfile2 . '#xl/drawings/vmlDrawing1.vml';\n        $vmlContents = file_get_contents($file) ?: '';\n        $count = substr_count($vmlContents, '<v:shape ');\n        self::assertSame(3, $count);\n        $count = substr_count($vmlContents, '<x:ClientData ObjectType=\"Note\">');\n        self::assertSame(3, $count);\n\n        $reader = new XlsxReader();\n        $spreadsheet3 = $reader->load($this->outfile2);\n        $sheet3 = $spreadsheet3->getActiveSheet();\n        self::assertSame('top left cell', $sheet3->getComment('A1')->getText()->getPlainText());\n        self::assertSame('Show me', $sheet3->getComment('H1')->getText()->getPlainText());\n        self::assertSame('Hide me', $sheet3->getComment('H2')->getText()->getPlainText());\n        self::assertNull($spreadsheet3->getLegacyDrawing($sheet3));\n        self::assertTrue($sheet3->getComment('H1')->getVisible());\n        self::assertFalse($sheet3->getComment('H2')->getVisible());\n        $spreadsheet3->disconnectWorksheets();\n    }\n\n    public function testDeleteNullLegacy(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getComment('A1')->getText()->createText('top left cell');\n        self::assertNull($spreadsheet->getLegacyDrawing($sheet));\n        $spreadsheet->deleteLegacyDrawing($sheet);\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outfile1 = File::temporaryFileName();\n        $writer->save($this->outfile1);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $file = 'zip://' . $this->outfile1 . '#xl/worksheets/sheet1.xml';\n        $sheetContents = file_get_contents($file) ?: '';\n        self::assertStringContainsString('<legacyDrawing ', $sheetContents);\n        $file = 'zip://' . $this->outfile1 . '#xl/drawings/vmlDrawing1.vml';\n        $vmlContents = file_get_contents($file) ?: '';\n        $count = substr_count($vmlContents, '<v:shape ');\n        self::assertSame(1, $count);\n        $count = substr_count($vmlContents, '<x:ClientData ObjectType=\"Note\">');\n        self::assertSame(1, $count);\n\n        $spreadsheet2 = $reader->load($this->outfile1);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertSame('top left cell', $sheet2->getComment('A1')->getText()->getPlainText());\n        $spreadsheet2->disconnectWorksheets();\n    }\n\n    public function testAddCommentDeleteFormControls(): void\n    {\n        $infile = 'samples/Reader2/sampleData/formscomments.xlsx';\n        $reader = new XlsxReader();\n        $reader->setLoadSheetsOnly('FormsComments');\n        $spreadsheet = $reader->load($infile);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('row1', $sheet->getCell('H1')->getValue());\n        self::assertStringContainsString('Hello', $sheet->getComment('F1')->getText()->getPlainText());\n        $vmlContents = $spreadsheet->getLegacyDrawing($sheet) ?? '';\n        $count = substr_count($vmlContents, '<v:shape ');\n        self::assertSame(4, $count);\n        $count = substr_count($vmlContents, '<x:ClientData ');\n        self::assertSame(4, $count);\n        $count = substr_count($vmlContents, '<x:ClientData ObjectType=\"Note\"');\n        self::assertSame(1, $count);\n        $spreadsheet->deleteLegacyDrawing($sheet);\n        $sheet->getComment('F2')->getText()->createText('Goodbye');\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outfile1 = File::temporaryFileName();\n        $writer->save($this->outfile1);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader2 = new XlsxReader();\n        $spreadsheet2 = $reader2->load($this->outfile1);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertNull($spreadsheet2->getLegacyDrawing($sheet2));\n        self::assertSame('row1', $sheet2->getCell('H1')->getValue());\n        self::assertStringContainsString('Hello', $sheet2->getComment('F1')->getText()->getPlainText());\n        self::assertStringContainsString('Goodbye', $sheet2->getComment('F2')->getText()->getPlainText());\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/WorksheetInfoNamesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WorksheetInfoNamesTest extends TestCase\n{\n    public function testListWorksheetInfo(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/rowColumnAttributeTest.xlsx';\n        $reader = new Xlsx();\n        $actual = $reader->listWorksheetInfo($filename);\n\n        $expected = [\n            [\n                'worksheetName' => 'Sheet1',\n                'lastColumnLetter' => 'F',\n                'lastColumnIndex' => 5,\n                'totalRows' => '6',\n                'totalColumns' => 6,\n                'sheetState' => 'visible',\n            ],\n        ];\n\n        self::assertEquals($expected, $actual);\n    }\n\n    public function testListWorksheetInfoNamespace(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/namespaces.xlsx';\n        $file = 'zip://';\n        $file .= $filename;\n        $file .= '#xl/workbook.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<x:workbook ', $data);\n        }\n        $reader = new Xlsx();\n        $actual = $reader->listWorksheetInfo($filename);\n\n        $expected = [\n            [\n                'worksheetName' => 'transactions',\n                'lastColumnLetter' => 'K',\n                'lastColumnIndex' => 10,\n                'totalRows' => 2,\n                'totalColumns' => 11,\n                'sheetState' => 'visible',\n            ],\n        ];\n\n        self::assertEquals($expected, $actual);\n    }\n\n    public function testListWorksheetNames(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/rowColumnAttributeTest.xlsx';\n        $reader = new Xlsx();\n        $actual = $reader->listWorksheetNames($filename);\n\n        $expected = ['Sheet1'];\n\n        self::assertEquals($expected, $actual);\n    }\n\n    public function testListWorksheetNamesNamespace(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/namespaces.xlsx';\n        $reader = new Xlsx();\n        $actual = $reader->listWorksheetNames($filename);\n\n        $expected = ['transactions'];\n\n        self::assertEquals($expected, $actual);\n    }\n\n    public function testListWorksheetNamesChartSheet(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/ChartSheet.xlsx';\n        $reader = new Xlsx();\n        $actual = $reader->listWorksheetNames($filename);\n\n        $expected = ['Sheet1', 'Chart1'];\n\n        self::assertEquals($expected, $actual);\n    }\n\n    public function testListWorksheetInfoChartSheet(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/ChartSheet.xlsx';\n        $reader = new Xlsx();\n        $actual = $reader->listWorksheetInfo($filename);\n\n        $chartSheetInfo = $actual[1];\n\n        self::assertSame('Chart1', $chartSheetInfo['worksheetName']);\n        self::assertSame(-1, $chartSheetInfo['lastColumnIndex']);\n        self::assertSame(0, $chartSheetInfo['totalRows']);\n        self::assertSame(0, $chartSheetInfo['totalColumns']);\n        self::assertSame('', $chartSheetInfo['lastColumnLetter']);\n    }\n\n    public function testListWorksheetMissingRows(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.3255.xlsx';\n        $reader = new Xlsx();\n        $actual = $reader->listWorksheetInfo($filename);\n        self::assertSame(4, $actual[0]['totalColumns']);\n        self::assertSame(1048576, $actual[0]['totalRows']);\n        $reader->setReadEmptyCells(false);\n        $actual = $reader->listWorksheetInfo($filename);\n        self::assertSame(3, $actual[0]['totalColumns'], 'all cells in D have no data');\n        self::assertSame(15, $actual[0]['totalRows'], 'rows 16 and 1048576 have no cells with data');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/Xlsx2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Xlsx2Test extends TestCase\n{\n    public function testLoadXlsxConditionalFormatting2(): void\n    {\n        // Make sure Conditionals are read correctly from existing file\n        $filename = 'tests/data/Reader/XLSX/conditionalFormatting2Test.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $conditionalStyle = $worksheet->getConditionalStyles('A2:A8');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_NOTCONTAINSBLANKS, $conditionalRule->getConditionType());\n        self::assertEquals('LEN(TRIM(A2))>0', $conditions[0]);\n\n        $conditionalStyle = $worksheet->getConditionalStyles('B2:B8');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_CONTAINSBLANKS, $conditionalRule->getConditionType());\n        self::assertEquals('LEN(TRIM(B2))=0', $conditions[0]);\n\n        $conditionalStyle = $worksheet->getConditionalStyles('C2:C8');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_CELLIS, $conditionalRule->getConditionType());\n        self::assertEquals(Conditional::OPERATOR_GREATERTHAN, $conditionalRule->getOperatorType());\n        self::assertEquals('5', $conditions[0]);\n    }\n\n    public function testReloadXlsxConditionalFormatting2(): void\n    {\n        // Make sure conditionals from existing file are maintained across save\n        $filename = 'tests/data/Reader/XLSX/conditionalFormatting2Test.xlsx';\n        $outfile = File::temporaryFilename();\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadshee1 = $reader->load($filename);\n        $writer = IOFactory::createWriter($spreadshee1, 'Xlsx');\n        $writer->save($outfile);\n        $spreadsheet = $reader->load($outfile);\n        unlink($outfile);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $conditionalStyle = $worksheet->getConditionalStyles('A2:A8');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_NOTCONTAINSBLANKS, $conditionalRule->getConditionType());\n        self::assertEquals('LEN(TRIM(A2))>0', $conditions[0]);\n\n        $conditionalStyle = $worksheet->getConditionalStyles('B2:B8');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_CONTAINSBLANKS, $conditionalRule->getConditionType());\n        self::assertEquals('LEN(TRIM(B2))=0', $conditions[0]);\n\n        $conditionalStyle = $worksheet->getConditionalStyles('C2:C8');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_CELLIS, $conditionalRule->getConditionType());\n        self::assertEquals(Conditional::OPERATOR_GREATERTHAN, $conditionalRule->getOperatorType());\n        self::assertEquals('5', $conditions[0]);\n    }\n\n    public function testNewXlsxConditionalFormatting2(): void\n    {\n        // Make sure blanks/non-blanks added by PhpSpreadsheet are handled correctly\n        $outfile = File::temporaryFilename();\n        $spreadshee1 = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n        $sheet = $spreadshee1->getActiveSheet();\n        $sheet->setCellValue('A2', 'a2');\n        $sheet->setCellValue('A4', 'a4');\n        $sheet->setCellValue('A6', 'a6');\n        $cond1 = new Conditional();\n        $cond1->setConditionType(Conditional::CONDITION_CONTAINSBLANKS);\n        $cond1->getStyle()->getFill()->setFillType(Fill::FILL_SOLID);\n        $cond1->getStyle()->getFill()->getStartColor()->setARGB(Color::COLOR_RED);\n        $cond = [$cond1];\n        $sheet->getStyle('A1:A6')->setConditionalStyles($cond);\n        $writer = IOFactory::createWriter($spreadshee1, 'Xlsx');\n        $writer->save($outfile);\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($outfile);\n        unlink($outfile);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $conditionalStyle = $worksheet->getConditionalStyles('A1:A6');\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        $conditions = $conditionalRule->getConditions();\n        self::assertNotEmpty($conditions);\n        self::assertEquals(Conditional::CONDITION_CONTAINSBLANKS, $conditionalRule->getConditionType());\n        self::assertEquals('LEN(TRIM(A1))=0', $conditions[0]);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxRootZipFilesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XlsxRootZipFilesTest extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/XLSX/rootZipFiles.xlsx';\n\n    public function testXlsxRootZipFiles(): void\n    {\n        $filename = self::$testbook;\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        /** @var RichText */\n        $value = $sheet->getCell('A1')->getValue();\n        self::assertSame('TEST CELL', $value->getPlainText());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XlsxTest extends TestCase\n{\n    const XLSX_PRECISION = 1.0E-8;\n\n    public function testLoadXlsxRowColumnAttributes(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/rowColumnAttributeTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        for ($row = 1; $row <= 4; ++$row) {\n            self::assertEquals($row * 5 + 10, floor($worksheet->getRowDimension($row)->getRowHeight()));\n        }\n\n        self::assertFalse($worksheet->getRowDimension(5)->getVisible());\n\n        for ($column = 1; $column <= 4; ++$column) {\n            $columnAddress = Coordinate::stringFromColumnIndex($column);\n            self::assertEquals(\n                $column * 2 + 2,\n                floor($worksheet->getColumnDimension($columnAddress)->getWidth())\n            );\n        }\n\n        self::assertFalse($worksheet->getColumnDimension('E')->getVisible());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadXlsxWithStyles(): void\n    {\n        $expectedColours = [\n            1 => ['A' => 'C00000', 'C' => 'FF0000', 'E' => 'FFC000'],\n            3 => ['A' => '7030A0', 'C' => 'FFFFFF', 'E' => 'FFFF00'],\n            5 => ['A' => '002060', 'C' => 'FFFFFF', 'E' => '92D050'],\n            7 => ['A' => '0070C0', 'C' => '00B0F0', 'E' => '00B050'],\n        ];\n\n        $filename = 'tests/data/Reader/XLSX/stylesTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        for ($row = 1; $row <= 8; $row += 2) {\n            for ($column = 'A'; $column !== 'G'; StringHelper::stringIncrement($column), StringHelper::stringIncrement($column)) {\n                self::assertEquals(\n                    $expectedColours[$row][$column],\n                    $worksheet->getStyle($column . $row)->getFill()->getStartColor()->getRGB()\n                );\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load Xlsx file without styles.xml.\n     */\n    public function testLoadXlsxWithoutStyles(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.2246a.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $tempFilename = File::temporaryFilename();\n        $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n        $writer->save($tempFilename);\n\n        $reader = new Xlsx();\n        $reloadedSpreadsheet = $reader->load($tempFilename);\n        unlink($tempFilename);\n\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n\n        self::assertEquals('TipoDato', $reloadedWorksheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load Xlsx file with empty styles.xml.\n     */\n    public function testLoadXlsxWithEmptyStyles(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/issue.2246b.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $tempFilename = File::temporaryFilename();\n        $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n        $writer->save($tempFilename);\n\n        $reader = new Xlsx();\n        $reloadedSpreadsheet = $reader->load($tempFilename);\n        unlink($tempFilename);\n\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertEquals('TipoDato', $reloadedWorksheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadXlsxAutofilter(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/autofilterTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $autofilter = $worksheet->getAutoFilter();\n        self::assertEquals('A1:D57', $autofilter->getRange());\n        self::assertEquals(\n            AutoFilter\\Column::AUTOFILTER_FILTERTYPE_FILTER,\n            $autofilter->getColumn('A')->getFilterType()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadXlsxPageSetup(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/pageSetupTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $pageMargins = $worksheet->getPageMargins();\n        // Convert from inches to cm for testing\n        self::assertEqualsWithDelta(2.5, $pageMargins->getTop() * 2.54, self::XLSX_PRECISION);\n        self::assertEqualsWithDelta(3.3, $pageMargins->getLeft() * 2.54, self::XLSX_PRECISION);\n        self::assertEqualsWithDelta(3.3, $pageMargins->getRight() * 2.54, self::XLSX_PRECISION);\n        self::assertEqualsWithDelta(1.3, $pageMargins->getHeader() * 2.54, self::XLSX_PRECISION);\n\n        self::assertEquals(PageSetup::PAPERSIZE_A4, $worksheet->getPageSetup()->getPaperSize());\n        self::assertEquals(['A10', 'A20', 'A30', 'A40', 'A50'], array_keys($worksheet->getBreaks()));\n    }\n\n    public function testLoadXlsxConditionalFormatting(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/conditionalFormattingTest.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $conditionalStyle = $worksheet->getCell('B2')->getStyle()->getConditionalStyles();\n\n        self::assertNotEmpty($conditionalStyle);\n        $conditionalRule = $conditionalStyle[0];\n        self::assertNotEmpty($conditionalRule->getConditions());\n        self::assertEquals(Conditional::CONDITION_CELLIS, $conditionalRule->getConditionType());\n        self::assertEquals(Conditional::OPERATOR_BETWEEN, $conditionalRule->getOperatorType());\n        self::assertEquals(['200', '400'], $conditionalRule->getConditions());\n        /** @var mixed[][] */\n        $temp = $conditionalRule->getStyle()->exportArray();\n        self::assertSame('#,##0.00_-\"€\"', $temp['numberFormat']['formatCode']);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load Xlsx file without cell reference.\n     */\n    public function testLoadXlsxWithoutCellReference(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/without_cell_reference.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        self::assertSame(1, $spreadsheet->getActiveSheet()->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load Xlsx file and use a read filter.\n     */\n    public function testLoadWithReadFilter(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/without_cell_reference.xlsx';\n        $reader = new Xlsx();\n        $reader->setReadFilter(new OddColumnReadFilter());\n        $spreadsheet = $reader->load($filename);\n        $data = $spreadsheet->getActiveSheet()->toArray(formatData: false);\n        $ref = [1, null, 3, null, 5, null, 7, null, 9, null];\n\n        for ($i = 0; $i < 10; ++$i) {\n            self::assertSame($ref, \\array_slice($data[$i], 0, 10, true));\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test load Xlsx file with drawing having double attributes.\n     */\n    public function testLoadXlsxWithDoubleAttrDrawing(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/double_attr_drawing.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($filename);\n        self::assertSame('TOSHIBA_HITACHI_SKYWORTH', $spreadsheet->getActiveSheet()->getTitle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test correct save and load xlsx files with empty drawings.\n     * Such files can be generated by Google Sheets.\n     */\n    public function testLoadSaveWithEmptyDrawings(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/empty_drawing.xlsx';\n        $reader = new Xlsx();\n        $excel = $reader->load($filename);\n        $resultFilename = File::temporaryFilename();\n        $writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($excel);\n        $writer->save($resultFilename);\n        $excel = $reader->load($resultFilename);\n        unlink($resultFilename);\n        self::assertSame(1.0, $excel->getActiveSheet()->getCell('A1')->getValue());\n        $excel->disconnectWorksheets();\n    }\n\n    /**\n     * Test if all whitespace is removed from a style definition string.\n     * This is needed to parse it into properties with the correct keys.\n     */\n    #[DataProvider('providerStripsWhiteSpaceFromStyleString')]\n    public function testStripsWhiteSpaceFromStyleString(string $string): void\n    {\n        $string = Xlsx::stripWhiteSpaceFromStyleString($string);\n        self::assertEquals(preg_match('/\\s/', $string), 0);\n    }\n\n    public static function providerStripsWhiteSpaceFromStyleString(): array\n    {\n        return [\n            ['position:absolute;margin-left:424.5pt;margin-top:169.5pt;width:67.5pt;\n        height:13.5pt;z-index:5;mso-wrap-style:tight'],\n            ['position:absolute;margin-left:424.5pt;margin-top:169.5pt;width:67.5pt;\nheight:13.5pt;z-index:5;mso-wrap-style:tight'],\n            ['position:absolute; margin-left:424.5pt; margin-top:169.5pt; width:67.5pt;\n            height:13.5pt;z-index:5;mso-wrap-style:tight'],\n        ];\n    }\n\n    public function testLoadDataOnlyLoadsAlsoTables(): void\n    {\n        $filename = 'tests/data/Reader/XLSX/data_with_tables.xlsx';\n        $reader = new Xlsx();\n        $excel = $reader->load($filename, IReader::READ_DATA_ONLY);\n\n        self::assertEquals(['First', 'Second'], $excel->getSheetNames());\n\n        $table = $excel->getTableByName('Tableau1');\n        $firstSheet = $excel->getSheetByName('First');\n        $secondSheet = $excel->getSheetByName('Second');\n        if (!$table || !$firstSheet || !$secondSheet) {\n            self::fail('Table or Sheet not found.');\n        }\n\n        self::assertEquals('A1:B5', $table->getRange());\n        self::assertEquals([['1', '2', '3']], $firstSheet->toArray());\n        self::assertEquals([\n            ['Colonne1', 'Colonne2'],\n            ['a', 'b'],\n            ['c', 'd'],\n            ['e', 'f'],\n            ['g', 'h'],\n        ], $secondSheet->toArray());\n        $excel->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/ArrayFormulaTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFormulaTest extends TestCase\n{\n    public function testArrayFormulaReader(): void\n    {\n        $filename = 'tests/data/Reader/Xml/ArrayFormula.xml';\n        $reader = new Xml();\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n\n        self::assertSame(DataType::TYPE_FORMULA, $sheet->getCell('B1')->getDataType());\n        self::assertSame(['t' => 'array', 'ref' => 'B1:B3'], $sheet->getCell('B1')->getFormulaAttributes());\n        self::assertSame('=CONCATENATE(A1:A3,\"-\",C1:C3)', strtoupper($sheet->getCell('B1')->getValueString()));\n        self::assertSame('a-1', $sheet->getCell('B1')->getOldCalculatedValue());\n        self::assertSame('b-2', $sheet->getCell('B2')->getValue());\n        self::assertSame('c-3', $sheet->getCell('B3')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/DataValidationsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DataValidationsTest extends AbstractFunctional\n{\n    private string $filename = 'tests/data/Reader/Xml/datavalidations.xml';\n\n    private string $filename2 = 'tests/data/Reader/Xml/datavalidations.wholerow.xml';\n\n    public function testValidation(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->load($this->filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $assertions = $this->validationAssertions();\n        $validation = $sheet->getCell('A1')->getDataValidation();\n        self::assertSame('A:A', $validation->getSqref());\n        $validation = $sheet->getCell('B3')->getDataValidation();\n        self::assertSame('B2:B1048576', $validation->getSqref());\n\n        foreach ($assertions as $title => $assertion) {\n            $sheet->getCell($assertion[1])->setValue($assertion[2]);\n            self::assertSame($assertion[0], $sheet->getCell($assertion[1])->hasValidValue(), $title);\n        }\n        $sheet->getCell('F1')->getDataValidation()->setType(DataValidation::TYPE_NONE);\n        $sheet->getCell('F1')->setValue(1);\n        self::assertTrue($sheet->getCell('F1')->hasValidValue(), 'validation type is NONE');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testValidationWholeRow(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->load($this->filename2);\n        $sheet = $spreadsheet->getActiveSheet();\n        $collection = $sheet->getDataValidationCollection();\n        self::assertSame(['A1', '1:1'], array_keys($collection));\n        $dv = $collection['A1'];\n        self::assertSame('\"Item A,Item B,Item D\"', $dv->getFormula1());\n        self::assertSame('warn', $dv->getErrorStyle());\n        self::assertFalse($dv->getShowDropDown());\n        self::assertFalse($dv->getShowErrorMessage());\n\n        $dv = $collection['1:1'];\n        self::assertSame('\"Item A,Item B,Item C\"', $dv->getFormula1());\n        self::assertSame('stop', $dv->getErrorStyle());\n        self::assertTrue($dv->getShowDropDown());\n        self::assertTrue($dv->getShowErrorMessage());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testValidationXlsx(): void\n    {\n        $reader = new Xml();\n        $oldspreadsheet = $reader->load($this->filename);\n        $spreadsheet = $this->writeAndReload($oldspreadsheet, 'Xlsx');\n        $oldspreadsheet->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $assertions = $this->validationAssertions();\n        $validation = $sheet->getCell('A1')->getDataValidation();\n        self::assertSame('A:A', $validation->getSqref());\n        $validation = $sheet->getCell('B3')->getDataValidation();\n        self::assertSame('B2:B1048576', $validation->getSqref());\n\n        foreach ($assertions as $title => $assertion) {\n            $sheet->getCell($assertion[1])->setValue($assertion[2]);\n            self::assertSame($assertion[0], $sheet->getCell($assertion[1])->hasValidValue(), $title);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testValidationXls(): void\n    {\n        $reader = new Xml();\n        $oldspreadsheet = $reader->load($this->filename);\n        $spreadsheet = $this->writeAndReload($oldspreadsheet, 'Xls');\n        $oldspreadsheet->disconnectWorksheets();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $assertions = $this->validationAssertions();\n        $validation = $sheet->getCell('A1')->getDataValidation();\n        self::assertSame('A:A', $validation->getSqref(), 'limited number of rows in Xls');\n        $validation = $sheet->getCell('B3')->getDataValidation();\n        self::assertSame('B2:B1048576', $validation->getSqref());\n\n        foreach ($assertions as $title => $assertion) {\n            $sheet->getCell($assertion[1])->setValue($assertion[2]);\n            self::assertSame($assertion[0], $sheet->getCell($assertion[1])->hasValidValue(), $title);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /** @return array<string, array{bool, string, mixed}> */\n    private function validationAssertions(): array\n    {\n        return [\n            // Numeric tests\n            'Integer between 2 and 5: x' => [false, 'F1', 'x'],\n            'Integer between 2 and 5: 3.1' => [false, 'F1', 3.1],\n            'Integer between 2 and 5: 3' => [true, 'F1', 3],\n            'Integer between 2 and 5: 1' => [false, 'F1', 1],\n            'Integer between 2 and 5: 7' => [false, 'F1', 7],\n            'Float between 2 and 5: x' => [false, 'G1', 'x'],\n            'Float between 2 and 5: 3.1' => [true, 'G1', 3.1],\n            'Float between 2 and 5: 3' => [true, 'G1', 3],\n            'Float between 2 and 5: 1' => [false, 'G1', 1],\n            'Float between 2 and 5: 7' => [false, 'G1', 7],\n            'Integer not between -5 and 5: 3' => [false, 'F2', 3],\n            'Integer not between -5 and 5: -1' => [false, 'F2', -1],\n            'Integer not between -5 and 5: 7' => [true, 'F2', 7],\n            'Any integer except 7: -1' => [true, 'F3', -1],\n            'Any integer except 7: 7' => [false, 'F3', 7],\n            'Only -3: -1' => [false, 'F4', -1],\n            'Only -3: -3' => [true, 'F4', -3],\n            'Integer less than 8: 8' => [false, 'F5', 8],\n            'Integer less than 8: 7' => [true, 'F5', 7],\n            'Integer less than 8: 9' => [false, 'F5', 9],\n            'Integer less than or equal 12: 12' => [true, 'F6', 12],\n            'Integer less than or equal 12: 7' => [true, 'F6', 7],\n            'Integer less than or equal 12: 13' => [false, 'F6', 13],\n            'Integer greater than or equal -6: -6' => [true, 'F7', -6],\n            'Integer greater than or equal -6: -7' => [false, 'F7', -7],\n            'Integer greater than or equal -6: -5' => [true, 'F7', -5],\n            'Integer greater than 5: 5' => [false, 'F8', 5],\n            'Integer greater than 5: 6' => [true, 'F8', 6],\n            'Integer greater than 5: 3' => [false, 'F8', 3],\n            // Text tests\n            'a,b,c,d,e: a' => [true, 'C4', 'a'],\n            'a,b,c,d,e: c' => [true, 'C4', 'c'],\n            'a,b,c,d,e: e' => [true, 'C4', 'e'],\n            'a,b,c,d,e: x' => [false, 'C4', 'x'],\n            'a,b,c,d,e: aa' => [false, 'C4', 'aa'],\n            'less than 8 characters: abcdefg' => [true, 'C3', 'abcdefg'],\n            'less than 8 characters: abcdefgh' => [false, 'C3', 'abcdefgh'],\n            'texts in e1 to e5: ccc' => [true, 'D2', 'ccc'],\n            'texts in e1 to e5: ffffff' => [false, 'D2', 'ffffff'],\n            'date from 20230101: 20221231' => [false, 'C1', Date::convertIsoDate('20221231')],\n            'date from 20230101: 20230101' => [true, 'C1', Date::convertIsoDate('20230101')],\n            'date from 20230101: 20240507' => [true, 'C1', Date::convertIsoDate('20240507')],\n            'date from 20230101: 20240507 10:00:00' => [true, 'C1', Date::convertIsoDate('20240507 10:00:00')],\n            'time from 12:00-14:00: 2023-01-01 13:00:00' => [false, 'C2', Date::convertIsoDate('2023-01-01 13:00:00')],\n            'time from 8:00-14:00: 13:00' => [true, 'C2', Date::convertIsoDate('13:00')],\n            'time from 8:00-14:00: 07:00:00' => [false, 'C2', Date::convertIsoDate('07:00:00')],\n            'time from 8:00-14:00: 15:00:00' => [false, 'C2', Date::convertIsoDate('15:00:00')],\n            'time from 8:00-14:00: 1:13 am' => [false, 'C2', Date::convertIsoDate('1:13 am')],\n            'time from 8:00-14:00: 1:13 pm' => [true, 'C2', Date::convertIsoDate('1:13 pm')],\n            'time from 8:00-14:00: 9:13' => [true, 'C2', Date::convertIsoDate('9:13')],\n            'time from 8:00-14:00: 9:13 am' => [true, 'C2', Date::convertIsoDate('9:13 am')],\n            'time from 8:00-14:00: 9:13 pm' => [false, 'C2', Date::convertIsoDate('9:13 pm')],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/HtmlEntitiesLoadTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml as XmlReader;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlEntitiesLoadTest extends TestCase\n{\n    public static function testIssue2157(): void\n    {\n        $infile = 'tests/data/Reader/Xml/issue.2157.small.xml';\n        $contents = (string) file_get_contents($infile);\n        self::assertSame(\"\\t\", substr($contents, 0, 1));\n        self::assertStringContainsString('&Tau;', $contents);\n        self::assertStringContainsString('&lt;/br&gt', $contents);\n        self::assertStringNotContainsString('Τ', $contents); // that's a Tau, not T\n        self::assertStringNotContainsString('</br>', $contents);\n        $reader = new XmlReader();\n        $spreadsheet = $reader->load($infile);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Τέλεια όραση χωρίς γυαλιά', $sheet->getCell('E2')->getValue());\n        $g2 = $sheet->getCell('G2')->getValue();\n        self::assertStringContainsString('</br>', $g2);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/Issue4448Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4448Test extends TestCase\n{\n    private static string $testbook = 'tests/data/Reader/Xml/issue.4448.xml';\n\n    public function testIndent(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->load(self::$testbook);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(\n            5,\n            $sheet->getStyle('A2')\n                ->getAlignment()\n                ->getIndent()\n        );\n        self::assertSame(\n            0,\n            $sheet->getStyle('A1')\n                ->getAlignment()\n                ->getIndent()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageSetupTest extends TestCase\n{\n    private const MARGIN_PRECISION = 0.000001;\n\n    private const MARGIN_UNIT_CONVERSION = 2.54; // Inches to cm\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    private string $filename = 'tests/data/Reader/Xml/PageSetup.xml';\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testPageSetup(): void\n    {\n        $reader = new Xml();\n        $this->spreadsheet = $reader->load($this->filename);\n        $assertions = $this->pageSetupAssertions();\n        $sheetCount = 0;\n\n        foreach ($this->spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            ++$sheetCount;\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageSetup()->$testMethodName();\n                self::assertSame(\n                    $expectedResult,\n                    $actualResult,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test}\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n    }\n\n    public function testPageMargins(): void\n    {\n        $reader = new Xml();\n        $this->spreadsheet = $reader->load($this->filename);\n        $assertions = $this->pageMarginAssertions();\n        $sheetCount = 0;\n\n        foreach ($this->spreadsheet->getAllSheets() as $worksheet) {\n            if (!array_key_exists($worksheet->getTitle(), $assertions)) {\n                self::fail('Unexpected worksheet ' . $worksheet->getTitle());\n            }\n\n            ++$sheetCount;\n            $sheetAssertions = $assertions[$worksheet->getTitle()];\n            foreach ($sheetAssertions as $test => $expectedResult) {\n                $testMethodName = 'get' . ucfirst($test);\n                $actualResult = $worksheet->getPageMargins()->$testMethodName();\n                self::assertEqualsWithDelta(\n                    $expectedResult,\n                    $actualResult,\n                    self::MARGIN_PRECISION,\n                    \"Failed assertion for Worksheet '{$worksheet->getTitle()}' {$test} margin\"\n                );\n            }\n        }\n        self::assertCount($sheetCount, $assertions);\n    }\n\n    /** @return array<string, array{orientation: string, scale: int, horizontalCentered: bool, verticalCentered: bool, pageOrder: string}> */\n    private function pageSetupAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 75,\n                'horizontalCentered' => true,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet2' => [\n                'orientation' => PageSetup::ORIENTATION_LANDSCAPE,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_OVER_THEN_DOWN,\n            ],\n            'Sheet3' => [\n                'orientation' => PageSetup::ORIENTATION_PORTRAIT,\n                'scale' => 90,\n                'horizontalCentered' => true,\n                'verticalCentered' => true,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n            'Sheet4' => [\n                // Default Settings\n                'orientation' => PageSetup::ORIENTATION_DEFAULT,\n                'scale' => 100,\n                'horizontalCentered' => false,\n                'verticalCentered' => false,\n                'pageOrder' => PageSetup::PAGEORDER_DOWN_THEN_OVER,\n            ],\n        ];\n    }\n\n    /** @return array<string, float[]> */\n    private function pageMarginAssertions(): array\n    {\n        return [\n            'Sheet1' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet2' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 1.9 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 0.8 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet3' => [\n                // Here the values are in cm, so we convert to inches for comparison with internal uom\n                'top' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'header' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n                'left' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'right' => 1.8 / self::MARGIN_UNIT_CONVERSION,\n                'bottom' => 2.4 / self::MARGIN_UNIT_CONVERSION,\n                'footer' => 1.3 / self::MARGIN_UNIT_CONVERSION,\n            ],\n            'Sheet4' => [\n                // Default Settings (already in inches for comparison)\n                'top' => 0.75,\n                'header' => 0.3,\n                'left' => 0.7,\n                'right' => 0.7,\n                'bottom' => 0.75,\n                'footer' => 0.3,\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/ReadOrderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml as XmlReader;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ReadOrderTest extends AbstractFunctional\n{\n    public function testReadOrder(): void\n    {\n        // Issue 850 - Xls Reader/Writer didn't support Alignment ReadOrder\n        $infile = 'tests/data/Reader/Xml/issue.850.xml';\n        $reader = new XmlReader();\n        $robj = $reader->load($infile);\n\n        $sheet0 = $robj->setActiveSheetIndex(0);\n        self::assertSame(\n            Alignment::READORDER_RTL,\n            $sheet0->getStyle('A1')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_LTR,\n            $sheet0->getStyle('A2')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_CONTEXT,\n            $sheet0->getStyle('A3')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            2,\n            $sheet0->getStyle('A5')->getAlignment()->getIndent()\n        );\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/SplitsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass SplitsTest extends AbstractFunctional\n{\n    private static string $testbook = 'tests/data/Reader/Xml/splits.xml';\n\n    public function testSplits(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->load(self::$testbook);\n\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Freeze');\n        self::assertSame('frozen', $sheet->getPaneState());\n        self::assertSame('E7', $sheet->getFreezePane());\n        self::assertSame('L7', $sheet->getPaneTopLeftCell());\n        self::assertSame('L7', $sheet->getTopLeftCell());\n        //self::assertSame('L7', $sheet->getSelectedCells());\n\n        $sheet = $spreadsheet->getSheetByNameOrThrow('SplitVertical');\n        self::assertNull($sheet->getFreezePane());\n        self::assertSame('G1', $sheet->getTopLeftCell());\n        self::assertSame('E1', $sheet->getPaneTopLeftCell());\n        self::assertNotEquals(0, $sheet->getXSplit());\n        self::assertEquals(0, $sheet->getYSplit());\n        //self::assertSame('E1', $sheet->getSelectedCells());\n        //self::assertNotNull($sheet->getPane('topRight'));\n\n        $sheet = $spreadsheet->getSheetByNameOrThrow('SplitHorizontal');\n        self::assertNull($sheet->getFreezePane());\n        self::assertSame('A3', $sheet->getTopLeftCell());\n        self::assertSame('A6', $sheet->getPaneTopLeftCell());\n        self::assertEquals(0, $sheet->getXSplit());\n        self::assertNotEquals(0, $sheet->getYSplit());\n        //self::assertSame('A7', $sheet->getSelectedCells());\n        //self::assertNotNull($sheet->getPane('bottomLeft'));\n\n        $sheet = $spreadsheet->getSheetByNameOrThrow('SplitBoth');\n        self::assertNull($sheet->getFreezePane());\n        self::assertSame('H3', $sheet->getTopLeftCell());\n        self::assertSame('E19', $sheet->getPaneTopLeftCell());\n        self::assertNotEquals(0, $sheet->getXSplit());\n        self::assertNotEquals(0, $sheet->getYSplit());\n        //self::assertSame('E20', $sheet->getSelectedCells());\n        //self::assertNotNull($sheet->getPane('bottomLeft'));\n        //self::assertNotNull($sheet->getPane('bottomRight'));\n        //self::assertNotNull($sheet->getPane('topRight'));\n\n        $sheet = $spreadsheet->getSheetByNameOrThrow('NoFreezeNorSplit');\n        self::assertNull($sheet->getFreezePane());\n        self::assertSame('D3', $sheet->getTopLeftCell());\n        self::assertSame('', $sheet->getPaneTopLeftCell());\n        self::assertSame('D5', $sheet->getSelectedCells());\n        self::assertNull($sheet->getPane('bottomLeft'));\n        self::assertNull($sheet->getPane('bottomRight'));\n        self::assertNull($sheet->getPane('topRight'));\n\n        $sheet = $spreadsheet->getSheetByNameOrThrow('FrozenSplit');\n        self::assertSame('B4', $sheet->getFreezePane());\n        self::assertSame('frozenSplit', $sheet->getPaneState());\n        self::assertSame('B4', $sheet->getPaneTopLeftCell());\n        self::assertSame('B4', $sheet->getTopLeftCell());\n        //self::assertSame('B4', $sheet->getSelectedCells());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlActiveSheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlActiveSheetTest extends TestCase\n{\n    public function testActiveSheet(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n             xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n             xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n             <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <Version>16.00</Version>\n             </DocumentProperties>\n             <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <AllowPNG/>\n             </OfficeDocumentSettings>\n             <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n              <WindowHeight>6820</WindowHeight>\n              <WindowWidth>19200</WindowWidth>\n              <WindowTopX>32767</WindowTopX>\n              <WindowTopY>32767</WindowTopY>\n              <ActiveSheet>1</ActiveSheet>\n              <ProtectStructure>False</ProtectStructure>\n              <ProtectWindows>False</ProtectWindows>\n             </ExcelWorkbook>\n             <Styles>\n              <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n               <Alignment ss:Vertical=\"Bottom\"/>\n               <Borders/>\n               <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\n               <Interior/>\n               <NumberFormat/>\n               <Protection/>\n              </Style>\n             </Styles>\n             <Worksheet ss:Name=\"sheet 1\">\n              <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"1\" x:FullColumns=\"1\"\n               x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\n               <Row>\n                <Cell><Data ss:Type=\"String\">Sheet 1</Data></Cell>\n               </Row>\n              </Table>\n              <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n               <ProtectObjects>False</ProtectObjects>\n               <ProtectScenarios>False</ProtectScenarios>\n              </WorksheetOptions>\n             </Worksheet>\n             <Worksheet ss:Name=\"sheet 2\">\n              <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"1\" x:FullColumns=\"1\"\n               x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\n               <Row>\n                <Cell><Data ss:Type=\"String\">Sheet 2</Data></Cell>\n               </Row>\n              </Table>\n              <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n               <Selected/>\n               <Panes>\n                 <Pane>\n                   <Number>3</Number>\n                   <ActiveRow>2</ActiveRow>\n                   <ActiveCol>2</ActiveCol>\n                 </Pane>\n               </Panes>\n               <ProtectObjects>False</ProtectObjects>\n               <ProtectScenarios>False</ProtectScenarios>\n              </WorksheetOptions>\n             </Worksheet>\n             <Worksheet ss:Name=\"sheet 3\">\n              <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"1\" x:FullColumns=\"1\"\n               x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\n               <Row>\n                <Cell><Data ss:Type=\"String\">Sheet 3</Data></Cell>\n               </Row>\n              </Table>\n              <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n               <PageSetup>\n                <Header x:Margin=\"0.3\"/>\n                <Footer x:Margin=\"0.3\"/>\n                <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\n               </PageSetup>\n               <Panes>\n                 <Pane>\n                   <Number>3</Number>\n                   <ActiveRow>3</ActiveRow>\n                   <ActiveCol>2</ActiveCol>\n                   <RangeSelection>R4C3:R4C4</RangeSelection>\n                 </Pane>\n               </Panes>\n               <ProtectObjects>False</ProtectObjects>\n               <ProtectScenarios>False</ProtectScenarios>\n              </WorksheetOptions>\n             </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(3, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('sheet 2', $sheet->getTitle());\n        self::assertSame('C3', $sheet->getSelectedCells());\n        $sheet = $spreadsheet->getSheetByNameOrThrow('sheet 3');\n        self::assertSame('C4:D4', $sheet->getSelectedCells());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlColSpanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlColSpanTest extends TestCase\n{\n    public function testColSpan(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n             xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n             xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n             <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <Version>16.00</Version>\n             </DocumentProperties>\n             <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <AllowPNG/>\n             </OfficeDocumentSettings>\n             <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n              <WindowHeight>6820</WindowHeight>\n              <WindowWidth>19200</WindowWidth>\n              <WindowTopX>32767</WindowTopX>\n              <WindowTopY>32767</WindowTopY>\n              <ProtectStructure>False</ProtectStructure>\n              <ProtectWindows>False</ProtectWindows>\n             </ExcelWorkbook>\n             <Styles>\n              <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n               <Alignment ss:Vertical=\"Bottom\"/>\n               <Borders/>\n               <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\n               <Interior/>\n               <NumberFormat/>\n               <Protection/>\n              </Style>\n             </Styles>\n             <Worksheet ss:Name=\"Tabelle1\">\n              <Table ss:ExpandedColumnCount=\"6\" ss:ExpandedRowCount=\"1\" x:FullColumns=\"1\"\n               x:FullRows=\"1\" ss:DefaultColumnWidth=\"60\" ss:DefaultRowHeight=\"14.5\">\n               <Column ss:AutoFitWidth=\"0\" ss:Width=\"76.5\"/>\n               <Column ss:AutoFitWidth=\"0\" ss:Width=\"25.5\" ss:Span=\"3\"/>\n               <Row ss:AutoFitHeight=\"0\">\n                <Cell><Data ss:Type=\"String\">wide</Data></Cell>\n                <Cell><Data ss:Type=\"String\">thin</Data></Cell>\n                <Cell><Data ss:Type=\"String\">thin</Data></Cell>\n                <Cell><Data ss:Type=\"String\">thin</Data></Cell>\n                <Cell><Data ss:Type=\"String\">thin</Data></Cell>\n                <Cell><Data ss:Type=\"String\">normal</Data></Cell>\n               </Row>\n              </Table>\n              <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n               <Unsynced/>\n               <Selected/>\n               <Panes>\n                <Pane>\n                 <Number>3</Number>\n                 <ActiveRow>1</ActiveRow>\n                </Pane>\n               </Panes>\n               <ProtectObjects>False</ProtectObjects>\n               <ProtectScenarios>False</ProtectScenarios>\n              </WorksheetOptions>\n             </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Tabelle1', $sheet->getTitle());\n        self::assertSame('A2', $sheet->getSelectedCells());\n        $widthMultiplier = 5.4;\n        $expectedWidthBtoE = 25.5 / $widthMultiplier;\n        self::assertEqualsWithDelta($expectedWidthBtoE, $sheet->getColumnDimension('B')->getWidth(), 1E-6, '1st col in span');\n        self::assertEqualsWithDelta($expectedWidthBtoE, $sheet->getColumnDimension('C')->getWidth(), 1E-6, '2nd col in span');\n        self::assertEqualsWithDelta($expectedWidthBtoE, $sheet->getColumnDimension('D')->getWidth(), 1E-6, '3rd col in span');\n        self::assertEqualsWithDelta($expectedWidthBtoE, $sheet->getColumnDimension('E')->getWidth(), 1E-6, '4th col in span');\n        $expectedWidthA = 76.5 / $widthMultiplier;\n        self::assertEqualsWithDelta($expectedWidthA, $sheet->getColumnDimension('A')->getWidth(), 1E-6, 'width without span');\n        self::assertEqualsWithDelta(-1.0, $sheet->getColumnDimension('F')->getWidth(), 1E-6, 'default width');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlColumnRowHiddenTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlColumnRowHiddenTest extends TestCase\n{\n    public function testColumnRowHidden(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n                <Worksheet ss:Name=\"1\">\n                    <ss:Table>\n                        <Column ss:Hidden=\"1\" />\n                        <Column ss:Hidden=\"0\" />\n                        <Column />\n                        <ss:Row ss:Hidden=\"1\">\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">hidden row and hidden column</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">hidden row and visible column</ss:Data>\n                            </ss:Cell>\n                        </ss:Row>\n                        <ss:Row ss:Hidden=\"0\">\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">visible row and hidden column</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">visible row and visible column</ss:Data>\n                            </ss:Cell>\n                        </ss:Row>\n                        <ss:Row />\n                    </ss:Table>\n                </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('1', $sheet->getTitle());\n        self::assertFalse($sheet->getColumnDimension('A')->getVisible());\n        self::assertTrue($sheet->getColumnDimension('B')->getVisible());\n        self::assertTrue($sheet->getColumnDimension('C')->getVisible());\n        self::assertFalse($sheet->getRowDimension(1)->getVisible());\n        self::assertTrue($sheet->getRowDimension(2)->getVisible());\n        self::assertTrue($sheet->getRowDimension(3)->getVisible());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlFilter.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter;\n\n/**  Define a Read Filter class implementing IReadFilter  */\nclass XmlFilter implements IReadFilter\n{\n    public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool\n    {\n        return $row !== 4;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlFontBoldItalicTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlFontBoldItalicTest extends TestCase\n{\n    public function testFontBoldItalic(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n             xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n             xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"\n             xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n             <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <Author>Owen Leibman</Author>\n              <LastAuthor>Owen Leibman</LastAuthor>\n              <Created>2023-05-15T17:04:33Z</Created>\n              <Version>16.00</Version>\n             </DocumentProperties>\n             <CustomDocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Enabled dt:dt=\"string\">true</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Enabled>\n              <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SetDate dt:dt=\"string\">2023-05-15T17:06:02Z</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SetDate>\n              <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Method dt:dt=\"string\">Standard</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Method>\n              <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Name dt:dt=\"string\">defa4170-0d19-0005-0004-bc88714345d2</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Name>\n              <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SiteId dt:dt=\"string\">f9465cb1-7889-4d9a-b552-fdd0addf0eb1</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SiteId>\n              <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ActionId dt:dt=\"string\">55f09022-fb59-44b6-a7c5-9d50704243d3</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ActionId>\n              <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ContentBits dt:dt=\"string\">0</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ContentBits>\n             </CustomDocumentProperties>\n             <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <AllowPNG/>\n             </OfficeDocumentSettings>\n             <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n              <WindowHeight>6820</WindowHeight>\n              <WindowWidth>19200</WindowWidth>\n              <WindowTopX>32767</WindowTopX>\n              <WindowTopY>32767</WindowTopY>\n              <ProtectStructure>False</ProtectStructure>\n              <ProtectWindows>False</ProtectWindows>\n             </ExcelWorkbook>\n             <Styles>\n              <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n               <Alignment ss:Vertical=\"Bottom\"/>\n               <Borders/>\n               <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\n               <Interior/>\n               <NumberFormat/>\n               <Protection/>\n              </Style>\n              <Style ss:ID=\"s62\">\n               <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"\n                ss:Bold=\"1\"/>\n              </Style>\n              <Style ss:ID=\"s62nb\">\n               <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"\n                ss:Bold=\"0\"/>\n              </Style>\n              <Style ss:ID=\"s64\">\n               <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"\n                ss:Bold=\"1\" ss:Italic=\"1\"/>\n              </Style>\n              <Style ss:ID=\"s65\">\n               <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"\n                ss:Italic=\"1\"/>\n              </Style>\n              <Style ss:ID=\"s65ni\">\n               <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"\n                ss:Italic=\"0\"/>\n              </Style>\n             </Styles>\n             <Worksheet ss:Name=\"Sheet1\">\n              <Table ss:ExpandedColumnCount=\"2\" ss:ExpandedRowCount=\"4\" x:FullColumns=\"1\"\n               x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\n               <Row ss:AutoFitHeight=\"0\">\n                <Cell><Data ss:Type=\"String\">normal</Data></Cell>\n                <Cell><Data ss:Type=\"String\">normal</Data></Cell>\n               </Row>\n               <Row ss:AutoFitHeight=\"0\">\n                <Cell ss:StyleID=\"s62\"><Data ss:Type=\"String\">bold</Data></Cell>\n                <Cell ss:StyleID=\"s62nb\"><Data ss:Type=\"String\">not bold</Data></Cell>\n               </Row>\n               <Row ss:AutoFitHeight=\"0\">\n                <Cell ss:StyleID=\"s65\"><Data ss:Type=\"String\">italic</Data></Cell>\n                <Cell ss:StyleID=\"s65ni\"><Data ss:Type=\"String\">not italic</Data></Cell>\n               </Row>\n               <Row ss:AutoFitHeight=\"0\">\n                <Cell ss:StyleID=\"s64\"><Data ss:Type=\"String\">bold italic</Data></Cell>\n                <Cell ss:StyleID=\"s64\"><Data ss:Type=\"String\">bold italic</Data></Cell>\n               </Row>\n              </Table>\n              <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n               <PageSetup>\n                <Header x:Margin=\"0.3\"/>\n                <Footer x:Margin=\"0.3\"/>\n                <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\n               </PageSetup>\n               <Unsynced/>\n               <Print>\n                <ValidPrinterInfo/>\n                <HorizontalResolution>600</HorizontalResolution>\n                <VerticalResolution>600</VerticalResolution>\n               </Print>\n               <Selected/>\n               <Panes>\n                <Pane>\n                 <Number>3</Number>\n                 <ActiveRow>2</ActiveRow>\n                 <ActiveCol>1</ActiveCol>\n                </Pane>\n               </Panes>\n               <ProtectObjects>False</ProtectObjects>\n               <ProtectScenarios>False</ProtectScenarios>\n              </WorksheetOptions>\n             </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Sheet1', $sheet->getTitle());\n        self::assertFalse($sheet->getStyle('A1')->getFont()->getBold());\n        self::assertFalse($sheet->getStyle('A1')->getFont()->getItalic());\n        self::assertTrue($sheet->getStyle('A2')->getFont()->getBold());\n        self::assertFalse($sheet->getStyle('A2')->getFont()->getItalic());\n        self::assertFalse($sheet->getStyle('A3')->getFont()->getBold());\n        self::assertTrue($sheet->getStyle('A3')->getFont()->getItalic());\n        self::assertTrue($sheet->getStyle('A4')->getFont()->getBold());\n        self::assertTrue($sheet->getStyle('A4')->getFont()->getItalic());\n\n        self::assertFalse($sheet->getStyle('B1')->getFont()->getBold());\n        self::assertFalse($sheet->getStyle('B1')->getFont()->getItalic());\n        self::assertFalse($sheet->getStyle('B2')->getFont()->getBold(), 'xml specifies bold=0');\n        self::assertFalse($sheet->getStyle('B2')->getFont()->getItalic());\n        self::assertFalse($sheet->getStyle('B3')->getFont()->getBold());\n        self::assertFalse($sheet->getStyle('B3')->getFont()->getItalic(), 'xml specifies italic=0');\n        self::assertTrue($sheet->getStyle('B4')->getFont()->getBold());\n        self::assertTrue($sheet->getStyle('B4')->getFont()->getItalic());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlFreezePanesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlFreezePanesTest extends TestCase\n{\n    public function testColSpan(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n             xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n             xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n             <Worksheet ss:Name=\"Tabelle1\">\n              <Table>\n              </Table>\n              <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n               <FreezePanes/>\n               <SplitHorizontal>2</SplitHorizontal>\n               <TopRowBottomPane>10</TopRowBottomPane>\n               <SplitVertical>6</SplitVertical>\n               <LeftColumnRightPane>20</LeftColumnRightPane>\n              </WorksheetOptions>\n             </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Tabelle1', $sheet->getTitle());\n        self::assertSame('G3', $sheet->getFreezePane());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlInfoTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlInfoTest extends TestCase\n{\n    public function testListNames(): void\n    {\n        $filename = 'samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $names = $reader->listWorksheetNames($filename);\n        self::assertCount(2, $names);\n        self::assertEquals('Sample Data', $names[0]);\n        self::assertEquals('Report Data', $names[1]);\n    }\n\n    public function testListNamesInvalidFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Invalid Spreadsheet file');\n        $filename = __FILE__;\n        $reader = new Xml();\n        $names = $reader->listWorksheetNames($filename);\n        self::assertNotEquals($names, $names);\n    }\n\n    public function testListNamesGnumericFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Invalid Spreadsheet file');\n        $filename = 'tests/data/Reader/Gnumeric/PageSetup.gnumeric.unzipped.xml';\n        $reader = new Xml();\n        $names = $reader->listWorksheetNames($filename);\n        self::assertNotEquals($names, $names);\n    }\n\n    public function testListInfo(): void\n    {\n        $filename = 'samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $info = $reader->listWorksheetInfo($filename);\n        $expected = [\n            [\n                'worksheetName' => 'Sample Data',\n                'lastColumnLetter' => 'J',\n                'lastColumnIndex' => 9,\n                'totalRows' => 31,\n                'totalColumns' => 10,\n                'sheetState' => 'visible',\n            ],\n            [\n                'worksheetName' => 'Report Data',\n                'lastColumnLetter' => 'I',\n                'lastColumnIndex' => 8,\n                'totalRows' => 15,\n                'totalColumns' => 9,\n                'sheetState' => 'visible',\n            ],\n        ];\n        self::assertEquals($expected, $info);\n    }\n\n    public function testListInfoInvalidFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Invalid Spreadsheet file');\n        $filename = __FILE__;\n        $reader = new Xml();\n        $info = $reader->listWorksheetInfo($filename);\n        self::assertNotEquals($info, $info);\n    }\n\n    public function testListInfoGnumericFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Invalid Spreadsheet file');\n        $filename = 'tests/data/Reader/Gnumeric/PageSetup.gnumeric.unzipped.xml';\n        $reader = new Xml();\n        $info = $reader->listWorksheetInfo($filename);\n        self::assertNotEquals($info, $info);\n    }\n\n    public function testLoadInvalidFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Invalid Spreadsheet file');\n        $filename = __FILE__;\n        $reader = new Xml();\n        $spreadsheet = $reader->load($filename);\n        self::assertNotEquals($spreadsheet, $spreadsheet);\n    }\n\n    public function testLoadGnumericFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Invalid Spreadsheet file');\n        $filename = 'tests/data/Reader/Gnumeric/PageSetup.gnumeric.unzipped.xml';\n        $reader = new Xml();\n        $spreadsheet = $reader->load($filename);\n        self::assertNotEquals($spreadsheet, $spreadsheet);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlIssue4000Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlIssue4000Test extends TestCase\n{\n    public function testFontBoldItalic(): void\n    {\n        // Styles tag and children have ss: prefixes\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n             xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n             xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n             <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <Version>16.00</Version>\n             </DocumentProperties>\n             <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <AllowPNG/>\n             </OfficeDocumentSettings>\n             <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n              <WindowHeight>6510</WindowHeight>\n              <WindowWidth>19200</WindowWidth>\n              <WindowTopX>32767</WindowTopX>\n              <WindowTopY>32767</WindowTopY>\n              <ProtectStructure>False</ProtectStructure>\n              <ProtectWindows>False</ProtectWindows>\n             </ExcelWorkbook>\n             <ss:Styles>\n              <ss:Style ss:ID=\"Default\" ss:Name=\"Normal\">\n               <ss:Alignment ss:Vertical=\"Bottom\"/>\n               <ss:Borders/>\n               <ss:Font ss:FontName=\"Aptos Narrow\" x:Family=\"Swiss\" ss:Size=\"11\"\n                ss:Color=\"#000000\"/>\n               <ss:Interior/>\n               <ss:NumberFormat/>\n               <ss:Protection/>\n              </ss:Style>\n              <ss:Style ss:ID=\"s63\">\n               <ss:Alignment ss:Vertical=\"Bottom\"/>\n               <ss:Borders>\n                <ss:Border ss:Position=\"Bottom\" ss:LineStyle=\"Double\" ss:Weight=\"3\"/>\n                <ss:Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\"/>\n                <ss:Border ss:Position=\"Right\" ss:LineStyle=\"DashDot\" ss:Weight=\"2\"/>\n                <ss:Border ss:Position=\"Top\" ss:LineStyle=\"Dash\" ss:Weight=\"1\"/>\n               </ss:Borders>\n               <ss:Font ss:FontName=\"Aptos Narrow\" x:Family=\"Swiss\" ss:Size=\"11\"\n                ss:Color=\"#000000\" ss:Bold=\"1\"/>\n               <ss:Interior/>\n               <ss:NumberFormat/>\n               <ss:Protection/>\n              </ss:Style>\n             </ss:Styles>\n             <Worksheet ss:Name=\"Test\">\n              <Table ss:ExpandedColumnCount=\"2\" ss:ExpandedRowCount=\"2\" x:FullColumns=\"1\"\n               x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\n               <Row ss:Index=\"2\" ss:Height=\"15\">\n                <Cell ss:Index=\"2\" ss:StyleID=\"s63\"><Data ss:Type=\"String\">TEST</Data></Cell>\n               </Row>\n              </Table>\n              <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n               <Selected/>\n               <ProtectObjects>False</ProtectObjects>\n               <ProtectScenarios>False</ProtectScenarios>\n              </WorksheetOptions>\n             </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Test', $sheet->getTitle());\n        self::assertSame(Border::BORDER_DOUBLE, $sheet->getStyle('B2')->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_MEDIUMDASHDOT, $sheet->getStyle('B2')->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_DASHED, $sheet->getStyle('B2')->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_HAIR, $sheet->getStyle('B2')->getBorders()->getLeft()->getBorderStyle());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlIssue4002Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass XmlIssue4002Test extends AbstractFunctional\n{\n    private const XML_DATA = <<< 'EOT'\n        <?xml version=\"1.0\"?>\n        <?mso-application progid=\"Excel.Sheet\"?>\n        <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n         xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n         xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n         xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n         xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n         <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n          <LastAuthor>Owen Leibman</LastAuthor>\n          <Created>2024-04-25T19:31:48Z</Created>\n          <Version>16.00</Version>\n         </DocumentProperties>\n         <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n          <AllowPNG/>\n         </OfficeDocumentSettings>\n         <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n          <WindowHeight>6510</WindowHeight>\n          <WindowWidth>19200</WindowWidth>\n          <WindowTopX>32767</WindowTopX>\n          <WindowTopY>32767</WindowTopY>\n          <ProtectStructure>False</ProtectStructure>\n          <ProtectWindows>False</ProtectWindows>\n         </ExcelWorkbook>\n         <Styles>\n          <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n           <Alignment ss:Vertical=\"Bottom\"/>\n           <Borders/>\n           <Font ss:FontName=\"Aptos Narrow\" x:Family=\"Swiss\" ss:Size=\"11\"\n            ss:Color=\"#000000\"/>\n           <Interior/>\n           <NumberFormat/>\n           <Protection/>\n          </Style>\n          <Style ss:ID=\"s62\">\n           <Alignment ss:Vertical=\"Bottom\"/>\n           <Borders>\n            <Border ss:Position=\"Bottom\" ss:LineStyle=\"Double\" ss:Weight=\"3\"/>\n            <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\"/>\n            <Border ss:Position=\"Right\" ss:LineStyle=\"DashDot\" ss:Weight=\"2\"/>\n            <Border ss:Position=\"Top\" ss:LineStyle=\"Dash\" ss:Weight=\"1\"/>\n           </Borders>\n           <Font ss:FontName=\"Aptos Narrow\" x:Family=\"Swiss\" ss:Size=\"11\"\n            ss:Color=\"#000000\" ss:Bold=\"1\"/>\n           <Interior/>\n           <NumberFormat/>\n           <Protection/>\n          </Style>\n         </Styles>\n         <Worksheet ss:Name=\"Test\">\n          <Table ss:ExpandedColumnCount=\"5\" ss:ExpandedRowCount=\"4\" x:FullColumns=\"1\"\n           x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\n           <Row ss:AutoFitHeight=\"0\"/>\n           <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">\n            <Cell ss:Index=\"2\" ss:StyleID=\"s62\"><Data ss:Type=\"String\">TEST</Data></Cell>\n            <Cell ss:Index=\"5\"><Data ss:Type=\"String\">Vertical</Data></Cell>\n           </Row>\n           <Row ss:AutoFitHeight=\"0\"/>\n           <Row ss:AutoFitHeight=\"0\">\n            <Cell ss:Index=\"2\"><Data ss:Type=\"String\">New Page</Data></Cell>\n            <Cell ss:Index=\"5\"><Data ss:Type=\"String\">Last</Data></Cell>\n           </Row>\n          </Table>\n          <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n           <Unsynced/>\n           <Print>\n            <ValidPrinterInfo/>\n            <HorizontalResolution>600</HorizontalResolution>\n            <VerticalResolution>600</VerticalResolution>\n           </Print>\n           <ShowPageBreakZoom/>\n           <Zoom>200</Zoom>\n           <PageBreakZoom>200</PageBreakZoom>\n           <Selected/>\n           <Panes>\n            <Pane>\n             <Number>3</Number>\n             <ActiveRow>2</ActiveRow>\n             <ActiveCol>3</ActiveCol>\n            </Pane>\n           </Panes>\n           <ProtectObjects>False</ProtectObjects>\n           <ProtectScenarios>False</ProtectScenarios>\n          </WorksheetOptions>\n          <PageBreaks xmlns=\"urn:schemas-microsoft-com:office:excel\">\n           <ColBreaks>\n            <ColBreak>\n             <Column>3</Column>\n            </ColBreak>\n           </ColBreaks>\n           <RowBreaks>\n            <RowBreak>\n             <Row>2</Row>\n            </RowBreak>\n           </RowBreaks>\n          </PageBreaks>\n         </Worksheet>\n        </Workbook>\n        EOT;\n\n    public function testZoomAndPageBreaks(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString(self::XML_DATA);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Test', $sheet->getTitle());\n        self::assertSame(Border::BORDER_DOUBLE, $sheet->getStyle('B2')->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_MEDIUMDASHDOT, $sheet->getStyle('B2')->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_DASHED, $sheet->getStyle('B2')->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_HAIR, $sheet->getStyle('B2')->getBorders()->getLeft()->getBorderStyle());\n\n        self::assertSame(['A2'], array_keys($sheet->getRowBreaks()));\n        self::assertSame(['D1'], array_keys($sheet->getColumnBreaks()));\n        $sheetView = $sheet->getSheetView();\n        self::assertSame(200, $sheetView->getZoomScale());\n        self::assertSame(200, $sheetView->getZoomScaleNormal());\n        self::assertSame(100, $sheetView->getZoomScalePageLayoutView());\n        self::assertSame(200, $sheetView->getZoomScaleSheetLayoutView());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testXlsxWriterAndReader(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString(self::XML_DATA);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(['A2'], array_keys($rsheet->getRowBreaks()));\n        self::assertSame(['D1'], array_keys($rsheet->getColumnBreaks()));\n        $rsheetView = $rsheet->getSheetView();\n        self::assertSame(200, $rsheetView->getZoomScale());\n        self::assertSame(200, $rsheetView->getZoomScaleNormal());\n        self::assertSame(100, $rsheetView->getZoomScalePageLayoutView());\n        self::assertSame(200, $rsheetView->getZoomScaleSheetLayoutView());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testXlsWriterAndReader(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString(self::XML_DATA);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(['A2'], array_keys($rsheet->getRowBreaks()));\n        self::assertSame(['D1'], array_keys($rsheet->getColumnBreaks()));\n        $rsheetView = $rsheet->getSheetView();\n        self::assertSame(200, $rsheetView->getZoomScale());\n        self::assertSame(200, $rsheetView->getZoomScaleNormal());\n        self::assertSame(100, $rsheetView->getZoomScalePageLayoutView());\n        self::assertSame(100, $rsheetView->getZoomScaleSheetLayoutView(), 'different value than Xml or Xlsx but I do not see any consequence of that');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlLoadTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlLoadTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private string $locale;\n\n    protected function setUp(): void\n    {\n        $this->locale = Settings::getLocale();\n    }\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        Settings::setLocale($this->locale);\n    }\n\n    public function testLoadEnglish(): void\n    {\n        $this->xtestLoad();\n    }\n\n    public function testLoadFrench(): void\n    {\n        Settings::setLocale('fr');\n        $this->xtestLoad();\n    }\n\n    public function xtestLoad(): void\n    {\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $this->spreadsheet = $spreadsheet = $reader->load($filename);\n        self::assertEquals(2, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals('Report Data', $sheet->getTitle());\n        self::assertEquals('BCD', $sheet->getCell('A4')->getValue());\n        $props = $spreadsheet->getProperties();\n        self::assertEquals('Mark Baker', $props->getCreator());\n        $creationDate = $props->getCreated();\n        $result = Date::formattedDateTimeFromTimestamp(\"$creationDate\", 'Y-m-d\\TH:i:s\\Z', new DateTimeZone('UTC'));\n        self::assertEquals('2010-09-02T20:48:39Z', $result);\n        $creationDate = $props->getModified();\n        $result = Date::formattedDateTimeFromTimestamp(\"$creationDate\", 'Y-m-d\\TH:i:s\\Z', new DateTimeZone('UTC'));\n        self::assertEquals('2010-09-03T21:48:39Z', $result);\n        self::assertEquals('AbCd1234', $props->getCustomPropertyValue('my_API_Token'));\n        self::assertEquals('2', $props->getCustomPropertyValue('myאInt'));\n        /** @var string */\n        $creationDate = $props->getCustomPropertyValue('my_API_Token_Expiry');\n        $result = Date::formattedDateTimeFromTimestamp(\"$creationDate\", 'Y-m-d\\TH:i:s\\Z', new DateTimeZone('UTC'));\n        self::assertEquals('2019-01-31T07:00:00Z', $result);\n\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('Sample Data', $sheet->getTitle());\n        self::assertEquals('Test String 1', $sheet->getCell('A1')->getValue());\n        self::assertEquals('Test with (\") in string', $sheet->getCell('A4')->getValue());\n\n        self::assertEquals(22269, $sheet->getCell('A10')->getValue());\n        self::assertEquals('dd/mm/yyyy', $sheet->getCell('A10')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('19/12/1960', $sheet->getCell('A10')->getFormattedValue());\n        self::assertEquals(1.5, $sheet->getCell('A11')->getValue());\n        self::assertEquals('# ?0/??0', $sheet->getCell('A11')->getStyle()->getNumberFormat()->getFormatCode());\n        // Same pattern, same value, different display in Gnumeric vs Excel\n        //self::assertEquals('1 1/2', $sheet->getCell('A11')->getFormattedValue());\n        self::assertEquals('hh\":\"mm\":\"ss', $sheet->getCell('A13')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('02:30:00', $sheet->getCell('A13')->getFormattedValue());\n        self::assertEquals('d/m/yy hh\":\"mm', $sheet->getCell('A15')->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals('19/12/60 01:30', $sheet->getCell('A15')->getFormattedValue());\n\n        self::assertEquals('=B1+C1', $sheet->getCell('H1')->getValue());\n        self::assertEquals('=E2&F2', $sheet->getCell('J2')->getValue());\n        self::assertEquals('=SUM(C1:C4)', $sheet->getCell('I5')->getValue());\n\n        // property not yet supported\n        //self::assertFalse($sheet->getRowDimension(30)->getVisible());\n        $hyperlink = $sheet->getCell('A21');\n        self::assertEquals('PhpSpreadsheet', $hyperlink->getValue());\n        self::assertEquals('https://github.com/PHPOffice/PhpSpreadsheet', $hyperlink->getHyperlink()->getUrl());\n    }\n\n    public function testLoadFilter(): void\n    {\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $filter = new XmlFilter();\n        $reader->setReadFilter($filter);\n        $this->spreadsheet = $spreadsheet = $reader->load($filename);\n        self::assertEquals(2, $spreadsheet->getSheetCount());\n        $sheet = $spreadsheet->getSheet(1);\n        self::assertEquals('Report Data', $sheet->getTitle());\n        self::assertEquals('', $sheet->getCell('A4')->getValue());\n        $props = $spreadsheet->getProperties();\n        self::assertEquals('Mark Baker', $props->getCreator());\n    }\n\n    public function testLoadSelectedSheets(): void\n    {\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $reader->setLoadSheetsOnly(['Unknown Sheet', 'Report Data']);\n        $this->spreadsheet = $spreadsheet = $reader->load($filename);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('Report Data', $sheet->getTitle());\n        self::assertEquals('Third Heading', $sheet->getCell('C2')->getValue());\n    }\n\n    public function testLoadNoSelectedSheets(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('You tried to set a sheet active by the out of bounds index');\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $reader->setLoadSheetsOnly(['Unknown Sheet', 'xReport Data']);\n        $this->spreadsheet = $reader->load($filename);\n    }\n\n    public function testLoadUnusableSample(): void\n    {\n        // Sample spreadsheet is not readable by Excel.\n        // But PhpSpreadsheet can load it.\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.short.bad.xml';\n        $reader = new Xml();\n        $this->spreadsheet = $spreadsheet = $reader->load($filename);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('Sample Data', $sheet->getTitle());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlOddTest extends TestCase\n{\n    private string $filename = '';\n\n    protected function teardown(): void\n    {\n        if ($this->filename) {\n            unlink($this->filename);\n            $this->filename = '';\n        }\n    }\n\n    public function testWriteThenRead(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\" encoding=\"UTF-8\"?><?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns:c=\"urn:schemas-microsoft-com:office:component:spreadsheet\"\n                      xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"\n                      xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n                      xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n                      >\n             <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <Title>Xml2003 Short Workbook</Title>\n             </DocumentProperties>\n             <CustomDocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <my_x05d0_Int dt:dt=\"integer\">2</my_x05d0_Int>\n             </CustomDocumentProperties>\n                <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n                    <WindowHeight>9000</WindowHeight>\n                    <WindowWidth>13860</WindowWidth>\n                    <WindowTopX>240</WindowTopX>\n                    <WindowTopY>75</WindowTopY>\n                    <ProtectStructure>False</ProtectStructure>\n                    <ProtectWindows>False</ProtectWindows>\n                </ExcelWorkbook>\n                <ss:Worksheet ss:Name=\"Sample Data\">\n                    <Table>\n                        <Column ss:Width=\"96.4913\"/>\n                        <Row ss:Index=\"8\" ss:AutoFitHeight=\"0\" ss:Height=\"14.9953\">\n                            <Cell>\n                                <ss:Data ss:Type=\"String\">Test String 1</ss:Data>\n                            </Cell>\n                        </Row>\n                    </Table>\n                </ss:Worksheet>\n            </Workbook>\n            EOT;\n        $this->filename = File::temporaryFilename();\n        file_put_contents($this->filename, $xmldata);\n        $reader = new Xml();\n        $spreadsheet = $reader->load($this->filename);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Sample Data', $sheet->getTitle());\n        self::assertEquals('Test String 1', $sheet->getCell('A8')->getValue());\n\n        $props = $spreadsheet->getProperties();\n        self::assertEquals('Xml2003 Short Workbook', $props->getTitle());\n        self::assertEquals('2', $props->getCustomPropertyValue('myאInt'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlPropertiesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass XmlPropertiesTest extends AbstractFunctional\n{\n    private string $filename = 'tests/data/Reader/Xml/hyperlinkbase.xml';\n\n    public function testProperties(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->load($this->filename);\n\n        $properties = $spreadsheet->getProperties();\n        self::assertSame('title', $properties->getTitle());\n        self::assertSame('topic', $properties->getSubject());\n        self::assertSame('author', $properties->getCreator());\n        self::assertSame('keyword1, keyword2', $properties->getKeywords());\n        self::assertSame('no comment', $properties->getDescription());\n        self::assertSame('last author', $properties->getLastModifiedBy());\n        $expected = self::timestampToInt('2023-05-18T11:21:43Z');\n        self::assertEquals($expected, $properties->getCreated());\n        $expected = self::timestampToInt('2023-05-18T11:30:00Z');\n        self::assertEquals($expected, $properties->getModified());\n        self::assertSame('category', $properties->getCategory());\n        self::assertSame('manager', $properties->getManager());\n        self::assertSame('company', $properties->getCompany());\n\n        self::assertSame('https://phpspreadsheet.readthedocs.io/en/latest/', $properties->getHyperlinkBase());\n\n        self::assertSame('TheString', $properties->getCustomPropertyValue('StringProperty'));\n        self::assertSame(12345, $properties->getCustomPropertyValue('NumberProperty'));\n        $expected = self::timestampToInt('2023-05-18T10:00:00Z');\n        self::assertEquals($expected, $properties->getCustomPropertyValue('DateProperty'));\n        $expected = self::timestampToInt('2023-05-19T11:00:00Z');\n        self::assertEquals($expected, $properties->getCustomPropertyValue('DateProperty2'));\n        self::assertTrue($properties->getCustomPropertyValue('BooleanPropertyTrue'));\n        self::assertFalse($properties->getCustomPropertyValue('BooleanPropertyFalse'));\n        self::assertEqualsWithDelta(1.2345, $properties->getCustomPropertyValue('FloatProperty'), 1E-8);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        // Note that relative links don't actually work in XML format.\n        // It will, however, work just fine in the Xlsx and Html copies.\n        $hyperlink = $sheet->getCell('A1')->getHyperlink();\n        self::assertSame('references/features-cross-reference/', $hyperlink->getUrl());\n        // Same comment as for cell above.\n        self::assertSame('topics/accessing-cells/', $sheet->getCell('A2')->getCalculatedValue());\n        // No problem for absolute links.\n        $hyperlink = $sheet->getCell('A3')->getHyperlink();\n        self::assertSame('https://www.google.com/', $hyperlink->getUrl());\n        self::assertSame('https://www.yahoo.com', $sheet->getCell('A4')->getCalculatedValue());\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $properties = $reloadedSpreadsheet->getProperties();\n        self::assertSame('title', $properties->getTitle());\n        self::assertSame('topic', $properties->getSubject());\n        self::assertSame('author', $properties->getCreator());\n        self::assertSame('keyword1, keyword2', $properties->getKeywords());\n        self::assertSame('no comment', $properties->getDescription());\n        self::assertSame('last author', $properties->getLastModifiedBy());\n        $expected = self::timestampToInt('2023-05-18T11:21:43Z');\n        self::assertEquals($expected, $properties->getCreated());\n        $expected = self::timestampToInt('2023-05-18T11:30:00Z');\n        self::assertEquals($expected, $properties->getModified());\n        self::assertSame('category', $properties->getCategory());\n        self::assertSame('manager', $properties->getManager());\n        self::assertSame('company', $properties->getCompany());\n\n        self::assertSame('https://phpspreadsheet.readthedocs.io/en/latest/', $properties->getHyperlinkBase());\n\n        self::assertSame('TheString', $properties->getCustomPropertyValue('StringProperty'));\n        self::assertSame(12345, $properties->getCustomPropertyValue('NumberProperty'));\n        // Note that Xlsx will ignore the time part when displaying\n        // the property.\n        $expected = self::timestampToInt('2023-05-18T10:00:00Z');\n        self::assertEquals($expected, $properties->getCustomPropertyValue('DateProperty'));\n        $expected = self::timestampToInt('2023-05-19T11:00:00Z');\n        self::assertEquals($expected, $properties->getCustomPropertyValue('DateProperty2'));\n        self::assertTrue($properties->getCustomPropertyValue('BooleanPropertyTrue'));\n        self::assertFalse($properties->getCustomPropertyValue('BooleanPropertyFalse'));\n        self::assertEqualsWithDelta(1.2345, $properties->getCustomPropertyValue('FloatProperty'), 1E-8);\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        // Note that relative links don't actually work in XML format.\n        // It will, however, work just fine in the Xlsx and Html copies.\n        $hyperlink = $sheet->getCell('A1')->getHyperlink();\n        self::assertSame('references/features-cross-reference/', $hyperlink->getUrl());\n        // Same comment as for cell above.\n        self::assertSame('topics/accessing-cells/', $sheet->getCell('A2')->getCalculatedValue());\n        // No problem for absolute links.\n        $hyperlink = $sheet->getCell('A3')->getHyperlink();\n        self::assertSame('https://www.google.com/', $hyperlink->getUrl());\n        self::assertSame('https://www.yahoo.com', $sheet->getCell('A4')->getCalculatedValue());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testPropertiesHtml(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->load($this->filename);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n\n        $properties = $reloadedSpreadsheet->getProperties();\n        self::assertSame('https://phpspreadsheet.readthedocs.io/en/latest/', $properties->getHyperlinkBase());\n\n        self::assertSame('title', $properties->getTitle());\n        self::assertSame('topic', $properties->getSubject());\n        self::assertSame('author', $properties->getCreator());\n        self::assertSame('keyword1, keyword2', $properties->getKeywords());\n        self::assertSame('no comment', $properties->getDescription());\n        self::assertSame('last author', $properties->getLastModifiedBy());\n        $expected = self::timestampToInt('2023-05-18T11:21:43Z');\n        self::assertEquals($expected, $properties->getCreated());\n        $expected = self::timestampToInt('2023-05-18T11:30:00Z');\n        self::assertEquals($expected, $properties->getModified());\n        self::assertSame('category', $properties->getCategory());\n        self::assertSame('manager', $properties->getManager());\n        self::assertSame('company', $properties->getCompany());\n\n        self::assertSame('TheString', $properties->getCustomPropertyValue('StringProperty'));\n        self::assertSame(12345, $properties->getCustomPropertyValue('NumberProperty'));\n        $expected = self::timestampToInt('2023-05-18T10:00:00Z');\n        self::assertEquals($expected, $properties->getCustomPropertyValue('DateProperty'));\n        $expected = self::timestampToInt('2023-05-19T11:00:00Z');\n        self::assertEquals($expected, $properties->getCustomPropertyValue('DateProperty2'));\n        self::assertTrue($properties->getCustomPropertyValue('BooleanPropertyTrue'));\n        self::assertFalse($properties->getCustomPropertyValue('BooleanPropertyFalse'));\n        self::assertEqualsWithDelta(1.2345, $properties->getCustomPropertyValue('FloatProperty'), 1E-8);\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        // Note that relative links don't actually work in XML format.\n        // It will, however, work just fine in the Xlsx and Html copies.\n        $hyperlink = $sheet->getCell('A1')->getHyperlink();\n        self::assertSame('references/features-cross-reference/', $hyperlink->getUrl());\n        // Same comment as for cell above.\n        self::assertSame('topics/accessing-cells/', $sheet->getCell('A2')->getCalculatedValue());\n        // No problem for absolute links.\n        $hyperlink = $sheet->getCell('A3')->getHyperlink();\n        self::assertSame('https://www.google.com/', $hyperlink->getUrl());\n        self::assertSame('https://www.yahoo.com', $sheet->getCell('A4')->getCalculatedValue());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testHyperlinksXls(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->load($this->filename);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        // Note that relative links don't actually work in XML format.\n        // However, Xls Writer will convert relative to absolute.\n        $hyperlink = $sheet->getCell('A1')->getHyperlink();\n        self::assertSame('https://phpspreadsheet.readthedocs.io/en/latest/references/features-cross-reference/', $hyperlink->getUrl());\n        // Xls writer does not get involved in function call.\n        // However, hyperlink does get updated somewhere.\n        //self::assertSame('topics/accessing-cells/', $sheet->getCell('A2')->getCalculatedValue());\n        $hyperlink = $sheet->getCell('A2')->getHyperlink();\n        self::assertSame('https://phpspreadsheet.readthedocs.io/en/latest/topics/accessing-cells/', $hyperlink->getUrl());\n        // No problem for absolute links.\n        $hyperlink = $sheet->getCell('A3')->getHyperlink();\n        self::assertSame('https://www.google.com/', $hyperlink->getUrl());\n        self::assertSame('https://www.yahoo.com', $sheet->getCell('A4')->getCalculatedValue());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    private static function timestampToInt(string $timestamp): string\n    {\n        $dto = new DateTimeImmutable($timestamp);\n\n        return $dto->format('U');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlProtectionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlProtectionTest extends TestCase\n{\n    public function testProtection(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n                <Styles>\n                    <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n                        <Protection x:HideFormula=\"1\" ss:Protected=\"1\"/>\n                    </Style>\n                    <Style ss:ID=\"visible\">\n                        <Protection x:HideFormula=\"0\" ss:Protected=\"1\"/>\n                    </Style>\n                    <Style ss:ID=\"writable\">\n                        <Protection x:HideFormula=\"1\" ss:Protected=\"0\"/>\n                    </Style>\n                    <Style ss:ID=\"neither\">\n                    </Style>\n                </Styles>\n                <Worksheet ss:Name=\"sheet 1\" ss:Protected=\"1\">\n                    <ss:Table>\n                        <ss:Row>\n                            <ss:Cell ss:Formula=\"=1\">\n                                <ss:Data ss:Type=\"Number\"/>\n                            </ss:Cell>\n                            <ss:Cell ss:StyleID=\"visible\" ss:Formula=\"=2\">\n                                <ss:Data ss:Type=\"Number\"/>\n                            </ss:Cell>\n                            <ss:Cell ss:StyleID=\"writable\" ss:Formula=\"=3\">\n                                <ss:Data ss:Type=\"Number\"/>\n                            </ss:Cell>\n                        </ss:Row>\n                    </ss:Table>\n                </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('sheet 1', $sheet->getTitle());\n        self::assertTrue($sheet->getProtection()->isProtectionEnabled());\n        self::assertSame('protected', $sheet->getCell('A1')->getStyle()->getProtection()->getLocked());\n        self::assertSame('protected', $sheet->getCell('A1')->getStyle()->getProtection()->getHidden());\n        self::assertSame('protected', $sheet->getCell('B1')->getStyle()->getProtection()->getLocked());\n        self::assertSame('unprotected', $sheet->getCell('B1')->getStyle()->getProtection()->getHidden());\n        self::assertSame('unprotected', $sheet->getCell('C1')->getStyle()->getProtection()->getLocked());\n        self::assertSame('protected', $sheet->getCell('C1')->getStyle()->getProtection()->getHidden());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlRichTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\Run;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlRichTextTest extends TestCase\n{\n    public function testBreakTag(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n                xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n                xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n                xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n                xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n            <Worksheet ss:Name=\"Test\">\n                <ss:Table>\n                    <ss:Row>\n                        <ss:Cell>\n                            <ss:Data ss:Type=\"String\" xmlns=\"http://www.w3.org/TR/REC-html40\"><I>italic</I><B>bold</B><BR />second line</ss:Data>\n                        </ss:Cell>\n                    </ss:Row>\n                </ss:Table>\n            </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Test', $sheet->getTitle());\n        $richText = $sheet->getCell('A1')->getValue();\n        self::assertInstanceOf(RichText::class, $richText);\n        $elements = $richText->getRichTextElements();\n        self::assertCount(3, $elements);\n        $run = $elements[0];\n        self::assertInstanceOf(Run::class, $run);\n        self::assertSame('italic', $run->getText());\n        self::assertNotNull($run->getFont());\n        self::assertTrue($run->getFont()->getItalic());\n        self::assertFalse($run->getFont()->getBold());\n\n        $run = $elements[1];\n        self::assertInstanceOf(Run::class, $run);\n        self::assertSame('bold', $run->getText());\n        self::assertNotNull($run->getFont());\n        self::assertFalse($run->getFont()->getItalic());\n        self::assertTrue($run->getFont()->getBold());\n\n        $run = $elements[2];\n        self::assertInstanceOf(Run::class, $run);\n        self::assertSame(\"\\nsecond line\", $run->getText());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNewlineAndFontTag(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n             xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n             xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n             xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n             <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <LastAuthor>Owen Leibman</LastAuthor>\n              <Created>2024-04-28T06:03:14Z</Created>\n              <Version>16.00</Version>\n             </DocumentProperties>\n             <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n              <AllowPNG/>\n             </OfficeDocumentSettings>\n             <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n              <WindowHeight>6510</WindowHeight>\n              <WindowWidth>19200</WindowWidth>\n              <WindowTopX>32767</WindowTopX>\n              <WindowTopY>32767</WindowTopY>\n              <ProtectStructure>False</ProtectStructure>\n              <ProtectWindows>False</ProtectWindows>\n             </ExcelWorkbook>\n             <Styles>\n              <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n               <Alignment ss:Vertical=\"Bottom\"/>\n               <Borders/>\n               <Font ss:FontName=\"Aptos Narrow\" x:Family=\"Swiss\" ss:Size=\"11\"\n                ss:Color=\"#000000\"/>\n               <Interior/>\n               <NumberFormat/>\n               <Protection/>\n              </Style>\n              <Style ss:ID=\"s63\">\n               <Alignment ss:Vertical=\"Bottom\" ss:WrapText=\"1\"/>\n               <Borders/>\n               <Font ss:FontName=\"Aptos Narrow\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Italic=\"1\"/>\n               <Interior/>\n               <NumberFormat/>\n               <Protection/>\n              </Style>\n             </Styles>\n             <Worksheet ss:Name=\"Test\">\n              <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"1\" x:FullColumns=\"1\"\n               x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\n               <Row ss:AutoFitHeight=\"0\" ss:Height=\"47.5\">\n                <Cell ss:StyleID=\"s63\"><ss:Data ss:Type=\"String\"\n                  xmlns=\"http://www.w3.org/TR/REC-html40\"><I>italic</I><B>bold&#10;</B><Font\n                   html:Color=\"#FF0000\">second</Font><Font> line</Font></ss:Data></Cell>\n               </Row>\n              </Table>\n              <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n               <Unsynced/>\n               <Selected/>\n               <ProtectObjects>False</ProtectObjects>\n               <ProtectScenarios>False</ProtectScenarios>\n              </WorksheetOptions>\n             </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('Test', $sheet->getTitle());\n        $richText = $sheet->getCell('A1')->getValue();\n        self::assertInstanceOf(RichText::class, $richText);\n        $elements = $richText->getRichTextElements();\n        self::assertCount(4, $elements);\n        $run = $elements[0];\n        self::assertInstanceOf(Run::class, $run);\n        self::assertSame('italic', $run->getText());\n        self::assertNotNull($run->getFont());\n        self::assertTrue($run->getFont()->getItalic());\n        self::assertFalse($run->getFont()->getBold());\n\n        $run = $elements[1];\n        self::assertInstanceOf(Run::class, $run);\n        self::assertSame(\"bold\\n\", $run->getText());\n        self::assertNotNull($run->getFont());\n        self::assertFalse($run->getFont()->getItalic());\n        self::assertTrue($run->getFont()->getBold());\n\n        $run = $elements[2];\n        self::assertInstanceOf(Run::class, $run);\n        self::assertSame('second', $run->getText());\n        self::assertSame('FF0000', $run->getFont()?->getColor()->getRgb());\n\n        $run = $elements[3];\n        self::assertInstanceOf(Run::class, $run);\n        self::assertSame(' line', $run->getText());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlStyleCoverageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlStyleCoverageTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerBorderStyle')]\n    public function testBorderStyle(string $style, string $expectedResult): void\n    {\n        $styles = Xml::XmlMappings();\n        /** @var string[] */\n        $borders = $styles['borderStyle'];\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testBorderStyleCoverage(): void\n    {\n        $styles = Xml::XmlMappings();\n        /** @var mixed[] */\n        $expected = $styles['borderStyle'];\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        $tests = $this->providerBorderStyle();\n        foreach ($tests as $test) {\n            /** @var string[] $test */\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"Borderstyle $key not tested\");\n        }\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerfillType')]\n    public function testFillType(string $style, string $expectedResult): void\n    {\n        $styles = Xml::xmlMappings();\n        /** @var string[] */\n        $borders = $styles['fillType'];\n        self::assertEquals($expectedResult, $borders[$style]);\n    }\n\n    public function testFillTypeCoverage(): void\n    {\n        $styles = Xml::XmlMappings();\n        /** @var string[] */\n        $expected = $styles['fillType'];\n        $covered = [];\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        $tests = $this->providerfillType();\n        foreach ($tests as $test) {\n            /** @var string[] $test */\n            $covered[$test[0]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"fillType $key not tested\");\n        }\n    }\n\n    public static function providerBorderStyle(): array\n    {\n        return [\n            ['continuous', Border::BORDER_HAIR],\n            ['dash', Border::BORDER_DASHED],\n            ['dashdot', Border::BORDER_DASHDOT],\n            ['dashdotdot', Border::BORDER_DASHDOTDOT],\n            ['dot', Border::BORDER_DOTTED],\n            ['double', Border::BORDER_DOUBLE],\n            ['0continuous', Border::BORDER_HAIR],\n            ['0dash', Border::BORDER_DASHED],\n            ['0dashdot', Border::BORDER_DASHDOT],\n            ['0dashdotdot', Border::BORDER_DASHDOTDOT],\n            ['0dot', Border::BORDER_DOTTED],\n            ['0double', Border::BORDER_DOUBLE],\n            ['1continuous', Border::BORDER_THIN],\n            ['1dash', Border::BORDER_DASHED],\n            ['1dashdot', Border::BORDER_DASHDOT],\n            ['1dashdotdot', Border::BORDER_DASHDOTDOT],\n            ['1dot', Border::BORDER_DOTTED],\n            ['1double', Border::BORDER_DOUBLE],\n            ['2continuous', Border::BORDER_MEDIUM],\n            ['2dash', Border::BORDER_MEDIUMDASHED],\n            ['2dashdot', Border::BORDER_MEDIUMDASHDOT],\n            ['2dashdotdot', Border::BORDER_MEDIUMDASHDOTDOT],\n            ['2dot', Border::BORDER_DOTTED],\n            ['2double', Border::BORDER_DOUBLE],\n            ['3continuous', Border::BORDER_THICK],\n            ['3dash', Border::BORDER_MEDIUMDASHED],\n            ['3dashdot', Border::BORDER_MEDIUMDASHDOT],\n            ['3dashdotdot', Border::BORDER_MEDIUMDASHDOTDOT],\n            ['3dot', Border::BORDER_DOTTED],\n            ['3double', Border::BORDER_DOUBLE],\n        ];\n    }\n\n    public static function providerFillType(): array\n    {\n        return [\n            ['solid', Fill::FILL_SOLID],\n            ['gray75', Fill::FILL_PATTERN_DARKGRAY],\n            ['gray50', Fill::FILL_PATTERN_MEDIUMGRAY],\n            ['gray25', Fill::FILL_PATTERN_LIGHTGRAY],\n            ['gray125', Fill::FILL_PATTERN_GRAY125],\n            ['gray0625', Fill::FILL_PATTERN_GRAY0625],\n            ['horzstripe', Fill::FILL_PATTERN_DARKHORIZONTAL],\n            ['vertstripe', Fill::FILL_PATTERN_DARKVERTICAL],\n            ['reversediagstripe', Fill::FILL_PATTERN_DARKUP],\n            ['diagstripe', Fill::FILL_PATTERN_DARKDOWN],\n            ['diagcross', Fill::FILL_PATTERN_DARKGRID],\n            ['thickdiagcross', Fill::FILL_PATTERN_DARKTRELLIS],\n            ['thinhorzstripe', Fill::FILL_PATTERN_LIGHTHORIZONTAL],\n            ['thinvertstripe', Fill::FILL_PATTERN_LIGHTVERTICAL],\n            ['thinreversediagstripe', Fill::FILL_PATTERN_LIGHTUP],\n            ['thindiagstripe', Fill::FILL_PATTERN_LIGHTDOWN],\n            ['thinhorzcross', Fill::FILL_PATTERN_LIGHTGRID],\n            ['thindiagcross', Fill::FILL_PATTERN_LIGHTTRELLIS],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlStylesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlStylesTest extends TestCase\n{\n    public function testBorders(): void\n    {\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $spreadsheet = $reader->load($filename);\n\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getCell('C10')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C10')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getCell('C12')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C12')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C14')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getCell('C14')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getCell('C16')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C16')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertEquals(Border::BORDER_THICK, $sheet->getCell('C18')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Color::COLOR_RED, $sheet->getCell('C18')->getStyle()->getBorders()->getTop()->getColor()->getARGB());\n        self::assertEquals(Border::BORDER_THICK, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Color::COLOR_YELLOW, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getColor()->getARGB());\n        self::assertEquals(Border::BORDER_THICK, $sheet->getCell('C18')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C18')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertEquals(Border::BORDER_NONE, $sheet->getCell('C18')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n\n        self::assertEquals(Borders::DIAGONAL_BOTH, $sheet->getCell('E18')->getStyle()->getBorders()->getDiagonalDirection());\n        self::assertEquals(Borders::DIAGONAL_DOWN, $sheet->getCell('I18')->getStyle()->getBorders()->getDiagonalDirection());\n        self::assertEquals(Borders::DIAGONAL_UP, $sheet->getCell('J18')->getStyle()->getBorders()->getDiagonalDirection());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFont(): void\n    {\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $spreadsheet = $reader->load($filename);\n\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals('FFFF0000', $sheet->getCell('A1')->getStyle()->getFont()->getColor()->getARGB());\n        self::assertEquals(Font::UNDERLINE_SINGLE, $sheet->getCell('A3')->getStyle()->getFont()->getUnderline());\n\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E1')->getStyle()->getFont()->getItalic());\n\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('E3')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('E3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('E4')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('E4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('E4')->getStyle()->getFont()->getUnderline());\n\n        self::assertTrue($sheet->getCell('F1')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F1')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F1')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F2')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F2')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getBold());\n        self::assertTrue($sheet->getCell('F3')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F3')->getStyle()->getFont()->getUnderline());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getBold());\n        self::assertFalse($sheet->getCell('F4')->getStyle()->getFont()->getItalic());\n        self::assertEquals(Font::UNDERLINE_NONE, $sheet->getCell('F4')->getStyle()->getFont()->getUnderline());\n\n        self::assertEquals(45, $sheet->getCell('E22')->getStyle()->getAlignment()->getTextRotation());\n        self::assertEquals(-90, $sheet->getCell('G22')->getStyle()->getAlignment()->getTextRotation());\n        self::assertEquals(Border::BORDER_DOUBLE, $sheet->getCell('N13')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertEquals(Font::UNDERLINE_DOUBLE, $sheet->getCell('A24')->getStyle()->getFont()->getUnderline());\n        self::assertTrue($sheet->getCell('B23')->getStyle()->getFont()->getSubScript());\n        self::assertTrue($sheet->getCell('B24')->getStyle()->getFont()->getSuperScript());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFill(): void\n    {\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $spreadsheet = $reader->load($filename);\n\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals(Fill::FILL_PATTERN_DARKHORIZONTAL, $sheet->getCell('K19')->getStyle()->getFill()->getFillType());\n        self::assertEquals('FF00CCFF', $sheet->getCell('K19')->getStyle()->getFill()->getEndColor()->getARGB());\n        self::assertEquals(Color::COLOR_BLUE, $sheet->getCell('K19')->getStyle()->getFill()->getStartColor()->getARGB());\n        self::assertEquals(Fill::FILL_PATTERN_GRAY0625, $sheet->getCell('L19')->getStyle()->getFill()->getFillType());\n        self::assertEquals(Color::COLOR_RED, $sheet->getCell('L19')->getStyle()->getFill()->getEndColor()->getARGB());\n        self::assertEquals(Color::COLOR_YELLOW, $sheet->getCell('L19')->getStyle()->getFill()->getStartColor()->getARGB());\n        self::assertEquals(Fill::FILL_SOLID, $sheet->getCell('K3')->getStyle()->getFill()->getFillType());\n        self::assertEquals(Color::COLOR_RED, $sheet->getCell('K3')->getStyle()->getFill()->getEndColor()->getARGB());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testAlignment(): void\n    {\n        $filename = __DIR__\n            . '/../../../..'\n            . '/samples/templates/excel2003.xml';\n        $reader = new Xml();\n        $spreadsheet = $reader->load($filename);\n\n        $sheet = $spreadsheet->getSheet(0);\n        self::assertEquals(45, $sheet->getCell('E22')->getStyle()->getAlignment()->getTextRotation());\n        self::assertEquals(-90, $sheet->getCell('G22')->getStyle()->getAlignment()->getTextRotation());\n        self::assertEquals(Alignment::HORIZONTAL_CENTER, $sheet->getCell('N2')->getStyle()->getAlignment()->getHorizontal());\n        self::assertEquals(Alignment::HORIZONTAL_RIGHT, $sheet->getCell('N3')->getStyle()->getAlignment()->getHorizontal());\n        self::assertEquals(Alignment::VERTICAL_TOP, $sheet->getCell('K19')->getStyle()->getAlignment()->getVertical());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerInvalidSimpleXML')]\n    public function testInvalidSimpleXML(string $filename): void\n    {\n        $xmlReader = new Xml();\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Invalid Spreadsheet file');\n        $xmlReader->load($filename);\n    }\n\n    public static function providerInvalidSimpleXML(): array\n    {\n        $tests = [];\n        $glob = glob('tests/data/Reader/Xml/XEETestInvalidSimpleXML*.xml');\n        self::assertNotFalse($glob);\n        foreach ($glob as $file) {\n            $tests[basename($file)] = [(string) realpath($file)];\n        }\n\n        return $tests;\n    }\n\n    /**\n     * Check if it can read XML Hyperlink correctly.\n     */\n    public function testHyperlinksAltCharset(): void\n    {\n        $reader = new Xml();\n        $spreadsheet = $reader->load('tests/data/Reader/Xml/excel2003.iso8859-1.xml');\n        $firstSheet = $spreadsheet->getSheet(0);\n        self::assertSame('Voilà', $spreadsheet->getActiveSheet()->getCell('A1')->getValue());\n\n        $hyperlink = $firstSheet->getCell('A2');\n\n        self::assertEquals(DataType::TYPE_STRING, $hyperlink->getDataType());\n        self::assertEquals('PhpSpreadsheet', $hyperlink->getValue());\n        self::assertEquals('https://phpspreadsheet.readthedocs.io', $hyperlink->getHyperlink()->getUrl());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testLoadCorruptedFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Cannot load invalid XML file');\n\n        $xmlReader = new Xml();\n        $spreadsheet = @$xmlReader->load('tests/data/Reader/Xml/CorruptedXmlFile.xml');\n    }\n\n    public function testListWorksheetNamesCorruptedFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Problem reading');\n\n        $xmlReader = new Xml();\n        $names = @$xmlReader->listWorksheetNames('tests/data/Reader/Xml/CorruptedXmlFile.xml');\n        self::assertNotEmpty($names);\n    }\n\n    public function testListWorksheetInfoCorruptedFile(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Problem reading');\n\n        $xmlReader = new Xml();\n        $info = @$xmlReader->listWorksheetInfo('tests/data/Reader/Xml/CorruptedXmlFile.xml');\n        self::assertNotEmpty($info);\n    }\n\n    public function testInvalidXMLFromString(): void\n    {\n        $xmlReader = new Xml();\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Cannot load invalid XML string: 0');\n        $xmlReader->loadSpreadsheetFromString('0');\n    }\n\n    public function testInvalidXMLFromEmptyString(): void\n    {\n        $xmlReader = new Xml();\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Cannot load invalid XML string: ');\n        $xmlReader->loadSpreadsheetFromString('');\n    }\n\n    public function testEmptyFilename(): void\n    {\n        $xmlReader = new Xml();\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('File \"\" does not exist');\n        $xmlReader->load('');\n    }\n\n    /**\n     * Ensures that a PHP warning for `Undefined array key \"x\"` is not triggered.\n     *\n     * Relies on PHPUnit's conversion of PHP warnings, deprecations, and notices to exceptions.\n     * If that warning occurs, the test should fail.\n     */\n    public function testLoadXlsBug4669(): void\n    {\n        $filename = 'tests/data/Reader/Xml/bug4669.xml';\n\n        $reader = IOFactory::createReaderForFile($filename);\n        $reader->setReadDataOnly(true);\n\n        $spreadsheet = $reader->load($filename);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('Report Date', $sheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Reader/Xml/XmlTopLeftTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Reader\\Xml;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlTopLeftTest extends TestCase\n{\n    public function testTopLeft(): void\n    {\n        $xmldata = <<< 'EOT'\n            <?xml version=\"1.0\"?>\n            <?mso-application progid=\"Excel.Sheet\"?>\n            <Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n                <Styles>\n                    <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n                        <Protection x:HideFormula=\"1\" ss:Protected=\"1\"/>\n                    </Style>\n                    <Style ss:ID=\"visible\">\n                        <Protection x:HideFormula=\"0\" ss:Protected=\"1\"/>\n                    </Style>\n                    <Style ss:ID=\"writable\">\n                        <Protection x:HideFormula=\"1\" ss:Protected=\"0\"/>\n                    </Style>\n                </Styles>\n                <Worksheet ss:Name=\"sheet 1\" ss:Protected=\"1\">\n                    <ss:Table>\n                        <ss:Row>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">1.1</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">1.2</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">1.3</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">1.4</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">1.5</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">1.6</ss:Data>\n                            </ss:Cell>\n                        </ss:Row>\n                        <ss:Row>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">2.1</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">2.2 (top-left cell)</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">2.3</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">2.4</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">2.5</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">2.6</ss:Data>\n                            </ss:Cell>\n                        </ss:Row>\n                        <ss:Row>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">3.1</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">3.2</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">3.3</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">3.4</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">3.5</ss:Data>\n                            </ss:Cell>\n                            <ss:Cell>\n                                <ss:Data ss:Type=\"String\">3.6</ss:Data>\n                            </ss:Cell>\n                        </ss:Row>\n                    </ss:Table>\n                    <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n                        <TopRowVisible>1</TopRowVisible>\n                        <LeftColumnVisible>1</LeftColumnVisible>\n                    </WorksheetOptions>\n                </Worksheet>\n            </Workbook>\n            EOT;\n        $reader = new Xml();\n        $spreadsheet = $reader->loadSpreadsheetFromString($xmldata);\n        self::assertEquals(1, $spreadsheet->getSheetCount());\n\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertEquals('sheet 1', $sheet->getTitle());\n        self::assertEquals('B2', $sheet->getTopLeftCell());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/RefRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RefRangeTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerRefRange')]\n    public function testRefRange(int|string $expectedResult, string $rangeString): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(\"=SUM($rangeString)\");\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerRefRange(): array\n    {\n        return [\n            'normal range' => [0, 'B1:B2'],\n            'ref as end of range' => ['#REF!', 'B1:#REF!'],\n            'ref as start of range' => ['#REF!', '#REF!:B2'],\n            'ref as both parts of range' => ['#REF!', '#REF!:#REF!'],\n            'using indirect for ref' => ['#REF!', 'B1:INDIRECT(\"XYZ\")'],\n        ];\n    }\n\n    public function testRefRangeRead(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load('tests/data/Reader/XLSX/issue.3453.xlsx');\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(0, $sheet->getCell('H1')->getCalculatedValue());\n        self::assertSame('#REF!', $sheet->getCell('H2')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/ReferenceHelper2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\ReferenceHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReferenceHelper2Test extends TestCase\n{\n    public function testNoClone(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Cloning a Singleton');\n        $referenceHelper = ReferenceHelper::getInstance();\n        $x = clone $referenceHelper;\n        $x->updateFormulaReferences();\n    }\n\n    public function testRenamedWorksheetInFormula(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $referenceHelper = ReferenceHelper::getInstance();\n        $referenceHelper->updateNamedFormulae($spreadsheet); // no-op\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Sheet2');\n        $title2 = $sheet2->getTitle();\n        $sheet2->getCell('A1')->setValue(10);\n        $sheet2->getCell('A2')->setValue(20);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setTitle('Sheet3');\n        $title3 = $sheet3->getTitle();\n        $sheet3->getCell('A1')->setValue(30);\n        $sheet3->getCell('A2')->setValue(40);\n        $sheet1->getCell('A1')->setValue(\"=$title2!A1\");\n        $sheet1->getCell('A2')->setValue(\"='$title2'!A2\");\n        $sheet1->getCell('B1')->setValue(\"=$title3!A1\");\n        $sheet1->getCell('B2')->setValue(\"='$title3'!A2\");\n        $newTitle2 = 'renamedSheet2';\n        $sheet2->setTitle($newTitle2);\n        self::assertSame(\"=$newTitle2!A1\", $sheet1->getCell('A1')->getValue());\n        self::assertSame(\"='$newTitle2'!A2\", $sheet1->getCell('A2')->getValue());\n        self::assertSame(\"=$title3!A1\", $sheet1->getCell('B1')->getValue());\n        self::assertSame(\"='$title3'!A2\", $sheet1->getCell('B2')->getValue());\n        self::assertSame([[10, 30], [20, 40]], $sheet1->toArray(null, true, false));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/ReferenceHelper3Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReferenceHelper3Test extends TestCase\n{\n    public function testIssue3661(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Data');\n\n        $spreadsheet->addNamedRange(new NamedRange('FIRST', $sheet, '=$A1'));\n        $spreadsheet->addNamedRange(new NamedRange('SECOND', $sheet, '=$B1'));\n        $spreadsheet->addNamedRange(new NamedRange('THIRD', $sheet, '=$C1'));\n\n        $sheet->fromArray([\n            [1, 2, 3, '=FIRST', '=SECOND', '=THIRD', '=10*$A1'],\n            [4, 5, 6, '=FIRST', '=SECOND', '=THIRD'],\n            [7, 8, 9, '=FIRST', '=SECOND', '=THIRD'],\n        ]);\n\n        $sheet->insertNewRowBefore(1, 4);\n        $sheet->insertNewColumnBefore('A', 1);\n        self::assertSame(1, $sheet->getCell('E5')->getCalculatedValue());\n        self::assertSame(5, $sheet->getCell('F6')->getCalculatedValue());\n        self::assertSame(9, $sheet->getCell('G7')->getCalculatedValue());\n        self::assertSame('=10*$B5', $sheet->getCell('H5')->getValue());\n        self::assertSame(10, $sheet->getCell('H5')->getCalculatedValue());\n        $firstColumn = $spreadsheet->getNamedRange('FIRST');\n        /** @var NamedRange $firstColumn */\n        self::assertSame('=$B1', $firstColumn->getRange());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCompletelyRelative(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Data');\n\n        $spreadsheet->addNamedRange(new NamedRange('CellAbove', $sheet, '=A1048576'));\n        $spreadsheet->addNamedRange(new NamedRange('CellBelow', $sheet, '=A2'));\n        $spreadsheet->addNamedRange(new NamedRange('CellToLeft', $sheet, '=XFD1'));\n        $spreadsheet->addNamedRange(new NamedRange('CellToRight', $sheet, '=B1'));\n\n        $sheet->fromArray([\n            [null, 'Above', null, null, 'Above', null, null, 'Above', null, null, 'Above', null],\n            ['Left', '=CellAbove', 'Right', 'Left', '=CellBelow', 'Right', 'Left', '=CellToLeft', 'Right', 'Left', '=CellToRight', 'Right'],\n            [null, 'Below', null, null, 'Below', null, null, 'Below', null, null, 'Below', null],\n        ], null, 'A1', true);\n        self::assertSame('Above', $sheet->getCell('B2')->getCalculatedValue());\n        self::assertSame('Below', $sheet->getCell('E2')->getCalculatedValue());\n        self::assertSame('Left', $sheet->getCell('H2')->getCalculatedValue());\n        self::assertSame('Right', $sheet->getCell('K2')->getCalculatedValue());\n\n        Calculation::getInstance($spreadsheet)->flushInstance();\n        self::assertNull($sheet->getCell('L7')->getCalculatedValue(), 'value in L7 after flush is null');\n        // Reset it once more\n        Calculation::getInstance($spreadsheet)->flushInstance();\n        // shift 5 rows down and 1 column to the right\n        $sheet->insertNewRowBefore(1, 5);\n        $sheet->insertNewColumnBefore('A', 1);\n\n        self::assertSame('Above', $sheet->getCell('C7')->getCalculatedValue()); // Above\n        self::assertSame('Below', $sheet->getCell('F7')->getCalculatedValue());\n        self::assertSame('Left', $sheet->getCell('I7')->getCalculatedValue());\n        self::assertSame('Right', $sheet->getCell('L7')->getCalculatedValue());\n\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setCellValue('L6', 'NotThisCell');\n        $sheet2->setCellValue('L7', '=CellAbove');\n        self::assertSame('Above', $sheet2->getCell('L7')->getCalculatedValue(), 'relative value uses cell on worksheet where name is defined');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private static bool $sumFormulaWorking = false;\n\n    public function testSumAboveCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $spreadsheet->addNamedRange(new NamedRange('AboveCell', $sheet, 'A1048576'));\n        $sheet->setCellValue('C2', 123);\n        $sheet->setCellValue('C3', '=AboveCell');\n        $sheet->fromArray([\n            ['Column 1', 'Column 2'],\n            [2, 1],\n            [4, 3],\n            [6, 5],\n            [8, 7],\n            [10, 9],\n            [12, 11],\n            [14, 13],\n            [16, 15],\n            ['=SUM(A2:AboveCell)', '=SUM(B2:AboveCell)'],\n        ], null, 'A1', true);\n        self::assertSame(123, $sheet->getCell('C3')->getCalculatedValue());\n        if (self::$sumFormulaWorking) {\n            self::assertSame(72, $sheet->getCell('A10')->getCalculatedValue());\n        } else {\n            $spreadsheet->disconnectWorksheets();\n            self::markTestIncomplete('PhpSpreadsheet does not handle this correctly');\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/ReferenceHelper4Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReferenceHelper4Test extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('dataProvider')]\n    public function testIssue3907(string $expectedResult, string $settingsTitle, string $formula, string $dataTitle = 'DATA'): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $dataSheet = $spreadsheet->getActiveSheet();\n        $dataSheet->setTitle($dataTitle);\n        $settingsSheet = $spreadsheet->createSheet();\n        $settingsSheet->setTitle($settingsTitle);\n        $settingsSheet->getCell('A1')->setValue(10);\n        $settingsSheet->getCell('B1')->setValue(20);\n        $dataSheet->getCell('A5')->setValue($formula);\n        $dataSheet->getCell('A2')->setValue(1);\n        $dataSheet->insertNewColumnBefore('A');\n        self::assertSame($expectedResult, $dataSheet->getCell('B5')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function dataProvider(): array\n    {\n        return [\n            [\"=SUM(B2, 'F1 (SETTINGS)'!A1:B1)\", 'F1 (SETTINGS)', \"=SUM(A2, 'F1 (SETTINGS)'!A1:B1)\"],\n            [\"=SUM(B2, 'x F1 (SETTINGS)'!A1:B1)\", 'x F1 (SETTINGS)', \"=SUM(A2, 'x F1 (SETTINGS)'!A1:B1)\"],\n            [\"=SUM(B2, 'DATA'!B1)\", 'F1 (SETTINGS)', \"=SUM(A2, 'DATA'!A1)\"],\n            [\"=SUM(B2, 'DATA'!C1)\", 'F1 (SETTINGS)', \"=SUM(A2, 'data'!B1)\"],\n            ['=SUM(B2, DATA!D1)', 'F1 (SETTINGS)', '=SUM(A2, data!C1)'],\n            [\"=SUM(B2, 'DATA'!B1:C1)\", 'F1 (SETTINGS)', \"=SUM(A2, 'Data'!A1:B1)\"],\n            ['=SUM(B2, DATA!B1:C1)', 'F1 (SETTINGS)', '=SUM(A2, DAta!A1:B1)'],\n            [\"=SUM(B2, 'F1 Data'!C1)\", 'F1 (SETTINGS)', \"=SUM(A2, 'F1 Data'!B1)\", 'F1 Data'],\n            [\"=SUM(B2, 'x F1 Data'!C1)\", 'F1 (SETTINGS)', \"=SUM(A2, 'x F1 Data'!B1)\", 'x F1 Data'],\n            [\"=SUM(B2, 'x F1 Data'!C1)\", 'F1 (SETTINGS)', \"=SUM(A2, 'x F1 Data'!B1)\", 'x F1 Data'],\n            [\"=SUM(B2, 'x F1 Data'!C1:D2)\", 'F1 (SETTINGS)', \"=SUM(A2, 'x F1 Data'!B1:C2)\", 'x F1 Data'],\n            ['=SUM(B2, definedname1A1)', 'F1 (SETTINGS)', '=SUM(A2, definedname1A1)', 'x F1 Data'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/ReferenceHelper5Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReferenceHelper5Test extends TestCase\n{\n    public function testIssue4246(): void\n    {\n        // code below would have thrown exception because\n        // row and column were swapped in code\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $row = 987654;\n        $rowMinus1 = $row - 1;\n        $rowPlus1 = $row + 1;\n        $sheet->getCell(\"A$rowMinus1\")->setValue(1);\n        $sheet->getCell(\"B$rowMinus1\")->setValue(2);\n        $sheet->getCell(\"C$rowMinus1\")->setValue(3);\n        $sheet->getStyle(\"A$rowMinus1\")->getFont()->setBold(true);\n        $sheet->getCell(\"A$row\")->setValue(1);\n        $sheet->getCell(\"B$row\")->setValue(2);\n        $sheet->getCell(\"C$row\")->setValue(3);\n        $sheet->getStyle(\"B$row\")->getFont()->setBold(true);\n\n        $sheet->insertNewRowBefore($row);\n        self::assertTrue(\n            $sheet->getStyle(\"A$row\")->getFont()->getBold()\n        );\n        self::assertFalse(\n            $sheet->getStyle(\"B$row\")->getFont()->getBold()\n        );\n        self::assertFalse(\n            $sheet->getStyle(\"A$rowPlus1\")->getFont()->getBold()\n        );\n        self::assertTrue(\n            $sheet->getStyle(\"B$rowPlus1\")->getFont()->getBold()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/ReferenceHelperDVTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReferenceHelperDVTest extends TestCase\n{\n    public function testInsertRowsWithDataValidation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray([['First'], ['Second'], ['Third'], ['Fourth']], null, 'A5', true);\n        $cellAddress = 'E5';\n        $this->setDataValidation($sheet, $cellAddress);\n\n        $sheet->insertNewRowBefore(2, 2);\n\n        self::assertFalse(\n            $sheet->getCell($cellAddress)->hasDataValidation()\n        );\n        self::assertTrue($sheet->getCell('E7')->hasDataValidation());\n        self::assertSame('E7', $sheet->getDataValidation('E7')->getSqref());\n        self::assertSame('$A$7:$A$10', $sheet->getDataValidation('E7')->getFormula1());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteRowsWithDataValidation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray([['First'], ['Second'], ['Third'], ['Fourth']], null, 'A5', true);\n        $cellAddress = 'E5';\n        $this->setDataValidation($sheet, $cellAddress);\n\n        $sheet->removeRow(2, 2);\n\n        self::assertFalse(\n            $sheet->getCell($cellAddress)->hasDataValidation()\n        );\n        self::assertTrue($sheet->getCell('E3')->hasDataValidation());\n        self::assertSame('E3', $sheet->getDataValidation('E3')->getSqref());\n        self::assertSame('$A$3:$A$6', $sheet->getDataValidation('E3')->getFormula1());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteColumnsWithDataValidation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray([['First'], ['Second'], ['Third'], ['Fourth']], null, 'A5', true);\n        $cellAddress = 'E5';\n        $this->setDataValidation($sheet, $cellAddress);\n\n        $sheet->removeColumn('B', 2);\n\n        self::assertFalse(\n            $sheet->getCell($cellAddress)->hasDataValidation()\n        );\n        self::assertTrue($sheet->getCell('C5')->hasDataValidation());\n        self::assertSame('C5', $sheet->getDataValidation('C5')->getSqref());\n        self::assertSame('$A$5:$A$8', $sheet->getDataValidation('C5')->getFormula1());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertColumnsWithDataValidation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray([['First'], ['Second'], ['Third'], ['Fourth']], null, 'A5', true);\n        $cellAddress = 'E5';\n        $this->setDataValidation($sheet, $cellAddress);\n\n        $sheet->insertNewColumnBefore('C', 2);\n\n        self::assertFalse(\n            $sheet->getCell($cellAddress)->hasDataValidation()\n        );\n        self::assertTrue($sheet->getCell('G5')->hasDataValidation());\n        self::assertSame('G5', $sheet->getDataValidation('G5')->getSqref());\n        self::assertSame('$A$5:$A$8', $sheet->getDataValidation('G5')->getFormula1());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertColumnsWithDataValidation2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->fromArray([['First'], ['Second'], ['Third'], ['Fourth']], null, 'A5', true);\n        $cellAddress = 'E5';\n        $this->setDataValidation($sheet, $cellAddress);\n\n        $sheet->insertNewColumnBefore('A', 2);\n\n        self::assertFalse(\n            $sheet->getCell($cellAddress)->hasDataValidation()\n        );\n        self::assertTrue($sheet->getCell('G5')->hasDataValidation());\n        self::assertSame('G5', $sheet->getDataValidation('G5')->getSqref());\n        self::assertSame('$C$5:$C$8', $sheet->getDataValidation('G5')->getFormula1());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function setDataValidation(Worksheet $sheet, string $cellAddress): void\n    {\n        $validation = $sheet->getCell($cellAddress)\n            ->getDataValidation();\n        $validation->setType(DataValidation::TYPE_LIST);\n        $validation->setErrorStyle(\n            DataValidation::STYLE_STOP\n        );\n        $validation->setAllowBlank(false);\n        $validation->setShowInputMessage(true);\n        $validation->setShowErrorMessage(true);\n        $validation->setShowDropDown(true);\n        $validation->setErrorTitle('Input error');\n        $validation->setError('Value is not in list.');\n        $validation->setPromptTitle('Pick from list');\n        $validation->setPrompt('Please pick a value from the drop-down list.');\n        $validation->setFormula1('$A$5:$A$8');\n    }\n\n    public function testMultipleRanges(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('C1')->setValue(1);\n        $sheet->getCell('C2')->setValue(2);\n        $sheet->getCell('C3')->setValue(3);\n        $dv = $sheet->getDataValidation('A1:A4 D5 E6:E7');\n        $dv->setType(DataValidation::TYPE_LIST)\n            ->setShowDropDown(true)\n            ->setFormula1('$C$1:$C$3')\n            ->setErrorStyle(DataValidation::STYLE_STOP)\n            ->setShowErrorMessage(true)\n            ->setErrorTitle('Input Error')\n            ->setError('Value is not a member of allowed list');\n        $sheet->insertNewColumnBefore('B');\n        $dvs = $sheet->getDataValidationCollection();\n        self::assertCount(1, $dvs);\n        $expected = 'A1:A4 E5 F6:F7';\n        self::assertSame([$expected], array_keys($dvs));\n        $dv = $dvs[$expected];\n        self::assertSame($expected, $dv->getSqref());\n        self::assertSame('$D$1:$D$3', $dv->getFormula1());\n        $sheet->getCell('A3')->setValue(8);\n        self::assertFalse($sheet->getCell('A3')->hasValidValue());\n        $sheet->getCell('E5')->setValue(7);\n        self::assertFalse($sheet->getCell('E5')->hasValidValue());\n        $sheet->getCell('F6')->setValue(7);\n        self::assertFalse($sheet->getCell('F6')->hasValidValue());\n        $sheet->getCell('F7')->setValue(1);\n        self::assertTrue($sheet->getCell('F7')->hasValidValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWholeColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('A5:A7', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_LIST)\n            ->setShowDropDown(true)\n            ->setFormula1('\"Item A,Item B,Item C\"')\n            ->setErrorStyle(DataValidation::STYLE_STOP)\n            ->setShowErrorMessage(true)\n            ->setErrorTitle('Input Error')\n            ->setError('Value is not a member of allowed list');\n        $sheet->setDataValidation('A:A', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('A9', $dv);\n        self::assertSame(DataValidation::TYPE_LIST, $sheet->getDataValidation('A4')->getType());\n        self::assertSame(DataValidation::TYPE_LIST, $sheet->getDataValidation('A10')->getType());\n        self::assertSame(DataValidation::TYPE_NONE, $sheet->getDataValidation('A6')->getType());\n        self::assertSame(DataValidation::TYPE_NONE, $sheet->getDataValidation('A9')->getType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWholeRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('C1:F1', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_LIST)\n            ->setShowDropDown(true)\n            ->setFormula1('\"Item A,Item B,Item C\"')\n            ->setErrorStyle(DataValidation::STYLE_STOP)\n            ->setShowErrorMessage(true)\n            ->setErrorTitle('Input Error')\n            ->setError('Value is not a member of allowed list');\n        $sheet->setDataValidation('1:1', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('H1', $dv);\n        self::assertSame(DataValidation::TYPE_LIST, $sheet->getDataValidation('B1')->getType());\n        self::assertSame(DataValidation::TYPE_LIST, $sheet->getDataValidation('J1')->getType());\n        self::assertSame(DataValidation::TYPE_NONE, $sheet->getDataValidation('D1')->getType());\n        self::assertSame(DataValidation::TYPE_NONE, $sheet->getDataValidation('H1')->getType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFormula2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(5);\n        $sheet->getCell('A5')->setValue(9);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_WHOLE)\n            ->setOperator(DataValidation::OPERATOR_BETWEEN)\n            ->setFormula1('$A$1')\n            ->setFormula2('$A$5')\n            ->setErrorStyle(DataValidation::STYLE_STOP)\n            ->setShowErrorMessage(true)\n            ->setErrorTitle('Input Error')\n            ->setError('Value is not whole number within bounds');\n        $sheet->setDataValidation('B2', $dv);\n        $sheet->insertNewRowBefore(2);\n        $dv2 = $sheet->getCell('B3')->getDataValidation();\n        self::assertSame('$A$1', $dv2->getFormula1());\n        self::assertSame('$A$6', $dv2->getFormula2());\n\n        $sheet->getCell('B3')->setValue(7);\n        self::assertTrue($sheet->getCell('B3')->hasValidValue());\n        $sheet->getCell('B3')->setValue(1);\n        self::assertFalse($sheet->getCell('B3')->hasValidValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/ReferenceHelperTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink;\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\ReferenceHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReferenceHelperTest extends TestCase\n{\n    public function testColumnSort(): void\n    {\n        $columnBase = $columnExpectedResult = [\n            'A', 'B', 'Z',\n            'AA', 'AB', 'AZ',\n            'BA', 'BB', 'BZ',\n            'ZA', 'ZB', 'ZZ',\n            'AAA', 'AAB', 'AAZ',\n            'ABA', 'ABB', 'ABZ',\n            'AZA', 'AZB', 'AZZ',\n            'BAA', 'BAB', 'BAZ',\n            'BBA', 'BBB', 'BBZ',\n            'BZA', 'BZB', 'BZZ',\n        ];\n        shuffle($columnBase);\n        usort($columnBase, [ReferenceHelper::class, 'columnSort']);\n        foreach ($columnBase as $key => $value) {\n            self::assertEquals($columnExpectedResult[$key], $value);\n        }\n    }\n\n    public function testColumnReverseSort(): void\n    {\n        $columnBase = $columnExpectedResult = [\n            'A', 'B', 'Z',\n            'AA', 'AB', 'AZ',\n            'BA', 'BB', 'BZ',\n            'ZA', 'ZB', 'ZZ',\n            'AAA', 'AAB', 'AAZ',\n            'ABA', 'ABB', 'ABZ',\n            'AZA', 'AZB', 'AZZ',\n            'BAA', 'BAB', 'BAZ',\n            'BBA', 'BBB', 'BBZ',\n            'BZA', 'BZB', 'BZZ',\n        ];\n        shuffle($columnBase);\n        $columnExpectedResult = array_reverse($columnExpectedResult);\n        usort($columnBase, [ReferenceHelper::class, 'columnReverseSort']);\n        foreach ($columnBase as $key => $value) {\n            self::assertEquals($columnExpectedResult[$key], $value);\n        }\n    }\n\n    public function testCellSort(): void\n    {\n        $cellBase = $columnExpectedResult = [\n            'A1', 'B1', 'AZB1',\n            'BBB1', 'BB2', 'BAB2',\n            'BZA2', 'Z3', 'AZA3',\n            'BZB3', 'AB5', 'AZ6',\n            'ABZ7', 'BA9', 'BZ9',\n            'AAA9', 'AAZ9', 'BA10',\n            'BZZ10', 'ZA11', 'AAB11',\n            'BBZ29', 'BAA32', 'ZZ43',\n            'AZZ43', 'BAZ67', 'ZB78',\n            'ABA121', 'ABB289', 'BBA544',\n        ];\n        shuffle($cellBase);\n        usort($cellBase, [ReferenceHelper::class, 'cellSort']);\n        foreach ($cellBase as $key => $value) {\n            self::assertEquals($columnExpectedResult[$key], $value);\n        }\n    }\n\n    public function testCellReverseSort(): void\n    {\n        $cellBase = $columnExpectedResult = [\n            'BBA544', 'ABB289', 'ABA121',\n            'ZB78', 'BAZ67', 'AZZ43',\n            'ZZ43', 'BAA32', 'BBZ29',\n            'AAB11', 'ZA11', 'BZZ10',\n            'BA10', 'AAZ9', 'AAA9',\n            'BZ9', 'BA9', 'ABZ7',\n            'AZ6', 'AB5', 'BZB3',\n            'AZA3', 'Z3', 'BZA2',\n            'BAB2', 'BB2', 'BBB1',\n            'AZB1', 'B1', 'A1',\n        ];\n        shuffle($cellBase);\n        usort($cellBase, [ReferenceHelper::class, 'cellReverseSort']);\n        foreach ($cellBase as $key => $value) {\n            self::assertEquals($columnExpectedResult[$key], $value);\n        }\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormulaUpdates')]\n    public function testUpdateFormula(string $formula, int $insertRows, int $insertColumns, string $worksheet, string $expectedResult): void\n    {\n        $referenceHelper = ReferenceHelper::getInstance();\n\n        $result = $referenceHelper->updateFormulaReferences($formula, 'A1', $insertRows, $insertColumns, $worksheet);\n\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerFormulaUpdates(): array\n    {\n        return require 'tests/data/ReferenceHelperFormulaUpdates.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMultipleWorksheetFormulaUpdates')]\n    public function testUpdateFormulaForMultipleWorksheets(string $formula, int $insertRows, int $insertColumns, string $expectedResult): void\n    {\n        $referenceHelper = ReferenceHelper::getInstance();\n\n        $result = $referenceHelper->updateFormulaReferencesAnyWorksheet($formula, $insertRows, $insertColumns);\n\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerMultipleWorksheetFormulaUpdates(): array\n    {\n        return require 'tests/data/ReferenceHelperFormulaUpdatesMultipleSheet.php';\n    }\n\n    public function testInsertNewBeforeRetainDataType(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValueExplicit('+1', DataType::TYPE_STRING);\n        $oldDataType = $cell->getDataType();\n        $oldValue = $cell->getValue();\n\n        $sheet->insertNewRowBefore(1);\n        $newCell = $sheet->getCell('A2');\n        $newDataType = $newCell->getDataType();\n        $newValue = $newCell->getValue();\n\n        self::assertSame($oldValue, $newValue);\n        self::assertSame($oldDataType, $newDataType);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRemoveColumnShiftsCorrectColumnValueIntoRemovedColumnCoordinates(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            ['a1', 'b1', 'c1'],\n            ['a2', 'b2', null],\n        ]);\n\n        $cells = $sheet->toArray();\n        self::assertSame('a1', $cells[0][0]);\n        self::assertSame('b1', $cells[0][1]);\n        self::assertSame('c1', $cells[0][2]);\n        self::assertSame('a2', $cells[1][0]);\n        self::assertSame('b2', $cells[1][1]);\n        self::assertNull($cells[1][2]);\n\n        $sheet->removeColumn('B');\n\n        $cells = $sheet->toArray();\n        self::assertSame('a1', $cells[0][0]);\n        self::assertSame('c1', $cells[0][1]);\n        self::assertArrayNotHasKey(2, $cells[0]);\n        self::assertSame('a2', $cells[1][0]);\n        self::assertNull($cells[1][1]);\n        self::assertArrayNotHasKey(2, $cells[1]);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertRowsWithPageBreaks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]], null, 'A1', true);\n        $sheet->setBreak('A2', Worksheet::BREAK_ROW);\n        $sheet->setBreak('A5', Worksheet::BREAK_ROW);\n\n        $sheet->insertNewRowBefore(2, 2);\n\n        $breaks = $sheet->getBreaks();\n        ksort($breaks);\n        self::assertSame(['A4' => Worksheet::BREAK_ROW, 'A7' => Worksheet::BREAK_ROW], $breaks);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteRowsWithPageBreaks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]], null, 'A1', true);\n        $sheet->setBreak('A2', Worksheet::BREAK_ROW);\n        $sheet->setBreak('A5', Worksheet::BREAK_ROW);\n\n        $sheet->removeRow(2, 2);\n\n        $breaks = $sheet->getBreaks();\n        self::assertSame(['A3' => Worksheet::BREAK_ROW], $breaks);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertRowsWithComments(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]], null, 'A1', true);\n        $sheet->getComment('A2')->getText()->createText('First Comment');\n        $sheet->getComment('A5')->getText()->createText('Second Comment');\n\n        $sheet->insertNewRowBefore(2, 2);\n\n        $comments = array_map(\n            fn (Comment $value): string => $value->getText()->getPlainText(),\n            $sheet->getComments()\n        );\n\n        self::assertSame(['A4' => 'First Comment', 'A7' => 'Second Comment'], $comments);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteRowsWithComments(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]], null, 'A1', true);\n        $sheet->getComment('A2')->getText()->createText('First Comment');\n        $sheet->getComment('A5')->getText()->createText('Second Comment');\n\n        $sheet->removeRow(2, 2);\n\n        $comments = array_map(\n            fn (Comment $value): string => $value->getText()->getPlainText(),\n            $sheet->getComments()\n        );\n\n        self::assertSame(['A3' => 'Second Comment'], $comments);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertRowsWithHyperlinks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]], null, 'A1', true);\n        $sheet->getCell('A2')->getHyperlink()->setUrl('https://github.com/PHPOffice/PhpSpreadsheet');\n        $sheet->getCell('A5')->getHyperlink()->setUrl('https://phpspreadsheet.readthedocs.io/en/latest/');\n\n        $sheet->insertNewRowBefore(2, 2);\n\n        $hyperlinks = array_map(\n            fn (Hyperlink $value) => $value->getUrl(),\n            $sheet->getHyperlinkCollection()\n        );\n        ksort($hyperlinks);\n\n        self::assertSame(\n            [\n                'A4' => 'https://github.com/PHPOffice/PhpSpreadsheet',\n                'A7' => 'https://phpspreadsheet.readthedocs.io/en/latest/',\n            ],\n            $hyperlinks\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteRowsWithHyperlinks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]], null, 'A1', true);\n        $sheet->getCell('A2')->getHyperlink()->setUrl('https://github.com/PHPOffice/PhpSpreadsheet');\n        $sheet->getCell('A5')->getHyperlink()->setUrl('https://phpspreadsheet.readthedocs.io/en/latest/');\n\n        $sheet->removeRow(2, 2);\n\n        $hyperlinks = array_map(\n            fn (Hyperlink $value) => $value->getUrl(),\n            $sheet->getHyperlinkCollection()\n        );\n\n        self::assertSame(['A3' => 'https://phpspreadsheet.readthedocs.io/en/latest/'], $hyperlinks);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertRowsWithConditionalFormatting(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2, 3, 4], [3, 4, 5, 6], [5, 6, 7, 8], [7, 8, 9, 10], [9, 10, 11, 12]], null, 'C3', true);\n        $sheet->getCell('H5')->setValue(5);\n\n        $cellRange = 'C3:F7';\n        $this->setConditionalFormatting($sheet, $cellRange);\n\n        $sheet->insertNewRowBefore(4, 2);\n\n        $styles = $sheet->getConditionalStylesCollection();\n        // verify that the conditional range has been updated\n        self::assertSame('C3:F9', array_keys($styles)[0]);\n        // verify that the conditions have been updated\n        foreach ($styles as $style) {\n            foreach ($style as $conditions) {\n                self::assertSame('$H$7', $conditions->getConditions()[0]);\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertColumnssWithConditionalFormatting(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2, 3, 4], [3, 4, 5, 6], [5, 6, 7, 8], [7, 8, 9, 10], [9, 10, 11, 12]], null, 'C3', true);\n        $sheet->getCell('H5')->setValue(5);\n\n        $cellRange = 'C3:F7';\n        $this->setConditionalFormatting($sheet, $cellRange);\n\n        $sheet->insertNewColumnBefore('C', 2);\n\n        $styles = $sheet->getConditionalStylesCollection();\n        // verify that the conditional range has been updated\n        self::assertSame('E3:H7', array_keys($styles)[0]);\n        // verify that the conditions have been updated\n        foreach ($styles as $style) {\n            foreach ($style as $conditions) {\n                self::assertSame('$J$5', $conditions->getConditions()[0]);\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteRowsWithConditionalFormatting(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2, 3, 4], [3, 4, 5, 6], [5, 6, 7, 8], [7, 8, 9, 10], [9, 10, 11, 12]], null, 'C3', true);\n        $sheet->getCell('H5')->setValue(5);\n\n        $cellRange = 'C3:F7';\n        $this->setConditionalFormatting($sheet, $cellRange);\n\n        $sheet->removeRow(4, 2);\n\n        $styles = $sheet->getConditionalStylesCollection();\n        // verify that the conditional range has been updated\n        self::assertSame('C3:F5', array_keys($styles)[0]);\n        // verify that the conditions have been updated\n        foreach ($styles as $style) {\n            foreach ($style as $conditions) {\n                self::assertSame('$H$5', $conditions->getConditions()[0]);\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteColumnsWithConditionalFormatting(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2, 3, 4], [3, 4, 5, 6], [5, 6, 7, 8], [7, 8, 9, 10], [9, 10, 11, 12]], null, 'C3', true);\n        $sheet->getCell('H5')->setValue(5);\n\n        $cellRange = 'C3:F7';\n        $this->setConditionalFormatting($sheet, $cellRange);\n\n        $sheet->removeColumn('D', 2);\n\n        $styles = $sheet->getConditionalStylesCollection();\n        // verify that the conditional range has been updated\n        self::assertSame('C3:D7', array_keys($styles)[0]);\n        // verify that the conditions have been updated\n        foreach ($styles as $style) {\n            foreach ($style as $conditions) {\n                self::assertSame('$F$5', $conditions->getConditions()[0]);\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function setConditionalFormatting(Worksheet $sheet, string $cellRange): void\n    {\n        $conditionalStyles = [];\n        $wizardFactory = new Wizard($cellRange);\n        /** @var Wizard\\CellValue $cellWizard */\n        $cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);\n\n        $cellWizard->equals('$H$5', Wizard::VALUE_TYPE_CELL);\n        $conditionalStyles[] = $cellWizard->getConditional();\n\n        $cellWizard->greaterThan('$H$5', Wizard::VALUE_TYPE_CELL);\n        $conditionalStyles[] = $cellWizard->getConditional();\n\n        $cellWizard->lessThan('$H$5', Wizard::VALUE_TYPE_CELL);\n        $conditionalStyles[] = $cellWizard->getConditional();\n\n        $sheet->getStyle($cellWizard->getCellRange())\n            ->setConditionalStyles($conditionalStyles);\n    }\n\n    public function testInsertRowsWithPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setPrintArea('A1:J10');\n\n        $sheet->insertNewRowBefore(2, 2);\n\n        $printArea = $sheet->getPageSetup()->getPrintArea();\n        self::assertSame('A1:J12', $printArea);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertColumnsWithPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setPrintArea('A1:J10');\n\n        $sheet->insertNewColumnBefore('B', 2);\n\n        $printArea = $sheet->getPageSetup()->getPrintArea();\n        self::assertSame('A1:L10', $printArea);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteRowsWithPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setPrintArea('A1:J10');\n\n        $sheet->removeRow(2, 2);\n\n        $printArea = $sheet->getPageSetup()->getPrintArea();\n        self::assertSame('A1:J8', $printArea);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeleteColumnsWithPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setPrintArea('A1:J10');\n\n        $sheet->removeColumn('B', 2);\n\n        $printArea = $sheet->getPageSetup()->getPrintArea();\n        self::assertSame('A1:H10', $printArea);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertDeleteRowsWithDefinedNames(): void\n    {\n        $spreadsheet = $this->buildDefinedNamesTestWorkbook();\n        /** @var Worksheet $dataSheet */\n        $dataSheet = $spreadsheet->getSheetByName('Data');\n        /** @var Worksheet $totalsSheet */\n        $totalsSheet = $spreadsheet->getSheetByName('Totals');\n\n        /** @var NamedRange $firstColumn */\n        $firstColumn = $spreadsheet->getNamedRange('FirstColumn');\n        /** @var NamedRange $secondColumn */\n        $secondColumn = $spreadsheet->getNamedRange('SecondColumn');\n\n        $dataSheet->setCellValue('D2', '=FirstTotal');\n        $dataSheet->setCellValue('D3', '=FirstTotal');\n        $dataSheet->setCellValue('B2', '=SecondTotal');\n        $dataSheet->setCellValue('B3', '=SecondTotal');\n        $dataSheet->setCellValue('B4', '=ProductTotal');\n\n        $dataSheet->insertNewRowBefore(2, 5); // 5 rows before row 2\n        self::assertSame('=Data!$A$7:$A6', $firstColumn->getRange());\n        self::assertSame('=Data!B$7:B6', $secondColumn->getRange());\n        $dataSheet->removeRow(2, 1); // remove one of inserted rows\n        self::assertSame('=Data!$A$6:$A6', $firstColumn->getRange());\n        self::assertSame('=Data!B$6:B6', $secondColumn->getRange());\n\n        self::assertSame('=Data!$A$6:$A6', $firstColumn->getRange());\n        self::assertSame('=Data!B$6:B6', $secondColumn->getRange());\n\n        self::assertSame(42, $dataSheet->getCell('D6')->getCalculatedValue());\n        self::assertSame(56, $dataSheet->getCell('D7')->getCalculatedValue());\n        self::assertSame(36, $dataSheet->getCell('B6')->getCalculatedValue());\n        self::assertSame(49, $dataSheet->getCell('B7')->getCalculatedValue());\n\n        $totalsSheet->setCellValue('D6', '=FirstTotal');\n        $totalsSheet->setCellValue('D7', '=FirstTotal');\n        $totalsSheet->setCellValue('B6', '=SecondTotal');\n        $totalsSheet->setCellValue('B7', '=SecondTotal');\n        $totalsSheet->setCellValue('B8', '=ProductTotal');\n        self::assertSame($dataSheet->getCell('D6')->getCalculatedValue(), $totalsSheet->getCell('D6')->getCalculatedValue());\n        self::assertSame($dataSheet->getCell('D7')->getCalculatedValue(), $totalsSheet->getCell('D7')->getCalculatedValue());\n        self::assertSame($dataSheet->getCell('B6')->getCalculatedValue(), $totalsSheet->getCell('B6')->getCalculatedValue());\n        self::assertSame($dataSheet->getCell('B7')->getCalculatedValue(), $totalsSheet->getCell('B7')->getCalculatedValue());\n        self::assertSame(4608, $dataSheet->getCell('B8')->getCalculatedValue());\n        self::assertSame($dataSheet->getCell('B8')->getCalculatedValue(), $totalsSheet->getCell('B8')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertDeleteColumnsWithDefinedNames(): void\n    {\n        $spreadsheet = $this->buildDefinedNamesTestWorkbook();\n        /** @var Worksheet $dataSheet */\n        $dataSheet = $spreadsheet->getSheetByName('Data');\n        /** @var Worksheet $totalsSheet */\n        $totalsSheet = $spreadsheet->getSheetByName('Totals');\n\n        /** @var NamedRange $firstColumn */\n        $firstColumn = $spreadsheet->getNamedRange('FirstColumn');\n        /** @var NamedRange $secondColumn */\n        $secondColumn = $spreadsheet->getNamedRange('SecondColumn');\n\n        $dataSheet->setCellValue('D2', '=FirstTotal');\n        $dataSheet->setCellValue('D3', '=FirstTotal');\n        $dataSheet->setCellValue('B2', '=SecondTotal');\n        $dataSheet->setCellValue('B3', '=SecondTotal');\n        $dataSheet->setCellValue('B4', '=ProductTotal');\n\n        $dataSheet->insertNewColumnBefore('A', 3);\n        self::assertSame('=Data!$D$2:$D6', $firstColumn->getRange());\n        self::assertSame('=Data!B$2:B6', $secondColumn->getRange());\n        $dataSheet->removeColumn('A');\n        self::assertSame('=Data!$C$2:$C6', $firstColumn->getRange());\n        self::assertSame('=Data!B$2:B6', $secondColumn->getRange());\n\n        self::assertSame(42, $dataSheet->getCell('F2')->getCalculatedValue());\n        self::assertSame(56, $dataSheet->getCell('F3')->getCalculatedValue());\n        self::assertSame(36, $dataSheet->getCell('D2')->getCalculatedValue());\n        self::assertSame(49, $dataSheet->getCell('D3')->getCalculatedValue());\n\n        $totalsSheet->setCellValue('B2', '=SecondTotal');\n        $totalsSheet->setCellValue('B3', '=SecondTotal');\n        self::assertSame(42, $totalsSheet->getCell('B2')->getCalculatedValue());\n        self::assertSame(56, $totalsSheet->getCell('B3')->getCalculatedValue());\n\n        self::assertSame(4608, $dataSheet->getCell('D4')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function buildDefinedNamesTestWorkbook(): Spreadsheet\n    {\n        $spreadsheet = new Spreadsheet();\n        $dataSheet = $spreadsheet->getActiveSheet();\n        $dataSheet->setTitle('Data');\n\n        $totalsSheet = $spreadsheet->addSheet(new Worksheet());\n        $totalsSheet->setTitle('Totals');\n\n        $spreadsheet->setActiveSheetIndexByName('Data');\n\n        $dataSheet->fromArray([['Column 1', 'Column 2'], [2, 1], [4, 3], [6, 5], [8, 7], [10, 9], [12, 11], [14, 13], [16, 15]], null, 'A1', true);\n        $dataSheet->insertNewColumnBefore('B', 1);\n\n        $spreadsheet->addNamedRange(\n            new NamedRange('FirstColumn', $spreadsheet->getActiveSheet(), '=Data!$A$2:$A6')\n        );\n        $spreadsheet->addNamedFormula(\n            new NamedFormula('FirstTotal', $spreadsheet->getActiveSheet(), '=SUM(FirstColumn)')\n        );\n\n        $spreadsheet->addNamedRange(\n            new NamedRange('SecondColumn', $spreadsheet->getActiveSheet(), '=Data!B$2:B6')\n        );\n        $spreadsheet->addNamedFormula(\n            new NamedFormula('SecondTotal', $spreadsheet->getActiveSheet(), '=SUM(SecondColumn)')\n        );\n\n        $spreadsheet->addNamedFormula(\n            new NamedFormula('ProductTotal', $spreadsheet->getActiveSheet(), '=FirstTotal*SecondTotal')\n        );\n\n        return $spreadsheet;\n    }\n\n    private function buildDefinedNamesAbsoluteWorkbook(): Spreadsheet\n    {\n        $spreadsheet = new Spreadsheet();\n        $dataSheet = $spreadsheet->getActiveSheet();\n        $dataSheet->setTitle('Data');\n\n        $totalsSheet = $spreadsheet->addSheet(new Worksheet());\n        $totalsSheet->setTitle('Totals');\n\n        $spreadsheet->setActiveSheetIndexByName('Data');\n\n        $dataSheet->fromArray([['Column 1', 'Column 2'], [2, 1], [4, 3], [6, 5], [8, 7], [10, 9], [12, 11], [14, 13], [16, 15]], null, 'A1', true);\n\n        $spreadsheet->addNamedRange(\n            new NamedRange('FirstColumn', $spreadsheet->getActiveSheet(), '=Data!$A$2:$A$6')\n        );\n        $spreadsheet->addNamedFormula(\n            new NamedFormula('FirstTotal', $spreadsheet->getActiveSheet(), '=SUM(FirstColumn)')\n        );\n        $totalsSheet->setCellValue('A20', '=FirstTotal');\n\n        $spreadsheet->addNamedRange(\n            new NamedRange('SecondColumn', $spreadsheet->getActiveSheet(), '=Data!$B$2:$B$6')\n        );\n        $spreadsheet->addNamedFormula(\n            new NamedFormula('SecondTotal', $spreadsheet->getActiveSheet(), '=SUM(SecondColumn)')\n        );\n        $totalsSheet->setCellValue('B20', '=SecondTotal');\n\n        $spreadsheet->addNamedFormula(\n            new NamedFormula('ProductTotal', $spreadsheet->getActiveSheet(), '=FirstTotal*SecondTotal')\n        );\n        $totalsSheet->setCellValue('D20', '=ProductTotal');\n\n        return $spreadsheet;\n    }\n\n    public function testInsertBothWithDefinedNamesAbsolute(): void\n    {\n        $spreadsheet = $this->buildDefinedNamesAbsoluteWorkbook();\n        /** @var Worksheet $dataSheet */\n        $dataSheet = $spreadsheet->getSheetByName('Data');\n        /** @var Worksheet $totalsSheet */\n        $totalsSheet = $spreadsheet->getSheetByName('Totals');\n\n        $dataSheet->setCellValue('C2', '=FirstTotal');\n        $dataSheet->setCellValue('C3', '=FirstTotal');\n        $dataSheet->setCellValue('C4', '=SecondTotal');\n\n        $dataSheet->insertNewColumnBefore('A', 2);\n        $dataSheet->insertNewRowBefore(2, 4); // 4 rows before row 2\n\n        /** @var NamedRange $firstColumn */\n        $firstColumn = $spreadsheet->getNamedRange('FirstColumn');\n        /** @var NamedRange $secondColumn */\n        $secondColumn = $spreadsheet->getNamedRange('SecondColumn');\n\n        self::assertSame('=Data!$C$6:$C$10', $firstColumn->getRange());\n        self::assertSame('=Data!$D$6:$D$10', $secondColumn->getRange());\n\n        self::assertSame(30, $totalsSheet->getCell('A20')->getCalculatedValue());\n        self::assertSame(25, $totalsSheet->getCell('B20')->getCalculatedValue());\n        self::assertSame(750, $totalsSheet->getCell('D20')->getCalculatedValue());\n\n        self::assertSame(30, $dataSheet->getCell('E6')->getCalculatedValue());\n        self::assertSame(30, $dataSheet->getCell('E7')->getCalculatedValue());\n        self::assertSame(25, $dataSheet->getCell('E8')->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/RichTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\TextElement;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RichTextTest extends TestCase\n{\n    public function testConstructorSpecifyingCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue(2);\n        self::assertSame(2, $cell->getCalculatedValue());\n        $cell->getStyle()->getFont()->setName('whatever');\n        $richText = new RichText($cell);\n        self::assertSame('whatever', $sheet->getCell('A1')->getStyle()->getFont()->getName());\n        self::assertEquals($richText, $cell->getValue());\n        self::assertSame('2', $cell->getCalculatedValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testTextElements(): void\n    {\n        $element1 = new TextElement('A');\n        $element2 = new TextElement('B');\n        $element3 = new TextElement('C');\n        $richText = new RichText();\n        $richText->setRichTextElements([$element1, $element2, $element3]);\n        self::assertSame('ABC', $richText->getPlainText());\n        $cloneText = clone $richText;\n        self::assertEquals($richText, $cloneText);\n        self::assertNotSame($richText, $cloneText);\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($richText);\n        self::assertInstanceOf(RichText::class, $sheet->getCell('A1')->getValue());\n        self::assertSame('ABC', $sheet->getCell('A1')->getFormattedValue());\n        $sheet->getCell('B1')->setValue(-3.5);\n        self::assertSame([['ABC', '-3.5']], $sheet->toArray());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNullFont(): void\n    {\n        $richText = new RichText();\n        $textRun = $richText->createTextRun('hello');\n        $textRun->setFont(null);\n\n        try {\n            $textRun->getFontOrThrow();\n            $foundFont = true;\n        } catch (SpreadsheetException $e) {\n            $foundFont = false;\n        }\n        self::assertFalse($foundFont, 'expected exception not received');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/SettingsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpException;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SettingsTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        Settings::setCache(null);\n    }\n\n    public function testInvalidChartRenderer(): void\n    {\n        $this->expectException(SpException::class);\n        $this->expectExceptionMessage('Chart renderer must implement');\n        // @phpstan-ignore-next-line\n        Settings::setChartRenderer(self::class);\n    }\n\n    public function testCache(): void\n    {\n        $cache1 = Settings::getCache();\n        Settings::setCache(null);\n        $cache2 = Settings::getCache();\n        self::assertEquals($cache1, $cache2);\n        self::assertNotSame($cache1, $cache2);\n        $array = ['A1' => 10, 'B2' => 20];\n        $cache2->setMultiple($array);\n        self::assertSame($array, $cache2->getMultiple(array_keys($array)));\n        self::assertNull($cache2->get('C3'));\n        $cache2->clear();\n        self::assertNull($cache2->get('A1'));\n        self::assertNull($cache2->get('B2'));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/CodePageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\CodePage;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CodePageTest extends TestCase\n{\n    /**\n     * @param string|string[] $expectedResult\n     */\n    #[DataProvider('providerCodePage')]\n    public function testCodePageNumberToName(array|string $expectedResult, int $codePageIndex): void\n    {\n        if ($expectedResult === 'exception') {\n            $this->expectException(Exception::class);\n        }\n        $result = CodePage::numberToName($codePageIndex);\n        if (is_array($expectedResult)) {\n            self::assertContains($result, $expectedResult);\n        } else {\n            self::assertEquals($expectedResult, $result);\n        }\n    }\n\n    public static function providerCodePage(): array\n    {\n        return require 'tests/data/Shared/CodePage.php';\n    }\n\n    public function testCoverage(): void\n    {\n        $covered = [];\n        $expected = CodePage::getEncodings();\n        foreach ($expected as $key => $val) {\n            $covered[$key] = 0;\n        }\n        $tests = $this->providerCodePage();\n        foreach ($tests as $test) {\n            /** @var string[] $test */\n            $covered[$test[1]] = 1;\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"Codepage $key not tested\");\n        }\n    }\n\n    public function testNumberToNameWithInvalidCodePage(): void\n    {\n        $invalidCodePage = 12345;\n\n        try {\n            CodePage::numberToName($invalidCodePage);\n        } catch (Exception $e) {\n            self::assertEquals($e->getMessage(), 'Unknown codepage: 12345');\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n\n    public function testNumberToNameWithUnsupportedCodePage(): void\n    {\n        $unsupportedCodePage = 720;\n\n        try {\n            CodePage::numberToName($unsupportedCodePage);\n        } catch (Exception $e) {\n            self::assertEquals($e->getMessage(), 'Code page 720 not supported.');\n\n            return;\n        }\n        self::fail('An expected exception has not been raised.');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Date2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalculationException;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Date2Test extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private int $calculateDateTimeType;\n\n    protected function setUp(): void\n    {\n        $this->calculateDateTimeType = Cell::getCalculateDateTimeType();\n    }\n\n    protected function tearDown(): void\n    {\n        Cell::setCalculateDateTimeType($this->calculateDateTimeType);\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testInvalidType(): void\n    {\n        $this->expectException(CalculationException::class);\n        $this->expectExceptionMessage('for calculated date time type');\n        Cell::setCalculateDateTimeType(-1);\n    }\n\n    #[DataProvider('providerTimeOnly')]\n    public function testTimeOnly(int|float $expectedResult, int|float|string $value, ?string $format = null): void\n    {\n        Cell::setCalculateDateTimeType(Cell::CALCULATE_TIME_FLOAT);\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        self::assertSame(0, $spreadsheet->getActiveSheetIndex());\n        $sheet = $spreadsheet->getActiveSheet();\n        $newSheet = $spreadsheet->createSheet();\n        $newSheet->getCell('B7')->setValue('Here');\n        $sheet->getCell('A1')->setValue($value);\n        if ($format !== null) {\n            $sheet->getStyle('A1')\n                ->getNumberFormat()\n                ->setFormatCode($format);\n        }\n        $sheet->setSelectedCells('B7');\n        $spreadsheet->setActiveSheetIndex(1);\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('B7', $sheet->getSelectedCells());\n        self::assertSame(1, $spreadsheet->getActiveSheetIndex());\n    }\n\n    public static function providerTimeOnly(): array\n    {\n        $integerValue = 44046;\n        $integerValueAsFloat = (float) $integerValue;\n        $integerValueAsDateFormula = '=DATEVALUE(\"2020-08-03\")';\n        $floatValue = 44015.25;\n        $floatValueAsDateFormula = '=DATEVALUE(\"2020-07-03\")+TIMEVALUE(\"06:00\")';\n\n        return [\n            'default format integer' => [$integerValue, $integerValue],\n            'default format float' => [$floatValue, $floatValue],\n            'date format integer' => [$integerValue, $integerValue, NumberFormat::FORMAT_DATE_YYYYMMDD],\n            'date format float' => [$floatValue, $floatValue, NumberFormat::FORMAT_DATE_YYYYMMDD],\n            'datetime format integer' => [$integerValueAsFloat, $integerValue, 'yyyy-mm-dd h:mm'],\n            'datetime format float' => [$floatValue, $floatValue, 'yyyy-mm-dd h:mm'],\n            'time format integer' => [$integerValueAsFloat, $integerValue, NumberFormat::FORMAT_DATE_TIME1],\n            'time format float' => [$floatValue, $floatValue, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula integer fltfmt' => [$integerValueAsFloat, $integerValueAsDateFormula, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula float' => [$floatValue, $floatValueAsDateFormula, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula integer intfmt but formula returns float' => [$integerValueAsFloat, $integerValueAsDateFormula, NumberFormat::FORMAT_DATE_YYYYMMDD],\n        ];\n    }\n\n    #[DataProvider('providerDateAndTime')]\n    public function testDateAndTime(int|float $expectedResult, int|float|string $value, ?string $format = null): void\n    {\n        Cell::setCalculateDateTimeType(\n            Cell::CALCULATE_DATE_TIME_FLOAT\n        );\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        self::assertSame(0, $spreadsheet->getActiveSheetIndex());\n        $sheet = $spreadsheet->getActiveSheet();\n        $newSheet = $spreadsheet->createSheet();\n        $newSheet->getCell('B7')->setValue('Here');\n        $sheet->getCell('A1')->setValue($value);\n        if ($format !== null) {\n            $sheet->getStyle('A1')\n                ->getNumberFormat()\n                ->setFormatCode($format);\n        }\n        $sheet->setSelectedCells('B7');\n        $spreadsheet->setActiveSheetIndex(1);\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('B7', $sheet->getSelectedCells());\n        self::assertSame(1, $spreadsheet->getActiveSheetIndex());\n    }\n\n    public static function providerDateAndTime(): array\n    {\n        $integerValue = 44046;\n        $integerValueAsFloat = (float) $integerValue;\n        $integerValueAsDateFormula = '=DATEVALUE(\"2020-08-03\")';\n        $floatValue = 44015.25;\n        $floatValueAsDateFormula = '=DATEVALUE(\"2020-07-03\")+TIMEVALUE(\"06:00\")';\n\n        return [\n            'default format integer' => [$integerValue, $integerValue],\n            'default format float' => [$floatValue, $floatValue],\n            'date format integer' => [$integerValueAsFloat, $integerValue, NumberFormat::FORMAT_DATE_YYYYMMDD],\n            'date format float' => [$floatValue, $floatValue, NumberFormat::FORMAT_DATE_YYYYMMDD],\n            'datetime format integer' => [$integerValueAsFloat, $integerValue, 'yyyy-mm-dd h:mm'],\n            'datetime format float' => [$floatValue, $floatValue, 'yyyy-mm-dd h:mm'],\n            'time format integer' => [$integerValueAsFloat, $integerValue, NumberFormat::FORMAT_DATE_TIME1],\n            'time format float' => [$floatValue, $floatValue, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula integer fltfmt' => [$integerValueAsFloat, $integerValueAsDateFormula, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula float' => [$floatValue, $floatValueAsDateFormula, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula integer intfmt but formula returns float' => [$integerValueAsFloat, $integerValueAsDateFormula, NumberFormat::FORMAT_DATE_YYYYMMDD],\n        ];\n    }\n\n    #[DataProvider('providerAsis')]\n    public function testDefault(int|float $expectedResult, int|float|string $value, ?string $format = null): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        self::assertSame(0, $spreadsheet->getActiveSheetIndex());\n        $sheet = $spreadsheet->getActiveSheet();\n        $newSheet = $spreadsheet->createSheet();\n        $newSheet->getCell('B7')->setValue('Here');\n        $sheet->getCell('A1')->setValue($value);\n        if ($format !== null) {\n            $sheet->getStyle('A1')\n                ->getNumberFormat()\n                ->setFormatCode($format);\n        }\n        $sheet->setSelectedCells('B7');\n        $spreadsheet->setActiveSheetIndex(1);\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('B7', $sheet->getSelectedCells());\n        self::assertSame(1, $spreadsheet->getActiveSheetIndex());\n    }\n\n    #[DataProvider('providerAsis')]\n    public function testAsis(int|float $expectedResult, int|float|string $value, ?string $format = null): void\n    {\n        Cell::setCalculateDateTimeType(\n            Cell::CALCULATE_DATE_TIME_ASIS\n        );\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        self::assertSame(0, $spreadsheet->getActiveSheetIndex());\n        $sheet = $spreadsheet->getActiveSheet();\n        $newSheet = $spreadsheet->createSheet();\n        $newSheet->getCell('B7')->setValue('Here');\n        $sheet->getCell('A1')->setValue($value);\n        if ($format !== null) {\n            $sheet->getStyle('A1')\n                ->getNumberFormat()\n                ->setFormatCode($format);\n        }\n        $sheet->setSelectedCells('B7');\n        $spreadsheet->setActiveSheetIndex(1);\n        self::assertSame($expectedResult, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('B7', $sheet->getSelectedCells());\n        self::assertSame(1, $spreadsheet->getActiveSheetIndex());\n    }\n\n    public static function providerAsis(): array\n    {\n        $integerValue = 44046;\n        $integerValueAsFloat = (float) $integerValue;\n        $integerValueAsDateFormula = '=DATEVALUE(\"2020-08-03\")';\n        $floatValue = 44015.25;\n        $floatValueAsDateFormula = '=DATEVALUE(\"2020-07-03\")+TIMEVALUE(\"06:00\")';\n\n        return [\n            'default format integer' => [$integerValue, $integerValue],\n            'default format float' => [$floatValue, $floatValue],\n            'date format integer' => [$integerValue, $integerValue, NumberFormat::FORMAT_DATE_YYYYMMDD],\n            'date format float' => [$floatValue, $floatValue, NumberFormat::FORMAT_DATE_YYYYMMDD],\n            'datetime format integer' => [$integerValue, $integerValue, 'yyyy-mm-dd h:mm'],\n            'datetime format float' => [$floatValue, $floatValue, 'yyyy-mm-dd h:mm'],\n            'time format integer' => [$integerValue, $integerValue, NumberFormat::FORMAT_DATE_TIME1],\n            'time format float' => [$floatValue, $floatValue, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula integer fltfmt' => [$integerValueAsFloat, $integerValueAsDateFormula, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula float' => [$floatValue, $floatValueAsDateFormula, NumberFormat::FORMAT_DATE_TIME1],\n            'date formula integer intfmt but formula returns float' => [$integerValueAsFloat, $integerValueAsDateFormula, NumberFormat::FORMAT_DATE_YYYYMMDD],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/DateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateTest extends TestCase\n{\n    private int $excelCalendar;\n\n    private ?DateTimeZone $dttimezone;\n\n    protected function setUp(): void\n    {\n        $this->dttimezone = Date::getDefaultTimeZoneOrNull();\n        $this->excelCalendar = Date::getExcelCalendar();\n    }\n\n    protected function tearDown(): void\n    {\n        Date::setDefaultTimeZone($this->dttimezone);\n        Date::setExcelCalendar($this->excelCalendar);\n    }\n\n    public function testSetExcelCalendar(): void\n    {\n        $calendarValues = [\n            Date::CALENDAR_MAC_1904,\n            Date::CALENDAR_WINDOWS_1900,\n        ];\n\n        $spreadsheet = new Spreadsheet();\n        foreach ($calendarValues as $calendarValue) {\n            $result = Date::setExcelCalendar($calendarValue);\n            self::assertTrue($result);\n            $result = $spreadsheet->setExcelCalendar($calendarValue);\n            self::assertTrue($result);\n        }\n        self::assertFalse($spreadsheet->setExcelCalendar(0));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetExcelCalendarWithInvalidValue(): void\n    {\n        $unsupportedCalendar = 2012;\n        $result = Date::setExcelCalendar($unsupportedCalendar);\n        self::assertFalse($result);\n    }\n\n    #[DataProvider('providerDateTimeExcelToTimestamp1900')]\n    public function testDateTimeExcelToTimestamp1900(float|int $expectedResult, float|int $excelDateTimeValue): void\n    {\n        if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) {\n            self::markTestSkipped('Test invalid on 32-bit system.');\n        }\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n\n        $result = Date::excelToTimestamp($excelDateTimeValue);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerDateTimeExcelToTimestamp1900(): array\n    {\n        return require 'tests/data/Shared/Date/ExcelToTimestamp1900.php';\n    }\n\n    #[DataProvider('providerDateTimeTimestampToExcel1900')]\n    public function testDateTimeTimestampToExcel1900(float|int $expectedResult, float|int|string $unixTimestamp): void\n    {\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n\n        $result = Date::timestampToExcel($unixTimestamp);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-5);\n    }\n\n    public static function providerDateTimeTimestampToExcel1900(): array\n    {\n        return require 'tests/data/Shared/Date/TimestampToExcel1900.php';\n    }\n\n    #[DataProvider('providerDateTimeDateTimeToExcel')]\n    public function testDateTimeDateTimeToExcel(float|int $expectedResult, DateTimeInterface $dateTimeObject): void\n    {\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n\n        $result = Date::dateTimeToExcel($dateTimeObject);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-5);\n    }\n\n    public static function providerDateTimeDateTimeToExcel(): array\n    {\n        return require 'tests/data/Shared/Date/DateTimeToExcel.php';\n    }\n\n    /**\n     * @param array{0: int, 1: int, 2: int, 3: int, 4: int, 5: float|int} $args Array containing year/month/day/hours/minutes/seconds\n     */\n    #[DataProvider('providerDateTimeFormattedPHPToExcel1900')]\n    public function testDateTimeFormattedPHPToExcel1900(mixed $expectedResult, ...$args): void\n    {\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n\n        $result = Date::formattedPHPToExcel(...$args); // @phpstan-ignore-line\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-5);\n    }\n\n    public static function providerDateTimeFormattedPHPToExcel1900(): array\n    {\n        return require 'tests/data/Shared/Date/FormattedPHPToExcel1900.php';\n    }\n\n    #[DataProvider('providerDateTimeExcelToTimestamp1904')]\n    public function testDateTimeExcelToTimestamp1904(float|int $expectedResult, float|int $excelDateTimeValue): void\n    {\n        if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) {\n            self::markTestSkipped('Test invalid on 32-bit system.');\n        }\n        Date::setExcelCalendar(Date::CALENDAR_MAC_1904);\n\n        $result = Date::excelToTimestamp($excelDateTimeValue);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerDateTimeExcelToTimestamp1904(): array\n    {\n        return require 'tests/data/Shared/Date/ExcelToTimestamp1904.php';\n    }\n\n    #[DataProvider('providerDateTimeTimestampToExcel1904')]\n    public function testDateTimeTimestampToExcel1904(mixed $expectedResult, float|int|string $unixTimestamp): void\n    {\n        Date::setExcelCalendar(Date::CALENDAR_MAC_1904);\n\n        $result = Date::timestampToExcel($unixTimestamp);\n        self::assertEqualsWithDelta($expectedResult, $result, 1E-5);\n    }\n\n    public static function providerDateTimeTimestampToExcel1904(): array\n    {\n        return require 'tests/data/Shared/Date/TimestampToExcel1904.php';\n    }\n\n    #[DataProvider('providerIsDateTimeFormatCode')]\n    public function testIsDateTimeFormatCode(mixed $expectedResult, string $format): void\n    {\n        $result = Date::isDateTimeFormatCode($format);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerIsDateTimeFormatCode(): array\n    {\n        return require 'tests/data/Shared/Date/FormatCodes.php';\n    }\n\n    #[DataProvider('providerDateTimeExcelToTimestamp1900Timezone')]\n    public function testDateTimeExcelToTimestamp1900Timezone(float|int $expectedResult, float|int $excelDateTimeValue, string $timezone): void\n    {\n        if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) {\n            self::markTestSkipped('Test invalid on 32-bit system.');\n        }\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n\n        $result = Date::excelToTimestamp($excelDateTimeValue, $timezone);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerDateTimeExcelToTimestamp1900Timezone(): array\n    {\n        return require 'tests/data/Shared/Date/ExcelToTimestamp1900Timezone.php';\n    }\n\n    public function testConvertIsoDateError(): void\n    {\n        Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Non-string value supplied for Iso Date conversion');\n        Date::convertIsoDate(false);\n    }\n\n    public function testVarious(): void\n    {\n        Date::setDefaultTimeZone('UTC');\n        self::assertFalse(Date::stringToExcel('2019-02-29'));\n        self::assertTrue((bool) Date::stringToExcel('2019-02-28'));\n        self::assertTrue((bool) Date::stringToExcel('2019-02-28 11:18'));\n        self::assertFalse(Date::stringToExcel('2019-02-28 11:71'));\n        $timestamp1 = Date::stringToExcel('26.05.2025 14:28:00');\n        $timestamp2 = Date::stringToExcel('26.05.2025 14:28:00.00');\n        self::assertNotFalse($timestamp1);\n        self::assertNotFalse($timestamp2);\n        self::assertEqualsWithDelta($timestamp1, 45803.60277777778, 1.0E-10);\n        self::assertSame($timestamp1, $timestamp2);\n\n        $date = Date::PHPToExcel('2020-01-01');\n        self::assertEquals(43831.0, $date);\n        $phpDate = new DateTime('2020-01-02T00:00Z');\n        $date = Date::PHPToExcel($phpDate);\n        self::assertEquals(43832.0, $date);\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B1', 'x');\n        /** @var float|int|string */\n        $val = $sheet->getCell('B1')->getValue();\n        self::assertFalse(Date::timestampToExcel($val));\n\n        $cell = $sheet->getCell('A1');\n\n        $cell->setValue($date);\n        $sheet->getStyle('A1')\n            ->getNumberFormat()\n            ->setFormatCode(NumberFormat::FORMAT_DATE_DATETIME);\n        self::assertTrue(Date::isDateTime($cell));\n\n        $cella2 = $sheet->getCell('A2');\n\n        $cella2->setValue('=A1+2');\n        $sheet->getStyle('A2')\n            ->getNumberFormat()\n            ->setFormatCode(NumberFormat::FORMAT_DATE_DATETIME);\n        self::assertTrue(Date::isDateTime($cella2));\n\n        $cella3 = $sheet->getCell('A3');\n\n        $cella3->setValue('=A1+4');\n        $sheet->getStyle('A3')\n            ->getNumberFormat()\n            ->setFormatCode('0.00E+00');\n        self::assertFalse(Date::isDateTime($cella3));\n\n        $cella4 = $sheet->getCell('A4');\n\n        $cella4->setValue('= 44 7510557347');\n        $sheet->getStyle('A4')\n            ->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd');\n        self::assertFalse(Date::isDateTime($cella4));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->returnArrayAsArray();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 45000);\n        $sheet->setCellValue('A2', 44000);\n        $sheet->setCellValue('A3', 46000);\n        $sheet->setCellValue('C1', '=SORT(A1:A3)');\n        $sheet->setCellValue('D1', '=SORT(A1:A3)');\n        $sheet->getStyle('C1')\n            ->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd');\n        self::assertTrue(Date::isDateTime($sheet->getCell('C1')));\n        self::assertFalse(Date::isDateTime($sheet->getCell('D1')));\n        self::assertIsArray(\n            $sheet->getCell('C1')->getCalculatedValue()\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRoundMicroseconds(): void\n    {\n        $dti = new DateTime('2000-01-02 03:04:05.999999');\n        Date::roundMicroseconds($dti);\n        self::assertEquals(new DateTime('2000-01-02 03:04:06.000000'), $dti);\n\n        $dti = new DateTime('2000-01-02 03:04:05.500000');\n        Date::roundMicroseconds($dti);\n        self::assertEquals(new DateTime('2000-01-02 03:04:06.000000'), $dti);\n\n        $dti = new DateTime('2000-01-02 03:04:05.499999');\n        Date::roundMicroseconds($dti);\n        self::assertEquals(new DateTime('2000-01-02 03:04:05.000000'), $dti);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/DgContainerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DgContainerTest extends TestCase\n{\n    public function testNullContainerWithThrow(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('spgrContainer is unexpectedly null');\n        $container = new DgContainer();\n        $container->getSpgrContainerOrThrow();\n    }\n\n    public function testNullContainerWithoutThrow(): void\n    {\n        $container = new DgContainer();\n        self::assertNull($container->getSpgrContainer());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/DggContainerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DggContainerTest extends TestCase\n{\n    public function testBseParent(): void\n    {\n        $container = new DggContainer\\BstoreContainer();\n        $bse = new DggContainer\\BstoreContainer\\BSE();\n        $bse->setParent($container);\n        self::assertSame($container, $bse->getParent());\n    }\n\n    public function testGetOpt(): void\n    {\n        $dgg = new DggContainer();\n        self::assertNull($dgg->getOPT(99));\n        $dgg->setOPT(98, 'whatever');\n        self::assertSame('whatever', $dgg->getOPT(98));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/DrawingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DrawingTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPixelsToCellDimension')]\n    public function testPixelsToCellDimension(\n        float $expectedResult,\n        int $pixelSize,\n        string $fontName,\n        int $fontSize\n    ): void {\n        $font = new Font();\n        $font->setName($fontName);\n        $font->setSize($fontSize);\n\n        $result = Drawing::pixelsToCellDimension($pixelSize, $font);\n        self::assertSame($expectedResult, $result);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCellDimensionToPixels')]\n    public function testCellDimensionToPixels(\n        int $expectedResult,\n        int $cellSize,\n        string $fontName,\n        int $fontSize\n    ): void {\n        $font = new Font();\n        $font->setName($fontName);\n        $font->setSize($fontSize);\n\n        $result = Drawing::cellDimensionToPixels($cellSize, $font);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerPixelsToCellDimension(): array\n    {\n        return [\n            [19.9951171875, 100, 'Arial', 7],\n            [14.2822265625, 100, 'Arial', 9],\n            [14.2822265625, 100, 'Arial', 11],\n            [13.092041015625, 100, 'Arial', 12], // approximation by extrapolating from Calibri 11\n            [19.9951171875, 100, 'Calibri', 7],\n            [16.664341517857142, 100, 'Calibri', 9],\n            [14.2822265625, 100, 'Calibri', 11],\n            [13.092041015625, 100, 'Calibri', 12], // approximation by extrapolating from Calibri 11\n            [19.9951171875, 100, 'Verdana', 7],\n            [12.5, 100, 'Verdana', 9],\n            [13.092041015625, 100, 'Verdana', 12], // approximation by extrapolating from Calibri 11\n            [17.4560546875, 100, 'Wingdings', 9], // approximation by extrapolating from Calibri 11\n        ];\n    }\n\n    public static function providerCellDimensionToPixels(): array\n    {\n        return [\n            [500, 100, 'Arial', 7],\n            [700, 100, 'Arial', 9],\n            [700, 100, 'Arial', 11],\n            [764, 100, 'Arial', 12], // approximation by extrapolating from Calibri 11\n            [500, 100, 'Calibri', 7],\n            [600, 100, 'Calibri', 9],\n            [700, 100, 'Calibri', 11],\n            [764, 100, 'Calibri', 12], // approximation by extrapolating from Calibri 11\n            [500, 100, 'Verdana', 7],\n            [800, 100, 'Verdana', 9],\n            [764, 100, 'Verdana', 12], // approximation by extrapolating from Calibri 11\n            [573, 100, 'Wingdings', 9], // approximation by extrapolating from Calibri 11\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/ExactFontTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\Run;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font as StyleFont;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ExactFontTest extends TestCase\n{\n    // Results from this test are not necessarily portable between\n    //   systems and Php Releases.\n    // See https://github.com/php/php-src/issues/9073\n    // Extra tests are added to determine if test should\n    //   be marked incomplete.\n    const EXTRA_FONTS = [\n        'DejaVu Sans' => [\n            'x' => 'DejaVuSans.ttf',\n            'xb' => 'DejaVuSans-Bold.ttf',\n            'xi' => 'DejaVuSans-Oblique.ttf',\n            'xbi' => 'DejaVuSans-BoldOblique.ttf',\n        ],\n        'DejaVu Sans Mono' => [\n            'x' => 'DejaVuSansMono.ttf',\n            'xb' => 'DejaVuSansMono-Bold.ttf',\n            'xi' => 'DejaVuSansMono-Oblique.ttf',\n            'xbi' => 'DejaVuSansMono-BoldOblique.ttf',\n        ],\n        'DejaVu Serif Condensed' => [\n            'x' => 'DejaVuSerifCondensed.ttf',\n            'xb' => 'DejaVuSerifCondensed-Bold.ttf',\n            'xi' => 'DejaVuSerifCondensed-Italic.ttf',\n            'xbi' => 'DejaVuSerifCondensed-BoldItalic.ttf',\n        ],\n    ];\n\n    private string $holdDirectory;\n\n    private string $holdAutoSizeMethod;\n\n    private string $directoryName = '';\n\n    private string $incompleteMessage = '';\n\n    private const KNOWN_MD5 = [\n        '6a15e0a7c0367ba77a959ea27ebf11cf',\n        'b0e31de57cd5307954a3c54136ce68ae',\n        'be189a7e2711cdf2a7f6275c60cbc7e2',\n    ];\n\n    private float|int|null $paddingAmountExact;\n\n    protected function setUp(): void\n    {\n        $this->paddingAmountExact = Font::getPaddingAmountExact();\n        $this->holdDirectory = Font::getTrueTypeFontPath();\n        $this->holdAutoSizeMethod = Font::getAutoSizeMethod();\n        $direc = realpath('vendor/mpdf/mpdf/ttfonts') . DIRECTORY_SEPARATOR;\n        $fontFile = 'DejaVuSans.ttf';\n        $fontPath = $direc . $fontFile;\n        $this->incompleteMessage = '';\n        if (@is_readable($fontPath)) {\n            $hash = md5_file($fontPath);\n            if (!in_array($hash, self::KNOWN_MD5, true)) {\n                $this->incompleteMessage = \"Unrecognized Font file MD5 hash $hash\";\n            }\n        } else {\n            $this->incompleteMessage = 'Unable to locate font file';\n        }\n        $this->directoryName = $direc;\n    }\n\n    protected function tearDown(): void\n    {\n        Font::setTrueTypeFontPath($this->holdDirectory);\n        Font::setAutoSizeMethod($this->holdAutoSizeMethod);\n        Font::setPaddingAmountExact($this->paddingAmountExact);\n        $this->directoryName = '';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFontData')]\n    public function testExact(string $fontName, float $excelWidth, float $xmlWidth, float $winWidth, float $ubuntuWidth): void\n    {\n        if ($this->incompleteMessage !== '') {\n            self::markTestIncomplete($this->incompleteMessage);\n        }\n        $font = new StyleFont();\n        $font->setName($fontName);\n        $font->setSize(11);\n        Font::setTrueTypeFontPath($this->directoryName);\n        Font::setExtraFontArray(self::EXTRA_FONTS);\n        Font::setAutoSizeMethod(Font::AUTOSIZE_METHOD_EXACT);\n        $exactWidth = Font::calculateColumnWidth($font, \"This is $fontName\");\n        Font::setAutoSizeMethod(Font::AUTOSIZE_METHOD_APPROX);\n        $approxWidth = Font::calculateColumnWidth($font, \"This is $fontName\");\n        if ($excelWidth > 0) {\n            self::assertGreaterThanOrEqual(max($excelWidth, $xmlWidth), $exactWidth);\n            // Give ourselves a little wiggle room on upper bound.\n            self::assertLessThanOrEqual(1.05 * max($winWidth, $ubuntuWidth), $exactWidth);\n            self::assertNotEquals($exactWidth, $approxWidth);\n        } else {\n            self::assertEquals($exactWidth, $approxWidth, 'Use approx when exact font file not found');\n        }\n    }\n\n    public static function providerFontData(): array\n    {\n        return [\n            ['DejaVu Sans', 19.82, 20.453125, 22.5659, 21.709],\n            ['DejaVu Sans Mono', 29.18, 29.81640625, 31.9922, 31.8494],\n            ['DejaVu Serif Condensed', 29.55, 30.1796875, 31.9922, 31.1353],\n            ['Arial', -29.55, 30.1796875, 31.9922, 31.1353],\n        ];\n    }\n\n    public function testRichText(): void\n    {\n        // RichText treated as text, using Cell font, not Run Font\n        $courier = new StyleFont();\n        $courier->setName('Courier New');\n        $courier->setSize(11);\n        Font::setAutoSizeMethod(Font::AUTOSIZE_METHOD_APPROX);\n        $element1 = new Run('A');\n        $element2 = new Run('B');\n        $element3 = new Run('C');\n        $element1->setFont($courier);\n        $element2->setFont($courier);\n        $element3->setFont($courier);\n        $richText = new RichText();\n        $richText->setRichTextElements([$element1, $element2, $element3]);\n        $arial = new StyleFont();\n        $arial->setName('Arial');\n        $arial->setSize(9);\n        $widthRich = Font::calculateColumnWidth($arial, $richText);\n        $widthText = Font::calculateColumnWidth($arial, 'ABC');\n        self::assertSame($widthRich, $widthText);\n    }\n\n    public function testIssue3626NoPad(): void\n    {\n        $fontName = 'DejaVu Sans';\n        if ($this->incompleteMessage !== '') {\n            self::markTestIncomplete($this->incompleteMessage);\n        }\n        Font::setTrueTypeFontPath($this->directoryName);\n        Font::setExtraFontArray(self::EXTRA_FONTS);\n        Font::setAutoSizeMethod(Font::AUTOSIZE_METHOD_EXACT);\n        Font::setPaddingAmountExact(0);\n\n        $font = new StyleFont();\n        $font->setName($fontName);\n        $font->setSize(20);\n        $exactWidth = Font::calculateColumnWidth($font, 'Column2');\n        $expectedWidth = 16.853;\n        self::assertTrue(\n            $exactWidth > 0.95 * $expectedWidth && $exactWidth < 1.05 * $expectedWidth,\n            \"$exactWidth is not within 5% of expected $expectedWidth\"\n        );\n\n        $font = new StyleFont();\n        $font->setName($fontName);\n        $exactWidth = Font::calculateColumnWidth($font, 'Col3');\n        $expectedWidth = 4.5703;\n        self::assertTrue(\n            $exactWidth > 0.95 * $expectedWidth && $exactWidth < 1.05 * $expectedWidth,\n            \"$exactWidth is not within 5% of expected $expectedWidth\"\n        );\n\n        $font = new StyleFont();\n        $font->setName($fontName);\n        $exactWidth = Font::calculateColumnWidth($font, 'Big Column in 4 position');\n        $expectedWidth = 26.2793;\n        self::assertTrue(\n            $exactWidth > 0.95 * $expectedWidth && $exactWidth < 1.05 * $expectedWidth,\n            \"$exactWidth is not within 5% of expected $expectedWidth\"\n        );\n    }\n\n    public function testIssue3626Pad(): void\n    {\n        $fontName = 'DejaVu Sans';\n        if ($this->incompleteMessage !== '') {\n            self::markTestIncomplete($this->incompleteMessage);\n        }\n        Font::setTrueTypeFontPath($this->directoryName);\n        Font::setExtraFontArray(self::EXTRA_FONTS);\n        Font::setAutoSizeMethod(Font::AUTOSIZE_METHOD_EXACT);\n        //Font::setPaddingAmountExact(null); // default - not needed\n\n        $font = new StyleFont();\n        $font->setName($fontName);\n        $font->setSize(20);\n        $exactWidth = Font::calculateColumnWidth($font, 'Column2');\n        $expectedWidth = 18.8525;\n        self::assertTrue(\n            $exactWidth > 0.95 * $expectedWidth && $exactWidth < 1.05 * $expectedWidth,\n            \"$exactWidth is not within 5% of expected $expectedWidth\"\n        );\n\n        $font = new StyleFont();\n        $font->setName($fontName);\n        $exactWidth = Font::calculateColumnWidth($font, 'Col3');\n        $expectedWidth = 5.8557;\n        self::assertTrue(\n            $exactWidth > 0.95 * $expectedWidth && $exactWidth < 1.05 * $expectedWidth,\n            \"$exactWidth is not within 5% of expected $expectedWidth\"\n        );\n\n        $font = new StyleFont();\n        $font->setName($fontName);\n        $exactWidth = Font::calculateColumnWidth($font, 'Big Column in 4 position');\n        $expectedWidth = 27.5647;\n        self::assertTrue(\n            $exactWidth > 0.95 * $expectedWidth && $exactWidth < 1.05 * $expectedWidth,\n            \"$exactWidth is not within 5% of expected $expectedWidth\"\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/FileTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FileTest extends TestCase\n{\n    private bool $uploadFlag = false;\n\n    private string $tempfile = '';\n\n    protected function setUp(): void\n    {\n        $this->uploadFlag = File::getUseUploadTempDirectory();\n    }\n\n    protected function tearDown(): void\n    {\n        File::setUseUploadTempDirectory($this->uploadFlag);\n        if ($this->tempfile !== '') {\n            unlink($this->tempfile);\n            $this->tempfile = '';\n        }\n    }\n\n    public function testGetUseUploadTempDirectory(): void\n    {\n        $expectedResult = false;\n\n        $result = File::getUseUploadTempDirectory();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSetUseUploadTempDirectory(): void\n    {\n        $useUploadTempDirectoryValues = [\n            true,\n            false,\n        ];\n        $temp = ini_get('upload_tmp_dir') ?: '';\n        $badArray = ['', sys_get_temp_dir()];\n\n        foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {\n            File::setUseUploadTempDirectory($useUploadTempDirectoryValue);\n\n            $result = File::getUseUploadTempDirectory();\n            self::assertEquals($useUploadTempDirectoryValue, $result);\n            $result = File::sysGetTempDir();\n            if (!$useUploadTempDirectoryValue || in_array($temp, $badArray, true)) {\n                self::assertSame(realpath(sys_get_temp_dir()), $result);\n            } else {\n                self::assertSame(realpath($temp), $result);\n            }\n        }\n    }\n\n    public function testUploadTmpDir(): void\n    {\n        $temp = ini_get('upload_tmp_dir') ?: '';\n        $badArray = ['', sys_get_temp_dir()];\n        if (in_array($temp, $badArray, true)) {\n            self::markTestSkipped('upload_tmp_dir setting unusable for this test');\n        } else {\n            File::setUseUploadTempDirectory(true);\n            $result = File::sysGetTempDir();\n            self::assertSame(realpath($temp), $result);\n        }\n    }\n\n    public function testNotExists(): void\n    {\n        $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        File::assertFile($temp);\n        self::assertTrue(File::testFileNoThrow($temp));\n        unlink($temp);\n        self::assertFalse(File::testFileNoThrow($temp));\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('does not exist');\n        File::assertFile($temp);\n    }\n\n    public function testNotReadable(): void\n    {\n        if (PHP_OS_FAMILY === 'Windows' || stristr(PHP_OS, 'CYGWIN') !== false) {\n            self::markTestSkipped('chmod does not work reliably on Windows');\n        }\n        $this->tempfile = $temp = File::temporaryFileName();\n        file_put_contents($temp, '');\n        if (chmod($temp, 7 * 8) === false) { // octal 070\n            self::markTestSkipped('chmod failed');\n        }\n        self::assertFalse(File::testFileNoThrow($temp));\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('is not readable');\n        File::assertFile($temp);\n    }\n\n    public function testZip(): void\n    {\n        $temp = 'samples/templates/26template.xlsx';\n        File::assertFile($temp, 'xl/workbook.xml');\n        self::assertTrue(File::testFileNoThrow($temp, 'xl/workbook.xml'));\n        self::assertFalse(File::testFileNoThrow($temp, 'xl/xworkbook.xml'));\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Could not find zip member');\n        File::assertFile($temp, 'xl/xworkbook.xml');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Font2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font as StyleFont;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Font2Test extends TestCase\n{\n    #[DataProvider('providerCharsetFromFontName')]\n    public function testCharsetFromFontName(string $fontName, int $expectedResult): void\n    {\n        $result = Font::getCharsetFromFontName($fontName);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testCharsetFromFontNameCoverage(): void\n    {\n        $covered = [];\n        $expected = Font::CHARSET_FROM_FONT_NAME;\n        foreach (array_keys($expected) as $key) {\n            $covered[$key] = 0;\n        }\n        $defaultCovered = false;\n        $tests = $this->providerCharsetFromFontName();\n        foreach ($tests as $test) {\n            /** @var string[] $test */\n            $thisTest = $test[0];\n            if (array_key_exists($thisTest, $covered)) {\n                $covered[$thisTest] = 1;\n            } else {\n                $defaultCovered = true;\n            }\n        }\n        foreach ($covered as $key => $val) {\n            self::assertEquals(1, $val, \"FontName $key not tested\");\n        }\n        self::assertTrue($defaultCovered, 'Default key not tested');\n    }\n\n    public static function providerCharsetFromFontName(): array\n    {\n        return [\n            ['EucrosiaUPC', Font::CHARSET_ANSI_THAI],\n            ['Wingdings', Font::CHARSET_SYMBOL],\n            ['Wingdings 2', Font::CHARSET_SYMBOL],\n            ['Wingdings 3', Font::CHARSET_SYMBOL],\n            ['Default', Font::CHARSET_ANSI_LATIN],\n        ];\n    }\n\n    public function testColumnWidths(): void\n    {\n        $widths = Font::DEFAULT_COLUMN_WIDTHS;\n        $fontNames = ['Arial', 'Calibri', 'Verdana'];\n        $font = new StyleFont();\n        foreach ($fontNames as $fontName) {\n            $font->setName($fontName);\n            $array = $widths[$fontName];\n            foreach ($array as $points => $array2) {\n                $font->setSize($points);\n                $px = $array2['px'];\n                $width = $array2['width'];\n                self::assertEquals($px, Font::getDefaultColumnWidthByFont($font, true), \"$fontName $points px\");\n                self::assertEquals($width, Font::getDefaultColumnWidthByFont($font, false), \"$fontName $points ooxml-units\");\n            }\n        }\n        $pxCalibri11 = $widths['Calibri'][11]['px'];\n        $widthCalibri11 = $widths['Calibri'][11]['width'];\n        $fontName = 'unknown';\n        $points = 11;\n        $font->setName($fontName);\n        $font->setSize($points);\n        self::assertEquals($pxCalibri11, Font::getDefaultColumnWidthByFont($font, true), \"$fontName $points px\");\n        self::assertEquals($widthCalibri11, Font::getDefaultColumnWidthByFont($font, false), \"$fontName $points ooxml-units\");\n        $points = 22;\n        $font->setSize($points);\n        self::assertEquals(2 * $pxCalibri11, Font::getDefaultColumnWidthByFont($font, true), \"$fontName $points px\");\n        self::assertEquals(2 * $widthCalibri11, Font::getDefaultColumnWidthByFont($font, false), \"$fontName $points ooxml-units\");\n        $fontName = 'Arial';\n        $points = 33;\n        $font->setName($fontName);\n        $font->setSize($points);\n        self::assertEquals(3 * $pxCalibri11, Font::getDefaultColumnWidthByFont($font, true), \"$fontName $points px\");\n        self::assertEquals(3 * $widthCalibri11, Font::getDefaultColumnWidthByFont($font, false), \"$fontName $points ooxml-units\");\n    }\n\n    public function testRowHeights(): void\n    {\n        $heights = Font::DEFAULT_COLUMN_WIDTHS;\n        $fontNames = ['Arial', 'Calibri', 'Verdana'];\n        $font = new StyleFont();\n        foreach ($fontNames as $fontName) {\n            $font->setName($fontName);\n            $array = $heights[$fontName];\n            foreach ($array as $points => $array2) {\n                $font->setSize($points);\n                $height = $array2['height'];\n                self::assertEquals($height, Font::getDefaultRowHeightByFont($font), \"$fontName $points points\");\n            }\n        }\n        $heightArial10 = $heights['Arial'][10]['height'];\n        $fontName = 'Arial';\n        $points = 20;\n        $font->setName($fontName);\n        $font->setSize($points);\n        self::assertEquals(2 * $heightArial10, Font::getDefaultRowHeightByFont($font), \"$fontName $points points\");\n        $heightVerdana10 = $heights['Verdana'][10]['height'];\n        $fontName = 'Verdana';\n        $points = 30;\n        $font->setName($fontName);\n        $font->setSize($points);\n        self::assertEquals(3 * $heightVerdana10, Font::getDefaultRowHeightByFont($font), \"$fontName $points points\");\n        $heightCalibri11 = $heights['Calibri'][11]['height'];\n        $fontName = 'Calibri';\n        $points = 22;\n        $font->setName($fontName);\n        $font->setSize($points);\n        self::assertEquals(2 * $heightCalibri11, Font::getDefaultRowHeightByFont($font), \"$fontName $points points\");\n        $fontName = 'unknown';\n        $points = 33;\n        $font->setName($fontName);\n        $font->setSize($points);\n        self::assertEquals(3 * $heightCalibri11, Font::getDefaultRowHeightByFont($font), \"$fontName $points points\");\n    }\n\n    public function testGetTrueTypeFontFileFromFont(): void\n    {\n        $fileNames = Font::FONT_FILE_NAMES;\n        $font = new StyleFont();\n        foreach ($fileNames as $fontName => $fontNameArray) {\n            $font->setName($fontName);\n            $font->setBold(false);\n            $font->setItalic(false);\n            self::assertSame($fileNames[$fontName]['x'], Font::getTrueTypeFontFileFromFont($font, false), \"$fontName not bold not italic\");\n            $font->setBold(true);\n            $font->setItalic(false);\n            self::assertSame($fileNames[$fontName]['xb'], Font::getTrueTypeFontFileFromFont($font, false), \"$fontName bold not italic\");\n            $font->setBold(false);\n            $font->setItalic(true);\n            self::assertSame($fileNames[$fontName]['xi'], Font::getTrueTypeFontFileFromFont($font, false), \"$fontName not bold italic\");\n            $font->setBold(true);\n            $font->setItalic(true);\n            self::assertSame($fileNames[$fontName]['xbi'], Font::getTrueTypeFontFileFromFont($font, false), \"$fontName bold italic\");\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Font3Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SSException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font as StyleFont;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Font3Test extends TestCase\n{\n    private string $holdDirectory;\n\n    protected function setUp(): void\n    {\n        $this->holdDirectory = Font::getTrueTypeFontPath();\n    }\n\n    protected function tearDown(): void\n    {\n        Font::setTrueTypeFontPath($this->holdDirectory);\n    }\n\n    public function testGetTrueTypeException1(): void\n    {\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('Valid directory to TrueType Font files not specified');\n        $font = new StyleFont();\n        $font->setName('unknown');\n        Font::getTrueTypeFontFileFromFont($font);\n    }\n\n    public function testGetTrueTypeException2(): void\n    {\n        Font::setTrueTypeFontPath(__DIR__);\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('Unknown font name');\n        $font = new StyleFont();\n        $font->setName('unknown');\n        Font::getTrueTypeFontFileFromFont($font);\n    }\n\n    public function testGetTrueTypeException3(): void\n    {\n        Font::setTrueTypeFontPath(__DIR__);\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('TrueType Font file not found');\n        $font = new StyleFont();\n        $font->setName('Calibri');\n        Font::getTrueTypeFontFileFromFont($font);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/FontFileNameTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Chart\\ChartColor;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SSException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font as StyleFont;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FontFileNameTest extends TestCase\n{\n    private const DEFAULT_DIRECTORY = 'tests/data/Shared/FakeFonts/Default';\n    private const MAC_DIRECTORY = 'tests/data/Shared/FakeFonts/Mac';\n    private const RECURSE_DIRECTORY = 'tests/data/Shared/FakeFonts/Recurse';\n\n    private string $holdDirectory;\n\n    /** @var array<string, array<string, string>> */\n    private array $holdExtraFontArray;\n\n    protected function setUp(): void\n    {\n        $this->holdDirectory = Font::getTrueTypeFontPath();\n        $this->holdExtraFontArray = Font::getExtraFontArray();\n        Font::setExtraFontArray([\n            'Extra Font' => [\n                'x' => 'extrafont.ttf',\n                'xb' => 'extrafontbd.ttf',\n                'xi' => 'extrafonti.ttf',\n                'xbi' => 'extrafontbi.ttf',\n            ],\n        ]);\n    }\n\n    protected function tearDown(): void\n    {\n        Font::setTrueTypeFontPath($this->holdDirectory);\n        Font::setExtraFontArray($this->holdExtraFontArray);\n    }\n\n    /**\n     * @param array{name?: string, latin?: string, eastAsian?: string, complexScript?: string, bold?: bool, italic?: bool, superscript?: bool, subscript?: bool, underline?: bool|string, strikethrough?: bool, color?: string[], size?: ?int, chartColor?: ChartColor, scheme?: string, cap?: string} $fontArray Array containing style information\n     */\n    #[DataProvider('providerDefault')]\n    public function testDefaultFilenames(string $expected, array $fontArray): void\n    {\n        if ($expected === 'exception') {\n            $this->expectException(SSException::class);\n            $this->expectExceptionMessage('TrueType Font file not found');\n        }\n        Font::setTrueTypeFontPath(self::DEFAULT_DIRECTORY);\n        $font = (new StyleFont())->applyFromArray($fontArray);\n        $result = Font::getTrueTypeFontFileFromFont($font);\n        self::assertSame($expected, basename($result));\n    }\n\n    public static function providerDefault(): array\n    {\n        return [\n            ['arial.ttf', ['name' => 'Arial']],\n            ['arialbd.ttf', ['name' => 'Arial', 'bold' => true]],\n            ['ariali.ttf', ['name' => 'Arial', 'italic' => true]],\n            ['arialbi.ttf', ['name' => 'Arial', 'bold' => true, 'italic' => true]],\n            ['cour.ttf', ['name' => 'Courier New']],\n            ['courbd.ttf', ['name' => 'Courier New', 'bold' => true]],\n            ['couri.ttf', ['name' => 'Courier New', 'italic' => true]],\n            ['courbi.ttf', ['name' => 'Courier New', 'bold' => true, 'italic' => true]],\n            ['impact.ttf', ['name' => 'Impact']],\n            'no bold impact' => ['impact.ttf', ['name' => 'Impact', 'bold' => true]],\n            'no italic impact' => ['impact.ttf', ['name' => 'Impact', 'italic' => true]],\n            'no bold italic impact' => ['impact.ttf', ['name' => 'Impact', 'bold' => true, 'italic' => true]],\n            ['tahoma.ttf', ['name' => 'Tahoma']],\n            ['tahomabd.ttf', ['name' => 'Tahoma', 'bold' => true]],\n            'no italic tahoma' => ['tahoma.ttf', ['name' => 'Tahoma', 'italic' => true]],\n            'no bold italic tahoma' => ['tahomabd.ttf', ['name' => 'Tahoma', 'bold' => true, 'italic' => true]],\n            'Times New Roman not in directory for this test' => ['exception', ['name' => 'Times New Roman']],\n            ['extrafont.ttf', ['name' => 'Extra Font']],\n            ['extrafontbd.ttf', ['name' => 'Extra Font', 'bold' => true]],\n            ['extrafonti.ttf', ['name' => 'Extra Font', 'italic' => true]],\n            ['extrafontbi.ttf', ['name' => 'Extra Font', 'bold' => true, 'italic' => true]],\n        ];\n    }\n\n    /**\n     * @param array{name?: string, latin?: string, eastAsian?: string, complexScript?: string, bold?: bool, italic?: bool, superscript?: bool, subscript?: bool, underline?: bool|string, strikethrough?: bool, color?: string[], size?: ?int, chartColor?: ChartColor, scheme?: string, cap?: string} $fontArray Array containing style information\n     */\n    #[DataProvider('providerMac')]\n    public function testMacFilenames(string $expected, array $fontArray): void\n    {\n        if ($expected === 'exception') {\n            $this->expectException(SSException::class);\n            $this->expectExceptionMessage('TrueType Font file not found');\n        }\n        Font::setTrueTypeFontPath(self::MAC_DIRECTORY);\n        $font = (new StyleFont())->applyFromArray($fontArray);\n        $result = Font::getTrueTypeFontFileFromFont($font);\n        self::assertSame($expected, ucfirst(basename($result))); // allow for Windows case-insensitivity\n    }\n\n    public static function providerMac(): array\n    {\n        return [\n            ['Arial.ttf', ['name' => 'Arial']],\n            ['Arial Bold.ttf', ['name' => 'Arial', 'bold' => true]],\n            ['Arial Italic.ttf', ['name' => 'Arial', 'italic' => true]],\n            ['Arial Bold Italic.ttf', ['name' => 'Arial', 'bold' => true, 'italic' => true]],\n            ['Courier New.ttf', ['name' => 'Courier New']],\n            ['Courier New Bold.ttf', ['name' => 'Courier New', 'bold' => true]],\n            ['Courier New Italic.ttf', ['name' => 'Courier New', 'italic' => true]],\n            ['Courier New Bold Italic.ttf', ['name' => 'Courier New', 'bold' => true, 'italic' => true]],\n            ['Impact.ttf', ['name' => 'Impact']],\n            'no bold impact' => ['Impact.ttf', ['name' => 'Impact', 'bold' => true]],\n            'no italic impact' => ['Impact.ttf', ['name' => 'Impact', 'italic' => true]],\n            'no bold italic impact' => ['Impact.ttf', ['name' => 'Impact', 'bold' => true, 'italic' => true]],\n            ['Tahoma.ttf', ['name' => 'Tahoma']],\n            ['Tahoma Bold.ttf', ['name' => 'Tahoma', 'bold' => true]],\n            'no italic tahoma' => ['Tahoma.ttf', ['name' => 'Tahoma', 'italic' => true]],\n            'no bold italic tahoma' => ['Tahoma Bold.ttf', ['name' => 'Tahoma', 'bold' => true, 'italic' => true]],\n            'Times New Roman not in directory for this test' => ['exception', ['name' => 'Times New Roman']],\n            ['Extra Font.ttf', ['name' => 'Extra Font']],\n            ['Extra Font Bold.ttf', ['name' => 'Extra Font', 'bold' => true]],\n            ['Extra Font Italic.ttf', ['name' => 'Extra Font', 'italic' => true]],\n            ['Extra Font Bold Italic.ttf', ['name' => 'Extra Font', 'bold' => true, 'italic' => true]],\n        ];\n    }\n\n    /**\n     * @param array{name?: string, latin?: string, eastAsian?: string, complexScript?: string, bold?: bool, italic?: bool, superscript?: bool, subscript?: bool, underline?: bool|string, strikethrough?: bool, color?: string[], size?: ?int, chartColor?: ChartColor, scheme?: string, cap?: string} $fontArray Array containing style information\n     */\n    #[DataProvider('providerOverride')]\n    public function testOverrideFilenames(string $expected, array $fontArray): void\n    {\n        Font::setTrueTypeFontPath(self::DEFAULT_DIRECTORY);\n        Font::setExtraFontArray([\n            'Arial' => [\n                'x' => 'extrafont.ttf',\n                'xb' => 'extrafontbd.ttf',\n                'xi' => 'extrafonti.ttf',\n                'xbi' => 'extrafontbi.ttf',\n            ],\n        ]);\n        $font = (new StyleFont())->applyFromArray($fontArray);\n        $result = Font::getTrueTypeFontFileFromFont($font);\n        self::assertSame($expected, basename($result));\n    }\n\n    public static function providerOverride(): array\n    {\n        return [\n            ['extrafont.ttf', ['name' => 'Arial']],\n            ['extrafontbd.ttf', ['name' => 'Arial', 'bold' => true]],\n            ['extrafonti.ttf', ['name' => 'Arial', 'italic' => true]],\n            ['extrafontbi.ttf', ['name' => 'Arial', 'bold' => true, 'italic' => true]],\n            ['cour.ttf', ['name' => 'Courier New']],\n        ];\n    }\n\n    /**\n     * @param array{name?: string, latin?: string, eastAsian?: string, complexScript?: string, bold?: bool, italic?: bool, superscript?: bool, subscript?: bool, underline?: bool|string, strikethrough?: bool, color?: string[], size?: ?int, chartColor?: ChartColor, scheme?: string, cap?: string} $fontArray Array containing style information\n     */\n    #[DataProvider('providerOverrideAbsolute')]\n    public function testOverrideFilenamesAbsolute(string $expected, array $fontArray): void\n    {\n        $realPath = realpath(self::MAC_DIRECTORY) . DIRECTORY_SEPARATOR;\n        Font::setTrueTypeFontPath(self::DEFAULT_DIRECTORY);\n        Font::setExtraFontArray([\n            'Arial' => [\n                'x' => $realPath . 'Arial.ttf',\n                'xb' => $realPath . 'Arial Bold.ttf',\n                'xi' => $realPath . 'Arial Italic.ttf',\n                'xbi' => $realPath . 'Arial Bold Italic.ttf',\n            ],\n        ]);\n        $font = (new StyleFont())->applyFromArray($fontArray);\n        $result = Font::getTrueTypeFontFileFromFont($font);\n        self::assertSame($expected, basename($result));\n    }\n\n    public static function providerOverrideAbsolute(): array\n    {\n        return [\n            'absolute path normal' => ['Arial.ttf', ['name' => 'Arial']],\n            'absolute path bold' => ['Arial Bold.ttf', ['name' => 'Arial', 'bold' => true]],\n            'absolute path italic' => ['Arial Italic.ttf', ['name' => 'Arial', 'italic' => true]],\n            'absolute path bold italic' => ['Arial Bold Italic.ttf', ['name' => 'Arial', 'bold' => true, 'italic' => true]],\n            'non-absolute path uses TrueTypeFontPath' => ['cour.ttf', ['name' => 'Courier New']],\n        ];\n    }\n\n    /**\n     * @param array{name?: string, latin?: string, eastAsian?: string, complexScript?: string, bold?: bool, italic?: bool, superscript?: bool, subscript?: bool, underline?: bool|string, strikethrough?: bool, color?: string[], size?: ?int, chartColor?: ChartColor, scheme?: string, cap?: string} $fontArray Array containing style information\n     */\n    #[DataProvider('providerRecurse')]\n    public function testRecurseFilenames(string $expected, array $fontArray): void\n    {\n        if ($expected === 'exception') {\n            $this->expectException(SSException::class);\n            $this->expectExceptionMessage('TrueType Font file not found');\n        }\n        Font::setTrueTypeFontPath(self::RECURSE_DIRECTORY);\n        $font = (new StyleFont())->applyFromArray($fontArray);\n        $result = Font::getTrueTypeFontFileFromFont($font);\n        self::assertSame($expected, basename($result));\n    }\n\n    public static function providerRecurse(): array\n    {\n        return [\n            'in subdirectory' => ['arial.ttf', ['name' => 'Arial']],\n            'in subdirectory bold' => ['arialbd.ttf', ['name' => 'Arial', 'bold' => true]],\n            'in main directory' => ['cour.ttf', ['name' => 'Courier New']],\n            'not in main or subdirectory' => ['exception', ['name' => 'Courier New', 'bold' => true]],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/FontTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font as StyleFont;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FontTest extends TestCase\n{\n    const FONT_PRECISION = 1.0E-12;\n\n    public function testGetAutoSizeMethod(): void\n    {\n        $expectedResult = Font::AUTOSIZE_METHOD_APPROX;\n\n        $result = Font::getAutoSizeMethod();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSetAutoSizeMethod(): void\n    {\n        $autosizeMethodValues = [\n            Font::AUTOSIZE_METHOD_EXACT,\n            Font::AUTOSIZE_METHOD_APPROX,\n        ];\n\n        foreach ($autosizeMethodValues as $autosizeMethodValue) {\n            $result = Font::setAutoSizeMethod($autosizeMethodValue);\n            self::assertTrue($result);\n        }\n    }\n\n    public function testSetAutoSizeMethodWithInvalidValue(): void\n    {\n        $unsupportedAutosizeMethod = 'guess';\n\n        $result = Font::setAutoSizeMethod($unsupportedAutosizeMethod);\n        self::assertFalse($result);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFontSizeToPixels')]\n    public function testFontSizeToPixels(float|int $expectedResult, float|int $size): void\n    {\n        $result = Font::fontSizeToPixels($size);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerFontSizeToPixels(): array\n    {\n        return require 'tests/data/Shared/FontSizeToPixels.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerInchSizeToPixels')]\n    public function testInchSizeToPixels(float|int $expectedResult, float|int $size): void\n    {\n        $result = Font::inchSizeToPixels($size);\n        self::assertEqualsWithDelta($expectedResult, $result, self::FONT_PRECISION);\n    }\n\n    public static function providerInchSizeToPixels(): array\n    {\n        return require 'tests/data/Shared/InchSizeToPixels.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCentimeterSizeToPixels')]\n    public function testCentimeterSizeToPixels(float $expectedResult, float $size): void\n    {\n        $result = Font::centimeterSizeToPixels($size);\n        self::assertEqualsWithDelta($expectedResult, $result, self::FONT_PRECISION);\n    }\n\n    public static function providerCentimeterSizeToPixels(): array\n    {\n        return require 'tests/data/Shared/CentimeterSizeToPixels.php';\n    }\n\n    public function testVerdanaRotation(): void\n    {\n        $font = new StyleFont();\n        $font->setName('Verdana')->setSize(10);\n        $width = Font::getTextWidthPixelsApprox('n', $font, 0);\n        self::assertEquals(8, $width);\n        $width = Font::getTextWidthPixelsApprox('n', $font, 45);\n        self::assertEquals(7, $width);\n        $width = Font::getTextWidthPixelsApprox('n', $font, -165);\n        self::assertEquals(4, $width);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCalculateApproximateColumnWidth')]\n    public function testCalculateApproximateColumnWidth(\n        float $expectedWidth,\n        StyleFont $font,\n        string $text,\n        int $rotation,\n        StyleFont $defaultFont,\n        bool $filter,\n        int $indent\n    ): void {\n        $columnWidth = Font::calculateColumnWidth($font, $text, $rotation, $defaultFont, $filter, $indent);\n        self::assertEquals($expectedWidth, $columnWidth);\n    }\n\n    public static function providerCalculateApproximateColumnWidth(): array\n    {\n        return [\n            [13.9966, new StyleFont(), 'Hello World', 0, new StyleFont(), false, 0],\n            [16.2817, new StyleFont(), 'Hello World', 0, new StyleFont(), true, 0],\n            [16.2817, new StyleFont(), 'Hello World', 0, new StyleFont(), false, 1],\n            [18.7097, new StyleFont(), 'Hello World', 0, new StyleFont(), false, 2],\n            [20.9949, new StyleFont(), 'Hello World', 0, new StyleFont(), false, 3],\n            [6.9983, new StyleFont(), \"Hello\\nWorld\", 0, new StyleFont(), false, 0],\n            [9.2834, new StyleFont(), \"Hello\\nWorld\", 0, new StyleFont(), true, 0],\n            [17.5671, new StyleFont(), 'PhpSpreadsheet', 0, new StyleFont(), false, 0],\n            [19.8523, new StyleFont(), 'PhpSpreadsheet', 0, new StyleFont(), false, 1],\n            'CJK characters width must be >= 43.00' => [55.2722, new StyleFont(), '如果某一列是CJK 其中的一种，这样的设置方式无效', 0, new StyleFont(), false, 0],\n            'non-CJK characters width must be >= 24.73' => [31.7065, new StyleFont(), 'abcdefghijklmnopqrstuvwxyz', 0, new StyleFont(), false, 0],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Issue1324Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv as CsvWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue1324Test extends AbstractFunctional\n{\n    public function testPrecision(): void\n    {\n        $string1 = '753.149999999999';\n        $s1 = (float) $string1;\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($s1);\n        self::assertNotSame(753.15, $sheet->getCell('A1')->getValue());\n        $formats = ['Csv', 'Xlsx', 'Xls', 'Ods', 'Html'];\n        foreach ($formats as $format) {\n            $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n            $rsheet = $reloadedSpreadsheet->getActiveSheet();\n            $s2 = $rsheet->getCell('A1')->getValue();\n            self::assertSame($s1, $s2, \"difference for $format\");\n            $reloadedSpreadsheet->disconnectWorksheets();\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCsv(): void\n    {\n        $string1 = '753.149999999999';\n        $s1 = (float) $string1;\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($s1);\n        $writer = new CsvWriter($spreadsheet);\n        ob_start();\n        $writer->save('php://output');\n        $output = (string) ob_get_clean();\n        self::assertStringContainsString($string1, $output);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testLessPrecision(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $inArray = [\n            [123.4, 753.149999999999, 12.04, 224.245],\n            [12345.6789, 44125.62188657407387],\n            [true, 16, 'hello'],\n            [753.149999999999, 44125.62188657407387],\n        ];\n        $sheet->fromArray($inArray, null, 'A1', true);\n        $sheet->getStyle('A4:B4')->getNumberFormat()\n            ->setFormatCode('#.##');\n        $precise = $sheet->toArray();\n        $expectedPrecise = [\n            ['123.40000000000001', '753.14999999999895', '12.039999999999999', '224.245'],\n            ['12345.67890000000079', '44125.62188657407387', null, null],\n            ['TRUE', '16', 'hello', null],\n            ['753.15', '44125.62', null, null],\n        ];\n        self::assertSame($expectedPrecise, $precise);\n        $lessPrecise = $sheet->toArray(lessFloatPrecision: true);\n        $expectedLessPrecise = [\n            ['123.4', '753.15', '12.04', '224.245'],\n            ['12345.6789', '44125.621886574', null, null],\n            ['TRUE', '16', 'hello', null],\n            ['753.15', '44125.62', null, null],\n        ];\n        self::assertSame($expectedLessPrecise, $lessPrecise);\n        $spreadsheet->disconnectWorksheets();\n        $preg = '/^[-+]?\\d+[.]\\d+$/';\n        $diffs = [];\n        for ($i = 0; $i < 2; ++$i) {\n            $preciseRow = $precise[$i];\n            $lessPreciseRow = $lessPrecise[$i];\n            $entries = count($preciseRow);\n            for ($j = 0; $j < $entries; ++$j) {\n                $comparand1 = $preciseRow[$j];\n                $comparand2 = $lessPreciseRow[$j];\n                if (preg_match($preg, $comparand1 ?? '') && preg_match($preg, $comparand2 ?? '')) {\n                    $comparand1 = (float) $comparand1;\n                    $comparand2 = (float) $comparand2;\n                }\n                if ($comparand1 !== $comparand2) {\n                    $diffs[] = [$i, $j];\n                }\n            }\n        }\n        self::assertSame([[0, 1], [1, 1]], $diffs, 'cells which do not evaluate to same float value');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Issue347Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass Issue347Test extends AbstractFunctional\n{\n    public function readerPreserveCr(BaseReader $reader): void\n    {\n        $binder = new DefaultValueBinder();\n        $binder->setPreserveCr(true);\n        $reader->setValueBinder($binder);\n    }\n\n    #[DataProvider('providerType')]\n    public function testPreserveCr(string $format): void\n    {\n        $s1 = \"AB\\r\\nC\\tD\";\n        $spreadsheet = new Spreadsheet();\n        $binder = new DefaultValueBinder();\n        $binder->setPreserveCr(true);\n        $spreadsheet->setValueBinder($binder);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($s1);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format, readerCustomizer: $this->readerPreserveCr(...));\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $s2 = $rsheet->getCell('A1')->getValue();\n        self::assertSame($s1, $s2);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    #[DataProvider('providerType')]\n    public function testNoPreserveCr(string $format): void\n    {\n        $s1 = \"AB\\r\\nC\\tD\";\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($s1);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $s2 = $rsheet->getCell('A1')->getValue();\n        self::assertNotEquals($s1, $s2);\n        self::assertSame(\"AB\\nC\\tD\", $s2);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerType(): array\n    {\n        return [['Xls'], ['Xlsx'], ['Ods']];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Issue4696Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4696Test extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    #[DataProvider('providerIsDateTime')]\n    public function testIsDateTime(bool $expectedResult, string $expectedFormatted, int|float|string $value): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        if (is_string($value) && $value[0] !== '=') {\n            $sheet->getCell('A1')->setValueExplicit($value, DataType::TYPE_STRING);\n        } else {\n            $sheet->getCell('A1')->setValue($value);\n        }\n        $sheet->getStyle('A1')->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd');\n        self::assertSame(\n            $expectedResult,\n            Date::isDateTime($sheet->getCell('A1'))\n        );\n        self::assertSame(\n            $expectedFormatted,\n            $sheet->getCell('A1')->getFormattedValue()\n        );\n    }\n\n    public static function providerIsDateTime(): array\n    {\n        return [\n            'valid integer' => [true, '1903-12-31', 1461],\n            'valid integer stored as string' => [true, '1904-01-01', '1462'],\n            'valid integer stored as concatenated string' => [true, '1904-01-01', '=\"14\"&\"62\"'],\n            'valid float' => [true, '1903-12-31', 1461.5],\n            'valid float stored as string' => [true, '1903-12-31', '1461.5'],\n            'out-of-range integer' => [false, '7000989091802000122', 7000989091802000122],\n            'out-of-range float' => [false, '7.000989091802E+18', 7000989091802000122.1],\n            'out-of-range float stored as string' => [false, '7000989091802000122.1', '7000989091802000122.1'],\n            'non-numeric' => [false, 'xyz', 'xyz'],\n            'issue 917' => [false, '5e8630b8-603c-43fe-b038-6154a3f893ab', '5e8630b8-603c-43fe-b038-6154a3f893ab'],\n        ];\n    }\n\n    #[DataProvider('providerOtherFunctions')]\n    public function testOtherFunctions(string $function): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(7000989091802000122);\n        $sheet->getCell('A3')->setValue(39107); // 2007-01-25\n        $sheet->getCell('A4')->setValue(39767); // 2008-11-15\n        $sheet->getCell('A5')->setValue(2);\n        $sheet->getCell('A6')->setValue(1);\n        $sheet->getCell('B1')->setValue($function);\n        self::assertSame(\n            '#NUM!',\n            $sheet->getCell('B1')->getFormattedValue()\n        );\n    }\n\n    public static function providerOtherFunctions(): array\n    {\n        return [\n            ['=YEAR(A1)'],\n            ['=MONTH(A1)'],\n            ['=DAY(A1)'],\n            ['=DAYS(A1,A1)'],\n            ['=DAYS360(A1,A1)'],\n            ['=DATEDIF(A1,A1,\"D\")'],\n            ['=HOUR(A1)'],\n            ['=MINUTE(A1)'],\n            ['=SECOND(A1)'],\n            ['=WEEKNUM(A1)'],\n            ['=ISOWEEKNUM(A1)'],\n            ['=WEEKDAY(A1)'],\n            ['=COUPDAYBS(A1,A4,A5,A6)'],\n            ['=COUPDAYS(A3,A2,A5,A6)'],\n            ['=COUPDAYSNC(A3,A2,A5,A6)'],\n            ['=COUPNCD(A3,A2,A5,A6)'],\n            ['=COUPNUM(A3,A2,A5,A6)'],\n            ['=COUPPCD(A3,A2,A5,A6)'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/OLEPhpunit10Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * There were problems running these tests in OLETest with PhpUnit 10.\n * These replacements seem to work.\n */\nclass OLEPhpunit10Test extends TestCase\n{\n    private static string $errorString;\n\n    protected function setUp(): void\n    {\n        self::$errorString = '';\n        set_error_handler([self::class, 'errorHandler']);\n    }\n\n    protected function tearDown(): void\n    {\n        restore_error_handler();\n    }\n\n    public static function errorHandler(int $errno, string $errstr): bool\n    {\n        if ($errno === E_USER_WARNING) {\n            self::$errorString = $errstr;\n\n            return true; // stop error handling\n        }\n\n        return false; // continue error handling\n    }\n\n    public function testChainedWriteMode(): void\n    {\n        self::assertSame('', self::$errorString);\n        $ole = new OLE\\ChainedBlockStream();\n        $openedPath = '';\n        self::assertFalse($ole->stream_open('whatever', 'w', 0, $openedPath));\n\n        $ole->stream_open('whatever', 'w', STREAM_REPORT_ERRORS, $openedPath);\n        self::assertSame('Only reading is supported', self::$errorString);\n    }\n\n    public function testChainedBadPath(): void\n    {\n        self::assertSame('', self::$errorString);\n        $ole = new OLE\\ChainedBlockStream();\n        $openedPath = '';\n        self::assertFalse($ole->stream_open('whatever', 'r', 0, $openedPath));\n\n        $ole->stream_open('whatever', 'r', STREAM_REPORT_ERRORS, $openedPath);\n        self::assertSame('OLE stream not found', self::$errorString);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/OLEReadTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLERead;\nuse PHPUnit\\Framework\\TestCase;\n\nclass OLEReadTest extends TestCase\n{\n    public function testReadOleStreams(): void\n    {\n        $dataDir = 'tests/data/Shared/OLERead/';\n        $ole = new OLERead();\n        $ole->read('tests/data/Reader/XLS/sample.xls');\n        self::assertEquals(\n            file_get_contents($dataDir . 'wrkbook'),\n            $ole->getStream($ole->wrkbook)\n        );\n        self::assertEquals(\n            file_get_contents($dataDir . 'summary'),\n            $ole->getStream($ole->summaryInformation)\n        );\n        self::assertEquals(\n            file_get_contents($dataDir . 'document'),\n            $ole->getStream($ole->documentSummaryInformation)\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/OLETest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\OLE;\nuse PHPUnit\\Framework\\TestCase;\n\nclass OLETest extends TestCase\n{\n    public function testReadNotOle(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('File doesn\\'t seem to be an OLE container.');\n        $ole = new OLE();\n        $ole->read(__FILE__);\n    }\n\n    public function testReadNotExist(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Can\\'t open file');\n        $ole = new OLE();\n        $ole->read(__FILE__ . '.xxx');\n    }\n\n    public function testReadOleStreams(): void\n    {\n        $dataDir = 'tests/data/Shared/OLERead/';\n        $ole = new OLE();\n        $oleData = $ole->read('tests/data/Reader/XLS/sample.xls');\n        self::assertEquals(\n            file_get_contents($dataDir . 'wrkbook'),\n            $oleData\n        );\n        self::assertSame(512, $ole->bigBlockSize);\n        self::assertSame(64, $ole->smallBlockSize);\n        self::assertSame(4096, $ole->bigBlockThreshold);\n        self::assertSame(1024, $ole->getBlockOffset(1));\n    }\n\n    // testChainedWriteMode moved to OLEPhpunit10Test\n    // testChainedBadPath moved to OLEPhpunit10Test\n\n    public function testOleFunctions(): void\n    {\n        $ole = new OLE();\n        $infile = 'tests/data/Reader/XLS/pr.4687.excel.xls';\n        $ole->read($infile);\n        self::assertSame(4, $ole->ppsTotal());\n        self::assertFalse($ole->isFile(0), 'root entry');\n        self::assertTrue($ole->isFile(1), 'workbook');\n        self::assertTrue($ole->isFile(2), 'summary information');\n        self::assertTrue($ole->isFile(3), 'document summary information');\n        self::assertFalse($ole->isFile(4), 'no such index');\n        self::assertTrue($ole->isRoot(0), 'root entry');\n        self::assertFalse($ole->isRoot(1), 'workbook');\n        self::assertFalse($ole->isRoot(2), 'summary information');\n        self::assertFalse($ole->isRoot(3), 'document summary information');\n        self::assertFalse($ole->isRoot(4), 'no such index');\n        self::assertSame(0, $ole->getDataLength(0), 'root entry');\n        self::assertSame(15712, $ole->getDataLength(1), 'workbook');\n        self::assertSame(4096, $ole->getDataLength(2), 'summary information');\n        self::assertSame(4096, $ole->getDataLength(3), 'document summary information');\n        self::assertSame(0, $ole->getDataLength(4), 'no such index');\n        self::assertSame('', $ole->getData(2, -1, 4), 'negative position');\n        self::assertSame('', $ole->getData(2, 5000, 4), 'position > length');\n        self::assertSame('feff0000', bin2hex($ole->getData(2, 0, 4)));\n        self::assertSame('', $ole->getData(4, 0, 4), 'no such index');\n    }\n\n    public function testBadEndian(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Only Little-Endian encoding is supported');\n        $ole = new OLE();\n        $infile = 'tests/data/Reader/XLS/pr.4687.excel.badendian.xls';\n        $ole->read($infile);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\PasswordHasher;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PasswordHasherTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerHashPassword')]\n    public function testHashPassword(\n        string $expectedResult,\n        string $password,\n        ?string $algorithm = null,\n        ?string $salt = null,\n        ?int $spinCount = null\n    ): void {\n        if ($expectedResult === 'exception') {\n            $this->expectException(SpException::class);\n        }\n        if ($algorithm === null) {\n            $result = PasswordHasher::hashPassword($password);\n        } elseif ($salt === null) {\n            $result = PasswordHasher::hashPassword($password, $algorithm);\n        } elseif ($spinCount === null) {\n            $result = PasswordHasher::hashPassword($password, $algorithm, $salt);\n        } else {\n            $result = PasswordHasher::hashPassword($password, $algorithm, $salt, $spinCount);\n        }\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerHashPassword(): array\n    {\n        return require 'tests/data/Shared/PasswordHashes.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\PasswordHasher;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass PasswordReloadTest extends AbstractFunctional\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPasswords')]\n    public function testPasswordReload(string $format, string $algorithm, bool $supported = true): void\n    {\n        $password = 'hello';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $protection = $sheet->getProtection();\n        $protection->setAlgorithm($algorithm);\n        $protection->setPassword($password);\n        $protection->setSheet(true);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format);\n        $resheet = $reloadedSpreadsheet->getActiveSheet();\n        $reprot = $resheet->getProtection();\n        $repassword = $reprot->getPassword();\n        $hash = '';\n        if ($supported) {\n            $readAlgorithm = $reprot->getAlgorithm();\n            self::assertSame($algorithm, $readAlgorithm);\n            $salt = $reprot->getSalt();\n            $spin = $reprot->getSpinCount();\n            $hash = PasswordHasher::hashPassword($password, $readAlgorithm, $salt, $spin);\n        }\n        self::assertSame($repassword, $hash);\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerPasswords(): array\n    {\n        return [\n            'Xls basic algorithm' => ['Xls', ''],\n            'Xls cannot use SHA512' => ['Xls', 'SHA-512', false],\n            'Xlsx basic algorithm' => ['Xlsx', ''],\n            'Xlsx can use SHA512' => ['Xlsx', 'SHA-512'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/SpgrContainerTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SpgrContainerTest extends TestCase\n{\n    public function testParent(): void\n    {\n        $container = new SpgrContainer();\n        $contained = new SpgrContainer();\n        $contained->setParent($container);\n        self::assertSame($container, $contained->getParent());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/StringHelperInvalidCharTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StringHelperInvalidCharTest extends TestCase\n{\n    public function testInvalidChar(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $substitution = '�';\n        $array = [\n            ['Normal string', 'Hello', 'Hello'],\n            ['integer', 2, 2],\n            ['float', 2.1, 2.1],\n            ['boolean true', true, true],\n            ['illegal FFFE/FFFF', \"H\\xef\\xbf\\xbe\\xef\\xbf\\xbfello\", \"H{$substitution}{$substitution}ello\"],\n            ['illegal character', \"H\\xef\\x00\\x00ello\", \"H{$substitution}\\x00\\x00ello\"],\n            ['overlong character', \"H\\xc0\\xa0ello\", \"H{$substitution}{$substitution}ello\"],\n            ['Osmanya as single character', \"H\\xf0\\x90\\x90\\x80ello\", 'H𐐀ello'],\n            ['Osmanya as surrogate pair (x)', \"\\xed\\xa0\\x81\\xed\\xb0\\x80\", \"{$substitution}{$substitution}{$substitution}{$substitution}{$substitution}{$substitution}\"],\n            ['Osmanya as surrogate pair (u)', \"\\u{d801}\\u{dc00}\", \"{$substitution}{$substitution}{$substitution}{$substitution}{$substitution}{$substitution}\"],\n            ['Half surrogate pair (u)', \"\\u{d801}\", \"{$substitution}{$substitution}{$substitution}\"],\n            ['Control character', \"\\u{7}\", \"\\u{7}\"],\n        ];\n\n        $sheet->fromArray($array);\n        $row = 0;\n        foreach ($array as $value) {\n            self::assertSame($value[1] === $value[2], StringHelper::isUTF8((string) $value[1]));\n            ++$row;\n            $expected = $value[2];\n            self::assertIsString($sheet->getCell(\"A$row\")->getValue());\n            self::assertSame(\n                $expected,\n                $sheet->getCell(\"B$row\")->getValue(),\n                $sheet->getCell(\"A$row\")->getValue()\n            );\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/StringHelperLocale2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StringHelperLocale2Test extends TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    protected function tearDown(): void\n    {\n        StringHelper::setLocale(null);\n        $this->spreadsheet->disconnectWorksheets();\n        unset($this->spreadsheet);\n    }\n\n    #[DataProvider('providerIntlLocales')]\n    public function testIntlLocales(bool|string $expectedResult, string $expectedTrue, ?string $locale): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $number = 12345.67;\n        $numberFormat = '[$]#,##0.0';\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[$number]]);\n        $sheet->getStyle('A1')->getNumberFormat()\n            ->setFormatCode($numberFormat);\n        $success = StringHelper::setLocale($locale);\n        if ($success === false) {\n            self::assertFalse($expectedResult);\n        } else {\n            $result = $sheet->getCell('A1')->getFormattedValue();\n            self::assertSame($expectedResult, $result);\n            self::assertSame($expectedTrue, Calculation::getTRUE());\n        }\n    }\n\n    /**\n     * The data here are somewhat volatile.\n     * They may change with any new release of ICU.\n     */\n    public static function providerIntlLocales(): array\n    {\n        $nbsp = \"\\u{A0}\";\n        $nnbsp = \"\\u{202F}\";\n        $rsquo = \"\\u{2019}\";\n\n        return [\n            [false, 'TRUE', 'unknownlocale'],\n            [\"¤12{$nbsp}345,7\", 'SANT', 'sv'],\n            ['$12,345.7', 'TRUE', 'en_US'],\n            'lowercase country' => [\"€12{$nnbsp}345,7\", 'VRAI', 'fr_fr'],\n            'reset if locale is null' => ['$12,345.7', 'TRUE', null],\n            [\"CHF12{$rsquo}345.7\", 'VERO', 'it_CH'],\n            'ignore utf-8' => ['د.ك.‏12٬345٫7', 'TRUE', 'ar_KW.UTF-8'],\n            'non-Latin' => [\"₽12{$nbsp}345,7\", 'ИСТИНА', 'ru_ru'],\n        ];\n    }\n\n    public function testNoIntl(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $number = 12345.67;\n        $numberFormat = '[$]#,##0.0';\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[$number]]);\n        $sheet->getStyle('A1')->getNumberFormat()\n            ->setFormatCode($numberFormat);\n        $success = StringHelperNoIntl::setLocale('en_US');\n        self::assertFalse($success);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/StringHelperLocaleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StringHelperLocaleTest extends TestCase\n{\n    /**\n     * @var false|string\n     */\n    private $currentLocale;\n\n    protected function setUp(): void\n    {\n        $this->currentLocale = setlocale(LC_ALL, '0');\n        StringHelper::setCurrencyCode(null);\n    }\n\n    protected function tearDown(): void\n    {\n        if (is_string($this->currentLocale)) {\n            setlocale(LC_ALL, $this->currentLocale);\n        }\n        StringHelper::setCurrencyCode(null);\n    }\n\n    public function testCurrency(): void\n    {\n        $currentLocale = ($this->currentLocale === false) ? null : $this->currentLocale;\n        if ($this->currentLocale === false || !setlocale(LC_ALL, 'de_DE.UTF-8', 'deu_deu.utf8')) {\n            self::markTestSkipped('Unable to set German UTF8 locale for testing.');\n        }\n        $result = StringHelper::getCurrencyCode();\n        self::assertSame('€', $result);\n        if (!setlocale(LC_ALL, $currentLocale)) {\n            self::markTestSkipped('Unable to restore default locale.');\n        }\n        $result = StringHelper::getCurrencyCode();\n        self::assertSame('€', $result, 'result persists despite locale change');\n        StringHelper::setCurrencyCode(null);\n        $result = StringHelper::getCurrencyCode();\n        self::assertSame('$', $result, 'locale now used');\n        StringHelper::setCurrencyCode(null);\n        if (!setlocale(LC_ALL, 'deu_deu', 'de_DE@euro')) {\n            self::markTestSkipped('Unable to set German single-byte locale for testing.');\n        }\n        $result = StringHelper::getCurrencyCode(true); // trim if alt symbol is used\n        self::assertSame('EUR', $result, 'non-UTF8 result ignored');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/StringHelperNoIconv.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass StringHelperNoIconv extends StringHelper\n{\n    protected static ?bool $isIconvEnabled = null;\n\n    protected static string $iconvName = 'simulateIconvUnavilable';\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/StringHelperNoIconv2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass StringHelperNoIconv2 extends StringHelper\n{\n    protected static ?bool $isIconvEnabled = null;\n\n    protected static bool $iconvTest2 = true;\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/StringHelperNoIconv3.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass StringHelperNoIconv3 extends StringHelper\n{\n    protected static ?bool $isIconvEnabled = null;\n\n    protected static bool $iconvTest3 = true;\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/StringHelperNoIntl.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\n\nclass StringHelperNoIntl extends StringHelper\n{\n    protected static string $testClass = 'simulateIntlUnavilable';\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/StringHelperTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StringHelperTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        StringHelper::setLocale(null);\n    }\n\n    public function testGetIsIconvEnabled(): void\n    {\n        $result = StringHelper::getIsIconvEnabled();\n        self::assertTrue($result);\n    }\n\n    public function testGetDecimalSeparator(): void\n    {\n        $localeconv = localeconv();\n\n        $expectedResult = (!empty($localeconv['decimal_point'])) ? $localeconv['decimal_point'] : ',';\n        $result = StringHelper::getDecimalSeparator();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSetDecimalSeparator(): void\n    {\n        $expectedResult = ',';\n        StringHelper::setDecimalSeparator($expectedResult);\n\n        $result = StringHelper::getDecimalSeparator();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testGetThousandsSeparator(): void\n    {\n        $localeconv = localeconv();\n\n        $expectedResult = (!empty($localeconv['thousands_sep'])) ? $localeconv['thousands_sep'] : ',';\n        $result = StringHelper::getThousandsSeparator();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSetThousandsSeparator(): void\n    {\n        $expectedResult = ' ';\n        StringHelper::setThousandsSeparator($expectedResult);\n\n        $result = StringHelper::getThousandsSeparator();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testGetCurrencyCode(): void\n    {\n        $localeconv = localeconv();\n        $expectedResult = (!empty($localeconv['currency_symbol']) ? $localeconv['currency_symbol'] : (!empty($localeconv['int_curr_symbol']) ? $localeconv['int_curr_symbol'] : '$'));\n        $result = StringHelper::getCurrencyCode();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSetCurrencyCode(): void\n    {\n        $expectedResult = '£';\n        StringHelper::setCurrencyCode($expectedResult);\n\n        $result = StringHelper::getCurrencyCode();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testControlCharacterPHP2OOXML(): void\n    {\n        $expectedResult = 'foo_x000B_bar';\n        $result = StringHelper::controlCharacterPHP2OOXML('foo' . chr(11) . 'bar');\n\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testControlCharacterOOXML2PHP(): void\n    {\n        $expectedResult = 'foo' . chr(11) . 'bar';\n        $result = StringHelper::controlCharacterOOXML2PHP('foo_x000B_bar');\n\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSYLKtoUTF8(): void\n    {\n        $expectedResult = 'foo' . chr(11) . 'bar';\n        $result = StringHelper::SYLKtoUTF8(\"foo\\x1B ;bar\");\n\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testIssue3900(): void\n    {\n        StringHelper::setDecimalSeparator('.');\n        StringHelper::setThousandsSeparator('');\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1.4);\n        $sheet->setCellValue('B1', 1004.5);\n        $sheet->setCellValue('C1', 1000000.5);\n\n        ob_start();\n        $ioWriter = new Csv($spreadsheet);\n        $ioWriter->setDelimiter(';');\n        $ioWriter->save('php://output');\n        $output = ob_get_clean();\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame('\"1.4\";\"1004.5\";\"1000000.5\"' . PHP_EOL, $output);\n    }\n\n    public function testNonStringable(): void\n    {\n        $dt = new DateTime();\n        self::assertSame('', StringHelper::convertToString($dt, false));\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Unable to convert to string');\n        StringHelper::convertToString($dt);\n    }\n\n    public function testNoIconv(): void\n    {\n        $string = \"\\xBF\"; // inverted question mark in ISO-8859-1\n        $expected = '¿';\n        $from = 'ISO-8859-1';\n        $to = 'UTF-8';\n        self::assertSame($expected, StringHelper::convertEncoding($string, $to, $from));\n        self::assertSame('EUR', StringHelper::convertEncoding('€', 'ISO-8859-1', 'UTF-8'), 'transliterated');\n        self::assertSame($expected, StringHelperNoIconv::convertEncoding($string, $to, $from));\n        self::assertSame('?', StringHelperNoIconv::convertEncoding('€', 'ISO-8859-1', 'UTF-8'), 'using MB so no transliteration - just return question mark');\n        self::assertSame($expected, StringHelperNoIconv2::convertEncoding($string, $to, $from));\n        self::assertSame('?', StringHelperNoIconv2::convertEncoding('€', 'ISO-8859-1', 'UTF-8'), 'using MB so no transliteration - just return question mark');\n        self::assertSame($expected, StringHelperNoIconv3::convertEncoding($string, $to, $from));\n        self::assertSame('?', StringHelperNoIconv3::convertEncoding('€', 'ISO-8859-1', 'UTF-8'), 'using MB so no transliteration - just return question mark');\n\n        $noTransliteration = 'ﾂ';\n        // There is inconsistency in how //TRANSLIT operates.\n        // On some systems, '?' seems to be used if there is\n        // no other transliteration available.\n        $ignoreResult = '?';\n        if (StringHelper::getIsIconvEnabled()) {\n            $ignoreResult = iconv('UTF-8', 'ISO-8859-1//IGNORE//TRANSLIT', $noTransliteration);\n            self::assertContains($ignoreResult, ['', '?']);\n        }\n        self::assertSame($ignoreResult, StringHelper::convertEncoding($noTransliteration, 'ISO-8859-1', 'UTF-8'), 'no transliteration available');\n        self::assertSame('', StringHelper::convertEncoding($noTransliteration, 'ISO-8859-1', 'UTF-8', '//IGNORE'), 'TRANSLIT not used');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/TimeZoneTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse DateTime;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\TimeZone;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TimeZoneTest extends TestCase\n{\n    private string $tztimezone;\n\n    private ?DateTimeZone $dttimezone;\n\n    protected function setUp(): void\n    {\n        $this->tztimezone = TimeZone::getTimeZone();\n        $this->dttimezone = Date::getDefaultTimeZoneOrNull();\n    }\n\n    protected function tearDown(): void\n    {\n        TimeZone::setTimeZone($this->tztimezone);\n        Date::setDefaultTimeZone($this->dttimezone);\n    }\n\n    public function testSetTimezone(): void\n    {\n        $timezoneValues = [\n            'Europe/Prague',\n            'Asia/Tokyo',\n            'America/Indiana/Indianapolis',\n            'Pacific/Honolulu',\n            'Atlantic/St_Helena',\n        ];\n\n        foreach ($timezoneValues as $timezoneValue) {\n            $result = TimeZone::setTimezone($timezoneValue);\n            self::assertTrue($result);\n            $result = Date::setDefaultTimezone($timezoneValue);\n            self::assertTrue($result);\n        }\n    }\n\n    public function testSetTimezoneBackwardCompatible(): void\n    {\n        $bcTimezone = 'Etc/GMT-10';\n        $result = TimeZone::setTimezone($bcTimezone);\n        self::assertTrue($result);\n        $result = Date::setDefaultTimezone($bcTimezone);\n        self::assertTrue($result);\n    }\n\n    public function testSetTimezoneWithInvalidValue(): void\n    {\n        $unsupportedTimezone = 'XEtc/GMT+10';\n        $result = TimeZone::setTimezone($unsupportedTimezone);\n        self::assertFalse($result);\n        $result = Date::setDefaultTimezone($unsupportedTimezone);\n        self::assertFalse($result);\n    }\n\n    public function testTimeZoneAdjustmentsInvalidTz(): void\n    {\n        $this->expectException(\\PhpOffice\\PhpSpreadsheet\\Exception::class);\n        $dtobj = DateTime::createFromFormat('Y-m-d H:i:s', '2008-09-22 00:00:00');\n        if ($dtobj === false) {\n            self::fail('DateTime createFromFormat failed');\n        } else {\n            $tstmp = $dtobj->getTimestamp();\n            $unsupportedTimeZone = 'XEtc/GMT+10';\n            TimeZone::getTimeZoneAdjustment($unsupportedTimeZone, $tstmp);\n        }\n    }\n\n    public function testTimeZoneAdjustments(): void\n    {\n        $dtobj = DateTime::createFromFormat('Y-m-d H:i:s', '2008-01-01 00:00:00');\n        if ($dtobj === false) {\n            self::fail('DateTime createFromFormat failed');\n        } else {\n            $tstmp = $dtobj->getTimestamp();\n            $supportedTimeZone = 'UTC';\n            $adj = TimeZone::getTimeZoneAdjustment($supportedTimeZone, $tstmp);\n            self::assertEquals(0, $adj);\n            $supportedTimeZone = 'America/Toronto';\n            $adj = TimeZone::getTimeZoneAdjustment($supportedTimeZone, $tstmp);\n            self::assertEquals(-18000, $adj);\n            $supportedTimeZone = 'America/Chicago';\n            TimeZone::setTimeZone($supportedTimeZone);\n            $adj = TimeZone::getTimeZoneAdjustment(null, $tstmp);\n            self::assertEquals(-21600, $adj);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Trend/BestFitTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared\\Trend;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\Trend;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BestFitTest extends TestCase\n{\n    private const LBF_PRECISION = 1.0E-4;\n\n    public function testBestFit(): void\n    {\n        $xValues = [45, 55, 47, 75, 90, 100, 100, 95, 88, 50, 45, 58];\n        $yValues = [15, 25, 17, 30, 41, 47, 50, 46, 37, 22, 20, 26];\n        $maxGoodness = -1000.0;\n        $maxType = '';\n\n        $type = Trend::TREND_LINEAR;\n        $result = Trend::calculate($type, $yValues, $xValues);\n        $goodness = $result->getGoodnessOfFit();\n        if ($maxGoodness < $goodness) {\n            $maxGoodness = $goodness;\n            $maxType = $type;\n        }\n        self::assertEqualsWithDelta(0.9628, $goodness, self::LBF_PRECISION);\n\n        $type = Trend::TREND_EXPONENTIAL;\n        $result = Trend::calculate($type, $yValues, $xValues);\n        $goodness = $result->getGoodnessOfFit();\n        if ($maxGoodness < $goodness) {\n            $maxGoodness = $goodness;\n            $maxType = $type;\n        }\n        self::assertEqualsWithDelta(0.9952, $goodness, self::LBF_PRECISION);\n\n        $type = Trend::TREND_LOGARITHMIC;\n        $result = Trend::calculate($type, $yValues, $xValues);\n        $goodness = $result->getGoodnessOfFit();\n        if ($maxGoodness < $goodness) {\n            $maxGoodness = $goodness;\n            $maxType = $type;\n        }\n        self::assertEqualsWithDelta(-0.0724, $goodness, self::LBF_PRECISION);\n        self::assertEqualsWithDelta(0.3116, $result->getValueOfXForY(2.1), self::LBF_PRECISION);\n        $equation = $result->getEquation();\n        $match = preg_match('/^Y = 0[.]01765\\d+ [*] log[(]2.1205\\d+ [*] X[)]$/', $equation);\n        self::assertSame(1, $match, $equation);\n\n        $type = Trend::TREND_POWER;\n        $result = Trend::calculate($type, $yValues, $xValues);\n        $goodness = $result->getGoodnessOfFit();\n        if ($maxGoodness < $goodness) {\n            $maxGoodness = $goodness;\n            $maxType = $type;\n        }\n        self::assertEqualsWithDelta(0.9946, $goodness, self::LBF_PRECISION);\n        self::assertEqualsWithDelta(28.0886, $result->getValueOfXForY(10.0), self::LBF_PRECISION);\n        $equation = $result->getEquation();\n        $match = preg_match('/^Y = 0[.]1705\\d+ [*] X\\^1[.]2207\\d+$/', $equation);\n        self::assertSame(1, $match, $equation);\n        self::assertEqualsWithDelta(0.1705, $result->getIntersect(4), self::LBF_PRECISION);\n\n        $type = Trend::TREND_BEST_FIT_NO_POLY;\n        $result = Trend::calculate($type, $yValues, $xValues);\n        $goodness = $result->getGoodnessOfFit();\n        self::assertSame($maxGoodness, $goodness);\n        self::assertSame(lcfirst($maxType), $result->getBestFitType());\n\n        try {\n            $type = Trend::TREND_BEST_FIT;\n            Trend::calculate($type, $yValues, [0, 1, 2]);\n            self::fail('should have failed - mismatched number of elements');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Number of elements', $e->getMessage());\n        }\n\n        try {\n            $type = Trend::TREND_BEST_FIT;\n            Trend::calculate($type, $yValues, $xValues);\n            self::fail('should have failed - TREND_BEST_FIT includes polynomials which are not implemented yet');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('not yet implemented', $e->getMessage());\n        }\n\n        try {\n            $type = 'unknown';\n            Trend::calculate($type, $yValues, $xValues);\n            self::fail('should have failed - invalid trend type');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Unknown trend type', $e->getMessage());\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Trend/ExponentialBestFitTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared\\Trend;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\ExponentialBestFit;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ExponentialBestFitTest extends TestCase\n{\n    private const EBF_PRECISION6 = 1.0E-6;\n    private const EBF_PRECISION5 = 1.0E-5;\n    private const DP = 4;\n\n    /**\n     * @param array<mixed> $expectedSlope\n     * @param array<mixed> $expectedIntersect\n     * @param array<mixed> $expectedGoodnessOfFit\n     * @param array<float> $yValues\n     * @param array<float> $xValues\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerExponentialBestFit')]\n    public function testExponentialBestFit(\n        array $expectedSlope,\n        array $expectedIntersect,\n        array $expectedGoodnessOfFit,\n        mixed $expectedEquation,\n        array $yValues,\n        array $xValues\n    ): void {\n        $bestFit = new ExponentialBestFit($yValues, $xValues);\n        $slope = $bestFit->getSlope(1);\n        self::assertEquals($expectedSlope[0], $slope);\n\n        self::assertFalse($bestFit->getError());\n        self::assertEqualsWithDelta(0.2117, $bestFit->getSlopeSE(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(1.5380, $bestFit->getIntersectSE(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(\n            90.486819,\n            $bestFit->getGoodnessOfFitPercent(),\n            self::EBF_PRECISION6\n        );\n        self::assertEqualsWithDelta(\n            90.4868,\n            $bestFit->getGoodnessOfFitPercent(self::DP),\n            self::EBF_PRECISION5\n        );\n        self::assertEqualsWithDelta(2.3031, $bestFit->getStdevOfResiduals(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(403.6333, $bestFit->getSSRegression(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(42.4353, $bestFit->getSSResiduals(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(8, $bestFit->getDFResiduals(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(76.0938, $bestFit->getF(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(-13.1, $bestFit->getCovariance(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(-0.919, $bestFit->getCorrelation(self::DP), self::EBF_PRECISION5);\n        self::assertEqualsWithDelta(3.51845, $bestFit->getValueOfXForY(10.0), self::EBF_PRECISION5);\n        $values = $bestFit->getYBestFitValues();\n        self::assertCount(10, $values);\n        self::assertEqualsWithDelta(3.965445, $values[0], self::EBF_PRECISION6);\n\n        $slope = $bestFit->getSlope();\n        self::assertEquals($expectedSlope[1], $slope);\n        $intersect = $bestFit->getIntersect(1);\n        self::assertEquals($expectedIntersect[0], $intersect);\n        $intersect = $bestFit->getIntersect();\n        self::assertEquals($expectedIntersect[1], $intersect);\n\n        $equation = $bestFit->getEquation(2);\n        self::assertEquals($expectedEquation, $equation);\n\n        self::assertSame($expectedGoodnessOfFit[0], $bestFit->getGoodnessOfFit(6));\n        self::assertSame($expectedGoodnessOfFit[1], $bestFit->getGoodnessOfFit());\n    }\n\n    public static function providerExponentialBestFit(): array\n    {\n        return require 'tests/data/Shared/Trend/ExponentialBestFit.php';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/Trend/LinearBestFitTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared\\Trend;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\LinearBestFit;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass LinearBestFitTest extends TestCase\n{\n    const LBF_PRECISION = 1.0E-8;\n\n    /**\n     * @param array<mixed> $expectedSlope\n     * @param array<mixed> $expectedIntersect\n     * @param array<mixed> $expectedGoodnessOfFit\n     * @param array<float> $yValues\n     * @param array<float> $xValues\n     */\n    #[DataProvider('providerLinearBestFit')]\n    public function testLinearBestFit(\n        array $expectedSlope,\n        array $expectedIntersect,\n        array $expectedGoodnessOfFit,\n        mixed $expectedEquation,\n        array $yValues,\n        array $xValues,\n        float $xForY,\n    ): void {\n        $bestFit = new LinearBestFit($yValues, $xValues);\n        $slope = $bestFit->getSlope(1);\n        self::assertEqualsWithDelta($expectedSlope[0], $slope, self::LBF_PRECISION);\n        $slope = $bestFit->getSlope();\n        self::assertEqualsWithDelta($expectedSlope[1], $slope, self::LBF_PRECISION);\n        $intersect = $bestFit->getIntersect(1);\n        self::assertEqualsWithDelta($expectedIntersect[0], $intersect, self::LBF_PRECISION);\n        $intersect = $bestFit->getIntersect();\n        self::assertEqualsWithDelta($expectedIntersect[1], $intersect, self::LBF_PRECISION);\n\n        $equation = $bestFit->getEquation(2);\n        self::assertEquals($expectedEquation, $equation);\n\n        self::assertSame($expectedGoodnessOfFit[0], $bestFit->getGoodnessOfFit(6));\n        self::assertSame($expectedGoodnessOfFit[1], $bestFit->getGoodnessOfFit());\n        self::assertEqualsWithDelta($xForY, $bestFit->getValueOfXForY(0.0), self::LBF_PRECISION);\n    }\n\n    public static function providerLinearBestFit(): array\n    {\n        return require 'tests/data/Shared/Trend/LinearBestFit.php';\n    }\n\n    public function testConstructor(): void\n    {\n        $bestFit = new LinearBestFit([1, 2, 3], [4, 5]);\n        self::assertTrue($bestFit->getError());\n        $bestFit = new LinearBestFit([6.0, 8.0, 10.0]);\n        self::assertFalse($bestFit->getError());\n        self::assertSame([6.0, 8.0, 10.0], $bestFit->getYValues());\n        self::assertSame([1.0, 2.0, 3.0], $bestFit->getXValues());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/XMLWriterNoUri.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nclass XMLWriterNoUri extends \\PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter\n{\n    public function openUri(string $uri): bool\n    {\n        return false;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/XlsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Xls as SharedXls;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XlsTest extends TestCase\n{\n    public function testSizes(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([[1, 2], [3, 4]]);\n        $sheet->getColumnDimension('B')->setVisible(false);\n        $sheet->getRowDimension(2)->setVisible(false);\n        self::assertSame(64, SharedXls::sizeCol($sheet, 'A'));\n        self::assertSame(0, SharedXls::sizeCol($sheet, 'B'));\n        self::assertSame(20, SharedXls::sizeRow($sheet, 1));\n        self::assertSame(0, SharedXls::sizeRow($sheet, 2));\n        self::assertNull(SharedXls::oneAnchor2twoAnchor($sheet, 'B1', 0, 0, 100, 100));\n        self::assertNull(SharedXls::oneAnchor2twoAnchor($sheet, 'A2', 0, 0, 100, 100));\n        $expected = [\n            'startCoordinates' => 'D9',\n            'startOffsetX' => 0,\n            'startOffsetY' => 0,\n            'endCoordinates' => 'E13',\n            'endOffsetX' => 576.0,\n            'endOffsetY' => 256,\n        ];\n        self::assertSame($expected, SharedXls::oneAnchor2twoAnchor($sheet, 'D9', 0, 0, 100, 100));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Shared/XmlWriterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Shared;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlWriterTest extends TestCase\n{\n    private bool $debugEnabled;\n\n    protected function setUp(): void\n    {\n        $this->debugEnabled = XMLWriter::$debugEnabled;\n    }\n\n    protected function tearDown(): void\n    {\n        XMLWriter::$debugEnabled = $this->debugEnabled;\n    }\n\n    public function testUnserialize(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Unserialize not permitted');\n        $className = XMLWriter::class;\n        $classLen = strlen($className);\n        $text = \"O:$classLen:\\\"$className\\\":1:{\";\n        $text2 = \"\\x00$className\\x00tempFileName\";\n        $text2Len = strlen($text2);\n        $text .= \"s:$text2Len:\\\"$text2\\\"\";\n        $text .= ';s:0:\"\";}';\n        unserialize($text);\n    }\n\n    public function testDebugEnabled(): void\n    {\n        XMLWriter::$debugEnabled = true;\n        $indent = ' ';\n        $indentnl = \"\\n\";\n        $objWriter = new XMLWriter();\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n        $expected = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>' . \"\\n\";\n        $objWriter->startElement('root');\n        $expected .= '<root>' . $indentnl;\n        $objWriter->startElement('node');\n        $expected .= $indent . '<node>';\n        $objWriter->writeRawData('xyz');\n        $expected .= 'xyz';\n        $objWriter->writeRawData(null);\n        $objWriter->writeRawData(['12', '34', '5']);\n        $expected .= \"12\\n34\\n5\";\n        $objWriter->endElement(); // node\n        $expected .= '</node>' . $indentnl;\n        $objWriter->endElement(); // root\n        $expected .= '</root>' . $indentnl;\n        self::assertSame($expected, $objWriter->getData());\n    }\n\n    public function testDiskCache(): void\n    {\n        XMLWriter::$debugEnabled = false;\n        $indent = '';\n        $indentnl = '';\n        $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK);\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n        $expected = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>' . \"\\n\";\n        $objWriter->startElement('root');\n        $expected .= '<root>' . $indentnl;\n        $objWriter->startElement('node');\n        $expected .= $indent . '<node>';\n        $objWriter->writeRawData('xyz');\n        $expected .= 'xyz';\n        $objWriter->writeRawData(null);\n        $objWriter->writeRawData(['12', '34', '5']);\n        $expected .= \"12\\n34\\n5\";\n        $objWriter->endElement(); // node\n        $expected .= '</node>' . $indentnl;\n        $objWriter->endElement(); // root\n        $expected .= '</root>' . $indentnl;\n        self::assertSame($expected, $objWriter->getData());\n    }\n\n    public function testFallbackToMemory(): void\n    {\n        XMLWriter::$debugEnabled = false;\n        $indent = '';\n        $indentnl = '';\n        $objWriter = new XMLWriterNoUri(XMLWriter::STORAGE_DISK);\n        $objWriter->startDocument('1.0', 'UTF-8', 'yes');\n        $expected = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>' . \"\\n\";\n        $objWriter->startElement('root');\n        $expected .= '<root>' . $indentnl;\n        $objWriter->startElement('node');\n        $expected .= $indent . '<node>';\n        $objWriter->writeRawData('xyz');\n        $expected .= 'xyz';\n        $objWriter->writeRawData(null);\n        $objWriter->writeRawData(['12', '34', '5']);\n        $expected .= \"12\\n34\\n5\";\n        $objWriter->endElement(); // node\n        $expected .= '</node>' . $indentnl;\n        $objWriter->endElement(); // root\n        $expected .= '</root>' . $indentnl;\n        self::assertSame($expected, $objWriter->getData());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\DefinedName;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SpreadsheetCopyCloneTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Spreadsheet $spreadsheet2 = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->spreadsheet2 !== null) {\n            $this->spreadsheet2->disconnectWorksheets();\n            $this->spreadsheet2 = null;\n        }\n    }\n\n    #[DataProvider('providerCopyClone')]\n    public function testCopyClone(string $type): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('original');\n        $sheet->getStyle('A1')->getFont()->setName('font1');\n        $sheet->getStyle('A2')->getFont()->setName('font2');\n        $sheet->getStyle('A3')->getFont()->setName('font3');\n        $sheet->getStyle('B1')->getFont()->setName('font1');\n        $sheet->getStyle('B2')->getFont()->setName('font2');\n        $sheet->getCell('A1')->setValue('this is a1');\n        $sheet->getCell('A2')->setValue('this is a2');\n        $sheet->getCell('A3')->setValue('this is a3');\n        $sheet->getCell('B1')->setValue('this is b1');\n        $sheet->getCell('B2')->setValue('this is b2');\n        self::assertSame('font1', $sheet->getStyle('A1')->getFont()->getName());\n        $sheet->setSelectedCells('A3');\n        if ($type === 'copy') {\n            $spreadsheet2 = $this->spreadsheet2 = $spreadsheet->copy();\n        } else {\n            $spreadsheet2 = $this->spreadsheet2 = clone $spreadsheet;\n        }\n        self::assertSame($spreadsheet, $spreadsheet->getCalculationEngine()->getSpreadsheet());\n        self::assertSame($spreadsheet2, $spreadsheet2->getCalculationEngine()->getSpreadsheet());\n        self::assertSame('A3', $sheet->getSelectedCells());\n        $copysheet = $spreadsheet2->getActiveSheet();\n        self::assertSame('A3', $copysheet->getSelectedCells());\n        self::assertSame('original', $copysheet->getTitle());\n        $copysheet->setTitle('unoriginal');\n        self::assertSame('original', $sheet->getTitle());\n        self::assertSame('unoriginal', $copysheet->getTitle());\n        $copysheet->getStyle('A2')->getFont()->setName('font12');\n        $copysheet->getCell('A2')->setValue('this was a2');\n\n        self::assertSame('font1', $sheet->getStyle('A1')->getFont()->getName());\n        self::assertSame('font2', $sheet->getStyle('A2')->getFont()->getName());\n        self::assertSame('font3', $sheet->getStyle('A3')->getFont()->getName());\n        self::assertSame('font1', $sheet->getStyle('B1')->getFont()->getName());\n        self::assertSame('font2', $sheet->getStyle('B2')->getFont()->getName());\n        self::assertSame('this is a1', $sheet->getCell('A1')->getValue());\n        self::assertSame('this is a2', $sheet->getCell('A2')->getValue());\n        self::assertSame('this is a3', $sheet->getCell('A3')->getValue());\n        self::assertSame('this is b1', $sheet->getCell('B1')->getValue());\n        self::assertSame('this is b2', $sheet->getCell('B2')->getValue());\n\n        self::assertSame('font1', $copysheet->getStyle('A1')->getFont()->getName());\n        self::assertSame('font12', $copysheet->getStyle('A2')->getFont()->getName());\n        self::assertSame('font3', $copysheet->getStyle('A3')->getFont()->getName());\n        self::assertSame('font1', $copysheet->getStyle('B1')->getFont()->getName());\n        self::assertSame('font2', $copysheet->getStyle('B2')->getFont()->getName());\n        self::assertSame('this is a1', $copysheet->getCell('A1')->getValue());\n        self::assertSame('this was a2', $copysheet->getCell('A2')->getValue());\n        self::assertSame('this is a3', $copysheet->getCell('A3')->getValue());\n        self::assertSame('this is b1', $copysheet->getCell('B1')->getValue());\n        self::assertSame('this is b2', $copysheet->getCell('B2')->getValue());\n    }\n\n    #[DataProvider('providerCopyClone')]\n    public function testCopyCloneActiveSheet(string $type): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet0 = $this->spreadsheet->getActiveSheet();\n        $sheet1 = $this->spreadsheet->createSheet();\n        $sheet2 = $this->spreadsheet->createSheet();\n        $sheet3 = $this->spreadsheet->createSheet();\n        $sheet4 = $this->spreadsheet->createSheet();\n        $sheet0->getStyle('B1')->getFont()->setName('whatever');\n        $sheet1->getStyle('B1')->getFont()->setName('whatever');\n        $sheet2->getStyle('B1')->getFont()->setName('whatever');\n        $sheet3->getStyle('B1')->getFont()->setName('whatever');\n        $sheet4->getStyle('B1')->getFont()->setName('whatever');\n        $this->spreadsheet->setActiveSheetIndex(2);\n        if ($type === 'copy') {\n            $this->spreadsheet2 = $this->spreadsheet->copy();\n        } else {\n            $this->spreadsheet2 = clone $this->spreadsheet;\n        }\n        self::assertSame(2, $this->spreadsheet2->getActiveSheetIndex());\n    }\n\n    public static function providerCopyClone(): array\n    {\n        return [\n            ['copy'],\n            ['clone'],\n        ];\n    }\n\n    #[DataProvider('providerCopyClone')]\n    public function testCopyCloneDefinedName(string $type): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet->setTitle('original1');\n        $sheet2->setTitle('original2');\n        $spreadsheet->addDefinedName(\n            DefinedName::createInstance('defname1', $sheet, '$A$1:$A$3')\n        );\n        $spreadsheet->addDefinedName(\n            DefinedName::createInstance('defname2', $sheet2, '$B$1:$B$3', true, $sheet)\n        );\n        if ($type === 'copy') {\n            $spreadsheet2 = $this->spreadsheet2 = $spreadsheet->copy();\n        } else {\n            $spreadsheet2 = $this->spreadsheet2 = clone $spreadsheet;\n        }\n        $copySheet = $spreadsheet2->getSheetByNameOrThrow('original1');\n        $copySheet2 = $spreadsheet2->getSheetByNameOrThrow('original2');\n        $definedName = $spreadsheet2->getDefinedName('defname1');\n        self::assertNotNull($definedName);\n        self::assertSame('$A$1:$A$3', $definedName->getValue());\n        self::assertSame($copySheet, $definedName->getWorksheet());\n        self::assertNull($definedName->getScope());\n        $definedName = $spreadsheet2->getDefinedName('defname2', $copySheet);\n        self::assertNotNull($definedName);\n        self::assertSame('$B$1:$B$3', $definedName->getValue());\n        self::assertSame($copySheet2, $definedName->getWorksheet());\n        self::assertSame($copySheet, $definedName->getScope());\n    }\n\n    public static function providerCopyClone2(): array\n    {\n        return [\n            ['copy', true, false, true, 'array'],\n            ['clone', true, false, true, 'array'],\n            ['copy', false, true, false, 'value'],\n            ['clone', false, true, false, 'value'],\n            ['copy', false, true, true, 'error'],\n            ['clone', false, true, true, 'error'],\n        ];\n    }\n\n    #[DataProvider('providerCopyClone2')]\n    public function testCopyClone2(string $type, bool $suppress, bool $cache, bool $pruning, string $return): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $calc = $spreadsheet->getCalculationEngine();\n        $calc->setSuppressFormulaErrors($suppress);\n        $calc->setCalculationCacheEnabled($cache);\n        $calc->setBranchPruningEnabled($pruning);\n        $calc->setInstanceArrayReturnType($return);\n        if ($type === 'copy') {\n            $spreadsheet2 = $this->spreadsheet2 = $spreadsheet->copy();\n        } else {\n            $spreadsheet2 = $this->spreadsheet2 = clone $spreadsheet;\n        }\n        $calc2 = $spreadsheet2->getCalculationEngine();\n        self::assertSame($suppress, $calc2->getSuppressFormulaErrors());\n        self::assertSame($cache, $calc2->getCalculationCacheEnabled());\n        self::assertSame($pruning, $calc2->getBranchPruningEnabled());\n        self::assertSame($return, $calc2->getInstanceArrayReturnType());\n    }\n\n    #[DataProvider('providerCopyClone')]\n    public function testCopyCloneImageInCell(string $type): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('original1');\n        $objDrawing = new Drawing();\n        $directory = 'tests/data/Writer/XLSX';\n        $path = $directory . '/blue_square.png';\n        $objDrawing->setPath($path);\n        $sheet->getCell('C2')->setValue($objDrawing);\n\n        if ($type === 'copy') {\n            $spreadsheet2 = $this->spreadsheet2 = $spreadsheet->copy();\n        } else {\n            $spreadsheet2 = $this->spreadsheet2 = clone $spreadsheet;\n        }\n        $copySheet = $spreadsheet2->getSheetByNameOrThrow('original1');\n        $collection = $copySheet->getInCellDrawingCollection();\n        self::assertCount(1, $collection);\n        $image = $collection[0];\n        self::assertInstanceOf(Drawing::class, $image);\n        self::assertTrue($image->isInCell());\n        self::assertSame($path, $image->getPath());\n        self::assertNotSame($objDrawing, $image);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SSException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SpreadsheetCoverageTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Spreadsheet $spreadsheet2 = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->spreadsheet2 !== null) {\n            $this->spreadsheet2->disconnectWorksheets();\n            $this->spreadsheet2 = null;\n        }\n    }\n\n    public function testDocumentProperties(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $properties = $this->spreadsheet->getProperties();\n        $properties->setCreator('Anyone');\n        $properties->setTitle('Description');\n        $spreadsheet2 = $this->spreadsheet2 = new Spreadsheet();\n        self::assertNotEquals($properties, $this->spreadsheet2->getProperties());\n        $properties2 = clone $properties;\n        $spreadsheet2->setProperties($properties2);\n        self::assertEquals($properties, $spreadsheet2->getProperties());\n    }\n\n    public function testDocumentSecurity(): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $security = $spreadsheet->getSecurity();\n        $security->setLockRevision(true);\n        $revisionsPassword = 'revpasswd';\n        $security->setRevisionsPassword($revisionsPassword);\n        $spreadsheet2 = $this->spreadsheet2 = new Spreadsheet();\n        self::assertNotEquals($security, $spreadsheet2->getSecurity());\n        $security2 = clone $security;\n        $spreadsheet2->setSecurity($security2);\n        self::assertEquals($security, $spreadsheet2->getSecurity());\n    }\n\n    public function testCellXfCollection(): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1')->getFont()->setName('font1');\n        $sheet->getStyle('A2')->getFont()->setName('font2');\n        $sheet->getStyle('A3')->getFont()->setName('font3');\n        $sheet->getStyle('B1')->getFont()->setName('font1');\n        $sheet->getStyle('B2')->getFont()->setName('font2');\n        $collection = $spreadsheet->getCellXfCollection();\n        self::assertCount(4, $collection);\n        $font1Style = $collection[1];\n        self::assertTrue($spreadsheet->cellXfExists($font1Style));\n        self::assertSame('font1', $spreadsheet->getCellXfCollection()[1]->getFont()->getName());\n        self::assertSame('font1', $sheet->getStyle('A1')->getFont()->getName());\n        self::assertSame('font2', $sheet->getStyle('A2')->getFont()->getName());\n        self::assertSame('font3', $sheet->getStyle('A3')->getFont()->getName());\n        self::assertSame('font1', $sheet->getStyle('B1')->getFont()->getName());\n        self::assertSame('font2', $sheet->getStyle('B2')->getFont()->getName());\n\n        $spreadsheet->removeCellXfByIndex(1);\n        self::assertFalse($spreadsheet->cellXfExists($font1Style));\n        self::assertSame('font2', $spreadsheet->getCellXfCollection()[1]->getFont()->getName());\n        self::assertSame('Calibri', $sheet->getStyle('A1')->getFont()->getName());\n        self::assertSame('font2', $sheet->getStyle('A2')->getFont()->getName());\n        self::assertSame('font3', $sheet->getStyle('A3')->getFont()->getName());\n        self::assertSame('Calibri', $sheet->getStyle('B1')->getFont()->getName());\n        self::assertSame('font2', $sheet->getStyle('B2')->getFont()->getName());\n    }\n\n    public function testInvalidRemoveCellXfByIndex(): void\n    {\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('CellXf index is out of bounds.');\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1')->getFont()->setName('font1');\n        $sheet->getStyle('A2')->getFont()->setName('font2');\n        $sheet->getStyle('A3')->getFont()->setName('font3');\n        $sheet->getStyle('B1')->getFont()->setName('font1');\n        $sheet->getStyle('B2')->getFont()->setName('font2');\n        $this->spreadsheet->removeCellXfByIndex(5);\n    }\n\n    public function testInvalidRemoveDefaultStyle(): void\n    {\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('No default style found for this workbook');\n        // Removing default style probably should be disallowed.\n        $this->spreadsheet = new Spreadsheet();\n        $this->spreadsheet->removeCellXfByIndex(0);\n        $this->spreadsheet->getDefaultStyle();\n    }\n\n    public function testCellStyleXF(): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $collection = $spreadsheet->getCellStyleXfCollection();\n        self::assertCount(1, $collection);\n        $styleXf = $collection[0];\n        self::assertSame($styleXf, $spreadsheet->getCellStyleXfByIndex(0));\n        $hash = $styleXf->getHashCode();\n        self::assertSame($styleXf, $spreadsheet->getCellStyleXfByHashCode($hash));\n        self::assertFalse($spreadsheet->getCellStyleXfByHashCode($hash . 'x'));\n    }\n\n    public function testInvalidRemoveCellStyleXfByIndex(): void\n    {\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('CellStyleXf index is out of bounds.');\n        $this->spreadsheet = new Spreadsheet();\n        $this->spreadsheet->removeCellStyleXfByIndex(5);\n    }\n\n    public function testInvalidFirstSheetIndex(): void\n    {\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('First sheet index must be a positive integer.');\n        $this->spreadsheet = new Spreadsheet();\n        $this->spreadsheet->setFirstSheetIndex(-1);\n    }\n\n    public function testInvalidVisibility(): void\n    {\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('Invalid visibility value.');\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $spreadsheet\n            ->setVisibility(Spreadsheet::VISIBILITY_HIDDEN);\n        self::assertSame(Spreadsheet::VISIBILITY_HIDDEN, $spreadsheet->getVisibility());\n        $spreadsheet->setVisibility(null);\n        self::assertSame(Spreadsheet::VISIBILITY_VISIBLE, $spreadsheet->getVisibility());\n        $spreadsheet->setVisibility('badvalue');\n    }\n\n    public function testInvalidTabRatio(): void\n    {\n        $this->expectException(SSException::class);\n        $this->expectExceptionMessage('Tab ratio must be between 0 and 1000.');\n        $this->spreadsheet = new Spreadsheet();\n        $this->spreadsheet->setTabRatio(2000);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/SpreadsheetDuplicateSheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SpreadsheetDuplicateSheetTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testDuplicate(): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setTitle('original');\n        $sheet->getCell('A1')->setValue('text1');\n        $sheet->getCell('A2')->setValue('text2');\n        $sheet->getStyle('A1')\n            ->getFont()\n            ->setBold(true);\n        $sheet3 = $this->spreadsheet->createSheet();\n        $sheet3->setTitle('added');\n        $newSheet = $this->spreadsheet\n            ->duplicateWorksheetByTitle('original');\n        $this->spreadsheet->duplicateWorksheetByTitle('added');\n        self::assertSame('original 1', $newSheet->getTitle());\n        self::assertSame(\n            'text1',\n            $newSheet->getCell('A1')->getValue()\n        );\n        self::assertSame(\n            'text2',\n            $newSheet->getCell('A2')->getValue()\n        );\n        self::assertTrue(\n            $newSheet->getStyle('A1')->getFont()->getBold()\n        );\n        self::assertFalse(\n            $newSheet->getStyle('A2')->getFont()->getBold()\n        );\n        $sheetNames = [];\n        foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {\n            $sheetNames[] = $worksheet->getTitle();\n        }\n        $expected = ['original', 'original 1', 'added', 'added 1'];\n        self::assertSame($expected, $sheetNames);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/SpreadsheetSerializeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Sample;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SpreadsheetSerializeTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testSerialize(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(10);\n\n        $serialized = serialize($this->spreadsheet);\n        $newSpreadsheet = unserialize($serialized);\n        self::assertInstanceOf(Spreadsheet::class, $newSpreadsheet);\n        self::assertNotSame($this->spreadsheet, $newSpreadsheet);\n        $newSheet = $newSpreadsheet->getActiveSheet();\n        self::assertSame(10, $newSheet->getCell('A1')->getValue());\n        $newSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testNotJsonEncodable(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Spreadsheet objects cannot be json encoded');\n        json_encode($this->spreadsheet);\n    }\n\n    /**\n     * These tests are a bit weird.\n     * If prepareSerialize and readSerialize are run in the same\n     *    process, the latter's assertions will always succeed.\n     *    So to demonstrate that the\n     *    problem is solved, they need to run in separate processes.\n     *    But then they can't share the file name. So we need to send\n     *    the file to a semi-hard-coded destination.\n     */\n    private static function getTempFileName(): string\n    {\n        $helper = new Sample();\n\n        return $helper->getTemporaryFolder() . '/spreadsheet.serialize.test.txt';\n    }\n\n    public function testPrepareSerialize(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $this->spreadsheet->addNamedRange(new NamedRange('summedcells', $sheet, '$A$1:$A$5'));\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 2);\n        $sheet->setCellValue('A3', 3);\n        $sheet->setCellValue('A4', 4);\n        $sheet->setCellValue('A5', 5);\n        $sheet->setCellValue('C1', '=SUM(summedcells)');\n        $ser = serialize($this->spreadsheet);\n        $this->spreadsheet->disconnectWorksheets();\n        $outputFileName = self::getTempFileName();\n        self::assertNotFalse(\n            file_put_contents($outputFileName, $ser)\n        );\n\n        $inputFileName = self::getTempFileName();\n        $ser = (string) file_get_contents($inputFileName);\n        unlink($inputFileName);\n        $spreadsheet = unserialize($ser);\n        self::assertInstanceOf(Spreadsheet::class, $spreadsheet);\n        $this->spreadsheet = $spreadsheet;\n        $sheet = $this->spreadsheet->getActiveSheet();\n        self::assertSame('=SUM(summedcells)', $sheet->getCell('C1')->getValue());\n        self::assertSame(15, $sheet->getCell('C1')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/SpreadsheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SpreadsheetTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    private function getSpreadsheet(): Spreadsheet\n    {\n        $this->spreadsheet = $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setTitle('someSheet1');\n        $sheet = new Worksheet();\n        $sheet->setTitle('someSheet2');\n        $spreadsheet->addSheet($sheet);\n        $sheet = new Worksheet();\n        $sheet->setTitle('someSheet 3');\n        $spreadsheet->addSheet($sheet);\n\n        return $spreadsheet;\n    }\n\n    public static function dataProviderForSheetNames(): array\n    {\n        $array = [\n            [0, 'someSheet1'],\n            [0, \"'someSheet1'\"],\n            [1, 'someSheet2'],\n            [1, \"'someSheet2'\"],\n            [2, 'someSheet 3'],\n            [2, \"'someSheet 3'\"],\n            [null, 'someSheet 33'],\n        ];\n\n        return $array;\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('dataProviderForSheetNames')]\n    public function testGetSheetByName(?int $index, string $sheetName): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        if ($index === null) {\n            self::assertNull($spreadsheet->getSheetByName($sheetName));\n        } else {\n            self::assertSame($spreadsheet->getSheet($index), $spreadsheet->getSheetByName($sheetName));\n        }\n    }\n\n    public function testAddSheetDuplicateTitle(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Workbook already contains a worksheet named 'someSheet2'. Rename this worksheet first.\");\n        $sheet = new Worksheet();\n        $sheet->setTitle('someSheet2');\n        $spreadsheet->addSheet($sheet);\n    }\n\n    public function testAddSheetDuplicateTitleWithDifferentCase(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Workbook already contains a worksheet named 'SomeSheet2'. Rename this worksheet first.\");\n        $sheet = new Worksheet();\n        $sheet->setTitle('SomeSheet2');\n        $spreadsheet->addSheet($sheet);\n    }\n\n    public function testAddSheetNoAdjustActive(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet->setActiveSheetIndex(2);\n        self::assertEquals(2, $spreadsheet->getActiveSheetIndex());\n        $sheet = new Worksheet();\n        $sheet->setTitle('someSheet4');\n        $spreadsheet->addSheet($sheet);\n        self::assertEquals(2, $spreadsheet->getActiveSheetIndex());\n    }\n\n    public function testAddSheetAdjustActive(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet->setActiveSheetIndex(2);\n        self::assertEquals(2, $spreadsheet->getActiveSheetIndex());\n        $sheet = new Worksheet();\n        $sheet->setTitle('someSheet0');\n        $spreadsheet->addSheet($sheet, 0);\n        self::assertEquals(3, $spreadsheet->getActiveSheetIndex());\n    }\n\n    public function testRemoveSheetIndexTooHigh(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('You tried to remove a sheet by the out of bounds index: 4. The actual number of sheets is 3.');\n        $spreadsheet->removeSheetByIndex(4);\n    }\n\n    public function testRemoveSheetNoAdjustActive(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet->setActiveSheetIndex(1);\n        self::assertEquals(1, $spreadsheet->getActiveSheetIndex());\n        $spreadsheet->removeSheetByIndex(2);\n        self::assertEquals(1, $spreadsheet->getActiveSheetIndex());\n    }\n\n    public function testRemoveSheetAdjustActive(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet->setActiveSheetIndex(2);\n        self::assertEquals(2, $spreadsheet->getActiveSheetIndex());\n        $spreadsheet->removeSheetByIndex(1);\n        self::assertEquals(1, $spreadsheet->getActiveSheetIndex());\n    }\n\n    public function testGetSheetIndexTooHigh(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Your requested sheet index: 4 is out of bounds. The actual number of sheets is 3.');\n        $spreadsheet->getSheet(4);\n    }\n\n    public function testGetIndexNonExistent(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Sheet does not exist.');\n        $sheet = new Worksheet();\n        $sheet->setTitle('someSheet4');\n        $spreadsheet->getIndex($sheet);\n    }\n\n    public function testSetIndexByName(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet->setIndexByName('someSheet1', 1);\n        self::assertEquals('someSheet2', $spreadsheet->getSheet(0)->getTitle());\n        self::assertEquals('someSheet1', $spreadsheet->getSheet(1)->getTitle());\n        self::assertEquals('someSheet 3', $spreadsheet->getSheet(2)->getTitle());\n    }\n\n    public function testRemoveAllSheets(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet->setActiveSheetIndex(2);\n        self::assertEquals(2, $spreadsheet->getActiveSheetIndex());\n        $spreadsheet->removeSheetByIndex(0);\n        self::assertEquals(1, $spreadsheet->getActiveSheetIndex());\n        $spreadsheet->removeSheetByIndex(0);\n        self::assertEquals(0, $spreadsheet->getActiveSheetIndex());\n        $spreadsheet->removeSheetByIndex(0);\n        self::assertEquals(-1, $spreadsheet->getActiveSheetIndex());\n        $sheet = new Worksheet();\n        $sheet->setTitle('someSheet4');\n        $spreadsheet->addSheet($sheet);\n        self::assertEquals(0, $spreadsheet->getActiveSheetIndex());\n    }\n\n    public function testBug1735(): void\n    {\n        $spreadsheet1 = new Spreadsheet();\n        $spreadsheet1->createSheet()->setTitle('addedsheet');\n        $spreadsheet1->setActiveSheetIndex(1);\n        $spreadsheet1->removeSheetByIndex(0);\n        $sheet = $spreadsheet1->getActiveSheet();\n        self::assertEquals('addedsheet', $sheet->getTitle());\n    }\n\n    public function testSetActiveSheetIndexTooHigh(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('You tried to set a sheet active by the out of bounds index: 4. The actual number of sheets is 3.');\n        $spreadsheet->setActiveSheetIndex(4);\n    }\n\n    public function testSetActiveSheetNoSuchName(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Workbook does not contain sheet:unknown');\n        $spreadsheet->setActiveSheetIndexByName('unknown');\n    }\n\n    public function testAddExternal(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet1 = new Spreadsheet();\n        $sheet = $spreadsheet1->createSheet()->setTitle('someSheet19');\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A1')->getStyle()->getFont()->setBold(true);\n        $sheet->getCell('B1')->getStyle()->getFont()->setSuperscript(true);\n        $sheet->getCell('C1')->getStyle()->getFont()->setSubscript(true);\n        self::assertCount(4, $spreadsheet1->getCellXfCollection());\n        self::assertEquals(1, $sheet->getCell('A1')->getXfIndex());\n        $spreadsheet->getActiveSheet()->getCell('A1')->getStyle()->getFont()->setBold(true);\n        self::assertCount(2, $spreadsheet->getCellXfCollection());\n        $sheet3 = $spreadsheet->addExternalSheet($sheet);\n        self::assertCount(6, $spreadsheet->getCellXfCollection());\n        self::assertEquals('someSheet19', $sheet3->getTitle());\n        self::assertEquals(1, $sheet3->getCell('A1')->getValue());\n        self::assertTrue($sheet3->getCell('A1')->getStyle()->getFont()->getBold());\n        // Prove Xf index changed although style is same.\n        self::assertEquals(3, $sheet3->getCell('A1')->getXfIndex());\n    }\n\n    public function testAddExternalDuplicateName(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Workbook already contains a worksheet named 'someSheet1'. Rename the external sheet first.\");\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->createSheet()->setTitle('someSheet1');\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A1')->getStyle()->getFont()->setBold(true);\n        $spreadsheet->addExternalSheet($sheet);\n    }\n\n    public function testAddExternalColumnDimensionStyles(): void\n    {\n        $spreadsheet1 = new Spreadsheet();\n        $sheet1 = $spreadsheet1->createSheet()->setTitle('sheetWithColumnDimension');\n        $sheet1->getCell('A1')->setValue(1);\n        $sheet1->getCell('A1')->getStyle()->getFont()->setItalic(true);\n        $sheet1->getColumnDimension('B')->setWidth(10)->setXfIndex($sheet1->getCell('A1')->getXfIndex());\n        $index = $sheet1->getColumnDimension('B')->getXfIndex();\n        self::assertEquals(1, $index);\n        self::assertCount(2, $spreadsheet1->getCellXfCollection());\n\n        $spreadsheet2 = new Spreadsheet();\n        $sheet2 = $spreadsheet2->createSheet()->setTitle('sheetWithTwoStyles');\n        $sheet2->getCell('A1')->setValue(1);\n        $sheet2->getCell('A1')->getStyle()->getFont()->setBold(true);\n        $sheet2->getCell('B2')->getStyle()->getFont()->setSuperscript(true);\n        $countXfs = count($spreadsheet2->getCellXfCollection());\n        self::assertEquals(3, $countXfs);\n\n        $sheet3 = $spreadsheet2->addExternalSheet($sheet1);\n        self::assertCount(5, $spreadsheet2->getCellXfCollection());\n        self::assertTrue($sheet3->getCell('A1')->getStyle()->getFont()->getItalic());\n        self::assertTrue($sheet3->getCell('B1')->getStyle()->getFont()->getItalic());\n        self::assertFalse($sheet3->getCell('B1')->getStyle()->getFont()->getBold());\n        // Prove Xf index changed although style is same.\n        self::assertEquals($countXfs + $index, $sheet3->getCell('B1')->getXfIndex());\n        self::assertEquals($countXfs + $index, $sheet3->getColumnDimension('B')->getXfIndex());\n    }\n\n    public function testAddExternalRowDimensionStyles(): void\n    {\n        $spreadsheet1 = new Spreadsheet();\n        $sheet1 = $spreadsheet1->createSheet()->setTitle('sheetWithColumnDimension');\n        $sheet1->getCell('A1')->setValue(1);\n        $sheet1->getCell('A1')->getStyle()->getFont()->setItalic(true);\n        $sheet1->getRowDimension(2)->setXfIndex($sheet1->getCell('A1')->getXfIndex());\n        $index = $sheet1->getRowDimension(2)->getXfIndex();\n        self::assertEquals(1, $index);\n        self::assertCount(2, $spreadsheet1->getCellXfCollection());\n\n        $spreadsheet2 = new Spreadsheet();\n        $sheet2 = $spreadsheet2->createSheet()->setTitle('sheetWithTwoStyles');\n        $sheet2->getCell('A1')->setValue(1);\n        $sheet2->getCell('A1')->getStyle()->getFont()->setBold(true);\n        $sheet2->getCell('B2')->getStyle()->getFont()->setSuperscript(true);\n        $countXfs = count($spreadsheet2->getCellXfCollection());\n        self::assertEquals(3, $countXfs);\n\n        $sheet3 = $spreadsheet2->addExternalSheet($sheet1);\n        self::assertCount(5, $spreadsheet2->getCellXfCollection());\n        self::assertTrue($sheet3->getCell('A1')->getStyle()->getFont()->getItalic());\n        self::assertTrue($sheet3->getCell('A2')->getStyle()->getFont()->getItalic());\n        self::assertFalse($sheet3->getCell('A2')->getStyle()->getFont()->getBold());\n        // Prove Xf index changed although style is same.\n        self::assertEquals($countXfs + $index, $sheet3->getCell('A2')->getXfIndex());\n        self::assertEquals($countXfs + $index, $sheet3->getRowDimension(2)->getXfIndex());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/AlignmentMiddleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass AlignmentMiddleTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private string $outputFileName = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->outputFileName !== '') {\n            unlink($this->outputFileName);\n            $this->outputFileName = '';\n        }\n    }\n\n    public function testCenterWriteHtml(): void\n    {\n        // Html Writer changes vertical align center to middle\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Cell1');\n        $sheet->getStyle('A1')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $writer = new Html($this->spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('vertical-align:middle', $html);\n        self::assertStringNotContainsString('vertical-align:center', $html);\n    }\n\n    public function testCenterWriteXlsx(): void\n    {\n        // Xlsx Writer uses vertical align center unchanged\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Cell1');\n        $sheet->getStyle('A1')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $this->outputFileName = File::temporaryFilename();\n        $writer = new Xlsx($this->spreadsheet);\n        $writer->save($this->outputFileName);\n        $zip = new ZipArchive();\n        $zip->open($this->outputFileName);\n        $html = $zip->getFromName('xl/styles.xml');\n        $zip->close();\n        self::assertStringContainsString('vertical=\"center\"', $html);\n        self::assertStringNotContainsString('vertical=\"middle\"', $html);\n    }\n\n    public function testCenterWriteXlsx2(): void\n    {\n        // Xlsx Writer changes vertical align middle to center\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Cell1');\n        $sheet->getStyle('A1')\n            ->getAlignment()\n            ->setVertical('middle');\n        $this->outputFileName = File::temporaryFilename();\n        $writer = new Xlsx($this->spreadsheet);\n        $writer->save($this->outputFileName);\n        $zip = new ZipArchive();\n        $zip->open($this->outputFileName);\n        $html = $zip->getFromName('xl/styles.xml');\n        $zip->close();\n        self::assertStringContainsString('vertical=\"center\"', $html);\n        self::assertStringNotContainsString('vertical=\"middle\"', $html);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/AlignmentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AlignmentTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testAlignment(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('Cell1');\n        $cell1->getStyle()->getAlignment()->setTextRotation(45);\n        self::assertEquals(45, $cell1->getStyle()->getAlignment()->getTextRotation());\n        $cell2 = $sheet->getCell('A2');\n        $cell2->setValue('Cell2');\n        $cell2->getStyle()->getAlignment()->setTextRotation(-45);\n        self::assertEquals(-45, $cell2->getStyle()->getAlignment()->getTextRotation());\n        // special value for stacked\n        $cell3 = $sheet->getCell('A3');\n        $cell3->setValue('Cell3');\n        $cell3->getStyle()->getAlignment()->setTextRotation(255);\n        self::assertEquals(-165, $cell3->getStyle()->getAlignment()->getTextRotation());\n    }\n\n    public function testRotationTooHigh(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('Cell1');\n        $cell1->getStyle()->getAlignment()->setTextRotation(91);\n        self::assertEquals(0, $cell1->getStyle()->getAlignment()->getTextRotation());\n    }\n\n    public function testRotationTooLow(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('Cell1');\n        $cell1->getStyle()->getAlignment()->setTextRotation(-91);\n        self::assertEquals(0, $cell1->getStyle()->getAlignment()->getTextRotation());\n    }\n\n    public function testHorizontal(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('X');\n        $cell1->getStyle()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT)->setIndent(1);\n        self::assertEquals(Alignment::HORIZONTAL_LEFT, $cell1->getStyle()->getAlignment()->getHorizontal());\n        self::assertEquals(1, $cell1->getStyle()->getAlignment()->getIndent());\n        $cell2 = $sheet->getCell('A2');\n        $cell2->setValue('Y');\n        $cell2->getStyle()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT)->setIndent(2);\n        self::assertEquals(Alignment::HORIZONTAL_RIGHT, $cell2->getStyle()->getAlignment()->getHorizontal());\n        self::assertEquals(2, $cell2->getStyle()->getAlignment()->getIndent());\n        $cell3 = $sheet->getCell('A3');\n        $cell3->setValue('Z');\n        // indent not supported for next style - changed to 0\n        $cell3->getStyle()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER_CONTINUOUS)->setIndent(3);\n        self::assertEquals(Alignment::HORIZONTAL_CENTER_CONTINUOUS, $cell3->getStyle()->getAlignment()->getHorizontal());\n        self::assertEquals(0, $cell3->getStyle()->getAlignment()->getIndent());\n    }\n\n    public function testJustifyLastLine(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('ABC');\n        $cell1->getStyle()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_DISTRIBUTED);\n        $cell1->getStyle()->getAlignment()->setJustifyLastLine(true);\n        self::assertTrue($cell1->getStyle()->getAlignment()->getJustifyLastLine());\n    }\n\n    public function testReadOrder(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('ABC');\n        $cell1->getStyle()->getAlignment()->setReadOrder(0);\n        self::assertEquals(0, $cell1->getStyle()->getAlignment()->getReadOrder());\n        $cell1->getStyle()->getAlignment()->setReadOrder(1);\n        self::assertEquals(1, $cell1->getStyle()->getAlignment()->getReadOrder());\n        // following not supported - zero is used instead\n        $cell1->getStyle()->getAlignment()->setReadOrder(-1);\n        self::assertEquals(0, $cell1->getStyle()->getAlignment()->getReadOrder());\n        $cell1->getStyle()->getAlignment()->setReadOrder(2);\n        self::assertEquals(2, $cell1->getStyle()->getAlignment()->getReadOrder());\n        // following not supported - zero is used instead\n        $cell1->getStyle()->getAlignment()->setReadOrder(3);\n        self::assertEquals(0, $cell1->getStyle()->getAlignment()->getReadOrder());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/BorderRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BorderRangeTest extends TestCase\n{\n    public function testBorderRangeInAction(): void\n    {\n        // testcase for the initial bug problem: setting border+color fails\n        // set red borders aroundlA1:B3 square. Verify that the borders set are actually correct\n\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $argb = 'FFFF0000';\n        $color = new Color($argb);\n\n        $sheet->getStyle('A1:C1')->getBorders()->getTop()->setBorderStyle(Border::BORDER_THIN)->setColor($color);\n        $sheet->getStyle('A1:A3')->getBorders()->getLeft()->setBorderStyle(Border::BORDER_THIN)->setColor($color);\n        $sheet->getStyle('C1:C3')->getBorders()->getRight()->setBorderStyle(Border::BORDER_THIN)->setColor($color);\n        $sheet->getStyle('A3:C3')->getBorders()->getBottom()->setBorderStyle(Border::BORDER_THIN)->setColor($color);\n\n        // upper row\n        $expectations = [\n            // cell => Left/Right/Top/Bottom\n            'A1' => 'LT',\n            'B1' => 'T',\n            'C1' => 'RT',\n            'A2' => 'L',\n            'B2' => '',\n            'C2' => 'R',\n            'A3' => 'LB',\n            'B3' => 'B',\n            'C3' => 'RB',\n        ];\n        $sides = [\n            'L' => 'Left',\n            'R' => 'Right',\n            'T' => 'Top',\n            'B' => 'Bottom',\n        ];\n\n        foreach ($expectations as $cell => $borders) {\n            $bs = $sheet->getStyle($cell)->getBorders();\n            foreach ($sides as $sidekey => $side) {\n                $assertion = \"setBorderStyle on a range of cells, $cell $side\";\n                $func = \"get$side\";\n                $b = $bs->$func(); // boo\n\n                if (!str_contains($borders, $sidekey)) {\n                    self::assertSame(Border::BORDER_NONE, $b->getBorderStyle(), $assertion);\n                } else {\n                    self::assertSame(Border::BORDER_THIN, $b->getBorderStyle(), $assertion);\n                    self::assertSame($argb, $b->getColor()->getARGB(), $assertion);\n                }\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBorderRangeDirectly(): void\n    {\n        // testcase for the underlying problem directly\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $style = $sheet->getStyle('A1:C1')->getBorders()->getTop()->setBorderStyle(Border::BORDER_THIN);\n        self::assertSame('A1:C1', $style->getSelectedCells(), 'getSelectedCells should not change after a style operation on a border range');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/BorderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Borders;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BorderTest extends TestCase\n{\n    public function testAllBorders(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $borders = $spreadsheet->getActiveSheet()->getStyle('A1')->getBorders();\n        $allBorders = $borders->getAllBorders();\n        $bottom = $borders->getBottom();\n\n        $actual = $bottom->getBorderStyle();\n        self::assertSame(Border::BORDER_NONE, $actual, 'should default to none');\n\n        $allBorders->setBorderStyle(Border::BORDER_THIN);\n\n        $actual = $bottom->getBorderStyle();\n        self::assertSame(Border::BORDER_THIN, $actual, 'should have been set via allBorders');\n        self::assertSame(Border::BORDER_THIN, $borders->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $borders->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $borders->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $borders->getDiagonal()->getBorderStyle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testAllBordersArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1')->getBorders()->applyFromArray(['allBorders' => ['borderStyle' => Border::BORDER_THIN]]);\n        $borders = $sheet->getCell('A1')->getStyle()->getBorders();\n\n        self::assertSame(Border::BORDER_THIN, $borders->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $borders->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $borders->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $borders->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $borders->getDiagonal()->getBorderStyle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testAllBordersArrayNotSupervisor(): void\n    {\n        $borders = new Borders();\n        $borders->applyFromArray(['allBorders' => ['borderStyle' => Border::BORDER_THIN]]);\n\n        self::assertSame(Border::BORDER_THIN, $borders->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $borders->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $borders->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $borders->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $borders->getDiagonal()->getBorderStyle());\n    }\n\n    public function testOutline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $borders = $sheet->getStyle('A1:B2')->getBorders();\n        $outline = $borders->getOutline();\n        $outline->setBorderStyle(Border::BORDER_THIN);\n\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A1')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A1')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A2')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A2')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getTop()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B1')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B1')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B2')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B2')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInside(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $borders = $sheet->getStyle('A1:B2')->getBorders();\n        $inside = $borders->getInside();\n        $inside->setBorderStyle(Border::BORDER_THIN);\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A1')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A1')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A2')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A2')->getStyle()->getBorders()->getTop()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B1')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B1')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B2')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B2')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testHorizontal(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $borders = $sheet->getStyle('A1:B2')->getBorders();\n        $horizontal = $borders->getHorizontal();\n        $horizontal->setBorderStyle(Border::BORDER_THIN);\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A1')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A2')->getStyle()->getBorders()->getTop()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B1')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B2')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testVertical(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $borders = $sheet->getStyle('A1:B2')->getBorders();\n        $vertical = $borders->getVertical();\n        $vertical->setBorderStyle(Border::BORDER_THIN);\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A1')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A1')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('A2')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('A2')->getStyle()->getBorders()->getTop()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B1')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B1')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getRight()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getBottom()->getBorderStyle());\n        self::assertSame(Border::BORDER_THIN, $sheet->getCell('B2')->getStyle()->getBorders()->getLeft()->getBorderStyle());\n        self::assertSame(Border::BORDER_NONE, $sheet->getCell('B2')->getStyle()->getBorders()->getTop()->getBorderStyle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNoSupervisorAllBorders(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $borders = new Borders();\n        $borders->getAllBorders();\n    }\n\n    public function testNoSupervisorOutline(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $borders = new Borders();\n        $borders->getOutline();\n    }\n\n    public function testNoSupervisorInside(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $borders = new Borders();\n        $borders->getInside();\n    }\n\n    public function testNoSupervisorVertical(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $borders = new Borders();\n        $borders->getVertical();\n    }\n\n    public function testNoSupervisorHorizontal(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $borders = new Borders();\n        $borders->getHorizontal();\n    }\n\n    public function testGetSharedComponentPseudo(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('pseudo-border');\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1')->getBorders()->getHorizontal()->setBorderStyle(Border::BORDER_MEDIUM);\n        $sheet->getStyle('A1')->getBorders()->getHorizontal()->getSharedComponent();\n    }\n\n    public function testBorderStyle(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1')->getBorders()->getTop()->setBorderStyle(false);\n        $sheet->getStyle('A2')->getBorders()->getTop()->setBorderStyle(true);\n        self::assertEquals(Border::BORDER_NONE, $sheet->getStyle('A1')->getBorders()->getTop()->getBorderStyle());\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getStyle('A2')->getBorders()->getTop()->getBorderStyle());\n        $sheet->getStyle('A3')->getBorders()->getTop()->applyFromArray(['borderStyle' => Border::BORDER_MEDIUM]);\n        self::assertEquals(Border::BORDER_MEDIUM, $sheet->getStyle('A3')->getBorders()->getTop()->getBorderStyle());\n        $border = new Border();\n        $border->setBorderStyle(Border::BORDER_THIN)->setColor(new Color('FFFF0000'));\n        self::assertEquals('FFFF0000', $border->getColor()->getARGB());\n        self::assertEquals(Border::BORDER_THIN, $border->getBorderStyle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDiagonalDirection(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1')->getBorders()->getDiagonal()->setBorderStyle(Border::BORDER_MEDIUM);\n        $sheet->getStyle('A1')->getBorders()->setDiagonalDirection(Borders::DIAGONAL_BOTH);\n        $borders = $sheet->getStyle('A1')->getBorders();\n\n        self::assertSame(Border::BORDER_MEDIUM, $borders->getDiagonal()->getBorderStyle());\n        self::assertSame(Borders::DIAGONAL_BOTH, $borders->getDiagonalDirection());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ColorIndexTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\Styles;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColorIndexTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerColorIndexes')]\n    public function testColorIndex(string $expectedResult, string $xml, bool $background = false): void\n    {\n        $sxml = simplexml_load_string($xml);\n        if ($sxml === false) {\n            self::fail('Unable to parse xml');\n        } else {\n            $styles = new Styles();\n            $result = $styles->readColor($sxml, $background);\n            self::assertSame($expectedResult, $result);\n        }\n    }\n\n    public static function providerColorIndexes(): array\n    {\n        return [\n            'subtract 7 to return system color 4' => ['FF00FF00', '<fgColor indexed=\"11\"/>'],\n            'default foreground color when out of range' => ['FF000000', '<color indexed=\"81\"/>'],\n            'default background color when out of range' => ['FFFFFFFF', '<bgColor indexed=\"81\"/>', true],\n            'rgb specified' => ['FF123456', '<bgColor rgb=\"FF123456\"/>', true],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ColorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColorTest extends TestCase\n{\n    public function testNewColor(): void\n    {\n        $color = new Color('FF123456');\n        self::assertEquals('FF123456', $color->getARGB());\n        self::assertEquals('123456', $color->getRGB());\n    }\n\n    public function testARGBSetter(): void\n    {\n        $color = new Color();\n        $color->setARGB('80123456');\n        self::assertEquals('80123456', $color->getARGB());\n        self::assertEquals('123456', $color->getRGB());\n    }\n\n    public function testARGBSetterEmpty(): void\n    {\n        $color = new Color();\n        $color->setARGB();\n        self::assertEquals(Color::COLOR_BLACK, $color->getARGB());\n    }\n\n    public function testARGBSetterInvalid(): void\n    {\n        $color = new Color('80123456');\n        $color->setARGB('INVALID COLOR');\n        self::assertEquals('80123456', $color->getARGB());\n    }\n\n    public function testRGBSetter(): void\n    {\n        $color = new Color();\n        $color->setRGB('123456');\n        self::assertEquals('123456', $color->getRGB());\n        self::assertEquals('FF123456', $color->getARGB());\n    }\n\n    public function testRGBSetterEmpty(): void\n    {\n        $color = new Color();\n        $color->setRGB();\n        self::assertEquals(Color::COLOR_BLACK, $color->getARGB());\n    }\n\n    public function testRGBSetterInvalid(): void\n    {\n        $color = new Color('80123456');\n        $color->setRGB('INVALID COLOR');\n        self::assertEquals('123456', $color->getRGB());\n    }\n\n    public function testARGBFromArray(): void\n    {\n        $color = new Color();\n        $color->applyFromArray(['argb' => '80123456']);\n        self::assertEquals('80123456', $color->getARGB());\n        self::assertEquals('123456', $color->getRGB());\n    }\n\n    public function testRGBFromArray(): void\n    {\n        $color = new Color();\n        $color->applyFromArray(['rgb' => '123456']);\n        self::assertEquals('123456', $color->getRGB());\n        self::assertEquals('FF123456', $color->getARGB());\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerColorGetRed')]\n    public function testGetRed(mixed $expectedResult, string $color, ?bool $bool = null): void\n    {\n        if ($bool === null) {\n            $result = Color::getRed($color);\n        } else {\n            $result = Color::getRed($color, $bool);\n        }\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerColorGetRed(): array\n    {\n        return require 'tests/data/Style/Color/ColorGetRed.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerColorGetGreen')]\n    public function testGetGreen(mixed $expectedResult, string $color, ?bool $bool = null): void\n    {\n        if ($bool === null) {\n            $result = Color::getGreen($color);\n        } else {\n            $result = Color::getGreen($color, $bool);\n        }\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerColorGetGreen(): array\n    {\n        return require 'tests/data/Style/Color/ColorGetGreen.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerColorGetBlue')]\n    public function testGetBlue(mixed $expectedResult, string $color, ?bool $bool = null): void\n    {\n        if ($bool === null) {\n            $result = Color::getBlue($color);\n        } else {\n            $result = Color::getBlue($color, $bool);\n        }\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerColorGetBlue(): array\n    {\n        return require 'tests/data/Style/Color/ColorGetBlue.php';\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerColorChangeBrightness')]\n    public function testChangeBrightness(string $expectedResult, string $hexColorValue, float $adjustPercentages): void\n    {\n        $result = Color::changeBrightness($hexColorValue, $adjustPercentages);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerColorChangeBrightness(): array\n    {\n        return require 'tests/data/Style/Color/ColorChangeBrightness.php';\n    }\n\n    public function testDefaultColor(): void\n    {\n        $color = new Color();\n        $color->setARGB('FFFF0000');\n        self::assertEquals('FFFF0000', $color->getARGB());\n        self::assertEquals('FF0000', $color->getRGB());\n        $color->setARGB('');\n        self::assertEquals(Color::COLOR_BLACK, $color->getARGB());\n        self::assertEquals('000000', $color->getRGB());\n        $color->setARGB('FFFF0000');\n        self::assertEquals('FFFF0000', $color->getARGB());\n        self::assertEquals('FF0000', $color->getRGB());\n        $color->setRGB('');\n        self::assertEquals(Color::COLOR_BLACK, $color->getARGB());\n        self::assertEquals('000000', $color->getRGB());\n    }\n\n    public function testNamedColors(): void\n    {\n        $color = new Color();\n        $color->setARGB('Blue');\n        self::assertEquals(Color::COLOR_BLUE, $color->getARGB());\n        $color->setARGB('black');\n        self::assertEquals(Color::COLOR_BLACK, $color->getARGB());\n        $color->setARGB('wHite');\n        self::assertEquals(Color::COLOR_WHITE, $color->getARGB());\n        $color->setRGB('reD');\n        self::assertEquals(Color::COLOR_RED, $color->getARGB());\n        $color->setRGB('GREEN');\n        self::assertEquals(Color::COLOR_GREEN, $color->getARGB());\n        $color->setRGB('magenta');\n        self::assertEquals(Color::COLOR_MAGENTA, $color->getARGB());\n        $color->setRGB('YeLlOw');\n        self::assertEquals(Color::COLOR_YELLOW, $color->getARGB());\n        $color->setRGB('CYAN');\n        self::assertEquals(Color::COLOR_CYAN, $color->getARGB());\n        $color->setRGB('123456ab');\n        self::assertEquals('123456ab', $color->getARGB());\n        self::assertEquals('3456ab', $color->getRGB());\n        $color->setARGB('3456cd');\n        self::assertEquals('FF3456cd', $color->getARGB());\n        self::assertEquals('3456cd', $color->getRGB());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalBoolTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalBoolTest extends TestCase\n{\n    private string $outfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outfile !== '') {\n            unlink($this->outfile);\n            $this->outfile = '';\n        }\n    }\n\n    public function testBool(): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_EQUAL);\n        $condition1->addCondition(false);\n        $condition1->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()->setARGB('FFFFFF00');\n        $conditionalStyles = $sheet->getStyle('A1:A10')->getConditionalStyles();\n        $conditionalStyles[] = $condition1;\n        $sheet->getStyle('A1:A20')->setConditionalStyles($conditionalStyles);\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', true);\n        $sheet->setCellValue('A3', false);\n        $sheet->setCellValue('A4', 0.6);\n        $sheet->setCellValue('A6', 0);\n        $sheet->setSelectedCell('B1');\n\n        $sheet = $spreadsheet->createSheet();\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_EQUAL);\n        $condition1->addCondition(true);\n        $condition1->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()->setARGB('FF00FF00');\n        $conditionalStyles = $sheet->getStyle('A1:A10')->getConditionalStyles();\n        $conditionalStyles[] = $condition1;\n        $sheet->getStyle('A1:A20')->setConditionalStyles($conditionalStyles);\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', true);\n        $sheet->setCellValue('A3', false);\n        $sheet->setCellValue('A4', 0.6);\n        $sheet->setCellValue('A6', 0);\n        $sheet->setSelectedCell('B1');\n\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outfile = File::temporaryFilename();\n        $writer->save($this->outfile);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://' . $this->outfile . '#xl/worksheets/sheet1.xml';\n        $contents = file_get_contents($file);\n        self::assertNotFalse($contents);\n        self::assertStringContainsString('<formula>FALSE</formula>', $contents);\n        $file = 'zip://' . $this->outfile . '#xl/worksheets/sheet2.xml';\n        $contents = file_get_contents($file);\n        self::assertNotFalse($contents);\n        self::assertStringContainsString('<formula>TRUE</formula>', $contents);\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outfile);\n        $sheet1 = $spreadsheet2->getSheet(0);\n        $condArray = $sheet1->getStyle('A1:A20')->getConditionalStyles();\n        self::assertNotEmpty($condArray);\n        $cond1 = $condArray[0];\n        self::assertSame(Conditional::CONDITION_CELLIS, $cond1->getConditionType());\n        self::assertSame(Conditional::OPERATOR_EQUAL, $cond1->getOperatorType());\n        self::assertFalse(($cond1->getConditions())[0]);\n        $sheet2 = $spreadsheet2->getSheet(1);\n        $condArray = $sheet2->getStyle('A1:A20')->getConditionalStyles();\n        self::assertNotEmpty($condArray);\n        $cond1 = $condArray[0];\n        self::assertSame(Conditional::CONDITION_CELLIS, $cond1->getConditionType());\n        self::assertSame(Conditional::OPERATOR_EQUAL, $cond1->getOperatorType());\n        self::assertTrue(($cond1->getConditions())[0]);\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Exception as ssException;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\CellMatcher;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellMatcherTest extends TestCase\n{\n    protected ?Spreadsheet $spreadsheet = null;\n\n    protected function loadSpreadsheet(): Spreadsheet\n    {\n        $filename = 'tests/data/Style/ConditionalFormatting/CellMatcher.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n\n        return $reader->load($filename);\n    }\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    private function confirmString(Worksheet $worksheet, Cell $cell, string $cellAddress): string\n    {\n        $cfRange = $worksheet->getConditionalRange($cell->getCoordinate()) ?? '';\n        if ($cfRange === '') {\n            self::fail(\"{$cellAddress} is not in a Conditional Format range\");\n        }\n\n        return $cfRange;\n    }\n\n    /** @param mixed[] $expectedMatches */\n    #[DataProvider('basicCellIsComparisonDataProvider')]\n    public function testBasicCellIsComparison(string $sheetname, string $cellAddress, array $expectedMatches): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyles = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        foreach ($cfStyles as $cfIndex => $cfStyle) {\n            $match = $matcher->evaluateConditional($cfStyle);\n            self::assertSame($expectedMatches[$cfIndex], $match);\n        }\n    }\n\n    public static function basicCellIsComparisonDataProvider(): array\n    {\n        return [\n            // Less than/Equal/Greater than with Literal\n            'A2' => ['cellIs Comparison', 'A2', [false, false, true]],\n            'C3' => ['cellIs Comparison', 'C3', [false, true, false]],\n            'E6' => ['cellIs Comparison', 'E6', [true, false, false]],\n            // Less than/Equal/Greater than with Cell Reference\n            'A12' => ['cellIs Comparison', 'A12', [false, false, true]],\n            'C12' => ['cellIs Comparison', 'C12', [false, true, false]],\n            'E12' => ['cellIs Comparison', 'E12', [true, false, false]],\n            // Compare Text with Cell containing Formula\n            'A20' => ['cellIs Comparison', 'A20', [true]],\n            'B20' => ['cellIs Comparison', 'B20', [false]],\n            // Compare Text with Formula referencing relative cells\n            'A24' => ['cellIs Comparison', 'A24', [true]],\n            'B24' => ['cellIs Comparison', 'B24', [false]],\n            'A25' => ['cellIs Comparison', 'A25', [false]],\n            'B25' => ['cellIs Comparison', 'B25', [true]],\n            // Compare Cell Greater/Less with Vertical Cell Reference\n            'A30' => ['cellIs Comparison', 'A30', [false, true]],\n            'A31' => ['cellIs Comparison', 'A31', [true, false]],\n            'A32' => ['cellIs Comparison', 'A32', [false, true]],\n            'A33' => ['cellIs Comparison', 'A33', [true, false]],\n            'A34' => ['cellIs Comparison', 'A34', [false, false]],\n            'A35' => ['cellIs Comparison', 'A35', [false, true]],\n            'A36' => ['cellIs Comparison', 'A36', [true, false]],\n            'A37' => ['cellIs Comparison', 'A37', [true, false]],\n        ];\n    }\n\n    public function testNotInRange(): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $sheetname = 'cellIs Comparison';\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell('J20');\n\n        $cfRange = $worksheet->getConditionalRange($cell->getCoordinate());\n        self::assertNull($cfRange);\n    }\n\n    public function testUnknownSheet(): void\n    {\n        $this->expectException(ssException::class);\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $sheetname = 'cellIs Comparisonxxx';\n        $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n    }\n\n    #[DataProvider('rangeCellIsComparisonDataProvider')]\n    public function testRangeCellIsComparison(string $sheetname, string $cellAddress, bool $expectedMatch): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyle = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        $match = $matcher->evaluateConditional($cfStyle[0]);\n        self::assertSame($expectedMatch, $match);\n    }\n\n    public static function rangeCellIsComparisonDataProvider(): array\n    {\n        return [\n            // Range between Literals\n            'A2' => ['cellIs Range Comparison', 'A2', false],\n            'A3' => ['cellIs Range Comparison', 'A3', true],\n            'A4' => ['cellIs Range Comparison', 'A4', true],\n            'A5' => ['cellIs Range Comparison', 'A5', true],\n            'A6' => ['cellIs Range Comparison', 'A6', false],\n            // Range between Cell References\n            'A11' => ['cellIs Range Comparison', 'A11', false],\n            'A12' => ['cellIs Range Comparison', 'A12', false],\n            'A13' => ['cellIs Range Comparison', 'A13', true],\n            // Range between unordered Cell References\n            'A17' => ['cellIs Range Comparison', 'A17', true],\n            'A18' => ['cellIs Range Comparison', 'A18', true],\n            // Range between with Formula\n            'A22' => ['cellIs Range Comparison', 'A22', false],\n            'A23' => ['cellIs Range Comparison', 'A23', true],\n            'A24' => ['cellIs Range Comparison', 'A24', false],\n        ];\n    }\n\n    /** @param mixed[] $expectedMatches */\n    #[DataProvider('cellIsExpressionMultipleDataProvider')]\n    public function testCellIsMultipleExpression(string $sheetname, string $cellAddress, array $expectedMatches): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyles = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        foreach ($cfStyles as $cfIndex => $cfStyle) {\n            $match = $matcher->evaluateConditional($cfStyle);\n            self::assertSame($expectedMatches[$cfIndex], $match);\n        }\n    }\n\n    public static function cellIsExpressionMultipleDataProvider(): array\n    {\n        return [\n            // Odd/Even\n            'A2' => ['cellIs Expression', 'A2', [false, true]],\n            'A3' => ['cellIs Expression', 'A3', [true, false]],\n            'B3' => ['cellIs Expression', 'B3', [false, true]],\n            'C3' => ['cellIs Expression', 'C3', [true, false]],\n            'E4' => ['cellIs Expression', 'E4', [false, true]],\n            'E5' => ['cellIs Expression', 'E5', [true, false]],\n            'E6' => ['cellIs Expression', 'E6', [false, true]],\n        ];\n    }\n\n    #[DataProvider('cellIsExpressionDataProvider')]\n    public function testCellIsExpression(string $sheetname, string $cellAddress, bool $expectedMatch): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyle = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        $match = $matcher->evaluateConditional($cfStyle[0]);\n        self::assertSame($expectedMatch, $match);\n    }\n\n    public static function cellIsExpressionDataProvider(): array\n    {\n        return [\n            // Sales Grid for Country\n            ['cellIs Expression', 'A12', false],\n            ['cellIs Expression', 'B12', false],\n            ['cellIs Expression', 'C12', false],\n            ['cellIs Expression', 'D12', false],\n            ['cellIs Expression', 'B13', true],\n            ['cellIs Expression', 'C13', true],\n            ['cellIs Expression', 'B15', true],\n            ['cellIs Expression', 'B16', true],\n            ['cellIs Expression', 'C17', false],\n            // Sales Grid for Country and Quarter\n            ['cellIs Expression', 'A22', false],\n            ['cellIs Expression', 'B22', false],\n            ['cellIs Expression', 'C22', false],\n            ['cellIs Expression', 'D22', false],\n            ['cellIs Expression', 'B23', true],\n            ['cellIs Expression', 'C23', true],\n            ['cellIs Expression', 'B25', false],\n            ['cellIs Expression', 'B26', true],\n            ['cellIs Expression', 'C27', false],\n        ];\n    }\n\n    #[DataProvider('textExpressionsDataProvider')]\n    public function testTextExpressions(string $sheetname, string $cellAddress, bool $expectedMatch): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyle = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        $match = $matcher->evaluateConditional($cfStyle[0]);\n        self::assertSame($expectedMatch, $match);\n    }\n\n    public static function textExpressionsDataProvider(): array\n    {\n        return [\n            // Text Begins With Literal\n            ['Text Expressions', 'A2', true],\n            ['Text Expressions', 'B2', false],\n            ['Text Expressions', 'A3', false],\n            ['Text Expressions', 'B3', false],\n            ['Text Expressions', 'A4', false],\n            ['Text Expressions', 'B4', true],\n            // Text Ends With Literal\n            ['Text Expressions', 'A8', false],\n            ['Text Expressions', 'B8', false],\n            ['Text Expressions', 'A9', true],\n            ['Text Expressions', 'B9', true],\n            ['Text Expressions', 'A10', false],\n            ['Text Expressions', 'B10', true],\n            // Text Contains Literal\n            ['Text Expressions', 'A14', true],\n            ['Text Expressions', 'B14', false],\n            ['Text Expressions', 'A15', true],\n            ['Text Expressions', 'B15', true],\n            ['Text Expressions', 'A16', false],\n            ['Text Expressions', 'B16', true],\n            // Text Doesn't Contain Literal\n            ['Text Expressions', 'A20', true],\n            ['Text Expressions', 'B20', true],\n            ['Text Expressions', 'A21', true],\n            ['Text Expressions', 'B21', true],\n            ['Text Expressions', 'A22', false],\n            ['Text Expressions', 'B22', true],\n            // Text Begins With Cell Reference\n            ['Text Expressions', 'D2', true],\n            ['Text Expressions', 'E2', false],\n            ['Text Expressions', 'D3', false],\n            ['Text Expressions', 'E3', false],\n            ['Text Expressions', 'D4', false],\n            ['Text Expressions', 'E4', true],\n            // Text Ends With Cell Reference\n            ['Text Expressions', 'D8', false],\n            ['Text Expressions', 'E8', false],\n            ['Text Expressions', 'D9', true],\n            ['Text Expressions', 'E9', true],\n            ['Text Expressions', 'D10', false],\n            ['Text Expressions', 'E10', true],\n            // Text Contains Cell Reference\n            ['Text Expressions', 'D14', true],\n            ['Text Expressions', 'E14', false],\n            ['Text Expressions', 'D15', true],\n            ['Text Expressions', 'E15', true],\n            ['Text Expressions', 'D16', false],\n            ['Text Expressions', 'E16', true],\n            // Text Doesn't Contain Cell Reference\n            ['Text Expressions', 'D20', true],\n            ['Text Expressions', 'E20', true],\n            ['Text Expressions', 'D21', true],\n            ['Text Expressions', 'E21', true],\n            ['Text Expressions', 'D22', false],\n            ['Text Expressions', 'E22', true],\n            // Text Begins With Formula\n            ['Text Expressions', 'G2', true],\n            ['Text Expressions', 'H2', false],\n            ['Text Expressions', 'G3', false],\n            ['Text Expressions', 'H3', false],\n            ['Text Expressions', 'G4', false],\n            ['Text Expressions', 'H4', true],\n            // Text Ends With Formula\n            ['Text Expressions', 'G8', false],\n            ['Text Expressions', 'H8', false],\n            ['Text Expressions', 'G9', true],\n            ['Text Expressions', 'H9', true],\n            ['Text Expressions', 'G10', false],\n            ['Text Expressions', 'H10', true],\n            // Text Contains Formula\n            ['Text Expressions', 'G14', true],\n            ['Text Expressions', 'H14', false],\n            ['Text Expressions', 'G15', true],\n            ['Text Expressions', 'H15', true],\n            ['Text Expressions', 'G16', false],\n            ['Text Expressions', 'H16', true],\n            // Text Doesn't Contain Formula\n            ['Text Expressions', 'G20', true],\n            ['Text Expressions', 'H20', true],\n            ['Text Expressions', 'G21', true],\n            ['Text Expressions', 'H21', true],\n            ['Text Expressions', 'G22', false],\n            ['Text Expressions', 'H22', true],\n        ];\n    }\n\n    /** @param mixed[] $expectedMatches */\n    #[DataProvider('blanksDataProvider')]\n    public function testBlankExpressions(string $sheetname, string $cellAddress, array $expectedMatches): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyles = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        foreach ($cfStyles as $cfIndex => $cfStyle) {\n            $match = $matcher->evaluateConditional($cfStyle);\n            self::assertSame($expectedMatches[$cfIndex], $match);\n        }\n    }\n\n    public static function blanksDataProvider(): array\n    {\n        return [\n            // Blank/Not Blank\n            'A2' => ['Blank Expressions', 'A2', [false, true]],\n            'B2' => ['Blank Expressions', 'B2', [true, false]],\n            'A3' => ['Blank Expressions', 'A3', [true, false]],\n            'B3' => ['Blank Expressions', 'B3', [false, true]],\n        ];\n    }\n\n    /** @param mixed[] $expectedMatches */\n    #[DataProvider('errorDataProvider')]\n    public function testErrorExpressions(string $sheetname, string $cellAddress, array $expectedMatches): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyles = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        foreach ($cfStyles as $cfIndex => $cfStyle) {\n            $match = $matcher->evaluateConditional($cfStyle);\n            self::assertSame($expectedMatches[$cfIndex], $match);\n        }\n    }\n\n    public static function errorDataProvider(): array\n    {\n        return [\n            // Error/Not Error\n            'C2' => ['Error Expressions', 'C2', [false, true]],\n            'C4' => ['Error Expressions', 'C4', [true, false]],\n            'C5' => ['Error Expressions', 'C5', [false, true]],\n        ];\n    }\n\n    #[DataProvider('dateOccurringDataProvider')]\n    public function testDateOccurringExpressions(string $sheetname, string $cellAddress, bool $expectedMatch): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyle = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        $match = $matcher->evaluateConditional($cfStyle[0]);\n        self::assertSame($expectedMatch, $match);\n    }\n\n    public static function dateOccurringDataProvider(): array\n    {\n        return [\n            // Today\n            ['Date Expressions', 'B9', false],\n            ['Date Expressions', 'B10', true],\n            ['Date Expressions', 'B11', false],\n            // Yesterday\n            ['Date Expressions', 'C9', true],\n            ['Date Expressions', 'C10', false],\n            ['Date Expressions', 'C11', false],\n            // Tomorrow\n            ['Date Expressions', 'D9', false],\n            ['Date Expressions', 'D10', false],\n            ['Date Expressions', 'D11', true],\n            // Last  Daye\n            ['Date Expressions', 'E7', false],\n            ['Date Expressions', 'E8', true],\n            ['Date Expressions', 'E9', true],\n            ['Date Expressions', 'E10', true],\n            ['Date Expressions', 'E11', false],\n        ];\n    }\n\n    /** @param mixed[] $expectedMatches */\n    #[DataProvider('duplicatesDataProvider')]\n    public function testDuplicatesExpressions(string $sheetname, string $cellAddress, array $expectedMatches): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyles = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        foreach ($cfStyles as $cfIndex => $cfStyle) {\n            $match = $matcher->evaluateConditional($cfStyle);\n            self::assertSame($expectedMatches[$cfIndex], $match);\n        }\n    }\n\n    public static function duplicatesDataProvider(): array\n    {\n        return [\n            // Duplicate/Unique\n            'A2' => ['Duplicates Expressions', 'A2', [true, false]],\n            'B2' => ['Duplicates Expressions', 'B2', [false, true]],\n            'A4' => ['Duplicates Expressions', 'A4', [true, false]],\n            'A5' => ['Duplicates Expressions', 'A5', [false, true]],\n            'B5' => ['Duplicates Expressions', 'B5', [true, false]],\n            'A9' => ['Duplicates Expressions', 'A9', [true, false]],\n            'B9' => ['Duplicates Expressions', 'B9', [false, true]],\n        ];\n    }\n\n    #[DataProvider('textCrossWorksheetDataProvider')]\n    public function testCrossWorksheetExpressions(string $sheetname, string $cellAddress, bool $expectedMatch): void\n    {\n        $this->spreadsheet = $this->loadSpreadsheet();\n        $worksheet = $this->spreadsheet->getSheetByNameOrThrow($sheetname);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $this->confirmString($worksheet, $cell, $cellAddress);\n        $cfStyle = $worksheet->getConditionalStyles($cell->getCoordinate());\n\n        $matcher = new CellMatcher($cell, $cfRange);\n\n        $match = $matcher->evaluateConditional($cfStyle[0]);\n        self::assertSame($expectedMatch, $match);\n    }\n\n    public static function textCrossWorksheetDataProvider(): array\n    {\n        return [\n            // Relative Cell References in another Worksheet\n            'A1' => ['CrossSheet References', 'A1', false],\n            'A2' => ['CrossSheet References', 'A2', false],\n            'A3' => ['CrossSheet References', 'A3', true],\n            'A4' => ['CrossSheet References', 'A4', false],\n            'A5' => ['CrossSheet References', 'A5', false],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/PR3946Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PR3946Test extends TestCase\n{\n    public function testConditionalTextInitialized(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $cellRange = 'C3:E5';\n        $style = new Style();\n        $style->applyFromArray([\n            'fill' => [\n                'color' => ['argb' => 'FFFFC000'],\n                'fillType' => Fill::FILL_SOLID,\n            ],\n        ]);\n\n        $condition = new Conditional();\n        $condition->setConditionType(Conditional::CONDITION_CONTAINSTEXT);\n        $condition->setOperatorType(Conditional::OPERATOR_CONTAINSTEXT);\n        $condition->setStyle($style);\n        $sheet->setConditionalStyles($cellRange, [$condition]);\n\n        $writer = new XlsxWriter($spreadsheet);\n\n        $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString('<conditionalFormatting sqref=\"C3:E5\">', $data);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/BlankWizardTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BlankWizardTest extends TestCase\n{\n    protected Style $style;\n\n    protected string $range = '$C$3:$E$5';\n\n    protected Wizard $wizardFactory;\n\n    protected function setUp(): void\n    {\n        $this->wizardFactory = new Wizard($this->range);\n        $this->style = new Style();\n    }\n\n    public function testBlankWizard(): void\n    {\n        $ruleType = Wizard::BLANKS;\n        $wizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\Blanks::class, $wizard);\n        $wizard->setStyle($this->style);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CONTAINSBLANKS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['LEN(TRIM(C3))=0'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testNonBlankWizard(): void\n    {\n        $ruleType = Wizard::NOT_BLANKS;\n        $wizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\Blanks::class, $wizard);\n        $wizard->setStyle($this->style);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_NOTCONTAINSBLANKS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['LEN(TRIM(C3))>0'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testBlankWizardWithNotBlank(): void\n    {\n        $ruleType = Wizard::BLANKS;\n        /** @var Wizard\\Blanks $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->notBlank();\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_NOTCONTAINSBLANKS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['LEN(TRIM(C3))>0'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testNonBlankWizardWithIsBlank(): void\n    {\n        $ruleType = Wizard::NOT_BLANKS;\n        /** @var Wizard\\Blanks $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->isBlank();\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CONTAINSBLANKS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['LEN(TRIM(C3))=0'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testInvalidFromConditional(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Conditional is not a Blanks CF Rule conditional');\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($ruleType);\n        Wizard\\Blanks::fromConditional($conditional);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CellValueWizardTest extends TestCase\n{\n    protected Style $style;\n\n    protected string $range = '$C$3:$E$5';\n\n    protected Wizard $wizardFactory;\n\n    protected function setUp(): void\n    {\n        $this->wizardFactory = new Wizard($this->range);\n        $this->style = new Style();\n    }\n\n    #[DataProvider('basicCellValueDataProvider')]\n    public function testBasicCellValueWizard(string $operator, mixed $operand, string $expectedOperator, mixed $expectedCondition): void\n    {\n        $ruleType = Wizard::CELL_VALUE;\n        /** @var Wizard\\CellValue $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->$operator($operand);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CELLIS, $conditional->getConditionType());\n        self::assertSame($expectedOperator, $conditional->getOperatorType());\n        $conditions = $conditional->getConditions();\n        self::assertSame([$expectedCondition], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public static function basicCellValueDataProvider(): array\n    {\n        return [\n            '=5' => ['equals', 5, Conditional::OPERATOR_EQUAL, 5],\n            '<>-2' => ['notEquals', -2, Conditional::OPERATOR_NOTEQUAL, -2],\n            '>3' => ['greaterThan', 3, Conditional::OPERATOR_GREATERTHAN, 3],\n            '>=5.5' => ['greaterThanOrEqual', 5.5, Conditional::OPERATOR_GREATERTHANOREQUAL, 5.5],\n            '<-1.5' => ['lessThan', -1.5, Conditional::OPERATOR_LESSTHAN, -1.5],\n            '<=22>' => ['lessThanOrEqual', 22, Conditional::OPERATOR_LESSTHANOREQUAL, 22],\n            '= Boolean True Value' => ['equals', true, Conditional::OPERATOR_EQUAL, 'TRUE'],\n            '= Boolean False Value' => ['equals', false, Conditional::OPERATOR_EQUAL, 'FALSE'],\n            '= Null Value' => ['equals', null, Conditional::OPERATOR_EQUAL, 'NULL'],\n            '= String Value' => ['equals', 'Hello World', Conditional::OPERATOR_EQUAL, '\"Hello World\"'],\n        ];\n    }\n\n    #[DataProvider('relativeCellValueDataProvider')]\n    public function testRelativeCellValueWizard(mixed $operand, mixed $expectedCondition): void\n    {\n        $ruleType = Wizard::CELL_VALUE;\n        /** @var Wizard\\CellValue $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->equals($operand, Wizard::VALUE_TYPE_CELL);\n\n        $conditional = $wizard->getConditional();\n        $conditions = $conditional->getConditions();\n        self::assertSame([$expectedCondition], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public static function relativeCellValueDataProvider(): array\n    {\n        return [\n            '= Cell value unpinned' => ['A1', 'C3'],\n            '= Cell value pinned column' => ['$G1', '$G3'],\n            '= Cell value pinned row' => ['A$10', 'C$10'],\n            '= Cell value pinned cell' => ['$A$1', '$A$1'],\n        ];\n    }\n\n    #[DataProvider('formulaCellValueDataProvider')]\n    public function testCellValueWizardWithFormula(mixed $operand, mixed $expectedCondition): void\n    {\n        $ruleType = Wizard::CELL_VALUE;\n        /** @var Wizard\\CellValue $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->equals($operand, Wizard::VALUE_TYPE_FORMULA);\n\n        $conditional = $wizard->getConditional();\n        $conditions = $conditional->getConditions();\n        self::assertSame([$expectedCondition], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public static function formulaCellValueDataProvider(): array\n    {\n        return [\n            '= Cell value unpinned in function' => ['SQRT(A1)', 'SQRT(C3)'],\n            '= Cell value pinned column in function' => ['SQRT($G1)', 'SQRT($G3)'],\n            '= Cell value pinned row in function' => ['SQRT(A$10)', 'SQRT(C$10)'],\n            '= Cell value pinned cell in function' => ['SQRT($A$1)', 'SQRT($A$1)'],\n            '= Cell value unpinned in expression' => ['A1+B2', 'C3+D4'],\n            '= Cell value pinned column in expression' => ['$G1+$H2', '$G3+$H4'],\n            '= Cell value pinned row in expression' => ['A$10+B$11', 'C$10+D$11'],\n            '= Cell value pinned cell in expression' => ['$A$1+$B$2', '$A$1+$B$2'],\n        ];\n    }\n\n    /** @param mixed[] $operands */\n    #[DataProvider('rangeCellValueDataProvider')]\n    public function testRangeCellValueWizard(string $operator, array $operands, string $expectedOperator): void\n    {\n        $ruleType = Wizard::CELL_VALUE;\n        /** @var Wizard\\CellValue */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        /** @var Wizard\\CellValue */\n        $temp = $wizard->$operator($operands[0]);\n        $temp->and($operands[1]);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CELLIS, $conditional->getConditionType());\n        self::assertSame($expectedOperator, $conditional->getOperatorType());\n        $conditions = $conditional->getConditions();\n        self::assertSame($operands, $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public static function rangeCellValueDataProvider(): array\n    {\n        return [\n            'between 5 and 10' => ['between', [5, 10], Conditional::OPERATOR_BETWEEN],\n            'between 10 and 5' => ['between', [10, 5], Conditional::OPERATOR_BETWEEN],\n            'not between 0 and 1' => ['notBetween', [0, 1], Conditional::OPERATOR_NOTBETWEEN],\n        ];\n    }\n\n    /**\n     * @param mixed[] $operands\n     * @param mixed[] $expectedConditions\n     */\n    #[DataProvider('rangeRelativeCellValueDataProvider')]\n    public function testRelativeRangeCellValueWizard(array $operands, array $expectedConditions): void\n    {\n        $ruleType = Wizard::CELL_VALUE;\n        /** @var Wizard\\CellValue $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard\n            ->between($operands[0], is_string($operands[0]) ? Wizard::VALUE_TYPE_CELL : Wizard::VALUE_TYPE_LITERAL)\n            ->and($operands[1], is_string($operands[1]) ? Wizard::VALUE_TYPE_CELL : Wizard::VALUE_TYPE_LITERAL);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CELLIS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame($expectedConditions, $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public static function rangeRelativeCellValueDataProvider(): array\n    {\n        return [\n            'between A6 and 5' => [['A$6', 5], ['C$6', 5]],\n            'between -5 and C6' => [[-5, '$C6'], [-5, '$C8']],\n        ];\n    }\n\n    /**\n     * @param mixed[] $operands\n     * @param mixed[] $expectedConditions\n     */\n    #[DataProvider('rangeFormulaCellValueDataProvider')]\n    public function testFormulaRangeCellValueWizard(array $operands, array $expectedConditions): void\n    {\n        $ruleType = Wizard::CELL_VALUE;\n        /** @var Wizard\\CellValue $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard\n            ->between($operands[0], is_string($operands[0]) ? Wizard::VALUE_TYPE_FORMULA : Wizard::VALUE_TYPE_LITERAL)\n            ->and($operands[1], is_string($operands[1]) ? Wizard::VALUE_TYPE_FORMULA : Wizard::VALUE_TYPE_LITERAL);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CELLIS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame($expectedConditions, $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public static function rangeFormulaCellValueDataProvider(): array\n    {\n        return [\n            'between yesterday and tomorrow' => [['TODAY()-1', 'TODAY()+1'], ['TODAY()-1', 'TODAY()+1']],\n        ];\n    }\n\n    public function testInvalidFromConditional(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Conditional is not a Cell Value CF Rule conditional');\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($ruleType);\n        Wizard\\CellValue::fromConditional($conditional);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateValueWizardTest extends TestCase\n{\n    protected Style $style;\n\n    protected string $range = '$C$3:$E$5';\n\n    protected Wizard $wizardFactory;\n\n    protected function setUp(): void\n    {\n        $this->wizardFactory = new Wizard($this->range);\n        $this->style = new Style();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('dateValueWizardProvider')]\n    public function testDateValueWizard(string $operator, string $expectedReference, string $expectedExpression): void\n    {\n        $ruleType = Wizard::DATES_OCCURRING;\n        /** @var Wizard\\DateValue $dateWizard */\n        $dateWizard = $this->wizardFactory->newRule($ruleType);\n        $dateWizard->setStyle($this->style);\n\n        $dateWizard->$operator();\n\n        $conditional = $dateWizard->getConditional();\n        self::assertSame(Conditional::CONDITION_TIMEPERIOD, $conditional->getConditionType());\n        self:self::assertSame($expectedReference, $conditional->getText());\n        $conditions = $conditional->getConditions();\n        self::assertSame([$expectedExpression], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $dateWizard, 'fromConditional() Failure');\n    }\n\n    public static function dateValueWizardProvider(): array\n    {\n        return [\n            ['today', 'today', 'FLOOR(C3,1)=TODAY()'],\n            ['yesterday', 'yesterday', 'FLOOR(C3,1)=TODAY()-1'],\n            ['tomorrow', 'tomorrow', 'FLOOR(C3,1)=TODAY()+1'],\n            ['lastSevenDays', 'last7Days', 'AND(TODAY()-FLOOR(C3,1)<=6,FLOOR(C3,1)<=TODAY())'],\n        ];\n    }\n\n    public function testInvalidFromConditional(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Conditional is not a Date Value CF Rule conditional');\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($ruleType);\n        Wizard\\DateValue::fromConditional($conditional);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DuplicatesWizardTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DuplicatesWizardTest extends TestCase\n{\n    protected Style $style;\n\n    protected string $range = '$C$3:$E$5';\n\n    protected Wizard $wizardFactory;\n\n    protected function setUp(): void\n    {\n        $this->wizardFactory = new Wizard($this->range);\n        $this->style = new Style();\n    }\n\n    public function testDuplicateWizard(): void\n    {\n        $ruleType = Wizard::DUPLICATES;\n        $wizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\Duplicates::class, $wizard);\n        $wizard->setStyle($this->style);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_DUPLICATES, $conditional->getConditionType());\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testUniqueWizard(): void\n    {\n        $ruleType = Wizard::UNIQUE;\n        $wizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\Duplicates::class, $wizard);\n        $wizard->setStyle($this->style);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_UNIQUE, $conditional->getConditionType());\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testDuplicateWizardUnique(): void\n    {\n        $ruleType = Wizard::DUPLICATES;\n        /** @var Wizard\\Duplicates $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->unique();\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_UNIQUE, $conditional->getConditionType());\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testUniqueWizardDuplicates(): void\n    {\n        $ruleType = Wizard::UNIQUE;\n        /** @var Wizard\\Duplicates $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->duplicates();\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_DUPLICATES, $conditional->getConditionType());\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testInvalidFromConditional(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Conditional is not a Duplicates CF Rule conditional');\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($ruleType);\n        Wizard\\Duplicates::fromConditional($conditional);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ErrorWizardTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ErrorWizardTest extends TestCase\n{\n    protected Style $style;\n\n    protected string $range = '$C$3:$E$5';\n\n    protected Wizard $wizardFactory;\n\n    protected function setUp(): void\n    {\n        $this->wizardFactory = new Wizard($this->range);\n        $this->style = new Style();\n    }\n\n    public function testErrorWizard(): void\n    {\n        $ruleType = Wizard::ERRORS;\n        $wizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\Errors::class, $wizard);\n        $wizard->setStyle($this->style);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CONTAINSERRORS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['ISERROR(C3)'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testNonErrorWizard(): void\n    {\n        $ruleType = Wizard::NOT_ERRORS;\n        $wizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\Errors::class, $wizard);\n        $wizard->setStyle($this->style);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_NOTCONTAINSERRORS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['NOT(ISERROR(C3))'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testErrorWizardNotError(): void\n    {\n        $ruleType = Wizard::ERRORS;\n        /** @var Wizard\\Errors $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->notError();\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_NOTCONTAINSERRORS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['NOT(ISERROR(C3))'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testErrorWizardIsError(): void\n    {\n        $ruleType = Wizard::NOT_ERRORS;\n        /** @var Wizard\\Errors $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->isError();\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CONTAINSERRORS, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['ISERROR(C3)'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    public function testInvalidFromConditional(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Conditional is not an Errors CF Rule conditional');\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($ruleType);\n        Wizard\\Errors::fromConditional($conditional);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ExpressionWizardTest extends TestCase\n{\n    protected Style $style;\n\n    protected string $range = '$C$3:$E$5';\n\n    protected Wizard $wizardFactory;\n\n    protected function setUp(): void\n    {\n        $this->wizardFactory = new Wizard($this->range);\n        $this->style = new Style();\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('expressionDataProvider')]\n    public function testExpressionWizard(string $expression, string $expectedExpression): void\n    {\n        $ruleType = Wizard::EXPRESSION;\n        /** @var Wizard\\Expression $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->expression($expression);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_EXPRESSION, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame([$expectedExpression], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('expressionDataProvider')]\n    public function testExpressionWizardUsingAlias(string $expression, string $expectedExpression): void\n    {\n        $ruleType = Wizard::EXPRESSION;\n        /** @var Wizard\\Expression $wizard */\n        $wizard = $this->wizardFactory->newRule($ruleType);\n\n        $wizard->setStyle($this->style);\n        $wizard->formula($expression);\n\n        $conditional = $wizard->getConditional();\n        self::assertSame(Conditional::CONDITION_EXPRESSION, $conditional->getConditionType());\n        $conditions = $conditional->getConditions();\n        self::assertSame([$expectedExpression], $conditions);\n    }\n\n    public static function expressionDataProvider(): array\n    {\n        return [\n            ['ISODD(A1)', 'ISODD(C3)'],\n            ['AND($A1=\"USA\",$B1=\"Q4\")', 'AND($A3=\"USA\",$B3=\"Q4\")'],\n        ];\n    }\n\n    public function testInvalidFromConditional(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Conditional is not an Expression CF Rule conditional');\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($ruleType);\n        Wizard\\Expression::fromConditional($conditional);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/TextValueWizardTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TextValueWizardTest extends TestCase\n{\n    protected Style $style;\n\n    protected string $range = '$C$3:$E$5';\n\n    protected Wizard $wizardFactory;\n\n    protected function setUp(): void\n    {\n        $this->wizardFactory = new Wizard($this->range);\n        $this->style = new Style();\n    }\n\n    public function testTextContainsWizardWithText(): void\n    {\n        $ruleType = Wizard::TEXT_VALUE;\n        $textWizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\TextValue::class, $textWizard);\n\n        $textWizard->setStyle($this->style);\n        $textWizard->contains('LL');\n\n        $conditional = $textWizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CONTAINSTEXT, $conditional->getConditionType());\n        self::assertSame(Conditional::OPERATOR_CONTAINSTEXT, $conditional->getOperatorType());\n        self::assertSame('LL', $conditional->getText());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['NOT(ISERROR(SEARCH(\"LL\",C3)))'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $textWizard, 'fromConditional() Failure');\n    }\n\n    public function testTextContainsWizardWithCellReference(): void\n    {\n        $ruleType = Wizard::TEXT_VALUE;\n        $textWizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\TextValue::class, $textWizard);\n\n        $textWizard->setStyle($this->style);\n        $textWizard->contains('$A1', Wizard::VALUE_TYPE_CELL);\n\n        $conditional = $textWizard->getConditional();\n        self::assertSame(Conditional::CONDITION_CONTAINSTEXT, $conditional->getConditionType());\n        self:self::assertSame(Conditional::OPERATOR_CONTAINSTEXT, $conditional->getOperatorType());\n        self::assertSame('$A3', $conditional->getText());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['NOT(ISERROR(SEARCH($A3,C3)))'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $textWizard, 'fromConditional() Failure');\n    }\n\n    public function testTextNotContainsWizardWithText(): void\n    {\n        $ruleType = Wizard::TEXT_VALUE;\n        $textWizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\TextValue::class, $textWizard);\n\n        $textWizard->setStyle($this->style);\n        $textWizard->doesNotContain('LL');\n\n        $conditional = $textWizard->getConditional();\n        self::assertSame(Conditional::CONDITION_NOTCONTAINSTEXT, $conditional->getConditionType());\n        self:self::assertSame(Conditional::OPERATOR_NOTCONTAINS, $conditional->getOperatorType());\n        self::assertSame('LL', $conditional->getText());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['ISERROR(SEARCH(\"LL\",C3))'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $textWizard, 'fromConditional() Failure');\n    }\n\n    public function testTextBeginsWithWizardWithText(): void\n    {\n        $ruleType = Wizard::TEXT_VALUE;\n        $textWizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\TextValue::class, $textWizard);\n\n        $textWizard->setStyle($this->style);\n        $textWizard->beginsWith('LL');\n\n        $conditional = $textWizard->getConditional();\n        self::assertSame(Conditional::CONDITION_BEGINSWITH, $conditional->getConditionType());\n        self:self::assertSame(Conditional::OPERATOR_BEGINSWITH, $conditional->getOperatorType());\n        self::assertSame('LL', $conditional->getText());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['LEFT(C3,LEN(\"LL\"))=\"LL\"'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $textWizard, 'fromConditional() Failure');\n    }\n\n    public function testTextEndsWithWizardWithText(): void\n    {\n        $ruleType = Wizard::TEXT_VALUE;\n        $textWizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf(Wizard\\TextValue::class, $textWizard);\n\n        $textWizard->setStyle($this->style);\n        $textWizard->endsWith('LL');\n\n        $conditional = $textWizard->getConditional();\n        self::assertSame(Conditional::CONDITION_ENDSWITH, $conditional->getConditionType());\n        self:self::assertSame(Conditional::OPERATOR_ENDSWITH, $conditional->getOperatorType());\n        $conditions = $conditional->getConditions();\n        self::assertSame(['RIGHT(C3,LEN(\"LL\"))=\"LL\"'], $conditions);\n\n        $newWizard = Wizard::fromConditional($conditional, $this->range);\n        $newWizard->getConditional();\n        self::assertEquals($newWizard, $textWizard, 'fromConditional() Failure');\n    }\n\n    public function testInvalidFromConditional(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Conditional is not a Text Value CF Rule conditional');\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($ruleType);\n        Wizard\\TextValue::fromConditional($conditional);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\ConditionalFormatting\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WizardFactoryTest extends TestCase\n{\n    protected Wizard $wizardFactory;\n\n    protected function setUp(): void\n    {\n        $range = '$C$3:$E$5';\n        $this->wizardFactory = new Wizard($range);\n    }\n\n    /**\n     * @psalm-param class-string<object> $expectedWizard\n     */\n    #[DataProvider('basicWizardFactoryProvider')]\n    public function testBasicWizardFactory(string $ruleType, string $expectedWizard): void\n    {\n        $wizard = $this->wizardFactory->newRule($ruleType);\n        self::assertInstanceOf($expectedWizard, $wizard);\n    }\n\n    public static function basicWizardFactoryProvider(): array\n    {\n        return [\n            'CellValue Wizard' => [Wizard::CELL_VALUE, Wizard\\CellValue::class],\n            'TextValue Wizard' => [Wizard::TEXT_VALUE, Wizard\\TextValue::class],\n            'Blanks Wizard' => [Wizard::BLANKS, Wizard\\Blanks::class],\n            'Blanks Wizard (NOT)' => [Wizard::NOT_BLANKS, Wizard\\Blanks::class],\n            'Errors Wizard' => [Wizard::ERRORS, Wizard\\Errors::class],\n            'Errors Wizard (NOT)' => [Wizard::NOT_ERRORS, Wizard\\Errors::class],\n            'Expression Wizard' => [Wizard::EXPRESSION, Wizard\\Expression::class],\n            'DateValue Wizard' => [Wizard::DATES_OCCURRING, Wizard\\DateValue::class],\n        ];\n    }\n\n    /** @param mixed[] $expectedWizards */\n    #[DataProvider('conditionalProvider')]\n    public function testWizardFromConditional(string $sheetName, string $cellAddress, array $expectedWizards): void\n    {\n        $filename = 'tests/data/Style/ConditionalFormatting/CellMatcher.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getSheetByNameOrThrow($sheetName);\n        $cell = $worksheet->getCell($cellAddress);\n\n        $cfRange = $worksheet->getConditionalRange($cell->getCoordinate());\n        if ($cfRange === null) {\n            self::markTestSkipped(\"{$cellAddress} is not in a Conditional Format range\");\n        }\n        $conditionals = $worksheet->getConditionalStyles($cfRange);\n\n        foreach ($conditionals as $index => $conditional) {\n            $wizard = Wizard::fromConditional($conditional);\n            self::assertEquals($expectedWizards[$index], $wizard::class);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function conditionalProvider(): array\n    {\n        return [\n            'cellIs Comparison A2' => ['cellIs Comparison', 'A2', [Wizard\\CellValue::class, Wizard\\CellValue::class, Wizard\\CellValue::class]],\n            'cellIs Expression A2' => ['cellIs Expression', 'A2', [Wizard\\Expression::class, Wizard\\Expression::class]],\n            'Text Expressions A2' => ['Text Expressions', 'A2', [Wizard\\TextValue::class]],\n            'Text Expressions A8' => ['Text Expressions', 'A8', [Wizard\\TextValue::class]],\n            'Text Expressions A14' => ['Text Expressions', 'A14', [Wizard\\TextValue::class]],\n            'Text Expressions A20' => ['Text Expressions', 'A20', [Wizard\\TextValue::class]],\n            'Blank Expressions A2' => ['Blank Expressions', 'A2', [Wizard\\Blanks::class, Wizard\\Blanks::class]],\n            'Error Expressions C2' => ['Error Expressions', 'C2', [Wizard\\Errors::class, Wizard\\Errors::class]],\n            'Date Expressions B10' => ['Date Expressions', 'B10', [Wizard\\DateValue::class]],\n            'Duplicates Expressions A2' => ['Duplicates Expressions', 'A2', [Wizard\\Duplicates::class, Wizard\\Duplicates::class]],\n        ];\n    }\n\n    public function testWizardFactoryException(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('No wizard exists for this CF rule type');\n        $this->wizardFactory->newRule($ruleType);\n\n        $conditional = new Conditional();\n        $conditional->setConditionType('UNKNOWN');\n        Wizard::fromConditional($conditional);\n    }\n\n    public function testWizardFactoryFromConditionalException(): void\n    {\n        $ruleType = 'Unknown';\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('No wizard exists for this CF rule type');\n\n        $conditional = new Conditional();\n        $conditional->setConditionType($ruleType);\n        Wizard::fromConditional($conditional);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ConditionalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalTest extends TestCase\n{\n    public function testClone(): void\n    {\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $condition1->addCondition(0.6);\n        $condition1->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()->setARGB('FFFF0000');\n        $conditionclone = clone $condition1;\n        self::AssertEquals($condition1, $conditionclone);\n        self::AssertEquals($condition1->getStyle(), $conditionclone->getStyle());\n        self::AssertNotSame($condition1->getStyle(), $conditionclone->getStyle());\n    }\n\n    public function testVariousAdds(): void\n    {\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $condition1->addCondition(0.6);\n        $condition1->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()->setARGB('FFFF0000');\n        $condition2 = new Conditional();\n        $condition2->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition2->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $condition2->setConditions(0.6);\n        $condition2->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()->setARGB('FFFF0000');\n        $condition3 = new Conditional();\n        $condition3->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition3->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $condition3->setConditions([0.6]);\n        $condition3->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()->setARGB('FFFF0000');\n        self::AssertEquals($condition1, $condition2);\n        self::AssertEquals($condition1, $condition3);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ExportArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ExportArrayTest extends TestCase\n{\n    public function testStyleCopy(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('Cell A1');\n        $cell1style = $cell1->getStyle();\n        $cell1style->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);\n        $cell1style->getFont()->getColor()->setARGB('FFFF0000');\n        $cell1style->getFont()->setBold(true);\n        $cell1style->getFill()->setFillType(Fill::FILL_PATTERN_GRAY125);\n        $cell1style->getFill()->setStartColor(new Color('FF0000FF'));\n        $cell1style->getFill()->setEndColor(new Color('FF00FF00'));\n        $cell1style->getFont()->setUnderline(true);\n        self::assertEquals(Font::UNDERLINE_SINGLE, $cell1style->getFont()->getUnderline());\n        $cell1style->getProtection()->setHidden(Protection::PROTECTION_UNPROTECTED);\n        $cell1style->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED);\n        /** @var mixed[][] */\n        $styleArray = $cell1style->exportArray();\n        $cell2 = $sheet->getCell('B1');\n        $cell2->setValue('Cell B1');\n        $cell2style = $cell2->getStyle();\n        $cell2style->applyFromArray($styleArray);\n\n        self::AssertEquals($cell1style->getAlignment()->getHorizontal(), $cell2style->getAlignment()->getHorizontal());\n        self::AssertEquals($cell1style->getFont()->getColor()->getARGB(), $cell2style->getFont()->getColor()->getARGB());\n        self::AssertEquals($cell1style->getFont()->getBold(), $cell2style->getFont()->getBold());\n        self::AssertEquals($cell1style->getFont()->getUnderline(), $cell2style->getFont()->getUnderline());\n        self::AssertEquals($cell1style->getFill()->getFillType(), $cell2style->getFill()->getFillType());\n        self::AssertEquals($cell1style->getFill()->getStartColor()->getARGB(), $cell2style->getFill()->getStartColor()->getARGB());\n        self::AssertEquals($cell1style->getFill()->getEndColor()->getARGB(), $cell2style->getFill()->getEndColor()->getARGB());\n        self::AssertEquals($cell1style->getProtection()->getLocked(), $cell2style->getProtection()->getLocked());\n        self::AssertEquals($cell1style->getProtection()->getHidden(), $cell2style->getProtection()->getHidden());\n\n        self::AssertEquals($cell1style->getHashCode(), $cell2style->getHashCode());\n        self::AssertEquals($cell1style->getAlignment()->getHashCode(), $cell2style->getAlignment()->getHashCode());\n        self::AssertEquals($cell1style->getFont()->getHashCode(), $cell2style->getFont()->getHashCode());\n        self::AssertEquals($cell1style->getFill()->getHashCode(), $cell2style->getFill()->getHashCode());\n        self::AssertEquals($cell1style->getProtection()->getHashCode(), $cell2style->getProtection()->getHashCode());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStyleFromArrayCopy(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('Cell A1');\n        $cell1style = $cell1->getStyle();\n        $cell1style->getAlignment()->applyFromArray(['horizontal' => Alignment::HORIZONTAL_RIGHT]);\n        $cell1style->getFont()->getColor()->setARGB('FFFF0000');\n        $cell1style->getFont()->applyFromArray(['bold' => true]);\n        $cell1style->getFill()->applyFromArray(['fillType' => Fill::FILL_PATTERN_GRAY125]);\n        $cell1style->getFill()->getStartColor()->applyFromArray(['argb' => 'FF0000FF']);\n        $cell1style->getFill()->getEndColor()->setRGB('00FF00');\n        $cell1style->getFill()->setRotation(45);\n        $cell1style->getFont()->setUnderline(true);\n        self::assertEquals(Font::UNDERLINE_SINGLE, $cell1style->getFont()->getUnderline());\n        $cell1style->getProtection()->applyFromArray(['hidden' => Protection::PROTECTION_UNPROTECTED, 'locked' => Protection::PROTECTION_UNPROTECTED]);\n        /** @var mixed[][] */\n        $styleArray = $cell1style->exportArray();\n        $cell2 = $sheet->getCell('B1');\n        $cell2->setValue('Cell B1');\n        $cell2style = $cell2->getStyle();\n        $cell2style->applyFromArray($styleArray);\n\n        self::AssertEquals($cell1style->getAlignment()->getHorizontal(), $cell2style->getAlignment()->getHorizontal());\n        self::AssertEquals($cell1style->getFont()->getColor()->getARGB(), $cell2style->getFont()->getColor()->getARGB());\n        self::AssertEquals($cell1style->getFont()->getBold(), $cell2style->getFont()->getBold());\n        self::AssertEquals($cell1style->getFont()->getUnderline(), $cell2style->getFont()->getUnderline());\n        self::AssertEquals($cell1style->getFill()->getFillType(), $cell2style->getFill()->getFillType());\n        self::AssertEquals($cell1style->getFill()->getRotation(), $cell2style->getFill()->getRotation());\n        self::AssertEquals($cell1style->getFill()->getStartColor()->getARGB(), $cell2style->getFill()->getStartColor()->getARGB());\n        self::AssertEquals($cell1style->getFill()->getEndColor()->getARGB(), $cell2style->getFill()->getEndColor()->getARGB());\n        self::AssertEquals($cell1style->getProtection()->getLocked(), $cell2style->getProtection()->getLocked());\n        self::AssertEquals($cell1style->getProtection()->getHidden(), $cell2style->getProtection()->getHidden());\n\n        self::AssertEquals($cell1style->getFill()->getStartColor()->getHashCode(), $cell2style->getFill()->getStartColor()->getHashCode());\n        self::AssertEquals($cell1style->getFill()->getEndColor()->getHashCode(), $cell2style->getFill()->getEndColor()->getHashCode());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNumberFormat(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1style = $cell1->getStyle();\n        $fmt2 = '$ #,##0.000';\n        $cell1style->getNumberFormat()->setFormatCode($fmt2);\n        $cell1style->getFont()->setUnderline('');\n        self::assertEquals(Font::UNDERLINE_NONE, $cell1style->getFont()->getUnderline());\n        $cell1->setValue(2345.679);\n        /** @var mixed[][] */\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals('$ 2,345.679', $cell1->getFormattedValue());\n\n        $cell2 = $sheet->getCell('B1');\n        $cell2->setValue(12345.679);\n        $cell2style = $cell2->getStyle();\n        $cell2style->applyFromArray($styleArray);\n        self::assertEquals('$ 12,345.679', $cell2->getFormattedValue());\n\n        self::AssertEquals($cell1style->getNumberFormat()->getHashCode(), $cell2style->getNumberFormat()->getHashCode());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNumberFormatFromArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1style = $cell1->getStyle();\n        $fmt2 = '$ #,##0.000';\n        $cell1style->getNumberFormat()->applyFromArray(['formatCode' => $fmt2]);\n        $cell1style->getFont()->setUnderline('');\n        self::assertEquals(Font::UNDERLINE_NONE, $cell1style->getFont()->getUnderline());\n        $cell1style->getBorders()->getTop()->setBorderStyle(Border::BORDER_THIN);\n        $cell1->setValue(2345.679);\n        /** @var mixed[][] */\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals('$ 2,345.679', $cell1->getFormattedValue());\n\n        $cell2 = $sheet->getCell('B1');\n        $cell2->setValue(12345.679);\n        $cell2style = $cell2->getStyle();\n        $cell2style->applyFromArray($styleArray);\n        self::assertEquals('$ 12,345.679', $cell2->getFormattedValue());\n\n        self::AssertEquals($cell1style->getNumberFormat()->getHashCode(), $cell2style->getNumberFormat()->getHashCode());\n        self::AssertEquals($cell1style->getBorders()->getHashCode(), $cell2style->getBorders()->getHashCode());\n        self::AssertEquals($cell1style->getBorders()->getTop()->getHashCode(), $cell2style->getBorders()->getTop()->getHashCode());\n        self::AssertEquals($cell1style->getBorders()->getTop()->getBorderStyle(), $cell2style->getBorders()->getTop()->getBorderStyle());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStackedRotation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue('Cell A1');\n        $cell1style = $cell1->getStyle();\n        $cell1style->getAlignment()->setTextRotation(Alignment::TEXTROTATION_STACK_EXCEL);\n        self::assertEquals(Alignment::TEXTROTATION_STACK_PHPSPREADSHEET, $cell1style->getAlignment()->getTextRotation());\n        /** @var mixed[][] */\n        $styleArray = $cell1style->exportArray();\n        $cell2 = $sheet->getCell('B1');\n        $cell2->setValue('Cell B1');\n        $cell2style = $cell2->getStyle();\n        $cell2style->applyFromArray($styleArray);\n\n        self::AssertEquals($cell1style->getAlignment()->getTextRotation(), $cell2style->getAlignment()->getTextRotation());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFillColors(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $cell1 = $sheet->getCell('A2');\n        $cell1style = $cell1->getStyle();\n        $cell1style->getFill()\n            ->setFillType(Fill::FILL_PATTERN_GRAY125);\n        $cell1style->getFill()->getStartColor()\n            ->setArgb('FF112233');\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n                'rotation' => 0.0,\n                'endColor' => ['argb' => 'FF000000', 'theme' => -1],\n                'startColor' => ['argb' => 'FF112233', 'theme' => -1],\n            ],\n            $styleArray['fill'],\n            'changed start color with setArgb'\n        );\n\n        $cell1 = $sheet->getCell('A1');\n        $cell1style = $cell1->getStyle();\n        $cell1style->getFill()->setFillType(Fill::FILL_PATTERN_GRAY125);\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n                'rotation' => 0.0,\n            ],\n            $styleArray['fill'],\n            'default colors'\n        );\n\n        $cell1 = $sheet->getCell('A3');\n        $cell1style = $cell1->getStyle();\n        $cell1style->getFill()\n            ->setFillType(Fill::FILL_PATTERN_GRAY125);\n        $cell1style->getFill()->getEndColor()->setArgb('FF112233');\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n                'rotation' => 0.0,\n                'endColor' => ['argb' => 'FF112233', 'theme' => -1],\n                'startColor' => ['argb' => 'FFFFFFFF', 'theme' => -1],\n            ],\n            $styleArray['fill'],\n            'changed end color with setArgb'\n        );\n\n        $cell1 = $sheet->getCell('A4');\n        $cell1style = $cell1->getStyle();\n        $cell1style->getFill()\n            ->setFillType(Fill::FILL_PATTERN_GRAY125);\n        $cell1style->getFill()->setEndColor(new Color('FF0000FF'));\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n                'rotation' => 0.0,\n                'endColor' => ['argb' => 'FF0000FF', 'theme' => -1],\n                'startColor' => ['argb' => 'FFFFFFFF', 'theme' => -1],\n            ],\n            $styleArray['fill'],\n            'changed end color with setEndColor'\n        );\n\n        $cell1 = $sheet->getCell('A5');\n        $cell1style = $cell1->getStyle();\n        $cell1style->getFill()->setFillType(Fill::FILL_PATTERN_GRAY125);\n        $cell1style->getFill()\n            ->setStartColor(new Color('FF0000FF'));\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n                'rotation' => 0.0,\n                'startColor' => ['argb' => 'FF0000FF', 'theme' => -1],\n                'endColor' => ['argb' => 'FF000000', 'theme' => -1],\n            ],\n            $styleArray['fill'],\n            'changed start color with setStartColor'\n        );\n\n        $cell1 = $sheet->getCell('A6');\n        $cell1->getStyle()->getFill()->applyFromArray(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n                'rotation' => 45.0,\n                'startColor' => ['argb' => 'FF00FFFF', 'theme' => -1],\n            ]\n        );\n        $cell1style = $cell1->getStyle();\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n                'rotation' => 45.0,\n                'startColor' => ['argb' => 'FF00FFFF', 'theme' => -1],\n                'endColor' => ['argb' => 'FF000000', 'theme' => -1],\n            ],\n            $styleArray['fill'],\n            'applyFromArray with startColor'\n        );\n\n        $cell1 = $sheet->getCell('A7');\n        $cell1->getStyle()->getFill()->applyFromArray(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n            ]\n        );\n        $cell1style = $cell1->getStyle();\n        $styleArray = $cell1style->exportArray();\n        self::assertEquals(\n            [\n                'fillType' => Fill::FILL_PATTERN_GRAY125,\n                'rotation' => 0.0,\n            ],\n            $styleArray['fill'],\n            'applyFromArray without start/endColor'\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testQuotePrefix(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')\n            ->setValueExplicit('=1+2', DataType::TYPE_STRING);\n        self::assertSame('=1+2', $sheet->getCell('A1')->getCalculatedValue());\n        self::assertTrue($sheet->getStyle('A1')->getQuotePrefix());\n        $sheet->getCell('A2')->setValue('=1+2');\n        self::assertSame(3, $sheet->getCell('A2')->getCalculatedValue());\n        self::assertFalse($sheet->getStyle('A2')->getQuotePrefix());\n        /** @var mixed[][] */\n        $styleArray1 = $sheet->getStyle('A1')->exportArray();\n        /** @var mixed[][] */\n        $styleArray2 = $sheet->getStyle('A2')->exportArray();\n        $sheet->getStyle('B1')->applyFromArray($styleArray1);\n        $sheet->getStyle('B2')->applyFromArray($styleArray2);\n        self::assertTrue($sheet->getStyle('B1')->getQuotePrefix());\n        self::assertFalse($sheet->getStyle('B2')->getQuotePrefix());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/FillTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FillTest extends TestCase\n{\n    public function testNonSupervisorColor(): void\n    {\n        $fill = new Fill();\n        $startColor = new Color('FFFF0000');\n        $endColor = new Color('FF00FFFF');\n        $fill->setFillType(Fill::FILL_PATTERN_GRAY125);\n        $fill->setStartColor($startColor);\n        $fill->setEndColor($endColor);\n        self::assertEquals('FF0000', $fill->getStartColor()->getRGB());\n        self::assertEquals('00FFFF', $fill->getEndColor()->getRGB());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/FontTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FontTest extends TestCase\n{\n    public function testSuperSubScript(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue('Cell A1');\n        $font = $cell->getStyle()->getFont();\n        $font->setSuperscript(true);\n        $font->setSubscript(true);\n        self::assertFalse($font->getSuperscript(), 'Earlier set true loses');\n        self::assertTrue($font->getSubscript(), 'Last set true wins');\n        $font->setSubscript(true);\n        $font->setSuperscript(true);\n        self::assertTrue($font->getSuperscript(), 'Last set true wins');\n        self::assertFalse($font->getSubscript(), 'Earlier set true loses');\n        $font->setSuperscript(false);\n        $font->setSubscript(false);\n        self::assertFalse($font->getSuperscript(), 'False remains unchanged');\n        self::assertFalse($font->getSubscript(), 'False remains unchanged');\n        $font->setSubscript(false);\n        $font->setSuperscript(false);\n        self::assertFalse($font->getSuperscript(), 'False remains unchanged');\n        self::assertFalse($font->getSubscript(), 'False remains unchanged');\n        $font->setSubscript(true);\n        $font->setSuperscript(false);\n        self::assertFalse($font->getSuperscript(), 'False remains unchanged');\n        self::assertTrue($font->getSubscript(), 'True remains unchanged');\n        $font->setSubscript(false);\n        $font->setSuperscript(true);\n        self::assertTrue($font->getSuperscript());\n        self::assertFalse($font->getSubscript(), 'False remains unchanged');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSize(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue('Cell A1');\n        $font = $cell->getStyle()->getFont();\n\n        self::assertEquals(11, $font->getSize(), 'The default is 11');\n\n        $font->setSize(12);\n        self::assertEquals(12, $font->getSize(), 'Accepted new font size');\n\n        $invalidFontSizeValues = [\n            '',\n            false,\n            true,\n            'non_numeric_string',\n            '-1.0',\n            -1.0,\n            0,\n            [],\n            (object) [],\n            null,\n        ];\n        foreach ($invalidFontSizeValues as $invalidFontSizeValue) {\n            $font->setSize(12);\n            $font->setSize($invalidFontSizeValue);\n            self::assertEquals(10, $font->getSize(), 'Set to 10 after trying to set an invalid value.');\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testName(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell = $sheet->getCell('A1');\n        $cell->setValue('Cell A1');\n        $font = $cell->getStyle()->getFont();\n        self::assertEquals('Calibri', $font->getName(), 'The default is Calibri');\n        $font->setName('whatever');\n        self::assertEquals('whatever', $font->getName(), 'The default is Calibri');\n        $font->setName('');\n        self::assertEquals('Calibri', $font->getName(), 'Null string changed to default');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnderlineHash(): void\n    {\n        $font1 = new Font();\n        $font2 = new Font();\n        $font2aHash = $font2->getHashCode();\n        self::assertSame($font1->getHashCode(), $font2aHash);\n        $font2->setUnderlineColor(\n            [\n                'type' => 'srgbClr',\n                'value' => 'FF0000',\n                'alpha' => null,\n            ]\n        );\n        $font2bHash = $font2->getHashCode();\n        self::assertNotEquals($font1->getHashCode(), $font2bHash);\n    }\n\n    public function testAutoColorSupervisor(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1')->getFont()->setAutoColor(true);\n        self::assertTrue($sheet->getStyle('A1')->getFont()->getAutoColor());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/AccountingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Formatter;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Accounting;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\CurrencyNegative;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass AccountingTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setThousandsSeparator(null);\n        StringHelper::setDecimalSeparator(null);\n    }\n\n    #[DataProvider('providerAccounting')]\n    public function testAccounting(\n        string $expectedResultPositive,\n        string $expectedResultNegative,\n        string $expectedResultZero,\n        string $currencyCode,\n        int $decimals,\n        bool $thousandsSeparator,\n        bool $currencySymbolPosition,\n        bool $currencySymbolSpacing,\n        CurrencyNegative $negative = CurrencyNegative::minus\n    ): void {\n        $wizard = new Accounting($currencyCode, $decimals, $thousandsSeparator, $currencySymbolPosition, $currencySymbolSpacing, negative: $negative);\n        self::assertSame($expectedResultPositive, Formatter::toFormattedString(1234.56, $wizard->format()));\n        self::assertSame($expectedResultNegative, Formatter::toFormattedString(-1234.56, $wizard->format()));\n        self::assertSame($expectedResultZero, Formatter::toFormattedString(0, $wizard->format()));\n    }\n\n    public static function providerAccounting(): array\n    {\n        return [\n            [' $ 1235 ', ' $ (1235)', ' $ - ', '$', 0, Number::WITHOUT_THOUSANDS_SEPARATOR, Currency::LEADING_SYMBOL, Currency::SYMBOL_WITH_SPACING],\n            [' $ 1,235 ', ' $ (1,235)', ' $ - ', '$', 0, Number::WITH_THOUSANDS_SEPARATOR, Currency::LEADING_SYMBOL, Currency::SYMBOL_WITH_SPACING],\n            [' $ 1,235 ', ' $ (1,235)', ' $ - ', '$', 0, Number::WITH_THOUSANDS_SEPARATOR, Currency::LEADING_SYMBOL, Currency::SYMBOL_WITHOUT_SPACING],\n            [' 1234.56 € ', ' (1234.56)€ ', ' - € ', '€', 2, Number::WITHOUT_THOUSANDS_SEPARATOR, Currency::TRAILING_SYMBOL, Currency::SYMBOL_WITH_SPACING],\n            [' 1,234.56 € ', ' (1,234.56)€ ', ' - € ', '€', 2, Number::WITH_THOUSANDS_SEPARATOR, Currency::TRAILING_SYMBOL, Currency::SYMBOL_WITH_SPACING],\n            [' 1234.560 € ', ' (1234.560)€ ', ' - € ', '€', 3, Number::WITHOUT_THOUSANDS_SEPARATOR, Currency::TRAILING_SYMBOL, Currency::SYMBOL_WITHOUT_SPACING],\n        ];\n    }\n\n    #[DataProvider('providerAccountingLocale')]\n    public function testAccountingLocale(\n        string $expectedResult,\n        string $currencyCode,\n        string $locale,\n        ?bool $stripRLM = null\n    ): void {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $wizard = new Accounting($currencyCode);\n        if ($stripRLM !== null) {\n            $wizard->setStripLeadingRLM($stripRLM);\n        }\n        $wizard->setLocale($locale);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerAccountingLocale(): array\n    {\n        // \\u{a0} is non-breaking space\n        // \\u{200e} is LRM (left-to-right mark)\n        return [\n            [\"[\\$€-fy-NL]\\u{a0}#,##0.00;([\\$€-fy-NL]\\u{a0}#,##0.00)\", '€', 'fy-NL'],\n            [\"[\\$€-nl-NL]\\u{a0}#,##0.00;([\\$€-nl-NL]\\u{a0}#,##0.00)\", '€', 'nl-NL'],\n            [\"[\\$€-nl-BE]\\u{a0}#,##0.00;([\\$€-nl-BE]\\u{a0}#,##0.00)\", '€', 'NL-BE'],\n            [\"#,##0.00\\u{a0}[\\$€-fr-BE];(#,##0.00\\u{a0}[\\$€-fr-BE])\", '€', 'fr-be'],\n            [\"#,##0.00\\u{a0}[\\$€-el-GR]\", '€', 'el-gr'],\n            ['[$$-en-CA]#,##0.00;([$$-en-CA]#,##0.00)', '$', 'en-ca'],\n            [\"#,##0.00\\u{a0}[\\$\\$-fr-CA];(#,##0.00\\u{a0}[\\$\\$-fr-CA])\", '$', 'fr-ca'],\n            ['[$¥-ja-JP]#,##0;([$¥-ja-JP]#,##0)', '¥', 'ja-JP'], // No decimals\n            [\"#,##0.000\\u{a0}[\\$د.ب\\u{200e}-ar-BH]\", \"د.ب\\u{200e}\", 'ar-BH', true],  // 3 decimals\n        ];\n    }\n\n    public function testIcu721(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $currencyCode = \"د.ب\\u{200e}\";\n        $locale = 'ar-BH';\n        $wizardFalse = new Accounting($currencyCode);\n        $wizardFalse->setStripLeadingRLM(false);\n        $wizardFalse->setLocale($locale);\n        $stringFalse = (string) $wizardFalse;\n        $wizardTrue = new Accounting($currencyCode);\n        $wizardTrue->setStripLeadingRLM(true);\n        $wizardTrue->setLocale($locale);\n        $stringTrue = (string) $wizardTrue;\n        $version = Accounting::icuVersion();\n        if ($version < 72.1) {\n            self::assertSame($stringFalse, $stringTrue);\n        } else {\n            self::assertSame(\"\\u{200f}$stringTrue\", $stringFalse);\n        }\n    }\n\n    #[DataProvider('providerAccountingLocaleNoDecimals')]\n    public function testAccountingLocaleNoDecimals(\n        string $expectedResult,\n        string $currencyCode,\n        string $locale,\n        ?bool $stripRLM = null\n    ): void {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $wizard = new Accounting($currencyCode, 0);\n        if ($stripRLM !== null) {\n            $wizard->setStripLeadingRLM($stripRLM);\n        }\n        $wizard->setLocale($locale);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerAccountingLocaleNoDecimals(): array\n    {\n        // \\u{a0} is non-breaking space\n        // \\u{200e} is LRM (left-to-right mark)\n        return [\n            [\"[\\$€-fy-NL]\\u{a0}#,##0;([\\$€-fy-NL]\\u{a0}#,##0)\", '€', 'fy-NL'],\n            [\"[\\$€-nl-NL]\\u{a0}#,##0;([\\$€-nl-NL]\\u{a0}#,##0)\", '€', 'nl-NL'],\n            [\"[\\$€-nl-BE]\\u{a0}#,##0;([\\$€-nl-BE]\\u{a0}#,##0)\", '€', 'NL-BE'],\n            [\"#,##0\\u{a0}[\\$€-fr-BE];(#,##0\\u{a0}[\\$€-fr-BE])\", '€', 'fr-be'],\n            [\"#,##0\\u{a0}[\\$€-el-GR]\", '€', 'el-gr'],\n            ['[$$-en-CA]#,##0;([$$-en-CA]#,##0)', '$', 'en-ca'],\n            [\"#,##0\\u{a0}[\\$\\$-fr-CA];(#,##0\\u{a0}[\\$\\$-fr-CA])\", '$', 'fr-ca'],\n            ['[$¥-ja-JP]#,##0;([$¥-ja-JP]#,##0)', '¥', 'ja-JP'], // No decimals to truncate\n            [\"#,##0\\u{a0}[\\$د.ب\\u{200e}-ar-BH]\", \"د.ب\\u{200e}\", 'ar-BH', true],  // 3 decimals truncated to none\n        ];\n    }\n\n    public function testAccountingLocaleInvalidFormat(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $locale = 'en-usa';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Invalid locale code '{$locale}'\");\n\n        $wizard = new Accounting('€');\n        $wizard->setLocale($locale);\n    }\n\n    public function testAccountingLocaleInvalidCode(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $locale = 'nl-GB';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Unable to read locale data for '{$locale}'\");\n\n        $wizard = new Accounting('€');\n        $wizard->setLocale($locale);\n    }\n\n    public function testLocaleNull2(): void\n    {\n        $wizard = new Accounting('$', 2);\n        $reflectionMethod = new ReflectionMethod($wizard, 'formatCurrencyCode');\n        $result = $reflectionMethod->invokeArgs($wizard, []);\n        self::assertSame('$*', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/CurrencyTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Formatter;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Accounting;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Currency;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\CurrencyNegative;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass CurrencyTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setThousandsSeparator(null);\n        StringHelper::setDecimalSeparator(null);\n    }\n\n    #[DataProvider('providerCurrency')]\n    public function testCurrency(\n        string $expectedResultPositive,\n        string $expectedResultNegative,\n        string $expectedResultZero,\n        string $currencyCode,\n        int $decimals,\n        bool $thousandsSeparator,\n        bool $currencySymbolPosition,\n        bool $currencySymbolSpacing,\n        CurrencyNegative $negative = CurrencyNegative::minus\n    ): void {\n        $wizard = new Currency($currencyCode, $decimals, $thousandsSeparator, $currencySymbolPosition, $currencySymbolSpacing, negative: $negative);\n        self::assertSame($expectedResultPositive, Formatter::toFormattedString(1234.56, $wizard->format()));\n        self::assertSame($expectedResultNegative, Formatter::toFormattedString(-1234.56, $wizard->format()));\n        self::assertSame($expectedResultZero, Formatter::toFormattedString(0, $wizard->format()));\n    }\n\n    public static function providerCurrency(): array\n    {\n        return [\n            [' $1235 ', ' -$1235', ' $0 ', '$', 0, Number::WITHOUT_THOUSANDS_SEPARATOR, Currency::LEADING_SYMBOL, Currency::SYMBOL_WITH_SPACING],\n            [' $1,235 ', ' -$1,235', ' $0 ', '$', 0, Number::WITH_THOUSANDS_SEPARATOR, Currency::LEADING_SYMBOL, Currency::SYMBOL_WITH_SPACING],\n            [' $1,235 ', ' -$1,235', ' $0 ', '$', 0, Number::WITH_THOUSANDS_SEPARATOR, Currency::LEADING_SYMBOL, Currency::SYMBOL_WITHOUT_SPACING],\n            [' 1234.56€ ', ' -1234.56€ ', ' 0.00€ ', '€', 2, Number::WITHOUT_THOUSANDS_SEPARATOR, Currency::TRAILING_SYMBOL, Currency::SYMBOL_WITH_SPACING],\n            [' 1,234.56€ ', ' -1,234.56€ ', ' 0.00€ ', '€', 2, Number::WITH_THOUSANDS_SEPARATOR, Currency::TRAILING_SYMBOL, Currency::SYMBOL_WITH_SPACING],\n            [' 1234.56€ ', ' -1234.56€ ', ' 0.00€ ', '€', 2, Number::WITHOUT_THOUSANDS_SEPARATOR, Currency::TRAILING_SYMBOL, Currency::SYMBOL_WITHOUT_SPACING],\n            [' 1234.56€ ', ' (1234.56)€ ', ' 0.00€ ', '€', 2, Number::WITHOUT_THOUSANDS_SEPARATOR, Currency::TRAILING_SYMBOL, Currency::SYMBOL_WITHOUT_SPACING, CurrencyNegative::parentheses],\n            [' 1234.56 GBP ', ' (1234.56) GBP ', '  0.00GBP ', 'GBP', 2, Number::WITHOUT_THOUSANDS_SEPARATOR, Currency::TRAILING_SYMBOL, Currency::SYMBOL_WITHOUT_SPACING, CurrencyNegative::parentheses],\n        ];\n    }\n\n    public function testSetNegative(): void\n    {\n        $expectedResultNegative = ' (1234.56)€ ';\n        $currencyCode = '€';\n        $decimals = 2;\n        $thousandsSeparator = Number::WITHOUT_THOUSANDS_SEPARATOR;\n        $currencySymbolPosition = Currency::TRAILING_SYMBOL;\n        $currencySymbolSpacing = Currency::SYMBOL_WITHOUT_SPACING;\n        $negative = CurrencyNegative::parentheses;\n        $wizard = new Currency($currencyCode, $decimals, $thousandsSeparator, $currencySymbolPosition, $currencySymbolSpacing);\n        $wizard->setNegative($negative);\n        self::assertSame($expectedResultNegative, Formatter::toFormattedString(-1234.56, $wizard->format()));\n    }\n\n    #[DataProvider('providerCurrencyLocale')]\n    public function testCurrencyLocale(\n        string $expectedResult,\n        string $currencyCode,\n        string $locale,\n        ?bool $stripRLM = null\n    ): void {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $wizard = new Currency($currencyCode);\n        if ($stripRLM !== null) {\n            $wizard->setStripLeadingRLM($stripRLM);\n        }\n        $wizard->setLocale($locale);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerCurrencyLocale(): array\n    {\n        // \\u{a0} is non-breaking space\n        // \\u{200e} is LRM (left-to-right mark)\n        return [\n            [\"[\\$€-fy-NL]\\u{a0}#,##0.00;[\\$€-fy-NL]\\u{a0}#,##0.00-\", '€', 'fy-NL'], // Trailing negative\n            [\"[\\$€-nl-NL]\\u{a0}#,##0.00;[\\$€-nl-NL]\\u{a0}-#,##0.00\", '€', 'nl-NL'], // Sign between currency and value\n            [\"[\\$€-nl-BE]\\u{a0}#,##0.00;[\\$€-nl-BE]\\u{a0}-#,##0.00\", '€', 'NL-BE'], // Sign between currency and value\n            [\"#,##0.00\\u{a0}[\\$€-fr-BE]\", '€', 'fr-be'],   // Trailing currency code\n            [\"#,##0.00\\u{a0}[\\$€-el-GR]\", '€', 'el-gr'],   // Trailing currency code\n            ['[$$-en-CA]#,##0.00', '$', 'en-ca'],\n            [\"#,##0.00\\u{a0}[\\$\\$-fr-CA]\", '$', 'fr-ca'],   // Trailing currency code\n            ['[$¥-ja-JP]#,##0', '¥', 'ja-JP'], // No decimals\n            [\"#,##0.000\\u{a0}[\\$د.ب\\u{200e}-ar-BH]\", \"د.ب\\u{200e}\", 'ar-BH', true],  // 3 decimals\n        ];\n    }\n\n    public function testIcu721(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $currencyCode = \"د.ب\\u{200e}\";\n        $locale = 'ar-BH';\n        $wizardFalse = new Currency($currencyCode);\n        $wizardFalse->setStripLeadingRLM(false);\n        $wizardFalse->setLocale($locale);\n        $stringFalse = (string) $wizardFalse;\n        $wizardTrue = new Currency($currencyCode);\n        $wizardTrue->setStripLeadingRLM(true);\n        $wizardTrue->setLocale($locale);\n        $stringTrue = (string) $wizardTrue;\n        $version = Accounting::icuVersion();\n        if ($version < 72.1) {\n            self::assertSame($stringFalse, $stringTrue);\n        } else {\n            self::assertSame(\"\\u{200f}$stringTrue\", $stringFalse);\n        }\n    }\n\n    #[DataProvider('providerCurrencyLocaleNoDecimals')]\n    public function testCurrencyLocaleNoDecimals(\n        string $expectedResult,\n        string $currencyCode,\n        string $locale,\n        ?bool $stripRLM = null\n    ): void {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $wizard = new Currency($currencyCode, 0);\n        if ($stripRLM !== null) {\n            $wizard->setStripLeadingRLM($stripRLM);\n        }\n        $wizard->setLocale($locale);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerCurrencyLocaleNoDecimals(): array\n    {\n        // \\u{a0} is non-breaking space\n        // \\u{200e} is LRM (left-to-right mark)\n        return [\n            [\"[\\$€-fy-NL]\\u{a0}#,##0;[\\$€-fy-NL]\\u{a0}#,##0-\", '€', 'fy-NL'], // Trailing negative\n            [\"[\\$€-nl-NL]\\u{a0}#,##0;[\\$€-nl-NL]\\u{a0}-#,##0\", '€', 'nl-NL'], // Sign between currency and value\n            [\"[\\$€-nl-BE]\\u{a0}#,##0;[\\$€-nl-BE]\\u{a0}-#,##0\", '€', 'NL-BE'], // Sign between currency and value\n            [\"#,##0\\u{a0}[\\$€-fr-BE]\", '€', 'fr-be'],   // Trailing currency code\n            [\"#,##0\\u{a0}[\\$€-el-GR]\", '€', 'el-gr'],   // Trailing currency code\n            ['[$$-en-CA]#,##0', '$', 'en-ca'],\n            [\"#,##0\\u{a0}[\\$\\$-fr-CA]\", '$', 'fr-ca'],   // Trailing currency code\n            ['[$¥-ja-JP]#,##0', '¥', 'ja-JP'], // No decimals to truncate\n            [\"#,##0\\u{a0}[\\$د.ب\\u{200e}-ar-BH]\", \"د.ب\\u{200e}\", 'ar-BH', true],  // 3 decimals truncated to none\n        ];\n    }\n\n    public function testCurrencyLocaleInvalidFormat(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $locale = 'en-usa';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Invalid locale code '{$locale}'\");\n\n        $wizard = new Currency('€');\n        $wizard->setLocale($locale);\n    }\n\n    public function testCurrencyLocaleInvalidCode(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $locale = 'nl-GB';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Unable to read locale data for '{$locale}'\");\n\n        $wizard = new Currency('€');\n        $wizard->setLocale($locale);\n    }\n\n    public function testLocaleNull3(): void\n    {\n        $wizard = new Currency('$', 2);\n        $reflectionMethod = new ReflectionMethod($wizard, 'formatCurrencyCode');\n        $result = $reflectionMethod->invokeArgs($wizard, []);\n        self::assertSame('$', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/DateTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Date;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateTest extends TestCase\n{\n    /**\n     * @param null|array<?string>|string $separators\n     * @param array<?string> $formatBlocks\n     */\n    #[DataProvider('providerDate')]\n    public function testDate(string $expectedResult, string|array|null $separators = null, array $formatBlocks = []): void\n    {\n        $wizard = new Date($separators, ...$formatBlocks);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerDate(): array\n    {\n        return [\n            ['yyyy-mm-dd', Date::SEPARATOR_DASH, [Date::YEAR_FULL, Date::MONTH_NUMBER_LONG, Date::DAY_NUMBER_LONG]],\n            ['mm/dd/yyyy', Date::SEPARATOR_SLASH, [Date::MONTH_NUMBER_LONG, Date::DAY_NUMBER_LONG, Date::YEAR_FULL]],\n            ['dd.mm.yyyy', Date::SEPARATOR_DOT, [Date::DAY_NUMBER_LONG, Date::MONTH_NUMBER_LONG, Date::YEAR_FULL]],\n            ['dd-mmm-yyyy', Date::SEPARATOR_DASH, [Date::DAY_NUMBER_LONG, Date::MONTH_NAME_SHORT, Date::YEAR_FULL]],\n            ['dd-mmm yyyy', [Date::SEPARATOR_DASH, Date::SEPARATOR_SPACE], [Date::DAY_NUMBER_LONG, Date::MONTH_NAME_SHORT, Date::YEAR_FULL]],\n            ['dddd dd.mm.yyyy', [Date::SEPARATOR_SPACE, Date::SEPARATOR_DOT], [Date::WEEKDAY_NAME_LONG, Date::DAY_NUMBER_LONG, Date::MONTH_NUMBER_LONG, Date::YEAR_FULL]],\n            ['dd-mm \"in the year\" yyyy', [Date::SEPARATOR_DASH, Date::SEPARATOR_SPACE], [Date::DAY_NUMBER_LONG, Date::MONTH_NUMBER_LONG, 'in the year', Date::YEAR_FULL]],\n            [\"yyyy-mm-dd\\u{a0}(ddd)\", [Date::SEPARATOR_DASH, Date::SEPARATOR_DASH, Date::SEPARATOR_SPACE_NONBREAKING, null], [Date::YEAR_FULL, Date::MONTH_NUMBER_LONG, Date::DAY_NUMBER_LONG, '(', Date::WEEKDAY_NAME_SHORT, ')']],\n            ['yyyy-mm-dd', null, [Date::YEAR_FULL, Date::MONTH_NUMBER_LONG, Date::DAY_NUMBER_LONG]],\n            ['yyyy-mm-dd'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/DateTimeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Time;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DateTimeTest extends TestCase\n{\n    /**\n     * @param null|string|string[] $separators\n     * @param array<Date|string|Time> $formatBlocks\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerDateTime')]\n    public function testDateTime(string $expectedResult, string|null|array $separators, array $formatBlocks): void\n    {\n        $wizard = new DateTime($separators, ...$formatBlocks);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerDateTime(): array\n    {\n        return [\n            ['yyyy-mm-dd \"at\" hh:mm:ss', ' ', [new Date('-', 'yyyy', 'mm', 'dd'), 'at', new Time(':', 'hh', 'mm', 'ss')]],\n            ['dddd \\à hh \"heures\"', ' ', [new Date(null, 'dddd'), 'à', new Time(null, 'hh'), 'heures']],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/DurationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Duration;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass DurationTest extends TestCase\n{\n    /**\n     * @param null|string|string[] $separators\n     * @param string[] $formatBlocks\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTime')]\n    public function testTime(string $expectedResult, string|array|null $separators = null, array $formatBlocks = []): void\n    {\n        $wizard = new Duration($separators, ...$formatBlocks);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerTime(): array\n    {\n        return [\n            ['[h]:mm:ss', Duration::SEPARATOR_COLON, [Duration::HOURS_DURATION, Duration::MINUTES_LONG, Duration::SECONDS_LONG]],\n            ['[h]:mm', Duration::SEPARATOR_COLON, [Duration::HOURS_DURATION, Duration::MINUTES_LONG]],\n            ['[m]:ss', Duration::SEPARATOR_COLON, [Duration::MINUTES_DURATION, Duration::SECONDS_DURATION]],\n            ['[h]:mm:ss', Duration::SEPARATOR_COLON, [Duration::HOURS_LONG, Duration::MINUTES_LONG, Duration::SECONDS_LONG]],\n            ['[h]:mm', Duration::SEPARATOR_COLON, [Duration::HOURS_LONG, Duration::MINUTES_LONG]],\n            [\"d\\u{a0}h:mm\", [Duration::SEPARATOR_SPACE_NONBREAKING, Duration::SEPARATOR_COLON], [Duration::DAYS_DURATION, Duration::HOURS_DURATION, Duration::MINUTES_LONG]],\n            ['[h]:mm:ss', null, [Duration::HOURS_DURATION, Duration::MINUTES_LONG, Duration::SECONDS_LONG]],\n            ['[h]:mm:ss'],\n        ];\n    }\n\n    public function testOddCase(): void\n    {\n        $wizard = new Duration(null, Duration::HOURS_DURATION, Duration::MINUTES_LONG, Duration::SECONDS_LONG);\n        $reflectionMethod = new ReflectionMethod($wizard, 'mapFormatBlocks');\n        $result = $reflectionMethod->invokeArgs($wizard, ['%%%']);\n        self::assertSame('\"%%%\"', $result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/NumberBase2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\NumberBase;\n\nclass NumberBase2 extends NumberBase\n{\n    protected function getLocaleFormat(): string\n    {\n        return 'none';\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/NumberTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Number;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NumberTest extends TestCase\n{\n    protected function tearDown(): void\n    {\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setThousandsSeparator(null);\n        StringHelper::setDecimalSeparator(null);\n    }\n\n    #[DataProvider('providerNumber')]\n    public function testNumber(string $expectedResult, int $decimals, bool $thousandsSeparator): void\n    {\n        $wizard = new Number($decimals, $thousandsSeparator);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerNumber(): array\n    {\n        return [\n            ['0', 0, Number::WITHOUT_THOUSANDS_SEPARATOR],\n            ['#,##0', 0, Number::WITH_THOUSANDS_SEPARATOR],\n            ['0.0', 1, Number::WITHOUT_THOUSANDS_SEPARATOR],\n            ['#,##0.0', 1, Number::WITH_THOUSANDS_SEPARATOR],\n            ['0.00', 2, Number::WITHOUT_THOUSANDS_SEPARATOR],\n            ['#,##0.00', 2, Number::WITH_THOUSANDS_SEPARATOR],\n        ];\n    }\n\n    #[DataProvider('providerNumberLocale')]\n    public function testNumberLocale(\n        string $expectedResult,\n        string $locale\n    ): void {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $wizard = new Number(2);\n        $wizard->setLocale($locale);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerNumberLocale(): array\n    {\n        return [\n            ['#,##0.00', 'en-us'],\n        ];\n    }\n\n    public function testNumberLocaleInvalidFormat(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $locale = 'en-usa';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Invalid locale code '{$locale}'\");\n\n        $wizard = new Number(2);\n        $wizard->setLocale($locale);\n    }\n\n    public function testNonOverriddenFormat(): void\n    {\n        $wizard = new NumberBase2();\n        self::assertSame('General', $wizard->format());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/PercentageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Percentage;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PercentageTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPercentage')]\n    public function testPercentage(string $expectedResult, int $decimals): void\n    {\n        $wizard = new Percentage($decimals);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerPercentage(): array\n    {\n        return [\n            ['0%', 0],\n            ['0.0%', 1],\n            ['0.00%', 2],\n            ['0.000%', 3],\n            ['0%', -1],\n            ['0.000000000000000000000000000000%', 31],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPercentageLocale')]\n    public function testPercentageLocale(\n        string $expectedResult,\n        string $locale\n    ): void {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $wizard = new Percentage(2);\n        $wizard->setLocale($locale);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerPercentageLocale(): array\n    {\n        return [\n            ['#,##0.00%', 'fy-NL'],\n            ['#,##0.00%', 'nl-NL'],\n            ['#,##0.00%', 'NL-BE'],\n            [\"#,##0.00\\u{a0}%\", 'fr-be'],\n            ['#,##0.00%', 'el-gr'],\n            ['#,##0.00%', 'en-ca'],\n            [\"#,##0.00\\u{a0}%\", 'fr-ca'],\n        ];\n    }\n\n    public function testPercentageLocaleInvalidFormat(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $locale = 'en-usa';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Invalid locale code '{$locale}'\");\n\n        $wizard = new Percentage(2);\n        $wizard->setLocale($locale);\n    }\n\n    public function testPercentageLocaleInvalidCode(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $locale = 'nl-GB';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Unable to read locale data for '{$locale}'\");\n\n        $wizard = new Percentage(2);\n        $wizard->setLocale($locale);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/ScientificTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse NumberFormatter;\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Scientific;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ScientificTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerScientific')]\n    public function testScientific(string $expectedResult, int $decimals): void\n    {\n        $wizard = new Scientific($decimals);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerScientific(): array\n    {\n        return [\n            ['0E+00', 0],\n            ['0.0E+00', 1],\n            ['0.00E+00', 2],\n            ['0.000E+00', 3],\n            ['0E+00', -1],\n            ['0.000000000000000000000000000000E+00', 31],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerScientificLocale')]\n    public function testScientificLocale(\n        string $expectedResult,\n        string $locale\n    ): void {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $wizard = new Scientific(2);\n        $wizard->setLocale($locale);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerScientificLocale(): array\n    {\n        return [\n            ['0.00E+00', 'en'],\n            ['0.00E+00', 'az-AZ'],\n            ['0.00E+00', 'az-Cyrl'],\n            ['0.00E+00', 'az-Cyrl-AZ'],\n            ['0.00E+00', 'az-Latn'],\n            ['0.00E+00', 'az-Latn-AZ'],\n        ];\n    }\n\n    public function testScientificLocaleInvalidFormat(): void\n    {\n        if (class_exists(NumberFormatter::class) === false) {\n            self::markTestSkipped('Intl extension is not available');\n        }\n\n        $locale = 'en-usa';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Invalid locale code '{$locale}'\");\n\n        $wizard = new Scientific(2);\n        $wizard->setLocale($locale);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/TimeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style\\NumberFormat\\Wizard;\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\Wizard\\Time;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TimeTest extends TestCase\n{\n    /**\n     * @param null|string|string[] $separators\n     * @param string[] $formatBlocks\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTime')]\n    public function testTime(string $expectedResult, string|array|null $separators = null, array $formatBlocks = []): void\n    {\n        $wizard = new Time($separators, ...$formatBlocks);\n        self::assertSame($expectedResult, (string) $wizard);\n    }\n\n    public static function providerTime(): array\n    {\n        return [\n            ['hh:mm:ss', Time::SEPARATOR_COLON, [Time::HOURS_LONG, Time::MINUTES_LONG, Time::SECONDS_LONG]],\n            ['hh:mm', Time::SEPARATOR_COLON, [Time::HOURS_LONG, Time::MINUTES_LONG]],\n            [\"hh:mm\\u{a0}AM/PM\", [Time::SEPARATOR_COLON, Time::SEPARATOR_SPACE_NONBREAKING], [Time::HOURS_LONG, Time::MINUTES_LONG, Time::MORNING_AFTERNOON]],\n            ['h \"hours and\" m \"minutes past midnight\"', Time::SEPARATOR_SPACE, [Time::HOURS_SHORT, 'hours and', Time::MINUTES_SHORT, 'minutes past midnight']],\n            ['hh:mm:ss', null, [Time::HOURS_LONG, Time::MINUTES_LONG, Time::SECONDS_LONG]],\n            ['hh:mm:ss'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormatBuiltinTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NumberFormatBuiltinTest extends TestCase\n{\n    public function testBuiltinCodes(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cell1 = $sheet->getCell('A1');\n        $cell1->setValue(1);\n        $cell1->getStyle()->getNumberFormat()->setBuiltInFormatCode(2); // 0.00\n        self::assertEquals('1.00', $cell1->getFormattedValue());\n        $cell2 = $sheet->getCell('A2');\n        $cell2->setValue(1234);\n        $cell2->getStyle()->getNumberFormat()->setFormatCode('#,##0'); // builtin 3\n        self::assertEquals(3, $cell2->getStyle()->getNumberFormat()->getBuiltinFormatCode());\n        self::assertEquals('1,234', $cell2->getFormattedValue());\n        $cell3 = $sheet->getCell('A3');\n        $cell3->setValue(1234);\n        $cell3->getStyle()->getNumberFormat()->setFormatCode(''); // General\n        self::assertEquals(NumberFormat::FORMAT_GENERAL, $cell3->getStyle()->getNumberFormat()->getFormatCode());\n        self::assertEquals(0, $cell3->getStyle()->getNumberFormat()->getBuiltinFormatCode());\n        self::assertEquals('1234', $cell3->getFormattedValue());\n        // non-supervisor\n        $numberFormat = new NumberFormat();\n        $numberFormat->setBuiltInFormatCode(4);\n        self::assertEquals('#,##0.00', $numberFormat->getFormatCode());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormatFractionalSecondTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse DateTime;\nuse DateTimeZone;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\DateFormatter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NumberFormatFractionalSecondTest extends TestCase\n{\n    public function testRounded(): void\n    {\n        $dt = new DateTime('2025-01-02', new DateTimeZone('UTC'));\n        $dt->setTime(10, 59, 58, 999999);\n        $excelTime = Date::PHPToExcel($dt);\n        self::assertNotFalse($excelTime);\n        $result1 = DateFormatter::format($excelTime, 'hh:mm:ss.000');\n        self::assertSame('10:59:59.000', $result1);\n        $result2 = DateFormatter::format($excelTime, 'hh:mm:ss.00');\n        self::assertSame('10:59:59.00', $result2);\n        $result3 = DateFormatter::format($excelTime, 'hh:mm:ss.0');\n        self::assertSame('10:59:59.0', $result3);\n    }\n\n    public function testNotRounded(): void\n    {\n        $dt = new DateTime('2025-01-02', new DateTimeZone('UTC'));\n        $dt->setTime(10, 59, 58, 234111);\n        $excelTime = Date::PHPToExcel($dt);\n        self::assertNotFalse($excelTime);\n        $result1 = DateFormatter::format($excelTime, 'hh:mm:ss.000');\n        self::assertSame('10:59:58.234', $result1);\n        $result2 = DateFormatter::format($excelTime, 'hh:mm:ss.00');\n        self::assertSame('10:59:58.23', $result2);\n        $result3 = DateFormatter::format($excelTime, 'hh:mm:ss.0');\n        self::assertSame('10:59:58.2', $result3);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormatRoundTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NumberFormatRoundTest extends TestCase\n{\n    public static function testRound(): void\n    {\n        // Inconsistent rounding due to letting sprintf do it rather than round.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1:H2')->getNumberFormat()->setFormatCode('0');\n        $sheet->getStyle('A3:H3')->getNumberFormat()->setFormatCode('0.0');\n        $sheet->fromArray(\n            [\n                [-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5],\n                [-3.1, -2.9, -1.4, -0.3, 0.7, 1.6, 2.4, 3.7],\n                [-3.15, -2.85, -1.43, -0.87, 0.72, 1.60, 2.45, 3.75],\n            ]\n        );\n        $expected = [\n            [-4, -3, -2, -1, 1, 2, 3, 4],\n            [-3, -3, -1, 0, 1, 2, 2, 4],\n            [-3.2, -2.9, -1.4, -0.9, 0.7, 1.6, 2.5, 3.8],\n        ];\n        self::assertEquals($expected, $sheet->toArray());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormatSystemDateTimeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NumberFormatSystemDateTimeTest extends TestCase\n{\n    private string $shortDateFormat;\n\n    private string $longDateFormat;\n\n    private string $dateTimeFormat;\n\n    private string $timeFormat;\n\n    protected function setUp(): void\n    {\n        $this->shortDateFormat = NumberFormat::getShortDateFormat();\n        $this->longDateFormat = NumberFormat::getLongDateFormat();\n        $this->dateTimeFormat = NumberFormat::getDateTimeFormat();\n        $this->timeFormat = NumberFormat::getTimeFormat();\n    }\n\n    protected function tearDown(): void\n    {\n        NumberFormat::setShortDateFormat($this->shortDateFormat);\n        NumberFormat::setLongDateFormat($this->longDateFormat);\n        NumberFormat::setDateTimeFormat($this->dateTimeFormat);\n        NumberFormat::setTimeFormat($this->timeFormat);\n    }\n\n    public function testOverrides(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $formula = '=DATEVALUE(\"2024-02-29\")+TIMEVALUE(\"8:12:15 AM\")';\n        $sheet->getCell('A1')->setValue($formula);\n        $sheet->getCell('A2')->setValue($formula);\n        $sheet->getStyle('A2')->getNumberFormat()\n            ->setBuiltinFormatCode(14);\n        $sheet->getCell('A3')->setValue($formula);\n        $sheet->getStyle('A3')->getNumberFormat()\n            ->setBuiltinFormatCode(15);\n        $sheet->getCell('A4')->setValue($formula);\n        $sheet->getStyle('A4')->getNumberFormat()\n            ->setBuiltinFormatCode(22);\n        $sheet->getCell('A5')->setValue($formula);\n        $sheet->getStyle('A5')->getNumberFormat()\n            ->setFormatCode('[$-F800]');\n        $sheet->getCell('A6')->setValue($formula);\n        $sheet->getStyle('A6')->getNumberFormat()\n            ->setFormatCode('[$-F400]');\n        $sheet->getCell('A7')->setValue($formula);\n        $sheet->getStyle('A7')->getNumberFormat()\n            ->setFormatCode('[$-x-sysdate]');\n        $sheet->getCell('A8')->setValue($formula);\n        $sheet->getStyle('A8')->getNumberFormat()\n            ->setFormatCode('[$-x-systime]');\n        $sheet->getCell('A9')->setValue($formula);\n        $sheet->getStyle('A9')->getNumberFormat()\n            ->setFormatCode('hello' . NumberFormat::FORMAT_SYSDATE_F800 . 'goodbye');\n        NumberFormat::setShortDateFormat('yyyy/mm/dd');\n        NumberFormat::setDateTimeFormat('yyyy/mm/dd hh:mm AM/PM');\n        NumberFormat::setLongDateFormat('dddd d mmm yyyy');\n        NumberFormat::setTimeFormat('h:mm');\n        self::assertSame('2024/02/29', $sheet->getCell('A2')->getformattedValue());\n        self::assertSame('2024/02/29 08:12 AM', $sheet->getCell('A4')->getformattedValue());\n        self::assertSame('Thursday 29 Feb 2024', $sheet->getCell('A5')->getformattedValue());\n        self::assertSame('8:12', $sheet->getCell('A6')->getformattedValue());\n        self::assertSame('Thursday 29 Feb 2024', $sheet->getCell('A7')->getformattedValue());\n        self::assertSame('8:12', $sheet->getCell('A8')->getformattedValue());\n        self::assertSame('Thursday 29 Feb 2024', $sheet->getCell('A9')->getformattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefaults(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $formula = '=DATEVALUE(\"2024-02-29\")+TIMEVALUE(\"8:12:15 AM\")';\n        $sheet->getCell('A1')->setValue($formula);\n        $sheet->getCell('A2')->setValue($formula);\n        $sheet->getStyle('A2')->getNumberFormat()\n            ->setBuiltinFormatCode(14);\n        $sheet->getCell('A3')->setValue($formula);\n        $sheet->getStyle('A3')->getNumberFormat()\n            ->setBuiltinFormatCode(15);\n        $sheet->getCell('A4')->setValue($formula);\n        $sheet->getStyle('A4')->getNumberFormat()\n            ->setBuiltinFormatCode(22);\n        $sheet->getCell('A5')->setValue($formula);\n        $sheet->getStyle('A5')->getNumberFormat()\n            ->setFormatCode('[$-F800]');\n        $sheet->getCell('A6')->setValue($formula);\n        $sheet->getStyle('A6')->getNumberFormat()\n            ->setFormatCode('[$-F400]');\n        $sheet->getCell('A7')->setValue($formula);\n        $sheet->getStyle('A7')->getNumberFormat()\n            ->setFormatCode('[$-x-sysdate]');\n        $sheet->getCell('A8')->setValue($formula);\n        $sheet->getStyle('A8')->getNumberFormat()\n            ->setFormatCode('[$-x-systime]');\n        $sheet->getCell('A9')->setValue($formula);\n        $sheet->getStyle('A9')->getNumberFormat()\n            ->setFormatCode('hello' . NumberFormat::FORMAT_SYSDATE_F800 . 'goodbye');\n        self::assertSame('2/29/2024', $sheet->getCell('A2')->getformattedValue());\n        self::assertSame('2/29/2024 8:12', $sheet->getCell('A4')->getformattedValue());\n        self::assertSame('Thursday, February 29, 2024', $sheet->getCell('A5')->getformattedValue());\n        self::assertSame('8:12:15 AM', $sheet->getCell('A6')->getformattedValue());\n        self::assertSame('Thursday, February 29, 2024', $sheet->getCell('A7')->getformattedValue());\n        self::assertSame('8:12:15 AM', $sheet->getCell('A8')->getformattedValue());\n        self::assertSame('Thursday, February 29, 2024', $sheet->getCell('A9')->getformattedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/NumberFormatTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat\\NumberFormatter;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NumberFormatTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        StringHelper::setDecimalSeparator('.');\n        StringHelper::setThousandsSeparator(',');\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n    }\n\n    protected function tearDown(): void\n    {\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setDecimalSeparator(null);\n        StringHelper::setThousandsSeparator(null);\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    /**\n     * @param null|bool|float|int|string $args string to be formatted\n     */\n    #[DataProvider('providerNumberFormat')]\n    public function testFormatValueWithMask(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = NumberFormat::toFormattedString(...$args);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerNumberFormat(): array\n    {\n        return require 'tests/data/Style/NumberFormat.php';\n    }\n\n    /**\n     * @param null|bool|float|int|string $args string to be formatted\n     */\n    #[DataProvider('providerNumberFormatFractions')]\n    public function testFormatValueWithMaskFraction(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = NumberFormat::toFormattedString(...$args);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerNumberFormatFractions(): array\n    {\n        return require 'tests/data/Style/NumberFormatFractions.php';\n    }\n\n    /**\n     * @param null|bool|float|int|string $args string to be formatted\n     */\n    #[DataProvider('providerNumberFormatDates')]\n    public function testFormatValueWithMaskDate(mixed $expectedResult, mixed ...$args): void\n    {\n        $result = NumberFormat::toFormattedString(...$args);\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public static function providerNumberFormatDates(): array\n    {\n        return require 'tests/data/Style/NumberFormatDates.php';\n    }\n\n    public function testDatesOpenOfficeGnumericNonPositive(): void\n    {\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n        $fmt1 = 'yyyy-mm-dd';\n        $rslt = NumberFormat::toFormattedString(0, $fmt1);\n        self::assertSame('1899-12-30', $rslt);\n        $rslt = NumberFormat::toFormattedString(-2, $fmt1);\n        self::assertSame('1899-12-28', $rslt);\n        $rslt = NumberFormat::toFormattedString(-2.4, $fmt1);\n        self::assertSame('1899-12-27', $rslt);\n        $fmt2 = 'yyyy-mm-dd hh:mm:ss AM/PM';\n        $rslt = NumberFormat::toFormattedString(-2.4, $fmt2);\n        self::assertSame('1899-12-27 02:24:00 PM', $rslt);\n    }\n\n    public function testCurrencyCode(): void\n    {\n        // \"Currency symbol\" replaces $ in some cases, not in others\n        $cur = StringHelper::getCurrencyCode();\n        StringHelper::setCurrencyCode('€');\n        $fmt1 = '#,##0.000\\ [$]';\n        $rslt = NumberFormat::toFormattedString(12345.679, $fmt1);\n        self::assertEquals($rslt, '12,345.679 €');\n        $fmt2 = '$ #,##0.000';\n        $rslt = NumberFormat::toFormattedString(12345.679, $fmt2);\n        self::assertEquals($rslt, '$ 12,345.679');\n        StringHelper::setCurrencyCode($cur);\n    }\n\n    #[DataProvider('providerNoScientific')]\n    public function testNoScientific(string $expectedResult, string $numericString): void\n    {\n        $result = NumberFormatter::floatStringConvertScientific($numericString);\n        self::assertSame($expectedResult, $result);\n    }\n\n    public static function providerNoScientific(): array\n    {\n        return [\n            'large number' => ['92' . str_repeat('0', 16), '9.2E+17'],\n            'no decimal portion' => ['16', '1.6E1'],\n            'retain decimal 0 if supplied in string' => ['16.0', '1.60E1'],\n            'exponent 0' => ['2.3', '2.3E0'],\n            'whole and decimal' => ['16.5', '1.65E1'],\n            'plus signs' => ['165000', '+1.65E+5'],\n            'e2 one decimal' => ['489.7', '4.897E2'],\n            'e2 no decimal' => ['-489', '-4.89E2'],\n            'e2 fill units position' => ['480', '4.8E+2'],\n            'no scientific notation' => ['3.14159', '3.14159'],\n            'non-zero in first decimal' => ['0.165', '1.65E-1'],\n            'one leading zero in decimal' => ['0.0165', '1.65E-2'],\n            'four leading zeros in decimal' => ['-0.0000165', '-1.65E-5'],\n            'small number' => ['0.' . str_repeat('0', 16) . '1', '1E-17'],\n            'very small number' => ['0.' . str_repeat('0', 69) . '1', '1E-70'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/ReplaceBuiltinNumberFormatTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReplaceBuiltinNumberFormatTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testReplaceBuiltinNumberFormat(): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->fromArray([45486, 1023, 45487, 45488, 45489, 45480, 45479, 45478, 45477, 45476, 45475]);\n        $sheet->getStyle('A1')->getNumberFormat()\n            ->setBuiltInFormatCode(NumberFormat::SHORT_DATE_INDEX);\n        $sheet->getStyle('B1')->getNumberFormat()\n            ->setFormatCode('#,##0.00');\n        $sheet->getStyle('C1')->getNumberFormat()\n            ->setBuiltInFormatCode(NumberFormat::SHORT_DATE_INDEX);\n        $sheet->getStyle('D1')->getNumberFormat()\n            ->setFormatCode('dd-MMM-yyyy');\n        $sheet->getStyle('E1')->getNumberFormat()\n            ->setBuiltInFormatCode(16);\n        $sheet->getStyle('F1')->getNumberFormat()\n            ->setFormatCode('d-MMM-yy');\n        $sheet->getStyle('G1')->getNumberFormat()\n            ->setFormatCode('dd/m/yy');\n        $sheet->getStyle('H1')->getNumberFormat()\n            ->setFormatCode('mm-dd-yy');\n        $sheet->getStyle('I1')->getNumberFormat()\n            ->setFormatCode('yy-mm-dd');\n        $sheet->getStyle('J1')->getNumberFormat()\n            ->setFormatCode('m/d/yyyy h:mm');\n        $sheet->getStyle('K1')->getNumberFormat()\n            ->setFormatCode('d\"/\"m\"/\"yy');\n        $values = $sheet->toArray();\n        $expected = [[\n            '7/13/2024', // builtin style 14\n            '1,023.00', // #,##0.00\n            '7/14/2024', // builtin style 14\n            '15-Jul-2024', // dd-MMM-yyyy\n            '16-Jul', // builtin style 16\n            '7-Jul-24', // d-MMM-yy\n            '06/7/24', // dd/m/yy\n            '07-05-24', // mm-dd-yy\n            '24-07-04', // yy-mm-dd\n            '7/3/2024 0:00', // m/d/yyyy h:mm\n            '2/7/24', // d\"/\"m\"/\"yy\n        ]];\n        self::assertSame($expected, $values);\n        $spreadsheet->replaceBuiltinNumberFormat(\n            NumberFormat::SHORT_DATE_INDEX,\n            'yyyy-mm-dd'\n        );\n        $newValues = $sheet->toArray();\n        $newExpected = [[\n            '2024-07-13', // yyyy-mm-dd changed from builtin style 14\n            '1,023.00', // unchanged #,##0.00\n            '2024-07-14', // yyyy-mm-dd changed from builtin style 14\n            '15-Jul-2024', // unchanged dd-MMM-yyyy\n            '16-Jul', // unchanged builtin style 16\n            '7-Jul-24', // unchanged d-MMM-yy\n            '06/7/24', // unchanged dd/m/yy\n            '07-05-24', // unchanged mm-dd-yy\n            '24-07-04', // unchanged yy-mm-dd\n            '7/3/2024 0:00', // unchanged m/d/yyyy h:mm\n            '2/7/24', // unchanged d\"/\"m\"/\"yy\n        ]];\n        self::assertSame($newExpected, $newValues);\n        $spreadsheet->disambiguateDateStyles();\n        $newValues2 = $sheet->toArray();\n        $newExpected2 = [[\n            '2024-07-13', // unchanged yyyy-mm-dd\n            '1,023.00', // unchanged #,##0.00\n            '2024-07-14', // unchanged yyyy-mm-dd\n            '15-Jul-2024', // unchanged dd-MMM-yyyy\n            '16-Jul', // unchanged builtin style 16\n            '7-Jul-2024', // changed from d-MMM-yy to d-MMM-yyyy\n            '2024-07-06', // changed from dd/m/yy to yyyy-mm-dd\n            '2024-07-05', // changed from mm-dd-yy tp yyyy-mm-dd\n            '2024-07-04', // changed from yy-mm-dd to yyyy-mm-dd\n            '2024-07-03 0:00', // changed m/d/yyyy h:mm to yyyy-mm-dd h:mm\n            '2024-07-02', // changed d\"/\"m\"/\"yy to yyyy-mm-dd\n        ]];\n        self::assertSame($newExpected2, $newValues2);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Style/StyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Style;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StyleTest extends TestCase\n{\n    public function testStyleOddMethods(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cellCoordinate = 'A1';\n        $cell1 = $sheet->getCell($cellCoordinate);\n        $cell1style = $cell1->getStyle();\n        self::assertSame($spreadsheet, $cell1style->getParent());\n        $styleArray = ['alignment' => ['textRotation' => 45]];\n        $outArray = $cell1style->getStyleArray($styleArray);\n        self::assertEquals($styleArray, $outArray['quotePrefix']);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStyleColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cellCoordinates = 'A:B';\n        $styleArray = [\n            'font' => [\n                'bold' => true,\n            ],\n        ];\n        $sheet->getStyle($cellCoordinates)->applyFromArray($styleArray);\n        $sheet->setCellValue('A1', 'xxxa1');\n        $sheet->setCellValue('A2', 'xxxa2');\n        $sheet->setCellValue('A3', 'xxxa3');\n        $sheet->setCellValue('B1', 'xxxa1');\n        $sheet->setCellValue('B2', 'xxxa2');\n        $sheet->setCellValue('B3', 'xxxa3');\n        $sheet->setCellValue('C1', 'xxxc1');\n        $sheet->setCellValue('C2', 'xxxc2');\n        $sheet->setCellValue('C3', 'xxxc3');\n        $styleArray = [\n            'font' => [\n                'italic' => true,\n            ],\n        ];\n        $sheet->getStyle($cellCoordinates)->applyFromArray($styleArray);\n        self::assertTrue($sheet->getStyle('A1')->getFont()->getBold());\n        self::assertTrue($sheet->getStyle('B2')->getFont()->getBold());\n        self::assertFalse($sheet->getStyle('C3')->getFont()->getBold());\n        self::assertTrue($sheet->getStyle('A1')->getFont()->getItalic());\n        self::assertTrue($sheet->getStyle('B2')->getFont()->getItalic());\n        self::assertFalse($sheet->getStyle('C3')->getFont()->getItalic());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStyleIsReused(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $styleArray = [\n            'font' => [\n                'italic' => true,\n            ],\n        ];\n\n        $sheet->getStyle('A1')->getFont()->setBold(true);\n        $sheet->getStyle('A2')->getFont()->setBold(true);\n        $sheet->getStyle('A3')->getFont()->setBold(true);\n        $sheet->getStyle('A3')->getFont()->setItalic(true);\n\n        $sheet->getStyle('A')->applyFromArray($styleArray);\n\n        self::assertCount(4, $spreadsheet->getCellXfCollection());\n        $spreadsheet->garbageCollect();\n\n        self::assertCount(3, $spreadsheet->getCellXfCollection());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStyleRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cellCoordinates = '2:3';\n        $styleArray = [\n            'font' => [\n                'bold' => true,\n            ],\n        ];\n        $sheet->getStyle($cellCoordinates)->applyFromArray($styleArray);\n        $sheet->setCellValue('A1', 'xxxa1');\n        $sheet->setCellValue('A2', 'xxxa2');\n        $sheet->setCellValue('A3', 'xxxa3');\n        $sheet->setCellValue('B1', 'xxxa1');\n        $sheet->setCellValue('B2', 'xxxa2');\n        $sheet->setCellValue('B3', 'xxxa3');\n        $sheet->setCellValue('C1', 'xxxc1');\n        $sheet->setCellValue('C2', 'xxxc2');\n        $sheet->setCellValue('C3', 'xxxc3');\n        $styleArray = [\n            'font' => [\n                'italic' => true,\n            ],\n        ];\n        $sheet->getStyle($cellCoordinates)->applyFromArray($styleArray);\n        self::assertFalse($sheet->getStyle('A1')->getFont()->getBold());\n        self::assertTrue($sheet->getStyle('B2')->getFont()->getBold());\n        self::assertTrue($sheet->getStyle('C3')->getFont()->getBold());\n        self::assertFalse($sheet->getStyle('A1')->getFont()->getItalic());\n        self::assertTrue($sheet->getStyle('B2')->getFont()->getItalic());\n        self::assertTrue($sheet->getStyle('C3')->getFont()->getItalic());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIssue1712A(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $rgb = '4467b8';\n        $sheet->fromArray(['OK', 'KO']);\n        $spreadsheet->getActiveSheet()\n            ->getStyle('A1')\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setRGB($rgb);\n        $spreadsheet->getActiveSheet()\n            ->getStyle('B')\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setRGB($rgb);\n        self::assertEquals($rgb, $sheet->getCell('A1')->getStyle()->getFill()->getStartColor()->getRGB());\n        self::assertEquals($rgb, $sheet->getCell('B1')->getStyle()->getFill()->getStartColor()->getRGB());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIssue1712B(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $rgb = '4467b8';\n        $spreadsheet->getActiveSheet()\n            ->getStyle('A1')\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setRGB($rgb);\n        $spreadsheet->getActiveSheet()\n            ->getStyle('B')\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()\n            ->setRGB($rgb);\n        $sheet->fromArray(['OK', 'KO']);\n        self::assertEquals($rgb, $sheet->getCell('A1')->getStyle()->getFill()->getStartColor()->getRGB());\n        self::assertEquals($rgb, $sheet->getCell('B1')->getStyle()->getFill()->getStartColor()->getRGB());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStyleLoopUpwards(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $cellCoordinates = 'C5:A3';\n        $styleArray = [\n            'font' => [\n                'bold' => true,\n            ],\n        ];\n        $sheet->getStyle($cellCoordinates)->applyFromArray($styleArray);\n        $sheet->setCellValue('A1', 'xxxa1');\n        $sheet->setCellValue('A2', 'xxxa2');\n        $sheet->setCellValue('A3', 'xxxa3');\n        $sheet->setCellValue('B1', 'xxxa1');\n        $sheet->setCellValue('B2', 'xxxa2');\n        $sheet->setCellValue('B3', 'xxxa3');\n        $sheet->setCellValue('C1', 'xxxc1');\n        $sheet->setCellValue('C2', 'xxxc2');\n        $sheet->setCellValue('C3', 'xxxc3');\n        self::assertFalse($sheet->getStyle('A1')->getFont()->getBold());\n        self::assertFalse($sheet->getStyle('B2')->getFont()->getBold());\n        self::assertTrue($sheet->getStyle('C3')->getFont()->getBold());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStyleCellAddressObject(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cellAddress = new CellAddress('A1', $worksheet);\n        $style = $worksheet->getStyle($cellAddress);\n        $style->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDDSLASH);\n\n        self::assertSame(NumberFormat::FORMAT_DATE_YYYYMMDDSLASH, $style->getNumberFormat()->getFormatCode());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testStyleCellRangeObject(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cellAddress1 = new CellAddress('A1', $worksheet);\n        $cellAddress2 = new CellAddress('B2', $worksheet);\n        $cellRange = new CellRange($cellAddress1, $cellAddress2);\n        $style = $worksheet->getStyle($cellRange);\n        $style->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDDSLASH);\n\n        self::assertSame(NumberFormat::FORMAT_DATE_YYYYMMDDSLASH, $style->getNumberFormat()->getFormatCode());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ApplyStylesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ApplyStylesTest extends TestCase\n{\n    public function testApplyFromArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet3 = $spreadsheet->createSheet();\n        $cell = 'B4';\n        $sheet1->getCell($cell)->setValue('first');\n        $sheet1->getStyle($cell)->getFont()->setName('Arial');\n        $cell = 'C9';\n        $sheet2->getCell($cell)->setValue('second');\n        $sheet2->getStyle($cell)->getFont()->setName('Arial');\n        $cell = 'A6';\n        $sheet3->getCell($cell)->setValue('third');\n        $sheet3->getStyle($cell)->getFont()->setName('Arial');\n        self::assertSame(2, $spreadsheet->getActiveSheetIndex());\n        self::assertSame('B4', $sheet1->getSelectedCells());\n        self::assertSame('C9', $sheet2->getSelectedCells());\n        self::assertSame('A6', $sheet3->getSelectedCells());\n        $cell = 'D12';\n        $styleArray = ['font' => ['name' => 'Courier New']];\n        $sheet2->getStyle($cell)->applyFromArray($styleArray);\n        self::assertSame(1, $spreadsheet->getActiveSheetIndex());\n        self::assertSame('B4', $sheet1->getSelectedCells());\n        self::assertSame('D12', $sheet2->getSelectedCells());\n        self::assertSame('A6', $sheet3->getSelectedCells());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testApplyStylesFromArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet3 = $spreadsheet->createSheet();\n        $cell = 'B4';\n        $sheet1->getCell($cell)->setValue('first');\n        $sheet1->getStyle($cell)->getFont()->setName('Arial');\n        $cell = 'C9';\n        $sheet2->getCell($cell)->setValue('second');\n        $sheet2->getStyle($cell)->getFont()->setName('Arial');\n        $cell = 'A6';\n        $sheet3->getCell($cell)->setValue('third');\n        $sheet3->getStyle($cell)->getFont()->setName('Arial');\n        self::assertSame(2, $spreadsheet->getActiveSheetIndex());\n        self::assertSame('B4', $sheet1->getSelectedCells());\n        self::assertSame('C9', $sheet2->getSelectedCells());\n        self::assertSame('A6', $sheet3->getSelectedCells());\n        $cell = 'D12';\n        $styleArray = ['font' => ['name' => 'Courier New']];\n        $sheet2->applyStylesFromArray($cell, $styleArray);\n        self::assertSame(2, $spreadsheet->getActiveSheetIndex(), 'should be unchanged');\n        self::assertSame('B4', $sheet1->getSelectedCells(), 'should be unchanged');\n        self::assertSame('C9', $sheet2->getSelectedCells(), 'should be unchanged');\n        self::assertSame('A6', $sheet3->getSelectedCells(), 'should be unchanged');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNoSpreadsheet(): void\n    {\n        $sheet2 = new Worksheet();\n        $cell = 'D12';\n        self::assertFalse($sheet2->applyStylesFromArray($cell, ['font' => ['name' => 'Courier New']]));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterAverageTop10Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AutoFilterAverageTop10Test extends SetupTeardown\n{\n    public function initsheet(): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Header');\n        $sheet->getCell('A2')->setValue(1);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('A4')->setValue(5);\n        $sheet->getCell('A5')->setValue(7);\n        $sheet->getCell('A6')->setValue(9);\n        $sheet->getCell('A7')->setValue(2);\n        $sheet->getCell('A8')->setValue(4);\n        $sheet->getCell('A9')->setValue(6);\n        $sheet->getCell('A10')->setValue(8);\n        $this->maxRow = 10;\n\n        return $sheet;\n    }\n\n    public static function providerAverage(): array\n    {\n        return [\n            [[5, 6, 9, 10], Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE],\n            [[2, 3, 7, 8], Rule::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE],\n        ];\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerAverage')]\n    public function testAboveAverage(array $expectedVisible, string $rule): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                '',\n                $rule\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n\n        self::assertEquals($expectedVisible, $this->getVisible());\n    }\n\n    public static function providerTop10(): array\n    {\n        return [\n            [[6, 10], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP, 2],\n            [[2, 3, 7], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM, 3],\n            [[6], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP, 10],\n            [[2, 3, 7], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM, 40],\n        ];\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerTop10')]\n    public function testTop10(array $expectedVisible, string $rule, string $ruleType, int $count): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                $rule,\n                $count,\n                $ruleType\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_TOPTENFILTER);\n\n        self::assertEquals($expectedVisible, $this->getVisible());\n    }\n\n    public function initsheetTies(): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Header');\n        $sheet->getCell('A2')->setValue(1);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('A4')->setValue(3);\n        $sheet->getCell('A5')->setValue(7);\n        $sheet->getCell('A6')->setValue(9);\n        $sheet->getCell('A7')->setValue(4);\n        $sheet->getCell('A8')->setValue(4);\n        $sheet->getCell('A9')->setValue(8);\n        $sheet->getCell('A10')->setValue(8);\n        $this->maxRow = 10;\n\n        return $sheet;\n    }\n\n    public static function providerTop10Ties(): array\n    {\n        return [\n            [[2, 3, 4], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM, 2],\n            [[2], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM, 1],\n            [[5, 6, 7, 8, 9, 10], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP, 5],\n            [[6], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP, 1],\n            [[2, 3, 4], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM, 25],\n            [[6, 9, 10], Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT, Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP, 25],\n        ];\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerTop10Ties')]\n    public function testTop10Ties(array $expectedVisible, string $rule, string $ruleType, int $count): void\n    {\n        $sheet = $this->initSheetTies();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                $rule,\n                $count,\n                $ruleType\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_TOPTENFILTER);\n\n        self::assertEquals($expectedVisible, $this->getVisible());\n    }\n\n    public function testTop10Exceeds500(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Heading');\n        for ($row = 2; $row < 602; ++$row) {\n            $sheet->getCell(\"A$row\")->setValue($row);\n        }\n        $maxRow = $this->maxRow = 601;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE,\n                550,\n                Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_TOPTENFILTER);\n\n        self::assertCount(500, $this->getVisible(), 'Top10 Filter limited to 500 items plus ties');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterCustomNumericTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AutoFilterCustomNumericTest extends SetupTeardown\n{\n    public function initsheet(): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Header');\n        $sheet->getCell('A2')->setValue(1);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('A4')->setValue(5);\n        // nothing in cell A5\n        $sheet->getCell('A6')->setValue(7);\n        $sheet->getCell('A7')->setValue(9);\n        $sheet->getCell('A8')->setValue(7);\n        $sheet->getCell('A9')->setValue(5);\n        $sheet->getCell('A10')->setValue(3);\n        $sheet->getCell('A11')->setValue(1);\n        $sheet->getCell('A12')->setValue('x');\n        $this->maxRow = 12;\n\n        return $sheet;\n    }\n\n    public static function providerCustomRule(): array\n    {\n        return [\n            'equal to 3' => [[3, 10], Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 3],\n            'not equal to 3' => [[2, 4, 5, 6, 7, 8, 9, 11, 12], Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL, 3],\n            'greater than 3' => [[4, 6, 7, 8, 9], Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN, 3],\n            'greater than or equal to 3' => [[3, 4, 6, 7, 8, 9, 10], Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 3],\n            'less than 3' => [[2, 11], Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN, 3],\n            'less than or equal to 3' => [[2, 3, 10, 11], Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, 3],\n        ];\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerCustomRule')]\n    public function testCustomTest(array $expectedVisible, string $rule, int $comparand): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                $rule,\n                $comparand\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals($expectedVisible, $this->getVisible());\n    }\n\n    public function testEqualsListSimple(): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                5\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                7\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER);\n\n        self::assertEquals([3, 4, 6, 8, 9, 10], $this->getVisible());\n    }\n\n    public function testEqualsList(): void\n    {\n        $sheet = $this->initSheet();\n        $sheet->getRowDimension(4)->setRowHeight(25);\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_OR);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                5\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals([3, 4, 9, 10], $this->getVisible());\n        self::assertTrue($sheet->rowDimensionExists(2));\n        self::assertFalse($sheet->rowDimensionExists(3), 'row visible by default');\n        self::assertTrue($sheet->rowDimensionExists(4), 'row is visible but height has been set');\n        self::assertTrue($sheet->rowDimensionExists(5));\n        self::assertTrue($sheet->rowDimensionExists(6));\n        self::assertTrue($sheet->rowDimensionExists(7));\n        self::assertTrue($sheet->rowDimensionExists(8));\n        self::assertFalse($sheet->rowDimensionExists(9), 'row visible by default');\n        self::assertFalse($sheet->rowDimensionExists(10), 'row visible by default');\n        self::assertTrue($sheet->rowDimensionExists(11));\n        self::assertTrue($sheet->rowDimensionExists(12));\n    }\n\n    public function testNotEqualsList(): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                3\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                5\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals([2, 5, 6, 7, 8, 11, 12], $this->getVisible());\n    }\n\n    public function testNotEqualsListWith3Members(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('No more than 2 rules');\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                3\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                5\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                7\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals([2, 5, 7, 11, 12], $this->getVisible());\n    }\n\n    public function testNotEqualsListWith3MembersFilterTypeAfterRules(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('No more than 2 rules');\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                3\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                5\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                7\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n\n        self::assertEquals([2, 5, 7, 11, 12], $this->getVisible());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterCustomTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AutoFilterCustomTextTest extends SetupTeardown\n{\n    public function initsheet(): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Header');\n        $sheet->getCell('A2')->setValue('abc');\n        $sheet->getCell('A3')->setValue('cBa');\n        $sheet->getCell('A4')->setValue('cab');\n        // nothing in cell A5\n        $sheet->getCell('A6')->setValue('c*b');\n        $sheet->getCell('A7')->setValue('c?b');\n        $sheet->getCell('A8')->setValue('a');\n        $sheet->getCell('A9')->setValue('zzbc');\n        $sheet->getCell('A10')->setValue('zzbcd');\n        $sheet->getCell('A11')->setValue('~pqr');\n        $sheet->getCell('A12')->setValue('pqr~');\n        $this->maxRow = 12;\n\n        return $sheet;\n    }\n\n    public static function providerCustomText(): array\n    {\n        return [\n            'begins with a' => [[2, 8], 'a*'],\n            'ends with b' => [[4, 6, 7], '*b'],\n            'contains c' => [[2, 3, 4, 6, 7, 9, 10], '*c*'],\n            'empty' => [[5], ''],\n            'contains asterisk' => [[6], '*~**'],\n            'contains question mark' => [[7], '*~?*'],\n            'c followed by character followed by b' => [[4, 6, 7], 'c?b'],\n            'one character followed by bc' => [[2], '?bc'],\n            'two characters followed by bc' => [[9], '??bc'],\n            'starts with z ends with c' => [[9], 'z*c'],\n            'starts with tilde' => [[11], '~~*'],\n            'contains tilde' => [[11, 12], '*~~*'],\n        ];\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerCustomText')]\n    public function testCustomTest(array $expectedVisible, string $pattern): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                $pattern\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals($expectedVisible, $this->getVisible());\n    }\n\n    public function testCustomTestNotEqualBlank(): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                ''\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals([2, 3, 4, 6, 7, 8, 9, 10, 11, 12], $this->getVisible());\n    }\n\n    public function testCustomTestNotEqualString(): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                'cba'\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals([2, 4, 5, 6, 7, 8, 9, 10, 11, 12], $this->getVisible());\n    }\n\n    public function testEqualsListSimple(): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                'c?b' // simple filter - no wildcards\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                'a'\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER);\n\n        self::assertEquals([7, 8], $this->getVisible());\n    }\n\n    public function testEqualsList(): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_OR);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                'a*'\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                '*c*'\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals([2, 3, 4, 6, 7, 8, 9, 10], $this->getVisible());\n    }\n\n    public function testNotEqualsList(): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                'a*'\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL,\n                '*c*'\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals([5, 11, 12], $this->getVisible());\n    }\n\n    public static function providerCustomRule(): array\n    {\n        return [\n            'equal to cba' => [[3], Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'cba'],\n            'not equal to cba' => [[2, 4, 5, 6, 7, 8, 9, 10, 11, 12], Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL, 'cba'],\n            'greater than cba' => [[9, 10, 11, 12], Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN, 'cba'],\n            'greater than or equal to cba' => [[3, 9, 10, 11, 12], Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 'cba'],\n            'less than cba' => [[2, 4, 5, 6, 7, 8], Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN, 'cba'],\n            'less than or equal to cba' => [[2, 3, 4, 5, 6, 7, 8], Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, 'cba'],\n        ];\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerCustomRule')]\n    public function testCustomRuleTest(array $expectedVisible, string $rule, string $comparand): void\n    {\n        $sheet = $this->initSheet();\n        $maxRow = $this->maxRow;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:A$maxRow\");\n        $columnFilter = $autoFilter->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                $rule,\n                $comparand\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        self::assertEquals($expectedVisible, $this->getVisible());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterMonthTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AutoFilterMonthTest extends SetupTeardown\n{\n    public static function providerMonth(): array\n    {\n        return [\n            [[2, 3], Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH],\n            [[4], Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH],\n            [[6], Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH],\n        ];\n    }\n\n    private function setCells(Worksheet $sheet, int $startMonth): void\n    {\n        $sheet->getCell('A1')->setValue('Date');\n        $sheet->getCell('A2')->setValue('=TODAY()');\n        // cache result for consistency in later calculations\n        $sheet->getCell('A2')->getCalculatedValue();\n        $sheet->getCell('A3')->setValue('=DATE(YEAR(A2), MONTH(A2), 1)');\n        if ($startMonth === 12) {\n            $sheet->getCell('A4')->setValue('=DATE(YEAR(A2) + 1, 1, 1)');\n            $sheet->getCell('A5')->setValue('=DATE(YEAR(A2) + 1, 2, 1)');\n        } elseif ($startMonth === 11) {\n            $sheet->getCell('A4')->setValue('=DATE(YEAR(A2), MONTH(A2) + 1, 1)');\n            $sheet->getCell('A5')->setValue('=DATE(YEAR(A2) + 1, 1, 1)');\n        } else {\n            $sheet->getCell('A4')->setValue('=DATE(YEAR(A2), MONTH(A2) + 1, 1)');\n            $sheet->getCell('A5')->setValue('=DATE(YEAR(A2), MONTH(A2) + 2, 1)');\n        }\n        if ($startMonth === 1) {\n            $sheet->getCell('A6')->setValue('=DATE(YEAR(A2) - 1, 12, 1)');\n            $sheet->getCell('A7')->setValue('=DATE(YEAR(A2) - 1, 10, 1)');\n        } elseif ($startMonth === 2) {\n            $sheet->getCell('A6')->setValue('=DATE(YEAR(A2), 1, 1)');\n            $sheet->getCell('A7')->setValue('=DATE(YEAR(A2) - 1, 12, 1)');\n        } else {\n            $sheet->getCell('A6')->setValue('=DATE(YEAR(A2), MONTH(A2) - 1, 1)');\n            $sheet->getCell('A7')->setValue('=DATE(YEAR(A2), MONTH(A2) - 2, 1)');\n        }\n        $sheet->getCell('A8')->setValue('=DATE(YEAR(A2) + 1, MONTH(A2), 1)');\n        $sheet->getCell('A9')->setValue('=DATE(YEAR(A2) - 1, MONTH(A2), 1)');\n        $this->maxRow = 9;\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerMonth')]\n    public function testMonths(array $expectedVisible, string $rule): void\n    {\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same day.\n        do {\n            $sheet = $this->getSpreadsheet()->createSheet();\n            $dtStart = new DateTimeImmutable();\n            $startDay = (int) $dtStart->format('d');\n            $startMonth = (int) $dtStart->format('m');\n            $this->setCells($sheet, $startMonth);\n\n            $maxRow = $this->maxRow;\n            $autoFilter = $sheet->getAutoFilter();\n            $autoFilter->setRange(\"A1:A$maxRow\");\n            $columnFilter = $autoFilter->getColumn('A');\n            $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n            $columnFilter->createRule()\n                ->setRule(\n                    Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                    '',\n                    $rule\n                )\n                ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n            $autoFilter->showHideRows();\n            $dtEnd = new DateTimeImmutable();\n            $endDay = (int) $dtEnd->format('d');\n        } while ($startDay !== $endDay);\n\n        self::assertEquals($expectedVisible, $this->getVisibleSheet($sheet));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterQuarterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AutoFilterQuarterTest extends SetupTeardown\n{\n    public static function providerQuarter(): array\n    {\n        return [\n            [[2, 3], Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER],\n            [[4], Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER],\n            [[6], Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER],\n        ];\n    }\n\n    private function setCells(Worksheet $sheet): void\n    {\n        $sheet->getCell('A1')->setValue('Date');\n        $sheet->getCell('A2')->setValue('=TODAY()');\n        // cache result for consistency in later calculations\n        $sheet->getCell('A2')->getCalculatedValue();\n        $sheet->getCell('A3')->setValue('=DATE(YEAR(A2), MONTH(A2), 1)');\n        $sheet->getCell('A4')->setValue('=DATE(YEAR(A2), MONTH(A2) + 3, 1)');\n        $sheet->getCell('A5')->setValue('=DATE(YEAR(A2), MONTH(A2) + 6, 1)');\n        $sheet->getCell('A6')->setValue('=DATE(YEAR(A2), MONTH(A2) - 3, 1)');\n        $sheet->getCell('A7')->setValue('=DATE(YEAR(A2), MONTH(A2) - 6, 1)');\n        $sheet->getCell('A8')->setValue('=DATE(YEAR(A2) + 1, MONTH(A2), 1)');\n        $sheet->getCell('A9')->setValue('=DATE(YEAR(A2) - 1, MONTH(A2), 1)');\n        $this->maxRow = 9;\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerQuarter')]\n    public function testQuarters(array $expectedVisible, string $rule): void\n    {\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same day.\n        do {\n            $sheet = $this->getSpreadsheet()->createSheet();\n            $dtStart = new DateTimeImmutable();\n            $startDay = (int) $dtStart->format('d');\n            $this->setCells($sheet);\n\n            $maxRow = $this->maxRow;\n            $autoFilter = $sheet->getAutoFilter();\n            $autoFilter->setRange(\"A1:A$maxRow\");\n            $columnFilter = $autoFilter->getColumn('A');\n            $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n            $columnFilter->createRule()\n                ->setRule(\n                    Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                    '',\n                    $rule\n                )\n                ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n            $autoFilter->showHideRows();\n            $dtEnd = new DateTimeImmutable();\n            $endDay = (int) $dtEnd->format('d');\n        } while ($startDay !== $endDay);\n\n        self::assertEquals($expectedVisible, $this->getVisibleSheet($sheet));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass AutoFilterTest extends SetupTeardown\n{\n    private const INITIAL_RANGE = 'H2:O256';\n\n    public function testToString(): void\n    {\n        $expectedResult = self::INITIAL_RANGE;\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        //  magic __toString should return the active autofilter range\n        $result = (string) $autoFilter;\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testGetParent(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $result = $autoFilter->getParent();\n        self::assertSame($sheet, $result);\n    }\n\n    public function testSetParent(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet2 = $spreadsheet->createSheet();\n        //  Setters return the instance to implement the fluent interface\n        $result = $autoFilter->setParent($sheet2);\n        self::assertSame(self::INITIAL_RANGE, $result->getRange());\n    }\n\n    public function testGetRange(): void\n    {\n        $expectedResult = self::INITIAL_RANGE;\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        //  Result should be the active autofilter range\n        $result = $autoFilter->getRange();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSetRange(): void\n    {\n        $sheet = $this->getSheet();\n        $title = $sheet->getTitle();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $ranges = [\n            'G1:J512' => \"$title!G1:J512\",\n            'K1:N20' => 'K1:N20',\n            'B10' => 'B10',\n        ];\n\n        foreach ($ranges as $actualRange => $fullRange) {\n            //  Setters return the instance to implement the fluent interface\n            $temp = $autoFilter->setRange($fullRange);\n\n            //  Result should be the new autofilter range\n            $result = $temp->getRange();\n            self::assertEquals($actualRange, $result);\n        }\n    }\n\n    public function testClearRange(): void\n    {\n        $expectedResult = '';\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        //  Setters return the instance to implement the fluent interface\n        $temp = $autoFilter->setRange('');\n\n        //  Result should be a clear range\n        $result = $temp->getRange();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSetRangeInvalidRowRange(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n\n        $expectedResult = '999';\n\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange($expectedResult);\n    }\n\n    public function testSetRangeInvalidColumnRange(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n\n        $expectedResult = 'ABC';\n\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange($expectedResult);\n    }\n\n    public function testGetColumnsEmpty(): void\n    {\n        //  There should be no columns yet defined\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $result = $autoFilter->getColumns();\n        self::assertSame([], $result);\n    }\n\n    public function testGetColumnOffset(): void\n    {\n        $columnIndexes = [\n            'H' => 0,\n            'K' => 3,\n            'M' => 5,\n        ];\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        //  If we request a specific column by its column ID, we should get an\n        //    integer returned representing the column offset within the range\n        foreach ($columnIndexes as $columnIndex => $columnOffset) {\n            $result = $autoFilter->getColumnOffset($columnIndex);\n            self::assertEquals($columnOffset, $result);\n        }\n    }\n\n    public function testRemoveColumns(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(range('H', 'O'), null, 'H2');\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $autoFilter->getColumn('L')->addRule((new Column\\Rule())->setValue(5));\n\n        $sheet->removeColumn('K', 2);\n        $result = $autoFilter->getRange();\n        self::assertEquals('H2:M256', $result);\n\n        // Check that the rule that was set for column L is no longer set\n        self::assertEmpty($autoFilter->getColumn('L')->getRule(0)->getValue());\n    }\n\n    public function testRemoveRows(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(range('H', 'O'), null, 'H2');\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        $sheet->removeRow(42, 128);\n        $result = $autoFilter->getRange();\n        self::assertEquals('H2:O128', $result);\n    }\n\n    public function testInsertColumns(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(range('H', 'O'), null, 'H2');\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $autoFilter->getColumn('N')->addRule((new Column\\Rule())->setValue(5));\n\n        $sheet->insertNewColumnBefore('N', 3);\n        $result = $autoFilter->getRange();\n        self::assertEquals('H2:R256', $result);\n\n        // Check that column N no longer has a rule set\n        self::assertEmpty($autoFilter->getColumn('N')->getRule(0)->getValue());\n        // Check that the rule originally set in column N has been moved to column Q\n        self::assertSame(5, $autoFilter->getColumn('Q')->getRule(0)->getValue());\n    }\n\n    public function testInsertRows(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(range('H', 'O'), null, 'H2');\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        $sheet->insertNewRowBefore(3, 4);\n        $result = $autoFilter->getRange();\n        self::assertEquals('H2:O260', $result);\n    }\n\n    public function testGetInvalidColumnOffset(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n\n        $invalidColumn = 'G';\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        $autoFilter->getColumnOffset($invalidColumn);\n    }\n\n    public function testSetColumnWithString(): void\n    {\n        $expectedResult = 'L';\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        //  Setters return the instance to implement the fluent interface\n        $temp = $autoFilter->setColumn($expectedResult);\n\n        $result = $temp->getColumns();\n        //  Result should be an array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\AutoFilter\\Column\n        //    objects for each column we set indexed by the column ID\n        self::assertCount(1, $result);\n        self::assertArrayHasKey($expectedResult, $result);\n    }\n\n    public function testSetInvalidColumnWithString(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        $invalidColumn = 'A';\n\n        $autoFilter->setColumn($invalidColumn);\n    }\n\n    public function testSetColumnWithColumnObject(): void\n    {\n        $expectedResult = 'M';\n        $columnObject = new Column($expectedResult);\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        //  Setters return the instance to implement the fluent interface\n        $temp = $autoFilter->setColumn($columnObject);\n\n        $result = $temp->getColumns();\n        //  Result should be an array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\AutoFilter\\Column\n        //    objects for each column we set indexed by the column ID\n        self::assertCount(1, $result);\n        self::assertArrayHasKey($expectedResult, $result);\n    }\n\n    public function testSetInvalidColumnWithObject(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n\n        $invalidColumn = 'E';\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $autoFilter->setColumn($invalidColumn);\n    }\n\n    public function testGetColumns(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        $columnIndexes = ['L', 'M'];\n\n        foreach ($columnIndexes as $columnIndex) {\n            $autoFilter->setColumn($columnIndex);\n        }\n\n        $result = $autoFilter->getColumns();\n        //  Result should be an array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\AutoFilter\\Column\n        //    objects for each column we set indexed by the column ID\n        self::assertCount(count($columnIndexes), $result);\n        foreach ($columnIndexes as $columnIndex) {\n            self::assertArrayHasKey($columnIndex, $result);\n        }\n\n        $autoFilter->setRange('');\n        self::assertCount(0, $autoFilter->getColumns());\n        self::assertSame('', $autoFilter->getRange());\n    }\n\n    public function testGetColumn(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        $columnIndexes = ['L', 'M'];\n\n        foreach ($columnIndexes as $columnIndex) {\n            $autoFilter->setColumn($columnIndex);\n        }\n\n        //  If we request a specific column by its column ID, we should\n        //    get a \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\AutoFilter\\Column object returned\n        foreach ($columnIndexes as $columnIndex) {\n            $result = $autoFilter->getColumn($columnIndex);\n            self::assertSame($columnIndex, $result->getColumnIndex());\n        }\n    }\n\n    public function testGetColumnByOffset(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        $columnIndexes = [\n            0 => 'H',\n            3 => 'K',\n            5 => 'M',\n        ];\n\n        //  If we request a specific column by its offset, we should\n        //    get a \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\AutoFilter\\Column object returned\n        foreach ($columnIndexes as $columnIndex => $columnID) {\n            $result = $autoFilter->getColumnByOffset($columnIndex);\n            self::assertEquals($result->getColumnIndex(), $columnID);\n        }\n    }\n\n    public function testGetColumnIfNotSet(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        //  If we request a specific column by its column ID, we should\n        //    get a \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\AutoFilter\\Column object returned\n        $result = $autoFilter->getColumn('K');\n        self::assertSame('K', $result->getColumnIndex());\n    }\n\n    public function testGetColumnWithoutRangeSet(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n\n        //  Clear the range\n        $autoFilter->setRange('');\n        $autoFilter->getColumn('A');\n    }\n\n    public function testClearRangeWithExistingColumns(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $expectedResult = '';\n\n        $columnIndexes = ['L', 'M', 'N'];\n        foreach ($columnIndexes as $columnIndex) {\n            $autoFilter->setColumn($columnIndex);\n        }\n\n        //  Setters return the instance to implement the fluent interface\n        $temp = $autoFilter->setRange('');\n\n        //  Range should be cleared\n        $result = $temp->getRange();\n        self::assertEquals($expectedResult, $result);\n\n        //  Column array should be cleared\n        $result = $autoFilter->getColumns();\n        self::assertSame([], $result);\n    }\n\n    public function testSetRangeWithExistingColumns(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $expectedResult = 'G1:J512';\n\n        //  These columns should be retained\n        $columnIndexes1 = ['I', 'J'];\n        foreach ($columnIndexes1 as $columnIndex) {\n            $autoFilter->setColumn($columnIndex);\n        }\n        //  These columns should be discarded\n        $columnIndexes2 = ['K', 'L', 'M'];\n        foreach ($columnIndexes2 as $columnIndex) {\n            $autoFilter->setColumn($columnIndex);\n        }\n\n        //  Setters return the instance to implement the fluent interface\n        $temp = $autoFilter->setRange($expectedResult);\n\n        //  Range should be correctly set\n        $result = $temp->getRange();\n        self::assertEquals($expectedResult, $result);\n\n        //  Only columns that existed in the original range and that\n        //    still fall within the new range should be retained\n        $result = $autoFilter->getColumns();\n        self::assertCount(count($columnIndexes1), $result);\n    }\n\n    public function testClone(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $columnIndexes = ['L', 'M'];\n\n        foreach ($columnIndexes as $columnIndex) {\n            $autoFilter->setColumn($columnIndex);\n        }\n\n        $result = clone $autoFilter;\n        self::assertSame($autoFilter->getRange(), $result->getRange());\n        self::assertNull($result->getParent());\n        self::assertInstanceOf(Worksheet::class, $autoFilter->getParent());\n        $autoColumns = $autoFilter->getColumns();\n        $resultColumns = $result->getColumns();\n        self::assertCount(2, $autoColumns);\n        self::assertCount(2, $resultColumns);\n        self::assertArrayHasKey('L', $autoColumns);\n        self::assertArrayHasKey('L', $resultColumns);\n        self::assertArrayHasKey('M', $autoColumns);\n        self::assertArrayHasKey('M', $resultColumns);\n    }\n\n    public function testNoWorksheet(): void\n    {\n        $autoFilter = new AutoFilter();\n        self::assertSame($autoFilter, $autoFilter->showHideRows());\n    }\n\n    public function testClearColumn(): void\n    {\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(self::INITIAL_RANGE);\n        $columnIndexes = ['J', 'K', 'L', 'M'];\n\n        foreach ($columnIndexes as $columnIndex) {\n            $autoFilter->setColumn($columnIndex);\n        }\n        $columns = $autoFilter->getColumns();\n        self::assertCount(4, $columns);\n        self::assertArrayHasKey('J', $columns);\n        self::assertArrayHasKey('K', $columns);\n        self::assertArrayHasKey('L', $columns);\n        self::assertArrayHasKey('M', $columns);\n        $autoFilter->clearColumn('K');\n        $columns = $autoFilter->getColumns();\n        self::assertCount(3, $columns);\n        self::assertArrayHasKey('J', $columns);\n        self::assertArrayHasKey('L', $columns);\n        self::assertArrayHasKey('M', $columns);\n        $autoFilter->shiftColumn('L', 'K');\n        $columns = $autoFilter->getColumns();\n        self::assertCount(3, $columns);\n        self::assertArrayHasKey('J', $columns);\n        self::assertArrayHasKey('K', $columns);\n        self::assertArrayHasKey('M', $columns);\n    }\n\n    public function testAutoExtendRange(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet, 'Autosized AutoFilter'));\n\n        $worksheet->getCell('A1')->setValue('Col 1');\n        $worksheet->getCell('B1')->setValue('Col 2');\n\n        $worksheet->setAutoFilter('A1:B1');\n        $lastRow = $worksheet->getAutoFilter()->autoExtendRange(1, 1);\n        self::assertSame(1, $lastRow, 'No data below AutoFilter, so there should ne no resize');\n\n        $lastRow = $worksheet->getAutoFilter()->autoExtendRange(1, 999);\n        self::assertSame(999, $lastRow, 'Filter range is already correctly sized');\n\n        $data = [['A', 'A'], ['B', 'A'], ['A', 'B'], ['C', 'B'], ['B', null], [null, null], ['D', 'D'], ['E', 'E']];\n        $worksheet->fromArray($data, null, 'A2', true);\n\n        $lastRow = $worksheet->getAutoFilter()->autoExtendRange(1, 1);\n        self::assertSame(6, $lastRow, 'Filter range has been re-sized incorrectly');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterTodayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AutoFilterTodayTest extends SetupTeardown\n{\n    public static function providerYesterdayTodayTomorrow(): array\n    {\n        return [\n            [[2, 5], Rule::AUTOFILTER_RULETYPE_DYNAMIC_TODAY],\n            [[3, 6], Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW],\n            [[4, 7], Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY],\n        ];\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerYesterdayTodayTomorrow')]\n    public function testYesterdayTodayTomorrow(array $expectedVisible, string $rule): void\n    {\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same day.\n        do {\n            $sheet = $this->getSpreadsheet()->createSheet();\n            $dtStart = new DateTimeImmutable();\n            $startDay = $dtStart->format('d');\n            $sheet->getCell('A1')->setValue('Date');\n            $sheet->getCell('A2')->setValue('=NOW()');\n            // cache result for consistency in later calculations\n            $sheet->getCell('A2')->getCalculatedValue();\n            $sheet->getCell('A3')->setValue('=A2+1');\n            $sheet->getCell('A4')->setValue('=A2-1');\n            $sheet->getCell('A5')->setValue('=TODAY()');\n            // cache result for consistency in later calculations\n            $sheet->getCell('A5')->getCalculatedValue();\n            $sheet->getCell('A6')->setValue('=A5+1');\n            $sheet->getCell('A7')->setValue('=A5-1');\n            $this->maxRow = $maxRow = 7;\n            $autoFilter = $sheet->getAutoFilter();\n            $autoFilter->setRange(\"A1:A$maxRow\");\n            $columnFilter = $autoFilter->getColumn('A');\n            $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n            $columnFilter->createRule()\n                ->setRule(\n                    Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                    '',\n                    $rule\n                )\n                ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n            $autoFilter->showHideRows();\n            $dtEnd = new DateTimeImmutable();\n            $endDay = $dtEnd->format('d');\n        } while ($startDay !== $endDay);\n\n        self::assertEquals($expectedVisible, $this->getVisibleSheet($sheet));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterWeekTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AutoFilterWeekTest extends SetupTeardown\n{\n    public static function providerWeek(): array\n    {\n        return [\n            [[2, 3], Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK],\n            [[4], Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK],\n            [[6], Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK],\n        ];\n    }\n\n    private function setCells(Worksheet $sheet): void\n    {\n        $sheet->getCell('A1')->setValue('Date');\n        $sheet->getCell('A2')->setValue('=TODAY()');\n        // cache result for consistency in later calculations\n        $sheet->getCell('A2')->getCalculatedValue();\n        $sheet->getCell('B2')->setValue('=WEEKDAY(A2) - 1'); // subtract to get to Sunday\n        $sheet->getCell('A3')->setValue('=DATE(YEAR(A2), MONTH(A2), DAY(A2) - B2)');\n        $sheet->getCell('A4')->setValue('=DATE(YEAR(A3), MONTH(A3), DAY(A3) + 8)');\n        $sheet->getCell('A5')->setValue('=DATE(YEAR(A3), MONTH(A3), DAY(A3) + 19)');\n        $sheet->getCell('A6')->setValue('=DATE(YEAR(A3), MONTH(A3), DAY(A3) - 6)');\n        $sheet->getCell('A7')->setValue('=DATE(YEAR(A3), MONTH(A3), DAY(A3) - 12)');\n        $sheet->getCell('A8')->setValue('=DATE(YEAR(A2) + 1, MONTH(A2), 1)');\n        $sheet->getCell('A9')->setValue('=DATE(YEAR(A2) - 1, MONTH(A2), 1)');\n        $this->maxRow = 9;\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerWeek')]\n    public function testWeek(array $expectedVisible, string $rule): void\n    {\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same day.\n        do {\n            $sheet = $this->getSpreadsheet()->createSheet();\n            $dtStart = new DateTimeImmutable();\n            $startDay = (int) $dtStart->format('d');\n            $this->setCells($sheet);\n\n            $maxRow = $this->maxRow;\n            $autoFilter = $sheet->getAutoFilter();\n            $autoFilter->setRange(\"A1:A$maxRow\");\n            $columnFilter = $autoFilter->getColumn('A');\n            $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n            $columnFilter->createRule()\n                ->setRule(\n                    Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                    '',\n                    $rule\n                )\n                ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n            $autoFilter->showHideRows();\n            $dtEnd = new DateTimeImmutable();\n            $endDay = (int) $dtEnd->format('d');\n        } while ($startDay !== $endDay);\n\n        self::assertEquals($expectedVisible, $this->getVisibleSheet($sheet));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/AutoFilterYearTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse DateTimeImmutable;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass AutoFilterYearTest extends SetupTeardown\n{\n    public static function providerYear(): array\n    {\n        return [\n            [[5, 6, 7], Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR],\n            [[2, 3, 4], Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR],\n            [[8, 9, 10], Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR],\n            [[], Rule::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2],\n            [[2, 5, 8, 11], Rule::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1],\n            [[4, 7, 10], Rule::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11],\n        ];\n    }\n\n    /** @param mixed[] $expectedVisible */\n    #[DataProvider('providerYear')]\n    public function testYears(array $expectedVisible, string $rule): void\n    {\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same day.\n        do {\n            $sheet = $this->getSpreadsheet()->createSheet();\n            $dtStart = new DateTimeImmutable();\n            $startDay = (int) $dtStart->format('d');\n            $sheet->getCell('A1')->setValue('Date');\n            $year = (int) $dtStart->format('Y') - 1;\n            $row = 1;\n            $iteration = 0;\n            while ($iteration < 3) {\n                for ($month = 3; $month < 13; $month += 4) {\n                    ++$row;\n                    $sheet->getCell(\"A$row\")->setValue(\"=DATE($year, $month, 1)\");\n                }\n                ++$year;\n                ++$iteration;\n            }\n            ++$row;\n            $sheet->getCell(\"A$row\")->setValue('=DATE(2041, 1, 1)'); // beyond epoch\n            ++$row;\n            $sheet->getCell(\"A$row\")->setValue(7000989091802000122); // issue 4696\n            ++$row; // empty row at end\n            $this->maxRow = $maxRow = $row;\n            $autoFilter = $sheet->getAutoFilter();\n            $autoFilter->setRange(\"A1:A$maxRow\");\n            $columnFilter = $autoFilter->getColumn('A');\n            $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n            $columnFilter->createRule()\n                ->setRule(\n                    Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                    '',\n                    $rule\n                )\n                ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n            $autoFilter->showHideRows();\n            $dtEnd = new DateTimeImmutable();\n            $endDay = (int) $dtEnd->format('d');\n        } while ($startDay !== $endDay);\n\n        self::assertEquals($expectedVisible, $this->getVisibleSheet($sheet));\n    }\n\n    public function testYearToDate(): void\n    {\n        // Loop to avoid rare edge case where first calculation\n        // and second do not take place in same day.\n        do {\n            $sheet = $this->getSpreadsheet()->createSheet();\n            $dtStart = new DateTimeImmutable();\n            $startDay = (int) $dtStart->format('d');\n            $startMonth = (int) $dtStart->format('m');\n            $sheet->getCell('A1')->setValue('Date');\n            $sheet->getCell('A2')->setValue('=TODAY()');\n            // cache result for consistency in later calculations\n            $sheet->getCell('A2')->getCalculatedValue();\n            $sheet->getCell('A3')->setValue('=DATE(YEAR(A2), 12, 31)');\n            $sheet->getCell('A4')->setValue('=A3 + 1');\n            $sheet->getCell('A5')->setValue('=DATE(YEAR(A2), 1, 1)');\n            $sheet->getCell('A6')->setValue('=A5 - 1');\n\n            $this->maxRow = $maxRow = 6;\n            $autoFilter = $sheet->getAutoFilter();\n            $autoFilter->setRange(\"A1:A$maxRow\");\n            $columnFilter = $autoFilter->getColumn('A');\n            $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n            $columnFilter->createRule()\n                ->setRule(\n                    Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                    '',\n                    Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE\n                )\n                ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);\n            $autoFilter->showHideRows();\n            $dtEnd = new DateTimeImmutable();\n            $endDay = (int) $dtEnd->format('d');\n        } while ($startDay !== $endDay);\n\n        $expected = ($startMonth === 12 && $startDay === 31) ? [2, 3, 5] : [2, 5];\n        self::assertEquals($expected, $this->getVisibleSheet($sheet));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/ColumnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass ColumnTest extends SetupTeardown\n{\n    protected function initSheet(): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('G1')->setValue('Heading');\n        $sheet->getCell('G2')->setValue(2);\n        $sheet->getCell('G3')->setValue(3);\n        $sheet->getCell('G4')->setValue(4);\n        $sheet->getCell('H1')->setValue('Heading2');\n        $sheet->getCell('H2')->setValue(1);\n        $sheet->getCell('H3')->setValue(2);\n        $sheet->getCell('H4')->setValue(3);\n        $this->maxRow = $maxRow = 4;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"G1:H$maxRow\");\n\n        return $sheet;\n    }\n\n    public function testVariousGets(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n        $result = $columnFilter->getColumnIndex();\n        self::assertEquals('H', $result);\n    }\n\n    public function testGetBadColumnIndex(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Column is outside of current autofilter range.');\n        $sheet = $this->initSheet();\n        $sheet->getAutoFilter()->getColumn('B');\n    }\n\n    public function testSetColumnIndex(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n        $expectedResult = 'G';\n\n        $result = $columnFilter->setColumnIndex($expectedResult);\n\n        $result = $result->getColumnIndex();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testSetParent(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        //    Setters return the instance to implement the fluent interface\n        $result = $columnFilter->setParent(null);\n        self::assertSame('filters', $result->getFilterType());\n    }\n\n    public function testVariousSets(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n\n        $result = $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);\n\n        $result = $result->getFilterType();\n        self::assertEquals(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER, $result);\n\n        $result = $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);\n\n        $result = $result->getJoin();\n        self::assertEquals(Column::AUTOFILTER_COLUMN_JOIN_AND, $result);\n    }\n\n    public function testSetInvalidFilterTypeThrowsException(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Invalid filter type for column AutoFilter.');\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n\n        $expectedResult = 'Unfiltered';\n\n        $columnFilter->setFilterType($expectedResult);\n    }\n\n    public function testSetInvalidJoinThrowsException(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Invalid rule connection for column AutoFilter.');\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n\n        $expectedResult = 'Neither';\n\n        $columnFilter->setJoin($expectedResult);\n    }\n\n    public function testGetAttributes(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n        $attributeSet = [\n            'val' => 100,\n            'maxVal' => 200,\n        ];\n\n        $result = $columnFilter->setAttributes($attributeSet);\n\n        $result = $result->getAttributes();\n        self::assertSame($attributeSet, $result);\n    }\n\n    public function testSetAttribute(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n\n        $attributeSet = [\n            'val' => 100,\n            'maxVal' => 200,\n        ];\n\n        foreach ($attributeSet as $attributeName => $attributeValue) {\n            $columnFilter->setAttribute($attributeName, $attributeValue);\n        }\n        self::assertSame($attributeSet, $columnFilter->getAttributes());\n    }\n\n    public function testGetAttribute(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n\n        $attributeSet = [\n            'val' => 100,\n            'maxVal' => 200,\n        ];\n\n        $columnFilter->setAttributes($attributeSet);\n\n        foreach ($attributeSet as $attributeName => $attributeValue) {\n            $result = $columnFilter->getAttribute($attributeName);\n            self::assertSame($attributeValue, $result);\n        }\n        $result = $columnFilter->getAttribute('nonExistentAttribute');\n        self::assertNull($result);\n    }\n\n    public function testClone(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n        $originalRule = $columnFilter->getRules();\n        $result = clone $columnFilter;\n        self::assertSame($columnFilter->getColumnIndex(), $result->getColumnIndex());\n        self::assertSame($columnFilter->getFilterType(), $result->getFilterType());\n        self::assertSame($columnFilter->getJoin(), $result->getJoin());\n        self::assertNull($result->getParent());\n        self::assertNotNull($columnFilter->getParent());\n        self::assertContainsOnlyInstancesOf(Rule::class, $result->getRules());\n        $clonedRule = $result->getRules();\n        self::assertCount(1, $clonedRule);\n        self::assertCount(1, $originalRule);\n        self::assertNotSame($originalRule[0], $clonedRule[0]);\n        self::assertSame($originalRule[0]->getRuleType(), $clonedRule[0]->getRuleType());\n        self::assertSame($originalRule[0]->getValue(), $clonedRule[0]->getValue());\n        self::assertSame($originalRule[0]->getOperator(), $clonedRule[0]->getOperator());\n        self::assertSame($originalRule[0]->getGrouping(), $clonedRule[0]->getGrouping());\n        self::assertSame($result, $clonedRule[0]->getParent());\n    }\n\n    public function testRuleManipulation(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n        $originalRules = $columnFilter->getRules();\n        self::assertCount(1, $originalRules);\n        $rule0 = $columnFilter->getRule(0);\n        self::assertSame($originalRules[0], $rule0);\n        $rule1 = $columnFilter->getRule(1);\n        self::assertNotEquals($originalRules[0], $rule1);\n        self::assertCount(2, $columnFilter->getRules());\n        self::assertSame(Column::AUTOFILTER_COLUMN_JOIN_OR, $columnFilter->getJoin());\n        $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);\n        $rule2 = new Rule();\n        $columnFilter->addRule($rule2);\n        self::assertCount(3, $columnFilter->getRules());\n        self::assertSame(Column::AUTOFILTER_COLUMN_JOIN_AND, $columnFilter->getJoin());\n        $columnFilter->deleteRule(2);\n        self::assertCount(2, $columnFilter->getRules());\n        self::assertSame(Column::AUTOFILTER_COLUMN_JOIN_AND, $columnFilter->getJoin());\n        $columnFilter->deleteRule(1);\n        self::assertCount(1, $columnFilter->getRules());\n        self::assertSame(Column::AUTOFILTER_COLUMN_JOIN_OR, $columnFilter->getJoin());\n        $columnFilter->addRule($rule1);\n        $columnFilter->addRule($rule2);\n        $columnFilter->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);\n        self::assertCount(3, $columnFilter->getRules());\n        self::assertSame(Column::AUTOFILTER_COLUMN_JOIN_AND, $columnFilter->getJoin());\n        $columnFilter->clearRules();\n        self::assertCount(0, $columnFilter->getRules());\n        self::assertSame(Column::AUTOFILTER_COLUMN_JOIN_OR, $columnFilter->getJoin());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/DateGroupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass DateGroupTest extends SetupTeardown\n{\n    protected function initSheet(int $year): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Date');\n        $sheet->getCell('B1')->setValue('Time');\n        $sheet->getCell('C1')->setValue('DateTime');\n        $sheet->getCell('C1')->setValue('Row*10');\n        for ($row = 2; $row < 63; ++$row) {\n            $sheet->getCell(\"A$row\")->setValue(\"=DATE($year,11,30)+$row\");\n            $hour = $row % 24;\n            $minute = $row % 10;\n            $second = $row % 20;\n            $sheet->getCell(\"B$row\")->setValue(\"=TIME($hour,$minute,$second)\");\n            $sheet->getCell(\"C$row\")->setValue(\"=A$row+B$row\");\n            $sheet->getCell(\"D$row\")->setValue(\"=10*$row\");\n        }\n        $this->maxRow = $maxRow = 62;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:C$maxRow\");\n\n        return $sheet;\n    }\n\n    public function testYearMonthDayGroup(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('C');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => $year,\n                    'month' => 12,\n                    'day' => 6,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([6], $this->getVisible());\n    }\n\n    public function testIssue4696(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        $sheet->getCell('A2')->setValue(7000989091802000122);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('C');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => $year,\n                    'month' => 12,\n                    'day' => 6,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([6], $this->getVisible());\n    }\n\n    public function testYearMonthDayHourMinuteSecond1Group(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('C');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => $year,\n                    'month' => 12,\n                    'day' => 6,\n                    'hour' => 6,\n                    'minute' => 6,\n                    'second' => 6,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        $sheet->getCell('C5')->setValue(''); // make an empty cell in range\n        self::assertEquals([6], $this->getVisible());\n    }\n\n    public function testYearMonthDayHourMinuteSecond2Group(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('C');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => $year,\n                    'month' => 12,\n                    'day' => 6,\n                    'hour' => 6,\n                    'minute' => 6,\n                    'second' => 7,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([], $this->getVisible());\n    }\n\n    public function testDayGroupEpoch(): void\n    {\n        $year = 2040;\n        $sheet = $this->initSheet($year);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('C');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => $year,\n                    'month' => 12,\n                    'day' => 6,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([6], $this->getVisible());\n    }\n\n    public function testDayGroupNonArray(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        /** @var int|string */\n        $cellA2 = $sheet->getCell('A2')->getCalculatedValue();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('C');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                $cellA2\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([], $this->getVisible());\n    }\n\n    public function testHourGroup(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('B');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'hour' => 14,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([14, 38, 62], $this->getVisible());\n    }\n\n    public function testHourMinuteGroup(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('B');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'hour' => 14,\n                    'minute' => 8,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([38], $this->getVisible());\n    }\n\n    public function testHourMinuteSecondGroup1(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('B');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'hour' => 14,\n                    'minute' => 8,\n                    'second' => 18,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([38], $this->getVisible());\n    }\n\n    public function testHourMinuteSecondGroup2(): void\n    {\n        $year = 2011;\n        $sheet = $this->initSheet($year);\n        $columnFilter = $sheet->getAutoFilter()->getColumn('B');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'hour' => 14,\n                    'minute' => 8,\n                    'second' => 19,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([], $this->getVisible());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/DeleteAutoFilterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nclass DeleteAutoFilterTest extends SetupTeardown\n{\n    public function testDelete(): void\n    {\n        // Issue 2281 - deprecation in PHP81 when deleting filter\n        $sheet = $this->getSheet();\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange('H2:O256');\n        $sheet->removeAutoFilter();\n        self::assertSame('', $sheet->getAutoFilter()->getRange());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/RuleCustomTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass RuleCustomTest extends SetupTeardown\n{\n    protected function initSheet(): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Heading');\n        $sheet->getCell('A2')->setValue(2);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('A4')->setValue(4);\n        $sheet->getCell('B1')->setValue('Heading2');\n        $sheet->getCell('B2')->setValue(1);\n        $sheet->getCell('B3')->setValue(2);\n        $sheet->getCell('B4')->setValue(3);\n        $this->maxRow = $maxRow = 4;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:B$maxRow\");\n\n        return $sheet;\n    }\n\n    /** @param mixed[] $expectedResult */\n    #[DataProvider('providerCondition')]\n    public function testRuleCondition(array $expectedResult, string $condition): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                $condition,\n                3\n            )\n            ->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n        self::assertEquals($expectedResult, $this->getVisible());\n    }\n\n    public static function providerCondition(): array\n    {\n        return [\n            [[3], Rule::AUTOFILTER_COLUMN_RULE_EQUAL],\n            [[2, 4], Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL],\n            [[4], Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN],\n            [[3, 4], Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL],\n            [[2], Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN],\n            [[2, 3], Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/RuleDateGroupTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass RuleDateGroupTest extends SetupTeardown\n{\n    protected function initSheet(): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Date');\n        $sheet->getCell('A2')->setValue('=DATE(2011,1,10)');\n        $sheet->getCell('A3')->setValue('=DATE(2012,1,10)');\n        $sheet->getCell('A4')->setValue('=DATE(2011,1,10)');\n        $sheet->getCell('A5')->setValue('=DATE(2012,2,10)');\n        $sheet->getCell('A6')->setValue('=DATE(2012,1,1)');\n        $sheet->getCell('A7')->setValue('=DATE(2012,12,31)');\n        $sheet->getCell('B1')->setValue('Heading2');\n        $sheet->getCell('B2')->setValue(1);\n        $sheet->getCell('B3')->setValue(2);\n        $sheet->getCell('B4')->setValue(3);\n        $sheet->getCell('B5')->setValue(4);\n        $sheet->getCell('B6')->setValue(5);\n        $sheet->getCell('B7')->setValue(6);\n        $this->maxRow = $maxRow = 7;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:B$maxRow\");\n\n        return $sheet;\n    }\n\n    public function testYearGroup(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => 2012,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([3, 5, 6, 7], $this->getVisible());\n    }\n\n    public function testYearGroupWithInvalidIndex(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => 2012,\n                    'xyz' => 5,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([3, 5, 6, 7], $this->getVisible());\n    }\n\n    public function testYearGroupNoValidIndexes(): void\n    {\n        $this->expectException(SpException::class);\n        $this->expectExceptionMessage('Invalid rule value for column AutoFilter Rule.');\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'zzyear' => 2012,\n                    'xyz' => 5,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([3, 5, 6, 7], $this->getVisible());\n    }\n\n    public function testYearGroupBadRuleType(): void\n    {\n        $this->expectException(SpException::class);\n        $this->expectExceptionMessage('Invalid rule type for column AutoFilter Rule.');\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => 2012,\n                ]\n            )\n            ->setRuleType(\n                'xyz'\n            );\n        self::assertEquals([3, 5, 6, 7], $this->getVisible());\n    }\n\n    public function testYearMonthGroup(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                [\n                    'year' => 2012,\n                    'month' => 1,\n                ]\n            )\n            ->setRuleType(\n                Rule::AUTOFILTER_RULETYPE_DATEGROUP\n            );\n        self::assertEquals([3, 6], $this->getVisible());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/RuleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter\\Column\\Rule;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass RuleTest extends SetupTeardown\n{\n    protected function initSheet(): Worksheet\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('A1')->setValue('Heading');\n        $sheet->getCell('A2')->setValue(2);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('A4')->setValue(4);\n        $sheet->getCell('B1')->setValue('Heading2');\n        $sheet->getCell('B2')->setValue(1);\n        $sheet->getCell('B3')->setValue(2);\n        $sheet->getCell('B4')->setValue(3);\n        $this->maxRow = $maxRow = 4;\n        $autoFilter = $sheet->getAutoFilter();\n        $autoFilter->setRange(\"A1:B$maxRow\");\n\n        return $sheet;\n    }\n\n    public function testRule(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n        $autoFilterRuleObject = new Rule($columnFilter);\n        self::assertEquals(Rule::AUTOFILTER_RULETYPE_FILTER, $autoFilterRuleObject->getRuleType());\n        self::assertEquals([3], $this->getVisible());\n        $ruleParent = $autoFilterRuleObject->getParent();\n        if ($ruleParent === null) {\n            self::fail('Unexpected null parent');\n        } else {\n            self::assertEquals('A', $ruleParent->getColumnIndex());\n            self::assertSame($columnFilter, $ruleParent);\n        }\n    }\n\n    public function testSetParent(): void\n    {\n        $sheet = $this->initSheet();\n        $autoFilterRuleObject = new Rule();\n        $autoFilterRuleObject->setParent($sheet->getAutoFilter()->getColumn('B'));\n        $columnFilter = $autoFilterRuleObject->getParent();\n        if ($columnFilter === null) {\n            self::fail('Unexpected null parent');\n        } else {\n            $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n            $columnFilter->createRule()\n                ->setRule(\n                    Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                    3\n                );\n            self::assertEquals(Rule::AUTOFILTER_RULETYPE_FILTER, $autoFilterRuleObject->getRuleType());\n            self::assertEquals([4], $this->getVisible());\n        }\n    }\n\n    public function testBadSetRule(): void\n    {\n        $this->expectException(SpException::class);\n        $this->expectExceptionMessage('Invalid operator for column AutoFilter Rule.');\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                'xyz',\n                3\n            );\n    }\n\n    public function testBadSetGrouping(): void\n    {\n        $this->expectException(SpException::class);\n        $this->expectExceptionMessage('Invalid grouping for column AutoFilter Rule.');\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                '',\n                3\n            );\n        $autoFilterRuleObject = new Rule($columnFilter);\n        $autoFilterRuleObject->setGrouping('xyz');\n    }\n\n    public function testClone(): void\n    {\n        $sheet = $this->initSheet();\n        $columnFilter = $sheet->getAutoFilter()->getColumn('A');\n        $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n        $autoFilterRuleObject = new Rule($columnFilter);\n        $result = clone $autoFilterRuleObject;\n        self::assertSame($autoFilterRuleObject->getRuleType(), $result->getRuleType());\n        self::assertSame($autoFilterRuleObject->getValue(), $result->getValue());\n        self::assertSame($autoFilterRuleObject->getRuleType(), $result->getRuleType());\n        self::assertSame($autoFilterRuleObject->getOperator(), $result->getOperator());\n        self::assertSame($autoFilterRuleObject->getGrouping(), $result->getGrouping());\n        self::assertNotNull($autoFilterRuleObject->getParent());\n        self::assertNull($result->getParent());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoFilter/SetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\AutoFilter;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SetupTeardown extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected int $maxRow = 4;\n\n    protected function tearDown(): void\n    {\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n\n    /** @return int[] */\n    public function getVisible(): array\n    {\n        return $this->getVisibleSheet($this->getSheet());\n    }\n\n    /** @return int[] */\n    public function getVisibleSheet(Worksheet $sheet): array\n    {\n        $sheet->getAutoFilter()->showHideRows();\n        $actualVisible = [];\n        for ($row = 2; $row <= $this->maxRow; ++$row) {\n            if ($sheet->isRowVisible($row)) {\n                $actualVisible[] = $row;\n            }\n        }\n\n        return $actualVisible;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/AutoSizeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableStyle;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AutoSizeTest extends TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    private Worksheet $worksheet;\n\n    protected function setUp(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $this->worksheet = $this->spreadsheet->getActiveSheet();\n\n        $this->worksheet->setCellValue('A1', 'YEAR')\n            ->setCellValue('B1', 'QUARTER')\n            ->setCellValue('C1', 'COUNTRY')\n            ->setCellValue('D1', 'SALES');\n        $dataArray = [\n            ['10', 'Q1', 'United States', 790],\n            ['10', 'Q2', 'United States', 730],\n            ['10', 'Q3', 'United States', 860],\n            ['10', 'Q4', 'United States', 850],\n        ];\n\n        $this->worksheet->fromArray($dataArray, null, 'A2');\n\n        $toColumn = $this->worksheet->getHighestColumn();\n        StringHelper::stringIncrement($toColumn);\n        for ($i = 'A'; $i !== $toColumn; StringHelper::stringIncrement($i)) {\n            $this->worksheet->getColumnDimension($i)->setAutoSize(true);\n        }\n    }\n\n    protected function tearDown(): void\n    {\n        $this->spreadsheet->disconnectWorksheets();\n        unset($this->spreadsheet, $this->worksheet);\n    }\n\n    private function setTable(): Table\n    {\n        $table = new Table('A1:D5', 'Sales_Data');\n        $tableStyle = new TableStyle();\n        $tableStyle->setTheme(TableStyle::TABLE_STYLE_MEDIUM2);\n        $table->setStyle($tableStyle);\n        $this->worksheet->addTable($table);\n\n        return $table;\n    }\n\n    /** @return float[] */\n    private function readColumnSizes(): array\n    {\n        $columnSizes = [];\n        $toColumn = $this->worksheet->getHighestColumn();\n        StringHelper::stringIncrement($toColumn);\n        for ($column = 'A'; $column !== $toColumn; StringHelper::stringIncrement($column)) {\n            $columnSizes[$column] = $this->worksheet->getColumnDimension($column)->getWidth();\n        }\n\n        return $columnSizes;\n    }\n\n    public function testStandardAutoSize(): void\n    {\n        $this->worksheet->calculateColumnWidths();\n        $columnSizes = $this->readColumnSizes();\n\n        self::assertSame(['A' => 5.856, 'B' => 9.283, 'C' => 16.425, 'D' => 6.998], $columnSizes);\n    }\n\n    public function testAutoFilterAutoSize(): void\n    {\n        $this->worksheet->setAutoFilter('A1:D5');\n\n        $this->worksheet->calculateColumnWidths();\n        $columnSizes = $this->readColumnSizes();\n\n        self::assertSame(['A' => 8.141, 'B' => 11.569, 'C' => 16.425, 'D' => 9.283], $columnSizes);\n    }\n\n    public function testTableWithAutoFilterAutoSize(): void\n    {\n        $this->setTable();\n\n        $this->worksheet->calculateColumnWidths();\n        $columnSizes = $this->readColumnSizes();\n\n        self::assertSame(['A' => 8.141, 'B' => 11.569, 'C' => 16.425, 'D' => 9.283], $columnSizes);\n    }\n\n    public function testTableWithoutHiddenHeadersAutoSize(): void\n    {\n        $table = $this->setTable();\n        $table->setShowHeaderRow(false);\n\n        $this->worksheet->calculateColumnWidths();\n        $columnSizes = $this->readColumnSizes();\n\n        self::assertSame(['A' => 5.856, 'B' => 9.283, 'C' => 16.425, 'D' => 6.998], $columnSizes);\n    }\n\n    public function testTableWithAutoFilterCenterHeaders(): void\n    {\n        $this->setTable();\n        $this->worksheet->getStyle('A1:D1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n\n        $this->worksheet->calculateColumnWidths();\n        $columnSizes = $this->readColumnSizes();\n\n        self::assertSame(['A' => 10.569, 'B' => 13.997, 'C' => 16.425, 'D' => 11.711], $columnSizes);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ByColumnAndRowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ByColumnAndRowTest extends TestCase\n{\n    public function testSetCellValueByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValue([2, 2], 2);\n        self::assertSame(2, $sheet->getCell('B2')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetCellValueExplicitByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValueExplicit([2, 2], '=\"PHP Rules\"', DataType::TYPE_STRING);\n        self::assertSame('=\"PHP Rules\"', $sheet->getCell('B2')->getValue());\n        self::assertSame(DataType::TYPE_STRING, $sheet->getCell('B2')->getDataType());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellExistsByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $cellExists = $sheet->cellExists([2, 2]);\n        self::assertFalse($cellExists);\n\n        $sheet->setCellValue('B2', 2);\n\n        $cellExists = $sheet->cellExists([2, 2]);\n        self::assertTrue($cellExists);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValue('B2', 2);\n        $cell = $sheet->getCell([2, 2]);\n        self::assertSame('B2', $cell->getCoordinate());\n        self::assertSame(2, $cell->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetStyleByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n        $sheet->getStyle('B2:C3')->getFont()->setBold(true);\n\n        $rangeStyle = $sheet->getStyle([2, 2, 3, 3]);\n        self::assertTrue($rangeStyle->getFont()->getBold());\n\n        $cellStyle = $sheet->getStyle([2, 2]);\n        self::assertTrue($cellStyle->getFont()->getBold());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetBreakByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValue('B2', 2);\n        $sheet->setBreak([2, 2], Worksheet::BREAK_COLUMN);\n\n        $breaks = $sheet->getBreaks();\n        self::assertArrayHasKey('B2', $breaks);\n        self::assertSame(Worksheet::BREAK_COLUMN, $breaks['B2']);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testMergeCellsByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->mergeCells([2, 2, 3, 3]);\n        $mergeRanges = $sheet->getMergeCells();\n        self::assertArrayHasKey('B2:C3', $mergeRanges);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnergeCellsByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->mergeCells('B2:C3');\n        $mergeRanges = $sheet->getMergeCells();\n        self::assertArrayHasKey('B2:C3', $mergeRanges);\n\n        $sheet->unmergeCells([2, 2, 3, 3]);\n        $mergeRanges = $sheet->getMergeCells();\n        self::assertEmpty($mergeRanges);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testProtectCellsByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->protectCells([2, 2, 3, 3], 'secret', false);\n        $protectedRanges2 = $sheet->getProtectedCellRanges();\n        self::assertArrayHasKey('B2:C3', $protectedRanges2);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnprotectCellsByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->protectCells('B2:C3', 'secret', false);\n        $protectedRanges = $sheet->getProtectedCellRanges();\n        self::assertArrayHasKey('B2:C3', $protectedRanges);\n\n        $sheet->unprotectCells([2, 2, 3, 3]);\n        $protectedRanges = $sheet->getProtectedCellRanges();\n        self::assertEmpty($protectedRanges);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSetAutoFilterByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->setAutoFilter([2, 2, 3, 3]);\n        $autoFilter = $sheet->getAutoFilter();\n        self::assertSame('B2:C3', $autoFilter->getRange());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFreezePaneByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->freezePane([2, 2]);\n        $freezePane = $sheet->getFreezePane();\n        self::assertSame('B2', $freezePane);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCommentByColumnAndRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValue('B2', 2);\n        $spreadsheet->getActiveSheet()\n            ->getComment('B2')\n            ->getText()->createTextRun('My Test Comment');\n\n        $comment = $sheet->getComment([2, 2]);\n        self::assertSame('My Test Comment', $comment->getText()->getPlainText());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ByColumnAndRowUndeprecatedTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ByColumnAndRowUndeprecatedTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    private function getSpreadsheet(): Spreadsheet\n    {\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    public function testSetCellValueByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValue([2, 2], 2);\n        self::assertSame(2, $sheet->getCell('B2')->getValue());\n    }\n\n    public function testSetCellValueExplicitByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValueExplicit([2, 2], '=\"PHP Rules\"', DataType::TYPE_STRING);\n        self::assertSame('=\"PHP Rules\"', $sheet->getCell('B2')->getValue());\n        self::assertSame(DataType::TYPE_STRING, $sheet->getCell('B2')->getDataType());\n    }\n\n    public function testCellExistsByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $cellExists = $sheet->cellExists([2, 2]);\n        self::assertFalse($cellExists);\n\n        $sheet->setCellValue('B2', 2);\n\n        $cellExists = $sheet->cellExists([2, 2]);\n        self::assertTrue($cellExists);\n    }\n\n    public function testGetCellByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValue('B2', 2);\n        $cell = $sheet->getCell([2, 2]);\n        self::assertSame('B2', $cell->getCoordinate());\n        self::assertSame(2, $cell->getValue());\n    }\n\n    public function testGetStyleByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n        $sheet->getStyle('B2:C3')->getFont()->setBold(true);\n\n        $rangeStyle = $sheet->getStyle([2, 2, 3, 3]);\n        self::assertTrue($rangeStyle->getFont()->getBold());\n\n        $cellStyle = $sheet->getStyle([2, 2]);\n        self::assertTrue($cellStyle->getFont()->getBold());\n    }\n\n    public function testSetBreakByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValue('B2', 2);\n        $sheet->setBreak([2, 2], Worksheet::BREAK_COLUMN);\n\n        $breaks = $sheet->getBreaks();\n        self::assertArrayHasKey('B2', $breaks);\n        self::assertSame(Worksheet::BREAK_COLUMN, $breaks['B2']);\n    }\n\n    public function testMergeCellsByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->mergeCells([2, 2, 3, 3]);\n        $mergeRanges = $sheet->getMergeCells();\n        self::assertArrayHasKey('B2:C3', $mergeRanges);\n    }\n\n    public function testUnmergeCellsByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->mergeCells('B2:C3');\n        $mergeRanges = $sheet->getMergeCells();\n        self::assertArrayHasKey('B2:C3', $mergeRanges);\n\n        $sheet->unmergeCells([2, 2, 3, 3]);\n        $mergeRanges = $sheet->getMergeCells();\n        self::assertEmpty($mergeRanges);\n    }\n\n    public function testProtectCellsByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->protectCells([2, 2, 3, 3], 'secret', false);\n        $protectedRanges = $sheet->getProtectedCellRanges();\n        self::assertArrayHasKey('B2:C3', $protectedRanges);\n    }\n\n    public function testUnprotectCellsByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->protectCells('B2:C3', 'secret', false);\n        $protectedRanges = $sheet->getProtectedCellRanges();\n        self::assertArrayHasKey('B2:C3', $protectedRanges);\n\n        $sheet->unprotectCells([2, 2, 3, 3]);\n        $protectedRanges = $sheet->getProtectedCellRanges();\n        self::assertEmpty($protectedRanges);\n    }\n\n    public function testSetAutoFilterByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->setAutoFilter([2, 2, 3, 3]);\n        $autoFilter = $sheet->getAutoFilter();\n        self::assertSame('B2:C3', $autoFilter->getRange());\n    }\n\n    public function testFreezePaneByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $data = [['A', 'B'], ['C', 'D']];\n        $sheet->fromArray($data, null, 'B2', true);\n\n        $sheet->freezePane([2, 2]);\n        $freezePane = $sheet->getFreezePane();\n        self::assertSame('B2', $freezePane);\n    }\n\n    public function testGetCommentByColumnAndRow(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->setCellValue('B2', 2);\n        $spreadsheet->getActiveSheet()\n            ->getComment('B2')\n            ->getText()->createTextRun('My Test Comment');\n\n        $comment = $sheet->getComment([2, 2]);\n        self::assertSame('My Test Comment', $comment->getText()->getPlainText());\n    }\n\n    public function testMergeCellsBadArray(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('CellRange array length must be 2 or 4');\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->mergeCells([2, 2, 3]);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/CloneTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CloneTest extends TestCase\n{\n    public function testUnattachedIndex(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->getCell('A1')->setValue(10);\n        $sheet2 = clone $sheet1;\n        $sheet2->getCell('A1')->setValue(20);\n        self::assertSame(0, $spreadsheet->getIndex($sheet1));\n        $idx = $spreadsheet->getIndex($sheet2, true);\n        self::assertSame(-1, $idx);\n        $sheet2->setTitle('clone');\n        $spreadsheet->addSheet($sheet2);\n        $idx = $spreadsheet->getIndex($sheet2, true);\n        self::assertSame(1, $idx);\n        self::assertSame(10, $spreadsheet->getSheet(0)->getCell('A1')->getValue());\n        self::assertSame(20, $spreadsheet->getSheet(1)->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCloneIndex(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Sheet does not exist');\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->getCell('A1')->setValue(10);\n        $sheet2 = clone $sheet1;\n        $spreadsheet->getSheet($spreadsheet->getIndex($sheet2))\n            ->setCellValue('A1', 100);\n    }\n\n    public function testSerialize1(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->getCell('A1')->setValue(10);\n        $serialized = serialize($sheet1);\n        $newSheet = unserialize($serialized);\n        self::assertInstanceOf(Worksheet::class, $newSheet);\n        self::assertSame(10, $newSheet->getCell('A1')->getValue());\n        self::assertNotSame($newSheet, $sheet1);\n        self::assertNotNull($newSheet->getParent());\n        self::assertNotSame($newSheet->getParent(), $sheet1->getParent());\n        $newSheet->getParent()->disconnectWorksheets();\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSerialize2(): void\n    {\n        $sheet1 = new Worksheet();\n        $sheet1->getCell('A1')->setValue(10);\n        $serialized = serialize($sheet1);\n        $newSheet = unserialize($serialized);\n        self::assertInstanceOf(Worksheet::class, $newSheet);\n        self::assertSame(10, $newSheet->getCell('A1')->getValue());\n        self::assertNotSame($newSheet, $sheet1);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnCellIterator2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\CellIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\ColumnCellIterator;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnCellIterator2Test extends TestCase\n{\n    // Phpstan does not think RowCellIterator can return null\n    private static function isCellNull(?Cell $item): bool\n    {\n        return $item === null;\n    }\n\n    #[DataProvider('providerExistingCell')]\n    public function testEndRange(?bool $existing, string $expectedResultFirst, string $expectedResultLast): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B2')->setValue('cellb2');\n        $sheet->getCell('B6')->setValue('cellb6');\n\n        $iterator = new ColumnCellIterator($sheet, 'B', 1, 8);\n        if (isset($existing)) {\n            $iterator->setIterateOnlyExistingCells($existing);\n        }\n        $lastCoordinate = '';\n        $firstCoordinate = '';\n        foreach ($iterator as $cell) {\n            if (!self::isCellNull($cell)) {\n                $lastCoordinate = $cell->getCoordinate();\n                if (!$firstCoordinate) {\n                    $firstCoordinate = $lastCoordinate;\n                }\n            }\n        }\n        self::assertSame($expectedResultFirst, $firstCoordinate);\n        self::assertSame($expectedResultLast, $lastCoordinate);\n    }\n\n    public static function providerExistingCell(): array\n    {\n        return [\n            [null, 'B1', 'B8'],\n            [false, 'B1', 'B8'],\n            [true, 'B2', 'B6'],\n        ];\n    }\n\n    #[DataProvider('providerEmptyColumn')]\n    public function testEmptyColumn(?bool $existing, int $expectedResult): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B2')->setValue('cellb2');\n        $sheet->getCell('B6')->setValue('cellb6');\n\n        $iterator = new ColumnCellIterator($sheet, 'C');\n        if (isset($existing)) {\n            $iterator->setIterateOnlyExistingCells($existing);\n        }\n        $numCells = 0;\n        foreach ($iterator as $cell) {\n            ++$numCells;\n        }\n        self::assertSame($expectedResult, $numCells);\n    }\n\n    public static function providerEmptyColumn(): array\n    {\n        return [\n            [null, 6], // Default behaviour\n            [false, 6],\n            [true, 0],\n        ];\n    }\n\n    #[DataProvider('providerNullOrCreate')]\n    public function testNullOrCreateOption(?bool $existingBehaviour, int $expectedCreatedResult, mixed $expectedNullResult): void\n    {\n        if (!is_int($expectedNullResult)) {\n            self::fail('unexpected unused arg');\n        }\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $iterator = new ColumnCellIterator($sheet, 'F');\n        if (isset($existingBehaviour)) {\n            $iterator->setIfNotExists($existingBehaviour);\n        }\n        $notExistsBehaviour = $iterator->getIfNotExists();\n        self::assertSame($expectedCreatedResult > 0, $notExistsBehaviour);\n    }\n\n    #[DataProvider('providerNullOrCreate')]\n    public function testNullOrCreate(?bool $existing, int $expectedCreatedResult, int $expectedNullResult): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B2')->setValue('cellb2');\n        $sheet->getCell('F4')->setValue('cellf2');\n\n        $iterator = new ColumnCellIterator($sheet, 'F');\n        if (isset($existing)) {\n            $iterator->setIfNotExists($existing);\n        }\n        $numCreatedCells = $numEmptyCells = 0;\n        foreach ($iterator as $cell) {\n            $numCreatedCells += (int) (!self::isCellNull($cell) && $cell->getValue() === null);\n            $numEmptyCells += (int) (self::isCellNull($cell));\n        }\n        self::assertSame($expectedCreatedResult, $numCreatedCells);\n        self::assertSame($expectedNullResult, $numEmptyCells);\n    }\n\n    public static function providerNullOrCreate(): array\n    {\n        return [\n            [null, 3, 0], // Default behaviour\n            [CellIterator::IF_NOT_EXISTS_CREATE_NEW, 3, 0],\n            [CellIterator::IF_NOT_EXISTS_RETURN_NULL, 0, 3],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnCellIteratorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Exception as Except;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\ColumnCellIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnCellIteratorTest extends TestCase\n{\n    private const CELL_VALUES\n        = [\n            [110, 210, 310, 410, 510, 610, 710],\n            [120, 220, 320, 420, 520, 620],\n            [130, 230, 330, 430, 530, 630],\n            [140, 240, 340, 440, 540, 640],\n            [150, 250, 350, 450, 550, 650],\n            [160, null, 360, null, 560],\n        ];\n\n    // Phpstan does not think RowCellIterator can return null\n    private static function isCellNull(?Cell $item): bool\n    {\n        return $item === null;\n    }\n\n    private static function getPopulatedSheet(Spreadsheet $spreadsheet): Worksheet\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(self::CELL_VALUES);\n\n        return $sheet;\n    }\n\n    public function testIteratorFullRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnCellIterator($sheet, 'A');\n        $ColumnCellIndexResult = 1;\n        self::assertEquals($ColumnCellIndexResult, $iterator->key());\n\n        $values = [];\n        foreach ($iterator as $key => $ColumnCell) {\n            self::assertFalse(self::isCellNull($ColumnCell));\n            $values[] = $ColumnCell->getValue();\n            self::assertEquals($ColumnCellIndexResult++, $key);\n        }\n        $transposed = array_map(null, ...self::CELL_VALUES);\n        self::assertSame($transposed[0], $values);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorStartEndRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnCellIterator($sheet, 'A', 2, 4);\n        $ColumnCellIndexResult = 2;\n        self::assertEquals($ColumnCellIndexResult, $iterator->key());\n\n        $values = [];\n        foreach ($iterator as $key => $ColumnCell) {\n            self::assertFalse(self::isCellNull($ColumnCell));\n            $values[] = $ColumnCell->getValue();\n            self::assertEquals($ColumnCellIndexResult++, $key);\n        }\n        self::assertSame([120, 130, 140], $values);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorSeekAndPrev(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnCellIterator($sheet, 'A', 2, 4);\n        $columnIndexResult = 4;\n        $iterator->seek(4);\n        self::assertEquals($columnIndexResult, $iterator->key());\n\n        $values = [];\n        while ($iterator->valid()) {\n            $current = $iterator->current();\n            self::assertNotNull($current);\n            $cell = $current->getCoordinate();\n            $values[] = $sheet->getCell($cell)->getValue();\n            $iterator->prev();\n        }\n        self::assertSame([140, 130, 120], $values);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSeekOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $this->expectException(Except::class);\n        $this->expectExceptionMessage('Row 1 is out of range');\n        $iterator = new ColumnCellIterator($sheet, 'A', 2, 4);\n        $iterator->seek(1);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSeekNotExisting(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $this->expectException(Except::class);\n        $this->expectExceptionMessage('Cell does not exist');\n\n        $iterator = new ColumnCellIterator($sheet, 'A', 2, 4);\n        $iterator->setIterateOnlyExistingCells(true);\n        $iterator->seek(2);\n    }\n\n    public function testPrevOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnCellIterator($sheet, 'A', 2, 4);\n        $iterator->prev();\n        self::assertFalse($iterator->valid());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnDimension2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ColumnDimension2Test extends AbstractFunctional\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerType')]\n    public function testSetsAndDefaults(string $type): void\n    {\n        $columns = ['J', 'A', 'F', 'M', 'N', 'T', 'S'];\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $expectedCm = 0.45;\n        foreach ($columns as $column) {\n            $sheet->getColumnDimension($column)->setWidth($expectedCm, 'cm');\n        }\n        if ($type === 'Html') {\n            $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type, null, [self::class, 'inlineCss']);\n        } else {\n            $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        }\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        for ($column = 'A'; $column !== 'Z'; StringHelper::stringIncrement($column)) {\n            if (in_array($column, $columns, true)) {\n                self::assertEqualsWithDelta($expectedCm, $sheet->getColumnDimension($column)->getWidth(Dimension::UOM_CENTIMETERS), 1E-3, \"column $column\");\n            } elseif ($type === 'Xls' && $column <= 'T') {\n                // Xls is a bit weird. Columns through max used\n                //    actually set a width in the spreadsheet file.\n                // Columns above max used obviously do not.\n                self::assertEqualsWithDelta(9.140625, $sheet->getColumnDimension($column)->getWidth(), 1E-3, \"column $column\");\n            } elseif ($type === 'Html' && $column <= 'T') {\n                // Html is a lot like Xls. Columns through max used\n                //    actually set a width in the spreadsheet file.\n                // Columns above max used obviously do not.\n                self::assertEqualsWithDelta(7.998, $sheet->getColumnDimension($column)->getWidth(), 1E-3, \"column $column\");\n            } else {\n                self::assertSame(-1.0, $sheet->getColumnDimension($column)->getWidth(), \"column $column\");\n            }\n        }\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerType(): array\n    {\n        return [\n            ['Xlsx'],\n            ['Xls'],\n            ['Ods'],\n            ['Html'],\n        ];\n    }\n\n    public static function inlineCss(Html $writer): void\n    {\n        $writer->setUseInlineCss(true);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnDimension3Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ColumnDimension3Test extends AbstractFunctional\n{\n    public function testXlsxDefault(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B1')->setValue('hello');\n        $sheet->getCell('C1')->setValue(2);\n        $sheet->getCell('A1')->setValue('=REPT(\"ABCDEFGHIJKLMNOPQRS*\",13)');\n        $sheet->getStyle('A1')->getFont()\n            ->setSize(11)\n            ->setName('Courier New');\n        $sheet->getColumnDimension('A')->setAutoSize(true);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertGreaterThan(255.0, $sheet->getColumnDimension('A')->getWidth());\n        self::assertLessThan(255.0, $sheet->getColumnDimension('B')->getWidth());\n        self::assertSame(-1.0, $sheet->getColumnDimension('C')->getWidth());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testXlsxRestrict(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B1')->setValue('hello');\n        $sheet->getCell('C1')->setValue(2);\n        $sheet->getCell('A1')->setValue('=REPT(\"ABCDEFGHIJKLMNOPQRS*\",13)');\n        $sheet->getStyle('A1')->getFont()\n            ->setSize(11)\n            ->setName('Courier New');\n        $sheet->getColumnDimension('A')->setAutoSize(true);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', null, [self::class, 'restrictWidth']);\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(255.0, $sheet->getColumnDimension('A')->getWidth());\n        self::assertLessThan(255.0, $sheet->getColumnDimension('B')->getWidth());\n        self::assertSame(-1.0, $sheet->getColumnDimension('C')->getWidth());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testXls(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B1')->setValue('hello');\n        $sheet->getCell('C1')->setValue(2);\n        $sheet->getCell('A1')->setValue('=REPT(\"ABCDEFGHIJKLMNOPQRS*\",13)');\n        $sheet->getStyle('A1')->getFont()\n            ->setSize(11)\n            ->setName('Courier New');\n        $sheet->getColumnDimension('A')->setAutoSize(true);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(255.0, $sheet->getColumnDimension('A')->getWidth());\n        self::assertLessThan(255.0, $sheet->getColumnDimension('B')->getWidth());\n        self::assertLessThan(255.0, $sheet->getColumnDimension('C')->getWidth());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function restrictWidth(XlsxWriter $writer): void\n    {\n        $writer->setRestrictMaxColumnWidth(true);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnDimensionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\ColumnDimension;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnDimensionTest extends TestCase\n{\n    public function testInstantiateColumnDimensionDefault(): void\n    {\n        $expected = 'A';\n        $columnDimension = new ColumnDimension();\n        $result = $columnDimension->getColumnIndex();\n        self::assertEquals($expected, $result);\n    }\n\n    public function testGetAndSetColumnIndex(): void\n    {\n        $expected = 'B';\n        $columnDimension = new ColumnDimension();\n        $columnDimension->setColumnIndex($expected);\n        $result = $columnDimension->getColumnIndex();\n        self::assertSame($expected, $result);\n    }\n\n    public function testGetAndSetWidth(): void\n    {\n        $expected = 1.2;\n        $columnDimension = new ColumnDimension();\n\n        $columnDimension->setWidth($expected);\n        $result = $columnDimension->getWidth();\n        self::assertSame($expected, $result);\n\n        $expectedPx = 32.0;\n        $expectedPt = 24.0;\n        $columnDimension->setWidth($expectedPx, Dimension::UOM_PIXELS);\n        $resultPx = $columnDimension->getWidth(Dimension::UOM_PIXELS);\n        self::assertSame($expectedPx, $resultPx);\n        $resultPt = $columnDimension->getWidth(Dimension::UOM_POINTS);\n        self::assertSame($expectedPt, $resultPt);\n    }\n\n    public function testGetAndSetAutoSize(): void\n    {\n        $expected = true;\n        $columnDimension = new ColumnDimension();\n        $columnDimension->setAutoSize($expected);\n        $result = $columnDimension->getAutoSize();\n        self::assertTrue($result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnIteratorEmptyTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\CellIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\ColumnIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnIteratorEmptyTest extends TestCase\n{\n    private static function getPopulatedSheet(Spreadsheet $spreadsheet): Worksheet\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValueExplicit('A1', 'Hello World', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('C2', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('D2', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('E2', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('E3', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('F2', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('F3', 'PHP', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('G2', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('G3', 'PHP', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('H2', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('H3', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('H4', 'PHP', DataType::TYPE_STRING);\n\n        return $sheet;\n    }\n\n    #[DataProvider('emptyColumnBasicProvider')]\n    public function testIteratorEmptyColumn(string $columnId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet, 'A', 'I');\n        $iterator->seek($columnId);\n        $column = $iterator->current();\n        $isEmpty = $column->isEmpty();\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyColumnBasicProvider(): array\n    {\n        return [\n            ['A', false],\n            ['B', true],\n            ['C', false],\n            ['D', false],\n            ['E', false],\n            ['F', false],\n            ['G', false],\n            ['H', false],\n            ['I', true],\n        ];\n    }\n\n    #[DataProvider('emptyColumnNullAsEmptyProvider')]\n    public function testIteratorEmptyColumnWithNull(string $columnId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet, 'A', 'I');\n        $iterator->seek($columnId);\n        $column = $iterator->current();\n        $isEmpty = $column->isEmpty(CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL);\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyColumnNullAsEmptyProvider(): array\n    {\n        return [\n            ['A', false],\n            ['B', true],\n            ['C', true],\n            ['D', false],\n            ['E', false],\n            ['F', false],\n            ['G', false],\n            ['H', false],\n            ['I', true],\n        ];\n    }\n\n    #[DataProvider('emptyColumnEmptyStringAsEmptyProvider')]\n    public function testIteratorEmptyColumnWithEmptyString(string $columnId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet, 'A', 'I');\n        $iterator->seek($columnId);\n        $column = $iterator->current();\n        $isEmpty = $column->isEmpty(CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL);\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyColumnEmptyStringAsEmptyProvider(): array\n    {\n        return [\n            ['A', false],\n            ['B', true],\n            ['C', false],\n            ['D', true],\n            ['E', false],\n            ['F', false],\n            ['G', false],\n            ['H', false],\n            ['I', true],\n        ];\n    }\n\n    #[DataProvider('emptyColumnNullAndEmptyStringAsEmptyProvider')]\n    public function testIteratorEmptyColumnWithNullAndEmptyString(string $columnId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet, 'A', 'I');\n        $iterator->seek($columnId);\n        $column = $iterator->current();\n        $isEmpty = $column->isEmpty(\n            CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL | CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL\n        );\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyColumnNullAndEmptyStringAsEmptyProvider(): array\n    {\n        return [\n            ['A', false],\n            ['B', true],\n            ['C', true],\n            ['D', true],\n            ['E', true],\n            ['F', false],\n            ['G', false],\n            ['H', false],\n            ['I', true],\n        ];\n    }\n\n    public function testIteratorEmptyColumnWithRowLimit(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $sheet->setCellValue('A8', 'NO LONGER EMPTY');\n\n        $iterator = new ColumnIterator($sheet, 'A', 'A');\n        $column = $iterator->current();\n\n        $isEmpty = $column->isEmpty(CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL);\n        self::assertFalse($isEmpty);\n        $isEmpty = $column->isEmpty(CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL, 2, 7);\n        self::assertTrue($isEmpty);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnIteratorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as Except;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\ColumnIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnIteratorTest extends TestCase\n{\n    private const CELL_VALUES\n        = [\n            [110, 210, 310, 410, 510, 610],\n            [120, 220, 320, 420, 520, 620],\n            [130, null, 330, null, 530],\n        ];\n\n    private static function getPopulatedSheet(Spreadsheet $spreadsheet): Worksheet\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(self::CELL_VALUES);\n\n        return $sheet;\n    }\n\n    public function testIteratorFullRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet);\n        $columnIndexResult = 'A';\n        self::assertEquals($columnIndexResult, $iterator->key());\n\n        $counter = 0;\n        foreach ($iterator as $key => $column) {\n            ++$counter;\n            self::assertEquals($columnIndexResult, $key);\n            StringHelper::stringIncrement($columnIndexResult);\n        }\n        self::assertCount($counter, self::CELL_VALUES[0]);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorStartEndRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet, 'B', 'D');\n        $columnIndexResult = 'B';\n        self::assertEquals($columnIndexResult, $iterator->key());\n\n        $counter = 0;\n        foreach ($iterator as $key => $column) {\n            ++$counter;\n            self::assertEquals($columnIndexResult, $key);\n            StringHelper::stringIncrement($columnIndexResult);\n        }\n        self::assertSame(3, $counter);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorSeekAndPrev(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet, 'B', 'D');\n        $columnIndexResult = 'D';\n        $iterator->seek('D');\n        self::assertEquals($columnIndexResult, $iterator->key());\n\n        $counter = 0;\n        while ($iterator->valid() !== false) {\n            ++$counter;\n            self::assertEquals($columnIndexResult, $iterator->key(), \"counter $counter\");\n            // https://stackoverflow.com/questions/37027277/decrement-character-with-php\n            $columnIndexResult = chr(ord($columnIndexResult) - 1);\n            $iterator->prev();\n        }\n        self::assertSame(3, $counter);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorResetStart(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet, 'B', 'D');\n        $iterator->resetStart('E');\n\n        $key = $iterator->key();\n        self::assertSame('E', $key);\n\n        $lastColumn = $iterator->key();\n        while ($iterator->valid() !== false) {\n            $iterator->next();\n            $lastColumn = $iterator->key();\n        }\n        self::assertSame('F', $lastColumn);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSeekOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $this->expectException(Except::class);\n\n        $iterator = new ColumnIterator($sheet, 'B', 'D');\n        $iterator->seek('A');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testPrevOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new ColumnIterator($sheet, 'B', 'D');\n        $iterator->prev();\n        self::assertFalse($iterator->valid());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testResetStartOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $this->expectException(Except::class);\n\n        $iterator = new ColumnIterator($sheet, 'B', 'D');\n        $iterator->resetStart('H');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnRowStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnRowStyleTest extends TestCase\n{\n    public function testColumnStyle(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $columnStyle = $sheet->getStyle('B:C');\n        $columnStyle->applyFromArray([\n            'font' => ['name' => 'Who knows'],\n        ]);\n        self::assertSame(\n            'Who knows',\n            $sheet->getColumnStyle('B')?->getFont()->getName()\n        );\n        self::assertSame(\n            'Who knows',\n            $sheet->getColumnStyle('C')?->getFont()->getName()\n        );\n        self::assertNull(\n            $sheet->getColumnStyle('A')?->getFont()->getName()\n        );\n        self::assertNull(\n            $sheet->getColumnStyle('D')?->getFont()->getName()\n        );\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRowStyle(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $rowStyle = $sheet->getStyle('2:3');\n        $rowStyle->applyFromArray([\n            'font' => ['name' => 'Who knows'],\n        ]);\n        self::assertSame(\n            'Who knows',\n            $sheet->getRowStyle(2)?->getFont()->getName()\n        );\n        self::assertSame(\n            'Who knows',\n            $sheet->getRowStyle(3)?->getFont()->getName()\n        );\n        self::assertNull(\n            $sheet->getRowStyle(1)?->getFont()->getName()\n        );\n        self::assertNull(\n            $sheet->getRowStyle(4)?->getFont()->getName()\n        );\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ColumnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Column;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ColumnTest extends TestCase\n{\n    public function testInstantiateColumnDefault(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $column = new Column($sheet);\n        $columnIndex = $column->getColumnIndex();\n        self::assertEquals('A', $columnIndex);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInstantiateColumnSpecified(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $column = new Column($sheet, 'E');\n        $columnIndex = $column->getColumnIndex();\n        self::assertEquals('E', $columnIndex);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellIterator(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $column = new Column($sheet);\n        $cellIterator = $column->getCellIterator();\n        self::assertSame(1, $cellIterator->key());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetRowIterator(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $column = new Column($sheet);\n        $cellIterator = $column->getRowIterator();\n        self::assertSame(1, $cellIterator->key());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ConditionalIntersectionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalIntersectionTest extends TestCase\n{\n    public function testGetConditionalStyles(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2, 3, 4, 5],\n            [2, 3, 4, 5, 6],\n            [3, 4, 5, 6, 7],\n        ]);\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_BETWEEN);\n        $condition1->setConditions([2, 3]);\n        $condition1->getStyle()->getFont()\n            ->setBold(true);\n        $conditionalStyles = [$condition1];\n        $sheet->setConditionalStyles('A1:C3 B1:B3', $conditionalStyles);\n        self::assertEmpty($sheet->getConditionalStyles('A2'));\n        $cond = $sheet->getConditionalStyles('B2');\n        self::assertCount(1, $cond);\n        self::assertSame(Conditional::CONDITION_CELLIS, $cond[0]->getConditionType());\n        self::assertSame(Conditional::OPERATOR_BETWEEN, $cond[0]->getOperatorType());\n        self::assertSame([2, 3], $cond[0]->getConditions());\n        self::assertTrue($cond[0]->getStyle()->getFont()->getBold());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetConditionalRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2, 3, 4, 5],\n            [2, 3, 4, 5, 6],\n            [3, 4, 5, 6, 7],\n        ]);\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_BETWEEN);\n        $condition1->setConditions([2, 3]);\n        $condition1->getStyle()->getFont()\n            ->setBold(true);\n        $conditionalStyles = [$condition1];\n        $sheet->setConditionalStyles('A1:C3 B1:B3', $conditionalStyles);\n        self::assertNull($sheet->getConditionalRange('A2'));\n        self::assertSame('A1:C3 B1:B3', $sheet->getConditionalRange('B2'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ConditionalStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalStyleTest extends TestCase\n{\n    protected Spreadsheet $spreadsheet;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->spreadsheet = new Spreadsheet();\n\n        $conditional1 = new Conditional();\n        $conditional1->setConditionType(Conditional::CONDITION_CELLIS);\n        $conditional1->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $conditional1->addCondition('0');\n        $conditional1->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_RED);\n        $conditional1->getStyle()->getFont()->setBold(true);\n\n        $conditional2 = new Conditional();\n        $conditional2->setConditionType(Conditional::CONDITION_CELLIS);\n        $conditional2->setOperatorType(Conditional::OPERATOR_EQUAL);\n        $conditional2->addCondition('0');\n        $conditional2->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_YELLOW);\n        $conditional2->getStyle()->getFont()->setBold(true);\n\n        $conditional3 = new Conditional();\n        $conditional3->setConditionType(Conditional::CONDITION_CELLIS);\n        $conditional3->setOperatorType(Conditional::OPERATOR_GREATERTHAN);\n        $conditional3->addCondition('0');\n        $conditional3->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_GREEN);\n        $conditional3->getStyle()->getFont()->setBold(true);\n\n        $conditionalStyles = $this->spreadsheet->getActiveSheet()->getStyle('A1:C3')->getConditionalStyles();\n        $conditionalStyles[] = $conditional1;\n        $conditionalStyles[] = $conditional2;\n        $conditionalStyles[] = $conditional3;\n\n        $this->spreadsheet->getActiveSheet()->getStyle('A1:C3')->setConditionalStyles($conditionalStyles);\n\n        $this->spreadsheet->getActiveSheet()\n            ->duplicateConditionalStyle(\n                $this->spreadsheet->getActiveSheet()->getConditionalStyles('A1:C3'),\n                'F1'\n            );\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellConditionalStylesProvider')]\n    public function testCellHasConditionalStyles(string $cellReference, bool $expectedHasConditionalStyles): void\n    {\n        $cellHasConditionalStyles = $this->spreadsheet->getActiveSheet()->conditionalStylesExists($cellReference);\n\n        self::assertSame($expectedHasConditionalStyles, $cellHasConditionalStyles);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('cellConditionalStylesProvider')]\n    public function testCellGetConditionalStyles(string $cellReference, bool $expectedGetConditionalStyles): void\n    {\n        $cellHasConditionalStyles = $this->spreadsheet->getActiveSheet()->getConditionalStyles($cellReference);\n\n        self::assertSame($expectedGetConditionalStyles, !empty($cellHasConditionalStyles));\n    }\n\n    public static function cellConditionalStylesProvider(): array\n    {\n        return [\n            ['A1', true],\n            ['B2', true],\n            ['B4', false],\n            ['A1:C3', true],\n            ['A1:B2', false],\n            ['F1', true],\n            ['F2', false],\n            ['A1:F1', false],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/CopyCellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CopyCellsTest extends TestCase\n{\n    public function testCopyCells(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                ['hello1', 'goodbye1', 'neither1', 'constant'],\n                ['hello2', 'goodbye2', 'neither2'],\n                ['hello3', 'goodbye3', 'neither3'],\n                ['hello4', 'goodbye4', 'neither4'],\n                ['hello5', 'goodbye5', 'neither5'],\n            ],\n        );\n        $sheet->getCell('E3')->setValue('=A1&B1');\n        $sheet->getStyle('E3')->getFont()->setBold(true);\n        $sheet->copyCells('E3', 'E3:F7');\n        $result1 = $sheet->rangeToArray('E3:F7', null, false, false);\n        $expected1 = [\n            ['=A1&B1', '=B1&C1'],\n            ['=A2&B2', '=B2&C2'],\n            ['=A3&B3', '=B3&C3'],\n            ['=A4&B4', '=B4&C4'],\n            ['=A5&B5', '=B5&C5'],\n        ];\n        self::assertSame($expected1, $result1);\n        self::assertSame('goodbye3neither3', $sheet->getCell('F5')->getCalculatedValue());\n        self::assertTrue($sheet->getCell('F5')->getStyle()->getFont()->getBold());\n\n        $sheet->getCell('E14')->setValue('=A5&$D$1');\n        $sheet->copyCells('E14', 'E10:E14');\n        $result2 = $sheet->rangeToArray('E10:E14', null, false, false);\n        $expected2 = [\n            ['=A1&$D$1'],\n            ['=A2&$D$1'],\n            ['=A3&$D$1'],\n            ['=A4&$D$1'],\n            ['=A5&$D$1'],\n        ];\n        self::assertSame($expected2, $result2);\n        self::assertSame('hello4constant', $sheet->getCell('E13')->getCalculatedValue());\n\n        $sheet->getCell('I3')->setValue('=A1&$B1');\n        $sheet->getStyle('I3')->getFont()->setItalic(true);\n        $sheet->copyCells('I3', 'I3:J7', false);\n        $result3 = $sheet->rangeToArray('I3:J7', null, false, false);\n        $expected3 = [\n            ['=A1&$B1', '=B1&$B1'],\n            ['=A2&$B2', '=B2&$B2'],\n            ['=A3&$B3', '=B3&$B3'],\n            ['=A4&$B4', '=B4&$B4'],\n            ['=A5&$B5', '=B5&$B5'],\n        ];\n        self::assertSame($expected3, $result3);\n        self::assertSame('hello2goodbye2', $sheet->getCell('I4')->getCalculatedValue());\n        self::assertFalse($sheet->getCell('I5')->getStyle()->getFont()->getItalic());\n\n        try {\n            $sheet->copyCells('invalid', 'Z1:Z10');\n            self::fail('Did not receive expected exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Invalid cell coordinate', $e->getMessage());\n        }\n\n        try {\n            $sheet->copyCells('A1', 'invalid');\n            self::fail('Did not receive expected exception');\n        } catch (SpreadsheetException $e) {\n            self::assertStringContainsString('Column string index', $e->getMessage());\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/DefaultPaperSizeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DefaultPaperSizeTest extends TestCase\n{\n    private int $paperSize;\n\n    private string $orientation;\n\n    protected function setUp(): void\n    {\n        $this->paperSize = PageSetup::getPaperSizeDefault();\n        $this->orientation = PageSetup::getOrientationDefault();\n    }\n\n    protected function tearDown(): void\n    {\n        PageSetup::setPaperSizeDefault($this->paperSize);\n        PageSetup::setOrientationDefault($this->orientation);\n    }\n\n    public function testChangeDefault(): void\n    {\n        PageSetup::setPaperSizeDefault(PageSetup::PAPERSIZE_A4);\n        PageSetup::setOrientationDefault(PageSetup::ORIENTATION_LANDSCAPE);\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet3 = $spreadsheet->createSheet();\n        self::assertSame(PageSetup::PAPERSIZE_A4, $sheet1->getPageSetup()->getPaperSize());\n        self::assertSame(PageSetup::PAPERSIZE_A4, $sheet2->getPageSetup()->getPaperSize());\n        self::assertSame(PageSetup::PAPERSIZE_A4, $sheet3->getPageSetup()->getPaperSize());\n        self::assertSame(PageSetup::ORIENTATION_LANDSCAPE, $sheet1->getPageSetup()->getOrientation());\n        self::assertSame(PageSetup::ORIENTATION_LANDSCAPE, $sheet2->getPageSetup()->getOrientation());\n        self::assertSame(PageSetup::ORIENTATION_LANDSCAPE, $sheet3->getPageSetup()->getOrientation());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testUnchangedDefault(): void\n    {\n        //PageSetup::setPaperSizeDefault(PageSetup::PAPERSIZE_A4);\n        //PageSetup::setOrientationDefault(PageSetup::ORIENTATION_LANDSCAPE);\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet3 = $spreadsheet->createSheet();\n        self::assertSame(PageSetup::PAPERSIZE_LETTER, $sheet1->getPageSetup()->getPaperSize());\n        self::assertSame(PageSetup::PAPERSIZE_LETTER, $sheet2->getPageSetup()->getPaperSize());\n        self::assertSame(PageSetup::PAPERSIZE_LETTER, $sheet3->getPageSetup()->getPaperSize());\n        self::assertSame(PageSetup::ORIENTATION_DEFAULT, $sheet1->getPageSetup()->getOrientation());\n        self::assertSame(PageSetup::ORIENTATION_DEFAULT, $sheet2->getPageSetup()->getOrientation());\n        self::assertSame(PageSetup::ORIENTATION_DEFAULT, $sheet3->getPageSetup()->getOrientation());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooterDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass DrawingTest extends TestCase\n{\n    public function testCloningWorksheetWithImages(): void\n    {\n        $gdImage = @imagecreatetruecolor(120, 20);\n        $textColor = ($gdImage === false) ? false : imagecolorallocate($gdImage, 255, 255, 255);\n        if ($gdImage === false || $textColor === false) {\n            self::fail('imagecreatetruecolor or imagecolorallocate failed');\n        } else {\n            $spreadsheet = new Spreadsheet();\n            $aSheet = $spreadsheet->getActiveSheet();\n            imagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor);\n\n            $drawing = new MemoryDrawing();\n            $drawing->setName('In-Memory image 1');\n            $drawing->setDescription('In-Memory image 1');\n            $drawing->setCoordinates('A1');\n            $drawing->setImageResource($gdImage);\n            $drawing->setRenderingFunction(\n                MemoryDrawing::RENDERING_JPEG\n            );\n            $drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT);\n            $drawing->setHeight(36);\n            $drawing->setWorksheet($aSheet);\n\n            $originDrawingCount = count($aSheet->getDrawingCollection());\n            $clonedWorksheet = clone $aSheet;\n            $clonedDrawingCount = count($clonedWorksheet->getDrawingCollection());\n\n            self::assertEquals($originDrawingCount, $clonedDrawingCount);\n            self::assertNotSame($aSheet, $clonedWorksheet);\n            self::assertNotSame($aSheet->getDrawingCollection(), $clonedWorksheet->getDrawingCollection());\n            $spreadsheet->disconnectWorksheets();\n        }\n    }\n\n    public function testChangeWorksheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n\n        $drawing = new Drawing();\n        $drawing->setName('Green Square');\n        $drawing->setPath('tests/data/Writer/XLSX/green_square.gif');\n        self::assertEquals($drawing->getWidth(), 150);\n        self::assertEquals($drawing->getHeight(), 150);\n        $drawing->setCoordinates('A1');\n        $drawing->setOffsetX(30);\n        $drawing->setOffsetY(10);\n        $drawing->setWorksheet($sheet1);\n\n        try {\n            $drawing->setWorksheet($sheet2);\n            self::fail('Should throw exception when attempting set worksheet without specifying override');\n        } catch (PhpSpreadsheetException $e) {\n            self::assertStringContainsString('A Worksheet has already been assigned.', $e->getMessage());\n        }\n        self::assertSame($sheet1, $drawing->getWorksheet());\n        self::assertCount(1, $sheet1->getDrawingCollection());\n        self::assertCount(0, $sheet2->getDrawingCollection());\n        $drawing->setWorksheet($sheet2, true);\n        self::assertSame($sheet2, $drawing->getWorksheet());\n        self::assertCount(0, $sheet1->getDrawingCollection());\n        self::assertCount(1, $sheet2->getDrawingCollection());\n    }\n\n    public function testHeaderFooter(): void\n    {\n        $drawing1 = new HeaderFooterDrawing();\n        $drawing1->setName('Blue Square');\n        $drawing1->setPath('tests/data/Writer/XLSX/blue_square.png');\n        self::assertEquals($drawing1->getWidth(), 100);\n        self::assertEquals($drawing1->getHeight(), 100);\n        $drawing2 = new HeaderFooterDrawing();\n        $drawing2->setName('Blue Square');\n        $drawing2->setPath('tests/data/Writer/XLSX/blue_square.png');\n        self::assertSame($drawing1->getHashCode(), $drawing2->getHashCode());\n        $drawing2->setOffsetX(100);\n        self::assertNotEquals($drawing1->getHashCode(), $drawing2->getHashCode());\n    }\n\n    public function testSetWidthAndHeight(): void\n    {\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        self::assertSame(100, $drawing->getWidth());\n        self::assertSame(100, $drawing->getHeight());\n        self::assertTrue($drawing->getResizeProportional());\n        $drawing->setResizeProportional(false);\n        $drawing->setWidthAndHeight(150, 200);\n        self::assertSame(150, $drawing->getWidth());\n        self::assertSame(200, $drawing->getHeight());\n        $drawing->setResizeProportional(true);\n        $drawing->setWidthAndHeight(300, 250);\n        // width increase% more than height, so scale width\n        self::assertSame(188, $drawing->getWidth());\n        self::assertSame(250, $drawing->getHeight());\n        $drawing->setResizeProportional(false);\n        $drawing->setWidthAndHeight(150, 200);\n        $drawing->setResizeProportional(true);\n        // height increase% more than width, so scale height\n        $drawing->setWidthAndHeight(175, 350);\n        self::assertSame(175, $drawing->getWidth());\n        self::assertSame(234, $drawing->getHeight());\n    }\n\n    public function testBadAddToXml(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Invalid parameters passed.');\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        $objWriter = new XMLWriter();\n        $spreadsheet = new Spreadsheet();\n        $writerXlsx = new XlsxWriter($spreadsheet);\n        $writerXlsxDrawing = new XlsxWriter\\Drawing($writerXlsx);\n        $reflectionMethod = new ReflectionMethod($writerXlsxDrawing, 'writeDrawing');\n        $reflectionMethod->invokeArgs($writerXlsxDrawing, [$objWriter, $drawing]);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/InsertTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass InsertTest extends TestCase\n{\n    public function testInsertRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2, 3, 4],\n            [5, 6, 7, 8],\n            [9, 10, 11, 12],\n            [13, 14, 15, 16],\n            [17, 18, 19, 20],\n        ]);\n        $sheet->getRowDimension(1000)->setVisible(false);\n        $sheet->getStyle('C3')->getFont()->setBold(true);\n        self::assertSame(1000, $sheet->getHighestRow());\n        self::assertSame(5, $sheet->getHighestDataRow());\n        $currentRow = 4;\n        $sheet->insertNewRowBefore($currentRow, 1);\n        self::assertSame(1001, $sheet->getHighestRow());\n        self::assertSame(6, $sheet->getHighestDataRow());\n        self::assertTrue($sheet->getStyle('C3')->getFont()->getBold());\n        self::assertSame(11, $sheet->getCell('C3')->getValue());\n        self::assertTrue($sheet->getStyle('C4')->getFont()->getBold());\n        self::assertNull($sheet->getCell('C4')->getValue());\n        self::assertFalse($sheet->getRowDimension(1001)->getVisible());\n        self::assertTrue($sheet->getRowDimension(1000)->getVisible());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInsertColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2, 3, 4],\n            [5, 6, 7, 8],\n            [9, 10, 11, 12],\n            [13, 14, 15, 16],\n            [17, 18, 19, 20],\n        ]);\n        $sheet->getColumnDimension('ZY')->setVisible(false);\n        $sheet->getStyle('C3')->getFont()->setBold(true);\n        self::assertSame('ZY', $sheet->getHighestColumn());\n        self::assertSame('D', $sheet->getHighestDataColumn());\n        $currentColumn = 'D';\n        $sheet->insertNewColumnBefore($currentColumn, 1);\n        self::assertSame('ZZ', $sheet->getHighestColumn());\n        self::assertSame('E', $sheet->getHighestDataColumn());\n        self::assertTrue($sheet->getStyle('C3')->getFont()->getBold());\n        self::assertSame(11, $sheet->getCell('C3')->getValue());\n        self::assertTrue($sheet->getStyle('D3')->getFont()->getBold());\n        self::assertNull($sheet->getCell('D3')->getValue());\n        self::assertFalse($sheet->getColumnDimension('ZZ')->getVisible());\n        self::assertTrue($sheet->getColumnDimension('ZY')->getVisible());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * A very strange case.\n     * Excel does not allow you to insert a column when\n     * the highest possible column has non-empty cells.\n     * PhpSpreadsheet does, but ...\n     *\n     * When neither XEY1 nor XEZ1 is set, current code creates a\n     * spreadsheet with cell XFH1, which is nominally illegal.\n     * Excel does not consider the result corrupt,\n     * but XFD1 has moved to I1! Xml has entries up to H1,\n     * but then skips to XFH1, which Excel seems to\n     * tolerate as \"next available column\".\n     *\n     * When XEZ1 is set, current code creates a spreadsheet\n     * which Excel opens with an error pop-up.\n     * with cells XFD1 and XFH1 both defined. Here Excel\n     * can't tolerate XFH1 because last possible column\n     * is in use.\n     *\n     * When XEY1 is set but not XEZ1, Xml defines cells\n     * XFC1 (result of shifting XEY1 4 columns) and XFH1,\n     * which Excel moves back to next available column (XFD1).\n     */\n    public function testOverEdge(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2, 3, 4],\n        ]);\n        $sheet->getCell('XFD1')->setValue('lastcol');\n        $sheet->insertNewColumnBefore('D', 4);\n        self::assertFalse($sheet->getCellCollection()->has('XFH1'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Issue1203Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue1203Test extends TestCase\n{\n    public static function testCopyFormula(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A5', 5);\n        $sheet->setCellValue('E5', '=A5+$A$1');\n        $sheet->insertNewRowBefore(5, 1);\n        $e5 = $sheet->getCell('E5')->getValue();\n        self::assertNull($e5);\n        self::assertSame('=A6+$A$1', $sheet->getCell('E6')->getValue());\n        $sheet->copyFormula('E6', 'E5');\n        self::assertSame('=A5+$A$1', $sheet->getCell('E5')->getValue());\n        $sheet->copyFormula('E6', 'H9');\n        self::assertSame('=D9+$A$1', $sheet->getCell('H9')->getValue());\n        $sheet->copyFormula('A6', 'Z9');\n        self::assertSame(5, $sheet->getCell('Z9')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Issue1425Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue1425Test extends TestCase\n{\n    private static function setBackground(Worksheet $sheet, string $cells, string $color = 'ffffff00'): void\n    {\n        $sheet->getStyle($cells)\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID);\n        $sheet->getStyle($cells)\n            ->getFill()\n            ->getStartColor()\n            ->setArgb($color);\n    }\n\n    /**\n     * Not extending styles to all cells after insertNewColumnBefore.\n     */\n    public function testIssue4125(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Before');\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(2);\n        $sheet->getCell('B1')->setValue(3);\n        $sheet->getCell('B2')->setValue(4);\n        self::setBackground($sheet, 'A1:A2');\n        self::setBackground($sheet, 'B1:B2', 'FF00FFFF');\n\n        $sheet->insertNewColumnBefore('B', 1);\n\n        $expected = [\n            'A1' => 'ffffff00',\n            'A2' => 'ffffff00',\n            'B1' => 'ffffff00',\n            'B2' => 'ffffff00',\n            'C1' => 'FF00FFFF',\n            'C2' => 'FF00FFFF',\n        ];\n        foreach ($expected as $key => $value) {\n            $color = $sheet->getStyle($key)\n                ->getFill()->getStartColor()->getArgb();\n            self::assertSame($value, $color, \"error in cell $key\");\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Issue1457Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue1457Test extends TestCase\n{\n    public function testIssue1457(): void\n    {\n        $sheet = new Worksheet();\n        $sqref = 'C14:O15 C161:O1081 C16:H160 J16:O160 Q5';\n        $sheet->protectCells($sqref);\n        $protectedRanges = $sheet->getProtectedCellRanges();\n        self::assertCount(1, $protectedRanges);\n        $range0 = reset($protectedRanges);\n        self::assertSame($sqref, $range0->getSqref());\n        $expected = [\n            ['C14', 'O15'],\n            ['C161', 'O1081'],\n            ['C16', 'H160'],\n            ['J16', 'O160'],\n            ['Q5'],\n        ];\n        self::assertSame($expected, $range0->allRanges());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Issue4112Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4112Test extends AbstractFunctional\n{\n    /**\n     * Problem deleting all sheets then adding one.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerSheetNumber')]\n    public function testIssue4112(?int $sheetNumber): void\n    {\n        $mySpreadsheet = new Spreadsheet();\n        $mySpreadsheet->removeSheetByIndex(0);\n        $worksheet = new Worksheet($mySpreadsheet, 'addedsheet');\n        self::assertSame(-1, $mySpreadsheet->getActiveSheetIndex());\n        $mySpreadsheet->addSheet($worksheet, $sheetNumber);\n        self::assertSame('addedsheet', $mySpreadsheet->getActiveSheet()->getTitle());\n        $row = 1;\n        $col = 1;\n        $worksheet->getCell([$col, $row])->setValue('id_uti');\n        self::assertSame('id_uti', $worksheet->getCell([$col, $row])->getValue());\n        $mySpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerSheetNumber(): array\n    {\n        return [\n            'problem case' => [0],\n            'normal case' => [null],\n            'negative 1 (as if there were no sheets)' => [-1],\n            'diffeent negative number' => [-4],\n            'positive number' => [4],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Issue4128Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4128Test extends TestCase\n{\n    public function testIssue4128(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('A1', $sheet->getActiveCell());\n        self::assertSame('A1', $sheet->getSelectedCells());\n        $sheet->setCellValue('D1', 'MyDate');\n        self::assertSame('A1', $sheet->getActiveCell());\n        self::assertSame('A1', $sheet->getSelectedCells());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Issue4241Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4241Test extends TestCase\n{\n    public function testIssue4241(): void\n    {\n        // setWorksheet needed to come after setPath\n        $badPath = 'tests/data/Writer/XLSX/xgreen_square.gif';\n        $goodPath = 'tests/data/Writer/XLSX/green_square.gif';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $drawing = new Drawing();\n        $drawing->setName('Green Square');\n        $drawing->setWorksheet($sheet);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing0 = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing0);\n        self::assertSame('', $drawing0->getPath());\n        self::assertSame('A1', $drawing0->getCoordinates());\n        $maxRow = $sheet->getHighestDataRow();\n        $maxCol = $sheet->getHighestDataColumn();\n        self::assertSame(1, $maxRow);\n        self::assertSame('A', $maxCol);\n\n        $drawing->setCoordinates('E5');\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing0 = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing0);\n        self::assertSame('', $drawing0->getPath());\n        self::assertSame('E5', $drawing0->getCoordinates());\n        $maxRow = $sheet->getHighestDataRow();\n        $maxCol = $sheet->getHighestDataColumn();\n        self::assertSame(1, $maxRow);\n        self::assertSame('A', $maxCol);\n\n        $drawing->setPath($badPath, false);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing0 = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing0);\n        self::assertSame('', $drawing0->getPath());\n        self::assertSame('E5', $drawing0->getCoordinates());\n        $maxRow = $sheet->getHighestDataRow();\n        $maxCol = $sheet->getHighestDataColumn();\n        self::assertSame(1, $maxRow);\n        self::assertSame('A', $maxCol);\n\n        $drawing->setPath($goodPath);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing0 = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing0);\n        self::assertSame($goodPath, $drawing0->getPath());\n        self::assertSame('E5', $drawing0->getCoordinates());\n        $maxRow = $sheet->getHighestDataRow();\n        $maxCol = $sheet->getHighestDataColumn();\n        self::assertSame(5, $maxRow);\n        self::assertSame('E', $maxCol);\n\n        $drawing->setCoordinates('G3');\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing0 = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing0);\n        self::assertSame($goodPath, $drawing0->getPath());\n        self::assertSame('G3', $drawing0->getCoordinates());\n        $maxRow = $sheet->getHighestDataRow();\n        $maxCol = $sheet->getHighestDataColumn();\n        self::assertSame(5, $maxRow);\n        self::assertSame('G', $maxCol);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Issue641Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue641Test extends TestCase\n{\n    /**\n     * Problem cloning sheet referred to in formulas.\n     */\n    public function testIssue641(): void\n    {\n        $xlsx = new Spreadsheet();\n        $xlsx->removeSheetByIndex(0);\n        $availableWs = [];\n\n        $worksheet = $xlsx->createSheet();\n        $worksheet->setTitle('Condensed A');\n        $worksheet->getCell('A1')->setValue(\"=SUM('Detailed A'!A1:A10)\");\n        $worksheet->getCell('A2')->setValue(mt_rand(1, 30));\n        $availableWs[] = 'Condensed A';\n\n        $worksheet = $xlsx->createSheet();\n        $worksheet->setTitle('Condensed B');\n        $worksheet->getCell('A1')->setValue(\"=SUM('Detailed B'!A1:A10)\");\n        $worksheet->getCell('A2')->setValue(mt_rand(1, 30));\n        $availableWs[] = 'Condensed B';\n\n        // at this point the value in worksheet 'Condensed B' cell A1 is\n        // =SUM('Detailed B'!A1:A10)\n\n        // worksheet in question is cloned and totals are attached\n        $totalWs1 = clone $xlsx->getSheet($xlsx->getSheetCount() - 1);\n        $totalWs1->setTitle('Condensed Total');\n        $xlsx->addSheet($totalWs1);\n        $formula = '=';\n        foreach ($availableWs as $ws) {\n            $formula .= sprintf(\"+'%s'!A2\", $ws);\n        }\n        $totalWs1->getCell('A1')->setValue(\"=SUM('Detailed Total'!A1:A10)\");\n        $totalWs1->getCell('A2')->setValue($formula);\n\n        $availableWs = [];\n\n        $worksheet = $xlsx->createSheet();\n        $worksheet->setTitle('Detailed A');\n        for ($step = 1; $step <= 10; ++$step) {\n            $worksheet->getCell(\"A{$step}\")->setValue(mt_rand(1, 30));\n        }\n        $availableWs[] = 'Detailed A';\n\n        $worksheet = $xlsx->createSheet();\n        $worksheet->setTitle('Detailed B');\n        for ($step = 1; $step <= 10; ++$step) {\n            $worksheet->getCell(\"A{$step}\")->setValue(mt_rand(1, 30));\n        }\n        $availableWs[] = 'Detailed B';\n\n        $totalWs2 = clone $xlsx->getSheet($xlsx->getSheetCount() - 1);\n        $totalWs2->setTitle('Detailed Total');\n        $xlsx->addSheet($totalWs2);\n\n        for ($step = 1; $step <= 10; ++$step) {\n            $formula = '=';\n            foreach ($availableWs as $ws) {\n                $formula .= sprintf(\"+'%s'!A%s\", $ws, $step);\n            }\n            $totalWs2->getCell(\"A{$step}\")->setValue($formula);\n        }\n\n        self::assertSame(\"=SUM('Detailed A'!A1:A10)\", $xlsx->getSheetByName('Condensed A')?->getCell('A1')?->getValue());\n        self::assertSame(\"=SUM('Detailed B'!A1:A10)\", $xlsx->getSheetByName('Condensed B')?->getCell('A1')?->getValue());\n        self::assertSame(\"=SUM('Detailed Total'!A1:A10)\", $xlsx->getSheetByName('Condensed Total')?->getCell('A1')?->getValue());\n        self::assertSame(\"=+'Detailed A'!A1+'Detailed B'!A1\", $xlsx->getSheetByName('Detailed Total')?->getCell('A1')?->getValue());\n\n        $xlsx->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/IteratorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Iterator;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IteratorTest extends TestCase\n{\n    public function testIteratorFullRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->createSheet();\n        $spreadsheet->createSheet();\n\n        $iterator = new Iterator($spreadsheet);\n        $columnIndexResult = 0;\n        self::assertEquals($columnIndexResult, $iterator->key());\n\n        foreach ($iterator as $key => $column) {\n            self::assertEquals($columnIndexResult++, $key);\n        }\n        self::assertSame(3, $columnIndexResult);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/MemoryDrawing2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\n\nclass MemoryDrawing2 extends MemoryDrawing\n{\n    protected static string $getImageSize = 'getImageSizeXXXXXXX';\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MemoryDrawingTest extends TestCase\n{\n    public function testMemoryDrawing(): void\n    {\n        $name = 'In-Memory image';\n        $gdImage = @imagecreatetruecolor(120, 20);\n        self::assertNotFalse($gdImage);\n\n        $textColor = (int) imagecolorallocate($gdImage, 255, 255, 255);\n        imagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor);\n\n        $drawing = new MemoryDrawing();\n        $drawing->setName($name);\n        $drawing->setDescription('In-Memory image 1');\n        $drawing->setCoordinates('A1');\n        $drawing->setImageResource($gdImage);\n        $drawing->setRenderingFunction(MemoryDrawing::RENDERING_PNG);\n        $drawing->setMimeType(MemoryDrawing::MIMETYPE_PNG);\n\n        self::assertIsObject($drawing->getImageResource());\n\n        self::assertSame(MemoryDrawing::MIMETYPE_DEFAULT, $drawing->getMimeType());\n        self::assertSame(MemoryDrawing::RENDERING_DEFAULT, $drawing->getRenderingFunction());\n    }\n\n    public function testMemoryDrawingFromString(): void\n    {\n        $imageFile = __DIR__ . '/../../data/Worksheet/officelogo.jpg';\n\n        $imageString = file_get_contents($imageFile);\n        self::assertNotFalse($imageString);\n        $drawing = MemoryDrawing::fromString($imageString);\n\n        self::assertIsObject($drawing->getImageResource());\n\n        self::assertSame(MemoryDrawing::MIMETYPE_JPEG, $drawing->getMimeType());\n        self::assertSame(MemoryDrawing::RENDERING_JPEG, $drawing->getRenderingFunction());\n    }\n\n    public function testMemoryDrawingFromInvalidString(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Value cannot be converted to an image');\n\n        $imageString = 'I am not an image';\n        MemoryDrawing::fromString($imageString);\n    }\n\n    public function testMemoryDrawingFromStream(): void\n    {\n        $imageFile = __DIR__ . '/../../data/Worksheet/officelogo.jpg';\n\n        $imageStream = fopen($imageFile, 'rb');\n        self::assertNotFalse($imageStream);\n        $drawing = MemoryDrawing::fromStream($imageStream);\n        fclose($imageStream);\n\n        self::assertIsObject($drawing->getImageResource());\n\n        self::assertSame(MemoryDrawing::MIMETYPE_JPEG, $drawing->getMimeType());\n        self::assertSame(MemoryDrawing::RENDERING_JPEG, $drawing->getRenderingFunction());\n    }\n\n    public function testMemoryDrawingFromStreamNoGetImageSize(): void\n    {\n        $imageFile = __DIR__ . '/../../data/Worksheet/officelogo.jpg';\n\n        $imageStream = fopen($imageFile, 'rb');\n        self::assertNotFalse($imageStream);\n        $drawing = MemoryDrawing2::fromStream($imageStream);\n        fclose($imageStream);\n\n        self::assertIsObject($drawing->getImageResource());\n\n        self::assertSame(MemoryDrawing::MIMETYPE_DEFAULT, $drawing->getMimeType());\n        self::assertSame(MemoryDrawing::RENDERING_DEFAULT, $drawing->getRenderingFunction());\n    }\n\n    public function testMemoryDrawingGif(): void\n    {\n        $imageFile = __DIR__ . '/../../data/Writer/XLSX/green_square.gif';\n\n        $imageStream = fopen($imageFile, 'rb');\n        self::assertNotFalse($imageStream);\n        $drawing = MemoryDrawing::fromStream($imageStream);\n        fclose($imageStream);\n\n        self::assertIsObject($drawing->getImageResource());\n\n        self::assertSame(MemoryDrawing::MIMETYPE_GIF, $drawing->getMimeType());\n        self::assertSame(MemoryDrawing::RENDERING_GIF, $drawing->getRenderingFunction());\n    }\n\n    public function testMemoryDrawingBmp(): void\n    {\n        $imageFile = __DIR__ . '/../../data/Writer/XLSX/brown_square_256.bmp';\n\n        $imageStream = fopen($imageFile, 'rb');\n        self::assertNotFalse($imageStream);\n        $drawing = MemoryDrawing::fromStream($imageStream);\n        fclose($imageStream);\n\n        self::assertIsObject($drawing->getImageResource());\n\n        self::assertSame(MemoryDrawing::MIMETYPE_DEFAULT, $drawing->getMimeType(), 'bmp not supporteed - use default');\n        self::assertSame(MemoryDrawing::RENDERING_DEFAULT, $drawing->getRenderingFunction(), 'bmp not supported - use default');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/MergeBehaviourTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass MergeBehaviourTest extends AbstractFunctional\n{\n    private const TEST_DATA_RAW = [\n        [1.1, 2.2, '=ROUND(A1+B1, 1)'],\n        [4.4, 5.5, '=ROUND(A2+B2, 1)'],\n        ['=ROUND(A1+A2, 1)', '=ROUND(B1+B2, 1)', '=ROUND(A3+B3, 1)'],\n    ];\n\n    private const TEST_DATE_FORMATTED = [\n        ['=DATE(1960, 12, 19)', '=DATE(2022, 09, 15)'],\n    ];\n\n    public function testMergeCellsDefaultBehaviour(): void\n    {\n        $expectedResult = [\n            [1.1, null, null],\n            [null, null, null],\n            [null, null, null],\n        ];\n\n        $mergeRange = 'A1:C3';\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(self::TEST_DATA_RAW, null, 'A1', true);\n        $worksheet->mergeCells($mergeRange);\n\n        $mergeResult = $worksheet->toArray(null, true, false, false);\n        self::assertSame($expectedResult, $mergeResult);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testMergeCellsDefaultBehaviourFormatted(): void\n    {\n        $expectedResult = [\n            ['1960-12-19', null],\n        ];\n\n        $mergeRange = 'A1:B1';\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(self::TEST_DATE_FORMATTED, null, 'A1', true);\n        $worksheet->getStyle($mergeRange)->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n        $worksheet->mergeCells($mergeRange);\n\n        $mergeResult = $worksheet->toArray(null, true, true, false);\n        self::assertSame($expectedResult, $mergeResult);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testMergeCellsHideBehaviour(): void\n    {\n        $expectedResult = [\n            [1.1, 2.2, 3.3],\n            [4.4, 5.5, 9.9],\n            [5.5, 7.7, 13.2],\n        ];\n\n        $mergeRange = 'A1:C3';\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(self::TEST_DATA_RAW, null, 'A1', true);\n        $worksheet->mergeCells($mergeRange, Worksheet::MERGE_CELL_CONTENT_HIDE);\n\n        $mergeResult = $worksheet->toArray(null, true, false, false);\n        self::assertSame($expectedResult, $mergeResult);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testMergeCellsHideBehaviourFormatted(): void\n    {\n        $expectedResult = [\n            ['1960-12-19', '2022-09-15'],\n        ];\n\n        $mergeRange = 'A1:B1';\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(self::TEST_DATE_FORMATTED, null, 'A1', true);\n        $worksheet->getStyle($mergeRange)->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n        $worksheet->mergeCells($mergeRange, Worksheet::MERGE_CELL_CONTENT_HIDE);\n\n        $mergeResult = $worksheet->toArray(null, true, true, false);\n        self::assertSame($expectedResult, $mergeResult);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * @param mixed[] $testData\n     * @param mixed[] $expectedResult\n     */\n    #[DataProvider('mergeCellsMergeBehaviourProvider')]\n    public function testMergeCellsMergeBehaviour(array $testData, string $mergeRange, array $expectedResult): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray($testData, null, 'A1', true);\n        // Force a precalculation to populate the calculation cache, so that we can verify that it is being cleared\n        $worksheet->toArray();\n        $worksheet->mergeCells($mergeRange, Worksheet::MERGE_CELL_CONTENT_MERGE);\n\n        $mergeResult = $worksheet->toArray(null, true, true, false);\n        self::assertSame($expectedResult, $mergeResult);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function mergeCellsMergeBehaviourProvider(): array\n    {\n        return [\n            'With Calculated Values' => [\n                self::TEST_DATA_RAW,\n                'A1:C3',\n                [\n                    ['1.1 2.2 1.1 4.4 5.5 0 1.1 0 0', null, null],\n                    [null, null, null],\n                    [null, null, null],\n                ],\n            ],\n            'With Empty Cells' => [\n                [\n                    [1, '', 2],\n                    [null, 3, null],\n                    [4, null, 5],\n                ],\n                'A1:C3',\n                [\n                    ['1 2 3 4 5', null, null],\n                    [null, null, null],\n                    [null, null, null],\n                ],\n            ],\n            'A2 referenced and therefore created' => [\n                [\n                    [12, '=5+1', '=A1/A2'],\n                ],\n                'A1:C1',\n                [\n                    ['12 6 #DIV/0!', null, null],\n                    [null, null, null],\n                ],\n            ],\n        ];\n    }\n\n    public function testMergeCellsMergeBehaviourFormatted(): void\n    {\n        $expectedResult = [\n            ['1960-12-19 2022-09-15', null],\n        ];\n\n        $mergeRange = 'A1:B1';\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(self::TEST_DATE_FORMATTED, null, 'A1', true);\n        $worksheet->getStyle($mergeRange)->getNumberFormat()->setFormatCode('yyyy-mm-dd');\n        $worksheet->mergeCells($mergeRange, Worksheet::MERGE_CELL_CONTENT_MERGE);\n\n        $mergeResult = $worksheet->toArray(null, true, true, false);\n        self::assertSame($expectedResult, $mergeResult);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/MergeCellsDeletedTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MergeCellsDeletedTest extends TestCase\n{\n    public function testDeletedColumns(): void\n    {\n        $infile = 'tests/data/Reader/XLSX/issue.282.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($infile);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Sheet1');\n\n        $mergeCells = $sheet->getMergeCells();\n        self::assertSame(['B1:F1', 'G1:I1'], array_values($mergeCells));\n\n        // Want to delete column B,C,D,E,F\n        $sheet->removeColumnByIndex(2, 5);\n        $mergeCells2 = $sheet->getMergeCells();\n        self::assertSame(['B1:D1'], array_values($mergeCells2));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testDeletedRows(): void\n    {\n        $infile = 'tests/data/Reader/XLSX/issue.282.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($infile);\n        $sheet = $spreadsheet->getSheetByNameOrThrow('Sheet2');\n\n        $mergeCells = $sheet->getMergeCells();\n        self::assertSame(['A2:A6', 'A7:A9'], array_values($mergeCells));\n\n        // Want to delete rows 2 to 4\n        $sheet->removeRow(2, 3);\n        $mergeCells2 = $sheet->getMergeCells();\n        self::assertSame(['A4:A6'], array_values($mergeCells2));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private static function yellowBackground(Worksheet $sheet, string $cells, string $color = 'ffffff00'): void\n    {\n        $sheet->getStyle($cells)\n            ->getFill()\n            ->setFillType(Fill::FILL_SOLID);\n        $sheet->getStyle($cells)\n            ->getFill()\n            ->getStartColor()\n            ->setArgb($color);\n        $sheet->getStyle($cells)\n            ->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_CENTER);\n    }\n\n    public static function testDeletedColumns2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Before');\n        $sheet->getCell('A1')->setValue('a1');\n        $sheet->getCell('J1')->setValue('j1');\n        $sheet->getCell('K1')->setValue('will delete d-f');\n        $sheet->getCell('C1')->setValue('c1-g1');\n        $sheet->mergeCells('C1:G1');\n        self::yellowBackground($sheet, 'C1');\n\n        $sheet->getCell('A2')->setValue('a2');\n        $sheet->getCell('J2')->setValue('j2');\n        $sheet->getCell('B2')->setValue('b2-c2');\n        $sheet->mergeCells('B2:C2');\n        self::yellowBackground($sheet, 'B2');\n        $sheet->getCell('G2')->setValue('g2-h2');\n        $sheet->mergeCells('G2:H2');\n        self::yellowBackground($sheet, 'G2', 'FF00FFFF');\n\n        $sheet->getCell('A3')->setValue('a3');\n        $sheet->getCell('J3')->setValue('j3');\n        $sheet->getCell('D3')->setValue('d3-g3');\n        $sheet->mergeCells('D3:G3');\n        self::yellowBackground($sheet, 'D3');\n\n        $sheet->getCell('A4')->setValue('a4');\n        $sheet->getCell('J4')->setValue('j4');\n        $sheet->getCell('B4')->setValue('b4-d4');\n        $sheet->mergeCells('B4:D4');\n        self::yellowBackground($sheet, 'B4');\n\n        $sheet->getCell('A5')->setValue('a5');\n        $sheet->getCell('J5')->setValue('j5');\n        $sheet->getCell('D5')->setValue('d5-e5');\n        $sheet->mergeCells('D5:E5');\n        self::yellowBackground($sheet, 'D5');\n\n        $sheet->removeColumn('D', 3);\n        $expected = [\n            'C1:D1', // was C1:G1, drop 3 inside cells\n            'B2:C2', // was B2:C2, unaffected\n            'D2:E2', // was G2:H2, move 3 columns left\n            //'D2:E2', // was D3:G3, start in delete range\n            'B4:C4', // was B4:D4, truncated at start of delete range\n            //'D5:E5', // was D5:E5, start in delete range\n        ];\n        self::assertSame($expected, array_keys($sheet->getMergeCells()));\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testDeletedRows2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('Before');\n        $sheet->getCell('A1')->setValue('a1');\n        $sheet->getCell('A10')->setValue('a10');\n        $sheet->getCell('A11')->setValue('will delete 4-6');\n        $sheet->getCell('A3')->setValue('a3-a7');\n        $sheet->mergeCells('A3:A7');\n        self::yellowBackground($sheet, 'A3');\n\n        $sheet->getCell('B1')->setValue('b1');\n        $sheet->getCell('B10')->setValue('b10');\n        $sheet->getCell('B2')->setValue('b2-b3');\n        $sheet->mergeCells('B2:B3');\n        self::yellowBackground($sheet, 'B2');\n        $sheet->getCell('B7')->setValue('b7-b8');\n        $sheet->mergeCells('B7:B8');\n        self::yellowBackground($sheet, 'B7', 'FF00FFFF');\n\n        $sheet->getCell('C1')->setValue('c1');\n        $sheet->getCell('C10')->setValue('c10');\n        $sheet->getCell('C4')->setValue('c4-c7');\n        $sheet->mergeCells('C4:C7');\n        self::yellowBackground($sheet, 'C4');\n\n        $sheet->getCell('D1')->setValue('d1');\n        $sheet->getCell('D10')->setValue('d10');\n        $sheet->getCell('D2')->setValue('d2-d4');\n        $sheet->mergeCells('D2:D4');\n        self::yellowBackground($sheet, 'd2');\n\n        $sheet->getCell('E1')->setValue('e1');\n        $sheet->getCell('E10')->setValue('e10');\n        $sheet->getCell('E4')->setValue('e4-e5');\n        $sheet->mergeCells('E4:E5');\n        self::yellowBackground($sheet, 'E4');\n\n        $sheet->removeRow(4, 3);\n        $expected = [\n            'A3:A4', // was A3:A7, drop 3 inside cells\n            'B2:B3', // was B2:B3, unaffected\n            'B4:B5', // was B7:B8, move 3 columns up\n            //'C4:C7', // was C4:C7, start in delete range\n            'D2:D3', // was D2:D4, truncated at start of delete range\n            //'E4:E5', // was E4:E5, start in delete range\n        ];\n        self::assertSame($expected, array_keys($sheet->getMergeCells()));\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/PageBreakTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageBreakTest extends TestCase\n{\n    public function testBreaksString(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setBreak('A20', Worksheet::BREAK_ROW);\n        $sheet->setBreak('A40', Worksheet::BREAK_ROW);\n        $sheet->setBreak('H1', Worksheet::BREAK_COLUMN);\n        $sheet->setBreak('X1', Worksheet::BREAK_COLUMN);\n        $breaks1 = $sheet->getBreaks();\n        self::assertSame(\n            [\n                'A20' => Worksheet::BREAK_ROW,\n                'A40' => Worksheet::BREAK_ROW,\n                'H1' => Worksheet::BREAK_COLUMN,\n                'X1' => Worksheet::BREAK_COLUMN,\n            ],\n            $breaks1\n        );\n        $sheet->setBreak('A40', Worksheet::BREAK_NONE);\n        $sheet->setBreak('H1', Worksheet::BREAK_NONE);\n        $sheet->setBreak('XX1', Worksheet::BREAK_NONE);\n        $breaks2 = $sheet->getBreaks();\n        self::assertSame(\n            [\n                'A20' => Worksheet::BREAK_ROW,\n                'X1' => Worksheet::BREAK_COLUMN,\n            ],\n            $breaks2\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBreaksArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setBreak([1, 20], Worksheet::BREAK_ROW);\n        $sheet->setBreak([1, 40], Worksheet::BREAK_ROW);\n        $sheet->setBreak([8, 1], Worksheet::BREAK_COLUMN);\n        $sheet->setBreak([24, 1], Worksheet::BREAK_COLUMN);\n        $breaks1 = $sheet->getBreaks();\n        self::assertSame(\n            [\n                'A20' => Worksheet::BREAK_ROW,\n                'A40' => Worksheet::BREAK_ROW,\n                'H1' => Worksheet::BREAK_COLUMN,\n                'X1' => Worksheet::BREAK_COLUMN,\n            ],\n            $breaks1\n        );\n        $sheet->setBreak([1, 40], Worksheet::BREAK_NONE);\n        $sheet->setBreak([8, 1], Worksheet::BREAK_NONE);\n        $sheet->setBreak([50, 1], Worksheet::BREAK_NONE);\n        $breaks2 = $sheet->getBreaks();\n        self::assertSame(\n            [\n                'A20' => Worksheet::BREAK_ROW,\n                'X1' => Worksheet::BREAK_COLUMN,\n            ],\n            $breaks2\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBreaksCellAddress(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setBreak(new CellAddress('A20'), Worksheet::BREAK_ROW, 16383);\n        $sheet->setBreak(new CellAddress('A40', $sheet), Worksheet::BREAK_ROW);\n        $sheet->setBreak(new CellAddress('H1'), Worksheet::BREAK_COLUMN);\n        $sheet->setBreak(new CellAddress('X1', $sheet), Worksheet::BREAK_COLUMN);\n        $breaks1 = $sheet->getBreaks();\n        self::assertSame(\n            [\n                'A20' => Worksheet::BREAK_ROW,\n                'A40' => Worksheet::BREAK_ROW,\n                'H1' => Worksheet::BREAK_COLUMN,\n                'X1' => Worksheet::BREAK_COLUMN,\n            ],\n            $breaks1\n        );\n        $sheet->setBreak(new CellAddress('A40'), Worksheet::BREAK_NONE);\n        $sheet->setBreak(new CellAddress('H1', $sheet), Worksheet::BREAK_NONE);\n        $sheet->setBreak(new CellAddress('XX1'), Worksheet::BREAK_NONE);\n        $breaks2 = $sheet->getBreaks();\n        self::assertSame(\n            [\n                'A20' => Worksheet::BREAK_ROW,\n                'X1' => Worksheet::BREAK_COLUMN,\n            ],\n            $breaks2\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBreaksOtherMethods(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setBreak('A20', Worksheet::BREAK_ROW, 16383);\n        $sheet->setBreak('A40', Worksheet::BREAK_ROW);\n        $sheet->setBreak('H1', Worksheet::BREAK_COLUMN);\n        $sheet->setBreak('X1', Worksheet::BREAK_COLUMN);\n\n        $rowBreaks = $sheet->getRowBreaks();\n        self::assertCount(2, $rowBreaks);\n        self::assertSame(Worksheet::BREAK_ROW, $rowBreaks['A20']->getBreakType());\n        self::assertSame('A20', $rowBreaks['A20']->getCoordinate());\n        self::assertSame(16383, $rowBreaks['A20']->getMaxColOrRow());\n        self::assertSame(1, $rowBreaks['A20']->getColumnInt());\n        self::assertSame('A', $rowBreaks['A20']->getColumnString());\n        self::assertSame(20, $rowBreaks['A20']->getRow());\n        self::assertSame(Worksheet::BREAK_ROW, $rowBreaks['A20']->getBreakType());\n        self::assertSame('A40', $rowBreaks['A40']->getCoordinate());\n        self::assertSame(-1, $rowBreaks['A40']->getMaxColOrRow());\n        self::assertSame(1, $rowBreaks['A40']->getColumnInt());\n        self::assertSame('A', $rowBreaks['A40']->getColumnString());\n        self::assertSame(40, $rowBreaks['A40']->getRow());\n        self::assertSame(Worksheet::BREAK_ROW, $rowBreaks['A40']->getBreakType());\n\n        $columnBreaks = $sheet->getColumnBreaks();\n        self::assertCount(2, $columnBreaks);\n        self::assertSame(Worksheet::BREAK_COLUMN, $columnBreaks['H1']->getBreakType());\n        self::assertSame('H1', $columnBreaks['H1']->getCoordinate());\n        self::assertSame(8, $columnBreaks['H1']->getColumnInt());\n        self::assertSame('H', $columnBreaks['H1']->getColumnString());\n        self::assertSame(1, $columnBreaks['H1']->getRow());\n        self::assertSame(Worksheet::BREAK_COLUMN, $columnBreaks['H1']->getBreakType());\n        self::assertSame('X1', $columnBreaks['X1']->getCoordinate());\n        self::assertSame(24, $columnBreaks['X1']->getColumnInt());\n        self::assertSame('X', $columnBreaks['X1']->getColumnString());\n        self::assertSame(1, $columnBreaks['X1']->getRow());\n        self::assertSame(Worksheet::BREAK_COLUMN, $columnBreaks['X1']->getBreakType());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/PageMarginsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageMargins;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageMarginsTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPointsAndInches')]\n    public function testPointsToInches(float $value, float $expectedResult): void\n    {\n        $actualResult = PageMargins::fromPoints($value);\n        self::assertSame($expectedResult, $actualResult);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerPointsAndInches')]\n    public function testInchesToPoints(float $expectedResult, float $value): void\n    {\n        $actualResult = PageMargins::toPoints($value);\n        self::assertSame($expectedResult, $actualResult);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCentimetersAndInches')]\n    public function testCentimetersToInches(float $value, float $expectedResult): void\n    {\n        $actualResult = PageMargins::fromCentimeters($value);\n        self::assertSame($expectedResult, $actualResult);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerCentimetersAndInches')]\n    public function testPointsToCentimeters(float $expectedResult, float $value): void\n    {\n        $actualResult = PageMargins::toCentimeters($value);\n        self::assertSame($expectedResult, $actualResult);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMillimetersAndInches')]\n    public function testMillimetersToInches(float $value, float $expectedResult): void\n    {\n        $actualResult = PageMargins::fromMillimeters($value);\n        self::assertSame($expectedResult, $actualResult);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerMillimetersAndInches')]\n    public function testPointsToMillimeters(float $expectedResult, float $value): void\n    {\n        $actualResult = PageMargins::toMillimeters($value);\n        self::assertSame($expectedResult, $actualResult);\n    }\n\n    public static function providerPointsAndInches(): array\n    {\n        return [\n            [36, 0.5],\n            [72, 1.0],\n            [90, 1.25],\n            [144, 2.0],\n        ];\n    }\n\n    public static function providerCentimetersAndInches(): array\n    {\n        return [\n            [1.27, 0.5],\n            [2.54, 1.0],\n        ];\n    }\n\n    public static function providerMillimetersAndInches(): array\n    {\n        return [\n            [12.7, 0.5],\n            [25.4, 1.0],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/PrintAreaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PrintAreaTest extends TestCase\n{\n    #[DataProvider('removeRowsProvider')]\n    public function testRemoveRows(string $expected, int $rowNumber, int $numberOfRows): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setPrintArea('B5:M41');\n        $sheet->removeRow($rowNumber, $numberOfRows);\n        self::assertSame($expected, $sheet->getPageSetup()->getPrintArea());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function removeRowsProvider(): array\n    {\n        return [\n            'before beginning of printArea' => ['B3:M39', 3, 2],\n            'creep into printArea' => ['B3:M37', 3, 4],\n            'entirely within printArea' => ['B5:M36', 6, 5],\n            'creep past end of printArea' => ['B5:M34', 35, 8],\n            'after end of printArea' => ['B5:M41', 55, 8],\n            'entire printArea' => ['', 5, 37],\n            'entire printArea+' => ['', 4, 47],\n        ];\n    }\n\n    #[DataProvider('removeColumnsProvider')]\n    public function testRemoveColumns(string $expected, string $column, int $numberOfColumns): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setPrintArea('D5:M41');\n        $sheet->removeColumn($column, $numberOfColumns);\n        self::assertSame($expected, $sheet->getPageSetup()->getPrintArea());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function removeColumnsProvider(): array\n    {\n        return [\n            'before beginning of printArea' => ['B5:K41', 'B', 2],\n            'creep into printArea' => ['B5:I41', 'B', 4],\n            'entirely within printArea' => ['D5:I41', 'E', 4],\n            'creep past end of printArea' => ['D5:K41', 'L', 3],\n            'after end of printArea' => ['D5:M41', 'P', 8],\n            'entire printArea' => ['', 'D', 10],\n            'entire printArea+' => ['', 'C', 15],\n        ];\n    }\n\n    #[DataProvider('addRowsProvider')]\n    public function testAddRows(string $expected, int $rowNumber, int $numberOfRows): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setPrintArea('D5:M41');\n        $sheet->insertNewRowBefore($rowNumber, $numberOfRows);\n        self::assertSame($expected, $sheet->getPageSetup()->getPrintArea());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function addRowsProvider(): array\n    {\n        return [\n            'entirely within printArea' => ['D5:M44', 15, 3],\n            'above printArea' => ['D9:M45', 3, 4],\n            'below printArea' => ['D5:M41', 48, 4],\n        ];\n    }\n\n    #[DataProvider('addColumnsProvider')]\n    public function testAddColumns(string $expected, string $column, int $numberOfColumns): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setPrintArea('D5:M41');\n        $sheet->insertNewColumnBefore($column, $numberOfColumns);\n        self::assertSame($expected, $sheet->getPageSetup()->getPrintArea());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function addColumnsProvider(): array\n    {\n        return [\n            'entirely within printArea' => ['D5:P41', 'J', 3],\n            'left of printArea' => ['H5:Q41', 'C', 4],\n            'right of printArea' => ['D5:M41', 'Q', 4],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ProtectedRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ProtectedRangeTest extends TestCase\n{\n    public function testInsertRow1(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->protectCells('B2:D4 J2:L4 F2:H4', name: 'ProtectedBlock1');\n        $sheet->protectCells('M2:O4 Q7:R9 T1:T3');\n        $sheet->protectCells('B8 C9 D1', name: 'ProtectedBlock3');\n        $sheet->insertNewRowBefore(2);\n        $ranges = $sheet->getProtectedCellRanges();\n        $rangeKeys = array_keys($ranges);\n        self::assertSame(\n            [\n                'B3:D5 J3:L5 F3:H5',\n                'M3:O5 Q8:R10 T1:T4',\n                'B9 C10 D1',\n            ],\n            $rangeKeys\n        );\n        self::assertSame('ProtectedBlock1', $ranges[$rangeKeys[0]]->getName());\n        self::assertSame('ProtectedBlock3', $ranges[$rangeKeys[2]]->getName());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRemoveRow1(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->protectCells('B2:D4 J2:L4 F2:H4');\n        $sheet->protectCells('M2:O4 Q7:R9 T1:T3', name: 'ProtectedBlock2');\n        $sheet->protectCells('B8 C9 D1 E3');\n        $sheet->removeRow(3);\n        $ranges = $sheet->getProtectedCellRanges();\n        $rangeKeys = array_keys($ranges);\n        // PhpSpreadsheet has methods to merge cell addresses in a row,\n        // but not in a column. So the results here are not as concise as\n        // they might be, but they are nevertheless accurate.\n        self::assertSame(\n            [\n                'B2:B3 C2:C3 D2:D3 F2:F3 G2:G3 H2:H3 J2:J3 K2:K3 L2:L3',\n                'M2:M3 N2:N3 O2:O3 Q6:Q8 R6:R8 T1:T2',\n                'B7 C8 D1',\n            ],\n            $rangeKeys\n        );\n        self::assertSame('ProtectedBlock2', $ranges[$rangeKeys[1]]->getName());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Protection2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Protection;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Protection2Test extends TestCase\n{\n    public function testisHiddenOnFormulaBar(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('X')\n            ->getStyle()->getProtection()\n            ->setHidden(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getCell('A2')->setValue('=SUM(1,2)')\n            ->getStyle()->getProtection()\n            ->setHidden(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getCell('B1')->setValue('X')\n            ->getStyle()->getProtection()\n            ->setHidden(Protection::PROTECTION_PROTECTED);\n        $sheet->getCell('B2')->setValue('=SUM(1,2)')\n            ->getStyle()->getProtection()\n            ->setHidden(Protection::PROTECTION_PROTECTED);\n        $sheet->getCell('C1')->setValue('X');\n        $sheet->getCell('C2')->setValue('=SUM(1,2)');\n        self::assertFalse($sheet->getCell('A1')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('A2')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('B1')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('B2')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('C1')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('C2')->isHiddenOnFormulaBar());\n        $sheetProtection = $sheet->getProtection();\n        $sheetProtection->setSheet(true);\n        self::assertFalse($sheet->getCell('A1')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('A2')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('B1')->isHiddenOnFormulaBar(), 'not a formula1');\n        self::assertTrue($sheet->getCell('B2')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('C1')->isHiddenOnFormulaBar(), 'not a formula2');\n        self::assertTrue($sheet->getCell('C2')->isHiddenOnFormulaBar());\n        self::assertFalse($sheet->getCell('D1')->isHiddenOnFormulaBar(), 'uninitialized cell is not formula');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Same as above, but uses    $sheet->isCellHiddenOnFormulaBar\n     *                rather than $sheet->getCell()->isHiddenOnFormulaBar().\n     */\n    public function testisHiddenOnFormulaBar2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('X')\n            ->getStyle()->getProtection()\n            ->setHidden(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getCell('A2')->setValue('=SUM(1,2)')\n            ->getStyle()->getProtection()\n            ->setHidden(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getCell('B1')->setValue('X')\n            ->getStyle()->getProtection()\n            ->setHidden(Protection::PROTECTION_PROTECTED);\n        $sheet->getCell('B2')->setValue('=SUM(1,2)')\n            ->getStyle()->getProtection()\n            ->setHidden(Protection::PROTECTION_PROTECTED);\n        $sheet->getCell('C1')->setValue('X');\n        $sheet->getCell('C2')->setValue('=SUM(1,2)');\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('A1'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('A2'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('B1'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('B2'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('C1'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('C2'));\n        $sheetProtection = $sheet->getProtection();\n        $sheetProtection->setSheet(true);\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('A1'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('A2'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('B1'), 'not a formula1');\n        self::assertTrue($sheet->isCellHiddenOnFormulaBar('B2'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('C1'), 'not a formula2');\n        self::assertTrue($sheet->isCellHiddenOnFormulaBar('C2'));\n        self::assertFalse($sheet->isCellHiddenOnFormulaBar('D1'), 'uninitialized cell is not formula');\n        self::assertFalse($sheet->cellExists('D1'));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testisLocked(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('X')\n            ->getStyle()->getProtection()\n            ->setLocked(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getCell('A2')->setValue('=SUM(1,2)')\n            ->getStyle()->getProtection()\n            ->setLocked(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getCell('B1')->setValue('X')\n            ->getStyle()->getProtection()\n            ->setLocked(Protection::PROTECTION_PROTECTED);\n        $sheet->getCell('B2')->setValue('=SUM(1,2)')\n            ->getStyle()->getProtection()\n            ->setLocked(Protection::PROTECTION_PROTECTED);\n        $sheet->getCell('C1')->setValue('X');\n        $sheet->getCell('C2')->setValue('=SUM(1,2)');\n        self::assertFalse($sheet->getCell('A1')->isLocked());\n        self::assertFalse($sheet->getCell('A2')->isLocked());\n        self::assertFalse($sheet->getCell('B1')->isLocked());\n        self::assertFalse($sheet->getCell('B2')->isLocked());\n        self::assertFalse($sheet->getCell('C1')->isLocked());\n        self::assertFalse($sheet->getCell('C2')->isLocked());\n        $sheetProtection = $sheet->getProtection();\n        $sheetProtection->setSheet(true);\n        self::assertFalse($sheet->getCell('A1')->isLocked());\n        self::assertFalse($sheet->getCell('A2')->isLocked());\n        self::assertTrue($sheet->getCell('B1')->isLocked());\n        self::assertTrue($sheet->getCell('B2')->isLocked());\n        self::assertTrue($sheet->getCell('C1')->isLocked());\n        self::assertTrue($sheet->getCell('C2')->isLocked());\n        self::assertTrue($sheet->getCell('D1')->isLocked(), 'uninitialized cell');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Same as above, but uses    $sheet->isCellLocked\n     *                rather than $sheet->getCell()->isLocked().\n     */\n    public function testisLocked2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('X')\n            ->getStyle()->getProtection()\n            ->setLocked(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getCell('A2')->setValue('=SUM(1,2)')\n            ->getStyle()->getProtection()\n            ->setLocked(Protection::PROTECTION_UNPROTECTED);\n        $sheet->getCell('B1')->setValue('X')\n            ->getStyle()->getProtection()\n            ->setLocked(Protection::PROTECTION_PROTECTED);\n        $sheet->getCell('B2')->setValue('=SUM(1,2)')\n            ->getStyle()->getProtection()\n            ->setLocked(Protection::PROTECTION_PROTECTED);\n        $sheet->getCell('C1')->setValue('X');\n        $sheet->getCell('C2')->setValue('=SUM(1,2)');\n        self::assertFalse($sheet->isCellLocked('A1'));\n        self::assertFalse($sheet->isCellLocked('A2'));\n        self::assertFalse($sheet->isCellLocked('B1'));\n        self::assertFalse($sheet->isCellLocked('B2'));\n        self::assertFalse($sheet->isCellLocked('C1'));\n        self::assertFalse($sheet->isCellLocked('C2'));\n        $sheetProtection = $sheet->getProtection();\n        $sheetProtection->setSheet(true);\n        self::assertFalse($sheet->isCellLocked('A1'));\n        self::assertFalse($sheet->isCellLocked('A2'));\n        self::assertTrue($sheet->isCellLocked('B1'));\n        self::assertTrue($sheet->isCellLocked('B2'));\n        self::assertTrue($sheet->isCellLocked('C1'));\n        self::assertTrue($sheet->isCellLocked('C2'));\n        self::assertTrue($sheet->isCellLocked('D1'), 'uninitialized cell');\n        self::assertFalse($sheet->cellExists('D1'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ProtectionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Protection;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ProtectionTest extends TestCase\n{\n    public function testVerifyPassword(): void\n    {\n        $protection = new Protection();\n        self::assertTrue($protection->verify('foo'), 'non-protected always pass');\n\n        $protection->setSheet(true);\n        self::assertTrue($protection->verify('foo'), 'no password will always pass 1');\n        self::assertTrue($protection->verify('xyz'), 'no password will always pass 2');\n\n        $protection->setPassword('foo', true);\n        $hashx1 = $protection->getPassword();\n        self::assertSame('foo', $hashx1, 'was not stored as-is, without hashing');\n        self::assertFalse($protection->verify('foo'), 'setting already hashed password will not match');\n\n        $protection->setPassword('foo');\n        $hashx2 = $protection->getPassword();\n        self::assertSame('CC40', $hashx2, 'was hashed');\n        self::assertTrue($protection->verify('foo'), 'setting non-hashed password will hash it and not match');\n\n        $protection->setAlgorithm(Protection::ALGORITHM_MD5);\n        self::assertFalse($protection->verify('foo'), 'changing algorithm will not match anymore');\n\n        $protection->setPassword('foo');\n        $hash1 = $protection->getPassword();\n        $protection->setPassword('foo');\n        $hash2 = $protection->getPassword();\n\n        self::assertSame(24, mb_strlen($hash1));\n        self::assertSame(24, mb_strlen($hash2));\n        self::assertNotSame($hash1, $hash2, 'was hashed with automatic salt');\n        self::assertTrue($protection->verify('foo'), 'setting password again, will hash with proper algorithm and will match');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/RemoveTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RemoveTest extends TestCase\n{\n    public function testRemoveRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $fillColors = [\n            'FFFF0000',\n            'FF00FF00',\n            'FF0000FF',\n        ];\n        $rowHeights = [-1.0, -1.0, 1.2, 1.3, 1.4, 1.5, -1.0, -1.0, -1.0];\n        for ($row = 1; $row < 10; ++$row) {\n            $sheet->getCell(\"B$row\")\n                ->getStyle()\n                ->getFill()\n                ->setFillType(Fill::FILL_SOLID)\n                ->setStartColor(new Color($fillColors[$row % 3]));\n            $sheet->getCell(\"B$row\")->setValue(\"X$row\");\n            $height = $rowHeights[$row - 1];\n            if ($height > 0) {\n                $sheet->getRowDimension($row)->setRowHeight($height);\n            }\n        }\n        //$mapRow = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n        $sheet->removeRow(4, 2);\n        $mapRow = [1, 2, 3, 6, 7, 8, 9];\n        $rowCount = count($mapRow);\n        for ($row = 1; $row <= $rowCount; ++$row) {\n            $mappedRow = $mapRow[$row - 1];\n            self::assertSame(\"X$mappedRow\", $sheet->getCell(\"B$row\")->getValue(), \"Row value $row mapped to $mappedRow\");\n            self::assertSame($fillColors[$mappedRow % 3], $sheet->getCell(\"B$row\")->getStyle()->getFill()->getStartColor()->getArgb(), \"Row fill color $row mapped to $mappedRow\");\n            self::assertSame($rowHeights[$mappedRow - 1], $sheet->getRowDimension($row)->getRowHeight(), \"Row height $row mapped to $mappedRow\");\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRemoveColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $fillColors = [\n            'FFFF0000',\n            'FF00FF00',\n            'FF0000FF',\n        ];\n        $colWidths = [-1, -1, 1.2, 1.3, 1.4, 1.5, -1, -1, -1];\n        for ($colNumber = 1; $colNumber < 10; ++$colNumber) {\n            $col = Coordinate::stringFromColumnIndex($colNumber);\n            $sheet->getCell(\"{$col}1\")\n                ->getStyle()\n                ->getFill()\n                ->setFillType(Fill::FILL_SOLID)\n                ->setStartColor(new Color($fillColors[$colNumber % 3]));\n            $sheet->getCell(\"{$col}1\")->setValue(\"100$col\");\n            $width = $colWidths[$colNumber - 1];\n            if ($width > 0) {\n                $sheet->getColumnDimension($col)->setWidth($width);\n            }\n        }\n        //$mapCol = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n        $sheet->removeColumn('D', 2);\n        $mapCol = [1, 2, 3, 6, 7, 8, 9];\n        $colCount = count($mapCol);\n        for ($colNumber = 1; $colNumber < $colCount; ++$colNumber) {\n            $col = Coordinate::stringFromColumnIndex($colNumber);\n            $mappedCol = $mapCol[$colNumber - 1];\n            $mappedColString = Coordinate::stringFromColumnIndex($mappedCol);\n            self::assertSame(\"100$mappedColString\", $sheet->getCell(\"{$col}1\")->getValue(), \"Column value $colNumber mapped to $mappedCol\");\n            self::assertSame($fillColors[$mappedCol % 3], $sheet->getCell(\"{$col}1\")->getStyle()->getFill()->getStartColor()->getArgb(), \"Col fill color $col mapped to $mappedColString\");\n            self::assertEquals($colWidths[$mappedCol - 1], $sheet->getColumnDimension($col)->getWidth(), \"Col width $col mapped to $mappedColString\");\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/RowCellIterator2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Cell;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\CellIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\RowCellIterator;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowCellIterator2Test extends TestCase\n{\n    // Phpstan does not think RowCellIterator can return null\n    private static function isCellNull(?Cell $item): bool\n    {\n        return $item === null;\n    }\n\n    #[DataProvider('providerExistingCell')]\n    public function testEndRangeTrue(?bool $existing, string $expectedResultFirst, string $expectedResultLast): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('C2')->setValue('cellb2');\n        $sheet->getCell('F2')->setValue('cellf2');\n\n        $iterator = new RowCellIterator($sheet, 2, 'B', 'H');\n        if (isset($existing)) {\n            $iterator->setIterateOnlyExistingCells($existing);\n        }\n        $lastCoordinate = '';\n        $firstCoordinate = '';\n        foreach ($iterator as $cell) {\n            if (!self::isCellNull($cell)) {\n                $lastCoordinate = $cell->getCoordinate();\n                if (!$firstCoordinate) {\n                    $firstCoordinate = $lastCoordinate;\n                }\n            }\n        }\n        self::assertSame($expectedResultFirst, $firstCoordinate);\n        self::assertSame($expectedResultLast, $lastCoordinate);\n    }\n\n    public static function providerExistingCell(): array\n    {\n        return [\n            [null, 'B2', 'H2'],\n            [false, 'B2', 'H2'],\n            [true, 'C2', 'F2'],\n        ];\n    }\n\n    #[DataProvider('providerEmptyRow')]\n    public function testEmptyRow(?bool $existing, int $expectedResult): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B2')->setValue('cellb2');\n        $sheet->getCell('F2')->setValue('cellf2');\n\n        $iterator = new RowCellIterator($sheet, 3);\n        if (isset($existing)) {\n            $iterator->setIterateOnlyExistingCells($existing);\n        }\n        $numCells = 0;\n        foreach ($iterator as $cell) {\n            ++$numCells;\n        }\n        self::assertSame($expectedResult, $numCells);\n    }\n\n    public static function providerEmptyRow(): array\n    {\n        return [\n            [null, 6], // Default behaviour\n            [false, 6],\n            [true, 0],\n        ];\n    }\n\n    #[DataProvider('providerNullOrCreate')]\n    public function testNullOrCreateOption(?bool $existingBehaviour, int $expectedCreatedResult, mixed $expectedNullResult): void\n    {\n        if (!is_int($expectedNullResult)) {\n            self::fail('unexpected unused arg');\n        }\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $iterator = new RowCellIterator($sheet, 2);\n        if (isset($existingBehaviour)) {\n            $iterator->setIfNotExists($existingBehaviour);\n        }\n        $notExistsBehaviour = $iterator->getIfNotExists();\n        self::assertSame($expectedCreatedResult > 0, $notExistsBehaviour);\n    }\n\n    #[DataProvider('providerNullOrCreate')]\n    public function testNullOrCreate(?bool $existing, int $expectedCreatedResult, int $expectedNullResult): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('B2')->setValue('cellb2');\n        $sheet->getCell('F2')->setValue('cellf2');\n\n        $iterator = new RowCellIterator($sheet, 2);\n        if (isset($existing)) {\n            $iterator->setIfNotExists($existing);\n        }\n        $numCreatedCells = $numEmptyCells = 0;\n        foreach ($iterator as $cell) {\n            $numCreatedCells += (int) (!self::isCellNull($cell) && $cell->getValue() === null);\n            $numEmptyCells += (int) self::isCellNull($cell);\n        }\n        self::assertSame($expectedCreatedResult, $numCreatedCells);\n        self::assertSame($expectedNullResult, $numEmptyCells);\n    }\n\n    public static function providerNullOrCreate(): array\n    {\n        return [\n            [null, 4, 0], // Default behaviour\n            [CellIterator::IF_NOT_EXISTS_CREATE_NEW, 4, 0],\n            [CellIterator::IF_NOT_EXISTS_RETURN_NULL, 0, 4],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/RowCellIteratorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as Except;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\RowCellIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowCellIteratorTest extends TestCase\n{\n    private const CELL_VALUES\n        = [\n            [110, 120, 130, 140, 150, 160, 170],\n            [210, 220, 230, 240, 250],\n            [310, 320, 330, 340, 350, 360],\n            [410, 420, 430, 440, 450],\n            [510, 520, 530, 540, 550, 560],\n            [610, 620, 630, 640, 650],\n        ];\n\n    private static function getPopulatedSheet(Spreadsheet $spreadsheet): Worksheet\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(self::CELL_VALUES);\n\n        return $sheet;\n    }\n\n    public function testIteratorFullRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowCellIterator($sheet);\n        $RowCellIndexResult = 'A';\n        self::assertEquals($RowCellIndexResult, $iterator->key());\n\n        $values = [];\n        foreach ($iterator as $key => $RowCell) {\n            $values[] = $RowCell->getValue();\n            self::assertEquals($RowCellIndexResult, $key);\n            StringHelper::stringIncrement($RowCellIndexResult);\n        }\n        self::assertSame(self::CELL_VALUES[0], $values);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorStartEndRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowCellIterator($sheet, 2, 'B', 'D');\n        $RowCellIndexResult = 'B';\n        self::assertEquals($RowCellIndexResult, $iterator->key());\n\n        $values = [];\n        foreach ($iterator as $key => $RowCell) {\n            $values[] = $RowCell->getValue();\n            self::assertEquals($RowCellIndexResult, $key);\n            StringHelper::stringIncrement($RowCellIndexResult);\n        }\n        self::assertSame([220, 230, 240], $values);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorSeekAndPrev(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowCellIterator($sheet, 2, 'B', 'D');\n        $RowCellIndexResult = 'D';\n        $iterator->seek('D');\n        self::assertEquals($RowCellIndexResult, $iterator->key());\n\n        $values = [];\n        while ($iterator->valid()) {\n            $current = $iterator->current();\n            self::assertNotNull($current);\n            $cell = $current->getCoordinate();\n            $values[] = $sheet->getCell($cell)->getValue();\n            $iterator->prev();\n        }\n        self::assertSame([240, 230, 220], $values);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSeekOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $this->expectException(Except::class);\n        $this->expectExceptionMessage('Column A is out of range');\n\n        $iterator = new RowCellIterator($sheet, 2, 'B', 'D');\n        self::assertFalse($iterator->getIterateOnlyExistingCells());\n        self::assertEquals(2, $iterator->getCurrentColumnIndex());\n        $iterator->seek('A');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSeekNotExisting(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $this->expectException(Except::class);\n        $this->expectExceptionMessage('Cell does not exist');\n\n        $iterator = new RowCellIterator($sheet, 2, 'B', 'D');\n        $iterator->setIterateOnlyExistingCells(true);\n        $iterator->seek('B');\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testPrevOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowCellIterator($sheet, 2, 'B', 'D');\n        $iterator->prev();\n        self::assertFalse($iterator->valid());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/RowDimensionSaveTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass RowDimensionSaveTest extends AbstractFunctional\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('typeProvider')]\n    public function testSaveNoAllocateRowDimension(string $type): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(2);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getRowDimension(2)->setVisible(false);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        self::assertFalse($sheet->rowDimensionExists(1));\n        self::assertTrue($sheet->rowDimensionExists(2));\n        self::assertFalse($sheet->rowDimensionExists(3));\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function typeProvider(): array\n    {\n        return [\n            ['Xlsx'],\n            ['Xls'],\n            ['Ods'],\n            ['Html'],\n        ];\n    }\n\n    public function testSaveNoAllocateRowDimensionMpdf(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(2);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getRowDimension(2)->setVisible(false);\n        $writer = new Mpdf($spreadsheet);\n        $writer->generateHtmlAll();\n        self::assertFalse($sheet->rowDimensionExists(1));\n        self::assertTrue($sheet->rowDimensionExists(2));\n        self::assertFalse($sheet->rowDimensionExists(3));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/RowDimensionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Dimension;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\RowDimension;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowDimensionTest extends TestCase\n{\n    public function testInstantiateColumnDimensionDefault(): void\n    {\n        $expected = 0;\n        $rowDimension = new RowDimension();\n        $result = $rowDimension->getRowIndex();\n        self::assertEquals($expected, $result);\n    }\n\n    public function testGetAndSetColumnIndex(): void\n    {\n        $expected = 2;\n        $rowDimension = new RowDimension();\n        $rowDimension->setRowIndex($expected);\n        $result = $rowDimension->getRowIndex();\n        self::assertSame($expected, $result);\n    }\n\n    public function testGetAndSetHeight(): void\n    {\n        $expected = 1.2;\n        $columnDimension = new RowDimension();\n\n        $columnDimension->setRowHeight($expected);\n        $result = $columnDimension->getRowHeight();\n        self::assertSame($expected, $result);\n\n        $expectedPx = 32.0;\n        $expectedPt = 24.0;\n        $columnDimension->setRowHeight($expectedPx, Dimension::UOM_PIXELS);\n        $resultPx = $columnDimension->getRowHeight(Dimension::UOM_PIXELS);\n        self::assertSame($expectedPx, $resultPx);\n        $resultPt = $columnDimension->getRowHeight(Dimension::UOM_POINTS);\n        self::assertSame($expectedPt, $resultPt);\n    }\n\n    public function testRowZeroHeight(): void\n    {\n        $expected = true;\n        $rowDimension = new RowDimension();\n        $rowDimension->setZeroHeight($expected);\n        $result = $rowDimension->getZeroHeight();\n        self::assertTrue($result);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/RowIteratorEmptyTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\CellIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\RowIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowIteratorEmptyTest extends TestCase\n{\n    private static function getPopulatedSheet(Spreadsheet $spreadsheet): Worksheet\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValueExplicit('A1', 'Hello World', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B3', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('B4', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B5', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('C5', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B6', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('C6', 'PHP', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B7', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('C7', 'PHP', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B8', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('C8', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('D8', 'PHP', DataType::TYPE_STRING);\n\n        return $sheet;\n    }\n\n    #[DataProvider('emptyRowBasicProvider')]\n    public function testIteratorEmptyRow(int $rowId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet, 1, 9);\n        $iterator->seek($rowId);\n        $row = $iterator->current();\n\n        $isEmpty = $row->isEmpty();\n        self::assertSame($expectedEmpty, $isEmpty);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyRowBasicProvider(): array\n    {\n        return [\n            [1, false],\n            [2, true],\n            [3, false],\n            [4, false],\n            [5, false],\n            [6, false],\n            [7, false],\n            [8, false],\n            [9, true],\n        ];\n    }\n\n    #[DataProvider('emptyRowNullAsEmptyProvider')]\n    public function testIteratorEmptyRowWithNull(int $rowId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet, 1, 9);\n        $iterator->seek($rowId);\n        $row = $iterator->current();\n        $isEmpty = $row->isEmpty(CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL);\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyRowNullAsEmptyProvider(): array\n    {\n        return [\n            [1, false],\n            [2, true],\n            [3, true],\n            [4, false],\n            [5, false],\n            [6, false],\n            [7, false],\n            [8, false],\n            [9, true],\n        ];\n    }\n\n    #[DataProvider('emptyRowEmptyStringAsEmptyProvider')]\n    public function testIteratorEmptyRowWithEmptyString(int $rowId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet, 1, 9);\n        $iterator->seek($rowId);\n        $row = $iterator->current();\n        $isEmpty = $row->isEmpty(CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL);\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyRowEmptyStringAsEmptyProvider(): array\n    {\n        return [\n            [1, false],\n            [2, true],\n            [3, false],\n            [4, true],\n            [5, false],\n            [6, false],\n            [7, false],\n            [8, false],\n            [9, true],\n        ];\n    }\n\n    #[DataProvider('emptyRowNullAndEmptyStringAsEmptyProvider')]\n    public function testIteratorEmptyRowWithNullAndEmptyString(int $rowId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet, 1, 9);\n        $iterator->seek($rowId);\n        $row = $iterator->current();\n        $isEmpty = $row->isEmpty(\n            CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL | CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL\n        );\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyRowNullAndEmptyStringAsEmptyProvider(): array\n    {\n        return [\n            [1, false],\n            [2, true],\n            [3, true],\n            [4, true],\n            [5, true],\n            [6, false],\n            [7, false],\n            [8, false],\n            [9, true],\n        ];\n    }\n\n    public function testIteratorEmptyRowWithColumnLimit(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $sheet->setCellValue('E3', 'NO LONGER EMPTY');\n\n        $iterator = new RowIterator($sheet, 3, 3);\n        $row = $iterator->current();\n\n        $isEmpty = $row->isEmpty(CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL);\n        self::assertFalse($isEmpty);\n        $isEmpty = $row->isEmpty(CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL, 'A', 'D');\n        self::assertTrue($isEmpty);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/RowIteratorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as Except;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\RowIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowIteratorTest extends TestCase\n{\n    private const CELL_VALUES\n        = [\n            [110, 120, 130],\n            [210, 220],\n            [310, 320, 330],\n            [410, 420],\n            [510, 520, 530],\n            [610, 620],\n        ];\n\n    private static function getPopulatedSheet(Spreadsheet $spreadsheet): Worksheet\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(self::CELL_VALUES);\n\n        return $sheet;\n    }\n\n    public function testIteratorFullRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet);\n        $rowIndexResult = 1;\n        self::assertEquals($rowIndexResult, $iterator->key());\n\n        $counter = 0;\n        foreach ($iterator as $key => $row) {\n            ++$counter;\n            self::assertEquals($rowIndexResult++, $key);\n        }\n        self::assertCount($counter, self::CELL_VALUES);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorStartEndRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet, 2, 4);\n        $rowIndexResult = 2;\n        self::assertEquals($rowIndexResult, $iterator->key());\n\n        $counter = 0;\n        foreach ($iterator as $key => $row) {\n            ++$counter;\n            self::assertEquals($rowIndexResult++, $key);\n        }\n        self::assertSame(3, $counter);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorSeekAndPrev(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet, 2, 4);\n        $columnIndexResult = 4;\n        $iterator->seek(4);\n        self::assertEquals($columnIndexResult, $iterator->key());\n\n        $counter = 0;\n        while ($iterator->valid() !== false) {\n            ++$counter;\n            self::assertEquals($columnIndexResult, $iterator->key());\n            --$columnIndexResult;\n            $iterator->prev();\n        }\n        self::assertSame(3, $counter);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testIteratorResetStart(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet, 2, 4);\n        $iterator->resetStart(5);\n\n        $key = $iterator->key();\n        self::assertSame(5, $key);\n\n        $lastRow = $iterator->key();\n        while ($iterator->valid() !== false) {\n            $iterator->next();\n            $lastRow = $iterator->key();\n        }\n        self::assertSame(6, $lastRow);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSeekOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $this->expectException(Except::class);\n\n        $iterator = new RowIterator($sheet, 2, 4);\n        $iterator->seek(1);\n    }\n\n    public function testPrevOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $iterator = new RowIterator($sheet, 2, 4);\n        $iterator->prev();\n        self::assertFalse($iterator->valid());\n    }\n\n    public function testResetStartOutOfRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheet($spreadsheet);\n        $this->expectException(Except::class);\n\n        $iterator = new RowIterator($sheet, 2, 4);\n        $iterator->resetStart(10);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/RowTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Row;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RowTest extends TestCase\n{\n    public function testInstantiateRowDefault(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $row = new Row($sheet);\n        $rowIndex = $row->getRowIndex();\n        self::assertEquals(1, $rowIndex);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInstantiateRowSpecified(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $row = new Row($sheet, 5);\n        $rowIndex = $row->getRowIndex();\n        self::assertEquals(5, $rowIndex);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellIterator(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $row = new Row($sheet);\n        $cellIterator = $row->getCellIterator();\n        self::assertSame(1, $cellIterator->getCurrentColumnIndex());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetColumnIterator(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $row = new Row($sheet);\n        $cellIterator = $row->getColumnIterator();\n        self::assertSame(1, $cellIterator->getCurrentColumnIndex());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/SetValueExplicitWorksheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse ArgumentCountError;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass SetValueExplicitWorksheetTest extends TestCase\n{\n    protected string $method = 'setCellValueExplicit';\n\n    protected int $requiredParameters = 3;\n\n    public function testRequired(): void\n    {\n        $reflectionMethod = new ReflectionMethod(Worksheet::class, $this->method);\n        $requiredParameters = $reflectionMethod->getNumberOfRequiredParameters();\n        self::assertSame($this->requiredParameters, $requiredParameters);\n    }\n\n    public static function setCellValueExplicitTypeArgumentProvider(): array\n    {\n        return require 'tests/data/Cell/SetValueExplicitTypeArguments.php';\n    }\n\n    #[DataProvider('setCellValueExplicitTypeArgumentProvider')]\n    public function testSetCellValueExplicitTypeArgumentHandling(\n        mixed $value,\n        ?string $dataType,\n        mixed $expectedValue,\n        string $expectedDataType\n    ): void {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $coordinate = 'A1';\n        $cell = $worksheet->getCell($coordinate);\n\n        try {\n            if ($dataType) {\n                $worksheet->{$this->method}($coordinate, $value, $dataType);\n            } else {\n                $worksheet->{$this->method}($coordinate, $value);\n                self::assertSame(2, $this->requiredParameters);\n            }\n            self::assertSame($expectedValue, $cell->getValue());\n            self::assertSame($expectedDataType, $cell->getDataType());\n        } catch (ArgumentCountError) {\n            self::assertSame(3, $this->requiredParameters);\n            self::assertNull($dataType);\n        }\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/SheetViewTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\SheetView;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SheetViewTest extends TestCase\n{\n    public function testView(): void\n    {\n        $sheetView = new SheetView();\n        self::assertSame(SheetView::SHEETVIEW_NORMAL, $sheetView->getView());\n        $sheetView->setView(SheetView::SHEETVIEW_PAGE_LAYOUT);\n        self::assertSame(SheetView::SHEETVIEW_PAGE_LAYOUT, $sheetView->getView());\n        $sheetView->setView(null);\n        self::assertSame(SheetView::SHEETVIEW_NORMAL, $sheetView->getView());\n    }\n\n    public function testBadView(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Invalid sheetview layout type.');\n        $sheetView = new SheetView();\n        $sheetView->setView('unknown');\n    }\n\n    public function testBadZoomScaleNormal(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Scale must be greater than or equal to 1.');\n        $sheetView = new SheetView();\n        $sheetView->setZoomScaleNormal(0);\n    }\n\n    public function testBadZoomScale(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Scale must be greater than or equal to 1.');\n        $sheetView = new SheetView();\n        $sheetView->setZoomScale(0);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/ColumnTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\Column;\n\nclass ColumnTest extends SetupTeardown\n{\n    protected function initTable(): Table\n    {\n        $sheet = $this->getSheet();\n        $sheet->getCell('G1')->setValue('Heading');\n        $sheet->getCell('G2')->setValue(2);\n        $sheet->getCell('G3')->setValue(3);\n        $sheet->getCell('G4')->setValue(4);\n        $sheet->getCell('H1')->setValue('Heading2');\n        $sheet->getCell('H2')->setValue(1);\n        $sheet->getCell('H3')->setValue(2);\n        $sheet->getCell('H4')->setValue(3);\n        $this->maxRow = $maxRow = 4;\n        $table = new Table();\n        $table->setRange(\"G1:H$maxRow\");\n\n        return $table;\n    }\n\n    public function testVariousGets(): void\n    {\n        $table = $this->initTable();\n        $column = $table->getColumn('H');\n        $result = $column->getColumnIndex();\n        self::assertEquals('H', $result);\n    }\n\n    public function testGetBadColumnIndex(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Column is outside of current table range.');\n        $table = $this->initTable();\n        $table->getColumn('B');\n    }\n\n    public function testSetColumnIndex(): void\n    {\n        $table = $this->initTable();\n        $column = $table->getColumn('H');\n        $column->setShowFilterButton(false);\n        $expectedResult = 'G';\n\n        $result = $column->setColumnIndex($expectedResult);\n\n        $result = $result->getColumnIndex();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    public function testVariousSets(): void\n    {\n        $table = $this->initTable();\n        $column = $table->getColumn('H');\n\n        $result = $column->setShowFilterButton(false);\n        self::assertFalse($result->getShowFilterButton());\n\n        $label = 'Total';\n        $result = $column->setTotalsRowLabel($label);\n        self::assertEquals($label, $result->getTotalsRowLabel());\n\n        $function = 'sum';\n        $result = $column->setTotalsRowFunction($function);\n        self::assertEquals($function, $result->getTotalsRowFunction());\n\n        $formula = '=SUM(Sales_Data[[#This Row],[Q1]:[Q4]])';\n        $column->setColumnFormula($formula);\n        self::assertEquals($formula, $column->getColumnFormula());\n    }\n\n    public function testTable(): void\n    {\n        $table = $this->initTable();\n        $column = new Column('H');\n        $column->setTable($table);\n        self::assertEquals($table, $column->getTable());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/FormulaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FormulaTest extends TestCase\n{\n    public function testCellFormulaUpdateOnTableNameChange(): void\n    {\n        $reader = new Xlsx();\n        $filename = 'tests/data/Worksheet/Table/TableFormulae.xlsx';\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        // Verify original formulae\n        // Row Formula\n        self::assertSame(\"=DeptSales[[#This Row],[Sales\\u{a0}Amount]]*DeptSales[[#This Row],[% Commission]]\", $worksheet->getCell('E2')->getValue());\n        // Totals Formula\n        self::assertSame('=SUBTOTAL(109,DeptSales[Commission Amount])', $worksheet->getCell('E8')->getValue());\n\n        $table = $worksheet->getTableCollection()[0];\n        if ($table === null) {\n            self::markTestSkipped('Unable to read table for testing.');\n        }\n        $table->setName('tblSalesByDepartment');\n\n        // Verify modified formulae\n        // Row Formula\n        self::assertSame(\"=tblSalesByDepartment[[#This Row],[Sales\\u{a0}Amount]]*tblSalesByDepartment[[#This Row],[% Commission]]\", $worksheet->getCell('E2')->getValue());\n        // Totals Formula\n        self::assertSame('=SUBTOTAL(109,tblSalesByDepartment[Commission Amount])', $worksheet->getCell('E8')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNamedFormulaUpdateOnTableNameChange(): void\n    {\n        $reader = new Xlsx();\n        $filename = 'tests/data/Worksheet/Table/TableFormulae.xlsx';\n        $spreadsheet = $reader->load($filename);\n\n        $table = $spreadsheet->getActiveSheet()->getTableCollection()[0];\n        if ($table === null) {\n            self::markTestSkipped('Unable to read table for testing.');\n        }\n        $namedFormula = $spreadsheet->getNamedFormula('CommissionTotal');\n        if ($namedFormula === null) {\n            self::markTestSkipped('Unable to read named formula for testing.');\n        }\n\n        // Verify original formula\n        self::assertSame('SUBTOTAL(109,DeptSales[Commission Amount])', $namedFormula->getFormula());\n\n        $table->setName('tblSalesByDepartment');\n        // Verify modified formula\n        self::assertSame('SUBTOTAL(109,tblSalesByDepartment[Commission Amount])', $namedFormula->getFormula());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellFormulaUpdateOnHeadingColumnChange(): void\n    {\n        $reader = new Xlsx();\n        $filename = 'tests/data/Worksheet/Table/TableFormulae.xlsx';\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        // Verify original formulae\n        // Row Formula\n        self::assertSame(\"=DeptSales[[#This Row],[Sales\\u{a0}Amount]]*DeptSales[[#This Row],[% Commission]]\", $worksheet->getCell('E2')->getValue());\n        // Totals Formula\n        self::assertSame('=SUBTOTAL(109,DeptSales[Commission Amount])', $worksheet->getCell('E8')->getValue());\n\n        $worksheet->getCell('D1')->setValue('Commission %age');\n        $worksheet->getCell('E1')->setValue('Commission');\n\n        // Verify modified formulae\n        // Row Formula\n        self::assertSame(\"=DeptSales[[#This Row],[Sales\\u{a0}Amount]]*DeptSales[[#This Row],[Commission %age]]\", $worksheet->getCell('E2')->getValue());\n        // Totals Formula\n        self::assertSame('=SUBTOTAL(109,DeptSales[Commission])', $worksheet->getCell('E8')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellFormulaUpdateOnHeadingColumnChangeSlash(): void\n    {\n        $reader = new Xlsx();\n        $filename = 'tests/data/Worksheet/Table/TableFormulae.xlsx';\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        // Verify original formulae\n        // Row Formula\n        self::assertSame(\"=DeptSales[[#This Row],[Sales\\u{a0}Amount]]*DeptSales[[#This Row],[% Commission]]\", $worksheet->getCell('E2')->getValue());\n        // Totals Formula\n        self::assertSame('=SUBTOTAL(109,DeptSales[Commission Amount])', $worksheet->getCell('E8')->getValue());\n\n        $worksheet->getCell('D1')->setValue('Commission %age');\n        $worksheet->getCell('E1')->setValue('Commission/Amount');\n        $worksheet->getCell('E1')->setValue('Commission/Amount2');\n\n        // Verify modified formulae\n        // Row Formula\n        self::assertSame(\"=DeptSales[[#This Row],[Sales\\u{a0}Amount]]*DeptSales[[#This Row],[Commission %age]]\", $worksheet->getCell('E2')->getValue());\n        // Totals Formula\n        self::assertSame('=SUBTOTAL(109,DeptSales[Commission/Amount2])', $worksheet->getCell('E8')->getValue());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNamedFormulaUpdateOnHeadingColumnChange(): void\n    {\n        $reader = new Xlsx();\n        $filename = 'tests/data/Worksheet/Table/TableFormulae.xlsx';\n        $spreadsheet = $reader->load($filename);\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $table = $spreadsheet->getActiveSheet()->getTableCollection()[0];\n        if ($table === null) {\n            self::markTestSkipped('Unable to read table for testing.');\n        }\n        $namedFormula = $spreadsheet->getNamedFormula('CommissionTotal');\n        if ($namedFormula === null) {\n            self::markTestSkipped('Unable to read named formula for testing.');\n        }\n\n        // Verify original formula\n        self::assertSame('SUBTOTAL(109,DeptSales[Commission Amount])', $namedFormula->getFormula());\n\n        $worksheet->getCell('E1')->setValue('Commission');\n        // Verify modified formula\n        self::assertSame('SUBTOTAL(109,DeptSales[Commission])', $namedFormula->getFormula());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/Issue3635Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nclass Issue3635Test extends SetupTeardown\n{\n    public function testNewExample(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->setTitle('Feuil1');\n        $sheet->fromArray(\n            [\n                ['Numbers'],\n                [1],\n                [2],\n                [3],\n                [4],\n                [5],\n            ],\n            null,\n            'B2',\n            true\n        );\n        $table = new Table('B2:B7', 'Tableau2');\n        $sheet->addTable($table);\n        $sheet->getCell('E2')->setValue('=IF(E3>0,SUM(SUM(Tableau2),SUM(Tableau2)),\"NOPE\")');\n        $sheet->getCell('G2')->setValue('=IF(G3>0,SUM(SUM(Tableau2),SUM(Tableau2)),\"NOPE\")');\n        $sheet->getCell('G3')->setValue(1);\n        self::assertSame('NOPE', $sheet->getCell('E2')->getCalculatedValue());\n        self::assertSame(30, $sheet->getCell('G2')->getCalculatedValue());\n    }\n\n    public function testOriginalExample(): void\n    {\n        $sheet = $this->getSheet();\n        $formula = '=IF([@BAUTEIL]=\"EK\",\"Entrauchungsklappe\",(IF([@BAUTEIL]=\"VE\",\"Entrauchungsventilator\",(IF([@BAUTEIL]=\"JK\",\"Jalousieklappe\",(IF([@BAUTEIL]=\"LK\",\"Lichtkuppel\",\"ok\")))))))';\n        $sheet->fromArray(\n            [\n                ['BAUTEIL', 'Result'],\n                ['EK', $formula],\n                ['VE', $formula],\n                ['EK', $formula],\n                ['JK', $formula],\n                ['LK', $formula],\n                ['None', $formula],\n                [null, $formula],\n                [null, $formula],\n                [null, $formula],\n            ],\n            null,\n            'A1',\n            true\n        );\n        $table = new Table('A1:B10', 'Tableau3');\n        $sheet->addTable($table);\n        self::assertSame('Entrauchungsklappe', $sheet->getCell('B2')->getCalculatedValue());\n        self::assertSame('Entrauchungsventilator', $sheet->getCell('B3')->getCalculatedValue());\n        self::assertSame('Entrauchungsklappe', $sheet->getCell('B4')->getCalculatedValue());\n        self::assertSame('Jalousieklappe', $sheet->getCell('B5')->getCalculatedValue());\n        self::assertSame('Lichtkuppel', $sheet->getCell('B6')->getCalculatedValue());\n        self::assertSame('ok', $sheet->getCell('B7')->getCalculatedValue());\n        self::assertSame('ok', $sheet->getCell('B8')->getCalculatedValue());\n        self::assertSame('ok', $sheet->getCell('B9')->getCalculatedValue());\n        self::assertSame('ok', $sheet->getCell('B10')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/Issue3659Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nclass Issue3659Test extends SetupTeardown\n{\n    public function testTableOnOtherSheet(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $this->getSheet();\n        $sheet->setTitle('Feuil1');\n        $tableSheet = $spreadsheet->createSheet();\n        $tableSheet->setTitle('sheet_with_table');\n        $tableSheet->fromArray(\n            [\n                ['MyCol', 'Colonne2', 'Colonne3'],\n                [10, 20],\n                [2],\n                [3],\n                [4],\n            ],\n            null,\n            'B1',\n            true\n        );\n        $table = new Table('B1:D5', 'Tableau1');\n        $tableSheet->addTable($table);\n        $sheet->setSelectedCells('F7');\n        $tableSheet->setSelectedCells('F8');\n        self::assertSame($sheet, $spreadsheet->getActiveSheet());\n        $sheet->getCell('A1')->setValue('=SUM(Tableau1[MyCol])');\n        $sheet->getCell('A2')->setValue('=SUM(Tableau1[])');\n        $sheet->getCell('A3')->setValue('=SUM(Tableau1)');\n        $sheet->getCell('A4')->setValue('=CONCAT(Tableau1)');\n        self::assertSame(19, $sheet->getCell('A1')->getCalculatedValue());\n        self::assertSame(39, $sheet->getCell('A2')->getCalculatedValue());\n        self::assertSame(39, $sheet->getCell('A3')->getCalculatedValue());\n        self::assertSame('1020234', $sheet->getCell('A4')->getCalculatedValue(), 'Header row not included');\n        self::assertSame('F7', $sheet->getSelectedCells());\n        self::assertSame('F8', $tableSheet->getSelectedCells());\n        self::assertSame($sheet, $spreadsheet->getActiveSheet());\n    }\n\n    public function testTableAsArray(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $spreadsheet->returnArrayAsArray();\n        $sheet = $this->getSheet();\n        $sheet->setTitle('Feuil1');\n        $tableSheet = $spreadsheet->createSheet();\n        $tableSheet->setTitle('sheet_with_table');\n        $tableSheet->fromArray(\n            [\n                ['MyCol', 'Colonne2', 'Colonne3'],\n                [10, 20],\n                [2],\n                [3],\n                [4],\n            ],\n            null,\n            'B1',\n            true\n        );\n        $table = new Table('B1:D5', 'Tableau1');\n        $tableSheet->addTable($table);\n        $sheet->setSelectedCells('F7');\n        $tableSheet->setSelectedCells('F8');\n        self::assertSame($sheet, $spreadsheet->getActiveSheet());\n        $sheet->getCell('F1')->setValue('=Tableau1[MyCol]');\n        $sheet->getCell('H1')->setValue('=Tableau1[]');\n        $sheet->getCell('F9')->setValue('=Tableau1');\n        $sheet->getCell('J9')->setValue('=CONCAT(Tableau1)');\n        $sheet->getCell('J11')->setValue('=SUM(Tableau1[])');\n        $expectedResult = [[10], [2], [3], [4]];\n        self::assertSame($expectedResult, $sheet->getCell('F1')->getCalculatedValue());\n        $expectedResult = [\n            [10, 20, null],\n            [2, null, null],\n            [3, null, null],\n            [4, null, null],\n        ];\n        self::assertSame($expectedResult, $sheet->getCell('H1')->getCalculatedValue());\n        self::assertSame($expectedResult, $sheet->getCell('F9')->getCalculatedValue());\n        self::assertSame('1020234', $sheet->getCell('J9')->getCalculatedValue(), 'Header row not included');\n        self::assertSame(39, $sheet->getCell('J11')->getCalculatedValue(), 'Header row not included');\n        self::assertSame('F7', $sheet->getSelectedCells());\n        self::assertSame('F8', $tableSheet->getSelectedCells());\n        self::assertSame($sheet, $spreadsheet->getActiveSheet());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/Issue3820Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nclass Issue3820Test extends SetupTeardown\n{\n    public function testTableOnOtherSheet(): void\n    {\n        // Clone worksheet failed when table was on sheet\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet = $this->getSheet();\n        $sheet->setTitle('Original');\n        $sheet->fromArray(\n            [\n                ['MyCol', 'Colonne2', 'Colonne3'],\n                [10, 20],\n                [2],\n                [3],\n                [4],\n            ],\n            null,\n            'B1',\n            true\n        );\n        $table = new Table('B1:D5', 'Tableau1');\n        $sheet->addTable($table);\n        $clonedSheet = clone $sheet;\n        $clonedSheet->setTitle('Cloned');\n        $spreadsheet->addsheet($clonedSheet);\n        $originalTable = $spreadsheet->getTableByName('Tableau1');\n        $newTable = $spreadsheet->getTableByName('Tableau1clone');\n        self::assertNotNull($newTable);\n        self::assertSame($table, $originalTable);\n        self::assertSame('Cloned', $newTable->getWorksheet()?->getTitle());\n        self::assertSame('B1:D5', $newTable->getRange());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/RemoveTableTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\n\nclass RemoveTableTest extends SetupTeardown\n{\n    private const INITIAL_RANGE = 'H2:O256';\n\n    public function testRemoveTable(): void\n    {\n        $sheet = $this->getSheet();\n\n        $table = new Table(self::INITIAL_RANGE);\n        $table->setName('Table1');\n        $sheet->addTable($table);\n\n        self::assertEquals(1, $sheet->getTableCollection()->count());\n\n        $sheet->removeTableByName('table1'); // case-insensitive\n        self::assertEquals(0, $sheet->getTableCollection()->count());\n    }\n\n    public function testRemoveCollection(): void\n    {\n        $sheet = $this->getSheet();\n\n        $table = new Table(self::INITIAL_RANGE);\n        $table->setName('Table1');\n        $sheet->addTable($table);\n\n        self::assertEquals(1, $sheet->getTableCollection()->count());\n\n        $sheet->removeTableCollection();\n        self::assertEquals(0, $sheet->getTableCollection()->count());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/SetupTeardown.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SetupTeardown extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Worksheet $sheet = null;\n\n    protected int $maxRow = 4;\n\n    protected function tearDown(): void\n    {\n        $this->sheet = null;\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        if ($this->spreadsheet !== null) {\n            return $this->spreadsheet;\n        }\n        $this->spreadsheet = new Spreadsheet();\n\n        return $this->spreadsheet;\n    }\n\n    protected function getSheet(): Worksheet\n    {\n        if ($this->sheet !== null) {\n            return $this->sheet;\n        }\n        $this->sheet = $this->getSpreadsheet()->getActiveSheet();\n\n        return $this->sheet;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/TableStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableStyle;\n\nclass TableStyleTest extends SetupTeardown\n{\n    private const INITIAL_RANGE = 'H2:O256';\n\n    public function testVariousSets(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n        $style = $table->getStyle();\n\n        $result = $style->setTheme(TableStyle::TABLE_STYLE_DARK1);\n        self::assertEquals(TableStyle::TABLE_STYLE_DARK1, $result->getTheme());\n\n        $style->setShowFirstColumn(true);\n        self::assertTrue($style->getShowFirstColumn());\n\n        $style->setShowLastColumn(true);\n        self::assertTrue($style->getShowLastColumn());\n\n        $style->setShowRowStripes(true);\n        self::assertTrue($style->getShowRowStripes());\n\n        $style->setShowColumnStripes(true);\n        self::assertTrue($style->getShowColumnStripes());\n    }\n\n    public function testTable(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n        $style = new TableStyle();\n        $style->setTable($table);\n        self::assertEquals($table, $style->getTable());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Table/TableTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet\\Table;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\AddressRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellRange;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\Column;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass TableTest extends SetupTeardown\n{\n    private const INITIAL_RANGE = 'H2:O256';\n\n    public function testToString(): void\n    {\n        $expectedResult = self::INITIAL_RANGE;\n        $table = new Table(self::INITIAL_RANGE);\n\n        //  magic __toString should return the active table range\n        $result = (string) $table;\n        self::assertEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('validTableNamesProvider')]\n    public function testValidTableNames(string $name, string $expected): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n\n        $result = $table->setName($name);\n        self::assertSame($expected, $result->getName());\n    }\n\n    public static function validTableNamesProvider(): array\n    {\n        return [\n            ['', ''],\n            ['Table_1', 'Table_1'],\n            ['_table_2', '_table_2'],\n            ['\\table_3', '\\table_3'],\n            [\"\tTable_4 \\n\", 'Table_4'],\n            ['table.5', 'table.5'],\n            'issue 4739' => ['x', 'x'],\n            ['தமிழ்', 'தமிழ்'], // UTF-8 letters with combined character\n        ];\n    }\n\n    #[DataProvider('invalidTableNamesProvider')]\n    public function testInvalidTableNames(string $name): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n\n        $this->expectException(PhpSpreadsheetException::class);\n\n        $table->setName($name);\n    }\n\n    public static function invalidTableNamesProvider(): array\n    {\n        return [\n            ['C'],\n            ['c'],\n            ['R'],\n            ['r'],\n            ['Z100'],\n            ['Z$100'],\n            ['R1C1'],\n            ['R1C'],\n            ['R11C11'],\n            ['123'],\n            ['=Table'],\n            ['Name/Slash'],\n            ['ிக'], // starting with UTF-8 combined character\n            [bin2hex(random_bytes(255))], // random string with length greater than 255\n        ];\n    }\n\n    public function testUniqueTableNameOnBindToWorksheet(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $sheet = $this->getSheet();\n\n        $table1 = new Table();\n        $table1->setName('Table_1');\n        $sheet->addTable($table1);\n\n        $table2 = new Table();\n        $table2->setName('tABlE_1'); // case-insensitive\n        $sheet->addTable($table2);\n    }\n\n    public function testUniqueTableNameOnNameChange(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $sheet = $this->getSheet();\n\n        $table1 = new Table();\n        $table1->setName('Table_1');\n        $sheet->addTable($table1);\n\n        $table2 = new Table();\n        $table2->setName('table_2'); // case-insensitive\n        $sheet->addTable($table2);\n        $table2->setName('tAbLe_1');\n    }\n\n    public function testVariousSets(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n\n        $result = $table->setShowHeaderRow(false);\n        self::assertFalse($result->getShowHeaderRow());\n\n        $result = $table->setShowTotalsRow(true);\n        self::assertTrue($result->getShowTotalsRow());\n    }\n\n    public function testGetWorksheet(): void\n    {\n        $sheet = $this->getSheet();\n        $table = new Table(self::INITIAL_RANGE);\n        $sheet->addTable($table);\n        $result = $table->getWorksheet();\n        self::assertSame($sheet, $result);\n    }\n\n    public function testSetWorksheet(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n        $spreadsheet = $this->getSpreadsheet();\n        $sheet2 = $spreadsheet->createSheet();\n        //  Setters return the instance to implement the fluent interface\n        $result = $table->setWorksheet($sheet2);\n        self::assertSame(self::INITIAL_RANGE, $result->getRange());\n    }\n\n    public function testGetRange(): void\n    {\n        $expectedResult = self::INITIAL_RANGE;\n        $table = new Table(self::INITIAL_RANGE);\n\n        //  Result should be the active table range\n        $result = $table->getRange();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    /**\n     * @param AddressRange<CellAddress>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $fullRange\n     */\n    public function xtestSetRangeValidRange(string|array|AddressRange $fullRange, string $actualRange): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n\n        $result = $table->setRange($fullRange);\n        self::assertEquals($actualRange, $result->getRange());\n    }\n\n    public function testSetRangeValidRange(): void\n    {\n        foreach ($this->validTableRanges() as $arrayEntry) {\n            $this->xtestSetRangeValidRange($arrayEntry[0], $arrayEntry[1]);\n        }\n    }\n\n    /** @return array{array{array{int, int, int, int}|CellRange|string, string}} */\n    public function validTableRanges(): array\n    {\n        $sheet = $this->getSheet();\n        $title = $sheet->getTitle();\n\n        return [\n            [\"$title!G1:J512\", 'G1:J512'],\n            ['K1:N20', 'K1:N20'],\n            [[3, 5, 6, 8], 'C5:F8'],\n            [new CellRange(new CellAddress('C5', $sheet), new CellAddress('F8', $sheet)), 'C5:F8'],\n        ];\n    }\n\n    public function testClearRange(): void\n    {\n        $expectedResult = '';\n        $table = new Table(self::INITIAL_RANGE);\n\n        //  Setters return the instance to implement the fluent interface\n        $result = $table->setRange('');\n\n        //  Result should be a clear range\n        $result = $result->getRange();\n        self::assertEquals($expectedResult, $result);\n    }\n\n    #[DataProvider('invalidTableRangeProvider')]\n    public function testSetRangeInvalidRange(string $range): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n\n        new Table($range);\n    }\n\n    public static function invalidTableRangeProvider(): array\n    {\n        return [\n            ['A1'],\n            ['B1:A4'],\n            ['B12:B4'],\n            ['D1:A1'],\n        ];\n    }\n\n    public function testGetColumnsEmpty(): void\n    {\n        //  There should be no columns yet defined\n        $table = new Table(self::INITIAL_RANGE);\n        $result = $table->getColumns();\n        self::assertCount(0, $result);\n    }\n\n    public function testGetColumnOffset(): void\n    {\n        $columnIndexes = [\n            'H' => 0,\n            'K' => 3,\n            'M' => 5,\n        ];\n        $table = new Table(self::INITIAL_RANGE);\n\n        //  If we request a specific column by its column ID, we should get an\n        //    integer returned representing the column offset within the range\n        foreach ($columnIndexes as $columnIndex => $columnOffset) {\n            $result = $table->getColumnOffset($columnIndex);\n            self::assertEquals($columnOffset, $result);\n        }\n    }\n\n    public function testRemoveColumns(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(range('H', 'O'), null, 'H2');\n        $table = new Table(self::INITIAL_RANGE);\n        $table->getColumn('L')->setShowFilterButton(false);\n        $sheet->addTable($table);\n\n        $sheet->removeColumn('K', 2);\n        $result = $table->getRange();\n        self::assertEquals('H2:M256', $result);\n\n        // Check that the prop that was set for column L is no longer set\n        self::assertTrue($table->getColumn('L')->getShowFilterButton());\n    }\n\n    public function testRemoveRows(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(range('H', 'O'), null, 'H2');\n        $table = new Table(self::INITIAL_RANGE);\n        $sheet->addTable($table);\n\n        $sheet->removeRow(42, 128);\n        $result = $table->getRange();\n        self::assertEquals('H2:O128', $result);\n    }\n\n    public function testInsertColumns(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(range('H', 'O'), null, 'H2');\n        $table = new Table(self::INITIAL_RANGE);\n        $table->getColumn('N')->setShowFilterButton(false);\n        $sheet->addTable($table);\n\n        $sheet->insertNewColumnBefore('N', 3);\n        $result = $table->getRange();\n        self::assertEquals('H2:R256', $result);\n\n        // Check that column N no longer has a prop\n        self::assertTrue($table->getColumn('N')->getShowFilterButton());\n        // Check that the prop originally set in column N has been moved to column Q\n        self::assertFalse($table->getColumn('Q')->getShowFilterButton());\n    }\n\n    public function testInsertRows(): void\n    {\n        $sheet = $this->getSheet();\n        $sheet->fromArray(range('H', 'O'), null, 'H2');\n        $table = new Table(self::INITIAL_RANGE);\n        $sheet->addTable($table);\n\n        $sheet->insertNewRowBefore(3, 4);\n        $result = $table->getRange();\n        self::assertEquals('H2:O260', $result);\n    }\n\n    public function testGetInvalidColumnOffset(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n\n        $invalidColumn = 'G';\n        $sheet = $this->getSheet();\n        $table = new Table();\n        $table->setWorksheet($sheet);\n\n        $table->getColumnOffset($invalidColumn);\n    }\n\n    public function testSetColumnWithString(): void\n    {\n        $expectedResult = 'L';\n        $table = new Table(self::INITIAL_RANGE);\n\n        //  Setters return the instance to implement the fluent interface\n        $result = $table->setColumn($expectedResult);\n\n        $result = $result->getColumns();\n        //  Result should be an array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\Table\\Column\n        //    objects for each column we set indexed by the column ID\n        self::assertCount(1, $result);\n        self::assertArrayHasKey($expectedResult, $result);\n    }\n\n    public function testSetInvalidColumnWithString(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $table = new Table(self::INITIAL_RANGE);\n\n        $invalidColumn = 'A';\n        $table->setColumn($invalidColumn);\n    }\n\n    public function testSetColumnWithColumnObject(): void\n    {\n        $expectedResult = 'M';\n        $columnObject = new Column($expectedResult);\n        $table = new Table(self::INITIAL_RANGE);\n\n        //  Setters return the instance to implement the fluent interface\n        $result = $table->setColumn($columnObject);\n\n        $result = $result->getColumns();\n        //  Result should be an array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\Table\\Column\n        //    objects for each column we set indexed by the column ID\n        self::assertCount(1, $result);\n        self::assertArrayHasKey($expectedResult, $result);\n    }\n\n    public function testSetInvalidColumnWithObject(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n\n        $invalidColumn = 'E';\n        $table = new Table(self::INITIAL_RANGE);\n        $table->setColumn($invalidColumn);\n    }\n\n    public function testGetColumns(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n\n        $columnIndexes = ['L', 'M'];\n\n        foreach ($columnIndexes as $columnIndex) {\n            $table->setColumn($columnIndex);\n        }\n\n        $result = $table->getColumns();\n        //  Result should be an array of \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\Table\\Column\n        //    objects for each column we set indexed by the column ID\n        self::assertCount(count($columnIndexes), $result);\n        foreach ($columnIndexes as $columnIndex) {\n            self::assertArrayHasKey($columnIndex, $result);\n        }\n\n        $table->setRange('');\n        self::assertCount(0, $table->getColumns());\n        self::assertSame('', $table->getRange());\n    }\n\n    public function testGetColumn(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n\n        $columnIndexes = ['L', 'M'];\n\n        foreach ($columnIndexes as $columnIndex) {\n            $table->setColumn($columnIndex);\n        }\n\n        //  If we request a specific column by its column ID, we should\n        //    get a \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\Table\\Column object returned\n        foreach ($columnIndexes as $columnIndex) {\n            $result = $table->getColumn($columnIndex);\n            self::assertSame($columnIndex, $result->getColumnIndex());\n        }\n    }\n\n    public function testGetColumnByOffset(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n\n        $columnIndexes = [\n            0 => 'H',\n            3 => 'K',\n            5 => 'M',\n        ];\n\n        //  If we request a specific column by its offset, we should\n        //    get a \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\Table\\Column object returned\n        foreach ($columnIndexes as $columnIndex => $columnID) {\n            $result = $table->getColumnByOffset($columnIndex);\n            self::assertEquals($result->getColumnIndex(), $columnID);\n        }\n    }\n\n    public function testGetColumnIfNotSet(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n        //  If we request a specific column by its column ID, we should\n        //    get a \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet\\Table\\Column object returned\n        $result = $table->getColumn('K');\n        self::assertSame('K', $result->getColumnIndex());\n    }\n\n    public function testGetColumnWithoutRangeSet(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $table = new Table(self::INITIAL_RANGE);\n\n        //  Clear the range\n        $table->setRange('');\n        $table->getColumn('A');\n    }\n\n    public function testClearRangeWithExistingColumns(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n        $expectedResult = '';\n\n        $columnIndexes = ['L', 'M', 'N'];\n        foreach ($columnIndexes as $columnIndex) {\n            $table->setColumn($columnIndex);\n        }\n\n        //  Setters return the instance to implement the fluent interface\n        $result = $table->setRange('');\n\n        //  Range should be cleared\n        $result = $result->getRange();\n        self::assertEquals($expectedResult, $result);\n\n        //  Column array should be cleared\n        $result = $table->getColumns();\n        self::assertCount(0, $result);\n    }\n\n    public function testSetRangeWithExistingColumns(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n        $expectedResult = 'G1:J512';\n\n        //  These columns should be retained\n        $columnIndexes1 = ['I', 'J'];\n        foreach ($columnIndexes1 as $columnIndex) {\n            $table->setColumn($columnIndex);\n        }\n        //  These columns should be discarded\n        $columnIndexes2 = ['K', 'L', 'M'];\n        foreach ($columnIndexes2 as $columnIndex) {\n            $table->setColumn($columnIndex);\n        }\n\n        //  Setters return the instance to implement the fluent interface\n        $result = $table->setRange($expectedResult);\n\n        //  Range should be correctly set\n        $result = $result->getRange();\n        self::assertEquals($expectedResult, $result);\n\n        //  Only columns that existed in the original range and that\n        //    still fall within the new range should be retained\n        $result = $table->getColumns();\n        self::assertCount(count($columnIndexes1), $result);\n    }\n\n    public function testClone(): void\n    {\n        $sheet = $this->getSheet();\n        $table = new Table(self::INITIAL_RANGE);\n        $sheet->addTable($table);\n        $columnIndexes = ['L', 'M'];\n\n        foreach ($columnIndexes as $columnIndex) {\n            $table->setColumn($columnIndex);\n        }\n\n        $result = clone $table;\n        self::assertSame($table->getRange(), $result->getRange());\n        self::assertNull($result->getWorksheet());\n        self::assertNotNull($table->getWorksheet());\n        $tableColumns = $table->getColumns();\n        $resultColumns = $result->getColumns();\n        self::assertCount(2, $tableColumns);\n        self::assertCount(2, $resultColumns);\n        self::assertArrayHasKey('L', $tableColumns);\n        self::assertArrayHasKey('L', $resultColumns);\n        self::assertArrayHasKey('M', $tableColumns);\n        self::assertArrayHasKey('M', $resultColumns);\n    }\n\n    public function testNoWorksheet(): void\n    {\n        $table = new Table();\n        self::assertNull($table->getWorksheet());\n    }\n\n    public function testClearColumn(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n        $columnIndexes = ['J', 'K', 'L', 'M'];\n\n        foreach ($columnIndexes as $columnIndex) {\n            $table->setColumn($columnIndex);\n        }\n        $columns = $table->getColumns();\n        self::assertCount(4, $columns);\n        self::assertArrayHasKey('J', $columns);\n        self::assertArrayHasKey('K', $columns);\n        self::assertArrayHasKey('L', $columns);\n        self::assertArrayHasKey('M', $columns);\n        $table->clearColumn('K');\n        $columns = $table->getColumns();\n        self::assertCount(3, $columns);\n        self::assertArrayHasKey('J', $columns);\n        self::assertArrayHasKey('L', $columns);\n        self::assertArrayHasKey('M', $columns);\n    }\n\n    public function testAutoFilterRule(): void\n    {\n        $table = new Table(self::INITIAL_RANGE);\n        $columnFilter = $table->getAutoFilter()->getColumn('H');\n        $columnFilter->setFilterType(AutoFilter\\Column::AUTOFILTER_FILTERTYPE_FILTER);\n        $columnFilter->createRule()\n            ->setRule(\n                AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,\n                3\n            );\n        $autoFilterRuleObject = new AutoFilter\\Column\\Rule($columnFilter);\n        self::assertEquals(AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_FILTER, $autoFilterRuleObject->getRuleType());\n        $ruleParent = $autoFilterRuleObject->getParent();\n        if ($ruleParent === null) {\n            self::fail('Unexpected null parent');\n        } else {\n            self::assertEquals('H', $ruleParent->getColumnIndex());\n            self::assertSame($columnFilter, $ruleParent);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ToArrayOldCalculatedValueTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ToArrayOldCalculatedValueTest extends AbstractFunctional\n{\n    public function testOldCalculatedValue(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([['A', 'B', 'C', '=1+2']]);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $rsheet->setCellValue('D1', '=1+3');\n        $array1 = $rsheet->toArray(formatData: false, calculateFormulas: false, oldCalculatedValue: true);\n        self::assertSame([['A', 'B', 'C', 3]], $array1, 'uses value as read from spreadsheet');\n        $array2 = $rsheet->toArray(formatData: false);\n        self::assertSame([['A', 'B', 'C', 4]], $array2, 'uses newly calculated value');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    private function noPreCalculation(XlsxWriter $writer): void\n    {\n        $writer->setPreCalculateFormulas(false);\n    }\n\n    public function testNoPreCalculate(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([['A', 'B', 'C', '=1+2']]);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', null, $this->noPreCalculation(...));\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $rsheet->setCellValue('D1', '=1+3');\n        $array1 = $rsheet->toArray(formatData: false, calculateFormulas: false, oldCalculatedValue: true);\n        self::assertSame([['A', 'B', 'C', '=1+3']], $array1, 'uses value of cell if formula was not calculated');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/ToArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ToArrayTest extends TestCase\n{\n    public static function testToArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $inputArray = [\n            ['a', 'b', null, 'd', 'e'],\n            [],\n            [null, null, null, null, 'f'],\n            [],\n            [1, 0, null, 4],\n        ];\n\n        $sheet->fromArray($inputArray, null, 'A1', true);\n\n        $expected1 = [\n            ['a', 'b', null, 'd', 'e'],\n            [null, null, null, null, null],\n            [null, null, null, null, 'f'],\n            [null, null, null, null, null],\n            [1, 0, null, 4, null],\n        ];\n        $result1 = $sheet->toArray(null, false, false, false, false);\n        self::assertSame($expected1, $result1);\n\n        $expected2 = [\n            1 => ['A' => 'a', 'B' => 'b', 'C' => null, 'D' => 'd', 'E' => 'e'],\n            2 => ['A' => null, 'B' => null, 'C' => null, 'D' => null, 'E' => null],\n            3 => ['A' => null, 'B' => null, 'C' => null, 'D' => null, 'E' => 'f'],\n            4 => ['A' => null, 'B' => null, 'C' => null, 'D' => null, 'E' => null],\n            5 => ['A' => 1, 'B' => 0, 'C' => null, 'D' => 4, 'E' => null],\n        ];\n        $result2 = $sheet->toArray(null, false, false, true, false);\n        self::assertSame($expected2, $result2);\n\n        $expected3 = [\n            [null, null, null, null],\n            [null, null, null, 'f'],\n            [null, null, null, null],\n            [0, null, 4, null],\n        ];\n        $result3 = $sheet->rangeToArray('B2:E5', null, false, false, false, false);\n        self::assertSame($expected3, $result3);\n\n        $expected4 = [\n            2 => ['B' => null, 'C' => null, 'D' => null, 'E' => null],\n            3 => ['B' => null, 'C' => null, 'D' => null, 'E' => 'f'],\n            4 => ['B' => null, 'C' => null, 'D' => null, 'E' => null],\n            5 => ['B' => 0, 'C' => null, 'D' => 4, 'E' => null],\n        ];\n        $result4 = $sheet->rangeToArray('B2:E5', null, false, false, true, false);\n        self::assertSame($expected4, $result4);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testMaxCol(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('start');\n        $sheet->getCell('XFD1')->setValue('end');\n        $array = $sheet->toArray(null, false, false, false, false);\n        self::assertCount(1, $array);\n        self::assertCount(16384, $array[0]);\n        self::assertSame('start', $array[0][0]);\n        self::assertSame('end', $array[0][16383]);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Worksheet2Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Worksheet2Test extends TestCase\n{\n    public function testMiscellaneous(): void\n    {\n        $invalid = Worksheet::getInvalidCharacters();\n        self::assertSame(['*', ':', '/', '\\\\', '?', '[', ']'], $invalid);\n        $worksheet = new Worksheet();\n        $coord1 = $worksheet->getCoordinates();\n        self::assertSame([], $coord1);\n        $worksheet->getCell('B3')->setValue(1);\n        $worksheet->getCell('G2')->setValue(2);\n        $coord2 = $worksheet->getCoordinates(false); // in order added\n        self::assertSame(['B3', 'G2'], $coord2);\n        $coord3 = $worksheet->getCoordinates(); // sorted by row then column\n        self::assertSame(['G2', 'B3'], $coord3);\n        $worksheet = new Worksheet();\n        $worksheet->disconnectCells();\n        $coord4 = $worksheet->getCoordinates();\n        self::assertSame([], $coord4);\n    }\n\n    public function testHighestColumn(): void\n    {\n        $worksheet = new Worksheet();\n        $worksheet->getCell('A1')->setValue(1);\n        $worksheet->getCell('B1')->setValue(2);\n        $worksheet->getCell('A2')->setValue(3);\n        self::assertSame('B', $worksheet->getHighestColumn(1));\n        self::assertSame('A', $worksheet->getHighestColumn(2));\n    }\n\n    public function testHighestRow(): void\n    {\n        $worksheet = new Worksheet();\n        $worksheet->getCell('A1')->setValue(1);\n        $worksheet->getCell('B1')->setValue(2);\n        $worksheet->getCell('B2')->setValue(3);\n        self::assertSame(1, $worksheet->getHighestRow('A'));\n        self::assertSame(2, $worksheet->getHighestRow('B'));\n        self::assertSame(['row' => 2, 'column' => 'B'], $worksheet->getHighestRowAndColumn());\n    }\n\n    public function testUnmergeNonRange(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Merge can only be removed from a range');\n        $worksheet = new Worksheet();\n        $worksheet->unmergeCells('A1');\n    }\n\n    public function testUnprotectNotProtected(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Cell range A1:B2 not known as protected');\n        $worksheet = new Worksheet();\n        $worksheet->unprotectCells('A1:B2');\n    }\n\n    public function testFreezeRange(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Freeze pane can not be set on a range');\n        $worksheet = new Worksheet();\n        $worksheet->freezePane('A1:B2');\n    }\n\n    private function getPane(Worksheet $sheet): ?string\n    {\n        return $sheet->getFreezePane();\n    }\n\n    public function testFreeze(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $pane = $worksheet->getActivePane();\n        self::assertEmpty($pane);\n        $worksheet->setSelectedCells('D3');\n        $worksheet->freezePane('A2');\n        $freeze = $this->getPane($worksheet);\n        $pane = $worksheet->getActivePane();\n        $selected = $worksheet->getSelectedCells();\n        self::assertSame('A2', $freeze);\n        self::assertSame('D3', $selected);\n        self::assertSame('bottomLeft', $pane);\n        $worksheet->unfreezePane();\n        $freeze = $this->getPane($worksheet);\n        self::assertNull($freeze);\n        $pane = $worksheet->getActivePane();\n        $selected = $worksheet->getSelectedCells();\n        self::assertEquals('', $pane);\n        self::assertSame('D3', $selected);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testFreezeA1(): void\n    {\n        $worksheet = new Worksheet();\n        $worksheet->freezePane('A1');\n        $freeze = $this->getPane($worksheet);\n        self::assertNull($freeze);\n    }\n\n    public function testInsertBeforeRowOne(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Rows can only be inserted before at least row 1');\n        $worksheet = new Worksheet();\n        $worksheet->insertNewRowBefore(0);\n    }\n\n    public function testRemoveBeforeRowOne(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Rows to be deleted should at least start from row 1');\n        $worksheet = new Worksheet();\n        $worksheet->removeRow(0);\n    }\n\n    public function testInsertNumericColumn(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Column references should not be numeric');\n        $worksheet = new Worksheet();\n        $worksheet->insertNewColumnBefore('0');\n    }\n\n    public function testRemoveNumericColumn(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Column references should not be numeric');\n        $worksheet = new Worksheet();\n        $worksheet->removeColumn('0');\n    }\n\n    public function testInsertColumnByIndexBeforeOne(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Columns can only be inserted before at least column A (1)');\n        $worksheet = new Worksheet();\n        $worksheet->insertNewColumnBeforeByIndex(0);\n    }\n\n    public function testRemoveColumnByIndexBeforeOne(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Columns to be deleted should at least start from column A (1)');\n        $worksheet = new Worksheet();\n        $worksheet->removeColumnByIndex(0);\n    }\n\n    public function testInsertColumnByIndex(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell('A1')->setValue(10);\n        $worksheet->insertNewColumnBeforeByIndex(1);\n        self::assertSame(10, $worksheet->getCell('B1')->getValue());\n        self::assertNull($worksheet->getCell('A1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRemoveColumnByIndex(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell('B1')->setValue(10);\n        $worksheet->removeColumnByIndex(1);\n        self::assertSame(10, $worksheet->getCell('A1')->getValue());\n        self::assertNull($worksheet->getCell('B1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRemoveCommentInvalid1(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Cell coordinate string can not be a range');\n        $worksheet = new Worksheet();\n        $worksheet->removeComment('A1:B2');\n    }\n\n    public function testRemoveCommentInvalid2(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Cell coordinate string must not be absolute');\n        $worksheet = new Worksheet();\n        $worksheet->removeComment('$A$1');\n    }\n\n    public function testRemoveCommentInvalid3(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Cell coordinate can not be zero-length string');\n        $worksheet = new Worksheet();\n        $worksheet->removeComment('');\n    }\n\n    public function testGetCommentInvalid1(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Cell coordinate string can not be a range');\n        $worksheet = new Worksheet();\n        $worksheet->getComment('A1:B2');\n    }\n\n    public function testGetCommentInvalid2(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Cell coordinate string must not be absolute');\n        $worksheet = new Worksheet();\n        $worksheet->getComment('$A$1');\n    }\n\n    public function testGetCommentInvalid3(): void\n    {\n        $this->expectException(SpreadsheetException::class);\n        $this->expectExceptionMessage('Cell coordinate can not be zero-length string');\n        $worksheet = new Worksheet();\n        $worksheet->getComment('');\n    }\n\n    public function testResetTabColor(): void\n    {\n        $worksheet = new Worksheet();\n        self::assertSame('FF000000', $worksheet->getTabColor()->getArgb());\n        $worksheet->getTabColor()->setArgb('FF800000');\n        self::assertSame('FF800000', $worksheet->getTabColor()->getArgb());\n        $worksheet->resetTabColor();\n        self::assertSame('FF000000', $worksheet->getTabColor()->getArgb());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/Worksheet3Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Worksheet3Test extends TestCase\n{\n    // All these tests involve setting one property to a\n    //    non-default value. They should be reviewed if defaults change.\n    public function testPageSetup(): void\n    {\n        $worksheet1 = new Worksheet();\n        $worksheet1->getPageSetup()->setOrientation('landscape');\n        $pageSetup = clone $worksheet1->getPageSetup();\n        $worksheet2 = new Worksheet();\n        $worksheet2->setPageSetup($pageSetup);\n        self::assertSame('landscape', $worksheet2->getPageSetup()->getOrientation());\n    }\n\n    public function testPageMargins(): void\n    {\n        $worksheet1 = new Worksheet();\n        $worksheet1->getPageMargins()->setLeft(0.75);\n        $pageMargins = clone $worksheet1->getPageMargins();\n        $worksheet2 = new Worksheet();\n        $worksheet2->setPageMargins($pageMargins);\n        self::assertSame(0.75, $worksheet2->getPageMargins()->getLeft());\n    }\n\n    public function testHeaderFooter(): void\n    {\n        $worksheet1 = new Worksheet();\n        $worksheet1->getHeaderFooter()->setDifferentOddEven(true);\n        $headerFooter = clone $worksheet1->getHeaderFooter();\n        $worksheet2 = new Worksheet();\n        $worksheet2->setHeaderFooter($headerFooter);\n        self::assertTrue($worksheet2->getHeaderFooter()->getDifferentOddEven());\n    }\n\n    public function testSheetView(): void\n    {\n        $worksheet1 = new Worksheet();\n        $worksheet1->getSheetView()->setView('pageLayout');\n        $sheetView = clone $worksheet1->getSheetView();\n        $worksheet2 = new Worksheet();\n        $worksheet2->setSheetView($sheetView);\n        self::assertSame('pageLayout', $worksheet2->getSheetView()->getView());\n    }\n\n    public function testProtection(): void\n    {\n        $worksheet1 = new Worksheet();\n        $worksheet1->getProtection()->setSpinCount(4321);\n        $protection = clone $worksheet1->getProtection();\n        $worksheet2 = new Worksheet();\n        $worksheet2->setProtection($protection);\n        self::assertSame(4321, $worksheet2->getProtection()->getSpinCount());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/WorksheetNamedRangesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WorksheetNamedRangesTest extends TestCase\n{\n    protected function getSpreadsheet(): Spreadsheet\n    {\n        $reader = new Xlsx();\n\n        return $reader->load('tests/data/Worksheet/namedRangeTest.xlsx');\n    }\n\n    public function testCellExists(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'GREETING';\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cellExists = $worksheet->cellExists($namedCell);\n        self::assertTrue($cellExists);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellExistsUtf8(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'Χαιρετισμός';\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cellExists = $worksheet->cellExists($namedCell);\n        self::assertTrue($cellExists);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellNotExists(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'GOODBYE';\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cellExists = $worksheet->cellExists($namedCell);\n        self::assertFalse($cellExists);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellExistsInvalidScope(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'Result';\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cellExists = $worksheet->cellExists($namedCell);\n        self::assertFalse($cellExists);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCellExistsRange(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedRange = 'Range1';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Cell coordinate string can not be a range of cells');\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->cellExists($namedRange);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCell(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'GREETING';\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cell = $worksheet->getCell($namedCell);\n        self::assertSame('Hello', $cell->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellUtf8(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'Χαιρετισμός';\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cell = $worksheet->getCell($namedCell);\n        self::assertSame('नमस्ते', $cell->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellNotExists(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'GOODBYE';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Invalid cell coordinate {$namedCell}\");\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell($namedCell);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellInvalidScope(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'Result';\n        $ucNamedCell = strtoupper($namedCell);\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Invalid cell coordinate {$ucNamedCell}\");\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell($namedCell);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellLocalScoped(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'Result';\n\n        $spreadsheet->setActiveSheetIndexByName('Sheet2');\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cell = $worksheet->getCell($namedCell);\n        self::assertSame(8, $cell->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellNamedFormula(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'Result';\n\n        $spreadsheet->setActiveSheetIndexByName('Sheet2');\n        $worksheet = $spreadsheet->getActiveSheet();\n        $cell = $worksheet->getCell($namedCell);\n        self::assertSame(8, $cell->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGetCellWithNamedRange(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedCell = 'Range1';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Cell coordinate string can not be a range of cells');\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell($namedCell);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNamedRangeToArray(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedRange = 'Range1';\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $rangeData = $worksheet->namedRangeToArray($namedRange);\n        self::assertSame([['1', '2', '3']], $rangeData);\n        $rangeData = $worksheet->namedRangeToArray($namedRange, null, true, false);\n        self::assertSame([[1, 2, 3]], $rangeData);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testInvalidNamedRangeToArray(): void\n    {\n        $spreadsheet = $this->getSpreadsheet();\n        $namedRange = 'Range2';\n\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage(\"Named Range {$namedRange} does not exist\");\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $rangeData = $worksheet->namedRangeToArray($namedRange);\n        self::assertSame([[1, 2, 3]], $rangeData);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/WorksheetParentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as SpException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WorksheetParentTest extends TestCase\n{\n    public function testNormal(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        self::assertSame($spreadsheet, $worksheet->getParent());\n        self::assertSame($spreadsheet, $worksheet->getParentOrThrow());\n    }\n\n    public function testGetParent(): void\n    {\n        $worksheet = new Worksheet();\n        self::assertNull($worksheet->getParent());\n    }\n\n    public function testGetParentOrThrow(): void\n    {\n        $this->expectException(SpException::class);\n        $this->expectExceptionMessage('Sheet does not have a parent');\n        $worksheet = new Worksheet();\n        $worksheet->getParentOrThrow();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Worksheet/WorksheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Worksheet;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellAddress;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\CellRange;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\CellIterator;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass WorksheetTest extends TestCase\n{\n    public function testSetTitle(): void\n    {\n        $testTitle = str_repeat('a', 31);\n\n        $worksheet = new Worksheet();\n        $worksheet->setTitle($testTitle);\n        self::assertSame($testTitle, $worksheet->getTitle());\n    }\n\n    public static function setTitleInvalidProvider(): array\n    {\n        return [\n            [str_repeat('a', 32), 'Maximum 31 characters allowed in sheet title.'],\n            ['invalid*title', 'Invalid character found in sheet title'],\n        ];\n    }\n\n    #[DataProvider('setTitleInvalidProvider')]\n    public function testSetTitleInvalid(string $title, string $expectMessage): void\n    {\n        // First, test setting title with validation disabled -- should be successful\n        $worksheet = new Worksheet();\n        $worksheet->setTitle($title, true, false);\n\n        // Next, test again with validation enabled -- this time we should fail\n        $worksheet = new Worksheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage($expectMessage);\n        $worksheet->setTitle($title);\n    }\n\n    public function testSetTitleDuplicate(): void\n    {\n        // Create a Spreadsheet with three Worksheets (the first is created automatically)\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->createSheet();\n        $spreadsheet->createSheet();\n\n        // Set unique title -- should be unchanged\n        $sheet = $spreadsheet->getSheet(0);\n        $sheet->setTitle('Test Title');\n        self::assertSame('Test Title', $sheet->getTitle());\n\n        // Set duplicate title -- should have numeric suffix appended\n        $sheet = $spreadsheet->getSheet(1);\n        $sheet->setTitle('Test Title');\n        self::assertSame('Test Title 1', $sheet->getTitle());\n\n        // Set duplicate title with validation disabled -- should be unchanged\n        $sheet = $spreadsheet->getSheet(2);\n        $sheet->setTitle('Test Title', true, false);\n        self::assertSame('Test Title', $sheet->getTitle());\n    }\n\n    public function testSetCodeName(): void\n    {\n        $testCodeName = str_repeat('a', 31);\n\n        $worksheet = new Worksheet();\n        $worksheet->setCodeName($testCodeName);\n        self::assertSame($testCodeName, $worksheet->getCodeName());\n    }\n\n    public static function setCodeNameInvalidProvider(): array\n    {\n        return [\n            [str_repeat('a', 32), 'Maximum 31 characters allowed in sheet code name.'],\n            ['invalid*code*name', 'Invalid character found in sheet code name'],\n            ['', 'Sheet code name cannot be empty'],\n        ];\n    }\n\n    #[DataProvider('setCodeNameInvalidProvider')]\n    public function testSetCodeNameInvalid(string $codeName, string $expectMessage): void\n    {\n        // First, test setting code name with validation disabled -- should be successful\n        $worksheet = new Worksheet();\n        $worksheet->setCodeName($codeName, false);\n\n        // Next, test again with validation enabled -- this time we should fail\n        $worksheet = new Worksheet();\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage($expectMessage);\n        $worksheet->setCodeName($codeName);\n    }\n\n    public function testSetCodeNameDuplicate(): void\n    {\n        // Create a Spreadsheet with three Worksheets (the first is created automatically)\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->createSheet();\n        $spreadsheet->createSheet();\n\n        // Set unique code name -- should be massaged to Snake_Case\n        $sheet = $spreadsheet->getSheet(0);\n        $sheet->setCodeName('Test Code Name');\n        self::assertSame('Test_Code_Name', $sheet->getCodeName());\n\n        // Set duplicate code name -- should be massaged and have numeric suffix appended\n        $sheet = $spreadsheet->getSheet(1);\n        $sheet->setCodeName('Test Code Name');\n        self::assertSame('Test_Code_Name_1', $sheet->getCodeName());\n\n        // Set duplicate code name with validation disabled -- should be unchanged, and unmassaged\n        $sheet = $spreadsheet->getSheet(2);\n        $sheet->setCodeName('Test Code Name', false);\n        self::assertSame('Test Code Name', $sheet->getCodeName());\n    }\n\n    public function testFreezePaneSelectedCell(): void\n    {\n        $worksheet = new Worksheet();\n        $worksheet->freezePane('B2');\n        self::assertSame('B2', $worksheet->getTopLeftCell());\n    }\n\n    public static function extractSheetTitleProvider(): array\n    {\n        return [\n            ['B2', '', '', 'B2'],\n            ['testTitle!B2', 'testTitle', 'B2', 'B2'],\n            ['test!Title!B2', 'test!Title', 'B2', 'B2'],\n            ['test Title!B2', 'test Title', 'B2', 'B2'],\n            ['test!Title!B2', 'test!Title', 'B2', 'B2'],\n            [\"'testSheet 1'!A3\", \"'testSheet 1'\", 'A3', 'A3'],\n            [\"'testSheet1'!A2\", \"'testSheet1'\", 'A2', 'A2'],\n            [\"'testSheet 2'!A1\", \"'testSheet 2'\", 'A1', 'A1'],\n        ];\n    }\n\n    #[DataProvider('extractSheetTitleProvider')]\n    public function testExtractSheetTitle(string $range, string $expectTitle, string $expectCell, string $expectCell2): void\n    {\n        // only cell reference\n        self::assertSame($expectCell, Worksheet::extractSheetTitle($range));\n        // with title in array\n        $arRange = Worksheet::extractSheetTitle($range, true);\n        self::assertSame($expectTitle, $arRange[0]);\n        self::assertSame($expectCell2, $arRange[1]);\n    }\n\n    /**\n     * Fix https://github.com/PHPOffice/PhpSpreadsheet/issues/868 when cells are not removed correctly\n     * on row deletion.\n     */\n    public function testRemoveCellsCorrectlyWhenRemovingRow(): void\n    {\n        $workbook = new Spreadsheet();\n        $worksheet = $workbook->getActiveSheet();\n        $worksheet->getCell('A2')->setValue('A2');\n        $worksheet->getCell('C1')->setValue('C1');\n        $worksheet->removeRow(1);\n        self::assertEquals(\n            'A2',\n            $worksheet->getCell('A1')->getValue()\n        );\n        self::assertNull(\n            $worksheet->getCell('C1')->getValue()\n        );\n    }\n\n    public static function removeColumnProvider(): array\n    {\n        return [\n            'Remove first column' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                ],\n                'A',\n                1,\n                [\n                    ['B1', 'C1'],\n                    ['B2', 'C2'],\n                ],\n                'B',\n            ],\n            'Remove middle column' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                ],\n                'B',\n                1,\n                [\n                    ['A1', 'C1'],\n                    ['A2', 'C2'],\n                ],\n                'B',\n            ],\n            'Remove last column' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                ],\n                'C',\n                1,\n                [\n                    ['A1', 'B1'],\n                    ['A2', 'B2'],\n                ],\n                'B',\n            ],\n            'Remove a column out of range' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                ],\n                'D',\n                1,\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                ],\n                'C',\n            ],\n            'Remove multiple columns' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                ],\n                'B',\n                5,\n                [\n                    ['A1'],\n                    ['A2'],\n                ],\n                'A',\n            ],\n            'Data includes nulls' => [\n                [\n                    ['A1', 'B1', 'C1', 'D1', 'E1'],\n                    [null, 'B2', 'C2', 'D2', 'E2'],\n                    ['A3', null, 'C3', 'D3', 'E3'],\n                    ['A4', 'B4', null, 'D4', 'E4'],\n                    ['A5', 'B5', 'C5', null, 'E5'],\n                    ['A6', 'B6', 'C6', 'D6', null],\n                ],\n                'B',\n                2,\n                [\n                    ['A1', 'D1', 'E1'],\n                    [null, 'D2', 'E2'],\n                    ['A3', 'D3', 'E3'],\n                    ['A4', 'D4', 'E4'],\n                    ['A5', null, 'E5'],\n                    ['A6', 'D6', null],\n                ],\n                'C',\n            ],\n        ];\n    }\n\n    /**\n     * @param mixed[] $initialData\n     * @param mixed[] $expectedData\n     */\n    #[DataProvider('removeColumnProvider')]\n    public function testRemoveColumn(\n        array $initialData,\n        string $columnToBeRemoved,\n        int $columnsToBeRemoved,\n        array $expectedData,\n        string $expectedHighestColumn\n    ): void {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray($initialData);\n\n        $worksheet->removeColumn($columnToBeRemoved, $columnsToBeRemoved);\n\n        self::assertSame($expectedHighestColumn, $worksheet->getHighestColumn());\n        self::assertSame($expectedData, $worksheet->toArray());\n    }\n\n    public static function removeRowsProvider(): array\n    {\n        return [\n            'Remove all rows except first one' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                2,\n                3,\n                [\n                    ['A1', 'B1', 'C1'],\n                ],\n                1,\n            ],\n            'Remove all rows except last one' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                1,\n                3,\n                [\n                    ['A4', 'B4', 'C4'],\n                ],\n                1,\n            ],\n            'Remove last row' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                4,\n                1,\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                ],\n                3,\n            ],\n            'Remove first row' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                1,\n                1,\n                [\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                3,\n            ],\n            'Remove all rows except first and last' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                2,\n                2,\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                2,\n            ],\n            'Remove non existing rows' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                2,\n                10,\n                [\n                    ['A1', 'B1', 'C1'],\n                ],\n                1,\n            ],\n            'Remove only non existing rows' => [\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                5,\n                10,\n                [\n                    ['A1', 'B1', 'C1'],\n                    ['A2', 'B2', 'C2'],\n                    ['A3', 'B3', 'C3'],\n                    ['A4', 'B4', 'C4'],\n                ],\n                4,\n            ],\n            'Data includes nulls' => [\n                [\n                    ['A1', 'B1', 'C1', 'D1', 'E1'],\n                    [null, 'B2', 'C2', 'D2', 'E2'],\n                    ['A3', null, 'C3', 'D3', 'E3'],\n                    ['A4', 'B4', null, 'D4', 'E4'],\n                    ['A5', 'B5', 'C5', null, 'E5'],\n                    ['A6', 'B6', 'C6', 'D6', null],\n                ],\n                1,\n                2,\n                [\n                    ['A3', null, 'C3', 'D3', 'E3'],\n                    ['A4', 'B4', null, 'D4', 'E4'],\n                    ['A5', 'B5', 'C5', null, 'E5'],\n                    ['A6', 'B6', 'C6', 'D6', null],\n                ],\n                4,\n            ],\n        ];\n    }\n\n    /**\n     * @param mixed[] $initialData\n     * @param mixed[] $expectedData\n     */\n    #[DataProvider('removeRowsProvider')]\n    public function testRemoveRows(\n        array $initialData,\n        int $rowToRemove,\n        int $rowsQtyToRemove,\n        array $expectedData,\n        int $expectedHighestRow\n    ): void {\n        $workbook = new Spreadsheet();\n        $worksheet = $workbook->getActiveSheet();\n        $worksheet->fromArray($initialData);\n\n        $worksheet->removeRow($rowToRemove, $rowsQtyToRemove);\n\n        self::assertSame($expectedData, $worksheet->toArray());\n        self::assertSame($expectedHighestRow, $worksheet->getHighestRow());\n    }\n\n    private static function getPopulatedSheetForEmptyRowTest(Spreadsheet $spreadsheet): Worksheet\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValueExplicit('A1', 'Hello World', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B3', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('B4', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B5', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('C5', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B6', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('C6', 'PHP', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B7', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('C7', 'PHP', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('B8', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('C8', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('D8', 'PHP', DataType::TYPE_STRING);\n\n        return $sheet;\n    }\n\n    private static function getPopulatedSheetForEmptyColumnTest(Spreadsheet $spreadsheet): Worksheet\n    {\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValueExplicit('A1', 'Hello World', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('C2', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('D2', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('E2', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('E3', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('F2', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('F3', 'PHP', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('G2', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('G3', 'PHP', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('H2', null, DataType::TYPE_NULL);\n        $sheet->setCellValueExplicit('H3', '', DataType::TYPE_STRING);\n        $sheet->setCellValueExplicit('H4', 'PHP', DataType::TYPE_STRING);\n\n        return $sheet;\n    }\n\n    #[DataProvider('emptyRowProvider')]\n    public function testIsEmptyRow(int $rowId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheetForEmptyRowTest($spreadsheet);\n\n        $isEmpty = $sheet->isEmptyRow($rowId, CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL | CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL);\n\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyRowProvider(): array\n    {\n        return [\n            [1, false],\n            [2, true],\n            [3, true],\n            [4, true],\n            [5, true],\n            [6, false],\n            [7, false],\n            [8, false],\n            [9, true],\n        ];\n    }\n\n    #[DataProvider('emptyColumnProvider')]\n    public function testIsEmptyColumn(string $columnId, bool $expectedEmpty): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = self::getPopulatedSheetForEmptyColumnTest($spreadsheet);\n\n        $isEmpty = $sheet->isEmptyColumn($columnId, CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL | CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL);\n\n        self::assertSame($expectedEmpty, $isEmpty);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function emptyColumnProvider(): array\n    {\n        return [\n            ['A', false],\n            ['B', true],\n            ['C', true],\n            ['D', true],\n            ['E', true],\n            ['F', false],\n            ['G', false],\n            ['H', false],\n            ['I', true],\n        ];\n    }\n\n    public function testGetTableNames(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load('tests/data/Worksheet/Table/TableFormulae.xlsx');\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $tables = $worksheet->getTableNames();\n        self::assertSame(['DeptSales'], $tables);\n    }\n\n    public function testGetTableByName(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load('tests/data/Worksheet/Table/TableFormulae.xlsx');\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $table = $worksheet->getTableByName('Non-existent Table');\n        self::assertNull($table);\n\n        $table = $worksheet->getTableByName('DeptSales');\n        self::assertInstanceOf(Table::class, $table);\n    }\n\n    /**\n     * @param mixed[] $initialData\n     * @param int[] $hiddenRows\n     * @param mixed[] $expectedData\n     */\n    #[DataProvider('toArrayHiddenRowsProvider')]\n    public function testHiddenRows(\n        array $initialData,\n        array $hiddenRows,\n        array $expectedData\n    ): void {\n        $workbook = new Spreadsheet();\n        $worksheet = $workbook->getActiveSheet();\n        $worksheet->fromArray($initialData);\n\n        foreach ($hiddenRows as $hiddenRow) {\n            $worksheet\n                ->getRowDimension($hiddenRow)\n                ->setVisible(false);\n        }\n\n        self::assertSame($expectedData, $worksheet->toArray(null, false, false, true, true));\n    }\n\n    public static function toArrayHiddenRowsProvider(): array\n    {\n        return [\n            [\n                [[1], [2], [3], [4], [5], [6]],\n                [2, 3, 5],\n                [1 => ['A' => 1], 4 => ['A' => 4], 6 => ['A' => 6]],\n            ],\n            [\n                [[1], [2], [3], [4], [5], [6]],\n                [1, 3, 6],\n                [2 => ['A' => 2], 4 => ['A' => 4], 5 => ['A' => 5]],\n            ],\n        ];\n    }\n\n    /**\n     * @param mixed[] $initialData\n     * @param string[] $hiddenColumns\n     * @param mixed[] $expectedData\n     */\n    #[DataProvider('toArrayHiddenColumnsProvider')]\n    public function testHiddenColumns(\n        array $initialData,\n        array $hiddenColumns,\n        array $expectedData\n    ): void {\n        $workbook = new Spreadsheet();\n        $worksheet = $workbook->getActiveSheet();\n        $worksheet->fromArray($initialData);\n\n        foreach ($hiddenColumns as $hiddenColumn) {\n            $worksheet\n                ->getColumnDimension($hiddenColumn)\n                ->setVisible(false);\n        }\n\n        self::assertSame($expectedData, $worksheet->toArray(null, false, false, true, true));\n    }\n\n    public static function toArrayHiddenColumnsProvider(): array\n    {\n        return [\n            [\n                ['A', 'B', 'C', 'D', 'E', 'F'],\n                ['B', 'C', 'E'],\n                [1 => ['A' => 'A', 'D' => 'D', 'F' => 'F']],\n            ],\n            [\n                ['A', 'B', 'C', 'D', 'E', 'F'],\n                ['A', 'C', 'F'],\n                [1 => ['B' => 'B', 'D' => 'D', 'E' => 'E']],\n            ],\n        ];\n    }\n\n    /** @param mixed[] $expected */\n    #[DataProvider('rangeToArrayProvider')]\n    public function testRangeToArrayWithCellRangeObject(array $expected, string $fromCell, string $toCell): void\n    {\n        $initialData = array_chunk(range('A', 'Y'), 5);\n\n        $workbook = new Spreadsheet();\n        $worksheet = $workbook->getActiveSheet();\n        $worksheet->fromArray($initialData);\n\n        $cellRange = new CellRange(new CellAddress($fromCell), new CellAddress($toCell));\n\n        self::assertSame($expected, $worksheet->rangeToArray((string) $cellRange));\n    }\n\n    public static function rangeToArrayProvider(): array\n    {\n        return [\n            [\n                [['A', 'B'], ['F', 'G']],\n                'A1', 'B2',\n            ],\n            [\n                [['G', 'H', 'I'], ['L', 'M', 'N'], ['Q', 'R', 'S']],\n                'B2', 'D4',\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Csv/CsvArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass CsvArrayTest extends AbstractFunctional\n{\n    public function testArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(1);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('B1')->setValue('=UNIQUE(A1:A3)');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Csv');\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertEquals('1', $sheet->getCell('A1')->getValue());\n        self::assertEquals('1', $sheet->getCell('A2')->getValue());\n        self::assertEquals('3', $sheet->getCell('A3')->getValue());\n        self::assertEquals('1', $sheet->getCell('B1')->getValue());\n        self::assertEquals('3', $sheet->getCell('B2')->getValue());\n        self::assertNull($sheet->getCell('B3')->getValue());\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testInlineArrays(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=UNIQUE({1;1;2;1;3;2;4;4;4})');\n        $sheet->getCell('D1')->setValue('=UNIQUE({1,1,2,1,3,2,4,4,4},true)');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Csv');\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $expected = [\n            ['1', null, null, '1', '2', '3', '4'],\n            ['2', null, null, null, null, null, null],\n            ['3', null, null, null, null, null, null],\n            ['4', null, null, null, null, null, null],\n        ];\n        self::assertSame($expected, $sheet->toArray());\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Csv/CsvEnclosureTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv as CsvReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv as CsvWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass CsvEnclosureTest extends Functional\\AbstractFunctional\n{\n    private const CELL_VALUES = [\n        'A1' => '2020-06-03',\n        'B1' => '000123',\n        'C1' => '06.53',\n        'D1' => 14.22,\n        'A2' => '2020-06-04',\n        'B2' => '000234',\n        'C2' => '07.12',\n        'D2' => '15.44',\n    ];\n\n    private static function getFileData(string $filename): string\n    {\n        return file_get_contents($filename) ?: '';\n    }\n\n    public function testNormalEnclosure(): void\n    {\n        $delimiter = ';';\n        $enclosure = '\"';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        foreach (self::CELL_VALUES as $key => $value) {\n            $sheet->setCellValue($key, $value);\n        }\n        $writer = new CsvWriter($spreadsheet);\n        $writer->setDelimiter($delimiter);\n        $writer->setEnclosure($enclosure);\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $filedata = self::getFileData($filename);\n        $filedata = preg_replace('/\\r?\\n/', $delimiter, $filedata);\n        $reader = new CsvReader();\n        $reader->setDelimiter($delimiter);\n        $reader->setEnclosure($enclosure);\n        $newspreadsheet = $reader->load($filename);\n        unlink($filename);\n        $sheet = $newspreadsheet->getActiveSheet();\n        $expected = '';\n        foreach (self::CELL_VALUES as $key => $value) {\n            self::assertEquals($value, $sheet->getCell($key)->getValue());\n            $expected .= \"$enclosure$value$enclosure$delimiter\";\n        }\n        self::assertEquals($expected, $filedata);\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n\n    public function testNoEnclosure(): void\n    {\n        $delimiter = ';';\n        $enclosure = '';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        foreach (self::CELL_VALUES as $key => $value) {\n            $sheet->setCellValue($key, $value);\n        }\n        $writer = new CsvWriter($spreadsheet);\n        $writer->setDelimiter($delimiter);\n        $writer->setEnclosure($enclosure);\n        self::assertEquals('', $writer->getEnclosure());\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $filedata = self::getFileData($filename);\n        $filedata = preg_replace('/\\r?\\n/', $delimiter, $filedata);\n        $reader = new CsvReader();\n        $reader->setDelimiter($delimiter);\n        $reader->setEnclosure($enclosure);\n        self::assertEquals('\"', $reader->getEnclosure());\n        $newspreadsheet = $reader->load($filename);\n        unlink($filename);\n        $sheet = $newspreadsheet->getActiveSheet();\n        $expected = '';\n        foreach (self::CELL_VALUES as $key => $value) {\n            self::assertEquals($value, $sheet->getCell($key)->getValue());\n            $expected .= \"$enclosure$value$enclosure$delimiter\";\n        }\n        self::assertEquals($expected, $filedata);\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n\n    public function testNotRequiredEnclosure1(): void\n    {\n        $delimiter = ';';\n        $enclosure = '\"';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        foreach (self::CELL_VALUES as $key => $value) {\n            $sheet->setCellValue($key, $value);\n        }\n        $writer = new CsvWriter($spreadsheet);\n        self::assertTrue($writer->getEnclosureRequired());\n        $writer->setEnclosureRequired(false)->setDelimiter($delimiter)->setEnclosure($enclosure);\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $filedata = self::getFileData($filename);\n        $filedata = preg_replace('/\\r?\\n/', $delimiter, $filedata);\n        $reader = new CsvReader();\n        $reader->setDelimiter($delimiter);\n        $reader->setEnclosure($enclosure);\n        $newspreadsheet = $reader->load($filename);\n        unlink($filename);\n        $sheet = $newspreadsheet->getActiveSheet();\n        $expected = '';\n        foreach (self::CELL_VALUES as $key => $value) {\n            self::assertEquals($value, $sheet->getCell($key)->getValue());\n            $expected .= \"$value$delimiter\";\n        }\n        self::assertEquals($expected, $filedata);\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n\n    public function testNotRequiredEnclosure2(): void\n    {\n        $cellValues2 = [\n            'A1' => '2020-06-03',\n            'B1' => 'has,separator',\n            'C1' => 'has;non-separator',\n            'D1' => 'has\"enclosure',\n            'A2' => 'has space',\n            'B2' => \"has\\nnewline\",\n            'C2' => '',\n            'D2' => 15.44,\n            'A3' => ' leadingspace',\n            'B3' => 'trailingspace ',\n            'C3' => '=D2*2',\n            'D3' => ',leadingcomma',\n            'A4' => 'trailingquote\"',\n            'B4' => 'unused',\n            'C4' => 'unused',\n            'D4' => 'unused',\n            'A5' => false,\n            'B5' => true,\n            'C5' => null,\n            'D5' => 0,\n        ];\n        $calcc3 = '30.88';\n        $expected1 = '2020-06-03,\"has,separator\",has;non-separator,\"has\"\"enclosure\"';\n        $expected2 = 'has space,\"has' . \"\\n\" . 'newline\",,15.44';\n        $expected3 = ' leadingspace,trailingspace ,' . $calcc3 . ',\",leadingcomma\"';\n        $expected4 = '\"trailingquote\"\"\",unused,unused,unused';\n        $expected5 = 'FALSE,TRUE,,0';\n        $expectedfile = \"$expected1\\n$expected2\\n$expected3\\n$expected4\\n$expected5\\n\";\n        $delimiter = ',';\n        $enclosure = '\"';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        foreach ($cellValues2 as $key => $value) {\n            $sheet->setCellValue($key, $value);\n        }\n        $writer = new CsvWriter($spreadsheet);\n        self::assertTrue($writer->getEnclosureRequired());\n        $writer->setEnclosureRequired(false)->setDelimiter($delimiter)->setEnclosure($enclosure);\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $filedata = self::getFileData($filename);\n        $filedata = preg_replace('/\\r/', '', $filedata);\n        $reader = new CsvReader();\n        $reader->setDelimiter($delimiter);\n        $reader->setEnclosure($enclosure);\n        $newspreadsheet = $reader->load($filename);\n        unlink($filename);\n        $sheet = $newspreadsheet->getActiveSheet();\n        foreach ($cellValues2 as $key => $value) {\n            self::assertEquals(($key === 'C3') ? $calcc3 : $value, $sheet->getCell($key)->getValue(), \"Failure for cell $key\");\n        }\n        self::assertEquals($expectedfile, $filedata);\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n\n    public function testRequiredEnclosure2(): void\n    {\n        $cellValues2 = [\n            'A1' => '2020-06-03',\n            'B1' => 'has,separator',\n            'C1' => 'has;non-separator',\n            'D1' => 'has\"enclosure',\n            'A2' => 'has space',\n            'B2' => \"has\\nnewline\",\n            'C2' => '',\n            'D2' => 15.44,\n            'A3' => ' leadingspace',\n            'B3' => 'trailingspace ',\n            'C3' => '=D2*2',\n            'D3' => ',leadingcomma',\n            'A4' => 'trailingquote\"',\n            'B4' => 'unused',\n            'C4' => 'unused',\n            'D4' => 'unused',\n            'A5' => false,\n            'B5' => true,\n            'C5' => null,\n            'D5' => 0,\n        ];\n        $calcc3 = '30.88';\n        $expected1 = '\"2020-06-03\",\"has,separator\",\"has;non-separator\",\"has\"\"enclosure\"';\n        $expected2 = '\"has space\",\"has' . \"\\n\" . 'newline\",\"\",\"15.44\"';\n        $expected3 = '\" leadingspace\",\"trailingspace \",\"' . $calcc3 . '\",\",leadingcomma\"';\n        $expected4 = '\"trailingquote\"\"\",\"unused\",\"unused\",\"unused\"';\n        $expected5 = '\"FALSE\",\"TRUE\",\"\",\"0\"';\n        $expectedfile = \"$expected1\\n$expected2\\n$expected3\\n$expected4\\n$expected5\\n\";\n        $delimiter = ',';\n        $enclosure = '\"';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        foreach ($cellValues2 as $key => $value) {\n            $sheet->setCellValue($key, $value);\n        }\n        $writer = new CsvWriter($spreadsheet);\n        self::assertTrue($writer->getEnclosureRequired());\n        $writer->setEnclosureRequired(true)->setDelimiter($delimiter)->setEnclosure($enclosure);\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $filedata = self::getFileData($filename);\n        $filedata = preg_replace('/\\r/', '', $filedata);\n        $reader = new CsvReader();\n        $reader->setDelimiter($delimiter);\n        $reader->setEnclosure($enclosure);\n        $newspreadsheet = $reader->load($filename);\n        unlink($filename);\n        $sheet = $newspreadsheet->getActiveSheet();\n        foreach ($cellValues2 as $key => $value) {\n            self::assertEquals(($key === 'C3') ? $calcc3 : $value, $sheet->getCell($key)->getValue(), \"Failure for cell $key\");\n        }\n        self::assertEquals($expectedfile, $filedata);\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n\n    public function testGoodReread(): void\n    {\n        $delimiter = ',';\n        $enclosure = '\"';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '1');\n        $sheet->setCellValue('B1', '2,3');\n        $sheet->setCellValue('C1', '4');\n        $writer = new CsvWriter($spreadsheet);\n        $writer->setEnclosureRequired(false)->setDelimiter($delimiter)->setEnclosure($enclosure);\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $reader = new CsvReader();\n        $reader->setDelimiter($delimiter);\n        $reader->setEnclosure($enclosure);\n        $newspreadsheet = $reader->load($filename);\n        unlink($filename);\n        $sheet = $newspreadsheet->getActiveSheet();\n        self::assertEquals('1', $sheet->getCell('A1')->getValue());\n        self::assertEquals('2,3', $sheet->getCell('B1')->getValue());\n        self::assertEquals('4', $sheet->getCell('C1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n\n    public function testBadReread(): void\n    {\n        $delimiter = ',';\n        $enclosure = '';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '1');\n        $sheet->setCellValue('B1', '2,3');\n        $sheet->setCellValue('C1', '4');\n        $writer = new CsvWriter($spreadsheet);\n        $writer->setDelimiter($delimiter)->setEnclosure($enclosure);\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $reader = new CsvReader();\n        $reader->setDelimiter($delimiter);\n        $reader->setEnclosure($enclosure);\n        $newspreadsheet = $reader->load($filename);\n        unlink($filename);\n        $sheet = $newspreadsheet->getActiveSheet();\n        self::assertEquals('1', $sheet->getCell('A1')->getValue());\n        self::assertEquals('2', $sheet->getCell('B1')->getValue());\n        self::assertEquals('3', $sheet->getCell('C1')->getValue());\n        self::assertEquals('4', $sheet->getCell('D1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n        $newspreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Csv/CsvExcelCompatibilityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv as CsvReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv as CsvWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass CsvExcelCompatibilityTest extends Functional\\AbstractFunctional\n{\n    // Excel seems to have changed with how they handle this.\n    // In particular, it does not recognize UTF-8 non-ASCII characters\n    //    if a file is written with ExcelCompatibility on.\n    //    The initial 'sep=;' line seems to confuse it, even though\n    //    it has a BOM. The Unix \"file\" command also indicates a difference\n    //    when the sep line is or is not included:\n    //        UTF-8 Unicode (with BOM) text, with CRLF line terminators\n    //     vs CSV text (without sep line, with or without BOM)\n    // So, this test has no UTF-8 yet while more research is conducted.\n    public function testExcelCompatibility(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '1');\n        $sheet->setCellValue('B1', '2');\n        $sheet->setCellValue('C1', '3');\n        $sheet->setCellValue('A2', '4');\n        $sheet->setCellValue('B2', '5');\n        $sheet->setCellValue('C2', '6');\n        $writer = new CsvWriter($spreadsheet);\n        $writer->setExcelCompatibility(true);\n        self::assertSame('', $writer->getOutputEncoding());\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $reader = new CsvReader();\n        $spreadsheet2 = $reader->load($filename);\n        $contents = file_get_contents($filename);\n        unlink($filename);\n        self::assertEquals(1, $spreadsheet2->getActiveSheet()->getCell('A1')->getValue());\n        self::assertEquals(6, $spreadsheet2->getActiveSheet()->getCell('C2')->getValue());\n        self::assertStringContainsString(CsvReader::UTF8_BOM, $contents);\n        self::assertStringContainsString(\"\\r\\n\", $contents);\n        self::assertStringContainsString('sep=;', $contents);\n        self::assertStringContainsString('\"1\";\"2\";\"3\"', $contents);\n        self::assertStringContainsString('\"4\";\"5\";\"6\"', $contents);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Csv/CsvOutputEncodingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv as CsvWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass CsvOutputEncodingTest extends Functional\\AbstractFunctional\n{\n    public function testEncoding(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'こんにちは！');\n        $sheet->setCellValue('B1', 'Hello!');\n\n        $writer = new CsvWriter($spreadsheet);\n\n        $filename = File::temporaryFilename();\n        $writer->setUseBOM(false);\n        $writer->setOutputEncoding('SJIS-win');\n        $writer->save($filename);\n        $contents = file_get_contents($filename);\n        unlink($filename);\n\n        // self::assertStringContainsString(mb_convert_encoding('こんにちは！', 'SJIS-win'), $contents);\n        self::assertStringContainsString(\"\\x82\\xb1\\x82\\xf1\\x82\\xc9\\x82\\xbf\\x82\\xcd\\x81\\x49\", $contents);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Csv/CsvWriteTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Csv as CsvReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv as CsvWriter;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass CsvWriteTest extends Functional\\AbstractFunctional\n{\n    public function testNotFirstSheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'First Sheet');\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setCellValue('A1', 'Second Sheet');\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setCellValue('A1', 'Third Sheet');\n        $writer = new CsvWriter($spreadsheet);\n        $writer->setSheetIndex(1);\n        self::assertEquals(1, $writer->getSheetIndex());\n        $filename = File::temporaryFilename();\n        $writer->save($filename);\n        $reader = new CsvReader();\n        $newspreadsheet = $reader->load($filename);\n        unlink($filename);\n        $sheet = $newspreadsheet->getActiveSheet();\n        self::assertEquals('Second Sheet', $sheet->getCell('A1')->getValue());\n        self::assertEquals(0, $newspreadsheet->getActiveSheetIndex());\n    }\n\n    public function testWriteEmptyFileName(): void\n    {\n        $this->expectException(WriterException::class);\n        $spreadsheet = new Spreadsheet();\n        $writer = new CsvWriter($spreadsheet);\n        $filename = '';\n        $writer->save($filename);\n    }\n\n    public function testDefaultSettings(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $writer = new CsvWriter($spreadsheet);\n        self::assertEquals('\"', $writer->getEnclosure());\n        $writer->setEnclosure('\\'');\n        self::assertEquals('\\'', $writer->getEnclosure());\n        $writer->setEnclosure('');\n        self::assertEquals('', $writer->getEnclosure());\n        $writer->setEnclosure();\n        self::assertEquals('\"', $writer->getEnclosure());\n        self::assertEquals(PHP_EOL, $writer->getLineEnding());\n        self::assertFalse($writer->getUseBOM());\n        self::assertFalse($writer->getIncludeSeparatorLine());\n        self::assertFalse($writer->getExcelCompatibility());\n        self::assertEquals(0, $writer->getSheetIndex());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Csv/HyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HyperlinkTest extends TestCase\n{\n    public function testVariableColumns(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 3);\n        $sheet->setCellValue('B1', 4);\n        $sheet->setCellValue('C1', 5);\n        $sheet->setCellValue('A2', 6);\n        $sheet->setCellValue('B2', 'hyperlink');\n        $sheet->getCell('B2')->getHyperlink()\n            ->setUrl('http://www.example.com');\n        $sheet->setCellValue('C2', 8);\n\n        $fh = fopen('php://memory', 'r+b');\n        self::assertNotFalse($fh);\n        $writer = new Csv($spreadsheet);\n        self::assertFalse($writer->getPreferHyperlinkToLabel());\n        $writer->setEnclosureRequired(false)->setLineEnding(\"\\n\");\n        $writer->save($fh);\n        rewind($fh);\n        self::assertSame(\n            \"3,4,5\\n6,hyperlink,8\\n\",\n            stream_get_contents($fh)\n        );\n\n        rewind($fh);\n        $writer->setPreferHyperlinkToLabel(true);\n        $writer->save($fh);\n        rewind($fh);\n        self::assertSame(\n            \"3,4,5\\n6,http://www.example.com,8\\n\",\n            stream_get_contents($fh)\n        );\n        fclose($fh);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Csv/VariableColumnsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Csv;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Csv;\nuse PHPUnit\\Framework\\TestCase;\n\nclass VariableColumnsTest extends TestCase\n{\n    public function testVariableColumns(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                [1, 2, 3, 4],\n                [1, 2],\n                [1, 2, 3, 4, 5],\n                [],\n                [1],\n                [1, 2, 3],\n            ]\n        );\n\n        $filename = File::temporaryFilename();\n        $writer = new Csv($spreadsheet);\n        $writer->setVariableColumns(true);\n        $writer->save($filename);\n\n        $contents = (string) file_get_contents($filename);\n        unlink($filename);\n        $spreadsheet->disconnectWorksheets();\n\n        $rows = explode(PHP_EOL, $contents);\n\n        self::assertSame('\"1\",\"2\",\"3\",\"4\"', $rows[0]);\n        self::assertSame('\"1\",\"2\"', $rows[1]);\n        self::assertSame('\"1\",\"2\",\"3\",\"4\",\"5\"', $rows[2]);\n        self::assertSame('', $rows[3]);\n        self::assertSame('\"1\"', $rows[4]);\n        self::assertSame('\"1\",\"2\",\"3\"', $rows[5]);\n    }\n\n    public function testFixedColumns(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                [1, 2, 3, 4],\n                [1, 2],\n                [1, 2, 3, 4, 5],\n                [],\n                [1],\n                [1, 2, 3],\n            ]\n        );\n\n        $filename = File::temporaryFilename();\n        $writer = new Csv($spreadsheet);\n        self::assertFalse($writer->getVariableColumns());\n        $writer->save($filename);\n\n        $contents = (string) file_get_contents($filename);\n        unlink($filename);\n        $spreadsheet->disconnectWorksheets();\n\n        $rows = explode(PHP_EOL, $contents);\n\n        self::assertSame('\"1\",\"2\",\"3\",\"4\",\"\"', $rows[0]);\n        self::assertSame('\"1\",\"2\",\"\",\"\",\"\"', $rows[1]);\n        self::assertSame('\"1\",\"2\",\"3\",\"4\",\"5\"', $rows[2]);\n        self::assertSame('\"\",\"\",\"\",\"\",\"\"', $rows[3]);\n        self::assertSame('\"1\",\"\",\"\",\"\",\"\"', $rows[4]);\n        self::assertSame('\"1\",\"2\",\"3\",\"\",\"\"', $rows[5]);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Dompdf/GridlinesInlineTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Dompdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass GridlinesInlineTest extends TestCase\n{\n    public function testGridlinesInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setShowGridlines(false);\n        $sheet1->setPrintGridlines(false);\n        $sheet1->fromArray([\n            [11, 12, 13],\n            [14, 15, 16],\n        ]);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setShowGridlines(false);\n        $sheet2->setPrintGridlines(true);\n        $sheet2->fromArray([\n            [21, 22, 23],\n            [24, 25, 26],\n        ]);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setShowGridlines(true);\n        $sheet3->setPrintGridlines(false);\n        $sheet3->fromArray([\n            [31, 32, 33],\n            [34, 35, 36],\n        ]);\n        $sheet4 = $spreadsheet->createSheet();\n        $sheet4->setShowGridlines(true);\n        $sheet4->setPrintGridlines(true);\n        $sheet4->fromArray([\n            [41, 42, 43],\n            [44, 45, 46],\n        ]);\n\n        $writer = new Dompdf($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">11</td>',\n            $html,\n            'neither gridlines nor gridlinesp'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">21</td>',\n            $html,\n            'gridlinesp without gridlines'\n        );\n        self::assertStringContainsString(\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">31</td>',\n            $html,\n            'gridlines without gridlinesp'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">41</td>',\n            $html,\n            'gridlines and gridlinesp'\n        );\n        $count = substr_count($html, 'page-break-before');\n        self::assertSame(1, $count);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGridlinesCss(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setShowGridlines(false);\n        $sheet1->setPrintGridlines(false);\n        $sheet1->fromArray([\n            [11, 12, 13],\n            [14, 15, 16],\n        ]);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setShowGridlines(false);\n        $sheet2->setPrintGridlines(true);\n        $sheet2->fromArray([\n            [21, 22, 23],\n            [24, 25, 26],\n        ]);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setShowGridlines(true);\n        $sheet3->setPrintGridlines(false);\n        $sheet3->fromArray([\n            [31, 32, 33],\n            [34, 35, 36],\n        ]);\n        $sheet4 = $spreadsheet->createSheet();\n        $sheet4->setShowGridlines(true);\n        $sheet4->setPrintGridlines(true);\n        $sheet4->fromArray([\n            [41, 42, 43],\n            [44, 45, 46],\n        ]);\n\n        $writer = new Dompdf($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(false);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            \"<table id='sheet0' class='sheet0'>\",\n            $html,\n            'neither gridlines nor gridlinesp 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">11</td>',\n            $html,\n            'neither gridlines nor gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet1' class='sheet1 gridlines gridlinesp'>\",\n            $html,\n            'gridlinesp without gridlines 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">21</td>',\n            $html,\n            'gridlinesp without gridlines 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet2' class='sheet2'>\",\n            $html,\n            'gridlines without gridlinesp 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">31</td>',\n            $html,\n            'gridlines without gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet3' class='sheet3 gridlines gridlinesp'>\",\n            $html,\n            'gridlines and gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">41</td>',\n            $html,\n            'gridlines and gridlinesp 2'\n        );\n        $count = substr_count($html, 'page-break-before');\n        self::assertSame(1, $count);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Dompdf/HideMergeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Dompdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HideMergeTest extends TestCase\n{\n    public function testHideWithMerge(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        // just some labels for better visualisation of the problem\n        $worksheet->setCellValue('A1', 'A');\n        $worksheet->setCellValue('B1', 'B');\n        $worksheet->setCellValue('C1', 'C');\n        // setting the row height to better visualize the problem\n        for ($i = 1; $i <= 10; ++$i) {\n            $worksheet->getRowDimension($i)->setRowHeight(17);\n        }\n        // Headline - merged over two cells AND two rows\n        $worksheet->mergeCells('B2:C3');\n        $worksheet->setCellValue('B2', 'Hello World Headline');\n        $worksheet->getStyle('B2:C3')->getFont()->setBold(true);\n        $worksheet->getStyle('B2:C3')\n            ->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $worksheet->getStyle('B2:C3')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // Content 1 - merge over two rows\n        $worksheet->mergeCells('B4:B5');\n        $worksheet->mergeCells('C4:C5');\n        $worksheet->setCellValue('B4', 'Label 1');\n        $worksheet->setCellValue('C4', 'Text 1');\n        $worksheet->getStyle('B4:B5')->getFont()->setBold(true);\n        $worksheet->getStyle('B4:C5')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $worksheet->getStyle('B4:B5')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n        $worksheet->getStyle('C4:C5')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // Content 2 - merge over two rows\n        $worksheet->mergeCells('B6:B7');\n        $worksheet->mergeCells('C6:C7');\n        $worksheet->setCellValue('B6', 'Label 2');\n        $worksheet->setCellValue('C6', 'Text 2');\n        $worksheet->getStyle('B6:B7')->getFont()->setBold(true);\n        $worksheet->getStyle('B6:C7')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $worksheet->getStyle('B6:B7')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n        $worksheet->getStyle('C6:C7')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // This is where the error was introduced (!!!)\n        $worksheet->getColumnDimension('A')->setVisible(false);\n        $Dompdf = new Dompdf($spreadsheet);\n        $html = $Dompdf->generateHtmlAll();\n        $html = preg_replace('/^\\s+/m', '', $html) ?? $html;\n        $html = preg_replace('/[\\n\\r]/', '', $html) ?? $html;\n        self::assertStringContainsString(\n            'table.sheet0 .column0 { display:none }',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row0\">'\n                . '<td class=\"column0 style0 s\" style=\"width:42pt; height:17pt\">A</td>'\n                . '<td class=\"column1 style0 s\" style=\"width:42pt; height:17pt\">B</td>'\n                . '<td class=\"column2 style0 s\" style=\"width:42pt; height:17pt\">C</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row1\">'\n                . '<td class=\"column0 style0\" style=\"width:42pt; height:17pt\">&nbsp;</td>'\n                . '<td class=\"column1 style1 s style1\" colspan=\"2\" rowspan=\"2\" style=\"width:84pt; height:17pt\">Hello World Headline</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row2\">'\n                . '<td class=\"column0 style0\" style=\"width:42pt; height:17pt\">&nbsp;</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row3\">'\n                . '<td class=\"column0 style0\" style=\"width:42pt; height:17pt\">&nbsp;</td>'\n                . '<td class=\"column1 style2 s style2\" rowspan=\"2\" style=\"width:42pt; height:17pt\">Label 1</td>'\n                . '<td class=\"column2 style3 s style3\" rowspan=\"2\" style=\"width:42pt; height:17pt\">Text 1</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row4\">'\n                . '<td class=\"column0 style0\" style=\"width:42pt; height:17pt\">&nbsp;</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row5\">'\n                . '<td class=\"column0 style0\" style=\"width:42pt; height:17pt\">&nbsp;</td>'\n                . '<td class=\"column1 style2 s style2\" rowspan=\"2\" style=\"width:42pt; height:17pt\">Label 2</td>'\n                . '<td class=\"column2 style3 s style3\" rowspan=\"2\" style=\"width:42pt; height:17pt\">Text 2</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row6\">'\n                . '<td class=\"column0 style0\" style=\"width:42pt; height:17pt\">&nbsp;</td>'\n                . '</tr>',\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Dompdf/HideTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Dompdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HideTest extends TestCase\n{\n    public function testHide(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            ['a1', 'b1', 'c1', 'd1', 'e1', 'f1'],\n            ['a2', 'b2', 'c2', 'd2', 'e2', 'f2'],\n            ['a3', 'b3', 'c3', 'd3', 'e3', 'f3'],\n            ['a4', 'b4', 'c4', 'd4', 'e4', 'f4'],\n            ['a5', 'b5', 'c5', 'd5', 'e5', 'f5'],\n            ['a6', 'b6', 'c6', 'd6', 'e6', 'f6'],\n        ]);\n        $sheet->getColumnDimension('B')->setVisible(false);\n        $sheet->getRowDimension(3)->setVisible(false);\n        $writer = new Dompdf($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('table.sheet0 .column1 { display:none }', $html);\n        self::assertStringContainsString('table.sheet0 tr.row2 { display:none; visibility:hidden }', $html);\n        self::assertStringContainsString('.navigation {display: none;}', $html);\n        $count = substr_count($html, 'display:none');\n        self::assertSame(3, $count);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Dompdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PaperSizeArrayTest extends TestCase\n{\n    private string $outfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outfile !== '') {\n            unlink($this->outfile);\n            $this->outfile = '';\n        }\n    }\n\n    public function testPaperSizeArray(): void\n    {\n        // Issue 1713 - array in PhpSpreadsheet is 2 elements,\n        //   but in Dompdf it is 4 elements, first 2 are zero.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        // TABLOID is a 2-element array in Writer/Pdf.php $paperSizes\n        $size = PageSetup::PAPERSIZE_TABLOID;\n        $sheet->getPageSetup()->setPaperSize($size);\n        $sheet->setPrintGridlines(true);\n        $sheet->getStyle('A7')->getAlignment()->setTextRotation(90);\n        $sheet->setCellValue('A7', 'Lorem Ipsum');\n        $writer = new Dompdf($spreadsheet);\n        $this->outfile = File::temporaryFilename();\n        $writer->save($this->outfile);\n        $spreadsheet->disconnectWorksheets();\n        unset($spreadsheet);\n        $contents = file_get_contents($this->outfile);\n        self::assertNotFalse($contents);\n        self::assertStringContainsString('/MediaBox [0.000 0.000 792.000 1224.000]', $contents);\n    }\n\n    public function testPaperSizeNotArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        // LETTER is a string in Writer/Pdf.php $paperSizes\n        $size = PageSetup::PAPERSIZE_LETTER;\n        $sheet->getPageSetup()->setPaperSize($size);\n        $sheet->setPrintGridlines(true);\n        $sheet->getStyle('A7')->getAlignment()->setTextRotation(90);\n        $sheet->setCellValue('A7', 'Lorem Ipsum');\n        $writer = new Dompdf($spreadsheet);\n        $this->outfile = File::temporaryFilename();\n        $writer->save($this->outfile);\n        $spreadsheet->disconnectWorksheets();\n        unset($spreadsheet);\n        $contents = file_get_contents($this->outfile);\n        self::assertNotFalse($contents);\n        self::assertStringContainsString('/MediaBox [0.000 0.000 612.000 792.000]', $contents);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Dompdf/PrintAreaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Dompdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf as DompdfWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PrintAreaTest extends TestCase\n{\n    public function testPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $inArray = [\n            [1, 2, 3, 4, 5],\n            [6, 7, 8, 9, 10],\n            [11, 12, 13, 14, 15],\n            [16, 17, 18, 19, 20],\n            [21, 22, 23, 24, 25],\n            [26, 27, 28, 29, 30],\n        ];\n        $sheet->fromArray($inArray);\n        $sheet->getPageSetup()->setPrintArea('B2:D4');\n        $writer = new DompdfWriter($spreadsheet);\n        $eol = $writer->getLineEnding();\n        $html = $writer->generateHtmlAll();\n        $html = preg_replace('/^ +/m', '', $html) ?? $html;\n        $expectedArray = [\n            '<tbody>',\n            '<tr class=\"row1\">',\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">7</td>',\n            '<td class=\"column1 style0 n\" style=\"width:42pt\">8</td>',\n            '<td class=\"column2 style0 n\" style=\"width:42pt\">9</td>',\n            '</tr>',\n            '<tr class=\"row2\">',\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">12</td>',\n            '<td class=\"column1 style0 n\" style=\"width:42pt\">13</td>',\n            '<td class=\"column2 style0 n\" style=\"width:42pt\">14</td>',\n            '</tr>',\n            '<tr class=\"row3\">',\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">17</td>',\n            '<td class=\"column1 style0 n\" style=\"width:42pt\">18</td>',\n            '<td class=\"column2 style0 n\" style=\"width:42pt\">19</td>',\n            '</tr>',\n            '</tbody>',\n        ];\n        $expectedString = implode($eol, $expectedArray);\n        self::assertStringContainsString(\n            $expectedString,\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Dompdf/TextRotationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Dompdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Dompdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TextRotationTest extends TestCase\n{\n    public function testTextRotation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setPrintGridlines(true);\n        $sheet->getStyle('A7')->getAlignment()->setTextRotation(90);\n        $sheet->setCellValue('A7', 'Lorem Ipsum');\n        $writer = new Dompdf($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(' transform:rotate(90deg);', $html);\n        $spreadsheet->disconnectWorksheets();\n        unset($spreadsheet);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/AllOrOneSheetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse DOMDocument;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass AllOrOneSheetTest extends Functional\\AbstractFunctional\n{\n    public function testWriteAllSheets(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setCellValue('A1', 'first');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setCellValue('A1', 'second');\n\n        $writer = new Html($spreadsheet);\n        self::assertFalse($writer->getEmbedImages());\n        $writer->writeAllSheets();\n        self::assertTrue($writer->getGenerateSheetNavigationBlock());\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('ul'); // sheet navigation\n        self::assertCount(1, $divs);\n        $divs = $body->getElementsByTagName('div');\n        self::assertCount(2, $divs);\n        $divsItem0 = $divs->item(0);\n        self::assertNotNull($divsItem0);\n        $divsItem1 = $divs->item(1);\n        self::assertNotNull($divsItem1);\n        self::assertEquals('page: page0', $divsItem0->getAttribute('style'));\n        $tbl = $divsItem0->getElementsByTagName('table');\n        $tblItem0 = $tbl->item(0);\n        self::assertNotNull($tblItem0);\n        self::assertEquals('sheet0', $tblItem0->getAttribute('id'));\n        self::assertEquals('sheet0 gridlines', $tblItem0->getAttribute('class'));\n        $tbl = $divsItem1->getElementsByTagName('table');\n        $tblItem0 = $tbl->item(0);\n        self::assertNotNull($tblItem0);\n        self::assertEquals('page: page1', $divsItem1->getAttribute('style'));\n        self::assertEquals('sheet1', $tblItem0->getAttribute('id'));\n        self::assertEquals('sheet1 gridlines', $tblItem0->getAttribute('class'));\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testWriteAllSheetsNoNav(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setCellValue('A1', 'first');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setCellValue('A1', 'second');\n\n        $writer = new Html($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setGenerateSheetNavigationBlock(false);\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('ul'); // sheet navigation\n        self::assertCount(0, $divs);\n        $divs = $body->getElementsByTagName('div');\n        self::assertCount(2, $divs);\n        $divsItem0 = $divs->item(0);\n        self::assertNotNull($divsItem0);\n        self::assertEquals('page: page0', $divsItem0->getAttribute('style'));\n        $tbl = $divsItem0->getElementsByTagName('table');\n        $tblItem0 = $tbl->item(0);\n        self::assertNotNull($tblItem0);\n        self::assertEquals('sheet0', $tblItem0->getAttribute('id'));\n        self::assertEquals('sheet0 gridlines', $tblItem0->getAttribute('class'));\n        $divsItem1 = $divs->item(1);\n        self::assertNotNull($divsItem1);\n        $tbl = $divsItem1->getElementsByTagName('table');\n        self::assertEquals('page: page1', $divsItem1->getAttribute('style'));\n        $tblItem0 = $tbl->item(0);\n        self::assertNotNull($tblItem0);\n        self::assertEquals('sheet1', $tblItem0->getAttribute('id'));\n        self::assertEquals('sheet1 gridlines', $tblItem0->getAttribute('class'));\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testWriteAllSheetsPdf(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setCellValue('A1', 'first');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setCellValue('A1', 'second');\n\n        $writer = new Mpdf($spreadsheet);\n        $writer->writeAllSheets();\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('ul'); // sheet navigation\n        self::assertCount(0, $divs);\n        $divs = $body->getElementsByTagName('div');\n        $divsItem0 = $divs->item(0);\n        self::assertNotNull($divsItem0);\n        self::assertCount(2, $divs);\n        self::assertEquals('page: page0', $divsItem0->getAttribute('style'));\n        $tbl = $divsItem0->getElementsByTagName('table');\n        $tblItem0 = $tbl->item(0);\n        self::assertNotNull($tblItem0);\n        self::assertEquals('sheet0', $tblItem0->getAttribute('id'));\n        self::assertEquals('sheet0 gridlines', $tblItem0->getAttribute('class'));\n        $divsItem1 = $divs->item(1);\n        self::assertNotNull($divsItem1);\n        $tbl = $divsItem1->getElementsByTagName('table');\n        self::assertEquals('page: page1', $divsItem1->getAttribute('style'));\n        $tblItem0 = $tbl->item(0);\n        self::assertNotNull($tblItem0);\n        self::assertEquals('sheet1', $tblItem0->getAttribute('id'));\n        self::assertEquals('sheet1 gridlines', $tblItem0->getAttribute('class'));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWriteOneSheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setCellValue('A1', 'first');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setCellValue('A1', 'second');\n\n        $writer = new Html($spreadsheet);\n        $writer->setSheetIndex(1);\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('ul'); // sheet navigation\n        self::assertCount(0, $divs);\n        $divs = $body->getElementsByTagName('div');\n        self::assertCount(1, $divs);\n        $divsItem0 = $divs->item(0);\n        self::assertNotNull($divsItem0);\n        self::assertEquals('page: page1', $divsItem0->getAttribute('style'));\n        $tbl = $divsItem0->getElementsByTagName('table');\n        $tblItem0 = $tbl->item(0);\n        self::assertNotNull($tblItem0);\n        self::assertEquals('sheet1', $tblItem0->getAttribute('id'));\n        self::assertEquals('sheet1 gridlines', $tblItem0->getAttribute('class'));\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testPageBreak(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setShowGridlines(true)->setPrintGridlines(true);\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 'before page break');\n        $sheet->setBreak('A2', \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::BREAK_ROW);\n        $sheet->setCellValue('A3', 'after page break');\n        $sheet->setCellValue('A4', 4);\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setCellValue('A1', 'new sheet');\n\n        $writer = new Html($spreadsheet);\n        $writer->writeAllSheets();\n\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n        self::assertCount(3, $divs);\n\n        $divsItem0 = $divs->item(0);\n        $divsItem1 = $divs->item(1);\n        $divsItem2 = $divs->item(2);\n        self::assertNotNull($divsItem0);\n        self::assertNotNull($divsItem1);\n        self::assertNotNull($divsItem2);\n        $sty = $divsItem0->getAttribute('style');\n        $cls = $divsItem0->getAttribute('class');\n        self::assertEquals('page: page0', $sty);\n        self::assertEquals('', $cls);\n        $sty = $divsItem1->getAttribute('style');\n        $cls = $divsItem1->getAttribute('class');\n        self::assertEquals('page: page0', $sty);\n        self::assertEquals('scrpgbrk', $cls);\n        $sty = $divsItem2->getAttribute('style');\n        $cls = $divsItem2->getAttribute('class');\n        self::assertEquals('page: page1', $sty);\n        self::assertEquals('', $cls);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testTcpdfPageBreak(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setCellValue('A1', 'First sheet');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setCellValue('A2', 'Second sheet');\n        $sheet2->setCellValue('A2', 'before page break');\n        $sheet2->setBreak('A2', \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::BREAK_ROW);\n        $sheet2->setCellValue('A3', 'after page break');\n\n        $writer = new Tcpdf($spreadsheet);\n        $writer->writeAllSheets();\n        $html = $writer->generateHtmlAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n        self::assertCount(5, $divs);\n\n        self::assertEquals('page: page0', $divs->item(0)?->getAttribute('style'));\n        self::assertEquals('page: page1', $divs->item(2)?->getAttribute('style'));\n        self::assertEquals('page: page1', $divs->item(4)?->getAttribute('style'));\n        self::assertEquals('page-break-before:always', $divs->item(1)?->getAttribute('style'));\n        self::assertEquals('page-break-before:always', $divs->item(3)?->getAttribute('style'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/BackgroundImageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass BackgroundImageTest extends AbstractFunctional\n{\n    public function testBackgroundImage(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('B1')->setValue(2);\n        $sheet->getCell('A2')->setValue(3);\n        $sheet->getCell('B2')->setValue(4);\n        $imageFile = 'tests/data/Writer/XLSX/backgroundtest.png';\n        $image = (string) file_get_contents($imageFile);\n        $sheet->setBackgroundImage($image);\n        self::assertSame('image/png', $sheet->getBackgroundMime());\n        self::assertSame('png', $sheet->getBackgroundExtension());\n        $writer = new Html($spreadsheet);\n        $header = $writer->generateHTMLHeader(true);\n        self::assertStringContainsString('table.sheet0 { background-image:url(data:image/png;base64,', $header);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/BadCustomPropertyTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BadCustomPropertyTest extends TestCase\n{\n    public function testBadCustomProperty(): void\n    {\n        $reader = new XlsxReader();\n        $infile = 'tests/data/Reader/XLSX/sec-q229.dontuse';\n        $spreadsheet = $reader->load($infile);\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<meta name=\"custom.string.custom_property&quot;&gt;&lt;img src=1 onerror=alert()&gt;\" content=\"test\" />', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/BadHyperlinkBaseTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BadHyperlinkBaseTest extends TestCase\n{\n    public function testBadHyperlinkBase(): void\n    {\n        $reader = new XlsxReader();\n        $infile = 'tests/data/Reader/XLSX/sec-p66w.dontuse';\n        $spreadsheet = $reader->load($infile);\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<base href=\"&quot;&gt;&lt;img src=1 onerror=alert()&gt;\" />', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/BadHyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xml as XmlReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BadHyperlinkTest extends TestCase\n{\n    public function testBadHyperlink(): void\n    {\n        $reader = new XlsxReader();\n        $infile = 'tests/data/Reader/XLSX/sec-j47r.dontuse';\n        $spreadsheet = $reader->load($infile);\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<td class=\"column0 style1 s\">jav&#9;ascript:alert()</td>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testControlCharacter(): void\n    {\n        $reader = new XmlReader();\n        $infile = 'tests/data/Reader/Xml/sec-w24f.dontuse';\n        $spreadsheet = $reader->load($infile);\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<td class=\"column0 style0 s\">&#20;j&#13;avascript:alert(1)</td>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/BetterBooleanTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html as HtmlReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass BetterBooleanTest extends Functional\\AbstractFunctional\n{\n    private string $locale;\n\n    protected function setUp(): void\n    {\n        $calculation = Calculation::getInstance();\n        $this->locale = $calculation->getLocale();\n    }\n\n    protected function tearDown(): void\n    {\n        $calculation = Calculation::getInstance();\n        $calculation->setLocale($this->locale);\n    }\n\n    public function testDefault(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $writer = new HtmlWriter($spreadsheet);\n        // Default change with release 4.0.0\n        self::assertTrue($writer->getBetterBoolean());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function setBetter(HtmlWriter $writer): void\n    {\n        $writer->setBetterBoolean(true);\n    }\n\n    public function setNotBetter(HtmlWriter $writer): void\n    {\n        $writer->setBetterBoolean(false);\n    }\n\n    public function testBetterBoolean(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('B1')->setValue('Hello');\n        $sheet->getCell('C1')->setValue(true);\n        $sheet->getCell('D1')->setValue('=IF(1>2, TRUE, FALSE)');\n        $sheet->getCell('E1')->setValueExplicit(1, DataType::TYPE_STRING);\n        $sheet->getCell('F1')->setValue('=\"A\"&\"B\"');\n        $sheet->getCell('G1')->setValue('=1+2');\n\n        $reloaded = $this->writeAndReload($spreadsheet, 'Html');\n        $falseTrue = Calculation::getInstance($spreadsheet)->getFalseTrueArray();\n        $countPortTrue = 0;\n        $portTrue = 'VERDADEIRO';\n        $portFalse = 'FALSO';\n        $countArray = count($falseTrue[1]);\n        for ($i = 0; $i < $countArray; ++$i) {\n            if ($falseTrue[1][$i] === $portTrue) {\n                ++$countPortTrue;\n                self::assertSame($portFalse, $falseTrue[0][$i]);\n            }\n        }\n        self::assertSame(2, $countPortTrue, '1 for pt, 1 for pt-br');\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloaded->getActiveSheet();\n        self::assertSame(1, $rsheet->getCell('A1')->getValue());\n        self::assertSame('Hello', $rsheet->getCell('B1')->getValue());\n        self::assertTrue($rsheet->getCell('C1')->getValue());\n        self::assertFalse($rsheet->getCell('D1')->getValue());\n        self::assertSame('1', $rsheet->getCell('E1')->getValue());\n        self::assertSame('AB', $rsheet->getCell('F1')->getValue());\n        self::assertSame(3, $rsheet->getCell('G1')->getValue());\n        $reloaded->disconnectWorksheets();\n    }\n\n    public function testNotBetterBoolean(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('B1')->setValue('Hello');\n        $sheet->getCell('C1')->setValue(true);\n        $sheet->getCell('D1')->setValue('=IF(1>2, TRUE, FALSE)');\n        $sheet->getCell('E1')->setValueExplicit(1, DataType::TYPE_STRING);\n        $sheet->getCell('F1')->setValue('=\"A\"&\"B\"');\n        $sheet->getCell('G1')->setValue('=1+2');\n\n        $reloaded = $this->writeAndReload($spreadsheet, 'Html', null, $this->setNotBetter(...));\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloaded->getActiveSheet();\n        self::assertSame(1, $rsheet->getCell('A1')->getValue());\n        self::assertSame('Hello', $rsheet->getCell('B1')->getValue());\n        self::assertSame(1, $rsheet->getCell('C1')->getValue());\n        self::assertNull($rsheet->getCell('D1')->getValue());\n        self::assertSame(1, $rsheet->getCell('E1')->getValue());\n        self::assertSame('AB', $rsheet->getCell('F1')->getValue());\n        self::assertSame(3, $rsheet->getCell('G1')->getValue());\n        $reloaded->disconnectWorksheets();\n    }\n\n    public function testLocale(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('B1')->setValue('Hello');\n        $sheet->getCell('C1')->setValue(true);\n        $sheet->getCell('D1')->setValue('=IF(1>2, TRUE, FALSE)');\n        $sheet->getCell('E1')->setValueExplicit(1, DataType::TYPE_STRING);\n        $sheet->getCell('F1')->setValue('=\"A\"&\"B\"');\n        $sheet->getCell('G1')->setValue('=1+2');\n        $calc = Calculation::getInstance();\n        $calc->setLocale('fr');\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setBetterBoolean(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringNotContainsString('TRUE', $html);\n        self::assertStringContainsString('<td data-type=\"b\" class=\"column2 style0 b\">VRAI</td>', $html);\n        self::assertStringContainsString('<td data-type=\"b\" class=\"column3 style0 b\">FAUX</td>', $html);\n        self::assertStringContainsString('<td data-type=\"s\" class=\"column4 style0 s\">1</td>', $html);\n        self::assertStringContainsString('<td class=\"column5 style0 s\">AB</td>', $html);\n        self::assertStringContainsString('<td class=\"column6 style0 n\">3</td>', $html);\n\n        $reloaded = $this->writeAndReload($spreadsheet, 'Html', null, $this->setBetter(...));\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloaded->getActiveSheet();\n        self::assertSame(1, $rsheet->getCell('A1')->getValue());\n        self::assertSame('Hello', $rsheet->getCell('B1')->getValue());\n        self::assertTrue($rsheet->getCell('C1')->getValue());\n        self::assertFalse($rsheet->getCell('D1')->getValue());\n        self::assertSame('1', $rsheet->getCell('E1')->getValue());\n        self::assertSame('AB', $rsheet->getCell('F1')->getValue());\n        self::assertSame(3, $rsheet->getCell('G1')->getValue());\n        $reloaded->disconnectWorksheets();\n    }\n\n    public function testInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setPrintGridlines(true);\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('B1')->setValue('Hello');\n        $sheet->getCell('C1')->setValue(true);\n        $sheet->getCell('D1')->setValue('=IF(1>2, TRUE, FALSE)');\n        $sheet->getCell('E1')->setValueExplicit(1, DataType::TYPE_STRING);\n        $sheet->getCell('F1')->setValue('=\"A\"&\"B\"');\n        $sheet->getCell('G1')->setValue('=1+2');\n        $calc = Calculation::getInstance();\n        $calc->setLocale('fr');\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setBetterBoolean(true);\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        $html = str_replace('vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; ', '', $html);\n        $html = str_replace(' width:42pt\"', '\"', $html);\n        self::assertStringNotContainsString('TRUE', $html);\n        self::assertStringContainsString('<td class=\"gridlines gridlinesp\" style=\"text-align:right;\">1</td>', $html);\n        self::assertStringContainsString('<td class=\"gridlines gridlinesp\" style=\"text-align:left;\">Hello</td>', $html);\n        self::assertStringContainsString('<td data-type=\"b\" class=\"gridlines gridlinesp\" style=\"text-align:center;\">VRAI</td>', $html);\n        self::assertStringContainsString('<td data-type=\"b\" class=\"gridlines gridlinesp\" style=\"text-align:center;\">FAUX</td>', $html);\n        self::assertStringContainsString('<td data-type=\"s\" class=\"gridlines gridlinesp\" style=\"text-align:left;\">1</td>', $html);\n        self::assertStringContainsString('<td class=\"gridlines gridlinesp\" style=\"text-align:left;\">AB</td>', $html);\n        self::assertStringContainsString('<td class=\"gridlines gridlinesp\" style=\"text-align:right;\">3</td>', $html);\n\n        $reloaded = $this->writeAndReload($spreadsheet, 'Html', null, $this->setBetter(...));\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloaded->getActiveSheet();\n        self::assertSame(1, $rsheet->getCell('A1')->getValue());\n        self::assertSame('Hello', $rsheet->getCell('B1')->getValue());\n        self::assertTrue($rsheet->getCell('C1')->getValue());\n        self::assertFalse($rsheet->getCell('D1')->getValue());\n        self::assertSame('1', $rsheet->getCell('E1')->getValue());\n        self::assertSame('AB', $rsheet->getCell('F1')->getValue());\n        self::assertSame(3, $rsheet->getCell('G1')->getValue());\n        $reloaded->disconnectWorksheets();\n    }\n\n    public function testForeignNoLocale(): void\n    {\n        $fragment = '<table><tbody><tr>'\n            . '<td>1</td>'\n            . '<td>Hello</td>'\n            . '<td data-type=\"b\">ИСТИНА</td>' // Bulgarian TRUE\n            . '<td data-type=\"b\">EPÄTOSI</td>' // Finnish FALSE\n            . '<td data-type=\"b\">whatever</td>'\n            . '<td data-type=\"b\">tRuE</td>'\n            . '<td data-type=\"s\">1</td>'\n            . '</tr></tbody></table>';\n        $reader = new HtmlReader();\n        $spreadsheet = $reader->loadFromString($fragment);\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getCell('A1')->getValue());\n        self::assertSame('Hello', $sheet->getCell('B1')->getValue());\n        self::assertTrue($sheet->getCell('C1')->getValue());\n        self::assertFalse($sheet->getCell('D1')->getValue());\n        self::assertSame('whatever', $sheet->getCell('E1')->getValue());\n        self::assertTrue($sheet->getCell('F1')->getValue());\n        self::assertSame('1', $sheet->getCell('G1')->getValue());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNoPreCalc(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', true);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setPreCalculateFormulas(false);\n        $writer->setBetterBoolean(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<td data-type=\"b\" class=\"column0 style0 b\">TRUE</td>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/CalcErrorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CalcErrorTest extends TestCase\n{\n    public function testCalcError(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '={');\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<td data-type=\"e\" class=\"column0 style0 e\">#ERROR</td>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/CallbackTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass CallbackTest extends Functional\\AbstractFunctional\n{\n    public function yellowBody(string $html): string\n    {\n        $newstyle = <<<EOF\n            <style type='text/css'>\n            body {\n                background-color: yellow;\n            }\n            </style>\n\n            EOF;\n\n        return preg_replace('~</head>~', \"$newstyle</head>\", $html) ?? '';\n    }\n\n    public function testSetAndReset(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '1');\n\n        $writer = new Html($spreadsheet);\n        $html1 = $writer->generateHTMLall();\n        $writer->setEditHtmlCallback([$this, 'yellowBody']);\n        $html2 = $writer->generateHTMLall();\n        $writer->setEditHtmlCallback(null);\n        $html3 = $writer->generateHTMLall();\n\n        self::assertFalse(strpos($html1, 'background-color: yellow'));\n        self::assertNotFalse(strpos($html2, 'background-color: yellow'));\n        self::assertFalse(strpos($html3, 'background-color: yellow'));\n        self::assertEquals($html3, $html1);\n\n        $writer->setEditHtmlCallback([$this, 'yellowBody']);\n        $oufil = File::temporaryFilename();\n        $writer->save($oufil);\n        $html4 = file_get_contents($oufil);\n        unlink($oufil);\n        self::assertNotFalse($html4);\n        self::assertNotFalse(strpos($html4, 'background-color: yellow'));\n\n        $this->writeAndReload($spreadsheet, 'Html');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/CommentAlignmentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass CommentAlignmentTest extends AbstractFunctional\n{\n    public function testIssue4004(): void\n    {\n        $type = 'Html';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A3')->setValue('A3');\n        $sheet->getCell('A4')->setValue('A4');\n        $sheet->getComment('A3')->getText()->createText('Comment');\n        $sheet->getComment('A4')->getText()->createText('שלום');\n        $sheet->getComment('A4')->setAlignment(Alignment::HORIZONTAL_RIGHT);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertCount(1, $reloadedSpreadsheet->getAllSheets());\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $comment1 = $rsheet->getComment('A3');\n        self::assertSame('Comment', $comment1->getText()->getPlainText());\n        self::assertSame('general', $comment1->getAlignment());\n        $comment2 = $rsheet->getComment('A4');\n        self::assertSame('שלום', $comment2->getText()->getPlainText());\n        self::assertSame('right', $comment2->getAlignment());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testIssue4004td(): void\n    {\n        $type = 'Html';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setRightToLeft(true);\n        $sheet->getCell('A1')->setValue('ברקוד');\n        $comment = $sheet->getComment('A1');\n        $comment->setTextboxDirection(Comment::TEXTBOX_DIRECTION_RTL);\n        $comment->setAlignment(Alignment::HORIZONTAL_RIGHT);\n        $text = <<<EOF\n            Report : ProductsExcel\n            סטטוס הגדרות בזמן הרצת הדו\"ח\n\n            2024-06-04 21:07:04\n            תאריך התחלה : \n            תאריך סיום : \n            berber@berber.co.il\n\n            הצגת ברקוד מקוצר = 0\n            הצגת חנויות אינטרנט בתוצאות = 1\n\n            הצגת מחיר ליחידת מידה = 0\n            הצגת כל רשומות המחיר לתאריך = 0\n            רשומות עם מחיר בכל הרשתות = 0\n            % נפיצות מינימלית = 0\n            נפיצות מינימלית= 0\n            % נפיצות מקסימלית = 0\n            נפיצות מקסימלית= 0\n            פער אחוזי = 0\n\n            התעלמות מכלל המבצעים = 0\n            התעלמות ממבצעי אשראי = 0\n            התעלמות ממבצעי מועדון = 0\n            התעלמות ממבצעים המותנים בסכום מעל 100 ₪. = 0\n            התעלמות ממבצעים המותנים בקניה של 3 מוצרים ומעלה. = 0\n\n            ניתוח מבצעים\n            ============\n            הצגת כל המבצעים = 0\n            מבצעי מועדון = 0\n            מבצעי אשראי = 0\n            מבצעי ארנק = 0\n            מחיר מוזל = 0\n            X יחידות ב-Y ₪ = 0\n            השני ב = 0\n            X+Y מתנה = 0\n            אחוז הנחה הפעלה = 0\n            אחוז הנחה מספר = 0\n            מוצרים חסרים - הגבלת חודשים - כמות= 0\n            EOF;\n        $comment->getText()->createTextRun($text);\n        $comment->setWidth('300pt');\n        $comment->setHeight('550pt');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertCount(1, $reloadedSpreadsheet->getAllSheets());\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $comment1 = $rsheet->getComment('A1');\n        $textSplit = preg_split('/\\r?\\n/', $text);\n        $resultSplit = preg_split('/\\r?\\n/', $comment1->getText()->getPlainText());\n        self::assertSame($textSplit, $resultSplit);\n        $comment->setTextboxDirection(Comment::TEXTBOX_DIRECTION_RTL);\n        self::assertSame('right', $comment1->getAlignment());\n        self::assertSame('rtl', $comment1->getTextboxDirection());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/DirectionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DirectionTest extends TestCase\n{\n    public function testMixedRtlAndLtr(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setRightToLeft(true);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setRightToLeft(true);\n        $cells = [\n            ['a1', 'b1', 'c1'],\n            ['a2', 'b2', 'c2'],\n        ];\n        $sheet1->fromArray($cells);\n        $sheet2->fromArray($cells);\n        $sheet3->fromArray($cells);\n        $writer = new Html($spreadsheet);\n        $writer->writeAllSheets();\n        $html = $writer->generateHTMLall();\n        $rtlCount = substr_count($html, \"dir='rtl'\");\n        self::assertSame(2, $rtlCount);\n        $ltrCount = substr_count($html, \"dir='ltr'\");\n        self::assertSame(1, $ltrCount);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNoRtl(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet3 = $spreadsheet->createSheet();\n        $cells = [\n            ['a1', 'b1', 'c1'],\n            ['a2', 'b2', 'c2'],\n        ];\n        $sheet1->fromArray($cells);\n        $sheet2->fromArray($cells);\n        $sheet3->fromArray($cells);\n        $writer = new Html($spreadsheet);\n        $writer->writeAllSheets();\n        $html = $writer->generateHTMLall();\n        $rtlCount = substr_count($html, \"dir='rtl'\");\n        self::assertSame(0, $rtlCount);\n        $ltrCount = substr_count($html, \"dir='ltr'\");\n        self::assertSame(0, $ltrCount);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testOnlyRtl(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet3 = $spreadsheet->createSheet();\n        $cells = [\n            ['a1', 'b1', 'c1'],\n            ['a2', 'b2', 'c2'],\n        ];\n        $sheet1->fromArray($cells);\n        $sheet1->setRightToLeft(true);\n        $sheet2->fromArray($cells);\n        $sheet2->setRightToLeft(true);\n        $sheet3->fromArray($cells);\n        $sheet3->setRightToLeft(true);\n        $writer = new Html($spreadsheet);\n        $writer->writeAllSheets();\n        $html = $writer->generateHTMLall();\n        $rtlCount = substr_count($html, \"dir='rtl'\");\n        self::assertSame(4, $rtlCount, '3 sheets plus html tag');\n        $ltrCount = substr_count($html, \"dir='ltr'\");\n        self::assertSame(0, $ltrCount);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/ExtendForChartsAndImagesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass ExtendForChartsAndImagesTest extends Functional\\AbstractFunctional\n{\n    public function testEmptySheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $this->assertMaxColumnAndMaxRow($spreadsheet, 1, 1);\n    }\n\n    public function testSimpleSheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B3', 'foo');\n\n        $this->assertMaxColumnAndMaxRow($spreadsheet, 2, 3);\n    }\n\n    public function testSheetWithExtraColumnDimensions(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B3', 'foo');\n\n        // Artificially expend the sheet column count without any real cells\n        $sheet->getColumnDimension('E');\n\n        $this->assertMaxColumnAndMaxRow($spreadsheet, 2, 3);\n    }\n\n    public function testSheetWithExtraRowDimensions(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B3', 'foo');\n\n        // Artificially expend the sheet row count without any real cells\n        $sheet->getRowDimension(5);\n\n        $this->assertMaxColumnAndMaxRow($spreadsheet, 2, 3);\n    }\n\n    public function testSheetWithImageBelowData(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B3', 'foo');\n\n        // Add a drawing to the worksheet\n        $drawing = new Drawing();\n        $path = 'tests/data/Writer/XLSX/blue_square.png';\n        $drawing->setPath($path);\n        self::assertSame($path, $drawing->getPath());\n        $drawing->setCoordinates('A5');\n        $drawing->setWorksheet($sheet);\n\n        $this->assertMaxColumnAndMaxRow($spreadsheet, 2, 5);\n    }\n\n    public function testSheetWithImageRightOfData(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B3', 'foo');\n\n        // Add a drawing to the worksheet\n        $drawing = new Drawing();\n        $path = 'tests/data/Writer/XLSX/blue_square.png';\n        $drawing->setPath($path);\n        self::assertSame($path, $drawing->getPath());\n        $drawing->setCoordinates('E1');\n        $drawing->setWorksheet($sheet);\n\n        $this->assertMaxColumnAndMaxRow($spreadsheet, 5, 3);\n    }\n\n    public function testSheetWithBadImageRightOfData(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B3', 'foo');\n\n        // Add a drawing to the worksheet\n        $drawing = new Drawing();\n        $path = 'tests/data/Writer/XLSX/xblue_square.png';\n        $drawing->setPath($path, false);\n        self::assertSame('', $drawing->getPath());\n        $drawing->setCoordinates('E1');\n        $drawing->setWorksheet($sheet);\n\n        $this->assertMaxColumnAndMaxRow($spreadsheet, 2, 3);\n    }\n\n    public function testSheetWithBadImageRightOfDataThrow(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('not found!');\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B3', 'foo');\n\n        // Add a drawing to the worksheet\n        $drawing = new Drawing();\n        $path = 'tests/data/Writer/XLSX/xblue_square.png';\n        $drawing->setPath($path);\n        self::assertSame('', $drawing->getPath());\n        $drawing->setCoordinates('E1');\n        $drawing->setWorksheet($sheet);\n\n        $this->assertMaxColumnAndMaxRow($spreadsheet, 2, 3);\n    }\n\n    private function assertMaxColumnAndMaxRow(Spreadsheet $spreadsheet, int $expectedColumnCount, int $expectedRowCount): void\n    {\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHtmlAll();\n\n        $rowCount = substr_count($html, '<tr ');\n        self::assertSame($expectedRowCount, $rowCount);\n\n        $columnCount = substr_count($html, '<td ') / $rowCount;\n\n        self::assertSame($expectedColumnCount, $columnCount);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/FixHeightTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as Writer;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FixHeightTest extends TestCase\n{\n    public function testFixHeight(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        //$sheet0 = $spreadsheet->getActiveSheet();\n        $sheet1 = $spreadsheet->createSheet();\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet1->getPageSetup()->setFitToHeight(1);\n        $sheet2->getPageSetup()->setFitToHeight(2);\n        $sheet3->getPageSetup()->setFitToPage(true);\n\n        $writer = new Writer($spreadsheet);\n        $writer->writeAllSheets();\n        $header = $writer->generateHTMLHeader(true);\n        self::assertStringContainsString('table.sheet0', $header);\n        self::assertStringContainsString('table.sheet1', $header);\n        self::assertStringContainsString('table.sheet2', $header);\n        self::assertStringContainsString('table.sheet3', $header);\n        $count = substr_count($header, 'break-inside');\n        self::assertSame(4, $count); // 2 for sheet1, 2 for sheet3\n        self::assertStringContainsString('table.sheet1 { page-break-inside:avoid; break-inside:avoid }', $header);\n        self::assertStringContainsString('table.sheet3 { page-break-inside:avoid; break-inside:avoid }', $header);\n        $spreadsheet->disconnectWorkSheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/FloatInlineTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FloatInlineTest extends TestCase\n{\n    public function testFloatInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setPrintGridlines(false);\n        $sheet1->getCell('A1')->setValue('L');\n        $sheet1->getCell('B1')->setValue('T');\n        $sheet1->getCell('C1')->setValue('R');\n\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setShowGridlines(false);\n        $sheet2->setPrintGridlines(false);\n        $sheet2->setRightToLeft(true);\n        $sheet2->getCell('A1')->setValue('R');\n        $sheet2->getCell('B1')->setValue('T');\n        $sheet2->getCell('C1')->setValue('L');\n\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setShowGridlines(false);\n        $sheet3->setPrintGridlines(false);\n        $sheet3->getCell('A1')->setValue('l');\n        $sheet3->getCell('B1')->setValue('t');\n        $sheet3->getCell('C1')->setValue('r');\n\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            \"<table dir='ltr' id='sheet0' style='border-collapse:collapse; float:left' class='gridlines'>\",\n            $html,\n            'ltr sheet in spreadsheet with both ltr and rtl sheets , with gridlines'\n        );\n        self::assertStringContainsString(\n            \"<table dir='rtl' id='sheet1' style='border-collapse:collapse; float:right'>\",\n            $html,\n            'rtl sheet in spreadsheet with both ltr and rtl sheets, without gridlines'\n        );\n        self::assertStringContainsString(\n            \"<table dir='ltr' id='sheet2' style='border-collapse:collapse; float:left'>\",\n            $html,\n            'second ltr sheet in spreadsheet with both ltr and rtl sheets, without gridlines'\n        );\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/GridlinesInlineTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass GridlinesInlineTest extends TestCase\n{\n    public function testGridlinesInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setShowGridlines(false);\n        $sheet1->setPrintGridlines(false);\n        $sheet1->fromArray([\n            [11, 12, 13],\n            [14, 15, 16],\n        ]);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setShowGridlines(false);\n        $sheet2->setPrintGridlines(true);\n        $sheet2->fromArray([\n            [21, 22, 23],\n            [24, 25, 26],\n        ]);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setShowGridlines(true);\n        $sheet3->setPrintGridlines(false);\n        $sheet3->fromArray([\n            [31, 32, 33],\n            [34, 35, 36],\n        ]);\n        $sheet4 = $spreadsheet->createSheet();\n        $sheet4->setShowGridlines(true);\n        $sheet4->setPrintGridlines(true);\n        $sheet4->fromArray([\n            [41, 42, 43],\n            [44, 45, 46],\n        ]);\n\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">11</td>',\n            $html,\n            'neither gridlines nor gridlinesp'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">21</td>',\n            $html,\n            'gridlinesp without gridlines'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">31</td>',\n            $html,\n            'gridlines without gridlinesp'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">41</td>',\n            $html,\n            'gridlines and gridlinesp'\n        );\n        $count = substr_count($html, 'page-break-before');\n        self::assertSame(1, $count);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGridlinesCss(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setShowGridlines(false);\n        $sheet1->setPrintGridlines(false);\n        $sheet1->fromArray([\n            [11, 12, 13],\n            [14, 15, 16],\n        ]);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setShowGridlines(false);\n        $sheet2->setPrintGridlines(true);\n        $sheet2->fromArray([\n            [21, 22, 23],\n            [24, 25, 26],\n        ]);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setShowGridlines(true);\n        $sheet3->setPrintGridlines(false);\n        $sheet3->fromArray([\n            [31, 32, 33],\n            [34, 35, 36],\n        ]);\n        $sheet4 = $spreadsheet->createSheet();\n        $sheet4->setShowGridlines(true);\n        $sheet4->setPrintGridlines(true);\n        $sheet4->fromArray([\n            [41, 42, 43],\n            [44, 45, 46],\n        ]);\n\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(false);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            \"<table id='sheet0' class='sheet0'>\",\n            $html,\n            'neither gridlines nor gridlinesp 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\">11</td>',\n            $html,\n            'neither gridlines nor gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet1' class='sheet1 gridlinesp'>\",\n            $html,\n            'gridlinesp without gridlines 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\">21</td>',\n            $html,\n            'gridlinesp without gridlines 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet2' class='sheet2 gridlines'>\",\n            $html,\n            'gridlines without gridlinesp 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\">31</td>',\n            $html,\n            'gridlines without gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet3' class='sheet3 gridlines gridlinesp'>\",\n            $html,\n            'gridlines and gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\">41</td>',\n            $html,\n            'gridlines and gridlinesp 2'\n        );\n        $count = substr_count($html, 'page-break-before');\n        self::assertSame(1, $count);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/GridlinesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse DOMDocument;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass GridlinesTest extends Functional\\AbstractFunctional\n{\n    public function testGridlines(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setShowGridlines(true)->setPrintGridlines(true);\n        $sheet->setCellValue('A1', 1);\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setShowGridlines(true)->setPrintGridlines(false);\n        $sheet->setCellValue('A1', 1);\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setShowGridlines(false)->setPrintGridlines(true);\n        $sheet->setCellValue('A1', 1);\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setShowGridlines(false)->setPrintGridlines(false);\n        $sheet->setCellValue('A1', 1);\n\n        $writer = new Html($spreadsheet);\n        $writer->writeAllSheets();\n\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n        self::assertCount(4, $divs);\n\n        $tbl = $divs->item(0)?->getElementsByTagName('table')->item(0);\n        $cls = $tbl?->getAttribute('class');\n        self::assertSame('sheet0 gridlines gridlinesp', $cls);\n        $tbl = $divs->item(1)?->getElementsByTagName('table')->item(0);\n        $cls = $tbl?->getAttribute('class');\n        self::assertSame('sheet1 gridlines', $cls);\n        $tbl = $divs->item(2)?->getElementsByTagName('table')->item(0);\n        $cls = $tbl?->getAttribute('class');\n        self::assertSame('sheet2 gridlinesp', $cls);\n        $tbl = $divs->item(3)?->getElementsByTagName('table')->item(0);\n        $cls = $tbl?->getAttribute('class');\n        self::assertSame('sheet3', $cls);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testGridlinesInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setShowGridlines(true)->setPrintGridlines(true);\n        $sheet->setCellValue('A1', 1);\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setShowGridlines(true)->setPrintGridlines(false);\n        $sheet->setCellValue('A1', 1);\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setShowGridlines(false)->setPrintGridlines(true);\n        $sheet->setCellValue('A1', 1);\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setShowGridlines(false)->setPrintGridlines(false);\n        $sheet->setCellValue('A1', 1);\n\n        $writer = new Html($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(true);\n\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n        self::assertCount(4, $divs);\n\n        $tbl = $divs->item(0)?->getElementsByTagName('table')->item(0);\n        self::assertNotNull($tbl);\n        $cls = $tbl->getAttribute('class');\n        self::assertSame('gridlines gridlinesp', $cls);\n        $tbl = $divs->item(1)?->getElementsByTagName('table')->item(0);\n        self::assertNotNull($tbl);\n        $cls = $tbl->getAttribute('class');\n        self::assertSame('gridlines', $cls);\n        $tbl = $divs->item(2)?->getElementsByTagName('table')->item(0);\n        $cls = $tbl?->getAttribute('class');\n        self::assertEquals('gridlinesp', $cls);\n        $tbl = $divs->item(3)?->getElementsByTagName('table')->item(0);\n        $cls = $tbl?->getAttribute('class');\n        self::assertSame('', $cls);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testRichText(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $emc2 = new \\PhpOffice\\PhpSpreadsheet\\RichText\\RichText();\n        $part1 = $emc2->createTextRun('e=mc');\n        $font = $part1->getFont();\n        self::assertNotNull($font);\n        $font->getColor()->setARGB(Color::COLOR_BLUE);\n        $part2 = $emc2->createTextRun('2');\n        $font = $part2->getFont();\n        self::assertNotNull($font);\n        $font->getColor()->setARGB(Color::COLOR_DARKGREEN);\n        $font->setSuperScript(true);\n        $sheet->setCellValue('A1', $emc2);\n        $h2o = new \\PhpOffice\\PhpSpreadsheet\\RichText\\RichText();\n        $h2o->createTextRun('H');\n        $part2 = $h2o->createTextRun('2');\n        $font = $part2->getFont();\n        self::assertNotNull($font);\n        $font->setSubScript(true);\n        $font->getColor()->setARGB(Color::COLOR_RED);\n        $h2o->createTextRun('O');\n        $sheet->setCellValue('A2', $h2o);\n        $h2so4 = new \\PhpOffice\\PhpSpreadsheet\\RichText\\RichText();\n        $h2so4->createTextRun('H');\n        $part2 = $h2so4->createTextRun('2');\n        $font = $part2->getFont();\n        self::assertNotNull($font);\n        $font->setSubScript(true);\n        $h2so4->createTextRun('SO');\n        $part4 = $h2so4->createTextRun('4');\n        $font = $part4->getFont();\n        self::assertNotNull($font);\n        $font->setSubScript(true);\n        $sheet->setCellValue('A3', $h2so4);\n        $sheet->setCellValue('A4', '5');\n        $sheet->getCell('A4')->getStyle()->getFont()->setSuperScript(true);\n        $sheet->setCellValue('A5', '6');\n        $sheet->getCell('A5')->getStyle()->getFont()->setSubScript(true);\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n        self::assertCount(1, $divs);\n\n        $tabl = $divs->item(0)?->getElementsByTagName('table');\n        self::assertNotNull($tabl);\n        $tbod = $tabl->item(0)?->getElementsByTagName('tbody');\n        self::assertNotNull($tbod);\n        $rows = $tbod->item(0)?->getElementsByTagName('tr');\n        self::assertNotNull($rows);\n        self::assertCount(5, $rows);\n        $tds = $rows->item(0)?->getElementsByTagName('td');\n        self::assertNotNull($tds);\n        self::assertCount(1, $tds);\n        $spans = $tds->item(0)?->getElementsByTagName('span');\n        self::assertNotNull($spans);\n        self::assertCount(2, $spans);\n        self::assertEquals('e=mc', $spans->item(0)?->textContent);\n        $style = $spans->item(0)?->getAttribute('style');\n        self::assertEquals(1, preg_match('/color:#0000FF/', \"$style\"));\n        $style = $spans->item(1)?->getAttribute('style');\n        self::assertEquals(1, preg_match('/color:#008000/', \"$style\"));\n        $sups = $spans->item(1)?->getElementsByTagName('sup');\n        self::assertCount(1, $sups);\n        self::assertSame('2', $sups?->item(0)?->textContent);\n\n        $tds = $rows->item(1)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(3, $spans);\n        self::assertSame('H', $spans?->item(0)?->textContent);\n        $style = $spans->item(1)?->getAttribute('style');\n        self::assertSame(1, preg_match('/color:#FF0000/', \"$style\"));\n        $subs = $spans->item(1)?->getElementsByTagName('sub');\n        self::assertCount(1, $subs);\n        self::assertSame('2', $subs?->item(0)?->textContent);\n        self::assertSame('O', $spans->item(2)?->textContent);\n\n        $tds = $rows->item(2)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(4, $spans);\n        self::assertEquals('H', $spans?->item(0)?->textContent);\n        $subs = $spans?->item(1)?->getElementsByTagName('sub');\n        self::assertCount(1, $subs);\n        self::assertEquals('2', $subs?->item(0)?->textContent);\n        self::assertEquals('SO', $spans?->item(2)?->textContent);\n        $subs = $spans?->item(3)?->getElementsByTagName('sub');\n        self::assertCount(1, $subs);\n        self::assertEquals('4', $subs?->item(0)?->textContent);\n\n        $tds = $rows->item(3)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(0, $spans);\n        $sups = $tds?->item(0)?->getElementsByTagName('sup');\n        self::assertCount(1, $sups);\n        self::assertEquals('5', $sups?->item(0)?->textContent);\n\n        $tds = $rows->item(4)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(0, $spans);\n        $subs = $tds?->item(0)?->getElementsByTagName('sub');\n        self::assertCount(1, $subs);\n        self::assertEquals('6', $subs?->item(0)?->textContent);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HideMergeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HideMergeTest extends TestCase\n{\n    public function testHideWithMerge(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        // just some labels for better visualisation of the problem\n        $worksheet->setCellValue('A1', 'A');\n        $worksheet->setCellValue('B1', 'B');\n        $worksheet->setCellValue('C1', 'C');\n        // setting the row height to better visualize the problem\n        for ($i = 1; $i <= 10; ++$i) {\n            $worksheet->getRowDimension($i)->setRowHeight(17);\n        }\n        // Headline - merged over two cells AND two rows\n        $worksheet->mergeCells('B2:C3');\n        $worksheet->setCellValue('B2', 'Hello World Headline');\n        $worksheet->getStyle('B2:C3')->getFont()->setBold(true);\n        $worksheet->getStyle('B2:C3')\n            ->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $worksheet->getStyle('B2:C3')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // Content 1 - merge over two rows\n        $worksheet->mergeCells('B4:B5');\n        $worksheet->mergeCells('C4:C5');\n        $worksheet->setCellValue('B4', 'Label 1');\n        $worksheet->setCellValue('C4', 'Text 1');\n        $worksheet->getStyle('B4:B5')->getFont()->setBold(true);\n        $worksheet->getStyle('B4:C5')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $worksheet->getStyle('B4:B5')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n        $worksheet->getStyle('C4:C5')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // Content 2 - merge over two rows\n        $worksheet->mergeCells('B6:B7');\n        $worksheet->mergeCells('C6:C7');\n        $worksheet->setCellValue('B6', 'Label 2');\n        $worksheet->setCellValue('C6', 'Text 2');\n        $worksheet->getStyle('B6:B7')->getFont()->setBold(true);\n        $worksheet->getStyle('B6:C7')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $worksheet->getStyle('B6:B7')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n        $worksheet->getStyle('C6:C7')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // This is where the error was introduced (!!!)\n        $worksheet->getColumnDimension('A')->setVisible(false);\n        $Dompdf = new Html($spreadsheet);\n        $html = $Dompdf->generateHtmlAll();\n        $html = preg_replace('/^\\s+/m', '', $html) ?? $html;\n        $html = preg_replace('/[\\n\\r]/', '', $html) ?? $html;\n        self::assertStringContainsString(\n            'table.sheet0 .column0 { display:none }',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row0\">'\n                . '<td class=\"column0 style0 s\">A</td>'\n                . '<td class=\"column1 style0 s\">B</td>'\n                . '<td class=\"column2 style0 s\">C</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row1\">'\n                . '<td class=\"column0 style0\">&nbsp;</td>'\n                . '<td class=\"column1 style1 s style1\" colspan=\"2\" rowspan=\"2\">Hello World Headline</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row2\">'\n                . '<td class=\"column0 style0\">&nbsp;</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row3\">'\n                . '<td class=\"column0 style0\">&nbsp;</td>'\n                . '<td class=\"column1 style2 s style2\" rowspan=\"2\">Label 1</td>'\n                . '<td class=\"column2 style3 s style3\" rowspan=\"2\">Text 1</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row4\">'\n                . '<td class=\"column0 style0\">&nbsp;</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row5\">'\n                . '<td class=\"column0 style0\">&nbsp;</td>'\n                . '<td class=\"column1 style2 s style2\" rowspan=\"2\">Label 2</td>'\n                . '<td class=\"column2 style3 s style3\" rowspan=\"2\">Text 2</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row6\">'\n                . '<td class=\"column0 style0\">&nbsp;</td>'\n                . '</tr>',\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HideTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HideTest extends TestCase\n{\n    public function testHide(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            ['a1', 'b1', 'c1', 'd1', 'e1', 'f1'],\n            ['a2', 'b2', 'c2', 'd2', 'e2', 'f2'],\n            ['a3', 'b3', 'c3', 'd3', 'e3', 'f3'],\n            ['a4', 'b4', 'c4', 'd4', 'e4', 'f4'],\n            ['a5', 'b5', 'c5', 'd5', 'e5', 'f5'],\n            ['a6', 'b6', 'c6', 'd6', 'e6', 'f6'],\n        ]);\n        $sheet->getColumnDimension('B')->setVisible(false);\n        $sheet->getRowDimension(3)->setVisible(false);\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('table.sheet0 .column1 { display:none }', $html);\n        self::assertStringContainsString('table.sheet0 tr.row2 { display:none; visibility:hidden }', $html);\n        self::assertStringContainsString('.navigation {display: none;}', $html);\n        $count = substr_count($html, 'display:none');\n        self::assertSame(3, $count);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass HtmlArrayTest extends AbstractFunctional\n{\n    public function testArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(1);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('B1')->setValue('=UNIQUE(A1:A3)');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Html');\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertEquals('1', $sheet->getCell('A1')->getValue());\n        self::assertEquals('1', $sheet->getCell('A2')->getValue());\n        self::assertEquals('3', $sheet->getCell('A3')->getValue());\n        self::assertEquals('1', $sheet->getCell('B1')->getValue());\n        self::assertEquals('3', $sheet->getCell('B2')->getValue());\n        self::assertNull($sheet->getCell('B3')->getValue());\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testInlineArrays(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=UNIQUE({1;1;2;1;3;2;4;4;4})');\n        $sheet->getCell('D1')->setValue('=UNIQUE({1,1,2,1,3,2,4,4,4},true)');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Csv');\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $expected = [\n            ['1', null, null, '1', '2', '3', '4'],\n            ['2', null, null, null, null, null, null],\n            ['3', null, null, null, null, null, null],\n            ['4', null, null, null, null, null, null],\n        ];\n        self::assertSame($expected, $sheet->toArray());\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlColourScaleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlColourScaleTest extends TestCase\n{\n    private string $data = '';\n\n    protected function setUp(): void\n    {\n        $file = 'samples/templates/ColourScale.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setConditionalFormatting(true);\n        $this->data = $writer->generateHtmlAll();\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function extractCell(string $coordinate): string\n    {\n        [$column, $row] = Coordinate::indexesFromString($coordinate);\n        --$column;\n        --$row;\n        // extract row into $matches\n        $match = preg_match('~<tr class=\"row' . $row . '\".+?</tr>~s', $this->data, $matches);\n        if ($match !== 1) {\n            return 'unable to match row';\n        }\n        $rowData = $matches[0];\n        // extract cell into $matches\n        $match = preg_match('~<td class=\"column' . $column . ' .+?</td>~s', $rowData, $matches);\n        if ($match !== 1) {\n            return 'unable to match column';\n        }\n\n        return $matches[0];\n    }\n\n    public function testColourScaleHtmlOutput(): void\n    {\n        $expectedMatches = [\n            ['E1', 'background-color:#B4CA76;\">5<', 'cell E1'],\n            ['F1', 'background-color:#CBCD71;\">6<', 'cell F1'],\n            ['G1', 'background-color:#E3D16C;\">7<', 'cell G1'],\n            ['D2', 'background-color:#57BB8A;\">4<', 'cell D2'],\n            ['E2', 'background-color:#A1C77A;\">5<', 'cell E2'],\n            ['F2', 'background-color:#F1A36D;\">6<', 'cell F2'],\n            ['D3', 'background-color:#FFD666;\">4<', 'cell D3'],\n            ['G3', 'background-color:#EC926F;\">7<', 'cell G3'],\n            ['H3', 'background-color:#E67C73;\">8<', 'cell H3'],\n            ['A4', 'background-color:#57BB8A;\">1<', 'cell A4'],\n            ['I4', 'null\">&nbsp;<', 'empty cell I4'],\n            ['J4', 'background-color:#E67C73;\">10<', 'cell J4'],\n        ];\n        foreach ($expectedMatches as $expected) {\n            [$coordinate, $expectedString, $message] = $expected;\n            $string = $this->extractCell($coordinate);\n            self::assertStringContainsString($expectedString, $string, $message);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlCommentsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass HtmlCommentsTest extends Functional\\AbstractFunctional\n{\n    public static function providerCommentRichText(): array\n    {\n        $valueSingle = 'I am comment.';\n        $valueMulti = 'I am ' . PHP_EOL . 'multi-line' . PHP_EOL . 'comment.';\n\n        $plainSingle = new RichText();\n        $plainSingle->createText($valueSingle);\n\n        $plainMulti = new RichText();\n        $plainMulti->createText($valueMulti);\n\n        $richSingle = new RichText();\n        $font = $richSingle->createTextRun($valueSingle)->getFont();\n        self::assertNotNull($font);\n        $font->setBold(true);\n\n        $richMultiSimple = new RichText();\n        $font = $richMultiSimple->createTextRun($valueMulti)->getFont();\n        self::assertNotNull($font);\n        $font->setBold(true);\n\n        $richMultiMixed = new RichText();\n        $richMultiMixed->createText('I am' . PHP_EOL);\n        $font = $richMultiMixed->createTextRun('multi-line')->getFont();\n        self::assertNotNull($font);\n        $font->setBold(true);\n        $richMultiMixed->createText(PHP_EOL . 'comment!');\n\n        $richMultiMixed = new RichText();\n        $richMultiMixed->createText('I am' . PHP_EOL);\n        $font = $richMultiMixed->createTextRun('multi-line')->getFont();\n        self::assertNotNull($font);\n        $font->setBold(true);\n        $richMultiMixed->createText(PHP_EOL . 'comment!');\n\n        $scriptTextSingle = 'I am <script>alert(\"Hello\")</script>';\n        $scriptSingle = new RichText();\n        $scriptSingle->createText($scriptTextSingle);\n\n        return [\n            'single line plain text' => [$plainSingle, '<td class=\"column0 style0 s\"><a class=\"comment-indicator\"></a><div class=\"comment\">'\n                . 'I am comment.</div>' . PHP_EOL\n                . 'Comment</td>'],\n            'multi-line plain text' => [$plainMulti, '<td class=\"column0 style0 s\"><a class=\"comment-indicator\"></a><div class=\"comment\">'\n                . 'I am <br />' . PHP_EOL\n                . 'multi-line<br />' . PHP_EOL\n                . 'comment.</div>' . PHP_EOL\n                . 'Comment</td>'],\n            'single line simple rich text' => [$richSingle, '<td class=\"column0 style0 s\"><a class=\"comment-indicator\"></a><div class=\"comment\">'\n                . \"<span style=\\\"font-weight:bold; text-decoration:normal; font-style:normal; color:#000000; font-family:'Calibri'; font-size:11pt\\\">I am comment.</span></div>\" . PHP_EOL\n                . 'Comment</td>'],\n            'multi-line simple rich text' => [$richMultiSimple, '<td class=\"column0 style0 s\"><a class=\"comment-indicator\"></a><div class=\"comment\">'\n                . \"<span style=\\\"font-weight:bold; text-decoration:normal; font-style:normal; color:#000000; font-family:'Calibri'; font-size:11pt\\\">I am <br />\" . PHP_EOL\n                . 'multi-line<br />' . PHP_EOL\n                . 'comment.</span></div>' . PHP_EOL\n                . 'Comment</td>'],\n            'multi-line mixed rich text' => [$richMultiMixed, '<td class=\"column0 style0 s\"><a class=\"comment-indicator\"></a><div class=\"comment\">I am<br />' . PHP_EOL\n                . \"<span style=\\\"font-weight:bold; text-decoration:normal; font-style:normal; color:#000000; font-family:'Calibri'; font-size:11pt\\\">multi-line</span><br />\" . PHP_EOL\n                . 'comment!</div>' . PHP_EOL\n                . 'Comment</td>'],\n            'script single' => [$scriptSingle, '<td class=\"column0 style0 s\"><a class=\"comment-indicator\"></a><div class=\"comment\">'\n                . 'I am &lt;script&gt;alert(&quot;Hello&quot;)&lt;/script&gt;</div>' . PHP_EOL\n                . 'Comment</td>'],\n        ];\n    }\n\n    #[DataProvider('providerCommentRichText')]\n    public function testComments(RichText $richText, string $expected): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $spreadsheet->getActiveSheet()\n            ->getCell('A1')\n            ->setValue('Comment');\n\n        $spreadsheet->getActiveSheet()\n            ->getComment('A1')\n            ->setText($richText);\n        $writer = new Html($spreadsheet);\n        $writer->setLineEnding(PHP_EOL);\n        $output = $writer->generateHtmlAll();\n        self::assertStringContainsString($expected, $output);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n\n        $actual = $reloadedSpreadsheet->getActiveSheet()->getComment('A1')->getText()->getPlainText();\n        self::assertSame($richText->getPlainText(), $actual);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlConditionalFormattingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlConditionalFormattingTest extends TestCase\n{\n    private string $data = '';\n\n    protected function setUp(): void\n    {\n        $file = 'samples/templates/BasicConditionalFormatting.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setConditionalFormatting(true);\n        $this->data = $writer->generateHtmlAll();\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function extractCell(string $coordinate): string\n    {\n        [$column, $row] = Coordinate::indexesFromString($coordinate);\n        --$column;\n        --$row;\n        // extract row into $matches\n        $match = preg_match('~<tr class=\"row' . $row . '\".+?</tr>~s', $this->data, $matches);\n        if ($match !== 1) {\n            return 'unable to match row';\n        }\n        $rowData = $matches[0];\n        // extract cell into $matches\n        $match = preg_match('~<td class=\"column' . $column . ' .+?</td>~s', $rowData, $matches);\n        if ($match !== 1) {\n            return 'unable to match column';\n        }\n\n        return $matches[0];\n    }\n\n    public function testConditionalFormattingHtmLOutput(): void\n    {\n        $expectedMatches = [\n            ['B1', 'class=\"column1 style1 s\">Jan<', 'no conditional styling for B1'],\n            ['F2', 'background-color:#C6EFCE;\">120<', 'conditional style for F2'],\n            ['H2', 'background-color:#FFEB9C;\">90<', 'conditional style for H2'],\n            ['F3', 'background-color:#C6EFCE;\">70<', 'conditional style for cell F3'],\n            ['H3', 'background-color:#FFEB9C;\">60<', 'conditional style for cell H3'],\n            ['F4', 'background-color:#C6EFCE;\">1<', 'conditional style for cell F4'],\n            ['L4', 'background-color:#FFC7CE;\">5<', 'conditional style for cell L4'],\n            ['F5', 'class=\"column5 style1 n\">0<', 'no conditional styling for F5'],\n        ];\n        foreach ($expectedMatches as $expected) {\n            [$coordinate, $expectedString, $message] = $expected;\n            $string = $this->extractCell($coordinate);\n            self::assertStringContainsString($expectedString, $string, $message);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlDifferentConditionalFormattingsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlDifferentConditionalFormattingsTest extends TestCase\n{\n    private string $data = '';\n\n    protected function setUp(): void\n    {\n        $file = 'samples/templates/ConditionalFormattingConditions.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setConditionalFormatting(true);\n        $this->data = $writer->generateHtmlAll();\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    private function extractCell(string $coordinate): string\n    {\n        [$column, $row] = Coordinate::indexesFromString($coordinate);\n        --$column;\n        --$row;\n        // extract row into $matches\n        $match = preg_match('~<tr class=\"row' . $row . '\".+?</tr>~s', $this->data, $matches);\n        if ($match !== 1) {\n            return 'unable to match row';\n        }\n        $rowData = $matches[0];\n        // extract cell into $matches\n        $match = preg_match('~<td class=\"column' . $column . ' .+?</td>~s', $rowData, $matches);\n        if ($match !== 1) {\n            return 'unable to match column';\n        }\n\n        return $matches[0];\n    }\n\n    public function testConditionalFormattingRulesHtml(): void\n    {\n        $expectedMatches = [\n            ['A1', 'background-color:#B7E1CD;\">1<', 'A1 equals hit'],\n            ['B1', 'class=\"column1 style1 n\">2<', 'B1 equals miss'],\n            ['E1', 'background-color:#B7E1CD;\">1<', 'E1 equals horizontal reference hit'],\n            ['F1', 'class=\"column5 style1 n\">2<', 'F1 equals horizontal reference miss'],\n            ['G1', 'class=\"column6 style1 n\">3<', 'G1 equals horizontal reference miss'],\n            ['A2', 'background-color:#B7E1CD;\">terve<', 'A2 text contains hit'],\n            ['B2', 'class=\"column1 style1 s\">moi<', 'B2 text contains miss'],\n            ['A3', 'background-color:#B7E1CD;\">terve<', 'A3 text does not contain hit'],\n            ['B3', 'class=\"column1 style1 s\">moi<', 'B2 text does not contain miss'],\n            ['A4', 'background-color:#B7E1CD;\">terve<', 'A4 text starts with hit'],\n            ['B4', 'class=\"column1 style1 s\">moi<', 'B2 text starts with miss'],\n            ['A5', 'background-color:#B7E1CD;\">terve<', 'A5 text ends with hit'],\n            ['B5', 'class=\"column1 style1 s\">moi<', 'B5 text ends with miss'],\n            ['A6', 'background-color:#B7E1CD;\">2025/01/01<', 'A6 date after hit'],\n            ['B6', 'class=\"column1 style2 n\">2020/01/01<', 'B6 date after miss'],\n            ['A7', 'background-color:#B7E1CD;\">terve vaan<', 'A7 text contains hit'],\n            ['B7', 'class=\"column1 style1 s\">moi<', 'B7 text contains miss'],\n            ['A8', 'background-color:#B7E1CD;\">terve<', 'A8 text does not contain hit'],\n            ['B8', 'class=\"column1 style1 s\">terve vaan<', 'B2 does not contain miss'],\n            ['A9', 'background-color:#B7E1CD;\">#DIV/0!<', 'A10 own formula is error hit'],\n            ['B9', 'class=\"column1 style1 s\">moi<', 'B9 own formula is error miss'],\n            ['A10', 'background-color:#B7E1CD;\">moi<', 'A10 own formula is not error hit'],\n            ['B10', 'class=\"column1 style3 s\">#DIV/0!<', 'B10 own formula is not error miss'],\n            ['A11', 'background-color:#B7E1CD;\">terve<', 'A11 own formula count instances of cell on line and hit when more than one hit'],\n            ['B11', 'background-color:#B7E1CD;\">terve<', 'B11 own formula count instances of cell on line and hit when more than one hit'],\n            ['C11', 'class=\"column2 style1 s\">moi<', 'C11 own formula count instances of cell on line and hit when more than one miss'],\n            ['A12', 'background-color:#B7E1CD;\">moi<', 'A12 own formula count instances of cell on line and hit when at most 1 hit'],\n            ['B12', 'class=\"column1 style1 s\">terve<', 'B12 own formula count instances of cell on line and hit when at most 1 miss'],\n            ['C12', 'class=\"column2 style1 s\">terve<', 'C11 own formula count instances of cell on line and hit when at most 1 miss'],\n            ['A13', 'background-color:#B7E1CD;\">12<', 'A13 own formula self reference hit'],\n            ['B13', 'class=\"column1 style1 n\">10<', 'B13 own formula self reference miss'],\n            ['A14', 'background-color:#B7E1CD;\">10<', 'A14 multiple conditional hits'],\n            ['B14', 'class=\"column1 style1 n\">1<', 'B14 multiple conditionals miss'],\n            ['F7', 'background-color:#B7E1CD;\">1<', 'F7 equals vertical reference hit'],\n            ['F8', 'class=\"column5 style1 n\">2<', 'F8 equals vertical reference miss'],\n            ['F9', 'class=\"column5 style1 n\">3<', 'F9 equals vertical reference miss'],\n            ['F10', 'class=\"column5 style1 n\">4<', 'F10 equals vertical reference miss'],\n        ];\n        foreach ($expectedMatches as $expected) {\n            [$coordinate, $expectedString, $message] = $expected;\n            $string = $this->extractCell($coordinate);\n            self::assertStringContainsString($expectedString, $string, $message);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlExtend2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nclass HtmlExtend2 extends \\PhpOffice\\PhpSpreadsheet\\Writer\\Html\n{\n    protected static bool $alwaysFalse = false;\n\n    protected function tryClose(): bool\n    {\n        return fclose($this->fileHandle) && self::$alwaysFalse;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlNumberFormatTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse DOMDocument;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass HtmlNumberFormatTest extends Functional\\AbstractFunctional\n{\n    protected function setUp(): void\n    {\n        StringHelper::setCurrencyCode('$');\n        StringHelper::setDecimalSeparator('.');\n        StringHelper::setThousandsSeparator(',');\n    }\n\n    protected function tearDown(): void\n    {\n        StringHelper::setCurrencyCode(null);\n        StringHelper::setDecimalSeparator(null);\n        StringHelper::setThousandsSeparator(null);\n    }\n\n    public function testColorNumberFormat(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', -50);\n        $sheet->setCellValue('A2', 3000);\n        $sheet->setCellValue('A3', 0);\n        $sheet->setCellValue('A4', '<br>');\n        $fmt = '[Blue]$#,##0;[Red]$#,##0;$#,##0';\n        $sheet->getStyle('A1:A4')->getNumberFormat()->setFormatCode($fmt);\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n\n        $tabl = $divs->item(0)?->getElementsByTagName('table');\n        $tbod = $tabl?->item(0)?->getElementsByTagName('tbody');\n        $rows = $tbod?->item(0)?->getElementsByTagName('tr');\n        self::assertCount(4, $rows);\n\n        $tds = $rows?->item(0)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(1, $spans);\n        $style = $spans?->item(0)?->getAttribute('style');\n        self::assertSame(1, preg_match('/color:red/', \"$style\"));\n        self::assertSame('$50', $spans?->item(0)?->textContent);\n\n        $tds = $rows?->item(1)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(1, $spans);\n        $style = $spans?->item(0)?->getAttribute('style');\n        self::assertSame(1, preg_match('/color:blue/', \"$style\"));\n        self::assertSame('$3,000', $spans?->item(0)?->textContent);\n\n        $tds = $rows?->item(2)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(0, $spans);\n        self::assertSame('$0', $tds?->item(0)?->textContent);\n\n        $tds = $rows?->item(3)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(0, $spans);\n        self::assertEquals('<br>', $tds?->item(0)?->textContent);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testColorNumberFormatComplex(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', -50);\n        $sheet->setCellValue('A2', 3000.75);\n        $sheet->setCellValue('A3', 0);\n        $sheet->setCellValue('A4', 3000.25);\n        $fmt = '[Blue][>=3000.5]$#,##0.00;[Red][<0]$#,##0.00;$#,##0.00';\n        $sheet->getStyle('A1:A4')->getNumberFormat()->setFormatCode($fmt);\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n\n        $tabl = $divs->item(0)?->getElementsByTagName('table');\n        $tbod = $tabl?->item(0)?->getElementsByTagName('tbody');\n        $rows = $tbod?->item(0)?->getElementsByTagName('tr');\n        self::assertCount(4, $rows);\n\n        $tds = $rows?->item(0)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(1, $spans);\n        $style = $spans?->item(0)?->getAttribute('style');\n        self::assertSame(1, preg_match('/color:red/', \"$style\"));\n        self::assertSame('$50.00', $spans?->item(0)?->textContent);\n\n        $tds = $rows?->item(1)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(1, $spans);\n        $style = $spans?->item(0)?->getAttribute('style');\n        self::assertSame(1, preg_match('/color:blue/', \"$style\"));\n        self::assertSame('$3,000.75', $spans?->item(0)?->textContent);\n\n        $tds = $rows?->item(2)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(0, $spans);\n        self::assertSame('$0.00', $tds?->item(0)?->textContent);\n\n        $tds = $rows?->item(3)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $spans = $tds?->item(0)?->getElementsByTagName('span');\n        self::assertCount(0, $spans);\n        self::assertSame('$3,000.25', $tds?->item(0)?->textContent);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    #[DataProvider('numberFormatProvider')]\n    public function testFormatValueWithMask(mixed $expectedResult, mixed $val, string $fmt): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($val)->getStyle()->getNumberFormat()->setFormatCode($fmt);\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        $html = str_replace('>&nbsp;<', '><', $html); // clear empty cells\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n\n        $tabl = $divs->item(0)?->getElementsByTagName('table');\n        $tbod = $tabl?->item(0)?->getElementsByTagName('tbody');\n        $rows = $tbod?->item(0)?->getElementsByTagName('tr');\n\n        $tds = $rows?->item(0)?->getElementsByTagName('td');\n        $nbsp = html_entity_decode('&nbsp;', Settings::htmlEntityFlags());\n        self::assertEquals($expectedResult, str_replace($nbsp, ' ', (string) $tds?->item(0)?->textContent));\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    /** @return mixed[] */\n    public static function numberFormatProvider(): array\n    {\n        /** @var mixed[] */\n        $retVal = require __DIR__ . '/../../../data/Style/NumberFormat.php';\n\n        return $retVal;\n    }\n\n    #[DataProvider('numberFormatDatesProvider')]\n    public function testFormatValueWithMaskDate(mixed $expectedResult, mixed $val, string $fmt): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue($val)->getStyle()->getNumberFormat()->setFormatCode($fmt);\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n\n        $tabl = $divs->item(0)?->getElementsByTagName('table');\n        $tbod = $tabl?->item(0)?->getElementsByTagName('tbody');\n        $rows = $tbod?->item(0)?->getElementsByTagName('tr');\n\n        $tds = $rows?->item(0)?->getElementsByTagName('td');\n        $nbsp = html_entity_decode('&nbsp;', Settings::htmlEntityFlags());\n        self::assertSame($expectedResult, str_replace($nbsp, ' ', (string) $tds?->item(0)?->textContent));\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    /** @return mixed[] */\n    public static function numberFormatDatesProvider(): array\n    {\n        /** @var mixed[] */\n        $retVal = require __DIR__ . '/../../../data/Style/NumberFormatDates.php';\n\n        return $retVal;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlTableFormatTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table\\TableStyle;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlTableFormatTest extends TestCase\n{\n    private string $data = '';\n\n    private function extractCell(string $coordinate): string\n    {\n        [$column, $row] = Coordinate::indexesFromString($coordinate);\n        --$column;\n        --$row;\n        // extract row into $matches\n        $match = preg_match('~<tr class=\"row' . $row . '\".+?</tr>~s', $this->data, $matches);\n        if ($match !== 1) {\n            return 'unable to match row';\n        }\n        $rowData = $matches[0];\n        // extract cell into $matches\n        $match = preg_match('~<td class=\"column' . $column . ' .+?</td>~s', $rowData, $matches);\n        if ($match !== 1) {\n            return 'unable to match column';\n        }\n\n        return $matches[0];\n    }\n\n    public function testHtmlTableFormatOutput(): void\n    {\n        $file = 'samples/templates/TableFormat.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setTableFormats(true);\n        self::assertTrue($writer->getTableFormats());\n        $this->data = $writer->generateHtmlAll();\n        $spreadsheet->disconnectWorksheets();\n        $expectedMatches = [\n            ['J1', 'background-color:#145F82;\">Sep<', 'table style for header row cell J1'],\n            ['J2', 'background-color:#C0E4F5;\">110<', 'table style for cell J2'],\n            ['I3', 'background-color:#82CAEB;\">70<', 'table style for cell I3'],\n            ['J3', 'background-color:#82CAEB;\">70<', 'table style for cell J3'], // as conditional calculations are off\n            ['K3', 'background-color:#82CAEB;\">70<', 'table style for cell K3'],\n            ['J4', 'background-color:#C0E4F5;\">1<', 'table style for cell J4'],\n            ['J5', 'background-color:#82CAEB;\">1<', 'table style for cell J5'],\n        ];\n        foreach ($expectedMatches as $expected) {\n            [$coordinate, $expectedString, $message] = $expected;\n            $string = $this->extractCell($coordinate);\n            self::assertStringContainsString($expectedString, $string, $message);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBuiltinApplied(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $dataArray = [\n            ['Year', 'Quarter', 'Country', 'Sales'],\n            ['2010', 'Q1', 'United States', 790],\n            ['2010', 'Q2', 'United States', 730],\n            ['2010', 'Q3', 'United States', 860],\n            ['2010', 'Q4', 'United States', 850],\n        ];\n        $sheet->fromArray($dataArray);\n        $table = new Table('A1:D5', 'Sales_Data');\n        $tableStyle = new TableStyle();\n        $tableStyle->setTheme(TableStyle::TABLE_STYLE_MEDIUM2);\n        $tableStyle->setShowRowStripes(true);\n        $tableStyle->setShowColumnStripes(true);\n        $tableStyle->setShowFirstColumn(true);\n        $tableStyle->setShowLastColumn(true);\n        $table->setStyle($tableStyle);\n        $sheet->addTable($table);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setTableFormats(true); // format all tables using a default style for unstyled\n        $this->data = $writer->generateHtmlAll();\n        $expectedMatches = [\n            ['A1', '<td class=\"column0 style0 s\" style=\"color:#FFFFFF;background-color:#000000;\">Year</td>', 'table style for header row cell A1'],\n            ['B2', '<td class=\"column1 style0 s\" style=\"color:#000000;background-color:#D9D9D9;\">Q1</td>', 'table style for cell B2'],\n            ['C3', '<td class=\"column2 style0 s\">United States</td>', 'table style for cell C3'],\n        ];\n        foreach ($expectedMatches as $expected) {\n            [$coordinate, $expectedString, $message] = $expected;\n            $string = $this->extractCell($coordinate);\n            self::assertStringContainsString($expectedString, $string, $message);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testBuiltinNotApplied(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $dataArray = [\n            ['Year', 'Quarter', 'Country', 'Sales'],\n            ['2010', 'Q1', 'United States', 790],\n            ['2010', 'Q2', 'United States', 730],\n            ['2010', 'Q3', 'United States', 860],\n            ['2010', 'Q4', 'United States', 850],\n        ];\n        $sheet->fromArray($dataArray);\n        $table = new Table('A1:D5', 'Sales_Data');\n        $tableStyle = new TableStyle();\n        $tableStyle->setTheme(TableStyle::TABLE_STYLE_MEDIUM2);\n        $tableStyle->setShowRowStripes(true);\n        $tableStyle->setShowColumnStripes(true);\n        $tableStyle->setShowFirstColumn(true);\n        $tableStyle->setShowLastColumn(true);\n        $table->setStyle($tableStyle);\n        $sheet->addTable($table);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setTableFormats(true, false); // format styled tables but not unstyled\n        $this->data = $writer->generateHtmlAll();\n        $expectedMatches = [\n            ['A1', '<td class=\"column0 style0 s\">Year</td>', 'table style for header row cell A1'],\n            ['B2', '<td class=\"column1 style0 s\">Q1</td>', 'table style for cell B2'],\n            ['C3', '<td class=\"column2 style0 s\">United States</td>', 'table style for cell C3'],\n        ];\n        foreach ($expectedMatches as $expected) {\n            [$coordinate, $expectedString, $message] = $expected;\n            $string = $this->extractCell($coordinate);\n            self::assertStringContainsString($expectedString, $string, $message);\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/HtmlTableFormatWithConditionalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HtmlTableFormatWithConditionalTest extends TestCase\n{\n    private string $data = '';\n\n    private function extractCell(string $coordinate): string\n    {\n        [$column, $row] = Coordinate::indexesFromString($coordinate);\n        --$column;\n        --$row;\n        // extract row into $matches\n        $match = preg_match('~<tr class=\"row' . $row . '\".+?</tr>~s', $this->data, $matches);\n        if ($match !== 1) {\n            return 'unable to match row';\n        }\n        $rowData = $matches[0];\n        // extract cell into $matches\n        $match = preg_match('~<td class=\"column' . $column . ' .+?</td>~s', $rowData, $matches);\n        if ($match !== 1) {\n            return 'unable to match column';\n        }\n\n        return $matches[0];\n    }\n\n    public function testHtmlTableFormatOutput(): void\n    {\n        $file = 'samples/templates/TableFormat.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $writer = new HtmlWriter($spreadsheet);\n        self::assertFalse($writer->getTableFormats());\n        self::assertFalse($writer->getConditionalFormatting());\n        $writer->setTableFormats(true);\n        $writer->setConditionalFormatting(true);\n        self::assertTrue($writer->getTableFormats());\n        self::assertTrue($writer->getConditionalFormatting());\n        $this->data = $writer->generateHtmlAll();\n        $spreadsheet->disconnectWorksheets();\n        $expectedMatches = [\n            ['J1', 'background-color:#145F82;\">Sep<', 'table style for header row cell J1'],\n            ['J2', 'background-color:#C0E4F5;\">110<', 'table style for cell J2'],\n            ['I3', 'background-color:#82CAEB;\">70<', 'table style for cell I3'],\n            ['J3', 'background-color:#B7E1CD;\">70<', 'conditional style for cell J3'], // as conditional calculations are on\n            ['K3', 'background-color:#82CAEB;\">70<', 'table style for cell K3'],\n            ['J4', 'background-color:#C0E4F5;\">1<', 'table style for cell J4'],\n            ['J5', 'background-color:#82CAEB;\">1<', 'table style for cell J5'],\n        ];\n        foreach ($expectedMatches as $expected) {\n            [$coordinate, $expectedString, $message] = $expected;\n            $string = $this->extractCell($coordinate);\n            self::assertStringContainsString($expectedString, $string, $message);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/ImageCopyTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls as XlsReader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass ImageCopyTest extends Functional\\AbstractFunctional\n{\n    private string $xlsxFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->xlsxFile !== '') {\n            unlink($this->xlsxFile);\n            $this->xlsxFile = '';\n        }\n    }\n\n    public function testImageCopyXls(): void\n    {\n        $file = 'samples/templates/27template.xls';\n        $reader = new XlsReader();\n        $reloadedSpreadsheet = $reader->load($file);\n\n        $writer = new Html($reloadedSpreadsheet);\n        $writer->writeAllSheets();\n        self::assertFalse($writer->getEmbedImages());\n        $html = $writer->generateHTMLAll();\n        self::assertSame(4, substr_count($html, '<img'));\n        self::assertSame(0, substr_count($html, 'zip://'));\n        // all 4 images converted to png\n        self::assertSame(4, substr_count($html, 'data:image/png;base64'));\n\n        $this->writeAndReload($reloadedSpreadsheet, 'Html');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testImageCopyXlsx(): void\n    {\n        $file = 'samples/templates/27template.xls';\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($file);\n        $this->xlsxFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($this->xlsxFile);\n        $spreadsheet->disconnectWorksheets();\n        $reader2 = new XlsxReader();\n        $reloadedSpreadsheet = $reader2->load($this->xlsxFile);\n\n        $writer = new Html($reloadedSpreadsheet);\n        $writer->writeAllSheets();\n        self::assertFalse($writer->getEmbedImages());\n        $html = $writer->generateHTMLAll();\n        self::assertSame(4, substr_count($html, '<img'));\n        self::assertSame(0, substr_count($html, 'zip://'));\n        // \"gif\" is actually stored as png in this file\n        self::assertSame(2, substr_count($html, 'data:image/png;base64'));\n        //self::assertSame(1, substr_count($html, 'data:image/gif;base64'));\n        self::assertSame(2, substr_count($html, 'data:image/jpeg;base64'));\n\n        $this->writeAndReload($reloadedSpreadsheet, 'Html');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testSimulateFailedClose(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Could not close file ');\n        $file = 'samples/templates/27template.xls';\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($file);\n        $this->xlsxFile = File::temporaryFilename();\n        $writer = new HtmlExtend2($spreadsheet);\n        $writer->save($this->xlsxFile);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/ImageEmbedTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ImageEmbedTest extends TestCase\n{\n    public function testImageEmbed(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $drawing = new Drawing();\n        $drawing->setName('Not an image');\n        $drawing->setDescription('Non-image');\n        $drawing->setPath(__FILE__, false);\n        $drawing->setCoordinates('A1');\n        $drawing->setCoordinates2('E4');\n        $drawing->setWorksheet($sheet);\n\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        $drawing->setCoordinates('A5');\n        $drawing->setCoordinates2('E8');\n        $drawing->setWorksheet($sheet);\n\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setEmbedImages(true);\n        $html = $writer->generateHTMLAll();\n        self::assertSame(1, substr_count($html, '<img'));\n        self::assertSame(1, substr_count($html, 'src=\"data'));\n        self::assertSame(1, substr_count($html, 'src=\"data:image/png;base64,'));\n        self::assertSame(0, substr_count($html, 'blue_square.png'));\n        //self::assertSame(1, substr_count($html, 'src=\"data:,\" alt=\"Non-image\"'));\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/ImagesRootTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse DOMDocument;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass ImagesRootTest extends Functional\\AbstractFunctional\n{\n    private string $curdir = '';\n\n    protected function setUp(): void\n    {\n        $curdir = getcwd();\n        if ($curdir === false) {\n            self::fail('Unable to obtain current directory');\n        } else {\n            $this->curdir = $curdir;\n        }\n    }\n\n    protected function tearDown(): void\n    {\n        chdir($this->curdir);\n    }\n\n    public function testImagesRoot(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $drawing = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing();\n        $drawing->setName('Test');\n        $drawing->setDescription('Test');\n        $root = 'http://www.example.com';\n        $newdir = __DIR__ . '/../../../data/Reader/HTML';\n        $stub = 'image.jpg';\n        $imagePath = \"./$stub\";\n        chdir($newdir);\n        self::assertFileExists($imagePath);\n        $drawing->setPath($imagePath);\n        $desc = 'Test <img> tag';\n        $drawing->setDescription($desc);\n        $drawing->setHeight(36);\n        $drawing->setWorksheet($spreadsheet->getActiveSheet());\n        $drawing->setCoordinates('A1');\n        $sheet->setCellValue('A2', 'Image Above?');\n\n        $writer = new Html($spreadsheet);\n        $writer->setImagesRoot($root);\n        $html = $writer->generateHTMLAll();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n\n        $tabl = $divs->item(0)?->getElementsByTagName('table');\n        $tbod = $tabl?->item(0)?->getElementsByTagName('tbody');\n        $rows = $tbod?->item(0)?->getElementsByTagName('tr');\n        self::assertCount(2, $rows);\n\n        $tds = $rows?->item(0)?->getElementsByTagName('td');\n        self::assertCount(1, $tds);\n        $img = $tds?->item(0)?->getElementsByTagName('img');\n        self::assertCount(1, $img);\n        self::assertSame(\"$root/$stub\", $img?->item(0)?->getAttribute('src'));\n        self::assertSame($desc, $img->item(0)->getAttribute('alt'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/InvalidFileNameTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass InvalidFileNameTest extends Functional\\AbstractFunctional\n{\n    public function testEmptyFileName(): void\n    {\n        $this->expectException(WriterException::class);\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue('Cell 1');\n        $writer = new Html($spreadsheet);\n        $writer->save('');\n    }\n\n    public function testEmptyFileNamePdf(): void\n    {\n        $this->expectException(WriterException::class);\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue('Cell 1');\n        $writer = new Mpdf($spreadsheet);\n        $writer->save('');\n    }\n\n    public function testNotEmptyTempdirNamePdf(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue('Cell 1');\n        $writer = new Mpdf($spreadsheet);\n        $writer->setFont('Helvetica');\n        self::assertEquals('Helvetica', $writer->getFont());\n        $writer->setPaperSize(PageSetup::PAPERSIZE_LEDGER);\n        self::assertEquals($writer->getPaperSize(), PageSetup::PAPERSIZE_LEDGER);\n        self::assertEquals(File::sysGetTempDir() . '/phpsppdf', $writer->getTempDir());\n        $writer->setTempDir(File::sysGetTempDir());\n        self::assertEquals(File::sysGetTempDir(), $writer->getTempDir());\n    }\n\n    public function testEmptyTempdirNamePdf(): void\n    {\n        $this->expectException(WriterException::class);\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()->getCell('A1')->setValue('Cell 1');\n        $writer = new Mpdf($spreadsheet);\n        $writer->setTempDir('');\n    }\n\n    public function testWinFileNames(): void\n    {\n        self::assertEquals('file:///C:/temp/filename.xlsx', Html::winFileToUrl('C:\\temp\\filename.xlsx'));\n        self::assertEquals('/tmp/filename.xlsx', Html::winFileToUrl('/tmp/filename.xlsx'));\n        self::assertEquals('a:bfile', Html::winFileToUrl('a:bfile'));\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/Issue1319Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue1319Test extends TestCase\n{\n    public static function testFromExcelFile(): void\n    {\n        $file = 'tests/data/Reader/XLSX/issue.1319.bug2.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        $html = (string) preg_replace('/\\r?\\n\\s+/m', '', $html);\n        $spreadsheet->disconnectWorksheets();\n        $expectedArray = [\n            'table.sheet0 col.col0 { width:42pt }',\n            'table.sheet0 col.col1 { width:42pt }',\n            'table.sheet0 col.col2 { width:42pt }',\n            'table.sheet0 col.col3 { width:42pt }',\n            'table.sheet0 col.col4 { width:42pt }',\n            '<tr class=\"row0\"><td class=\"column0 style1 s style1\" colspan=\"5\" rowspan=\"3\">test</td></tr>',\n            '<tr class=\"row1\"></tr>',\n            '<tr class=\"row2\"></tr>',\n        ];\n        foreach ($expectedArray as $expected) {\n            self::assertStringContainsString($expected, $html);\n        }\n    }\n\n    public static function testFromScratch(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('test');\n        $sheet->mergeCells('A1:E3');\n        $sheet->getStyle('A1')->getFont()\n            ->setBold(true)\n            ->setSize(18);\n        $sheet->getStyle('A1')->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_CENTER)\n            ->setVertical(Alignment::VERTICAL_CENTER);\n\n        // Following not needed when reading Excel, only from scratch.\n        // columnDimension needed, rowDimension not needed\n        //$sheet->getRowDimension(3);\n        $sheet->getColumnDimension('E');\n\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        $html = (string) preg_replace('/\\r?\\n\\s+/m', '', $html);\n        $spreadsheet->disconnectWorksheets();\n        $expectedArray = [\n            '<col class=\"col0\" />',\n            '<col class=\"col1\" />',\n            '<col class=\"col2\" />',\n            '<col class=\"col3\" />',\n            '<col class=\"col4\" />',\n            '<tr class=\"row0\"><td class=\"column0 style1 s style0\" colspan=\"5\" rowspan=\"3\">test</td></tr>',\n            '<tr class=\"row1\"></tr>',\n            '<tr class=\"row2\"></tr>',\n        ];\n        foreach ($expectedArray as $expected) {\n            self::assertStringContainsString($expected, $html);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/Issue3678Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3678Test extends TestCase\n{\n    public function testInlineAndNot(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setShowGridlines(false);\n        $sheet->setPrintGridlines(true);\n        $sheet->getCell('A1')->setValue(1);\n        $styleArray = [\n            'fill' => [\n                'fillType' => Fill::FILL_SOLID,\n                'color' => ['rgb' => 'FFFF00'],\n            ],\n        ];\n        $sheet->getStyle('A1')->applyFromArray($styleArray);\n        $style1 = \"vertical-align:bottom; border-bottom:none #000000; border-top:none #000000; border-left:none #000000; border-right:none #000000; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#FFFF00\";\n        $style2 = \"vertical-align:bottom; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#FFFF00\";\n        $style2 .= '; text-align:right; width:42pt';\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('td.style1, th.style1 { ' . $style1 . ' }', $html);\n        self::assertStringContainsString('<td class=\"column0 style1 n\">1</td>', $html);\n        self::assertStringContainsString('table.sheet0 col.col0 { width:42pt }', $html);\n        self::assertStringContainsString('.n { text-align:right }', $html);\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<td class=\"gridlinesp\" style=\"' . $style2 . '\">1</td>', $html);\n        $sheet->setPrintGridlines(false);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<td style=\"' . $style2 . '\">1</td>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/Issue4539Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4539Test extends TestCase\n{\n    public function testInlineAndNot(): void\n    {\n        $infile = 'tests/data/Reader/XLSX/issue.4539.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($infile);\n        $writer = new Html($spreadsheet);\n        $writer->setConditionalFormatting(true);\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        $expected = '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Aptos Narrow\\'; font-size:12pt; text-align:right; width:102pt; color:#000000;background-color:#5A8AC6;\">5</td>';\n        self::assertStringContainsString($expected, $html, 'inline conditional style');\n        $expected = '<td style=\"vertical-align:bottom; font-weight:bold; color:#000000; font-family:\\'Aptos Narrow\\'; font-size:12pt; text-align:left; width:102pt\">Column Heading</td>';\n        self::assertStringContainsString($expected, $html, 'inline no conditional style');\n        $expected = '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Aptos Narrow\\'; font-size:12pt; text-align:right; width:102pt; border-top:1px solid #92D050 !important;color:#000000;\">1</td>';\n        self::assertStringContainsString($expected, $html, 'inline border-top');\n        $expected = '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Aptos Narrow\\'; font-size:12pt; text-align:right; width:102pt; border-top:1px solid #FF0000 !important;font-weight:bold;color:#000000;\">2</td>';\n        self::assertStringContainsString($expected, $html, 'inline border-top and bold');\n        $expected = '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Aptos Narrow\\'; font-size:12pt; text-align:right; width:102pt\">3</td>';\n        self::assertStringContainsString($expected, $html, 'inline nomatch');\n\n        $writer->setUseInlineCss(false);\n        $html = $writer->generateHtmlAll();\n        $expected = '<td class=\"column0 style0 n\" style=\"color:#000000;background-color:#5A8AC6;\">5</td>';\n        self::assertStringContainsString($expected, $html, 'notinline conditional style');\n        $expected = '<td class=\"column0 style1 s\">Column Heading</td>';\n        self::assertStringContainsString($expected, $html, 'notinline no conditional style');\n        $expected = '<td class=\"column0 style0 n\" style=\"border-top:1px solid #92D050 !important;color:#000000;\">1</td>';\n        self::assertStringContainsString($expected, $html, 'notinline border-top');\n        $expected = '<td class=\"column0 style0 n\" style=\"border-top:1px solid #FF0000 !important;font-weight:bold;color:#000000;\">2</td>';\n        self::assertStringContainsString($expected, $html, 'notinline border-top bold');\n        $expected = '<td class=\"column0 style0 n\">3</td>';\n        self::assertStringContainsString($expected, $html, 'notinline nomatch');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/Issue4773Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4773Test extends TestCase\n{\n    public static function testLineBreaks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getPageSetup()->setFitToWidth(1);\n        $sheet->getPageSetup()->setFitToHeight(0);\n        $sheet->getPageMargins()->setTop(0.2);\n        $sheet->getPageMargins()->setRight(0.2);\n        $sheet->getPageMargins()->setLeft(0.2);\n        $sheet->getPageMargins()->setBottom(0.5);\n\n        $sheet->getColumnDimension('A')->setWidth(20);\n        $sheet->getColumnDimension('B')->setWidth(20);\n\n        $sheet->getStyle('A1')->getFont()\n            ->setSize(12)\n            ->setItalic(true);\n        $sheet->getStyle('A1')->getAlignment()\n            ->setWrapText(true);\n        $sheet->setCellValue('A1', \"ABC\\nDEF\\nGHI\");\n\n        $richText = new RichText();\n        $run1 = $richText->createTextRun(\"bold\\n\");\n        $run1->getFont()?->setBold(true);\n        $run3 = $richText->createTextRun('italic');\n        $run3->getFont()?->setItalic(true);\n        $sheet->getStyle('B1')->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER)\n            ->setWrapText(true);\n        $sheet->setCellValue('B1', $richText);\n\n        $writer = new HtmlWriter($spreadsheet);\n        $eol = $writer->getLineEnding();\n        $content = $writer->generateHtmlAll();\n        $expected1 = '<td class=\"column0 style1 s\">ABC<br />' . $eol . 'DEF<br />' . $eol . 'GHI</td>';\n        self::assertStringContainsString($expected1, $content, 'br tags without newline in normal text');\n        $expected2 = '<td class=\"column1 style2 inlineStr\"><span style=\"font-weight:bold; text-decoration:normal; font-style:normal; color:#000000; font-family:\\'Calibri\\'; font-size:11pt\">bold<br />' . $eol . '</span><span style=\"font-weight:normal; text-decoration:normal; font-style:italic; color:#000000; font-family:\\'Calibri\\'; font-size:11pt\">italic</span></td>';\n        self::assertStringContainsString($expected2, $content, 'only one br tag, plus newline, in rich text');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/LineEndingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass LineEndingTest extends TestCase\n{\n    private int $expectedLines = 58;\n\n    private Spreadsheet $spreadsheet;\n\n    protected function tearDown(): void\n    {\n        $this->spreadsheet->disconnectWorksheets();\n        unset($this->spreadsheet);\n    }\n\n    public function testDefault(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $writer = new HtmlWriter($this->spreadsheet);\n        self::assertSame(PHP_EOL, $writer->getLineEnding());\n        $html = $writer->generateHtmlAll();\n        $count = substr_count($html, PHP_EOL);\n        self::assertSame($this->expectedLines, $count);\n    }\n\n    public function testUnix(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $writer = new HtmlWriter($this->spreadsheet);\n        $writer->setLineEnding(\"\\n\");\n        $html = $writer->generateHtmlAll();\n        $count = substr_count($html, \"\\n\");\n        self::assertSame($this->expectedLines, $count);\n        $count = substr_count($html, \"\\r\");\n        self::assertSame(0, $count);\n    }\n\n    public function testWindows(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $writer = new HtmlWriter($this->spreadsheet);\n        $writer->setLineEnding(\"\\r\\n\");\n        $html = $writer->generateHtmlAll();\n        $count = substr_count($html, \"\\n\");\n        self::assertSame($this->expectedLines, $count);\n        $count = substr_count($html, \"\\r\");\n        self::assertSame($this->expectedLines, $count);\n        $count = substr_count($html, \"\\r\\n\");\n        self::assertSame($this->expectedLines, $count);\n    }\n\n    public function testInvalidLineEnding(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Line ending must be');\n        $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $writer = new HtmlWriter($this->spreadsheet);\n        $writer->setLineEnding(\"\\r\");\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/LongTitleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass LongTitleTest extends AbstractFunctional\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerTitles')]\n    public function testLongTitle(string $expected, string $title): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet\n            ->getProperties()\n            ->setTitle($title);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame($expected, $reloadedSpreadsheet->getActiveSheet()->getTitle());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerTitles(): array\n    {\n        return [\n            ['Worksheet', 'This title is just a bit too long'],\n            ['Worksheet', 'Invalid * character'],\n            ['Legitimate Title', 'Legitimate Title'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/MailtoTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MailtoTest extends TestCase\n{\n    public function testBadHyperlink(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setCellValue('A1', 'Mail Me!');\n        $worksheet->getCell('A1')\n            ->getHyperlink()\n            ->setUrl('mailto:me@example.com');\n        $worksheet->setCellValue('A2', 'Mail You!');\n        $worksheet->getCell('A2')\n            ->getHyperlink()\n            ->setTooltip('go ahead')\n            ->setUrl('mailto:you@example.com');\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<a href=\"mailto:me@example.com\">Mail Me!</a>', $html);\n        self::assertStringContainsString('<a href=\"mailto:you@example.com\" title=\"go ahead\">Mail You!</a>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/MemoryDrawingOffsetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MemoryDrawingOffsetTest extends TestCase\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('dataProvider')]\n    public function testMemoryDrawingOffset(int $w, int $h, int $x, int $y): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $image = file_get_contents(__DIR__ . '/../../../data/Reader/HTML/memoryDrawingTest.jpg');\n        self::assertNotFalse($image, 'unable to read file');\n        $image = imagecreatefromstring($image);\n        self::assertNotFalse($image, 'unable to create image from string');\n        $drawing = new MemoryDrawing();\n        $drawing->setImageResource($image)\n            ->setResizeProportional(false) //是否保持比例\n            ->setWidthAndHeight($w, $h) //图片宽高,原始尺寸 100*100\n            ->setOffsetX($x)\n            ->setOffsetY($y)\n            ->setWorksheet($sheet);\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('width:' . $w . 'px;left: ' . $x . 'px; top: ' . $y . 'px;position: absolute;', $html);\n        $spreadsheet->disconnectWorksheets();\n        unset($spreadsheet);\n    }\n\n    public static function dataProvider(): array\n    {\n        return [\n            [33, 19, 0, 20],\n            [129, 110, 12, -3],\n            [55, 110, 33, 42],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/NavigationBadTitleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NavigationBadTitleTest extends TestCase\n{\n    public function testNavigationTitle(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('<img src=x onerror=alert(1)>');\n        $sheet2->getCell('A2')->setValue(2);\n\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->writeAllSheets();\n        $eol = $writer->getLineEnding();\n        $html = $writer->generateHTMLAll();\n        $expected = '<ul class=\"navigation\">'\n            . $eol\n            . '  <li class=\"sheet0\"><a href=\"#sheet0\">Worksheet</a></li>'\n            . $eol\n            . '  <li class=\"sheet1\"><a href=\"#sheet1\">&lt;img src=x onerror=alert(1)&gt;</a></li>'\n            . $eol\n            . '</ul>';\n        self::assertStringContainsString($expected, $html, 'appropriate characters are escaped');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/NoJavascriptLinksTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NoJavascriptLinksTest extends TestCase\n{\n    public function testNoJavascriptLinks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Click me');\n        $hyperlink = new Hyperlink('http://www.example.com');\n        $sheet->getCell('A1')->setHyperlink($hyperlink);\n        $sheet->getCell('A2')->setValue('JS link');\n        $hyperlink2 = new Hyperlink('javascript:alert(\\'hello1\\')');\n        $sheet->getCell('A2')->setHyperlink($hyperlink2);\n        $sheet->getCell('A3')->setValue('=HYPERLINK(\"javascript:alert(\\'hello2\\')\", \"jsfunc click\")');\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        self::assertStringContainsString('<td class=\"column0 style0 s\"><a href=\"http://www.example.com\">Click me</a></td>', $html, 'http hyperlink retained');\n        self::assertStringContainsString('<td class=\"column0 style0 s\">javascript:alert(\\'hello1\\')</td>', $html, 'javascript hyperlink dropped');\n        self::assertStringContainsString('<td class=\"column0 style0 s\">javascript:alert(\\'hello2\\')</td>', $html, 'javascript hyperlink function dropped');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/NoTitleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass NoTitleTest extends TestCase\n{\n    public function testNoTitle(): void\n    {\n        $file = 'tests/data/Reader/XLSX/blankcell.xlsx';\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($file);\n        self::assertSame('', $spreadsheet->getProperties()->getTitle());\n\n        $writer = new Html($spreadsheet);\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHTMLAll();\n        self::assertStringContainsString('<title>Sheet1</title>', $html);\n        self::assertStringContainsString('<td class=\"gridlines\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt\">C1</td>', $html);\n        $writer->setUseInlineCss(false);\n        $html = $writer->generateHTMLAll();\n        self::assertStringContainsString('<td class=\"column2 style0 s\">C1</td>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testHideSomeGridlines(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                [1, 2, 3, 4, 5, 6],\n                [7, 8, 9, 10, 11, 12],\n                [17, 18, 19, 20, 21, 22],\n                [27, 28, 29, 30, 31, 32],\n                [37, 38, 39, 40, 41, 42],\n            ]\n        );\n        $sheet->getStyle('B2:D4')->getBorders()->applyFromArray(\n            [\n                'allBorders' => [\n                    'borderStyle' => Border::BORDER_NONE,\n                    'color' => ['rgb' => '808080'],\n                ],\n            ],\n        );\n\n        $writer = new Html($spreadsheet);\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHTMLAll();\n        self::assertStringContainsString('<td class=\"gridlines\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">7</td>', $html);\n        self::assertStringContainsString('<td class=\"gridlines\" style=\"vertical-align:bottom; border-bottom:none #808080; border-top:none #808080; border-left:none #808080; border-right:none #808080; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">19</td>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/PrintAreaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html as HtmlReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PrintAreaTest extends TestCase\n{\n    public function testPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $inArray = [\n            [1, 2, 3, 4, 5],\n            [6, 7, 8, 9, 10],\n            [11, 12, 13, 14, 15],\n            [16, 17, 18, 19, 20],\n            [21, 22, 23, 24, 25],\n            [26, 27, 28, 29, 30],\n        ];\n        $sheet->fromArray($inArray);\n        $sheet->getPageSetup()->setPrintArea('B2:D4');\n        $writer = new HtmlWriter($spreadsheet);\n        $eol = $writer->getLineEnding();\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            \"<table data-printarea='B2:D4' id='sheet0' class='sheet0 gridlines'>\",\n            $html\n        );\n        $expectedArray = [\n            '@media print {',\n            '    table.sheet0 tr.row0 td { display:none }',\n            '    table.sheet0 tr.row4 td { display:none }',\n            '    table.sheet0 tr.row5 td { display:none }',\n            '    table.sheet0 td.column0 { display:none }',\n            '    table.sheet0 td.column4 { display:none }',\n            '}',\n        ];\n        $expectedString = implode($eol, $expectedArray);\n        self::assertStringContainsString(\n            $expectedString,\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new HtmlReader();\n        $spreadsheet2 = $reader->loadFromString($html);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertSame('B2:D4', $sheet2->getPageSetup()->getPrintArea());\n        self::assertSame($inArray, $sheet2->toArray(null, false, false));\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/ReadOrderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Html as HtmlReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReadOrderTest extends TestCase\n{\n    public function testInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '1-' . 'منصور حسين الناصر');\n        $sheet->setCellValue('A2', '1-' . 'منصور حسين الناصر');\n        $sheet->setCellValue('A3', '1-' . 'منصور حسين الناصر');\n        $sheet->getStyle('A1')\n            ->getAlignment()->setReadOrder(Alignment::READORDER_RTL);\n        $sheet->getStyle('A2')\n            ->getAlignment()->setReadOrder(Alignment::READORDER_LTR);\n        $sheet->getStyle('A2')->getFont()->setName('Arial');\n        $sheet->getStyle('A3')->getFont()->setName('Times New Roman');\n        $sheet->setCellValue('A5', 'hello');\n        $sheet->getStyle('A5')->getFont()->setName('Tahoma');\n        $sheet->getStyle('A5')\n            ->getAlignment()->setIndent(2);\n        $writer = new HtmlWriter($spreadsheet);\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            '<td class=\"gridlines\" style=\"vertical-align:bottom; direction:rtl; color:#000000; font-family:\\'Calibri\\';',\n            $html\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines\" style=\"vertical-align:bottom; direction:ltr; color:#000000; font-family:\\'Arial\\';',\n            $html\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Times New Roman\\';',\n            $html\n        );\n        self::assertStringContainsString(\n            '>&nbsp;</td>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines\" style=\"vertical-align:bottom; text-indent:18px; color:#000000; font-family:\\'Tahoma\\';',\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new HtmlReader();\n        $spreadsheet2 = $reader->loadFromString($html);\n        $sheet0 = $spreadsheet2->getActiveSheet();\n        self::assertSame(\n            Alignment::READORDER_RTL,\n            $sheet0->getStyle('A1')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_LTR,\n            $sheet0->getStyle('A2')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_CONTEXT,\n            $sheet0->getStyle('A3')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            2,\n            $sheet0->getStyle('A5')->getAlignment()->getIndent()\n        );\n        $spreadsheet2->disconnectWorksheets();\n    }\n\n    public function testNotInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '1-' . 'منصور حسين الناصر');\n        $sheet->setCellValue('A2', '1-' . 'منصور حسين الناصر');\n        $sheet->setCellValue('A3', '1-' . 'منصور حسين الناصر');\n        $sheet->getStyle('A1')\n            ->getAlignment()->setReadOrder(Alignment::READORDER_RTL);\n        $sheet->getStyle('A2')\n            ->getAlignment()->setReadOrder(Alignment::READORDER_LTR);\n        $sheet->getStyle('A2')->getFont()->setName('Arial');\n        $sheet->getStyle('A3')->getFont()->setName('Times New Roman');\n        $sheet->setCellValue('A5', 'hello');\n        $sheet->getStyle('A5')->getFont()->setName('Tahoma');\n        $sheet->getStyle('A5')\n            ->getAlignment()->setIndent(2);\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            'td.style1, th.style1 { vertical-align:bottom; direction:rtl; border-bottom',\n            $html\n        );\n        self::assertStringContainsString(\n            'td.style2, th.style2 { vertical-align:bottom; direction:ltr; border-bottom',\n            $html\n        );\n        self::assertStringContainsString(\n            'td.style3, th.style3 { vertical-align:bottom; border-bottom',\n            $html\n        );\n        self::assertStringContainsString(\n            '>&nbsp;</td>',\n            $html\n        );\n        self::assertStringContainsString(\n            'td.style4, th.style4 { vertical-align:bottom; text-indent:18px;',\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n        // PhpSpreadsheet does not read non-inline styles\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/RepeatedRowsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse DOMDocument;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass RepeatedRowsTest extends Functional\\AbstractFunctional\n{\n    public function testWriteRepeats(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setRowsToRepeatAtTop([1, 2]);\n        $sheet->setCellValue('A1', 'Repeat1');\n        $sheet->setCellValue('A2', 'Repeat2');\n        for ($row = 3; $row <= 100; ++$row) {\n            $sheet->setCellValue(\"A$row\", $row);\n        }\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLall();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n        $tbl = $divs->item(0)?->getElementsByTagName('table');\n        self::assertSame('', $tbl?->item(0)?->getAttribute('style'));\n        $thd = $divs->item(0)?->getElementsByTagName('thead');\n        self::assertCount(1, $thd);\n        $trw = $thd?->item(0)?->getElementsByTagName('tr');\n        self::assertCount(2, $trw);\n        $tbd = $divs->item(0)?->getElementsByTagName('tbody');\n        self::assertCount(1, $tbd);\n        $trw = $tbd?->item(0)?->getElementsByTagName('tr');\n        self::assertCount(98, $trw);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testWriteNoRepeats(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        //$sheet->getPageSetup()->setRowsToRepeatAtTop([1, 2]);\n        $sheet->setCellValue('A1', 'Repeat1');\n        $sheet->setCellValue('A2', 'Repeat2');\n        for ($row = 3; $row <= 100; ++$row) {\n            $sheet->setCellValue(\"A$row\", $row);\n        }\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLall();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n        $tbl = $divs->item(0)?->getElementsByTagName('table');\n        $thd = $tbl?->item(0)?->getElementsByTagName('thead');\n        self::assertCount(0, $thd);\n        //$trw = $thd->item(0)->getElementsByTagName('tr');\n        //self::assertCount(2, $trw);\n        $tbd = $divs->item(0)?->getElementsByTagName('tbody');\n        self::assertCount(1, $tbd);\n        $trw = $tbd?->item(0)?->getElementsByTagName('tr');\n        self::assertCount(100, $trw);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n\n    public function testWriteRepeatsInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getPageSetup()->setRowsToRepeatAtTop([1, 2]);\n        $sheet->setCellValue('A1', 'Repeat1');\n        $sheet->setCellValue('A2', 'Repeat2');\n        for ($row = 3; $row <= 100; ++$row) {\n            $sheet->setCellValue(\"A$row\", $row);\n        }\n\n        $writer = new Html($spreadsheet);\n        self::assertFalse($writer->getUseInlineCss());\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHTMLall();\n        $dom = new DOMDocument();\n        $dom->loadHTML($html);\n        $body = $dom->getElementsByTagName('body')->item(0);\n        self::assertNotNull($body);\n        $divs = $body->getElementsByTagName('div');\n        $tbl = $divs->item(0)?->getElementsByTagName('table');\n        self::assertSame('border-collapse:collapse', $tbl?->item(0)?->getAttribute('style'));\n        $thd = $divs->item(0)?->getElementsByTagName('thead');\n        self::assertCount(1, $thd);\n        $trw = $thd?->item(0)?->getElementsByTagName('tr');\n        self::assertCount(2, $trw);\n        $tbd = $divs->item(0)?->getElementsByTagName('tbody');\n        self::assertCount(1, $tbd);\n        $trw = $tbd?->item(0)?->getElementsByTagName('tr');\n        self::assertCount(98, $trw);\n\n        $rls = $this->writeAndReload($spreadsheet, 'Html');\n        $spreadsheet->disconnectWorksheets();\n        $rls->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/RichTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RichTextTest extends TestCase\n{\n    public function testRichText(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $rtf = new RichText();\n        $rtf->createText('~Cell Style~');\n        $rtf->createTextRun('~RTF Style~')->getFont()?->setItalic(true);\n        $rtf->createText('~No Style~');\n        $sheet->getCell('A1')->setValue($rtf);\n        $sheet->getStyle('A1')->getFont()->setBold(true);\n\n        $fontStyle = $sheet->getStyle('A1')->getFont();\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n\n        $a1Value = $sheet->getCell('A1')->getValue();\n        self::assertInstanceOf(RichText::class, $a1Value);\n        $elements = $a1Value->getRichTextElements();\n        self::assertCount(3, $elements);\n        self::assertNull($elements[0]->getFont());\n        $fontStyle = $elements[1]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertFalse($fontStyle->getBold());\n        self::assertTrue($fontStyle->getItalic());\n        self::assertNull($elements[0]->getFont());\n\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('td.style1, th.style1 { vertical-align:bottom; border-bottom:none #000000; border-top:none #000000; border-left:none #000000; border-right:none #000000; font-weight:bold; color:#000000; font-family:\\'Calibri\\'; font-size:11pt }', $html, 'cell style');\n\n        self::assertStringContainsString('<td class=\"column0 style1 inlineStr\"><span style=\"font-weight:bold; text-decoration:normal; font-style:normal; color:#000000; font-family:\\'Calibri\\'; font-size:11pt\">~Cell Style~</span>', $html, 'cell style and first text element');\n\n        self::assertStringContainsString('<span style=\"font-weight:normal; text-decoration:normal; font-style:italic; color:#000000; font-family:\\'Calibri\\'; font-size:11pt\">~RTF Style~</span>', $html, 'second text element');\n\n        self::assertStringContainsString('<span style=\"font-weight:bold; text-decoration:normal; font-style:normal; color:#000000; font-family:\\'Calibri\\'; font-size:11pt\">~No Style~</span></td>', $html, 'third text element');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testNoFont(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $rtf = new RichText();\n        $rtf->createTextRun('no font')->setFont(null);\n        $sheet->setCellValue('A1', $rtf);\n        $writer = new HtmlWriter($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString('<td class=\"column0 style0 inlineStr\"><span>no font</span></td>', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/TextRotationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TextRotationTest extends TestCase\n{\n    public function testTextRotation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setPrintGridlines(true);\n        $sheet->getStyle('A7')->getAlignment()->setTextRotation(90);\n        $sheet->setCellValue('A7', 'Lorem Ipsum');\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(' transform:rotate(90deg);', $html);\n        $spreadsheet->disconnectWorksheets();\n        unset($spreadsheet);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/TransparentDrawingsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html as HtmlWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TransparentDrawingsTest extends TestCase\n{\n    public function testHtmlTransparentDrawing(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setShowGridLines(false);\n\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        self::assertEquals($drawing->getWidth(), 100);\n        self::assertEquals($drawing->getHeight(), 100);\n        $drawing->setCoordinates('A1');\n        $drawing->setCoordinates2('E8');\n        $drawing->setOpacity(25000);\n        $drawing->setWorksheet($sheet);\n\n        $writer = new HtmlWriter($spreadsheet);\n        $content = $writer->generateHTMLAll();\n        self::assertStringContainsString('opacity:0.25;', $content);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testHtmlTransparentMemoryDrawing(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setShowGridLines(false);\n\n        $contents = file_get_contents('tests/data/Writer/XLSX/blue_square.png');\n        $drawing = MemoryDrawing::fromString(\"$contents\");\n        $drawing->setName('Blue Square');\n        self::assertEquals($drawing->getWidth(), 100);\n        self::assertEquals($drawing->getHeight(), 100);\n        $drawing->setCoordinates('A1');\n        $drawing->setCoordinates2('E8');\n        $drawing->setOpacity(25000);\n        $drawing->setWorksheet($sheet);\n\n        $writer = new HtmlWriter($spreadsheet);\n        $content = $writer->generateHTMLAll();\n        self::assertStringContainsString('opacity:0.25;', $content);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/VisibilityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass VisibilityTest extends Functional\\AbstractFunctional\n{\n    public function testVisibility1(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 2);\n        $sheet->setCellValue('A3', 3);\n        $sheet->setCellValue('B1', 4);\n        $sheet->setCellValue('B2', 5);\n        $sheet->setCellValue('B3', 6);\n        $sheet->setCellValue('C1', 7);\n        $sheet->setCellValue('C2', 8);\n        $sheet->setCellValue('C3', 9);\n        $sheet->getColumnDimension('B')->setVisible(false);\n        $sheet->getRowDimension(2)->setVisible(false);\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        $reg = '/^\\s*table[.]sheet0 tr { display:none; visibility:hidden }\\s*$/m';\n        $rowsrch = preg_match($reg, $html);\n        self::assertEquals($rowsrch, 0);\n        $reg = '/^\\s*table[.]sheet0 tr[.]row1 { display:none; visibility:hidden }\\s*$/m';\n        $rowsrch = preg_match($reg, $html);\n        self::assertEquals($rowsrch, 1);\n        $reg = '/^\\s*table[.]sheet0 [.]column1 [{] display:none [}]\\s*$/m';\n        $colsrch = preg_match($reg, $html);\n        self::assertEquals($colsrch, 1);\n\n        $this->writeAndReload($spreadsheet, 'Html');\n    }\n\n    public function testVisibility2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 2);\n        $sheet->setCellValue('A3', 3);\n        $sheet->setCellValue('B1', 4);\n        $sheet->setCellValue('B2', 5);\n        $sheet->setCellValue('B3', 6);\n        $sheet->setCellValue('C1', 7);\n        $sheet->setCellValue('C2', 8);\n        $sheet->setCellValue('C3', 9);\n        $sheet->getDefaultRowDimension()->setVisible(false);\n        $sheet->getColumnDimension('B')->setVisible(false);\n        $sheet->getRowDimension(1)->setVisible(true);\n        $sheet->getRowDimension(3)->setVisible(true);\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        $reg = '/^\\s*table[.]sheet0 tr { height:15pt; display:none; visibility:hidden }\\s*$/m';\n        $rowsrch = preg_match($reg, $html);\n        self::assertEquals($rowsrch, 1);\n        $reg = '/^\\s*table[.]sheet0 tr[.]row1 { display:none; visibility:hidden }\\s*$/m';\n        $rowsrch = preg_match($reg, $html);\n        self::assertEquals($rowsrch, 0);\n        $reg = '/^\\s*table[.]sheet0 [.]column1 [{] display:none [}]\\s*$/m';\n        $colsrch = preg_match($reg, $html);\n        self::assertEquals($colsrch, 1);\n\n        $this->writeAndReload($spreadsheet, 'Html');\n    }\n\n    public function testDefaultRowHeight(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $sheet->getStyle('A1')->getFont()->setStrikethrough(true);\n        $sheet->setCellValue('A2', 2);\n        $sheet->setCellValue('A3', 3);\n        $sheet->getStyle('A3')->getFont()->setStrikethrough(true)->setUnderline(Font::UNDERLINE_SINGLE);\n        $sheet->setCellValue('B1', 4);\n        $sheet->setCellValue('B2', 5);\n        $sheet->setCellValue('B3', 6);\n        $sheet->setCellValue('C1', 7);\n        $sheet->setCellValue('C2', 8);\n        $sheet->setCellValue('C3', 9);\n        $sheet->getStyle('C3')->getFont()->setUnderline(Font::UNDERLINE_SINGLE);\n        $sheet->getDefaultRowDimension()->setRowHeight(20);\n        $sheet->getRowDimension(2)->setRowHeight(25);\n\n        $writer = new Html($spreadsheet);\n        $html = $writer->generateHTMLAll();\n        self::assertEquals(1, substr_count($html, 'height:20pt'));\n        self::assertEquals(1, substr_count($html, 'height:25pt'));\n        $rowsrch = preg_match('/^\\s*table[.]sheet0 tr [{] height:20pt [}]\\s*$/m', $html);\n        self::assertEquals(1, $rowsrch);\n        $rowsrch = preg_match('/^\\s*table[.]sheet0 tr[.]row1 [{] height:25pt [}]\\s*$/m', $html);\n        self::assertEquals(1, $rowsrch);\n        $rowsrch = preg_match('/^\\s*td[.]style1, th[.]style1 [{].*text-decoration:line-through;.*[}]\\s*$/m', $html);\n        self::assertEquals(1, $rowsrch);\n        $rowsrch = preg_match('/^\\s*td[.]style2, th[.]style2 [{].*text-decoration:underline line-through;.*[}]\\s*$/m', $html);\n        self::assertEquals(1, $rowsrch);\n        $rowsrch = preg_match('/^\\s*td[.]style3, th[.]style3 [{].*text-decoration:underline;.*[}]\\s*$/m', $html);\n        self::assertEquals(1, $rowsrch);\n\n        $this->writeAndReload($spreadsheet, 'Html');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Html/XssVulnerabilityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Html;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Html;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass XssVulnerabilityTest extends Functional\\AbstractFunctional\n{\n    public static function providerXssRichText(): array\n    {\n        return [\n            'basic text no problem' => ['Hello, I am safely viewing your site', 'Hello, I am safely viewing your site'],\n            'link eliminated' => [\"<a href='Visit Google'>Google is here</a>\", \"&lt;a href='Visit Google'&gt;Google is here&lt;/a&gt;\"],\n            'script tag' => [\"Hello, I am trying to <script>alert('Hack');</script> your site\", \"Hello, I am trying to &lt;script&gt;alert('Hack');&lt;/script&gt; your site\"],\n            'script tag with quotes' => ['Hello, I am trying to <script>alert(\"Hack\");</script> your site', 'Hello, I am trying to &lt;script&gt;alert(&quot;Hack&quot;);&lt;/script&gt; your site'],\n            'javascript tag no hex' => [\"<a href='javascript:alert(1)'>CLICK</a>\", \"&lt;a href='javascript:alert(1)'&gt;CLICK&lt;/a&gt;\"],\n            'javascript tag' => [\"<a href='&#x2000;javascript:alert(1)'>CLICK</a>\", \"&lt;a href='&amp;#x2000;javascript:alert(1)'&gt;CLICK&lt;/a&gt;\"],\n            'with unicode' => ['<a href=\"\\u0001java\\u0003script:alert(1)\">CLICK</a>', '&lt;a href=&quot;\\u0001java\\u0003script:alert(1)&quot;&gt;CLICK&lt;/a&gt;'],\n            'inline css' => ['<li style=\"list-style-image: url(javascript:alert(0))\">', '&lt;li style=&quot;list-style-image: url(javascript:alert(0))&quot;&gt;'],\n            'char value chevron' => [\"\\x3cscript src=http://www.example.com/malicious-code.js\\x3e\\x3c/script\\x3e\", '&lt;script src=http://www.example.com/malicious-code.js&gt;&lt;/script&gt;'],\n            'hexadecimal html' => ['<IMG SRC=&#106&#x61&#x76&#x61&#x73&#109&#x72&#x69&#x70&#x74&#x3A&#x61&#x6C&#x65&#x72&#x74&#x28&#x27&#x58&#x53&#x53&#x27&#x29>', '&lt;IMG SRC=&amp;#106&amp;#x61&amp;#x76&amp;#x61&amp;#x73&amp;#109&amp;#x72&amp;#x69&amp;#x70&amp;#x74&amp;#x3A&amp;#x61&amp;#x6C&amp;#x65&amp;#x72&amp;#x74&amp;#x28&amp;#x27&amp;#x58&amp;#x53&amp;#x53&amp;#x27&amp;#x29&gt;'],\n            'iframe' => ['<iframe width=\"560\" onclick=\"alert(\\'xss\\')\" height=\"315\" src=\"https://www.youtube.com/embed/whatever?rel=0&controls=0&showinfo=0\" frameborder=\"0\" allowfullscreen></iframe>', '&lt;iframe width=&quot;560&quot; onclick=&quot;alert(\\'xss\\')&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/whatever?rel=0&amp;controls=0&amp;showinfo=0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;'],\n        ];\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerXssRichText')]\n    public function testXssInComment(string $xssTextString, ?string $expected = null): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $startCell = '<td class=\"column0 style0 s\">';\n        $cellText = 'XSS Test';\n        $endCell = $cellText . '</td>';\n\n        $richText = new RichText();\n        $richText->createText($xssTextString);\n\n        $spreadsheet->getActiveSheet()->getCell('A1')\n            ->setValue($cellText);\n\n        $spreadsheet->getActiveSheet()\n            ->getComment('A1')\n            ->setText($richText);\n\n        $writer = new Html($spreadsheet);\n        $eol = $writer->getLineEnding();\n        if ($expected === null) { // whole comment stripped away\n            $expected = $startCell . $endCell;\n        } else {\n            $expected = $startCell . '<a class=\"comment-indicator\"></a><div class=\"comment\">' . $expected . '</div>' . $eol . $endCell;\n        }\n\n        $verify = $writer->generateHtmlAll();\n        // Ensure that executable js has been stripped from the comments\n        self::assertStringContainsString($expected, $verify);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testXssInFontName(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('here');\n        $used = 'Calibri</style><script type=\"text/javascript\">alert(\"hello\");</script><style type=\"text/css\">';\n        $expected = \"font-family:'Calibri&lt;/style&gt;&lt;script type=&quot;text/javascript&quot;&gt;alert(&quot;hello&quot;);&lt;/script&gt;&lt;style type=&quot;text/css&quot;&gt;'\";\n        $sheet->getStyle('A1')->getFont()->setName($used);\n\n        $writer = new Html($spreadsheet);\n        $verify = $writer->generateHtmlAll();\n        // Ensure that executable js has been stripped\n        self::assertStringNotContainsString($used, $verify);\n        self::assertStringContainsString($expected, $verify);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/GridlinesInlineTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass GridlinesInlineTest extends TestCase\n{\n    public function testGridlinesInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setShowGridlines(false);\n        $sheet1->setPrintGridlines(false);\n        $sheet1->fromArray([\n            [11, 12, 13],\n            [14, 15, 16],\n        ]);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setShowGridlines(false);\n        $sheet2->setPrintGridlines(true);\n        $sheet2->fromArray([\n            [21, 22, 23],\n            [24, 25, 26],\n        ]);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setShowGridlines(true);\n        $sheet3->setPrintGridlines(false);\n        $sheet3->fromArray([\n            [31, 32, 33],\n            [34, 35, 36],\n        ]);\n        $sheet4 = $spreadsheet->createSheet();\n        $sheet4->setShowGridlines(true);\n        $sheet4->setPrintGridlines(true);\n        $sheet4->fromArray([\n            [41, 42, 43],\n            [44, 45, 46],\n        ]);\n\n        $writer = new Mpdf($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">11</td>',\n            $html,\n            'neither gridlines nor gridlinesp'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">21</td>',\n            $html,\n            'gridlinesp without gridlines'\n        );\n        self::assertStringContainsString(\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">31</td>',\n            $html,\n            'gridlines without gridlinesp'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">41</td>',\n            $html,\n            'gridlines and gridlinesp'\n        );\n        $count = substr_count($html, 'page-break-before');\n        self::assertSame(1, $count);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testGridlinesCss(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setShowGridlines(false);\n        $sheet1->setPrintGridlines(false);\n        $sheet1->fromArray([\n            [11, 12, 13],\n            [14, 15, 16],\n        ]);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setShowGridlines(false);\n        $sheet2->setPrintGridlines(true);\n        $sheet2->fromArray([\n            [21, 22, 23],\n            [24, 25, 26],\n        ]);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setShowGridlines(true);\n        $sheet3->setPrintGridlines(false);\n        $sheet3->fromArray([\n            [31, 32, 33],\n            [34, 35, 36],\n        ]);\n        $sheet4 = $spreadsheet->createSheet();\n        $sheet4->setShowGridlines(true);\n        $sheet4->setPrintGridlines(true);\n        $sheet4->fromArray([\n            [41, 42, 43],\n            [44, 45, 46],\n        ]);\n\n        $writer = new Mpdf($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(false);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            \"<table id='sheet0' class='sheet0'>\",\n            $html,\n            'neither gridlines nor gridlinesp 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">11</td>',\n            $html,\n            'neither gridlines nor gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet1' class='sheet1 gridlinesp'>\",\n            $html,\n            'gridlinesp without gridlines 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">21</td>',\n            $html,\n            'gridlinesp without gridlines 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet2' class='sheet2 gridlines'>\",\n            $html,\n            'gridlines without gridlinesp 1'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">31</td>',\n            $html,\n            'gridlines without gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            \"<table id='sheet3' class='sheet3 gridlines gridlinesp'>\",\n            $html,\n            'gridlines and gridlinesp 2'\n        );\n        self::assertStringContainsString(\n            '<td class=\"column0 style0 n\" style=\"width:42pt\">41</td>',\n            $html,\n            'gridlines and gridlinesp 2'\n        );\n        $count = substr_count($html, 'page-break-before');\n        self::assertSame(1, $count);\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/HideMergeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HideMergeTest extends TestCase\n{\n    public function testHideWithMerge(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        // just some labels for better visualisation of the problem\n        $worksheet->setCellValue('A1', 'A');\n        $worksheet->setCellValue('B1', 'B');\n        $worksheet->setCellValue('C1', 'C');\n        // setting the row height to better visualize the problem\n        for ($i = 1; $i <= 10; ++$i) {\n            $worksheet->getRowDimension($i)->setRowHeight(17);\n        }\n        // Headline - merged over two cells AND two rows\n        $worksheet->mergeCells('B2:C3');\n        $worksheet->setCellValue('B2', 'Hello World Headline');\n        $worksheet->getStyle('B2:C3')->getFont()->setBold(true);\n        $worksheet->getStyle('B2:C3')\n            ->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $worksheet->getStyle('B2:C3')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // Content 1 - merge over two rows\n        $worksheet->mergeCells('B4:B5');\n        $worksheet->mergeCells('C4:C5');\n        $worksheet->setCellValue('B4', 'Label 1');\n        $worksheet->setCellValue('C4', 'Text 1');\n        $worksheet->getStyle('B4:B5')->getFont()->setBold(true);\n        $worksheet->getStyle('B4:C5')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $worksheet->getStyle('B4:B5')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n        $worksheet->getStyle('C4:C5')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // Content 2 - merge over two rows\n        $worksheet->mergeCells('B6:B7');\n        $worksheet->mergeCells('C6:C7');\n        $worksheet->setCellValue('B6', 'Label 2');\n        $worksheet->setCellValue('C6', 'Text 2');\n        $worksheet->getStyle('B6:B7')->getFont()->setBold(true);\n        $worksheet->getStyle('B6:C7')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $worksheet->getStyle('B6:B7')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n        $worksheet->getStyle('C6:C7')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // This is where the error was introduced (!!!)\n        $worksheet->getColumnDimension('A')->setVisible(false);\n        $mpdf = new Mpdf($spreadsheet);\n        $html = $mpdf->generateHtmlAll();\n        $html = preg_replace('/^\\s+/m', '', $html) ?? $html;\n        $html = preg_replace('/[\\n\\r]/', '', $html) ?? $html;\n        self::assertStringContainsString(\n            '<tr class=\"row0\">'\n                . '<td class=\"column1 style0 s\" style=\"width:42pt; height:17pt\">B</td>'\n                . '<td class=\"column2 style0 s\" style=\"width:42pt; height:17pt\">C</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row1\">'\n                . '<td class=\"column1 style1 s style1\" colspan=\"2\" rowspan=\"2\" style=\"width:84pt; height:17pt\">Hello World Headline</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row2\">'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row3\">'\n                . '<td class=\"column1 style2 s style2\" rowspan=\"2\" style=\"width:42pt; height:17pt\">Label 1</td>'\n                . '<td class=\"column2 style3 s style3\" rowspan=\"2\" style=\"width:42pt; height:17pt\">Text 1</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row4\">'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row5\">'\n                . '<td class=\"column1 style2 s style2\" rowspan=\"2\" style=\"width:42pt; height:17pt\">Label 2</td>'\n                . '<td class=\"column2 style3 s style3\" rowspan=\"2\" style=\"width:42pt; height:17pt\">Text 2</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr class=\"row6\">'\n                . '</tr>',\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/HideTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HideTest extends TestCase\n{\n    public function testHide(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            ['a1', 'b1', 'c1', 'd1', 'e1', 'f1'],\n            ['a2', 'b2', 'c2', 'd2', 'e2', 'f2'],\n            ['a3', 'b3', 'c3', 'd3', 'e3', 'f3'],\n            ['a4', 'b4', 'c4', 'd4', 'e4', 'f4'],\n            ['a5', 'b5', 'c5', 'd5', 'e5', 'f5'],\n            ['a6', 'b6', 'c6', 'd6', 'e6', 'f6'],\n        ]);\n        $sheet->getColumnDimension('B')->setVisible(false);\n        $sheet->getRowDimension(3)->setVisible(false);\n        $writer = new Mpdf($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringNotContainsString('a3', $html);\n        self::assertStringNotContainsString('b1', $html);\n        self::assertStringContainsString('a1', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/ImageCopyPdfTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls as XlsReader;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional;\n\nclass ImageCopyPdfTest extends Functional\\AbstractFunctional\n{\n    private string $xlsxFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->xlsxFile !== '') {\n            unlink($this->xlsxFile);\n            $this->xlsxFile = '';\n        }\n    }\n\n    public function testImageCopyXls(): void\n    {\n        $file = 'samples/templates/27template.xls';\n        $reader = new XlsReader();\n        $reloadedSpreadsheet = $reader->load($file);\n        $this->xlsxFile = File::temporaryFilename();\n\n        $writer = new Mpdf($reloadedSpreadsheet);\n        self::assertFalse($writer->getEmbedImages());\n        $html = $writer->generateHTMLAll();\n        self::assertSame(4, substr_count($html, '<img'));\n        self::assertSame(0, substr_count($html, 'zip://'));\n        // all 4 images converted to png\n        self::assertSame(4, substr_count($html, 'data:image/png;base64'));\n\n        $this->writeAndReload($reloadedSpreadsheet, 'Html');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testImageCopyXlsx(): void\n    {\n        $file = 'samples/templates/27template.xls';\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($file);\n        $this->xlsxFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($this->xlsxFile);\n        $spreadsheet->disconnectWorksheets();\n        $reader2 = new XlsxReader();\n        $reloadedSpreadsheet = $reader2->load($this->xlsxFile);\n\n        $writer = new Mpdf($reloadedSpreadsheet);\n        self::assertFalse($writer->getEmbedImages());\n        $html = $writer->generateHTMLAll();\n        self::assertSame(4, substr_count($html, '<img'));\n        self::assertSame(0, substr_count($html, 'zip://'));\n        // \"gif\" is actually stored as png in this file\n        self::assertSame(2, substr_count($html, 'data:image/png;base64'));\n        //self::assertSame(1, substr_count($html, 'data:image/gif;base64'));\n        self::assertSame(2, substr_count($html, 'data:image/jpeg;base64'));\n\n        $this->writeAndReload($reloadedSpreadsheet, 'Html');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/Issue4773Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf as MpdfWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4773Test extends TestCase\n{\n    public static function testLineBreaks(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        $sheet->getPageSetup()->setFitToWidth(1);\n        $sheet->getPageSetup()->setFitToHeight(0);\n        $sheet->getPageMargins()->setTop(0.2);\n        $sheet->getPageMargins()->setRight(0.2);\n        $sheet->getPageMargins()->setLeft(0.2);\n        $sheet->getPageMargins()->setBottom(0.5);\n\n        $sheet->getColumnDimension('A')->setWidth(20);\n        $sheet->getColumnDimension('B')->setWidth(20);\n\n        $sheet->getStyle('A1')->getFont()\n            ->setSize(12)\n            ->setItalic(true);\n        $sheet->getStyle('A1')->getAlignment()\n            ->setWrapText(true);\n        $sheet->setCellValue('A1', \"ABC\\nDEF\\nGHI\");\n\n        $richText = new RichText();\n        $run1 = $richText->createTextRun(\"bold\\n\");\n        $run1->getFont()?->setBold(true);\n        $run3 = $richText->createTextRun('italic');\n        $run3->getFont()?->setItalic(true);\n        $sheet->getStyle('B1')->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER)\n            ->setWrapText(true);\n        $sheet->setCellValue('B1', $richText);\n\n        $writer = new MpdfWriter($spreadsheet);\n        $content = $writer->generateHtmlAll();\n        $expected1 = '<td class=\"column0 style1 s\" style=\"width:105pt\">ABC<br />DEF<br />GHI</td>';\n        self::assertStringContainsString($expected1, $content, 'br tags without newline in normal text');\n        $expected2 = '<td class=\"column1 style2 inlineStr\" style=\"width:105pt\"><span style=\"font-weight:bold; text-decoration:normal; font-style:normal; color:#000000; font-family:\\'Calibri\\'; font-size:11pt\">bold<br /></span><span style=\"font-weight:normal; text-decoration:normal; font-style:italic; color:#000000; font-family:\\'Calibri\\'; font-size:11pt\">italic</span></td>';\n        self::assertStringContainsString($expected2, $content, 'br tag without newline in rich text');\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/MergedBorderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MergedBorderTest extends TestCase\n{\n    public static function testMergedBorder(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $target = 'A2:B5';\n        $sheet->mergeCells($target);\n        $sheet->setCellValue('A2', 'Planning');\n        $sheet->getStyle($target)->applyFromArray([\n            'borders' => [\n                'outline' => [\n                    'borderStyle' => Border::BORDER_HAIR,\n                    'color' => ['rgb' => 'FF0000'],\n                ],\n            ],\n        ]);\n        $sheet->setSelectedCells('D1');\n        $sheet->setCellValue('D1', 'Edge');\n        $sheet->setCellValue('D5', 'Edge');\n        $sheet->setShowGridlines(false);\n        $writer = new Mpdf($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertSame(0, preg_match('/border-(top|bottom|right|left):none #000000;/', $html));\n        self::assertSame(1, preg_match('/border-top:1px solid #FF0000 !important; border-left:1px solid #FF0000 !important;/', $html));\n        self::assertSame(1, preg_match('/border-bottom:1px solid #FF0000 !important; border-left:1px solid #FF0000 !important;/', $html));\n        self::assertSame(1, preg_match('/border-top:1px solid #FF0000 !important; border-right:1px solid #FF0000 !important;/', $html));\n        self::assertSame(1, preg_match('/border-bottom:1px solid #FF0000 !important; border-right:1px solid #FF0000 !important;/', $html));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/OrientationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\PageSetup;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass OrientationTest extends TestCase\n{\n    private const INITARRAY = [\n        [1, 2, 3, 4, 5],\n        [6, 7, 8, 9, 10],\n        [11, 12, 13, 14, 15],\n    ];\n\n    private static function setupSheet(): Spreadsheet\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->fromArray(self::INITARRAY);\n        $sheet1->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->fromArray(self::INITARRAY);\n        $sheet2->getPageSetup()->setOrientation(PageSetup::ORIENTATION_PORTRAIT);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->fromArray(self::INITARRAY);\n        $sheet3->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n\n        return $spreadsheet;\n    }\n\n    public static function testSheetOrientation(): void\n    {\n        $spreadsheet = self::setupSheet();\n        $writer = new Mpdf($spreadsheet);\n        //$writer->setOrientation( PageSetup::ORIENTATION_LANDSCAPE );\n        $writer->writeAllSheets();\n        $html = $writer->generateHtmlAll();\n        self::assertSame(2, substr_count($html, 'size: landscape;'));\n        self::assertSame(1, substr_count($html, 'size: portrait;'));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testLandscape(): void\n    {\n        $spreadsheet = self::setupSheet();\n        $writer = new Mpdf($spreadsheet);\n        $writer->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);\n        $writer->writeAllSheets();\n        $html = $writer->generateHtmlAll();\n        self::assertSame(3, substr_count($html, 'size: landscape;'));\n        self::assertSame(0, substr_count($html, 'size: portrait;'));\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public static function testPortrait(): void\n    {\n        $spreadsheet = self::setupSheet();\n        $writer = new Mpdf($spreadsheet);\n        $writer->setOrientation(PageSetup::ORIENTATION_PORTRAIT);\n        $writer->writeAllSheets();\n        $html = $writer->generateHtmlAll();\n        self::assertSame(0, substr_count($html, 'size: landscape;'));\n        self::assertSame(3, substr_count($html, 'size: portrait;'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/PrintAreaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf as MpdfWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PrintAreaTest extends TestCase\n{\n    public function testPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $inArray = [\n            [1, 2, 3, 4, 5],\n            [6, 7, 8, 9, 10],\n            [11, 12, 13, 14, 15],\n            [16, 17, 18, 19, 20],\n            [21, 22, 23, 24, 25],\n            [26, 27, 28, 29, 30],\n        ];\n        $sheet->fromArray($inArray);\n        $sheet->getPageSetup()->setPrintArea('B2:D4');\n        $writer = new MpdfWriter($spreadsheet);\n        $eol = $writer->getLineEnding();\n        $html = $writer->generateHtmlAll();\n        $html = preg_replace('/^ +/m', '', $html) ?? $html;\n        $expectedArray = [\n            '<tbody>',\n            '<tr class=\"row1\">',\n            '<td class=\"column1 style0 n\" style=\"width:42pt\">7</td>',\n            '<td class=\"column2 style0 n\" style=\"width:42pt\">8</td>',\n            '<td class=\"column3 style0 n\" style=\"width:42pt\">9</td>',\n            '</tr>',\n            '<tr class=\"row2\">',\n            '<td class=\"column1 style0 n\" style=\"width:42pt\">12</td>',\n            '<td class=\"column2 style0 n\" style=\"width:42pt\">13</td>',\n            '<td class=\"column3 style0 n\" style=\"width:42pt\">14</td>',\n            '</tr>',\n            '<tr class=\"row3\">',\n            '<td class=\"column1 style0 n\" style=\"width:42pt\">17</td>',\n            '<td class=\"column2 style0 n\" style=\"width:42pt\">18</td>',\n            '<td class=\"column3 style0 n\" style=\"width:42pt\">19</td>',\n            '</tr>',\n            '</tbody>',\n        ];\n        $expectedString = implode($eol, $expectedArray);\n        self::assertStringContainsString(\n            $expectedString,\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Mpdf/TextRotationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Mpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Mpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass TextRotationTest extends TestCase\n{\n    public function testTextRotation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setPrintGridlines(true);\n        $sheet->getStyle('A7')->getAlignment()->setTextRotation(90);\n        $sheet->setCellValue('A7', 'Lorem Ipsum');\n        $writer = new Mpdf($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(' text-rotate:90;', $html);\n        $spreadsheet->disconnectWorksheets();\n        unset($spreadsheet);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/ArrayTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Content;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ArrayTest extends AbstractFunctional\n{\n    private string $samplesPath = 'tests/data/Writer/Ods';\n\n    private string $compatibilityMode;\n\n    private bool $skipInline = true;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    public function testArrayXml(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(1);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('B1')->setValue('=UNIQUE(A1:A3)');\n\n        $content = new Content(new Ods($spreadsheet));\n        $xml = $content->write();\n        self::assertXmlStringEqualsXmlFile($this->samplesPath . '/content-arrays.xml', $xml);\n    }\n\n    public function testArray(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(1);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getCell('B1')->setValue('=UNIQUE(A1:A3)');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Ods');\n        Calculation::getInstance($reloadedSpreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(1, $sheet->getCell('A1')->getValue());\n        self::assertSame(1, $sheet->getCell('A2')->getValue());\n        self::assertSame(3, $sheet->getCell('A3')->getValue());\n        self::assertSame(3, $sheet->getCell('B2')->getValue());\n        self::assertTrue($sheet->getCell('B1')->isFormula());\n        self::assertSame(1, $sheet->getCell('B1')->getOldCalculatedValue());\n        self::assertNull($sheet->getCell('B3')->getValue());\n        self::assertEquals('=UNIQUE(A1:A3)', $sheet->getCell('B1')->getValue());\n        $cellFormulaAttributes = $sheet->getCell('B1')->getFormulaAttributes();\n        self::assertArrayHasKey('t', $cellFormulaAttributes);\n        self::assertSame('array', $cellFormulaAttributes['t']);\n        self::assertArrayHasKey('ref', $cellFormulaAttributes);\n        self::assertSame('B1:B2', $cellFormulaAttributes['ref']);\n        self::assertSame([[1], [3]], $sheet->getCell('B1')->getCalculatedValue());\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testInlineArrays(): void\n    {\n        if ($this->skipInline) {\n            self::markTestIncomplete('Ods Reader/Writer alter commas and semi-colons within formulas, interfering with inline arrays');\n        }\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=UNIQUE({1;1;2;1;3;2;4;4;4})');\n        $sheet->getCell('D1')->setValue('=UNIQUE({1,1,2,1,3,2,4,4,4},true)');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Ods');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $expected = [\n            ['=UNIQUE({1,1,2,1,3,2,4,4,4})', null, null, '=UNIQUE({1,1,2,1,3,2,4,4,4},true)', 2, 3, 4],\n            [2, null, null, null, null, null, null],\n            [3, null, null, null, null, null, null],\n            [4, null, null, null, null, null, null],\n        ];\n        self::assertSame($expected, $rsheet->toArray(null, false, false));\n        self::assertSame('1', $rsheet->getCell('A1')->getCalculatedValueString());\n        self::assertSame('1', $rsheet->getCell('D1')->getCalculatedValueString());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/AutoColorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\ODS;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods as OdsWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AutoColorTest extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    public function testAutoColor(): void\n    {\n        // It's not clear to me what AutoColor does in Excel.\n        // However, LibreOffice Dark Mode\n        // can make use of a spreadsheet which uses it.\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getDefaultStyle()->getFont()\n            ->setAutoColor(true);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'Hello World!');\n        $sheet->setCellValue('A2', 'Hello World!');\n        $sheet->getStyle('A2')->getFont()\n            ->setBold(true);\n        $sheet->setCellValue('A3', 'Hello World!');\n        $sheet->getStyle('A3')->getFont()\n            ->setItalic(true);\n        $sheet->setCellValue('B1', 'Hello World!');\n\n        $writer = new OdsWriter($spreadsheet);\n        $outputFile = $this->outputFile = File::temporaryFilename();\n        $writer->save($outputFile);\n        $spreadsheet->disconnectWorksheets();\n        $zipfile = \"zip://$outputFile#content.xml\";\n        $contents = file_get_contents($zipfile);\n        if ($contents === false) {\n            self::fail('Unable to open file');\n        } else {\n            self::assertStringContainsString('<style:text-properties style:use-window-font-color=\"true\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>', $contents);\n            self::assertStringContainsString('<style:text-properties fo:font-weight=\"bold\" style:font-weight-complex=\"bold\" style:font-weight-asian=\"bold\" style:use-window-font-color=\"true\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>', $contents);\n            self::assertStringContainsString('<style:text-properties fo:font-style=\"italic\" style:use-window-font-color=\"true\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>', $contents);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/AutoFilterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass AutoFilterTest extends AbstractFunctional\n{\n    public function testAutoFilterWriter(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $dataSet = [\n            ['Year', 'Quarter', 'Sales'],\n            [2020, 'Q1', 100],\n            [2020, 'Q2', 120],\n            [2020, 'Q3', 140],\n            [2020, 'Q4', 160],\n            [2021, 'Q1', 180],\n            [2021, 'Q2', 75],\n            [2021, 'Q3', 0],\n            [2021, 'Q4', 0],\n        ];\n        $worksheet->fromArray($dataSet, null, 'A1');\n        $worksheet->getAutoFilter()->setRange('A1:C9');\n\n        $reloaded = $this->writeAndReload($spreadsheet, 'Ods');\n\n        self::assertSame('A1:C9', $reloaded->getActiveSheet()->getAutoFilter()->getRange());\n    }\n\n    public function testPeriodInSheetNames(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setTitle('work.sheet');\n\n        $dataSet = [\n            ['Year', 'Quarter', 'Sales'],\n            [2020, 'Q1', 100],\n            [2020, 'Q2', 120],\n            [2020, 'Q3', 140],\n            [2020, 'Q4', 160],\n            [2021, 'Q1', 180],\n            [2021, 'Q2', 75],\n            [2021, 'Q3', 0],\n            [2021, 'Q4', 0],\n        ];\n        $worksheet->fromArray($dataSet, null, 'A1');\n        $worksheet->getAutoFilter()->setRange('A1:C9');\n\n        $reloaded = $this->writeAndReload($spreadsheet, 'Ods');\n\n        self::assertSame('A1:C9', $reloaded->getActiveSheet()->getAutoFilter()->getRange());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse DOMDocument;\nuse DOMXPath;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Font;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Content;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ContentTest extends TestCase\n{\n    private string $samplesPath = 'tests/data/Writer/Ods';\n\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    public function testWriteEmptySpreadsheet(): void\n    {\n        $content = new Content(new Ods(new Spreadsheet()));\n        $xml = $content->write();\n\n        self::assertXmlStringEqualsXmlFile($this->samplesPath . '/content-empty.xml', $xml);\n    }\n\n    public function testWriteSpreadsheet(): void\n    {\n        $workbook = new Spreadsheet();\n\n        // Worksheet 1\n        $worksheet1 = $workbook->getActiveSheet();\n        $worksheet1->setCellValue('A1', 1); // Number\n        $worksheet1->setCellValue('B1', 12345.6789); // Number\n        $b1SimpleCast = '12345.6789';\n        $b1AccurateCast = StringHelper::convertToString(12345.6789);\n        $worksheet1->setCellValue('C1', '1'); // Number without cast\n        $worksheet1->setCellValueExplicit('D1', '01234', DataType::TYPE_STRING); // Number casted to string\n        $worksheet1->setCellValue('E1', 'Lorem ipsum'); // String\n\n        $worksheet1->setCellValue('A2', true); // Boolean\n        $worksheet1->setCellValue('B2', false); // Boolean\n\n        $worksheet1->setCellValueExplicit(\n            'C2',\n            '=IF(A3, CONCAT(A1, \" \", A2), CONCAT(A2, \" \", A1))',\n            DataType::TYPE_FORMULA\n        ); // Formula\n\n        $worksheet1->setCellValue('D2', Date::PHPToExcel(1488635026)); // Date\n        $worksheet1->getStyle('D2')\n            ->getNumberFormat()\n            ->setFormatCode(NumberFormat::FORMAT_DATE_DATETIME);\n        /** @var float */\n        $d2SimpleCast = $worksheet1->getCell('D2')->getValue();\n        $d2SimpleCast = (string) $d2SimpleCast;\n        $d2AccurateCast = $worksheet1\n            ->getCell('D2')->getValueString();\n\n        $worksheet1->setCellValueExplicit('F1', null, DataType::TYPE_ERROR);\n        $worksheet1->setCellValueExplicit('G1', 'Lorem ipsum', DataType::TYPE_INLINE);\n\n        // Styles\n        $worksheet1->getStyle('A1')->getFont()->setBold(true);\n        $worksheet1->getStyle('B1')->getFont()->setItalic(true);\n        $worksheet1->getStyle('C1')->getFont()->setName('Courier');\n        $worksheet1->getStyle('C1')->getFont()->setSize(14);\n        $worksheet1->getStyle('C1')->getFont()->setColor(new Color(Color::COLOR_BLUE));\n\n        $worksheet1->getStyle('C1')\n            ->getFill()->setFillType(Fill::FILL_SOLID);\n        $worksheet1->getStyle('C1')\n            ->getFill()->setStartColor(new Color(Color::COLOR_RED));\n\n        $worksheet1->getStyle('C1')->getFont()\n            ->setUnderline(Font::UNDERLINE_SINGLE);\n        $worksheet1->getStyle('C2')->getFont()\n            ->setUnderline(Font::UNDERLINE_DOUBLE);\n        $worksheet1->getStyle('D2')->getFont()\n            ->setUnderline(Font::UNDERLINE_NONE);\n\n        // Worksheet 2\n        $worksheet2 = $workbook->createSheet();\n        $worksheet2->setTitle('New Worksheet');\n        $worksheet2->setCellValue('A1', 2);\n\n        // Write\n        $content = new Content(new Ods($workbook));\n        $xml = $content->write();\n\n        $xmlFile = $this->samplesPath . '/content-with-data.xml';\n        $xmlContents = (string) file_get_contents($xmlFile);\n        $xmlContents = str_replace($b1SimpleCast, $b1AccurateCast, $xmlContents);\n        $xmlContents = str_replace($d2SimpleCast, $d2AccurateCast, $xmlContents);\n        self::assertXmlStringEqualsXmlString($xmlContents, $xml);\n        $workbook->disconnectWorksheets();\n    }\n\n    public function testWriteWithHiddenWorksheet(): void\n    {\n        $workbook = new Spreadsheet();\n\n        // Worksheet 1\n        $worksheet1 = $workbook->getActiveSheet();\n        $worksheet1->setCellValue('A1', 1);\n\n        // Worksheet 2\n        $worksheet2 = $workbook->createSheet();\n        $worksheet2->setTitle('New Worksheet');\n        $worksheet2->setCellValue('A1', 2);\n\n        $worksheet2->setSheetState(Worksheet::SHEETSTATE_HIDDEN);\n\n        // Write\n        $content = new Content(new Ods($workbook));\n        $xml = $content->write();\n\n        self::assertXmlStringEqualsXmlFile($this->samplesPath . '/content-hidden-worksheet.xml', $xml);\n        $workbook->disconnectWorksheets();\n    }\n\n    public function testWriteBorderStyle(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()\n            ->getStyle('A1:B2')->applyFromArray([\n                'borders' => [\n                    'outline' => [\n                        'borderStyle' => Border::BORDER_THICK,\n                        'color' => ['argb' => 'AA22DD00'],\n                    ],\n                ],\n            ]);\n\n        $content = new Content(new Ods($spreadsheet));\n        $xml = $content->write();\n\n        $xmlDoc = new DOMDocument();\n        $xmlDoc->loadXML($xml);\n        $xmlPath = new DOMXPath($xmlDoc);\n\n        foreach (['top', 'bottom'] as $keyRow => $row) {\n            foreach (['left', 'right'] as $keyCell => $cell) {\n                $styles = ['top' => '', 'bottom' => '', 'left' => '', 'right' => ''];\n                $styles[$row] = '2.5pt solid #22DD00';\n                $styles[$cell] = '2.5pt solid #22DD00';\n\n                $query = 'string(//office:document-content/office:body/office:spreadsheet/table:table/table:table-row[position()=' . ($keyRow + 1) . ']/table:table-cell[position()=' . ($keyCell + 1) . ']/@table:style-name)';\n                $idStyle = StringHelper::convertToString($xmlPath->evaluate($query));\n\n                foreach ($styles as $direction => $value) {\n                    $query = 'string(//office:document-content/office:automatic-styles/style:style[@style:name=\"' . $idStyle . '\"]/style:table-cell-properties/@fo:border-' . $direction . ')';\n                    $style = $xmlPath->evaluate($query);\n                    self::assertEquals($style, $value);\n                }\n            }\n        }\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/DefinedNamesTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedFormula;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DefinedNamesTest extends AbstractFunctional\n{\n    public function testDefinedNamesWriter(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $dataSet = [\n            [7, 'x', 5],\n            ['=', '=FORMULA'],\n        ];\n        $worksheet->fromArray($dataSet, null, 'A1');\n\n        $spreadsheet->addDefinedName(new NamedRange('FIRST', $worksheet, '$A$1'));\n        $spreadsheet->addDefinedName(new NamedRange('SECOND', $worksheet, '$C$1'));\n        $spreadsheet->addDefinedName(new NamedFormula('FORMULA', $worksheet, '=FIRST*SECOND'));\n\n        $reloaded = $this->writeAndReload($spreadsheet, 'Ods');\n\n        self::assertSame(7, $reloaded->getActiveSheet()->getCell('FIRST')->getValue());\n        self::assertSame(5, $reloaded->getActiveSheet()->getCell('SECOND')->getValue());\n        self::assertSame(35, $reloaded->getActiveSheet()->getCell('B2')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/DurationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DurationTest extends AbstractFunctional\n{\n    public function testDuration(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('E1')->setValue('=TIMEVALUE(\"8:15:01\")');\n        $sheet->getCell('E2')->setValue('=TIMEVALUE(\"9:17:35\")');\n        $sheet->getCell('E3')->setValue('=TIMEVALUE(\"8:02:23\")');\n        $sheet->getCell('F2')->setValue('=E2-E1');\n        $sheet->getCell('F3')->setValue('=E3-E1');\n        $sheet->getStyle('E1:F3')->getNumberFormat()\n            ->setFormatCode(\n                NumberFormat::FORMAT_DATE_TIME_INTERVAL_HMS\n            );\n        $sheet->getCell('A1')->setValue(0.5);\n        $sheet->getStyle('A1')->getNumberFormat()\n            ->setFormatCode(NumberFormat::FORMAT_PERCENTAGE_0);\n        $sheet->getCell('A2')->setValue(20);\n        $sheet->getStyle('A2')->getNumberFormat()\n            ->setFormatCode('$0.00');\n        $sheet->getCell('A3')->setValue(20);\n        $sheet->getStyle('A3')->getNumberFormat()\n            ->setFormatCode('#.0');\n        $sheet->getCell('A4')->setValue(46000);\n        $sheet->getStyle('A4')->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Ods');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('1:02:34', $rsheet->getCell('F2')->getFormattedValue());\n        self::assertSame('-00:12:38', $rsheet->getCell('F3')->getFormattedValue());\n        self::assertSame('50.0%', $rsheet->getCell('A1')->getFormattedValue());\n        self::assertSame('$20.00 ', $rsheet->getCell('A2')->getFormattedValue());\n        self::assertSame('20.0', $rsheet->getCell('A3')->getFormattedValue());\n        self::assertSame('2025-12-09', $rsheet->getCell('A4')->getFormattedValue());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/FreezeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods as OdsWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FreezeTest extends TestCase\n{\n    public static function testFreeze(): void\n    {\n        // We can write FreezePane data to Ods but we cannot yet read it.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            ['A', 'B', 'C', 'D'],\n            [1, 2, 3, 4],\n        ]);\n        $sheet->freezePane('B2');\n        $writer = new OdsWriter($spreadsheet);\n        $writerSettings = new OdsWriter\\Settings($writer);\n        $settings = $writerSettings->write();\n        // The items we are particular interested in below are:\n        // HorizontalSplitMode, HorizontalSplitPosition, PositionLeft, PositionRight\n        // VerticalSplitMode, VerticalSplitPosition, PositionTop, PositionBottom\n        $expected = '<config:config-item-map-entry config:name=\"Worksheet\">'\n            . '<config:config-item config:name=\"CursorPositionX\" config:type=\"int\">0</config:config-item>'\n            . '<config:config-item config:name=\"CursorPositionY\" config:type=\"int\">0</config:config-item>'\n            . '<config:config-item config:name=\"HorizontalSplitMode\" config:type=\"short\">2</config:config-item>'\n            . '<config:config-item config:name=\"HorizontalSplitPosition\" config:type=\"int\">1</config:config-item>'\n            . '<config:config-item config:name=\"PositionLeft\" config:type=\"short\">0</config:config-item>'\n            . '<config:config-item config:name=\"PositionRight\" config:type=\"short\">1</config:config-item>'\n            . '<config:config-item config:name=\"VerticalSplitMode\" config:type=\"short\">2</config:config-item>'\n            . '<config:config-item config:name=\"VerticalSplitPosition\" config:type=\"int\">1</config:config-item>'\n            . '<config:config-item config:name=\"PositionTop\" config:type=\"short\">0</config:config-item>'\n            . '<config:config-item config:name=\"PositionBottom\" config:type=\"short\">1</config:config-item>'\n            . '<config:config-item config:name=\"ActiveSplitRange\" config:type=\"short\">3</config:config-item>'\n            . '</config:config-item-map-entry>';\n        self::assertStringContainsString($expected, $settings);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/IndentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Functions;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Content;\nuse PHPUnit\\Framework\\TestCase;\n\nclass IndentTest extends TestCase\n{\n    private string $compatibilityMode;\n\n    protected function setUp(): void\n    {\n        $this->compatibilityMode = Functions::getCompatibilityMode();\n        Functions::setCompatibilityMode(\n            Functions::COMPATIBILITY_OPENOFFICE\n        );\n    }\n\n    protected function tearDown(): void\n    {\n        parent::tearDown();\n        Functions::setCompatibilityMode($this->compatibilityMode);\n    }\n\n    public function testWriteSpreadsheet(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'aa');\n        $sheet->setCellValue('B1', 'bb');\n        $sheet->setCellValue('A2', 'cc');\n        $sheet->setCellValue('B2', 'dd');\n        $sheet->getStyle('A1')->getAlignment()->setIndent(2);\n        $writer = new Ods($spreadsheet);\n        $content = new Content($writer);\n        $xml = $content->write();\n        self::assertStringContainsString(\n            '<style:style style:name=\"ce0\" style:family=\"table-cell\" style:parent-style-name=\"Default\">'\n                . '<style:table-cell-properties style:vertical-align=\"bottom\" style:rotation-angle=\"0\" style:rotation-align=\"none\" fo:background-color=\"transparent\"/>'\n                . '<style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>'\n                . '</style:style>',\n            $xml\n        );\n        self::assertStringContainsString(\n            '<style:style style:name=\"ce1\" style:family=\"table-cell\" style:parent-style-name=\"Default\">'\n                . '<style:table-cell-properties style:vertical-align=\"bottom\" style:rotation-angle=\"0\" style:rotation-align=\"none\" fo:background-color=\"transparent\"/>'\n                . '<style:paragraph-properties fo:margin-left=\"0.2086in\"/>' // fo:margin-left is what we're looking for\n                . '<style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>'\n                . '</style:style>',\n            $xml\n        );\n        self::assertSame(3, substr_count($xml, 'table:style-name=\"ce0\"'));\n        self::assertSame(1, substr_count($xml, 'table:style-name=\"ce1\"'));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/Issue4537Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Ods as OdsReader;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\TextElement;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods as OdsWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4537Test extends TestCase\n{\n    private string $outputFilename = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFilename !== '') {\n            unlink($this->outputFilename);\n            $this->outputFilename = '';\n        }\n    }\n\n    public function testBackgroundImage(): void\n    {\n        $this->outputFilename = File::temporaryFilename();\n        $testString = \"\\\"He\\\": '<?>'\";\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValueExplicit($testString, DataType::TYPE_INLINE);\n        $sheet->getCell('A2')->setValue($testString);\n        $richText = new RichText();\n        $richText->addText(new TextElement($testString));\n        $sheet->getCell('A3')->setValue($richText);\n        $writer = new OdsWriter($spreadsheet);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $writer->save($this->outputFilename);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new OdsReader();\n        $reloadedSpreadsheet = $reader->load($this->outputFilename);\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame($testString, $rsheet->getCell('A1')->getValueString());\n        self::assertSame($testString, $rsheet->getCell('A2')->getValueString());\n        self::assertSame($testString, $rsheet->getCell('A3')->getValueString());\n        $reloadedSpreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFilename;\n        $file .= '#content.xml';\n        $data = file_get_contents($file);\n        // expected does not escape apostrophes\n        $expected = '<text:p>&quot;He&quot;: \\'&lt;?&gt;\\'</text:p>';\n        if ($data === false) {\n            self::fail('Unable to read content file');\n        } else {\n            $count = substr_count($data, $expected);\n            self::assertSame(3, $count);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/Issue4584Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods as OdsWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4584Test extends TestCase\n{\n    public function testWriteRowDimensions(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getDefaultRowDimension()->setRowHeight(20);\n        $sheet->setCellValue('A1', 'hello there world 1');\n        $sheet->getStyle('A1')->getAlignment()->setWrapText(true);\n        $sheet->getRowDimension(1)->setCustomFormat(true);\n        $sheet->setCellValue('A2', 'hello there world 2');\n        $sheet->setCellValue('A4', 'hello there world 4');\n        $writer = new OdsWriter($spreadsheet);\n        $writerWorksheet = new OdsWriter\\Content($writer);\n        $data = $writerWorksheet->write();\n        self::assertStringContainsString(\n            '<style:style style:family=\"table-row\" style:name=\"ro0\"><style:table-row-properties style:row-height=\"0.706cm\" style:use-optimal-row-height=\"false\" fo:break-before=\"auto\"/></style:style>',\n            $data\n        );\n        self::assertStringContainsString(\n            '<table:table-row><table:table-cell table:style-name=\"ce1\" office:value-type=\"string\"><text:p>hello there world 1</text:p></table:table-cell></table:table-row>',\n            $data\n        );\n        self::assertStringContainsString(\n            '<table:table-row table:style-name=\"ro0\"><table:table-cell table:style-name=\"ce0\" office:value-type=\"string\"><text:p>hello there world 2</text:p></table:table-cell></table:table-row>',\n            $data\n        );\n        self::assertStringContainsString(\n            '<table:table-row table:number-rows-repeated=\"1\"/><table:table-row table:style-name=\"ro0\"><table:table-cell table:style-name=\"ce0\" office:value-type=\"string\"><text:p>hello there world 4</text:p></table:table-cell></table:table-row>',\n            $data\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/Issue4798Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods as OdsWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4798Test extends TestCase\n{\n    public function testWriteRowDimensions(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 1.2);\n        $sheet->setCellValue('A3', -1.234);\n        $sheet->setCellValue('A4', '=1+2');\n        $sheet->getStyle('A1:A4')->getNumberFormat()\n            ->setFormatCode(NumberFormat::FORMAT_NUMBER_00);\n        $sheet->getStyle('A1')->getFont()->setItalic(true);\n        $sheet->getStyle('A2')->getFont()->setBold(true);\n        $writer = new OdsWriter($spreadsheet);\n        $writerWorksheet = new OdsWriter\\Content($writer);\n        $data = $writerWorksheet->write();\n        $count = substr_count($data, 'style:data-style-name=\"N200\"');\n        self::assertSame(3, $count, 'once for the italic cell, once for the bold, and once for the other two');\n        self::assertStringContainsString(\n            '<number:number-style style:name=\"N200\"><number:number number:decimal-places=\"2\" number:min-decimal-places=\"2\" number:min-integer-digits=\"1\"/></number:number-style>',\n            $data\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/MergeRangeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass MergeRangeTest extends AbstractFunctional\n{\n    public function testMergeRangeWriter(): void\n    {\n        $mergeRange = 'B2:C3';\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setCellValue('B2', \"Merge Range {$mergeRange}\");\n        $worksheet->mergeCells($mergeRange);\n\n        $reloaded = $this->writeAndReload($spreadsheet, 'Ods');\n\n        $cell = $reloaded->getActiveSheet()->getCell('B2');\n        self::assertTrue($cell->isInMergeRange());\n        self::assertSame($mergeRange, $cell->getMergeRange());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/MicrosecondsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass MicrosecondsTest extends AbstractFunctional\n{\n    /**\n     * Test save and load XLSX file for round-trip DateTime.\n     * Ods Writer does not support date formats,\n     * and Reader does not support styles, so this\n     * test is slightly different than its Xls/Xlsx counterparts.\n     */\n    public function testIssue4476(): void\n    {\n        $date = '2020-10-21';\n        $time = '14:55:31';\n        $originalDateTime = new DateTime(\"{$date}T{$time}\");\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', Date::dateTimeToExcel($originalDateTime));\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Ods');\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $rsheet->getStyle('A1')\n            ->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd hh:mm:ss.000');\n        /** @var float */\n        $reread = $rsheet->getCell('A1')->getValue();\n        $temp = Date::excelToDateTimeObject($reread)\n            ->format('Y-m-d H:i:s.u');\n        self::assertSame(\"{$date} {$time}.000000\", $temp, 'round trip works with float value');\n        $formatted = $rsheet->getCell('A1')->getFormattedValue();\n        self::assertSame(\"{$date} {$time}.000\", $formatted, 'round trip works with formatted value');\n        /** @var float */\n        $temp = Date::stringToExcel($formatted);\n        $temp = Date::excelToDateTimeObject($temp)\n            ->format('Y-m-d H:i:s.u');\n        self::assertSame(\"{$date} {$time}.000000\", $temp, 'round trip works using stringToExcel on formatted value');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Ods/ReadOrderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Ods;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\Content;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ReadOrderTest extends TestCase\n{\n    public function testReadOrder(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '1-' . 'منصور حسين الناصر');\n        $sheet->setCellValue('A2', '1-' . 'منصور حسين الناصر');\n        $sheet->setCellValue('A3', '1-' . 'منصور حسين الناصر');\n        $sheet->getStyle('A1')\n            ->getAlignment()->setReadOrder(Alignment::READORDER_RTL);\n        $sheet->getStyle('A2')\n            ->getAlignment()->setReadOrder(Alignment::READORDER_LTR);\n        $sheet->getStyle('A2')->getFont()->setName('Arial');\n        $sheet->getStyle('A3')->getFont()->setName('Times New Roman');\n        $content = new Content(new Ods($spreadsheet));\n        $xml = $content->write();\n        self::assertStringContainsString(\n            '<style:style style:name=\"ce1\" style:family=\"table-cell\" style:parent-style-name=\"Default\">'\n                . '<style:table-cell-properties style:vertical-align=\"bottom\" style:rotation-angle=\"0\" style:rotation-align=\"none\" fo:background-color=\"transparent\"/>'\n                . '<style:paragraph-properties style:writing-mode=\"rl-tb\"/>'\n                . '<style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>'\n                . '</style:style>',\n            $xml,\n            'explicit rtl direction in paragraph properties'\n        );\n        self::assertStringContainsString(\n            '<style:style style:name=\"ce3\" style:family=\"table-cell\" style:parent-style-name=\"Default\">'\n                . '<style:table-cell-properties style:vertical-align=\"bottom\" style:rotation-angle=\"0\" style:rotation-align=\"none\" fo:background-color=\"transparent\"/>'\n                . '<style:paragraph-properties style:writing-mode=\"lr-tb\"/>'\n                . '<style:text-properties fo:color=\"#000000\" fo:font-family=\"Arial\" fo:font-size=\"11pt\"/>'\n                . '</style:style>',\n            $xml,\n            'explicit ltr direction in paragraph properties'\n        );\n        self::assertStringContainsString(\n            '<style:style style:name=\"ce4\" style:family=\"table-cell\" style:parent-style-name=\"Default\">'\n            . '<style:table-cell-properties style:vertical-align=\"bottom\" style:rotation-angle=\"0\" style:rotation-align=\"none\" fo:background-color=\"transparent\"/>'\n            . '<style:text-properties fo:color=\"#000000\" fo:font-family=\"Times New Roman\" fo:font-size=\"11pt\"/>'\n            . '</style:style>',\n            $xml,\n            'no paragraph properties'\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/PreCalcTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\ColumnDimension;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass PreCalcTest extends AbstractFunctional\n{\n    private string $outfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outfile !== '') {\n            unlink($this->outfile);\n            $this->outfile = '';\n        }\n    }\n\n    public static function providerPreCalc(): array\n    {\n        return [\n            [true, 'Xlsx'],\n            [false, 'Xlsx'],\n            [null, 'Xlsx'],\n            [true, 'Xls'],\n            [false, 'Xls'],\n            [null, 'Xls'],\n            [true, 'Ods'],\n            [false, 'Ods'],\n            [null, 'Ods'],\n            [true, 'Html'],\n            [false, 'Html'],\n            [null, 'Html'],\n            [true, 'Csv'],\n            [false, 'Csv'],\n            [null, 'Csv'],\n        ];\n    }\n\n    private static function autoSize(?ColumnDimension $columnDimension): void\n    {\n        if ($columnDimension === null) {\n            self::fail('Unable to getColumnDimension');\n        } else {\n            $columnDimension->setAutoSize(true);\n        }\n    }\n\n    private static function verifyA2(Calculation $calculation, string $title, ?bool $preCalc): void\n    {\n        $cellValue = 0;\n        // A2 has no cached calculation value if preCalc is false\n        if ($preCalc === false) {\n            self::assertFalse($calculation->getValueFromCache(\"$title!A2\", $cellValue));\n        } else {\n            self::assertTrue($calculation->getValueFromCache(\"$title!A2\", $cellValue));\n            self::assertSame(3, $cellValue);\n        }\n    }\n\n    private const AUTOSIZE_TYPES = ['Xlsx', 'Xls', 'Html', 'Ods'];\n\n    private static function verifyA3B2(Calculation $calculation, string $title, ?bool $preCalc, string $type): void\n    {\n        $cellValue = 0;\n        if (in_array($type, self::AUTOSIZE_TYPES) || $preCalc !== false) {\n            // These 3 types support auto-sizing.\n            // A3 has cached calculation value because it is used in B2 calculation\n            self::assertTrue($calculation->getValueFromCache(\"$title!A3\", $cellValue));\n            self::assertSame(11, $cellValue);\n            // B2 has cached calculation value because its column is auto-sized\n            self::assertTrue($calculation->getValueFromCache(\"$title!B2\", $cellValue));\n            self::assertSame(14, $cellValue);\n        } else {\n            self::assertFalse($calculation->getValueFromCache(\"$title!A3\", $cellValue));\n            self::assertFalse($calculation->getValueFromCache(\"$title!B2\", $cellValue));\n        }\n    }\n\n    private static function readFile(string $file): string\n    {\n        $dataOut = '';\n        $data = file_get_contents($file);\n        // confirm that file contains B2 pre-calculated or not as appropriate\n        if ($data === false) {\n            self::fail(\"Unable to read $file\");\n        } else {\n            $dataOut = $data;\n        }\n\n        return $dataOut;\n    }\n\n    private function verifyXlsx(?bool $preCalc, string $type): void\n    {\n        if ($type === 'Xlsx') {\n            $file = 'zip://';\n            $file .= $this->outfile;\n            $file .= '#xl/worksheets/sheet1.xml';\n            $data = self::readFile($file);\n            // confirm that file contains B2 pre-calculated or not as appropriate\n            if ($preCalc === false) {\n                self::assertStringContainsString('<c r=\"B2\" t=\"str\"><f>3+A3</f></c>', $data);\n            } else {\n                self::assertStringContainsString('<c r=\"B2\"><f>3+A3</f><v>14</v></c>', $data);\n            }\n            $file = 'zip://';\n            $file .= $this->outfile;\n            $file .= '#xl/workbook.xml';\n            $data = self::readFile($file);\n            // confirm whether workbook is set to recalculate\n            if ($preCalc === false) {\n                self::assertStringContainsString('<calcPr calcId=\"999999\" calcMode=\"auto\" calcCompleted=\"0\" fullCalcOnLoad=\"1\" forceFullCalc=\"0\"/>', $data);\n            } else {\n                self::assertStringContainsString('<calcPr calcId=\"999999\" calcMode=\"auto\" calcCompleted=\"1\" fullCalcOnLoad=\"0\" forceFullCalc=\"0\"/>', $data);\n            }\n        }\n    }\n\n    private function verifyOds(?bool $preCalc, string $type): void\n    {\n        if ($type === 'Ods') {\n            $file = 'zip://';\n            $file .= $this->outfile;\n            $file .= '#content.xml';\n            $data = self::readFile($file);\n            // confirm that file contains B2 pre-calculated or not as appropriate\n            if ($preCalc === false) {\n                self::assertStringContainsString(\n                    'table:formula=\"of:=3+[.A3]\" office:value-type=\"string\" office:string-value=\"=3+A3\"',\n                    $data\n                );\n            } else {\n                self::assertStringContainsString(' table:formula=\"of:=3+[.A3]\" office:value-type=\"float\" office:value=\"14\"', $data);\n            }\n        }\n    }\n\n    private function verifyHtml(?bool $preCalc, string $type): void\n    {\n        if ($type === 'Html') {\n            $data = self::readFile($this->outfile);\n            // confirm that file contains B2 pre-calculated or not as appropriate\n            if ($preCalc === false) {\n                self::assertStringContainsString('>=1+2</td>', $data);\n                self::assertStringContainsString('>=3+A3</td>', $data);\n                self::assertStringContainsString('>=5+6</td>', $data);\n            } else {\n                self::assertStringContainsString('>3</td>', $data);\n                self::assertStringContainsString('>14</td>', $data);\n                self::assertStringContainsString('>11</td>', $data);\n            }\n        }\n    }\n\n    private function verifyCsv(?bool $preCalc, string $type): void\n    {\n        if ($type === 'Csv') {\n            $data = self::readFile($this->outfile);\n            // confirm that file contains B2 pre-calculated or not as appropriate\n            if ($preCalc === false) {\n                self::assertStringContainsString('\"=1+2\"', $data);\n                self::assertStringContainsString('\"=3+A3\"', $data);\n                self::assertStringContainsString('\"=5+6\"', $data);\n            } else {\n                self::assertStringContainsString('\"3\"', $data);\n                self::assertStringContainsString('\"14\"', $data);\n                self::assertStringContainsString('\"11\"', $data);\n            }\n        }\n    }\n\n    #[DataProvider('providerPreCalc')]\n    public function testPreCalc(?bool $preCalc, string $type): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('Column not set to autoSize');\n        $sheet->getCell('B1')->setValue('Column set to autoSize');\n        $sheet->getCell('A2')->setValue('=1+2');\n        $sheet->getCell('A3')->setValue('=5+6');\n        $sheet->getCell('B2')->setValue('=3+A3');\n        $columnDimension = $sheet->getColumnDimension('B');\n        self::autoSize($columnDimension);\n\n        $writer = IOFactory::createWriter($spreadsheet, $type);\n        if ($preCalc !== null) {\n            $writer->setPreCalculateFormulas($preCalc);\n        }\n        $this->outfile = File::temporaryFilename();\n        $writer->save($this->outfile);\n        $title = $sheet->getTitle();\n        $calculation = Calculation::getInstance($spreadsheet);\n        // verify values in Calculation cache\n        self::verifyA2($calculation, $title, $preCalc);\n        self::verifyA3B2($calculation, $title, $preCalc, $type);\n        // verify values in output file\n        $this->verifyXlsx($preCalc, $type);\n        $this->verifyOds($preCalc, $type);\n        $this->verifyHtml($preCalc, $type);\n        $this->verifyCsv($preCalc, $type);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/RetainSelectedCellsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer;\n\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass RetainSelectedCellsTest extends AbstractFunctional\n{\n    private string $fileName = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->fileName !== '') {\n            unlink($this->fileName);\n            $this->fileName = '';\n        }\n    }\n\n    public static function providerFormats(): array\n    {\n        return [\n            ['Xls'],\n            ['Xlsx'],\n            ['Ods'],\n            ['Csv'],\n            ['Html'],\n        ];\n    }\n\n    /**\n     * Test selected cell is retained in memory and in file written to disk.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testRetainSelectedCells(string $format): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '=SIN(1)')\n            ->setCellValue('A2', '=SIN(2)')\n            ->setCellValue('A3', '=SIN(3)')\n            ->setCellValue('B1', '=SIN(4)')\n            ->setCellValue('B2', '=SIN(5)')\n            ->setCellValue('B3', '=SIN(6)')\n            ->setCellValue('C1', '=SIN(7)')\n            ->setCellValue('C2', '=SIN(8)')\n            ->setCellValue('C3', '=SIN(9)');\n        $sheet->setSelectedCell('A3');\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setCellValue('A1', '=SIN(1)')\n            ->setCellValue('A2', '=SIN(2)')\n            ->setCellValue('A3', '=SIN(3)')\n            ->setCellValue('B1', '=SIN(4)')\n            ->setCellValue('B2', '=SIN(5)')\n            ->setCellValue('B3', '=SIN(6)')\n            ->setCellValue('C1', '=SIN(7)')\n            ->setCellValue('C2', '=SIN(8)')\n            ->setCellValue('C3', '=SIN(9)');\n        $sheet->setSelectedCell('B1');\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setCellValue('A1', '=SIN(1)')\n            ->setCellValue('A2', '=SIN(2)')\n            ->setCellValue('A3', '=SIN(3)')\n            ->setCellValue('B1', '=SIN(4)')\n            ->setCellValue('B2', '=SIN(5)')\n            ->setCellValue('B3', '=SIN(6)')\n            ->setCellValue('C1', '=SIN(7)')\n            ->setCellValue('C2', '=SIN(8)')\n            ->setCellValue('C3', '=SIN(9)');\n        $sheet->setSelectedCell('C2');\n        $spreadsheet->setActiveSheetIndex(1);\n\n        $reloaded = $this->writeAndReload($spreadsheet, $format);\n        self::assertEquals('A3', $spreadsheet->getSheet(0)->getSelectedCells());\n        self::assertEquals('B1', $spreadsheet->getSheet(1)->getSelectedCells());\n        self::assertEquals('C2', $spreadsheet->getSheet(2)->getSelectedCells());\n        self::assertEquals(1, $spreadsheet->getActiveSheetIndex());\n        // SelectedCells and ActiveSheet don't make sense for Html, Csv.\n        if ($format === 'Xlsx' || $format === 'Xls' || $format === 'Ods') {\n            self::assertEquals('A3', $reloaded->getSheet(0)->getSelectedCells());\n            self::assertEquals('B1', $reloaded->getSheet(1)->getSelectedCells());\n            self::assertEquals('C2', $reloaded->getSheet(2)->getSelectedCells());\n            self::assertEquals(1, $reloaded->getActiveSheetIndex());\n        }\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerFormats')]\n    public function testRetainAutoSize(string $type): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $array = [\n            [1, 2, 3, 4, 5],\n            [11, 12, 13, 14, 15],\n            [21, 22, 23, 24, 25],\n            [31, 32, 33, 34, 35],\n        ];\n        $sheet1->fromArray($array);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->fromArray($array);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->fromArray($array);\n        $sheet1->getStyle('A1')->getFont()->setName('Arial');\n        $sheet2->getStyle('A1')->getFont()->setName('Arial');\n        $sheet3->getStyle('A1')->getFont()->setName('Arial');\n        $sheet1->getColumnDimension('A')->setAutoSize(true);\n        $sheet2->getColumnDimension('A')->setAutoSize(true);\n        $sheet3->getColumnDimension('A')->setAutoSize(true);\n        $sheet1->setSelectedCells('B2');\n        $sheet2->setSelectedCells('C3');\n        $sheet3->setSelectedCells('D4');\n        $spreadsheet->setActiveSheetIndex(1);\n        $activeCellSheet1 = $sheet1->getActiveCell();\n        $activeCellSheet2 = $sheet2->getActiveCell();\n        $activeCellSheet3 = $sheet3->getActiveCell();\n\n        $this->fileName = File::temporaryFilename();\n        $writer = IOFactory::createWriter($spreadsheet, $type);\n        $writer->save($this->fileName);\n\n        self::assertSame(1, $spreadsheet->getActiveSheetIndex());\n        self::assertSame('B2', $spreadsheet->getSheet(0)->getSelectedCells());\n        self::assertSame('C3', $spreadsheet->getSheet(1)->getSelectedCells());\n        self::assertSame('D4', $spreadsheet->getSheet(2)->getSelectedCells());\n        self::assertSame($activeCellSheet1, $spreadsheet->getSheet(0)->getActiveCell());\n        self::assertSame($activeCellSheet2, $spreadsheet->getSheet(1)->getActiveCell());\n        self::assertSame($activeCellSheet3, $spreadsheet->getSheet(2)->getActiveCell());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Tcpdf/GridlinesInlineTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Tcpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass GridlinesInlineTest extends TestCase\n{\n    public function testGridlinesInline(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setShowGridlines(false);\n        $sheet1->setPrintGridlines(false);\n        $sheet1->fromArray([\n            [11, 12, 13],\n            [14, 15, 16],\n        ]);\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setShowGridlines(false);\n        $sheet2->setPrintGridlines(true);\n        $sheet2->fromArray([\n            [21, 22, 23],\n            [24, 25, 26],\n        ]);\n        $sheet3 = $spreadsheet->createSheet();\n        $sheet3->setShowGridlines(true);\n        $sheet3->setPrintGridlines(false);\n        $sheet3->fromArray([\n            [31, 32, 33],\n            [34, 35, 36],\n        ]);\n        $sheet4 = $spreadsheet->createSheet();\n        $sheet4->setShowGridlines(true);\n        $sheet4->setPrintGridlines(true);\n        $sheet4->fromArray([\n            [41, 42, 43],\n            [44, 45, 46],\n        ]);\n\n        $writer = new Tcpdf($spreadsheet);\n        $writer->writeAllSheets();\n        $writer->setUseInlineCss(true);\n        $html = $writer->generateHtmlAll();\n        self::assertStringContainsString(\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">11</td>',\n            $html,\n            'neither gridlines nor gridlinesp'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt; border:0.1px solid black\">21</td>',\n            $html,\n            'gridlinesp without gridlines'\n        );\n        self::assertStringContainsString(\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">31</td>',\n            $html,\n            'gridlines without gridlinesp'\n        );\n        self::assertStringContainsString(\n            '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt; border:0.1px solid black\">41</td>',\n            $html,\n            'gridlines and gridlinesp'\n        );\n        $count = substr_count($html, 'page-break-before');\n        self::assertSame(4, $count, 'repetition unlike Html/Dompdf/Mpdf');\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Tcpdf/HideMergeTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Tcpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HideMergeTest extends TestCase\n{\n    public function testHideWithMerge(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setPrintGridlines(true);\n        // just some labels for better visualisation of the problem\n        $worksheet->setCellValue('A1', 'A');\n        $worksheet->setCellValue('B1', 'B');\n        $worksheet->setCellValue('C1', 'C');\n        // setting the row height to better visualize the problem\n        for ($i = 1; $i <= 10; ++$i) {\n            $worksheet->getRowDimension($i)->setRowHeight(17);\n        }\n        // Headline - merged over two cells AND two rows\n        $worksheet->mergeCells('B2:C3');\n        $worksheet->setCellValue('B2', 'Hello World Headline');\n        $worksheet->getStyle('B2:C3')->getFont()->setBold(true);\n        $worksheet->getStyle('B2:C3')\n            ->getAlignment()\n            ->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $worksheet->getStyle('B2:C3')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // Content 1 - merge over two rows\n        $worksheet->mergeCells('B4:B5');\n        $worksheet->mergeCells('C4:C5');\n        $worksheet->setCellValue('B4', 'Label 1');\n        $worksheet->setCellValue('C4', 'Text 1');\n        $worksheet->getStyle('B4:B5')->getFont()->setBold(true);\n        $worksheet->getStyle('B4:C5')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $worksheet->getStyle('B4:B5')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n        $worksheet->getStyle('C4:C5')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // Content 2 - merge over two rows\n        $worksheet->mergeCells('B6:B7');\n        $worksheet->mergeCells('C6:C7');\n        $worksheet->setCellValue('B6', 'Label 2');\n        $worksheet->setCellValue('C6', 'Text 2');\n        $worksheet->getStyle('B6:B7')->getFont()->setBold(true);\n        $worksheet->getStyle('B6:C7')\n            ->getAlignment()\n            ->setVertical(Alignment::VERTICAL_CENTER);\n        $worksheet->getStyle('B6:B7')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n        $worksheet->getStyle('C6:C7')\n            ->getBorders()\n            ->getAllBorders()\n            ->setBorderStyle(Border::BORDER_THIN)\n            ->setColor(new Color(Color::COLOR_BLACK));\n\n        // This is where the error was introduced (!!!)\n        $worksheet->getColumnDimension('A')->setVisible(false);\n        $Tcpdf = new Tcpdf($spreadsheet);\n        $html = $Tcpdf->generateHtmlAll();\n        $html = preg_replace('/^\\s+/m', '', $html) ?? $html;\n        $html = preg_replace('/[\\n\\r]/', '', $html) ?? $html;\n        self::assertStringContainsString(\n            '<tbody><tr style=\"height:17pt\">'\n                . '<td></td>'\n                . '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt; height:17pt; border:0.1px solid black\">B</td>'\n                . '<td class=\"gridlines gridlinesp\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt; height:17pt; border:0.1px solid black\">C</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr style=\"height:17pt\">'\n                . '<td></td>'\n                . '<td class=\"gridlines gridlinesp\" colspan=\"2\" rowspan=\"2\" style=\"vertical-align:bottom; text-align:center; border-bottom:1px solid #000000 !important; border-top:1px solid #000000 !important; border-left:1px solid #000000 !important; border-right:1px solid #000000 !important; font-weight:bold; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; width:84pt; height:17pt\">Hello World Headline</td>'\n                . '</tr>',\n            $html\n        );\n        $emptyRowCount = substr_count(\n            $html,\n            '<tr style=\"height:17pt\">'\n                . '<td></td>'\n                . '</tr>'\n        );\n        self::assertSame(3, $emptyRowCount);\n        self::assertStringContainsString(\n            '<tr style=\"height:17pt\">'\n                . '<td></td>'\n                . '<td class=\"gridlines gridlinesp\" rowspan=\"2\" style=\"vertical-align:middle; border-bottom:1px solid #000000 !important; border-top:1px solid #000000 !important; border-left:1px solid #000000 !important; border-right:1px solid #000000 !important; font-weight:bold; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt; height:17pt\">Label 1</td>'\n                . '<td class=\"gridlines gridlinesp\" rowspan=\"2\" style=\"vertical-align:middle; border-bottom:1px solid #000000 !important; border-top:1px solid #000000 !important; border-left:1px solid #000000 !important; border-right:1px solid #000000 !important; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt; height:17pt\">Text 1</td>'\n                . '</tr>',\n            $html\n        );\n        self::assertStringContainsString(\n            '<tr style=\"height:17pt\">'\n                . '<td></td>'\n                . '<td class=\"gridlines gridlinesp\" rowspan=\"2\" style=\"vertical-align:middle; border-bottom:1px solid #000000 !important; border-top:1px solid #000000 !important; border-left:1px solid #000000 !important; border-right:1px solid #000000 !important; font-weight:bold; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt; height:17pt\">Label 2</td>'\n                . '<td class=\"gridlines gridlinesp\" rowspan=\"2\" style=\"vertical-align:middle; border-bottom:1px solid #000000 !important; border-top:1px solid #000000 !important; border-left:1px solid #000000 !important; border-right:1px solid #000000 !important; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt; height:17pt\">Text 2</td>'\n                . '</tr>',\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Tcpdf/HideTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Tcpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HideTest extends TestCase\n{\n    public function testHide(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            ['a1', 'b1', 'c1', 'd1', 'e1', 'f1'],\n            ['a2', 'b2', 'c2', 'd2', 'e2', 'f2'],\n            ['a3', 'b3', 'c3', 'd3', 'e3', 'f3'],\n            ['a4', 'b4', 'c4', 'd4', 'e4', 'f4'],\n            ['a5', 'b5', 'c5', 'd5', 'e5', 'f5'],\n            ['a6', 'b6', 'c6', 'd6', 'e6', 'f6'],\n        ]);\n        $sheet->getColumnDimension('B')->setVisible(false);\n        $sheet->getRowDimension(3)->setVisible(false);\n        $writer = new Tcpdf($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertStringNotContainsString('a3', $html);\n        self::assertStringNotContainsString('b1', $html);\n        self::assertStringContainsString('a1', $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Tcpdf/MergedBorderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Tcpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MergedBorderTest extends TestCase\n{\n    public static function testMergedBorder(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $target = 'A2:B5';\n        $sheet->mergeCells($target);\n        $sheet->setCellValue('A2', 'Planning');\n        $sheet->getStyle($target)->applyFromArray([\n            'borders' => [\n                'outline' => [\n                    'borderStyle' => Border::BORDER_HAIR,\n                    'color' => ['rgb' => 'FF0000'],\n                ],\n            ],\n        ]);\n        $sheet->setSelectedCells('D1');\n        $sheet->setCellValue('D1', 'Edge');\n        $sheet->setCellValue('D5', 'Edge');\n        $sheet->setShowGridlines(false);\n        $writer = new Tcpdf($spreadsheet);\n        $html = $writer->generateHtmlAll();\n        self::assertSame(1, preg_match('/ colspan=\"2\" rowspan=\"4\" style=\"vertical-align:bottom; border-bottom:1px solid #FF0000 !important; border-top:1px solid #FF0000 !important; border-left:1px solid #FF0000 !important; border-right:1px solid #FF0000 !important; color:#000000;[^>]+/', $html));\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Tcpdf/MergedCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Tcpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MergedCellTest extends TestCase\n{\n    public static function testMergedCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $target = 'A1:A2';\n        $sheet->mergeCells($target);\n        $sheet->setCellValue('A1', 'Planning');\n        $sheet->setSelectedCells('D1');\n        $sheet->setCellValue('A4', 'Edge');\n        $sheet->setShowGridlines(false);\n        $writer = new Tcpdf($spreadsheet);\n        $writer->setLineEnding(\"\\n\");\n        $html = $writer->generateHtmlAll();\n        $html = (string) preg_replace('/^\\s+/m', '', $html);\n        $expectedArray = [\n            '<tr>',\n            '<td rowspan=\"2\" style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt\">Planning</td>', // row 1 has cell\n            '</tr>',\n            '<tr>',\n            '<td>&nbsp;</td>', // row 2 with only merged cell\n            '</tr>',\n            '<tr>',\n            '<td style=\"width:42pt\">&nbsp;</td>', // row 3 no cell\n            '</tr>',\n            '<tr>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:left; width:42pt\">Edge</td>', // row 4 has cell\n            '</tr>',\n        ];\n        $expectedString = implode(\"\\n\", $expectedArray);\n        self::assertStringContainsString($expectedString, $html);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Tcpdf/NoDieTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Tcpdf;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\TcpdfNoDie;\nuse PHPUnit\\Framework\\Attributes;\n\nclass NoDieTest extends \\PHPUnit\\Framework\\TestCase\n{\n    private Spreadsheet $spreadsheet;\n\n    protected function setUp(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n    }\n\n    protected function tearDown(): void\n    {\n        unset($this->spreadsheet);\n    }\n\n    // Separate processes because of global defined names\n    #[Attributes\\RunInSeparateProcess]\n    #[Attributes\\PreserveGlobalState(false)]\n    public function testExceptionRatherThanDie(): void\n    {\n        $this->expectException(Exception::class);\n        $this->expectExceptionMessage('Could not include font definition file');\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'cell');\n        $writer = new TcpdfNoDie($this->spreadsheet);\n        $writer->setFont('xyz');\n        $writer->save('php://memory');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Tcpdf/PrintAreaTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Tcpdf;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Pdf\\Tcpdf as TcpdfWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PrintAreaTest extends TestCase\n{\n    public function testPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $inArray = [\n            [1, 2, 3, 4, 5],\n            [6, 7, 8, 9, 10],\n            [11, 12, 13, 14, 15],\n            [16, 17, 18, 19, 20],\n            [21, 22, 23, 24, 25],\n            [26, 27, 28, 29, 30],\n        ];\n        $sheet->fromArray($inArray);\n        $sheet->getPageSetup()->setPrintArea('B2:D4');\n        $writer = new TcpdfWriter($spreadsheet);\n        $eol = $writer->getLineEnding();\n        $html = $writer->generateHtmlAll();\n        $html = preg_replace('/^ +/m', '', $html) ?? $html;\n        $expectedArray = [\n            '<tbody>',\n            '<tr>',\n            '<td></td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">7</td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">8</td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">9</td>',\n            '</tr>',\n            '<tr>',\n            '<td></td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">12</td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">13</td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">14</td>',\n            '</tr>',\n            '<tr>',\n            '<td></td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">17</td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">18</td>',\n            '<td style=\"vertical-align:bottom; color:#000000; font-family:\\'Calibri\\'; font-size:11pt; text-align:right; width:42pt\">19</td>',\n            '</tr>',\n            '</tbody>',\n        ];\n        $expectedString = implode($eol, $expectedArray);\n        self::assertStringContainsString(\n            $expectedString,\n            $html\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/BooleanLiteralTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass BooleanLiteralTest extends AbstractFunctional\n{\n    public function testBooleanLiteral(): void\n    {\n        // Issue 3369 - Xls Writer Parser unable to handle\n        //   TRUE (or FALSE) when specified as function arguments.\n        $formula = '=AND(true,true(),fAlse,false())';\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->setActiveSheetIndex(0);\n        $spreadsheet->getActiveSheet()->setCellValue('A1', $formula);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->setActiveSheetIndex(0);\n        self::assertSame(strtoupper($formula), $sheet0->getCell('A1')->getValue());\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/Calendar1904Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Calendar1904Test extends AbstractFunctional\n{\n    public function testCalendar1904(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->setExcelCalendar(Date::CALENDAR_MAC_1904);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell('A1')->setValue('=DATE(1904,1,1)');\n        $worksheet->getStyle('A1')->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(0.0, $rsheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('1904-01-01', $rsheet->getCell('A1')->getFormattedValue());\n        self::assertSame(Date::CALENDAR_MAC_1904, $reloadedSpreadsheet->getExcelCalendar());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/ConditionalFontColorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalFontColorTest extends AbstractFunctional\n{\n    public function testConditionalFontColor(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(10);\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $condition1->addCondition(20);\n        $condition1->getStyle()->getFill()\n            ->setFillType(Fill::FILL_SOLID)\n            ->getStartColor()->setARGB('FF2345FA');\n        $condition1->getStyle()->getFont()\n            ->setBold(true);\n        $condition1->getStyle()->getFont()->getColor()\n            ->setARGB('FFFF8193');\n        $conditionalStyles = [$condition1];\n        $sheet->getStyle('A1')->setConditionalStyles($conditionalStyles);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->setActiveSheetIndex(0);\n        $conditionals = $sheet0->getConditionalStylesCollection();\n        self::assertCount(1, $conditionals);\n        self::assertArrayHasKey('A1', $conditionals);\n        $font = $conditionals['A1'][0]->getStyle()->getFont();\n        self::assertSame('FFFF8193', $font->getColor()->getARGB());\n        $fill = $conditionals['A1'][0]->getStyle()->getFill();\n        self::assertSame('FF2345FA', $fill->getStartColor()->getARGB());\n        self::assertSame(Fill::FILL_SOLID, $fill->getFillType());\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/ConditionalLimitsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Color;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalLimitsTest extends AbstractFunctional\n{\n    public function testLimits(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                ['Cell', 0, null, null, 'Col Rng', -2, -1],\n                [null, null, null, null, null, 0, 1],\n                ['Cell Rng', -2, -1, 0, null, 2, 3],\n                [null, 1, 2, 3, null, 4, -1],\n                [],\n                ['Row Rng'],\n                [-2, -1, 0],\n                [1, 2, 3],\n            ],\n            strictNullComparison: true\n        );\n        $redStyle = new Style(false, true);\n        $redStyle->getFont()->setColor(new Color(Color::COLOR_RED));\n\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS)\n            ->setOperatorType(Conditional::OPERATOR_BETWEEN)\n            ->addCondition(-1)\n            ->addCondition(1)\n            ->setStyle($redStyle);\n        $conditionalStyles = [$condition1];\n        $cellRange = 'B1';\n        $sheet->getStyle($cellRange)->setConditionalStyles($conditionalStyles);\n\n        $condition2 = new Conditional();\n        $condition2->setConditionType(Conditional::CONDITION_CELLIS)\n            ->setOperatorType(Conditional::OPERATOR_BETWEEN)\n            ->addCondition(-1.5)\n            ->addCondition(1.5)\n            ->setStyle($redStyle);\n        $conditionalStyles = [$condition2];\n        $cellRange = 'F:G';\n        $sheet->getStyle($cellRange)->setConditionalStyles($conditionalStyles);\n\n        $condition3 = new Conditional();\n        $condition3->setConditionType(Conditional::CONDITION_CELLIS)\n            ->setOperatorType(Conditional::OPERATOR_BETWEEN)\n            ->addCondition(-1)\n            ->addCondition(70000)\n            ->setStyle($redStyle);\n        $conditionalStyles = [$condition3];\n        $cellRange = '7:8';\n        $sheet->getStyle($cellRange)->setConditionalStyles($conditionalStyles);\n\n        $cellRange = 'B3:D4';\n        $sheet->getStyle($cellRange)->setConditionalStyles($conditionalStyles);\n        $sheet->setSelectedCells('A1');\n        $keys = array_keys($sheet->getConditionalStylesCollection());\n        self::assertSame(['B1', 'F1:G1048576', 'A7:XFD8', 'B3:D4'], $keys);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        $conditionals = $sheet0->getConditionalStylesCollection();\n        self::assertSame(['B1', 'F1:G65536', 'A7:IV8', 'B3:D4'], array_keys($conditionals));\n        $b1 = $conditionals['B1'][0];\n        self::assertSame([-1, 1], $b1->getConditions());\n        $b1 = $conditionals['F1:G65536'][0];\n        self::assertSame([-1.5, 1.5], $b1->getConditions());\n        $b1 = $conditionals['A7:IV8'][0];\n        self::assertSame([-1, 70000], $b1->getConditions());\n        $b1 = $conditionals['B3:D4'][0];\n        self::assertSame([-1, 70000], $b1->getConditions());\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/ConditionalUnionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalUnionTest extends AbstractFunctional\n{\n    public function testConditionalUnion(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2, 3, 4, 5],\n            [2, 3, 4, 5, 6],\n            [3, 4, 5, 6, 7],\n        ]);\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_BETWEEN);\n        $condition1->setConditions([2, 4]);\n        $condition1->getStyle()->getFont()\n            ->setBold(true);\n        $conditionalStyles = [$condition1];\n        $sheet->setConditionalStyles('A1:A3,C1:E3', $conditionalStyles);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        $conditionals = $sheet0->getConditionalStylesCollection();\n        self::assertSame(['A1:A3', 'C1:E3'], array_keys($conditionals));\n        $cond1 = $conditionals['A1:A3'][0];\n        self::assertSame(Conditional::CONDITION_CELLIS, $cond1->getConditionType());\n        self::assertSame(Conditional::OPERATOR_BETWEEN, $cond1->getOperatorType());\n        self::assertSame([2, 4], $cond1->getConditions());\n        $font1 = $cond1->getStyle()->getFont();\n        self::assertTrue($font1->getBold());\n\n        $cond2 = $conditionals['C1:E3'][0];\n        self::assertSame(Conditional::CONDITION_CELLIS, $cond2->getConditionType());\n        self::assertSame(Conditional::OPERATOR_BETWEEN, $cond2->getOperatorType());\n        self::assertSame([2, 4], $cond2->getConditions());\n        $font2 = $cond2->getStyle()->getFont();\n        self::assertTrue($font2->getBold());\n        $robj->disconnectWorksheets();\n    }\n\n    public function testIntersectionRange(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1, 2, 3, 4, 5],\n            [2, 3, 4, 5, 6],\n            [3, 4, 5, 6, 7],\n        ]);\n        $condition1 = new Conditional();\n        $condition1->setConditionType(Conditional::CONDITION_CELLIS);\n        $condition1->setOperatorType(Conditional::OPERATOR_BETWEEN);\n        $condition1->setConditions([2, 3]);\n        $condition1->getStyle()->getFont()\n            ->setBold(true);\n        $conditionalStyles = [$condition1];\n        $sheet->setConditionalStyles('A1:B5,D1:E5 B2:D4', $conditionalStyles);\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        $conditionals = $sheet0->getConditionalStylesCollection();\n        self::assertSame(['A1:B5', 'D2', 'D3', 'D4'], array_keys($conditionals));\n\n        $cond1 = $conditionals['A1:B5'][0];\n        self::assertSame(Conditional::CONDITION_CELLIS, $cond1->getConditionType());\n        self::assertSame(Conditional::OPERATOR_BETWEEN, $cond1->getOperatorType());\n        self::assertSame([2, 3], $cond1->getConditions());\n        $font1 = $cond1->getStyle()->getFont();\n        self::assertTrue($font1->getBold());\n\n        $cond2 = $conditionals['D2'][0];\n        self::assertSame(Conditional::CONDITION_CELLIS, $cond2->getConditionType());\n        self::assertSame(Conditional::OPERATOR_BETWEEN, $cond2->getOperatorType());\n        self::assertSame([2, 3], $cond2->getConditions());\n        $font2 = $cond2->getStyle()->getFont();\n        self::assertTrue($font2->getBold());\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/DataValidationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DataValidationTest extends AbstractFunctional\n{\n    public function testWholeRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('C1:F1', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_LIST)\n            ->setShowDropDown(true)\n            ->setFormula1('\"Item A,Item B,Item C\"')\n            ->setErrorStyle(DataValidation::STYLE_STOP)\n            ->setShowErrorMessage(true)\n            ->setErrorTitle('Input Error')\n            ->setError('Value is not a member of allowed list');\n        $sheet->setDataValidation('1:1', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('H1', $dv);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        self::assertSame(['H1', 'C1:F1', '1:1'], array_keys($sheet0->getDataValidationCollection()));\n        $robj->disconnectWorksheets();\n    }\n\n    public function testWholeColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('C1')->setValue(1);\n        $sheet->getCell('C2')->setValue(2);\n        $sheet->getCell('C3')->setValue(3);\n        $dv = $sheet->getDataValidation('A5:A7');\n        $dv->setType(DataValidation::TYPE_NONE);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_LIST)\n            ->setShowDropDown(true)\n            ->setFormula1('$C$1:$C$3')\n            ->setErrorStyle(DataValidation::STYLE_STOP)\n            ->setShowErrorMessage(true)\n            ->setErrorTitle('Input Error')\n            ->setError('Value is not a member of allowed list');\n        $sheet->setDataValidation('A:A', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('A9', $dv);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        self::assertSame(['A9', 'A5:A7', 'A:A'], array_keys($sheet0->getDataValidationCollection()));\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/DimensionsRecordTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\nuse PHPUnit\\Framework\\TestCase;\n\nclass DimensionsRecordTest extends TestCase\n{\n    /**\n     * Test that DIMENSIONS record uses 0-based indices for both rows and columns.\n     *\n     * This test verifies that the BIFF8 DIMENSIONS record correctly uses 0-based\n     * indices for both rows and columns. Prior to the fix, 1-based values were\n     * written directly to the DIMENSIONS record, causing issues with old XLS parsers\n     * that expect 0-based indices per the BIFF8 specification.\n     *\n     * The DIMENSIONS record structure (BIFF8):\n     * - Offset 0-3: Index to first used row (0-based)\n     * - Offset 4-7: Index to last used row + 1 (0-based)\n     * - Offset 8-9: Index to first used column (0-based)\n     * - Offset 10-11: Index to last used column + 1 (0-based)\n     * - Offset 12-13: Not used\n     *\n     * Note: All indices in the DIMENSIONS record are 0-based, meaning Excel row 1\n     * is stored as 0, row 5 as 4, column A as 0, column D as 3, etc.\n     */\n    public function testDimensionsRecordUsesZeroBasedColumnIndices(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Set values in columns A through D (should be indices 0-3 in 0-based)\n        $sheet->setCellValue('A1', 'Column A');\n        $sheet->setCellValue('B1', 'Column B');\n        $sheet->setCellValue('C1', 'Column C');\n        $sheet->setCellValue('D1', 'Column D');\n        $sheet->setCellValue('A5', 'Row 5');\n\n        // Write to XLS format\n        $filename = tempnam(sys_get_temp_dir(), 'phpspreadsheet-test-');\n        $writer = new Xls($spreadsheet);\n        $writer->save($filename);\n        $spreadsheet->disconnectWorksheets();\n\n        // Read the binary file and find the DIMENSIONS record\n        $fileContent = file_get_contents($filename);\n        self::assertIsString($fileContent, 'Failed to read XLS file');\n        unlink($filename);\n\n        // Find the DIMENSIONS record: 0x0200 (2 bytes) + length 0x000E (2 bytes)\n        $recordSignature = pack('v', 0x0200) . pack('v', 0x000E);\n        $pos = strpos($fileContent, $recordSignature);\n\n        self::assertIsInt($pos, 'DIMENSIONS record not found in XLS file');\n\n        // Parse the DIMENSIONS record (skip 4-byte header)\n        $dataPos = $pos + 4;\n        $dimensionsData = substr($fileContent, $dataPos, 14);\n\n        // Unpack DIMENSIONS record\n        $data = unpack('VrwMic/VrwMac/vcolMic/vcolMac/vreserved', $dimensionsData);\n        self::assertIsArray($data, 'Failed to unpack DIMENSIONS record');\n\n        // Verify the values are correct (0-based for both rows and columns)\n        // First used row is 1 (Excel UI), which is 0 in 0-based indexing\n        self::assertSame(0, $data['rwMic'], 'First row should be 0 (0-based)');\n\n        // Last used row is 5 (Excel UI), which is 4 in 0-based, so rwMac should be 5 (4 + 1)\n        self::assertSame(5, $data['rwMac'], 'Last row + 1 should be 5 (0-based row 4 + 1)');\n\n        // First column is A (Excel UI), which is 0 in 0-based indexing\n        // BEFORE FIX: This would be 1 (because columnIndexFromString('A') returns 1)\n        // AFTER FIX: This is 0 (because we subtract 1)\n        self::assertSame(0, $data['colMic'], 'First column should be 0 (0-based for column A)');\n\n        // Last column is D (Excel UI), which is 3 in 0-based, so colMac should be 4 (3 + 1)\n        // BEFORE FIX: This would be 5 (columnIndexFromString('D') = 4, not adjusted to 0-based)\n        // AFTER FIX: This is 4 (columnIndexFromString('D') - 1 = 3, + 1 = 4)\n        self::assertSame(4, $data['colMac'], 'Last column + 1 should be 4 (0-based column 3 + 1)');\n    }\n\n    /**\n     * Test that DIMENSIONS record correctly handles columns near the BIFF8 limit.\n     *\n     * BIFF8 format supports columns up to IV (256 columns, 0-based index 0-255).\n     * This test ensures that the lastColumnIndex is correctly capped at 255.\n     */\n    public function testDimensionsRecordCapsColumnIndexAt255(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Set value in column IV (column 256, 0-based index 255)\n        $sheet->setCellValue('IV1', 'Last BIFF8 Column');\n\n        // Write to XLS format\n        $filename = tempnam(sys_get_temp_dir(), 'phpspreadsheet-test-');\n        $writer = new Xls($spreadsheet);\n        $writer->save($filename);\n        $spreadsheet->disconnectWorksheets();\n\n        // Read the binary file and find the DIMENSIONS record\n        $fileContent = file_get_contents($filename);\n        self::assertIsString($fileContent, 'Failed to read XLS file');\n        unlink($filename);\n\n        // Find the DIMENSIONS record: 0x0200 (2 bytes) + length 0x000E (2 bytes)\n        $recordSignature = pack('v', 0x0200) . pack('v', 0x000E);\n        $pos = strpos($fileContent, $recordSignature);\n\n        self::assertIsInt($pos, 'DIMENSIONS record not found in XLS file');\n\n        // Parse the DIMENSIONS record (skip 4-byte header)\n        $dataPos = $pos + 4;\n        $dimensionsData = substr($fileContent, $dataPos, 14);\n\n        // Unpack DIMENSIONS record\n        $data = unpack('VrwMic/VrwMac/vcolMic/vcolMac/vreserved', $dimensionsData);\n        self::assertIsArray($data, 'Failed to unpack DIMENSIONS record');\n\n        // Last column should be capped at 256 (255 + 1 for \"last used + 1\")\n        // The min(255, ...) ensures we don't exceed the BIFF8 limit\n        self::assertLessThanOrEqual(256, $data['colMac'], 'Last column index should not exceed 256');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/FormulaErrTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass FormulaErrTest extends AbstractFunctional\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Spreadsheet $reloadedSpreadsheet = null;\n\n    private bool $allowThrow;\n\n    protected function setUp(): void\n    {\n        $this->allowThrow = Worksheet::getAllowThrow();\n    }\n\n    protected function tearDown(): void\n    {\n        Worksheet::setAllowThrow($this->allowThrow);\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->reloadedSpreadsheet !== null) {\n            $this->reloadedSpreadsheet->disconnectWorksheets();\n            $this->reloadedSpreadsheet = null;\n        }\n    }\n\n    private function xtestFormulaError(bool $allowThrow): void\n    {\n        Worksheet::setAllowThrow($allowThrow);\n        $this->spreadsheet = $obj = new Spreadsheet();\n        $sheet0 = $obj->setActiveSheetIndex(0);\n        $sheet0->setCellValue('A1', 2);\n        $obj->addNamedRange(new NamedRange('DEFNAM', $sheet0, '$A$1'));\n        $sheet0->setCellValue('B1', '=2*DEFNAM');\n        $sheet0->setCellValue('C1', '=DEFNAM=2');\n        $sheet0->setCellValue('D1', '=CONCATENATE(\"X\",DEFNAM)');\n        $this->reloadedSpreadsheet = $robj = $this->writeAndReload($obj, 'Xls');\n        $sheet0 = $robj->setActiveSheetIndex(0);\n        $a1 = $sheet0->getCell('A1')->getCalculatedValue();\n        self::assertEquals(2, $a1);\n        $b1 = $sheet0->getCell('B1')->getCalculatedValue();\n        self::assertEquals(4, $b1);\n        $c1 = $sheet0->getCell('C1')->getCalculatedValue();\n        $tru = true;\n        self::assertEquals($tru, $c1);\n        $d1 = $sheet0->getCell('D1')->getCalculatedValue();\n        self::assertEquals('X2', $d1);\n    }\n\n    public function testFormulaErrorWithThrow(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Cannot yet write formulae with defined names to Xls');\n        $this->xtestFormulaError(true);\n    }\n\n    public function testFormulaError(): void\n    {\n        $this->xtestFormulaError(false);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/HyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass HyperlinkTest extends AbstractFunctional\n{\n    public function testHyperlink(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('First');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Second');\n        $sheet2->setCellValue('A100', 'other sheet');\n        $sheet1->setCellValue('A100', 'this sheet');\n        $sheet1->setCellValue('A1', '=HYPERLINK(\"#A100\", \"here\")');\n        $sheet1->setCellValue('A2', '=HYPERLINK(\"#Second!A100\", \"there\")');\n        $sheet1->setCellValue('A3', '=HYPERLINK(\"http://example.com\", \"external\")');\n        $sheet1->setCellValue('A4', 'gotoA101');\n        $sheet1->getCell('A4')\n            ->getHyperlink()\n            ->setUrl('#A101');\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->setActiveSheetIndex(0);\n        self::assertSame('sheet://#A100', $sheet0->getCell('A1')->getHyperlink()->getUrl());\n        self::assertSame('sheet://#Second!A100', $sheet0->getCell('A2')->getHyperlink()->getUrl());\n        self::assertSame('http://example.com', $sheet0->getCell('A3')->getHyperlink()->getUrl());\n        self::assertSame('sheet://#A101', $sheet0->getCell('A4')->getHyperlink()->getUrl());\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/Issue4331Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4331Test extends AbstractFunctional\n{\n    public function testIssue4331(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $c3 = '=VLOOKUP(B3,$B$10:$C$13,2,FALSE)';\n        $d3 = '=VLOOKUP(\"intermediate\",$B$10:$C$13,2,TRUE)';\n        $c4 = '=VLOOKUP(B3,$B$10:$C$13,2,FALSE())';\n        $d4 = '=VLOOKUP(\"intermediate\",$B$10:$C$13,2,TRUE())';\n        $sheet->fromArray(\n            [\n                ['level', 'result'],\n                ['medium', $c3, $d3],\n                [null, $c4, $d4],\n            ],\n            null,\n            'B2',\n            true\n        );\n        $sheet->fromArray(\n            [\n                ['high', 6],\n                ['low', 2],\n                ['medium', 4],\n                ['none', 0],\n            ],\n            null,\n            'B10',\n            true\n        );\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n\n        $worksheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame($c3, $worksheet->getCell('C3')->getValue());\n        self::assertSame(4, $worksheet->getCell('C3')->getCalculatedValue());\n        self::assertSame($d3, $worksheet->getCell('D3')->getValue());\n        self::assertSame(6, $worksheet->getCell('D3')->getCalculatedValue());\n        self::assertSame($c4, $worksheet->getCell('C4')->getValue());\n        self::assertSame(4, $worksheet->getCell('C4')->getCalculatedValue());\n        self::assertSame($d4, $worksheet->getCell('D4')->getValue());\n        self::assertSame(6, $worksheet->getCell('D4')->getCalculatedValue());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/Issue4584Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4584Test extends AbstractFunctional\n{\n    public function testWriteAndReadRowDimension(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getDefaultRowDimension()->setRowHeight(20);\n        $sheet->setCellValue('A1', 'hello there world 1');\n        $sheet->getStyle('A1')->getAlignment()->setWrapText(true);\n        $sheet->getRowDimension(1)->setCustomFormat(true);\n        $sheet->setCellValue('A2', 'hello there world 2');\n        $sheet->setCellValue('A4', 'hello there world 4');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(20.0, $rsheet->getDefaultRowDimension()->getRowHeight());\n        $row1 = $rsheet->getRowDimension(1);\n        self::assertTrue($row1->getCustomFormat());\n        self::assertSame(-1.0, $row1->getRowHeight());\n        $row2 = $rsheet->getRowDimension(2);\n        self::assertFalse($row2->getCustomFormat());\n        self::assertSame(-1.0, $row2->getRowHeight());\n        $row4 = $rsheet->getRowDimension(4);\n        self::assertFalse($row4->getCustomFormat());\n        self::assertSame(-1.0, $row4->getRowHeight());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/Issue642Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue642Test extends TestCase\n{\n    public function testCharOutsideBMP(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $stringUtf8 = \"Hello\\u{1f600}goodbye\";\n        $stringUtf16 = (string) iconv('UTF-8', 'UTF-16LE', $stringUtf8);\n        self::assertSame(28, strlen($stringUtf16)); // each character requires 2 bytes except for non-BMP which requires 4\n        $sheet->getCell('A1')->setValue($stringUtf8);\n        $outputFilename = File::temporaryFilename();\n        $writer = new Xls($spreadsheet);\n        $writer->save($outputFilename);\n        $spreadsheet->disconnectWorksheets();\n        $contents = (string) file_get_contents($outputFilename);\n        unlink($outputFilename);\n        $expected = \"\\x00\\x0e\\x00\\x01\" . $stringUtf16; // length is 14 (0e), not 13\n        self::assertStringContainsString($expected, $contents);\n        $unexpected = \"\\x00\\x0d\\x00\\x01\" . $stringUtf16; // length is 14 (0e), not 13\n        self::assertStringNotContainsString($unexpected, $contents);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/Issue918Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Helper\\Html as HtmlHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue918Test extends AbstractFunctional\n{\n    public function testEmptyRichText(): void\n    {\n        // Issue 918 - Xls Writer creates corrupt file with empty RichText.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $helper = new HtmlHelper();\n        $html = '<div></div>';\n        $richValue = $helper->toRichTextObject($html);\n        self::assertCount(0, $richValue->getRichTextElements());\n        $sheet->getCell('A1')->setValue($richValue);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        self::assertNull($sheet0->getCell('A1')->getValue(), 'empty text object has been changed to null');\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/MicrosecondsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass MicrosecondsTest extends AbstractFunctional\n{\n    /**\n     * Test save and load XLSX file for round-trip DateTime.\n     */\n    public function testIssue4476(): void\n    {\n        $date = '2020-10-21';\n        $time = '14:55:31';\n        $originalDateTime = new DateTime(\"{$date}T{$time}\");\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', Date::dateTimeToExcel($originalDateTime));\n        $sheet->getStyle('A1')\n            ->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd hh:mm:ss.000');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        /** @var float */\n        $reread = $rsheet->getCell('A1')->getValue();\n        $temp = Date::excelToDateTimeObject($reread)\n            ->format('Y-m-d H:i:s.u');\n        self::assertSame(\"{$date} {$time}.000000\", $temp, 'round trip works with float value');\n        $formatted = $rsheet->getCell('A1')->getFormattedValue();\n        self::assertSame(\"{$date} {$time}.000\", $formatted, 'round trip works with formatted value');\n        /** @var float */\n        $temp = Date::stringToExcel($formatted);\n        $temp = Date::excelToDateTimeObject($temp)\n            ->format('Y-m-d H:i:s.u');\n        self::assertSame(\"{$date} {$time}.000000\", $temp, 'round trip works using stringToExcel on formatted value');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/NonLatinFormulasTest.php",
    "content": "<?php\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidator;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass NonLatinFormulasTest extends AbstractFunctional\n{\n    public function testNonLatin(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $validation = $worksheet->getCell('B1')->getDataValidation();\n        $validation->setType(DataValidation::TYPE_LIST);\n        $validation->setErrorStyle(DataValidation::STYLE_STOP);\n        $validation->setAllowBlank(false);\n        $validation->setShowInputMessage(true);\n        $validation->setShowErrorMessage(true);\n        $validation->setShowDropDown(true);\n        $validation->setFormula1('\"слово, сло\"');\n\n        $dataValidator = new DataValidator();\n        $worksheet->getCell('B1')->setValue('слово');\n        self::assertTrue(\n            $dataValidator->isValid($worksheet->getCell('B1'))\n        );\n        $worksheet->getCell('B1')->setValue('слов');\n        self::assertFalse(\n            $dataValidator->isValid($worksheet->getCell('B1'))\n        );\n\n        $worksheet->setTitle('словслов');\n        $worksheet->getCell('A1')->setValue('=словслов!B1');\n        $worksheet->getCell('A2')->setValue(\"='словслов'!B1\");\n        $spreadsheet->addNamedRange(new NamedRange('слсл', $worksheet, '$B$1'));\n        $worksheet->getCell('A3')->setValue('=слсл');\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        self::assertSame('словслов', $sheet0->getTitle());\n        self::assertSame('=словслов!B1', $sheet0->getCell('A1')->getValue());\n        self::assertSame('слов', $sheet0->getCell('A1')->getCalculatedValue());\n        // Quotes around sheet name are stripped off - harmless\n        //self::assertSame(\"='словслов'!B1\", $sheet0->getCell('A2')->getValue());\n        self::assertSame('слов', $sheet0->getCell('A2')->getCalculatedValue());\n        // Formulas with defined names don't work in Xls Writer\n        //self::assertSame('=слсл', $sheet0->getCell('A3')->getValue());\n        // But result should be accurate\n        self::assertSame('слов', $sheet0->getCell('A3')->getCalculatedValue());\n        $names = $robj->getDefinedNames();\n        self::assertCount(1, $names);\n        // name has been uppercased\n        $namedRange = $names['СЛСЛ'] ?? null;\n        self::assertInstanceOf(NamedRange::class, $namedRange);\n        self::assertSame('$B$1', $namedRange->getRange());\n\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/ParserTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Parser;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ParserTest extends TestCase\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    public function testNonArray(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Unexpected non-array');\n        $this->spreadsheet = new Spreadsheet();\n        $parser = new Parser($this->spreadsheet);\n        $parser->toReversePolish();\n    }\n\n    public function testMissingIndex(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Unexpected non-array');\n        $this->spreadsheet = new Spreadsheet();\n        $parser = new Parser($this->spreadsheet);\n        $parser->toReversePolish(['left' => 0]);\n    }\n\n    public function testParseError(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Unknown token +');\n        $this->spreadsheet = new Spreadsheet();\n        $parser = new Parser($this->spreadsheet);\n        $parser->toReversePolish(['left' => 1, 'right' => 2, 'value' => '+']);\n    }\n\n    public function testGoodParse(): void\n    {\n        $this->spreadsheet = new Spreadsheet();\n        $parser = new Parser($this->spreadsheet);\n        self::assertSame('1e01001e02001e0300', bin2hex($parser->toReversePolish(['left' => 1, 'right' => 2, 'value' => 3])));\n    }\n\n    #[DataProvider('cellSheetnameQuotedProvider')]\n    public function testCellSheetnameQuoted(bool $expected, string $address): void\n    {\n        self::assertSame($expected, Parser::matchCellSheetnameQuoted($address));\n    }\n\n    public static function cellSheetnameQuotedProvider(): array\n    {\n        return [\n            [true, '\\'TS GK Mustermann Hans 2\\'!$N$1'],\n            [true, '\\'TS GK Mustermann Hans 2\\'!N15'],\n            [true, '\\'TS GK Mus\\'\\'termann Hans 2\\'!N15'],\n            [false, '\\'TS GK Mus\\'termann Hans 2\\'!N15'],\n            [false, '\\'TS GK Mustermann Hans 2\\'!N15:P16'],\n            [false, '\\'TS GK Mustermann Hans 2\\'!$N$15:$P$16'],\n            [false, 'sheet1!N15'],\n            [false, 'sheet1!N15:P16'],\n            [false, 'N15'],\n            [false, 'N15:P16'],\n        ];\n    }\n\n    #[DataProvider('rangeSheetnameQuotedProvider')]\n    public function testRangeSheetnameQuoted(bool $expected, string $address): void\n    {\n        self::assertSame($expected, Parser::matchRangeSheetnameQuoted($address));\n    }\n\n    public static function rangeSheetnameQuotedProvider(): array\n    {\n        return [\n            [false, '\\'TS GK Mustermann Hans 2\\'!$N$1'],\n            [false, '\\'TS GK Mustermann Hans 2\\'!N15'],\n            [false, '\\'TS GK Mus\\'\\'termann Hans 2\\'!N15'],\n            [false, '\\'TS GK Mus\\'termann Hans 2\\'!N15'],\n            [true, '\\'TS GK Mustermann Hans 2\\'!N15:P16'],\n            [true, '\\'TS GK Mustermann Hans 2\\'!$N$15:$P$16'],\n            [false, 'sheet1!N15'],\n            [false, 'sheet1!N15:P16'],\n            [false, 'N15'],\n            [false, 'N15:P16'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/ReadOrderTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ReadOrderTest extends AbstractFunctional\n{\n    public function testBooleanLiteral(): void\n    {\n        // Issue 850 - Xls Reader/Writer didn't support Alignment ReadOrder\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '1-' . 'منصور حسين الناصر');\n        $sheet->setCellValue('A2', '1-' . 'منصور حسين الناصر');\n        $sheet->setCellValue('A3', '1-' . 'منصور حسين الناصر');\n        $sheet->getStyle('A1')\n            ->getAlignment()->setReadOrder(Alignment::READORDER_RTL);\n        $sheet->getStyle('A2')\n            ->getAlignment()->setReadOrder(Alignment::READORDER_LTR);\n\n        $sheet->setCellValue('A5', 'hello');\n        $spreadsheet->getActiveSheet()->getStyle('A5')\n            ->getAlignment()->setIndent(2);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->setActiveSheetIndex(0);\n        self::assertSame(\n            Alignment::READORDER_RTL,\n            $sheet0->getStyle('A1')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_LTR,\n            $sheet0->getStyle('A2')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_CONTEXT,\n            $sheet0->getStyle('A3')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            2,\n            $sheet0->getStyle('A5')->getAlignment()->getIndent()\n        );\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/RichTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xls as XlsReader;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls as XlsWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RichTextTest extends TestCase\n{\n    private string $filename = '';\n\n    protected function teardown(): void\n    {\n        if ($this->filename !== '') {\n            unlink($this->filename);\n        }\n    }\n\n    public function testRichText(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $rtf = new RichText();\n        $rtf->createText('~Cell Style~');\n        $rtf->createTextRun('~RTF Style~')->getFont()?->setItalic(true);\n        $rtf->createText('~No Style~');\n        $sheet->getCell('A1')->setValue($rtf);\n        $sheet->getStyle('A1')->getFont()->setBold(true);\n\n        $fontStyle = $sheet->getStyle('A1')->getFont();\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n\n        $a1Value = $sheet->getCell('A1')->getValue();\n        self::assertInstanceOf(RichText::class, $a1Value);\n        $elements = $a1Value->getRichTextElements();\n        self::assertCount(3, $elements);\n        self::assertNull($elements[0]->getFont());\n        $fontStyle = $elements[1]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertFalse($fontStyle->getBold());\n        self::assertTrue($fontStyle->getItalic());\n        self::assertNull($elements[0]->getFont());\n\n        $this->filename = File::temporaryFilename();\n        $writer = new XlsWriter($spreadsheet);\n        $writer->save($this->filename);\n        $spreadsheet->disconnectWorksheets();\n\n        $this->readfile();\n    }\n\n    private function readfile(): void\n    {\n        $reader = new XlsReader();\n        $spreadsheet = $reader->load($this->filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $fontStyle = $sheet->getStyle('A1')->getFont();\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n\n        $a1Value = $sheet->getCell('A1')->getValue();\n        self::assertInstanceOf(RichText::class, $a1Value);\n        $elements = $a1Value->getRichTextElements();\n        self::assertCount(3, $elements);\n        // write/read has changed text to run but no real difference\n        $fontStyle = $elements[0]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n        $fontStyle = $elements[1]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertFalse($fontStyle->getBold());\n        self::assertTrue($fontStyle->getItalic());\n        // write/read has changed text to run but no real difference\n        $fontStyle = $elements[2]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/Sample19Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Sample19Test extends AbstractFunctional\n{\n    public function testSample19Xls(): void\n    {\n        $spreadsheet = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n        $spreadsheet->setActiveSheetIndex(0);\n        $spreadsheet->getActiveSheet()->setCellValue('A1', 'Firstname:')\n            ->setCellValue('A2', 'Lastname:')\n            ->setCellValue('A3', 'Fullname:')\n            ->setCellValue('B1', 'Maarten')\n            ->setCellValue('B2', 'Balliauw')\n            ->setCellValue('B3', '=B1 & \" \" & B2')\n            ->setCellValue('C1', '=A2&A3&A3&A2&B1');\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xls');\n        $sheet0 = $robj->setActiveSheetIndex(0);\n        // Xls parser eliminates unneeded whitespace\n        self::assertEquals('=B1&\" \"&B2', $sheet0->getCell('B3')->getValue());\n        self::assertEquals('Maarten Balliauw', $sheet0->getCell('B3')->getCalculatedValue());\n        self::assertEquals('Lastname:Fullname:Fullname:Lastname:Maarten', $sheet0->getCell('C1')->getCalculatedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/VisibilityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass VisibilityTest extends AbstractFunctional\n{\n    /** @param array<int, bool> $visibleRows */\n    #[DataProvider('dataProviderRowVisibility')]\n    public function testRowVisibility(array $visibleRows): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        foreach ($visibleRows as $row => $visibility) {\n            $worksheet->setCellValue(\"A{$row}\", $row);\n            $worksheet->getRowDimension($row)->setVisible($visibility);\n        }\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n        foreach ($visibleRows as $row => $visibility) {\n            self::assertSame($visibility, $reloadedWorksheet->getRowDimension($row)->getVisible());\n        }\n    }\n\n    /** @return array<int, array<int, array<int, bool>>> */\n    public static function dataProviderRowVisibility(): array\n    {\n        return [\n            [\n                [1 => true, 2 => false, 3 => false, 4 => true, 5 => true, 6 => false],\n            ],\n        ];\n    }\n\n    /** @param array<string, bool> $visibleColumns */\n    #[DataProvider('dataProviderColumnVisibility')]\n    public function testColumnVisibility(array $visibleColumns): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        foreach ($visibleColumns as $column => $visibility) {\n            $worksheet->setCellValue(\"{$column}1\", $column);\n            $worksheet->getColumnDimension($column)->setVisible($visibility);\n        }\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n        foreach ($visibleColumns as $column => $visibility) {\n            self::assertSame($visibility, $reloadedWorksheet->getColumnDimension($column)->getVisible());\n        }\n    }\n\n    /** @return array<int, array<int, array<string, bool>>> */\n    public static function dataProviderColumnVisibility(): array\n    {\n        return [\n            [\n                ['A' => true, 'B' => false, 'C' => false, 'D' => true, 'E' => true, 'F' => false],\n            ],\n        ];\n    }\n\n    /** @param array<string, string> $visibleSheets */\n    #[DataProvider('dataProviderSheetVisibility')]\n    public function testSheetVisibility(array $visibleSheets): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->removeSheetByIndex(0);\n        foreach ($visibleSheets as $sheetName => $visibility) {\n            $worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet, $sheetName));\n            $worksheet->setCellValue('A1', $sheetName);\n            $worksheet->setSheetState($visibility);\n        }\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        foreach ($visibleSheets as $sheetName => $visibility) {\n            $reloadedWorksheet = $reloadedSpreadsheet->getSheetByNameOrThrow($sheetName);\n            self::assertSame($visibility, $reloadedWorksheet->getSheetState());\n        }\n    }\n\n    /** @return array<int, array<int, array<string, string>>> */\n    public static function dataProviderSheetVisibility(): array\n    {\n        return [\n            [\n                [\n                    'Worksheet 1' => Worksheet::SHEETSTATE_HIDDEN,\n                    'Worksheet 2' => Worksheet::SHEETSTATE_VERYHIDDEN,\n                    'Worksheet 3' => Worksheet::SHEETSTATE_VISIBLE,\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/WorkbookTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Parser;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xls\\Workbook;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionClass;\n\nclass WorkbookTest extends TestCase\n{\n    private Workbook $workbook;\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n    }\n\n    private function setUpWorkbook(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n        }\n        $this->spreadsheet = $spreadsheet = new Spreadsheet();\n        $strTotal = 0;\n        $strUnique = 0;\n        $str_table = [];\n        $colors = [];\n        $parser = new Parser($spreadsheet);\n\n        $this->workbook = new Workbook($spreadsheet, $strTotal, $strUnique, $str_table, $colors, $parser);\n    }\n\n    /**\n     * @param string[] $testColors\n     * @param string[] $expectedResult\n     */\n    public function xtestAddColor(array $testColors, array $expectedResult): void\n    {\n        $workbookReflection = new ReflectionClass(Workbook::class);\n        $methodAddColor = $workbookReflection->getMethod('addColor');\n        $propertyPalette = $workbookReflection->getProperty('palette');\n\n        foreach ($testColors as $testColor) {\n            $methodAddColor->invoke($this->workbook, $testColor);\n        }\n\n        $palette = $propertyPalette->getValue($this->workbook);\n\n        self::assertEquals($expectedResult, $palette);\n    }\n\n    public function testAddColor(): void\n    {\n        $i = 0;\n        $arrayEntries = $this->arrayAddColor();\n        while ($i < count($arrayEntries)) {\n            /** @var string[] */\n            $entry0 = $arrayEntries[$i][0];\n            /** @var string[] */\n            $entry1 = $arrayEntries[$i][1];\n            $this->xtestAddColor($entry0, $entry1);\n            ++$i;\n            $arrayEntries = $this->arrayAddColor();\n        }\n    }\n\n    /** @return array<int, array<int, array<mixed>>> */\n    public function arrayAddColor(): array\n    {\n        $this->setUpWorkbook();\n\n        $workbookReflection = new ReflectionClass(Workbook::class);\n        $propertyPalette = $workbookReflection->getProperty('palette');\n\n        $palette = $propertyPalette->getValue($this->workbook);\n        self::assertIsArray($palette);\n\n        $newColor1 = [0x00, 0x00, 0x01, 0x00];\n        $newColor2 = [0x00, 0x00, 0x02, 0x00];\n        $newColor3 = [0x00, 0x00, 0x03, 0x00];\n\n        // Add one new color\n        $paletteTestOne = $palette;\n        $paletteTestOne[8] = $newColor1;\n\n        // Add one new color + one existing color after index 8\n        $paletteTestTwo = $paletteTestOne;\n\n        // Add one new color + one existing color before index 9\n        $paletteTestThree = $paletteTestOne;\n        $paletteTestThree[9] = $palette[8];\n\n        // Add three new color\n        $paletteTestFour = $palette;\n        $paletteTestFour[8] = $newColor1;\n        $paletteTestFour[9] = $newColor2;\n        $paletteTestFour[10] = $newColor3;\n\n        // Add all existing color\n        $colorsAdd = array_map([$this, 'paletteToColor'], $palette);\n        $paletteTestFive = $palette;\n\n        // Add new color after all existing color\n        $colorsAddTwo = array_map([$this, 'paletteToColor'], $palette);\n        $colorsAddTwo[] = $this->paletteToColor($newColor1);\n        $paletteTestSix = $palette;\n\n        // Add one existing color\n        $paletteTestSeven = $palette;\n\n        // Add two existing color\n        $paletteTestHeight = $palette;\n\n        // Add last existing color and add one new color\n        $keyPalette = array_keys($palette);\n        $last = end($keyPalette);\n        self::assertIsArray($palette[8]);\n        self::assertIsArray($palette[10]);\n        self::assertIsArray($palette[12]);\n        self::assertIsArray($palette[25]);\n        self::assertIsArray($palette[$last]);\n        $lastColor = $this->paletteToColor($palette[$last]);\n        $paletteTestNine = $palette;\n\n        return [\n            [[$this->paletteToColor($newColor1)], $paletteTestOne],\n            [[$this->paletteToColor($newColor1), $this->paletteToColor($palette[12])], $paletteTestTwo],\n            [[$this->paletteToColor($newColor1), $this->paletteToColor($palette[8])], $paletteTestThree],\n            [[$this->paletteToColor($newColor1), $this->paletteToColor($newColor2), $this->paletteToColor($newColor3)], $paletteTestFour],\n            [$colorsAdd, $paletteTestFive],\n            [$colorsAddTwo, $paletteTestSix],\n            [[$this->paletteToColor($palette[8])], $paletteTestSeven],\n            [[$this->paletteToColor($palette[25]), $this->paletteToColor($palette[10])], $paletteTestHeight],\n            [[$lastColor, $this->paletteToColor($newColor1)], $paletteTestNine],\n        ];\n    }\n\n    /**\n     * Change palette color to rgb string.\n     *\n     * @param array<mixed, mixed> $palette\n     */\n    private function paletteToColor(array $palette): string\n    {\n        return $this->right('00' . self::dec2hex($palette[0]), 2)\n            . $this->right('00' . self::dec2hex($palette[1]), 2)\n            . $this->right('00' . self::dec2hex($palette[2]), 2);\n    }\n\n    private static function dec2hex(mixed $value): string\n    {\n        return is_numeric($value) ? dechex((int) $value) : '0';\n    }\n\n    /**\n     * Return n right character in string.\n     *\n     * @param string $value text to get right character\n     * @param int $nbchar number of char at right of string\n     */\n    private function right(string $value, int $nbchar): string\n    {\n        return mb_substr($value, mb_strlen($value) - $nbchar, $nbchar);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xls/XlsGifBmpTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xls;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Exception as ReaderException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass XlsGifBmpTest extends AbstractFunctional\n{\n    private string $filename = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->filename) {\n            unlink($this->filename);\n        }\n        $this->filename = '';\n    }\n\n    public function testBmp(): void\n    {\n        $pgmstart = (float) (new DateTime())->format('U');\n        $spreadsheet = new Spreadsheet();\n        $filstart = $spreadsheet->getProperties()->getModified();\n        self::assertLessThanOrEqual($filstart, $pgmstart);\n\n        // Add a drawing to the worksheet\n        $drawing = new Drawing();\n        $drawing->setName('Letters B, M, and P');\n        $drawing->setDescription('Handwritten B, M, and P');\n        $drawing->setPath(__DIR__ . '/../../../../samples/images/bmp.bmp');\n        $drawing->setHeight(36);\n        $drawing->setWorksheet($spreadsheet->getActiveSheet());\n        $drawing->setCoordinates('A1');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $creationDatestamp = $reloadedSpreadsheet->getProperties()->getCreated();\n        $filstart = $creationDatestamp;\n        $worksheet = $reloadedSpreadsheet->getActiveSheet();\n        $drawings = $worksheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        foreach ($worksheet->getDrawingCollection() as $drawing) {\n            $mimeType = ($drawing instanceof MemoryDrawing) ? $drawing->getMimeType() : 'notmemorydrawing';\n            self::assertEquals('image/png', $mimeType);\n        }\n        $pgmend = (float) (new DateTime())->format('U');\n\n        self::assertLessThanOrEqual($pgmend, $pgmstart);\n        self::assertLessThanOrEqual($pgmend, $filstart);\n        self::assertLessThanOrEqual($filstart, $pgmstart);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testGif(): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        // Add a drawing to the worksheet\n        $drawing = new Drawing();\n        $drawing->setName('Letters G, I, and G');\n        $drawing->setDescription('Handwritten G, I, and F');\n        $drawing->setPath(__DIR__ . '/../../../../samples/images/gif.gif');\n        $drawing->setHeight(36);\n        $drawing->setWorksheet($spreadsheet->getActiveSheet());\n        $drawing->setCoordinates('A1');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $worksheet = $reloadedSpreadsheet->getActiveSheet();\n        $drawings = $worksheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        foreach ($worksheet->getDrawingCollection() as $drawing) {\n            $mimeType = ($drawing instanceof MemoryDrawing) ? $drawing->getMimeType() : 'notmemorydrawing';\n            self::assertEquals('image/png', $mimeType);\n        }\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testGifIssue4112(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->removeSheetByIndex(0);\n        $sheet = new Worksheet($spreadsheet, 'Insured List');\n        $spreadsheet->addSheet($sheet, 0);\n\n        // Add a drawing to the worksheet\n        $drawing = new Drawing();\n        $drawing->setName('Letters G, I, and G');\n        $drawing->setDescription('Handwritten G, I, and F');\n        $drawing->setPath(__DIR__ . '/../../../../samples/images/gif.gif');\n        $drawing->setHeight(36);\n        $drawing->setWorksheet($sheet);\n        $drawing->setCoordinates('A1');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xls');\n        $spreadsheet->disconnectWorksheets();\n        $worksheet = $reloadedSpreadsheet->getActiveSheet();\n        $drawings = $worksheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        foreach ($worksheet->getDrawingCollection() as $drawing) {\n            $mimeType = ($drawing instanceof MemoryDrawing) ? $drawing->getMimeType() : 'notmemorydrawing';\n            self::assertEquals('image/png', $mimeType);\n        }\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testInvalidTimestamp(): void\n    {\n        $this->expectException(ReaderException::class);\n        $this->expectExceptionMessage('Expecting 8 byte string');\n        \\PhpOffice\\PhpSpreadsheet\\Shared\\OLE::OLE2LocalDate(' ');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ArrayFormulaPrefixTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ArrayFormulaPrefixTest extends AbstractFunctional\n{\n    /**\n     * Test to ensure that xlfn prefix is being added to functions\n     * included in an array formula, if appropriate.\n     *\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Exception\n     */\n    public function testWriteArrayFormulaTextJoin(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        //Write data\n        $worksheet->getCell('A1')->setValue('Some Text');\n        $worksheet->getCell('A2')->setValue('Some More Text');\n        $worksheet->getCell('A3')->setValue(14.56);\n        $worksheet->getCell('A4')->setValue(17.24);\n        $worksheet->getCell('A5')->setValue(9.4);\n        $worksheet->getCell('A6')->setValue(5);\n\n        //Write formula\n        $cell = $worksheet->getCell('A7');\n        $cell->setValueExplicit('=TEXTJOIN(\"\",TRUE,IF(ISNUMBER(A1:A6), A1:A6,\"\"))', DataType::TYPE_FORMULA);\n        /** @var array<string, string> */\n        $attrs = $cell->getFormulaAttributes();\n        $attrs['t'] = 'array';\n        $cell->setFormulaAttributes($attrs);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <f t=\"array\" ref=\"A7\" aca=\"1\" ca=\"1\">_xlfn.TEXTJOIN(&quot;&quot;,TRUE,IF(ISNUMBER(A1:A6), A1:A6,&quot;&quot;))</f>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    /**\n     * Certain functions do not have the xlfn prefix applied.  Test an array formula\n     * that includes those functions to see if they are written properly.\n     *\n     * @throws \\PhpOffice\\PhpSpreadsheet\\Exception\n     */\n    public function testWriteArrayFormulaWithoutPrefix(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        //Write data\n        $worksheet->getCell('A1')->setValue('orange');\n        $worksheet->getCell('A2')->setValue('green');\n        $worksheet->getCell('A3')->setValue('blue');\n        $worksheet->getCell('A4')->setValue('yellow');\n        $worksheet->getCell('A5')->setValue('pink');\n        $worksheet->getCell('A6')->setValue('red');\n\n        //Write formula\n        $cell = $worksheet->getCell('A7');\n        $cell->setValueExplicit('=SUM(LEN(A1:A6))', DataType::TYPE_FORMULA);\n        /** @var array<string, string> */\n        $attrs = $cell->getFormulaAttributes();\n        $attrs['t'] = 'array';\n        $cell->setFormulaAttributes($attrs);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <f t=\"array\" ref=\"A7\" aca=\"1\" ca=\"1\">SUM(LEN(A1:A6))</f>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ArrayFormulaValidationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFormulaValidationTest extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('validationProvider')]\n    public function testWriteArrayFormulaValidation(string $formula): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)\n            ->setInstanceArrayReturnType(\n                Calculation::RETURN_ARRAY_AS_ARRAY\n            );\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('C1', 1);\n        $sheet->setCellValue('C2', 2);\n        $sheet->setCellValue('C3', 3);\n        $sheet->setCellValue('C4', 3);\n        $sheet->setCellValue('C5', 5);\n        $sheet->setCellValue('C6', 6);\n        $sheet->setCellValue('B1', '=UNIQUE(C1:C6)');\n\n        $validation = $sheet->getCell('A1')->getDataValidation();\n        $validation->setType(DataValidation::TYPE_LIST);\n        $validation->setErrorStyle(DataValidation::STYLE_STOP);\n        $validation->setAllowBlank(true);\n        $validation->setShowDropDown(true);\n        $validation->setShowErrorMessage(true);\n        $validation->setError('Invalid input');\n        $validation->setFormula1($formula);\n        $sheet->getCell('A1')->setDataValidation($validation);\n\n        $this->outputFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        Calculation::getInstance($spreadsheet2)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $validation2 = $sheet2->getCell('A1')->getDataValidation();\n        self::assertSame('ANCHORARRAY($B$1)', $validation2->getFormula1());\n        $spreadsheet2->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<formula1>_xlfn.ANCHORARRAY($B$1)</formula1>', $data);\n        }\n    }\n\n    public static function validationProvider(): array\n    {\n        return [\n            ['ANCHORARRAY($B$1)'],\n            ['$B$1#'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ArrayFunctions2Test.php",
    "content": "<?php\n\n// not yet ready for prime time\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\NamedRange;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Border;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PHPUnit\\Framework\\TestCase;\n\n// TODO - I think the spreadsheet below is too difficult for PhpSpreadsheet to calculate correctly.\n\nclass ArrayFunctions2Test extends TestCase\n{\n    private const STYLESIZE14 = [\n        'font' => [\n            'size' => 14,\n        ],\n    ];\n    private const STYLEBOLD = [\n        'font' => [\n            'bold' => true,\n        ],\n    ];\n    private const STYLEBOLD14 = [\n        'font' => [\n            'bold' => true,\n            'size' => 14,\n        ],\n    ];\n    private const STYLECENTER = [\n        'alignment' => [\n            'horizontal' => Alignment::HORIZONTAL_CENTER,\n        ],\n    ];\n\n    private const STYLETHICKBORDER = [\n        'borders' => [\n            'outline' => [\n                'borderStyle' => Border::BORDER_THICK,\n                'color' => ['argb' => '00000000'],\n            ],\n        ],\n    ];\n\n    private array $trn;\n\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    private function odd(int $i): bool\n    {\n        return ($i % 2) === 1;\n    }\n\n    private function doPartijen(Worksheet $ws): int\n    {\n        $saring = explode(\"\\n\", $this->trn['PARINGEN']);\n        $s = $this->trn['PLAYERSNOID'];\n        $g = $this->trn['RONDEGAMES'];\n        $KD = $this->trn['KALENDERDATA'];\n        $si = $this->trn['PLAYERSIDS'];\n\n        $a = [\n            ['Wit', null, null, null, 'Zwart', null, null, null, 'Wit', 'Uitslag', 'Zwart', 'Opmerking', 'Datum'],\n            ['Winstpunten', 'Weerstandspunten', 'punten', 'Tegenpunten', 'Winstpunten', 'Weerstandspunten', 'punten', 'Tegenpunten'],\n\n        ];\n        $ws->fromArray($a, null, 'A1');\n\n        $ws->getStyle('A1:L1')->applyFromArray(self::STYLEBOLD);\n        $ws->getStyle('A1:L1')->applyFromArray(self::STYLESIZE14);\n\n        $lijn = 1;\n        for ($i = 1; $i <= $this->trn['RONDEN']; ++$i) {//aantal ronden oneven->heen en even->terug\n            $countSaring = count($saring);\n            for ($j = 0; $j < $countSaring; ++$j) {//subronden\n                ++$lijn;\n                if (isset($KD[(($i - 1) * $this->trn['SUB_RONDEN']) + $j], $KD[(($i - 1) * $this->trn['SUB_RONDEN']) + $j]['RONDE'])) {\n                    $ws->setCellValue([9, $lijn], $KD[(($i - 1) * $this->trn['SUB_RONDEN']) + $j]['RONDE']);\n                } else {\n                    $ws->setCellValue([9, $lijn], 'Kalenderdata zijn niet(volledig) ingevuld');\n                }\n                if (isset($KD[(($i - 1) * $this->trn['SUB_RONDEN']) + $j], $KD[(($i - 1) * $this->trn['SUB_RONDEN']) + $j]['TXT'])) {\n                    $ws->setCellValue([10, $lijn], $KD[(($i - 1) * $this->trn['SUB_RONDEN']) + $j]['TXT']);\n                } else {\n                    $ws->setCellValue([10, $lijn], 'Kalenderdata zijn niet(volledig) ingevuld');\n                }\n\n                $ws->getStyle('A' . $lijn . ':L' . $lijn . '')->applyFromArray(self::STYLEBOLD14);\n\n                $s2 = explode(' ', $saring[$j]);\n                $counts2 = count($s2);\n                for ($k = 0; $k < $counts2; ++$k) {//borden\n                    if (trim($s2[$k]) == '') {\n                        continue;\n                    }\n                    $s3 = explode('-', $s2[$k]); //wit-zwart\n                    $s3[0] = (int) $s3[0];\n                    $s3[1] = (int) $s3[1];\n                    ++$lijn;\n                    $ws->setCellValue([1, $lijn], '=IF(SUBSTITUTE(TRIM($J' . $lijn . '),\"-\",\"\")=\"\",\"\",XLOOKUP($K' . $lijn . ',Spelers!$B$2:$B$' . (count($s) + 1) . ',Spelers!$C$2:$C$' . (count($s) + 1) . ',FALSE) * VLOOKUP(J' . $lijn . ', PuntenLijst,4,FALSE))');\n                    $ws->setCellValue([2, $lijn], '=IF(SUBSTITUTE(TRIM($J' . $lijn . '),\"-\",\"\")=\"\",\"\",VLOOKUP($K' . $lijn . ',Spelers!$B$2:$D$' . (count($s) + 1) . ',3,FALSE) * VLOOKUP(J' . $lijn . ', PuntenLijst,5,FALSE))');\n                    $ws->setCellValue([3, $lijn], '=IF(TRIM($J' . $lijn . ')=\"\",\"\",XLOOKUP($J' . $lijn . ', Punten!$A$2:$A$50,Punten!$B$2:$B$50,0,0))');\n                    $ws->setCellValue([4, $lijn], '=IF(TRIM($J' . $lijn . ')=\"\",\"\",XLOOKUP($J' . $lijn . ', Punten!$A$2:$A$50,Punten!$G$2:$G$50,0,0))');\n\n                    $ws->setCellValue([5, $lijn], '=IF(SUBSTITUTE(TRIM($J' . $lijn . '),\"-\",\"\")=\"\",\"\",VLOOKUP($I' . $lijn . ',Spelers!$B$2:$D$' . (count($s) + 1) . ',3,FALSE) * VLOOKUP(J' . $lijn . ', PuntenLijst,6,FALSE))');\n                    $ws->setCellValue([6, $lijn], '=IF(SUBSTITUTE(TRIM($J' . $lijn . '),\"-\",\"\")=\"\",\"\",VLOOKUP($I' . $lijn . ',Spelers!$B$2:$D$' . (count($s) + 1) . ',3,FALSE) * VLOOKUP(J' . $lijn . ', PuntenLijst,5,FALSE))');\n                    $ws->setCellValue([7, $lijn], '=IF(TRIM($J' . $lijn . ')=\"\",\"\",XLOOKUP($J' . $lijn . ', Punten!$A$2:$A$50,Punten!$C$2:$C$50,0,0))');\n                    $ws->setCellValue([8, $lijn], '=IF(TRIM($J' . $lijn . ')=\"\",\"\",XLOOKUP($J' . $lijn . ', Punten!$A$2:$A$50,Punten!$H$2:$H$50,0,0))');\n\n                    if ($this->odd($i)) {\n                        if (\n                            isset($g[$i][$si[((int) $s3[0]) - 1]][$si[((int) $s3[1]) - 1]])\n                        ) {\n                            $pw = $g[$i][$si[((int) $s3[0]) - 1]][$si[((int) $s3[1]) - 1]];\n                        } else {\n                            $pw = ['SYMBOOLWIT' => '', 'SYMBOOLZWART' => '', 'UITSLAG' => '', 'OPMERKING' => '', 'DATUM' => ''];\n                        }\n                        $ws->setCellValue([9, $lijn], '=Spelers!$B$' . ($s3[0] + 1));\n                        $ws->setCellValue([11, $lijn], '=Spelers!$B$' . ($s3[1] + 1));\n                    } else {\n                        if (\n                            isset($g[$i][$si[((int) $s3[1]) - 1]][$si[((int) $s3[0]) - 1]])\n                        ) {\n                            $pw = $g[$i][$si[((int) $s3[1]) - 1]][$si[((int) $s3[0]) - 1]];\n                        } else {\n                            $pw = ['SYMBOOLWIT' => '', 'SYMBOOLZWART' => '', 'UITSLAG' => '', 'OPMERKING' => '', 'DATUM' => ''];\n                        }\n                        $ws->setCellValue([9, $lijn], '=Spelers!$B$' . ($s3[1] + 1));\n                        $ws->setCellValue([11, $lijn], '=Spelers!$B$' . ($s3[0] + 1));\n                    }\n                    if ($pw['SYMBOOLWIT'] != '') {\n                        $ws->setCellValue([10, $lijn], $pw['SYMBOOLWIT'] . '-' . $pw['SYMBOOLZWART']);\n                    }\n                    $ws->setCellValue([13, $lijn], $pw['OPMERKING']);\n                    $ws->setCellValue([14, $lijn], $pw['DATUM']);\n\n                    $this->doValidationPunten($ws, 'J' . $lijn);\n\n                    $ws->getRowDimension($lijn)->setOutlineLevel(1);\n                }\n                ++$lijn;\n            }\n            ++$lijn;\n        }\n        $ws->getStyle('J1:J' . $lijn)->applyFromArray(self::STYLECENTER);\n\n        $ws->getColumnDimension('A')->setVisible(false);\n        $ws->getColumnDimension('B')->setVisible(false);\n        $ws->getColumnDimension('C')->setVisible(false);\n        $ws->getColumnDimension('D')->setVisible(false);\n        $ws->getColumnDimension('E')->setVisible(false);\n        $ws->getColumnDimension('F')->setVisible(false);\n        $ws->getColumnDimension('G')->setVisible(false);\n        $ws->getColumnDimension('H')->setVisible(false);\n\n        for ($i = 65; $i < ord('M'); ++$i) {\n            $ws->getColumnDimension(chr($i))->setAutoSize(true);\n        }\n        $ws->setAutoFilter('A2:M' . $lijn);\n        $ws->setSelectedCell('A1');\n\n        return $lijn;\n    }\n\n    private function doValidationPunten(Worksheet $s, string $cel): void\n    {\n        $validation = $s->getCell($cel)->getDataValidation();\n        $validation->setType(DataValidation::TYPE_LIST);\n        $validation->setErrorStyle(DataValidation::STYLE_STOP);\n        $validation->setAllowBlank(false);\n        $validation->setShowInputMessage(false);\n        $validation->setShowErrorMessage(true);\n        $validation->setShowDropDown(true);\n        $validation->setFormula1('=punten');\n    }\n\n    private function doPunten(Spreadsheet $ss, Worksheet $ws): void\n    {\n        $ws->fromArray(['Uitslag', 'Wit', 'Zwart', 'Winstverhouding WIT', 'Weerstandverhouding', 'Winstverhouding ZWART', 'Tegenpunten Wit', 'Tegenpunten Zwart'], null, 'A1');\n        $ws->fromArray(['0-3', '0', '3', '0', '1', '1', '0', '0'], null, 'A2');\n        $ws->fromArray(['1-3', '1', '3', '0', '1', '1', '0', '-1'], null, 'A3');\n        $ws->fromArray(['2-3', '2', '3', '0', '1', '1', '0', '-2'], null, 'A4');\n        $ws->fromArray(['3-0', '3', '0', '1', '1', '0', '0', '0'], null, 'A5');\n        $ws->fromArray(['3-1', '3', '1', '1', '1', '0', '-1', '0'], null, 'A6');\n        $ws->fromArray(['3-2', '3', '2', '1', '1', '0', '-2', '0'], null, 'A7');\n        $ws->fromArray(['U-U', '0', '0', '0', '0', '0', '0', '0'], null, 'A8');\n\n        $ss->addNamedRange(new NamedRange('Punten', $ws, '=$A$2:$A$8'));\n        $ss->addNamedRange(new NamedRange('PuntenLijst', $ws, '=$A$2:$H$8'));\n\n        $ws->getStyle('A1:H1')->applyFromArray(self::STYLETHICKBORDER);\n        $ws->getStyle('A1:A8')->applyFromArray(self::STYLETHICKBORDER);\n        $ws->getStyle('B2:H8')->applyFromArray(self::STYLETHICKBORDER);\n\n        for ($i = 65; $i < ord('I'); ++$i) {\n            $ws->getColumnDimension(chr($i))->setAutoSize(true);\n        }\n        $ws->setSelectedCell('A1');\n    }\n\n    private function doSpelers(Worksheet $ws, int $maxLijn): void\n    {\n        $this->doKoppen($ws);\n\n        $i = 1;\n        foreach ($this->trn['SPELERS'] as $speler) {\n            $ws->setCellValue([1, ++$i], '=RANK(D' . $i . ',$D$2:$D$' . (count($this->trn['SPELERS']) + 1) . ',0)-1+COUNTIF($D$2:D' . $i . ',D' . $i . ')');\n            $ws->setCellValue([2, $i], $speler);\n            $ws->setCellValue([3, $i], '=COUNTIFS(Partijen!$I$3:$I$' . $maxLijn . ',$B' . $i . ',Partijen!$J$3:$J$' . $maxLijn . ',\"<>\")+COUNTIFS(Partijen!$K$3:$K$' . $maxLijn . ',Spelers!$B' . $i . ',Partijen!$J$3:$J$' . $maxLijn . ',\"<>\")'); // - SUM(H' . $i . ':I' . $i . ')\n            $ws->setCellValue([4, $i], '=SUMIFS(Partijen!C$3:C$' . $maxLijn . ',Partijen!$I$3:$I$' . $maxLijn . ',$B' . $i . ')+SUMIFS(Partijen!G$3:G$' . $maxLijn . ',Partijen!$K$3:$K$' . $maxLijn . ',$B' . $i . ')');\n            $ws->setCellValue([5, $i], '=SUMIFS(Partijen!D$3:D$' . $maxLijn . ',Partijen!$I$3:$I$' . $maxLijn . ',$B' . $i . ')+SUMIFS(Partijen!H$3:H$' . $maxLijn . ',Partijen!$K$3:$K$' . $maxLijn . ',$B' . $i . ')');\n            $ws->setCellValue([6, $i], '=SUMIFS(Partijen!A$3:A$' . $maxLijn . ',Partijen!$I$3:$I$' . $maxLijn . ',$B' . $i . ')+SUMIFS(Partijen!E$3:E$' . $maxLijn . ',Partijen!$K$3:$K$' . $maxLijn . ',$B' . $i . ')');\n            $ws->setCellValue([7, $i], '=SUMIFS(Partijen!B$3:B$' . $maxLijn . ',Partijen!$I$3:$I$' . $maxLijn . ',$B' . $i . ')+SUMIFS(Partijen!F$3:F$' . $maxLijn . ',Partijen!$K$3:$K$' . $maxLijn . ',$B' . $i . ')');\n            $ws->setCellValue([8, $i], '=C' . $i . '*MAX(Punten!$B$2:$B$50)-D' . $i . '');\n        }\n        $ws->setSelectedCell('A1');\n    }\n\n    private function doSort1(Worksheet $ws): void\n    {\n        $ws->setCellValue('A2', '=FILTER(SORTBY(Spelers!A2:H101,Spelers!D2:D101,-1,Spelers!E2:E101,1),(Spelers!B2:B101<>\"Bye\")*(NOT(ISBLANK(Spelers!B2:B101))))');\n        $this->doKoppen($ws);\n        $ws->setSelectedCell('A1');\n    }\n\n    private function doSort2(Worksheet $ws): void\n    {\n        $ws->setCellValue('A2', '=SORT(FILTER(Spelers!A2:H101,(Spelers!B2:B101<>\"Bye\") * (NOT(ISBLANK(Spelers!B2:B101)))),7,1,FALSE)');\n        $this->doKoppen($ws);\n        $ws->setSelectedCell('A1');\n    }\n\n    private function doKoppen(Worksheet $ws): void\n    {\n        $ws->setCellValue('A1', 'Plaats');\n        $ws->setCellValue('B1', 'Naam');\n        $ws->setCellValue('C1', 'Partijen');\n        $ws->setCellValue('D1', 'Punten');\n        $ws->setCellValue('E1', 'Tegenpunten');\n        $ws->setCellValue('F1', 'Winstpunten');\n        $ws->setCellValue('G1', 'Weerstandspunten');\n        $ws->setCellValue('H1', 'Verlorenpunten');\n\n        for ($i = 65; $i < ord('I'); ++$i) {\n            $ws->getColumnDimension(chr($i))->setAutoSize(true);\n        }\n\n        $ws->getStyle('A1:H1')->applyFromArray(self::STYLEBOLD);\n    }\n\n    public function testManyArraysOutput(): void\n    {\n        $json = file_get_contents('tests/data/Writer/XLSX/ArrayFunctions2.json');\n        self::assertNotFalse($json);\n        $trn = json_decode($json, true);\n        self::assertIsArray($trn);\n        $this->trn = $trn;\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n\n        $wsPartijen = $spreadsheet->getActiveSheet();\n        $wsPartijen->setTitle('Partijen');\n        $wsPunten = new Worksheet($spreadsheet, 'Punten');\n        $wsSpelers = new Worksheet($spreadsheet, 'Spelers');\n        $wsSort1 = new Worksheet($spreadsheet, 'Gesorteerd punten');\n        $wsSort2 = new Worksheet($spreadsheet, 'Gesorteerd verlorenpunten');\n\n        $wsPartijen->getTabColor()->setRGB('FF0000');\n        $wsPunten->getTabColor()->setRGB('00FF00');\n        $wsSpelers->getTabColor()->setRGB('0000FF');\n        $wsSort1->getTabColor()->setRGB('FFFF00');\n        $wsSort2->getTabColor()->setRGB('00FFFF');\n\n        foreach ([$wsPunten, $wsSpelers, $wsSort1, $wsSort2] as $ws) {\n            $spreadsheet->addSheet($ws);\n        }\n\n        $this->doPunten($spreadsheet, $wsPunten);\n        $maxLijn = $this->doPartijen($wsPartijen);\n        $this->doSpelers($wsSpelers, $maxLijn);\n        $this->doSort1($wsSort1);\n        $this->doSort2($wsSort2);\n\n        self::assertSame('Dirk', $wsPartijen->getCell('I3')->getCalculatedValue());\n        self::assertSame('Rudy', $wsPartijen->getCell('K4')->getCalculatedValue());\n        $calcArray = $wsSort2->getCell('A2')->getCalculatedValue();\n        self::assertCount(8, $calcArray);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ArrayFunctionsInlineTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ArrayFunctionsInlineTest extends AbstractFunctional\n{\n    public function testInlineArrays(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('=UNIQUE({1;1;2;1;3;2;4;4;4})');\n        $sheet->getCell('D1')->setValue('=UNIQUE({1,1,2,1,3,2,4,4,4},true)');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        Calculation::getInstance($reloadedSpreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $expected = [\n            ['=UNIQUE({1;1;2;1;3;2;4;4;4})', null, null, '=UNIQUE({1,1,2,1,3,2,4,4,4},true)', 2, 3, 4],\n            [2, null, null, null, null, null, null],\n            [3, null, null, null, null, null, null],\n            [4, null, null, null, null, null, null],\n        ];\n        self::assertSame($expected, $rsheet->toArray(null, false, false));\n        self::assertSame('1', $rsheet->getCell('A1')->getCalculatedValueString());\n        self::assertSame('1', $rsheet->getCell('D1')->getCalculatedValueString());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ArrayFunctionsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayFunctionsTest extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    public function testArrayOutput(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $columnArray = [\n            [41],\n            [57],\n            [51],\n            [54],\n            [49],\n            [43],\n            [35],\n            [35],\n            [44],\n            [47],\n            [48],\n            [26],\n            [57],\n            [34],\n            [61],\n            [34],\n            [28],\n            [29],\n            [41],\n        ];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('C1', '=UNIQUE(A1:A19)');\n        $sheet->setCellValue('D1', '=SORT(A1:A19)');\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        Calculation::getInstance($spreadsheet2)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $expectedUnique = [\n            [41],\n            [57],\n            [51],\n            [54],\n            [49],\n            [43],\n            [35],\n            [44],\n            [47],\n            [48],\n            [26],\n            [34],\n            [61],\n            [28],\n            [29],\n        ];\n        self::assertSame($expectedUnique, $sheet2->getCell('C1')->getCalculatedValue());\n        for ($row = 2; $row <= 15; ++$row) {\n            self::assertSame($expectedUnique[$row - 1][0], $sheet2->getCell(\"C$row\")->getCalculatedValue(), \"cell C$row\");\n        }\n        $expectedSort = [\n            [26],\n            [28],\n            [29],\n            [34],\n            [34],\n            [35],\n            [35],\n            [41],\n            [41],\n            [43],\n            [44],\n            [47],\n            [48],\n            [49],\n            [51],\n            [54],\n            [57],\n            [57],\n            [61],\n        ];\n        self::assertSame($expectedSort, $sheet2->getCell('D1')->getCalculatedValue());\n        $spreadsheet2->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c r=\"C1\" cm=\"1\"><f t=\"array\" ref=\"C1:C15\" aca=\"1\" ca=\"1\">_xlfn.UNIQUE(A1:A19)</f><v>41</v></c>', $data, '15 results for UNIQUE');\n            self::assertStringContainsString('<c r=\"D1\" cm=\"1\"><f t=\"array\" ref=\"D1:D19\" aca=\"1\" ca=\"1\">_xlfn._xlws.SORT(A1:A19)</f><v>26</v></c>', $data, '19 results for SORT');\n        }\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/metadata.xml';\n        $data = @file_get_contents($file);\n        self::assertNotFalse($data, 'metadata.xml should exist');\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#[Content_Types].xml';\n        $data = file_get_contents($file);\n        self::assertStringContainsString('metadata', $data);\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/_rels/workbook.xml.rels';\n        $data = file_get_contents($file);\n        self::assertStringContainsString('metadata', $data);\n    }\n\n    public function testArrayOutputCSE(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $columnArray = [\n            [41],\n            [57],\n            [51],\n            [54],\n            [49],\n            [43],\n            [35],\n            [35],\n            [44],\n            [47],\n            [48],\n            [26],\n            [57],\n            [34],\n            [61],\n            [34],\n            [28],\n            [29],\n            [41],\n        ];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('C1', '=UNIQUE(A1:A19)');\n        $sheet->setCellValue('D1', '=SORT(A1:A19)');\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->setUseCSEArrays(true);\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        Calculation::getInstance($spreadsheet2)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $expectedUnique = [\n            [41],\n            [57],\n            [51],\n            [54],\n            [49],\n            [43],\n            [35],\n            [44],\n            [47],\n            [48],\n            [26],\n            [34],\n            [61],\n            [28],\n            [29],\n        ];\n        self::assertSame($expectedUnique, $sheet2->getCell('C1')->getCalculatedValue());\n        for ($row = 2; $row <= 15; ++$row) {\n            self::assertSame($expectedUnique[$row - 1][0], $sheet2->getCell(\"C$row\")->getCalculatedValue(), \"cell C$row\");\n        }\n        $expectedSort = [\n            [26],\n            [28],\n            [29],\n            [34],\n            [34],\n            [35],\n            [35],\n            [41],\n            [41],\n            [43],\n            [44],\n            [47],\n            [48],\n            [49],\n            [51],\n            [54],\n            [57],\n            [57],\n            [61],\n        ];\n        self::assertSame($expectedSort, $sheet2->getCell('D1')->getCalculatedValue());\n        $spreadsheet2->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c r=\"C1\"><f t=\"array\" ref=\"C1:C15\" aca=\"1\" ca=\"1\">_xlfn.UNIQUE(A1:A19)</f><v>41</v></c>', $data, '15 results for UNIQUE');\n            self::assertStringContainsString('<c r=\"D1\"><f t=\"array\" ref=\"D1:D19\" aca=\"1\" ca=\"1\">_xlfn._xlws.SORT(A1:A19)</f><v>26</v></c>', $data, '19 results for SORT');\n        }\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/metadata.xml';\n        $data = @file_get_contents($file);\n        self::assertFalse($data, 'metadata.xml should not exist');\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#[Content_Types].xml';\n        $data = file_get_contents($file);\n        self::assertStringNotContainsString('metadata', $data);\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/_rels/workbook.xml.rels';\n        $data = file_get_contents($file);\n        self::assertStringNotContainsString('metadata', $data);\n    }\n\n    public function testUnimplementedArrayOutput(): void\n    {\n        //Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY); // not required for this test\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load('tests/data/Reader/XLSX/atsign.choosecols.xlsx');\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertSame('=CHOOSECOLS(A1:C5,3,1)', $sheet2->getCell('F1')->getValue());\n        $expectedFG = [\n            ['11', '1'],\n            ['12', '2'],\n            ['13', '3'],\n            ['14', '4'],\n            ['15', '5'],\n        ];\n        $actualFG = $sheet2->rangeToArray('F1:G5');\n        self::assertSame($expectedFG, $actualFG);\n        self::assertSame('=CELL(\"width\")', $sheet2->getCell('I1')->getValue());\n        self::assertSame(8, $sheet2->getCell('I1')->getCalculatedValue());\n        self::assertTrue($sheet2->getCell('J1')->getValue());\n        $spreadsheet2->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<f t=\"array\" ref=\"F1:G5\" aca=\"1\" ca=\"1\">_xlfn.CHOOSECOLS(A1:C5,3,1)</f><v>11</v>', $data);\n            self::assertStringContainsString('<f t=\"array\" ref=\"I1:J1\" aca=\"1\" ca=\"1\">CELL(&quot;width&quot;)</f><v>8</v></c><c r=\"J1\" t=\"b\"><v>1</v></c>', $data);\n        }\n    }\n\n    public function testArrayMultipleColumns(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $columnArray = [\n            [100, 91],\n            [85, 1],\n            [100, 92],\n            [734, 12],\n            [100, 91],\n            [5, 2],\n        ];\n        $sheet->fromArray($columnArray);\n        $sheet->setCellValue('H1', '=UNIQUE(A1:B6)');\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        Calculation::getInstance($spreadsheet2)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $expectedUnique = [\n            [100, 91],\n            [85, 1],\n            [100, 92],\n            [734, 12],\n            //[100, 91], // not unique\n            [5, 2],\n        ];\n        self::assertSame($expectedUnique, $sheet2->getCell('H1')->getCalculatedValue());\n        for ($row = 1; $row <= 5; ++$row) {\n            if ($row > 1) {\n                self::assertSame($expectedUnique[$row - 1][0], $sheet2->getCell(\"H$row\")->getValue(), \"cell H$row\");\n            } else {\n                self::assertTrue($sheet2->getCell(\"H$row\")->isFormula());\n                self::assertSame($expectedUnique[$row - 1][0], $sheet2->getCell(\"H$row\")->getOldCalculatedValue(), \"cell H$row\");\n            }\n            self::assertSame($expectedUnique[$row - 1][1], $sheet2->getCell(\"I$row\")->getValue(), \"cell I$row\");\n        }\n        $cellFormulaAttributes = $sheet2->getCell('H1')->getFormulaAttributes();\n        self::assertArrayHasKey('t', $cellFormulaAttributes);\n        self::assertSame('array', $cellFormulaAttributes['t']);\n        self::assertArrayHasKey('ref', $cellFormulaAttributes);\n        self::assertSame('H1:I5', $cellFormulaAttributes['ref']);\n        $spreadsheet2->disconnectWorksheets();\n    }\n\n    public function testMetadataWritten(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $writer = new XlsxWriter($spreadsheet);\n        $writerMetadata = new XlsxWriter\\Metadata($writer);\n        self::assertNotEquals('', $writerMetadata->writeMetaData());\n        $writer->setUseCSEArrays(true);\n        $writerMetadata2 = new XlsxWriter\\Metadata($writer);\n        self::assertSame('', $writerMetadata2->writeMetaData());\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testSpill(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A3')->setValue('x');\n        $sheet->getCell('A1')->setValue('=UNIQUE({1;2;3})');\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        Calculation::getInstance($spreadsheet2)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertSame('#SPILL!', $sheet2->getCell('A1')->getOldCalculatedValue());\n        self::assertSame('=UNIQUE({1;2;3})', $sheet2->getCell('A1')->getValue());\n        self::assertNull($sheet2->getCell('A2')->getValue());\n        self::assertSame('x', $sheet2->getCell('A3')->getValue());\n        $spreadsheet2->disconnectWorksheets();\n    }\n\n    public function testArrayStringOutput(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        Calculation::getInstance($spreadsheet)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet = $spreadsheet->getActiveSheet();\n        $columnArray = [\n            ['item1'],\n            ['item2'],\n            ['item3'],\n            ['item1'],\n            ['item1'],\n            ['item6'],\n            ['item7'],\n            ['item1'],\n            ['item9'],\n            ['item1'],\n        ];\n        $sheet->fromArray($columnArray, 'A1');\n        $sheet->setCellValue('C1', '=UNIQUE(A1:A10)');\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        Calculation::getInstance($spreadsheet2)->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $expectedUnique = [\n            ['item1'],\n            ['item2'],\n            ['item3'],\n            ['item6'],\n            ['item7'],\n            ['item9'],\n        ];\n        self::assertSame($expectedUnique, $sheet2->getCell('C1')->getCalculatedValue());\n        self::assertSame($expectedUnique[0][0], $sheet2->getCell('C1')->getCalculatedValueString());\n        for ($row = 2; $row <= 6; ++$row) {\n            self::assertSame($expectedUnique[$row - 1][0], $sheet2->getCell(\"C$row\")->getCalculatedValue(), \"cell C$row\");\n        }\n        $spreadsheet2->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c r=\"C1\" cm=\"1\" t=\"str\"><f t=\"array\" ref=\"C1:C6\" aca=\"1\" ca=\"1\">_xlfn.UNIQUE(A1:A10)</f><v>item1</v></c>', $data, '6 results for UNIQUE');\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/AutoColorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass AutoColorTest extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    public function testAutoColor(): void\n    {\n        // It's not clear to me what AutoColor does in Excel.\n        // However, LibreOffice Dark Mode\n        // can make use of a spreadsheet which uses it.\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getDefaultStyle()->getFont()\n            ->setAutoColor(true);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'Hello World!');\n        $sheet->setCellValue('A2', 'Hello World!');\n        $sheet->getStyle('A2')->getFont()\n            ->setBold(true);\n        $sheet->setCellValue('A3', 'Hello World!');\n        $sheet->getStyle('A3')->getFont()\n            ->setItalic(true);\n        $sheet->setCellValue('B1', 'Hello World!');\n\n        $writer = new XlsxWriter($spreadsheet);\n        $outputFile = $this->outputFile = File::temporaryFilename();\n        $writer->save($outputFile);\n        $spreadsheet->disconnectWorksheets();\n        $zipfile = \"zip://$outputFile#xl/styles.xml\";\n        $contents = file_get_contents($zipfile);\n        if ($contents === false) {\n            self::fail('Unable to open file');\n        } else {\n            self::assertStringContainsString('<fonts count=\"3\">', $contents);\n            self::assertStringContainsString('<font><b val=\"0\"/><i val=\"0\"/><strike val=\"0\"/><u val=\"none\"/><sz val=\"11\"/><auto val=\"1\"/><name val=\"Calibri\"/></font>', $contents);\n            self::assertStringContainsString('<font><b val=\"1\"/><i val=\"0\"/><strike val=\"0\"/><u val=\"none\"/><sz val=\"11\"/><auto val=\"1\"/><name val=\"Calibri\"/></font>', $contents);\n            self::assertStringContainsString('<font><b val=\"0\"/><i val=\"1\"/><strike val=\"0\"/><u val=\"none\"/><sz val=\"11\"/><auto val=\"1\"/><name val=\"Calibri\"/></font>', $contents);\n        }\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($outputFile);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertTrue(\n            $sheet2->getStyle('A1')\n                ->getFont()\n                ->getAutoColor()\n        );\n        $spreadsheet2->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/BackgroundImageTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass BackgroundImageTest extends AbstractFunctional\n{\n    public function testBackgroundImage(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('B1')->setValue(2);\n        $sheet->getCell('A2')->setValue(3);\n        $sheet->getCell('B2')->setValue(4);\n        $imageFile = 'tests/data/Writer/XLSX/backgroundtest.png';\n        $image = (string) file_get_contents($imageFile);\n        $sheet->setBackgroundImage($image);\n        self::assertSame('image/png', $sheet->getBackgroundMime());\n        self::assertSame('png', $sheet->getBackgroundExtension());\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame($image, $reloadedWorksheet->getBackgroundImage());\n        self::assertSame('image/png', $reloadedWorksheet->getBackgroundMime());\n        self::assertSame('png', $reloadedWorksheet->getBackgroundExtension());\n        self::assertSame(2, $reloadedWorksheet->getCell('B1')->getValue());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testInvalidImage(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $imageFile = __FILE__;\n        $image = (string) file_get_contents($imageFile);\n        self::assertNotSame('', $image);\n        $sheet->setBackgroundImage($image);\n        self::assertSame('', $sheet->getBackgroundImage());\n        self::assertSame('', $sheet->getBackgroundMime());\n        self::assertSame('', $sheet->getBackgroundExtension());\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/BadParamExceptionTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\XMLWriter;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Exception as WriterException;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\nuse ReflectionMethod;\n\nclass BadParamExceptionTest extends TestCase\n{\n    public function testBadAddToXmlWorkbook(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Invalid parameters passed.');\n        $objWriter = new XMLWriter();\n        $spreadsheet = new Spreadsheet();\n        $writerXlsx = new XlsxWriter($spreadsheet);\n        $writerXlsxWorkbook = new XlsxWriter\\Workbook($writerXlsx);\n        $reflectionMethod = new ReflectionMethod($writerXlsxWorkbook, 'writeSheet');\n        $reflectionMethod->invokeArgs($writerXlsxWorkbook, [$objWriter, '']);\n    }\n\n    public function testBadAddToXmlRels(): void\n    {\n        $this->expectException(WriterException::class);\n        $this->expectExceptionMessage('Invalid parameters passed.');\n        $objWriter = new XMLWriter();\n        $spreadsheet = new Spreadsheet();\n        $writerXlsx = new XlsxWriter($spreadsheet);\n        $writerXlsxRels = new XlsxWriter\\Rels($writerXlsx);\n        $reflectionMethod = new ReflectionMethod($writerXlsxRels, 'writeRelationship');\n        $reflectionMethod->invokeArgs($writerXlsxRels, [$objWriter, '', '', '']);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/CalculationErrorTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Calculation;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Exception as CalcException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass CalculationErrorTest extends AbstractFunctional\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Spreadsheet $reloadedSpreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->reloadedSpreadsheet !== null) {\n            $this->reloadedSpreadsheet->disconnectWorksheets();\n            $this->reloadedSpreadsheet = null;\n        }\n    }\n\n    public function testCalculationExceptionSuppressed(): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        self::assertFalse($calculation->getSuppressFormulaErrors());\n        $calculation->setSuppressFormulaErrors(true);\n        $sheet->getCell('A1')->setValue('=SUM(');\n        $sheet->getCell('A2')->setValue('=2+3');\n        $spreadsheet2 = $this->reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $rcalculation = Calculation::getInstance($this->reloadedSpreadsheet);\n        self::assertFalse($rcalculation->getSuppressFormulaErrors());\n        $rcalculation->setSuppressFormulaErrors(true);\n        $rsheet = $spreadsheet2->getActiveSheet();\n        self::assertSame('=SUM(', $rsheet->getCell('A1')->getValue());\n        self::assertFalse($rsheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('=2+3', $rsheet->getCell('A2')->getValue());\n        self::assertSame(5, $rsheet->getCell('A2')->getCalculatedValue());\n        $calculation->setSuppressFormulaErrors(false);\n        $rcalculation->setSuppressFormulaErrors(false);\n    }\n\n    public function testCalculationException(): void\n    {\n        $this->expectException(CalcException::class);\n        $this->expectExceptionMessage(\"Formula Error: Expecting ')'\");\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $calculation = Calculation::getInstance($spreadsheet);\n        self::assertFalse($calculation->getSuppressFormulaErrors());\n        $sheet->getCell('A1')->setValue('=SUM(');\n        $sheet->getCell('A2')->setValue('=2+3');\n        $this->reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Calendar1904Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Calendar1904Test extends AbstractFunctional\n{\n    public function testCalendar1904(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->setExcelCalendar(Date::CALENDAR_MAC_1904);\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getCell('A1')->setValue('=DATE(1904,1,1)');\n        $worksheet->getStyle('A1')->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame(0.0, $rsheet->getCell('A1')->getCalculatedValue());\n        self::assertSame('1904-01-01', $rsheet->getCell('A1')->getFormattedValue());\n        self::assertSame(Date::CALENDAR_MAC_1904, $reloadedSpreadsheet->getExcelCalendar());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/CheckBoxStyleTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass CheckBoxStyleTest extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    public function testCheckBoxStyle(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', true);\n        $sheet->setCellValue('A2', false);\n        $sheet->setCellValue('A3', false); // no checkbox\n        $sheet->getStyle('A1')->setCheckBox(true);\n        $sheet->getStyle('A2')->setCheckBox(true);\n\n        $this->outputFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $reloadedSpreadsheet = $reader->load($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertTrue($rsheet->getStyle('A1')->getCheckBox());\n        self::assertTrue($rsheet->getStyle('A2')->getCheckBox());\n        self::assertFalse($rsheet->getStyle('A3')->getCheckBox());\n        $reloadedSpreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#[Content_Types].xml';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n        self::assertStringContainsString(\n            'featurePropertyBag',\n            $data\n        );\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/_rels/workbook.xml.rels';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n        self::assertStringContainsString(\n            'featurePropertyBag',\n            $data\n        );\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/featurePropertyBag/featurePropertyBag.xml';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n        self::assertStringContainsString(\n            'Checkbox',\n            $data\n        );\n    }\n\n    public function testCheckBoxStyleDiskCache(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', true);\n        $sheet->setCellValue('A2', false);\n        $sheet->setCellValue('A3', false); // no checkbox\n        $sheet->getStyle('A1')->setCheckBox(true);\n        $sheet->getStyle('A2')->setCheckBox(true);\n\n        $this->outputFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $reloadedSpreadsheet = $reader->load($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertTrue($rsheet->getStyle('A1')->getCheckBox());\n        self::assertTrue($rsheet->getStyle('A2')->getCheckBox());\n        self::assertFalse($rsheet->getStyle('A3')->getCheckBox());\n        $reloadedSpreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#[Content_Types].xml';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n        self::assertStringContainsString(\n            'featurePropertyBag',\n            $data\n        );\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/_rels/workbook.xml.rels';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n        self::assertStringContainsString(\n            'featurePropertyBag',\n            $data\n        );\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/featurePropertyBag/featurePropertyBag.xml';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n        self::assertStringContainsString(\n            'Checkbox',\n            $data\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/CommentAlignmentTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass CommentAlignmentTest extends AbstractFunctional\n{\n    public function testIssue4004(): void\n    {\n        $type = 'Xlsx';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A3')->setValue('A3');\n        $sheet->getCell('A4')->setValue('A4');\n        $sheet->getComment('A3')->getText()->createText('Comment');\n        $sheet->getComment('A4')->getText()->createText('שלום');\n        $sheet->getComment('A4')->setAlignment(Alignment::HORIZONTAL_RIGHT);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertCount(1, $reloadedSpreadsheet->getAllSheets());\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $comment1 = $rsheet->getComment('A3');\n        self::assertSame('Comment', $comment1->getText()->getPlainText());\n        self::assertSame('general', $comment1->getAlignment());\n        $comment2 = $rsheet->getComment('A4');\n        self::assertSame('שלום', $comment2->getText()->getPlainText());\n        self::assertSame('right', $comment2->getAlignment());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testIssue4004td(): void\n    {\n        $type = 'Xlsx';\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setRightToLeft(true);\n        $sheet->getCell('A1')->setValue('ברקוד');\n        $comment = $sheet->getComment('A1');\n        $comment->setTextboxDirection(Comment::TEXTBOX_DIRECTION_RTL);\n        $comment->setAlignment(Alignment::HORIZONTAL_RIGHT);\n        $text = <<<EOF\n            Report : ProductsExcel\n            סטטוס הגדרות בזמן הרצת הדו\"ח\n\n            2024-06-04 21:07:04\n            תאריך התחלה : \n            תאריך סיום : \n            berber@berber.co.il\n\n            הצגת ברקוד מקוצר = 0\n            הצגת חנויות אינטרנט בתוצאות = 1\n\n            הצגת מחיר ליחידת מידה = 0\n            הצגת כל רשומות המחיר לתאריך = 0\n            רשומות עם מחיר בכל הרשתות = 0\n            % נפיצות מינימלית = 0\n            נפיצות מינימלית= 0\n            % נפיצות מקסימלית = 0\n            נפיצות מקסימלית= 0\n            פער אחוזי = 0\n\n            התעלמות מכלל המבצעים = 0\n            התעלמות ממבצעי אשראי = 0\n            התעלמות ממבצעי מועדון = 0\n            התעלמות ממבצעים המותנים בסכום מעל 100 ₪. = 0\n            התעלמות ממבצעים המותנים בקניה של 3 מוצרים ומעלה. = 0\n\n            ניתוח מבצעים\n            ============\n            הצגת כל המבצעים = 0\n            מבצעי מועדון = 0\n            מבצעי אשראי = 0\n            מבצעי ארנק = 0\n            מחיר מוזל = 0\n            X יחידות ב-Y ₪ = 0\n            השני ב = 0\n            X+Y מתנה = 0\n            אחוז הנחה הפעלה = 0\n            אחוז הנחה מספר = 0\n            מוצרים חסרים - הגבלת חודשים - כמות= 0\n            EOF;\n        $comment->getText()->createTextRun($text);\n        $comment->setWidth('300pt');\n        $comment->setHeight('550pt');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertCount(1, $reloadedSpreadsheet->getAllSheets());\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $comment1 = $rsheet->getComment('A1');\n        self::assertSame($text, $comment1->getText()->getPlainText());\n        $comment->setTextboxDirection(Comment::TEXTBOX_DIRECTION_RTL);\n        self::assertSame('right', $comment1->getAlignment());\n        self::assertSame('rtl', $comment1->getTextboxDirection());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalFillTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ConditionalFillTest extends TestCase\n{\n    public function testFill(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(10);\n        $sheet->getCell('A2')->setValue(20);\n        $sheet->getCell('A3')->setValue(30);\n        $sheet->getCell('A4')->setValue(40);\n\n        $sheet->getStyle('A1')->getFill()->setFillType(Fill::FILL_SOLID);\n        $sheet->getStyle('A1')->getFill()->getStartColor()->setARGB('FFFF0000');\n        $sheet->getStyle('A2')->getFill()->setFillType(Fill::FILL_SOLID);\n        // Need to specify StartColor for desired effect\n        $sheet->getStyle('A2')->getFill()->getEndColor()->setARGB('FF00FF00');\n\n        $conditional1 = new Conditional();\n        $conditional1->setConditionType(Conditional::CONDITION_CELLIS);\n        $conditional1->setOperatorType(Conditional::OPERATOR_GREATERTHAN);\n        $conditional1->addCondition(35);\n        $conditional1->getStyle()->getFill()->setFillType(Fill::FILL_SOLID);\n        $conditional1->getStyle()->getFill()->getEndColor()->setARGB('FF0000FF');\n\n        $conditional2 = new Conditional();\n        $conditional2->setConditionType(Conditional::CONDITION_CELLIS);\n        $conditional2->setOperatorType(Conditional::OPERATOR_LESSTHAN);\n        $conditional2->addCondition(35);\n        $conditional2->getStyle()->getFill()->setFillType(Fill::FILL_SOLID);\n        // Before issue37303202, had needed to specify EndColor for desired effect.\n        // This was the opposite of non-Conditional style.\n        $conditional2->getStyle()->getFill()->getStartColor()->setARGB('FFFFFF00');\n\n        $conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('A3:A4')->getConditionalStyles();\n        $conditionalStyles[] = $conditional1;\n        $conditionalStyles[] = $conditional2;\n\n        $spreadsheet->getActiveSheet()->getStyle('A3:A4')->setConditionalStyles($conditionalStyles);\n        $sheet->setSelectedCells('C1');\n\n        $outfile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $writer->save($outfile);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $outfile;\n        $file .= '#xl/styles.xml';\n        $data = file_get_contents($file);\n        unlink($outfile);\n\n        $expected = '<fill>'\n            . '<patternFill patternType=\"solid\">'\n            . '<fgColor rgb=\"FFFF0000\"/>'\n            . '<bgColor rgb=\"FF000000\"/>'\n            . '</patternFill>'\n            . '</fill>';\n        self::assertStringContainsString($expected, $data, 'style for A1');\n        $expected = '<fill>'\n            . '<patternFill patternType=\"solid\">'\n            . '<fgColor rgb=\"FFFFFFFF\"/>'\n            . '<bgColor rgb=\"FF00FF00\"/>'\n            . '</patternFill>'\n            . '</fill>';\n        self::assertStringContainsString($expected, $data, 'style for A2');\n        $expected = '<dxf><fill>'\n            . '<patternFill patternType=\"solid\">'\n            . '<bgColor rgb=\"FF0000FF\"/>'\n            . '</patternFill>'\n            . '</fill>';\n        self::assertStringContainsString($expected, $data, 'conditional 1');\n        $expected = '<dxf><fill>'\n            . '<patternFill patternType=\"solid\">'\n            . '<bgColor rgb=\"FFFFFF00\"/>'\n            . '</patternFill>'\n            . '</fill>';\n        self::assertStringContainsString($expected, $data, 'conditional 2');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalFormatIconSetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse Generator;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalFormatValueObject;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\ConditionalIconSet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\IconSetValues;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass ConditionalFormatIconSetTest extends AbstractFunctional\n{\n    private const COORDINATE = 'A1:A3';\n\n    #[DataProvider('iconSetsProvider')]\n    public function testWriteIconSets(\n        string $expected,\n        ?IconSetValues $type,\n        ?bool $reverse = null,\n        ?bool $showValue = null,\n        ?bool $custom = null,\n    ): void {\n        $condition = new Conditional();\n        $condition->setConditionType(Conditional::CONDITION_ICONSET);\n        $iconSet = $condition->setIconSet(new ConditionalIconSet())\n            ->getIconSet();\n        self::assertNotNull($iconSet);\n        if ($type !== null) {\n            $iconSet->setIconSetType($type);\n        }\n        $iconSet->setCfvos([\n            new ConditionalFormatValueObject('percent', 0),\n            new ConditionalFormatValueObject('percent', 33),\n            new ConditionalFormatValueObject('percent', 67),\n        ]);\n        if ($reverse !== null) {\n            $iconSet->setReverse($reverse);\n        }\n        if ($showValue !== null) {\n            $iconSet->setShowValue($showValue);\n        }\n        if ($custom !== null) {\n            $iconSet->setCustom($custom);\n        }\n\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->setConditionalStyles(self::COORDINATE, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = preg_replace(['/^\\s+/m', \"/\\n/\"], '', $expected);\n        self::assertIsString($expected);\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public static function iconSetsProvider(): Generator\n    {\n        $coordinate = self::COORDINATE;\n        $cfvos = <<<XML\n            <cfvo type=\"percent\" val=\"0\"/>\n            <cfvo type=\"percent\" val=\"33\"/>\n            <cfvo type=\"percent\" val=\"67\"/>\n            XML;\n        foreach (IconSetValues::cases() as $type) {\n            yield $type->name => [\n                <<<XML\n                    <conditionalFormatting sqref=\"{$coordinate}\">\n                        <cfRule type=\"iconSet\" priority=\"1\">\n                            <iconSet iconSet=\"{$type->value}\">\n                                {$cfvos}\n                            </iconSet>\n                        </cfRule>\n                    </conditionalFormatting>\n                    XML,\n                $type,\n            ];\n        }\n\n        yield 'null' => [\n            <<<XML\n                <conditionalFormatting sqref=\"{$coordinate}\">\n                    <cfRule type=\"iconSet\" priority=\"1\">\n                        <iconSet>\n                            {$cfvos}\n                        </iconSet>\n                    </cfRule>\n                </conditionalFormatting>\n                XML,\n            null,\n        ];\n\n        foreach ([1, 0] as $reverse) {\n            yield \"null/reverse=$reverse\" => [\n                <<<XML\n                    <conditionalFormatting sqref=\"{$coordinate}\">\n                        <cfRule type=\"iconSet\" priority=\"1\">\n                            <iconSet reverse=\"$reverse\">\n                                {$cfvos}\n                            </iconSet>\n                        </cfRule>\n                    </conditionalFormatting>\n                    XML,\n                null,\n                $reverse === 1,\n            ];\n        }\n\n        foreach ([1, 0] as $showValue) {\n            yield \"null/showValue=$showValue\" => [\n                <<<XML\n                    <conditionalFormatting sqref=\"{$coordinate}\">\n                        <cfRule type=\"iconSet\" priority=\"1\">\n                            <iconSet showValue=\"$showValue\">\n                                {$cfvos}\n                            </iconSet>\n                        </cfRule>\n                    </conditionalFormatting>\n                    XML,\n                null,\n                null,\n                $showValue === 1,\n            ];\n        }\n\n        foreach ([1, 0] as $custom) {\n            yield \"null/custom=$custom\" => [\n                <<<XML\n                    <conditionalFormatting sqref=\"{$coordinate}\">\n                        <cfRule type=\"iconSet\" priority=\"1\">\n                            <iconSet custom=\"$custom\">\n                                {$cfvos}\n                            </iconSet>\n                        </cfRule>\n                    </conditionalFormatting>\n                    XML,\n                null,\n                null,\n                null,\n                $custom === 1,\n            ];\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ConditionalTest extends AbstractFunctional\n{\n    protected string $cellRange;\n\n    protected Style $style;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n        $this->cellRange = 'C3:E5';\n        $this->style = new Style();\n        $this->style->applyFromArray([\n            'fill' => [\n                'color' => ['argb' => 'FFFFC000'],\n                'fillType' => Fill::FILL_SOLID,\n            ],\n        ]);\n    }\n\n    public function testWriteSimpleCellConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\CellValue($this->cellRange);\n        $wizard->greaterThan(5);\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"cellIs\" dxfId=\"\" priority=\"1\" operator=\"greaterThan\"><formula>5</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public function testWriteBetweenCellConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\CellValue($this->cellRange);\n        $wizard->between(-5)->and(5);\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"cellIs\" dxfId=\"\" priority=\"1\" operator=\"between\"><formula>-5</formula><formula>5</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public function testWriteTextConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\TextValue($this->cellRange);\n        $wizard->contains('PHP');\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"containsText\" dxfId=\"\" priority=\"1\" operator=\"containsText\" text=\"PHP\"><formula>NOT(ISERROR(SEARCH(&quot;PHP&quot;,C3)))</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('textConditionalsProvider')]\n    public function testWriteTextConditionals(string $conditionType, string $operatorType, string $expected): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $condition = new Conditional();\n        $condition->setConditionType($conditionType);\n        $condition->setOperatorType($operatorType);\n        $condition->setText('PHP');\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public static function textConditionalsProvider(): array\n    {\n        return [\n            'Contains' => [\n                Conditional::CONDITION_CONTAINSTEXT,\n                Conditional::OPERATOR_CONTAINSTEXT,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"containsText\" dxfId=\"\" priority=\"1\" operator=\"containsText\" text=\"PHP\"><formula>NOT(ISERROR(SEARCH(&quot;PHP&quot;,C3)))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Not Contains' => [\n                Conditional::CONDITION_NOTCONTAINSTEXT,\n                Conditional::OPERATOR_NOTCONTAINS,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"notContainsText\" dxfId=\"\" priority=\"1\" operator=\"notContains\" text=\"PHP\"><formula>ISERROR(SEARCH(&quot;PHP&quot;,C3))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Begins With' => [\n                Conditional::CONDITION_BEGINSWITH,\n                Conditional::OPERATOR_BEGINSWITH,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"beginsWith\" dxfId=\"\" priority=\"1\" operator=\"beginsWith\" text=\"PHP\"><formula>LEFT(C3,LEN(&quot;PHP&quot;))=&quot;PHP&quot;</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Ends With' => [\n                Conditional::CONDITION_ENDSWITH,\n                Conditional::OPERATOR_ENDSWITH,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"endsWith\" dxfId=\"\" priority=\"1\" operator=\"endsWith\" text=\"PHP\"><formula>RIGHT(C3,LEN(&quot;PHP&quot;))=&quot;PHP&quot;</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n        ];\n    }\n\n    public function testWriteDateConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\DateValue($this->cellRange);\n        $wizard->today();\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"today\"><formula>FLOOR(C3,1)=TODAY()</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('dateConditionalsProvider')]\n    public function testWriteDateConditionals(string $timePeriod, string $expected): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $condition = new Conditional();\n        $condition->setConditionType(Conditional::CONDITION_TIMEPERIOD);\n        $condition->setOperatorType($timePeriod);\n        $condition->setText($timePeriod);\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public static function dateConditionalsProvider(): array\n    {\n        return [\n            'Yesterday' => [\n                Conditional::TIMEPERIOD_YESTERDAY,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"yesterday\"><formula>FLOOR(C3)=TODAY()-1</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Today' => [\n                Conditional::TIMEPERIOD_TODAY,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"today\"><formula>FLOOR(C3)=TODAY()</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Tomorrow' => [\n                Conditional::TIMEPERIOD_TOMORROW,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"tomorrow\"><formula>FLOOR(C3)=TODAY()+1</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Last 7 Days' => [\n                Conditional::TIMEPERIOD_LAST_7_DAYS,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"last7Days\"><formula>AND(TODAY()-FLOOR(C3,1)&lt;=6,FLOOR(C3,1)&lt;=TODAY())</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Last Week' => [\n                Conditional::TIMEPERIOD_LAST_WEEK,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"lastWeek\"><formula>AND(TODAY()-ROUNDDOWN(C3,0)&gt;=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(C3,0)&lt;(WEEKDAY(TODAY())+7))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'This Week' => [\n                Conditional::TIMEPERIOD_THIS_WEEK,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"thisWeek\"><formula>AND(TODAY()-ROUNDDOWN(C3,0)&lt;=WEEKDAY(TODAY())-1,ROUNDDOWN(C3,0)-TODAY()&lt;=7-WEEKDAY(TODAY()))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Next Week' => [\n                Conditional::TIMEPERIOD_NEXT_WEEK,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"nextWeek\"><formula>AND(ROUNDDOWN(C3,0)-TODAY()&gt;(7-WEEKDAY(TODAY())),ROUNDDOWN(C3,0)-TODAY()&lt;(15-WEEKDAY(TODAY())))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Last Month' => [\n                Conditional::TIMEPERIOD_LAST_MONTH,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"lastMonth\"><formula>AND(MONTH(C3)=MONTH(EDATE(TODAY(),0-1)),YEAR(C3)=YEAR(EDATE(TODAY(),0-1)))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'This Month' => [\n                Conditional::TIMEPERIOD_THIS_MONTH,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"thisMonth\"><formula>AND(MONTH(C3)=MONTH(TODAY()),YEAR(C3)=YEAR(TODAY()))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Next Month' => [\n                Conditional::TIMEPERIOD_NEXT_MONTH,\n                <<<XML\n                    ><conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"timePeriod\" dxfId=\"\" priority=\"1\" timePeriod=\"nextMonth\"><formula>AND(MONTH(C3)=MONTH(EDATE(TODAY(),0+1)),YEAR(C3)=YEAR(EDATE(TODAY(),0+1)))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n        ];\n    }\n\n    public function testWriteBlankConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\Blanks($this->cellRange);\n        $wizard->isBlank();\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"containsBlanks\" dxfId=\"\" priority=\"1\"><formula>LEN(TRIM(C3))=0</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public function testWriteNonBlankConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\Blanks($this->cellRange);\n        $wizard->notBlank();\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"notContainsBlanks\" dxfId=\"\" priority=\"1\"><formula>LEN(TRIM(C3))&gt;0</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('blanksConditionalsProvider')]\n    public function testWriteBlanksConditionals(string $conditionalType, string $expected): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $condition = new Conditional();\n        $condition->setConditionType($conditionalType);\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public static function blanksConditionalsProvider(): array\n    {\n        return [\n            'Blanks' => [\n                Conditional::CONDITION_CONTAINSBLANKS,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"containsBlanks\" dxfId=\"\" priority=\"1\"><formula>LEN(TRIM(C3))=0</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Not Blanks' => [\n                Conditional::CONDITION_NOTCONTAINSBLANKS,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"notContainsBlanks\" dxfId=\"\" priority=\"1\"><formula>LEN(TRIM(C3))&gt;0</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n        ];\n    }\n\n    public function testWriteNonErrorConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\Errors($this->cellRange);\n        $wizard->notError();\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"notContainsErrors\" dxfId=\"\" priority=\"1\"><formula>NOT(ISERROR(C3))</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public function testWriteErrorConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\Errors($this->cellRange);\n        $wizard->isError();\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"containsErrors\" dxfId=\"\" priority=\"1\"><formula>ISERROR(C3)</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('errorsConditionalsProvider')]\n    public function testWriteErrorsConditionals(string $conditionalType, string $expected): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $condition = new Conditional();\n        $condition->setConditionType($conditionalType);\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public static function errorsConditionalsProvider(): array\n    {\n        return [\n            'Errors' => [\n                Conditional::CONDITION_CONTAINSERRORS,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"containsErrors\" dxfId=\"\" priority=\"1\"><formula>ISERROR(C3)</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Not Errors' => [\n                Conditional::CONDITION_NOTCONTAINSERRORS,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"notContainsErrors\" dxfId=\"\" priority=\"1\"><formula>NOT(ISERROR(C3))</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n        ];\n    }\n\n    public function testWriteUniqueConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\Duplicates($this->cellRange);\n        $wizard->unique();\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"uniqueValues\" dxfId=\"\" priority=\"1\"/></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public function testWriteDuplicateConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\Duplicates($this->cellRange);\n        $wizard->duplicates();\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"duplicateValues\" dxfId=\"\" priority=\"1\"/></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('duplicatesConditionalsProvider')]\n    public function testWriteDuplicatesConditionals(string $conditionalType, string $expected): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $condition = new Conditional();\n        $condition->setConditionType($conditionalType);\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public static function duplicatesConditionalsProvider(): array\n    {\n        return [\n            'Duplicates' => [\n                Conditional::CONDITION_DUPLICATES,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"duplicateValues\" dxfId=\"\" priority=\"1\"/></conditionalFormatting>\n                    XML\n            ],\n            'Unique' => [\n                Conditional::CONDITION_UNIQUE,\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"uniqueValues\" dxfId=\"\" priority=\"1\"/></conditionalFormatting>\n                    XML\n            ],\n        ];\n    }\n\n    public function testWriteExpressionConditionalFromWizard(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $wizard = new Wizard\\Expression($this->cellRange);\n        $wizard->expression('=ISODD(A1)');\n        $condition = $wizard->getConditional();\n        $condition->setStyle($this->style);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        $expected = <<<XML\n            <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"expression\" dxfId=\"\" priority=\"1\"><formula>ISODD(C3)</formula></cfRule></conditionalFormatting>\n            XML;\n        self::assertStringContainsString($expected, $data);\n    }\n\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('expressionsConditionalsProvider')]\n    public function testWriteExpressionConditionals(string $expression, string $expected): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $condition = new Conditional();\n        $condition->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition->setStyle($this->style);\n        $condition->setConditions([$expression]);\n        $worksheet->setConditionalStyles($this->cellRange, [$condition]);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($worksheet, []);\n\n        self::assertStringContainsString($expected, $data);\n    }\n\n    public static function expressionsConditionalsProvider(): array\n    {\n        return [\n            'Odd' => [\n                'ISODD(C3)',\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"expression\" dxfId=\"\" priority=\"1\"><formula>ISODD(C3)</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n            'Even' => [\n                'ISEVEN(C3)',\n                <<<XML\n                    <conditionalFormatting sqref=\"C3:E5\"><cfRule type=\"expression\" dxfId=\"\" priority=\"1\"><formula>ISEVEN(C3)</formula></cfRule></conditionalFormatting>\n                    XML\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/DataValidationTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DataValidationTest extends AbstractFunctional\n{\n    public function testWholeRow(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('C1:F1', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_LIST)\n            ->setShowDropDown(true)\n            ->setFormula1('\"Item A,Item B,Item C\"')\n            ->setErrorStyle(DataValidation::STYLE_STOP)\n            ->setShowErrorMessage(true)\n            ->setErrorTitle('Input Error')\n            ->setError('Value is not a member of allowed list');\n        $sheet->setDataValidation('1:1', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('H1', $dv);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        self::assertSame(['H1', 'C1:F1', '1:1'], array_keys($sheet0->getDataValidationCollection()));\n        $robj->disconnectWorksheets();\n    }\n\n    public function testWholeColumn(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('C1')->setValue(1);\n        $sheet->getCell('C2')->setValue(2);\n        $sheet->getCell('C3')->setValue(3);\n        $dv = $sheet->getDataValidation('A5:A7');\n        $dv->setType(DataValidation::TYPE_NONE);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_LIST)\n            ->setShowDropDown(true)\n            ->setFormula1('$C$1:$C$3')\n            ->setErrorStyle(DataValidation::STYLE_STOP)\n            ->setShowErrorMessage(true)\n            ->setErrorTitle('Input Error')\n            ->setError('Value is not a member of allowed list');\n        $sheet->setDataValidation('A:A', $dv);\n        $dv = new DataValidation();\n        $dv->setType(DataValidation::TYPE_NONE);\n        $sheet->setDataValidation('A9', $dv);\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->getActiveSheet();\n        self::assertSame(['A9', 'A5:A7', 'A:A'], array_keys($sheet0->getDataValidationCollection()));\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingInCellTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DrawingInCellTest extends AbstractFunctional\n{\n    public function testCreateFileWithPictureInCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $objDrawing = new Drawing();\n        $objDrawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        $worksheet->getCell('C2')->setValue($objDrawing);\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheet(0);\n        $drawings = $sheet->getInCellDrawingCollection();\n        self::assertCount(1, $drawings);\n\n        if ($drawings[0] === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertSame(IMAGETYPE_PNG, $drawings[0]->getType());\n            self::assertSame('C2', $drawings[0]->getCoordinates());\n            self::assertSame(0, $drawings[0]->getOffsetX());\n            self::assertSame(0, $drawings[0]->getOffsetY());\n            self::assertSame(100, $drawings[0]->getWidth());\n            self::assertSame(100, $drawings[0]->getHeight());\n            self::assertSame(100, $drawings[0]->getImageWidth());\n            self::assertSame(100, $drawings[0]->getImageHeight());\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testPictureInCell(): void\n    {\n        $file = 'tests/data/Reader/XLSX/drawing_in_cell.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($file);\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheet(0);\n        $drawings = $sheet->getInCellDrawingCollection();\n        self::assertCount(2, $drawings);\n\n        if ($drawings[0] === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertSame(IMAGETYPE_PNG, $drawings[0]->getType());\n            self::assertSame('B2', $drawings[0]->getCoordinates());\n            self::assertSame(0, $drawings[0]->getOffsetX());\n            self::assertSame(0, $drawings[0]->getOffsetY());\n            self::assertSame(296, $drawings[0]->getWidth());\n            self::assertSame(154, $drawings[0]->getHeight());\n            self::assertSame(296, $drawings[0]->getImageWidth());\n            self::assertSame(154, $drawings[0]->getImageHeight());\n        }\n\n        self::assertSame($drawings[0], $sheet->getCell('B2')->getValue());\n\n        $sheet = $reloadedSpreadsheet->getSheet(1);\n        $drawings = $sheet->getInCellDrawingCollection();\n        self::assertCount(1, $drawings);\n\n        if ($drawings[0] === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertSame(IMAGETYPE_PNG, $drawings[0]->getType());\n            self::assertSame('D7', $drawings[0]->getCoordinates());\n            self::assertSame(0, $drawings[0]->getOffsetX());\n            self::assertSame(0, $drawings[0]->getOffsetY());\n            self::assertSame(413, $drawings[0]->getWidth());\n            self::assertSame(218, $drawings[0]->getHeight());\n            self::assertSame(413, $drawings[0]->getImageWidth());\n            self::assertSame(218, $drawings[0]->getImageHeight());\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testWriteNewPictureInCell(): void\n    {\n        $file = 'tests/data/Reader/XLSX/drawing_in_cell.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($file);\n\n        $objDrawing = new Drawing();\n        $objDrawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n\n        $sheet = $spreadsheet->getSheet(1);\n        $sheet->getCell('C10')->setValue($objDrawing);\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheet(1);\n        $drawings = $sheet->getInCellDrawingCollection();\n        self::assertCount(2, $drawings);\n\n        /** @var ?Drawing $drawing */\n        $drawing = $sheet->getCell('C10')->getValue();\n\n        if ($drawing === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertSame(IMAGETYPE_PNG, $drawing->getType());\n            self::assertSame('C10', $drawing->getCoordinates());\n            self::assertSame(100, $drawing->getWidth());\n            self::assertSame(100, $drawing->getHeight());\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testMoveImageInCell(): void\n    {\n        $file = 'tests/data/Reader/XLSX/drawing_in_cell.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($file);\n        $sheet = $spreadsheet->getSheet(1);\n\n        /** @var ?Drawing $drawing */\n        $drawing = $sheet->getCell('D7')->getValue();\n        if ($drawing === null) {\n            self::fail('Unexpected null drawing');\n        }\n        $originalWidth = $drawing->getWidth();\n        $originalHeight = $drawing->getHeight();\n        $sheet->getCell('D7')->setValue(null);\n        $sheet->getCell('D8')->setValue($drawing);\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheet(1);\n        $drawings = $sheet->getInCellDrawingCollection();\n        self::assertCount(1, $drawings);\n\n        /** @var ?Drawing $drawing */\n        $drawing = $sheet->getCell('D8')->getValue();\n\n        if ($drawing === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertSame(IMAGETYPE_PNG, $drawing->getType());\n            self::assertSame('D8', $drawing->getCoordinates());\n            self::assertSame($originalWidth, $drawing->getWidth());\n            self::assertSame($originalHeight, $drawing->getHeight());\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testWriteSamePictureInCellAndAsFloating(): void\n    {\n        $file = 'tests/data/Reader/XLSX/drawing_in_cell.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($file);\n\n        $objDrawing = new Drawing();\n        $objDrawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n\n        $sheet = $spreadsheet->getSheet(1);\n        $sheet->getCell('C10')->setValue($objDrawing);\n\n        $objFloatingDrawing = new Drawing();\n        $objFloatingDrawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n\n        $coordinates = $sheet->getCell('B5')->getCoordinate();\n        $objFloatingDrawing->setCoordinates($coordinates);\n        $objFloatingDrawing->setOffsetX(1);\n        $objFloatingDrawing->setOffsetY(1);\n        $objFloatingDrawing->setWorksheet($sheet);\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getSheet(1);\n        $drawings = $sheet->getInCellDrawingCollection();\n        self::assertCount(2, $drawings);\n\n        /** @var ?Drawing $drawing */\n        $drawing = $sheet->getCell('C10')->getValue();\n\n        if ($drawing === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertSame(IMAGETYPE_PNG, $drawing->getType());\n            self::assertSame('C10', $drawing->getCoordinates());\n            self::assertSame(100, $drawing->getWidth());\n            self::assertSame(100, $drawing->getHeight());\n            self::assertTrue($drawing->isInCell());\n        }\n\n        $floatingDrawings = $sheet->getDrawingCollection();\n        $floatingDrawing = $floatingDrawings[0];\n\n        if ($floatingDrawing === null) {\n            self::fail('Unexpected null drawing');\n        } else {\n            self::assertCount(1, $floatingDrawings);\n            self::assertSame('B5', $floatingDrawing->getCoordinates());\n            self::assertFalse($floatingDrawing->isInCell());\n            self::assertNull($sheet->getCell('B5')->getValue());\n        }\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingPassThroughTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse ZipArchive;\n\nclass DrawingPassThroughTest extends AbstractFunctional\n{\n    private const DIRECTORY = 'tests/data/Writer/XLSX/';\n    private const TEMPLATE = self::DIRECTORY . 'issue.4037.xlsx';\n\n    /**\n     * Test that unsupported drawing elements (shapes, textboxes) are preserved\n     * when pass-through is enabled and no drawings are modified.\n     */\n    public function testDrawingPassThroughPreservesUnsupportedElements(): void\n    {\n        // Load with pass-through enabled\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load(self::TEMPLATE);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Verify that drawing collection contains only the image (supported element)\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings, 'Drawing collection should contain only the image (supported element)');\n\n        // Verify that unparsed data contains the original drawing XML with shapes\n        $unparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $sheet->getCodeName();\n        self::assertArrayHasKey('sheets', $unparsedData);\n        self::assertIsArray($unparsedData['sheets']);\n        self::assertArrayHasKey($codeName, $unparsedData['sheets']);\n        self::assertIsArray($unparsedData['sheets'][$codeName]);\n        self::assertArrayHasKey('Drawings', $unparsedData['sheets'][$codeName]);\n\n        // Verify that the drawing XML contains shapes and textboxes\n        self::assertIsArray($unparsedData['sheets'][$codeName]['Drawings']);\n        $drawings = $unparsedData['sheets'][$codeName]['Drawings'];\n        $originalDrawingXml = reset($drawings);\n        self::assertIsString($originalDrawingXml);\n        self::assertStringContainsString('<xdr:sp', $originalDrawingXml, 'Original XML should contain shape element');\n        self::assertStringContainsString('<xdr:txBody>', $originalDrawingXml, 'Original XML should contain textbox element');\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify that the saved XLSX file contains shapes by reading the drawing XML directly\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n        $drawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        $zip->close();\n        unlink($tempFile);\n\n        self::assertNotFalse($drawingXml, 'Drawing XML should exist in saved file');\n        self::assertStringContainsString('<xdr:sp>', $drawingXml, 'Shapes should be preserved in saved file');\n        self::assertStringContainsString('<xdr:txBody>', $drawingXml, 'Textboxes should be preserved in saved file');\n    }\n\n    /**\n     * Test that WITHOUT Reader pass-through flag, shapes are NOT stored and are LOST.\n     * This test uses a file with both an image (supported) and a shape (unsupported).\n     */\n    public function testWithoutReaderPassThroughShapesAreLost(): void\n    {\n        // First, verify that the original file contains a shape\n        // Load WITH pass-through to check file contents\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load(self::TEMPLATE);\n        $unparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $spreadsheet->getActiveSheet()->getCodeName();\n        self::assertIsArray($unparsedData['sheets']);\n        self::assertArrayHasKey($codeName, $unparsedData['sheets']);\n        self::assertIsArray($unparsedData['sheets'][$codeName]);\n        self::assertArrayHasKey('Drawings', $unparsedData['sheets'][$codeName], 'Original file should have drawings');\n        self::assertIsArray($unparsedData['sheets'][$codeName]['Drawings']);\n        $drawings = $unparsedData['sheets'][$codeName]['Drawings'];\n        $drawingXml = reset($drawings);\n        self::assertIsString($drawingXml);\n        self::assertStringContainsString('<xdr:sp', $drawingXml, 'Original file should contain shape');\n        $spreadsheet->disconnectWorksheets();\n\n        // Now test: Load WITHOUT Reader pass-through (XML not stored)\n        $reader = new XlsxReader();\n        // Don't enable pass-through!\n        $spreadsheet = $reader->load(self::TEMPLATE);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Verify that image is in collection (supported element)\n        $drawings = $sheet->getDrawingCollection();\n        self::assertGreaterThan(0, count($drawings), 'Drawing collection should contain the image');\n\n        // Verify that shape XML is NOT stored (because pass-through disabled)\n        $unparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $sheet->getCodeName();\n        self::assertIsArray($unparsedData['sheets']);\n        $sheetData = $unparsedData['sheets'][$codeName] ?? [];\n        self::assertArrayNotHasKey('Drawings', $sheetData, 'Drawings should NOT be stored without Reader pass-through flag');\n\n        // Save to file\n        $writer = new XlsxWriter($spreadsheet);\n        $tempFile = File::temporaryFilename();\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify that shape is LOST by reading the drawing XML directly\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n        $drawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        $zip->close();\n        unlink($tempFile);\n\n        // The saved file should have drawing XML (for the image) but NOT the shape or textbox\n        self::assertNotFalse($drawingXml, 'Drawing XML should exist (for the image)');\n        self::assertStringNotContainsString('<xdr:sp>', $drawingXml, 'Shape should be lost without Reader pass-through');\n        self::assertStringNotContainsString('<xdr:txBody>', $drawingXml, 'Textbox should be lost without Reader pass-through');\n    }\n\n    /**\n     * Test that pass-through preserves drawings when a comment is deleted.\n     * Comments are independent from drawings, so deleting a comment should not affect drawings.\n     */\n    public function testDrawingPassThroughWithCommentDeletion(): void\n    {\n        // Load with pass-through enabled\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load(self::TEMPLATE);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Verify that image is in collection\n        $drawings = $sheet->getDrawingCollection();\n        self::assertGreaterThan(0, count($drawings), 'Drawing collection should contain the image');\n\n        // Verify that shapes and textboxes are in unparsed data\n        $unparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $sheet->getCodeName();\n        self::assertIsArray($unparsedData['sheets']);\n        self::assertArrayHasKey($codeName, $unparsedData['sheets']);\n        self::assertIsArray($unparsedData['sheets'][$codeName]);\n        self::assertArrayHasKey('Drawings', $unparsedData['sheets'][$codeName]);\n        self::assertIsArray($unparsedData['sheets'][$codeName]['Drawings']);\n        $drawings = $unparsedData['sheets'][$codeName]['Drawings'];\n        $originalDrawingXml = reset($drawings);\n        self::assertIsString($originalDrawingXml);\n        self::assertStringContainsString('<xdr:sp', $originalDrawingXml, 'Original XML should contain shape');\n        self::assertStringContainsString('<xdr:txBody>', $originalDrawingXml, 'Original XML should contain textbox');\n\n        // Verify that a comment exists and delete it\n        $comments = $sheet->getComments();\n        self::assertGreaterThan(0, count($comments), 'Original file should have at least one comment');\n        $firstCommentCell = array_key_first($comments);\n        self::assertIsString($firstCommentCell, 'Comment cell should be a string');\n        $originalCommentText = $sheet->getComment($firstCommentCell)->getText()->getPlainText();\n        self::assertNotEmpty($originalCommentText, 'Comment should have text');\n\n        // Delete the comment\n        $sheet->removeComment($firstCommentCell);\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify that shapes are still present and comment was deleted\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n        $drawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        $commentsXml = $zip->getFromName('xl/comments1.xml');\n        $zip->close();\n        unlink($tempFile);\n\n        self::assertNotFalse($drawingXml, 'Drawing XML should exist in saved file');\n        self::assertStringContainsString('<xdr:sp>', $drawingXml, 'Shapes should be preserved after comment deletion');\n        self::assertStringContainsString('<xdr:txBody>', $drawingXml, 'Textboxes should be preserved after comment deletion');\n\n        // Verify that comment was deleted (comments XML should not exist or not contain the original comment)\n        if ($commentsXml !== false) {\n            self::assertStringNotContainsString($originalCommentText, $commentsXml, 'Original comment text should be deleted');\n        }\n    }\n\n    /**\n     * Test that WITH pass-through, drawing modifications are NOT applied.\n     * When pass-through is enabled, the Writer uses the stored XML instead of regenerating,\n     * so programmatic changes to drawings are ignored.\n     */\n    public function testWithPassThroughDrawingModificationsAreIgnored(): void\n    {\n        // Load WITH pass-through\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load(self::TEMPLATE);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Verify that image is in collection\n        $drawings = $sheet->getDrawingCollection();\n        self::assertGreaterThan(0, count($drawings), 'Drawing collection should contain the image');\n\n        // Modify the drawing (change description)\n        $drawing = null;\n        foreach ($drawings as $d) {\n            $drawing = $d;\n\n            break;\n        }\n        self::assertNotNull($drawing, 'Should have at least one drawing');\n\n        $originalDescription = $drawing->getDescription();\n        $newDescription = 'Modified description by test';\n        $drawing->setDescription($newDescription);\n        self::assertNotSame($originalDescription, $newDescription, 'Description should be different');\n\n        // Save to file (with pass-through, Writer uses stored XML, modifications ignored)\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Reload and verify that the modification was NOT applied (original description preserved)\n        $reloadReader = new XlsxReader();\n        $reloadedSpreadsheet = $reloadReader->load($tempFile);\n        unlink($tempFile);\n\n        $reloadedDrawings = $reloadedSpreadsheet->getActiveSheet()->getDrawingCollection();\n        self::assertGreaterThan(0, count($reloadedDrawings), 'Reloaded file should have drawings');\n\n        $reloadedDrawing = null;\n        foreach ($reloadedDrawings as $d) {\n            $reloadedDrawing = $d;\n\n            break;\n        }\n        self::assertNotNull($reloadedDrawing, 'Should have at least one reloaded drawing');\n        self::assertSame($originalDescription, $reloadedDrawing->getDescription(), 'Original description should be preserved (modification ignored with pass-through)');\n        self::assertNotSame($newDescription, $reloadedDrawing->getDescription(), 'Modified description should NOT be applied with pass-through');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test that pass-through preserves drawings when columns are inserted,\n     * but coordinates are NOT adjusted.\n     */\n    public function testDrawingPassThroughWithColumnInsertion(): void\n    {\n        // Load with pass-through enabled\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load(self::TEMPLATE);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Get original drawing coordinates from XML\n        $originalUnparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $sheet->getCodeName();\n        self::assertIsArray($originalUnparsedData['sheets']);\n        self::assertArrayHasKey($codeName, $originalUnparsedData['sheets']);\n        self::assertIsArray($originalUnparsedData['sheets'][$codeName]);\n        self::assertArrayHasKey('Drawings', $originalUnparsedData['sheets'][$codeName]);\n        self::assertIsArray($originalUnparsedData['sheets'][$codeName]['Drawings']);\n        $originalDrawings = $originalUnparsedData['sheets'][$codeName]['Drawings'];\n        $originalDrawingXml = reset($originalDrawings);\n        self::assertIsString($originalDrawingXml);\n\n        // Extract original column coordinate\n        preg_match('/<xdr:col>(\\d+)<\\/xdr:col>/', $originalDrawingXml, $originalColMatches);\n        $originalCol = $originalColMatches[1] ?? null;\n        self::assertNotNull($originalCol, 'Original drawing should have column coordinate');\n\n        // Insert a column before B (which should shift drawings at B or later)\n        $sheet->insertNewColumnBefore('B', 1);\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Read the drawing XML directly from the saved file\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n        $reloadedDrawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        $zip->close();\n        unlink($tempFile);\n\n        self::assertNotFalse($reloadedDrawingXml, 'Drawing XML should exist in saved file');\n\n        // Extract reloaded column coordinate\n        preg_match('/<xdr:col>(\\d+)<\\/xdr:col>/', $reloadedDrawingXml, $reloadedColMatches);\n        $reloadedCol = $reloadedColMatches[1] ?? null;\n\n        // Coordinates are NOT adjusted\n        // The column coordinate should remain the same (not shifted)\n        self::assertSame($originalCol, $reloadedCol, 'Drawing column coordinate should NOT be adjusted');\n    }\n\n    /**\n     * Test that pass-through preserves drawings when rows are deleted,\n     * but coordinates are NOT adjusted.\n     */\n    public function testDrawingPassThroughWithRowDeletion(): void\n    {\n        // Load with pass-through enabled\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load(self::TEMPLATE);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Get original drawing coordinates from XML\n        $originalUnparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $sheet->getCodeName();\n        self::assertIsArray($originalUnparsedData['sheets']);\n        self::assertArrayHasKey($codeName, $originalUnparsedData['sheets']);\n        self::assertIsArray($originalUnparsedData['sheets'][$codeName]);\n        self::assertArrayHasKey('Drawings', $originalUnparsedData['sheets'][$codeName]);\n        self::assertIsArray($originalUnparsedData['sheets'][$codeName]['Drawings']);\n        $originalDrawings = $originalUnparsedData['sheets'][$codeName]['Drawings'];\n        $originalDrawingXml = reset($originalDrawings);\n        self::assertIsString($originalDrawingXml);\n\n        // Extract original row coordinate\n        preg_match('/<xdr:row>(\\d+)<\\/xdr:row>/', $originalDrawingXml, $originalRowMatches);\n        $originalRow = $originalRowMatches[1] ?? null;\n        self::assertNotNull($originalRow, 'Original drawing should have row coordinate');\n\n        // Delete row 1 (which should shift drawings at row 2 or later)\n        $sheet->removeRow(1, 1);\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Read the drawing XML directly from the saved file\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n        $reloadedDrawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        $zip->close();\n        unlink($tempFile);\n\n        self::assertNotFalse($reloadedDrawingXml, 'Drawing XML should exist in saved file');\n\n        // Extract reloaded row coordinate\n        preg_match('/<xdr:row>(\\d+)<\\/xdr:row>/', $reloadedDrawingXml, $reloadedRowMatches);\n        $reloadedRow = $reloadedRowMatches[1] ?? null;\n\n        // Coordinates are NOT adjusted\n        // The row coordinate should remain the same (not shifted)\n        self::assertSame($originalRow, $reloadedRow, 'Drawing row coordinate should NOT be adjusted after row deletion');\n    }\n\n    public function testDrawingPassThroughGetterSetter(): void\n    {\n        // Test Reader getter/setter\n        $reader = new XlsxReader();\n\n        // Default should be false\n        self::assertFalse($reader->getEnableDrawingPassThrough());\n\n        // Enable pass-through\n        $result = $reader->setEnableDrawingPassThrough(true);\n        self::assertInstanceOf(XlsxReader::class, $result);\n        self::assertTrue($reader->getEnableDrawingPassThrough());\n\n        // Disable pass-through\n        $reader->setEnableDrawingPassThrough(false);\n        self::assertFalse($reader->getEnableDrawingPassThrough());\n    }\n\n    /**\n     * Test that the drawingPassThroughEnabled flag is correctly set in unparsedLoadedData.\n     * This verifies the Reader sets the flag and the Writer's getPassThroughDrawingXml checks it.\n     */\n    public function testDrawingPassThroughEnabledFlagIsSetCorrectly(): void\n    {\n        // Test 1: Load WITHOUT pass-through (default)\n        $reader = new XlsxReader();\n        self::assertFalse($reader->getEnableDrawingPassThrough(), 'Pass-through should be disabled by default');\n        $spreadsheet = $reader->load(self::TEMPLATE);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $unparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $sheet->getCodeName();\n\n        // Verify that drawingPassThroughEnabled flag is NOT set when pass-through is disabled\n        self::assertArrayHasKey('sheets', $unparsedData);\n        self::assertIsArray($unparsedData['sheets']);\n\n        // The sheet may exist in unparsedData (legacy empty drawings), but the flag should be absent or false\n        if (isset($unparsedData['sheets'][$codeName])) {\n            $sheetData = $unparsedData['sheets'][$codeName];\n            self::assertIsArray($sheetData);\n            $flag = $sheetData['drawingPassThroughEnabled'] ?? false;\n            self::assertFalse($flag, 'drawingPassThroughEnabled should be false/absent when pass-through is disabled');\n        }\n\n        $spreadsheet->disconnectWorksheets();\n\n        // Test 2: Load WITH pass-through enabled\n        $reader2 = new XlsxReader();\n        $reader2->setEnableDrawingPassThrough(true);\n        self::assertTrue($reader2->getEnableDrawingPassThrough(), 'Pass-through should be enabled');\n        $spreadsheet2 = $reader2->load(self::TEMPLATE);\n\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $unparsedData2 = $spreadsheet2->getUnparsedLoadedData();\n        $codeName2 = $sheet2->getCodeName();\n\n        // Verify that drawingPassThroughEnabled flag IS set when pass-through is enabled\n        self::assertArrayHasKey('sheets', $unparsedData2);\n        self::assertIsArray($unparsedData2['sheets']);\n        self::assertArrayHasKey($codeName2, $unparsedData2['sheets']);\n        self::assertIsArray($unparsedData2['sheets'][$codeName2]);\n        self::assertArrayHasKey('drawingPassThroughEnabled', $unparsedData2['sheets'][$codeName2], 'drawingPassThroughEnabled flag should exist');\n        self::assertTrue($unparsedData2['sheets'][$codeName2]['drawingPassThroughEnabled'], 'drawingPassThroughEnabled should be true when pass-through is enabled');\n\n        // Verify that the drawing XML is also stored\n        self::assertArrayHasKey('Drawings', $unparsedData2['sheets'][$codeName2]);\n        self::assertIsArray($unparsedData2['sheets'][$codeName2]['Drawings']);\n        self::assertNotEmpty($unparsedData2['sheets'][$codeName2]['Drawings'], 'Drawing XML should be stored when pass-through is enabled');\n\n        $spreadsheet2->disconnectWorksheets();\n    }\n\n    /**\n     * Test that VML drawings (used by comments) and DrawingML (used by shapes/images)\n     * coexist without interference when pass-through is enabled.\n     * This addresses the concern that comments use the drawings folder with VML files.\n     * The template file already contains a comment in D1, so this test verifies that\n     * existing comments are preserved AND new comments can be added.\n     */\n    public function testCommentsAndPassThroughCoexist(): void\n    {\n        // Load file with drawings (image + shape) and enable pass-through\n        // Note: The template already contains a comment in D1\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load(self::TEMPLATE);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Verify the existing comment is loaded\n        $existingComment = $sheet->getComment('D1');\n        $existingCommentText = $existingComment->getText()->getPlainText();\n        self::assertNotEmpty($existingCommentText, 'Template should contain a comment in D1');\n\n        // Add a new comment to the sheet\n        $sheet->getComment('A1')->getText()->createText('Test comment with pass-through');\n        $sheet->getComment('A1')->setAuthor('Test Author');\n\n        // Save the file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify the file structure contains both VML (for comments) and DrawingML (for shapes)\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n\n        // Check for VML drawing (used by comments)\n        $vmlDrawing = $zip->getFromName('xl/drawings/vmlDrawing1.vml');\n        self::assertNotFalse($vmlDrawing, 'VML drawing for comments should exist');\n        self::assertStringContainsString('urn:schemas-microsoft-com:vml', $vmlDrawing, 'VML should contain VML namespace');\n\n        // Check for DrawingML (used by shapes/images)\n        $drawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        self::assertNotFalse($drawingXml, 'DrawingML for shapes/images should exist');\n        self::assertStringContainsString('<xdr:sp', $drawingXml, 'DrawingML should contain shape (preserved by pass-through)');\n        self::assertStringContainsString('<xdr:pic', $drawingXml, 'DrawingML should contain image');\n\n        // Check for comments XML (should contain both existing and new comments)\n        $commentsXml = $zip->getFromName('xl/comments1.xml');\n        self::assertNotFalse($commentsXml, 'Comments XML should exist');\n        self::assertStringContainsString('Test comment with pass-through', $commentsXml, 'New comment (A1) should be in comments XML');\n        self::assertStringContainsString($existingCommentText, $commentsXml, 'Existing comment (D1) should be preserved in comments XML');\n\n        $zip->close();\n        unlink($tempFile);\n    }\n\n    /**\n     * Test that pass-through preserves SVG images and their relationships.\n     * Excel stores SVG images with a PNG fallback using separate rIds.\n     * Without proper pass-through of relationships and media files, the rIds\n     * become misaligned and images break.\n     *\n     * File structure of merge.excel.xlsx:\n     * - xl/media/image1.png (PNG fallback for SVG)\n     * - xl/media/image2.svg (SVG image)\n     * - xl/media/image3.jpeg (JPEG image)\n     * - Drawing relationships: rId1=PNG, rId2=SVG, rId3=JPEG\n     */\n    public function testDrawingPassThroughPreservesSvgImagesAndRelationships(): void\n    {\n        $template = self::DIRECTORY . 'merge.excel.xlsx';\n\n        // Load with pass-through enabled\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load($template);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Verify that drawing collection contains supported images (PNG and JPEG, not SVG)\n        $drawings = $sheet->getDrawingCollection();\n        self::assertGreaterThanOrEqual(1, count($drawings), 'Drawing collection should contain at least one supported image');\n\n        // Verify that pass-through data is stored\n        $unparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $sheet->getCodeName();\n        self::assertArrayHasKey('sheets', $unparsedData);\n        self::assertIsArray($unparsedData['sheets']);\n        self::assertArrayHasKey($codeName, $unparsedData['sheets']);\n        self::assertIsArray($unparsedData['sheets'][$codeName]);\n        self::assertTrue($unparsedData['sheets'][$codeName]['drawingPassThroughEnabled'] ?? false);\n\n        // Verify that drawing relationships are stored\n        self::assertArrayHasKey('drawingRelationships', $unparsedData['sheets'][$codeName]);\n        $relsXml = $unparsedData['sheets'][$codeName]['drawingRelationships'];\n        self::assertIsString($relsXml);\n        self::assertStringContainsString('image1.png', $relsXml, 'Relationships should reference PNG');\n        self::assertStringContainsString('image2.svg', $relsXml, 'Relationships should reference SVG');\n        self::assertStringContainsString('image3.jpeg', $relsXml, 'Relationships should reference JPEG');\n\n        // Verify that media files paths are stored\n        self::assertArrayHasKey('drawingMediaFiles', $unparsedData['sheets'][$codeName]);\n        $mediaFiles = $unparsedData['sheets'][$codeName]['drawingMediaFiles'];\n        self::assertIsArray($mediaFiles);\n        self::assertGreaterThanOrEqual(3, count($mediaFiles), 'Should have at least 3 media files (PNG, SVG, JPEG)');\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify that the saved file preserves all images and relationships\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n\n        // Check that all media files are present\n        $pngContent = $zip->getFromName('xl/media/image1.png');\n        $svgContent = $zip->getFromName('xl/media/image2.svg');\n        $jpegContent = $zip->getFromName('xl/media/image3.jpeg');\n\n        self::assertNotFalse($pngContent, 'PNG image should be preserved');\n        self::assertNotFalse($svgContent, 'SVG image should be preserved');\n        self::assertNotFalse($jpegContent, 'JPEG image should be preserved');\n\n        // Check that drawing relationships are correct\n        $drawingRels = $zip->getFromName('xl/drawings/_rels/drawing1.xml.rels');\n        self::assertNotFalse($drawingRels, 'Drawing relationships file should exist');\n        self::assertStringContainsString('image1.png', $drawingRels, 'Drawing rels should reference PNG');\n        self::assertStringContainsString('image2.svg', $drawingRels, 'Drawing rels should reference SVG');\n        self::assertStringContainsString('image3.jpeg', $drawingRels, 'Drawing rels should reference JPEG');\n\n        // Check that drawing XML references are intact\n        $drawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        self::assertNotFalse($drawingXml, 'Drawing XML should exist');\n\n        // Verify SVG is referenced via svgBlip extension\n        self::assertStringContainsString('svgBlip', $drawingXml, 'Drawing should contain SVG blip reference');\n\n        $zip->close();\n        unlink($tempFile);\n    }\n\n    /**\n     * Test that WITHOUT pass-through, SVG images are lost due to rId misalignment.\n     * This documents the expected behavior without the fix.\n     */\n    public function testWithoutPassThroughSvgImagesAreLost(): void\n    {\n        $template = self::DIRECTORY . 'merge.excel.xlsx';\n\n        // Verify that the original file contains SVG\n        $originalZip = new ZipArchive();\n        $originalZip->open($template);\n        $originalSvgContent = $originalZip->getFromName('xl/media/image2.svg');\n        $originalZip->close();\n        self::assertNotFalse($originalSvgContent, 'Original file should contain SVG');\n\n        // Load WITHOUT pass-through\n        $reader = new XlsxReader();\n        // Don't enable pass-through\n        $spreadsheet = $reader->load($template);\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify that SVG is lost\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n\n        // SVG file should NOT be present (PhpSpreadsheet doesn't support SVG)\n        $svgContent = $zip->getFromName('xl/media/image2.svg');\n        self::assertFalse($svgContent, 'SVG image should NOT be present without pass-through');\n\n        // PNG and JPEG should still be present (supported formats)\n        // Note: filenames may be different as they are regenerated\n        $mediaFiles = [];\n        for ($i = 0; $i < $zip->numFiles; ++$i) {\n            $name = $zip->getNameIndex($i);\n            if ($name !== false && str_starts_with($name, 'xl/media/')) {\n                $mediaFiles[] = $name;\n            }\n        }\n\n        // Should have some media files but not SVG\n        self::assertNotEmpty($mediaFiles, 'Should have some media files');\n        foreach ($mediaFiles as $file) {\n            self::assertStringNotContainsString('.svg', $file, 'No SVG files should be present without pass-through');\n        }\n\n        $zip->close();\n        unlink($tempFile);\n    }\n\n    /**\n     * Test that pass-through preserves shapes (textboxes, rectangles, etc.)\n     * in addition to images with SVG.\n     */\n    public function testDrawingPassThroughPreservesShapesAndSvg(): void\n    {\n        $template = self::DIRECTORY . 'merge.excel.xlsx';\n\n        // Load with pass-through enabled\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load($template);\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify shapes are preserved\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n\n        $drawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        self::assertNotFalse($drawingXml, 'Drawing XML should exist');\n\n        // Check for shapes (xdr:sp elements)\n        self::assertStringContainsString('<xdr:sp', $drawingXml, 'Shapes should be preserved');\n        self::assertStringContainsString('<xdr:txBody>', $drawingXml, 'Textboxes should be preserved');\n\n        // Check for images (xdr:pic elements)\n        self::assertStringContainsString('<xdr:pic', $drawingXml, 'Images should be preserved');\n\n        // Check for SVG reference\n        self::assertStringContainsString('svgBlip', $drawingXml, 'SVG reference should be preserved');\n\n        $zip->close();\n        unlink($tempFile);\n    }\n\n    /**\n     * Test that pass-through preserves grouped images.\n     * Grouped images are not parsed into the drawing collection, so they would be lost\n     * without proper pass-through of drawing XML, relationships, and media files.\n     *\n     * File structure of grouped_images.xlsx:\n     * - Contains a group (xdr:grpSp) with 2 images inside\n     * - xl/media/image1.png and xl/media/image2.png\n     * - The images are referenced from within the group element\n     */\n    public function testDrawingPassThroughPreservesGroupedImages(): void\n    {\n        $template = self::DIRECTORY . 'grouped_images.xlsx';\n\n        // Verify that the original file contains a group with images\n        $originalZip = new ZipArchive();\n        $originalZip->open($template);\n        $originalDrawingXml = $originalZip->getFromName('xl/drawings/drawing1.xml');\n        $originalRels = $originalZip->getFromName('xl/drawings/_rels/drawing1.xml.rels');\n        $originalZip->close();\n\n        self::assertNotFalse($originalDrawingXml, 'Original file should have drawing XML');\n        self::assertStringContainsString('<xdr:grpSp>', $originalDrawingXml, 'Original file should contain a group');\n        self::assertStringContainsString('<xdr:pic>', $originalDrawingXml, 'Original file should contain images inside group');\n        self::assertNotFalse($originalRels, 'Original file should have drawing relationships');\n        self::assertStringContainsString('image1.png', $originalRels, 'Original rels should reference image1.png');\n        self::assertStringContainsString('image2.bmp', $originalRels, 'Original rels should reference image2.bmp');\n        self::assertStringContainsString('image4.gif', $originalRels, 'Original rels should reference image4.gif');\n        self::assertStringContainsString('image6.svg', $originalRels, 'Original rels should reference image6.svg');\n\n        // Load with pass-through enabled\n        $reader = new XlsxReader();\n        $reader->setEnableDrawingPassThrough(true);\n        $spreadsheet = $reader->load($template);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Verify that drawing collection is empty (grouped images are not parsed)\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(0, $drawings, 'Drawing collection should be empty (grouped images are not parsed)');\n\n        // Verify that pass-through data is stored\n        $unparsedData = $spreadsheet->getUnparsedLoadedData();\n        $codeName = $sheet->getCodeName();\n        self::assertArrayHasKey('sheets', $unparsedData);\n        self::assertIsArray($unparsedData['sheets']);\n        self::assertArrayHasKey($codeName, $unparsedData['sheets']);\n        self::assertIsArray($unparsedData['sheets'][$codeName]);\n        self::assertTrue($unparsedData['sheets'][$codeName]['drawingPassThroughEnabled'] ?? false, 'Pass-through should be enabled');\n\n        // Verify that drawing relationships are stored\n        self::assertArrayHasKey('drawingRelationships', $unparsedData['sheets'][$codeName], 'Drawing relationships should be stored');\n\n        // Verify that media files paths are stored\n        self::assertArrayHasKey('drawingMediaFiles', $unparsedData['sheets'][$codeName], 'Media files should be stored');\n        $mediaFiles = $unparsedData['sheets'][$codeName]['drawingMediaFiles'];\n        self::assertIsArray($mediaFiles);\n        self::assertGreaterThanOrEqual(2, count($mediaFiles), 'Should have at least 2 media files');\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify that the saved file preserves the group and images\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n\n        // Check that drawing XML contains the group\n        $drawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n        self::assertNotFalse($drawingXml, 'Drawing XML should exist in saved file');\n        self::assertStringContainsString('<xdr:grpSp>', $drawingXml, 'Group should be preserved');\n        self::assertStringContainsString('<xdr:pic>', $drawingXml, 'Images inside group should be preserved');\n\n        // Check that drawing relationships are preserved\n        $drawingRels = $zip->getFromName('xl/drawings/_rels/drawing1.xml.rels');\n        self::assertNotFalse($drawingRels, 'Drawing relationships file should exist');\n        self::assertStringContainsString('image1.png', $drawingRels, 'Drawing rels should reference image1.png');\n        self::assertStringContainsString('image2.bmp', $drawingRels, 'Drawing rels should reference image2.bmp');\n        self::assertStringContainsString('image4.gif', $drawingRels, 'Drawing rels should reference image4.gif');\n        self::assertStringContainsString('image6.svg', $drawingRels, 'Drawing rels should reference image6.svg');\n\n        // Check that media files are present\n        $image1Content = $zip->getFromName('xl/media/image1.png');\n        $image2Content = $zip->getFromName('xl/media/image2.bmp');\n        $image4Content = $zip->getFromName('xl/media/image4.gif');\n        $image6Content = $zip->getFromName('xl/media/image6.svg');\n        self::assertNotFalse($image1Content, 'image1.png should be preserved');\n        self::assertNotFalse($image2Content, 'image2.bmp should be preserved');\n        self::assertNotFalse($image4Content, 'image4.gif should be preserved');\n        self::assertNotFalse($image6Content, 'image6.svg should be preserved');\n\n        // Check that Content_Types.xml contains all image extensions\n        $contentTypes = $zip->getFromName('[Content_Types].xml');\n        self::assertNotFalse($contentTypes, 'Content_Types.xml should exist');\n        self::assertStringContainsString('image/png', $contentTypes, 'Content_Types should declare PNG mime type');\n        self::assertStringContainsString('image/bmp', $contentTypes, 'Content_Types should declare BMP mime type');\n        self::assertStringContainsString('image/gif', $contentTypes, 'Content_Types should declare GIF mime type');\n        self::assertStringContainsString('image/svg+xml', $contentTypes, 'Content_Types should declare SVG mime type');\n\n        $zip->close();\n        unlink($tempFile);\n    }\n\n    /**\n     * Test that WITHOUT pass-through, grouped images are lost.\n     * This documents the expected behavior without the fix.\n     */\n    public function testWithoutPassThroughGroupedImagesAreLost(): void\n    {\n        $template = self::DIRECTORY . 'grouped_images.xlsx';\n\n        // Verify that the original file contains grouped images\n        $originalZip = new ZipArchive();\n        $originalZip->open($template);\n        $originalDrawingXml = $originalZip->getFromName('xl/drawings/drawing1.xml');\n        $originalZip->close();\n        self::assertStringContainsString('<xdr:grpSp>', $originalDrawingXml, 'Original file should contain a group');\n\n        // Load WITHOUT pass-through\n        $reader = new XlsxReader();\n        // Don't enable pass-through\n        $spreadsheet = $reader->load($template);\n\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Verify that drawing collection is empty (grouped images are not parsed)\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(0, $drawings, 'Drawing collection should be empty without pass-through too');\n\n        // Save to file\n        $tempFile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($tempFile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Verify that the group and images are lost\n        $zip = new ZipArchive();\n        $zip->open($tempFile);\n\n        // Drawing XML should not exist or not contain the group\n        $drawingXml = $zip->getFromName('xl/drawings/drawing1.xml');\n\n        if ($drawingXml !== false) {\n            // If drawing XML exists, it should NOT contain the group\n            self::assertStringNotContainsString('<xdr:grpSp>', $drawingXml, 'Group should be lost without pass-through');\n        }\n\n        // Media files should NOT be present (nothing was in the drawing collection)\n        $image1Content = $zip->getFromName('xl/media/image1.png');\n        $image2Content = $zip->getFromName('xl/media/image2.bmp');\n        $image4Content = $zip->getFromName('xl/media/image4.gif');\n        $image6Content = $zip->getFromName('xl/media/image6.svg');\n        self::assertFalse($image1Content, 'image1.png should NOT be present without pass-through');\n        self::assertFalse($image2Content, 'image2.bmp should NOT be present without pass-through');\n        self::assertFalse($image4Content, 'image4.gif should NOT be present without pass-through');\n        self::assertFalse($image6Content, 'image6.svg should NOT be present without pass-through');\n\n        $zip->close();\n        unlink($tempFile);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingsInsertRowsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DrawingsInsertRowsTest extends AbstractFunctional\n{\n    /**\n     * Test save and load XLSX file with drawing on 2nd worksheet.\n     */\n    public function testSaveAfterInsertingRows(): void\n    {\n        // Read spreadsheet from file\n        $inputFilename = 'tests/data/Writer/XLSX/issue.2908.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($inputFilename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $drawingCollection = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawingCollection);\n        $drawing = $drawingCollection[0];\n        self::assertNotNull($drawing);\n        self::assertSame('D10', $drawing->getCoordinates());\n        self::assertSame('F11', $drawing->getCoordinates2());\n        self::assertSame('oneCell', $drawing->getEditAs());\n\n        $sheet->insertNewRowBefore(5);\n        $sheet->insertNewRowBefore(6);\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $drawingCollection2 = $rsheet->getDrawingCollection();\n        self::assertCount(1, $drawingCollection2);\n        $drawing2 = $drawingCollection2[0];\n        self::assertNotNull($drawing2);\n        self::assertSame('D12', $drawing2->getCoordinates());\n        self::assertSame('F13', $drawing2->getCoordinates2());\n        self::assertSame('oneCell', $drawing2->getEditAs());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Comment;\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass DrawingsTest extends AbstractFunctional\n{\n    /**\n     * Test save and load XLSX file with drawing on 2nd worksheet.\n     */\n    public function testSaveLoadWithDrawingOn2ndWorksheet(): void\n    {\n        // Read spreadsheet from file\n        $inputFilename = 'tests/data/Writer/XLSX/drawing_on_2nd_page.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($inputFilename);\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n\n        $spreadsheet->disconnectWorksheets();\n        self::assertNotNull(\n            $reloadedSpreadsheet->getSheetByName('Sheet1 (2)')\n        );\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test save and load XLSX file with drawing with the same file name.\n     */\n    public function testSaveLoadWithDrawingWithSamePath(): void\n    {\n        // Read spreadsheet from file\n        $originalFileName = 'tests/data/Writer/XLSX/saving_drawing_with_same_path.xlsx';\n\n        $originalFile = file_get_contents($originalFileName);\n\n        $tempFileName = File::sysGetTempDir() . '/saving_drawing_with_same_path';\n\n        file_put_contents($tempFileName, $originalFile);\n\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($tempFileName);\n\n        $spreadsheet->getActiveSheet()->setCellValue('D5', 'foo');\n        // Save spreadsheet to file to the same path. Success test case won't\n        // throw exception here\n        $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n        $writer->save($tempFileName);\n\n        $reloadedSpreadsheet = $reader->load($tempFileName);\n\n        unlink($tempFileName);\n\n        $spreadsheet->disconnectWorksheets();\n        self::assertNotNull(\n            $reloadedSpreadsheet->getSheetByName('Worksheet')\n        );\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test save and load XLSX file with drawing in comment.\n     */\n    public function testSaveLoadWithDrawingInComment(): void\n    {\n        // Read spreadsheet from file\n        $originalFileName = 'tests/data/Writer/XLSX/drawing_in_comment.xlsx';\n\n        $originalFile = file_get_contents($originalFileName);\n\n        $tempFileName = File::sysGetTempDir() . '/drawing_in_comment.xlsx';\n\n        file_put_contents($tempFileName, $originalFile);\n\n        // Load native xlsx file with drawing in comment background\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($tempFileName);\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $comment = $sheet->getComment('A1');\n\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 178);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 140);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_JPEG);\n\n        $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n        $writer->save($tempFileName);\n\n        $reloadedSpreadsheet = $reader->load($tempFileName);\n        unlink($tempFileName);\n\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test save and load XLSX file with drawing in comment, image in BMP/GIF format saved as PNG.\n     */\n    public function testDrawingInCommentImageFormatsConversions(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Add gif image to comment background\n        $sheet->setCellValue('A1', '.gif');\n        $drawing = new Drawing();\n        $drawing->setName('Green Square');\n        $drawing->setPath('tests/data/Writer/XLSX/green_square.gif');\n        self::assertEquals($drawing->getWidth(), 150);\n        self::assertEquals($drawing->getHeight(), 150);\n        $comment = $sheet->getComment('A1');\n        $comment->setBackgroundImage($drawing);\n        $comment->setSizeAsBackgroundImage();\n        self::assertEquals($comment->getWidth(), '112.5pt');\n        self::assertEquals($comment->getHeight(), '112.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_GIF);\n\n        // Add bmp image to comment background\n        $sheet->setCellValue('A2', '.bmp 16 colors');\n        $drawing = new Drawing();\n        $drawing->setName('Yellow Square');\n        $drawing->setPath('tests/data/Writer/XLSX/yellow_square_16.bmp');\n        self::assertEquals($drawing->getWidth(), 70);\n        self::assertEquals($drawing->getHeight(), 70);\n        $comment = $sheet->getComment('A2');\n        $comment->setBackgroundImage($drawing);\n        $comment->setSizeAsBackgroundImage();\n        self::assertEquals($comment->getWidth(), '52.5pt');\n        self::assertEquals($comment->getHeight(), '52.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_BMP);\n\n        // Write file\n        $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n        $tempFileName = File::sysGetTempDir() . '/drawings_in_comments_conversions.xlsx';\n        $writer->save($tempFileName);\n\n        // Read new file\n        $reloadedSpreadsheet = $reader->load($tempFileName);\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n\n        // Check first image in comment background\n        $comment = $sheet->getComment('A1');\n        self::assertEquals($comment->getWidth(), '112.5pt');\n        self::assertEquals($comment->getHeight(), '112.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 150);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 150);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_PNG);\n\n        // Check second image in comment background\n        $comment = $sheet->getComment('A2');\n        self::assertEquals($comment->getWidth(), '52.5pt');\n        self::assertEquals($comment->getHeight(), '52.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 70);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 70);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_PNG);\n\n        unlink($tempFileName);\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test build and save XLSX with drawings in comments with comment size correction.\n     */\n    public function testBuildWithDifferentImageFormats(): void\n    {\n        $reader = new Xlsx();\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Add png image to comment background\n        $sheet->setCellValue('A1', '.png');\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        self::assertEquals($drawing->getWidth(), 100);\n        self::assertEquals($drawing->getHeight(), 100);\n        $comment = $sheet->getComment('A1');\n        $comment->setBackgroundImage($drawing);\n        $comment->setSizeAsBackgroundImage();\n        self::assertEquals($comment->getWidth(), '75pt');\n        self::assertEquals($comment->getHeight(), '75pt');\n\n        $comment = $sheet->getComment('A1');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_PNG);\n\n        // Add gif image to comment background\n        $sheet->setCellValue('A2', '.gif');\n        $drawing = new Drawing();\n        $drawing->setName('Green Square');\n        $drawing->setPath('tests/data/Writer/XLSX/green_square.gif');\n        self::assertEquals($drawing->getWidth(), 150);\n        self::assertEquals($drawing->getHeight(), 150);\n        $comment = $sheet->getComment('A2');\n        $comment->setBackgroundImage($drawing);\n        $comment->setSizeAsBackgroundImage();\n        self::assertEquals($comment->getWidth(), '112.5pt');\n        self::assertEquals($comment->getHeight(), '112.5pt');\n\n        $comment = $sheet->getComment('A2');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_GIF);\n\n        // Add jpeg image to comment background\n        $sheet->setCellValue('A3', '.jpeg');\n        $drawing = new Drawing();\n        $drawing->setName('Red Square');\n        $drawing->setPath('tests/data/Writer/XLSX/red_square.jpeg');\n        self::assertEquals($drawing->getWidth(), 50);\n        self::assertEquals($drawing->getHeight(), 50);\n        $comment = $sheet->getComment('A3');\n        $comment->setBackgroundImage($drawing);\n        $comment->setSizeAsBackgroundImage();\n        self::assertEquals($comment->getWidth(), '37.5pt');\n        self::assertEquals($comment->getHeight(), '37.5pt');\n\n        $comment = $sheet->getComment('A3');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_JPEG);\n\n        // Add bmp image to comment background\n        $sheet->setCellValue('A4', '.bmp 16 colors');\n        $drawing = new Drawing();\n        $drawing->setName('Yellow Square');\n        $drawing->setPath('tests/data/Writer/XLSX/yellow_square_16.bmp');\n        self::assertEquals($drawing->getWidth(), 70);\n        self::assertEquals($drawing->getHeight(), 70);\n        $comment = $sheet->getComment('A4');\n        $comment->setBackgroundImage($drawing);\n        $comment->setSizeAsBackgroundImage();\n        self::assertEquals($comment->getWidth(), '52.5pt');\n        self::assertEquals($comment->getHeight(), '52.5pt');\n\n        $comment = $sheet->getComment('A4');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_BMP);\n\n        // Add bmp image to comment background\n        $sheet->setCellValue('A5', '.bmp 256 colors');\n        $drawing = new Drawing();\n        $drawing->setName('Brown Square');\n        $drawing->setPath('tests/data/Writer/XLSX/brown_square_256.bmp');\n        self::assertEquals($drawing->getWidth(), 70);\n        self::assertEquals($drawing->getHeight(), 70);\n        $comment = $sheet->getComment('A5');\n        $comment->setBackgroundImage($drawing);\n        $comment->setSizeAsBackgroundImage();\n        self::assertEquals($comment->getWidth(), '52.5pt');\n        self::assertEquals($comment->getHeight(), '52.5pt');\n\n        $comment = $sheet->getComment('A5');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_BMP);\n\n        // Add bmp image to comment background\n        $sheet->setCellValue('A6', '.bmp 24 bit');\n        $drawing = new Drawing();\n        $drawing->setName('Orange Square');\n        $drawing->setPath('tests/data/Writer/XLSX/orange_square_24_bit.bmp');\n        self::assertEquals($drawing->getWidth(), 70);\n        self::assertEquals($drawing->getHeight(), 70);\n        self::assertSame(IMAGETYPE_PNG, $drawing->getImageTypeForSave());\n        $comment = $sheet->getComment('A6');\n        $comment->setBackgroundImage($drawing);\n        $comment->setSizeAsBackgroundImage();\n        self::assertEquals($comment->getWidth(), '52.5pt');\n        self::assertEquals($comment->getHeight(), '52.5pt');\n\n        $comment = $sheet->getComment('A6');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_BMP);\n\n        // Add unsupported tiff image to comment background\n        $sheet->setCellValue('A7', '.tiff');\n        $drawing = new Drawing();\n        $drawing->setName('Purple Square');\n        $drawing->setPath('tests/data/Writer/XLSX/purple_square.tiff');\n        self::assertStringContainsString('purple_square.tiff', $drawing->getFilename());\n        self::assertFalse($drawing->getIsUrl());\n        $comment = $sheet->getComment('A7');\n        self::assertFalse($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_UNKNOWN);\n\n        try {\n            $comment->setBackgroundImage($drawing);\n            self::fail('Should throw exception when attempting to add tiff');\n        } catch (PhpSpreadsheetException $e) {\n            self::assertEquals($e->getMessage(), 'Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        try {\n            $drawing->getImageTypeForSave();\n            self::fail('Should throw exception when attempting to get image type for tiff');\n        } catch (PhpSpreadsheetException $e) {\n            self::assertEquals($e->getMessage(), 'Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        try {\n            $drawing->getMediaFilename();\n            self::fail('Should throw exception when attempting to get media file name for tiff');\n        } catch (PhpSpreadsheetException $e) {\n            self::assertEquals($e->getMessage(), 'Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        try {\n            $drawing->getImageFileExtensionForSave();\n            self::fail('Should throw exception when attempting to get image file extension for tiff');\n        } catch (PhpSpreadsheetException $e) {\n            self::assertEquals($e->getMessage(), 'Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        try {\n            $drawing->getImageMimeType();\n            self::fail('Should throw exception when attempting to get image mime type for tiff');\n        } catch (PhpSpreadsheetException $e) {\n            self::assertEquals($e->getMessage(), 'Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.');\n        }\n\n        // Write file\n        $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n        $tempFileName = File::sysGetTempDir() . '/drawings_in_comments.xlsx';\n        $writer->save($tempFileName);\n\n        // Read new file\n        $reloadedSpreadsheet = $reader->load($tempFileName);\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n\n        // Check first image in comment background\n        $comment = $sheet->getComment('A1');\n        self::assertEquals($comment->getWidth(), '75pt');\n        self::assertEquals($comment->getHeight(), '75pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 100);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 100);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_PNG);\n\n        // Check second image in comment background\n        $comment = $sheet->getComment('A2');\n        self::assertEquals($comment->getWidth(), '112.5pt');\n        self::assertEquals($comment->getHeight(), '112.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 150);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 150);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_PNG);\n\n        // Check third image in comment background\n        $comment = $sheet->getComment('A3');\n        self::assertEquals($comment->getWidth(), '37.5pt');\n        self::assertEquals($comment->getHeight(), '37.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 50);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 50);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_JPEG);\n\n        // Check fourth image in comment background\n        $comment = $sheet->getComment('A4');\n        self::assertEquals($comment->getWidth(), '52.5pt');\n        self::assertEquals($comment->getHeight(), '52.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 70);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 70);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_PNG);\n\n        // Check fifth image in comment background\n        $comment = $sheet->getComment('A5');\n        self::assertEquals($comment->getWidth(), '52.5pt');\n        self::assertEquals($comment->getHeight(), '52.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 70);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 70);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_PNG);\n\n        // Check sixth image in comment background\n        $comment = $sheet->getComment('A6');\n        self::assertEquals($comment->getWidth(), '52.5pt');\n        self::assertEquals($comment->getHeight(), '52.5pt');\n        self::assertTrue($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 70);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 70);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_PNG);\n\n        // Check seventh image in comment background\n        $comment = $sheet->getComment('A7');\n        self::assertFalse($comment->hasBackgroundImage());\n        self::assertEquals($comment->getBackgroundImage()->getWidth(), 0);\n        self::assertEquals($comment->getBackgroundImage()->getHeight(), 0);\n        self::assertEquals($comment->getBackgroundImage()->getType(), IMAGETYPE_UNKNOWN);\n\n        unlink($tempFileName);\n\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test save and load XLSX file with drawing image that coordinate is two cell anchor.\n     */\n    public function testTwoCellAnchorDrawing(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Add gif image that coordinates is two cell anchor.\n        $drawing = new Drawing();\n        $drawing->setName('Green Square');\n        $drawing->setPath('tests/data/Writer/XLSX/green_square.gif');\n        self::assertEquals($drawing->getWidth(), 150);\n        self::assertEquals($drawing->getHeight(), 150);\n        $drawing->setCoordinates('A1');\n        $drawing->setOffsetX(30);\n        $drawing->setOffsetY(10);\n        $drawing->setCoordinates2('E8');\n        $drawing->setOffsetX2(-50);\n        $drawing->setOffsetY2(-20);\n        $drawing->setWorksheet($sheet);\n\n        // Write file\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n\n        // Check image coordinates.\n        $drawingCollection = $rsheet->getDrawingCollection();\n        self::assertCount(1, $drawingCollection);\n        $drawing = $drawingCollection[0];\n        self::assertNotNull($drawing);\n\n        self::assertSame(150, $drawing->getWidth());\n        self::assertSame(150, $drawing->getHeight());\n        self::assertSame('A1', $drawing->getCoordinates());\n        self::assertSame(30, $drawing->getOffsetX());\n        self::assertSame(10, $drawing->getOffsetY());\n        self::assertSame('E8', $drawing->getCoordinates2());\n        self::assertSame(-50, $drawing->getOffsetX2());\n        self::assertSame(-20, $drawing->getOffsetY2());\n        self::assertSame($rsheet, $drawing->getWorksheet());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Test editAs attribute for two-cell anchors.\n     */\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerEditAs')]\n    public function testTwoCellEditAs(string $editAs, ?string $expectedResult = null): void\n    {\n        if ($expectedResult === null) {\n            $expectedResult = $editAs;\n        }\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Add gif image that coordinates is two cell anchor.\n        $drawing = new Drawing();\n        $drawing->setName('Green Square');\n        $drawing->setPath('tests/data/Writer/XLSX/green_square.gif');\n        self::assertEquals($drawing->getWidth(), 150);\n        self::assertEquals($drawing->getHeight(), 150);\n        $drawing->setCoordinates('A1');\n        $drawing->setOffsetX(30);\n        $drawing->setOffsetY(10);\n        $drawing->setCoordinates2('E8');\n        $drawing->setOffsetX2(-50);\n        $drawing->setOffsetY2(-20);\n        if ($editAs !== '') {\n            $drawing->setEditAs($editAs);\n        }\n        $drawing->setWorksheet($sheet);\n\n        // Write file\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n\n        // Check image coordinates.\n        $drawingCollection = $rsheet->getDrawingCollection();\n        $drawing = $drawingCollection[0];\n        self::assertNotNull($drawing);\n\n        self::assertSame(150, $drawing->getWidth());\n        self::assertSame(150, $drawing->getHeight());\n        self::assertSame('A1', $drawing->getCoordinates());\n        self::assertSame(30, $drawing->getOffsetX());\n        self::assertSame(10, $drawing->getOffsetY());\n        self::assertSame('E8', $drawing->getCoordinates2());\n        self::assertSame(-50, $drawing->getOffsetX2());\n        self::assertSame(-20, $drawing->getOffsetY2());\n        self::assertSame($rsheet, $drawing->getWorksheet());\n        self::assertSame($expectedResult, $drawing->getEditAs());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerEditAs(): array\n    {\n        return [\n            'absolute' => ['absolute'],\n            'onecell' => ['oneCell'],\n            'twocell' => ['twoCell'],\n            'unset (will be treated as twoCell)' => [''],\n            'unknown (will be treated as twoCell)' => ['unknown', ''],\n        ];\n    }\n\n    public function testMemoryDrawingDuplicateResource(): void\n    {\n        $gdImage = imagecreatetruecolor(120, 20);\n        $textColor = ($gdImage === false) ? false : imagecolorallocate($gdImage, 255, 255, 255);\n        if ($gdImage === false || $textColor === false) {\n            self::fail('imagecreatetruecolor or imagecolorallocate failed');\n        } else {\n            $spreadsheet = new Spreadsheet();\n            $aSheet = $spreadsheet->getActiveSheet();\n            imagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor);\n            $listOfModes = [\n                BaseDrawing::EDIT_AS_TWOCELL,\n                BaseDrawing::EDIT_AS_ABSOLUTE,\n                BaseDrawing::EDIT_AS_ONECELL,\n            ];\n\n            foreach ($listOfModes as $i => $mode) {\n                $drawing = new MemoryDrawing();\n                $drawing->setName('In-Memory image ' . $i);\n                $drawing->setDescription('In-Memory image ' . $i);\n\n                $drawing->setCoordinates('A' . ((4 * $i) + 1));\n                $drawing->setCoordinates2('D' . ((4 * $i) + 4));\n                $drawing->setEditAs($mode);\n\n                $drawing->setImageResource($gdImage);\n                $drawing->setRenderingFunction(\n                    MemoryDrawing::RENDERING_JPEG\n                );\n\n                $drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT);\n\n                $drawing->setWorksheet($aSheet);\n            }\n            $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n            $spreadsheet->disconnectWorksheets();\n\n            foreach ($reloadedSpreadsheet->getActiveSheet()->getDrawingCollection() as $index => $pDrawing) {\n                self::assertEquals($listOfModes[$index], $pDrawing->getEditAs(), 'functional test drawing twoCellAnchor');\n            }\n            $reloadedSpreadsheet->disconnectWorksheets();\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ExplicitStyle0Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ExplicitStyle0Test extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    public function testWithoutExplicitStyle0(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $defaultStyle = $spreadsheet->getDefaultStyle();\n        $defaultStyle->getFont()->setBold(true);\n        $defaultStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('bold');\n        $sheet->getCell('A2')->setValue('italic');\n        $sheet->getStyle('A2')->getFont()->setItalic(true);\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertTrue($sheet2->getStyle('A1')->getFont()->getBold());\n        self::assertFalse($sheet2->getStyle('A1')->getFont()->getItalic());\n        self::assertSame(Alignment::HORIZONTAL_CENTER, $sheet2->getStyle('A1')->getAlignment()->getHorizontal());\n        self::assertTrue($sheet2->getStyle('A2')->getFont()->getBold());\n        self::assertTrue($sheet2->getStyle('A2')->getFont()->getItalic());\n        self::assertSame(Alignment::HORIZONTAL_CENTER, $sheet2->getStyle('A2')->getAlignment()->getHorizontal());\n        $spreadsheet2->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c r=\"A1\" t=\"s\"><v>0</v></c>', $data, 'no s attribute in c tag');\n            self::assertStringContainsString('<c r=\"A2\" s=\"1\" t=\"s\"><v>1</v></c>', $data);\n        }\n    }\n\n    public function testWithExplicitStyle0(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $defaultStyle = $spreadsheet->getDefaultStyle();\n        $defaultStyle->getFont()->setBold(true);\n        $defaultStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('bold');\n        $sheet->getCell('A2')->setValue('italic');\n        $sheet->getStyle('A2')->getFont()->setItalic(true);\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setExplicitStyle0(true);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($this->outputFile);\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        self::assertTrue($sheet2->getStyle('A1')->getFont()->getBold());\n        self::assertFalse($sheet2->getStyle('A1')->getFont()->getItalic());\n        self::assertSame(Alignment::HORIZONTAL_CENTER, $sheet2->getStyle('A1')->getAlignment()->getHorizontal());\n        self::assertTrue($sheet2->getStyle('A2')->getFont()->getBold());\n        self::assertTrue($sheet2->getStyle('A2')->getFont()->getItalic());\n        self::assertSame(Alignment::HORIZONTAL_CENTER, $sheet2->getStyle('A2')->getAlignment()->getHorizontal());\n        $spreadsheet2->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<c r=\"A1\" s=\"0\" t=\"s\"><v>0</v></c>', $data, 'has s attribute in c tag');\n            self::assertStringContainsString('<c r=\"A2\" s=\"1\" t=\"s\"><v>1</v></c>', $data);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/FloatsRetainedTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as Reader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as Writer;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FloatsRetainedTest extends TestCase\n{\n    #[DataProvider('providerIntyFloatsRetainedByWriter')]\n    public function testIntyFloatsRetainedByWriter(float|int $value, mixed $expected = null): void\n    {\n        if ($expected === null) {\n            $expected = $value;\n        }\n        $outputFilename = File::temporaryFilename();\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getActiveSheet()\n            ->getCell('A1')->setValue($value);\n\n        $writer = new Writer($spreadsheet);\n        $writer->save($outputFilename);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new Reader();\n        $spreadsheet2 = $reader->load($outputFilename);\n        unlink($outputFilename);\n\n        self::assertSame(\n            $expected,\n            $spreadsheet2->getActiveSheet()\n                ->getCell('A1')->getValue()\n        );\n        $spreadsheet2->disconnectWorksheets();\n    }\n\n    public static function providerIntyFloatsRetainedByWriter(): array\n    {\n        return [\n            [-1.0],\n            [-1],\n            [0.0],\n            [0],\n            [1.0],\n            [1],\n            [1e-3],\n            [1.3e-10],\n            [1e10],\n            [3.00000000000000000001],\n            'int but too much precision for Excel' => [99_999_999_999_999_999, '99999999999999999'],\n            [99_999_999_999_999_999.0],\n            'int > PHP_INT_MAX so stored as float' => [999_999_999_999_999_999_999_999_999_999_999_999_999_999],\n            [999_999_999_999_999_999_999_999_999_999_999_999_999_999.0],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/FontCharsetTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass FontCharsetTest extends AbstractFunctional\n{\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Spreadsheet $reloadedSpreadsheet = null;\n\n    protected function tearDown(): void\n    {\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->reloadedSpreadsheet !== null) {\n            $this->reloadedSpreadsheet->disconnectWorksheets();\n            $this->reloadedSpreadsheet = null;\n        }\n    }\n\n    public function testFontCharset(): void\n    {\n        $spreadsheet = $this->spreadsheet = new Spreadsheet();\n        $sheet = $this->spreadsheet->getActiveSheet();\n        $sheet->getStyle('A1')->getFont()->setName('Nazanin');\n        $spreadsheet->addFontCharset('Nazanin');\n\n        $spreadsheet2 = $this->reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $sheet2 = $spreadsheet2->getActiveSheet();\n        $sheet2->getStyle('B1')->getFont()->setName('B Nazanin');\n        $sheet2->getStyle('C1')->getFont()->setName('C Nazanin');\n        $sheet2->getStyle('D1')->getFont()->setName('D Nazanin');\n        $spreadsheet2->addFontCharset('C Nazanin');\n        // Do not add D Nazanin for this test.\n        self::assertSame(\n            [\n                'B Nazanin' => 178, // default entry\n                'Nazanin' => 178, // should have been set by Xlsx Reader\n                'C Nazanin' => 178, // explicitly set in this test\n            ],\n            $spreadsheet2->getFontCharsets()\n        );\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/FunctionPrefixTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\FunctionPrefix;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass FunctionPrefixTest extends TestCase\n{\n    #[DataProvider('functionPrefixProvider')]\n    public function testFunctionPrefix(string $expectedResult, string $functionString): void\n    {\n        $result = FunctionPrefix::addFunctionPrefix($functionString);\n        self::assertSame($expectedResult, $result);\n        $result = FunctionPrefix::addFunctionPrefixStripEquals(\"=$functionString\");\n        self::assertSame($expectedResult, $result);\n    }\n\n    /** @return array<string, array<int, string>> */\n    public static function functionPrefixProvider(): array\n    {\n        return [\n            'Basic Legacy Function' => ['SUM()', 'SUM()'],\n            'New Function without Prefix' => ['_xlfn.ARABIC()', 'ARABIC()'],\n            'New Function already Prefixed' => ['_xlfn.ARABIC()', '_xlfn.ARABIC()'],\n            'New Function requiring Double-Prefix' => ['_xlfn._xlws.FILTER()', 'FILTER()'],\n            'New Function requiring Double-Prefix already partially Prefixed' => ['_xlfn._xlws.FILTER()', '_xlfn.FILTER()'],\n            'New Function requiring Double-Prefix already partially Prefixed #2' => ['_xlfn._xlws.FILTER()', '_xlws.FILTER()'],\n            'New Function requiring Double-Prefix already Fully Prefixed' => ['_xlfn._xlws.FILTER()', '_xlfn._xlws.FILTER()'],\n            'Multiple Functions' => ['_xlfn._xlws.SORT(_xlfn._xlws.FILTER(A:A, A:A<>\"\"))', 'SORT(FILTER(A:A, A:A<>\"\"))'],\n            'DAYS/NETWORKDAYS 1' => ['_xlfn.DAYS(DATE(2023,1,1),TODAY())', 'DAYS(DATE(2023,1,1),TODAY())'],\n            'DAYS/NETWORKDAYS 2' => ['_xlfn.DAYS(DATE(2023,1,1),TODAY())', '_xlfn.DAYS(DATE(2023,1,1),TODAY())'],\n            'DAYS/NETWORKDAYS 3' => ['ABS(_xlfn.DAYS(DATE(2023,1,1),TODAY()))', 'ABS(DAYS(DATE(2023,1,1),TODAY()))'],\n            'DAYS/NETWORKDAYS 4' => ['ABS(_xlfn.DAYS(DATE(2023,1,1),TODAY()))', 'ABS(_xlfn.DAYS(DATE(2023,1,1),TODAY()))'],\n            'DAYS/NETWORKDAYS 5' => ['NETWORKDAYS(DATE(2023,1,1),TODAY(), C:C)', 'NETWORKDAYS(DATE(2023,1,1),TODAY(), C:C)'],\n            'COUNTIFS reclassified as Legacy' => ['COUNTIFS()', 'COUNTIFS()'],\n            'SUMIFS reclassified as Legacy' => ['SUMIFS()', 'SUMIFS()'],\n            'BASE improperly classified by MS' => ['_xlfn.BASE()', 'BASE()'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/HyperlinkTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass HyperlinkTest extends AbstractFunctional\n{\n    public function testHyperlink(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('First');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('Second');\n        $sheet2->setCellValue('A100', 'other sheet');\n        $sheet1->setCellValue('A100', 'this sheet');\n        $sheet1->setCellValue('A1', '=HYPERLINK(\"#A100\", \"here\")');\n        $sheet1->setCellValue('A2', '=HYPERLINK(\"#Second!A100\", \"there\")');\n        $sheet1->setCellValue('A3', '=HYPERLINK(\"http://example.com\", \"external\")');\n        $sheet1->setCellValue('A4', 'gotoA101');\n        $sheet1->getCell('A4')\n            ->getHyperlink()\n            ->setUrl('#A101');\n\n        $robj = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet0 = $robj->setActiveSheetIndex(0);\n        self::assertSame('sheet://#A100', $sheet0->getCell('A1')->getHyperlink()->getUrl());\n        self::assertSame('sheet://#Second!A100', $sheet0->getCell('A2')->getHyperlink()->getUrl());\n        self::assertSame('http://example.com', $sheet0->getCell('A3')->getHyperlink()->getUrl());\n        self::assertSame('sheet://#A101', $sheet0->getCell('A4')->getHyperlink()->getUrl());\n        $robj->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue2082Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as Writer;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue2082Test extends TestCase\n{\n    public function testBoolWrite(): void\n    {\n        // Problem writing boolean function values is detected only when\n        // opening spreadsheet in Excel 2007-2016. Test verifies that\n        // value field is written correctly for those versions.\n        $outputFilename = File::temporaryFilename();\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->fromArray(['A', 'B', 'C', 'D']);\n        $worksheet->getCell('A2')->setValue('=A1<>\"A\"');\n        $worksheet->getCell('A3')->setValue('=A1=\"A\"');\n        $worksheet->getCell('B2')->setValue('=LEFT(B1, 0)');\n        $worksheet->getCell('B3')->setValue('=B2=\"\"');\n\n        $writer = new Writer($spreadsheet);\n        $writer->save($outputFilename);\n        $zipfile = \"zip://$outputFilename#xl/worksheets/sheet1.xml\";\n        $contents = file_get_contents($zipfile);\n        unlink($outputFilename);\n        if ($contents === false) {\n            self::fail('Unable to open file');\n        } else {\n            self::assertStringContainsString('<c r=\"A2\" t=\"b\"><f>A1&lt;&gt;&quot;A&quot;</f><v>0</v></c>', $contents);\n            self::assertStringContainsString('<c r=\"A3\" t=\"b\"><f>A1=&quot;A&quot;</f><v>1</v></c>', $contents);\n            self::assertStringContainsString('<c r=\"B2\" t=\"str\"><f>LEFT(B1, 0)</f><v></v></c>', $contents);\n            self::assertStringContainsString('<c r=\"B3\" t=\"b\"><f>B2=&quot;&quot;</f><v>1</v></c>', $contents);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue2266Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as Reader;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue2266Test extends AbstractFunctional\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerType')]\n    public function testIssue2266(string $type): void\n    {\n        // Problem deleting sheet containing local defined name.\n        $reader = new Reader();\n        $spreadsheet = $reader->load('tests/data/Writer/XLSX/issue.2266f.xlsx');\n        self::assertCount(2, $spreadsheet->getAllSheets());\n        self::assertCount(1, $spreadsheet->getDefinedNames());\n        $index = 1;\n        $sheet = $spreadsheet->getSheet($index);\n        self::assertSame('Sheet2', $sheet->getTitle());\n        $definedName = $spreadsheet->getDefinedName('LocalName', $sheet);\n        self::assertNotNull($definedName);\n        self::assertTrue($definedName->getLocalOnly());\n        $spreadsheet->removeSheetByIndex($index);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertCount(1, $reloadedSpreadsheet->getAllSheets());\n        self::assertCount(0, $reloadedSpreadsheet->getDefinedNames());\n        self::assertNotEquals('Sheet2', $reloadedSpreadsheet->getSheet(0)->getTitle());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerType(): array\n    {\n        return [\n            ['Xlsx'],\n            ['Xls'],\n            ['Ods'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue2368Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataValidation;\nuse PhpOffice\\PhpSpreadsheet\\IOFactory;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as Writer;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue2368Test extends AbstractFunctional\n{\n    public function testBoolWrite(): void\n    {\n        // DataValidations were incorrectly written twice.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $validation = $sheet->getDataValidation('A1:A10');\n        $validation->setType(DataValidation::TYPE_LIST);\n        $validation->setShowDropDown(true);\n        $validation->setFormula1('\"Option 1, Option 2\"');\n\n        $outputFilename = File::temporaryFilename();\n        $writer = new Writer($spreadsheet);\n        $writer->save($outputFilename);\n        $zipfile = \"zip://$outputFilename#xl/worksheets/sheet1.xml\";\n        $contents = file_get_contents($zipfile);\n        unlink($outputFilename);\n        $spreadsheet->disconnectWorksheets();\n        if ($contents === false) {\n            self::fail('Unable to open file');\n        } else {\n            self::assertSame(0, substr_count($contents, '<extLst>'));\n            self::assertSame(2, substr_count($contents, 'dataValidations')); // start and end tags\n        }\n    }\n\n    public function testMultipleRange(): void\n    {\n        // DataValidations which were identical except for sqref were incorrectly merged.\n        $filename = 'tests/data/Writer/XLSX/issue.2368new.xlsx';\n        $reader = IOFactory::createReader('Xlsx');\n        $spreadsheet = $reader->load($filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $validations = $sheet->getDataValidationCollection();\n        self::assertSame(['A1:A5 A10:A14 A20:A24'], array_keys($validations));\n        self::assertSame('\"yes,no\"', $sheet->getCell('A3')->getDataValidation()->getFormula1());\n        self::assertSame('\"yes,no\"', $sheet->getCell('A10')->getDataValidation()->getFormula1());\n        self::assertSame('\"yes,no\"', $sheet->getCell('A24')->getDataValidation()->getFormula1());\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet2 = $reloadedSpreadsheet->getActiveSheet();\n        $validation2 = $sheet2->getDataValidationCollection();\n        self::assertSame(['A1:A5 A10:A14 A20:A24'], array_keys($validation2));\n        self::assertSame('\"yes,no\"', $sheet2->getCell('A3')->getDataValidation()->getFormula1());\n        self::assertSame('\"yes,no\"', $sheet2->getCell('A10')->getDataValidation()->getFormula1());\n        self::assertSame('\"yes,no\"', $sheet2->getCell('A24')->getDataValidation()->getFormula1());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue3443Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue3443Test extends AbstractFunctional\n{\n    public function testNonDefaultAlign(): void\n    {\n        // Issue 3443 - default alignment not honored.\n        $spreadsheet = new Spreadsheet();\n        $styleArray = [\n            'alignment' => [\n                'horizontal' => Alignment::HORIZONTAL_CENTER,\n                'vertical' => Alignment::VERTICAL_CENTER,\n                'wrapText' => true,\n            ],\n            'font' => [\n                'name' => 'Courier New',\n            ],\n        ];\n        $spreadsheet->getDefaultStyle()->applyFromArray($styleArray);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(2);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getStyle('A2')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);\n        $sheet->getStyle('A3')->getFont()->setName('Tahoma');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $expected1 = [\n            'horizontal' => 'center',\n            'justifyLastLine' => null,\n            'indent' => 0,\n            'readOrder' => 0,\n            'shrinkToFit' => false,\n            'textRotation' => 0,\n            'vertical' => 'center',\n            'wrapText' => true,\n        ];\n        self::assertSame($expected1, $rsheet->getStyle('A1')->getAlignment()->exportArray());\n        $expected2 = $expected1;\n        $expected2['horizontal'] = 'left';\n        self::assertSame($expected2, $rsheet->getStyle('A2')->getAlignment()->exportArray());\n        self::assertSame($expected1, $rsheet->getStyle('A3')->getAlignment()->exportArray());\n        self::assertSame('Courier New', $rsheet->getStyle('A1')->getFont()->getName());\n        self::assertSame('Courier New', $rsheet->getStyle('A2')->getFont()->getName());\n        self::assertSame('Tahoma', $rsheet->getStyle('A3')->getFont()->getName());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefaultAlign(): void\n    {\n        // Issue 3443 - default alignment not honored.\n        $spreadsheet = new Spreadsheet();\n        $styleArray = [\n            'font' => [\n                'name' => 'Courier New',\n            ],\n        ];\n        $spreadsheet->getDefaultStyle()->applyFromArray($styleArray);\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue(1);\n        $sheet->getCell('A2')->setValue(2);\n        $sheet->getCell('A3')->setValue(3);\n        $sheet->getStyle('A2')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);\n        $sheet->getStyle('A3')->getFont()->setName('Tahoma');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $expected1 = [\n            'horizontal' => 'general',\n            'justifyLastLine' => null,\n            'indent' => 0,\n            'readOrder' => 0,\n            'shrinkToFit' => false,\n            'textRotation' => 0,\n            'vertical' => 'bottom',\n            'wrapText' => false,\n        ];\n        self::assertSame($expected1, $rsheet->getStyle('A1')->getAlignment()->exportArray());\n        $expected2 = $expected1;\n        $expected2['horizontal'] = 'left';\n        self::assertSame($expected2, $rsheet->getStyle('A2')->getAlignment()->exportArray());\n        self::assertSame($expected1, $rsheet->getStyle('A3')->getAlignment()->exportArray());\n        self::assertSame('Courier New', $rsheet->getStyle('A1')->getFont()->getName());\n        self::assertSame('Courier New', $rsheet->getStyle('A2')->getFont()->getName());\n        self::assertSame('Tahoma', $rsheet->getStyle('A3')->getFont()->getName());\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testReadOrder(): void\n    {\n        $mixedString = 'xאבy'; // both LTR and RTL characters\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        // Following Cells will display differently depending on read order.\n        // PhpSpreadsheet will not show any differences, but Excel will.\n        $sheet->getCell('A1')->setValue($mixedString);\n        $sheet->getCell('A2')->setValue($mixedString);\n        $sheet->getCell('A3')->setValue($mixedString);\n        $sheet->getStyle('A2')->getAlignment()\n            ->setReadOrder(Alignment::READORDER_LTR);\n        $sheet->getStyle('A3')->getAlignment()\n            ->setReadOrder(Alignment::READORDER_RTL);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame($mixedString, $rsheet->getCell('A1')->getFormattedValue());\n        self::assertSame($mixedString, $rsheet->getCell('A2')->getFormattedValue());\n        self::assertSame($mixedString, $rsheet->getCell('A3')->getFormattedValue());\n        self::assertSame(\n            Alignment::READORDER_CONTEXT,\n            $rsheet->getStyle('A1')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_LTR,\n            $rsheet->getStyle('A2')->getAlignment()->getReadOrder()\n        );\n        self::assertSame(\n            Alignment::READORDER_RTL,\n            $rsheet->getStyle('A3')->getAlignment()->getReadOrder()\n        );\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue3711Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue3711Test extends AbstractFunctional\n{\n    public function testIssue3711(): void\n    {\n        // Issue 3711 - float being used as index in StringTable.\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('21.5');\n        self::assertSame(21.5, $sheet->getCell('A1')->getValue());\n        $sheet->getCell('A1')->setDataType(DataType::TYPE_STRING);\n        $sheet->getCell('A2')->setValue('21');\n        self::assertSame(21, $sheet->getCell('A2')->getValue());\n        $sheet->getCell('A2')->setDataType(DataType::TYPE_STRING);\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('21.5', $rsheet->getCell('A1')->getValue());\n        self::assertSame('21', $rsheet->getCell('A2')->getValue());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue3843Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue3843Test extends AbstractFunctional\n{\n    private const DIRECTORY = 'tests/data/Writer/XLSX/';\n    private const TEMPLATE = self::DIRECTORY . 'issue.3843a.template.xlsx';\n    private const IMAGE = self::DIRECTORY . 'issue.3843a.jpg';\n\n    public function testPreliminaries(): void\n    {\n        $file = 'zip://';\n        $file .= self::TEMPLATE;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        // confirm that file contains expected namespaced xml tag\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString('<drawing r:id=\"rId2\"/>', $data);\n        }\n    }\n\n    public function testUnusedDrawingsInOriginal(): void\n    {\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load(self::TEMPLATE);\n        $sheet = $spreadsheet->getActiveSheet();\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(0, $drawings);\n        $drawing = new Drawing();\n        $drawing->setName('TestDrawing');\n        $drawing->setPath(self::IMAGE);\n        $drawing->setCoordinates('A2');\n        $drawing->setWidth(100);\n        $drawing->setHeight(100);\n        $drawing->setResizeProportional(false);\n        $drawing->setWorksheet($sheet);\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $drawings = $reloadedSpreadsheet->getActiveSheet()->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing = $drawings[0];\n        self::assertSame('TestDrawing', $drawing?->getName());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue3951Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue3951Test extends AbstractFunctional\n{\n    #[\\PHPUnit\\Framework\\Attributes\\DataProvider('providerType')]\n    public function testIssue2266(string $type): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setTitle('sorttrue');\n        $sheet->getCell('A1')->setValue(10);\n        $sheet->getCell('A2')->setValue(5);\n        $sheet->getCell('B1')->setValue(15);\n        $protection = $sheet->getProtection();\n        $protection->setPassword('testpassword');\n        $protection->setSheet(true);\n        $protection->setInsertRows(true);\n        $protection->setFormatCells(true);\n        $protection->setObjects(true);\n        $protection->setAutoFilter(false);\n        $protection->setSort(true);\n\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setTitle('sortfalse');\n        $sheet->getCell('A1')->setValue(10);\n        $sheet->getCell('A2')->setValue(5);\n        $sheet->getCell('B1')->setValue(15);\n        $protection = $sheet->getProtection();\n        $protection->setPassword('testpassword');\n        $protection->setSheet(true);\n        $protection->setInsertRows(true);\n        $protection->setFormatCells(true);\n        $protection->setObjects(true);\n        $protection->setAutoFilter(false);\n        $protection->setSort(false);\n\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setTitle('sortfalsenocolpw');\n        $sheet->getCell('A1')->setValue(10);\n        $sheet->getCell('A2')->setValue(5);\n        $sheet->getCell('C1')->setValue(15);\n        $protection = $sheet->getProtection();\n        $protection->setPassword('testpassword');\n        $protection->setSheet(true);\n        $protection->setInsertRows(true);\n        $protection->setFormatCells(true);\n        $protection->setObjects(true);\n        $protection->setAutoFilter(false);\n        $protection->setSort(false);\n        $sheet->protectCells('A:A');\n\n        $sheet = $spreadsheet->createSheet();\n        $sheet->setTitle('sortfalsecolpw');\n        $sheet->getCell('A1')->setValue(10);\n        $sheet->getCell('A2')->setValue(5);\n        $sheet->getCell('C1')->setValue(15);\n        $protection = $sheet->getProtection();\n        $protection->setPassword('testpassword');\n        $protection->setSheet(true);\n        $protection->setInsertRows(true);\n        $protection->setFormatCells(true);\n        $protection->setObjects(true);\n        $protection->setAutoFilter(false);\n        $protection->setSort(false);\n        $sheet->protectCells('A:A', 'sortpw', false, 'sortrange');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $type);\n        $spreadsheet->disconnectWorksheets();\n\n        self::assertCount(4, $reloadedSpreadsheet->getAllSheets());\n\n        $rsheet1 = $reloadedSpreadsheet->getSheetByNameOrThrow('sorttrue');\n        $protection = $rsheet1->getProtection();\n        self::assertNotEquals('', $protection->getPassword());\n        self::assertTrue($protection->getSort());\n        self::assertEmpty($rsheet1->getProtectedCellRanges());\n\n        $rsheet2 = $reloadedSpreadsheet->getSheetByNameOrThrow('sortfalse');\n        $protection = $rsheet2->getProtection();\n        self::assertNotEquals('', $protection->getPassword());\n        self::assertFalse($protection->getSort());\n        self::assertEmpty($rsheet2->getProtectedCellRanges());\n\n        $rsheet3 = $reloadedSpreadsheet->getSheetByNameOrThrow('sortfalsenocolpw');\n        $protection = $rsheet3->getProtection();\n        self::assertNotEquals('', $protection->getPassword());\n        self::assertFalse($protection->getSort());\n        $maxRow = ($type === 'Xlsx') ? 1048576 : 65536;\n        $testKey = \"A1:A$maxRow\";\n        $protectedCells = $rsheet3->getProtectedCellRanges();\n        self::assertCount(1, $protectedCells);\n        self::assertArrayHasKey($testKey, $protectedCells);\n        self::assertSame('', $protectedCells[$testKey]->getPassword());\n\n        $rsheet4 = $reloadedSpreadsheet->getSheetByNameOrThrow('sortfalsecolpw');\n        $protection = $rsheet4->getProtection();\n        self::assertNotEquals('', $protection->getPassword());\n        self::assertFalse($protection->getSort());\n        $maxRow = ($type === 'Xlsx') ? 1048576 : 65536;\n        $testKey = \"A1:A$maxRow\";\n        $protectedCells = $rsheet4->getProtectedCellRanges();\n        self::assertCount(1, $protectedCells);\n        self::assertArrayHasKey($testKey, $protectedCells);\n        self::assertNotEquals('', $protectedCells[$testKey]->getPassword());\n        if ($type === 'Xlsx') {\n            self::assertSame('sortrange', $protectedCells[$testKey]->getName());\n        }\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public static function providerType(): array\n    {\n        return [\n            ['Xlsx'],\n            ['Xls'],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue3988Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue3988Test extends TestCase\n{\n    public function testIssue3988(): void\n    {\n        // code liberally borrowed from samples/Table/01_Table\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->setActiveSheetIndex(0);\n        $spreadsheet->getActiveSheet()->setCellValue('A1', 'Year')\n            ->setCellValue('B1', 'Quarter')\n            ->setCellValue('C1', 'Country')\n            ->setCellValue('D1', 'Sales');\n\n        $dataArray = [\n            ['2010', 'Q1', 'United States', 790],\n            ['2010', 'Q2', 'United States', 730],\n            ['2010', 'Q3', 'United States', 860],\n            ['2010', 'Q4', 'United States', 850],\n            ['2011', 'Q1', 'United States', 800],\n            ['2011', 'Q2', 'United States', 700],\n            ['2011', 'Q3', 'United States', 900],\n            ['2011', 'Q4', 'United States', 950],\n            ['2010', 'Q1', 'Belgium', 380],\n            ['2010', 'Q2', 'Belgium', 390],\n            ['2010', 'Q3', 'Belgium', 420],\n            ['2010', 'Q4', 'Belgium', 460],\n            ['2011', 'Q1', 'Belgium', 400],\n            ['2011', 'Q2', 'Belgium', 350],\n            ['2011', 'Q3', 'Belgium', 450],\n            ['2011', 'Q4', 'Belgium', 500],\n            ['2010', 'Q1', 'UK', 690],\n            ['2010', 'Q2', 'UK', 610],\n            ['2010', 'Q3', 'UK', 620],\n            ['2010', 'Q4', 'UK', 600],\n            ['2011', 'Q1', 'UK', 720],\n            ['2011', 'Q2', 'UK', 650],\n            ['2011', 'Q3', 'UK', 580],\n            ['2011', 'Q4', 'UK', 510],\n            ['2010', 'Q1', 'France', 510],\n            ['2010', 'Q2', 'France', 490],\n            ['2010', 'Q3', 'France', 460],\n            ['2010', 'Q4', 'France', 590],\n            ['2011', 'Q1', 'France', 620],\n            ['2011', 'Q2', 'France', 650],\n            ['2011', 'Q3', 'France', 415],\n            ['2011', 'Q4', 'France', 570],\n        ];\n        $spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A2');\n\n        $table = new Table('A1:D33', 'Sales_Data');\n\n        // Create Columns\n        $table->getColumn('D')->setShowFilterButton(false);\n        $table->getAutoFilter()->getColumn('A')\n            ->setFilterType(AutoFilter\\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)\n            ->createRule()\n            ->setRule(AutoFilter\\Column\\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 2011)\n            ->setRuleType(AutoFilter\\Column\\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);\n\n        $spreadsheet->getActiveSheet()->addTable($table);\n\n        $outfile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($outfile);\n        $spreadsheet->disconnectWorksheets();\n\n        // Make sure Reader handles row visibility properly.\n        $reader = new XlsxReader();\n        $spreadsheet2 = $reader->load($outfile);\n        self::assertFalse($spreadsheet2->getActiveSheet()->getRowDimension(5)->getVisible());\n        self::assertTrue($spreadsheet2->getActiveSheet()->getRowDimension(6)->getVisible());\n        $spreadsheet2->disconnectWorksheets();\n\n        // Make sure filterColumn tags are children of autoFilter.\n        $file = 'zip://';\n        $file .= $outfile;\n        $file .= '#xl/tables/table1.xml';\n        $data = file_get_contents($file);\n        unlink($outfile);\n        $expected = '<autoFilter ref=\"A1:D33\">'\n            . '<filterColumn colId=\"0\">'\n            . '<customFilters>'\n            . '<customFilter operator=\"greaterThanOrEqual\" val=\"2011\"/>'\n            . '</customFilters>'\n            . '</filterColumn>'\n            . '<filterColumn colId=\"3\" hiddenButton=\"1\"/>'\n            . '</autoFilter>';\n        self::assertStringContainsString($expected, $data);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue4025Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Alignment;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Conditional;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Fill;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4025Test extends TestCase\n{\n    private static function merge(Worksheet $sheet, string $start, string $end): void\n    {\n        $sheet->mergeCells(\"$start:$end\");\n        $sheet->getStyle($start)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $sheet->getStyle($start)->getAlignment()->setVertical(Alignment::VERTICAL_CENTER);\n    }\n\n    public function testIssue4025(): void\n    {\n        // Writing alignment in conditional style caused weirdness\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setRightToLeft(true);\n        $sheet->setCellValue('E1', 'אושר עד');\n        $sheet->setCellValue('M1', 'ויקטורי');\n        $sheet->setCellValue('E2', '2024-05-01');\n        $sheet->setCellValue('H2', '2024-05-12');\n        $sheet->setCellValue('M2', '2024-05-01');\n        $sheet->setCellValue('P2', '2024-05-12');\n        $sheet->setCellValue('A3', 'ברקוד');\n        $sheet->setCellValue('B3', 'תיאור מוצר');\n        $sheet->setCellValue('C3', 'קטגוריה');\n        $sheet->setCellValue('D3', 'יצרן');\n        $sheet->setCellValue('E3', 'מחיר');\n        $sheet->setCellValue('F3', 'מבצע');\n        $sheet->setCellValue('G3', 'קובע');\n        $sheet->setCellValue('H3', 'מחיר');\n        $sheet->setCellValue('I3', 'מבצע');\n        $sheet->setCellValue('J3', 'קובע');\n        $sheet->setCellValue('K3', 'הפרש ב-₪');\n        $sheet->setCellValue('L3', 'הפרש ב-₪');\n        $sheet->setCellValue('M3', 'מחיר');\n        $sheet->setCellValue('N3', 'מבצע');\n        $sheet->setCellValue('O3', 'קובע');\n        $sheet->setCellValue('P3', 'מחיר');\n        $sheet->setCellValue('Q3', 'מבצע');\n        $sheet->setCellValue('R3', 'קובע');\n        $sheet->setCellValue('S3', 'הפרש ב-₪');\n        $sheet->setCellValue('T3', 'הפרש ב-₪');\n        $sheet->setCellValue('A4', '7290010945306');\n        $sheet->setCellValue('B4', 'חלב טרי בקרטון 3% בד\"צ טרה 2 ליטר');\n        $sheet->setCellValue('C4', 'חלב טרי');\n        $sheet->setCellValue('D4', 'החברה המרכזית ל.מ.ק - טרה');\n\n        $sheet->setCellValue('E4', 13.50);\n        $sheet->setCellValue('F4', '-');\n        //$sheet->setCellValue('G4', 13.50);\n        $sheet->setCellValue('G4', 14.70);\n        $sheet->setCellValue('H4', 14.20);\n        $sheet->setCellValue('I4', '-');\n        $sheet->setCellValue('J4', 14.20);\n        $sheet->setCellValue('K4', 0.70);\n        $sheet->setCellValue('L4', 0.0519);\n        $sheet->setCellValue('M4', 13.62);\n        $sheet->setCellValue('N4', '-');\n        $sheet->setCellValue('O4', 13.62);\n        $sheet->setCellValue('P4', 14.22);\n        $sheet->setCellValue('Q4', '-');\n        $sheet->setCellValue('R4', 14.22);\n        $sheet->setCellValue('S4', 0.60);\n        $sheet->setCellValue('T4', 0.0441);\n\n        $sheet->setCellValue('E10', '=SUM(G4:G10)');\n        $sheet->setCellValue('H10', '=SUM(J4:J10)');\n        $sheet->setCellValue('K10', '=COUNTIF(K4:K9,\">0\")');\n        $sheet->setCellValue('M10', '=SUM(O4:O10)');\n        $sheet->setCellValue('P10', '=SUM(R4:R10)');\n        $sheet->setCellValue('S10', '=COUNTIF(S4:S9,\">0\")');\n        $sheet->setCellValue('H11', '=(SUM(J4:J10) / SUM(G4:G10) - 1)');\n        $sheet->setCellValue('K11', '=COUNTIF(K4:K9,\"<0\")');\n        $sheet->setCellValue('P11', '=(SUM(R4:R10) / SUM(O4:O10) - 1)');\n        $sheet->setCellValue('S11', '=COUNTIF(S4:S9,\"<0\")');\n\n        $sheet->setAutoFilter('A3:T3');\n        self::merge($sheet, 'E1', 'L1');\n        self::merge($sheet, 'E2', 'G2');\n        self::merge($sheet, 'H2', 'J2');\n        self::merge($sheet, 'K2', 'L2');\n        self::merge($sheet, 'M1', 'T1');\n        self::merge($sheet, 'M2', 'O2');\n        self::merge($sheet, 'P2', 'R2');\n        self::merge($sheet, 'S2', 'T2');\n        self::merge($sheet, 'E10', 'G10');\n        self::merge($sheet, 'H10', 'J10');\n        self::merge($sheet, 'H11', 'J11');\n        self::merge($sheet, 'M10', 'O10');\n        self::merge($sheet, 'P10', 'R10');\n        self::merge($sheet, 'P11', 'R11');\n        self::merge($sheet, 'K10', 'L10');\n        self::merge($sheet, 'K11', 'L11');\n        self::merge($sheet, 'S10', 'T10');\n        self::merge($sheet, 'S11', 'T11');\n\n        $sheet->getStyle('E4:K8')->getNumberFormat()->setFormatCode('0.00');\n        $sheet->getStyle('L4:L8')->getNumberFormat()->setFormatCode('0.00%');\n        $sheet->getStyle('M4:S8')->getNumberFormat()->setFormatCode('0.00');\n        $sheet->getStyle('T4:T8')->getNumberFormat()->setFormatCode('0.00%');\n        $sheet->getStyle('P10')->getNumberFormat()->setFormatCode('0.00');\n        $sheet->getStyle('P11')->getNumberFormat()->setFormatCode('0.00%');\n        $sheet->getStyle('H1')->getNumberFormat()->setFormatCode('0.00');\n        $sheet->getStyle('H11')->getNumberFormat()->setFormatCode('0.00%');\n\n        $center = [\n            'alignment' => ['horizontal' => Alignment::HORIZONTAL_CENTER],\n        ];\n        $pink = [\n            'alignment' => ['horizontal' => Alignment::HORIZONTAL_CENTER, 'vertical' => Alignment::VERTICAL_CENTER],\n            'font' => ['color' => ['rgb' => 'FF0000']],\n            'fill' => ['fillType' => Fill::FILL_SOLID, 'endColor' => ['argb' => 'FFFFE5E8'], 'startColor' => ['argb' => 'FFFFE5E8']],\n        ];\n        $green = [\n            'alignment' => ['horizontal' => Alignment::HORIZONTAL_CENTER, 'vertical' => Alignment::VERTICAL_CENTER],\n            'font' => ['color' => ['rgb' => '339966']],\n            'fill' => ['fillType' => Fill::FILL_SOLID, 'endColor' => ['argb' => 'ffccffcc'], 'startColor' => ['argb' => 'ffccffcc']],\n        ];\n        //$sheet->getStyle('E4:T8')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n        $sheet->getStyle('E4:T8')->applyFromArray($center);\n        $sheet->getStyle('H4')->applyFromArray($pink);\n        $sheet->getStyle('J4:L4')->applyFromArray($pink);\n        $sheet->getStyle('P4')->applyFromArray($pink);\n        $sheet->getStyle('R4:T4')->applyFromArray($pink);\n        $sheet->getStyle('K10')->applyFromArray($pink);\n        $sheet->getStyle('S10')->applyFromArray($pink);\n        $sheet->getStyle('K11')->applyFromArray($green);\n        $sheet->getStyle('S11')->applyFromArray($green);\n\n        $condition1a = new Conditional();\n        $condition1a->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition1a->addCondition('$H$10 < $E$10');\n        $condition1a->getStyle()->applyFromArray($green);\n        $condition1b = new Conditional();\n        $condition1b->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition1b->addCondition('$H$10 > $E$10');\n        $condition1b->getStyle()->applyFromArray($pink);\n        $conditionalStyles = [$condition1a, $condition1b];\n        $sheet->getStyle('H10:H11')->setConditionalStyles($conditionalStyles);\n\n        $condition2a = new Conditional();\n        $condition2a->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition2a->addCondition('$P$10 < $M$10');\n        $condition2a->getStyle()->applyFromArray($green);\n        $condition2b = new Conditional();\n        $condition2b->setConditionType(Conditional::CONDITION_EXPRESSION);\n        $condition2b->addCondition('$P$10 > $M$10');\n        $condition2b->getStyle()->applyFromArray($pink);\n        $conditionalStyles2 = [$condition2a, $condition2b];\n        $sheet->getStyle('P10:P11')->setConditionalStyles($conditionalStyles2);\n\n        $sheet->setSelectedCells('A1');\n        $writer = new XlsxWriter($spreadsheet);\n\n        $writer->getStylesConditionalHashTable()->addFromSource($writer->getWriterPartStyle()->allConditionalStyles($spreadsheet));\n        $writerStyle = new XlsxWriter\\Style($writer);\n        $data = $writerStyle->writeStyles($spreadsheet);\n        $spreadsheet->disconnectWorksheets();\n\n        $preg = preg_match('~<dxfs.*</dxfs>~ms', $data, $matches);\n        if ($preg !== 1) {\n            self::fail('preg failed');\n        } else {\n            self::assertStringContainsString('<font', $matches[0]);\n            self::assertStringContainsString('<fill', $matches[0]);\n            self::assertStringNotContainsString('<align', $matches[0]);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue4179Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass Issue4179Test extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    public function testIssue4179(): void\n    {\n        // duplicate entry in ContentTypes\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $imageFile = 'tests/data/Writer/XLSX/backgroundtest.png';\n        $image = (string) file_get_contents($imageFile);\n        $sheet->setBackgroundImage($image);\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        $drawing->setCoordinates('A1');\n        $drawing->setWorksheet($sheet);\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $zip = new ZipArchive();\n        $open = $zip->open($this->outputFile, ZipArchive::RDONLY);\n        $pngCount = 0;\n        if ($open !== true) {\n            self::fail(\"zip open failed for {$this->outputFile}\");\n        } else {\n            $contents = (string) $zip->getFromName('[Content_Types].xml');\n            $subCount = substr_count($contents, '\"png\"');\n            self::assertSame(1, $subCount);\n            for ($i = 0; $i < $zip->numFiles; ++$i) {\n                $filename = (string) $zip->getNameIndex($i);\n                if (preg_match('~^xl/media/\\w+[.]png$~', $filename) === 1) {\n                    ++$pngCount;\n                }\n            }\n        }\n        self::assertSame(2, $pngCount);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue4200Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass Issue4200Test extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    public function testIssue4200(): void\n    {\n        // ignoredErrors came after legacyDrawing\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValueExplicit('01', DataType::TYPE_STRING);\n        $sheet->getCell('A1')\n            ->getIgnoredErrors()\n            ->setNumberStoredAsText(true);\n        $richText = new RichText();\n        $richText->createText('hello');\n        $sheet->getComment('C1')\n            ->setText($richText);\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $zip = new ZipArchive();\n        $open = $zip->open($this->outputFile, ZipArchive::RDONLY);\n        if ($open !== true) {\n            self::fail(\"zip open failed for {$this->outputFile}\");\n        } else {\n            $contents = (string) $zip->getFromName('xl/worksheets/sheet1.xml');\n            self::assertStringContainsString(\n                '<ignoredErrors><ignoredError sqref=\"A1\" numberStoredAsText=\"1\"/></ignoredErrors><legacyDrawing r:id=\"rId_comments_vml1\"/>',\n                $contents\n            );\n        }\n    }\n\n    public function testIssue4145(): void\n    {\n        // ignoredErrors came after drawing\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValueExplicit('01', DataType::TYPE_STRING);\n        $sheet->getCell('A1')\n            ->getIgnoredErrors()\n            ->setNumberStoredAsText(true);\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        $drawing->setCoordinates('C1');\n        $drawing->setWorksheet($sheet);\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $zip = new ZipArchive();\n        $open = $zip->open($this->outputFile, ZipArchive::RDONLY);\n        if ($open !== true) {\n            self::fail(\"zip open failed for {$this->outputFile}\");\n        } else {\n            $contents = (string) $zip->getFromName('xl/worksheets/sheet1.xml');\n            self::assertStringContainsString(\n                '<ignoredErrors><ignoredError sqref=\"A1\" numberStoredAsText=\"1\"/></ignoredErrors><drawing r:id=\"rId1\"/>',\n                $contents\n            );\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue4269Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4269Test extends TestCase\n{\n    private string $outputFile = '';\n\n    private static bool $alwaysFalse = false;\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    #[DataProvider('validationProvider')]\n    public function testWriteArrayFormulaTextJoin(\n        bool $preCalculateFormulas,\n        ?bool $forceFullCalc,\n        string $expected\n    ): void {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', '=A2*2');\n        $sheet->setCellValue('A2', 0);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->setForceFullCalc($forceFullCalc);\n        $this->outputFile = File::temporaryFilename();\n        if ($preCalculateFormulas) {\n            $writer->save($this->outputFile);\n        } else {\n            $writer->save($this->outputFile, XlsxWriter::DISABLE_PRECALCULATE_FORMULAE);\n        }\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/workbook.xml';\n        $data = file_get_contents($file);\n        if ($data === false) {\n            self::fail('Unable to read file');\n        } else {\n            self::assertStringContainsString($expected, $data);\n        }\n    }\n\n    /** @return array<string, array<int, mixed>> */\n    public static function validationProvider(): array\n    {\n        return [\n            'normal case' => [true, null, 'calcMode=\"auto\" calcCompleted=\"1\" fullCalcOnLoad=\"0\" forceFullCalc=\"0\"'],\n            'issue 456' => [false, null, 'calcMode=\"auto\" calcCompleted=\"0\" fullCalcOnLoad=\"1\" forceFullCalc=\"1\"'],\n            'better choice for no precalc' => [false, false, 'calcMode=\"auto\" calcCompleted=\"0\" fullCalcOnLoad=\"1\" forceFullCalc=\"0\"'],\n            'unlikely use case' => [true, true, 'calcMode=\"auto\" calcCompleted=\"1\" fullCalcOnLoad=\"0\" forceFullCalc=\"1\"'],\n        ];\n    }\n\n    public function testDefault(): void\n    {\n        self::assertSame(self::$alwaysFalse, XlsxWriter::DEFAULT_FORCE_FULL_CALC);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue4537Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\TextElement;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4537Test extends TestCase\n{\n    private string $outputFilename = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFilename !== '') {\n            unlink($this->outputFilename);\n            $this->outputFilename = '';\n        }\n    }\n\n    public function testBackgroundImage(): void\n    {\n        $this->outputFilename = File::temporaryFilename();\n        $testString = \"\\\"He\\\": '<?>'\";\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValueExplicit($testString, DataType::TYPE_INLINE);\n        $sheet->getCell('A2')->setValue($testString);\n        $richText = new RichText();\n        $richText->addText(new TextElement($testString));\n        $sheet->getCell('A3')->setValue($richText);\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($this->outputFilename);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $reloadedSpreadsheet = $reader->load($this->outputFilename);\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame($testString, $rsheet->getCell('A1')->getValueString());\n        self::assertSame($testString, $rsheet->getCell('A2')->getValueString());\n        self::assertSame($testString, $rsheet->getCell('A3')->getValueString());\n        $reloadedSpreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFilename;\n        $file .= '#xl/worksheets/sheet1.xml';\n        $data = file_get_contents($file);\n        // expected, and expected1/2 below, do not escape apostrophes\n        $expected = 't=\"inlineStr\"><is><t>&quot;He&quot;: \\'&lt;?&gt;\\'</t></is>';\n        if ($data === false) {\n            self::fail('Unable to read worksheets file');\n        } else {\n            self::assertStringContainsString($expected, $data, 'inline string');\n        }\n\n        $file = 'zip://';\n        $file .= $this->outputFilename;\n        $file .= '#xl/sharedStrings.xml';\n        $data = file_get_contents($file);\n        $expected1 = '<t>&quot;He&quot;: \\'&lt;?&gt;\\'</t>';\n        $expected2 = '<t xml:space=\"preserve\">&quot;He&quot;: \\'&lt;?&gt;\\'</t>';\n        if ($data === false) {\n            self::fail('Unable to read sharedStrings file');\n        } else {\n            self::assertStringContainsString($expected1, $data, 'string');\n            self::assertStringContainsString($expected2, $data, 'rich text');\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue4542Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue4542Test extends TestCase\n{\n    public function testXmlSpace(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $string = ' Ye&ar ';\n        $trimString = trim($string);\n        $sheet->getCell('A1')->setValue($string);\n        $sheet->getCell('A2')->setValueExplicit($string, DataType::TYPE_INLINE);\n        $sheet->getCell('B1')->setValue($trimString);\n        $sheet->getCell('B2')->setValueExplicit($trimString, DataType::TYPE_INLINE);\n        $writer = new XlsxWriter($spreadsheet);\n\n        $writer->createStyleDictionaries();\n        $writerStyle = new XlsxWriter\\Style($writer);\n        $data = $writerStyle->writeStyles($spreadsheet);\n        self::assertStringContainsString(\n            '<styleSheet',\n            $data\n        );\n        self::assertStringNotContainsString(\n            'xml:space',\n            $data\n        );\n\n        $writerWorkbook = new XlsxWriter\\Workbook($writer);\n        $data = $writerWorkbook->writeWorkbook($spreadsheet);\n        self::assertStringContainsString(\n            '<workbook',\n            $data\n        );\n        self::assertStringNotContainsString(\n            'xml:space',\n            $data\n        );\n\n        $stringTable = $writer->createStringTable();\n        $writerStringTable = new XlsxWriter\\StringTable($writer);\n        $data = $writerStringTable->writeStringTable($stringTable);\n        self::assertStringContainsString(\n            '<si><t xml:space=\"preserve\"> Ye&amp;ar </t></si>',\n            $data\n        );\n        self::assertStringContainsString(\n            '<si><t>Ye&amp;ar</t></si>',\n            $data\n        );\n\n        $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString(\n            '<c r=\"A2\" t=\"inlineStr\"><is><t xml:space=\"preserve\"> Ye&amp;ar </t></is></c>',\n            $data\n        );\n        self::assertStringContainsString(\n            '<c r=\"B2\" t=\"inlineStr\"><is><t>Ye&amp;ar</t></is></c>',\n            $data\n        );\n\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testTable(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray(\n            [\n                ['MyCol', 'Colonne2', 'Colonne3'],\n                [10, 20],\n                [2],\n                [3],\n                [4],\n            ],\n            null,\n            'B1',\n            true\n        );\n        $table = new Table('B1:D5', 'Tableau1');\n        $sheet->addTable($table);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writerTable = new XlsxWriter\\Table($writer);\n        $data = $writerTable->writeTable($table, 1);\n\n        self::assertStringContainsString(\n            '<table ',\n            $data\n        );\n        self::assertStringNotContainsString(\n            'xml:space',\n            $data\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue4584Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Exception as PhpSpreadsheetException;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue4584Test extends AbstractFunctional\n{\n    public function testWriteRowDimensions(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getDefaultRowDimension()->setRowHeight(20);\n        $sheet->setCellValue('A1', 'hello there world 1');\n        $sheet->getStyle('A1')->getAlignment()->setWrapText(true);\n        $sheet->getRowDimension(1)->setCustomFormat(true);\n        $sheet->setCellValue('A2', 'hello there world 2');\n        $sheet->setCellValue('A4', 'hello there world 4');\n        $writer = new XlsxWriter($spreadsheet);\n        $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString(\n            '<sheetFormatPr customHeight=\"true\" defaultRowHeight=\"20\" outlineLevelRow=\"0\" outlineLevelCol=\"0\"/>',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"1\" spans=\"1:1\" customFormat=\"1\" ht=\"-1\">',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"2\" spans=\"1:1\" customHeight=\"1\">',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"4\" spans=\"1:1\" customHeight=\"1\">',\n            $data\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWriteRowDimensionsNoCustom(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getDefaultRowDimension()->setRowHeight(20);\n        $sheet->setCellValue('A1', 'hello there world 1');\n        $sheet->getStyle('A1')->getAlignment()->setWrapText(true);\n        //$sheet->getRowDimension(1)->setCustomFormat(true);\n        $sheet->setCellValue('A2', 'hello there world 2');\n        $sheet->setCellValue('A4', 'hello there world 4');\n        $writer = new XlsxWriter($spreadsheet);\n        $writerWorksheet = new XlsxWriter\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString(\n            '<sheetFormatPr customHeight=\"true\" defaultRowHeight=\"20\" outlineLevelRow=\"0\" outlineLevelCol=\"0\"/>',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"1\" spans=\"1:1\">',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"2\" spans=\"1:1\">',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"4\" spans=\"1:1\">',\n            $data\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testWriteAndReadRowDimension(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getDefaultRowDimension()->setRowHeight(20);\n        $sheet->setCellValue('A1', 'hello there world 1');\n        $sheet->getStyle('A1')->getAlignment()->setWrapText(true);\n        $sheet->getRowDimension(1)->setCustomFormat(true);\n        $sheet->setCellValue('A2', 'hello there world 2');\n        $sheet->setCellValue('A4', 'hello there world 4');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $rwriter = new XlsxWriter($reloadedSpreadsheet);\n        $rwriterWorksheet = new XlsxWriter\\Worksheet($rwriter);\n        $data = $rwriterWorksheet->writeWorksheet($rsheet, []);\n        self::assertStringContainsString(\n            '<sheetFormatPr customHeight=\"true\" defaultRowHeight=\"20\" outlineLevelRow=\"0\" outlineLevelCol=\"0\"/>',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"1\" spans=\"1:1\" customFormat=\"1\" ht=\"-1\">',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"2\" spans=\"1:1\" customHeight=\"1\">',\n            $data\n        );\n        self::assertStringContainsString(\n            '<row r=\"4\" spans=\"1:1\" customHeight=\"1\">',\n            $data\n        );\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testBadOutlineLevel(): void\n    {\n        $this->expectException(PhpSpreadsheetException::class);\n        $this->expectExceptionMessage('Outline level must range between 0 and 7.');\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getRowDimension(1)->setOutlineLevel(8);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue476Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue476Test extends AbstractFunctional\n{\n    public function testIssue476(): void\n    {\n        // RichText written in a way usually used only by strings.\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load('tests/data/Writer/XLSX/issue.476.xlsx');\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $richText = $sheet->getCell('A1')->getValue();\n        self::assertInstanceOf(RichText::class, $richText);\n        $plainText = $richText->getPlainText();\n        self::assertSame(\"Art. 1A of the Geneva Refugee Convention and Protocol or other international or national instruments.\\n\", $plainText);\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue484Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooter;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\HeaderFooterDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\SheetView;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass Issue484Test extends AbstractFunctional\n{\n    public function testHeaderFooter(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $headerImage = new HeaderFooterDrawing();\n        $headerImage->setName('Header Logo');\n        $headerImage->setPath('samples/images/blue_square.png');\n        $headerImage->setHeight(12);\n        $footerImage = new HeaderFooterDrawing();\n        $footerImage->setName('Footer Logo');\n        $footerImage->setPath('samples/images/paid.png');\n        $footerImage->setHeight(12);\n\n        $worksheet = $spreadsheet->getActiveSheet();\n        $worksheet->getSheetView()\n            ->setView(SheetView::SHEETVIEW_PAGE_LAYOUT);\n\n        $worksheet->getHeaderFooter()->setDifferentFirst(true);\n        $worksheet->getHeaderFooter()->setFirstHeader('&C&G&R&D');\n        $worksheet->getHeaderFooter()->addImage($headerImage, HeaderFooter::IMAGE_HEADER_CENTER_FIRST);\n\n        $worksheet->getHeaderFooter()->setDifferentOddEven(true);\n        $worksheet->getHeaderFooter()->setEvenHeader('&L&G&R&D');\n        $worksheet->getHeaderFooter()->addImage($headerImage, HeaderFooter::IMAGE_HEADER_LEFT_EVEN);\n        $worksheet->getHeaderFooter()->setEvenFooter('&C&G&R&D');\n        $worksheet->getHeaderFooter()->addImage($footerImage, HeaderFooter::IMAGE_FOOTER_CENTER_EVEN);\n\n        $worksheet->getHeaderFooter()->setOddHeader('&C&D');\n\n        for ($currentRow = 1; $currentRow < 130; ++$currentRow) {\n            $worksheet->setCellValue(\"A$currentRow\", 'Bill');\n            $worksheet->setCellValue(\"B$currentRow\", 'Smith');\n        }\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $sheet = $reloadedSpreadsheet->getActiveSheet();\n        $images = $sheet->getHeaderFooter()->getImages();\n        self::assertSame(['LHEVEN', 'CHFIRST', 'CFEVEN'], array_keys($images));\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Issue993Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\Hyperlink;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Issue993Test extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    public function testDrawingWithPoundUrl(): void\n    {\n        $path = 'samples/images/blue_square.png';\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('sheet1');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('sheet2');\n        $drawing = new Drawing();\n        $drawing->setWorksheet($sheet1);\n        $drawing->setName('Blue Square');\n        $drawing->setPath($path);\n        $drawing->setCoordinates('E1');\n        $drawing->setCoordinates2('F5');\n        $hyperlink = new Hyperlink('#sheet2!C3', 'Click here');\n        $drawing->setHyperlink($hyperlink);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/drawings/_rels/drawing1.xml.rels';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n        self::assertStringContainsString('<Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\" Target=\"#sheet2!C3\"/>', $data, 'url unchanged by write');\n\n        $reader = new XlsxReader();\n        $reloadedSpreadsheet = $reader->load($this->outputFile);\n        $rsheet1 = $reloadedSpreadsheet->getSheetByName('sheet1');\n        self::assertNotNull($rsheet1);\n        $drawings = $rsheet1->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing0 = $drawings[0];\n        self::assertSame('sheet://sheet2!C3', $drawing0?->getHyperlink()?->getUrl(), 'url was changed on read');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testDrawingWithSheetUrl(): void\n    {\n        $path = 'samples/images/blue_square.png';\n        $spreadsheet = new Spreadsheet();\n        $sheet1 = $spreadsheet->getActiveSheet();\n        $sheet1->setTitle('sheet1');\n        $sheet2 = $spreadsheet->createSheet();\n        $sheet2->setTitle('sheet2');\n        $drawing = new Drawing();\n        $drawing->setWorksheet($sheet1);\n        $drawing->setName('Blue Square');\n        $drawing->setPath($path);\n        $drawing->setCoordinates('E1');\n        $drawing->setCoordinates2('F5');\n        $hyperlink = new Hyperlink('sheet://sheet2!C3', 'Click here');\n        $drawing->setHyperlink($hyperlink);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $spreadsheet->disconnectWorksheets();\n\n        $file = 'zip://';\n        $file .= $this->outputFile;\n        $file .= '#xl/drawings/_rels/drawing1.xml.rels';\n        $data = file_get_contents($file);\n        self::assertNotFalse($data);\n        self::assertStringContainsString('<Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\" Target=\"#sheet2!C3\"/>', $data, 'url changed by write');\n\n        $reader = new XlsxReader();\n        $reloadedSpreadsheet = $reader->load($this->outputFile);\n        $rsheet1 = $reloadedSpreadsheet->getSheetByName('sheet1');\n        self::assertNotNull($rsheet1);\n        $drawings = $rsheet1->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing0 = $drawings[0];\n        self::assertSame('sheet://sheet2!C3', $drawing0?->getHyperlink()?->getUrl(), 'url was changed back on read');\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Settings;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\StringHelper;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass LocaleFloatsTest extends AbstractFunctional\n{\n    private false|string $currentPhpLocale;\n\n    private string $originalLocale;\n\n    private ?Spreadsheet $spreadsheet = null;\n\n    private ?Spreadsheet $reloadedSpreadsheet = null;\n\n    protected function setUp(): void\n    {\n        $this->currentPhpLocale = setlocale(LC_ALL, '0');\n        $this->originalLocale = Settings::getLocale();\n        StringHelper::setDecimalSeparator(null);\n        StringHelper::setThousandsSeparator(null);\n    }\n\n    protected function tearDown(): void\n    {\n        StringHelper::setDecimalSeparator(null);\n        StringHelper::setThousandsSeparator(null);\n        Settings::setLocale($this->originalLocale);\n        if ($this->currentPhpLocale !== false) {\n            setlocale(LC_ALL, $this->currentPhpLocale);\n        }\n        if ($this->spreadsheet !== null) {\n            $this->spreadsheet->disconnectWorksheets();\n            $this->spreadsheet = null;\n        }\n        if ($this->reloadedSpreadsheet !== null) {\n            $this->reloadedSpreadsheet->disconnectWorksheets();\n            $this->reloadedSpreadsheet = null;\n        }\n    }\n\n    public function testLocaleFloatsCorrectlyConvertedByWriter(): void\n    {\n        if (!setlocale(LC_ALL, 'fr_FR.UTF-8', 'fra_fra.utf8')) {\n            self::markTestSkipped('Unable to set locale for testing.');\n        }\n        $localeconv = localeconv();\n        $decimalSeparator = $localeconv['decimal_point'];\n        self::assertIsString($decimalSeparator);\n        self::assertNotEquals('.', $decimalSeparator, 'unexpected change to French decimal separator');\n        $this->spreadsheet = $spreadsheet = new Spreadsheet();\n        $properties = $spreadsheet->getProperties();\n        $properties->setCustomProperty('Version', 1.2);\n        $spreadsheet->getActiveSheet()->setCellValue('A1', 1.1);\n\n        $this->reloadedSpreadsheet = $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n\n        $result = $reloadedSpreadsheet->getActiveSheet()->getCell('A1')->getValue();\n        self::assertEqualsWithDelta(1.1, $result, 1.0E-8);\n        $prop = $reloadedSpreadsheet->getProperties()->getCustomPropertyValue('Version');\n        self::assertEqualsWithDelta(1.2, $prop, 1.0E-8);\n\n        $actual = $reloadedSpreadsheet->getActiveSheet()->getCell('A1')->getFormattedValue();\n        self::assertStringContainsString(\"1{$decimalSeparator}1\", $actual);\n    }\n\n    public function testPercentageStoredAsString(): void\n    {\n        Settings::setLocale('fr_FR');\n        StringHelper::setDecimalSeparator(',');\n        StringHelper::setThousandsSeparator('.');\n        $reader = new XlsxReader();\n        $this->spreadsheet = $spreadsheet = $reader->load('tests/data/Writer/XLSX/issue.3811b.xlsx');\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('48,34%', $sheet->getCell('L2')->getValue());\n        self::assertSame('=(10%+L2)/2', $sheet->getCell('L1')->getValue());\n        self::assertEqualsWithDelta(0.2917, $sheet->getCell('L1')->getCalculatedValue(), 1E-8);\n        self::assertIsFloat($sheet->getCell('L1')->getCalculatedValue());\n        self::assertEquals('29,17%', $sheet->getCell('L1')->getFormattedValue());\n\n        $sheet->getCell('A10')->setValue(3.2);\n        self::assertSame(NumberFormat::FORMAT_GENERAL, $sheet->getStyle('A10')->getNumberFormat()->getFormatCode());\n        self::assertSame('3,2', $sheet->getCell('A10')->getFormattedValue());\n        $sheet->getCell('A11')->setValue(1002.5);\n        $sheet->getStyle('A11')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1);\n        self::assertSame('1.002,50', $sheet->getCell('A11')->getFormattedValue());\n        $sheet->getCell('A12')->setValue(2.5);\n        $sheet->getStyle('A12')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_NUMBER_00);\n        self::assertSame('2,50', $sheet->getCell('A12')->getFormattedValue());\n    }\n\n    public function testPercentageStoredAsString2(): void\n    {\n        if (!setlocale(LC_ALL, 'fr_FR.UTF-8', 'fra_fra.utf8')) {\n            self::markTestSkipped('Unable to set locale for testing.');\n        }\n        $localeconv = localeconv();\n        $thousandsSeparator = $localeconv['thousands_sep'];\n        $decimalSeparator = $localeconv['decimal_point'];\n        self::assertIsString($decimalSeparator);\n        self::assertIsString($thousandsSeparator);\n        self::assertNotEquals('.', $decimalSeparator, 'unexpected change to French decimal separator');\n        self::assertNotEquals(',', $thousandsSeparator, 'unexpected change to French thousands separator');\n        $reader = new XlsxReader();\n        $this->spreadsheet = $spreadsheet = $reader->load('tests/data/Writer/XLSX/issue.3811b.xlsx');\n        $sheet = $spreadsheet->getActiveSheet();\n        self::assertSame('48,34%', $sheet->getCell('L2')->getValue());\n        self::assertSame('=(10%+L2)/2', $sheet->getCell('L1')->getValue());\n        self::assertEqualsWithDelta(0.2917, $sheet->getCell('L1')->getCalculatedValue(), 1E-8);\n        self::assertIsFloat($sheet->getCell('L1')->getCalculatedValue());\n        self::assertSame(\"29{$decimalSeparator}17%\", $sheet->getCell('L1')->getFormattedValue());\n\n        $sheet->getCell('A10')->setValue(3.2);\n        self::assertSame(NumberFormat::FORMAT_GENERAL, $sheet->getStyle('A10')->getNumberFormat()->getFormatCode());\n        self::assertSame(\"3{$decimalSeparator}2\", $sheet->getCell('A10')->getFormattedValue());\n        $sheet->getCell('A11')->setValue(1002.5);\n        $sheet->getStyle('A11')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1);\n        self::assertSame(\"1{$thousandsSeparator}002{$decimalSeparator}50\", $sheet->getCell('A11')->getFormattedValue());\n        $sheet->getCell('A12')->setValue(2.5);\n        $sheet->getStyle('A12')->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_NUMBER_00);\n        self::assertSame(\"2{$decimalSeparator}50\", $sheet->getCell('A12')->getFormattedValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/MemoryDrawingTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse GdImage;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\MemoryDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass MemoryDrawingTest extends AbstractFunctional\n{\n    private string $outfile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outfile !== '') {\n            unlink($this->outfile);\n            $this->outfile = '';\n        }\n    }\n\n    /**\n     * Test save and load XLSX file with transparent png.\n     */\n    public function testIssue3624(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $contents = file_get_contents('tests/data/Writer/XLSX/issue.3624b.png');\n        $stamp = MemoryDrawing::fromString(\"$contents\");\n        $stamp->setName('Stamp');\n        $stamp->setHeight(120);\n        $stamp->setCoordinates('A2');\n        $stamp->setWorksheet($sheet);\n        $this->outfile = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($this->outfile);\n        $spreadsheet->disconnectWorksheets();\n\n        $reader = new XlsxReader();\n        $reloadedSpreadsheet = $reader->load($this->outfile);\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        $drawings = $rsheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        foreach ($drawings as $drawing) {\n            if ($drawing instanceof Drawing) {\n                $path = $drawing->getPath();\n                $contents = file_get_contents($path);\n                $gdImage = imagecreatefromstring(\"$contents\");\n                if ($gdImage === false) {\n                    self::fail('unexpected failure in imagecreatefromstring');\n                } else {\n                    self::assertTrue(self::checkTransparent($gdImage));\n                }\n            } else {\n                self::fail('Unexpected drawing not in Drawing class');\n            }\n        }\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Determine if image uses transparency.\n     *\n     * @see https://stackoverflow.com/questions/5495275/how-to-check-if-a-png-image-has-transparency-using-gd\n     */\n    private static function checkTransparent(GdImage $im): bool\n    {\n        $width = imagesx($im); // Get the width of the image\n        $height = imagesy($im); // Get the height of the image\n\n        // We run the image pixel by pixel and as soon as we find a transparent pixel we stop and return true.\n        for ($i = 0; $i < $width; ++$i) {\n            for ($j = 0; $j < $height; ++$j) {\n                $rgba = imagecolorat($im, $i, $j);\n                if (($rgba & 0x7F000000) >> 24) {\n                    return true;\n                }\n            }\n        }\n\n        // If we dont find any pixel the function will return false.\n        return false;\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/MetadataTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MetadataTest extends TestCase\n{\n    private string $outputFile = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->outputFile !== '') {\n            unlink($this->outputFile);\n            $this->outputFile = '';\n        }\n    }\n\n    private function getMetadata(): string\n    {\n        $zipfile = \"zip://{$this->outputFile}#xl/metadata.xml\";\n\n        return (string) @file_get_contents($zipfile);\n    }\n\n    public function testNoArrayNoPixInCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 'Hello World!');\n\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $contents = $this->getMetadata();\n        self::assertSame('', $contents);\n    }\n\n    public function testArrayNoPixInCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->returnArrayAsArray();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', 1);\n        $sheet->setCellValue('A2', 5);\n        $sheet->setCellValue('A3', -1);\n        $sheet->setCellValue('A4', 15);\n        $sheet->setCellValue('A5', 20);\n        $sheet->setCellValue('C1', '=SORT(A1:A5)');\n\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $contents = $this->getMetadata();\n        $expectedArray = [\n            'xmlns:xda',\n            '<metadataTypes count=\"2\">',\n            '<metadataType name=\"XLDAPR\"',\n            '<metadataType name=\"XLRICHVALUE\"',\n            '<futureMetadata name=\"XLDAPR\" count=\"1\">',\n            '<futureMetadata name=\"XLRICHVALUE\" count=\"1\">',\n            '<cellMetadata count=\"1\">',\n            '<valueMetadata count=\"1\">',\n        ];\n        foreach ($expectedArray as $expected) {\n            self::assertStringContainsString($expected, $contents);\n        }\n    }\n\n    public function testArrayPixInCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->returnArrayAsArray();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->fromArray([\n            [1],\n            [9],\n            [-1],\n            [15],\n        ]);\n        $sheet->setCellValue('H1', '=SORT(A1:A4)');\n        $objDrawing = new Drawing();\n        $directory = 'tests/data/Writer/XLSX';\n        $objDrawing->setPath($directory . '/blue_square.png');\n        $sheet->getCell('C2')->setValue($objDrawing);\n        $objDrawing2 = new Drawing();\n        $objDrawing2->setPath($directory . '/red_square.jpeg');\n        $sheet->getCell('C5')->setValue($objDrawing2);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $contents = $this->getMetadata();\n        //echo $contents;\n        $expectedArray = [\n            'xmlns:xda',\n            '<metadataTypes count=\"2\">',\n            '<metadataType name=\"XLDAPR\"',\n            '<metadataType name=\"XLRICHVALUE\"',\n            '<futureMetadata name=\"XLDAPR\" count=\"1\">',\n            '<futureMetadata name=\"XLRICHVALUE\" count=\"2\">',\n            '<cellMetadata count=\"1\">',\n            '<valueMetadata count=\"2\">',\n        ];\n        foreach ($expectedArray as $expected) {\n            self::assertStringContainsString($expected, $contents);\n        }\n        //self::assertTrue(true);\n    }\n\n    public function testNoArrayPixInCell(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $objDrawing = new Drawing();\n        $directory = 'tests/data/Writer/XLSX';\n        $objDrawing->setPath($directory . '/blue_square.png');\n        $sheet->getCell('C2')->setValue($objDrawing);\n        $objDrawing2 = new Drawing();\n        $objDrawing2->setPath($directory . '/red_square.jpeg');\n        $sheet->getCell('C5')->setValue($objDrawing2);\n\n        $writer = new XlsxWriter($spreadsheet);\n        $this->outputFile = File::temporaryFilename();\n        $writer->save($this->outputFile);\n        $contents = $this->getMetadata();\n        $unexpectedArray = [\n            'xmlns:xda',\n            '<metadataType name=\"XLDAPR\"',\n            '<futureMetadata name=\"XLDAPR\"',\n            '<cellMetadata',\n        ];\n        $expectedArray = [\n            '<metadataTypes count=\"1\">',\n            '<metadataType name=\"XLRICHVALUE\"',\n            '<futureMetadata name=\"XLRICHVALUE\" count=\"2\">',\n            '<valueMetadata count=\"2\">',\n        ];\n        foreach ($expectedArray as $expected) {\n            self::assertStringContainsString($expected, $contents);\n        }\n        foreach ($unexpectedArray as $unexpected) {\n            self::assertStringNotContainsString($unexpected, $contents);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/MicrosecondsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse DateTime;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass MicrosecondsTest extends AbstractFunctional\n{\n    /**\n     * Test save and load XLSX file for round-trip DateTime.\n     */\n    public function testIssue4476(): void\n    {\n        $date = '2020-10-21';\n        $time = '14:55:31';\n        $originalDateTime = new DateTime(\"{$date}T{$time}\");\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('A1', Date::dateTimeToExcel($originalDateTime));\n        $sheet->getStyle('A1')\n            ->getNumberFormat()\n            ->setFormatCode('yyyy-mm-dd hh:mm:ss.000');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        /** @var float */\n        $reread = $rsheet->getCell('A1')->getValue();\n        $temp = Date::excelToDateTimeObject($reread)\n            ->format('Y-m-d H:i:s.u');\n        self::assertSame(\"{$date} {$time}.000000\", $temp, 'round trip works with float value');\n        $formatted = $rsheet->getCell('A1')->getFormattedValue();\n        self::assertSame(\"{$date} {$time}.000\", $formatted, 'round trip works with formatted value');\n        /** @var float */\n        $temp = Date::stringToExcel($formatted);\n        $temp = Date::excelToDateTimeObject($temp)\n            ->format('Y-m-d H:i:s.u');\n        self::assertSame(\"{$date} {$time}.000000\", $temp, 'round trip works using stringToExcel on formatted value');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/PageBreakTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PageBreakTest extends TestCase\n{\n    public function testRows(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B1', 'First Page');\n        $sheet->setCellValue('B2', 'Second Page');\n\n        $sheet->getPageSetup()->setPrintArea('B1:B2');\n        $sheet->setBreak('B1', Worksheet::BREAK_ROW);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString('<rowBreaks count=\"1\" manualBreakCount=\"1\"><brk id=\"1\" man=\"1\" max=\"2\"/></rowBreaks>', $data);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testRowsNoPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B1', 'First Page');\n        $sheet->setCellValue('B2', 'Second Page');\n\n        $sheet->setBreak('B1', Worksheet::BREAK_ROW);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString('<rowBreaks count=\"1\" manualBreakCount=\"1\"><brk id=\"1\" man=\"1\"/></rowBreaks>', $data);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testCols(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B1', 'First Page');\n        $sheet->setCellValue('C1', 'Second Page');\n\n        $sheet->getPageSetup()->setPrintArea('B1:C1');\n        $sheet->setBreak('C1', Worksheet::BREAK_COLUMN);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n        $sheet->getColumnDimension('C')->setAutoSize(true);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString('<colBreaks count=\"1\" manualBreakCount=\"1\"><brk id=\"2\" man=\"1\" max=\"1\"/></colBreaks>', $data);\n        $spreadsheet->disconnectWorksheets();\n    }\n\n    public function testColsNoPrintArea(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValue('B1', 'First Page');\n        $sheet->setCellValue('C1', 'Second Page');\n\n        $sheet->setBreak('C1', Worksheet::BREAK_COLUMN);\n        $sheet->getColumnDimension('B')->setAutoSize(true);\n        $sheet->getColumnDimension('C')->setAutoSize(true);\n\n        $writer = new Xlsx($spreadsheet);\n        $writerWorksheet = new Xlsx\\Worksheet($writer);\n        $data = $writerWorksheet->writeWorksheet($sheet, []);\n        self::assertStringContainsString('<colBreaks count=\"1\" manualBreakCount=\"1\"><brk id=\"2\" man=\"1\"/></colBreaks>', $data);\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/RichTextTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass RichTextTest extends TestCase\n{\n    private string $filename = '';\n\n    protected function teardown(): void\n    {\n        if ($this->filename !== '') {\n            unlink($this->filename);\n        }\n    }\n\n    public function testRichText(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $rtf = new RichText();\n        $rtf->createText('~Cell Style~');\n        $rtf->createTextRun('~RTF Style~')->getFont()?->setItalic(true);\n        $rtf->createText('~No Style~');\n        $sheet->getCell('A1')->setValue($rtf);\n        $sheet->getStyle('A1')->getFont()->setBold(true);\n\n        $fontStyle = $sheet->getStyle('A1')->getFont();\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n\n        $a1Value = $sheet->getCell('A1')->getValue();\n        self::assertInstanceOf(RichText::class, $a1Value);\n        $elements = $a1Value->getRichTextElements();\n        self::assertCount(3, $elements);\n        self::assertNull($elements[0]->getFont());\n        $fontStyle = $elements[1]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertFalse($fontStyle->getBold());\n        self::assertTrue($fontStyle->getItalic());\n        self::assertNull($elements[0]->getFont());\n\n        $this->filename = File::temporaryFilename();\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->save($this->filename);\n        $spreadsheet->disconnectWorksheets();\n\n        $this->readfile();\n    }\n\n    private function readfile(): void\n    {\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load($this->filename);\n        $sheet = $spreadsheet->getActiveSheet();\n        $fontStyle = $sheet->getStyle('A1')->getFont();\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n\n        $a1Value = $sheet->getCell('A1')->getValue();\n        self::assertInstanceOf(RichText::class, $a1Value);\n        $elements = $a1Value->getRichTextElements();\n        self::assertCount(3, $elements);\n        // write/read has changed text to run but no real difference\n        $fontStyle = $elements[0]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n        $fontStyle = $elements[1]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertFalse($fontStyle->getBold());\n        self::assertTrue($fontStyle->getItalic());\n        // write/read has changed text to run but no real difference\n        $fontStyle = $elements[2]->getFont();\n        self::assertNotNull($fontStyle);\n        self::assertTrue($fontStyle->getBold());\n        self::assertFalse($fontStyle->getItalic());\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/StartsWithHashTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as Reader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as Writer;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass StartsWithHashTest extends TestCase\n{\n    public function testStartWithHash(): void\n    {\n        $outputFilename = File::temporaryFilename();\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValueExplicit('A1', '#define M', DataType::TYPE_STRING);\n        $sheet->setCellValue('A2', '=A1');\n        $sheet->setCellValue('A3', '=UNKNOWNFUNC()');\n\n        $writer = new Writer($spreadsheet);\n        $writer->save($outputFilename);\n\n        $reader = new Reader();\n        $sheet = $reader->load($outputFilename);\n        unlink($outputFilename);\n\n        self::assertSame('#define M', $sheet->getActiveSheet()->getCell('A1')->getValue());\n        self::assertSame('#define M', $sheet->getActiveSheet()->getCell('A2')->getCalculatedValue());\n        self::assertSame('f', $sheet->getActiveSheet()->getCell('A3')->getDataType());\n        self::assertSame('#NAME?', $sheet->getActiveSheet()->getCell('A3')->getCalculatedValue());\n        self::assertSame('f', $sheet->getActiveSheet()->getCell('A3')->getDataType());\n    }\n\n    public function testStartWithHashReadRaw(): void\n    {\n        // Make sure raw data indicates A3 is an error, but A2 isn't.\n        $outputFilename = File::temporaryFilename();\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->setCellValueExplicit('A1', '#define M', DataType::TYPE_STRING);\n        $sheet->setCellValue('A2', '=A1');\n        $sheet->setCellValue('A3', '=UNKNOWNFUNC()');\n\n        $writer = new Writer($spreadsheet);\n        $writer->save($outputFilename);\n        $zip = new ZipArchive();\n        $zip->open($outputFilename);\n        $resultSheet1Raw = $zip->getFromName('xl/worksheets/sheet1.xml');\n        $zip->close();\n        unlink($outputFilename);\n\n        self::assertStringContainsString('<c r=\"A3\" t=\"e\">', $resultSheet1Raw);\n        self::assertStringContainsString('<c r=\"A2\" t=\"str\">', $resultSheet1Raw);\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/StylesWriterTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as XlsxWriter;\nuse PHPUnit\\Framework\\TestCase;\n\nclass StylesWriterTest extends TestCase\n{\n    public function testStylesWriter(): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $writer = new XlsxWriter($spreadsheet);\n        $writer->createStyleDictionaries();\n        $writerStyle = new XlsxWriter\\Style($writer);\n        $data = $writerStyle->writeStyles($spreadsheet);\n        self::assertStringContainsString(\n            '<fonts count=\"1\"><font><b val=\"0\"/><i val=\"0\"/><strike val=\"0\"/><u val=\"none\"/><sz val=\"11\"/><color rgb=\"FF000000\"/><name val=\"Calibri\"/></font></fonts>',\n            $data\n        );\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/TableTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Table;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass TableTest extends AbstractFunctional\n{\n    protected function populateData(Spreadsheet $spreadsheet): Table\n    {\n        $worksheet = $spreadsheet->getActiveSheet();\n\n        $tableName = 'SalesData';\n        $columnFormula = \"=SUM({$tableName}[[#This Row],[Q1]:[Q4]])\";\n\n        $dataArray = [\n            ['Year', 'Country', 'Q1', 'Q2', 'Q3', 'Q4', 'Sales'],\n            [2010, 'Belgium', 380, 390, 420, 460, $columnFormula],\n            [2010, 'France', 510, 490, 460, 590, $columnFormula],\n            [2010, 'Germany', 720, 680, 640, 660, $columnFormula],\n            [2010, 'Italy', 440, 410, 420, 450, $columnFormula],\n            [2010, 'Spain', 510, 490, 470, 420, $columnFormula],\n            [2010, 'UK', 690, 610, 620, 600, $columnFormula],\n            [2010, 'United States', 790, 730, 860, 850, $columnFormula],\n            [2011, 'Belgium', 400, 350, 450, 500, $columnFormula],\n            [2011, 'France', 620, 650, 415, 570, $columnFormula],\n            [2011, 'Germany', 680, 620, 710, 690, $columnFormula],\n            [2011, 'Italy', 430, 370, 350, 335, $columnFormula],\n            [2011, 'Spain', 460, 390, 430, 415, $columnFormula],\n            [2011, 'UK', 720, 650, 580, 510, $columnFormula],\n            [2011, 'United States', 800, 700, 900, 950, $columnFormula],\n        ];\n\n        $worksheet->fromArray($dataArray, null, 'A1');\n\n        $rowColumnRange = \"{$worksheet->getHighestDataColumn()}{$worksheet->getHighestDataRow()}\";\n\n        $table = new Table(\"A1:{$rowColumnRange}\", $tableName);\n        $table->setRange(\"A1:{$rowColumnRange}\");\n\n        $table->getColumn('G')\n            ->setTotalsRowLabel('Total')\n            ->setColumnFormula($columnFormula);\n        $worksheet->getCell('A16')->setValue('Total');\n        $worksheet->getCell('G16')->setValue(\"=SUBTOTAL(109,{$tableName}[Sales])\");\n\n        $spreadsheet->getActiveSheet()->addTable($table);\n\n        return $table;\n    }\n\n    public function testTableCreation(): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $this->populateData($spreadsheet);\n\n        // TODO: We don't yet support Structured References in formulae, so we need to disable precalculation\n        //       when writing.\n        $disablePrecalculation = function (Xlsx $writer): void {\n            $writer->setPreCalculateFormulas(false);\n        };\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', null, $disablePrecalculation);\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n\n        $reloadedTable = $reloadedWorksheet->getTableCollection()[0];\n        self::assertNotNull($reloadedTable);\n    }\n\n    public function testTableWithoutFilter(): void\n    {\n        $spreadsheet = new Spreadsheet();\n\n        $table = $this->populateData($spreadsheet);\n        $table->setAllowFilter(false);\n\n        // TODO: We don't yet support Structured References in formulae, so we need to disable precalc when writing\n        $disablePrecalculation = function (Xlsx $writer): void {\n            $writer->setPreCalculateFormulas(false);\n        };\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx', null, $disablePrecalculation);\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n\n        $reloadedTable = $reloadedWorksheet->getTableCollection()[0];\n        self::assertInstanceOf(Table::class, $reloadedTable);\n        self::assertFalse($reloadedTable->getAllowFilter());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ThemeColorsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as XlsxReader;\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\Style;\nuse PhpOffice\\PhpSpreadsheet\\Theme as SpreadsheetTheme;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ThemeColorsTest extends AbstractFunctional\n{\n    private const COLOR_SCHEME_2013_PLUS_NAME = 'Office 2013+';\n\n    public function testOffice2013Theme(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getTheme()\n            ->setThemeColorName(\n                self::COLOR_SCHEME_2013_PLUS_NAME\n            );\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame(\n            SpreadsheetTheme::COLOR_SCHEME_2013_2022_NAME,\n            $reloadedSpreadsheet->getTheme()->getThemeColorName()\n        );\n        self::assertSame('FFC000', $reloadedSpreadsheet->getTheme()->getThemeColors()['accent4']);\n        self::assertSame('Calibri Light', $reloadedSpreadsheet->getTheme()->getMajorFontLatin());\n        self::assertSame('Calibri', $reloadedSpreadsheet->getTheme()->getMinorFontLatin());\n        $defaultFont2 = $reloadedSpreadsheet->getDefaultStyle()->getFont()->getName();\n        self::assertSame('Calibri', $defaultFont2);\n        $font3 = $reloadedSpreadsheet->getActiveSheet()\n            ->getStyle('Z10')->getFont()->getName();\n        self::assertSame('Calibri', $font3);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testOffice2013Theme2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getTheme()\n            ->setThemeColorName(\n                SpreadsheetTheme::COLOR_SCHEME_2013_2022_NAME\n            );\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame(\n            SpreadsheetTheme::COLOR_SCHEME_2013_2022_NAME,\n            $reloadedSpreadsheet->getTheme()->getThemeColorName()\n        );\n        self::assertSame('FFC000', $reloadedSpreadsheet->getTheme()->getThemeColors()['accent4']);\n        self::assertSame('Calibri Light', $reloadedSpreadsheet->getTheme()->getMajorFontLatin());\n        self::assertSame('Calibri', $reloadedSpreadsheet->getTheme()->getMinorFontLatin());\n        $defaultFont2 = $reloadedSpreadsheet->getDefaultStyle()->getFont()->getName();\n        self::assertSame('Calibri', $defaultFont2);\n        $font3 = $reloadedSpreadsheet->getActiveSheet()\n            ->getStyle('Z10')->getFont()->getName();\n        self::assertSame('Calibri', $font3);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testOffice2007Theme(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getTheme()->setThemeColorName(SpreadsheetTheme::COLOR_SCHEME_2007_2010_NAME);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame('Office 2007-2010', $reloadedSpreadsheet->getTheme()->getThemeColorName());\n        self::assertSame('8064A2', $reloadedSpreadsheet->getTheme()->getThemeColors()['accent4']);\n        self::assertSame('Cambria', $reloadedSpreadsheet->getTheme()->getMajorFontLatin());\n        self::assertSame('Calibri', $reloadedSpreadsheet->getTheme()->getMinorFontLatin());\n        $defaultFont2 = $reloadedSpreadsheet->getDefaultStyle()->getFont()->getName();\n        self::assertSame('Calibri', $defaultFont2);\n        $font3 = $reloadedSpreadsheet->getActiveSheet()\n            ->getStyle('Z10')->getFont()->getName();\n        self::assertSame('Calibri', $font3);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testDefaultTheme(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame('Office', $reloadedSpreadsheet->getTheme()->getThemeColorName());\n        self::assertSame('8064A2', $reloadedSpreadsheet->getTheme()->getThemeColors()['accent4']);\n        self::assertSame('Cambria', $reloadedSpreadsheet->getTheme()->getMajorFontLatin());\n        self::assertSame('Calibri', $reloadedSpreadsheet->getTheme()->getMinorFontLatin());\n        $defaultFont2 = $reloadedSpreadsheet->getDefaultStyle()->getFont()->getName();\n        self::assertSame('Calibri', $defaultFont2);\n        $font3 = $reloadedSpreadsheet->getActiveSheet()\n            ->getStyle('Z10')->getFont()->getName();\n        self::assertSame('Calibri', $font3);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testGalleryTheme(): void\n    {\n        $reader = new XlsxReader();\n        $spreadsheet = $reader->load('tests/data/Writer/XLSX/gallerytheme.xlsx');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame('Gallery', $reloadedSpreadsheet->getTheme()->getThemeColorName());\n        self::assertSame('795FAF', $reloadedSpreadsheet->getTheme()->getThemeColors()['accent4']);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    public function testOffice2023Theme(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getTheme()\n            ->setThemeColorName(\n                SpreadsheetTheme::COLOR_SCHEME_2023_PLUS_NAME,\n                null,\n                $spreadsheet\n            );\n        self::assertSame('Aptos Narrow', $spreadsheet->getDefaultStyle()->getFont()->getName(), 'default style is attached to spreadsheet');\n        $style = new Style();\n        self::assertSame('Calibri', $style->getFont()->getName(), 'style not attached to spreadsheet');\n        $style2 = $spreadsheet->getActiveSheet()->getStyle('A7');\n        self::assertSame('Aptos Narrow', $style2->getFont()->getName(), 'font is attached to spreadsheet');\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame(\n            SpreadsheetTheme::COLOR_SCHEME_2023_PLUS_NAME,\n            $reloadedSpreadsheet->getTheme()->getThemeColorName()\n        );\n        self::assertSame('0F9ED5', $reloadedSpreadsheet->getTheme()->getThemeColors()['accent4']);\n        self::assertSame('Aptos Display', $reloadedSpreadsheet->getTheme()->getMajorFontLatin());\n        self::assertSame('Aptos Narrow', $reloadedSpreadsheet->getTheme()->getMinorFontLatin());\n        $defaultFont = $reloadedSpreadsheet->getDefaultStyle()->getFont()->getName();\n        self::assertSame('Aptos Narrow', $defaultFont);\n        $defaultFont2 = $reloadedSpreadsheet->getDefaultStyle()->getFont()->getName();\n        self::assertSame('Aptos Narrow', $defaultFont2);\n        $font3 = $reloadedSpreadsheet->getActiveSheet()\n            ->getStyle('Z10')->getFont()->getName();\n        self::assertSame('Aptos Narrow', $font3);\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/ThemeFontsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass ThemeFontsTest extends AbstractFunctional\n{\n    public function testFont2(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->getTheme()\n            ->setThemeFontName('custom')\n            ->setMajorFontValues('Arial', 'Arial', 'Arial', [])\n            ->setMinorFontValues('Arial', 'Arial', 'Arial', []);\n        $spreadsheet->getDefaultStyle()\n            ->getFont()\n            ->setName('Arial')\n            ->setScheme('minor');\n        $sheet = $spreadsheet->getActiveSheet();\n        $sheet->getCell('A1')->setValue('header');\n        $sheet->getStyle('A1')->getFont()->setScheme('major');\n        $sheet->getCell('A2')->setValue('body');\n        $sheet->getStyle('A2')->getFont()->setScheme('minor');\n        $sheet->getCell('A3')->setValue('default');\n        $sheet->getCell('A4')->setValue('noscheme');\n        $sheet->getStyle('A4')->getFont()->setScheme('');\n        $sheet->getCell('A5')->setValue('nottheme');\n        $sheet->getStyle('A5')->getFont()->setName('Courier New');\n        $sheet->getCell('A6')->setValue('dflt bold');\n        $sheet->getStyle('A6')->getFont()->setBold(true);\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        self::assertSame('Arial', $spreadsheet->getTheme()->getMajorFontLatin());\n        self::assertSame('Arial', $spreadsheet->getTheme()->getMinorFontLatin());\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n        self::assertSame('Arial', $rsheet->getStyle('A1')->getFont()->getName());\n        self::assertSame('major', $rsheet->getStyle('A1')->getFont()->getScheme());\n        self::assertSame('Arial', $rsheet->getStyle('A2')->getFont()->getName());\n        self::assertSame('minor', $rsheet->getStyle('A2')->getFont()->getScheme());\n        self::assertSame('Arial', $rsheet->getStyle('A3')->getFont()->getName());\n        self::assertSame('minor', $rsheet->getStyle('A3')->getFont()->getScheme());\n        self::assertSame('Arial', $rsheet->getStyle('A4')->getFont()->getName());\n        self::assertSame('', $rsheet->getStyle('A4')->getFont()->getScheme());\n        self::assertSame('Courier New', $rsheet->getStyle('A5')->getFont()->getName());\n        self::assertSame('', $rsheet->getStyle('A5')->getFont()->getScheme(), 'setting name disables scheme');\n        self::assertSame('Arial', $rsheet->getStyle('A6')->getFont()->getName());\n        self::assertSame('minor', $rsheet->getStyle('A6')->getFont()->getScheme());\n        self::assertTrue($rsheet->getStyle('A6')->getFont()->getBold(), 'setting other properties does not disable scheme');\n\n        $reloadedSpreadsheet->getTheme()\n            ->setThemeFontName('custom')\n            ->setMajorFontValues('Times New Roman', 'Times New Roman', 'Times New Roman', [])\n            ->setMinorFontValues('Tahoma', 'Tahoma', 'Tahoma', []);\n        $reloadedSpreadsheet->resetThemeFonts();\n        self::assertSame('Times New Roman', $rsheet->getStyle('A1')->getFont()->getName());\n        self::assertSame('major', $rsheet->getStyle('A1')->getFont()->getScheme());\n        self::assertSame('Tahoma', $rsheet->getStyle('A2')->getFont()->getName());\n        self::assertSame('minor', $rsheet->getStyle('A2')->getFont()->getScheme());\n        self::assertSame('Tahoma', $rsheet->getStyle('A3')->getFont()->getName());\n        self::assertSame('minor', $rsheet->getStyle('A3')->getFont()->getScheme());\n        self::assertSame('Arial', $rsheet->getStyle('A4')->getFont()->getName());\n        self::assertSame('', $rsheet->getStyle('A4')->getFont()->getScheme());\n        self::assertSame('Courier New', $rsheet->getStyle('A5')->getFont()->getName());\n        self::assertSame('', $rsheet->getStyle('A5')->getFont()->getScheme(), 'setting name disables scheme');\n        self::assertSame('Tahoma', $rsheet->getStyle('A6')->getFont()->getName());\n        self::assertSame('minor', $rsheet->getStyle('A6')->getFont()->getScheme());\n        self::assertTrue($rsheet->getStyle('A6')->getFont()->getBold(), 'setting other properties does not disable scheme');\n\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/TransparentDrawingsTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass TransparentDrawingsTest extends AbstractFunctional\n{\n    /**\n     * Save and load XLSX with 2-cell anchor drawing with transparency.\n     */\n    public function testTwoCellAnchorTransparent(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Add gif image that coordinates is two cell anchor.\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        self::assertEquals($drawing->getWidth(), 100);\n        self::assertEquals($drawing->getHeight(), 100);\n        $drawing->setCoordinates('A1');\n        $drawing->setOffsetX(30);\n        $drawing->setOffsetY(10);\n        $drawing->setCoordinates2('E8');\n        $drawing->setOffsetX2(-50);\n        $drawing->setOffsetY2(-20);\n        $drawing->setOpacity(40000);\n        $drawing->setWorksheet($sheet);\n\n        // Write file\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n\n        // Check image coordinates.\n        $drawingCollection = $rsheet->getDrawingCollection();\n        self::assertCount(1, $drawingCollection);\n        $drawing = $drawingCollection[0];\n        self::assertNotNull($drawing);\n\n        self::assertSame(100, $drawing->getWidth());\n        self::assertSame(100, $drawing->getHeight());\n        self::assertSame('A1', $drawing->getCoordinates());\n        self::assertSame(30, $drawing->getOffsetX());\n        self::assertSame(10, $drawing->getOffsetY());\n        self::assertSame('E8', $drawing->getCoordinates2());\n        self::assertSame(-50, $drawing->getOffsetX2());\n        self::assertSame(-20, $drawing->getOffsetY2());\n        self::assertSame(40000, $drawing->getOpacity());\n        self::assertSame($rsheet, $drawing->getWorksheet());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n\n    /**\n     * Save and load XLSX with 1-cell anchor drawing with transparency.\n     */\n    public function testOneCellAnchorTransparent(): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $sheet = $spreadsheet->getActiveSheet();\n\n        // Add gif image that coordinates is two cell anchor.\n        $drawing = new Drawing();\n        $drawing->setName('Blue Square');\n        $drawing->setPath('tests/data/Writer/XLSX/blue_square.png');\n        //self::assertEquals($drawing->getWidth(), 100);\n        //self::assertEquals($drawing->getHeight(), 100);\n        $drawing->setCoordinates('A1');\n        $drawing->setOpacity(40000);\n        $drawing->setWorksheet($sheet);\n\n        // Write file\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $spreadsheet->disconnectWorksheets();\n        $rsheet = $reloadedSpreadsheet->getActiveSheet();\n\n        // Check image coordinates.\n        $drawingCollection = $rsheet->getDrawingCollection();\n        self::assertCount(1, $drawingCollection);\n        $drawing = $drawingCollection[0];\n        self::assertNotNull($drawing);\n\n        self::assertSame(100, $drawing->getWidth());\n        self::assertSame(100, $drawing->getHeight());\n        self::assertSame('A1', $drawing->getCoordinates());\n        self::assertSame(40000, $drawing->getOpacity());\n        self::assertSame($rsheet, $drawing->getWorksheet());\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/Unparsed2396Test.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx as Reader;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx as Writer;\nuse PHPUnit\\Framework\\TestCase;\n\nclass Unparsed2396Test extends TestCase\n{\n    private string $filename = '';\n\n    protected function tearDown(): void\n    {\n        if ($this->filename !== '') {\n            unlink($this->filename);\n            $this->filename = '';\n        }\n    }\n\n    private function getContents(?BaseDrawing $drawing): string\n    {\n        $contents = '';\n        if ($drawing instanceof Drawing) {\n            $contents = (string) file_get_contents($drawing->getPath());\n        } else {\n            self::fail('Unexpected null or baseDrawing which is not Drawing');\n        }\n        self::assertNotSame('', $contents);\n\n        return $contents;\n    }\n\n    // Don't drop image as in issue 2396.\n    public function testUnparsed2396(): void\n    {\n        $sampleFilename = 'tests/data/Writer/XLSX/issue.2396.xlsx';\n        $reader = new Reader();\n        $excel = $reader->load($sampleFilename);\n        $outputFilename = $this->filename = File::temporaryFilename();\n        $writer = new Writer($excel);\n        $writer->save($outputFilename);\n        //$spreadsheet = $this->writeAndReload($excel, 'Xlsx');\n        $excel->disconnectWorksheets();\n        $reader = new Reader();\n        $spreadsheet = $reader->load($outputFilename);\n        $sheet = $spreadsheet->getSheet(0);\n        $drawing1 = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawing1);\n        $hash = $this->getContents($drawing1[0]);\n\n        $sheet = $spreadsheet->getSheet(1);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        self::assertSame($hash, $this->getContents($drawings[0]));\n\n        $sheet = $spreadsheet->getSheet(2);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(0, $drawings);\n        //self::assertSame($hash, md5(file_get_contents($drawings[0]->getPath())));\n\n        $sheet = $spreadsheet->getSheet(3);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        self::assertSame($hash, $this->getContents($drawings[0]));\n\n        $sheet = $spreadsheet->getSheet(4);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(0, $drawings);\n        //self::assertSame($hash, md5(file_get_contents($drawings[0]->getPath())));\n\n        // The next 2 sheets have 'legacyDrawing', button, and listbox.\n        // If support is added for those, these tests may need adjustment.\n        $sheet = $spreadsheet->getSheet(5);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(0, $drawings);\n        //self::assertSame($hash, md5(file_get_contents($drawings[0]->getPath())));\n\n        $sheet = $spreadsheet->getSheet(6);\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        self::assertSame($hash, $this->getContents($drawings[0]));\n\n        $spreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataCloneTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass UnparsedDataCloneTest extends TestCase\n{\n    /**\n     * Test load and save Xlsx file with unparsed data (form elements, protected sheets, alternate contents, printer settings,..).\n     */\n    public function testLoadSaveXlsxWithUnparsedDataClone(): void\n    {\n        $sampleFilename = 'tests/data/Writer/XLSX/drawing_on_2nd_page.xlsx';\n        $resultFilename = File::temporaryFilename();\n        $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n        $spreadsheet = $reader->load($sampleFilename);\n        $spreadsheet->setActiveSheetIndex(1);\n        $sheet = $spreadsheet->getActiveSheet();\n        $drawings = $sheet->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $sheetCodeName = $sheet->getCodeName();\n        /** @var array<array<array<mixed>>> */\n        $unparsedLoadedData = $spreadsheet->getUnparsedLoadedData();\n        self::assertArrayHasKey('printerSettings', $unparsedLoadedData['sheets'][\"$sheetCodeName\"]);\n        self::assertCount(1, $unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings']);\n\n        $clonedSheet = clone $spreadsheet->getActiveSheet();\n        $clonedSheet->setTitle('Clone');\n        $spreadsheet->addSheet($clonedSheet);\n\n        $writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($spreadsheet);\n        $writer->save($resultFilename);\n        $dupname = 'Unable to open saved file';\n\n        $zip = new ZipArchive();\n        if ($zip->open($resultFilename) === true) {\n            $names = [];\n            $dupname = '';\n            for ($index = 0; $index < $zip->numFiles; ++$index) {\n                $filename = $zip->getNameIndex($index);\n                if (in_array($filename, $names)) {\n                    $dupname .= \"$filename,\";\n                } else {\n                    $names[] = $filename;\n                }\n            }\n            $zip->close();\n        }\n        unlink($resultFilename);\n        self::assertEquals('', $dupname);\n    }\n\n    /**\n     * Test that saving twice with same writer works.\n     */\n    public function testSaveTwice(): void\n    {\n        $sampleFilename = 'tests/data/Writer/XLSX/drawing_on_2nd_page.xlsx';\n        $resultFilename1 = File::temporaryFilename();\n        $resultFilename2 = File::temporaryFilename();\n        self::assertNotEquals($resultFilename1, $resultFilename2);\n        $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n        $spreadsheet = $reader->load($sampleFilename);\n        $sheet = $spreadsheet->setActiveSheetIndex(1);\n        $sheet->setTitle('Original');\n\n        $clonedSheet = clone $spreadsheet->getActiveSheet();\n        $clonedSheet->setTitle('Clone');\n        $spreadsheet->addSheet($clonedSheet);\n        $clonedSheet->getCell('A8')->setValue('cloned');\n        $sheet->getCell('A8')->setValue('original');\n\n        $writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($spreadsheet);\n        $writer->save($resultFilename1);\n        $reader1 = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n        $spreadsheet1 = $reader1->load($resultFilename1);\n        unlink($resultFilename1);\n        $sheet1c = $spreadsheet1->getSheetByNameOrThrow('Clone');\n        $sheet1o = $spreadsheet1->getSheetByNameOrThrow('Original');\n\n        $writer->save($resultFilename2);\n        $reader2 = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n        $spreadsheet2 = $reader2->load($resultFilename2);\n        unlink($resultFilename2);\n        $sheet2c = $spreadsheet2->getSheetByNameOrThrow('Clone');\n        $sheet2o = $spreadsheet2->getSheetByNameOrThrow('Original');\n\n        self::assertEquals($spreadsheet1->getSheetCount(), $spreadsheet2->getSheetCount());\n        self::assertCount(1, $sheet1c->getDrawingCollection());\n        self::assertCount(1, $sheet1o->getDrawingCollection());\n        self::assertCount(1, $sheet2c->getDrawingCollection());\n        self::assertCount(1, $sheet2o->getDrawingCollection());\n        self::assertEquals('original', $sheet1o->getCell('A8')->getValue());\n        self::assertEquals('original', $sheet2o->getCell('A8')->getValue());\n        self::assertEquals('cloned', $sheet1c->getCell('A8')->getValue());\n        self::assertEquals('cloned', $sheet2c->getCell('A8')->getValue());\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse Exception;\nuse PhpOffice\\PhpSpreadsheet\\Shared\\File;\nuse PHPUnit\\Framework\\TestCase;\nuse ZipArchive;\n\nclass UnparsedDataTest extends TestCase\n{\n    /**\n     * Test load and save Xlsx file with unparsed data (form elements, protected sheets, alternate contents, printer settings,..).\n     */\n    public function testLoadSaveXlsxWithUnparsedData(): void\n    {\n        $sampleFilename = 'tests/data/Writer/XLSX/form_pass_print.xlsm';\n        $resultFilename = File::temporaryFilename();\n        $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n        $excel = $reader->load($sampleFilename);\n\n        $excel->getSheet(1)->setCellValue('B1', '222');\n\n        $writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($excel);\n        $writer->setUseDiskCaching(true, sys_get_temp_dir());\n        $writer->save($resultFilename);\n        self::assertFileExists($resultFilename);\n\n        $resultZip = new ZipArchive();\n        $resultZip->open($resultFilename);\n        $resultContentTypesRaw = $resultZip->getFromName('[Content_Types].xml');\n        $resultControlPropRaw = $resultZip->getFromName('xl/ctrlProps/ctrlProp1.xml');\n        $resultDrawingRaw = $resultZip->getFromName('xl/drawings/drawing1.xml');\n        $resultVmlDrawingRaw = $resultZip->getFromName('xl/drawings/vmlDrawing1.vml');\n        $resultPrinterSettingsRaw = $resultZip->getFromName('xl/printerSettings/printerSettings1.bin');\n        $resultVbaProjectRaw = $resultZip->getFromName('xl/vbaProject.bin');\n        $resultWorkbookRaw = $resultZip->getFromName('xl/workbook.xml');\n        $resultSheet1RelsRaw = $resultZip->getFromName('xl/worksheets/_rels/sheet1.xml.rels');\n        $resultSheet1Raw = $resultZip->getFromName('xl/worksheets/sheet1.xml');\n        $resultSheet2Raw = $resultZip->getFromName('xl/worksheets/sheet2.xml');\n        if (false === $resultZip->close()) {\n            throw new Exception(\"Could not close zip file \\\"{$resultFilename}\\\".\");\n        }\n        unlink($resultFilename);\n\n        // [Content_Types].xml\n        self::assertStringContainsString('application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings', $resultContentTypesRaw, 'Content type for printerSettings not found!');\n        self::assertStringContainsString('application/vnd.ms-office.vbaProject', $resultContentTypesRaw, 'Content type for VbaProject not found!');\n        self::assertStringContainsString('application/vnd.ms-excel.controlproperties+xml', $resultContentTypesRaw, 'Content type for ctrlProp not found!');\n\n        // xl/ctrlProps/ctrlProp1.xml\n        self::assertNotEmpty($resultControlPropRaw, 'ctrlProp not found!');\n\n        // xl/drawings/drawing1.xml\n        self::assertStringContainsString('<mc:AlternateContent', $resultDrawingRaw, 'AlternateContent at drawing.xml not found!');\n\n        // xl/drawings/vmlDrawing1.vml\n        self::assertNotEmpty($resultVmlDrawingRaw, 'vmlDrawing not found!');\n\n        // xl/printerSettings/printerSettings1.bin\n        self::assertNotEmpty($resultPrinterSettingsRaw, 'printerSettings.bin not found!');\n\n        // xl/vbaProject.bin\n        self::assertNotEmpty($resultVbaProjectRaw, 'vbaProject.bin not found!');\n\n        // xl/workbook.xml\n        $xmlWorkbook = simplexml_load_string($resultWorkbookRaw ?: '', 'SimpleXMLElement');\n        self::assertNotFalse($xmlWorkbook);\n        if (!$xmlWorkbook->workbookProtection) {\n            self::fail('workbook.xml/workbookProtection not found!');\n        } else {\n            self::assertEquals($xmlWorkbook->workbookProtection['workbookPassword'], 'CBEB', 'workbook.xml/workbookProtection[workbookPassword] is wrong!');\n            self::assertEquals($xmlWorkbook->workbookProtection['lockStructure'], 'true', 'workbook.xml/workbookProtection[lockStructure] is wrong!');\n\n            self::assertInstanceOf('SimpleXMLElement', $xmlWorkbook->sheets->sheet[0]);\n            self::assertInstanceOf('SimpleXMLElement', $xmlWorkbook->sheets->sheet[1]);\n            self::assertEquals($xmlWorkbook->sheets->sheet[0]['state'], '', 'workbook.xml/sheets/sheet[0][state] is wrong!');\n            self::assertNotNull($xmlWorkbook->sheets->sheet[1]);\n            self::assertEquals($xmlWorkbook->sheets->sheet[1]['state'], 'hidden', 'workbook.xml/sheets/sheet[1][state] is wrong!');\n        }\n        unset($xmlWorkbook);\n\n        // xl/worksheets/_rels/sheet1.xml.rels\n        self::assertStringContainsString('http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings', $resultSheet1RelsRaw, 'Sheet relation with printerSettings not found!');\n        self::assertStringContainsString('http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', $resultSheet1RelsRaw, 'Sheet relation with vmlDrawing not found!');\n        self::assertStringContainsString('http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp', $resultSheet1RelsRaw, 'Sheet relation with ctrlProp not found!');\n\n        // xl/worksheets/sheet1.xml\n        self::assertStringContainsString('<mc:AlternateContent', $resultSheet1Raw, 'AlternateContent at sheet1.xml not found!');\n        $xmlWorksheet = simplexml_load_string($resultSheet1Raw ?: '', 'SimpleXMLElement');\n        self::assertNotFalse($xmlWorksheet);\n        $pageSetupAttributes = $xmlWorksheet->pageSetup->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships');\n        self::assertTrue(isset($pageSetupAttributes->id), 'sheet1.xml/pageSetup[r:id] not found!');\n        if (!$xmlWorksheet->sheetProtection) {\n            self::fail('sheet1.xml/sheetProtection not found!');\n        } else {\n            self::assertEquals($xmlWorksheet->sheetProtection['password'], 'CBEB', 'sheet1.xml/sheetProtection[password] is wrong!');\n            self::assertEquals($xmlWorksheet->sheetProtection['sheet'], '1', 'sheet1.xml/sheetProtection[sheet] is wrong!');\n            self::assertEquals($xmlWorksheet->sheetProtection['objects'], '1', 'sheet1.xml/sheetProtection[objects] is wrong!');\n            self::assertEquals($xmlWorksheet->sheetProtection['scenarios'], '1', 'sheet1.xml/sheetProtection[scenarios] is wrong!');\n        }\n        unset($xmlWorksheet);\n\n        // xl/worksheets/sheet2.xml\n        self::assertNotEmpty($resultSheet2Raw, 'sheet2.xml not found!');\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/VisibilityTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Spreadsheet;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\n\nclass VisibilityTest extends AbstractFunctional\n{\n    /** @param array<int, bool> $visibleRows */\n    #[DataProvider('dataProviderRowVisibility')]\n    public function testRowVisibility(array $visibleRows): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        foreach ($visibleRows as $row => $visibility) {\n            $worksheet->setCellValue(\"A{$row}\", $row);\n            $worksheet->getRowDimension($row)->setVisible($visibility);\n        }\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n        foreach ($visibleRows as $row => $visibility) {\n            self::assertSame($visibility, $reloadedWorksheet->getRowDimension($row)->getVisible());\n        }\n    }\n\n    /** @return array<int, array<int, array<int, bool>>> */\n    public static function dataProviderRowVisibility(): array\n    {\n        return [\n            [\n                [1 => false, 2 => false, 3 => true, 4 => false, 5 => true, 6 => false],\n            ],\n        ];\n    }\n\n    /** @param array<string, bool> $visibleColumns */\n    #[DataProvider('dataProviderColumnVisibility')]\n    public function testColumnVisibility(array $visibleColumns): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $worksheet = $spreadsheet->getActiveSheet();\n        foreach ($visibleColumns as $column => $visibility) {\n            $worksheet->setCellValue(\"{$column}1\", $column);\n            $worksheet->getColumnDimension($column)->setVisible($visibility);\n        }\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $reloadedWorksheet = $reloadedSpreadsheet->getActiveSheet();\n        foreach ($visibleColumns as $column => $visibility) {\n            self::assertSame($visibility, $reloadedWorksheet->getColumnDimension($column)->getVisible());\n        }\n    }\n\n    /** @return array<int, array<int, array<string, bool>>> */\n    public static function dataProviderColumnVisibility(): array\n    {\n        return [\n            [\n                ['A' => false, 'B' => false, 'C' => true, 'D' => false, 'E' => true, 'F' => false],\n            ],\n        ];\n    }\n\n    /** @param array<string, string> $visibleSheets */\n    #[DataProvider('dataProviderSheetVisibility')]\n    public function testSheetVisibility(array $visibleSheets): void\n    {\n        $spreadsheet = new Spreadsheet();\n        $spreadsheet->removeSheetByIndex(0);\n        foreach ($visibleSheets as $sheetName => $visibility) {\n            $worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet, $sheetName));\n            $worksheet->setCellValue('A1', $sheetName);\n            $worksheet->setSheetState($visibility);\n        }\n\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        foreach ($visibleSheets as $sheetName => $visibility) {\n            $reloadedWorksheet = $reloadedSpreadsheet->getSheetByNameOrThrow($sheetName);\n            self::assertSame($visibility, $reloadedWorksheet->getSheetState());\n        }\n    }\n\n    /** @return array<int, array<int, array<string, string>>> */\n    public static function dataProviderSheetVisibility(): array\n    {\n        return [\n            [\n                [\n                    'Worksheet 1' => Worksheet::SHEETSTATE_HIDDEN,\n                    'Worksheet 2' => Worksheet::SHEETSTATE_VERYHIDDEN,\n                    'Worksheet 3' => Worksheet::SHEETSTATE_VISIBLE,\n                ],\n            ],\n        ];\n    }\n}\n"
  },
  {
    "path": "tests/PhpSpreadsheetTests/Writer/Xlsx/WmfTest.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpOffice\\PhpSpreadsheetTests\\Writer\\Xlsx;\n\nuse PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Drawing;\nuse PhpOffice\\PhpSpreadsheetTests\\Functional\\AbstractFunctional;\n\nclass WmfTest extends AbstractFunctional\n{\n    /**\n     * Test save and load XLSX file with wmf image.\n     */\n    public function testWmf(): void\n    {\n        // Read spreadsheet from file\n        $inputFilename = 'tests/data/Writer/XLSX/wmffile.xlsx';\n        $reader = new Xlsx();\n        $spreadsheet = $reader->load($inputFilename);\n        $drawings = $spreadsheet->getActiveSheet()->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing);\n        self::assertSame('wmf', $drawing->getExtension());\n\n        // Save spreadsheet to file and read it back\n        $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n        $drawings = $reloadedSpreadsheet->getActiveSheet()->getDrawingCollection();\n        self::assertCount(1, $drawings);\n        $drawing = $drawings[0];\n        self::assertInstanceOf(Drawing::class, $drawing);\n        self::assertSame('wmf', $drawing->getExtension());\n\n        $spreadsheet->disconnectWorksheets();\n        $reloadedSpreadsheet->disconnectWorksheets();\n    }\n}\n"
  },
  {
    "path": "tests/bootstrap.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nsetlocale(LC_ALL, 'en_US.utf8');\nini_set('error_reporting', (string) E_ALL);\n\nfunction phpunit10ErrorHandler(int $errno, string $errstr, string $filename, int $lineno): bool\n{\n    $x = error_reporting() & $errno;\n    if (\n        in_array(\n            $errno,\n            [\n                E_DEPRECATED,\n                E_WARNING,\n                E_NOTICE,\n                E_USER_DEPRECATED,\n                E_USER_NOTICE,\n                E_USER_WARNING,\n            ],\n            true\n        )\n    ) {\n        if (0 === $x) {\n            return true; // message suppressed - stop error handling\n        }\n\n        throw new Exception(\"$errstr $filename $lineno\");\n    }\n\n    return false; // continue error handling\n}\n\nset_error_handler('phpunit10ErrorHandler');\n"
  },
  {
    "path": "tests/data/Calculation/BinaryComparisonOperations.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [null, null, '=', true, true],\n    [null, null, '<>', false, false],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Calculation.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n/** @return mixed[] */\nfunction calculationTestDataGenerator(): array\n{\n    $dataArray1 = [\n        ['please +', 'please *', 'increment'],\n        [1, 1, 1], // sum is 3\n        [3, 3, 3], // product is 27\n    ];\n    $set0 = [3, $dataArray1, '=IF(A1=\"please +\", SUM(A2:C2), 2)', 'E5'];\n\n    $set1 = [3, $dataArray1, '=IF(TRUE(), SUM(A2:C2), 2)', 'E5'];\n\n    $formula1 = '=IF(A1=\"please +\",SUM(A2:C2),7 + IF(B1=\"please *\", 4, 2))';\n    $set2 = [3, $dataArray1, $formula1, 'E5'];\n\n    $dataArray1[0][0] = 'not please + something else';\n    $set3 = [11, $dataArray1, $formula1, 'E5'];\n\n    $dataArray2 = [\n        ['flag1', 'flag2', 'flag3', 'flag1'],\n        [1, 2, 3, 4],\n        [5, 6, 7, 8],\n    ];\n    $set4 = [3, $dataArray2, '=IF($A$1=$B$1,A2,IF($A$1=$C$1,B2,IF($A$1=$D$1,C2,C3)))', 'E5'];\n\n    $dataArray2[0][0] = 'flag3';\n    $set5 = [2, $dataArray2, '=IF(A1=B1,A2,IF(A1=C1,B2,IF(A1=D1,C2,C3)))', 'E5'];\n\n    $dataArray3 = [\n        [1, 2, 3],\n        [4, 5, 6],\n        [7, 8, 9],\n    ];\n    $set6 = [0, $dataArray3, '=IF(A1+B1>3,C1,0)', 'E5'];\n\n    $dataArray4 = [\n        ['noflag',    0, 0],\n        [127000,    0, 0],\n        [10000,  0.03, 0],\n        [20000,  0.06, 0],\n        [40000,  0.09, 0],\n        [70000,  0.12, 0],\n        [90000,  0.03, 0],\n    ];\n    $formula2 = '=IF(A1=\"flag\",IF(A2<10, 0) + IF(A3<10000, 0))';\n    $set7 = [false, $dataArray4, $formula2, 'E5'];\n\n    $dataArray5 = [\n        [1, 2],\n        [3, 4],\n        ['=A1+A2', '=SUM(B1:B2)'],\n        ['take A', 0],\n    ];\n    $formula3 = '=IF(A4=\"take A\", A3, B3)';\n    $set8 = [4, $dataArray5, $formula3, 'E5', ['A3'], ['B3']];\n\n    $dataArray6 = [\n        ['=IF(22,\"a\",\"b\")'],\n    ];\n    $set9 = ['a', $dataArray6, '=A1', 'A2'];\n\n    return [\n        $set0, $set1, $set2, $set3, $set4, $set5, $set6, $set7, $set8, $set9,\n    ];\n}\n\nreturn calculationTestDataGenerator();\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/DATE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [6890.0, 18, 11, 11], // year less than 1900, adds 1900 (1918-11-11)\n    [44809.0, 122, 9, 5], // year less than 1900, adds 1900 (2022-09-05)\n    [693845.0, 1899, 9, 5], // year less than 1900, adds 1900 (3799-09-05)\n    [1.0, 1900, 1, 1], // Excel 1900 Calendar BaseDate\n    [59.0, 1900, 2, 28], // Day before Excel mythical 1900 leap day\n    [60.0, 1900, 2, 29], // Excel mythical 1900 leap day\n    [61.0, 1900, 3, 1], // Day after Excel mythical 1900 leap day\n    [713.0, 1901, 12, 13], // Day after actual 1904 leap day\n    [714.0, 1901, 12, 14], // signed 32-bit Unix Timestamp Earliest Date\n    [1461.0, 1903, 12, 31], // Day before Excel 1904 Calendar Base Date\n    [1462.0, 1904, 1, 1], // Excel 1904 Calendar Base Date\n    [1463.0, 1904, 1, 2], // Day after Excel 1904 Calendar Base Date\n    [22269.0, 1960, 12, 19],\n    [25569.0, 1970, 1, 1], // Unix Timestamp Base Date\n    [30292.0, 1982, 12, 7],\n    [39611.0, 2008, 6, 12],\n    [50000.0, 2036, 11, 21],\n    [50424.0, 2038, 1, 19], // 32-bit signed Unix Timestamp Latest Date\n    [50425.0, 2038, 1, 20], // Day after 32-bit signed Unix Timestamp Latest Date\n    [39448.0, 2008, 1, 1],\n    [39446.0, 2008, 1, -1],\n    [39417.0, 2008, 1, -30],\n    [39416.0, 2008, 1, -31],\n    [39082.0, 2008, 1, -365],\n    [39508.0, 2008, 3, 1],\n    [39506.0, 2008, 3, -1],\n    [39142.0, 2008, 3, -365],\n    [39387.0, 2008, -1, 1],\n    [39083.0, 2008, -11, 1],\n    [39052.0, 2008, -12, 1],\n    [39022.0, 2008, -13, 1],\n    [39051.0, 2008, -13, 30],\n    [38991.0, 2008, -13, -30],\n    [38990.0, 2008, -13, -31],\n    [39814.0, 2008, 13, 1],\n    [40210.0, 2008, 26, 1],\n    [40199.0, 2008, 26, -10],\n    [38686.0, 2008, -26, 61],\n    [39641.0, 2010, -15, -50],\n    [39741.0, 2010, -15, 50],\n    [40552.0, 2010, 15, -50],\n    [40652.0, 2010, 15, 50],\n    [40179.0, 2010, 1.5, 1],\n    [40178.0, 2010, 1.5, 0],\n    [40148.0, 2010, 0, 1.5],\n    [40179.0, 2010, 1, 1.5],\n    [41075.0, 2012, 6, 15],\n    [3819.0, 10, 6, 15],\n    [ExcelError::NAN(), -20, 6, 15],\n    [2958465.0, 9999, 12, 31], // Excel maximum date\n    [ExcelError::NAN(), 10000, 1, 1], // Exceeded Excel maximum date\n    [39670.0, 2008, 8, 10],\n    [39813.0, 2008, 12, 31],\n    [39692.0, 2008, 8, 32],\n    [39844.0, 2008, 13, 31],\n    [39813.0, 2009, 1, 0],\n    [39812.0, 2009, 1, -1],\n    'month expressed as true' => [39812.0, 2009, true, -1],\n    [39782.0, 2009, 0, 0],\n    [39781.0, 2009, 0, -1],\n    [39752.0, 2009, -1, 0],\n    [39751.0, 2009, -1, -1],\n    [40146.0, 2010, 0, -1],\n    'month expressed as false' => [40146.0, 2010, false, -1],\n    'month expressed as null' => [40146.0, 2010, null, -1],\n    [40329.0, 2010, 5, 31],\n    [40199.0, 2010, 1, '21st'], // Excel can't parse ordinal, PhpSpreadsheet can\n    [40200.0, 2010, 1, '22nd'], // Excel can't parse ordinal, PhpSpreadsheet can\n    [40201.0, 2010, 1, '23rd'], // Excel can't parse ordinal, PhpSpreadsheet can\n    [40202.0, 2010, 1, '24th'], // Excel can't parse ordinal, PhpSpreadsheet can\n    [40258.0, 2010, 'March', '21st'], // ordinal and month name\n    // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date\n    [40258.0, 2010, 'March', 21], // Excel can't parse month name, PhpSpreadsheet can\n    'month expressed as string' => [40258.0, 2010, '03', 21],\n    'month expressed as invalid string' => [ExcelError::VALUE(), 2010, '03x', 21],\n    [ExcelError::VALUE(), 'ABC', 1, 21],\n    [ExcelError::VALUE(), 2010, 'DEF', 21],\n    [ExcelError::VALUE(), 2010, 3, 'GHI'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/DATEDIF.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [365, '2016-01-01', '2016-12-31', 'YD'],\n    [364, '2015-01-01', '2015-12-31', 'YD'],\n    [364, '2015-01-01', '2016-12-31', 'YD'],\n    [365, '2016-01-01', '2017-12-31', 'YD'],\n    [364, '2017-01-01', '2018-12-31', 'YD'],\n    [ExcelError::VALUE(), 'ABC', '2007-1-10', 'Y'],\n    [ExcelError::VALUE(), '2007-1-1', 'DEF', 'Y'],\n    [ExcelError::VALUE(), '2007-1-1', '2007-1-10', 'XYZ'],\n    [ExcelError::NAN(), '2007-1-10', '2007-1-1', 'Y'],\n    [0, '2007-12-31', '2008-1-10', 'Y'],\n    [0, '2007-1-1', '2007-1-10', 'Y'],\n    [0, '2007-1-1', '2007-1-10', 'M'],\n    [9, '2007-1-1', '2007-1-10', 'D'],\n    [0, '2007-1-1', '2007-1-10', 'YM'],\n    [9, '2007-1-1', '2007-1-10', 'YD'],\n    [9, '2007-1-1', '2007-1-10', 'MD'],\n    [0, '2007-1-1', '2007-12-31', 'Y'],\n    [11, '2007-1-1', '2007-12-31', 'M'],\n    [364, '2007-1-1', '2007-12-31', 'D'],\n    [11, '2007-1-1', '2007-12-31', 'YM'],\n    [364, '2007-1-1', '2007-12-31', 'YD'],\n    [30, '2007-1-1', '2007-12-31', 'MD'],\n    [1, '2007-1-1', '2008-7-1', 'Y'],\n    [18, '2007-1-1', '2008-7-1', 'M'],\n    [547, '2007-1-1', '2008-7-1', 'D'],\n    [6, '2007-1-1', '2008-7-1', 'YM'],\n    [181, '2007-1-1', '2008-7-1', 'YD'],\n    [0, '2007-1-1', '2008-7-1', 'MD'],\n    [0, '2007-1-1', '2007-1-31', 'Y'],\n    [0, '2007-1-1', '2007-1-31', 'M'],\n    [30, '2007-1-1', '2007-1-31', 'D'],\n    [0, '2007-1-1', '2007-1-31', 'YM'],\n    [30, '2007-1-1', '2007-1-31', 'YD'],\n    [30, '2007-1-1', '2007-1-31', 'MD'],\n    [0, '2007-1-1', '2007-2-1', 'Y'],\n    [1, '2007-1-1', '2007-2-1', 'M'],\n    [31, '2007-1-1', '2007-2-1', 'D'],\n    [1, '2007-1-1', '2007-2-1', 'YM'],\n    [31, '2007-1-1', '2007-2-1', 'YD'],\n    [0, '2007-1-1', '2007-2-1', 'MD'],\n    [0, '2007-1-1', '2007-2-28', 'Y'],\n    [1, '2007-1-1', '2007-2-28', 'M'],\n    [58, '2007-1-1', '2007-2-28', 'D'],\n    [1, '2007-1-1', '2007-2-28', 'YM'],\n    [58, '2007-1-1', '2007-2-28', 'YD'],\n    [27, '2007-1-1', '2007-2-28', 'MD'],\n    [0, '2007-1-31', '2007-2-1', 'Y'],\n    [0, '2007-1-31', '2007-2-1', 'M'],\n    [1, '2007-1-31', '2007-2-1', 'D'],\n    [0, '2007-1-31', '2007-2-1', 'YM'],\n    [1, '2007-1-31', '2007-2-1', 'YD'],\n    [1, '2007-1-31', '2007-2-1', 'MD'],\n    [0, '2007-1-31', '2007-3-1', 'Y'],\n    [1, '2007-1-31', '2007-3-1', 'M'],\n    [29, '2007-1-31', '2007-3-1', 'D'],\n    [1, '2007-1-31', '2007-3-1', 'YM'],\n    [29, '2007-1-31', '2007-3-1', 'YD'],\n    [-2, '2007-1-31', '2007-3-1', 'MD'],\n    [0, '2007-1-31', '2007-3-31', 'Y'],\n    [2, '2007-1-31', '2007-3-31', 'M'],\n    [59, '2007-1-31', '2007-3-31', 'D'],\n    [2, '2007-1-31', '2007-3-31', 'YM'],\n    [59, '2007-1-31', '2007-3-31', 'YD'],\n    [0, '2007-1-31', '2007-3-31', 'MD'],\n    [0, '2008-1-1', '2008-9-1', 'Y'],\n    [8, '2008-1-1', '2008-9-1', 'M'],\n    [244, '2008-1-1', '2008-9-1', 'D'],\n    [8, '2008-1-1', '2008-9-1', 'YM'],\n    [244, '2008-1-1', '2008-9-1', 'YD'],\n    [0, '2008-1-1', '2008-9-1', 'MD'],\n    [1, '2007-2-1', '2008-4-1', 'Y'],\n    [14, '2007-2-1', '2008-4-1', 'M'],\n    [425, '2007-2-1', '2008-4-1', 'D'],\n    [2, '2007-2-1', '2008-4-1', 'YM'],\n    [59, '2007-2-1', '2008-4-1', 'YD'],\n    [0, '2007-2-1', '2008-4-1', 'MD'],\n    [47, '1960-12-19', '2008-6-28', 'Y'],\n    [570, '1960-12-19', '2008-6-28', 'M'],\n    [17358, '1960-12-19', '2008-6-28', 'D'],\n    [6, '1960-12-19', '2008-6-28', 'YM'],\n    [191, '1960-12-19', '2008-6-28', 'YD'],\n    [9, '1960-12-19', '2008-6-28', 'MD'],\n    [25, '1982-12-7', '2008-6-28', 'Y'],\n    [306, '1982-12-7', '2008-6-28', 'M'],\n    [9335, '1982-12-7', '2008-6-28', 'D'],\n    [6, '1982-12-7', '2008-6-28', 'YM'],\n    [203, '1982-12-7', '2008-6-28', 'YD'],\n    [21, '1982-12-7', '2008-6-28', 'MD'],\n    [2, '2007-12-25', '2010-3-17', 'Y'],\n    [26, '2007-12-25', '2010-3-17', 'M'],\n    [813, '2007-12-25', '2010-3-17', 'D'],\n    [2, '2007-12-25', '2010-3-17', 'YM'],\n    [82, '2007-12-25', '2010-3-17', 'YD'],\n    [20, '2007-12-25', '2010-3-17', 'MD'],\n    [51, '19-12-1960', '26-01-2012', 'Y'],\n    [613, '19-12-1960', '26-01-2012', 'M'],\n    [18665, '19-12-1960', '26-01-2012', 'D'],\n    [1, '19-12-1960', '26-01-2012', 'YM'],\n    [11, '19-12-1960', '26-11-1962', 'YM'],\n    [38, '19-12-1960', '26-01-2012', 'YD'],\n    [7, '19-12-1960', '26-01-2012', 'MD'],\n    [0, '19-12-1960', '12-12-1961', 'Y'],\n    [1, '19-12-1960', '12-12-1962', 'Y'],\n    [51, '19-12-1960', '12-12-2012', 'Y'],\n    [0, '1982-12-07', '1982-12-7', 'D'],\n    [244, '2008-1-1', '2008-9-1'], // default unit is D\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/DATEVALUE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\n//  Date String, Result\n// Note that Excel fails ordinal number forms but PhpSpreadsheet parses them\nreturn [\n    [ExcelError::VALUE(), '25-Dec-1899'],\n    [ExcelError::VALUE(), '31-Dec-1899'],\n    [1, '1-Jan-1900'],\n    [59, '1900/2/28'],\n    [60, '29-02-1900'],\n    [60, '29th February 1900'], // ordinal\n    [61, '1900/3/1'],\n    [713, '13-12-1901'],\n    [714, '14-12-1901'],\n    [1461, '1903/12/31'],\n    [1462, '1-Jan-1904'],\n    [1463, '2nd-Jan-1904'], // ordinal\n    [22269, '19-12-1960'],\n    [25569, '1st January 1970'], // ordinal\n    [30292, '7-Dec-1982'],\n    [39448, '1-1-2008'],\n    [50424, '2038-01-19'],\n    [39601, '2-6-2008'],\n    [39807, 'December 25th 2008'], // ordinal\n    [39448, '1 Jan-2008'],\n    // MS Excel success or failure dependent on country settings\n    [39813, '12-31-2008'],\n    // PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings\n    [39813, '31-12-2008'],\n    // MS Excel success or failure dependent on country settings\n    [39682, '8/22/2008'],\n    // PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings\n    [39682, '22/8/2008'],\n    [39682, '22/8/08'],\n    [39682, '22-AUG-2008'],\n    [39501, '2008/02/23'],\n    [39635, '6-7-2008'],\n    // MS Excel success or failure dependent on country settings\n    [39141, '28-2-2007'],\n    // PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings\n    [39141, '2-28-2007'],\n    [ExcelError::VALUE(), '29-2-2007'],\n    [36161, '1/1/1999'],\n    [19925, '1954-07-20'],\n    [36029, '22 August 98'],\n    [39142, '1st March 2007'], // ordinal\n    [ExcelError::VALUE(), 'The 1st day of March 2007'],\n    ['Y-01-01', '1 Jan'], // Jan 1 of the current year\n    ['Y-12-31', '31/12'], // Dec 31 of the current year\n    // Excel reads as 1st December 1931, not 31st December in current year.\n    // This result is locale-dependent in Excel, in a manner not\n    // supported by PhpSpreadsheet.\n    [11658, '12/31'],\n    ['Y-07-05', '5-JUL'], // July 5 of the current year\n    ['Y-07-05', '5 July'], // July 5 of the current year\n    [39783, '12/2008'],\n    [11963, '10/32'],\n    [ExcelError::VALUE(), 11],\n    [ExcelError::VALUE(), 1],\n    [ExcelError::VALUE(), 12345],\n    [ExcelError::VALUE(), 12],\n    [40210, 'Feb-2010'], // implicit day of month is 1\n    [40221, '12-Feb-2010'],\n    [40221, 'Feb-12-2010'], // MS Excel #VALUE!\n    [40221, 'February-12-2010'], // MS Excel #VALUE!\n    [40221, 'February 12 2010'], // MS Excel #VALUE!\n    [40227, '18 Feb 2010'],\n    [40254, '17th 3rd 2010'], // MS Excel #VALUE!\n    [40227, 'Feb 18th 2010'], // MS Excel #VALUE!\n    [40210, '1st Feb 2010'], // MS Excel #VALUE!\n    [40210, '1st-Feb-2010'], // Excel #VALUE!\n    [ExcelError::VALUE(), '1me Fev 2010'],\n    // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date\n    [40210, 'February 1st 2010'], // Excel #VALUE!\n    [40211, '2nd Feb 2010'], // Excel #VALUE!\n    [ExcelError::VALUE(), 'Second Feb 2010'],\n    [ExcelError::VALUE(), 'First August 2010'],\n    [40391, '1st August 2010'], // Excel #VALUE!\n    [0, '15:30:25'],\n    [ExcelError::VALUE(), 'ABCDEFGHIJKMNOPQRSTUVWXYZ'],\n    [ExcelError::VALUE(), 1999],\n    [ExcelError::VALUE(), '32/32'],\n    [ExcelError::VALUE(), '1910-'],\n    [ExcelError::VALUE(), '10--'],\n    [ExcelError::VALUE(), '--10'],\n    [ExcelError::VALUE(), '--1910'],\n    //[#VALUE!, -JUL-1910], We can parse this, Excel cant\n    [ExcelError::VALUE(), '2008-08-'],\n    [36751, '0-08-13'],\n    [ExcelError::VALUE(), false],\n    [ExcelError::VALUE(), true],\n    'do not try to parse if no digits' => [ExcelError::VALUE(), 'x'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/DAY.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\n//  Excel Result, Argument\nreturn [\n    [19, 22269],\n    [1, 30348],\n    [10, 30843],\n    [11, '11-Nov-1918'],\n    [28, '28-Feb-1904'],\n    [25, '1960-12-25'],\n    [ExcelError::VALUE(), '30-Feb-1904'],\n    [ExcelError::VALUE(), 'Invalid'],\n    // The following will all differ between Excel and OpenOffice\n    [ExcelError::NAN(), -1],\n    [1, 1],\n    [0, 0.5],\n    [0, 0],\n    [1, true],\n    [0, false],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/DAYOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\n//  OpenOffice Result, Argument\nreturn [\n    [19, 22269],\n    [1, 30348],\n    [10, 30843],\n    [11, '11-Nov-1918'],\n    [28, '28-Feb-1904'],\n    [ExcelError::VALUE(), '30-Feb-1904'],\n    [ExcelError::VALUE(), 'Invalid'],\n    // The following will all differ between Excel and OpenOffice\n    [29, -1],\n    [31, 1],\n    [30, 0.5],\n    [30, 0],\n    [31, true],\n    [30, false],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/DAYS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [ExcelError::VALUE(), '2007-1-10', 'ABC'],\n    [ExcelError::VALUE(), 'DEF', '2007-1-1'],\n    [9, '2007-1-10', '2007-1-1'],\n    [-9, '2007-1-1', '2007-1-10'],\n    [364, '2007-12-31', '2007-1-1'],\n    [547, '2008-7-1', '2007-1-1'],\n    [30, '2007-1-31', '2007-1-1'],\n    [31, '2007-2-1', '2007-1-1'],\n    [58, '2007-2-28', '2007-1-1'],\n    [1, '2007-2-1', '2007-1-31'],\n    [29, '2007-3-1', '2007-1-31'],\n    [59, '2007-3-31', '2007-1-31'],\n    [244, '2008-9-1', '2008-1-1'],\n    [425, '2008-4-1', '2007-2-1'],\n    [17358, '2008-6-28', '1960-12-19'],\n    [9335, '2008-6-28', '1982-12-7'],\n    [32, '2000-3-31', '2000-2-28'],\n    [31, '2000-3-31', '2000-2-29'],\n    [31, 36616, 36585],\n    [-31, 36585, 36616],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/DAYS360.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [ExcelError::VALUE(), 'ABC', '2007-1-10', false],\n    [ExcelError::VALUE(), '2007-1-1', 'DEF', true],\n    [ExcelError::VALUE(), '2007-1-1', '2007-1-10', 'XYZ'],\n    [ExcelError::VALUE(), '2007-1-10', '2007-1-1', 1],\n    [9, '2007-1-1', '2007-1-10', false],\n    [9, '2007-1-1', '2007-1-10', true],\n    [360, '2007-1-1', '2007-12-31'],\n    [360, '2007-1-1', '2007-12-31', false],\n    [359, '2007-1-1', '2007-12-31', true],\n    [540, '2007-1-1', '2008-7-1', false],\n    [540, '2007-1-1', '2008-7-1', true],\n    [30, '2007-1-1', '2007-1-31', false],\n    [29, '2007-1-1', '2007-1-31', true],\n    [30, '2007-1-1', '2007-2-1', false],\n    [30, '2007-1-1', '2007-2-1', true],\n    [57, '2007-1-1', '2007-2-28', false],\n    [57, '2007-1-1', '2007-2-28', true],\n    [1, '2007-1-31', '2007-2-1', false],\n    [1, '2007-1-31', '2007-2-1', true],\n    [31, '2007-1-31', '2007-3-1', false],\n    [31, '2007-1-31', '2007-3-1', true],\n    [60, '2007-1-31', '2007-3-31', false],\n    [60, '2007-1-31', '2007-3-31', true],\n    [240, '2008-1-1', '2008-9-1', false],\n    [240, '2008-1-1', '2008-9-1', true],\n    [420, '2007-2-1', '2008-4-1', false],\n    [420, '2007-2-1', '2008-4-1', true],\n    [17109, '1960-12-19', '2008-6-28', false],\n    [17109, '1960-12-19', '2008-6-28', true],\n    [9201, '1982-12-7', '2008-6-28', false],\n    [9201, '1982-12-7', '2008-6-28', true],\n    [33, '2000-2-28', '2000-3-31', false],\n    [32, '2000-2-28', '2000-3-31', true],\n    [30, '2000-2-29', '2000-3-31', false],\n    [31, '2000-2-29', '2000-3-31', true],\n    [30, '2000-2-29', '2000-3-31'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/EDATE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [39493.0, '15-Jan-2008', 1],\n    [39431.0, '15-Jan-2008', -1],\n    [39522.0, '15-Jan-2008', 2],\n    [39202.0, '31-Mar-2007', 1],\n    [39141.0, '31-Mar-2007', -1],\n    [39507.0, '31-Mar-2008', -1],\n    [39416.0, '31-Mar-2008', -4],\n    [39141.0, '29-Feb-2008', -12],\n    [39248.0, '15-Mar-2007', 3],\n    [22269.0, 22269.0, 0],\n    [22269.0, 22269, 0],\n    [22331.0, 22269.0, 2],\n    [22331.0, 22269.75, 2],\n    [25618.0, 22269.0, '110'],\n    [18920.0, 22269.0, -110],\n    [ExcelError::VALUE(), '15-Mar-2007', 'ABC'],\n    [ExcelError::VALUE(), 'Invalid', 12],\n    [ExcelError::VALUE(), true, 12],\n    [ExcelError::VALUE(), '2020-01-01', false],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/EOMONTH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [39507.0, '15-Jan-2008', 1],\n    [39447.0, '15-Jan-2008', -1],\n    [39538.0, '15-Jan-2008', 2],\n    [39202.0, '31-Mar-2007', 1],\n    [39141.0, '31-Mar-2007', -1],\n    [39507.0, '31-Mar-2008', -1],\n    [39416.0, '31-Mar-2008', -4],\n    [39141.0, '29-Feb-2008', -12],\n    [39263.0, '15-Mar-2007', 3],\n    [22281.0, 22269.0, 0],\n    [22340.0, '22269.0', 2],\n    [25627.0, 22269.0, 110],\n    [18932.0, 22269.0, -110],\n    [22371.0, 22269.0, 3],\n    [22371.0, 22269.75, 3],\n    [22371.0, 22269.0, 3.75],\n    [ExcelError::VALUE(), '15-Mar-2007', false],\n    [ExcelError::VALUE(), '15-Mar-2007', true],\n    [ExcelError::VALUE(), '15-Mar-2007', 'ABC'],\n    [ExcelError::VALUE(), 'Invalid', 12],\n    [ExcelError::VALUE(), true, 12],\n    [ExcelError::VALUE(), '2020-01-01', false],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/HOUR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [6, 0.25],\n    [18, 0.75],\n    [12, 0.5],\n    [14, 0.6],\n    [11, '11-Nov-1918 11:11'],\n    [23, '11:59 PM'],\n    [23, '23:59:59'],\n    [0, 3600],\n    [ExcelError::VALUE(), '31:62:93'],\n    [ExcelError::NAN(), -3600],\n    [0, 7200],\n    [0, 65535],\n    [ExcelError::VALUE(), \"1 O'Clock\"],\n    [0, false],\n    [0, true],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/ISOWEEKNUM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [51, '21-Dec-2000'],\n    [52, '2000-01-01'],\n    [1, '2000-01-03'],\n    [52, '1995-01-01'],\n    [1, '1995-01-07'],\n    [2, '1995-01-10'],\n    [1, '2018-01-01'],\n    [ExcelError::VALUE(), '1800-01-01'],\n    [52, false],\n    [52, true],\n    [52, 0],\n    [52, 1],\n    [1, 2],\n    [1, 8],\n    [2, 9],\n    [53, '1904-01-01'],\n    [52, '1900-01-01'],\n    [1, '1900-01-07'],\n    [1, '1900-01-08'],\n    [2, '1900-01-09'],\n    [9, '1900-03-04'],\n    [10, '1900-03-05'],\n    [ExcelError::NAN(), -1],\n    [39, 1000],\n    [25, '2001'],\n    [25, 2002],\n    [25, 2003],\n    [26, 2004],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/ISOWEEKNUM1904.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [51, '21-Dec-2000'],\n    [52, '2000-01-01'],\n    [1, '2000-01-03'],\n    [52, '1995-01-01'],\n    [1, '1995-01-07'],\n    [2, '1995-01-10'],\n    [1, '2018-01-01'],\n    [ExcelError::VALUE(), '1800-01-01'],\n    [53, false],\n    [53, true],\n    [53, 0],\n    [53, 1],\n    [53, 2],\n    [1, 3],\n    [2, 10],\n    [53, '1904-01-01'],\n    [ExcelError::VALUE(), '1900-01-01'],\n    [ExcelError::VALUE(), '1903-12-31'],\n    [ExcelError::VALUE(), '1900-01-07'],\n    [ExcelError::NAN(), -1],\n    [39, 1000],\n    [25, '2001'],\n    [25, 2002],\n    [25, 2003],\n    [25, 2004],\n    [26, 2005],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/MINUTE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [48, 0.2],\n    [36, '0.4'],\n    [24, 0.6],\n    [12, 0.8],\n    [15, '11-Nov-1918 11:15'],\n    [59, '11:59 PM'],\n    [59, '23:59:59'],\n    [ExcelError::VALUE(), '31:62:93'],\n    [0, 3600],\n    [ExcelError::NAN(), -3600],\n    [0, 12500],\n    [0, 65535],\n    [ExcelError::VALUE(), \"Half past 1 O'Clock\"],\n    [0, false],\n    [0, true],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/MONTH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [1, 0],\n    [12, 22269.0],\n    [2, 30348.0],\n    [6, 30843.0],\n    [11, '11-Nov-1918'],\n    [2, '28-Feb-1904'],\n    [7, '01 Jul 2003'],\n    [4, '38094'],\n    [12, 'Dec 2003'],\n    [12, '1960-12-25'],\n    [11, '1918-11-01'],\n    [ExcelError::VALUE(), '1918-13-11'],\n    [ExcelError::NAN(), -10],\n    [ExcelError::VALUE(), 'ABCD'],\n    [1, false],\n    [1, true],\n    [3, 61],\n    [2, 60], // because of fake leap day\n    [12, 366], // because of fake leap day\n    [1, 367],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/NETWORKDAYS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [8, '1-Jan-2007', '10-Jan-2007'],\n    [3, '18-Jun-2008', '20-Jun-2008'],\n    [5, '16-Jun-2008', '20-Jun-2008'],\n    [5, '14-Jun-2008', '20-Jun-2008'],\n    [1, '20-Jun-2008', '20-Jun-2008'],\n    [0, '21-Jun-2008', '21-Jun-2008'],\n    [0, '20-Jun-2008', '20-Jun-2008', ['20-Jun-2008']],\n    [0, '20-Jun-2008', '20-Jun-2008', ['20-Jun-2008', '20-Jun-2008']],\n    [8, '14-Jun-2008', '25-Jun-2008'],\n    [17, '19-Dec-1960', '10-Jan-1961'],\n    [-17, '10-Jan-1961', '19-Dec-1960'],\n    [16, '19-Dec-1960', '10-Jan-1961', ['25-Dec-1960', '26-Dec-1960', '01-Jan-1961']],\n    [-16, '10-Jan-1961', '19-Dec-1960', ['25-Dec-1960', '26-Dec-1960', '01-Jan-1961']],\n    [65, '1-Jan-2007', '31-Mar-2007'],\n    [23, '1-Jan-2007', '31-Jan-2007'],\n    [24, '1-Jan-2007', '1-Feb-2007'],\n    [43, '1-Jan-2007', '28-Feb-2007'],\n    [2, '31-Jan-2007', '1-Feb-2007'],\n    [ExcelError::VALUE(), 'ABQZ', '1-Feb-2007'],\n    [ExcelError::VALUE(), '1-Feb-2007', 'ABQZ'],\n    [10, '2021-02-13', '2021-02-27'],\n    [10, '2021-02-14', '2021-02-27'],\n    [3, '2021-02-14', '2021-02-17'],\n    [8, '2021-02-14', '2021-02-24'],\n    [9, '2021-02-14', '2021-02-25'],\n    [10, '2021-02-14', '2021-02-26'],\n    [9, '2021-02-13', '2021-02-25'],\n    [10, '2021-02-12', '2021-02-25'],\n    [ExcelError::VALUE(), '10-Jan-1961', '19-Dec-1960', ['25-Dec-1960', 'ABQZ', '01-Jan-1961']],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/SECOND.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [57, 0.2339930556],\n    [13, 0.4202893519],\n    [22, 0.60789351845],\n    [11, 0.8022106481],\n    [35, '11-Nov-1918 11:15:35'],\n    [0, '11:59 PM'],\n    [59, '23:59:59'],\n    [0, 3600],\n    [ExcelError::VALUE(), '23:59:99'],\n    [ExcelError::NAN(), -3601],\n    [0, 12500],\n    [0, 65535],\n    [ExcelError::VALUE(), \"Half past 1 O'Clock\"],\n    [0, false],\n    [0, true],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/TIME.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [0.757766203704, 18, 11, 11],\n    [0.260474537037, 6, 15, 5],\n    [0.520949074074, 12, 30, 10],\n    [0.781539351852, 18, 45, 25],\n    [0.647800925926, 15, 32, 50],\n    [0.458321759259, 11, false, -1],\n    [0.584780092593, 13, 62, 5], // Minutes > 60\n    [0.550868055556, 13, 12, 75], // Seconds > 60\n    [0.319641203704, 9, -80, 17],\n    [ExcelError::NAN(), 2, -120, -1],\n    [1.1574074E-5, 2, -120, 1],\n    [0.500717592593, 36, true, 2],\n    [ExcelError::NAN(), -1, 2, 3],\n    [0.001030092593, -1, 61, 29],\n    [0.0, -1, 61, -60],\n    [ExcelError::VALUE(), 'A', 21, 22],\n    [0.499305555556, 11, 59, 0],\n    [0.5, 12, 0, 0],\n    [0.700115740741, 16, 48, 10],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/TIMEVALUE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [0, '12:00:00 am'],\n    [0.000717593, '12:01:02 am'],\n    [0.502083333, '12:03 pm'],\n    [0.504988426, '12:7:11 pm'],\n    [0.176145833, '4:13:39'],\n    [0.764085648, '6:20:17 pm'],\n    [0.773229167, '18:33:27'],\n    [0.143923611, '31/12/2007 03:27:15'],\n    [0.906192133, '9:44:55 pm'],\n    [ExcelError::VALUE(), 12],\n    [0.5423611101, '13:01'],\n    [0.40625, '33:45'],\n    [ExcelError::VALUE(), '13:01PM'],\n    [ExcelError::VALUE(), false],\n    [ExcelError::VALUE(), true],\n    'do not try to parse if no digits' => [ExcelError::VALUE(), 'x'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/WEEKDAY.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [5, '24-Oct-1968'],\n    [5, '24-Oct-1968', 1],\n    [4, '24-Oct-1968', 2],\n    [3, '24-Oct-1968', 3],\n    [ExcelError::NAN(), '24-Oct-1968', 4],\n    [ExcelError::NAN(), '24-Oct-1968', 0],\n    [ExcelError::NAN(), '24-Oct-1968', -1],\n    [4, '2000-06-14'],\n    [3, '2000-06-14', 2],\n    [2, '2000-06-14', 3],\n    [4, '1996-07-24'],\n    [3, '1996-07-24', 2],\n    [2, '1996-07-24', 3],\n    [7, '1996-07-27'],\n    [6, '1996-07-27', 2],\n    [5, '1996-07-27', 3],\n    [1, '1977-7-31'],\n    [7, '1977-7-31', 2],\n    [6, '1977-7-31', 3],\n    [2, '1977-8-1'],\n    [1, '1977-8-1', 2],\n    [0, '1977-8-1', 3],\n    [7, '1900-2-5', 2],\n    [4, '1900-2-1'],\n    [6, 38093],\n    [6, 38093, 1],\n    [5, 38093, 2],\n    [4, 38093, 3],\n    [ExcelError::VALUE(), '3/7/1977', 'A'],\n    [ExcelError::NAN(), '3/7/1977', 0],\n    [ExcelError::VALUE(), 'Invalid', 1],\n    [ExcelError::NAN(), -1],\n    [1, false],\n    [2, true],\n    [1, '1900-01-01'],\n    [7, '1900-01-01', 2],\n    [7, '1900-02-05', 2],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/WEEKNUM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [52, '21-Dec-2000', 1],\n    [1, '2000-01-01', 1],\n    [2, '2000-01-02', 1],\n    [1, '2000-01-01', 2],\n    [2, '2000-01-03', 2],\n    [1, '1995-01-01', 1],\n    [1, '1995-01-07', 1],\n    [2, '1995-01-08', 1],\n    [1, '1995-01-01', 2],\n    [2, '1995-01-02', 2],\n    [28, '3/7/1977'],\n    [ExcelError::VALUE(), '3/7/1977', 'A'],\n    [ExcelError::NAN(), '3/7/1977', 0],\n    [ExcelError::NAN(), '3/7/1977', -1],\n    [ExcelError::VALUE(), 'Invalid', 1],\n    [ExcelError::NAN(), -1],\n    [53, '2019-12-29', 1],\n    [52, '2019-12-29', 2],\n    [ExcelError::NAN(), '2019-12-29', 3],\n    [ExcelError::NAN(), '2019-12-29', 10],\n    [52, '2019-12-29', 11],\n    [52, '2019-12-29', 12],\n    [53, '2019-12-29', 13],\n    [53, '2019-12-29', 14],\n    [53, '2019-12-29', 15],\n    [53, '2019-12-29', 16],\n    [53, '2019-12-29', 17],\n    [ExcelError::NAN(), '2019-12-29', 18],\n    [ExcelError::NAN(), '2019-12-29', 20],\n    [ExcelError::NAN(), '2019-12-29', 22],\n    [52, '2019-12-29', 21],\n    [53, '2020-12-29', 21],\n    [52, '2021-12-29', 21],\n    [52, '2022-12-29', 21],\n    [1, '2020-01-01', 21],\n    [53, '2021-01-01', 21],\n    [52, '2022-01-01', 21],\n    [52, '2023-01-01', 21],\n    [2, '2020-01-08', 21],\n    [1, '2021-01-08', 21],\n    [1, '2022-01-08', 21],\n    [1, '2023-01-08', 21],\n    [1, '2025-12-29', 21],\n    [9, '1900-03-01'],\n    [2, '1900-01-07', 2],\n    [2, '1905-01-07', 2],\n    [1, '1900-01-01'],\n    [1, '1900-01-01', 2],\n    [2, '1900-01-02', 2],\n    [1, null, 11],\n    [1, 0, 11],\n    [1, 0, 12],\n    [1, 0, 13],\n    [1, 0, 14],\n    [1, 0, 15],\n    [1, 0, 16],\n    [0, 0, 17],\n    [1, '1905-01-01', 17],\n    [0, 0],\n    [0, null, null],\n    [1, null, 2],\n    [1, 0, 2],\n    [1, '1906-01-01'],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false, 21],\n    [52, null, 21],\n    [53, '1904-01-01', 21],\n    [52, '1900-01-01', 21],\n    [1, '1900-01-07', 21],\n    [1, '1900-01-08', 21],\n    [2, '1900-01-09', 21],\n    [9, '1900-03-04', 21],\n    [10, '1900-03-05', 21],\n    [52, '21-Dec-2000'],\n    [52, '21-Dec-2000', null],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/WEEKNUM1904.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [52, '21-Dec-2000', 1],\n    [1, '2000-01-01', 1],\n    [2, '2000-01-02', 1],\n    [1, '2000-01-01', 2],\n    [2, '2000-01-03', 2],\n    [1, '1995-01-01', 1],\n    [1, '1995-01-07', 1],\n    [2, '1995-01-08', 1],\n    [1, '1995-01-01', 2],\n    [2, '1995-01-02', 2],\n    [28, '3/7/1977'],\n    [ExcelError::VALUE(), '3/7/1977', 'A'],\n    [ExcelError::NAN(), '3/7/1977', 0],\n    [ExcelError::NAN(), '3/7/1977', -1],\n    [ExcelError::VALUE(), 'Invalid', 1],\n    [ExcelError::NAN(), -1],\n    [53, '2019-12-29', 1],\n    [52, '2019-12-29', 2],\n    [ExcelError::NAN(), '2019-12-29', 3],\n    [ExcelError::NAN(), '2019-12-29', 10],\n    [52, '2019-12-29', 11],\n    [52, '2019-12-29', 12],\n    [53, '2019-12-29', 13],\n    [53, '2019-12-29', 14],\n    [53, '2019-12-29', 15],\n    [53, '2019-12-29', 16],\n    [53, '2019-12-29', 17],\n    [ExcelError::NAN(), '2019-12-29', 18],\n    [ExcelError::NAN(), '2019-12-29', 20],\n    [ExcelError::NAN(), '2019-12-29', 22],\n    [52, '2019-12-29', 21],\n    [53, '2020-12-29', 21],\n    [52, '2021-12-29', 21],\n    [52, '2022-12-29', 21],\n    [1, '2020-01-01', 21],\n    [53, '2021-01-01', 21],\n    [52, '2022-01-01', 21],\n    [52, '2023-01-01', 21],\n    [2, '2020-01-08', 21],\n    [1, '2021-01-08', 21],\n    [1, '2022-01-08', 21],\n    [1, '2023-01-08', 21],\n    [1, '2025-12-29', 21],\n    [ExcelError::VALUE(), '1900-03-01'],\n    [ExcelError::VALUE(), '1900-01-07', 2],\n    [2, '1905-01-07', 2],\n    [ExcelError::VALUE(), '1900-01-01'],\n    [ExcelError::VALUE(), '1900-01-01', 2],\n    [ExcelError::VALUE(), '1900-01-02', 2],\n    [1, null, 11],\n    [1, 0, 11],\n    [1, 0, 12],\n    [1, 0, 13],\n    [1, 0, 14],\n    [1, 0, 15],\n    [1, 0, 16],\n    [1, 0, 17],\n    [1, '1905-01-01', 17],\n    [1, 0],\n    [1, null],\n    [1, null, 2],\n    [1, 0, 2],\n    [1, '1906-01-01'],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false, 21],\n    [53, null, 21],\n    [53, '1904-01-01', 21],\n    [ExcelError::VALUE(), '1900-01-01', 21],\n    [ExcelError::VALUE(), '1900-01-07', 21],\n    [ExcelError::VALUE(), '1900-01-08', 21],\n    [ExcelError::VALUE(), '1900-01-09', 21],\n    [ExcelError::VALUE(), '1900-03-04', 21],\n    [ExcelError::VALUE(), '1900-03-05', 21],\n    [27, '2004-07-02'],\n    [1, '1904-01-02'],\n    [0, '1904-01-01'],\n    [0, '1904-01-01', 1],\n    [1, '1904-01-01', 2],\n    [1, '1904-01-01', 11],\n    [1, '1904-01-01', 12],\n    [1, '1904-01-01', 13],\n    [1, '1904-01-01', 14],\n    [1, '1904-01-01', 15],\n    [1, '1904-01-01', 16],\n    [0, '1904-01-01', 17],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/WORKDAY.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [ExcelError::VALUE(), '1-Jan-2007', 'ABC'],\n    [39094.0, '1-Jan-2007', 9],\n    [39619.0, '18-Jun-2008', 2],\n    [39619.0, '16-Jun-2008', 4],\n    [39622.0, '14-Jun-2008', 6],\n    [39629.0, '14-Jun-2008', 11],\n    [39611.0, '14-Jun-2008', -2],\n    [39605.0, '14-Jun-2008', -6],\n    [39815.0, '19-Dec-2008', 10],\n    [39820.0, '19-Dec-2008', 10, ['25-Dec-2008', '26-Dec-2008', '01-Jan-2009']],\n    [39820.0, '19-Dec-2008', 10, [['25-Dec-2008', '26-Dec-2008', '01-Jan-2009']]],\n    [39821.0, '19-Dec-2008', 10, [['25-Dec-2008', '26-Dec-2008'], ['01-Jan-2009', '02-Jan-2009']]],\n    [39801.0, 39820, -10, [['25-Dec-2008', '26-Dec-2008', '01-Jan-2009']]],\n    // this had been 41010, which is wrong - confirmed with Excel\n    [41011.0, '5-Apr-2012', 3, [['6-Apr-2012', '9-Apr-2012']]],\n    [44242.0, '15-Feb-2021', 0],\n    [ExcelError::VALUE(), '5-Apr-2012', 3, [['6-Apr-2012', 'ABQZ']]],\n    [39598.0, '2008-06-12', -9],\n    [44273.0, '2021-03-15', 3], // issue 1936 Monday\n    [44274.0, '2021-03-16', 3], // issue 1936 Tuesday\n    [44277.0, '2021-03-17', 3], // issue 1936 Wednesday\n    [44278.0, '2021-03-18', 3], // issue 1936 Thursday\n    [44279.0, '2021-03-19', 3], // issue 1936 Friday\n    [44279.0, '2021-03-20', 3], // issue 1936 Saturday\n    [44279.0, '2021-03-21', 3], // issue 1936 Sunday\n    [44276.0, '2021-03-21', 0], // issue 1936 Sunday doesn't change for 0\n    [44258.0, '2021-03-15', -8], // issue 1936 Monday\n    [44259.0, '2021-03-16', -8], // issue 1936 Tuesday\n    [44260.0, '2021-03-17', -8], // issue 1936 Wednesday\n    [44263.0, '2021-03-18', -8], // issue 1936 Thursday\n    [44264.0, '2021-03-19', -8], // issue 1936 Friday\n    [44265.0, '2021-03-20', -8], // issue 1936 Saturday\n    [44265.0, '2021-03-21', -8], // issue 1936 Sunday\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/YEAR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [1900, 0],\n    [1900, 1],\n    [1991, 33333.33],\n    [1960, '22269.0'],\n    [1983, 30348.0],\n    [1984, 30843.0],\n    [2525, '01 Jan 2525'],\n    [1918, '11-Nov-1918'],\n    [1904, '28-Feb-1904'],\n    [ExcelError::NAN(), -10],\n    [ExcelError::VALUE(), '31-Dec-1899'],\n    [ExcelError::VALUE(), 'ABCD'],\n    [1900, false],\n    [1900, true],\n    [1900, 366], // because of fake leap day\n    [1901, 367],\n];\n"
  },
  {
    "path": "tests/data/Calculation/DateTime/YEARFRAC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        0.025,\n        '2007-1-1',\n        '2007-1-10',\n        0,\n    ],\n    [\n        0.025,\n        '2007-1-1',\n        '2007-1-10',\n        null,\n    ],\n    [\n        0.025,\n        '2007-1-10',\n        '2007-1-1',\n        0,\n    ],\n    [\n        0.024657534246580001,\n        '2007-1-1',\n        '2007-1-10',\n        1,\n    ],\n    [\n        0.025,\n        '2007-1-1',\n        '2007-1-10',\n        2,\n    ],\n    [\n        0.024657534246580001,\n        '2007-1-1',\n        '2007-1-10',\n        3,\n    ],\n    [\n        0.025,\n        '2007-1-1',\n        '2007-1-10',\n        4,\n    ],\n    [\n        1.0,\n        '2007-1-1',\n        '2007-12-31',\n        0,\n    ],\n    [\n        0.99726027397259998,\n        '2007-1-1',\n        '2007-12-31',\n        1,\n    ],\n    [\n        1.01111111111111,\n        '2007-1-1',\n        '2007-12-31',\n        2,\n    ],\n    [\n        0.99726027397259998,\n        '2007-1-1',\n        '2007-12-31',\n        3,\n    ],\n    [\n        0.99722222222222001,\n        '2007-1-1',\n        '2007-12-31',\n        4,\n    ],\n    [\n        1.5,\n        '2007-1-1',\n        '2008-7-1',\n        0,\n    ],\n    [\n        1.49658002735978,\n        '2007-1-1',\n        '2008-7-1',\n        1,\n    ],\n    [\n        1.5194444444444399,\n        '2007-1-1',\n        '2008-7-1',\n        2,\n    ],\n    [\n        1.4986301369863,\n        '2007-1-1',\n        '2008-7-1',\n        3,\n    ],\n    [\n        1.5,\n        '2007-1-1',\n        '2008-7-1',\n        4,\n    ],\n    [\n        0.083333333333329998,\n        '2007-1-1',\n        '2007-1-31',\n        0,\n    ],\n    [\n        0.082191780821919996,\n        '2007-1-1',\n        '2007-1-31',\n        1,\n    ],\n    [\n        0.083333333333329998,\n        '2007-1-1',\n        '2007-1-31',\n        2,\n    ],\n    [\n        0.082191780821919996,\n        '2007-1-1',\n        '2007-1-31',\n        3,\n    ],\n    [\n        0.080555555555560002,\n        '2007-1-1',\n        '2007-1-31',\n        4,\n    ],\n    [\n        0.083333333333329998,\n        '2007-1-1',\n        '2007-2-1',\n        0,\n    ],\n    [\n        0.084931506849319993,\n        '2007-1-1',\n        '2007-2-1',\n        1,\n    ],\n    [\n        0.08611111111111,\n        '2007-1-1',\n        '2007-2-1',\n        2,\n    ],\n    [\n        0.084931506849319993,\n        '2007-1-1',\n        '2007-2-1',\n        3,\n    ],\n    [\n        0.083333333333329998,\n        '2007-1-1',\n        '2007-2-1',\n        4,\n    ],\n    [\n        0.15833333333333,\n        '2007-1-1',\n        '2007-2-28',\n        0,\n    ],\n    [\n        0.15890410958904,\n        '2007-1-1',\n        '2007-2-28',\n        1,\n    ],\n    [\n        0.16111111111111001,\n        '2007-1-1',\n        '2007-2-28',\n        2,\n    ],\n    [\n        0.15890410958904,\n        '2007-1-1',\n        '2007-2-28',\n        3,\n    ],\n    [\n        0.15833333333333,\n        '2007-1-1',\n        '2007-2-28',\n        4,\n    ],\n    [\n        0.0027777777777800001,\n        '2007-1-31',\n        '2007-2-1',\n        0,\n    ],\n    [\n        0.0027397260273999999,\n        '2007-1-31',\n        '2007-2-1',\n        1,\n    ],\n    [\n        0.0027777777777800001,\n        '2007-1-31',\n        '2007-2-1',\n        2,\n    ],\n    [\n        0.0027397260273999999,\n        '2007-1-31',\n        '2007-2-1',\n        3,\n    ],\n    [\n        0.0027777777777800001,\n        '2007-1-31',\n        '2007-2-1',\n        4,\n    ],\n    [\n        0.08611111111111,\n        '2007-1-31',\n        '2007-3-1',\n        0,\n    ],\n    [\n        0.07945205479452,\n        '2007-1-31',\n        '2007-3-1',\n        1,\n    ],\n    [\n        0.080555555555560002,\n        '2007-1-31',\n        '2007-3-1',\n        2,\n    ],\n    [\n        0.07945205479452,\n        '2007-1-31',\n        '2007-3-1',\n        3,\n    ],\n    [\n        0.08611111111111,\n        '2007-1-31',\n        '2007-3-1',\n        4,\n    ],\n    [\n        0.16666666666666999,\n        '2007-1-31',\n        '2007-3-31',\n        0,\n    ],\n    [\n        0.16164383561644,\n        '2007-1-31',\n        '2007-3-31',\n        1,\n    ],\n    [\n        0.16388888888889,\n        '2007-1-31',\n        '2007-3-31',\n        2,\n    ],\n    [\n        0.16164383561644,\n        '2007-1-31',\n        '2007-3-31',\n        3,\n    ],\n    [\n        0.16666666666666999,\n        '2007-1-31',\n        '2007-3-31',\n        4,\n    ],\n    [\n        0.66666666666666996,\n        '2008-1-1',\n        '2008-9-1',\n        0,\n    ],\n    [\n        0.66666666666666996,\n        '2008-1-1',\n        '2008-9-1',\n        1,\n    ],\n    [\n        0.67777777777778003,\n        '2008-1-1',\n        '2008-9-1',\n        2,\n    ],\n    [\n        0.66849315068492998,\n        '2008-1-1',\n        '2008-9-1',\n        3,\n    ],\n    [\n        0.66666666666666996,\n        '2008-1-1',\n        '2008-9-1',\n        4,\n    ],\n    [\n        1.1666666666666701,\n        '2007-2-1',\n        '2008-4-1',\n        0,\n    ],\n    [\n        1.16279069767442,\n        '2007-2-1',\n        '2008-4-1',\n        1,\n    ],\n    [\n        1.18055555555556,\n        '2007-2-1',\n        '2008-4-1',\n        2,\n    ],\n    [\n        1.16438356164384,\n        '2007-2-1',\n        '2008-4-1',\n        3,\n    ],\n    [\n        1.1666666666666701,\n        '2007-2-1',\n        '2008-4-1',\n        4,\n    ],\n    [\n        47.524999999999999,\n        '1960-12-19',\n        '2008-6-28',\n        0,\n    ],\n    [\n        47.52162252765670,\n        '1960-12-19',\n        '2008-6-28',\n        1,\n    ],\n    [\n        48.216666666666697,\n        '1960-12-19',\n        '2008-6-28',\n        2,\n    ],\n    [\n        47.556164383561601,\n        '1960-12-19',\n        '2008-6-28',\n        3,\n    ],\n    [\n        47.524999999999999,\n        '1960-12-19',\n        '2008-6-28',\n        4,\n    ],\n    [\n        25.558333333333302,\n        '1982-12-7',\n        '2008-6-28',\n        0,\n    ],\n    [\n        25.5571892111134,\n        '1982-12-7',\n        '2008-6-28',\n        1,\n    ],\n    [\n        25.9305555555556,\n        '1982-12-7',\n        '2008-6-28',\n        2,\n    ],\n    [\n        25.575342465753401,\n        '1982-12-7',\n        '2008-6-28',\n        3,\n    ],\n    [\n        25.558333333333302,\n        '1982-12-7',\n        '2008-6-28',\n        4,\n    ],\n    [\n        0.163934426,\n        '1960-01-01',\n        '1960-03-01',\n        1,\n    ],\n    [\n        0.161643836,\n        '1961-01-01',\n        '1961-03-01',\n        1,\n    ],\n    [\n        0.161643836,\n        '1963-03-01',\n        '1963-01-01',\n        1,\n    ],\n    [\n        1.086183311,\n        '1960-01-01',\n        '1961-02-01',\n        1,\n    ],\n    [\n        1.084931507,\n        '1961-01-01',\n        '1962-02-01',\n        1,\n    ],\n    [\n        1.083447332,\n        '1963-01-01',\n        '1964-02-01',\n        1,\n    ],\n    [\n        1.162790698,\n        '1963-01-01',\n        '1964-03-01',\n        1,\n    ],\n    [\n        0.841530055,\n        '2020-02-28',\n        '2021-01-01',\n        1,\n    ],\n    [\n        0.764383562,\n        '2020-03-28',\n        '2021-01-01',\n        1,\n    ],\n    [\n        0.841530055,\n        '2023-04-28',\n        '2024-03-01',\n        1,\n    ],\n    [\n        0.838797814,\n        '2023-04-28',\n        '2024-02-29',\n        1,\n    ],\n    [\n        0.838356164,\n        '2023-04-28',\n        '2024-02-28',\n        1,\n    ],\n    [\n        0.753424658,\n        '2023-04-28',\n        '2024-01-28',\n        1,\n    ],\n    [\n        0.753424658,\n        '2022-04-28',\n        '2023-01-28',\n        1,\n    ],\n    [\n        1.0,\n        '2020-01-01',\n        '2021-01-01',\n        1,\n    ],\n    [\n        0.99726776,\n        '2020-02-28',\n        '2021-02-27',\n        1,\n    ],\n    [\n        0.764383562,\n        '2020-03-28',\n        '2021-01-01',\n        1,\n    ],\n    [\n        0.841530055,\n        '2023-04-28',\n        '2024-03-01',\n        1,\n    ],\n    [\n        0.838797814,\n        '2023-04-28',\n        '2024-02-29',\n        1,\n    ],\n    [\n        0.838356164,\n        '2023-04-28',\n        '2024-02-28',\n        1,\n    ],\n    [\n        0.753424658,\n        '2023-04-28',\n        '2024-01-28',\n        1,\n    ],\n    [\n        0.753424658,\n        '2022-04-28',\n        '2023-01-28',\n        1,\n    ],\n    [\n        1.082191781,\n        '2022-04-28',\n        '2023-05-28',\n        1,\n    ],\n    [\n        1.002739726,\n        '2022-04-27',\n        '2023-04-28',\n        1,\n    ],\n    [\n        0.084699454,\n        '2024-04-27',\n        '2024-05-28',\n        1,\n    ],\n    [\n        0.084931507,\n        '2023-04-27',\n        '2023-05-28',\n        1,\n    ],\n    [\n        2.085766423,\n        '2023-04-27',\n        '2025-05-28',\n        1,\n    ],\n    [ExcelError::VALUE(), '2023-04-27', 'ABQZ', 1],\n    [ExcelError::VALUE(), 'ABQZ', '2023-04-07', 1],\n    [ExcelError::NAN(), '2023-04-27', '2025-05-28', 6],\n    [0, null, null],\n    // Excel 1900 calendar gets all of the following wrong (null second arg).\n    // PhpSpreadsheet is bug-compatible.\n    [108, '2007-12-30', null],\n    [107.11111111, '2007-02-10', null],\n    [107, '2006-12-30', null],\n    [107.00277778, '2006-12-31', null],\n    [107.00277778, '2007-01-01', null],\n    [106.99722222, null, '2006-12-29'],\n    [100.419444, '2000-06-01', null, 0],\n    [100.419572, '2000-06-01', null, 1],\n    [101.883333, '2000-06-01', null, 2],\n    [100.487671, '2000-06-01', null, 3],\n    [100.419444, '2000-06-01', null, 4],\n    [108.555556, '2006-12-29', null, 2],\n    [108.558333, '2006-12-30', null, 2],\n    [108.561111, '2006-12-31', null, 2],\n    [108.563889, '2007-01-01', null, 2],\n    [108.566667, '2007-01-02', null, 2],\n    // Excel 1900 calendar gets all of the following wrong (null first arg).\n    // PhpSpreadsheet is bug-compatible.\n    [107, null, '2006-12-30'],\n    [107.00277778, null, '2006-12-31'],\n    [107.00277778, null, '2007-01-01'],\n    [107.00555556, null, '2007-01-02'],\n    [107.06849315, null, '2006-12-29', 3],\n    [107.07123288, null, '2006-12-30', 3],\n    [107.07397260, null, '2006-12-31', 3],\n    [107.07671233, null, '2007-01-01', 3],\n    [107.07945205, null, '2007-01-02', 3],\n    [100.419444, null, '2000-06-01', 0],\n    [100.419572, null, '2000-06-01', 1],\n    [101.883333, null, '2000-06-01', 2],\n    [100.487671, null, '2000-06-01', 3],\n    [100.419444, null, '2000-06-01', 4],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BESSELI.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [ExcelError::NAN(), 1.5, -1],\n    [ExcelError::VALUE(), 'NaN', 1],\n    [ExcelError::VALUE(), 1.5, 'NaN'],\n    [ExcelError::VALUE(), true, 1],\n    [ExcelError::VALUE(), 1.5, true],\n    [ExcelError::VALUE(), null, 1],\n    [ExcelError::VALUE(), 1.5, null],\n    [30596.33413506702, -12.5, 0],\n    [2815.7166648041534, -10, 0],\n    [268.161313800963, -7.5, 0],\n    [7.37820347757186, -3.5, 0],\n    [3.28983917239129, -2.5, 0],\n    [1.26606584803426, -1, 0],\n    [1.00391006406612, -0.125, 0],\n    [1.0, 0, 0],\n    [1.00391006406612, 0.125, 0],\n    [1.26606584803426, 1, 0],\n    [3.28983917239129, 2.5, 0],\n    [7.37820347757186, 3.5, 0],\n    [427.564125313702, 8, 0],\n    [30596.33413506702, 12.5, 0],\n    [306693019.30610687, 22, 0],\n    [5590908218797.506, 32, 0],\n    [-29345.751017210714, -12.5, 1],\n    [-2670.988320559247, -10, 1],\n    [-249.584367947395, -7.5, 1],\n    [-6.205834932063, -3.5, 1],\n    [-2.51671624202536, -2.5, 1],\n    [-0.565159097581943, -1, 1],\n    [-0.062622149768879, -0.125, 1],\n    [0.0, 0, 1],\n    [0.062622149768879, 0.125, 1],\n    [0.565159097581943, 1, 1],\n    [2.51671624202536, 2.5, 1],\n    [6.205834932063, 3.5, 1],\n    [399.873134789592, 8, 1],\n    [29345.751017210714, 12.5, 1],\n    [299639573.1780888, 22, 1],\n    [5502845662755.76, 32, 1],\n    [25901.0143489759, -12.5, 2],\n    [2281.518997169878, -10, 2],\n    [201.605482454266, -7.5, 2],\n    [3.83201207162936, -3.5, 2],\n    [1.27646615881561, -2.5, 2],\n    [0.135747666580699, -1, 2],\n    [0.001955669369142, -0.125, 2],\n    [0.0, 0, 2],\n    [0.001955669369142, 0.125, 2],\n    [0.135747666580699, 1, 2],\n    [1.27646615881561, 2.5, 2],\n    [3.83201207162936, 3.5, 2],\n    [327.595838875391, 8, 2],\n    [25901.0143489759, 12.5, 2],\n    [279453053.1335468, 22, 2],\n    [5246981502816.42, 32, 2],\n    [-10949.6155627918, -12.5, 5],\n    [-777.188296433171, -10, 5],\n    [-48.2413608068669, -7.5, 5],\n    [-0.223984956078518, -3.5, 5],\n    [-0.032843475454962, -2.5, 5],\n    [-0.000271463149585, -1, 5],\n    [-0.000000007952461, -0.125, 5],\n    [0.0, 0, 5],\n    [0.000000007952461, 0.125, 5],\n    [0.000271463149585, 1, 5],\n    [0.032843475454962, 2.5, 5],\n    [0.223984956078518, 3.5, 5],\n    [85.5358071768162, 8, 5],\n    [10949.6155627918, 12.5, 5],\n    [171888048.06410483, 22, 5],\n    [3762429557237.2134, 32, 5],\n    [-0.002645111902465, -0.5, 3.5],\n    [-0.257894303289036, -0.5, 1.5],\n    [1.06348334399461, -0.5, 0.5],\n    [1.06348334399461, 0.5, 0.5],\n    [0.25789430328903, 0.5, 1.5],\n    [0.002645111902465, 0.5, 3.5],\n    [1.8834049312002036e26, 64, 8],\n    [1.8834049312002036e26, -64, 8],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BESSELJ.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [ExcelError::NAN(), 1.5, -1],\n    [ExcelError::VALUE(), 'NaN', 1],\n    [ExcelError::VALUE(), 1.5, 'NaN'],\n    [ExcelError::VALUE(), true, 1],\n    [ExcelError::VALUE(), 1.5, true],\n    [ExcelError::VALUE(), null, 1],\n    [ExcelError::VALUE(), 1.5, null],\n    [0.146884054700421, -12.5, 0],\n    [-0.245935764451348, -10, 0],\n    [0.266339657880379, -7.5, 0],\n    [-0.380127739987264, -3.5, 0],\n    [-0.048383776468198, -2.5, 0],\n    [0.765197686557967, -1, 0],\n    [0.996097563041985, -0.125, 0],\n    [1.0, 0, 0],\n    [0.996097563041985, 0.125, 0],\n    [0.765197686557967, 1, 0],\n    [-0.048383776468198, 2.5, 0],\n    [-0.380127739987264, 3.5, 0],\n    [0.171650807137554, 8, 0],\n    [0.146884054700421, 12.5, 0],\n    [-0.120651475704867, 22, 0],\n    [0.138079009746556, 32, 0],\n    [0.165483804614760, -12.5, 1],\n    [-0.043472746168862, -10, 1],\n    [-0.135248427579706, -7.5, 1],\n    [-0.137377527362327, -3.5, 1],\n    [-0.497094102464274, -2.5, 1],\n    [-0.440050585744933, -1, 1],\n    [-0.062378009134495, -0.125, 1],\n    [0.0, 0, 1],\n    [0.062378009134495, 0.125, 1],\n    [0.440050585744933, 1, 1],\n    [0.497094102464274, 2.5, 1],\n    [0.137377527362327, 3.5, 1],\n    [0.234636346853915, 8, 1],\n    [-0.165483804614760, 12.5, 1],\n    [0.117177789643852, 22, 1],\n    [-0.026589028475905, 32, 1],\n    [-0.173361463438783, -12.5, 2],\n    [0.254630313685121, -10, 2],\n    [-0.230273410525790, -7.5, 2],\n    [0.458629184194308, -3.5, 2],\n    [0.446059058439617, -2.5, 2],\n    [0.114903484931900, -1, 2],\n    [0.001950583109930, -0.125, 2],\n    [0.0, 0, 2],\n    [0.001950583109930, 0.125, 2],\n    [0.114903484931900, 1, 2],\n    [0.446059058439617, 2.5, 2],\n    [0.458629184194308, 3.5, 2],\n    [-0.112991720424075, 8, 2],\n    [-0.173361463438783, 12.5, 2],\n    [0.131304002036127, 22, 2],\n    [-0.139740824026300, 32, 2],\n    [-0.034737699762240, -12.5, 5],\n    [0.234061528186794, -10, 5],\n    [-0.283473905162551, -7.5, 5],\n    [-0.080441986647992, -3.5, 5],\n    [-0.019501625134503, -2.5, 5],\n    [-0.000249757730211, -1, 5],\n    [-0.000000007942113, -0.125, 5],\n    [0.0, 0, 5],\n    [0.000000007942113, 0.125, 5],\n    [0.000249757730211, 1, 5],\n    [0.019501625134503, 2.5, 5],\n    [0.080441986647992, 3.5, 5],\n    [0.185774772190564, 8, 5],\n    [0.034737699762240, 12.5, 5],\n    [0.036304102444491, 22, 5],\n    [0.026241347352986, 32, 5],\n    [-0.002563729994587, -0.5, 3.5],\n    [-0.242268457674874, -0.5, 1.5],\n    [0.938469807240813, -0.5, 0.5],\n    [0.938469807240813, 0.5, 0.5],\n    [0.242268457674874, 0.5, 1.5],\n    [0.002563729994587, 0.5, 3.5],\n    [0.063689476134356, 64, 8],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BESSELK.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [ExcelError::NAN(), 1.5, -1],\n    [ExcelError::VALUE(), 'NaN', 1],\n    [ExcelError::VALUE(), 1.5, 'NaN'],\n    [ExcelError::NAN(), -1.5, 1],\n    [ExcelError::NAN(), 0.0, 1],\n    [ExcelError::VALUE(), true, 1],\n    [ExcelError::VALUE(), 1.5, true],\n    [ExcelError::VALUE(), null, 1],\n    [ExcelError::VALUE(), 1.5, null],\n    [2.20786908479938, 0.125, 0],\n    [0.421024421083418, 1, 0],\n    [0.062347554191019, 2.5, 0],\n    [0.019598896971074, 3.5, 0],\n    [0.000146470701181, 8, 0],\n    [0.000001308403709, 12.5, 0],\n    [0.000000000074124, 22, 0],\n    [0.000000000000003, 32, 0],\n    [7.83111830250218, 0.125, 1],\n    [0.601907231666906, 1, 1],\n    [0.073890815650267, 2.5, 1],\n    [0.022239393224641, 3.5, 1],\n    [0.000155369216605, 8, 1],\n    [0.000001359767834, 12.5, 1],\n    [0.00000000007579, 22, 1],\n    [0.000000000000003, 32, 1],\n    [127.505761924834, 0.125, 2],\n    [1.62483888441723, 1, 2],\n    [0.121460206711233, 2.5, 2],\n    [0.032307121670869, 3.5, 2],\n    [0.000185313005332, 8, 2],\n    [0.000001525966562, 12.5, 2],\n    [0.000000000081014, 22, 2],\n    [0.000000000000003, 32, 2],\n    [12570631.999947274, 0.125, 5],\n    [360.960586772793, 1, 5],\n    [2.71688429212586, 2.5, 5],\n    [0.364824403327597, 3.5, 5],\n    [0.000619358014056, 8, 5],\n    [0.00000339242503, 12.5, 5],\n    [0.000000000128956, 22, 5],\n    [0.000000000000004, 32, 5],\n    [0.924419035021323, 0.5, 0.5],\n    [1.65644112801108, 0.5, 1.5],\n    [62.0579095045362, 0.5, 3.5],\n    [0.0, 64, 8],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BESSELY.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [ExcelError::NAN(), 1.5, -1],\n    [ExcelError::VALUE(), 'NaN', 1],\n    [ExcelError::VALUE(), 1.5, 'NaN'],\n    [ExcelError::NAN(), -1.5, 1],\n    [ExcelError::NAN(), 0.0, 1],\n    [ExcelError::VALUE(), true, 1],\n    [ExcelError::VALUE(), 1.5, true],\n    [ExcelError::VALUE(), null, 1],\n    [ExcelError::VALUE(), 1.5, null],\n    [-1.38968063456627, 0.125, 0],\n    [0.088256971397708, 1, 0],\n    [0.498070358446689, 2.5, 0],\n    [0.189021944512578, 3.5, 0],\n    [0.223521489249681, 8, 0],\n    [-0.171214306884316, 12.5, 0],\n    [0.119887597856641, 22, 0],\n    [-0.028742484734472, 32, 0],\n    [-5.19993610955387, 0.125, 1],\n    [-0.78121282095312, 1, 1],\n    [0.145918137508313, 2.5, 1],\n    [0.410188416627698, 3.5, 1],\n    [-0.158060461835146, 8, 1],\n    [-0.153838256351639, 12.5, 1],\n    [0.123405856078544, 22, 1],\n    [-0.138544831448816, 32, 1],\n    [-81.8092971182956, 0.125, 2],\n    [-1.65068261330395, 1, 2],\n    [-0.381335848440038, 2.5, 2],\n    [0.045371436417535, 3.5, 2],\n    [-0.263036604708467, 8, 2],\n    [0.146600185868054, 12.5, 2],\n    [-0.108668883667682, 22, 2],\n    [0.020083432768921, 32, 2],\n    [-8018358.447601137, 0.125, 5],\n    [-260.405867809914, 1, 5],\n    [-3.83017599167454, 2.5, 5],\n    [-1.14946031467642, 3.5, 5],\n    [0.256401064838239, 8, 5],\n    [-0.232903937762173, 12.5, 5],\n    [0.16848172635078, 22, 5],\n    [-0.139464153399118, 32, 5],\n    [-0.444518733762708, 0.5, 0.5],\n    [-1.47147239186729, 0.5, 1.5],\n    [-42.0594942777845, 0.5, 3.5],\n    [0.077260138596538, 64, 8],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BIN2DEC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [178, 10110010],\n    [178, '10110010'],\n    [100, '1100100'],\n    [ExcelError::NAN(), '111001010101'], // Too large\n    [5, '101'],\n    [2, '10'],\n    [0, '0'],\n    [5, '101'],\n    [100, '1100100'],\n    [ExcelError::NAN(), '21'], // Invalid binary number\n    [ExcelError::VALUE(), true], // Boolean okay for ODS, not for Excel/Gnumeric\n    [ExcelError::VALUE(), false], // Boolean okay for ODS, not for Excel/Gnumeric\n    [-107, '1110010101'], // 2's Complement\n    [-1, '1111111111'], // 2's Complement\n    [-512, '1000000000'], // lowest negative\n    [511, '111111111'], // highest positive\n    [0, '0000000000'],\n    [1, '000000001'],\n    [256, '0100000000'],\n    [256, '100000000'],\n    [-256, '1100000000'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BIN2DECOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [1, true], // Boolean okay for ODS, not for Excel/Gnumeric\n    [0, false], // Boolean okay for ODS, not for Excel/Gnumeric\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BIN2HEX.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['B2', 10110010],\n    ['B2', '10110010'],\n    [ExcelError::NAN(), '111001010101'], // Too large\n    ['00FB', '11111011', 4], // Leading places\n    ['0FB', '11111011', 3.75], // Leading places as a float\n    [ExcelError::NAN(), '11111011', -1], // Leading places negative\n    [ExcelError::VALUE(), '11111011', 'ABC'], // Leading places non-numeric\n    ['E', '1110'],\n    ['5', '101'],\n    ['2', '10'],\n    ['0', '0'],\n    [ExcelError::NAN(), '21'], // Invalid binary number\n    [ExcelError::VALUE(), true], // ODS accepts Boolean, Excel/Gnumeric don't\n    [ExcelError::VALUE(), false], // ODS accepts Boolean, Excel/Gnumeric don't\n    ['FFFFFFFF95', '1110010101'], // 2's Complement\n    ['FFFFFFFFFF', '1111111111'], // 2's Complement\n    ['FFFFFFFE00', '1000000000'], // lowest negative\n    ['1FF', '111111111'], // highest positive\n    ['0', '0000000000'],\n    ['1', '000000001'],\n    ['100', '0100000000'],\n    ['100', '100000000'],\n    ['FFFFFFFF00', '1100000000'],\n    ['0003', '11', 4],\n    [ExcelError::NAN(), '11', 0],\n    [ExcelError::NAN(), '11', -1],\n    [ExcelError::NAN(), '11', 14],\n    [ExcelError::NAN(), '10001', 1],\n    ['11', '10001', '2'],\n    ['011', '10001', '3'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BIN2HEXOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // Boolean okay for ODS, not for Excel/Gnumeric\n    ['0', false], // Boolean okay for ODS, not for Excel/Gnumeric\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BIN2OCT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['144', 1100100],\n    ['262', '10110010'],\n    [ExcelError::NAN(), '111001010101'], // Too large\n    ['011', '1001', 3], // Leading places\n    ['0011', '1001', 4.75], // Leading places as a float\n    [ExcelError::NAN(), '1001', -1], // Leading places negative\n    [ExcelError::VALUE(), '1001', 'ABC'], // Leading places non-numeric\n    ['2', '00000010'],\n    ['5', '00000101'],\n    ['15', '00001101'],\n    ['0', '0'],\n    [ExcelError::NAN(), '21'], // Invalid binary number\n    [ExcelError::VALUE(), true], // Boolean okay for ODS, not for others\n    [ExcelError::VALUE(), false], // Boolean okay for ODS, not for others\n    ['7777777625', '1110010101'], // 2's Complement\n    ['7777777777', '1111111111'], // 2's Complement\n    ['7777777000', '1000000000'], // lowest negative\n    ['777', '111111111'], // highest positive\n    ['0', '0000000000'],\n    ['1', '000000001'],\n    ['400', '0100000000'],\n    ['400', '100000000'],\n    ['7777777400', '1100000000'],\n    ['0003', '11', 4],\n    [ExcelError::NAN(), '11', 0],\n    [ExcelError::NAN(), '11', -1],\n    [ExcelError::NAN(), '11', 14],\n    [ExcelError::NAN(), '10001', 1],\n    ['21', '10001', 2],\n    ['021', '10001', 3],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BIN2OCTOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // Boolean okay for ODS, not for Excel/Gnumeric\n    ['0', false], // Boolean okay for ODS, not for Excel/Gnumeric\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BITAND.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [5, 21, 39],\n    [64, 200, '84'],\n    [8, 72.00, 184.00],\n    [ExcelError::VALUE(), 'ABC', 'DEF'],\n    [ExcelError::VALUE(), 1, 'DEF'],\n    [ExcelError::VALUE(), 'ABC', 1],\n    [ExcelError::NAN(), 12.00, 2.82E14],\n    [5123456789, 5123456789, 5123456789],\n    [4831908629, 5123456789, 7123456789],\n    [21, 5123456789, 31],\n    [ExcelError::NAN(), -5123456788, 1],\n    [ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48\n    [ExcelError::NAN(), 1, 2 ** 50], // argument >= 2**48\n    [ExcelError::NAN(), -2, 1], // negative argument\n    [ExcelError::NAN(), 2, -1], // negative argument\n    [ExcelError::NAN(), -2, -1], // negative argument\n    [ExcelError::NAN(), 3.1, 1], // non-integer argument\n    [ExcelError::NAN(), 3, 1.1], // non-integer argument\n    [0, 4, null],\n    [0, 4, false],\n    [1, 3, true],\n    [0, null, 4],\n    [0, false, 4],\n    [1, true, 5],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BITLSHIFT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [96.0, 3, 5],\n    [36.0, 9, '2'],\n    [ExcelError::VALUE(), 'ABC', 5],\n    [ExcelError::VALUE(), 5, 'ABC'],\n    [ExcelError::NAN(), 1, 48], // result too large\n    [ExcelError::NAN(), 1.1, 2], // first arg must be integer\n    [4.0, 1, 2.1], // second arg will be truncated\n    [ExcelError::NAN(), 0, 54], // second arg too large\n    [0.0, 0, 5],\n    [ExcelError::NAN(), -16, 2], // first arg cant be negative\n    [1.0, 4, -2], // negative shift permitted\n    [1.0, 4, -2.1], // negative shift and (ignored) fraction permitted\n    [4.0, 4, null],\n    [4.0, 4, false],\n    [8.0, 4, true],\n    [0.0, null, 4],\n    [4.0, 4, false],\n    [8.0, 4, true],\n    [0.0, false, 4],\n    [16.0, true, 4],\n    [8000000000.0, 1000000000, 3], // result > 2**32\n    [16000000000.0, 8000000000, 1], // argument > 2**32\n    [ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48\n    [1.0, 2 ** 47, -47],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BITOR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [55, 21, 39],\n    [248, 200, '184'],\n    [248, 72, 184],\n    [ExcelError::NAN(), 12.34, 56.78], // non-integer argument\n    [60, 12.00, 56.00],\n    [ExcelError::VALUE(), 'ABC', 'DEF'],\n    [ExcelError::VALUE(), 'ABC', 1],\n    [ExcelError::VALUE(), 1, 'DEF'],\n    [ExcelError::NAN(), 12.00, 2.82E14],\n    [5123456789, 5123456788, 1],\n    [7415004949, 5123456789, 7123456789],\n    [ExcelError::NAN(), -5123456788, 1],\n    [ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48\n    [ExcelError::NAN(), 1, 2 ** 50], // argument >= 2**48\n    [ExcelError::NAN(), -2, 1], // negative argument\n    [ExcelError::NAN(), 2, -1], // negative argument\n    [ExcelError::NAN(), -2, -1], // negative argument\n    [ExcelError::NAN(), 3.1, 1], // non-integer argument\n    [ExcelError::NAN(), 3, 1.1], // non-integer argument\n    [4, 4, null],\n    [4, 4, false],\n    [5, 4, true],\n    [4, null, 4],\n    [4, false, 4],\n    [5, true, 4],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BITRSHIFT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [5.0, 20, 2],\n    [3.0, 52, '4'],\n    [ExcelError::VALUE(), 'ABC', 5],\n    [ExcelError::VALUE(), 5, 'ABC'],\n    [ExcelError::NAN(), 1, -48], // result too large\n    [ExcelError::NAN(), 1.1, 2], // first arg must be integer\n    [1.0, 4, 2.1], // second arg will be truncated\n    [ExcelError::NAN(), 0, 54], // second arg too large\n    [0.0, 0, 5],\n    [ExcelError::NAN(), -16, 2], // first arg cant be negative\n    [4.0, 1, -2], // negative shift permitted\n    [4.0, 1, -2.1], // negative shift and (ignored) fraction permitted\n    [4.0, 4, null],\n    [4.0, 4, false],\n    [2.0, 4, true],\n    [0.0, null, 4],\n    [4.0, 4, false],\n    [2.0, 4, true],\n    [0.0, false, 4],\n    [0.0, true, 4],\n    [16.0, true, -4],\n    [8000000000.0, 1000000000, -3], // result > 2**32\n    [8000000000.0, 16000000000, 1], // argument > 2**32\n    [ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48\n    [1.0, 2 ** 47, 47],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/BITXOR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [50, 21, 39],\n    [112, 200, '184'],\n    [216, 114.00, 170.00],\n    [ExcelError::VALUE(), 'ABC', 'DEF'],\n    [ExcelError::VALUE(), 'ABC', 1],\n    [ExcelError::VALUE(), 1, 'DEF'],\n    [ExcelError::NAN(), 12.00, 2.82E14],\n    [5123456789, 5123456788, 1],\n    [2583096320, 5123456789, 7123456789],\n    [ExcelError::NAN(), -5123456788, 1],\n    [ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48\n    [ExcelError::NAN(), 1, 2 ** 50], // argument >= 2**48\n    [ExcelError::NAN(), -2, 1], // negative argument\n    [ExcelError::NAN(), 2, -1], // negative argument\n    [ExcelError::NAN(), -2, -1], // negative argument\n    [ExcelError::NAN(), 3.1, 1], // non-integer argument\n    [ExcelError::NAN(), 3, 1.1], // non-integer argument\n    [4, 4, null],\n    [4, 4, false],\n    [5, 4, true],\n    [4, null, 4],\n    [4, false, 4],\n    [5, true, 4],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/COMPLEX.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['3+4i', 3, 4],\n    ['3+4j', 3, 4, 'j'],\n    ['12.34+5.67j', 12.34, 5.6699999999999999, 'j'],\n    [ExcelError::VALUE(), 3.5, 'NaN'],\n    [ExcelError::VALUE(), 'NaN', 3.5],\n    [ExcelError::VALUE(), 1.5, 3.5, 'invalid suffix'],\n    [ExcelError::VALUE(), 3.5, true],\n    [ExcelError::VALUE(), true, 3.5],\n    [ExcelError::VALUE(), 1.5, 3.5, true],\n    ['1.234E-5+6780000000i', 1.234E-5, 6780000000.0],\n    ['123400+6.78E-9i', 123400.0, 6.78E-9],\n    ['3.5+2.5i', 3.5, 2.5],\n    ['3.5+i', 3.5, 1],\n    ['3.5-i', 3.5, -1],\n    ['3.5-2.5i', 3.5, -2.5],\n    ['1+2.5i', 1, 2.5],\n    ['1+i', 1, 1],\n    ['1', 1, 0],\n    ['1-i', 1, -1],\n    ['1-2.5i', 1, -2.5],\n    ['2.5i', 0, 2.5],\n    ['i', 0, 1],\n    ['0.0', 0, 0],\n    ['-i', 0, -1],\n    ['-2.5i', 0, -2.5],\n    ['-1+2.5i', -1, 2.5],\n    ['-1+i', -1, 1],\n    ['-1', -1, 0],\n    ['-1-i', -1, -1],\n    ['-1-2.5i', -1, -2.5],\n    ['-3.5', -3.5, 0],\n    ['-3.5-2.5i', -3.5, -2.5],\n    ['-2.5-2.5i', -2.5, -2.5],\n    ['-2.5-2.5i', -2.5, -2.5],\n    ['-1.5-2.5i', -1.5, -2.5],\n    ['-1.5-2.5i', -1.5, -2.5],\n    ['-0.5-2.5i', -0.5, -2.5],\n    ['-2.5i', 0, -2.5],\n    ['0.5-2.5i', 0.5, -2.5],\n    ['1-2.5i', 1, -2.5],\n    ['1.5-2.5i', 1.5, -2.5],\n    ['2-2.5i', 2, -2.5],\n    ['2.5-2.5i', 2.5, -2.5],\n    ['3-2.5i', 3, -2.5],\n    ['3.5-2.5i', 3.5, -2.5],\n    ['-2.5-2.5i', -2.5, -2.5],\n    ['-1.5-2.5i', -1.5, -2.5],\n    ['-0.5-2.5i', -0.5, -2.5],\n    ['-2.5i', 0, -2.5],\n    ['0.5-2.5i', 0.5, -2.5],\n    ['1-2.5i', 1, -2.5],\n    ['1.5-2.5i', 1.5, -2.5],\n    ['2-2.5i', 2, -2.5],\n    ['2.5-2.5i', 2.5, -2.5],\n    ['3-2.5i', 3, -2.5],\n    ['3.5-2.5i', 3.5, -2.5],\n    ['-2.5-1.5i', -2.5, -1.5],\n    ['-1.5-1.5i', -1.5, -1.5],\n    ['-0.5-1.5i', -0.5, -1.5],\n    ['-1.5i', 0, -1.5],\n    ['0.5-1.5i', 0.5, -1.5],\n    ['1-1.5i', 1, -1.5],\n    ['1.5-1.5i', 1.5, -1.5],\n    ['2-1.5i', 2, -1.5],\n    ['2.5-1.5i', 2.5, -1.5],\n    ['3-1.5i', 3, -1.5],\n    ['3.5-1.5i', 3.5, -1.5],\n    ['-2.5-1.5i', -2.5, -1.5],\n    ['-1.5-1.5i', -1.5, -1.5],\n    ['-0.5-1.5i', -0.5, -1.5],\n    ['-1.5i', 0, -1.5],\n    ['0.5-1.5i', 0.5, -1.5],\n    ['1-1.5i', 1, -1.5],\n    ['1.5-1.5i', 1.5, -1.5],\n    ['2-1.5i', 2, -1.5],\n    ['2.5-1.5i', 2.5, -1.5],\n    ['3-1.5i', 3, -1.5],\n    ['3.5-1.5i', 3.5, -1.5],\n    ['-2.5-0.5i', -2.5, -0.5],\n    ['-1.5-0.5i', -1.5, -0.5],\n    ['-0.5-0.5i', -0.5, -0.5],\n    ['-0.5i', 0, -0.5],\n    ['0.5-0.5i', 0.5, -0.5],\n    ['1-0.5i', 1, -0.5],\n    ['1.5-0.5i', 1.5, -0.5],\n    ['2-0.5i', 2, -0.5],\n    ['2.5-0.5i', 2.5, -0.5],\n    ['3-0.5i', 3, -0.5],\n    ['3.5-0.5i', 3.5, -0.5],\n    ['-2.5', -2.5, 0],\n    ['-1.5', -1.5, 0],\n    ['-0.5', -0.5, 0],\n    ['0.0', 0, 0],\n    ['0.5', 0.5, 0],\n    ['1', 1, 0],\n    ['1.5', 1.5, 0],\n    ['2', 2, 0],\n    ['2.5', 2.5, 0],\n    ['3', 3, 0],\n    ['3.5', 3.5, 0],\n    ['-2.5+0.5i', -2.5, 0.5],\n    ['-1.5+0.5i', -1.5, 0.5],\n    ['-0.5+0.5i', -0.5, 0.5],\n    ['0.5i', 0, 0.5],\n    ['0.5+0.5i', 0.5, 0.5],\n    ['1+0.5i', 1, 0.5],\n    ['1.5+0.5i', 1.5, 0.5],\n    ['2+0.5i', 2, 0.5],\n    ['2.5+0.5i', 2.5, 0.5],\n    ['3+0.5i', 3, 0.5],\n    ['3.5+0.5i', 3.5, 0.5],\n    ['-2.5+i', -2.5, 1],\n    ['-2.5+i', -2.5, 1],\n    ['-1.5+i', -1.5, 1],\n    ['-1.5+i', -1.5, 1],\n    ['-0.5+i', -0.5, 1],\n    ['i', 0, 1],\n    ['0.5+i', 0.5, 1],\n    ['1+i', 1, 1],\n    ['1.5+i', 1.5, 1],\n    ['2+i', 2, 1],\n    ['2.5+i', 2.5, 1],\n    ['3+i', 3, 1],\n    ['3.5+i', 3.5, 1],\n    ['-2.5+1.5i', -2.5, 1.5],\n    ['-2.5+1.5i', -2.5, 1.5],\n    ['-1.5+1.5i', -1.5, 1.5],\n    ['-1.5+1.5i', -1.5, 1.5],\n    ['-0.5+1.5i', -0.5, 1.5],\n    ['1.5i', 0, 1.5],\n    ['0.5+1.5i', 0.5, 1.5],\n    ['1+1.5i', 1, 1.5],\n    ['1.5+1.5i', 1.5, 1.5],\n    ['2+1.5i', 2, 1.5],\n    ['2.5+1.5i', 2.5, 1.5],\n    ['3+1.5i', 3, 1.5],\n    ['3.5+1.5i', 3.5, 1.5],\n    ['-2.5+2i', -2.5, 2],\n    ['-2.5+2i', -2.5, 2],\n    ['-1.5+2i', -1.5, 2],\n    ['-1.5+2i', -1.5, 2],\n    ['-0.5+2i', -0.5, 2],\n    ['2i', 0, 2],\n    ['0.5+2i', 0.5, 2],\n    ['1+2i', 1, 2],\n    ['1.5+2i', 1.5, 2],\n    ['2+2i', 2, 2],\n    ['2.5+2i', 2.5, 2],\n    ['3+2i', 3, 2],\n    ['3.5+2i', 3.5, 2],\n    ['-2.5+2.5i', -2.5, 2.5],\n    ['-2.5+2.5i', -2.5, 2.5],\n    ['-1.5+2.5i', -1.5, 2.5],\n    ['-1.5+2.5i', -1.5, 2.5],\n    ['-0.5+2.5i', -0.5, 2.5],\n    ['2.5i', 0, 2.5],\n    ['0.5+2.5i', 0.5, 2.5],\n    ['1+2.5i', 1, 2.5],\n    ['1.5+2.5i', 1.5, 2.5],\n    ['2+2.5i', 2, 2.5],\n    ['2.5+2.5i', 2.5, 2.5],\n    ['3+2.5i', 3, 2.5],\n    ['3.5+2.5i', 3.5, 2.5],\n    ['-2.5+3i', -2.5, 3],\n    ['-2.5+3i', -2.5, 3],\n    ['-1.5+3i', -1.5, 3],\n    ['-1.5+3i', -1.5, 3],\n    ['-0.5+3i', -0.5, 3],\n    ['3i', 0, 3],\n    ['0.5+3i', 0.5, 3],\n    ['1+3i', 1, 3],\n    ['1.5+3i', 1.5, 3],\n    ['2+3i', 2, 3],\n    ['2.5+3i', 2.5, 3],\n    ['3+3i', 3, 3],\n    ['3.5+3i', 3.5, 3],\n    ['-2.5+3.5i', -2.5, 3.5],\n    ['-2.5+3.5i', -2.5, 3.5],\n    ['-1.5+3.5i', -1.5, 3.5],\n    ['-1.5+3.5i', -1.5, 3.5],\n    ['-0.5+3.5i', -0.5, 3.5],\n    ['3.5i', 0, 3.5],\n    ['0.5+3.5i', 0.5, 3.5],\n    ['1+3.5i', 1, 3.5],\n    ['1.5+3.5i', 1.5, 3.5],\n    ['2+3.5i', 2, 3.5],\n    ['2.5+3.5i', 2.5, 3.5],\n    ['3+3.5i', 3, 3.5],\n    ['3.5+3.5i', 3.5, 3.5],\n    ['-2.5-2.5i', -2.5, -2.5, 'i'],\n    ['-2.5-2.5i', -2.5, -2.5, 'i'],\n    ['-1.5-2.5i', -1.5, -2.5, 'i'],\n    ['-1.5-2.5i', -1.5, -2.5, 'i'],\n    ['-0.5-2.5i', -0.5, -2.5, 'i'],\n    ['-2.5i', 0, -2.5, 'i'],\n    ['0.5-2.5i', 0.5, -2.5, 'i'],\n    ['1-2.5i', 1, -2.5, 'i'],\n    ['1.5-2.5i', 1.5, -2.5, 'i'],\n    ['2-2.5i', 2, -2.5, 'i'],\n    ['2.5-2.5i', 2.5, -2.5, 'i'],\n    ['3-2.5i', 3, -2.5, 'i'],\n    ['3.5-2.5i', 3.5, -2.5, 'i'],\n    ['-2.5-2.5i', -2.5, -2.5, 'i'],\n    ['-1.5-2.5i', -1.5, -2.5, 'i'],\n    ['-0.5-2.5i', -0.5, -2.5, 'i'],\n    ['-2.5i', 0, -2.5, 'i'],\n    ['1-2.5i', 1, -2.5, 'i'],\n    ['1.5-2.5i', 1.5, -2.5, 'i'],\n    ['2-2.5i', 2, -2.5, 'i'],\n    ['3-2.5i', 3, -2.5, 'i'],\n    ['3.5-2.5i', 3.5, -2.5, 'i'],\n    ['-2.5-1.5i', -2.5, -1.5, 'i'],\n    ['-1.5-1.5i', -1.5, -1.5, 'i'],\n    ['-0.5-1.5i', -0.5, -1.5, 'i'],\n    ['-1.5i', 0, -1.5, 'i'],\n    ['0.5-1.5i', 0.5, -1.5, 'i'],\n    ['1-1.5i', 1, -1.5, 'i'],\n    ['1.5-1.5i', 1.5, -1.5, 'i'],\n    ['2-1.5i', 2, -1.5, 'i'],\n    ['2.5-1.5i', 2.5, -1.5, 'i'],\n    ['3-1.5i', 3, -1.5, 'i'],\n    ['3.5-1.5i', 3.5, -1.5, 'i'],\n    ['-2.5-1.5i', -2.5, -1.5, 'i'],\n    ['-1.5-1.5i', -1.5, -1.5, 'i'],\n    ['-0.5-1.5i', -0.5, -1.5, 'i'],\n    ['-1.5i', 0, -1.5, 'i'],\n    ['0.5-1.5i', 0.5, -1.5, 'i'],\n    ['1-1.5i', 1, -1.5, 'i'],\n    ['1.5-1.5i', 1.5, -1.5, 'i'],\n    ['2-1.5i', 2, -1.5, 'i'],\n    ['2.5-1.5i', 2.5, -1.5, 'i'],\n    ['3-1.5i', 3, -1.5, 'i'],\n    ['3.5-1.5i', 3.5, -1.5, 'i'],\n    ['-2.5-0.5i', -2.5, -0.5, 'i'],\n    ['-1.5-0.5i', -1.5, -0.5, 'i'],\n    ['-0.5-0.5i', -0.5, -0.5, 'i'],\n    ['-0.5i', 0, -0.5, 'i'],\n    ['0.5-0.5i', 0.5, -0.5, 'i'],\n    ['1-0.5i', 1, -0.5, 'i'],\n    ['1.5-0.5i', 1.5, -0.5, 'i'],\n    ['2-0.5i', 2, -0.5, 'i'],\n    ['2.5-0.5i', 2.5, -0.5, 'i'],\n    ['3-0.5i', 3, -0.5, 'i'],\n    ['3.5-0.5i', 3.5, -0.5, 'i'],\n    ['-2.5', -2.5, 0, 'i'],\n    ['-2.5', -2.5, 0, 'i'],\n    ['-1.5', -1.5, 0, 'i'],\n    ['-1.5', -1.5, 0, 'i'],\n    ['-0.5', -0.5, 0, 'i'],\n    ['0.0', 0, 0, 'i'],\n    ['0.5', 0.5, 0, 'i'],\n    ['1', 1, 0, 'i'],\n    ['1.5', 1.5, 0, 'i'],\n    ['2', 2, 0, 'i'],\n    ['2.5', 2.5, 0, 'i'],\n    ['3', 3, 0, 'i'],\n    ['3.5', 3.5, 0, 'i'],\n    ['-2.5+0.5i', -2.5, 0.5, 'i'],\n    ['-2.5+0.5i', -2.5, 0.5, 'i'],\n    ['-1.5+0.5i', -1.5, 0.5, 'i'],\n    ['-1.5+0.5i', -1.5, 0.5, 'i'],\n    ['-0.5+0.5i', -0.5, 0.5, 'i'],\n    ['0.5i', 0, 0.5, 'i'],\n    ['0.5+0.5i', 0.5, 0.5, 'i'],\n    ['1+0.5i', 1, 0.5, 'i'],\n    ['1.5+0.5i', 1.5, 0.5, 'i'],\n    ['2+0.5i', 2, 0.5, 'i'],\n    ['2.5+0.5i', 2.5, 0.5, 'i'],\n    ['3+0.5i', 3, 0.5, 'i'],\n    ['3.5+0.5i', 3.5, 0.5, 'i'],\n    ['-2.5+i', -2.5, 1, 'i'],\n    ['-2.5+i', -2.5, 1, 'i'],\n    ['-1.5+i', -1.5, 1, 'i'],\n    ['-1.5+i', -1.5, 1, 'i'],\n    ['-0.5+i', -0.5, 1, 'i'],\n    ['i', 0, 1, 'i'],\n    ['0.5+i', 0.5, 1, 'i'],\n    ['1+i', 1, 1, 'i'],\n    ['1.5+i', 1.5, 1, 'i'],\n    ['2+i', 2, 1, 'i'],\n    ['2.5+i', 2.5, 1, 'i'],\n    ['3+i', 3, 1, 'i'],\n    ['3.5+i', 3.5, 1, 'i'],\n    ['-2.5+1.5i', -2.5, 1.5, 'i'],\n    ['-2.5+1.5i', -2.5, 1.5, 'i'],\n    ['-1.5+1.5i', -1.5, 1.5, 'i'],\n    ['-1.5+1.5i', -1.5, 1.5, 'i'],\n    ['-0.5+1.5i', -0.5, 1.5, 'i'],\n    ['1.5i', 0, 1.5, 'i'],\n    ['0.5+1.5i', 0.5, 1.5, 'i'],\n    ['1+1.5i', 1, 1.5, 'i'],\n    ['1.5+1.5i', 1.5, 1.5, 'i'],\n    ['2+1.5i', 2, 1.5, 'i'],\n    ['2.5+1.5i', 2.5, 1.5, 'i'],\n    ['3+1.5i', 3, 1.5, 'i'],\n    ['3.5+1.5i', 3.5, 1.5, 'i'],\n    ['-2.5+2i', -2.5, 2, 'i'],\n    ['-2.5+2i', -2.5, 2, 'i'],\n    ['-1.5+2i', -1.5, 2, 'i'],\n    ['-1.5+2i', -1.5, 2, 'i'],\n    ['-0.5+2i', -0.5, 2, 'i'],\n    ['2i', 0, 2, 'i'],\n    ['0.5+2i', 0.5, 2, 'i'],\n    ['1+2i', 1, 2, 'i'],\n    ['1.5+2i', 1.5, 2, 'i'],\n    ['2+2i', 2, 2, 'i'],\n    ['2.5+2i', 2.5, 2, 'i'],\n    ['3+2i', 3, 2, 'i'],\n    ['3.5+2i', 3.5, 2, 'i'],\n    ['-2.5+2.5i', -2.5, 2.5, 'i'],\n    ['-2.5+2.5i', -2.5, 2.5, 'i'],\n    ['-1.5+2.5i', -1.5, 2.5, 'i'],\n    ['-1.5+2.5i', -1.5, 2.5, 'i'],\n    ['-0.5+2.5i', -0.5, 2.5, 'i'],\n    ['2.5i', 0, 2.5, 'i'],\n    ['0.5+2.5i', 0.5, 2.5, 'i'],\n    ['1+2.5i', 1, 2.5, 'i'],\n    ['1.5+2.5i', 1.5, 2.5, 'i'],\n    ['2+2.5i', 2, 2.5, 'i'],\n    ['2.5+2.5i', 2.5, 2.5, 'i'],\n    ['3+2.5i', 3, 2.5, 'i'],\n    ['3.5+2.5i', 3.5, 2.5, 'i'],\n    ['-2.5+3i', -2.5, 3, 'i'],\n    ['-2.5+3i', -2.5, 3, 'i'],\n    ['-1.5+3i', -1.5, 3, 'i'],\n    ['-1.5+3i', -1.5, 3, 'i'],\n    ['-0.5+3i', -0.5, 3, 'i'],\n    ['3i', 0, 3, 'i'],\n    ['0.5+3i', 0.5, 3, 'i'],\n    ['1+3i', 1, 3, 'i'],\n    ['1.5+3i', 1.5, 3, 'i'],\n    ['2+3i', 2, 3, 'i'],\n    ['2.5+3i', 2.5, 3, 'i'],\n    ['3+3i', 3, 3, 'i'],\n    ['3.5+3i', 3.5, 3, 'i'],\n    ['-2.5+3.5i', -2.5, 3.5, 'i'],\n    ['-2.5+3.5i', -2.5, 3.5, 'i'],\n    ['-1.5+3.5i', -1.5, 3.5, 'i'],\n    ['-1.5+3.5i', -1.5, 3.5, 'i'],\n    ['-0.5+3.5i', -0.5, 3.5, 'i'],\n    ['3.5i', 0, 3.5, 'i'],\n    ['0.5+3.5i', 0.5, 3.5, 'i'],\n    ['1+3.5i', 1, 3.5, 'i'],\n    ['1.5+3.5i', 1.5, 3.5, 'i'],\n    ['2+3.5i', 2, 3.5, 'i'],\n    ['2.5+3.5i', 2.5, 3.5, 'i'],\n    ['3+3.5i', 3, 3.5, 'i'],\n    ['3.5+3.5i', 3.5, 3.5, 'i'],\n    ['-2.5-2.5j', -2.5, -2.5, 'j'],\n    ['-2.5-2.5j', -2.5, -2.5, 'j'],\n    ['-1.5-2.5j', -1.5, -2.5, 'j'],\n    ['-1.5-2.5j', -1.5, -2.5, 'j'],\n    ['-0.5-2.5j', -0.5, -2.5, 'j'],\n    ['-2.5j', 0, -2.5, 'j'],\n    ['0.5-2.5j', 0.5, -2.5, 'j'],\n    ['1-2.5j', 1, -2.5, 'j'],\n    ['1.5-2.5j', 1.5, -2.5, 'j'],\n    ['2-2.5j', 2, -2.5, 'j'],\n    ['2.5-2.5j', 2.5, -2.5, 'j'],\n    ['3-2.5j', 3, -2.5, 'j'],\n    ['3.5-2.5j', 3.5, -2.5, 'j'],\n    ['-2.5-2.5j', -2.5, -2.5, 'j'],\n    ['-2.5-2.5j', -2.5, -2.5, 'j'],\n    ['-1.5-2.5j', -1.5, -2.5, 'j'],\n    ['-1.5-2.5j', -1.5, -2.5, 'j'],\n    ['-0.5-2.5j', -0.5, -2.5, 'j'],\n    ['-2.5j', 0, -2.5, 'j'],\n    ['0.5-2.5j', 0.5, -2.5, 'j'],\n    ['1-2.5j', 1, -2.5, 'j'],\n    ['1.5-2.5j', 1.5, -2.5, 'j'],\n    ['2-2.5j', 2, -2.5, 'j'],\n    ['2.5-2.5j', 2.5, -2.5, 'j'],\n    ['3-2.5j', 3, -2.5, 'j'],\n    ['3.5-2.5j', 3.5, -2.5, 'j'],\n    ['-2.5-1.5j', -2.5, -1.5, 'j'],\n    ['-2.5-1.5j', -2.5, -1.5, 'j'],\n    ['-1.5-1.5j', -1.5, -1.5, 'j'],\n    ['-1.5-1.5j', -1.5, -1.5, 'j'],\n    ['-0.5-1.5j', -0.5, -1.5, 'j'],\n    ['-1.5j', 0, -1.5, 'j'],\n    ['0.5-1.5j', 0.5, -1.5, 'j'],\n    ['1-1.5j', 1, -1.5, 'j'],\n    ['1.5-1.5j', 1.5, -1.5, 'j'],\n    ['2-1.5j', 2, -1.5, 'j'],\n    ['2.5-1.5j', 2.5, -1.5, 'j'],\n    ['3-1.5j', 3, -1.5, 'j'],\n    ['3.5-1.5j', 3.5, -1.5, 'j'],\n    ['-2.5-1.5j', -2.5, -1.5, 'j'],\n    ['-2.5-1.5j', -2.5, -1.5, 'j'],\n    ['-1.5-1.5j', -1.5, -1.5, 'j'],\n    ['-1.5-1.5j', -1.5, -1.5, 'j'],\n    ['-0.5-1.5j', -0.5, -1.5, 'j'],\n    ['-1.5j', 0, -1.5, 'j'],\n    ['0.5-1.5j', 0.5, -1.5, 'j'],\n    ['1-1.5j', 1, -1.5, 'j'],\n    ['1.5-1.5j', 1.5, -1.5, 'j'],\n    ['2-1.5j', 2, -1.5, 'j'],\n    ['2.5-1.5j', 2.5, -1.5, 'j'],\n    ['3-1.5j', 3, -1.5, 'j'],\n    ['3.5-1.5j', 3.5, -1.5, 'j'],\n    ['-2.5-0.5j', -2.5, -0.5, 'j'],\n    ['-2.5-0.5j', -2.5, -0.5, 'j'],\n    ['-1.5-0.5j', -1.5, -0.5, 'j'],\n    ['-1.5-0.5j', -1.5, -0.5, 'j'],\n    ['-0.5-0.5j', -0.5, -0.5, 'j'],\n    ['-0.5j', 0, -0.5, 'j'],\n    ['0.5-0.5j', 0.5, -0.5, 'j'],\n    ['1-0.5j', 1, -0.5, 'j'],\n    ['1.5-0.5j', 1.5, -0.5, 'j'],\n    ['2-0.5j', 2, -0.5, 'j'],\n    ['2.5-0.5j', 2.5, -0.5, 'j'],\n    ['3-0.5j', 3, -0.5, 'j'],\n    ['3.5-0.5j', 3.5, -0.5, 'j'],\n    ['-2.5', -2.5, 0, 'j'],\n    ['-2.5', -2.5, 0, 'j'],\n    ['-1.5', -1.5, 0, 'j'],\n    ['-1.5', -1.5, 0, 'j'],\n    ['-0.5', -0.5, 0, 'j'],\n    ['0.0', 0, 0, 'j'],\n    ['0.5', 0.5, 0, 'j'],\n    ['1', 1, 0, 'j'],\n    ['1.5', 1.5, 0, 'j'],\n    ['2', 2, 0, 'j'],\n    ['2.5', 2.5, 0, 'j'],\n    ['3', 3, 0, 'j'],\n    ['3.5', 3.5, 0, 'j'],\n    ['-2.5+0.5j', -2.5, 0.5, 'j'],\n    ['-2.5+0.5j', -2.5, 0.5, 'j'],\n    ['-1.5+0.5j', -1.5, 0.5, 'j'],\n    ['-1.5+0.5j', -1.5, 0.5, 'j'],\n    ['-0.5+0.5j', -0.5, 0.5, 'j'],\n    ['0.5j', 0, 0.5, 'j'],\n    ['0.5+0.5j', 0.5, 0.5, 'j'],\n    ['1+0.5j', 1, 0.5, 'j'],\n    ['1.5+0.5j', 1.5, 0.5, 'j'],\n    ['2+0.5j', 2, 0.5, 'j'],\n    ['2.5+0.5j', 2.5, 0.5, 'j'],\n    ['3+0.5j', 3, 0.5, 'j'],\n    ['3.5+0.5j', 3.5, 0.5, 'j'],\n    ['-2.5+j', -2.5, 1, 'j'],\n    ['-2.5+j', -2.5, 1, 'j'],\n    ['-1.5+j', -1.5, 1, 'j'],\n    ['-1.5+j', -1.5, 1, 'j'],\n    ['-0.5+j', -0.5, 1, 'j'],\n    ['j', 0, 1, 'j'],\n    ['0.5+j', 0.5, 1, 'j'],\n    ['1+j', 1, 1, 'j'],\n    ['1.5+j', 1.5, 1, 'j'],\n    ['2+j', 2, 1, 'j'],\n    ['2.5+j', 2.5, 1, 'j'],\n    ['3+j', 3, 1, 'j'],\n    ['3.5+j', 3.5, 1, 'j'],\n    ['-2.5+1.5j', -2.5, 1.5, 'j'],\n    ['-2.5+1.5j', -2.5, 1.5, 'j'],\n    ['-1.5+1.5j', -1.5, 1.5, 'j'],\n    ['-1.5+1.5j', -1.5, 1.5, 'j'],\n    ['-0.5+1.5j', -0.5, 1.5, 'j'],\n    ['1.5j', 0, 1.5, 'j'],\n    ['0.5+1.5j', 0.5, 1.5, 'j'],\n    ['1+1.5j', 1, 1.5, 'j'],\n    ['1.5+1.5j', 1.5, 1.5, 'j'],\n    ['2+1.5j', 2, 1.5, 'j'],\n    ['2.5+1.5j', 2.5, 1.5, 'j'],\n    ['3+1.5j', 3, 1.5, 'j'],\n    ['3.5+1.5j', 3.5, 1.5, 'j'],\n    ['-2.5+2j', -2.5, 2, 'j'],\n    ['-2.5+2j', -2.5, 2, 'j'],\n    ['-1.5+2j', -1.5, 2, 'j'],\n    ['-1.5+2j', -1.5, 2, 'j'],\n    ['-0.5+2j', -0.5, 2, 'j'],\n    ['2j', 0, 2, 'j'],\n    ['0.5+2j', 0.5, 2, 'j'],\n    ['1+2j', 1, 2, 'j'],\n    ['1.5+2j', 1.5, 2, 'j'],\n    ['2+2j', 2, 2, 'j'],\n    ['2.5+2j', 2.5, 2, 'j'],\n    ['3+2j', 3, 2, 'j'],\n    ['3.5+2j', 3.5, 2, 'j'],\n    ['-2.5+2.5j', -2.5, 2.5, 'j'],\n    ['-2.5+2.5j', -2.5, 2.5, 'j'],\n    ['-1.5+2.5j', -1.5, 2.5, 'j'],\n    ['-1.5+2.5j', -1.5, 2.5, 'j'],\n    ['-0.5+2.5j', -0.5, 2.5, 'j'],\n    ['2.5j', 0, 2.5, 'j'],\n    ['0.5+2.5j', 0.5, 2.5, 'j'],\n    ['1+2.5j', 1, 2.5, 'j'],\n    ['1.5+2.5j', 1.5, 2.5, 'j'],\n    ['2+2.5j', 2, 2.5, 'j'],\n    ['2.5+2.5j', 2.5, 2.5, 'j'],\n    ['3+2.5j', 3, 2.5, 'j'],\n    ['3.5+2.5j', 3.5, 2.5, 'j'],\n    ['-2.5+3j', -2.5, 3, 'j'],\n    ['-2.5+3j', -2.5, 3, 'j'],\n    ['-1.5+3j', -1.5, 3, 'j'],\n    ['-1.5+3j', -1.5, 3, 'j'],\n    ['-0.5+3j', -0.5, 3, 'j'],\n    ['3j', 0, 3, 'j'],\n    ['0.5+3j', 0.5, 3, 'j'],\n    ['1+3j', 1, 3, 'j'],\n    ['1.5+3j', 1.5, 3, 'j'],\n    ['2+3j', 2, 3, 'j'],\n    ['2.5+3j', 2.5, 3, 'j'],\n    ['3+3j', 3, 3, 'j'],\n    ['3.5+3j', 3.5, 3, 'j'],\n    ['-2.5+3.5j', -2.5, 3.5, 'j'],\n    ['-2.5+3.5j', -2.5, 3.5, 'j'],\n    ['-1.5+3.5j', -1.5, 3.5, 'j'],\n    ['-1.5+3.5j', -1.5, 3.5, 'j'],\n    ['-0.5+3.5j', -0.5, 3.5, 'j'],\n    ['3.5j', 0, 3.5, 'j'],\n    ['0.5+3.5j', 0.5, 3.5, 'j'],\n    ['1+3.5j', 1, 3.5, 'j'],\n    ['1.5+3.5j', 1.5, 3.5, 'j'],\n    ['2+3.5j', 2, 3.5, 'j'],\n    ['2.5+3.5j', 2.5, 3.5, 'j'],\n    ['3+3.5j', 3, 3.5, 'j'],\n    ['3.5+3.5j', 3.5, 3.5, 'j'],\n    ['-1.23-4.56i', -1.23, -4.56],\n    ['-3.21i', 0, -3.21, 'i'],\n    ['1.23-2.34j', 1.23, -2.34, 'j'],\n    ['-1.23', -1.23, 0],\n    ['0.0', 0, 0, 'i'],\n    ['1.23', 1.23, 0, 'j'],\n    ['-1.23+4.56i', -1.23, 4.56],\n    ['3.21i', 0, 3.21, 'i'],\n    ['1.23+2.34j', 1.23, 2.34, 'j'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/CONVERTUOM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    'Imperial from and to (mass)' => [1.942559385723E-03, 1.0, 'ozm', 'sg'],\n    'Same prefixed metric UoM' => [5.0, 5.0, 'kg', 'kg'],\n    'Imperial to prefixed metric' => [4.5359237E-01, 1.0, 'lbm', 'kg'],\n    'Prefixed metric to prefixed metric, same unit' => [0.2, 2.0, 'hg', 'kg'],\n    'Unprefixed metric to prefixed metric, same unit' => [12.345, 12345, 'm', 'km'],\n    'Prefixed metric to unprefixed metric, same unit' => [12345.0, 12.345, 'km', 'm'],\n    'Prefixed metric to imperial' => [0.62137119223732995, 1, 'km', 'mi'],\n    'Prefixed metric to alternative metric' => [1.23450e5, 12.345, 'um', 'ang'],\n    'Prefixed metric to alternative prefixed metric' => [1.2345E+02, 12.345, 'um', 'kang'],\n    'Prefixed metric to 2-character prefixed metric, same unit' => [1000.0, 100.0, 'hl', 'dal'],\n    'Imperial to Imperial (distance)' => [1.0, 3.0, 'ft', 'yd'],\n    [20.0, 68, 'F', 'C'],\n    [68.0, 20, 'C', 'F'],\n    [293.145, 67.991, 'F', 'K'],\n    [67.991, 293.145, 'K', 'F'],\n    [-273.15, 0, 'K', 'C'],\n    [-459.67, 0, 'K', 'F'],\n    [295.15, 22, 'C', 'K'],\n    [22.5, 295.65, 'K', 'C'],\n    'Melting Point of Titanium (K to C)' => [1667.85, 1941, 'K', 'C'],\n    'Melting Point of Titanium (K to F)' => [3034.13, 1941, 'K', 'F'],\n    'Melting Point of Titanium (K to Rankine)' => [3493.8, 1941, 'K', 'Rank'],\n    'Melting Point of Titanium (K to Réaumur)' => [1334.28, 1941, 'K', 'Reau'],\n    'Melting Point of Titanium (Rankine to K)' => [1941.0, 3493.8, 'Rank', 'K'],\n    'Melting Point of Titanium (Réaumur to K)' => [1941.0, 1334.28, 'Reau', 'K'],\n    'Temperature synonyms (K)' => [123.45, 123.45, 'K', 'kel'],\n    'Temperature synonyms (C)' => [123.45, 123.45, 'C', 'cel'],\n    'Temperature synonyms (F)' => [123.45, 123.45, 'F', 'fah'],\n    'Invalid value to convert' => [ExcelError::VALUE(), 'three', 'ft', 'yds'],\n    'Imperial to 2-character prefixed imperial, same unit' => [ExcelError::NA(), 100.0, 'pt', 'dapt'],\n    'Prefixed metric to binary prefixed metric' => [ExcelError::NA(), 12.345, 'um', 'kiang'],\n    'Mismatched categories' => [ExcelError::NA(), 1, 'ft', 'day'],\n    'From prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'kpt', 'lt'],\n    'To prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'lt', 'kpt'],\n    'From binary prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'kiqt', 'pt'],\n    'To binary prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'pt', 'kiqt'],\n    'From prefixed Imperial 2 (Invalid)' => [ExcelError::NA(), 12345.6, 'baton', 'cwt'],\n    'To prefixed Imperial 2 (Invalid)' => [ExcelError::NA(), 12345.6, 'cwt', 'baton'],\n    'Invalid from unit' => [ExcelError::NA(), 234.56, 'xxxx', 'm'],\n    'Invalid to unit' => [ExcelError::NA(), 234.56, 'm', 'xxxx'],\n    'Basic Information conversion' => [2, 16, 'bit', 'byte'],\n    'Information with standard metric prefix' => [1000, 1, 'kbyte', 'byte'],\n    'Information with binary prefix' => [1024, 1, 'kibyte', 'byte'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/DEC2BIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['101100101', '357'],\n    ['1001', 9, 4],\n    ['00001001', 9, 8],\n    ['001001', 9, 6.75], // Leading places as a float\n    [ExcelError::NAN(), 9, -1], // Leading places negative\n    [ExcelError::VALUE(), 9, 'ABC'], // Leading places non-numeric\n    ['11110110', '246'],\n    [ExcelError::NAN(), '12345'],\n    [ExcelError::NAN(), '123456789'],\n    ['1111011', '123.45'],\n    ['0', '0'],\n    [ExcelError::VALUE(), '3579A'], // Invalid decimal\n    [ExcelError::VALUE(), true], // ODS accepts boolean, Excel/Gnumeric don't\n    [ExcelError::VALUE(), false], // ODS accepts boolean, Excel/Gnumeric don't\n    ['1110011100', '-100'], // 2's Complement\n    ['1110010101', '-107'], // 2's Complement\n    ['1000000000', '-512'], // lowest negative\n    ['111111111', '511'], // highest positive\n    [ExcelError::NAN(), '512'], // Too large\n    [ExcelError::NAN(), '-513'], // Too small\n    ['0011', 3, 4],\n    [ExcelError::NAN(), 3, 0],\n    [ExcelError::NAN(), 3, -1],\n    [ExcelError::NAN(), 3, 14],\n    [ExcelError::NAN(), 3, 1],\n    ['11', 3, 2],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/DEC2BINOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // ODS accepts boolean, Excel/Gnumeric don't\n    ['0', false], // ODS accepts boolean, Excel/Gnumeric don't\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/DEC2HEX.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['165', '357'],\n    ['54D', '1357'],\n    ['F6', '246'],\n    ['3039', '12345'],\n    ['75BCD15', '123456789'],\n    ['0064', 100, 4],\n    ['00064', 100, 5.75], // Leading places as a float\n    [ExcelError::NAN(), 100, -1], // Leading places negative\n    [ExcelError::VALUE(), 100, 'ABC'], // Leading places non-numeric\n    ['7B', '123.45'],\n    ['0', '0'],\n    [ExcelError::VALUE(), '3579A'], // Invalid decimal\n    [ExcelError::VALUE(), true], // ODS accepts boolean, Excel/Gnumeric don't\n    [ExcelError::VALUE(), false],\n    ['FFFFFFFFCA', '-54'], // 2's Complement\n    ['FFFFFFFF95', '-107'], // 2's Complement\n    ['FF80000001', '-2147483647'], // 2's Complement\n    ['FF80000000', '-2147483648'], // 2's Complement\n    ['7FFFFFFFFF', 549755813887], // highest positive, succeeds even for 32-bit\n    [ExcelError::NAN(), 549755813888],\n    ['8000000000', -549755813888], // lowest negative, succeeds even for 32-bit\n    ['A2DE246000', -400000000000],\n    ['5D21DBA000', 400000000000],\n    [ExcelError::NAN(), -549755813889],\n    ['0103', 259, 4],\n    [ExcelError::NAN(), 259, 0],\n    [ExcelError::NAN(), 259, -1],\n    [ExcelError::NAN(), 259, 14],\n    [ExcelError::NAN(), 259, 1],\n    ['103', 259, 3],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/DEC2HEXOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // ODS accepts bool, Excel/Gnumeric do not\n    ['0', false],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/DEC2OCT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['545', '357'],\n    ['2515', '1357'],\n    ['366', '246'],\n    ['30071', '12345'],\n    ['726746425', '123456789'],\n    ['173', '123.45'],\n    ['072', 58, 3],\n    ['0', '0'],\n    [ExcelError::VALUE(), '3579A'], // Invalid decimal\n    [ExcelError::VALUE(), true], // ODS accepts bool, Excel/Gnumeric do not\n    [ExcelError::VALUE(), false],\n    ['7777777634', '-100'], // 2's Complement\n    ['7777777625', '-107'], // 2's Complement\n    ['3777777777', 536870911], // highest positive\n    [ExcelError::NAN(), 536870912],\n    ['4000000000', -536870912], // lowest negative\n    [ExcelError::NAN(), -536870913],\n    ['0403', 259, 4],\n    [ExcelError::NAN(), 259, 0],\n    [ExcelError::NAN(), 259, -1],\n    [ExcelError::NAN(), 259, 14],\n    [ExcelError::NAN(), 259, 1],\n    ['403', 259, 3],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/DEC2OCTOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // ODS accepts bool, Excel/Gnumeric do not\n    ['0', false],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/DELTA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [1, -1.5, -1.5],\n    [0, -0.75, -1.5],\n    [0, 0, -1.5],\n    [0, 0.75, -1.5],\n    [0, 1.5, -1.5],\n    [0, -1.5, -0.75],\n    [1, -0.75, -0.75],\n    [0, 0, -0.75],\n    [0, 0.75, -0.75],\n    [0, 1.5, -0.75],\n    [0, -1.5, 0],\n    [0, -0.75, 0],\n    [1, 0, 0],\n    [0, 0.75, 0],\n    [0, 1.5, 0],\n    [0, -1.5, 0.75],\n    [0, -0.75, 0.75],\n    [0, 0, 0.75],\n    [1, 0.75, 0.75],\n    [0, 1.5, 0.75],\n    [0, -1.5, 1.5],\n    [0, -0.75, 1.5],\n    [0, 0, 1.5],\n    [0, 0.75, 1.5],\n    [1, 1.5, 1.5],\n    [0, -0.75],\n    [1, 0],\n    [0, 0.75],\n    [ExcelError::VALUE(), 1, true],\n    [ExcelError::VALUE(), true, 1],\n    [ExcelError::VALUE(), 1, 'ABC'],\n    [ExcelError::VALUE(), 'ABC', 1],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/ERF.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\n//  Result, lower bound, upper bound,\nreturn [\n    [0.0, 0],\n    [0.0112834155558496, 0.01],\n    [0.056371977797016602, 0.05],\n    [0.11246291601828499, 0.1],\n    [0.140316204801334, 0.125],\n    [0.167995971427363, 0.15],\n    [0.222702589210478, 0.2],\n    [0.27632639016823701, 0.25],\n    [0.328626759459127, 0.3],\n    [0.37938205356230997, 0.35],\n    [0.42839235504666801, 0.4],\n    [0.475481719786924, 0.45],\n    [0.52049987781304696, 0.5],\n    [0.60385609084792602, 0.6],\n    [0.67780119383741799, 0.7],\n    [0.74210096470766096, 0.8],\n    [0.79690821242283205, 0.9],\n    [0.84270079294971501, 1],\n    [0.88020506957408196, 1.1],\n    [0.910313978229635, 1.2],\n    [0.93400794494065198, 1.3],\n    [0.95228511976264896, 1.4],\n    [0.96610514647531098, 1.5],\n    [0.98667167121918198, 1.75],\n    [0.99532226501895305, 2],\n    [0.99959304798255499, 2.5],\n    [0.99997790950300103, 3],\n    [0.99999925690162805, 3.5],\n    [0.99999998458274197, 4],\n    [0.99999999980338405, 4.5],\n    [0.99999999999846301, 5],\n    [0.99999999999999301, 5.5],\n    [1.0, 6],\n    [1.0, 32],\n    [-0.11246291601828499, -0.1],\n    [-0.84270079294971501, -1],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false],\n    [0.99532226501895305, '2'],\n    [ExcelError::VALUE(), 'TWO'],\n    [0.0, -1.5, -1.5],\n    [-0.25494951282179601, -0.75, -1.5],\n    [-0.96610514647531098, 0, -1.5],\n    [-1.67726078012883, 0.75, -1.5],\n    [-1.93221029295062, 1.5, -1.5],\n    [-1.96464242988863, 2.25, -1.5],\n    [-1.96608305597831, 3, -1.5],\n    [-1.96610503274805, 3.75, -1.5],\n    [-1.96610514627869, 4.5, -1.5],\n    [0.25494951282179601, -1.5, -0.75],\n    [0.0, -0.75, -0.75],\n    [-0.71115563365351497, 0, -0.75],\n    [-1.4223112673070299, 0.75, -0.75],\n    [-1.67726078012883, 1.5, -0.75],\n    [-1.70969291706683, 2.25, -0.75],\n    [-1.71113354315652, 3, -0.75],\n    [-1.71115551992626, 3.75, -0.75],\n    [-1.7111556334569, 4.5, -0.75],\n    [0.96610514647531098, -1.5, 0],\n    [0.71115563365351497, -0.75, 0],\n    [0.0, 0, 0],\n    [-0.71115563365351497, 0.75, 0],\n    [-0.96610514647531098, 1.5, 0],\n    [-0.99853728341331904, 2.25, 0],\n    [-0.99997790950300103, 3, 0],\n    [-0.99999988627274305, 3.75, 0],\n    [-0.99999999980338405, 4.5, 0],\n    [1.67726078012883, -1.5, 0.75],\n    [1.4223112673070299, -0.75, 0.75],\n    [0.71115563365351497, 0, 0.75],\n    [0.0, 0.75, 0.75],\n    [-0.25494951282179601, 1.5, 0.75],\n    [-0.28738164975980401, 2.25, 0.75],\n    [-0.288822275849486, 3, 0.75],\n    [-0.28884425261922803, 3.75, 0.75],\n    [-0.28884436614986903, 4.5, 0.75],\n    [1.93221029295062, -1.5, 1.5],\n    [1.67726078012883, -0.75, 1.5],\n    [0.96610514647531098, 0, 1.5],\n    [0.25494951282179601, 0.75, 1.5],\n    [0.0, 1.5, 1.5],\n    [-0.032432136938008102, 2.25, 1.5],\n    [-0.0338727630276906, 3, 1.5],\n    [-0.033894739797432599, 3.75, 1.5],\n    [-0.033894853328073203, 4.5, 1.5],\n    [1.96464242988863, -1.5, 2.25],\n    [1.70969291706683, -0.75, 2.25],\n    [0.99853728341331904, 0, 2.25],\n    [0.28738164975980401, 0.75, 2.25],\n    [0.032432136938008102, 1.5, 2.25],\n    [0.0, 2.25, 2.25],\n    [-0.0014406260896824999, 3, 2.25],\n    [-0.0014626028594246, 3.75, 2.25],\n    [-0.0014627163900651, 4.5, 2.25],\n    [1.96608305597831, -1.5, 3],\n    [1.71113354315652, -0.75, 3],\n    [0.99997790950300103, 0, 3],\n    [0.288822275849486, 0.75, 3],\n    [0.0338727630276906, 1.5, 3],\n    [0.0014406260896824999, 2.25, 3],\n    [0.0, 3, 3],\n    [-2.1976769741999999E-5, 3.75, 3],\n    [-2.2090300382599999E-5, 4.5, 3],\n    [1.96610503274805, -1.5, 3.75],\n    [1.71115551992626, -0.75, 3.75],\n    [0.99999988627274305, 0, 3.75],\n    [0.28884425261922803, 0.75, 3.75],\n    [0.033894739797432599, 1.5, 3.75],\n    [0.0014626028594246, 2.25, 3.75],\n    [2.1976769741999999E-5, 3, 3.75],\n    [0.0, 3.75, 3.75],\n    [-1.135306406E-7, 4.5, 3.75],\n    [1.96610514627869, -1.5, 4.5],\n    [1.7111556334569, -0.75, 4.5],\n    [0.99999999980338405, 0, 4.5],\n    [0.28884436614986903, 0.75, 4.5],\n    [0.033894853328073203, 1.5, 4.5],\n    [0.0014627163900651, 2.25, 4.5],\n    [2.2090300382599999E-5, 3, 4.5],\n    [1.135306406E-7, 3.75, 4.5],\n    [0.0, 4.5, 4.5],\n    [-1.84270079294818, 5, -1],\n    [1.84270079294818, -5, 1],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/ERFC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\n//  Result, x value\nreturn [\n    [1.0, 0],\n    [0.98871658444415, 0.01],\n    [0.94362802220298303, 0.05],\n    [0.88753708398171505, 0.1],\n    [0.859683795198666, 0.125],\n    [0.832004028572636, 0.15],\n    [0.77729741078952197, 0.2],\n    [0.72367360983176299, 0.25],\n    [0.671373240540873, 0.3],\n    [0.62061794643768997, 0.35],\n    [0.57160764495333205, 0.4],\n    [0.524518280213076, 0.45],\n    [0.47950012218695298, 0.5],\n    [0.39614390915207398, 0.6],\n    [0.32219880616258201, 0.7],\n    [0.25789903529233899, 0.8],\n    [0.203091787577168, 0.9],\n    [0.15729920705028499, 1],\n    [0.119794930425918, 1.1],\n    [0.089686021770364596, 1.2],\n    [0.065992055059347507, 1.3],\n    [0.047714880237351202, 1.4],\n    [0.033894853524689302, 1.5],\n    [0.0133283287808176, 1.75],\n    [0.0046777349810473001, 2],\n    [0.00040695201744500001, 2.5],\n    [2.20904969986E-5, 3],\n    [7.4309837229999996E-7, 3.5],\n    [1.54172579E-8, 4],\n    [1.9661600000000001E-10, 4.5],\n    [1.5375000000000001E-12, 5],\n    [7.4000000000000003E-15, 5.5],\n    [0.0, 6],\n    [0.0, 32],\n    [1.1124629160182899, -0.1],\n    [1.8427007929497099, -1],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false],\n    [0.0046777349810473001, '2'],\n    [ExcelError::VALUE(), 'TWO'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/ERFPRECISE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n//  Result, lower bound, upper bound\nreturn [\n    [0.0, 0],\n    [0.0112834155558496, 0.01],\n    [-0.8427007929497148, -1.0],\n    [0.9661051464753108, 1.5],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/GESTEP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [1, -1.5, -1.5],\n    [1, -0.75, -1.5],\n    [1, 0, -1.5],\n    [1, 0.75, -1.5],\n    [1, 1.5, -1.5],\n    [1, 2.25, -1.5],\n    [1, 3, -1.5],\n    [1, 3.75, -1.5],\n    [1, 4.5, -1.5],\n    [0, -1.5, -0.75],\n    [1, -0.75, -0.75],\n    [1, 0, -0.75],\n    [1, 0.75, -0.75],\n    [1, 1.5, -0.75],\n    [1, 2.25, -0.75],\n    [1, 3, -0.75],\n    [1, 3.75, -0.75],\n    [1, 4.5, -0.75],\n    [0, -1.5, 0],\n    [0, -0.75, 0],\n    [1, 0, 0],\n    [1, 0.75, 0],\n    [1, 1.5, 0],\n    [1, 2.25, 0],\n    [1, 3, 0],\n    [1, 3.75, 0],\n    [1, 4.5, 0],\n    [0, -1.5, 0.75],\n    [0, -0.75, 0.75],\n    [0, 0, 0.75],\n    [1, 0.75, 0.75],\n    [1, 1.5, 0.75],\n    [1, 2.25, 0.75],\n    [1, 3, 0.75],\n    [1, 3.75, 0.75],\n    [1, 4.5, 0.75],\n    [0, -1.5, 1.5],\n    [0, -0.75, 1.5],\n    [0, 0, 1.5],\n    [0, 0.75, 1.5],\n    [1, 1.5, 1.5],\n    [1, 2.25, 1.5],\n    [1, 3, 1.5],\n    [1, 3.75, 1.5],\n    [1, 4.5, 1.5],\n    [0, -1.5, 2.25],\n    [0, -0.75, 2.25],\n    [0, 0, 2.25],\n    [0, 0.75, 2.25],\n    [0, 1.5, 2.25],\n    [1, 2.25, 2.25],\n    [1, 3, 2.25],\n    [1, 3.75, 2.25],\n    [1, 4.5, 2.25],\n    [0, -1.5, 3],\n    [0, -0.75, 3],\n    [0, 0, 3],\n    [0, 0.75, 3],\n    [0, 1.5, 3],\n    [0, 2.25, 3],\n    [1, 3, 3],\n    [1, 3.75, 3],\n    [1, 4.5, 3],\n    [0, -1.5, 3.75],\n    [0, -0.75, 3.75],\n    [0, 0, 3.75],\n    [0, 0.75, 3.75],\n    [0, 1.5, 3.75],\n    [0, 2.25, 3.75],\n    [0, 3, 3.75],\n    [1, 3.75, 3.75],\n    [1, 4.5, 3.75],\n    [0, -1.5, 4.5],\n    [0, -0.75, 4.5],\n    [0, 0, 4.5],\n    [0, 0.75, 4.5],\n    [0, 1.5, 4.5],\n    [0, 2.25, 4.5],\n    [0, 3, 4.5],\n    [0, 3.75, 4.5],\n    [1, 4.5, 4.5],\n    [0, -1.5],\n    [ExcelError::VALUE(), 1, true],\n    [ExcelError::VALUE(), true, 1],\n    [ExcelError::VALUE(), 1, 'ABC'],\n    [ExcelError::VALUE(), 'ABC', 1],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/HEX2BIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['11111111', 'FF'],\n    ['111111111', '1FF'],\n    [ExcelError::NAN(), '200'],\n    ['1000000000', 'FFFFFFFE00'], // 2's Complement\n    [ExcelError::NAN(), 'FFFFFFFDFF'], // 2's Complement\n    ['111111111', '01FF'], // highest positive\n    [ExcelError::NAN(), '0200'],\n    ['1000000000', 'FFFFFFFE00'], // lowest negative\n    [ExcelError::NAN(), 'FFFFFFFDFF'],\n    ['110101011', '01AB'],\n    [ExcelError::NAN(), 'ABCD'],\n    ['11110110', 'F6'],\n    ['00001111', 'F', 8],\n    ['10110111', 'B7'],\n    [ExcelError::NAN(), '12345'],\n    [ExcelError::NAN(), '123456789'],\n    [ExcelError::NAN(), '123.45'],\n    ['0', '0'],\n    [ExcelError::NAN(), 'G3579A'],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false],\n    ['01010', 'A', 5],\n    [ExcelError::NAN(), 'A', 0],\n    [ExcelError::NAN(), 'A', -1],\n    [ExcelError::NAN(), 'A', 14],\n    [ExcelError::NAN(), 'A', 3],\n    ['1010', 'A', 4],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/HEX2BINOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // ODS accepts boolean, Excel/Gnumeric don't\n    ['0', false], // ODS accepts boolean, Excel/Gnumeric don't\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/HEX2DEC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [427, '01AB'],\n    [43981, 'ABCD'],\n    [246, 'F6'],\n    [74565, '12345'],\n    [4886718345, '123456789'],\n    [ExcelError::NAN(), '123.45'],\n    [0, '0'],\n    [0, ''],\n    [ExcelError::NAN(), 'G3579A'],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false],\n    [ExcelError::NAN(), '-107'],\n    [165, 'A5'],\n    [1034160313, '3DA408B9'],\n    [-165, 'FFFFFFFF5B'], // 2's Complement\n    [-1, 'FFFFFFFFFF'], // 2's Complement\n    [ExcelError::NAN(), '1FFFFFFFFFF'], // Too large\n    [549755813887, '7fffffffff'], // highest positive, succeeds even for 32-bit\n    [-549755813888, '8000000000'], // lowest negative, succeeds even for 32-bit\n    [-2147483648, 'ff80000000'],\n    [2147483648, '80000000'],\n    [2147483647, '7fffffff'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/HEX2DECOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [1, true], // ODS accepts boolean, Excel/Gnumeric don't\n    [0, false], // ODS accepts boolean, Excel/Gnumeric don't\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/HEX2OCT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['653', '01AB'],\n    ['125715', 'ABCD'],\n    ['366', 'F6'],\n    ['35516', '3B4E'],\n    ['017', 'F', 3],\n    ['221505', '12345'],\n    [ExcelError::NAN(), '123456789'],\n    [ExcelError::NAN(), '123.45'],\n    ['0', '0'],\n    [ExcelError::NAN(), 'G3579A'],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false],\n    [ExcelError::NAN(), '-107'],\n    ['7777777400', 'FFFFFFFF00'], // 2's Complement\n    ['3777777777', '1FFFFFFF'], // highest positive\n    [ExcelError::NAN(), '20000000'],\n    ['4000000000', 'FFE0000000'], // lowest negative\n    [ExcelError::NAN(), 'FFDFFFFFFF'],\n    ['00012', 'A', 5],\n    [ExcelError::NAN(), 'A', 0],\n    [ExcelError::NAN(), 'A', -1],\n    [ExcelError::NAN(), 'A', 14],\n    [ExcelError::NAN(), 'A', 1],\n    ['12', 'A', 2],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/HEX2OCTOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // ODS accepts boolean, Excel/Gnumeric don't\n    ['0', false], // ODS accepts boolean, Excel/Gnumeric don't\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMABS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        13.58029822942,\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        6780000000.0,\n        '1.234E-5+6.78E9i',\n    ],\n    [\n        4.3011626335209998,\n        '3.5+2.5i',\n    ],\n    [\n        3.6400549446400001,\n        '3.5+i',\n    ],\n    [\n        3.5,\n        '3.5',\n    ],\n    [\n        3.6400549446400001,\n        '3.5-i',\n    ],\n    [\n        4.3011626335209998,\n        '3.5-2.5i',\n    ],\n    [\n        2.6925824035670001,\n        '1+2.5i',\n    ],\n    [\n        1.4142135623730001,\n        '1+i',\n    ],\n    [\n        1,\n        '1',\n    ],\n    [\n        1.4142135623730001,\n        '1-i',\n    ],\n    [\n        2.6925824035670001,\n        '1-2.5i',\n    ],\n    [\n        2.5,\n        '2.5i',\n    ],\n    [\n        1,\n        'i',\n    ],\n    [\n        0,\n        '0',\n    ],\n    [\n        1,\n        '-i',\n    ],\n    [\n        2.5,\n        '-2.5i',\n    ],\n    [\n        2.6925824035670001,\n        '-1+2.5i',\n    ],\n    [\n        1.4142135623730001,\n        '-1+i',\n    ],\n    [\n        1,\n        '-1',\n    ],\n    [\n        1.4142135623730001,\n        '-1-i',\n    ],\n    [\n        2.6925824035670001,\n        '-1-2.5i',\n    ],\n    [\n        4.3011626335209998,\n        '-3.5+2.5i',\n    ],\n    [\n        3.6400549446400001,\n        '-3.5+i',\n    ],\n    [\n        3.5,\n        '-3.5',\n    ],\n    [\n        3.6400549446400001,\n        '-3.5-i',\n    ],\n    [\n        4.3011626335209998,\n        '-3.5-2.5i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMAGINARY.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        5.6699999999999999,\n        '12.34+5.67j',\n    ],\n    [\n        6780000000.0,\n        '1.234E-5+6.78E9i',\n    ],\n    [\n        2.5,\n        '3.5+2.5i',\n    ],\n    [\n        1,\n        '3.5+i',\n    ],\n    [\n        0,\n        '3.5',\n    ],\n    [\n        -1,\n        '3.5-i',\n    ],\n    [\n        -2.5,\n        '3.5-2.5i',\n    ],\n    [\n        2.5,\n        '1+2.5i',\n    ],\n    [\n        1,\n        '1+i',\n    ],\n    [\n        0,\n        '1',\n    ],\n    [\n        0,\n        1,\n    ],\n    [\n        -1,\n        '1-i',\n    ],\n    [\n        -2.5,\n        '1-2.5i',\n    ],\n    [\n        2.5,\n        '2.5i',\n    ],\n    [\n        1,\n        'i',\n    ],\n    [\n        0,\n        '0',\n    ],\n    [\n        0,\n        0,\n    ],\n    [\n        0,\n        0.0,\n    ],\n    [\n        -1,\n        '-i',\n    ],\n    [\n        -2.5,\n        '-2.5i',\n    ],\n    [\n        2.5,\n        '-1+2.5i',\n    ],\n    [\n        1,\n        '-1+i',\n    ],\n    [\n        0,\n        '-1',\n    ],\n    [\n        -1,\n        '-1-i',\n    ],\n    [\n        -2.5,\n        '-1-2.5i',\n    ],\n    [\n        2.5,\n        '-3.5+2.5i',\n    ],\n    [\n        1,\n        '-3.5+i',\n    ],\n    [\n        0,\n        '-3.5',\n    ],\n    [\n        -1,\n        '-3.5-i',\n    ],\n    [\n        -2.5,\n        '-3.5-2.5i',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMARGUMENT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        0.43071059555000002,\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        0.620249485983,\n        '3.5+2.5i',\n    ],\n    [\n        0.27829965900499998,\n        '3.5+i',\n    ],\n    [\n        0,\n        '3.5',\n    ],\n    [\n        -0.27829965900499998,\n        '3.5-i',\n    ],\n    [\n        -0.620249485983,\n        '3.5-2.5i',\n    ],\n    [\n        1.1902899496829999,\n        '1+2.5i',\n    ],\n    [\n        0.78539816339699997,\n        '1+i',\n    ],\n    [\n        0,\n        '1',\n    ],\n    [\n        -0.78539816339699997,\n        '1-i',\n    ],\n    [\n        -1.1902899496829999,\n        '1-2.5i',\n    ],\n    [\n        1.570796326795,\n        '2.5i',\n    ],\n    [\n        1.570796326795,\n        'i',\n    ],\n    [\n        '#DIV/0!',\n        '0',\n    ],\n    [\n        -1.570796326795,\n        '-i',\n    ],\n    [\n        -1.570796326795,\n        '-2.5i',\n    ],\n    [\n        1.9513027039069999,\n        '-1+2.5i',\n    ],\n    [\n        2.3561944901919998,\n        '-1+i',\n    ],\n    [\n        3.1415926535900001,\n        '-1',\n    ],\n    [\n        -2.3561944901919998,\n        '-1-i',\n    ],\n    [\n        -1.9513027039069999,\n        '-1-2.5i',\n    ],\n    [\n        2.5213431676070002,\n        '-3.5+2.5i',\n    ],\n    [\n        2.8632929945850001,\n        '-3.5+i',\n    ],\n    [\n        3.1415926535900001,\n        '-3.5',\n    ],\n    [\n        -2.8632929945850001,\n        '-3.5-i',\n    ],\n    [\n        -2.5213431676070002,\n        '-3.5-2.5i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMCONJUGATE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '12.34-5.67j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '3.5-2.5i',\n        '3.5+2.5i',\n    ],\n    [\n        '3.5-i',\n        '3.5+i',\n    ],\n    [\n        '3.5',\n        '3.5',\n    ],\n    [\n        '3.5+i',\n        '3.5-i',\n    ],\n    [\n        '3.5+2.5i',\n        '3.5-2.5i',\n    ],\n    [\n        '1-2.5i',\n        '1+2.5i',\n    ],\n    [\n        '1-i',\n        '1+i',\n    ],\n    [\n        '1',\n        '1',\n    ],\n    [\n        '1+i',\n        '1-i',\n    ],\n    [\n        '1+2.5i',\n        '1-2.5i',\n    ],\n    [\n        '-2.5i',\n        '2.5i',\n    ],\n    [\n        '-i',\n        'i',\n    ],\n    [\n        '0.0',\n        '0',\n    ],\n    [\n        'i',\n        '-i',\n    ],\n    [\n        '2.5i',\n        '-2.5i',\n    ],\n    [\n        '-1-2.5i',\n        '-1+2.5i',\n    ],\n    [\n        '-1-i',\n        '-1+i',\n    ],\n    [\n        '-1',\n        '-1',\n    ],\n    [\n        '-1+i',\n        '-1-i',\n    ],\n    [\n        '-1+2.5i',\n        '-1-2.5i',\n    ],\n    [\n        '-3.5-2.5i',\n        '-3.5+2.5i',\n    ],\n    [\n        '-3.5-i',\n        '-3.5+i',\n    ],\n    [\n        '-3.5',\n        '-3.5',\n    ],\n    [\n        '-3.5+i',\n        '-3.5-i',\n    ],\n    [\n        '-3.5+2.5i',\n        '-3.5-2.5i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMCOS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '141.319179436356+32.547610312508j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '-5.74262349163406+2.12231025604134i',\n        '3.5+2.5i',\n    ],\n    [\n        '-1.44502817950166+0.412240867891067i',\n        '3.5+i',\n    ],\n    [\n        '-0.936456687290796',\n        '3.5',\n    ],\n    [\n        '-1.44502817950166-0.412240867891067i',\n        '3.5-i',\n    ],\n    [\n        '-5.74262349163406-2.12231025604134i',\n        '3.5-2.5i',\n    ],\n    [\n        '3.31329014611322-5.0910715229497i',\n        '1+2.5i',\n    ],\n    [\n        '0.833730025131149-0.988897705762865i',\n        '1+i',\n    ],\n    [\n        '0.54030230586814',\n        '1',\n    ],\n    [\n        '0.833730025131149+0.988897705762865i',\n        '1-i',\n    ],\n    [\n        '3.31329014611322+5.0910715229497i',\n        '1-2.5i',\n    ],\n    [\n        '6.13228947966369',\n        '2.5i',\n    ],\n    [\n        '1.54308063481524',\n        'i',\n    ],\n    [\n        '1',\n        '0',\n    ],\n    [\n        '1.54308063481524',\n        '-i',\n    ],\n    [\n        '6.13228947966369',\n        '-2.5i',\n    ],\n    [\n        '3.31329014611322+5.0910715229497i',\n        '-1+2.5i',\n    ],\n    [\n        '0.833730025131149+0.988897705762865i',\n        '-1+i',\n    ],\n    [\n        '0.54030230586814',\n        '-1',\n    ],\n    [\n        '0.833730025131149-0.988897705762865i',\n        '-1-i',\n    ],\n    [\n        '3.31329014611322-5.0910715229497i',\n        '-1-2.5i',\n    ],\n    [\n        '-5.74262349163406-2.12231025604134i',\n        '-3.5+2.5i',\n    ],\n    [\n        '-1.44502817950166-0.412240867891067i',\n        '-3.5+i',\n    ],\n    [\n        '-0.936456687290796',\n        '-3.5',\n    ],\n    [\n        '-1.44502817950166+0.412240867891067i',\n        '-3.5-i',\n    ],\n    [\n        '-5.74262349163406+2.12231025604134i',\n        '-3.5-2.5i',\n    ],\n    [\n        '-0.989992496600445',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMCOSH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '93502.0563713182121-65794.6618967782119j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '-13.2772126767962807+9.90030162194353525i',\n        '3.5+2.5i',\n    ],\n    [\n        '8.95433538452066202+13.9201408750362033i',\n        '3.5+i',\n    ],\n    [\n        '16.5728246710573161',\n        '3.5',\n    ],\n    [\n        '8.95433538452066202-13.9201408750362033i',\n        '3.5-i',\n    ],\n    [\n        '-13.2772126767962807-9.90030162194353525i',\n        '3.5-2.5i',\n    ],\n    [\n        '-1.23622919885634208+0.703325178113534826i',\n        '1+2.5i',\n    ],\n    [\n        '0.833730025131149049+0.988897705762865096i',\n        '1+i',\n    ],\n    [\n        '1.54308063481524378',\n        '1',\n    ],\n    [\n        '0.833730025131149049-0.988897705762865096i',\n        '1-i',\n    ],\n    [\n        '-1.23622919885634208-0.703325178113534826i',\n        '1-2.5i',\n    ],\n    [\n        '-0.801143615546933715',\n        '2.5i',\n    ],\n    [\n        '0.540302305868139717',\n        'i',\n    ],\n    [\n        '1',\n        '0',\n    ],\n    [\n        '0.540302305868139717',\n        '-i',\n    ],\n    [\n        '-0.801143615546933715',\n        '-2.5i',\n    ],\n    [\n        '-1.23622919885634208-0.703325178113534826i',\n        '-1+2.5i',\n    ],\n    [\n        '0.833730025131149049-0.988897705762865096i',\n        '-1+i',\n    ],\n    [\n        '1.54308063481524378',\n        '-1',\n    ],\n    [\n        '0.833730025131149049+0.988897705762865096i',\n        '-1-i',\n    ],\n    [\n        '-1.23622919885634208+0.703325178113534826i',\n        '-1-2.5i',\n    ],\n    [\n        '-13.2772126767962807-9.90030162194353525i',\n        '-3.5+2.5i',\n    ],\n    [\n        '8.95433538452066202-13.9201408750362033i',\n        '-3.5+i',\n    ],\n    [\n        '16.5728246710573161',\n        '-3.5',\n    ],\n    [\n        '8.95433538452066202+13.9201408750362033i',\n        '-3.5-i',\n    ],\n    [\n        '-13.2772126767962807+9.90030162194353525i',\n        '-3.5-2.5i',\n    ],\n    [\n        '10.0676619957777658',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMCOT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '-0.0000104004141424230319-1.00002138037057154j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '0.00894394174578834370-1.01017158348808170i',\n        '3.5+2.5i',\n    ],\n    [\n        '0.218391793398543914-1.20562055667579681i',\n        '3.5+i',\n    ],\n    [\n        '2.66961648496886604',\n        '3.5',\n    ],\n    [\n        '0.218391793398543914+1.20562055667579681i',\n        '3.5-i',\n    ],\n    [\n        '0.00894394174578834370+1.01017158348808170i',\n        '3.5-2.5i',\n    ],\n    [\n        '0.0121847112919806296-0.994333285407756555i',\n        '1+2.5i',\n    ],\n    [\n        '0.217621561854402681-0.868014142895924949i',\n        '1+i',\n    ],\n    [\n        '0.642092615934330703',\n        '1',\n    ],\n    [\n        '0.217621561854402681+0.868014142895924949i',\n        '1-i',\n    ],\n    [\n        '0.0121847112919806296+0.994333285407756555i',\n        '1-2.5i',\n    ],\n    [\n        '-1.01356730981260846i',\n        '2.5i',\n    ],\n    [\n        '-1.31303528549933130i',\n        'i',\n    ],\n    [\n        INF,\n        '0',\n    ],\n    [\n        '1.31303528549933130i',\n        '-i',\n    ],\n    [\n        '1.013567309812609i',\n        '-2.5i',\n    ],\n    [\n        '-0.01218471129198063-0.994333285407757i',\n        '-1+2.5i',\n    ],\n    [\n        '-0.21762156185440268-0.8680141428959249i',\n        '-1+i',\n    ],\n    [\n        '-0.642092615934330703',\n        '-1',\n    ],\n    [\n        '-0.21762156185440268+0.8680141428959249i',\n        '-1-i',\n    ],\n    [\n        '-0.01218471129198063+0.994333285407757i',\n        '-1-2.5i',\n    ],\n    [\n        '-0.00894394174578834-1.010171583488082i',\n        '-3.5+2.5i',\n    ],\n    [\n        '-0.2183917933985438-1.205620556675797i',\n        '-3.5+i',\n    ],\n    [\n        '-2.66961648496886604',\n        '-3.5',\n    ],\n    [\n        '-0.2183917933985438+1.205620556675797i',\n        '-3.5-i',\n    ],\n    [\n        '-0.00894394174578834+1.010171583488082i',\n        '-3.5-2.5i',\n    ],\n    [\n        '-7.01525255143453347',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMCSC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '-0.00154774455592154432-0.00671986631601416928j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '-0.0585684747824233590+0.154262439469903774i',\n        '3.5+2.5i',\n    ],\n    [\n        '-0.359863036667298479+0.731660683934045561i',\n        '3.5+i',\n    ],\n    [\n        '-2.85076343754046413',\n        '3.5',\n    ],\n    [\n        '-0.359863036667298479-0.731660683934045561i',\n        '3.5-i',\n    ],\n    [\n        '-0.0585684747824233590-0.154262439469903774i',\n        '3.5-2.5i',\n    ],\n    [\n        '0.138293277776215018-0.0876084810883255787i',\n        '1+2.5i',\n    ],\n    [\n        '0.621518017170428421-0.303931001628426450i',\n        '1+i',\n    ],\n    [\n        '1.18839510577812122',\n        '1',\n    ],\n    [\n        '0.621518017170428421+0.303931001628426450i',\n        '1-i',\n    ],\n    [\n        '0.138293277776215018+0.0876084810883255787i',\n        '1-2.5i',\n    ],\n    [\n        '-0.165283669855095565i',\n        '2.5i',\n    ],\n    [\n        '-0.850918128239321545i',\n        'i',\n    ],\n    [\n        INF,\n        '0',\n    ],\n    [\n        '0.850918128239321545i',\n        '-i',\n    ],\n    [\n        '0.1652836698550956i',\n        '-2.5i',\n    ],\n    [\n        '-0.138293277776215-0.0876084810883256i',\n        '-1+2.5i',\n    ],\n    [\n        '-0.62151801717042842-0.30393100162842645i',\n        '-1+i',\n    ],\n    [\n        '-1.18839510577812122',\n        '-1',\n    ],\n    [\n        '-0.62151801717042842+0.30393100162842645i',\n        '-1-i',\n    ],\n    [\n        '-0.138293277776215+0.0876084810883256i',\n        '-1-2.5i',\n    ],\n    [\n        '0.05856847478242335+0.1542624394699038i',\n        '-3.5+2.5i',\n    ],\n    [\n        '0.3598630366672985+0.7316606839340456i',\n        '-3.5+i',\n    ],\n    [\n        '2.85076343754046413',\n        '-3.5',\n    ],\n    [\n        '0.3598630366672985-0.7316606839340456i',\n        '-3.5-i',\n    ],\n    [\n        '0.05856847478242335-0.1542624394699038i',\n        '-3.5-2.5i',\n    ],\n    [\n        '7.08616739573718592',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMCSCH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '7.15308425027293823E-6+5.03341614148979354E-6j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '-0.0483657415388563464-0.0361962406084861128i',\n        '3.5+2.5i',\n    ],\n    [\n        '0.0325769243120443503-0.0508281676948511387i',\n        '3.5+i',\n    ],\n    [\n        '0.0604498900091561051',\n        '3.5',\n    ],\n    [\n        '0.0325769243120443503+0.0508281676948511387i',\n        '3.5-i',\n    ],\n    [\n        '-0.0483657415388563464+0.0361962406084861128i',\n        '3.5-2.5i',\n    ],\n    [\n        '-0.541322906190002332-0.530965577621174208i',\n        '1+2.5i',\n    ],\n    [\n        '0.303931001628426450-0.621518017170428421i',\n        '1+i',\n    ],\n    [\n        '0.850918128239321545',\n        '1',\n    ],\n    [\n        '0.303931001628426450+0.621518017170428421i',\n        '1-i',\n    ],\n    [\n        '-0.541322906190002332+0.530965577621174208i',\n        '1-2.5i',\n    ],\n    [\n        '-1.67092154555867993i',\n        '2.5i',\n    ],\n    [\n        '-1.18839510577812122i',\n        'i',\n    ],\n    [\n        INF,\n        '0',\n    ],\n    [\n        '1.18839510577812122i',\n        '-i',\n    ],\n    [\n        '1.67092154555868i',\n        '-2.5i',\n    ],\n    [\n        '0.5413229061900022-0.5309655776211742i',\n        '-1+2.5i',\n    ],\n    [\n        '-0.30393100162842645-0.62151801717042842i',\n        '-1+i',\n    ],\n    [\n        '-0.850918128239321545',\n        '-1',\n    ],\n    [\n        '-0.30393100162842645+0.62151801717042842i',\n        '-1-i',\n    ],\n    [\n        '0.5413229061900022+0.5309655776211742i',\n        '-1-2.5i',\n    ],\n    [\n        '0.04836574153885635-0.03619624060848612i',\n        '-3.5+2.5i',\n    ],\n    [\n        '-0.03257692431204435-0.05082816769485113i',\n        '-3.5+i',\n    ],\n    [\n        '-0.0604498900091561051',\n        '-3.5',\n    ],\n    [\n        '-0.03257692431204435+0.05082816769485113i',\n        '-3.5-i',\n    ],\n    [\n        '0.04836574153885635+0.03619624060848612i',\n        '-3.5-2.5i',\n    ],\n    [\n        '0.0998215696688227329',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMDIV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        ExcelError::NAN(),\n        '12.34+5.67j',\n        '123.45+67.89i',\n    ],\n    [\n        ExcelError::NAN(),\n        '12.34+5.67j',\n        'Invalid Complex Number',\n    ],\n    [\n        '0.0961415519586104-0.00694248653276682j',\n        '12.34+5.67j',\n        '123.45+67.89j',\n    ],\n    [\n        '0.0961415519586104+0.00694248653276682i',\n        '-12.34+5.67i',\n        '-123.45+67.89i',\n    ],\n    [\n        '0.0573549954111941+0.0774712890924744i',\n        '-12.34-5.67i',\n        '-123.45+67.89i',\n    ],\n    [\n        '0.0573549954111941-0.0774712890924744i',\n        '-12.34+5.67i',\n        '-123.45-67.89i',\n    ],\n    [\n        '0.0961415519586104-0.00694248653276682i',\n        '-12.34-5.67i',\n        '-123.45-67.89i',\n    ],\n    [\n        '-0.0573549954111941-0.0774712890924744i',\n        '12.34+5.67i',\n        '-123.45+67.89i',\n    ],\n    [\n        '-0.0961415519586104-0.00694248653276682i',\n        '12.34-5.67i',\n        '-123.45+67.89i',\n    ],\n    [\n        '-0.0961415519586104+0.00694248653276682i',\n        '12.34+5.67i',\n        '-123.45-67.89i',\n    ],\n    [\n        '-0.0573549954111941+0.0774712890924744i',\n        '12.34-5.67i',\n        '-123.45-67.89i',\n    ],\n    [\n        '-0.0573549954111941+0.0774712890924744i',\n        '-12.34+5.67i',\n        '123.45+67.89i',\n    ],\n    [\n        '-0.0961415519586104+0.00694248653276682i',\n        '-12.34-5.67i',\n        '123.45+67.89i',\n    ],\n    [\n        '-0.0961415519586104-0.00694248653276682i',\n        '-12.34+5.67i',\n        '123.45-67.89i',\n    ],\n    [\n        '-0.0573549954111941-0.0774712890924744i',\n        '-12.34-5.67i',\n        '123.45-67.89i',\n    ],\n    [\n        '1',\n        '-12.34-5.67i',\n        '-12.34-5.67i',\n    ],\n    [\n        '-0.0767482736849023-0.0422068878126206i',\n        '-12.34',\n        '123.45-67.89i',\n    ],\n    [\n        '1+0.459481361426256i',\n        '-12.34-5.67i',\n        '-12.34',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMEXP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '187004.11273906-131589.323796073j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '0.519482808316086+0.85433649244115i',\n        '-12.34E-5+6.78E9i',\n    ],\n    [\n        '-26.5302329126575+19.8186755366902i',\n        '3.5+2.5i',\n    ],\n    [\n        '17.8923550531471+27.8656919720394i',\n        '3.5+i',\n    ],\n    [\n        '33.1154519586923',\n        '3.5',\n    ],\n    [\n        '17.8923550531471-27.8656919720394i',\n        '3.5-i',\n    ],\n    [\n        '-26.5302329126575-19.8186755366902i',\n        '3.5-2.5i',\n    ],\n    [\n        '-2.17773413212721+1.62681595415671i',\n        '1+2.5i',\n    ],\n    [\n        '1.46869393991589+2.28735528717884i',\n        '1+i',\n    ],\n    [\n        '2.71828182845905',\n        '1',\n    ],\n    [\n        '1.46869393991589-2.28735528717884i',\n        '1-i',\n    ],\n    [\n        '-2.17773413212721-1.62681595415671i',\n        '1-2.5i',\n    ],\n    [\n        '-0.801143615546934+0.598472144103957i',\n        '2.5i',\n    ],\n    [\n        '0.54030230586814+0.841470984807897i',\n        'i',\n    ],\n    [\n        '1',\n        '0',\n    ],\n    [\n        '0.54030230586814-0.841470984807897i',\n        '-i',\n    ],\n    [\n        '-0.801143615546934-0.598472144103957i',\n        '-2.5i',\n    ],\n    [\n        '-0.294724265585475+0.220165597929638i',\n        '-1+2.5i',\n    ],\n    [\n        '0.198766110346413+0.309559875653112i',\n        '-1+i',\n    ],\n    [\n        '0.367879441171442',\n        '-1',\n    ],\n    [\n        '0.198766110346413-0.309559875653112i',\n        '-1-i',\n    ],\n    [\n        '-0.294724265585475-0.220165597929638i',\n        '-1-2.5i',\n    ],\n    [\n        '-0.0241924409350133+0.0180722928030842i',\n        '-3.5+2.5i',\n    ],\n    [\n        '0.016315715894263+0.025410221967i',\n        '-3.5+i',\n    ],\n    [\n        '0.0301973834223185',\n        '-3.5',\n    ],\n    [\n        '0.016315715894263-0.025410221967i',\n        '-3.5-i',\n    ],\n    [\n        '-0.0241924409350133-0.0180722928030842i',\n        '-3.5-2.5i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMLN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '2.60862008281875+0.430710595550204j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '22.6372429388987+1.5707963267949i',\n        '-1.234E-5+6.78E9i',\n    ],\n    [\n        '1.45888536604214+0.620249485982821i',\n        '3.5+2.5i',\n    ],\n    [\n        '1.29199877621612+0.278299659005111i',\n        '3.5+i',\n    ],\n    [\n        '1.25276296849537',\n        '3.5',\n    ],\n    [\n        '1.29199877621612-0.278299659005111i',\n        '3.5-i',\n    ],\n    [\n        '1.45888536604214-0.620249485982821i',\n        '3.5-2.5i',\n    ],\n    [\n        '0.990500734433292+1.19028994968253i',\n        '1+2.5i',\n    ],\n    [\n        '0.346573590279973+0.785398163397448i',\n        '1+i',\n    ],\n    [\n        '0',\n        '1',\n    ],\n    [\n        '0.346573590279973-0.785398163397448i',\n        '1-i',\n    ],\n    [\n        '0.990500734433292-1.19028994968253i',\n        '1-2.5i',\n    ],\n    [\n        '0.916290731874155+1.5707963267949i',\n        '2.5i',\n    ],\n    [\n        '1.5707963267949i',\n        'i',\n    ],\n    [\n        ExcelError::NAN(),\n        '0',\n    ],\n    [\n        '-1.5707963267949i',\n        '-i',\n    ],\n    [\n        '0.916290731874155-1.5707963267949i',\n        '-2.5i',\n    ],\n    [\n        '0.990500734433292+1.95130270390726i',\n        '-1+2.5i',\n    ],\n    [\n        '0.346573590279973+2.35619449019234i',\n        '-1+i',\n    ],\n    [\n        '3.14159265358979i',\n        '-1',\n    ],\n    [\n        '0.346573590279973-2.35619449019234i',\n        '-1-i',\n    ],\n    [\n        '0.990500734433292-1.95130270390726i',\n        '-1-2.5i',\n    ],\n    [\n        '1.45888536604214+2.52134316760697i',\n        '-3.5+2.5i',\n    ],\n    [\n        '1.29199877621612+2.86329299458468i',\n        '-3.5+i',\n    ],\n    [\n        '1.25276296849537+3.14159265358979i',\n        '-3.5',\n    ],\n    [\n        '1.29199877621612-2.86329299458468i',\n        '-3.5-i',\n    ],\n    [\n        '1.45888536604214-2.52134316760697i',\n        '-3.5-2.5i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMLOG10.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '1.13290930735019+0.187055234944717j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '9.83122969386706+0.682188176920927i',\n        '-12.34E-5+6.78E9i',\n    ],\n    [\n        '0.633585864201507+0.269370929165668i',\n        '3.5+2.5i',\n    ],\n    [\n        '0.561107939136413+0.120864006221476i',\n        '3.5+i',\n    ],\n    [\n        '0.544068044350276',\n        '3.5',\n    ],\n    [\n        '0.561107939136413-0.120864006221476i',\n        '3.5-i',\n    ],\n    [\n        '0.633585864201507-0.269370929165668i',\n        '3.5-2.5i',\n    ],\n    [\n        '0.430169003285497+0.516936357012023i',\n        '1+2.5i',\n    ],\n    [\n        '0.150514997831991+0.34109408846046i',\n        '1+i',\n    ],\n    [\n        '0',\n        '1',\n    ],\n    [\n        '0.150514997831991-0.34109408846046i',\n        '1-i',\n    ],\n    [\n        '0.430169003285497-0.516936357012023i',\n        '1-2.5i',\n    ],\n    [\n        '0.397940008672038+0.68218817692092i',\n        '2.5i',\n    ],\n    [\n        '0.68218817692092i',\n        'i',\n    ],\n    [\n        ExcelError::NAN(),\n        '0',\n    ],\n    [\n        '-0.68218817692092i',\n        '-i',\n    ],\n    [\n        '0.397940008672038-0.68218817692092i',\n        '-2.5i',\n    ],\n    [\n        '0.430169003285497+0.847439996829817i',\n        '-1+2.5i',\n    ],\n    [\n        '0.150514997831991+1.02328226538138i',\n        '-1+i',\n    ],\n    [\n        '1.36437635384184i',\n        '-1',\n    ],\n    [\n        '0.150514997831991-1.02328226538138i',\n        '-1-i',\n    ],\n    [\n        '0.430169003285497-0.847439996829817i',\n        '-1-2.5i',\n    ],\n    [\n        '0.633585864201507+1.09500542467617i',\n        '-3.5+2.5i',\n    ],\n    [\n        '0.561107939136413+1.24351234762036i',\n        '-3.5+i',\n    ],\n    [\n        '0.544068044350276+1.36437635384184i',\n        '-3.5',\n    ],\n    [\n        '0.561107939136413-1.24351234762036i',\n        '-3.5-i',\n    ],\n    [\n        '0.633585864201507-1.09500542467617i',\n        '-3.5-2.5i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMLOG2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '3.76344325733562+0.621384040306436j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '32.6586381298614+2.26618007108803i',\n        '-12.34E-5+6.78E9i',\n    ],\n    [\n        '2.10472668297646+0.894830857610216i',\n        '3.5+2.5i',\n    ],\n    [\n        '1.86396022742506+0.401501537958665i',\n        '3.5+i',\n    ],\n    [\n        '1.80735492219671',\n        '3.5',\n    ],\n    [\n        '1.86396022742506-0.401501537958665i',\n        '3.5-i',\n    ],\n    [\n        '2.10472668297646-0.894830857610216i',\n        '3.5-2.5i',\n    ],\n    [\n        '1.42899049767377+1.71722540775913i',\n        '1+2.5i',\n    ],\n    [\n        '0.500000000038482+1.13309003554401i',\n        '1+i',\n    ],\n    [\n        '0',\n        '1',\n    ],\n    [\n        '0.500000000038482-1.13309003554401i',\n        '1-i',\n    ],\n    [\n        '1.42899049767377-1.71722540775913i',\n        '1-2.5i',\n    ],\n    [\n        '1.3219280949891+2.26618007108801i',\n        '2.5i',\n    ],\n    [\n        '2.26618007108801i',\n        'i',\n    ],\n    [\n        ExcelError::NAN(),\n        '0',\n    ],\n    [\n        '-2.26618007108801i',\n        '-i',\n    ],\n    [\n        '1.3219280949891-2.26618007108801i',\n        '-2.5i',\n    ],\n    [\n        '1.42899049767377+2.81513473441689i',\n        '-1+2.5i',\n    ],\n    [\n        '0.500000000038482+3.39927010663201i',\n        '-1+i',\n    ],\n    [\n        '4.53236014217602i',\n        '-1',\n    ],\n    [\n        '0.500000000038482-3.39927010663201i',\n        '-1-i',\n    ],\n    [\n        '1.42899049767377-2.81513473441689i',\n        '-1-2.5i',\n    ],\n    [\n        '2.10472668297646+3.63752928456581i',\n        '-3.5+2.5i',\n    ],\n    [\n        '1.86396022742506+4.13085860421736i',\n        '-3.5+i',\n    ],\n    [\n        '1.80735492219671+4.53236014217602i',\n        '-3.5',\n    ],\n    [\n        '1.86396022742506-4.13085860421736i',\n        '-3.5-i',\n    ],\n    [\n        '2.10472668297646-3.63752928456581i',\n        '-3.5-2.5i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMPOWER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '120.1267+139.9356j',\n        '12.34+5.67j',\n        2,\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n        2,\n    ],\n    [\n        '688.928626+2407.923693j',\n        '12.34+5.67j',\n        3,\n    ],\n    [\n        '6.69108496973016E-002-3.07442883131037E-002j',\n        '12.34+5.67j',\n        -1,\n    ],\n    [\n        '3.53185054333564E-003-4.11425290873718E-003j',\n        '12.34+5.67j',\n        -2,\n    ],\n    [\n        '3.60002071031685+0.787495469644252j',\n        '12.34+5.67j',\n        0.5,\n    ],\n    [\n        '0.517904976730581-5.59833234375533E-002j',\n        '12.34+5.67j',\n        -0.25,\n    ],\n    [\n        '1',\n        '12.34+5.67j',\n        0,\n    ],\n    [\n        '-1-1.34451369308841E-014i',\n        '-i',\n        2,\n    ],\n    [\n        '1.22460635382238E-016-2i',\n        '1-i',\n        2,\n    ],\n    [\n        '-6.25+8.40321058180257E-014i',\n        '2.5i',\n        2,\n    ],\n    [\n        '-6.98771242968685-6.98771242968684i',\n        '2.5i',\n        '2.5',\n    ],\n    [\n        ExcelError::VALUE(),\n        '2.5i',\n        '2.5i',\n    ],\n    [\n        9.8821176880261898,\n        '2.5',\n        '2.5',\n    ],\n    [\n        4,\n        '2',\n        '2',\n    ],\n    [\n        '-4.69972844488573E-15+9.35464904349343E-15i',\n        '-12.34-5.67i',\n        '-12.34',\n    ],\n    [\n        '5.93343000067521E-15-8.62503997728057E-15i',\n        '12.34-5.67i',\n        '-12.34',\n    ],\n    [\n        '-42881944468901.9-85355046682682.3i',\n        '-12.34-5.67i',\n        '12.34',\n    ],\n    [\n        '54138663282971.3+78697841733874.3i',\n        '12.34-5.67i',\n        '12.34',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMPRODUCT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        ExcelError::NAN(),\n        '12.34+5.67j',\n        '123.45+67.89i',\n    ],\n    [\n        ExcelError::NAN(),\n        '12.34+5.67j',\n        'Invalid Complex Number',\n    ],\n    [\n        '12.34+5.67j',\n        '12.34+5.67j',\n    ],\n    [\n        '6454.936089+8718.895647i',\n        '12.34+5.67i',\n        '123.45+67.89i',\n        '5.67',\n    ],\n    [\n        '6454.936089+8718.895647j',\n        '12.34+5.67j',\n        '123.45+67.89j',\n        '5.67',\n    ],\n    [\n        '1138.4367+1537.7241j',\n        '12.34+5.67j',\n        '123.45+67.89j',\n    ],\n    [\n        '1908.3093+137.8011i',\n        '12.34-5.67i',\n        '123.45+67.89i',\n    ],\n    [\n        '1908.3093-137.8011i',\n        '12.34+5.67i',\n        '123.45-67.89i',\n    ],\n    [\n        '1138.4367-1537.7241i',\n        '12.34-5.67i',\n        '123.45-67.89i',\n    ],\n    [\n        '-1908.3093-137.8011i',\n        '-12.34+5.67i',\n        '123.45+67.89i',\n    ],\n    [\n        '-1138.4367-1537.7241i',\n        '-12.34-5.67i',\n        '123.45+67.89i',\n    ],\n    [\n        '-1908.3093+137.8011i',\n        '12.34+5.67i',\n        '-123.45+67.89i',\n    ],\n    [\n        '1138.4367-1537.7241i',\n        '-12.34+5.67i',\n        '-123.45+67.89i',\n    ],\n    [\n        '1138.4367+1537.7241i',\n        '-12.34-5.67i',\n        '-123.45-67.89i',\n    ],\n    [\n        '-1523.373+837.7626i',\n        '-12.34',\n        '123.45-67.89i',\n    ],\n    [\n        '152.2756+69.9678i',\n        '-12.34-5.67i',\n        '-12.34',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMREAL.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        12.34,\n        '12.34+5.67j',\n    ],\n    [\n        -1.234E-5,\n        '-1.234E-5+6.78E9i',\n    ],\n    [\n        3.5,\n        '3.5+2.5i',\n    ],\n    [\n        3.5,\n        '3.5+i',\n    ],\n    [\n        3.5,\n        '3.5',\n    ],\n    [\n        3.5,\n        3.5,\n    ],\n    [\n        3.5,\n        '3.5-i',\n    ],\n    [\n        3.5,\n        '3.5-2.5i',\n    ],\n    [\n        1,\n        '1+2.5i',\n    ],\n    [\n        1,\n        '1+i',\n    ],\n    [\n        1,\n        '1',\n    ],\n    [\n        1,\n        1,\n    ],\n    [\n        1,\n        '1-i',\n    ],\n    [\n        1,\n        '1-2.5i',\n    ],\n    [\n        0,\n        '2.5i',\n    ],\n    [\n        0,\n        'i',\n    ],\n    [\n        0,\n        '0',\n    ],\n    [\n        0,\n        0,\n    ],\n    [\n        0,\n        '-i',\n    ],\n    [\n        0,\n        '-2.5i',\n    ],\n    [\n        -1,\n        '-1+2.5i',\n    ],\n    [\n        -1,\n        '-1+i',\n    ],\n    [\n        -1,\n        '-1',\n    ],\n    [\n        -1,\n        '-1-i',\n    ],\n    [\n        -1,\n        '-1-2.5i',\n    ],\n    [\n        -3.5,\n        '-3.5+2.5i',\n    ],\n    [\n        -3.5,\n        '-3.5+i',\n    ],\n    [\n        -3.5,\n        '-3.5',\n    ],\n    [\n        -3.5,\n        '-3.5-i',\n    ],\n    [\n        -3.5,\n        '-3.5-2.5i',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMSEC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '0.00671973874162309199-0.00154764157870523791j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '-0.153210472299609239-0.0566222314884645297i',\n        '3.5+2.5i',\n    ],\n    [\n        '-0.639945455994778845-0.182565069612144926i',\n        '3.5+i',\n    ],\n    [\n        '-1.06785504719181066',\n        '3.5',\n    ],\n    [\n        '-0.639945455994778845+0.182565069612144926i',\n        '3.5-i',\n    ],\n    [\n        '-0.153210472299609239+0.0566222314884645297i',\n        '3.5-2.5i',\n    ],\n    [\n        '0.0897986028721219428+0.137981006709970822i',\n        '1+2.5i',\n    ],\n    [\n        '0.498337030555186785+0.591083841721045048i',\n        '1+i',\n    ],\n    [\n        '1.85081571768092562',\n        '1',\n    ],\n    [\n        '0.498337030555186785-0.591083841721045048i',\n        '1-i',\n    ],\n    [\n        '0.0897986028721219428-0.137981006709970822i',\n        '1-2.5i',\n    ],\n    [\n        '0.163071231929977826',\n        '2.5i',\n    ],\n    [\n        '0.648054273663885400',\n        'i',\n    ],\n    [\n        '1.0',\n        '0',\n    ],\n    [\n        '0.648054273663885400',\n        '-i',\n    ],\n    [\n        '0.163071231929977826',\n        '-2.5i',\n    ],\n    [\n        '0.0897986028721219428-0.137981006709970822i',\n        '-1+2.5i',\n    ],\n    [\n        '0.498337030555186785-0.591083841721045048i',\n        '-1+i',\n    ],\n    [\n        '1.85081571768092562',\n        '-1',\n    ],\n    [\n        '0.498337030555186785+0.591083841721045048i',\n        '-1-i',\n    ],\n    [\n        '0.0897986028721219428+0.137981006709970822i',\n        '-1-2.5i',\n    ],\n    [\n        '-0.153210472299609239+0.0566222314884645297i',\n        '-3.5+2.5i',\n    ],\n    [\n        '-0.639945455994778845+0.182565069612144926i',\n        '-3.5+i',\n    ],\n    [\n        '-1.06785504719181066',\n        '-3.5',\n    ],\n    [\n        '-0.639945455994778845-0.182565069612144926i',\n        '-3.5-i',\n    ],\n    [\n        '-0.153210472299609239-0.0566222314884645297i',\n        '-3.5-2.5i',\n    ],\n    [\n        '-1.01010866590799375',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMSECH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '7.15308425036177674E-6+5.03341614116724074E-6j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '-0.0484039219824442559-0.0360929239424409676i',\n        '3.5+2.5i',\n    ],\n    [\n        '0.0326859677559519711-0.0508126238588615047i',\n        '3.5+i',\n    ],\n    [\n        '0.0603397441201676464',\n        '3.5',\n    ],\n    [\n        '0.0326859677559519711+0.0508126238588615047i',\n        '3.5-i',\n    ],\n    [\n        '-0.0484039219824442559+0.0360929239424409676i',\n        '3.5-2.5i',\n    ],\n    [\n        '-0.611108564155231518-0.347676660710495997i',\n        '1+2.5i',\n    ],\n    [\n        '0.498337030555186785-0.591083841721045048i',\n        '1+i',\n    ],\n    [\n        '0.648054273663885400',\n        '1',\n    ],\n    [\n        '0.498337030555186785+0.591083841721045048i',\n        '1-i',\n    ],\n    [\n        '-0.611108564155231518+0.347676660710495997i',\n        '1-2.5i',\n    ],\n    [\n        '-1.24821565146881783',\n        '2.5i',\n    ],\n    [\n        '1.85081571768092562',\n        'i',\n    ],\n    [\n        '1.0',\n        '0',\n    ],\n    [\n        '1.85081571768092562',\n        '-i',\n    ],\n    [\n        '-1.24821565146881783',\n        '-2.5i',\n    ],\n    [\n        '-0.611108564155231518+0.347676660710495997i',\n        '-1+2.5i',\n    ],\n    [\n        '0.498337030555186785+0.591083841721045048i',\n        '-1+i',\n    ],\n    [\n        '0.648054273663885400',\n        '-1',\n    ],\n    [\n        '0.498337030555186785-0.591083841721045048i',\n        '-1-i',\n    ],\n    [\n        '-0.611108564155231518-0.347676660710495997i',\n        '-1-2.5i',\n    ],\n    [\n        '-0.0484039219824442559+0.0360929239424409676i',\n        '-3.5+2.5i',\n    ],\n    [\n        '0.0326859677559519711+0.0508126238588615047i',\n        '-3.5+i',\n    ],\n    [\n        '0.0603397441201676464',\n        '-3.5',\n    ],\n    [\n        '0.0326859677559519711-0.0508126238588615047i',\n        '-3.5-i',\n    ],\n    [\n        '-0.0484039219824442559-0.0360929239424409676i',\n        '-3.5-2.5i',\n    ],\n    [\n        '0.0993279274194332078',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMSIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '-32.5483841590412+141.315819535092j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '-2.15110429680353-5.66575444574645i',\n        '3.5+2.5i',\n    ],\n    [\n        '-0.541286805665839-1.10052501669986i',\n        '3.5+i',\n    ],\n    [\n        '-0.35078322768962',\n        '3.5',\n    ],\n    [\n        '-0.541286805665839+1.10052501669986i',\n        '3.5-i',\n    ],\n    [\n        '-2.15110429680353+5.66575444574645i',\n        '3.5-2.5i',\n    ],\n    [\n        '5.16014366757971+3.26893943207955i',\n        '1+2.5i',\n    ],\n    [\n        '1.29845758141598+0.634963914784736i',\n        '1+i',\n    ],\n    [\n        '0.841470984807897',\n        '1',\n    ],\n    [\n        '1.29845758141598-0.634963914784736i',\n        '1-i',\n    ],\n    [\n        '5.16014366757971-3.26893943207955i',\n        '1-2.5i',\n    ],\n    [\n        '6.05020448103979i',\n        '2.5i',\n    ],\n    [\n        '1.1752011936438i',\n        'i',\n    ],\n    [\n        '0',\n        '0',\n    ],\n    [\n        '-1.1752011936438i',\n        '-i',\n    ],\n    [\n        '-6.05020448103979i',\n        '-2.5i',\n    ],\n    [\n        '-5.16014366757971+3.26893943207955i',\n        '-1+2.5i',\n    ],\n    [\n        '-1.29845758141598+0.634963914784736i',\n        '-1+i',\n    ],\n    [\n        '-0.841470984807897',\n        '-1',\n    ],\n    [\n        '-1.29845758141598-0.634963914784736i',\n        '-1-i',\n    ],\n    [\n        '-5.16014366757971-3.26893943207955i',\n        '-1-2.5i',\n    ],\n    [\n        '2.15110429680353-5.66575444574645i',\n        '-3.5+2.5i',\n    ],\n    [\n        '0.541286805665839-1.10052501669986i',\n        '-3.5+i',\n    ],\n    [\n        '0.35078322768962',\n        '-3.5',\n    ],\n    [\n        '0.541286805665839+1.10052501669986i',\n        '-3.5-i',\n    ],\n    [\n        '2.15110429680353+5.66575444574645i',\n        '-3.5-2.5i',\n    ],\n    [\n        '0.141120008059867',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMSINH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '93502.0563677416700-65794.6618992949199j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '-13.2530202358612674+9.91837391474661948i',\n        '3.5+2.5i',\n    ],\n    [\n        '8.93801966862639899+13.9455510970032033i',\n        '3.5+i',\n    ],\n    [\n        '16.5426272876349976',\n        '3.5',\n    ],\n    [\n        '8.93801966862639899-13.9455510970032033i',\n        '3.5-i',\n    ],\n    [\n        '-13.2530202358612674-9.91837391474661948i',\n        '3.5-2.5i',\n    ],\n    [\n        '-0.941504933270867276+0.923490776043173241i',\n        '1+2.5i',\n    ],\n    [\n        '0.634963914784736108+1.29845758141597729i',\n        '1+i',\n    ],\n    [\n        '1.17520119364380146',\n        '1',\n    ],\n    [\n        '0.634963914784736108-1.29845758141597729i',\n        '1-i',\n    ],\n    [\n        '-0.941504933270867276-0.923490776043173241i',\n        '1-2.5i',\n    ],\n    [\n        '0.598472144103956494i',\n        '2.5i',\n    ],\n    [\n        '0.841470984807896507i',\n        'i',\n    ],\n    [\n        '0.0',\n        '0',\n    ],\n    [\n        '-0.841470984807896507i',\n        '-i',\n    ],\n    [\n        '-0.5984721441039565i',\n        '-2.5i',\n    ],\n    [\n        '0.941504933270867+0.923490776043173i',\n        '-1+2.5i',\n    ],\n    [\n        '-0.63496391478473611+1.29845758141597729i',\n        '-1+i',\n    ],\n    [\n        '-1.17520119364380146',\n        '-1',\n    ],\n    [\n        '-0.63496391478473611-1.29845758141597729i',\n        '-1-i',\n    ],\n    [\n        '0.941504933270867-0.923490776043173i',\n        '-1-2.5i',\n    ],\n    [\n        '13.25302023586127+9.91837391474662i',\n        '-3.5+2.5i',\n    ],\n    [\n        '-8.9380196686264+13.9455510970032i',\n        '-3.5+i',\n    ],\n    [\n        '-16.5426272876349976',\n        '-3.5',\n    ],\n    [\n        '-8.9380196686264-13.9455510970032i',\n        '-3.5-i',\n    ],\n    [\n        '13.25302023586127-9.91837391474662i',\n        '-3.5-2.5i',\n    ],\n    [\n        '10.0178749274099019',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMSQRT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '3.60002071031685+0.787495469644252j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '58223.7065120385+58223.7065120386i',\n        '-1.234E-5+6.78E9i',\n    ],\n    [\n        '1.9749889409211+0.632914936433528i',\n        '3.5+2.5i',\n    ],\n    [\n        '1.88945163270197+0.264627043818521i',\n        '3.5+i',\n    ],\n    [\n        '1.87082869338697',\n        '3.5',\n    ],\n    [\n        '1.88945163270197-0.264627043818521i',\n        '3.5-i',\n    ],\n    [\n        '1.9749889409211-0.632914936433528i',\n        '3.5-2.5i',\n    ],\n    [\n        '1.35878298553655+0.919940868634298i',\n        '1+2.5i',\n    ],\n    [\n        '1.09868411346781+0.455089860562227i',\n        '1+i',\n    ],\n    [\n        '1',\n        '1',\n    ],\n    [\n        '1.09868411346781-0.455089860562227i',\n        '1-i',\n    ],\n    [\n        '1.35878298553655-0.919940868634298i',\n        '1-2.5i',\n    ],\n    [\n        '1.11803398874989+1.11803398874989i',\n        '2.5i',\n    ],\n    [\n        '0.707106781186548+0.707106781186547i',\n        'i',\n    ],\n    [\n        '0',\n        '0',\n    ],\n    [\n        '0.707106781186548-0.707106781186547i',\n        '-i',\n    ],\n    [\n        '1.11803398874989-1.11803398874989i',\n        '-2.5i',\n    ],\n    [\n        '0.919940868634298+1.35878298553655i',\n        '-1+2.5i',\n    ],\n    [\n        '0.455089860562227+1.09868411346781i',\n        '-1+i',\n    ],\n    [\n        '0.923879532511287+0.382683432365089i',\n        '0.707106781186548+0.707106781186547i',\n    ],\n    [\n        '0.455089860562227-1.09868411346781i',\n        '-1-i',\n    ],\n    [\n        '0.919940868634298-1.35878298553655i',\n        '-1-2.5i',\n    ],\n    [\n        '0.632914936433528+1.9749889409211i',\n        '-3.5+2.5i',\n    ],\n    [\n        '0.264627043818521+1.88945163270197i',\n        '-3.5+i',\n    ],\n    [\n        '1.14602144155088E-16+1.87082869338697i',\n        '-3.5',\n    ],\n    [\n        '0.264627043818521-1.88945163270197i',\n        '-3.5-i',\n    ],\n    [\n        '0.632914936433528-1.9749889409211i',\n        '-3.5-2.5i',\n    ],\n    [\n        '3',\n        '9',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMSUB.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        ExcelError::NAN(),\n        '12.34+5.67j',\n        '123.45+67.89i',\n    ],\n    [\n        ExcelError::NAN(),\n        '12.34+5.67j',\n        'Invalid Complex Number',\n    ],\n    [\n        '111.11+62.22j',\n        '123.45+67.89j',\n        '12.34+5.67j',\n    ],\n    [\n        '-111.11-62.22j',\n        '12.34+5.67j',\n        '123.45+67.89j',\n    ],\n    [\n        '-111.11-62.22i',\n        '12.34+5.67i',\n        '123.45+67.89i',\n    ],\n    [\n        '-135.79+62.22i',\n        '-12.34-5.67i',\n        '123.45-67.89i',\n    ],\n    [\n        '135.79+62.22i',\n        '12.34-5.67i',\n        '-123.45-67.89i',\n    ],\n    [\n        '111.11+62.22i',\n        '-12.34-5.67i',\n        '-123.45-67.89i',\n    ],\n    [\n        '111.11+67.89i',\n        '-12.34',\n        '-123.45-67.89i',\n    ],\n    [\n        '111.11-67.89i',\n        '-12.34',\n        '-123.45+67.89i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMSUM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        ExcelError::NAN(),\n        '12.34+5.67j',\n        '123.45+67.89i',\n    ],\n    [\n        ExcelError::NAN(),\n        '12.34+5.67j',\n        'Invalid Complex Number',\n    ],\n    [\n        '135.79+73.56j',\n        '12.34+5.67j',\n        '123.45+67.89j',\n    ],\n    [\n        '135.79+62.22i',\n        '12.34-5.67i',\n        '123.45+67.89i',\n    ],\n    [\n        '135.79-62.22i',\n        '12.34+5.67i',\n        '123.45-67.89i',\n    ],\n    [\n        '135.79-73.56i',\n        '12.34-5.67i',\n        '123.45-67.89i',\n    ],\n    [\n        '259.24+141.45i',\n        '12.34+5.67i',\n        '123.45+67.89i',\n        '123.45+67.89i',\n    ],\n    [\n        ExcelError::NAN(),\n        '12.34+5.67i',\n        '123.45+67.89i',\n        '123.45+67.89j',\n    ],\n    [\n        '111.11-73.56i',\n        '-12.34-5.67i',\n        '123.45-67.89i',\n    ],\n    [\n        '-111.11-73.56i',\n        '12.34-5.67i',\n        '-123.45-67.89i',\n    ],\n    [\n        '-135.79-73.56i',\n        '-12.34-5.67i',\n        '-123.45-67.89i',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/IMTAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        '-0.0000103999694261435177+0.999978619978377253j',\n        '12.34+5.67j',\n    ],\n    [\n        ExcelError::NAN(),\n        'Invalid Complex Number',\n    ],\n    [\n        '0.00876404549513463160+0.989853240015864536i',\n        '3.5+2.5i',\n    ],\n    [\n        '0.145476605392064825+0.803096047002175475i',\n        '3.5+i',\n    ],\n    [\n        '0.374585640158594666',\n        '3.5',\n    ],\n    [\n        '0.145476605392064825-0.803096047002175475i',\n        '3.5-i',\n    ],\n    [\n        '0.00876404549513463160-0.989853240015864536i',\n        '3.5-2.5i',\n    ],\n    [\n        '0.0123221382558283535+1.00554801189505998i',\n        '1+2.5i',\n    ],\n    [\n        '0.271752585319511717+1.08392332733869454i',\n        '1+i',\n    ],\n    [\n        '1.55740772465490223',\n        '1',\n    ],\n    [\n        '0.271752585319511717-1.08392332733869454i',\n        '1-i',\n    ],\n    [\n        '0.0123221382558283535-1.00554801189505998i',\n        '1-2.5i',\n    ],\n    [\n        '0.986614298151430289i',\n        '2.5i',\n    ],\n    [\n        '0.761594155955764888i',\n        'i',\n    ],\n    [\n        '0.0',\n        '0',\n    ],\n    [\n        '-0.761594155955764888i',\n        '-i',\n    ],\n    [\n        '-0.98661429815143i',\n        '-2.5i',\n    ],\n    [\n        '-0.01232213825582835+1.00554801189506i',\n        '-1+2.5i',\n    ],\n    [\n        '-0.27175258531951172+1.0839233273386945i',\n        '-1+i',\n    ],\n    [\n        '-1.55740772465490223',\n        '-1',\n    ],\n    [\n        '-0.27175258531951172-1.08392332733869454i',\n        '-1-i',\n    ],\n    [\n        '-0.01232213825582835-1.00554801189506i',\n        '-1-2.5i',\n    ],\n    [\n        '-0.00876404549513463+0.989853240015864i',\n        '-3.5+2.5i',\n    ],\n    [\n        '-0.1454766053920648+0.803096047002176i',\n        '-3.5+i',\n    ],\n    [\n        '-0.374585640158594666',\n        '-3.5',\n    ],\n    [\n        '-0.1454766053920648-0.803096047002176i',\n        '-3.5-i',\n    ],\n    [\n        '-0.00876404549513463-0.989853240015864i',\n        '-3.5-2.5i',\n    ],\n    [\n        '-0.142546543074277805',\n        '3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/OCT2BIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [ExcelError::NAN(), '1357'],\n    ['10100110', '246'],\n    ['011', 3, 3],\n    [ExcelError::NAN(), '12345'],\n    [ExcelError::NAN(), '123.45'],\n    ['0', '0'],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false],\n    [ExcelError::NAN(), '3579'],\n    ['1000000000', '7777777000'], // 2's Complement\n    ['1111111111', '7777777777'], // 2's Complement\n    [ExcelError::NAN(), '17777777777'], // Too small\n    [ExcelError::NAN(), '1777'], // Too large\n    ['111111111', '777'], // highest positive\n    [ExcelError::NAN(), '1000'],\n    ['1000000000', '7777777000'], // lowest negative\n    [ExcelError::NAN(), '7777776777'],\n    ['01010', 12, 5],\n    [ExcelError::NAN(), 12, 0],\n    [ExcelError::NAN(), 12, -1],\n    [ExcelError::NAN(), 12, 14],\n    [ExcelError::NAN(), 12, 3],\n    ['1010', 12, 4],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/OCT2BINOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // ODS accepts boolean, Excel/Gnumeric don't\n    ['0', false], // ODS accepts boolean, Excel/Gnumeric don't\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/OCT2DEC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [751, '1357'],\n    [166, '246'],\n    [5349, '12345'],\n    [ExcelError::NAN(), '123.45'],\n    [0, '0'],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false],\n    [ExcelError::NAN(), '3579'],\n    [44, '54'],\n    [-165, '7777777533'], // 2's Complement\n    [0, ''],\n    [ExcelError::NAN(), '37777777770'], // too many digits\n    [536870911, '3777777777'], // highest positive\n    [-536870912, '4000000000'], // lowest negative\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/OCT2DECOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [1, true], // ODS accepts boolean, Excel/Gnumeric don't\n    [0, false], // ODS accepts boolean, Excel/Gnumeric don't\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/OCT2HEX.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    ['2EF', '1357'],\n    ['A6', '246'],\n    ['14E5', '12345'],\n    ['0040', 100, 4],\n    [ExcelError::NAN(), '123.45'],\n    ['0', '0'],\n    [ExcelError::VALUE(), true],\n    [ExcelError::VALUE(), false],\n    [ExcelError::NAN(), '3579'],\n    ['FFFFFFFF5B', '7777777533'], // 2's Complement\n    ['00108', 410, 5],\n    [ExcelError::NAN(), 410, 0],\n    [ExcelError::NAN(), 410, -1],\n    [ExcelError::NAN(), 410, 14],\n    [ExcelError::NAN(), 410, 2],\n    ['108', 410, 3],\n    [ExcelError::NAN(), '37777777770'], // too many digits\n    ['1FFFFFFF', '3777777777'], // highest positive\n    ['FFE0000000', '4000000000'], // lowest negative\n];\n"
  },
  {
    "path": "tests/data/Calculation/Engineering/OCT2HEXOpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['1', true], // ODS accepts boolean, Excel/Gnumeric don't\n    ['0', false], // ODS accepts boolean, Excel/Gnumeric don't\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/ACCRINT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Issue date, 1st Interest, Settlement, Rate, Par, Freq, Basis, Result\n\nreturn [\n    [\n        16.6666666666666,\n        '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0,\n    ],\n    [\n        15.5555555555559,\n        '2008-03-05', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0,\n    ],\n    [\n        15.5555555555559,\n        '2008-03-05', '2008-08-31', '2008-05-01', 0.10, 1000, 2, null,\n    ],\n    [\n        15.5555555555559,\n        '2008-03-05', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0,\n    ],\n    [\n        7.22222222222222,\n        '2008-04-05', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0,\n    ],\n    [\n        200,\n        '2010-01-01', '2010-06-30', '2010-04-01', 0.08, 10000, 4,\n    ],\n    [\n        1600,\n        '2012-01-01', '2012-04-01', '2013-12-31', 0.08, 10000, 4,\n    ],\n    [\n        32.363013698630134,\n        '2012-01-01', '2012-03-31', '2012-02-15', 0.0525, 5000, 4, 3,\n    ],\n    [\n        6.472602739726027,\n        '2012-01-01', '2012-03-31', '2012-02-15', 0.0525, 1000, 4, 3,\n    ],\n    [\n        18.05555555555555,\n        '2017-08-05', '2017-11-10', '2017-10-10', 0.05, 2000, 4, 0,\n    ],\n    [\n        '#NUM!',\n        '2008-03-05', '2008-08-31', '2008-05-01', -0.10, 1000, 2, 0,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0,\n    ],\n    [\n        '#VALUE!',\n        '2008-03-01', '2008-08-31', '2008-05-01', 'ABC', 1000, 2, 0,\n    ],\n    'Non-numeric Rate' => [\n        '#VALUE!',\n        '2008-03-01', '2008-08-31', '2008-05-01', 'NaN', 1000, 2, 0,\n    ],\n    'Invalid Rate' => [\n        '#NUM!',\n        '2008-03-01', '2008-08-31', '2008-05-01', -0.10, 1000, 2, 0,\n    ],\n    'Non-numeric Par Value' => [\n        '#VALUE!',\n        '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 'NaN', 2, 0,\n    ],\n    'Invalid Par Value' => [\n        '#NUM!',\n        '2008-03-01', '2008-08-31', '2008-05-01', 0.10, -1000, 2, 0,\n    ],\n    'Non-numeric Frequency' => [\n        '#VALUE!',\n        '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 1000, 'NaN', 0,\n    ],\n    'Invalid Frequency' => [\n        '#NUM!',\n        '2008-03-01', '2008-08-31', '2008-05-01', 0.10, -1000, 3, 0,\n    ],\n    'Non-numeric Basis' => [\n        '#VALUE!',\n        '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 'ABC',\n    ],\n    'Invalid Basis' => [\n        '#NUM!',\n        '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 1000, 2, -2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/ACCRINTM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Issue date, Settlement, Rate, Par, Basis, Result\n\nreturn [\n    [\n        20.547945205478999,\n        '2008-04-01', '2008-06-15', 0.10, 1000, 3,\n    ],\n    [\n        800,\n        '2010-01-01', '2010-12-31', 0.08, 10000,\n    ],\n    [\n        800,\n        '2010-01-01', '2010-12-31', 0.08, 10000, null,\n    ],\n    [\n        365.958904109589,\n        '2012-01-01', '2013-02-15', 0.065, 5000, 3,\n    ],\n    [\n        73.1917808219178,\n        '2012-01-01', '2013-02-15', 0.065, 1000, 3,\n    ],\n    [\n        '#NUM!',\n        '2008-03-05', '2008-08-31', -0.10, 1000, 2,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date', '2008-08-31', 0.10, 1000, 2,\n    ],\n    'Non-numeric Rate' => [\n        '#VALUE!',\n        '2008-03-01', '2008-08-31', 'NaN', 1000, 2,\n    ],\n    'Invalid Rate' => [\n        '#NUM!',\n        '2008-03-01', '2008-08-31', -0.10, 1000, 2,\n    ],\n    'Non-numeric Par Value' => [\n        '#VALUE!',\n        '2008-03-01', '2008-08-31', 0.10, 'NaN', 2,\n    ],\n    'Invalid Par Value' => [\n        '#NUM!',\n        '2008-03-01', '2008-08-31', 0.10, -1000, 2,\n    ],\n    'Non-numeric Basis' => [\n        '#VALUE!',\n        '2008-03-01', '2008-08-31', 0.10, 1000, 'NaN',\n    ],\n    'Invalid Basis' => [\n        '#NUM!',\n        '2008-03-01', '2008-08-31', 0.10, 1000, 99,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/AMORDEGRC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Cost, Date purchased, End of the 1st period, Salvage, Period, Depreciation, Basis, Result\n\nreturn [\n    [\n        776,\n        2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, 1,\n    ],\n    [\n        776,\n        2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, 0,\n    ],\n    [\n        776,\n        2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, null,\n    ],\n    [\n        820,\n        2400, '2008-08-19', '2008-12-31', 300, 1, 0.2, 1,\n    ],\n    [\n        492,\n        2400, '2008-08-19', '2008-12-31', 300, 2, 0.2, 1,\n    ],\n    [\n        886,\n        2400, '2008-08-19', '2008-12-31', 300, 1, 0.22, 1,\n    ],\n    [\n        949,\n        2400, '2008-08-19', '2008-12-31', 300, 1, 0.24, 1,\n    ],\n    [\n        494,\n        2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, 1,\n    ],\n    [\n        902,\n        2400, '2008-08-19', '2008-12-31', 300, 1, 0.3, 1,\n    ],\n    [\n        42,\n        150, '2011-01-01', '2011-09-30', 20, 1, 0.2, 4,\n    ],\n    [\n        25,\n        150, '2011-01-01', '2011-09-30', 20, 2, 0.2, 4,\n    ],\n    [\n        16,\n        150, '2011-01-01', '2011-09-30', 20, 3, 0.15, 4,\n    ],\n    [\n        42,\n        150, '2011-01-01', '2011-09-30', 20, 1, 0.4, 4,\n    ],\n    [\n        2813,\n        10000, '2012-03-01', '2012-12-31', 1500, 1, 0.3, 1,\n    ],\n    [\n        0.0,\n        500, '2012-03-01', '2012-12-31', 500, 3, 0.3, 1,\n    ],\n    [\n        '#VALUE!',\n        'NaN', '2012-03-01', '2020-12-25', 20, 1, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        550, 'notADate', '2020-12-25', 20, 1, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        550, '2011-01-01', 'notADate', 20, 1, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        550, '2012-03-01', '2020-12-25', 'NaN', 1, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        550, '2012-03-01', '2020-12-25', 20, 'NaN', 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        550, '2012-03-01', '2020-12-25', 20, 1, 'NaN', 4,\n    ],\n    [\n        '#VALUE!',\n        550, '2012-03-01', '2020-12-25', 20, 1, 0.2, 'NaN',\n    ],\n    [\n        '#NUM!',\n        550, '2012-03-01', '2020-12-25', 20, 1, 0.2, 99,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/AMORLINC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Cost, Date purchased, End of the 1st period, Salvage, Period, Depreciation, Basis, Result\n\nreturn [\n    [\n        360,\n        2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, 1,\n    ],\n    [\n        576,\n        2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, 1,\n    ],\n    [\n        576,\n        2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, 0,\n    ],\n    [\n        576,\n        2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, null,\n    ],\n    [\n        30,\n        150, '2011-01-01', '2011-09-30', 20, 1, 0.2, 4,\n    ],\n    [\n        22.41666667,\n        150, '2011-01-01', '2011-09-30', 20, 0, 0.2, 4,\n    ],\n    [\n        17.58333333,\n        150, '2011-01-01', '2011-09-30', 20, 4, 0.2, 4,\n    ],\n    [\n        0.0,\n        150, '2011-01-01', '2011-09-30', 20, 5, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        'NaN', '2011-01-01', '2011-09-30', 20, 1, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        150, '2011-01-01', 'notADate', 20, 1, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        150, 'notADate', '2011-09-30', 20, 1, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        150, '2011-01-01', '2011-09-30', 'NaN', 1, 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        150, '2011-01-01', '2011-09-30', 20, 'NaN', 0.2, 4,\n    ],\n    [\n        '#VALUE!',\n        150, '2011-01-01', '2011-09-30', 20, 1, 'NaN', 4,\n    ],\n    [\n        '#VALUE!',\n        150, '2011-01-01', '2011-09-30', 20, 1, 0.2, 'NaN',\n    ],\n    [\n        '#NUM!',\n        550, '2012-03-01', '2020-12-25', 20, 1, 0.2, 99,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/COUPDAYBS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Settlement, Maturity, Frequency, Basis, Result\n\nreturn [\n    [\n        71,\n        '25-Jan-2007',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        66,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n    ],\n    [\n        66,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n        null,\n    ],\n    [\n        71,\n        '2011-01-25',\n        '2011-11-15',\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        '25-Jan-2007',\n        'Invalid Date',\n        2,\n        1,\n    ],\n    'Invalid Frequency' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        3,\n        1,\n    ],\n    'Non-Numeric Frequency' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        'NaN',\n        1,\n    ],\n    'Invalid Basis' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        -1,\n    ],\n    'Non-Numeric Basis' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        'NaN',\n    ],\n    'Same Date' => [\n        '#NUM!',\n        '24-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        311,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        0,\n    ],\n    [\n        317,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        317,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        317,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        2,\n    ],\n    [\n        317,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        3,\n    ],\n    [\n        310,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        4,\n    ],\n    [\n        131,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        0,\n    ],\n    [\n        133,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        133,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        133,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        2,\n    ],\n    [\n        133,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        3,\n    ],\n    [\n        130,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        4,\n    ],\n    [\n        41,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        0,\n    ],\n    [\n        42,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        42,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        42,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        2,\n    ],\n    [\n        42,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        3,\n    ],\n    [\n        40,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        4,\n    ],\n    [\n        5,\n        '05-Apr-2019',\n        '30-Sep-2021',\n        2,\n        0,\n    ],\n    [\n        5,\n        '05-Oct-2019',\n        '31-Mar-2022',\n        2,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/COUPDAYS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Settlement, Maturity, Frequency, Basis, Result\n\nreturn [\n    [\n        181,\n        '25-Jan-2007',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        90,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n    ],\n    [\n        90,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n        null,\n    ],\n    [\n        182.5,\n        '25-Jan-2007',\n        '15-Nov-2008',\n        2,\n        3,\n    ],\n    [\n        365,\n        '25-Jan-2007',\n        '15-Nov-2008',\n        1,\n        1,\n    ],\n    [\n        365,\n        '25-Jan-2010',\n        '15-Nov-2011',\n        1,\n        1,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        '25-Jan-2007',\n        'Invalid Date',\n        2,\n        1,\n    ],\n    'Invalid Frequency' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        3,\n        1,\n    ],\n    'Non-Numeric Frequency' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        'NaN',\n        1,\n    ],\n    'Invalid Basis' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        -1,\n    ],\n    'Non-Numeric Basis' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        'NaN',\n    ],\n    'Same Date' => [\n        '#NUM!',\n        '24-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        360,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        0,\n    ],\n    [\n        365,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        366,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        360,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        2,\n    ],\n    [\n        365,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        3,\n    ],\n    [\n        360,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        4,\n    ],\n    [\n        180,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        0,\n    ],\n    [\n        181,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        182,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        180,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        2,\n    ],\n    [\n        182.5,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        3,\n    ],\n    [\n        180,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        4,\n    ],\n    [\n        90,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        0,\n    ],\n    [\n        90,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        91,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        90,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        2,\n    ],\n    [\n        91.25,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        3,\n    ],\n    [\n        90,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        4,\n    ],\n    [\n        180,\n        '05-Apr-2019',\n        '30-Sep-2021',\n        2,\n        0,\n    ],\n    [\n        180,\n        '05-Oct-2019',\n        '31-Mar-2022',\n        2,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/COUPDAYSNC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Settlement, Maturity, Frequency, Basis, Result\n\nreturn [\n    [\n        110,\n        '25-Jan-2007',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        24,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n    ],\n    [\n        24,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n        null,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        '25-Jan-2007',\n        'Invalid Date',\n        2,\n        1,\n    ],\n    'Invalid Frequency' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        3,\n        1,\n    ],\n    'Non-Numeric Frequency' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        'NaN',\n        1,\n    ],\n    'Invalid Basis' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        -1,\n    ],\n    'Non-Numeric Basis' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        'NaN',\n    ],\n    'Same Date' => [\n        '#NUM!',\n        '24-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        49,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        0,\n    ],\n    [\n        49,\n        '01-Feb-2021',\n        '20-Mar-2021',\n        1,\n        0,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        49,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        2,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        3,\n    ],\n    [\n        50,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        4,\n    ],\n    [\n        49,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        0,\n    ],\n    [\n        49,\n        '01-Feb-2021',\n        '20-Mar-2021',\n        2,\n        0,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        49,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        2,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        3,\n    ],\n    [\n        50,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        4,\n    ],\n    [\n        49,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        0,\n    ],\n    [\n        49,\n        '01-Feb-2021',\n        '20-Mar-2021',\n        4,\n        0,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        49,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        2,\n    ],\n    [\n        48,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        3,\n    ],\n    [\n        50,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        4,\n    ],\n    [\n        175,\n        '05-Apr-2019',\n        '30-Sep-2021',\n        2,\n        0,\n    ],\n    // Excel and LibreOffice return 175 for the following calculation.\n    // Gnumeric returns 176.\n    // My hand calculation, hardly guaranteed, agrees with Gnumeric.\n    [\n        176,\n        '05-Oct-2019',\n        '31-Mar-2022',\n        2,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/COUPNCD.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Settlement, Maturity, Frequency, Basis, Result\n\nreturn [\n    [\n        39217,\n        '25-Jan-2007',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        40568,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n    ],\n    [\n        40568,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n        null,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        '25-Jan-2007',\n        'Invalid Date',\n        2,\n        1,\n    ],\n    'Invalid Frequency' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        3,\n        1,\n    ],\n    'Non-Numeric Frequency' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        'NaN',\n        1,\n    ],\n    'Invalid Basis' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        -1,\n    ],\n    'Non-Numeric Basis' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        'NaN',\n    ],\n    'Same Date' => [\n        '#NUM!',\n        '24-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        36884,\n        '23-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        36884,\n        '24-Sep-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        36793,\n        '23-Sep-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        0,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        43910,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        2,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        3,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        4,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        0,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        43910,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        2,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        3,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        4,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        0,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        43910,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        2,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        3,\n    ],\n    [\n        44275,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        4,\n    ],\n    [\n        44651,\n        '30-Sep-2021',\n        '31-Mar-2022',\n        2,\n        0,\n    ],\n    [\n        44834,\n        '31-Mar-2022',\n        '30-Sep-2022',\n        2,\n        0,\n    ],\n    [\n        43738,\n        '05-Apr-2019',\n        '30-Sep-2021',\n        2,\n        0,\n    ],\n    [\n        43921,\n        '05-Oct-2019',\n        '31-Mar-2022',\n        2,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/COUPNUM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Settlement, Maturity, Frequency, Basis, Result\n\nreturn [\n    [\n        4,\n        '25-Jan-2007',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        8,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n        0,\n    ],\n    [\n        8,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n        null,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        '25-Jan-2007',\n        'Invalid Date',\n        2,\n        1,\n    ],\n    'Invalid Frequency' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        3,\n        1,\n    ],\n    'Non-Numeric Frequency' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        'NaN',\n        1,\n    ],\n    'Invalid Basis' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        -1,\n    ],\n    'Non-Numeric Basis' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        'NaN',\n    ],\n    'Same Date' => [\n        '#NUM!',\n        '24-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        5,\n        '01-Jan-2008',\n        '31-Dec-2012',\n        1,\n        1,\n    ],\n    [\n        '#NUM!',\n        '24-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        1,\n        '23-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        1,\n        '24-Sep-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        2,\n        '23-Sep-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        16,\n        '1-Apr-2012',\n        '31-Mar-2020',\n        2,\n        0,\n    ],\n    [\n        16,\n        '1-Apr-2012',\n        '31-Mar-2020',\n        2,\n        1,\n    ],\n    [\n        16,\n        '1-Apr-2012',\n        '31-Mar-2020',\n        2,\n        2,\n    ],\n    [\n        16,\n        '1-Apr-2012',\n        '31-Mar-2020',\n        2,\n        3,\n    ],\n    [\n        16,\n        '1-Apr-2012',\n        '31-Mar-2020',\n        2,\n        4,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        0,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        2,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        2,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        3,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        4,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        0,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        3,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        2,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        3,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        4,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        0,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        5,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        2,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        3,\n    ],\n    [\n        1,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        4,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/COUPPCD.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Settlement, Maturity, Frequency, Basis, Result\n\nreturn [\n    [\n        39036,\n        '25-Jan-2007',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        40476,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n    ],\n    [\n        40476,\n        '2011-01-01',\n        '2012-10-25',\n        4,\n        null,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date',\n        '15-Nov-2008',\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        '25-Jan-2007',\n        'Invalid Date',\n        2,\n        1,\n    ],\n    'Invalid Frequency' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        3,\n        1,\n    ],\n    'Non-Numeric Frequency' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        'NaN',\n        1,\n    ],\n    'Invalid Basis' => [\n        '#NUM!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        -1,\n    ],\n    'Non-Numeric Basis' => [\n        '#VALUE!',\n        '25-Jan-2007',\n        '15-Nov-2008',\n        4,\n        'NaN',\n    ],\n    'Same Date' => [\n        '#NUM!',\n        '24-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        36793,\n        '23-Dec-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        36793,\n        '24-Sep-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        36701,\n        '23-Sep-2000',\n        '24-Dec-2000',\n        4,\n        0,\n    ],\n    [\n        43910,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        0,\n    ],\n    [\n        43910,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        43544,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        1,\n        1,\n    ],\n    [\n        43910,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        2,\n    ],\n    [\n        43910,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        3,\n    ],\n    [\n        43910,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        1,\n        4,\n    ],\n    [\n        44094,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        0,\n    ],\n    [\n        44094,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        43728,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        2,\n        1,\n    ],\n    [\n        44094,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        2,\n    ],\n    [\n        44094,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        3,\n    ],\n    [\n        44094,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        2,\n        4,\n    ],\n    [\n        44185,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        0,\n    ],\n    [\n        44185,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        43819,\n        '31-Jan-2020',\n        '20-Mar-2021',\n        4,\n        1,\n    ],\n    [\n        44185,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        2,\n    ],\n    [\n        44185,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        3,\n    ],\n    [\n        44185,\n        '31-Jan-2021',\n        '20-Mar-2021',\n        4,\n        4,\n    ],\n    [\n        43555,\n        '05-Apr-2019',\n        '30-Sep-2021',\n        2,\n        0,\n    ],\n    [\n        43738,\n        '05-Oct-2019',\n        '31-Mar-2022',\n        2,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/CUMIPMT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// rate, nper, pv, start_period, end_period, type, result\n\nreturn [\n    [\n        -11135.232130750999,\n        0.0075,\n        360,\n        125000,\n        13,\n        24,\n        0,\n    ],\n    [\n        -937.5,\n        0.0075,\n        360,\n        125000,\n        1,\n        1,\n        0,\n    ],\n    [\n        -937.5,\n        0.0075,\n        360,\n        125000,\n        1,\n        1,\n        null,\n    ],\n    [\n        -2299.6141712553544,\n        0.004175,\n        60,\n        50000,\n        1,\n        12,\n        0,\n    ],\n    [\n        -1836.8883999349455,\n        0.004175,\n        60,\n        50000,\n        13,\n        24,\n        0,\n    ],\n    [\n        -1350.4402595996685,\n        0.004175,\n        60,\n        50000,\n        25,\n        36,\n        0,\n    ],\n    [\n        -839.0535854569902,\n        0.004175,\n        60,\n        50000,\n        37,\n        48,\n        0,\n    ],\n    [\n        -301.4498641014851,\n        0.004175,\n        60,\n        50000,\n        49,\n        60,\n        0,\n    ],\n    [\n        '#VALUE!',\n        'NaN',\n        360,\n        125000,\n        24,\n        13,\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        'NaN',\n        125000,\n        24,\n        13,\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        'NaN',\n        24,\n        13,\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        125000,\n        'NaN',\n        13,\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        125000,\n        24,\n        'NaN',\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        125000,\n        24,\n        13,\n        'NaN',\n    ],\n    [\n        '#NUM!',\n        0.0075,\n        360,\n        125000,\n        13,\n        24,\n        2,\n    ],\n    [\n        '#NUM!',\n        0.0075,\n        10,\n        125000,\n        24,\n        13,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/CUMPRINC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// rate, nper, pv, start_period, end_period, type, result\n\nreturn [\n    [\n        -934.10712342088004,\n        0.0075,\n        360,\n        125000,\n        13,\n        24,\n        0,\n    ],\n    [\n        -68.278271180977001,\n        0.0075,\n        360,\n        125000,\n        1,\n        1,\n        0,\n    ],\n    [\n        -68.278271180977001,\n        0.0075,\n        360,\n        125000,\n        1,\n        1,\n        null,\n    ],\n    [\n        -9025.875084814226,\n        0.004175,\n        60,\n        50000,\n        1,\n        12,\n        0,\n    ],\n    [\n        -9488.600856134633,\n        0.004175,\n        60,\n        50000,\n        13,\n        24,\n        0,\n    ],\n    [\n        -9975.04899646991,\n        0.004175,\n        60,\n        50000,\n        25,\n        36,\n        0,\n    ],\n    [\n        -10486.435670612591,\n        0.004175,\n        60,\n        50000,\n        37,\n        48,\n        0,\n    ],\n    [\n        -11024.039391968092,\n        0.004175,\n        60,\n        50000,\n        49,\n        60,\n        0,\n    ],\n    [\n        '#VALUE!',\n        'NaN',\n        360,\n        125000,\n        13,\n        24,\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        'NaN',\n        125000,\n        13,\n        24,\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        'NaN',\n        13,\n        24,\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        125000,\n        'NaN',\n        24,\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        125000,\n        13,\n        'NaN',\n        0,\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        125000,\n        13,\n        24,\n        'NaN',\n    ],\n    [\n        '#VALUE!',\n        0.0075,\n        360,\n        125000,\n        24,\n        13,\n        0,\n    ],\n    [\n        '#NUM!',\n        0.0075,\n        360,\n        125000,\n        24,\n        13,\n        2,\n    ],\n    [\n        '#NUM!',\n        0.0075,\n        10,\n        125000,\n        13,\n        24,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/DB.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// cost, salvage, life, period, month, result\n\nreturn [\n    [\n        186083.33333333,\n        1000000,\n        100000,\n        6,\n        1,\n        7,\n    ],\n    [\n        259639.41666667,\n        1000000,\n        100000,\n        6,\n        2,\n        7,\n    ],\n    [\n        176814.44274999999,\n        1000000,\n        100000,\n        6,\n        3,\n        7,\n    ],\n    [\n        120410.63551275,\n        1000000,\n        100000,\n        6,\n        4,\n        7,\n    ],\n    [\n        81999.642784183001,\n        1000000,\n        100000,\n        6,\n        5,\n        7,\n    ],\n    [\n        55841.756736028001,\n        1000000,\n        100000,\n        6,\n        6,\n        7,\n    ],\n    [\n        15845.098473848,\n        1000000,\n        100000,\n        6,\n        7,\n        7,\n    ],\n    [\n        1845.0,\n        10000,\n        1000,\n        5,\n        1,\n        6,\n    ],\n    [\n        3009.1950000000002,\n        10000,\n        1000,\n        5,\n        2,\n        6,\n    ],\n    [\n        1898.8020449999999,\n        10000,\n        1000,\n        5,\n        3,\n        6,\n    ],\n    [\n        1198.1440903949999,\n        10000,\n        1000,\n        5,\n        4,\n        6,\n    ],\n    [\n        756.02892103925001,\n        10000,\n        1000,\n        5,\n        5,\n        6,\n    ],\n    [\n        238.52712458788,\n        10000,\n        1000,\n        5,\n        6,\n        6,\n    ],\n    [\n        0.0,\n        0,\n        0,\n        5,\n        6,\n        6,\n    ],\n    [\n        4651.199,\n        12000,\n        2000,\n        3.5,\n        2,\n        1,\n    ],\n    [\n        3521.399,\n        12000,\n        2000,\n        5,\n        2.5,\n        1,\n    ],\n    [\n        3521.399,\n        12000,\n        2000,\n        5,\n        2.5,\n        1.2,\n    ],\n    // Period value between 0 and 1 not yet handled in code\n    //    [\n    //        301.0,\n    //        12000,\n    //        2000,\n    //        5,\n    //        0.5,\n    //        1,\n    //    ],\n    [\n        -554.116,\n        12000,\n        15000,\n        5,\n        2,\n        1,\n    ],\n    [\n        '#NUM!',\n        -1000,\n        100,\n        5,\n        6,\n        6,\n    ],\n    [\n        '#VALUE!',\n        'Invalid',\n        1000,\n        5,\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        12000,\n        'Invalid',\n        5,\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        12000,\n        1000,\n        'Invalid',\n        2,\n        1,\n    ],\n    [\n        '#VALUE!',\n        12000,\n        1000,\n        5,\n        'Invalid',\n        1,\n    ],\n    [\n        '#VALUE!',\n        12000,\n        1000,\n        5,\n        2,\n        'Invalid',\n    ],\n    [\n        '#NUM!',\n        -12000,\n        1000,\n        5,\n        2,\n        1,\n    ],\n    [\n        '#NUM!',\n        12000,\n        -1000,\n        5,\n        2,\n        1,\n    ],\n    [\n        '#NUM!',\n        12000,\n        1000,\n        5,\n        0,\n        1,\n    ],\n    [\n        '#NUM!',\n        12000,\n        1000,\n        5,\n        -2,\n        1,\n    ],\n    [\n        '#NUM!',\n        12000,\n        1000,\n        5,\n        2,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/DDB.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// cost, salvage, life, period, month, result\n\nreturn [\n    [\n        0.13150684931507001,\n        2400,\n        300,\n        36500,\n        1,\n    ],\n    [\n        0.13149964346031001,\n        2400,\n        300,\n        36500,\n        2,\n    ],\n    [\n        0.13146362010870999,\n        2400,\n        300,\n        36500,\n        7,\n    ],\n    [\n        0.91843145432707995,\n        2400,\n        300,\n        36500,\n        7,\n        14,\n    ],\n    [\n        40.0,\n        2400,\n        300,\n        120,\n        1,\n        2,\n    ],\n    [\n        480.0,\n        2400,\n        300,\n        10,\n        1,\n        2,\n    ],\n    [\n        306.0,\n        2400,\n        300,\n        10,\n        2,\n        1.5,\n    ],\n    [\n        22.122547200000302,\n        2400,\n        300,\n        10,\n        10,\n    ],\n    [\n        4000.0,\n        10000,\n        1000,\n        5,\n        1,\n    ],\n    [\n        2400.0,\n        10000,\n        1000,\n        5,\n        2,\n    ],\n    [\n        1440.0,\n        10000,\n        1000,\n        5,\n        3,\n    ],\n    [\n        864.0,\n        10000,\n        1000,\n        5,\n        4,\n    ],\n    [\n        296.0,\n        10000,\n        1000,\n        5,\n        5,\n    ],\n    [\n        972.0,\n        12000,\n        1000,\n        5,\n        3,\n        0.5,\n    ],\n    [\n        1259.4752186588921,\n        12000,\n        1000,\n        3.5,\n        3,\n        0.5,\n    ],\n    [\n        1080.00,\n        12000,\n        1000,\n        5,\n        2,\n        0.5,\n    ],\n    [\n        0.0,\n        12000,\n        15000,\n        5,\n        2,\n        0.5,\n    ],\n    //  Code does not yet handle fractional period values for DDB, only integer\n    //    [\n    //        1024.58,\n    //        12000,\n    //        1000,\n    //        5,\n    //        2.5,\n    //        0.5,\n    //    ],\n    [\n        '#NUM!',\n        -2400,\n        300,\n        36500,\n        1,\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n        300,\n        36500,\n        1,\n    ],\n    [\n        '#VALUE!',\n        12000,\n        'INVALID',\n        5,\n        3,\n        0.5,\n    ],\n    [\n        '#VALUE!',\n        12000,\n        1000,\n        'INVALID',\n        3,\n        0.5,\n    ],\n    [\n        '#VALUE!',\n        12000,\n        1000,\n        5,\n        'INVALID',\n        0.5,\n    ],\n    [\n        '#VALUE!',\n        12000,\n        1000,\n        5,\n        3,\n        'INVALID',\n    ],\n    [\n        '#NUM!',\n        12000,\n        -1000,\n        5,\n        3,\n        0.5,\n    ],\n    [\n        '#NUM!',\n        12000,\n        1000,\n        5,\n        -3,\n        0.5,\n    ],\n    [\n        '#NUM!',\n        12000,\n        1000,\n        5,\n        3,\n        -0.5,\n    ],\n    [\n        '#NUM!',\n        12000,\n        1000,\n        5,\n        0,\n        0.5,\n    ],\n    [\n        '#NUM!',\n        12000,\n        1000,\n        2,\n        3,\n        0.5,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/DISC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// settlement, maturity, price, redemption, basis, result\n\nreturn [\n    [\n        0.052420213,\n        '2007-01-25',\n        '2007-06-15',\n        97.974999999999994,\n        100,\n        1,\n    ],\n    [\n        0.01,\n        '2010-04-01',\n        '2015-03-31',\n        95,\n        100,\n    ],\n    [\n        0.01,\n        '2010-04-01',\n        '2015-03-31',\n        95,\n        100,\n        null,\n    ],\n    [\n        '#NUM!',\n        '2010-04-01',\n        '2015-03-31',\n        0,\n        100,\n    ],\n    [\n        '#VALUE!',\n        '2010-04-01',\n        '2015-03-31',\n        'ABC',\n        100,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date',\n        '2007-06-15',\n        97.974999999999994,\n        100,\n        1,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/DOLLARDE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// fractional_dollar, fraction, result\n\nreturn [\n    [\n        2.5,\n        1.6,\n        4,\n    ],\n    [\n        -2.5,\n        -1.6,\n        4,\n    ],\n    [\n        1.125,\n        1.02,\n        16,\n    ],\n    [\n        1.3125,\n        1.1000000000000001,\n        32,\n    ],\n    [\n        1.0625,\n        1.01,\n        16,\n    ],\n    [\n        1.625,\n        1.1000000000000001,\n        16,\n    ],\n    [\n        1.09375,\n        1.03,\n        32,\n    ],\n    [\n        1.9375,\n        1.3,\n        32,\n    ],\n    [\n        1.375,\n        1.1200000000000001,\n        32,\n    ],\n    [\n        '#VALUE!',\n        'Not A Number',\n        0,\n    ],\n    [\n        '#DIV/0!',\n        1.2344999999999999,\n        0,\n    ],\n    [\n        '#NUM!',\n        1.2344999999999999,\n        -2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/DOLLARFR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// decimal_dollar, fraction, result\n\nreturn [\n    [\n        1.24,\n        1.6,\n        4,\n    ],\n    [\n        -1.24,\n        -1.6,\n        4,\n    ],\n    [\n        1.02,\n        1.125,\n        16,\n    ],\n    [\n        1.04,\n        1.125,\n        32,\n    ],\n    [\n        1.01,\n        1.0625,\n        16,\n    ],\n    [\n        1.1000000000000001,\n        1.625,\n        16,\n    ],\n    [\n        1.03,\n        1.09375,\n        32,\n    ],\n    [\n        1.3,\n        1.9375,\n        32,\n    ],\n    [\n        1.1200000000000001,\n        1.375,\n        32,\n    ],\n    [\n        '#VALUE!',\n        'Not A Number',\n        0,\n    ],\n    [\n        '#DIV/0!',\n        1.2344999999999999,\n        0,\n    ],\n    [\n        '#NUM!',\n        1.2344999999999999,\n        -2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/DaysPerYear.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Financial\\Constants as FinancialConstants;\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [360, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_NASD],\n    [366, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL],\n    [365, 2021, FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL],\n    [360, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_360],\n    [365, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_365],\n    [360, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_360_EUROPEAN],\n    [ExcelError::NAN(), 2020, 'Invalid'],\n    [ExcelError::NAN(), 2020, 999],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/EFFECT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// nominal_rate, npery, Result\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        0.053542667370758003,\n        0.052499999999999998,\n        4,\n    ],\n    [\n        0.103812890625,\n        0.10000000000000001,\n        4,\n    ],\n    [\n        0.10249999999999999,\n        0.10000000000000001,\n        2,\n    ],\n    [\n        0.025156250000000002,\n        0.025000000000000001,\n        2,\n    ],\n    [\n        ExcelError::NAN(),\n        0.025,\n        -1,\n    ],\n    [\n        ExcelError::NAN(),\n        -0.025,\n        1,\n    ],\n    [\n        ExcelError::VALUE(),\n        0.025,\n        'NaN',\n    ],\n    [\n        ExcelError::VALUE(),\n        'NaN',\n        1,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/FV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// rate, nper, pmt, pv, type, Result\n\nreturn [\n    [\n        2581.4033740600998,\n        [0.005, 10, -200, -500, 1],\n    ],\n    [\n        2421.371872695160,\n        [-0.005, 10, -200, -500, 1],\n    ],\n    [\n        12682.503013197,\n        [0.01, 12, -1000],\n    ],\n    [\n        11361.512828387000,\n        [-0.01, 12, -1000],\n    ],\n    [\n        82859.19732763403,\n        [0.009175, 35, -2000, null, 1],\n    ],\n    [\n        2301.4018303408998,\n        [0.005, 12, -100, -1000, 1],\n    ],\n    [\n        2103.328949318290,\n        [-0.005, 12, -100, -1000, 1],\n    ],\n    [\n        -178.046206611904,\n        [0.005, 12, 100, -1000, 1],\n    ],\n    [\n        178.046206611904,\n        [0.005, 12, -100, 1000, 1],\n    ],\n    [\n        -2301.401830340900,\n        [0.005, 12, 100, 1000, 1],\n    ],\n    [\n        -220.083335489543,\n        [-0.005, 12, 100, -1000, 1],\n    ],\n    [\n        220.083335489543,\n        [-0.005, 12, -100, 1000, 1],\n    ],\n    [\n        -2103.328949318290,\n        [-0.005, 12, 100, 1000, 1],\n    ],\n    [\n        68023.43754198513,\n        [0.004175, 60, -1000],\n    ],\n    [\n        39729.460894165997,\n        [0.025, 16, -2000, 0, 1],\n    ],\n    [\n        1300,\n        [0.0, 12, -100, -100],\n    ],\n    [\n        -1100,\n        [0.0, 12, 100, -100],\n    ],\n    [\n        1100,\n        [0.0, 12, -100, 100],\n    ],\n    [\n        -1300,\n        [0.0, 12, 100, 100],\n    ],\n    [\n        '#VALUE!',\n        ['NaN', 12, -100, -100],\n    ],\n    [\n        '#VALUE!',\n        [0.0, 'NaN', -100, -100],\n    ],\n    [\n        '#VALUE!',\n        [0.0, 12, 'NaN', -100],\n    ],\n    [\n        '#VALUE!',\n        [0.0, 12, -100, 'NaN'],\n    ],\n    [\n        '#VALUE!',\n        [0.0, 12, -100, -100, 'NaN'],\n    ],\n    [\n        -33882857.54639115,\n        [-0.10, -100, -100, 0, 1],\n    ],\n    [\n        -10000.00,\n        [0.0, -100, -100, 0, 1],\n    ],\n    [\n        -100.0,\n        [0.10, -1, -100, 0, 1],\n    ],\n    [\n        '#NUM!',\n        [0.10, 12, -100, 0, 2],\n    ],\n    [\n        '#NUM!',\n        [0.10, 12, -100, 0, -1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/FVSCHEDULE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// principal, schedule, Result\n\nreturn [\n    [\n        1.3308899999999999,\n        1,\n        [\n            0.089999999999999997,\n            0.11,\n            0.10000000000000001,\n        ],\n    ],\n    [\n        13.3089,\n        10,\n        [\n            0.089999999999999997,\n            0.11,\n            0.10000000000000001,\n        ],\n    ],\n    [\n        12223.614571874999,\n        10000,\n        [\n            0.050000000000000003,\n            0.050000000000000003,\n            0.035000000000000003,\n            0.035000000000000003,\n            0.035000000000000003,\n        ],\n    ],\n    [\n        '#VALUE!',\n        'NaN',\n        [\n            0.089999999999999997,\n            0.11,\n            0.10000000000000001,\n        ],\n    ],\n    [\n        '#VALUE!',\n        100,\n        [\n            0.089999999999999997,\n            'NaN',\n            0.10000000000000001,\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/INTRATE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Settlement, Maturity, Investment, Redemption, Basis, Result\n\nreturn [\n    [\n        0.05768,\n        '2008-02-15',\n        '2008-05-15',\n        1000000,\n        1014420,\n        2,\n    ],\n    [\n        0.225,\n        '2005-04-01',\n        '2010-03-31',\n        1000,\n        2125,\n    ],\n    [\n        0.225,\n        '2005-04-01',\n        '2010-03-31',\n        1000,\n        2125,\n        null,\n    ],\n    [\n        '#VALUE!',\n        '2008-02-15',\n        '2008-05-15',\n        1000000,\n        1014420,\n        'ABC',\n    ],\n    [\n        '#NUM!',\n        '2008-02-15',\n        '2008-05-15',\n        1000000,\n        -1014420,\n        2,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date',\n        '2008-05-15',\n        1000000,\n        1014420,\n        2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/IPMT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// rate, per, nper, pv, fv, type, Result\n\nreturn [\n    [\n        -22.858787457480013,\n        [0.0085, 3, 3, 8000],\n    ],\n    [\n        22.473454124370,\n        [-0.0085, 3, 3, 8000],\n    ],\n    [\n        -292.44712990937001,\n        [0.10, 3, 3, 8000],\n    ],\n    [\n        239.114391143911,\n        [-0.10, 3, 3, 8000],\n    ],\n    [\n        -212.50,\n        [0.00425, 1, 60, 50000],\n    ],\n    [\n        212.50,\n        [-0.00425, 1, 60, 50000],\n    ],\n    [\n        -209.38324500656188,\n        [0.00425, 2, 60, 50000],\n    ],\n    [\n        208.495090812845,\n        [-0.00425, 2, 60, 50000],\n    ],\n    [\n        0.0,\n        [0.00875, 1, 8, 10000, 5000, 1],\n    ],\n    [\n        0.0,\n        [-0.00875, 1, 8, 10000, 5000, 1],\n    ],\n    [\n        -70.968650395558996,\n        [0.00875, 2, 8, 10000, 5000, 1],\n    ],\n    [\n        71.207753426393,\n        [-0.00875, 2, 8, 10000, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        ['NaN', 2, 8, 10000, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.00875, 'NaN', 8, 10000, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.00875, 2, 'NaN', 10000, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.00875, 2, 8, 'NaN', 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.00875, 2, 8, 10000, 'NaN', 1],\n    ],\n    [\n        '#VALUE!',\n        [0.00875, 2, 8, 10000, 5000, 'NaN'],\n    ],\n    [\n        '#NUM!',\n        [0.00875, 2, 8, 10000, 5000, 2],\n    ],\n    [\n        '#NUM!',\n        [0.005, -1, 8, 2500, 200, 1],\n    ],\n    [\n        '#NUM!',\n        [0.005, 8, 2, 2500, 200, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/IRR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// values, guess, Result\n\nreturn [\n    [\n        -0.02124484827341,\n        [\n            -70000,\n            12000,\n            15000,\n            18000,\n            21000,\n        ],\n    ],\n    [\n        0.086630948036519995,\n        [\n            -70000,\n            12000,\n            15000,\n            18000,\n            21000,\n            26000,\n        ],\n    ],\n    [\n        -0.1821374641455,\n        [\n            -70000,\n            12000,\n            15000,\n            18000,\n        ],\n        0.10,\n    ],\n    [\n        -0.13618951095869,\n        [\n            -100,\n            [\n                20,\n                24,\n                28.8,\n            ],\n        ],\n    ],\n    [\n        0.13057575637152699,\n        [\n            -100,\n            [\n                20,\n                24,\n                28.8,\n                34.56,\n                41.47,\n            ],\n        ],\n    ],\n    [\n        '#VALUE!',\n        999,\n        1.23,\n    ],\n    [\n        '#VALUE!',\n        [\n            70000,\n            12000,\n            15000,\n            18000,\n            21000,\n        ],\n    ],\n    [\n        '#VALUE!',\n        [\n            -70000,\n            -12000,\n            -15000,\n            -18000,\n            -21000,\n        ],\n    ],\n    'no arguments' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/ISPMT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// rate, per, nper, pv, result\n\nreturn [\n    [\n        -66111.111111111,\n        0.0085,\n        1,\n        36,\n        8000000,\n    ],\n    [\n        -533333.33333333,\n        0.10,\n        1,\n        3,\n        8000000,\n    ],\n    [\n        -205.270833333,\n        0.004175,\n        1,\n        60,\n        50000,\n    ],\n    [\n        -201.791666667,\n        0.004175,\n        2,\n        60,\n        50000,\n    ],\n    [\n        0.0,\n        0.00,\n        1,\n        3,\n        8000000,\n    ],\n    [\n        0.0,\n        0.125,\n        3,\n        3,\n        8000000,\n    ],\n    [\n        '#VALUE!',\n        'NaN',\n        3,\n        3,\n        8000000,\n    ],\n    [\n        '#VALUE!',\n        0.125,\n        'NaN',\n        3,\n        8000000,\n    ],\n    [\n        '#VALUE!',\n        0.125,\n        3,\n        'NaN',\n        8000000,\n    ],\n    [\n        '#VALUE!',\n        0.125,\n        3,\n        3,\n        'NaN',\n    ],\n    [\n        '#NUM!',\n        0.125,\n        -1,\n        3,\n        800000,\n    ],\n    [\n        '#NUM!',\n        0.125,\n        4,\n        3,\n        800000,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/MIRR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// values, finance_rate, reinvestment_rate, Result\n\nreturn [\n    [\n        0.12609413036591,\n        [\n            -120000,\n            [\n                39000,\n                30000,\n                21000,\n                37000,\n                46000,\n            ],\n        ],\n        0.10,\n        0.12,\n    ],\n    [\n        -0.048044655249981,\n        [\n            -120000,\n            [\n                39000,\n                30000,\n                21000,\n            ],\n        ],\n        0.10,\n        0.12,\n    ],\n    [\n        0.13475911082830999,\n        [\n            -120000,\n            [\n                39000,\n                30000,\n                21000,\n                37000,\n                46000,\n            ],\n        ],\n        0.10,\n        0.14,\n    ],\n    [\n        0.74021752686287001,\n        [\n            -100,\n            [\n                12,\n                14,\n                11,\n            ],\n        ],\n        5.5,\n        5,\n    ],\n    [\n        1.8579321744785,\n        [\n            -100,\n            [\n                12,\n                14,\n                11,\n                13,\n                16,\n            ],\n        ],\n        5.5,\n        5,\n    ],\n    'first argument must be array' => [\n        '#DIV/0!',\n        999,\n        1.23,\n        2.34,\n    ],\n    'all values are positive' => [\n        '#DIV/0!',\n        [0.12, 0.13, 0.125],\n        1.23,\n        2.34,\n    ],\n    'all values are negative' => [\n        '#DIV/0!',\n        [-0.12, -0.13, -0.125],\n        1.23,\n        2.34,\n    ],\n    'result is NaN' => [\n        '#NUM!',\n        [-0.12, 0.13, 0.125],\n        1.23,\n        -2.34,\n    ],\n    'valid result even when reinvest rate < -1' => [\n        -0.205225399,\n        [-0.12, 0.13, 0.25],\n        1.23,\n        -2.34,\n    ],\n    'exception for 2 arguments or fewer' => [\n        'exception',\n        [-0.12, 0.13, 0.25],\n        1.23,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/NOMINAL.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// effect_rate, npery, result\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        0.052500319868356002,\n        0.053543,\n        4,\n    ],\n    [\n        0.096454756337780001,\n        0.10000000000000001,\n        4,\n    ],\n    [\n        0.097617696340302998,\n        0.10000000000000001,\n        2,\n    ],\n    [\n        0.024718035238113001,\n        0.025000000000000001,\n        12,\n    ],\n    [\n        ExcelError::NAN(),\n        -0.025,\n        12,\n    ],\n    [\n        ExcelError::NAN(),\n        0.025,\n        -12,\n    ],\n    [\n        ExcelError::VALUE(),\n        'NaN',\n        12,\n    ],\n    [\n        ExcelError::VALUE(),\n        0.025,\n        'NaN',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/NPER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// rate, pmt, pv, fv, type, result\n\nreturn [\n    [\n        59.673865674295001,\n        [0.01, -100, -1000, 10000, 1],\n    ],\n    [\n        60.082122853762002,\n        [0.01, -100, -1000, 10000],\n    ],\n    [\n        -9.5785940398132006,\n        [0.01, -100, -1000],\n    ],\n    [\n        54.787577259999999,\n        [0.003333333333, -1000, 50000],\n    ],\n    [\n        11.90373729,\n        [0.015, -1200, 9000, 5000, 1],\n    ],\n    [\n        11.493114445230,\n        [-0.015, -1200, 9000, 5000, 1],\n    ],\n    [\n        -11.328655672030,\n        [0.015, 1200, 9000, 5000, 1],\n    ],\n    [\n        -3.046573306812,\n        [0.015, -1200, -9000, 5000, 1],\n    ],\n    [\n        3.621654926975,\n        [0.015, -1200, 9000, -5000, 1],\n    ],\n    [\n        11.666666667,\n        [0.0, -1200, 9000, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        ['NaN', -1200, 9000, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.015, 'NaN', 9000, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.015, -1200, 'NaN', 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.015, -1200, 9000, 'NaN', 1],\n    ],\n    [\n        '#VALUE!',\n        [0.015, -1200, 9000, 5000, 'NaN'],\n    ],\n    [\n        '#NUM!',\n        [0.015, -1200, 9000, 5000, 2],\n    ],\n    [\n        '#NUM!',\n        [0.015, 0.0, 0.0, 5000, 1],\n    ],\n    [\n        '#NUM!',\n        [0.0, 0.0, -500, 5000, 1],\n    ],\n    [\n        '#NUM!',\n        [0.25, 0.5, 0.0, 150, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/NPV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// rate, values, result\n\nreturn [\n    [\n        1188.4434123352,\n        0.10,\n        -10000,\n        3000,\n        4200,\n        6800,\n    ],\n    [\n        41922.061554931999,\n        0.08,\n        8000,\n        9200,\n        10000,\n        12000,\n        14500,\n    ],\n    [\n        36250.534912984003,\n        0.08,\n        8000,\n        9200,\n        10000,\n        12000,\n        14500,\n        -9000,\n    ],\n    [\n        12678.677633095,\n        0.05,\n        2000,\n        2400,\n        2900,\n        3500,\n        4100,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/PDURATION.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        10.33803507,\n        [0.04, 10000, 15000],\n    ],\n    [\n        3.859866162622655,\n        [0.025, 2000, 2200],\n    ],\n    [\n        87.6054764193714,\n        [0.025 / 12, 1000, 1200],\n    ],\n    [\n        3.5644379226484437,\n        [0.03, 9000, 10000],\n    ],\n    [\n        14.206699082890474,\n        [0.05, 50, 100],\n    ],\n    [\n        '#VALUE!',\n        ['NaN', 50, 100],\n    ],\n    [\n        '#VALUE!',\n        [0.05, 'NaN', 100],\n    ],\n    [\n        '#VALUE!',\n        [0.05, 50, 'NaN'],\n    ],\n    [\n        '#NUM!',\n        [-0.10, 50, 100],\n    ],\n    [\n        '#NUM!',\n        [0.00, 50, 100],\n    ],\n    [\n        '#NUM!',\n        [0.05, 0, 100],\n    ],\n    [\n        '#NUM!',\n        [0.05, 50, 0],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/PMT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        -1037.032089359164,\n        [0.08 / 12, 10, 10000],\n    ],\n    [\n        -963.701199976010,\n        [-0.08 / 12, 10, 10000],\n    ],\n    [\n        -1030.164327177977,\n        [0.08 / 12, 10, 10000, null, 1],\n    ],\n    [\n        -970.168993264440,\n        [-0.08 / 12, 10, 10000, null, 1],\n    ],\n    [\n        -129.081160867995,\n        [0.06 / 12, 18 * 12, 0.0, 50000],\n    ],\n    [\n        -943.56168220055,\n        [0.05 / 12, 60, 50000],\n    ],\n    [\n        -600.85202718047,\n        [0.035 / 4, 8, 0, 5000, 1],\n    ],\n    [\n        -750.00,\n        [0.0, 8, 1000, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        ['NaN', 8, 0, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 'NaN', 0, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 8, 'NaN', 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 8, 0, 'NaN', 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 8, 0, 5000, 'NaN'],\n    ],\n    [\n        '#NUM!',\n        [0.035 / 4, 8, 0, 5000, 2],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/PPMT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        -75.623186008367,\n        [0.10 / 12, 1, 2 * 12, 2000],\n    ],\n    [\n        -91.597714484189,\n        [-0.10 / 12, 1, 2 * 12, 2000],\n    ],\n    [\n        -27598.053462421,\n        [0.08, 10, 10, 200000],\n    ],\n    [\n        -13356.484444134500,\n        [-0.08, 10, 10, 200000],\n    ],\n    [\n        -735.22834886722,\n        [0.05 / 12, 1, 60, 50000],\n    ],\n    [\n        -940.107483227145,\n        [-0.05 / 12, 1, 60, 50000],\n    ],\n    [\n        -738.29180032083,\n        [0.05 / 12, 2, 60, 50000],\n    ],\n    [\n        -936.190368713698,\n        [-0.05 / 12, 2, 60, 50000],\n    ],\n    [\n        -600.85202718047,\n        [0.035 / 4, 1, 8, 0, 5000, 1],\n    ],\n    [\n        -606.109482418299,\n        [0.035 / 4, 2, 8, 0, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        ['NaN', 2, 8, 0, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 'NaN', 8, 0, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 2, 'NaN', 0, 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 2, 8, 'NaN', 5000, 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 2, 8, 0, 'NaN', 1],\n    ],\n    [\n        '#VALUE!',\n        [0.035 / 4, 2, 8, 0, 5000, 'NaN'],\n    ],\n    [\n        '#NUM!',\n        [0.035 / 4, 0, 8, 0, 5000, 1],\n    ],\n    [\n        '#NUM!',\n        [0.035 / 4, 4, 2, 0, 5000, 1],\n    ],\n    [\n        '#NUM!',\n        [0.035 / 4, 2, 8, 0, 5000, 2],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/PRICE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Result, Settlement, Maturity, Rate, Yield, Redemption, Frequency, Basis\n\nreturn [\n    [\n        '#VALUE!',\n        'xyz',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        2,\n        0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008',\n        'xyz',\n        0.0575,\n        0.065,\n        100,\n        2,\n        0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        'xyz',\n        0.065,\n        100,\n        2,\n        0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        'xyz',\n        100,\n        2,\n        0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        'xyz',\n        2,\n        0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        'xyz',\n        0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        2,\n        'xyz',\n    ],\n    [\n        '#NUM!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        2,\n        -1, // invalid basis\n    ],\n    [\n        '#NUM!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        2,\n        5, // invalid basis\n    ],\n    [\n        '#NUM!',\n        '15-Nov-2017', // maturity before settlement\n        '15-Feb-2008',\n        0.0575,\n        0.065,\n        100,\n        2,\n        0,\n    ],\n    [\n        '#NUM!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        5, // invalid frequency\n        0,\n    ],\n    [\n        '#NUM!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        6, // had been coded as valid for gnumeric, but it isn't\n        0,\n    ],\n    [\n        '#NUM!',\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        12, // had been coded as valid for gnumeric, but it isn't\n        0,\n    ],\n    [\n        94.6343616213221,\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        2,\n        0,\n    ],\n    [\n        94.635449207877201,\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        2,\n        1,\n    ],\n    [\n        94.67215001,\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        1,\n        0,\n    ],\n    [\n        110.83448359321601,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        2,\n    ],\n    [\n        110.834537395859,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        2,\n        1,\n    ],\n    [\n        110.9216934,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        4,\n        0,\n    ],\n    [\n        110.9216934,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        4,\n        null,\n    ],\n    [\n        110.9217251,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        4,\n        1,\n    ],\n    [\n        110.9216934,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        4,\n        4,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/PRICE3.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Result, Settlement, Maturity, Rate, Yield, Redemption, Frequency, Basis\n// On the result line, the value is ODS's calculation.\n//     This agrees with Gnumeric, PhpSpreadsheet, and the published algorithm at:\n//https://support.office.com/en-us/article/price-function-3ea9deac-8dfa-436f-a7c8-17ea02c21b0a.\n// The commented-out value on the next line is Excel's result.\n// I do not know how best to reconcile the different results.\n// The problem seems restricted to basis codes 2 and 3.\n\nreturn [\n    [\n        94.60241717687768,\n        // 94.636564030025099,\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        2,\n        2,\n    ],\n    [\n        94.643594548258,\n        // 94.635174796784497,\n        '15-Feb-2008',\n        '15-Nov-2017',\n        0.0575,\n        0.065,\n        100,\n        2,\n        3,\n    ],\n    [\n        110.74436592216529,\n        // 110.83448359321601,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        2,\n        2,\n    ],\n    [\n        110.81970970927745,\n        // 110.83452855143901,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        2,\n        3,\n    ],\n    [\n        110.8912556,\n        // 110.9216934,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        4,\n        2,\n    ],\n    [\n        110.9292394066714,\n        // 110.921732963198,\n        '01-Apr-2012',\n        '31-Mar-2020',\n        0.12,\n        0.10,\n        100,\n        4,\n        3,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/PRICEDISC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        90.0,\n        ['01-Apr-2017', '31-Mar-2021', 0.025, 100],\n    ],\n    [\n        97.625,\n        ['2008-02-15', '2008-11-30', 0.03, 100, null],\n    ],\n    [\n        97.6311475409836,\n        ['2008-02-15', '2008-11-30', 0.03, 100, 1],\n    ],\n    [\n        '#VALUE!',\n        ['Invalid Date', '2008-11-30', 0.03, 100, 1],\n    ],\n    [\n        '#VALUE!',\n        ['2008-02-15', 'Invalid Date', 0.03, 100, 1],\n    ],\n    [\n        '#VALUE!',\n        ['2008-02-15', '2008-11-30', 'NaN', 100, 1],\n    ],\n    [\n        '#NUM!',\n        ['2008-02-15', '2008-11-30', -0.03, 100, 1],\n    ],\n    [\n        '#VALUE!',\n        ['2008-02-15', '2008-11-30', 0.03, 'NaN', 1],\n    ],\n    [\n        '#NUM!',\n        ['2008-02-15', '2008-11-30', 0.03, -100, 1],\n    ],\n    [\n        '#VALUE!',\n        ['2008-02-15', '2008-11-30', 0.03, 100, 'NaN'],\n    ],\n    [\n        '#NUM!',\n        ['2008-02-15', '2008-11-30', 0.03, 100, -1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/PRICEMAT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        99.98449887555694,\n        '15-Feb-2008', '13-Apr-2008', '11-Nov-2007', 0.061, 0.061, 0,\n    ],\n    [\n        99.98449887555694,\n        '15-Feb-2008', '13-Apr-2008', '11-Nov-2007', 0.061, 0.061, null,\n    ],\n    [\n        106.8486842105263,\n        '1-Apr-2017', '31-Mar-2021', '1-Jan-2017', 0.055, 0.035,\n    ],\n    [\n        93.0909090909091,\n        '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', 0.07, 0.08,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date', '1-Jan-2027', '1-Jan-2017', 0.07, 0.08,\n    ],\n    [\n        '#VALUE!',\n        '1-Jul-2017', 'Invalid Date', '1-Jan-2017', 0.07, 0.08,\n    ],\n    [\n        '#VALUE!',\n        '1-Jul-2017', '1-Jan-2027', 'Invalid Date', 0.07, 0.08,\n    ],\n    [\n        '#VALUE!',\n        '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', 'NaN', 0.08,\n    ],\n    [\n        '#NUM!',\n        '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', -0.07, 0.08,\n    ],\n    [\n        '#VALUE!',\n        '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', 0.07, 'NaN',\n    ],\n    [\n        '#NUM!',\n        '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', 0.07, -0.08,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/PV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        -52990.70632392715,\n        [0.05 / 12, 60, 1000],\n    ],\n    [\n        -68327.092460502600,\n        [-0.05 / 12, 60, 1000],\n    ],\n    [\n        -26762.755452881098,\n        [0.10 / 4, 16, 2000, 0, 1],\n    ],\n    [\n        -38955.527352284700,\n        [-0.10 / 4, 16, 2000, 0, 1],\n    ],\n    [\n        26762.755452881100,\n        [0.10 / 4, 16, -2000, 0, 1],\n    ],\n    [\n        -34846.254654898500,\n        [0.10 / 4, 16, 2000, 12000, 1],\n    ],\n    [\n        18679.256250863700,\n        [0.10 / 4, 16, -2000, 12000, 1],\n    ],\n    [\n        -18679.256250863700,\n        [0.10 / 4, 16, 2000, -12000, 1],\n    ],\n    [\n        34846.254654898500,\n        [0.10 / 4, 16, -2000, -12000, 1],\n    ],\n    [\n        56948.685406482400,\n        [-0.10 / 4, 16, -2000, -12000, 1],\n    ],\n    [\n        -5555.6058459337655,\n        [0.075 / 12, 2 * 12, 250, null, 0],\n    ],\n    [\n        -9252.072719337915,\n        [0.06 / 52, 4 * 52, 50, null, 1],\n    ],\n    [\n        -762.8840472202697,\n        [0.0525 / 1, 10 * 1, 100, null, 0],\n    ],\n    [\n        -1000.0,\n        [0.0, 10 * 1, 100, null, 0],\n    ],\n    [\n        '#VALUE!',\n        ['NaN', 10 * 1, 100, null, 0],\n    ],\n    [\n        '#VALUE!',\n        [0.0525 / 1, 'NaN', 100, null, 0],\n    ],\n    [\n        '#VALUE!',\n        [0.0525 / 1, 10 * 1, 'NaN', null, 0],\n    ],\n    [\n        '#VALUE!',\n        [0.0525 / 1, 10 * 1, 100, 'NaN', 0],\n    ],\n    [\n        '#VALUE!',\n        [0.0525 / 1, 10 * 1, 100, null, 'NaN'],\n    ],\n    [\n        '#NUM!',\n        [0.0525 / 1, 10 * 1, 100, null, -1],\n    ],\n    [\n        '#NUM!',\n        [0.0525 / 1, 10 * 1, 100, null, 2.5],\n    ],\n    [\n        '#NUM!',\n        [0.0525 / 1, 10 * -1, 100, null, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/RATE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Periods, Payment, Present Value, Future Value, Type, Guess, Result\n\nreturn [\n    [\n        0.0077014724882014003,\n        48,\n        -200,\n        8000,\n    ],\n    [\n        0.046781916422493401,\n        60,\n        -6000,\n        120000,\n    ],\n    [\n        -0.020442952219356499,\n        60,\n        -1000,\n        120000,\n    ],\n    [\n        0.015130843902343399,\n        24,\n        -250,\n        5000,\n    ],\n    [\n        0.017929869399484,\n        24.99,\n        -250,\n        5000,\n    ],\n    [\n        0.016581855,\n        24.5,\n        -250,\n        5000,\n    ],\n    [\n        0.016550119066711999,\n        24,\n        -250,\n        5000,\n        null,\n        1,\n    ],\n    [\n        0.087499997684093694,\n        208,\n        -700,\n        8000,\n    ],\n    [\n        0.087113755605863596,\n        10,\n        -1000,\n        6500,\n    ],\n    [\n        0.048472127283572801,\n        6,\n        -1000,\n        100000,\n        -126068,\n    ],\n    [\n        0.030272873827543501,\n        6,\n        1000,\n        100000,\n        -126068,\n    ],\n    [\n        0.030272873827543699,\n        6,\n        -1000,\n        -100000,\n        126068,\n        0,\n    ],\n    [\n        '#NUM!',\n        0,\n        1,\n        8000,\n    ],\n    [\n        '#NUM!',\n        208,\n        -700,\n        8000,\n        0,\n        0,\n        0,\n    ],\n    [\n        -1.000125, // Excel says #NUM!, but I believe this is correct\n        1,\n        1,\n        8000,\n    ],\n    [\n        6.9258100553578E-10,\n        208,\n        -700,\n        137600,\n        8000,\n    ],\n    [\n        0.00054607632544395,\n        208,\n        -700,\n        137600,\n    ],\n    [\n        '#VALUE!',\n        'NaN',\n        -700,\n        8000,\n        0,\n        0,\n        0,\n    ],\n    [\n        '#VALUE!',\n        208,\n        'NaN',\n        8000,\n        0,\n        0,\n        0,\n    ],\n    [\n        '#VALUE!',\n        208,\n        -700,\n        'NaN',\n        0,\n        0,\n        0,\n    ],\n    [\n        '#VALUE!',\n        208,\n        -700,\n        8000,\n        'NaN',\n        0,\n        0,\n    ],\n    [\n        '#VALUE!',\n        208,\n        -700,\n        8000,\n        0,\n        'NaN',\n        0,\n    ],\n    [\n        '#VALUE!',\n        208,\n        -700,\n        8000,\n        0,\n        0,\n        'NaN',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/RECEIVED.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1014584.6544071021,\n        '15-Feb-2008', '15-May-2008', 1000000, 0.0575, 2,\n    ],\n    [\n        1120.2128404396835,\n        '6-Jul-2017', '15-Jan-2020', 1000, 0.0425,\n    ],\n    [\n        1120.2128404396835,\n        '6-Jul-2017', '15-Jan-2020', 1000, 0.0425, null,\n    ],\n    [\n        273037.54266211606,\n        '15-Feb-2008', '15-Nov-2017', 100000, 0.065,\n    ],\n    [\n        '#VALUE!',\n        'Invalid Date', '15-Nov-2017', 100000, 0.065, 0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008', 'Invalid Date', 100000, 0.065, 0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008', '15-Nov-2017', 'NaN', 0.065, 0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008', '15-Nov-2017', 100000, 'NaN', 0,\n    ],\n    [\n        '#VALUE!',\n        '15-Feb-2008', '15-Nov-2017', 100000, 0.065, 'NaN',\n    ],\n    [\n        '#NUM!',\n        '15-Feb-2008', '15-Nov-2017', -1000, 0.065, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/RRI.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.04137974399241062,\n        [10, 10000, 15000],\n    ],\n    [\n        0.00099330737629133,\n        [96, 10000, 11000],\n    ],\n    [\n        0.6747967875721199,\n        [10, 70, 12154],\n    ],\n    [\n        '#VALUE!',\n        ['NaN', 70, 12154],\n    ],\n    [\n        '#VALUE!',\n        [10, 'NaN', 12154],\n    ],\n    [\n        '#VALUE!',\n        [10, 70, 'NaN'],\n    ],\n    [\n        '#NUM!',\n        [0.0, 70.0, 200.0],\n    ],\n    [\n        '#NUM!',\n        [10, 0.0, 200.0],\n    ],\n    [\n        '#NUM!',\n        [10, 70, -2.0],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/SLN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1800,\n        [10000, 1000, 5],\n    ],\n    [\n        1000,\n        [10000, 5000, 5],\n    ],\n    [\n        1142.857142857143,\n        [8000, 0, 7],\n    ],\n    [\n        50,\n        [500, 100, 8],\n    ],\n    [\n        2250,\n        [30000, 7500, 10],\n    ],\n    [\n        166.66666666666666,\n        [1200, 200, 6],\n    ],\n    [\n        3750,\n        [45000, 7500, 10],\n    ],\n    [\n        -10500,\n        [12000, 1500, -1],\n    ],\n    [\n        21000,\n        [12000, 1500, 0.5],\n    ],\n    [\n        3250,\n        [12000, -1000, 4],\n    ],\n    [\n        -250,\n        [0, 1000, 4],\n    ],\n    [\n        -600,\n        [12000, 15000, 5],\n    ],\n    [\n        '#DIV/0!',\n        [12000, 1500, 0],\n    ],\n    [\n        '#VALUE!',\n        ['INVALID', 1000, 1],\n    ],\n    [\n        '#VALUE!',\n        [12000, 'INVALID', 1],\n    ],\n    [\n        '#VALUE!',\n        [12000, 1000, 'INVALID'],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/SYD.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3000,\n        [10000, 1000, 5, 1],\n    ],\n    [\n        2400,\n        [10000, 1000, 5, 2],\n    ],\n    [\n        1800,\n        [10000, 1000, 5, 3],\n    ],\n    [\n        1200,\n        [10000, 1000, 5, 4],\n    ],\n    [\n        600,\n        [10000, 1000, 5, 5],\n    ],\n    [\n        1428.5714285714287,\n        [8000, 0, 7, 3],\n    ],\n    [\n        4090.909090909091,\n        [30000, 7500, 10, 1],\n    ],\n    [\n        409.09090909090907,\n        [30000, 7500, 10, 10],\n    ],\n    [\n        -800,\n        [-2000, 1000, 5, 2],\n    ],\n    [\n        3771.4285714285716,\n        [12000, 1000, 2.5, 2],\n    ],\n    [\n        5028.571428571428,\n        [12000, 1000, 2.5, 1.5],\n    ],\n    [\n        -600,\n        [-2000, 1000, 5, 3],\n    ],\n    [\n        -800,\n        [12000, 15000, 5, 2],\n    ],\n    [\n        '#NUM!',\n        [12000, -1000, 5, 3],\n    ],\n    [\n        '#NUM!',\n        [10000, 1000, 5, 10],\n    ],\n    [\n        '#VALUE!',\n        ['INVALID', 1000, 5, 1],\n    ],\n    [\n        '#VALUE!',\n        [12000, 'INVALID', 5, 1],\n    ],\n    [\n        '#VALUE!',\n        [12000, 1000, 'INVALID', 1],\n    ],\n    [\n        '#VALUE!',\n        [12000, 1000, 5, 'INVALID'],\n    ],\n    [\n        '#NUM!',\n        [12000, -1, 5, 2],\n    ],\n    [\n        '#NUM!',\n        [12000, 1000, -5, 1],\n    ],\n    [\n        '#NUM!',\n        [12000, 1000, 5, 0],\n    ],\n    [\n        '#NUM!',\n        [12000, 1000, 5, -1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/TBILLEQ.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        0.094151494,\n        '31-Mar-2008', '1-Jun-2008', 0.0914,\n    ],\n    [\n        ExcelError::VALUE(),\n        'Not a Valid Date', '1-Jun-2008', 0.09,\n    ],\n    [\n        ExcelError::VALUE(),\n        '31-Mar-2008', 'Not a Valid Date', 0.09,\n    ],\n    [\n        ExcelError::VALUE(),\n        '31-Mar-2008', '1-Jun-2008', 'NaN',\n    ],\n    [\n        ExcelError::NAN(),\n        '31-Mar-2008', '1-Jun-2008', -0.09,\n    ],\n    [\n        ExcelError::NAN(),\n        '31-Mar-2000', '1-Jun-2021', 0.09,\n    ],\n    [\n        ExcelError::NAN(),\n        '1-Jun-2008', '31-Mar-2008', 0.09,\n    ],\n    [\n        0.025465926,\n        '5-Feb-2019', '1-Feb-2020', 0.0245,\n    ],\n    [\n        0.036787997,\n        '1-Feb-2016', '30-Jan-2017', 0.035,\n    ],\n    [\n        0.025612238,\n        '1-Feb-2017', '30-Jun-2017', 0.025,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/TBILLPRICE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        98.45,\n        '31-Mar-2008', '1-Jun-2008', 0.09,\n    ],\n    [\n        ExcelError::VALUE(),\n        'Not a Valid Date', '1-Jun-2008', 0.09,\n    ],\n    [\n        ExcelError::VALUE(),\n        '31-Mar-2008', 'Not a Valid Date', 0.09,\n    ],\n    [\n        ExcelError::VALUE(),\n        '31-Mar-2008', '1-Jun-2008', 'NaN',\n    ],\n    [\n        ExcelError::NAN(),\n        '31-Mar-2008', '1-Jun-2008', -0.09,\n    ],\n    [\n        ExcelError::NAN(),\n        '31-Mar-2000', '1-Jun-2021', 0.09,\n    ],\n    [\n        ExcelError::NAN(),\n        '1-Jun-2008', '31-Mar-2008', 0.09,\n    ],\n    [\n        0.0,\n        '31-Mar-2008', '1-Apr-2008', 360,\n    ],\n    [\n        ExcelError::NAN(),\n        '31-Mar-2008', '1-Apr-2008', 361,\n    ],\n    [\n        97.75,\n        '1-Apr-2017', '30-Jun-2017', 0.09,\n    ],\n    [\n        97.543194444,\n        '5-Feb-2019', '1-Feb-2020', 0.0245,\n    ],\n    [\n        98.86180556,\n        '1-Feb-2017', '30-Jun-2017', 0.0275,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/TBILLYIELD.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        0.09141696292534264,\n        '31-Mar-2008', '1-Jun-2008', 98.45,\n    ],\n    [\n        ExcelError::VALUE(),\n        'Not a Valid Date', '1-Jun-2008', 98.45,\n    ],\n    [\n        ExcelError::VALUE(),\n        '31-Mar-2008', 'Not a Valid Date', 98.45,\n    ],\n    [\n        ExcelError::VALUE(),\n        '31-Mar-2008', '1-Jun-2008', 'NaN',\n    ],\n    [\n        ExcelError::NAN(),\n        '31-Mar-2008', '1-Jun-2008', -1.25,\n    ],\n    [\n        ExcelError::NAN(),\n        '31-Mar-2000', '1-Jun-2021', 97.25,\n    ],\n    [\n        ExcelError::NAN(),\n        '1-Jun-2008', '31-Mar-2008', 97.25,\n    ],\n    [\n        0.024405125076266018,\n        '1-Feb-2017', '30-Jun-2017', 99,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/USDOLLAR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['$12,345.67890', 12345.6789, 5],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/XIRR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// result, message, values, dates, guess\n\nreturn [\n    'If values and dates contain a different number of values, returns the #NUM! error value' => [\n        '#NUM!',\n        [4000, -46000],\n        ['2015-01-04'],\n        0.1,\n    ],\n    'Cash flows are all negative' => [\n        '#NUM!',\n        [-4000, -46000],\n        ['2015-01-04', '2019-06-27'],\n        0.1,\n    ],\n    'Cash flows are all positive' => [\n        '#NUM!',\n        [4000, 46000],\n        ['2015-01-04', '2019-06-27'],\n        0.1,\n    ],\n    'If any number in dates is not a valid date, returns the #VALUE! error value' => [\n        '#VALUE!',\n        [4000, -46000],\n        ['2015-01-04', '2019X06-27'],\n        0.1,\n    ],\n    'If any entry in values is not numeric, returns the #VALUE! error value' => [\n        '#VALUE!',\n        ['y', -46000],\n        ['2015-01-04', '2019-06-27'],\n        0.1,\n    ],\n    'If values is not an array, returns the #NUM! error value' => [\n        '#NUM!',\n        -46000,\n        ['2015-01-04', '2019-06-27'],\n        0.1,\n    ],\n    'If dates is not an array but values is, returns the #NUM! error value' => [\n        '#NUM!',\n        [4000, -46000],\n        '2015-01-04',\n        0.1,\n    ],\n    'If neither dates nor values is an array, returns the #N/A error value' => [\n        '#N/A',\n        4000,\n        '2015-01-04',\n        0.1,\n    ],\n    'Return VALUE error if guess is non-numeric' => [\n        '#VALUE!',\n        [1893.67, 139947.43, 52573.25, 48849.74, 26369.16, -273029.18],\n        ['2019-06-27', '2019-06-20', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'],\n        'XYZ',\n    ],\n    'Dates can be in any order after all' => [\n        0.137963527441025,\n        [1893.67, 139947.43, 52573.25, 48849.74, 26369.16, -273029.18],\n        ['2019-06-27', '2019-06-20', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'],\n        0.1,\n    ],\n    'XIRR calculation #0 is incorrect' => [\n        0.77868869226873,\n        [4000, -46000],\n        ['2015-04-01', '2019-06-27'],\n        0.1,\n    ],\n    'issue 689' => [\n        -0.6118824173,\n        [-1000000.706, 947003.58],\n        ['2018-09-05', '2018-09-26'],\n    ],\n    'issue 689 updated 2022-12-25' => [\n        -0.935842486,\n        [-20972.36, 20350.545],\n        ['2022-12-12', '2022-12-16'],\n    ],\n    'XIRR calculation #1 is incorrect' => [\n        0.137963527441025,\n        [139947.43, 1893.67, 52573.25, 48849.74, 26369.16, -273029.18],\n        ['2019-06-20', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'],\n        0.1,\n    ],\n    'XIRR calculation #2 is incorrect' => [\n        0.09999999,\n        [100.0, -110.0],\n        ['2019-06-12', '2020-06-11'],\n        0.1,\n    ],\n    'XIRR calculation #3 is incorrect' => [\n        3235.159644,\n        [1.0, 1893.67, 52573.25, 48849.74, 26369.16, -273029.18],\n        ['2019-06-27', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'],\n    ],\n    'XIRR calculation #4 is incorrect' => [\n        0.15467888,\n        [1893.67, 139947.43, 52573.25, 48849.74, 26369.16, -273029.18],\n        ['2019-06-20', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'],\n    ],\n    'XIRR calculation #5 is incorrect' => [\n        -0.197387315,\n        [-100, 20, 40, 25],\n        ['2010-01-01', '2010-04-01', '2010-10-01', '2011-02-01'],\n    ],\n    'XIRR calculation #6 is incorrect' => [\n        3.434984565,\n        [-10000, 2750, 4250, 3250, 2750, 46000],\n        ['2008-01-01', '2008-03-01', '2008-10-30', '2009-02-15', '2009-04-01', '2009-06-01'],\n    ],\n    'Substitute for guess=0' => [\n        0.13796353,\n        [139947.43, 1893.67, 52573.25, 48849.74, 26369.16, -273029.18],\n        ['2019-06-20', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'],\n        0.00000,\n    ],\n    'Substitute when guess is empty cell' => [\n        0.13796353,\n        [139947.43, 1893.67, 52573.25, 48849.74, 26369.16, -273029.18],\n        ['2019-06-20', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'],\n        'C1',\n    ],\n    'Can\\'t find a result2 that works after FINANCIAL_MAX_ITERATIONS tries, the #NUM! error value is returned' => [\n        '#NUM!',\n        [-10000, 10000, -10000, 5],\n        ['2010-01-15', '2010-04-16', '2010-07-16', '2010-10-15'],\n    ],\n    'See issue #2469 - non-convergence with initial guess' => [\n        -0.642307613,\n        [55600, -51094.83],\n        ['2021-11-24', '2021-12-24'],\n    ],\n    'See issue #2469 - non-convergence with initial guess equal to correct answer' => [\n        -0.642307613,\n        [55600, -51094.83],\n        ['2021-11-24', '2021-12-24'],\n        -0.642307613,\n    ],\n    'Only one argument should cause exception' => [\n        'exception',\n        ['2021-11-24', '2021-12-24'],\n    ],\n    'No argument should cause exception' => [\n        'exception',\n    ],\n    'DeCampo One year no growth' => [\n        0,\n        [-1000, 1000],\n        ['2010-01-01', '2011-01-01'],\n    ],\n    'DeCampo One year growth' => [\n        0.1,\n        [-1000, 1100],\n        ['2010-01-01', '2011-01-01'],\n    ],\n    'DeCampo One year decline' => [\n        -0.1,\n        [-1000, 900],\n        ['2010-01-01', '2011-01-01'],\n    ],\n    'DeCampo vs spreadsheet' => [\n        0.1212676,\n        [-1000, -1000, -1000, -1000, 4300],\n        ['2010-01-01', '2010-04-01', '2010-07-01', '2010-10-01', '2011-01-01'],\n    ],\n    'DeCampo vs spreadsheet reordered' => [\n        0.1212676,\n        [-1000, 4300, -1000, -1000, -1000],\n        ['2010-10-01', '2011-01-01', '2010-07-01', '2010-01-01', '2010-04-01'],\n    ],\n    'DeCampo Over 100% growth' => [\n        2.0,\n        [-1000, 3000],\n        ['2010-01-01', '2011-01-01'],\n    ],\n    'DeCampo Total loss one year, agree with Excel not DeCampo' => [\n        '#NUM!', // -1.0, DeCampo accounts for this case, Excel doesn't\n        [-1000, 0],\n        ['2010-01-01', '2011-01-01'],\n    ],\n    'DeCampo Total loss two years, agree with Excel not DeCampo' => [\n        '#NUM!', // -1.0, DeCampo accounts for this case, Excel doesn't\n        [-1000, 0],\n        ['2010-01-01', '2012-01-01'],\n    ],\n    'DeCampo Readme example' => [\n        0.2504234710540838,\n        [-1000, -2500, -1000, 5050],\n        ['2016-01-15', '2016-02-08', '2016-04-17', '2016-08-24'],\n    ],\n    'DeCampo from nodejs' => [\n        0.2126861,\n        [-10000, 3027.25, 630.68, 2018.2, 1513.62, 1765.89, 4036.33, 4036.33, 1513.62, 1513.62, 2018.16, 1513.62, 1009.08, 1513.62, 1513.62, 1765.89, 1765.89, 22421.55],\n        ['2000-05-24', '2000-06-05', '2001-04-09', '2004-02-24', '2005-03-18', '2006-02-15', '2007-01-10', '2007-11-14', '2008-12-17', '2010-01-15', '2011-01-14', '2012-02-03', '2013-01-18', '2014-01-24', '2015-01-30', '2016-01-22', '2017-01-20', '2017-06-05'],\n    ],\n    'DeCampo issue5a, agree with DeCampo not Excel' => [\n        -0.7640294, // '#NUM!'\n        [-2610, -2589, -5110, -2550, -5086, -2561, -5040, -2552, -2530, 29520],\n        ['2001-06-22', '2001-07-03', '2001-07-05', '2001-07-06', '2001-07-09', '2001-07-10', '2001-07-12', '2001-07-13', '2001-07-16', '2001-07-17'],\n    ],\n    'DeCampo issue5b, agree with DeCampo not Excel' => [\n        -0.8353404, // '#NUM!'\n        [-2610, -2589, -5110, -2550, -5086, -2561, -5040, -2552, -2530, -9840, 38900],\n        ['2001-06-22', '2001-07-03', '2001-07-05', '2001-07-06', '2001-07-09', '2001-07-10', '2001-07-12', '2001-07-13', '2001-07-16', '2001-07-17', '2001-07-18'],\n    ],\n    'Python XIRR test line 20' => [\n        412461.6383,\n        [-100, 1000],\n        ['2019-12-31', '2020-03-05'],\n    ],\n    'Python XIRR test line 21' => [\n        1.223853529e16,\n        [-2236.3994659663, -47.3417585212, -46.52619316339632, 10424.74612565936, -13.077972551952],\n        ['2017-12-16', '2017-12-26', '2017-12-29', '2017-12-31', '2017-12-20'],\n    ],\n    'Python XIRR test line 39, agree with Python not Excel' => [\n        -1, // '#NUM!',\n        [18902, 83600, -5780, -4080, -56780, -2210, -2380, 33975, 23067.98, -1619.57],\n        ['2016-04-06', '2016-05-04', '2016-05-12', '2017-05-08', '2017-07-03', '2018-05-07', '2019-05-06', '2019-10-01', '2020-03-13', '2020-05-07'],\n    ],\n    'Issue 3297, Excel gives wrong answer' => [\n        -.379332733303311, // 2.98023223876953E-09,\n        [-19646.10172, -22288.58964, -1483.5, -12597.54406, -46629.45777, -2472.769, 0, -25616.37076, -30055.68344, 1038.5, -13621.9742, 13629.539, -36736.0694, -944.605609, -49020.77156, 27308.87082, -63912.64722, 8764.136, 3162, -23946.7257, -5428.8, -83899.24172, 58242.82346, -11147.78101, 287092.5749],\n        ['2022-05-02', '2022-05-31', '2022-06-01', '2022-06-26', '2022-06-30', '2022-07-01', '2022-07-15', '2022-07-31', '2022-09-02', '2022-09-05', '2022-09-27', '2022-09-28', '2022-09-29', '2022-10-03', '2022-10-06', '2022-10-10', '2022-11-01', '2022-11-03', '2022-11-04', '2022-12-01', '2022-12-02', '2022-12-28', '2022-12-30', '2023-01-02', '2023-01-13'],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/XNPV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// result, message, rate, values, dates\n\nreturn [\n    'If rate is not numeric, returns the #VALUE! error value' => [\n        '#VALUE!',\n        'xyz',\n        [0, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000],\n        ['2018-06-30', '2018-12-31', '2019-12-31', '2020-12-31', '2021-12-31', '2022-12-31', '2023-12-31', '2024-12-31', '2025-12-31', '2026-12-31', '2027-12-31'],\n    ],\n    'Okay to specify values and dates as non-array' => [\n        1000.0,\n        0.10,\n        1000.0,\n        '2018-06-30',\n    ],\n    'If different number of elements in values and dates, return NUM' => [\n        '#NUM!',\n        0.10,\n        [1000.0, 1000.1],\n        '2018-06-30',\n    ],\n    'If minimum value > 0, return NUM' => [\n        '#NUM!',\n        0.10,\n        [1000.0, 1000.1],\n        ['2018-06-30', '2018-07-30'],\n    ],\n    'If maximum value < 0, return NUM' => [\n        '#NUM!',\n        0.10,\n        [-1000.0, -1000.1],\n        ['2018-06-30', '2018-07-30'],\n    ],\n    'If any value is non-numeric, return VALUE' => [\n        '#VALUE!',\n        0.10,\n        [-1000.0, 1000.1, 'x'],\n        ['2018-06-30', '2018-07-30', '2018-08-30'],\n    ],\n    'If first date is non-numeric, return VALUE' => [\n        '#VALUE!',\n        0.10,\n        [-1000.0, 1000.1, 1000.2],\n        ['2018-06x30', '2018-07-30', '2018-08-30'],\n    ],\n    'If any other date is non-numeric, return VALUE' => [\n        '#VALUE!',\n        0.10,\n        [-1000.0, 1000.1, 1000.2],\n        ['2018-06-30', '2018-07-30', '2018-08z30'],\n    ],\n    'If any date is before first date, return NUM' => [\n        '#NUM!',\n        0.10,\n        [-1000.0, 1000.1, 1000.2],\n        ['2018-06-30', '2018-07-30', '2018-05-30'],\n    ],\n    'XNPV calculation #1 is incorrect' => [\n        772830.734,\n        0.10,\n        [0, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000],\n        ['2018-06-30', '2018-12-31', '2019-12-31', '2020-12-31', '2021-12-31', '2022-12-31', '2023-12-31', '2024-12-31', '2025-12-31', '2026-12-31', '2027-12-31'],\n    ],\n    'Gnumeric gets this right, Excel returns #NUM, Libre now gets it right' => [\n        22.257507852701,\n        -0.10,\n        [-100.0, 110.0],\n        ['2019-12-31', '2020-12-31'],\n    ],\n    'Issue 3297 another case where Excel goes wrong' => [\n        0,\n        -0.6118824173,\n        [-1000000.706, 947003.58],\n        ['2018-09-05', '2018-09-26'],\n    ],\n    'Issue 3297 using correct XIRR calculation' => [\n        0,\n        -.379332733303311,\n        [-19646.10172, -22288.58964, -1483.5, -12597.54406, -46629.45777, -2472.769, 0, -25616.37076, -30055.68344, 1038.5, -13621.9742, 13629.539, -36736.0694, -944.605609, -49020.77156, 27308.87082, -63912.64722, 8764.136, 3162, -23946.7257, -5428.8, -83899.24172, 58242.82346, -11147.78101, 287092.5749],\n        ['2022-05-02', '2022-05-31', '2022-06-01', '2022-06-26', '2022-06-30', '2022-07-01', '2022-07-15', '2022-07-31', '2022-09-02', '2022-09-05', '2022-09-27', '2022-09-28', '2022-09-29', '2022-10-03', '2022-10-06', '2022-10-10', '2022-11-01', '2022-11-03', '2022-11-04', '2022-12-01', '2022-12-02', '2022-12-28', '2022-12-30', '2023-01-02', '2023-01-13'],\n    ],\n    'Issue 3297 using incorrect Excel XIRR calculation' => [\n        -50210.188872963656,\n        2.98023223876953E-09,\n        [-19646.10172, -22288.58964, -1483.5, -12597.54406, -46629.45777, -2472.769, 0, -25616.37076, -30055.68344, 1038.5, -13621.9742, 13629.539, -36736.0694, -944.605609, -49020.77156, 27308.87082, -63912.64722, 8764.136, 3162, -23946.7257, -5428.8, -83899.24172, 58242.82346, -11147.78101, 287092.5749],\n        ['2022-05-02', '2022-05-31', '2022-06-01', '2022-06-26', '2022-06-30', '2022-07-01', '2022-07-15', '2022-07-31', '2022-09-02', '2022-09-05', '2022-09-27', '2022-09-28', '2022-09-29', '2022-10-03', '2022-10-06', '2022-10-10', '2022-11-01', '2022-11-03', '2022-11-04', '2022-12-01', '2022-12-02', '2022-12-28', '2022-12-30', '2023-01-02', '2023-01-13'],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/YIELDDISC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.05282257198685834,\n        '16-Feb-2008', '1-Mar-2008', 99.795, 100, 2,\n    ],\n    [\n        0.06220123250590336,\n        '1-Jan-2017', '30-Jun-2017', 97, 100,\n    ],\n    [\n        0.06220123250590336,\n        '1-Jan-2017', '30-Jun-2017', 97, 100, 0,\n    ],\n    [\n        0.06220123250590336,\n        '1-Jan-2017', '30-Jun-2017', 97, 100, null,\n    ],\n    [\n        '#VALUE!',\n        'Invalid', '30-Jun-2017', 97, 100,\n    ],\n    [\n        '#VALUE!',\n        '1-Jan-2017', 'Invalid', 97, 100,\n    ],\n    [\n        '#VALUE!',\n        '1-Jan-2017', '30-Jun-2017', 'NaN', 100,\n    ],\n    [\n        '#VALUE!',\n        '1-Jan-2017', '30-Jun-2017', 97, 'NaN',\n    ],\n    [\n        '#NUM!',\n        '1-Jan-2017', '30-Jun-2017', -97, 100,\n    ],\n    [\n        '#NUM!',\n        '1-Jan-2017', '30-Jun-2017', 97, -100,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Financial/YIELDMAT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.06095433369153867,\n        '15-Mar-2008', '3-Nov-2008', '8-Nov-2007', 0.0625, 100.0123, 0,\n    ],\n    [\n        0.06095433369153867,\n        '15-Mar-2008', '3-Nov-2008', '8-Nov-2007', 0.0625, 100.0123, null,\n    ],\n    [\n        0.04210977320221025,\n        '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', 0.055, 101,\n    ],\n    [\n        '#VALUE!',\n        'Invalid', '30-Jun-2018', '01-Jul-2014', 0.055, 101,\n    ],\n    [\n        '#VALUE!',\n        '1-Jan-2017', 'Invalid', '01-Jul-2014', 0.055, 101,\n    ],\n    [\n        '#VALUE!',\n        '1-Jan-2017', '30-Jun-2018', 'Invalid', 0.055, 101,\n    ],\n    [\n        '#VALUE!',\n        '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', 'NaN', 101,\n    ],\n    [\n        '#VALUE!',\n        '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', 0.055, 'NaN',\n    ],\n    [\n        '#NUM!',\n        '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', -0.055, 101,\n    ],\n    [\n        '#NUM!',\n        '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', 0.055, -101,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Functions/IF_CONDITION.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '<\"A\"',\n        '<A',\n    ],\n    [\n        '>\"A\"',\n        '>A',\n    ],\n    [\n        '<=\"A\"',\n        '<=A',\n    ],\n    [\n        '>\"A\"',\n        '>A',\n    ],\n    [\n        '>=\"A\"',\n        '>=A',\n    ],\n    [\n        '<>\"A\"',\n        '<>A',\n    ],\n    [\n        '<\"<A\"',\n        '<<A',\n    ],\n    [\n        '=\"A\"',\n        '=A',\n    ],\n    [\n        '=\"\"\"A\"\"\"',\n        '=\"A\"',\n    ],\n    [\n        '=\"\"\"A\"\"B\"\"\"',\n        '=\"A\"B\"',\n    ],\n    [\n        '<>\"< PLEASE SELECT >\"',\n        '<>< Please Select >',\n    ],\n    [\n        '<>\"\"',\n        '<>',\n    ],\n    [\n        '=\"\"',\n        '\"\"',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/FunctionsAsString.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    // Note that these are meant to test the parser, not a comprehensive\n    // test of all Excel functions, which tests are handled elsewhere.\n    [6, '=SUM(1,2,3)'],\n    [60, '=SUM(A1:A3)'],\n    [70, '=SUM(A1,A2,A4)'],\n    [41, '=SUM(1,namedCell)'],\n    [50, '=A1+namedCell'],\n    [3, '=MATCH(6,{4,5,6,2},0)'],\n    ['#N/A', '=MATCH(8,{4,5,6,2},0)'],\n    [7, '=HLOOKUP(5,{1,5,10;2,6,11;3,7,12;4,8,13},3,FALSE)'],\n    ['Hello, World.', '=CONCATENATE(\"Hello, \", \"World.\")'],\n    ['{NON-EMPTY SET}', '=UPPER(\"{non-EMPTY set}\")'], // braces not used for matrix\n    ['upper', '=LOWER(B1)'],\n    [false, '=and(B2,B3)'],\n    [0, '=acos(1)'],\n    [0.785398, '=round(atan({1,2,3}),6)'], // {1,2,3} will be flattened to 1\n    [2, '=minverse({-2.5,1.5;2,-1})'], // 2 is the flattened result of {2,3;4,5}\n    [4, '=MDETERM(MMULT({1,2;3,4},{5,6;7,8}))'], // multiple matrices\n    [110, '=SUM(A1,Sheet2!$A$1)'], // different sheet absolute address\n    [220, '=SUM(A2,A2B)'], // defined name on different sheet\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/ERROR_TYPE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#N/A',\n        null,\n    ],\n    [\n        '#N/A',\n        -1,\n    ],\n    [\n        '#N/A',\n        1.25,\n    ],\n    [\n        '#N/A',\n        '',\n    ],\n    [\n        '#N/A',\n        '2.5',\n    ],\n    [\n        '#N/A',\n        true,\n    ],\n    [\n        1,\n        '#NULL!',\n    ],\n    [\n        2,\n        '#DIV/0!',\n    ],\n    [\n        3,\n        '#VALUE!',\n    ],\n    [\n        4,\n        '#REF!',\n    ],\n    [\n        5,\n        '#NAME?',\n    ],\n    [\n        6,\n        '#NUM!',\n    ],\n    [\n        7,\n        '#N/A',\n    ],\n    [\n        9,\n        '#SPILL!',\n    ],\n    [\n        14,\n        '#CALC!',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/INFO.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '/',\n        'directory',\n    ],\n    [\n        1,\n        'numfile',\n    ],\n    [\n        '$A:$A$1',\n        'origin',\n    ],\n    [\n        'PHP ' . PHP_VERSION,\n        'osversion',\n    ],\n    [\n        'Automatic',\n        'recalc',\n    ],\n    [\n        'Automatic',\n        'RECALC',\n    ],\n    [\n        PHP_VERSION,\n        'release',\n    ],\n    [\n        'PHP',\n        'system',\n    ],\n    [\n        '#N/A',\n        'memavail',\n    ],\n    [\n        '#N/A',\n        'memused',\n    ],\n    [\n        '#N/A',\n        'totmem',\n    ],\n    [\n        '#VALUE!',\n        '1',\n    ],\n    [\n        '#VALUE!',\n        'A',\n    ],\n    [\n        '#VALUE!',\n        '#VALUE!',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_BLANK.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        true,\n        null,\n    ],\n    [\n        false,\n        -1,\n    ],\n    [\n        false,\n        0,\n    ],\n    [\n        false,\n        9,\n    ],\n    [\n        false,\n        1.5,\n    ],\n    [\n        false,\n        '',\n    ],\n    [\n        false,\n        '-1',\n    ],\n    [\n        false,\n        '2',\n    ],\n    [\n        false,\n        '-1.5',\n    ],\n    [\n        false,\n        'ABC',\n    ],\n    [\n        false,\n        '#VALUE!',\n    ],\n    [\n        false,\n        '#N/A',\n    ],\n    [\n        false,\n        'TRUE',\n    ],\n    [\n        false,\n        true,\n    ],\n    [\n        false,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_ERR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        false,\n        null,\n    ],\n    [\n        false,\n        -1,\n    ],\n    [\n        false,\n        0,\n    ],\n    [\n        false,\n        9,\n    ],\n    [\n        false,\n        1.5,\n    ],\n    [\n        false,\n        '',\n    ],\n    [\n        false,\n        '-1',\n    ],\n    [\n        false,\n        '2',\n    ],\n    [\n        false,\n        '-1.5',\n    ],\n    [\n        false,\n        'ABC',\n    ],\n    [\n        true,\n        '#VALUE!',\n    ],\n    [\n        false,\n        '#N/A',\n    ],\n    [\n        false,\n        'TRUE',\n    ],\n    [\n        false,\n        true,\n    ],\n    [\n        false,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_ERROR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        false,\n        null,\n    ],\n    [\n        false,\n        -1,\n    ],\n    [\n        false,\n        0,\n    ],\n    [\n        false,\n        9,\n    ],\n    [\n        false,\n        1.5,\n    ],\n    [\n        false,\n        '',\n    ],\n    [\n        false,\n        '-1',\n    ],\n    [\n        false,\n        '2',\n    ],\n    [\n        false,\n        '-1.5',\n    ],\n    [\n        false,\n        'ABC',\n    ],\n    [\n        true,\n        '#VALUE!',\n    ],\n    [\n        true,\n        '#N/A',\n    ],\n    [\n        true,\n        '#SPILL!',\n    ],\n    [\n        true,\n        '#CALC!',\n    ],\n    [\n        false,\n        'TRUE',\n    ],\n    [\n        false,\n        true,\n    ],\n    [\n        false,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_EVEN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#NAME?',\n        null,\n    ],\n    [\n        false,\n        -1,\n    ],\n    [\n        true,\n        0,\n    ],\n    [\n        false,\n        9,\n    ],\n    [\n        false,\n        1.25,\n    ],\n    [\n        false,\n        1.5,\n    ],\n    [\n        true,\n        2.25,\n    ],\n    [\n        true,\n        2.5,\n    ],\n    [\n        '#VALUE!',\n        '',\n    ],\n    [\n        false,\n        '-1',\n    ],\n    [\n        true,\n        '2',\n    ],\n    [\n        false,\n        '-1.5',\n    ],\n    [\n        true,\n        '2.5',\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n    [\n        '#VALUE!',\n        '#VALUE!',\n    ],\n    [\n        '#VALUE!',\n        '#N/A',\n    ],\n    [\n        '#VALUE!',\n        'TRUE',\n    ],\n    [\n        '#VALUE!',\n        true,\n    ],\n    [\n        '#VALUE!',\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_LOGICAL.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        false,\n        null,\n    ],\n    [\n        false,\n        -1,\n    ],\n    [\n        false,\n        0,\n    ],\n    [\n        false,\n        9,\n    ],\n    [\n        false,\n        1.5,\n    ],\n    [\n        false,\n        '',\n    ],\n    [\n        false,\n        '-1',\n    ],\n    [\n        false,\n        '2',\n    ],\n    [\n        false,\n        '-1.5',\n    ],\n    [\n        false,\n        'ABC',\n    ],\n    [\n        false,\n        '#VALUE!',\n    ],\n    [\n        false,\n        '#N/A',\n    ],\n    [\n        false,\n        'TRUE',\n    ],\n    [\n        true,\n        true,\n    ],\n    [\n        true,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_NA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        false,\n        null,\n    ],\n    [\n        false,\n        -1,\n    ],\n    [\n        false,\n        0,\n    ],\n    [\n        false,\n        9,\n    ],\n    [\n        false,\n        1.5,\n    ],\n    [\n        false,\n        '',\n    ],\n    [\n        false,\n        '-1',\n    ],\n    [\n        false,\n        '2',\n    ],\n    [\n        false,\n        '-1.5',\n    ],\n    [\n        false,\n        'ABC',\n    ],\n    [\n        false,\n        '#VALUE!',\n    ],\n    [\n        true,\n        '#N/A',\n    ],\n    [\n        false,\n        'TRUE',\n    ],\n    [\n        false,\n        true,\n    ],\n    [\n        false,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_NONTEXT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        true,\n        null,\n    ],\n    [\n        true,\n        -1,\n    ],\n    [\n        true,\n        0,\n    ],\n    [\n        true,\n        9,\n    ],\n    [\n        true,\n        1.5,\n    ],\n    [\n        false,\n        '',\n    ],\n    [\n        false,\n        '-1',\n    ],\n    [\n        false,\n        '2',\n    ],\n    [\n        false,\n        '-1.5',\n    ],\n    [\n        false,\n        'ABC',\n    ],\n    [\n        true,\n        '#VALUE!',\n    ],\n    [\n        true,\n        '#N/A',\n    ],\n    [\n        false,\n        'TRUE',\n    ],\n    [\n        true,\n        true,\n    ],\n    [\n        true,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_NUMBER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        false,\n        null,\n    ],\n    [\n        true,\n        -1,\n    ],\n    [\n        true,\n        0,\n    ],\n    [\n        true,\n        9,\n    ],\n    [\n        true,\n        1.5,\n    ],\n    [\n        false,\n        '',\n    ],\n    [\n        false,\n        '-1',\n    ],\n    [\n        false,\n        '2',\n    ],\n    [\n        false,\n        '-1.5',\n    ],\n    [\n        false,\n        'ABC',\n    ],\n    [\n        false,\n        '#VALUE!',\n    ],\n    [\n        false,\n        '#N/A',\n    ],\n    [\n        false,\n        'TRUE',\n    ],\n    [\n        false,\n        true,\n    ],\n    [\n        false,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_ODD.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#NAME?',\n        null,\n    ],\n    [\n        true,\n        -1,\n    ],\n    [\n        false,\n        0,\n    ],\n    [\n        true,\n        9,\n    ],\n    [\n        true,\n        1.25,\n    ],\n    [\n        true,\n        1.5,\n    ],\n    [\n        false,\n        2.25,\n    ],\n    [\n        false,\n        2.5,\n    ],\n    [\n        '#VALUE!',\n        '',\n    ],\n    [\n        true,\n        '-1',\n    ],\n    [\n        false,\n        '2',\n    ],\n    [\n        true,\n        '-1.5',\n    ],\n    [\n        false,\n        '2.5',\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n    [\n        '#VALUE!',\n        '#VALUE!',\n    ],\n    [\n        '#VALUE!',\n        '#N/A',\n    ],\n    [\n        '#VALUE!',\n        'TRUE',\n    ],\n    [\n        '#VALUE!',\n        true,\n    ],\n    [\n        '#VALUE!',\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/IS_TEXT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        false,\n        null,\n    ],\n    [\n        false,\n        -1,\n    ],\n    [\n        false,\n        0,\n    ],\n    [\n        false,\n        9,\n    ],\n    [\n        false,\n        1.5,\n    ],\n    [\n        true,\n        '',\n    ],\n    [\n        true,\n        '-1',\n    ],\n    [\n        true,\n        '2',\n    ],\n    [\n        true,\n        '-1.5',\n    ],\n    [\n        true,\n        'ABC',\n    ],\n    [\n        false,\n        '#VALUE!',\n    ],\n    [\n        false,\n        '#N/A',\n    ],\n    [\n        true,\n        'TRUE',\n    ],\n    [\n        false,\n        true,\n    ],\n    [\n        false,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/N.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0,\n        null,\n    ],\n    [\n        -1,\n        -1,\n    ],\n    [\n        1.25,\n        1.25,\n    ],\n    [\n        0,\n        '',\n    ],\n    [\n        0,\n        '2.5',\n    ],\n    [\n        0,\n        'TRUE',\n    ],\n    [\n        0,\n        'ABCDE',\n    ],\n    [\n        1,\n        true,\n    ],\n    [\n        '#DIV/0!',\n        '#DIV/0!',\n    ],\n    [\n        '#NUM!',\n        '#NUM!',\n    ],\n    [\n        0,\n        [\n            null,\n        ],\n    ],\n    [\n        123,\n        [\n            123,\n        ],\n    ],\n    [\n        123,\n        [\n            [\n                123,\n                456,\n            ],\n        ],\n    ],\n    [\n        123,\n        [\n            [\n                123,\n                'A',\n            ],\n        ],\n    ],\n    [\n        0,\n        [\n            [\n                'A',\n                123,\n            ],\n        ],\n    ],\n    [\n        0,\n        [\n            [\n                'A',\n                123,\n            ],\n            [\n                456,\n                789,\n            ],\n        ],\n    ],\n    [\n        123,\n        [\n            [\n                123,\n                'A',\n            ],\n            [\n                456,\n                789,\n            ],\n        ],\n    ],\n    [\n        123,\n        [\n            [\n                123,\n                456,\n            ],\n            [\n                'A',\n                789,\n            ],\n        ],\n    ],\n    [\n        123,\n        [\n            [\n                123,\n                456,\n            ],\n            [\n                789,\n                'A',\n            ],\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Information/TYPE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1,\n        null,\n    ],\n    [\n        1,\n        -1,\n    ],\n    [\n        1,\n        1.25,\n    ],\n    [\n        2,\n        '',\n    ],\n    [\n        2,\n        '2.5',\n    ],\n    [\n        2,\n        'TRUE',\n    ],\n    [\n        2,\n        'ABCDE',\n    ],\n    [\n        4,\n        true,\n    ],\n    [\n        16,\n        '#DIV/0!',\n    ],\n    [\n        16,\n        '#NUM!',\n    ],\n    [\n        1,\n        [\n            null,\n        ],\n    ],\n    [\n        1,\n        [\n            1,\n        ],\n    ],\n    [\n        64,\n        [\n            1,\n            2,\n            3,\n        ],\n    ],\n    [\n        64,\n        [\n            [\n                1,\n                2,\n                3,\n            ],\n            [\n                4,\n                5,\n                6,\n            ],\n            [\n                7,\n                8,\n                9,\n            ],\n        ],\n    ],\n    [\n        64,\n        [\n            [\n                null,\n                null,\n            ],\n            [\n                null,\n                null,\n            ],\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/AND.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no arguments' => [\n        'exception',\n    ],\n    'only argument is null reference' => [\n        '#VALUE!',\n        null,\n    ],\n    // Boolean TRUE and NULL\n    [\n        true,\n        true,\n        null,\n    ],\n    // Boolean FALSE and NULL\n    [\n        false,\n        false,\n        null,\n    ],\n    // Both TRUE Booleans\n    [\n        true,\n        true,\n        true,\n    ],\n    // Mixed Booleans\n    [\n        false,\n        true,\n        false,\n    ],\n    // Mixed Booleans\n    [\n        false,\n        false,\n        true,\n    ],\n    // Both FALSE Booleans\n    [\n        false,\n        false,\n        false,\n    ],\n    // Multiple Mixed Booleans\n    [\n        false,\n        true,\n        true,\n        false,\n    ],\n    // Multiple TRUE Booleans\n    [\n        true,\n        true,\n        true,\n        true,\n    ],\n    // Multiple FALSE Booleans\n    [\n        false,\n        false,\n        false,\n        false,\n        false,\n    ],\n    [\n        true,\n        -1,\n        -2,\n    ],\n    [\n        false,\n        0,\n        0,\n    ],\n    [\n        false,\n        0,\n        1,\n    ],\n    [\n        true,\n        1,\n        1,\n    ],\n    'string 1 is ignored' => [\n        true,\n        '1',\n        1,\n    ],\n    'true string is ignored' => [\n        true,\n        'TRUE',\n        1,\n    ],\n    'false string is ignored' => [\n        true,\n        'FALSE',\n        true,\n    ],\n    'non-boolean string is ignored' => [\n        false,\n        'ABCD',\n        0,\n    ],\n    [\n        true,\n        -2,\n        1,\n    ],\n    [\n        false,\n        -2,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/ANDLiteral.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'both boolean true' => [true, 'true, true'],\n    'boolean and string-true' => [true, 'true, \"true\"'],\n    'true and non-boolean-string' => [true, 'true, \"xyz\"'],\n    'non-boolean-string and true' => [true, '\"xyz\", true'],\n    'empty-string and true' => [true, '\"\", true'],\n    'non-boolean-string and false' => [false, 'false, \"xyz\"'],\n    'false and non-boolean-string' => [false, '\"xyz\", false'],\n    'only non-boolean-string' => ['#VALUE!', '\"xyz\"'],\n    'only boolean-string' => [true, '\"true\"'],\n    'numeric-true and true' => [true, '3.1, true, true'],\n    'numeric-false and true' => [false, '0, true, true'],\n    'mixed boolean' => [false, 'true, true, true, false'],\n    'only true' => [true, 'true'],\n    'only false' => [false, 0.0],\n    'boolean in array' => [true, '{true}'],\n    'boolean-string in array' => ['#VALUE!', '{\"true\"}'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/IF.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no arguments' => [\n        'exception',\n    ],\n    '1 argument true' => [\n        'exception',\n        true,\n    ],\n    '1 argument false' => [\n        'exception',\n        false,\n    ],\n    'value_if_false omitted condtion is true' => [\n        'ABC',\n        true,\n        'ABC',\n    ],\n    'value_if_false omitted condition is false' => [\n        false,\n        false,\n        'ABC',\n    ],\n    'value_if_true omitted condition is true' => [0, true, null, 'error'],\n    'value_if_true omitted condition is false' => ['error', false, null, 'error'],\n    [\n        'ABC',\n        true,\n        'ABC',\n        'XYZ',\n    ],\n    [\n        'XYZ',\n        false,\n        'ABC',\n        'XYZ',\n    ],\n    [\n        '#N/A',\n        '#N/A',\n        'ABC',\n        'XYZ',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/IFERROR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'empty cell treated as 0' => [\n        0,\n        null,\n        'Error',\n    ],\n    [\n        true,\n        true,\n        'Error',\n    ],\n    [\n        42,\n        42,\n        'Error',\n    ],\n    [\n        '',\n        '',\n        'Error',\n    ],\n    [\n        'ABC',\n        'ABC',\n        'Error',\n    ],\n    [\n        'Error',\n        '#VALUE!',\n        'Error',\n    ],\n    [\n        'Error',\n        '#NAME?',\n        'Error',\n    ],\n    [\n        'Error',\n        '#N/A',\n        'Error',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/IFNA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        55,\n        55, 'not found',\n    ],\n    [\n        'not found',\n        '#N/A', 'not found',\n    ],\n    'non-NA error' => ['#VALUE!', '#VALUE!', 'not found'],\n    'empty cell treated as 0' => [0, null, 'Error'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/IFS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no arguments' => ['exception'],\n    [\n        1,\n        true,\n        1,\n    ],\n    [\n        '#N/A',\n        false,\n        1,\n        true,\n    ],\n    [\n        'ABC',\n        true,\n        'ABC',\n    ],\n    [\n        '#N/A',\n        false,\n        false,\n        false,\n        1,\n        false,\n        'ABC',\n    ],\n    [\n        'ABC',\n        false,\n        false,\n        false,\n        1,\n        true,\n        'ABC',\n    ],\n    [\n        false,\n        true,\n        false,\n        false,\n        1,\n        true,\n        'ABC',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/NOT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no arguments' => [\n        'exception',\n    ],\n    [\n        true,\n        null,\n    ],\n    [\n        false,\n        -1,\n    ],\n    [\n        true,\n        0,\n    ],\n    [\n        false,\n        1,\n    ],\n    [\n        false,\n        2,\n    ],\n    [\n        false,\n        -1.5,\n    ],\n    [\n        false,\n        1.5,\n    ],\n    [\n        '#VALUE!',\n        '-1',\n    ],\n    [\n        '#VALUE!',\n        '0',\n    ],\n    [\n        '#VALUE!',\n        '1',\n    ],\n    [\n        '#VALUE!',\n        '2',\n    ],\n    [\n        '#VALUE!',\n        '-1.5',\n    ],\n    [\n        '#VALUE!',\n        '1.5',\n    ],\n    [\n        '#VALUE!',\n        '',\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n    [\n        true,\n        'FALSE',\n    ],\n    [\n        false,\n        'TRUE',\n    ],\n    [\n        false,\n        true,\n    ],\n    [\n        true,\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/OR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no arguments' => [\n        'exception',\n    ],\n    'only argument is null reference' => [\n        '#VALUE!',\n        null,\n    ],\n    // Boolean TRUE and NULL\n    [\n        true,\n        true,\n        null,\n    ],\n    // Boolean FALSE and NULL\n    [\n        false,\n        false,\n        null,\n    ],\n    // Both TRUE Booleans\n    [\n        true,\n        true,\n        true,\n    ],\n    // Mixed Booleans\n    [\n        true,\n        true,\n        false,\n    ],\n    // Mixed Booleans\n    [\n        true,\n        false,\n        true,\n    ],\n    // Both FALSE Booleans\n    [\n        false,\n        false,\n        false,\n    ],\n    // Multiple Mixed Booleans\n    [\n        true,\n        true,\n        true,\n        false,\n    ],\n    // Multiple TRUE Booleans\n    [\n        true,\n        true,\n        true,\n        true,\n    ],\n    // Multiple FALSE Booleans\n    [\n        false,\n        false,\n        false,\n        false,\n        false,\n    ],\n    [\n        true,\n        -1,\n        -2,\n    ],\n    [\n        false,\n        0,\n        0,\n    ],\n    [\n        true,\n        0,\n        1,\n    ],\n    [\n        true,\n        1,\n        1,\n    ],\n    'string 1 is ignored' => [\n        false,\n        0,\n        '1',\n    ],\n    'true string is ignored' => [\n        true,\n        'TRUE',\n        1,\n    ],\n    'false string is ignored' => [\n        true,\n        'FALSE',\n        true,\n    ],\n    'non-boolean string is ignored' => [\n        true,\n        'ABCD',\n        1,\n    ],\n    [\n        true,\n        -2,\n        1,\n    ],\n    [\n        true,\n        -2,\n        0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/ORLiteral.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'both boolean true' => [true, 'true, true'],\n    'boolean or string-true' => [true, 'true, \"true\"'],\n    'true or non-boolean-string' => [true, 'true, \"xyz\"'],\n    'non-boolean-string or true' => [true, '\"xyz\", true'],\n    'empty-string or true' => [true, '\"\", true'],\n    'non-boolean-string or false' => [false, 'false, \"xyz\"'],\n    'false or non-boolean-string' => [false, '\"xyz\", false'],\n    'only non-boolean-string' => ['#VALUE!', '\"xyz\"'],\n    'only boolean-string' => [true, '\"true\"'],\n    'numeric-true or true' => [true, '3.1, true, true'],\n    'numeric-false or true' => [true, '0, true, true'],\n    'mixed boolean' => [true, 'true, true, true, false'],\n    'only true' => [true, 'true'],\n    'only false' => [false, 0.0],\n    'boolean in array' => [true, '{true}'],\n    'boolean-string in array' => ['#VALUE!', '{\"true\"}'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/SWITCH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'match value1 A result is C' => [\n        'C',\n        'A',\n        'A',\n        'C',\n        'B',\n        'D',\n        '??',\n    ],\n    'match value2 2 result is female' => [\n        'Female',\n        2,\n        '1',\n        'Male',\n        '2',\n        'Female',\n    ],\n    'defined default value' => [\n        'X',\n        'U',\n        'ABC',\n        'Y',\n        'DEF',\n        'Z',\n        'X',\n    ],\n    'undefined default value' => [\n        '#N/A',\n        'U',\n        'ABC',\n        'Y',\n        'DEF',\n        'Z',\n    ],\n    'no arguments' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/XOR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no arguments' => [\n        'exception',\n    ],\n    'only argument is null reference' => [\n        '#VALUE!',\n        null,\n    ],\n    [\n        false,\n        true, true,\n    ],\n    [\n        true,\n        true, false, false,\n    ],\n    [\n        true,\n        true, false,\n    ],\n    [\n        true,\n        false, true,\n    ],\n    [\n        false,\n        false, false,\n    ],\n    [\n        false,\n        true, true, false, false,\n    ],\n    [\n        true,\n        true, true, true, false,\n    ],\n    'ignore string other two should be true' => [\n        false,\n        'TRUE',\n        1,\n        0.5,\n    ],\n    [\n        true,\n        'FALSE',\n        1.5,\n        0,\n    ],\n    'only arg is string' => [\n        '#VALUE!',\n        'HELLO WORLD',\n    ],\n    'true string is ignored' => [\n        true,\n        'TRUE',\n        1,\n    ],\n    'false string is ignored' => [\n        true,\n        'FALSE',\n        true,\n    ],\n    'string 1 is ignored' => [\n        true,\n        '1',\n        true,\n    ],\n    'non-boolean string is ignored' => [\n        true,\n        'ABCD',\n        1,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Logical/XORLiteral.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'both boolean true' => [false, 'true, true'],\n    'boolean xor string-true' => [false, 'true, \"true\"'],\n    'true xor non-boolean-string' => [true, 'true, \"xyz\"'],\n    'non-boolean-string xor true' => [true, '\"xyz\", true'],\n    'empty-string xor true' => [true, '\"\", true'],\n    'non-boolean-string xor false' => [false, 'false, \"xyz\"'],\n    'false xor non-boolean-string' => [false, '\"xyz\", false'],\n    'only non-boolean-string' => ['#VALUE!', '\"xyz\"'],\n    'only boolean-string' => [true, '\"true\"'],\n    'numeric-true xor true xor true' => [true, '3.1, true, true'],\n    'numeric-false xor true xor true' => [false, '0, true, true'],\n    'mixed boolean' => [true, 'true, true, true, false'],\n    'only true' => [true, 'true'],\n    'only false' => [false, 0.0],\n    'boolean in array' => [true, '{true}'],\n    'boolean-string in array' => ['#VALUE!', '{\"true\"}'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/ADDRESS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '$C$2',\n        2,\n        3,\n    ],\n    [\n        'C$2',\n        2,\n        3,\n        2,\n    ],\n    [\n        '$C2',\n        2,\n        3,\n        3,\n    ],\n    [\n        'R2C[3]',\n        2,\n        3,\n        2,\n        false,\n    ],\n    [\n        'R[2]C3',\n        2,\n        3,\n        3,\n        false,\n    ],\n    [\n        \"'[Book1]Sheet1'!R2C3\",\n        2,\n        3,\n        1,\n        false,\n        '[Book1]Sheet1',\n    ],\n    [\n        \"'EXCEL SHEET'!R2C3\",\n        2,\n        3,\n        null,\n        false,\n        'EXCEL SHEET',\n    ],\n    '0 instead of bool for 4th arg' => [\n        \"'EXCEL SHEET'!R2C3\",\n        2,\n        3,\n        null,\n        0,\n        'EXCEL SHEET',\n    ],\n    '1 instead of bool for 4th arg' => [\n        \"'EXCEL SHEET'!\\$C\\$2\",\n        2,\n        3,\n        null,\n        1,\n        'EXCEL SHEET',\n    ],\n    [\n        \"'EXCEL SHEET'!\\$C\\$2\",\n        2,\n        3,\n        1,\n        null,\n        'EXCEL SHEET',\n    ],\n    [\n        '#VALUE!',\n        -2,\n        -2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/CHOOSE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'brown',\n        4, 'red', 'blue', 'green', 'brown',\n    ],\n    [\n        'blue',\n        2, 'red', 'blue', 'green', 'brown',\n    ],\n    [\n        'green',\n        3, 'red', 'blue', 'green', 'brown',\n    ],\n    [\n        'red',\n        1, 'red', 'blue', 'green', 'brown',\n    ],\n    [\n        '#VALUE!',\n        5, 'red', 'blue', 'green', 'brown',\n    ],\n    [\n        '#VALUE!',\n        0, 'red', 'blue', 'green', 'brown',\n    ],\n    [\n        '#VALUE!',\n        'NaN', 'red', 'blue', 'green', 'brown',\n    ],\n    [\n        ['blue', 'purple'],\n        3, ['red', 'orange'], ['yellow', 'green'], ['blue', 'purple'],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/CHOOSECOLS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'select last column' => [\n        [\n            ['c'],\n            ['f'],\n            ['i'],\n            ['l'],\n            ['o'],\n            ['r'],\n            ['u'],\n            ['x'],\n            ['#'],\n        ],\n        '=CHOOSECOLS(B3:D11, -1)',\n    ],\n    'select 1 column' => [\n        [\n            ['b'],\n            ['e'],\n            ['h'],\n            ['k'],\n            ['n'],\n            ['q'],\n            ['t'],\n            ['w'],\n            ['z'],\n        ],\n        '=CHOOSECOLS(B3:D11, 2)',\n    ],\n    'fractional column' => [\n        [\n            ['b'],\n            ['e'],\n            ['h'],\n            ['k'],\n            ['n'],\n            ['q'],\n            ['t'],\n            ['w'],\n            ['z'],\n        ],\n        '=CHOOSECOLS(B3:D11, 2.8)',\n    ],\n    'numeric string column' => [\n        [\n            ['b'],\n            ['e'],\n            ['h'],\n            ['k'],\n            ['n'],\n            ['q'],\n            ['t'],\n            ['w'],\n            ['z'],\n        ],\n        '=CHOOSECOLS(B3:D11, \" 2.8 \")',\n    ],\n    'multiple columns including duplicates' => [\n        [\n            ['b', 'a', 'b'],\n            ['e', 'd', 'e'],\n            ['h', 'g', 'h'],\n            ['k', 'j', 'k'],\n            ['n', 'm', 'n'],\n            ['q', 'p', 'q'],\n            ['t', 's', 't'],\n            ['w', 'v', 'w'],\n            ['z', 'y', 'z'],\n        ],\n        '=CHOOSECOLS(B3:D11, 2, 1, 2)',\n    ],\n    'multiple columns mixed +/- mixed scalar/matrix' => [\n        [\n            ['b', 'a', 'b'],\n            ['e', 'd', 'e'],\n            ['h', 'g', 'h'],\n            ['k', 'j', 'k'],\n            ['n', 'm', 'n'],\n            ['q', 'p', 'q'],\n            ['t', 's', 't'],\n            ['w', 'v', 'w'],\n            ['z', 'y', 'z'],\n        ],\n        '=CHOOSECOLS(B3:D11, 2, {-3, 2})',\n    ],\n    'reverse Columns' => [\n        [\n            ['c', 'b', 'a'],\n            ['f', 'e', 'd'],\n            ['i', 'h', 'g'],\n            ['l', 'k', 'j'],\n            ['o', 'n', 'm'],\n            ['r', 'q', 'p'],\n            ['u', 't', 's'],\n            ['x', 'w', 'v'],\n            ['#', 'z', 'y'],\n        ],\n        '=CHOOSECOLS(B3:D11, SEQUENCE(COLUMNS(B3:D11),,COLUMNS(B3:D11),-1))',\n    ],\n    'inline array' => [\n        [\n            ['c', 'b'],\n            ['f', 'e'],\n            ['i', 'h'],\n            ['l', 'k'],\n            ['o', 'n'],\n            ['r', 'q'],\n            ['u', 't'],\n            ['x', 'w'],\n            ['#', 'z'],\n        ],\n        '=CHOOSECOLS(B3:D11, {3;2})',\n    ],\n    'inline array with negative numbers' => [\n        [\n            ['b', 'c'],\n            ['e', 'f'],\n            ['h', 'i'],\n            ['k', 'l'],\n            ['n', 'o'],\n            ['q', 'r'],\n            ['t', 'u'],\n            ['w', 'x'],\n            ['z', '#'],\n        ],\n        '=CHOOSECOLS(B3:D11, {-2;-1})',\n    ],\n    'defined name' => [\n        [\n            ['b', 'c'],\n            ['e', 'f'],\n            ['h', 'i'],\n            ['k', 'l'],\n            ['n', 'o'],\n            ['q', 'r'],\n            ['t', 'u'],\n            ['w', 'x'],\n            ['z', '#'],\n        ],\n        '=CHOOSECOLS(definedname, {-2;-1})',\n    ],\n    'only 1 argument' => [\n        'exception',\n        '=CHOOSECOLS(B3:D11)',\n    ],\n    'non-numeric column' => [\n        '#VALUE!',\n        '=CHOOSECOLS(B3:D11, \"x\")',\n    ],\n    'positive column too large' => [\n        '#VALUE!',\n        '=CHOOSECOLS(B3:D11, 4)',\n    ],\n    'negative column too large' => [\n        '#VALUE!',\n        '=CHOOSECOLS(B3:D11, 1, -4)',\n    ],\n    'zero column' => [\n        '#VALUE!',\n        '=CHOOSECOLS(B3:D11, 0)',\n    ],\n    'single cell' => [\n        [\n            ['a'],\n        ],\n        '=CHOOSECOLS(B3, 1)',\n    ],\n    'inline array rather than range' => [\n        [\n            [2, 1, 1],\n            [4, 3, 3],\n            [6, 5, 5],\n        ],\n        '=CHOOSECOLS({1,2;3,4;5,6}, \" 2.4 \", 1, 1)',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/CHOOSEROWS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'select last row' => [\n        [\n            ['y', 'z', '#'],\n        ],\n        '=CHOOSEROWS(B3:D11, -1)',\n    ],\n    'fractional row' => [\n        [\n            ['y', 'z', '#'],\n        ],\n        '=CHOOSEROWS(B3:D11, -1.8)',\n    ],\n    'numeric string row' => [\n        [\n            ['y', 'z', '#'],\n        ],\n        '=CHOOSEROWS(B3:D11, \" -1.8 \")',\n    ],\n    'select 1 row' => [\n        [\n            ['d', 'e', 'f'],\n        ],\n        '=CHOOSEROWS(B3:D11, 2)',\n    ],\n    'multiple rows including duplicates' => [\n        [\n            ['d', 'e', 'f'],\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n        ],\n        '=CHOOSEROWS(B3:D11, 2, 1, 2)',\n    ],\n    'multiple rows mixed +/- mixed scalar/matrix' => [\n        [\n            ['d', 'e', 'f'],\n            ['s', 't', 'u'],\n            ['d', 'e', 'f'],\n        ],\n        '=CHOOSEROWS(B3:D11, 2, {-3; 2})',\n    ],\n    'reverse Rows' => [\n        [\n            ['y', 'z', '#'],\n            ['v', 'w', 'x'],\n            ['s', 't', 'u'],\n            ['p', 'q', 'r'],\n            ['m', 'n', 'o'],\n            ['j', 'k', 'l'],\n            ['g', 'h', 'i'],\n            ['d', 'e', 'f'],\n            ['a', 'b', 'c'],\n        ],\n        '=CHOOSEROWS(B3:D11, SEQUENCE(ROWS(B3:D11),,ROWS(B3:D11),-1))',\n    ],\n    'inline array' => [\n        [\n            ['g', 'h', 'i'],\n            ['d', 'e', 'f'],\n        ],\n        '=CHOOSEROWS(B3:D11, {3;2})',\n    ],\n    'inline array with negative numbers' => [\n        [\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=CHOOSEROWS(B3:D11, {-2;-1})',\n    ],\n    'named range' => [\n        [\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=CHOOSEROWS(definedname, {-2;-1})',\n    ],\n    'only 1 argument' => [\n        'exception',\n        '=CHOOSEROWS(B3:D11)',\n    ],\n    'non-numeric row' => [\n        '#VALUE!',\n        '=CHOOSEROWS(B3:D11, \"x\")',\n    ],\n    'positive row too large' => [\n        '#VALUE!',\n        '=CHOOSEROWS(B3:D11, 10)',\n    ],\n    'negative row too large' => [\n        '#VALUE!',\n        '=CHOOSEROWS(B3:D11, 1, -10)',\n    ],\n    'zero row' => [\n        '#VALUE!',\n        '=CHOOSEROWS(B3:D11, 0)',\n    ],\n    'single cell' => [\n        [\n            ['a'],\n        ],\n        '=CHOOSEROWS(B3, 1)',\n    ],\n    'inline array rather than range' => [\n        [\n            [3, 4],\n            [1, 2],\n            [1, 2],\n        ],\n        '=CHOOSEROWS({1,2;3,4;5,6}, \" 2.4 \", 1, 1)',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/COLUMN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1,\n        null,\n    ],\n    [\n        2,\n        'B13',\n    ],\n    [\n        [2, 3, 4],\n        'B2:D2',\n    ],\n    [\n        2,\n        ['B' => 'B5', 'C' => 'C5', 'D' => 'D5'],\n    ],\n    [\n        [2, 3, 4],\n        'B2:D3',\n    ],\n    [\n        [2, 3, 4],\n        'Sheet1!B2:D2',\n    ],\n    [\n        [2, 3, 4],\n        '\"WorkSheet #1\"!B2:D2',\n    ],\n    [1, []],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/COLUMNS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1,\n        null,\n    ],\n    [\n        1,\n        '',\n    ],\n    [\n        '#VALUE!',\n        'foo',\n    ],\n    [\n        0,\n        [],\n    ],\n    [\n        1,\n        [1],\n    ],\n    [\n        1,\n        [1, 1],\n    ],\n    [\n        2,\n        [[1, 1]],\n    ],\n    [\n        1,\n        ['a' => [1, 1]],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/COLUMNSonSpreadsheet.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'global $e$2-$e$6' => [1, 'namedrangex'],\n    'global $f$2:$h$2' => [3, 'namedrangey'],\n    'global $f$4:$h$4' => [3, 'namedrange3'],\n    'local in scope $f$5:$i$5' => [4, 'namedrange5'],\n    'local out of scope' => ['#NAME?', 'localname'],\n    'non-existent sheet' => [10, 'UnknownSheet!B2:K6'],\n    'not enough arguments' => ['exception', 'omitted'],\n    'other existing sheet' => [6, 'OtherSheet!B1:G1'],\n    'qualified in scope $f$5:$i$5' => [4, 'ThisSheet!namedrange5'],\n    'single cell absolute' => [1, '$C$15'],\n    'single cell relative' => [1, 'C7'],\n    'unknown name' => ['#NAME?', 'namedrange2'],\n    'unknown name as first part of range' => ['#NAME?', 'Invalid:A2'],\n    'unknown name as second part of range' => ['#NAME?', 'A2:Invalid'],\n    'qualified out of scope $f$6:$h$6' => [3, 'OtherSheet!localname'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/COLUMNonSpreadsheet.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'current column' => [2, 'omitted'],\n    'global name $E$2:$E$6' => [5, 'namedrangex'],\n    'global name $F$2:$H$2' => [6, 'namedrange3'],\n    'global name $F$4:$H$4' => [6, 'namedrangey'],\n    'out of scope name' => ['#NAME?', 'localname'],\n    'qualified cell existing sheet' => [1, 'OtherSheet!A1'],\n    'qualified cell non-existent sheet' => [1, 'UnknownSheet!A1'],\n    'single cell absolute' => [3, '$C$15'],\n    'single cell relative' => [3, 'C7'],\n    'unknown name' => ['#NAME?', 'namedrange2'],\n    'unknown name as first part of range' => ['#NAME?', 'Invalid:A2'],\n    'unknown name as second part of range' => ['#NAME?', 'A2:Invalid'],\n    'qualified name' => [6, 'OtherSheet!localname'],\n    'last possible column' => [16384, 'XFD1'],\n    'beyond last possible column' => ['#NAME?', 'XFE1'],\n    'last possible column lowercase' => [16384, 'xfd1'],\n    'beyond last possible column lowercase' => ['#NAME?', 'xfe1'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/DROP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'drop last row' => [\n        [\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n            ['g', 'h', 'i'],\n            ['j', 'k', 'l'],\n            ['m', 'n', 'o'],\n            ['p', 'q', 'r'],\n            ['s', 't', 'u'],\n            ['v', 'w', 'x'],\n        ],\n        '=DROP(B3:D11, -1)',\n    ],\n    'drop first 2 rows' => [\n        [\n            ['g', 'h', 'i'],\n            ['j', 'k', 'l'],\n            ['m', 'n', 'o'],\n            ['p', 'q', 'r'],\n            ['s', 't', 'u'],\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=DROP(B3:D11, 2)',\n    ],\n    'drop last 2 columns' => [\n        [\n            ['a'],\n            ['d'],\n            ['g'],\n            ['j'],\n            ['m'],\n            ['p'],\n            ['s'],\n            ['v'],\n            ['y'],\n        ],\n        '=DROP(B3:D11, , -2)',\n    ],\n    'drop first column' => [\n        [\n            ['b', 'c'],\n            ['e', 'f'],\n            ['h', 'i'],\n            ['k', 'l'],\n            ['n', 'o'],\n            ['q', 'r'],\n            ['t', 'u'],\n            ['w', 'x'],\n            ['z', '#'],\n        ],\n        '=DROP(B3:D11, , 1)',\n    ],\n    'drop last row first column' => [\n        [\n            ['b', 'c'],\n            ['e', 'f'],\n            ['h', 'i'],\n            ['k', 'l'],\n            ['n', 'o'],\n            ['q', 'r'],\n            ['t', 'u'],\n            ['w', 'x'],\n        ],\n        '=DROP(B3:D11, -1, 1)',\n    ],\n    'drop first 2 rows last 2 columns' => [\n        [\n            ['g'],\n            ['j'],\n            ['m'],\n            ['p'],\n            ['s'],\n            ['v'],\n            ['y'],\n        ],\n        '=DROP(B3:D11, 2, -2)',\n    ],\n    'drop first 2 rows last 2 columns fractional and string' => [\n        [\n            ['g'],\n            ['j'],\n            ['m'],\n            ['p'],\n            ['s'],\n            ['v'],\n            ['y'],\n        ],\n        '=DROP(B3:D11, 2.8, \" -2.8 \")',\n    ],\n    'named range' => [\n        [\n            ['g'],\n            ['j'],\n            ['m'],\n            ['p'],\n            ['s'],\n            ['v'],\n            ['y'],\n        ],\n        '=DROP(definedname, 2,-2)',\n    ],\n    'only 1 argument' => [\n        'exception',\n        '=DROP(B3:D11)',\n    ],\n    'non-numeric row' => [\n        '#VALUE!',\n        '=DROP(B3:D11, \"x\")',\n    ],\n    'non-numeric column' => [\n        '#VALUE!',\n        '=DROP(B3:D11, 1, \"x\")',\n    ],\n    'positive row too large' => [\n        '#VALUE!',\n        '=DROP(B3:D11, 20)',\n    ],\n    'negative row too large' => [\n        '#VALUE!',\n        '=DROP(B3:D11, -20)',\n    ],\n    'positive column too large' => [\n        '#VALUE!',\n        '=DROP(B3:D11, , 20)',\n    ],\n    'negative column too large' => [\n        '#VALUE!',\n        '=DROP(B3:D11, , -20)',\n    ],\n    'row okay column too large' => [\n        '#VALUE!',\n        '=DROP(B3:D11, -1, 20)',\n    ],\n    'zero row' => [\n        [\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n            ['g', 'h', 'i'],\n            ['j', 'k', 'l'],\n            ['m', 'n', 'o'],\n            ['p', 'q', 'r'],\n            ['s', 't', 'u'],\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=DROP(B3:D11, 0)',\n    ],\n    'zero column' => [\n        [\n            ['d', 'e', 'f'],\n            ['g', 'h', 'i'],\n            ['j', 'k', 'l'],\n            ['m', 'n', 'o'],\n            ['p', 'q', 'r'],\n            ['s', 't', 'u'],\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=DROP(B3:D11, 1, 0)',\n    ],\n    'single cell' => [\n        '#VALUE!',\n        '=DROP(B3, 1)',\n    ],\n    'inline array rather than range' => [\n        [\n            [4],\n            [6],\n        ],\n        '=DROP({1,2;3,4;5,6}, 1, 1)',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/EXPAND.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'Add 2 rows' => [\n        [\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n            ['#N/A', '#N/A', '#N/A'],\n            ['#N/A', '#N/A', '#N/A'],\n        ],\n        '=EXPAND(B3:D4, 4)',\n    ],\n    'Add 1 colun' => [\n        [\n            ['a', 'b', 'c', '#N/A'],\n            ['d', 'e', 'f', '#N/A'],\n        ],\n        '=EXPAND(B3:D4, , 4)',\n    ],\n    'Add 1 row 2 columns set cells to 0' => [\n        [\n            ['a', 'b', 'c', 0, 0],\n            ['d', 'e', 'f', 0, 0],\n            [0, 0, 0, 0, 0],\n        ],\n        '=EXPAND(B3:D4, 3, 5, 0)',\n    ],\n    'Fractional row and column' => [\n        [\n            ['a', 'b', 'c', 0, 0],\n            ['d', 'e', 'f', 0, 0],\n            [0, 0, 0, 0, 0],\n        ],\n        '=EXPAND(B3:D4, 3.2, 5.8, 0)',\n    ],\n    'only 1 argument' => [\n        'exception',\n        '=EXPAND(B3:D4)',\n    ],\n    'non-numeric row' => [\n        '#VALUE!',\n        '=EXPAND(B3:D4, \"x\")',\n    ],\n    'non-numeric column' => [\n        '#VALUE!',\n        '=EXPAND(B3:D4, 1, \"x\")',\n    ],\n    'row too small' => [\n        '#VALUE!',\n        '=EXPAND(B3:D4, 1)',\n    ],\n    'column too small' => [\n        '#VALUE!',\n        '=EXPAND(B3:D4, , 2)',\n    ],\n    'single cell' => [\n        [\n            ['a', 'xx'],\n            ['xx', 'xx'],\n        ],\n        '=EXPAND(B3, 2, 2, \"xx\")',\n    ],\n    'inline array rather than range' => [\n        [\n            [1, 2, 0, 0],\n            [3, 4, 0, 0],\n            [5, 6, 0, 0],\n            [0, 0, 0, 0],\n        ],\n        '=EXPAND({1,2;3,4;5,6}, 4.4, \" 4.5 \", 0)',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/FORMULATEXT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#N/A',\n        2,\n    ],\n    [\n        '=\"ABC\"',\n        '=\"ABC\"',\n    ],\n    [\n        '=A1',\n        '=A1',\n    ],\n    [\n        '=\\'Worksheet1\\'!A1',\n        '=\\'Worksheet1\\'!A1',\n    ],\n    [\n        '=\\'Works heet1\\'!A1',\n        '=\\'Works heet1\\'!A1',\n    ],\n    [\n        '=\"HELLO WORLD\"',\n        '=\"HELLO WORLD\"',\n    ],\n    [\n        '=\\'Work!sheet1\\'!A5',\n        '=\\'Work!sheet1\\'!A5',\n    ],\n    [\n        '#N/A',\n        'A1',\n    ],\n    [\n        '#N/A',\n        null,\n    ],\n    [\n        '=SUM(B1,B2,B3)',\n        '=SUM(B1,B2,B3)',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/HLOOKUP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n/** @return array<int, array<int, float|int|string>> */\nfunction orderGrid(): array\n{\n    return [\n        ['Order ID', 10247, 10249, 10250, 10251, 10252, 10253],\n        ['Unit Price', 14.00, 18.60, 7.70, 16.80, 16.80, 64.80],\n        ['Quantity', 12, 9, 10, 6, 20, 40],\n    ];\n}\n\n/** @return array<int, array<int, int|string>> */\nfunction partsGrid(): array\n{\n    return [\n        ['Axles', 'Bearings', 'Bolts'],\n        [4, 4, 9],\n        [5, 7, 10],\n        [6, 8, 11],\n    ];\n}\n\nreturn [\n    [\n        16.80,\n        10251,\n        orderGrid(),\n        2,\n        false,\n    ],\n    [\n        6.0,\n        10251,\n        orderGrid(),\n        3,\n        false,\n    ],\n    [\n        '#N/A',\n        10248,\n        orderGrid(),\n        2,\n        false,\n    ],\n    [\n        14.0,\n        10248,\n        orderGrid(),\n        2,\n        true,\n    ],\n    [\n        4,\n        'Axles',\n        partsGrid(),\n        2,\n        true,\n    ],\n    [\n        7,\n        'Bearings',\n        partsGrid(),\n        3,\n        false,\n    ],\n    [\n        5,\n        'B',\n        partsGrid(),\n        3,\n        true,\n    ],\n    [\n        5,\n        'B',\n        partsGrid(),\n        3,\n        null,\n    ],\n    [\n        11,\n        'Bolts',\n        partsGrid(),\n        4,\n    ],\n    [\n        'c',\n        3,\n        [\n            [1, 2, 3],\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n        ],\n        2,\n        true,\n    ],\n    [\n        3,\n        3,\n        [\n            [1, 2, 3],\n        ],\n        1,\n        true,\n    ],\n    [\n        5,\n        'x',\n        [\n            ['Selection column', '0', '0', '0', '0', 'x', 'x', 'x', 'x', 'x'],\n            ['Value to retrieve', 1, 2, 3, 4, 5, 6, 7, 8, 9],\n        ],\n        2,\n        false,\n    ],\n    [\n        2,\n        'B',\n        [\n            ['Selection column', 'C', 'B', 'A'],\n            ['Value to retrieve', 3, 2, 1],\n        ],\n        2,\n        false,\n    ],\n    [\n        '#VALUE!',\n        'B',\n        [\n            ['Selection column', 'C', 'B', 'A'],\n            ['Value to retrieve', 3, 2, 1],\n        ],\n        'Nan',\n        false,\n    ],\n    [\n        '#N/A',\n        'B',\n        [\n            'Selection column',\n            'Value to retrieve',\n        ],\n        2,\n        false,\n    ],\n    [\n        '#REF!',\n        'Selection column',\n        [\n            'Selection column',\n            'Value to retrieve',\n        ],\n        5,\n        false,\n    ],\n    [\n        'Selection column',\n        'Selection column',\n        [\n            'Selection column',\n            'Value to retrieve',\n        ],\n        1,\n        false,\n    ],\n    [\n        0.61,\n        'Ed',\n        [\n            [null, 'Ann', 'Cara', 'Colin', 'Ed', 'Frank'],\n            ['Math', 0.58, 0.90, 0.67, 0.76, 0.80],\n            ['French', 0.61, 0.71, 0.59, 0.59, 0.76],\n            ['Physics', 0.75, 0.45, 0.39, 0.52, 0.69],\n            ['Bioogy', 0.39, 0.55, 0.77, 0.61, 0.45],\n        ],\n        5,\n        false,\n    ],\n    [\n        'Normal Weight',\n        23.5,\n        [\n            [null, 'Min', 0.0, 18.5, 25.0, 30.0],\n            ['BMI', 'Max', 18.4, 24.9, 29.9, null],\n            [null, 'Body Type', 'Underweight', 'Normal Weight', 'Overweight', 'Obese'],\n        ],\n        3,\n        true,\n    ],\n    'issue2934' => [\n        'Red',\n        102,\n        [\n            [null, 102],\n            [null, 'Red'],\n        ],\n        2,\n        false,\n    ],\n    'issue 3561' => [\n        8,\n        6,\n        [\n            [1, 6, 11],\n            [2, 7, 12],\n            [3, 8, 13],\n            [4, 9, 14],\n            [5, 10, 15],\n        ],\n        [[3], [4], [3]],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/HYPERLINK.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        ['https://phpspreadsheet.readthedocs.io/en/latest/', 'https://phpspreadsheet.readthedocs.io/en/latest/'],\n        'https://phpspreadsheet.readthedocs.io/en/latest/',\n        null,\n    ],\n    [\n        ['https://phpspreadsheet.readthedocs.io/en/latest/', 'Read the Docs'],\n        'https://phpspreadsheet.readthedocs.io/en/latest/',\n        'Read the Docs',\n    ],\n    [\n        'exception',\n        null,\n        null,\n    ],\n    [\n        ExcelError::REF(),\n        '',\n        null,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/INDEX.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [20 => ['R' => 1]], // Expected\n        // Input\n        [20 => ['R' => 1]],\n    ],\n    'Negative Row' => [\n        '#VALUE!', // Expected\n        // Input\n        [\n            20 => ['R' => 1],\n            21 => ['R' => 2],\n        ],\n        -1,\n    ],\n    'Row > matrix rows' => [\n        '#REF!', // Expected\n        // Input\n        [\n            20 => ['R' => 1],\n            21 => ['R' => 2],\n        ],\n        10,\n    ],\n    'Row is not a number' => [\n        '#VALUE!', // Expected\n        // Input\n        [\n            20 => ['R' => 1],\n            21 => ['R' => 2],\n        ],\n        'NaN',\n    ],\n    'Row is Error' => [\n        '#N/A', // Expected\n        // Input\n        [\n            20 => ['R' => 1],\n            21 => ['R' => 2],\n        ],\n        '#N/A',\n    ],\n    'Return row 2' => [\n        [21 => ['R' => 2]], // Expected\n        // Input\n        [\n            20 => ['R' => 1],\n            21 => ['R' => 2],\n        ],\n        2,\n    ],\n    'Return row 2 from larger matrix' => [\n        [21 => ['R' => 2, 'S' => 4]], // Expected\n        // Input\n        [\n            '20' => ['R' => 1, 'S' => 3],\n            '21' => ['R' => 2, 'S' => 4],\n        ],\n        2,\n        0,\n    ],\n    'Negative Column' => [\n        '#VALUE!', // Expected\n        // Input\n        [\n            '20' => ['R' => 1, 'S' => 3],\n            '21' => ['R' => 2, 'S' => 4],\n        ],\n        0,\n        -1,\n    ],\n    'Column > matrix columns' => [\n        '#REF!', // Expected\n        // Input\n        [\n            '20' => ['R' => 1, 'S' => 3],\n            '21' => ['R' => 2, 'S' => 4],\n        ],\n        2,\n        10,\n    ],\n    'Column is not a number' => [\n        '#VALUE!', // Expected\n        // Input\n        [\n            20 => ['R' => 1],\n            21 => ['R' => 2],\n        ],\n        1,\n        'NaN',\n    ],\n    'Column is Error' => [\n        '#N/A', // Expected\n        // Input\n        [\n            20 => ['R' => 1],\n            21 => ['R' => 2],\n        ],\n        1,\n        '#N/A',\n    ],\n    [\n        4, // Expected\n        // Input\n        [\n            '20' => ['R' => 1, 'S' => 3],\n            '21' => ['R' => 2, 'S' => 4],\n        ],\n        2,\n        2,\n    ],\n    [\n        [4], // Expected\n        // Input\n        [\n            '20' => ['R' => 1, 'S' => 3],\n            '21' => ['R' => 2, 'S' => 4],\n        ],\n        [\n            '21' => ['R' => 2],\n        ],\n        [\n            '21' => ['R' => 2],\n        ],\n    ],\n    [\n        'Pears',\n        [\n            ['Apples', 'Lemons'],\n            ['Bananas', 'Pears'],\n        ],\n        2,\n        2,\n    ],\n    [\n        'Bananas',\n        [\n            ['Apples', 'Lemons'],\n            ['Bananas', 'Pears'],\n        ],\n        2,\n        1,\n    ],\n    [\n        [1 => ['Bananas', 'Pears']],\n        [\n            ['Apples', 'Lemons'],\n            ['Bananas', 'Pears'],\n        ],\n        2,\n        0,\n    ],\n    [\n        3,\n        [\n            [4, 6],\n            [5, 3],\n            [6, 9],\n            [7, 5],\n            [8, 3],\n        ],\n        5,\n        2,\n    ],\n    [\n        [4 => [8, 3]],\n        [\n            [4, 6],\n            [5, 3],\n            [6, 9],\n            [7, 5],\n            [8, 3],\n        ],\n        5,\n        0,\n    ],\n    [\n        [\n            [6],\n            [3],\n            [9],\n            [5],\n            [3],\n        ],\n        [\n            [4, 6],\n            [5, 3],\n            [6, 9],\n            [7, 5],\n            [8, 3],\n        ],\n        0,\n        2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/INDEXonSpreadsheet.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'Single Cell' => [\n        1, // Expected\n        [\n            [1],\n        ],\n        0,\n    ],\n    'Row Number omitted' => [\n        'exception', // Expected\n        [\n            [1],\n        ],\n    ],\n    'Negative Row' => [\n        '#VALUE!', // Expected\n        [\n            [1],\n            [2],\n        ],\n        -1,\n    ],\n    'Row > matrix rows' => [\n        '#REF!', // Expected\n        [\n            [1],\n            [2],\n        ],\n        10,\n    ],\n    'Row is not a number' => [\n        '#NAME?', // Expected\n        [\n            [1],\n            [2],\n        ],\n        'NaN',\n    ],\n    'Row is reference to non-number' => [\n        '#VALUE!', // Expected\n        [\n            [1],\n            [2],\n        ],\n        'ZZ98',\n    ],\n    'Row is quoted non-numeric result' => [\n        '#VALUE!', // Expected\n        [\n            [1],\n            [2],\n        ],\n        '\"string\"',\n    ],\n    'Row is Error' => [\n        '#N/A', // Expected\n        [\n            [1],\n            [2],\n        ],\n        '#N/A',\n    ],\n    'Return row 2 only one column' => [\n        'xyz', // Expected\n        [\n            ['abc'],\n            ['xyz'],\n        ],\n        2,\n    ],\n    'Return row 1 col 2' => [\n        'def', // Expected\n        [\n            ['abc', 'def'],\n            ['xyz', 'tuv'],\n        ],\n        1,\n        2,\n    ],\n    'Column number omitted from 2-column matrix' => [\n        'abc', // Expected\n        [\n            ['abc', 'def'],\n            ['xyz', 'tuv'],\n        ],\n        1,\n    ],\n    'Column number omitted from 1-column matrix' => [\n        'xyz', // Expected\n        [\n            ['abc'],\n            ['xyz'],\n        ],\n        2,\n    ],\n    'Return row 2 from larger matrix (Phpspreadsheet flattens expected [2,4] to single value)' => [\n        2, // Expected\n        // Input\n        [\n            [1, 3],\n            [2, 4],\n        ],\n        2,\n        0,\n    ],\n    'Negative Column' => [\n        '#VALUE!', // Expected\n        [\n            [1, 3],\n            [2, 4],\n        ],\n        0,\n        -1,\n    ],\n    'Column > matrix columns' => [\n        '#REF!', // Expected\n        [\n            [1, 3],\n            [2, 4],\n        ],\n        2,\n        10,\n    ],\n    'Column is not a number' => [\n        '#NAME?', // Expected\n        [\n            [1],\n            [2],\n        ],\n        1,\n        'NaN',\n    ],\n    'Column is reference to non-number' => [\n        '#VALUE!', // Expected\n        [\n            [1],\n            [2],\n        ],\n        1,\n        'ZZ98',\n    ],\n    'Column is quoted non-number' => [\n        '#VALUE!', // Expected\n        [\n            [1],\n            [2],\n        ],\n        1,\n        '\"string\"',\n    ],\n    'Column is Error' => [\n        '#N/A', // Expected\n        [\n            [1],\n            [2],\n        ],\n        1,\n        '#N/A',\n    ],\n    'Row 2 Column 2' => [\n        4, // Expected\n        [\n            [1, 3],\n            [2, 4],\n        ],\n        2,\n        2,\n    ],\n    'Row 2 Column 2 Alphabetic' => [\n        'Pears',\n        [\n            ['Apples', 'Lemons'],\n            ['Bananas', 'Pears'],\n        ],\n        2,\n        2,\n    ],\n    'Row 2 Column 1 Alphabetic' => [\n        'Bananas',\n        [\n            ['Apples', 'Lemons'],\n            ['Bananas', 'Pears'],\n        ],\n        2,\n        1,\n    ],\n    'Row 2 Column 0 (PhpSpreadsheet flattens result)' => [\n        'Bananas',\n        [\n            ['Apples', 'Lemons'],\n            ['Bananas', 'Pears'],\n        ],\n        2,\n        0,\n    ],\n    'Row 5 column 2' => [\n        3,\n        [\n            [4, 6],\n            [5, 3],\n            [6, 9],\n            [7, 5],\n            [8, 3],\n        ],\n        5,\n        2,\n    ],\n    'Row 5 column 0 (flattened)' => [\n        8,\n        [\n            [4, 6],\n            [5, 3],\n            [6, 9],\n            [7, 5],\n            [8, 3],\n        ],\n        5,\n        0,\n    ],\n    'Row 0 column 2 (flattened)' => [\n        6,\n        [\n            [4, 6],\n            [5, 3],\n            [6, 9],\n            [7, 5],\n            [8, 3],\n        ],\n        0,\n        2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/INDIRECT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'cell range absolute' => [600, '$A$1:$A$3'],\n    'cell range on different sheet' => [30, 'OtherSheet!A1:A2'],\n    'cell range on different sheet absolute' => [60, 'OtherSheet!$A$1:$A$3'],\n    'cell range relative' => [500, 'A2:A3'],\n    'global name qualified with correct sheet' => [90, 'OtherSheet!newnr'],\n    'global name qualified with incorrect sheet' => [90, 'ThisSheet!newnr'],\n    'global name qualified with non-existent sheet' => ['#REF!', 'UnknownSheet!newnr'],\n    'invalid address' => ['#REF!', 'InvalidCellAddress'],\n    'invalid address as first part of range' => ['#REF!', 'Invalid:A2'],\n    'invalid address as second part of range' => ['#REF!', 'A2:Invalid'],\n    'local name out of scope' => ['#REF!', 'localname'],\n    'named range' => [90, 'newnr'],\n    'named range a1 arg ignored' => [90, 'newnr', false],\n    'named range case-insensitive' => [90, 'newNr'],\n    'null address' => ['#REF!', null],\n    'omit a1 argument' => [900, 'A2:A4'],\n    'qualified name correct sheet even out of scope' => [9, 'OtherSheet!localname'],\n    'qualified name incorrect sheet' => ['#REF!', 'ThisSheet!localname'],\n    'qualified name non-existent sheet' => ['#REF!', 'OtherSheetx!localname'],\n    'r1c1 cell on different sheet' => [40, 'OtherSheet!R4C1', false],\n    'r1c1 format a1 as string not permitted' => ['#VALUE!', 'R2C1', '0'],\n    'r1c1 format a1 is bool' => [200, 'R2C1', false],\n    'r1c1 format a1 is int' => [200, 'R2C1', 0],\n    'r1c1 range' => [600, 'R1C1:R3C1', false],\n    'r1c1 range on different sheet' => [90, 'OtherSheet!R4C1:R5C1', false],\n    'single cell absolute' => [200, '$A$2'],\n    'single cell relative' => [100, 'A1'],\n    'single cell on different sheet absolute' => [30, 'OtherSheet!$A$3'],\n    'single cell on different sheet relative' => [10, 'OtherSheet!A1'],\n    'supply a1 argument as bool' => [900, 'A2:A4', true],\n    'supply a1 argument as int' => [900, 'A2:A4', 1],\n    'supply a1 argument as float' => [900, 'A2:A4', 7.3],\n    'supply a1 argument as string not permitted' => ['#VALUE!', 'A2:A4', '1'],\n    'row range' => [600, '1:3'],\n    'column range' => [1500, 'A:C'],\n    'row range on different sheet' => [66, 'OtherSheet!1:3'],\n    'column range on different sheet' => [165, 'OtherSheet!A:C'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/LOOKUP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [ // Office reference example #1\n        'orange',\n        4.19,\n        [\n            [4.14],\n            [4.19],\n            [5.17],\n            [5.77],\n            [6, 39],\n        ],\n        [\n            ['red'],\n            ['orange'],\n            ['yellow'],\n            ['green'],\n            ['blue'],\n        ],\n    ],\n    [ // Office reference example #2\n        'yellow',\n        5.75,\n        [\n            [4.14],\n            [4.19],\n            [5.17],\n            [5.77],\n            [6, 39],\n        ],\n        [\n            ['red'],\n            ['orange'],\n            ['yellow'],\n            ['green'],\n            ['blue'],\n        ],\n    ],\n    [ // Office reference example #3\n        'blue',\n        7.66,\n        [\n            [4.14],\n            [4.19],\n            [5.17],\n            [5.77],\n            [6, 39],\n        ],\n        [\n            ['red'],\n            ['orange'],\n            ['yellow'],\n            ['green'],\n            ['blue'],\n        ],\n    ],\n    [ // Office reference example #4\n        '#N/A',\n        0,\n        [\n            [4.14],\n            [4.19],\n            [5.17],\n            [5.77],\n            [6, 39],\n        ],\n        [\n            ['red'],\n            ['orange'],\n            ['yellow'],\n            ['green'],\n            ['blue'],\n        ],\n    ],\n    [ // Array form test\n        'orange',\n        4.2,\n        [\n            [4.14, 'red'],\n            [4.19, 'orange'],\n            [5.17, 'yellow'],\n            [5.77, 'green'],\n            [6, 39, 'blue'],\n        ],\n    ],\n    [\n        5,\n        'x',\n        [\n            [0, 0, 0, 'x', 'x'],\n            [1, 2, 3, 4, 5],\n        ],\n    ],\n    [\n        'author_101',\n        101,\n        [\n            [100],\n            [101],\n            [102],\n        ],\n        [\n            ['author_100'],\n            ['author_101'],\n            ['author_102'],\n        ],\n    ],\n    [\n        'author_101',\n        101,\n        [\n            [100],\n            [101],\n            [102],\n        ],\n        [\n            ['author_100', 'author_101', 'author_102'],\n        ],\n    ],\n    [\n        101,\n        101,\n        [\n            [100],\n            [101],\n        ],\n    ],\n    [\n        '#N/A',\n        '10y2',\n        [\n            ['5y-1'],\n            ['10y1'],\n            ['10y2'],\n        ],\n        [\n            [2.0],\n            [7.0],\n            [10.0],\n        ],\n    ],\n    [\n        '#N/A',\n        '10y2',\n        'Not an Array',\n        [\n            [2.0],\n            [7.0],\n            [10.0],\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/MATCH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'unsorted numeric array still finds match with type 1?' => [\n        2, // Expected\n        2, // Input\n        [2, 0, 4, 3],\n        1,\n    ],\n    'unsorted array still finds match with type 1?' => [\n        6,\n        'Amplitude',\n        ['Aardvark', 'Apple', 'A~*e', 'A*e', 'A[solve', 'Amplitude', 'Adverse', 'Apartment'],\n        1,\n    ],\n    // Third argument = 0\n    [\n        1, // Expected\n        2, // Input\n        [2, 3, 4, 3],\n        0,\n    ],\n    [\n        '#N/A', // Expected\n        2, // Input\n        [1, 0, 4, 3],\n        0,\n    ],\n    [\n        1, // Expected\n        2, // Input\n        [2, 0, 0, 3],\n        0,\n    ],\n    [\n        2, // Expected\n        0, // Input\n        [2, 0, 0, 3],\n        0,\n    ],\n    // Third argument = 1\n    [\n        1, // Expected\n        2, // Input\n        [2, 3, 4, 3],\n        1,\n    ],\n    [\n        3, // Expected\n        2, // Input\n        [2, 0, 0, 3],\n        1,\n    ],\n    [\n        4, // Expected\n        4, // Input\n        [2, 0, 0, 3],\n        1,\n    ],\n    // Third argument = -1\n    [\n        1, // Expected\n        2, // Input\n        [2, 0, 0, 3],\n        -1,\n    ],\n    [\n        4, // Expected\n        2, // Input\n        [3, 3, 4, 5],\n        -1,\n    ],\n    [\n        1, // Expected\n        5, // Input\n        [8, 4, 3, 2],\n        -1,\n    ],\n    [\n        '#N/A', // Expected\n        6, // Input\n        [3, 5, 6, 8],\n        -1,\n    ],\n    [\n        1, // Expected\n        6, // Input\n        [8, 5, 4, 2],\n        -1,\n    ],\n    [\n        3, // Expected\n        4, // Input\n        [5, 8, 4, 2],\n        -1,\n    ],\n    [\n        2, // Expected\n        4, // Input\n        [8, 8, 3, 2],\n        -1,\n    ],\n    [ // Default matchtype\n        4, // Expected\n        4, // Input\n        [2, 0, 0, 3],\n        null,\n    ],\n    // match on ranges with empty cells\n    [\n        3, // Expected\n        4, // Input\n        [1, null, 4, null, 8],\n        1,\n    ],\n    [\n        3, // Expected\n        5, // Input\n        [1, null, 4, null, null],\n        1,\n    ],\n    // 0s are causing errors, because things like 0 == 'x' is true. Thanks PHP!\n    '0 does not match x' => [\n        3,\n        'x',\n        [0, 0, 'x', 'x', 'x'],\n        0,\n    ],\n    [\n        2,\n        'a',\n        [false, 'a', 1],\n        -1,\n    ],\n    [\n        '#N/A', // Expected\n        0,\n        ['x', true, false],\n        -1,\n    ],\n    [\n        '#N/A', // Expected\n        true,\n        ['a', 'b', 'c'],\n        -1,\n    ],\n    [\n        '#N/A', // Expected\n        true,\n        [0, 1, 2],\n        -1,\n    ],\n    [\n        '#N/A', // Expected\n        true,\n        [0, 1, 2],\n        0,\n    ],\n    [\n        '#N/A', // Expected\n        true,\n        [0, 1, 2],\n        1,\n    ],\n    [\n        1, // Expected\n        true,\n        [true, true, true],\n        -1,\n    ],\n    [\n        1, // Expected\n        true,\n        [true, true, true],\n        0,\n    ],\n    [\n        3, // Expected\n        true,\n        [true, true, true],\n        1,\n    ],\n    // lookup stops when value < searched one\n    [\n        5, // Expected\n        6,\n        [true, false, 'a', 'z', 222222, 2, 99999999],\n        -1,\n    ],\n    // when mixing numeric types\n    [\n        4, // Expected\n        4.6,\n        [1, 2, 3, 4, 5],\n        1,\n    ],\n    [\n        4, // Expected\n        4,\n        [1, 2, 3, 3.8, 5],\n        1,\n    ],\n    // if element of same data type met and it is < than searched one #N/A - no further processing\n    [\n        '#N/A', // Expected\n        6,\n        [true, false, 'a', 'z', 2, 888],\n        -1,\n    ],\n    'number compared to string type -1' => [\n        '#N/A', // Expected\n        6,\n        ['6'],\n        -1,\n    ],\n    'number compared to string type 0' => [\n        '#N/A', // Expected\n        6,\n        ['6'],\n        0,\n    ],\n    'number compared to string type 1' => [\n        '#N/A', // Expected\n        6,\n        ['6'],\n        1,\n    ],\n    'string compared to number type -1' => [\n        '#N/A', // Expected\n        '6',\n        [6],\n        -1,\n    ],\n    'string compared to number type 0' => [\n        '#N/A', // Expected\n        '6',\n        [6],\n        0,\n    ],\n    'string compared to number type 1' => [\n        '#N/A', // Expected\n        '6',\n        [6],\n        1,\n    ],\n    // expression match\n    [\n        2, // Expected\n        'a?b',\n        ['a', 'abb', 'axc'],\n        0,\n    ],\n    [\n        1, // Expected\n        'a*',\n        ['aAAAAAAA', 'as', 'az'],\n        0,\n    ],\n    [\n        3, // Expected\n        '1*11*1',\n        ['abc', 'efh', '1a11b1'],\n        0,\n    ],\n    [\n        3, // Expected\n        '1*11*1',\n        ['abc', 'efh', '1a11b1'],\n        0,\n    ],\n    [\n        2, // Expected\n        'a*~*c',\n        ['aAAAAA', 'a123456*c', 'az', 'alembic'],\n        0,\n    ],\n    [\n        3, // Expected\n        'a*123*b',\n        ['aAAAAA', 'a123456*c', 'a99999123b'],\n        0,\n    ],\n    [\n        1, // Expected\n        '*',\n        ['aAAAAA', 'a111123456*c', 'qq'],\n        0,\n    ],\n    [\n        2, // Expected\n        '?',\n        ['aAAAAA', 'a', 'a99999123b'],\n        0,\n    ],\n    [\n        '#N/A', // Expected\n        '?',\n        [1, 22, 333],\n        0,\n    ],\n    [\n        3, // Expected\n        '???',\n        [1, 22, 'aaa'],\n        0,\n    ],\n    [\n        3, // Expected\n        '*',\n        [1, 22, 'aaa'],\n        0,\n    ],\n    [\n        '#N/A', // Expected\n        'abc',\n        [1, 22, 'aaa'],\n        0,\n    ],\n    [\n        '#N/A', // Expected (Invalid lookup value)\n        new DateTime('2021-03-11'),\n        [1, 22, 'aaa'],\n        1,\n    ],\n    'int match type other than 0/1/-1 is accepted' => [\n        3, // Expected (Invalid match type)\n        'abc',\n        [1, 22, 'aaa'],\n        123,\n    ],\n    'float match type is accepted' => [\n        3, // Expected (Invalid match type)\n        'abc',\n        [1, 22, 'aaa'],\n        123.5,\n    ],\n    'numeric string match type is accepted' => [\n        3, // Expected (Invalid match type)\n        'abc',\n        [1, 22, 'aaa'],\n        '89.7',\n    ],\n    'non-numeric string match type is not accepted' => [\n        '#VALUE!', // Expected (Invalid match type)\n        'abc',\n        [1, 22, 'aaa'],\n        '\"x\"',\n    ],\n    'empty lookup array' => [\n        '#N/A', // Expected (Empty lookup array)\n        'abc',\n        [],\n        1,\n    ],\n    'wildcard match 1 with type -1' => [\n        [8, 2], // LibreOffice matches wildcard but shouldn't\n        'A*e',\n        ['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],\n        -1,\n    ],\n    [\n        2,\n        'A*e',\n        ['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],\n        0,\n    ],\n    'wildcard match with tilde' => [\n        4,\n        'A~*e',\n        ['Aardvark', 'Apple', 'A~*e', 'A*e', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],\n        0,\n    ],\n    'string with preg_quote escaped character' => [\n        5,\n        'A[solve',\n        ['Aardvark', 'Apple', 'A~*e', 'A*e', 'A[solve', 'Amplitude', 'Adverse', 'Apartment'],\n        0,\n    ],\n    // duplicate test deleted - see 'wildcard with type 1' below\n    // end of deletions\n    'wildcard match 2 with type -1' => [\n        [8, 5],\n        'A?s*e',\n        ['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],\n        -1,\n    ],\n    [\n        5,\n        'A?s*e',\n        ['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],\n        0,\n    ],\n    'wildcard with type 1' => [\n        ['#N/A', 2], // LibreOffice matches wildcard but shouldn't\n        'A*e',\n        ['Aardvark', 'Apple', 'Armadillo', 'Acre', 'Absolve', 'Amplitude', 'Adverse', 'Apartment'],\n        1,\n    ],\n    'wildcard match 3 with type -1' => [\n        [8, 3], // LibreOffice matches wildcard but shouldn't\n        '*verse',\n        ['Obtuse', 'Amuse', 'Obverse', 'Inverse', 'Assurance', 'Amplitude', 'Adverse', 'Apartment'],\n        -1,\n    ],\n    [\n        3,\n        '*verse',\n        ['Obtuse', 'Amuse', 'Obverse', 'Inverse', 'Assurance', 'Amplitude', 'Adverse', 'Apartment'],\n        0,\n    ],\n    [\n        3, // Expected\n        '*~~*', // contains a tilde\n        ['aAAAAA', 'a123456*c', 'abc~xyz', 'alembic'],\n        0,\n    ],\n    [\n        2, // Expected\n        'abc/123*', // wildcard search contains a forward slash\n        ['abc123fff', 'abc/123fff'],\n        0,\n    ],\n    'float lookup int array type0' => [\n        1, // Expected\n        2.0, // Input\n        [2, 3, 4, 5],\n        0,\n    ],\n    'int lookup float array type0' => [\n        2, // Expected\n        3, // Input\n        [2, 3.0, 4, 5],\n        0,\n    ],\n    'int lookup float array type0 not equal' => [\n        '#N/A', // Expected\n        3, // Input\n        [2, 3.1, 4, 5],\n        0,\n    ],\n    'float lookup int array type0 not equal' => [\n        '#N/A', // Expected\n        3.1, // Input\n        [2, 3, 4, 5],\n        0,\n    ],\n    'float lookup int array type1 equal' => [\n        1, // Expected\n        2.0, // Input\n        [2, 3, 4, 5],\n        1,\n    ],\n    'int lookup float array type1 equal' => [\n        2, // Expected\n        3, // Input\n        [2, 3.0, 4, 5],\n        1,\n    ],\n    'float lookup int array type1 less' => [\n        1, // Expected\n        2.5, // Input\n        [2, 3, 4, 5],\n        1,\n    ],\n    'int lookup float array type1 less' => [\n        2, // Expected\n        3, // Input\n        [2, 2.9, 4, 5],\n        1,\n    ],\n    'float lookup int array type -1 equal' => [\n        4, // Expected\n        2.0, // Input\n        [5, 4, 3, 2],\n        -1,\n    ],\n    'int lookup float array type -1 equal' => [\n        3, // Expected\n        3, // Input\n        [5, 4, 3.0, 2],\n        -1,\n    ],\n    'float lookup int array type -1 greater' => [\n        2, // Expected\n        3.5, // Input\n        [5, 4, 3, 2],\n        -1,\n    ],\n    'int lookup float array type -1 greater' => [\n        2, // Expected\n        3, // Input\n        [5, 4, 2.9, 2],\n        -1,\n    ],\n    'default type is type1' => [\n        3, // Expected\n        4, // Input\n        [1, 2, 3, 5],\n    ],\n    'same as previous but explicit type1' => [\n        3, // Expected\n        4, // Input\n        [1, 2, 3, 5],\n    ],\n    'same as previous but type0 so different result' => [\n        '#N/A', // Expected\n        4, // Input\n        [1, 2, 3, 5],\n        0,\n    ],\n    'undefined behavior N/A in Excel 4 in PhpSpreadsheet' => [\n        'incomplete', // Expected\n        4, // Input\n        [8, 6, 3, 1],\n    ],\n    'same as previous but type -1 so match' => [\n        2, // Expected\n        4, // Input\n        [8, 6, 3, 1],\n        -1,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/OFFSET.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#VALUE!',\n        null,\n    ],\n    [\n        '#REF!',\n        'B5',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/ROW.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1,\n        null,\n    ],\n    [\n        10,\n        'C10',\n    ],\n    [\n        [[10], [11], [12]],\n        'C10:C12',\n    ],\n    [\n        [[10], [11], [12]],\n        'C10:D12',\n    ],\n    [\n        4,\n        [\n            4 => ['B' => 'B5', 'C' => 'C5', 'D' => 'D5'],\n            5 => ['B' => 'B5', 'C' => 'C5', 'D' => 'D5'],\n        ],\n    ],\n    [\n        [[10], [11], [12]],\n        'Sheet1!C10:C12',\n    ],\n    [\n        [[10], [11], [12]],\n        '\"WorkSheet #1\"!C10:C12',\n    ],\n    [1, []],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/ROWS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1,\n        null,\n    ],\n    [\n        1,\n        '',\n    ],\n    [\n        '#VALUE!',\n        'foo',\n    ],\n    [\n        0,\n        [],\n    ],\n    [\n        1,\n        [1],\n    ],\n    [\n        2,\n        [1, 1],\n    ],\n    [\n        1,\n        [[1, 1]],\n    ],\n    [\n        2,\n        ['a' => [1, 1]],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/ROWSonSpreadsheet.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'global $E$2:$E$6' => [5, 'namedrangex'],\n    'global $F$2:$H$2' => [1, 'namedrangey'],\n    'global $F$4:$H$4' => [1, 'namedrange3'],\n    'local in scope $F$5:$H$5' => [1, 'namedrange5'],\n    'local out of scope' => ['#NAME?', 'localname'],\n    'non-existent sheet' => [5, 'UnknownSheet!B2:K6'],\n    'not enough arguments' => ['exception', 'omitted'],\n    'other existing sheet' => [6, 'OtherSheet!A1:H6'],\n    'qualified in scope $F$5:$H$5' => [1, 'ThisSheet!namedrange5'],\n    'single cell absolute' => [1, '$C$7'],\n    'single cell relative' => [1, 'C7'],\n    'unknown name' => ['#NAME?', 'InvalidCellAddress'],\n    'unknown name as first part of range' => ['#NAME?', 'Invalid:A2'],\n    'unknown name as second part of range' => ['#NAME?', 'A2:Invalid'],\n    'qualified out of scope $F$6:$H$6' => [1, 'OtherSheet!localname'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/ROWonSpreadsheet.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'current row' => [3, 'omitted'],\n    'global name $E$2:$E$6' => [2, 'namedrangex'],\n    'global name $F$2:$H$2' => [2, 'namedrangey'],\n    'global name $F$4:$H$4' => [4, 'namedrange3'],\n    'local name $F$5:$H$5' => [5, 'namedrange5'],\n    'out of scope name' => ['#NAME?', 'localname'],\n    'qualified cell existing sheet' => [1, 'OtherSheet!A1'],\n    'qualified cell non-existent sheet' => [1, 'UnknownSheet!A1'],\n    'single cell absolute' => [7, '$C$7'],\n    'single cell relative' => [7, 'C7'],\n    'unknown name' => ['#NAME?', 'namedrange2'],\n    'unknown name as first part of range' => ['#NAME?', 'InvalidCell:A2'],\n    'unknown name as second part of range' => ['#NAME?', 'A2:InvalidCell'],\n    'qualified name' => [6, 'OtherSheet!localname'],\n    'last valid row' => [1048576, 'A1048576'],\n    'beyond last valid row' => ['#NAME?', 'A1048577'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/TAKE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'take last row' => [\n        [\n            ['y', 'z', '#'],\n        ],\n        '=TAKE(B3:D11, -1)',\n    ],\n    'take first 2 rows' => [\n        [\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n        ],\n        '=TAKE(B3:D11, 2)',\n    ],\n    'take last 2 columns' => [\n        [\n            ['b', 'c'],\n            ['e', 'f'],\n            ['h', 'i'],\n            ['k', 'l'],\n            ['n', 'o'],\n            ['q', 'r'],\n            ['t', 'u'],\n            ['w', 'x'],\n            ['z', '#'],\n        ],\n        '=TAKE(B3:D11, , -2)',\n    ],\n    'take first column' => [\n        [\n            ['a'],\n            ['d'],\n            ['g'],\n            ['j'],\n            ['m'],\n            ['p'],\n            ['s'],\n            ['v'],\n            ['y'],\n        ],\n        '=TAKE(B3:D11, , 1)',\n    ],\n    'take last row first column' => [\n        [\n            ['y'],\n        ],\n        '=TAKE(B3:D11, -1, 1)',\n    ],\n    'take first 2 rows last 2 columns' => [\n        [\n            ['b', 'c'],\n            ['e', 'f'],\n        ],\n        '=TAKE(B3:D11, 2, -2)',\n    ],\n    'take first 2 rows last 2 columns fractional and string' => [\n        [\n            ['b', 'c'],\n            ['e', 'f'],\n        ],\n        '=TAKE(B3:D11, 2.8, \" -2.8 \")',\n    ],\n    'named range' => [\n        [\n            ['x'],\n            ['#'],\n        ],\n        '=TAKE(definedname, -2,-1)',\n    ],\n    'only 1 argument' => [\n        'exception',\n        '=TAKE(B3:D11)',\n    ],\n    'non-numeric row' => [\n        '#VALUE!',\n        '=TAKE(B3:D11, \"x\")',\n    ],\n    'non-numeric column' => [\n        '#VALUE!',\n        '=TAKE(B3:D11, 1, \"x\")',\n    ],\n    'positive row too large' => [\n        [\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n            ['g', 'h', 'i'],\n            ['j', 'k', 'l'],\n            ['m', 'n', 'o'],\n            ['p', 'q', 'r'],\n            ['s', 't', 'u'],\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=TAKE(B3:D11, 20)',\n    ],\n    'negative row too large' => [\n        [\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n            ['g', 'h', 'i'],\n            ['j', 'k', 'l'],\n            ['m', 'n', 'o'],\n            ['p', 'q', 'r'],\n            ['s', 't', 'u'],\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=TAKE(B3:D11, -20)',\n    ],\n    'positive column too large' => [\n        [\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n            ['g', 'h', 'i'],\n            ['j', 'k', 'l'],\n            ['m', 'n', 'o'],\n            ['p', 'q', 'r'],\n            ['s', 't', 'u'],\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=TAKE(B3:D11, , 20)',\n    ],\n    'negative column too large' => [\n        [\n            ['a', 'b', 'c'],\n            ['d', 'e', 'f'],\n            ['g', 'h', 'i'],\n            ['j', 'k', 'l'],\n            ['m', 'n', 'o'],\n            ['p', 'q', 'r'],\n            ['s', 't', 'u'],\n            ['v', 'w', 'x'],\n            ['y', 'z', '#'],\n        ],\n        '=TAKE(B3:D11, , -20)',\n    ],\n    'row okay column too large' => [\n        [\n            ['y', 'z', '#'],\n        ],\n        '=TAKE(B3:D11, -1, 20)',\n    ],\n    'zero row' => [\n        '#VALUE!',\n        '=TAKE(B3:D11, 0)',\n    ],\n    'zero column' => [\n        '#VALUE!',\n        '=TAKE(B3:D11, 1, 0)',\n    ],\n    'single cell' => [\n        [\n            ['a'],\n        ],\n        '=TAKE(B3, 1)',\n    ],\n    'inline array rather than range' => [\n        [\n            [1, 2],\n        ],\n        '=TAKE({1,2;3,4;5,6}, 1, 2)',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/TRANSPOSE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            ['Jan', 'Feb', 'Mar', 'Apr'],\n            [100, 200, 150, 300],\n        ],\n        [\n            ['Jan', 100],\n            ['Feb', 200],\n            ['Mar', 150],\n            ['Apr', 300],\n        ],\n    ],\n    [\n        [\n            ['a', 'aa'],\n            ['b', 'ab'],\n            ['c', 'ac'],\n            ['d', 'ad'],\n        ],\n        [\n            ['a', 'b', 'c', 'd'],\n            ['aa', 'ab', 'ac', 'ad'],\n        ],\n    ],\n    [\n        [[3.14]],\n        3.14,\n    ],\n    'single row' => [\n        [[1], [2], [3], [4]],\n        [[1, 2, 3, 4]],\n    ],\n    'single row 1-D' => [\n        [[1], [2], [3], [4]],\n        [1, 2, 3, 4],\n    ],\n    'single column' => [\n        [[1, 2, 3, 4]],\n        [[1], [2], [3], [4]],\n    ],\n    'single cell' => [\n        [[1]],\n        [[1]],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/LookupRef/VLOOKUP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n/** @return array<int, array<int, float|string>> */\nfunction densityGrid(): array\n{\n    return [\n        ['Density', 'Viscosity', 'Temperature'],\n        [0.457, 3.55, 500],\n        [0.525, 3.25, 400],\n        [0.616, 2.93, 300],\n        [0.675, 2.75, 250],\n        [0.746, 2.57, 200],\n        [0.835, 2.38, 150],\n        [0.946, 2.17, 100],\n        [1.090, 1.95, 50],\n        [1.290, 1.71, 0],\n    ];\n}\n\nreturn [\n    [\n        '#N/A',\n        1,\n        densityGrid(),\n        2,\n        false,\n    ],\n    [\n        '#REF!',\n        1,\n        'HELLO WORLD',\n        2,\n        false,\n    ],\n    [\n        100,\n        1,\n        densityGrid(),\n        3,\n        true,\n    ],\n    [\n        '#N/A',\n        0.70,\n        densityGrid(),\n        3,\n        false,\n    ],\n    [\n        '#N/A',\n        0.100,\n        densityGrid(),\n        2,\n        true,\n    ],\n    [\n        1.71,\n        2,\n        densityGrid(),\n        2,\n        true,\n    ],\n    [\n        5,\n        'x',\n        [\n            [\n                'Selection column',\n                'Value to retrieve',\n            ],\n            ['0', 1],\n            ['0', 2],\n            ['0', 3],\n            ['0', 4],\n            ['x', 5],\n            ['x', 6],\n            ['x', 7],\n            ['x', 8],\n            ['x', 9],\n        ],\n        2,\n        false,\n    ],\n    [\n        '#N/A',\n        '10y2',\n        [\n            ['5y-1', 2.0],\n            ['10y1', 7.0],\n            ['10y2', 10.0],\n        ],\n        2.0,\n    ],\n    [\n        '#VALUE!',\n        '10y2',\n        [\n            ['5y-1', 2.0],\n            ['10y1', 7.0],\n            ['10y2', 10.0],\n        ],\n        -5,\n    ],\n    [\n        '#REF!',\n        '10y2',\n        [\n        ],\n        2.0,\n    ],\n    [\n        '#REF!',\n        '10y2',\n        [\n            [2.0],\n            [7.0],\n            [10.0],\n        ],\n        2.0,\n    ],\n    [\n        3.50,\n        'Cornflakes',\n        [\n            ['Item Description', 'Price'],\n            ['Tinned Tomatoes', 0.90],\n            ['Tinned Tuna', 1.50],\n            ['Cornflakes', 3.50],\n            ['Shortcake Biscuits', 1.00],\n            ['Toothpaste', 4.10],\n            ['Tinned Baked Beans', 0.99],\n            ['White Sliced Bread', 0.80],\n        ],\n        2,\n        false,\n    ],\n    [\n        'E',\n        0.52,\n        [\n            ['Lower', 'Upper', 'Grade'],\n            [0.00, 0.44, 'F'],\n            [0.45, 0.54, 'E'],\n            [0.55, 0.64, 'D'],\n            [0.65, 0.74, 'C'],\n            [0.75, 0.84, 'B'],\n            [0.85, 1.00, 'A'],\n        ],\n        3,\n        true,\n    ],\n    [\n        'E',\n        0.52,\n        [\n            ['Lower', 'Upper', 'Grade'],\n            [0.00, 0.44, 'F'],\n            [0.45, 0.54, 'E'],\n            [0.55, 0.64, 'D'],\n            [0.65, 0.74, 'C'],\n            [0.75, 0.84, 'B'],\n            [0.85, 1.00, 'A'],\n        ],\n        3,\n        null,\n    ],\n    'issue2934' => [\n        'Red',\n        102,\n        [\n            [null, null],\n            [102, 'Red'],\n        ],\n        2,\n        false,\n    ],\n    'string supplied as index' => [\n        '#VALUE!',\n        102,\n        [\n            [null, null],\n            [102, 'Red'],\n        ],\n        'xyz',\n        false,\n    ],\n    'num error propagated' => [\n        '#NUM!',\n        102,\n        [\n            [null, null],\n            [102, 'Red'],\n        ],\n        '=SQRT(-1)',\n        false,\n    ],\n    'issue 3561' => [\n        7,\n        6,\n        [\n            [1, 2, 3, 4, 5],\n            [6, 7, 8, 9, 10],\n            [11, 12, 13, 14, 15],\n        ],\n        [[2], [3], [2]],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ABS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception'], // exception - not enough args\n    ['#VALUE!', 'ABC'],\n    [35.51, '35.51'],\n    [35.51, '=35.51'],\n    [35.51, '=\"35.51\"'],\n    [35.51, 35.51],\n    [35.51, -35.51],\n    [6, '6'],\n    [7, '-7'],\n    [0, 0],\n    [0, null],\n    [0, false],\n    [1, true],\n    ['#VALUE!', ''],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ACOS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [M_PI_2, '0'],\n    [M_PI, '\"-1\"'],\n    [0, '1'],\n    ['#NUM!', '2'],\n    [M_PI_2, 'Q15'],\n    [M_PI_2, 'false'],\n    [0, 'true'],\n    [1.047197551, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ACOSH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [1.316958, '2'],\n    [0, '1'],\n    ['#NUM!', '0'],\n    ['#NUM!', '-1'],\n    ['#NUM!', 'Q15'],\n    ['#NUM!', 'false'],\n    [0, 'true'],\n    [0.96242365, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ACOT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', '\"ABC\"'],\n    [3.04192400109863, -10],\n    [2.98376146330163, '-PI() * 2'],\n    [2.94419709373991, '\"-5\"'],\n    [2.83342358247381, '-PI()'],\n    [2.57468114864878, '-PI() / 2'],\n    [1.67046497928606, -0.1],\n    [1.57079632679490, 0.0],\n    [1.47112767430373, 0.1],\n    [0.56691150494101, 'PI() / 2'],\n    [0.30816907111599, 'PI()'],\n    [0.19739555984988, 5],\n    [0.15783119028816, 'PI() * 2'],\n    [0.09966865249116, 10],\n    [1.57079632679490, 'Q15'],\n    [1.57079632679490, 'null'],\n    [1.57079632679490, 'false'],\n    [0.785398163, 'true'],\n    [2.94419709373991, 'A5'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ACOTH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', '\"ABC\"'],\n    [-0.10033534773108, -10],\n    [-0.16051955750789, '-PI() * 2'],\n    [-0.20273255405408, '\"-5\"'],\n    [-0.32976531495670, '-PI()'],\n    [-0.75246926714193, '-PI() / 2'],\n    ['#NUM!', -0.1],\n    ['#NUM!', 0.0],\n    ['#NUM!', 0.1],\n    [0.75246926714193, 'PI() / 2'],\n    [0.32976531495670, 'PI()'],\n    [0.20273255405408, 5],\n    [0.16051955750789, 'PI() * 2'],\n    [0.10033534773108, 10],\n    ['#NUM!', 'Q15'],\n    ['#NUM!', 'null'],\n    ['#NUM!', 'false'],\n    ['#NUM!', 'true'],\n    [-0.10033534773108, 'A5'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ARABIC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0,\n        ' ',\n    ],\n    [\n        49,\n        'XLIX',\n    ],\n    [\n        50,\n        'L',\n    ],\n    [\n        2012,\n        'MMXII',\n    ],\n    [\n        999,\n        'CMXCIX',\n    ],\n    [\n        499,\n        'CDXCIX',\n    ],\n    [\n        2018,\n        'MMXVIII',\n    ],\n    [\n        -2018,\n        '-MMXVIII',\n    ],\n    [\n        499,\n        'CDXCIX',\n    ],\n    [\n        499,\n        'LDVLIV',\n    ],\n    [\n        499,\n        'XDIX',\n    ],\n    [\n        499,\n        'VDIV',\n    ],\n    [\n        499,\n        'ID',\n    ],\n    [\n        '#VALUE!',\n        'WRONG',\n    ],\n    [\n        0,\n        '',\n    ],\n    [\n        '#NUM!',\n        '-',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ASIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [M_PI_2, '1'],\n    [-M_PI_2, '\"-1\"'],\n    [0, '0'],\n    ['#NUM!', '2'],\n    [0, 'Q15'],\n    [0, 'false'],\n    [M_PI_2, 'true'],\n    [0.523598776, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ASINH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [0, '0'],\n    [0.881374, '1'],\n    [1.443635, '\"2\"'],\n    [-0.881374, '-1'],\n    [14.508658, '1000000'],\n    // ['#NUM!', 2], Don't know if NAN is possible\n    [0, 'Q15'],\n    [0, 'false'],\n    [0.881373587, 'true'],\n    [0.481211825, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ATAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [0, '0'],\n    [M_PI / 4, '\"1\"'],\n    [1.107149, '2'],\n    [-M_PI / 4, '-1'],\n    [M_PI / 2, '10000000'],\n    // ['#NUM!', 2], Believe NAN is not possible\n    [0, 'Q15'],\n    [0, 'false'],\n    [M_PI / 4, 'true'],\n    [1.373400767, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ATAN2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// x_num, y_num, Result\n\nreturn [\n    ['#DIV/0!', '0, 0'],\n    [M_PI_4, '1, 1'],\n    [-3 * M_PI_4, '-1, -1'],\n    [3 * M_PI_4, '-1, 1'],\n    [-M_PI_4, '1, -1'],\n    [1.107148717, '0.5, 1'],\n    [1.815774989, '-0.5, 2'],\n    [0.674740942, '1, 0.8'],\n    [-0.643501109, '0.8, -0.6'],\n    [-1.460139105, '1, -9'],\n    [0.0, '0.2, 0'],\n    [1.107148718, '0.1, 0.2'],\n    [M_PI_2, '0, 0.2'],\n    ['#VALUE!', '\"A\", 0.2'],\n    ['#VALUE!', '0.2, \"A\"'],\n    [M_PI_4, 'true, 1'],\n    [-M_PI_2, 'false, -2.5'],\n    ['exception', ''],\n    ['exception', '1'],\n    [0.876058051, 'A2, A3'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ATANH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [0, '0'],\n    [1.472219, '\"0.9\"'],\n    [-1.472219, '-0.9'],\n    ['#NUM!', '1'],\n    ['#NUM!', '-1'],\n    [0, 'Q15'],\n    [0, 'false'],\n    ['#NUM!', 'true'],\n    [1.098612289, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/BASE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '111',\n        7,\n        2,\n    ],\n    [\n        '64',\n        100,\n        16,\n    ],\n    [\n        'CA',\n        202,\n        16,\n    ],\n    [\n        '0000001111',\n        15,\n        2,\n        10,\n    ],\n    [\n        '0000001111',\n        15.3,\n        2.6,\n        10,\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n        2,\n        10,\n    ],\n    [\n        '#VALUE!',\n        15,\n        'ABC',\n        10,\n    ],\n    [\n        '#VALUE!',\n        15,\n        2,\n        'ABC',\n    ],\n    [\n        '#NUM!',\n        -1,\n        2,\n    ],\n    [\n        '#NUM!',\n        15,\n        -1,\n    ],\n    ['#VALUE!', 15, -1, '\"X\"'],\n    ['#NUM!', 15, 37], // radix > 36\n    ['#NUM!', 2 ** 54, 16], // number > 2 ** 53\n    ['00000120', 15, 3, 8.1],\n    ['exception'],\n    ['exception', 1],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/CEILING.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [3.0, '2.5, 1'],\n    [-4.0, '-2.5, -2'],\n    [1.5, '1.5, 0.1'],\n    [0.24, '0.234, 0.01'],\n    [-2.4, '-2.341, -0.1'],\n    [0.0, '8, 0'],\n    [9.0, '8, 1.5'],\n    ['#NUM!', '8, -1.5'],\n    'changed with pr 4466 #1' => [-7.5, '-8, 1.5'],\n    [-9.0, '-8, -1.5'],\n    [8.3, '8.26, 0.05'],\n    [2.35, '2.341, 0.05'],\n    ['#VALUE!', '123.456, \"abc\"'],\n    ['exception', '123.456'],\n    ['#VALUE!', '\"PhpSpreadsheet\", 1'],\n    ['exception', '\"PhpSpreadsheet\"'],\n    [211.0, '210.67, 1'],\n    [210.70, '210.67, 0.05'],\n    [210.65, '210.63, 0.05'],\n    [4.0, '2.98, 2'],\n    'changed with pr 4466 #2' => [-2, '-2.98, 2'],\n    [-5.0, '-4.5, -1'],\n    [0, ',1'],\n    [0, 'false,1'],\n    [1, 'true,1'],\n    ['#VALUE!', '\"\", 1'],\n    [2, 'A2, 1'],\n    [3, 'A3, 1'],\n    [-4, 'A4, -1'],\n    [-6, 'A5, -1'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/CEILINGMATH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [3, '2.5, 1'],\n    [-2, '\"-2.5\", \"-2\"'],\n    [-2, '-2.5, 2'],\n    [4, '2.5, -2'],\n    [0.0, '0.0, 1'],\n    ['0', '123.456, 0'],\n    [1.5, '1.5, 0.1'],\n    [0.24, '0.234, 0.01'],\n    [124, '123.456'],\n    ['#VALUE!', '\"ABC\"'],\n    [18, '17, 3'],\n    [20, '19, 4'],\n    [25, '24.3, 5'],\n    [7, '6.7, 1'],\n    [-8, '-8.1, 2'],\n    [-6, '-5.5, 2, -1'],\n    [-6, '-5.5, 2, 1'],\n    [-4, '-5.5, 2, 0'],\n    ['exception', ''],\n    [0, ','],\n    [0, ', 2'],\n    [0, 'false'],\n    [1, 'true'],\n    ['#VALUE!', '\"\", 2'],\n    [2, 'A2'],\n    [3, 'A3'],\n    [-3, 'A4'],\n    [-5, 'A5'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/CEILINGPRECISE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [3, '2.5, 1'],\n    [-2, '-2.5, -2'],\n    [-2, '-2.5, 2'],\n    [4, '2.5, -2'],\n    [0.0, '0.0, 1'],\n    [0.0, '123.456, 0'],\n    [1.5, '1.5, 0.1'],\n    [0.24, '0.234, 0.01'],\n    [124, '123.456, 1'],\n    ['#VALUE!', '\"ABC\"'],\n    [18, '17, 3'],\n    [20, '19, 4'],\n    ['exception', ''],\n    ['#VALUE!', '25, \"ABC\"'],\n    [0, ',1'],\n    [0, 'false,1'],\n    [1, 'true,1'],\n    ['#VALUE!', '\"\", 1'],\n    [2, 'A2, 1'],\n    [3, 'A3, 1'],\n    [-3, 'A4, 1'],\n    [-5, 'A5, 1'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/COMBIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// NumObjs, NumInSet, Result\n\nreturn [\n    [\n        35,\n        7,\n        3,\n    ],\n    [\n        28,\n        8,\n        2,\n    ],\n    [\n        56,\n        8,\n        3,\n    ],\n    [\n        70,\n        8,\n        4,\n    ],\n    [\n        161700,\n        100,\n        3,\n    ],\n    [\n        '#NUM!',\n        -7,\n        -10,\n    ],\n    [\n        '#NUM!',\n        -7,\n        10,\n    ],\n    [\n        '#NUM!',\n        7,\n        -10,\n    ],\n    [\n        '#NUM!',\n        2,\n        3,\n    ],\n    [\n        1,\n        2,\n        2,\n    ],\n    [\n        2,\n        2,\n        1,\n    ],\n    [\n        1,\n        2,\n        0,\n    ],\n    [\n        1,\n        2.5,\n        2,\n    ],\n    [\n        '#VALUE!',\n        'ABCD',\n        2,\n    ],\n    [\n        '#VALUE!',\n        3,\n        'EFGH',\n    ],\n    [\n        252,\n        10,\n        5,\n    ],\n    [\n        120,\n        10,\n        3,\n    ],\n    [\n        20349,\n        21,\n        5,\n    ],\n    [\n        6,\n        6,\n        1,\n    ],\n    [\n        15,\n        6,\n        2,\n    ],\n    [\n        20,\n        6,\n        3,\n    ],\n    [\n        15,\n        6,\n        4,\n    ],\n    [\n        6,\n        6,\n        5,\n    ],\n    [\n        1,\n        6,\n        6,\n    ],\n    [\n        '#NUM!',\n        6,\n        7,\n    ],\n    [1, 0, 0],\n    ['#NUM!', 0, 1],\n    ['#VALUE!', 1, true],\n    ['#VALUE!', 1, null],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/COMBINA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// NumObjs, NumInSet, Result\n\nreturn [\n    [\n        84,\n        7,\n        3,\n    ],\n    [\n        36,\n        8,\n        2,\n    ],\n    [\n        120,\n        8,\n        3,\n    ],\n    [\n        330,\n        8,\n        4,\n    ],\n    [\n        171700,\n        100,\n        3,\n    ],\n    [\n        '#NUM!',\n        -7,\n        -10,\n    ],\n    [\n        '#NUM!',\n        -7,\n        10,\n    ],\n    [\n        '#NUM!',\n        7,\n        -10,\n    ],\n    [\n        4,\n        2,\n        3,\n    ],\n    [\n        3,\n        2,\n        2,\n    ],\n    [\n        2,\n        2,\n        1,\n    ],\n    [\n        1,\n        2,\n        0,\n    ],\n    [\n        3,\n        2.5,\n        2,\n    ],\n    [\n        '#VALUE!',\n        'ABCD',\n        2,\n    ],\n    [\n        '#VALUE!',\n        3,\n        'EFGH',\n    ],\n    [\n        2002,\n        10,\n        5,\n    ],\n    [\n        220,\n        10,\n        3,\n    ],\n    [\n        53130,\n        21,\n        5,\n    ],\n    [\n        6,\n        6,\n        1,\n    ],\n    [\n        21,\n        6,\n        2,\n    ],\n    [\n        56,\n        6,\n        3,\n    ],\n    [\n        126,\n        6,\n        4,\n    ],\n    [\n        252,\n        6,\n        5,\n    ],\n    [\n        462,\n        6,\n        6,\n    ],\n    [\n        792,\n        6,\n        7,\n    ],\n    [1, 0, 0],\n    ['#NUM!', 0, 1],\n    ['#VALUE!', 1, true],\n    ['#VALUE!', 1, null],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/COS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [1, '0'],\n    [0, 'PI() / 2'],\n    [0.540302306, '1.0'],\n    [0.540302306, '-1.0'],\n    [-0.416146837, '2.0'],\n    [-0.416146837, '-2.0'],\n    [1, 'Q15'],\n    [1, 'false'],\n    [0.540302306, 'true'],\n    [-0.416146837, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/COSH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [1, '0'],\n    [1.543081, '\"1\"'],\n    [1.543081, '-1.0'],\n    [3.762196, '2.0'],\n    [11013.23292, '10'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/COT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', '\"ABC\"'],\n    [-1.54235104535692, -10],\n    [0.29581291553275, '\"-5\"'],\n    [0.0, '-PI() / 2'],\n    [-9.96664442325924, -0.1],\n    ['#DIV/0!', 0.0],\n    ['#DIV/0!', 'PI()'],\n    ['#DIV/0!', '-PI()'],\n    [9.96664442325924, 0.1],\n    [0.0, 'PI() / 2'],\n    [-0.29581291553275, 5],\n    [1.54235104535692, 10],\n    ['exception', ''],\n    ['#DIV/0!', 'Q15'],\n    ['#DIV/0!', 'null'],\n    ['#DIV/0!', 'false'],\n    [0.642092616, 'true'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/COTH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', '\"ABC\"'],\n    [-1.00000000412231, -10],\n    [-1.00000697470904, '-PI() * 2'],\n    [-1.00009080398202, '\"-5\"'],\n    [-1.00374187319732, '-PI()'],\n    [-1.09033141072737, '-PI() / 2'],\n    [-10.03331113225400, -0.1],\n    ['#DIV/0!', 0.0],\n    [10.03331113225400, 0.1],\n    [1.09033141072737, 'PI() / 2'],\n    [1.00374187319732, 'PI()'],\n    [1.00009080398202, 5],\n    [1.00000697470904, 'PI() * 2'],\n    [1.00000000412231, 10],\n    ['exception', ''],\n    ['#DIV/0!', 'Q15'],\n    ['#DIV/0!', 'null'],\n    ['#DIV/0!', 'false'],\n    [1.313035285, 'true'],\n    [-1.000060867, 'A5'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/CSC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', '\"ABC\"'],\n    [1.83816396088967, -10],\n    [1.04283521277141, '\"-5\"'],\n    [-1.0, '-PI() / 2'],\n    [-10.01668613163480, -0.1],\n    ['#DIV/0!', 0.0],\n    ['#DIV/0!', 'PI()'],\n    ['#DIV/0!', '-PI()'],\n    [10.01668613163480, 0.1],\n    [1.0, 'PI() / 2'],\n    [-1.04283521277141, 5],\n    [-1.83816396088967, 10],\n    [1.188395106, 'true'],\n    ['#DIV/0!', 'false'],\n    ['#DIV/0!', 'null'],\n    ['#DIV/0!', 'Q15'],\n    [1.634366435, 'A4'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/CSCH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', '\"ABC\"'],\n    [-0.00009079985971, -10],\n    [-0.00373489848829, '-PI() * 2'],\n    [-0.01347650583059, '\"-5\"'],\n    [-0.08658953753005, '-PI()'],\n    [-0.43453720809470, '-PI() / 2'],\n    [-9.98335275729611, -0.1],\n    ['#DIV/0!', 0.0],\n    [9.98335275729611, 0.1],\n    [0.43453720809470, 'PI() / 2'],\n    [0.08658953753005, 'PI()'],\n    [0.01347650583059, 5],\n    [0.00373489848829, 'PI() * 2'],\n    [0.00009079985971, 10],\n    [0.850918128, 'true'],\n    ['#DIV/0!', 'false'],\n    ['#DIV/0!', 'null'],\n    ['#DIV/0!', 'Q15'],\n    [-0.044763946, 'A4'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/DEGREES.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception'], // exception not enough args\n    ['#VALUE!', 'ABC'],\n    [45, M_PI / 4],\n    [0, 0],\n    [0, null],\n    [0, false],\n    ['#VALUE!', ''],\n    [57.29577951, true],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/EVEN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0, 'null'],\n    [6, 5.4],\n    [-6, -5.4],\n    [2, 1.5],\n    [2, 0.1],\n    [4, '\"3\"'],\n    [2, 2],\n    [-2, -2],\n    [-2, -1],\n    ['#VALUE!', '\"ABC\"'],\n    [2, 'true'],\n    [0, 'false'],\n    [0, 0],\n    [212, 210.6],\n    [4, 2.98],\n    [-4, -2.98],\n    [6, 6],\n    ['exception', ''],\n    ['4', 'A2'],\n    ['0', 'Q15'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/EXP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception'], // exception not enough args\n    ['#VALUE!', 'ABC'],\n    [2.7182818284590, 1],\n    [2.7182818284590, true],\n    [1, false],\n    [1, null],\n    ['#VALUE!', ''],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/FACT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        120,\n        5,\n    ],\n    [\n        1,\n        1.9,\n    ],\n    [\n        1,\n        0,\n    ],\n    [\n        '#NUM!',\n        -4,\n    ],\n    [\n        1,\n        1,\n    ],\n    [\n        6,\n        3,\n    ],\n    [\n        720,\n        6,\n    ],\n    [\n        3628800,\n        10,\n    ],\n    [\n        6,\n        3.2,\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/FACTDOUBLE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1,\n        0,\n    ],\n    [\n        48,\n        6,\n    ],\n    [\n        105,\n        7,\n    ],\n    [\n        15,\n        5,\n    ],\n    [\n        384,\n        8,\n    ],\n    [\n        135135,\n        13,\n    ],\n    [\n        '#NUM!',\n        -1,\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/FACTGNUMERIC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        120,\n        5,\n    ],\n    [\n        1.82735508062404,\n        1.9,\n    ],\n    [\n        1,\n        0,\n    ],\n    [\n        '#NUM!',\n        -4,\n    ],\n    [\n        1,\n        1,\n    ],\n    [\n        6,\n        3,\n    ],\n    [\n        720,\n        6,\n    ],\n    [\n        3628800,\n        10,\n    ],\n    [\n        7.75668953579318,\n        3.2,\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/FLOOR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [2, '2.5, 1'],\n    [-2, '-2.5, -2'],\n    [-4, '-2.5, 2'],\n    [0.0, '0.0, 1'],\n    ['#NUM!', '2.5, -2'],\n    [-4, '-2.5, 2'],\n    ['#DIV/0!', '123.456, 0'],\n    [1.5, '1.5, 0.1'],\n    [0.23, '0.234, 0.01'],\n    ['exception', '123.456'],\n    ['#VALUE!', '\"ABC\", 1'],\n    [15, '\"17\", \"3\"'],\n    [16, '19, 4'],\n    [0, ',1'],\n    [0, 'false,1'],\n    [1, 'true,1'],\n    ['#VALUE!', '\"\", 1'],\n    [1, 'A2, 1'],\n    [2, 'A3, 1'],\n    [-4, 'A4, 1'],\n    [-6, 'A5, 1'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/FLOORMATH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [2, '2.5, 1'],\n    [-4, '\"-2.5\", \"-2\"'],\n    [-4, '-2.5, 2'],\n    [2, '2.5, -2'],\n    [0.0, '0.0, 1'],\n    'corrected with PR 4466' => [0.0, '123.456, 0'],\n    [1.5, '1.5, 0.1'],\n    [0.23, '0.234, 0.01'],\n    [123, '123.456'],\n    ['#VALUE!', '\"ABC\"'],\n    [15, '17, 3'],\n    [16, '19, 4'],\n    [20, '24.3, 5'],\n    [6, '6.7, 1'],\n    [-10, '-8.1, 2'],\n    [-4, '-5.5, 2, -1'],\n    [-4, '-5.5, 2, 1'],\n    [-6, '-5.5, 2, 0'],\n    ['exception', ''],\n    [0, ','],\n    [0, ', 2'],\n    [0, 'false'],\n    [1, 'true'],\n    ['#VALUE!', '\"\", 2'],\n    [1, 'A2'],\n    [2, 'A3'],\n    [-4, 'A4'],\n    [-6, 'A5'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/FLOORPRECISE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [2, '2.5, 1'],\n    [-4, '-2.5, -2'],\n    [-4, '-2.5, 2'],\n    [2, '2.5, -2'],\n    [0.0, '0.0, 1'],\n    'corrected with PR 4446' => [0.0, '123.456, 0'],\n    [1.5, '1.5, 0.1'],\n    [0.23, '0.234, 0.01'],\n    [123, '123.456'],\n    ['#VALUE!', '\"ABC\"'],\n    [15, '17, 3'],\n    [16, '19, 4'],\n    ['exception', ''],\n    ['#VALUE!', '25, \"ABC\"'],\n    [0, ',1'],\n    [0, 'false,1'],\n    [1, 'true,1'],\n    ['#VALUE!', '\"\", 1'],\n    [1, 'A2, 1'],\n    [2, 'A3, 1'],\n    [-4, 'A4, 1'],\n    [-6, 'A5, 1'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/GCD.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1,\n        5,\n        2,\n    ],\n    [\n        12,\n        24,\n        36,\n    ],\n    [\n        1,\n        7,\n        1,\n    ],\n    [\n        5,\n        5,\n        0,\n    ],\n    [\n        5,\n        30,\n        15,\n        10,\n    ],\n    [\n        14,\n        42,\n        56,\n        140,\n    ],\n    [\n        4,\n        24,\n        28,\n        40,\n    ],\n    [\n        9,\n        27,\n        45,\n        54,\n    ],\n    [\n        14,\n        84,\n        126,\n        196,\n    ],\n    [\n        1,\n        3,\n        5,\n        7,\n    ],\n    [\n        1,\n        3,\n        5,\n        0,\n    ],\n    [\n        '#NUM!',\n        3,\n        5,\n        -7,\n    ],\n    [\n        3,\n        3,\n        6,\n        12,\n    ],\n    [\n        3,\n        3,\n        6,\n        '12',\n    ],\n    [\n        '#VALUE!',\n        3,\n        6,\n        'ABC',\n    ],\n    [\n        3,\n        3,\n    ],\n    [\n        5,\n        15,\n        10,\n        25,\n    ],\n    [\n        4,\n        0,\n        8,\n        12,\n    ],\n    [\n        1,\n        7,\n        2,\n    ],\n    [\n        0,\n        0,\n        0,\n    ],\n    [\n        2,\n        10.5,\n        2.6,\n    ],\n    [\n        4,\n        16.9,\n        12.1,\n    ],\n    [\n        13,\n        182,\n        481,\n        143,\n    ],\n    [13, 182, 481, null, 143],\n    ['#VALUE!', null, null, null, null],\n    ['#VALUE!', null],\n    ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/INT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    [5, '5.4'],\n    [-6, '-5.4'],\n    [-4, '-3.2'],\n    [1, '\"1.5\"'],\n    [0, '0.1'],\n    [-1, '-0.1'],\n    [3, '3'],\n    [2, '2'],\n    [-3, '-2.01'],\n    [-2, '-2'],\n    [-1, '-1'],\n    ['#VALUE!', '\"ABC\"'],\n    ['#VALUE!', '\"\"'],\n    [1, 'true'],\n    [0, 'false'],\n    [0, '0'],\n    [-4, '\"-3.5\"'],\n    [8, '8.9'],\n    [-9, '-8.9'],\n    [1, 'A2'],\n    [2, 'A3'],\n    [-4, 'A4'],\n    [-6, 'A5'],\n    [0, 'B1'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/LCM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        10,\n        5,\n        2,\n    ],\n    [\n        72,\n        24,\n        36,\n    ],\n    [\n        84,\n        3,\n        7,\n        12,\n    ],\n    [\n        72,\n        24.899999999999999,\n        36.899999999999999,\n    ],\n    [\n        726,\n        6,\n        22,\n        121,\n    ],\n    [\n        '#VALUE!',\n        6,\n        'ABC',\n    ],\n    [\n        '#NUM!',\n        24,\n        -12,\n    ],\n    [\n        0,\n        3,\n        0,\n    ],\n    [\n        5,\n        1,\n        5,\n    ],\n    [\n        150,\n        15,\n        10,\n        25,\n    ],\n    [\n        24,\n        1,\n        8,\n        12,\n    ],\n    [\n        14,\n        7,\n        2,\n    ],\n    ['#NUM!', 7, 0, -1],\n    ['#VALUE!', 7, 0, 'X'],\n    [18, 9.1, 6.7],\n    [12, 6, null, 4],\n    ['#VALUE!', null, null, null],\n    ['#VALUE!', null],\n    ['#VALUE!', 6, false, 4],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/LN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception'], // exception not enough args\n    ['#VALUE!', 'ABC'],\n    ['#NUM!', 0],\n    ['#NUM!', -1],\n    [-2.302585, 0.1],\n    [0, 1],\n    [2.302585, 10],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/LOG.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// number, base, result\n\nreturn [\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n    [\n        '#VALUE!',\n        '123ABC',\n    ],\n    [\n        0.091491094267951101,\n        1.2344999999999999,\n    ],\n    [\n        '#NUM!',\n        -1.5,\n        -0.75,\n    ],\n    [\n        '#NUM!',\n        0,\n        -0.75,\n    ],\n    [\n        '#NUM!',\n        3.75,\n        -0.75,\n    ],\n    [\n        '#NUM!',\n        -1.5,\n        0,\n    ],\n    [\n        '#NUM!',\n        0,\n        0,\n    ],\n    [\n        '#NUM!',\n        3.75,\n        0,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        0.75,\n    ],\n    [\n        '#NUM!',\n        0,\n        0.75,\n    ],\n    [\n        1.0,\n        0.75,\n        0.75,\n    ],\n    [\n        -1.40942083965321,\n        1.5,\n        0.75,\n    ],\n    [\n        -2.8188416793064199,\n        2.25,\n        0.75,\n    ],\n    [\n        -3.8188416793064199,\n        3,\n        0.75,\n    ],\n    [\n        -4.5945019399978904,\n        3.75,\n        0.75,\n    ],\n    [\n        -5.2282625189596299,\n        4.5,\n        0.75,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        1.5,\n    ],\n    [\n        '#NUM!',\n        0,\n        1.5,\n    ],\n    [\n        -0.70951129135145496,\n        0.75,\n        1.5,\n    ],\n    [\n        1.0,\n        1.5,\n        1.5,\n    ],\n    [\n        2.0,\n        2.25,\n        1.5,\n    ],\n    [\n        2.7095112913514501,\n        3,\n        1.5,\n    ],\n    [\n        3.25985100456466,\n        3.75,\n        1.5,\n    ],\n    [\n        3.7095112913514501,\n        4.5,\n        1.5,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        2.25,\n    ],\n    [\n        '#NUM!',\n        0,\n        2.25,\n    ],\n    [\n        -0.35475564567572698,\n        0.75,\n        2.25,\n    ],\n    [\n        0.5,\n        1.5,\n        2.25,\n    ],\n    [\n        1.0,\n        2.25,\n        2.25,\n    ],\n    [\n        1.3547556456757299,\n        3,\n        2.25,\n    ],\n    [\n        1.62992550228233,\n        3.75,\n        2.25,\n    ],\n    [\n        1.8547556456757299,\n        4.5,\n        2.25,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        3,\n    ],\n    [\n        '#NUM!',\n        0,\n        3,\n    ],\n    [\n        -0.261859507142915,\n        0.75,\n        3,\n    ],\n    [\n        0.36907024642854303,\n        1.5,\n        3,\n    ],\n    [\n        0.73814049285708505,\n        2.25,\n        3,\n    ],\n    [\n        1.0,\n        3,\n        3,\n    ],\n    [\n        1.20311401357501,\n        3.75,\n        3,\n    ],\n    [\n        1.36907024642854,\n        4.5,\n        3,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        3.75,\n    ],\n    [\n        '#NUM!',\n        0,\n        3.75,\n    ],\n    [\n        -0.21765144798273001,\n        0.75,\n        3.75,\n    ],\n    [\n        0.306762486567556,\n        1.5,\n        3.75,\n    ],\n    [\n        0.61352497313511101,\n        2.25,\n        3.75,\n    ],\n    [\n        0.83117642111784096,\n        3,\n        3.75,\n    ],\n    [\n        1.0,\n        3.75,\n        3.75,\n    ],\n    [\n        1.1379389076854001,\n        4.5,\n        3.75,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        4.5,\n    ],\n    [\n        '#NUM!',\n        0,\n        4.5,\n    ],\n    [\n        -0.19126813092755501,\n        0.75,\n        4.5,\n    ],\n    [\n        0.26957728969081501,\n        1.5,\n        4.5,\n    ],\n    [\n        0.53915457938163003,\n        2.25,\n        4.5,\n    ],\n    [\n        0.73042271030918504,\n        3,\n        4.5,\n    ],\n    [\n        0.87878179860642203,\n        3.75,\n        4.5,\n    ],\n    [\n        1.0,\n        4.5,\n        4.5,\n    ],\n    [\n        6,\n        64,\n        2,\n    ],\n    [\n        2,\n        100,\n    ],\n    [\n        -2,\n        4,\n        0.5,\n    ],\n    [\n        2.6989700043360001,\n        500,\n    ],\n    [\n        1,\n        10,\n    ],\n    [\n        3,\n        8,\n        2,\n    ],\n    [\n        4.454347342888,\n        86,\n        2.7182818000000002,\n    ],\n    [\n        1.3010299956639999,\n        20,\n    ],\n    [\n        1.3010299956639999,\n        20,\n        10,\n    ],\n    [\n        0.93067655807299998,\n        20,\n        25,\n    ],\n    [\n        1.9756909715740001,\n        25,\n        5.0999999999999996,\n    ],\n    [\n        4.82273630215,\n        200,\n        3,\n    ],\n    ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/LOG10.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception'], // exception not enough args\n    ['#VALUE!', 'ABC'],\n    ['#NUM!', 0],\n    ['#NUM!', -1],\n    [-1, 0.1],\n    [0, 1],\n    [0.301030, 2],\n    [1, 10],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/MDETERM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0,\n        [\n            [1, 2, 3],\n            [4, 5, 6],\n            [7, 8, 9],\n        ],\n    ],\n    [\n        0,\n        [\n            [1.1, 2.2, 3.3],\n            [4.4, 5.5, 6.6],\n            [7.7, 8.8, 9.9],\n        ],\n    ],\n    [\n        0,\n        [\n            [10, 20, 30],\n            [40, 50, 60],\n            [70, 80, 90],\n        ],\n    ],\n    [\n        -360.0,\n        [\n            [8, 1, 6],\n            [3, 5, 7],\n            [4, 9, 2],\n        ],\n    ],\n    [\n        -9,\n        [\n            [5, 2],\n            [7, 1],\n        ],\n    ],\n    [\n        40,\n        [\n            [6, 4, 2],\n            [3, 5, 3],\n            [2, 3, 4],\n        ],\n    ],\n    [\n        1.81,\n        [\n            [0.20, 1.0],\n            [0.35, 10.8],\n        ],\n    ],\n    [\n        -2,\n        [\n            [1, 2],\n            [3, 4],\n        ],\n    ],\n    [\n        -3,\n        [\n            [1, 2, 1],\n            [3, 4, 2],\n            [1, 1, 2],\n        ],\n    ],\n    [\n        88,\n        [\n            [1, 3, 8, 5],\n            [1, 3, 6, 1],\n            [1, 1, 1, 0],\n            [7, 3, 10, 2],\n        ],\n    ],\n    [\n        1,\n        [\n            [3, 6, 1],\n            [1, 1, 0],\n            [3, 10, 2],\n        ],\n    ],\n    [\n        -3,\n        [\n            [3, 6],\n            [1, 1],\n        ],\n    ],\n    [\n        -3,\n        [\n            [3, '=6'],\n            [1, 1],\n        ],\n    ],\n    [\n        '#VALUE!', // null in array\n        [\n            [0.20, 1.00, -0.90],\n            [0.35, 10.80, 4.00],\n            [-3.15, 5.00, null],\n        ],\n    ],\n    [\n        '#VALUE!', // string in array\n        [\n            [0.20, 1.00, -0.90],\n            [0.35, 10.80, '=\"4.00\"'],\n            [-3.15, 5.00, 6.00],\n        ],\n    ],\n    [\n        '#VALUE!', // string in array\n        [\n            [0.20, 1.00, -0.90],\n            [0.35, 10.80, 'Y'],\n            [-3.15, 5.00, 6.00],\n        ],\n    ],\n    [\n        '#VALUE!', // not square\n        [\n            [1, 3, 8, 5],\n            [1, 3, 6, 1],\n        ],\n    ],\n    [1, '{3,6,1;1,1,0;3,10,2}'], // bracket notation\n    [2, 2], // scalar treated as 1x1\n    ['#VALUE!', '\"y\"'], // invalid scalar treated as 1x1\n    ['#VALUE!', '\"2\"'], // invalid scalar treated as 1x1\n    ['#VALUE!', '{3,6,1;1,1,0}'], // not square\n    ['#VALUE!', '{3,6, \"y\";1,1,0;3,10,2}'], // first row has string entry\n    ['exception', ''],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/MINVERSE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            [0.147222222222222, -0.14444444444444399, 0.063888888888888898],\n            [-0.061111111111111102, 0.022222222222222199, 0.105555555555556],\n            [-0.0194444444444444, 0.18888888888888899, -0.102777777777778],\n        ],\n        [\n            [8, 1, 6],\n            [3, 5, 7],\n            [4, 9, 2],\n        ],\n    ],\n    [\n        [\n            [4, -1],\n            [2, 0],\n        ],\n        [\n            [0.0, 0.5],\n            [-1.0, 2.0],\n        ],\n    ],\n    [\n        [\n            [1, 2, 1],\n            [3, 4, -1],\n            [0, 2, 0],\n        ],\n        [\n            [0.25, 0.25, -0.75],\n            [0.00, 0.00, 0.50],\n            [0.75, -0.25, -0.25],\n        ],\n    ],\n    [\n        [\n            [-0.4545454545455, 1.8181818181818, 0.2727272727273, -0.4545454545455],\n            [-0.4545454545455, 1.8181818181818, -0.7272727272727, -0.4545454545455],\n            [0.9090909090909, 1.3636363636364, 0.4545454545455, 0.9090909090909],\n            [2.2727272727273, 0.9090909090909, 5.6363636363636, 3.2727272727273],\n        ],\n        [\n            [3.2, -4.8, 2.8, -1.0],\n            [0.2, 0.2, 0.2, 0.0],\n            [1.0, -1.0, 0.0, 0.0],\n            [-4.0, 5.0, -2.0, 1.0],\n        ],\n    ],\n    [\n        [\n            [1, 2],\n            [3, 4],\n        ],\n        [\n            [-2.0, 1.0],\n            [1.5, -0.5],\n        ],\n    ],\n    [\n        [\n            [1, 2, 1],\n            [3, 4, 2],\n            [1, 1, 2],\n        ],\n        [\n            [-2, 1, 0],\n            [1.3333333333333299, -0.33333333333332998, -0.33333333333332998],\n            [0.33333333333332998, -0.33333333333332998, 0.66666666666666996],\n        ],\n    ],\n    [\n        [\n            [2, 3],\n            [4, 5],\n        ],\n        [\n            [-2.5, 1.5],\n            [2.0, -1.0],\n        ],\n    ],\n    [\n        [\n            [5, 8],\n            [7, 9],\n        ],\n        [\n            [-0.81818181818181801, 0.72727272727272696],\n            [0.63636363636363602, -0.45454545454545497],\n        ],\n    ],\n    [\n        [\n            [45, 78],\n            [17, 50],\n        ],\n        [\n            [0.054112554112554001, -0.084415584415584],\n            [-0.018398268398268001, 0.048701298701299002],\n        ],\n    ],\n    [\n        [\n            [2, 2],\n            [2, 1],\n        ],\n        [\n            [-0.5, 1.0],\n            [1.0, -1.0],\n        ],\n    ],\n    [\n        '#VALUE!', // Not Square\n        [\n            [-0.5, 1.0, 1.5],\n            [1.0, -1.0, 2.0],\n        ],\n    ],\n    [\n        '#NUM!', // Determinant is 0\n        [\n            [3, 4],\n            [6, 8],\n        ],\n    ],\n    [\n        '#VALUE!', // null in array\n        [\n            [3, null],\n            [6, 8],\n        ],\n    ],\n    [\n        '#VALUE!', // string in array\n        [\n            [3, 4],\n            ['6', 8],\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/MMULT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            [7, 10],\n            [15, 22],\n        ],\n        [\n            [1, 2],\n            [3, 4],\n        ],\n        [\n            [1, 2],\n            [3, 4],\n        ],\n    ],\n    [\n        [\n            [30,  36,  42],\n            [66,  81,  96],\n            [102, 126, 150],\n        ],\n        [\n            [1, 2, 3],\n            [4, 5, 6],\n            [7, 8, 9],\n        ],\n        [\n            [1, 2, 3],\n            [4, 5, 6],\n            [7, 8, 9],\n        ],\n    ],\n    [\n        [\n            [10.08, 14.40],\n            [21.60, 31.68],\n        ],\n        [\n            [1.2, 2.4],\n            [3.6, 4.8],\n        ],\n        [\n            [1.2, 2.4],\n            [3.6, 4.8],\n        ],\n    ],\n    [\n        [\n            [20.48, 30.60],\n            [50.40, 79.88],\n        ],\n        [\n            [1.2, 3.4],\n            [5.6, 7.8],\n        ],\n        [\n            [1.2, 3.4],\n            [5.6, 7.8],\n        ],\n    ],\n    [\n        [\n            [62.00,  49.46],\n            [176.40, 144.50],\n        ],\n        [\n            [1.2, 2.3, 3.4, 4.5],\n            [5.6, 6.7, 7.8, 8.9],\n        ],\n        [\n            [9.8, 8.7],\n            [7.6, 6.5],\n            [5.4, 4.3],\n            [3.2, 2.1],\n        ],\n    ],\n    [\n        [\n            [17],\n            [39],\n        ],\n        [\n            [1, 2],\n            [3, 4],\n        ],\n        [\n            [5],\n            [6],\n        ],\n    ],\n    [\n        '#VALUE!', // null in first array\n        [\n            [1, 2],\n            [null, 4],\n        ],\n        [\n            [5],\n            [6],\n        ],\n    ],\n    [\n        '#VALUE!', // string in second array\n        [\n            [1, 2],\n            [3, 4],\n        ],\n        [\n            ['5'],\n            [6],\n        ],\n    ],\n    // Mismatched dimensions (2x2) and (1x1)\n    [\n        '#VALUE!',\n        [\n            [1, 2],\n            [3, 4],\n        ],\n        [\n            [2],\n        ],\n    ],\n    // Mismatched dimensions (2x2) and individual cell\n    [\n        '#VALUE!',\n        [\n            [1, 2],\n            [3, 4],\n        ],\n        [\n            2,\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/MOD.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        2,\n        19,\n        17,\n    ],\n    [\n        -7,\n        19,\n        -13,\n    ],\n    [\n        0,\n        34,\n        17,\n    ],\n    [\n        '#DIV/0!',\n        34,\n        0,\n    ],\n    [\n        1,\n        3,\n        2,\n    ],\n    [\n        1,\n        -3,\n        2,\n    ],\n    [\n        -1,\n        3,\n        -2,\n    ],\n    [\n        -1,\n        -3,\n        -2,\n    ],\n    [\n        1.2,\n        2.5,\n        1.3,\n    ],\n    [\n        '#VALUE!', // had been 0, which was wrong\n        '',\n        1,\n    ],\n    [0, null, 5],\n    [0, false, 5],\n    [1, true, 5],\n    ['#VALUE!', 'XYZ', 2],\n    ['#VALUE!', 2, 'XYZ'],\n    ['exception', 2],\n    ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/MROUND.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [9, '10,3'],\n    [-9, '-10,-3'],\n    [1.4, '1.3,0.2'],\n    [0, '5,0'],\n    [3.142, '3.14159, 0.002'],\n    [-3.140, '-3.14159,-0.02'],\n    [31420, '\"31415.92654\", 10'],\n    [31416, '31415.92654,\"1\"'],\n    [0, '0,5'],\n    ['#NUM!', '5,-2'],\n    ['#VALUE!', '\"ABC\",1'],\n    ['#VALUE!', '1.234, \"ABC\"'],\n    [0, ', 2'],\n    ['#VALUE!', 'false, 2'],\n    ['#VALUE!', 'true, 2'],\n    ['#VALUE!', '\"\", 2'],\n    ['exception', ''],\n    ['exception', '5'],\n    [1, 'A2, 1'],\n    [3, 'A3, 1'],\n    [-4, 'A4, -1'],\n    [-5, 'A5, -1'],\n    [0, 'B1, 1'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/MULTINOMIAL.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1260,\n        2,\n        3,\n        4,\n    ],\n    [\n        27720,\n        3,\n        1,\n        2,\n        5,\n    ],\n    [1, 0],\n    ['#NUM!', 3, -1],\n    ['#VALUE!', 3, 'X'],\n    ['#VALUE!', 3, null],\n    ['#VALUE!', 3, true],\n    ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ODD.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [1, 'null'],\n    [7, 5.4],\n    [-7, -5.4],\n    [3, 1.5],\n    [1, 0.1],\n    [3, 3],\n    [3, 2],\n    [-3, -2],\n    [-1, -1],\n    ['#VALUE!', '\"ABC\"'],\n    [1, 'true'],\n    [1, 'false'],\n    [1, 0],\n    ['exception', ''],\n    ['5', 'A2'],\n    ['1', 'Q15'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/PI.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [3.141592653589793],\n    'should not supply any arguments' => ['exception', 1],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/POWER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#NUM!',\n        -1.5,\n        -1.5,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        -1.5,\n    ],\n    [\n        '#DIV/0!',\n        0,\n        -1.5,\n    ],\n    [\n        1.5396007178390001,\n        0.75,\n        -1.5,\n    ],\n    [\n        0.54433105395182002,\n        1.5,\n        -1.5,\n    ],\n    [\n        0.2962962962963,\n        2.25,\n        -1.5,\n    ],\n    [\n        0.19245008972988001,\n        3,\n        -1.5,\n    ],\n    [\n        0.13770607453181999,\n        3.75,\n        -1.5,\n    ],\n    [\n        0.10475656017579001,\n        4.5,\n        -1.5,\n    ],\n    [\n        '#NUM!',\n        -1.5,\n        -0.75,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        -0.75,\n    ],\n    [\n        '#DIV/0!',\n        0,\n        -0.75,\n    ],\n    [\n        1.2408064788027999,\n        0.75,\n        -0.75,\n    ],\n    [\n        0.73778794646687995,\n        1.5,\n        -0.75,\n    ],\n    [\n        0.54433105395182002,\n        2.25,\n        -0.75,\n    ],\n    [\n        0.43869133765083002,\n        3,\n        -0.75,\n    ],\n    [\n        0.37108769116182999,\n        3.75,\n        -0.75,\n    ],\n    [\n        0.32366118113822001,\n        4.5,\n        -0.75,\n    ],\n    [\n        1,\n        -1.5,\n        0,\n    ],\n    [\n        1,\n        -0.75,\n        0,\n    ],\n    [\n        '#NUM!',\n        0,\n        0,\n    ],\n    [\n        1,\n        0.75,\n        0,\n    ],\n    [\n        1,\n        1.5,\n        0,\n    ],\n    [\n        1,\n        2.25,\n        0,\n    ],\n    [\n        1,\n        3,\n        0,\n    ],\n    [\n        1,\n        3.75,\n        0,\n    ],\n    [\n        1,\n        4.5,\n        0,\n    ],\n    [\n        '#NUM!',\n        -1.5,\n        0.75,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        0.75,\n    ],\n    [\n        0,\n        0,\n        0.75,\n    ],\n    [\n        0.80592744886765999,\n        0.75,\n        0.75,\n    ],\n    [\n        1.3554030054147701,\n        1.5,\n        0.75,\n    ],\n    [\n        1.8371173070873801,\n        2.25,\n        0.75,\n    ],\n    [\n        2.2795070569547802,\n        3,\n        0.75,\n    ],\n    [\n        2.6947808397231299,\n        3.75,\n        0.75,\n    ],\n    [\n        3.0896507158606799,\n        4.5,\n        0.75,\n    ],\n    [\n        '#NUM!',\n        -1.5,\n        1.5,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        1.5,\n    ],\n    [\n        0,\n        0,\n        1.5,\n    ],\n    [\n        0.64951905283833,\n        0.75,\n        1.5,\n    ],\n    [\n        1.8371173070873801,\n        1.5,\n        1.5,\n    ],\n    [\n        3.375,\n        2.25,\n        1.5,\n    ],\n    [\n        5.1961524227066302,\n        3,\n        1.5,\n    ],\n    [\n        7.2618437741389101,\n        3.75,\n        1.5,\n    ],\n    [\n        9.5459415460183905,\n        4.5,\n        1.5,\n    ],\n    [\n        '#NUM!',\n        -1.5,\n        2.25,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        2.25,\n    ],\n    [\n        0,\n        0,\n        2.25,\n    ],\n    [\n        0.52346523324492999,\n        0.75,\n        2.25,\n    ],\n    [\n        2.4900343193257202,\n        1.5,\n        2.25,\n    ],\n    [\n        6.2002709114199197,\n        2.25,\n        2.25,\n    ],\n    [\n        11.8446661165724,\n        3,\n        2.25,\n    ],\n    [\n        19.569077463612199,\n        3.75,\n        2.25,\n    ],\n    [\n        29.4936251312199,\n        4.5,\n        2.25,\n    ],\n    [\n        -3.375,\n        -1.5,\n        3,\n    ],\n    [\n        -0.421875,\n        -0.75,\n        3,\n    ],\n    [\n        0,\n        0,\n        3,\n    ],\n    [\n        0.421875,\n        0.75,\n        3,\n    ],\n    [\n        3.375,\n        1.5,\n        3,\n    ],\n    [\n        11.390625,\n        2.25,\n        3,\n    ],\n    [\n        27,\n        3,\n        3,\n    ],\n    [\n        52.734375,\n        3.75,\n        3,\n    ],\n    [\n        91.125,\n        4.5,\n        3,\n    ],\n    [\n        '#NUM!',\n        -1.5,\n        3.75,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        3.75,\n    ],\n    [\n        0,\n        0,\n        3.75,\n    ],\n    [\n        0.34000064249104001,\n        0.75,\n        3.75,\n    ],\n    [\n        4.5744851432748401,\n        1.5,\n        3.75,\n    ],\n    [\n        20.9259143260422,\n        2.25,\n        3.75,\n    ],\n    [\n        61.546690537779,\n        3,\n        3.75,\n    ],\n    [\n        142.10758334477501,\n        3.75,\n        3.75,\n    ],\n    [\n        281.54442148280401,\n        4.5,\n        3.75,\n    ],\n    [\n        '#NUM!',\n        -1.5,\n        4.5,\n    ],\n    [\n        '#NUM!',\n        -0.75,\n        4.5,\n    ],\n    [\n        0,\n        0,\n        4.5,\n    ],\n    [\n        0.27401585041616999,\n        0.75,\n        4.5,\n    ],\n    [\n        6.2002709114199197,\n        1.5,\n        4.5,\n    ],\n    [\n        38.443359375,\n        2.25,\n        4.5,\n    ],\n    [\n        140.29611541307901,\n        3,\n        4.5,\n    ],\n    [\n        382.94879277685698,\n        3.75,\n        4.5,\n    ],\n    [\n        869.87392338092604,\n        4.5,\n        4.5,\n    ],\n    ['#VALUE!', 'x', 2],\n    ['#VALUE!', 2, 'x'],\n    'exponent is null' => [1, 2, null],\n    'base is null' => [0, null, 2],\n    'both null' => ['#NUM!', null, null],\n    'exponent is bool' => [2, 2, true],\n    'base is bool' => [0, false, 2],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/PRODUCT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        2250,\n        5,\n        15,\n        30,\n    ],\n    [\n        4500,\n        5,\n        15,\n        30,\n        2,\n    ],\n    [\n        1440,\n        3,\n        6,\n        2,\n        8,\n        5,\n    ],\n    [\n        12,\n        3,\n        4,\n    ],\n    [\n        54,\n        3,\n        4,\n        4.5,\n    ],\n    [\n        -366.12,\n        3,\n        4,\n        4.5,\n        -6.7800000000000002,\n    ],\n    [\n        732.24000000000001,\n        3,\n        4,\n        4.5,\n        -6.7800000000000002,\n        -2,\n    ],\n    [\n        31.25,\n        12.5,\n        null,\n        2.5,\n    ],\n    [\n        31.25,\n        12.5,\n        2.5,\n        null,\n    ],\n    [\n        12.5,\n        12.5,\n        null,\n        null,\n    ],\n    [\n        0.0,\n        null,\n        null,\n        null,\n    ],\n    ['#VALUE!', 1, 'y', 3],\n    [6, 1, '2', 3],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/QUOTIENT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        2,\n        5,\n        2,\n    ],\n    [\n        1,\n        4.5,\n        3.1000000000000001,\n    ],\n    [\n        -3,\n        -10,\n        3,\n    ],\n    [\n        4,\n        10,\n        2.2000000000000002,\n    ],\n    [\n        2,\n        5.5,\n        2.6669999999999998,\n    ],\n    [\n        -3,\n        -7,\n        2,\n    ],\n    ['#VALUE!', 'X', 5],\n    ['#VALUE!', 5, 'X'],\n    ['#DIV/0!', 5, 0],\n    ['#DIV/0!', 5, null],\n    ['#DIV/0!', 0, 0],\n    [0, 0, 5],\n    ['exception'],\n    ['exception', 1],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/RADIANS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception'], // exception not enough args\n    ['#VALUE!', 'ABC'],\n    [M_PI / 4, 45],\n    [0, 0],\n    [0, null],\n    [0, false],\n    ['#VALUE!', ''],\n    ['#VALUE!', '=15+\"\"'],\n    [0, '=15+\"-15\"'],\n    [0.017453293, true],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/RANDBETWEEN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', 'y', 3],\n    ['#VALUE!', 3, 'y'],\n    ['#NUM!', 3, -3],\n    ['#NUM!', 30, 10],\n    [0, '20', 30],\n    [0, 20, '30'],\n    [0, 20, 30],\n    [0, null, 30],\n    [0, false, 30],\n    [0, true, 30],\n    [0, -30, true],\n    [0, -30, false],\n    [0, -30, null],\n    ['exception', -30],\n    ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ROMAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['XLIX', '49'],\n    ['L', '50'],\n    ['MMXII', '2012'],\n    ['CMXCIX', '999'],\n    ['CDXCIX', '499'],\n    ['MMXVIII', '2018'],\n    ['#VALUE!', '4000'],\n    ['#VALUE!', '-1'],\n    ['#VALUE!', '0, 5'],\n    ['#VALUE!', '0, -1'],\n    ['exception', ''],\n    ['', '0'],\n    ['', '0, 0'],\n    ['', '0, 1'],\n    ['', '0, 2'],\n    ['', '0, 3'],\n    ['', '0, 4'],\n    // 5 different results\n    ['CMXCIX', '999'],\n    ['CMXCIX', '999, true'],\n    ['CMXCIX', '999, 0'],\n    ['LMVLIV', '999, 1'],\n    ['XMIX', '999, 2'],\n    ['VMIV', '999, 3'],\n    ['IM', '999, 4'],\n    ['IM', '999, false'],\n    // 4 different results\n    ['MMMCDXCVIII', '3498'],\n    ['MMMCDXCVIII', '3498, 0'],\n    ['MMMLDVLIII', '3498, 1'],\n    ['MMMXDVIII', '3498, 2'],\n    ['MMMVDIII', '3498, 3'],\n    ['MMMVDIII', '3498, 4'],\n    // 3 different results\n    ['CDXC', '490'],\n    ['CDXC', '490, 0'],\n    ['LDXL', '490, 1'],\n    ['XD', '490, 2'],\n    ['XD', '490, 3'],\n    ['XD', '490, 4'],\n    // 2 different results\n    ['XLV', '45'],\n    ['XLV', '45, 0'],\n    ['VL', '45, 1'],\n    ['VL', '45, 2'],\n    ['VL', '45, 3'],\n    ['VL', '45, 4'],\n    // all 5 results the same\n    ['I', '1'],\n    ['I', '1, 0'],\n    ['I', '1, 1'],\n    ['I', '1, 2'],\n    ['I', '1, 3'],\n    ['I', '1, 4'],\n    // other tests\n    ['XLIX', 'A3'],\n    ['IL', 'A3, 4'],\n    ['', 'C3'],\n    ['#VALUE!', '\"ABC\"'],\n    ['#VALUE!', '46, \"ABC\"'],\n    ['MMMCMXCIX', '3999'],\n    ['MMMIM', '3999, 4'],\n    ['MMMIM', '\"3999\", \"4\"'],\n    ['I', 'true'],\n    ['', 'false'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ROUND.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0, '0,2'],\n    [663, '662.79, 0'],\n    [662.8, '662.79, 1'],\n    [50, '54.1, -1'],\n    [60, '55.1, -1'],\n    [-23.7, '-23.67 ,1'],\n    [3, '3.2, 0'],\n    [3, '3.2, 0.01'],\n    [77, '76.9, 0'],\n    [3.142, '3.14159, 3'],\n    [-3.1, '-3.14159, 1'],\n    [31400, '31415.92654, \"-2\"'],\n    [31420, '31415.92654, -1'],\n    [4.44, '4.4400, 2'],\n    [5.20, '2.26 + 2.941, 2'],\n    [-4.44, '-4.4400, 2'],\n    [-5.20, '-2.26 - 2.94, 2'],\n    ['#VALUE!', '\"ABC\", 1'],\n    ['#VALUE!', '1.234, \"ABC\"'],\n    [0, ', 0'],\n    [0, 'false, 0'],\n    [1, 'true, 0'],\n    ['#VALUE!', '\"\", 0'],\n    [1, 'A2, 0'],\n    [3, 'A3, 0'],\n    [-4, 'A4, 0'],\n    [-5, 'A5, 0'],\n    [0, 'B1, 0'],\n    ['exception', ''],\n    ['exception', '35.51'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ROUNDDOWN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0, '0,2'],\n    [662, '662.79,0'],\n    [662.7, '662.79, 1'],\n    [50, '54.1, -1'],\n    [50, '55.1, -1'],\n    [-23.6, '-23.67, 1'],\n    [3, '3.2, 0'],\n    [3, '3.2, 0.01'],\n    [76, '76.9, 0'],\n    [3.141, '3.14159, 3'],\n    [-3.1, '-3.14159,1'],\n    [31400, '31415.92654,\"-2\"'],\n    [31410, '31415.92654,-1'],\n    [4.44, '4.4400,2'],\n    [5.20, '2.26 + 2.94, 2'],\n    [-4.44, '-4.4400,2'],\n    [-5.20, '-2.26 - 2.94, 2'],\n    ['#VALUE!', '\"ABC\",1'],\n    ['#VALUE!', '1.234,\"ABC\"'],\n    [0, ', 0'],\n    [0, 'false, 0'],\n    [1, 'true, 0'],\n    ['#VALUE!', '\"\", 0'],\n    [1, 'A2, 0'],\n    [2, 'A3, 0'],\n    [-3, 'A4, 0'],\n    [-5, 'A5, 0'],\n    [0, 'B1, 0'],\n    ['exception', ''],\n    ['exception', '35.51'],\n    'negative number and precision ROUNDDOWN' => [-31400, '-31415.92654, -2'],\n    'issue 4213 #1' => [249.0, '249.9975, 0'],\n    'issue 4213 #2' => [-249.0, '-249.9975, 0'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/ROUNDUP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0, '0,2'],\n    [663, '662.79, 0'],\n    [662.8, '662.79,1'],\n    [60, '54.1,-1'],\n    [60, '55.1,-1'],\n    [-23.7, '-23.67,1'],\n    [4, '3.2,0'],\n    [4, '3.2,0.01'],\n    [77, '76.9,0'],\n    [3.142, '3.14159,3'],\n    [-3.2, '-3.14159,1'],\n    [31500, '31415.92654,\"-2\"'],\n    [31420, '31415.92654,-1'],\n    [4.44, '4.4400,2'],\n    [5.20, '2.26 + 2.94, 2'],\n    [-4.44, '-4.4400,2'],\n    [-5.20, '-2.26 - 2.94, 2'],\n    ['#VALUE!', '\"ABC\",1'],\n    ['#VALUE!', '1.234,\"ABC\"'],\n    [0, ', 0'],\n    [0, 'false, 0'],\n    [1, 'true, 0'],\n    ['#VALUE!', '\"\", 0'],\n    [2, 'A2, 0'],\n    [3, 'A3, 0'],\n    [-4, 'A4, 0'],\n    [-6, 'A5, 0'],\n    [0, 'B1, 0'],\n    ['exception', ''],\n    ['exception', '35.51'],\n    'negative number and precision' => [-31500, '-31415.92654, -2'],\n    'issue 4213 #1' => [250.0, '249.9975, 0'],\n    'issue 4213 #2' => [-250.0, '-249.9975, 0'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SEC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', '\"ABC\"'],\n    [-1.1917935066879, -10],\n    [1.0, '-PI() * 2'],\n    [3.52532008581609, '\"-5\"'],\n    [-1.0, '-PI()'],\n    ['#DIV/0!', 'PI() / 2'],\n    ['#DIV/0!', '-PI() / 2'],\n    [14.13683290296990, -1.5],\n    [1.00502091840046, -0.1],\n    [1.0, 0.0],\n    [1.00502091840046, 0.1],\n    [14.13683290296990, 1.5],\n    [-1.0, 'PI()'],\n    [3.52532008581609, 5],\n    [1.0, 'PI() * 2'],\n    [-1.19179350668790, 10],\n    ['exception', ''],\n    [1, 'Q15'],\n    [1.850815718, 'true'],\n    [1, 'false'],\n    [3.738334127, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SECH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['#VALUE!', '\"ABC\"'],\n    [0.00009079985934, -10],\n    [0.00373487243864, '-PI() * 2'],\n    [0.01347528222130, '\"-5\"'],\n    [0.08626673833405, '-PI()'],\n    [0.39853681533839, '-PI() / 2'],\n    [0.99502074895323, -0.1],\n    [1.0, 0.0],\n    [0.99502074895323, 0.1],\n    [0.39853681533839, 'PI() / 2'],\n    [0.08626673833405, 'PI()'],\n    [0.01347528222130, 5],\n    [0.00373487243864, 'PI() * 2'],\n    [0.00009079985934, 10],\n    ['exception', ''],\n    [1, 'Q15'],\n    [0.648054274, 'true'],\n    [1, 'false'],\n    [0.507378751, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SEQUENCE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [2, 2],\n        [\n            [1, 2],\n            [3, 4],\n        ],\n    ],\n    [\n        [2, 3],\n        [\n            [1, 2, 3],\n            [4, 5, 6],\n        ],\n    ],\n    [\n        [3, 2],\n        [\n            [1, 2],\n            [3, 4],\n            [5, 6],\n        ],\n    ],\n    [\n        [3],\n        [\n            [1],\n            [2],\n            [3],\n        ],\n    ],\n    [\n        [null, 3],\n        [\n            [1, 2, 3],\n        ],\n    ],\n    [\n        [3, 1, 10, 5],\n        [\n            [10],\n            [15],\n            [20],\n        ],\n    ],\n    [\n        [3, 2, 10, 5],\n        [\n            [10, 15],\n            [20, 25],\n            [30, 35],\n        ],\n    ],\n    [\n        [1, 3, 10, -5],\n        [\n            [10, 5, 0],\n        ],\n    ],\n    [\n        [1, 6, -10, 2],\n        [\n            [-10, -8, -6, -4, -2, 0],\n        ],\n    ],\n    [\n        [3, 3, -10, 2.5],\n        [\n            [-10, -7.5, -5],\n            [-2.5, 0, 2.5],\n            [5, 7.5, 10],\n        ],\n    ],\n    [\n        [3, 3, 10, -2.5],\n        [\n            [10, 7.5, 5],\n            [2.5, 0, -2.5],\n            [-5, -7.5, -10],\n        ],\n    ],\n    [\n        [2, 2, 1, 0],\n        [\n            [1, 1],\n            [1, 1],\n        ],\n    ],\n    [\n        [2, 2, 'A', 0],\n        '#VALUE!',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SERIESSUM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3905,\n        5,\n        1,\n        1,\n        [\n            [\n                1,\n                1,\n                1,\n                1,\n                1,\n            ],\n        ],\n    ],\n    [\n        3186,\n        2,\n        1,\n        2,\n        [\n            [\n                1,\n                2,\n                3,\n                4,\n                5,\n            ],\n        ],\n    ],\n    ['#VALUE!', 'X', 1, 2, [1, 2, 3, 4, 5]],\n    ['#VALUE!', 2, 'X', 2, [1, 2, 3, 4, 5]],\n    ['#VALUE!', 2, 1, 'X', [1, 2, 3, 4, 5]],\n    ['#VALUE!', 2, 1, 2, [1, 'X', 3, 4, 5]],\n    ['#VALUE!', true, 1, 2, [1, 'X', 3, 4, 5]],\n    ['#VALUE!', 2, 1, 2, [1, false, 3, 4, 5]],\n    [780, 5, 1, 1, [1, 1, null, 1, 1]],\n    [3780, 5, 1, 1, [1, 1, 0, 1, 1]],\n    [756, 5, 0, 1, [1, 1, 0, 1, 1]],\n    [756, 5, null, 1, [1, 1, 0, 1, 1]],\n    [151.2, 5, -1, 1, [1, 1, 0, 1, 1]],\n    [138.7, 5, -1, 1, [1, 1, -2.5, 1, 1]],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SIGN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [-1, -1.5],\n    [-1, -1],\n    [-1, '\"-0.5\"'],\n    [0, 0],\n    [1, 0.5],\n    [1, 1],\n    [1, 1.5],\n    [1, 2],\n    [1, 2.5],\n    ['#VALUE!', '\"ABC\"'],\n    [1, 'true'],\n    [0, 'false'],\n    [0, 'null'],\n    [-1, '-3.5'],\n    [0, 'Q15'],\n    [1, 'A2'],\n    [0, 'A3'],\n    [-1, 'A4'],\n    ['exception', ''],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [0, '0'],\n    [1, 'PI() / 2'],\n    [0.89120736, '\"1.1\"'],\n    [-0.89120736, '-1.1'],\n    [0.909297427, '2.0'],\n    [0, 'Q15'],\n    [0, 'false'],\n    [0.841470985, 'true'],\n    [0.909297427, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SINH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [0, '0'],\n    [1.175201194, '1'],\n    [-1.175201194, '-1.0'],\n    [3.626860, '\"2.0\"'],\n    [0, 'Q15'],\n    [0, 'false'],\n    [1.175201194, 'true'],\n    [3.626860408, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SQRT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception'], // exception not enough args\n    ['#VALUE!', 'ABC'],\n    [0, 0],\n    [0, null],\n    [0, false],\n    ['#VALUE!', ''],\n    [1, true],\n    [1.5, 2.25],\n    [1.5, '2.25'],\n    [1.5, '=\"2.25\"'],\n    [1.772454, M_PI],\n    ['#NUM!', -2.1],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SQRTPI.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n    [\n        '#NUM!',\n        -1.5,\n    ],\n    [\n        '#NUM!',\n        -1,\n    ],\n    [\n        '#NUM!',\n        -0.5,\n    ],\n    [\n        0.0,\n        0,\n    ],\n    [\n        1.2533141373154999,\n        0.5,\n    ],\n    [\n        1.7724538509055201,\n        1,\n    ],\n    [\n        2.1708037636748001,\n        1.5,\n    ],\n    [\n        2.5066282746309998,\n        2,\n    ],\n    [\n        2.80249560819896,\n        2.5,\n    ],\n    [\n        3.0699801238394699,\n        3,\n    ],\n    [\n        3.31595752197827,\n        3.5,\n    ],\n    [\n        3.54490770181103,\n        4,\n    ],\n    [\n        3.7599424119465001,\n        4.5,\n    ],\n    [\n        3.9633272976060101,\n        5,\n    ],\n    ['#VALUE!', true],\n    ['#VALUE!', false],\n    ['0', null],\n    ['exception', 'omitted'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUBTOTAL.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [19.3333333333333, 1],\n    [12, 2],\n    [12, 3],\n    [89, 4],\n    [0, 5],\n    [0, 6],\n    [27.5196899207337, 7],\n    [26.3480971271593, 8],\n    [232, 9],\n    [757.3333333333330, '10'],\n    [694.2222222222220, 11.1],\n    ['#VALUE!', 0],\n    ['#VALUE!', -1],\n    ['#VALUE!', 12],\n    ['#VALUE!', '\"X\"'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUBTOTALHIDDEN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [21, 101],\n    [5, 102],\n    [5, 103],\n    [55, 104],\n    [1, 105],\n    [48620, 106],\n    [23.1840462387393, 107],\n    [20.7364413533277, 108],\n    [105, 109],\n    [537.5, 110],\n    [430, 111],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [50, 5, 15, 30],\n    [52, 5, 15, 30, 2],\n    [53.1, 5.7, 15, 30, 2.4],\n    [52.1, 5.7, '14', 30, 2.4],\n    [52.2, 5.7, '14.1', 30, 2.4],\n    [38.1, 5.7, 'X', 30, 2.4], // error if entered in formula, but not in cell\n    [38.1, 5.7, '', 30, 2.4], // error if entered in formula, but not in cell\n    [38.1, 5.7, null, 30, 2.4],\n    [38.1, 5.7, false, 30, 2.4],\n    [39.1, 5.7, true, 30, 2.4],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMIF.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        15,\n        [\n            [1],\n            [5],\n            [10],\n        ],\n        '>=5',\n    ],\n    [\n        10,\n        [\n            ['text'],\n            [2],\n        ],\n        'text',\n        [\n            [10],\n            [100],\n        ],\n    ],\n    [\n        10, // fixed by PR #2561\n        [\n            ['\"text with quotes\"'],\n            [2],\n        ],\n        '\"text with quotes\"',\n        [\n            [10],\n            [100],\n        ],\n    ],\n    [\n        10,\n        [\n            ['\"text with quotes\"'],\n            [''],\n        ],\n        '>\"', // Compare to the single character \" (double quote)\n        [\n            [10],\n            [100],\n        ],\n    ],\n    [\n        100,\n        [\n            [''],\n            ['anything'],\n        ],\n        '>\"', // Compare to the single character \" (double quote)\n        [\n            [10],\n            [100],\n        ],\n    ],\n    [\n        10,\n        [\n            [1],\n            [2],\n        ],\n        '<>', // any content\n        [\n            ['non-numeric value'], // ignored in SUM\n            [10],\n        ],\n    ],\n    [\n        100,\n        [\n            ['0'],\n            ['some text'],\n        ],\n        0, // Compare integer with string\n        [\n            [100],\n            [1],\n        ],\n    ],\n    [\n        100,\n        [\n            [0],\n            ['some text'],\n        ],\n        0, // Compare integer with integer\n        [\n            [100],\n            [1],\n        ],\n    ],\n    [\n        3,\n        [\n            [1],\n            [0],\n            [1],\n        ],\n        1,\n        [\n            [3],\n            [4], // less elements in sum array\n        ],\n    ],\n    [\n        3,\n        [\n            [1],\n            [0], // less elements in condition array\n        ],\n        1,\n        [\n            [3],\n            [4],\n            [5],\n        ],\n    ],\n    [\n        157559,\n        [['Jan'], ['Jan'], ['Jan'], ['Jan'], ['Feb'], ['Feb'], ['Feb'], ['Feb']],\n        'Feb',\n        [[36693], [22100], [53321], [34440], [29889], [50090], [32080], [45500]],\n    ],\n    [\n        66582,\n        [['North 1'], ['North 2'], ['South 1'], ['South 2'], ['North 1'], ['North 2'], ['South 1'], ['South 2']],\n        'North 1',\n        [[36693], [22100], [53321], [34440], [29889], [50090], [32080], [45500]],\n    ],\n    [\n        138772,\n        [['North 1'], ['North 2'], ['South 1'], ['South 2'], ['North 1'], ['North 2'], ['South 1'], ['South 2']],\n        'North ?',\n        [[36693], [22100], [53321], [34440], [29889], [50090], [32080], [45500]],\n    ],\n    [\n        '#DIV/0!',\n        [['North 1'], ['North 2'], ['South 1'], ['South 2'], ['North 1'], ['North 2'], ['South 1'], ['South 2']],\n        'North ?',\n        [['=3/0'], [22100], [53321], [34440], [29889], [50090], [32080], [45500]],\n    ],\n    [\n        138772,\n        [['North 1'], ['North 2'], ['South 1'], ['South 2'], ['North 1'], ['North 2'], ['South 1'], ['South 2']],\n        'North ?',\n        [[36693], [22100], ['=3/0'], [34440], [29889], [50090], [32080], [45500]],\n    ],\n    [\n        23,\n        [['n'], [''], ['y'], [''], ['n'], ['n'], ['n'], [''], []],\n        '',\n        [[1], [2], [3], [4], [5], [6], [7], [8], [9]],\n    ],\n    [\n        0,\n        [['n'], [''], ['y'], [''], ['n'], ['n'], ['n'], [''], []],\n        null,\n        [[1], [2], [3], [4], [5], [6], [7], [8], [9]],\n    ],\n    [\n        19,\n        [['n'], [''], ['y'], [''], ['n'], ['n'], ['n'], [''], []],\n        'n',\n        [[1], [2], [3], [4], [5], [6], [7], [8], [9]],\n    ],\n    [\n        2,\n        [\n            [null],\n            ['abc123fff'],\n        ],\n        'abc123*',\n        [\n            [1],\n            [2],\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMIFS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0,\n    ],\n    [\n        2,\n        [\n            [1],\n            [1],\n            [1],\n        ],\n        [\n            ['Y'],\n            ['Y'],\n            ['N'],\n        ],\n        '=Y',\n        [\n            ['H'],\n            ['H'],\n            ['H'],\n        ],\n        '=H',\n    ],\n    [\n        1,\n        [\n            [1],\n            [1],\n            [1],\n        ],\n        [\n            ['A'],\n            ['B'],\n            ['C'],\n        ],\n        '=B',\n        [\n            ['C'],\n            ['B'],\n            ['A'],\n        ],\n        '=B',\n    ],\n    [\n        348000,\n        [223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],\n        [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],\n        1,\n        ['North', 'North', 'South', 'North', 'North', 'South', 'North', 'North', 'South', 'North', 'North', 'South'],\n        'North',\n    ],\n    [\n        571000,\n        [223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],\n        [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],\n        '>2',\n        ['Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol'],\n        'Jeff',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMLITERALS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [50, '5, 15, 30'],\n    [52, '5, 15, 30, 2'],\n    [53.1, '5.7, 15, 30, 2.4'],\n    [52.1, '5.7, \"14\", 30, 2.4'],\n    [52.2, '5.7, \"14.1\", 30, 2.4'],\n    ['#VALUE!', '5.7, \"X\", 30, 2.4'], // error if entered in formula, but not in cell\n    ['#VALUE!', '5.7, \"\", 30, 2.4'], // error if entered in formula, but not in cell\n    [38.1, '5.7, , 30, 2.4'],\n    [38.1, '5.7, false, 30, 2.4'],\n    [39.1, '5.7, true, 30, 2.4'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMPRODUCT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        29,\n        [1, 2, 3],\n        [5, 6, 4],\n    ],\n    [\n        156,\n        [[3, 4], [8, 6], [1, 9]],\n        [[2, 7], [6, 7], [5, 3]],\n    ],\n    [\n        70,\n        [[1, 2], [3, 4]],\n        [[5, 6], [7, 8]],\n    ],\n    ['#VALUE!', [1, 2], [5, 6, 4]], // mismatched dimensions\n    [17, [1, 2, 3], [5, 'y', 4]],\n    [17, [1, 2, 3], [5, 0, 4]],\n    [19, [1, 2, 3], [5, 1, 4]],\n    [145, [1, 2, 3], [5, 1, 4], [9, 8, 7]],\n    [61, [1, 2, 3], [5, 1, 4], [9, 8, '=\"7\"']], // string treated as 0\n    [100, ['=\"1\"', 2, 3], [5, 1, 4], [9, 8, 7]], // string treated as 0\n    [100, [null, 2, 3], [5, 1, 4], [9, 8, 7]], // null treated as 0\n    [100, [true, 2, 3], [5, 1, 4], [9, 8, 7]], // true treated as 0\n    [61, [1, 2, 3], [5, 1, 4], [9, 8, true]], // true treated as 0\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMSQ.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        25,\n        3,\n        4,\n    ],\n    [\n        39,\n        5,\n        2,\n        1,\n        3,\n    ],\n    [\n        66,\n        5,\n        2,\n        1,\n        6,\n    ],\n    [\n        10,\n        1,\n        3,\n    ],\n    [\n        30,\n        1,\n        3,\n        2,\n        4,\n    ],\n    [\n        83,\n        3,\n        5,\n        7,\n    ],\n    [\n        14,\n        1,\n        2,\n        3,\n    ],\n    [14, 1, '2', 3],\n    [14, 1, '=2', 3],\n    [14, 1, '=\"2\"', 3],\n    ['#VALUE!', 1, 'X', 3],\n    ['#VALUE!', 1, '', 3],\n    ['#VALUE!', false, 2, 3],\n    ['#VALUE!', 1, 2, true],\n    [5, 1, 2, null],\n    [10, 1, null, 3, null],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMWITHINDEXMATCH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        64, '=SUM(4 * INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)))',\n    ],\n    [\n        64, '=SUM(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)) * 4)',\n    ],\n    [\n        20, '=SUM(4 + INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)))',\n    ],\n    [\n        20, '=SUM(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)) + 4)',\n    ],\n    [\n        -12, '=SUM(4 - INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)))',\n    ],\n    [\n        12, '=SUM(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)) - 4)',\n    ],\n    [\n        0.25, '=SUM(4 / INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)))',\n    ],\n    [\n        4, '=SUM(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)) / 4)',\n    ],\n    'divide by zero' => [\n        '#DIV/0!', '=SUM(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)) / 0)',\n    ],\n    'invalid divisor' => [\n        '#VALUE!', '=SUM(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)) / \"xyz\")',\n    ],\n    [\n        4294967296, '=SUM(4 ^ INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)))',\n    ],\n    [\n        65536, '=SUM(INDEX(Lookup!B2, MATCH(A2, Lookup!A2, 0)) ^ 4)',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMX2MY2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        12,\n        [5, 2, 3],\n        [3, -1, 4],\n    ],\n    [\n        -55,\n        [2, 3, 9, 1, 8, 7, 5],\n        [6, 5, 11, 7, 5, 4, 4],\n    ],\n    [\n        -144,\n        [[1, 2], [3, 4]],\n        [[5, 6], [7, 8]],\n    ],\n    [-20, [1, 2], [3, 4]],\n    [-20, [1, '=2'], [3, 4]],\n    [-8, [1, '2'], [3, 4]],\n    [-8, [1, '=\"2\"'], [3, 4]],\n    [-8, [1, 'X'], [3, 4]],\n    [-8, [1, false], [3, 4]],\n    [-12, [1, 2], ['', 4]],\n    [-12, [1, 2], [null, 4]],\n    [-12, [1, 2], [true, 4]],\n    ['#N/A', [1, 2], [3, 4, 5]], // different dimensions\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMX2PY2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        64,\n        [5, 2, 3],\n        [3, -1, 4],\n    ],\n    [\n        521,\n        [2, 3, 9, 1, 8, 7, 5],\n        [6, 5, 11, 7, 5, 4, 4],\n    ],\n    [\n        204,\n        [[1, 2], [3, 4]],\n        [[5, 6], [7, 8]],\n    ],\n    [30, [1, 2], [3, 4]],\n    [30, [1, '=2'], [3, 4]],\n    [10, [1, ''], [3, 4]],\n    [10, [1, '2'], [3, 4]],\n    [10, [1, '=\"2\"'], [3, 4]],\n    [10, [1, 'X'], [3, 4]],\n    [10, [1, false], [3, 4]],\n    [20, [1, 2], [null, 4]],\n    [20, [1, 2], [true, 4]],\n    ['#N/A', [1, 2], [3, 4, 5]], // different dimensions\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/SUMXMY2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        6,\n        [5, 2, 3],\n        [3, 1, 2],\n    ],\n    [\n        79,\n        [2, 3, 9, 1, 8, 7, 5],\n        [6, 5, 11, 7, 5, 4, 4],\n    ],\n    [\n        64,\n        [[1, 2], [3, 4]],\n        [[5, 6], [7, 8]],\n    ],\n    [8, [1, 2], [3, 4]],\n    [8, [1, '=2'], [3, 4]],\n    [4, [1, ''], [3, 4]],\n    [4, [1, '2'], [3, 4]],\n    [4, [1, '=\"2\"'], [3, 4]],\n    [4, [1, 'X'], [3, 4]],\n    [4, [1, false], [3, 4]],\n    [4, [1, 2], [null, 4]],\n    [4, [1, 2], [true, 4]],\n    ['#N/A', [1, 2], [3, 4, 5]], // different dimensions\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/TAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [0, '0'],\n    [1.557407725, '1'],\n    [-2.185039863, '\"2\"'],\n    [1, 'PI() / 4'],\n    ['#DIV/0!', 'PI() / 2'],\n    ['#DIV/0!', '-PI() / 2'],\n    ['#DIV/0!', '3 * PI() / 2'],\n    [0, 'Q15'],\n    [0, 'false'],\n    [1.557407725, 'true'],\n    [1.557407725, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/TANH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['exception', ''],\n    ['#VALUE!', '\"ABC\"'],\n    [0, '0'],\n    [0.761594156, '1'],\n    [-0.761594, '-1'],\n    [0.970452, '2.1'],\n    [0, 'Q15'],\n    [0, 'false'],\n    [0.761594156, 'true'],\n    [0.761594156, 'A2'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/MathTrig/TRUNC.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [3.14, '3.14159, 2'],\n    [3.141, '3.14159,  3'],\n    [-3.14, '-3.14159, 2'],\n    [-3.141, '-3.14159, 3'],\n    [31415.92654, '31415.92654, 10'],\n    [-31415.92654, '-31415.92654, 10'],\n    [31415.92, '31415.92654, 2'],\n    [31400, '31415.92654, -2'],\n    'negative number and precision' => [-31400, '-31415.92654, -2'],\n    [0, '31415.92654, -10'],\n    [0, '-31415.92654, -10'],\n    [12000, '12345.6789, -3'],\n    [12300, '12345.6789, -2'],\n    [12340, '12345.6789, -1'],\n    [12345, '12345.6789, 0'],\n    [12345.6, '12345.6789, 1'],\n    [12345.67, '12345.6789, 2'],\n    [12345.678, '12345.6789, 3'],\n    ['#VALUE!', '\"ABC\", 2'],\n    ['#VALUE!', '31415.92654, \"ABC\"'],\n    ['#VALUE!', '\"\"'],\n    [1, 'true'],\n    [0, 'false'],\n    [0, '0'],\n    ['exception', ''],\n    [1, 'A2'],\n    [2, 'A3'],\n    [-3, 'A4'],\n    [-5, 'A5'],\n    [0, 'B1'],\n    'issue4113' => [1.0, '1.01, 1'],\n    'issue4113 negative' => [-1.0, '-1.01, 1'],\n    'issue4113 additional' => [10.04, '10.04, 2'],\n    'issue4113 additional negative' => [-10.04, '-10.04, 2'],\n    'issue4113 small fraction keep all' => [0.04, '0.04, 2'],\n    'issue4113 small negative fraction keep all' => [-0.04, '-0.04, 2'],\n    'issue4113 small fraction lose some' => [0.0, '0.01, 1'],\n    'issue4113 small negative fraction lose some' => [0.0, '-0.001, 1'],\n    'issue4113 example 3' => [-43747, '-43747.99122596, 0'],\n    'issue4113 example 3 positive' => [43747, '43747.99122596, 0'],\n    'issue4113 example 4' => [-9.11, '-9.1196419, 2'],\n    'issue4113 example 5' => [-42300.65, '-42300.65099338, 3'],\n    'issue4113 example 6 variant 1' => [0.000012, '0.0000123, 6'],\n    'issue4113 example 6 variant 2' => [0.0000123, '0.0000123, 8'],\n    'issue4113 example 6 variant 3' => [-0.000012, '-0.0000123, 6'],\n    'issue4113 example 6 variant 4' => [-0.0000123, '-0.0000123, 8'],\n    'issue4113 example 6 variant 5' => [0.000012, '1.23E-5, 6'],\n    'issue4113 example 6 variant 6' => [-0.0000123, '-1.23E-5, 8'],\n    'exceed 32-bit int max' => [3123456780, '3123456789, -1'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/AVEDEV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1.020408163265,\n        [4, 5, 6, 7, 5, 4, 3],\n    ],\n    [\n        1.65,\n        [10.5, 7.2],\n    ],\n    [\n        17.2,\n        [7.2, 5.4, 45],\n    ],\n    [\n        61.504,\n        [10.5, 7.2, 200, 5.4, 8.1],\n    ],\n    [\n        [1.825, '#VALUE!'],\n        [\n            // The index simulates a cell value\n            // Numbers and Booleans are both counted\n            '0.1.A' => 1,\n            '0.2.A' => '2',\n            '0.3.A' => 3.4,\n            '0.4.A' => true,\n            '0.5.A' => 5,\n            '0.6.A' => null,\n            '0.7.A' => 6.7,\n            '0.8.A' => 'STRING',\n            '0.9.A' => '',\n        ],\n    ],\n    'numeric string' => [\n        [1.825, 1.85],\n        [1, '2', 3.4, true, 5, 6.7],\n    ],\n    'non-numeric string' => [\n        // When non-numeric strings are passed directly, then a #VALUE! error is raised\n        [1.825, '#VALUE!'],\n        [1, '2', 3.4, true, 5, null, 6.7, 'STRING', ''],\n    ],\n    'no arguments' => [\n        ['#NUM!', 'exception'],\n        [],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/AVERAGE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        11,\n        [10, 7, 9, 27, 2],\n    ],\n    [\n        10,\n        [10, 7, 9, 27, 2, 5],\n    ],\n    [\n        19,\n        [10, 15, 32],\n    ],\n    [\n        8.85,\n        [10.5, 7.2],\n    ],\n    [\n        19.2,\n        [7.2, 5.4, 45],\n    ],\n    [\n        46.24,\n        [10.5, 7.2, 200, 5.4, 8.1],\n    ],\n    [\n        [4.025, '#VALUE!'],\n        [\n            // The index simulates a cell value\n            // Numbers and Booleans are both counted\n            '0.1.A' => 1,\n            '0.2.A' => '2',\n            '0.3.A' => 3.4,\n            '0.4.A' => true,\n            '0.5.A' => 5,\n            '0.6.A' => null,\n            '0.7.A' => 6.7,\n            '0.8.A' => 'STRING',\n            '0.9.A' => '',\n        ],\n    ],\n    [\n        [4.025, 3.183333333333],\n        [1, '2', 3.4, true, 5, 6.7],\n    ],\n    [\n        // When non-numeric strings are passed directly, then a #VALUE! error is raised\n        [4.025, '#VALUE!'],\n        [1, '2', 3.4, true, 5, null, 6.7, 'STRING', ''],\n    ],\n    'no arguments' => [\n        ['#DIV/0!', 'exception'],\n        [],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/AVERAGEA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        7.0,\n        [10, 7, 9, 2],\n    ],\n    [\n        [5.6, '#VALUE!'],\n        [10, 7, 9, 2, 'STRING VALUE'],\n    ],\n    [\n        8.85,\n        [10.5, 7.2],\n    ],\n    [\n        43.74,\n        [10.5, 7.2, 200, true, false],\n    ],\n    [\n        0.5,\n        [true, false],\n    ],\n    [\n        0.666666666667,\n        [true, false, 1],\n    ],\n    'no arguments' => [\n        ['#DIV/0!', 'exception'],\n        [],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/AVERAGEIF.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        14000,\n        [7000, 14000, 21000, 28000],\n        '<23000',\n    ],\n    [\n        150000,\n        [100000, 200000, 300000, 400000],\n        '<250000',\n    ],\n    [\n        '#DIV/0!',\n        [100000, 200000, 300000, 400000],\n        '<95000',\n    ],\n    [\n        24500,\n        [100000, 200000, 300000, 400000],\n        '>250000',\n        [7000, 14000, 21000, 28000],\n    ],\n    [\n        8.2,\n        [2012, 2012, 2013, 2011, 2011, 2010],\n        2012,\n        [6, 10.4, 7, 12, 8, 15],\n    ],\n    [\n        10,\n        [2012, 2012, 2013, 2011, 2011, 2010],\n        2011,\n        [6, 10.4, 7, 12, 8, 15],\n    ],\n    [\n        7.8,\n        [2012, 2012, 2013, 2011, 2011, 2010],\n        '>=2012',\n        [6, 10.4, 7, 12, 8, 15],\n    ],\n    [\n        2011.2,\n        [2012, 2012, 2013, 2011, 2011, 2010],\n        '<2013',\n    ],\n    [\n        200,\n        [7000, 14000, 21000, 28000],\n        '<23000',\n        [100, 200, 300, 800],\n    ],\n    [\n        (2 + 4 + 8) / 3,\n        [true, true, false, true, false],\n        true,\n        [2, 4, 6, 8, 10],\n    ],\n    [\n        (6 + 10) / 2,\n        [true, true, false, true, false],\n        '<>true',\n        [2, 4, 6, 8, 10],\n    ],\n    [\n        (1 + 2 + 5 + 6) / 4,\n        ['North', 'South', 'East', 'West', 'North', 'South', 'East', 'West'],\n        '???th',\n        [1, 2, 3, 4, 5, 6, 7, 8],\n    ],\n    [\n        16733.5,\n        ['East', 'West', 'North', 'South (New Office)', 'Midwest'],\n        '=*West',\n        [45678, 23789, -4789, 0, 9678],\n    ],\n    [\n        18589,\n        ['East', 'West', 'North', 'South (New Office)', 'Midwest'],\n        '<>*(New Office)',\n        [45678, 23789, -4789, 0, 9678],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/AVERAGEIFS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no argument' => [\n        'exception',\n    ],\n    [\n        80.5,\n        [75, 94, 86, 'incomplete'],\n        [75, 94, 86, 'incomplete'],\n        '>70',\n        [75, 94, 86, 'incomplete'],\n        '<90',\n    ],\n    [\n        '#DIV/0!',\n        [85, 80, 93, 75],\n        [85, 80, 93, 75],\n        '>95',\n    ],\n    [\n        87.5,\n        [87, 88, 'incomplete', 75],\n        [87, 88, 'incomplete', 75],\n        '<>incomplete',\n        [87, 88, 'incomplete', 75],\n        '>80',\n    ],\n    [\n        174000,\n        [223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],\n        [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],\n        1,\n        ['North', 'North', 'South', 'North', 'North', 'South', 'North', 'North', 'South', 'North', 'North', 'South'],\n        'North',\n    ],\n    [\n        285500,\n        [223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],\n        [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],\n        '>2',\n        ['Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol'],\n        'Jeff',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/BETADIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.4059136,\n        0.4, 4, 5,\n    ],\n    [\n        0.99596045887,\n        3, 5, 10, 1, 4,\n    ],\n    [\n        0.960370937542,\n        3, 7.5, 9, 1, 4,\n    ],\n    [\n        0.960370937542,\n        3, 7.5, 9, 4, 1,\n    ],\n    [\n        0.598190307617,\n        7.5, 8, 9, 5, 10,\n    ],\n    [\n        0.685470581054,\n        2, 8, 10, 1, 3,\n    ],\n    [\n        0.4059136,\n        0.4, 4, 5,\n    ],\n    [\n        0.4059136,\n        0.4, 4, 5, null, null,\n    ],\n    [\n        '#VALUE!',\n        'NAN', 8, 10, 1, 3,\n    ],\n    [\n        '#VALUE!',\n        2, 'NAN', 10, 1, 3,\n    ],\n    [\n        '#VALUE!',\n        2, 8, 'NAN', 1, 3,\n    ],\n    [\n        '#VALUE!',\n        2, 8, 10, 'NAN', 3,\n    ],\n    [\n        '#VALUE!',\n        2, 8, 10, 1, 'NAN',\n    ],\n    'alpha < 0' => [\n        '#NUM!',\n        2, -8, 10, 1, 3,\n    ],\n    'alpha = 0' => [\n        '#NUM!',\n        2, 0, 10, 1, 3,\n    ],\n    'beta < 0' => [\n        '#NUM!',\n        2, 8, -10, 1, 3,\n    ],\n    'beta = 0' => [\n        '#NUM!',\n        2, 8, 0, 1, 3,\n    ],\n    'value < Min' => [\n        '#NUM!',\n        0.5, 8, 10, 1, 3,\n    ],\n    'value > Max' => [\n        '#NUM!',\n        3.5, 8, 10, 1, 3,\n    ],\n    'Min = Max' => [\n        '#NUM!',\n        2, 8, 10, 2, 2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/BETAINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1.862243320728,\n        0.52, 3, 4, 1, 3,\n    ],\n    [\n        2.164759759129,\n        0.3, 7.5, 9, 1, 4,\n    ],\n    [\n        2.164759759129,\n        0.3, 7.5, 9, 4, 1,\n    ],\n    [\n        7.761240188783,\n        0.75, 8, 9, 5, 10,\n    ],\n    [\n        2.0,\n        0.685470581055, 8, 10, 1, 3,\n    ],\n    [\n        0.303225844664,\n        0.2, 4, 5, 0, 1,\n    ],\n    [\n        0.303225844664,\n        0.2, 4, 5, null, null,\n    ],\n    [\n        '#VALUE!',\n        'NAN', 4, 5, 0, 1,\n    ],\n    [\n        '#VALUE!',\n        0.2, 'NAN', 5, 0, 1,\n    ],\n    [\n        '#VALUE!',\n        0.2, 4, 'NAN', 0, 1,\n    ],\n    [\n        '#VALUE!',\n        0.2, 4, 5, 'NAN', 1,\n    ],\n    [\n        '#VALUE!',\n        0.2, 4, 5, 0, 'NAN',\n    ],\n    'alpha < 0' => [\n        '#NUM!',\n        0.2, -4, 5, 0, 1,\n    ],\n    'alpha = 0' => [\n        '#NUM!',\n        0.2, 0, 5, 0, 1,\n    ],\n    'beta < 0' => [\n        '#NUM!',\n        0.2, 4, -5, 0, 1,\n    ],\n    'beta = 0' => [\n        '#NUM!',\n        0.2, 4, 0, 0, 1,\n    ],\n    'Probability < 0' => [\n        '#NUM!',\n        -0.5, 4, 5, 1, 3,\n    ],\n    'Probability = 0' => [\n        '#NUM!',\n        0.0, 4, 5, 1, 3,\n    ],\n    'Probability > 1' => [\n        '#NUM!',\n        1.5, 4, 5, 1, 3,\n    ],\n    'Min = Max' => [\n        '#NUM!',\n        1, 4, 5, 1, 1,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/BINOMDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.706399436132,\n        3, 8, 0.35, true,\n    ],\n    [\n        0.2785857790625,\n        3, 8, 0.35, false,\n    ],\n    [\n        0.538748204875,\n        50, 125, 0.4, true,\n    ],\n    [\n        0.278585779062,\n        3, 8, 0.35, false,\n    ],\n    [\n        0.205078125,\n        6, 10, 0.5, false,\n    ],\n    [\n        1.36554E-17,\n        10, 100, 0.5, false,\n    ],\n    [\n        0.079589237387,\n        50, 100, 0.5, false,\n    ],\n    [\n        0.0008638556657,\n        65, 100, 0.5, false,\n    ],\n    [\n        1.53165E-17,\n        10, 100, 0.5, true,\n    ],\n    [\n        0.539794618694,\n        50, 100, 0.5, true,\n    ],\n    [\n        0.999105034804,\n        65, 100, 0.5, true,\n    ],\n    [\n        '#VALUE!',\n        'NAN', 100, 0.5, true,\n    ],\n    [\n        '#VALUE!',\n        65, 'NAN', 0.5, true,\n    ],\n    [\n        '#VALUE!',\n        65, 100, 'NAN', true,\n    ],\n    [\n        '#VALUE!',\n        65, 100, 0.5, 'NAN',\n    ],\n    [\n        '#NUM!',\n        -5, 100, 0.5, true,\n    ],\n    [\n        '#NUM!',\n        105, 100, 0.5, true,\n    ],\n    [\n        '#NUM!',\n        65, 100, -0.5, true,\n    ],\n    [\n        '#NUM!',\n        65, 100, 1.5, true,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/BINOMDISTRANGE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.083974967429,\n        60, 0.75, 48,\n    ],\n    [\n        0.5236297934719,\n        60, 0.75, 45, 50,\n    ],\n    [\n        0.0284439668205,\n        100, 0.5, 0, 40,\n    ],\n    [\n        0.728746975926,\n        100, 0.5, 45, 55,\n    ],\n    [\n        0.539794618694,\n        100, 0.5, 50, 100,\n    ],\n    [\n        0.079589237387,\n        100, 0.5, 50,\n    ],\n    [\n        0.079589237387,\n        100, 0.5, 50, null,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 0.5, 50, 100,\n    ],\n    [\n        '#VALUE!',\n        100, 'NaN', 50, 100,\n    ],\n    [\n        '#VALUE!',\n        100, 0.5, 'NaN', 100,\n    ],\n    [\n        '#VALUE!',\n        100, 0.5, 50, 'NaN',\n    ],\n    [\n        '#NUM!',\n        100, -0.5, 50, 100,\n    ],\n    [\n        '#NUM!',\n        100, 1.5, 50, 100,\n    ],\n    [\n        '#NUM!',\n        100, 0.5, -5, 100,\n    ],\n    [\n        '#NUM!',\n        10, 0.5, 50, 100,\n    ],\n    [\n        '#NUM!',\n        100, 0.5, 50, -10,\n    ],\n    [\n        '#NUM!',\n        100, 0.5, 50, -110,\n    ],\n    [\n        '#NUM!',\n        100, 0.5, 50, 40,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/BINOMINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        32,\n        100, 0.3, 0.7,\n    ],\n    [\n        4,\n        6, 0.5, 0.75,\n    ],\n    [\n        7,\n        12, 0.5, 0.75,\n    ],\n    [\n        46,\n        100, 0.5, 0.2,\n    ],\n    [\n        50,\n        100, 0.5, 0.5,\n    ],\n    [\n        56,\n        100, 0.5, 0.9,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 0.5, 0.9,\n    ],\n    [\n        '#VALUE!',\n        100, 'NaN', 0.9,\n    ],\n    [\n        '#VALUE!',\n        100, 0.5, 'NaN',\n    ],\n    [\n        '#NUM!',\n        -1, 0.5, 0.9,\n    ],\n    [\n        '#NUM!',\n        100, -0.5, 0.9,\n    ],\n    [\n        '#NUM!',\n        100, 1.5, 0.9,\n    ],\n    [\n        '#NUM!',\n        100, 0.5, -0.9,\n    ],\n    [\n        '#NUM!',\n        100, 0.5, 1.9,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/BasicCOUNT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\n\nreturn [\n    [\n        5,\n        [-1, 0, 1, 2, 3],\n    ],\n    [\n        7,\n        [\n            Date::stringToExcel('1900-02-01'),\n            0,\n            null,\n            1.2,\n            '',\n            2.4,\n            '',\n            3.6,\n            '',\n            4.8,\n            'Not a numeric',\n            6,\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/CHIDISTLeftTail.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.520499877813,\n        0.5, 1, true,\n    ],\n    [\n        0.207553748710,\n        2, 3, false,\n    ],\n    [\n        0.111565080074,\n        3, 2, false,\n    ],\n    [\n        0.776869839852,\n        3, 2, true,\n    ],\n    [\n        0.039646370521,\n        3, 9, false,\n    ],\n    [\n        0.035705027315,\n        3, 9, true,\n    ],\n    [\n        0.103349469094,\n        7.5, 8, false,\n    ],\n    [\n        0.516232618446,\n        7.5, 8, true,\n    ],\n    [\n        0.020666985354,\n        8, 3, false,\n    ],\n    [\n        0.953988294311,\n        8, 3, true,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 3, true,\n    ],\n    [\n        '#VALUE!',\n        2, 'NaN', true,\n    ],\n    [\n        '#VALUE!',\n        2, 3, 'NaN',\n    ],\n    'Value < 0' => [\n        '#NUM!',\n        -8, 3, true,\n    ],\n    'Degrees < 1' => [\n        '#NUM!',\n        8, 0, true,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/CHIDISTRightTail.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.964294972685,\n        3, 9,\n    ],\n    [\n        0.4837673815536,\n        7.5, 8,\n    ],\n    [\n        0.050000589092,\n        18.307, 10,\n    ],\n    [\n        0.479500122187,\n        0.5, 1,\n    ],\n    [\n        0.113846298007,\n        2.5, 1,\n    ],\n    [\n        0.778800783071,\n        0.5, 2,\n    ],\n    [\n        0.918891411655,\n        0.5, 3,\n    ],\n    [\n        0.046011705689,\n        8, 3,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 3,\n    ],\n    [\n        '#VALUE!',\n        8, 'NaN',\n    ],\n    'Value < 0' => [\n        '#NUM!',\n        -8, 3,\n    ],\n    'Degrees < 1' => [\n        '#NUM!',\n        8, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/CHIINVLeftTail.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        4.671330448981,\n        0.3, 7,\n    ],\n    [\n        12.548861396889,\n        0.75, 10,\n    ],\n    [\n        3.283020286760,\n        0.93, 1,\n    ],\n    [\n        1.832581463748,\n        0.6, 2,\n    ],\n    [\n        0.454936423120,\n        0.5, 1,\n    ],\n    [\n        4.351460191096,\n        0.5, 5,\n    ],\n    [\n        1.323303696932,\n        0.75, 1,\n    ],\n    [\n        0.210721031316,\n        0.1, 2,\n    ],\n    [\n        3.218875824869,\n        0.8, 2,\n    ],\n    [\n        1.212532903046,\n        0.25, 3,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 3,\n    ],\n    [\n        '#VALUE!',\n        0.25, 'NaN',\n    ],\n    'Probability < 0' => [\n        '#NUM!',\n        -0.1, 3,\n    ],\n    'Probability > 1' => [\n        '#NUM!',\n        1.1, 3,\n    ],\n    'Freedom > 1' => [\n        '#NUM!',\n        0.1, 0.5,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/CHIINVRightTail.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        8.383430828608,\n        0.3, 7,\n    ],\n    [\n        6.737200771955,\n        0.75, 10,\n    ],\n    [\n        0.007716715545,\n        0.93, 1,\n    ],\n    [\n        1.021651247532,\n        0.6, 2,\n    ],\n    [\n        0.45493642312,\n        0.5, 1,\n    ],\n    [\n        4.351460191096,\n        0.5, 5,\n    ],\n    [\n        0.101531044268,\n        0.75, 1,\n    ],\n    [\n        4.605170185988,\n        0.1, 2,\n    ],\n    [\n        0.446287102628,\n        0.8, 2,\n    ],\n    [\n        4.108344935632,\n        0.25, 3,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 3,\n    ],\n    [\n        '#VALUE!',\n        0.25, 'NaN',\n    ],\n    'Probability < 0' => [\n        '#NUM!',\n        -0.1, 3,\n    ],\n    'Probability > 1' => [\n        '#NUM!',\n        1.1, 3,\n    ],\n    'Freedom > 1' => [\n        '#NUM!',\n        0.1, 0.5,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/CHITEST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.0152703571482,\n        [[112, 76], [85, 95]],\n        [[100, 85], [70, 90]],\n    ],\n    [\n        0.000308192027,\n        [[58, 35], [11, 25], [10, 23]],\n        [[45.35, 47.65], [17.56, 18.44], [16.09, 16.91]],\n    ],\n    [\n        0.015888560447,\n        [[58], [11], [10]],\n        [[45.35], [17.56], [16.09]],\n    ],\n    [\n        0.008682970191,\n        [[58, 35]],\n        [[45.35, 47.65]],\n    ],\n    [\n        '#NUM!',\n        [[58, 11], [10, 35], [25]],\n        [[45.35, 17.56], [16.09, 47.65], [18.44, 16.91]],\n    ],\n    [\n        '#DIV/0!',\n        [[112, 76], [85, 95]],\n        [[100, 0], [70, 90]],\n    ],\n    [\n        '#NUM!',\n        [[112, 76], [85, 95]],\n        [[100, 85], [-70, 90]],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/CONFIDENCE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.692951912734,\n        0.05, 2.5, 50,\n    ],\n    [\n        0.48999099653,\n        0.05, 2.5, 100,\n    ],\n    [\n        0.013719747903,\n        0.05, 0.07, 100,\n    ],\n    [\n        '#VALUE!',\n        'NAN', 0.07, 100,\n    ],\n    [\n        '#NUM!',\n        1.05, 0.07, 100,\n    ],\n    [\n        '#NUM!',\n        0.05, -0.07, 100,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/CORREL.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.997054485502,\n        [3, 2, 4, 5, 6],\n        [9, 7, 12, 15, 17],\n    ],\n    [\n        0.870035103816,\n        [2, 10, 7, 17, 14, 16, 8, 12, 11, 15, 18, 3, 4, 1, 6, 5, 13, 19, 20, 9],\n        [22.9, 45.78, 33.49, 49.77, 40.94, 36.18, 21.05, 50.57, 31.32, 53.76, 55.66, 27.61, 11.15, 10.11, 37.9, 31.08, 45.48, 63.83, 63.6, 27.01],\n    ],\n    [\n        '#VALUE!',\n        3,\n        9,\n    ],\n    [\n        '#N/A',\n        [],\n        [],\n    ],\n    [\n        '#DIV/0!',\n        [3],\n        [9],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/COUNTA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\n\nreturn [\n    [\n        5,\n        [-1, 0, 1, 2, 3],\n    ],\n    'null treated differently references vs. direct' => [\n        [11, 14],\n        [\n            // The index simulates a cell value\n            '0.1.A' => Date::stringToExcel('1900-02-01'),\n            '0.2.A' => 0,\n            '0.3.A' => null,\n            '0.4.A' => 1.2,\n            '0.5.A' => '',\n            '0.6.A' => 2.4,\n            '0.7.A' => null,\n            '0.8.A' => '',\n            '0.9.A' => 3.6,\n            '0.10.A' => null,\n            '0.11.A' => '',\n            '0.12.A' => 4.8,\n            '0.13.A' => 'Not a numeric',\n            '0.14.A' => 6,\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/COUNTBLANK.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        4,\n        [-1, null, 0, '', 1, null, 2, '', 3],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/COUNTIF.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        2,\n        ['apples', 'oranges', 'peaches', 'apples'],\n        'apples',\n    ],\n    [\n        2,\n        ['ApPlEs', 'oranges', 'peaches', 'APPles'],\n        'aPpLeS',\n    ],\n    [\n        2,\n        [32, 54, 75, 86],\n        '>55',\n    ],\n    [\n        3,\n        [32, 54, 75, 86],\n        '<=75',\n    ],\n    [\n        2,\n        [6, 3, 4, 'X', '', null],\n        '<=4',\n    ],\n    [\n        2,\n        [6, 3, 4, 31, 'X', '', null],\n        '<=\"4\"',\n    ],\n    [\n        2,\n        [0, 1, 1, 2, 3, 5, 8, 0, 13, 21],\n        0,\n    ],\n    [\n        3,\n        [true, false, false, true, false, true, false, false],\n        true,\n    ],\n    [\n        5,\n        [true, false, false, true, false, true, false, false],\n        '<>true',\n    ],\n    [\n        4,\n        ['apples', 'oranges', 'peaches', 'apples'],\n        '*',\n    ],\n    [\n        3,\n        ['apples', 'oranges', 'peaches', 'apples'],\n        '*p*s*',\n    ],\n    [\n        2,\n        ['apples', 'oranges', 'peaches', 'apples'],\n        '?????es',\n    ],\n    [\n        2,\n        ['great * ratings', 'bad * ratings', 'films * wars', 'films * trek', 'music * radio'],\n        '*~* ra*s',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/COUNTIFS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no argument' => [\n        'exception',\n    ],\n    [\n        2,\n        ['Y', 'Y', 'N'],\n        '=Y',\n    ],\n    [\n        3,\n        ['A', 'B', 'C', 'B', 'B'],\n        '=B',\n    ],\n    [\n        3,\n        ['C', 'B', 'A', 'B', 'B'],\n        '=B',\n    ],\n    // TODO I believe that PhpSpreadsheet counts false and shouldn't.\n    //    [\n    //        2,\n    //        [1, 2, 3, 'B', null, '', false],\n    //        '<=2',\n    //    ],\n    //    [\n    //        2,\n    //        [1, 2, 3, 'B', null, '', false],\n    //        '<=B',\n    //    ],\n    [\n        4,\n        ['Female', 'Female', 'Female', 'Male', 'Male', 'Male', 'Female', 'Female', 'Female', 'Male', 'Male', 'Male'],\n        'Female',\n        [0.63, 0.78, 0.39, 0.55, 0.71, 0.51, 0.78, 0.81, 0.49, 0.35, 0.69, 0.65],\n        '>60%',\n    ],\n    [\n        2,\n        ['Maths', 'English', 'Science', 'Maths', 'English', 'Science', 'Maths', 'English', 'Science', 'Maths', 'English', 'Science'],\n        'Science',\n        [0.63, 0.78, 0.39, 0.55, 0.71, 0.51, 0.78, 0.81, 0.49, 0.35, 0.69, 0.65],\n        '<50%',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/COVAR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        5.2,\n        [3, 2, 4, 5, 6],\n        [9, 7, 12, 15, 17],\n    ],\n    [\n        16.633125,\n        [2, 7, 8, 3, 4, 1, 6, 5],\n        [22.9, 33.49, 34.5, 27.61, 19.5, 10.11, 37.9, 31.08],\n    ],\n    [\n        '#N/A',\n        [1, 2, 3],\n        [4, 5],\n    ],\n    [\n        '#DIV/0!',\n        [1, 2, 3],\n        [4, null, null],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/DEVSQ.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        48,\n        [4, 5, 8, 7, 11, 4, 3],\n    ],\n    [\n        47.5,\n        [1, 3, 5, 2, 9, 7],\n    ],\n    [\n        79.875,\n        [1, 3, 5, 2, 9, 7, 8, 10],\n    ],\n    [\n        '#NUM!',\n        ['A', 'B', 'C', 'D'],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/EXPONDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1.353352832366,\n        0.2, 10, false,\n    ],\n    [\n        0.864664716763,\n        0.2, 10, true,\n    ],\n    [\n        0.606530659713,\n        0.5, 1, false,\n    ],\n    [\n        0.393469340287,\n        0.5, 1, true,\n    ],\n    [\n        '#VALUE!',\n        'NAN', 1, true,\n    ],\n    [\n        '#VALUE!',\n        0.5, 'NAN', true,\n    ],\n    [\n        '#VALUE!',\n        0.5, 1, 'NAN',\n    ],\n    [\n        '#NUM!',\n        -0.5, 1, true,\n    ],\n    [\n        '#NUM!',\n        0.5, -1, true,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/ExcelCOUNT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'passing range do not count bool, null, or text numbers' => [\n        3,\n        [\n            // The index simulates a cell value\n            '0.1.A' => 'A',\n            '0.2.A' => 1,\n            '0.3.A' => true,\n            '0.4.A' => 2.9,\n            '0.5.A' => false,\n            '0.6.A' => '3',\n            '0.7.A' => '',\n            '0.8.A' => null,\n            '0.9.A' => 9,\n        ],\n    ],\n    'passing values - count null, boolean and text numbers' => [\n        7,\n        // No index indicates arguments passed as literals rather than cell values\n        // In this case, booleans are counted as well as numbers, as are numeric-value string literals\n        'A',\n        1,\n        true,\n        2.9,\n        false,\n        '3',\n        '',\n        null,\n        9,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/FDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.001223791709,\n        15.2069, 6, 4, false,\n    ],\n    [\n        0.990000043003,\n        15.2069, 6, 4, true,\n    ],\n    [\n        0.308000821694,\n        1, 2, 5, false,\n    ],\n    [\n        0.568798849629,\n        1, 2, 5, true,\n    ],\n    [\n        0.0241472644208,\n        5, 1, 2, false,\n    ],\n    [\n        0.8451542547285,\n        5, 1, 2, true,\n    ],\n    [\n        0.0006669496615,\n        65, 2, 1, false,\n    ],\n    [\n        0.9126295943339,\n        65, 2, 1, true,\n    ],\n    [\n        4.7306581130012E-6,\n        65, 8, 5, false,\n    ],\n    [\n        0.9998747923834,\n        65, 8, 5, true,\n    ],\n    [\n        0.0017323823929,\n        7.5, 13, 8, false,\n    ],\n    [\n        0.9961476916638,\n        7.5, 13, 8, true,\n    ],\n    [\n        '#VALUE!',\n        'NAN', 13, 8, true,\n    ],\n    [\n        '#VALUE!',\n        7.5, 'NAN', 8, true,\n    ],\n    'too many arguments' => [\n        'exception',\n        7.5, 13, 'NAN', 8, false,\n    ],\n    [\n        '#NUM!',\n        -7.5, 13, 8, true,\n    ],\n    [\n        '#NUM!',\n        7.5, 0, 8, true,\n    ],\n    [\n        '#NUM!',\n        7.5, 13, 0, true,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/FISHER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        -1.472219489583,\n        -0.9,\n    ],\n    [\n        -0.255412811883,\n        -0.25,\n    ],\n    [\n        1.098612288668,\n        0.8,\n    ],\n    [\n        0.972955074528,\n        0.75,\n    ],\n    [\n        '#VALUE!',\n        'NAN',\n    ],\n    [\n        '#NUM!',\n        -1.5,\n    ],\n    [\n        '#NUM!',\n        1.5,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/FISHERINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        -0.197375320225,\n        -0.2,\n    ],\n    [\n        0.0,\n        0.0,\n    ],\n    [\n        0.761594155956,\n        1.0,\n    ],\n    [\n        0.992631520201,\n        2.8,\n    ],\n    [\n        0.7499999990254,\n        0.9729550723,\n    ],\n    [\n        '#VALUE!',\n        'NAN',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/FORECAST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        10.607253086419,\n        30,\n        [6, 7, 9, 15, 21],\n        [20, 28, 31, 38, 40],\n    ],\n    [\n        11.8937852010975,\n        5,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        [-3, 4, 120, 2, 7.5],\n    ],\n    [\n        20.032698660553,\n        10,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        [-3, 4, 120, 2, 7.5],\n    ],\n    [\n        5.0,\n        8,\n        [1, 2, 3],\n        [4, 5, 6],\n    ],\n    [\n        10.657142857143,\n        7,\n        [5.8, -1],\n        [2, -5],\n    ],\n    [\n        -5.0,\n        50,\n        [-1, -2, -3, -4],\n        [10, 20, 30, 40],\n    ],\n    [\n        32.666666666667,\n        7,\n        [3, 7, 15, 20, 22, 27],\n        [1, 2, 3, 4, 5, 6],\n    ],\n    [\n        '#VALUE!',\n        'NaN',\n        [1, 2, 3],\n        [4, 5],\n    ],\n    [\n        '#N/A',\n        2,\n        [1, 2, 3],\n        [4, 5],\n    ],\n    [\n        '#DIV/0!',\n        2,\n        [1, 2, 3],\n        [4, null, null],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/GAMMA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [1.329340388179, 2.5],\n    [0.267865934620, -3.75],\n    [9.513507698669, 0.1],\n    [1.0, 1.0],\n    [0.886226925453, 1.5],\n    [1.3293403881791, 2.5],\n    [17.837861981813, 4.8],\n    [52.342777784553, 5.5],\n    'Zero value' => ['#NUM!', 0.0],\n    'Negative integer value' => ['#NUM!', -1],\n    ['#VALUE!', 'NAN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/GAMMADIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.03263913041829,\n        10.00001131, 9, 2, false,\n    ],\n    [\n        0.06809400387,\n        10.00001131, 9, 2, true,\n    ],\n    [\n        0.112020903828,\n        6, 3, 2, false,\n    ],\n    [\n        0.576809918873,\n        6, 3, 2, true,\n    ],\n    'Boolean as numeric' => [\n        0.576809918873,\n        6, 3, 2, 1,\n    ],\n    [\n        '#VALUE!',\n        'NAN', 3, 2, true,\n    ],\n    [\n        '#VALUE!',\n        6, 'NAN', 2, true,\n    ],\n    [\n        '#VALUE!',\n        6, 3, 'NAN', true,\n    ],\n    [\n        '#VALUE!',\n        6, 3, 2, 'NAN',\n    ],\n    'Value < 0' => [\n        '#NUM!',\n        -6, 3, 2, true,\n    ],\n    'A < 0' => [\n        '#NUM!',\n        6, -3, 2, true,\n    ],\n    'A = 0' => [\n        '#NUM!',\n        6, 0, 2, true,\n    ],\n    'B < 0' => [\n        '#NUM!',\n        6, 3, -2, true,\n    ],\n    'B = 0' => [\n        '#NUM!',\n        6, 3, 0, true,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/GAMMAINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        10.0000111914377,\n        0.068094, 9, 2,\n    ],\n    [\n        5.348120627447,\n        0.5, 3, 2,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 3, 2,\n    ],\n    [\n        '#VALUE!',\n        0.5, 'NaN', 2,\n    ],\n    [\n        '#VALUE!',\n        0.5, 3, 'NaN',\n    ],\n    'Probability < 0' => [\n        '#NUM!',\n        -0.5, 3, 2,\n    ],\n    'Probability > 1' => [\n        '#NUM!',\n        1.5, 3, 2,\n    ],\n    'Alpha < 0' => [\n        '#NUM!',\n        0.5, -3, 2,\n    ],\n    'Alpha = 0' => [\n        '#NUM!',\n        0.5, 0, 2,\n    ],\n    'Beta < 0' => [\n        '#NUM!',\n        0.5, 3, -2,\n    ],\n    'Beta = 0' => [\n        '#NUM!',\n        0.5, 3, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/GAMMALN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        2.453736570842,\n        4.5,\n    ],\n    [\n        1.791759469228,\n        4,\n    ],\n    [\n        '#VALUE!',\n        'NAN',\n    ],\n    'Value < 0' => [\n        '#NUM!',\n        -4.5,\n    ],\n    'Value = 0' => [\n        '#NUM!',\n        0.0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/GAUSS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0.4772498680518, 2],\n    [-0.4999997133484, -5],\n    [0.0, 0],\n    [0.0398278372770, 0.1],\n    [0.4937903346742, 2.5],\n    ['#VALUE!', 'NAN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/GEOMEAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        5.47698696965696,\n        4, 5, 8, 7, 11, 4, 3,\n    ],\n    [\n        1.6226711115996,\n        2.5, 3, 0.5, 1, 3,\n    ],\n    'no arguments' => [\n        'exception',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/GROWTH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            [32618.203773539713],\n            [47729.42261474774],\n            [69841.30085621739],\n            [102197.07337883231],\n            [149542.48674004572],\n            [218821.87621459525],\n        ],\n        [33100, 47300, 69000, 102000, 150000, 220000],\n        [11, 12, 13, 14, 15, 16],\n    ],\n    [\n        [\n            [320196.71836347197],\n            [468536.05418404756],\n        ],\n        [33100, 47300, 69000, 102000, 150000, 220000],\n        [11, 12, 13, 14, 15, 16],\n        [17, 18],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/GnumericCOUNT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'range does not count bool, null, text string' => [\n        3,\n        [\n            // The index simulates a cell value\n            '0.1.A' => 'A',\n            '0.2.A' => 1,\n            '0.3.A' => true,\n            '0.4.A' => 2.9,\n            '0.5.A' => false,\n            '0.6.A' => '3',\n            '0.7.A' => '',\n            '0.8.A' => null,\n            '0.9.A' => 9,\n        ],\n    ],\n    'direct values also do not count bool, null, text string' => [\n        3,\n        // No index indicates arguments passed as literals rather than cell values\n        'A',\n        1,\n        true,\n        2.9,\n        false,\n        '3',\n        '',\n        null,\n        9,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/HARMEAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        5.028375962062,\n        4, 5, 8, 7, 11, 4, 3,\n    ],\n    [\n        1.2295081967213,\n        2.5, 3, 0.5, 1, 3,\n    ],\n    [\n        '#NUM!',\n        2.5, -3, 0.5, 1, 3,\n    ],\n    [\n        '#NUM!',\n        2.5, 3, 0.0, 1, 3,\n    ],\n    'no arguments' => [\n        'exception',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/HYPGEOMDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.3632610939112,\n        1, 4, 8, 20,\n    ],\n    [\n        0.4525252525252,\n        1, 4, 4, 12,\n    ],\n    [\n        0.3393939393939,\n        2, 4, 4, 12,\n    ],\n    [\n        0.0646464646465,\n        3, 4, 4, 12,\n    ],\n    [\n        0.0020202020202,\n        4, 4, 4, 12,\n    ],\n    [\n        '#VALUE!',\n        'NAN', 4, 4, 12,\n    ],\n    [\n        '#VALUE!',\n        4, 'NAN', 4, 12,\n    ],\n    [\n        '#VALUE!',\n        4, 4, 'NAN', 12,\n    ],\n    [\n        '#VALUE!',\n        4, 4, 4, 'NAN',\n    ],\n    [\n        '#NUM!',\n        -1, 4, 4, 12,\n    ],\n    [\n        '#NUM!',\n        0, 0, 4, 12,\n    ],\n    [\n        '#NUM!',\n        4, 15, 4, 12,\n    ],\n    [\n        '#NUM!',\n        5, 4, 4, 12,\n    ],\n    [\n        '#NUM!',\n        5, 5, 4, 12,\n    ],\n    [\n        '#NUM!',\n        5, 5, -4, 12,\n    ],\n    [\n        '#NUM!',\n        5, 5, 15, 12,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/INTERCEPT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        25.0,\n        [5, 10, 15, 20],\n        [12, 9, 6, 3],\n    ],\n    [\n        -9.0,\n        [1, 2, 3, 4],\n        [10, 11, 12, 13],\n    ],\n    [\n        0.0,\n        [10, 20, 30],\n        [10, 20, 30],\n    ],\n    [\n        0.048387096774,\n        [2, 3, 9, 1, 8],\n        [6, 5, 11, 7, 5],\n    ],\n    [\n        2.4,\n        [6, 9, 17, 20, 20, 27],\n        [1, 2, 3, 4, 5, 6],\n    ],\n    [\n        '#N/A',\n        [1, 2, 3],\n        [4, 5],\n    ],\n    [\n        '#DIV/0!',\n        [1, 2, 3],\n        [4, null, null],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/KURT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        -0.1517996372084,\n        [3, 4, 5, 2, 3, 4, 5, 6, 4, 7],\n    ],\n    [\n        0.532657874050135,\n        [4, 5, 4, 4, 4, 4, 4, 2, 3, 5, 5, 3],\n    ],\n    [\n        '#DIV/0!',\n        ['A', 'B', 'C', 'D', 'E'],\n    ],\n    [\n        '#DIV/0!',\n        [1, 2, 3, 'A', 'B', 'C', 'D', 'E'],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/LARGE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        5,\n        [3, 4, 5, 2, 3, 4, 5, 6, 4, 7],\n        3,\n    ],\n    [\n        4,\n        [3, 4, 5, 2, 3, 4, 5, 6, 4, 7],\n        7,\n    ],\n    [\n        2,\n        [3, 4, '5', 2, 3, 4, '5', '6', 4, '7'],\n        6,\n    ],\n    [\n        '#VALUE!',\n        [3, 4, 5, 2, 3, 4, 5, 6, 4, 7],\n        'NAN',\n    ],\n    [\n        '#NUM!',\n        [3, 4, 5, 2, 3, 4, 5, 6, 4, 7],\n        -1,\n    ],\n    [\n        '#NUM!',\n        [],\n        1,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/LINEST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        [1.0, 0.0],\n        [1, 2, 3, 4, 5],\n        [1, 2, 3, 4, 5],\n        false,\n        false,\n    ],\n    [\n        [2.310344827586207, 0.0],\n        [1, 9, 5, 7],\n        [0, 4, 2, 3],\n        false,\n        false,\n    ],\n    [\n        [2.0, 1.0],\n        [1, 9, 5, 7],\n        [0, 4, 2, 3],\n        true,\n        false,\n    ],\n    [\n        [0.600378787879, 0.0],\n        [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n        [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n        false,\n        false,\n    ],\n    [\n        [-1.1064189189190, 14.081081081081],\n        [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n        [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n        true,\n        false,\n    ],\n    [\n        [\n            [0.600378787879, 0.0],\n            [0.3130441135917, ExcelError::NA()],\n            [0.2901220667036, 7.193206086629],\n            [3.6782360429317, 9],\n            [190.3200757575760, 465.679924242424],\n        ],\n        [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n        [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n        false,\n        true,\n    ],\n    [\n        [\n            [-1.1064189189190, 14.081081081081],\n            [0.1491074289251, 1.083468383961],\n            [0.8731378215565, 1.622464237727],\n            [55.0605598780781, 8],\n            [144.9408783783780, 21.059121621622],\n        ],\n        [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n        [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n        true,\n        true,\n    ],\n    [\n        [\n            [56.837944664032, 11704.347826086974],\n            [54.403741747077, 131988.39973671117],\n            [0.108159322123, 13123.598915116556],\n            [1.091488562082, 9],\n            [187985818.1818185, 1550059636.363636],\n        ],\n        [142000, 144000, 151000, 150000, 139000, 169000, 126000, 142900, 163000, 169000, 149000],\n        [2310, 2333, 2356, 2379, 2402, 2425, 2448, 2471, 2494, 2517, 2540],\n        true,\n        true,\n    ],\n    //        'multi-series' => [\n    //            [\n    //                [-234.2371645, 2553.21066, 12529.76817, 27.64138737, 52317.83051],\n    //                [13.26801148, 530.6691519, 400.0668382, 5.429374042, 12237.3616],\n    //                [0.996747993, 970.5784629, '#N/A', '#N/A', '#N/A'],\n    //                [459.7536742, 6, '#N/A', '#N/A', '#N/A'],\n    //                [1732393319, 5652135.316, '#N/A', '#N/A', '#N/A'],\n    //            ],\n    //            [142000, 144000, 151000, 150000, 139000, 169000, 126000, 142900, 163000, 169000, 149000],\n    //            [\n    //                [2310, 2, 2, 20],\n    //                [2333, 2, 2, 12],\n    //                [2356, 3, 1.5, 33],\n    //                [2379, 3, 2, 43],\n    //                [2402, 2, 3, 53],\n    //                [2425, 4, 2, 23],\n    //                [2448, 2, 1.5, 99],\n    //                [2471, 2, 2, 34],\n    //                [2494, 3, 3, 23],\n    //                [2517, 4, 4, 55],\n    //                [2540, 2, 3, 22],\n    //            ],\n    //            true,\n    //            true,\n    //        ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/LOGEST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [1.000174230092, 1.0],\n        [1, 2, 3, 4, 5],\n        [1, 10, 100, 1000, 10000],\n        false,\n        false,\n    ],\n    [\n        [1.000091183030, 2.127357620703],\n        [1, 2, 3, 4, 5],\n        [1, 10, 100, 1000, 10000],\n        true,\n        false,\n    ],\n    [\n        [1.463275628116, 495.304770158727],\n        [33100, 47300, 69000, 102000, 150000, 220000],\n        [11, 12, 13, 14, 15, 16],\n        true,\n        false,\n    ],\n    [\n        [1.482939830687, 2.257475168225],\n        [2, 3, 6, 8, 12, 15, 25, 34, 50],\n        [0, 1, 2, 3, 4, 5, 6, 7, 8],\n        true,\n        false,\n    ],\n    [\n        [1.1743674215053, 1.0],\n        [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n        [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n        false,\n        false,\n    ],\n    [\n        [0.8135120728565, 20.671878197178],\n        [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n        [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n        true,\n        false,\n    ],\n    //    [\n    //        [\n    //            [1.174367421505266, 1.0],\n    //            [0.0672620306083, Functions::NA()],\n    //            [0.3881799938732, 1.545563794251],\n    //            [5.7102087376569, 9],\n    //            [13.6403607201119, 21.498906978904],\n    //        ],\n    //        [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n    //        [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n    //        false,\n    //        true,\n    //    ],\n    //    [\n    //        [\n    //            [0.8135120728565, 20.671878197178],\n    //            [0.0313021171611, 0.227452478657],\n    //            [0.8445875527654, 0.340603858743],\n    //            [43.4759283593386, 8],\n    //            [5.0436854288511, 0.928087908723],\n    //        ],\n    //        [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n    //        [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n    //        true,\n    //        true,\n    //    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/LOGINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        4.000025209777,\n        0.039084, 3.5, 1.2,\n    ],\n    [\n        6.653346075337,\n        0.3, 2, 0.2,\n    ],\n    [\n        7.135708009256,\n        0.3, 2.5, 1.02,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 2.2, 3.3,\n    ],\n    [\n        '#VALUE!',\n        0.1, 'NaN', 3.3,\n    ],\n    [\n        '#VALUE!',\n        0.1, 2.2, 'NaN',\n    ],\n    [\n        '#NUM!',\n        -0.1, 2.2, 3.3,\n    ],\n    [\n        '#NUM!',\n        1.1, 2.2, 3.3,\n    ],\n    [\n        '#NUM!',\n        0.1, 2.2, -3.3,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/LOGNORMDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0.0390835557068, 4, 3.5, 1.2],\n    [0.066417114799, 12, 10, 5],\n    ['#NUM!', -1.1, 2.2, 3.3],\n    ['#NUM!', 1.1, 2.2, -3.3],\n    ['#VALUE!', 'NaN', 0.1, 0.2],\n    ['#VALUE!', 1.1, 'NAN', 0.2],\n    ['#VALUE!', 1.1, 0.1, 'NAN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/LOGNORMDIST2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0.0390835557068, 4, 3.5, 1.2, true],\n    [0.0176175966818, 4, 3.5, 1.2, false],\n    [0.0162328457851, 0.5, 10, 5, true],\n    [0.0162104821842, 0.5, 10, 5, false],\n    [0.0664171147992, 12, 10, 5, true],\n    [0.0021488646273, 12, 10, 5, false],\n    [0.0201708646513, 8, 7, 2.4, true],\n    [0.0025400389694, 8, 7, 2.4, false],\n    [0.0390835557068, 4, 3.5, 1.2, true],\n    [0.0176175966818, 4, 3.5, 1.2, false],\n    [0.0847348867430, 3, 2.5, 1.02, true],\n    [0.0507335863525, 3, 2.5, 1.02, false],\n    [0.2618068896629, 1.1, 2.2, 3.3, true],\n    [0.0896756593248, 1.1, 2.2, 3.3, false],\n    [0.7566441984111, 1.1, -2.2, 3.3, true],\n    [0.0862879718374, 1.1, -2.2, 3.3, false],\n    ['#NUM!', -1.1, 2.2, 3.3, true],\n    ['#NUM!', 1.1, 2.2, -3.3, true],\n    ['#VALUE!', 'NaN', 0.1, 0.2, true],\n    ['#VALUE!', 1.1, 'NaN', 0.2, true],\n    ['#VALUE!', 1.1, 0.1, 'NaN', true],\n    ['#VALUE!', 1.1, 0.1, 0.2, 'NaN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/MAX.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        27,\n        10, 7, 9, 27, 2,\n    ],\n    [\n        10,\n        10, 7, 9, '27', 2,\n    ],\n    [\n        0,\n        null, 'STRING', true, '', '27',\n    ],\n    'error among arguments' => [\n        '#DIV/0!',\n        1, 3, '=5/0', -2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/MAXA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        27,\n        10, 7, 9, 27, 2,\n    ],\n    [\n        10,\n        10, 7, 9, '17', 2,\n    ],\n    [\n        0,\n        -10, -7, -9, '17', -2,\n    ],\n    [\n        1,\n        -10, true, -9, '17', -2,\n    ],\n    [\n        1,\n        null, 'STRING', true, '', -2, 0, false, '27',\n    ],\n    [\n        0,\n        null, 'STRING', '', 'xl95',\n    ],\n    [\n        0,\n        null, null, null, null,\n    ],\n    'error among arguments' => [\n        '#DIV/0!',\n        1, 3, '=5/0', -2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/MAXIFS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no argument' => [\n        'exception',\n    ],\n    [\n        2,\n        [1, 2, 3],\n        ['Y', 'Y', 'N'],\n        '=Y',\n        ['H', 'H', 'H'],\n        '=H',\n    ],\n    [\n        2,\n        [1, 2, 3],\n        ['Y', 'Y', 'N'],\n        '=Y',\n    ],\n    [\n        2,\n        [1, 2, 3],\n        ['A', 'B', 'C'],\n        '=B',\n        ['C', 'B', 'A'],\n        '=B',\n    ],\n    [\n        456000,\n        [223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],\n        [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],\n        1,\n    ],\n    [\n        310000,\n        [223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],\n        [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],\n        '>2',\n        ['Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol'],\n        'Jeff',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/MEDIAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        8.0,\n        1, 4.5, 7, 8, 9, 13, 14,\n    ],\n    [\n        8.5,\n        1, 4.5, 7, 8, 9, 13, 14, 12,\n    ],\n    [\n        8.0,\n        1, 4.5, 7, 8, 9, 13, 14, '',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/MIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        2,\n        10, 7, 2, 9, 27,\n    ],\n    [\n        -9,\n        10, 7, -9, '-27', 2,\n    ],\n    [\n        0,\n        null, 'STRING', true, '', '27',\n    ],\n    'error among arguments' => [\n        '#DIV/0!',\n        1, 3, '=5/0', -2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/MINA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        2,\n        10, 7, 9, 27, 2,\n    ],\n    [\n        -7,\n        10, '-9', -7, '17', 2,\n    ],\n    [\n        0,\n        10, 7, 9, '17', 2,\n    ],\n    [\n        1,\n        10, true, 9, 2,\n    ],\n    [\n        0,\n        null, true, 2, false,\n    ],\n    [\n        0,\n        null, 'STRING', '', 'xl95',\n    ],\n    [\n        0,\n        null, null, null, null,\n    ],\n    'error among arguments' => [\n        '#DIV/0!',\n        1, 3, '=5/0', -2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/MINIFS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no argument' => [\n        'exception',\n    ],\n    [\n        1,\n        [1, 2, 3],\n        ['Y', 'Y', 'N'],\n        '=Y',\n        ['H', 'H', 'H'],\n        '=H',\n    ],\n    [\n        1,\n        [1, 2, 3],\n        ['Y', 'Y', 'N'],\n        '=Y',\n    ],\n    [\n        2,\n        [1, 2, 3],\n        ['A', 'B', 'C'],\n        '=B',\n        ['C', 'B', 'A'],\n        '=B',\n    ],\n    [\n        125000,\n        [223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],\n        [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],\n        1,\n    ],\n    [\n        261000,\n        [223000, 125000, 456000, 322000, 340000, 198000, 310000, 250000, 460000, 261000, 389000, 305000],\n        [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],\n        '>2',\n        ['Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol', 'Jeff', 'Chris', 'Carol'],\n        'Jeff',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/MODE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [4.1, '{5.6,4.1,4.1,3,2,4.1}'], // Calculated value was #N/A\n    [4.1, '5.6,4.1,4.1,3,2,4.1'],\n    [3, '3,3,4,4'],\n    [4, '4,3,3,4'], // Calculated value was 3\n    ['#N/A', '1,2,3,4'],\n    [2, '1,2,2,\"3\",\"3\",\"3\"'],\n    ['#N/A', '\"3\",\"3\",\"3\"'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/NEGBINOMDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.05504866037517786,\n        10, 5, 0.25,\n    ],\n    [\n        0.047210693359375,\n        6, 12, 0.5,\n    ],\n    [\n        0.0805901288986206,\n        12, 12, 0.5,\n    ],\n    [\n        0.057564377784729004,\n        15, 12, 0.5,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 12, 0.5,\n    ],\n    [\n        '#VALUE!',\n        15, 'NaN', 0.5,\n    ],\n    [\n        '#VALUE!',\n        15, 12, 'NaN',\n    ],\n    [\n        '#NUM!',\n        15, 12, -0.25,\n    ],\n    [\n        '#NUM!',\n        -1, 1, 0.25,\n    ],\n    [\n        '#NUM!',\n        1, 0.5, 0.25,\n    ],\n    [\n        '#NUM!',\n        6, 12, -0.25,\n    ],\n    [\n        '#NUM!',\n        1, 12, 1.25,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/NORMDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0.9087887802741, 42, 40, 1.5, true],\n    [0.109340049784, 42, 40, 1.5, false],\n    [0.0176032663382, 50, 40, 20, false],\n    [0.2524925375469, 0.8, 1, 0.3, true],\n    [0.8413447460685, 68, 65.5, 2.5, true],\n    ['#NUM!', 42, 40, -1.5, true],\n    ['#VALUE!', 'NaN', 40, 1.5, true],\n    ['#VALUE!', 42, 'NaN', 1.5, true],\n    ['#VALUE!', 42, 40, 'NaN', true],\n    ['#VALUE!', 42, 40, 1.5, 'NaN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/NORMINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [42.000002008416, 0.908789, 40, 1.5],\n    [5.50669420572, 0.6, 5, 2],\n    [63.813775624441, 0.25, 65.5, 2.5],\n    [7.074774056039, 0.015, 12.5, 2.5],\n    [17.925225943961, 0.985, 12.5, 2.5],\n    ['#NUM!', -0.5, 2.2, 3.3],\n    ['#NUM!', 1.5, 2.2, 3.3],\n    ['#NUM!', 0.5, 2.2, -3.3],\n    ['#VALUE!', 'NaN', 2.5, 0.2],\n    ['#VALUE!', 0.25, 'NaN', 0.2],\n    ['#VALUE!', 0.25, 2.5, 'NaN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/NORMSDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0.908788780274, 1.333333333333],\n    [0.788144601416, 0.8],\n    [0.841344746068, 1.0],\n    [0.158655253931, -1.0],\n    [0.066807201269, -1.5],\n    [0.5, 0],\n    [0.989275889978, 2.3],\n    ['#VALUE!', 'NaN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/NORMSDIST2.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [0.908788780274, 1.333333333333, true],\n    [0.164010074676, 1.333333333333, false],\n    [0.352065326764, 0.5, false],\n    [0.788144601416, 0.8, true],\n    [0.841344746068, 1.0, true],\n    [0.158655253931, -1.0, true],\n    [0.066807201269, -1.5, true],\n    [0.129517595666, -1.5, false],\n    [0.5, 0, true],\n    [0.398942280401, 0, false],\n    [0.989275889978, 2.3, true],\n    [0.028327037742, 2.3, false],\n    ['#VALUE!', 'NaN', true],\n    ['#VALUE!', 2.3, 'NaN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/NORMSINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [1.33333467227723, 0.908789],\n    [-0.67448975022342, 0.25],\n    [0.12566134687610, 0.55],\n    [1.28155156414015, 0.9],\n    ['#VALUE!', 'NaN'],\n    ['#NUM!', -0.9],\n    ['#NUM!', 1.9],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/OpenOfficeCOUNT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'passing range count bool but not null nor text numbers' => [\n        5,\n        [\n            // The index simulates a cell value\n            // Numbers and Booleans are both counted\n            '0.1.A' => 'A',\n            '0.2.A' => 1,\n            '0.3.A' => true,\n            '0.4.A' => 2.9,\n            '0.5.A' => false,\n            '0.6.A' => '3',\n            '0.7.A' => '',\n            '0.8.A' => null,\n            '0.9.A' => 9,\n        ],\n    ],\n    'passing values directly counts bool, null, and text numbers' => [\n        7,\n        // No index indicates arguments passed as literals rather than cell values\n        // In this case, booleans are counted as well as numbers, as are numeric-value string literals\n        'A',\n        1,\n        true,\n        2.9,\n        false,\n        '3',\n        '',\n        null,\n        9,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/PERCENTILE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1.9,\n        [1, 2, 3, 4],\n        0.3,\n    ],\n    [\n        3.4,\n        [1, 2, 3, 4],\n        0.8,\n    ],\n    [\n        3.25,\n        [1, 2, 3, 4],\n        0.75,\n    ],\n    [\n        8.05,\n        [7, 8, 9, 20],\n        0.35,\n    ],\n    [\n        8.1,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        0.5,\n    ],\n    [\n        48.4,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        0.8,\n    ],\n    [\n        2,\n        [2, 1, 6, 4, 3, 5],\n        0.2,\n    ],\n    [\n        4,\n        [2, 1, 6, 4, 3, 5],\n        0.6,\n    ],\n    [\n        3.5,\n        [2, 1, 6, 4, 3, 5],\n        0.5,\n    ],\n    [\n        5.75,\n        [2, 1, 6, 4, 3, 5],\n        0.95,\n    ],\n    [\n        '#NUM!',\n        [1, 2, 3, 4],\n        -0.3,\n    ],\n    [\n        '#NUM!',\n        [1, 2, 3, 4],\n        1.5,\n    ],\n    [\n        '#NUM!',\n        ['A', 'B'],\n        0.5,\n    ],\n    [\n        '#VALUE!',\n        [1, 2, 3, 4],\n        'NaN',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/PERCENTRANK.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.667,\n        [1, 2, 3, 4],\n        3,\n    ],\n    [\n        0.67,\n        [1, 2, 3, 4],\n        3,\n        2,\n    ],\n    [\n        0.83,\n        [1, 2, 3, 4],\n        3.5,\n        2,\n    ],\n    [\n        0.758,\n        [7, 8, 9, 20],\n        12,\n    ],\n    [\n        0.2222,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        7,\n        4,\n    ],\n    [\n        0.333,\n        [13, 12, 11, 8, 4, 3, 2, 1, 1, 1],\n        2,\n    ],\n    [\n        0.556,\n        [13, 12, 11, 8, 4, 3, 2, 1, 1, 1],\n        4,\n    ],\n    [\n        0.667,\n        [13, 12, 11, 8, 4, 3, 2, 1, 1, 1],\n        8,\n    ],\n    [\n        0.583,\n        [13, 12, 11, 8, 4, 3, 2, 1, 1, 1],\n        5,\n    ],\n    [\n        0.67,\n        [1, 'Deux', 2, 'Uno', 3, 4],\n        3,\n        2,\n    ],\n    [\n        '#VALUE!',\n        ['A', 'B', 'C', 'D'],\n        'E',\n    ],\n    [\n        '#N/A',\n        ['A', 'B', 'C', 'D'],\n        3,\n    ],\n    [\n        '#N/A',\n        [1, 2, 3, 4],\n        5,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/PERMUT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        5,\n        5, 1,\n    ],\n    [\n        20,\n        5, 2,\n    ],\n    [\n        60,\n        5, 3,\n    ],\n    [\n        120,\n        5, 4,\n    ],\n    [\n        120,\n        5, 5,\n    ],\n    [\n        970200,\n        100, 3,\n    ],\n    [\n        6,\n        3, 2,\n    ],\n    [\n        720,\n        6, 6,\n    ],\n    [\n        5040,\n        7, 6,\n    ],\n    [\n        151200,\n        10, 6,\n    ],\n    [\n        10068347520,\n        49, 6,\n    ],\n    [\n        '#NUM!',\n        2, 3,\n    ],\n    [\n        '#NUM!',\n        1, 2,\n    ],\n    [\n        '#VALUE!',\n        49, 'NaN',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/PERMUTATIONA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        5,\n        5, 1,\n    ],\n    [\n        2,\n        2.2, 1.1,\n    ],\n    [\n        5,\n        5.1, 1.9,\n    ],\n    [\n        1,\n        1, 2,\n    ],\n    [\n        '#NUM!',\n        -1, 2,\n    ],\n    [\n        '#NUM!',\n        1, -2,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 31,\n    ],\n    [\n        '#VALUE!',\n        49, 'NaN',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/POISSON.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.12465201948308113,\n        2, 5, true,\n    ],\n    [\n        0.08422433748856833,\n        2, 5, false,\n    ],\n    [\n        0.05191746860849132,\n        20, 25, false,\n    ],\n    [\n        0.24241419769010333,\n        35, 40, true,\n    ],\n    [\n        '#VALUE!',\n        'Nan', 40, true,\n    ],\n    [\n        '#VALUE!',\n        35, 'Nan', true,\n    ],\n    [\n        '#VALUE!',\n        35, 40, 'Nan',\n    ],\n    'Value < 0' => [\n        '#NUM!',\n        -35, 40, true,\n    ],\n    'Mean < 0' => [\n        '#NUM!',\n        35, -40, true,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/QUARTILE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3.5,\n        [1, 2, 4, 7, 8, 9, 10, 12],\n        1,\n    ],\n    [\n        5.4,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        0,\n    ],\n    [\n        7.2,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        1,\n    ],\n    [\n        8.1,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        2,\n    ],\n    [\n        10.5,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        3,\n    ],\n    [\n        200,\n        [10.5, 7.2, 200, 5.4, 8.1],\n        4,\n    ],\n    [\n        7.75,\n        [7, 8, 9, 10],\n        1,\n    ],\n    [\n        8.5,\n        [7, 8, 9, 10],\n        2,\n    ],\n    [\n        9.25,\n        [7, 8, 9, 10],\n        3,\n    ],\n    [\n        '#NUM!',\n        [7, 8, 9, 10],\n        -1,\n    ],\n    [\n        '#NUM!',\n        [7, 8, 9, 10],\n        5,\n    ],\n    [\n        '#VALUE!',\n        [7, 8, 9, 10],\n        'X',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/RANK.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        2,\n        3.5,\n        [7, 3.5, 3.5, 2, 1],\n    ],\n    [\n        1,\n        7,\n        [7, 3.5, 3.5, 2, 1],\n    ],\n    [\n        3,\n        3.5,\n        [7, 3.5, 3.5, 1, 2],\n        1,\n    ],\n    [\n        5,\n        7,\n        [7, 3.5, 3.5, 1, 2],\n        1,\n    ],\n    [\n        4,\n        7.2,\n        [10.5, 7.2, 200, 5.4, 8.1],\n    ],\n    [\n        2,\n        3.5,\n        [7, 3.5, 'ONE', 'UNO', 3.5, 1, 2],\n    ],\n    [\n        '#VALUE!',\n        'Uno',\n        [1, 'Deux', 2, 'Uno', 3, 4],\n    ],\n    [\n        3,\n        2,\n        [1, 'Deux', 2, 'Uno', 3, 4],\n    ],\n    [\n        2,\n        3,\n        [1, 'Deux', 2, 'Uno', 3, 4],\n    ],\n    [\n        '#N/A',\n        1.5,\n        [7, 3.5, 3.5, 1, 2],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/RSQ.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.057950191571,\n        [2, 3, 9, 1, 8, 7, 5],\n        [6, 5, 11, 7, 5, 4, 4],\n    ],\n    [\n        0.711666290487,\n        [2, 7, 8, 3, 4, 1, 6, 5],\n        [22.9, 33.49, 34.5, 27.61, 19.5, 10.11, 37.90, 31.08],\n    ],\n    [\n        '#N/A',\n        [1, 2, 3],\n        [4, 5],\n    ],\n    [\n        '#DIV/0!',\n        [1, 2, 3],\n        [4, null, null],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/SKEW.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.359543071407,\n        [3, 4, 5, 2, 3, 4, 5, 6, 4, 7],\n    ],\n    [\n        0.863378312234,\n        [1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 6, 7, 8],\n    ],\n    [\n        '#VALUE!',\n        [1, 1, 2, 2, 2, 2, 3, 'NaN', 3, 4, 4, 5, 6, 7, 8],\n    ],\n    [\n        '#DIV/0!',\n        [1, 1],\n    ],\n    [\n        '#DIV/0!',\n        [1, 1],\n    ],\n    [\n        '#DIV/0!',\n        ['A', 'B', 'C', 'D', 'E'],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/SLOPE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Shared\\Date;\n\nreturn [\n    [\n        0.6,\n        [3, 6, 9, 12],\n        [5, 10, 15, 20],\n    ],\n    [\n        1.0,\n        [1, 2, 3, 4],\n        [10, 11, 12, 13],\n    ],\n    [\n        0.2,\n        [2, 4, 6],\n        [10, 20, 30],\n    ],\n    [\n        4.628571428571,\n        [3, 7, 17, 20, 20, 27],\n        [1, 2, 3, 4, 5, 6],\n    ],\n    [\n        9.472222222222,\n        [\n            Date::stringToExcel('1900-02-01'),\n            Date::stringToExcel('1900-03-01'),\n            Date::stringToExcel('1900-09-01'),\n            Date::stringToExcel('1900-01-01'),\n            Date::stringToExcel('1900-08-01'),\n            Date::stringToExcel('1900-07-01'),\n            Date::stringToExcel('1900-05-01'),\n        ],\n        [\n            6,\n            5,\n            11,\n            7,\n            5,\n            4,\n            4,\n        ],\n    ],\n    [\n        0.305555555556,\n        [\n            Date::stringToExcel('1900-01-02'),\n            Date::stringToExcel('1900-01-03'),\n            Date::stringToExcel('1900-01-09'),\n            Date::stringToExcel('1900-01-01'),\n            Date::stringToExcel('1900-01-08'),\n            Date::stringToExcel('1900-01-07'),\n            Date::stringToExcel('1900-01-05'),\n        ],\n        [\n            6,\n            5,\n            11,\n            7,\n            5,\n            4,\n            4,\n        ],\n    ],\n    [\n        '#N/A',\n        [1, 2, 3],\n        [4, 5],\n    ],\n    [\n        '#DIV/0!',\n        [1, 2, 3],\n        [4, null, null],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/SMALL.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3,\n        [1, 4, 8, 3, 7, 12, 54, 8, 23],\n        2,\n    ],\n    [\n        4,\n        [3, 4, 5, 2, 3, 4, 6, 4, 7],\n        4,\n    ],\n    [\n        6,\n        ['3', 4, 5, '2', '3', 4, 5, 6, 4, 7],\n        6,\n    ],\n    [\n        '#VALUE!',\n        [3, 4, 5, 2, 3, 4, 5, 6, 4, 7],\n        'NAN',\n    ],\n    [\n        '#NUM!',\n        [3, 4, 5, 2, 3, 4, 5, 6, 4, 7],\n        -1,\n    ],\n    [\n        '#NUM!',\n        [],\n        1,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STANDARDIZE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [1.333333333333, 42, 40, 1.5],\n    [0.25, 5.5, 5, 2],\n    [20, 5.5, 1.5, 0.2],\n    [-2.0, 12, 15, 1.5],\n    [-0.4, -2, 0, 5],\n    [-0.676, 63.81, 65.5, 2.5],\n    ['#NUM!', 1.1, -2.2, -3.3],\n    ['#VALUE!', 'NAN', 0.1, 0.2],\n    ['#VALUE!', 0.1, 'NAN', 0.2],\n    ['#VALUE!', 0.1, 0.2, 'NAN'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STDEV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        27.463915719843,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        ['A', 'B', 'C'],\n    ],\n    [\n        '#DIV/0!',\n        [true, false],\n    ],\n    [\n        '#DIV/0!',\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STDEVA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        27.463915719843,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        [],\n    ],\n    [\n        0.707106781187,\n        [true, false],\n    ],\n    [\n        0.577350269190,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STDEVA_ODS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        27.463915719843,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        [],\n    ],\n    [\n        0.7071067811865476,\n        [true, false],\n    ],\n    [\n        0.577350269190,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STDEVP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        26.0545581424825,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        ['A', 'B', 'C'],\n    ],\n    [\n        '#DIV/0!',\n        [true, false],\n    ],\n    [\n        0.0,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STDEVPA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        26.0545581424825,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        [],\n    ],\n    [\n        0.5,\n        [true, false],\n    ],\n    [\n        0.471404520791,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STDEVPA_ODS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        26.0545581424825,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        [],\n    ],\n    [\n        0.5,\n        [true, false],\n    ],\n    [\n        0.471404520791,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STDEVP_ODS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        26.0545581424825,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        ['A', 'B', 'C'],\n    ],\n    [\n        0.5,\n        [true, false],\n    ],\n    [\n        0.471404520791,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STDEV_ODS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        27.463915719843,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        ['A', 'B', 'C'],\n    ],\n    [\n        0.7071067811865476,\n        [true, false],\n    ],\n    [\n        0.577350269190,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/STEYX.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3.305718950210,\n        [2, 3, 9, 1, 8, 7, 5],\n        [6, 5, 11, 7, 5, 4, 4],\n    ],\n    [\n        1.201186346682,\n        [3, 7.9, 8, 9.2, 12, 10.5, 15, 15.5, 17],\n        [1, 2, 3, 4, 4.5, 5, 6, 7, 8],\n    ],\n    [\n        '#N/A',\n        [],\n        [],\n    ],\n    [\n        '#DIV/0!',\n        [2],\n        [1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/TDIST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.027322464988,\n        1.959999998, 60, 1,\n    ],\n    [\n        0.054644929976,\n        1.959999998, 60, 2,\n    ],\n    [\n        0.170446566151,\n        1, 10, 1,\n    ],\n    [\n        0.340893132302,\n        1, 10, 2,\n    ],\n    [\n        0.028237990213,\n        2, 25, 1,\n    ],\n    [\n        0.056475980427,\n        2, 25, 2,\n    ],\n    'test 1 derived from Perl suite 1-tail' => [\n        0.0041301,\n        6.251, 3, 1,\n    ],\n    'test 2 derived from Perl suite 2-tail' => [\n        0.0082602,\n        6.251, 3, 2,\n    ],\n    'issue 4167' => [\n        0.31730337488351257,\n        1.8373862310371, 1, 2,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 10, 2,\n    ],\n    [\n        '#VALUE!',\n        1, 'NaN', 2,\n    ],\n    [\n        '#VALUE!',\n        1, 10, 'NaN',\n    ],\n    [\n        '#NUM!',\n        -1, 10, 2,\n    ],\n    [\n        '#NUM!',\n        1, 0, 2,\n    ],\n    [\n        '#NUM!',\n        1, 10, 0,\n    ],\n    [\n        '#NUM!',\n        1, 10, 3,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/TDIST2T.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.054644929976,\n        1.959999998, 60,\n    ],\n    [\n        0.340893132302,\n        1, 10,\n    ],\n    [\n        0.056475980427,\n        2, 25,\n    ],\n    'test 2 derived from Perl suite 2-tail' => [\n        0.0082602,\n        6.251, 3,\n    ],\n    'issue 4167' => [\n        0.31730337488351257,\n        1.8373862310371, 1,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 10,\n    ],\n    [\n        '#VALUE!',\n        1, 'NaN',\n    ],\n    [\n        '#NUM!',\n        -1, 10,\n    ],\n    [\n        '#NUM!',\n        1, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/TDISTRT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.027322464988,\n        1.959999998, 60,\n    ],\n    [\n        0.170446566151,\n        1, 10,\n    ],\n    [\n        0.028237990213,\n        2, 25,\n    ],\n    'test 1 derived from Perl suite 1-tail' => [\n        0.0041301,\n        6.251, 3,\n    ],\n    'issue 4167' => [\n        0.15865168744175628,\n        1.8373862310371, 1,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 10,\n    ],\n    [\n        '#VALUE!',\n        1, 'NaN',\n    ],\n    [\n        '#NUM!',\n        -1, 10,\n    ],\n    [\n        '#NUM!',\n        1, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/TINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1.960041187127,\n        0.05464, 60,\n    ],\n    [\n        1.221255395004,\n        0.25, 10,\n    ],\n    [\n        0.699812061312,\n        0.5, 10,\n    ],\n    'issue 4167' => [\n        12.706204736174712,\n        0.05, 1,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 10,\n    ],\n    [\n        '#VALUE!',\n        0.5, 'NaN',\n    ],\n    [\n        '#NUM!',\n        -0.5, 10,\n    ],\n    [\n        '#NUM!',\n        0.5, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/TREND.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            [133953.33333333334],\n            [134971.51515151517],\n            [135989.69696969696],\n            [137007.87878787878],\n            [138026.0606060606],\n            [139044.24242424243],\n            [140062.42424242425],\n            [141080.60606060608],\n            [142098.78787878787],\n            [143116.9696969697],\n            [144135.15151515152],\n            [145153.33333333334],\n        ],\n        [133890, 135000, 135790, 137300, 138130, 139100, 139900, 141120, 141890, 143230, 144000, 145290],\n        [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],\n    ],\n    [\n        [\n            [146171.51515151517],\n            [147189.69696969696],\n            [148207.87878787878],\n            [149226.0606060606],\n            [150244.24242424243],\n        ],\n        [133890, 135000, 135790, 137300, 138130, 139100, 139900, 141120, 141890, 143230, 144000, 145290],\n        [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],\n        [13, 14, 15, 16, 17],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/TRIMMEAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3.777777777778,\n        [4, 5, 6, 7, 2, 3, 4, 5, 1, 2, 3],\n        0.2,\n    ],\n    [\n        9.45,\n        [0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],\n        0.15,\n    ],\n    [\n        8.75,\n        [0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],\n        0.2,\n    ],\n    [\n        8.0,\n        [0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],\n        0.4,\n    ],\n    [\n        '#NUM!',\n        [0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],\n        15,\n    ],\n    [\n        '#VALUE!',\n        [0.5, 6, 7, 7, 8, 8, 9, 9, 16, 24],\n        'NaN',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/TdotINV.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        -1.625583529294314,\n        0.05464, 60,\n    ],\n    [\n        -0.699812061,\n        0.25, 10,\n    ],\n    [\n        0.0,\n        0.5, 10,\n    ],\n    'issue 4167' => [\n        -6.313746407466989,\n        0.05, 1,\n    ],\n    [\n        0.5095256881847339,\n        0.65, 1,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 10,\n    ],\n    [\n        '#VALUE!',\n        0.5, 'NaN',\n    ],\n    [\n        '#NUM!',\n        -0.5, 10,\n    ],\n    [\n        '#NUM!',\n        0.5, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/VAR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        754.266666666667,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        [true, false],\n    ],\n    [\n        '#DIV/0!',\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/VARA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        754.266666666667,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        0.5,\n        [true, false],\n    ],\n    [\n        0.333333333333,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/VARA_ODS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        754.266666666667,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        0.5,\n        [true, false],\n    ],\n    [\n        0.333333333333,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/VARP.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        678.84,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        '#DIV/0!',\n        [true, false],\n    ],\n    [\n        0.0,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/VARPA.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        678.84,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        0.25,\n        [true, false],\n    ],\n    [\n        0.222222222222,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/VARPA_ODS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        678.84,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        0.25,\n        [true, false],\n    ],\n    [\n        0.222222222222,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/VARP_ODS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        678.84,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        0.25,\n        [true, false],\n    ],\n    [\n        0.222222222222,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/VAR_ODS.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        754.266666666667,\n        [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],\n    ],\n    [\n        0.5,\n        [true, false],\n    ],\n    [\n        0.333333333333,\n        [true, false, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/WEIBULL.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.929581390070,\n        105, 20, 100, true,\n    ],\n    [\n        0.035588864025,\n        105, 20, 100, false,\n    ],\n    'too few arguments' => [\n        'exception',\n        105, 20, 100,\n    ],\n    [\n        1.10363832351433,\n        1, 3, 1, false,\n    ],\n    [\n        0.985212776817482,\n        2, 5, 1.5, true,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 5, 1.5, true,\n    ],\n    [\n        '#VALUE!',\n        2, 'NaN', 1.5, true,\n    ],\n    [\n        '#VALUE!',\n        2, 5, 'NaN', true,\n    ],\n    [\n        '#VALUE!',\n        2, 5, 1.5, 'NaN',\n    ],\n    [\n        '#NUM!',\n        -2, 5, 1.5, true,\n    ],\n    [\n        '#NUM!',\n        -2, 0, 1.5, true,\n    ],\n    [\n        '#NUM!',\n        -2, 5, 0, true,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/ZTEST.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.090574196851,\n        [3, 6, 7, 8, 6, 5, 4, 2, 1, 9],\n        4,\n    ],\n    [\n        0.863043389130,\n        [3, 6, 7, 8, 6, 5, 4, 2, 1, 9],\n        6,\n    ],\n    [\n        0.371103278559,\n        [4, 5, 2, 5, 8, 9, 3, 2, 3, 8, 9, 5],\n        5,\n    ],\n    [\n        0.83812918702,\n        [4, 5, 2, 5, 8, 9, 3, 2, 3, 8, 9, 5],\n        6,\n    ],\n    [\n        0.412070447871,\n        [1, 2, 3, 3, 4, 4, 8, 10, 12],\n        5,\n        3,\n    ],\n    [\n        0.00012286639,\n        [24, 22, 19, 21, 18, 19, 20, 23],\n        18,\n    ],\n    [\n        0.952209647727,\n        [24, 22, 19, 21, 18, 19, 20, 23],\n        22,\n    ],\n    [\n        0.952209647727,\n        [24, 22, 19, 21, 18, 19, 20, 23],\n        22,\n        null,\n    ],\n    [\n        '#VALUE!',\n        [1, 2, 3, 3, 4, 4, 8, 10, 12],\n        'NaN',\n        3,\n    ],\n    [\n        '#VALUE!',\n        [1, 2, 3, 3, 4, 4, 8, 10, 12],\n        5,\n        'NaN',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/tDotDistFalse.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.246526054,\n        0.9726775350120389,\n        60,\n    ],\n    'negative value' => [\n        0.05984790643563141,\n        -1.959999998, 60,\n    ],\n    [\n        0.23036198922913867,\n        1, 10,\n    ],\n    [\n        0.05736069661390933,\n        2, 25,\n    ],\n    'test 2 derived from Perl suite 2-tail' => [\n        0.0018685887727939731,\n        6.251, 3,\n    ],\n    'issue 4167' => [\n        0.07274011592342915,\n        1.8373862310371, 1,\n    ],\n    [\n        0.25270396336615836,\n        0.509525, 1,\n    ],\n    [\n        0.29593300757148816,\n        -0.7, 8,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 10,\n    ],\n    [\n        '#VALUE!',\n        1, 'NaN',\n    ],\n    [\n        0.23036198922913867,\n        -1, 10,\n    ],\n    [\n        '#NUM!',\n        1, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Statistical/tDotDistTrue.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0.9726775350120389,\n        1.959999998, 60,\n    ],\n    'negative value' => [\n        0.02732246498796111,\n        -1.959999998, 60,\n    ],\n    [\n        0.8295534338489702,\n        1, 10,\n    ],\n    [\n        0.9717620097865514,\n        2, 25,\n    ],\n    'test 2 derived from Perl suite 2-tail' => [\n        0.9958699007658498,\n        6.251, 3,\n    ],\n    'issue 4167' => [\n        0.8413483125582437,\n        1.8373862310371, 1,\n    ],\n    [\n        0.649999886410997,\n        0.509525, 1,\n    ],\n    [\n        0.251885526,\n        -0.7, 8,\n    ],\n    [\n        '#VALUE!',\n        'NaN', 10,\n    ],\n    [\n        '#VALUE!',\n        1, 'NaN',\n    ],\n    [\n        0.17044656615102982,\n        -1, 10,\n    ],\n    [\n        '#NUM!',\n        1, 0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/ARRAYTOTEXT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        \"1, 2, 3, a, b, c, TRUE, FALSE, #DIV/0!, 44774, 1, 44777, 12345.6789, -2.4, Hello\\nWorld\",\n        [\n            [1, 2, 3],\n            ['a', 'b', 'c'],\n            [true, false, '=12/0'],\n            ['=DATE(2022,8,1)', '1', '=A4+3'],\n            [12345.6789, '=-12/5', \"Hello\\nWorld\"],\n        ],\n        0,\n    ],\n    [\n        \"{1,2,3;\\\"a\\\",\\\"b\\\",\\\"c\\\";TRUE,FALSE,#DIV/0!;44774,1,44777;12345.6789,-2.4,\\\"Hello\\nWorld\\\"}\",\n        [\n            [1, 2, 3],\n            ['a', 'b', 'c'],\n            [true, false, '=12/0'],\n            ['=DATE(2022,8,1)', 1, '=A4+3'],\n            [12345.6789, '=-12/5', \"Hello\\nWorld\"],\n        ],\n        1,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/BAHTTEXT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'ศูนย์บาทถ้วน',\n        0,\n    ],\n    [\n        'หนึ่งบาทถ้วน',\n        1,\n    ],\n    [\n        'สองบาทถ้วน',\n        2,\n    ],\n    [\n        'สิบบาทถ้วน',\n        10,\n    ],\n    [\n        'สิบเอ็ดบาทถ้วน',\n        11,\n    ],\n    [\n        'ยี่สิบเอ็ดบาทถ้วน',\n        21,\n    ],\n    [\n        'สี่สิบสองบาทถ้วน',\n        42,\n    ],\n    [\n        'หนึ่งร้อยบาทถ้วน',\n        100,\n    ],\n    [\n        'หนึ่งพันบาทถ้วน',\n        1000,\n    ],\n    [\n        'หนึ่งพันแปดร้อยแปดสิบเจ็ดบาทถ้วน',\n        1887,\n    ],\n    [\n        'ห้าสิบสตางค์',\n        0.50,\n    ],\n    [\n        'หนึ่งบาทยี่สิบห้าสตางค์',\n        1.25,\n    ],\n    [\n        'หนึ่งร้อยยี่สิบสามบาทสี่สิบห้าสตางค์',\n        123.45,\n    ],\n    [\n        'หนึ่งพันสองร้อยสามสิบสี่บาทห้าสิบหกสตางค์',\n        1234.56,\n    ],\n    [\n        'ลบหนึ่งบาทถ้วน',\n        -1,\n    ],\n    [\n        'ลบสี่สิบสามบาทถ้วน',\n        -42.999,\n    ],\n    [\n        'ลบเก้าสิบเก้าบาทถ้วน',\n        -99,\n    ],\n    [\n        'ลบหนึ่งร้อยยี่สิบสามบาทสี่สิบห้าสตางค์',\n        -123.45,\n    ],\n    [\n        'ลบหนึ่งร้อยยี่สิบสามบาทสี่สิบห้าสตางค์',\n        '-123.452',\n    ],\n    [\n        'เก้าร้อยแปดสิบเจ็ดล้านหกแสนห้าหมื่นสี่พันสามร้อยยี่สิบเอ็ดล้านเก้าแสนแปดหมื่นเจ็ดพันหกร้อยห้าสิบสี่ล้านสามแสนสองหมื่นหนึ่งพันเก้าร้อยแปดสิบเจ็ดล้านหกแสนห้าหมื่นสี่พันสามร้อยยี่สิบเอ็ดบาทถ้วน',\n        '987654321987654321987654321',\n    ],\n    [\n        'หนึ่งบาทถ้วน',\n        true,\n    ],\n    [\n        'ศูนย์บาทถ้วน',\n        false,\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/CHAR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#VALUE!',\n        'ABC',\n    ],\n    [\n        '#VALUE!',\n        -5,\n    ],\n    [\n        '#VALUE!',\n        0,\n    ],\n    [\n        'A',\n        65,\n    ],\n    [\n        '{',\n        123,\n    ],\n    [\n        '~',\n        126,\n    ],\n    [\n        ['Á', 'Á', '¡'],\n        193,\n    ],\n    [\n        ['ÿ', 'ÿ', 'ˇ'],\n        255,\n    ],\n    [\n        ['#VALUE!', 'Ā'],\n        256,\n    ],\n    [\n        ['#VALUE!', '⽇'],\n        12103,\n    ],\n    [\n        ['#VALUE!', 'œ'],\n        0x153,\n    ],\n    [\n        ['#VALUE!', 'ƒ'],\n        0x192,\n    ],\n    [\n        ['#VALUE!', '℅'],\n        0x2105,\n    ],\n    [\n        ['#VALUE!', '∑'],\n        0x2211,\n    ],\n    [\n        ['#VALUE!', '†'],\n        0x2020,\n    ],\n    'example 1 different location all 3' => [\n        ['†', mb_chr(134, 'UTF-8'), 'Ü'],\n        134,\n    ],\n    'example 2 different location all 3' => [\n        ['€', mb_chr(128, 'UTF-8'), 'Ä'],\n        128,\n    ],\n    'non-ascii same win-1252 vs unicode, different mac' => [\n        ['Û', 'Û', '€'],\n        219,\n    ],\n    'after currency symbol placeholder' => [\n        ['Ü', 'Ü', '‹'],\n        220,\n    ],\n    'Example 3 where MAC differs from others' => [\n        ['Ð', 'Ð', '–'],\n        0xD0,\n    ],\n    'last assigned Unicode character' => [\n        ['#VALUE!', mb_chr(0x10FFFD, 'UTF-8')],\n        0x10FFFD,\n    ],\n    'highest possible code point' => [\n        ['#VALUE!', '#N/A'],\n        0x10FFFF,\n    ],\n    'above highest possible code point' => [\n        '#VALUE!',\n        0x110000,\n    ],\n    'nbsp for win/uni, dagger for Mac' => [\n        [\"\\u{A0}\", \"\\u{A0}\", '†'],\n        160,\n    ],\n    'omitted argument' => ['exception'],\n    'non-printable' => [\"\\x02\", 2],\n    'bool argument' => [\"\\x01\", true],\n    'null argument' => ['#VALUE!', null],\n    'ascii 1 is 49' => ['1', 49],\n    'ascii 0 is 48' => ['0', 48],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/CLEAN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'HELLO      ',\n        '\u0005\u0006\u0007\b\u0001\u0002HELLO      ',\n    ],\n    [\n        ' HELLO ',\n        '\u0005 H\u0006E\u0007L\bL\u0001O \u0002',\n    ],\n    [\n        'HELLO',\n        '\tHELLO',\n    ],\n    [\n        'HELLO    WORLD',\n        'HELLO    WORLD',\n    ],\n    [\n        'TRUE',\n        true,\n    ],\n    [\n        null,\n        null,\n    ],\n    'omitted argument' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/CODE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Used to test both CODE and UNICODE.\n// If expected result is array, 1st entry is for CODE, 2nd for UNICODE,\n// and 3rd for CODE using MACROMAN.\n\nreturn [\n    [\n        '#VALUE!',\n        null,\n    ],\n    [\n        '#VALUE!',\n        '',\n    ],\n    [\n        65,\n        'ABC',\n    ],\n    [\n        49,\n        123,\n    ],\n    [\n        84,\n        true,\n    ],\n    [\n        68,\n        'DEF',\n    ],\n    [\n        80,\n        'PhpSpreadsheet',\n    ],\n    [\n        49,\n        1.5,\n    ],\n    [\n        77,\n        'Mark Baker',\n    ],\n    [\n        109,\n        'mark baker',\n    ],\n    [\n        163,\n        '£125.00',\n    ],\n    [\n        [63, 12103],\n        '⽇',\n    ],\n    [\n        [156, 0x153, 207],\n        'œ',\n    ],\n    [\n        [131, 0x192, 196],\n        'ƒ',\n    ],\n    [\n        [63, 0x2105],\n        '℅',\n    ],\n    [\n        [63, 0x2211, 183],\n        '∑',\n    ],\n    [\n        [134, 0x2020, 160],\n        '†',\n    ],\n    [\n        [128, 8364, 219],\n        '€',\n    ],\n    [\n        [220, 220, 134],\n        'Ü',\n    ],\n    'non-ascii but same win-1252 vs unicode' => [\n        [0xD0, 0xD0, 63],\n        'Ð',\n    ],\n    'ascii control character' => [\n        2,\n        \"\\x02\",\n    ],\n    'omitted argument' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/CONCAT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\n\nreturn [\n    [\n        'ABCDEFGHIJ',\n        'ABCDE',\n        'FGHIJ',\n    ],\n    [\n        '123',\n        1,\n        2,\n        3,\n    ],\n    [\n        'Boolean-TRUE',\n        'Boolean',\n        '-',\n        true,\n    ],\n    'no arguments' => ['exception'],\n    'result just fits' => [\n        // Note use Armenian character below to make sure chars, not bytes\n        str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5) . 'ABCDE',\n        str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5),\n        'ABCDE',\n    ],\n    'result too long' => [\n        '#CALC!',\n        str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5),\n        'abc',\n        '=A2',\n    ],\n    'propagate DIV0' => ['#DIV/0!', '1', '=2/0', '3'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/CONCATENATE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\n\nreturn [\n    [\n        'ABCDEFGHIJ',\n        'ABCDE',\n        'FGHIJ',\n    ],\n    [\n        '123',\n        1,\n        2,\n        3,\n    ],\n    [\n        'Boolean-TRUE',\n        'Boolean',\n        '-',\n        true,\n    ],\n    'no arguments' => ['exception'],\n    'result just fits' => [\n        // Note use Armenian character below to make sure chars, not bytes\n        str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5) . 'ABCDE',\n        'A3',\n        'ABCDE',\n    ],\n    'result too long' => [\n        '#CALC!',\n        'A3',\n        'abc',\n        'def',\n    ],\n    'propagate DIV0' => ['#DIV/0!', '1', 'A2', '3'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/DOLLAR.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '$123.46',\n        123.456,\n        2,\n    ],\n    [\n        '$123.46',\n        123.456,\n    ],\n    [\n        '$123.32',\n        123.321,\n        2,\n    ],\n    [\n        '-$123.32',\n        -123.321,\n        2,\n    ],\n    [\n        '$1,235,000',\n        1234567,\n        -3,\n    ],\n    [\n        '$1,200,000',\n        1234567,\n        -5,\n    ],\n    [\n        '-$1,200,000',\n        -1234567,\n        -5,\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n        2,\n    ],\n    [\n        '#VALUE!',\n        123.456,\n        'ABC',\n    ],\n    'omitted amount' => ['exception'],\n    'omitted decimals' => ['$123.46', 123.456],\n    'null decimals' => ['$123', 123.456, null],\n    'boolean decimals' => ['$123.5', 123.456, true],\n    'boolean value' => ['$1.00', true],\n    'null value' => ['$0.00', null],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/EXACT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        true,\n        '',\n        '',\n    ],\n    [\n        true,\n        '1000',\n        1000,\n    ],\n    [\n        true,\n        1000,\n        '1000',\n    ],\n    [\n        true,\n        'Abč',\n        'Abč',\n    ],\n    [\n        false,\n        'abč',\n        'Abč',\n    ],\n    [\n        false,\n        '10.010',\n        10.01,\n    ],\n    [\n        false,\n        '  ',\n        '',\n    ],\n    'no arguments' => ['exception'],\n    'one argument1' => ['exception', 'abc'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/FIND.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3,\n        'E',\n        'QWERTYUIOP',\n    ],\n    [\n        4,\n        'D',\n        'ABCDEFGHI',\n    ],\n    [\n        4,\n        'E',\n        true,\n    ],\n    [\n        5,\n        'E',\n        false,\n    ],\n    [\n        '#VALUE!',\n        'A',\n        'Mark Baker',\n    ],\n    [\n        2,\n        'A',\n        'MARK BAKER',\n    ],\n    [\n        1,\n        'Ενα',\n        'Ενα δύο τρία τέσσερα πέντε',\n    ],\n    [\n        9,\n        'τρία',\n        'Ενα δύο τρία τέσσερα πέντε',\n    ],\n    [\n        22,\n        'πέντε',\n        'Ενα δύο τρία τέσσερα πέντε',\n    ],\n    [\n        1,\n        'ΕΝΑ',\n        'ΕΝΑ ΔΎΟ ΤΡΊΑ ΤΈΣΣΕΡΑ ΠΈΝΤΕ',\n    ],\n    [\n        9,\n        'ΤΡΊΑ',\n        'ΕΝΑ ΔΎΟ ΤΡΊΑ ΤΈΣΣΕΡΑ ΠΈΝΤΕ',\n    ],\n    [\n        22,\n        'ΠΈΝΤΕ',\n        'ΕΝΑ ΔΎΟ ΤΡΊΑ ΤΈΣΣΕΡΑ ΠΈΝΤΕ',\n    ],\n    [\n        2,\n        'a',\n        'Mark Baker',\n        2,\n    ],\n    [\n        4,\n        'k',\n        'Mark Baker',\n        2,\n    ],\n    [\n        8,\n        'k',\n        'Mark Baker',\n        5,\n    ],\n    [\n        7,\n        'a',\n        'Mark Baker',\n        3,\n    ],\n    [\n        '#VALUE!',\n        'BITE',\n        'BIT',\n    ],\n    [\n        1,\n        '',\n        'Mark Baker',\n    ],\n    [\n        8,\n        '',\n        'Mark Baker',\n        8,\n    ],\n    'Boolean Needle' => [\n        '#VALUE!',\n        true,\n        'Mark Baker',\n    ],\n    'no arguments' => ['exception'],\n    'one argument' => ['exception', 'a'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/FIXED.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '123,456.79',\n        123456.789,\n        2,\n        false,\n    ],\n    [\n        '123456.8',\n        123456.789,\n        1,\n        true,\n    ],\n    [\n        '123456.79',\n        123456.789,\n        2,\n        true,\n    ],\n    [\n        '-123456.79',\n        -123456.789,\n        2,\n        true,\n    ],\n    [\n        '123500',\n        123456.789,\n        -2,\n        true,\n    ],\n    [\n        '123,500',\n        123456.789,\n        -2,\n    ],\n    [\n        '-123500',\n        -123456.789,\n        -2,\n        true,\n    ],\n    [\n        '-123,500',\n        -123456.789,\n        -2,\n    ],\n    [\n        '#VALUE!',\n        'ABC',\n        2,\n        null,\n    ],\n    [\n        '#VALUE!',\n        123.456,\n        'ABC',\n        null,\n    ],\n    'no arguments' => ['exception'],\n    'just one argument is okay' => ['123.00', 123],\n    'null second argument' => ['123', 123, null],\n    'false second argument' => ['123', 123, false],\n    'true second argument' => ['123.0', 123, true],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/LEFT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '',\n        null,\n        1,\n    ],\n    [\n        '',\n        '',\n        1,\n    ],\n    [\n        '',\n        'ABC',\n        0,\n    ],\n    [\n        '#VALUE!',\n        'QWERTYUIOP',\n        -1,\n    ],\n    [\n        '#VALUE!',\n        'QWERTYUIOP',\n        'NaN',\n    ],\n    'null length defaults to 0' => [\n        '',\n        'QWERTYUIOP',\n        null,\n    ],\n    'omitted length defaults to 1' => [\n        'Q',\n        'QWERTYUIOP',\n    ],\n    [\n        'ABC',\n        'ABCDEFGHI',\n        3,\n    ],\n    [\n        'Ενα',\n        'Ενα δύο τρία τέσσερα πέντε',\n        3,\n    ],\n    [\n        'Ενα δύο',\n        'Ενα δύο τρία τέσσερα πέντε',\n        7,\n    ],\n    [\n        'Ενα δύο τρία',\n        'Ενα δύο τρία τέσσερα πέντε',\n        12,\n    ],\n    [\n        'TR',\n        true,\n        2,\n    ],\n    [\n        'FA',\n        false,\n        2,\n    ],\n    'string not specified' => [\n        'exception',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/LEN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        0,\n        null,\n    ],\n    [\n        0,\n        '',\n    ],\n    [\n        9,\n        'AbCdEfGhI',\n    ],\n    [\n        10,\n        'MARK BAKER',\n    ],\n    [\n        4,\n        true,\n    ],\n    [\n        5,\n        false,\n    ],\n    'no arguments' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/LOWER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'abcdefghi',\n        'AbCdEfGhI',\n    ],\n    [\n        'mark baker',\n        'MARK BAKER',\n    ],\n    [\n        'buenos días',\n        'BUENOS DÍAS',\n    ],\n    [\n        'καλημερα',\n        'ΚΑΛΗΜΕΡΑ',\n    ],\n    [\n        'доброе утро',\n        'ДОБРОЕ УТРО',\n    ],\n    [\n        'true',\n        true,\n    ],\n    [\n        'false',\n        false,\n    ],\n    'error code unchanged' => [\n        '#VALUE!',\n        '#VALUE!',\n    ],\n    'no argument' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/MID.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '',\n        null,\n        1,\n        1,\n    ],\n    [\n        '',\n        '',\n        1,\n        1,\n    ],\n    [\n        '#VALUE!',\n        'QWERTYUIOP',\n        0,\n        1,\n    ],\n    [\n        '#VALUE!',\n        'QWERTYUIOP',\n        5,\n        -1,\n    ],\n    [\n        '#VALUE!',\n        'QWERTYUIOP',\n        'NaN',\n        1,\n    ],\n    [\n        '#VALUE!',\n        'QWERTYUIOP',\n        2,\n        'NaN',\n    ],\n    'length null treated as zero' => [\n        '',\n        'QWERTYUIOP',\n        2,\n        null,\n    ],\n    'length not specified' => [\n        'exception',\n        'QWERTYUIOP',\n        5,\n    ],\n    'start not specified' => [\n        'exception',\n        'QWERTYUIOP',\n    ],\n    'string not specified' => [\n        'exception',\n    ],\n    [\n        'IOP',\n        'QWERTYUIOP',\n        8,\n        20,\n    ],\n    [\n        '',\n        'QWERTYUIOP',\n        999,\n        2,\n    ],\n    [\n        'DEF',\n        'ABCDEFGHI',\n        4,\n        3,\n    ],\n    [\n        'δύο',\n        'Ενα δύο τρία τέσσερα πέντε',\n        5,\n        3,\n    ],\n    [\n        'δύο τρία',\n        'Ενα δύο τρία τέσσερα πέντε',\n        5,\n        8,\n    ],\n    [\n        'τρία τέσσερα',\n        'Ενα δύο τρία τέσσερα πέντε',\n        9,\n        12,\n    ],\n    [\n        'R',\n        true,\n        2,\n        1,\n    ],\n    [\n        'AL',\n        false,\n        2,\n        2,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/NUMBERVALUE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1234567.89,\n        '1,234,567.890',\n    ],\n    [\n        1234567.89,\n        '1 234 567,890', ',', ' ',\n    ],\n    [\n        -1234567.89,\n        '-1 234 567,890', ',', ' ',\n    ],\n    [\n        '#VALUE!',\n        '1 234 567,890-', ',', ' ',\n    ],\n    [\n        '#VALUE!',\n        '1,234,567.890,123',\n    ],\n    [\n        '#VALUE!',\n        '1.234.567.890,123',\n    ],\n    [\n        1234567.890,\n        '1.234.567,890', ',', '.',\n    ],\n    [\n        '#VALUE!',\n        '1.234.567,89',\n    ],\n    [\n        12345.6789,\n        '1,234,567.89%',\n    ],\n    [\n        123.456789,\n        '1,234,567.89%%',\n    ],\n    [\n        1.23456789,\n        '1,234,567.89%%%',\n    ],\n    [\n        '#VALUE!',\n        '1,234,567.89-%',\n    ],\n    'no arguments' => ['exception'],\n    'boolean argument' => ['#VALUE!', true],\n    'slash as group separator' => [1234567.1, '1/234/567.1', '.', '/'],\n    'slash as decimal separator' => [1234567.1, '1,234,567/1', '/', ','],\n    'issue 3574 null string treated as 0' => [0, '', ',', ' '],\n    'issue 3574 one or more spaces treated as 0' => [0, '   ', ',', ' '],\n    'issue 3574 non-blank numeric string okay' => [2, ' 2 ', ',', ' '],\n    'issue 3574 non-blank non-numeric string invalid' => ['#VALUE!', ' x ', ',', ' '],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/OpenOffice.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'OO allows CHAR(0)' => [\"\\x00\", '=CHAR(0)'],\n    'OO treats CODE(bool) as 0/1' => [48, '=CODE(FALSE)'],\n    'OO treats UNICODE(bool) as 0/1' => [49, '=UNICODE(TRUE)'],\n    'OO treats bool as string as 0/1 to REPT' => ['111', '=REPT(true, 3)'],\n    'OO treats bool as string as 0/1 to CLEAN' => ['0', '=CLEAN(false)'],\n    'OO treats bool as string as 0/1 to TRIM' => ['1', '=TRIM(true)'],\n    'OO treats bool as string as 0/1 to LEN' => [1, '=LEN(false)'],\n    'OO treats bool as string as 0/1 to EXACT parm 1' => [true, '=EXACT(true, 1)'],\n    'OO treats bool as string as 0/1 to EXACT parm 2' => [true, '=EXACT(0, false)'],\n    'OO treats bool as string as 0/1 to FIND parm 1' => [2, '=FIND(true, \"210\")'],\n    'OO treats bool as string as 0/1 to FIND parm 2' => [1, '=FIND(0, false)'],\n    'OO treats true as int 1 to FIND parm 3' => [1, '=FIND(\"a\", \"aba\", true)'],\n    'OO treats false as int 0 to FIND parm 3' => ['#VALUE!', '=FIND(\"a\", \"aba\", false)'],\n    'OO treats bool as string as 0/1 to SEARCH parm 1' => [2, '=SEARCH(true, \"210\")'],\n    'OO treats bool as string as 0/1 to SEARCH parm 2' => [1, '=SEARCH(0, false)'],\n    'OO treats true as int 1 to SEARCH parm 3' => [1, '=SEARCH(\"a\", \"aba\", true)'],\n    'OO treats false as int 0 to SEARCH parm 3' => ['#VALUE!', '=SEARCH(\"a\", \"aba\", false)'],\n    'OO treats true as 1 to REPLACE parm 1' => ['10', '=REPLACE(true, 3, 1, false)'],\n    'OO treats false as 0 to REPLACE parm 4' => ['he0lo', '=REPLACE(\"hello\", 3, 1, false)'],\n    'OO treats false as 0 SUBSTITUTE parm 1' => ['6', '=SUBSTITUTE(true, \"1\", \"6\")'],\n    'OO treats true as 1 SUBSTITUTE parm 4' => ['zbcade', '=SUBSTITUTE(\"abcade\", \"a\", \"z\", true)'],\n    'OO TEXT boolean in lieu of string' => ['0', '=TEXT(false, \"@\")'],\n    'OO VALUE boolean in lieu of string' => [0.0, '=VALUE(false)'],\n    'OO NUMBERVALUE boolean in lieu of string' => [1.0, '=NUMBERVALUE(true)'],\n    'OO TEXTJOIN boolean in lieu of string' => ['1-0-1', '=TEXTJOIN(\"-\", true, true, false, true)'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/PROPER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'Mark Baker',\n        'MARK BAKER',\n    ],\n    [\n        'Buenos Días',\n        'BUENOS DÍAS',\n    ],\n    [\n        'Καλημερα',\n        'ΚΑΛΗΜΕΡΑ',\n    ],\n    [\n        'Доброе Утро',\n        'ДОБРОЕ УТРО',\n    ],\n    [\n        'True',\n        true,\n    ],\n    [\n        'False',\n        false,\n    ],\n    'error code unchanged' => [\n        '#VALUE!',\n        '#VALUE!',\n    ],\n    'no argument' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/REPLACE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'QWDFGYUIOP',\n        'QWERTYUIOP',\n        3,\n        3,\n        'DFG',\n    ],\n    [\n        'QWERDFGIOP',\n        'QWERTYUIOP',\n        5,\n        3,\n        'DFG',\n    ],\n    [\n        'QWDFGERTYUIOP',\n        'QWERTYUIOP',\n        3,\n        0,\n        'DFG',\n    ],\n    [\n        'QWERDFGTYUIOP',\n        'QWERTYUIOP',\n        5,\n        0,\n        'DFG',\n    ],\n    [\n        'Ενα δύοτρίατέσσεραπέντε',\n        'Εναδύοτρίατέσσεραπέντε',\n        4,\n        0,\n        ' ',\n    ],\n    [\n        'Ενα δύο τρίατέσσεραπέντε',\n        'Ενα δύοτρίατέσσεραπέντε',\n        8,\n        0,\n        ' ',\n    ],\n    [\n        'Ενα δύο τρία τέσσεραπέντε',\n        'Ενα δύο τρίατέσσεραπέντε',\n        13,\n        0,\n        ' ',\n    ],\n    [\n        'Ενα δύο τρία τέσσερα πέντε',\n        'Ενα δύο τρία τέσσεραπέντε',\n        21,\n        0,\n        ' ',\n    ],\n    'no arguments' => ['exception'],\n    'one argument' => ['exception', 'hello'],\n    'two arguments' => ['exception', 'hello', 2],\n    'three arguments' => ['exception', 'hello', 2, 2],\n    'position zero' => ['#VALUE!', 'hello', 0, 2, 'xyz'],\n    'negative length' => ['#VALUE!', 'hello', 3, -1, 'xyz'],\n    'boolean 1st parm' => ['TRDFGE', true, 3, 1, 'DFG'],\n    'boolean 4th parm' => ['heFALSElo', 'hello', 3, 1, false],\n    'propagate REF' => ['#REF!', '=sheet99!A1', 3, 1, 'x'],\n    'propagate DIV0' => ['#DIV/0!', '=1/0', 3, 1, 'x'],\n    'string which just sneaks in' => [\n        str_repeat('A', 32766) . 'C',\n        str_repeat('A', 32766) . 'B',\n        32767,\n        '1',\n        'C',\n    ],\n    'string which overflows' => [\n        '#VALUE!',\n        str_repeat('A', 32766) . 'B',\n        32767,\n        '1',\n        'CC',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/REPT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'no arguments' => ['exception'],\n    'one argument' => ['exception', 'ABC'],\n    ['#VALUE!', 'ABC', 'DEF'],\n    ['ABCABCABC', 'ABC', 3],\n    ['ABCABC', 'ABC', 2.2],\n    ['', 'ABC', 0],\n    ['TRUETRUE', true, 2],\n    ['111', 1, 3],\n    ['δύο δύο ', 'δύο ', 2],\n    ['#VALUE!', 'ABC', -1],\n    'result too long' => ['#VALUE!', 'A', 32768],\n    'result just fits' => [str_repeat('A', 32767), 'A', 32767],\n    'propagate NUM' => ['#NUM!', '=SQRT(-1)', 5],\n    'propagate REF' => ['#REF!', '=sheet99!A1', 5],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/RIGHT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '',\n        null,\n        1,\n    ],\n    [\n        '',\n        '',\n        1,\n    ],\n    [\n        '#VALUE!',\n        'QWERTYUIOP',\n        -1,\n    ],\n    [\n        '#VALUE!',\n        'QWERTYUIOP',\n        'NaN',\n    ],\n    'null length defaults to 0' => [\n        '',\n        'QWERTYUIOP',\n        null,\n    ],\n    'omitted length defaults to 1' => [\n        'P',\n        'QWERTYUIOP',\n    ],\n    [\n        'GHI',\n        'ABCDEFGHI',\n        3,\n    ],\n    [\n        '',\n        'ABCDEFGHI',\n        0,\n    ],\n    [\n        'πέντε',\n        'Ενα δύο τρία τέσσερα πέντε',\n        5,\n    ],\n    [\n        'τέσσερα πέντε',\n        'Ενα δύο τρία τέσσερα πέντε',\n        13,\n    ],\n    [\n        'τρία τέσσερα πέντε',\n        'Ενα δύο τρία τέσσερα πέντε',\n        18,\n    ],\n    [\n        'UE',\n        true,\n        2,\n    ],\n    [\n        'SE',\n        false,\n        2,\n    ],\n    'string not specified' => [\n        'exception',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/SEARCH.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3,\n        'E',\n        'QWERTYUIOP',\n    ],\n    [\n        4,\n        'D',\n        'ABCDEFGHI',\n    ],\n    [\n        4,\n        'E',\n        true,\n    ],\n    [\n        5,\n        'E',\n        false,\n    ],\n    [\n        2,\n        'A',\n        'Mark Baker',\n    ],\n    [\n        '#VALUE!',\n        'C',\n        'Mark Baker',\n    ],\n    [\n        7,\n        'A',\n        'Mark Baker',\n        3,\n    ],\n    [\n        4,\n        'K',\n        'Mark Baker',\n    ],\n    [\n        8,\n        'K',\n        'Mark Baker',\n        5,\n    ],\n    [\n        2,\n        'A',\n        'Mark Baker',\n        2,\n    ],\n    [\n        1,\n        '',\n        'Mark Baker',\n    ],\n    [\n        1,\n        'Ενα',\n        'Ενα δύο τρία τέσσερα πέντε',\n    ],\n    [\n        9,\n        'τρία',\n        'Ενα δύο τρία τέσσερα πέντε',\n    ],\n    [\n        22,\n        'πέντε',\n        'Ενα δύο τρία τέσσερα πέντε',\n    ],\n    [\n        1,\n        'Ενα',\n        'ΕΝΑ ΔΥΟ ΤΡΙΑ ΤΕΣΣΕΡΑ ΠΕΝΤΕ',\n    ],\n    [\n        9,\n        'τρία',\n        'ΕΝΑ ΔΎΟ ΤΡΊΑ ΤΈΣΣΕΡΑ ΠΈΝΤΕ',\n    ],\n    [\n        22,\n        'πέντε',\n        'ΕΝΑ ΔΎΟ ΤΡΊΑ ΤΈΣΣΕΡΑ ΠΈΝΤΕ',\n    ],\n    [\n        '#VALUE!',\n        'BITE',\n        'BIT',\n    ],\n    'Boolean Needle' => [\n        '#VALUE!',\n        true,\n        'Mark Baker',\n    ],\n    'no arguments' => ['exception'],\n    'one argument' => ['exception', 'string'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/SUBSTITUTE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'QWDFGYUIOP',\n        'QWERTYUIOP',\n        'ERT',\n        'DFG',\n    ],\n    [\n        'Mxrk Bxker',\n        'Mark Baker',\n        'a',\n        'x',\n    ],\n    [\n        'Mxrk Baker',\n        'Mark Baker',\n        'a',\n        'x',\n        1,\n    ],\n    [\n        'Mark Bxker',\n        'Mark Baker',\n        'a',\n        'x',\n        2,\n    ],\n    [\n        'Mark Bakker',\n        'Mark Baker',\n        'k',\n        'kk',\n        2,\n    ],\n    [\n        'Mark Baker',\n        'Mark Baker',\n        'x',\n        'a',\n        1,\n    ],\n    [\n        'Ενα δύο αρία αέσσερα πέναε',\n        'Ενα δύο τρία τέσσερα πέντε',\n        'τ',\n        'α',\n    ],\n    [\n        'Ενα δύο τρία αέσσερα πέντε',\n        'Ενα δύο τρία τέσσερα πέντε',\n        'τ',\n        'α',\n        2,\n    ],\n    [\n        'Ενα δύο τρία ατέσσερα πέντε',\n        'Ενα δύο τρία τέσσερα πέντε',\n        'τ',\n        'ατ',\n        2,\n    ],\n    'Unicode equivalence is not supported' => [\n        \"\\u{0061}\\u{030A}\",\n        \"\\u{0061}\\u{030A}\",\n        \"\\u{00E5}\",\n        'x',\n    ],\n    'Multibytes are supported' => [\n        'x',\n        \"\\u{00E5}\",\n        \"\\u{00E5}\",\n        'x',\n    ],\n    'no arguments' => ['exception'],\n    'one argument' => ['exception', 'a'],\n    'two arguments' => ['exception', 'a', 'b'],\n    'negative instance' => ['#VALUE!', 'abcdefg', 'def', 123, -1],\n    'non-numeric instance' => ['#VALUE!', 'abcdefg', 'def', 123, 'xyz'],\n    'null instance' => ['abc123g', 'abcdefg', 'def', 123],\n    '0 instance' => ['#VALUE!', 'abcdefg', 'def', 123, 0],\n    '1 instance' => ['abc123g', 'abcdefg', 'def', 123, 1],\n    'past last instance' => ['abcdefg', 'abcdefg', 'def', 123, 2],\n    'bool false instance' => ['#VALUE!', 'abcdefg', 'def', '123', false],\n    'bool true instance' => ['#VALUE!', 'abcdefg', 'def', '123', true],\n    'bool text' => ['FA-SE', false, 'L', '-'],\n    'propagate REF' => ['#REF!', '=sheet99!A1', 'A', 'x'],\n    'propagate DIV0' => ['#DIV/0!', 'hello', '=1/0', 1, 'x'],\n    'string which just sneaks in' => [\n        str_repeat('A', 32766) . 'C',\n        str_repeat('A', 32766) . 'B',\n        'B',\n        'C',\n    ],\n    'string which overflows' => [\n        '#VALUE!',\n        str_repeat('A', 32766) . 'B',\n        'B',\n        'CC',\n    ],\n    'okay long string instance' => [\n        'AAAAB' . str_repeat('A', 32762),\n        str_repeat('A', 32767),\n        'A',\n        'B',\n        5,\n    ],\n    'overflow long string instance' => [\n        '#VALUE!',\n        str_repeat('A', 32767),\n        'A',\n        'BB',\n        5,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/T.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '',\n        123456.789,\n    ],\n    [\n        '123456.789',\n        '123456.789',\n    ],\n    [\n        'Mark Baker',\n        'Mark Baker',\n    ],\n    [\n        '',\n        null,\n    ],\n    [\n        '',\n        true,\n    ],\n    'no arguments' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/TEXT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '$123.46',\n        123.456,\n        '$#,##0.00',\n    ],\n    [\n        '$-123.46',\n        -123.456,\n        '$#,##0.00',\n    ],\n    [\n        '123.46',\n        123.456,\n        '#,##0.00',\n    ],\n    [\n        '123',\n        123.456,\n        '#,##0',\n    ],\n    [\n        '00123',\n        123.456,\n        '00000',\n    ],\n    [\n        '$123,456.79',\n        123456.789,\n        '$#,##0.00',\n    ],\n    [\n        '123,456.79',\n        123456.789,\n        '#,##0.00',\n    ],\n    [\n        '1.23E+5',\n        123456.789,\n        '0.00E+00',\n    ],\n    [\n        '-1.23E+5',\n        -123456.789,\n        '0.00E+00',\n    ],\n    [\n        '1.23E-5',\n        1.2345E-5,\n        '0.00E+00',\n    ],\n    [\n        '1960-12-19',\n        '19-Dec-1960',\n        'yyyy-mm-dd',\n    ],\n    [\n        '2012-01-01',\n        '1-Jan-2012',\n        'yyyy-mm-dd',\n    ],\n    'time (issue 3409)' => [\n        '09:01:00',\n        '09:01',\n        'HH:MM:SS',\n    ],\n    'datetime' => [\n        '15-Feb-2014 04:17:00 PM',\n        '2014-02-15 16:17',\n        'dd-mmm-yyyy HH:MM:SS AM/PM',\n    ],\n    'datetime integer' => [\n        '1900-01-06 00:00',\n        6,\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime integer as string' => [\n        '1900-01-06 00:00',\n        '6',\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime 2 integers without date delimiters' => [\n        '5 6',\n        '5 6',\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime 2 integers separated by hyphen' => [\n        (new DateTimeImmutable())->format('Y') . '-05-13 00:00',\n        '5-13',\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime string date only' => [\n        '1951-01-23 00:00',\n        'January 23, 1951',\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime string time followed by date' => [\n        '1952-05-02 03:54',\n        '3:54 May 2, 1952',\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime string date followed by time pm' => [\n        '1952-05-02 15:54',\n        'May 2, 1952 3:54 pm',\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime string date followed by time p' => [\n        '1952-05-02 15:54',\n        'May 2, 1952 3:54 p',\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime decimal string interpreted as time' => [\n        '1900-01-02 12:00',\n        '2.5',\n        'yyyy-mm-dd hh:mm',\n    ],\n    'datetime unparseable string' => [\n        'xyz',\n        'xyz',\n        'yyyy-mm-dd hh:mm',\n    ],\n    [\n        '1 3/4',\n        1.75,\n        '# ?/?',\n    ],\n    'no arguments' => ['exception'],\n    'one argument' => ['exception', 1.75],\n    'boolean in lieu of string' => ['TRUE', true, '@'],\n    'system long date format' => ['Sunday, January 1, 2012', '1-Jan-2012', '[$-x-sysdate]'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/TEXTAFTER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    'END Case-sensitive Offset 1' => [\n        \"'s red hood\",\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n        ],\n    ],\n    'END Case-sensitive Offset 2' => [\n        '',\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            2,\n        ],\n    ],\n    'END Case-sensitive Offset -1' => [\n        '',\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            -1,\n        ],\n    ],\n    'END Case-sensitive Offset -2' => [\n        \"'s red hood\",\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            -2,\n        ],\n    ],\n    'END Case-sensitive Offset 3' => [\n        ExcelError::NA(),\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            3,\n        ],\n    ],\n    'END Case-sensitive Offset -3' => [\n        ExcelError::NA(),\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            -3,\n        ],\n    ],\n    'END Case-sensitive Offset 3 with end' => [\n        '',\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            3,\n            0,\n            1,\n        ],\n    ],\n    'END Case-sensitive Offset -3 with end' => [\n        \"Red riding hood's red hood\",\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            -3,\n            0,\n            1,\n        ],\n    ],\n    'END Case-sensitive - No Match' => [\n        ExcelError::NA(),\n        [\n            \"Red riding hood's red hood\",\n            'HOOD',\n        ],\n    ],\n    'END Case-insensitive Offset 1' => [\n        \"'s red hood\",\n        [\n            \"Red riding hood's red hood\",\n            'HOOD',\n            1,\n            1,\n        ],\n    ],\n    'END Case-insensitive Offset 2' => [\n        '',\n        [\n            \"Red riding hood's red hood\",\n            'HOOD',\n            2,\n            1,\n        ],\n    ],\n    'END Offset 0' => [\n        ExcelError::VALUE(),\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            0,\n        ],\n    ],\n    'Empty match positive' => [\n        \"Red riding hood's red hood\",\n        [\n            \"Red riding hood's red hood\",\n            '',\n        ],\n    ],\n    'Empty match negative' => [\n        '',\n        [\n            \"Red riding hood's red hood\",\n            '',\n            -1,\n        ],\n    ],\n    'START Case-sensitive Offset 1' => [\n        ' riding hood',\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n        ],\n    ],\n    'START Case-insensitive Offset 1' => [\n        \" Riding Hood's red riding hood\",\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            1,\n            1,\n        ],\n    ],\n    'START Case-sensitive Offset -2' => [\n        \"Red Riding Hood's red riding hood\",\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            -2,\n            0,\n            1,\n        ],\n    ],\n    'START Case-insensitive Offset -2' => [\n        \" Riding Hood's red riding hood\",\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            -2,\n            1,\n            1,\n        ],\n    ],\n    [\n        ' riding hood',\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            1,\n            0,\n        ],\n    ],\n    [\n        \" Riding Hood's red riding hood\",\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            1,\n            1,\n        ],\n    ],\n    [\n        \"Red Riding Hood's red riding hood\",\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            -2,\n            0,\n            1,\n        ],\n    ],\n    [\n        \" Riding Hood's red riding hood\",\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            -2,\n            1,\n            1,\n        ],\n    ],\n    [\n        ExcelError::NA(),\n        [\n            'Socrates',\n            ' ',\n            1,\n            0,\n            0,\n        ],\n    ],\n    [\n        '',\n        [\n            'Socrates',\n            ' ',\n            1,\n            0,\n            1,\n        ],\n    ],\n    'Multi-delimiter Case-Insensitive Offset 1' => [\n        \" riding hood's red riding hood\",\n        [\n            \"Little Red riding hood's red riding hood\",\n            ['HOOD', 'RED'],\n            1,\n            1,\n        ],\n    ],\n    'Multi-delimiter Case-Insensitive Offset 2' => [\n        \"'s red riding hood\",\n        [\n            \"Little Red riding hood's red riding hood\",\n            ['HOOD', 'RED'],\n            2,\n            1,\n        ],\n    ],\n    'Multi-delimiter Case-Insensitive Offset 3' => [\n        ' riding hood',\n        [\n            \"Little Red riding hood's red riding hood\",\n            ['HOOD', 'RED'],\n            3,\n            1,\n        ],\n    ],\n    'Multi-delimiter Case-Insensitive Offset -2' => [\n        ' riding hood',\n        [\n            \"Little Red riding hood's red riding hood\",\n            ['HOOD', 'RED'],\n            -2,\n            1,\n        ],\n    ],\n    'slash delimiter' => [\n        'about/that',\n        [\n            'How/about/that',\n            '/',\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/TEXTBEFORE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    'END Case-sensitive Offset 1' => [\n        'Red riding ',\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n        ],\n    ],\n    'END Case-sensitive Offset 2' => [\n        \"Red riding hood's red \",\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            2,\n        ],\n    ],\n    'END Case-sensitive Offset -1' => [\n        \"Red riding hood's red \",\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            -1,\n        ],\n    ],\n    'END Case-sensitive Offset -2' => [\n        'Red riding ',\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            -2,\n        ],\n    ],\n    'END Case-sensitive Offset 3' => [\n        ExcelError::NA(),\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            3,\n        ],\n    ],\n    'END Case-sensitive Offset -3' => [\n        ExcelError::NA(),\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            -3,\n        ],\n    ],\n    'END Case-sensitive Offset 3 with end' => [\n        \"Red riding hood's red hood\",\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            3,\n            0,\n            1,\n        ],\n    ],\n    'END Case-sensitive Offset -3 with end' => [\n        '',\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            -3,\n            0,\n            1,\n        ],\n    ],\n    'END Case-sensitive - No Match' => [\n        ExcelError::NA(),\n        [\n            \"Red riding hood's red hood\",\n            'HOOD',\n        ],\n    ],\n    'END Case-insensitive Offset 1' => [\n        'Red riding ',\n        [\n            \"Red riding hood's red hood\",\n            'HOOD',\n            1,\n            1,\n        ],\n    ],\n    'END Case-insensitive Offset 2' => [\n        \"Red riding hood's red \",\n        [\n            \"Red riding hood's red hood\",\n            'HOOD',\n            2,\n            1,\n        ],\n    ],\n    'END Offset 0' => [\n        ExcelError::VALUE(),\n        [\n            \"Red riding hood's red hood\",\n            'hood',\n            0,\n        ],\n    ],\n    'Empty match positive' => [\n        '',\n        [\n            \"Red riding hood's red hood\",\n            '',\n        ],\n    ],\n    'Empty match negative' => [\n        \"Red riding hood's red hood\",\n        [\n            \"Red riding hood's red hood\",\n            '',\n            -1,\n        ],\n    ],\n    'START Case-sensitive Offset 1' => [\n        \"Red Riding Hood's \",\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n        ],\n    ],\n    'START Case-insensitive Offset 1' => [\n        '',\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            1,\n            1,\n        ],\n    ],\n    'START Case-sensitive Offset -2' => [\n        '',\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            -2,\n            0,\n            1,\n        ],\n    ],\n    'START Case-insensitive Offset -2' => [\n        '',\n        [\n            \"Red Riding Hood's red riding hood\",\n            'red',\n            -2,\n            1,\n            1,\n        ],\n    ],\n    [\n        ExcelError::NA(),\n        [\n            'ABACADAEA',\n            'A',\n            6,\n            0,\n            0,\n        ],\n    ],\n    [\n        'ABACADAEA',\n        [\n            'ABACADAEA',\n            'A',\n            6,\n            0,\n            1,\n        ],\n    ],\n    [\n        ExcelError::NA(),\n        [\n            'Socrates',\n            ' ',\n            1,\n            0,\n            0,\n        ],\n    ],\n    [\n        'Socrates',\n        [\n            'Socrates',\n            ' ',\n            1,\n            0,\n            1,\n        ],\n    ],\n    [\n        'Immanuel',\n        [\n            'Immanuel Kant',\n            ' ',\n            1,\n            0,\n            1,\n        ],\n    ],\n    'Multi-delimiter Case-Insensitive Offset 1' => [\n        'Little ',\n        [\n            \"Little Red riding hood's red riding hood\",\n            ['HOOD', 'RED'],\n            1,\n            1,\n        ],\n    ],\n    'Multi-delimiter Case-Insensitive Offset 2' => [\n        'Little Red riding ',\n        [\n            \"Little Red riding hood's red riding hood\",\n            ['HOOD', 'RED'],\n            2,\n            1,\n        ],\n    ],\n    'Multi-delimiter Case-Insensitive Offset 3' => [\n        \"Little Red riding hood's \",\n        [\n            \"Little Red riding hood's red riding hood\",\n            ['HOOD', 'RED'],\n            3,\n            1,\n        ],\n    ],\n    'Multi-delimiter Case-Insensitive Offset -2' => [\n        \"Little Red riding hood's \",\n        [\n            \"Little Red riding hood's red riding hood\",\n            ['HOOD', 'RED'],\n            -2,\n            1,\n        ],\n    ],\n    'slash delimiter' => [\n        'How',\n        [\n            'How/about/that',\n            '/',\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/TEXTJOIN.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\n\nreturn [\n    [\n        'ABCDE,FGHIJ',\n        [',', true, 'ABCDE', 'FGHIJ'],\n    ],\n    [\n        'ABCDEFGHIJ',\n        ['', true, 'ABCDE', 'FGHIJ'],\n    ],\n    [\n        '1-2-3',\n        ['-', true, 1, 2, 3],\n    ],\n    [\n        'A-B-C-E',\n        ['-', true, 'A', 'B', 'C', null, 'E'],\n    ],\n    [\n        'A-B-C--E',\n        ['-', false, 'A', 'B', 'C', null, 'E'],\n    ],\n    [\n        'A-B-C-',\n        ['-', false, 'A', 'B', 'C', null],\n    ],\n    [\n        'A-B-C--',\n        ['-', false, 'A', 'B', 'C', null, null],\n    ],\n    [\n        '<<::>>',\n        ['::', true, '<<', '>>'],\n    ],\n    [\n        'Καλό απόγευμα',\n        [' ', true, 'Καλό', 'απόγευμα'],\n    ],\n    [\n        'Boolean-TRUE',\n        ['-', true, 'Boolean', '', true],\n    ],\n    [\n        'Boolean-TRUE',\n        ['-', true, 'Boolean', '  ', true],\n    ],\n    [\n        'Boolean--TRUE',\n        ['-', false, 'Boolean', '', true],\n    ],\n    [\n        'C:\\Users\\Mark\\Documents\\notes.doc',\n        ['\\\\', true, 'C:', 'Users', 'Mark', 'Documents', 'notes.doc'],\n    ],\n    'no argument' => ['exception', []],\n    'one argument' => ['exception', ['-']],\n    'two arguments' => ['exception', ['-', true]],\n    'three arguments' => ['a', ['-', true, 'a']],\n    'boolean as string' => ['TRUE-FALSE-TRUE', ['-', true, true, false, true]],\n    'result too long' => [\n        '#CALC!',\n        [\n            ',',\n            true,\n            str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5),\n            'abcde',\n        ],\n    ],\n    'result just fits' => [\n        str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5) . ',abcd',\n        [\n            ',',\n            true,\n            str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5),\n            'abcd',\n        ],\n    ],\n    'propagate REF' => ['#REF!', [',', true, '1', '=sheet99!A1', '3']],\n    'propagate NUM' => ['#NUM!', [',', true, '1', '=SQRT(-1)', '3']],\n    'propagate DIV0' => ['#DIV/0!', [',', true, '1', '=12/0', '3']],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/TEXTSPLIT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\n\nreturn [\n    [\n        [['Hello', 'World']],\n        [\n            'Hello World',\n            ' ',\n            '',\n        ],\n    ],\n    [\n        [['Hello'], ['World']],\n        [\n            'Hello World',\n            '',\n            ' ',\n        ],\n    ],\n    [\n        [['To', 'be', 'or', 'not', 'to', 'be']],\n        [\n            'To be or not to be',\n            ' ',\n            '',\n        ],\n    ],\n    [\n        [\n            ['1', '2', '3'],\n            ['4', '5', '6'],\n        ],\n        [\n            '1,2,3;4,5,6',\n            ',',\n            ';',\n        ],\n    ],\n    [\n        [\n            ['Do', ' Or do not', ' There is no try', ' ', 'Anonymous'],\n        ],\n        [\n            'Do. Or do not. There is no try. -Anonymous',\n            ['.', '-'],\n            '',\n        ],\n    ],\n    [\n        [['Do'], [' Or do not'], [' There is no try'], [' '], ['Anonymous']],\n        [\n            'Do. Or do not. There is no try. -Anonymous',\n            '',\n            ['.', '-'],\n        ],\n    ],\n    [\n        [\n            ['Do', ' Or do not', ' There is no try', ' '],\n            ['Anonymous', ExcelError::NA(), ExcelError::NA(), ExcelError::NA()],\n        ],\n        [\n            'Do. Or do not. There is no try. -Anonymous',\n            '.',\n            '-',\n        ],\n    ],\n    [\n        [\n            ['', '', '1'],\n            ['', '', ExcelError::NA()],\n            ['', '2', ''],\n            ['3', ExcelError::NA(), ExcelError::NA()],\n            ['', ExcelError::NA(), ExcelError::NA()],\n            ['', '4', ExcelError::NA()],\n        ],\n        [\n            '--1|-|-2-|3||-4',\n            '-',\n            '|',\n        ],\n    ],\n    [\n        [\n            ['1'],\n            ['2'],\n            ['3'],\n            ['4'],\n        ],\n        [\n            '--1|-|-2-|3||-4',\n            '-',\n            '|',\n            true,\n        ],\n    ],\n    [\n        [['', 'BCD', 'FGH', 'JKLMN', 'PQRST', 'VWXYZ']],\n        [\n            'ABCDEFGHIJKLMNOPQRSTUVWXYZ',\n            ['A', 'E', 'I', 'O', 'U'],\n            '',\n        ],\n    ],\n    'slash as column delimiter' => [\n        [['Hello', 'World']],\n        [\n            'Hello/World',\n            '/',\n            '',\n        ],\n    ],\n    'slash as row delimiter' => [\n        [['ho', 'w'], ['about', '#N/A'], ['t', 'hat']],\n        [\n            'ho.w/about/t.hat',\n            '.',\n            '/',\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/TRIM.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'HELLO',\n        'HELLO    ',\n    ],\n    [\n        'HELLO',\n        '    HELLO',\n    ],\n    [\n        'HELLO',\n        '   HELLO      ',\n    ],\n    [\n        '\tHELLO',\n        '\tHELLO',\n    ],\n    [\n        'HELLO WORLD',\n        'HELLO    WORLD',\n    ],\n    [\n        'TRUE',\n        true,\n    ],\n    [\n        null,\n        null,\n    ],\n    'no arguments' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/UPPER.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'ABCDEFGHI',\n        'AbCdEfGhI',\n    ],\n    [\n        'MARK BAKER',\n        'mark baker',\n    ],\n    [\n        'BUENOS DÍAS',\n        'buenos días',\n    ],\n    [\n        'ΚΑΛΗΜΕΡΑ',\n        'Καλημερα',\n    ],\n    [\n        'ДОБРОЕ УТРО',\n        'доброе утро',\n    ],\n    [\n        'TRUE',\n        true,\n    ],\n    [\n        'FALSE',\n        false,\n    ],\n    'error code unchanged' => [\n        '#VALUE!',\n        '#VALUE!',\n    ],\n    'no arguments' => ['exception'],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/VALUE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '1000',\n        '1000',\n    ],\n    [\n        '1000',\n        '1 000',\n    ],\n    [\n        '1000',\n        '$1 000',\n    ],\n    [\n        '#VALUE!',\n        '£1 000',\n    ],\n    [\n        '1.1',\n        '1.1',\n    ],\n    [\n        '1000.1',\n        '1 000.1',\n    ],\n    [\n        '#VALUE!',\n        '13 Monkeys',\n    ],\n    [\n        '41640',\n        '1-Jan-2014',\n    ],\n    [\n        '0.524259259259259',\n        '12:34:56',\n    ],\n    [\n        '0.11527777777778',\n        '2:46 AM',\n    ],\n    'no arguments' => ['exception'],\n    'bool argument' => ['#VALUE!', false],\n    'null argument' => ['0', null],\n    'issue 3574 null string invalid' => ['#VALUE!', ''],\n    'issue 3574 blank string invalid' => ['#VALUE!', '  '],\n    'issue 3574 non-blank numeric string okay' => [2, ' 2 '],\n    'issue 3574 non-blank non-numeric string invalid' => ['#VALUE!', ' x '],\n];\n"
  },
  {
    "path": "tests/data/Calculation/TextData/VALUETOTEXT.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\RichText\\RichText;\n\n$richText1 = new RichText();\n$richText1->createTextRun('Hello');\n$richText1->createText(' World');\n\n$richText2 = new RichText();\n$richText2->createTextRun('Hello');\n$richText2->createText(\"\\nWorld\");\n\nreturn [\n    ['1', 1, 0],\n    ['1.23', 1.23, 0],\n    ['-123.456', -123.456, 0],\n    ['TRUE', true, 0],\n    ['FALSE', false, 0],\n    ['Hello World', 'Hello World', 0],\n    ['HelloWorld', \"Hello\\nWorld\", 0],\n    ['\"Hello World\"', 'Hello World', 1],\n    ['\"HelloWorld\"', \"Hello\\nWorld\", 1],\n    ['Hello World', $richText1, 0],\n    ['HelloWorld', $richText2, 0],\n    ['\"Hello World\"', $richText1, 1],\n    ['\"HelloWorld\"', $richText2, 1],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Translations.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '=DAGEN360(DATUM(2010;2;5);DATUM(2010;12;31);WAAR)',\n        'nl',\n        '=DAYS360(DATE(2010,2,5),DATE(2010,12,31),TRUE)',\n    ],\n    [\n        '=DIAS360(DATA(2010;2;5);DATA(2010;12;31);VERDADEIRO)',\n        'pt_br',\n        '=DAYS360(DATE(2010,2,5),DATE(2010,12,31),TRUE)',\n    ],\n    'Portuguese No Country' => [\n        '=DIA.SEMANA(10000)',\n        'pt',\n        '=WEEKDAY(10000)',\n    ],\n    'Portuguese Unknown Country' => [\n        '=DIA.SEMANA(10000)',\n        'pt_xx',\n        '=WEEKDAY(10000)',\n    ],\n    'Portuguese Brazil' => [\n        '=DIA.DA.SEMANA(10000)',\n        'pt_br',\n        '=WEEKDAY(10000)',\n    ],\n    [\n        '=ДНЕЙ360(ДАТА(2010;2;5);ДАТА(2010;12;31);ИСТИНА)',\n        'ru',\n        '=DAYS360(DATE(2010,2,5),DATE(2010,12,31),TRUE)',\n    ],\n    [\n        '=TEKST.SAMENVOEGEN(A1; \" \"; B1)',\n        'nl',\n        '=CONCATENATE(A1, \" \", B1)',\n    ],\n    [\n        '=TEKST.SAMENVOEGEN(\"\"\"Hello \"; B1; \"\"\",\"; \" I said.\")',\n        'nl',\n        '=CONCATENATE(\"\"\"Hello \", B1, \"\"\",\", \" I said.\")',\n    ],\n    [\n        '=ЕСЛИ(1;1;1)',\n        'ru',\n        '=IF(1,1,1)',\n    ],\n    [\n        '=ИСКЛИЛИ(1;1)',\n        'ru',\n        '=XOR(1,1)',\n    ],\n    [\n        '=TEKST.SAMENVOEGEN(JAAR(VANDAAG());\n            \" is \";\n            ALS(\n                DAGEN(DATUM(JAAR(VANDAAG())+1; 1; 1); DATUM(JAAR(VANDAAG()); 1; 1)) = 365;\n                \"NOT a Leap Year\";\n                \"a Leap Year\"\n            )\n        )',\n        'nl',\n        '=CONCATENATE(YEAR(TODAY()),\n            \" is \",\n            IF(\n                DAYS(DATE(YEAR(TODAY())+1, 1, 1), DATE(YEAR(TODAY()), 1, 1)) = 365,\n                \"NOT a Leap Year\",\n                \"a Leap Year\"\n            )\n        )',\n    ],\n    'Spanish with accented character' => [\n        '=AÑO(B1)',\n        'es',\n        '=YEAR(B1)',\n    ],\n    'Bulgarian with accent and period' => [\n        '=ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ(B1)',\n        'bg',\n        '=GETPIVOTDATA(B1)',\n    ],\n    'Czech with accent and period' => [\n        '=DSMODCH.VÝBĚR(B1)',\n        'cs',\n        '=DSTDEV(B1)',\n    ],\n    'Turkish with accent and period' => [\n        '=İŞGÜNÜ.ULUSL(B1)',\n        'tr',\n        '=WORKDAY.INTL(B1)',\n    ],\n    [\n        '=STØRST(ABS({2,-3;-4,5}); ABS{-2,3;4,-5})',\n        'nb',\n        '=MAX(ABS({2,-3;-4,5}), ABS{-2,3;4,-5})',\n    ],\n    'not fooled by *RC' => [\n        '=3*RC(B1)',\n        'fr',\n        '=3*RC(B1)',\n    ],\n    'handle * for ROW' => [\n        '=3*LIGNE(B1)',\n        'fr',\n        '=3*ROW(B1)',\n    ],\n    'handle _xlfn' => [\n        '=MAXWENNS(C5:C10; C5:C10; \"<30\")',\n        'de',\n        '=_xlfn.MAXIFS(C5:C10, C5:C10, \"<30\")',\n    ],\n    'handle _xlfn and _xlws' => [\n        '=ФИЛЬТР(A5:D20;C5:C20=H2;\"\")',\n        'ru',\n        '=_xlfn._xlws.FILTER(A5:D20,C5:C20=H2,\"\")',\n    ],\n    'implicit intersection' => [\n        '=@INDEKS(A1:A10;B1)',\n        'nb',\n        '=@INDEX(A1:A10,B1)',\n    ],\n    'preserve literal _xlfn.' => [\n        '=@INDEKS(A1:A10;\"_xlfn.\")',\n        'nb',\n        '=@INDEX(A1:A10,\"_xlfn.\")',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Web/URLENCODE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'http%3A%2F%2Fcontoso.sharepoint.com%2Fteams%2FFinance%2FDocuments%2FApril%20Reports%2FProfit%20and%20Loss%20Statement.xlsx',\n        'http://contoso.sharepoint.com/teams/Finance/Documents/April Reports/Profit and Loss Statement.xlsx',\n    ],\n    [\n        '#VALUE!',\n        123,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Calculation/Web/WEBSERVICE.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '#VALUE!',\n        'http://www.thisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolor.com',\n    ],\n    [\n        '#VALUE!',\n        'ftp://www.bla.com',\n    ],\n    [\n        'Example Domain',\n        'http://www.example.com',\n\n    ],\n    [\n        '#VALUE!',\n        'http://www.invalid.com',\n    ],\n    [\n        'Example Domain',\n        'https://www.example.com',\n    ],\n    'reply too long' => [\n        '#VALUE!',\n        'https://www.google.com/search?q=hello',\n    ],\n    [\n        'Example Domain',\n        'Z1',\n    ],\n    [\n        '#VALUE!',\n        'Z2',\n    ],\n];\n"
  },
  {
    "path": "tests/data/CalculationBinaryComparisonOperation.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n//  formula, expectedResultExcel, expectedResultOpenOffice\n\nreturn [\n    [\n        '=TRUE',\n        true,\n        true,\n    ],\n    [\n        '=1 + 2.5',\n        3.5,\n        3.5,\n    ],\n    [\n        '=2.5 + 1',\n        3.5,\n        3.5,\n    ],\n    [\n        '=1 - 2.5',\n        -1.5,\n        -1.5,\n    ],\n    [\n        '=2.5 - 1',\n        1.5,\n        1.5,\n    ],\n    [\n        '=3 > 1',\n        true,\n        true,\n    ],\n    [\n        '=3 > 3',\n        false,\n        false,\n    ],\n    [\n        '=1 > 3',\n        false,\n        false,\n    ],\n    [\n        '=3 < 1',\n        false,\n        false,\n    ],\n    [\n        '=3 < 3',\n        false,\n        false,\n    ],\n    [\n        '=1 < 3',\n        true,\n        true,\n    ],\n    [\n        '=3 = 1',\n        false,\n        false,\n    ],\n    [\n        '=3 = 3',\n        true,\n        true,\n    ],\n    [\n        '=1 = 1.0',\n        true,\n        true,\n    ],\n    [\n        '=3 >= 1',\n        true,\n        true,\n    ],\n    [\n        '=3 >= 3',\n        true,\n        true,\n    ],\n    [\n        '=1 >= 3',\n        false,\n        false,\n    ],\n    [\n        '=3 <= 1',\n        false,\n        false,\n    ],\n    [\n        '=3 <= 3',\n        true,\n        true,\n    ],\n    [\n        '=1 <= 3',\n        true,\n        true,\n    ],\n    [\n        '=3 <> 1',\n        true,\n        true,\n    ],\n    [\n        '=3 <> 3',\n        false,\n        false,\n    ],\n    [\n        '=1 <> 1.0',\n        false,\n        false,\n    ],\n    [\n        '=\"a\" > \"a\"',\n        false,\n        false,\n    ],\n    [\n        '=\"A\" > \"A\"',\n        false,\n        false,\n    ],\n    [\n        '=\"A\" > \"a\"',\n        false,\n        true,\n    ],\n    [\n        '=\"a\" > \"A\"',\n        false,\n        false,\n    ],\n    [\n        '=\"a\" < \"a\"',\n        false,\n        false,\n    ],\n    [\n        '=\"A\" < \"A\"',\n        false,\n        false,\n    ],\n    [\n        '=\"A\" < \"a\"',\n        false,\n        false,\n    ],\n    [\n        '=\"a\" < \"A\"',\n        false,\n        true,\n    ],\n    [\n        '=\"a\" = \"a\"',\n        true,\n        true,\n    ],\n    [\n        '=\"A\" = \"A\"',\n        true,\n        true,\n    ],\n    [\n        '=\"A\" = \"a\"',\n        true,\n        false,\n    ],\n    [\n        '=\"a\" = \"A\"',\n        true,\n        false,\n    ],\n    [\n        '=\"a\" <= \"a\"',\n        true,\n        true,\n    ],\n    [\n        '=\"A\" <= \"A\"',\n        true,\n        true,\n    ],\n    [\n        '=\"A\" <= \"a\"',\n        true,\n        false,\n    ],\n    [\n        '=\"a\" <= \"A\"',\n        true,\n        true,\n    ],\n    [\n        '=\"a\" >= \"a\"',\n        true,\n        true,\n    ],\n    [\n        '=\"A\" >= \"A\"',\n        true,\n        true,\n    ],\n    [\n        '=\"A\" >= \"a\"',\n        true,\n        true,\n    ],\n    [\n        '=\"a\" >= \"A\"',\n        true,\n        false,\n    ],\n    [\n        '=\"a\" <> \"a\"',\n        false,\n        false,\n    ],\n    [\n        '=\"A\" <> \"A\"',\n        false,\n        false,\n    ],\n    [\n        '=\"A\" <> \"a\"',\n        false,\n        true,\n    ],\n    [\n        '=\"a\" <> \"A\"',\n        false,\n        true,\n    ],\n    [\n        '= NULL = 0',\n        true,\n        true,\n    ],\n    [\n        '= NULL < 0',\n        false,\n        false,\n    ],\n    [\n        '= NULL <= 0',\n        true,\n        true,\n    ],\n    [\n        '= NULL > 0',\n        false,\n        false,\n    ],\n    [\n        '= NULL >= 0',\n        true,\n        true,\n    ],\n    [\n        '= NULL <> 0',\n        false,\n        false,\n    ],\n    [\n        '=\"A\" > \"b\"',\n        false,\n        true,\n    ],\n    [\n        '=\"a\" > \"b\"',\n        false,\n        false,\n    ],\n    [\n        '=\"b\" > \"a\"',\n        true,\n        true,\n    ],\n    [\n        '=\"b\" > \"A\"',\n        true,\n        false,\n    ],\n    // Test natural sorting is not used\n    [\n        '=\"a2\" > \"a10\"',\n        true,\n        true,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Cell/A1ConversionToR1C1Absolute.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['R1C1', 'A1'],\n    ['R1C1', '$A$1'],\n    ['R1C1', '$A1'],\n    ['R1C1', 'A$1'],\n    ['R2C2', 'B2'],\n    ['R5C12', 'L5'],\n    ['R1024C26', 'Z1024'],\n    ['R2048C27', 'AA2048'],\n    ['R4096C52', 'AZ4096'],\n    ['R8192C53', 'BA8192'],\n    ['R65535C256', 'IV65535'],\n];\n"
  },
  {
    "path": "tests/data/Cell/A1ConversionToR1C1Exception.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['A11Y'],\n];\n"
  },
  {
    "path": "tests/data/Cell/A1ConversionToR1C1Relative.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['R[2]C[2]', 'O18', 16, 13],\n    ['R18C15', '$O$18', 16, 13],\n    ['R[-2]C[2]', 'O14', 16, 13],\n    ['R[-2]C15', '$O14', 16, 13],\n    ['R[2]C[-2]', 'K18', 16, 13],\n    ['R18C[-2]', 'K$18', 16, 13],\n    ['R[-2]C[-2]', 'K14', 16, 13],\n    ['RC[3]', 'P16', 16, 13],\n    ['R16C[3]', 'P$16', 16, 13],\n    ['RC[-3]', 'J16', 16, 13],\n    ['RC10', '$J16', 16, 13],\n    ['R[4]C', 'M20', 16, 13],\n    ['R[4]C13', '$M20', 16, 13],\n    ['R[-4]C', 'M12', 16, 13],\n    ['R12C', 'M$12', 16, 13],\n    ['RC', 'E5', 5, 5],\n    ['R5C5', '$E$5', 5, 5],\n    ['R5C', 'E5', null, 5],\n    ['R5C5', '$E5', null, 5],\n    ['R5C', 'E$5', null, 5],\n    ['RC5', 'E5', 5, null],\n    ['RC5', '$E5', 5, null],\n    ['R5C5', 'E$5', 5, null],\n    ['R5C[2]', 'E5', null, 3],\n    ['R5C5', '$E5', null, 3],\n    ['R5C[2]', 'E$5', null, 3],\n    ['R[2]C5', 'E5', 3, null],\n    ['R5C5', '$E$5', 3, null],\n    ['R5C[-2]', 'E5', null, 7],\n    ['R[-2]C5', 'E5', 7, null],\n];\n"
  },
  {
    "path": "tests/data/Cell/ConvertFormulaToA1FromR1C1Absolute.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'Basic addition' => ['=D3+F7+G4+C6+5', '=R3C4+R7C6+R4C7+R6C3+5'],\n    'Basic subtraction' => ['=D3-F7-G4-C6-5', '=R3C4-R7C6-R4C7-R6C3-5'],\n    'Basic multiplication' => ['=D3*F7*G4*C6*5', '=R3C4*R7C6*R4C7*R6C3*5'],\n    'Basic division' => ['=D3/F7/G4/C6/5', '=R3C4/R7C6/R4C7/R6C3/5'],\n    'Simple formula' => ['=SUM(E1:E5)', '=SUM(R1C5:R5C5)'],\n    'Formula with range and cell' => ['=SUM(E1:E5, D5)', '=SUM(R1C5:R5C5, R5C4)'],\n    'Formula arithmetic' => ['=SUM(E1:E5, D5)-C5', '=SUM(R1C5:R5C5, R5C4)-R5C3'],\n    'Formula with comparison' => ['=IF(E1>E2, E3, E4)', '=IF(R1C5>R2C5, R3C5, R4C5)'],\n    'String literal' => ['=CONCAT(\"Result of formula expression =R3C3+R4C3 is: \", C3+C4)', '=CONCAT(\"Result of formula expression =R3C3+R4C3 is: \", R3C3+R4C3)'],\n];\n"
  },
  {
    "path": "tests/data/Cell/ConvertFormulaToA1FromR1C1Relative.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'Basic addition' => ['=D3+F7+G4+C6+5', '=R[-2]C[-1]+R[2]C[1]+R[-1]C[2]+R[1]C[-2]+5', 5, 5],\n    'Basic subtraction' => ['=D3-F7-G4-C6-5', '=R[-2]C[-1]-R[2]C[1]-R[-1]C[2]-R[1]C[-2]-5', 5, 5],\n    'Basic multiplication' => ['=D3*F7*G4*C6*5', '=R[-2]C[-1]*R[2]C[1]*R[-1]C[2]*R[1]C[-2]*5', 5, 5],\n    'Basic division' => ['=D3/F7/G4/C6/5', '=R[-2]C[-1]/R[2]C[1]/R[-1]C[2]/R[1]C[-2]/5', 5, 5],\n    'Basic addition with current row/column' => ['=E3+E7+G5+C5+E5+5', '=R[-2]C+R[2]C+RC[2]+RC[-2]+RC+5', 5, 5],\n    'Basic subtraction with current row/column' => ['=E3-E7-G5-C5-E5-5', '=R[-2]C-R[2]C-RC[2]-RC[-2]-RC-5', 5, 5],\n    'Basic multiplication with current row/column' => ['=E3*E7*G5*C5*E5*5', '=R[-2]C*R[2]C*RC[2]*RC[-2]*RC*5', 5, 5],\n    'Basic division with current row/column' => ['=E3/E7/G5/C5/E5/5', '=R[-2]C/R[2]C/RC[2]/RC[-2]/RC/5', 5, 5],\n    'Simple formula' => ['=SUM(E1:E5)', '=SUM(R[-4]C:RC)', 5, 5],\n    'Formula with range and cell' => ['=SUM(E1:E5, D5)', '=SUM(R[-4]C:RC, RC[-1])', 5, 5],\n    'Formula arithmetic' => ['=SUM(E1:E5, D5)-C5', '=SUM(R[-4]C:RC, RC[-1])-RC[-2]', 5, 5],\n    'Formula with comparison' => ['=IF(E1>E2, E3, E4)', '=IF(R[-4]C>R[-3]C, R[-2]C, R[-1]C)', 5, 5],\n    'String literal' => ['=CONCAT(\"Result of formula expression =R[-2]C[-2]+R[-1]C[-2] is: \", C3+C4)', '=CONCAT(\"Result of formula expression =R[-2]C[-2]+R[-1]C[-2] is: \", R[-2]C[-2]+R[-1]C[-2])', 5, 5],\n];\n"
  },
  {
    "path": "tests/data/Cell/ConvertFormulaToA1FromSpreadsheetXml.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'Basic addition' => ['=D3+F7+G4+C6+5', 'of:=[.D3]+[.F7]+[.G4]+[.C6]+5'],\n    'Basic subtraction' => ['=D3-F7-G4-C6-5', 'of:=[.D3]-[.F7]-[.G4]-[.C6]-5'],\n    'Basic multiplication' => ['=D3*F7*G4*C6*5', 'of:=[.D3]*[.F7]*[.G4]*[.C6]*5'],\n    'Basic division' => ['=D3/F7/G4/C6/5', 'of:=[.D3]/[.F7]/[.G4]/[.C6]/5'],\n    'Simple formula' => ['=SUM(E1:E5)', 'of:=SUM([.E1:.E5])'],\n    'Formula with range and cell' => ['=SUM(E1:E5, D5)', 'of:=SUM([.E1:.E5], [.D5])'],\n    'Formula arithmetic' => ['=SUM(E1:E5, D5)-C5', 'of:=SUM([.E1:.E5], [.D5])-[.C5]'],\n    'Formula with comparison' => ['=IF(E1>E2, E3, E4)', 'of:=IF([.E1]>[.E2], [.E3], [.E4])'],\n    'String literal' => ['=CONCAT(\"Result of formula expression =[.C3]+[.C4] is: \", C3+C4)', 'of:=CONCAT(\"Result of formula expression =[.C3]+[.C4] is: \", [.C3]+[.C4])'],\n    'Simple numeric addition' => ['=1.23+2.34', 'of:=1.23+2.34'],\n    'More complex formula with cells and numeric literals' => ['=D3+F7+G4+C6+5.67', 'of:=[.D3]+[.F7]+[.G4]+[.C6]+5.67'],\n];\n"
  },
  {
    "path": "tests/data/Cell/CoordinateIsInsideRange.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [true, 'A1:E20', 'B4'],\n    [false, 'A1:E20', 'F36'],\n    [true, '$A$1:$E$20', '$B$4'],\n    [false, '$A$1:$E$20', '$F$36'],\n    [true, '$A$1:$E$20', 'B4'],\n    [false, '$A$1:$E$20', 'F36'],\n    [true, 'A1:E20', '$B$4'],\n    [false, 'A1:E20', '$F$36'],\n    [true, 'Sheet!A1:E20', 'Sheet!B4'],\n    'case insensitive' => [true, 'Sheet!A1:E20', 'sheet!B4'],\n    'apostrophes 1st sheetname not 2nd' => [true, '\\'Sheet\\'!A1:E20', 'sheet!B4'],\n    'apostrophes 2nd sheetname not 1st' => [true, 'Sheet!A1:E20', '\\'sheet\\'!B4'],\n    [false, 'Sheet!A1:E20', 'Sheet!F36'],\n    [true, 'Sheet!$A$1:$E$20', 'Sheet!$B$4'],\n    [false, 'Sheet!$A$1:$E$20', 'Sheet!$F$36'],\n    [false, 'Sheet!A1:E20', 'B4'],\n    [false, 'Sheet!A1:E20', 'F36'],\n    [false, 'Sheet!$A$1:$E$20', '$B$4'],\n    [false, 'Sheet!$A$1:$E$20', '$F$36'],\n    [false, 'A1:E20', 'Sheet!B4'],\n    [false, 'A1:E20', 'Sheet!F36'],\n    [false, '$A$1:$E$20', 'Sheet!$B$4'],\n    [false, '$A$1:$E$20', 'Sheet!$F$36'],\n    [true, '\\'Sheet space\\'!A1:E20', '\\'Sheet space\\'!B4'],\n    [false, '\\'Sheet space\\'!A1:E20', '\\'Sheet space\\'!F36'],\n    [true, '\\'Sheet space\\'!$A$1:$E$20', '\\'Sheet space\\'!$B$4'],\n    [false, '\\'Sheet space\\'!$A$1:$E$20', '\\'Sheet space\\'!$F$36'],\n];\n"
  },
  {
    "path": "tests/data/Cell/CoordinateIsInsideRangeException.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['First argument needs to be a range', 'invalidRange', 'B4'],\n    ['Second argument needs to be a single coordinate', 'A1:E20', 'invalidCoordinate'],\n];\n"
  },
  {
    "path": "tests/data/Cell/IndexesFromString.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            1,\n            1,\n            'A',\n        ],\n        'A1',\n    ],\n    [\n        [\n            1,\n            12,\n            'A',\n        ],\n        'A12',\n    ],\n    [\n        [\n            10,\n            1,\n            'J',\n        ],\n        'J1',\n    ],\n    [\n        [\n            10,\n            20,\n            'J',\n        ],\n        'J20',\n    ],\n    [\n        [\n            35,\n            1,\n            'AI',\n        ],\n        'AI1',\n    ],\n    [\n        [\n            35,\n            2012,\n            'AI',\n        ],\n        'AI2012',\n    ],\n    [\n        [\n            2,\n            3,\n            'B',\n        ],\n        'B3',\n    ],\n    [\n        [\n            2,\n            3,\n            'B',\n        ],\n        '$B3',\n    ],\n    [\n        [\n            2,\n            3,\n            'B',\n        ],\n        'B$3',\n    ],\n    [\n        [\n            2,\n            3,\n            'B',\n        ],\n        '$B$3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Cell/R1C1ConversionToA1Absolute.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['A1', 'R1C1'],\n    ['B2', 'R2C2'],\n    ['L5', 'R5C12'],\n    ['Z1024', 'R1024C26'],\n    ['AA2048', 'R2048C27'],\n    ['AZ4096', 'R4096C52'],\n    ['BA8192', 'R8192C53'],\n    ['IV65535', 'R65535C256'],\n    ['K1', 'RC11'],\n    ['A16', 'R16C'],\n];\n"
  },
  {
    "path": "tests/data/Cell/R1C1ConversionToA1Exception.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['RICE'],\n    ['R[-1]C'],\n    ['RC[-1]'],\n    ['R-1C'],\n    ['RC-1'],\n];\n"
  },
  {
    "path": "tests/data/Cell/R1C1ConversionToA1Relative.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    ['C3', 'R[2]C[2]'],\n    ['O18', 'R[2]C[2]', 16, 13],\n    ['O14', 'R[-2]C[2]', 16, 13],\n    ['K18', 'R[2]C[-2]', 16, 13],\n    ['K14', 'R[-2]C[-2]', 16, 13],\n    ['P16', 'RC[3]', 16, 13],\n    ['J16', 'RC[-3]', 16, 13],\n    ['M20', 'R[4]C', 16, 13],\n    ['M12', 'R[-4]C', 16, 13],\n    ['E5', 'RC', 5, 5],\n];\n"
  },
  {
    "path": "tests/data/Cell/SetValueExplicit.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Calculation\\Information\\ExcelError;\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\n\nreturn [\n    [\n        1234567890123456789,\n        '01234567890123456789',\n        DataType::TYPE_NUMERIC,\n    ],\n    [\n        1234567890123456789,\n        1234567890123456789,\n        DataType::TYPE_NUMERIC,\n    ],\n    [\n        123.456,\n        '123.456',\n        DataType::TYPE_NUMERIC,\n    ],\n    [\n        123.456,\n        123.456,\n        DataType::TYPE_NUMERIC,\n    ],\n    [\n        0,\n        null,\n        DataType::TYPE_NUMERIC,\n    ],\n    [\n        0,\n        false,\n        DataType::TYPE_NUMERIC,\n    ],\n    [\n        1,\n        true,\n        DataType::TYPE_NUMERIC,\n    ],\n    [\n        44613.43090277778,\n        '2022-02-21 10:20:30',\n        DataType::TYPE_ISO_DATE,\n    ],\n    [\n        44613.0,\n        '2022-02-21',\n        DataType::TYPE_ISO_DATE,\n    ],\n    [\n        -30879.0,\n        '1815-06-15',               // Dates outside the Excel Range should fail really\n        DataType::TYPE_ISO_DATE,\n    ],\n    [\n        ExcelError::DIV0(),\n        '#DIV/0!',\n        DataType::TYPE_ERROR,\n    ],\n    [\n        ExcelError::null(),\n        'NOT A VALID ERROR TYPE VALUE',\n        DataType::TYPE_ERROR,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Cell/SetValueExplicitException.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\n\nreturn [\n    'invalid numeric' => ['XYZ', DataType::TYPE_NUMERIC, 'Invalid numeric value'],\n    'invalid array' => [[], DataType::TYPE_STRING, 'Unable to convert to string'],\n    'invalid unstringable object' => [new DateTime(), DataType::TYPE_INLINE, 'Unable to convert to string'],\n];\n"
  },
  {
    "path": "tests/data/Cell/SetValueExplicitTypeArguments.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Cell\\DataType;\n\n// This member will be used to validate both:\n// Cell::setValueExplicit\n// Worksheet::setCellValueExplicit\n\nreturn [\n    'string with default type' => ['default string', null, 'default string', DataType::TYPE_STRING],\n    'integer with default type' => [42, null, '42', DataType::TYPE_STRING],\n    'string with string' => ['explicit string', DataType::TYPE_STRING, 'explicit string', DataType::TYPE_STRING],\n    'integer with string type' => [123, DataType::TYPE_STRING, '123', DataType::TYPE_STRING],\n    'numeric string with string type' => ['496', DataType::TYPE_STRING, '496', DataType::TYPE_STRING],\n    'integer with numeric type' => [591, DataType::TYPE_NUMERIC, 591, DataType::TYPE_NUMERIC],\n    'numeric string with numeric type' => ['1887', DataType::TYPE_NUMERIC, 1887, DataType::TYPE_NUMERIC],\n    'true with bool type' => [true, DataType::TYPE_BOOL, true, DataType::TYPE_BOOL],\n    'false with bool type' => [false, DataType::TYPE_BOOL, false, DataType::TYPE_BOOL],\n    'ISO Date' => ['1996-01-01', DataType::TYPE_ISO_DATE, 35065.0, DataType::TYPE_NUMERIC],\n    'Valid Error' => ['#VALUE!', DataType::TYPE_ERROR, '#VALUE!', DataType::TYPE_ERROR],\n    'Invalid Error' => ['VALUE!', DataType::TYPE_ERROR, '#NULL!', DataType::TYPE_ERROR],\n];\n"
  },
  {
    "path": "tests/data/CellAbsoluteCoordinate.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '$A$1',\n        'A1',\n    ],\n    [\n        '$A$12',\n        'A12',\n    ],\n    [\n        '$J$1',\n        'J1',\n    ],\n    [\n        '$J$20',\n        'J20',\n    ],\n    [\n        '$AI$1',\n        'AI1',\n    ],\n    [\n        '$AI$2012',\n        'AI2012',\n    ],\n    [\n        '\\'Worksheet1\\'!$AI$256',\n        '\\'Worksheet1\\'!AI256',\n    ],\n    [\n        'Worksheet1!$AI$256',\n        'Worksheet1!AI256',\n    ],\n    [\n        '\\'Data Worksheet\\'!$AI$256',\n        '\\'Data Worksheet\\'!AI256',\n    ],\n    [\n        '\\'Worksheet1\\'!$AI$256',\n        '\\'Worksheet1\\'!$AI256',\n    ],\n    [\n        '\\'Work!sheet1!\\'!$AI$256',\n        '\\'Work!sheet1!\\'!AI$256',\n    ],\n    [\n        '\\'Work!sheet1!\\'!$AI$256',\n        '\\'Work!sheet1!\\'!$AI$256',\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellAbsoluteReference.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '$A$1',\n        'A1',\n    ],\n    [\n        '$A$12',\n        'A12',\n    ],\n    [\n        '$J$1',\n        'J1',\n    ],\n    [\n        '$J$20',\n        'J20',\n    ],\n    [\n        '$AI$1',\n        'AI1',\n    ],\n    [\n        '$AI$2012',\n        'AI2012',\n    ],\n    [\n        '\\'Work!sheet1\\'!$AI$256',\n        '\\'Work!sheet1\\'!AI256',\n    ],\n    [\n        'Work!sheet1!$AI$256',\n        'Work!sheet1!AI256',\n    ],\n    [\n        '\\'Data Worksheet\\'!$AI$256',\n        '\\'Data Worksheet\\'!AI256',\n    ],\n    [\n        '$AI',\n        'AI',\n    ],\n    [\n        '$2012',\n        2012,\n    ],\n    [\n        'Worksheet1!$AI',\n        'Worksheet1!AI',\n    ],\n    [\n        'Worksheet1!$256',\n        'Worksheet1!256',\n    ],\n    [\n        '\\'Worksheet1\\'!$AI$256',\n        '\\'Worksheet1\\'!$AI256',\n    ],\n    [\n        '\\'Worksheet1\\'!$AI$256',\n        '\\'Worksheet1\\'!AI$256',\n    ],\n    [\n        '\\'Worksheet1\\'!$AI$256',\n        '\\'Worksheet1\\'!$AI$256',\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellBuildRange.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'B4:E9',\n        [\n            [\n                'B4',\n                'E9',\n            ],\n        ],\n    ],\n    [\n        'B4:E9,H2:O11',\n        [\n            [\n                'B4',\n                'E9',\n            ],\n            [\n                'H2',\n                'O11',\n            ],\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellCoordinates.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            'A',\n            1,\n        ],\n        'A1',\n    ],\n    [\n        [\n            'A',\n            12,\n        ],\n        'A12',\n    ],\n    [\n        [\n            'J',\n            1,\n        ],\n        'J1',\n    ],\n    [\n        [\n            'J',\n            20,\n        ],\n        'J20',\n    ],\n    [\n        [\n            'AI',\n            1,\n        ],\n        'AI1',\n    ],\n    [\n        [\n            'AI',\n            2012,\n        ],\n        'AI2012',\n    ],\n    [\n        [\n            'B',\n            3,\n        ],\n        'B3',\n    ],\n    [\n        [\n            '$B',\n            3,\n        ],\n        '$B3',\n    ],\n    [\n        [\n            'B',\n            '$3',\n        ],\n        'B$3',\n    ],\n    [\n        [\n            '$B',\n            '$3',\n        ],\n        '$B$3',\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellExtractAllCellReferencesInRange.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            'B4',\n            'B5',\n            'B6',\n        ],\n        'B4:B6',\n    ],\n    [\n        [\n            'B4',\n            'D4',\n            'B5',\n            'D5',\n            'B6',\n            'D6',\n        ],\n        'B4:B6,D4:D6',\n    ],\n    [\n        [\n        ],\n        'B4:B6 D4:D6',\n    ],\n    [\n        [\n            'B4',\n            'C4',\n            'D4',\n            'B5',\n            'C5',\n            'D5',\n            'B6',\n            'C6',\n            'D6',\n        ],\n        'B4:D6',\n    ],\n    [\n        [\n            'B4',\n            'C4',\n            'D4',\n            'B5',\n            'C5',\n            'D5',\n            'E5',\n            'B6',\n            'C6',\n            'D6',\n            'E6',\n            'C7',\n            'D7',\n            'E7',\n        ],\n        'B4:D6,C5:E7',\n    ],\n    [\n        [\n            'C5',\n            'D5',\n            'C6',\n            'D6',\n        ],\n        'B4:D6 C5:E7',\n    ],\n    [\n        [\n            'B2',\n            'C2',\n            'D2',\n            'B3',\n            'C3',\n            'D3',\n            'E3',\n            'B4',\n            'C4',\n            'D4',\n            'E4',\n            'F4',\n            'C5',\n            'D5',\n            'E5',\n            'F5',\n            'D6',\n            'E6',\n            'F6',\n        ],\n        'B2:D4,C5:D5,E3:E5,D6:E6,F4:F6',\n    ],\n    [\n        [\n            'B2',\n            'C2',\n            'D2',\n            'B3',\n            'C3',\n            'D3',\n            'E3',\n            'B4',\n            'C4',\n            'D4',\n            'E4',\n            'F4',\n            'C5',\n            'D5',\n            'E5',\n            'F5',\n            'D6',\n            'E6',\n            'F6',\n        ],\n        'B2:D4,C3:E5,D4:F6',\n    ],\n    [\n        [\n            'B5',\n        ],\n        'B4:B6 B5',\n    ],\n    [\n        [\n            'Z2',\n            'AA2',\n            'Z3',\n            'AA3',\n        ],\n        'Z2:AA3',\n    ],\n    [\n        [\n            'Sheet1!D3',\n        ],\n        'Sheet1!D3',\n    ],\n    [\n        [\n            'Sheet1!D3',\n            'Sheet1!E3',\n            'Sheet1!D4',\n            'Sheet1!E4',\n        ],\n        'Sheet1!D3:E4',\n    ],\n    [\n        [\n            \"'Sheet 1'!D3\",\n            \"'Sheet 1'!E3\",\n            \"'Sheet 1'!D4\",\n            \"'Sheet 1'!E4\",\n        ],\n        \"'Sheet 1'!D3:E4\",\n    ],\n    [\n        [\n            \"'Mark''s Sheet'!D3\",\n            \"'Mark''s Sheet'!E3\",\n            \"'Mark''s Sheet'!D4\",\n            \"'Mark''s Sheet'!E4\",\n        ],\n        \"'Mark's Sheet'!D3:E4\",\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellGetRangeBoundaries.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'Cell Range' => [\n        [\n            ['B', 4],\n            ['E', 9],\n        ],\n        'B4:E9',\n    ],\n    'Single Cell' => [\n        [\n            ['B', 4],\n            ['B', 4],\n        ],\n        'B4',\n    ],\n    'Column Range' => [\n        [\n            ['B', 1],\n            ['C', 1048576],\n        ],\n        'B:C',\n    ],\n    'Single Column Range' => [\n        [\n            ['B', 1],\n            ['B', 1048576],\n        ],\n        'B:B',\n    ],\n    'Row Range' => [\n        [\n            ['A', 2],\n            ['XFD', 3],\n        ],\n        '2:3',\n    ],\n    'Single Row Range' => [\n        [\n            ['A', 2],\n            ['XFD', 2],\n        ],\n        '2:2',\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellMergeRangesInCollection.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            'A1:A3' => 'x',\n            'A4' => 'y',\n        ],\n        [\n            'A1' => 'x',\n            'A2' => 'x',\n            'A3' => 'x',\n            'A4' => 'y',\n        ],\n    ],\n    [\n        [\n            'A1:A4' => 'x',\n            'A6:A7' => 'x',\n            'A9' => 'x',\n        ],\n        [\n            'A7' => 'x',\n            'A1' => 'x',\n            'A4' => 'x',\n            'A6' => 'x',\n            'A2' => 'x',\n            'A9' => 'x',\n            'A3' => 'x',\n        ],\n    ],\n    [\n        [\n            'A1:A3' => 'x',\n            'B1:B3' => 'x',\n        ],\n        [\n            'A1' => 'x',\n            'B3' => 'x',\n            'A2' => 'x',\n            'B2' => 'x',\n            'A3' => 'x',\n            'B1' => 'x',\n        ],\n    ],\n    [\n        [\n            'A1' => 'x',\n            'A2' => 'y',\n            'A3' => 'z',\n        ],\n        [\n            'A1' => 'x',\n            'A2' => 'y',\n            'A3' => 'z',\n        ],\n    ],\n    [\n        [\n            'C1' => 'x',\n            'A1:A3' => 'x',\n            'A1:A3,C1:C3' => 'y',\n        ],\n        [\n            'C1' => 'x',\n            'A1:A3' => 'x',\n            'A1:A3,C1:C3' => 'y',\n        ],\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellRangeBoundaries.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    'Cell Range' => [\n        [\n            [2, 4],\n            [5, 9],\n        ],\n        'B4:E9',\n    ],\n    'Single Cell' => [\n        [\n            [2, 4],\n            [2, 4],\n        ],\n        'B4',\n    ],\n    'Column Range' => [\n        [\n            [2, 1],\n            [3, 1048576],\n        ],\n        'B:C',\n    ],\n    'Single Column Range' => [\n        [\n            [2, 1],\n            [2, 1048576],\n        ],\n        'B:B',\n    ],\n    'Row Range' => [\n        [\n            [1, 2],\n            [16384, 3],\n        ],\n        '2:3',\n    ],\n    'Single Row Range' => [\n        [\n            [1, 2],\n            [16384, 2],\n        ],\n        '2:2',\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellRangeDimension.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            4,\n            6,\n        ],\n        'B4:E9',\n    ],\n    [\n        [\n            1,\n            1,\n        ],\n        'B4',\n    ],\n];\n"
  },
  {
    "path": "tests/data/CellSplitRange.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        [\n            [\n                'B4',\n                'E9',\n            ],\n        ],\n        'B4:E9',\n    ],\n    [\n        [\n            'B4',\n        ],\n        'B4',\n    ],\n    [\n        [\n            [\n                'B4',\n                'E9',\n            ],\n            [\n                'H2',\n                'O11',\n            ],\n        ],\n        'B4:E9,H2:O11',\n    ],\n];\n"
  },
  {
    "path": "tests/data/ColumnIndex.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'A',\n        1,\n    ],\n    [\n        'Z',\n        26,\n    ],\n    [\n        'AA',\n        27,\n    ],\n    [\n        'AB',\n        28,\n    ],\n    [\n        'AZ',\n        52,\n    ],\n    [\n        'BA',\n        53,\n    ],\n    [\n        'BZ',\n        78,\n    ],\n    [\n        'CA',\n        79,\n    ],\n    [\n        'IV',\n        256,\n    ],\n    [\n        'ZZ',\n        702,\n    ],\n    [\n        'AAA',\n        703,\n    ],\n    [\n        'BAA',\n        1379,\n    ],\n    'zero not allowed' => ['exception', 0],\n    'negative not allowed' => ['exception', -1],\n    'maximum possible' => ['XFD', 16384],\n    'beyond maximum possible' => ['exception', 16385],\n];\n"
  },
  {
    "path": "tests/data/ColumnString.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        1,\n        'A',\n    ],\n    [\n        26,\n        'Z',\n    ],\n    [\n        27,\n        'AA',\n    ],\n    [\n        28,\n        'AB',\n    ],\n    [\n        52,\n        'AZ',\n    ],\n    [\n        53,\n        'BA',\n    ],\n    [\n        78,\n        'BZ',\n    ],\n    [\n        79,\n        'CA',\n    ],\n    [\n        256,\n        'IV',\n    ],\n    [\n        702,\n        'ZZ',\n    ],\n    [\n        703,\n        'AAA',\n    ],\n    [\n        1379,\n        'BAA',\n    ],\n];\n"
  },
  {
    "path": "tests/data/CoordinateIsRange.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        false,\n        'A1',\n    ],\n    [\n        false,\n        '$A$1',\n    ],\n    [\n        true,\n        'A1,C3',\n    ],\n    [\n        true,\n        'A1:A10',\n    ],\n    [\n        true,\n        'A1:A10,C4',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Functional/TypeAttributePreservation/Formula.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        ['string'],\n    ],\n    [\n        ['=\"string\"'],\n    ],\n    [\n        [1],\n    ],\n    [\n        [0],\n    ],\n    [\n        [true],\n    ],\n    [\n        [false],\n    ],\n    [\n        ['=TRUE()'],\n    ],\n    [\n        ['=ISFORMULA(B1)', '=1+2'],\n    ],\n    [\n        ['1'],\n    ],\n    [\n        ['0'],\n    ],\n    [\n        ['null'],\n    ],\n    [\n        [null],\n    ],\n    'issue3568' => [\n        ['=\"00\"&B1', '123'],\n    ],\n    'unimplemented function' => [\n        ['=INFO(\"SYSTEM\")'],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Reader/CSV/NumberFormatTest.csv",
    "content": "\"-123\",\"1,234\",\"12,345.67\"\n\"123.4567\",\"123.456789012\"\n\"-1,234.567\",1234.567\n"
  },
  {
    "path": "tests/data/Reader/CSV/NumberFormatTest.de.csv",
    "content": "\"-123\",\"1.234\",\"12.345,67\"\n\"123,4567\",\"123,456789012\"\n\"-1.234,567\"\n"
  },
  {
    "path": "tests/data/Reader/CSV/backslash.csv",
    "content": "\"field 1\",\"field 2\\\"\n\"field 3\\\",\"field 4\"\n"
  },
  {
    "path": "tests/data/Reader/CSV/contains_html.csv",
    "content": "\"Column A\";\"<a href=''>Link</a>\";\"Column C\""
  },
  {
    "path": "tests/data/Reader/CSV/csv_without_extension",
    "content": "This;Are;Headers\nCell A2;Number with comma;25,5\nTwo colons and a comma;B|3;:,:\n"
  },
  {
    "path": "tests/data/Reader/CSV/empty.csv",
    "content": ""
  },
  {
    "path": "tests/data/Reader/CSV/enclosure.csv",
    "content": "\"Date/Time\",\"task\",\"username\"\n\"12/17/2017 14:35\",\"viewpage\",\"username1\",\n\"12/17/2017 04:00\",\"editpage\",\"username5\",\n\"11/29/2017 08:20\",\"deletepage\",\"username2\",,\n"
  },
  {
    "path": "tests/data/Reader/CSV/encoding.iso88591.csv",
    "content": ",1\r\n2,3\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/encoding.utf8.csv",
    "content": "Å,1\r\n2,3\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/encoding.utf8bom.csv",
    "content": "﻿Å,1\r\n2,3\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/escape.csv",
    "content": "a\\\"hello;hello;hello;\\\",b\\\"hello;hello;hello;\\\",c\\\"\\hello;hello;hello;\\\"\r\na\\\"hello;hello;hello;\\\",b\\\"hello;hello;hello;\\\",c\\\"\\hello;hello;hello;\\\",d\r\na\\\"hello;hello;hello;\\\",b\\\"hello;hello;hello;\\\",c\\\"\\hello;hello;hello;\\\"\r\na\\\"hello;hello;hello;\\\",b\\\"hello;hello;hello;\\\",c\\\"\\hello;hello;hello;\\\"\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/issue.2232.csv",
    "content": "1,2,3\r\na,FaLSe,b\r\ncc,tRUE,cc\r\ndd,Faux,ee\r\nff,Vrai,gg\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/line_break_in_enclosure.csv",
    "content": "Name,Copy,URL\r\nTest,\"This is a test\r\nwith line breaks\r\nthat breaks the\r\ndelimiters\",http://google.com\r\nTest,\"This is a test\r\nwith line breaks\r\nthat breaks the\r\ndelimiters\",http://google.com\r\nTest,\"This is a test\r\nwith line breaks\r\nthat breaks the\r\ndelimiters\",http://google.com\r\nTest,\"This is a test\r\nwith line breaks\r\nthat breaks the\r\ndelimiters\",http://google.com\r\nTest,\"This is a test\",http://google.com\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/line_break_in_enclosure_with_escaped_quotes.csv",
    "content": "Name,Copy,URL\nTest,\"This is a \"\"test csv file\"\"\nwith both \"\"line breaks\"\"\nand \"\"escaped\nquotes\"\" that breaks\nthe delimiters\",http://google.com\nTest,\"This is a \"\"test csv file\"\"\nwith both \"\"line breaks\"\"\nand \"\"escaped\nquotes\"\" that breaks\nthe delimiters\",http://google.com\nTest,\"This is a \"\"test csv file\"\"\nwith both \"\"line breaks\"\"\nand \"\"escaped\nquotes\"\" that breaks\nthe delimiters\",http://google.com\nTest,\"This is a \"\"test csv file\"\"\nwith both \"\"line breaks\"\"\nand \"\"escaped\nquotes\"\" that breaks\nthe delimiters\",http://google.com\n"
  },
  {
    "path": "tests/data/Reader/CSV/linend.mac.csv",
    "content": "A,1\r2,3\r"
  },
  {
    "path": "tests/data/Reader/CSV/linend.unix.csv",
    "content": "A,1\n2,3\n"
  },
  {
    "path": "tests/data/Reader/CSV/linend.win.csv",
    "content": "A,1\r\n2,3\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/no_delimiter.csv",
    "content": "SingleLine"
  },
  {
    "path": "tests/data/Reader/CSV/premiere.utf8.csv",
    "content": "première,second,troisième\r\nQuatrième,cinquième,sixième\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/premiere.utf8bom.csv",
    "content": "﻿première,second,troisième\r\nQuatrième,cinquième,sixième\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/premiere.win1252.csv",
    "content": "premire,second,troisime\r\nQuatrime,cinquime,sixime\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/semicolon_separated.csv",
    "content": "This;Are;Headers\r\nCell A2;Number with comma;25,5\r\nTwo colons and a comma;B|3;:,:\r\n"
  },
  {
    "path": "tests/data/Reader/CSV/sep.csv",
    "content": "sep=;\r\nA;1\r\n2;3\r\n"
  },
  {
    "path": "tests/data/Reader/Gnumeric/PageSetup.gnumeric.unzipped.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<gnm:Workbook xmlns:gnm=\"http://www.gnumeric.org/v10.dtd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.gnumeric.org/v9.xsd\">\n  <gnm:Version Epoch=\"1\" Major=\"12\" Minor=\"17\" Full=\"1.12.17\"/>\n  <gnm:Attributes>\n    <gnm:Attribute>\n      <gnm:name>WorkbookView::show_horizontal_scrollbar</gnm:name>\n      <gnm:value>TRUE</gnm:value>\n    </gnm:Attribute>\n    <gnm:Attribute>\n      <gnm:name>WorkbookView::show_vertical_scrollbar</gnm:name>\n      <gnm:value>TRUE</gnm:value>\n    </gnm:Attribute>\n    <gnm:Attribute>\n      <gnm:name>WorkbookView::show_notebook_tabs</gnm:name>\n      <gnm:value>TRUE</gnm:value>\n    </gnm:Attribute>\n    <gnm:Attribute>\n      <gnm:name>WorkbookView::do_auto_completion</gnm:name>\n      <gnm:value>TRUE</gnm:value>\n    </gnm:Attribute>\n    <gnm:Attribute>\n      <gnm:name>WorkbookView::is_protected</gnm:name>\n      <gnm:value>FALSE</gnm:value>\n    </gnm:Attribute>\n  </gnm:Attributes>\n  <office:document-meta xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" xmlns:ooo=\"http://openoffice.org/2004/office\" office:version=\"1.2\">\n    <office:meta>\n      <dc:creator>Mark Baker</dc:creator>\n      <dc:date>2020-07-04T15:11:06Z</dc:date>\n      <meta:user-defined meta:name=\"dc:publisher\" meta:value-type=\"string\"></meta:user-defined>\n      <meta:user-defined meta:name=\"gsf:links-dirty\" meta:value-type=\"boolean\">false</meta:user-defined>\n      <meta:user-defined meta:name=\"gsf:scale\" meta:value-type=\"boolean\">false</meta:user-defined>\n      <meta:user-defined meta:name=\"gsf:security\" meta:value-type=\"float\">0</meta:user-defined>\n      <meta:creation-date>2020-06-29T17:37:00Z</meta:creation-date>\n      <meta:initial-creator>Mark Baker</meta:initial-creator>\n      <meta:user-defined meta:name=\"meta:print-date\" meta:value-type=\"date\">2020-07-04T11:51:41Z</meta:user-defined>\n      <meta:user-defined meta:name=\"xlsx:HyperlinksChanged\" meta:value-type=\"boolean\">false</meta:user-defined>\n      <meta:user-defined meta:name=\"xlsx:SharedDoc\" meta:value-type=\"boolean\">false</meta:user-defined>\n    </office:meta>\n  </office:document-meta>\n  <gnm:Calculation ManualRecalc=\"0\" EnableIteration=\"1\" MaxIterations=\"100\" IterationTolerance=\"0.001\" FloatRadix=\"2\" FloatDigits=\"53\"/>\n  <gnm:SheetNameIndex>\n    <gnm:SheetName gnm:Cols=\"16384\" gnm:Rows=\"1048576\">Sheet1</gnm:SheetName>\n    <gnm:SheetName gnm:Cols=\"16384\" gnm:Rows=\"1048576\">Sheet2</gnm:SheetName>\n    <gnm:SheetName gnm:Cols=\"16384\" gnm:Rows=\"1048576\">Sheet3</gnm:SheetName>\n    <gnm:SheetName gnm:Cols=\"16384\" gnm:Rows=\"1048576\">Sheet4</gnm:SheetName>\n  </gnm:SheetNameIndex>\n  <gnm:Geometry Width=\"1440\" Height=\"626\"/>\n  <gnm:Sheets>\n    <gnm:Sheet DisplayFormulas=\"0\" HideZero=\"0\" HideGrid=\"0\" HideColHeader=\"0\" HideRowHeader=\"0\" DisplayOutlines=\"1\" OutlineSymbolsBelow=\"1\" OutlineSymbolsRight=\"1\" Visibility=\"GNM_SHEET_VISIBILITY_VISIBLE\" GridColor=\"0:0:0\">\n      <gnm:Name>Sheet1</gnm:Name>\n      <gnm:MaxCol>2</gnm:MaxCol>\n      <gnm:MaxRow>4</gnm:MaxRow>\n      <gnm:Zoom>1</gnm:Zoom>\n      <gnm:Names>\n        <gnm:Name>\n          <gnm:name>Print_Area</gnm:name>\n          <gnm:value>#REF!</gnm:value>\n          <gnm:position>A1</gnm:position>\n        </gnm:Name>\n        <gnm:Name>\n          <gnm:name>Sheet_Title</gnm:name>\n          <gnm:value>&quot;Sheet1&quot;</gnm:value>\n          <gnm:position>A1</gnm:position>\n        </gnm:Name>\n      </gnm:Names>\n      <gnm:PrintInformation>\n        <gnm:Margins>\n          <gnm:top Points=\"68.03\" PrefUnit=\"mm\"/>\n          <gnm:bottom Points=\"53.86\" PrefUnit=\"mm\"/>\n          <gnm:left Points=\"36.85\" PrefUnit=\"mm\"/>\n          <gnm:right Points=\"36.85\" PrefUnit=\"mm\"/>\n          <gnm:header Points=\"22.68\" PrefUnit=\"mm\"/>\n          <gnm:footer Points=\"22.68\" PrefUnit=\"mm\"/>\n        </gnm:Margins>\n        <gnm:Scale type=\"percentage\" percentage=\"75\"/>\n        <gnm:vcenter value=\"0\"/>\n        <gnm:hcenter value=\"1\"/>\n        <gnm:grid value=\"0\"/>\n        <gnm:even_if_only_styles value=\"0\"/>\n        <gnm:monochrome value=\"0\"/>\n        <gnm:draft value=\"0\"/>\n        <gnm:titles value=\"0\"/>\n        <gnm:do_not_print value=\"0\"/>\n        <gnm:print_range value=\"GNM_PRINT_ACTIVE_SHEET\"/>\n        <gnm:order>d_then_r</gnm:order>\n        <gnm:orientation>portrait</gnm:orientation>\n        <gnm:Header Left=\"\" Middle=\"&amp;[TAB]\" Right=\"\"/>\n        <gnm:Footer Left=\"\" Middle=\"Page &amp;[PAGE]\" Right=\"\"/>\n        <gnm:paper>iso_a4</gnm:paper>\n        <gnm:comments placement=\"GNM_PRINT_COMMENTS_IN_PLACE\"/>\n        <gnm:errors PrintErrorsAs=\"GNM_PRINT_ERRORS_AS_DISPLAYED\"/>\n      </gnm:PrintInformation>\n      <gnm:Styles>\n        <gnm:StyleRegion startCol=\"0\" startRow=\"0\" endCol=\"16383\" endRow=\"1048575\">\n          <gnm:Style HAlign=\"GNM_HALIGN_GENERAL\" VAlign=\"GNM_VALIGN_BOTTOM\" WrapText=\"0\" ShrinkToFit=\"0\" Rotation=\"0\" Shade=\"0\" Indent=\"0\" Locked=\"1\" Hidden=\"0\" Fore=\"0:0:0\" Back=\"FFFF:FFFF:FFFF\" PatternColor=\"0:0:0\" Format=\"General\">\n            <gnm:Font Unit=\"11\" Bold=\"0\" Italic=\"0\" Underline=\"0\" StrikeThrough=\"0\" Script=\"0\">Calibri</gnm:Font>\n          </gnm:Style>\n        </gnm:StyleRegion>\n      </gnm:Styles>\n      <gnm:Cols DefaultSizePts=\"48\"/>\n      <gnm:Rows DefaultSizePts=\"14.25\">\n        <gnm:RowInfo No=\"0\" Unit=\"14.25\" HardSize=\"1\" Count=\"4\"/>\n      </gnm:Rows>\n      <gnm:Selections CursorCol=\"0\" CursorRow=\"0\">\n        <gnm:Selection startCol=\"0\" startRow=\"0\" endCol=\"2\" endRow=\"4\"/>\n      </gnm:Selections>\n      <gnm:Cells>\n        <gnm:Cell Row=\"0\" Col=\"0\" ValueType=\"40\">1</gnm:Cell>\n        <gnm:Cell Row=\"0\" Col=\"1\" ValueType=\"40\">2</gnm:Cell>\n        <gnm:Cell Row=\"0\" Col=\"2\" ValueType=\"40\">3</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"0\" ValueType=\"40\">4</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"1\" ValueType=\"40\">5</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"2\" ValueType=\"40\">6</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"0\" ValueType=\"40\">7</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"1\" ValueType=\"40\">8</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"2\" ValueType=\"40\">9</gnm:Cell>\n        <gnm:Cell Row=\"4\" Col=\"0\">=sum(A2:C2,B1:B3)</gnm:Cell>\n        <gnm:Cell Row=\"4\" Col=\"1\">=count(A2:C2,B1:B3)</gnm:Cell>\n      </gnm:Cells>\n      <gnm:SheetLayout TopLeft=\"A1\"/>\n      <gnm:Solver ModelType=\"0\" ProblemType=\"0\" MaxTime=\"60\" MaxIter=\"1000\" NonNeg=\"1\" Discr=\"0\" AutoScale=\"0\" ProgramR=\"0\"/>\n    </gnm:Sheet>\n    <gnm:Sheet DisplayFormulas=\"0\" HideZero=\"0\" HideGrid=\"0\" HideColHeader=\"0\" HideRowHeader=\"0\" DisplayOutlines=\"1\" OutlineSymbolsBelow=\"1\" OutlineSymbolsRight=\"1\" Visibility=\"GNM_SHEET_VISIBILITY_VISIBLE\" GridColor=\"0:0:0\">\n      <gnm:Name>Sheet2</gnm:Name>\n      <gnm:MaxCol>2</gnm:MaxCol>\n      <gnm:MaxRow>4</gnm:MaxRow>\n      <gnm:Zoom>1</gnm:Zoom>\n      <gnm:Names>\n        <gnm:Name>\n          <gnm:name>Print_Area</gnm:name>\n          <gnm:value>#REF!</gnm:value>\n          <gnm:position>A1</gnm:position>\n        </gnm:Name>\n        <gnm:Name>\n          <gnm:name>Sheet_Title</gnm:name>\n          <gnm:value>&quot;Sheet2&quot;</gnm:value>\n          <gnm:position>A1</gnm:position>\n        </gnm:Name>\n      </gnm:Names>\n      <gnm:PrintInformation>\n        <gnm:Margins>\n          <gnm:top Points=\"53.86\" PrefUnit=\"mm\"/>\n          <gnm:bottom Points=\"53.86\" PrefUnit=\"mm\"/>\n          <gnm:left Points=\"51.02\" PrefUnit=\"mm\"/>\n          <gnm:right Points=\"51.02\" PrefUnit=\"mm\"/>\n          <gnm:header Points=\"22.68\" PrefUnit=\"mm\"/>\n          <gnm:footer Points=\"22.68\" PrefUnit=\"mm\"/>\n        </gnm:Margins>\n        <gnm:Scale type=\"percentage\" percentage=\"100\"/>\n        <gnm:vcenter value=\"1\"/>\n        <gnm:hcenter value=\"0\"/>\n        <gnm:grid value=\"0\"/>\n        <gnm:even_if_only_styles value=\"0\"/>\n        <gnm:monochrome value=\"0\"/>\n        <gnm:draft value=\"0\"/>\n        <gnm:titles value=\"0\"/>\n        <gnm:do_not_print value=\"0\"/>\n        <gnm:print_range value=\"GNM_PRINT_ACTIVE_SHEET\"/>\n        <gnm:order>r_then_d</gnm:order>\n        <gnm:orientation>landscape</gnm:orientation>\n        <gnm:Header Left=\"\" Middle=\"&amp;[TAB]\" Right=\"\"/>\n        <gnm:Footer Left=\"\" Middle=\"Page &amp;[PAGE]\" Right=\"\"/>\n        <gnm:paper>iso_a4</gnm:paper>\n        <gnm:comments placement=\"GNM_PRINT_COMMENTS_IN_PLACE\"/>\n        <gnm:errors PrintErrorsAs=\"GNM_PRINT_ERRORS_AS_DISPLAYED\"/>\n      </gnm:PrintInformation>\n      <gnm:Styles>\n        <gnm:StyleRegion startCol=\"0\" startRow=\"0\" endCol=\"16383\" endRow=\"1048575\">\n          <gnm:Style HAlign=\"GNM_HALIGN_GENERAL\" VAlign=\"GNM_VALIGN_BOTTOM\" WrapText=\"0\" ShrinkToFit=\"0\" Rotation=\"0\" Shade=\"0\" Indent=\"0\" Locked=\"1\" Hidden=\"0\" Fore=\"0:0:0\" Back=\"FFFF:FFFF:FFFF\" PatternColor=\"0:0:0\" Format=\"General\">\n            <gnm:Font Unit=\"11\" Bold=\"0\" Italic=\"0\" Underline=\"0\" StrikeThrough=\"0\" Script=\"0\">Calibri</gnm:Font>\n          </gnm:Style>\n        </gnm:StyleRegion>\n      </gnm:Styles>\n      <gnm:Cols DefaultSizePts=\"48\"/>\n      <gnm:Rows DefaultSizePts=\"14.25\">\n        <gnm:RowInfo No=\"0\" Unit=\"14.25\" HardSize=\"1\" Count=\"4\"/>\n      </gnm:Rows>\n      <gnm:Selections CursorCol=\"0\" CursorRow=\"0\">\n        <gnm:Selection startCol=\"0\" startRow=\"0\" endCol=\"2\" endRow=\"4\"/>\n      </gnm:Selections>\n      <gnm:Cells>\n        <gnm:Cell Row=\"0\" Col=\"0\" ValueType=\"40\">1</gnm:Cell>\n        <gnm:Cell Row=\"0\" Col=\"1\" ValueType=\"40\">2</gnm:Cell>\n        <gnm:Cell Row=\"0\" Col=\"2\" ValueType=\"40\">3</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"0\" ValueType=\"40\">4</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"1\" ValueType=\"40\">5</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"2\" ValueType=\"40\">6</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"0\" ValueType=\"40\">7</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"1\" ValueType=\"40\">8</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"2\" ValueType=\"40\">9</gnm:Cell>\n        <gnm:Cell Row=\"4\" Col=\"0\" ExprID=\"1\">=sum($A$1:$C$1,$A$3:$C$3,$A$1:$A$3,$C$1:$C$3)</gnm:Cell>\n        <gnm:Cell Row=\"4\" Col=\"1\" ExprID=\"2\">=count($A$1:$C$1,$A$3:$C$3,$A$1:$A$3,$C$1:$C$3)</gnm:Cell>\n      </gnm:Cells>\n      <gnm:SheetLayout TopLeft=\"A1\"/>\n      <gnm:Solver ModelType=\"0\" ProblemType=\"0\" MaxTime=\"60\" MaxIter=\"1000\" NonNeg=\"1\" Discr=\"0\" AutoScale=\"0\" ProgramR=\"0\"/>\n    </gnm:Sheet>\n    <gnm:Sheet DisplayFormulas=\"0\" HideZero=\"0\" HideGrid=\"0\" HideColHeader=\"0\" HideRowHeader=\"0\" DisplayOutlines=\"1\" OutlineSymbolsBelow=\"1\" OutlineSymbolsRight=\"1\" Visibility=\"GNM_SHEET_VISIBILITY_VISIBLE\" GridColor=\"0:0:0\">\n      <gnm:Name>Sheet3</gnm:Name>\n      <gnm:MaxCol>2</gnm:MaxCol>\n      <gnm:MaxRow>4</gnm:MaxRow>\n      <gnm:Zoom>1</gnm:Zoom>\n      <gnm:Names>\n        <gnm:Name>\n          <gnm:name>Print_Area</gnm:name>\n          <gnm:value>Sheet3!$A$1:$C$5</gnm:value>\n          <gnm:position>A1</gnm:position>\n        </gnm:Name>\n        <gnm:Name>\n          <gnm:name>Sheet_Title</gnm:name>\n          <gnm:value>&quot;Sheet3&quot;</gnm:value>\n          <gnm:position>A1</gnm:position>\n        </gnm:Name>\n      </gnm:Names>\n      <gnm:PrintInformation>\n        <gnm:Margins>\n          <gnm:top Points=\"68.03\" PrefUnit=\"mm\"/>\n          <gnm:bottom Points=\"68.03\" PrefUnit=\"mm\"/>\n          <gnm:left Points=\"51.02\" PrefUnit=\"mm\"/>\n          <gnm:right Points=\"51.02\" PrefUnit=\"mm\"/>\n          <gnm:header Points=\"36.85\" PrefUnit=\"mm\"/>\n          <gnm:footer Points=\"36.85\" PrefUnit=\"mm\"/>\n        </gnm:Margins>\n        <gnm:Scale type=\"percentage\" percentage=\"90\"/>\n        <gnm:vcenter value=\"1\"/>\n        <gnm:hcenter value=\"1\"/>\n        <gnm:grid value=\"0\"/>\n        <gnm:even_if_only_styles value=\"0\"/>\n        <gnm:monochrome value=\"0\"/>\n        <gnm:draft value=\"0\"/>\n        <gnm:titles value=\"0\"/>\n        <gnm:do_not_print value=\"0\"/>\n        <gnm:print_range value=\"GNM_PRINT_ACTIVE_SHEET\"/>\n        <gnm:order>d_then_r</gnm:order>\n        <gnm:orientation>portrait</gnm:orientation>\n        <gnm:Header Left=\"\" Middle=\"&amp;[TAB]\" Right=\"\"/>\n        <gnm:Footer Left=\"\" Middle=\"Page &amp;[PAGE]\" Right=\"\"/>\n        <gnm:paper>iso_a4</gnm:paper>\n        <gnm:comments placement=\"GNM_PRINT_COMMENTS_IN_PLACE\"/>\n        <gnm:errors PrintErrorsAs=\"GNM_PRINT_ERRORS_AS_DISPLAYED\"/>\n      </gnm:PrintInformation>\n      <gnm:Styles>\n        <gnm:StyleRegion startCol=\"0\" startRow=\"0\" endCol=\"16383\" endRow=\"1048575\">\n          <gnm:Style HAlign=\"GNM_HALIGN_GENERAL\" VAlign=\"GNM_VALIGN_BOTTOM\" WrapText=\"0\" ShrinkToFit=\"0\" Rotation=\"0\" Shade=\"0\" Indent=\"0\" Locked=\"1\" Hidden=\"0\" Fore=\"0:0:0\" Back=\"FFFF:FFFF:FFFF\" PatternColor=\"0:0:0\" Format=\"General\">\n            <gnm:Font Unit=\"11\" Bold=\"0\" Italic=\"0\" Underline=\"0\" StrikeThrough=\"0\" Script=\"0\">Calibri</gnm:Font>\n          </gnm:Style>\n        </gnm:StyleRegion>\n      </gnm:Styles>\n      <gnm:Cols DefaultSizePts=\"48\"/>\n      <gnm:Rows DefaultSizePts=\"14.25\">\n        <gnm:RowInfo No=\"0\" Unit=\"14.25\" HardSize=\"1\" Count=\"4\"/>\n      </gnm:Rows>\n      <gnm:Selections CursorCol=\"0\" CursorRow=\"0\">\n        <gnm:Selection startCol=\"0\" startRow=\"0\" endCol=\"2\" endRow=\"4\"/>\n      </gnm:Selections>\n      <gnm:Cells>\n        <gnm:Cell Row=\"0\" Col=\"0\" ValueType=\"40\">1</gnm:Cell>\n        <gnm:Cell Row=\"0\" Col=\"1\" ValueType=\"40\">2</gnm:Cell>\n        <gnm:Cell Row=\"0\" Col=\"2\" ValueType=\"40\">3</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"0\" ValueType=\"40\">4</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"1\" ValueType=\"40\">5</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"2\" ValueType=\"40\">6</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"0\" ValueType=\"40\">7</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"1\" ValueType=\"40\">8</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"2\" ValueType=\"40\">9</gnm:Cell>\n        <gnm:Cell Row=\"4\" Col=\"0\" ExprID=\"1\"/>\n        <gnm:Cell Row=\"4\" Col=\"1\" ExprID=\"2\"/>\n      </gnm:Cells>\n      <gnm:SheetLayout TopLeft=\"B2\">\n        <gnm:FreezePanes FrozenTopLeft=\"A1\" UnfrozenTopLeft=\"B2\"/>\n      </gnm:SheetLayout>\n      <gnm:Solver ModelType=\"0\" ProblemType=\"0\" MaxTime=\"60\" MaxIter=\"1000\" NonNeg=\"1\" Discr=\"0\" AutoScale=\"0\" ProgramR=\"0\"/>\n    </gnm:Sheet>\n    <gnm:Sheet DisplayFormulas=\"0\" HideZero=\"0\" HideGrid=\"0\" HideColHeader=\"0\" HideRowHeader=\"0\" DisplayOutlines=\"1\" OutlineSymbolsBelow=\"1\" OutlineSymbolsRight=\"1\" Visibility=\"GNM_SHEET_VISIBILITY_VISIBLE\" GridColor=\"0:0:0\">\n      <gnm:Name>Sheet4</gnm:Name>\n      <gnm:MaxCol>2</gnm:MaxCol>\n      <gnm:MaxRow>4</gnm:MaxRow>\n      <gnm:Zoom>1</gnm:Zoom>\n      <gnm:Names>\n        <gnm:Name>\n          <gnm:name>Print_Area</gnm:name>\n          <gnm:value>#REF!</gnm:value>\n          <gnm:position>A1</gnm:position>\n        </gnm:Name>\n        <gnm:Name>\n          <gnm:name>Sheet_Title</gnm:name>\n          <gnm:value>&quot;Sheet4&quot;</gnm:value>\n          <gnm:position>A1</gnm:position>\n        </gnm:Name>\n      </gnm:Names>\n      <gnm:PrintInformation>\n        <gnm:Margins>\n          <gnm:top Points=\"54\" PrefUnit=\"mm\"/>\n          <gnm:bottom Points=\"54\" PrefUnit=\"mm\"/>\n          <gnm:left Points=\"50.4\" PrefUnit=\"mm\"/>\n          <gnm:right Points=\"50.4\" PrefUnit=\"mm\"/>\n          <gnm:header Points=\"21.6\" PrefUnit=\"mm\"/>\n          <gnm:footer Points=\"21.6\" PrefUnit=\"mm\"/>\n        </gnm:Margins>\n        <gnm:Scale type=\"percentage\" percentage=\"100\"/>\n        <gnm:vcenter value=\"0\"/>\n        <gnm:hcenter value=\"0\"/>\n        <gnm:grid value=\"0\"/>\n        <gnm:even_if_only_styles value=\"0\"/>\n        <gnm:monochrome value=\"0\"/>\n        <gnm:draft value=\"0\"/>\n        <gnm:titles value=\"0\"/>\n        <gnm:do_not_print value=\"0\"/>\n        <gnm:print_range value=\"GNM_PRINT_ACTIVE_SHEET\"/>\n        <gnm:order>d_then_r</gnm:order>\n        <gnm:orientation>portrait</gnm:orientation>\n        <gnm:Header Left=\"\" Middle=\"&amp;[TAB]\" Right=\"\"/>\n        <gnm:Footer Left=\"\" Middle=\"Page &amp;[PAGE]\" Right=\"\"/>\n        <gnm:paper>iso_a4</gnm:paper>\n        <gnm:comments placement=\"GNM_PRINT_COMMENTS_IN_PLACE\"/>\n        <gnm:errors PrintErrorsAs=\"GNM_PRINT_ERRORS_AS_DISPLAYED\"/>\n      </gnm:PrintInformation>\n      <gnm:Styles>\n        <gnm:StyleRegion startCol=\"0\" startRow=\"0\" endCol=\"16383\" endRow=\"1048575\">\n          <gnm:Style HAlign=\"GNM_HALIGN_GENERAL\" VAlign=\"GNM_VALIGN_BOTTOM\" WrapText=\"0\" ShrinkToFit=\"0\" Rotation=\"0\" Shade=\"0\" Indent=\"0\" Locked=\"1\" Hidden=\"0\" Fore=\"0:0:0\" Back=\"FFFF:FFFF:FFFF\" PatternColor=\"0:0:0\" Format=\"General\">\n            <gnm:Font Unit=\"11\" Bold=\"0\" Italic=\"0\" Underline=\"0\" StrikeThrough=\"0\" Script=\"0\">Calibri</gnm:Font>\n          </gnm:Style>\n        </gnm:StyleRegion>\n      </gnm:Styles>\n      <gnm:Cols DefaultSizePts=\"48\"/>\n      <gnm:Rows DefaultSizePts=\"14.25\"/>\n      <gnm:Selections CursorCol=\"0\" CursorRow=\"0\">\n        <gnm:Selection startCol=\"0\" startRow=\"0\" endCol=\"2\" endRow=\"4\"/>\n      </gnm:Selections>\n      <gnm:Cells>\n        <gnm:Cell Row=\"0\" Col=\"0\" ValueType=\"40\">1</gnm:Cell>\n        <gnm:Cell Row=\"0\" Col=\"1\" ValueType=\"40\">2</gnm:Cell>\n        <gnm:Cell Row=\"0\" Col=\"2\" ValueType=\"40\">3</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"0\" ValueType=\"40\">4</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"1\" ValueType=\"40\">5</gnm:Cell>\n        <gnm:Cell Row=\"1\" Col=\"2\" ValueType=\"40\">6</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"0\" ValueType=\"40\">7</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"1\" ValueType=\"40\">8</gnm:Cell>\n        <gnm:Cell Row=\"2\" Col=\"2\" ValueType=\"40\">9</gnm:Cell>\n        <gnm:Cell Row=\"4\" Col=\"0\" ExprID=\"1\"/>\n        <gnm:Cell Row=\"4\" Col=\"1\" ExprID=\"2\"/>\n      </gnm:Cells>\n      <gnm:SheetLayout TopLeft=\"A1\"/>\n      <gnm:Solver ModelType=\"0\" ProblemType=\"0\" MaxTime=\"60\" MaxIter=\"1000\" NonNeg=\"1\" Discr=\"0\" AutoScale=\"0\" ProgramR=\"0\"/>\n    </gnm:Sheet>\n  </gnm:Sheets>\n  <gnm:UIData SelectedTab=\"2\"/>\n</gnm:Workbook>\n"
  },
  {
    "path": "tests/data/Reader/HTML/badhtml.html",
    "content": "<table<>\n"
  },
  {
    "path": "tests/data/Reader/HTML/charset.ISO-8859-1.html",
    "content": "    <!DOCTYPE html>\n    <html lang='en'>\n    <head>\n    <meta charset='ISO-8859-1'>\n    <title>ISO-8859-1</title>\n    </head>\n    <body>\n    <table>\n        <tbody>\n        <tr>\n            <td>1</td>\n            <td>B1</td>\n            <td>1</td>\n            <td>D1</td>\n        </tr>\n        <tr>\n            <td>2</td>\n            <td>B2</td>\n            <td>C2</td>\n            <td>2</td>\n        </tr>\n        </tbody>\n    </table>\n    </body>\n    </html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/charset.ISO-8859-1.html4.html",
    "content": "    <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n    <html lang='en'>\n    <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html;CHARSET=ISO-8859-1\">\n    <title>ISO-8859-1 Html4 Doctype and Meta</title>\n    </head>\n    <body>\n    <table>\n        <tbody>\n        <tr>\n            <td>1</td>\n            <td>B1</td>\n            <td>1</td>\n            <td>D1</td>\n        </tr>\n        <tr>\n            <td>2</td>\n            <td>B2</td>\n            <td>C2</td>\n            <td>2</td>\n        </tr>\n        </tbody>\n    </table>\n    </body>\n    </html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/charset.ISO-8859-2.html",
    "content": "    <!DOCTYPE html>\n    <html lang='en'>\n    <head>\n    <meta charset='ISO-8859-2'>\n    <title>ISO-8859-2</title>\n    </head>\n    <body>\n    <table>\n        <tbody>\n        <tr>\n            <td>1</td>\n            <td>B1</td>\n            <td>1</td>\n            <td>D1</td>\n        </tr>\n        <tr>\n            <td>2</td>\n            <td>B2</td>\n            <td>C2</td>\n            <td>2</td>\n        </tr>\n        </tbody>\n    </table>\n    </body>\n    </html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/charset.UTF-8.bom.html",
    "content": "﻿    <!DOCTYPE html>\n    <html lang='en'>\n    <head>\n    <title>UTF-8</title>\n    </head>\n    <body>\n    <table>\n        <tbody>\n        <tr>\n            <td>À1</td>\n            <td>B1</td>\n            <td>ç1</td>\n            <td>D1</td>\n        </tr>\n        <tr>\n            <td>Ã2</td>\n            <td>B2</td>\n            <td>C2</td>\n            <td>Ð2</td>\n        </tr>\n        </tbody>\n    </table>\n    </body>\n    </html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/charset.UTF-8.html",
    "content": "    <!DOCTYPE html>\n    <html lang='en'>\n    <head>\n    <meta charset='UTF-8'>\n    <title>UTF-8</title>\n    </head>\n    <body>\n    <table>\n        <tbody>\n        <tr>\n            <td>À1</td>\n            <td>B1</td>\n            <td>ç1</td>\n            <td>D1</td>\n        </tr>\n        <tr>\n            <td>Ã2</td>\n            <td>B2</td>\n            <td>C2</td>\n            <td>Ð2</td>\n        </tr>\n        </tbody>\n    </table>\n    </body>\n    </html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/charset.gb18030.html",
    "content": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb18030\">\n<title>gb18030</title>\n</head>\n<body>\n    <table>\n        <tbody>\n        <tr>\n            <td>ӻ</td>\n        </tr>\n        </tbody>\n    </table>\n</body>\n</html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/charset.nocharset.html",
    "content": "<table>\n    <tbody>\n    <tr>\n        <td>À1</td>\n        <td>B1</td>\n        <td>ç1</td>\n        <td>D1</td>\n    </tr>\n    <tr>\n        <td>Ã2</td>\n        <td>B2</td>\n        <td>C2</td>\n        <td>Ð2</td>\n    </tr>\n    </tbody>\n</table>\n"
  },
  {
    "path": "tests/data/Reader/HTML/charset.unknown.html",
    "content": "    <!DOCTYPE html>\n    <html lang='en'>\n    <head>\n    <meta charset='unknown'>\n    <title>UTF-8</title>\n    </head>\n    <body>\n    <table>\n        <tbody>\n        <tr>\n            <td>À1</td>\n            <td>B1</td>\n            <td>ç1</td>\n            <td>D1</td>\n        </tr>\n        <tr>\n            <td>Ã2</td>\n            <td>B2</td>\n            <td>C2</td>\n            <td>Ð2</td>\n        </tr>\n        </tbody>\n    </table>\n    </body>\n    </html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/csv_with_angle_bracket.csv",
    "content": "Collection Name,Number of items with weight <= 50kg\n"
  },
  {
    "path": "tests/data/Reader/HTML/html.opacity.3.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n      <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n      <meta name=\"generator\" content=\"PhpSpreadsheet, https://github.com/PHPOffice/PhpSpreadsheet\" />\r\n      <title>Untitled Spreadsheet</title>\r\n      <meta name=\"author\" content=\"Unknown Creator\" />\r\n      <meta name=\"title\" content=\"Untitled Spreadsheet\" />\r\n      <meta name=\"lastModifiedBy\" content=\"Unknown Creator\" />\r\n      <meta name=\"created\" content=\"2025-09-13T22:17:28-07:00\" />\r\n      <meta name=\"modified\" content=\"2025-09-13T22:17:28-07:00\" />\r\n    <style type=\"text/css\">\r\n      html { font-family:Calibri, Arial, Helvetica, sans-serif; font-size:11pt; background-color:white }\r\n      a.comment-indicator:hover + div.comment { background:#ffd; position:absolute; display:block; border:1px solid black; padding:0.5em }\r\n      a.comment-indicator { background:red; display:inline-block; border:1px solid black; width:0.5em; height:0.5em }\r\n      div.comment { display:none }\r\n      table { border-collapse:collapse }\r\n      .b { text-align:center }\r\n      .e { text-align:center }\r\n      .f { text-align:right }\r\n      .inlineStr { text-align:left }\r\n      .n { text-align:right }\r\n      .s { text-align:left }\r\n      .floatright { float:right }\r\n      .floatleft { float:left }\r\n      td.style0, th.style0 { vertical-align:bottom; border-bottom:none #000000; border-top:none #000000; border-left:none #000000; border-right:none #000000; color:#000000; font-family:'Calibri'; font-size:11pt }\r\n      table.sheet0 col.col0 { width:42pt }\r\n      table.sheet0 col.col1 { width:42pt }\r\n      table.sheet0 col.col2 { width:42pt }\r\n      table.sheet0 col.col3 { width:42pt }\r\n      table.sheet0 col.col4 { width:168pt }\r\n      table.sheet0 tr { height:15pt }\r\n      table.sheet0 tr.row0 { height:172.8pt }\r\n@page page0 { margin-left: 0.7in; margin-right: 0.7in; margin-top: 0.75in; margin-bottom: 0.75in; }\r\n.navigation {page-break-after: always;}\r\n.scrpgbrk, div + div {page-break-before: always;}\r\n@media screen {\r\n  .gridlines td {border: 1px solid black;}\r\n  .gridlines th {border: 1px solid black;}\r\n  body>div {margin-top: 5px;}\r\n  body>div:first-child {margin-top: 0;}\r\n  .scrpgbrk {margin-top: 1px;}\r\n}\r\n@media print {\r\n  .gridlinesp td {border: 1px solid black;}\r\n  .gridlinesp th {border: 1px solid black;}\r\n  .navigation {display: none;}\r\n}\r\n    </style>\r\n  </head>\r\n\r\n  <body>\r\n<div style='page: page0'>\r\n    <table border='0' cellpadding='0' cellspacing='0' id='sheet0' class='sheet0 gridlines'>\r\n        <col class=\"col0\" />\r\n        <col class=\"col1\" />\r\n        <col class=\"col2\" />\r\n        <col class=\"col3\" />\r\n        <col class=\"col4\" />\r\n        <tbody>\r\n          <tr class=\"row0\">\r\n            <td class=\"column0 style0 null\"></td>\r\n            <td class=\"column1 style0\">&nbsp;</td>\r\n            <td class=\"column2 style0\">&nbsp;</td>\r\n            <td class=\"column3 style0\">&nbsp;</td>\r\n            <td class=\"column4 style0 null\" style='position: relative;'>\r\n<img style=\"opacity:0.6; position: absolute; z-index: 1; left: 0px; top: 10px; width: 2in; height: 2in;\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAGHHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHja3VhblusoDPzXKmYJlsRzOTzPmR3M8qfATjrOq+3kfsyZuBMIooVQFQWE2j9/d/oLL7UqZKwPLjq34GWiiZJQCcv6ivOTFzM/58uZzcb7droaBE2KUtevPm39E9rtzz9cxuC8b6ewWSRsjjbDxaGOkQWVehsk2mVt5y0Qim0LOQZ/G2qWtSyXiMPPO29OZ0TL+p1uG4xHlqrFQCrSlHWZn2GNQMebNeE9PkURFNoC6qqeUFjlLRIkZDe9S7kstwnaJflSo/vsX2t3yZe0tetdLt2WI1SeGtg+T/5M8c3Aeo1I9oZol/Iwne3dew29t3V2yThk1G2Mmsm+ZGh0zEi5zn9zeDzeFnU/n4gnLGkpgLxiuIyncGQBKp3YcOXEndssCxeEaKSJRylSANRoC+olSgFKrGY83MVr1ArURIs0AnRG5RoLz3HjHK9wwMiV0VUYzhj/8vKhd8YzD/U+csu8hGuuEJcMXiOMgdz4RC8Awn3Dzc4EX54N/uWGP4OqBt1GmgMmmJa8usiWf7ilE2dFP4tyXUJMvm4OkCKMbREMloDhxbFadrx4Ec+MPAYAlBC5qJEMBNhaqQhSjKoT8hJkjI3/8Tz7ihUnoxnaBCCsOvXAJmoCWMZY8MebAA4lq9ZYa531NpCNNjl1xlnnnHdD5JJXb7z1znsffPQpaDDBBhd8CCGGFCUqNNBGF30MMcaUhBIGSvCV0D+hJUvWbLLNLvsccsypgD7FFFtc8SWUWFKVqhUyUV31NdRYU2NqUIpmmm2u+RZabKmDa1276ba77nvosacrahuqD88J1HhDTSZSo5+/ooZW8v7igoec2IEZEBPDQNwPBEBoGZgtgY2RgdzAbIlQNrWCIO3AhioPxAChaSy28xW7H+QO4UY2HMJNfkOOBnR/AjkCdI+4PUGtjn2uTMTWVThyuihWH+wtJJKQxqaWvi3/T45yRoIaQBWuxlWKtdYGnkI9ekyy1Ao59qmFoo4TsI4dJPMqqVqIQdJSRUOBo6q5N15Ktr3PvT8uo9Kw+Y6Sk96YH63daM9gLXTKdxctaykupE6mjQ4BwlV9bx7cnd+Xph0d3toaeIUVt7qj1d/37ug2vG/c0W1437ijx9l+5o5eJe+sO3qPxXF3dATaI+7oOFPeu6OzxJvuWsGW4BuX4E3LQ3g9Qe4kQNFsCNKxO9SWsZIgbDjNuti4+YJTUGkZ2o0/h7UGlZ+rNpZqrsuY7tf1WIs4hnWcvGTE1W1BpRmXEcvViFU3zCgvZsoVQ/pe24IocOJqS6w4PRjLFj48DjtmfFt+K+nXjl61KZIWOpveU/OIRBgKr7bFOk3I5zhDjspqH6o+e3SxEXnHNFpvNvdySUvxiuvCrId9SbMyQF2c75gK9uiK3TB3bJJd+c6Eu83VOIYbLT4oQKSSexBv6pyIr55xjJ4pMudKemLgUnooOJlrsZBLwIzJBYsNtfqErbdMzbwz0rCW6LztmIJH0G50WzaCdC4g18s94IYOdM+HHV0euPSaK3SKLG9K2pNlMOIpIS6UecKmlSt0iixPuHIhBD2lyz1ZVqq8ZQp9QJknTFmGHr0kyzPTA1MuPKGDRPlVVOiORR+LCp0kzEtRob2qfC4q9CtRDooK7VXlc1Ghw1T5RVToAFUOiQrtVeVzUaEvdqBdSe/IckZUqH++A+24Qo+M+ExU6OP9566kvap8Liq0V5XPRYXeHVXOiAp9tQvdiAq9O6qcERU6ufu8ZAm9O6qcERX6cP95IAO9O6qcERV6JMt2Vw2Nq6YaK+PuKQa3VFxV7filmLtLTdF73lfFjR8rICNlvbAaNw/RWXS9q6peLqN+u4yaWS7zqvpopYt5oADqLr3VVAyX2GvMxlyvDKXNW0EsKzV4wa1Awo+NHox5XhJwA3Z5/G541B29MJ52R7fhfeOOHmf7mTt6lbyz7ug9Fsfd0RFoj7ij40x57474JPFeuaPdbLe7qmjwlnFXxStAuELTZqNRb3FVTeOqOtbsvK3G2ER86UrrdRUrbfw0lJ9eVw+V9Ed+F/uvOoKiR6yVfwE0exxbvQABHQAAAYVpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNAHMVfW0tFKw4WFHHIUMXBgqiIo1ahCBVCrdCqg8mlX9CkIUlxcRRcCw5+LFYdXJx1dXAVBMEPEDc3J0UXKfF/SaFFjAfH/Xh373H3DvDXy0w1O8YBVbOMVCIuZLKrQugV3ehHEFGMSszU50QxCc/xdQ8fX+9iPMv73J+jR8mZDPAJxLNMNyziDeLpTUvnvE8cYUVJIT4nHjPogsSPXJddfuNccNjPMyNGOjVPHCEWCm0stzErGirxFHFUUTXK92dcVjhvcVbLVda8J39hOKetLHOd5hASWMQSRAiQUUUJZViI0aqRYiJF+3EP/6DjF8klk6sERo4FVKBCcvzgf/C7WzM/OeEmheNA8MW2P4aB0C7QqNn297FtN06AwDNwpbX8lTow80l6raVFj4DebeDiuqXJe8DlDjDwpEuG5EgBmv58Hng/o2/KAn23QNea21tzH6cPQJq6St4AB4fASIGy1z3e3dne279nmv39AIwLcrHNKofYAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5QsXBSUzYasNvAAAAQxJREFUeNrt3aENwkAYhuHvLkgsCtsJ2AHDZExU0x2YAFuFQVSSFgOepCQl9HkHOHHPtb/8S5Ip+pmqKwAiIEAEBIiAABEQIAIiIEAEBIi+3Wb2AbtDts0xmcZ132SpGa5dHrfLsiDb5pj96Zys3CM16dvkvjRIpjEZfSDlfRdmiKEuIEAERECACAgQAQEiIEAERECACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQfd78/SGlJvW1P2PtT7vU5UGGa5e+jY0ur5VHs49JMvlRmCECAkRAgAgIEAEBIiACAkRAgAjIH/cEr/MhJ7ZfdFEAAAAASUVORK5CYII=\" alt=\"Embedded image\" /></td>\r\n          </tr>\r\n    </tbody></table>\r\n</div>\r\n  </body>\r\n</html>\r\n"
  },
  {
    "path": "tests/data/Reader/HTML/rowspan.html",
    "content": "<table>\n    <tbody>\n    <tr>\n        <td>A1</td>\n        <td>B1</td>\n        <td>C1</td>\n        <td>D1</td>\n    </tr>\n    <tr>\n        <td colspan='3\"'>A2 with invalid colspan</td>\n        <td>D2<td>\n    </tr>\n    </tbody>\n</table>\n"
  },
  {
    "path": "tests/data/Reader/HTML/utf8chars.charset.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n<meta charset='UTF-8'>\n<title>Test Utf-8 characters voilà</title>\n</head>\n<body>\n<table>\n    <tbody>\n    <tr>\n        <td>éàâèî</td><!-- Latin1 -->\n        <td>αβγδε</td><!-- Greek -->\n    </tr>\n    <tr>\n        <td>𐐁𐐂𐐃 &amp; だけち</td><!-- Osmanya (not in BMP) and Hiragana -->\n        <td>אבגדה</td><!-- Hebrew -->\n        <td>𪔀𪔁𪔂</td><!-- CJK Unified Ideographs Extension B (not in BMP) -->\n    </tr>\n    <tr>\n        <td>᠐᠑᠒</td><!-- Mongolian -->\n        <td>അആ</td><!-- Malayalam -->\n        <td>กขฃ</td><!-- Thai -->\n        <td>✀✐✠</td><!-- Dingbats -->\n    </tr>\n    </tbody>\n</table>\n<table>\n    <tbody>\n    <tr>\n        <td>second table</td>\n    </tr>\n    </tbody>\n</table>\n<table>\n    <tbody>\n    <tr>\n        <td>third table</td>\n        <td>second cell</td>\n    </tr>\n    </tbody>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/utf8chars.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n<!-- deliberately do not identify charset for this test -->\n<title>Test Utf-8 characters voilà</title>\n</head>\n<body>\n<table>\n    <tbody>\n    <tr>\n        <td>éàâèî</td><!-- Latin1 -->\n        <td>αβγδε</td><!-- Greek -->\n    </tr>\n    <tr>\n        <td>𐐁𐐂𐐃 &amp; だけち</td><!-- Osmanya (not in BMP) and Hiragana -->\n        <td>אבגדה</td><!-- Hebrew -->\n        <td>𪔀𪔁𪔂</td><!-- CJK Unified Ideographs Extension B (not in BMP) -->\n    </tr>\n    <tr>\n        <td>᠐᠑᠒</td><!-- Mongolian -->\n        <td>അആ</td><!-- Malayalam -->\n        <td>กขฃ</td><!-- Thai -->\n        <td>✀✐✠</td><!-- Dingbats -->\n    </tr>\n    </tbody>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "tests/data/Reader/HTML/xhtml4.entity.xhtml",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n   \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\" [\n   <!ENTITY test \"It worked\">\n   ]>\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml;charset=utf-8\" />\n<title>HTML Entities</title>\n</head>\n<body>\n<table>\n    <tbody>\n    <tr><td>&test;</td></tr>\n    </tbody>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "tests/data/Reader/Slk/issue.2267c.slk",
    "content": "ID;PWXL;N;E\r\nP;PGeneral\r\nP;P0\r\nP;P0.00\r\nP;P#,##0\r\nP;P#,##0.00\r\nP;P#,##0_);;\\(#,##0\\)\r\nP;P#,##0_);;[Red]\\(#,##0\\)\r\nP;P#,##0.00_);;\\(#,##0.00\\)\r\nP;P#,##0.00_);;[Red]\\(#,##0.00\\)\r\nP;P\"$\"#,##0_);;\\(\"$\"#,##0\\)\r\nP;P\"$\"#,##0_);;[Red]\\(\"$\"#,##0\\)\r\nP;P\"$\"#,##0.00_);;\\(\"$\"#,##0.00\\)\r\nP;P\"$\"#,##0.00_);;[Red]\\(\"$\"#,##0.00\\)\r\nP;P0%\r\nP;P0.00%\r\nP;P0.00E+00\r\nP;P##0.0E+0\r\nP;P#\\ ?/?\r\nP;P#\\ ??/??\r\nP;Pyyyy/mm/dd\r\nP;Pdd/mmm/yy\r\nP;Pdd/mmm\r\nP;Pmmm/yy\r\nP;Ph:mm\\ AM/PM\r\nP;Ph:mm:ss\\ AM/PM\r\nP;Ph:mm\r\nP;Ph:mm:ss\r\nP;Pyyyy/mm/dd\\ h:mm\r\nP;Pmm:ss\r\nP;Pmm:ss.0\r\nP;P@\r\nP;P[h]:mm:ss\r\nP;P_(\"$\"* #,##0_);;_(\"$\"* \\(#,##0\\);;_(\"$\"* \"-\"_);;_(@_)\r\nP;P_(* #,##0_);;_(* \\(#,##0\\);;_(* \"-\"_);;_(@_)\r\nP;P_(\"$\"* #,##0.00_);;_(\"$\"* \\(#,##0.00\\);;_(\"$\"* \"-\"??_);;_(@_)\r\nP;P_(* #,##0.00_);;_(* \\(#,##0.00\\);;_(* \"-\"??_);;_(@_)\r\nP;FCalibri;M220;L9\r\nP;FCalibri;M220;L9\r\nP;FCalibri;M220;L9\r\nP;FCalibri;M220;L9\r\nP;ECalibri;M220;L9\r\nP;ECalibri Light;M360;L55\r\nP;ECalibri;M300;SB;L55\r\nP;ECalibri;M260;SB;L55\r\nP;ECalibri;M220;SB;L55\r\nP;ECalibri;M220;L18\r\nP;ECalibri;M220;L21\r\nP;ECalibri;M220;L61\r\nP;ECalibri;M220;L63\r\nP;ECalibri;M220;SB;L64\r\nP;ECalibri;M220;SB;L53\r\nP;ECalibri;M220;L53\r\nP;ECalibri;M220;SB;L10\r\nP;ECalibri;M220;L11\r\nP;ECalibri;M220;SI;L24\r\nP;ECalibri;M220;SB;L9\r\nP;ECalibri;M220;L10\r\nP;ESegoe UI;M200;L9\r\nF;P0;DG0G8;M320\r\nB;Y6;X5;D0 0 5 4\r\nO;D;V0;K47;G100 0.001\r\nF;W1 16384 10\r\nC;Y1;X1;K1\r\nC;X2;K10\r\nC;X3;K100\r\nC;X4;K101\r\nC;X5;K102\r\nC;Y2;X1;K2;ER[-1]C+1\r\nC;X2;K11;ER[-1]C+1\r\nC;X3;K101;S;R2;C1\r\nC;X4;K102;S;R2;C1\r\nC;X5;K103;S;R2;C1\r\nC;Y3;X1;K3;S;R2;C1\r\nC;X2;K12;ER[-1]C+1\r\nC;X3;K102;S;R2;C1\r\nC;X4;K103;S;R2;C1\r\nC;X5;K104;S;R2;C1\r\nC;Y4;X1;K4;S;R2;C1\r\nC;X2;K13;ER[-1]C+1\r\nC;X3;K103;S;R2;C1\r\nC;X4;K104;S;R2;C1\r\nC;X5;K105;S;R2;C1\r\nC;Y5;X1;K5;S;R2;C1\r\nC;X2;K14;ER[-1]C+1\r\nC;X3;K104;S;R2;C1\r\nC;X4;K105;S;R2;C1\r\nC;X5;K106;S;R2;C1\r\nE\r\n"
  },
  {
    "path": "tests/data/Reader/Slk/issue.2276.slk",
    "content": "ID;PWXL;N;E\r\nP;PGeneral\r\nF;P0;DG0G10;M320\r\nB;Y3;X1;D0 0 9 0\r\nC;Y1;X1;AZeratul:\u001b :En Taro Adun!\r\nC;Y2;X2;AArthas:\u001b :Frostmourne Hungers.\r\nC;Y1;X1;K1\r\nC;Y1;X2;K2\r\nC;Y2;X1;K3\r\nE\r\n"
  },
  {
    "path": "tests/data/Reader/Slk/issue.3658.slk",
    "content": "ID;PWXL;N;E\r\nP;PGeneral\r\nP;P0\r\nP;P0.00\r\nP;P#,##0\r\nP;P#,##0.00\r\nP;P#,##0_);;\\(#,##0\\)\r\nP;P#,##0_);;[Red]\\(#,##0\\)\r\nP;P#,##0.00_);;\\(#,##0.00\\)\r\nP;P#,##0.00_);;[Red]\\(#,##0.00\\)\r\nP;P\"$\"#,##0_);;\\(\"$\"#,##0\\)\r\nP;P\"$\"#,##0_);;[Red]\\(\"$\"#,##0\\)\r\nP;P\"$\"#,##0.00_);;\\(\"$\"#,##0.00\\)\r\nP;P\"$\"#,##0.00_);;[Red]\\(\"$\"#,##0.00\\)\r\nP;P0%\r\nP;P0.00%\r\nP;P0.00E+00\r\nP;P##0.0E+0\r\nP;P#\\ ?/?\r\nP;P#\\ ??/??\r\nP;Pyyyy/mm/dd\r\nP;Pdd/mmm/yy\r\nP;Pdd/mmm\r\nP;Pmmm/yy\r\nP;Ph:mm\\ AM/PM\r\nP;Ph:mm:ss\\ AM/PM\r\nP;Ph:mm\r\nP;Ph:mm:ss\r\nP;Pyyyy/mm/dd\\ h:mm\r\nP;Pmm:ss\r\nP;Pmm:ss.0\r\nP;P@\r\nP;P[h]:mm:ss\r\nP;P_(\"$\"* #,##0_);;_(\"$\"* \\(#,##0\\);;_(\"$\"* \"-\"_);;_(@_)\r\nP;P_(* #,##0_);;_(* \\(#,##0\\);;_(* \"-\"_);;_(@_)\r\nP;P_(\"$\"* #,##0.00_);;_(\"$\"* \\(#,##0.00\\);;_(\"$\"* \"-\"??_);;_(@_)\r\nP;P_(* #,##0.00_);;_(* \\(#,##0.00\\);;_(* \"-\"??_);;_(@_)\r\nP;FCalibri;M220;L9\r\nP;FCalibri;M220;L9\r\nP;FCalibri;M220;L9\r\nP;FCalibri;M220;L9\r\nP;ECalibri;M220;L9\r\nP;ECalibri Light;M360;L55\r\nP;ECalibri;M300;SB;L55\r\nP;ECalibri;M260;SB;L55\r\nP;ECalibri;M220;SB;L55\r\nP;ECalibri;M220;L18\r\nP;ECalibri;M220;L21\r\nP;ECalibri;M220;L61\r\nP;ECalibri;M220;L63\r\nP;ECalibri;M220;SB;L64\r\nP;ECalibri;M220;SB;L53\r\nP;ECalibri;M220;L53\r\nP;ECalibri;M220;SB;L10\r\nP;ECalibri;M220;L11\r\nP;ECalibri;M220;SI;L24\r\nP;ECalibri;M220;SB;L9\r\nP;ECalibri;M220;L10\r\nP;ECalibri;M220;L9\r\nP;ECalibri Light;M360;L55\r\nP;ECalibri;M300;SB;L55\r\nP;ECalibri;M260;SB;L55\r\nP;ECalibri;M220;SB;L55\r\nP;ECalibri;M220;L18\r\nP;ECalibri;M220;L21\r\nP;ECalibri;M220;L61\r\nP;ECalibri;M220;L63\r\nP;ECalibri;M220;SB;L64\r\nP;ECalibri;M220;SB;L53\r\nP;ECalibri;M220;L53\r\nP;ECalibri;M220;SB;L10\r\nP;ECalibri;M220;L11\r\nP;ECalibri;M220;SI;L24\r\nP;ECalibri;M220;SB;L9\r\nP;ECalibri;M220;L10\r\nP;ESegoe UI;M200;L9\r\nP;ECalibri;M220;L9\r\nF;P0;DG0G8;M290\r\nB;Y4;X1;D0 0 3 0\r\nO;L;D;V0;G100 0.001\r\nC;Y1;X1;K123\r\nC;Y2;K124;ER[-1]C+1\r\nC;Y3;K\"00123\";E\"00\"&R[-2]C\r\nC;Y4;K\"pcdos\";EINFO(\"SYSTEM\")\r\nE\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/ArrayFormula.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Author>Owen Leibman</Author>\r\n  <LastAuthor>Owen Leibman</LastAuthor>\r\n  <Created>2024-06-17T19:03:14Z</Created>\r\n  <LastSaved>2024-06-17T19:04:33Z</LastSaved>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>10300</WindowHeight>\r\n  <WindowWidth>19420</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Aptos Narrow\" x:Family=\"Swiss\" ss:Size=\"11\"\r\n    ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Sheet1\">\r\n  <Table ss:ExpandedColumnCount=\"3\" ss:ExpandedRowCount=\"3\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row>\r\n    <Cell><Data ss:Type=\"String\">a</Data></Cell>\r\n    <Cell ss:ArrayRange=\"RC:R[2]C\"\r\n     ss:Formula=\"=CONCATENATE(RC[-1]:R[2]C[-1],&quot;-&quot;,RC[1]:R[2]C[1])\"><Data\r\n      ss:Type=\"String\">a-1</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">1</Data></Cell>\r\n   </Row>\r\n   <Row>\r\n    <Cell><Data ss:Type=\"String\">b</Data></Cell>\r\n    <Cell><Data ss:Type=\"String\">b-2</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">2</Data></Cell>\r\n   </Row>\r\n   <Row>\r\n    <Cell><Data ss:Type=\"String\">c</Data></Cell>\r\n    <Cell><Data ss:Type=\"String\">c-3</Data></Cell>\r\n    <Cell><Data ss:Type=\"Number\">3</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Selected/>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveCol>2</ActiveCol>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/CorruptedXmlFile.xml",
    "content": "<?xml version=\"1.0\"?>\n<?mso-application progid=\"Excel.Sheet\"?>\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n          xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n          xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n          xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n          xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n    <CORRUPTED DATA>\n</Workbook>\n"
  },
  {
    "path": "tests/data/Reader/Xml/PageSetup.xml",
    "content": "<?xml version=\"1.0\"?>\n<?mso-application progid=\"Excel.Sheet\"?>\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n  <Author>Mark Baker</Author>\n  <LastAuthor>Mark Baker</LastAuthor>\n  <LastPrinted>2020-07-04T11:51:41Z</LastPrinted>\n  <Created>2020-06-29T17:37:00Z</Created>\n  <LastSaved>2020-07-04T11:52:32Z</LastSaved>\n  <Version>16.00</Version>\n </DocumentProperties>\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\n  <AllowPNG/>\n </OfficeDocumentSettings>\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n  <WindowHeight>13170</WindowHeight>\n  <WindowWidth>21600</WindowWidth>\n  <WindowTopX>2145</WindowTopX>\n  <WindowTopY>2145</WindowTopY>\n  <ProtectStructure>False</ProtectStructure>\n  <ProtectWindows>False</ProtectWindows>\n </ExcelWorkbook>\n <Styles>\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n   <Alignment ss:Vertical=\"Bottom\"/>\n   <Borders/>\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\n   <Interior/>\n   <NumberFormat/>\n   <Protection/>\n  </Style>\n </Styles>\n <Worksheet ss:Name=\"Sheet1\">\n  <Table ss:ExpandedColumnCount=\"3\" ss:ExpandedRowCount=\"5\" x:FullColumns=\"1\"\n   x:FullRows=\"1\" ss:DefaultColumnWidth=\"51\" ss:DefaultRowHeight=\"14.25\">\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">1</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">2</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">3</Data></Cell>\n   </Row>\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">4</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">5</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">6</Data></Cell>\n   </Row>\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">7</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">8</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">9</Data></Cell>\n   </Row>\n   <Row ss:Index=\"5\" ss:AutoFitHeight=\"0\">\n    <Cell ss:Formula=\"=SUM(R[-3]C:R[-3]C[2],R[-4]C[1]:R[-2]C[1])\"><Data\n      ss:Type=\"Number\">30</Data></Cell>\n    <Cell ss:Formula=\"=COUNT(R[-3]C[-1]:R[-3]C[1],R[-4]C:R[-2]C)\"><Data\n      ss:Type=\"Number\">6</Data></Cell>\n   </Row>\n  </Table>\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n   <PageSetup>\n    <Layout x:CenterHorizontal=\"1\"/>\n    <Header x:Margin=\"0.31496062992125984\"/>\n    <Footer x:Margin=\"0.31496062992125984\"/>\n    <PageMargins x:Bottom=\"0.74803149606299213\" x:Left=\"0.51181102362204722\"\n     x:Right=\"0.51181102362204722\" x:Top=\"0.94488188976377963\"/>\n   </PageSetup>\n   <Unsynced/>\n   <Print>\n    <ValidPrinterInfo/>\n    <PaperSizeIndex>9</PaperSizeIndex>\n    <Scale>75</Scale>\n    <VerticalResolution>0</VerticalResolution>\n   </Print>\n   <Selected/>\n   <Panes>\n    <Pane>\n     <Number>3</Number>\n     <RangeSelection>R1C1:R5C3</RangeSelection>\n    </Pane>\n   </Panes>\n   <ProtectObjects>False</ProtectObjects>\n   <ProtectScenarios>False</ProtectScenarios>\n  </WorksheetOptions>\n </Worksheet>\n <Worksheet ss:Name=\"Sheet2\">\n  <Table ss:ExpandedColumnCount=\"3\" ss:ExpandedRowCount=\"5\" x:FullColumns=\"1\"\n   x:FullRows=\"1\" ss:DefaultColumnWidth=\"51\" ss:DefaultRowHeight=\"14.25\">\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">1</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">2</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">3</Data></Cell>\n   </Row>\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">4</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">5</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">6</Data></Cell>\n   </Row>\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">7</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">8</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">9</Data></Cell>\n   </Row>\n   <Row ss:Index=\"5\" ss:AutoFitHeight=\"0\">\n    <Cell ss:Formula=\"=SUM(R1C1:R1C3,R3C1:R3C3,R1C1:R3C1,R1C3:R3C3)\"><Data\n      ss:Type=\"Number\">60</Data></Cell>\n    <Cell ss:Formula=\"=COUNT(R1C1:R1C3,R3C1:R3C3,R1C1:R3C1,R1C3:R3C3)\"><Data\n      ss:Type=\"Number\">12</Data></Cell>\n   </Row>\n  </Table>\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n   <PageSetup>\n    <Layout x:Orientation=\"Landscape\" x:CenterVertical=\"1\"/>\n    <Header x:Margin=\"0.31496062992125984\"/>\n    <Footer x:Margin=\"0.31496062992125984\"/>\n    <PageMargins x:Bottom=\"0.74803149606299213\" x:Left=\"0.70866141732283472\"\n     x:Right=\"0.70866141732283472\" x:Top=\"0.74803149606299213\"/>\n   </PageSetup>\n   <Unsynced/>\n   <Print>\n    <LeftToRight/>\n    <ValidPrinterInfo/>\n    <PaperSizeIndex>9</PaperSizeIndex>\n    <VerticalResolution>0</VerticalResolution>\n   </Print>\n   <Panes>\n    <Pane>\n     <Number>3</Number>\n     <RangeSelection>R1C1:R5C3</RangeSelection>\n    </Pane>\n   </Panes>\n   <ProtectObjects>False</ProtectObjects>\n   <ProtectScenarios>False</ProtectScenarios>\n  </WorksheetOptions>\n </Worksheet>\n <Worksheet ss:Name=\"Sheet3\">\n  <Names>\n   <NamedRange ss:Name=\"Print_Area\" ss:RefersTo=\"=Sheet3!R1C1:R5C3\"/>\n  </Names>\n  <Table ss:ExpandedColumnCount=\"3\" ss:ExpandedRowCount=\"5\" x:FullColumns=\"1\"\n   x:FullRows=\"1\" ss:DefaultColumnWidth=\"51\" ss:DefaultRowHeight=\"14.25\">\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">1</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n    <Cell><Data ss:Type=\"Number\">2</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n    <Cell><Data ss:Type=\"Number\">3</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n   </Row>\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">4</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n    <Cell><Data ss:Type=\"Number\">5</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n    <Cell><Data ss:Type=\"Number\">6</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n   </Row>\n   <Row ss:AutoFitHeight=\"0\">\n    <Cell><Data ss:Type=\"Number\">7</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n    <Cell><Data ss:Type=\"Number\">8</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n    <Cell><Data ss:Type=\"Number\">9</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n   </Row>\n   <Row ss:Index=\"5\" ss:AutoFitHeight=\"0\">\n    <Cell ss:Formula=\"=SUM(R1C1:R1C3,R3C1:R3C3,R1C1:R3C1,R1C3:R3C3)\"><Data\n      ss:Type=\"Number\">60</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n    <Cell ss:Formula=\"=COUNT(R1C1:R1C3,R3C1:R3C3,R1C1:R3C1,R1C3:R3C3)\"><Data\n      ss:Type=\"Number\">12</Data><NamedCell ss:Name=\"Print_Area\"/></Cell>\n   </Row>\n  </Table>\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n   <PageSetup>\n    <Layout x:CenterHorizontal=\"1\" x:CenterVertical=\"1\"/>\n    <Header x:Margin=\"0.51181102362204722\"/>\n    <Footer x:Margin=\"0.51181102362204722\"/>\n    <PageMargins x:Bottom=\"0.94488188976377963\" x:Left=\"0.70866141732283472\"\n     x:Right=\"0.70866141732283472\" x:Top=\"0.94488188976377963\"/>\n   </PageSetup>\n   <Unsynced/>\n   <Print>\n    <ValidPrinterInfo/>\n    <PaperSizeIndex>9</PaperSizeIndex>\n    <Scale>90</Scale>\n    <VerticalResolution>0</VerticalResolution>\n   </Print>\n   <FreezePanes/>\n   <FrozenNoSplit/>\n   <SplitHorizontal>1</SplitHorizontal>\n   <TopRowBottomPane>1</TopRowBottomPane>\n   <SplitVertical>1</SplitVertical>\n   <LeftColumnRightPane>1</LeftColumnRightPane>\n   <ActivePane>0</ActivePane>\n   <Panes>\n    <Pane>\n     <Number>3</Number>\n    </Pane>\n    <Pane>\n     <Number>1</Number>\n    </Pane>\n    <Pane>\n     <Number>2</Number>\n    </Pane>\n    <Pane>\n     <Number>0</Number>\n     <ActiveRow>0</ActiveRow>\n     <ActiveCol>0</ActiveCol>\n     <RangeSelection>R1C1:R5C3</RangeSelection>\n    </Pane>\n   </Panes>\n   <ProtectObjects>False</ProtectObjects>\n   <ProtectScenarios>False</ProtectScenarios>\n  </WorksheetOptions>\n </Worksheet>\n <Worksheet ss:Name=\"Sheet4\">\n  <Table ss:ExpandedColumnCount=\"3\" ss:ExpandedRowCount=\"5\" x:FullColumns=\"1\"\n   x:FullRows=\"1\" ss:DefaultColumnWidth=\"51\" ss:DefaultRowHeight=\"14.25\">\n   <Row>\n    <Cell><Data ss:Type=\"Number\">1</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">2</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">3</Data></Cell>\n   </Row>\n   <Row>\n    <Cell><Data ss:Type=\"Number\">4</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">5</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">6</Data></Cell>\n   </Row>\n   <Row>\n    <Cell><Data ss:Type=\"Number\">7</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">8</Data></Cell>\n    <Cell><Data ss:Type=\"Number\">9</Data></Cell>\n   </Row>\n   <Row ss:Index=\"5\">\n    <Cell ss:Formula=\"=SUM(R1C1:R1C3,R3C1:R3C3,R1C1:R3C1,R1C3:R3C3)\"><Data\n      ss:Type=\"Number\">60</Data></Cell>\n    <Cell ss:Formula=\"=COUNT(R1C1:R1C3,R3C1:R3C3,R1C1:R3C1,R1C3:R3C3)\"><Data\n      ss:Type=\"Number\">12</Data></Cell>\n   </Row>\n  </Table>\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n   <PageSetup>\n    <Header x:Margin=\"0.3\"/>\n    <Footer x:Margin=\"0.3\"/>\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\n   </PageSetup>\n   <Panes>\n    <Pane>\n     <Number>3</Number>\n     <RangeSelection>R1C1:R5C3</RangeSelection>\n    </Pane>\n   </Panes>\n   <ProtectObjects>False</ProtectObjects>\n   <ProtectScenarios>False</ProtectScenarios>\n  </WorksheetOptions>\n </Worksheet>\n</Workbook>\n"
  },
  {
    "path": "tests/data/Reader/Xml/SecurityScannerWithCallbackExample.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<note>\n    <to>Users</to>\n    <from>Mark</from>\n    <heading>Reminder</heading>\n    <body>Don't forget PHPSpreadsheet Security!</body>\n</note>\n"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestInvalidSimpleXML.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<root>\n\t<data>R&d</data>\n\t<data>R<d</data>\n\t<data>R>d</data>\n\t<data>R'd</data>\n\t<data>R\"d</data>\n</root>\n"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestInvalidUTF-7-single-quote.xml",
    "content": "<?xml version=\"1.0\" encoding='UTF-7' standalone=\"yes\"?>\n    +ADw-+ACE-DOCTYPE+ACA-foo+ACA-+AFs-+ADw-+ACE-ENTITY+ACA-toreplace+ACA-+ACI-xxe+AF8-test+ACI-+AD4-+ACA-+AF0-+AD4-+AAo-+ADw-sst+ACA-xmlns+AD0-+ACI-http://schemas.openxmlformats.org/spreadsheetml/2006/main+ACI-+ACA-count+AD0-+ACI-2+ACI-+ACA-uniqueCount+AD0-+ACI-1+ACI-+AD4-+ADw-si+AD4-+ADw-t+AD4-+ACY-toreplace+ADs-+ADw-/t+AD4-+ADw-/si+AD4-+ADw-/sst+AD4-\n"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestInvalidUTF-7-whitespace.xml",
    "content": "<?xml version=\"1.0\" encoding ='UTF-7' standalone=\"yes\"?>\n    +ADw-+ACE-DOCTYPE+ACA-foo+ACA-+AFs-+ADw-+ACE-ENTITY+ACA-toreplace+ACA-+ACI-xxe+AF8-test+ACI-+AD4-+ACA-+AF0-+AD4-+AAo-+ADw-sst+ACA-xmlns+AD0-+ACI-http://schemas.openxmlformats.org/spreadsheetml/2006/main+ACI-+ACA-count+AD0-+ACI-2+ACI-+ACA-uniqueCount+AD0-+ACI-1+ACI-+AD4-+ADw-si+AD4-+ADw-t+AD4-+ACY-toreplace+ADs-+ADw-/t+AD4-+ADw-/si+AD4-+ADw-/sst+AD4-\n"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestInvalidUTF-7.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-7\"?>\n+ADwAIQ-DOCTYPE xmlrootname +AFsAPAAh-ENTITY +ACU aaa SYSTEM +ACI-http://127.0.0.1:8080/ext.dtd+ACIAPgAl-aaa+ADsAJQ-ccc+ADsAJQ-ddd+ADsAXQA+"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestInvalidUTF-7_DoubleEncoded.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-7\"?>\n+-ADwAIQ-DOCTYPE xmlrootname +-AFsAPAAh-+AEU-NTITY +-ACU aaa SYSTEM +-ACI-http://127.0.0.1:8080/ext.dtd+-ACIAPgAl-aaa+-ADsAJQ-ccc+-ADsAJQ-ddd+-ADsAXQA+-\n"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestInvalidUTF-8.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<!DOCTYPE root [\n     <!ENTITY x0 \"DoS\">\n]>\n\n<root>\n\ttest: (&x0;)\n</root>"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestValidUTF-8-single-quote.xml",
    "content": "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n<root>\n\ttest: Valid\n</root>\n"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestValidUTF-8-whitespace.xml",
    "content": "<?xml version='1.0' encoding = \"UTF-8\" standalone='yes'?>\n<root>\n\ttest: Valid\n</root>\n"
  },
  {
    "path": "tests/data/Reader/Xml/XEETestValidUTF-8.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<root>\n\ttest: Valid\n</root>"
  },
  {
    "path": "tests/data/Reader/Xml/bug4669.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:html=\"http://www.w3.org/TR/REC-html40\" xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\">\n  <Styles>\n    <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n      <Alignment ss:Vertical=\"Bottom\"/>\n      <Borders/>\n      <Font ss:FontName=\"Verdana\"/>\n      <Interior/>\n      <NumberFormat/>\n      <Protection/>\n    </Style>\n    <Style ss:ID=\"s22\">\n      <NumberFormat ss:Format=\"General Date\"/>\n    </Style>\n    <Style ss:ID=\"s66\">\n      <NumberFormat ss:Format=\"Fixed\"/>\n    </Style>\n  </Styles>\n  <Worksheet ss:Name=\"stats by transaction_notes\">\n    <Table>\n      <Row>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Report Date</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Trx Date</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Merchant</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Terminal</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Report Type</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Transition</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Report Message</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Report Info</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Status</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Merchant Transaction ID</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Unique ID</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Reference Transaction ID</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Reference Transaction Type</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Currency</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Amount (in minor currency unit)</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Card Holder</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Card Brand</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Card Number</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Email</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Country</Data>\n        </Cell>\n        <Cell ss:StyleID=\"Default\">\n          <Data ss:Type=\"String\">Remote IP</Data>\n        </Cell>\n      </Row>\n    </Table>\n  </Worksheet>\n</Workbook>\n"
  },
  {
    "path": "tests/data/Reader/Xml/datavalidations.wholerow.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Title>Untitled Spreadsheet</Title>\r\n  <Author>Unknown Creator</Author>\r\n  <LastAuthor>Owen Leibman</LastAuthor>\r\n  <Created>2024-12-30T08:21:15Z</Created>\r\n  <LastSaved>2024-12-30T08:21:15Z</LastSaved>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>6510</WindowHeight>\r\n  <WindowWidth>19200</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Worksheet\">\r\n  <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"1\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\"/>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <Print>\r\n    <ValidPrinterInfo/>\r\n    <NoOrientation/>\r\n    <HorizontalResolution>600</HorizontalResolution>\r\n    <VerticalResolution>600</VerticalResolution>\r\n   </Print>\r\n   <Selected/>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R1</Range>\r\n   <Type>List</Type>\r\n   <UseBlank/>\r\n   <CellRangeList/>\r\n   <Value>&quot;Item A,Item B,Item C&quot;</Value>\r\n   <InputHide/>\r\n   <ErrorMessage>Value is not a member of allowed list</ErrorMessage>\r\n   <ErrorTitle>Input Error</ErrorTitle>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R1C1</Range>\r\n   <Type>List</Type>\r\n   <UseBlank/>\r\n   <CellRangeList/>\r\n   <Value>&quot;Item A,Item B,Item D&quot;</Value>\r\n   <InputHide/>\r\n   <ComboHide/>\r\n   <ErrorHide/>\r\n   <ErrorStyle>Warn</ErrorStyle>\r\n   <ErrorMessage>Value is not a member of allowed list</ErrorMessage>\r\n   <ErrorTitle>Input Error</ErrorTitle>\r\n  </DataValidation>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/datavalidations.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <LastAuthor>Owen Leibman</LastAuthor>\r\n  <Created>2023-05-31T15:52:55Z</Created>\r\n  <LastSaved>2023-06-02T02:15:24Z</LastSaved>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <CustomDocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Enabled dt:dt=\"string\">true</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Enabled>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SetDate dt:dt=\"string\">2023-06-02T02:15:24Z</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SetDate>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Method dt:dt=\"string\">Standard</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Method>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Name dt:dt=\"string\">defa4170-0d19-0005-0004-bc88714345d2</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Name>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SiteId dt:dt=\"string\">f9465cb1-7889-4d9a-b552-fdd0addf0eb1</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SiteId>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ActionId dt:dt=\"string\">a9441577-fd50-4686-b29c-06250a20f19e</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ActionId>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ContentBits dt:dt=\"string\">0</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ContentBits>\r\n </CustomDocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>6780</WindowHeight>\r\n  <WindowWidth>19160</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Tabelle1\">\r\n  <Table ss:ExpandedColumnCount=\"5\" ss:ExpandedRowCount=\"6\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Column ss:Index=\"2\" ss:Width=\"120.5\"/>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"2\"><Data ss:Type=\"String\">decimal numbers below:</Data></Cell>\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"String\">a</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"String\">bb</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"String\">ccc</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"String\">dddd</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"String\">eeeee</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"String\">ffffff</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Unsynced/>\r\n   <Selected/>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>1</ActiveRow>\r\n     <ActiveCol>2</ActiveCol>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>C1</Range>\r\n   <Type>Whole</Type>\r\n   <Min>1</Min>\r\n   <Max>9</Max>\r\n   <InputTitle>Enter a digit</InputTitle>\r\n   <InputMessage>Please enter a single digit from 1 to 9</InputMessage>\r\n   <ErrorMessage>Sorry, only digits from 1 to 9 are allowed</ErrorMessage>\r\n   <ErrorTitle>Wrong number</ErrorTitle>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R2C2:R1048576C2</Range>\r\n   <Type>Decimal</Type>\r\n   <Qualifier>Greater</Qualifier>\r\n   <Value>10</Value>\r\n   <InputMessage>Decimal number bigger than 10</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R1C2</Range>\r\n   <Qualifier>Greater</Qualifier>\r\n   <InputHide/>\r\n   <InputMessage>Decimal number bigger than 10</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R1C3</Range>\r\n   <Type>Date</Type>\r\n   <Qualifier>GreaterOrEqual</Qualifier>\r\n   <Value>44927</Value>\r\n   <InputMessage>date from 2023-01-01</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R2C3</Range>\r\n   <Type>Time</Type>\r\n   <Min>0.333333333333333</Min>\r\n   <Max>0.583333333333333</Max>\r\n   <InputMessage>time from 8:00 to 14:00</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R3C3</Range>\r\n   <Type>TextLength</Type>\r\n   <Qualifier>Less</Qualifier>\r\n   <Value>8</Value>\r\n   <InputMessage>text &lt; 8 characters</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R4C3</Range>\r\n   <Type>List</Type>\r\n   <UseBlank/>\r\n   <CellRangeList/>\r\n   <Value>&quot;a,b,c,d,e&quot;</Value>\r\n   <InputMessage>letters a to e</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R1C4</Range>\r\n   <Type>Whole</Type>\r\n   <Min>1+1</Min>\r\n   <Max>2+2</Max>\r\n   <InputMessage>integer from 2 to 4</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R2C4</Range>\r\n   <Type>List</Type>\r\n   <Value>R[-1]C[1]:R[3]C[1]</Value>\r\n   <InputMessage>any of the texts in E1:E5</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R7C6</Range>\r\n   <Type>Whole</Type>\r\n   <Qualifier>GreaterOrEqual</Qualifier>\r\n   <Value>-6</Value>\r\n   <InputMessage>Integer greater than or equal to -6</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R6C6</Range>\r\n   <Type>Whole</Type>\r\n   <Qualifier>LessOrEqual</Qualifier>\r\n   <Value>12</Value>\r\n   <InputMessage>Integer less than or equal to 12</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R5C6</Range>\r\n   <Type>Whole</Type>\r\n   <Qualifier>Less</Qualifier>\r\n   <Value>8</Value>\r\n   <InputMessage>Integer less than 8</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R4C6</Range>\r\n   <Type>Whole</Type>\r\n   <Qualifier>Equal</Qualifier>\r\n   <Value>-3</Value>\r\n   <InputMessage>Negative 3 is only valid input</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R3C6</Range>\r\n   <Type>Whole</Type>\r\n   <Qualifier>NotEqual</Qualifier>\r\n   <Value>7</Value>\r\n   <InputMessage>Any integer except 7</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R2C6</Range>\r\n   <Type>Whole</Type>\r\n   <Qualifier>NotBetween</Qualifier>\r\n   <Min>-5</Min>\r\n   <Max>5</Max>\r\n   <InputMessage>Integer not between -5 and 5</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R1C6</Range>\r\n   <Type>Whole</Type>\r\n   <Min>2</Min>\r\n   <Max>5</Max>\r\n   <InputMessage>Integer between 2 and 5</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R8C6</Range>\r\n   <Type>Whole</Type>\r\n   <Qualifier>Greater</Qualifier>\r\n   <Value>5</Value>\r\n   <InputMessage>Integer greater than 5</InputMessage>\r\n  </DataValidation>\r\n  <DataValidation xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Range>R1C7</Range>\r\n   <Type>Decimal</Type>\r\n   <Min>2</Min>\r\n   <Max>5</Max>\r\n   <InputMessage>Float between 2 and 5</InputMessage>\r\n  </DataValidation>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/excel2003.iso8859-1.xml",
    "content": "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Author>Owen Leibman</Author>\r\n  <LastAuthor>Owen Leibman</LastAuthor>\r\n  <Created>2020-06-20T18:12:18Z</Created>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>8964</WindowHeight>\r\n  <WindowWidth>23040</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n  <Style ss:ID=\"s62\" ss:Name=\"Hyperlink\">\r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#0563C1\"\r\n    ss:Underline=\"Single\"/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Sheet1\">\r\n  <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"2\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.4\">\r\n   <Row>\r\n    <Cell><Data ss:Type=\"String\">Voil</Data></Cell>\r\n   </Row>\r\n   <Row>\r\n    <Cell ss:StyleID=\"s62\" ss:HRef=\"https://phpspreadsheet.readthedocs.io\"><Data\r\n      ss:Type=\"String\">PhpSpreadsheet</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Selected/>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>2</ActiveRow>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/hyperlinkbase.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Title>title</Title>\r\n  <Subject>topic</Subject>\r\n  <Author>author</Author>\r\n  <Keywords>keyword1, keyword2</Keywords>\r\n  <Description>no comment</Description>\r\n  <LastAuthor>last author</LastAuthor>\r\n  <Created>2023-05-18T11:21:43Z</Created>\r\n  <LastSaved>2023-05-18T11:30:00Z</LastSaved>\r\n  <Category>category</Category>\r\n  <Manager>manager</Manager>\r\n  <Company>company</Company>\r\n  <HyperlinkBase>https://phpspreadsheet.readthedocs.io/en/latest/</HyperlinkBase>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <CustomDocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <StringProperty dt:dt=\"string\">TheString</StringProperty>\r\n  <NumberProperty dt:dt=\"integer\">12345</NumberProperty>\r\n  <DateProperty dt:dt=\"dateTime.tz\">2023-05-18T10:00:00Z</DateProperty>\r\n  <DateProperty2 dt:dt=\"dateTime.iso8601tz\">2023-05-19T11:00:00Z</DateProperty2>\r\n  <BooleanPropertyTrue dt:dt=\"boolean\">1</BooleanPropertyTrue>\r\n  <BooleanPropertyFalse dt:dt=\"boolean\">0</BooleanPropertyFalse>\r\n  <FloatProperty dt:dt=\"float\">1.2345</FloatProperty>\r\n </CustomDocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>6820</WindowHeight>\r\n  <WindowWidth>19200</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n  <Style ss:ID=\"s62\" ss:Name=\"Hyperlink\">\r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#0066CC\"\r\n    ss:Underline=\"Single\"/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Tabelle1\">\r\n  <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"4\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:StyleID=\"s62\" ss:HRef=\"references/features-cross-reference/\"><Data\r\n      ss:Type=\"String\">references/features-cross-reference/</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:StyleID=\"s62\" ss:Formula=\"=HYPERLINK(&quot;topics/accessing-cells/&quot;)\"\r\n     ss:HRef=\"topics/accessing-cells/topics/accessing-cells/topics/accessing-cells/topics/accessing-cells/\"><Data\r\n      ss:Type=\"String\">topics/accessing-cells/</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:StyleID=\"s62\" ss:HRef=\"https://www.google.com/\"><Data ss:Type=\"String\">https://www.google.com</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:StyleID=\"s62\" ss:Formula=\"=HYPERLINK(&quot;https://www.yahoo.com&quot;)\"\r\n     ss:HRef=\"https://www.yahoo.com/\"><Data ss:Type=\"String\">https://www.yahoo.com</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <Unsynced/>\r\n   <Selected/>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>3</ActiveRow>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/issue.2157.small.xml",
    "content": "\t\t\t\t\t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n<Worksheet ss:Name=\"ProductsAPIData\">\n<Table>\n<Row>\n<Cell><Data ss:Type=\"String\">id</Data></Cell>\n<Cell><Data ss:Type=\"String\">isbn</Data></Cell>\n<Cell><Data ss:Type=\"String\">barcode</Data></Cell>\n<Cell><Data ss:Type=\"String\">url</Data></Cell>\n<Cell><Data ss:Type=\"String\">title</Data></Cell>\n<Cell><Data ss:Type=\"String\">short_description</Data></Cell>\n<Cell><Data ss:Type=\"String\">description</Data></Cell>\n<Cell><Data ss:Type=\"String\">category</Data></Cell>\n<Cell><Data ss:Type=\"String\">weight</Data></Cell>\n<Cell><Data ss:Type=\"String\">pages</Data></Cell>\n<Cell><Data ss:Type=\"String\">publication_date</Data></Cell>\n<Cell><Data ss:Type=\"String\">3d_photo</Data></Cell>\n<Cell><Data ss:Type=\"String\">photo</Data></Cell>\n<Cell><Data ss:Type=\"String\">pdf_preview</Data></Cell>\n<Cell><Data ss:Type=\"String\">flipping_book</Data></Cell>\n<Cell><Data ss:Type=\"String\">offer</Data></Cell>\n<Cell><Data ss:Type=\"String\">active</Data></Cell>\n<Cell><Data ss:Type=\"String\">availability</Data></Cell>\n<Cell><Data ss:Type=\"String\">size</Data></Cell>\n<Cell><Data ss:Type=\"String\">country</Data></Cell>\n<Cell><Data ss:Type=\"String\">subject</Data></Cell>\n<Cell><Data ss:Type=\"String\">retail_price</Data></Cell>\n<Cell><Data ss:Type=\"String\">wholesale_price</Data></Cell>\n<Cell><Data ss:Type=\"String\">ebook-isbn</Data></Cell>\n<Cell><Data ss:Type=\"String\">ebook-barcode</Data></Cell>\n<Cell><Data ss:Type=\"String\">ebook-retail_price</Data></Cell>\n<Cell><Data ss:Type=\"String\">ebook-wholesale_price</Data></Cell>\n<Cell><Data ss:Type=\"String\">ebook-urn</Data></Cell>\n<Cell><Data ss:Type=\"String\">ebook-drm</Data></Cell>\n<Cell><Data ss:Type=\"String\">ebook-format</Data></Cell>\n<Cell><Data ss:Type=\"String\">ebook-active</Data></Cell>\n<Cell><Data ss:Type=\"String\">author1-name</Data></Cell>\n<Cell><Data ss:Type=\"String\">author1-url</Data></Cell>\n<Cell><Data ss:Type=\"String\">author1-photo</Data></Cell>\n<Cell><Data ss:Type=\"String\">author1-description</Data></Cell>\n<Cell><Data ss:Type=\"String\">author1-link</Data></Cell>\n<Cell><Data ss:Type=\"String\">author2-name</Data></Cell>\n<Cell><Data ss:Type=\"String\">author2-url</Data></Cell>\n<Cell><Data ss:Type=\"String\">author2-photo</Data></Cell>\n<Cell><Data ss:Type=\"String\">author2-description</Data></Cell>\n<Cell><Data ss:Type=\"String\">author2-link</Data></Cell>\n<Cell><Data ss:Type=\"String\">translator-name</Data></Cell>\n<Cell><Data ss:Type=\"String\">translator-photo</Data></Cell>\n<Cell><Data ss:Type=\"String\">translator-description</Data></Cell>\n<Cell><Data ss:Type=\"String\">editor-name</Data></Cell>\n<Cell><Data ss:Type=\"String\">editor-photo</Data></Cell>\n<Cell><Data ss:Type=\"String\">editor-description</Data></Cell>\n</Row>\n<Row>\n<Cell><Data ss:Type=\"String\">2</Data></Cell>\n<Cell><Data ss:Type=\"String\">978-960-364-004-2</Data></Cell>\n<Cell><Data ss:Type=\"String\">9789603640042</Data></Cell>\n<Cell><Data ss:Type=\"String\">https://www.dioptra.gr/vivlio/ygeia-diatrofi/teleia-orasi-xoris-gualia/</Data></Cell>\n<Cell><Data ss:Type=\"String\">&Tau;έ&lambda;&epsilon;&iota;&alpha; ό&rho;&alpha;&sigma;&eta; &chi;&omega;&rho;ί&sigmaf; &gamma;&upsilon;&alpha;&lambda;&iota;ά</Data></Cell>\n<Cell><Data ss:Type=\"String\">&Mu;&epsilon; &tau;&eta; &mu;έ&theta;&omicron;&delta;&omicron; Bates &beta;&epsilon;&lambda;&tau;&iota;ώ&nu;&omicron;&upsilon;&mu;&epsilon; &tau;&eta;&nu; ό&rho;&alpha;&sigma;ή &mu;&alpha;&sigmaf; ή &pi;&rho;&omicron;&lambda;&alpha;&mu;&beta;ά&nu;&omicron;&upsilon;&mu;&epsilon; &tau;&alpha; &pi;&rho;&omicron;&beta;&lambda;ή&mu;&alpha;&tau;&alpha; &tau;&omicron;&upsilon; &pi;&iota;&omicron; &epsilon;&upsilon;&alpha;ί&sigma;&theta;&eta;&tau;&omicron;&upsilon; &omicron;&rho;&gamma;ά&nu;&omicron;&upsilon; &tau;&omicron;&upsilon; &sigma;ώ&mu;&alpha;&tau;&omicron;&sigmaf; &ndash; &tau;&omega;&nu; &mu;&alpha;&tau;&iota;ώ&nu;.</Data></Cell>\n<Cell><Data ss:Type=\"String\">&Phi;&omicron;&rho;ώ&nu;&tau;&alpha;&sigmaf; &tau;&alpha; &gamma;&upsilon;&alpha;&lambda;&iota;ά &laquo;&kappa;&alpha;&tau;&alpha;&lambda;&alpha;&beta;&alpha;ί&nu;&epsilon;&iota;&sigmaf; &alpha;&mu;έ&sigma;&omega;&sigmaf; &tau;&eta; &delta;&iota;&alpha;&phi;&omicron;&rho;ά&raquo;. &Delta;&epsilon;&nu; &nu;&omicron;&iota;ά&zeta;&epsilon;&sigma;&alpha;&iota; &alpha;&nu; &theta;&alpha; &chi;&rho;&epsilon;&iota;&alpha;&sigma;&tau;&epsilon;ί&sigmaf; &alpha;&rho;&gamma;ό&tau;&epsilon;&rho;&alpha; &pi;&iota;&omicron; &delta;&upsilon;&nu;&alpha;&tau;&omicron;ύ&sigmaf; &phi;&alpha;&kappa;&omicron;ύ&sigmaf;, &gamma;&iota;&alpha;&tau;ί &nu;&omicron;&mu;ί&zeta;&epsilon;&iota;&sigmaf; ό&tau;&iota; &delta;&epsilon;&nu; &upsilon;&pi;ά&rho;&chi;&epsilon;&iota; &theta;&epsilon;&rho;&alpha;&pi;&epsilon;ί&alpha; &gamma;&iota;&alpha; &tau;&alpha; &tau;&alpha;&lambda;&alpha;&iota;&pi;&omega;&rho;&eta;&mu;έ&nu;&alpha; &mu;ά&tau;&iota;&alpha;.&lt;/br&gt;\r\n&Kappa;&iota; ό&mu;&omega;&sigmaf; &tau;&alpha; &pi;&rho;ά&gamma;&mu;&alpha;&tau;&alpha; &delta;&epsilon;&nu; &epsilon;ί&nu;&alpha;&iota; έ&tau;&sigma;&iota;.&lt;/br&gt;\r\n&Omicron;&iota; &pi;&epsilon;&rho;&iota;&sigma;&sigma;ό&tau;&epsilon;&rho;&omicron;&iota; &alpha;&pi;ό &alpha;&upsilon;&tau;&omicron;ύ&sigmaf; &pi;&omicron;&upsilon; &phi;&omicron;&rho;&omicron;ύ&nu; &gamma;&upsilon;&alpha;&lambda;&iota;ά &theta;&alpha; &mu;&pi;&omicron;&rho;&omicron;ύ&sigma;&alpha;&nu; &nu;&alpha; &tau;&alpha; &epsilon;ί&chi;&alpha;&nu; &alpha;&pi;&omicron;&phi;ύ&gamma;&epsilon;&iota;. &Alpha;&kappa;ό&mu;&alpha; &kappa;&alpha;&iota; &tau;ώ&rho;&alpha; &mu;&pi;&omicron;&rho;&omicron;ύ&nu; &nu;&alpha; &beta;&epsilon;&lambda;&tau;&iota;ώ&sigma;&omicron;&upsilon;&nu; &tau;&eta;&nu; ό&rho;&alpha;&sigma;ή &tau;&omicron;&upsilon;&sigmaf; &mu;&epsilon; &tau;&eta; &mu;έ&theta;&omicron;&delta;&omicron; Bates.&lt;/br&gt;\r\n&Eta; &mu;έ&theta;&omicron;&delta;&omicron;&sigmaf; Bates &epsilon;ί&nu;&alpha;&iota; &mu;&iota;&alpha; &sigma;&epsilon;&iota;&rho;ά &alpha;&sigma;&kappa;ή&sigma;&epsilon;&omega;&nu; &kappa;&alpha;&iota; &tau;&epsilon;&chi;&nu;&iota;&kappa;ώ&nu; &pi;&omicron;&upsilon; &chi;&alpha;&lambda;&alpha;&rho;ώ&nu;&omicron;&upsilon;&nu; &tau;&omicron;&upsilon;&sigmaf; &omicron;&phi;&theta;&alpha;&lambda;&mu;&omicron;&lambda;&omicron;&gamma;&iota;&kappa;&omicron;ύ&sigmaf; &mu;&upsilon;&sigmaf; &kappa;&alpha;&iota; &tau;&omicron;&upsilon;&sigmaf; &epsilon;&pi;&alpha;&nu;&epsilon;&kappa;&pi;&alpha;&iota;&delta;&epsilon;ύ&omicron;&upsilon;&nu; &nu;&alpha; &epsilon;&sigma;&tau;&iota;ά&zeta;&omicron;&upsilon;&nu; &alpha;&pi;&omicron;&tau;&epsilon;&lambda;&epsilon;&sigma;&mu;&alpha;&tau;&iota;&kappa;ά &tau;&iota;&sigmaf; &phi;&omega;&tau;&epsilon;&iota;&nu;έ&sigmaf; &alpha;&kappa;&tau;ί&nu;&epsilon;&sigmaf; &pi;&omicron;&upsilon; &epsilon;&iota;&sigma;έ&rho;&chi;&omicron;&nu;&tau;&alpha;&iota; &sigma;&tau;&omicron; &mu;ά&tau;&iota;, &epsilon;&pi;&iota;&tau;&rho;έ&pi;&omicron;&nu;&tau;ά&sigmaf; &mu;&alpha;&sigmaf; &nu;&alpha; &beta;&lambda;έ&pi;&omicron;&upsilon;&mu;&epsilon; &kappa;&alpha;&lambda;ά &kappa;&alpha;&iota; &kappa;&alpha;&theta;&alpha;&rho;ά &chi;&omega;&rho;ί&sigmaf; &gamma;&upsilon;&alpha;&lambda;&iota;ά.&lt;/br&gt;\r\n&Epsilon;&phi;&alpha;&rho;&mu;ό&sigma;&tau;&epsilon; &sigma;ή&mu;&epsilon;&rho;&alpha; &kappa;&iota;ό&lambda;&alpha;&sigmaf;, &tau;&eta; &mu;έ&theta;&omicron;&delta;&omicron; Bates &gamma;&iota;&alpha; &nu;&alpha; &beta;&epsilon;&lambda;&tau;&iota;ώ&sigma;&epsilon;&tau;&epsilon; &tau;&eta;&nu; ό&rho;&alpha;&sigma;ή &sigma;&alpha;&sigmaf; ή &nu;&alpha; &pi;&rho;&omicron;&lambda;ά&beta;&epsilon;&tau;&epsilon; &tau;&alpha; &pi;&rho;&omicron;&beta;&lambda;ή&mu;&alpha;&tau;&alpha; &tau;&omicron;&upsilon; &pi;&iota;&omicron; &epsilon;&upsilon;&alpha;ί&sigma;&theta;&eta;&tau;&omicron;&upsilon; &omicron;&rho;&gamma;ά&nu;&omicron;&upsilon; &tau;&omicron;&upsilon; &sigma;ώ&mu;&alpha;&tau;&omicron;&sigmaf; &ndash; &tau;&omega;&nu; &mu;&alpha;&tau;&iota;ώ&nu; &sigma;&alpha;&sigmaf;.&lt;/br&gt;</Data></Cell>\n<Cell><Data ss:Type=\"String\">&Upsilon;&gamma;&epsilon;ί&alpha; - &Delta;&iota;&alpha;&tau;&rho;&omicron;&phi;ή</Data></Cell>\n<Cell><Data ss:Type=\"String\">0.272</Data></Cell>\n<Cell><Data ss:Type=\"String\">160</Data></Cell>\n<Cell><Data ss:Type=\"String\">2002-06-03 00:00:00</Data></Cell>\n<Cell><Data ss:Type=\"String\">https://www.dioptra.gr/Images/Products/004_list.jpg</Data></Cell>\n<Cell><Data ss:Type=\"String\">https://www.dioptra.gr/Images/Products/004.jpg</Data></Cell>\n<Cell><Data ss:Type=\"String\"></Data></Cell>\n<Cell><Data ss:Type=\"String\"></Data></Cell>\n<Cell><Data ss:Type=\"String\">0</Data></Cell>\n<Cell><Data ss:Type=\"String\">1</Data></Cell>\n<Cell><Data ss:Type=\"String\">1</Data></Cell>\n<Cell><Data ss:Type=\"String\">140 x 205</Data></Cell>\n<Cell><Data ss:Type=\"String\">&Epsilon;&lambda;&lambda;ά&delta;&alpha;</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">13.19</Data></Cell>\n<Cell><Data ss:Type=\"String\">12.44</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">George Kypreotakis</Data></Cell>\n<Cell><Data ss:Type=\"String\">https://www.dioptra.gr/suggrafeas/171/</Data></Cell>\n<Cell><Data ss:Type=\"String\"></Data></Cell>\n<Cell><Data ss:Type=\"String\"></Data></Cell>\n<Cell><Data ss:Type=\"String\"></Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n<Cell><Data ss:Type=\"String\">-</Data></Cell>\n</Row>\n</Table>\n</Worksheet>\n</Workbook>\n"
  },
  {
    "path": "tests/data/Reader/Xml/issue.3658.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Author>Owen Leibman</Author>\r\n  <LastAuthor>Owen Leibman</LastAuthor>\r\n  <Created>2023-08-24T01:04:23Z</Created>\r\n  <LastSaved>2023-08-24T04:12:25Z</LastSaved>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <CustomDocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Enabled dt:dt=\"string\">true</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Enabled>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SetDate dt:dt=\"string\">2023-08-24T01:05:41Z</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SetDate>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Method dt:dt=\"string\">Standard</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Method>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Name dt:dt=\"string\">defa4170-0d19-0005-0004-bc88714345d2</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Name>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SiteId dt:dt=\"string\">f9465cb1-7889-4d9a-b552-fdd0addf0eb1</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SiteId>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ActionId dt:dt=\"string\">7c91c978-1f69-4a5e-869b-3571e812b58a</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ActionId>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ContentBits dt:dt=\"string\">0</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ContentBits>\r\n </CustomDocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>6630</WindowHeight>\r\n  <WindowWidth>19200</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Sheet1\">\r\n  <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"4\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell><Data ss:Type=\"Number\">123</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Formula=\"=R[-1]C+1\"><Data ss:Type=\"Number\">124</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Formula=\"=&quot;00&quot;&amp;R[-2]C\"><Data ss:Type=\"String\">00123</Data></Cell>\r\n   </Row>\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Formula=\"=INFO(&quot;SYSTEM&quot;)\"><Data ss:Type=\"String\">pcdos</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <Selected/>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>4</ActiveRow>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/issue.4448.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Author>owen</Author>\r\n  <LastAuthor>owen</LastAuthor>\r\n  <Created>2025-04-20T15:09:21Z</Created>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>6630</WindowHeight>\r\n  <WindowWidth>19200</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Aptos Narrow\" x:Family=\"Swiss\" ss:Size=\"11\"\r\n    ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n  <Style ss:ID=\"s63\">\r\n   <Alignment ss:Horizontal=\"Left\" ss:Vertical=\"Bottom\" ss:Indent=\"5\"/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Sheet1\">\r\n  <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"3\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row>\r\n    <Cell><Data ss:Type=\"String\">a</Data></Cell>\r\n   </Row>\r\n   <Row>\r\n    <Cell ss:StyleID=\"s63\"><Data ss:Type=\"String\">b</Data></Cell>\r\n   </Row>\r\n   <Row>\r\n    <Cell><Data ss:Type=\"String\">c</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Selected/>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>1</ActiveRow>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/issue.850.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Title>Untitled Spreadsheet</Title>\r\n  <Author>Unknown Creator</Author>\r\n  <LastAuthor>Owen Leibman</LastAuthor>\r\n  <Created>2025-09-19T18:05:38Z</Created>\r\n  <LastSaved>2025-09-19T18:05:38Z</LastSaved>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>6510</WindowHeight>\r\n  <WindowWidth>19200</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n  <Style ss:ID=\"s16\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:ReadingOrder=\"RightToLeft\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s17\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:ReadingOrder=\"LeftToRight\"/>\r\n  </Style>\r\n  <Style ss:ID=\"s18\">\r\n   <Alignment ss:Vertical=\"Bottom\" ss:Indent=\"2\"/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Worksheet\">\r\n  <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"5\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row>\r\n    <Cell ss:StyleID=\"s16\"><Data ss:Type=\"String\">1-منصور حسين الناصر</Data></Cell>\r\n   </Row>\r\n   <Row>\r\n    <Cell ss:StyleID=\"s17\"><Data ss:Type=\"String\">1-منصور حسين الناصر</Data></Cell>\r\n   </Row>\r\n   <Row>\r\n    <Cell><Data ss:Type=\"String\">1-منصور حسين الناصر</Data></Cell>\r\n   </Row>\r\n   <Row ss:Index=\"5\">\r\n    <Cell ss:StyleID=\"s18\"><Data ss:Type=\"String\">hello</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Print>\r\n    <ValidPrinterInfo/>\r\n    <NoOrientation/>\r\n    <HorizontalResolution>600</HorizontalResolution>\r\n    <VerticalResolution>600</VerticalResolution>\r\n   </Print>\r\n   <Selected/>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>4</ActiveRow>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/Reader/Xml/sec-w24f.dontuse",
    "content": "<?xml version=\"1.0\"?> \r\n<?mso-application progid=\"Excel.Sheet\"?> \r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\" \r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\" \r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\" \r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" \r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\"> \r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\"> \r\n  <Author>author</Author> \r\n  <LastAuthor>author</LastAuthor> \r\n  <Created>2015-06-05T18:19:34Z</Created> \r\n  <LastSaved>2024-12-25T10:16:07Z</LastSaved> \r\n  <Version>16.00</Version> \r\n </DocumentProperties> \r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\"> \r\n  <AllowPNG/> \r\n </OfficeDocumentSettings> \r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\"> \r\n  <WindowHeight>11020</WindowHeight> \r\n  <WindowWidth>19420</WindowWidth> \r\n  <WindowTopX>32767</WindowTopX> \r\n  <WindowTopY>32767</WindowTopY> \r\n  <ProtectStructure>False</ProtectStructure> \r\n  <ProtectWindows>False</ProtectWindows> \r\n </ExcelWorkbook> \r\n <Styles> \r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\"> \r\n   <Alignment ss:Vertical=\"Bottom\"/> \r\n   <Borders/> \r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/> \r\n   <Interior/> \r\n   <NumberFormat/> \r\n   <Protection/> \r\n  </Style> \r\n  <Style ss:ID=\"s16\"> \r\n   <NumberFormat ss:Format=\"General Date\"/> \r\n  </Style> \r\n </Styles> \r\n <Worksheet ss:Name=\"Лист1\"> \r\n  <Table ss:ExpandedColumnCount=\"2\" ss:ExpandedRowCount=\"6\" x:FullColumns=\"1\" \r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\"> \r\n   <Column ss:AutoFitWidth=\"0\" ss:Width=\"194\"/> \r\n   <Row> \r\n     <Cell ss:Formula=\"=HYPERLINK (CHAR(20) &amp; &quot;j&quot; &amp; CHAR(13) &amp; &quot;avascript:alert(1)&quot;)\"><Data ss:Type=\"String\"></Data></Cell> \r\n   </Row> \r\n  </Table> \r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\"> \r\n   <PageSetup> \r\n    <Header x:Margin=\"0.3\"/> \r\n    <Footer x:Margin=\"0.3\"/> \r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/> \r\n   </PageSetup> \r\n   <Selected/> \r\n   <TopRowVisible>1</TopRowVisible> \r\n   <Panes> \r\n    <Pane> \r\n     <Number>3</Number> \r\n     <ActiveRow>6</ActiveRow> \r\n    </Pane> \r\n   </Panes> \r\n   <ProtectObjects>False</ProtectObjects> \r\n   <ProtectScenarios>False</ProtectScenarios> \r\n  </WorksheetOptions> \r\n </Worksheet>\r\n</Workbook>"
  },
  {
    "path": "tests/data/Reader/Xml/splits.xml",
    "content": "<?xml version=\"1.0\"?>\r\n<?mso-application progid=\"Excel.Sheet\"?>\r\n<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\n xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\r\n <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <Author>Owen Leibman</Author>\r\n  <LastAuthor>Owen Leibman</LastAuthor>\r\n  <Created>2023-06-16T06:25:47Z</Created>\r\n  <LastSaved>2023-06-17T21:18:13Z</LastSaved>\r\n  <Version>16.00</Version>\r\n </DocumentProperties>\r\n <CustomDocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Enabled dt:dt=\"string\">true</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Enabled>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SetDate dt:dt=\"string\">2023-06-16T06:33:59Z</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SetDate>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Method dt:dt=\"string\">Standard</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Method>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Name dt:dt=\"string\">defa4170-0d19-0005-0004-bc88714345d2</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_Name>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SiteId dt:dt=\"string\">f9465cb1-7889-4d9a-b552-fdd0addf0eb1</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_SiteId>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ActionId dt:dt=\"string\">249f96c6-562d-4909-af9a-fa41f1d18cce</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ActionId>\r\n  <MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ContentBits dt:dt=\"string\">0</MSIP_Label_b002e552-5bac-4e77-a8f2-1e8fdcadcedf_ContentBits>\r\n </CustomDocumentProperties>\r\n <OfficeDocumentSettings xmlns=\"urn:schemas-microsoft-com:office:office\">\r\n  <AllowPNG/>\r\n </OfficeDocumentSettings>\r\n <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n  <WindowHeight>6820</WindowHeight>\r\n  <WindowWidth>19200</WindowWidth>\r\n  <WindowTopX>32767</WindowTopX>\r\n  <WindowTopY>32767</WindowTopY>\r\n  <ActiveSheet>4</ActiveSheet>\r\n  <ProtectStructure>False</ProtectStructure>\r\n  <ProtectWindows>False</ProtectWindows>\r\n </ExcelWorkbook>\r\n <Styles>\r\n  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n  <Style ss:ID=\"s62\" ss:Name=\"Normal 2\">\r\n   <Alignment ss:Vertical=\"Bottom\"/>\r\n   <Borders/>\r\n   <Font ss:FontName=\"Calibri\" x:Family=\"Swiss\" ss:Size=\"11\" ss:Color=\"#000000\"/>\r\n   <Interior/>\r\n   <NumberFormat/>\r\n   <Protection/>\r\n  </Style>\r\n </Styles>\r\n <Worksheet ss:Name=\"Freeze\">\r\n  <Table ss:ExpandedColumnCount=\"12\" ss:ExpandedRowCount=\"7\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell><Data ss:Type=\"Number\">0</Data></Cell>\r\n    <Cell ss:Index=\"12\"><Data ss:Type=\"Number\">1</Data></Cell>\r\n   </Row>\r\n   <Row ss:Index=\"7\" ss:AutoFitHeight=\"0\">\r\n    <Cell><Data ss:Type=\"Number\">2</Data></Cell>\r\n    <Cell ss:Index=\"12\"><Data ss:Type=\"Number\">3</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <FreezePanes/>\r\n   <FrozenNoSplit/>\r\n   <SplitHorizontal>6</SplitHorizontal>\r\n   <TopRowBottomPane>6</TopRowBottomPane>\r\n   <SplitVertical>4</SplitVertical>\r\n   <LeftColumnRightPane>11</LeftColumnRightPane>\r\n   <ActivePane>0</ActivePane>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>1</Number>\r\n     <ActiveCol>4</ActiveCol>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>2</Number>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>0</Number>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n <Worksheet ss:Name=\"SplitVertical\">\r\n  <Table ss:ExpandedColumnCount=\"7\" ss:ExpandedRowCount=\"1\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"Number\">11</Data></Cell>\r\n    <Cell ss:Index=\"7\"><Data ss:Type=\"Number\">10</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <LeftColumnVisible>6</LeftColumnVisible>\r\n   <SplitVertical>6160</SplitVertical>\r\n   <LeftColumnRightPane>4</LeftColumnRightPane>\r\n   <ActivePane>1</ActivePane>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveCol>6</ActiveCol>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>1</Number>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n <Worksheet ss:Name=\"SplitHorizontal\">\r\n  <Table ss:ExpandedColumnCount=\"1\" ss:ExpandedRowCount=\"6\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\"/>\r\n   <Row ss:Index=\"3\" ss:AutoFitHeight=\"0\">\r\n    <Cell><Data ss:Type=\"Number\">20</Data></Cell>\r\n   </Row>\r\n   <Row ss:Index=\"6\" ss:AutoFitHeight=\"0\">\r\n    <Cell><Data ss:Type=\"Number\">21</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <TopRowVisible>2</TopRowVisible>\r\n   <SplitHorizontal>1740</SplitHorizontal>\r\n   <TopRowBottomPane>5</TopRowBottomPane>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>6</ActiveRow>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>2</Number>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n <Worksheet ss:Name=\"SplitBoth\">\r\n  <Table ss:ExpandedColumnCount=\"8\" ss:ExpandedRowCount=\"19\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\"/>\r\n   <Row ss:Index=\"3\" ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"Number\">31</Data></Cell>\r\n    <Cell ss:Index=\"8\"><Data ss:Type=\"Number\">30</Data></Cell>\r\n   </Row>\r\n   <Row ss:Index=\"19\" ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"Number\">33</Data></Cell>\r\n    <Cell ss:Index=\"8\"><Data ss:Type=\"Number\">32</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <TopRowVisible>2</TopRowVisible>\r\n   <LeftColumnVisible>7</LeftColumnVisible>\r\n   <SplitHorizontal>2030</SplitHorizontal>\r\n   <TopRowBottomPane>18</TopRowBottomPane>\r\n   <SplitVertical>4240</SplitVertical>\r\n   <LeftColumnRightPane>4</LeftColumnRightPane>\r\n   <ActivePane>0</ActivePane>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>2</ActiveRow>\r\n     <ActiveCol>10</ActiveCol>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>1</Number>\r\n     <ActiveRow>2</ActiveRow>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>2</Number>\r\n     <ActiveCol>7</ActiveCol>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>0</Number>\r\n     <ActiveRow>19</ActiveRow>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n <Worksheet ss:Name=\"NoFreezeNorSplit\">\r\n  <Table ss:ExpandedColumnCount=\"4\" ss:ExpandedRowCount=\"5\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\"/>\r\n   <Row ss:Index=\"5\" ss:AutoFitHeight=\"0\">\r\n    <Cell ss:Index=\"4\"><Data ss:Type=\"Number\">50</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <Selected/>\r\n   <TopRowVisible>2</TopRowVisible>\r\n   <LeftColumnVisible>3</LeftColumnVisible>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n     <ActiveRow>4</ActiveRow>\r\n     <ActiveCol>3</ActiveCol>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n <Worksheet ss:Name=\"FrozenSplit\">\r\n  <Table ss:ExpandedColumnCount=\"5\" ss:ExpandedRowCount=\"7\" x:FullColumns=\"1\"\r\n   x:FullRows=\"1\" ss:StyleID=\"s62\" ss:DefaultRowHeight=\"14.5\">\r\n   <Row ss:AutoFitHeight=\"0\">\r\n    <Cell><Data ss:Type=\"Number\">1</Data></Cell>\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"Number\">2</Data></Cell>\r\n   </Row>\r\n   <Row ss:Index=\"7\" ss:AutoFitHeight=\"0\">\r\n    <Cell><Data ss:Type=\"Number\">3</Data></Cell>\r\n    <Cell ss:Index=\"5\"><Data ss:Type=\"Number\">4</Data></Cell>\r\n   </Row>\r\n  </Table>\r\n  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\r\n   <PageSetup>\r\n    <Header x:Margin=\"0.3\"/>\r\n    <Footer x:Margin=\"0.3\"/>\r\n    <PageMargins x:Bottom=\"0.75\" x:Left=\"0.7\" x:Right=\"0.7\" x:Top=\"0.75\"/>\r\n   </PageSetup>\r\n   <Unsynced/>\r\n   <FreezePanes/>\r\n   <SplitHorizontal>3</SplitHorizontal>\r\n   <TopRowBottomPane>3</TopRowBottomPane>\r\n   <SplitVertical>1</SplitVertical>\r\n   <LeftColumnRightPane>1</LeftColumnRightPane>\r\n   <ActivePane>0</ActivePane>\r\n   <Panes>\r\n    <Pane>\r\n     <Number>3</Number>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>1</Number>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>2</Number>\r\n    </Pane>\r\n    <Pane>\r\n     <Number>0</Number>\r\n    </Pane>\r\n   </Panes>\r\n   <ProtectObjects>False</ProtectObjects>\r\n   <ProtectScenarios>False</ProtectScenarios>\r\n  </WorksheetOptions>\r\n </Worksheet>\r\n</Workbook>\r\n"
  },
  {
    "path": "tests/data/ReferenceHelperFormulaUpdates.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '=IF(A$1=0,0,A1/A$1)',\n        1,\n        0,\n        '2021',\n        '=IF(B$1=0,0,B1/B$1)',\n    ],\n    [\n        '=IF($A1=0,0,A1/$A1)',\n        0,\n        1,\n        '2021',\n        '=IF($A2=0,0,A2/$A2)',\n    ],\n    [\n        '=SUM(C3:E5)',\n        -2,\n        -2,\n        '2020',\n        '=SUM(A1:C3)',\n    ],\n    'column range' => [\n        '=SUM(B:C)',\n        2,\n        0,\n        '2020',\n        '=SUM(D:E)',\n    ],\n    'column range with absolute' => [\n        '=SUM($B:C)',\n        2,\n        0,\n        '2020',\n        '=SUM($B:E)',\n    ],\n    'row range' => [\n        '=SUM(2:3)',\n        0,\n        2,\n        '2020',\n        '=SUM(4:5)',\n    ],\n    'row range with absolute' => [\n        '=SUM($2:3)',\n        0,\n        2,\n        '2020',\n        '=SUM($2:5)',\n    ],\n    [\n        '=SUM(2020!C3:E5,2019!C3:E5)',\n        -2,\n        -2,\n        '2020',\n        '=SUM(2020!A1:C3,2019!C3:E5)',\n    ],\n    [\n        '=SUM(2020!3:5,2019!3:5)',\n        -2,\n        -2,\n        '2020',\n        '=SUM(2020!1:3,2019!3:5)',\n    ],\n    [\n        '=SUM(2020!C:E,2019!C:E)',\n        -2,\n        -2,\n        '2020',\n        '=SUM(2020!A:C,2019!C:E)',\n    ],\n    [\n        \"=IF('2020'!\\$B1=\\\"\\\",\\\"-\\\",(('2020'!\\$B1/'2019'!\\$B1)-1))\",\n        2,\n        2,\n        '2019',\n        \"=IF('2020'!\\$B1=\\\"\\\",\\\"-\\\",(('2020'!\\$B1/'2019'!\\$B3)-1))\",\n    ],\n    [\n        \"=IF('2020'!B$1=\\\"\\\",\\\"-\\\",(('2020'!B$1/'2019'!B$1)-1))\",\n        2,\n        2,\n        '2019',\n        \"=IF('2020'!B\\$1=\\\"\\\",\\\"-\\\",(('2020'!B\\$1/'2019'!D\\$1)-1))\",\n    ],\n    [\n        \"=IF('2020'!Z$1=\\\"\\\",\\\"-\\\",(('2020'!Z$1/'2019'!Z$1)-1))\",\n        2,\n        2,\n        '2019',\n        \"=IF('2020'!Z\\$1=\\\"\\\",\\\"-\\\",(('2020'!Z\\$1/'2019'!AB\\$1)-1))\",\n    ],\n    [\n        \"=IF('2020'!\\$B1=\\\"\\\",\\\"-\\\",(('2020'!\\$B1/'2019'!\\$B1)-1))\",\n        2,\n        2,\n        '2020',\n        \"=IF('2020'!\\$B3=\\\"\\\",\\\"-\\\",(('2020'!\\$B3/'2019'!\\$B1)-1))\",\n    ],\n    [\n        \"=IF('2020'!B$1=\\\"\\\",\\\"-\\\",(('2020'!B$1/'2019'!B$1)-1))\",\n        2,\n        2,\n        '2020',\n        \"=IF('2020'!D\\$1=\\\"\\\",\\\"-\\\",(('2020'!D\\$1/'2019'!B\\$1)-1))\",\n    ],\n    [\n        \"=IF('2020'!Z$1=\\\"\\\",\\\"-\\\",(('2020'!Z$1/'2019'!Z$1)-1))\",\n        2,\n        2,\n        '2020',\n        \"=IF('2020'!AB\\$1=\\\"\\\",\\\"-\\\",(('2020'!AB\\$1/'2019'!Z\\$1)-1))\",\n    ],\n];\n"
  },
  {
    "path": "tests/data/ReferenceHelperFormulaUpdatesMultipleSheet.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        \"=IF('2020'!\\$B1=\\\"\\\",\\\"-\\\",(('2020'!\\$B1/'2019'!\\$B1)-1))\",\n        2,\n        2,\n        \"=IF('2020'!\\$B3=\\\"\\\",\\\"-\\\",(('2020'!\\$B3/'2019'!\\$B3)-1))\",\n    ],\n    [\n        \"=IF('2020'!B$1=\\\"\\\",\\\"-\\\",(('2020'!B$1/'2019'!B$1)-1))\",\n        2,\n        2,\n        \"=IF('2020'!D\\$1=\\\"\\\",\\\"-\\\",(('2020'!D\\$1/'2019'!D\\$1)-1))\",\n    ],\n    [\n        \"=IF('2020'!Z$1=\\\"\\\",\\\"-\\\",(('2020'!Z$1/'2019'!Z$1)-1))\",\n        2,\n        2,\n        \"=IF('2020'!AB\\$1=\\\"\\\",\\\"-\\\",(('2020'!AB\\$1/'2019'!AB\\$1)-1))\",\n    ],\n    [\n        '=SUM(A1:C3)',\n        2,\n        2,\n        '=SUM(C3:E5)',\n    ],\n    [\n        '=SUM($A1:C3)',\n        2,\n        2,\n        '=SUM($A3:E5)',\n    ],\n    [\n        '=SUM($A1:$A3)',\n        2,\n        2,\n        '=SUM($A3:$A5)',\n    ],\n    [\n        '=SUM(A$1:C3)',\n        2,\n        2,\n        '=SUM(C$1:E5)',\n    ],\n    [\n        '=SUM(A$1:C$3)',\n        2,\n        2,\n        '=SUM(C$1:E$3)',\n    ],\n    [\n        '=SUM(A:C)',\n        2,\n        2,\n        '=SUM(C:E)',\n    ],\n    [\n        '=SUM($A:C)',\n        2,\n        2,\n        '=SUM($A:E)',\n    ],\n    [\n        '=SUM(A:$E)',\n        2,\n        2,\n        '=SUM(C:$E)',\n    ],\n    [\n        '=SUM(1:3)',\n        2,\n        2,\n        '=SUM(3:5)',\n    ],\n    [\n        '=SUM($1:3)',\n        2,\n        2,\n        '=SUM($1:5)',\n    ],\n    [\n        '=SUM(1:$5)',\n        2,\n        2,\n        '=SUM(3:$5)',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/CentimeterSizeToPixels.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        3.7795275590999999,\n        0.10000000000000001,\n    ],\n    [\n        7.5590551181999999,\n        0.20000000000000001,\n    ],\n    [\n        18.8976377955,\n        0.5,\n    ],\n    [\n        37.795275590999999,\n        1.0,\n    ],\n    [\n        75.590551181999999,\n        2.0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/CodePage.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    // ANSI Latin I (BIFF4-BIFF7)\n    [\n        'CP1252',\n        0,\n    ],\n    // ASCII\n    [\n        'ASCII',\n        367,\n    ],\n    // OEM US\n    [\n        'CP437',\n        437,\n    ],\n    // OEM Greek\n    [\n        'CP737',\n        737,\n    ],\n    // OEM Baltic\n    [\n        'CP775',\n        775,\n    ],\n    // OEM Latin I\n    [\n        'CP850',\n        850,\n    ],\n    // OEM Latin II (Central European)\n    [\n        'CP852',\n        852,\n    ],\n    // OEM Cyrillic\n    [\n        'CP855',\n        855,\n    ],\n    // OEM Turkish\n    [\n        'CP857',\n        857,\n    ],\n    // OEM Multilingual Latin I with Euro\n    [\n        'CP858',\n        858,\n    ],\n    // OEM Portugese\n    [\n        'CP860',\n        860,\n    ],\n    // OEM Icelandic\n    [\n        'CP861',\n        861,\n    ],\n    // OEM Hebrew\n    [\n        'CP862',\n        862,\n    ],\n    // OEM Canadian (French)\n    [\n        'CP863',\n        863,\n    ],\n    // OEM Arabic\n    [\n        'CP864',\n        864,\n    ],\n    // OEM Nordic\n    [\n        'CP865',\n        865,\n    ],\n    // OEM Cyrillic (Russian)\n    [\n        'CP866',\n        866,\n    ],\n    // OEM Greek (Modern)\n    [\n        'CP869',\n        869,\n    ],\n    // ANSI Thai\n    [\n        'CP874',\n        874,\n    ],\n    // ANSI Japanese Shift-JIS\n    [\n        'CP932',\n        932,\n    ],\n    // ANSI Chinese Simplified GBK\n    [\n        'CP936',\n        936,\n    ],\n    // ANSI Korean (Wansung)\n    [\n        'CP949',\n        949,\n    ],\n    // ANSI Chinese Traditional BIG5\n    [\n        'CP950',\n        950,\n    ],\n    // UTF-16 (BIFF8)\n    [\n        'UTF-16LE',\n        1200,\n    ],\n    // ANSI Latin II (Central European)\n    [\n        'CP1250',\n        1250,\n    ],\n    // ANSI Cyrillic\n    [\n        'CP1251',\n        1251,\n    ],\n    // ANSI Latin I (BIFF4-BIFF7)\n    [\n        'CP1252',\n        1252,\n    ],\n    // ANSI Greek\n    [\n        'CP1253',\n        1253,\n    ],\n    // ANSI Turkish\n    [\n        'CP1254',\n        1254,\n    ],\n    // ANSI Hebrew\n    [\n        'CP1255',\n        1255,\n    ],\n    // ANSI Arabic\n    [\n        'CP1256',\n        1256,\n    ],\n    // ANSI Baltic\n    [\n        'CP1257',\n        1257,\n    ],\n    // ANSI Vietnamese\n    [\n        'CP1258',\n        1258,\n    ],\n    // ANSI Korean (Johab)\n    [\n        'CP1361',\n        1361,\n    ],\n    // Apple Roman\n    [\n        'MAC',\n        10000,\n    ],\n    // Macintosh Japanese\n    [\n        'CP932',\n        10001,\n    ],\n    // Macintosh Chinese Traditional\n    [\n        'CP950',\n        10002,\n    ],\n    // Macintosh Korean\n    [\n        'CP1361',\n        10003,\n    ],\n    // Apple Arabic\n    [\n        'MACARABIC',\n        10004,\n    ],\n    // Apple Hebrew\n    [\n        'MACHEBREW',\n        10005,\n    ],\n    // Macintosh Greek\n    [\n        'MACGREEK',\n        10006,\n    ],\n    // Macintosh Cyrillic\n    [\n        'MACCYRILLIC',\n        10007,\n    ],\n    // Macintosh - Simplified Chinese (GB 2312)\n    [\n        'CP936',\n        10008,\n    ],\n    // Macintosh Romania\n    [\n        'MACROMANIA',\n        10010,\n    ],\n    // Macintosh Ukraine\n    [\n        'MACUKRAINE',\n        10017,\n    ],\n    // Macintosh Thai\n    [\n        'MACTHAI',\n        10021,\n    ],\n    // Macintosh Central Europe\n    [\n        ['MACCENTRALEUROPE', 'MAC-CENTRALEUROPE'],\n        10029,\n    ],\n    // Macintosh Icelandic\n    [\n        'MACICELAND',\n        10079,\n    ],\n    // Macintosh Turkish\n    [\n        'MACTURKISH',\n        10081,\n    ],\n    // Macintosh Croatian\n    [\n        'MACCROATIAN',\n        10082,\n    ],\n    // UTF-16 (BIFF8) grandfathers erroneous libraries\n    [\n        'UTF-16LE',\n        21010,\n    ],\n    // Apple Roman\n    [\n        'MAC',\n        32768,\n    ],\n    // Unicode (UTF-7)\n    [\n        'UTF-7',\n        65000,\n    ],\n    // Unicode (UTF-8)\n    [\n        'UTF-8',\n        65001,\n    ],\n    // invalid\n    [\n        'exception',\n        99999,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/Date/DateTimeToExcel.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// DateTime object                          Result           Comments\nreturn [\n    // Excel 1900 base calendar date\n    [\n        1.0,\n        new DateTime('1900-01-01'),\n    ],\n    // This and next test show gap for the mythical\n    [\n        59.0,\n        new DateTime('1900-02-28'),\n    ],\n    // MS Excel 1900 Leap Year\n    [\n        61.0,\n        new DateTime('1900-03-01'),\n    ],\n    // Unix Timestamp 32-bit Earliest Date\n    [\n        714.0,\n        new DateTime('1901-12-14'),\n    ],\n    [\n        1461.0,\n        new DateTime('1903-12-31'),\n    ],\n    // Excel 1904 Calendar Base Date\n    [\n        1462.0,\n        new DateTime('1904-01-01'),\n    ],\n    [\n        1463.0,\n        new DateTime('1904-01-02'),\n    ],\n    [\n        22269.0,\n        new DateTime('1960-12-19'),\n    ],\n    // Unix Timestamp Base Date\n    [\n        25569.0,\n        new DateTime('1970-01-01'),\n    ],\n    [\n        30292.0,\n        new DateTime('1982-12-07'),\n    ],\n    [\n        39611.0,\n        new DateTime('2008-06-12'),\n    ],\n    // Unix Timestamp 32-bit Latest Date\n    [\n        50424.0,\n        new DateTime('2038-01-19'),\n    ],\n    [\n        1234.56789,\n        new DateTime('1903-05-18 13:37:46'),\n    ],\n    [\n        12345.6789,\n        new DateTime('1933-10-18 16:17:37'),\n    ],\n    [\n        73050.0,\n        new DateTime('2099-12-31'),\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/Date/ExcelToTimestamp1900.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Excel DateTimeStamp  Result            Comments\nreturn [\n    // PHP 32-bit Earliest Date 14-Dec-1901\n    [\n        -2147472000,\n        714,\n    ],\n    // 31-Dec-1903\n    [\n        -2082931200,\n        1461,\n    ],\n    // Excel 1904 Calendar Base Date 01-Jan-1904\n    [\n        -2082844800,\n        1462,\n    ],\n    // 02-Jan-1904\n    [\n        -2082758400,\n        1463,\n    ],\n    // 19-Dec-1960\n    [\n        -285120000,\n        22269,\n    ],\n    // PHP Base Date 01-Jan-1970\n    [\n        0,\n        25569,\n    ],\n    // 07-Dec-1982\n    [\n        408067200,\n        30292,\n    ],\n    // 12-Jun-2008\n    [\n        1213228800,\n        39611,\n    ],\n    // PHP 32-bit Latest Date 9-Jan-2038\n    [\n        2147472000,\n        50424,\n    ],\n    // 18-May-1903 13:37:46\n    [\n        -2102494934,\n        1234.56789,\n    ],\n    // 18-Oct-1933 16:17:37\n    [\n        -1142494943,\n        12345.6789,\n    ],\n    // 12:00:00\n    [\n        43200,\n        0.5,\n    ],\n    // 18:00.00\n    [\n        64800,\n        0.75,\n    ],\n    // 02:57:46\n    [\n        10666,\n        0.12345,\n    ],\n    // 29-Apr-2038 00:00:00 beyond PHP 32-bit Latest Date\n    [\n        2156112000,\n        50524,\n    ],\n    [-2147483648, -2147483648 / 86400], // Okay on 64- and 32-bit systems\n    [-2147483649, -2147483649 / 86400], // Skipped test on 32-bit\n];\n"
  },
  {
    "path": "tests/data/Shared/Date/ExcelToTimestamp1900Timezone.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Excel DateTimeStamp  Timezone               Result            Comments\nreturn [\n    // 19-Dec-1960 00:00:00 EST => 19-Dec-1960 05:00:00 UTC\n    [\n        -285102000,\n        22269,\n        'America/New_York',\n    ],\n    // 01-Jan-1970 00:00:00 EST => 01-Jan-1970 05:00:00 UTC    PHP Base Date\n    [\n        18000,\n        25569,\n        'America/New_York',\n    ],\n    // 07-Dec-1982 00:00:00 EST => 07-Dec-1982 05:00:00 UTC\n    [\n        408085200,\n        30292,\n        'America/New_York',\n    ],\n    // 12-Jun-2008 00:00:00 EDT => 12-Jun-2008 04:00:00 UTC\n    [\n        1213243200,\n        39611,\n        'America/New_York',\n    ],\n    // 19-Jan-2038 00:00:00 EST => 19-Jan-2038 05:00:00 UTC    PHP 32-bit Latest Date\n    [\n        2147490000,\n        50424,\n        'America/New_York',\n    ],\n    // 05-Mar-1961 13:37:46 EST => 05-Mar-1961 18:37:46 UTC\n    [\n        -278486534,\n        22345.56789,\n        'America/New_York',\n    ],\n    // 05-Mar-1961 16:17:37 EST => 05-Mar-1961 21:17:37 UTC\n    [\n        -278476943,\n        22345.6789,\n        'America/New_York',\n    ],\n    // 12:00:00 EST => 17:00:00 UTC\n    [\n        61200,\n        0.5,\n        'America/New_York',\n    ],\n    // 18:00.00 EST => 23:00:00 UTC\n    [\n        82800,\n        0.75,\n        'America/New_York',\n    ],\n    // 02:57:46 EST => 07:57:46 UTC\n    [\n        28666,\n        0.12345,\n        'America/New_York',\n    ],\n    // 02-Nov-2012 00:00:00 EDT => 02-Nov-2012 04:00:00 UTC\n    [\n        1351828800,\n        41215,\n        'America/New_York',\n    ],\n    // 19-Dec-1960 00:00:00 NZST => 18-Dec-1960 12:00:00 UTC\n    [\n        -285163200,\n        22269,\n        'Pacific/Auckland',\n    ],\n    // 01-Jan-1970 00:00:00 NZST => 31-Dec-1969 12:00:00 UTC    PHP Base Date\n    [\n        -43200,\n        25569,\n        'Pacific/Auckland',\n    ],\n    // 07-Dec-1982 00:00:00 NZDT => 06-Dec-1982 11:00:00 UTC\n    [\n        408020400,\n        30292,\n        'Pacific/Auckland',\n    ],\n    // 12-Jun-2008 00:00:00 NZST => 11-Jun-2008 12:00:00 UTC\n    [\n        1213185600,\n        39611,\n        'Pacific/Auckland',\n    ],\n    // 18-Jan-2038 12:00:00 NZDT => 17-Jan-2038 23:00:00 UTC    PHP 32-bit Latest Date\n    [\n        2147382000,\n        50423.5,\n        'Pacific/Auckland',\n    ],\n    // 05-Mar-1961 13:37:46 NZST => 05-Mar-1961 01:37:46 UTC\n    [\n        -278547734,\n        22345.56789,\n        'Pacific/Auckland',\n    ],\n    // 05-Mar-1961 16:17:37 NZST => 05-Mar-1961 04:17:37 UTC\n    [\n        -278538143,\n        22345.6789,\n        'Pacific/Auckland',\n    ],\n    // 12:00:00 NZST => 00:00:00 UTC\n    [\n        0,\n        0.5,\n        'Pacific/Auckland',\n    ],\n    // 18:00.00 NZST => 06:00:00 UTC\n    [\n        21600,\n        0.75,\n        'Pacific/Auckland',\n    ],\n    // 02:57:46 NZST => 14:57:46 UTC\n    [\n        -32534,\n        0.12345,\n        'Pacific/Auckland',\n    ],\n    // 02-Nov-2012 00:00:00 NZDT => 01-Nov-2012 11:00:00 UTC\n    [\n        1351767600,\n        41215,\n        'Pacific/Auckland',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/Date/ExcelToTimestamp1904.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Excel DateTimeStamp        Result            Comments\n\nreturn [\n    [\n        -1956528000,\n        1462,\n    ],\n    [\n        -1956441600,\n        1463,\n    ],\n    [\n        -158803200,\n        22269,\n    ],\n    [\n        126316800,\n        25569,\n    ],\n    [\n        534384000,\n        30292,\n    ],\n    [\n        1339545600,\n        39611,\n    ],\n    // 06:00:00\n    [\n        gmmktime(6, 0, 0, 1, 1, 1904), // 32-bit safe - no Y2038 problem\n        0.25,\n    ],\n    // 08:00.00\n    [\n        gmmktime(8, 0, 0, 1, 1, 1904), // 32-bit safe - no Y2038 problem\n        0.3333333333333333333,\n    ],\n    // 13:02:13\n    [\n        gmmktime(13, 2, 13, 1, 1, 1904), // 32-bit safe - no Y2038 problem\n        0.54321,\n    ],\n    // 29-Apr-2038 00:00:00 beyond PHP 32-bit Latest Date\n    [\n        2156112000,\n        49062,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/Date/FormatCodes.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Excel Format Code                     Result\nreturn [\n    [\n        false,\n        'General',\n    ],\n    [\n        false,\n        '@',\n    ],\n    [\n        false,\n        '0',\n    ],\n    [\n        false,\n        '0.00',\n    ],\n    [\n        false,\n        '#,##0.00',\n    ],\n    [\n        false,\n        '#,##0.00_-',\n    ],\n    [\n        false,\n        '0%',\n    ],\n    [\n        false,\n        '0.00%',\n    ],\n    [\n        true,\n        'yyyy-mm-dd',\n    ],\n    [\n        true,\n        'yy-mm-dd',\n    ],\n    [\n        true,\n        'dd/mm/yy',\n    ],\n    [\n        true,\n        'd/m/y',\n    ],\n    [\n        true,\n        'd-m-y',\n    ],\n    [\n        true,\n        'd-m',\n    ],\n    [\n        true,\n        'm-y',\n    ],\n    [\n        true,\n        'mm-dd-yy',\n    ],\n    [\n        true,\n        'd-mmm-yy',\n    ],\n    [\n        true,\n        'd-mmm',\n    ],\n    [\n        true,\n        'mmm-yy',\n    ],\n    [\n        true,\n        'm/d/yy h:mm',\n    ],\n    [\n        true,\n        'd/m/y h:mm',\n    ],\n    [\n        true,\n        'h:mm AM/PM',\n    ],\n    [\n        true,\n        'h:mm:ss AM/PM',\n    ],\n    [\n        true,\n        'h:mm',\n    ],\n    [\n        true,\n        'h:mm:ss',\n    ],\n    [\n        true,\n        'mm:ss',\n    ],\n    [\n        true,\n        'h:mm:ss',\n    ],\n    [\n        true,\n        'i:s.S',\n    ],\n    [\n        true,\n        'h:mm:ss;@',\n    ],\n    [\n        true,\n        'yy/mm/dd;@',\n    ],\n    [\n        false,\n        '\"$\" #,##0.00_-',\n    ],\n    [\n        false,\n        '$#,##0_-',\n    ],\n    [\n        false,\n        '[$EUR ]#,##0.00_-',\n    ],\n    [\n        false,\n        '_[$EUR ]#,##0.00_-',\n    ],\n    [\n        false,\n        '[Green]#,##0.00;[Red]#,##0.00_-',\n    ],\n    [\n        false,\n        '#,##0.00 \"dollars\"',\n    ],\n    [\n        true,\n        '\"date \" y-m-d',\n    ],\n    [\n        false,\n        '\\C\\H\\-00000',\n    ],\n    [\n        false,\n        '\\D-00000',\n    ],\n    [true, '[$-F800]'],\n    [true, 'hello[$-F400]goodbye'],\n    [false, '[$-F401]'],\n    [true, '[$-x-sysdate]'],\n    [true, '[$-x-systime]'],\n    [false, '[$-x-systim]'],\n];\n"
  },
  {
    "path": "tests/data/Shared/Date/FormattedPHPToExcel1900.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Year   Month  Day  Hours  Minutes  Seconds  Result            Comments\n\nreturn [\n    // PHP 32-bit Earliest Date 14-Dec-1901\n    [\n        714,\n        1901,\n        12,\n        14,\n    ],\n    // 31-Dec-1903\n    [\n        1461,\n        1903,\n        12,\n        31,\n    ],\n    // Excel 1904 Calendar Base Date   01-Jan-1904\n    [\n        1462,\n        1904,\n        1,\n        1,\n    ],\n    // 02-Jan-1904\n    [\n        1463,\n        1904,\n        1,\n        2,\n    ],\n    // 19-Dec-1960\n    [\n        22269,\n        1960,\n        12,\n        19,\n    ],\n    // PHP Base Date 01-Jan-1970\n    [\n        25569,\n        1970,\n        1,\n        1,\n    ],\n    // 07-Dec-1982\n    [\n        30292,\n        1982,\n        12,\n        7,\n    ],\n    // 12-Jun-2008\n    [\n        39611,\n        2008,\n        6,\n        12,\n    ],\n    // PHP 32-bit Latest Date 19-Jan-2038\n    [\n        50424,\n        2038,\n        1,\n        19,\n    ],\n    // 18-May-1903 13:37:46\n    [\n        1234.56789,\n        1903,\n        5,\n        18,\n        13,\n        37,\n        46,\n    ],\n    // 18-Oct-1933 16:17:37\n    [\n        12345.6789,\n        1933,\n        10,\n        18,\n        16,\n        17,\n        37,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/Date/TimestampToExcel1900.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Unix TimeStamp   Result           Comments\n\nreturn [\n    // PHP 32-bit Earliest Date 14-Dec-1901\n    [\n        714,\n        -2147472000,\n    ],\n    // 31-Dec-1903\n    [\n        1461,\n        -2082931200,\n    ],\n    // Excel 1904 Calendar Base Date   01-Jan-1904\n    [\n        1462,\n        -2082844800,\n    ],\n    // 02-Jan-1904\n    [\n        1463,\n        -2082758400,\n    ],\n    // 19-Dec-1960\n    [\n        22269,\n        -285120000,\n    ],\n    // PHP Base Date 01-Jan-1970\n    [\n        25569,\n        0,\n    ],\n    // 07-Dec-1982\n    [\n        30292,\n        408067200,\n    ],\n    // 12-Jun-2008\n    [\n        39611,\n        1213228800,\n    ],\n    // PHP 32-bit Latest Date 19-Jan-2038\n    [\n        50424,\n        2147472000,\n    ],\n    // 18-May-1903 13:37:46\n    [\n        1234.56789,\n        -2102494934,\n    ],\n    // 18-Oct-1933 16:17:37\n    [\n        12345.6789,\n        -1142494943,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/Date/TimestampToExcel1904.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n// Excel DateTimeStamp  Result\nreturn [\n    [\n        1462,\n        -1956528000,\n    ],\n    [\n        1463,\n        -1956441600,\n    ],\n    [\n        22269,\n        -158803200,\n    ],\n    [\n        25569,\n        126316800,\n    ],\n    [\n        30292,\n        534384000,\n    ],\n    [\n        39611,\n        1339545600,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/FontSizeToPixels.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        8,\n        6,\n    ],\n    [\n        9,\n        7,\n    ],\n    [\n        10,\n        8,\n    ],\n    [\n        12,\n        9,\n    ],\n    [\n        13,\n        10,\n    ],\n    [\n        14,\n        11,\n    ],\n    [\n        16,\n        12,\n    ],\n    [\n        18,\n        14,\n    ],\n    [\n        21,\n        16,\n    ],\n    [\n        24,\n        18,\n    ],\n    [\n        26,\n        20,\n    ],\n    [\n        29,\n        22,\n    ],\n    [\n        32,\n        24,\n    ],\n    [\n        48,\n        36,\n    ],\n    [\n        64,\n        48,\n    ],\n    [\n        80,\n        60,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/InchSizeToPixels.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        9.5999999999999996,\n        0.10000000000000001,\n    ],\n    [\n        19.199999999999999,\n        0.20000000000000001,\n    ],\n    [\n        48.0,\n        0.5,\n    ],\n    [\n        96.0,\n        1.0,\n    ],\n    [\n        192.0,\n        2.0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/OLERead/document",
    "content": ""
  },
  {
    "path": "tests/data/Shared/OLERead/summary",
    "content": ""
  },
  {
    "path": "tests/data/Shared/PasswordHashes.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'BCDE',\n        'PhpSpreadsheet',\n    ],\n    [\n        '877D',\n        'Mark Baker',\n    ],\n    [\n        'C0EA',\n        '!+&=()~§±æþ',\n    ],\n    [\n        'C07E',\n        '秘密口令',\n    ],\n    [\n        '99E8',\n        'leyndarmál lykilorð',\n    ],\n    [\n        'CE4B',\n        '',\n    ],\n    [\n        'O6EXRLpLEDNJDL/AzYtnnA4O4bY=',\n        '',\n        'SHA-1',\n    ],\n    [\n        'GYvlIMljDI1Czc4jfWrGaxU5pxl9n5Og0KUzyAfYxwk=',\n        'PhpSpreadsheet',\n        'SHA-256',\n        'Php_salt',\n        1000,\n    ],\n    [\n        'sSHdxQv9qgpkr4LDT0bYQxM9hOQJFRhJ4D752/NHQtDDR1EVy67NCEW9cPd6oWvCoBGd96MqKpuma1A7pN1nEA==',\n        'Mark Baker',\n        'SHA-512',\n        'Mark_salt',\n        10000,\n    ],\n    [\n        'r9KVLLCKIYOILvE2rcby+g==',\n        '!+&=()~§±æþ',\n        'MD5',\n        'Symbols_salt',\n        100000,\n    ],\n    // Additional tests suggested by Issue #1897\n    ['DCDF', 'ABCDEFGHIJKLMNOPQRSTUVW'],\n    ['ECD1', 'ABCDEFGHIJKLMNOPQRSTUVWX'],\n    ['88D2', 'ABCDEFGHIJKLMNOPQRSTUVWXY'],\n    'password too long' => ['exception', str_repeat('x', 256)],\n];\n"
  },
  {
    "path": "tests/data/Shared/Trend/ExponentialBestFit.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'expectedSlope' => [0.8, 0.813512072856517],\n        'expectedIntersect' => [20.7, 20.671878197177865],\n        'expectedGoodnessOfFit' => [0.904868, 0.9048681877346413],\n        'expectedEquation' => 'Y = 20.67 * 0.81^X',\n        'yValues' => [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n        'xValues' => [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n    ],\n];\n"
  },
  {
    "path": "tests/data/Shared/Trend/LinearBestFit.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        'expectedSlope' => [-1.1, -1.1064189189190],\n        'expectedIntersect' => [14.1, 14.081081081081],\n        'expectedGoodnessOfFit' => [0.873138, 0.8731378215564962],\n        'expectedEquation' => 'Y = 14.08 + -1.11 * X',\n        'yValues' => [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],\n        'xValues' => [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],\n        'xForY' => 12.72671756,\n    ],\n    [\n        'expectedSlope' => [1.0, 1.0],\n        'expectedIntersect' => [-2.0, -2.0],\n        'expectedGoodnessOfFit' => [1.0, 1.0],\n        'expectedEquation' => 'Y = -2 + 1 * X',\n        'yValues' => [1, 2, 3, 4, 5],\n        'xValues' => [3, 4, 5, 6, 7],\n        'xForY' => 2.0,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Style/Color/ColorChangeBrightness.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    // RGBA\n    [\n        'FFB2C1D1',\n        'FFAABBCC',\n        0.1,\n    ],\n    // RGBA\n    [\n        'FF92A8BE',\n        'FFAABBCC',\n        -0.1,\n    ],\n    // RGB\n    [\n        'B2C1D1',\n        'AABBCC',\n        0.1,\n    ],\n    [\n        '92A8BE',\n        'AABBCC',\n        -0.1,\n    ],\n    [\n        'FF1A1A',\n        'FF0000',\n        0.1,\n    ],\n    [\n        'E60000',\n        'FF0000',\n        -0.1,\n    ],\n    [\n        'FF8C8C',\n        'FF8080',\n        0.1,\n    ],\n    [\n        'FF5959',\n        'FF8080',\n        -0.1,\n    ],\n    [\n        'FF2626',\n        'FF0000',\n        0.15,\n    ],\n    [\n        'D90000',\n        'FF0000',\n        -0.15,\n    ],\n    [\n        'FF9393',\n        'FF8080',\n        0.15,\n    ],\n    [\n        'FF4646',\n        'FF8080',\n        -0.15,\n    ],\n    [\n        'FFF984',\n        'FFF008',\n        0.5,\n    ],\n    [\n        '847D00',\n        'FFF008',\n        -0.5,\n    ],\n    'issue 3550' => [\n        '558ED5',\n        '1F497D',\n        0.39997558519241921,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Style/Color/ColorGetBlue.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    // RGBA (hex)\n    [\n        'CC',\n        'FFAABBCC',\n    ],\n    // RGBA (decimal)\n    [\n        204,\n        'FFAABBCC',\n        false,\n    ],\n    // RGB (hex)\n    [\n        'CC',\n        'AABBCC',\n    ],\n    // RGB (decimal)\n    [\n        204,\n        'AABBCC',\n        false,\n    ],\n    [\n        '00',\n        'FFFF00',\n    ],\n    [\n        0,\n        'FFFF00',\n        false,\n    ],\n    'invalid hex' => ['00', 'AABBDX'],\n];\n"
  },
  {
    "path": "tests/data/Style/Color/ColorGetGreen.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    // RGBA (hex)\n    [\n        'BB',\n        'FFAABBCC',\n    ],\n    // RGBA (decimal)\n    [\n        187,\n        'FFAABBCC',\n        false,\n    ],\n    // RGB (hex)\n    [\n        'BB',\n        'AABBCC',\n    ],\n    // RGB (decimal)\n    [\n        187,\n        'AABBCC',\n        false,\n    ],\n    [\n        '00',\n        'FF00FF',\n    ],\n    [\n        0,\n        'FF00FF',\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Style/Color/ColorGetRed.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    // RGBA (hex)\n    [\n        'AA',\n        'FFAABBCC',\n    ],\n    // RGBA (decimal)\n    [\n        170,\n        'FFAABBCC',\n        false,\n    ],\n    // RGB (hex)\n    [\n        'AA',\n        'AABBCC',\n    ],\n    // RGB (decimal)\n    [\n        170,\n        'AABBCC',\n        false,\n    ],\n    [\n        '00',\n        '00FFFF',\n    ],\n    [\n        0,\n        '00FFFF',\n        false,\n    ],\n];\n"
  },
  {
    "path": "tests/data/Style/NumberFormat.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\n\n//  value, format, result\n\nreturn [\n    [\n        '0.0',\n        0.0,\n        '0.0',\n    ],\n    [\n        '0',\n        0.0,\n        '0',\n    ],\n    [\n        '0.0',\n        0,\n        '0.0',\n    ],\n    [\n        '0',\n        0,\n        '0',\n    ],\n    [\n        '000',\n        0,\n        '##0',\n    ],\n    [\n        '12.00',\n        12,\n        '#.0#',\n    ],\n    [\n        '0.1',\n        0.10000000000000001,\n        '0.0',\n    ],\n    [\n        '0',\n        0.10000000000000001,\n        '0',\n    ],\n    [\n        '5.556',\n        5.5555000000000003,\n        '0.###',\n    ],\n    [\n        '5.556',\n        5.5555000000000003,\n        '0.0##',\n    ],\n    [\n        '5.556',\n        5.5555000000000003,\n        '0.00#',\n    ],\n    [\n        '12 345.67',\n        12345.67,\n        '#\\ ##0.00',\n    ],\n    [\n        '1234 567.00',\n        1234567.00,\n        '#\\ ##0.00',\n    ],\n    [\n        '5.556',\n        5.5555000000000003,\n        '0.000',\n    ],\n    [\n        '5.5555',\n        5.5555000000000003,\n        '0.0000',\n    ],\n    [\n        '12,345.68',\n        12345.678900000001,\n        '#,##0.00',\n    ],\n    [\n        '12,345.679',\n        12345.678900000001,\n        '#,##0.000',\n    ],\n    [\n        '12.34 kg',\n        12.34,\n        '0.00 \"kg\"',\n    ],\n    [\n        'kg 12.34',\n        12.34,\n        '\"kg\" 0.00',\n    ],\n    [\n        '12.34 kg.',\n        12.34,\n        '0.00 \"kg.\"',\n    ],\n    [\n        'kg. 12.34',\n        12.34,\n        '\"kg.\" 0.00',\n    ],\n    [\n        '£ 12,345.68',\n        12345.678900000001,\n        '£ #,##0.00',\n    ],\n    [\n        '$ 12,345.679',\n        12345.678900000001,\n        '$ #,##0.000',\n    ],\n    [\n        '12,345.679 €',\n        12345.678900000001,\n        '#,##0.000\\ [$€-1]',\n    ],\n    [\n        '12,345.679 $',\n        12345.678900000001,\n        '#,##0.000\\ [$]',\n    ],\n    'Spacing Character' => [\n        '826.00  €',\n        826,\n        '#,##0.00 __€',\n    ],\n    [\n        '5.68',\n        5.6788999999999996,\n        '#,##0.00',\n    ],\n    [\n        '12,000',\n        12000,\n        '#,###',\n    ],\n    [\n        '12',\n        12000,\n        '#,',\n    ],\n    // Scaling test\n    [\n        '12.2',\n        12200000,\n        '0.0,,',\n    ],\n    // Percentage\n    [\n        '12%',\n        0.12,\n        '0%',\n    ],\n    [\n        '8%',\n        0.080000000000000002,\n        '0%',\n    ],\n    [\n        '80%',\n        0.80000000000000004,\n        '0%',\n    ],\n    [\n        '280%',\n        2.7999999999999998,\n        '0%',\n    ],\n    [\n        '$125.74 Surplus',\n        125.73999999999999,\n        '$0.00\" Surplus\";$-0.00\" Shortage\"',\n    ],\n    [\n        '$-125.74 Shortage',\n        -125.73999999999999,\n        '$0.00\" Surplus\";$-0.00\" Shortage\"',\n    ],\n    [\n        '$125.74 Shortage',\n        -125.73999999999999,\n        '$0.00\" Surplus\";$0.00\" Shortage\"',\n    ],\n    [\n        '12%',\n        0.123,\n        '0%',\n    ],\n    [\n        '-9.1%',\n        -0.091,\n        '0.0%',\n    ],\n    [\n        '-99.1%',\n        -0.991,\n        '0.0%',\n    ],\n    [\n        '-9.10%',\n        -0.091,\n        '0.00%',\n    ],\n    [\n        '-99.10%',\n        -0.991,\n        '0.00%',\n    ],\n    [\n        '10%',\n        0.1,\n        '0%',\n    ],\n    [\n        '10.0%',\n        0.1,\n        '0.0%',\n    ],\n    [\n        '-12%',\n        -0.123,\n        '0%',\n    ],\n    [\n        '12.3  %',\n        0.123,\n        '0.?? %',\n    ],\n    [\n        '12.35 %',\n        0.12345,\n        '0.?? %',\n    ],\n    [\n        '12.345  %',\n        0.12345,\n        '0.00?? %',\n    ],\n    [\n        '12.3457 %',\n        0.123456789,\n        '0.00?? %',\n    ],\n    [\n        '-12.3  %',\n        -0.123,\n        '0.?? %',\n    ],\n    [\n        '12.30 %age',\n        0.123,\n        '0.00 %\"age\"',\n    ],\n    [\n        '-12.30 %age',\n        -0.123,\n        '0.00 %\"age\"',\n    ],\n    [\n        '12.30%',\n        0.123,\n        '0.00%;(0.00%)',\n    ],\n    [\n        '(12.30%)',\n        -0.123,\n        '0.00%;(0.00%)',\n    ],\n    [\n        '12.30% ',\n        0.123,\n        '0.00%_;( 0.00% )',\n    ],\n    [\n        '( 12.30% )',\n        -0.123,\n        '_(0.00%_;( 0.00% )',\n    ],\n    // Complex formats\n    [\n        '(001) 2-3456-789',\n        123456789,\n        '(000) 0-0000-000',\n    ],\n    [\n        '0 (+00) 0123 45 67 89',\n        123456789,\n        '0 (+00) 0000 00 00 00',\n    ],\n    [\n        '002-01-0035-7',\n        20100357,\n        '000-00-0000-0',\n    ],\n    [\n        '002-01-00.35-7',\n        20100.357,\n        '000-00-00.00-0',\n    ],\n    [\n        '002.01.0035.7',\n        20100357,\n        '000\\.00\\.0000\\.0',\n    ],\n    [\n        '002.01.00.35.7',\n        20100.357,\n        '000\\.00\\.00.00\\.0',\n    ],\n    [\n        '002.01.00.35.70',\n        20100.357,\n        '000\\.00\\.00.00\\.00',\n    ],\n    [\n        '12345:67:89',\n        123456789,\n        '0000:00:00',\n    ],\n    [\n        '-12345:67:89',\n        -123456789,\n        '0000:00:00',\n    ],\n    [\n        '12345:67.89',\n        1234567.8899999999,\n        '0000:00.00',\n    ],\n    [\n        '-12345:67.89',\n        -1234567.8899999999,\n        '0000:00.00',\n    ],\n    [\n        '18.952',\n        18.952,\n        '[$-409]General',\n    ],\n    [\n        '9.98',\n        9.98,\n        '[$-409]#,##0.00;-#,##0.00',\n    ],\n    [\n        '18.952',\n        18.952,\n        '[$-1010409]General',\n    ],\n    [\n        '9.98',\n        9.98,\n        '[$-1010409]#,##0.00;-#,##0.00',\n    ],\n    [\n        ' $ 23.06 ',\n        23.0597,\n        '_(\"$\"* #,##0.00_);_(\"$\"* \\(#,##0.00\\);_(\"$\"* \"-\"??_);_(@_)',\n    ],\n    [\n        ' € (13.03)',\n        -13.0316,\n        '_(\"€\"* #,##0.00_);_(\"€\"* \\(#,##0.00\\);_(\"€\"* \"-\"??_);_(@_)',\n    ],\n    [\n        ' € 11.70 ',\n        11.7,\n        '_-€* #,##0.00_-;\"-€\"* #,##0.00_-;_-€* -??_-;_-@_-',\n    ],\n    [\n        '-€ 12.14 ',\n        -12.14,\n        '_-€* #,##0.00_-;\"-€\"* #,##0.00_-;_-€* -??_-;_-@_-',\n    ],\n    [\n        ' € -   ',\n        0,\n        '_-€* #,##0.00_-;\"-€\"* #,##0.00_-;_-€* -??_-;_-@_-',\n    ],\n    [\n        'test',\n        'test',\n        '_-€* #,##0.00_-;\"-€\"* #,##0.00_-;_-€* -??_-;_-@_-',\n    ],\n    // String masks (ie. @)\n    [\n        'World',\n        'World',\n        '@',\n    ],\n    [\n        'Hello World',\n        'World',\n        'Hello @',\n    ],\n    [\n        'Hello World',\n        'World',\n        '\"Hello \"@',\n    ],\n    [\n        'Meet me @ The Boathouse @ 16:30',\n        'The Boathouse',\n        '\"Meet me @ \"@\" @ 16:30\"',\n    ],\n    // Named colours\n    // Simple color\n    [\n        '12345',\n        12345,\n        '[Green]General',\n    ],\n    [\n        '12345',\n        12345,\n        '[GrEeN]General',\n    ],\n    [\n        '-70',\n        -70,\n        '#,##0;[Red]-#,##0',\n    ],\n    [\n        '-12,345',\n        -12345,\n        '#,##0;[Red]-#,##0',\n    ],\n    // Multiple colors\n    [\n        '12345',\n        12345,\n        '[Blue]0;[Red]0-',\n    ],\n    [\n        '12345-',\n        -12345,\n        '[BLUE]0;[red]0-',\n    ],\n    [\n        '12345-',\n        -12345,\n        '[blue]0;[RED]0-',\n    ],\n    // Multiple colors with text substitution\n    [\n        'Positive',\n        12,\n        '[Green]\"Positive\";[Red]\"Negative\";[Blue]\"Zero\"',\n    ],\n    [\n        'Zero',\n        0,\n        '[Green]\"Positive\";[Red]\"Negative\";[Blue]\"Zero\"',\n    ],\n    [\n        'Negative',\n        -2,\n        '[Green]\"Positive\";[Red]\"Negative\";[Blue]\"Zero\"',\n    ],\n    // Colour palette index\n    [\n        '+710',\n        710,\n        '[color 10]+#,##0;[color 12]-#,##0',\n    ],\n    [\n        '-710',\n        -710,\n        '[color 10]+#,##0;[color 12]-#,##0',\n    ],\n    // Colour palette index\n    [\n        '+710',\n        710,\n        '[color10]+#,##0;[color12]-#,##0',\n    ],\n    [\n        '-710',\n        -710,\n        '[color10]+#,##0;[color12]-#,##0',\n    ],\n    [\n        '-710',\n        -710,\n        '[color01]+#,##0;[color02]-#,##0',\n    ],\n    [\n        '-710',\n        -710,\n        '[color08]+#,##0;[color09]-#,##0',\n    ],\n    [\n        '-710',\n        -710,\n        '[color55]+#,##0;[color56]-#,##0',\n    ],\n    // Value break points\n    [\n        '<=3500 red',\n        3500,\n        '[Green][=17]\"=17 green\";[Red][<=3500]\"<=3500 red\";[Blue]\"Zero\"',\n    ],\n    [\n        '=17 green',\n        17,\n        '[Green][=17]\"=17 green\";[Red][<=3500]\"<=3500 red\";[Blue]\"Zero\"',\n    ],\n    [\n        '<>25 green',\n        17,\n        '[Green][<>25]\"<>25 green\";[Red]\"else red\"',\n    ],\n    [\n        'else red',\n        25,\n        '[Green][<>25]\"<>25 green\";[Red]\"else red\"',\n    ],\n    // Leading/trailing quotes in mask\n    [\n        '$12.34 ',\n        12.34,\n        '$#,##0.00_;[RED]\"($\"#,##0.00\")\"',\n    ],\n    [\n        '($12.34)',\n        -12.34,\n        '$#,##0.00_;[RED]\"($\"#,##0.00\")\"',\n    ],\n    [\n        'pfx. 25.00',\n        25,\n        '\"pfx.\" 0.00;\"pfx.\" -0.00;\"pfx.\" 0.00;',\n    ],\n    [\n        'pfx. 25.20',\n        25.2,\n        '\"pfx.\" 0.00;\"pfx.\" -0.00;\"pfx.\" 0.00;',\n    ],\n    [\n        'pfx. -25.20',\n        -25.2,\n        '\"pfx.\" 0.00;\"pfx.\" -0.00;\"pfx.\" 0.00;',\n    ],\n    [\n        'pfx. 25.26',\n        25.255555555555555,\n        '\"pfx.\" 0.00;\"pfx.\" -0.00;\"pfx.\" 0.00;',\n    ],\n    [\n        '1',\n        '1.000',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '-1',\n        '-1.000',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '1',\n        '1',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '-1',\n        '-1',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '0',\n        '0',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '0',\n        '-0',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '1',\n        '1.1',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '1',\n        '1.4',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '2',\n        '1.5',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '2',\n        '1.9',\n        NumberFormat::FORMAT_NUMBER,\n    ],\n    [\n        '1.0',\n        '1.000',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '-1.0',\n        '-1.000',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '1.0',\n        '1',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '-1.0',\n        '-1',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '1.0',\n        '1',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '0.0',\n        '0',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '0.0',\n        '-0',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '1.1',\n        '1.11',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '1.1',\n        '1.14',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '1.2',\n        '1.15',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '1.2',\n        '1.19',\n        NumberFormat::FORMAT_NUMBER_0,\n    ],\n    [\n        '0.00',\n        '0',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '1.00',\n        '1',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '1.11',\n        '1.111',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '1.11',\n        '1.114',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '1.12',\n        '1.115',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '1.12',\n        '1.119',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '0.00',\n        '-0',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '-1.00',\n        '-1',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '-1.11',\n        '-1.111',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '-1.11',\n        '-1.114',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '-1.12',\n        '-1.115',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '-1.12',\n        '-1.119',\n        NumberFormat::FORMAT_NUMBER_00,\n    ],\n    [\n        '0.00',\n        '0',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '1,000.00',\n        '1000',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '1,111.11',\n        '1111.111',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '1,111.11',\n        '1111.114',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '1,111.12',\n        '1111.115',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '1,111.12',\n        '1111.119',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '0.00',\n        '-0',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '-1,111.00',\n        '-1111',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '-1,111.11',\n        '-1111.111',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '-1,111.11',\n        '-1111.114',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '-1,111.12',\n        '-1111.115',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '-1,111.12',\n        '-1111.119',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,\n    ],\n    [\n        '0.00 ',\n        '0',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '1,000.00 ',\n        '1000',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '1,111.11 ',\n        '1111.111',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '1,111.11 ',\n        '1111.114',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '1,111.12 ',\n        '1111.115',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '1,111.12 ',\n        '1111.119',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '0.00 ',\n        '-0',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '-1,111.00 ',\n        '-1111',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '-1,111.11 ',\n        '-1111.111',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '-1,111.11 ',\n        '-1111.114',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '-1,111.12 ',\n        '-1111.115',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '-1,111.12 ',\n        '-1111.119',\n        NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2,\n    ],\n    [\n        '0%',\n        '0',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '1%',\n        '0.01',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '1%',\n        '0.011',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '1%',\n        '0.014',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '2%',\n        '0.015',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '2%',\n        '0.019',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '0%',\n        '-0',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '-1%',\n        '-0.01',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '-1%',\n        '-0.011',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '-1%',\n        '-0.014',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '-2%',\n        '-0.015',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '-2%',\n        '-0.019',\n        NumberFormat::FORMAT_PERCENTAGE,\n    ],\n    [\n        '0.0%',\n        '0',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '1.0%',\n        '0.01',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '1.1%',\n        '0.011',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '1.1%',\n        '0.0114',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '1.2%',\n        '0.0115',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '1.2%',\n        '0.0119',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '0.0%',\n        '-0',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '-1.0%',\n        '-0.01',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '-1.1%',\n        '-0.011',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '-1.1%',\n        '-0.0114',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '-1.2%',\n        '-0.0115',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '-1.2%',\n        '-0.0119',\n        NumberFormat::FORMAT_PERCENTAGE_0,\n    ],\n    [\n        '0.00%',\n        '0',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '1.00%',\n        '0.01',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '1.11%',\n        '0.0111',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '1.11%',\n        '0.01114',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '1.12%',\n        '0.01115',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '1.12%',\n        '0.01119',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '0.00%',\n        '-0',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '-1.00%',\n        '-0.01',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '-1.11%',\n        '-0.0111',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '-1.11%',\n        '-0.01114',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '-1.12%',\n        '-0.01115',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '-1.12%',\n        '-0.01119',\n        NumberFormat::FORMAT_PERCENTAGE_00,\n    ],\n    [\n        '$0.00 ',\n        '0',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,000.00 ',\n        '1000',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,111.11 ',\n        '1111.111',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,111.11 ',\n        '1111.114',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,111.12 ',\n        '1111.115',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,111.12 ',\n        '1111.119',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$0.00 ',\n        '-0',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.00 ',\n        '-1111',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.11 ',\n        '-1111.111',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.11 ',\n        '-1111.114',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.12 ',\n        '-1111.115',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.12 ',\n        '-1111.119',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$0 ',\n        '0',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,000 ',\n        '1000',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,111 ',\n        '1111.1',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,111 ',\n        '1111.4',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,112 ',\n        '1111.5',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,112 ',\n        '1111.9',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$0 ',\n        '-0',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,111 ',\n        '-1111',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,111 ',\n        '-1111.1',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,111 ',\n        '-1111.4',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,112 ',\n        '-1111.5',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,112 ',\n        '-1111.9',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$0.00 ',\n        '0',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,000.00 ',\n        '1000',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,111.11 ',\n        '1111.111',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,111.11 ',\n        '1111.114',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,111.12 ',\n        '1111.115',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$1,111.12 ',\n        '1111.119',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$0.00 ',\n        '-0',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.00 ',\n        '-1111',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.11 ',\n        '-1111.111',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.11 ',\n        '-1111.114',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.12 ',\n        '-1111.115',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$-1,111.12 ',\n        '-1111.119',\n        NumberFormat::FORMAT_CURRENCY_USD,\n    ],\n    [\n        '$0 ',\n        '0',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,000 ',\n        '1000',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,111 ',\n        '1111.1',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,111 ',\n        '1111.4',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,112 ',\n        '1111.5',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$1,112 ',\n        '1111.9',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$0 ',\n        '-0',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,111 ',\n        '-1111',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,111 ',\n        '-1111.1',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,111 ',\n        '-1111.4',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,112 ',\n        '-1111.5',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '$-1,112 ',\n        '-1111.9',\n        NumberFormat::FORMAT_CURRENCY_USD_INTEGER,\n    ],\n    [\n        '0.00 €',\n        '0',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '1,000.00 €',\n        '1000',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '1,111.11 €',\n        '1111.111',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '1,111.11 €',\n        '1111.114',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '1,111.12 €',\n        '1111.115',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '1,111.12 €',\n        '1111.119',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '0.00 €',\n        '-0',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '-1,111.00 €',\n        '-1111',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '-1,111.11 €',\n        '-1111.111',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '-1,111.11 €',\n        '-1111.114',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '-1,111.12 €',\n        '-1111.115',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '-1,111.12 €',\n        '-1111.119',\n        NumberFormat::FORMAT_CURRENCY_EUR,\n    ],\n    [\n        '0 €',\n        '0',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '1,000 €',\n        '1000',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '1,111 €',\n        '1111.1',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '1,111 €',\n        '1111.4',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '1,112 €',\n        '1111.5',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '1,112 €',\n        '1111.9',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '0 €',\n        '-0',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '-1,111 €',\n        '-1111',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '-1,111 €',\n        '-1111.1',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '-1,111 €',\n        '-1111.4',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '-1,112 €',\n        '-1111.5',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        '-1,112 €',\n        '-1111.9',\n        NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,\n    ],\n    [\n        ' $ -   ',\n        '0',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ 1,000.00 ',\n        '1000',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ 1,111.11 ',\n        '1111.111',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ 1,111.11 ',\n        '1111.114',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ 1,111.12 ',\n        '1111.115',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ 1,111.12 ',\n        '1111.119',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ -   ',\n        '-0',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ (1,111.00)',\n        '-1111',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ (1,111.11)',\n        '-1111.111',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ (1,111.11)',\n        '-1111.114',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ (1,111.12)',\n        '-1111.115',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' $ (1,111.12)',\n        '-1111.119',\n        NumberFormat::FORMAT_ACCOUNTING_USD,\n    ],\n    [\n        ' € -   ',\n        '0',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € 1,000.00 ',\n        '1000',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € 1,111.11 ',\n        '1111.111',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € 1,111.11 ',\n        '1111.114',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € 1,111.12 ',\n        '1111.115',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € 1,111.12 ',\n        '1111.119',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € -   ',\n        '-0',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € (1,111.00)',\n        '-1111',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € (1,111.11)',\n        '-1111.111',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € (1,111.11)',\n        '-1111.114',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € (1,111.12)',\n        '-1111.115',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    [\n        ' € (1,111.12)',\n        '-1111.119',\n        NumberFormat::FORMAT_ACCOUNTING_EUR,\n    ],\n    'issue 1929' => ['(79.3%)', -0.793, '#,##0.0%;(#,##0.0%)'],\n    'percent without leading 0' => ['6.2%', 0.062, '##.0%'],\n    'percent with leading 0' => ['06.2%', 0.062, '00.0%'],\n    'percent lead0 no decimal' => ['06%', 0.062, '00%'],\n    'percent nolead0 no decimal' => ['6%', 0.062, '##%'],\n    'scientific small complex mask discard all decimals' => ['0 000.0', 1e-17, '0 000.0'],\n    'scientific small complex mask keep some decimals' => ['-0 000.000027', -2.7e-5, '0 000.000000'],\n    'scientific small complex mask keep some decimals trailing zero' => ['-0 000.000040', -4e-5, '0 000.000000'],\n    'scientific large complex mask' => ['92' . str_repeat('0', 13) . ' 000.0', 9.2e17, '0 000.0'],\n    'scientific very large complex mask PhpSpreadsheet does not match Excel' => ['1' . str_repeat('0', 18), 1e18, '0 000.0'],\n    'scientific even larger complex mask PhpSpreadsheet does not match Excel' => ['43' . str_repeat('0', 89), 4.3e90, '0 000.0'],\n    'scientific many decimal positions' => ['000 0.000 01', 1e-5, '000 0.000 00'],\n    'round with scientific notation' => ['000 0.000 02', 1.6e-5, '000 0.000 00'],\n    'round with no decimals' => ['009 8', 97.7, '000 0'],\n    'round to 1 decimal' => ['009 7.2', 97.15, '000 0.0'],\n    'truncate with no decimals' => ['009 7', 97.3, '000 0'],\n    'truncate to 1 decimal' => ['009 7.1', 97.13, '000 0.0'],\n    'scientific many decimal positions truncated' => ['000 0.000 00', 1e-7, '000 0.000 00'],\n    'scientific very many decimal positions truncated' => ['000 0.000 00', 1e-17, '000 0.000 00'],\n    [\n        '€ 1,111.12 ',\n        '1111.119',\n        '[$€-nl_NL]_(#,##0.00_);[$€-nl_NL] (#,##0.00)',\n    ],\n    [\n        '€ (1,111.12)',\n        '-1111.119',\n        '[$€-nl_NL]_(#,##0.00_);[$€-nl_NL] (#,##0.00)',\n    ],\n    [\n        '€ 1,111.12 ',\n        '1111.119',\n        '[$€-en_US]_(#,##0.00_);[$€-en_US] (#,##0.00)',\n    ],\n    [\n        '-1.2E+4',\n        -12345.6789,\n        '0.0E+00',\n    ],\n    [\n        '-1.23E+4',\n        -12345.6789,\n        '0.00E+00',\n    ],\n    [\n        '-1.235E+4',\n        -12345.6789,\n        '0.000E+00',\n    ],\n    [\n        'Product SKU #12345',\n        12345,\n        '\"Product SKU #\"0',\n    ],\n    [\n        'Product SKU #12-345',\n        12345,\n        '\"Product SKU #\"00-000',\n    ],\n    [\n        '€12,345.74 Surplus for Product #12-345',\n        12345.74,\n        '[$€]#,##0.00\" Surplus for Product #12-345\";$-#,##0.00\" Shortage for Product #12-345\"',\n    ],\n    // Scaling\n    [\n        '12,000',\n        12000,\n        '#,###',\n    ],\n    [\n        '12',\n        12000,\n        '#,',\n    ],\n    [\n        '0',\n        120,\n        '#,',\n    ],\n    [\n        '0.12',\n        120,\n        '#,.00',\n    ],\n    [\n        '12k',\n        12000,\n        '#,k',\n    ],\n    [\n        '12.2',\n        12200000,\n        '0.0,,',\n    ],\n    [\n        '12.2 M',\n        12200000,\n        '0.0,, M',\n    ],\n    [\n        '1,025.13',\n        1025132.36,\n        '#,###,.##',\n    ],\n    [\n        '.05',\n        50,\n        '#.00,',\n    ],\n    [\n        '50.05',\n        50050,\n        '#.00,',\n    ],\n    [\n        '555.50',\n        555500,\n        '#.00,',\n    ],\n    [\n        '.56',\n        555500,\n        '#.00,,',\n    ],\n    // decimal placement\n    [\n        ' 44.398',\n        44.398,\n        '???.???',\n    ],\n    [\n        '102.65 ',\n        102.65,\n        '???.???',\n    ],\n    [\n        '  2.8  ',\n        2.8,\n        '???.???',\n    ],\n    [\n        '  3',\n        2.8,\n        '???',\n    ],\n    [\n        '12,345',\n        12345,\n        '?,???',\n    ],\n    [\n        '123',\n        123,\n        '?,???',\n    ],\n    [\n        '$.50',\n        0.5,\n        '$?.00',\n    ],\n    [\n        'Part Cost $.50',\n        0.5,\n        'Part Cost $?.00',\n    ],\n    // Empty Section\n    [\n        '',\n        -12345.6789,\n        '#,##0.00;',\n    ],\n    [\n        '',\n        -12345.6789,\n        '#,##0.00;;\"---\"',\n    ],\n    'issue 4124' => ['1 HUF', 1, '#,##0_-[$HUF]'],\n    'issue 4242 General with dollar sign' => [\n        'General $200 - 200', // expected result\n        'General $200 - 200', // cell contents\n        NumberFormat::FORMAT_GENERAL, // cell style\n    ],\n    'issue 4242 Text with dollar sign' => [\n        'Text $200 - 200',\n        'Text $200 - 200',\n        NumberFormat::FORMAT_TEXT,\n    ],\n    'issue 4242 Text with quotes, format without' => [\n        '\"Hello\" she said and \"Hello\" I replied',\n        '\"Hello\" she said and \"Hello\" I replied',\n        NumberFormat::FORMAT_TEXT,\n    ],\n    'issue 4242 Format with quotes, text without' => [\n        'Text: $200 - 200',\n        '$200 - 200',\n        '\"Text: \"' . NumberFormat::FORMAT_TEXT,\n    ],\n    'issue 4242 single quote mark' => [\n        '\"',\n        '\"',\n        '@',\n    ],\n    'issue 4242 dollar sign' => [\n        '$100',\n        '$100',\n        '@',\n    ],\n    'issue 4242 repeat unquoted at signs' => [\n        'xy xy xy',\n        'xy',\n        '@ @ @',\n    ],\n    'issue 4242 quotes in format and text' => [\n        'Text: \"Hooray\" for me',\n        '\"Hooray\" for me',\n        '\"Text: \"' . NumberFormat::FORMAT_TEXT,\n    ],\n    'issue 4242 escaped quote in format' => [\n        '\"Hello\"',\n        'Hello',\n        '\\\"@\\\"',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Style/NumberFormatDates.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n    [\n        '19-12-1960 01:30:00',\n        22269.0625,\n        'dd-mm-yyyy hh:mm:ss',\n    ],\n    'Oasis uses upper-case' => [\n        '12/19/1960 01:30:00',\n        22269.0625,\n        'MM/DD/YYYY HH:MM:SS',\n    ],\n    'plaintext escaped with backslash' => [\n        '1960-12-19T01:30:00',\n        22269.0625,\n        'yyyy-mm-dd\\Thh:mm:ss',\n    ],\n    'plaintext in quotes' => [\n        '1960-12-19T01:30:00 Z',\n        22269.0625,\n        'yyyy-mm-dd\"T\"hh:mm:ss \\Z',\n    ],\n    'quoted formatting characters' => [\n        'y-m-d 1960-12-19 h:m:s 01:30:00',\n        22269.0625,\n        '\"y-m-d\" yyyy-mm-dd \"h:m:s\" hh:mm:ss',\n    ],\n    'quoted formatting non-ascii characters' => [\n        '§1960-12-19',\n        22269.0625,\n        '\"§\"yyyy-mm-dd',\n    ],\n    'fractional/decimal time' => [\n        '2023/02/28 0:00:00.000',\n        44985,\n        'yyyy/mm/dd\\ h:mm:ss.000',\n    ],\n    [\n        '2023/02/28 07:35:02.400',\n        44985.316,\n        'yyyy/mm/dd\\ hh:mm:ss.000',\n    ],\n    [\n        '2023/02/28 07:35:13.067',\n        44985.316123456,\n        'yyyy/mm/dd\\ hh:mm:ss.000',\n    ],\n    [\n        '2023/02/28 07:35:13.07',\n        44985.316123456,\n        'yyyy/mm/dd\\ hh:mm:ss.00',\n    ],\n    [\n        '2023/02/28 07:35:13.1',\n        44985.316123456,\n        'yyyy/mm/dd\\ hh:mm:ss.0',\n    ],\n    [\n        '07:35:00 AM',\n        43270.315972222,\n        'hh:mm:ss\\ AM/PM',\n    ],\n    [\n        '02:29:00 PM',\n        43270.603472222,\n        'hh:mm:ss\\ AM/PM',\n    ],\n    [\n        '8/20/2018',\n        43332,\n        '[$-409]m/d/yyyy',\n    ],\n    [\n        '8/20/2018',\n        43332,\n        '[$-1010409]m/d/yyyy',\n    ],\n    [\n        '27:15',\n        1.1354166666667,\n        '[h]:mm',\n    ],\n    [\n        '19331018',\n        12345.6789,\n        '[DBNum4][$-804]yyyymmdd;@',\n    ],\n    // Technically should be １９３３１０１８\n    [\n        '19331018',\n        12345.6789,\n        '[DBNum3][$-zh-CN]yyyymmdd;@',\n    ],\n    'hour with leading 0 and minute' => [\n        '03:36',\n        1.15,\n        'hh:mm',\n    ],\n    'hour without leading 0 and minute' => [\n        '3:36',\n        1.15,\n        'h:mm',\n    ],\n    'hour truncated not rounded' => [\n        '27',\n        1.15,\n        '[hh]',\n    ],\n    'interval hour > 10 so no need for leading 0 and minute' => [\n        '27:36',\n        1.15,\n        '[hh]:mm',\n    ],\n    'interval hour > 10 no leading 0 and minute' => [\n        '27:36',\n        1.15,\n        '[h]:mm',\n    ],\n    'interval hour with leading 0 and minute' => [\n        '03:36',\n        0.15,\n        '[hh]:mm',\n    ],\n    'interval hour no leading 0 and minute' => [\n        '3:36',\n        0.15,\n        '[h]:mm',\n    ],\n    'interval hours > 100 and minutes no need for leading 0' => [\n        '123:36',\n        5.15,\n        '[hh]:mm',\n    ],\n    'interval hours > 100 and minutes no leading 0' => [\n        '123:36',\n        5.15,\n        '[h]:mm',\n    ],\n    'interval minutes > 10 no need for leading 0' => [\n        '1656',\n        1.15,\n        '[mm]',\n    ],\n    'interval minutes > 10 no leading 0' => [\n        '1656',\n        1.15,\n        '[m]',\n    ],\n    'interval minutes < 10 leading 0' => [\n        '07',\n        0.005,\n        '[mm]',\n    ],\n    'interval minutes < 10 no leading 0' => [\n        '7',\n        0.005,\n        '[m]',\n    ],\n    'interval minutes and seconds' => [\n        '07:12',\n        0.005,\n        '[mm]:ss',\n    ],\n    'interval seconds' => [\n        '432',\n        0.005,\n        '[ss]',\n    ],\n    'interval seconds rounded up leading 0' => [\n        '09',\n        0.0001,\n        '[ss]',\n    ],\n    'interval seconds rounded up no leading 0' => [\n        '9',\n        0.0001,\n        '[s]',\n    ],\n    'interval seconds rounded down' => [\n        '6',\n        0.00007,\n        '[s]',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Style/NumberFormatFractions.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\n//  value, format, result\n\nreturn [\n    // Fraction\n    [\n        '5 1/4',\n        5.25,\n        '# ???/???',\n    ],\n    [\n        '5 2/8',\n        5.25,\n        '# ???/8',\n    ],\n    [\n        '5 4/16',\n        5.25,\n        '# ???/16',\n    ],\n    [\n        '5 1/4',\n        5.25,\n        '# ##0/000',\n    ],\n    [\n        '5 1/4',\n        5.25,\n        '# ##0/###',\n    ],\n    [\n        '5 3/10',\n        5.2999999999999998,\n        '# ???/???',\n    ],\n    // Vulgar Fraction\n    [\n        '21/4',\n        5.25,\n        '???/???',\n    ],\n    [\n        '0 3/4',\n        0.75,\n        '0??/???',\n    ],\n    [\n        '3/4',\n        0.75,\n        '#??/???',\n    ],\n    [\n        ' 3/4',\n        0.75,\n        '? ??/???',\n    ],\n    [\n        ' 3/4',\n        '0.75000',\n        '? ??/???',\n    ],\n    [\n        '5 1/16',\n        5.0625,\n        '? ??/???',\n    ],\n    [\n        '- 5/8',\n        -0.625,\n        '? ??/???',\n    ],\n    [\n        '0',\n        0,\n        '? ??/???',\n    ],\n    [\n        '0',\n        '0.000',\n        '? ??/???',\n    ],\n    [\n        '-16',\n        '-016.0',\n        '? ??/???',\n    ],\n    // Fixed base Fraction\n    [\n        '5 1/2',\n        5.25,\n        '# ???/2',\n    ],\n    [\n        '5 1/4',\n        5.25,\n        '# ???/4',\n    ],\n    [\n        '5 2/8',\n        5.25,\n        '# ???/8',\n    ],\n    [\n        '5 3/10',\n        5.25,\n        '# ???/10',\n    ],\n    [\n        '5 25/100',\n        5.25,\n        '# ???/100',\n    ],\n    [\n        '525/100',\n        5.25,\n        '??/100',\n    ],\n    [\n        '525/100',\n        5.25,\n        '???/100',\n    ],\n    [\n        '2 2/3',\n        2.65,\n        '# ???/3',\n    ],\n    [\n        '2 3/4',\n        2.65,\n        '# ???/4',\n    ],\n    [\n        '2 4/6',\n        2.65,\n        '# ???/6',\n    ],\n    [\n        '2 8/12',\n        2.65,\n        '# ???/12',\n    ],\n];\n"
  },
  {
    "path": "tests/data/Writer/Ods/content-arrays.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<office:document-content xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:style=\"urn:oasis:names:tc:opendocument:xmlns:style:1.0\" xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" xmlns:table=\"urn:oasis:names:tc:opendocument:xmlns:table:1.0\" xmlns:draw=\"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\" xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" xmlns:number=\"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\" xmlns:presentation=\"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\" xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" xmlns:chart=\"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\" xmlns:dr3d=\"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\" xmlns:math=\"http://www.w3.org/1998/Math/MathML\" xmlns:form=\"urn:oasis:names:tc:opendocument:xmlns:form:1.0\" xmlns:script=\"urn:oasis:names:tc:opendocument:xmlns:script:1.0\" xmlns:ooo=\"http://openoffice.org/2004/office\" xmlns:ooow=\"http://openoffice.org/2004/writer\" xmlns:oooc=\"http://openoffice.org/2004/calc\" xmlns:dom=\"http://www.w3.org/2001/xml-events\" xmlns:xforms=\"http://www.w3.org/2002/xforms\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rpt=\"http://openoffice.org/2005/report\" xmlns:of=\"urn:oasis:names:tc:opendocument:xmlns:of:1.2\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:grddl=\"http://www.w3.org/2003/g/data-view#\" xmlns:tableooo=\"http://openoffice.org/2009/table\" xmlns:field=\"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0\" xmlns:formx=\"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0\" xmlns:css3t=\"http://www.w3.org/TR/css3-text/\" office:version=\"1.2\">\n<office:scripts/>\n<office:font-face-decls/>\n<office:automatic-styles>\n<style:style style:master-page-name=\"Default\" style:family=\"table\" style:name=\"ta1\">\n<style:table-properties table:display=\"true\"/>\n</style:style>\n<style:style style:name=\"ce0\" style:family=\"table-cell\" style:parent-style-name=\"Default\">\n<style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n<style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>\n</style:style>\n</office:automatic-styles>\n<office:body>\n<office:spreadsheet>\n<table:calculation-settings/>\n<table:table table:name=\"Worksheet\" table:style-name=\"ta1\">\n<office:forms/>\n<table:table-row>\n<table:table-cell table:style-name=\"ce0\" office:value-type=\"float\" office:value=\"1\">\n<text:p>1</text:p>\n</table:table-cell>\n<table:table-cell table:style-name=\"ce0\" table:number-matrix-columns-spanned=\"1\" table:number-matrix-rows-spanned=\"2\" table:formula=\"of:=UNIQUE([.A1:.A3])\" office:value-type=\"float\" office:value=\"1\">\n<text:p>1</text:p>\n</table:table-cell>\n</table:table-row>\n<table:table-row>\n<table:table-cell table:style-name=\"ce0\" office:value-type=\"float\" office:value=\"1\">\n<text:p>1</text:p>\n</table:table-cell>\n<table:table-cell table:style-name=\"ce0\" office:value-type=\"float\" office:value=\"3\">\n<text:p>3</text:p>\n</table:table-cell>\n</table:table-row>\n<table:table-row>\n<table:table-cell table:style-name=\"ce0\" office:value-type=\"float\" office:value=\"3\">\n<text:p>3</text:p>\n</table:table-cell>\n</table:table-row>\n</table:table>\n<table:named-expressions/>\n</office:spreadsheet>\n</office:body>\n</office:document-content>"
  },
  {
    "path": "tests/data/Writer/Ods/content-empty.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<office:document-content xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:style=\"urn:oasis:names:tc:opendocument:xmlns:style:1.0\" xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" xmlns:table=\"urn:oasis:names:tc:opendocument:xmlns:table:1.0\" xmlns:draw=\"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\" xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" xmlns:number=\"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\" xmlns:presentation=\"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\" xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" xmlns:chart=\"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\" xmlns:dr3d=\"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\" xmlns:math=\"http://www.w3.org/1998/Math/MathML\" xmlns:form=\"urn:oasis:names:tc:opendocument:xmlns:form:1.0\" xmlns:script=\"urn:oasis:names:tc:opendocument:xmlns:script:1.0\" xmlns:ooo=\"http://openoffice.org/2004/office\" xmlns:ooow=\"http://openoffice.org/2004/writer\" xmlns:oooc=\"http://openoffice.org/2004/calc\" xmlns:dom=\"http://www.w3.org/2001/xml-events\" xmlns:xforms=\"http://www.w3.org/2002/xforms\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rpt=\"http://openoffice.org/2005/report\" xmlns:of=\"urn:oasis:names:tc:opendocument:xmlns:of:1.2\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:grddl=\"http://www.w3.org/2003/g/data-view#\" xmlns:tableooo=\"http://openoffice.org/2009/table\" xmlns:field=\"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0\" xmlns:formx=\"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0\" xmlns:css3t=\"http://www.w3.org/TR/css3-text/\" office:version=\"1.2\">\n    <office:scripts />\n    <office:font-face-decls />\n    <office:automatic-styles>\n        <style:style style:family=\"table\" style:master-page-name=\"Default\" style:name=\"ta1\">\n            <style:table-properties table:display=\"true\" />\n        </style:style>\n        <style:style style:name=\"ce0\" style:family=\"table-cell\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\" />\n        </style:style>\n    </office:automatic-styles>\n    <office:body>\n        <office:spreadsheet>\n            <table:calculation-settings />\n            <table:table table:name=\"Worksheet\" table:style-name=\"ta1\">\n                <office:forms />\n            </table:table>\n            <table:named-expressions />\n        </office:spreadsheet>\n    </office:body>\n</office:document-content>"
  },
  {
    "path": "tests/data/Writer/Ods/content-hidden-worksheet.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<office:document-content xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:style=\"urn:oasis:names:tc:opendocument:xmlns:style:1.0\" xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" xmlns:table=\"urn:oasis:names:tc:opendocument:xmlns:table:1.0\" xmlns:draw=\"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\" xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" xmlns:number=\"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\" xmlns:presentation=\"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\" xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" xmlns:chart=\"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\" xmlns:dr3d=\"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\" xmlns:math=\"http://www.w3.org/1998/Math/MathML\" xmlns:form=\"urn:oasis:names:tc:opendocument:xmlns:form:1.0\" xmlns:script=\"urn:oasis:names:tc:opendocument:xmlns:script:1.0\" xmlns:ooo=\"http://openoffice.org/2004/office\" xmlns:ooow=\"http://openoffice.org/2004/writer\" xmlns:oooc=\"http://openoffice.org/2004/calc\" xmlns:dom=\"http://www.w3.org/2001/xml-events\" xmlns:xforms=\"http://www.w3.org/2002/xforms\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rpt=\"http://openoffice.org/2005/report\" xmlns:of=\"urn:oasis:names:tc:opendocument:xmlns:of:1.2\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:grddl=\"http://www.w3.org/2003/g/data-view#\" xmlns:tableooo=\"http://openoffice.org/2009/table\" xmlns:field=\"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0\" xmlns:formx=\"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0\" xmlns:css3t=\"http://www.w3.org/TR/css3-text/\" office:version=\"1.2\">\n    <office:scripts />\n    <office:font-face-decls />\n    <office:automatic-styles>\n        <style:style style:family=\"table\" style:master-page-name=\"Default\" style:name=\"ta1\">\n            <style:table-properties table:display=\"true\" />\n        </style:style>\n        <style:style style:family=\"table\" style:master-page-name=\"Default\" style:name=\"ta2\">\n            <style:table-properties table:display=\"false\"/>\n        </style:style>\n        <style:style style:name=\"ce0\" style:family=\"table-cell\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\" />\n        </style:style>\n    </office:automatic-styles>\n    <office:body>\n        <office:spreadsheet>\n            <table:calculation-settings />\n            <table:table table:name=\"Worksheet\" table:style-name=\"ta1\">\n                <office:forms />\n                <table:table-row>\n                    <table:table-cell office:value=\"1\" office:value-type=\"float\" table:style-name=\"ce0\">\n                        <text:p>1</text:p>\n                    </table:table-cell>\n                </table:table-row>\n            </table:table>\n            <table:table table:name=\"New Worksheet\" table:style-name=\"ta2\">\n                <office:forms/>\n                <table:table-row>\n                    <table:table-cell office:value=\"2\" office:value-type=\"float\" table:style-name=\"ce0\">\n                        <text:p>2</text:p>\n                    </table:table-cell>\n                </table:table-row>\n            </table:table>\n            <table:named-expressions />\n        </office:spreadsheet>\n    </office:body>\n</office:document-content>"
  },
  {
    "path": "tests/data/Writer/Ods/content-with-data.xml",
    "content": "<?xml version=\"1.0\"?>\n<office:document-content xmlns:chart=\"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\" xmlns:css3t=\"http://www.w3.org/TR/css3-text/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dom=\"http://www.w3.org/2001/xml-events\" xmlns:dr3d=\"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\" xmlns:draw=\"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\" xmlns:field=\"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0\" xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" xmlns:form=\"urn:oasis:names:tc:opendocument:xmlns:form:1.0\" xmlns:formx=\"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0\" xmlns:grddl=\"http://www.w3.org/2003/g/data-view#\" xmlns:math=\"http://www.w3.org/1998/Math/MathML\" xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" xmlns:number=\"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\" xmlns:of=\"urn:oasis:names:tc:opendocument:xmlns:of:1.2\" xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:ooo=\"http://openoffice.org/2004/office\" xmlns:oooc=\"http://openoffice.org/2004/calc\" xmlns:ooow=\"http://openoffice.org/2004/writer\" xmlns:presentation=\"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\" xmlns:rpt=\"http://openoffice.org/2005/report\" xmlns:script=\"urn:oasis:names:tc:opendocument:xmlns:script:1.0\" xmlns:style=\"urn:oasis:names:tc:opendocument:xmlns:style:1.0\" xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" xmlns:table=\"urn:oasis:names:tc:opendocument:xmlns:table:1.0\" xmlns:tableooo=\"http://openoffice.org/2009/table\" xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" xmlns:xforms=\"http://www.w3.org/2002/xforms\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" office:version=\"1.2\">\n    <office:scripts/>\n    <office:font-face-decls/>\n    <office:automatic-styles>\n        <style:style style:family=\"table\" style:master-page-name=\"Default\" style:name=\"ta1\">\n            <style:table-properties table:display=\"true\" />\n        </style:style>\n        <style:style style:family=\"table\" style:master-page-name=\"Default\" style:name=\"ta2\">\n            <style:table-properties table:display=\"true\" />\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce0\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>\n        </style:style>\n    <number:date-style style:name=\"N200\">\n      <number:day/>\n      <number:text>/</number:text>\n      <number:month/>\n      <number:text>/</number:text>\n      <number:year/>\n      <number:text> </number:text>\n      <number:hours/>\n      <number:text>:</number:text>\n      <number:minutes number:style=\"long\"/>\n    </number:date-style>\n    <style:style style:data-style-name=\"N200\" style:family=\"table-cell\" style:name=\"ce1\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce2\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties style:font-weight-asian=\"bold\" style:font-weight-complex=\"bold\" fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\" fo:font-weight=\"bold\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce3\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\" fo:font-style=\"italic\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce4\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties fo:color=\"#000000\" fo:font-family=\"Courier\" fo:font-size=\"11pt\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce5\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties fo:color=\"#000000\" fo:font-family=\"Courier\" fo:font-size=\"14pt\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce6\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties fo:color=\"#0000FF\" fo:font-family=\"Courier\" fo:font-size=\"14pt\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce7\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"#ffffff\"/>\n            <style:text-properties fo:color=\"#0000FF\" fo:font-family=\"Courier\" fo:font-size=\"14pt\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce8\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"#ff0000\"/>\n            <style:text-properties fo:color=\"#0000FF\" fo:font-family=\"Courier\" fo:font-size=\"14pt\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce9\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"#ff0000\"/>\n            <style:text-properties style:text-underline-color=\"font-color\" style:text-underline-style=\"solid\" style:text-underline-type=\"single\" style:text-underline-width=\"auto\" fo:color=\"#0000FF\" fo:font-family=\"Courier\" fo:font-size=\"14pt\"/>\n        </style:style>\n        <style:style style:family=\"table-cell\" style:name=\"ce10\" style:parent-style-name=\"Default\">\n            <style:table-cell-properties style:rotation-align=\"none\" style:rotation-angle=\"0\" style:vertical-align=\"bottom\" fo:background-color=\"transparent\"/>\n            <style:text-properties style:text-underline-color=\"font-color\" style:text-underline-style=\"solid\" style:text-underline-type=\"double\" style:text-underline-width=\"auto\" fo:color=\"#000000\" fo:font-family=\"Calibri\" fo:font-size=\"11pt\"/>\n        </style:style>\n    </office:automatic-styles>\n    <office:body>\n        <office:spreadsheet>\n            <table:calculation-settings/>\n            <table:table table:name=\"Worksheet\" table:style-name=\"ta1\">\n                <office:forms/>\n                <table:table-row>\n                    <table:table-cell office:value=\"1\" office:value-type=\"float\" table:style-name=\"ce2\">\n                        <text:p>1</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:value=\"12345.6789\" office:value-type=\"float\" table:style-name=\"ce3\">\n                        <text:p>12345.6789</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:value=\"1\" office:value-type=\"float\" table:style-name=\"ce9\">\n                        <text:p>1</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:value-type=\"string\" table:style-name=\"ce0\">\n                        <text:p>01234</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:value-type=\"string\" table:style-name=\"ce0\">\n                        <text:p>Lorem ipsum</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:string-value=\"\" office:value-type=\"string\" table:formula=\"of:=#NULL!\" table:style-name=\"ce0\">\n                        <text:p>#NULL!</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:value-type=\"string\" table:style-name=\"ce0\">\n                        <text:p>Lorem ipsum</text:p>\n                    </table:table-cell>\n                </table:table-row>\n                <table:table-row>\n                    <table:table-cell office:boolean-value=\"true\" office:value-type=\"boolean\" table:style-name=\"ce0\">\n                        <text:p>TRUE</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:boolean-value=\"false\" office:value-type=\"boolean\" table:style-name=\"ce0\">\n                        <text:p>FALSE</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:string-value=\"1 1\" office:value-type=\"string\" table:formula=\"of:=IF([.A3]; CONCAT([.A1]; &quot; &quot;; [.A2]); CONCAT([.A2]; &quot; &quot;; [.A1]))\" table:style-name=\"ce10\">\n                        <text:p>1 1</text:p>\n                    </table:table-cell>\n                    <table:table-cell office:date-value=\"2017-03-04T13:43:46\" office:value-type=\"date\" table:style-name=\"ce1\">\n                        <text:p>4/3/17 13:43</text:p>\n                    </table:table-cell>\n                </table:table-row>\n            </table:table>\n            <table:table table:name=\"New Worksheet\" table:style-name=\"ta2\">\n                <office:forms/>\n                <table:table-row>\n                    <table:table-cell office:value=\"2\" office:value-type=\"float\" table:style-name=\"ce0\">\n                        <text:p>2</text:p>\n                    </table:table-cell>\n                </table:table-row>\n            </table:table>\n            <table:named-expressions/>\n        </office:spreadsheet>\n    </office:body>\n</office:document-content>\n"
  },
  {
    "path": "tests/data/Writer/XLSX/ArrayFunctions2.json",
    "content": "{\"MAXIMUMPUNTEN\":\"3\",\"ID\":\"65\",\"CLUBID\":\"3\",\"CLUBNAAM\":\"WSV\",\"NAAM\":\"Blitz 23-24\",\"REFJAAR\":\"2023\",\"PARINGEN\":\"1-5 2-6 3-7 4-8\\n1-6 2-5 8-7 4-3\\n3-1 8-2 4-6 7-5\\n1-7 2-4 6-8 5-3\\n4-1 7-2 6-3 5-8\\n8-1 3-2 7-6 5-4\\n8-3 7-4 6-5 1-2\",\"OMSCHRIJVING\":\"\",\"RONDEN\":1,\"ALTERNATIEVE_PARING\":\"1\",\"SUB_RONDEN\":7,\"SPEELRONDEN\":7,\"SPEELDAG\":\"5\",\"READONLY\":\"0\",\"ICS\":\"0\",\"VERBORGEN\":\"0\",\"TOONWINSTP\":\"0\",\"AANTALSPELERS\":\"8\",\"AANTALSPELERSNONBYE\":\"8\",\"PARTIJEN\":[],\"AANTALPARTIJEN\":\"21\",\"AANTALPARTIJENMETUITSLAG\":\"21\",\"TOONFIDE\":\"0\",\"KAMPIOENEN\":[],\"START\":\"20:00\",\"EINDE\":\"23:00\",\"TOONVANAF\":\"2023-11-01\",\"TOONTOT\":\"9999-12-31\",\"AFGEBROKENPARTIJEN\":\"0\",\"ONBEKENDEPARTIJEN\":\"0\",\"UITGESTELDEPARTIJEN\":\"0\",\"MAXAANTALPARTIJEN\":28,\"MAXAANTALPARTIJENPERSPELER\":7,\"KALENDERDATA\":[{\"DATUM\":\"2023-11-10\",\"TXT\":\"10\\/11\\/2023\",\"SHORT\":\"10\\/11\",\"RONDE\":\"1 \\u00b0 ronde\",\"OPMERKING\":null},{\"DATUM\":\"2023-12-08\",\"TXT\":\"08\\/12\\/2023\",\"SHORT\":\"08\\/12\",\"RONDE\":\"2 \\u00b0 ronde\",\"OPMERKING\":null},{\"DATUM\":\"2024-01-12\",\"TXT\":\"12\\/01\\/2024\",\"SHORT\":\"12\\/01\",\"RONDE\":\"3 \\u00b0 ronde\",\"OPMERKING\":null},{\"DATUM\":\"2024-02-09\",\"TXT\":\"09\\/02\\/2024\",\"SHORT\":\"09\\/02\",\"RONDE\":\"4 \\u00b0 ronde\",\"OPMERKING\":null},{\"DATUM\":\"2024-03-08\",\"TXT\":\"08\\/03\\/2024\",\"SHORT\":\"08\\/03\",\"RONDE\":\"5 \\u00b0 ronde\",\"OPMERKING\":null},{\"DATUM\":\"2024-04-12\",\"TXT\":\"12\\/04\\/2024\",\"SHORT\":\"12\\/04\",\"RONDE\":\"6 \\u00b0 ronde\",\"OPMERKING\":null},{\"DATUM\":\"2024-05-10\",\"TXT\":\"10\\/05\\/2024\",\"SHORT\":\"10\\/05\",\"RONDE\":\"7 \\u00b0 ronde\",\"OPMERKING\":null}],\"VOLGENDERONDEDATA\":[],\"VOLGENDERONDEPARTIJEN\":[{\"ronde\":\"129\",\"wit\":\"873\",\"zwart\":\"872\",\"opmerking\":\"\"},{\"ronde\":\"129\",\"wit\":\"875\",\"zwart\":\"870\",\"opmerking\":\"\"},{\"ronde\":\"129\",\"wit\":\"868\",\"zwart\":\"869\",\"opmerking\":\"\"},{\"ronde\":\"129\",\"wit\":\"874\",\"zwart\":\"871\",\"opmerking\":\"\"},{\"ronde\":\"128\",\"wit\":\"872\",\"zwart\":\"871\",\"opmerking\":\"\"},{\"ronde\":\"128\",\"wit\":\"875\",\"zwart\":\"868\",\"opmerking\":\"\"},{\"ronde\":\"128\",\"wit\":\"874\",\"zwart\":\"873\",\"opmerking\":\"\"}],\"SPLITPUNTEN\":[\"\"],\"PLAYERS\":{\"868\":{\"id\":\"868\",\"naam\":\"Dirk\",\"VOORNAAM\":\"Dirk\",\"FAMILIENAAM\":\"Bockaert\",\"stamnummer\":\"0\",\"elo\":\"0\",\"opmerking\":\"Kampioen 2022-2023\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"3\",\"zwartaantalPartijen\":\"2\",\"witgewonnen\":\"2\",\"zwartGewonnen\":\"0\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"2\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"3\",\"zwartgespeeld\":\"2\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"7\",\"puntenZwart\":\"1\",\"tegenpuntenWit\":\"0\",\"tegenpuntenZwart\":\"0\"},\"869\":{\"id\":\"869\",\"naam\":\"Casper\",\"VOORNAAM\":\"Casper\",\"FAMILIENAAM\":\"De Naeyer\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"3\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"2\",\"zwartGewonnen\":\"0\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"3\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"3\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"6\",\"puntenZwart\":\"1\",\"tegenpuntenWit\":\"-4\",\"tegenpuntenZwart\":\"0\"},\"870\":{\"id\":\"870\",\"naam\":\"Jan\",\"VOORNAAM\":\"Jan\",\"FAMILIENAAM\":\"Remue\",\"stamnummer\":\"13718\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"3\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"3\",\"zwartGewonnen\":\"3\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"0\",\"zwartVerloren\":\"0\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"3\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"9\",\"puntenZwart\":\"9\",\"tegenpuntenWit\":\"0\",\"tegenpuntenZwart\":\"0\"},\"871\":{\"id\":\"871\",\"naam\":\"Liam\",\"VOORNAAM\":\"Liam\",\"FAMILIENAAM\":\"Valck\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"4\",\"zwartaantalPartijen\":\"1\",\"witgewonnen\":\"2\",\"zwartGewonnen\":\"0\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"2\",\"zwartVerloren\":\"1\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"4\",\"zwartgespeeld\":\"1\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"8\",\"puntenZwart\":\"2\",\"tegenpuntenWit\":\"-2\",\"tegenpuntenZwart\":\"0\"},\"872\":{\"id\":\"872\",\"naam\":\"Wouter\",\"VOORNAAM\":\"Wouter\",\"FAMILIENAAM\":\"De Smet\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"2\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"1\",\"zwartGewonnen\":\"3\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"0\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"2\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"3\",\"puntenZwart\":\"9\",\"tegenpuntenWit\":\"-2\",\"tegenpuntenZwart\":\"-2\"},\"873\":{\"id\":\"873\",\"naam\":\"Rudy\",\"VOORNAAM\":\"Rudy\",\"FAMILIENAAM\":\"Maes\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"2\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"0\",\"zwartGewonnen\":\"0\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"2\",\"zwartVerloren\":\"3\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"2\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"0\",\"puntenZwart\":\"3\",\"tegenpuntenWit\":\"0\",\"tegenpuntenZwart\":\"0\"},\"874\":{\"id\":\"874\",\"naam\":\"Bob\",\"VOORNAAM\":\"Bob\",\"FAMILIENAAM\":\"Thys\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"2\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"1\",\"zwartGewonnen\":\"1\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"2\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"2\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"4\",\"puntenZwart\":\"3\",\"tegenpuntenWit\":\"0\",\"tegenpuntenZwart\":\"0\"},\"875\":{\"id\":\"875\",\"naam\":\"Gilles\",\"VOORNAAM\":\"Gilles\",\"FAMILIENAAM\":\"Bovijn\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"2\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"1\",\"zwartGewonnen\":\"2\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"1\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"2\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"3\",\"puntenZwart\":\"8\",\"tegenpuntenWit\":\"-1\",\"tegenpuntenZwart\":\"-2\"}},\"PLAYERSIDS\":[\"868\",\"869\",\"870\",\"871\",\"872\",\"873\",\"874\",\"875\"],\"PLAYERSNOID\":[{\"id\":\"868\",\"naam\":\"Dirk\",\"VOORNAAM\":\"Dirk\",\"FAMILIENAAM\":\"Bockaert\",\"stamnummer\":\"0\",\"elo\":\"0\",\"opmerking\":\"Kampioen 2022-2023\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"3\",\"zwartaantalPartijen\":\"2\",\"witgewonnen\":\"2\",\"zwartGewonnen\":\"0\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"2\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"3\",\"zwartgespeeld\":\"2\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"7\",\"puntenZwart\":\"1\",\"tegenpuntenWit\":\"0\",\"tegenpuntenZwart\":\"0\"},{\"id\":\"869\",\"naam\":\"Casper\",\"VOORNAAM\":\"Casper\",\"FAMILIENAAM\":\"De Naeyer\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"3\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"2\",\"zwartGewonnen\":\"0\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"3\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"3\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"6\",\"puntenZwart\":\"1\",\"tegenpuntenWit\":\"-4\",\"tegenpuntenZwart\":\"0\"},{\"id\":\"870\",\"naam\":\"Jan\",\"VOORNAAM\":\"Jan\",\"FAMILIENAAM\":\"Remue\",\"stamnummer\":\"13718\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"3\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"3\",\"zwartGewonnen\":\"3\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"0\",\"zwartVerloren\":\"0\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"3\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"9\",\"puntenZwart\":\"9\",\"tegenpuntenWit\":\"0\",\"tegenpuntenZwart\":\"0\"},{\"id\":\"871\",\"naam\":\"Liam\",\"VOORNAAM\":\"Liam\",\"FAMILIENAAM\":\"Valck\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"4\",\"zwartaantalPartijen\":\"1\",\"witgewonnen\":\"2\",\"zwartGewonnen\":\"0\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"2\",\"zwartVerloren\":\"1\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"4\",\"zwartgespeeld\":\"1\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"8\",\"puntenZwart\":\"2\",\"tegenpuntenWit\":\"-2\",\"tegenpuntenZwart\":\"0\"},{\"id\":\"872\",\"naam\":\"Wouter\",\"VOORNAAM\":\"Wouter\",\"FAMILIENAAM\":\"De Smet\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"2\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"1\",\"zwartGewonnen\":\"3\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"0\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"2\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"3\",\"puntenZwart\":\"9\",\"tegenpuntenWit\":\"-2\",\"tegenpuntenZwart\":\"-2\"},{\"id\":\"873\",\"naam\":\"Rudy\",\"VOORNAAM\":\"Rudy\",\"FAMILIENAAM\":\"Maes\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"2\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"0\",\"zwartGewonnen\":\"0\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"2\",\"zwartVerloren\":\"3\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"2\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"0\",\"puntenZwart\":\"3\",\"tegenpuntenWit\":\"0\",\"tegenpuntenZwart\":\"0\"},{\"id\":\"874\",\"naam\":\"Bob\",\"VOORNAAM\":\"Bob\",\"FAMILIENAAM\":\"Thys\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"2\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"1\",\"zwartGewonnen\":\"1\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"2\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"2\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"4\",\"puntenZwart\":\"3\",\"tegenpuntenWit\":\"0\",\"tegenpuntenZwart\":\"0\"},{\"id\":\"875\",\"naam\":\"Gilles\",\"VOORNAAM\":\"Gilles\",\"FAMILIENAAM\":\"Bovijn\",\"stamnummer\":\"\",\"elo\":\"0\",\"opmerking\":\"\",\"GrafOrder\":\"0\",\"weerstandspunten\":0,\"winstpunten\":0,\"voorsprong_punten\":\"0\",\"voorsprong_weerstandspunten\":\"0\",\"voorsprong_winstpunten\":\"0\",\"witaantalPartijen\":\"2\",\"zwartaantalPartijen\":\"3\",\"witgewonnen\":\"1\",\"zwartGewonnen\":\"2\",\"witremise\":\"0\",\"zwartremise\":\"0\",\"witVerloren\":\"1\",\"zwartVerloren\":\"1\",\"witGeeftForfait\":\"0\",\"zwartGeeftForfait\":\"0\",\"witKrijgtForfait\":\"0\",\"zwartKrijgtForfait\":\"0\",\"witafgebroken\":\"0\",\"zwartafgebroken\":\"0\",\"witUitgesteld\":\"0\",\"zwartUitgesteld\":\"0\",\"witonbekend\":\"0\",\"zwartonbekend\":\"0\",\"witextra\":\"0\",\"zwartextra\":\"0\",\"witgespeeld\":\"2\",\"zwartgespeeld\":\"3\",\"puntjes\":null,\"ledenID\":null,\"puntenWit\":\"3\",\"puntenZwart\":\"8\",\"tegenpuntenWit\":\"-1\",\"tegenpuntenZwart\":\"-2\"}],\"SPELERS\":{\"868\":\"Dirk\",\"869\":\"Casper\",\"870\":\"Jan\",\"871\":\"Liam\",\"872\":\"Wouter\",\"873\":\"Rudy\",\"874\":\"Bob\",\"875\":\"Gilles\"},\"SPELERSNOID\":[],\"NEXTROUNDS\":[{\"id\":\"128\",\"id_toernooi\":\"65\",\"dtm\":\"12\\/04\\/2024\",\"naam\":\"6 \\u00b0 ronde\",\"opmerking\":\"\",\"datum\":\"2024-04-12\",\"pinkinterval\":\"0\",\"forecolor\":\"#000000\",\"backcolor\":\"#00FFFF\",\"showbyesFromGames\":\"0\",\"tonen\":\"2\",\"van\":\"2024-01-24\",\"OPMERKING\":null,\"IMAGE\":null,\"aantalpartijen\":\"3\",\"vanverleden\":\"1\"},{\"id\":\"136\",\"id_toernooi\":\"65\",\"dtm\":\"26\\/04\\/2024\",\"naam\":\"inhaal 4\",\"opmerking\":\"\",\"datum\":\"2024-04-26\",\"pinkinterval\":\"0\",\"forecolor\":\"#000000\",\"backcolor\":\"#0000ff\",\"showbyesFromGames\":\"2\",\"tonen\":\"2\",\"van\":\"2024-01-24\",\"OPMERKING\":\"\",\"IMAGE\":null,\"aantalpartijen\":\"0\",\"vanverleden\":\"1\"},{\"id\":\"129\",\"id_toernooi\":\"65\",\"dtm\":\"10\\/05\\/2024\",\"naam\":\"7 \\u00b0 ronde\",\"opmerking\":\"\",\"datum\":\"2024-05-10\",\"pinkinterval\":\"0\",\"forecolor\":\"#000000\",\"backcolor\":\"#00FFFF\",\"showbyesFromGames\":\"0\",\"tonen\":\"2\",\"van\":\"2024-01-24\",\"OPMERKING\":null,\"IMAGE\":null,\"aantalpartijen\":\"4\",\"vanverleden\":\"1\"},{\"id\":\"151\",\"id_toernooi\":\"65\",\"dtm\":\"24\\/05\\/2024\",\"naam\":\"inhaal 5\",\"opmerking\":\"\",\"datum\":\"2024-05-24\",\"pinkinterval\":\"0\",\"forecolor\":\"#000000\",\"backcolor\":\"#e0ffff\",\"showbyesFromGames\":\"2\",\"tonen\":\"2\",\"van\":\"2024-01-24\",\"OPMERKING\":\"\",\"IMAGE\":null,\"aantalpartijen\":\"0\",\"vanverleden\":\"1\"},{\"id\":\"148\",\"id_toernooi\":\"65\",\"dtm\":\"14\\/06\\/2024\",\"naam\":\"inhaal 6\",\"opmerking\":\"\",\"datum\":\"2024-06-14\",\"pinkinterval\":\"0\",\"forecolor\":\"#000000\",\"backcolor\":\"#e0ffff\",\"showbyesFromGames\":\"2\",\"tonen\":\"2\",\"van\":\"2024-01-24\",\"OPMERKING\":\"\",\"IMAGE\":null,\"aantalpartijen\":\"0\",\"vanverleden\":\"1\"}],\"GAMES\":{\"868\":{\"872\":{\"ID\":\"5164\",\"WIT\":\"Dirk\",\"ZWART\":\"Wouter\",\"UITSLAG\":\"36\",\"DATUM\":\"2023-12-22\",\"UITSTELLER\":\"0\",\"METHODE\":\"kalender\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-02-02 21:21:02\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"1\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":1},\"873\":{\"ID\":\"5168\",\"WIT\":\"Dirk\",\"ZWART\":\"Rudy\",\"UITSLAG\":\"38\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"spelersuitslagen\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-04-05 20:59:30\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":2},\"874\":{\"ID\":\"5214\",\"WIT\":\"Dirk\",\"ZWART\":\"Bob\",\"UITSLAG\":\"38\",\"DATUM\":\"2024-02-09\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-02-09 21:09:56\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":4}},\"869\":{\"871\":{\"ID\":\"5218\",\"WIT\":\"Casper\",\"ZWART\":\"Liam\",\"UITSLAG\":\"40\",\"DATUM\":\"2024-03-08\",\"UITSTELLER\":\"2\",\"METHODE\":\"volgenderonden\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-08 21:14:36\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"2\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":4},\"872\":{\"ID\":\"5167\",\"WIT\":\"Casper\",\"ZWART\":\"Wouter\",\"UITSLAG\":\"35\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:54\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":2},\"873\":{\"ID\":\"5163\",\"WIT\":\"Casper\",\"ZWART\":\"Rudy\",\"UITSLAG\":\"40\",\"DATUM\":\"2023-12-29\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:53\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"2\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":1}},\"870\":{\"868\":{\"ID\":\"5173\",\"WIT\":\"Jan\",\"ZWART\":\"Dirk\",\"UITSLAG\":\"38\",\"DATUM\":\"2024-01-12\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:55\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":3},\"869\":{\"ID\":\"5175\",\"WIT\":\"Jan\",\"ZWART\":\"Casper\",\"UITSLAG\":\"38\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"volgenderonden\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:30:25\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":6},\"874\":{\"ID\":\"5165\",\"WIT\":\"Jan\",\"ZWART\":\"Bob\",\"UITSLAG\":\"38\",\"DATUM\":\"2023-11-17\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:54\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":1}},\"871\":{\"868\":{\"ID\":\"5265\",\"WIT\":\"Liam\",\"ZWART\":\"Dirk\",\"UITSLAG\":\"39\",\"DATUM\":\"2024-03-15\",\"UITSTELLER\":\"2\",\"METHODE\":\"volgenderondenactievetoernooien\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-15 21:30:00\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"1\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":5},\"870\":{\"ID\":\"5170\",\"WIT\":\"Liam\",\"ZWART\":\"Jan\",\"UITSLAG\":\"35\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:55\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":2},\"873\":{\"ID\":\"5174\",\"WIT\":\"Liam\",\"ZWART\":\"Rudy\",\"UITSLAG\":\"39\",\"DATUM\":\"2024-01-12\",\"UITSTELLER\":\"0\",\"METHODE\":\"kruistabel\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-01 20:23:11\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"1\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":3},\"875\":{\"ID\":\"5166\",\"WIT\":\"Liam\",\"ZWART\":\"Gilles\",\"UITSLAG\":\"37\",\"DATUM\":\"2023-11-17\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:54\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"2\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":1}},\"872\":{\"870\":{\"ID\":\"5216\",\"WIT\":\"Wouter\",\"ZWART\":\"Jan\",\"UITSLAG\":\"35\",\"DATUM\":\"2024-02-09\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-02-09 21:09:57\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":4},\"875\":{\"ID\":\"5270\",\"WIT\":\"Wouter\",\"ZWART\":\"Gilles\",\"UITSLAG\":\"40\",\"DATUM\":\"2024-03-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-08 21:42:25\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"2\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":5}},\"873\":{\"870\":{\"ID\":\"5269\",\"WIT\":\"Rudy\",\"ZWART\":\"Jan\",\"UITSLAG\":\"35\",\"DATUM\":\"2024-03-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-08 21:08:28\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":5},\"875\":{\"ID\":\"5215\",\"WIT\":\"Rudy\",\"ZWART\":\"Gilles\",\"UITSLAG\":\"35\",\"DATUM\":\"2024-02-09\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-02-09 21:09:56\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":4}},\"874\":{\"869\":{\"ID\":\"5271\",\"WIT\":\"Bob\",\"ZWART\":\"Casper\",\"UITSLAG\":\"38\",\"DATUM\":\"2024-03-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"kalender\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-08 21:53:48\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":5},\"872\":{\"ID\":\"5171\",\"WIT\":\"Bob\",\"ZWART\":\"Wouter\",\"UITSLAG\":\"36\",\"DATUM\":\"2024-03-01\",\"UITSTELLER\":\"0\",\"METHODE\":\"kruistabel\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-01 20:27:04\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"1\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":3}},\"875\":{\"869\":{\"ID\":\"5172\",\"WIT\":\"Gilles\",\"ZWART\":\"Casper\",\"UITSLAG\":\"39\",\"DATUM\":\"2024-01-12\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:55\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"1\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":3},\"874\":{\"ID\":\"5169\",\"WIT\":\"Gilles\",\"ZWART\":\"Bob\",\"UITSLAG\":\"35\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:54\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":2}}},\"RONDEGAMES\":{\"1\":{\"868\":{\"872\":{\"ID\":\"5164\",\"WIT\":\"Dirk\",\"ZWART\":\"Wouter\",\"UITSLAG\":\"36\",\"DATUM\":\"2023-12-22\",\"UITSTELLER\":\"0\",\"METHODE\":\"kalender\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-02-02 21:21:02\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"1\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":1},\"873\":{\"ID\":\"5168\",\"WIT\":\"Dirk\",\"ZWART\":\"Rudy\",\"UITSLAG\":\"38\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"spelersuitslagen\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-04-05 20:59:30\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":2},\"874\":{\"ID\":\"5214\",\"WIT\":\"Dirk\",\"ZWART\":\"Bob\",\"UITSLAG\":\"38\",\"DATUM\":\"2024-02-09\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-02-09 21:09:56\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":4}},\"869\":{\"871\":{\"ID\":\"5218\",\"WIT\":\"Casper\",\"ZWART\":\"Liam\",\"UITSLAG\":\"40\",\"DATUM\":\"2024-03-08\",\"UITSTELLER\":\"2\",\"METHODE\":\"volgenderonden\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-08 21:14:36\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"2\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":4},\"872\":{\"ID\":\"5167\",\"WIT\":\"Casper\",\"ZWART\":\"Wouter\",\"UITSLAG\":\"35\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:54\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":2},\"873\":{\"ID\":\"5163\",\"WIT\":\"Casper\",\"ZWART\":\"Rudy\",\"UITSLAG\":\"40\",\"DATUM\":\"2023-12-29\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:53\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"2\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":1}},\"870\":{\"868\":{\"ID\":\"5173\",\"WIT\":\"Jan\",\"ZWART\":\"Dirk\",\"UITSLAG\":\"38\",\"DATUM\":\"2024-01-12\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:55\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":3},\"869\":{\"ID\":\"5175\",\"WIT\":\"Jan\",\"ZWART\":\"Casper\",\"UITSLAG\":\"38\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"volgenderonden\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:30:25\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":6},\"874\":{\"ID\":\"5165\",\"WIT\":\"Jan\",\"ZWART\":\"Bob\",\"UITSLAG\":\"38\",\"DATUM\":\"2023-11-17\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:54\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":1}},\"871\":{\"868\":{\"ID\":\"5265\",\"WIT\":\"Liam\",\"ZWART\":\"Dirk\",\"UITSLAG\":\"39\",\"DATUM\":\"2024-03-15\",\"UITSTELLER\":\"2\",\"METHODE\":\"volgenderondenactievetoernooien\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-15 21:30:00\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"1\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":5},\"870\":{\"ID\":\"5170\",\"WIT\":\"Liam\",\"ZWART\":\"Jan\",\"UITSLAG\":\"35\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:55\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":2},\"873\":{\"ID\":\"5174\",\"WIT\":\"Liam\",\"ZWART\":\"Rudy\",\"UITSLAG\":\"39\",\"DATUM\":\"2024-01-12\",\"UITSTELLER\":\"0\",\"METHODE\":\"kruistabel\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-01 20:23:11\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"1\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":3},\"875\":{\"ID\":\"5166\",\"WIT\":\"Liam\",\"ZWART\":\"Gilles\",\"UITSLAG\":\"37\",\"DATUM\":\"2023-11-17\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:54\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"2\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":1}},\"872\":{\"870\":{\"ID\":\"5216\",\"WIT\":\"Wouter\",\"ZWART\":\"Jan\",\"UITSLAG\":\"35\",\"DATUM\":\"2024-02-09\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-02-09 21:09:57\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":4},\"875\":{\"ID\":\"5270\",\"WIT\":\"Wouter\",\"ZWART\":\"Gilles\",\"UITSLAG\":\"40\",\"DATUM\":\"2024-03-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-08 21:42:25\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"2\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":5}},\"873\":{\"870\":{\"ID\":\"5269\",\"WIT\":\"Rudy\",\"ZWART\":\"Jan\",\"UITSLAG\":\"35\",\"DATUM\":\"2024-03-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-08 21:08:28\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":5},\"875\":{\"ID\":\"5215\",\"WIT\":\"Rudy\",\"ZWART\":\"Gilles\",\"UITSLAG\":\"35\",\"DATUM\":\"2024-02-09\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-02-09 21:09:56\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":4}},\"874\":{\"869\":{\"ID\":\"5271\",\"WIT\":\"Bob\",\"ZWART\":\"Casper\",\"UITSLAG\":\"38\",\"DATUM\":\"2024-03-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"kalender\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-08 21:53:48\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":5},\"872\":{\"ID\":\"5171\",\"WIT\":\"Bob\",\"ZWART\":\"Wouter\",\"UITSLAG\":\"36\",\"DATUM\":\"2024-03-01\",\"UITSTELLER\":\"0\",\"METHODE\":\"kruistabel\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-03-01 20:27:04\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"1\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":3}},\"875\":{\"869\":{\"ID\":\"5172\",\"WIT\":\"Gilles\",\"ZWART\":\"Casper\",\"UITSLAG\":\"39\",\"DATUM\":\"2024-01-12\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:55\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"1\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":3},\"874\":{\"ID\":\"5169\",\"WIT\":\"Gilles\",\"ZWART\":\"Bob\",\"UITSLAG\":\"35\",\"DATUM\":\"2023-12-08\",\"UITSTELLER\":\"0\",\"METHODE\":\"gamesplayedNextgames\",\"INGEBRACHTDOOR\":\"Jan\",\"CHANGEDATE\":\"2024-01-24 11:28:54\",\"OPMERKING\":\"\",\"READONLY\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"NOTATION\":{\"NOTATION\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"COMMENT\":{\"COMMENT\":null,\"W_B\":null,\"DOOR\":null,\"DATUM\":null,\"IP\":null},\"RONDENR\":\"1\",\"RONDE\":2}}}},\"GAMES_U\":[],\"GAMES_A\":[],\"GAMES_O\":[],\"GAMES_NG\":[],\"PUNTENSYSTEEM\":{\"35\":{\"ID\":\"35\",\"SYSTEEM\":\"5\",\"NAAM\":\"0-3\",\"GROEP\":\"Gespeeld\",\"GROEPVOLGNR\":\"1\",\"PUNTVOLGNR\":\"1\",\"SYMBOOLWIT\":\"0\",\"SYMBOOLZWART\":\"3\",\"PUNTENWIT\":\"0\",\"PUNTENZWART\":\"3\",\"UA_NODIG\":\"0\",\"VOLGENDERONDE\":\"0\",\"TEGENWIT\":\"0\",\"TEGENZWART\":\"0\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\"},\"36\":{\"ID\":\"36\",\"SYSTEEM\":\"5\",\"NAAM\":\"1-3\",\"GROEP\":\"Gespeeld\",\"GROEPVOLGNR\":\"1\",\"PUNTVOLGNR\":\"2\",\"SYMBOOLWIT\":\"1\",\"SYMBOOLZWART\":\"3\",\"PUNTENWIT\":\"1\",\"PUNTENZWART\":\"3\",\"UA_NODIG\":\"0\",\"VOLGENDERONDE\":\"0\",\"TEGENWIT\":\"0\",\"TEGENZWART\":\"-1\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\"},\"37\":{\"ID\":\"37\",\"SYSTEEM\":\"5\",\"NAAM\":\"2-3\",\"GROEP\":\"Gespeeld\",\"GROEPVOLGNR\":\"1\",\"PUNTVOLGNR\":\"3\",\"SYMBOOLWIT\":\"2\",\"SYMBOOLZWART\":\"3\",\"PUNTENWIT\":\"2\",\"PUNTENZWART\":\"3\",\"UA_NODIG\":\"0\",\"VOLGENDERONDE\":\"0\",\"TEGENWIT\":\"0\",\"TEGENZWART\":\"-2\",\"CLASSE_WIT\":\"Verloren\",\"CLASSE_ZWART\":\"Gewonnen\"},\"38\":{\"ID\":\"38\",\"SYSTEEM\":\"5\",\"NAAM\":\"3-0\",\"GROEP\":\"Gespeeld\",\"GROEPVOLGNR\":\"1\",\"PUNTVOLGNR\":\"4\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"0\",\"PUNTENWIT\":\"3\",\"PUNTENZWART\":\"0\",\"UA_NODIG\":\"0\",\"VOLGENDERONDE\":\"0\",\"TEGENWIT\":\"0\",\"TEGENZWART\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\"},\"39\":{\"ID\":\"39\",\"SYSTEEM\":\"5\",\"NAAM\":\"3-1\",\"GROEP\":\"Gespeeld\",\"GROEPVOLGNR\":\"1\",\"PUNTVOLGNR\":\"5\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"1\",\"PUNTENWIT\":\"3\",\"PUNTENZWART\":\"1\",\"UA_NODIG\":\"0\",\"VOLGENDERONDE\":\"0\",\"TEGENWIT\":\"-1\",\"TEGENZWART\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\"},\"40\":{\"ID\":\"40\",\"SYSTEEM\":\"5\",\"NAAM\":\"3-2\",\"GROEP\":\"Gespeeld\",\"GROEPVOLGNR\":\"1\",\"PUNTVOLGNR\":\"6\",\"SYMBOOLWIT\":\"3\",\"SYMBOOLZWART\":\"2\",\"PUNTENWIT\":\"3\",\"PUNTENZWART\":\"2\",\"UA_NODIG\":\"0\",\"VOLGENDERONDE\":\"0\",\"TEGENWIT\":\"-2\",\"TEGENZWART\":\"0\",\"CLASSE_WIT\":\"Gewonnen\",\"CLASSE_ZWART\":\"Verloren\"},\"41\":{\"ID\":\"41\",\"SYSTEEM\":\"5\",\"NAAM\":\"Uitgesteld\",\"GROEP\":\"Later\",\"GROEPVOLGNR\":\"2\",\"PUNTVOLGNR\":\"1\",\"SYMBOOLWIT\":\"U\",\"SYMBOOLZWART\":\"U\",\"PUNTENWIT\":\"0\",\"PUNTENZWART\":\"0\",\"UA_NODIG\":\"1\",\"VOLGENDERONDE\":\"1\",\"TEGENWIT\":\"0\",\"TEGENZWART\":\"0\",\"CLASSE_WIT\":\"Uitgesteld\",\"CLASSE_ZWART\":\"Uitgesteld\"}},\"PUNTENSYSTEEMID\":\"5\",\"BACKGROUND\":\"#fef1a9\"}\r\n"
  }
]